diff --git a/AngularApp/prototype/src/app/api.service.ts b/AngularApp/prototype/src/app/api.service.ts index 3ee03f12ec97a4a5c6c8069e1346142c419b4dd9..40e84b6b529c5ed59765c1ac5acee58856ba4104 100644 --- a/AngularApp/prototype/src/app/api.service.ts +++ b/AngularApp/prototype/src/app/api.service.ts @@ -8,7 +8,7 @@ export interface RawData { export interface LshData { candidates: number[]; distances: number[]; - hash_functions: number[][][][]; + hash_functions: number[];// number[][][][]; parameters?: number[]; } diff --git a/AngularApp/prototype/src/app/labeling-window/labeling-window.component.ts b/AngularApp/prototype/src/app/labeling-window/labeling-window.component.ts index bcd12825feb61f80f54f87537ab5171ddd4d7e75..cda0355db26432c5a07eedf1dc1ab62fb3eb6131 100644 --- a/AngularApp/prototype/src/app/labeling-window/labeling-window.component.ts +++ b/AngularApp/prototype/src/app/labeling-window/labeling-window.component.ts @@ -44,7 +44,9 @@ export class LabelingWindowComponent implements OnInit { } async showSamples() { - this.topk = this.state.lshData.candidates.slice(0, this.k); + this.topk = this.state.lshData.candidates + .filter((candidate) => this.state.labels[candidate] !== true) + .slice(0, this.k); this.subplots = []; const values = await this.state.getWindow(this.topk); this.topk.forEach((index, i) => { diff --git a/AngularApp/prototype/src/app/progress-view/progress-view.component.ts b/AngularApp/prototype/src/app/progress-view/progress-view.component.ts index 15539afd581b0b38952a4c8e1cff965b37cd1902..5424b6ddec761d422bba933a639f831b5564259c 100644 --- a/AngularApp/prototype/src/app/progress-view/progress-view.component.ts +++ b/AngularApp/prototype/src/app/progress-view/progress-view.component.ts @@ -125,6 +125,8 @@ export class ProgressViewComponent implements OnInit { const width = +svg.attr('width'); const height = +svg.attr('height'); + svg.selectAll('*').remove(); + const simulation = d3.forceSimulation() .force('link', d3.forceLink().id((d: any) => d.id)) .force('charge', d3.forceManyBody().strength(100)) // Gravity force diff --git a/AngularApp/prototype/src/app/state.service.ts b/AngularApp/prototype/src/app/state.service.ts index 30dd3a06248da5234fba54b21f5887387b1a84bd..ad38eed9b6b415c963f322556498b947f6a065f5 100644 --- a/AngularApp/prototype/src/app/state.service.ts +++ b/AngularApp/prototype/src/app/state.service.ts @@ -86,7 +86,7 @@ export class StateService { } public createTable() { - const indices: number[] = this.lshData.distances.map((x) => x > 500 ? 100 : Math.floor(x / 5)); + const indices: number[] = this.lshData.distances.map((x) => x > 500 ? 100 : Math.floor(x / 10)); const table = {}; this.lshData.candidates.forEach((candidate, index) => { if (table[indices[index]] === undefined) diff --git a/Flaskserver/.idea/workspace.xml b/Flaskserver/.idea/workspace.xml index 67eb01f32c371abe0bca8c2e1776ff6ced252e02..6be48e271bc7b5abbd6152809252007128f3a486 100644 --- a/Flaskserver/.idea/workspace.xml +++ b/Flaskserver/.idea/workspace.xml @@ -20,14 +20,1034 @@ </component> <component name="ChangeListManager"> <list default="true" id="556080ba-825c-4b55-a92a-867a4df4fb32" name="Default Changelist" comment=""> - <change beforePath="$PROJECT_DIR$/../AngularApp/prototype/src/app/api.service.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../AngularApp/prototype/src/app/api.service.ts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../AngularApp/prototype/src/app/state.service.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../AngularApp/prototype/src/app/state.service.ts" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/_lsh.cpython-38-x86_64-linux-gnu.so" beforeDir="false" afterPath="$PROJECT_DIR$/_lsh.cpython-38-x86_64-linux-gnu.so" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/bigwig.py" beforeDir="false" afterPath="$PROJECT_DIR$/bigwig.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/build/lib.linux-x86_64-3.8/_lsh.cpython-38-x86_64-linux-gnu.so" beforeDir="false" afterPath="$PROJECT_DIR$/build/lib.linux-x86_64-3.8/_lsh.cpython-38-x86_64-linux-gnu.so" afterDir="false" /> <change beforePath="$PROJECT_DIR$/build/temp.linux-x86_64-3.8/Dylan/lsh-fast/_lsh.o" beforeDir="false" afterPath="$PROJECT_DIR$/build/temp.linux-x86_64-3.8/Dylan/lsh-fast/_lsh.o" afterDir="false" /> <change beforePath="$PROJECT_DIR$/build/temp.linux-x86_64-3.8/Dylan/lsh-fast/lsh.o" beforeDir="false" afterPath="$PROJECT_DIR$/build/temp.linux-x86_64-3.8/Dylan/lsh-fast/lsh.o" afterDir="false" /> <change beforePath="$PROJECT_DIR$/main.py" beforeDir="false" afterPath="$PROJECT_DIR$/main.py" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../environment.yml" beforeDir="false" afterPath="$PROJECT_DIR$/../environment.yml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/.bin/csv2json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/.bin/csv2tsv" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/.bin/dsv2dsv" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/.bin/dsv2json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/.bin/json2csv" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/.bin/json2dsv" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/.bin/json2tsv" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/.bin/tsv2csv" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/.bin/tsv2json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-array/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-array/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-array/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-array/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-axis/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-axis/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-axis/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-axis/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-brush/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-brush/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-brush/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-brush/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-chord/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-chord/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-chord/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-chord/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-collection/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-collection/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-collection/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-collection/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-color/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-color/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-color/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-color/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-contour/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-contour/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-contour/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-contour/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-dispatch/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-dispatch/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-dispatch/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-dispatch/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-drag/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-drag/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-drag/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-drag/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-dsv/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-dsv/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-dsv/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-dsv/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-ease/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-ease/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-ease/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-ease/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-fetch/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-fetch/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-fetch/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-fetch/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-force/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-force/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-force/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-force/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-format/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-format/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-format/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-format/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-geo/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-geo/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-geo/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-geo/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-hierarchy/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-hierarchy/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-hierarchy/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-hierarchy/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-interpolate/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-interpolate/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-interpolate/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-interpolate/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-path/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-path/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-path/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-path/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-polygon/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-polygon/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-polygon/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-polygon/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-quadtree/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-quadtree/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-quadtree/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-quadtree/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-random/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-random/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-random/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-random/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-scale-chromatic/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-scale-chromatic/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-scale-chromatic/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-scale-chromatic/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-scale/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-scale/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-scale/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-scale/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-selection/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-selection/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-selection/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-selection/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-shape/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-shape/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-shape/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-shape/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-time-format/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-time-format/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-time-format/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-time-format/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-time/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-time/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-time/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-time/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-timer/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-timer/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-timer/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-timer/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-transition/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-transition/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-transition/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-transition/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-voronoi/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-voronoi/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-voronoi/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-voronoi/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-zoom/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-zoom/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-zoom/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3-zoom/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/d3/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/geojson/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/geojson/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/geojson/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/@types/geojson/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/commander/CHANGELOG.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/commander/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/commander/Readme.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/commander/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/commander/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/commander/typings/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/dist/d3-array.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/dist/d3-array.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/array.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/ascending.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/bin.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/bisect.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/bisector.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/constant.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/count.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/cross.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/cumsum.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/descending.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/deviation.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/difference.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/disjoint.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/every.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/extent.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/filter.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/fsum.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/greatest.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/greatestIndex.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/group.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/identity.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/intersection.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/least.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/leastIndex.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/map.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/max.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/maxIndex.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/mean.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/median.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/merge.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/minIndex.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/nice.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/number.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/pairs.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/permute.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/quantile.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/quickselect.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/range.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/reduce.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/reverse.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/scan.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/set.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/shuffle.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/some.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/sort.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/subset.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/sum.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/superset.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/threshold/freedmanDiaconis.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/threshold/scott.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/threshold/sturges.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/ticks.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/transpose.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/union.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/variance.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-array/src/zip.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-axis/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-axis/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-axis/dist/d3-axis.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-axis/dist/d3-axis.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-axis/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-axis/src/array.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-axis/src/axis.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-axis/src/identity.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-axis/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-brush/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-brush/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-brush/dist/d3-brush.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-brush/dist/d3-brush.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-brush/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-brush/src/brush.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-brush/src/constant.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-brush/src/event.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-brush/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-brush/src/noevent.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-chord/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-chord/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-chord/dist/d3-chord.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-chord/dist/d3-chord.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-chord/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-chord/src/array.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-chord/src/chord.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-chord/src/constant.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-chord/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-chord/src/math.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-chord/src/ribbon.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-color/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-color/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-color/dist/d3-color.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-color/dist/d3-color.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-color/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-color/src/color.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-color/src/cubehelix.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-color/src/define.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-color/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-color/src/lab.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-color/src/math.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-contour/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-contour/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-contour/dist/d3-contour.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-contour/dist/d3-contour.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-contour/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-contour/src/area.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-contour/src/array.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-contour/src/ascending.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-contour/src/blur.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-contour/src/constant.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-contour/src/contains.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-contour/src/contours.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-contour/src/density.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-contour/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-contour/src/noop.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-delaunay/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-delaunay/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-delaunay/dist/d3-delaunay.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-delaunay/dist/d3-delaunay.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-delaunay/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-delaunay/src/delaunay.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-delaunay/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-delaunay/src/path.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-delaunay/src/polygon.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-delaunay/src/voronoi.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dispatch/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dispatch/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dispatch/dist/d3-dispatch.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dispatch/dist/d3-dispatch.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dispatch/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dispatch/src/dispatch.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dispatch/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-drag/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-drag/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-drag/dist/d3-drag.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-drag/dist/d3-drag.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-drag/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-drag/src/constant.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-drag/src/drag.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-drag/src/event.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-drag/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-drag/src/nodrag.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-drag/src/noevent.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dsv/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dsv/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dsv/bin/dsv2dsv" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dsv/bin/dsv2json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dsv/bin/json2dsv" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dsv/dist/d3-dsv.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dsv/dist/d3-dsv.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dsv/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dsv/src/autoType.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dsv/src/csv.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dsv/src/dsv.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dsv/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-dsv/src/tsv.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/dist/d3-ease.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/dist/d3-ease.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/src/back.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/src/bounce.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/src/circle.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/src/cubic.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/src/elastic.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/src/exp.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/src/linear.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/src/math.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/src/poly.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/src/quad.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-ease/src/sin.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-fetch/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-fetch/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-fetch/dist/d3-fetch.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-fetch/dist/d3-fetch.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-fetch/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-fetch/src/blob.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-fetch/src/buffer.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-fetch/src/dsv.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-fetch/src/image.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-fetch/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-fetch/src/json.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-fetch/src/text.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-fetch/src/xml.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/dist/d3-force.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/dist/d3-force.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/src/center.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/src/collide.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/src/constant.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/src/jiggle.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/src/lcg.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/src/link.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/src/manyBody.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/src/radial.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/src/simulation.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/src/x.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-force/src/y.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/dist/d3-format.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/dist/d3-format.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-001.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-AE.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-BH.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-DJ.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-DZ.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-EG.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-EH.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-ER.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-IL.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-IQ.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-JO.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-KM.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-KW.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-LB.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-LY.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-MA.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-MR.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-OM.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-PS.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-QA.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-SA.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-SD.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-SO.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-SS.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-SY.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-TD.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-TN.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ar-YE.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ca-ES.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/cs-CZ.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/de-CH.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/de-DE.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/en-CA.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/en-GB.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/en-IE.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/en-IN.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/en-US.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/es-BO.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/es-ES.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/es-MX.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/fi-FI.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/fr-CA.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/fr-FR.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/he-IL.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/hu-HU.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/it-IT.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ja-JP.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ko-KR.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/mk-MK.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/nl-NL.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/pl-PL.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/pt-BR.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/ru-RU.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/sv-SE.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/uk-UA.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/locale/zh-CN.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/defaultLocale.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/exponent.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/formatDecimal.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/formatGroup.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/formatNumerals.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/formatPrefixAuto.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/formatRounded.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/formatSpecifier.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/formatTrim.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/formatTypes.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/identity.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/locale.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/precisionFixed.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/precisionPrefix.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-format/src/precisionRound.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/dist/d3-geo.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/dist/d3-geo.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/area.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/bounds.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/cartesian.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/centroid.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/circle.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/clip/antimeridian.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/clip/buffer.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/clip/circle.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/clip/extent.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/clip/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/clip/line.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/clip/rectangle.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/clip/rejoin.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/compose.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/constant.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/contains.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/distance.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/graticule.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/identity.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/interpolate.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/length.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/math.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/noop.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/path/area.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/path/bounds.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/path/centroid.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/path/context.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/path/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/path/measure.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/path/string.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/pointEqual.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/polygonContains.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/albers.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/albersUsa.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/azimuthal.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/azimuthalEqualArea.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/azimuthalEquidistant.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/conic.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/conicConformal.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/conicEqualArea.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/conicEquidistant.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/cylindricalEqualArea.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/equalEarth.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/equirectangular.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/fit.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/gnomonic.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/identity.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/mercator.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/naturalEarth1.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/orthographic.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/resample.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/stereographic.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/projection/transverseMercator.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/rotation.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/stream.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-geo/src/transform.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/dist/d3-hierarchy.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/dist/d3-hierarchy.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/accessors.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/array.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/cluster.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/constant.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/hierarchy/ancestors.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/hierarchy/count.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/hierarchy/descendants.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/hierarchy/each.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/hierarchy/eachAfter.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/hierarchy/eachBefore.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/hierarchy/find.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/hierarchy/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/hierarchy/iterator.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/hierarchy/leaves.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/hierarchy/links.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/hierarchy/path.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/hierarchy/sort.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/hierarchy/sum.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/pack/enclose.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/pack/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/pack/siblings.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/partition.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/stratify.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/tree.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/treemap/binary.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/treemap/dice.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/treemap/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/treemap/resquarify.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/treemap/round.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/treemap/slice.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/treemap/sliceDice.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-hierarchy/src/treemap/squarify.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/dist/d3-interpolate.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/dist/d3-interpolate.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/array.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/basis.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/basisClosed.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/color.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/constant.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/cubehelix.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/date.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/discrete.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/hcl.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/hsl.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/hue.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/lab.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/number.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/numberArray.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/object.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/piecewise.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/quantize.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/rgb.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/round.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/string.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/transform/decompose.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/transform/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/transform/parse.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/value.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-interpolate/src/zoom.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-path/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-path/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-path/dist/d3-path.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-path/dist/d3-path.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-path/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-path/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-path/src/path.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-polygon/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-polygon/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-polygon/dist/d3-polygon.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-polygon/dist/d3-polygon.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-polygon/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-polygon/src/area.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-polygon/src/centroid.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-polygon/src/contains.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-polygon/src/cross.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-polygon/src/hull.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-polygon/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-polygon/src/length.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/dist/d3-quadtree.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/dist/d3-quadtree.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/src/add.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/src/cover.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/src/data.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/src/extent.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/src/find.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/src/quad.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/src/quadtree.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/src/remove.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/src/root.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/src/size.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/src/visit.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/src/visitAfter.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/src/x.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-quadtree/src/y.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/dist/d3-random.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/dist/d3-random.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/bates.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/bernoulli.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/beta.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/binomial.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/cauchy.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/defaultSource.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/exponential.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/gamma.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/geometric.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/int.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/irwinHall.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/lcg.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/logNormal.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/logistic.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/normal.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/pareto.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/poisson.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/uniform.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-random/src/weibull.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/dist/d3-scale-chromatic.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/dist/d3-scale-chromatic.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/categorical/Accent.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/categorical/Dark2.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/categorical/Paired.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/categorical/Pastel1.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/categorical/Pastel2.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/categorical/Set1.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/categorical/Set2.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/categorical/Set3.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/categorical/Tableau10.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/categorical/category10.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/colors.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/diverging/BrBG.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/diverging/PRGn.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/diverging/PiYG.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/diverging/PuOr.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/diverging/RdBu.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/diverging/RdGy.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/diverging/Spectral.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/ramp.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/rampClosed.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-single/Blues.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-single/Greens.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-single/Greys.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-single/Purples.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale-chromatic/src/sequential-single/Reds.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/dist/d3-scale.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/dist/d3-scale.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/band.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/colors.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/constant.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/continuous.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/diverging.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/identity.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/init.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/linear.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/log.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/nice.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/number.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/ordinal.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/pow.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/quantile.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/quantize.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/radial.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/sequential.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/sequentialQuantile.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/symlog.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/threshold.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/tickFormat.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/time.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-scale/src/utcTime.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/dist/d3-selection.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/dist/d3-selection.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/array.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/constant.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/create.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/creator.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/identity.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/local.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/matcher.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/namespace.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/namespaces.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/pointer.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/pointers.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/select.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selectAll.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/append.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/attr.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/call.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/classed.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/clone.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/data.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/datum.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/dispatch.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/each.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/empty.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/enter.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/exit.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/filter.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/html.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/insert.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/iterator.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/join.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/lower.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/merge.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/node.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/nodes.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/on.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/order.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/property.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/raise.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/remove.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/select.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/selectAll.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/selectChild.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/selectChildren.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/size.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/sort.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/sparse.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/style.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selection/text.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selector.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/selectorAll.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/sourceEvent.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-selection/src/window.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/dist/d3-shape.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/dist/d3-shape.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/arc.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/area.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/areaRadial.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/array.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/constant.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/basis.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/basisClosed.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/basisOpen.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/bundle.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/cardinal.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/cardinalClosed.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/cardinalOpen.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/catmullRom.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/catmullRomClosed.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/catmullRomOpen.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/linear.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/linearClosed.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/monotone.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/natural.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/radial.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/curve/step.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/descending.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/identity.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/line.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/lineRadial.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/link/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/math.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/noop.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/offset/diverging.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/offset/expand.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/offset/none.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/offset/silhouette.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/offset/wiggle.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/order/appearance.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/order/ascending.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/order/descending.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/order/insideOut.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/order/none.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/order/reverse.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/pie.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/point.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/pointRadial.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/stack.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/symbol.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/symbol/circle.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/symbol/cross.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/symbol/diamond.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/symbol/square.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/symbol/star.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/symbol/triangle.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-shape/src/symbol/wye.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/dist/d3-time-format.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/dist/d3-time-format.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/ar-EG.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/ca-ES.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/cs-CZ.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/da-DK.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/de-CH.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/de-DE.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/en-CA.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/en-GB.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/en-US.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/es-ES.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/es-MX.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/fa-IR.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/fi-FI.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/fr-CA.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/fr-FR.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/he-IL.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/hu-HU.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/it-IT.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/ja-JP.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/ko-KR.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/mk-MK.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/nb-NO.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/nl-NL.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/pl-PL.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/pt-BR.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/ru-RU.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/sv-SE.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/tr-TR.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/uk-UA.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/zh-CN.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/locale/zh-TW.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/src/defaultLocale.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/src/isoFormat.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/src/isoParse.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time-format/src/locale.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/dist/d3-time.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/dist/d3-time.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/day.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/duration.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/hour.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/interval.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/millisecond.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/minute.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/month.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/second.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/utcDay.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/utcHour.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/utcMinute.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/utcMonth.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/utcWeek.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/utcYear.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/week.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-time/src/year.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-timer/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-timer/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-timer/dist/d3-timer.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-timer/dist/d3-timer.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-timer/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-timer/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-timer/src/interval.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-timer/src/timeout.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-timer/src/timer.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/dist/d3-transition.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/dist/d3-transition.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/active.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/interrupt.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/selection/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/selection/interrupt.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/selection/transition.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/attr.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/attrTween.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/delay.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/duration.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/ease.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/easeVarying.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/end.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/filter.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/interpolate.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/merge.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/on.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/remove.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/schedule.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/select.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/selectAll.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/selection.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/style.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/styleTween.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/text.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/textTween.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/transition.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-transition/src/transition/tween.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-zoom/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-zoom/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-zoom/dist/d3-zoom.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-zoom/dist/d3-zoom.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-zoom/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-zoom/src/constant.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-zoom/src/event.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-zoom/src/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-zoom/src/noevent.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-zoom/src/transform.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3-zoom/src/zoom.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3/CHANGES.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3/dist/d3.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3/dist/d3.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3/dist/d3.node.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3/dist/package.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/d3/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/delaunator/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/delaunator/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/delaunator/delaunator.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/delaunator/delaunator.min.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/delaunator/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/delaunator/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/Changelog.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/dbcs-codec.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/dbcs-data.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/internal.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/sbcs-codec.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/sbcs-data-generated.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/sbcs-data.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/tables/big5-added.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/tables/cp936.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/tables/cp949.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/tables/cp950.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/tables/eucjp.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/tables/gb18030-ranges.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/tables/gbk-added.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/tables/shiftjis.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/utf16.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/encodings/utf7.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/lib/bom-handling.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/lib/extend-node.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/lib/index.d.ts" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/lib/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/lib/streams.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/iconv-lite/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/.eslintrc" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/.npmignore" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/README.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/index.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/lib/rw/dash.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/lib/rw/decode.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/lib/rw/encode.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/lib/rw/read-file-sync.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/lib/rw/read-file.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/lib/rw/write-file-sync.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/lib/rw/write-file.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/test/cat-async" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/test/cat-sync" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/test/encode-object-async" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/test/encode-object-sync" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/test/encode-string-async" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/test/encode-string-sync" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/test/encoding-async" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/test/encoding-sync" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/test/run-tests" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/test/utf8.txt" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/test/wc-async" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/test/wc-sync" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/test/write-async" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/rw/test/write-sync" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/safer-buffer/LICENSE" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/safer-buffer/Porting-Buffer.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/safer-buffer/Readme.md" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/safer-buffer/dangerous.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/safer-buffer/package.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/safer-buffer/safer.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../node_modules/safer-buffer/tests.js" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../package-lock.json" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../run-angular.bat" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../run-flask-server.bat" beforeDir="false" /> </list> <option name="SHOW_DIALOG" value="false" /> <option name="HIGHLIGHT_CONFLICTS" value="true" /> @@ -47,7 +1067,7 @@ <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" /> <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" /> <property name="WebServerToolWindowFactoryState" value="false" /> - <property name="last_opened_file_path" value="$PROJECT_DIR$/../../heroku-server/olympos-bot" /> + <property name="last_opened_file_path" value="$PROJECT_DIR$" /> <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" /> <property name="nodejs_npm_path_reset_for_default_project" value="true" /> </component> diff --git a/Flaskserver/__pycache__/DBA.cpython-38.pyc b/Flaskserver/__pycache__/DBA.cpython-38.pyc index 64334bbdb9fea5737df88dfcc549f3d763c149b9..ee756e972d4a8aac20fcbf3c7ac617a69c472ca0 100644 Binary files a/Flaskserver/__pycache__/DBA.cpython-38.pyc and b/Flaskserver/__pycache__/DBA.cpython-38.pyc differ diff --git a/Flaskserver/__pycache__/bigwig.cpython-38.pyc b/Flaskserver/__pycache__/bigwig.cpython-38.pyc index 43beeb1542faecb1e28a880da643a89196fc93b0..00c1792d524e86a06d07155df2a61697b8296f77 100644 Binary files a/Flaskserver/__pycache__/bigwig.cpython-38.pyc and b/Flaskserver/__pycache__/bigwig.cpython-38.pyc differ diff --git a/Flaskserver/__pycache__/main.cpython-38.pyc b/Flaskserver/__pycache__/main.cpython-38.pyc index 11c141b681dfc83e4fcc0aa78671b3c2d31c6a86..7eae2ced59252dba65654482376b8df818c421e5 100644 Binary files a/Flaskserver/__pycache__/main.cpython-38.pyc and b/Flaskserver/__pycache__/main.cpython-38.pyc differ diff --git a/Flaskserver/_lsh.cpython-38-x86_64-linux-gnu.so b/Flaskserver/_lsh.cpython-38-x86_64-linux-gnu.so index c158fb21063e1cf4ccf1222454271afee9e416b3..b30559b0c385ff171b9e84a3699c50f51f809aa0 100755 Binary files a/Flaskserver/_lsh.cpython-38-x86_64-linux-gnu.so and b/Flaskserver/_lsh.cpython-38-x86_64-linux-gnu.so differ diff --git a/Flaskserver/bigwig.py b/Flaskserver/bigwig.py index fefd1d78009fb69faa54e0dbe84cbbd5b4d7f665..3e5fd99f5309395073b7347a78c76cf73de0ec05 100644 --- a/Flaskserver/bigwig.py +++ b/Flaskserver/bigwig.py @@ -17,7 +17,7 @@ import cooler import numpy as np import os import pandas as pd -import utils +from sklearn.preprocessing import MinMaxScaler TILE_SIZE = 1024 @@ -26,6 +26,13 @@ TILESET_INFO = {"filetype": "bigwig", "datatype": "vector"} FILE_EXT = {"bigwig", "bw"} +def normalize_data(data, percentile: float = 99.9): + cutoff = np.percentile(data, (0, percentile)) + data_norm = np.copy(data) + data_norm[np.where(data_norm < cutoff[0])] = cutoff[0] + data_norm[np.where(data_norm > cutoff[1])] = cutoff[1] + + return MinMaxScaler().fit_transform(data_norm) def is_bigwig(filepath=None, filetype=None): if filepath is None: @@ -286,7 +293,7 @@ def chunk( ) if normalize: - values[start:end] = utils.normalize( + values[start:end] = normalize_data( values[start:end], percentile=percentile ) diff --git a/Flaskserver/build/lib.linux-x86_64-3.8/_lsh.cpython-38-x86_64-linux-gnu.so b/Flaskserver/build/lib.linux-x86_64-3.8/_lsh.cpython-38-x86_64-linux-gnu.so index c158fb21063e1cf4ccf1222454271afee9e416b3..b30559b0c385ff171b9e84a3699c50f51f809aa0 100755 Binary files a/Flaskserver/build/lib.linux-x86_64-3.8/_lsh.cpython-38-x86_64-linux-gnu.so and b/Flaskserver/build/lib.linux-x86_64-3.8/_lsh.cpython-38-x86_64-linux-gnu.so differ diff --git a/Flaskserver/build/temp.linux-x86_64-3.8/Dylan/lsh-fast/_lsh.o b/Flaskserver/build/temp.linux-x86_64-3.8/Dylan/lsh-fast/_lsh.o index 40338ac5c1c9971b204a7abb51b5745d2a1c0e56..7f0af21b5f0b21aadd95b619db640db4b127729f 100644 Binary files a/Flaskserver/build/temp.linux-x86_64-3.8/Dylan/lsh-fast/_lsh.o and b/Flaskserver/build/temp.linux-x86_64-3.8/Dylan/lsh-fast/_lsh.o differ diff --git a/Flaskserver/build/temp.linux-x86_64-3.8/Dylan/lsh-fast/lsh.o b/Flaskserver/build/temp.linux-x86_64-3.8/Dylan/lsh-fast/lsh.o index fe89377f2e34cee6c106a3ddc297003386ba16de..72621d94117af482495b9302b5ca31efea3a8734 100644 Binary files a/Flaskserver/build/temp.linux-x86_64-3.8/Dylan/lsh-fast/lsh.o and b/Flaskserver/build/temp.linux-x86_64-3.8/Dylan/lsh-fast/lsh.o differ diff --git a/Flaskserver/main.py b/Flaskserver/main.py index 4d4f3a71a822a196c4bf76c1ab84332ee53cf8ff..564080d1d92b47e955bc37d8542ef7c8eddf31d4 100644 --- a/Flaskserver/main.py +++ b/Flaskserver/main.py @@ -81,7 +81,7 @@ def initialize(): query = np.reshape(query, (len(query), 1)) # query = np.repeat(query, repeats=1, axis=1) - r, a, sd = preprocess() + r, a, sd = preprocess(data) candidates, distances, hf = _lsh.lsh(data, query, r, a, sd) response = { @@ -168,12 +168,12 @@ def table_info(): print("Averages calculated: " + str(time() - t0)) return response -def preprocess(): - return 0.10882589134534404, 3.1202154563478928, 0.9705780396843037 - data = np.load('processed-data.npy') +def preprocess(data): + # return 0.10882589134534404, 3.1202154563478928, 0.9705780396843037 + # data = np.load('processed-data.npy') data = np.array(data, dtype='double') - data = np.reshape(data, (int(len(data) / 1), 1, len(data[0]))) - data = np.repeat(data, repeats=1, axis=1) + # data = np.reshape(data, (int(len(data) / 1), 1, len(data[0]))) + # data = np.repeat(data, repeats=1, axis=1) subset = [] t0 = time() @@ -200,7 +200,8 @@ def preprocess(): continue e = np.linalg.norm(data[index_1] - data[index_2]) eq_distances.append(e) - d = dtw.dtw(data[index_1], data[index_2], dist_method="Euclidean", window_type="sakoechiba", window_args={"window_size": 120}).distance + d = _ucrdtw.ucrdtw(data[index_1], data[index_2], 0.05, False)[1] + # d = dtw.dtw(data[index_1], data[index_2], dist_method="Euclidean", window_type="sakoechiba", window_args={"window_size": 120}).distance dtw_distances.append(d) ratios = np.array(dtw_distances)/np.array(eq_distances) @@ -214,20 +215,20 @@ def preprocess(): # theta = mean_eq + -2.58 * sd_eq r = theta / ((a-sd)*math.sqrt(120)) # r = theta / (math.sqrt(120)) - print('Mean: ' + mean_dtw) - print('Stdev: ' + sd_dtw) - print('Ratio mean: ' + a) - print('Ratio stdev: ' + sd) - print('Theta: ' + theta) - print('r: ' + r) + print('Mean: ' + str(mean_dtw)) + print('Stdev: ' + str(sd_dtw)) + print('Ratio mean: ' + str(a)) + print('Ratio stdev: ' + str(sd)) + print('Theta: ' + str(theta)) + print('r: ' + str(r)) print('Preprocessing time: ' + str(time() - t0)) return r, a, sd def debug_test_lsh(): - r, a, sd = preprocess() + data = np.load('processed-data.npy') + r, a, sd = preprocess(data) create_windows() query_n = 80503 - data = np.load('processed-data.npy') query = data[query_n] # performDBA(data[[80503, 11514]]) query = np.reshape(query, (len(data[0]), 1)) data= np.array(data, dtype='double') @@ -256,4 +257,4 @@ def debug_test_lsh(): accuracy += 1 print(accuracy) -debug_test_lsh() \ No newline at end of file +# debug_test_lsh() \ No newline at end of file diff --git a/environment.yml b/environment.yml index 50e5f3f27d0929722df76b699a3b254b9ee69b3f..58b0308f3df91cc9687068f76d0ac4d0d073779a 100644 --- a/environment.yml +++ b/environment.yml @@ -11,6 +11,7 @@ dependencies: - flask_cors - orjson - dask[dataframe] + - jupyter - pip - pip: - pybbi diff --git a/experiments/.ipynb_checkpoints/Compare Algorithms-checkpoint.ipynb b/experiments/.ipynb_checkpoints/Compare Algorithms-checkpoint.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..a019fc69fcea9af3c3086c0e484cc0fb1f617383 --- /dev/null +++ b/experiments/.ipynb_checkpoints/Compare Algorithms-checkpoint.ipynb @@ -0,0 +1,608 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import json\n", + "import h5py\n", + "import os\n", + "import sys\n", + "from time import time\n", + "import warnings\n", + "\n", + "# Ignore warnings as they just pollute the output\n", + "warnings.filterwarnings('ignore')\n", + "\n", + "# Enable importing modules from the parent directory\n", + "module_path = os.path.abspath(os.path.join('..'))\n", + "if module_path not in sys.path:\n", + " sys.path.append(module_path)\n", + "module_path = os.path.abspath(os.path.join('../experiments'))\n", + "if module_path not in sys.path:\n", + " sys.path.append(module_path)\n", + "\n", + "# DNase-seq 2011, hg19\n", + "bw = 'data/ENCFF158GBQ.bigWig'" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "./data/ENCFF158GBQ.bigWig already exist. To overwrite pass `overwrite=True`\n", + "./models/dnase_w-12000_r-100.h5 already exist. To overwrite pass `overwrite=True`\n" + ] + } + ], + "source": [ + "from download import download_encode_file, download_file\n", + "from pathlib import Path\n", + "\n", + "Path('data').mkdir(parents=True, exist_ok=True)\n", + "Path('models').mkdir(parents=True, exist_ok=True)\n", + "\n", + "download_encode_file('ENCFF158GBQ.bigWig')\n", + "\n", + "download_file(\n", + " \"https://zenodo.org/record/2609763/files/dnase_w-12000_r-100.h5?download=1\",\n", + " \"dnase_w-12000_r-100.h5\",\n", + " dir=\"models\"\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "from scipy.spatial.distance import cdist\n", + "\n", + "def knn(data, target_idx, k, metric='euclidean', sax = None, ignore: int = 0, sort_only: bool = False):\n", + " \"\"\"K nearest neighbors\n", + " \n", + " Find the `k` nearest neighbors of a \n", + " \"\"\"\n", + " \n", + " target = data[target_idx]\n", + " \n", + " if sort_only:\n", + " dist = data\n", + " else:\n", + " if sax is None:\n", + " dist = cdist(data, target.reshape((1, target.size)), metric='euclidean').flatten()\n", + "\n", + " else:\n", + " N = data.shape[0]\n", + " dist = np.zeros(N)\n", + " for i in range(N):\n", + " dist[i] = sax.distance_sax(target, data[i])\n", + "\n", + " # Ensure that the target is always first\n", + " dist[target_idx] = -1\n", + " for i in range(1, ignore + 1):\n", + " dist[min(target_idx + i, data.shape[0] - 1)] = -1\n", + " dist[max(target_idx - i, 0)] = -1\n", + " \n", + " return np.argsort(dist)[1 + (2 * ignore):k + 1 + (2 * ignore)]" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "from scipy.signal import correlate\n", + "\n", + "def norm(data, zero_norm: bool = False):\n", + " mean = np.mean(data) if zero_norm else 0\n", + " \n", + " return (data - mean) / np.std(data)\n", + "\n", + "def norm2d(data, zero_norm: bool = False):\n", + " mean = np.mean(data, axis=1).reshape(-1, 1) if zero_norm else np.zeros((data.shape[0], 1))\n", + " std = np.std(data, axis=1).reshape(-1, 1)\n", + " \n", + " return (data - mean) / std\n", + "\n", + "def xcorrelation(data, template_idx, n, normalize=False, zero_normalize=False, ignore: int = 0):\n", + " unknown = data\n", + " template = data[template_idx]\n", + " \n", + " if norm:\n", + " unknown = norm2d(unknown, zero_norm=zero_normalize)\n", + " template = norm(template, zero_norm=zero_normalize)\n", + " \n", + " xcorr = np.apply_along_axis(lambda m: correlate(m, template, mode='full'), axis=1, arr=unknown)\n", + " xcorr[np.where(np.isnan(xcorr))] = 0\n", + "\n", + " max_xcorr = np.nanmax(xcorr, axis=1)\n", + " \n", + " # Ensure that the target is always last\n", + " max_xcorr[template_idx] = -1\n", + " for i in range(1, ignore + 1):\n", + " max_xcorr[min(template_idx + i, data.shape[0] - 1)] = -1\n", + " max_xcorr[max(template_idx - i, 0)] = -1\n", + " \n", + " return np.argsort(max_xcorr)[::-1][:n]" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Extracted 124621 windows from chr1 with a max value of 1.0.\n", + "Done! Took 27.24 seconds (0.5 minutes).\n" + ] + } + ], + "source": [ + "import bigwig\n", + "\n", + "t0 = time()\n", + "data_12kb = bigwig.chunk(bw, 12000, 100, 12000 / 6, ['chr1'], verbose=True)\n", + "print('Done! Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAdAAAAKFCAYAAAB89rjZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3de3DU9b3/8dcmUDaQkAuERAwYrkaiIAZsJSCX0hNQELkqRwSRMx5QGIVabz9FQD3joLYFPXBqGWwQKh0RDlq5iNUgxqo1EDgELSUQLiEabiEkYSEJ+/uD6ZaFJCYf9rv73d3nYyYz8L3t53t9fd+f/e6uw+12uwUAAJokItANAAAgGBGgAAAYIEABADBAgAIAYIAABQDAAAEKAIABAhQAAAMEKGCxoqIi3XHHHYqPj1dycrJmzpypmpoaSdJf/vIXpaWlqWXLlho8eLAOHjzomW/evHlq3ry5oqOjPX/79+/3Wu7gwYPVsmVLpaWl6eOPP/aM+/TTT3XTTTcpLi5Obdq00ejRo1VcXOy/lQbCAAEKWOzhhx9Wu3btVFJSovz8fG3dulVLlizR8ePHNWbMGL3wwgs6efKk+vTpo3vuucdr3nvuuUcVFRWev86dO3vGTZw4Ub1799aJEyf00ksvady4cTp27JgkqUePHtq8ebPKysp09OhRdevWTTNmzPDregOhjgAFLHbgwAFNmDBBTqdTycnJGjZsmAoKCrR27Vqlp6dr/Pjxcjqdmjdvnnbu3KnvvvvuR5e5d+9ebd++XfPnz1dUVJTGjh2rm266Se+9954kKSkpSe3bt/dMHxkZqX379lm2jkA4IkABiz366KNavXq1qqqqVFxcrI0bN3pCtFevXp7pWrVqpS5duqigoMAz7IMPPlBCQoLS09O1dOlSz/CCggJ17txZMTExnmG9evXymvfQoUOKi4tTVFSUXn31VT3xxBMWrykQXghQwGIDBw5UQUGBWrdurZSUFPXp00d33323KioqFBsb6zVtbGyszpw5I0maMGGCvv32Wx07dky///3vtWDBAr3zzjuS9KPzSlLHjh1VVlam48eP68UXX1RaWprFawqEFwIUsNCFCxeUlZWlMWPGqLKyUsePH9epU6f05JNPKjo6WuXl5V7Tl5eXe6rKHj16qH379oqMjFS/fv306KOPas2aNZL0o/NeKiEhQVOmTNGoUaM8Dy8BuHoEKGChkydP6vDhw5o5c6ZatGihNm3aaOrUqdqwYYPS09O1c+dOz7SVlZUqLCxUenp6nctyOBz6548npaena//+/V4V586dO+udt6amRqWlpVeELgBzBChgobZt26pTp05aunSpampqVFZWpuzsbPXq1UujR4/W7t279d5778nlcmnBggXq2bOnp6t1/fr1OnXqlNxut77++mstXrxYo0aNkiR1795dN998s+bPny+Xy6V169Zp165dGjt2rCRp7dq1+vvf/64LFy7o2LFjmjNnjnr37q2EhISAbQsg1BCggMXWrl2rTZs2KTExUV27dlWzZs30m9/8RomJiXrvvff0//7f/1N8fLy++uorrV692jPf6tWr1bVrV8XExGjy5Ml68sknNWXKFK/x33zzjeLj4/XUU09pzZo1SkxMlCQVFxdr2LBhiomJ0U033aSIiAitW7fO7+sOhDIHP6gNAEDTUYECAGCAAAUAwAABCgCAAQIUAAADBCgAAAaaNWXi3NxcOZ1Oq9oCC+04dNzr/707tg1QSwA0xqXnLOdr4LhcLmVmZtY5rkkB6nQ6lZGR4ZNGwb+GLFvu9f/TS7MC1BIAjeF9znr/luvppQ/6tzFhLC8vr95xdOECAGCAAAUAwECTunABAKEndsa/uovpHm48KlAAAAxQgQJAA6jOUB8qUAAADFCBAgA8Lq24JaruhlCBAgBggAo0TPG+DtB0nDe4FBUoAAAGqEBD2OXvZQAAfIcKFAAAA1SgAGAT9BoFFypQAAAMUIECQBDjc5uBQwUKAIABAhQAAAMEKAAABghQAAAM8BARABjg4R1QgQIAYIAKFAAuEexfZsAX3vsPFSgAAAYIUAAADNCFG2KCvfspVNCNBoQ+KlAAAAxQgQKAxXzdI0FPkz1QgQIAYIAKNAhZeTfL+3XA1QuGCjEY2mh3BGiQ4ySwB/YDGosb1tBBgAIICw3d5AQqyKy+8SKsrUWAAoAP2L0Xwu7tC0YEKICQRWjYXzBXyQSojdR3IHERCG7BfIEIF5xj9Wvo+K1vu4XLcU6ABlAwnLR2fN8IQGA09pplem0LtptNArQJ/BkmgQrXYAj1UMXvSwL/0thrUSDPk4AGaKCqGytCorF3TqEUUI3tvvHFtrFjmITSvgxm7AcEisPtdrsbO3FeXp4yMjJ89uKhFKDwH1+/P9zYYy0Yjhtf37yZ3gxZLRj2BQLD18dlQ7ln2wC9lOkb15xkMMEDXNaq7wLHtoYv2DZAc3Nz5XQ6fdYwAADszOVyKTMzs85xTQpQAABwEb/GAgCAAQIUAAADBCgAAAYIUAAADBCgAAAYIEABADBAgAIAYIAABQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAn7wj3/8Q06nU5MmTZIk7dmzR3369FF8fLzi4+M1dOhQ7dmzxzP9uXPnNH36dCUlJSkhIUEjR45UcXGxZ/wXX3yhW2+9VTExMerZs6c+//xzz7icnBxFREQoOjra85edne2/lQXCBAEK+MEjjzyivn37ev7fvn17rVmzRidPntTx48d111136d577/WMX7Rokf76179q165dOnr0qOLi4jRr1ixJ0smTJ3XXXXfpV7/6lcrKyvTEE09o5MiROnXqlNfyKyoqPH9Tpkzx38oCYYIABSy2evVqxcXF6ec//7lnWFxcnFJTU+VwOOR2uxUZGal9+/Z5xh84cEBZWVlKSkqS0+nUvffeq4KCAkkXq8+kpCSNHz9ekZGRmjRpkhITE7V27Vq/rxsQzghQwELl5eWaO3euXnvttTrHx8XFyel0atasWXrmmWc8w6dNm6bc3FwdPXpUVVVVWrVqlYYPHy5JcrvdcrvdXstxu93avXu35/+lpaVKSkpSp06dNHv2bFVWVlqwdkB4I0ABCz333HOaNm2aOnToUOf4srIynT59Wm+88YZ69+7tGd69e3d17NhR1157rVq3bq1vv/1Wc+fOlST169dPR48e1TvvvKPq6mplZ2ersLBQVVVVkqS0tDTl5+erpKREn3zyifLy8jRnzhzrVxYIMwQoYJH8/Hx9/PHHmj17doPTtWrVStOnT9fkyZNVWloqSZoxY4ZcLpdOnDihyspKjRkzxlOBtmnTRuvXr9evf/1rJSUladOmTRo6dKhSUlIkScnJyerRo4ciIiLUqVMnLVy4UGvWrLF2ZYEw1CzQDQBCVU5OjoqKitSxY0dJUkVFhWpra7Vnzx5t377da9oLFy6oqqpKxcXFateunXbu3KmXXnpJCQkJkqRZs2Zp7ty5On78uNq2bauBAwfqb3/7mySppqZGXbp00S9/+cs62/HP91kB+BYVKGCRhx56SIWFhcrPz1d+fr6mT5+uO++8U5s3b9aWLVu0Y8cO1dbWqry8XHPmzFF8fLxuuOEGSVLfvn21YsUKnT59WtXV1VqyZInat2+vtm3bSpJ27Nih6upqlZeX6/HHH1dKSoqysrIkXQzuQ4cOye126/Dhw3rqqac0atSogG0HIFQRoIBFWrZsqeTkZM9fdHS0nE6nEhMTVVZWpokTJyo2NlZdunTRvn37tGnTJjmdTknSq6++KqfTqW7duikxMVEbNmzQunXrPMteuHCh2rZtqw4dOqikpMRr3Pbt23XbbbepVatW6tevn2688UYtXrzY7+sPhDqHm74dAACajAoUAAADBCgAAAYIUAAADBCgAAAYaNLnQHNzcz1PCQJW2nHoeL3jends68eWAAhnLpdLmZmZdY5rUoA6nU5lZGT4pFFAQ4YsW17vuNNLs/zYEgDhLC8vr95xdOECAGCAAAUAwAABCgCAAQIUAAADBCgAAAYIUAAADBCgAAAYIEABADBAgAIAYIAABQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMNCkH9QGrBQ7o/4f0QZgP5ees6eXPhjAlgQGAQrA58L9worwQIACAK5aON408R4oAAAGqEARdMLxTheA/RCgAACfuvyBwFC90SVA/YzqCQBCA++BAgBggAoUIStcupHsjv2AUEWAArhqfAkGGhKqb13RhQsAgAEqUISNUL0LBvyFngZvBCjQgIYuGKEUwtxcAE1HgFqMOzb/Yntbi6D1LR6wCm4EaABx8gS3xoZJoELH9PjiJgSX8vXxEErXPQIUQc2Ki73JMu1yUfBn+HFhhS8Ec68GAYqwFMwnbbCze+Ue7uiBaDwCFAFlh5M1kFVbOFSqDWlsO+yy3XyhoXXmpiG4EKA2Eqonj10u1v5kGgyXuvQYCMdt2JBQPVcuZfoEuMm24fgyQ4DaVLBdIDgBfc/q9xgRvHyxL4P5eLDLx8sIUABBLdhuNv0p2EIy2Npr2wD19Unhi+6Qq53HVFPe/7na9l4+XbAd0AhvvqhMrKhuOI9Ck8PtdrsbO3FeXp4yMjJ89uK+Pqj8GWoAAPvxdS9EQ7nXpADNzc2V0+n0WcMAALAzl8ulzMzMOsc1KUABAMBF/JwZAAAGCFAAAAwQoAAAGCBAAQAwQIACAGCAAAUAwAABCgCAAQIUAAADBCgAAAYIUAAADBCgAAAYIEABADBAgAIAYIAABQDAAAEKWGzSpEm65ppr1Lp1a3Xv3l3Lli2TJO3Zs0d9+vRRfHy84uPjNXToUO3Zs+eK+c+fP6+0tDSlpKR4DR88eLASExPVunVr9erVS+vXr/ca/8c//lHXXXedWrVqpbvvvlsnT560biWBMMTvgQIWKygoUNeuXdWiRQt99913GjRokD788EN16dJFZWVluu6663ThwgX993//t5YtW6Zdu3Z5zf/SSy9p8+bN2r9/v44cOeIZvmvXLvXo0UPNmjXTV199paFDh2rv3r265pprVFBQoJ/97Gf68MMPdcstt+ihhx7ShQsXtHr1an+vPhCyqEABi6Wnp6tFixaSJIfDIYfDocLCQsXFxSk1NVUOh0Nut1uRkZHat2+f17wHDhzQypUr9fTTT1+x3J49e6pZs2ae5VZXV+vw4cOSpFWrVmnkyJG6/fbbFR0drRdeeEFr167VmTNnLF5bIHwQoIAfPPzww2rZsqXS0tJ0zTXX6I477vCMi4uLk9Pp1KxZs/TMM894zTdr1iz913/9l6Kioupc7ogRI+R0OvXTn/5UgwYNUp8+fSRdrHp79erlma5Lly76yU9+or1791qwdkB4IkABP1iyZInOnDmjbdu2acyYMZ6KVJLKysp0+vRpvfHGG+rdu7dn+Lp161RTU6PRo0fXu9w///nPOnPmjDZs2KCsrCxFRFw8pSsqKhQbG+s1bWxsLBUo4EMEKOAnkZGR6t+/v44cOaKlS5d6jWvVqpWmT5+uyZMnq7S0VJWVlXriiSf0+uuv/+hymzdvruHDh2vz5s16//33JUnR0dEqLy/3mq68vFwxMTG+WyEgzDULdAOAcFNTU6PCwsIrhl+4cEFVVVUqLi6Ww+FQUVGRBgwYIOnik7inT59WcnKyvvzyS6Wmpja43PT0dO3cudMzbv/+/Tp37py6d+9uzUoBYYgKFLBQaWmpVq9erYqKCtXW1mrz5s165513NGTIEG3ZskU7duxQbW2tysvLNWfOHMXHx+uGG27QjTfeqMOHDys/P1/5+flatmyZkpKSlJ+frw4dOui7777Txo0bdfbsWVVXV2vlypX67LPPNHDgQEnSfffdpw8++EDbtm1TZWWl5s6dqzFjxlCBAj5EBQpYyOFwaOnSpZo+fbouXLig6667Tr/97W81atQovfvuu5o1a5aOHDmiqKgo9e3bV5s2bZLT6ZQkJScne5aTkJCgiIgIzzC326158+Zpz549ioyMVLdu3fSnP/1Jt9xyi6SLFej//M//6L777tOJEyc0dOhQvfXWW/7fAEAI43OgAAAYoAsXAAADBCgAAAYIUAAADBCgAAAYaNJTuLm5uZ4nBAEACHUul0uZmZl1jmtSgDqdTmVkZPikUQAA2F1eXl694+jCBQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAwQoAAAGCFAAAAwQoAAAGCBAAQAwQIACAGCAAAUAwAABCgCAAQIUAAADzQLdAABoqtgZyz3/Pr30wQC2BOGMChQAAANUoACCGtUoAoUKFAAAA1SggE1cWklJVFOA3VGBAgBggAAFAMAAXbhAAF3ebQsgeFCBAgBggAoUXniQBQAahwANQnzuDeGGrm7YEQEa5KgYQxc3SoC9EaA2Ut8Fk7tvmODmCrAWAWpTdglNqiDUh2MD4Y4A9ZH6Ao8LCy5llxujYGCyrai64U8EqMU4oREOOM4RjghQQ76oJOxSjdilHaifL7pLTZbBsdF4dGmHn4AGaDAccL6+gFh9QWrsg0h23d6hIlDHdjAEnj/baOV+aGg9QvV8C9X1MhX0FWhjT0aeavVm9/eXGvtagWxToATbRcyu260+DW3PQN0AB5LdrxWB5HC73e7GTpyXl6eMjAyfvbhdTixcvWDoEjQ5iUP1GA1kSAAmAhXCDeVekwI0NzdXTqfTZw0DAMDOXC6XMjMz6xzXpAAFAAAX8WssAAAYIEABADBAgAIAYIAABQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAwQo4Af/+Mc/5HQ6NWnSJEnSl19+qV/84hdKSEhQYmKixo8fr5KSEs/08+bNU/PmzRUdHe35279/vyTp0KFDXsOjo6PlcDj02muvSZJycnIUERHhNT47O9v/Kw2EOAIU8INHHnlEffv29fz/1KlTeuihh1RUVKSDBw8qJiZGU6dO9ZrnnnvuUUVFheevc+fOkqSOHTt6Df+///s/RUREaOzYsZ5527dv7zXNlClT/LOiQBhpFugGAKFu9erViouLU79+/bRv3z5J0vDhw72mmTlzpgYOHGi0/BUrVuj2229Xamrq1TYVQBNQgQIWKi8v19y5cz3dq/X57LPPlJ6e7jXsgw8+UEJCgtLT07V06dJ6512xYsUVFWZpaamSkpLUqVMnzZ49W5WVleYrAaBOBChgoeeee07Tpk1Thw4d6p1m165dWrBggV555RXPsAkTJujbb7/VsWPH9Pvf/14LFizQO++8c8W827Zt0w8//KBx48Z5hqWlpSk/P18lJSX65JNPlJeXpzlz5vh2xQAQoIBV8vPz9fHHH2v27Nn1TrNv3z4NHz5cixYt0oABAzzDe/Toofbt2ysyMlL9+vXTo48+qjVr1lwxf3Z2tsaOHavo6GjPsOTkZPXo0UMRERHq1KmTFi5cWOe8AK4O74ECFsnJyVFRUZE6duwoSaqoqFBtba327Nmj7du36+DBgxo6dKiee+453X///Q0uy+FwyO12ew07e/as3n33Xa1bt67J8wK4elSggEUeeughFRYWKj8/X/n5+Zo+fbruvPNObd68WcXFxRoyZIgeeeQRTZ8+/Yp5169fr1OnTsntduvrr7/W4sWLNWrUKK9p1q1bp7i4OA0ePNhreE5Ojg4dOiS3263Dhw/rqaeeumJeAFePAAUs0rJlSyUnJ3v+oqOj5XQ6lZiYqGXLlmn//v2aP3++1+c1/2n16tXq2rWrYmJiNHnyZD355JNXPCiUnZ2tyZMny+FweA3fvn27brvtNrVq1Ur9+vXTjTfeqMWLF/tlnYFw4nDTtwMAQJNRgQIAYIAABQDAAAEKAIABAhQAAAMEKAAABpr0RQq5ublyOp1WtQWAgR2Hjtc5vHfHtn5uCRB6XC6XMjMz6xzXpAB1Op3KyMjwSaMA+MaQZcvrHH56aZafWwKEnry8vHrH0YULAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAwQoAAAGCFAAAAwQoAAAGCBAAQAwQIACAGCAAAUAwECTflAbQODFzqj7B7QB+BcVKAAABqhAgRB1eaV6eumDAWoJEJqoQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAzyFCwQBPvsJ2A8VKAAABqhAAZvyddV56fL4TChw9QhQwI/4cgMgdBCgQABRFQLBi/dAAQAwQAUK2ARP2gLBhQoUAAADVKDgfTgAMECAhim6C/3Hjtu6oaeBG2ovN1jAvxCg8MLHLMKTHUM+UDgH0FgEKBpE927jcNEFwg8BehkuhPVr7LYJ9m3Y2Gos2NbLF0wqVSu2U33tsPq16OrGpRxut9vd2Inz8vKUkZFhSUOacmI29uAMVLeU3dsXSFZfWHxxgQ/H/eJPvjgGfB2gvt7noRqgVtw0XO22t3pbN5R7AQ1QLlQAwkFje2tw9XwdqD4L0NzcXDmdTp81DAAAO3O5XMrMzKxzXJMCFAAAXMQ3EQEAYIAABQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAwQoAAAGCFAAAAwQoEAArF69WjfccINatWqlLl26aNu2bTp//rzGjRun1NRUORwO5eTkeM3z6aefavDgwYqNjVVqaqrXuNLSUk2cOFHt27dXbGysMjMz9dVXX/lvhYAwRIACfrZlyxY9+eSTeuutt3TmzBl99tln6ty5sySpf//+WrlypZKTk6+Yr1WrVnrwwQf1yiuvXDGuoqJCffv2VV5enk6ePKkpU6bozjvvVEVFheXrA4QrflAb8LN+/fpp2rRpmjZtWr3TpKSkaOXKlRo0aNAV4z7++GP9x3/8h4qKihp8ndatW+vTTz9VRkbGVbYYQF2oQAE/qq2t1TfffKNjx46pa9euSklJ0cyZM3X27Fmfvk5+fr7Onz+vrl27+nS5AP6FAAX86IcfflB1dbXWrFmjbdu2KT8/Xzt27NCLL77os9coLy/X/fffr+eff16xsbE+Wy4AbwQo4EdRUVGSpFmzZumaa65R27ZtNWfOHG3YsMEnyz979qxGjhypn/3sZ3r66ad9skwAdSNAAT+Kj49XSkqKHA6Hz5d97tw53X333br22mv1u9/9zufLB+CNAAX8bOrUqXr99ddVWlqqU6dO6be//a1GjBgh6WIIulwuSdL58+flcrn0z+f8Lly4IJfLperqarndbrlcLp0/f16SVF1drXHjxikqKkorVqxQRASnNmA1nsIF/Ky6ulqPPvqo/vjHP8rpdGrChAlauHChnE6nUlNTdfDgQa/pDxw4oNTUVOXk5Gjw4MFe4wYOHKicnBxt3bpVgwYNUlRUlFd4bty4UQMGDPDLegHhhgAFAMAA/TwAABggQAEAMECAAgBggAAFAMBAs6ZMnJubK6fTaVVbAACwFZfLpczMzDrHNSlAnU4nX0wNAAgbeXl59Y6jCxcAAAMEKAAABghQAAAMEKAAABho0kNECE2xM5Z7/n166YMBbAkABA8CFF4uDVOJQAWA+tCFCwCAAQIUAAADBCgAAAYIUAAADPAQEQAEGZ6ctwcqUAAADBCgAAAYoAsXAIIYn90OHCpQAAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAwQoAAAGCFAAAAwQoAAAGCBAAQAwwHfhhqnLvz8zUPhZJuDH2eV8hTcqUAAADFCBwjaoRgEEEwIUDfJ1qNEVBViLG1H/IUBhzA4nKr+FCCBQCFBYzp9Vpx1CHWa4GUKwIUDhE1Z39XIxRagI95u8UDq3CVD4HO9zwhdCKWg4J+oXzPs5LAM0lO6A/MkuF4HGtsOf+5ljKnAaOh5M9kNj96Uv9nlDy7DL+XYpjnNvYRmgl/P1CWhHdjwZm8IX7a9vGaGyj4OR6X41vYm6Wg0tL9jPMRONrR5DddsQoE1g0tXQlAOnvrtPLvDWauw+unw/mFwUrL6Dt+PNoJU3P/4QqIfggpnV62GX66PD7Xa7GztxXl6eMjIyfPbiphcuK1/LjsJ9/eHNijt9f3Zvw3+C+drR2BtWqwO0odwLigo03E9A3nfApaw4H+xyR4/As8v11o7POlwuKAIU3uxygCP0mXYJc4zaQ7i/R2m1JnXh5ubmyul0WtkeAABsw+VyKTMzs85xTQpQAABwET9nBgCAAQIUAAADBCgAAAYIUAAADBCgAAAYIEABADBAgAIAYIAABQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAhb79ttvNWTIEMXGxqpr165at26dJOn8+fMaN26cUlNT5XA4lJOT4zVfWVmZpkyZonbt2qldu3aaN2+e1/jBgwcrMTFRrVu3Vq9evbR+/Xqv8a+//ro6deqk1q1bq0+fPvr888+tXE0g7BCggIVqamo0atQojRgxQidPntSbb76pSZMmae/evZKk/v37a+XKlUpOTr5i3tmzZ6uqqkpFRUX6+uuv9fbbb+utt97yjF+0aJFKSkpUXl7uWW5JSYkk6auvvtJTTz2lNWvW6PTp05o2bZpGjx6t2tpa/6w4EAYIUMBC3333nY4eParZs2crMjJSQ4YMUWZmpt5++2395Cc/0WOPPab+/fsrMjLyink/+OADPfHEE2rZsqVSU1M1bdo0LV++3DO+Z8+eatasmSTJ4XCourpahw8fliQVFRUpPT1dGRkZcjgcmjx5so4fP67S0lL/rDgQBghQwEJut7vOYbt3727y/HXNN2LECDmdTv30pz/VoEGD1KdPH0nS8OHDVVtbq6+++kq1tbVavny5br755jorXQBmCFDAQmlpaWrXrp1eeeUVVVdX66OPPtLWrVtVVVX1o/MOGzZML7/8ss6cOaN9+/Zp+fLlV8z35z//WWfOnNGGDRuUlZWliIiLp3RMTIzGjh2r/v37q0WLFpo/f77efPNNORwOS9YTCEcEKGCh5r0qGzgAABVKSURBVM2b63//93/14YcfKjk5Wa+99pomTJiglJSUH5138eLFioqKUrdu3TRq1ChNnDixzvmaN2+u4cOHa/PmzXr//fclScuWLdPy5ctVUFCg8+fPa+XKlRoxYoSOHj3q83UEwhUBClisZ8+e2rp1q06cOKHNmzdr//79uvXWW390voSEBK1atUrff/+9CgoKdOHChQbnq6mpUWFhoSRp586dGjlypLp3766IiAgNGzZM11xzjb744gufrRcQ7ghQwGK7du2Sy+VSVVWVXn31VZWUlOiBBx6QJJ07d04ul0vSxY+1uFwuz/uehYWFOnHihGpra7Vx40a9+eabevbZZyVdfDhp48aNOnv2rKqrq7Vy5Up99tlnGjhwoCSpb9+++vDDD7V//3653W5t2bJFe/fu1Y033uj/DQCEqGaBbgAQ6t5++20tW7ZM1dXVGjBggLZs2aIWLVpIkq6//nodPHhQkpSVlSVJOnDggFJTU5WXl6fHHntMZWVl6t69u1atWqX09HRJFx8omjdvnvbs2aPIyEh169ZNf/rTn3TLLbdIkiZPnqzCwkINGjRIp06dUkpKin73u98pLS0tAFsACE0Od12PCQIAgAbRhQsAgAECFAAAAwQoAAAGCFAAAAw06Snc3NxcOZ1Oq9oCAICtuFwuZWZm1jmuSQHqdDqVkZHhk0YBAGB3eXl59Y6jCxcAAAMEKAAABghQAAAM8FV+CBuxM/71Y9Snlz4YwJYACAVUoAAAGCBAAQAwQIACAGCAAAUAwAABCgCAAQIUAAADBCgAAAb4HChC1qWf+wQAX6MCBQDAAAEKAIABunABP7q8W5mvFASCFwEKAD7GjVJ4oAsXAAADBCgAAAYIUAAADBCgAAAYIEABADBAgAIAYICPsQCAxS79WAsfaQkdBChgMb6TFwhNdOECAGCAChRhiS41AFeLAAUCiCAHghdduAAAGCBAAQAwQBcuQgpPvALwFwIUAHyAm7fwQ4AiqNn1omXXdgHwHQIU8AECEwg/BCgA+BEfXQodBChgyNdV5+XL4+Jqb/Q6gACF5Rq60JiEBBcu36Mqqh/HG+pDgCIoLp5WXsR8HfC+Ul+77LqP6kNlXT+2TXBzuN1ud2MnzsvLU0ZGhs9ePBgu3I1l5cXO9CRraPuaBJLJ6wa7S9fZrutlZRXvz31ueq6Eag9HsF8T62N67AXqhrKh3AuKAG3sCdJQ0PgirO1yYl3KF8Fo+lr+el00LJhDoiG+Pt44fsODrwPVZwGam5srp9Pps4YBAGBnLpdLmZmZdY5rUoACAICL+DJ5AAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAwQoAAAGCFAAAAwQoAAAGCBAAQAwQIACAGCAAAUAwAABCgCAAQIUsFhRUZHuuOMOxcfHKzk5WTNnzlRNTY2+/PJL/eIXv1BCQoISExM1fvx4lZSUeOY7d+6cpk+frqSkJCUkJGjkyJEqLi72jP/iiy906623KiYmRj179tTnn3/u9brHjh3Tv//7vysuLk7x8fG67777/LbOQDggQAGLPfzww2rXrp1KSkqUn5+vrVu3asmSJTp16pQeeughFRUV6eDBg4qJidHUqVM98y1atEh//etftWvXLh09elRxcXGaNWuWJOnkyZO666679Ktf/UplZWV64oknNHLkSJ06dcoz/5gxY5ScnKyDBw+qtLRUjz/+uN/XHQhlBChgsQMHDmjChAlyOp1KTk7WsGHDVFBQoOHDh2v8+PFq3bq1WrZsqZkzZyo3N9drvqysLCUlJcnpdOree+9VQUGBpIvVZ1JSksaPH6/IyEhNmjRJiYmJWrt2rSTpo48+0uHDh/XKK68oNjZWzZs3V+/evQOy/kCoIkABiz366KNavXq1qqqqVFxcrI0bN2rYsGFXTPfZZ58pPT3d8/9p06YpNzdXR48eVVVVlVatWqXhw4dLktxut9xut9f8brdbu3fvliR9+eWXuv766zVlyhS1adNGffv21datWy1cSyD8EKCAxQYOHKiCggK1bt1aKSkp6tOnj+6++26vaXbt2qUFCxbolVde8Qzr3r27OnbsqGuvvVatW7fWt99+q7lz50qS+vXrp6NHj+qdd95RdXW1srOzVVhYqKqqKknSkSNH9NFHH2nw4MH6/vvv9ctf/lKjRo3S8ePH/bfiQIgjQAELXbhwQVlZWRozZowqKyt1/PhxnTp1Sk8++aRnmn379mn48OFatGiRBgwY4Bk+Y8YMuVwunThxQpWVlRozZoynAm3Tpo3Wr1+vX//610pKStKmTZs0dOhQpaSkSJKioqKUmpqqadOmqXnz5rr33nvVoUMHry5iAFeHAAUsdPLkSR0+fFgzZ85UixYt1KZNG02dOlUbNmyQJB08eFBDhw7Vc889p/vvv99r3p07d+qBBx5QQkKCWrRooVmzZunrr7/2VJEDBw7U3/72N508eVJvv/22/v73v+vWW2+VJPXs2VMOh8O/KwuEGQIUsFDbtm3VqVMnLV26VDU1NSorK1N2drZ69eql4uJiDRkyRI888oimT59+xbx9+/bVihUrdPr0aVVXV2vJkiVq37692rZtK0nasWOHqqurVV5erscff1wpKSnKysqSJI0ePVqnTp1Sdna2amtrtWbNGhUXFyszM9Ov6w+EMgIUsNjatWu1adMmJSYmqmvXrmrWrJl+85vfaNmyZdq/f7/mz5+v6Ohoz98/vfrqq3I6nerWrZsSExO1YcMGrVu3zjN+4cKFatu2rTp06KCSkhKvcQkJCXr//ff16quvKjY2Vi+//LLWr1/vCV8AV8/hvvxRPgAA8KOoQAEAMECAAgBggAAFAMAAAQoAgAECFAAAA82aMnFubq6cTqdVbQEAwFZcLle9n59uUoA6nU5lZGT4pFEAANhdXl5evePowgUAwAABCgCAgSZ14QKhInbGcs+/Ty99MIAtARCsqEABADBAgAIAYIAABQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAG+TB5h49IvkAeAq0WAAn50eYjzSzBA8CJAEfYINQAmeA8UAAADVKBAAxr64W1+lBsIbwQo0EgNPYRENzAQfghQwGI8/QuEJt4DBQDAAAEKAIABunCBAOJBJCB4EaDAZYL5PUsCGfAfAhSwQDCHMIDGIUCBIEdYA4FBgAI2wWdJgeBCgAI2VV9lSbAC9kCAIqhRtQEIFD4HCgCAASpQBJ3GPjQT7g/XUJ0D1iJAgSBjxY0Bnx8Fmo4ARVCg6rx6jQ1JwjR0+GJfNnROhfvxETYBykEA/IvpDQnnSvCyYl+G+81W2ARoQ8L9IDBl8jGLxt7IUEnaUzh8tMaKm207XmPsco7Zcds0lm0D1BcHsckB0th5fNEG06BpyNUegHY5qRBc7FqpmnRb+2J5jV1GYzXltQJ1Dvvi5rih7WvHmzeH2+12N3bivLw8ZWRk+OzFfR0SXPwbj2oPdmDFTWSg+POcCqXt5mu+DtSGcq9JAZqbmyun0+mzhgEAYGcul0uZmZl1jmtSgAIAgIv4JiIAAAwQoAAAGCBAAQAwQIACAGCAAAUAwAABCgCAAQIUAAADBCgAAAYIUAAADBCgAAAYIEABADBAgAIAYIAABQDAAAEKAIABAhTwozfeeEN9+vRRixYt9MADD3iN+8tf/qK0tDS1bNlSgwcP1sGDB73Gb9++Xbfffruio6OVlJSkRYsWecYVFRVp8ODBatmypdLS0vTxxx/7Y3WAsEaAAn7Uvn17Pfvss3rwwQe9hh8/flxjxozRCy+8oJMnT6pPnz665557vMYPGzZM//mf/6kTJ05o3759+rd/+zfP+IkTJ6p37946ceKEXnrpJY0bN07Hjh3z23oB4Ygf1AYC4Nlnn9WRI0f0hz/8QZL05ptv6g9/+IO++OILSVJlZaXatm2rHTt2KC0tTc8884wOHz6st99++4pl7d27VzfddJOOHz+umJgYSdKAAQN03333afr06X5bJyDcUIECNlBQUKBevXp5/t+qVSt16dJFBQUFkqQvv/xSCQkJ6tevn9q1a6eRI0fq0KFDnnk7d+7sCU9J6tWrl2deANYgQAEbqKioUGxsrNew2NhYnTlzRpJ05MgRZWdna9GiRTp06JA6deqkiRMnNmpeANZoFugGAJCio6NVXl7uNay8vNxTVUZFRWn06NHq27evJOn5559X27Ztdfr06R+dF4A1qEABG0hPT9fOnTs9/6+srFRhYaHS09MlST179pTD4fCM/+e/3W630tPTtX//fq+Kc+fOnZ55AViDAAX8qKamRi6XS7W1taqtrZXL5VJNTY1Gjx6t3bt367333pPL5dKCBQvUs2dPpaWlSZKmTp2qdevWKT8/X9XV1XrhhRfUv39/xcXFqXv37rr55ps1f/58uVwurVu3Trt27dLYsWMDvLZAiHMD8Jvnn3/eLcnr7/nnn3e73W73li1b3Ndff73b6XS6Bw4c6D5w4IDXvEuWLHG3b9/eHRcX5x4xYoT70KFDnnEHDhxwDxw40O10Ot3du3d3b9myxY9rBYQnPsYCAIABunABADBAgAIAYIAABQDAAAEKAICBJn2RQm5urpxOp1VtAWChHYeOe/7du2Pbesdd6vLpEH7qOzYuF6rHisvlUmZmZp3jmhSgTqdTGRkZPmkUAP8asmy559+nl2bVO+5Sl0+H8FPfsXG5UD1W8vLy6h3HV/kBQS52xqXB+GADUwLwJd4DBQDAABUoEGQurTgBBA4VKAAABghQAAAM0IULhCi6egFrUYECAGCAClR8DAAA0HRhGaB0bQEArhZduAAAGAjLChQId/TCAFePChQAAAMEKAAABujCBQB40L3feFSgAAAYoAK9zOV3X3wuFMGE6gHwHypQAAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAwQoAAAG+CIFAPXii0WA+hGgP+LSCwgXDwDAPxGgQBDgK/oA+yFAAQBXLRx763iICAAAA2FTgdIFBgD+ES4Pn4VNgALBhps++AvHmhkCFECjheP7XEB9CNAm4OIBKwVbFdBQezk/EA4IUMCPwuW9IdhfsN2w2REBClisoQsVF7HQxI1SeHC43W53YyfOy8tTRkaGz17cn12iVl+owvEEaez+C8eub4KxfnY8BnxxjPpin/ti29j92PP1/rf6ZqWh3AupCjSQB059r335zmxsGy+dzy7vNTW2kmpsmF6uoXUO1Ho2tk12v2jZSaBuqBq7j+x4HYE92aYCvZzJicXBZ6ax29ou29c0uOpbT7usF7yFQzUWjqzer1SgTcAJYi07bl/TNtlxXVA/094KhCY77ucmVaC5ublyOp1WtgcAANtwuVzKzMysc1yTAhQAAFzEl8kDAGCAAAUAwAABCgCAAQIUAAADBCgAAAYIUAAADBCgAAAYIEABADBAgAIAYIAABQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKCAhd544w316dNHLVq00AMPPOAZfv78eY0bN06pqalyOBzKycnxmq+srExTpkxRu3bt1K5dO82bN88z7tChQ4qOjvb6czgceu211yRJOTk5ioiI8BqfnZ3th7UFwkuzQDcACGXt27fXs88+q82bN+vs2bNe4/r376/HHntM48ePv2K+2bNnq6qqSkVFRSotLdXPf/5zXXfddZo6dao6duyoiooKz7QHDhxQ165dNXbsWK/XPXLkiHUrBoAABaw0ZswYSdI333zjFWg/+clP9Nhjj0mSIiMjr5jvgw8+0MaNG9WyZUulpqZq2rRpWr58uaZOnXrFtCtWrNDtt9+u1NRUa1YCQJ3owgVsyu12e/179+7ddU63YsUKTZkyxWtYaWmpkpKS1KlTJ82ePVuVlZWWthUIRwQoYEPDhg3Tyy+/rDNnzmjfvn1avny5qqqqrphu27Zt+uGHHzRu3DjPsLS0NOXn56ukpESffPKJ8vLyNGfOHH82HwgLBChgQ4sXL1ZUVJS6deumUaNGaeLEiUpJSbliuuzsbI0dO1bR0dGeYcnJyerRo4ciIiLUqVMnLVy4UGvWrPFn84GwQIACNpSQkKBVq1bp+++/V0FBgS5cuKBbb73Va5qzZ8/q3XffvaL79nIOh8OrOxiAb/AQEWChmpoa1dTUqLa2VrW1tXK5XGrWrJmaNWumc+fOeYLt/PnzcrlcatGihRwOhwoLCxUXF6e4uDh99NFHevPNN7V161avZa9bt05xcXEaPHiw1/CcnBx17txZHTp00JEjR/TUU09p1KhRfltnIFxQgQIWevHFFxUVFaWXX35ZK1euVFRUlF588UVJ0vXXX6+oqCgVFxcrKytLUVFROnjwoCQpLy9PN910k2JiYvT0009r1apVSk9P91p2dna2Jk+eLIfD4TV8+/btuu2229SqVSv169dPN954oxYvXuyfFQbCiMNN3w4AAE1GBQoAgAECFAAAAwQoAAAGCFAAAAwQoAAAGGjS50Bzc3PldDqtagsAALbicrmUmZlZ57gmBajT6VRGRoZPGgUAgN3l5eXVO44uXAAADBCgAAAY4LtwAQC2Eztjudf/Ty99MEAtqR8VKAAABghQAAAMEKAAABggQAEAMECAAgBggKdwAQC2cPmTt3ZHBQoAgAECFAAAAwQoAAAGeA8UAXXpex52/KYRAKgPFSgAAAYIUAAADBCgAAAYIEABADBAgAIAYICncOFXwfZNIwBQHypQAAAMEKAAABggQAEAMECAAgBggIeIbIqvuAMAeyNAAYtxMwSEJgJUXOAAwO7seJ0OqQC9/DOGdtnIaBw7niAAUJ+QClBfIIRhpYaOL449ILgQoEEg2C+sfPtQ/dg2QPAiQG2EiykABI+wDFCCCgDsIZivxyEdoMG8YxoSDg/bBHu3NYDQF9IBCgAIbYG82Q76ALW6ygyHas/XQrXy9zeOPYQiX1wf7HKNCfoADXfh0tVJmNhbuByHwKUIUARdOAVDe319h+yLdW6oTXbdjrA3u1SCgRLQAA2GC+Glgq29JoLtIuvP9oZyleXrYzsczhWr2WUbhntINsQ2FWhTLoR236GNPfADuR5WVkiwVmPPFX8+H2BXVraxKaF2te1oyvxXG7bBsF/twuF2u92NnTg3N1dOp9PK9gAAYBsul0uZmZl1jmtSgAIAgIsiAt0AAACCEQEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAgBggAAFAMDA/wf6bnHeYyXbdQAAAABJRU5ErkJggg==\n", + "text/plain": [ + "<Figure size 576x810 with 9 Axes>" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "from utils import plot_windows_from_data\n", + "\n", + "k_12kb = 20 # Number of KNNs to be saved later on\n", + "targets_12kb = [80503, 43895, 33430, 42575, 6112, 91938, 82896, 1060, 11975]\n", + "targets_12kb_ex = 12933\n", + "\n", + "plot_windows_from_data(data_12kb, window_ids=targets_12kb)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Done! Took 85.77 seconds (1.4 minutes).\n" + ] + } + ], + "source": [ + "\"\"\"Compute the CAE latent space\"\"\"\n", + "\n", + "from utils import get_models, predict\n", + "\n", + "encoder_12kb, decoder_12kb, autoencoder_12kb = get_models('models/dnase_w-12000_r-100.h5', loss_fn='bce')\n", + "\n", + "t0 = time()\n", + "predicted_12kb, _, latent_12kb = predict(\n", + " encoder_12kb,\n", + " decoder_12kb,\n", + " data_12kb.reshape(data_12kb.shape[0], data_12kb.shape[1], 1)\n", + ")\n", + "print('Done! Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))\n", + "\n", + "with h5py.File('data/cae_12kb.h5', 'w') as f:\n", + " f.create_dataset('latent_space', data=latent_12kb, dtype=np.float32)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Preprocessing done! Took 115.74 seconds (1.9 minutes).\n", + "Done! Took 13.87 seconds (0.2 minutes).\n" + ] + } + ], + "source": [ + "\"\"\"Compute SAX\"\"\"\n", + "\n", + "from tslearn.piecewise import SymbolicAggregateApproximation\n", + "\n", + "t0 = time()\n", + "sax_12kb = SymbolicAggregateApproximation(n_segments=120, alphabet_size_avg=10)\n", + "sax_data_12kb = sax_12kb.fit_transform(data_12kb)\n", + "print('Preprocessing done! Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))\n", + "t0 = time()\n", + "N = data.shape[0]\n", + "dist = np.zeros(N)\n", + "target = sax_data_12kb[80503]\n", + "for i in range(N):\n", + " dist[i] = sax_12kb.distance_sax(target, sax_data_12kb[i])\n", + "print('Done! Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Search for window #80503.... done! Took 16.87 seconds (0.3 minutes).\n", + "Search for window #43895.... done! Took 16.10 seconds (0.3 minutes).\n", + "Search for window #33430.... done! Took 15.50 seconds (0.3 minutes).\n", + "Search for window #42575.... done! Took 15.87 seconds (0.3 minutes).\n", + "Search for window #6112.... done! Took 16.19 seconds (0.3 minutes).\n", + "Search for window #91938.... done! Took 16.08 seconds (0.3 minutes).\n", + "Search for window #82896.... done! Took 15.96 seconds (0.3 minutes).\n", + "Search for window #1060.... done! Took 17.08 seconds (0.3 minutes).\n", + "Search for window #11975.... done! Took 16.38 seconds (0.3 minutes).\n" + ] + } + ], + "source": [ + "from time import time\n", + " \n", + "with h5py.File('data/cae_12kb.h5', 'r') as f:\n", + " cae_12kb = f['latent_space'][:]\n", + "\n", + " \n", + "with h5py.File('data/12kb-similarity-search.h5', 'w') as f:\n", + " f.create_dataset('knn_ae', shape=(len(targets_12kb), k_12kb), dtype=np.int)\n", + " f.create_dataset('knn_eq', shape=(len(targets_12kb), k_12kb), dtype=np.int)\n", + " f.create_dataset('knn_sax', shape=(len(targets_12kb), k_12kb), dtype=np.int)\n", + " f.create_dataset('top_xcorr', shape=(len(targets_12kb), k_12kb), dtype=np.int)\n", + " \n", + " for i, target in enumerate(targets_12kb):\n", + " t0 = time()\n", + " print('Search for window #{}'.format(target), end='', flush=True)\n", + " f['knn_ae'][i] = knn(cae_12kb, target, k_12kb, ignore=2)\n", + " print('.', end='', flush=True)\n", + " f['knn_eq'][i] = knn(data_12kb, target, k_12kb, ignore=2)\n", + " print('.', end='', flush=True)\n", + " f['knn_sax'][i] = knn(sax_data_12kb, target, k_12kb, sax=sax_12kb, ignore=2)\n", + " print('.', end='', flush=True)\n", + " f['top_xcorr'][i] = xcorrelation(data_12kb, target, k_12kb, normalize=True, zero_normalize=True, ignore=2)\n", + " print('. done! Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "scrolled": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAC9cAAAW7CAYAAACHUqN3AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nOzdvdLbyJUwYFClxKl2JvvKVuBUVVvluRBdqq5gr0CqcpVSJxPbNemG/AItRxRFAmigf053P09izysSbALog/453bxcr9cFAAAAAAAAAAAAAABm9qZ1AQAAAAAAAAAAAAAAoDXJ9QAAAAAAAAAAAAAATE9yPQAAAAAAAAAAAAAA05NcDwAAAAAAAAAAAADA9CTXAwAAAAAAAAAAAAAwPcn1AAAAAAAAAAAAAABM723Ki//rv/7r+te//rVUWbr2z3/+c1mWZfnv//7vxiVhNLPeW//85z//c71ef21djpLE1Dhu9exmtvrG+MRUgHzEVNjnsY29LNrZ/ExMBchHTAXIa/S4KqYCNY0eU5dFXKWs+7HW2xirHIcyno1rL0us8yumAuSzFlOTkuv/+te/Lv/zP/+Tp1SDeffu3bIsi/NDdrd769aA++OPP1oWp5p379793roMpYmpcdzq2Y3rwmjEVIB8xFTY57GNvSza2fxMTAXIR0wFyGv0uCqmAjWNHlOXRVylrPux1tt9JsehjGfj2ssS6/yKqQD5rMXUNzULAgAAAAAAAAAAAHz37t27l8ndAEBdkusBAAAAAAAAAAAAAJje29YFAMq7rWz9448/GpcEAAAAAAAAgBzMAwP0z271ABCP5HoAAAAAAACgGMmfAAAAABxxvxCt1tjSmyqfAhN59+6dVaUAAAAAAAAAAAAA0BnJ9QAAAAAANGfTCgAAAAAAoLW3rQsAAAAAAAA3twT7Wj/vCgAAABCNDQgAoB071wMAAAAAAAAAAHTML8IBAOQhuR4moiMFAAAAAAAAAAAAAM9Jrs9M8jIAAAAAAAAAAAAAQH/eti4AjOq2yOKPP/5oXBIAAAAAAAAAAEZkE1AAYEQt2ziS60/SQAUAAAAAAAAAAKAkeWoAUIfkegAAAAAAYEh+YRTakvwDAAAAQG/etC4AAAAAAAAAAAAAAAC0Zud6CMhOLgAAAAAAAAAAAGXJ04If64FfgATJ9QAAAAAAwOBMEAIAAAAAsMeb1gUAjnn37p2VkwAAAAAAwLTMlQAAAACQm53rAQAAAAAAACZwW4zgVzygXxYVAVs87/smzgNAe5LrAQAy8jPzAAAAAAAAAAAAfZJcD8C0rPgGAIC8tLEBAACgT3a6BgAA+OZN6wIAAHG9e/dOgtQJzh8AAAAAAFCa+QgAAIB87FwPAAAQnF2jgBGIZQAAAFCHPjgAAHtYoAnP2bkeAAAAAAAAAGBQdrYHAADYz871UNj9IIWdAaAPdvMAICrPKAAAAABgLwn1AAAA6STXQ+ckWAHEJ1YDAAAAAACt2RgOAABgm+R6yMSqf2YneRgAAAAAAPogwRa4Mc8NAADwI8n1AADAFCwEAwAAgDFIBAUAAACglDetC0Bf3r17Z8ASmNqscXDW7w0AAAAAADATc0IA/RG7oT/qLcRm5/oDBDUARudZBwBACu1HAAD2uG83+mU5AICy/KIvAD3zHKMlyfUAAJVo+EMbEj4BAOIq1VbT/0I/AOYi7gN8k9IGytleEocBgNFo30BMteqm5HpoyEMYAACAnh2ZiNcXBgAAAABmZ1E4EJV5HJBcD93RuIYYNCR5JD4DACPT/gV6JX4BAAAAcIbxpfHc53dsXVfXH+YkuR4GJtET2nlW/1o3tDX4YTwpnf6c7wVgXtqUQE1HYo7xMPbwPAMA2LanzaT9DQDQp57acWtlNb5HKZLrdzgziaPy8kxPDydYM8u9PPr3HDXB1rMYGMHozyAAgBT6eQD90J+NxzUBctAmh1g836GuUXMraEv7CmKSXJ9g5kbpzN+9Bg9JRuJ+fu3Vucl9zvYeT2xvRz2hBPfVfs4VAAD3tA+3OUcAAPMynwQAzKR020fbCvoguR4SPT7gck4onXl4muCC/Eo1aEvU15Syrr1WIz6dc0YNj3HDfVePNhbAc55FQEvP2mhbcWlPu07bD+A87USAfLRPAcZTK2nXs2Mf/ReAmCLEZ8n1UFGNSh8hsMDMRq+DawkMs3XQc1zrWc8dx/W06AcAABhP677Dsz5R1H5MT2WF6EYfcwXYSzwEjrqPH/olAD+K0sZqPe72TMQyQS2S62GHKA/RCDw04Uc560Tv9StK+cVsehOl7pBfyWtrIBxiUBcB2jrb/9N/HJPrCgD0ruf2jPFugG9a/yq1Bd8AcI7k+jutGzY90Sn+rsf7ZM+97toyshL1Nucxcydp1f6+0Z4RPZxP5uReKqv389t7+WF0s9TR2j9RrG8K+Y2yCKjVBPSZcxatb1zD43Xa+u5r92fK+at9rme8tkDf9jxHxTYg1ZE2ulgDwJYaz4pZxvd57sz1N9YK5aXcn6nj0akk1y91AsYowZWx7EmOhaOiDJBFvpePTGpE/j6PotwD97YaVhHLzDxqtRd7iiOl1UrYEVsAxiGm07PSA82pWrVLSw/O1/peteLR1vfJPb74+J4z16u0V9dAn4sRHIkxUTY00V77TjyCcYxWn8Xqbc4R9OtMv5YyxFQ4L3I9svEGpQyXXJ9zV6Ecnh1LBWMEe+qJe5xladeIGc2o36u1yJP0rz5XbO1PrtXvxNbyWtlZFWIY4ZndKhZ43kFbe+r+q3r6uBC8x9iXYi1eHUlAPbNws7QzSfUlPq8HOfp+o9ch6uqhr1h7V8rUz+l146wRYirMaqT661cz6tnqrxFTy3ZGD3VvazFzxLL3EMNrj2HvvV5ruXWPouQD3h/Pxlzk5v7oI6ZyXC/jLcWT63M+mFOOtRVkIlTAV9+n9wDZe/nvRbhPAI6KEsN6fy7U/oUb6ol8b+ZMyoj8PXPKPYA1S91/tYNK6/ullw41HBEpgb3H+iVOMYMcCdwpiSyP/53SJorQnoni1bk4srP7mZ2iI00yj+bINX712h5/oRDuRUpK2Tpm7fc+O05P7cUey0x/RlicnpP2AGvEZV7JETu24vHaeGKJWH5mU7RnYxk5y7Q25yaOf1N6/CPl82AmrRfNRGqrpJRFn6SuI8+ICLreuf7IJFFkRwbnU4JByZ2Q1lYRRgymW3q6byLr6ZrzoyMd6b3HLNWxdp/Fd+S6nWn8nuE5wKO9O3VGVmunoK3dRHIdv2elvkPK4GTUXTXtaMWjrUXpj39POWbE99SWI0mwtK0y5hrrKNFPiXTtI5eNNHvjYs7POPpe99lxrkEctdvurl9+EdpkJduue5J7jmxctffvpZSueyV2lkyZKC410V+iPRApFqWOz0Uq+8hKjifmOkbp+alXtubW3KPfRTw3RxJBjzy3935uxGcj+ey9DqXbZGdysPa8N0rO0p6ybbWpI42fnpEj6b32otbez33v5Y+s9jMt6jO0VrlyL/JqfR5HnQd8VDqX49Xn9aqL5PreT/JRRxJLcgzepZzvI43rlDI/WntPjiT+We81+nGmA/h4jDOfe8aeCZ8j8UH97dORa+9ak1vtQZ9aSidPbx2/9KTy2dflem8Pz6pS32ur853rWX8ksTbihNwsSrdPzyRa55gAyfmeswnekZ9BNUUYKD5zX+793NpjHGcSRqgrcizI0denjpmvSY+TYOSzFadKPX9zjM/OltwTSc4EgpRNbY68J4e1/nXJz845bnB/PMrZm1S85xiPciUi50ggpI61+ptyr+29H3PHtpSx85L3356cisfXnpmDppwe2kh7tOp/lWqjz845I6pWfaetzy/1OaXf06MS49K1758jcs0x5ug3jXKvVU+uP5NYzWslBmNLyx3ktzqAZz4XomnVAcx5TMnTPJMyEA6U10MnsbaeylrLkdhdq02x9RoTQflEmaDovY72Xv6Wzp67kud+z6KjvcfIXaacxxJT2SLG1bd1ztXb79yf4zvSXt2TVNbDvEqJY/QuyjnoMRnCWNHcUmJpzjiZY1F+7vfkOK77fJ8z80Z7z/GReyzXPR6tLeG+bKt1Dk8ts3zPnrkmaZyvmFr3XXK3g1NjZss2xpFfYik5z3CmrZf7+I9a9ZvOHH/PxnejuFyv1/0vvlz+vSzL7+WKA/Cnv12v119bF6IkMRWoSEwFyEdMBchHTAXIR0wFyGvouCqmApUNHVOXRVwFqhJTAfJ5GVOTkusBAAAAAAAAAAAAAGBEb1oXAAAAAAAAAAAAAAAAWpNcDwAAAAAAAAAAAADA9CTXAwAAAAAAAAAAAAAwPcn1AAAAAAAAAAAAAABMT3I9AAAAAAAAAAAAAADTk1wPAAAAAAAAAAAAAMD0JNcDAAAAAAAAAAAAADC9tykv/uWXX67v378vVBRgzf/+68vqv//l7/+oVJI6vnz58p/r9fpr63KUJKYCtYipAPmIqZDusT87Wv+V48RUgHzEVIC8Ro+rYirP6L9TyugxdVnEVeq5xWoxuqw9z8RW10JMBchnLaYmJde/f/9++fz5c55SAUm+frys/vuHT2PVzcvl8nvrMpQmpgK1iKkA+YipkO6xPzta/5XjxFSAfMRUgLxGj6tiKs/ov1PK6DF1WcRV6rnFajG6rD3PxFbXQkwFyGctpr6pWRAAAAAAAAAAAAAAAIgoaed6IN39asYPn64NSwIAAAAAAAAAAAAAvGLnegAAAAAAAAAAAAAApmfnegAAAAAAAAAAABjI14+XP///h0/XhiUBgL5IrgcAAAAAAAAAAAB44X6xAgBje9O6AEAeXz9eNOIAAAAAAAAAAAAA4CA71wMAAAAAAAAAAEAwNtoEgPrsXA8AAAAAAAAAAAAAwPQk1wMAAAAAAAAAAAAAMD3J9QAAlXz9ePGzfQAAAAAAAAAAAEFJrgcAAAAAAAAAAAAAYHqS6wEAAAAAgGn5pTkAYDTaNwAAAMe9bV2AVu47kh8+XRuWBAAAAAAAAAAgjltOhXwKAGZhYRoAN9Mm1wMAAAAAMCaJQAAx2fwKAADOM+4BAGW9aV0AAAAAAAAAAAAAAABozc71UIifCgIAAAAAiMsYLgAAALDF+AHAfCTXA8D/8dNpAAAAAAAAzETCIAAAwI8k1wMAnGBRBgDAz0zMA62IPwAAAAAAwBmS6wGY3uwT7/ffX4I4AAAAAABAX2wEBAAwH21AKOdN6wIAAAAAADCHrx8v0y9yBwAAAAAAzis152Dn+sUKHgCgLm0PAAAAAAAAAEqwsQEAoyv9rLNzPQAAAAAAVdnBnojcl1CXOgcAAABARHauh4rsVAxEYuIKAAAAAACgX+Z6AKAtuWAA5d33e2rFW8n10JAGFpSzVr/UPQAASPM4Wa8tDQAAAPGZEwPgxjMBAPaTXA8AUJidY4BUBjgBAAAAAAAAAOqTXA8NpCRZpiZkPnu9pCx4TsIzAAAAAAAAAAAAcCO5HiZkJ1SA8yzOAAAAiM84GM/o0wMAAAAA8IrkegAAgCAk+QAAAAAARxlfBEqwcD0u1wZYFrEASpBcD8AUUgYTH1+r8QkAAAAAAECvJFwBOYglAMAsJNff0QhkVO5tgPLsBgMAAAAAzxk7AwAAAOCsWmNM0yXXG7yD7yTdAwAAkJNxFwAAAIjrvt9ujhhgPMZnARhJy+fadMn1MDONaGaU47430AgAAPlY6A2UYNwLYBzaiwB1aEMDjENMh7mo81Ce5HrIzMMLiMqkVB9cJwAAYCYWtFNLyritvjkAAAAAwLyGS6436A0wNwtc6JH7FgAAID4LAQC2macr43H8MOX8uiZAC2IPAADQs+GS64F0JgZhLmuJ3AY7gRmIdQD5WSwIzEabsh+eUdBG7TgpLgPEZB4axqTtlZfz2Z6xAwAeFU+uf2wAlGgQeMARwZn7UEMZIAbxGABgH+0mINWesTOxBaBfOeZIXv3dc+G1lKRV5xMAgJlpD8/F9QbOsnM9POEBC/2x0Oo15yYu1wbqilbn9kyAa5cC0UWLrcAYam3QIgmxP3Y+BUby+GwS1wCASCySzyPlHDmfkN+remWMCWKLMP8ouf4JjRUeHZl8A8rRyKWlCA04oL3cfYa9sUW7FACYSelxWuPA/dAXh7mtxWvx4TvPNZiH2AdENUt75Ei+wiznJqK156Zn6niOXNPW9dPCa4ipWnJ9zofRkYCW4+coZwxcUb57jnKUum9KNLQ03mA/9YUcWsX7PZ/X+hlMTO6PbaUWYj3GAtcCAKC81m0uYw99ct0ghhLzg8sy5i/ApYxlRBzPBMZlww9gBBHbia/aa9pxkN+eGNAqP/HI8c98fsR4CBHZuT7B6IGlh8bZWhm3BlKf/ffaT7600Prz18ow6n0PueSIT5Hq2ejPvC2Rfh1h9mvBj1J2Vujxnsk5YLH1t1yf9+wzXrUxb38/s2PCnn/r8drDSHp6dkcr65FkoihlB14rOd5V6tgRxuhK6LHduKcdXPJ7HEkkM4nJDCLEyRwJBSmv7SmG5jw3Rz438rkByovwjADOyT2HEU2tNktP52Q2rg0Ae3SVXJ/ycKs1aTPCAFHpSageztHonQPmFLUORi3XXj2Uv1SyaK5j9iZKvO/h3uvdmXN8JHniyCTv3r/ntufn13MnxNc8Ru6dl1pfr1efl+s7lYhDuWPcq+N5rhFBT8/0lu2g2uepp+sCuZVOsCtxzEh1davdUStxsdXnPdP6+pR+fh05JymvgchGu4e3fp0u1/ctddyoIj6vgfJyjM+uxUkxpSyxm2Wp94tDJcbpW+Zxpbb1IrQFay8wqP2rU2LanPbWrSPjN0c2UDiyiDuljEds9YEhggjPyZtmyfUqZ196uF4S5MtKOVdHkgbJI6URmHJdXh33zDH2dHAjTzocWfC19T32DBamnJMoC81a7fx0prPCHLbq4pGk95TYtufzatXjEsertWigdtJlD848Z/a8p8RCkVfHTtHTNSK/CJOuqfdg6TKf6SOP2oeL3L8A0pRuy9Y61pm+cKsYVnuBb+7X5tRDwgRwzJFx9twLbGq0zXMloYl38NxWWy/XWF0rJRfTUk/OsWSOexUvam0W07qfl3teIGeCbam2XhQl2pxHrknu3IO9n9vS6GPxo8kRA2rfj2frVY48MdKtXYszi9VqtSm2Pr+3/K3mO9en3BC15bhgRxIljx439Ril5FzlFLHSsM11Ky/HIHyOB1eugZWtsoxyT+VcBBR14njPe/c0yM/Yk+w8yj1FfSUTPHJNaB79/NzHXHtt6+TRlONGaF+XlCOu7zlW6nk8MuCT+m9QWs5E7tITBin1OaccSUt7Yk/Ke3J89xyJSUfGiNYGVmuXiTxS7u+U+HCmPvFazv577v5zjgSGnGPlvU2ilCTGlpdy30VfnLksecdeU8Z2e66bpcve+/FLfs6RuH/kmSSG1pcy//3q33tV+pkxW9sgx3xnbq2vQY64uPbeM4l/rc/NTHIueli7btHaGWtjWT3OjfckR389V2zY23/p9dr0Wm6Oi3DNj8Thrdcc+cWhlHORcoyIieK5PmPrb1v/vreMKXMDZ655hOuXonly/U2EQHJEzsT4HIMMZ2/0GkyiwHElJ1JzKVFGYkuZoFv7e+prjnCPkaLl/TL6vdrT9+uprJG1XuxBH2ol+NWe4C+1iCXyYFMJORYN1LJnUjt1EHTPBOieydIcA6lnj822I32mlH5Zybrh+XxOjoniXNcgx/Nr7y8Vnv28EfQ2sdSjI7E1JQEp4oYOoySf0L8jbcvcxxdT89iTdHv03+/VmkOu/atB4nCe/mPOY9T6vD2fn9J2PvM5xFG779bbuKL7lx7vgdS8CehZrX7envGWI8fPsQAgZzuxdo5U7ut3Zu41cowMk1z/zN5B+AhSKnTqMXMp0Vk9U9FMogAAAFskbfZtz2RhqaSfkpOtpZKnSg9G0lathci5B5lzvJd6Sg/C9zBOS7pWC9zdN0QXsW1Wun9UYq4LIFXtmHqTEvvWkkdy5gmIx/sdGYNKOd6ZRXhHPq/Ue2BZ3Du8diaPy331M+eEWfWQdJ7zc44sJB49Pozy/S7X6/6b+HK5/HtZlt/LFQfgT3+7Xq+/ti5ESWIqUJGYCpCPmAqQj5gKkI+YCpDX0HFVTAUqGzqmLou4ClQlpgLk8zKmJiXXAwAAAAAAAAAAAADAiN60LgAAAAAAAAAAAAAAALQmuR4AAAAAAAAAAAAAgOlJrgcAAAAAAAAAAAAAYHqS6wEAAAAAAAAAAAAAmJ7kegAAAAAAAAAAAAAApie5HgAAAAAAAAAAAACA6UmuBwAAAAAAAAAAAABgem9TXvzLL79c379/X6go/fjff3356W9/+fs/GpQEvrvdl6Pci1++fPnP9Xr9tXU5ShJTgVrEVIB8xFR47nGsZJS+KWWJqQD5iKkAeY0eV8XUvt33wfW/6cHoMXVZ4sTVZ/lMyyJWRDdavk80o41di6kA+azF1KTk+vfv3y+fP3/OU6oOff14+fZ//t/P//bh07znhRhu9+co9+Llcvm9dRlKmz2mAvWIqQD5iKnw3J9jJv9nlL4pZYmpAPmIqQB5jR5XxdS+3ffB9b/pwegxdVnixNXHMbobsSK20fJ9ohlt7FpMBchnLaa+qVkQAAAAAAAAAAAAAACISHI9AAAAAAAAAAAAAADTk1wPAAAAAAAAAAAAAMD03rYuAAAAAAAAAAAAr339eGldBAAAgCnYuR4AAAAAAAAAAAAAgOlJrgcAAAAAAAAAAAAAYHqS6wEAAAAAAAAAAAAACO/rx8vy9eOl2PHfFjsyADRwe2h++HRtXBIAAAAAAAAAgJ+VTAgEAM6RXA8rnjVkJewCAADAuvv+tH40AAAAAAAA0AvJ9QAAAAAcYnclAACO8iukAAAAAEQkuR4AYMVjwpjJPgAAgPgkbLKH+wQAAAAAgEdvWhcAAAAAAAAAAAAAAABak1wPAAAAAAAAAAAAAMD03rYuAJDX7aeMl8XPGQMAjOLWxtO+AwAAYDT6vADliLEAAADp7FwPwJC+frz8sNgEAAAAAAAARmI+DKAP4jUA9EVyPQAAAAAAAAAAAAAA05NcDwAA0Ak7mwAAAAAAAAAAlPO2dQEAYAS3RMcPn66NSwIAAABACuM6AAAAMBabVQFwhuR6AAAAAAAAAACAAd0nGVtUDAD0rNbiKcn10DkrLQEAAAAAAAAAAADgvDetCwAAUNvXjxeLkwAAAABgMMb9AAAAADjLzvUADMGECQAAAGB8AACA0WjjAszhFu8/fLo2LgkAILkeAAAAAAAAOE1CEEAMEvJhbNpc/RKf81AHAPr17FkYMZ5LrgcAAAAAgA33g/4RB/vZTzIDAAAQjWRhAIA4JNcDwOAMxAAAADCrHH1iidgA+YipAG2YK4L+aUcBANQjuT4TnVGA8YjtALRmsBwAgAiMkQAAANSh/wUA0N6b1gUAgJF8/XgJmwgZuWwAAAAAAAAAAMA6+T9QXuid663GBAAAAACANkzSAQAAwHH61QDQp9DJ9TAaC0YAAAAAAAAAAADOuV+8IBcLgJwk1+9gFSFnuH9gbJHreOSyAQDQJ4vGAQDYQ7sRAAAA8uohD8h4AKOQXA+JPAAAxtdDhwQAAKCEWjt+GWMD4NGZZ4PxPABgNNo3AIzIuDC9kFyf2Z7KL0AAxLZnoMJgBgAAAAAAAAAAwDp5VpRSKh+7i+R6yegAvKLxRYrH+0Ubg165dwFoLaUd7rkF/SpRf/Xj8xJjAQAAYCz6+gDQXhfJ9VBbD5N8PZQRRnFf3/Z2YI+8BwAAAOhD64nuVmODrb93aaN/P+idMVeA1/a2Y9ZiaenFtWI3AGetjYfo00Ms6iS9k1wPDTw+PDxMIE3LxSUWtoxtz/UVs6GN2eqe5w0wotliOcAWcRGgHDEWoAzxFfIzHwAAEI/kejio5Mp9gxFE8aoj7x6Nbe8AzLPXubYQmwHWPmnjAQBwT7se4LzR+9qjfz+gnJS25qtYIwZBP/QvAeam3QblSK5foRHKEUcGLICxRWvMij3AyKLF3FL8nDLQs1liNcDIeozlxkOAEfQYf4H9WrVXtj5XOwqgDW2/Msyx0SPtMahPcv3SrjGiETSGEg8vu0nT2t5BNPdlHBrSwOx6iIOenwBAZD20pyKq3cZ7dZ20NYHozjxnRn1G7YnddpUGojoSh8Su/khABVKJG9BGj+0s8YLoJNcX0mPAIvYA7ZGyuQ8pTUOnvsd6HTlu9cR5pFfi8GsRzo3YAvSudBzTZ4V+lKyvEdptr/TYnjtzPs+MPx75vB6sbYLiOQbkIp7A3CK3OS2M4p7n1Thcy+NSzp04CHMQUyGPiHUpZHJ9jd13nn1GrUmirc/tYSf9UmV8PE+vzsnokza5RQw+jOdVnGt93/XYwd0T40qVdcR44VwxgijxKYLR697ZhKZlGffcAABx9Nj+6L0dmaOdeFNqwX6P98Ure8bzH/+75+8LOWzN7eU8Zq7j15Jjw5SU94hLENPomyeJU5AmQgxQF7/b6s+2vl5rC7+jaH2O7kUqC+1Ey79MyQMarb14pJ14Ey3WzSxHnertng6ZXJ9qz+4xZ4931JngcKZxlPu9Ke/JuSPSnnOy9V5B9rszD3DIpYeOXyk9/kTm1qKnZ/8WRW+Nsld0HubWw30cLU4dea96BfSo1QYBJYjH8KPIdSLyL1rsLVvEcbBWcbf259QaU2jdj9pzH0eu50A7fkEE6FGJtpfYBkSXO0/tTBkix8mciZilv+dWPtWzz+/hGlBvA+FW+aZR9Fhm9jmS0zzK/dBlcn3K4DTfpUxmHD3m/d+2Hkq5rtHWcdwLPyvV+Iu6c/mIZlwNVlLrSew98bh1GfeUI0rHFvYabcAj9TmcMvC31mbYW66SCVIlvNoZoNT9UnvAZZT7/pXR6jektBOP/BqdOhNfqcQC134uJdtWvY7X1liopH59t+ce2HpNT+fzWeyOWA8goih1JWXCeM/YSa1Fao//fWZMpqe4C1HVjgU9ydmPeNbeEsNe2zr37tO5GCvMQ715LeWeOpKncMbe5/SRMQ11KJZXse7+byU+r7baG2WWzv9s9Uzq6Vl4Jsbm+trJKTkAACAASURBVH4lch0inPsuk+tvZmyY9LTKae2hRAwp16TE4gzSpQyOj3jNci0GivAAvtfzNVmTs8GztpirtT3Pu62FAPf/HuV7zSSlA5FjIVnOxPXccgwYvaoLtTvyKVKSVnMucGv5/VMXxEa4ViZ8xlVq4WiE+3ZZjn2/HO3ePQsRe5rgrzUxceZzai82vYlyr5Pfs3tq6/q3vj9yJRNvxbKIYxwWgp8zwnlK6VcQ0556POtzN1LfMNWe6xc52aeEMwsCerwHaOtMf/1I3ax1j/YcFyPKEUPXxj16uk5nxpHOJEb39ByjnDP995sIv3KcY96jpzrRY6x71NP5fialj9DzderF1v0Uoc3Q+z2/LGN8h2dK5Abs+Zwc7bbc12TUa5yi6+R6+qCi9W2EgeIZHFklG0mOZNUcn0ceZyZger42Z+phz997RLU7HbUWPN7UTvjb89rau9qXOOe91uO9i/FSvt+ZxUZ7nLnHogz0j+hIe+7IAFXOBM097zkiRz3Koce4lHsSbOu1uc7R1r28J3kpRxLyzZFjjTAJN7IzCbstY0HOzy4dU3Mm7fcYf3uy9qzo8dyLv+Wt3RdH2m0lxzFTEi96vN8jat1mr6XUmOSZ+nDks1MTso+8l+NyJsLnboulXv+U9sae5ww8SplPOjK2duRz4Jm1mJoyHnFk4cfe164lyb76/LX39qxV/zLnnM0MzFPFNuo4TY7v1bq+9r4wqmQf6IyezlmLsl6u1/2V5rfffrt+/vy5YHG+iXzRgHRHHs6Xy+XL9Xr9rUBxwjgSU2eLjyNMkkJuYupzYip7zDxYx3Ni6nOlYqo6SIpo94u+yXdbO4mnEFOfm/n+glnl+ElyMfW52jF1TxtmhHZFpF/hI65IbXpt1Z/lmvdvdX0j3V/wqETSVKRnr5j6XGpcFb/SREtG7Mme+FE74dZz/Dsx9bke+v8j6Hl8Yu3XXmt+9pqezmdkKc+M3DE1Kbn+crn8e1mW35NLAJDub9fr9dfWhShJTAUqElMB8hFTAfIRUwHyEVMB8ho6roqpQGVDx9RlEVeBqsRUgHxextSk5HoAAAAAAAAAAAAAABjRm9YFAAAAAAAAAAAAAACA1iTXAwAAAAAAAAAAAAAwPcn1AAAAAAAAAAAAAABMT3I9AAAAAAAAAAAAAADTk1wPAAAAAAAAAAAAAMD0JNcDAAAAAAAAAAAAADA9yfUAAAAAAAAAAAAAAEzvbcqLf/nll+v79+8LFQXi+d9/fVmWZVn+8vd/NC7J97LcRChTSV++fPnP9Xr9tXU5ShJT44lU5yEnMRUgHzEV9rnvw2pf84qYCmwxVrOfmAqQ1+hxVUwFaho9pi6LuEoZj3lCy6J/nOLZ+VuW/s+hmAqQz1pMTUquf//+/fL58+c8pYLAvn68fPs//+/b/3z41P6+/7NM/ydCmUq6XC6/ty5DaWJqPLd6Nnr9Yj5iKkA+Yirsc9+H1b7mFTEV2GKsZj8xFSCv0eOqmArUNHpMXRZxlTIe84SWRf84xbPztyz9n0MxFSCftZj6pmZBAKAHXz9eXna0AAAAAAAAAAAAgDEl7VwPACOSSA8AAHloWwMAAAAAAAA9k1xfyY8/h35tWBIAAAAAAAAAAAAAAB69aV0AAAAAAAAAAAAAAABoTXI9AAAAAAAAAAAAAADTk1wPAAAAAAAAAAAAgX39eFm+fry0LgYADE9yPQAAAADFmPABAAAAAAAAeiG5HgAAAAAAAAAAAACA6UmuBwAAAAAAAAAYjF+TA5iDeA8AeUmuBwAAAAAAAAAAAABgepLrAQAAAAAAAAD4k12QAQCAWb1tXQAAaMWAIAAAAAAAAADQIzkPAFCGnesBAAAAAAAAAAAAAJienesBAAAAAAAAAACgA3asB4Cy7FzfwNePF40cAAAAAAAAAAAAAIBA7FwPAAAAwCk2EQAAINWtDfnh07VxSQDGo58OAABwnOR6AKZjQBEAAAAAAIDZ3M+RWdwEMB4LWAEgD8n1AAAAAABAWJIDAADOSdl4yiZVAADA7CTXww5W8AMAAAAAAJwjYRMAANZpMwMwsl5ycd+0LgAAAAAAAHP5+vFishgAAAAAAAjHzvUAAB24JZ1EXrUJAACQqpddagAAAAAAgDlIrgcAAAAAAGjMYhMAoCab+gAAADwnuf6OziMAAAAAALR1n2QOAAAAAAA1Sa6HTlkMAuwlXgDsY5dIAAAAiMO4JgAAAKPT94WY3rQuAPDd148XuzIBAAAAAAAAAAAAQAN2rn/CaqB0dvkE6IfnHAAAAAAQlU2IAAAAAMbS23iP5HpO6e2GBwAAAAAAAAAAYrJZHADQmuT6ADQK5+XaAzU9Loh6FoPEJYB8xFQAAAAAAACI4z5vwhwea8z1wtwk18MdO/EDAJCbgReAb8RDAAAAAACAn5lDYUaR73vJ9VBR5GAAjMeCIYB9nsVL7TYAAAAAYAbGQoHc7AwOAPROcj008JjAtZYAKzkWKG0tqfTGoAcAAAClSeoBmJP43zfXD2IxtwxEo63QH4sj4EfiGMxJcj0UdmQAw6AHAMB4DLwAAPTN5DIAAFGZXwZGZF6lDs8QaEPdg9gk1wMAAFMyYAFwnBgKQAmeLwAA8VhkCkBPSowtWOgBMB/J9Uu7AfvHz/Ug5ojH++bZ/eyeAuiXxAIAAGAkZ/o4xk8B5iT+t+cawBzMRwCMY0/7bU/c1w4EWhKDaElyfWE6oH1wnYBn1mKDhhsAAADslzL+ZtIEAOIztwYxqIsA5RifAHozatwa9XsRm+R6kghUADH5SU6AMrR/AQDiOdJG064DgHSvfoUbAID8tLWAXOQQEUmvzzfJ9RyydsOPPlEV9fv1GoSA/MQDiClqG4J9XsVW1xMgnWcirFNH9nvWRns8b/rIfXCdYHx76vnWayQHxKYNAwCMqnQ7p3af+MjnjdrW2/pexiuI4vFebVUnR40FtBfx3iqeXB/xSy+Lh9+IWt9r7imIrac6mjJJ1NP3Yh/XlNL2JCCN5tVgQ4lj7zl+63YrwI14BORWqj8zWz9plvg823Vd41wAJZx5nohL8E2OdtljfRq9jVfbLG1nmIH2R3nO8Wt7nycW/EId4hVravWx7FwfkA5gH1wnIol0P24lMOYcgFw7Xq3V4xb0cIbrOKfW8eOZkrE7EnVuLBHrErGMfo+MkCgz6vMGyCfyTmo5P2e0Z1aU5wwA6cRwoFczbioDsIf2XZrRxmg4pnS92Xt89fdn6ig1Sa5foTJ+18NE1qv/fpSyq+iRzx+NZIfY1u7/Vj/98+q/H/+eq3w9/EzXmZ9nilD+ZfFMzC3KdSWWPTF8rS7WeGZHmKB4VX8ey9HDT2hyjHMN+5xpc669Rx2E/pXo30WMDXvKtDf+rR2r5GKnI+M8kcaGWulpPDPKOYOSSv+qSeQ6vmWE79CC89an3nd5rX3f9TD3NRuxB/bpNT6p4/vlGAfp4Tz3ei9T1pk2bco9tWcs8shxz1AnmJHkeprZ02h6NRFyJmAL9t8dabimXLceGsSck6s+5RwkbF3HjzRyc8S22nINhIsXjOxMbMsRH3qKKTn0+H17n1SspcdrSyw9tDdK7H689+97y6MuQixHkofV429anoeUZPqt1+ToK+SYCI90X0Uqy5aeygpH1Z7gPzLP8ejMMWbpb6R83s2ovy5LWz3UwSObUGkj8Gjtnmi1mDZifaMPrZOye8o56MGeDQZnPY97nvViaXsRNpXrmXuZUkrlsx4huT6waCvga8qRDMBrOc6jRkYbUepAqXuo5G5vpZQ6F1GtXbdHrzrSKdc+5dzsee+Rnf623msgnHspdeTo8c4e88jnAYwo0uBM6uc/+1uJ3ew8F45pfZ8wjjOTvinJ9j31wUvLeU5yx4Aju1KVTITv6R6IFJd7Om/kE+kePGstYSbioptlOb/I9Mzn7D0nue+RveNJkRKfRqonsxnp2o30XUaWcp167vO0/vybKOUY0cyb79Tue0dOqh+hjuUYrzj6mq2ylFa7nU95Je6hCPV8z2KYXMfOdbzZnMmNSjnuq7wqceq5asn1US7EmZ18biL8nG5KwuJWpTjS0Dmj9ueRlmyRc4fcKPV+ViOcf/Ghb62fL2uvORLr9naOmdPo13/07xdB6nN7rf3W47M/ejIG20rff1uL+XIdu2Tyy56xhZJtlR7knlSsHRd7vgY9P0N4rlQiYc/3+cy2kixzP5NKmjkBhXJS5oD2xsyURZFn4vCRXwY+Ys84X8Q40fIYOY/z7Jg9xcDS/ZpX97pnRjm1+6pn74vUmH22zKnvjxI/cyudFNnqvB3Jz9hzvDNlOfK5xFKy3VZ64XfrX2B+FmtGjauz2Hou9xjrUvqHlCdGfLdWv87MXT873rPXit3n7BnbTT3Wq+M9O+YM8SvkzvU5LkTJi7l287WasF0r09bkSWkaBH3xsCIC9+G8aj+bmNuZ+yBagskMZjnXtRc4lkxY3iPH5OWe79v6e5KmduLFmePtef2RHeVniXlrco4ltFr8ceZzWw1SGsOZm9iTV0/nc5Zn0tok0ZG4O9K5mVWrjRTOLHjZ+/fU449ghDq5tvC3xO5yI5yzZ0b9XhHsaTOU3k1877Frfd7a5+Z4T4+xO2KC/JnFaUdet3Xdarcxety5n2057tUzvyh+5j0lRCkH5fX4bKSOVwvgSs3rt3rel7TWls51vBLHzjHOd+S9OdpeOXMDcn1ezrqTsx60qFPVk+tzrGIsPcBIGa5Be64By5K3EQEwK/Hwu63O1Z42uwGwMs6sVk95b8TJGXW0nT0DLq0GGlvdF+7HPHIsHCqRsN+LnM9ez3EgmhIJIL3FedLkuP5bCc+5lLgX9yRYqQPt7Z0sd63oWetE4BybPLRKDm8p9Rm4tnColdrXrfX3Xks+W3st7fTc1hzdkfFuY2dluH955Uzi8ZnP66Guj15vUvrNR9qyqeXIsaCzpZTxs5ILp1vWrcv1uv/DL5fLv5dl+b1ccQD+9Lfr9fpr60KUJKYCFYmpAPmIqQD5iKkA+YipAHkNHVfFVKCyoWPqsoirQFViKkA+L2NqUnI9AAAAAAAAAAAAAACM6E3rAgAAAAAAAAAAAAAAQGuS6wEAAAAAAAAAAAAAmJ7kegAAAAAAAAAAAAAApie5HgAAAAAAAAAAAACA6UmuBwAAAAAAAAAAAABgepLrAQAAAAAAAAAAAACYnuR6AAAAAAAAAAAAAACm9zblxb/88sv1/fv3hYoC8/nff3354b//8vd/bL527TUlpJQxpy9fvvzner3+WuXDGhFT63i8h5elfj1iDK3icA5iKkA+Yio896zdfdNj+4k6xFS29NwPg9rEVIC8Ro+rYup4Ws3pwh6jx9RlKRNX1WvgGTEVmNF9uyhnm2gtpiYl179//375/PlznlIBy9ePlx/++8On1/Xr9tq115SQUsacLpfL71U+qCExtY7He3hZ6tcjxtAqDucgpgLkI6bCc8/a3Tc9tp+oQ0xlS8/9MKhNTAXIa/S4KqaOp9WcLuwxekxdljJxVb2GMu7r1odP14YlOUZMBWb0Y+zOFx/WYuqbbJ8CAAAAAAAAAAAAAACdklwPAAAAAAAAAAAAAMD03rYuAACU8PgzeQAAAAAAAAAAAABr7FwPAAAAAAAAAAAAAMD07FwPAAAAAEAYfo0OAAAAAABoRXI9AAAAAAAAAAAAMCSbOQCQ4k3rAgAAAAAAAAAAAADxfP14kZwOwFQk12emMQEAAAAAAAAAAAAA0B/J9QAAAAAAAAAAAAAATE9yPQTilw8AAAAAAAAAAIBo5DUBMIu3rQsAABCZwQEAAAAASHMbU/vw6dq4JAAAAACQxs71AAAAAAAAAAAAAABMT3I9AAAAAAAAAAAAAADTk1wPAAAAAAAAAAAAAMD0JNcDAAAAAABhff14Wb5+vLQuBgAAAAAAE5BcDwAAAAAAAAAAAABAWLU2YpFcDwAAAAAAAAAAAADA9N62LsAo/CQtAMzh9sz/8OnauCQAAAAwNuPuAAAAAADUJrkegnucQJLUCQAAAAAAAEBr5q4BAIARvWldAAAAAAAAeOXrx4sdzNnkPgEAACAafVUA6JOd6wEAAAA4xMQQAAAAzMd4AAAAMDI71wNJrKoFeiFeAQAAAAAAAAAAkMLO9QAAAAAAAAAAnbHJEAAAMKqW/R3J9QBQwP3D/cOna8OSzMdAMgAAAAAAMLPbXIk5KgAAgHSS6yEgiaEAAAAAAOkkkgEAAAAAcMab1gUAAAAAAAAAIKavHy82hoIBqdsAAADP2bkeCrsfkLjtlmSQAvqQa6czO6YBAAAAANC7Z3NeQGzmqGAcnsO0UCO/yb0NQESS6wvRSaV3FgDQG3EXgNl5FgLRiVMAAGNYS355nFvQBgQAAACgN5LrCzNoyD0J6xCD2AwAAAAAAAAA5CAHIY8ez2OPZQZgm+R6AIZiEQsAAAAAAAD8zDwaxKee9sX1KqNWwnrOz5FkDzAWyfUA8EAHGAAAAOrTHwcAAGBW+sRjcT3jcC0AOKLr5HorvuCcZw1I9QnolU4xMCvxD4hOnAIAAIC29M0B2uopx80zAwA6T64HAIBI7gebehgcAwAAAACgL5IeAZidzUQhXU+LfCCCYZPrBQNa6X0wo/fyAwDMTl8IiE6cAiAn45lQT636pr0IEItNZaAsfRq2iMP1PNbHtfOt7hJZrrihf87Mhk2uBwBYFoMN5KXzCADfmDgAoAV9fACA/Ix7A1DSq+dM7jFmzzMwdwM5DZdcHzVAGPQHOE4nCGjtSBtT7AIAgG1Rx3OpS/8JeEZsqM85h5hq1U0xAPrxqi99q7/qcztb4xwz548duS9rPwO3Pn/POJb6BzCG4ZLrgTo0Bmnh2X1nEh4gjWc4wDfiYXuuAcxNf358kSfNgfxyxHXPhnace+hDhLoaoQzAa+poHbXOc+TPOdN/j/y9ahwLasvZXzdmx0yGSK73AKtPwPzZrPfhzKtqKS9KvUq5z6OUmedyPr88C7kXse73cI/2UMbWnCMoT58GoB/aRrGV6HMDYxPX4xOPoa1WdVDdByCqlJ3jYST6z1DfEMn1QBoNSXrnHgZ6UrujuzdGSiaNzQ4CUI625DFiCszpMWae+Xl5cWQej/dNq2vvnoM6oravxYDynGPgnpgAaaK2oVjnugFRpcSnPe028S6uV2P25Ndlcr3KG4dOMswtd2Km+M4ej8+e2j9TB72KFGNrl2XEOh/pegLjehZrxB/g3lo769W/iSPHRJ00aXk9UxcWRzlnMLsjbcxn/763To+yuYBYBgAcoQ3Bmp7GaHoqK/Si1HhjiV+3zJ2TFuW56Dn9WsovlZQ6f10m16dwAwLkp+NyTNSJ8F6VvA9zr+olth6Sfs7cZ6W+x9Z5S1kA8+o9uetVz/W157IDbBHjIIYcP6sdeVFOT7Gmp7Ke0WrR7bKMf24hotJ1fpbYWUuJ63VmkQSM7FkbJUobGoBvas+15X5PSXs2XphVtGs1Ouf7vDPz+nteu/b3kptszh6LZlCq/g+fXF9aq91yW/+U7p6/5yxb6e+bEqA9hF/TUOGoERoydk/nGdc4tsd629Oiityf/+q7p3Q8z5zPPcdITbyvNWl/s+dn8/ZcryMJa3uPKRbBtpL1RV0E9krZDX6rHVerv+2XifJIaVOXOAdn2t8px4903XJshFBrsTBzat0+jTxuO+ukecQYE7FM0IPR49URFuFAOaMsNi61GVXrc1Lie7X+TjC7MwtP1sZ2o/S/juRWnHltyvk8Mt4RJQd3778/e23pvNqblF+x3TrWs/dE6ieFTK4vOTGQY3A8kj0Taqk/jflsVVCOsqX++9p79oh4vWYRuc6MotYE6tprUssU8b44svIx4veYQaTG0ysp9WPP93GPjedIB20ruSbCrm+t6uer81mqI5/zWJFi2tZ5PNNWX+tX7Nmh4NXxJS31r+dr13qhe63PjRSnbmovuq9t72B6yrFGPVczSVnYmPrvM9iaiFmW7XZFSt8tpd9XYvHDmX7m2kRdyvF7suf+WJa0sfI9i4Uf/00sbatG4nrp4z+LJ6kTmb0nWp3pj0f5vqPF2Ee5v1/U68iYSizES/m8Hu1JfOpxE0IYWY75qyM5SynJ7jlyl86+poacc02txpTFZ1rbGqMrnXCdY0yt13nnVL2fmyOLm/aOSeZWYhw61y+WRL6HL9fr/iDw22+/XT9//lywON/sTbw4IvfqxTP2NiDPJru33tXzsRxnHlo5Pj/X8aOsmtlTjtZlPVLvLpfLl+v1+luB4oRxJKbmTLhIPfbIjkxql6xXuZ5VWxO3a+/JOYiS8p5WWsfJNTmSSMXU56Jc54iJ64yvxm62uRbt5vi8nIO5Yuq6IwMqKYsqzsjR/9vTX8+ZmLl17LXjr5UjRzJpCWd2cHkmxzXZI+cA6h45xnlqt/tfEVOf0waE+eRo64ipzz1rD6Q+y3IlCG3J1U8701ao0VeMqNUCmNznObW8teY/j7S/z4zVPzuGMdWflZr3b5W8lGuDiNTXpvTXo/S9e1Oi/1r6vnl8T+uF/Lnnj8XU51Lj6owxYNa2ZmvmIWMTU5/raUxVG29MOWJn7bly8sfUajvXb0001rqBIq8Mr70yJeL367Ex3bqsrT+fWI4MFruHzq2cq72zVY5VmGvH2PuePY3Anu6t1gOca3o6jxyzZ6Ifcqtxj0Xpb9z/W8Q4P4rH83/m+j97795reDZ5IqVMr/6eY1eGHO2rI22+1kr1Z0q091M+N/dYR47j5mzDi7EA+ZRqy5D3eVlKqbZCyvGjthNb2TNOG2m+MVq7rFa9i/a9Z1WiH5uS0LLnvSX72mJsOanzVinjIbnHr7Ze+6yMNTZKPPI8c79Sgvuqjd5zsiA69YlX3Bv9S9q5/nK5/HtZlt/LFQfgT3+7Xq+/ti5ESWIqUJGYCpCPmAqQj5gKkI+YCpDX0HFVTAUqGzqmLou4ClQlpgLk8zKmJiXXAwAAAAAAAAAAAADAiN60LgAAAAAAAAAAAAAAALQmuR4AAAAAAAAAAAAAgOlJrgcAAAAA+P/s3bu2G7kVKNqihpKbqxMn3sFNHbU/xH+koT/yh2hHTk/SiRM7PyFP0IPWFkWygCo8FoA5o+4tPsCqwio8FlAAAAAAAAAsT3I9AAAAAAAAAAAAAADLk1wPAAAAAAAAAAAAAMDyJNcDAAAAAAAAAAAAALA8yfUAAAAAAAAAAAAAACzvc86Lv3z5cn17e6tUlHX83//zvm3btv1////vnUtCb7dr4eZ2TXz8+6O/ffz7rN7f3/97vV5/612OmsRUoBUxFaAcMRUeW63PShliKrmMq8JzYipAWbPHVTF1HdrQRDB7TN02cZVj7sdUb8RsXhFTAcp5FVOzkuvf3t6279+/lynVwv71j8u2bdv2t386lqu7XQs3t2vi498f/e3j32d1uVz+6F2G2sRUoBUxFaAcMRUeW63PShliKrmMq8JzYipAWbPHVTF1HT/6638mcP7tn9d+hWFZs8fUbRNXOeZ+TPXGuAeviKkA5byKqZ9aFgQAAAAAAAAAAAAAACLK2rkeAAAAAPb8/EQ2u+IBAAAAAAAAY7BzPQAAAAAAAAAAAAAAy5NcDwAAAAAAAAAAAADA8iTXAwAAAAAAAAAAAACwvM+9CwAAAAAAAAAAQBn/+seldxEAAACGZed6AAAAAAAAAAAAAACWZ+d6AAAAAAAAAIDJfdzR/m//vHYsCQAAQFx2rgcAAAAAAAAAAAAAYHmS62Eh//rH5afdCIDxqdcAAAAAAAAAAABQhuR6AAAAAAAAAAAAAACW97l3AYAf7D4N+W715m//vHYuCQAAAAAAAAC0Ya4cAKAOO9cDAAAAAAAAAAAAALA8yfWwoH/942KXfAAAAAAAAAAAAAD44HPvAsCKJLYDAAAAAJx3G2v92z+vnUsCAAAAAMAMJNdDcBLxgUfEBgAAAAAAAAAAACjrU+8CAAAAAAAAAAAAwOr+9Y+LzfYAoDM71zei0QMAAAAAAMBMbvNff/vntXNJAAAAAKAMO9cDAAAAAAAAAAAAALA8O9d3ZDcPAAAAAIDXPBUUAAAAAABoxc71AAAAE/vXPy4S0gAAAACAnxg3hHk8q8/qOaRRVwC4Z+d6AKAIT2QBAAAAgDUZGwQAgH0SuAFgDJLrAZiCyRtG4noFAAA4Tp+KV1wfAADA6iRwAwAjijS2K7keBhUpkEBrBgOYhVgOAKxAmwcAAAAAyjFfDgBQ16feBQAAAAAAAAAAAAAAgN7sXA+T+bhC2a6AQAt2RgAAAAAAAJiT+WcAAGA1kusBAAAAOMRCSwCicE8CAAAAgPHdxvks7KQnyfUAAEBIdkQCAACekUwPANCeRCeAdsRcAOhHcj0ATEACKgAAAMAPkhAAAACIwgJxAHgu4n1Scj0AUzORymhcswAAAAAwFmN6AEAEERPT9mhHAXAz4n2MeUmuB4CBaEiOLef8GUgCAAAoz5PfAAAAgFZqze+bS4b5qNcQi+R6AKbyrLFp8rwfHQCAPizIAgB4TX8VgNKMQwO9aNsCrGkv/mufQnxH5nS1/aA+yfUAABl0UoBRGUAFAACgN33TY2wqAwAAAKwiQm6W5HpoyO6h0I76to4IDaqzXK8AwApmaLcBAEAExhOBZ0rGB7EGqEmMIQLXIbMw/wLlSa6HQiLepCKWCZiDx1IBrYkh6QwEAgAwK21dGM+requvDxCDeAzzG+FpNyOUMYJn7ev7vz86huI9zGf2sTJxi54k10NlrW5is98sAUZ2JkbrLAAAALA6Y58AAD9EaBuZu4D2ItT9XsScfCnXi+P6K8eE0bmGoRzJ9YEIbnOJ1LHZW7nqmgNSRYpt91rHNDEUAOAY7SgAgHlFHj8cUc7x1M4GgDloT/0Q5Vgc2RW+ZNmjHIdc2qfw2pG6PWo82DPr72JskusDGCk4C1qluQAAIABJREFURG749CrbSOcPGNdIsaZVPE49JrUfIZgymAL87Fn9VX/2PTp2jhsAcMYI430A9CUejynyPR4AWFfOjupnPn+vDZQyh7y3keWj947Qdq5ZxhF+P9T0LH9klrqhn0lpkeuG5PpNpU8R+SKOXDagjNpx2n3guYgxNmKZgF8dia3q9zmOHwAwi5KLqfX5AVideyGQ68wuqmINjGNvp/VX9bnX5mMlYs2jGHfmc83NjMc5o6VSu9P32my45veqi7/Spo5l6OT6iBdTiUof8Xc9Y7f4X7UuW8lrbtvGuO7IM1JMuXd/fZeuX9FiSbTynNX7EValB0aOfG/J7xm5LvPYq3N6ZFeNm/tB0NmumVl/F3CO2ACQr9cYVs7k/JnPrz2mQBsjnrcIE6BQSq86qH3/XImdXh1f4Jne8zqwulb1acSclmefWXqMQUz71UxPo3Z+qan29ZX7+aXyVkouPpptF3+OG+UaGCq5vsTkSsprnj2y51XiUw05CVd7k0fPPufV9+a85szjkmo1dnPOI4wup/OYUgfOrFIfQcrj27btXOOw5zGKUIZXai/oqfWYwFEad7RRo57lLAh5dT0+a6fVfvoHdeWcc4A9JfrNI20uMFt/hvWU7kO1nqwfYYwuYplWNfu5GKleQEur1I3evyfi+EHvY8IxNu3qJ2I9vqdew3hS5s73EiJ7L8rknCOxOyVP7cznj2DW38W8SibKv5p3EZv/pN9UVo8NTYZIri+ZYN26HLW/N/IOTKllqX3h1zomkY51SSXqjgZkPTnXXW4C+aukzmd/n/0cj56QOsJ56n1vTdnRsPRjBYnnTCLhmcGmZ/+f894cvWKCehBbzevCgMFachYDRe7vlUzCjtYWO9Le/yj6jiKjxxwLAHik5CKWs6+t2S+qHcuPvLfGhiZnpd5XcuJhyiRYicm21PKkfMYRvRZzvfq3qPfTGUVrk/HakWStvT5I6XNfMonIRh/AvdXvW6v/fohM22Qts5zvGr9jlmPDz2Zf8N1ifDblM0bMdehltDmvmmMxPRdvVU+uP1Ipcn9szqD12c8bWeogXqnvifoZOatrV7YX9HJuiiME+Vm0jnmlYvyM10rEhk7OxA+soGRyQ61EpJTPP/pZo8fjyEmIZ8rWe9HRTekEutaLn1MTySJdN7Mo0U8404569d4zC6Jq9KNLJWgeSQQ9Imrb8UwfKHIMGKGM1JMzWBy1bqaIXPacvsLeOcnZtSknUTPlPTmL3/Y+4/77jpBEui/ieBJrGrFOnllQdmbDhSPf9+z/I2yIUHIRV+53E1+rMZ+ISiRc1Y5T0aQcm1Z9+iPnadZjTkzui4zsyP2t5+L3Gp8p/sZ0ZH5nlXg8wzVbeo6txGccGad9Vo5ZjD6fEXLn+tEO4mgc3x8ci3SOFaWUXhAVReTfVTKBeDa1V8/CtsW9hs4OAkX7XTllPjPZdWTBYe53tLD33ZEmBlsvHqSd2gt29xIHcwZyStT1EgNHOW3OkepBziBoyfN1JDGo9KBzyfM0Q/IF6VrXcdfXvpyE9dzPOPueGrFmxITKM3H/1XtGuueuLMLChdaJJEfanyPG99T+7dnXtBChHCUXceWMoZS8v4x4Hc+sVNJLL6l97Qj1N6pWbdyUBZxHYlyOZxsf3H9m6ST/I2NCJdvDABBB6pwQP8zWhk2d33/12pxx8CNtsCjJ5mfamkc2iKn9O2vV85DJ9QAQiYEjgD+N2sF+1nk782SeI98/2z2kxPUw67FhDL0TU1+9puRCnlFFjw+v+ghHJvhTvidXrcUD0c8NbYhXPDLS+d+L1aUSrIgpdSKz1lPI9l5b6ukOFipTQomxklKL8lMn9EdP5h5V735CrY0iohixzK1FuO+1XoxR47qovRCKH9RrImp1XeaMQd70TkRlHqXaDK7JPiK0+Uo40k+uMU51pP8c8XjWcrle0w/65XL5z7Ztf9QrDsD//PV6vf7WuxA1ialAQ2IqQDliKkA5YipAOWIqQFlTx1UxFWhs6pi6beIq0JSYClDO05ialVwPAAAAAAAAAAAAAAAz+tS7AAAAAAAAAAAAAAAA0JvkegAAAAAAAAAAAAAAlie5HgAAAAAAAAAAAACA5UmuBwAAAAAAAAAAAABgeZLrAQAAAAAAAAAAAABYnuR6AAAAAAAAAAAAAACWJ7keAAAAAAAAAAAAAIDlfc558ZcvX65vb2+VijK293+/b9u2bb//5ffOJWE2q15b7+/v/71er7/1LkdNYmocq9Yz1iGmApQjpkKaWxv7I+1t7ompAOWIqQBlzR5XxVSgpdlj6raJq9T1caz1NsZ6P/5q7LWMR+Pa2xbr+IqpAOW8iqlZyfVvb2/b9+/fy5RqMpdvl23btu37V8eHsm7X1vv2ZwPu+vXaszjNXC6XP3qXoTYxNY5V6xnrEFMByhFTIc2tjf2RMRPuiakA5YipAGXNHlfFVKCl2WPqtomr1PVxrPU2xno//mrstYxH49rbFuv4iqkA5byKqZ9aFgQAAAAAAAAAAAAAACKSXA8AAAAAAAAAAACdXL5dnu6cDgC0JbkeAAAAAAAAAAAAAIDlfe5dAKC+28rW69dr55IAAAAAAAAAUIJ5YIDx2a0eAOKRXA8AAAAAAABUI/kTAAAAgCM+LkRrNbb0qcm3wEIu3y5WlQIAAABAJuNqAAAAAABAb3auBwAAAAAAAAAAgCBsQAAA/di5HgAAAACAMOxgDwAAAAAA9CK5HhZiYhIAAAAAAAAAYD5yQgAAypBcDwAAAAAAAAAAAADA8j73LsBsbitAr1+vnUtCb64FAAAAAAAAAABqsls9AEBZkusBAAAAAAAAAAAAAAih5wJCyfUnWf0JAAAAAAAxecIoAAAAs5CnBgBtSK4HAAAAAAAAipP8AwAAAMBoPvUuAAAAAAAAAAAAAAAA9GbnegjITi4AAAAAAAAAAAB1ydOCn+vB9eu1Y0kgBsn1AAAAAADA1EwQAgAAAACQ4lPvAgDHXL5drJwEAAAAAACWZa4EAAAAgNLsXA8AAAAAAACwgNtiBE/xgHFZVATscb8fmzgPAP1JrgdgWTql1OAx8wDAyrSxAQAAAAAAgJF96l0AACAuj1UGAAAAAACIrcR8jjkhAACAP0muBwCoxEA0AAAAAAAAAADAOD73LgAAAACv3RbqXL9eO5cE4DixDAAAANrQBwcAIIUNI+ExyfVQ2ccbkMELAAAAAAAAAFqSbA8AAJBOcj0A3DHASGmuKaAU8QQAAAAASHW/E6mN4QAAAPZJrodCej0iRYIVUbgWAQAAAAAAYCy95rkBAACiklwPAAAswUIwAAAAgD/ZvRoAAADgMcn1AAAAAAAAwDDssgwAAABALZ96F4CxXL5dDFgCS1s1Dq76uwEAAAAAAFZiTghgPGI3jEe93ecY0ZOd6w9QYQGYnXtdHbfj6jHLAMBstB+Bo8QPgLV8jPvGyADK69W+Nv8BMambAMeJobA2yfUAAMDUJGwBxGJAGmhBrEE/ANYi7gPk014C6EscBoB8rcaAJNdDR0cqusY1AAAAUeijAgAAAAAwM4t55+Opaq+55kFyPQAcoiHJPYlljMaAAQA5tH+BUdz3zcQvAAA4JqUtbW4EAJid8UVYk+T6BGd2FxdUeaTVIIPBDOjnUf3rfU9wb4L5SJAHoDVtSqAlMYdaXFtQn/kJAID6tLmgLXOz1NBrnGqke8irsqqL1CK5niQjBdMRmcxhVKvEhtq/s3cMmLUD2Pu4ApSwyr0WACBFrX6e/iMAKzDGAJSg7QwAAKxAcn0Gg04A+wyqPdfq2Ox9j/tZWUeOp3pCDa6rdDnHynEFeEybEoimRFzS9nvOsQEAWJcxAIByxNRYnA8eabUBJxCb5HrIdH+DKzmhdObmaYILyqvVoK1RX0uVVaI4xHRfz0rHJ/UYAICRHGm/avPS2qxPCoQ9NcZUJR4Aq9KGBSCXewcAM4gwFiS5HhpqUekjBBZY2ex18FVnfLWOul0R6WH2GDObmnVcog4AgPZxD737sY/O+Qjt4d7HDQCYg/YvcJQ5hf5ax/BR+8/QQ5Q2VsTxo4hlglYk10OCKDfRUs4kx7ppws9K1ola9Wu13aIilw0+qvk0HADamH1SqtWjTx89mWXG4wnEo/84J+cVIJ+5H4hlhPbMszKKJwB/Eg/jGuE+C0C6WvdcyfUfvJrU5WcagT/McJ3M8BvgmUfxKnqyec4q8oj1N9o9onSSVsRjDvwqUl09EhcjlR/4lTpaX7Q25U3UcsEzsyxa6bW725ljNku8yDn2z16bMqZx/5qcxcitj/Us5xZGoN1dhuMIRGHDGWAF97FOWyyPPje1namTxlpjEjfmUmI8uhTJ9VubgOFxO0T06trfqxduTOyJNkAWsXF4pEwRf8czEeNE6vGLVOabiMeTslp1xkeKI7Xl1Ct1ENgjThzn3gRtlOynl0w+b+3M4HxOu7G22ved1LHBEp+V8tqUz4iyCOPMeI92BFFEjn97ajxptNTntRblnADpzrSFokmJx9pAzx0Zu75xPIFnVo0Xte437mOsxPX+g2OxjumS66NN7IzY0YUcr65xNxF6mDXuzp6IP4IREj+IqdTq99z3uA+3dbaunjlvNfpArh84buQ4PHLZYSatxzdzkl72/j57/DjbN79/YuqZtl8NPfufI/d9Ry47cxuhbVfzPhJh06te50BcIrrV2pCrE5POOfNUVHUrtrOL+ErMPUW7rlLabxHvIeLcn87kDj16b+7T8fbKkPLvLYnVvBJ5g7hW31c7T0Id7CtSPH6lenJ9jR2R7j8r5SZbYveY0vZ+z6iruCOXLVWE6wNgFiPeF3rtdkdbNa7NUjuaWeyZrkR/49G10OvpViPEn5pxPULyA9QWKcFmpPoVbeJs9F1MGUPtenv/+bO3GyPIPeZ2qYylRB25bweod0STek3Ofu2W/n0lngQwW6IEfDTDdZfTR9Qe+FXEa2CEdrZrZz212yhn3lv7qWrPPv/V/E7Oe5695mbWmN36PEb7LJhJ77mniG2lFL03wFvFqLF76J3rj+zAFFnqDlCP/u1IQ67EYzxTynbk+0forLLPTSSmlPpVY4HSq+sht86PENP5VU5iSIkJJzjr7DU14jV5ZreSe6/uHTUXHoyUnF5azi4eqcex1IBx6mB2zmfdvPp92qHtnenLpSx0eXZNnolbtdoZvSbLj+zMkfr3HvbKWGpnrxJ9kMhjGaXrJv1Eqp+PWHhS1tm2pnNwXuu2u/NXXu/J5UdKtF1f3dv3FvJEe2pGy+8r3Yb8+FklF+D0en/KZ5WqSyXHoJ4RR9uo2Q860r+tPU6U0zeMuPlfdBH6n2fGIVLnV0s8NSzHozZmat3VPm0jwrWfqsQ1WqM9+ujf98ZnjyyMml2LNtrqHK96Wo/PR43drcpVug/c4jjm5ODmvLeGlHms2jG7Vf8psubJ9W7E6XotHmg94Z/z2leDlDk7/5coE/RwJEGnRpLIGa2/j9hSz7Vrgppmvb5KDLbXerRi1AU0tb+j17VWauKlxOfWeM+ZgRDqezUwdmQiJuc9Jb6vhCPfWyJBZ9b7271a9bzkIoXS4xOpn1d6oHjvmhJruZeaEEo7Er1+5Ziso9Q5rbFguITS8y29RCpLqjP93DMLHkccY2jxec8+W1u1rFpjQiXnj3L6NLXHJnuNR4ysdDJ4r/5syrmvGZ9y6kHKfcZYaz/ixTnyE87Rb2ZUvfpQrcZEc+ZPWxyDSP2vkRdanJkjPZPbkfKeFfO9L9drxo++XP6zbdsf9YoD8D9/vV6vv/UuRE1iKtCQmApQjpgKUI6YClCOmApQ1tRxVUwFGps6pm6buAo0JaYClPM0pmYl1wMAAAAAAAAAAAAAwIw+9S4AAAAAAAAAAAAAAAD0JrkeAAAAAAAAAAAAAIDlSa4HAAAAAAAAAAAAAGB5kusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAAAAAJYnuR4AAAAAAAAAAAAAgOVJrgcAAAAAAAAAAAAAYHmS6wEAAAAAAAAAAAAAWN7nnBd/+fLl+vb2Vqko63j/9/u2bdv2+19+71wSertdCze3a+Lj3x/97ePfZ/X+/v7f6/X6W+9y1CSmjkkMZ0RiKkA5Yiqct1r/lufEVIByxFRaejSHAbOZPa6Kqeu574tvmxhOO7PH1G0rG1cf1ddtU2f5k7HVOHqdCzEVWEntPL1XMTUruf7t7W37/v17mVIt7PLtsm3btn3/6liu7nYt3NyuiY9/f/S3j3+f1eVy+aN3GWoTU8ckhjMiMRWgHDEVzlutf8tzYipAOWIqLT2aw4DZzB5XxdT13PfFt00Mp53ZY+q2lY2rj+rrtqmz/MnYahy9zoWYCqykdp7eq5ialVwPAAAAAAAAAAAA1PdswQUAUM+n3gUAAAAAAAAAAAAAAIDeJNcDwAGXbxcrxAEAAAAAAAAAAGAin3sXAAAAAAAAAAAAgMc+bvx2/XrtWBIAgPnZuR4AAAAAAAAAAAAAgOVJrgcAAAAAAAAAAAAAYHmS6wEAAAAAAAAAAAAAWJ7kegAAAAAAwrl8u2yXb5fexQAAAAAAABbyuXcBgHZuk5HXr9fOJQEAAAAAAKCXjwvYzBsBAAAA/CC5HgAAAAAAAAAAAACAriI80VZyPQQSISgAAAAAAKzEEz8BAAAAALj51LsAAAAAAAAAAAAAAADQm+R6WNDl28Uu+QAAAAAAAAAAAADwwefeBYAVSWwHAAAAAAAAAAAAgFgk10NwEvEBAAAAWInxMAAAAAAAoBfJ9QAAAABUJ1kWAAAAAAAAiE5yfSMmkAHmdIvv16/XziUBAAAAAAAAAAAAzvjUuwAAAAAAAAAAAAAAANCbnes7stsxAMzn49Nq3OMBAAAAAICI5CvAuNRfAIC6JNcDAAB0YDEOAAAAI/nYjwVgDGI3AABAvk+9CwAAAADAui7fLib7AQAGpS0HAAAAwGzsXA8AAAAAAAAAAAAAQCgfN3a4fr02+U7J9TCoW8BoFSxgZXZeAgAAAABgVuacAAAAAH741LsAAAAAAAAAAAAAAADQm53rYTI9HoEBAAAAAAAAAAAwq485WUAsnshGaZLrAQAAACjKwm8AAKIx0Q4AAMAefUdg2yTXAwBUo9MFAAAAAABEdr8LrzkNGI85SQCAsiTXAwAAAADQ3bNHa0sSoBaPcwcAAAAA4J7kegAAAAAAAAAAgIFYMAwAUIfkegAAAAAAYHmekgBrWL2uS8IDAIDyVu9nAMxGcj0AAAAAoZiIAAAAAAAAani06Nh8BIyl9lyi5HoAaEyi0Jzs+AQA8Jh2EgAArRh7BQBGZQwNIBb9yzE5b5QiuR4AAAAAAAAAAAAAgLBaLUiUXA+FpKx6ar3S2EosABibe/lzIx8bu88AMxPjAACIQLsUWE3J8dKRx14B4Az3wLXpR47JeaMWyfVQmQAOa4i4wCYaHVGoa5U6ViOWRjh2EcoAAAAAK9InBwAAAOAjyfVQSa9d6nP+zYAxlLdivcr9zR9j0krHCZ55VIdWX4wDwJrc/wAAOOpIW1L7E5iR2AZrW3Guegb3sdv5i8f9dR698vnUa6inVj2TXB/ASI2kyAG/V9k0oIBHSsWGyHH3XomyjvR7oSV1w2JBAIARpCymvm+/GVsDAAAAOMY8WR2OKzNyXTOCSPMFkus3gSNFpIsWoDb3hbLO7BrV6xw8KvNeYgjkur92VlyUAwDAHI48UbG2ZxuaeJoa23buutTngliMzQEAMJIjGxNQn34FpUW+psQYSDN0cn3kih45QJZkt/hfRS7bMyYV4bFej4N69W9R6mirJOCSu+Gf/ZwzUn/nq9fAttnlszTHDwCgnr221pmF2I8caSOXaA/O0IeLNuZQS+lrI+e4rXKMYXTqqmMA/CxnIyIAyjOP1V+tc6DdTUtiCXvkLD02VHL9mRvLmUSkV99bI/g821UptUxnXvvo+1Nek7Oycu91Z9+z91mzBQA3QEb1KG48i9Wv6u3IdftI2Vu959lnRND7nJf8/kfHtffvYwyR6uQZ0a73nE5jyXYqAM9Fu1cAcdVI5m8tYsw7MlYTTatzbzE0z4xYb+71qke9ytGLyWxgBDPc12AF6uoYSrZvnfNfPTu+H49Rzbw/4wN8pL8H4xkiuf5VIvfee+6D0ZldgaM8wjj133o7cjxzk5hSvrf2KsLZlEzC1Rhop/Qx730OI8bbaN9b4j21Fo3V+D2l7oVn7vVH2iNn9K6HUFpOO7xWjCvhTMw5sohVDIBxtbqXR2kzzNpHvolynFnTmYmXI++dvT7X8qwdV3q3z7025pHF+M/+P/XfnpWtt9bJwCnfq72/thIbSD0T4VoqOcfWO55E3Km59QYqNTf5gpGMcH1Ha79r7wA8Fi1eR5V67z3TZu81XsC4auVk3dNuojUbgr7WLLm+5sBf6eTzWW9urRYPnEk+rLEq89XfrRJ8LvV6ebWiU7Ctp9X1vdegy/nsV+9J/ZwzC6RKvWdGo8bAGtd2bZEThld05NieSZhpfd21Tuq8OfO7a7UFW5Sp1PdxnB0fiKpWPN7re7eqB2IclHdmrDPlyW+UlTJG8+zfnvUnjizKzHlvrSex9RaxTHuMTbXTur9Qa75lNZF+f+oC+ldzJjnzc6lx/sh4Vo6RFkXAWRES7VIXUEaIjyU2TNn77I+ff+S998SnfWI5PRnjL6PEuEDE/lOp10BtJfpfs47dlTT776vN8UtTPbn+TDKKk1iH4/qDY7Fv7xg5hm31SlAs8dmtB/Brff5MVv3d8MyRyYCR61FK+3uW5KzI963Uz0q5LnsvMKs98ZJzLCxMiq3k4qbSjiwyvv+3s9+R8t5WUhaPtXLmGjgTSy0iZzQjtdEYa+H3kc9vvdB3ZJHuuZxLRolQr1PLVjspe1Zn5kxqHM/Zz1GrRWPE0vq854wDn3lK0Jn3RK7rJcrWuv0421M5Soyb5Sz4HeGYjKbFvH7KeOarcbGcBYZHy7j3t1dmq9e1PTv3r85F6+MW+d4H21Z3oeH9d3x0/30lngwfOS7WmhuK/JtHNsI1laPZzvU53CABAOhlxd3lSk7ajPS7R1Jikq/EAPWjz0+ZeCm5u9asg0MrSI01r3Z6fPbe0olBe4OSJeJjTrJAie/LmUBrnRB0xJGFDr0TJl6V9chjjp99bk6C5rPvT/k+C5mAHqLchxhHTnJI70XWvRZSnlk4mvK56u16aiTd5Xyfdml9Eep1hMVMpHmVxJQyVtJ7YVLJGHOmr11qTNQ1TIojdfHIgoyS1+OZsd+z33dmXC+KEcoIe/b6IbX67a3bKiXmq1rp3Y4r8TmRNggrocRcaco4UuTrMsfles2YLLxc/rNt2x/1igPwP3+9Xq+/9S5ETWIq0JCYClCOmApQjpgKUI6YClDW1HFVTAUamzqmbpu4CjQlpgKU8zSmZiXXAwAAAAAAAAAAAADAjD71LgAAAAAAAAAAAAAAAPQmuR4AAAAAAAAAAAAAgOVJrgcAAAAAAAAAAAAAYHmS6wEAAAAAAAAAAAAAWJ7kegAAAAAAAAAAAAAAlie5HgAAAAAAAAAAAACA5UmuBwAAAAAAAAAAAABgeZLrAQAAAAAAAAAAAABY3uecF3/58uX69vZWqSgwp/d/v+++5ve//N6gJGN5f3//7/V6/a13OWoSU4FWxFSAcsRU+Nl9n1f/lhxiKkA5YirRvZor0YYkotnjqpgKtDR7TN22seLqXg6Ltlk/t3NzOwfa0DwipgIreXQvLHkPfBVTs5Lr397etu/fv5cpFSzi8u2y+5rvX9Wre5fL5Y/eZahNTAVaEVMByhFT4Wf3fV79W3KIqQDliKlE92quRBuSiGaPq2Iq0NLsMXXbxoqrezks2mb93M7N7RxoQ/OImAqs5NG9sOQ98FVM/VTsWwAAAAAAAAAAAAAGdfl2SdpMFYB5Sa6HBWj0AQAAAAAAAAAAAMBrkusBAAAAAAAAACZlMzYAAIB0n3sXAACi+zjYeP167VgSAAAAAAAAAAAAoBY71wMAAAAAAAAAAAAAsDzJ9QAAAAAAAAAAAAAALE9yPQAAAAAAAAAAAAAAy5NcDwFcvl22y7dL72IAAAAAAAAAAAAAwLI+9y4AAAAAAADk+rhZxfXrtWNJAAAAAACAWdi5HgAAAAAAAAAAAACA5UmuBwAAAAAAAAAAAABgeZ97FwBo5/aobI/JBgAAAAAAAFjLbb5428wZAwAAPCO5HgAAAAAAAAAAAACArj4uCu7lU+8CAAAAAAAAAAAAAABAb5LrAQAAAAAAAAAAAABYnuR6AAAAAAAAAAAAAEh0+XbZLt8uvYsBVPC5dwFWdAuo16/XziUBAAAAABiLCSsAAAAAAKAWyfUAkMECKQAAkNgKAAAAAFCDsVcA6E9yPQAAAAAAMAUbIwAA5NF+AuhLMj0AxPOpdwEAAAAAAAAAcl2+XSQjAQAAVRzpb+ijAMzBzvWNuGkCAEB5dlUCAAAAAAAAzpLfB8CNnesBAAAAAAAAAAAAAFieneuhEqsZgVXdxz+7SQMAAAAAALRnzhoAACCfnesBAAAAAAAAJnD5dpFMCwAA0NBI/bCRygo92bkeCnPzAZjbLc7bkR8AAAAAXjNnAgAAAEAprfK2JNcDAAAEZ2EPAAAA/CBpH6C8+9hqLBJgLs/a0OI9rMn8M7z2qXcBAICxeWQUAAAAAAAAwPjM/c7BeezPOQAYm53rYXBWkQG0oeMLAAAAAAAAwCjMcQPAMZLrAeAJHU0AAAAAgLpsIgQAwIrO5CM8a0PLcYA21DWoI6du1R5PklwPE3MjB4jBBCHUN2s9054DRjNrPAYAAIBVfRyj1N8HgMeezem5jwKMSXI9DCpKopVGIKwpSgyKQAIZAAAAAJRn3A2gL3NBsDa5IHWIrTG1Oi/6OADjkFwPhZRoaGlEAQAptBkAAAB+JkGrVWEfAAAgAElEQVQB5qE+A7RxJN4am4YxaV8BAOSRXF+ZBioA9ww8zsGgMwCwIuMcAAAAAACxGLc9xnED4BnJ9XBSlIaWhE2gtyjxsBdxGAAAAOLQTwdWcz8+Kw7C2lafswEAADhDcn1HBrV45uNgh+sDYFwGrynNNfXDqsdCHwIAAAB+pb8MAAA8oq8AEF/E/A/J9TCZnoFGg5TSUq4p1x2wMgvyAAAAgFVEnGgFAICeareRo+RjlCzHkWP26vv1U/goSp3JMWKZoQXJ9ZMR7ACoSccQoC7teQCAY7SjAGIpOY6Y81kj3Q9KlNV4LQCM7/5+PkI7BkbQauHBmfeq77Sk/0gvo8a8ZZPr7fLJWa1uOPfBxY0OHhvxRjximY8Y/XeKu0TgOkw3eswBiMq9CIhALAKIr0SCSclyRBwfkIQDzEA8ArZNLMgx+piGc/2n0c8j5zj/RLZyPnSte9QQyfW9H+0S+XtSvn+1ylJbr3Pb+5qCmZRY/a/zWEbr4xjlvEUpB/HNujMbv8pt62nvAwAAwBwejQns9fXNGQHP9J7LNlYJc9qLLWLA2CKfv/tr70xZtaE5yrUDaxoiub62yI2EEmb/ffdq/F43yV85JvMoVWdKPq6uRAepV9L2I6vE31St48ej73v2VJDWC/lWu0cD6VaNJTP9FlidRUAwjhHuv8ah4hLvIZ4R4np0tY7hmb5+yScCuDZgTr2T6gG2bZ226Ox94VJzVL3yPNybYAyzx1J+NVo7oXpy/bMbVokVZLUO8pmbO3GMVhlbspJzLSXO97P3HrkeHn1mahlTXleqTLnvLf3a1M+KsHigxGfsJbu3alSLcWuL1HZo/XjwSL+9lEdxo+bvPLLLXK0yjHgexV+iGLkelRC5Lq5+bqCFV/31myO76O4lBZaafD1j73dGaOutJnLcj1w21tX6qc2vYvfqXo1HnP08gEeixQltJYCfRYvTZz37PaX7CkeeljDbseYcCzV+GOF3jNSGjFbWEc7vvVHK3G3n+pIBrNSF2vukRUl4HnVVUI3z1/uagD0lFwOlJD7n2NtZ59Vu4qmf3fO1JaV875GJmGfJATkd216Joc/+/+Pfnh0Ti+NIdWTwZ3Y1nuKQsiAqZRFXjacS1X5aRa9raW/BUs+ypWq9OALgplWsEdPoocai6ZS+aupk6JH3pryn1ljr3mtaLxZ/pUZfP2Vc58hijMiejVmUaK9awBHLKvfpV3UwZZFRyr9FkNK/TBkzP7IBTdRjU2peYfY6ApFFjS97bAwDP+S0ISL1L1PltDUfvafFZmul5pRHjcmP1Bg7qm2m408Ze+M3vcoRPW6fNUKfsfR9psRYYK38phbX/avjOUts7pZcn6JWwnjue1pNqLb+3hQ1yzJCUOWHWYLe6HISQVOSlFtw7dTthJ5Jts9JfI3oTIJGNCkDTJHaB6tI6QyMPAmQkzBUekFs6/p7JIbuDe5GOY+vHFnYFvGJKKn3ryPnE7YtbTHfkc/rfd3l1O/a7aa9eptTtpQY0HvTgiPf2/t6STFSWVfw7JptvUPuSP2uR3pN+J7p5+3F91Lt/JrtxDPXWK0YVDoxnnhaJyK9mv/ofV2XWEA06nV/Zsw8NSF/JCm/IeX6TG2XaEeSqsTYa6l56L3ru5aUxNpRpIxJnvlcseWH2m0Mx7yflPHLkc9PTpzIXSz56jUpfYQR4y6sKrW+Rki2b5WHGdWZPN6bM33Vj/+2N2ZyZHOZEXNIUsaxXh2LKL+jtO7J9SUTds5+zt7np+zwW0OpJJEzA6klHQlcOZ+x99qzwXUVJSZhZwuYI3DtcsRs143fQw0lk5N6T8aWmEQ/8t6cDuer10RJ/i45ATSqnP5Fjev9TBIE5aVMNpc8D60mmfc+L2Vxa0oSVer3tEqWrWXvHlFqIVaLGJ2SkJpz3vZi6qsxqSPvuRl5AQmPRajr0USYMNv7t5oJsLN5NBeQes9oNb6fc82tdv56SEnU2Uu2KRU/cif6P+o9r8MPqx37M+3ulMUMOfOBuXWx9vzxyo4kMKa8tuSC7JTX3pcj5TNSXrN6stRNqzGanOvkTPJszhhoa0fG5PeMvKBjNdHmoFLUmHMr9X0RjxdQxqv4MWJ/oeaY1ralb0RXIg/07HvOqJETcGQsstbvTu0Dpbx3xbHqy/WacfFeLv/Ztu2PesUB+J+/Xq/X33oXoiYxFWhITAUoR0wFKEdMBShHTAUoa+q4KqYCjU0dU7dNXAWaElMBynkaU7OS6wEAAAAAAAAAAAAAYEafehcAAAAAAAAAAAAAAAB6k1wPAAAAAAAAAAAAAMDyJNcDAAAAAAAAAAAAALA8yfUAAAAAAAAAAAAAACxPcj0AAAAAAAAAAAAAAMuTXA8AAAAAAAAAAAAAwPIk1wMAAAAAAAAAAAAAsDzJ9QAAAAAAAAAAAAAALO9zzou/fPlyfXt7q1SUdbz/+/2n///9L793Kgkju7+OHhn52np/f//v9Xr9rXc5ahJT4xKnmY2YClCOmMrq9vqi2s7kEFPJdYtBYg38SkwFKGv2uCqmAi3NHlO3LU5cfTZ2px8dm/GOumbL/xBTgdE9aq/0is2vYmpWcv3b29v2/fv3MqVa2OXb5af///7VMSXf/XX0yMjX1uVy+aN3GWoTU+MSp5mNmApQjpjK6vb6otrO5BBTyXWLQWIN/EpMBShr9rgqpgItzR5Tty1OXH02dqcfHZvxjrpmy/8QU4HRPWqv9IrNr2Lqp5YFAQAAAAAAAAAAAACAiCTXAwAAAAAAAAAAAACwvM+9CwAAUTx7TB4AAAAAAAAAAAAwPzvXAwAAAAAAAAAAAACwPMn1AAAAAAAAAAAAAAAsT3I9AAAAAAAAAAAAAADLk1wPAAAAAAAAAAAAAMDyPvcuAAAAAAAAAAAAdV2+Xf7339ev144lAeBjTAYAYrFzPQAAAAAAAAAAAAAAy5NcDwAAAAAAAAAAAADA8iTXAwAAAAAAAMVcvl22y7dL72IAAAAAQLbPvQsAAAAAAAAAAAAAAMRyWzx//XrtXBJGNtomDHauBwAAAAAAAAAAAAAe8pQ6ViK5HgAAAAAAAAAAAACA5UmuBwAAAAAAhmTHLAAAAKLTdwWAsUiuBwAAAAAAAAAAAABgeZLrAQAAAAAAAAAAAABoKuITXj73LgAAAAAAAAAAAHVES1QB2voYA65frx1LAu249wFwhp3rAQAAAAAAAAAAAABYnp3rAQAAAAAIy05jAABQ3q2dbRdrAACAn9m5HgAAAAAAAAAAAACA5dm5HgAAYBB2kwJG8XGXaTELKE2biFdcHwAAAIxIfxYA4pBcDwAAAAAAAAAA0ElOYrUk7HF93JSE49QBAGqTXA8AAABAESaHAAAAAAAAgJFJrm/E5DI9WKkJAABACcY1AAAAAKAf43MAAO1IrofB6DABAPzKokIAAACAOh7NTRmDgXkYW4VY1EkAonOvYgWS66EjNxoAAAAAgPNsSgIx3NdF8yAA4xLDAQDWNvJ4m7bsmCKdN8n1AAAAAFQTaSAMgHmMPLkHo/tY/7TxAOah/w5Qnr4rAIxJcj0AsMuAKjAK8QoAANg2fQMAAACYnYW/ANQiuR6AX5h85BnXBgDAOkrvqqQtCQAAAAAAAEQnuT4Ak8u4BgAAAACgPjuaAQAAMILSG18AAJBOcj0Ay9sbmDDxDgAAAPOx4QUAAPxKQi9AX8YrgFGIV8xMcj0M4swghhsZAAAAAAAAAAAwI7lRwLZZKEo5kusLcYMmhyAOvGKn/DFpCwA1aT8CLYk5AETlHgV9taqDxtkAytF+AmAm7msA8cw6jiO5HoLTMIS1zdoAAQAgHslSAABEot3YnmMOAO3JCQEgGvcmSjpyPb0an2g1diG5vjKBBoCRuY8BxOQpJ0BJ2nwAROdeBWtQ1wEA8mg/QT5zbPCYewo5Wl8vr76vVrK95PrC7OgARHMmLtWMaTosPxw5zr3vN84flPeoM6B+AQCwMhM6AOMQs8f27Pw5r1BfrfkW9RdgfL1zAgAgx/19q0SfpGe/RnL9STqllOR6oiYdrx96LTi4r+NHkukBAKCUyG1M/RdoZ/b6NvvvA+jtTJtSjAaYl81kgNVFHnutySZ9sCZ1nx5q32sl1w/GQCMQyZHGkcmW544cm9mPyQjuz5tOAzfqZxurDk4C3KTebyLGy4hlgpX0emzrq3iVW6ZXCTuv+mqMY8TzJpEM6skZd1MX6zP2Besw7wHl9ezrnNkQbnW92j/iMFBT6XvSs8/rFb/0XTlKcv0DexU8JaCUSJAcceKA15xTSqlx4z97fZYsU05ZziQTlUz0PxLDa8WE3p36Vb6XNZW43lyzAH2Iv8CoTKDW5x5BK641ODZOa26lffxwzKG+2nNEtezFI/EDGNHegoMj+Qu1RF0cESn+RyoL1GKMichmicPLJdef2ami1Ukv8T0m3SjlzGoyN/L6It6Mnp33V2XNvVZKftZZdsKL85vFHFoqsSgy55p1fXOG3fqIpnd7rdZn1/w9K98HWv32lY8xcZUeIzzy2hKLSp/9vVZ988S8fK3OSU7fp9f3l/ieM+9Z7dpjLa2TjGYV8V51ZgOcSL8DItSvCGXoYdXfDYxLuyZNyU3LatvLc3n0G9y/6GHkvu+rHIu9HLNX/64OtjXyNZhr6OT6lMZKz52DWzpzwzaAvy/lGhnhuLV6OsIMdSqqkhPrJRJCe752772rXYeRfu+RsuTscNL7CS8lr9MR7h0rK9WOPLP7Wq+4H/kJFKnH5EhnPGInPFJ8h9JS6n7Jvm5JEdshsw/kH5ncKPk9EMWRBe01vq/kZ0dUol9bYjHtq3Ic6UfvvbZUX+HIworI10MJqcc6Yp+EvlrE4ZT2eES1NzroIfLxBs6brY7P9ntgZc/mkaK2mVqonUNR0gjna6+MPe8pR/rrqf8W+Zww3hhM7nhb5EVAj8p2JAcg972vPi/KsSGWoZPrX5m9M5cTGGskZdVSo8FxJJGx5KBsxGtxpGuCeuwUxCsjd/5zJutrx+wzSdXia30jxqkzyS61r++ca/bIwNQZZ+ri/WuO/M7a73n2GWe+p3Q5WifkiaExlaiLz157Jgb12kW3ltn7ajnJiK3bfvefO+s5oL5Sizxpq0Qbt/ZrSyxWr91vr+lI+3S0iVbS5LYHzyxayfmeV5+RU49zf09KO2o20dprvRYK1BorKtHuPjPGCzOIFqdKKdkuXc2s1wSxlOiT9uznpZZBfaKVUpsYUFbrXKlIfbaRlcx1PPL5H8/jkbLkXgdnxzFT35sTp1a8HqdLrl/tJNb4va1X25VKZjqygmm1XbdqWO33wkhGGhhIXRG+92+PXjf67lsjnD9i6bWILnJ9OiI1OSplkjelDZ0TB/e+74wj5Wi14DdHzgAIZdRYcJPzmhJJgttWJ1Gw9rGp8d7R1bxezpTjyEKOnCc7nHlvjiiTp7SVet5Xjj0jaD15WPr1JZ1ZgCUpbCyRzk+JfsqZ+RSLt36Vc6xa9BXOfPajzx/BXkyN0NejjMjnI+W661XmWReT7I29vho3rf1EuzNKxPW9e0XtZK5Ix5P+St+He49dHX3dKFod373vTXmt/jQ17I1flkisfvW6EvHqTN04Ml6gDqY7e6x6zfc5x+dcrtf0iv33v//9+v3797wvqNDhc9JjO7PSphc3jboONSAul/fr9fr3CsUJo0RMBdZxagJPTH1ITAW0Ux8TUyHPkTGFGcchxNTHxFQYS6T4nD3OLqY+VPtcRrpm7kUu24xSFt/3MsJiuNrXq7bqr0rH1Nb9ohH6YeJwf2eukxvn71di6mO5cdW1dYzYWkfOZnXOQVli6mMR+/9nnd35vCT1mFmVjqlZyfWXy+U/27b9kV0CgHx/vV6vv/UuRE1iKtCQmApQjpgKUI6YClCOmApQ1tRxVUwFGps6pm6buAo0JaYClPM0pmYl1wMAAAAAAAAAAAAAwIw+9S4AAAAAAAAAAAAAAAD0JrkeAAAAAAAAAAAAAIDlSa4HAAAAAAAAAAAAAGB5kusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAAAAAJYnuR4AAAAAAAAAAAAAgOVJrgcAAAAAAAAAAAAAYHmfc1785cuX69vbW6WiACW8//v9f//9+19+71iSc97f3/97vV5/612OmsTUsd3q2sj1jHWIqQDliKnw2Me+6D1t5v/H3r0cOY5cCwAFO8oBRfSEliof1L60IW2AYgwoQ8qXKiNmqZAiZALfYh4lNpsEkcDN/zkbabpIIEkkLvJzM8kjYipAHDEVINbocVVM7dso88HMY/SYuiziKoyihzwQMRUgzlpMTUquf319XT4+PmJKBWRx+v303///8Y9+79fT6fRH7TLkJqb27XKv9XyfMQ8xFSCOmAr3XfdFb2kz84iYChBHTAWINXpcFVP7Nsp8MPMYPaYui7gKo+ghD0RMBYizFlO/lCwIAAAAAAAAAAAAAAC0KGnnegCY3dqOnAAAAAAAAAAAR11yE87/OFcuCQDEuc69a/kZJ7keAAAAAAAAAKBhNoACAAAo40vtAgD5nH4/GWQBAAAAAKZhTBTG4X4GAAAAoAbJ9QAAAAAAAAAAAAAATE9yPQAAAAAAAAAAAAAA05NcDwAAAAAAAAAAAADA9F5qFwAAAAAAAAAAAACgtNPvp9pFAKAxdq4HAAAAAAAAAAAAAGB6dq4HAAAAAAAAAACAyuyiDgD12bk+wen3kwYMAAAAAAA0zng+jMP9DAAAAEBJdq4HAAAAAKA714mW53+cK5YEAAAAAAAYhZ3rAQAAAAAAAAAAAAAoouVfK5RcDwAAAAAAAAAwmJaTVQAAAFr1UrsAPfJzwwAAAAAAAABATZfcBXkLAAAAcexcDwAAAAAAAAAAAADA9CTXA8ABW35O009uAgAAAAAAAAAAQPsk1wMAAAAAAAAAAAAAMD3J9QAAAAAAAAAAAAAATE9yPQAAAAAAAAAAADC90++n5fT7qXYxAKjopXYBAAAAAAAAAJZlkcQCAAAAQFWS6wEAADp2STo4/+NcuSQAAADAiIw9QF0WHQEAAJQluR4AAKAzJtSAVohHAAAA0B79dQAAsFic/STXQ6JWA64BEgCAda224wAAAAAAAAAAaMOX2gUAgFmcfj9ZCAMAwHS0gwEAyEVbE2Ab8RIAAGA7O9cDAASwIzYAMBMT8gAAAAAAAMCIJNfDTjmTKK+TFCRpAgAAAMD/WOADAAAAAADkIrkertxOzI2S2G43ZYB+ieEAQEsktAIAwLxsDgUAADCWe/M+I/b39GdJJbke+MmoCwygNElH83CtAYAZaPMAAAAAAADQA/NaHPWldgGAPp1+P3kIAQAAAAAAAAAAADAMO9dDQySrA/DI5RnhF0UAAAB+pc8EAAAAjOg6l8i4BwCUIbkeAJ6w8KVNt9fFQAKwlcQrAAAAAAAAAADukVwPG0isfcwKWaAVkmUBAAAAAAAAAIgmRw7mIrl+gy2J1XbP5Yi1OhaZLCrxFPKzGKc9OjgAAPto2wIA0AvzH8DstsbBtTmTHLHUHA0AANAjyfUHPZpoNohHTyRMAD1pPWYZKAYAuM9YCQA5tT5eAAAwAn17AEZiLAGgnJSY20K/Q3I9LMcaSy3cyCWl/JLDLN8JpMp9j7gHoX/uYwBm4HkHAAAAsSISVvTXAQDmNnp7cPTPN5Ka10pyPXTmdkCkpSB/WzYPImZSe0Vzb6v7Sqh9TQByENuAETz7FcBlGb+tCkA5s4yDwAie9Xm1F4HR1Rr7S4m/AOQj3pbhe55D5HjQzHXGuBqltXS/Sa5naj0NFGxJPoAWaWjFGOl7zD0JthYXe/oexXeWpa86CwAAAMBYjFHC3KLnW4x398fCtnx8t9CHtWeX59rcWt4cd6tR+3ujfq6ejBIfJdfTpIgbrPRN+uxn80qW5Rk7XEMbSg88bvl1iSMdgGdl04AFauk5/mi3ATO4F+vENOCentt15KNewJzc+8AoRo1no36umRmryWeEBE2YmfjIPaPWi9GeWRaMlrGlb9Bi/0Fy/ZL3pnczpdmS+Hnvdfdes/Uc0VKueYtB4ZGeykq8I42JI8fgsZSGx7PvfMvOIxcRSf33/nakjHtELuIC+ucZBQAwp2f9Ou3Dx7Shgb3ubUhknA2YwW37abTYZ5MQiLcWN9w/5HQkJ6tFkc/c0Z7fMyjV7niW49jzPbQsMXV/tMR8fvUoV7BXxZPraweMHldBrDWQa3+fpWz5nK19FynJqjCCEet1qc/UWvxas2W3+z3f26P39PCdrBm9AwVreviZxJafXS2XDe4xIAbQvoj+ybOEoBbifyttzVGMlAQmEQXa03NMAdhq9FiX4/NptzG7LXOvW39RvNd7qOfyp4ydzPKMaDlHsPSxan8nMys1jvmoruxZtBK90CVH/euhjBHnj9wANcqeRXi5Nlgt8ZlrnLfazvVHJm32vLblBklKmUsk6bXcWd2zOKJ20L3Wcj1kHilJzM/qbFQSdeovT0Q/O1qxJXH9yHEjlV54MKrRVv2PJqpNtLWD0tKgzJ6Fjc8GCnqo20cWtR4dEIlMVtrSv8h5PVIWVrSYkEd+PcWFI2b5nLlFLMKsdS3UAaJsaR8c+aW523/fMj6Qq68a2VZ+1M5IOdbo9/Ge7yK3URffA20aPc7n1tr311p54JHR5z1SpIxDP2Nn7zR7xrvpw5GkzhbH62snKj573fVrt46dHL2/nr1/S+7ZkWTKHuJGK2VZK4e2a317EpFzluFaqV32cx9/ax7B9Wvv/e1aqUURke3Uo/bk7m29BlFaibvRsifXRyZmtjjYH2lP0uiWf9+6UjUlmT9FK9eilXJAhC0d29Q6v2fxSpRnjaK1juielZyPjLALG2n2XOuolZsRryVW9He/NWkpJf4eec/W8q29JuJ5c++9Wz5X6d1Xtra3ozrUpRdC5UhyT0m6ixxUzjEIzHFRbcutbb2U+HgkAfX2PNFx8dGxUn4FJCKZdBTP4lLNQdhWJiv3lEMMzS8ikbz0+e+9N+fmIHuMHgdrfb61hILcz6DWrumWz/2sLSEZjNattWtai/v3RIyZ70m0evSaUu3RPQlWudsjkX351p4H/OzofbTl9Xvfc0SLMa5nEfdxrlyH0iL66RF5J/TjSE5WynujN/q8tqXvmHvuYGtS5VqsaU3093nkWBHzgY/O11KMb7UuzGaE61AqbyG3HHPlPbbv7qk1X/Xo7y0sImhRtZ3raUdkQlTUcYH7IhPRelA64b+V77GVcnCf6zOOyM7ckV0wUxx5T86Bz6Pv7fm+6rnsy/K8bdHDwETv14B1pReepL43V3s1JVnkyATaqFIHYZclfbFR6eTnLRNOKZNSEX3Lnp4V1DHSGMaRSd+o8/awWGrPc3JEKc/tWb+jkkrdv0cmI3MvFt+TiPzsPSkJjLXr+Z5kn6PH2/ratWu19TquvWdrOba+JvK9W8fa9rx3TzI3x9XqS6TU+63nS2mD1Y5x9Cnqfnn2fFY/iZSzPuU6dq6FO63LXebc7cbUfkX0IhDmNMJYd8oilhGUGjetnZ9RUw91KPd3Lbm+kNyJVrmP9ywA93AzAQDk0lNbqKeyXtvaHp1lwKCUo8mcUMpo9XC0z5ND9IBZ7USJR8lTUYlQJSZAex8opg09tulSkmW3vnYtaXVWucbMn9U1u32OrbVJ1xTRbYWI90S8t7baZd+zqLZ2mXMZ9XONqES8iKoPpeMh7Sh9HXMuNFMngVl4blNTy3VJDuevWv3MPS3arX3+o3LNU53O54SfwTmd/rUsyx+hJQC472/n8/m32oXISUwFChJTAeKIqQBxxFSAOGIqQKyh46qYChQ2dExdFnEVKEpMBYjzMKYmJdcDAAAAAAAAAAAAAMCIvtQuAAAAAAAAAAAAAAAA1Ca5HgAAAAAAAAAAAACA6UmuBwAAAAAAAAAAAABgepLrAQAAAAAAAAAAAACYnuR6AAAAAAAAAAAAAACmJ7keAAAAAAAAAAAAAIDpSa4HAAAAAAAAAAAAAGB6Lykv/vr16/n19TVTUWAsn//8z7Isy/L3v/6lckn69Pn5+e/z+fxb7XLkJKa2w/3K6MRUgDhiKmxzaWNf097mlpjKrdvYIW7AdmIqQKzR46qYCpQ0ekxdFnGVY+6NpS6LcZEWtDhWJaYCxFmLqUnJ9a+vr8vHx0dMqWBwp7f3ZVmW5ePH98ol6dPpdPqjdhlyE1PbcblfP///v8/uWwYjpgLEEVNhm0sb+5r+MbfEVG7dxg5xA7YTUwFijR5XxVSgpNFj6rKIqxxzbyx1WYyLtKDFsSoxFSDOWkxNSq7nuctDVWImAAAAAAAAMzNvBgAAAMAR14udSo0xfSlyFgAAAAAAAAAAAAAAaJjkegAAAAAAAAAAAAAApie5HgAAAAAAAMjm9Pb+0094AwAAAECrXmoXAEZjcBgAAAAAAAAAAAAA+iO5PoiEagAAAAAAAAAAAACAfn2pXQAAAAAAAAAAAAAAAKjNzvUAAAAAAAAAAADQsNPb+0//ff7xvVJJAGBsdq4HAAAAAAAAAAAAAGB6kusBAAAAAAAAAAAAAJie5HoAAAAAAAAAgM6c3t6X09t77WIAAAAMRXI9AAAAAAAAAAAAAADTk1wPAAAAAAAAAAAAAMD0JNcDAAAAAAAAAAAAADA9yfUAAAAAAAAAAAAAAExPcj0AAAAA2Z3e3pfT23vtYgAAAAAAAAAdKjXf+JL9DADQKIk9AAAAAAAAAAAAwIWd6wEAAAAAAAAAAKARfgkUAOqRXA8AAAAAAAAA0CkJmAAAAHFeahcARnc9iHH+8b1iSQAAAAAAAAAAAACAR+xcDwAAAAAAAAAAAADA9CTXQ0F+jg8AAAAAAAAAAAAA2vRSuwAAAAAAAAAAAADAz9Y28bz87fzje6niAMAUJNcDAAAAEMKvtQEAAAAAPGcsFQDaJbk+ExD5K8oAACAASURBVCsDSRFRX9Q5AAAAAAAAAACAeNcLIuRnAYztS+0CAPuc3t6tYgUAAAAAAAAAgAbJ7QGAPkmuBwAAAACgOSagiaAeAQAAAACQ4qV2AWBGl8kcPxEEAAAAAAAAwFZRCwcfzVmbywYAAGYnuR6CtLL70XU5DHgAAAAAAAAAAAAA0JOaObmS63doJYkalkV9BAAAAAAAAOB/bueQbcoGAACw3ZfaBQAAAGDd6e3dokoAAAAAAIAOmecBSCd2UpOd6ztwHSCsKB/b5Vq7zlCXexGAVnlGASUZjwAAYC+T3wAAzOxRe1g7uQ+uEwCS66EijTEAAAB6YHEPAL0x9goAAAD/Y4z3OWMJAFxIrs+sh4ZJD2UEAAAAAAAAgNlEzuevJQ1KKAQAmJdfM4afSa6HzuwZ1LCAAgAAgJxMwAM5GdsCAIBtfe8jc8mP/l07HKB9YjYAI2lh3lFyPQBD04kEoDTPHmAGLQxqAQAAwMj0vQGgDM9caIvNh2mB5HqYiIcIADCzHttCBvMAACBGDz9t3UMZ4Sj1HAAAyrk3z9TjfBnAUcYjSCW5PsGRxJZ77312k5Zu4Gg8tSMqmEvGgvvcG3k9ep7kfs54jgEA5KctDUQTVwDmZTwPAIDRGOcARtBTf13cJRfJ9YPak8xPm3I8APY8AHt6aPKz0a/d1s83SmOqp+tZ6zvv6TsC6igVJ8QjgPtu24mXOGnXEOAZ7SsAAEaWc15llHkyAOLNNt7imQg/W7snHs3nlDZbnKIN0ybXtzBh66YHjrqNI9GdgNJxamujrFRnZ+08s8butTqx9brs+V5beG4/c++7aaWjAYynh7gIsJXJDGAvbSJapn4yi9obbFy4z4Be6RMDjKHHeH5b5tHz2Hq8RsDPRo9TpMXq3PVh2uT6a7PcdLmTcOnX2i8dHGlMz3Jv1fDouqS85/YaryUE7ylbRKw5Ut9yx7hnx99T71MS17d8N89ek/IrJ3vq3B576nKpcmy9prkWuaSWgzxyXg+JF/nY8WkMj5717hcYkzYQsKalNpg2SXtSxhZyXLc99bOlOk1+kWN2tZQae/Xru2Mx9gUA/Zq9rWWsEhjBSLH86LjESN8F+Uiub0DEIKTBd/ZI+VmXlL978OQTea+nJEunJHJvOV6qPavSaotYVBD12iOr+lr5PqM8qstHJt5zJ9OTX61f6Vi7zyLLVHrAL9dCvGefI9fnLHXvPzovv9rS5nh0vbRTYZsWY9CzeOz+BnqMBz2WuZZcY5GR/YijY2uMK8ccUEQ/uiURv4j56DV7EvTvybHBQsvX5KJUPerpO4FUtcYXI1kcA/27dx8/ikN7Nner9SxPiaVb4nCtzdZas6W+9PQ8yL1xYE/fBff1cC2PbEL26B44skFE7r5hrWPmGlPYc7zb40aMW7bynG75XrvWdHL9s6Cwp6EzygB3T2Ud3eiN5j18J/Nwrcc1wrU9soBo73FbOibPPUrQzTXpemQRUkTneO11ewYLnw2+5l5AumenvyPnPtL+TumEHxnE2HL8R+999j3e+4WbUh34yJitH8VRPU8gbNFDm6SHMkaIfO7sPQ59yLWw8Wh5rtUasM8x0R81tjx6LHv0vIxIDi6lhbpMrKj5pJyJkVHjBKn99LVfNK2dCBo9tpBrDGGviLGo6In+lGNsTcy79/dn9fTIL7bSj1LXskQiaMuxppRW7s2Uce8tz9PanyeCtm2bcifgrR3j2blTnsdb/r2VXwyredyeba0v98wSa1LmLGf5TmqImL+JzBeIGtvf85qSx2hx8X+P47Qp1z5yjj4qhteeP83Vdj+dz+fNL/727dv54+Mj7QTBk4HPPFudc6SB2srNVJKH+mMz1oe9dt3/p9Pn+Xz+lqE4zTgSU2upPZkCozjyywBi6n05Yura5HJtewZD9x436tgtqvVci06uTzl+5HlynDdX3d5ynq3E1G2iJ1G2JuntOd9aWffU2a3nSUliymWW+H4rJVEuYgA+5X5IuSY5x7yK1UExdZNc9SLHDrxblGqDHdmRLrJMKe2biEWSLUzYbv3+creLox3Z2OfRMSLvUTH1vhbrEvVFtqO2iBwDVKcfC59EHzyuRsfUlhOQbo+/Z0FIypi+ubTHIsZq1l6z9fyl5mYutowJ5RzLOFIHozZdGT2mLkt6XI2ODUfqdynRfV7ua/k7e5bTdy1y7KSUPW14MfW+Vvr/kbG1p0TvPVLu51LzwZGixjEj54a2xJYe6m6ututWazG1WHL9RU+BoofGZ26RK2FTGj4R9ebIe0YI6i3RGLyvlcZgipY7YjALMfW+HmMq5F7A4bn9nJh635FE0JbrmXuCFo1UL8XU+0q3U48kC/Zc//ZqLXFxS6J8qcmFPZPYEWXroR4eid2S64/R9ydK5H28JnISW13e7t53pq36q55iqnlartWOiymLW0etp2LqfbWT63twZMFy7XufvPbMl7Wcf3hkUd4WYup9PcWH0dsMezaw6uk7GP36PdPyM7lqcv3pdPrXsix/JJcAIN3fzufzb7ULkZOYChQkpgLEEVMB4oipAHHEVIBYQ8dVMRUobOiYuiziKlCUmAoQ52FMTUquBwAAAAAAAAAAAACAEX2pXQAAAAAAAAAAAAAAAKhNcj0AAAAAAAAAAAAAANOTXA8AAAAAAAAAAAAAwPQk1wMAAAAAAAAAAAAAMD3J9QAAAAAAAAAAAAAATE9yPQAAAAAAAAAAAAAA05NcDwAAAAAAAAAAAADA9F5SXvz169fz6+trpqIA/M/n5+e/z+fzb7XLkZOY2p7Pf/5nWZZl+ftf/1K5JBBLTAWII6bCNpe29TXtbG6JqQBxxFSAWKPHVTG1b/rc9Gb0mLos4ip5yF/gHjEVIM5aTE1Krn99fV0+Pj5iSgWw4nQ6/VG7DLmJqe05vb0vy7IsHz++Vy4JxBJTAeKIqbDNpW19TTubW2IqQBwxFSDW6HFVTO2bPje9GT2mLou4Sh7yF7hHTAWIsxZTv5QsCAAAAAAAAAAAAAAAtEhyPQAAAAAA1Z3e3u/uwgkAAAAAAFCK5HoAAAAAAAAAAAAAAKYnuR4AAAAAAAAAAAAAgOlJrgcAAAAAAAAAAAAAYHqS6wEAAAAAAAAAAAAAmJ7kegAAAAAAAAAAAAAApie5HgAAAAAAAAAAAACA6UmuBwAAAAAAAAAAAABgei+1CwAAAADAGE5v77WLAAAAAAAAyS7j2+cf3yuXBIDaJNcDAAAAANAME5kAAAAAf7re0MRYCQAzqTlXILkeGne765+GMgAAAAAAAAAAAADEk1wPAAAAAAAAAAAAAEBTavyKi+R6AKZ3+wsRAAAAAAAAAAAAwHy+1C4AAAAAAAAAAAAAAADUJrkeAAAAAAAAAAAAAIDpvdQuAAAAAAAAAAAAAEBpp7f32kUAoDF2rgcAAAAAAAAAAAAAYHp2roeKLisfzz++3/13AAAAABiZcTAAAAAAAKAldq4HAAAAILvT27skWgCASWkLAgAAANALyfUAAAAAAAAAAAAAAExPcj0A3LCLEgAAAAAAAACQm/wEAGiP5HoAAAAAAAAAACR5AgAA05NcDwAAAAAAAAAAAADA9CTXAwAAAAAAAAB06shu83aqBwAA+JnkegAAAAAAAACAwUicBwAASPdSuwDA8t8BjfOP75VLAgAAAAAAEENCJwAApNGGBoD6JNcDAAA0zmJMAAAAAGAriZkA7ROrAaBdX2oXANgn4if8/AwgAAAAAAAAAAAAAPxJcj10ToI8AAAAAAAAAJHMQwMAALN6qV0AoJzL4Mf5x/e7/37vbwAAtONRew4AAAAA4AiJ9AAAAH+SXA8Dk3wF+bi/ACjBhBYAMDN9bwAAyMfYI0C/jJkAQF6S6yGzlF3hDWBAm/y6AwDEMNgLAAAAAADwqy05Q/KKAKAMyfXQGQ1lOG5rYp/7DQAAAACAHljQDgAwH21AAMhDcj0MYq3BfJsgLGEY/rTnXnh2P+m0AgAAAAAA0BLJlwAAANtJrkdHesWe76Z24nrt80Or3Bv1ed4AAAAAAMRZG/c2HgvjMdcFAGVoSwO0q1SMllwPBRnwALa4FysuDQI75QMA0CL9XQAAaNPtpLNEIQAA+JNxbQAekVwPQTS4IF7KIH8rSedrifEp79n6mj3ny+3Idbuo/RkAanv2bGgx/q/RVoZx7bm/JfMAy6J9ADCr6/ivPViWZy/0K+X+da8DWxmjAwBa1UK/RnL9xCIqoMb2eCKvqfpBCS08TJ8pfS/Uuve2XouUxQQpn6HU5xbbqOFRvTMhTa/EUuhfD+1wAPLTJwEe0V6s58h338omNjCiVsZ4xWeAMc0273Lk80a1l2f5runLbLEAcpJcz38d2Wl4tMbD2ue7GOFz5mJQZk45Fmbs/fvW15T26Od3a5dj699qOJJkf8/WXxFIeRa28l3Rvy3tqYh6p+4CANAbfbXynn2P9/revnuAY2om2IrdUE7Er/+WdiReiDXQnlkW4umjxnq2SCz6e35U12rnWKS8Vt0DSNdSvC2WXD/6g2P0z3cR2UjJ/Z3tWf3vJ/WO8Z30JdfO4M861HvqyWh1q9Tn2XqN90yIl46Xub+zteOnLvboYdECP2txIHDPIqMc9WxtUVAL39NWJb6bFrRYpta0eL9Dy+7F/Z7GBYDycrcXtywWr6WVnUiPONI3XnttysT7qO01z7x5jHKtj9yLOSZB773uWbJNi7+IGSn6uffoeKPGZWjB2hjvqHqItz2UkXFFPHe39E33nPdZWyGyrKUc2bAt13l7kiv5cWu7NEXuXe5HuabEqh3jjpplfp36Wt5gssud61u60Z7tcH4kAbWWqMnzrY32UpNuqX+b3aPvppV6ynZHkt2fxQAdiT5EdkB7X4S0tUxROzaImW1LGQjc2m47ElNze9ZuTXnv9b/VHvSM2Elzz+KxI3IP2D5aFJGy+CelLudYiLVngFXMhTilJ/j3xCmgrpT2U8Si+2fnSDl/yvH2JMrvGYvMNbm7Z7H9ntfsPcbRPsnW7y1qUcajPl1Ee5j+jXK9o8bEjr730f0WPd/z6PhRbc+t/fM9Yxi1HBn7PBLLoWe179toLSe/PDvfnveULmNP3yvHpPTH9oyX10pEPnK+a0f6e8/aeNHf/Qhyfd4jOXV7zlG67fzs+LPVo9q2Xu/S8xAp41IR7YB7/72nT3r7t9y5Zqlxf+28e16booc56tQ6HZ3nFDE234LT+Xze/OJv376dPz4+0k4QMGHw7Iu710jakzCzR46LmquMtRO6Uhy5fj18vhGkTEbtmiA8nT7P5/O35Dd2ZE9MvXBPQN/2JKAcIabedyQ+tjaxeU9rZcyVMLRHjnbx2sAtMZ5dty2DYRGDHWJqXQajy2g5jrW6qKu145YQMvEvpt515Ls9Mmide4yh1tiksZPxk78jFhHkOP+e84qp63pop26xdcHy2vEjFg4dqaM9xY9c/fUj4y49fo9rjiRB5NgFMerYo8fVlmPqrRYXZqyNObU2LptLzjZYizkdtfpYR47R0hjG6DF1WdLjalR/obUYE51EtzXW5J6jiZjbLXWtIubjSs15lW4Xt9gOF1PvKz33v1XNWHOrpXrcs63zzxHPrGu5FxuVljqPnzsPJMVaTO1y5/pbazs6bP33e2pNOvS0ECCXZ9ev9oAJrkUtz1ZZr70W6Is427YeYmxrZdwywVRqUCvH8Vv7vke0dQeQPe/luMiJkFzlyL3TwpGkJc/77XInoW2NNYcTdRL6dlHnuHf8iAl/7da69oyB1ppIrPU8VkfnVbvOHX2vOpvPkU2aIvqvj9oBF1GT6TnmuHrsW+Uq82zf45ran2dLe0hMjTVzP/dZDL/+t1G/gxK23L8pz+3IMqWc71mbI+q8e+RI6CK/2s/cLUrdm1vicU49XIsjSn0+143e1KxD6m8eR+afc5wv13tzK/09llItub50As0etTu+h1b+Nvh9Rmpxh4JZjV7XeuE6QN9SEkI97xhBxEJYoD9Hks+fHevI+fccd8vr9kyURkhJoup5N709C40jFyenJJPUqgspx+/p2s/kXp3NuRBpxgX8o36uWz2MxR9R+/PUnkdg3Z5FuNFtvVRR5699b8AWe2Koul1PqYTglBiX+9fQPd/T5UpAetSWLd3WbaltvWeDgMixL1gTtcitlf5WxLOplBnHd2AULbUzSHck/q7NYaoH9ZzO5/P2F59O/1qW5Y98xQH4r7+dz+ffahciJzEVKEhMBYgjpgLEEVMB4oipALGGjqtiKlDY0DF1WcRVoCgxFSDOw5ialFwPAAAAAAAAAAAAAAAj+lK7AAAAAAAAAAAAAAAAUJvkegAAAAAAAAAAAAAApie5HgAAAAAAAAAAAACA6UmuBwAAAAAAAAAAAABgepLrAQAAAAAAAAAAAACYnuR6AAAAAAAAAAAAAACmJ7keAAAAAAAAAAAAAIDpvaS8+OvXr+fX19dMRQGiff7zPz/999//+pdKJUn3+fn57/P5/FvtcuQkprbncs/0dK/AFmIqQBwxFba57Y8ui3Y2vxJTuaVfDvuJqQCxRo+rYipQ0ugxdVnEVfK4N8b6iLGUeYipAHHWYmpScv3r6+vy8fERUyogu9Pb+0///fHje6WSpDudTn/ULkNuYmp7LvdMT/cKbCGmAsQRU2Gb2/7osmhn8ysxlVv65bCfmAoQa/S4KqYCJY0eU5dFXCWPe2OsjxhLmYeYChBnLaZ+KVkQAAAAAAAAAAAA4H9Ob+9JCfUAQD6S6wEAAAAAAAAAAAAAmJ7k+oOsGgQAAAAAiGPMFQAAAAAAqOWldgGAbS4Tiucf3yuXBMZjwh4AAAAAAAAAAACwcz0AAAAAAAAAAAAAANOTXA8AAAAAAABkc3p79wuiAAAAAHRBcj0AAAAAAAAAAAAAANOTXA8AAAAAAAAAAAAAwPQk1wMAAAAAAAAAAAAAMD3J9QAAAAAAAAAAAAAATE9yPQAAAAAAAAAAAAAA05NcDwAAAAAAAAAAAADA9CTXAwAAAAAAAAAAQIdOb+/L6e29djEAYBiS64NopAAAAAAAAAAAAAAA9OuldgGAci4LQM4/vlcuCQAAACOy8QAAAAAAAADQMzvXQ2f8SgIAAAAAAAAAAAAAxJNcD/xE8j4AAAAAAABA+8ztAgAAxHupXQAAAAAAAAAAAAAAALh2vaD4/ON7kXNKrgcAAAAAAAAAmMglQaVUcgoA2/hFEgD4U81nouR6AJiEQVIAAAAAAAAAaIdkegBoj+R6aJxGNHCUOAIAQG7anAAAANAnmzMBAAD87EvtAgBtOr29S44AAAAAAAAAAAAAYBp2rgck0QMANM7uUQAA+WlzAQAAAAAAkusBAAAAyE7SKtAL8Qogn+vNfsRZAAAAAFokub4hJm0AAAAAAAAAgBRyDQAAgFFcb85Qy5faBQAAAAAAAAAAAAAAgNrsXA/AtFpY5QYAAAAAAAAAAAC0wc71AHDj9PYu8R4AAAAAAAAAAAAmY+f6BkjgJJL6BAAwDm07AAAAAKCky5jk+cf3yiUBGJs5IABol+R6AAAAAAAAIJyEIYB+iNkAAEDrSi0GllwPrLIzAfw8mOheAAAAgDKMSwEAwDES5gEAiGK8lplIrgcAAAAAoFkmbQAAII2kegCWxUaCwD7GY0Fy/S46ogAAAAAAxxlrBQCANNrQADwiIRYAYkiuh4kZeIF19+4RnVEAAADg4nacwLgBAEAM7SoARiRPBwD6ILkeGrSnMa0BDtu5XwAAIIa2NcB9ksEAAAAAAKBPkusbZOKFFu2pl+oyI1O/AQAAYF5bFxfde52xBAAAAACgJffGMW2wRGkt1TnJ9dApib0AAAAAkI/xNwCA+q6TK7TLnotMRklpD2s7A7SlpeREAOjRtMn1uTrhOo1ctFwXjjSibz+XAS0AgHJabmNCSe6Fvrl+QAm3419rMefILvSpx7h+rTgIcJyYCmwlXpThe4Z07hsAgPZMm1yf25bG77MJFw3o+fS0ctRPwQAA7KOdD+n0NQBYlvh21AjPlz2LCB69xiYawFb34udt3NgSYyPjur52OnGfVkW30Uq0+dxPQKq1fAtxZEwtjEGoY0AU8YQ9eqs3kuuX/i4abbttEOceTGmhAQ4z8wwBYK8j7UQTdvAnbbG+rV0/1xaIFvFLjtFSYl3p8m9N2u+hXeqZQg576lWPdbHlMs86N7L2uWtfp5brC/NpKUbkWEjUgy1lFS+AGfQUuwFoT8rmKjWPuff8LfcJpkmub2mgs1bDyaBWjBIBC4hX6j4rFWsjfiEFYHa5J7Za6HsA5KKtCdS0ZXHOCEqPZWx5zZGd8feITCLtZdKGevaMt92+J+JeaSEZ8dnn3PKeI+e7uP1ej4qc33l0rLVY8+z8Ke9dK9Ozz5X7VwVqj3HUPj9ltZQD8Oz46iYAraidVAm0ZaTxVNalXOvSz4oW6+FwyfVHBiUf/S1iAOmIe4NpR3Y1iui4Pxow3nPcLe+tNchx+/eo8wBxnk1ilOoI7pmQODLoS6w9jcKIhmTLO02xzZHJ5d6vcWoMO5p8vtWW+ypH+3itLHuSASJe23sdoy+jLU6nLNcZ1qXcI0f6l7nbQs/Of+QcvTvSbnx0rOvjrb3myPG3vmbPrvel6keu++vZeXr+JYARPasH0XXpyHtS3vsophyJNaXjbktl3FNPjtStVr7rPeMsEedNObaY2oeo67GnruaU6z4epZ3bipTx054XFzGOI/lAufKAth6/1FzQFjnvSe2Mbba29UrndLhmPDLCwpO1ep6zjSku1hPx7M3d/+i1f3M6n8+bX/zt27fzx8dH2gkOJKsdSdThuT3XInKy4ch1y9XRvT2+uhVj1zU5nT7P5/O3DMVpxp6YmiJ1EntLw6r2KrTRd6SLirVb3x8d2/dci9qJtc8mGVOP/+y8e44RMbggpq47EuvW3pvzXtxzvoh2eK6YGzmINtJzIUrpAfhHx7x33C3t8NSd/nITU+9rJbk+uq9YW8tlLxVva3/2lq/BCMTUdbn6WDmTibXFWJNrzDVHYn7E+db6azkSQcXU++49y8UqHikdT3q3Na4f2ZQi6hoYU/1V1BxVjmdcT/3NGeNEjjZd7g329ii1qUxK4v/WY225RqUTW0ePqcuSHldzzwndvmetrkbMWx5ZEBctx321xQhtych8q3t/Sznv1viUMp+UWoajss2biKl3lZ5nPpKLdcSeHMdaeZDP2hv37t9ac9a15MpZzflMip6DOCKkfqzE1OLJ9RcpAykSnfuUEiBznHcLdaoMg5b3RQxcpnRSc9T3lIT8iE4V9ZWe1Ehp5JZqDNaur2LqfZHtVOB/Rl/oIKbeV6rvv/UY0UpPoqQcK+fgYZRa93bkAGqtRUe9yzKoLaauavFZWnoRJmwxQgLDPZLrf6XvD31qYdMc/f9f5YqpKc/l2m3LI31wz5dYLSbXX0SM86S8J/X8e4+753w2gVpXIrl+FDkS8mf+PkspnfP17PncwnxCiefM3fOKqXftWZBRy9YyttCX6kkrualb6mLP17HFz3Uop2Elpr7sPupBKasYe65MM7u9bqWuo13lGNme+yjnvbfl2I9eI7b3Kfq6lV49fIQ6C8xI7OOoLTvTla5nKZOekWWLaDvX7OfWjgd7Fu4/GnOK7lflWDDa0phGy/VyVLXvtzWuOy1q+Z4BQJzmsT27Huc4P30qtcFf5Hly1bnac8GQKqVePRuHUEfLMSf/p9bLR/lNgCPVyrUcRe3c1LXrN/rm4sN+rpSd60+n07+WZfkjX3EA/utv5/P5t9qFyElMBQoSUwHiiKkAccRUgDhiKkCsoeOqmAoUNnRMXRZxFShKTAWI8zCmJiXXAwAAAAAAAAAAAADAiL7ULgAAAAAAAAAAAAAAANQmuR4AAAAAAAAAAAAAgOlJrgcAAAAAAAAAAAAAYHqS6wEAAAAAAAAAAAAAmJ7kegAAAAAAAAAAAAAApie5HgAAAAAAAAAAAACA6UmuBwAAAAAAAAAAAABgei8pL/769ev59fU1U1GANZ///M+yLMvy97/+pXJJyvj8/Pz3+Xz+rXY5chJT2zPbfcY8xFSAOGIqbHNpW1/TzuaWmMot/XLYT0wFiDV6XBVTgZJGj6nLIq4C5YipAHHWYmpScv3r6+vy8fERUyoY3OntfVmWZTn/+B56vI+g47XudDr9UbsMuYmp7ZntPmMeYipAHDEVtrm0ra9pZ3NLTOWWfjnsJ6YCxBo9roqpQEmjx9RlEVdhNNE5X5HEVIA4azH1S8mCAAAAAAAAAAAAAABAiyTXAwAAAAAAANmc3t7v/roRAAAAALRGcj0AAAAAAAAAAAAAANOTXA8AAAAAAAAAAAAAwPQk1wMAAAAAAAAAAEBhp7f35fT2XrsYAMAVyfUAAAAAAAAAAAAAAExPcj0AAAAAAAAAAAAAANN7qV0AAAAAAAAAAAAAAAC4dnp7/+//P//4XuScdq4HAAAAAAAAAACASk5v7z8lDwIA9UiuBwAAAAAAAAAAAABgepLrAQAAAAAAAAAAAACY3kvtAgBpLj8Bdf7xvXJJYBx+Wg0AAAAAAAAAAACQXA8AAAAAQBUWvAMAAAAAAC2RXA/BTAgCAAAAwH5+uREAAAAAAKjlS+0CAAAAAAAAAAAAAABAbZLrAQAAAAAAAAA6dXp79wvrAAAAQV5qFwAAAAAAAAAYj0RPAACgF/ovAFzYuR4AAACAQ+yQBwAAAAAAAIzAzvUAAAAA7CKhHgAAAAAAABiJnesBAAAAAAAAAAAAAJienesBAAAAAAAAAACgEL8KCgDtsnM9AAAAAAAAAAAAwP87vb1bBAEwKTvXAwAAABDCRAMAAACUox8OAAAQT3I9NM6ACAAAAAAAAAAAAADkJ7keAAAAAAAAAAAAMrhsrHn+8b1ySQCgHzU3pv5S7cwAAAAATOP09u7X2QAAMkGwOAAAIABJREFUAAAAAICm2bkeAAAAAAAAyO56saVdOwEA4Fd2uQeA+iTXA8DkTGgB9MOAKlCbOAQAAAAAAACMTHI9ZCZpFQAAgNFc93UBAAAAAAAAciu1EZjkepjAbdKDJH8AAAAAAACAsdwmmqQknvi1OoD8bFrSFs8+AB75UrsAANCa09u7Ti0AAAAAAABcMYcGAADMQHI9dM4ABgAAAAAjM/4FAAAAAACU8lK7ADAKE3wAAAAAsM2WsTTjbQAA8KvcbenLe88/vu8+xr1yRBwPYCb3YrlYCgB/iuy33CO5HgaRO1gA45GkAMxKuwkgXY624+0xxWUAgDnppwMAMKrocVVtZwAoQ3I9FKSRCwDAHhZEAQAYWwMAgBqMTQLQsy3jSZ51ANySXA+d0rADADhGchZAHfqzwFFH2nHXMUg7EACAlkWOX64da08/PaJsxmcBSOXZAUApkusBAAAAACiipQU2JmQB4omtAPs9aivnSLKPfm3kewFGIA62q9aiMgD6IrkeDmqtQdxaeYC+6BQCo7jXJhLbANLoXwKtW4tT2n4AdW1pS2pvAgAAe5gHBHomN6sPkuthRa5AdtvIKx0oBWj4k8kbAAB6ct1+zdGfq91XzPX5an8uoI49428p8eLZmIKYA5BOuw2YUamd5FvQe/mBebXYTm2xTK149kswUcf23QO0IdczUXI9bKBxBGPZ2mnSIQUiiCVlbPmeR5q80T6F7cThdCPFS4CLtdh2+7faG2OsqV02z1UAgBj63gD0qNS4wJFNE0oxRjKeWtdUXcqjh++1hzKW1lI/SXI9JGrpBoaeaIS2QxzLay3hVX2ci3utjGeJUL0b7fNACzyPf9VirIm4Ti1+LmhBRHJ25A7vPYn+LCnXInJ3tSPXHOhH6XavOAEwp8j+u7EaoJatcUi8irHne2y5v6FejMc1Pab25iC37sWP0m3X1BgWXebb40Zfk1Hn9CTXQ0NaDBJw1Jaf3MrRkIpMtowu67NGRYvJ2bfnXfs+azeMS9nSIXh0vXTGGJF6nc7u8/CnXINsz9qD0XGrpzjYU99ztIkWaNGROLzWV+whHtaS4+fJjyx4WOvPRpyvFbnGdx65Pkdrk4q0qYf7qocyAnPqKT6N2met9bn2LFitNce25rZP1UNdJp5+Q3tSYluP8T1iEb7FVWnc5+VFjH3uee+e4+8Z33uUi3LtWW7SlrHBUm2VyI1htrzm2fe3JUcq5VqkHiNKxC+35hq7bvn5Kbl+EDM2OJ7paQK+9nnVm37kbES0tIPRkfu31M+PPWpAHdll7t7f90y4H2mw3b5nz7EiYlpUMsBWEddxS2M65e9i8zyirn8rz/Xcz5kc7aYWFwxFdLbXYlvO+pIrYfmidh2nrlqDec/Kce9vkWVZaye6J/4U1c9oZXGk68u1lAXYW57/OaT0Z3sU1a8u0ZaN2lxgz3ty9suPTAzWqp9HJ908A/pypF+55T5OmQjfOjm/ZWLz0X2U+x7aMpntHkkXPb/gGrBGn4YjjsSaXPOQuZXur/U8BzGKo3Outecuao+dRTgy5trSmEfpPInc7+nZbJ+3NVvGg+69bu21e86b85j3jhuRw7PnGHvmsm9tuQYp8zo57MkDyj0+u6Wub1kUcKQMe4/VW5w8nc/nzS/+9u3b+ePjI+0EAQ/xWZMpjlT80gmpWyp+6aSHlPP0duPWcCSReFfn/HT6PJ/P35Lf2JEjMfVizwRcSn1PmbQ/8mBOLce9MvGrnNeklJRVixF1vgdi6n17YuoeKfVvT3LII3vqd47B8ei438MiyIsjA6l7EoNKfd6t1+BomZ/1BSLuhxTaqetK9/1bv7/vSekDP3pvVAzsaaLniMjPGd2/ePZM3DLA+ez8a4PMPY+Tianb1LyPZ+lnESMy8WlLf2P0+pn8fYqpybbWFXMMfck1F9VqwljUJPqzOaCIxMyo5M614z2i//+rXOOpqeP30eeJcLS/XmucbxaRc18pz/hS8erWnjHYiPOmlGmL0WPqsqTH1ajr08JmI89sHdeLus+OzHuM5MgY6JGk4z3vTckJGI2Yel9EPtUIZr43OGaEfLE9omNqseT6i9wJNM86DJGJGPeOG3G+2pU6JTmspQ7ZRe3vj19pDN6XuzE48uBd1ApS2ndkIuhitDoipt4XGVN1Urln9Nhy0VOCUkRfS0y9r1RyfY/1KjLxOndyfYvfb4SIeDzLs37tc7aSFCamrmuhXs7SBiJG6s6F0ckko9VPyfW/ikoEjUzGG63ezSpiU4PcbfYensmRnzP68+n//0rC0j493IvUN3o7QUy9r1Zy/cWRMcham/20sFhkBrOMhfZKTL1PWxXYo2py/el0+teyLH8klwAg3d/O5/NvtQuRk5gKFCSmAsQRUwHiiKkAccRUgFhDx1UxFShs6Ji6LOIqUJSYChDnYUxNSq4HAAAAAAAAAAAAAIARfaldAAAAAAAAAAAAAAAAqE1yPQAAAAAAAAAAAAAA05NcDwAAAAAAAAAAAADA9CTXAwAAAAAAAAAAAAAwPcn1AAAAAAAAAAAAAABMT3I9AAAAAAAAAAAAAADTk1wPAAAAAAAAAAAAAMD0XlJe/PXr1/Pr62umogAXn//8zy//9ve//qVCSer5/Pz89/l8/q12OXISU4FSxFSAOGIqQBwxFSCOmEqrbuc7ZpvroF+jx1UxtW/XsVVcpQejx9RlEVfJSw4R18RUgDhrMTUpuf719XX5+PiIKRXw0Ont/Zd/+/jxvUJJ6jmdTn/ULkNuYipQipgKEEdMBYgjpgLEEVNp1e18x2xzHfRr9LgqpvbtOrZ+/v//nsVXGjZ6TF0WcZW85BBxTUwFiLMWU7+ULAgAAAAAAAAAAAAAALQoaed6AAAAAAAAAAAAIJ97O9YDAGXYuR4AAAAAAAAAgP9j796R3EiuBYBWM7gCBceSoY5oWx73ouA6ZLZNc9bRMXtpWrJpjCFLCm0Bz5gHCQSBQmblP/McS+KgqxL1ufm7mQCgkadff5NQDwCdsHM9AAAAAFldTgKd/v63hiUBAAAAABiHBHsAaM/O9QAAAAAAAAAAAAAALE9yPQAAAAAAAAAAAAAAy5NcDwAAAAAAAAAAAADA8iTXA7C8p19/255+/a11MQAAAAAAAAAAAICGJNcDAAAAAAAAAAAAALA8yfUAAAAAAAAAAAAAACxPcj0AAAAAAAAAAAAAAMv72LoAMLunX3/77/8+/f1vDUsCAAAAAAAAAAAAANxj53oAAAAAAAAAAAAAAJYnuR4G8fTrbz/sgg8AAAAAMzIOBgAAAAAAtCK5HgAAAAAAAAAAAAZgYwIAKOtj6wIAAAAAAAAAAAAAAMClywVlp7//rco57VwPAAAAQDF2UQIAAAAAAABGYed66IhkAwAAAEamXwsAAAAAAACMzM71AHCA3TcBAAAAAAAAAABgLpLrITMJtwAAAAAAAAAAAAAwHsn1AAAAAAAAAAAAAAAsT3I9AAAAAAAAAAAAAADL+9i6ADCLp19/a10EAAAAAAAAAABgAedcpdPf/9a4JAAwF8n1ACzLohgAAAAAAAAAoBV5CwDQH8n1UJEVo9A37ygAAAAAQDmXiUPGYQHyM9cFsCbxHwDyklwPAAAAAEBzdmoDAID7tJcBAIDV1VpQ9qHo0QGAoTz9+pvBWQAAAAAAAAAAAJZk53oAluDnhgEAAAAAAAAAAKB/LTeIlVwPhdj5GRiFeAUAAAAAAAAAAACS66GJcyKr3bOhvFuJ45LJARiN9iMAsCJtIIBxGYMFGI/2N8D4xHIAyOND6wLAyp5+/c0AMwAAAAAAAADZmIcGAAA4zs710AEDGzAuK78BqEm9A4xMDAMAAIAyzDcDcMlYLACkkVwPABFWGZzU2QYAAAAAAJjfKnNfAL0RfwGgX5LrYQGSZFmJ5x0AAPp2r81+OZmkPQ8AAAD56XsDAAA8JrkeFiLpmJWkrPJe5V0JuUarXAsAANIcaX/bmQkIpW8KMA5tPIA+xcRn7W+AdCEbjAAA/ZJcDwAAAAAAAAAwGUmcAGvziyUAcIzkegCGVmP3DAOPAAAAAAB52RkZAIDZ9JxboP0NAOEk1wMwhRKd1J47vilm/V4AAACMJ6aPej0JfGv3tevjmTAGAIDbzBcBrEmSPQC9C+mrlK7PJNdDotqDDhq53DL7czHCxHiP96BEmXr8ngAAlHevTV6qT6zdycpyPP+t3qFbMeFeGVLix62/lRgEAAAA9Mq4BTASczSMpNTzKrkeBhUSFDTO13Nrxzb6MXLjs3U88WwD94wcW/fM+r2Avh3ZPRroy/W7WbovNWLcOHJNYhYNjEzfG2i1yUnKefWfgRX00pYGIF7PMVxbGri0t6GJOEEpPW+4K7ke+IFKcSw9d8Qe2fvp9kfPX8/fO/c79Oh4MQttSuxgf+S4LSfr712L63/fe8bERwBgJPp4wNmjvnSpODFCH/7sXl9x729zJoDu/ffQ63ikPLFlGdXeIomYSZwSEz4zXm/GkStOt/qVX4CZaBMA0IL6B9Z0ZOOUkPHT2Bww6JXk+kIEhzGNeN9iEkKPHPfaSNdmZik7w6VMstaaaJ9hYuTIBHXI3xz97yWFJgfUduR6hpT1UdwNSYI48i6NWEexppQ2RI5kotxlau3I9xYvgG2La9f0TEzLw3UcU09JiiM/O7WuY0xfv2QfP+RvS9/Pe/3mmD7BWa2yhv57zDGPjA/49YB5HJlczv0rGaGbTBw5xq3PjKTEAqnR9bxT3D2z3xPWcaS9WIv3DMqp3fYfvc+fs62SEtvExbxG/6XAEdvQkKpVf7r0+zZSfO+xrKH3Z7S5y+rJ9SGJwLFJwpc3I2fyWsj5Yv927296euBnciTp8chxW2s9UUh/Hk0OxiR2x5zjUcJxb+/OSkpf+yOLfVIWGrSOQyUm4GkrZsI4ZQI6JD6GPt+5Bl9rDP7slTXH+5S7HR57vL1jpCzGuUfSDavqpR0wotHjhomKeHsJGq4f3JZjbGSEPmHtccSU8x6J/0fGJ1LkWMDPeHLOKeR+DkLfvZQ+9yxtiZSxybMRrkWOcdsciU+pxxAz+3FknG+EdyVEzPjeyL/SPIsRYzYclTI3n7JA+oiUBdglynFZltD2oRjep5R2yKPn0j2nNzHPZI78sJjzp4xDhNZfIYvGjszNH/mbWm3MHNf1yPmOPD+zxMyn0+kU/OHPnz+f3t/fj52o0QUrkVy/d/wc3zNHA3JvwcG988QMau0FiUfnSwkwRwbeUu7JbLuxXEuZYCq+a9TT07fT6fS56EkaOxJTZ3juIJcSdXAttX9BQky9Lecz09MCotBk/tjP3PocfTjy/D26xzHt4NK7LT6S0kcQU29L6fuXEtrPNEm6XqxOSWToQYn+eI76oBYx9bYe32Ptw3WNkPTYU38sp+ikVTH1piPzHq2TfG6J2X1+pnchpW8a8jc55NzsINf5ao151W6X1k7anj2u5o6pPc413lMrTs6UXN9TUlGMnONJPSUbj2j2mLpt8XH1yEYYRxY35XKkjPf+NiZ+pNQvI8XZ3rROFA0pQ662ZsrClNDzpXzPW8TU22Lv2eh1rhhXV0hubMpxj8zR5zjvnhGfsdwxtfjO9SNd5Jw7jZQSer5cK0RCd7MovSIlZLVTD427lcQE9dEbJECfRo7HtRvGlNfT/UpZxR3zGfpReneBR/89xzOVeyLAM9xerUUWeztKjNgPGWFiujcx8enIYGFKQnGpSc6cfe0jx6qd1ESf1LXrSNmhqJaeysKY9tqU21ZuAjXGo7mZVerhnuaKQs7b6xxirmPWqCOOzGXe+ttV3pEWSj7nPSRophihHRWqVJlj+pe1Y8ujzx5J6jwyjpryTIec98jzKabm96gdc+u+9BLTrv977H+7d+xS+UWUF9IGS2njpZRp1mRSjsnV1ixRH+/xjLZRqz1c6/72NJbRs6id65+env61bdvv5YoD8F9/OZ1Ov7QuREliKlCRmAqQj5gKkI+YCpCPmAqQ19RxVUwFKps6pm6buApUJaYC5HM3pkYl1wMAAAAAAAAAAAAAwIw+tC4AAAAAAAAAAAAAAAC0JrkeAAAAAAAAAAAAAIDlSa4HAAAAAAAAAAAAAGB5kusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAAAAAJYnuR4AAAAAAAAAAAAAgOVJrgcAAAAAAAAAAAAAYHmS6wEAAAAAAAAAAAAAWN7HmA9/+vTp9Pz8XKgowNl//vHPn/7tT3/9c4OStPPt27d/n06nX1qXoyQxtR/X79xq7xvzE1MB8hFTAfIRU7mmfw7HiakAec0eV8VUoKbZY+q2iaukuZUjtG3GRXrQ41iVmAqQz15MjUquf35+3t7f3/OUCrjr7eX1p3/78v61QUnaeXp6+r11GUoTU/tx/c6t9r4xPzEVIB8xFSAfMZVr+udwnJgKkNfscVVMBWqaPaZum7hKmls5QttmXKQHPY5ViakA+ezF1A81CwIAAAAAAAAAAAAAAD2SXA8AAABAMW8vr3d3XwIAAAAAAADoieR6AAAAAAAAAAAAAACWJ7keAAAAAAAAAAAAAIDlSa4HAAAAAAAAAAAAAGB5kusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAADo2NvL6/b28tq6GAAwPcn1AAAAAAAAAAAAMABJ9gBQ1sfWBQAAAABgLiZ2AAAAAAAAgBHZuR4AAAAAAAAAAAAAgOXZuR4Ku9yt78v3rw1LAgAAAAAAAAAAAADcY+d6AAAAAAAAAAAAAACWJ7keBvH28vrDLvgAAAAAAAAAAAAAQD6S6wEAAAAAAAAAAAAAWJ7kegAAAAAAAAAAAAAAlie5HgAAAAAAAABgMG8vr9vby2vrYgAAAEzlY+sCAP9j4AMAAAAAAAAAANZ2ziH68v1r45IAwHrsXA8AAAAAAAAAsBC73gMAANxm53rIzMpRAAAAAAAAAAAAAEhzuSi4Vl6unesBAAA6ZxcpAAAARqZfCwAAAMAo7FwPAAAAAIW12FUDAAAAHvHL7AAAAD+SXA+Z2HEFAAAA7jNZ/z+uBQAAAAAQYi8fyTgjAJTxoXUBAAAAOO7t5dVCTwAAAAAAAACADOxcDxVZMQoAAAAAAABATuahAcZj4yQA6JfkegAAAAAAACA7CUMAAKzM4qe5XPZv3FOANmrVrR+KHh0AAAAAAAAAAAAAAAZg53oAlmXXJAB6d6+uUocBACuwuxs5eI4AAAAAAIghuR4KkfAE4zLpCgAAx+gLAwBwlHFZgD6IxwAAwOok10MDBiQAAACYiaR6AAAAGJu+PQAAwB8k1wMAAABAIZITAAAAaE3fFAAAIJzkemjIIAa04d0DAIA8tK0BAACgP/rrAH05x+Uv3782LgkAEEJyPQAAwCBMigEAADCyy37tvcQiiUcAAIzu3nxOy3ke7ezHzMMB9KVlXJZcDwvQQAYAWM91R1NbEACAlZgQB4Cxmd+8TzsHAACgLMn1sBCDUAAA8zKpBgAAQC/0UQEAAAAYleR6AAAAgAFcJihZNA2sxIYRAHOTiA8AAGmMnQBAXpLrAQAACjKgCZQwe2y5TrBq9T1LX+fZ7yMAAAB1WbAEwCPGJH+m/gTgmuR6ALLSEeuPewLU1CrmiHUA+YipAMxohF+AGaGMAFBbrvpRXzdezDXrZZE8AD+SNA4Ax0iuh0S1G6IGfuiVTln/xA+gJPXAz1wTIJdW8aRUgt+I7dIRywyjiIlx3kWAPuROdH3038V9AABGYW4IAOooPW4kuR4GFRIcNNrZU7qC6WXiI+U96OU7AADAI9dt15Ad4460d/Uzw7lWAGuzCz2tlBzTvNW+MYYK5Ja7L1Wjb7ZX7+eMk6P3M+1uD9Cn1dr0o9enACvoIVZLrgd+sFqjeQWPBqpS7nlIRdbqmcpZybacDPVOAsSZJW720FkExnQvfqTGlRJx6chu1SFKJizMUs/EWPE7Mw7Jy/RIW54W9pLez+7FyVoJoSlufb/Zf1npyOLZo+fIdTxo4d77u1cft9p8qsdYU5I2ETCTWTe/vC7z7HXViPeIuc30zpXut0MLkusLmSn4rWTE+/ZogDX1uNdGujbcluMZOXKMEd+v2kIGe+9J2W3UPQGoQ10I3HMkGSDmMzWOQZpHffDaiU+eCXrX087JOTYt0D48pkT9mXIvUpL4xN0+xLyTOd/9lLG6HL/aWfo8paT8clPoMVPKFXKcHGU+otb9jHm2c7wHe/Nk6tp5lFpQflSp8/YYd4F5xSSO91qnptb/od+v9+tQ0srfnbGVHrvLMeazyvvV8/fsuWw8Vur+VU+uDxnwjk0SvjxWjoTBe8eYdSXi7EoNTvZ2r3srD3Pp5fnqIQ732qDKNZEW+r1Sknv26vzZkxFGKiuEar2zby911KWUyfqS38eOdIwsZ0ypvdCwxzg1u3vJNTGJcr0ISSB+NI51+W/MRx/jZyWvyQi7O/fsyDVqHZfF0nkcSSTP1XaInWAPSQwqNaeRO7m8htZx4uxIuy3kGI8+W2qsPOU9yBHnj7xbvTwLqwm9/yvWqTnf+dZScjlCjlv6VwTuybEoJ/eCnpJjYJdyzM+RJuT+pBw3ZRHykSTS2s/SkUXVIdcktP02Ugw/Yrbxj1qL4Ua6JjPLEaeOxJgS/enSi55icipz5OA++vdbZcn5nqXUhaXq7Z6VuBZ7bece69ZqyfX3AkrIZ2OPndte2Y88EI/kCOJ7Cw7unSem47cXuB6dL3fQLRE0R2wMpig1sUB+tZNCSsTXHBOpsw3C9tRACK0zQv7m+m/3Bihizt96wDYkeenoMSBUyuT9kfOM/ozmeOdKvLc9xv8SAxUQ6shgZekyPOoTl05kIc2jtmZKG7OHexQzMB2b2BVyXHVDGyljWSXvYa32aYrcY5Kh72DtBZU9CE0ky/VM1EpAYkw9tMl6HafNfb5e35/afYgWZchxvpx/UysJrddnbma5npNZxhyPGv3ZHb38l0JyVkov2u3luKu/l72JmYtM2Sk59Pwxn8mV01PimUyZy11ZzrZdjkWYI8ap3Llu3Baae5IjZynXZ3Mcq1QdHvo9emzX5DhW7nveetPSFK3aFD0onlzf85e/NsJgYc7AdSQApzSa7lViqUnCsYEj9Z6N9EzfkyPY6mDPZ4Znu6Z770DpRKtWWk9EpnQaQuqQsyNJD7Um6MTb+vbubaukjSOd/By7ReVIRNpLYKw9+JszLvW8knpPygT4kQW4OUjq7FvKQHfr9yclXkgOYTQlB6TF5XJKt4mOJOSPMI56z5F2Ta7zPfpMSnu/dP+lhL17MdIz1nrMBLgtd4Jhr++rsUk4buSxDI7NCZU4/95/Sylb6fib0t5WJ9RXer6jtNBnZ/QEPB6rPZ7Y8/MiptLSkfzPXp7ZWXOyzm6V/UjObY78jiN6eU5yeTqdTuEffnr617Ztv5crDsB//eV0Ov3SuhAlialARWIqQD5iKkA+YipAPmIqQF5Tx1UxFahs6pi6beIqUJWYCpDP3ZgalVwPAAAAAAAAAAAAAAAz+tC6AAAAAAAAAAAAAAAA0JrkegAAAAAAAAAAAAAAlie5HgAAAAAAAAAAAACA5UmuBwAAAAAAAAAAAABgeZLrAQAAAAAAAAAAAABYnuR6AAAAAAAAAAAAAACWJ7keAAAAAAAAAAAAAIDlSa4HAAAAAAAAAAAAAGB5H2M+/OnTp9Pz83OhogC5/ecf//zh///pr39uVJJ43759+/fpdPqldTlKElP7cX5XRnpHIIaYCpCPmAqQj5gKkI+YCpDX7HFVTB3b9Rzwtpnjom+zx9RtE1dhNj3nkIipAPnsxdSo5Prn5+ft/f09T6mA4t5eXn/4/1/evzYqSbynp6ffW5ehNDG1H+d3ZaR3BGKIqQD5iKkA+YipAPmIqQB5zR5XxdSxXc8Bb5s5Lvo2e0zdNnEVZtNzDomYCpDPXkz9ULMgAAAAAAAAAAAAAADQI8n1AAAAAAAAAAAAAAAsT3J9oreX15s/uwa5edYAAAAAAAAAAAAAoBzJ9QAAAAAAAAAAAAAALE9yPQD8P78QAQAAAAAAAADUIk8BAPojuR4AAACALEwEAQAAAAAAACOTXA8AAAAAAAAAAAAAwPIk1wMAAAAAAAAAAAAAsDzJ9QAAAAAAAAAAANDI28vr9vby2roYAMAmuR4AAAAAAAAAAAAAACTXAwAAAADQnh3aAOYlxgMAAAAwCsn1AAAAAAAAAAAAAAAsT3I9AAAAAAAAAAAAAADLk1yfiZ+zZASeUwAAAAAAAAAAAAC47WPrAgBAKxabAABAHtrWAAAAAAAAwAwk18NgzgkLX75/HfL4AAAAAAAAAAAAPbGJDABnkusBAAAAyOpyEsLibQAAAAAAAGAUkusBAAAAAAAAAAAAAOhKi029JNcDAAAAAAAAAAAAANCFy6T62iTXAwAAAFDMeeCr1k4SAAAAAAC9a5kwCADsk1wPndOYBgAAAAAAAAAAqMfGMQDr+tC6AECf3l5eJfYDAAAAAAAAAAAAsAw71wOS6AEAAAAAAAAAAABYnuT6jvgpGYA+iMcAAAAAAOls7gNQlzkuAACAdB9aFwAAAAAAAAAAAABm9PbyauEpAAzEzvUAAAAAFGf3PAAAADhOUiYAAEAddq4HAABgKXaIAQAAAAAAemQOAwDas3N9BzSIAAAAAIAVGRsFAAAAAAB6IrkeJmNCEgAAAAAAAIAY53nmL9+/Ni4JwLzk9ADAGD60LgAAAAAAAAAAAHm8vbxK4ASAB9SXANxj53pglx0KAAAAAAAAAPolMRAAACAfyfUH6JgCAAAAAAAAAKOT/wDQp1vx2caYAFCH5HpYmIESAAAAUuhXAiX4JUUAACjjsh+vvQ0wHmMmAFCH5Hro0JHkBAkNcNutzmWr90VHFwAAAABYmaROgDZi5sbMZwHkI5enPfUaAEdIru+QSp04FlT+AAAgAElEQVQeeS4Zxb1nVaeV0YnDAAAAAABADPNjAMyk1Jy5+hKAa5LrgWIkglLTSJ0d7wYApFOfzsc9BQAAAABgBiPlL6zmyL0xfwGwnmWT60v97KTKlFpaPWuecUaRo7PqeQegF9p+QG9MDgH0RbsNAIBY+vYAjOpWHWZMBGAee32VWmPhyybXlxZyA3VW59bzhFbOpONLPX5X6FnPcQKAPugz/Mw1gXQp7VCLWAEAAACAlRjPHMu9MWzzSwDEkFy/9dsI6rVcxIn5lYSUnx7qQU9lYWzXz9L1uzPaszZaeQEA6F+OMQPjDrC2R31vAACgD+aZALg2+9hur+NWNiLt1+zvBFCf5Ho46F6lPHqCPPSs1bsSs0imNB2COe09Y+oIoAc91YUpxNQxzPK85VTq18fufebWdS/x/mjbQl+8k2PSvgEAmIc2OUAbofFXnG636UvM+HZtnguAfHoa754uuT4l4fnRZ3I0DFqosZovJflhhMSJXPdPgwqO6anijO1Yt6DzP7aenncAoK2YdkFKG+L6b7VHYG613/He+p4jjEUCrOLRnN7533urSwBK66VfLv5CXd65/tQanx2RX1ZNs/J3L821HYdx2nWNcu+LJ9fXCFi1GiitdiQ/coy96126gVPinpdeIJByfDvVs7KQ3bZLv0+tlPj1ilLX6tHxR2m0zGikZx6o6158MCD0s5Cf4BRv+5LyHM/wDuR+Zmd4vmuPMeQ2QhkZW+0+216cikl2zDkuOtI4ZoreygNQS+hYa+7x6F7kKvvI1yCnkD4XaULapzU2f2sh5/eaoT8/CvGR0dyLDz08wzO9T7eu84g5DrXG23Nu7jK71b5vr3LG0pTxxVr9k5D3uVUb/d6Ycszf5DgvafbuW44Namvl28WotnN9zMsZ+tm9C7p6RVXr53ByN55Cj5fysqYeH0ZXu/FwpAE3kpxlz52UcGQH0pSd+WsPoj/6PimDHpd/W3sBFpSi8/hYyDubs63Z872oPahxlqu9IP6OJeeC5dRJgJy//BMzWOiZ/UPOBaSpZUgZCCxRn5QeB6EvOcf19vo2KWUq2d8MOf/Zre93ZCw5pRz34nzuBQdHxswfJanu/ffQ7zXbgv2cz+kM1wNi1J5zCl2UHpOQf+Q77P1tjV96PpIUlivWlf6l7Nhz6FeVl9IP6mnRQ85248p9tRHHOHsuc89lo4xcY6K15/xD/732s5y7jXKkXmstJVE+Rxus1MYLI1nt+44qZfy+1jxPjjLmGhcOlWtMO+ecYcoxj8TSI+MDIccIHbOIueelF1XF6Dl2Pp1Op+APf/78+fT+/h51giMNqZ4vGOEe7WhV6/x7PGt1HOm8PD09fTudTp8LFKcbKTE1ZFeelHev5EQ0Y2m182+OdkLpeqDVeyKm3nYkpp7lTBCOGTgqtSo+1JFj5N7ts0TySUp9l6OuvDxOyg4FR8pSKlG9hVoDPmLqbaX6/q2eu5j2cMrgFv1q1aYNUeJZChnATelb5iSm3tbTM1rCCO/kWU9lG1FIjLmndnJRiXmMkD5XzqRcMTVejnc8R1szRo/jTmdiZhm16qYcY509J8Lr//+sh3ZqyQXue5+pbZU2Zunx4VZjhI/abyFjXznnamPKuPfZ0IS8XMncs8fUbYuPq6Vi6pF5l9Jju0c2sUhZaPioHLPG4XtGSHrvYR6hFTH1th7aqjX0EpeOtMFa5YG2vlZ7Rijjtdzt75HyqM72YmpUcv3T09O/tm37/XBJAML95XQ6/dK6ECWJqUBFYipAPmIqQD5iKkA+YipAXlPHVTEVqGzqmLpt4ipQlZgKkM/dmBqVXA8AAAAAAAAAAAAAADP60LoAAAAAAAAAAAAAAADQmuR6AAAAAAAAAAAAAACWJ7keAAAAAAAAAAAAAIDlSa4HAAAAAAAAAAAAAGB5kusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAAAAAJYnuR4AAAAAAAAAAAAAgOVJrgcAAAAAAAAAAAAAYHkfYz786dOn0/Pzc6GiALf85x//3LZt2/701z83Lkld3759+/fpdPqldTlKElP7sep7xjrEVIB8xFQIc25jb5t2NveJqVzTP4fjxFR6JbYzqtnjqpgK1DR7TN02cZV6LsddL2lv53V9nXu6vmIqsJJb9V7OmLwXU6OS65+fn7f39/c8pQKCvL28btu2bV/evzYuSV1PT0+/ty5DaWJqP1Z9z1iHmAqQj5gKYc5t7G3TzuY+MZVr+udwnJhKr8R2RjV7XBVTgZpmj6nbJq5Sz+W46yXt7byur3NP11dMBVZyq97LGZP3YuqHbGcBAAAAAAAAAAAAAIBBSa4HAAAAAAAAAAAAAGB5kusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAAAAAJYnuR4AAAAAAAAAAAAAgOVJrodBvL28bm8vr62LAQAAAAAAAAAAAABTklwPAP/PIhYAAAAAAAAAAABYl+R6AAAAAAAAAAAAAACW97F1AQAAAAAAWJNfkANYwznef/n+tXFJAAAAABhVrTGm6Xauf3t5NSEDAAAAAAAAAAAAAEAUO9cDsCyLsQAAAAAAAAAAAICz6XauBwAAAABgXH6dFAAAAAAAaMXO9TCx60nIL9+/NioJAAAAAAAAAAAAAPTNzvUAAAAAAAAAAAAAACxPcj0AAAAAAAAAAAAAAMv72LoAjOXt5fWH///l+9dGJeGI8/1z3wAAAAAAAAAAAADgR3auBwAAAKCYt5fXnxbrAwAAAAAAAPRIcj0AAAAAAAAAAAAAAMuTXA8LsmsgAAAAAAAAAAAAAPzoY+sCAAAAAAAAAAAAALRio1IAzuxcDwAAAAAAAAAwGL9YDgAAkJ/keuAHBmAAAAAAAAAAAGBe8oMA4D7J9QAAAAAAAAAAC5NkCUCslLpDvQNAzz62LgDws73G4/m/ffn+tVZxAAAAIIjJEAAAtk27EAAAAIBxTbtzvdVtAAAAAAAAAAAAAACEsnM9AAAAAAAAAAAA8FDODW8vj/Xl+9dsxwWAFJLroZBz42+v4RfymRJ/e+9YAAAAAAAAAKwr5zw0fXOv4Q8zvAsx36F1jlDr8wNACMn1AAAAAAAAAAAAAAA01cNCrCmS63u4kAAAAAAAAAAAJcmPAIC6Zvh1AwDifGhdAAAAAAAAAAAAoL63l1eLNoDpiG0ApJhi53roSe2G2fXqSA1DSGfVMQAAAAAAAKMwtwUAAKykdB9Icj3TW2Ugocek+lWuPQAAAAAAAAAAY+gxx+aekcoKALOQXA8L0wCHci7fLwtMAAAA6M0ImyKMUEYAAACAXhhLAWBkPeWzSq6fROnGUU8P7QxGuJ4a3OA9AAAAoD59UQAAgHpsmAUA8zPmCn3K8W6Wer8l15NExRNnhKR6AAAAWJ3xDgAAAFax6hz2qt8boLaYeJszyRKAvuzF+B5jt+R6ptXjCwcAAACrkrAOcUq9M63GzMQAAAAAgP6USmg3BkSPjFECoSTX05UjFdh1Ay1H5ZezIg2ZsOx5IYBGBTOKfedu/Rzkvdhz69jeIwBWot6DfbO+I7X7tSXGAoAy7sWHnsfDAAAAgPXcG7uNGdPtZfw3Jdn9Vn5Er2qXdaRrA9CrUeYGpk+u76XRUsr1g7ba9435zOzXBuifOAQA5RjQ7IP2DiEeTVJd/jfPFMxnlIFzAMqwoyUAtKdfBmFWe1dybx6a4/qFjCXnPN8RKRvJ6gsB9Gvo5PrVGjEr0YgAcstVZ+TsAJ6JdQDMQP+MSz316Xoqy4xKvfu9bCbg+XnMNSovVxKiDSmgH947AGBU2jEwv9Lv+Qhx5MiYZ4lx0tzHTPlePd+vWLk2a+plDJt95i+hndHj4tDJ9TFK3aheH4DZdm2sVdGpUIGjRowfvdZhAJBKHTemHu/bkZ/7jT32pZ6+e021dzsqdfwji2hT/iZld/8e3zfmU/J99QwDKcSQeDFtlhHHSXvkOYUw3pU6xHaoI8eYz0hSvl/ra5NrDHHWe5vDvcT1HMfKddwj1KnAikaNfV0m1z9qBOXeNTi2sdLyZpdYRThyo7O01tdmVD3fU+hR7ViTo+MpLgIAlx7thnwp5Odbj57/8tgld42ptVv72fWE2uW/hR5r79rcO0/pNl/O65g6KVVjZ6mcuyDd+re9+1bqWtO/I4tXSiwoSpVSzxw5fus+bw9975JJHaUXmN27n6nnffSchFwju9r1LWdyz5Hnba9NW3IR3Ui/+NlDIlLMHGbOmJkzHud41i/VHtcWM7nF8/E/OePUiv2/1Z+l1b9/K4+SiFuN1fVQ7+f63KXcY3SPPjvL+7RinZCLa8fMbCTFzJol14dUHCGDkTnO+2hSOcf5ajXOahwn9fwpExa5tb4mI7l3/3oYzIY9I73nuTrYNZICjgy+hiT5jBxHZhsgAQgVkuwmNhJjr/32aHxglv7ztb2xjNDFCjHjMLf+/0jvcWgb88hk2C05E9dyjoUduedAuCOxJjZ5KffCoSPJU4+SOnLEx0dlCD1mifbB3t/G1sWx5xmp7h1BzNxQ6WfmrPWvzpRuZ+Q4Xsw7GFKmlAWqOc7/SMzzsxc3Qp+XXO390ETeXPXCo3ldMZUZlY4x/GzEOZ8SC2JH+v78Iceiz9TjX5/jUfypHZ9axcOYMV7Gps7tQ4n70POcyezxJCXvtMdr0ipXqtZ5Z4mDxZPrR+7oxbxgjxqQt4JryaT+I2593yOrQXtf4V7q/K2/Vw9cA0LEPCdH4u+R88wg12TYkcSjI5M1oZ8J2aX1SOPvyPU6kjTVYyOdvGZaINKTnju6vciRNBBznp7vxZFkVdpqncRTIgmmpdZjJpQfpK/5t4wjNImt1Hl7dmRMN/TfY85baoFLzviQUhfm/n61r0Vvx6Ccnu9PSkJ5yvFnU/Ka5Bo3rSUkAT/Xsfc+02qudJVnfmZHFrjc+/cexoBC215HvmfM+Wsfv/Y92Is9ORfbl048OvJ8XB+jBHNe48oxt3v0+CH/HaC11FzHntqdl2q1XY78TasNmXu9V7mUbvfHlGE2zXauH0nugbnVGpmzfR9oKaXCLzFYV7rhE5M4P1Osyb1gqVZiTokGae57XXKgOOZ8szbaZ5Er1oZOKtx6Tko+I3vf795Afsq1SKlvYq5nzPlq7Pp55Jh7St2D2GOVON6jY+aM+7MPnhBHYhIwA4Pi4Wp9l1JJlr0t5GllxDIDc5g9/hwZ+3x0rJTPzH69VxByD2v9Ot2944aMK7ZapJJTqz7D3rh3icTe0nOHj5Lgb4lJ7g+Ni62T7ckntY6t9auHpMuxSBEIV7v91loPY56hn82dP3A20masKdcm9BhHylP7l/tG8XQ6nYI//Pnz59P7+3vUCVa6mMBtRwZGnp6evp1Op88FitONlJga0zCYqXKb6btQ3qzPi5h6W6126qzP1epy3NeQX38a4fkZoYw5iam36fszq9ViXG1i6m1iKnBUbFwVU28TUyHOrG1mbdWfianAUWLqbbFxVUwFtk1MvWemtmrKwrxc3ynHpp4jyHmtW/eNSy/8DTn3iM9F7pgalVz/9PT0r23bfo8uAUC8v5xOp19aF6IkMRWoSEwFyEdMBchHTAXIR0wFyGvquCqmApVNHVO3TVwFqhJTAfK5G1OjkusBAAAAAAAAAAAAAGBGH1oXAAAAAAAAAAAAAAAAWpNcDwAAAAAAAAAAAADA8iTXAwAAAAAAAAAAAACwPMn1AAAAAAAAAAAAAAAsT3I9AAAAAAAAAAAAAADLk1wPAAAAAAAAAAAAAMDyJNcDAAAAAAAAAAAAALC8jzEf/vTp0+n5+blQUWAu//nHP7dt27Y//fXPXR6vd9++ffv36XT6pXU5ShJTgVrEVIB8xFTYd+67XlqlH0s8MRUgHzGV3q02x8H4Zo+rYurY9L0ZzewxddvEVcrQhuYWMRVYSem6cC+mRiXXPz8/b+/v73lKBZN7e3ndtm3bvrx/7fJ4vXt6evq9dRlKE1OBWsRUgHzEVNh37rteWqUfSzwxFSAfMZXerTbHwfhmj6ti6tj0vRnN7DF128RVytCG5hYxFVhJ6bpwL6Z+KHJGAAAAAAAAAAAAAAAYiOR6AAAAAIp5e3m9uaseAAAAAAAAQG8k1wMAAAAAAAAAAAAAsLyPrQsAAAAAAAAAzMcvGAEAAAAwGjvXAwAAAAAAAAAAAACwPMn1AAAAAAAAAAAAAAAsT3I9AAAAAAAAAAAAAADLk1wPAAAAAAAAAAAAAMDyJNcDAAAAAAAAAAAAALC8j60LAAAAAAAAby+v27Zt25fvXxuXBIBSzrF+28R7AACgL8amADiTXA+D0ZADAAAAAAAAAID5WaAKAPV9aF0AAAAAAAAAAAAAAABoTXI9AAAAAAAAAAAAAADL+9i6ADCby59jAsZwfm/9hBoAAAAAAAAAAACsy871AAAAAAAAAAAAAAAsT3I9AAAAAAAAAAAAAADL+9i6AAAAAADM7+3lddu2bfvy/WvjkgAAAAAAwB/OY9cAcCa5HgAAAIAkJh8AAAAAAACA3C7nIWtt4vWhylkAYABvL6+SggAAAAAAAAAAAGBRkusBAAAAAAAAAAAAAFie5HoAAAAAqvGLUQAA89C2AwCANNrUANCfj60LAAAAAADAmkweAwBAX85t9C/fvzYuCQAAQBuS66FzJhjJzYAYwI/ERQBoQx0MAAAAAAAAXOohZ/ZD6wIAAAAAAMCZn0MHaEP8BViT+A8AAPAjO9cDALAkkwUAAAAAAMzg3q/D+dU4AACAeHauB1iUXSgAAIAe6JsAAAAAAAAAvbBzPQAAAAAAABDEwkgAAChHexuAUH6pqhzJ9VDYZaNXEAMAAAAAAGZjMhegLxIzAfonVgNAvyTXwwKuG+QGtwEAAAAAAAk9AAAAAPAjyfUALMvEEQAAAADAj+xCD8C2qQ8AAKBXct7Kk1wPAAAAAABkIQkL1iYGAIzjOiFHgg4AsDL9WeCS5HoYnIodAAAAAADoiQRNAAAoR64QAJQluR4yaT1QrOEMAADAyC771fq2AAAAAMBKQvKOWucmwQrk4AHbtm0fWhcAVvL28qqhCwAAAAAAAAAAJJGHBHG8M0AoO9cDwBWrUGFN3n0AAOiLNjpAXyQgALSVEoe1rQEAYFza8/VJrodBGcQGAAAAAHpxPV5pwgf6Zo4BAADgNmMa87vsE7vPwC2S62FiBschP50oAABGcqtfqC0L9MC4FQAAAAAtGZ+az5GcHs8BI/G81iO5HhIdCVglk3NDyiM5GMJokAAAQBv6rcAlMQHguJQYanwUIJ9a8fjRZ8V24ExfG1hJb/l9EEr7vR3J9bCjdCWpEqamkStb7woAkJO2BStImXgf4d2IeY+983BbyLvh/QEAgLIu++Ta3QActdoYTqtFxOrtcbR6J0acb6E/KYtBts1zl4vkeghwK/iMnKgMl1brZOXiugEA0JOc7dOe27r64lDeCO9Zz3GKcCZ8gFjiBjCDvbbs9X/rpW2eEn/FbuhPrsTibev7ve51c45eYnusR3VUrmt37/q0rhuPbGbT8/sxo3v3KMcz455SS64YN/szW+v7Sa6HSDUaaqM2ppnHvY7RLJXuKu/YSIMb0JPZYh4AbdWuV0Lauqu2h4E/jPxuXJe9dqKOxKBjek0Sg9Zq/XJuzx4lzjz6HMDI9mLbrHGvl7H3mAUOUErIBo8pO3LHtKdCzvsoaTXH7uGtd5e+/DcxIK8c1zV1F+ej51+xvuY+Y4Okal33tTZaPSu5Hi60bvjUPv9oAYuy9jqP1/8/526Ylx5Nsnpm/2evwVXj+uk0AADclrNf17r920Ob79H1bN2Pj9HD9WQMtRM9Qo4Zet69d7L0cx+aoMkxtZKAYzZ6KDlJnuN9gHtGar+04hpxi7p+XSP0pfbKOFtMy5kg2XojgtRk45xGvK7kk2Nud28x+tHyxDxLuZOnQ49z67w5rsVq71OpGPToXuRYhL+Xd9Laas/Rqnpt6/X8bqziyC9eEKd0nB0iuX71yiakAdnjqpbW9y2lo1Fb6/Nf6vFZYg6z7qAZ8848iks5V/anOrKrQcnzwgx6eb57KccsXM8wj+qPWgu/RmxrcFvrBL/ag5JiTR6lkn5TJhxzloN51aq/Svfbe6yHQ9soIRsS5NxRsCclFo3VOl+KkLo+xzhOz/d+ZrHXv3RSZ63noZf3i3J6n9+JeZeOzPHtjWX3di1mVru/XlvIe9a6jL3I1farvctxDjkTolOOkfsZ9Gy3E7IIv+R5W0hps9cuR44NCXqRY7FCD9/zyKKqklpuRkE5rcdJU+ZCQ+a8Qs8XU4aYTTVG0vpZCDl+zPPyKE8sZK40pq7o+Tl4Op1OwR/+/Pnz6f39PeoEuVcnXh4rx8BKqhLHzR1AQwNiq45pqXsSc54eGnczyPlzZU9PT99Op9PnLAXr1JGYenYkobuWGsnYPSSf35Oyo9qRRktPUiaZj3yvnhtYZznqXDE1TEo7NUTKopiS7aQjk5JHzrN3jBrJpLfOk7MdnjMpMuQ4tSYZQ8tz5Ji3jp9jgD93nyS08x9DTL0tZiAuRz2Ys1/bU/sqpu2XY1efI1qdt5aU9nfJtvsIbd8jxNTbcrRTU487k9pjJil94Nbtw1mekVZjKUfaxTnvuZi6L6Z9eiQO9zD2eG2Wd/qeWdtHKXqpX0KS3e+VrdRzq///s1Ix9az03HkvyfV7Vus/X8v1vVuNzceWZ+98OWLdkTHXlDnLvXOIqbfFxtVZY8NZ7nezlznzlM1XeuwznM3+PPZMTL2t9Jgq8UqPR4zYxx/pmeu5b5Kzjs8dU6sl15/1OPAXm3CRWq6eH9Ztq7/adU9PA28cpzF4W4nGYE/vb0k91iVHHFkF2vP3aeXItbk30dNjAtu9csQQU29rfS9L6+WZjZGzzEcWm/Ysx0D0kcmUXvoB21amjGLqbWIqjC1n+/hSiYRQMfW2UgszVo/Vtdo3pZN7co6JtG7z8T9iapjSiaCM6cgcUe1NBo70Z0MXFqckLfTwXvRQP98ze1yt1U5tNR5VatMfftbLXH1Pse1a6XHv2sTU2yTX39fz+1lCb3Hx0ir3YCRi6m2tx1S5r5dNO/baRPfqHXFxfk2T65+env61bdvv0SUAiPeX0+n0S+tClCSmAhWJqQD5iKkA+YipAPmIqQB5TR1XxVSgsqlj6raJq0BVYipAPndjalRyPQAAAAAAAAAAAAAAzOhD6wIAAAAAAAAAAAAAAEBrkusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAAAAAJYnuR4AAAAAAAAAAAAAgOVJrgcAAAAAAAAAAAAAYHmS6wEAAAAAAAAAAAAAWJ7kegAAAAAAAAAAAAAAlvcx5sOfPn06PT8/FyoKcPaff/zzp3/701//nOU4R49V27dv3/59Op1+aV2OksTUfly/KyO8IxBDTAXIR0yFMLn6tcxNTOXaOXaIFxBPTAXIa/a4KqaO7d4c8LZpS9On2WPqtomrlLEX76+J/+sQUwHy2YupUcn1z8/P2/v7e55SAXe9vbz+9G9f3r9mOc7RY9X29PT0e+sylCam9uP6XRnhHYEYYipAPmIqhMnVr2VuYirXzrFDvIB4YipAXrPHVTF1bPfmgLdNW5o+zR5Tt01cpYy9eH9N/F+HmAqQz15M/VCzIAAAAAAAAAAAAMD/vL28RiXUAwDlSK4HAAAAAAAAAAAAAGB5kusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAAAAAJYnuR4AAAAAAAAAAAAAgOV9bF0AAAAAAObw9vLauggAAAAAAAAAh9m5HgAAAAAAAAAAAACA5UmuhwbeXl7t5gcAAAAAAAAAAAAAHZFcDwAAAAAAAAAAAADA8iTXAwAAAAAAAAAAAACwvI+tCwAAAAAAwJreXv6PvbvHclu5FgYKail1ZN3YvZaHYA1A03iZ5uH4zaMzT6MH0D2EF9zYduQB8AvuR4uiSBAFnPrfO7pXTQJFonDq76D499pFAAAAAAAA+C/J9QAAAAAcIjkWAAAAAAAAGMGn2gUAAAAAAAAAAAAA0v3jr3+3AQoABLJzPQAAAAC7WLABAAAAAAAARmLnegAAAAAAAAAAAAAApie5HgAAAIDs/DQxAMB89AEBAAAA6I3kegAAAAAAAAAAAAAApve5dgEAAAAAAAAAAAAAAODa9a8i/s///W+Rc0quBwAAAAAAALK5LIKWWgAFAIBeXScQAsDMaraJkusBAAAAAAAAAACgMMn0ANAeyfVQUGsdYjvFAAAAAAAAAGDtGAAA4A+fahcA2OYff/17c8n5AAAAAAAAAAAAADAKO9dDEE/yw30t3xseWAEAAAAAAAAAAAAuJNdDsJYTiS8kFAMAAAAAAADAYz2s/QMAAPEk10NDtiS9G8ADAMxHHxAAAAAAAAAAGF0Lm0dLroeKJEkBAKXpfwAAAAAA9CdXgkkLiSsAAAAtkVwPgzH5AQAAAAAAAAAAAADpJNdDZpLdAQAAAAAAAAAAAKB9kusBAAAASBL5IPnlWP/zf/8bdkwAAACYkTE2QD9s1gkA6UqNeSTXAz912E20AAAAUILFIwAAAAAAAKA1kushE0kC8LMed8roscwAt8QyAAAAAAAAAOAIuQfMRHI9ANzwcAwwgmexzC/XAADQKos0AAAQ43aeWB8bYC7WA4E9zM/CsnyqXQBgn3/89e8SgAEAJqMPCDA2cR4AAAAA2Mv8IgDEsHM98BNPnjEqT2QDAAAAAJQhoQeAnt22Y9bQgSj6yQDQB8n1AHTt2WSWwSnAH8TDPrluAAAAAEBJEskBAOZjXRp+JrkeOpdrcsOkCUfV7nRFnt+u9wAA8IeIfnbtsQIAAABgfA4wMjEeiCCWUFpLdU5yPQwiV2CRZE9vttwLLTXEANFKx7hW+gqtlANgVPrQefl+mYl+G8DcbGQCUJfx5zrfDwAAsCyS64GNbhc+Le5Zb7UAACAASURBVIRyVPQiisku4Ki1OKK9AwCAWMbxAACwTa2+cw/rwbffTUpZe/h8jOvefa0uAgC0Q3I9HDTbQuBsn5ftSk5AqYcA9bUSi2/LYUEEAAAAABjBkTnYyPnbnn51ZE/Ccitz3WB9Y2wtxBp1DIginoyh9HXsrd5Irmc4KTfhkRu2hY5vC3qaTCHds3vk3n3w7N7Y856LFupYRNxo4XMARBPjaJn6CX2wY9cP4hYj2jOXdmQXSjhCHAYAlkWfIEKuteTaDx6oG8BWcosAOCLHHHnttuneGKF2me5pMrneQIQIpZLs+cH3OC6L2WWsdRQiHgJq8br1UEbGt6WTro2DPvllA+jfs3Z6z8+973kvlHTbXm3pr87yAHjLO+lsuW7PNi/o6Vr0JHqDla3H2ZNIZiMTeiSGAaNpIamjhTK0KuKh3dLnh14Zn4xr1nlSYxf42ay/dDSzlGs+a1txrXpy/VrD9ehvM1+4Z4s0tb6L6ACZ83MdbRhyDJgNwkm1p9MfOVCoVWdbvFe2xKtHiX2lylRLK+XI5dHnm6lfwjhKtxHuk+dGj6FAm/Yk9AL5REx0l76PWzjfs77mlnnMLeP4R9/x2neQ+guBNfvNj9qE3PO0z+ru2vn3/ALjnnvlWdnWfrXRWIje5N7EyK+EwvhmvFe39ulG/W6O9IdTjzeCUesBx+zpg10cqUt78reelSeqbHvkvL8kkW6zdfwcUW/XjrM2d+P6ca2lubm9tsTyluXcpb3l61lrc5C1Y0Tqoe7dUy25PnLRIeo9R5TqlK3929b3pywuPHrPlut1+97cuzc9+07sSsuI9twbe5LB+dWj7yjXd1f7gYYtsbv2w0etxO61wbh2pi21En9KT4busfUh16jzXFhU2c7E37rZ6wd9aOE+Hv1eafnzSSQjt9I70LSQVL/lb0eOW+s8qceIvn6P5pVyxaCUOd49Dzikni9FrfMSZ7Y2NmXBPXf9jpgf0K/qm2vRl5rj2Wfzlrn7KHvW2Z+9trd+wZZ1oxLHaMVa//RIfdkyRy9mji+iX7XmyEPjOUTV72fj2C25UXvieu41tZwikzr3rINGlSmyTZoloXckOb7vPQ8MRczZpYzXt8TynHVwLa81Z87olmMc+U5K5WvsyT3L3T94dowj+btR7ynldD6fN7/469ev5/f396QTtPLhczdUkYsZW4+99XzPytbKNWpJdBCY1ZH6fzqdPs7n89fA4jQnMqZKkGeLWZJWa7X5R+Ta/etCTL3vyLWM6EdFHuNaz/dvLjkfgE2Z1Hj096NSJiYevfeZHhZtSj2QJabut/UaXV+fnAmfM/cZtBWPbY3ZLSUfH1mw2rIAkPNeEVPva/ke7XmheE0P86RHyhiRBJZ67OjzzCg1/oqp90WPuY+IXJjds8C/5RitxcM95ckRL+/pMVGmxTI/u05r8y65P8focTU6pqb0E3PuonikzuyZS2slXjKnVh5u2WL0mLos6XFV/NjmSN+WWLXHCrXa4Nzz7GLqfRF91ZzzYUdF9EupZ+v1G3WdrsXPlWvtf5rk+ouUAfWWoLsnOWCr1r67GUlYO0bS0roRYip9mnnhO9eiZaRnExMG2PeJqWxx5CGj2pOGLSq9k+Cz8+dOnLgQU+8b/d7ItatRCca1+Umu+IOYep+YSktKtVWttom9kVz/qxaS6yMeGC3FvXjcng2t7oncBCv3dU1J8njUD24xiUVf9Vct9FNrJRUdGcOJrfTgyMMuR3aWXTN6TF0WyfW5tdi/YA6lNtBKIabe1+Pmw9YW+ranzzXSNW5h7utWdExNSq4/nU7/XJbl9+QSAKT7y/l8/q12IXISU4GCxFSAOGIqQBwxFSCOmAoQa+i4KqYChQ0dU5dFXAWKElMB4jyMqUnJ9QAAAAAAAAAAAAAAMKJPtQsAAAAAAAAAAAAAAAC1Sa4HAAAAAAAAAAAAAGB6kusBAAAAAAAAAAAAAJie5HoAAAAAAAAAAAAAAKYnuR4AAAAAAAAAAAAAgOlJrgcAAAAAAAAAAAAAYHqS6wEAAAAAAAAAAAAAmN7nlBd/+fLl/PLykqko3PrPvz+WZVmWP/35b5VLAuV9fHz863w+/1a7HDmJqWO4xOoLMZsWiakAccRUSKfPzCNiKkAcMRX6Yx2wbaPHVTEVKGn0mLos4ipQjpgKEGctpiYl17+8vCzv7+8xpeKpt9fT//+vH4vQ376f6xQGCjudTr/XLkNuYuoYfsTqP3z77prSHjEVII6YCun0mXlETAWII6ZCfy79ZP3jNo0eV8VUoKTRY+qyiKtAOWIqQJy1mPqpZEEAAAAAAAAAAAAAAKBFkusBAAAAAAAAAAAAAJie5HoAAAAAAEjw9npa3l5PtYsBAAAAAAAEk1w/AQs9AAAAAAAA0J5c63jWBwEAAAD2kVwPAAAAAAAAAAAAAMD0JNcHswsEAAAAAAAAAAAAAEB/JNcDAAAAAAAAAAAAADA9yfUAAAAAAAAAAA16ez0tb6+n2sUAAACYhuT6iRh0A60SnwAAAAAAAAAAAIDaJNcDAAAAAAAAADTMZlUAAABlfK5dgFFdBrXfvp8rlwQAAAAAgKMkMgEAAAAAwPjsXA8AAAAAAAAAAAAAwPQk1wMAAAAAAAAAAAAAMD3J9QAAAAAAAAAAAAAATO9z7QLwq7fXU+0iAAAAAAAAAAAAAABMxc71AAAAAAAAAAAAAABMT3I9AAR6ez35BRIAAFihzwwAAAAAAAC06nPtArDPZRH62/dz5ZIAAAAAAABHXT98Zu4fAAAAAKAOO9cDAAAAAAAAAAAAADA9O9cDwA7XO4kBAAAAAAAAAABAaX4RM56d6wEAAAAAAAAG9PZ6slkMAAAAQAI71wMAAAAAAAAMQCI9sCw/YoFdKwEAANLZuR4AAAAAAAAAYCJ+2QIAAOA+yfWZGZACACn0HQAAAAAAgAjWHAAAANJ9rl0AjvFzbgAAAEBrLNwDAAAAAAAAPZJcH8SiMQAAAADAXGx+AgBAT+Q1AAAAPCe5HoAqTN4BAAAAADCbR3Pj1//uoS0AAACAeiTXAwA0yO6HAAAAAAAAAMzO2jnAfTa3zedT7QIAAAAAAAAAAAAAALDf2+tJ0n0AO9cDAAAAAABUYrELALgnso+gvwEAALCd5HoAyODeJKWfKAMAAAAAACAXSfQAAADHSa6v6DKwTUm2NBgGRrYnLgLAUdofAAAAAAAAAACWRXI9AEB1Hp4DAEahXwMAAOVc979tGgAAUI+NnABgLJLrKyix0GwxG6BdBtYAAIxC3xYAAADKin6w5ja3wBgfgFaZj6YmDzfDXCTXN0DDDzCHPQ8+aSMAAAAAAOZiXhjYSrwAqOs2B0BchvHcy/Vxr8P4JNcnuBcoBUgAovn1EQAAWvdo0QgAAAA4pvYYW7IYAAAwO8n1DTkySDbABSgj54Tm2rHF+Ri+RwCAY2ov8APMyngWAIA1xusA5Yi5ADA+yfUbRHSKSnWsdOAA+tHKwvh123EpSytli3C0baz9XdQ+P4xM3xkAAAAYxbN5DvOMQKTbmCO2ACPTjwIeER9gXJLrJ/QoqG8J9hoEoITZYk2tXy7Zct6erkVKWW9fm7sN7Ol7hFTqNwAAoxtt/AxAHXvmgbUvQE17YpC4BfAH8TCGjbIAqEVy/UE9N+I9lx1gdrcx/N7u8xHHjXTv2FvLmvL5cifBR0yEmEwBAHqTo5+oTwSMKHcCktgJADCuVtfvt6zR5Cq7/i9QU6txmWO5BwCwheR6fpGyE9M9qZ2VqIRQYDyPdhe/ljNutDhYjijTkR2S7tma7L7lb5E78B9pz3JPAuc+D20w6Q8A+2lHgRk8GxMaMwL8LHJtast5Wt6pWRsBjMwvfcCYRrhP9cGAR0aIcbSttc1SZ8j5lVxPuEeNxZYk2WevuXcjjtQ4lfosa9/rSN/njFpquB416pHJ09d/exRztpRhtEFw5Hefcr7b2B19rR+dr5aUXe5LnY/6Rosna2b6rACzKR3jU86nTwTkEPHg96Nj7knMzHV8jslRT4BtSs0Z7onDa//eapzY8jlbLTuMqLd51iPlzfHLw7l+6Zk/2Bkayso97jSuhTS99dPgVgu5qD2TXH+HwBhrzy69e3YS3prUn1tKsNgyCRC5mJfydwt0bXpUv9au4TMpD61sSVivtetaxMLH6HJ/7tK7srdyHVspB+lSrt2Rh3IiH0AhLwsvwIh6b3f2zA8c+WWlXr8n6P1ev1X78+R4ULoUfdof9izqjLoQRB/uxb5n8TA6oVyd/1lL303tthG4z/jysVwPjkb0r4/0E2v9qkmtxCj68SyPYE/eSsprtmzwuOd8t/aste3ZmK6VDdRyP0Ca8t1ElqXUpoAp77l1JPcsJa9m9v5CTrW+4x6ubQ9lbFmO72/tmK20STPKnlyf2ghteW0uBgqxan2fzxbe1zrxFzmC39HXPHtPruB65DsSkPPLeY1Tjy+GAiPLEW/3JPe3nOih3W9fqaSAtd2MHj1s8uj1zCFyPiCqnqc81PrsfFELWLfnT33w68h7e3Pk80SMgR+9Zy0+ppZna5kYQ+mklKj3Piv3lrmsHP3flhIlIxxZJI+eX6y96cntedf+fWtbOFobyX0p98rWunMkmSNiveBoWWrHx1L3Xu7z9BxDWqkLa1KS/Fr+HLPYMl/06N+jfiW3dDJbzzEgt0fXIPo723q8lLZ+6/zm2nu2liW1rKnHuj6G+jqePX3MyNyWXHkykcfYM1d3xJHEyeh7/5ktcw0t969yJKJGnUe8za92bLk9Rktj8pS2IbWPkPLAUqkHG1P6QluPvXa+PSLmhHKd58jc/LP+fso6wp7zRzmdz9tP+vXr1/P7+3vSCWo3ChFPozGfqEmaGWzp+O/5Pk+n08f5fP66u2Ad6DGmAvWJqfeJqT/sGQBunYhLeUhxrT+wta8QdY0iFmkiEpAi+pjRuzeVfqg0p1IDajH1vpQE8j0iFwxy70i09eGR2vcMbTnSVu1JZn00yXwksVY/9T791FildpUjj4g2cM/CS25H4nDKcZ8RU9O1Uod6snYfP+vP5N597Vl5jp5XP/5XEX3YPXMoe8Za+qq/6r2fWiKxcO08LX0X9Ce6TSy9iYKYel9qXN3zEJDYw7WR6sfM8z1i6n0l+qql6l2uTVD2JJKXElmm0v3xXLF1hJjdUl1Lyd14Zi2mJiXXn06nfy7L8ntyCQDS/eV8Pv9WuxA5ialAQWIqQBwxFSCOmAoQR0wFiDV0XBVTgcKGjqnLIq4CRYmpAHEextSk5HoAAAAAAAAAAAAAABjRp9oFAAAAAAAAAAAAAACA2iTXAwAAAAAAAAAAAAAwPcn1AAAAAAAAAAAAAABMT3I9AAAAAAAAAAAAAADTk1wPAAAAAAAAAAAAAMD0JNcDAAAAAAAAAAAAADA9yfUAAAAAAAAAAAAAAEzvc8qLv3z5cn55eclUFCL9598f//3vP/35bxVLwiiu69S1XPXr4+PjX+fz+bcsB2+EmAqUIqbCNvrQbCGmwnG340sxd15iKkAcMRUg1uhxVUwFSho9pi6LuAqUI6YCxFmLqUnJ9S8vL8v7+3tMqcjq7fX03//+9t0147jrOnUtV/06nU6/ZzlwQ8RUoBQxFbbRh2YLMRWOux1firnzElMB4oipALFGj6tiKlDS6DF1WcRVoBwxFSDOWkz9VLIgAAAAAAAAAAAAAADQIsn1AAAAAAAAAAAAAABMT3I9AAAAAAAAAAAAAADT+1y7AMR6ez3VLgIAAAAAAAAA0IhLHsG37+fKJQEAAGif5HoAACCMRRoAAAAAbl1vEGbeCAAAAGjZp9oFAAAAAAAAAAAAAACA2iTXAwAAAAAAAAAAAAAwPcn1E3h7Pf30U4sAAAAAAAAAAAAAAPxMcj0AAAAAAAAAAAAAANOTXA8AAAAAAAAAAAAAwPQk1wMAAAAAAAAAAAAAMD3J9QAAAAAAAAAAAAAATO9z7QIAAAAAAAAAMJ6311PtIgBXru/Jb9/PFUsCAADQLsn1AAAANy6LTBaYAAAgD4ldAAAAAAC06FPtAgAAAAAAAAAAAAAAQG2S6wEAAAAA+MXb6+mn3cUBAAAAAABGJ7keAAAIJxELAAAAgNzMQQEAAADRJNcDAAAAAAAAAAAAADC9z7ULAAAAUJPdzQAAAACAWV3mR799P1cuCQAAQBvsXA8AO/ipWQAAAAAAAAAAABiLnesBAAAAAIAibFYAAAAAAEDLJNcDqyx2AQAAAMztMj/07fu5ckkAAAAAAADy+lS7AAAAAAAAAAAAAFDa2+vJxpMAwE/sXA8AAAAAAAAAMBjJogAAAOkk1wMAAACQjYV8AAAAAAAAoBefahcAAAAAAAAAAAAAAABqs3M9ABxw2YXz2/dz5ZIAAAAAAADAPre/PGftCwAAmJXkeuCu28kTAAAAyMEDqwAAQCrrWAAAAEAukuuBQ64nLyVCAAAAAAAAAAAAANAryfUAAAAAhLALPQAA8IxxA/TFZmvAiPwKDgC0r+b8geR6AADgMJOQAAAAANQiYR8AoE36aQD0SHI9AAAAAAAAAAD/dW9DFQmSAADADCTXAwAAABBqzy+a+Jl5AAAAKMevkQJQkge0ANiqhbGK5HqYmI4rAAAAAAAA0VpYCIeZuQcB0smhAQAuJNfDhEymAAAAEMk4EwAAAAAAABiB5HrgJ0cSIjzFywwkDQEAQH7GlwAA0Cdz6AAAAP2wHgP3Sa6fiEDIIyY6AQAAAHjG/CIAUIu1LADgCH0JgJ+Ji7BOcv0gBDtaZMEVAGi5P6APDQAAwBG348oWx74AADCjltenAID2Sa6HiUggAwCOuO5LXCYj9S8AAOZjgRrgPvERgNpKzdfetnnaQKBV1rHq8d0D0DPJ9TABHVbIz6QhR9xLWIbRrCXm56j37qvx2SES2mC8CeNxX1ODeRV6I1ZCGXvuNW0Ks6rVNmkTgdaIS+3TXwOgB5LrJ6STMibXFdgrKgFVkmMM8byetTp8pH5vfW9vyeBHJidNbD6WY8entWP0GHMsrEMbau2EB+SjjwbrtEnATPbMhelLQB3uPQB6ZZwNQMsk13dgLdHKYJnbOtBCnWihDFDLWv3fklD77L2RA0yJsfWtfY8mE8qpnah77/zPjr8n1mwpwwj1bcv1TLnmkcntt9aO+aiPt5Ygv7ccz46fasuxcizSr/06QkrZGIfrPRbXE/KJGBu6N1mWMepDSl+2588JzKGHeJVzw5beNrKAUYy20Qcwp1niVY4Nno7mETw73ujXhPG0FE9SchBaKC9tqlWna9TP6ZLrj1zcex2AXDtIlrAnyaeWlr6rrWWIKrOOItee1YcjDUl0omZpz2JadAzfIzKZPfcO2xGD35Q4GFnmFFs+b4564uGENqQk6u55zZEHam5fG9V3vT5WSlJ/D3U2dxn3XIuIOpbjvUePu7Vub0l2v33tkYcHjr6HPEpPdETHtlIPOfWg9rj8thy3apfrWivfFeOoOS9VwpHPd62HzzqSXA9upsxL5ErAvFeOlPdu6dNaxOzXnoebn13LnmI2fYiMaal/j2Jcz1GjtKk9z9de7NlcZu9rgXwix3k53lMzLvYwX3lrT38xJSn3aHm2HC+6XsnNmkepvsWzHJ+1MkSXcUtZqKOH2LNlTPJow9g9bWRL9bN4cv2RJLYjHZJcCRkRA9pcr42Qo0FJCQopwf3ZNYhKSjvSYcxVJuYVsZB5NHn0olYy/5HJ/h4Huo9EL2rXXiRJGcA/+v/Sn1dyB7ci76PI/mJU3I90ZNKuxb5RzjK1+HkjlW5/xOk4R8bPpRyZF0h58DCyT1K7ju5Z1GhBZD//yBxGpJqJIa3VyxkcGd+tjZNyXruocWdEW5GzvdmTLJui1gYBtRYVj7526/0QUZ9S/pa7v0A5ufs9kQktoySRRmphru5Zv3RtvPFsp86I8c2e9+bWw3iDnz2ro7nHYY/ec+9ve8q2tU5Gx5cREqCi56EjrmPka1toZ27lWM+9d/zan5NytswNHpk3jTxGLnvmhx+9d8trb6VsSBRxb94rc2tt0p6crD3zZXvyFW6V3jhgds/GyylrzFGbLaQe44jouaZn8a92n2LPPMjaeyLmt2vnKK21GRFlS4m/ETkrW+SeYz2dz9sP+PXr1/P7+3vSCUo3qjmekOOHyM5YLSmdz5Tj1f5cLdtTb06n08f5fP6aoTjNKBVTa8fFiPPXSqQc7f6u/Xn2xN+I5KXouH973Nr30hZi6n2j3NsjyR3vI+7b2u1qS2q3KxH0U++r3U/do6d6eKRvEjUxtvf8o4lYGNnynpTzRLaFKfWl1j0spt4XnZR9+5oj5xndke+oh75RD2U8YrTPlxpnxdQ4tetQrrmsWufZo+U2a6R5gbWkqdEY//+qp/nU3HU1OuaMsJ7eo9xj74gEyYiE/C0PYuUmpt6XGlf31AexgS1qbQ7CPmLqfT31VfnDvT57xAMNta9rC/2tyHO3+j1HiY6pScn1p9Ppn8uy/J5cAoB0fzmfz7/VLkROYipQkJgKEEdMBYgjpgLEEVMBYg0dV8VUoLChY+qyiKtAUWIqQJyHMTUpuR4AAAAAAAAAAAAAAEb0qXYBAAAAAAAAAAAAAACgNsn1AAAAAAAAAAAAAABMT3I9AAAAAAAAAAAAAADTk1wPAAAAAAAAAAAAAMD0JNcDAAAAAAAAAAAAADA9yfUAAAAAAAAAAAAAAExPcj0AAAAAAAAAAAAAANP7nPLiL1++nF9eXjIVBeCHj4+Pf53P599qlyMnMbU9//n3x0///6c//61SSSCWmArjuW6ztFdliamwzW3felnEK34lpgLEEVPhD5d+qL4nR40eV8VUoKTRY+qyiKtAOWIqQJy1mJqUXP/y8rK8v7/HlApgxel0+r12GXITU9vz9nr66f+/fXd9GIOYCuO5brO0V2WJqbDNbd96WcQrfiWmAsQRU+EPl36ovidHjR5XxVSgpNFj6rKIq0A5YipAnLWY+qlkQQAAAAAAAAAAAAAAoEWS6wEAAAAAAAAAAAAAmJ7kegAAAAAAAAAAAAAApie5HgAAAAAAABjG2+tpeXs9dXNcANhL2wQAAPEk1wMAAFOy6AAAAAAAAAAAwDXJ9QAAAAAAAAAAAAAATE9yPQAAAAAAAAAAAAAA05NcDwAAAAAAAAAAAADA9CTXAwAAAAAAAAAAAAAwPcn1AAAAAAAAAAAAAABMT3I9AAAAAAAAAAAAAADTk1wPAAAAAAAAAAAAAMD0JNcDAAAAAAAAAAAAADA9yfUA8MDb62l5ez3VLgYArNJeAQAAAAAAAADEkFwPAAAAAAAAAAAAAMD0JNcDAAAAkJ1f2gAAAAAAAABaJ7keAACYmmRPAAAAAAAAAACWZVk+1y4AAAAAAAAAAACwjQ1jAAAgH8n1AAAAnbBgAgAAAAAAAACQj+R6AAAAAAAAAAAAAACyud5Q8Nv3c8WSrPtUuwAAAAAAAPDM2+vJL/kQSp0C9hI/AGhNRNukfQMAgD/YuR4AAAAAgGZJ7gAAAAAAAEqRXA8AAAAAAADwgAe9AOjNpe369v1cuSRAJPc2AJQhuR4AAACAEJKOAAAAANpxb65GUi4AAKz7VLsAzOvt9WTRHQAAAAAAAACgELkaAACwzs71AAAAAAAAAAAwIYn2AADwM8n1AAAAAAAAQLceJQVe//u37+dSxQEAAACgY5LrAQAAAAAAAAAAAAAI19uvJUmuBwAAAAAAptHbQg4AAJR06S/71RcAAHJqud8puR4AAAAAAAAAADrnQVIYj/saAMqTXA8AAEzFJCQAAAAAALMzVw7ws5Z3UAagrE+1CwAAPXt7PZl4AgAAAAAAAAAAgAHYuR4AAACAX1w/RGqnHgAAZmG3SgD4g7khYFbGBAAUT67X+GCHZwAAAOiL+RwAAAAAgDaYrwXWeEAOjrNzPQDT2/PQjweFAAAAAAD6IQEJAACAkd3LZTIWhn2aTq53Y8/Bk1IAAADQFw+bAgAAAMxD/g4AADOpllyv4w1ALyQOAQAAAAAAACXJq4E5yU8AgPqyJ9fr7JPbbR171MlUB4Gc1to7bSEAR5lIBQD4wTgbgBK2jMW1SQCUZJ4YxqRPCQDtqbZzPdxzpMMYOZDUcQUA6Nt13/DZQ5hr7wHgZxFj70djbnEYgFrMB0O/9vRP3fMAtE4SPUBZ4i4zMBaGNMWS61MaIQ0WrbHAD0R41lHd05GNeCip1PmAP7iP+vDo15FyXTf1ApiR+R8AAAAAYFa386PmS9tj/Q5gXnaupwuPkpuOHGPL3+6dR8cJOCr3oDg1Tm15gKilgbw4TAtu74kt9fHZBNmeB13W3n/kAZotZerpXjwSw1qKf63J8QBCT/UKAIgXMQcIEbaMuWAUa7E2st73sNGHdmcMYjjQs0dtkTYKoC7rV3Ma9bqP+rloR6m+a+66XD253s3ajlzX4kgifMSxUs5z5BcWUpLqekg46mGiG1pUuoOQ+7x74vGenfmfxdReH3Y6kjxNfikP1z1L7ols49eOs+VefxQfIurfnnsxekGzh3t/qz3Xc8tro+rhtS0PWmwpx9bPs+V1I9QBaFULC7Z74hHQp1IPoF+II6xpoQ2EUlLGpDnGmSnv6WEuYMt8UsvlByhJHx0gzix9zZZy2rYec/Rr0ouIDel60GOZ4VrKvVqqvldPrt/C4CqPLQmTvuvtjuz0umVXrq270e65fmsBR0IDlLcnsTf63LXv8SOdptqLVikxtfb3zB8iE5xzPwh45LW5Jw723LfPYtv1sbYurPcwcdBiLN9af46WKdKRBPxW2jv6NWod6jmGjnot9nyuUesnbYuudxHxqIe5zx7v1y1lbnXsG9WnbeXzsF+Ja9lSrOlJ6f5o7rrQQ/86Qitxf5bvG5YlfkOT2kbpZ+3ZSMqvdkG80vNqqe+peb/3OLe658HbnGuIu5XkMwAAFlNJREFU4nX7cmyWF5G/0qIe+mA9lLFlOb6/iI32jp6nlC6S63NL3W2z1A7lLRjx6a1S5Tuys2zK8ba8J0c9lDxK6/Ys9rYsRwck1/lSEjSfxYfIna22nG/L8R5NdEYce41YOpec8alUYnfEa3PHq1x6Svzvua4xl62Lk6V+4evIe1tq00e6T6MT2HJOOK4dd8s8wZ73pva7W6qnpCkda7bUu61jqojz733/nnnhPYkze8uRy5Z7f8+cZA5b4mEr7Zqxflsi5paujfDgW+15gah+Wyv3fIrW6sI9R5JGUv9+fZ6IRBfaEFHPb4+R0sfs3bP6vOcBx9x9kxzX4shYeEufdrb2h/5EtotbYumWTSF7jLNH4uKzJPQ9xyg1d70n/kf0AVPmFHLN36bkYJWw1p71MDboTe3rvUcrfdoj+aGlHlY/0ufb07es9V1Ez0ndHjeyH5zrnttznlz18XQ+bz/g169fz+/v70kn2PolrjV2z96z1qHbk9jy7LV7EjVbagyPVOyIyTTqqbXgtKf+n06nj/P5/DVDcZoREVNb2iXsyIJ0ymtuX7d1cJj7ibmWtbrYXENEP6E2MfW+nP1UuCd33IhIOhvlAbMIkQuvYuq6iLq1Z35g6/Gu9XgfbPlujNvz7PqWaye5I+1JRKJEju8ohZh635Z5yz1zrluOT1ui28TWHF0EqyVH3yJi3k5Mva/0HHh0u9xa8l/0OLPFe7ymo335Iw8hRySQtUxf9Velxv6lN3DLFTdzPOTf4n0Vcb1yzUnmjEfmUtKIqfcdiasXEUnLpZSO74zJOpaY+kipHNXUY+TuMxxJBo+w5/OlvGdtHqT02DPHWkmpmBZRF2rXtVyiY2pScv3pdPrnsiy/J5cAIN1fzufzb7ULkZOYChQkpgLEEVMB4oipAHHEVIBYQ8dVMRUobOiYuiziKlCUmAoQ52FMTUquBwAAAAAAAAAAAACAEX2qXQAAAAAAAAAAAAAAAKhNcj0AAAAAAAAAAAAAANOTXA8AAAAAAAAAAAAAwPQk1wMAAAAAAAAAAAAAMD3J9QAAAAAAAAAAAAAATE9yPQAAAAAAAAAAAAAA05NcDwAAAAAAAAAAAADA9D6nvPjLly/nl5eXTEUB+OHj4+Nf5/P5t9rlyElMHdN//v3xy7/96c9/q1AS+EFMpaZLXBQLGYWYCuvEfVKIqQBxxFSAWKPHVTEVKGn0mLos4ipQjpgKEGctpiYl17+8vCzv7+8xpQJYcTqdfq9dhtzE1DG9vZ5++bdv311n6hJTqekSF8VCRiGmwrof/eEfD51++36uUxiaJ6YCxBFTAWKNHlfFVKCk0WPqsoirQDliKkCctZj6qWRBAAAAAAAAAAAAAACgRZLrAQAAAAAAAAAAAACYnuR6AAAAAAAAAAAAAACmJ7keAAAAAAAAAAAAAIDpSa4HAIDGvb2elrfXU+1iAAAAAAAAAADA0CTXAwAAAAAAAAAAAAAwPcn1AAAAAAAAAAAAAABMT3I9AAAAAAAAAAAAAADTk1wPAAAAAAAAAAAAAMD0JNcDAAAAAAAAAAAAADA9yfUAAAAAAAAAAAAAAExPcj0AAAAAAAAAAAAAANOTXA8AAAAAAAAAAAAAwPQ+1y4AAAAwvrfX03//+9v3c8WSAAAAAAAAAADAfXauBwAAAAAAAAAAAABgepLrAQAAAAAAAAAAAACYnuR6AADoxNvraXl7PdUuBgAAAAAAAAAADElyPQAAAAAAAAAAAAAA0/tcuwAAAMB47LAPAAAAAAAAAEBv7FwPAAAAAAAAAAAACd5eTzacAoAB2bkeAAAAgEMsIAEAAAAAAAAjsHP9IDwJCQAAAAAAAAAAAACwn+R6AAAAAAAAAAAAAACm97l2AQAAAAAA4JnLL3d++36uXBIAAABgFpf5iAvzEuWZEwKgNDvXAwAAAAAAAAAAAAAwPcn1AAAAAAAAAAAAAABM73PtAgAAAAAAAAAAAEDr3l5PtYsAAGQmuR4AMrsMrr99P1cuCT1TjwAAAAAAgDXWEgDiSKIHgHl9ql0AAAAAAAAAAAAAgEfeXk8eegCgCMn1AAAAAAAAAAAAAABM73PtAnCMp/G4dV0n/NwfAPRNXw+AEfhJeuAo/WIAaI9+PgAAALTP+H0fO9cDAAAAkMTP7wIA0Dt9WmBkYhwAAMB+dq6HgXnqCKB/Jr8BgJbpqwAAAAAAs5OfA0DrtFVp7FzfmWdPmHsCnVzULQAAAAAAAIA5WB8GAABmZef6ThnEAvTHE4AAAAAAAHVZYwNmdh0DL+tV1q8AAI7Rn4LxSK4HAAAAYJWJYQBGpH0DSOPBBGjXs/tzy/2rbwQAcIz+FIxDcj2wykQpAAAAAABQ2u36hOQEgHRra72P/nb77/d2u996XrEbaNWe2AYAI9BX30ZyPQxCEjwA0AJ9EvYwgAcAAOAZCVAA7TM/DAAAjEByPbCLBCj4WcpkofsHuHYvJmz9CV9xhN7lXmxzr0C8I/etexIAAADGYIwPQAke2qJX+kq0QAw9RnI9kETQhXg61UAv7BA3vtptUq7z3x639ueEXhj/ATAL/UNoy5Z+qPsWuHYbN8SGfG6/a/EYGMGjNYQjx7oQH2Fs1lFgXJLrByXxCYCttBltMgibz55rvvYe9/MPORZ4Rls02rModuQ7EOMgzWgxB+AocRGAC21Cfa4Be7WWfFirLt+bJ7stQ89zaffWoMQNsD5bUmTiPOW4TsBMao9F9EXuk1zfgegOw7OOo5tln9pBbstrcpTNoA/2G2V3j17L3QLfXZtcl1+l9DdSjnfkO97Th015z6PP8+g9uR90SEl2Tznvs+t277zP2q8c1/eePdfPZCzc1+K8gPYYWBZtN/moWzCnZ2NFfc/HxE2e6fk+ejTXtSx5P8/afdXjPddjmaE3cjPSrMX3re+JLIdrFsv3Si/UVfhhy4PFLZkmuX7mQJUjsWTLwnuLi/PLkn/A0XJdi0goo22lB9RR52v5vqmhZpzaei1mjhF76uvM31dPtiyiPEu4Tkmw7qFe5C5j5P10ZOf/lN1Kck3Gbk3a35LsvvbalDIdeX3u45Q+NtSSe4G/1oMoe8amxgqQxr0D7gPKUM9+OLImZDwXa+u1GH23bOqI/KXD3LE1V/3WNjxWe9OpR+fbM9/S03Xesm7R0+eZ0YztsTo5pj25ZinHVF9oWUt1VYxtx5bcg0d9V+P3/LpOrjfpk0fuiYQjooP6s4SqLYmntepYy9eJNqQmSZeeuNpTltxPsB3dJbeEyInplF1Ran/u0lKSZSMeVGppIDWTlDbv2Wtr7XZxxFq9a62syyIp+4hSn6/0Ll+jX7feRTzMF3W+Vo5f6mHnZw+CtSiq7xXxntn5zvoXcT+1MD7poZ0vEW9zz4P07lHbeiRpK3I+pIV7iXL21J1a7e5aWZ/F31xrNDmOlXtskCLng7G5HmKIuDbR4yixtG9HNsa4dmQeM2Jzjohj99DXbcnWPl9UPEyNXS3HqT3rFuYF2rIntuTqd5Te2C/yta24d422xrh7r0k9b8Sx1o4bkb9wVES+SURO2Np7xVdqilh7iphTHm2sWHs+InL8vizH+ts5x1w1nM7n7YX6+vXr+f39PekEW7+wlMm7UmpfsFa+hxa10Cnb6mhgSen07ZX7/ttzvU6n08f5fP4aXpiGHImpKZOHe+rQkUnCiATNPccoca/U8Oy7aPEXKHIs6JTuVEctkomp5eTsp/Yud+J8xAOHo8bwPWo/wDkbMfW+PTH1IqXu5pqEOXLe1InzqL5YiXu/xXmXPbbs0FGrD1Y6Ge3R+Y/8EsDagk+ORGIx9b6Ua1nK1j7lvXtxz6YWe8t1z5F4nGOOY+9x9pxn6/nuXaOcbVN0nLo9bq77I8fYKrJtEFPvO/JwxUWp+7jW+agnuo/Zej2JXttLabeN/391ZOx/z7O+Xs36GdlHiFhza/1e7V1UO5pjffWIlATNXHkER4weU5clPa5GP0D0TO45hj2xVnzMI/p77XkNr4c1N/3U+0qtU10cmQPPsUZ+79g5c1322PMwUEru17NrkevhlZbjRW2l1itK52yvxdSk5PrT6fTPZVl+jyoYwIq/nM/n32oXIicxFShITAWII6YCxBFTAeKIqQCxho6rYipQ2NAxdVnEVaAoMRUgzsOYmpRcDwAAAAAAAAAAAAAAI/pUuwAAAAAAAAAAAAAAAFCb5HoAAAAAAAAAAAAAAKYnuR4AAAAAAAAAAAAAgOlJrgcAAAAAAAAAAAAAYHqS6wEAAAAAAAAAAAAAmJ7kegAAAAAAAAAAAAAApie5HgAAAAAAAAAAAACA6UmuBwAAAAAAAAAAAABgep9TXvzly5fzy8tLpqK07z///liWZVn+9Oe/VS4Jo7jUqVvq2LJ8fHz863w+/1a7HDnNHlPX3N4b7gk4RkwFiCOmQhz9fsRUgDhiKjlZH2NGo8dVMbVN4i2jGj2mLou4CpQjpgLEWYupScn1Ly8vy/v7e0ypOvT2elqWZVm+fZ/3OyDWpU7dUseW5XQ6/V67DLnNHlPX3N4b7gk4RkwFiCOmQhz9fsRUgDhiKjlZH2NGo8dVMbVN4i2jGj2mLou4CpQjpgLEWYupn0oWBAAAAAAAAAAAAAAAWiS5HgAAAAAAAAAAAACA6X2uXYAe3P5MOQAAAAAAAMzksl727fu5ckkAAAAAIB871wMAAAAAAABVvL2ebHQFAAAAQDMk1wMAAAAAAAAANMBDRwAAAHVJrgcAAAAAAAAAAAAAYHqS6wEAAAAAAAAAAAAAmN7n2gXo0fVPsH37fq5YEgAAAAAAAAAAAAAAIti5HmBQb6+nnx4GAgAAAAAAAAAAAOAxyfUAAAAAAAAAAAAAAExPcj0AAAAAAAAAAAAAANOTXA8AAAAAAAAAAAAAwPQk1wMAAAAAAAAAAAAAMD3J9QAAAAAAAAAAAAAATE9yPQAAAAAAAAAAAAAA05NcD0Dz3l5Py9vrqXYxAAAAAAAAAAAAgIFJrgcAAAAAAAAAAAAAYHqfaxcAAAAAAAAAAGA2Kb/cfHntt+/nXMUBAABgkVwPQENSJhABAAAAAAAAAAAAIn2qXQAAAAAAAABgbm+vJxuwAAAAAFCdnesBAAAAKEbCFAD8v/bu5cptGwoAqOQesk4TU0BKSWkpJQVMisg6RcgLnzmWGZHC54H48N6dPSIJkeAjPo8QAAAAAACjklwPHUgkAAAAAAAArsxcCQAAAAAj+ta7AAAAAAAAAAAAAAAA0JuV6wGApT2vgPXHn4+OJQEAABjPV59JfwkAAAAAAEByPQAAAAAAAADAkJ4XEdr+e+8lWS/RAgAAlJNcD7CQ7eAaAAAAAACU2Btv9kuRAAAAAKzsW+8CAAAAAAAAAAAAAOf4+6+7BRwBYIeV6+FEqY1Sq74AtOFnUAEAxqUvDAAAAAAAAPRm5XoAAAAAAAAAgMlYdRgAACCelesBmMarwUErWgIAAEA+CTgAAAAAAHAtX3MDcu6OWbkeYHFWrAAAAHrSJwEAAAAAAABmYeV6AGBJErgAAAAAAAAAAADIIbkegvnZDAAAcm1fCNKWBAAAYCXmTgDOsR1nFH+BmYlhABDHIqV5JNdDEMEH+ihJRtQJBwCA8+k3AwCsx1grQDs5/Wh9bmBl2pxtOb8A8H+S66Gx2oEMjViIYVARAADOo/0NcF3GMwEAAKhhbBGYnfExmJ/k+koCIXs09iFdy/vFvdieZyEAAAAAwDUZHwYAAPhBjhKsQ3I9AJfVctD/ucH8tX+TDONwLQAAAABgTMbugCuQeAVc3bbNJy4CACORXH9Aw40UZ9cTg8pwrHfsTjn+Cvfxq++Z+r1ebTvzuQAA4Kfe7XEAAMamvQgAQKkV5tlHoE0OAO9JrodCGpvMRkfzve19HXWuWsaLmkT1lDpRU29anc/t/tVp4HYTEwAAYDTa6DCvkvFM9/z1mCcDAEpoQ4xLmx4AfpJcH0QDA5jdcyf2jFg2Uqd5ryyzxvYW5c7Z57vzWbv/3OMCbM0Q32coI0BL4iAAMLNXY629x+ygNfURAChhjnc8Z+eOAMCILptcf9QQ0HBjhjow8iDlyGVbRcRq4ttJnZT9H227V5YZ7qcINas5HdmbfEvZNrVMR5N9pfsslbOafkSZ3tX157+1Xomf6/G8jBEZD6PK8e6aXuXZCBBBGwzirfaCOePQzoXjsdbWxyndpnXcjxi7+/JcVs+tc4nxlHKvOgercB0Zlbr5Xutz5BqMxzVhJOojI1M/j3VPrn81GBOxaq0LPr4RrtUIZUg148DlTOd3FntJxTVJ9hHlqN3f6Hp+t8hE8pLj9XJ2OVJW1S/Zh/jHs1Hur5mUrIxR8ksbrz77LpkzJ6lfLABW1qvdJrYC9CEOQ72z76OV2mtXHFvpHXdrXuQ4+tWGlEVPXv2deV1xBdyz53feSRkLvcq1OfLuOqUshuU8EiXnufjuPk6pqzW/ZH52vS+JW5GxLmcBw9ZlGjmGp9bLs+rc0X1Q85yuWXRrxOtGmt5tO/aNHBf3RD7zidMtuT4liS314ZqS5Jnz2RopK3/0ruA537emMZ16/JJVPl+dz9x9vPu/WfSqTzOfsxW1uh6uM+wrWS275tdyNIzHUjPYk/L3koGc3G1GqlMl7fvUffb47GgTZ0d6D4DDs9595Wi9VgbdK0dNP/rd/q7gqt+btYzcJvlydtvEvf2rVpPMkdd1tcQ8dXAdvRfEiLo3ZnhWbK16H+1di5Rr1CphrHYfJeM9JUmrq9aJ2dTkAtDPVa5NqwTN7d9WP4/UqVlcqPYz28/m5AWltlFytq1Rk9D+rNc12G4zYtzIfSky5cWDiHm5qGvRot1LH6l1csT7jBh7fdCaZ0R0fUmNF1Hxq2Zst+TFve1xc/c5mvvjkV7Qj4+Px+fnZ9YBPED2RVaSXuc5IqEsZb8RbwiuXhdHeitzb5857vf7P4/H4yOsEAMSU4ESYuprLWLqURLi3mdnjdMtV5NLeauadFGd/5z6n7rflMHRFivSlbzsUlPnxdTXcq5lxMtlEQklURMve8etuc9KyhLRj54pZud836MVM1O2Ly3TSCLjfso2qcTU11Ke4Sn1+tW+UkSP99Ws3pWzzxZt9ppz8ep4qbHraNuSezJiIqTFc+CsseWUfaVs02JStqRMe8TUY9HJ55H3RnQbbPYxilIR92jOWEb0M+IMR+2HFnW7tZI+QY7V42pNTE0R3ebqpWYsadT7KGqMcG8frfqXZ7XBWqh51kc9k3pbPabebvlxddQYcVUtxi5qRLQ1S7blfNqpr8mn+qF1UnjNXFtJez9ijqamzxrdB46eX+RXZ7Vxj2JqVnL9/X7/73a7/RtVMIADvz8ej996F6IlMRU4kZgKEEdMBYgjpgLEEVMBYi0dV8VU4GRLx9TbTVwFTiWmAsTZjalZyfUAAAAAAAAAAAAAALCib70LAAAAAAAAAAAAAAAAvUmuBwAAAAAAAAAAAADg8iTXAwAAAAAAAAAAAABweZLrAQAAAAAAAAAAAAC4PMn1AAAAAAAAAAAAAABcnuR6AAAAAAAAAAAAAAAuT3I9AAAAAAAAAAAAAACXJ7keAAAAAAAAAAAAAIDLk1wPAAAAAAAAAAAAAMDlfQeWyMNWWXK37QAAAABJRU5ErkJggg==\n", + "text/plain": [ + "<Figure size 3888x2160 with 234 Axes>" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import h5py\n", + "import json\n", + "import matplotlib.pyplot as plt \n", + "import numpy as np\n", + "\n", + "with h5py.File('data/12kb-similarity-search.h5', 'r') as f: \n", + " knn_ae_12kb = f['knn_ae'][:]\n", + " knn_eq_12kb = f['knn_eq'][:]\n", + " knn_sax_12kb = f['knn_sax'][:]\n", + " top_xcorr_12kb = f['top_xcorr'][:]\n", + "\n", + "show = 5\n", + "\n", + "N = (show + 1) * 5\n", + "\n", + "T = len(targets_12kb)\n", + "sz = data_12kb[0].size\n", + "\n", + "plt.figure(figsize=(6 * T, N))\n", + "\n", + "ymax = 1.0\n", + "\n", + "show_predictions = False\n", + "\n", + "for i, target in enumerate(targets_12kb):\n", + " ax = plt.subplot(N, T, (i + 1))\n", + " \n", + " ax.set_facecolor(\"#eeeeee\")\n", + " \n", + " plt.bar(np.arange(sz), data_12kb[target], color='#000000', width=1.0)\n", + "\n", + " plt.ylim(0, ymax)\n", + " plt.xticks([], [])\n", + " plt.yticks([], [])\n", + "\n", + " for j, hit in enumerate(knn_ae_12kb[i][:show]):\n", + " plt.subplot(N, T, ((j + 1) * T) + (i + 1))\n", + " plt.bar(np.arange(sz), data_12kb[hit], color='#d24f00', width=1.0) # orange = CAE\n", + " plt.ylim(0, ymax)\n", + " plt.xticks([], [])\n", + " plt.yticks([], [])\n", + " plt.subplots_adjust(top=0.9)\n", + " \n", + " for j, hit in enumerate(topk_dtw[i][:show]):\n", + " plt.subplot(N, T, ((j + 6) * T) + (i + 1))\n", + " plt.bar(np.arange(sz), data_12kb[hit], color='green', width=1.0) # orange = CAE\n", + " plt.ylim(0, ymax)\n", + " plt.xticks([], [])\n", + " plt.yticks([], [])\n", + " plt.subplots_adjust(top=0.9)\n", + "\n", + " for j, hit in enumerate(knn_eq_12kb[i][:show]):\n", + " plt.subplot(N, T, ((j + 11) * T) + (i + 1))\n", + " plt.bar(np.arange(sz), data_12kb[hit], color='#008ca8', width=1.0) # blue = EQ\n", + " plt.ylim(0, ymax)\n", + " plt.xticks([], [])\n", + " plt.yticks([], [])\n", + "\n", + " for j, hit in enumerate(knn_sax_12kb[i][:show]):\n", + " plt.subplot(N, T, ((j + 16) * T) + (i + 1))\n", + " plt.bar(np.arange(sz), data_12kb[hit], color='#a6227a', width=1.0) # purple = SAX\n", + " plt.ylim(0, ymax)\n", + " plt.xticks([], [])\n", + " plt.yticks([], [])\n", + "\n", + " for j, hit in enumerate(top_xcorr_12kb[i][:show]):\n", + " plt.subplot(N, T, ((j + 21) * T) + (i + 1))\n", + " plt.bar(np.arange(sz), data_12kb[hit], color='#bf9f00', width=1.0) # yellow = Zero-nornalized X correlation\n", + " plt.ylim(0, ymax)\n", + " plt.xticks([], [])\n", + " plt.yticks([], [])" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Importing the dtw module. When using in academic works please cite:\n", + " T. Giorgino. Computing and Visualizing Dynamic Time Warping Alignments in R: The dtw Package.\n", + " J. Stat. Soft., doi:10.18637/jss.v031.i07.\n", + "\n", + "Preprocessing:\n", + "0:0\n", + "10000:28\n", + "20000:30\n", + "30000:34\n", + "40000:34\n", + "50000:34\n", + "60000:34\n", + "70000:39\n", + "80000:48\n", + "90000:49\n", + "100000:49\n", + "110000:52\n", + "120000:52\n", + "0\n", + "1\n", + "2\n", + "3\n", + "4\n", + "5\n", + "6\n", + "7\n", + "8\n", + "9\n", + "10\n", + "11\n", + "12\n", + "13\n", + "14\n", + "15\n", + "16\n", + "17\n", + "18\n", + "19\n", + "20\n", + "21\n", + "22\n", + "23\n", + "24\n", + "25\n", + "26\n", + "27\n", + "28\n", + "29\n", + "30\n", + "31\n", + "32\n", + "33\n", + "34\n", + "35\n", + "36\n", + "37\n", + "38\n", + "39\n", + "40\n", + "41\n", + "42\n", + "43\n", + "44\n", + "45\n", + "46\n", + "47\n", + "48\n", + "49\n", + "50\n", + "51\n", + "Preprocessing done. Took 28.18 seconds (0.5 minutes).\n", + "Target #0 done! Took 11.02 seconds (0.2 minutes).\n", + "Target #1 done! Took 11.10 seconds (0.2 minutes).\n", + "Target #2 done! Took 10.90 seconds (0.2 minutes).\n", + "Target #3 done! Took 10.49 seconds (0.2 minutes).\n", + "Target #4 done! Took 10.73 seconds (0.2 minutes).\n", + "Target #5 done! Took 10.41 seconds (0.2 minutes).\n", + "Target #6 done! Took 10.34 seconds (0.2 minutes).\n", + "Target #7 done! Took 10.41 seconds (0.2 minutes).\n", + "Target #8 done! Took 10.31 seconds (0.2 minutes).\n", + "[ 11975 80854 100423 113956 6129 77520 4669 78275 1762 20047]\n", + "Done! Took 123.90 seconds (2.1 minutes).\n" + ] + } + ], + "source": [ + "from Flaskserver.main import preprocess\n", + "import _lsh\n", + "\n", + "topk_dtw = []\n", + "\n", + "dtw_12kb = np.zeros((data_12kb.shape[0], len(targets_12kb)))\n", + "data = np.reshape(data_12kb, (len(data_12kb), len(data_12kb[0]), 1))\n", + "print('Preprocessing:')\n", + "t0 = time()\n", + "r,a,sd = preprocess(data_12kb)\n", + "print('Preprocessing done. Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))\n", + "\n", + "for i, target in enumerate(targets_12kb):\n", + " t1 = time()\n", + " query = data_12kb[target]\n", + " query = np.reshape(query, (len(data_12kb[0]), 1))\n", + " candidates, distances, _ = _lsh.lsh(data, query, r, a, sd)\n", + " topk_dtw.append(candidates)\n", + " print('Target #{} done! Took {:.2f} seconds ({:.1f} minutes).'.format(i, time() - t1, (time() - t1) / 60))\n", + " \n", + "print(candidates[0:10])\n", + "print('Done! Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))\n" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[5, 6, 7, 8]\n" + ] + } + ], + "source": [ + "def permute(A, P, n): \n", + " \n", + " # For each element of P \n", + " for i in range(n): \n", + " next = i \n", + " \n", + " # Check if it is already \n", + " # considered in cycle \n", + " while (P[next] >= 0): \n", + " \n", + " # Swap the current element according \n", + " # to the permutation in P \n", + " t = A[i] \n", + " A[i] = A[P[next]] \n", + " A[P[next]] = t \n", + " \n", + " temp = P[next] \n", + " \n", + " # Subtract n from an entry in P \n", + " # to make it negative which indicates \n", + " # the corresponding move \n", + " # has been performed \n", + " P[next] -= n \n", + "\n", + "A = [5, 6, 7, 8] \n", + "P = [3, 2, 1, 0] \n", + "n = len(A) \n", + "permute(A,P,n)\n", + "print(A)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'k' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)", + "\u001b[0;32m<ipython-input-10-bce9b05cd905>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0mt0\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtime\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mdist\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mcdist\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdata_12kb\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdata_12kb\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m80503\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mreshape\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m1\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdata_12kb\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m80503\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0msize\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mmetric\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'euclidean'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mflatten\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mnp\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0margsort\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mdist\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;36m1\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;36m2\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0mk\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;36m1\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;36m2\u001b[0m \u001b[0;34m*\u001b[0m \u001b[0;36m0\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 4\u001b[0m \u001b[0mprint\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'Done! Took {:.2f} seconds ({:.1f} minutes).'\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mformat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mtime\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mt0\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0mtime\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m-\u001b[0m \u001b[0mt0\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m/\u001b[0m \u001b[0;36m60\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;31mNameError\u001b[0m: name 'k' is not defined" + ] + } + ], + "source": [ + "t0 = time()\n", + "dist = cdist(data_12kb, data_12kb[80503].reshape((1, data_12kb[80503].size)), metric='euclidean').flatten()\n", + "np.argsort(dist)[1 + (2 * 0):5 + 1 + (2 * 0)]\n", + "print('Done! Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.5" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/experiments/Compare Algorithms.ipynb b/experiments/Compare Algorithms.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..ffee0cf8e7b814227cf8c06301d59955733957d5 --- /dev/null +++ b/experiments/Compare Algorithms.ipynb @@ -0,0 +1,597 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "import numpy as np\n", + "import json\n", + "import h5py\n", + "import os\n", + "import sys\n", + "from time import time\n", + "import warnings\n", + "\n", + "# Ignore warnings as they just pollute the output\n", + "warnings.filterwarnings('ignore')\n", + "\n", + "# Enable importing modules from the parent directory\n", + "module_path = os.path.abspath(os.path.join('..'))\n", + "if module_path not in sys.path:\n", + " sys.path.append(module_path)\n", + "module_path = os.path.abspath(os.path.join('../experiments'))\n", + "if module_path not in sys.path:\n", + " sys.path.append(module_path)\n", + "\n", + "# DNase-seq 2011, hg19\n", + "bw = 'data/ENCFF158GBQ.bigWig'" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "./data/ENCFF158GBQ.bigWig already exist. To overwrite pass `overwrite=True`\n", + "./models/dnase_w-12000_r-100.h5 already exist. To overwrite pass `overwrite=True`\n" + ] + } + ], + "source": [ + "from download import download_encode_file, download_file\n", + "from pathlib import Path\n", + "\n", + "Path('data').mkdir(parents=True, exist_ok=True)\n", + "Path('models').mkdir(parents=True, exist_ok=True)\n", + "\n", + "download_encode_file('ENCFF158GBQ.bigWig')\n", + "\n", + "download_file(\n", + " \"https://zenodo.org/record/2609763/files/dnase_w-12000_r-100.h5?download=1\",\n", + " \"dnase_w-12000_r-100.h5\",\n", + " dir=\"models\"\n", + ")" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "from scipy.spatial.distance import cdist\n", + "\n", + "def knn(data, target_idx, k, metric='euclidean', sax = None, ignore: int = 0, sort_only: bool = False):\n", + " \"\"\"K nearest neighbors\n", + " \n", + " Find the `k` nearest neighbors of a \n", + " \"\"\"\n", + " \n", + " target = data[target_idx]\n", + " \n", + " if sort_only:\n", + " dist = data\n", + " else:\n", + " if sax is None:\n", + " dist = cdist(data, target.reshape((1, target.size)), metric='euclidean').flatten()\n", + "\n", + " else:\n", + " N = data.shape[0]\n", + " dist = np.zeros(N)\n", + " for i in range(N):\n", + " dist[i] = sax.distance_sax(target, data[i])\n", + "\n", + " # Ensure that the target is always first\n", + " dist[target_idx] = -1\n", + " for i in range(1, ignore + 1):\n", + " dist[min(target_idx + i, data.shape[0] - 1)] = -1\n", + " dist[max(target_idx - i, 0)] = -1\n", + " \n", + " return np.argsort(dist)[1 + (2 * ignore):k + 1 + (2 * ignore)]" + ] + }, + { + "cell_type": "code", + "execution_count": 9, + "metadata": {}, + "outputs": [], + "source": [ + "from scipy.signal import correlate\n", + "\n", + "def norm(data, zero_norm: bool = False):\n", + " mean = np.mean(data) if zero_norm else 0\n", + " \n", + " return (data - mean) / np.std(data)\n", + "\n", + "def norm2d(data, zero_norm: bool = False):\n", + " mean = np.mean(data, axis=1).reshape(-1, 1) if zero_norm else np.zeros((data.shape[0], 1))\n", + " std = np.std(data, axis=1).reshape(-1, 1)\n", + " \n", + " return (data - mean) / std\n", + "\n", + "def xcorrelation(data, template_idx, n, normalize=False, zero_normalize=False, ignore: int = 0):\n", + " unknown = data\n", + " template = data[template_idx]\n", + " \n", + " if norm:\n", + " unknown = norm2d(unknown, zero_norm=zero_normalize)\n", + " template = norm(template, zero_norm=zero_normalize)\n", + " \n", + " xcorr = np.apply_along_axis(lambda m: correlate(m, template, mode='full'), axis=1, arr=unknown)\n", + " xcorr[np.where(np.isnan(xcorr))] = 0\n", + "\n", + " max_xcorr = np.nanmax(xcorr, axis=1)\n", + " \n", + " # Ensure that the target is always last\n", + " max_xcorr[template_idx] = -1\n", + " for i in range(1, ignore + 1):\n", + " max_xcorr[min(template_idx + i, data.shape[0] - 1)] = -1\n", + " max_xcorr[max(template_idx - i, 0)] = -1\n", + " \n", + " return np.argsort(max_xcorr)[::-1][:n]" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Extracted 124621 windows from chr1 with a max value of 1.0.\n", + "Done! Took 27.24 seconds (0.5 minutes).\n" + ] + } + ], + "source": [ + "import bigwig\n", + "\n", + "t0 = time()\n", + "data_12kb = bigwig.chunk(bw, 12000, 100, 12000 / 6, ['chr1'], verbose=True)\n", + "print('Done! Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAAdAAAAKFCAYAAAB89rjZAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nO3de3DU9b3/8dcmUDaQkAuERAwYrkaiIAZsJSCX0hNQELkqRwSRMx5QGIVabz9FQD3joLYFPXBqGWwQKh0RDlq5iNUgxqo1EDgELSUQLiEabiEkYSEJ+/uD6ZaFJCYf9rv73d3nYyYz8L3t53t9fd+f/e6uw+12uwUAAJokItANAAAgGBGgAAAYIEABADBAgAIAYIAABQDAAAEKAIABAhQAAAMEKGCxoqIi3XHHHYqPj1dycrJmzpypmpoaSdJf/vIXpaWlqWXLlho8eLAOHjzomW/evHlq3ry5oqOjPX/79+/3Wu7gwYPVsmVLpaWl6eOPP/aM+/TTT3XTTTcpLi5Obdq00ejRo1VcXOy/lQbCAAEKWOzhhx9Wu3btVFJSovz8fG3dulVLlizR8ePHNWbMGL3wwgs6efKk+vTpo3vuucdr3nvuuUcVFRWev86dO3vGTZw4Ub1799aJEyf00ksvady4cTp27JgkqUePHtq8ebPKysp09OhRdevWTTNmzPDregOhjgAFLHbgwAFNmDBBTqdTycnJGjZsmAoKCrR27Vqlp6dr/Pjxcjqdmjdvnnbu3KnvvvvuR5e5d+9ebd++XfPnz1dUVJTGjh2rm266Se+9954kKSkpSe3bt/dMHxkZqX379lm2jkA4IkABiz366KNavXq1qqqqVFxcrI0bN3pCtFevXp7pWrVqpS5duqigoMAz7IMPPlBCQoLS09O1dOlSz/CCggJ17txZMTExnmG9evXymvfQoUOKi4tTVFSUXn31VT3xxBMWrykQXghQwGIDBw5UQUGBWrdurZSUFPXp00d33323KioqFBsb6zVtbGyszpw5I0maMGGCvv32Wx07dky///3vtWDBAr3zzjuS9KPzSlLHjh1VVlam48eP68UXX1RaWprFawqEFwIUsNCFCxeUlZWlMWPGqLKyUsePH9epU6f05JNPKjo6WuXl5V7Tl5eXe6rKHj16qH379oqMjFS/fv306KOPas2aNZL0o/NeKiEhQVOmTNGoUaM8Dy8BuHoEKGChkydP6vDhw5o5c6ZatGihNm3aaOrUqdqwYYPS09O1c+dOz7SVlZUqLCxUenp6nctyOBz6548npaena//+/V4V586dO+udt6amRqWlpVeELgBzBChgobZt26pTp05aunSpampqVFZWpuzsbPXq1UujR4/W7t279d5778nlcmnBggXq2bOnp6t1/fr1OnXqlNxut77++mstXrxYo0aNkiR1795dN998s+bPny+Xy6V169Zp165dGjt2rCRp7dq1+vvf/64LFy7o2LFjmjNnjnr37q2EhISAbQsg1BCggMXWrl2rTZs2KTExUV27dlWzZs30m9/8RomJiXrvvff0//7f/1N8fLy++uorrV692jPf6tWr1bVrV8XExGjy5Ml68sknNWXKFK/x33zzjeLj4/XUU09pzZo1SkxMlCQVFxdr2LBhiomJ0U033aSIiAitW7fO7+sOhDIHP6gNAEDTUYECAGCAAAUAwAABCgCAAQIUAAADBCgAAAaaNWXi3NxcOZ1Oq9oCC+04dNzr/707tg1QSwA0xqXnLOdr4LhcLmVmZtY5rkkB6nQ6lZGR4ZNGwb+GLFvu9f/TS7MC1BIAjeF9znr/luvppQ/6tzFhLC8vr95xdOECAGCAAAUAwECTunABAKEndsa/uovpHm48KlAAAAxQgQJAA6jOUB8qUAAADFCBAgA8Lq24JaruhlCBAgBggAo0TPG+DtB0nDe4FBUoAAAGqEBD2OXvZQAAfIcKFAAAA1SgAGAT9BoFFypQAAAMUIECQBDjc5uBQwUKAIABAhQAAAMEKAAABghQAAAM8BARABjg4R1QgQIAYIAKFAAuEexfZsAX3vsPFSgAAAYIUAAADNCFG2KCvfspVNCNBoQ+KlAAAAxQgQKAxXzdI0FPkz1QgQIAYIAKNAhZeTfL+3XA1QuGCjEY2mh3BGiQ4ySwB/YDGosb1tBBgAIICw3d5AQqyKy+8SKsrUWAAoAP2L0Xwu7tC0YEKICQRWjYXzBXyQSojdR3IHERCG7BfIEIF5xj9Wvo+K1vu4XLcU6ABlAwnLR2fN8IQGA09pplem0LtptNArQJ/BkmgQrXYAj1UMXvSwL/0thrUSDPk4AGaKCqGytCorF3TqEUUI3tvvHFtrFjmITSvgxm7AcEisPtdrsbO3FeXp4yMjJ89uKhFKDwH1+/P9zYYy0Yjhtf37yZ3gxZLRj2BQLD18dlQ7ln2wC9lOkb15xkMMEDXNaq7wLHtoYv2DZAc3Nz5XQ6fdYwAADszOVyKTMzs85xTQpQAABwEb/GAgCAAQIUAAADBCgAAAYIUAAADBCgAAAYIEABADBAgAIAYIAABQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAn7wj3/8Q06nU5MmTZIk7dmzR3369FF8fLzi4+M1dOhQ7dmzxzP9uXPnNH36dCUlJSkhIUEjR45UcXGxZ/wXX3yhW2+9VTExMerZs6c+//xzz7icnBxFREQoOjra85edne2/lQXCBAEK+MEjjzyivn37ev7fvn17rVmzRidPntTx48d111136d577/WMX7Rokf76179q165dOnr0qOLi4jRr1ixJ0smTJ3XXXXfpV7/6lcrKyvTEE09o5MiROnXqlNfyKyoqPH9Tpkzx38oCYYIABSy2evVqxcXF6ec//7lnWFxcnFJTU+VwOOR2uxUZGal9+/Z5xh84cEBZWVlKSkqS0+nUvffeq4KCAkkXq8+kpCSNHz9ekZGRmjRpkhITE7V27Vq/rxsQzghQwELl5eWaO3euXnvttTrHx8XFyel0atasWXrmmWc8w6dNm6bc3FwdPXpUVVVVWrVqlYYPHy5JcrvdcrvdXstxu93avXu35/+lpaVKSkpSp06dNHv2bFVWVlqwdkB4I0ABCz333HOaNm2aOnToUOf4srIynT59Wm+88YZ69+7tGd69e3d17NhR1157rVq3bq1vv/1Wc+fOlST169dPR48e1TvvvKPq6mplZ2ersLBQVVVVkqS0tDTl5+erpKREn3zyifLy8jRnzhzrVxYIMwQoYJH8/Hx9/PHHmj17doPTtWrVStOnT9fkyZNVWloqSZoxY4ZcLpdOnDihyspKjRkzxlOBtmnTRuvXr9evf/1rJSUladOmTRo6dKhSUlIkScnJyerRo4ciIiLUqVMnLVy4UGvWrLF2ZYEw1CzQDQBCVU5OjoqKitSxY0dJUkVFhWpra7Vnzx5t377da9oLFy6oqqpKxcXFateunXbu3KmXXnpJCQkJkqRZs2Zp7ty5On78uNq2bauBAwfqb3/7mySppqZGXbp00S9/+cs62/HP91kB+BYVKGCRhx56SIWFhcrPz1d+fr6mT5+uO++8U5s3b9aWLVu0Y8cO1dbWqry8XHPmzFF8fLxuuOEGSVLfvn21YsUKnT59WtXV1VqyZInat2+vtm3bSpJ27Nih6upqlZeX6/HHH1dKSoqysrIkXQzuQ4cOye126/Dhw3rqqac0atSogG0HIFQRoIBFWrZsqeTkZM9fdHS0nE6nEhMTVVZWpokTJyo2NlZdunTRvn37tGnTJjmdTknSq6++KqfTqW7duikxMVEbNmzQunXrPMteuHCh2rZtqw4dOqikpMRr3Pbt23XbbbepVatW6tevn2688UYtXrzY7+sPhDqHm74dAACajAoUAAADBCgAAAYIUAAADBCgAAAYaNLnQHNzcz1PCQJW2nHoeL3jends68eWAAhnLpdLmZmZdY5rUoA6nU5lZGT4pFFAQ4YsW17vuNNLs/zYEgDhLC8vr95xdOECAGCAAAUAwAABCgCAAQIUAAADBCgAAAYIUAAADBCgAAAYIEABADBAgAIAYIAABQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMNCkH9QGrBQ7o/4f0QZgP5ees6eXPhjAlgQGAQrA58L9worwQIACAK5aON408R4oAAAGqEARdMLxTheA/RCgAACfuvyBwFC90SVA/YzqCQBCA++BAgBggAoUIStcupHsjv2AUEWAArhqfAkGGhKqb13RhQsAgAEqUISNUL0LBvyFngZvBCjQgIYuGKEUwtxcAE1HgFqMOzb/Yntbi6D1LR6wCm4EaABx8gS3xoZJoELH9PjiJgSX8vXxEErXPQIUQc2Ki73JMu1yUfBn+HFhhS8Ec68GAYqwFMwnbbCze+Ue7uiBaDwCFAFlh5M1kFVbOFSqDWlsO+yy3XyhoXXmpiG4EKA2Eqonj10u1v5kGgyXuvQYCMdt2JBQPVcuZfoEuMm24fgyQ4DaVLBdIDgBfc/q9xgRvHyxL4P5eLDLx8sIUABBLdhuNv0p2EIy2Npr2wD19Unhi+6Qq53HVFPe/7na9l4+XbAd0AhvvqhMrKhuOI9Ck8PtdrsbO3FeXp4yMjJ89uK+Pqj8GWoAAPvxdS9EQ7nXpADNzc2V0+n0WcMAALAzl8ulzMzMOsc1KUABAMBF/JwZAAAGCFAAAAwQoAAAGCBAAQAwQIACAGCAAAUAwAABCgCAAQIUAAADBCgAAAYIUAAADBCgAAAYIEABADBAgAIAYIAABQDAAAEKWGzSpEm65ppr1Lp1a3Xv3l3Lli2TJO3Zs0d9+vRRfHy84uPjNXToUO3Zs+eK+c+fP6+0tDSlpKR4DR88eLASExPVunVr9erVS+vXr/ca/8c//lHXXXedWrVqpbvvvlsnT560biWBMMTvgQIWKygoUNeuXdWiRQt99913GjRokD788EN16dJFZWVluu6663ThwgX993//t5YtW6Zdu3Z5zf/SSy9p8+bN2r9/v44cOeIZvmvXLvXo0UPNmjXTV199paFDh2rv3r265pprVFBQoJ/97Gf68MMPdcstt+ihhx7ShQsXtHr1an+vPhCyqEABi6Wnp6tFixaSJIfDIYfDocLCQsXFxSk1NVUOh0Nut1uRkZHat2+f17wHDhzQypUr9fTTT1+x3J49e6pZs2ae5VZXV+vw4cOSpFWrVmnkyJG6/fbbFR0drRdeeEFr167VmTNnLF5bIHwQoIAfPPzww2rZsqXS0tJ0zTXX6I477vCMi4uLk9Pp1KxZs/TMM894zTdr1iz913/9l6Kioupc7ogRI+R0OvXTn/5UgwYNUp8+fSRdrHp79erlma5Lly76yU9+or1791qwdkB4IkABP1iyZInOnDmjbdu2acyYMZ6KVJLKysp0+vRpvfHGG+rdu7dn+Lp161RTU6PRo0fXu9w///nPOnPmjDZs2KCsrCxFRFw8pSsqKhQbG+s1bWxsLBUo4EMEKOAnkZGR6t+/v44cOaKlS5d6jWvVqpWmT5+uyZMnq7S0VJWVlXriiSf0+uuv/+hymzdvruHDh2vz5s16//33JUnR0dEqLy/3mq68vFwxMTG+WyEgzDULdAOAcFNTU6PCwsIrhl+4cEFVVVUqLi6Ww+FQUVGRBgwYIOnik7inT59WcnKyvvzyS6Wmpja43PT0dO3cudMzbv/+/Tp37py6d+9uzUoBYYgKFLBQaWmpVq9erYqKCtXW1mrz5s165513NGTIEG3ZskU7duxQbW2tysvLNWfOHMXHx+uGG27QjTfeqMOHDys/P1/5+flatmyZkpKSlJ+frw4dOui7777Txo0bdfbsWVVXV2vlypX67LPPNHDgQEnSfffdpw8++EDbtm1TZWWl5s6dqzFjxlCBAj5EBQpYyOFwaOnSpZo+fbouXLig6667Tr/97W81atQovfvuu5o1a5aOHDmiqKgo9e3bV5s2bZLT6ZQkJScne5aTkJCgiIgIzzC326158+Zpz549ioyMVLdu3fSnP/1Jt9xyi6SLFej//M//6L777tOJEyc0dOhQvfXWW/7fAEAI43OgAAAYoAsXAAADBCgAAAYIUAAADBCgAAAYaNJTuLm5uZ4nBAEACHUul0uZmZl1jmtSgDqdTmVkZPikUQAA2F1eXl694+jCBQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAwQoAAAGCFAAAAwQoAAAGCBAAQAwQIACAGCAAAUAwAABCgCAAQIUAAADzQLdAABoqtgZyz3/Pr30wQC2BOGMChQAAANUoACCGtUoAoUKFAAAA1SggE1cWklJVFOA3VGBAgBggAAFAMAAXbhAAF3ebQsgeFCBAgBggAoUXniQBQAahwANQnzuDeGGrm7YEQEa5KgYQxc3SoC9EaA2Ut8Fk7tvmODmCrAWAWpTdglNqiDUh2MD4Y4A9ZH6Ao8LCy5llxujYGCyrai64U8EqMU4oREOOM4RjghQQ76oJOxSjdilHaifL7pLTZbBsdF4dGmHn4AGaDAccL6+gFh9QWrsg0h23d6hIlDHdjAEnj/baOV+aGg9QvV8C9X1MhX0FWhjT0aeavVm9/eXGvtagWxToATbRcyu260+DW3PQN0AB5LdrxWB5HC73e7GTpyXl6eMjAyfvbhdTixcvWDoEjQ5iUP1GA1kSAAmAhXCDeVekwI0NzdXTqfTZw0DAMDOXC6XMjMz6xzXpAAFAAAX8WssAAAYIEABADBAgAIAYIAABQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAwQo4Af/+Mc/5HQ6NWnSJEnSl19+qV/84hdKSEhQYmKixo8fr5KSEs/08+bNU/PmzRUdHe35279/vyTp0KFDXsOjo6PlcDj02muvSZJycnIUERHhNT47O9v/Kw2EOAIU8INHHnlEffv29fz/1KlTeuihh1RUVKSDBw8qJiZGU6dO9ZrnnnvuUUVFheevc+fOkqSOHTt6Df+///s/RUREaOzYsZ5527dv7zXNlClT/LOiQBhpFugGAKFu9erViouLU79+/bRv3z5J0vDhw72mmTlzpgYOHGi0/BUrVuj2229Xamrq1TYVQBNQgQIWKi8v19y5cz3dq/X57LPPlJ6e7jXsgw8+UEJCgtLT07V06dJ6512xYsUVFWZpaamSkpLUqVMnzZ49W5WVleYrAaBOBChgoeeee07Tpk1Thw4d6p1m165dWrBggV555RXPsAkTJujbb7/VsWPH9Pvf/14LFizQO++8c8W827Zt0w8//KBx48Z5hqWlpSk/P18lJSX65JNPlJeXpzlz5vh2xQAQoIBV8vPz9fHHH2v27Nn1TrNv3z4NHz5cixYt0oABAzzDe/Toofbt2ysyMlL9+vXTo48+qjVr1lwxf3Z2tsaOHavo6GjPsOTkZPXo0UMRERHq1KmTFi5cWOe8AK4O74ECFsnJyVFRUZE6duwoSaqoqFBtba327Nmj7du36+DBgxo6dKiee+453X///Q0uy+FwyO12ew07e/as3n33Xa1bt67J8wK4elSggEUeeughFRYWKj8/X/n5+Zo+fbruvPNObd68WcXFxRoyZIgeeeQRTZ8+/Yp5169fr1OnTsntduvrr7/W4sWLNWrUKK9p1q1bp7i4OA0ePNhreE5Ojg4dOiS3263Dhw/rqaeeumJeAFePAAUs0rJlSyUnJ3v+oqOj5XQ6lZiYqGXLlmn//v2aP3++1+c1/2n16tXq2rWrYmJiNHnyZD355JNXPCiUnZ2tyZMny+FweA3fvn27brvtNrVq1Ur9+vXTjTfeqMWLF/tlnYFw4nDTtwMAQJNRgQIAYIAABQDAAAEKAIABAhQAAAMEKAAABpr0RQq5ublyOp1WtQWAgR2Hjtc5vHfHtn5uCRB6XC6XMjMz6xzXpAB1Op3KyMjwSaMA+MaQZcvrHH56aZafWwKEnry8vHrH0YULAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAwQoAAAGCFAAAAwQoAAAGCBAAQAwQIACAGCAAAUAwECTflAbQODFzqj7B7QB+BcVKAAABqhAgRB1eaV6eumDAWoJEJqoQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAzyFCwQBPvsJ2A8VKAAABqhAAZvyddV56fL4TChw9QhQwI/4cgMgdBCgQABRFQLBi/dAAQAwQAUK2ARP2gLBhQoUAAADVKDgfTgAMECAhim6C/3Hjtu6oaeBG2ovN1jAvxCg8MLHLMKTHUM+UDgH0FgEKBpE927jcNEFwg8BehkuhPVr7LYJ9m3Y2Gos2NbLF0wqVSu2U33tsPq16OrGpRxut9vd2Inz8vKUkZFhSUOacmI29uAMVLeU3dsXSFZfWHxxgQ/H/eJPvjgGfB2gvt7noRqgVtw0XO22t3pbN5R7AQ1QLlQAwkFje2tw9XwdqD4L0NzcXDmdTp81DAAAO3O5XMrMzKxzXJMCFAAAXMQ3EQEAYIAABQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAwQoAAAGCFAAAAwQoEAArF69WjfccINatWqlLl26aNu2bTp//rzGjRun1NRUORwO5eTkeM3z6aefavDgwYqNjVVqaqrXuNLSUk2cOFHt27dXbGysMjMz9dVXX/lvhYAwRIACfrZlyxY9+eSTeuutt3TmzBl99tln6ty5sySpf//+WrlypZKTk6+Yr1WrVnrwwQf1yiuvXDGuoqJCffv2VV5enk6ePKkpU6bozjvvVEVFheXrA4QrflAb8LN+/fpp2rRpmjZtWr3TpKSkaOXKlRo0aNAV4z7++GP9x3/8h4qKihp8ndatW+vTTz9VRkbGVbYYQF2oQAE/qq2t1TfffKNjx46pa9euSklJ0cyZM3X27Fmfvk5+fr7Onz+vrl27+nS5AP6FAAX86IcfflB1dbXWrFmjbdu2KT8/Xzt27NCLL77os9coLy/X/fffr+eff16xsbE+Wy4AbwQo4EdRUVGSpFmzZumaa65R27ZtNWfOHG3YsMEnyz979qxGjhypn/3sZ3r66ad9skwAdSNAAT+Kj49XSkqKHA6Hz5d97tw53X333br22mv1u9/9zufLB+CNAAX8bOrUqXr99ddVWlqqU6dO6be//a1GjBgh6WIIulwuSdL58+flcrn0z+f8Lly4IJfLperqarndbrlcLp0/f16SVF1drXHjxikqKkorVqxQRASnNmA1nsIF/Ky6ulqPPvqo/vjHP8rpdGrChAlauHChnE6nUlNTdfDgQa/pDxw4oNTUVOXk5Gjw4MFe4wYOHKicnBxt3bpVgwYNUlRUlFd4bty4UQMGDPDLegHhhgAFAMAA/TwAABggQAEAMECAAgBggAAFAMBAs6ZMnJubK6fTaVVbAACwFZfLpczMzDrHNSlAnU4nX0wNAAgbeXl59Y6jCxcAAAMEKAAABghQAAAMEKAAABho0kNECE2xM5Z7/n166YMBbAkABA8CFF4uDVOJQAWA+tCFCwCAAQIUAAADBCgAAAYIUAAADPAQEQAEGZ6ctwcqUAAADBCgAAAYoAsXAIIYn90OHCpQAAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAwQoAAAGCFAAAAwQoAAAGCBAAQAwwHfhhqnLvz8zUPhZJuDH2eV8hTcqUAAADFCBwjaoRgEEEwIUDfJ1qNEVBViLG1H/IUBhzA4nKr+FCCBQCFBYzp9Vpx1CHWa4GUKwIUDhE1Z39XIxRagI95u8UDq3CVD4HO9zwhdCKWg4J+oXzPs5LAM0lO6A/MkuF4HGtsOf+5ljKnAaOh5M9kNj96Uv9nlDy7DL+XYpjnNvYRmgl/P1CWhHdjwZm8IX7a9vGaGyj4OR6X41vYm6Wg0tL9jPMRONrR5DddsQoE1g0tXQlAOnvrtPLvDWauw+unw/mFwUrL6Dt+PNoJU3P/4QqIfggpnV62GX66PD7Xa7GztxXl6eMjIyfPbiphcuK1/LjsJ9/eHNijt9f3Zvw3+C+drR2BtWqwO0odwLigo03E9A3nfApaw4H+xyR4/As8v11o7POlwuKAIU3uxygCP0mXYJc4zaQ7i/R2m1JnXh5ubmyul0WtkeAABsw+VyKTMzs85xTQpQAABwET9nBgCAAQIUAAADBCgAAAYIUAAADBCgAAAYIEABADBAgAIAYIAABQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAhb79ttvNWTIEMXGxqpr165at26dJOn8+fMaN26cUlNT5XA4lJOT4zVfWVmZpkyZonbt2qldu3aaN2+e1/jBgwcrMTFRrVu3Vq9evbR+/Xqv8a+//ro6deqk1q1bq0+fPvr888+tXE0g7BCggIVqamo0atQojRgxQidPntSbb76pSZMmae/evZKk/v37a+XKlUpOTr5i3tmzZ6uqqkpFRUX6+uuv9fbbb+utt97yjF+0aJFKSkpUXl7uWW5JSYkk6auvvtJTTz2lNWvW6PTp05o2bZpGjx6t2tpa/6w4EAYIUMBC3333nY4eParZs2crMjJSQ4YMUWZmpt5++2395Cc/0WOPPab+/fsrMjLyink/+OADPfHEE2rZsqVSU1M1bdo0LV++3DO+Z8+eatasmSTJ4XCourpahw8fliQVFRUpPT1dGRkZcjgcmjx5so4fP67S0lL/rDgQBghQwEJut7vOYbt3727y/HXNN2LECDmdTv30pz/VoEGD1KdPH0nS8OHDVVtbq6+++kq1tbVavny5br755jorXQBmCFDAQmlpaWrXrp1eeeUVVVdX66OPPtLWrVtVVVX1o/MOGzZML7/8ss6cOaN9+/Zp+fLlV8z35z//WWfOnNGGDRuUlZWliIiLp3RMTIzGjh2r/v37q0WLFpo/f77efPNNORwOS9YTCEcEKGCh5r0qGzgAABVKSURBVM2b63//93/14YcfKjk5Wa+99pomTJiglJSUH5138eLFioqKUrdu3TRq1ChNnDixzvmaN2+u4cOHa/PmzXr//fclScuWLdPy5ctVUFCg8+fPa+XKlRoxYoSOHj3q83UEwhUBClisZ8+e2rp1q06cOKHNmzdr//79uvXWW390voSEBK1atUrff/+9CgoKdOHChQbnq6mpUWFhoSRp586dGjlypLp3766IiAgNGzZM11xzjb744gufrRcQ7ghQwGK7du2Sy+VSVVWVXn31VZWUlOiBBx6QJJ07d04ul0vSxY+1uFwuz/uehYWFOnHihGpra7Vx40a9+eabevbZZyVdfDhp48aNOnv2rKqrq7Vy5Up99tlnGjhwoCSpb9+++vDDD7V//3653W5t2bJFe/fu1Y033uj/DQCEqGaBbgAQ6t5++20tW7ZM1dXVGjBggLZs2aIWLVpIkq6//nodPHhQkpSVlSVJOnDggFJTU5WXl6fHHntMZWVl6t69u1atWqX09HRJFx8omjdvnvbs2aPIyEh169ZNf/rTn3TLLbdIkiZPnqzCwkINGjRIp06dUkpKin73u98pLS0tAFsACE0Od12PCQIAgAbRhQsAgAECFAAAAwQoAAAGCFAAAAw06Snc3NxcOZ1Oq9oCAICtuFwuZWZm1jmuSQHqdDqVkZHhk0YBAGB3eXl59Y6jCxcAAAMEKAAABghQAAAM8FV+CBuxM/71Y9Snlz4YwJYACAVUoAAAGCBAAQAwQIACAGCAAAUAwAABCgCAAQIUAAADBCgAAAb4HChC1qWf+wQAX6MCBQDAAAEKAIABunABP7q8W5mvFASCFwEKAD7GjVJ4oAsXAAADBCgAAAYIUAAADBCgAAAYIEABADBAgAIAYICPsQCAxS79WAsfaQkdBChgMb6TFwhNdOECAGCAChRhiS41AFeLAAUCiCAHghdduAAAGCBAAQAwQBcuQgpPvALwFwIUAHyAm7fwQ4AiqNn1omXXdgHwHQIU8AECEwg/BCgA+BEfXQodBChgyNdV5+XL4+Jqb/Q6gACF5Rq60JiEBBcu36Mqqh/HG+pDgCIoLp5WXsR8HfC+Ul+77LqP6kNlXT+2TXBzuN1ud2MnzsvLU0ZGhs9ePBgu3I1l5cXO9CRraPuaBJLJ6wa7S9fZrutlZRXvz31ueq6Eag9HsF8T62N67AXqhrKh3AuKAG3sCdJQ0PgirO1yYl3KF8Fo+lr+el00LJhDoiG+Pt44fsODrwPVZwGam5srp9Pps4YBAGBnLpdLmZmZdY5rUoACAICL+DJ5AAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAwQoAAAGCFAAAAwQoAAAGCBAAQAwQIACAGCAAAUAwAABCgCAAQIUsFhRUZHuuOMOxcfHKzk5WTNnzlRNTY2+/PJL/eIXv1BCQoISExM1fvx4lZSUeOY7d+6cpk+frqSkJCUkJGjkyJEqLi72jP/iiy906623KiYmRj179tTnn3/u9brHjh3Tv//7vysuLk7x8fG67777/LbOQDggQAGLPfzww2rXrp1KSkqUn5+vrVu3asmSJTp16pQeeughFRUV6eDBg4qJidHUqVM98y1atEh//etftWvXLh09elRxcXGaNWuWJOnkyZO666679Ktf/UplZWV64oknNHLkSJ06dcoz/5gxY5ScnKyDBw+qtLRUjz/+uN/XHQhlBChgsQMHDmjChAlyOp1KTk7WsGHDVFBQoOHDh2v8+PFq3bq1WrZsqZkzZyo3N9drvqysLCUlJcnpdOree+9VQUGBpIvVZ1JSksaPH6/IyEhNmjRJiYmJWrt2rSTpo48+0uHDh/XKK68oNjZWzZs3V+/evQOy/kCoIkABiz366KNavXq1qqqqVFxcrI0bN2rYsGFXTPfZZ58pPT3d8/9p06YpNzdXR48eVVVVlVatWqXhw4dLktxut9xut9f8brdbu3fvliR9+eWXuv766zVlyhS1adNGffv21datWy1cSyD8EKCAxQYOHKiCggK1bt1aKSkp6tOnj+6++26vaXbt2qUFCxbolVde8Qzr3r27OnbsqGuvvVatW7fWt99+q7lz50qS+vXrp6NHj+qdd95RdXW1srOzVVhYqKqqKknSkSNH9NFHH2nw4MH6/vvv9ctf/lKjRo3S8ePH/bfiQIgjQAELXbhwQVlZWRozZowqKyt1/PhxnTp1Sk8++aRnmn379mn48OFatGiRBgwY4Bk+Y8YMuVwunThxQpWVlRozZoynAm3Tpo3Wr1+vX//610pKStKmTZs0dOhQpaSkSJKioqKUmpqqadOmqXnz5rr33nvVoUMHry5iAFeHAAUsdPLkSR0+fFgzZ85UixYt1KZNG02dOlUbNmyQJB08eFBDhw7Vc889p/vvv99r3p07d+qBBx5QQkKCWrRooVmzZunrr7/2VJEDBw7U3/72N508eVJvv/22/v73v+vWW2+VJPXs2VMOh8O/KwuEGQIUsFDbtm3VqVMnLV26VDU1NSorK1N2drZ69eql4uJiDRkyRI888oimT59+xbx9+/bVihUrdPr0aVVXV2vJkiVq37692rZtK0nasWOHqqurVV5erscff1wpKSnKysqSJI0ePVqnTp1Sdna2amtrtWbNGhUXFyszM9Ov6w+EMgIUsNjatWu1adMmJSYmqmvXrmrWrJl+85vfaNmyZdq/f7/mz5+v6Ohoz98/vfrqq3I6nerWrZsSExO1YcMGrVu3zjN+4cKFatu2rTp06KCSkhKvcQkJCXr//ff16quvKjY2Vi+//LLWr1/vCV8AV8/hvvxRPgAA8KOoQAEAMECAAgBggAAFAMAAAQoAgAECFAAAA82aMnFubq6cTqdVbQEAwFZcLle9n59uUoA6nU5lZGT4pFEAANhdXl5evePowgUAwAABCgCAgSZ14QKhInbGcs+/Ty99MIAtARCsqEABADBAgAIAYIAABQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAG+TB5h49IvkAeAq0WAAn50eYjzSzBA8CJAEfYINQAmeA8UAAADVKBAAxr64W1+lBsIbwQo0EgNPYRENzAQfghQwGI8/QuEJt4DBQDAAAEKAIABunCBAOJBJCB4EaDAZYL5PUsCGfAfAhSwQDCHMIDGIUCBIEdYA4FBgAI2wWdJgeBCgAI2VV9lSbAC9kCAIqhRtQEIFD4HCgCAASpQBJ3GPjQT7g/XUJ0D1iJAgSBjxY0Bnx8Fmo4ARVCg6rx6jQ1JwjR0+GJfNnROhfvxETYBykEA/IvpDQnnSvCyYl+G+81W2ARoQ8L9IDBl8jGLxt7IUEnaUzh8tMaKm207XmPsco7Zcds0lm0D1BcHsckB0th5fNEG06BpyNUegHY5qRBc7FqpmnRb+2J5jV1GYzXltQJ1Dvvi5rih7WvHmzeH2+12N3bivLw8ZWRk+OzFfR0SXPwbj2oPdmDFTWSg+POcCqXt5mu+DtSGcq9JAZqbmyun0+mzhgEAYGcul0uZmZl1jmtSgAIAgIv4JiIAAAwQoAAAGCBAAQAwQIACAGCAAAUAwAABCgCAAQIUAAADBCgAAAYIUAAADBCgAAAYIEABADBAgAIAYIAABQDAAAEKAIABAhTwozfeeEN9+vRRixYt9MADD3iN+8tf/qK0tDS1bNlSgwcP1sGDB73Gb9++Xbfffruio6OVlJSkRYsWecYVFRVp8ODBatmypdLS0vTxxx/7Y3WAsEaAAn7Uvn17Pfvss3rwwQe9hh8/flxjxozRCy+8oJMnT6pPnz665557vMYPGzZM//mf/6kTJ05o3759+rd/+zfP+IkTJ6p37946ceKEXnrpJY0bN07Hjh3z23oB4Ygf1AYC4Nlnn9WRI0f0hz/8QZL05ptv6g9/+IO++OILSVJlZaXatm2rHTt2KC0tTc8884wOHz6st99++4pl7d27VzfddJOOHz+umJgYSdKAAQN03333afr06X5bJyDcUIECNlBQUKBevXp5/t+qVSt16dJFBQUFkqQvv/xSCQkJ6tevn9q1a6eRI0fq0KFDnnk7d+7sCU9J6tWrl2deANYgQAEbqKioUGxsrNew2NhYnTlzRpJ05MgRZWdna9GiRTp06JA6deqkiRMnNmpeANZoFugGAJCio6NVXl7uNay8vNxTVUZFRWn06NHq27evJOn5559X27Ztdfr06R+dF4A1qEABG0hPT9fOnTs9/6+srFRhYaHS09MlST179pTD4fCM/+e/3W630tPTtX//fq+Kc+fOnZ55AViDAAX8qKamRi6XS7W1taqtrZXL5VJNTY1Gjx6t3bt367333pPL5dKCBQvUs2dPpaWlSZKmTp2qdevWKT8/X9XV1XrhhRfUv39/xcXFqXv37rr55ps1f/58uVwurVu3Trt27dLYsWMDvLZAiHMD8Jvnn3/eLcnr7/nnn3e73W73li1b3Ndff73b6XS6Bw4c6D5w4IDXvEuWLHG3b9/eHRcX5x4xYoT70KFDnnEHDhxwDxw40O10Ot3du3d3b9myxY9rBYQnPsYCAIABunABADBAgAIAYIAABQDAAAEKAICBJn2RQm5urpxOp1VtAWChHYeOe/7du2Pbesdd6vLpEH7qOzYuF6rHisvlUmZmZp3jmhSgTqdTGRkZPmkUAP8asmy559+nl2bVO+5Sl0+H8FPfsXG5UD1W8vLy6h3HV/kBQS52xqXB+GADUwLwJd4DBQDAABUoEGQurTgBBA4VKAAABghQAAAM0IULhCi6egFrUYECAGCAClR8DAAA0HRhGaB0bQEArhZduAAAGAjLChQId/TCAFePChQAAAMEKAAABujCBQB40L3feFSgAAAYoAK9zOV3X3wuFMGE6gHwHypQAAAMEKAAABggQAEAMECAAgBggAAFAMAAAQoAgAECFAAAAwQoAAAG+CIFAPXii0WA+hGgP+LSCwgXDwDAPxGgQBDgK/oA+yFAAQBXLRx763iICAAAA2FTgdIFBgD+ES4Pn4VNgALBhps++AvHmhkCFECjheP7XEB9CNAm4OIBKwVbFdBQezk/EA4IUMCPwuW9IdhfsN2w2REBClisoQsVF7HQxI1SeHC43W53YyfOy8tTRkaGz17cn12iVl+owvEEaez+C8eub4KxfnY8BnxxjPpin/ti29j92PP1/rf6ZqWh3AupCjSQB059r335zmxsGy+dzy7vNTW2kmpsmF6uoXUO1Ho2tk12v2jZSaBuqBq7j+x4HYE92aYCvZzJicXBZ6ax29ou29c0uOpbT7usF7yFQzUWjqzer1SgTcAJYi07bl/TNtlxXVA/094KhCY77ucmVaC5ublyOp1WtgcAANtwuVzKzMysc1yTAhQAAFzEl8kDAGCAAAUAwAABCgCAAQIUAAADBCgAAAYIUAAADBCgAAAYIEABADBAgAIAYIAABQDAAAEKAIABAhQAAAMEKAAABghQAAAMEKCAhd544w316dNHLVq00AMPPOAZfv78eY0bN06pqalyOBzKycnxmq+srExTpkxRu3bt1K5dO82bN88z7tChQ4qOjvb6czgceu211yRJOTk5ioiI8BqfnZ3th7UFwkuzQDcACGXt27fXs88+q82bN+vs2bNe4/r376/HHntM48ePv2K+2bNnq6qqSkVFRSotLdXPf/5zXXfddZo6dao6duyoiooKz7QHDhxQ165dNXbsWK/XPXLkiHUrBoAABaw0ZswYSdI333zjFWg/+clP9Nhjj0mSIiMjr5jvgw8+0MaNG9WyZUulpqZq2rRpWr58uaZOnXrFtCtWrNDtt9+u1NRUa1YCQJ3owgVsyu12e/179+7ddU63YsUKTZkyxWtYaWmpkpKS1KlTJ82ePVuVlZWWthUIRwQoYEPDhg3Tyy+/rDNnzmjfvn1avny5qqqqrphu27Zt+uGHHzRu3DjPsLS0NOXn56ukpESffPKJ8vLyNGfOHH82HwgLBChgQ4sXL1ZUVJS6deumUaNGaeLEiUpJSbliuuzsbI0dO1bR0dGeYcnJyerRo4ciIiLUqVMnLVy4UGvWrPFn84GwQIACNpSQkKBVq1bp+++/V0FBgS5cuKBbb73Va5qzZ8/q3XffvaL79nIOh8OrOxiAb/AQEWChmpoa1dTUqLa2VrW1tXK5XGrWrJmaNWumc+fOeYLt/PnzcrlcatGihRwOhwoLCxUXF6e4uDh99NFHevPNN7V161avZa9bt05xcXEaPHiw1/CcnBx17txZHTp00JEjR/TUU09p1KhRfltnIFxQgQIWevHFFxUVFaWXX35ZK1euVFRUlF588UVJ0vXXX6+oqCgVFxcrKytLUVFROnjwoCQpLy9PN910k2JiYvT0009r1apVSk9P91p2dna2Jk+eLIfD4TV8+/btuu2229SqVSv169dPN954oxYvXuyfFQbCiMNN3w4AAE1GBQoAgAECFAAAAwQoAAAGCFAAAAwQoAAAGGjS50Bzc3PldDqtagsAALbicrmUmZlZ57gmBajT6VRGRoZPGgUAgN3l5eXVO44uXAAADBCgAAAY4LtwAQC2Eztjudf/Ty99MEAtqR8VKAAABghQAAAMEKAAABggQAEAMECAAgBggKdwAQC2cPmTt3ZHBQoAgAECFAAAAwQoAAAGeA8UAXXpex52/KYRAKgPFSgAAAYIUAAADBCgAAAYIEABADBAgAIAYICncOFXwfZNIwBQHypQAAAMEKAAABggQAEAMECAAgBggIeIbIqvuAMAeyNAAYtxMwSEJgJUXOAAwO7seJ0OqQC9/DOGdtnIaBw7niAAUJ+QClBfIIRhpYaOL449ILgQoEEg2C+sfPtQ/dg2QPAiQG2EiykABI+wDFCCCgDsIZivxyEdoMG8YxoSDg/bBHu3NYDQF9IBCgAIbYG82Q76ALW6ygyHas/XQrXy9zeOPYQiX1wf7HKNCfoADXfh0tVJmNhbuByHwKUIUARdOAVDe319h+yLdW6oTXbdjrA3u1SCgRLQAA2GC+Glgq29JoLtIuvP9oZyleXrYzsczhWr2WUbhntINsQ2FWhTLoR236GNPfADuR5WVkiwVmPPFX8+H2BXVraxKaF2te1oyvxXG7bBsF/twuF2u92NnTg3N1dOp9PK9gAAYBsul0uZmZl1jmtSgAIAgIsiAt0AAACCEQEKAIABAhQAAAMEKAAABghQAAAMEKAAABggQAEAMECAAgBggAAFAMDA/wf6bnHeYyXbdQAAAABJRU5ErkJggg==\n", + "text/plain": [ + "<Figure size 576x810 with 9 Axes>" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "from utils import plot_windows_from_data\n", + "\n", + "k_12kb = 20 # Number of KNNs to be saved later on\n", + "targets_12kb = [80503, 43895, 33430, 42575, 6112, 91938, 82896, 1060, 11975]\n", + "targets_12kb_ex = 12933\n", + "\n", + "plot_windows_from_data(data_12kb, window_ids=targets_12kb)" + ] + }, + { + "cell_type": "code", + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Done! Took 85.77 seconds (1.4 minutes).\n" + ] + } + ], + "source": [ + "\"\"\"Compute the CAE latent space\"\"\"\n", + "\n", + "from utils import get_models, predict\n", + "\n", + "encoder_12kb, decoder_12kb, autoencoder_12kb = get_models('models/dnase_w-12000_r-100.h5', loss_fn='bce')\n", + "\n", + "t0 = time()\n", + "predicted_12kb, _, latent_12kb = predict(\n", + " encoder_12kb,\n", + " decoder_12kb,\n", + " data_12kb.reshape(data_12kb.shape[0], data_12kb.shape[1], 1)\n", + ")\n", + "print('Done! Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))\n", + "\n", + "with h5py.File('data/cae_12kb.h5', 'w') as f:\n", + " f.create_dataset('latent_space', data=latent_12kb, dtype=np.float32)" + ] + }, + { + "cell_type": "code", + "execution_count": 7, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Preprocessing done! Took 115.74 seconds (1.9 minutes).\n", + "Done! Took 13.87 seconds (0.2 minutes).\n" + ] + } + ], + "source": [ + "\"\"\"Compute SAX\"\"\"\n", + "\n", + "from tslearn.piecewise import SymbolicAggregateApproximation\n", + "\n", + "t0 = time()\n", + "sax_12kb = SymbolicAggregateApproximation(n_segments=120, alphabet_size_avg=10)\n", + "sax_data_12kb = sax_12kb.fit_transform(data_12kb)\n", + "print('Preprocessing done! Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))\n", + "t0 = time()\n", + "N = data.shape[0]\n", + "dist = np.zeros(N)\n", + "target = sax_data_12kb[80503]\n", + "for i in range(N):\n", + " dist[i] = sax_12kb.distance_sax(target, sax_data_12kb[i])\n", + "print('Done! Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Search for window #80503.... done! Took 16.87 seconds (0.3 minutes).\n", + "Search for window #43895.... done! Took 16.10 seconds (0.3 minutes).\n", + "Search for window #33430.... done! Took 15.50 seconds (0.3 minutes).\n", + "Search for window #42575.... done! Took 15.87 seconds (0.3 minutes).\n", + "Search for window #6112.... done! Took 16.19 seconds (0.3 minutes).\n", + "Search for window #91938.... done! Took 16.08 seconds (0.3 minutes).\n", + "Search for window #82896.... done! Took 15.96 seconds (0.3 minutes).\n", + "Search for window #1060.... done! Took 17.08 seconds (0.3 minutes).\n", + "Search for window #11975.... done! Took 16.38 seconds (0.3 minutes).\n" + ] + } + ], + "source": [ + "from time import time\n", + " \n", + "with h5py.File('data/cae_12kb.h5', 'r') as f:\n", + " cae_12kb = f['latent_space'][:]\n", + "\n", + " \n", + "with h5py.File('data/12kb-similarity-search.h5', 'w') as f:\n", + " f.create_dataset('knn_ae', shape=(len(targets_12kb), k_12kb), dtype=np.int)\n", + " f.create_dataset('knn_eq', shape=(len(targets_12kb), k_12kb), dtype=np.int)\n", + " f.create_dataset('knn_sax', shape=(len(targets_12kb), k_12kb), dtype=np.int)\n", + " f.create_dataset('top_xcorr', shape=(len(targets_12kb), k_12kb), dtype=np.int)\n", + " \n", + " for i, target in enumerate(targets_12kb):\n", + " t0 = time()\n", + " print('Search for window #{}'.format(target), end='', flush=True)\n", + " f['knn_ae'][i] = knn(cae_12kb, target, k_12kb, ignore=2)\n", + " print('.', end='', flush=True)\n", + " f['knn_eq'][i] = knn(data_12kb, target, k_12kb, ignore=2)\n", + " print('.', end='', flush=True)\n", + " f['knn_sax'][i] = knn(sax_data_12kb, target, k_12kb, sax=sax_12kb, ignore=2)\n", + " print('.', end='', flush=True)\n", + " f['top_xcorr'][i] = xcorrelation(data_12kb, target, k_12kb, normalize=True, zero_normalize=True, ignore=2)\n", + " print('. done! Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))" + ] + }, + { + "cell_type": "code", + "execution_count": 12, + "metadata": { + "scrolled": false + }, + "outputs": [ + { + "data": { + "image/png": "iVBORw0KGgoAAAANSUhEUgAAC9cAAASiCAYAAAAF/PuQAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjIsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+WH4yJAAAgAElEQVR4nOzdva4cuZUA4L6CEqfamWxhK3AqYAHPg+hR9QT7BBJgQKmTiW0oddgbaNtz1eqfYtUheUh+X7LrUd9udhV5ij+H7Jfz+XwCAAAAAAAAAAAAAICVveldAAAAAAAAAAAAAAAA6E1yPQAAAAAAAAAAAAAAy5NcDwAAAAAAAAAAAADA8iTXAwAAAAAAAAAAAACwPMn1AAAAAAAAAAAAAAAs723Ji//rv/7r/Oc//7lWWYb297///XQ6nU7/8z//07kkzGbVuvX3v//9X+fz+dfe5ahJTM1j1XbGOsRUgDhiKmxz6WO/pr/NNTEVII6YChBr9rgqpgItzR5TTydxlbpez7Ve5liv51/Nvca4Na99OuW6vmIqQJxHMbUouf7Pf/7z6X//939jSjWZd+/enU6nk+tDuEvdunTgvn371rM4zbx79+733mWoTUzNY9V2xjrEVIA4Yipsc+ljv6ZecU1MBYgjpgLEmj2uiqlAS7PH1NNJXKWu13Otl3p2Pf+q/sW4Na99OuW6vmIqQJxHMfVNy4IAAAAAAAAAAAAAAEBGkusBAAAAAAAAAACgk3fv3t09OR0AaEtyPQAAAAAAAAAAAAAAy3vbuwBAfZedrd++fetcEgAAAAAAAAAiWAcGGJ/T6gHgsdfPylZjHyfXAwAAAAAAANW8e/dO0hAAAAAAQ5BcD8FMEAMAAABAOfNqAAAAAABAb297FwAAAAAAAAAAAAD4zgEEANCPk+sBAAAAAEjDCfYAAAAAAEAvkuthIRYmAQAAAAAAAADmIycEACCG5HoAAAAAAAAAAAAAAJb3tncBZnPZAfrt27fOJaE3dQEAAAAAAAAAgJqcVg8AzKhnH8fJ9QAAAAAAAAAAAAAALM/J9QfZ/QkAAAAAADn5hVEAAABmIU8NANqQXA8AAAAAAACEk/wDAAAAwGgk10NCJpsBAAAAAAAAAAAAoC3J9QAAAAAAAAAAAMByHIIKP7aDb9++dSwJ5CC5HgAAAAAAmJoFQpjTpW1r1wAAAABEkVwPgzJhDAAAAAAAQAnrSzA+p+sCAADUJbkeACCQk/AAAAAAAACAXmymG5tNVADQn+R6AJZlUAoAALH0sQEAAAAAAICRveldAAAgr3fv3kmQAgAAAAAASCxiPceaEAAAwHeS6wEAKjERDQAAAAAAAAAAMI63vQsAAADAY5eNOt++fetcEoD9xDIAAABowxgcAIAtHBgJt0muh8peP4BMXgAAAAAAAADQwnWylPVqAACA5yTXA8AVp3kQTZ0CoognAAAAAMBeDoYDAAB4TnI9BOn1EykSrMhCXQQAAAAAgDFIsAUueq1zAwAAZPWmdwEAAABaePfunYUiAAAAAAAAAADucnI9AAAAAAAAMAyb5wEAAACoxcn1FHHaJ7C6VePgqt8bAAAAAABgJdaEAMYjdsN4tNvnXCN6cnL9DhosALPzrKvjcl2/ffvWuSSwFjENoD6xFtirVvww/gLI6XXcF6MB4vUan+t/Q07aJsB+Yijk1KptSq4HAAAAoBkT0gC0YOMXrEUfE6Cc/hJAX+IwAOQluR462jPZq3MNAABAFsaoAAAAAADMzGbe+fhVtcfUeZBcDwC76EhyTWIZozFhAEAJ/V+gh4iDKcQvAADYZ0tf2toIADA784v9uQf0ILl+gyOLOBo0t7SaZDCZAf3can+9nwmrPZtW+76sSYI8AK3pYwEwA88zqM/6BABAffpc0Ja1WWroNU814jMkYy4W85JczyYjBtORWMxhVLdiw4z1uXYM7H3NDAAB8tIPBwD4Q63xc+9xOQC0YI4BiKDvDAAArEByfQGTTgAc0WrC8dnneJ7F2nM9TT5TquTnd9Wr50qulesKcJs+JZBNRFzS97vPtQG20k8EmI/YDhBHTM3F/eCWVgdwArlJrodC1w+4yAWlIw9PC1wQ70jS9JbXZIkfR99H/NnPtWOv6AG3uggAwEj29F/1eeeT/Z76pUCII/EAWFX2/g4A+Xh2ADCDDHNBkuuhoRaNPkNgAeb1aDC+2kBdvKUH9W4sNeOiRB0AAP3jHnqP/Ue9572vGwAwh1H7QkB/1hT6ax3Db32eew+3ZeljZZw/ylgmaEVyPbusFjizPESjHEmOXe3eM6fINh3ZJmq1rxox7NF79o4Ts8Vs5lXz13AYPxaMXn5YxeyLUq1++vRy7Wa/ntCDdvXYvTjXe1zLMfrSAOU8+yCXEfoz+tIAj4mHeY3wnAVgu1rPXMn1rzxa1IV7ZqgnM3wHuKfVoLVGwv5rzza8cF90MolrTi0Sn+ZlAhXmoz9QX9bYmbVcMLtecfdIm58lXpRc+3uvvZ5v37KpqmQzcutrPcu9hRHsif/a6M+MX4AsHDgDrOA61umLldGfp7YjbXKW9fzZ4pK4MZeI+egokutPbQKGn9shoy0nT5f8uzrNa70myO51mjJ2Do8sDo0gYwd26/XLVOaLjNeTfXq3496fn0lJu9IGgWfEif08m6CNiHF65Fi/d8L8nr8p6TdGvV/N99jy/nv//dFr98xJllzXViLnoPQjyGZPvJ+xTzd64sSM9wRmd6QvlM2W/o0+0H1HxiCuJ89oe+taNV7Ueo5qS6xEff+Da7GO6ZLraywSHTHiQBf2WrUjTk6zxd/ZE/FHMFLiB7lE7X4v/RvP4baOttVep6I+O10UKDdyHB657DCTyMTrqM/bmuQze/yoPTY/ci8i9Bx/jjz2jb7HEGWE+lbzOZLhgKBe92DkmMoaVutDrk5MOmbPs2SEPgDHN/Fl2Vxc4zNeO/IrZ5Fl6jVOH8me63Drl+2evd8IhyxuIVbzSOYD4lp9XqsDUrTBPkaJ3dWT62ueZvToIXv9Nxkfrs++z6i7uDOXbasM9QN6mqEdk8eI9anXhBRtHZmUvqjVx7TZc7vIzbWv/7bFdSuZLMykZlzPkPwAtWVKsBmhfdXcBHRkEfPW347Y7yW32u225DRx6ig5mfTevZec1k6NNqLdkU3kr1bULMdonx/xSwCzJUrskblsHDPDvT2SENo75mWQsQ4cid2tYzbrqN1HOfK3tebHnr3fo/Wdkr+595p7/3sWvQ9gcsAgxDGG3KfXAXirGTV2D31y/Z4TYTLb0zm7bqQl3zPiZzy3bGzY8/kWhebgIVJfjcTQLe8fvUNwa7Kqicax1U4OUC/YK3LycHQRz5WLRzG75imsI2yOqVXGkv731usY9eyt0ae4eNS30A9t78hYbstGl3t1snZ/eI/WfdjI/tMIz7eICc+ov7k3n5MpBkW3TfrJ3j6PbFrhsa333j2I1brv7v7Fy7Sx8SKi73pkfSzzyait+sxZr8GWPmerw8QiE632JL3tKds1cbSNGmu6R8bte9agjpSNWBnGn8/6aXuS7CPmoqLmMp71JR49Z8TVejLU/a221tGo/vCW97v378/aYvT61ao8G8u4XvW0zjUcKXbXEFGXa/Uz9oyft27Mqm3L8zNyjbRE1rmUmpon10cm7PCHyGuUIRjce+2WJK3sk6NwxJ4JlWdtoWQjT4Qjn6eNzmdPcgCwTeSmgS2LUiX/nnUDTevE19ZqJ5P2KMOzf199YqulPQlie/p8JX8T8XkRjvThI2P5rB6184j5gYiki+j5ia3vFz1R/KxOibVcWyUOjeBZ/3vle9U6WZV+ou5pxCJr7z7elvWW2fUeK0bcg173Lbr+1vweEkLrqVVnI16z5z1qzU1GlHVVt9rvnj7t1jhbK0bsmS+r7ci6XO/n58pmjxeZ1mZmv9Z7GD8c55r10avu3uuzRH9+SV+zxTUo6d+0vhe1Dxtq1Ud61resdZjYHrPEvZfz+bz9xS8v/zydTr/XKw7Af/zlfD7/2rsQNYmpQENiKkAcMRUgjpgKEEdMBYg1dVwVU4HGpo6pp5O4CjQlpgLEuRtTi5LrAQAAAAAAAAAAAABgRm96FwAAAAAAAAAAAAAAAHqTXA8AAAAAAAAAAAAAwPIk1wMAAAAAAAAAAAAAsDzJ9QAAAAAAAAAAAAAALE9yPQAAAAAAAAAAAAAAy5NcDwAAAAAAAAAAAADA8iTXAwAAAAAAAAAAAACwvLclL/7ll1/O79+/r1QU4JF//+PLw3//01//1qgkbXz58uVf5/P5197lqElMBVoRUwHiiKlQ7no8O9v4lf3EVIA4YipArNnjqpjKLcbv1DJ7TD2dxFXaucRqMbquLc/EXvdCTAWI8yimFiXXv3///vT58+eYUgFFvn58efjvHz7N1TZfXl5+712G2sRUoBUxFSCOmArlrsezs41f2U9MBYgjpgLEmj2uiqncYvxOLbPH1NNJXKWdS6wWo+va8kzsdS/EVIA4j2Lqm5YFAQAAAAAAAAAAAACAjIpOrgfKvd7N+OHTuWNJAAAAAAAAAAAAAIB7nFwPAAAAAAAAAAAAAMDyJNcDAAAAAAAAAAAAALC8t70LAAAAAAAAAAAAAMT5+vHlP///h0/njiUBgLFIrodJXDrEOsMAAAAAAAAAAABxXm9WAGBukusBAAAAAAAAAAAgGQndANDem94FAAAAAAAAAAAAAACA3iTXAwAAAAAAAAAAAACwPMn1AACNfP344mf7AAAAAAAAAAAAkpJcDwAAAAAAAAAAAADA8iTXAwAAAAAAy/JLcwDAbPRvAAAA9pNcDwAAAAAAAAAAAADA8t72LkAvr3dpf/h07lgSAAAAAAAiXeZ/zf0C5GJ9DmAc+tQArMavvgBw4eR6AAAAAAAAAAAAGMDXjy8SwQGgomVPrgcAAAAAANYlEQEAAAAAgGuS66ESCzMwHj9vCQAAAAAAAADAhRwwgPVIrgcAAAAglMUGoBfxBwAAyuhDAwAA/EhyPQDLW33S8PX3d2p/Ob94AAAAAAAAAABAS/JVoJ43vQsAAAAAAAAAAMA+Xz++LH+YFAAAsJ5aYyEn1wMAAAAA0ITTlAAAAADqsuEKgNnVftY5uf5kFzcA0Ja+BwAAsDrjIjJSL6EtbQ4AAACAjJxcDwAAAAAAAAAwGJuUAKAvv9IIUN/rcU+reCu5HhrSoYIctMXvTLgCALCVPjQAAAAAwLjM8QLAdpLroSMdV6hH+yITGxkAgFnoZwMAAMA4jOMBAADKSa6HDiRZQg7aIgBZWfQCAAAAAAAAAGhPcj0kV5r8e+v110lZkrUAjrM5AwAAAMZkTA8AAAAAwD1vehcAAAAAAABq+PrxRSI1AAAAHGBsDZCbOA3xnFwPAACQhEkPAAAAAGAv84sAa7nE/Q+fzp1LAgBzkVz/ig4HwLxKJhOvX+u5wBYmrAEAAAAAgIzkQgARxBIAYBWS62EB9wY4Bj4AAAAAAEBtDqYAyOF1PLZGDDAf/W4AZtfqWbdccr1OBAAAAEAd5l0AAABgDMbwAABAZj3HLMsl10NtmSchMpcNaomo907xAACAOH5FDajBvBfPqCMwDv1FAAAoY8wLa9HmoT7J9QCwCItSY3CfAACAldjQTkbG5rCf9lPXnuvrngA9iD0AAMDIpkuuN0gDWJvdmc89ukaeo32otwAAAPndGrsZPwPcZp4xlvlDYFQ20wIAACOqnlx/PXlmMo1ZjTyxaVIDAFiJMQlAvJHHxEAbW+KEfho1eEbBOI60V88QAIB29L1iuZ5tPLrO5g7mo10BR01xcr0HHNFaP2A90OE4zwIiiMcAANvofwOjcer8HBwSAnlFJMbf+++zt/cj37MkLq5yPQGAGDbJxyi5Rq4nxLvXrswxAc9MkVwPLenMAqOR+JSXewNtRba5iD6hiWkAgNuu+0m9+kL6YnkYPwP3jBwfRi47AMDKJOWORb8bYDwZYnez5PpsiSw9338kWa5FZPLS0ZM/Sv4NqEO7owf1DsbSamKz1y8evda7rw4AUFutPtfW9zUeHJP7BvPIslaV3fV1EgdhXq3btyRSYKvM/bbeZXOCfU76zPPZc097H/RR8vnqLLSzzMn1ET9HuUqnJXMQvnUvat6fXtei5z3o3WGAlaz2fMnsOvZlmCgWj3lk1vhRO2mq13u1OuUeyGHWGA2w14j9mBHLPKve96LW/ID+AjN51k5rjcnvtZ/eG7IiPmPL5zgUCujlWTwUg2B82nGMkl8vPvIewDat5mJ6z/ls+fzeZYRRTJtcX6ODMXtgGalTVlLWkoTJI+8bIeM9mL3ez8y9q+PedX3UfrcuhGS6VxnL1EuW2Oye1NfrBPKSzytZOG2V+JGlbkYkvR9JnClZ4I92797bpHNflnrLmjLVv2wL4iW/zhF9HTPdF2hthA2OPT9jaxl6x4+ShbOL6M2fvU71OjLHG/F5Ja/LUGfhiEx1eGsiUvTJoDNsoB95AwIwJ/EDxrcn1yZz4mmLz++p9zWoXY5s896Mq3ZbKdlgE1GGezmUvWMBZNUtuT46mailDKfZRirZLbnnfo3QIc1StzLbslg1Q3sYXea6HLGAm/H79Uo4avXTvq0SM3s9MzLWKdqpfZr51gSPPUkwz/77XkdizJF23HsgX+s69lK7bl/U2MAR9d6tE61gj55jKW3hO9cBxtM7abrkvS4yJnWWKBkj1LyOmRzZ2Avk8mw+omd7bxHvo8Ykved1YHSjrrXWWK9qNRfJz+QC5DDTeumtunOvz3D9uqOfF/F+997fJuoy967NqOt/kfSZ42293yV5kns/4/Vr9xzydutzatbnW/VRHe2j9jzxCPc1U+xOeXJ9lptYKyml9/dqLTLRKuq1R/5mdVsW0K6tVud7KFnYLBmk7mkjW+/3lriY5XlwS434NNKmoD0d/14nP2WsP+S2p85Gfu7rzz7y/s+ey3ue6Udi957v1zvWvZapLHuVLE4dmVh69P61J+nv/ZtnwfxqL57sLcPWf69RV0fqWz6ydbG+5BlV8nkjGLHMlIlOfNu6qH3080ZUo/+95/0fLWiVvleUVp830xzvrM+d0Yx4jTPG46ztbIs9z9HoMfERvT/nyPpBrXnhEds1a3q2VjFLv6d1nFql7UesU2Q40Idttt6PUet/rbW0o6+dJQ4fsaeOHVl/vPceW8ZA2gM9Rc8ZtqgHUTFua5vfM5Y7Mv8xey5u1PPuSF5GRC5f7RzF2ron12e8KCWeVZZaicjPrlvPnUQR93T0egG11FjkjW5vER00p8zm9agzvSfJ/lm9jPiFm+iEZdZxtJ5krWdR5YpIIs1shDJGqv19S98/ekJktfu5kiN9z9pj5BqLRq03ftVWa/5ga0J+6ftutWVS+VkZo2NfZEI29ZVsxtkzN7lnYt793+/IQkjt+LUlTu1x730fxbqRnl81ZEymnk3J/FDJQl9J/D0y5xk5VxaxiD2q1WPNHrWu2Z71inttaPZ6m8mW+rBlHHYkWe7ea/cklByJqbUOlZu9XkeM12t49EwcMdfi+r2i+t2z189Mjqzrl8S8LG3wIlt5+FHr+1Njc0Rt4iQrK1mPKJn/3vK3z+bMj2wA2FLmzG3+SJ8iMiG/5HMz6Z5cf8RoF/tia8WLPLV372tqfl7mwAL0NWp850cRGzoybP6AHtRV+MOeSQzGcmQRfcv7Rp6s0LoePkqyXK1NtE6QP+LefStZxIzeOLI1eXDPpLZFoz5K6llLs8ciYA6RSRqt57lqrx9leZ4wl6j+QUSiIfVFJmkc+QXO0teU/u3ICdejK5mjifhlu2efW/Iee0RsiFV/cuq5gc1zkXuOPN/EmvtcG2ZUez5kz6bMR2tq1//7WV+yVbudLT7M9n1ezuftD8SXl5d/nk6n3+sVB+A//nI+n3/tXYiaxFSgITEVII6YChBHTAWII6YCxJo6roqpQGNTx9TTSVwFmhJTAeLcjalFyfUAAAAAAAAAAAAAADCjN70LAAAAAAAAAAAAAAAAvUmuBwAAAAAAAAAAAABgeZLrAQAAAAAAAAAAAABYnuR6AAAAAAAAAAAAAACWJ7keAAAAAAAAAAAAAIDlSa4HAAAAAAAAAAAAAGB5kusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAAAAAJb3tuTFv/zyy/n9+/eVijKOf//jy0//7U9//VuHksAfLvVylrr45cuXf53P5197l6MmMRVoRUwFiCOmwm3XcyWzjE2pS0wFiCOmAsSaPa6KqWN7PQY3/mYEs8fU0ylPXL2Vz3Q6iRXZzZbvk81sc9diKkCcRzG1KLn+/fv3p8+fP8eUakBfP758/3/+++d/+/Bp3etCDpf6OUtdfHl5+b13GWpbPaYC7YipAHHEVLjtP3Mm/2+WsSl1iakAccRUgFizx1UxdWyvx+DG34xg9ph6OuWJq9dzdBdiRW6z5ftkM9vctZgKEOdRTH3TsiAAAAAAAAAAAAAAAJCR5HoAAAAAAAAAAAAAAJb3tncBAAAAAAAAAAC47+vHl95FAAAAWIKT6wEAAAAAAAAAAAAAWJ7kegAAAAAAAAAAAAAAlie5HgAAAAAAAAAAAACA5b3tXQAAAAAAAAAAAABYxdePL72LAADDujxHP3w6V3l/yfXwQO0GCMTTbgEAoL/XC0P65gAAAAAAAMAoJNfDBpICAAAAAAAAAAAAAGBukusBADbwqwgAAD/z08VAVsZwAPmJ1QAAAABkJLkeAOABCWMAAAAwJ4m9AAAAAABce9O7AAAAAAAAAAAAAAAA0JvkegAAAAAAAKCLrx9f/HokAAAAAGm87V0AINbrCWg/ZwwAMIdLH0//DgAAAADYyrwiAABAOSfXAzAlpx0BAAAAAAAwM+thAGMQrwFgLJLrAQAAAAAAAAAAAABYnuR6AAhgpzkALXjeAAAAAAAAAADU87Z3AQAAAAAAAHq5bGD98OncuSQAAADxXh/aY9zDKhxWBcARkusBAAAAAAAAAAAAAEir1eYpyfUwODstAco5kQ4AAAAA5mPeDwAAAICjJNcDMAUbTQAAAAAAAJiNNTAAAIC2JNcDAAAAADAFiUcAfTk5HgCgPn2uObmvAKwm87NPcj0AAAAAAAAAwCRsOoXxZE4uI474HEN7ARjXKM9CyfUAMDkDSwAAANjv1mS/MfbYRlnAAQAAAACgPcn1QSQuAgAA0ST9AAAcY94WIBfjXIA+9IthfPpRAADtvOldAADI6uvHF5MUAAAAwPLMkQAAALRh/AUA0J/kegAIlHmyI3PZAAAAAAAAAACAx+T/QH1vexfgET9NxmzUaQAAAABgFBbpAAAAYD/jagAYU+rk+ix0dDhC/YG5aeMAAAAAAAAAAG29ztdw0CkrkKME7UiuB4BJ6VQDABDNL7IBUcQTgLmJ8wAAx1jrBWBEz+YDzBcwCsn1UEiAB04nkxmzc38BAIBVOfELgF6OrL+YzwMAAABYT618Xsn1wbbcKMnZALlZiJnX9b31TGZU6i4AAKMy5o5lbAAAAABzMdYHZmRemNEMkVyv00BrIwTzEcoILbRoC07tAwCAH5X0w83rwLi03/tWvTarfm8AgOy29tOseQEwK3MWkIs2yeiGSK4HgNd6bi7Z+tkmJwEAAIBaHLxRh0U/yK1kzlV7Bii3JXaWxlfrZQBEMh8CQCuS66GD60kHk7xkdT0wUUeZ3ZbBuJhNTytPGK3W9la+18C8VovlAM+IiwAARIuYV9RPhbasBwAA5CO5HnaqMalgooLs1NF9Wl+3ZxMwj/7dvQWIV7PfGP2+AC0YVwCrmyFxQiwHeps9Dt37frN/b1hdtvUkID/tGMpZY2MmxohQj+T60/MJqtafy5j21BcnJAMAxMrcd8pcNgAAC/L7ZOnjZSlHZuo4kI3YDdyTrd+SrTwAq9BfBC70x6A9yfXwSq0E+Yj33NNp1tFmr60nn6tb7fXaEAaQnTgIUJc4C6woY+xrVaatn+O0N2CrI/ErYzxuxQn2ML/MMe5R2Z7Foaj1bvrS34cflcSxzPG9JnGD1WTp32QpRwnxgtcy1uGUyfX3OhiRF7D2YG5Ph+ry2owV5doIZZzVkQ0A7hfRbnV01Lc2ag3GV71/YivZPesfn07r1MWtbS/DtWm1cfP6b1apC0B9ftEPuKg5f5mh3zaCPcnuF88Snq7v61EzxPeSazHy94RIqyYPRdgSN11fILsj+RGMwX2L1fPZbk3hvqz13NxJGX1nTqe87fmREctci2tBBimT60s96kRkaWitk/b2dKwyXKt7nfhHCz297y3w3XX7LTmxomY7zrR7fKSE0GtbFtyzlPXCoBnWoK0DxBNbgXtKx/6ZjFjWVu8XnVR//b97X/Ms8z2wqton1o/Qd621men6vRyAA7nVjAU93esDRr2nWAa0EDlubjUGvcgSJ2d5rjGf1uOjZ78+VlKWWdpVphhKucjnzmj3d4rk+te2BKit7xFZniOvPTp4LK3gUdcq4kFQMhg/MiGRpbNZW+QDfMv7m8DlltEelL31vl69P3+PEcv8SNYJEtqouUGz1vM/kiSYfWb9XkDcBsdscSJbeTKSWLCWVm2ixunzR98r6rCRra/L0p5mG8de2/L9Ig/N6X09Hz2vjfFhPpGHuxyNX73jH3Cbtnnfnj6fOYQ21Ft4bISD6DLYMwZuHX+elXHEQwhpY2tO45H1/j16bSao/f6t29msfc6I77UlX3ikOvzIkMn1s5xUUUPJtam9K77k1OqIzznyvqvVl5JNClv/+9b3J8bIC4xH1I5XrYxwD/Z0/HsngIxwXcklYkKnVn2P6M9ELu7uMVLSyK1rde+aZLrnEe+Z+b4ckWnQDUccmf8wdjtmlTiyyvdcyaM+WOQCz5bPjzj8ZOQNBmJsma31M3O8KjlEBnis13xt9LOrd9uPXEfIHH/hdBprbNM7NmS0px+18tznNZsUOMohij8bKe9ohvuV6dl4JE/i2sj3ZGTP7mGrjRK963XGA0Ye6X29eqk1bt+6uT+6bsx2H4dMrl9ZrcWummZrNKuJ2LxAnGf3I9PEfYkWE/V2ELcTOXgcYWG6ZAJ3y7XJ8r1WdCQR6VH9znJPa0+uHdlY2WyyW/EAACAASURBVGun+db/fus1R+55ponOrfdtz8aDPZM2Je1lS+Ja6cZR9jvSn4vY7HRLzUnQWt9vxDF/KyNtcLuodfLH1mtRkuQsLuYUkaTXMxb02jx45H21gbHN9uwjxpY5wXvP1i3j2N7x49H329Nn2Pseme3Z+HUknmSMRREbwB7V9YhkgBHrFtvsWZuJHIOX/v31exw5RE697m/EGBNd/6/fw9o/j+zZWHgtw3rP1ufMSLGBMekv5JTh2ZehDHuNUPaSZ9Sz8XKrJPRH5dg6lo9a38pyeEzEXMZRL+fz9hv/22+/nT9//lyxON/1vjFAbGDa84B5eXn5cj6ffzv84YntiamrxUcnk8/pUYeV58TU27LEVBsljqkV92u8r2fUWCITQ8TU2/YspvRqN48SoSLjg7hwzNY426qORcT9EfoJrRdzxNTbstYPyGamPnlE/BVTb2tdL44kHkcc4NDKqPN7M8WNzI4kI9d6f+P/n0Wt+x+5r3va5JF2fG8+QCxYR5YExqNzCkfeJ4KYeltpXBV7/lCyufWa63jflnnTyF/yK+EZ/Acx9bYjfVXrwNtlXMN7pleZow8TZbuSZ0Z0TC1Krn95efnn6XT6vbgEAOX+cj6ff+1diJrEVKAhMRUgjpgKEEdMBYgjpgLEmjquiqlAY1PH1NNJXAWaElMB4tyNqUXJ9QAAAAAAAAAAAAAAMKM3vQsAAAAAAAAAAAAAAAC9Sa4HAAAAAAAAAAAAAGB5kusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAAAAAJYnuR4AAAAAAAAAAAAAgOVJrgcAAAAAAAAAAAAAYHmS6wEAAAAAAAAAAAAAWJ7kegAAAAAAAAAAAAAAlve25MW//PLL+f3795WKAvn8+x9fTqfT6fSnv/6tc0n+KMtFhjLV9OXLl3+dz+dfe5ejJjE1n0xtHiKJqQBxxFTY5vUYVv+ae8RU4BlzNduJqQCxZo+rYirQ0uwx9XQSV6njOk/odDI+LnHr+p1O419DMRUgzqOYWpRc//79+9Pnz59jSgWJff348v3/+e/v/+fDp/71/j9l+n8ZylTTy8vL773LUJuYms8f7ez7IOvDp3O/wkAgMRUgjpgK27wew84+fmU/MRV45vI88Sx5TkwFiDV7XBVTgZZmj6mnk7hKHdd5QqeT8XGJW9fvdBr/GoqpAHEexdSi5HoAAAAAuOfeggUAAAAAAADACCTXA7A8CUAAAAAAAAAAAACA5PpGfvw59HPHkgAAAAAAAAAAAAAAcO1N7wIAAAAAAAAAAAAAAEBvkusBAAAAAAAAAAAgsa8fX05fP770LgYATE9yPQAAAADVWPABAAAAAAAARiG5HgAAAAAAAAAAAACA5UmuBwAAAAAAAACYjF+TAwAAKCe5HgAAAAAAAAAAAAZkMxUAxJJcDwAAAAAAAAAAAADA8t72LgAA9GLnNgAAAAAAAPzsso724dO5c0kAAADaklwPAAAAAAAAAAAAA3GgIADU8aZ3AQAAAAAAAAAAAAAAoDcn1wMAAAAAAAAAAMAAnFgPAHVJru/g0sH58OncuSQAAAAAx1nMAQAAAAAAAGYguR4AAAAAAABoymFUAPXc2wT/+r+LvwAAALdJrgdgOU7VBAAAAAAAYBUla2PW0QDGZQMrAMSQXA8b2MEPAAAAANCH5AAAAAAAAFqRXA8AAAAAAABU5zRkAAB4TJ8ZgJmNctD1m94FAAAAAABgLV8/vlgsBgAAAAAA0nFyPQDAAC5JJ5l3bQIAAJQa5ZQaaEF7AAAAAADoz8n1AAAAAAAAAAAL8WtSAAAAtzm5/hUnwjIS9RUAIJZTIgEAIAdJXgAAAAAA9OLkekjE6QBADWILAAAAADAa85oAAADMztgXcnJy/Q1OBC/nlE+AcXjOAQAAAAAAAAAAwM8k1wMAAAAAAAApOLEPAAAAYC6jzfdIrueQ0Sp8Nk6PBlq6jtliEEBd4iwAAAAAAEAZ6ysAQG+S6xPQKQQgC88kAABq0dcEAAAAAKCn14cSmqvmkdZrGtZQWFHmei+5Hl5xEj8AwHpq9wEzDwgBAAAAAAAAAPiD5Hpo6F7ilqR+oIatseXW6ySCAqsTBwEA2tMHAwCA9vTDgWhOBgdmoq8Ea5JcD5XtSZyXbA9kYZAAAAAAANRkDnJs7h/kYH0ZyEpfYRy3niXuGwCrklwPAAAsqfWCkwlkAICxOXkPAIAV6QcDvVhXacMGLehD24PcJNef+gUqAZIIjwYTBhoA49NfAAAy0kcBoAbPFwCAfvTFANYya9yv8b3kXwGsR3J9Ih7E/czUYZzpu0BGYjUAAADsd2TuypgcYE3if3/uAeRlbRignpH7QFFlH/kawIpma7OzfR/GIrm+MoNZgHGJ4QAAABCjZIxt0QQAcnj0/DZ/DgAAkNPr8doMc6zmi8c26vyB5HqKbAlUswez2b8fMKZROyKwEn2IMblvAPHEVuCoW2PgZzFF7AHIzxxnfluS7T1rAYDZtOrnZO4Pz9rXm/V7MZ/ruqruQn2S69klc4cui9bXyD2Bx7QRRqPOQpyIyYV7bXLPe5rsAAAemaWvEPk9toyP7n3eiGOrWepAiRHvU6TVvz9riKjns528V9uKzxPISFsE4Bn5Rf3NNK8ENenbUktJ3bqOzbXqY/Xk+qwNysNvPr3rmjoFj9VaVL/3fr1jwhEl3485uJ+09Ki+zb7TvUZbu3WttOk2Zq2n0JJ2BES71Q+atW8khpa7d8IWAPmI0fBdjbUt/cdYW+a7gTHof9TnGh9nwy8RtMXn7l0jfWpacnL9A70aY8YgsCeoZ/wekWb/ftdW+76jyXR/anYCHy3Szx6rM91j4hg0relIe370tzV254o9wMhmj2ERz5PeWp0sAfyoRnysFVdazUk++5vacbP1gQS1PbterZ5DI/QFsjyToabaz4jMbXxEI8Ql954e1DuAbUboS6zGPSnjenE65akHWw4yadVPzXJNoCXJ9QyhJJHMzyXFmv37je5R/W8xwdd6kXuPXjHh1gnGz06ELukYt2biOJbYyi236sWREx1rntL+Wq/NTdkcvUfi63NZ7z1kVXI6cEmSu7YIORijPffsdKPoz4nY7LRnnidTXcjyjMhSjkdGKCOsICKG1jpEIVKmZwXrip4Hm71e9978yc9mr3NbuAYcla3flGHNa0TPch325ElAD3v6p0f6tCX9tyy5AdBDjcNz9pJcTzdbKnWrRbBVRSQ5P9rwoENcz2xtoNYJbS2MmCh/RMQkQ9RExYgnnY54z9kvYgHkWV8out6ro2SkXnLUCOOTyIWliD7no4UQIJcjm2NGiI8jOTLXWfL+R947Yhyd+XmQuWwwi5JnR5ZfqagVH7f0u7P+gkjrz691HfRlOJ1y14M9c7u92+9ssiXy7vn8RzLWe8jsyLocPyvJ5xrh0MY9tuaKPNpwQA7uSznXrJ0Rc6Nm0Sy5fuQG1avsjx76NXb1tZ7o3PMaHdl9Sk4svP6bkteN2L5Hk6UNRJTj0aBqz0nNva9N78/vaet335JgsGWTQkR5jiy2bdmFX/J+zCVqwujI5438OXChzo1nxBMX9yS/9J7beNQ2arSb0dti7/kcY2SOilh4jG7Ho8eFZyLab6YYsDXhNFOSbA0Z7wlriWyLR/4m0sp1ucac9Z54HH1YSYv5q6Pzw0cOecnwDJhJps0kkaLawcox8qgtdatX4mTt9886BlGf66kVS2sn4EXW2Yi/3XIYZOZ6nLlsNZWsr/ce+2wRcSACOcy6zrI1LkYfxJF5c0w2tb7/s+fmrGO7KNOeXB+ZpLflb3tXqpKyZetI9v586k0WjdDJnZnrTza1TwNotRnDBrD5RCxguv8cdW9gu6dujXQSU6ud9nb0j+/eWOOi9S957JkfqN0XmkGt5JfWmz9af26EkcrKNnvGRzYMx8p07SI2amSRMVGyJGmUnJ6Nx/acMvho8/2R8d6zfvEWs/1qxUVkGXt931sx7tlcVJZYuMXRMZF52TFtiYd73mPP3xwZr9dQ0iZGausXURs5a8T3I/22kvKU1LnIfkHEQY1iax9HNl2WvOeRPu3Wz23FnMY6Rn4m3jLb9xmBmPBc7UTrVvcgsg/UehP8kb/ZsoG+pD9c8qscpWUdRfPk+j0JSVl36fb4nOvPO/LaEQIWsUYPWKxDXQVaOLIgLU7dVyvhdbVrHrEJaM8iUe++e6vEr97fc2YR1zZyIqn0tRGxZrV4VctI7bTGPY9+npYumo5w3Yknfq1rhISJR7aWsfZ3GeFa8aOtaycRiaEln9sqMchzP7eIjRSlnwHPbOkzjDSnNOLnZmi3z+51xnn2FjE1k0ff90gyNe3syava+p6PPmfk+y//aR3uAff06pdl28D5SO31t8i/LXnvrfegdvJ71ObSvaL74b3rcIZ+ysv5vL3SvLy8/PN0Ov1erzgA//GX8/n8a+9C1CSmAg2JqQBxxFSAOGIqQBwxFSDW1HFVTAUamzqmnk7iKtCUmAoQ525MLUquBwAAAAAAAAAAAACAGb3pXQAAAAAAAAAAAAAAAOhNcj0AAAAAAAAAAAAAAMuTXA8AAAAAAAAAAAAAwPIk1wMAAAAAAAAAAAAAsDzJ9QAAAAAAAAAAAAAALE9yPQAAAAAAAAAAAAAAy5NcDwAAAAAAAAAAAADA8iTXAwAAAAAAAAAAAACwvLclL/7ll1/O79+/r1QUWM+///Hlh//9p7/+7elrH72mhpIyRvry5cu/zufzr00+rBMxtY3rOnw6tW9HzKFXHI4gpgLEEVPhtlv97osR+0+0IabyzMjjMGhNTAWINXtcFVPn02tNF7aYPaaeTnXiqnYN3CKmAit63S+K7BM9iqlFyfXv378/ff78OaZUwOnrx5cf/veHT/fb1+W1j15TQ0kZI728vPze5IM6ElPbuK7Dp1P7dsQcesXhCGIqQBwxFW671e++GLH/RBtiKs+MPA6D1sRUgFizx1UxdT691nRhi9lj6ulUJ65q11DH67b14dO5Y0n2EVOBFf0Yu+Piw6OY+ibsUwAAAAAAAAAAAAAAYFCS6wEAAAAAAAAAAAAAWN7b3gUAgBqufyYPAAAAAAAAAAAA4BHJ9QAAAAAApGHDPAAAAAAA0Mub3gUAAAAAAAAAAAAAAIDenFwPAAAAAAAAAAAATMkvJQJQwsn1wb5+fPEwBgAAAAAAAAAAYHjy4QBYjeR6AAAAAAAAAAAAAACWJ7keAAAAAAAAAAAAuMsJ9gCs4m3vAgB/uHRAP3w6dy4JABcmBwAAAAAAAAAAANbg5HoAAAAAAAAgjBMtAQAAABiV5HoAAAAAAAAAAAAAAJYnuR4AAAAAAAAAAAAAgOVJrgcAAAAAANL6+vHl9PXjS+9iAAAAAACwAMn1AAAAAAAAAAAAAACk1eogFsn1AAAAAAAAAAAAAAAsT3I9AEABP0UPAAAAAAAAAAAwp7e9CzALSXYAAAAAABDHvDsAQG6X/tqHT+fOJQEAAIgjuR6Su15AMkEBAAAAwErMhwEAAAAAAK1IrgcAAAAAAIZmEwYAQDt+YQhgG2NVABiT5HoAAAAAdrGYDgAAAAAAAMzkTe8CAGP5+vFF8gQwBPEKAAAAAAAAAACAEk6uB4AKXid1+4m3tiTUAwAAAAAAK7i3JnL579aoAACAUfXMAXNyPQAAAAAAAAAAAAAAy3NyPSTk1GUAAAAAgHJOaQUA2Ea/CQAA4DbJ9VDZ60T5y8SE5HlYi8lJAAAAAABGdWtdy3w3jMEaFQBHyG8CYFWS6ysxSAUYn1gOwEg8twAAAOjtOvnGWBUAIMatgx1hBuo2ABlJrgdusvuU0ZQs0ljQAQCA9vTDAQDmIPkFAAB+ZO5zXe49wJwk11fmAcprEtahPu0MAAAAAAAAfmYdDfLTTlnZdf2vnW8XmdcnRxBgLpLrAeCKCQsAAAAAAAAAWrFGPSb3DQDmJLkeFnark28HJQAAAAA9WJAGAAAAZnA9x+FU837MNwGwx9DJ9ToeAMCFQTEZvK6H+qi0Iv4B2YlTAAAAEGfPONvYHICtRnhmOEwUgNqGTq6HzEbobN4yarkBAPjOJmQAAFZiPhMAoC6HygD0JQ63U7LGZj6C0exZQ7buzMqmTa7XsOlF5wkAAADuM2cDADCmVusf+osAwErkmLCqzHXfmITR2ZQDx02bXJ+NgAUAfXgGE8lECgB8l3nhA4B5GePDWszDtOeaw5qux/hiAOSn3TKSVvU1S182SzlYk7UbiDNdcr0AATCfR4MPcR9oYU+sMXECAI95VgKnk3E933kmAKeTZwLAPeIj8My9OGGM1d6zmJ1x03jm50yr+YJ71yDztYGWzN2xoimS6z3IyGC1euihSQ+96l3GAS77RNYhcZDs7tVRdRfgO/EQoC8bWOe3536tNscKM9F+xyaZCNhKXABoFwszx9wjczRHvlfJ32a+ftCStgD7TJFcT3sWsriQdExNI3bwRiwzcNyjtq/fdJ9r85xrBPUZ02wjHsGa7v1st5jALdnmRNRTaCMiMUY7BbitV/8qW78OIAvxcQzuEzNqfZCkdpSXuZR2hkyu13jhGG2I0anDa7vuKKoP8KOtbUIyaW4Rsc3AGm7TdwCIU9Lf0DeJMeJ1rFXm0rHPSNcMuK1kLuNWjBAHYomvwGtiApQxRwlltBl4zK+Ersf9q38NhkyuJw+NFNZUa2HCgIhWnj2/9vycnGchWWWJrT3LMWM7zXJfgbndijU14s+McRpGFN0W78UL/Zh9sl63rOUC8trTxxRr2veZXXPoSxsEoph3y633/fG8AU6n+PyYrfk4rQ9syXj4YO/nQGYZ8ramT65XAdniXj1xskkZ7Y29Vhm0XX9PbeWYVeoN9Txrk4/qWK8FzVqfd++7lgyKI38GPqIP9mixvsaGsCMTCCWft+c99NEAYF4l/bitr93SD9763zMZoU80wnU8ovcv0dVaQLv3vTLXNeihdpufPYZeZIwxW8tkzQ1+pE0ALWVMKGwtYp0lg61j6wxrmJmuWw8Z++4zy3a995RnS/vO8j23tO+SucCtm+73rMlnyvu4/tzaf9PKrPMC0yfXR4juCEQm11xETNwf+Z6P/r128lKNZNXMwWgEWR7kxJutbdRMsmz9+bMbqe4dfSaqF/20XuQtqQ9b/3tttU8wLhmEX0TG8Ft9zMg++7P/fuQ9jxJ74LuabUE7Ywv1hNMpJgF5z6kuI4k4IWnva7faslBQewNl6fvfSrZ4Ng89qq3l37MAWvJa8Z5nevdPM7f1GedjM19vWF2r+DFDHIhOXs0as2FGEePoqBgQcdrxls+5p/XYt/dmdOC7VnOEkUaIF73zCfa+Zut71MhXiJ5nPJJjceSAn4iNFT2lTK6vGahGGHxFJAyV7Dq9/rzoCvus8e+ZuK21oyhzYx3RSO1uFDU21tx67xbtJ2O92LOzMvJzW03KZjxJrUaybGvRySuZ7g95tO6rZKqHkYnqJe+19f1bDdKjPRsLPBoUP9v1X7Ih9shG3wz1kzIjPfePjGe3vmetvzkic7yqNQa6FjEmitxIF1VfIq9b5rY7i4xtMZs9fbCeE/lb+1F73rPkNVs+v8ZG0cj36KG03KN+zxWUPmdLEv0i+heP2uSWRckja0KrJPNk68/02ihQez3wyOeUzBNkuY/MKVvSzUhufe+IOLEn+fditXsA9zzrW0a035JE+SNlfPQZtcfaNUSuN5tTzuPRmMuzKd6eJOWSNc+tn3/EqOvOpTJ9hyN9zCPJ56X/vvVvn9V/9XSblMn1F70fJLWTzp99XslrIpOKaun9eZl+eSDCve9XMtHP+LYshJS+x73/Fm30B2gNRzprt2ydbCi5FyWxdEviZM2O3BatJ1Yjntdiei4Rg5sR7qmYPYfoMcORwX/rcc0I7WwWtZIzLloljmztL20Zf9Wq788mxo5MHPey5fttWey799qSaxLRNy8pW8lnbF2QPBLDS8v0qFzAz3r3r3t//kharQmIofVkqu/PyhI1J3gkcTHT9Wqh5FrV2JwY3ScbMZaUJs7tee/X7099R9YuWm9gv/e5RxMba9TnkR1dh9wz5i59r9eO1IfIun2t5NlUez5NTJ3Hnjn+1rlJW/921RjLeNTVdiL6G1v+3XNxLrXm6nrnzbLPy/m8vSL89ttv58+fPxd9wNbJwkw3NGOZIsz6vUptSeoseZ/Vr+cWex44Ly8vX87n828VipNGjZi6hboLYxNTb+sVU4Gxiam3jRBTaySlkGuskKksbCOm3jZCTAX6u/XcK42rYupttWNq5j5L5rLNKPq01EgjjJ9q11d91Z8dialRa61AexHxVky9rTSuip/A6SSm3pNx/A/kFx1Ti5LrX15e/nk6nX4vLgFAub+cz+dfexeiJjEVaEhMBYgjpgLEEVMB4oipALGmjqtiKtDY1DH1dBJXgabEVIA4d2NqUXI9AAAAAAAAAAAAAADM6E3vAgAAAAAAAAAAAAAAQG+S6wEAAAAAAAAAAAAAWJ7kegAAAAAAAAAAAAAAlie5HgAAAAAAAAAAAACA5UmuBwAAAAAAAAAAAP6PvXvXchvJFkULaqRzfZXTTqdx3W1Vf0j/kUb+0f4QpdXuccppp9s/Jo9RgyWKAgkEsOI9p1WVIsEggFiIx4ogAExPcj0AAAAAAAAAAAAAANOTXA8AAAAAAAAAAAAAwPTeUl789evX6/v7e6aizOP//p/PZVmW5f/7/3+vXBJqu90LN7d74v7va3+7//uoPj8//3u9Xn+rXY6cxFSgFDEVII6YCutm67MSQ0wllXFVeE5MBYg1elwVU+ehv04LRo+pyyKucsxjjL4Rq3lFTAWI8yqmJiXXv7+/L9+/f48p1cT+9c/LsizL8j//61zO7nYv3Nzuifu/r/3t/u+julwuf9QuQ25iKlCKmAoQR0yFdbP1WYkhppLKuCo8J6YCxBo9roqp89BfpwWjx9RlEVc55jFG34jVvCKmAsR5FVOTkusBAAAAYMvPi8avFUsCAAAAAAAAsN+X2gUAAAAAAAAAAAAAAIDaJNcDAAAAAAAAAAAAADA9yfUAAAAAAAAAAAAAAExPcj0AAAAAAAAAAAAAANN7q10AAAAAAAAAAABi/Oufl9pFAAAA6JbkegAAAAAAAACAwd0n3f/P/14rlgQAAKBdX2oXAAAAAAAAAAAAAAAAapNcDxP51z8vfgIQBqNeAwAAAAAAAAAAQAzJ9QAAAAAAAAAAAAAATO+tdgGAH+w+DQAAAAAAAAAAAAB12LkegK79658XC1MAAAAAAAAAmIq5cgCAPCTXAwAAAAAAAAAAAAAwPcn1MCGrlwEAAAAAAAAAAADgZ2+1CwAzSklslwQPrBEbAAAAAH6MkfzP/14rlwQAAAAAgBHYuR4AAAAAAAAAAAAAgOnZub4QOwwDAAAAAAAAAADwjF9oA4D67FwPAAAAAAAAJPvXPy82mAIAAABgKJLrAQAAAAAAAAAAAACY3lvtAszMz/gAAAC56XcAAL2zIzIAAACkMz8AAHCMnesBgBB+AhoAAAAA5mRsEKA/YjeMQ32Gc9QhAB7ZuR4AoDC7RAAAABynTwUAAAD0SAI3APRBcj10yiQiM1vrcKoTAADQJm11AEry3AEAAEa3laAtgRsA6FFLY7tfahcAAGBWfl4OAAAAAAAAAACgHXauh8HcJ2m2sIIHAAAAAAAAAAAAAHoguR4AOMXO6wAAAAAAAGOyuRsAADAbyfUAAAAAHGKhJQCt8EwCAMjv1uaSZA8AQC7anLRAcj0ADMCuIcCIxDYAAOAZyfQAAACMTHIpALNocaxXcj0AAAAAADAUSQgAAAC0osWkQQDgOcn1AAxttIlUne7xjXbPAgAAAMDojOkBAC3ocS559HZUj9cEoBYxk5ZIrgdgCvcNsFE75rQvpSMw+kASkJ/BBwCAXxkfAAAAAHpnLhnG8Tinu6deiwGQn+R6AIaiAdke1wQAAIAW6a8CEM0iLqAWbVuAOW3Ff+1TADhGcj0A0LXSA8Y5Ps/u0kAJBlCB2kz0AwCgb3rMY1t6bTzR+QSimbsAchJjaIH7EKBNLcwpSq6HgjTKoBz1La8j57eFhg/ADDwDAQAAaIU+KkBZ5m+ANRY4juNZnH/8+9p1Fu9hXKPW71G/F32QXA9BWgzmLZYJgDRiOfxJXQAAACTpwlj09QHOq9U+EsOBaBYAxNJ/hjmo65CP5HrIpPTDyy4EwOxKx7SUz9OhAQAAgOP0q4FZiX/AGrEBxvZsB/KZ636PuS09XK8ez2tuzgklncn12/p39zCcJ7m+IT0Et5bLWKtsPTWIgX61Uo9bKQfA7OzgAvSs5bEFAACe29OOM35Yj3Y2AIxpxvZVie+8Z57lWTnWXp+zLRZ9PkrdU9qnzOjZfT9jLE/h/NAiyfVL/Ye54ADwWu04PbOWfxVjb9lyJ6A+2z0CeC5lMJKf6TsAANFa7nNHtH1a/n4AvXiMx/qmffAMBI4S52EOWwmgKb/endLeyB1jtsq09vmp3+PV/PPsMbSH799DGenfmf5Yy325lss2ghnPb8sxWXJ9Ji1f9CNa+z6tledey2V7xs6ntKrUpE1rjRN18rUjSfUjaO0+hS0tDqiOzvkDAFKUbjvk2O147fW340sEHUOP103/nZH0WAdH1/JmKED/zsR9sQbOK72b+JnPr9VOzL3pmbmtbeI9rIuIrZHvPavEJpOzxU9+6OXad51cH7HCJ+pzIi94yufV2hX4SAA98x6Nsud6CTbUE1n3RqmTW7HtzPeLfjb1PFmy5xmSYyX/q2Ps3akg4h44exzG93i/vbp3U3+Ocs97o/kJSaAmsSHGkV2peuI+oVf6GPmJD+SwVnfda7Bua4xEnUmz1VYXizhL+5R7zxa1ujegfynx/lX7Lec44p554ejjzmakczHSd4Et0W32I22+Z88GdZGzU+1NYgAAIABJREFUSvU5ukquP5MQv+e9R34aKKe18pzZcenIzxftdSQgv9pZ6kyZDMIyo+iE4JR/G1GpuGGAsa976+zzkTG00q44s3tIrl08jv47++QeIJ75WUSM0e6l0b7PsrQZj2tvHACti158vHecNGriJefC9iOfm/LekeL/HqWuyaiLt85opY85slnrNW2qHQ9bjLHqKPystXwFYA4p+VSRx6QdETl2ZzbAyy3X/Vj7exFn9Gu5d/wpd07MbOO2Z8bZLWj+oWabolhy/bOHasQA0ugJoaV3Aa15nFrXa+v+HOE+2mtv3Xz1OpNC+UQkMEY0bI7UiRZ+jaOkMyv5o8uQ8vkjXYNXtuL8jOdkRlvPqyMx9UjbNseg5Z5jjXJvj/Z9bkp/r8jPS1lEG2HUe6B3e+JWrvtt67Upu2hETGr3+Kttr+pxq/3j3ttv+tHs9SxeRLQp1/49Z3xqNZ4sS8y4x5Hx75TrmvJs2vvaI5+3twz3f98znhiphcVce891788zOOvIePRW7IyqS5FJBs/+Xrre14w5LbcDYE2OsbPZ5s1e0ScG6FfL7bpZFqxyzJFFJKMYIS8yaj46xzXOvUihRbXa87nraPbk+q1B49KJF3v0frM+08pgXSlHJiiOJLuNKueqNeY0+mBh6eTYFM/q86vEiVnM9n15LeJ+6CkZca1NlNLpqf19znRKzyQGHVlAcebzSp/nM8/ilGSi6OM/+/etxbM9tjlaF1E3z4wT5BqwOjPQeCYRds9xS2k16bHU8yCXIwmojK/l/iXPHUkIjXjtkR3iasfOWjHuSBKpZPdxuJbHFv305Ey8bWXjpZrn/cic0Kx1aWZHFmOO2rfZs+hnK6aMntCVMi+YcryblHG+I+Petc95xFj2zf0xWvl+/KzHthcc0cLi9xzHFFvbFPksZXy5cwJmW0w6Sl0qtnN9ilFObi9mPt8zf/dUzhVRekwSODth0PL3YZvzxVk93EM9lHHLqwGSvd8vV+JTzmPk+uzoya8jx4/8nIhjEa/W9SmdyF37vT3Z0+6O7E+cTbLcem/ks+lsvBx9oJb89iRpvHod+dRqw0bsPt/r/VI7+ZZ8ciwiuT9ejkXHZxZ/juLIQuyt14x2jo6IWISc0k6IrB/avm1qaWFGSpL2mYT4lPekHrMnZxZ2prwmeqFqxDlPeU7nfKZHH7N2HR5Fz/WacbV0Xz5r282WoMp+z+7fiH7CqH2Nlur8Xin9yojPybU4o9a53zvO/+o9LY6J5qqjTSbXA0AvWmosAETrMWkkYvL37PEjP6+2PZOKEce/6fEcUUaOetTifdZzvIhW+lxEJALlLOvZY24NLJ45/mgTCqSZOU7NrvdJxa2JpD0JVu7/fkUkY6c897cm+M98jvuQFuS4P6Pf2+vzqicp/aIz/ZO9fbWefkmSekqPNRx5ba4xB2NQQE0pC/cj+m9nWKA0jlHnlcgr91z5kTLknoMyFvXD5XrdH7Qvl8t/lmX5I19xAP7y9+v1+lvtQuQkpgIFiakAccRUgDhiKkAcMRUg1tBxVUwFChs6pi6LuAoUJaYCxHkaU5OS6wEAAAAAAAAAAAAAYERfahcAAAAAAAAAAAAAAABqk1wPAAAAAAAAAAAAAMD0JNcDAAAAAAAAAAAAADA9yfUAAAAAAAAAAAAAAExPcj0AAAAAAAAAAAAAANOTXA8AAAAAAAAAAAAAwPQk1wMAAAAAAAAAAAAAML23lBd//fr1+v7+nqkoffv89+eyLMvy+99+r1wSRjPrvfX5+fnf6/X6W+1y5CSmtuNWz25mq2+MT0wFiCOmwj6Pbexl0c7mV2IqQBwxFSDW6HFVTAVKGj2mLou4Sl73Y623MVY5DnmsjWsvS1vnV0wFiPMqpiYl17+/vy/fv3+PKdVgLh+XZVmW5fs354dYt3vrc/mzAXf9dq1ZnGIul8sftcuQm5jajls9uxHLGY2YChBHTIV9HtvYy6Kdza/EVIA4YipArNHjqpgKlDR6TF0WcZW87sdab2OschzyWBvXXpa2zq+YChDnVUz9UrIgAAAAAAAAAAAAwA+Xj8vT5G4AoCzJ9QAAAAAAAAAAAAAATO+tdgGA/G4rW6/frpVLAgAAAAAAAEAE88AA/bNbPQC0R3I9AAAAAAAAAAAAAABNuV+IVmph8ZcinwIAAAAAAABM6fJxsSMnAAAAAF2QXA/BDBADAAAAQDrjagAAAAAAQG1vtQsAAAAAAAA3twT7Uj/vCgAAANAaGxAAQD12rgcAAAAAAAAAAAAAYHqS62EiflobAAAAAAAAAGA8ckIAAGJIrgcAAAAAAAAAAAAAYHpvtQswmtsK0Ou3a+WSUJt7AQAAAAAAAACAnOxWDwCMqGYbx871AAAAAAAAAAAAAABMz871J1n9CQAAAAAAbfILo1CXeTQAAIijfQ0AZdi5HgAAAAAAAAAAAACA6dm5HhpkpSkAAAAAAAAAAACQ232+ol+ABMn1AAAAAADA4EwQAgAAAGtsggrAoy+1CwAcc/m4aNwBAAAAAADTMlcCAAAAQDQ71wMAAAAAAABM4LYYwa94QL8sKgIAAMhLcj0AQCA/Mw8AAAAAAADUYjFd3yyiAoD6JNcDMC2dUgAAiKWNDQAAAH2SjAsAAPCnL7ULAAC06/JxkSB1gvMHAAAAAADkZj4CAAAgjuR6AACAxpkcA0YglgEAAAAAAACte6tdAAAAAAAAAAAAYtwWt1+/XSuXBACAltkUCdZJrofM7h9ABi8AAAAAAAAAKOExWcp8NQAAwDbJ9dA5uw5APPWKaO4pIIp4AgAAAAAcZWM4AACAbZLrIYifSGF2kv0AAAAAAKAPEmyBG/PcAAAAP/tSuwAAAAAlXD4uJooAAAAAAAAAAHjKzvUAkMAO/QAAAAAAdVk8DwAAQM/kH0HbJNcfMPOAnaAOMCfxHwCAV2YeKwEAYL/7dqOxRoA2mROCcajP83CtgRGJbdQkuR4A+IXkqDw0/KEOMQ0AoF252mr6X+gHAAAzqtUG0v4GAEajfQNtKlU3JdcDAAAAUIwBaQAAomljAqSzGBGgLnEYANoluR4qOjLYq3ENbTBZwyPxGQAY2bP2rzYQ0Dr9dwAAAADOML40nvu5ja3rOuP1n/E7wyPJ9TAwSQ5Qz1r90+gEWpIyYAAAADXYmAIAAOrZ0x7X/gYAILdXbU65DuQiuX6HM5M4Ki9rDDIwCvdyX/bsNjrSc8uzmBmMWn/5wbMWaI02FgAj8DyD/PRnAQDy0+aCsszNkkOtcSrPEHhNcn2CmQPKzN+9BJM5jGTE+zkqBm4lt490zgAAACBarv6zfvk25wigf+b6gKP8WjMAADAbyfWQ6HHwoJWBAxNcEC/XZEPu+rp1/FffywRLuiPnTMwmVcrP77qvtqWcK+cVYJ12I9CarbikTQ1QhnYiQBztU4Dx5G4ve3ak0X9hTal6CrRNcj00JOLh6QEMddWqg6U+d60zroN+nHPHUdF13r0IAEBPtF/rqX3ue9o11U/FQxzzHgAA5+ifADxXe7yrtXJAC1oYC5JcDztEVdYWKv1ZHuTwM3Xih9nOxQgxnTYc2UWdPuSMiwbCoQ3qIkBd2sesafG+mG3MBAA451l7psV2ziPtHoA/PcbD0jG8p8Xp0Ioe2lqladsxM8n1d2o3bHoicP7Q433y6vq5tswgR72N/OWJ6PpX+vvWjiOPZZP0Rqt6bEP0pPfz23v5gTGU/oliEz4Qb5T+UK54tJW0dOac1e4b1/B4Pre++6v788gi5FLnesZrC/Rtz3NUbANSGb8EoFeeYXM7c/2NtUJbUsejU0muh4mlPCw9WEnVymB8y/duys4jz85jD9+v9j2w5kzZWj7n9K1UZ9w9/EOpONVyPASOEUvnJabTs9wDzal6iKWtnbMatq7TnsX3j16dx2cL5ns69z3c27Cllbp3pD61UnaASKO0L7SvgRm82giObdrz0KaW62bLZSNdS89NyfVL3obNq2Op0LTszMSZe5t7dg+L1VIjokd7n/kt3j+j39sjO/PrSOp8O7bqYM1rZWdVaIN6dJznHbRvq+/UUwzMvTtV7t2BSyUknRkbPHvso+8p/TyJvO97qkPM5civSIyk110JR7wWMIuR6q9fzTjnzDPY+exDzXZGD3XvWRlbLnsPMbx0vNh7vdbOXWRZc/8iYov3I31zb7XN9Tmvl/GWYsn1pXeFvGkx+WV0IwUQ98kxI90D9Gu0+ptr4rmEUWJCzvPZyrWaTa3FP9Gvffbe3utcbbUSc0prdWfQXjrUsGbvYpya93aPk1OtEafIKWJDgzOJyCn39Mx9mb3ffc/O7mcWKfQw2dz6Z++V8guEW8c4svgaUtWalzvz3siyrpVL4tq2HstMfyQCw35n+gjq1thybBr6bKzwXs5F9mf6Vnv/7WiZXn1v/bo/7Rn/eBQR23o9/2I1UUbd8PRMjpTFie3as5iqJdmT60vtAr/3PS1VhK3v86oR+Oo1kUo0yFvUcqWFEnLEmp5iAHkcmdCqdd94DvDMs/jY8j0TNRjZmoiBuMdj9R5rUpKzWl3AYUcrnunxurdW5pQBq5aea0fGTo4cM7LPE3nMKK3dj5yXc0IxKknS/bbfswWPZ4/lGpxXc9Gt6zeOM8/hiEU3KW2UrXu+VJ2ovbPkq7ZzqV8diXjPGS22HyMWpREv4jq0cowzn7Onn9nj2HIpLfanj4w/1x43PXPcFs75zM60USI+N+X4z96zJ/k8ahzv1efv+bc95dk6N6PE7sik98jPz/V5Lei9/PzQ2jO0dk5pK+ehpNbugZb1GvuK7Vzfip4u1JHEkpTvF7Gr/5GVh2eSfHpaTICHSAmlBtjPxJqU498YUJzHkWvvviBa6UGfUnKXbW+77dXrcg6klhLVdo4UMci759mf0tY786yP6Fdoj5Zzps6fuR/2fEatmL0ngT3nLsOj3/+lEyhS/601OSZrR7/HWtPTZG7OBQDEmvma1Bq/nPmcl3Yk2Sbi81L+LWU8rNa4ae9J9ZEiF7KlPCNrPVdf9a+36tCZsu0Zj0j5HG3W/CLuhzPJzEeOu+f4Zz6X486Mmex575l8hdQyrCk1fvVq0cfeBOm191JeDzFnz/O59gKUPWV0n+/Xw33JXMwN9idqnuzZcSP63HveG+nI55RaEDVjv+lyve7/0v/4xz+u379/T/uAyqvceG6WiS33Wn2Hguvl8nm9Xv+RoTjNiIypr0hUh7GIqetKxdRZlXqWtJgU+4zna19CB2TE1FVHEnFL1R/1lRQ57pfo51vO8Zwz3187dZ12KjU9q9OzjAsf0VK7ITmRTExdletajlCPWrrfa6t1Ls5snOW6pdFW/dWRmHqTsrC+93tVnWtXrXst+nN7rDNi6rrUuLonsbuH++EMMbYvrtdzZ+qumLouR45q7+MDEfdZrfbSoz39idqx5sj5LvWevcc6e7zan3NEdExNSq6/XC7/WZblj+QSAKT7+/V6/a12IXISU4GCxFSAOGIqQBwxFSCOmAoQa+i4KqYChQ0dU5dFXAWKElMB4jyNqUnJ9QAAAAAAAAAAAAAAMKIvtQsAAAAAAAAAAAAAAAC1Sa4HAAAAAAAAAAAAAGB6kusBAAAAAAAAAAAAAJie5HoAAAAAAAAAAAAAAKYnuR4AAAAAAAAAAAAAgOlJrgcAAAAAAAAAAAAAYHqS6wEAAAAAAAAAAAAAmN5byou/fv16fX9/z1SUeXz++3NZlmX5/W+/Vy4Jtd3uhZvbPXH/97W/3f99VJ+fn/+9Xq+/1S5HTmJqn8RweiSmAsQRU+G82fq3PCemAsQRUylpbQ4DRjN6XBVT5/PYF18WMZxyRo+pyxIbV9fq67Kos/zJ2Go7al0LMRUgzquYmpRc//7+vnz//j2mVBO7fFyWZVmW79+cy9nd7oWb2z1x//e1v93/fVSXy+WP2mXITUztkxhOj8RUgDhiKpw3W/+W58RUgDhiKiWtzWHAaEaPq2LqfB774ssihlPO6DF1WWLj6lp9XRZ1lj8ZW21HrWshpgIzucXa67drnuO/iKlfsnwiAAAAAAAAAAAAAAB0JGnnegAAAAAAAAAAACC/Z79mAADkY+d6ADjg8nHRiQUAAAAAAAAAAICB2LkeAAAAAAAAAACgUfcbv12/XSuWBABgfHauBwAAAAAAAAAAAABgepLrAQAAAAAAAAAAAACYnuR6AAAAAAAAAAAAAACmJ7keAAAAAAAAAAAAAIDpvdUuAAAAAAAAPLp8XJZlWZbrt2vlkgDAeG7P2WXxrAUAAAC4J7keJmJCEgAAAAAAAAAAAIAW3W8IUIvkemhIC0EBAAAAAGAmNiUBAAAAAODmS+0CAAAAAAAAAAAAAABAbZLrAQAAAAAAAAAAAACYnuR6mNDl4/LXTx0DAAAAAAAAAAAAAMvyVrsAMCOJ7QAAAACwztgZAAAAAABQi+R6aJzJRAAAAEagfwsAAAAAAAC0TnJ9ISaQAQAAAAAAAAAAAADa9aV2AQCgZ5ePiwVUAAAAAAAAAAAAMAA71wMABLpfbHH9dq1YEgAAAAAAgHW3+QxzGdAf9RcAIC/J9RVp7AIAwLwsxgEAAKAnfsETAAAAgBlIrgcAAACgGpsPAAD0S1sOoG0WRgEAAKT7UrsAAAAAAAAAAAAAAABQm53roVN2g4Fy7OoBAAAAAMCozDkBAAAArbrP3Ss1dmHnegAAAAAAAAAAAAAApie5HgAAAAAAAAAAAADozuXj8tPu5nDWW+0CALFq/AQGAAAA3NM3BQCgNbc2qvYpAABwhMTdOeg7Asti53oAAAAAAAAAgKnZ7RMAAOBPdq4HAMjEimYAAID9JPJQmnsOAECbCEZgThIAIJad6wEAAAAAaJYdNAEAAAAAgFLsXA8AAAAAAEzPbo8wB3UdABiFhegAAHlIrgcAAAAAAACYgCQ8AACIZxFvv1w7YI3kegAAAACaYjAbAAAAgJlYAAdQzp6Ya54C2pa7jkquB4DCNMDHZMALAGCddhIAAKUYewUAAIB5GRcgiuR6KEhCAQBAjJ47xdqEAAAAAAAAAABpSuVbSK6HIC0meLVYJgBgP8/yX42amO5aA6MYNU4DANCXlHapPjkwgshYJi4CMCvPwLmZ3+iT60Yukushs1IB/MjnaBRCnD31afYGnZgD69bqhud6Wc4dAAAAADACY50AEG/2XA+AluXqA0mub4iO7jmtnb+WGlYtlQVG11osKuExxmx99/vXP752xvMHnCNuAIxD3xX696q/t+c9AHDUmY0KAEYkxsGczJn0KXW+fe29rnks53VcpdtILd1LLZUFnmmpHyO5vgEt3RBbBNlf9XT9gH0iYl1UbJg17tb+3kcSQiCn2nWiBdpcAAB9etaOy9221YbmFf0LAAAAAACekVy/5JloGW3ypuXJhtbK1lp5gH6MGj/OfK8WnqdbZYi4bpL55/R471iUU96ocRcAoLSWdnx61s6+vXat/7W1Q5w2NvfcD9AWfXuAfLR7AOLtmRcWf8vTryBaS/fU1ngpsK7r5PozFT0lgKV8TkSS1J7PKxXktsp/5tykvOfZhBaSOulXD/ddS7Em4pkXcZ6jz0mJ51kL95rOCVFeJQZxXgvxAgBgFHvHFc8c82z77VkZUv4+Qrtxz2KFkb5n1GuPjI2PcB5JN8L1b3H8IUeZRrhWZzkHwBrjptAfz/Q+5Bg74VdH8tWevTflPXs2hVBH56E9Rcvcn+u6Sq6P2Pl2z2u2bpBSjZe18qRO+Nzbe+OnnKu1/z/zORG7Am8lnQkA0K5n9bfUYqNaO+2deU/KzntnJn1zn5sjAwc5VvK/KkfOCbu1v3le8coog2mRvwxRuu5oYwL8LNezqZW2USvlgNJ6avP0MCG9t/17ZJK3VB+4x3hYejw/5TU9nUeIklIna228VCvWmcyG9vTQ9mnpV6T2/DsAecwWf1NySfb+PVoLY1EAr8hZeq1Ycn3pXeZvIi9yrYde6US/s3IvgijhTCOsd6mLTKy0bMOexOMj9+yZJPc9SeDPyha9+ndke87ns3/fU38jFgDkltIpPrKAI1LEAofZ7vESIs7tqDtYpnh2Ho8sco1oT0a14/aWbc8ip5TPezwW0J/c9flZjBE3oH972h9HNrfYaqftacOMOh52Ro4xjJR++55y7O1Xplz7PZ9XWovj98wrenJy6z5roQ0YuYB+7zFzixrvOXJu9o63p3x+ij3vMW4Jc9uKUy3EhhbKAHCj7/jckY32jrwXjopuU/TQx2+dmEoJ2ZPrjyTppQaI6AmfUSvf1sT7aN87IvFptHOSYu9A7cznqKYzi47OfM6eCf4c9Sk6yVLi4p96r7857u1SStVhXit9HWrdZ7ljXOT3ynWsiMSF2ok6r5LhZn2O3Rg4pTU548WRBUvRnzfq7qFnFolBLqXHPN3v5ZW6JqXbtpKY9mtxkcKoUvpQr8ZAS//y8d7j5eojtvJsaKUc90qNFaWMt5dOdq+dSOt5M49SYz+l+7drjmxgNaIzz7XoBW6z0T6dU0odybnhx5H7T/3+VcqzIiUPqKUFrzneA1Fyz50f2XRlVp4Rz7k/9im2c30KF6+smc/3zN89lXPVhlYSclu+H44k97f8fYBy9iwgOnK8Vp3dgaynxYktL6CJOGbEositCfg9E1oRi9dyJZAZNGnDmYmXUtd063POPCvOTE6emUAoda5KOfK9cgxmH/klohplABhZi30P2hO94UfOBXmlFr7caEscU2sTmSPH76nNvnWsUp9Huq1rtGehUmS9OvOrsSnvOVK2M+9pud2TsmA04heUHh25Jkd+9bTFGBMx1pa7HrBPiXn9qF9GO/N5W+8585ojZXYv9/18gUfPnm09LkAvld9Uah5pT/u/xMZHa+3SrTJGtzVrKz0u8UzL5+hek8n1AABQy2iDNZGJoKOdm1GdmRh59v97/+3I60roYTCjd2eSjCImm8/sqnTk86Lv75wTtykLpFKOV9uRicGU40a97v61R67BkV8Ne3WcI+89+hkAPU9iMrZnbcnSk+Sld/fe8/eIc3FmHIKx7Om3RdZHff9yzi40z7kgKWoRfOR7eK7W4rSIGJOyiULp+yZ3PWBcucZPa9eJZ/aU8UhC6KvP6Zk+Pr0wv13Gq/7ekWtQYqHZq7/1uMj1JqVdGnXcx2OnnqcezuuyLMvlek1YXXG5/GdZlj/yFQfgL3+/Xq+/1S5ETmIqUJCYChBHTAWII6YCxBFTAWINHVfFVKCwoWPqsoirQFFiKkCcpzE1KbkeAAAAAAAAAAAAAABG9KV2AQAAAAAAAAAAAAAAoDbJ9QAAAAAAAAAAAAAATE9yPQAAAAAAAAAAAAAA05NcDwAAAAAAAAAAAADA9CTXAwAAAAAAAAAAAAAwPcn1AAAAAAAAAAAAAABMT3I9AAAAAAAAAAAAAADTe0t58devX6/v7++ZigJj+vz35+Zrfv/b7wVK0pfPz8//Xq/X32qXIycxFShFTAWII6bCzx77vPq3pBBTAeKIqbTu1VyJNiQtGj2uiqlASaPH1GXpK65u5bBom9Vzuza3a6ANzRoxFZjJ2rMw8hn4KqYmJde/v78v379/jykVTOLycdl8zfdv6tWjy+XyR+0y5CamAqWIqQBxxFT42WOfV/+WFGIqQBwxlda9mivRhqRFo8dVMRUoafSYuix9xdWtHBZts3pu1+Z2DbShWSOmAjNZexZGPgNfxdQvYZ8CAAAAAAAAAAAA0KnLx2XXZqoAjEtyPQAAAAAAAAAAAAAA05NcDxOwohIAAAAAAAAAAAAAXpNcDwAAAAAAAAAwKJuxAQAA7PdWuwAA0Lr7wcbrt2vFkgAAAAAAAAAAAAC52LkeAAAAAAAAAAAAAIDpSa4HAAAAAAAAAAAAAGB6kuuhAZePy3L5uNQuBgAAAAAAAAAAAABM6612AQAAAAAAINX9ZhXXb9eKJQEAAAAAAEZh53oAAAAAAAAAAAAAAKYnuR4AAAAAAAAAAAAAgOlJrgcAAAAAAAAAAAAAYHpvtQsAlHP5uCzLsizXb9fKJQEAAAAAAACgpNt88bKYMwYAANp032+pxc71AAAAAAAAAAAAAABMT3I9AAAAAAAAAAAAAADTk1wPAAAAAAAAAAAAAMD0JNcDAAAAAAAAAAAAwE6Xj8ty+bjULgaQwVvtAszoFlCv366VSwIAAACQzmAxUJMYBAAAAAAA5CK5HgASWCAFAAAA0C5jNwAAabSfANpiUwEAqE9yPQAAAAAAAAAAABQmmX4sFq0BjEFyPQAAAAAAANAdiSsAAECUx4UO+hsA85JcX4hVhgAAEM+gFgAAAAAAAAAAUb7ULgAAMJbLx8WiMgAAAAAAAAAAALpj53rIRGIpMDu7SQMAAAAAANRjzhoAACCdnesBAAAAAAAABuCXRQEAAMrqqR/WU1mhJjvXQzAPH4Cx2ZEfqEHsAQAAoEe55kzMxQAAwDHmnIBlEQvoV6l7V3I9AAAAAAAAAMDEHhcuSbQC6Nda4uFjnJdYCwDPSa6HzmnsArWJQwAAAAAAAAD9M/c7Fr/4VI+6BNA3yfUAADsYeAAAAACAeJJOAACYkflnADgu93iS5HoYmIY4nKMOEcUEIeQ3aj3zLAJ6M2o8BgAAgFndj1Hq7wO04dk4rHklKENdgzxaqluS66FTLQUSYD5i0A8SyAAAAAAAAADYYp59XM+urUVqAH2SXA9BIhrAPSZoagQCAAAAAABRHudbzD0A1LE2/93jfDZwjFwQZlJq0YPnKEA/JNcDAEBnDLwAUIudlQBolWcUAEAa7SeYh/oOAJBGcn1mGqgAPJIUO4Yjz3jXHgAAAMrQBwcAZiZPAWAu4v4xzhsAz0iur8jg/hhyNLSO/LyW+wmobfaOpzgMZc0ac8QaAAAAYM3jWIkxBAAAAKAHLeZ/SK6HwbQYaOAog//0TkwmmnsKAADGqX66AAAgAElEQVQAmNWrcRFjyQAAMK4z7f2IvoL+BsB8JNcDYTQmqcF9V5bEXmjLkV+7oW2eawAAAPAzY5LPOTcAAHPL3R4ccd4q6pydOc6I55U/tXxtn92zLZcZapo2uX7URCTBrpxSA5aP19RAKYxDzO6DuAt9EVsBAOakHQjQllpjaj09D46UtafvBwDs89hu8pwfU+9zzj22Q3Oc896vI0ANuZ8huY4/XXL9LA+5URcPADyT8qD0s19lvTpXpc9jK9etlXLQjz1tWPdV32bppwD9EqeAFohFAO2L2L0xshwtjpNs7Ra4LG2WG+hD7Q3ixC+Yi4UBY2g5hufoI8BR7iFaZkwhXhfJ9S0/xJ8RTMdVe7cVmEGtgT+IkHL/ugfZ4vk/r61rr3MMAAAAY0jZVCHlPc+OYRwBxmQOG8hJXf/Z6HM0Udc7R/tTm5YaxMA8Ro+l/Kq3GN5Fcv1NrpMbsaq65QvfctlyyNk4G0Xkrt3078z98Oo+qN1BqrWT/ZrH50uEWju+5zpGzu+z9rnPnv03szwz4WbE9uJaZ3zE77ksY32vkb4LfXIPxjEoCv3YE/v2xsc9df9MHz+XrT6h58Nz4j20p1bMGmnOIPocnkmEr/X5QD/UcaAl+s+/GjVOp8yvp8zN585LgBSj3EujfA8oLXty/bPKGZHA2GJjzIrwdkggz8M56U9E8vyzSeUjx3olZZI+9TUp7601wb92rDPn/kjCeCvP2JSFGzkWiIh1c8nRXj0r4ifUI+N+6XLkVmoxZq1EhhbP+ZZXO/CNvjgCWtJyG0gMgHjPnr9HJjRfLWreek/0BOqr40cdc+244lT6OXjV5nv8e0uelbGVvhjn9Xg9IsYR7kUukOqJRB6A8149K0Z/jkCKPZuS3fRYZ1qYM8nhzFz9KCLyMY68N+I9zKGVGDpbu+ds3O/pfNUua678t5J6ieHVdq6PTHzOtXNEqZustYSu0o3cqN2Neql0EGFPY/BVktqeY6a8t+Z7einH0c/behalPKvOrB4v5UwjsPXG4V6tdPZmkBIXR7zfSsW6I5MpNdujqZ93JobnsrUDyL2W+hx7X7vnvI5QRynnVUKo5LgYZ9pvtdrmpceCerhf3NttilwUn/J5LR8zYqI7YkJ4rS0WuYj12TH3lD1i8X10O7iHsd0SC/Sj7xd+qHlua41lnanHKa9tvf7uWciT8t61f+vNqwVuKffL3ntaO5IaRnmmlm7v53B23EUMgR96T1hPaW+kfq+UeZDoPmtPMXnLSN+F+ewdqyutdv5pi86U9UyO1JpauctH5ohau8av2iWtlfWoasn1e0QMbqUeK9UIk7y1buaWz90oFTyCc9GWEpN4xIu4PmcWR2y9p6VkphQj1YeUAZmeBslGEtHBe1RrQuRIolDEAGPNJPQzZbrpsSOY+1qnHDvH+TuzIIt4zxIJayUKrb320ZEJ3FyTv3vr4pk6tGdBbm4pg9uttvUiB0tr0LYcx+O1LP2M7Umt9sCrJKJnzvQRjry2VjLTme+V63nW0n1CrDMJfdHP/cg5r9Rjpr4nx1hkC0pN4PfizH366rWt3B+jJFe3bmsMrYVEk4i+/Zboeyxne7+UiOfN2muP/OJRjvZvi0nOLSeQcc5oY+HR8eHosWrmmgH1tDAG1GreZ0pcHG0MbWsuMSWv4PG9e15b2wyJ8kdUT66vlUhz5BgtBYVcSZSp7z3SaTyTWBUxUNxiR7eWlASGs8cF2jVzQwjOevXMqz0RXfp5HNmGePVvtXcVOPPe0XaYutnzvWp/V8mk5aRM/h5ZuBNZj84kjeRKdjzznhrHjNZSGUs/x7fu8eh++9bnrr1m6/PFVjiv9DNjK0HprBzHPzIRmdJviyjzkdhKHbnrQIQR+pOjce6POzu28Oy1lHMkGTJX+yLivZEx1mKOckqN024tHDnz+WvHPXKMI2XyHBtPjj7NjJwnGN+rdmrpPnfEvHepuLVngdLWeyPmA/d8fo62Uel5yOiE/DPzOa3Mb9Z0uV4Tbt7L5T/LsvyRrzgAf/n79Xr9rXYhchJTgYLEVIA4YipAHDEVII6YChBr6LgqpgKFDR1Tl0VcBYoSUwHiPI2pScn1AAAAAAAAAAAAAAAwoi+1CwAAAAAAAAAAAAAAALVJrgcAAAAAAAAAAAAAYHqS6wEAAAAAAAAAAAAAmJ7kegAAAAAAAAAAAAAApie5HgAAAAAAAAAAAACA6UmuBwAAAAAAAAAAAABgepLrAQAAAAAAAAAAAACY3lvKi79+/Xp9f3/PVJR5fP7786f///1vv1cqCT17vI/W9HxvfX5+/vd6vf5Wuxw5iantEqcZjZgKEEdMZXZbfVFtZ1KIqaS6xSCxBn4lpgLEGj2uiqlASaPH1GVpJ64+G7vTj26b8Y68Rsv/EFOB3q21V2rF5lcxNSm5/v39ffn+/XtMqSZ2+bj89P/fvzmnpHu8j9b0fG9dLpc/apchNzG1XeI0oxFTAeKIqcxuqy+q7UwKMZVUtxgk1sCvxFSAWKPHVTEVKGn0mLos7cTVZ2N3+tFtM96R12j5H2Iq0Lu19kqt2Pwqpn4pWRAAAAAAAAAAAAAAAGiR5HoAAAAAAAAAAAAAAKYnuR4AAAAAAAAAAAAAgOm91S4AALTi8nGpXQQAAAAAAAAAAACgEjvXAwAAAAAAAAAAAAAwPcn1AAAAAAAAAAAAAABMT3I9AAAAAAAAAAAAAADTe6tdAAAAAAAAAAAA8rp8XP767+u3a8WSAHAfkwGAtti5HgAAAAAAAAAAAACA6UmuBwAAAAAAAAAAAABgepLrAQAAAAAAAAAAAACYnuR6AAAAAAAAIMzl47JcPi61iwEAAAAAyd5qFwAAAAAAAAAAAAAAaMtt8fz127VySehZb5sw2LkeAAAAAAAAAAAAAFjlV+qYieR6AAAAAACgSyb1AAAAaJ2+KwD0RXI9AAAAAAAAAAAAAADTk1wPAAAAAAAAAAAAAEBRLf7Cy1vtAgAAAAAAAAAAAABEaC1JE4C+SK4HAAAAAAAAABiUBEOY230MuH67ViwJAEAfJNcDAAAAANAsiUAAAAAAAEApX2oXAAAAAAAAAACAci4fFwtZAQAAVkiuBwAA6IQJLwAAAAAAAACAfN5qFwAAAACAsdwvBLp+u1YsCTCiW4wRX1jj/gAAAEan3zMm1xUA2iG5HgAAAIAQfl0DAAAAANJJrJ6D8dMY6gsAuUmuh4FpTAIAABDBpA8AAAAAAAAwA8n1hZiEBgAAAAAAAABaYsM26IO8IwCAciTXQ2d0mAAAfmUCCAAA5mbcFCCftRhrDAbGZ8wV6lD3AGidZxUzkFwPFXnQAAAAAACkk0wP9dzXv8f5jce6aR4EAAAA+tTz+JvxiD61dN0k1wMAAACQTUsDYQDMw/MHACCN9hNAvJ4TU3vwauEvAJwhuR4A2PTY6dcxBVplAggAAAAAAAAAgKMk1zdAAhDQGnEJAACI3lVJPwNogR3NAAAA6IEdzwEA6pFcDw2QYAB1GZgAAACA+RiTAwAAAAAAHkmuB4ANdrUDAAAAAABgBjalAqjLZgBAL8QrRia5HjpxZhDDgwwgP7EWyMmEFgAAAAAAADN7NV9mvh5YFvPqxJFcH8QDmhSCOPDKWozwfAEAILdSfVVjKAAcZVwV6tJeBOiP9hO0Tz0FoDWeTaTIMY7TwtiQ5PrMBBrOcg8BNYlBAADj0+YDoHWeVTCnFiZSZ+OcA0BfPLsBgBpSxmujx3ZLtX8k1wfTcAUAAHK774DqewAAAFBbxESphTT1OPcwHvUa5qLOj0kOWh7m2GCdZwkt2nNf5npeSq6HBnlYEenMAyRnZ61mh6V2J/Tx84+Up5XvULMMMJq157/6BUBOLfc9a7d3YSYt17eW4xQA57X8DOJPnsWQ36jzLca7AQBgLs/y4Xoluf6k3m8A2uJ+IicTFTEiFisc+XfxoR+jDoQDAG3a2z7VngR6sjdm7el/GQ8ByKvVdqb4n59zDADMJqX902o7OTdz5TAnCyupIfezVnL9Dmd2FI78/HuCDxDtSNw60jFK+bmWx2NHD9bnfMimTPBHfI7nQj2zDoyw7Vn9VG9jqYMA/RLDoa7SdXBPO/hMmbZ2xRFz+tTjdTOeD6+t1ZEjm5IcGY9WFwGOEUshXs2+zrO5eNqdwxOH0/Q4lgCpIuNVrjrTyvOm1dg+slHisOT6Fc8ubu6LPtrPIvAr15QoLcaLM42irYbMngnx0jt1plyDFhMWcnzeTekGae3PZy6p8arU58IeBl+ZVc62gnqVn2cgxMeaUn3UnhabtlimWY1+LXqqF9Cb0etR7THfXMcc9XrBHq8WG52pG6VzGiI+f/QYDrQvdbHnq7GaUnH42efX0kLOCsyg57p25Nc/9rQ5W4mDjGeI5PqzuwO3VsEidzJelva+X+967txvTd5s/du9iAcd59UaoDq7y31OpRcetNJwbaUcy1KukVvrO7d0riknYtfLZ8fwnMxjlPZwdN8AWlAq/pX6laIS1s6Z50os548WlW4H5Bo/PbIb8Rk5dr9/NcZQOskxZXOB1I0I1p4zR77f1nlMOUaEFtoefkmBo3Lev3uOnaMuRh+vdDJTbS22W1ssExzhXj5m9LgLsMXz47kjCwFqjb0/anFsiLltbRa9p2/fyr2aMg69pw5Gjgezbab2f9fJ9XsuVNRrWnMkeXTve9aCRekJiDMTLzmkBOYeBnJTJnqij885LU9mRBw/osETcSxinHk25eqc5khGSPm8Peek9jNvRrknY88kE20lTu6pI0e+x5HBrYhEmZYm9Eeoi6M/C1vpK3BcSvzdWrQX+atJLRu9Xr+y9d2PjGW86uv3eH8wjj3tw5Z+ye6olsueMsawdU1eLYx6lPLreHuen6l9nT1joGfa/a9ibMv3Q0mjLBLuRYnE9dzHX4sbqQtrer/vziwka+37jhoLcy+ka+06wjNH4lXL9/eZecAR+jMwkiNzNq2JbtOWznU4o4dnxpYWnwdHxob26Pk6jaLUAonadbPFerVHyrhl5Oe09izsfaxmFF0n16/pNTAcdWTxQESCV087DKasdsrx+aOq3QgAtp2pp6XjYOTiiCMrc1tadGRyqJyeF+WUumdLLy7JdQ0iJ3oidtXIlUwUMUEXOQC41unf+tw9C0f21N2t4xNvz/MrckAsIoZH1uvU4+2V+3uNpIWxjGdlGe1anHlGEqd2n831/lXEc66F1+49Vu+/RLe3/Hve01NfckZr92zqNUuZeN+zSGXrWCnHaKkf3aO9fdRS5Tj7ntTy5kpOiFj8HF13tV14peVFR7O1w/csxqwds1NEXL/Z7gH60UoS4p62857F8CNoOR7yw+j3YQsi5kCP5Jzk+JzoMs+u5YVTe3bmj5hfP3K/zrwwNntyvYo7psiHfVSSQumEpJzH6Mls3xdGEjFBUcPeMtZM5IVRHUnq772e7U3gjdi5/6iIBUln3nskEeTI/RKRQKZ/Wk70uc4ZS15Nmkcuznn2GWvvidB7/M3hzED0mXGJMws5ohZk7R38TPl+7rG5RUweMZ6erv9WvD2SIE3bWr5+pRKcjZWl29NXiFqsG2GEPu+RNucI33tEKUkaOT43eiH9TQ+bGfVg65ycGYfO9euGe8aFz3yvV8c9eoxXx91KPt6TpMX4WkpCzJGTNGp8PjK+WGoB/Z4YA0edGb/e2744Ml5UKudxz7HUwXadGbNJaTu75mku12tC5+Jy+c+yLH/kKw7AX/5+vV5/q12InMRUoCAxFSCOmAoQR0wFiCOmAsQaOq6KqUBhQ8fUZRFXgaLEVIA4T2NqUnI9AAAAAAAAAAAAAACM6EvtAgAAAAAAAAAAAAAAQG2S6wEAAAAAAAAAAAAAmJ7kegAAAAAAAAAAAAAApie5HgAAAAAAAAAAAACA6UmuBwAAAAAAAAAAAABgepLrAQAAAAAAAAAAAACYnuR6AAAAAAAAAAAAAACm95by4q9fv17f398zFQWI8Pnvz7/++/e//V6xJOd8fn7+93q9/la7HDmJqX271bWe6xnzEFMB4oipsO6+L/pIm5lnxFSAOGIqQKzR46qY2rdR5oOZx+gxdVnEVRhFD3kgYipAnFcxNSm5/v39ffn+/XtMqYAsLh+Xv/77+7d+6+vlcvmjdhlyE1P7dqtrPdcz5iGmAsQRU2HdfV/0kTYzz4ipwP9j796O3MitBgA3VUrAVdryoycHKxcFogBcDmACmVxGQeyjy65yCPwf9qd3RDWbABp3fN/TrobsBtno07gcgOQjpgLkNXtcFVPHNst8MOuYPaZum7gKsxghD0RMBcjnKKZ+qlkQAAAAAAAAAAAAAADokeR6AAAAAAAAAAAAAACW97l1AQBgJB9/ahMAAAAAAAAAILdbbsL1H9fGJQGAfD7m3vX8jJNcDwAAAAAAAHRFMhHAz2wABQAAUMen1gUAyrn882KQBQAAAABYhjFRAAAAAADOkFwPAAAAAAAAAAAAAMDyJNcDAAAAAAAAAAAAALA8yfUAAAAAAAAAAAAAACzvc+sCAAAAAAAAAAAAANR2+eeldREA6Iyd6wEAAAAAAAAAAAAAWJ6d6yPcVqld/3FtXBIAAAAAAAAAAABmYhd1AGjPzvUAAAAAAMBULv+8SEiASbifAQAAAKjJzvUAAAAAAAznY6KlXxsFAAAAAABysHM9AAAAAAAAAAAAAABV9PxrhXauT2BHJAAAAAAAAACgZ7fcBnkNAAAA4excDwAAAAAAAAAwmJ53egQAABiV5HoAAAAAAAAAAAAAAJYnuR4ATgjZEcSuIQAAAAAAAAAAANA/yfUAAAAAAAAAAAAAACxPcj0AAAAAAAAAAACwvMs/L9vln5fWxQCgIcn1AAAAAAAAAAAAAAAs73PrAgAAAJDutnPG9R/XxiUBAACA8+wQ2R9jD9CWuAgAAFCXnesBAAAAAAAAAAAAAFieneshkt05AABozW5VQC/EIwAAAOiP/joAAMj1JJ3kepiEARIAgGM6zgBtiL8AAAAAAADAKCTXA0Alkorm5voCACuxwBsAgB4YkwMII14CAACEk1wPHfqYpGCAAwAAAAAAAAAAAADKk1wPiUZa3T9SWQEAAOiXHeuBHohFANCGzaEAAACAFUiuhw/uJ+ZWHBiUiA8Qp3RSh7gMAPRAIisAAAAAAMBc9uZ/ZsxPsVicWJLrgV3Pkjkle8IxyUcAAAAAAAAAAAB1ydviLMn10BFBHQAAAADi2QgCAAAAAADIQXI9ADxh4UufVkucWO3zQknuJwAAAAAAAEbwMV/B3BYA1CG5HgJIrAXo132MNqAAAAAAAAAAAEAuFrrAWiTXZyKxj1Jy7qxaYpdWDQcAAAAAAACAdkLngWvP7ZpLBgAARiS5PkDKruUlkpiZV+ud8VufH2bifiov9js2cAsAkEbbFoCReG7B2szLAZwXEkvFWwBmYiwBoJ6YmNtDv0Ny/UkesnNwHfPqIbgBtCKZHwBgn74iAAAAlJVj3lv/HQAAWJ3kejip9uBC68GMowGZ+7+1Liv0qsS9sXdvuvdgXJ6hPGJRKDATzzsAAD561ue1qQUwu1bzzgCwEs8/Yq1YZ+4/82x9cPNT42h5rSTXw4GeH46CPPSl53hxb/b4MdK1AABY0aP2mmQpAEqYfRwEoCRjrdBGb/deb+UBmJV42x9jCuMqfe1mTz6HVnp6FkquZ2k93YzPhCQflDyvRgCp1KE8cnyPIfGi5PXqYXf9kerjSM8oyhmpzvZs5PtJHQAA+NPI7ToAANjTcxs35BfNH41b7r3XWOd4bIRQTg/zpsA5nmuMrud26BlyKdu7/45i8tV6IrmeLsV0xp+9pvbP5t2f76isrYJCynl7DGCMRePiVynfScx7UgY2H7035LwhcTC2jAD8ofUCKYCSTLgDvRB7xmTcEsZnzgJgfDFxWbt7TK5bec/mZy12gHNy9CGMZfPIs2Ti0evHo/unVL5TLT2WiX4sm1x/9MDMebO4AePcX5czyZyh58ht1JU2cCQloXsGtT7LmST70mpfz0cdjNzlaP1LANoHrGCket5jWWd6nrKGHu8jAOoZ9Tnw7JciR/s8JejXArnp7wKrStm9cQQlPocEYlb3KG9m79/cI+PYu2a9Pgtm+2WFXr9n6pgtyX0GnmHtlL4fQtowOY5dq+5UT65vHbBGTHw+arS0/j5rGfG67RmhjKwjJH48q7OtEq9njXV7Sq2ePnuso06/nabiGSimN2fi7Ug7rB/Fr5GTh3oua89lIw/XmFJGrFsjlpn+5WynpfxS2aP39iTHLkqr6PnneUvEUH1vAKCFHtvMvUjZaE9fuw71dlwxOQDPfv285X02Yi5U6NhJy83tSn6PtTa5jVEqqTP2PXu5FSPU6VmVvgbPNvP46FkZci90Kb0o8l6JXIPa1y1k3LRWwvqz/IWYHOMc5WmpViytllyfsgtQSsUbaaLnJqXMMQmvZ3Z0n+FhrmECPwtpyJXsSNfqVB09Q840ikoaKV7VnkyvffzSqzOP/r3nNsvsSsWn0DZtSNvvUYdpT+lfwwh9T0h7f4S4d5Ojv1HreRPToc55vjOvrVVPRqx7M4lJ5Iu9RqVjeUoiaqtNBWYZQ3k0+XTmOVf6mvT0/T1z5vsUQ8vJkeCcMr4Yspg6pozPxLRNSp0v9D0j1feUSZQzdS5mHDplIceI1+AMCwCgrFUWYD1r/+aKraET/LWs9szgZyNd/5H6jLWktEdD3jNCfcgh57iV+jmu1v29GGdypEpvRJoyp1dyLCPluEffZ8zY/LP3hpbn6Fh7YnPcUjaRLCUlJ2CVZ1WPWt7HtY7fWsn81h7unTPXL8dcV61y9PSd11Y8uT426SbHsc6+Z2Q5Elr2XtPbqqcUvZQDcgiZBMjx8Ez9e6nz7r0utOM3UgwYqayzcg3WkGPAKOX4tRKDnpU5pf1duk2YMphWqjOXsx+T4z1nxCTV3fS4i0jK97ZiJ78Xpfv4KbuVxbw3JYY/e0+pHaFz7oA0SxsopW+Qc/FFyN9LTQCGlGfv/Gcm1uhTyTGB0PfOVJ9yx42U856ZvK51DUq2oUseJ5cz5dFupYWY2JaSwNjbPXrkTKJQyHuevaZWDAjpM5xJtAr9973z3b8nZlO2Z21b2kppR525R3K023IlWqmD7Y0QD84kDD+L6yHjESM9r9lXq/8fmtCd8t5S7Y4zY3UxZevtPipd5tbjzr193/RHHfnVCN9JrRyKGs7MXZYqS2/HyqX493e9hh/469ev1/f397gTdPilttZqYunMeVN2SXXtuUkJYJfL5cf1ev1aoDjdEFOBFGLqvtYxdYT2zwhlPHJmInrUz9yrVrs3lCCm7msdUyFG6Z2JaieJjRxjxdR9YmqcEe+BpLofOOjf8+duJdfGEqF1LeWXYHKJTgQUU3flmMvYq3cxfdQciUg5FvuvYuQk/xCjj++0oq36q5SYuifn8zjmWDnuBffTulLaeCV37Q7R087MYuq+2Lgq9sCxMwtfR7q/xNR9Z9qqs7cPZ+/zpuj1uo2Uv9BTW/OM3DE1Krn+crn8e9u236NLABDvb9fr9bfWhShJTAUqElMB8hFTAfIRUwHyEVMB8po6roqpQGVTx9RtE1eBqsRUgHwextSo5HoAAAAAAAAAAAAAAJjRp9YFAAAAAAAAAAAAAACA1iTXAwAAAAAAAAAAAACwPMn1AAAAAAAAAAAAAAAsT3I9AAAAAAAAAAAAAADLk1wPAAAAAAAAAAAAAMDyJNcDAAAAAAAAAAAAALA8yfUAAAAAAAAAAAAAACxPcj0AAAAAAAAAAAAAAMv7HPPiL1++XF9eXgoVBeby41//3bZt2/7+1780LsmYfvz48Z/r9fpb63KUJKb2w/3K7MRUgHzEVAhza2N/pL3NPTGVe/exQ9yAcGIqQF6zx1UxFahp9pi6beIq5+yNpW6bcZEe9DhWJaYC5HMUU6OS619eXrb39/c8pZrU5fVt27Ztu37/1rgktHarC+/qQpLL5fJ76zKUJqb243a//vj//xfDmY2YCpCPmAphbm3sj/SPuSemcu8+dogbEE5MBchr9rgqpgI1zR5Tt01c5Zy9sdRtMy7Sgx7HqsRUgHyOYmpUcj0AAAAAAABACJtSAQAAAHDGx8VOtcaYPlU5CwAAAAAAAAAAAAAAdExyPQAAAAAAAFDM5fXtp13GAAAAAKBXkusBAAAAAAAAAAAAAFje59YFmIXdNrhRFwAAAAAAAAAAAABgPHauBwAAAAAAAAAAAABgeZLrAQAAAAAAAAAAoGOX17ft8vrWuhgAMD3J9QAAAAAAAAAAADAASfYAUJbkegAAAAAAAAAAAAAAlie5HgAAAAAAAAAAAACA5UmuBwAAAAAAAAAYzOX1bbu8vrUuBgAAwFQk1wMAAAAAAAAAAAAAsDzJ9QAAAAAAAAAAAAAALE9yPQAAAAAAAAAAAAAAy5NcDwAAAEBxl9e37fL61roYAAAAAAAAAA99bl0AAGhFYg8AAAAAAAAAAAD075bvd/3+reh57FwPAAAAAAAAAAAAnfBLoADQjuR6AAAAAAAAAAAAAACW97l1AWB2H1eRlv4pCgAAAAAAAADWcpuTNh8NAABwnp3rAQAAAAAAAAAAAABYnuR6AAAAAAAAAAAAAACW97l1AWAlfo4PAAAAAAAAAAAIccs1OvqbPCQAyEtyPQAAAABZHE30AAAAAAAAAPROcj0AAAAAAAAAAABUYqMSAOiX5PpC/OwOMXLUF3UOAAAAAAAAAAD6IJdnLh8XRLimAHP71LoAQJrL65tVrAAAAAAAAAAAAACQieR6AAAAAAC6Y3MJclCPAAAAAACI8bl1AWBFfvYJAAAAAAAAgFi5Fg4+mrM2lw0AAPSg5aYpkusTfLxgOpTc9LL7kfoJAAAAAAAAAAAAAPEk15/US0I161IHAQAAAAAAAC4ySc4AACAASURBVLi5n0O2KRsAAKPxi0q09Kl1AQCgN5fXNwtXAOiKZxMAAAAAAMCYzPMAwFjsXD+Aj40rq3DmZrUVAABHtBeBmoxHAACQSuIQAAAre9QebtlONsf0nH4MADeS66EhjTIAAABGYOIFgNEYewUA+JU2EgAAwHOS6wsbYfJ5hDLyJwMeAAAAAAAAAGuoNT98fx55BAAA6/BrxvSkhxxZyfWwAAMfAAD1aHsBK+phkAuYl/YVAAArSulr13oPAH0xdgLM5EybVhwkF8n1sBAPEVak3gMAQH4m3gEAAAAAxiOH4lfGuwG4J7k+Qu0H6d75SjZwNJ764WdWgBmVfs54jgHPjBgnDOYBAEAeI4y5jlBGOEs9BwCAeswzASlGnFd/xngEsSTXV7LXWCl5kwoG8/ETfpCPe6Ms3y8AwLxytPUeDcoay4A1xcSVGSd1AFYmrgPsKzHPYu4GoA7xFphR6/770fnFXUqRXN9QraDTOrhxTsnBk5g6oR71KeS6zH7tQj/fLI2pGa5n6aSpnr6jnsoC/GmGdrgEVGAGs7TRAWCPNjuruO/7auMBpBNDAWhhtTltz1v42dE94X6hZ6WfX8sm1xvYFvzY92wgPCYordYA70FIg6f2oor7MsWsInx03pD4lXNHzRAj1vOUX1XJ/exIOV6v33Xu+w8Yi7Y1AEB9xnjpkb4Bq6pd90PGnQFGoO0A0L+YTQ9HciYfaEQjXiPgZ7nu49nj3ch6itXLJtd/1NvNcqaCSOwjRqm6po6V8+h7T/kJ9dxCj3umrD13VnPcEzE/Y1T6Ova801TJMqVcx9r3lBjbVomJ25SFLinHr1V3elyIN+LPKPcYf1s7Exf1hSBODzFIshRwZC9OtXrenzmvNso5j76/M5sy5NxgYu9vtccW6Eto++ZonKCXuFFrA46UjWLOHKOWXq5jjNwb8Yz02aGUkZ7/7l+YW0zieK8x4OxcW+jn6/17KGnlzw6zyNmvGykWpLS7Z+sDt75urc+fSnL9B60nYFLe03Py4ypm/e5LJd4zpjOTlSXKMZrYcvfwOXsow1l79fbM87NVUj/llE6UfxYzSw9SPtttIqUzt/eeZ/U39+rx+/OH/v3seWsvTkh5T48LKGoISTwBxvfsfu4lJvWgtzhNWa73r0p+JyHtfdfisZTvqHV7rqdJMPqWo66GLNC4//+YzUhyJOjPPh48wqZCtRahhmz0kzKe9Oz4vXzPkFPr9kwt2sNjcJ36UardkWMRcsr8VY9zKbHzSh//7dkcw+yxfbbxj1qb5Y30nczozPXIcS1z3hsxdTZmE7KU49eWc3yl9rjHmY03Qo7Rc4x5NgZ1/7rcn6XUcYsn1+fcuSek8p6pgKvwHeThewQYQ8zkTWkjDjasJHeiR46k85iJxtB6HTJYmHqclPLsnf/Md5Ny/pD35+xIl574ThlEKTXQ/uy8j84fW5bQ94jD4+plkDrH4GxP9W+mfm3u5MdW1yvnBICE0DmdecaVjKU5xm1Lyz2pEjrBfqbtPqrQtnqPC2JnvzYrSpmUDHlP68neo2OExqdV6ntIm6j0d9G6j1ormehejmduSN0+cz7SnO1rlGiXxrRHn41PxcSNMxuZjC4l4fTMopyUPJDQuB8Sa3oY0/34+tT35C4PZYQmqH3827NjnDl/zGtS7t+j49Qeu0h57exyLjAoPZ/Uq1z3BeeUGo8K/feU+duYcvQ8l9Fqji9HzkGu8+Q4xqNrfRRjniW3lxrXj8nl6DkeVtu5/kyix5kGTs9ffg4lGnS5BkRCBxsAYDUGZPoWMzHdSulJ0Va/VFL7e07pPI6gxGKJlPfG3EP6CPM4M6B+JjEo5PiPlJ5oOvOemDGUkXYBrqVk0lvMYOWRWruU5HjGG+dpp1ScOpOQXzr+lVQ7yfLMxEjMe3LFi5qOrsVIdax2W4J8eqlnvUzkruBMu6Vkmyck2SZnUlMt6vZ89q5HjvG1WglIMQke9//2LDnl6D2zKXlf5k58DT1e6ViTUtaYHbbv5bh3jsbpZq3bPQvp2/cstO7USoKkndo5fT3XFzG1vDN9qBJzyLnHwY6O30KufNPelFqUkaNunWkfpLS7V4zZl+v1Gv7iy+Xf27b9Xq44AP/zt+v1+lvrQpQkpgIViakA+YipAPmIqQD5iKkAeU0dV8VUoLKpY+q2iatAVWIqQD4PY2pUcj0AAAAAAAAAAAAAAMzoU+sCAAAAAAAAAAAAAABAa5LrAQAAAAAAAAAAAABYnuR6AAAAAAAAAAAAAACWJ7keAAAAAAAAAAAAAIDlSa4HAAAAAAAAAAAAAGB5kusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAAAAAJYnuR4AAAAAAAAAAAAAgOV9jnnxly9fri8vL4WKAvCnHz9+/Od6vf7Wuhwlian9+fGv/27btm1//+tfGpcE8hJTAfIRUyHMrW39kXY298RUgHzEVIC8Zo+rYurY9LkZzewxddvEVcqQv8AeMRUgn6OYGpVc//Lysr2/v+cpFcCBy+Xye+sylCam9ufy+rZt27a9f//WuCSQl5gKkI+YCmFubeuPtLO5J6YC5COmAuQ1e1wVU8emz81oZo+p2yauUob8BfaIqQD5HMXUTzULAgAAAAAAAAAAAAAAPZJcDwAAAABAc5fXt91dOAEAAAAAAGqRXA8AAAAAAAAAAAAAwPIk1wMAAAAAAAAAAAAAsDzJ9QAAAAAAAAAAAAAALE9yPQAAAAAAAAAAAAAAy5NcDwAAAAAAAAAAAADA8iTXAwAAAAAAAAAAAACwvM+tCwAAAADAHC6vb62LAAAAAAAAAJDMzvUAAAAAAAAAAADAsi6vbzaQAWDbNjvXAwAAAADQkdsk5vX7t8YlAQAAAGjrY7K3sRIAVtJyrkByPXTufkWkhjIAAAAAAAAAAAAAs2ux0OxTlbMAAAAAAAAAAAAAAEDH7FwPwPLufyECAAAAAAAAAAAAWI+d6wEAAAAAAAAAAAAAWJ7kegAAAAAAAAAAAAAAlve5dQEAAAAAAAAAAAAAaru8vrUuAgCdkVwPDd0aZ9fv3xqXBAAAAADqM3kJAAAAAAD0RHI9dMikIgAAAAAAMAubDQEAAAAwik+tCwAAAADA/C6vbxaTAwAAAAAAAF2TXA8AAAAAAAAAAACV2ZQEAPojuR4A7ui8AgAAAAAAsCLzZAAAwOok1wMAAAAAAAAAAAAAsDzJ9QAAAAAAAAAAC7JTPQAAwM8k1wMAAAAAAAAADOpRgrzEeQAAgHifWxcA2P43oHH9/q1xSQAAAAAAAPKQ0AkAAADAaCTXAwAAdM5iTAAAAAAglMVNAOMSwwGgPcn1MCgJVgAAAAAAAAAAMB5J9ADQr0+tCwCcc3l9S25wn3kvAAAAAAAAAHMylwwAAKxKcj0AAMAgTGgBAAAAAAAAAJTzuXUBgHpuiVjX7992/33vbwAAAAAAAADM5X4TD5t6AIzjUf4PAJCH5HqYmMY05LG3AMX9BUANs01oeX4CADG0HQAAAAAAgNok10NhMbvCz5Y8Bb0KnZx3TwIAAAAAMAKL0gAAxhaSn/DoV0e0AQEgL8n1MJhHjemYBrOEYfhDyr3g/gEAAAAAAAAAAIA5Sa6Hyewl/koGhnL3wf1xrQgHAAAAAKA1u5jCfM7MdYkJAAAA4STXoyN9IOW7ORrU8F0DuYwYT0YsMwAAAABAr2yuBAAA+cltAOhXrRgtuR4yiRnANNgJ+fXSuTmzKOf2nr0YcfQ3AObzLN5//HvrZ18Izy+YV8r93UvbHQCA+kbrz87gUZvd9w8AwOrMXwH0qYf4LLmeU0yIAyWFxJj7h2kvcekoQT7mPc/+lnKeUu7LElIOEzsA5/Xy7IsxYpkBgLx6GBznPEmyAP0584xNGeMFwpwZD8u5yZt2OHBjnH4uricA5CW5fmE5O86zTaI8Stbdtjk+35EcDW6Dr5yVIz6NMDhYqoy9d5xDPveZXwC4KfX5xThKOWpvPLonUtoovccIAMYwQnsbgHL2ngP6GsBH2osAYULGhQFyyrEQT7+P1motWjt6j/uAHonTkI/k+kxmCEwpO0SXPl+PJFXCvvt7+tk9HtP5eHTs0fRS7qNrUyI25x6gCa0PKXXs6HWh5/FcIKejBX+PXqsO1uH7HpvrB2FWWmgO5FEqbsQ8uz3n84gd59l7703KwnnXD8bVyxjoiGKeo7k3qDkzbgrEqT1Hk8OZdr6xBQhX8rmbu43Wa7z6qNexhFHby8/m6HN9d4++n1a5ImcS8Xu+P6AF9wYhUn61q1SdqpZcP+vN8SzhabbPW0LpSbfSRm34luC7GMvR9QpNcg85bkxivJ+qzOvM95myOCLlNaGOdsQrIddPJ6ckIVBf6cGflJhaon6H/DJPzHlb1+ecg6K1F5keHTPHrwfluDYlfs2oBz2WCUZj0T1wVqkd8p6NR5w9/v05cvzaVM5d1nK2AY/+LdfubvdyfjcpSteXG8+8+c3Svqk11/XsPGeeGT3+ImaMVnGw1jl6+I6htTPzZaNqHW9jNlpqVTbxcR0xi9xKt2ueJTMfvaa3fu2Z83/8t9XuxdKfO8e1DtkI71l/Ivfnm/V5PYuQ2Hb/2pE3C8mV4/LImfGvHOO2MeerZdVnRm45Nw/IfS2KJ9fXSEI52s22tR4SlGISW+//fmbl36PrZFXfGJ5dJ9eirZRGWMrxax6TPsU+Q3rXeiV7TAKvOFteyCDMIzGTvc/uo9z1Msdga8p7SiwmOdMuDRkUDVlwcEarmPnoc4YMhD861pEc1z7HgH9Pk2EwupDkyhLnW/E+nv3zUV9Pk6E1JslLxaaQ46b0J2LfEzPufXTeMwvna0n5PkPrVMznLP2dhLTVGVNP99MjIYuAYt8be5zQ89QSE3vO9HWf3fM9xamY8/eyQQDzG2FhRkxi3+hKjf/mOmbIeZ79+97fapWtVjJ1CrG7nNC5+ZS2WOlky/vX5koMje3vHc1/yFE6J3Y+KWVRRq5nZW/X7eg76aWMM8kx9xkyRhf73pD5jzNC4v+jPumZOJ/yPca8LscGGGfGS2tvypfbs7p8dD2fbYJyNGZSq11ay+V6vQa/+OvXr9f39/e4E5wIOs+OceTZBct9c5aQq3KNcEPfO7OacMTPO7KQhnHSoPPl8uN6vX5NLtgAUmLqTUyD2z0B/amdgCKm7jsTH0eYIOltUUwvbexSUhLXiXOmTufs0IupcWImRGIGrGrt9BEj9HwjDJ6PEMdqJw7nvm45+8+tiKlhzrRTc+7i9dGZ5+II8eGRlccTR0iuP6P15yt1/tgYIKaGK9Eey1nfQibcZ+9jM4eQ8bOSmxucPfbscTVn3/+jWjG29e6U9+WISTCZRej4R+nz1CjDR7nHpJ6V8cwxcm/0dKqvOnlM3bb4uDprbLjJ1QevFWvOlCN2XLi03Bsg1ciLm/1+OCKm7qs999+LlccvW8kZh0q12x69t6cY+qwstfJrcsfU4jvXp6i1KufZe1sPyp8xQhmPjF7+lbhWdT1bZS2xD6COEWJsb2XsrTy5zf75elBrhx3S5OhrnzlWyA4ZpZJUU8t2dheIR3pceNBKiQ0fYhKXQ8uTUo5S5zN435eje7VEfSp1Pto781whnu+3LzFtyx6dmeuC1nL2E1OOH7PYmzCzx54zycaU8+i69Di28WgM4UwyUel+2gy5MfQp13M4x32Uw2z96ph2VMtyAJSWMw7l6N+O2hfp5bmSW9TO9ZfL5d/btv1erjgA//O36/X6W+tClCSmAhWJqQD5iKkA+YipAPmIqQB5TR1XxVSgsqlj6raJq0BVYipAPg9jalRyPQAAAAAAAAAAAAAAzOhT6wIAAAAAAAAAAAAAAEBrkusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAAAAAJYnuR4AAAAAAAAAAAAAgOVJrgcAAAAAAAAAAAAAYHmS6wEAAAAAAAAAAAAAWJ7kegAAAAAAAAAAAAAAlie5HgAAAAAAAAAAAACA5X2OefGXL1+uLy8vhYoC5PbjX//96f///te/NCpJvB8/fvzner3+1rocJYmp/bndMyPdKxBCTAXIR0yFMPf90W3TzuZXYir39MshnZgKkNfscVVMBWqaPaZum7hKGXtjrI8YS1mHmAqQz1FMjUquf3l52d7f3/OUCiju8vr20/+/f//WqCTxLpfL763LUJqY2p/bPTPSvQIhxFSAfMRUCHPfH9027Wx+JaZyT78c0ompAHnNHlfFVKCm2WPqtomrlLE3xvqIsZR1iKkA+RzF1E81CwIAAAAAAAAAAAD86fL6FpVQDwCUI7keAAAAAAAAAAAAAIDlSa4/yapBalHXAAAAAFiBcTAAAAAAAKCVz60LAACtmbAHAAAAAAAAAAAA7FwPAAAAAAAAFONXSQAAAAAYheR6AAAAAAAAAAAAAACWJ7keAAAAAAAAAAAAAIDlSa4HAAAAAAAAAAAAAGB5kusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAAAAAJYnuR4AAAAAAAAAAAAAgOVJrgcAAAAAAAAAAAAAYHmS6wEAAAAAAAAAAGBAl9e37fL61roYADANyfWZaKQwAvUUAAAAAAAAAAAAAPZ9bl0AAAAAAOZgQTcAAAAAAAAwMjvXw2DsPg8AAAAAAACAuWMAAID87FwP/OQ2+HL9/q1xSQAAAAAAAAAAAABY1ccFxbXyWu1cDwAAAAAAAAAAAADA8uxcDwCL8MsUAAAAAAAAbJt5I4BefdydFwBW1vKZKLkeAAAAAAAAAAAAKpNMDwD9kVwPndOIBs4SRwAAKE2bEwAAAMZkB3sAAICffWpdAKBPl9c3yREAAJ3QNgMAAAAAAAAAKM/O9YBELQAAAACWZ8dOgPI+zkeItwAAAAD0yM71AAAAABTnVziAUYhXAACMRhsWAAAgHzvXd8TOSAAAAAAAAAAAAADAinpYOCy5HoBl9fAgBgAAAAAAAAAAAPrwqXUBAAAAAAAAAAAAAACgNTvXd8DOyQB9ucXl6/dvjUsCAAAAAAAAAAAA1CK5HiZjsQYAwDy07QAAAACAGu7HIm1CBVCWOSAAiFdr01zJ9QAAAAAAAEB2EoYAAABgDrWSmqEHkuuBQx6K8PMEkHsBAAAA6jAuBQAAaSxuAgAASCe5PoGOKAAAAABAHZLsAQAAAOLZSBBIYTwWJNfD0iwUgXgakAAAAJCP8SkAAIijDQ0wrtIxXD4DAOQhuR46lNKYNogC+bmvAAAAgCP3k9YmsQEA8tCuAgAAoBXJ9QAsR9I8AADkoW0NsO8oPkoQAwAAAAB6cjSeaS6IFUmu75BV+PQopV6qy8xM/QYAAIB1mVACAAAAemXcAshBLKG2nurcssn1Hy9CzsRIyZbU0qquqeMAAAAAzOTRgH3MOFhPg/4AKzFnAfPLNa+/SrzI2S490x6e/XsGAADmtmxyfWkhHU0TLnPreYAmR93bO0aPnxUAoDdn2ok9tzGhBhO1cxDLgBpKPDNyjeeKg8DoQhJdzYEBADwm3wIAWM1o4+KS67d+L1qv5aKclMHmngaoeyoLAAAwD32NOR2NexgTAfbkjg2hz5dSz6EcnydkEUHoQoNSv/YKM9JW+VMvC8hXuSYlvrNcx4Nccre9aowpHN1Ppe7bEdk0AY6t0p5ZVQ8xXB0DchFP6in5XbuOxyTXQ6JHweW+QWwHF+hDzxPhALRRKoaHHvfMJLYJcPiDtlg7+rFASynxf8S41bLMvSTk51yAoL1AaykJha2SEB/Fn5Bfaz6TZP/ofCPG8CM5nmNndrs1Vs4Kjup56br6bA55lXtkttgNkKrHeLjaMwlgBiU2amllb0y5l7J9NF1yfWjCc8yxbkatmDUGX2dPDOrx5gX+0MsuF7XKEXMesStc6wGEEZ6FpLuvX63rWyu163ntn1TdO1/MtX5UT2LOvXodA8YlbkG8Ee6bVmXUF34upe0Zs0N+jnZpziTSvWP0fO9Q35nxtpQk9NBjx7zmTNJ77nujdRyOiXE5F2kdne/R30rtzp3jVwRSxjRKlmPveDFzwuL+fFrHmpvS5ejlcwJriHkOM4daYze9jGP1Ug7oRc62pmfGfHrJx2upeHJ9jQdTrhv92XFyJOinSDlGqd1DQo5R4pqXvllL7Khy9rVQS0j9r92pujfiTnSlYndtOa997c5qyERWys4xMfU0ZvIypgz046iNEjthmitutI7ZNynPlVqrrUMmfR9d2xxJ8KXkmMwuVX9yXnMd+T6VrjuswfWGn+VKeE45bszxYs+XcyeaWeLGmTbmo2Plfm3Me0PbpS2T0XKO28QsPIg5lnZuHrXG/lPeW2oS++ZZ/+toXCrmPCXVjoelxiNafW8pcTdmPKv2YoxHr52lPTCq2s+4ka53aFlH+kwfjTCXkWNhVMr5evnVJYuNxpV7vvL+9c/qwZn5y9Jthxgl41TI9zlqfM/p2fhA7nZ46LXQ9+aRZ23bEepOSE5nifOFliH2eCPmKqXIMWf+0ZlNSXKY5Rl4uV6vwS/++vXr9f39Pe4ECYmSKZ1w+nOmUV3yvHvUpbKSrsnl8uN6vX4tUJxupMTUZ2ImUc7IsRPSUQLjs/O6Z3+V8n2ePU+O84XGh7MDPrFKLXTIUYfF1H1nYmqO9uoIUupf7eSXFCOUsbWU2F168qZEPQx5Fmb5XGLqrlKThznv6dKT9zkGqkosOiqldrxtNfnW6vw9KlEfxdRjufsNOZOJH9EWo4UZ+gQ5doYUU/eNWB9gNj2MsRlT/VWpdmrMc7l1DkDtBSI8VqrPXXv+KvS9JcaZQo97f/xa4x+zx9Rti4+rK8ePkM2MSozlhsxPnJnLnSGXIWXRUe7PG5t4n+v8ZxL+Uxa3nqrjYuqu2Gt3tu7E3hO5NkNbNT7dxMSpUn2RrHMkD9piuetnrfnWEecOj2LqEMn1jOlZw6P0dc69UxfpDFruy5Fc37oO11rpyPxiGq41Ou49120xdZ8JdihrL9k5ZAC8d2LqvlIxtfWkeYgc/dYSg/09JHa3vk4lJ9RCXnumHLPsFFdkxxgx9VDr+27PCLGc9cyQXL9Hcv2v9P1hTD2Mter//6pW37/n5PpHzDHXVzJB6awSiVdnNh450nqDtSOzx9Rtk1xfSq0kWZ5rPQfUqu9fOr9RTN2Xo63aa1tz2/ouG8+lzAPONH7ZY953qQVLzZLrb1o/fFlPrd2d+ZPG4D6TQUAKMXWfmAqkEFP3lY6pq4wDlPicrXdvJ0zOa38mqSPmFz1MBJWjnQqkklz/KzEVSKWt+isxNcwqYxi9yNEHnu1a9bjYQ0zdJ7m+jpmSExlLqeeMmLqvxAbQPcaLnstGONexH7ljalRy/eVy+fe2bb9HlwAg3t+u1+tvrQtRkpgKVCSmAuQjpgLkI6YC5COmAuQ1dVwVU4HKpo6p2yauAlWJqQD5PIypUcn1AAAAAAAAAAAAAAAwo0+tCwAAAAAAAAAAAAAAAK1JrgcAAAAAAAAAAAAAYHmS6wEAAAAAAAAAAAAAWJ7kegAAAAAAAAAAAAAAlie5HgAAAAAAAAAAAACA5UmuBwAAAAAAAAAAAABgeZLrAQAAAAAAAAAAAABY3ueYF3/58uX68vJSqCgwlx//+u+2bdv297/+pcvj9e7Hjx//uV6vv7UuR0lian9Wu89Yh5gKkI+YCmFubeuPtLO5J6ZyT78c0ompAHnNHlfFVKCm2WPqtomrMJuex6jEVIB8jmJqVHL9y8vL9v7+nqdUMLnL69u2bdv2/v1bl8fr3eVy+b11GUoTU/uz2n3GOsRUgHzEVAhza1t/pJ3NPTGVe/rlkE5MBchr9rgqpgI1zR5Tt01chdn0PEYlpgLkcxRTP9UsCAAAAAAAAAAAAAAA9EhyPQAAAAAAAFDM5fVt99eNAAAAAKA3kusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAAAAAJYnuR4AAAAAAAAAAAAqu7y+bZfXt9bFAAA+kFwPAAAAAAAAAAAAAMDyJNcDAAAAAAAAAAAAALC8z60LAAAAAAAAAAAAAAAAH11e3/7339fv36qc0871AAAAAAAAAAAA0Mjl9e2n5EEAoB3J9QAAAAAAAAAAAAAALE9yPQzGSlUAAAAAAAAAAAAAyO9z6wIAQGsWrAAAAEAb+uQAAAAAAEBP7FwPAAAAAAAAAAAAAMDy7FwPmdltCwAAAADS3cbXrt+/NS4JAAAAAACwGjvXAwAAAAAAAAAAAACwPDvXAwAAAAAAAAAMyq8/AcB5t+cpAEiuBwAAAAAAALKTnAIAAADAaCTXAwAAAJDkPlnKDnkAAAAAAADAyD61LgAAAAAAAAAAAAAAALRm53oAAAAAAAAAAACo5P5XQQGAfti5HgAAAAAAAAAAAOD/XV7fLIIAWJSd6wEAAADIwkQDAAAA1KMfDgAAkJ/keuicAREAAAAAAAAAAAAAKE9yPQAAAAAAAAAAAAAAXWi5MfWnZmcGAAAAYBmX1ze/zgYAAAAALMfYKACMRXI9AAAAAAAAAAAAAADL+9y6AABAWx9XyF+/f2tYEgCeucVs8RoAAIARGYsEAIBj5oIAoD3J9VCYgWIAAABmYWIHAAAAAAAAmJnkeljAxwT/bZMEAQAAwDn3/UwAAACgvTOL4i2oByjPuCoAnFOr3/Kp6NEBYECX1zedWgAAAAAAAIZmzgsAHvOcBOARyfUAAAAAAHTLRCcAAPRB2xwAAFjB59YFAM7x83wAAAAAAAAA3EiABxjfXiyXGwQAfyidNyu5HjJpPUAhyR4AAIAR6c/CmkLG0lqPtwEAQI9Kt5Nz9tM/llW/HwAAGIXkeqhIwgDQE0kKwKq0yQDilWg7ao8CsbTjAOYkvgMAMKvcY6DazgBQh+R6AACAzklABQAAAIC1lNhBPuVYxiYBGFnIM9CzDoB7kuthUBp2AADn2N0DoA39WVhbjhiQCH3PfAAAIABJREFUKzFIOxAAgBGUSLLPdZwzZTI+C0CsnM+f2ucFYCyS62FiEhYAAAx4AaTSpwRmp50IkF9MbNXeBPhZb3HxTHl6+ywAtYmDZRnTAaA0yfVwUm8rGkPKo5EJf9Ch/ZX4AMxCjAeI17otaDdpINZRm69WHGkdOwF6pV8OkJ/YCgA/OxpT9twEemVMOa9S36fkejhQOpAJlAAAeazWrpKACmty76dZ7RkB/OF+AvUoBjyabI15T8z5ANin3QasZMWEvxU/MzCHHtupPZaphJTP+eh5k+M5tHeM2a8BUM4qsTxFD30HyfUQYC+BoYcbGEgTev9qxABnSK6pI6ZNpv0Ga9Kme+5ZgijAGb3E4d5+fTL1+Gf6GWc+j/4NAAB7crSZe+kzAOsSh8LV+q5SxqxbjWurP/NoNf41Wx3q5fP08Kunvenl2hzpaY5Scj1EqnED9xQk4KzWk685B/XOHqeX8+WOMSM0vkp49Lljfnpute8MapitHTXb54EerNp22dNzjMmRPArsS9ml/dkxQt47w72Z6zM8miC+39Tj4/ea8/uLeRbOcN1KCblu96+90Q6hhtrtXvECYG2txltGGOd51G78qOfyA38KiTmrtIst4Gc0PbYZSsSLnj7nmY1FWpU/JD6FlvHM9S3dXsx9bZ4dL2bctCeS6+GD1jdr7fO3fiARb6ZORu4E8mcDU63v749CkrIfvecmJqE7h5iV4LUbxjljWakGJByZ5Xk88qT9UfJSyc+TK3bPUodYV0wb90wy4LNExhQtJ0NzTl7QH7GdVL3sas6+Z99Tjl3ZavVnWydPpZw75PtMSZQ/c93EebYt/05qOdq9z8YvSy3+eXRM90oevldmNtKzdfa2c+tdgz96NGfYS7LW0Wt6+vUs6smxGL60merQ3vcdshgm5Dg15RjPqb0L/exiPu8M91KvYq7Do9fm3AQoZl4rxwKekDG0mJj3bMzs7H1+ZizjTOwOvaZHz4yb3PONZ94ben3OjBmlvHa0dsTler0Gv/jr16/X9/f3gsXZN9qXmltMsHv2uppaX7czSRerORoIb3b9Lpcf1+v1a5OTV5ISU3Ncn1qd8pz3VY/3ccqAXC9lHEHK9xj6jNx7bcwkZuvrmHTfi6nZnGlfnKmjoeeIeW9uz+6NXOVqdQ+meFZfjtr5tT5niRXuuY/dS/v0RkzNLyXR7dm/xyiVRFry/ko5z4htwo9y7gCSo81+tt6Efp7WMa80MTVMj+2f0WNKTaUTUHPINX6QcwIppH0c08fq3d41iF48IKZmU3piMcWj8aGYZPeQ8cwR75+b2dtNZ6T0X0KSE84sciq5QUy28YjJ42rpmFprPCdkvqBkWWZvo/Tg2TMwx7FLSylrjgS8Ugv4zFPti42ruWJCqwXPIYswezdrXC6V/JsyD3hmrHXW63NPTN13Jp+qVp5M6WTzvWPmOm4vYsYjSudijZxftaf152l1/twxtXhyfY4G1LPJ81wre86Urdakeai94POs0rZaPVMrobenhNdZ5Vz9rzG4L0fCyMj1ffaGI7+KueYz1vk9Yuq+0guWcg4Yte7IhKh1P5WcGMmt1XdSS0rS6pmytkqIvjERdKxW37+Xe71Wcv2ZftKZydBevudccgxQ99SvyDngPtLk5Y2YGqblfbxKP4s8ziRZ5jzfLPVTcv2vcieC5mhHzFLfVpXSJi/Z5kpJYK+dMHL0t5zJnUfHLJWk+st5Jo+rufv+Z+avYsZea8Td3P11z4q8aifXn0kknvXai6n7ekmur7UJTowz8w+hemxH9SLlud3y2bvKdbkRU/eVzqcaxcr3BqQYNrn+pseJ9tjGZq5B/16D3miTzAaz+6cxuK9WY7D3mAO5zV7nxdR9OWPq7HWIc9SP/pTaheXhMcTUXTGL33q+f2ou+onZRS8mmb/n75e6QgbeY8ZdSkzOiqnH3M+M6lncmGWBammS63+VKxF0trrCOFovUq+lx3k7/f9fSVgCUomp+1ol14fqYZzWmGcbPVx7HhNT92mrAimaJtdfLpd/b9v2e3QJAOL97Xq9/ta6ECWJqUBFYipAPmIqQD5iKkA+YipAXlPHVTEVqGzqmLpt4ipQlZgKkM/DmBqVXA8AAAAAAAAAAAAAADP61LoAAAAAAAAAAAAAAADQmuR6AAAAAAAAAAAAAACWJ7keAAAAAAAAAAAAAIDlSa4HAAAAAAAAAAAAAGB5kusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAAAAAJYnuR4AAAAAAAAAAAAAgOV9jnnxly9fri8vL4WKAtz8+Nd/f/m3v//1Lw1K0s6PHz/+c71ef2tdjpLEVKAWMRUgHzEVIB8xFSAfMZVe3c93rDbXwbhmj6ti6tjMJTOa2WPqtomrlCXu85GYCpDPUUyNSq5/eXnZ3t/f85QKeOjy+vbLv71//9agJO1cLpffW5ehNDEVqEVMBchHTAXIR0wFyEdMpVf38x2rzXUwrtnjqpg6NnPJjGb2mLpt4iplift8JKYC5HMUUz/VLAgAAAAAAAAAAAAAAPQoaud6AAAAAAAAAAAAoJy9HesBgDok1wMAAAAAAAAAAEAjkukBoB+S6wEAAADI6uNE0PX7t4YlAQAAAAAAAAj3qXUBAAAAAAAAAAAAAAD4P/buHUmO41oAaA0CK1CAlgxNxNjyuJcXWIfMsWFyHRPcy8CSDYOGLCm0hX4GNeSg0Z/Mqpv/cyxy0F2VXZ9b+bmZRWuS6wEAAAAAAAAAAAAAWJ7kegCW9/DLr9vDL7+2LgYAAAAAAAAAAADQkOR6AAAAAAAAAAAAAACWJ7keAAAAAAAAAAAAAIDlSa4HAAAAAAAAAAAAAGB5kusBAAAAAAAAAAAAAFjex9YFgNk9/PLrH/99+sf/NSwJAAAAAAAAAAAAAHCNlethEA+//Ppdoj4AAAAAAAAAAAAAEEdyPQAAAAAA3bDIBAAAAMB1+k4AoKyPrQsAAAAAAAAAAAAAAADvvZ9QdvrH/1XZp5XrAQAAAAAAAAAAAABYnpXroSNe2QQAAMDILrVr3/5WayUJAAAAAAAAgL2sXA8AOzz88qsJMQAAAAAAAAAAADARyfUAAAAAAAAAAAAAACxPcj0Es5o1AAAAAAAAAAAAAIxHcj0AAAAAAAAAAAAAAMuTXA8AAAAAAAAAAAADefjl1+3hl19bFwMApvOxdQFgFiqrMB73LQAAAAAAAADQirwFAOiPlesBAAAAAAAAAAZnBWMAAIDjrFwPFb11ZJz+8X+NSwJc4h4FAAAAACjnfcKnflgAAIgh1wEAYkmuBwAAAACgOStsAgDAderLAADA6mpNKJNcD8ASrIiUxox2AAAAAAAAAAAAWmo5wVhyPRRi5QAAAAAAAAAAAAAAGIfkemjAytBAT0wGAuif+iMAsCJ1IAAAAIB0+lIAIIbkegCmdilxXDI5AAAAAEA5+mABxiMhEwAA4HeS66EhHRQAAORQfwQAAAAAzp1PatKPCAAAsJ/keuiAFVxgHDonAQBgH3VnAAAA6I+xaoD56IsFgGMk1wMAP9DYBgCgFHVNAAAAAGB1JjcBQL8k18MCJC6wEg1QAAAYw626u/YrAMCY9M8C9OlSfL7W9ja2DFCO+jIAjEFyPSxERwikWeVeSWm4r3IsAAA4xqAQUJK2KQAA7KO9DtCGvgwAGJvkegAAAAAAAAAAADigt0lN78sj0R8A0kmuB2BoJRunvTV8o8z6uwAAAJhbyqpvVoYDGIeYDdCW8SKAtah/AzCT0s81yfVwkE4HeqAR1J5zAADAzM7bvuq90Lce2qipZdjTt5bynR6OAQAAAMC29ZVbpM8EgN718NyUXA+DUcllRRJ59omMF84BAMA6claGblkGmNXI139O0vuIvEodWEXtZ9HIzz6AGkauQwMAMB7tdEZS6nqVXA+D6iHZgfbOz/FIg7yXyjpD5ezWbyjx+1ods9rXWstre4brEmY26z066+8C+narfQGMYU8/wZF6x4jJ9JfKU2J1/Wgl64e3ft9q9dE9fa6rHSPm1jre5cQ69yIAACNoXce+RZ0aeO9SvDJmTWk9P4sk1wPfOX8o9hzASBM5SF57paK9/967a+ck5XdduzdvbaeXyu6eBIZa+70X+y59JvffYVXuDYA2Uuryo9erYXa32jIpbZiU7aXub2Q5ydI57fRr5yBnG/f63261TVOMMGngXKtJBLXkXCcz3H8rO3JOWy5q0cN2ejV7/8bsvw9GsaeeD5BrxOf+iGVmHa5PRpVT19zTpyXncD0R8bCnNlDXyfV7knwjT1DrbRAjJ1AfWRWllVLl6OX3cdmeQfNeKi1HB4ZHUfvebLlaYGrSec53I8qaMwEhZ7/36ic5kyRyqFtQUuT1lXJ/7ZmkUmLi1ZEEq1L3YsSq0eIFMJNe2jEjshL1nGq/YWKmesWewaIjnz3STh890fXeflPq+5Hx/0id+sh3vHF0bnuu0ZyJNBFK9q+9/70jXs9HFtGYqX56ZIGRW5/J2Z+x2Hk5P+l6HjdzHqGcHiZUjniPt87nuvTdEY9jL0afaN7L8xrey1lo5Mj2j3wmOj8zNVdpTw5CjzHpyGIykfs/+pkRVE+uj+zI3pOsF7Hf9+4lA0auJHRJrQkHs7t23lY5ZhEz0agj8uFTqrJkBmK+WSoVpRPizz/T+pqqdd5muT56FJHwEdEovRQ390xWSSnTPbUmGqZ+t4dksdIJT2+ODEgf6TCA0fRSD+jZkUlOI1j1Gog+f6seR7inVrt2ViXr+TkThmqfg1ptBsqLSLKJ/s6eid81rr1Zru8SE/mPlCOqbna+vYiJ+zX6gWpth/1SEuBmG3NN7UPekxw4+jU9wrnVP8psbvUPlX5WR94/vUxMvnQ8UyfE9jwxanQl2mU5455H3hqZYoTnJ2PIac/28lakI3m1OdtN+VxkTnHK8Y1Y0G/P8YuMiyt6OJ1OyR/++eefT6+vr/t21OjmPHIB5mw/8vfVqjgeefVsrd+bst+SHROzry4Ucf0WW7X14eHr6XT6ucjGO7Enps5w3UGUXhoAexxJXN7VkSCmXjTitZNi5HuDevasznf+mfNt5XTAl57IkdoRLqZedqTtX8qR62A1q8X/6NVEa3UWlmyH17pfIpIUxNTLeryPWycv017KAJDrIlb2BFwx9aIj4x49jQ/ca3fNei/uef60Om+txvZK7SdHxFhiRP9AdB1+9rjaQz21dru9VexuXY5aolaAzv1sxPHc0xea8tmU7+zZz7Xv1urL0P6/LDeu5iT47ZncFC31vEf3S80aM3vXU99o6brmkTGv1P3lJNymEFMvK9HnnjNuGhHLU4iLayi9mMKsz97omFp85frWB7tkIytyOy32cWT2Sqly7KkUlajonG971o7pUqwCANQwcjy+FSdH/l30wTVEipzVDI5u69ZnS7XXrn3f/VFe9IBmxIpLrQbrS3T632o/r3p97+nbSOmUjDiPpfuiSqxQVvrtNYzLKjVcIyYwg3vthx76bSLbcCPa0+5s9cwqfS5a/74Ue45BZB03KmmF8iLbz+d6it2rXH9H2pWl+iL3bPNerkFUXMr9Tk5fRg6L9fRhz3Ow9jkrmXvl+ptDdAL5nv1EfCfyenRtj+M8xu15xu6ZZCe/jmtq9S1wW9bK9Q8PD//etu23csUB+MPfTqfTT60LUZKYClQkpgLEEVMB4oipAHHEVIBYU8dVMRWobOqYum3iKlCVmAoQ52pMzUquBwAAAAAAAAAAAACAGX1oXQAAAAAAAAAAAAAAAGhNcj0AAAAAAAAAAAAAAMuTXA8AAAAAAAAAAAAAwPIk1wMAAAAAAAAAAAAAsDzJ9QAAAAAAAAAAAAAALE9yPQAAAAAAAAAAAAAAy5NcDwAAAAAAAAAAAADA8j7mfPjTp0+nx8fHQkUB3vz3n//64W9/+ftfG5Skna9fv/7ndDr91LocJYmp/Ti/51a735ifmAoQR0wFiCOmck77HPYTUwFizR5XxVSgptlj6raJqxxzKUdo2/SL9KDHvioxFSDOrZialVz/+Pi4vb6+xpQKuOrl6fmHv31+/dKgJO08PDz81roMpYmp/Ti/51a735ifmAoQR0wFiCOmck77HPYTUwFizR5XxVSgptlj6raJqxxzKUdo2/SL9KDHvioxFSDOrZj6oWZBAAAAAAAAAAAAAACgR5LrAQAAACjm5en56upLAAAAAAAAAD2RXA8AAAAAAAAAAAAAwPIk1wMAAAAAAAAAAAAAsDzJ9QAAAAAAAAAAAAAALE9yPQAAAAAAAAAAAAAAy5NcDwAAAAAAAAAAAADA8j62LgAAAAAAAAAAAABw3cvT83f///nbl0YlAYC5WbkeAAAAAAAAAAAAAIDlWbkeAAAAgFDnKygBAAAAAAAAjMDK9QAAAAAAAAAAAAAALM/K9VDY+9X6Pn/70rAkAAAAAAAAAAAAAMA1Vq6HQbw8PX+XqA8AAAAAAAAAAAAAxJFcDwAAAAAAAAAAAADA8iTXAwAAAAAAAAAAAACwPMn1AAAAAAAAAAAAAAAsT3I9AAAAAAAAAMBgXp6et5en59bFAAAAmMrH1gUA/qTjAwAAAAAAAAAA1vaWQ/T525fGJQGA9UiuBwAAAAAAAABYiKRNAABgBO8Xra7VfvlQZS+wEK/eAwAgmjomAAAAI9OuBQAAAGAUVq4HAAAAgMJarKoBAAAA91jBHgAA4HtWrgcAAACAiqzcCgAAAAAAAH2ycj0EMSgOAAAA11kJDwAAAAAgz618JH2uAFCGlesBAAAGZvVjAAAAAFibPkIAAIA4Vq6HiswYBQAAAAAAAACAtZkUBQD5auXgSq4HAAAAAAAAwkkYAgBgZRbhnMv79o1zCjA3yfUALMvADgC9u/as8gwDAFZgAJoIriMAAAAAAHJIrgeAMwZdAQBgH5N/AAAAAAAAgJFJrodCbiUUSNwFAAAAAAD4k7ETgD6IxwAAwOok1wMAAABwiBXrr3NsAAAAGIH2KwAAwO8k10NDZv0DAAAAAAAAUIKEeYA+yA8CgLFIrocO6NSAutxzAAAQQ90aAIBoEo8AjtNeB2jrWhwWn8fgPAEguR4AAGAQOZ1555+VlAAAwEoMhEOf3t+b2qkA+6jnALCHSaz3ecYC9KVlXJZcDwtQQQYAWIeOPwAAAFrTNgWOMr4JAABAK5LrYSE6oQAA5iVxAeZnlU9gVfq0AAAAAK7TdwIAsSTXAwAAAAxm9sGSXn5f6XL08jsBAFoyWRwAAGhJmwSAc5LrAQglOaQ/zglQk5jzI8cEGE1PcaunsgAwNm+AAYAxeYbniUwOzGmTa78D9OnSc0HMBoD7JNfDQWYvwu/cC/3TSAZm1mOM82wEuKzHmH3PiGWGUagzwZ8kDzKKqGv13jNAHQyIJKbU4TgDAAAzkFwPg9EhAXkM0gPUId4ClHMkxh5pQ0rwA3qjXwwAYH7R/Yw1+i21nwF4Y7wMAOooPV4guR4GlRIcVNrZtuvXSukHzAwD3pfuoZF/D8AKZnj+bJt6HJDvPP6lxJE9r3ePdGT/19o3qdvbq/Uxa2GWZytzksREz1yftHKv3nTr8zmfPf+b67wOxxvS9NQei7xve/pd96SUVSwDZjJSjD6X24YY1cjniDlp38F1PcRsyfXAd64lZHiQj+/aQydqJcvUz9S6lnp4yO61p+zuUQAAtu1+vf/Wv7WqU+6p/5au7/fWnpCgCf1qHUP5UfQEsxL7j/gObZVIlCzdP3trcuKR7deQsghKxCTI2rH8Vpn3TJ7du/9rZYjafs62PVdJdW3sqXU94Nb2S8d7AMqZNfnc8wWOu1fH66F+WoPFS2mp1D3UdXL9noZnxIHqZRvE2NOhOtIKdKXKcb5d1zTb1s91P6sjx/fSQMiexKoR73HxCfrk3vyRYwJr29OXUTvhaZb6/oiTxnMSvGr8nlmuBeY1y8rJI5a5lVJ9GZEJEj1PZOO2yETrnCTwa98tNT5R6/leez97xhBzt5lTnvdSkytS4se1v5d6u3Hk2NqRc5KynZSJCOJvOanXStRkjj3jHiXtuX+Pbpd8tdrcvdX5eisP/dpTr+jtutrztowjdYYV43Tv18AtpfOqRjoWK4gcHyiVc9iL2mXeE6t73P/I8TDSnjZe6b6MaNWT6yM7/Gol2Z/LObk5vzeis27VmzVFTufdiA+8IyI6L+nPjEk2RwanosvQ8z0Q2WGbM7s2tXHSusJcSsoxufbvEKFVvbD1M6L2bP+IBl/UoHKuqEFMqKnEM/RWvCxR1zvST8AxOW393PNya3Jryesn5TM5SUWzDw6soLdz2EN9Y0+yZe62c/abu50ZpMalno+VxMx5RCc21uiLLDWZ5Oi+S373iNYxtVRibSslr4E9Y1E5/zbi8Z7JvTpYymdXMeK1eqsNHLHd0m8R2PvvEfvY+53INxwcGdOjnFrXwZ43e6Tsv3Qu1D21kqVHjNkRjuQQ9dA3VFtOfsQqx6SFe2MxR/ruotoyud+9NH51rvT495H8nxL1pFr9Inuen7NN+I7MJx11rLRacn2tJJEaWjYeIxuAR2ZlRh7znOAREXxGuTlL0kgeV61zVyNmH733exURy3typJHQ42DckYp4iYq/eDyOEonrKdvMGZQqocTv3rvdI0mP53/LqQffG5AolZxV2r0OmCPJHLUGxcTOeZQahDxiT+dZZKweqb44oug40qpT8EhSUcTggDhcz54O/KjPprpV9zrX+tpJGdAsNQh27zt7+kpaH88UpZ/1kXG35VgDY2hdd3XN5Dtyzkbo440qR+trmzHMds6P1FdnOxY5ev/t0XGx1Qr2tfpYc/Y3UhtkFhEJ7D30UfbS5m3VzpxVSv/itT6SI/Xt0WNQqbFX0o30PIvuF7633ZRE+VmOW4lt1N5vqXqbfqw/FU+ub32ASick1fh9rRIMS+772j4iZjmVnvDQ+pruxa0grDJYX6uKQWk9lunNvYSrS7Gt598zgz1JcDnbLenWs1BMbedo4zG3jpJT30lx79o5klB+aXup5bj1mVqTCCLrwbPF9sjzdesaiyhTRLKzmBqndvJ5pKj4O2udfGYrHu+SnaJiapxandel2lBHylRiP62vzejfm1LnOhdZB4tMNN3TvmipdrsFOEb9PEar+gLj62UcOtqIZZ5Vrfp+ZB2wZX93j9sm1gzn6lZytrpIup6PUcrEnpGTOnvpiyLNaP1S/C4nX7EnJSeN3XpG1o5LPZ+DPR5Op1P6hx8e/r1t22/ligPwh7+dTqefWheiJDEVqEhMBYgjpgLEEVMB4oipALGmjqtiKlDZ1DF128RVoCoxFSDO1ZialVwPAAAAAAAAAAAAAAAz+tC6AAAAAAAAAAAAAAAA0JrkegAAAAAAAAAAAAAAlie5HgAAAAAAAAAAAACA5UmuBwAAAAAAAAAAAABgeZLrAQAAAAAAAAAAAABYnuR6AAAAAAAAAAAAAACWJ7keAAAAAAAAAAAAAIDlfcz58KdPn06Pj4+FigJE++8///Xd///l739tVJJ8X79+/c/pdPqpdTlKElP78XavjHSPQA4xFSCOmAoQR0wFiCOmAsSaPa6KqWM7HwPeNmNc9G32mLpt4ipQj5gKEOdWTM1Krn98fNxeX19jSgUU9/L0/N3/f3790qgk+R4eHn5rXYbSxNR+vN0rI90jkENMBYgjpgLEEVMB4oipALFmj6ti6tjOx4C3zRgXfZs9pm6buAqz+SOH5Ft/z1cxFSDOrZj6oWZBAAAAAAAAAAAAAACgR5LrAQAAAAAAAAAAAABYnuT6g16eni++dg0AAAAAAAAAAAAAgHFIrodBmMgBAAAAAAAAAAAAAOVIrgcAAAAAAAAAAIDKLLYJAP2RXA8A/6PRCgAAAAAAAAAAAOuSXA8AAABACBNWAQAAAAAAgJFJrgcAAAAAAAAAAAAAYHmS6wEAAAAAAAAAAKARbwUFgH5IrgcAAAAAAAAAAAAAYHmS6wEAAAAAaM4KbQAAAAAAQGuS6wEAAAAAAIBiTKACAAAAYBSS6wEAAAAAAAAAAAAAWJ7k+iBW3AAAAAAAAAAAAAAAGNfH1gUA6nmbAPL525fGJYE+mBQFAAAAAAAAAAAAvJFcD4ORIA8AAEBvTFwFAAAAAAAAZiC5HviO5H0AAACOep9sr30JAAAAAEDvLCIDwBvJ9QAAAAAAAAAAAAAAdKXFol4fquwFAAAAAAAAAAAAAAA6ZuV6AAAAAIp5W02i1koSAAAAAAAAwNjer1hfm+R66FzLAAEAAAAAAAAAAMSSDwQA/frQugBAn16enlXkAQAAAAAAAACA5cidAliXlesBFUEAAAAAAAAAAAAAlie5HgDOvE04+fztS+OSAAAAAACMy+I+AHUZ4wIAADjuQ+sC8CevkgEAAAAAAAAAAJiHnDAAGIuV6wEAAAAAAAAAOiYpEwAAoA4r1wMAALAUK8RAG+49AAAAAIDb9KMCQHuS6wEAAAAAAAAAAAAAWN7H1gXA69uI5XoCAAAAYBT6sgAAAAAAgJ5IrgcAAAAAAAAAWNjbxNfP3740LgnAvCwy0BfPPgCukVwP3KQiCQAAAAAAANCv82RNY7wAAAD7Sa4HAAAAAAAAAFiQVZQB+mSiFAC0I7l+B41LAAAAAIAyDB4DAAAA/O59npq+EgCoQ3I9LMxEEQAAAI7QrgQAAID+XWq/X0vQNNkVIE50/6kYDQB1SK6HDu2pXEtogMsuNS5b3S8augAAAADAyqy6CQAA1JSSpyHnCoBzkus7JPmSHu25Ll3L1HTe2Dm/7npqDLk32MN1A8DsPOsAAAAAYvU0PgYARxlHAKAWyfUwKBVGAIB1qPv9yDEBAAAAAAB6ZHJTv/acG2NSAHXditW1YvKyyfWlXjvpYcqbnq+FI5X489/lFa70KqKx2vN9DAA19Pgs1CENfXAvAvSlx3obAAB907YuHU7HAAAgAElEQVQHYFSXnmH6RACItGxyfWkpgxn3GqsGRNYzUgfGpbKOVH7GNtq1dq284jwA94z2zAPqOVKXjPjuEerB0Af3IgAAjEEfIUBbPfah9FimXtzLz4jetnMAMCfJ9ZsKB7HOK1KlV3bXmcKMzq9r8RkA2prlbUXqzvC9nP6QEveP/hjog3sRAAAAgBS1+pH25Iy0GgPSt9YH5wHm0NN4/jLJ9XsCaKmg62E+thJJvz0FBehZ6/i5ben3fKmy5rwZRbwfx6VrzLMBgFXNMpkjUkq94LwOmFOXMLkV2LZ12pKzPWe0HYGRrfLsAUglLgK0kRp/c8bque5IDh8A1DJdcv29B/Cth+2918K0fl36+zIcWV0uolF+a9A+d7sp3y3dkXDkutmzHyBPT/dOyQk2RyaA7TlGXlnW3qVz0NP1DjACg46MKqctvHe7e6mPwNzu3ePRyeee1QDcs6ev03OFa9Q9GE3P4wTuJ6jLAhj9ObKAyQgi8uFy8tbOP7vic8Z9Xt61e7H1sZ5twY8Ijsl6ovPUSj9HiifXH3lNy5HVgUu+rryla4nypfd3rUPz1rFPndF572+p2y4xaSDnO7CiWxWdkV7TdUREknvOflL/vrcsIzdgazX+9xjx2ga+Vzs+lpj4G7H/UmWJWO0lp15CWyVWWB+hDhNdb4v4bi9Kt/WjypL7nVIDJSNc78RI6WguPViUGrNv3b8l93+0r/lIP3SJezCyf/PodgD2qr1g1b1nQ05cbFXPihpcTn1ORp2j3p8zI5V1FD3UT2u7F5du1ZP3jJUTSwIjPcvpg7+k1fU8U5J0dL5TK63HjVL6Xe5tYxaz/77R3aoX3LuPbtX17tV/o8Z/7o2Hpfy+a2UsLWIcMOU7e/qwS4gYZ+qpPRuxAMLRek8rD6fTKfnDP//88+n19TVrB3su1nuD5YwhN6hH7zeFa6qOPUH+4eHh6+l0+rlAcbqxJ6ZGqPXQy9mHe7E/R66BiKSLiFfpHXke3Lo+Wz9nxNTLWsXUEbRuPKZolaS9p34aWcZb200duLu1/VKJDKnJbXs6mq5tK7VsucTUy0rF1D1t/SP9AXtWg0/9TsrguTpuHUcSGd5LjWlR537P9Zkq+hlfcoBOTL1s9vjR8yS4PW3he3WjqGdYybrQkTL2mOxxRGQfQO3fL6bWldOujLwWSkwEjJ6QxY9K9j8cOe5H+zkjJjtHlj/6mTR7XI2qp5Zot5dSO06VbPfVdnRcp5WI8aToCb6R+6ntSLyfPaZuW35cjYoFJSbT3dreHkfa2qlMcvrRkfH2I7kce75bqx+kR2LqZav0qbauL+bUa+59p3SZRxh7Kz3umbr/lO3vOfe5ZTi6rYj9prgVU5sl178Z4cJnTKWCAPlUBi/ruTLY80A3a4hIri+xrVvb7amBc05MvezIJNDI8x/VaK1xDUbNcC+RON7qWZUzsHQkcf2IlTsl7xFTL+u5nrqHfgcoI2JwVky9bPZ41Us97hLPjLpy6ql76rQ9TYbbs7/cOCum5uslyTJFz/1Ob8TOsdXo62p5jWj//6iHempEsmUv/aa39Fz/jRQ5weZIUucePV4350qVsdYCNLPH1G1rl1z/JnVRnJJluOfIxLje7smRjBDjViamXtZDXbWGXvoi9zwreik7x0Q/I1o/v6NjalZy/cPDw7+3bfstuwQA+f52Op1+al2IksRUoCIxFSCOmAoQR0wFiCOmAsSaOq6KqUBlU8fUbRNXgarEVIA4V2NqVnI9AAAAAAAAAAAAAADM6EPrAgAAAAAAAAAAAAAAQGuS6wEAAAAAAAAAAAAAWJ7kegAAAAAAAAAAAAAAlie5HgAAAAAAAAAAAACA5UmuBwAAAAAAAAAAAABgeZLrAQAAAAAAAAAAAABYnuR6AAAAAAAAAAAAAACW9zHnw58+fTo9Pj4WKgpwyX//+a9t27btL3//a+OS1PX169f/nE6nn1qXoyQxtR+r3mesQ0wFiCOmQpq3Ova2qWdznZjKOe1z2E9MpVdiO6OaPa6KqUBNs8fUbRNXqed9v+t76tuxzo9zT8dXTAVWcum5FxmTb8XUrOT6x8fH7fX1NaZUQJKXp+dt27bt8+uXxiWp6+Hh4bfWZShNTO3HqvcZ6xBTAeKIqZDmrY69berZXCemck77HPYTU+mV2M6oZo+rYipQ0+wxddvEVep53+/6nvp2rPPj3NPxFVOBlVx67kXG5Fsx9UPYXgAAAAAAAAAAAAAAYFCS6wEAAAAAAAAAAAAAWJ7kegAAAAAAAAAAAAAAlie5HgAAAAAAAAAAAACA5UmuBwAAAAAAAAAAAABgeZLrYRAvT8/by9Nz62IAAAAAAAAAAAAAwJQk1wMAAAAAAAAAAAAAsDzJ9QDwP94QAQAAAAAAAAAAAOuSXA8AAAAAAAAAAAAAQLdqLZ77sfgeAAAAAADgAm+QA1jDW7z//O1L45IAAAAAwG3TJdfrnAMglQF8AAAAAAAAAAAA4M2H1gUAAAAAAAAAAAAAAIDWplu5HvjT+arc3ugAAAAAQO+8nRQAAAAAAGjFyvUAAAAAAAAAAAAAACxPcj0AAAAAAAAAAAAAAMuTXM8uL0/Pf7yemXE4bwAAAAAAAAAAAABw2cfWBWAsErMBAACAHG99CZ+/fWlcEgAAAAAAAIDbrFwPAAAAAAAAAAAAAMDyJNfDgl6enr2FAAAAAAAAAAAAAADekVwPAAAAAAAAAAAAAMDyPrYuAAAAAAAAAAAAAEArL0/PrYsAQCesXA8AAAAAAAAAMJiXp2eJgAAAAMEk1wPf0QEDAAAAAAAAsBbjxABriYj7nh0AzEpyPQAAAAAAAAAAAFCFxHwAevaxdQGAH92qPL792+dvX2oVBwAAAJIYDAEAYNvUCwEAAAAY17TJ9RKQAQAAAAAAAAAAII7JtADMbtrkemit9ASPyO2r9AIAAAAAAADAOixaCb+b4V7I+Q295Qi9L8/I5wCAuUiuh4ZmqKADAAAAAAAAMAdj2ACU1FtyPwBcIrkeAAAAAAAAAGAAkhIBoC4TzwDq6qHNM0VyfQ8HEgAAAAAAAAAAAGhLQjwAR3xoXQAAAAAAAAAAAKC+l6dni1oCAMA7U6xcDz2p3eg8n2nZU6PXLFBG5doFAAAAAABgFMa2APL0lFsDAOQr3QaSXM/0VulI2FPx11gAAAAAWNMIfWYjlBEAAACgJLk9AFCf5PpJGGgaywgVX9cUHPP+PncfAQAAAAAAQH+M6QEzkesDwMh6yquVXE+SaxetShkwMzEOAACA2rRFAQCAmnpKYAEAKEGfK/Qp4t4sdX9LroeKdEwAAACwqpE6r0cqK/MqdR3qnwIAANA2AnhTui80J95GJlkC0JdbMb7H2C25nmn1eMNdM1JZYQa17zmJOQCsxHMP1qRdC9xzXkcQNwAAAADKqD1Wc6mfxzgRPTKOCaSSXD+488rJ6A+A1PLvGXzLOTaRx3H0gcLRrymI8P4+vpYEkJIc4H4CgHIuPa+hR+qEMe3za/VxoD/X+i8BAAAAenKvL7J2vlGEPWMnUeMtNfqAao8N3codydl/b9cJQE2jjBEMnVyfcpA9jOYyyo0F9CcqfohDAHCZZyTbpg3OMSbJjMl9P45rz2rnEICarGgJAO3py4U0s90r937PpX9v/SbC1MVXrv2tpNmuj1k5T9DO6GMPQyfX5xj9RK2m1fnyQAX2yokfVtkEAGbXUxu8h9ff3vtcD8dpr1Lt6FZv6hvxDYEjlJFjJCHCfMRuAGBU6jFQTi/3V+ly9PI7b9nT51min3TlHKbINyGmTBCIuB5HuLYBSDdkcn1PlYdek8BHGqTPeQMBY3C+oG+S+wGYnQ7M+u6thrxt989H9HmLSJK+953otyNd69zfc0yOvKq4VSJ7qe/Ucu283Tqeqef66O9udY5pr/QEmFvXUOS+XcP0oMR151pu497Kh9HnI3W7PV8POfXTnutrI9lTt6yt1UTmHn47/XBdlCWmQx2pScQ99tVF7O9Wn9m91cqP9LcdEZHovW1jPb9meCbc+g21ft8MxxEg16ixr1lyfcoBS3mlS+T+Uysto71G5kilM9KRRIbSvBb7PscCyimdSGbQFwDoQc7rW+99J+W7JdVarT1lf/eO55E3LI000HN0taEaK0vtOZ57zl9OslvKYO2onZ7k67nv7tr+olYa29OOzk2Wzf1sajlKOTKhYc/zO6Lves/1GDmBbU+Sx62/9/7snUHOIkZvIsat9txP1/Z/dPuX9rFXxHbu1U1SYmpE/+WRyZG16tB7ktHO//29ktdLqf7vHicc0M4q10HKPZjT/zL78dpj5Gup9DOQsUX1S0VcXzn/vuc7ez6TKrqvjjnpT53XSGMmtdSqY4qpMWodx1niYPHk+iMnpORKMCn/FrGaXU83dmqls/QAauubp/X+Z+N4EilysGjEa7OnZ8Y9UckB985TiQHDe2Xau/2Rzh/xnH9WlpIgVCOhIOUz7tE+HBlEufXa1tz930rQGbEuyY8iJ2dEXxN7JlIc3XbtbdBW7UlAPamdUHKkXyLnmbgniTS3zZ2SyBDxDM79t/f/vud3HhFRZto6kggctb1r390TP44k85SoU0cp0UbIGeBvFdtyzsWe+mOtOBTxLNxzneY8o/QHzGeV52xk/0et7c/SDzfL79hr9d8/stLxMfVZnTMevHJMd69BORH9biOpnTQ9wjHruaxH8pQj9x+939me6dVWru+pky53vxGrNeUM1o84mD/bA2ePkc4X7BU5QB2t50pRrj0xNWoAZs8AU+6xj0piiuywPZKYeWTgjvHdOv/Oez6DoOlS4lbEMSv9fK39/J6pvrCqyLpkSgLh+d97vHZa95kAbRxJYjuyvxmUmlhTK4Ehcv+ty9zDNme6thlX7Xtxtuu+ZKweMU6WcqT/NGUbs1+nK9vTx3/t33P21yo55f2+U6/j2pMHa6nVr3hLiQllpRKQrpV1z5tuSvWf9dgvNrKjbbgj/QERky4lzKdzLGB8I02OqZU0vWeid8SbKY/k8/Z2rt7LKWPOxLYSi5bdK8dMqiXXj6x2h33rC88AxY8kSv5phvM5ssjk4SMrVaTcE5GN8lKrN42o9mD5kY6Y0lLL1sM1ce3+83zpQ6kk5dRGY8oA054GaIlGzp7GXNTgUO5zJWVVlKjG6b3vtmpo7jkXOQPgEZOQW313hE4U+tRDvYLjnEdmMkLyci96+F09lAEALonsw/C8Y9vyJmQc2Ubkd6P7MUt9Plfr7Zfqf09R8rcfucZuJehF7KcUfap9atX3TqzIJEhYVat+0tbPx5HiReSxippwVtuRyQN76t0l9tfz8Y32cDqd0j/88PDvbdt+K1ccgD/87XQ6/dS6ECWJqUBFYipAHDEVII6YChBHTAWINXVcFVOByqaOqdsmrgJViakAca7G1KzkegAAAAAAAAAAAAAAmNGH1gUAAAAAAAAAAAAAAIDWJNcDAAAAAAAAAAAAALA8yfUAAAAAAAAAAAAAACxPcj0AAAAAAAAAAAAAAMuTXA8AAAAAAAAAAAAAwPIk1wMAAAAAAAAAAAAAsDzJ9QAAAAAAAAAAAAAALO9jzoc/ffp0enx8LFQU4Jb//vNf27Zt21/+/tfGJanj69ev/zmdTj+1LkdJYipQi5gKEEdMhdve2q7vrdKOJZ+YChBHTKV3q41xML7Z46qYOjZtb0Yze0zdNnGVMtShuURMBVZS+ll4K6ZmJdc/Pj5ur6+vMaWCyb08PW/btm2fv32J3d5rzPZ69/Dw8FvrMpQmpgK1iKkAccRUuO2t7freKu1Y8ompAHHEVHq32hgH45s9roqpY9P2ZjSzx9RtE1cpQx2aS8RUYCWln4W3YuqHInsEAAAAAAAAAAAAAICBSK4HAAAAoJiXp+eLq+oBAAAAAAAA9EZyPQAAAAAAAAAAAAAAy/vYugAAAAAAAADAfLzBCAAAAIDRWLkeAAAAAAAAAAAAAIDlSa4HAAAAAAAAAAAAAGB5kusBAAAAAAAAAAAAAFie5HoAAAAAAAAAAAAAAJYnuR4AAAAAAAAAAAAAgOV9bF0AAAAAAAB4eXretm3bPn/70rgkAJTyFuu3TbwHAAD6om8KgDeS6wEAAAAAAAAAAKAzJqgCQH0fWhcAyPPy9PxdxRkAAAAAAAAAAAAAOE5yPQAAAAAAAAAAAAAAy/vYugAwG6vKAwAAAAAAAAAAAMB4rFwPwPJenp5NjAEAAAAAAAAAAIDFSa4HAAAAAAAAAAAAAGB5kusBAAAAKM4bowAAAAAAAIDefWxdAAAAAAAAAAAAAIDaLAoD0Lf3cfrzty9V9im5HgD+5+1BXOshDAAAszD4AAAAAAAAAMzgQ+sCAAAAAAAAAAAAAABAa5LrAQAAAAAAAAAAAABYnuR6AAAAAKp5eXreXp6eWxcDAIAA6nYAAHCMOjUA9Odj6wIAAAAAALAmg8cAANCXtzr6529fGpcEAACgDcn10DkDjETTIQbwPXERANrwDAauER8AAAAAAGBNPeTMfmhdAAAAAAAAAKCtl6fnLgYvAahL/AcAAPielesBAFiSwQIAAAAAAGZw7e1P3goFAACQT3I9wKJ0pgEAAD3QNgEAGIsFCwAAoBz1bQBoT3I9AAAAAAAAAMAkJGYCAMD8LGBVjuR6KOx9x4UgBgAAAAAAzMZgLgAA5DERCgD6JbkeFnBeIde5DQAAAAAASOgB4BoTpwAAgFVJrgdgWQaOAAAAAAC+dySZUiImwLiMmwEAK9OeZSTq7uVJrofBebADAAAAAL3QXwlsm0FegBGI1QDj0vYGgLIk1wMAAAAAAAAAAEAjJj1BH0xeAbZNcj2EaV3J9WAHAABgZO/b1dq2AAAAAADfO89NkisEAGV8aF0AWMnL03PzJHwAAAAAAAAA1mGcGgBAnQhIZ+V6ADhjdjesyb0PAAB9UUcH6IsEBIC2xGEAgBjepMto9JXXJ7keBqXzBAAAgHt0tgFQi1fTw1iMMQAAAFymTwMAyfVwUG8d0L2VB2Zw6b7SiAIAYCSjrcJi8ALmpw8LoI4j9Sp1MoDxqGcDQDrPzflca8feOtfX/k2bmB5cW9CE8iTXww2lHpKtH76t9w+jUCEBgDmpD8P3zuu9s90b7nkYn/sYoC39pADHRUx2iiwHgLb2XJzPdJ6Fa2h1T7gXibAnTo22yNYIJNdDglLBxwOVmkZuILhXAAAgz8j1/xTaCHBczipO7jVKMOADAKzovB5+q040e9seaONIbNEnx7nai5a2WihGf1n/7q0+H7HtnHMuXtKS6y+G5HrIpBOD2Xig7jPCcRuhjAAAxDi6isWlv/dYj9Qmh+NmuI8MaAKsyaQcYCaX6rS91tWPxF+xG9KVTBq+FV/27Lfn/sM3OWWs+Xt6jfX33JocVmI/1/6/tiP97j3fH0CfWse80qLiY604K7keOjR7oKRPKdddq9clnf9/1EN2FRpvkMc9A0CkHp8rqfXhngbA75X5UllXq/dDryLjYM59XSL+9hQXR5IyAN9qBbBrZXN+KanWSosj1IWuldHKzdwiVjMaMexPrVYbvrb/S+VovSKy2LaOlNhwpJ10xKX9lliko3a9OKWO2TpOtVJ69flztfpqSp/P1D7rVa6jFXjjEHvViIfEk1zPtFo1NPZovV+BmlStBsT50a2GYMkVSK0OCMDI1D/Ya88qR7X3O6ucpPp732k9OKYuTapb937JhPFb24wcnC8l4g0eR/oRZ7+faz2TWq2YmLPAw2rnnvJq318jXLPabsf0eq6PTlIrtRgP/RuhLbXSJMzUey8ncfhNqwlnKSt61ypbZI5DqSTS2a/xHtVqtx/ZZnS7LHU7eyYCtNJ6/3vlLtSypx0fdWxGOMZi6TxKjAWdq53bM0K9u2dHrolS8avE4iTnf9+z/aj2U+mYWjy5vkTH9io3bUrA6nlWy0jnbYQKVkm3fv+RmZ0qhX2o1ZCO6EQrqXRF5M2Re+JIx0hUJe1aA3bP74pIQhM/aCm6Qn9N7aSp1DJw20h13R7suQ+O7MP56Eep81LqHry33Yg615EkkpQEv1KuDXiMfL/V6rxLGaSPKAfzqZ3g0brd3oNr92T0sal970dOIrj39z3bSvlOq7eSRCV3XNpezjaJFVHny+nfO5KMUuKaEe/nVTv5vJf6SMrzW7yNdWuMaIa24i0pcXn2Y1BSdEJXiaS3iMmfORMPRorhlDdCPS5qIkDuNdoyKXGm+yni/PV8nbYq26X9znTdkCa6Ly1iPCKnDCUWNx79+o+IKS37Oq+pdW1FKhVTH06nU/KHf/7559Pr62vWDkp03N9yJGExVUqHwb3y5G6/ppxKYamy9tJIJsae8/nw8PD1dDr9XKA43YiIqedaJttcK0OJ/Y8QW/cMoB6ZVNWDiMk4R/YXKaoDNyKpOqJuIaZelnPdtb4Xcxowexo7qZNjUrYROVkmp969Z385g2F75NSZI45fiYlKvVzr23ZsUEpMzXMkph5pK0bcgyPUE0fXKrlxBLXqCzMlrYipl5VqH61+39bqM4mot0Xf36n1xNmukZGeWRHnWky9bYTrIEVKe2ikaz/CkT7Je0oleR5ZpCRl+9dEJ4Wl7m9Pn1Q07f8f1e5P3WNP4seRBOjoMZrZ4/GRxPEj+ys99pRajpz9RcS6Pe2ZnLLuGQvIMXtM3bb8uDprbLikxD3Q8/GrHR9T9/9ez8dvNWLqZbX6VMlXOsaVyP2NaO/2kI83q8hnfHRMzUquf3h4+Pe2bb9llwAg399Op9NPrQtRkpgKVCSmAsQRUwHiiKkAccRUgFhTx1UxFahs6pi6beIqUJWYChDnakzNSq4HAAAAAAAAAAAAAIAZfWhdAAAAAAAAAAAAAAAAaE1yPQAAAAAAAAAAAAAAy5NcDwAAAAAAAAAAAADA8iTXAwAAAAAAAAAAAACwPMn1AAAAAAAAAAAAAAAsT3I9AAAAAAAAAAAAAADLk1wPAAAAAAAAAAAAAMDyJNcDAAAAAAAAAAAAALC8jzkf/vTp0+nx8bFQUYA3//3nv37421/+/teQ7ezdVm1fv379z+l0+ql1OUoSU/txfq+McI9ADjEVII6YCmmi2rXMTUzl3FvsEC8gn5gKEGv2uCqmju3aGPC2qUvTp9lj6raJq5RxK96fE//XIaYCxLkVU7OS6x8fH7fX19eYUgFXvTw9//C3z69fQrazd1u1PTw8/Na6DKWJqf04v1dGuEcgh5gKEEdMhTRR7VrmJqZy7i12iBeQT0wFiDV7XBVTx3ZtDHjb1KXp0+wxddvEVWL80S/y7ct3/59C/F+HmAoQ51ZM/VCzIAAAAAAAAAAAAAAA0CPJ9QAAAAAAAAAAAAAALE9yPQAAAAAAAAAAAAAAy5NcDwAAAAAAAAAAAADA8j62LgAAAAAAc3h5em5dBAAAAAAAAIDdrFwPAAAAAAAAAAAAAMDyJNcDAAAAAAAAAAAAALA8yfXQwMvT8/by9Ny6GAAAAAAAAAAAAADA/0iuBwAAAAAAAAAAAABgeZLrAQAAAAAAAAAAAABY3sfWBQAAAABgbC9Pz62LAAxK/AAAAAAAAHpi5XoAAAAAAAAAAAAY0MvTswUMACCQlesBAAAA2MWADQAAAAAAADATK9cD/9/e3VvJbQMBAN7TUwuOHaiFa0a1KFYtakYuQYFjF7EO7t3zecUlAWLwR3xfKN2SXBIcApgBFwAAAAAAAAAAAACWp7geAAAAgOr8NDEAwHr0AQEAAACYjeJ6AAAAAAAAAAAAAACW97n3AQAAAAAAAAAAAAAAwEcffxXx66/vTfapuB4AAAAAAACo5j0J2ioBCgAAAMDcPhbVt6a4HgAAAAAAAAAAABp7LBzsWUgIALxRXA8N6QADAAAAAAAAMBq/MgIAAPDmU+8DAPr58eWbgn8AAAAAAAAAAAAAuCmuhzC1C9UVwjMrbRcAAAAAAAAAAACYwefeBwBX4+fyYB6K/gEAAAAAAAAAAIB3iuthMhHF+wqKAQAAAAAAAOA5L9YDAIA1Ka6HgSh6BwBgiyQOAAAAAKytVi5ZjhoAABjJCGOUT70PAFb248u3IQIBALAO/Q8AAAAAAAAAANjmzfVwMYrlAAAAAAAAAAAAACCf4nqoTLE7AAAAV2OsCwAAAABwnjlWABjXp94HAAAAAMC6fnz5JpEEAAAAAYyxAQCAK2s15vHmeuB/webrr+8dj4Qre29n2hgAAHC7eTMTAAAAAADALNR+sRLF9VCJIgGYn04hMLPHvohYBgDALIzHAQAglj42AABAOsX1APDA4hhgBX65Zk6SYADXJs4DAAAQSc4LYC2P84vygcAZchWguB6mVesh5uEIAAAAAAAAAACxLHoCgDkorgdgCVZkA6szWTcn1w0AAIAZGc8CMLPH55gX1AEAwFoU1wObTBBQqlXy5Flbjdy/wnwAAHijSAoAAACuTZ4YAGA9e/kfuSFaGamtKa6HyY0UUACA/lr3DSRaAMhlHAtr038EAIB+jMkB1iDeAxHEElamuB7YJeHJbFI6djp/wJbH2ODZNxd9FoC69KHrcn5ZkXYPsCa/EgqQr1ffeaY51zPHuvUZ4xR6mOleAwBYheJ6KLTKAPvZ9zTA46ySJMpWe1zlXgTakezdN2rcNQkNAAAAAFxByRxs5PztyHPlo85TwxFtFwBYzWy1HIrrAQgx2wMQgGswAU0K/RSYw8jJ+tbELXjjXgAAAHJszRcfjSfMMTMKY+BrGyHWaGNAFPGkncfnR+Q573UdZ8kHDllc7+ajRE77KQk+I3R8RzBLsOOco18sOPMG+ZK3zo/QxkqeUamfdV8BM9KHByCS5wr8Z2uMGHGPtL7PIt66OWNMSBnjz/z9rupMUdbeNlxbAJiTflq56D7RmXHF43WM/EUAbQM4MmJtkVgGsKYRn0nvRjy2IYvr3z0brBrE/q73OetMLW8AAATPSURBVKmVKGhRxHp2u/yudzvk+ka8/1IGnmcWHDz+X0kc3Du23mY4xiNX+A6rS4ktV3/GRX6/o4VZ0NJje7z6vQxXdPScLlkkLxYwqr3n1bNn27u9dt1iTF27mDjl3NTo024V4Tybs07ZrviTLiJ2b533o9xD6naiKchnRr3fcuZeAaK1ykXl9PtX1mLuGmZW4x5JGQOnbivq2JjbKH33UY4Daip5KXHEflP3zVj2XvDz+O8r6VZcH3FztkqmjGS0NzztvYE64s1ZOdssKV7tbeRjY0xn7rNng+HoYvBVPDsHOcn0M/uLeKtGyX5zPlNr/6N04FLawNX6IVfTOpZdoX8a9UYfiZBjV/9+tTl/cE6vPmdtI36PK/QLqK/12DFycXfuviP2d2a/qd81an+5+8lJgtXqY9dMpuTsL2d7z7YRdR2PFhSfmTMf8VkFt1v9pLw+EVzfVe7zkmf5mcV8IzvKN5YsVpzx3JyZ997rBz/+zez3DuekvMQot6YmZ/xVUgdUq4bojJr7zbmPZxA5J5TTTqPry1KvgXz+NdWoV9xrU6nxcIR6lpo5n+i4X3MOcuT7/cy8ftQYJGe7NbYx8vPy5X6/J//x6+vr/efPn6d21Ook9Fo5UXN/pQmh1GOrdcPl3PSpf5tTDHzmAdH7LV+zi2j/Ly8vf93v99eAwxlWZEyNeKvF3iCHa4gqkKippFPfa0Jmz1G/pFUnXkzdVtK+z/Q5a/3t0WdznEmIROznaP8fzRAfUkUVE7WOKTM4M55IJaaWS0kOPf5tjTH2CBOa70bsx8wseh6ghsjx2sxxX0zdNtI9eiZpPqNRFxWV9ocjFg9E7KPWeR31ukXJje9i6r6U/EftZ2yNxTAlbxWNXuASKTKPdSafRHu9x2lbrh5Xo2Jqi6KiVmO7nDn/nM/w3CjPnRHMMJdR4uox9XbLj6srt/szNURHVj6fkfauTavF4rk5r9pzDimeHWtkG/9ITN3Wus3k3hMRbWpv+6vIiVM5cwgpnzn6bI7etdQR29zSq8asxF5MrV5cP8oN3bq4PmK/UUmNUa7BjDykyiha2jdzTGVuPRPfLdVKgNZ21Ik3wN42Y0yNGMjo86Vp9VaSXmouTBqhCDhVq4UXYup5qdcopYg4ZQxesmg7ojigdpw4miQcaXLrikZcuHrmmtdIZuYQU7eNfI8qJppT6wR47f2sQnH973otrD+zn5J+aWnR+yoLo2qq9UKEI6WJ/6NCpIhFGdEix23R3+/qcbVWTE2JV7nXo7TY+Oi+Ldm+mMpIcvrjJfMaYuo2xfV16eP213tBVK9ncO15djF1W0RfdeR5qpGPjXQlfa+Zr/WI+cdaNapZxfUvLy//3G63v08fCUC6P+/3+x+9D6ImMRVoSEwFiCOmAsQRUwHiiKkAsS4dV8VUoLFLx9TbTVwFmhJTAeI8jalZxfUAAAAAAAAAAAAAAHBFn3ofAAAAAAAAAAAAAAAA9Ka4HgAAAAAAAAAAAACA5SmuBwAAAAAAAAAAAABgeYrrAQAAAAAAAAAAAABYnuJ6AAAAAAAAAAAAAACWp7geAAAAAAAAAAAAAIDlKa4HAAAAAAAAAAAAAGB5iusBAAAAAAAAAAAAAFie4noAAAAAAAAAAAAAAJb3L9Lg1hNpzWAaAAAAAElFTkSuQmCC\n", + "text/plain": [ + "<Figure size 3888x2160 with 189 Axes>" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "import h5py\n", + "import json\n", + "import matplotlib.pyplot as plt \n", + "import numpy as np\n", + "\n", + "with h5py.File('data/12kb-similarity-search.h5', 'r') as f: \n", + " knn_ae_12kb = f['knn_ae'][:]\n", + " knn_eq_12kb = f['knn_eq'][:]\n", + " knn_sax_12kb = f['knn_sax'][:]\n", + " top_xcorr_12kb = f['top_xcorr'][:]\n", + "\n", + "show = 5\n", + "\n", + "N = (show + 1) * 5\n", + "\n", + "T = len(targets_12kb)\n", + "sz = data_12kb[0].size\n", + "\n", + "plt.figure(figsize=(6 * T, N))\n", + "\n", + "ymax = 1.0\n", + "\n", + "show_predictions = False\n", + "\n", + "for i, target in enumerate(targets_12kb):\n", + " ax = plt.subplot(N, T, (i + 1))\n", + " \n", + " ax.set_facecolor(\"#eeeeee\")\n", + " \n", + " plt.bar(np.arange(sz), data_12kb[target], color='#000000', width=1.0)\n", + "\n", + " plt.ylim(0, ymax)\n", + " plt.xticks([], [])\n", + " plt.yticks([], [])\n", + "\n", + " for j, hit in enumerate(knn_ae_12kb[i][:show]):\n", + " plt.subplot(N, T, ((j + 1) * T) + (i + 1))\n", + " plt.bar(np.arange(sz), data_12kb[hit], color='#d24f00', width=1.0) # orange = CAE\n", + " plt.ylim(0, ymax)\n", + " plt.xticks([], [])\n", + " plt.yticks([], [])\n", + " plt.subplots_adjust(top=0.9)\n", + " \n", + " for j, hit in enumerate(topk_dtw[i][:show]):\n", + " plt.subplot(N, T, ((j + 6) * T) + (i + 1))\n", + " plt.bar(np.arange(sz), data_12kb[hit], color='green', width=1.0) # orange = CAE\n", + " plt.ylim(0, ymax)\n", + " plt.xticks([], [])\n", + " plt.yticks([], [])\n", + " plt.subplots_adjust(top=0.9)\n", + "\n", + " for j, hit in enumerate(knn_eq_12kb[i][:show]):\n", + " plt.subplot(N, T, ((j + 11) * T) + (i + 1))\n", + " plt.bar(np.arange(sz), data_12kb[hit], color='#008ca8', width=1.0) # blue = EQ\n", + " plt.ylim(0, ymax)\n", + " plt.xticks([], [])\n", + " plt.yticks([], [])\n", + "\n", + " for j, hit in enumerate(knn_sax_12kb[i][:show]):\n", + " plt.subplot(N, T, ((j + 16) * T) + (i + 1))\n", + " plt.bar(np.arange(sz), data_12kb[hit], color='#a6227a', width=1.0) # purple = SAX\n", + " plt.ylim(0, ymax)\n", + " plt.xticks([], [])\n", + " plt.yticks([], [])" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Importing the dtw module. When using in academic works please cite:\n", + " T. Giorgino. Computing and Visualizing Dynamic Time Warping Alignments in R: The dtw Package.\n", + " J. Stat. Soft., doi:10.18637/jss.v031.i07.\n", + "\n", + "Preprocessing:\n", + "0:0\n", + "10000:28\n", + "20000:30\n", + "30000:34\n", + "40000:34\n", + "50000:34\n", + "60000:34\n", + "70000:39\n", + "80000:48\n", + "90000:49\n", + "100000:49\n", + "110000:52\n", + "120000:52\n", + "0\n", + "1\n", + "2\n", + "3\n", + "4\n", + "5\n", + "6\n", + "7\n", + "8\n", + "9\n", + "10\n", + "11\n", + "12\n", + "13\n", + "14\n", + "15\n", + "16\n", + "17\n", + "18\n", + "19\n", + "20\n", + "21\n", + "22\n", + "23\n", + "24\n", + "25\n", + "26\n", + "27\n", + "28\n", + "29\n", + "30\n", + "31\n", + "32\n", + "33\n", + "34\n", + "35\n", + "36\n", + "37\n", + "38\n", + "39\n", + "40\n", + "41\n", + "42\n", + "43\n", + "44\n", + "45\n", + "46\n", + "47\n", + "48\n", + "49\n", + "50\n", + "51\n", + "Preprocessing done. Took 28.18 seconds (0.5 minutes).\n", + "Target #0 done! Took 11.02 seconds (0.2 minutes).\n", + "Target #1 done! Took 11.10 seconds (0.2 minutes).\n", + "Target #2 done! Took 10.90 seconds (0.2 minutes).\n", + "Target #3 done! Took 10.49 seconds (0.2 minutes).\n", + "Target #4 done! Took 10.73 seconds (0.2 minutes).\n", + "Target #5 done! Took 10.41 seconds (0.2 minutes).\n", + "Target #6 done! Took 10.34 seconds (0.2 minutes).\n", + "Target #7 done! Took 10.41 seconds (0.2 minutes).\n", + "Target #8 done! Took 10.31 seconds (0.2 minutes).\n", + "[ 11975 80854 100423 113956 6129 77520 4669 78275 1762 20047]\n", + "Done! Took 123.90 seconds (2.1 minutes).\n" + ] + } + ], + "source": [ + "from Flaskserver.main import preprocess\n", + "import _lsh\n", + "\n", + "topk_dtw = []\n", + "\n", + "dtw_12kb = np.zeros((data_12kb.shape[0], len(targets_12kb)))\n", + "data = np.reshape(data_12kb, (len(data_12kb), len(data_12kb[0]), 1))\n", + "print('Preprocessing:')\n", + "t0 = time()\n", + "r,a,sd = preprocess(data_12kb)\n", + "print('Preprocessing done. Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))\n", + "\n", + "for i, target in enumerate(targets_12kb):\n", + " t1 = time()\n", + " query = data_12kb[target]\n", + " query = np.reshape(query, (len(data_12kb[0]), 1))\n", + " candidates, distances, _ = _lsh.lsh(data, query, r, a, sd)\n", + " topk_dtw.append(candidates)\n", + " print('Target #{} done! Took {:.2f} seconds ({:.1f} minutes).'.format(i, time() - t1, (time() - t1) / 60))\n", + " \n", + "print(candidates[0:10])\n", + "print('Done! Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))\n" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[5, 6, 7, 8]\n" + ] + } + ], + "source": [ + "def permute(A, P, n): \n", + " \n", + " # For each element of P \n", + " for i in range(n): \n", + " next = i \n", + " \n", + " # Check if it is already \n", + " # considered in cycle \n", + " while (P[next] >= 0): \n", + " \n", + " # Swap the current element according \n", + " # to the permutation in P \n", + " t = A[i] \n", + " A[i] = A[P[next]] \n", + " A[P[next]] = t \n", + " \n", + " temp = P[next] \n", + " \n", + " # Subtract n from an entry in P \n", + " # to make it negative which indicates \n", + " # the corresponding move \n", + " # has been performed \n", + " P[next] -= n \n", + "\n", + "A = [5, 6, 7, 8] \n", + "P = [3, 2, 1, 0] \n", + "n = len(A) \n", + "permute(A,P,n)\n", + "print(A)" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Done! Took 0.03 seconds (0.0 minutes).\n" + ] + } + ], + "source": [ + "t0 = time()\n", + "dist = cdist(data_12kb, data_12kb[80503].reshape((1, data_12kb[80503].size)), metric='euclidean').flatten()\n", + "np.argsort(dist)[1 + (2 * 0):5 + 1 + (2 * 0)]\n", + "print('Done! Took {:.2f} seconds ({:.1f} minutes).'.format(time() - t0, (time() - t0) / 60))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.5" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/experiments/DBA.py b/experiments/DBA.py new file mode 100644 index 0000000000000000000000000000000000000000..f8713115140075889e03228258b89872eba3838b --- /dev/null +++ b/experiments/DBA.py @@ -0,0 +1,148 @@ +''' +/******************************************************************************* + * Copyright (C) 2018 Francois Petitjean + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 3 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + ******************************************************************************/ +''' +from __future__ import division +import numpy as np +from functools import reduce + + +__author__ ="Francois Petitjean" + +def performDBA(series, n_iterations=10): + n_series = len(series) + max_length = reduce(max, map(len, series)) + + cost_mat = np.zeros((max_length, max_length)) + delta_mat = np.zeros((max_length, max_length)) + path_mat = np.zeros((max_length, max_length), dtype=np.int8) + + medoid_ind = approximate_medoid_index(series,cost_mat,delta_mat) + center = series[medoid_ind] + + for i in range(0,n_iterations): + center = DBA_update(center, series, cost_mat, path_mat, delta_mat) + + return center + +def approximate_medoid_index(series,cost_mat,delta_mat): + if len(series)<=50: + indices = range(0,len(series)) + else: + indices = np.random.choice(range(0,len(series)),50,replace=False) + + medoid_ind = -1 + best_ss = 1e20 + for index_candidate in indices: + candidate = series[index_candidate] + ss = sum_of_squares(candidate,series,cost_mat,delta_mat) + if(medoid_ind==-1 or ss<best_ss): + best_ss = ss + medoid_ind = index_candidate + return medoid_ind + +def sum_of_squares(s,series,cost_mat,delta_mat): + return sum(map(lambda t:squared_DTW(s,t,cost_mat,delta_mat),series)) + +def DTW(s,t,cost_mat,delta_mat): + return np.sqrt(squared_DTW(s,t,cost_mat,delta_mat)) + +def squared_DTW(s,t,cost_mat,delta_mat): + s_len = len(s) + t_len = len(t) + length = len(s) + fill_delta_mat_dtw(s, t, delta_mat) + cost_mat[0, 0] = delta_mat[0, 0] + for i in range(1, s_len): + cost_mat[i, 0] = cost_mat[i-1, 0]+delta_mat[i, 0] + + for j in range(1, t_len): + cost_mat[0, j] = cost_mat[0, j-1]+delta_mat[0, j] + + for i in range(1, s_len): + for j in range(1, t_len): + diag,left,top =cost_mat[i-1, j-1], cost_mat[i, j-1], cost_mat[i-1, j] + if(diag <=left): + if(diag<=top): + res = diag + else: + res = top + else: + if(left<=top): + res = left + else: + res = top + cost_mat[i, j] = res+delta_mat[i, j] + return cost_mat[s_len-1,t_len-1] + +def fill_delta_mat_dtw(center, s, delta_mat): + slim = delta_mat[:len(center),:len(s)] + np.subtract.outer(center, s,out=slim) + np.square(slim, out=slim) + +def DBA_update(center, series, cost_mat, path_mat, delta_mat): + options_argmin = [(-1, -1), (0, -1), (-1, 0)] + updated_center = np.zeros(center.shape) + n_elements = np.array(np.zeros(center.shape), dtype=int) + center_length = len(center) + for s in series: + s_len = len(s) + fill_delta_mat_dtw(center, s, delta_mat) + cost_mat[0, 0] = delta_mat[0, 0] + path_mat[0, 0] = -1 + + for i in range(1, center_length): + cost_mat[i, 0] = cost_mat[i-1, 0]+delta_mat[i, 0] + path_mat[i, 0] = 2 + + for j in range(1, s_len): + cost_mat[0, j] = cost_mat[0, j-1]+delta_mat[0, j] + path_mat[0, j] = 1 + + for i in range(1, center_length): + for j in range(1, s_len): + diag,left,top =cost_mat[i-1, j-1], cost_mat[i, j-1], cost_mat[i-1, j] + if(diag <=left): + if(diag<=top): + res = diag + path_mat[i,j] = 0 + else: + res = top + path_mat[i,j] = 2 + else: + if(left<=top): + res = left + path_mat[i,j] = 1 + else: + res = top + path_mat[i,j] = 2 + + cost_mat[i, j] = res+delta_mat[i, j] + + i = center_length-1 + j = s_len-1 + + while(path_mat[i, j] != -1): + updated_center[i] += s[j] + n_elements[i] += 1 + move = options_argmin[path_mat[i, j]] + i += move[0] + j += move[1] + assert(i == 0 and j == 0) + updated_center[i] += s[j] + n_elements[i] += 1 + + return np.divide(updated_center, n_elements) \ No newline at end of file diff --git a/experiments/__pycache__/DBA.cpython-38.pyc b/experiments/__pycache__/DBA.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a6f18374fe4ee3741bd90b200f99afff80e2ea17 Binary files /dev/null and b/experiments/__pycache__/DBA.cpython-38.pyc differ diff --git a/experiments/__pycache__/bigwig.cpython-38.pyc b/experiments/__pycache__/bigwig.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f0fa8e0b6988ff57892b94276c1770514fac5627 Binary files /dev/null and b/experiments/__pycache__/bigwig.cpython-38.pyc differ diff --git a/experiments/__pycache__/download.cpython-38.pyc b/experiments/__pycache__/download.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d40dfbad111de40f14800334929cbb0e16716df9 Binary files /dev/null and b/experiments/__pycache__/download.cpython-38.pyc differ diff --git a/experiments/__pycache__/loss.cpython-38.pyc b/experiments/__pycache__/loss.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a19c1139fc632610368ea5a974f52c09e8e8cd30 Binary files /dev/null and b/experiments/__pycache__/loss.cpython-38.pyc differ diff --git a/experiments/__pycache__/utils.cpython-38.pyc b/experiments/__pycache__/utils.cpython-38.pyc new file mode 100644 index 0000000000000000000000000000000000000000..852f5dc77ec7f4f7247ae3603a2392e28f746c38 Binary files /dev/null and b/experiments/__pycache__/utils.cpython-38.pyc differ diff --git a/experiments/bigwig.py b/experiments/bigwig.py new file mode 100644 index 0000000000000000000000000000000000000000..3e5fd99f5309395073b7347a78c76cf73de0ec05 --- /dev/null +++ b/experiments/bigwig.py @@ -0,0 +1,319 @@ +""" +Copyright 2018 Novartis Institutes for BioMedical Research Inc. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +import base64 +import bbi +import cooler +import numpy as np +import os +import pandas as pd +from sklearn.preprocessing import MinMaxScaler + + +TILE_SIZE = 1024 + +TILESET_INFO = {"filetype": "bigwig", "datatype": "vector"} + +FILE_EXT = {"bigwig", "bw"} + +def normalize_data(data, percentile: float = 99.9): + cutoff = np.percentile(data, (0, percentile)) + data_norm = np.copy(data) + data_norm[np.where(data_norm < cutoff[0])] = cutoff[0] + data_norm[np.where(data_norm > cutoff[1])] = cutoff[1] + + return MinMaxScaler().fit_transform(data_norm) + +def is_bigwig(filepath=None, filetype=None): + if filepath is None: + return False + + if filetype == "bigwig": + return True + + filename, file_ext = os.path.splitext(filepath) + + if file_ext[1:].lower() in FILE_EXT: + return True + + return False + + +def get_quadtree_depth(chromsizes): + tile_size_bp = TILE_SIZE + min_tile_cover = np.ceil(sum(chromsizes) / tile_size_bp) + return int(np.ceil(np.log2(min_tile_cover))) + + +def get_zoom_resolutions(chromsizes): + return [2 ** x for x in range(get_quadtree_depth(chromsizes) + 1)][::-1] + + +def get_chromsizes(bwpath): + """TODO: replace this with negspy. + + Also, return NaNs from any missing chromosomes in bbi.fetch + """ + chromsizes = bbi.chromsizes(bwpath) + chromosomes = cooler.util.natsorted(chromsizes.keys()) + return pd.Series(chromsizes)[chromosomes] + + +def chr2abs(chromsizes, chr: str, start: int, end: int): + """Convert chromosomal coordinates to absolute coordinates. + + Arguments: + chromsizes -- [description] + chr -- [description] + start -- [description] + end -- [description] + + Yields: + [type] -- [description] + """ + offset = (np.cumsum(chromsizes) - chromsizes)[chr] + return (offset + start, offset + end) + + +def abs2chr(chromsizes, start_pos: int, end_pos: int, is_idx2chr: bool = False): + """Convert absolute coordinates to chromosomal coordinates. + + Arguments: + chromsizes {[type]} -- [description] + start_pos {[type]} -- [description] + end_pos {[type]} -- [description] + + Yields: + [type] -- [description] + """ + abs_chrom_offsets = np.r_[0, np.cumsum(chromsizes.values)] + cid_lo, cid_hi = ( + np.searchsorted(abs_chrom_offsets, [start_pos, end_pos], side="right") - 1 + ) + rel_pos_lo = start_pos - abs_chrom_offsets[cid_lo] + rel_pos_hi = end_pos - abs_chrom_offsets[cid_hi] + start = rel_pos_lo + + def idx2chr(cid): + return chromsizes.index[cid] if is_idx2chr else cid + + for cid in range(cid_lo, cid_hi): + yield idx2chr(cid), start, chromsizes[cid] + start = 0 + yield idx2chr(cid_hi), start, rel_pos_hi + + +def get_tile(bwpath, zoom_level, start_pos, end_pos, chromsizes=None): + if chromsizes is None: + chromsizes = get_chromsizes(bwpath) + + resolutions = get_zoom_resolutions(chromsizes) + binsize = resolutions[zoom_level] + + arrays = [] + for cid, start, end in abs2chr(chromsizes, start_pos, end_pos): + n_bins = int(np.ceil((end - start) / binsize)) + try: + chrom = chromsizes.index[cid] + clen = chromsizes.values[cid] + + x = bbi.fetch(bwpath, chrom, start, end, bins=n_bins, missing=np.nan) + + # drop the very last bin if it is smaller than the binsize + if end == clen and clen % binsize != 0: + x = x[:-1] + except IndexError: + # beyond the range of the available chromosomes + # probably means we've requested a range of absolute + # coordinates that stretch beyond the end of the genome + x = np.zeros(n_bins) + + arrays.append(x) + + return np.concatenate(arrays) + + +def tiles(bwpath, tile_ids, chromsizes=None): + """Generate tiles from a bigwig file. + + Parameters + ---------- + tileset: tilesets.models.Tileset object + The tileset that the tile ids should be retrieved from + tile_ids: [str,...] + A list of tile_ids (e.g. xyx.0.0) identifying the tiles + to be retrieved + + Returns + ------- + tile_list: [(tile_id, tile_data),...] + A list of tile_id, tile_data tuples + """ + generated_tiles = [] + for tile_id in tile_ids: + tile_id_parts = tile_id.split(".") + tile_position = list(map(int, tile_id_parts[1:3])) + zoom_level = tile_position[0] + tile_pos = tile_position[1] + + if chromsizes is None: + chromsizes = get_chromsizes(bwpath) + + max_depth = get_quadtree_depth(chromsizes) + tile_size = TILE_SIZE * 2 ** (max_depth - zoom_level) + start_pos = tile_pos * tile_size + end_pos = start_pos + tile_size + dense = get_tile(bwpath, zoom_level, start_pos, end_pos, chromsizes=chromsizes) + + if len(dense): + max_dense = max(dense) + min_dense = min(dense) + else: + max_dense = 0 + min_dense = 0 + + min_f16 = np.finfo("float16").min + max_f16 = np.finfo("float16").max + + has_nan = len([d for d in dense if np.isnan(d)]) > 0 + + if ( + not has_nan + and max_dense > min_f16 + and max_dense < max_f16 + and min_dense > min_f16 + and min_dense < max_f16 + ): + tile_value = { + "dense": base64.b64encode(dense.astype("float16")).decode("utf-8"), + "dtype": "float16", + } + else: + tile_value = { + "dense": base64.b64encode(dense.astype("float32")).decode("utf-8"), + "dtype": "float32", + } + + generated_tiles += [(tile_id, tile_value)] + return generated_tiles + + +def tileset_info(bwpath): + """Get the tileset info for a bigWig file. + + Parameters + ---------- + bwpath: string + Path to the bigwig file + + Returns + ------- + tileset_info: { + 'min_pos': [], + 'max_pos': [], + 'max_width': 131072 + 'tile_size': 1024, + 'max_zoom': 7 + } + """ + TILE_SIZE = 1024 + chromsizes = get_chromsizes(bwpath) + min_tile_cover = np.ceil(np.sum(chromsizes) / TILE_SIZE) + max_zoom = int(np.ceil(np.log2(min_tile_cover))) + tileset_info = { + "min_pos": [0], + "max_pos": [TILE_SIZE * 2 ** max_zoom], + "max_width": TILE_SIZE * 2 ** max_zoom, + "tile_size": TILE_SIZE, + "max_zoom": max_zoom, + } + return tileset_info + + +def chunk( + bigwig: str, + window_size: int, + resolution: int, + step_size: int, + chroms: list, + normalize: bool = True, + percentile: float = 99.9, + verbose: bool = False, + chromsizes=None, + print_per_chrom: callable = None, +): + if chromsizes is None: + chromsizes = bbi.chromsizes(bigwig) + + base_bins = np.ceil(window_size / resolution).astype(int) + + num_total_windows = 0 + bins = np.ceil(window_size / resolution).astype(int) + + for chrom in chroms: + chromsize = chromsizes[chrom] + num_total_windows += ( + np.ceil((chromsize - window_size) / step_size).astype(int) + 1 + ) + + values = np.zeros((num_total_windows, base_bins)) + + start = 0 + for chrom in chroms: + if chrom not in chromsizes: + print("Skipping chrom (not in bigWig file):", chrom, chromsizes[chrom]) + continue + + chromsize = chromsizes[chrom] + num_windows = np.ceil((chromsize - window_size) / step_size).astype(int) + 1 + + start_bps = np.arange(0, chromsize - window_size + step_size, step_size) + end_bps = np.arange(window_size, chromsize + step_size, step_size) + + end = start + num_windows + + values[start:end] = bbi.stackup( + bigwig, + [chrom] * start_bps.size, + start_bps, + end_bps, + bins=bins, + missing=0.0, + oob=0.0, + ) + + if normalize: + values[start:end] = normalize_data( + values[start:end], percentile=percentile + ) + + if verbose and not print_per_chrom: + print( + "Extracted", + "{} windows".format(num_windows), + "from {}".format(chrom), + "with a max value of {}.".format(np.nanmax(values[start:end])), + ) + + if print_per_chrom: + print_per_chrom() + + start = end + + return values + + +def get( + bw_path: str, chrom: str, start: int, end: int, bins: int, missing: float = 0.0 +): + return bbi.fetch(bw_path, chrom, start, end, bins=bins, missing=missing) diff --git a/experiments/data/.gitattributes b/experiments/data/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..55189ee23772b439e6276f7a3e3df30eb8364af9 --- /dev/null +++ b/experiments/data/.gitattributes @@ -0,0 +1 @@ +*.{bigWig, csv, docs, h5, mmap, npy, pdf, pkl, png, xlsx} filter=lfs diff=lfs merge=lfs -text \ No newline at end of file diff --git a/experiments/data/12kb-similarity-search.h5 b/experiments/data/12kb-similarity-search.h5 new file mode 100644 index 0000000000000000000000000000000000000000..d55eeb86234dfebcd0667321c2b10000227f2faf Binary files /dev/null and b/experiments/data/12kb-similarity-search.h5 differ diff --git a/experiments/data/ENCFF158GBQ.bigWig b/experiments/data/ENCFF158GBQ.bigWig new file mode 100644 index 0000000000000000000000000000000000000000..fffecf8d86273cd0f281cb8601d46fc0346693ba --- /dev/null +++ b/experiments/data/ENCFF158GBQ.bigWig @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7879b57890b2bf3ab7e9c491052c0c31667a900e5c78c44ebe5e9dd970c7c4d +size 779178485 diff --git a/experiments/data/cae_12kb.h5 b/experiments/data/cae_12kb.h5 new file mode 100644 index 0000000000000000000000000000000000000000..7bacc259742db79c4776d7b708fe3e139ba99658 Binary files /dev/null and b/experiments/data/cae_12kb.h5 differ diff --git a/experiments/download.py b/experiments/download.py new file mode 100644 index 0000000000000000000000000000000000000000..cfd48930f67144e9f6a0edb320a4e5fae5812217 --- /dev/null +++ b/experiments/download.py @@ -0,0 +1,288 @@ +#!/usr/bin/env python + +import argparse +import json +import math +import os +import pathlib +import requests +import sys + +from utils import get_tqdm + + +def download_file( + url: str, + filename: str, + base: str = ".", + dir: str = "data", + overwrite: bool = False, + silent: bool = False, +): + """Method for downloading ENCODE datasets + + Arguments: + filename {str} -- File access of the ENCODE data file + + Keyword Arguments: + base {str} -- Base directory (default: {"."}) + dir {str} -- Download directory (default: {"data"}) + overwrite {bool} -- If {True} existing files with be overwritten (default: {False}) + + Returns: + {str} -- Returns a pointer to `filename`. + """ + filepath = os.path.join(base, dir, filename) + + if pathlib.Path(filepath).is_file() and not overwrite: + print(f"{filepath} already exist. To overwrite pass `overwrite=True`") + return + + tqdm = get_tqdm() + chunkSize = 1024 + name, _ = os.path.splitext(filename) + r = requests.get(url, stream=True) + + with open(filepath, "wb") as f: + if not silent: + pbar = tqdm( + unit="B", unit_scale=True, total=int(r.headers["Content-Length"]) + ) + for chunk in r.iter_content(chunk_size=chunkSize): + if chunk: # filter out keep-alive new chunks + if not silent: + pbar.update(len(chunk)) + f.write(chunk) + + return filename + + +def download_encode_file( + filename: str, base: str = ".", dir: str = "data", overwrite: bool = False +): + """Method for downloading ENCODE datasets + + Arguments: + filename {str} -- File access of the ENCODE data file + + Keyword Arguments: + base {str} -- Base directory (default: {"."}) + dir {str} -- Download directory (default: {"data"}) + overwrite {bool} -- If {True} existing files with be overwritten (default: {False}) + + Returns: + {str} -- Returns a pointer to `filename`. + """ + name, _ = os.path.splitext(filename) + url = "https://www.encodeproject.org/files/{}/@@download/{}".format(name, filename) + + return download_file(url, filename, base=base, dir=dir, overwrite=overwrite) + + +def download_roadmap_epigenomics_file( + e_id: str, + data_type: str, + target: str, + base: str = ".", + dir: str = "data", + overwrite: bool = False, + silent: bool = False, + check: bool = False, +): + """Method for downloading Roadmap Epigenomics datasets + + Arguments: + e_id {str} -- Experiment ID, e.g., e116 + data_type {str} -- Data type, e.g., fc_signal + target {str} -- Histone modification, e.g., H3K27ac + + Keyword Arguments: + base {str} -- Base directory (default: {"."}) + dir {str} -- Download directory (default: {"data"}) + overwrite {bool} -- If {True} existing files with be overwritten (default: {False}) + + Returns: + {str} -- Returns a pointer to `filename`. + """ + base_url = "" + filename = "" + out_filename = "" + + if data_type == "fc_signal": + base_url = "https://egg2.wustl.edu/roadmap/data/byFileType/signal/consolidated/macs2signal/foldChange/" + filename = "{}-{}.fc.signal.bigwig".format(e_id, target) + out_filename = "{}-{}.fc.signal.bigWig".format(e_id, target) + + elif data_type == "narrow_peaks": + base_url = "https://egg2.wustl.edu/roadmap/data/byFileType/peaks/consolidated/narrowPeak/" + filename = "{}-{}.narrowPeak.gz".format(e_id, target) + out_filename = "{}-{}.narrowPeak.gz".format(e_id, target) + + elif data_type == "broad_peaks": + base_url = "https://egg2.wustl.edu/roadmap/data/byFileType/peaks/consolidated/broadPeak/" + filename = "{}-{}.broadPeak.gz".format(e_id, target) + out_filename = "{}-{}.broadPeak.gz".format(e_id, target) + + else: + print("Unknown data type: {}".format(data_type)) + + url = base_url + filename + + if check: + if not pathlib.Path(os.path.join(base, dir, out_filename)).is_file(): + print("{}/{}/{} not found".format(base, dir, out_filename)) + else: + return download_file( + url, out_filename, base=base, dir=dir, overwrite=overwrite, silent=silent + ) + + +def download( + datasets: dict, + settings: dict, + base: str = ".", + clear: bool = False, + limit: int = math.inf, + verbose: bool = False, +): + tqdm = get_tqdm() + + # Create data directory + pathlib.Path("data").mkdir(parents=True, exist_ok=True) + + file_types = settings["file_types"] + data_types = list(settings["data_types"].keys()) + + num_downloads = 0 + for dataset_name in tqdm(datasets, desc="Dataset"): + samples = datasets[dataset_name] + + if num_downloads >= limit: + break + + for sample_id in tqdm(samples, desc="Sample", leave=False): + dataset = samples[sample_id] + has_all_data_types = set(data_types).issubset(dataset.keys()) + + assert has_all_data_types, "Dataset should contain all data types" + + for data_type in tqdm(data_types, desc="Data type", leave=False): + fileext = file_types[data_type] + filename = "{}.{}".format(os.path.basename(dataset[data_type]), fileext) + + download_encode_file(filename, base, overwrite=clear) + + num_downloads += 1 + + +def download_roadmap_epigenomics( + datasets: list, + settings: dict, + dataset_idx: int = None, + base: str = ".", + clear: bool = False, + limit: int = math.inf, + verbose: bool = False, + silent: bool = False, + check: bool = False, +): + tqdm = get_tqdm() + + # Create data directory + pathlib.Path("data").mkdir(parents=True, exist_ok=True) + + data_types = list(settings["data_types"].keys()) + targets = settings["targets"] + + num_downloads = 0 + + if dataset_idx is not None: + datasets_iter = [datasets[dataset_idx]] + datasets_iter = datasets_iter if silent else tqdm(datasets_iter, desc="Dataset") + + else: + datasets_iter = datasets if silent else tqdm(datasets, desc="Dataset") + + for e_id in datasets_iter: + if num_downloads >= limit: + break + + targets_iter = targets if silent else tqdm(targets, desc="Targets", leave=False) + + for target in targets_iter: + for data_type in data_types: + download_roadmap_epigenomics_file( + e_id, + data_type, + target, + base=base, + overwrite=clear, + silent=silent, + check=check, + ) + + num_downloads += 1 + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description="Peax Downloader") + parser.add_argument( + "-d", "--datasets", help="path to the datasets file", default="datasets.json" + ) + parser.add_argument( + "-x", "--dataset-idx", help="index of the dataset to be downloaded", type=int + ) + parser.add_argument( + "-s", "--settings", help="path to the settings file", default="settings.json" + ) + parser.add_argument( + "-c", "--clear", action="store_true", help="clears previously downloadeds" + ) + parser.add_argument( + "-v", "--verbose", action="store_true", help="turn on verbose logging" + ) + parser.add_argument( + "-z", "--silent", action="store_true", help="if true hide all logs" + ) + parser.add_argument( + "-l", + "--limit", + type=int, + help="limit the number of datasets to be downloaded", + default=math.inf, + ) + parser.add_argument( + "-r", "--roadmap", action="store_true", help="if true download roadmap data" + ) + + args = parser.parse_args() + + try: + with open(args.datasets, "r") as f: + datasets = json.load(f) + except FileNotFoundError: + print("Please provide a datasets file via `--datasets`") + sys.exit(2) + + try: + with open(args.settings, "r") as f: + settings = json.load(f) + except FileNotFoundError: + print("Please provide a settings file via `--settings`") + sys.exit(2) + + if args.roadmap: + download_roadmap_epigenomics( + datasets, + settings, + dataset_idx=args.dataset_idx, + clear=args.clear, + limit=args.limit, + verbose=args.verbose, + silent=args.silent, + ) + else: + download( + datasets, settings, clear=args.clear, limit=args.limit, verbose=args.verbose + ) + diff --git a/experiments/loss.py b/experiments/loss.py new file mode 100644 index 0000000000000000000000000000000000000000..c8f75954fc3a78904199048867c9b915fd7a6fca --- /dev/null +++ b/experiments/loss.py @@ -0,0 +1,126 @@ +import numpy as np +import os +import sys + +# Stupid Keras things is a smart way to always print. See: +# https://github.com/keras-team/keras/issues/1406 +stderr = sys.stderr +sys.stderr = open(os.devnull, "w") +from keras import backend as K +from tensorflow.keras.losses import huber as huber_loss + +sys.stderr = stderr + +eps = np.float(K.epsilon()) + + +def scaled_mean_squared_error(scale: float = 1.0, with_numpy: bool = False): + """Scaled mean squared error + + Scaling is applied to the absolute error before squaring the data + + Keyword Arguments: + scale {float} -- Scale factor (default: {1}) + + Returns: + {tensor} -- MSE of the scaled error + """ + + def mean_squared_error(y_true, y_pred): + return K.mean(K.square((y_pred - y_true) * scale), axis=-1) + + def mean_squared_error_numpy(y_true, y_pred): + return np.mean(np.square((y_pred - y_true) * scale), axis=-1) + + if with_numpy: + return mean_squared_error_numpy + + return mean_squared_error + + +def scaled_mean_absolute_error(scale: float = 1.0): + """Scaled mean absolute error + + Scaling is applied to the absolute error before taking the absolute the data + + Keyword Arguments: + scale {float} -- Scale factor (default: {1}) + + Returns: + {tensor} -- MAE of the scaled error + """ + + def mean_absolute_error(y_true, y_pred): + return K.mean(K.abs((y_pred - y_true) * scale), axis=-1) + + return mean_absolute_error + + +def scaled_logcosh(scale: float = 1.0): + """Scale logcosh loss + + Scaling is applied to the absolute error before logcoshing the data + + Keyword Arguments: + scale {float} -- Scale factor (default: {1}) + + Returns: + {tensor} -- Logcosh of the scaled error + """ + + def _logcosh(x): + return x + K.softplus(-2.0 * x) - K.log(2.0) + + def logcosh(y_true, y_pred): + return K.mean(_logcosh((y_pred - y_true) * scale), axis=-1) + + return logcosh + + +def scaled_huber(scale: float = 1.0, delta: float = 1.0): + """Scaled Huber loss + + Scaling is applied to the absolute error before hubering the data + + Keyword Arguments: + scale {float} -- Scale factor (default: {1}) + delta {float} -- Huber's delta parameter (default: {1}) + + Returns: + {tensor} -- Huber loss of the scaled error + """ + + def huber(y_true, y_pred): + return huber_loss(y_true * scale, y_pred * scale, delta=delta) + + return huber + + +def binary_crossentropy_numpy(y_true, y_pred): + output = np.clip(y_pred, eps, 1 - eps) + + return np.mean( + -(y_true * np.log(output) + (1 - y_true) * np.log(1 - output)), axis=-1 + ) + + +def get_loss(loss: str): + loss_parts = loss.split("-") + + if loss.startswith("smse") and len(loss_parts) > 1: + loss = scaled_mean_squared_error(float(loss_parts[1])) + + elif loss.startswith("smae") and len(loss_parts) > 1: + loss = scaled_mean_absolute_error(float(loss_parts[1])) + + elif loss.startswith("shuber") and len(loss_parts) > 2: + loss = scaled_huber(float(loss_parts[1]), float(loss_parts[2])) + + elif loss.startswith("slogcosh") and len(loss_parts) > 1: + loss = scaled_logcosh(float(loss_parts[1])) + + elif loss.startswith("bce"): + loss = "binary_crossentropy" + + return loss + diff --git a/experiments/models/dnase_w-12000_r-100.h5 b/experiments/models/dnase_w-12000_r-100.h5 new file mode 100644 index 0000000000000000000000000000000000000000..138bdc2636ca62899b4ec390f1074ba06c66a3d0 Binary files /dev/null and b/experiments/models/dnase_w-12000_r-100.h5 differ diff --git a/experiments/utils.py b/experiments/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..0dc7a11e38c4b728387bbd43d87615e6e3155c84 --- /dev/null +++ b/experiments/utils.py @@ -0,0 +1,1550 @@ +""" +Copyright 2018 Novartis Institutes for BioMedical Research Inc. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +""" + +import bbi +import h5py +import json +import math +import matplotlib.pyplot as plt +import numpy as np +import os +import seaborn as sns +import re +import sys +import time +import warnings + +from itertools import takewhile +from matplotlib.cm import copper +from typing import Tuple +from tqdm import tqdm, tqdm_notebook +from IPython.display import Image, display + +# Stupid Keras things is a smart way to always print. See: +# https://github.com/keras-team/keras/issues/1406 +stderr = sys.stderr +sys.stderr = open(os.devnull, "w") +from keras_tqdm import TQDMCallback, TQDMNotebookCallback +from keras import backend as K +from keras.layers import Input +from keras.models import Model, load_model + +sys.stderr = stderr + +from loss import get_loss + + +def train( + autoencoder, + train, + test, + epochs=50, + batch_size=256, + shuffle=True, + sample_weights=None, + verbose=1, +): + return autoencoder.fit( + train, + train, + epochs=epochs, + batch_size=batch_size, + shuffle=shuffle, + validation_data=(test, test), + sample_weight=sample_weights, + verbose=verbose, + ) + + +def predict(encoder, decoder, test, autoencoder=None, validator=None): + if autoencoder is not None: + encoded = None + decoded = autoencoder.predict(test.reshape(test.shape[0], test.shape[1], 1)) + else: + encoded = encoder.predict(test.reshape(test.shape[0], test.shape[1], 1)) + decoded = decoder.predict(encoded) + + loss = None + if validator is not None: + loss = K.eval( + validator( + K.variable(test.reshape(test.shape[0], test.shape[1])), + K.variable(decoded.reshape(decoded.shape[0], decoded.shape[1])), + ) + ) + + return decoded, loss, encoded + + +def lcp(l: list): + """Get the longest common prefix of a list of strings + + Arguments: + l {list} -- List of strings + """ + return "".join( + c[0] for c in takewhile(lambda x: all(x[0] == y for y in x), zip(*l)) + ) + + +def evaluate_model( + autoencoder, + data_test, + keras_metrics: list = [], + keras_metric_names: list = [], + numpy_metrics: list = [], + numpy_metric_names: list = [], + batch_size: int = 20480, + verbose: bool = False, +): + N = data_test.shape[0] + + if verbose: + print("Evaluate {} windows... ".format(N)) + + num_metrics = len(numpy_metrics) + len(keras_metrics) + loss = np.zeros((N, num_metrics)) + + for batch_start in np.arange(0, N, batch_size): + + if verbose: + print("Evaluate batch {}:{}".format(batch_start, batch_start + batch_size)) + + t0 = time.time() + batch = data_test[batch_start : batch_start + batch_size] + + if verbose: + print("Batch shape", batch.shape) + + batch_prediction = autoencoder.predict( + batch.reshape(batch.shape[0], batch.shape[1], 1) + ) + + if verbose: + print( + "Prediction of batch {}:{} took {} sec".format( + batch_start, batch_start + batch_size, time.time() - t0 + ) + ) + + if batch.ndim == 3: + batch = batch.squeeze(axis=2) + + if batch_prediction.ndim == 3: + batch_prediction = batch_prediction.squeeze(axis=2) + + batch_loss = np.zeros((batch.shape[0], num_metrics)) + + i = 0 + + if len(keras_metrics) > 0: + k_data = K.variable(batch) + k_pred = K.variable(batch_prediction) + + if verbose: + print("Evaluate {} keras metrics".format(len(keras_metrics))) + + t1 = time.time() + for metric in keras_metrics: + batch_loss[:, i] = K.eval(metric(k_data, k_pred)) + i += 1 + + if verbose and len(keras_metrics) > 0: + print( + "Computing the keras metrics of batch {}:{} took {} sec".format( + batch_start, batch_start + batch_size, time.time() - t1 + ) + ) + + if verbose: + print("Evaluate {} numpy metrics".format(len(numpy_metrics))) + + t1 = time.time() + + for metric in numpy_metrics: + batch_loss[:, i] = metric(batch, batch_prediction) + i += 1 + + if verbose and len(numpy_metrics) > 0: + print( + "Computing the numpy metrics of batch {}:{} took {} sec".format( + batch_start, batch_start + batch_size, time.time() - t1 + ) + ) + + loss[batch_start : batch_start + batch.shape[0]] = batch_loss + + if verbose: + print( + "Evaluation of batch {}:{} took {} sec".format( + batch_start, batch_start + batch_size, time.time() - t0 + ) + ) + + return loss + + +def predict_2d(encoder, decoder, test, validator=None): + encoded = encoder.predict(test) + decoded = decoder.predict(encoded) + decoded = decoded.reshape(decoded.shape[0], decoded.shape[1], decoded.shape[2]) + test = test.reshape(test.shape[0], test.shape[1], test.shape[2]) + + loss = None + if validator is not None: + loss = K.eval(validator(K.variable(test), K.variable(decoded))) + + return decoded, loss, encoded + + +def evaluate(autoencoder, test): + return autoencoder.evaluate(test) + + +def to_2d(data_1d, ydim, val_max=255, dtype=int): + data_1d_scaled = data_1d * ydim + + data_2d = np.zeros((data_1d.shape[0], data_1d.shape[1], ydim)).astype(dtype) + data_2d[:, :] = np.arange(ydim) + + end_full = np.floor(data_1d_scaled).astype(int) + end_half = np.ceil(data_1d_scaled - 1).astype(int) + half_ints = np.round( + ((data_1d_scaled) - np.floor(data_1d_scaled)) * val_max + ).astype(dtype) + half_ints[np.where(half_ints == 0)] = val_max + + full = np.where( + data_2d < end_full.reshape((end_full.shape[0], end_full.shape[1], 1)) + ) + half = np.where( + data_2d == end_half.reshape((end_half.shape[0], end_half.shape[1], 1)) + ) + rest = np.where( + data_2d > end_half.reshape((end_half.shape[0], end_half.shape[1], 1)) + ) + data_2d[full] = val_max + data_2d[half] = half_ints[np.where(end_half != -1)] + data_2d[rest] = 0 + data_2d = np.swapaxes(data_2d, 2, 1)[:, ::-1] + + return data_2d + + +def clamp(x): + return int(max(0, min(x * 255, 255))) + + +def rgba_to_hex(rgba): + return "#{0:02x}{1:02x}{2:02x}".format( + clamp(rgba[0]), clamp(rgba[1]), clamp(rgba[2]) + ) + + +def plt_bw(ground_truth, predicted, loss, rows, ymax=None): + """Plot windows and color encode by loss""" + + if ymax is None: + ymax = np.max(ground_truth[rows]) + + lossmax = np.max(loss[rows]) + bg = "#ffffff" + n = rows.size + + plt.figure(figsize=(20, n * 2)) + for i, k in enumerate(rows): + # display original + ax = plt.subplot(n * 2, 1, i * 2 + 1) + ax.set_facecolor("#888888") + plt.bar(np.arange(ground_truth[k].size), ground_truth[k], color=bg) + plt.ylim(0, ymax) + ax.get_xaxis().set_visible(False) + + c = rgba_to_hex(copper((lossmax - loss[k]) / lossmax)) + + # display reconstruction + ax = plt.subplot(n * 2, 1, i * 2 + 2) + ax.set_facecolor(c) + plt.bar(np.arange(predicted[k].size), predicted[k], color=bg) + plt.ylim(0, ymax) + ax.get_xaxis().set_visible(False) + plt.show() + + +def value_changes(arr): + """Get locations of value changes in a 2D numpy array + + Arguments: + arr {np.array} -- 2D numpy array + + Returns: + {np.array} -- Boolean 2D numpy array where {True} indicates a value + change from the current to the next value + """ + changes = np.zeros(arr.shape).astype(bool) + changes[:, :-1] = arr[:, :-1] != arr[:, 1:] + return changes + + +def count_peaks(arr): + """Count peaks in a Boolean 2D numpy array + + Arguments: + arr {np.array} -- 2D Boolean array where {1}s define intervals + + Returns: + {np.array} -- 1D array with the number of consecutive intervals + """ + changes = value_changes(arr) + num_peaks = np.sum(changes, axis=1) + num_peaks[np.where(arr[:, 0] == 1)] += 1 + num_peaks[np.where(arr[:, -1] == 1)] += 1 + return num_peaks // 2 + + +def peak_heights(intervals, values, num_peaks, aggregator): + n, k = intervals.shape + + heights = np.zeros((n, np.max(num_peaks.astype(int)))) + heights[:] = np.nan + + for i in range(n): + changes = intervals[i, :-1] != intervals[i, 1:] + indices = np.append(-1, np.append(np.where(changes), k - 1)) + c = 0 + for j in range(indices.size - 1): + val_idx = indices[j] + 1 + if intervals[i, val_idx] == 1: + heights[i, c] = np.max(values[i, val_idx : indices[(j + 1)] + 1]) + c += 1 + + return aggregator(heights, axis=1) + + +def rle(arr): + changes = arr[:-1] != arr[1:] + indices = np.append(-1, np.append(np.where(changes), arr.size - 1)) + return np.diff(indices) + + +def peak_widths(arr, aggregator): + widths = np.zeros((arr.shape[0],)) + + c = 0 + for i in range(arr.shape[0]): + window_widths = rle(arr[i]) + if arr[i, 0] == 0: + if window_widths.size < 2: + widths[c] = np.nan + else: + widths[c] = aggregator(window_widths[1::2]) + else: + widths[c] = aggregator(window_widths[::2]) + + c += 1 + + return widths + + +def peak_distances(arr, aggregator): + dists = np.zeros((arr.shape[0],)) + + c = 0 + for i in range(arr.shape[0]): + window_widths = rle(arr[i]) + + if arr[i, 0] == 0: + window_widths = window_widths[::2] + window_widths = window_widths[1:] + else: + window_widths = window_widths[1::2] + + if arr[i, -1] == 0: + window_widths = window_widths[:-1] + + if window_widths.size == 0: + dists[c] = np.nan + else: + dists[c] = aggregator(window_widths) + + c += 1 + + return dists + + +def get_stats(bigwig, bigbed, norm_vals, window_size, step_size, aggregation, chrom): + base_bins = math.ceil(window_size / aggregation) + + if chrom not in bbi.chromsizes(bigwig): + print( + "Skipping chrom (not in bigWig file):", chrom, bbi.chromsizes(bigwig)[chrom] + ) + return None + + chrom_size = bbi.chromsizes(bigwig)[chrom] + + intervals = np.zeros((math.ceil((chrom_size - step_size) / step_size), base_bins)) + starts = np.arange(0, chrom_size - step_size, step_size) + ends = np.append(np.arange(window_size, chrom_size, step_size), chrom_size) + bins = window_size / aggregation + + # Extract all but the last window in one fashion (faster than `fetch` + # with loops) + intervals[:-1] = bbi.stackup( + bigbed, [chrom] * (starts.size - 1), starts[:-1], ends[:-1], bins=bins + ) + + final_bins = math.ceil((ends[-1] - starts[-1]) / aggregation) + # Extract the last window separately because it's size is likely to be + # different from the others + intervals[-1, :final_bins] = bbi.fetch( + bigbed, chrom, starts[-1], ends[-1], bins=final_bins, missing=0.0 + ) + + intervals = np.round(intervals).astype(int) + + # 0. Number of intevals + # 1. Min width of peaks + # 2. Max width of peaks + # 3. Median width of peaks + # 4. Min distance of peaks + # 5. Max distance pf peaks + # 6. Median distance of peaks + # 7. Sum of height of peaks + # 8. Max height of peaks + # 9. Median height of peaks + # 10. Median signal + # 11. Total signal + # 12. Peak coverage + stats = np.zeros((norm_vals.shape[0], 13)) + + stats[:, 0] = count_peaks(intervals) + + stats[:, 1] = peak_widths(intervals, np.min) + stats[:, 2] = peak_widths(intervals, np.max) + stats[:, 3] = peak_widths(intervals, np.median) + + stats[:, 4] = peak_distances(intervals, np.min) + stats[:, 5] = peak_distances(intervals, np.max) + stats[:, 6] = peak_distances(intervals, np.median) + + stats[:, 7] = peak_heights(intervals, norm_vals, stats[:, 0], np.nansum) + stats[:, 8] = peak_heights(intervals, norm_vals, stats[:, 0], np.nanmax) + stats[:, 9] = peak_heights(intervals, norm_vals, stats[:, 0], np.nanmedian) + + stats[:, 10] = np.median(norm_vals, axis=1) + stats[:, 11] = np.sum(norm_vals, axis=1) + stats[:, 12] = peak_widths(intervals, np.sum) / base_bins + + return stats, np.round(intervals).astype(int) + + +def chunk_beds_binary( + bigBed: str, + window_size: int, + step_size: int, + chroms: list, + verbose: bool = True, + print_per_chrom: callable = None, +) -> np.ndarray: + """Chunk a bed file of binary annotations into windows + + Extract a single boolean value for genomic windows representing whether a bed + annotation is present or now. This is for example useful to quickly determine if a + window contains a peak annotation or not. If you need to know about the actual value + of the annotation you might need a more involved method. + + Arguments: + bigBed {str} -- path to the bigBed file + window_size {int} -- size of the genomic windows in base pairs + step_size {int} -- size of the steps in base pairs + chroms {list} -- list of chromosomes from which windows should be extracted + + Keyword Arguments: + verbose {bool} -- if ``True`` print some stuff (default: {True}) + print_per_chrom {callable} -- if ``True`` print stuff per iteration (default: {None}) + + Returns: + {np.ndarray} -- a 1D array indicating which windows contain at least one annotations + """ + base_bins = 1 + num_total_windows = 0 + + chrom_sizes = bbi.chromsizes(bigBed) + step_freq = int(window_size / step_size) + + for chrom in chroms: + chrom_size = chrom_sizes[chrom] + num_total_windows += ( + np.ceil((chrom_size - window_size) / step_size).astype(int) + 1 + ) + + values = np.zeros((num_total_windows, base_bins)) + + start = 0 + for chrom in chroms: + if chrom not in chrom_sizes: + print("Skipping chrom (not in bigBed file):", chrom, chrom_sizes[chrom]) + continue + + chrom_size = chrom_sizes[chrom] + bins = np.ceil(chrom_size / window_size).astype(int) + num_windows = np.ceil((chrom_size - window_size) / step_size).astype(int) + 1 + + start_pos = np.arange(0, step_size * step_freq, step_size) + end_pos = np.arange( + bins * window_size, bins * window_size + step_size * step_freq, step_size + ) + + end = start + num_windows + + tmp = ( + np.transpose( + bbi.stackup( + bigBed, + [chrom] * start_pos.size, + start_pos, + end_pos, + bins=bins, + missing=0, + ) + ) + .reshape((bins * step_freq, base_bins)) + .astype(int) + ) + + values[start:end] = tmp[0:num_windows] + + if verbose and not print_per_chrom: + print( + "Extracted", + "{} windows".format(num_windows), + "from {}".format(chrom), + "with a max value of {}.".format(np.max(values[start:end])), + ) + + if print_per_chrom: + print_per_chrom() + + start = end + + return values.astype(int) + + +def filter_windows_by_peaks( + signal: np.ndarray, + narrow_peaks: np.ndarray, + broad_peaks: np.ndarray, + incl_pctl_total_signal: float = 25, + incl_pct_no_signal: float = 5, + peak_ratio: float = 1.0, + verbose: bool = False, +) -> np.ndarray: + """Filter windows by peak annotations and their total signal + + This method filters windows based on whether they contain at least 1 narrow or broad + peak annotation or whether their total signal is equal or greater than a certain + percentile of the averaged total signal of windows containing a peak annotation. The + goal of this method is to balance the datasets such that roughly half of the windows + contain some signal or patterns that is worth to be learned. + + Arguments: + signal {np.ndarray} -- 2D array with the windows' signal + narrow_peaks {np.ndarray} -- 1D array specifying whether a window contains a + narrow peak annotation + broad_peaks {np.ndarray} -- 1D array specifying whether a window contains a + broad peak annotation + + Keyword Arguments: + incl_pctl_total_signal {float} -- percentile of the averaged total signal of + windows containing some peak annotation that should determine if a window + without a peak annotation is included or filtered out (default: {25}) + incl_pct_no_signal {float} -- percent of empty window that should remain and not + be filtered out (default: {5}) + peak_ratio {float} -- ratio of windows having a peak annotation vs windows + having no peak annotation (default: {1}) + verbose {bool} -- if ``True`` print some more stuff (default: {False}) + + Returns: + {np.ndarray} -- 1D Boolean array for selected the remaining windows + """ + win_with_narrow_or_broad_peaks = (narrow_peaks + broad_peaks).flatten() + + # Total signal per window + win_total_signal = np.sum(signal, axis=1) + + has_peaks = win_with_narrow_or_broad_peaks > 0 + + # Select all windows where the total signal is at least 25 percentile + # of the windows containing at least 1 peak. + win_total_signal_gt_pctl = win_total_signal > np.percentile( + win_total_signal[has_peaks], incl_pctl_total_signal + ) + win_total_signal_is_zero = win_total_signal == 0 + + num_total_win = signal.shape[0] + + pos_win = has_peaks | win_total_signal_gt_pctl + pos_win_idx = np.arange(num_total_win)[pos_win] + neg_not_empty_win = ~pos_win & ~win_total_signal_is_zero + neg_not_empty_win_idx = np.arange(num_total_win)[neg_not_empty_win] + neg_empty_win = ~pos_win & win_total_signal_is_zero + neg_empty_win_idx = np.arange(num_total_win)[neg_empty_win] + + if verbose: + print( + "Windows: total = {} | with peaks = {} | with signal gt {} pctl = {}".format( + num_total_win, + np.sum(has_peaks), + incl_pctl_total_signal, + np.sum(win_total_signal_gt_pctl), + ) + ) + + pct_not_empty = 1 - (incl_pct_no_signal / 100) + + # The total number of windows as a factor of the number of windows with peaks. + # number of total windows = number of windows with peaks * total_win_by_peaks + total_win_by_peaks = (1 / peak_ratio) + 1 + + to_be_sampled = np.min( + [ + # Do not sample more than the complete number of negative but non-empty + # windows + np.max([0, np.sum(neg_not_empty_win)]), + np.max( + [ + # Sample at most half as many windows as windows with peak + # annotations. This is only necessary when there are few windows + # with annotated peaks but a lot of windows where the total signal + # is larger than 25-percentile of the total signal of windows with + # peaks + np.sum(has_peaks) * 0.5, + np.min( + [ + total_win_by_peaks * np.sum(has_peaks) - np.sum(pos_win), + np.sum(~pos_win), + ] + ), + ] + ), + ] + ).astype(int) + to_be_sampled_not_empty = np.ceil(to_be_sampled * pct_not_empty).astype(int) + to_be_sampled_empty = to_be_sampled - to_be_sampled_not_empty + + neg_not_empty_win_no_subsample = np.random.choice( + neg_not_empty_win_idx, to_be_sampled_not_empty, replace=False + ) + + neg_empty_win_no_subsample = np.random.choice( + neg_empty_win_idx, to_be_sampled_empty, replace=False + ) + + return np.sort( + np.concatenate( + (pos_win_idx, neg_not_empty_win_no_subsample, neg_empty_win_no_subsample) + ) + ) + + +def split_train_dev_test( + data: np.ndarray, + peaks: np.ndarray, + dev_set_size: float, + test_set_size: float, + rnd_seed: int, + verbose: bool = False, +) -> Tuple[np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray, np.ndarray]: + """Split data into train, dev, and test set + + Arguments: + data {np.ndarray} -- 2D array with the data to be split by rows + peaks {np.ndarray} -- 1D array with Boolean annotations for the rows that should + be split in the same manner as ``data`` + dev_set_size {float} -- percent of the rows of ``data`` that should be used for + development + test_set_size {float} -- percent of the rows of ``data`` that should be used for + testing + rnd_seed {int} -- np.random seed. needed to ensure reproducibility + + Keyword Arguments: + verbose {bool} -- if ``True`` print some more stuff (default: {False}) + """ + assert data.shape[0] + + total_num_filtered_windows = data.shape[0] + shuffling = np.arange(total_num_filtered_windows) + + # Shuffle window ids and use the shuffled ids to shuffle the window data and window peaks + np.random.seed(rnd_seed) + np.random.shuffle(shuffling) + data_shuffled = data[shuffling] + peaks_shuffled = peaks[shuffling] + + # Split into train, dev, and test set + split_1 = int((1.0 - dev_set_size - test_set_size) * total_num_filtered_windows) + split_2 = int((1.0 - test_set_size) * total_num_filtered_windows) + + data_train = data_shuffled[:split_1] + peaks_train = peaks_shuffled[:split_1] + data_dev = data_shuffled[split_1:split_2] + peaks_dev = peaks_shuffled[split_1:split_2] + data_test = data_shuffled[split_2:] + peaks_test = peaks_shuffled[split_2:] + + if verbose: + print( + "Train: {} (with {:.2f}% peaks) Dev: {} (with {:.2f}% peaks) Test: {} (with {:.2f}% peaks)".format( + data_train.shape[0], + np.sum(peaks_train) / peaks_train.shape[0] * 100, + data_dev.shape[0], + np.sum(peaks_dev) / peaks_dev.shape[0] * 100, + data_test.shape[0], + np.sum(peaks_test) / peaks_test.shape[0] * 100, + ) + ) + + return ( + data_train, + peaks_train, + data_dev, + peaks_dev, + data_test, + peaks_test, + shuffling, + ) + + +# To make model names more concise but still meaningful +abbr = { + "conv_filters": "cf", + "conv_kernels": "ck", + "dense_units": "du", + "dropouts": "do", + "embedding": "e", + "reg_lambda": "rl", + "optimizer": "o", + "learning_rate": "lr", + "learning_rate_decay": "lrd", + "loss": "l", + "metrics": "m", + "binary_crossentropy": "bce", + "batch_norm": "bn", + "batch_norm_input": "bni", + "peak_weight": "pw", + "signal_weighting": "sw", + "signal_weighting_zero_point_percentage": "swz", +} + + +def namify(definition): + def to_str(value): + if isinstance(value, bool): + return str(int(value)) + else: + return str(value) + + name = "" + for i, key in enumerate(definition): + value = definition[key] + key = abbr[key] if key in abbr else key + name += "--" + key + "-" if i > 0 else key + "-" + if isinstance(value, list): + name += "-".join([to_str(v) for v in value]) + else: + name += str(abbr[value]) if value in abbr else to_str(value) + return name + + +def is_ipynb(): + try: + shell = get_ipython().__class__.__name__ + if shell == "ZMQInteractiveShell": + return True # Jupyter notebook or qtconsole + elif shell == "TerminalInteractiveShell": + return False # Terminal running IPython + else: + return False # Other type (?) + except NameError: + return False # Probably standard Python interpreter + + +def get_tqdm(is_keras: bool = False): + # Determine which tqdm to use + if is_ipynb(): + if is_keras: + return + else: + return tqdm_notebook + else: + if is_keras: + return TQDMCallback + else: + return tqdm + + +def get_models(ae_filepath: str, loss_fn: str = None, silent: bool = True): + """Get encoder, decoder, and autoencoder from stored file + + This method loads the autoencoder model and creates the related encoder and decoder + models. + + Arguments: + ae_filepath {str} -- Path to the stored autoencoder model + + Keyword Arguments: + silent {bool} -- If {True} Keras warnings from {load_model} are silenced. (default: {True}) + + Returns: + {tuple} -- Tuple with encoder, decoder, autoencoder models + """ + # Since Keras does not store custom loss functions we have to first determine which + # loss function we've used for training to pass that into load_model() + regex = r"--l-(([a-z0-9]+\-?)+)--" + matches = re.search(regex, ae_filepath) + + loss = None + custom_objects = {} + if matches is not None: + loss = matches.group(1) + loss = get_loss(matches.group(1)) + if hasattr(loss, "__name__"): + custom_objects = {loss.__name__: loss} + elif loss_fn is not None: + loss = get_loss(loss_fn) + if hasattr(loss, "__name__"): + custom_objects = {loss.__name__: loss} + else: + print("Could not determine loss function") + return None, None, None + + if silent: + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + autoencoder = load_model(ae_filepath, custom_objects=custom_objects) + else: + autoencoder = load_model(ae_filepath, custom_objects=custom_objects) + + # Find embedding layer + embedding_layer = None + embedding_layer_idx = None + for i, layer in enumerate(autoencoder.layers): + if layer.name == "embed": + embedding_layer = layer + embedding_layer_idx = i + + # Create encoder + inputs = autoencoder.input + encoded = inputs + for i in range(1, embedding_layer_idx + 1): + encoded = autoencoder.layers[i](encoded) + + encoder = Model(inputs, encoded) + + embedding = embedding_layer.output_shape[1] + + encoded_input = Input(shape=(embedding,), name="input") + decoded_input = encoded_input + for i in range(embedding_layer_idx + 1, len(autoencoder.layers)): + decoded_input = autoencoder.layers[i](decoded_input) + decoder = Model(encoded_input, decoded_input) + + return encoder, decoder, autoencoder + + +def plot_total_signal(dataset: str, base: str = "."): + """Plot total signal of the train, dev, and test set + + Arguments: + dataset {str} -- Name of the dataset + + Keyword Arguments: + base {str} -- Path to the base directory (default: {"."}) + """ + with h5py.File(os.path.join(base, "data", "{}.h5".format(dataset)), "r") as f: + total_signal_train = np.sum(f["data_train"], axis=1) + total_signal_dev = np.sum(f["data_dev"], axis=1) + total_signal_test = np.sum(f["data_test"], axis=1) + + num_win = f["data_train"].shape[0] + num_empty_win = np.sum(total_signal_train == 0) + + print( + "{} ({:.2f}%) out of {} windows are empty".format( + num_empty_win, num_empty_win / num_win * 100, num_win + ) + ) + + fig = plt.figure(figsize=(12, 4)) + sns.distplot(total_signal_train, bins=np.arange(40), label="Train") + sns.distplot(total_signal_dev, bins=np.arange(40), label="Dev") + sns.distplot(total_signal_test, bins=np.arange(40), label="Test") + plt.xlabel("Total signal per window") + fig.legend() + + +def plot_windows( + dataset: str, + model_name: str = None, + ds_type: str = "train", + with_peaks: bool = True, + window_ids: list = None, + num: int = 10, + min_signal: float = 0, + max_signal: float = math.inf, + base: str = ".", + save_as: str = None, + trained_on_single_dataset: bool = False, + silent: bool = False, + repetition: str = None, + custom_postfix: str = None, + batch_size: int = 10240, + no_legend: bool = False, + no_peak_coloring: bool = False, + no_title: bool = False, + plot_reconst_separately: bool = False, + diff: bool = False, + re_trained: bool = False, + re_trained_postfix: str = "re-trained", +): + with h5py.File(os.path.join(base, "data", "{}.h5".format(dataset)), "r") as f: + data_type = "data_{}".format(ds_type) + peaks_type = "peaks_{}".format(ds_type) + + if data_type not in f or peaks_type not in f: + sys.stderr.write("Dataset type not available: {}\n".format(ds_type)) + return + + N, L, _ = f[data_type].shape + total_signal = None + + if window_ids is not None: + selected_window_ids = np.array(window_ids) + else: + for batch_start in np.arange(0, N, batch_size): + batch_data = np.squeeze( + f[data_type][batch_start : batch_start + batch_size], axis=2 + ) + + batch_total_signal = np.sum(batch_data, axis=1) + + if total_signal is None: + total_signal = batch_total_signal + else: + total_signal = np.concatenate((total_signal, batch_total_signal)) + + gt_min_signal = total_signal > min_signal + st_max_signal = total_signal < max_signal + + num_windows_to_be_sampled = np.sum(gt_min_signal & st_max_signal) + + choices = np.random.choice(num_windows_to_be_sampled, num, replace=False) + + selected_window_ids = np.arange(N)[gt_min_signal & st_max_signal][choices] + + sampled_wins = np.zeros((selected_window_ids.shape[0], L, 1)) + sampled_peaks = np.zeros(selected_window_ids.shape[0]) + + for i, idx in enumerate(selected_window_ids): + sampled_wins[i] = f[data_type][idx] + sampled_peaks[i] = f[peaks_type][idx] + + sampled_wins = sampled_wins.squeeze(axis=2) + + if model_name: + postfix = "-{}".format(dataset) if trained_on_single_dataset else "" + + if repetition is not None: + postfix = "{}__{}".format(postfix, repetition) + + if custom_postfix is not None: + postfix = "{}-{}".format(postfix, custom_postfix) + + if re_trained: + postfix = "{}-{}".format(postfix, re_trained_postfix) + + autoencoder_filepath = os.path.join( + base, "models", "{}---autoencoder{}.h5".format(model_name, postfix) + ) + + if silent: + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + autoencoder = load_model(autoencoder_filepath) + else: + autoencoder = load_model(autoencoder_filepath) + + sampled_encodings = autoencoder.predict( + sampled_wins.reshape(sampled_wins.shape[0], sampled_wins.shape[1], 1) + ) + sampled_encodings = sampled_encodings.squeeze(axis=2) + + real_num = sampled_wins.shape[0] + + cols = max(math.floor(math.sqrt(real_num) * 3 / 5), 1) + rows = math.ceil(real_num / cols) + + x = np.arange(L) + + if plot_reconst_separately: + if diff: + fig, axes = plt.subplots( + (rows * 4) - 1, + cols, + figsize=(6 * cols, 3 * rows), + sharex=True, + gridspec_kw=dict( + height_ratios=([1,1,1,0.6] * (rows - 1) + [1,1,1]), + wspace=0.2, + hspace=0 + ) + ) + else: + fig, axes = plt.subplots( + (rows * 3) - 1, + cols, + figsize=(6 * cols, 2 * rows), + sharex=True, + gridspec_kw=dict( + height_ratios=([1,1,0.75] * (rows - 1) + [1,1]), + wspace=0.2, + hspace=0 + ) + ) + else: + fig, axes = plt.subplots( + rows, + cols, + figsize=(6 * cols, 2 * rows), + sharex=True, + gridspec_kw=dict(wspace=0.2, hspace=0.75), + ) + + fig.patch.set_facecolor("white") + + from matplotlib.patches import Patch + + legend_elements = [ + Patch(facecolor="gray", label="Ground truth"), + Patch(facecolor="mediumblue", label="Prediction"), + Patch(facecolor="green", label="Prediction (w/ peak annotation)"), + ] + + def get_axis(r, c): + if axes.ndim == 1: + return axes[r] + return axes[r, c] + + i = 0 + for c in np.arange(cols): + for r in np.arange(rows): + if i >= real_num: + break + + primary_color = "green" if sampled_peaks[i] == 1 else "mediumblue" + secondary_color = "gray" + + if no_peak_coloring: + primary_color = "#0E689D" + + ground_truth_color = secondary_color if model_name else primary_color + prediction_color = primary_color + + if plot_reconst_separately: + if diff: + axis = get_axis(r * 4, c) + axis.bar(x, sampled_wins[i], width=1.0, color="#000000") + axis.spines["top"].set_color("silver") + axis.spines["right"].set_color("silver") + axis.spines["bottom"].set_color("silver") + axis.spines["left"].set_color("silver") + axis.set_ylim(0, 1) + axis.set_xticks([], []) + axis.set_yticks([], []) + if not no_title: + axis.set_title(selected_window_ids[i]) + + axis = get_axis(r * 4 + 1, c) + axis.bar(x, sampled_encodings[i], width=1.0, color="#0E689D") + axis.spines["top"].set_color("silver") + axis.spines["right"].set_color("silver") + axis.spines["bottom"].set_color("silver") + axis.spines["left"].set_color("silver") + axis.set_ylim(0, 1) + axis.set_xticks([], []) + axis.set_yticks([], []) + + axis = get_axis(r * 4 + 2, c) + sampled_win_min_vales = np.minimum(sampled_wins[i], sampled_encodings[i]) + axis.bar(x, sampled_wins[i], width=1.0, color="#0E689D") + axis.bar(x, sampled_encodings[i], width=1.0, color="#cc168c") + axis.bar(x, sampled_win_min_vales, width=1.0, color="#ffffff") + axis.spines["top"].set_color("silver") + axis.spines["right"].set_color("silver") + axis.spines["bottom"].set_color("silver") + axis.spines["left"].set_color("silver") + axis.set_ylim(0, 1) + axis.set_xticks([], []) + axis.set_yticks([], []) + + if r < rows - 1: + axis = get_axis(r * 4 + 3, c) + axis.spines["top"].set_color("silver") + axis.spines["right"].set_visible(False) + axis.spines["bottom"].set_visible(False) + axis.spines["left"].set_visible(False) + axis.set_xticks([], []) + axis.set_yticks([], []) + + else: + axis = get_axis(r * 3, c) + axis.bar(x, sampled_wins[i], width=1.0, color="#000000") + axis.spines["top"].set_color("silver") + axis.spines["right"].set_color("silver") + axis.spines["bottom"].set_color("silver") + axis.spines["left"].set_color("silver") + axis.set_ylim(0, 1) + axis.set_xticks([], []) + axis.set_yticks([], []) + if not no_title: + axis.set_title(selected_window_ids[i]) + + axis = get_axis(r * 3 + 1, c) + axis.bar(x, sampled_encodings[i], width=1.0, color="#0E689D") + axis.spines["top"].set_color("silver") + axis.spines["right"].set_color("silver") + axis.spines["bottom"].set_color("silver") + axis.spines["left"].set_color("silver") + axis.set_ylim(0, 1) + axis.set_xticks([], []) + axis.set_yticks([], []) + + if r < rows - 1: + axis = get_axis(r * 3 + 2, c) + axis.spines["top"].set_color("silver") + axis.spines["right"].set_visible(False) + axis.spines["bottom"].set_visible(False) + axis.spines["left"].set_visible(False) + axis.set_xticks([], []) + axis.set_yticks([], []) + + else: + axis = get_axis(r, c) + + if diff and model_name: + sampled_win_min_vales = np.minimum( + sampled_wins[i], + sampled_encodings[i], + ) + axis.bar(x, sampled_wins[i], width=1.0, color="#0f5d92") + axis.bar(x, sampled_encodings[i], width=1.0, color="#cc168c") + axis.bar(x, sampled_win_min_vales, width=1.0, color="#ffffff") + else: + axis.bar(x, sampled_wins[i], width=1.0, color=ground_truth_color) + if model_name: + axis.bar( + x, + sampled_encodings[i], + width=1.0, + color=prediction_color, + alpha=0.5, + ) + axis.set_xticks(x[5::10]) + axis.set_xticklabels(x[5::10]) + + axis.spines["top"].set_color("silver") + axis.spines["right"].set_color("silver") + axis.spines["bottom"].set_color("silver") + axis.spines["left"].set_color("silver" if no_peak_coloring else primary_color) + axis.spines["left"].set_linewidth(1 if no_peak_coloring else 4) + axis.tick_params(axis="x", colors=secondary_color) + axis.tick_params(axis="y", colors=secondary_color) + axis.set_ylim(0, 1) + if not no_title: + axis.set_title(selected_window_ids[i]) + axis.set_xticks([], []) + axis.set_yticks([], []) + + if plot_reconst_separately: + axis = get_axis(r * 3, c) + axis.bar(x, sampled_wins[i], width=1.0, color="#000000") + axis.spines["top"].set_color("silver") + axis.spines["right"].set_color("silver") + axis.spines["bottom"].set_color("silver") + axis.spines["left"].set_color("silver") + axis.set_ylim(0, 1) + axis.set_xticks([], []) + axis.set_yticks([], []) + if not no_title: + axis.set_title(selected_window_ids[i]) + + axis = get_axis(r * 3 + 1, c) + axis.bar(x, sampled_encodings[i], width=1.0, color="#0E689D") + axis.spines["top"].set_color("silver") + axis.spines["right"].set_color("silver") + axis.spines["bottom"].set_color("silver") + axis.spines["left"].set_color("silver") + axis.set_ylim(0, 1) + axis.set_xticks([], []) + axis.set_yticks([], []) + + if r < rows - 1: + axis = get_axis(r * 3 + 2, c) + axis.spines["top"].set_color("silver") + axis.spines["right"].set_visible(False) + axis.spines["bottom"].set_visible(False) + axis.spines["left"].set_visible(False) + axis.set_xticks([], []) + axis.set_yticks([], []) + + else: + axis = get_axis(r, c) + + if diff and model_name: + sampled_win_min_vales = np.minimum( + sampled_wins[i], sampled_encodings[i] + ) + axis.bar(x, sampled_wins[i], width=1.0, color="#0f5d92") + axis.bar(x, sampled_encodings[i], width=1.0, color="#cc168c") + axis.bar(x, sampled_win_min_vales, width=1.0, color="#ffffff") + else: + axis.bar( + x, sampled_wins[i], width=1.0, color=ground_truth_color + ) + if model_name: + axis.bar( + x, + sampled_encodings[i], + width=1.0, + color=prediction_color, + alpha=0.5, + ) + axis.set_xticks(x[5::10]) + axis.set_xticklabels(x[5::10]) + + axis.spines["top"].set_color("silver") + axis.spines["right"].set_color("silver") + axis.spines["bottom"].set_color("silver") + axis.spines["left"].set_color( + "silver" if no_peak_coloring else primary_color + ) + axis.spines["left"].set_linewidth(1 if no_peak_coloring else 4) + axis.tick_params(axis="x", colors=secondary_color) + axis.tick_params(axis="y", colors=secondary_color) + axis.set_ylim(0, 1) + if not no_title: + axis.set_title(selected_window_ids[i]) + axis.set_xticks([], []) + axis.set_yticks([], []) + + i += 1 + + if not no_legend: + fig.legend(handles=legend_elements, loc="lower center") + + fig.tight_layout() + + if save_as is not None: + fig.savefig(os.path.join(base, save_as), bbox_inches="tight") + + return ( + # Window indices + selected_window_ids, + # Total signal of the windows + np.sum(sampled_wins, axis=1), + # Max signal in the window + np.max(sampled_wins, axis=1), + ) + + +def plot_windows_from_data( + data, + min_signal: float = 0, + max_signal: float = math.inf, + num: int = 10, + window_ids: list = None, + predictions: np.ndarray = None, + plot_pred_separately: bool = False, + diff: bool = False, + no_title: bool = False, + save_as: str = None, +): + if window_ids is not None: + num = len(window_ids) + sampled_wins = data[window_ids] + if predictions is not None: + sampled_wins_pred = predictions[window_ids] + sampled_window_idx = window_ids + else: + total_signal = np.sum(data, axis=1) + + gt_min_signal = total_signal > min_signal + st_max_signal = total_signal < max_signal + + num_windows_to_be_sampled = np.sum(gt_min_signal & st_max_signal) + + choices = np.random.choice(num_windows_to_be_sampled, num, replace=False) + + sampled_wins = data[gt_min_signal & st_max_signal][choices] + if predictions is not None: + sampled_wins_pred = predictions[gt_min_signal & st_max_signal][choices] + + sampled_window_idx = np.arange(data.shape[0])[gt_min_signal & st_max_signal][ + choices + ] + + cols = max(math.floor(math.sqrt(num) * 3 / 5), 1) + rows = math.ceil(num / cols) + + x = np.arange(data.shape[1]) + + if plot_pred_separately: + if diff: + fig, axes = plt.subplots( + (rows * 4) - 1, + cols, + figsize=(6 * cols, 3 * rows), + sharex=True, + gridspec_kw=dict( + height_ratios=([1,1,1,0.6] * (rows - 1) + [1,1,1]), + wspace=0.2, + hspace=0 + ) + ) + else: + fig, axes = plt.subplots( + (rows * 3) - 1, + cols, + figsize=(6 * cols, 2 * rows), + sharex=True, + gridspec_kw=dict( + height_ratios=([1,1,0.75] * (rows - 1) + [1,1]), + wspace=0.2, + hspace=0 + ) + ) + else: + fig, axes = plt.subplots( + rows, + cols, + figsize=(8 * cols, 1.25 * rows), + sharex=True, + gridspec_kw=dict(wspace=0.2, hspace=0.75), + ) + + fig.patch.set_facecolor("white") + + def get_axis(r, c): + if axes.ndim == 1: + return axes[r] + return axes[r, c] + + i = 0 + for c in np.arange(cols): + for r in np.arange(rows): + if i >= num: + break + + if predictions is not None and plot_pred_separately: + if diff: + axis = get_axis(r * 4, c) + axis.bar(x, sampled_wins[i], width=1.0, color="#000000") + axis.spines["top"].set_color("silver") + axis.spines["right"].set_color("silver") + axis.spines["bottom"].set_color("silver") + axis.spines["left"].set_color("silver") + axis.set_ylim(0, 1) + axis.set_xticks([], []) + axis.set_yticks([], []) + if not no_title: + axis.set_title(selected_window_ids[i]) + + axis = get_axis(r * 4 + 1, c) + axis.bar(x, sampled_wins_pred[i], width=1.0, color="#0E689D") + axis.spines["top"].set_color("silver") + axis.spines["right"].set_color("silver") + axis.spines["bottom"].set_color("silver") + axis.spines["left"].set_color("silver") + axis.set_ylim(0, 1) + axis.set_xticks([], []) + axis.set_yticks([], []) + + axis = get_axis(r * 4 + 2, c) + sampled_win_min_vales = np.minimum(sampled_wins[i], sampled_wins_pred[i]) + axis.bar(x, sampled_wins[i], width=1.0, color="#0E689D") + axis.bar(x, sampled_wins_pred[i], width=1.0, color="#cc168c") + axis.bar(x, sampled_win_min_vales, width=1.0, color="#ffffff") + axis.spines["top"].set_color("silver") + axis.spines["right"].set_color("silver") + axis.spines["bottom"].set_color("silver") + axis.spines["left"].set_color("silver") + axis.set_ylim(0, 1) + axis.set_xticks([], []) + axis.set_yticks([], []) + + if r < rows - 1: + axis = get_axis(r * 4 + 3, c) + axis.spines["top"].set_color("silver") + axis.spines["right"].set_visible(False) + axis.spines["bottom"].set_visible(False) + axis.spines["left"].set_visible(False) + axis.set_xticks([], []) + axis.set_yticks([], []) + + else: + axis = get_axis(r * 3, c) + axis.bar(x, sampled_wins[i], width=1.0, color="#000000") + axis.spines["top"].set_color("silver") + axis.spines["right"].set_color("silver") + axis.spines["bottom"].set_color("silver") + axis.spines["left"].set_color("silver") + axis.set_ylim(0, 1) + axis.set_xticks([], []) + axis.set_yticks([], []) + if not no_title: + axis.set_title(selected_window_ids[i]) + + axis = get_axis(r * 3 + 1, c) + axis.bar(x, sampled_wins_pred[i], width=1.0, color="#0E689D") + axis.spines["top"].set_color("silver") + axis.spines["right"].set_color("silver") + axis.spines["bottom"].set_color("silver") + axis.spines["left"].set_color("silver") + axis.set_ylim(0, 1) + axis.set_xticks([], []) + axis.set_yticks([], []) + + if r < rows - 1: + axis = get_axis(r * 3 + 2, c) + axis.spines["top"].set_color("silver") + axis.spines["right"].set_visible(False) + axis.spines["bottom"].set_visible(False) + axis.spines["left"].set_visible(False) + axis.set_xticks([], []) + axis.set_yticks([], []) + + else: + axis = get_axis(r, c) + + if predictions is None: + axis.bar(x, sampled_wins[i], width=1.0, color="#0E689D") + else: + axis.bar(x, sampled_wins[i], width=1.0, color="#808080") + axis.bar(x, sampled_wins_pred[i], width=1.0, color="#0E689D", alpha=0.6) + axis.set_xticks(x[5::10]) + axis.set_xticklabels(x[5::10]) + + axis.spines["top"].set_color("silver") + axis.spines["right"].set_color("silver") + axis.spines["bottom"].set_color("silver") + axis.spines["left"].set_color("silver") + axis.tick_params(axis="x", colors="silver") + axis.tick_params(axis="y", colors="silver") + axis.set_ylim(0, 1) + if not no_title: + axis.set_title(sampled_window_idx[i]) + axis.set_xticks([], []) + axis.set_yticks([], []) + i += 1 + + fig.tight_layout() + + if save_as is not None: + fig.savefig(save_as, bbox_inches="tight") + + +def create_hdf5_dset(f, name, data, extendable: bool = False, dtype: str = None): + if dtype is not None: + try: + dtype = data.dtype + except AttributeError: + pass + + if name in f.keys(): + if extendable: + f[name].resize((f[name].shape[0] + data.shape[0]), axis=0) + f[name][-data.shape[0] :] = data + else: + # Overwrite existing dataset + del f[name] + f.create_dataset(name, data=data, dtype=dtype) + else: + if extendable: + maxshape = (None, *data.shape[1:]) + f.create_dataset(name, data=data, maxshape=maxshape, dtype=dtype) + else: + f.create_dataset(name, data=data, dtype=dtype) + + +def check_status( + name: str, + step: str, + model_name: str = None, + dataset: str = None, + base: str = ".", + show_loss: bool = False, + re_trained: bool = False, + re_trained_postfix: str = "re-trained", +): + if model_name is not None: + model_names = [model_name] + else: + with open(os.path.join(base, "definitions-{}.json".format(name)), "r") as f: + model_names = json.load(f) + + not_found = [] + outdated = [] + + for model_name in model_names: + try: + postfix = "-{}".format(dataset) if dataset is not None else "" + repetition = None + if len(model_name.split("__")) > 1: + parts = model_name.split("__") + model_name = parts[0] + repetition = parts[1] + postfix = "{}__{}".format(postfix, repetition) + if re_trained: + postfix = "{}-{}".format(postfix, re_trained_postfix) + filepath = os.path.join( + base, "models", "{}---{}{}.h5".format(model_name, step, postfix) + ) + with h5py.File(filepath, "r") as f: + try: + times = None + loss = None + val_loss = None + if step == "training": + times = f["times"][:] + loss = f["loss"][:] + val_loss = f["val_loss"][:] + elif step == "total_times": + times = f["total_times"][:] + times = times + loss = loss + val_loss = val_loss + except KeyError: + outdated.append(filepath) + continue + if show_loss: + filename = "{}---train-loss{}.png".format(model_name, postfix) + filepath = os.path.join(base, "models", filename) + print(filename) + print("Loss: {} Val loss: {}".format(np.mean(loss), np.mean(val_loss))) + display(Image(filename=filepath)) + except OSError: + not_found.append(filepath) + + return len(not_found) == 0, not_found, outdated + diff --git a/node_modules/.bin/csv2json b/node_modules/.bin/csv2json deleted file mode 120000 index e4f6bd03b48a631d35bae4cffce030ed1ca930eb..0000000000000000000000000000000000000000 --- a/node_modules/.bin/csv2json +++ /dev/null @@ -1 +0,0 @@ -../d3-dsv/bin/dsv2json \ No newline at end of file diff --git a/node_modules/.bin/csv2tsv b/node_modules/.bin/csv2tsv deleted file mode 120000 index 6104a9b785e09e1ccd0df4d6609ebf7d08ca5748..0000000000000000000000000000000000000000 --- a/node_modules/.bin/csv2tsv +++ /dev/null @@ -1 +0,0 @@ -../d3-dsv/bin/dsv2dsv \ No newline at end of file diff --git a/node_modules/.bin/dsv2dsv b/node_modules/.bin/dsv2dsv deleted file mode 120000 index 6104a9b785e09e1ccd0df4d6609ebf7d08ca5748..0000000000000000000000000000000000000000 --- a/node_modules/.bin/dsv2dsv +++ /dev/null @@ -1 +0,0 @@ -../d3-dsv/bin/dsv2dsv \ No newline at end of file diff --git a/node_modules/.bin/dsv2json b/node_modules/.bin/dsv2json deleted file mode 120000 index e4f6bd03b48a631d35bae4cffce030ed1ca930eb..0000000000000000000000000000000000000000 --- a/node_modules/.bin/dsv2json +++ /dev/null @@ -1 +0,0 @@ -../d3-dsv/bin/dsv2json \ No newline at end of file diff --git a/node_modules/.bin/json2csv b/node_modules/.bin/json2csv deleted file mode 120000 index a4e6866fe57f697afccb4e7f6282485a8d8cfcac..0000000000000000000000000000000000000000 --- a/node_modules/.bin/json2csv +++ /dev/null @@ -1 +0,0 @@ -../d3-dsv/bin/json2dsv \ No newline at end of file diff --git a/node_modules/.bin/json2dsv b/node_modules/.bin/json2dsv deleted file mode 120000 index a4e6866fe57f697afccb4e7f6282485a8d8cfcac..0000000000000000000000000000000000000000 --- a/node_modules/.bin/json2dsv +++ /dev/null @@ -1 +0,0 @@ -../d3-dsv/bin/json2dsv \ No newline at end of file diff --git a/node_modules/.bin/json2tsv b/node_modules/.bin/json2tsv deleted file mode 120000 index a4e6866fe57f697afccb4e7f6282485a8d8cfcac..0000000000000000000000000000000000000000 --- a/node_modules/.bin/json2tsv +++ /dev/null @@ -1 +0,0 @@ -../d3-dsv/bin/json2dsv \ No newline at end of file diff --git a/node_modules/.bin/tsv2csv b/node_modules/.bin/tsv2csv deleted file mode 120000 index 6104a9b785e09e1ccd0df4d6609ebf7d08ca5748..0000000000000000000000000000000000000000 --- a/node_modules/.bin/tsv2csv +++ /dev/null @@ -1 +0,0 @@ -../d3-dsv/bin/dsv2dsv \ No newline at end of file diff --git a/node_modules/.bin/tsv2json b/node_modules/.bin/tsv2json deleted file mode 120000 index e4f6bd03b48a631d35bae4cffce030ed1ca930eb..0000000000000000000000000000000000000000 --- a/node_modules/.bin/tsv2json +++ /dev/null @@ -1 +0,0 @@ -../d3-dsv/bin/dsv2json \ No newline at end of file diff --git a/node_modules/@types/d3-array/LICENSE b/node_modules/@types/d3-array/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-array/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-array/README.md b/node_modules/@types/d3-array/README.md deleted file mode 100644 index 3de9245b34c730c0269d08f7a3a0b5a46af68109..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-array/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-array` - -# Summary -This package contains type definitions for D3JS d3-array module (https://github.com/d3/d3-array). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-array/v1. - -### Additional Details - * Last updated: Tue, 13 Oct 2020 04:09:39 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [Tom Wanzek](https://github.com/tomwanzek), [denisname](https://github.com/denisname), [Hugues Stefanski](https://github.com/ledragon), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-array/index.d.ts b/node_modules/@types/d3-array/index.d.ts deleted file mode 100644 index 609f0e95d4740d4981d6290b21f8e85694c4c39c..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-array/index.d.ts +++ /dev/null @@ -1,548 +0,0 @@ -// Type definitions for D3JS d3-array module 1.2 -// Project: https://github.com/d3/d3-array -// Definitions by: Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// Tom Wanzek <https://github.com/tomwanzek> -// denisname <https://github.com/denisname> -// Hugues Stefanski <https://github.com/ledragon> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.2.1 - -// -------------------------------------------------------------------------- -// Shared Types and Interfaces -// -------------------------------------------------------------------------- - -/** - * Administrivia: JavaScript primitive types and Date - */ -export type Primitive = number | string | boolean | Date; - -/** - * Administrivia: anything with a valueOf(): number method is comparable, so we allow it in numeric operations - */ -export interface Numeric { - valueOf(): number; -} - -// -------------------------------------------------------------------------------------- -// Descriptive Statistics -// -------------------------------------------------------------------------------------- - -/** - * Return the maximum value in the array of strings using natural order. - */ -export function max(array: ArrayLike<string>): string | undefined; - -/** - * Return the maximum value in the array of numbers using natural order. - */ -export function max<T extends Numeric>(array: ArrayLike<T>): T | undefined; - -/** - * Return the maximum value in the array using natural order and a projection function to map values to strings. - */ -export function max<T>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => string | undefined | null): string | undefined; - -/** - * Return the maximum value in the array using natural order and a projection function to map values to easily-sorted values. - */ -export function max<T, U extends Numeric>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => U | undefined | null): U | undefined; - -/** - * Return the minimum value in the array using natural order. - */ -export function min(array: ArrayLike<string>): string | undefined; - -/** - * Return the minimum value in the array using natural order. - */ -export function min<T extends Numeric>(array: ArrayLike<T>): T | undefined; - -/** - * Return the minimum value in the array using natural order. - */ -export function min<T>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => string | undefined | null): string | undefined; - -/** - * Return the minimum value in the array using natural order. - */ -export function min<T, U extends Numeric>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => U | undefined | null): U | undefined; - -/** - * Return the min and max simultaneously. - */ -export function extent(array: ArrayLike<string>): [string, string] | [undefined, undefined]; - -/** - * Return the min and max simultaneously. - */ -export function extent<T extends Numeric>(array: ArrayLike<T>): [T, T] | [undefined, undefined]; - -/** - * Return the min and max simultaneously. - */ -export function extent<T>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => string | undefined | null): [string, string] | [undefined, undefined]; - -/** - * Return the min and max simultaneously. - */ -export function extent<T, U extends Numeric>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => U | undefined | null): [U, U] | [undefined, undefined]; - -/** - * Return the mean of an array of numbers - */ -export function mean<T extends Numeric>(array: ArrayLike<T | undefined | null>): number | undefined; - -/** - * Return the mean of an array of numbers - */ -export function mean<T>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => number | undefined | null): number | undefined; - -/** - * Return the median of an array of numbers - */ -export function median<T extends Numeric>(array: ArrayLike<T | undefined | null>): number | undefined; - -/** - * Return the median of an array of numbers - */ -export function median<T>(array: ArrayLike<T>, accessor: (element: T, i: number, array: ArrayLike<T>) => number | undefined | null): number | undefined; - -/** - * Returns the p-quantile of an array of numbers - */ -export function quantile<T extends Numeric>(array: ArrayLike<T | undefined | null>, p: number): number | undefined; - -export function quantile<T>(array: ArrayLike<T>, p: number, accessor: (element: T, i: number, array: ArrayLike<T>) => number | undefined | null): number | undefined; - -/** - * Compute the sum of an array of numbers. - */ -export function sum<T extends Numeric>(array: ArrayLike<T | undefined | null>): number; - -/** - * Compute the sum of an array, using the given accessor to convert values to numbers. - */ -export function sum<T>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => number | undefined | null): number; - -/** - * Compute the standard deviation, defined as the square root of the bias-corrected variance, of the given array of numbers. - */ -export function deviation<T extends Numeric>(array: ArrayLike<T | undefined | null>): number | undefined; - -/** - * Compute the standard deviation, defined as the square root of the bias-corrected variance, of the given array, - * using the given accessor to convert values to numbers. - */ -export function deviation<T>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => number | undefined | null): number | undefined; - -/** - * Compute an unbiased estimator of the population variance of the given array of numbers. - */ -export function variance<T extends Numeric>(array: ArrayLike<T | undefined | null>): number | undefined; - -/** - * Compute an unbiased estimator of the population variance of the given array, - * using the given accessor to convert values to numbers. - */ -export function variance<T>(array: ArrayLike<T>, accessor: (datum: T, index: number, array: ArrayLike<T>) => number | undefined | null): number | undefined; - -// -------------------------------------------------------------------------------------- -// Searching Arrays -// -------------------------------------------------------------------------------------- - -export function scan(array: ArrayLike<number>, comparator?: (a: number, b: number) => number): number | undefined; -export function scan<T>(array: ArrayLike<T>, comparator: (a: T, b: T) => number): number | undefined; - -export function bisectLeft(array: ArrayLike<number>, x: number, lo?: number, hi?: number): number; -export function bisectLeft(array: ArrayLike<string>, x: string, lo?: number, hi?: number): number; -export function bisectLeft(array: ArrayLike<Date>, x: Date, lo?: number, hi?: number): number; - -export function bisectRight(array: ArrayLike<number>, x: number, lo?: number, hi?: number): number; -export function bisectRight(array: ArrayLike<string>, x: string, lo?: number, hi?: number): number; -export function bisectRight(array: ArrayLike<Date>, x: Date, lo?: number, hi?: number): number; - -export const bisect: typeof bisectRight; - -export interface Bisector<T, U> { - left(array: ArrayLike<T>, x: U, lo?: number, hi?: number): number; - right(array: ArrayLike<T>, x: U, lo?: number, hi?: number): number; -} - -export function bisector<T, U>(comparator: (a: T, b: U) => number): Bisector<T, U>; -export function bisector<T, U>(accessor: (x: T) => U): Bisector<T, U>; - -/** - * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. - * - * @param array The array to partially sort (in place). - * @param k The middle index for partial sorting. - */ -export function quickselect<T>(array: ArrayLike<T>, k: number): T[]; - -/** - * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. - * - * @param array The array to partially sort (in place). - * @param k The middle index for partial sorting. - * @param left The left index of the range to sort. - */ -export function quickselect<T>(array: ArrayLike<T>, k: number, left: number): T[]; - -/** - * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. - * - * @param array The array to partially sort (in place). - * @param k The middle index for partial sorting. - * @param left The left index of the range to sort. - * @param right The right index. - */ -export function quickselect<T>(array: ArrayLike<T>, k: number, left: number, right: number): T[]; - -/** - * Rearranges items so that all items in the [left, k] are the smallest. The k-th element will have the (k - left + 1)-th smallest value in [left, right]. - * - * @param array The array to partially sort (in place). - * @param k The middle index for partial sorting. - * @param left The left index of the range to sort. - * @param right The right index. - * @param compare The compare function. - */ -export function quickselect<T>(array: ArrayLike<T>, k: number, left: number, right: number, compare: (a: Primitive | undefined, b: Primitive | undefined) => number): T[]; - -// NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances. -/** - * Compares two primitive values for sorting (in ascending order). - */ -export function ascending(a: Primitive | undefined, b: Primitive | undefined): number; - -// NB. this is limited to primitive values due to D3's use of the <, >, and >= operators. Results get weird for object instances. -/** - * Compares two primitive values for sorting (in ascending order). - */ -export function descending(a: Primitive | undefined, b: Primitive | undefined): number; - -// -------------------------------------------------------------------------------------- -// Transforming Arrays -// -------------------------------------------------------------------------------------- - -/** - * Groups the specified array of values into a Map from key to array of value. - * @param a The array to group. - * @param key The key function. - */ -export function group<TObject, TKey>(a: ArrayLike<TObject>, key: (value: TObject) => TKey): Map<TKey, TObject[]>; - -/** - * Groups and reduces the specified array of values into a Map from key to value. - * - * @param a The array to group. - * @param reduce The reduce function. - * @param key The key function. - */ -export function rollup<TObject, TKey, TReduce>(a: ArrayLike<TObject>, reduce: (value: TObject[]) => TReduce, key: (value: TObject) => TKey): Map<TKey, TReduce>; - -/** - * Returns the Cartesian product of the two arrays a and b. - * For each element i in the specified array a and each element j in the specified array b, in order, - * it creates a two-element array for each pair. - * - * @param a First input array. - * @param b Second input array. - */ -export function cross<S, T>(a: ArrayLike<S>, b: ArrayLike<T>): Array<[S, T]>; - -/** - * Returns the Cartesian product of the two arrays a and b. - * For each element i in the specified array a and each element j in the specified array b, in order, - * invokes the specified reducer function passing the element i and element j. - * - * @param a First input array. - * @param b Second input array. - * @param reducer A reducer function taking as input an element from "a" and "b" and returning a reduced value. - */ -export function cross<S, T, U>(a: ArrayLike<S>, b: ArrayLike<T>, reducer: (a: S, b: T) => U): U[]; - -/** - * Merges the specified arrays into a single array. - */ -export function merge<T>(arrays: ArrayLike<ArrayLike<T>>): T[]; - -/** - * For each adjacent pair of elements in the specified array, returns a new array of tuples of elements i and i - 1. - * Returns the empty array if the input array has fewer than two elements. - * - * @param array Array of input elements - */ -export function pairs<T>(array: ArrayLike<T>): Array<[T, T]>; -/** - * For each adjacent pair of elements in the specified array, in order, invokes the specified reducer function passing the element i and element i - 1. - * Returns the resulting array of pair-wise reduced elements. - * Returns the empty array if the input array has fewer than two elements. - * - * @param array Array of input elements - * @param reducer A reducer function taking as input to adjacent elements of the input array and returning a reduced value. - */ -export function pairs<T, U>(array: ArrayLike<T>, reducer: (a: T, b: T) => U): U[]; - -/** - * Returns a permutation of the specified array using the specified array of indexes. - * The returned array contains the corresponding element in array for each index in indexes, in order. - * For example, `permute(["a", "b", "c"], [1, 2, 0]) // ["b", "c", "a"]` - */ -export function permute<T>(array: { [key: number]: T }, keys: ArrayLike<number>): T[]; - -/** - * Extract the values from an object into an array with a stable order. For example: - * `var object = {yield: 27, year: 1931, site: "University Farm"};` - * `d3.permute(object, ["site", "yield"]); // ["University Farm", 27]` - */ -export function permute<T, K extends keyof T>(object: T, keys: ArrayLike<K>): Array<T[K]>; - -/** - * Generates a 0-based numeric sequence. The output range does not include 'stop'. - */ -export function range(stop: number): number[]; - -/** - * Generates a numeric sequence starting from the given start and stop values. 'step' defaults to 1. The output range does not include 'stop'. - */ -export function range(start: number, stop: number, step?: number): number[]; - -/** - * Randomizes the order of the specified array using the Fisher–Yates shuffle. - */ -export function shuffle<T>(array: T[], lo?: number, hi?: number): T[]; -export function shuffle(array: Int8Array, lo?: number, hi?: number): Int8Array; -export function shuffle(array: Uint8Array, lo?: number, hi?: number): Uint8Array; -export function shuffle(array: Uint8ClampedArray, lo?: number, hi?: number): Uint8ClampedArray; -export function shuffle(array: Int16Array, lo?: number, hi?: number): Int16Array; -export function shuffle(array: Uint16Array, lo?: number, hi?: number): Uint16Array; -export function shuffle(array: Int32Array, lo?: number, hi?: number): Int32Array; -export function shuffle(array: Uint32Array, lo?: number, hi?: number): Uint32Array; -export function shuffle(array: Float32Array, lo?: number, hi?: number): Float32Array; -export function shuffle(array: Float64Array, lo?: number, hi?: number): Float64Array; - -/** - * Generate an array of approximately count + 1 uniformly-spaced, nicely-rounded values between start and stop (inclusive). - * Each value is a power of ten multiplied by 1, 2 or 5. See also d3.tickIncrement, d3.tickStep and linear.ticks. - * - * Ticks are inclusive in the sense that they may include the specified start and stop values if (and only if) they are exact, - * nicely-rounded values consistent with the inferred step. More formally, each returned tick t satisfies start ≤ t and t ≤ stop. - * - * @param start Start value for ticks - * @param stop Stop value for ticks - * @param count count + 1 is the approximate number of ticks to be returned by d3.ticks. - */ -export function ticks(start: number, stop: number, count: number): number[]; - -/** - * Returns the difference between adjacent tick values if the same arguments were passed to d3.ticks: - * a nicely-rounded value that is a power of ten multiplied by 1, 2 or 5. - * - * Like d3.tickStep, except requires that start is always less than or equal to step, and if the tick step for the given start, - * stop and count would be less than one, returns the negative inverse tick step instead. - * - * This method is always guaranteed to return an integer, and is used by d3.ticks to avoid guarantee that the returned tick values - * are represented as precisely as possible in IEEE 754 floating point. - * - * @param start Start value for ticks - * @param stop Stop value for ticks - * @param count count + 1 is the approximate number of ticks to be returned by d3.ticks. - */ -export function tickIncrement(start: number, stop: number, count: number): number; - -/** - * Returns the difference between adjacent tick values if the same arguments were passed to d3.ticks: - * a nicely-rounded value that is a power of ten multiplied by 1, 2 or 5. - * - * Note that due to the limited precision of IEEE 754 floating point, the returned value may not be exact decimals; - * use d3-format to format numbers for human consumption. - * - * @param start Start value for ticks - * @param stop Stop value for ticks - * @param count count + 1 is the approximate number of ticks to be returned by d3.ticks. - */ -export function tickStep(start: number, stop: number, count: number): number; - -/** - * Transpose a matrix provided in Array of Arrays format. - */ -export function transpose<T>(matrix: ArrayLike<ArrayLike<T>>): T[][]; - -/** - * Returns an array of arrays, where the ith array contains the ith element from each of the argument arrays. - * The returned array is truncated in length to the shortest array in arrays. If arrays contains only a single array, the returned array - * contains one-element arrays. With no arguments, the returned array is empty. - */ -export function zip<T>(...arrays: Array<ArrayLike<T>>): T[][]; - -// -------------------------------------------------------------------------------------- -// Histogram -// -------------------------------------------------------------------------------------- - -export interface Bin<Datum, Value extends number | Date | undefined> extends Array<Datum> { - x0: Value | undefined; - x1: Value | undefined; -} - -/** - * Type definition for threshold generator which returns the count of recommended thresholds - */ -export type ThresholdCountGenerator<Value extends number | undefined = number | undefined> = - (values: ArrayLike<Value>, min: number, max: number) => number; - -/** - * Type definition for threshold generator which returns an array of recommended numbers thresholds - */ -export type ThresholdNumberArrayGenerator<Value extends number | undefined> = - (values: ArrayLike<Value>, min: number, max: number) => Value[]; - -/** - * Type definition for threshold generator which returns an array of recommended dates thresholds - */ -export type ThresholdDateArrayGenerator<Value extends Date | undefined> = - (values: ArrayLike<Value>, min: Date, max: Date) => Value[]; - -/** - * @deprecated Use ThresholdNumberArrayGenerator or ThresholdDateArrayGenerator. - */ -export type ThresholdArrayGenerator = ThresholdNumberArrayGenerator<number>; - -/** - * @deprecated Use `HistogramGeneratorNumber<Datum, Value>` for `number` values and `HistogramGeneratorDate<Datum, Value> for `Date` values. - */ -export interface HistogramGenerator<Datum, Value extends number | Date | undefined> { - (data: ArrayLike<Datum>): Array<Bin<Datum, Value>>; - - value(): (d: Datum, i: number, data: ArrayLike<Datum>) => Value; - value(valueAccessor: (d: Datum, i: number, data: ArrayLike<Datum>) => Value): this; - - domain(): (values: ArrayLike<Value>) => [Value, Value] | [undefined, undefined]; - domain(domain: [Value, Value]): this; - domain(domainAccessor: (values: ArrayLike<Value>) => [Value, Value] | [undefined, undefined]): this; - - /** - * Set the array of values to be used as thresholds in determining the bins. - * - * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, - * and the last bin.x1 is always equal to the maximum domain value. - * - * @param thresholds Array of threshold values used for binning. The elements must - * be of the same type as the materialized values of the histogram. - */ - thresholds(thresholds: ArrayLike<Value>): this; -} - -export interface HistogramCommon<Datum, Value extends number | Date | undefined> { - (data: ArrayLike<Datum>): Array<Bin<Datum, Value>>; - - value(): (d: Datum, i: number, data: ArrayLike<Datum>) => Value; - value(valueAccessor: (d: Datum, i: number, data: ArrayLike<Datum>) => Value): this; -} - -export interface HistogramGeneratorDate<Datum, Value extends Date | undefined> extends HistogramCommon<Datum, Date> { - domain(): (values: ArrayLike<Value>) => [Date, Date]; - domain(domain: [Date, Date]): this; - domain(domainAccessor: (values: ArrayLike<Value>) => [Date, Date]): this; - - thresholds(): ThresholdDateArrayGenerator<Value>; - /** - * Set the array of values to be used as thresholds in determining the bins. - * - * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, - * and the last bin.x1 is always equal to the maximum domain value. - * - * @param thresholds Array of threshold values used for binning. The elements must - * be of the same type as the materialized values of the histogram. - */ - thresholds(thresholds: ArrayLike<Value>): this; - /** - * Set a threshold accessor function, which returns the array of values to be used as - * thresholds in determining the bins. - * - * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, - * and the last bin.x1 is always equal to the maximum domain value. - * - * @param thresholds A function which accepts as arguments the array of materialized values, and - * optionally the domain minimum and maximum. The function calculates and returns the array of values to be used as - * thresholds in determining the bins. - */ - thresholds(thresholds: ThresholdDateArrayGenerator<Value>): this; -} - -export interface HistogramGeneratorNumber<Datum, Value extends number | undefined> extends HistogramCommon<Datum, Value> { - domain(): (values: ArrayLike<Value>) => [number, number] | [undefined, undefined]; - domain(domain: [number, number]): this; - domain(domainAccessor: (values: ArrayLike<Value>) => [number, number] | [undefined, undefined]): this; - - thresholds(): ThresholdCountGenerator<Value> | ThresholdNumberArrayGenerator<Value>; - /** - * Divide the domain uniformly into approximately count bins. IMPORTANT: This threshold - * setting approach only works, when the materialized values are numbers! - * - * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, - * and the last bin.x1 is always equal to the maximum domain value. - * - * @param count The desired number of uniform bins. - */ - thresholds(count: number): this; - /** - * Set a threshold accessor function, which returns the desired number of bins. - * Divides the domain uniformly into approximately count bins. IMPORTANT: This threshold - * setting approach only works, when the materialized values are numbers! - * - * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, - * and the last bin.x1 is always equal to the maximum domain value. - * - * @param count A function which accepts as arguments the array of materialized values, and - * optionally the domain minimum and maximum. The function calculates and returns the suggested - * number of bins. - */ - thresholds(count: ThresholdCountGenerator<Value>): this; - /** - * Set the array of values to be used as thresholds in determining the bins. - * - * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, - * and the last bin.x1 is always equal to the maximum domain value. - * - * @param thresholds Array of threshold values used for binning. The elements must - * be of the same type as the materialized values of the histogram. - */ - thresholds(thresholds: ArrayLike<Value>): this; - /** - * Set a threshold accessor function, which returns the array of values to be used as - * thresholds in determining the bins. - * - * Any threshold values outside the domain are ignored. The first bin.x0 is always equal to the minimum domain value, - * and the last bin.x1 is always equal to the maximum domain value. - * - * @param thresholds A function which accepts as arguments the array of materialized values, and - * optionally the domain minimum and maximum. The function calculates and returns the array of values to be used as - * thresholds in determining the bins. - */ - thresholds(thresholds: ThresholdNumberArrayGenerator<Value>): this; -} - -export function histogram(): HistogramGeneratorNumber<number, number>; -export function histogram<Datum, Value extends number | undefined>(): HistogramGeneratorNumber<Datum, Value>; -export function histogram<Datum, Value extends Date | undefined>(): HistogramGeneratorDate<Datum, Value>; - -/** - * @deprecated Do not use Value generic which mixes number and Date types. Use either number or Date - * (in combination with undefined, as applicable) to obtain a type-specific histogram generator. - */ -export function histogram<Datum, Value extends number | Date | undefined>(): HistogramGenerator<Datum, Value>; - -// -------------------------------------------------------------------------------------- -// Histogram Thresholds -// -------------------------------------------------------------------------------------- - -export function thresholdFreedmanDiaconis(values: ArrayLike<number | undefined>, min: number, max: number): number; // of type ThresholdCountGenerator - -export function thresholdScott(values: ArrayLike<number | undefined>, min: number, max: number): number; // of type ThresholdCountGenerator - -export function thresholdSturges(values: ArrayLike<number | undefined>): number; // of type ThresholdCountGenerator diff --git a/node_modules/@types/d3-array/package.json b/node_modules/@types/d3-array/package.json deleted file mode 100644 index 1a819abb477406e7053ee7031447a7a18cd635ef..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-array/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "@types/d3-array@^1", - "_id": "@types/d3-array@1.2.8", - "_inBundle": false, - "_integrity": "sha512-wWV0wT6oLUGprrOR5LMK7Dh8EBiondhnqINsvazv6UucYfTdb2oaFF4knlqzZV2RKB9ZC9G7G1Iojt8b/wolsw==", - "_location": "/@types/d3-array", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-array@^1", - "name": "@types/d3-array", - "escapedName": "@types%2fd3-array", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3", - "/@types/d3-contour" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-1.2.8.tgz", - "_shasum": "b852381cb68e31e46bfa23ee70a383cbc6d62146", - "_spec": "@types/d3-array@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Hugues Stefanski", - "url": "https://github.com/ledragon" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-array module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-array", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-array" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "b57a4cccc158b84400d10cb02c2ea549e08dcd0ed38c0aa5628f97db09f35b4b", - "version": "1.2.8" -} diff --git a/node_modules/@types/d3-axis/LICENSE b/node_modules/@types/d3-axis/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-axis/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-axis/README.md b/node_modules/@types/d3-axis/README.md deleted file mode 100644 index 399aa0c7c6537d23ae1fc1fce63886f1eca8a562..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-axis/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-axis` - -# Summary -This package contains type definitions for D3JS d3-axis module (https://github.com/d3/d3-axis/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-axis/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 21:08:20 GMT - * Dependencies: [@types/d3-selection](https://npmjs.com/package/@types/d3-selection) - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-axis/index.d.ts b/node_modules/@types/d3-axis/index.d.ts deleted file mode 100644 index 26106b5e8eb70e667170fb7ecc53713b875e002a..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-axis/index.d.ts +++ /dev/null @@ -1,335 +0,0 @@ -// Type definitions for D3JS d3-axis module 1.0 -// Project: https://github.com/d3/d3-axis/, https://d3js.org/d3-axis -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.0.12 - -import { Selection, TransitionLike } from 'd3-selection'; - -// -------------------------------------------------------------------------- -// Shared Types and Interfaces -// -------------------------------------------------------------------------- - -/** - * A helper type to alias elements which can serve as a domain for an axis. - */ -export type AxisDomain = number | string | Date | { valueOf(): number}; - -/** - * A helper interface to describe the minimal contract to be met by a time interval - * which can be passed into the Axis.ticks(...) or Axis.tickArguments(...) methods when - * creating time series axes. Under normal circumstances the argument will be of type - * TimeInterval or CountableTimeInterval as defined in d3-time. - * NB: This helper interface has been created to avoid tight coupling of d3-axis to - * d3-time at the level of definition files. I.e. d3-time is not a - * dependency of d3-axis in the D3 Javascript implementation. This minimal contract - * is based on an analysis of how d3-axis passes a time interval argument into a time scale, - * if a time scale was set using Axis.scale(...). And in turn on how a time scale uses - * the time interval when creating ticks from it. - */ -export interface AxisTimeInterval { - range(start: Date, stop: Date, step?: number): Date[]; -} - -/** - * A helper interface to which a scale passed into axis must conform (at a minimum) - * for axis to use the scale without error. - */ -export interface AxisScale<Domain> { - (x: Domain): number | undefined; - domain(): Domain[]; - range(): number[]; - copy(): this; - bandwidth?(): number; - // TODO: Reconsider the below, note that the compiler does not differentiate the overloads w.r.t. optionality - // ticks?(count?: number): Domain[]; - // ticks?(count?: AxisTimeInterval): Date[]; - // tickFormat?(count?: number, specifier?: string): ((d: number) => string); - // tickFormat?(count?: number | AxisTimeInterval, specifier?: string): ((d: Date) => string); -} - -/** - * A helper type to alias elements which can serve as a container for an axis. - */ -export type AxisContainerElement = SVGSVGElement | SVGGElement; - -/** - * Interface defining an axis generator. The generic <Domain> is the type of the axis domain. - */ -export interface Axis<Domain> { - /** - * Render the axis to the given context. - * - * @param context A selection of SVG containers (either SVG or G elements). - */ - (context: Selection<SVGSVGElement, any, any, any> | Selection<SVGGElement, any, any, any>): void; - - /** - * Render the axis to the given context. - * - * @param context A transition defined on SVG containers (either SVG or G elements). - */ - (context: TransitionLike<SVGSVGElement, any> | TransitionLike<SVGGElement, any>): void; - - /** - * Gets the current scale underlying the axis. - */ - scale<A extends AxisScale<Domain>>(): A; - - /** - * Sets the scale and returns the axis. - * - * @param scale The scale to be used for axis generation. - */ - scale(scale: AxisScale<Domain>): this; - - /** - * Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator. - * - * This method has no effect if the scale does not implement scale.ticks, as with band and point scales. - * - * This method is also a convenience function for axis.tickArguments. - * - * @param count Number of ticks that should be rendered. - * @param specifier An optional format specifier to customize how the tick values are formatted. - */ - ticks(count: number, specifier?: string): this; - - /** - * Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator. - * Use with a TIME SCALE ONLY. - * - * This method is also a convenience function for axis.tickArguments. - * - * @param interval A time interval used to generate date-based ticks. This is typically a TimeInterval/CountableTimeInterval as defined - * in d3-time. E.g. as obtained by passing in d3.timeMinute.every(15). - * @param specifier An optional format specifier to customize how the tick values are formatted. - */ - ticks(interval: AxisTimeInterval, specifier?: string): this; - - /** - * Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator. - * - * The meaning of the arguments depends on the axis’ scale type: most commonly, the arguments are a suggested count for the number of ticks - * (or a time interval for time scales), and an optional format specifier to customize how the tick values are formatted. - * - * This method has no effect if the scale does not implement scale.ticks, as with band and point scales. - * - * To set the tick values explicitly, use axis.tickValues. To set the tick format explicitly, use axis.tickFormat. - * - * This method is also a convenience function for axis.tickArguments. - */ - ticks(arg0: any, ...args: any[]): this; - - /** - * Get an array containing the currently set arguments to be passed into scale.ticks and scale.tickFormat, which defaults to the empty array. - */ - tickArguments(): any[]; - - /** - * Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator. - * - * This method has no effect if the scale does not implement scale.ticks, as with band and point scales. - * To set the tick values explicitly, use axis.tickValues. To set the tick format explicitly, use axis.tickFormat. - * - * See also axis.ticks. - * - * @param args An array containing a single element representing the count, i.e. number of ticks to be rendered. - */ - tickArguments(args: [number]): this; - - /** - * Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator. - * - * This method has no effect if the scale does not implement scale.ticks, as with band and point scales. - * To set the tick values explicitly, use axis.tickValues. To set the tick format explicitly, use axis.tickFormat. - * - * See also axis.ticks. - * - * @param args An array containing two elements. The first element represents the count, i.e. number of ticks to be rendered. The second - * element is a string representing the format specifier to customize how the tick values are formatted. - */ - tickArguments(args: [number, string]): this; - - /** - * Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator. - * Use with a TIME SCALE ONLY. - * - * See also axis.ticks. - * - * @param args An array containing a single element representing a time interval used to generate date-based ticks. - * This is typically a TimeInterval/CountableTimeInterval as defined in d3-time. E.g. as obtained by passing in d3.timeMinute.every(15). - */ - tickArguments(args: [AxisTimeInterval]): this; - - /** - * Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator. - * Use with a TIME SCALE ONLY. - * - * See also axis.ticks. - * - * @param args An array containing two elements. The first element represents a time interval used to generate date-based ticks. - * This is typically a TimeInterval/CountableTimeInterval as defined in d3-time. E.g. as obtained by passing in d3.timeMinute.every(15). - * The second element is a string representing the format specifier to customize how the tick values are formatted. - */ - tickArguments(args: [AxisTimeInterval, string]): this; - - /** - * Sets the arguments that will be passed to scale.ticks and scale.tickFormat when the axis is rendered, and returns the axis generator. - * - * This method has no effect if the scale does not implement scale.ticks, as with band and point scales. - * To set the tick values explicitly, use axis.tickValues. To set the tick format explicitly, use axis.tickFormat. - * - * See also axis.ticks. - * - * @param args An array with arguments suitable for the scale to be used for tick generation. - */ - tickArguments(args: any[]): this; - - /** - * Returns the current tick values, which defaults to null. - */ - tickValues(): Domain[] | null; - - /** - * Specified values to be used for ticks rather than using the scale’s automatic tick generator. - * The explicit tick values take precedent over the tick arguments set by axis.tickArguments. - * However, any tick arguments will still be passed to the scale’s tickFormat function if a - * tick format is not also set. - * - * @param values An array with values from the Domain of the scale underlying the axis. - */ - tickValues(values: Domain[]): this; - - /** - * Clears any previously-set explicit tick values and reverts back to the scale’s tick generator. - * - * @param values null - */ - tickValues(values: null): this; - - /** - * Returns the currently set tick format function, which defaults to null. - */ - tickFormat(): ((domainValue: Domain, index: number) => string) | null; - - /** - * Sets the tick format function and returns the axis. - * - * @param format A function mapping a value from the axis Domain to a formatted string - * for display purposes. When invoked, the format function is also passed a second argument representing the zero-based index - * of the tick label in the array of generated tick labels. - */ - tickFormat(format: (domainValue: Domain, index: number) => string): this; - - /** - * Reset the tick format function. A null format indicates that the scale’s - * default formatter should be used, which is generated by calling scale.tickFormat. - * In this case, the arguments specified by axis.tickArguments - * are likewise passed to scale.tickFormat. - * - * @param format null - */ - tickFormat(format: null): this; - - /** - * Get the current inner tick size, which defaults to 6. - */ - tickSize(): number; - /** - * Set the inner and outer tick size to the specified value and return the axis. - * - * @param size Tick size in pixels (Default is 6). - */ - tickSize(size: number): this; - - /** - * Get the current inner tick size, which defaults to 6. - * The inner tick size controls the length of the tick lines, - * offset from the native position of the axis. - */ - tickSizeInner(): number; - - /** - * Set the inner tick size to the specified value and return the axis. - * The inner tick size controls the length of the tick lines, - * offset from the native position of the axis. - * - * @param size Tick size in pixels (Default is 6). - */ - tickSizeInner(size: number): this; - - /** - * Get the current outer tick size, which defaults to 6. - * The outer tick size controls the length of the square ends of the domain path, - * offset from the native position of the axis. Thus, the “outer ticks†are not actually - * ticks but part of the domain path, and their position is determined by the associated - * scale’s domain extent. Thus, outer ticks may overlap with the first or last inner tick. - * An outer tick size of 0 suppresses the square ends of the domain path, - * instead producing a straight line. - */ - tickSizeOuter(): number; - - /** - * Set the current outer tick size and return the axis. - * The outer tick size controls the length of the square ends of the domain path, - * offset from the native position of the axis. Thus, the “outer ticks†are not actually - * ticks but part of the domain path, and their position is determined by the associated - * scale’s domain extent. Thus, outer ticks may overlap with the first or last inner tick. - * An outer tick size of 0 suppresses the square ends of the domain path, - * instead producing a straight line. - * - * @param size Tick size in pixels (Default is 6). - */ - tickSizeOuter(size: number): this; - - /** - * Get the current padding, which defaults to 3. - */ - tickPadding(): number; - - /** - * Set the current padding and return the axis. - * - * @param padding Padding in pixels (Default is 3). - */ - tickPadding(padding: number): this; -} - -/** - * Constructs a new top-oriented axis generator for the given scale, with empty tick arguments, - * a tick size of 6 and padding of 3. In this orientation, ticks are drawn above the horizontal domain path. - * - * @param scale The scale to be used for axis generation. - */ -export function axisTop<Domain extends AxisDomain>(scale: AxisScale<Domain>): Axis<Domain>; - -/** - * Constructs a new right-oriented axis generator for the given scale, with empty tick arguments, - * a tick size of 6 and padding of 3. In this orientation, ticks are drawn to the right of the vertical domain path. - * - * @param scale The scale to be used for axis generation. - */ -export function axisRight<Domain extends AxisDomain>(scale: AxisScale<Domain>): Axis<Domain>; - -/** - * Constructs a new bottom-oriented axis generator for the given scale, with empty tick arguments, - * a tick size of 6 and padding of 3. In this orientation, ticks are drawn below the horizontal domain path. - * - * @param scale The scale to be used for axis generation. - */ -export function axisBottom<Domain extends AxisDomain>(scale: AxisScale<Domain>): Axis<Domain>; - -/** - * Constructs a new left-oriented axis generator for the given scale, with empty tick arguments, - * a tick size of 6 and padding of 3. In this orientation, ticks are drawn to the left of the vertical domain path. - * - * @param scale The scale to be used for axis generation. - */ -export function axisLeft<Domain extends AxisDomain>(scale: AxisScale<Domain>): Axis<Domain>; diff --git a/node_modules/@types/d3-axis/package.json b/node_modules/@types/d3-axis/package.json deleted file mode 100644 index 272939f94bdc5097a39abdc370eb2367145b9e5d..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-axis/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_from": "@types/d3-axis@^1", - "_id": "@types/d3-axis@1.0.14", - "_inBundle": false, - "_integrity": "sha512-wZAKX/dtFT5t5iuCaiU0QL0BWB19TE6h7C7kgfBVyoka7zidQWvf8E9zQTJ5bNPBQxd0+JmplNqwy1M8O8FOjA==", - "_location": "/@types/d3-axis", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-axis@^1", - "name": "@types/d3-axis", - "escapedName": "@types%2fd3-axis", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-1.0.14.tgz", - "_shasum": "4ff27eb94fab10efbda6c972e1fbb26ea696655b", - "_spec": "@types/d3-axis@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": { - "@types/d3-selection": "^1" - }, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-axis module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-axis", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-axis" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "0cc0552772dceb0cb401252adc843d743d2c77398255e07e900c87c573200db0", - "version": "1.0.14" -} diff --git a/node_modules/@types/d3-brush/LICENSE b/node_modules/@types/d3-brush/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-brush/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-brush/README.md b/node_modules/@types/d3-brush/README.md deleted file mode 100644 index 9588c57ac9bbae11e8515759819473bbda1d9a6c..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-brush/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-brush` - -# Summary -This package contains type definitions for D3JS d3-brush module (https://github.com/d3/d3-brush/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-brush/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 20:01:28 GMT - * Dependencies: [@types/d3-selection](https://npmjs.com/package/@types/d3-selection) - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-brush/index.d.ts b/node_modules/@types/d3-brush/index.d.ts deleted file mode 100644 index d126df8c033842402bbc986ccd06db117bf4922c..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-brush/index.d.ts +++ /dev/null @@ -1,302 +0,0 @@ -// Type definitions for D3JS d3-brush module 1.1 -// Project: https://github.com/d3/d3-brush/, https://d3js.org/d3-brush -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.1.6 - -import { Selection, TransitionLike, ValueFn } from 'd3-selection'; - -/** - * Type alias for a BrushSelection. For a two-dimensional brush, it must be defined as [[x0, y0], [x1, y1]], - * where x0 is the minimum x-value, y0 is the minimum y-value, x1 is the maximum x-value, and y1 is the maximum y-value. - * For an x-brush, it must be defined as [x0, x1]; for a y-brush, it must be defined as [y0, y1]. - */ -export type BrushSelection = [[number, number], [number, number]] | [number, number]; - -/** - * A D3 brush behavior - * - * The generic refers to the type of the datum for the group element on which brush behavior is defined. - */ -export interface BrushBehavior<Datum> { - /** - * Applies the brush to the specified group, which must be a selection of SVG G elements. - * This function is typically not invoked directly, and is instead invoked via selection.call. - * - * For details see: {@link https://github.com/d3/d3-brush#_brush} - * - * @param group A D3 selection of SVG G elements. - * @param args Optional arguments to be passed in. - */ - (group: Selection<SVGGElement, Datum, any, any>, ...args: any[]): void; - /** - * Clear the active selection of the brush on the specified SVG G element(s) selection. - * - * @param group A D3 selection of SVG G elements. - * @param selection Use null to clear the active brush selection. - */ - move(group: Selection<SVGGElement, Datum, any, any>, selection: null): void; - /** - * Sets the active selection of the brush on the specified SVG G element(s) selection - * to the provided array. - * - * @param group A D3 selection of SVG G elements. - * @param selection An array specifying the new active brush selection. For a two-dimensional brush, - * it must be defined as [[x0, y0], [x1, y1]], where x0 is the minimum x-value, y0 is the minimum y-value, - * x1 is the maximum x-value, and y1 is the maximum y-value. For an x-brush, it must be defined as [x0, x1]; - * for a y-brush, it must be defined as [y0, y1]. - */ - move(group: Selection<SVGGElement, Datum, any, any>, selection: BrushSelection): void; - /** - * Sets the active selection of the brush on the specified SVG G element(s) selection - * based on the array returned by a value function invoked for each selection element. - * - * @param group A D3 selection of SVG G elements. - * @param selection A selection value function which is evaluated for each selected element, - * in order, being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element. The function returns an array specifying the new active brush selection. - * For a two-dimensional brush, it must be defined as [[x0, y0], [x1, y1]], where x0 is the minimum x-value, y0 is the minimum y-value, - * x1 is the maximum x-value, and y1 is the maximum y-value. For an x-brush, it must be defined as [x0, x1]; - * for a y-brush, it must be defined as [y0, y1]. - */ - move(group: Selection<SVGGElement, Datum, any, any>, selection: ValueFn<SVGGElement, Datum, BrushSelection>): void; - /** - * Clear the active selection of the brush on the specified SVG G element(s) transition. - * - * @param group A D3 transition on SVG G elements. - * @param selection Use null to clear the active brush selection. - */ - move(group: Selection<SVGGElement, Datum, any, any>, selection: null): void; - /** - * Sets the active selection of the brush on the specified SVG G element(s) transition - * to the provided array. - * - * @param group A D3 transition on SVG G elements. - * @param selection An array specifying the new active brush selection. For a two-dimensional brush, - * it must be defined as [[x0, y0], [x1, y1]], where x0 is the minimum x-value, y0 is the minimum y-value, - * x1 is the maximum x-value, and y1 is the maximum y-value. For an x-brush, it must be defined as [x0, x1]; - * for a y-brush, it must be defined as [y0, y1]. - */ - move(group: TransitionLike<SVGGElement, Datum>, selection: BrushSelection): void; - /** - * Sets the active selection of the brush on the specified SVG G element(s) transition - * based on the array returned by a value function invoked for each transitioning element. - * - * @param group A D3 transition on SVG G elements. - * @param selection A selection value function which is evaluated for each selected element, - * in order, being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element. The function returns an array specifying the new active brush selection. - * For a two-dimensional brush, it must be defined as [[x0, y0], [x1, y1]], where x0 is the minimum x-value, y0 is the minimum y-value, - * x1 is the maximum x-value, and y1 is the maximum y-value. For an x-brush, it must be defined as [x0, x1]; - * for a y-brush, it must be defined as [y0, y1]. - */ - move(group: TransitionLike<SVGGElement, Datum>, selection: ValueFn<SVGGElement, Datum, BrushSelection>): void; - - /** - * Clear the active selection of the brush on the specified SVG G element(s) selection. - * - * @param group A D3 selection of SVG G elements. - */ - clear(group: Selection<SVGGElement, Datum, any, any>): void; - - /** - * Returns the current extent accessor. - */ - extent(): ValueFn<SVGGElement, Datum, [[number, number], [number, number]]>; - /** - * Set the brushable extent to the specified array of points and returns this brush. - * - * The brush extent determines the size of the invisible overlay and also constrains the brush selection; - * the brush selection cannot go outside the brush extent. - * - * @param extent array of points [[x0, y0], [x1, y1]], where [x0, y0] is the top-left corner - * and [x1, y1] is the bottom-right corner. - */ - extent(extent: [[number, number], [number, number]]): this; - /** - * Set the brushable extent to the specified array of points returned by the accessor function - * evaluated for each element in the selection/transition and returns this brush. - * - * The brush extent determines the size of the invisible overlay and also constrains the brush selection; - * the brush selection cannot go outside the brush extent. - * - * @param extent An extent accessor function which is evaluated for each selected element, - * in order, being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element. The function returns an array of points [[x0, y0], [x1, y1]], - * where [x0, y0] is the top-left corner and [x1, y1] is the bottom-right corner. - */ - extent(extent: ValueFn<SVGGElement, Datum, [[number, number], [number, number]]>): this; - - /** - * Returns the current filter function. - */ - filter(): ValueFn<SVGGElement, Datum, boolean>; - /** - * Sets the filter to the specified filter function and returns the brush. - * - * If the filter returns falsey, the initiating event is ignored and no brush gesture is started. - * Thus, the filter determines which input events are ignored. The default filter ignores mousedown events on secondary buttons, - * since those buttons are typically intended for other purposes, such as the context menu. - * - * @param filterFn A filter function which is evaluated for each selected element, - * in order, being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element. The function returns a boolean value. - */ - filter(filterFn: ValueFn<SVGGElement, Datum, boolean>): this; - - /** - * Returns the current touch support detector, which defaults to a function returning true, - * if the "ontouchstart" event is supported on the current element. - */ - touchable(): ValueFn<SVGGElement, Datum, boolean>; - /** - * Sets the touch support detector to the specified boolean value and returns the brush. - * - * Touch event listeners are only registered if the detector returns truthy for the corresponding element when the brush is applied. - * The default detector works well for most browsers that are capable of touch input, but not all; Chrome’s mobile device emulator, for example, - * fails detection. - * - * @param touchable A boolean value. true when touch event listeners should be applied to the corresponding element, otherwise false. - */ - touchable(touchable: boolean): this; - /** - * Sets the touch support detector to the specified function and returns the drag behavior. - * - * Touch event listeners are only registered if the detector returns truthy for the corresponding element when the brush is applied. - * The default detector works well for most browsers that are capable of touch input, but not all; Chrome’s mobile device emulator, for example, - * fails detection. - * - * @param touchable A touch support detector function, which returns true when touch event listeners should be applied to the corresponding element. - * The function is evaluated for each selected element to which the brush was applied, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element. The function returns a boolean value. - */ - touchable(touchable: ValueFn<SVGGElement, Datum, boolean>): this; - - /** - * Returns the current key modifiers flag. - */ - keyModifiers(): boolean; - /** - * Sets the key modifiers flag and returns the brush. - * - * The key modifiers flag determines whether the brush listens to key events during brushing. - * The default value is true. - * - * @param modifiers New value for key modifiers flag. - */ - keyModifiers(modifiers: boolean): this; - - /** - * Returns the current handle size, which defaults to six. - */ - handleSize(): number; - /** - * Sets the size of the brush handles to the specified number and returns the brush. - * - * This method must be called before applying the brush to a selection; - * changing the handle size does not affect brushes that were previously rendered. - * The default size is 6. - * - * @param size Size of the handle. - */ - handleSize(size: number): this; - - /** - * Returns the first currently-assigned listener matching the specified typenames, if any. - * - * @param typenames The typenames is a string containing one or more typename separated by whitespace. - * Each typename is a type, optionally followed by a period (.) and a name, such as "brush.foo"" and "brush.bar"; - * the name allows multiple listeners to be registered for the same type. The type must be one of the following: - * start (at the start of a brush gesture, such as on mousedown), brush (when the brush moves, such as on mousemove), or - * end (at the end of a brush gesture, such as on mouseup.) - */ - on(typenames: string): ValueFn<SVGGElement, Datum, void> | undefined; - /** - * Removes the current event listeners for the specified typenames, if any. - * - * @param typenames The typenames is a string containing one or more typename separated by whitespace. - * Each typename is a type, optionally followed by a period (.) and a name, such as "brush.foo"" and "brush.bar"; - * the name allows multiple listeners to be registered for the same type. The type must be one of the following: - * start (at the start of a brush gesture, such as on mousedown), brush (when the brush moves, such as on mousemove), or - * end (at the end of a brush gesture, such as on mouseup.) - * @param listener Use null to remove the listener. - */ - on(typenames: string, listener: null): this; - /** - * Sets the event listener for the specified typenames and returns the brush. - * If an event listener was already registered for the same type and name, - * the existing listener is removed before the new listener is added. - * When a specified event is dispatched, each listener will be invoked with the same context and arguments as selection.on listeners. - * - * @param typenames The typenames is a string containing one or more typename separated by whitespace. - * Each typename is a type, optionally followed by a period (.) and a name, such as "brush.foo"" and "brush.bar"; - * the name allows multiple listeners to be registered for the same type. The type must be one of the following: - * start (at the start of a brush gesture, such as on mousedown), brush (when the brush moves, such as on mousemove), or - * end (at the end of a brush gesture, such as on mouseup.) - * @param listener An event listener function which is evaluated for each selected element, - * in order, being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element. - */ - on(typenames: string, listener: ValueFn<SVGGElement, Datum, void>): this; -} - -/** - * Create a new two-dimensional brush. - * - * The generic "Datum" refers to the type of the data of the selected svg:g element to - * which the returned BrushBehavior will be applied. - */ -export function brush<Datum>(): BrushBehavior<Datum>; -/** - * Creates a new one-dimensional brush along the x-dimension. - * - * The generic "Datum" refers to the type of the data of the selected svg:g element to - * which the returned BrushBehavior will be applied. - */ -export function brushX<Datum>(): BrushBehavior<Datum>; -/** - * Creates a new one-dimensional brush along the y-dimension. - * - * The generic "Datum" refers to the type of the data of the selected svg:g element to - * which the returned BrushBehavior will be applied. - */ -export function brushY<Datum>(): BrushBehavior<Datum>; - -/** - * Return the current brush selection for the specified node. Internally, an element’s brush state is stored as element.__brush; - * however, you should use this method rather than accessing it directly. If the given node has no selection, returns null. - * Otherwise, the selection is defined as an array of numbers. - * - * @param node The node for which the brush selection should be returned. - */ -export function brushSelection(node: SVGGElement): BrushSelection | null; - -/** - * D3 brush event - * - * The generic refers to the type of the datum for the group element on which brush was defined. - */ -export interface D3BrushEvent<Datum> { - /** - * The BrushBehavior associated with the event - */ - target: BrushBehavior<Datum>; - /** - * The event type for the BrushEvent - */ - type: 'start' | 'brush' | 'end' | string; // Leave failsafe string type for cases like 'brush.foo' - /** - * The current brush selection associated with the event. - * This is null when the selection is empty. - */ - selection: BrushSelection | null; - /** - * The underlying input event, such as mousemove or touchmove. - */ - sourceEvent: any; -} diff --git a/node_modules/@types/d3-brush/package.json b/node_modules/@types/d3-brush/package.json deleted file mode 100644 index 61db2ff828a60e2fd75f264257b9aff9176aed46..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-brush/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_from": "@types/d3-brush@^1", - "_id": "@types/d3-brush@1.1.4", - "_inBundle": false, - "_integrity": "sha512-2t8CgWaha9PsPdSZJ9m6Jl4awqf3DGIXek2e7gfheyfP2R0a/18MX+wuLHx+LyI1Ad7lxDsPWcswKD0XhQEjmg==", - "_location": "/@types/d3-brush", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-brush@^1", - "name": "@types/d3-brush", - "escapedName": "@types%2fd3-brush", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-1.1.4.tgz", - "_shasum": "0b5cc9c57476d0144b991228b44664e08494b7f3", - "_spec": "@types/d3-brush@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": { - "@types/d3-selection": "^1" - }, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-brush module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-brush", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-brush" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "3a1251b9c42925fc241f45dd5245ef9b3ebae483da07f3f59884e22ab63376e6", - "version": "1.1.4" -} diff --git a/node_modules/@types/d3-chord/LICENSE b/node_modules/@types/d3-chord/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-chord/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-chord/README.md b/node_modules/@types/d3-chord/README.md deleted file mode 100644 index 95c5a4bf426d3553aab7b09a2e0bf3538cbc8b6e..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-chord/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-chord` - -# Summary -This package contains type definitions for D3JS d3-chord module (https://github.com/d3/d3-chord/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-chord/v1. - -### Additional Details - * Last updated: Tue, 29 Sep 2020 23:28:19 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-chord/index.d.ts b/node_modules/@types/d3-chord/index.d.ts deleted file mode 100644 index 32c889ed826679306ceececaa4ff158243c0ea66..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-chord/index.d.ts +++ /dev/null @@ -1,408 +0,0 @@ -// Type definitions for D3JS d3-chord module 1.0 -// Project: https://github.com/d3/d3-chord/, https://d3js.org/d3-chord -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.0.6 - -// --------------------------------------------------------------------- -// Chord -// --------------------------------------------------------------------- - -/** - * A chord subgroup serving as source or target of a chord between two nodes i an j (where i may be equal to j). - */ -export interface ChordSubgroup { - /** - * Start angle of the chord subgroup in radians - */ - startAngle: number; - - /*** - * End angle of the chord subgroup in radians - */ - endAngle: number; - - /** - * The flow value in matrix[i][j] from node i to node j - */ - value: number; - - /** - * The node index i - */ - index: number; - - /** - * The node index j - */ - subindex: number; -} - -/** - * A chord represents the combined bidirectional flow between two nodes i and j (where i may be equal to j) - */ -export interface Chord { - /** - * Chord subgroup constituting the source of Chord - */ - source: ChordSubgroup; - /** - * Chord subgroup constituting the Target of Chord - */ - target: ChordSubgroup; -} - -/** - * A chord group for a given node i representing the combined outflow for node i, - * corresponding to the elements matrix[i][0 … n - 1]. - */ -export interface ChordGroup { - /** - * The start angle of the chord group in radians - */ - startAngle: number; - - /** - * The end angle of the chord group in radians - */ - endAngle: number; - - /** - * The total outgoing flow value for node i - */ - value: number; - - /** - * The node index i - */ - index: number; -} - -/** - * An array of chords, where each chord represents the combined bidirectional flow between two nodes i and j (where i may be equal to j). - * The chords are based on a (n x n) matrix of flows between nodes. - * - * The chords are typically passed to d3.ribbon to display the network relationships. - * The returned array includes only chord objects for which the value matrix[i][j] or matrix[j][i] is non-zero. - * Furthermore, the returned array only contains unique chords: a given chord ij represents the bidirectional flow from i to j and from j to i, - * and does not contain a duplicate chord ji; i and j are chosen such that the chord’s source always represents the larger of matrix[i][j] and matrix[j][i]. - * In other words, chord.source.index equals chord.target.subindex, chord.source.subindex equals chord.target.index, - * chord.source.value is greater than or equal to chord.target.value, and chord.source.value is always greater than zero. - */ -export interface Chords extends Array<Chord> { - /** - * An array of length n, where each group represents the combined outflow for node i, - * corresponding to the elements matrix[i][0 … n - 1] - */ - groups: ChordGroup[]; -} - -/** - * A D3 chord diagram Layout to visualize relationships or network flow with an aesthetically-pleasing circular layout. - * - * The relationships are represented as a square matrix of size n×n, where the matrix represents the directed flow amongst a network (a complete digraph) of n nodes. - */ -export interface ChordLayout { - /** - * Computes the chord layout for the specified square matrix of size n×n, where the matrix represents the directed flow amongst a network (a complete digraph) of n nodes. - * - * @param matrix An (n x n) matrix representing the directed flow amongst a network (a complete digraph) of n nodes.The given matrix must be an array of length n, - * where each element matrix[i] is an array of n numbers, where each matrix[i][j] represents the flow from the ith node in the network to the jth node. - * Each number matrix[i][j] must be nonnegative, though it can be zero if there is no flow from node i to node j. - */ - (matrix: number[][]): Chords; - - /** - * Returns the current pad angle in radians, which defaults to zero. - */ - padAngle(): number; - /** - * Sets the pad angle between adjacent groups to the specified number in radians and returns this chord layout. - * - * The default is zero. - * - * @param angle Pad angle between adjacent groups in radians. - */ - padAngle(angle: number): this; - - /** - * Returns the current group comparator, which defaults to null. - */ - sortGroups(): ((a: number, b: number) => number) | null; - /** - * Removes the current group comparator and returns this chord layout. - * - * @param compare Use null to remove the current comparator function, if any. - */ - sortGroups(compare: null): this; - /** - * Sets the group comparator to the specified function and returns this chord layout. - * - * If the group comparator is non-null, it is used to sort the groups by their total outflow. See also d3.ascending and d3.descending. - * - * @param compare A comparator function, e.g. d3.ascending or d3.descending. - */ - sortGroups(compare: (a: number, b: number) => number): this; - - /** - * Returns the current subgroup comparator, which defaults to null. - */ - sortSubgroups(): ((a: number, b: number) => number) | null; - /** - * Removes the current subgroup comparator and returns this chord layout. - * - * @param compare Use null to remove the current comparator function, if any. - */ - sortSubgroups(compare: null): this; - /** - * Sets the subgroup comparator to the specified function and returns this chord layout. - * - * If the subgroup comparator is non-null, it is used to sort the subgroups corresponding to matrix[i][0 … n - 1] - * for a given group i by their total outflow. See also d3.ascending and d3.descending. - * - * @param compare A comparator function, e.g. d3.ascending or d3.descending. - */ - sortSubgroups(compare: (a: number, b: number) => number): this; - - /** - * Returns the current chord comparator, which defaults to null. - */ - sortChords(): ((a: number, b: number) => number) | null; - /** - * Removes the current chord comparator and returns this chord layout. - * - * @param compare Use null to remove the current comparator function, if any. - */ - sortChords(compare: null): this; - /** - * Sets the chord comparator to the specified function and returns this chord layout. - * - * If the chord comparator is non-null, it is used to sort the chords by their combined flow; this only affects the z-order of the chords. - * See also d3.ascending and d3.descending. - * - * @param compare A comparator function, e.g. d3.ascending or d3.descending. - */ - sortChords(compare: (a: number, b: number) => number): this; -} - -/** - * Constructs a new chord diagram layout with the default settings. - */ -export function chord(): ChordLayout; - -// --------------------------------------------------------------------- -// Ribbon -// --------------------------------------------------------------------- - -/** - * A minimal interface to support the default accessors used by RibbonGenerator for properties of - * source and target objects of a Ribbon. - * - * (Corresponds to ChordSubgroup) - */ -export interface RibbonSubgroup { - /** - * Start angle of the ribbon subgroup in radians - */ - startAngle: number; - /** - * End angle of the ribbon subgroup in radians - */ - endAngle: number; - /** - * Radius of the ribbon subgroup - */ - radius: number; -} - -/** - * A minimal interface to support the default source and target accessors used by RibbonGenerator. - * (Corresponds to Chord) - */ -export interface Ribbon { - /** - * Ribbon subgroup constituting the source of the Ribbon - */ - source: RibbonSubgroup; - /** - * Ribbon subgroup constituting the target of the Ribbon - */ - target: RibbonSubgroup; -} - -/** - * - * A ribbon generator to support rendering of chords in a chord diagram. - * - * The first generic corresponds to the type of the "this" context within which the ribbon generator and its accessor functions will be invoked. - * - * The second generic corresponds to the datum type representing a chord for which the ribbon is to be generated. The default type is Ribbon. - * - * The third generic corresponds to the datum type of the chord subgroup, i.e. source or target of the cord. The default type is RibbonSubgroup. - */ -export interface RibbonGenerator<This, RibbonDatum, RibbonSubgroupDatum> { - /** - * Generates a ribbon for the given arguments. - * - * IMPORTANT: If the ribbon generator has been configured with a rendering context, - * then the ribbon is rendered to this context as a sequence of path method calls and this function returns void. - * - * The "this" context within which this function is invoked, will be the context within which the accessor methods of the generator are invoked. - * All arguments passed into this function, will be passed to the accessor functions of the generator. - * - * @param d The datum representing the chord for which the ribbon is to be generated. - */ - (this: This, d: RibbonDatum, ...args: any[]): void; - /** - * Generates a ribbon for the given arguments. - * - * IMPORTANT: If the rendering context of the ribbon generator is null, - * then the ribbon is returned as a path data string. - * - * The "this" context within which this function is invoked, will be the context within which the accessor methods of the generator are invoked. - * All arguments passed into this function, will be passed to the accessor functions of the generator. - * - * @param d The datum representing the chord for which the ribbon is to be generated. - */ - (this: This, d: RibbonDatum, ...args: any[]): string | null; - - /** - * Returns the current source accessor, which defaults to a function returning the "source" property of the first argument passed into the accessor. - */ - source(): (this: This, d: RibbonDatum, ...args: any[]) => RibbonSubgroupDatum; - /** - * Sets the source accessor to the specified function and returns this ribbon generator. - * - * @param source An accessor function returning the source datum of the chord. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that were passed into the ribbon generator. - */ - source(source: (this: This, d: RibbonDatum, ...args: any[]) => RibbonSubgroupDatum): this; - - /** - * Returns the current target accessor, which defaults to a function returning the "target" property of the first argument passed into the accessor. - */ - target(): (this: This, d: RibbonDatum, ...args: any[]) => RibbonSubgroupDatum; - /** - * Sets the target accessor to the specified function and returns this ribbon generator. - * - * @param target An accessor function returning the target datum of the chord. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that were passed into the ribbon generator. - */ - target(target: (this: This, d: RibbonDatum, ...args: any[]) => RibbonSubgroupDatum): this; - - /** - * Returns the current radius accessor, which defaults to a function returning the "radius" property (assumed to be a number) of the source or - * target object returned by the source or target accessor, respectively. - */ - radius(): (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number; - /** - * Sets the radius to a fixed number and returns this ribbon generator. - * - * @param radius A fixed numeric value for the radius. - */ - radius(radius: number): this; - /** - * Sets the radius accessor to the specified function and returns this ribbon generator. - * - * @param radius An accessor function which is invoked for the source and target of the chord. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives as the first argument the source or target object returned by the respective source or target accessor function of the generator. - * It is also passed any additional arguments that were passed into the generator, with the exception of the first element representing the chord datum itself. - * The function returns the radius value. - */ - radius(radius: (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number): this; - - /** - * Returns the current start angle accessor, which defaults to a function returning the "startAngle" property (assumed to be a number in radians) of the source or - * target object returned by the source or target accessor, respectively. - */ - startAngle(): (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number; - /** - * Sets the start angle to a fixed number in radians and returns this ribbon generator. - * - * @param angle A fixed numeric value for the start angle in radians. - */ - startAngle(angle: number): this; - /** - * Sets the start angle accessor to the specified function and returns this ribbon generator. - * - * @param angle An accessor function which is invoked for the source and target of the chord. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives as the first argument the source or target object returned by the respective source or target accessor function of the generator. - * It is also passed any additional arguments that were passed into the generator, with the exception of the first element representing the chord datum itself. - * The function returns the start angle in radians. - */ - startAngle(angle: (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number): this; - - /** - * Returns the current end angle accessor, which defaults to a function returning the "endAngle" property (assumed to be a number in radians) of the source or - * target object returned by the source or target accessor, respectively. - */ - endAngle(): (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number; - /** - * Sets the end angle to a fixed number in radians and returns this ribbon generator. - * - * @param angle A fixed numeric value for the end angle in radians. - */ - endAngle(angle: number): this; - /** - * Sets the end angle accessor to the specified function and returns this ribbon generator. - * - * @param angle An accessor function which is invoked for the source and target of the chord. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives as the first argument the source or target object returned by the respective source or target accessor function of the generator. - * It is also passed any additional arguments that were passed into the generator, with the exception of the first element representing the chord datum itself. - * The function returns the end angle in radians. - */ - endAngle(angle: (this: This, d: RibbonSubgroupDatum, ...args: any[]) => number): this; - - /** - * Returns the current rendering context, which defaults to null. - */ - context(): CanvasRenderingContext2D | null; - /** - * Sets the rendering context and returns this ribbon generator. - * - * If the context is not null, then the generated ribbon is rendered to this context as a sequence of path method calls. - * - * @param context The rendering context. - */ - context(context: CanvasRenderingContext2D): this; - /** - * Sets the rendering context to null and returns this ribbon generator. - * - * A path data string representing the generated ribbon will be returned when the generator is invoked with data. See also d3-path. - * - * @param context null, to remove rendering context. - */ - context(context: null): this; -} - -/** - * Creates a new ribbon generator with the default settings. - */ -export function ribbon(): RibbonGenerator<any, Ribbon, RibbonSubgroup>; -/** - * Creates a new ribbon generator with the default settings. - * - * Accessor functions must be configured for the ribbon generator, should the datum types differ from the defaults. - * - * The first generic corresponds to the datum type representing a chord for which the ribbon is to be generated. The default type is Chord. - * - * The second generic corresponds to the datum type of the chord subgroup, i.e. source or target of the cord. The default type is ChordSubgroup. - */ -export function ribbon<Datum, SubgroupDatum>(): RibbonGenerator<any, Datum, SubgroupDatum>; -/** - * Creates a new ribbon generator with the default settings. - * - * Accessor functions must be configured for the ribbon generator, should the datum types differ from the defaults. - * - * The first generic corresponds to the type of the "this" context within which the ribbon generator and its accessor functions will be invoked. - * - * The second generic corresponds to the datum type representing a chord for which the ribbon is to be generated. The default type is Chord. - * - * The third generic corresponds to the datum type of the chord subgroup, i.e. source or target of the cord. The default type is ChordSubgroup. - */ -export function ribbon<This, Datum, SubgroupDatum>(): RibbonGenerator<This, Datum, SubgroupDatum>; diff --git a/node_modules/@types/d3-chord/package.json b/node_modules/@types/d3-chord/package.json deleted file mode 100644 index 86ba51934997cd8172df4af65e6d0023b9579a58..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-chord/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "@types/d3-chord@^1", - "_id": "@types/d3-chord@1.0.10", - "_inBundle": false, - "_integrity": "sha512-U6YojfET6ITL1/bUJo+/Lh3pMV9XPAfOWwbshl3y3RlgAX9VO/Bxa13IMAylZIDY4VsA3Gkh29kZP1AcAeyoYA==", - "_location": "/@types/d3-chord", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-chord@^1", - "name": "@types/d3-chord", - "escapedName": "@types%2fd3-chord", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-1.0.10.tgz", - "_shasum": "4c14ca40f61b89a3c615d63f5a34fcc81390805c", - "_spec": "@types/d3-chord@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-chord module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-chord", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-chord" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "3907e66566d76e375b55d75c557810b1f9f777e4bef785ebfb874592a3a0283b", - "version": "1.0.10" -} diff --git a/node_modules/@types/d3-collection/LICENSE b/node_modules/@types/d3-collection/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-collection/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-collection/README.md b/node_modules/@types/d3-collection/README.md deleted file mode 100644 index c49604f5b1a205447677badeeb66d190a5928ff7..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-collection/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-collection` - -# Summary -This package contains type definitions for D3JS d3-collection module (https://github.com/d3/d3-collection/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-collection. - -### Additional Details - * Last updated: Tue, 20 Oct 2020 06:39:43 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), and [Boris Yankov](https://github.com/borisyankov). diff --git a/node_modules/@types/d3-collection/index.d.ts b/node_modules/@types/d3-collection/index.d.ts deleted file mode 100644 index 028d06e7ea9e6c21f1722fb4e03bce6492347908..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-collection/index.d.ts +++ /dev/null @@ -1,483 +0,0 @@ -// Type definitions for D3JS d3-collection module 1.0 -// Project: https://github.com/d3/d3-collection/, https://d3js.org/d3-collection -// Definitions by: Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.0.7 - -/** - * Reference type things that can be coerced to string implicitly - */ -export interface Stringifiable { - toString(): string; -} - -// --------------------------------------------------------------------- -// Objects -// --------------------------------------------------------------------- - -/** - * Returns an array containing the property names of the specified object (an associative array). - * The order of the returned array is undefined. - * - * @param obj An object. - */ -export function keys(obj: object): string[]; - -/** - * Returns an array containing the property values of the specified object (an associative array). - * The order of the returned array is undefined. - * - * The generic refers to the data type of the values. - * - * @param obj An object. - */ -export function values<T>(obj: { [key: string]: T } | ArrayLike<T>): T[]; -/** - * Returns an array containing the property values of the specified object (an associative array). - * The order of the returned array is undefined. - * - * @param obj An object. - */ -export function values(obj: object): any[]; - -/** - * Returns an array containing the property keys and values of the specified object (an associative array). - * Each entry is an object with a key and value attribute.The order of the returned array is undefined. - * - * The generic refers to the data type of the values. - * - * @param obj An object. - */ -export function entries<T>(obj: { [key: string]: T } | ArrayLike<T>): Array<{ key: string, value: T }>; -/** - * Returns an array containing the property keys and values of the specified object (an associative array). - * Each entry is an object with a key and value attribute.The order of the returned array is undefined. - * - * @param obj An object. - */ -export function entries(obj: object): Array<{ key: string, value: any }>; - -// --------------------------------------------------------------------- -// map / Map -// --------------------------------------------------------------------- - -/** - * A data structure similar to ES6 Maps, but with a few differences: - * - Keys are coerced to strings. - * - map.each, not map.forEach. (Also, no thisArg.) - * - map.remove, not map.delete. - * - map.entries returns an array of {key, value} objects, not an iterator of [key, value]. - * - map.size is a method, not a property; also, there’s map.empty. - * - * The generic refers to the data type of the map entry values. - */ -export interface Map<T> { - /** - * Returns true if and only if this map has an entry for the specified key string. - * Note: the value may be null or undefined. - * - * @param key Key of map entry to access. - */ - has(key: string): boolean; - /** - * Returns the value for the specified key string. - * If the map does not have an entry for the specified key, returns undefined. - * - * @param key Key of map entry to access. - */ - get(key: string): T | undefined; - /** - * Sets the value for the specified key string and returns the updated map. - * If the map previously had an entry for the same key string, the old entry is replaced with the new value. - * - * @param key Key of map entry to access. - * @param value Value to set for entry at key. - */ - set(key: string, value: T): this; - /** - * If the map has an entry for the specified key string, removes the entry and returns true. - * Otherwise, this method does nothing and returns false. - * - * @param key Map key for which to remove the entry. - */ - remove(key: string): boolean; - /** - * Removes all entries from this map. - */ - clear(): void; - /** - * Returns an array of string keys for every entry in this map. - * The order of the returned keys is arbitrary. - */ - keys(): string[]; - /** - * Returns an array of values for every entry in this map. - * The order of the returned values is arbitrary. - */ - values(): T[]; - /** - * Returns an array of key-value objects for each entry in this map. The order of the returned entries is arbitrary. - * Each entry’s key is a string, but the value can have arbitrary type. - */ - entries(): Array<{ key: string, value: T }>; - /** - * Calls the specified function for each entry in this map and returns undefined. - * The iteration order is arbitrary. - * - * @param func Function to call for each entry. The function is passed the entry’s value and key as arguments, - * followed by the map itself. - */ - each(func: (value: T, key: string, map: Map<T>) => void): void; - /** - * Returns true if and only if this map has zero entries. - */ - empty(): boolean; - /** - * Returns the number of entries in this map. - */ - size(): number; -} - -/** - * Constructs a new empty map. - * - * The generic refers to the data type of the map entry values. - */ -export function map<T = any>(): Map<T>; -/** - * Constructs a new map by copying another map. - * - * The generic refers to the data type of the map entry values. - * - * @param d3Map A D3 Map. - */ -export function map<T>(d3Map: Map<T>): Map<T>; -/** - * Constructs a new map by copying all enumerable properties from the specified object into this map. - * - * The generic refers to the data type of the map entry values. - * - * @param obj Object to construct the map from. - */ -export function map<T>(obj: { [key: string]: T }): Map<T>; -/** - * Constructs a new map by copying all enumerable properties from the specified object into this map. - * - * The generic refers to the data type of the map entry values. - * - * @param obj Object to construct the map from. - */ -export function map<T>(obj: { [key: number]: T }): Map<T>; -/** - * Constructs a new map from the elements of an array. - * An optional key function may be specified to compute the key for each value in the array. - * - * The generic refers to the data type of the map entry values. - * - * @param array Array to convert into a map - * @param key An optional key function. The functions is invoked for each element in the array being passed - * the element's value , it's zero-based index in the array, and the array itself. The function must return a unique string - * to be used as the map entry's key. - */ -export function map<T>(array: T[], key?: (value: T, i?: number, array?: T[]) => string): Map<T>; -/** - * Constructs a new map by copying all enumerable properties from the specified object into this map. - * - * @param obj Object to construct the map from. - */ -export function map(obj: object): Map<any>; - -// --------------------------------------------------------------------- -// set / Set -// --------------------------------------------------------------------- - -/** - * A data structure similar to ES6 Sets, but with a few differences: - * - * - Values are coerced to strings. - * - set.each, not set.forEach. (Also, no thisArg.) - * - set.remove, not set.delete. - * - set.size is a method, not a property; also, there’s set.empty. - */ -export interface Set { - /** - * Returns true if and only if this set has an entry for the specified value string. - * - * @param value Value whose membership in the class to test. - */ - has(value: string | Stringifiable): boolean; - /** - * Adds the specified value string to this set and returns the set. - * - * @param value Value to add to set. - */ - add(value: string | Stringifiable): this; - /** - * If the set contains the specified value string, removes it and returns true. - * Otherwise, this method does nothing and returns false. - * - * @param value Value to remove from set. - */ - remove(value: string | Stringifiable): boolean; - /** - * Removes all values from this set. - */ - clear(): void; - /** - * Returns an array of the string values in this set. The order of the returned values is arbitrary. - * Can be used as a convenient way of computing the unique values for a set of strings. - */ - values(): string[]; - /** - * Calls the specified function for each value in this set, passing the value as the first two arguments (for symmetry with map.each), - * followed by the set itself. Returns undefined. - * The iteration order is arbitrary. - * - * @param func Function to call for each set element. The first and second argument of the function are both passed - * the 'value' of the set entry for consistency with the map.each(...) signature, as a third argument the entire set is passed in. - */ - each(func: (value: string, valueRepeat: string, set: Set) => void): void; - /** - * Returns true if and only if this set has zero values. - */ - empty(): boolean; - /** - * Returns the number of values in this set. - */ - size(): number; -} - -/** - * Constructs a new empty set. - */ -export function set(): Set; -/** - * Constructs a new set by copying an existing set. - * - * @param set A D3 set. - */ -export function set(d3Set: Set): Set; -/** - * Constructs a new set by adding the given array of string values to the returned set. - * - * @param array An array of strings of values which can be implicitly converted to strings. - */ -export function set(array: Array<string | Stringifiable>): Set; -/** - * Constructs a new set from an array, adds an array of mapped string values to the returned set. - * The specified accessor function is invoked equivalent to calling array.map(accessor) before constructing the set. - * - * The generic refers to the data type of the array elements. - * - * @param array An Array of values to map and add as set elements. - * @param key An accessor function used to map the original array elements to string elements to be added to the set. - * The function is invoked for each array element, being passed the element's value, it's zero-based index in the array, and the array itself. - */ -export function set<T>(array: T[], key: (value: T, index: number, array: T[]) => string): Set; - -// --------------------------------------------------------------------- -// nest / Nest -// --------------------------------------------------------------------- - -/** - * A more formal definition of the nested array returned by Nest.entries(...). This data structure is intended as a reference only. - * - * As the union types cannot be ex ante simplified without knowledge - * of the nesting level (number of key(...) operations) and whether the data were rolled-up, this data structure becomes cumbersome - * to use in practice. This is particularly true for discrimination of array element types. - * The use of the rollup function, or lack thereof, also determines whether NestedArray has the 'values' property - * with an array of type Datum at leaf level, or has a rolled-up 'value' property. - */ -// tslint:disable-next-line:no-empty-interface -export interface NestedArray<Datum, RollupType> extends Array<{ key: string, values: NestedArray<Datum, RollupType> | Datum[] | undefined, value: RollupType | undefined }> { } - -/** - * A more formal definition of the nested array returned by Nest.map(...). This data structure is intended as a reference only. - * - * As the union types cannot be ex ante simplified without knowledge - * of the nesting level (number of key(...) operations) and whether the data were rolled-up, this data structure becomes cumbersome - * to use in practice. - */ -// tslint:disable-next-line:no-empty-interface -export interface NestedMap<Datum, RollupType> extends Map<NestedMap<Datum, RollupType> | Datum[] | RollupType> { } - -/** - * A more formal definition of the nested array returned by Nest.object(...). This data structure is intended as a reference only. - * - * As the union types cannot be ex ante simplified without knowledge - * of the nesting level (number of key(...) operations) and whether the data were rolled-up, this data structure becomes cumbersome - * to use in practice. - */ -export interface NestedObject<Datum, RollupType> { - [key: string]: NestedObject<Datum, RollupType> | Datum[] | RollupType; -} - -/** - * A nest operator for generating nested data structures from arrays. - * - * Nesting allows elements in an array to be grouped into a hierarchical tree structure; - * think of it like the GROUP BY operator in SQL, except you can have multiple levels of grouping, and the resulting output is a tree rather than a flat table. - * The levels in the tree are specified by key functions. The leaf nodes of the tree can be sorted by value, while the internal nodes can be sorted by key. - * An optional rollup function will collapse the elements in each leaf node using a summary function. - * The nest operator is reusable, and does not retain any references to the data that is nested. - * - * The first generic refers to the data type of the array elements on which the nest operator will - * be invoked. - * - * The second generic refers to the data type returned by the roll-up function to be used with the - * nest operator. - */ -export interface Nest<Datum, RollupType> { - /** - * Registers a new key function and returns this nest operator. - * The key function will be invoked for each element in the input array and must return a string identifier to assign the element to its group. - * Most often, the function is a simple accessor. (Keys functions are not passed the input array index.) - * - * Each time a key is registered, it is pushed onto the end of the internal array of keys, - * and the nest operator applies an additional level of nesting. - * - * @param func A key accessor function being invoked for each element. - */ - key(func: (datum: Datum) => string): this; - /** - * Sorts key values for the current key using the specified comparator function, such as d3.ascending or d3.descending. - * - * If no comparator is specified for the current key, the order in which keys will be returned is undefined. - * - * Note that this only affects the result of nest.entries; - * the order of keys returned by nest.map and nest.object is always undefined, regardless of comparator. - * - * @param comparator A comparator function which returns a negative value if, according to the sorting criterion, - * a is less than b, or a positive value if a is greater than b, or 0 if the two values are the same under the sorting criterion. - */ - sortKeys(comparator: (a: string, b: string) => number): this; - /** - * Sorts leaf elements using the specified comparator function, such as d3.ascending or d3.descending. - * This is roughly equivalent to sorting the input array before applying the nest operator; - * however it is typically more efficient as the size of each group is smaller. - * - * If no value comparator is specified, elements will be returned in the order they appeared in the input array. - * This applies to nest.map, nest.entries and nest.object. - * - * @param comparator A comparator function which returns a negative value if, according to the sorting criterion, - * a is less than b, or a positive value if a is greater than b, or 0 if the two values are the same under the sorting criterion. - */ - sortValues(comparator: (a: Datum, b: Datum) => number): this; - /** - * Specifies a rollup function to be applied on each group of leaf elements and returns this nest operator. - * The return value of the rollup function will replace the array of leaf values in either the associative array returned by nest.map or nest.object; - * for nest.entries, it replaces the leaf entry.values with entry.value. - * - * If a leaf comparator is specified, the leaf elements are sorted prior to invoking the rollup function. - * - * @param func A function computing the rollup value for a group of leaf elements. - */ - rollup(func: (values: Datum[]) => RollupType): this; - /** - * Applies the nest operator to the specified array, returning a nested map. - * - * Each entry in the returned map corresponds to a distinct key value returned by the first key function. - * The entry value depends on the number of registered key functions: if there is an additional key, the value is another map; - * otherwise, the value is the array of elements filtered from the input array that have the given key value. - * - * NOTE: - * - * Strictly speaking the return type of this method is: - * - * (1) NestedMap<Datum, RollupType>, if at least one key function was defined, - * - * (2) Datum[], if neither a key nor a rollup function were defined, and - * - * (3) RollupType, if no keys, but a rollup function were defined. - * - * Since (2) and (3) are edge cases with little to no practical relevance, they have been omitted in favour of ease-of-use. - * - * Should you determine that this simplification creates an issue in practice, please file an issue on - * https://github.com/DefinitelyTyped/DefinitelyTyped. - * - * The formal, generalized return type under (1) is cumbersome to work with in practice. The recommended approach - * is to define the type of the variable being assigned the return value using knowledge specific to the use-case at hand. - * I.e. making use of knowing how many keys are applied, and the nature of any roll-up function will make working with - * the variable more meaningful, despite the compromise in type-safety. - * - * @param array An array to create a nested data structure from. - */ - map(array: Datum[]): Map<any>; - /** - * Applies the nest operator to the specified array, returning a nested object. - * Each entry in the returned associative array corresponds to a distinct key value returned by the first key function. - * The entry value depends on the number of registered key functions: if there is an additional key, the value is another associative array; - * otherwise, the value is the array of elements filtered from the input array that have the given key value. - * - * WARNING: this method is unsafe if any of the keys conflict with built-in JavaScript properties, such as __proto__. - * If you cannot guarantee that the keys will be safe, you should use nest.map instead. - * - * NOTE: - * - * Strictly speaking the return type of this method is: - * - * (1) NestedObject<Datum, RollupType>, if at least one key function was defined, - * - * (2) Datum[], if neither a key nor a rollup function were defined, and - * - * (3) RollupType, if no keys, but a rollup function were defined. - * - * Since (2) and (3) are edge cases with little to no practical relevance, they have been omitted in favour of ease-of-use. - * - * Should you determine that this simplification creates an issue in practice, please file an issue on - * https://github.com/DefinitelyTyped/DefinitelyTyped. - * - * The formal, generalized return type under (1) is cumbersome to work with in practice. The recommended approach - * is to define the type of the variable being assigned the return value using knowledge specific to the use-case at hand. - * I.e. making use of knowing how many keys are applied, and the nature of any roll-up function will make working with - * the variable more meaningful, despite the compromise in type-safety. - * - * @param array An array to create a nested data structure from. - */ - object(array: Datum[]): { [key: string]: any }; - /** - * Applies the nest operator to the specified array, returning an array of key-values entries. - * Conceptually, this is similar to applying map.entries to the associative array returned by nest.map, - * but it applies to every level of the hierarchy rather than just the first (outermost) level. - * Each entry in the returned array corresponds to a distinct key value returned by the first key function. - * The entry value depends on the number of registered key functions: if there is an additional key, the value is another nested array of entries; - * otherwise, the value is the array of elements filtered from the input array that have the given key value. - * - * NOTE: - * - * Strictly speaking the return type of this method is: - * - * (1) NestedArray<Datum, RollupType>, if at least one key function was defined, - * - * (2) Datum[], if neither a key nor a rollup function were defined, and - * - * (3) RollupType, if no keys, but a rollup function were defined. - * - * Since (2) and (3) are edge cases with little to no practical relevance, they have been omitted in favour of ease-of-use. - * - * Should you determine that this simplification creates an issue in practice, please file an issue on - * https://github.com/DefinitelyTyped/DefinitelyTyped. - * - * The formal, generalized return type under (1) is cumbersome to work with in practice. The recommended approach - * is to define the type of the variable being assigned the return value using knowledge specific to the use-case at hand. - * I.e. making use of knowing how many keys are applied, and the nature of any roll-up function will make working with - * the variable more meaningful, despite the compromise in type-safety. - * - * @param array An array to create a nested data structure from. - */ - entries(array: Datum[]): Array<{ key: string; values: any; value: RollupType | undefined }>; -} - -/** - * Creates a new nest operator. - * - * The first generic refers to the data type of the array elements on which the nest operator will - * be invoked. - * - * The second generic refers to the data type returned by the roll-up function to be used with the - * nest operator. If not explicitly set, this generic parameter defaults to undefined, implying that - * no rollup function will be applied. - */ -export function nest<Datum, RollupType = undefined>(): Nest<Datum, RollupType>; diff --git a/node_modules/@types/d3-collection/package.json b/node_modules/@types/d3-collection/package.json deleted file mode 100644 index ae699bf8adc53cf7cacfb7a914c7ef5094d1916d..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-collection/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "_from": "@types/d3-collection@*", - "_id": "@types/d3-collection@1.0.9", - "_inBundle": false, - "_integrity": "sha512-Oeaor3M3YjN+GH9dYXY3iKeTVTlNVNveLpvb3coDTIcIklVluP9aze++ByNfkZHDeu7eaQTWBloBeoPQNtrG7w==", - "_location": "/@types/d3-collection", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-collection@*", - "name": "@types/d3-collection", - "escapedName": "@types%2fd3-collection", - "scope": "@types", - "rawSpec": "*", - "saveSpec": null, - "fetchSpec": "*" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-collection/-/d3-collection-1.0.9.tgz", - "_shasum": "36d6b9d2637fc30d2c7c29c585704379395195a1", - "_spec": "@types/d3-collection@*", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-collection module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-collection", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-collection" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "4ac65b65ef954d2bae2bb2d98b2a767a00993da33718c32c2c020e65b9789a81", - "version": "1.0.9" -} diff --git a/node_modules/@types/d3-color/LICENSE b/node_modules/@types/d3-color/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-color/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-color/README.md b/node_modules/@types/d3-color/README.md deleted file mode 100644 index 2b9000462754aba47994fd3a9c57ba1b485767fc..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-color/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-color` - -# Summary -This package contains type definitions for D3JS d3-color module (https://github.com/d3/d3-color/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-color/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 21:32:42 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), [Hugues Stefanski](https://github.com/ledragon), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-color/index.d.ts b/node_modules/@types/d3-color/index.d.ts deleted file mode 100644 index 603b860d6b740eb89d238534b3aeddc152627730..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-color/index.d.ts +++ /dev/null @@ -1,623 +0,0 @@ -// Type definitions for D3JS d3-color module 1.4 -// Project: https://github.com/d3/d3-color/, https://d3js.org/d3-color -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Hugues Stefanski <https://github.com/ledragon> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// Last module patch version validated against: 1.4.1 - -// --------------------------------------------------------------------------- -// Shared Type Definitions and Interfaces -// --------------------------------------------------------------------------- - -/** - * Type allowing for color objects from a specified color space - */ -export type ColorSpaceObject = RGBColor | HSLColor | LabColor | HCLColor | CubehelixColor; - -/** - * A helper interface of methods common to color objects (including colors defined outside the d3-color standard module, - * e.g. in d3-hsv). This interface - */ -export interface ColorCommonInstance { - /** - * Returns true if and only if the color is displayable on standard hardware. - * For example, this returns false for an RGB color if any channel value is less than zero or greater than 255, or if the opacity is not in the range [0, 1]. - */ - displayable(): boolean; - /** - * Returns a string representing this color according to the CSS Object Model specification, - * such as rgb(247, 234, 186) or rgba(247, 234, 186, 0.2). - * If this color is not displayable, a suitable displayable color is returned instead. - * For example, RGB channel values greater than 255 are clamped to 255. - */ - toString(): string; - /** - * Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be. - * If k is not specified, it defaults to 1. The behavior of this method is dependent on the implementing color space. - * - * @param k A color space dependent number to determine, how much brighter the returned color should be. - */ - brighter(k?: number): this; - /** - * Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be. - * If k is not specified, it defaults to 1. The behavior of this method is dependent on the implementing color space. - * - * @param k A color space dependent number to determine, how much darker the returned color should be. - */ - darker(k?: number): this; - /** - * Returns the RGB equivalent of this color. For RGB colors, that’s "this". - */ - rgb(): RGBColor; - /** - * Returns a hexadecimal string representing this color. - * If this color is not displayable, a suitable displayable color is returned instead. - * For example, RGB channel values greater than 255 are clamped to 255. - */ - hex(): string; -} - -/** - * A Color object which serves as a base class for - * colorspace-specific sub-class implementations. - */ -export interface Color { - /** - * Returns true if and only if the color is displayable on standard hardware. - * For example, this returns false for an RGB color if any channel value is less than zero or greater than 255, or if the opacity is not in the range [0, 1]. - */ - displayable(): boolean; // Note: While this method is used in prototyping for colors of specific colorspaces, it should not be called directly, as 'this.rgb' would not be implemented on Color - /** - * Returns a string representing this color according to the CSS Object Model specification, - * such as rgb(247, 234, 186) or rgba(247, 234, 186, 0.2). - * If this color is not displayable, a suitable displayable color is returned instead. - * For example, RGB channel values greater than 255 are clamped to 255. - */ - toString(): string; // Note: While this method is used in prototyping for colors of specific colorspaces, it should not be called directly, as 'this.rgb' would not be implemented on Color - /** - * Returns a hexadecimal string representing this color in RGB space, such as #f7eaba. - * If this color is not displayable, a suitable displayable color is returned instead. - * For example, RGB channel values greater than 255 are clamped to 255. - */ - formatHex(): string; - /** - * Returns a string representing this color according to the CSS Color Module Level 3 specification, such as hsl(257, 50%, 80%) or hsla(257, 50%, 80%, 0.2). - * If this color is not displayable, a suitable displayable color is returned instead by clamping S and L channel values to the interval [0, 100]. - */ - formatHsl(): string; - /** - * Returns a string representing this color according to the CSS Object Model specification, such as rgb(247, 234, 186) or rgba(247, 234, 186, 0.2). - * If this color is not displayable, a suitable displayable color is returned instead by clamping RGB channel values to the interval [0, 255]. - */ - formatRgb(): string; - /** - * @deprecated Use color.formatHex. - */ - hex(): string; -} - -/** - * A Color factory object, which may also be used with instanceof to test if an object is a color instance. - */ -export interface ColorFactory extends Function { - /** - * Parses the specified CSS Color Module Level 3 specifier string, returning an RGB or HSL color. - * If the specifier was not valid, null is returned. - * - * @param cssColorSpecifier A CSS Color Module Level 3 specifier string. - */ - (cssColorSpecifier: string): RGBColor | HSLColor | null; - /** - * Converts the provided color instance and returns an RGB or HSL color. - * - * @param color A permissible color space instance. - */ - (color: ColorSpaceObject | ColorCommonInstance): RGBColor | HSLColor; - /** - * Prototype of the factory, which can be used for instanceof testing - */ - readonly prototype: Color; -} - -/** - * An RGB color object. - */ -export interface RGBColor extends Color { - /** - * Value of red channel - */ - r: number; - /** - * Value of green channel - */ - g: number; - /** - * Value of blue channel - */ - b: number; - /** - * Opacity value - */ - opacity: number; - /** - * Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be. - * If k is not specified, it defaults to 1. - * - * @param k A color space dependent number to determine, how much brighter the returned color should be. - */ - brighter(k?: number): this; - /** - * Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be. - * If k is not specified, it defaults to 1. - * - * @param k A color space dependent number to determine, how much darker the returned color should be. - */ - darker(k?: number): this; - /** - * Returns the RGB equivalent of this color. - */ - rgb(): this; - /** - * Returns a copy of this color. - * - * @param values If values is specified, any enumerable own properties of values are assigned to the new returned color. - */ - copy(values?: { r?: number; g?: number; b?: number; opacity?: number }): this; -} - -/** - * An RGB color factory object, which may also be used with instanceof to test if an object - * is an RGB color instance. - */ -export interface RGBColorFactory extends Function { - /** - * Constructs a new RGB color based on the specified channel values and opacity. - * - * @param r Red channel value. - * @param g Green channel value. - * @param b Blue channel value. - * @param opacity Optional opacity value, defaults to 1. - */ - (r: number, g: number, b: number, opacity?: number): RGBColor; - /** - * Parses the specified CSS Color Module Level 3 specifier string, returning an RGB color. - * If the specifier was not valid, null is returned. - * - * @param cssColorSpecifier A CSS Color Module Level 3 specifier string. - */ - (cssColorSpecifier: string): RGBColor; - /** - * Converts the provided color instance and returns an RGB color. The color instance is converted to the RGB color space using color.rgb. - * Note that unlike color.rgb this method always returns a new instance, even if color is already an RGB color. - * - * @param color A permissible color space instance. - */ - (color: ColorSpaceObject | ColorCommonInstance): RGBColor; - /** - * Prototype of the factory, which can be used for instanceof testing - */ - readonly prototype: RGBColor; -} - -/** - * An HSL color object. - */ -export interface HSLColor extends Color { - /** - * Hue channel value. - */ - h: number; - /** - * Saturation channel value. - */ - s: number; - /** - * Lightness channel value. - */ - l: number; - /** - * Opacity value. - */ - opacity: number; - /** - * Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be. - * If k is not specified, it defaults to 1. - * - * @param k A color space dependent number to determine, how much brighter the returned color should be. - */ - brighter(k?: number): this; - /** - * Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be. - * If k is not specified, it defaults to 1. - * - * @param k A color space dependent number to determine, how much darker the returned color should be. - */ - darker(k?: number): this; - /** - * Returns the RGB color equivalent of this color. - */ - rgb(): RGBColor; - /** - * Returns a copy of this color. - * - * @param values If values is specified, any enumerable own properties of values are assigned to the new returned color. - */ - copy(values?: { h?: number; s?: number; l?: number; opacity?: number }): this; -} - -/** - * An HSL color factory object, which may also be used with instanceof to test if an object - * is an HSL color instance. - */ -export interface HSLColorFactory extends Function { - /** - * Constructs a new HSL color based on the specified channel values and opacity. - * - * @param h Hue channel value. - * @param s Saturation channel value. - * @param l Lightness channel value. - * @param opacity Optional opacity value, defaults to 1. - */ - (h: number, s: number, l: number, opacity?: number): HSLColor; - /** - * Parses the specified CSS Color Module Level 3 specifier string, returning an HSL color. - * If the specifier was not valid, null is returned. - * - * @param cssColorSpecifier A CSS Color Module Level 3 specifier string. - */ - (cssColorSpecifier: string): HSLColor; - /** - * Converts the provided color instance and returns an HSL color. - * The color instance is converted to the RGB color space using color.rgb and then converted to HSL. - * (Colors already in the HSL color space skip the conversion to RGB.) - * - * @param color A permissible color space instance. - */ - (color: ColorSpaceObject | ColorCommonInstance): HSLColor; - /** - * Prototype of the factory, which can be used for instanceof testing - */ - readonly prototype: HSLColor; -} - -/** - * A Lab (CIELAB) color object. - */ -export interface LabColor extends Color { - /** - * Lightness typically in the range [0, 100]. - */ - l: number; - /** - * Position between red/magenta and green typically in [-160, +160]. - */ - a: number; - /** - * Position between yellow and blue typically in [-160, +160]. - */ - b: number; - /** - * Opacity value - */ - opacity: number; - /** - * Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be. - * If k is not specified, it defaults to 1. - * - * @param k A color space dependent number to determine, how much brighter the returned color should be. - */ - brighter(k?: number): this; - /** - * Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be. - * If k is not specified, it defaults to 1. - * - * @param k A color space dependent number to determine, how much darker the returned color should be. - */ - darker(k?: number): this; - /** - * Returns the RGB color equivalent of this color. - */ - rgb(): RGBColor; - /** - * Returns a copy of this color. - * - * @param values If values is specified, any enumerable own properties of values are assigned to the new returned color. - */ - copy(values?: { l?: number; a?: number; b?: number; opacity?: number }): this; -} - -/** - * A Lab (CIELAB) color factory object, which may also be used with instanceof to test if an object - * is a Lab color instance. - */ -export interface LabColorFactory extends Function { - /** - * Constructs a new CIELAB color based on the specified channel values and opacity. - * - * @param l Lightness typically in the range [0, 100]. - * @param a Position between red/magenta and green typically in [-160, +160]. - * @param b Position between yellow and blue typically in [-160, +160]. - * @param opacity Optional opacity value, defaults to 1. - */ - (l: number, a: number, b: number, opacity?: number): LabColor; - /** - * Parses the specified CSS Color Module Level 3 specifier string, returning a Lab color. - * If the specifier was not valid, null is returned. - * - * @param cssColorSpecifier A CSS Color Module Level 3 specifier string. - */ - (cssColorSpecifier: string): LabColor; - /** - * Converts the provided color instance and returns a Lab color. - * The color instance is converted to the RGB color space using color.rgb and then converted to CIELAB. - * (Colors already in the Lab color space skip the conversion to RGB, - * and colors in the HCL color space are converted directly to CIELAB.) - * - * @param color A permissible color space instance. - */ - (color: ColorSpaceObject | ColorCommonInstance): LabColor; - /** - * Prototype of the factory, which can be used for instanceof testing - */ - readonly prototype: LabColor; -} - -/** - * A gray color factory for Lab (CIELAB) colors. - */ -export type GrayColorFactory = - /** - * Constructs a new CIELAB color with the specified l value and a = b = 0. - * - * @param l Lightness typically in the range [0, 100]. - * @param opacity Optional opacity value, defaults to 1. - */ - (l: number, opacity?: number) => LabColor; - -/** - * An HCL (CIELCH) color object. - */ -export interface HCLColor extends Color { - /** - * Hue channel value typically in [0, 360). - */ - h: number; - /** - * Chroma channel value typically in [0, 230]. - */ - c: number; - /** - * Luminance channel value typically in the range [0, 100]. - */ - l: number; - /** - * Opacity value - */ - opacity: number; - /** - * Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be. - * If k is not specified, it defaults to 1. - * - * @param k A color space dependent number to determine, how much brighter the returned color should be. - */ - brighter(k?: number): this; - /** - * Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be. - * If k is not specified, it defaults to 1. - * - * @param k A color space dependent number to determine, how much darker the returned color should be. - */ - darker(k?: number): this; - /** - * Returns the RGB color equivalent of this color. - */ - rgb(): RGBColor; - /** - * Returns a copy of this color. - * - * @param values If values is specified, any enumerable own properties of values are assigned to the new returned color. - */ - copy(values?: { h?: number; c?: number; l?: number; opacity?: number }): this; -} - -/** - * An HCL (CIELCH) color factory object, which may also be used with instanceof to test if an object - * is an HCL color instance. - */ -export interface HCLColorFactory extends Function { - /** - * Constructs a new HCL color based on the specified channel values and opacity. - * - * @param h Hue channel value typically in [0, 360). - * @param c Chroma channel value typically in [0, 230]. - * @param l Luminance channel value typically in the range [0, 100]. - * @param opacity Optional opacity value, defaults to 1. - */ - (h: number, l: number, c: number, opacity?: number): HCLColor; - /** - * Parses the specified CSS Color Module Level 3 specifier string, returning an HCL color. - * If the specifier was not valid, null is returned. - * - * @param cssColorSpecifier A CSS Color Module Level 3 specifier string. - */ - (cssColorSpecifier: string): HCLColor; - /** - * Converts the provided color instance and returns an HCL color. - * The color instance is converted to the RGB color space using color.rgb and then converted to HCL. - * (Colors already in the HCL color space skip the conversion to RGB, - * and colors in the Lab color space are converted directly to HCL.) - * - * @param color A permissible color space instance. - */ - (color: ColorSpaceObject | ColorCommonInstance): HCLColor; - /** - * Prototype of the factory, which can be used for instanceof testing - */ - readonly prototype: HCLColor; -} - -/** - * An LCH (CIELCH) color factory function to create an HCL color object. - */ -export interface LCHColorFactory { - /** - * Constructs a new HCL color based on the specified channel values and opacity. - * - * @param l Luminance channel value typically in the range [0, 100]. - * @param c Chroma channel value typically in [0, 230]. - * @param h Hue channel value typically in [0, 360). - * @param opacity Optional opacity value, defaults to 1. - */ - (l: number, c: number, h: number, opacity?: number): HCLColor; - /** - * Parses the specified CSS Color Module Level 3 specifier string, returning an HCL color. - * If the specifier was not valid, null is returned. - * - * @param cssColorSpecifier A CSS color Module Level 3 specifier string. - */ - (cssColorSpecifier: string): HCLColor; - /** - * Converts the provided color instance and returns an HCL color. - * The color instance is converted to the RGB color space using color.rgb and then converted to HCL. - * (Colors already in the HCL color space skip the conversion to RGB, - * and colors in the Lab color space are converted directly to HCL.) - * - * @param color A permissible color space instance. - */ - (color: ColorSpaceObject | ColorCommonInstance): HCLColor; -} - -/** - * Dave Green’s Cubehelix color object. - */ -export interface CubehelixColor extends Color { - /** - * Hue channel value. - */ - h: number; - /** - * Saturation channel value. - */ - s: number; - /** - * Lightness channel value. - */ - l: number; - /** - * Opacity value. - */ - opacity: number; - /** - * Returns a brighter copy of this color. If k is specified, it controls how much brighter the returned color should be. - * If k is not specified, it defaults to 1. - * - * @param k A color space dependent number to determine, how much brighter the returned color should be. - */ - brighter(k?: number): this; - /** - * Returns a darker copy of this color. If k is specified, it controls how much darker the returned color should be. - * If k is not specified, it defaults to 1. - * - * @param k A color space dependent number to determine, how much darker the returned color should be. - */ - darker(k?: number): this; - /** - * Returns the RGB color equivalent of this color. - */ - rgb(): RGBColor; - /** - * Returns a copy of this color. - * - * @param values If values is specified, any enumerable own properties of values are assigned to the new returned color. - */ - copy(values?: { h?: number; s?: number; l?: number; opacity?: number }): this; -} - -/** - * A color factory object for Dave Green's Cubehelix colors, which may also be used with instanceof to test if an object - * is a Cubehelix color instance. - */ -export interface CubehelixColorFactory extends Function { - /** - * Constructs a new Cubehelix color based on the specified channel values and opacity. - * - * @param h Hue channel value. - * @param s Saturation channel value. - * @param l Lightness channel value. - * @param opacity Optional opacity value, defaults to 1. - */ - (h: number, s: number, l: number, opacity?: number): CubehelixColor; - /** - * Parses the specified CSS Color Module Level 3 specifier string, returning an Cubehelix color. - * If the specifier was not valid, null is returned. - * - * @param cssColorSpecifier A CSS Color Module Level 3 specifier string. - */ - (cssColorSpecifier: string): CubehelixColor; - /** - * Converts the provided color instance and returns a Cubehelix color. - * The color instance is specified, it is converted to the RGB color space using color.rgb and then converted to Cubehelix. - * (Colors already in the Cubehelix color space skip the conversion to RGB.) - * - * @param color A permissible color space instance. - */ - (color: ColorSpaceObject | ColorCommonInstance): CubehelixColor; - /** - * Prototype of the factory, which can be used for instanceof testing - */ - readonly prototype: CubehelixColor; -} - -// -------------------------------------------------------------------------- -// Color object factories -// -------------------------------------------------------------------------- - -/** - * A Color factory object, which may also be used with instanceof to test if an object is a color instance. - */ -export const color: ColorFactory; - -/** - * An RGB color factory object, which may also be used with instanceof to test if an object - * is an RGB color instance. - */ -export const rgb: RGBColorFactory; - -/** - * An HSL color factory object, which may also be used with instanceof to test if an object - * is an HSL color instance. - */ -export const hsl: HSLColorFactory; - -/** - * A Lab (CIELAB) color factory object, which may also be used with instanceof to test if an object - * is a Lab color instance. - */ -export const lab: LabColorFactory; - -/** - * A gray color factory for Lab (CIELAB) colors. - */ -export const gray: GrayColorFactory; - -/** - * An HCL (CIELCH) color factory object, which may also be used with instanceof to test if an object - * is an HCL color instance. - */ -export const hcl: HCLColorFactory; - -/** - * An LCH (CIELCH) color factory function to create an HCL color object. - */ -export const lch: LCHColorFactory; - -/** - * A color factory object for Dave Green's Cubehelix colors, which may also be used with instanceof to test if an object - * is a Cubehelix color instance. - */ -export const cubehelix: CubehelixColorFactory; diff --git a/node_modules/@types/d3-color/package.json b/node_modules/@types/d3-color/package.json deleted file mode 100644 index 94a30996b383ff0c20f8bdb89e339f87383d5da1..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-color/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "@types/d3-color@^1", - "_id": "@types/d3-color@1.4.1", - "_inBundle": false, - "_integrity": "sha512-xkPLi+gbgUU9ED6QX4g6jqYL2KCB0/3AlM+ncMGqn49OgH0gFMY/ITGqPF8HwEiLzJaC+2L0I+gNwBgABv1Pvg==", - "_location": "/@types/d3-color", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-color@^1", - "name": "@types/d3-color", - "escapedName": "@types%2fd3-color", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3", - "/@types/d3-interpolate" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-1.4.1.tgz", - "_shasum": "0d9746c84dfef28807b2989eed4f37b2575e1f33", - "_spec": "@types/d3-color@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Hugues Stefanski", - "url": "https://github.com/ledragon" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-color module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-color", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-color" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "4dca5087e396dd15126898d84af8b8add612069947a4c357998593f0d7439b83", - "version": "1.4.1" -} diff --git a/node_modules/@types/d3-contour/LICENSE b/node_modules/@types/d3-contour/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-contour/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-contour/README.md b/node_modules/@types/d3-contour/README.md deleted file mode 100644 index e50db948360426805c87c74d86a66bd75d938da0..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-contour/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-contour` - -# Summary -This package contains type definitions for d3-contour (https://d3js.org/d3-contour/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-contour/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 00:21:15 GMT - * Dependencies: [@types/d3-array](https://npmjs.com/package/@types/d3-array), [@types/geojson](https://npmjs.com/package/@types/geojson) - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Hugues Stefanski](https://github.com/Ledragon), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-contour/index.d.ts b/node_modules/@types/d3-contour/index.d.ts deleted file mode 100644 index e02fa22fa41849fe6415e11c035223894aae7cbd..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-contour/index.d.ts +++ /dev/null @@ -1,271 +0,0 @@ -// Type definitions for d3-contour 1.3 -// Project: https://d3js.org/d3-contour/ -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Hugues Stefanski <https://github.com/Ledragon> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.3.2 - -import { MultiPolygon } from 'geojson'; -import { ThresholdNumberArrayGenerator, ThresholdCountGenerator } from 'd3-array'; - -/** - * An extended GeoJSON MultiPolygon representing a contour. - */ -export interface ContourMultiPolygon extends MultiPolygon { - /** - * Threshold value of the contour. - */ - value: number; -} - -/** - * A contour generator which computes contour polygons by applying marching squares to a rectangular array of numeric values. - * - * For each threshold value, the contour generator constructs a GeoJSON MultiPolygon geometry object representing the area - * where the input values are greater than or equal to the threshold value. - * The geometry is in planar coordinates, where ⟨i + 0.5, j + 0.5⟩ corresponds to element i + jn in the input values array. - * - */ -export interface Contours { - /** - * Computes the contours for the given array of values, returning an array of GeoJSON MultiPolygon geometry objects. - * Each geometry object represents the area where the input values are greater than or equal to the corresponding threshold value; - * the threshold value for each geometry object is exposed as geometry.value. - * - * The returned geometry objects are typically passed to d3.geoPath to display, - * using null or d3.geoIdentity as the associated projection - * - * @param values Array of input values. The input values must be an array of length n×m where [n, m] is the contour generator’s size; - * furthermore, each values[i + jn] must represent the value at the position ⟨i, j⟩. - */ - (values: number[]): ContourMultiPolygon[]; - - /** - * Computes a single contour, returning a GeoJSON MultiPolygon geometry object. - * This geometry object represents the area where the input values are greater than or equal to the given threshold value; - * the threshold value for the geometry object is exposed as geometry.value. - * - * @param values Array of input values. The input values must be an array of length n×m where [n, m] is the contour generator’s size; - * furthermore, each values[i + jn] must represent the value at the position ⟨i, j⟩. - * @param threshold Threshold value. - */ - contour(values: number[], threshold: number): ContourMultiPolygon; - - /** - * Return the expected size of the input values grid, which defaults to [1,1]. - */ - size(): [number, number]; - /** - * Sets the expected size of the input values grid to the contour generator and returns the contour generator. - * - * @param size Size of the input values grid specified as an array [n, m] - * where n is the number of columns in the grid and m is the number of rows; n and m must be positive integers. - */ - size(size: [number, number]): this; - - /** - * Returns the current smoothing flag, which defaults to true. - */ - smooth(): boolean; - /** - * Sets whether or not the generated contour polygons are smoothed using linear interpolation and returns the contour generator. - * - * @param smooth Flag to enable linear interpolation. The default is "true". - */ - smooth(smooth: boolean): this; - - /** - * Returns the current threshold generator, which by default implements Sturges’ formula. - */ - thresholds(): ThresholdCountGenerator<number> | ThresholdNumberArrayGenerator<number>; - /** - * Sets the threshold generator to use the specified count and returns this contour generator. - * The input values’ extent will be uniformly divided into approximately count bins. - * - * @param count Expected number of threshold bins. - */ - thresholds(count: number): this; - /** - * Sets the threshold generator to the specified array and returns this contour generator. - * - * Thresholds are defined as an array of values [x0, x1, …]. - * The first generated contour corresponds to the area where the input values are greater than or equal to x0; - * the second contour corresponds to the area where the input values are greater than or equal to x1, and so on. - * Thus, there is exactly one generated MultiPolygon geometry object for each specified threshold value; - * the threshold value is exposed as geometry.value. - * - * @param thresholds Array of thresholds to use. - */ - thresholds(thresholds: number[]): this; - /** - * Sets the threshold generator to the specified function and returns this contour generator. - * - * Thresholds are defined as an array of values [x0, x1, …]. - * The first generated contour corresponds to the area where the input values are greater than or equal to x0; - * the second contour corresponds to the area where the input values are greater than or equal to x1, and so on. - * Thus, there is exactly one generated MultiPolygon geometry object for each specified threshold value; - * the threshold value is exposed as geometry.value. - * - * @param thresholds A threshold generator function. The threshold generator function is passed the array of input values - * as its argument and returns either an array of calculated thresholds, or the count of thresholds to use. - */ - thresholds(thresholds: ThresholdCountGenerator<number> | ThresholdNumberArrayGenerator<number>): this; -} - -/** - * Construct a new contour generator with the default settings. - */ -export function contours(): Contours; - -/** - * A contour generator for density estimates. - * - * The generic refers to the data type of an element in the data array - * used with the density contour generator. If omitted, the default setting assumes that, - * the elements of the data array used with the density contour generator are two-element arrays. - * The first element corresponds to the x-dimension, the second to the y-dimension. - */ -export interface ContourDensity<Datum = [number, number]> { - /** - * Estimates the density contours for the given array of data, returning an array of GeoJSON MultiPolygon geometry objects. - * Each geometry object represents the area where the estimated number of points per square pixel is greater than or equal to - * the corresponding threshold value; the threshold value for each geometry object is exposed as geometry.value. - * The returned geometry objects are typically passed to d3.geoPath to display, using null or d3.geoIdentity as the associated projection. - * See also d3.contours. - * - * The x- and y-coordinate for each data point are computed using density.x and density.y. - * The generated contours are only accurate within the estimator’s defined size. - * - * @param data Array of input data. - */ - (data: Datum[]): ContourMultiPolygon[]; - - /** - * Returns the current x-coordinate accessor. - * The default x-coordinate accessor is a functions which accepts as input a two-element array of numbers - * and returns the element at index 0. - */ - x(): (d: Datum) => number; - /** - * Sets the x-coordinate accessor and returns the density contour estimator. - * - * @param x An x-coordinate accessor function, which accepts as input an element of the input data array and returns the - * x-coordinate. - */ - x(x: (d: Datum) => number): this; - - /** - * Returns the current y-coordinate accessor. - * The default y-coordinate accessor is a functions which accepts as input a two-element array of numbers - * and returns the element at index 1. - */ - y(): (d: Datum) => number; - /** - * Sets the y-coordinate accessor and returns the density contour estimator. - * - * @param y An y-coordinate accessor function, which accepts as input an element of the input data array and returns the - * y-coordinate. - */ - y(y: (d: Datum) => number): this; - - /** - * Returns the current point weight accessor. - */ - weight(): (d: Datum) => number; - - /** - * Sets the point weight accessor and returns the density contour estimator. - * - * @param weight A point weight accessor function. - */ - weight(weight: (d: Datum) => number): this; - - /** - * Returns the current size, which defaults to [960, 500]. - */ - size(): [number, number]; - /** - * Sets the size of the density estimator to the specified bounds and returns the density contour estimator. - * - * @param size The size is specified as an array [width, height], where width is the maximum x-value and height is the maximum y-value. - */ - size(size: [number, number]): this; - - /** - * Returns the current cell size, which defaults to 4. - */ - cellSize(): number; - /** - * Sets the size of individual cells in the underlying bin grid to the specified positive integer and returns the density contour estimator. - * - * The cell size is rounded down to the nearest power of two. Smaller cells produce more detailed contour polygons, but are more expensive to compute. - * - * @param cellSize Cell size, a positive integer. - */ - cellSize(cellSize: number): this; - - /** - * Returns the current threshold generator, which by default generates about twenty nicely-rounded density thresholds. - */ - thresholds(): ThresholdCountGenerator<number> | ThresholdNumberArrayGenerator<number>; - /** - * Sets the threshold generator to use the specified count and returns this density contour estimator. - * Approximately count uniformly-spaced nicely-rounded thresholds will be generated. - * - * @param count Expected number of thresholds. - */ - thresholds(count: number): this; - /** - * Sets the threshold generator to the specified array and returns this density contour estimator. - * - * Thresholds are defined as an array of values [x0, x1, …]. The first generated density contour corresponds to the area - * where the estimated density is greater than or equal to x0; the second contour corresponds to the area - * where the estimated density is greater than or equal to x1, and so on. - * Thus, there is exactly one generated MultiPolygon geometry object for each specified threshold value; - * the threshold value is exposed as geometry.value. The first value x0 should typically be greater than zero. - * - * @param thresholds Array of thresholds to use. - */ - thresholds(thresholds: number[]): this; - /** - * Sets the threshold generator to the specified function and returns this density contour estimator. - * - * Thresholds are defined as an array of values [x0, x1, …]. The first generated density contour corresponds to the area - * where the estimated density is greater than or equal to x0; the second contour corresponds to the area - * where the estimated density is greater than or equal to x1, and so on. - * Thus, there is exactly one generated MultiPolygon geometry object for each specified threshold value; - * the threshold value is exposed as geometry.value. The first value x0 should typically be greater than zero. - * - * @param thresholds A threshold generator function. The threshold generator function is passed the array of input values - * as its argument and returns either an array of calculated thresholds, or the count of thresholds to use. - */ - thresholds(thresholds: ThresholdCountGenerator<number> | ThresholdNumberArrayGenerator<number>): this; - - /** - * Returns the current bandwidth, which defaults to 20.4939…. - */ - bandwidth(): number; - /** - * Sets the bandwidth (the standard deviation) of the Gaussian kernel and returns the density contour estimator. - * - * @param bandwidth Bandwidth (the standard deviation) of the Gaussian kernel. - * The specified bandwidth is currently rounded to the nearest supported value by this implementation, and must be nonnegative. - */ - bandwidth(bandwidth: number): this; -} - -/** - * Construct a new contour generator for density estimates. - * - * The generic refers to the data type of an element in the data array - * used with the density contour generator. If omitted, the default setting assumes that, - * the elements of the data array used with the density contour generator are two-element arrays. - * The first element corresponds to the x-dimension, the second to the y-dimension. - * - * Important: ensure that the x- and y-accessor functions are configured to - * match the data type used for the generic Datum. - */ -export function contourDensity<Datum = [number, number]>(): ContourDensity<Datum>; diff --git a/node_modules/@types/d3-contour/package.json b/node_modules/@types/d3-contour/package.json deleted file mode 100644 index c05c4992006f358ee5048af20c6dcfcaaae71f93..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-contour/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "@types/d3-contour@^1", - "_id": "@types/d3-contour@1.3.1", - "_inBundle": false, - "_integrity": "sha512-wWwsM/3NfKTRBdH00cSf+XlsaHlNTkvH66PgDedobyvKQZ4sJrXXpr16LXvDnAal4B67v8JGrWDgyx6dqqKLuQ==", - "_location": "/@types/d3-contour", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-contour@^1", - "name": "@types/d3-contour", - "escapedName": "@types%2fd3-contour", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-1.3.1.tgz", - "_shasum": "589dc3eec14168eea7e31edd1e3bbe246cc9d626", - "_spec": "@types/d3-contour@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Hugues Stefanski", - "url": "https://github.com/Ledragon" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": { - "@types/d3-array": "^1", - "@types/geojson": "*" - }, - "deprecated": false, - "description": "TypeScript definitions for d3-contour", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-contour", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-contour" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "8ea246165d18947f71a9835f9ce399359a33ada374de38eab17fc650fc1f6248", - "version": "1.3.1" -} diff --git a/node_modules/@types/d3-dispatch/LICENSE b/node_modules/@types/d3-dispatch/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-dispatch/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-dispatch/README.md b/node_modules/@types/d3-dispatch/README.md deleted file mode 100644 index fd5297b979dd71251784d748371a57efd0b04405..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-dispatch/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-dispatch` - -# Summary -This package contains type definitions for D3JS d3-dispatch module (https://github.com/d3/d3-dispatch/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-dispatch/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 21:08:21 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-dispatch/index.d.ts b/node_modules/@types/d3-dispatch/index.d.ts deleted file mode 100644 index c3f409e7e73440e8684211df904caf11ece6da48..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-dispatch/index.d.ts +++ /dev/null @@ -1,75 +0,0 @@ -// Type definitions for D3JS d3-dispatch module 1.0 -// Project: https://github.com/d3/d3-dispatch/, https://d3js.org/d3-dispatch -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// Last module patch version validated against: 1.0.6 - -export interface Dispatch<T extends object> { - /** - * Like `function.apply`, invokes each registered callback for the specified type, - * passing the callback the specified arguments, with `that` as the `this` context. - * - * @param type A specified event type. - * @param that The `this` context for the callback. - * @param args Additional arguments to be passed to the callback. - * @throws "unknown type" on unknown event type. - */ - apply(type: string, that?: T, args?: any[]): void; - - /** - * Like `function.call`, invokes each registered callback for the specified type, - * passing the callback the specified arguments, with `that` as the `this` context. - * See dispatch.apply for more information. - * - * @param type A specified event type. - * @param that The `this` context for the callback. - * @param args Additional arguments to be passed to the callback. - * @throws "unknown type" on unknown event type. - */ - call(type: string, that?: T, ...args: any[]): void; - - /** - * Returns a copy of this dispatch object. - * Changes to this dispatch do not affect the returned copy and vice versa. - */ - copy(): Dispatch<T>; - - /** - * Returns the callback for the specified typenames, if any. - * If multiple typenames are specified, the first matching callback is returned. - * - * @param types An event typename. - * @param callback A callback. - */ - on(typenames: string): ((this: T, ...args: any[]) => void) | undefined; - /** - * Removes the callback for the specified typenames. - * To remove all callbacks for a given name `foo`, say `dispatch.on(".foo", null).` - * - * @param types An event typename. - */ - on(typenames: string, callback: null): this; - /** - * Adds the callback for the specified typenames. - * The callback is registered for the specified (fully-qualified) typenames. - * If a callback was already registered for the given typenames, - * the existing callback is removed before the new callback is added. - * - * @param types An event typename. - * @param callback A callback. - */ - on(typenames: string, callback: (this: T, ...args: any[]) => void): this; -} - -/** - * Creates a new dispatch for the specified event types. Each type is a string, such as "start" or "end". - * - * @param types The event types. - * @throws "illegal type" on empty string or duplicated event types. - */ -export function dispatch<T extends object>(...types: string[]): Dispatch<T>; diff --git a/node_modules/@types/d3-dispatch/package.json b/node_modules/@types/d3-dispatch/package.json deleted file mode 100644 index 169a12bee502c952b4b6108b0dea64e9e0e5f3d7..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-dispatch/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "@types/d3-dispatch@^1", - "_id": "@types/d3-dispatch@1.0.9", - "_inBundle": false, - "_integrity": "sha512-zJ44YgjqALmyps+II7b1mZLhrtfV/FOxw9owT87mrweGWcg+WK5oiJX2M3SYJ0XUAExBduarysfgbR11YxzojQ==", - "_location": "/@types/d3-dispatch", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-dispatch@^1", - "name": "@types/d3-dispatch", - "escapedName": "@types%2fd3-dispatch", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-1.0.9.tgz", - "_shasum": "c5a180f1e251de853b399cfbfbb6dd7f8bf842ae", - "_spec": "@types/d3-dispatch@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-dispatch module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-dispatch", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-dispatch" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "26bcf02a4cf4b37b7be5f4e690a01b591e95b4143044712159c093c46bd764e1", - "version": "1.0.9" -} diff --git a/node_modules/@types/d3-drag/LICENSE b/node_modules/@types/d3-drag/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-drag/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-drag/README.md b/node_modules/@types/d3-drag/README.md deleted file mode 100644 index 4d3fb79a348b5171014d29dd9cce00f13c899378..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-drag/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-drag` - -# Summary -This package contains type definitions for D3JS d3-drag module (https://github.com/d3/d3-drag/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-drag/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 21:08:21 GMT - * Dependencies: [@types/d3-selection](https://npmjs.com/package/@types/d3-selection) - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-drag/index.d.ts b/node_modules/@types/d3-drag/index.d.ts deleted file mode 100644 index c10d0bacafc2496bb53694dae9c3e5303628afb3..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-drag/index.d.ts +++ /dev/null @@ -1,406 +0,0 @@ -// Type definitions for D3JS d3-drag module 1.2 -// Project: https://github.com/d3/d3-drag/, https://d3js.org/d3-drag -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.2.5 - -import { Selection, ValueFn } from 'd3-selection'; - -// -------------------------------------------------------------------------- -// Shared Type Definitions and Interfaces -// -------------------------------------------------------------------------- - -/** - * DraggedElementBaseType serves as an alias for the 'minimal' data type which can be selected - * without 'd3-drag' (and related code in 'd3-selection') trying to use properties internally which would otherwise not - * be supported. - */ -export type DraggedElementBaseType = Element; - -/** - * Container element type usable for mouse/touch functions - */ -export type DragContainerElement = HTMLElement | SVGSVGElement | SVGGElement; // HTMLElement includes HTMLCanvasElement - -/** - * The subject datum should at a minimum expose x and y properties, so that the relative position - * of the subject and the pointer can be preserved during the drag gesture. - */ -export interface SubjectPosition { - /** - * x-coordinate - */ - x: number; - /** - * y-coordinate - */ - y: number; -} - -/** - * A D3 Drag Behavior - * - * The first generic refers to the type of element to be dragged. - * The second generic refers to the type of the datum of the dragged element. - * The third generic refers to the type of the drag behavior subject. - * - * The subject of a drag gesture represents the thing being dragged. - * It is computed when an initiating input event is received, - * such as a mousedown or touchstart, immediately before the drag gesture starts. - * The subject is then exposed as event.subject on subsequent drag events for this gesture. - * - * The default subject is the datum of the element in the originating selection (see drag) - * that received the initiating input event; if this datum is undefined, - * an object representing the coordinates of the pointer is created. - * When dragging circle elements in SVG, the default subject is thus the datum of the circle being dragged. - * With Canvas, the default subject is the canvas element’s datum (regardless of where on the canvas you click). - * In this case, a custom subject accessor would be more appropriate, - * such as one that picks the closest circle to the mouse within a given search radius. - */ -export interface DragBehavior<GElement extends DraggedElementBaseType, Datum, Subject> extends Function { - /** - * Applies the drag behavior to the selected elements. - * This function is typically not invoked directly, and is instead invoked via selection.call. - * - * For details see: {@link https://github.com/d3/d3-drag#_drag} - * - * @param selection A D3 selection of elements. - * @param args Optional arguments to be passed in. - */ - (selection: Selection<GElement, Datum, any, any>, ...args: any[]): void; - - /** - * Returns the current container accessor function. - */ - container(): ValueFn<GElement, Datum, DragContainerElement>; - /** - * Sets the container accessor to the specified function and returns the drag behavior. - * - * The container of a drag gesture determines the coordinate system of subsequent drag events, - * affecting event.x and event.y. The element returned by the container accessor is subsequently - * passed to d3.mouse or d3.touch, as appropriate, to determine the local coordinates of the pointer. - * - * The default container accessor returns the parent node of the element in the originating selection (see drag) - * that received the initiating input event. This is often appropriate when dragging SVG or HTML elements, - * since those elements are typically positioned relative to a parent. For dragging graphical elements with a Canvas, - * however, you may want to redefine the container as the initiating element itself, using "this" in the accessor - * function. - * - * @param accessor A container accessor function which is evaluated for each selected element, - * in order, being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element. The function returns the container element. - */ - container(accessor: ValueFn<GElement, Datum, DragContainerElement>): this; - /** - * Sets the container accessor to the specified object and returns the drag behavior. - * - * The container of a drag gesture determines the coordinate system of subsequent drag events, - * affecting event.x and event.y. The element returned by the container accessor is subsequently - * passed to d3.mouse or d3.touch, as appropriate, to determine the local coordinates of the pointer. - * - * The default container accessor returns the parent node of the element in the originating selection (see drag) - * that received the initiating input event. This is often appropriate when dragging SVG or HTML elements, - * since those elements are typically positioned relative to a parent. For dragging graphical elements with a Canvas, - * however, you may want to redefine the container as the initiating element itself, such as drag.container(canvas). - * - * @param container Container element for the drag gesture. - */ - container(container: DragContainerElement): this; - - /** - * Returns the current filter function. - */ - filter(): ValueFn<GElement, Datum, boolean>; - - /** - * Sets the filter to the specified filter function and returns the drag behavior. - * - * If the filter returns falsey, the initiating event is ignored and no drag gesture is started. - * Thus, the filter determines which input events are ignored. The default filter ignores mousedown events on secondary buttons, - * since those buttons are typically intended for other purposes, such as the context menu. - * - * @param filterFn A filter function which is evaluated for each selected element, - * in order, being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element. The function returns a boolean value. - */ - filter(filterFn: ValueFn<GElement, Datum, boolean>): this; - - /** - * Returns the current touch support detector, which defaults to a function returning true, - * if the "ontouchstart" event is supported on the current element. - */ - touchable(): ValueFn<GElement, Datum, boolean>; - /** - * Sets the touch support detector to the specified boolean value and returns the drag behavior. - * - * Touch event listeners are only registered if the detector returns truthy for the corresponding element when the drag behavior is applied. - * The default detector works well for most browsers that are capable of touch input, but not all; Chrome’s mobile device emulator, for example, - * fails detection. - * - * @param touchable A boolean value. true when touch event listeners should be applied to the corresponding element, otherwise false. - */ - touchable(touchable: boolean): this; - /** - * Sets the touch support detector to the specified function and returns the drag behavior. - * - * Touch event listeners are only registered if the detector returns truthy for the corresponding element when the drag behavior is applied. - * The default detector works well for most browsers that are capable of touch input, but not all; Chrome’s mobile device emulator, for example, - * fails detection. - * - * @param touchable A touch support detector function, which returns true when touch event listeners should be applied to the corresponding element. - * The function is evaluated for each selected element to which the drag behavior was applied, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element. The function returns a boolean value. - */ - touchable(touchable: ValueFn<GElement, Datum, boolean>): this; - - /** - * Returns the current subject accessor functions. - */ - subject(): ValueFn<GElement, Datum, Subject>; - /** - * Sets the subject accessor to the specified function and returns the drag behavior. - * - * The subject of a drag gesture represents the thing being dragged. - * It is computed when an initiating input event is received, - * such as a mousedown or touchstart, immediately before the drag gesture starts. - * The subject is then exposed as event.subject on subsequent drag events for this gesture. - * - * The default subject is the datum of the element in the originating selection (see drag) - * that received the initiating input event; if this datum is undefined, - * an object representing the coordinates of the pointer is created. - * When dragging circle elements in SVG, the default subject is thus the datum of the circle being dragged. - * With Canvas, the default subject is the canvas element’s datum (regardless of where on the canvas you click). - * In this case, a custom subject accessor would be more appropriate, - * such as one that picks the closest circle to the mouse within a given search radius. - * - * - * - * The subject of a drag gesture may not be changed after the gesture starts. - * - * During the evaluation of the subject accessor, d3.event is a beforestart drag event. - * Use event.sourceEvent to access the initiating input event and event.identifier to - * access the touch identifier. The event.x and event.y are relative to the container, - * and are computed using d3.mouse or d3.touch as appropriate. - * - * @param accessor An extent accessor function which is evaluated for each selected element, - * in order, being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element.The returned subject should be an object that exposes x and y properties, - * so that the relative position of the subject and the pointer can be preserved during the drag gesture. - * If the subject is null or undefined, no drag gesture is started for this pointer; - * however, other starting touches may yet start drag gestures. - */ - subject(accessor: ValueFn<GElement, Datum, Subject>): this; - - /** - * Return the current click distance threshold, which defaults to zero. - */ - clickDistance(): number; - /** - * Set the maximum distance that the mouse can move between mousedown and mouseup that will trigger - * a subsequent click event. If at any point between mousedown and mouseup the mouse is greater than or equal to - * distance from its position on mousedown, the click event following mouseup will be suppressed. - * - * @param distance The distance threshold between mousedown and mouseup measured in client coordinates (event.clientX and event.clientY). - * The default is zero. - */ - clickDistance(distance: number): this; - - /** - * Return the first currently-assigned listener matching the specified typenames, if any. - * - * @param typenames The typenames is a string containing one or more typename separated by whitespace. - * Each typename is a type, optionally followed by a period (.) and a name, such as "drag.foo"" and "drag.bar"; - * the name allows multiple listeners to be registered for the same type. The type must be one of the following: - * start (after a new pointer becomes active [on mousedown or touchstart]), drag (after an active pointer moves [on mousemove or touchmove], or - * end (after an active pointer becomes inactive [on mouseup, touchend or touchcancel].) - */ - on(typenames: string): ValueFn<GElement, Datum, void> | undefined; - /** - * Remove the current event listeners for the specified typenames, if any, return the drag behavior. - * - * @param typenames The typenames is a string containing one or more typename separated by whitespace. - * Each typename is a type, optionally followed by a period (.) and a name, such as "drag.foo"" and "drag.bar"; - * the name allows multiple listeners to be registered for the same type. The type must be one of the following: - * start (after a new pointer becomes active [on mousedown or touchstart]), drag (after an active pointer moves [on mousemove or touchmove], or - * end (after an active pointer becomes inactive [on mouseup, touchend or touchcancel].) - * @param listener Use null to remove the listener. - */ - on(typenames: string, listener: null): this; - /** - * Set the event listener for the specified typenames and return the drag behavior. - * If an event listener was already registered for the same type and name, - * the existing listener is removed before the new listener is added. - * When a specified event is dispatched, each listener will be invoked with the same context and arguments as selection.on listeners. - * - * Changes to registered listeners via drag.on during a drag gesture do not affect the current drag gesture. - * Instead, you must use event.on, which also allows you to register temporary event listeners for the current drag gesture. - * Separate events are dispatched for each active pointer during a drag gesture. - * For example, if simultaneously dragging multiple subjects with multiple fingers, a start event is dispatched for each finger, - * even if both fingers start touching simultaneously. - * - * @param typenames The typenames is a string containing one or more typename separated by whitespace. - * Each typename is a type, optionally followed by a period (.) and a name, such as "drag.foo"" and "drag.bar"; - * the name allows multiple listeners to be registered for the same type. The type must be one of the following: - * start (after a new pointer becomes active [on mousedown or touchstart]), drag (after an active pointer moves [on mousemove or touchmove], or - * end (after an active pointer becomes inactive [on mouseup, touchend or touchcancel].) - * @param listener An event listener function which is evaluated for each selected element, - * in order, being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element. - */ - on(typenames: string, listener: ValueFn<GElement, Datum, void>): this; -} - -/** - * Creates a new drag behavior. The returned behavior, drag, is both an object and a function, and is - * typically applied to selected elements via selection.call. - * - * Use this signature when using the default subject accessor. - * - * The first generic refers to the type of element to be dragged. - * The second generic refers to the type of the datum of the dragged element. - */ -export function drag<GElement extends DraggedElementBaseType, Datum>(): DragBehavior<GElement, Datum, Datum | SubjectPosition>; -/** - * Creates a new drag behavior. The returned behavior, drag, is both an object and a function, and is - * typically applied to selected elements via selection.call. - * - * Use this signature when using a custom subject accessor. - * - * The first generic refers to the type of element to be dragged. - * The second generic refers to the type of the datum of the dragged element. - * The third generic refers to the type of the drag behavior subject. - */ -export function drag<GElement extends DraggedElementBaseType, Datum, Subject>(): DragBehavior<GElement, Datum, Subject>; - -/** - * D3 Drag event - * - * The first generic refers to the type of element to be dragged. - * The second generic refers to the type of the datum of the dragged element. - * The third generic refers to the type of the drag behavior subject. - */ -export interface D3DragEvent<GElement extends DraggedElementBaseType, Datum, Subject> { - /** - * The DragBehavior associated with the event - */ - target: DragBehavior<GElement, Datum, Subject>; - /** - * The event type for the DragEvent - */ - type: 'start' | 'drag' | 'end' | string; // Leave failsafe string type for cases like 'drag.foo' - /** - * The drag subject, defined by drag.subject. - */ - subject: Subject; - /** - * The new x-coordinate of the subject, relative to the container - */ - x: number; - /** - * The new y-coordinate of the subject, relative to the container - */ - y: number; - /** - * The change in x-coordinate since the previous drag event. - */ - dx: number; - /** - * The change in y-coordinate since the previous drag event. - */ - dy: number; - /** - * The string “mouseâ€, or a numeric touch identifier. - */ - identifier: 'mouse' | number; - /** - * The number of currently active drag gestures (on start and end, not including this one). - * - * The event.active field is useful for detecting the first start event and the last end event - * in a sequence of concurrent drag gestures: it is zero when the first drag gesture starts, - * and zero when the last drag gesture ends. - */ - active: number; - /** - * The underlying input event, such as mousemove or touchmove. - */ - sourceEvent: any; - /** - * Return the first currently-assigned listener matching the specified typenames, if any. - * - * Equivalent to drag.on, but only applies to the current drag gesture. Before the drag gesture starts, - * a copy of the current drag event listeners is made. This copy is bound to the current drag gesture - * and modified by event.on. This is useful for temporary listeners that only receive events for the current drag gesture. - * - * @param typenames The typenames is a string containing one or more typename separated by whitespace. - * Each typename is a type, optionally followed by a period (.) and a name, such as "drag.foo"" and "drag.bar"; - * the name allows multiple listeners to be registered for the same type. The type must be one of the following: - * start (after a new pointer becomes active [on mousedown or touchstart]), drag (after an active pointer moves [on mousemove or touchmove], or - * end (after an active pointer becomes inactive [on mouseup, touchend or touchcancel].) - */ - on(typenames: string): ValueFn<GElement, Datum, void> | undefined; - /** - * Remove the current event listeners for the specified typenames, if any, return the drag behavior. - * - * Equivalent to drag.on, but only applies to the current drag gesture. Before the drag gesture starts, - * a copy of the current drag event listeners is made. This copy is bound to the current drag gesture - * and modified by event.on. This is useful for temporary listeners that only receive events for the current drag gesture. - * - * @param typenames The typenames is a string containing one or more typename separated by whitespace. - * Each typename is a type, optionally followed by a period (.) and a name, such as "drag.foo"" and "drag.bar"; - * the name allows multiple listeners to be registered for the same type. The type must be one of the following: - * start (after a new pointer becomes active [on mousedown or touchstart]), drag (after an active pointer moves [on mousemove or touchmove], or - * end (after an active pointer becomes inactive [on mouseup, touchend or touchcancel].) - * @param listener Use null to remove the listener. - */ - on(typenames: string, listener: null): this; - /** - * Set the event listener for the specified typenames and return the drag behavior. - * If an event listener was already registered for the same type and name, - * the existing listener is removed before the new listener is added. - * When a specified event is dispatched, each listener will be invoked with the same context and arguments as selection.on listeners. - * - * Equivalent to drag.on, but only applies to the current drag gesture. Before the drag gesture starts, - * a copy of the current drag event listeners is made. This copy is bound to the current drag gesture - * and modified by event.on. This is useful for temporary listeners that only receive events for the current drag gesture. - * - * @param typenames The typenames is a string containing one or more typename separated by whitespace. - * Each typename is a type, optionally followed by a period (.) and a name, such as "drag.foo"" and "drag.bar"; - * the name allows multiple listeners to be registered for the same type. The type must be one of the following: - * start (after a new pointer becomes active [on mousedown or touchstart]), drag (after an active pointer moves [on mousemove or touchmove], or - * end (after an active pointer becomes inactive [on mouseup, touchend or touchcancel].) - * @param listener An event listener function which is evaluated for each selected element, - * in order, being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element. - */ - on(typenames: string, listener: ValueFn<GElement, Datum, void>): this; -} - -/** - * Prevents native drag-and-drop and text selection on the specified window. - * As an alternative to preventing the default action of mousedown events, - * this method prevents undesirable default actions following mousedown. In supported browsers, - * this means capturing dragstart and selectstart events, preventing the associated default actions, - * and immediately stopping their propagation. In browsers that do not support selection events, - * the user-select CSS property is set to none on the document element. - * This method is intended to be called on mousedown, followed by d3.dragEnable on mouseup. - * - * @param window The window for which drag should be disabled. - */ -export function dragDisable(window: Window): void; - -/** - * Allows native drag-and-drop and text selection on the specified window; undoes the effect of d3.dragDisable. - * This method is intended to be called on mouseup, preceded by d3.dragDisable on mousedown. - * If noclick is true, this method also temporarily suppresses click events. - * The suppression of click events expires after a zero-millisecond timeout, - * such that it only suppress the click event that would immediately follow the current mouseup event, if any. - * - * @param window The window for which drag should be (re-)enabled. - * @param noClick An optional flag. If noclick is true, this method also temporarily suppresses click events. - */ -export function dragEnable(window: Window, noClick?: boolean): void; diff --git a/node_modules/@types/d3-drag/package.json b/node_modules/@types/d3-drag/package.json deleted file mode 100644 index 9154352d63317f5a3e84978f048ffa41da1a0585..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-drag/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "_from": "@types/d3-drag@^1", - "_id": "@types/d3-drag@1.2.5", - "_inBundle": false, - "_integrity": "sha512-7NeTnfolst1Js3Vs7myctBkmJWu6DMI3k597AaHUX98saHjHWJ6vouT83UrpE+xfbSceHV+8A0JgxuwgqgmqWw==", - "_location": "/@types/d3-drag", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-drag@^1", - "name": "@types/d3-drag", - "escapedName": "@types%2fd3-drag", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-1.2.5.tgz", - "_shasum": "0b1b852cb41577075aa625ae6149379ea6c34dfd", - "_spec": "@types/d3-drag@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": { - "@types/d3-selection": "^1" - }, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-drag module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-drag", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-drag" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "5a720db904c003be82bed71ead495e3c5247e5b6f6556236d615afcc0ecd40ed", - "version": "1.2.5" -} diff --git a/node_modules/@types/d3-dsv/LICENSE b/node_modules/@types/d3-dsv/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-dsv/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-dsv/README.md b/node_modules/@types/d3-dsv/README.md deleted file mode 100644 index e9cafe20e3b405970dbfe69fc5dce1196d914e69..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-dsv/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-dsv` - -# Summary -This package contains type definitions for D3JS d3-dsv module (https://github.com/d3/d3-dsv/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-dsv/v1. - -### Additional Details - * Last updated: Thu, 01 Oct 2020 04:14:56 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-dsv/index.d.ts b/node_modules/@types/d3-dsv/index.d.ts deleted file mode 100644 index 9d6928392dab66e72c0c7e5fd22f7b73ea40d006..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-dsv/index.d.ts +++ /dev/null @@ -1,483 +0,0 @@ -// Type definitions for D3JS d3-dsv module 1.2 -// Project: https://github.com/d3/d3-dsv/, https://d3js.org/d3-dsv -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.2.0 - -// ------------------------------------------------------------------------------------------ -// Shared Types and Interfaces -// ------------------------------------------------------------------------------------------ - -/** - * An object representing a DSV parsed row with values represented as strings. - * When the DSV content is not well-structured and some column-values are missing, `undefined` is used as value. - */ -export type DSVRowString<Columns extends string = string> = { - [key in Columns]: string | undefined; -}; - -/** - * An object in raw format before parsing, that is with only string values. - * When the DSV content is not well-structured and some column-values are missing, `undefined` is used as value. - */ -export type DSVRaw<T extends object> = { - [key in keyof T]: string | undefined; -}; - -/** - * An object representing a DSV parsed row with values represented as an arbitrary datatype, depending - * on the performed parsed row mapping. - * - * @deprecated Use `object` instead. - */ -export interface DSVRowAny { - [key: string]: any; -} - -/** - * An array object representing all deserialized rows. The array is enhanced with a property listing - * the names of the parsed columns. - */ -export interface DSVRowArray<Columns extends string = string> extends Array<DSVRowString<Columns>> { - /** - * List of column names. - */ - columns: Columns[]; -} - -/** - * An array object representing all parsed rows. The array is enhanced with a property listing - * the names of the parsed columns. - */ -export interface DSVParsedArray<T> extends Array<T> { - /** - * List of column names. - */ - columns: Array<keyof T>; -} - -// ------------------------------------------------------------------------------------------ -// CSV Parsers and Formatters -// ------------------------------------------------------------------------------------------ - -// csvParse(...) ============================================================================ - -/** - * Parses the specified string, which must be in the comma-separated values format, returning an array of objects representing the parsed rows. - * - * Unlike csvParseRows, this method requires that the first line of the CSV content contains a comma-separated list of column names; - * these column names become the attributes on the returned objects. - * - * The returned array also exposes a columns property containing the column names in input order (in contrast to Object.keys, whose iteration order is arbitrary). - * - * Equivalent to `dsvFormat(",").parse`. - * - * @param csvString A string, which must be in the comma-separated values format. - */ -// tslint:disable-next-line:no-unnecessary-generics -export function csvParse<Columns extends string>(csvString: string): DSVRowArray<Columns>; -/** - * Parses the specified string, which must be in the comma-separated values format, returning an array of objects representing the parsed rows. - * - * Unlike csvParseRows, this method requires that the first line of the CSV content contains a comma-separated list of column names; - * these column names become the attributes on the returned objects. - * - * The returned array also exposes a columns property containing the column names in input order (in contrast to Object.keys, whose iteration order is arbitrary). - * - * Equivalent to `dsvFormat(",").parse`. - * - * @param csvString A string, which must be in the comma-separated values format. - * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), - * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. - * In effect, row is similar to applying a map and filter operator to the returned rows. - */ -export function csvParse<ParsedRow extends object, Columns extends string>( - csvString: string, - row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null -): DSVParsedArray<ParsedRow>; - -// csvParseRows(...) ======================================================================== - -/** - * Parses the specified string, which must be in the comma-separated values format, returning an array of arrays representing the parsed rows. - * - * Unlike csvParse, this method treats the header line as a standard row, and should be used whenever CSV content does not contain a header. - * Each row is represented as an array rather than an object. Rows may have variable length. - * - * If a row conversion function is not specified, field values are strings. For safety, there is no automatic conversion to numbers, dates, or other types. - * In some cases, JavaScript may coerce strings to numbers for you automatically (for example, using the + operator), but better is to specify a row conversion function. - * - * Equivalent to `dsvFormat(",").parseRows`. - * - * @param csvString A string, which must be in the comma-separated values format. - */ -export function csvParseRows(csvString: string): string[][]; -/** - * Parses the specified string, which must be in the comma-separated values format, returning an array of arrays representing the parsed rows. - * - * Unlike csvParse, this method treats the header line as a standard row, and should be used whenever CSV content does not contain a header. - * Each row is represented as an array rather than an object. Rows may have variable length. - * - * Equivalent to `dsvFormat(",").parseRows`. - * - * @param csvString A string, which must be in the comma-separated values format. - * @param row A row conversion function which is invoked for each row, being passed an array representing the current row (d), the index (i) - * starting at zero for the first row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. - * In effect, row is similar to applying a map and filter operator to the returned rows. - */ -export function csvParseRows<ParsedRow extends object>( - csvString: string, - row: (rawRow: string[], index: number) => ParsedRow | undefined | null -): ParsedRow[]; - -// csvFormat(...) ============================================================================ - -/** - * Formats the specified array of object rows as comma-separated values, returning a string. - * This operation is the inverse of csvParse. Each row will be separated by a newline (\n), - * and each column within each row will be separated by the comma-delimiter. - * Values that contain either the comma-delimiter, a double-quote (") or a newline will be escaped using double-quotes. - * - * If columns is not specified, the list of column names that forms the header row is determined by the union of all properties on all objects in rows; - * the order of columns is nondeterministic. - * - * Equivalent to `dsvFormat(",").format`. - * - * @param rows Array of object rows. - * @param columns An array of strings representing the column names. - */ -export function csvFormat<T extends object>(rows: T[], columns?: Array<keyof T>): string; - -// csvFormatBody(...) ============================================================================ - -/** - * Equivalent to dsvFormat(",").formatBody. - * - * @param rows Array of object rows. - * @param columns An array of strings representing the column names. - */ -export function csvFormatBody<T extends object>(rows: T[], columns?: Array<keyof T>): string; - -// csvFormatRows(...) ======================================================================== - -/** - * Formats the specified array of array of string rows as comma-separated values, returning a string. - * This operation is the reverse of csvParseRows. Each row will be separated by a newline (\n), - * and each column within each row will be separated by the comma-delimiter. - * Values that contain either the comma-delimiter, a double-quote (") or a newline will be escaped using double-quotes. - * - * To convert an array of objects to an array of arrays while explicitly specifying the columns, use array.map. - * If you like, you can also array.concat this result with an array of column names to generate the first row. - * - * Equivalent to `dsvFormat(",").formatRows`. - * - * @param rows An array of array of string rows. - */ -export function csvFormatRows(rows: string[][]): string; - -// csvFormatRow(...) ======================================================================== - -/** - * Equivalent to dsvFormat(",").formatRow. - * - * @param row An array of strings representing a row. - */ -export function csvFormatRow(row: string[]): string; - -// csvFormatValue(...) ======================================================================== - -/** - * Equivalent to dsvFormat(",").formatValue. - * - * @param value A value. - */ -export function csvFormatValue(value: string): string; - -// ------------------------------------------------------------------------------------------ -// TSV Parsers and Formatters -// ------------------------------------------------------------------------------------------ - -// tsvParse(...) ============================================================================ - -/** - * Parses the specified string, which must be in the tab-separated values format, returning an array of objects representing the parsed rows. - * - * Unlike tsvParseRows, this method requires that the first line of the TSV content contains a tab-separated list of column names; - * these column names become the attributes on the returned objects. - * - * The returned array also exposes a columns property containing the column names in input order (in contrast to Object.keys, whose iteration order is arbitrary). - * - * Equivalent to `dsvFormat("\t").parse`. - * - * @param tsvString A string, which must be in the tab-separated values format. - */ -// tslint:disable-next-line:no-unnecessary-generics -export function tsvParse<Columns extends string>(tsvString: string): DSVRowArray<Columns>; -/** - * Parses the specified string, which must be in the tab-separated values format, returning an array of objects representing the parsed rows. - * - * Unlike tsvParseRows, this method requires that the first line of the TSV content contains a tab-separated list of column names; - * these column names become the attributes on the returned objects. - * - * The returned array also exposes a columns property containing the column names in input order (in contrast to Object.keys, whose iteration order is arbitrary). - * - * Equivalent to `dsvFormat("\t").parse`. - * - * @param tsvString A string, which must be in the tab-separated values format. - * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), - * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. - * In effect, row is similar to applying a map and filter operator to the returned rows. - */ -export function tsvParse<ParsedRow extends object, Columns extends string>( - tsvString: string, - row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null -): DSVParsedArray<ParsedRow>; - -// tsvParseRows(...) ======================================================================== - -/** - * Parses the specified string, which must be in the tab-separated values format, returning an array of arrays representing the parsed rows. - * - * Unlike tsvParse, this method treats the header line as a standard row, and should be used whenever TSV content does not contain a header. - * Each row is represented as an array rather than an object. Rows may have variable length. - * - * If a row conversion function is not specified, field values are strings. For safety, there is no automatic conversion to numbers, dates, or other types. - * In some cases, JavaScript may coerce strings to numbers for you automatically (for example, using the + operator), but better is to specify a row conversion function. - * - * Equivalent to `dsvFormat("\t").parseRows`. - * - * @param tsvString A string, which must be in the tab-separated values format. - */ -export function tsvParseRows(tsvString: string): string[][]; -/** - * Parses the specified string, which must be in the tab-separated values format, returning an array of arrays representing the parsed rows. - * - * Unlike tsvParse, this method treats the header line as a standard row, and should be used whenever TSV content does not contain a header. - * Each row is represented as an array rather than an object. Rows may have variable length. - * - * Equivalent to `dsvFormat("\t").parseRows`. - * - * @param tsvString A string, which must be in the tab-separated values format. - * @param row A row conversion function which is invoked for each row, being passed an array representing the current row (d), the index (i) - * starting at zero for the first row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. - * In effect, row is similar to applying a map and filter operator to the returned rows. - */ -export function tsvParseRows<ParsedRow extends object>( - tsvString: string, - row: (rawRow: string[], index: number) => ParsedRow | undefined | null -): ParsedRow[]; - -// tsvFormat(...) ============================================================================ - -/** - * Formats the specified array of object rows as tab-separated values, returning a string. - * This operation is the inverse of tsvParse. Each row will be separated by a newline (\n), - * and each column within each row will be separated by the tab-delimiter. - * Values that contain either the tab-delimiter, a double-quote (") or a newline will be escaped using double-quotes. - * - * If columns is not specified, the list of column names that forms the header row is determined by the union of all properties on all objects in rows; - * the order of columns is nondeterministic. - * - * Equivalent to `dsvFormat("\t").format`. - * - * @param rows Array of object rows. - * @param columns An array of strings representing the column names. - */ -export function tsvFormat<T extends object>(rows: T[], columns?: Array<keyof T>): string; - -// tsvFormatBody(...) ============================================================================ - -/** - * Equivalent to dsvFormat("\t").formatBody. - * - * @param rows Array of object rows. - * @param columns An array of strings representing the column names. - */ -export function tsvFormatBody<T extends object>(rows: T[], columns?: Array<keyof T>): string; - -// tsvFormatRows(...) ======================================================================== - -/** - * Formats the specified array of array of string rows as tab-separated values, returning a string. - * This operation is the reverse of tsvParseRows. Each row will be separated by a newline (\n), - * and each column within each row will be separated by the tab-delimiter. - * Values that contain either the tab-delimiter, a double-quote (") or a newline will be escaped using double-quotes. - * - * To convert an array of objects to an array of arrays while explicitly specifying the columns, use array.map. - * If you like, you can also array.concat this result with an array of column names to generate the first row. - * - * Equivalent to `dsvFormat("\t").formatRows`. - * - * @param rows An array of array of string rows. - */ -export function tsvFormatRows(rows: string[][]): string; - -// tsvFormatRow(...) ======================================================================== - -/** - * Equivalent to dsvFormat("\t").formatRow. - * - * @param row An array of strings representing a row. - */ -export function tsvFormatRow(row: string[]): string; - -// tsvFormatValue(...) ======================================================================== - -/** - * Equivalent to dsvFormat("\t").formatValue. - * - * @param value A value. - */ -export function tsvFormatValue(value: string): string; - -// ------------------------------------------------------------------------------------------ -// DSV Generalized Parsers and Formatters -// ------------------------------------------------------------------------------------------ - -/** - * A DSV parser and formatter - */ -export interface DSV { - /** - * Parses the specified string, which must be in the delimiter-separated values format with the appropriate delimiter, returning an array of objects representing the parsed rows. - * - * Unlike dsv.parseRows, this method requires that the first line of the DSV content contains a delimiter-separated list of column names; - * these column names become the attributes on the returned objects. - * - * The returned array also exposes a columns property containing the column names in input order (in contrast to Object.keys, whose iteration order is arbitrary). - * - * @param dsvString A string, which must be in the delimiter-separated values format with the appropriate delimiter. - */ - // tslint:disable-next-line:no-unnecessary-generics - parse<Columns extends string>(dsvString: string): DSVRowArray<Columns>; - /** - * Parses the specified string, which must be in the delimiter-separated values format with the appropriate delimiter, returning an array of objects representing the parsed rows. - * - * Unlike dsv.parseRows, this method requires that the first line of the DSV content contains a delimiter-separated list of column names; - * these column names become the attributes on the returned objects. - * - * The returned array also exposes a columns property containing the column names in input order (in contrast to Object.keys, whose iteration order is arbitrary). - * - * @param dsvString A string, which must be in the delimiter-separated values format with the appropriate delimiter. - * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), - * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. - * In effect, row is similar to applying a map and filter operator to the returned rows. - */ - parse<ParsedRow extends object, Columns extends string>( - dsvString: string, - row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null - ): DSVParsedArray<ParsedRow>; - - /** - * Parses the specified string, which must be in the delimiter-separated values format with the appropriate delimiter, returning an array of arrays representing the parsed rows. - * - * Unlike dsv.parse, this method treats the header line as a standard row, and should be used whenever DSV content does not contain a header. - * Each row is represented as an array rather than an object. Rows may have variable length. - * - * If a row conversion function is not specified, field values are strings. For safety, there is no automatic conversion to numbers, dates, or other types. - * In some cases, JavaScript may coerce strings to numbers for you automatically (for example, using the + operator), but better is to specify a row conversion function. - * - * @param dsvString A string, which must be in the delimiter-separated values format with the appropriate delimiter. - */ - parseRows(dsvString: string): string[][]; - /** - * Parses the specified string, which must be in the delimiter-separated values format with the appropriate delimiter, returning an array of arrays representing the parsed rows. - * - * Unlike dsv.parse, this method treats the header line as a standard row, and should be used whenever DSV content does not contain a header. - * Each row is represented as an array rather than an object. Rows may have variable length. - * - * @param dsvString A string, which must be in the delimiter-separated values format with the appropriate delimiter. - * @param row A row conversion function which is invoked for each row, being passed an array representing the current row (d), the index (i) - * starting at zero for the first row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. - * In effect, row is similar to applying a map and filter operator to the returned rows. - */ - parseRows<ParsedRow extends object>( - dsvString: string, - row: (rawRow: string[], index: number) => ParsedRow | undefined | null - ): ParsedRow[]; - - /** - * Formats the specified array of object rows as delimiter-separated values, returning a string. - * This operation is the inverse of dsv.parse. Each row will be separated by a newline (\n), - * and each column within each row will be separated by the delimiter (such as a comma, ,). - * Values that contain either the delimiter, a double-quote (") or a newline will be escaped using double-quotes. - * - * If columns is not specified, the list of column names that forms the header row is determined by the union of all properties on all objects in rows; - * the order of columns is nondeterministic. - * - * @param rows Array of object rows. - * @param columns An array of strings representing the column names. - */ - format<T extends object>(rows: T[], columns?: Array<keyof T>): string; - - /** - * Equivalent to dsv.format, but omits the header row. - * This is useful, for example, when appending rows to an existing file. - * - * @param rows Array of object rows. - * @param columns An array of strings representing the column names. - */ - formatBody<T extends object>(rows: T[], columns?: Array<keyof T>): string; - - /** - * Formats the specified array of array of string rows as delimiter-separated values, returning a string. - * This operation is the reverse of dsv.parseRows. Each row will be separated by a newline (\n), - * and each column within each row will be separated by the delimiter (such as a comma, ,). - * Values that contain either the delimiter, a double-quote (") or a newline will be escaped using double-quotes. - * - * To convert an array of objects to an array of arrays while explicitly specifying the columns, use array.map. - * If you like, you can also array.concat this result with an array of column names to generate the first row. - * - * @param rows An array of array of string rows. - */ - formatRows(rows: string[][]): string; - - /** - * Formats a single array row of strings as delimiter-separated values, returning a string. - * Each column within the row will be separated by the delimiter (such as a comma, ,). - * Values that contain either the delimiter, a double-quote (") or a newline will be escaped using double-quotes. - * - * @param row An array of strings representing a row. - */ - formatRow(row: string[]): string; - - /** - * Format a single value or string as a delimiter-separated value, returning a string. - * A value that contains either the delimiter, a double-quote (") or a newline will be escaped using double-quotes. - * - * @param value A value. - */ - formatValue(value: string): string; -} - -/** - * Constructs a new DSV parser and formatter for the specified delimiter. - * - * @param delimiter A delimiter character. The delimiter must be a single character (i.e., a single 16-bit code unit); - * so, ASCII delimiters are fine, but emoji delimiters are not. - */ -export function dsvFormat(delimiter: string): DSV; - -/** - * Infers the types of values on the object and coerces them accordingly, returning the mutated object. - * This function is intended to be used as a row accessor function in conjunction with dsv.parse and dsv.parseRows. - * - * @param object An object (or array) representing a parsed row - */ -export function autoType<ParsedRow extends object | undefined | null, Columns extends string>( - // tslint:disable-next-line:no-unnecessary-generics - object: DSVRowString<Columns> | string[] -// tslint:disable-next-line:no-unnecessary-generics -): ParsedRow; diff --git a/node_modules/@types/d3-dsv/package.json b/node_modules/@types/d3-dsv/package.json deleted file mode 100644 index 3b765bf5158f2f9e88c0421195fd5390cf8e2d2d..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-dsv/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "@types/d3-dsv@^1", - "_id": "@types/d3-dsv@1.2.1", - "_inBundle": false, - "_integrity": "sha512-LLmJmjiqp/fTNEdij5bIwUJ6P6TVNk5hKM9/uk5RPO2YNgEu9XvKO0dJ7Iqd3psEdmZN1m7gB1bOsjr4HmO2BA==", - "_location": "/@types/d3-dsv", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-dsv@^1", - "name": "@types/d3-dsv", - "escapedName": "@types%2fd3-dsv", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3", - "/@types/d3-fetch" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-1.2.1.tgz", - "_shasum": "1524fee9f19d689c2f76aa0e24e230762bf96994", - "_spec": "@types/d3-dsv@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-dsv module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-dsv", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-dsv" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "7f3152d2dc9fb70617c80b224b42a658272ddb4b1421272a481949d378fcac98", - "version": "1.2.1" -} diff --git a/node_modules/@types/d3-ease/LICENSE b/node_modules/@types/d3-ease/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-ease/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-ease/README.md b/node_modules/@types/d3-ease/README.md deleted file mode 100644 index e43e83d9ea4a688d5d227f00b7cc4d725d5eee70..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-ease/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-ease` - -# Summary -This package contains type definitions for D3JS d3-ease module (https://github.com/d3/d3-ease/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-ease/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 20:01:29 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah06). diff --git a/node_modules/@types/d3-ease/index.d.ts b/node_modules/@types/d3-ease/index.d.ts deleted file mode 100644 index fb3d1151dadc5d9c2dce39d3a94a51f06ec0785d..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-ease/index.d.ts +++ /dev/null @@ -1,324 +0,0 @@ -// Type definitions for D3JS d3-ease module 1.0 -// Project: https://github.com/d3/d3-ease/, https://d3js.org/d3-ease -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// Nathan Bierema <https://github.com/Methuselah06> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// Last module patch version validated against: 1.0.7 - -// -------------------------------------------------------------------------- -// Easing Functions -// -------------------------------------------------------------------------- - -/** - * Linear easing; the identity function; linear(t) returns t. - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeLinear(normalizedTime: number): number; - -/** - * Symmetric quadratic easing; scales quadIn for t in [0, 0.5] and quadOut for t in [0.5, 1]. Also equivalent to poly.exponent(2). - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeQuad(normalizedTime: number): number; - -/** - * Quadratic easing; equivalent to polyIn.exponent(2). - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeQuadIn(normalizedTime: number): number; - -/** - * Reverse quadratic easing; equivalent to 1 - quadIn(1 - t). Also equivalent to polyOut.exponent(2). - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeQuadOut(normalizedTime: number): number; - -/** - * Symmetric quadratic easing; scales quadIn for t in [0, 0.5] and quadOut for t in [0.5, 1]. Also equivalent to poly.exponent(2). - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeQuadInOut(normalizedTime: number): number; - -/** - * Symmetric cubic easing; scales cubicIn for t in [0, 0.5] and cubicOut for t in [0.5, 1]. Also equivalent to poly.exponent(3). - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeCubic(normalizedTime: number): number; - -/** - * Cubic easing; equivalent to polyIn.exponent(3). - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeCubicIn(normalizedTime: number): number; - -/** - * Reverse cubic easing; equivalent to 1 - cubicIn(1 - t). Also equivalent to polyOut.exponent(3). - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeCubicOut(normalizedTime: number): number; - -/** - * Symmetric cubic easing; scales cubicIn for t in [0, 0.5] and cubicOut for t in [0.5, 1]. Also equivalent to poly.exponent(3). - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeCubicInOut(normalizedTime: number): number; - -/** - * Polynomial easing function factory - */ -export interface PolynomialEasingFactory { - /** - * Calculate eased time. - * @param normalizedTime Normalized time typically in the range [0, 1] - */ - (normalizedTime: number): number; - /** - * Returns a new polynomial easing with the specified exponent e. - * If the exponent is not specified, it defaults to 3, equivalent to cubic. - * - * @param e Exponent for polynomial easing. - */ - exponent(e: number): PolynomialEasingFactory; -} - -/** - * Symmetric polynomial easing/easing factory; scales polyIn for t in [0, 0.5] and polyOut for t in [0.5, 1]. - * If the exponent is not specified, it defaults to 3, equivalent to cubic. - */ -export const easePoly: PolynomialEasingFactory; -/** - * Polynomial easing/easing factory; raises t to the specified exponent. - * If the exponent is not specified, it defaults to 3, equivalent to cubicIn. - */ -export const easePolyIn: PolynomialEasingFactory; - -/** - * Reverse polynomial easing/easing factory; equivalent to 1 - polyIn(1 - t). - * If the exponent is not specified, it defaults to 3, equivalent to cubicOut. - */ -export const easePolyOut: PolynomialEasingFactory; - -/** - * Symmetric polynomial easing/easing factory; scales polyIn for t in [0, 0.5] and polyOut for t in [0.5, 1]. - * If the exponent is not specified, it defaults to 3, equivalent to cubic. - */ -export const easePolyInOut: PolynomialEasingFactory; - -/** - * Symmetric sinusoidal easing; scales sinIn for t in [0, 0.5] and sinOut for t in [0.5, 1]. - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeSin(normalizedTime: number): number; - -/** - * Sinusoidal easing; returns sin(t). - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeSinIn(normalizedTime: number): number; - -/** - * Reverse sinusoidal easing; equivalent to 1 - sinIn(1 - t). - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeSinOut(normalizedTime: number): number; - -/** - * Symmetric sinusoidal easing; scales sinIn for t in [0, 0.5] and sinOut for t in [0.5, 1]. - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeSinInOut(normalizedTime: number): number; - -/** - * Symmetric exponential easing; scales expIn for t in [0, 0.5] and expOut for t in [0.5, 1]. - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeExp(normalizedTime: number): number; - -/** - * Exponential easing; raises 2 to the exponent 10 * (t - 1). - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeExpIn(normalizedTime: number): number; - -/** - * Reverse exponential easing; equivalent to 1 - expIn(1 - t). - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeExpOut(normalizedTime: number): number; - -/** - * Symmetric exponential easing; scales expIn for t in [0, 0.5] and expOut for t in [0.5, 1]. - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeExpInOut(normalizedTime: number): number; - -/** - * Symmetric circular easing; scales circleIn for t in [0, 0.5] and circleOut for t in [0.5, 1]. - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeCircle(normalizedTime: number): number; - -/** - * Circular easing. - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeCircleIn(normalizedTime: number): number; - -/** - * Reverse circular easing; equivalent to 1 - circleIn(1 - t). - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeCircleOut(normalizedTime: number): number; - -/** - * Symmetric circular easing; scales circleIn for t in [0, 0.5] and circleOut for t in [0.5, 1]. - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeCircleInOut(normalizedTime: number): number; - -/** - * Reverse bounce easing; equivalent to 1 - bounceIn(1 - t). - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeBounce(normalizedTime: number): number; - -/** - * Bounce easing, like a rubber ball. - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeBounceIn(normalizedTime: number): number; - -/** - * Reverse bounce easing; equivalent to 1 - bounceIn(1 - t). - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeBounceOut(normalizedTime: number): number; - -/** - * Symmetric bounce easing; scales bounceIn for t in [0, 0.5] and bounceOut for t in [0.5, 1]. - * - * @param normalizedTime Normalized time typically in the range [0, 1] - */ -export function easeBounceInOut(normalizedTime: number): number; - -/** - * Anticipatory easing function factory - */ -export interface BackEasingFactory { - /** - * Calculate eased time. - * @param normalizedTime Normalized time typically in the range [0, 1] - */ - (normalizedTime: number): number; - /** - * Returns a new back easing with the specified overshoot s. - * The degree of overshoot is configurable; if not specified, it defaults to 1.70158. - * - * @param s Overshoot parameter - */ - overshoot(s: number): BackEasingFactory; -} - -/** - * Symmetric anticipatory easing; scales backIn for t in [0, 0.5] and backOut for t in [0.5, 1]. - * The degree of overshoot is configurable; it not specified, it defaults to 1.70158. - */ -export const easeBack: BackEasingFactory; - -/** - * Anticipatory easing, like a dancer bending their knees before jumping off the floor. - * The degree of overshoot is configurable; it not specified, it defaults to 1.70158. - */ -export const easeBackIn: BackEasingFactory; - -/** - * Reverse anticipatory easing; equivalent to 1 - backIn(1 - t). - * The degree of overshoot is configurable; it not specified, it defaults to 1.70158. - */ -export const easeBackOut: BackEasingFactory; - -/** - * Symmetric anticipatory easing; scales backIn for t in [0, 0.5] and backOut for t in [0.5, 1]. - * The degree of overshoot is configurable; it not specified, it defaults to 1.70158. - */ -export const easeBackInOut: BackEasingFactory; - -/** - * Elastic easing function factory - */ -export interface ElasticEasingFactory { - /** - * Calculate eased time. - * @param normalizedTime Normalized time typically in the range [0, 1] - */ - (normalizedTime: number): number; - /** - * Returns a new elastic easing with the specified amplitude a. - * Defaults to 1,if not specified. - * - * @param a Amplitude for elastic easing. - */ - amplitude(a: number): ElasticEasingFactory; - /** - * Returns a new elastic easing with the specified amplitude a. - * Defaults to 0.3,if not specified. - * - * @param p Period for elastic easing. - */ - period(p: number): ElasticEasingFactory; -} - -/** - * Reverse elastic easing; equivalent to 1 - elasticIn(1 - t). - * The amplitude and period of the oscillation are configurable; - * if not specified, they default to 1 and 0.3, respectively. - */ -export const easeElastic: ElasticEasingFactory; - -/** - * Elastic easing, like a rubber band. - * The amplitude and period of the oscillation are configurable; - * if not specified, they default to 1 and 0.3, respectively. - */ -export const easeElasticIn: ElasticEasingFactory; - -/** - * Reverse elastic easing; equivalent to 1 - elasticIn(1 - t). - * The amplitude and period of the oscillation are configurable; - * if not specified, they default to 1 and 0.3, respectively. - */ -export const easeElasticOut: ElasticEasingFactory; - -/** - * Symmetric elastic easing; scales elasticIn for t in [0, 0.5] and elasticOut for t in [0.5, 1]. - * The amplitude and period of the oscillation are configurable; - * if not specified, they default to 1 and 0.3, respectively. - */ -export const easeElasticInOut: ElasticEasingFactory; diff --git a/node_modules/@types/d3-ease/package.json b/node_modules/@types/d3-ease/package.json deleted file mode 100644 index 0afb6c57b30a13bbfaafac5117af242c8a6cb283..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-ease/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "@types/d3-ease@^1", - "_id": "@types/d3-ease@1.0.10", - "_inBundle": false, - "_integrity": "sha512-fMFTCzd8DOwruE9zlu2O8ci5ct+U5jkGcDS+cH+HCidnJlDs0MZ+TuSVCFtEzh4E5MasItwy+HvgoFtxPHa5Cw==", - "_location": "/@types/d3-ease", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-ease@^1", - "name": "@types/d3-ease", - "escapedName": "@types%2fd3-ease", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-1.0.10.tgz", - "_shasum": "09910e8558439b6038a7ed620650e510394ffa6d", - "_spec": "@types/d3-ease@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah06" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-ease module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-ease", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-ease" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "b0f5314001d6967697254b6027c94e053f8717d39009654a27720593920031db", - "version": "1.0.10" -} diff --git a/node_modules/@types/d3-fetch/LICENSE b/node_modules/@types/d3-fetch/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-fetch/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-fetch/README.md b/node_modules/@types/d3-fetch/README.md deleted file mode 100644 index a0a33e7c439d98a72bf6edb665b046c896b1af4f..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-fetch/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-fetch` - -# Summary -This package contains type definitions for d3-fetch (https://d3js.org/d3-fetch/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-fetch/v1. - -### Additional Details - * Last updated: Thu, 01 Oct 2020 22:50:45 GMT - * Dependencies: [@types/d3-dsv](https://npmjs.com/package/@types/d3-dsv) - * Global values: none - -# Credits -These definitions were written by [Hugues Stefanski](https://github.com/ledragon), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-fetch/index.d.ts b/node_modules/@types/d3-fetch/index.d.ts deleted file mode 100644 index 723bb804a8ce703787dccdd0f09e8363c1c0e47f..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-fetch/index.d.ts +++ /dev/null @@ -1,283 +0,0 @@ -// Type definitions for d3-fetch 1.2 -// Project: https://d3js.org/d3-fetch/ -// Definitions by: Hugues Stefanski <https://github.com/ledragon> -// denisname <https://github.com/denisname> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.2.0 - -import { DSVParsedArray, DSVRowArray, DSVRowString } from "d3-dsv"; - -/** - * Fetches the binary file at the specified input URL and returns it as a Promise of a Blob. - * If init is specified, it is passed along to the underlying call to fetch. - * - * @param url A valid URL string. - * @param init An optional request initialization object. - */ -export function blob(url: string, init?: RequestInit): Promise<Blob>; - -/** - * Fetches the binary file at the specified input URL and returns it as a Promise of an ArrayBuffer. - * If init is specified, it is passed along to the underlying call to fetch. - * - * @param url A valid URL string. - * @param init An optional request initialization object. - */ -export function buffer(url: string, init?: RequestInit): Promise<ArrayBuffer>; - -/** - * Fetches the CSV file at the specified input URL and returns - * a promise of an array of objects representing the parsed rows. The values of the properties of the parsed row - * objects are represented as strings. - * - * If init is specified, it is passed along to the underlying call to fetch. - * - * The generic parameter describes the column names as a union of string literal types. - * - * @param url A valid URL string. - * @param init An optional request initialization object. - */ -export function csv<Columns extends string>( - url: string, - init?: RequestInit -): Promise<DSVRowArray<Columns>>; -/** - * Fetches the CSV file at the specified input URL and returns - * a promise of an array of objects representing the parsed rows. - * - * The specified row conversion function is used to map and filter row objects to a more-specific representation; - * see dsv.csvParse for details. - * - * The first generic parameter describes the type of the object representation of a parsed row. - * The second generic parameter describes the column names as a union of string literal types. - * - * @param url A valid URL string. - * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), - * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be omitted from the array returned by dsv.csvParse; otherwise, the returned value defines the corresponding row object. - * In effect, row is similar to applying a map and filter operator to the returned rows. - */ -export function csv<ParsedRow extends object, Columns extends string = string>( - url: string, - row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null -): Promise<DSVParsedArray<ParsedRow>>; -/** - * Fetches the CSV file at the specified input URL and returns - * a promise of an array of objects representing the parsed rows. - * - * The init object is passed along to the underlying call to fetch. - * - * The specified row conversion function is used to map and filter row objects to a more-specific representation; - * see dsv.csvParse for details. - * - * The first generic parameter describes the type of the object representation of a parsed row. - * The second generic parameter describes the column names as a union of string literal types. - * - * @param url A valid URL string. - * @param init An request initialization object. - * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), - * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be omitted from the array returned by dsv.csvParse; otherwise, the returned value defines the corresponding row object. - * In effect, row is similar to applying a map and filter operator to the returned rows. - */ -export function csv<ParsedRow extends object, Columns extends string = string>( - url: string, - init: RequestInit, - row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null -): Promise<DSVParsedArray<ParsedRow>>; - -/** - * Fetches the DSV file with the specified delimiter character at the specified input URL and returns - * a promise of an array of objects representing the parsed rows. The values of the properties of the parsed row - * objects are represented as strings. - * - * If init is specified, it is passed along to the underlying call to fetch. - * - * The generic parameter describes the column names as a union of string literal types. - * - * @param delimiter The delimiter character used in the DSV file to be fetched. - * @param url A valid URL string. - * @param init An optional request initialization object. - */ -export function dsv<Columns extends string>( - delimiter: string, - url: string, - init?: RequestInit -): Promise<DSVRowArray<Columns>>; -/** - * Fetches the DSV file with the specified delimiter character at the specified input URL and returns - * a promise of an array of objects representing the parsed rows. - * - * The specified row conversion function is used to map and filter row objects to a more-specific representation; - * see dsv.parse for details. - * - * The first generic parameter describes the type of the object representation of a parsed row. - * The second generic parameter describes the column names as a union of string literal types. - * - * @param delimiter The delimiter character used in the DSV file to be fetched. - * @param url A valid URL string. - * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), - * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. - * In effect, row is similar to applying a map and filter operator to the returned rows. - */ -export function dsv<ParsedRow extends object, Columns extends string = string>( - delimiter: string, - url: string, - row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null -): Promise<DSVParsedArray<ParsedRow>>; -/** - * Fetches the DSV file with the specified delimiter character at the specified input URL and returns - * a promise of an array of objects representing the parsed rows. - * - * The init object is passed along to the underlying call to fetch. - * - * The specified row conversion function is used to map and filter row objects to a more-specific representation; - * see dsv.parse for details. - * - * The first generic parameter describes the type of the object representation of a parsed row. - * The second generic parameter describes the column names as a union of string literal types. - * - * @param delimiter The delimiter character used in the DSV file to be fetched. - * @param url A valid URL string. - * @param init An request initialization object. - * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), - * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be omitted from the array returned by dsv.parse; otherwise, the returned value defines the corresponding row object. - * In effect, row is similar to applying a map and filter operator to the returned rows. - */ -export function dsv<ParsedRow extends object, Columns extends string = string>( - delimiter: string, - url: string, - init: RequestInit, - row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null -): Promise<DSVParsedArray<ParsedRow>>; - -/** - * Fetches the file at the specified input URL as text, parses it as HTML and returns a Promise of an HTML DOM Document. - * - * If init is specified, it is passed along to the underlying call to fetch. - * - * @param url A valid URL string. - * @param init An optional request initialization object. - */ -export function html(url: string, init?: RequestInit): Promise<Document>; - -/** - * Fetches the image at the specified input URL and returns a promise of an HTML image element. - * - * If init is specified, sets any additional properties on the image before loading. - * - * @param url A valid URL string. - * @param init An optional object of image properties to set. - */ -export function image(url: string, init?: Partial<HTMLImageElement>): Promise<HTMLImageElement>; - -/** - * Fetches the json file at the specified input URL and returns it as a Promise of a parsed JSON object. - * - * If init is specified, it is passed along to the underlying call to fetch. - * - * If the server returns a status code of [204 No Content](https://developer.mozilla.org/docs/Web/HTTP/Status/204) - * or [205 Reset Content](https://developer.mozilla.org/docs/Web/HTTP/Status/205), the promise resolves to `undefined`. - * - * The generic parameter describes the type of the object parsed from the returned JSON. - * - * @param url A valid URL string. - * @param init An optional request initialization object. - */ -export function json<ParsedJSONObject extends any>(url: string, init?: RequestInit): Promise<ParsedJSONObject | undefined>; - -/** - * Fetches the file at the specified input URL as text, parses it as SVG and returns a Promise of an SVG Document. - * - * If init is specified, it is passed along to the underlying call to fetch. - * - * @param url A valid URL string. - * @param init An optional request initialization object. - */ -export function svg(url: string, init?: RequestInit): Promise<Document>; - -/** - * Fetches the text file at the specified input URL and returns it as a Promise of a string. - * - * If init is specified, it is passed along to the underlying call to fetch. - * - * @param url A valid URL string. - * @param init An optional request initialization object. - */ -export function text(url: string, init?: RequestInit): Promise<string>; - -/** - * Fetches the TSV file at the specified input URL and returns - * a promise of an array of objects representing the parsed rows. - * - * If init is specified, it is passed along to the underlying call to fetch. - * - * The generic parameter describes the column names as a union of string literal types. - * - * @param url A valid URL string. - * @param init An optional request initialization object. - */ -export function tsv<Columns extends string>( - url: string, - init?: RequestInit -): Promise<DSVRowArray<Columns>>; -/** - * Fetches the TSV file at the specified input URL and returns - * a promise of an array of objects representing the parsed rows. The values of the properties of the parsed row - * objects are represented as strings. - * - * The specified row conversion function is used to map and filter row objects to a more-specific representation; - * see dsv.tsvParse for details. - * - * The first generic parameter describes the type of the object representation of a parsed row. - * The second generic parameter describes the column names as a union of string literal types. - * - * @param url A valid URL string. - * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), - * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be omitted from the array returned by dsv.tsvParse; otherwise, the returned value defines the corresponding row object. - * In effect, row is similar to applying a map and filter operator to the returned rows. - */ -export function tsv<ParsedRow extends object, Columns extends string = string>( - url: string, - row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null -): Promise<DSVParsedArray<ParsedRow>>; -/** - * Fetches the TSV file at the specified input URL and returns - * a promise of an array of objects representing the parsed rows. - * - * The init object is passed along to the underlying call to fetch. - * - * The specified row conversion function is used to map and filter row objects to a more-specific representation; - * see dsv.tsvParse for details. - * - * The first generic parameter describes the type of the object representation of a parsed row. - * The second generic parameter describes the column names as a union of string literal types. - * - * @param url A valid URL string. - * @param init An request initialization object. - * @param row A row conversion function which is invoked for each row, being passed an object representing the current row (d), - * the index (i) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, - * the row is skipped and will be omitted from the array returned by dsv.tsvParse; otherwise, the returned value defines the corresponding row object. - * In effect, row is similar to applying a map and filter operator to the returned rows. - */ -export function tsv<ParsedRow extends object, Columns extends string = string>( - url: string, - init: RequestInit, - row: (rawRow: DSVRowString<Columns>, index: number, columns: Columns[]) => ParsedRow | undefined | null -): Promise<DSVParsedArray<ParsedRow>>; - -/** - * Fetches the file at the specified input URL as text, parses it as XML and returns a Promise of an XML Document. - * - * If init is specified, it is passed along to the underlying call to fetch. - * - * @param url A valid URL string. - * @param init An optional request initialization object. - */ -export function xml(url: string, init?: RequestInit): Promise<XMLDocument>; diff --git a/node_modules/@types/d3-fetch/package.json b/node_modules/@types/d3-fetch/package.json deleted file mode 100644 index 83abd38c2cb17b38583995415ab7fcaaf4570bf3..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-fetch/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "_from": "@types/d3-fetch@^1", - "_id": "@types/d3-fetch@1.2.2", - "_inBundle": false, - "_integrity": "sha512-rtFs92GugtV/NpiJQd0WsmGLcg52tIL0uF0bKbbJg231pR9JEb6HT4AUwrtuLq3lOeKdLBhsjV14qb0pMmd0Aw==", - "_location": "/@types/d3-fetch", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-fetch@^1", - "name": "@types/d3-fetch", - "escapedName": "@types%2fd3-fetch", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-1.2.2.tgz", - "_shasum": "b93bfe248b8b761af82f4dac57959c989f67da3e", - "_spec": "@types/d3-fetch@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Hugues Stefanski", - "url": "https://github.com/ledragon" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": { - "@types/d3-dsv": "^1" - }, - "deprecated": false, - "description": "TypeScript definitions for d3-fetch", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-fetch", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-fetch" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "1e751beb35f93be464adc0b0fcb08aa69c8498a65eebb2394573adec83de683c", - "version": "1.2.2" -} diff --git a/node_modules/@types/d3-force/LICENSE b/node_modules/@types/d3-force/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-force/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-force/README.md b/node_modules/@types/d3-force/README.md deleted file mode 100644 index 3e9dc29a77d046a4466d7f773ec920efe6ae6ea8..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-force/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-force` - -# Summary -This package contains type definitions for D3JS d3-force module (https://github.com/d3/d3-force/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-force/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 21:08:22 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-force/index.d.ts b/node_modules/@types/d3-force/index.d.ts deleted file mode 100644 index a60df25393cd270d3bd78473e7cc6890e5fd9414..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-force/index.d.ts +++ /dev/null @@ -1,1249 +0,0 @@ -// Type definitions for D3JS d3-force module 1.2 -// Project: https://github.com/d3/d3-force/, https://d3js.org/d3-force -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// Last module patch version validated against: 1.2.1 - -// ----------------------------------------------------------------------- -// Force Simulation -// ----------------------------------------------------------------------- - -/** - * The base data structure for the datum of a Simulation Node. - * The optional properties contained in this data structure are internally assigned - * by the Simulation upon (re-)initialization. - * - * When defining a data type to use for node data, it should be an extension of this interface - * and respect the already "earmarked" properties used by the simulation. - * - * IMPORTANT: Prior to initialization, the following properties are optional: index, x, y, vx, and vy. - * After initialization they will be defined. The optional properties fx and fy are ONLY defined, - * if the node's position has been fixed. - */ -export interface SimulationNodeDatum { - /** - * Node’s zero-based index into nodes array. This property is set during the initialization process of a simulation. - */ - index?: number; - /** - * Node’s current x-position - */ - x?: number; - /** - * Node’s current y-position - */ - y?: number; - /** - * Node’s current x-velocity - */ - vx?: number; - /** - * Node’s current y-velocity - */ - vy?: number; - /** - * Node’s fixed x-position (if position was fixed) - */ - fx?: number | null; - /** - * Node’s fixed y-position (if position was fixed) - */ - fy?: number | null; -} - -/** - * The base data structure for the datum of a Simulation Link, as used by ForceLink. - * The optional properties contained in this data structure are internally assigned - * by when initializing with ForceLink.links(...) - * - * - * IMPORTANT: The source and target properties may be internally mutated in type during the - * ForceLink initialization process (possibly being changed from a node index in the nodes array, - * or a node id string to the simulation node object which was mapped in using the current - * ForceLink.id(...) accessor function.) - */ -export interface SimulationLinkDatum<NodeDatum extends SimulationNodeDatum> { - /** - * Link’s source node. - * For convenience, a link’s source and target properties may be initialized using numeric or string identifiers rather than object references; see link.id. - * When the link force is initialized (or re-initialized, as when the nodes or links change), any link.source or link.target property which is not an object - * is replaced by an object reference to the corresponding node with the given identifier. - * After initialization, the source property represents the source node object. - */ - source: NodeDatum | string | number; - /** - * Link’s source link - * For convenience, a link’s source and target properties may be initialized using numeric or string identifiers rather than object references; see link.id. - * When the link force is initialized (or re-initialized, as when the nodes or links change), any link.source or link.target property which is not an object - * is replaced by an object reference to the corresponding node with the given identifier. - * After initialization, the target property represents the target node object. - */ - target: NodeDatum | string | number; - /** - * The zero-based index into the links array. Internally generated when calling ForceLink.links(...) - */ - index?: number; -} - -/** - * A Force Simulation - * - * The first generic refers to the type of the datum associated with a node in the simulation. - * The second generic refers to the type of the datum associated with a link in the simulation, if applicable. - * - */ -export interface Simulation<NodeDatum extends SimulationNodeDatum, LinkDatum extends SimulationLinkDatum<NodeDatum> | undefined> { - /** - * Restart the simulation’s internal timer and return the simulation. - * In conjunction with simulation.alphaTarget or simulation.alpha, this method can be used to “reheat†the simulation during interaction, - * such as when dragging a node, or to resume the simulation after temporarily pausing it with simulation.stop. - */ - restart(): this; - - /** - * Stop the simulation’s internal timer, if it is running, and return the simulation. If the timer is already stopped, this method does nothing. - * This method is useful for running the simulation manually; see simulation.tick. - */ - stop(): this; - - /** - * Manually steps the simulation by the specified number of *iterations*, and returns the simulation. If *iterations* is not specified, it defaults to 1 (single step). - * - * For each iteration, it increments the current alpha by (alphaTarget - alpha) × alphaDecay; then invokes each registered force, passing the new alpha; - * then decrements each node’s velocity by velocity × velocityDecay; lastly increments each node’s position by velocity. - * - * This method does not dispatch events; events are only dispatched by the internal timer when the simulation is started automatically upon - * creation or by calling simulation.restart. The natural number of ticks when the simulation is started is - * ⌈log(alphaMin) / log(1 - alphaDecay)⌉; by default, this is 300. - */ - tick(iterations?: number): void; - - /** - * Returns the simulation’s array of nodes as specified to the constructor. - */ - nodes(): NodeDatum[]; - /** - * Set the simulation’s nodes to the specified array of objects, initialize their positions and velocities if necessary, - * and then re-initialize any bound forces; Returns the simulation. - * - * Each node must be an object. The following properties are assigned by the simulation: - * - index (the node’s zero-based index into nodes) - * - x (the node’s current x-position) - * - y (the node’s current y-position) - * - vx (the node’s current x-velocity) - * - vy (the node’s current y-velocity) - * - * The position [x,y] and velocity [vx,vy] may be subsequently modified by forces and by the simulation. - * If either vx or vy is NaN, the velocity is initialized to [0,0]. If either x or y is NaN, the position is initialized in a phyllotaxis arrangement, - * so chosen to ensure a deterministic, uniform distribution around the origin. - * - * To fix a node in a given position, you may specify two additional properties: - * - fx (the node’s fixed x-position) - * - fy (the node’s fixed y-position) - * - * At the end of each tick, after the application of any forces, a node with a defined node.fx has node.x reset to this value and node.vx set to zero; - * likewise, a node with a defined node.fy has node.y reset to this value and node.vy set to zero. - * To unfix a node that was previously fixed, set node.fx and node.fy to null, or delete these properties. - * - * If the specified array of nodes is modified, such as when nodes are added to or removed from the simulation, - * this method must be called again with the new (or changed) array to notify the simulation and bound forces of the change; - * the simulation does not make a defensive copy of the specified array. - */ - nodes(nodesData: NodeDatum[]): this; - - /** - * Return the current alpha of the simulation, which defaults to 1. - */ - alpha(): number; - /** - * Set the current alpha to the specified number in the range [0,1] and return this simulation. - * The default is 1. - * - * @param alpha Current alpha of simulation. - */ - alpha(alpha: number): this; - - /** - * Return the current minimum alpha value, which defaults to 0.001. - */ - alphaMin(): number; - /** - * Set the minimum alpha to the specified number in the range [0,1] and return this simulation. - * The default is 0.001. The simulation’s internal timer stops when the current alpha is less than the minimum alpha. - * The default alpha decay rate of ~0.0228 corresponds to 300 iterations. - * - * @param min Minimum alpha of simulation. - */ - alphaMin(min: number): this; - - /** - * Return the current alpha decay rate, which defaults to 0.0228… = 1 - pow(0.001, 1 / 300) where 0.001 is the default minimum alpha. - */ - alphaDecay(): number; - /** - * Set the alpha decay rate to the specified number in the range [0,1] and return this simulation. - * The default is 0.0228… = 1 - pow(0.001, 1 / 300) where 0.001 is the default minimum alpha. - * - * The alpha decay rate determines how quickly the current alpha interpolates towards the desired target alpha; - * since the default target alpha is zero, by default this controls how quickly the simulation cools. - * Higher decay rates cause the simulation to stabilize more quickly, but risk getting stuck in a local minimum; - * lower values cause the simulation to take longer to run, but typically converge on a better layout. - * To have the simulation run forever at the current alpha, set the decay rate to zero; - * alternatively, set a target alpha greater than the minimum alpha. - * - * @param decay Alpha decay rate. - */ - alphaDecay(decay: number): this; - - /** - * Returns the current target alpha value, which defaults to 0. - */ - alphaTarget(): number; - /** - * Set the current target alpha to the specified number in the range [0,1] and return this simulation. - * The default is 0. - * - * @param target Alpha target value. - */ - alphaTarget(target: number): this; - - /** - * Return the current target alpha value, which defaults to 0.4. - */ - velocityDecay(): number; - /** - * Set the velocity decay factor to the specified number in the range [0,1] and return this simulation. - * The default is 0.4. - * - * The decay factor is akin to atmospheric friction; after the application of any forces during a tick, - * each node’s velocity is multiplied by 1 - decay. As with lowering the alpha decay rate, - * less velocity decay may converge on a better solution, but risks numerical instabilities and oscillation. - * - * @param decay Velocity Decay. - */ - velocityDecay(decay: number): this; - - /** - * Return the force with the specified name, or undefined if there is no such force. - * (By default, new simulations have no forces.) - * - * Given that it is in general not known, what type of force has been registered under - * a specified name, use the generic to cast the result to the appropriate type, if known. - * - * @param name Name of the registered force. - */ - force<F extends Force<NodeDatum, LinkDatum>>(name: string): F| undefined; - /** - * Remove a previously registered force. - * - * @param name Name of the registered force. - * @param force Use null to remove force. - */ - force(name: string, force: null): this; - /** - * Assign the force for the specified name and return this simulation. - * (By default, new simulations have no forces.) - * - * @param name Name to register the force under. - * @param force A force to use with the simulation. - */ - force(name: string, force: Force<NodeDatum, LinkDatum>): this; - - /** - * Return the node closest to the position [x,y] with the given search radius. - * If radius is not specified, it defaults to infinity. - * If there is no node within the search area, returns undefined. - * - * @param x x-coordinate - * @param y y-coordinate - * @param radius Optional search radius. Defaults to infinity. - */ - find(x: number, y: number, radius?: number): NodeDatum | undefined; - - /** - * Return the first currently-assigned listener matching the specified typenames, if any. - * - * @param typenames The typenames is a string containing one or more typename separated by whitespace. Each typename is a type, - * optionally followed by a period (.) and a name, such as "tick.foo" and "tick.bar"; the name allows multiple listeners to be registered for the same type. - * The type must be one of the following: "tick" (after each tick of the simulation’s internal timer) or - * "end" (after the simulation’s timer stops when alpha < alphaMin). - */ - on(typenames: 'tick' | 'end' | string): ((this: Simulation<NodeDatum, LinkDatum>) => void) | undefined; - /** - * Remove the current event listeners for the specified typenames, if any, return the simulation. - * - * @param typenames The typenames is a string containing one or more typename separated by whitespace. Each typename is a type, - * optionally followed by a period (.) and a name, such as "tick.foo" and "tick.bar"; the name allows multiple listeners to be registered for the same type. - * The type must be one of the following: "tick" (after each tick of the simulation’s internal timer) or - * "end" (after the simulation’s timer stops when alpha < alphaMin). - * @param listener Use null to remove the listener. - */ - on(typenames: 'tick' | 'end' | string, listener: null): this; - /** - * Set the event listener for the specified typenames and return this simulation. - * If an event listener was already registered for the same type and name, - * the existing listener is removed before the new listener is added. - * When a specified event is dispatched, each listener will be invoked with the this context as the simulation. - * - * The type must be one of the following: - * - tick [after each tick of the simulation’s internal timer] - * - end [after the simulation’s timer stops when alpha < alphaMin] - * - * Note that tick events are not dispatched when simulation.tick is called manually; - * events are only dispatched by the internal timer and are intended for interactive rendering of the simulation. - * To affect the simulation, register forces instead of modifying nodes’ positions or velocities inside a tick event listener. - * - * @param typenames The typenames is a string containing one or more typename separated by whitespace. Each typename is a type, - * optionally followed by a period (.) and a name, such as "tick.foo" and "tick.bar"; the name allows multiple listeners to be registered for the same type. - * The type must be one of the following: "tick" (after each tick of the simulation’s internal timer) or - * "end" (after the simulation’s timer stops when alpha < alphaMin). - * @param listener An event listener function which is invoked with the this context of the simulation. - */ - on(typenames: 'tick' | 'end' | string, listener: (this: this) => void): this; -} - -/** - * Create a new simulation with the specified array of nodes and no forces. - * If nodes is not specified, it defaults to the empty array. - * The simulator starts automatically; use simulation.on to listen for tick events as the simulation runs. - * If you wish to run the simulation manually instead, call simulation.stop, and then call simulation.tick as desired. - * - * Use this signature, when creating a simulation WITHOUT link force(s). - * - * The generic refers to the type of the data for a node. - * - * @param nodesData Optional array of nodes data, defaults to empty array. - */ -export function forceSimulation<NodeDatum extends SimulationNodeDatum>(nodesData?: NodeDatum[]): Simulation<NodeDatum, undefined>; -/** - * Create a new simulation with the specified array of nodes and no forces. - * If nodes is not specified, it defaults to the empty array. - * The simulator starts automatically; use simulation.on to listen for tick events as the simulation runs. - * If you wish to run the simulation manually instead, call simulation.stop, and then call simulation.tick as desired. - * - * Use this signature, when creating a simulation WITH link force(s). - * - * The first generic refers to the type of data for a node. - * The second generic refers to the type of data for a link. - * - * @param nodesData Optional array of nodes data, defaults to empty array. - */ -export function forceSimulation<NodeDatum extends SimulationNodeDatum, LinkDatum extends SimulationLinkDatum<NodeDatum>>(nodesData?: NodeDatum[]): Simulation<NodeDatum, LinkDatum>; - -// ---------------------------------------------------------------------- -// Forces -// ---------------------------------------------------------------------- - -/** - * A force is simply a function that modifies nodes’ positions or velocities; in this context, a force can apply a classical physical force such as electrical charge or gravity, - * or it can resolve a geometric constraint, such as keeping nodes within a bounding box or keeping linked nodes a fixed distance apart. - * - * Forces typically read the node’s current position [x,y] and then add to (or subtract from) the node’s velocity [vx,vy]. - * However, forces may also “peek ahead†to the anticipated next position of the node, [x + vx,y + vy]; this is necessary for resolving geometric constraints through iterative relaxation. - * Forces may also modify the position directly, which is sometimes useful to avoid adding energy to the simulation, such as when recentering the simulation in the viewport. - * - * Forces may optionally implement force.initialize to receive the simulation’s array of nodes. - */ -export interface Force<NodeDatum extends SimulationNodeDatum, LinkDatum extends SimulationLinkDatum<NodeDatum> | undefined> { - /** - * Apply this force, optionally observing the specified alpha. - * Typically, the force is applied to the array of nodes previously passed to force.initialize, - * however, some forces may apply to a subset of nodes, or behave differently. - * For example, d3.forceLink applies to the source and target of each link. - */ - (alpha: number): void; - /** - * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force - * and when the simulation’s nodes change via simulation.nodes. - * - * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force. - */ - initialize?(nodes: NodeDatum[]): void; -} - -// Centering ------------------------------------------------------------ - -/** - * The centering force translates nodes uniformly so that the mean position of all nodes - * (the center of mass if all nodes have equal weight) is at the given position [x,y]. - * This force modifies the positions of nodes on each application; it does not modify velocities, - * as doing so would typically cause the nodes to overshoot and oscillate around the desired center. - * This force helps keeps nodes in the center of the viewport, and unlike the positioning force, - * it does not distort their relative positions. - * - * The generic refers to the type of data for a node. - */ -export interface ForceCenter<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> { - /** - * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force - * and when the simulation’s nodes change via simulation.nodes. - * - * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force. - */ - initialize(nodes: NodeDatum[]): void; - - /** - * Return the current x-coordinate of the centering position, which defaults to zero. - */ - x(): number; - /** - * Set the x-coordinate of the centering position. - * - * @param x x-coordinate. - */ - x(x: number): this; - - /** - * Return the current y-coordinate of the centering position, which defaults to zero. - */ - y(): number; - /** - * Set the y-coordinate of the centering position. - * - * @param y y-coordinate. - */ - y(y: number): this; -} - -/** - * Create a new centering force with the specified x- and y- coordinates. - * If x and y are not specified, they default to [0,0]. - * - * The centering force translates nodes uniformly so that the mean position of all nodes - * (the center of mass if all nodes have equal weight) is at the given position [x,y]. - * This force modifies the positions of nodes on each application; it does not modify velocities, - * as doing so would typically cause the nodes to overshoot and oscillate around the desired center. - * This force helps keeps nodes in the center of the viewport, and unlike the positioning force, - * it does not distort their relative positions. - * - * The generic refers to the type of data for a node. - * - * @param x An optional x-coordinate for the centering position, defaults to 0. - * @param y An optional y-coordinate for the centering position, defaults to 0. - */ -export function forceCenter<NodeDatum extends SimulationNodeDatum>(x?: number, y?: number): ForceCenter<NodeDatum>; - -// Collision ------------------------------------------------------------ - -/** - * The collision force treats nodes as circles with a given radius, rather than points, and prevents nodes from overlapping. - * More formally, two nodes a and b are separated so that the distance between a and b is at least radius(a) + radius(b). - * To reduce jitter, this is by default a “soft†constraint with a configurable strength and iteration count. - * - * The generic refers to the type of data for a node. - */ -export interface ForceCollide<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> { - /** - * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force - * and when the simulation’s nodes change via simulation.nodes. - * - * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force. - */ - initialize(nodes: NodeDatum[]): void; - - /** - * Returns the current radius accessor function. - */ - radius(): (node: NodeDatum, i: number, nodes: NodeDatum[]) => number; - /** - * Set the radius used in collision detection to a constant number for each node. - * - * The constant is internally wrapped into a radius accessor function. - * - * The radius accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the radius of each node is only recomputed - * when the force is initialized or when this method is called with a new radius, and not on every application of the force. - * - * @param radius A constant radius for each node. - */ - radius(radius: number): this; - /** - * Set the radius accessor function determining the radius for each node in collision detection. - * - * The radius accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the radius of each node is only recomputed - * when the force is initialized or when this method is called with a new radius, and not on every application of the force. - * - * @param radius A radius accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The function returns a radius. - */ - radius(radius: (node: NodeDatum, i: number, nodes: NodeDatum[]) => number): this; - - /** - * Return the current strength, which defaults to 0.7. - */ - strength(): number; - /** - * Set the force strength to the specified number in the range [0,1] and return this force. - * The default strength is 0.7. - * - * Overlapping nodes are resolved through iterative relaxation. - * For each node, the other nodes that are anticipated to overlap at the next tick (using the anticipated positions [x + vx,y + vy]) are determined; - * the node’s velocity is then modified to push the node out of each overlapping node. - * The change in velocity is dampened by the force’s strength such that the resolution of simultaneous overlaps can be blended together to find a stable solution. - * - * @param strength Strength. - */ - strength(strength: number): this; - - /** - * Return the current iteration count which defaults to 1. - */ - iterations(): number; - /** - * Sets the number of iterations per application to the specified number and return this force. - * - * Increasing the number of iterations greatly increases the rigidity of the constraint and avoids partial overlap of nodes, - * but also increases the runtime cost to evaluate the force. - * - * @param iterations Number of iterations. - */ - iterations(iterations: number): this; -} - -/** - * Creates a new circle collision force with the default radius one for all nodes. - * - * The collision force treats nodes as circles with a given radius, rather than points, and prevents nodes from overlapping. - * More formally, two nodes a and b are separated so that the distance between a and b is at least radius(a) + radius(b). - * To reduce jitter, this is by default a “soft†constraint with a configurable strength and iteration count. - * - * The generic refers to the type of data for a node. - */ -export function forceCollide<NodeDatum extends SimulationNodeDatum>(): ForceCollide<NodeDatum>; -/** - * Create a new circle collision force with the specified constant radius for all nodes. - * - * The collision force treats nodes as circles with a given radius, rather than points, and prevents nodes from overlapping. - * More formally, two nodes a and b are separated so that the distance between a and b is at least radius(a) + radius(b). - * To reduce jitter, this is by default a “soft†constraint with a configurable strength and iteration count. - * - * The generic refers to the type of data for a node. - * - * @param radius A constant radius for each node. - */ -export function forceCollide<NodeDatum extends SimulationNodeDatum>(radius: number): ForceCollide<NodeDatum>; -/** - * Creates a new circle collision force with the specified radius accessor function. - * - * The collision force treats nodes as circles with a given radius, rather than points, and prevents nodes from overlapping. - * More formally, two nodes a and b are separated so that the distance between a and b is at least radius(a) + radius(b). - * To reduce jitter, this is by default a “soft†constraint with a configurable strength and iteration count. - * - * The radius accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the radius of each node is only recomputed - * when the force is initialized or when this method is called with a new radius, and not on every application of the force. - * - * @param radius A radius accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The function returns a radius. - */ -export function forceCollide<NodeDatum extends SimulationNodeDatum>(radius: (node: NodeDatum, i: number, nodes: NodeDatum[]) => number): ForceCollide<NodeDatum>; - -// Link ---------------------------------------------------------------- - -/** - * The link force pushes linked nodes together or apart according to the desired link distance. - * The strength of the force is proportional to the difference between the linked nodes’ distance and the target distance, similar to a spring force. - * - * The first generic refers to the type of data for a node. - * The second generic refers to the type of data for a link. - */ -export interface ForceLink<NodeDatum extends SimulationNodeDatum, LinkDatum extends SimulationLinkDatum<NodeDatum>> extends Force<NodeDatum, LinkDatum> { - /** - * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force - * and when the simulation’s nodes change via simulation.nodes. - * - * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force. - */ - initialize(nodes: NodeDatum[]): void; - - /** - * Return the current array of links, which defaults to the empty array. - * - */ - links(): LinkDatum[]; - /** - * Set the array of links associated with this force, recompute the distance and strength parameters for each link, and return this force. - * - * Each link is an object with the following properties: - * * source - the link’s source node; see simulation.nodes - * * target - the link’s target node; see simulation.nodes - * * index - the zero-based index into links, assigned by this method - * - * For convenience, a link’s source and target properties may be initialized using numeric or string identifiers rather than object references; see link.id. - * When the link force is initialized (or re-initialized, as when the nodes or links change), any link.source or link.target property which is not an object - * is replaced by an object reference to the corresponding node with the given identifier. - * If the specified array of links is modified, such as when links are added to or removed from the simulation, - * this method must be called again with the new (or changed) array to notify the force of the change; - * the force does not make a defensive copy of the specified array. - * - * @param links An array of link data. - */ - links(links: LinkDatum[]): this; - - /** - * Return the current node id accessor, which defaults to the numeric node.index. - */ - id(): (node: NodeDatum, i: number, nodesData: NodeDatum[]) => (string | number); - /** - * Set the node id accessor to the specified function and return this force. - * - * The default id accessor allows each link’s source and target to be specified as a zero-based index - * into the nodes array. - * - * The id accessor is invoked for each node whenever the force is initialized, - * as when the nodes or links change, being passed the node, the zero-based index of the node in the node array, and the node array. - * - * @param id A node id accessor function which is invoked for each node in the simulation, - * being passed the node, the zero-based index of the node in the node array, and the node array. It returns a string to represent the node id which can be used - * for matching link source and link target strings during the ForceLink initialization. - */ - id(id: (node: NodeDatum, i: number, nodesData: NodeDatum[]) => string): this; - - /** - * Return the current distance accessor, which defaults to implying a default distance of 30. - */ - distance(): (link: LinkDatum, i: number, links: LinkDatum[]) => number; - /** - * Set the distance accessor to use the specified constant number for all links, - * re-evaluates the distance accessor for each link, and returns this force. - * - * The constant is internally wrapped into a distance accessor function. - * - * The distance accessor is invoked for each link, being passed the link, its zero-based index and the complete array of links. - * The resulting number is then stored internally, such that the distance of each link is only recomputed when the force is initialized or - * when this method is called with a new distance, and not on every application of the force. - * - * @param distance The constant distance to be used for all links. - */ - distance(distance: number): this; - /** - * Set the distance accessor to use the specified function, - * re-evaluates the distance accessor for each link, and returns this force. - * - * The distance accessor is invoked for each link, being passed the link, its zero-based index and the complete array of links. - * The resulting number is then stored internally, such that the distance of each link is only recomputed when the force is initialized or - * when this method is called with a new distance, and not on every application of the force. - * - * @param distance A distance accessor function which is invoked for each link being passed the link, - * its zero-based index and the complete array of links. It returns the distance. - */ - distance(distance: (link: LinkDatum, i: number, links: LinkDatum[]) => number): this; - - /** - * Return the current strength accessor. - * For details regarding the default behavior see: {@link https://github.com/d3/d3-force#link_strength} - */ - strength(): (link: LinkDatum, i: number, links: LinkDatum[]) => number; - /** - * Set the strength accessor to use the specified constant number for all links, - * re-evaluates the strength accessor for each link, and returns this force. - * - * The constant is internally wrapped into a strength accessor function. - * - * The strength accessor is invoked for each link, being passed the link, its zero-based index and the complete array of links. - * The resulting number is then stored internally, such that the strength of each link is only recomputed - * when the force is initialized or when this method is called with a new strength, and not on every application of the force. - * - * @param strength The constant strength to be used for all links. - */ - strength(strength: number): this; - /** - * Set the strength accessor to use the specified function, - * re-evaluates the strength accessor for each link, and returns this force. - * - * The strength accessor is invoked for each link, being passed the link, its zero-based index and the complete array of links. - * The resulting number is then stored internally, such that the strength of each link is only recomputed - * when the force is initialized or when this method is called with a new strength, and not on every application of the force. - * - * @param strength A distance accessor function which is invoked for each link being passed the link, - * its zero-based index and the complete array of links. It returns the strength. - */ - strength(strength: (link: LinkDatum, i: number, links: LinkDatum[]) => number): this; - - /** - * Return the current iteration count which defaults to 1. - */ - iterations(): number; - /** - * Sets the number of iterations per application to the specified number and return this force. - * - * Increasing the number of iterations greatly increases the rigidity of the constraint and is useful for complex structures such as lattices, - * but also increases the runtime cost to evaluate the force. - * - * @param iterations Number of iterations. - */ - iterations(iterations: number): this; -} - -/** - * Creates a new link force with the defaulting links to an empty array. - * - * The link force pushes linked nodes together or apart according to the desired link distance. - * The strength of the force is proportional to the difference between the linked nodes’ distance and the target distance, similar to a spring force. - * - * The first generic refers to the type of data for a node. - * The second generic refers to the type of data for a link. - */ -export function forceLink<NodeDatum extends SimulationNodeDatum, LinksDatum extends SimulationLinkDatum<NodeDatum>>(): ForceLink<NodeDatum, LinksDatum>; -/** - * Creates a new link force with the specified links array. - * - * The link force pushes linked nodes together or apart according to the desired link distance. - * The strength of the force is proportional to the difference between the linked nodes’ distance and the target distance, similar to a spring force. - * - * The first generic refers to the type of data for a node. - * The second generic refers to the type of data for a link. - * - * @param links An array of link data. - */ -export function forceLink<NodeDatum extends SimulationNodeDatum, LinksDatum extends SimulationLinkDatum<NodeDatum>>(links: LinksDatum[]): ForceLink<NodeDatum, LinksDatum>; - -// Many Body ---------------------------------------------------------------- - -/** - * The many-body (or n-body) force applies mutually amongst all nodes. It can be used to simulate gravity (attraction) if the strength is positive, - * or electrostatic charge (repulsion) if the strength is negative. This implementation uses quadtrees and the Barnes–Hut approximation to greatly - * improve performance; the accuracy can be customized using the theta parameter. - * - * Unlike links, which only affect two linked nodes, the charge force is global: every node affects every other node, even if they are on disconnected subgraphs. - * - * The generic refers to the type of data for a node. - */ -export interface ForceManyBody<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> { - /** - * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force - * and when the simulation’s nodes change via simulation.nodes. - * - * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force. - */ - initialize(nodes: NodeDatum[]): void; - - /** - * Return the current strength accessor. - * - * For details regarding the default behavior see: {@link https://github.com/d3/d3-force#manyBody_strength} - */ - strength(): (d: NodeDatum, i: number, data: NodeDatum[]) => number; - /** - * Set the strength accessor to the specified constant strength for all nodes, re-evaluates the strength accessor for each node, and - * returns this force. - * - * A positive value causes nodes to attract each other, similar to gravity, while a negative value causes nodes to repel each other, - * similar to electrostatic charge. - * - * The default represents a constant value of -30. - * - * The constant is internally wrapped into a strength accessor function. - * - * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or - * when this method is called with a new strength, and not on every application of the force. - * - * @param strength The constant strength to be used for all nodes. - */ - strength(strength: number): this; - /** - * Set the strength accessor to the specified function, re-evaluates the strength accessor for each node, and - * returns this force. - * - * A positive value causes nodes to attract each other, similar to gravity, while a negative value causes nodes to repel each other, - * similar to electrostatic charge. - * - * The default represents a constant value of -30. - * - * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or - * when this method is called with a new strength, and not on every application of the force. - * - * @param strength A strength accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The function returns the strength. - */ - strength(strength: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this; - - /** - * Return the current value of the Barnes–Hut approximation criterion , which defaults to 0.9 - */ - theta(): number; - /** - * Set the Barnes–Hut approximation criterion to the specified number and returns this force. - * - * To accelerate computation, this force implements the Barnes–Hut approximation which takes O(n log n) per application - * where n is the number of nodes. For each application, a quadtree stores the current node positions; - * then for each node, the combined force of all other nodes on the given node is computed. - * For a cluster of nodes that is far away, the charge force can be approximated by treating the cluster as a single, larger node. - * The theta parameter determines the accuracy of the approximation: - * if the ratio w / l of the width w of the quadtree cell to the distance l from the node to the cell’s center of mass is less than theta, - * all nodes in the given cell are treated as a single node rather than individually. - * - * The default value is 0.9. - * - * @param theta Value for the theta parameter. - */ - theta(theta: number): this; - - /** - * Returns the current minimum distance over which this force is considered, which defaults to 1. - */ - distanceMin(): number; - /** - * Sets the minimum distance between nodes over which this force is considered. - * - * A minimum distance establishes an upper bound on the strength of the force between two nearby nodes, avoiding instability. - * In particular, it avoids an infinitely-strong force if two nodes are exactly coincident; in this case, the direction of the force is random. - * - * The default value is 1. - * - * @param distance The minimum distance between nodes over which this force is considered. - */ - distanceMin(distance: number): this; - - /** - * Returns the current maximum distance over which this force is considered, which defaults to infinity. - */ - distanceMax(): number; - /** - * Sets the maximum distance between nodes over which this force is considered. - * - * Specifying a finite maximum distance improves performance and produces a more localized layout. - * - * The default value is infinity. - * - * @param distance The maximum distance between nodes over which this force is considered. - */ - distanceMax(distance: number): this; -} - -/** - * Creates a new many-body force with the default parameters. - * - * The many-body (or n-body) force applies mutually amongst all nodes. It can be used to simulate gravity (attraction) if the strength is positive, - * or electrostatic charge (repulsion) if the strength is negative. This implementation uses quadtrees and the Barnes–Hut approximation to greatly - * improve performance; the accuracy can be customized using the theta parameter. - * - * Unlike links, which only affect two linked nodes, the charge force is global: every node affects every other node, even if they are on disconnected subgraphs. - * - * The generic refers to the type of data for a node. - */ -export function forceManyBody<NodeDatum extends SimulationNodeDatum>(): ForceManyBody<NodeDatum>; - -// Positioning ---------------------------------------------------------------- - -/** - * The x-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength. - * The strength of the force is proportional to the one-dimensional distance between the node’s position and the target position. - * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes. - * - * The generic refers to the type of data for a node. - */ -export interface ForceX<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> { - /** - * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force - * and when the simulation’s nodes change via simulation.nodes. - * - * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force. - */ - initialize(nodes: NodeDatum[]): void; - - /** - * Returns the current strength accessor, which defaults to a constant strength for all nodes of 0.1. - */ - strength(): (d: NodeDatum, i: number, data: NodeDatum[]) => number; - /** - * Set the strength accessor to the specified constant strength for all nodes, re-evaluates the strength accessor for each node, and returns this force. - * - * The strength determines how much to increment the node’s x-velocity: (x - node.x) × strength. - * - * For example, a value of 0.1 indicates that the node should move a tenth of the way from its current x-position to the target x-position with each application. - * Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints. - * - * A value outside the range [0,1] is not recommended. - * - * The constant is internally wrapped into a strength accessor function. - * - * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or - * when this method is called with a new strength, and not on every application of the force. - * - * @param strength Constant value of strength to be used for all nodes. - */ - strength(strength: number): this; - /** - * Set the strength accessor to the specified function, re-evaluates the strength accessor for each node, and returns this force. - * - * The strength determines how much to increment the node’s x-velocity: (x - node.x) × strength. - * - * For example, a value of 0.1 indicates that the node should move a tenth of the way from its current x-position to the target x-position with each application. - * Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints. - * - * A value outside the range [0,1] is not recommended. - * - * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or - * when this method is called with a new strength, and not on every application of the force. - * - * @param strength A strength accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The function returns the strength. - */ - strength(strength: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this; - - /** - * Return the current x-accessor, which defaults to a function returning 0 for all nodes. - */ - x(): (d: NodeDatum, i: number, data: NodeDatum[]) => number; - /** - * Set the x-coordinate accessor to the specified number, re-evaluates the x-accessor for each node, - * and returns this force. - * - * The constant is internally wrapped into an x-coordinate accessor function. - * - * The x-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the target x-coordinate of each node is only recomputed when the force is initialized or - * when this method is called with a new x, and not on every application of the force. - * - * @param x Constant x-coordinate to be used for all nodes. - */ - x(x: number): this; - /** - * Set the x-coordinate accessor to the specified function, re-evaluates the x-accessor for each node, - * and returns this force. - * - * The x-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the target x-coordinate of each node is only recomputed when the force is initialized or - * when this method is called with a new x, and not on every application of the force. - * - * @param x A x-coordinate accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The function returns the x-coordinate. - */ - x(x: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this; -} - -/** - * Create a new positioning force along the x-axis towards the given position x which is defaulted to a constant 0 for all nodes. - * - * The x-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength. - * The strength of the force is proportional to the one-dimensional distance between the node’s position and the target position. - * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes. - * - * The generic refers to the type of data for a node. - */ -export function forceX<NodeDatum extends SimulationNodeDatum>(): ForceX<NodeDatum>; -/** - * Create a new positioning force along the x-axis towards the given position x which is constant for all nodes. - * - * The x-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength. - * The strength of the force is proportional to the one-dimensional distance between the node’s position and the target position. - * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes. - * - * The generic refers to the type of data for a node. - * - * @param x Constant x-coordinate to be used for all nodes. - */ -export function forceX<NodeDatum extends SimulationNodeDatum>(x: number): ForceX<NodeDatum>; -/** - * Create a new positioning force along the x-axis towards the position x given by evaluating the specified x-coordinate accessor - * for each node. - * - * The x-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength. - * The strength of the force is proportional to the one-dimensional distance between the node’s position and the target position. - * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes. - * - * The generic refers to the type of data for a node. - * - * @param x A x-coordinate accessor function which is invoked for each node in the simulation, being passed the node and its zero-based index. - * The function returns the x-coordinate. - */ -export function forceX<NodeDatum extends SimulationNodeDatum>(x: (d: NodeDatum, i: number, data: NodeDatum[]) => number): ForceX<NodeDatum>; - -/** - * The y-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength. - * The strength of the force is proportional to the one-dimensional distance between the node’s position and the target position. - * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes. - * - * The generic refers to the type of data for a node. - */ -export interface ForceY<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> { - /** - * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force - * and when the simulation’s nodes change via simulation.nodes. - * - * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force. - */ - initialize(nodes: NodeDatum[]): void; - - /** - * Returns the current strength accessor, which defaults to a constant strength for all nodes of 0.1. - */ - strength(): (d: NodeDatum, i: number, data: NodeDatum[]) => number; - /** - * Set the strength accessor to the specified constant strength for all nodes, re-evaluates the strength accessor for each node, and returns this force. - * - * The strength determines how much to increment the node’s y-velocity: (y - node.y) × strength. - * - * For example, a value of 0.1 indicates that the node should move a tenth of the way from its current y-position to the target y-position with each application. - * Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints. - * - * A value outside the range [0,1] is not recommended. - * - * The constant is internally wrapped into a strength accessor function. - * - * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or - * when this method is called with a new strength, and not on every application of the force. - * - * @param strength Constant value of strength to be used for all nodes. - */ - strength(strength: number): this; - /** - * Set the strength accessor to the specified function, re-evaluates the strength accessor for each node, and returns this force. - * - * The strength determines how much to increment the node’s y-velocity: (y - node.y) × strength. - * - * For example, a value of 0.1 indicates that the node should move a tenth of the way from its current y-position to the target y-position with each application. - * Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints. - * - * A value outside the range [0,1] is not recommended. - * - * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or - * when this method is called with a new strength, and not on every application of the force. - * - * @param strength A strength accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The function returns the strength. - */ - strength(strength: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this; - - /** - * Return the current y-accessor, which defaults to a function returning 0 for all nodes. - */ - y(): (d: NodeDatum, i: number, data: NodeDatum[]) => number; - /** - * Set the y-coordinate accessor to the specified number, re-evaluates the y-accessor for each node, - * and returns this force. - * - * The constant is internally wrapped into a y-coordinate accessor function. - * - * The y-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the target y-coordinate of each node is only recomputed when the force is initialized or - * when this method is called with a new y, and not on every application of the force. - * - * @param y Constant y-coordinate to be used for all nodes. - */ - y(y: number): this; - /** - * Set the y-coordinate accessor to the specified function, re-evaluates the y-accessor for each node, - * and returns this force. - * - * The y-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the target y-coordinate of each node is only recomputed when the force is initialized or - * when this method is called with a new y, and not on every application of the force. - * - * @param y A y-coordinate accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The function returns the y-coordinate. - */ - y(y: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this; -} - -/** - * Create a new positioning force along the y-axis towards the given position y which is defaulted to a constant 0 for all nodes. - * - * The y-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength. - * The strength of the force is proportional to the one-dimensional distance between the node’s position and the target position. - * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes. - * - * The generic refers to the type of data for a node. - */ -export function forceY<NodeDatum extends SimulationNodeDatum>(): ForceY<NodeDatum>; -/** - * Create a new positioning force along the y-axis towards the given position y which is constant for all nodes. - * - * The y-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength. - * The strength of the force is proportional to the one-dimensional distance between the node’s position and the target position. - * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes. - * - * The generic refers to the type of data for a node. - * - * @param y Constant y-coordinate to be used for all nodes. - */ -export function forceY<NodeDatum extends SimulationNodeDatum>(y: number): ForceY<NodeDatum>; -/** - * Create a new positioning force along the y-axis towards the position y given by evaluating the specified y-coordinate accessor - * for each node. - * - * The y-positioning force pushes nodes towards a desired position along the given dimension with a configurable strength. - * The strength of the force is proportional to the one-dimensional distance between the node’s position and the target position. - * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes. - * - * The generic refers to the type of data for a node. - * - * @param y A y-coordinate accessor function which is invoked for each node in the simulation, being passed the node and its zero-based index. - * The function returns the y-coordinate. - */ -export function forceY<NodeDatum extends SimulationNodeDatum>(y: (d: NodeDatum, i: number, data: NodeDatum[]) => number): ForceY<NodeDatum>; - -/** - * The radial force is similar to the x- and y-positioning forces, except it pushes nodes towards the closest point on a given circle. - * The circle is of the specified radius centered at ⟨x,y⟩. If x and y are not specified, they default to ⟨0,0⟩. - * The strength of the force is proportional to the one-dimensional distance between the node’s position and the target position. - * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes. - * - * The generic refers to the type of data for a node. - */ -export interface ForceRadial<NodeDatum extends SimulationNodeDatum> extends Force<NodeDatum, any> { - /** - * Assign the array of nodes to this force. This method is called when a force is bound to a simulation via simulation.force - * and when the simulation’s nodes change via simulation.nodes. - * - * A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force. - */ - initialize(nodes: NodeDatum[]): void; - - /** - * Returns the current strength accessor, which defaults to a constant strength for all nodes of 0.1. - */ - strength(): (d: NodeDatum, i: number, data: NodeDatum[]) => number; - /** - * Set the strength accessor to the specified constant strength for all nodes, re-evaluates the strength accessor for each node, and returns this force. - * - * The strength determines how much to increment the node’s x-velocity: (x - node.x) × strength. - * - * For example, a value of 0.1 indicates that the node should move a tenth of the way from its current x-position to the target x-position with each application. - * Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints. - * - * A value outside the range [0,1] is not recommended. - * - * The constant is internally wrapped into a strength accessor function. - * - * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or - * when this method is called with a new strength, and not on every application of the force. - * - * @param strength Constant value of strength to be used for all nodes. - */ - strength(strength: number): this; - /** - * Set the strength accessor to the specified function, re-evaluates the strength accessor for each node, and returns this force. - * - * The strength determines how much to increment the node’s x-velocity: (x - node.x) × strength. - * - * For example, a value of 0.1 indicates that the node should move a tenth of the way from its current x-position to the target x-position with each application. - * Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints. - * - * A value outside the range [0,1] is not recommended. - * - * The strength accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or - * when this method is called with a new strength, and not on every application of the force. - * - * @param strength A strength accessor function which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The function returns the strength. - */ - strength(strength: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this; - - /** - * Return the current radius accessor for the circle. - */ - radius(): (d: NodeDatum, i: number, data: NodeDatum[]) => number; - /** - * Set the radius accessor for the circle to the specified number, re-evaluates the radius accessor for each node, - * and returns this force. - * - * The constant is internally wrapped into a radius accessor function. - * - * The radius accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that radius of the circle for each node is only recomputed when the force is initialized or - * when this method is called with a new radius, and not on every application of the force. - * - * @param radius Constant radius of the circle to be used for all nodes. - */ - radius(radius: number): this; - /** - * Set the radius accessor for the circle to the specified function, re-evaluates the radius accessor for each node, - * and returns this force. - * - * The radius accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that radius of the circle for each node is only recomputed when the force is initialized or - * when this method is called with a new radius, and not on every application of the force. - * - * @param radius A radius accessor function for the circle which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The function returns the radius of the circle. - */ - radius(radius: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this; - - /** - * Return the current x-accessor for the circle center, which defaults to a function returning 0 for all nodes. - */ - x(): (d: NodeDatum, i: number, data: NodeDatum[]) => number; - /** - * Set the x-coordinate accessor for the circle center to the specified number, re-evaluates the x-accessor for each node, - * and returns this force. - * - * The constant is internally wrapped into an x-coordinate accessor function. - * - * The x-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the x-coordinate of the circle center for each node is only recomputed when the force is initialized or - * when this method is called with a new x, and not on every application of the force. - * - * @param x Constant x-coordinate of the circle center to be used for all nodes. - */ - x(x: number): this; - /** - * Set the x-coordinate accessor to the specified function, re-evaluates the x-accessor for each node, - * and returns this force. - * - * The x-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the x-coordinate of the circle center for each node is only recomputed when the force is initialized or - * when this method is called with a new x, and not on every application of the force. - * - * @param x A x-coordinate accessor function for the circle center which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The function returns the x-coordinate of the circle center. - */ - x(x: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this; - - /** - * Return the current y-accessor for the circle center, which defaults to a function returning 0 for all nodes. - */ - y(): (d: NodeDatum, i: number, data: NodeDatum[]) => number; - /** - * Set the y-coordinate accessor for the circle center to the specified number, re-evaluates the y-accessor for each node, - * and returns this force. - * - * The constant is internally wrapped into an y-coordinate accessor function. - * - * The y-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the y-coordinate of the circle center for each node is only recomputed when the force is initialized or - * when this method is called with a new y, and not on every application of the force. - * - * @param y Constant y-coordinate of the circle center to be used for all nodes. - */ - y(y: number): this; - /** - * Set the y-coordinate accessor to the specified function, re-evaluates the y-accessor for each node, - * and returns this force. - * - * The y-accessor is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The resulting number is then stored internally, such that the y-coordinate of the circle center for each node is only recomputed when the force is initialized or - * when this method is called with a new y, and not on every application of the force. - * - * @param y A y-coordinate accessor function for the circle center which is invoked for each node in the simulation, being passed the node, its zero-based index and the complete array of nodes. - * The function returns the y-coordinate of the circle center. - */ - y(y: (d: NodeDatum, i: number, data: NodeDatum[]) => number): this; -} - -/** - * Create a new radial positioning force towards a circle of the specified radius centered at ⟨x,y⟩. - * If x and y are not specified, they default to ⟨0,0⟩. - * - * The strength of the force is proportional to the one-dimensional distance between the node’s position and the target position. - * While this force can be used to position individual nodes, it is intended primarily for global forces that apply to all (or most) nodes. - * - * The generic refers to the type of data for a node. - */ -export function forceRadial<NodeDatum extends SimulationNodeDatum>(radius: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number), - x?: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number), y?: number | ((d: NodeDatum, i: number, data: NodeDatum[]) => number)): ForceRadial<NodeDatum>; diff --git a/node_modules/@types/d3-force/package.json b/node_modules/@types/d3-force/package.json deleted file mode 100644 index 1e15d5ae20dab6a125b69c2e494500899440b5aa..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-force/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "@types/d3-force@^1", - "_id": "@types/d3-force@1.2.2", - "_inBundle": false, - "_integrity": "sha512-TN7KO7sk0tJauedIt0q20RQRFo4V3v97pJKO/TDK40X3LaPM1aXRM2+zFF+nRMtseEiszg4KffudhjR8a3+4cg==", - "_location": "/@types/d3-force", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-force@^1", - "name": "@types/d3-force", - "escapedName": "@types%2fd3-force", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-1.2.2.tgz", - "_shasum": "6337a146dbdf2781f5dde5bb491a646fd03d7bc4", - "_spec": "@types/d3-force@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-force module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-force", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-force" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "04d6c4beb23c282242852b09e6d0c87db6f64d35421549167b0a7355de8491c5", - "version": "1.2.2" -} diff --git a/node_modules/@types/d3-format/LICENSE b/node_modules/@types/d3-format/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-format/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-format/README.md b/node_modules/@types/d3-format/README.md deleted file mode 100644 index 2c72bee5fa3dbb3fbe974b86b49e0485509ed1b5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-format/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-format` - -# Summary -This package contains type definitions for D3JS d3-format module (https://github.com/d3/d3-format/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-format/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 20:01:29 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-format/index.d.ts b/node_modules/@types/d3-format/index.d.ts deleted file mode 100644 index eb39431a4b20791df8e20a8124295499114ec92f..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-format/index.d.ts +++ /dev/null @@ -1,348 +0,0 @@ -// Type definitions for D3JS d3-format module 1.4 -// Project: https://github.com/d3/d3-format/, https://d3js.org/d3-format -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// Last module patch version validated against: 1.4.5 - -/** - * Specification of locale to use when creating a new FormatLocaleObject - */ -export interface FormatLocaleDefinition { - /** - * The decimal point (e.g., ".") - */ - decimal: string; - /** - * The group separator (e.g., ","). Note that the thousands property is a misnomer, as\ - * the grouping definition allows groups other than thousands. - */ - thousands: string; - /** - * The array of group sizes (e.g., [3]), cycled as needed. - */ - grouping: number[]; - /** - * The currency prefix and suffix (e.g., ["$", ""]). - */ - currency: [string, string]; - /** - * An optional array of ten strings to replace the numerals 0-9. - */ - numerals?: string[]; - /** - * An optional symbol to replace the `percent` suffix; the percent suffix (defaults to "%"). - */ - percent?: string; - /** - * Optional; the minus sign (defaults to hyphen-minus, "-"). - */ - minus?: string; - /** - * Optional; the not-a-number value (defaults `"NaN"`). - */ - nan?: string; -} - -/** - * A Format Locale Object - */ -export interface FormatLocaleObject { - /** - * Returns a new format function for the given string specifier. The returned function - * takes a number as the only argument, and returns a string representing the formatted number. - * - * @param specifier A Specifier string. - * @throws Error on invalid format specifier. - */ - format(specifier: string): (n: number | { valueOf(): number }) => string; - - /** - * Returns a new format function for the given string specifier. The returned function - * takes a number as the only argument, and returns a string representing the formatted number. - * The returned function will convert values to the units of the appropriate SI prefix for the - * specified numeric reference value before formatting in fixed point notation. - * - * @param specifier A Specifier string. - * @param value The reference value to determine the appropriate SI prefix. - * @throws Error on invalid format specifier. - */ - formatPrefix(specifier: string, value: number): (n: number | { valueOf(): number }) => string; -} - -/** - * A Format Specifier - * - * For details see: {@link https://github.com/d3/d3-format#locale_format} - */ -export interface FormatSpecifierObject { - /** - * fill can be any character. The presence of a fill character is signaled by the align character following it. - */ - fill?: string; - /** - * Alignment used for format, as set by choosing one of the following: - * - * '>' - Forces the field to be right-aligned within the available space. (Default behavior). - * '<' - Forces the field to be left-aligned within the available space. - * '^' - Forces the field to be centered within the available space. - * '=' - Like '>', but with any sign and symbol to the left of any padding. - */ - align?: string; - /** - * The sign can be: - * - * '-' - nothing for positive and a minus sign for negative. (Default behavior.) - * '+' - a plus sign for positive and a minus sign for negative. - * '(' - nothing for positive and parentheses for negative. - * ' ' (space) - a space for positive and a minus sign for negative. - * - */ - sign?: string; - /** - * The symbol can be: - * - * '$' - apply currency symbols per the locale definition. - * '#' - for binary, octal, or hexadecimal notation, prefix by 0b, 0o, or 0x, respectively. - * '' (none) - no symbol. (Default behavior.) - */ - symbol?: string; - /** - * The zero (0) option enables zero-padding; this implicitly sets fill to 0 and align to =. - */ - zero?: string; - /** - * The width defines the minimum field width; - * if not specified, then the width will be determined by the content. - */ - width?: string; - /** - * The comma (,) option enables the use of a group separator, such as a comma for thousands. - */ - comma?: string; - /** - * Depending on the type, the precision either indicates the number of digits that follow the decimal point (types 'f' and '%'), - * or the number of significant digits (types '' (none), 'e', 'g', 'r', 's' and 'p'). If the precision is not specified, - * it defaults to 6 for all types except '' (none), which defaults to 12. - * Precision is ignored for integer formats (types 'b', 'o', 'd', 'x', 'X' and 'c'). - * - * See precisionFixed and precisionRound for help picking an appropriate precision. - */ - precision?: string; - /** - * The '~' option trims insignificant trailing zeros across all format types. - * This is most commonly used in conjunction with types 'r', 'e', 's' and '%'. - */ - trim?: string; - /** - * The available type values are: - * - * 'e' - exponent notation. - * 'f' - fixed point notation. - * 'g' - either decimal or exponent notation, rounded to significant digits. - * 'r' - decimal notation, rounded to significant digits. - * 's' - decimal notation with an SI prefix, rounded to significant digits. - * '%' - multiply by 100, and then decimal notation with a percent sign. - * 'p' - multiply by 100, round to significant digits, and then decimal notation with a percent sign. - * 'b' - binary notation, rounded to integer. - * 'o' - octal notation, rounded to integer. - * 'd' - decimal notation, rounded to integer. - * 'x' - hexadecimal notation, using lower-case letters, rounded to integer. - * 'X' - hexadecimal notation, using upper-case letters, rounded to integer. - * 'c' - converts the integer to the corresponding unicode character before printing. - * - * The type '' (none) is also supported as shorthand for '~g' (with a default precision of 12 instead of 6), and - * the type 'n' is shorthand for ',g'. For the 'g', 'n' and '' (none) types, - * decimal notation is used if the resulting string would have precision or fewer digits; otherwise, exponent notation is used. - */ - type?: string; -} - -/** - * Create a new locale-based object which exposes format(...) and formatPrefix(...) - * methods for the specified locale. - * - * @param locale A Format locale definition. - */ -export function formatLocale(locale: FormatLocaleDefinition): FormatLocaleObject; - -/** - * Create a new locale-based object which exposes format(...) and formatPrefix(...) - * methods for the specified locale definition. The specified locale definition will be - * set as the new default locale definition. - * - * @param defaultLocale A Format locale definition to be used as default. - */ -export function formatDefaultLocale(defaultLocale: FormatLocaleDefinition): FormatLocaleObject; - -/** - * Returns a new format function for the given string specifier. The returned function - * takes a number as the only argument, and returns a string representing the formatted number. - * - * Uses the current default locale. - * - * The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][~][type]. - * For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties. - * - * @param specifier A Specifier string. - * @throws Error on invalid format specifier. - */ -export function format(specifier: string): (n: number | { valueOf(): number }) => string; - -/** - * Returns a new format function for the given string specifier. The returned function - * takes a number as the only argument, and returns a string representing the formatted number. - * The returned function will convert values to the units of the appropriate SI prefix for the - * specified numeric reference value before formatting in fixed point notation. - * - * Uses the current default locale. - * - * The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][~][type]. - * For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties. - * - * @param specifier A Specifier string. - * @param value The reference value to determine the appropriate SI prefix. - * @throws Error on invalid format specifier. - */ -export function formatPrefix(specifier: string, value: number): (n: number | { valueOf(): number }) => string; - -/** - * A Format Specifier - * - * For details see: {@link https://github.com/d3/d3-format#locale_format} - */ -export class FormatSpecifier { - /** - * Given the specified specifier object, returning an object with exposed fields that correspond to the format specification mini-language and a toString method that reconstructs the specifier. - * @param specifier A specifier object. - */ - constructor(specifier: FormatSpecifierObject); - /** - * fill can be any character. The presence of a fill character is signaled by the align character following it. - */ - fill: string; - /** - * Alignment used for format, as set by choosing one of the following: - * - * '>' - Forces the field to be right-aligned within the available space. (Default behavior). - * '<' - Forces the field to be left-aligned within the available space. - * '^' - Forces the field to be centered within the available space. - * '=' - Like '>', but with any sign and symbol to the left of any padding. - */ - align: '>' | '<' | '^' | '='; - /** - * The sign can be: - * - * '-' - nothing for positive and a minus sign for negative. (Default behavior.) - * '+' - a plus sign for positive and a minus sign for negative. - * '(' - nothing for positive and parentheses for negative. - * ' ' (space) - a space for positive and a minus sign for negative. - * - */ - sign: '-' | '+' | '(' | ' '; - /** - * The symbol can be: - * - * '$' - apply currency symbols per the locale definition. - * '#' - for binary, octal, or hexadecimal notation, prefix by 0b, 0o, or 0x, respectively. - * '' (none) - no symbol. (Default behavior.) - */ - symbol: '$' | '#' | ''; - /** - * The zero (0) option enables zero-padding; this implicitly sets fill to 0 and align to =. - */ - zero: boolean; - /** - * The width defines the minimum field width; - * if not specified, then the width will be determined by the content. - */ - width: number | undefined; - /** - * The comma (,) option enables the use of a group separator, such as a comma for thousands. - */ - comma: boolean; - /** - * Depending on the type, the precision either indicates the number of digits that follow the decimal point (types 'f' and '%'), - * or the number of significant digits (types '' (none), 'e', 'g', 'r', 's' and 'p'). If the precision is not specified, - * it defaults to 6 for all types except '' (none), which defaults to 12. - * Precision is ignored for integer formats (types 'b', 'o', 'd', 'x', 'X' and 'c'). - * - * See precisionFixed and precisionRound for help picking an appropriate precision. - */ - precision: number | undefined; - /** - * The '~' option trims insignificant trailing zeros across all format types. - * This is most commonly used in conjunction with types 'r', 'e', 's' and '%'. - */ - trim: boolean; - /** - * The available type values are: - * - * 'e' - exponent notation. - * 'f' - fixed point notation. - * 'g' - either decimal or exponent notation, rounded to significant digits. - * 'r' - decimal notation, rounded to significant digits. - * 's' - decimal notation with an SI prefix, rounded to significant digits. - * '%' - multiply by 100, and then decimal notation with a percent sign. - * 'p' - multiply by 100, round to significant digits, and then decimal notation with a percent sign. - * 'b' - binary notation, rounded to integer. - * 'o' - octal notation, rounded to integer. - * 'd' - decimal notation, rounded to integer. - * 'x' - hexadecimal notation, using lower-case letters, rounded to integer. - * 'X' - hexadecimal notation, using upper-case letters, rounded to integer. - * 'c' - converts the integer to the corresponding unicode character before printing. - * - * The type '' (none) is also supported as shorthand for '~g' (with a default precision of 12 instead of 6), and - * the type 'n' is shorthand for ',g'. For the 'g', 'n' and '' (none) types, - * decimal notation is used if the resulting string would have precision or fewer digits; otherwise, exponent notation is used. - */ - type: 'e' | 'f' | 'g' | 'r' | 's' | '%' | 'p' | 'b' | 'o' | 'd' | 'x' | 'X' | 'c' | '' | 'n'; - /** - * Return the object as a specifier string. - */ - toString(): string; -} - -/** - * Parses the specified specifier, returning an object with exposed fields that correspond to the - * format specification mini-language and a toString method that reconstructs the specifier. - * - * The general form of a specifier is [[fill]align][sign][symbol][0][width][,][.precision][~][type]. - * For reference, an explanation of the segments of the specifier string, refer to the FormatSpecifier interface properties. - * - * @param specifier A specifier string. - * @throws Error on invalid format specifier. - */ -export function formatSpecifier(specifier: string): FormatSpecifier; - -/** - * Returns a suggested decimal precision for fixed point notation given the specified numeric step value. - * - * @param step The step represents the minimum absolute difference between values that will be formatted. - * (This assumes that the values to be formatted are also multiples of step.) - */ -export function precisionFixed(step: number): number; - -/** - * Returns a suggested decimal precision for use with locale.formatPrefix given the specified - * numeric step and reference value. - * - * @param step The step represents the minimum absolute difference between values that will be formatted. - * (This assumes that the values to be formatted are also multiples of step.) - * @param value Reference value determines which SI prefix will be used. - */ -export function precisionPrefix(step: number, value: number): number; - -/** - * Returns a suggested decimal precision for format types that round to significant digits - * given the specified numeric step and max values. - * - * @param step The step represents the minimum absolute difference between values that will be formatted. - * (This assumes that the values to be formatted are also multiples of step.) - * @param max max represents the largest absolute value that will be formatted. - */ -export function precisionRound(step: number, max: number): number; diff --git a/node_modules/@types/d3-format/package.json b/node_modules/@types/d3-format/package.json deleted file mode 100644 index 0fe532e01cf541d3c846957c3d2793c5a0c73863..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-format/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "@types/d3-format@^1", - "_id": "@types/d3-format@1.4.1", - "_inBundle": false, - "_integrity": "sha512-ss9G2snEKmp2In5Z3T0Jpqv8QaDBc2xHltBw83KjnV5B5w+Iwphbvq5ph/Xnu4d03fmmsdt+o1aWch379rxIbA==", - "_location": "/@types/d3-format", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-format@^1", - "name": "@types/d3-format", - "escapedName": "@types%2fd3-format", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-1.4.1.tgz", - "_shasum": "1e657a219e4b1e3931508a610d570bdec8ecdd9d", - "_spec": "@types/d3-format@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-format module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-format", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-format" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "0c19d7177f3818e8bf4c709ca7a7158171f68a4c8999b7df42326fce25262f0f", - "version": "1.4.1" -} diff --git a/node_modules/@types/d3-geo/LICENSE b/node_modules/@types/d3-geo/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-geo/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-geo/README.md b/node_modules/@types/d3-geo/README.md deleted file mode 100644 index 818b40adea42b744889d7d7af909147d341cf59a..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-geo/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-geo` - -# Summary -This package contains type definitions for D3JS d3-geo module (https://github.com/d3/d3-geo/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-geo/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 21:08:22 GMT - * Dependencies: [@types/geojson](https://npmjs.com/package/@types/geojson) - * Global values: none - -# Credits -These definitions were written by [Hugues Stefanski](https://github.com/ledragon), [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-geo/index.d.ts b/node_modules/@types/d3-geo/index.d.ts deleted file mode 100644 index a1cfe17224d74ea77fc2d0fd2cd2ecdb1dae9673..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-geo/index.d.ts +++ /dev/null @@ -1,1782 +0,0 @@ -// Type definitions for D3JS d3-geo module 1.12 -// Project: https://github.com/d3/d3-geo/, https://d3js.org/d3-geo -// Definitions by: Hugues Stefanski <https://github.com/ledragon> -// Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.12.1 - -import * as GeoJSON from 'geojson'; - -// ---------------------------------------------------------------------- -// Shared Interfaces and Types -// ---------------------------------------------------------------------- - -/** - * A basic geometry for a sphere, which is supported by d3-geo - * beyond the GeoJSON geometries. - */ -export interface GeoSphere { - /** - * Sphere geometry type - */ - type: 'Sphere'; -} - -/** - * Type Alias for GeoJSON Geometry Object and GeoSphere additional - * geometry supported by d3-geo - */ -export type GeoGeometryObjects = GeoJSON.GeometryObject | GeoSphere; - -/** - * A GeoJSON-style GeometryCollection which supports GeoJSON geometry objects - * and additionally GeoSphere. - * - * The generic refers to the type(s) of d3-geo geometry objects contained in the collection. - */ -export interface ExtendedGeometryCollection<GeometryType extends GeoGeometryObjects = GeoGeometryObjects> { - type: string; - bbox?: number[]; - crs?: { - type: string; - properties: any; - }; - geometries: GeometryType[]; -} - -/** - * A GeoJSON-style Feature which support features built on GeoJSON GeometryObjects - * or GeoSphere. - * - * The first generic refers to the type(s) of d3-geo geometry objects underlying the ExtendedFeature. - * Unless explicitly ruled out, the geometry value is nullable. - * - * The second generic refers to the data type of the properties of the ExtendedFeature. Unless explicitly ruled out, - * the properties value is nullable. - */ -export interface ExtendedFeature< - GeometryType extends GeoGeometryObjects | null = GeoGeometryObjects | null, - Properties extends GeoJSON.GeoJsonProperties = GeoJSON.GeoJsonProperties - > extends GeoJSON.GeoJsonObject { - geometry: GeometryType; - properties: Properties; - id?: string | number; -} - -/** - * A GeoJSON-style FeatureCollection which supports GeoJSON features - * and features built on GeoSphere - * - * The generic refers to the type of ExtendedFeature contained in the ExtendedFeatureCollection. - */ -export interface ExtendedFeatureCollection<FeatureType extends ExtendedFeature = ExtendedFeature> extends GeoJSON.GeoJsonObject { - features: FeatureType[]; -} - -/** - * Type Alias for permissible objects which can be used with d3-geo - * methods - */ -export type GeoPermissibleObjects = GeoGeometryObjects | ExtendedGeometryCollection | ExtendedFeature | ExtendedFeatureCollection; - -// ---------------------------------------------------------------------- -// Spherical Math -// ---------------------------------------------------------------------- - -/** - * Returns the spherical area of the specified feature in steradians. - * This is the spherical equivalent of path.area. - * - * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). - */ -export function geoArea(object: ExtendedFeature): number; -/** - * Returns the spherical area of the specified feature collection in steradians. - * This is the spherical equivalent of path.area. - * - * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). - */ -export function geoArea(object: ExtendedFeatureCollection): number; -/** - * Returns the spherical area of the specified GeoJson Geometry Object or GeoSphere object in steradians. - * This is the spherical equivalent of path.area. - * - * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). - */ -export function geoArea(object: GeoGeometryObjects): number; -/** - * Returns the spherical area of the specified geographic geometry collection in steradians. - * This is the spherical equivalent of path.area. - * - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - */ -export function geoArea(object: ExtendedGeometryCollection): number; - -/** - * Returns the spherical bounding box for the specified feature. The bounding box is represented by a two-dimensional array: [[left, bottom], [right, top]], - * where left is the minimum longitude, bottom is the minimum latitude, right is maximum longitude, and top is the maximum latitude. All coordinates are given in degrees. - * (Note that in projected planar coordinates, the minimum latitude is typically the maximum y-value, and the maximum latitude is typically the minimum y-value.) - * This is the spherical equivalent of path.bounds. - * - * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). - */ -export function geoBounds(object: ExtendedFeature): [[number, number], [number, number]]; -/** - * Returns the spherical bounding box for the specified feature collection. The bounding box is represented by a two-dimensional array: [[left, bottom], [right, top]], - * where left is the minimum longitude, bottom is the minimum latitude, right is maximum longitude, and top is the maximum latitude. All coordinates are given in degrees. - * (Note that in projected planar coordinates, the minimum latitude is typically the maximum y-value, and the maximum latitude is typically the minimum y-value.) - * This is the spherical equivalent of path.bounds. - * - * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). - */ -export function geoBounds(object: ExtendedFeatureCollection): [[number, number], [number, number]]; -/** - * Returns the spherical bounding box for the specified GeoJson Geometry Object or GeoSphere object. The bounding box is represented by a two-dimensional array: [[left, bottom], [right, top]], - * where left is the minimum longitude, bottom is the minimum latitude, right is maximum longitude, and top is the maximum latitude. All coordinates are given in degrees. - * (Note that in projected planar coordinates, the minimum latitude is typically the maximum y-value, and the maximum latitude is typically the minimum y-value.) - * This is the spherical equivalent of path.bounds. - * - * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). - */ -export function geoBounds(object: GeoGeometryObjects): [[number, number], [number, number]]; -/** - * Returns the spherical bounding box for the specified geometry collection. The bounding box is represented by a two-dimensional array: [[left, bottom], [right, top]], - * where left is the minimum longitude, bottom is the minimum latitude, right is maximum longitude, and top is the maximum latitude. All coordinates are given in degrees. - * (Note that in projected planar coordinates, the minimum latitude is typically the maximum y-value, and the maximum latitude is typically the minimum y-value.) - * This is the spherical equivalent of path.bounds. - * - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - */ -export function geoBounds(object: ExtendedGeometryCollection): [[number, number], [number, number]]; - -/** - * Returns the spherical centroid of the specified feature in steradians. - * This is the spherical equivalent of path.centroid. - * - * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). - */ -export function geoCentroid(object: ExtendedFeature): [number, number]; -/** - * Returns the spherical centroid of the specified feature collection in steradians. - * This is the spherical equivalent of path.centroid. - * - * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). - */ -export function geoCentroid(object: ExtendedFeatureCollection): [number, number]; -/** - * Returns the spherical centroid of the specified GeoJson Geometry Object or GeoSphere object in steradians. - * This is the spherical equivalent of path.centroid. - * - * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). - */ -export function geoCentroid(object: GeoGeometryObjects): [number, number]; -/** - * Returns the spherical centroid of the specified geographic geometry collection in steradians. - * This is the spherical equivalent of path.centroid. - * - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - */ -export function geoCentroid(object: ExtendedGeometryCollection): [number, number]; - -/** - * Returns true if and only if the specified GeoJSON object contains the specified point, or false if the object does not contain the point. - * The point must be specified as a two-element array [longitude, latitude] in degrees. For Point and MultiPoint geometries, an exact test is used; - * for a Sphere, true is always returned; for other geometries, an epsilon threshold is applied. - * - * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). - * @param point Point specified as a two-element array [longitude, latitude] in degrees. - */ -export function geoContains(object: ExtendedFeature, point: [number, number]): boolean; -/** - * Returns true if and only if the specified GeoJSON object contains the specified point, or false if the object does not contain the point. - * The point must be specified as a two-element array [longitude, latitude] in degrees. For Point and MultiPoint geometries, an exact test is used; - * for a Sphere, true is always returned; for other geometries, an epsilon threshold is applied. - * - * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). - * @param point Point specified as a two-element array [longitude, latitude] in degrees. - */ -export function geoContains(object: ExtendedFeatureCollection, point: [number, number]): boolean; -/** - * Returns true if and only if the specified GeoJSON object contains the specified point, or false if the object does not contain the point. - * The point must be specified as a two-element array [longitude, latitude] in degrees. For Point and MultiPoint geometries, an exact test is used; - * for a Sphere, true is always returned; for other geometries, an epsilon threshold is applied. - * - * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). - * @param point Point specified as a two-element array [longitude, latitude] in degrees. - */ -export function geoContains(object: GeoGeometryObjects, point: [number, number]): boolean; -/** - * Returns true if and only if the specified GeoJSON object contains the specified point, or false if the object does not contain the point. - * The point must be specified as a two-element array [longitude, latitude] in degrees. For Point and MultiPoint geometries, an exact test is used; - * for a Sphere, true is always returned; for other geometries, an epsilon threshold is applied. - * - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - * @param point Point specified as a two-element array [longitude, latitude] in degrees. - */ -export function geoContains(object: ExtendedGeometryCollection, point: [number, number]): boolean; - -/** - * Returns the great-arc distance in radians between the two points a and b. - * Each point must be specified as a two-element array [longitude, latitude] in degrees. - * - * @param a Point specified as a two-element array [longitude, latitude] in degrees. - * @param b Point specified as a two-element array [longitude, latitude] in degrees. - */ -export function geoDistance(a: [number, number], b: [number, number]): number; - -/** - * Returns the great-arc length of the specified feature in radians. For polygons, returns the perimeter of the exterior ring plus that of any interior rings. - * This is the spherical equivalent of path.measure. - * - * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). - */ -export function geoLength(object: ExtendedFeature): number; -/** - * Returns the great-arc length of the specified feature collection in radians. For polygons, returns the perimeter of the exterior ring plus that of any interior rings. - * This is the spherical equivalent of path.measure. - * - * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). - */ -export function geoLength(object: ExtendedFeatureCollection): number; -/** - * Returns the great-arc length of the specified GeoJson Geometry Object or GeoSphere object in radians. For polygons, returns the perimeter of the exterior ring plus that of any interior rings. - * This is the spherical equivalent of path.measure. - * - * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). - */ -export function geoLength(object: GeoGeometryObjects): number; -/** - * Returns the great-arc length of the specified geographic geometry collection in radians For polygons, returns the perimeter of the exterior ring plus that of any interior rings. - * This is the spherical equivalent of path.measure.. - * - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - */ -export function geoLength(object: ExtendedGeometryCollection): number; - -/** - * Returns an interpolator function given two points a and b. - * Each point must be specified as a two-element array [longitude, latitude] in degrees. - * - * @param a Point specified as a two-element array [longitude, latitude] in degrees. - * @param b Point specified as a two-element array [longitude, latitude] in degrees. - */ -export function geoInterpolate(a: [number, number], b: [number, number]): (t: number) => [number, number]; - -/** - * A Geo Rotation - */ -export interface GeoRotation { - /** - * Returns a new array [longitude, latitude] in degrees representing the rotated point of the given point. - * - * @param point The point must be specified as a two-element array [longitude, latitude] in degrees. - */ - (point: [number, number]): [number, number]; - - /** - * Returns a new array [longitude, latitude] in degrees representing the point of the given rotated point; the inverse of rotation. - * - * @param point The rotated point must be specified as a two-element array [longitude, latitude] in degrees. - */ - invert(point: [number, number]): [number, number]; -} - -/** - * Returns a rotation function for the given angles. - * - * @param angles A two- or three-element array of numbers [lambda, phi, gamma] specifying the rotation angles in degrees about each spherical axis. - * (These correspond to yaw, pitch and roll.) If the rotation angle gamma is omitted, it defaults to 0. - */ -export function geoRotation(angles: [number, number] | [number, number, number]): GeoRotation; - -// ---------------------------------------------------------------------- -// Spherical Shapes -// ---------------------------------------------------------------------- - -// geoCircle ============================================================ - -/** - * A new circle generator - * - * The first generic corresponds to the "this"-context within which the geo circle generator will be invoked. - * - * The second generic corresponds to the type of the Datum which will be passed into the geo circle generator. - */ -export interface GeoCircleGenerator<This = any, Datum = any> { - /** - * Returns a new GeoJSON geometry object of type “Polygon†approximating a circle on the surface of a sphere, - * with the current center, radius and precision. Any arguments are passed to the accessors. - */ - (this: This, d?: Datum, ...args: any[]): GeoJSON.Polygon; - - /** - * Returns the current center accessor, which defaults to a function returning [0, 0]. - */ - center(): ((this: This, d: Datum, ...args: any[]) => [number, number]); - /** - * Sets the circle center to the specified point [longitude, latitude] in degrees, and returns this circle generator. - * - * @param center Center point specified as [longitude, latitude] in degrees. - */ - center(center: [number, number]): this; - /** - * Sets the circle center to the specified center point accessor function, and returns this circle generator. - * - * @param center An accessor function which will be invoked whenever a circle is generated, being passed any arguments passed to the circle generator. - * It returns the center point specified as [longitude, latitude] in degrees. - */ - center(center: ((this: This, d: Datum, ...args: any[]) => [number, number])): this; - - /** - * Returns the current radius accessor, which defaults to a function returning 90. - */ - radius(): ((this: This, d: Datum, ...args: any[]) => number); - /** - * Sets the circle radius to the specified angle in degrees, and returns this circle generator. - * - * @param radius Circle radius as the specified angle in degrees. - */ - radius(radius: number): this; - /** - * Sets the circle radius to the specified radius accessor function, and returns this circle generator. - * - * @param radius An accessor function which will be invoked whenever a circle is generated, being passed any arguments passed to the circle generator. - * It returns the radius as the specified angle in degrees. - */ - radius(radius: ((this: This, d: Datum, ...args: any[]) => number)): this; - - /** - * Returns the current precision accessor, which defaults to a function returning 6. - */ - precision(): ((this: This, d: Datum, ...args: any[]) => number); - /** - * Sets the circle precision to the specified angle in degrees, and returns this circle generator. - * - * Small circles do not follow great arcs and thus the generated polygon is only an approximation. - * Specifying a smaller precision angle improves the accuracy of the approximate polygon, but also increase the cost to generate and render it. - * - * @param precision Precision as specified angle in degrees. - */ - precision(precision: number): this; - /** - * Sets the circle precision to the precision accessor function, and returns this circle generator. - * - * Small circles do not follow great arcs and thus the generated polygon is only an approximation. - * Specifying a smaller precision angle improves the accuracy of the approximate polygon, but also increase the cost to generate and render it. - * - * @param precision An accessor function which will be invoked whenever a circle is generated, being passed any arguments passed to the circle generator. - * It returns the precision as the specified angle in degrees. - */ - precision(precision: (this: This, d: Datum, ...args: any[]) => number): this; -} - -/** - * Returns a new geo circle generator - */ -export function geoCircle(): GeoCircleGenerator; -/** - * Returns a new geo circle generator - * - * The generic corresponds to the data type of the first argument passed into the geo circle generator and its accessor functions. - */ -export function geoCircle<Datum>(): GeoCircleGenerator<any, Datum>; -/** - * Returns a new geo circle generator - * - * The first generic corresponds to the "this" context within which the geo circle generator and its accessors will be invoked. - * - * The second generic corresponds to the data type of the first argument passed into the geo circle generator and its accessor functions. - */ -export function geoCircle<This, Datum>(): GeoCircleGenerator<This, Datum>; - -// geoGraticule ============================================================ - -/** - * A Feature generator for graticules: a uniform grid of meridians and parallels for showing projection distortion. - * The default graticule has meridians and parallels every 10° between ±80° latitude; for the polar regions, there are meridians every 90°. - */ -export interface GeoGraticuleGenerator { - /** - * Returns a GeoJSON MultiLineString geometry object representing all meridians and parallels for this graticule. - */ - (): GeoJSON.MultiLineString; - - /** - * Returns an array of GeoJSON LineString geometry objects, one for each meridian or parallel for this graticule. - */ - lines(): GeoJSON.LineString[]; - - /** - * Returns a GeoJSON Polygon geometry object representing the outline of this graticule, i.e. along the meridians and parallels defining its extent. - */ - outline(): GeoJSON.Polygon; - - /** - * Returns the current minor extent, which defaults to ⟨⟨-180°, -80° - ε⟩, ⟨180°, 80° + ε⟩⟩. - */ - extent(): [[number, number], [number, number]]; - /** - * Sets the major and minor extents of this graticule. - * - * @param extent Extent to use for major and minor extent of graticule. - */ - extent(extent: [[number, number], [number, number]]): this; - - /** - * Returns the current major extent, which defaults to ⟨⟨-180°, -90° + ε⟩, ⟨180°, 90° - ε⟩⟩. - */ - extentMajor(): [[number, number], [number, number]]; - /** - * Sets the major extent of this graticule. - * - * @param extent Major extent of graticule. - */ - extentMajor(extent: [[number, number], [number, number]]): this; - - /** - * Returns the current minor extent, which defaults to ⟨⟨-180°, -80° - ε⟩, ⟨180°, 80° + ε⟩⟩. - */ - extentMinor(): [[number, number], [number, number]]; - /** - * Sets the minor extent of this graticule. - * - * @param extent Minor extent of graticule. - */ - extentMinor(extent: [[number, number], [number, number]]): this; - - /** - * Returns the current minor step, which defaults to ⟨10°, 10°⟩. - */ - step(): [number, number]; - /** - * Sets the major and minor step for this graticule - * - * @param step Major and minor step to use for this graticule. - */ - step(step: [number, number]): this; - - /** - * Returns the current major step, which defaults to ⟨90°, 360°⟩. - */ - stepMajor(): [number, number]; - /** - * Sets the major step for this graticule. - * - * @param step Major step. - */ - stepMajor(step: [number, number]): this; - - /** - * Returns the current major step, which defaults to ⟨10°, 10°⟩. - */ - stepMinor(): [number, number]; - /** - * Sets the minor step for this graticule. - * - * @param step Minor step. - */ - stepMinor(step: [number, number]): this; - - /** - * Returns the current precision, which defaults to 2.5°. - */ - precision(): number; - /** - * Sets the precision for this graticule, in degrees. - * - * @param angle Precision in degrees. - */ - precision(angle: number): this; -} - -/** - * Constructs a feature generator for creating graticules: a uniform grid of meridians and parallels for showing projection distortion. - * The default graticule has meridians and parallels every 10° between ±80° latitude; for the polar regions, there are meridians every 90°. - */ -export function geoGraticule(): GeoGraticuleGenerator; - -/** - * A convenience method for directly generating the default 10° global graticule as a GeoJSON MultiLineString geometry object. - */ -export function geoGraticule10(): GeoJSON.MultiLineString; - -// ---------------------------------------------------------------------- -// Projections -// ---------------------------------------------------------------------- - -/** - * A D3 geo stream. D3 transforms geometry using a sequence of function calls, rather than materializing intermediate representations, to minimize overhead. - * Streams must implement several methods to receive input geometry. Streams are inherently stateful; the meaning of a point depends on whether the point is inside of a line, - * and likewise a line is distinguished from a ring by a polygon. Despite the name “streamâ€, these method calls are currently synchronous. - */ -export interface GeoStream { - /** - * Indicates the end of a line or ring. Within a polygon, indicates the end of a ring. - * Unlike GeoJSON, the redundant closing coordinate of a ring is not indicated via point, and instead is implied via lineEnd within a polygon. - */ - lineEnd(): void; - - /** - * Indicates the start of a line or ring. Within a polygon, indicates the start of a ring. The first ring of a polygon is the exterior ring, and is typically clockwise. - * Any subsequent rings indicate holes in the polygon, and are typically counterclockwise. - */ - lineStart(): void; - - /** - * Indicates a point with the specified coordinates x and y (and optionally z). The coordinate system is unspecified and implementation-dependent; - * for example, projection streams require spherical coordinates in degrees as input. Outside the context of a polygon or line, - * a point indicates a point geometry object (Point or MultiPoint). Within a line or polygon ring, the point indicates a control point. - * - * @param x x-coordinate of point. - * @param y y-coordinate of point. - * @param z Optional z-coordinate of point. - */ - point(x: number, y: number, z?: number): void; - - /** - * Indicates the end of a polygon. - */ - polygonEnd(): void; - - /** - * Indicates the start of a polygon. The first line of a polygon indicates the exterior ring, and any subsequent lines indicate interior holes. - */ - polygonStart(): void; - - /** - * Indicates the sphere (the globe; the unit sphere centered at ⟨0,0,0⟩). - */ - sphere?(): void; -} - -// geoStream(...) ======================================================= - -/** - * Streams the specified GeoJSON object to the specified projection stream. While both features and geometry objects are supported as input, - * the stream interface only describes the geometry, and thus additional feature properties are not visible to streams. - * - * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). - * @param stream A projection stream. - */ -export function geoStream(object: ExtendedFeature, stream: GeoStream): void; - -/** - * Streams the specified GeoJSON object to the specified projection stream. While both features and geometry objects are supported as input, - * the stream interface only describes the geometry, and thus additional feature properties are not visible to streams. - * - * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature). - * @param stream A projection stream. - */ -export function geoStream(object: ExtendedFeatureCollection, stream: GeoStream): void; - -/** - * Streams the specified GeoJSON object to the specified projection stream. While both features and geometry objects are supported as input, - * the stream interface only describes the geometry, and thus additional feature properties are not visible to streams. - * - * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). - * @param stream A projection stream. - */ -export function geoStream(object: GeoGeometryObjects, stream: GeoStream): void; - -/** - * Streams the specified GeoJSON object to the specified projection stream. While both features and geometry objects are supported as input, - * the stream interface only describes the geometry, and thus additional feature properties are not visible to streams. - * - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - * @param stream A projection stream. - */ -export function geoStream(object: ExtendedGeometryCollection, stream: GeoStream): void; - -// ---------------------------------------------------------------------- -// Projections -// ---------------------------------------------------------------------- - -/** - * Raw projections are point transformation functions that are used to implement custom projections; they typically passed to d3.geoProjection or d3.geoProjectionMutator. - * They are exposed here to facilitate the derivation of related projections. - * Raw projections take spherical coordinates [lambda, phi] in radians (not degrees!) and return a point [x, y], typically in the unit square centered around the origin. - */ -export interface GeoRawProjection { - /** - * Projects the specified point [lambda, phi] in radians, returning a new point [x, y] in unitless coordinates. - * @param lambda Spherical lambda coordinate in radians. - * @param phi Spherical phi coordinate in radians. - */ - (lambda: number, phi: number): [number, number]; - - /** - * Inverts the projected point [x, y] in unitless coordinates, returning an unprojected point in spherical coordinates [lambda, phi] in radians. - * @param x x-coordinate (unitless). - * @param y y-coordinate (unitless). - */ - invert?(x: number, y: number): [number, number]; -} - -/** - * An object implementing a stream method - */ -export interface GeoStreamWrapper { - /** - * Returns a projection stream for the specified output stream. Any input geometry is projected before being streamed to the output stream. - * A typical projection involves several geometry transformations: the input geometry is first converted to radians, rotated on three axes, - * clipped to the small circle or cut along the antimeridian, and lastly projected to the plane with adaptive resampling, scale and translation. - * - * @param stream An input stream - */ - stream(stream: GeoStream): GeoStream; -} - -/** - * A Geographic Projection to transform spherical polygonal geometry to planar polygonal geometry. - * D3 provides implementations of several classes of standard projections: - * - * - Azimuthal - * - Composite - * - Conic - * - Cylindrical - * - * For many more projections, see d3-geo-projection. You can implement custom projections using d3.geoProjection or d3.geoProjectionMutator. - */ -export interface GeoProjection extends GeoStreamWrapper { - /** - * Returns a new array [x, y] (typically in pixels) representing the projected point of the given point. - * The point must be specified as a two-element array [longitude, latitude] in degrees. - * May return null if the specified point has no defined projected position, such as when the point is outside the clipping bounds of the projection. - * - * @param point A point specified as a two-dimensional array [longitude, latitude] in degrees. - */ - (point: [number, number]): [number, number] | null; - - /** - * Returns a new array [longitude, latitude] in degrees representing the unprojected point of the given projected point. - * May return null if the specified point has no defined projected position, such as when the point is outside the clipping bounds of the projection. - * - * @param point The projected point, specified as a two-element array [x, y] (typically in pixels). - */ - invert?(point: [number, number]): [number, number] | null; - - /** - * Returns the current spherical clipping function. - * Pre-clipping occurs in geographic coordinates. Cutting along the antimeridian line, - * or clipping along a small circle are the most common strategies. - */ - preclip(): (stream: GeoStream) => GeoStream; - /** - * Sets the projection’s spherical clipping to the specified function and returns the projection. - * Pre-clipping occurs in geographic coordinates. Cutting along the antimeridian line, or clipping along a small circle are the most common strategies. - * - * @param preclip A spherical clipping function. Clipping functions are implemented as transformations of a projection stream. - * Pre-clipping operates on spherical coordinates, in radians. - */ - preclip(preclip: (stream: GeoStream) => GeoStream): this; - - /** - * Returns the current cartesian clipping function. - * Post-clipping occurs on the plane, when a projection is bounded to a certain extent such as a rectangle. - */ - postclip(): (stream: GeoStream) => GeoStream; - /** - * Sets the projection’s cartesian clipping to the specified function and returns the projection. - * - * @param postclip A cartesian clipping function. Clipping functions are implemented as transformations of a projection stream. - * Post-clipping operates on planar coordinates, in pixels. - */ - postclip(postclip: (stream: GeoStream) => GeoStream): this; - - /** - * Returns the current clip angle which defaults to null. - * - * null switches to antimeridian cutting rather than small-circle clipping. - */ - clipAngle(): number | null; - /** - * Switches to antimeridian cutting rather than small-circle clipping. - * See also projection.preclip, d3.geoClipAntimeridian, d3.geoClipCircle. - * - * @param angle Set to null to switch to antimeridian cutting. - */ - clipAngle(angle: null): this; - /** - * Sets the projection’s clipping circle radius to the specified angle in degrees and returns the projection. - * Small-circle clipping is independent of viewport clipping via projection.clipExtent. - * - * See also projection.preclip, d3.geoClipAntimeridian, d3.geoClipCircle. - * - * @param angle Angle in degrees. - */ - clipAngle(angle: number): this; - - /** - * Returns the current viewport clip extent which defaults to null. - */ - clipExtent(): [[number, number], [number, number]] | null; - /** - * Sets the clip extent to null and returns the projection. - * With a clip extent of null, no viewport clipping is performed. - * - * Viewport clipping is independent of small-circle clipping via projection.clipAngle. - * - * See also projection.postclip, d3.geoClipRectangle. - * - * @param extent Set to null to disable viewport clipping. - */ - clipExtent(extent: null): this; - /** - * Sets the projection’s viewport clip extent to the specified bounds in pixels and returns the projection. - * The extent bounds are specified as an array [[xâ‚€, yâ‚€], [xâ‚, yâ‚]], where xâ‚€ is the left-side of the viewport, yâ‚€ is the top, xâ‚ is the right and yâ‚ is the bottom. - * - * Viewport clipping is independent of small-circle clipping via projection.clipAngle. - * - * See also projection.postclip, d3.geoClipRectangle. - * - * @param extent The extent bounds are specified as an array [[xâ‚€, yâ‚€], [xâ‚, yâ‚]], where xâ‚€ is the left-side of the viewport, yâ‚€ is the top, xâ‚ is the right and yâ‚ is the bottom. - */ - clipExtent(extent: [[number, number], [number, number]]): this; - - /** - * Returns the current scale factor; the default scale is projection-specific. - * - * The scale factor corresponds linearly to the distance between projected points; however, absolute scale factors are not equivalent across projections. - */ - scale(): number; - /** - * Sets the projection’s scale factor to the specified value and returns the projection. - * The scale factor corresponds linearly to the distance between projected points; however, absolute scale factors are not equivalent across projections. - * - * @param scale Scale factor to be used for the projection; the default scale is projection-specific. - */ - scale(scale: number): this; - - /** - * Returns the current translation offset which defaults to [480, 250] and places ⟨0°,0°⟩ at the center of a 960×500 area. - * The translation offset determines the pixel coordinates of the projection’s center. - */ - translate(): [number, number]; - /** - * Sets the projection’s translation offset to the specified two-element array [tx, ty] and returns the projection. - * The translation offset determines the pixel coordinates of the projection’s center. The default translation offset places ⟨0°,0°⟩ at the center of a 960×500 area. - * - * @param point A two-element array [tx, ty] specifying the translation offset. The default translation offset of defaults to [480, 250] places ⟨0°,0°⟩ at the center of a 960×500 area. - */ - translate(point: [number, number]): this; - - /** - * Returns the current center of the projection, which defaults to ⟨0°,0°⟩. - */ - center(): [number, number]; - /** - * Sets the projection’s center to the specified center, - * a two-element array of longitude and latitude in degrees and returns the projection. - * The default is ⟨0°,0°⟩. - * - * @param point A point specified as a two-dimensional array [longitude, latitude] in degrees. - */ - center(point: [number, number]): this; - - /** - * Returns the projection’s current angle, which defaults to 0°. - */ - angle(): number; - /** - * Sets the projection’s post-projection planar rotation angle to the specified angle in degrees and returns the projection. - * @param angle The new rotation angle of the projection. - */ - angle(angle: number): this; - - /** - * Returns true if x-reflection is enabled, which defaults to false. - */ - reflectX(): boolean; - /** - * Sets whether or not the x-dimension is reflected (negated) in the output. - * @param reflect Whether or not the x-dimension is reflected (negated) in the output. - */ - reflectX(reflect: boolean): this; - - /** - * Returns true if y-reflection is enabled, which defaults to false. - */ - reflectY(): boolean; - /** - * Sets whether or not the y-dimension is reflected (negated) in the output. - * @param reflect Whether or not the y-dimension is reflected (negated) in the output. - */ - reflectY(reflect: boolean): this; - - /** - * Returns the current rotation [lambda, phi, gamma] specifying the rotation angles in degrees about each spherical axis. - * (These correspond to yaw, pitch and roll.) which defaults [0, 0, 0]. - */ - rotate(): [number, number, number]; - - /** - * Sets the projection’s three-axis rotation to the specified angles, which must be a two- or three-element array of numbers. - * - * @param angles A two- or three-element array of numbers [lambda, phi, gamma] specifying the rotation angles in degrees about each spherical axis. - * (These correspond to yaw, pitch and roll.) If the rotation angle gamma is omitted, it defaults to 0. - */ - rotate(angles: [number, number] | [number, number, number]): this; - - /** - * Returns the projection’s current resampling precision which defaults to square root of 0.5. - * This value corresponds to the Douglas–Peucker distance. - */ - precision(): number; - /** - * Sets the threshold for the projection’s adaptive resampling to the specified value in pixels and returns the projection. - * This value corresponds to the Douglas–Peucker distance. - * - * @param precision A numeric value in pixels to use as the threshold for the projection’s adaptive resampling. - */ - precision(precision: number): this; - - /** - * Sets the projection’s scale and translate to fit the specified geographic feature in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[xâ‚€, yâ‚€], [xâ‚, yâ‚]], where xâ‚€ is the left side of the bounding box, yâ‚€ is the top, xâ‚ is the right and yâ‚ is the bottom. - * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). - */ - fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeature): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[xâ‚€, yâ‚€], [xâ‚, yâ‚]], where xâ‚€ is the left side of the bounding box, yâ‚€ is the top, xâ‚ is the right and yâ‚ is the bottom. - * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). - */ - fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeatureCollection): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic geometry object in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[xâ‚€, yâ‚€], [xâ‚, yâ‚]], where xâ‚€ is the left side of the bounding box, yâ‚€ is the top, xâ‚ is the right and yâ‚ is the bottom. - * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). - */ - fitExtent(extent: [[number, number], [number, number]], object: GeoGeometryObjects): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic geometry collection in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[xâ‚€, yâ‚€], [xâ‚, yâ‚]], where xâ‚€ is the left side of the bounding box, yâ‚€ is the top, xâ‚ is the right and yâ‚ is the bottom. - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - */ - fitExtent(extent: [[number, number], [number, number]], object: ExtendedGeometryCollection): this; - - /** - * Sets the projection’s scale and translate to fit the specified geographic feature in the center of an extent with the given size and top-left corner of [0, 0]. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param size The size of the extent, specified as an array [width, height]. - * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). - */ - fitSize(size: [number, number], object: ExtendedFeature): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of an extent with the given size and top-left corner of [0, 0]. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param size The size of the extent, specified as an array [width, height]. - * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). - */ - fitSize(size: [number, number], object: ExtendedFeatureCollection): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic geometry object in the center of an extent with the given size and top-left corner of [0, 0]. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param size The size of the extent, specified as an array [width, height]. - * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). - */ - fitSize(size: [number, number], object: GeoGeometryObjects): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic geometry collection in the center of an extent with the given size and top-left corner of [0, 0]. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param size The size of the extent, specified as an array [width, height]. - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - */ - fitSize(size: [number, number], object: ExtendedGeometryCollection): this; - - /** - * A convenience method for projection.fitSize where the height is automatically chosen from the aspect ratio of object and the given constraint on width. - * - * @param width The width of the extent. - * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). - */ - fitWidth(width: number, object: ExtendedFeature): this; - /** - * A convenience method for projection.fitSize where the height is automatically chosen from the aspect ratio of object and the given constraint on width. - * - * @param width The width of the extent. - * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). - */ - fitWidth(width: number, object: ExtendedFeatureCollection): this; - /** - * A convenience method for projection.fitSize where the height is automatically chosen from the aspect ratio of object and the given constraint on width. - * - * @param width The width of the extent. - * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). - */ - fitWidth(width: number, object: GeoGeometryObjects): this; - /** - * A convenience method for projection.fitSize where the height is automatically chosen from the aspect ratio of object and the given constraint on width. - * - * @param width The width of the extent. - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - */ - fitWidth(width: number, object: ExtendedGeometryCollection): this; - - /** - * A convenience method for projection.fitSize where the width is automatically chosen from the aspect ratio of object and the given constraint on height. - * - * @param height The height of the extent. - * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). - */ - fitHeight(height: number, object: ExtendedFeature): this; - /** - * A convenience method for projection.fitSize where the width is automatically chosen from the aspect ratio of object and the given constraint on height. - * - * @param height The height of the extent. - * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). - */ - fitHeight(height: number, object: ExtendedFeatureCollection): this; - /** - * A convenience method for projection.fitSize where the width is automatically chosen from the aspect ratio of object and the given constraint on height. - * - * @param height The height of the extent. - * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). - */ - fitHeight(height: number, object: GeoGeometryObjects): this; - /** - * A convenience method for projection.fitSize where the width is automatically chosen from the aspect ratio of object and the given constraint on height. - * - * @param height The height of the extent. - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - */ - fitHeight(height: number, object: ExtendedGeometryCollection): this; -} - -/** - * A Conic Projection - */ -export interface GeoConicProjection extends GeoProjection { - /** - * Return the standard parallels for the conic projection in degrees. - */ - parallels(): [number, number]; - /** - * Set the standard parallels for the conic projection in degrees and return the projection. - * - * @param value A two-dimensional array representing the standard parallels in degrees. - */ - parallels(value: [number, number]): this; -} - -// geoPath ============================================================== - -/** - * A minimal rendering context for a GeoPath generator. The minimum implemented - * methods are a subset of the CanvasRenderingContext2D API. - * - * For reference to the CanvasRenderingContext2D see https://developer.mozilla.org/en/docs/Web/API/CanvasRenderingContext2D - */ -export interface GeoContext { - /** - * Adds an arc to the path with center point (x, y) and radius r starting at startAngle and ending at endAngle. - * The arc is drawn in clockwise direction by default. - * - * @param x x-coordinate of arc center point. - * @param y y-coordinate of arc center point. - * @param radius Radius of arc. - * @param startAngle The starting angle of the arc, measured clockwise from the positive x axis and expressed in radians. - * @param endAngle The end angle of the arc, measured clockwise from the positive x axis and expressed in radians. - * @param anticlockwise Optional boolean flag, if true the arc is drawn counter-clockwise between the two angles. - */ - arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; - - /** - * Start a new path by emptying the list of sub-paths. - */ - beginPath(): void; - - /** - * Causes the point of the pen to move back to the start of the current sub-path. - * It tries to draw a straight line from the current point to the start. - * If the shape has already been closed or has only one point, this function does nothing. - */ - closePath(): void; - - /** - * Connects the last point in the sub-path to the x, y coordinates with a straight line (but does not actually draw it). - * - * @param x The x-coordinate for the end of the line. - * @param y The y-coordinate for the end of the line. - */ - lineTo(x: number, y: number): void; - - /** - * Move the starting point of a new sub-path to the (x, y) coordinates. - * - * @param x The x-coordinate for the new starting point. - * @param y The y-coordinate for the new starting point. - */ - moveTo(x: number, y: number): void; -} - -/** - * A Geo Path generator - * - * The first generic corresponds to the "this"-context within which the geo path generator will be invoked. - * This could be e.g. the DOMElement bound to "this" when using selection.attr("d", ...) with the path generator. - * - * The second generic corresponds to the type of the DatumObject which will be passed into the geo path generator for rendering. - */ -export interface GeoPath<This = any, DatumObject extends GeoPermissibleObjects = GeoPermissibleObjects> { - /** - * Renders the given object, which may be any GeoJSON feature or geometry object: - * - * + Point - a single position. - * + MultiPoint - an array of positions. - * + LineString - an array of positions forming a continuous line. - * + MultiLineString - an array of arrays of positions forming several lines. - * + Polygon - an array of arrays of positions forming a polygon (possibly with holes). - * + MultiPolygon - a multidimensional array of positions forming multiple polygons. - * + GeometryCollection - an array of geometry objects. - * + Feature - a feature containing one of the above geometry objects. - * + FeatureCollection - an array of feature objects. - * - * The type Sphere is also supported, which is useful for rendering the outline of the globe; a sphere has no coordinates. - * - * - * Any additional arguments are passed along to the pointRadius accessor. - * - * IMPORTANT: If the rendering context of the geoPath generator is null, - * then the geoPath is returned as an SVG path data string. - * - * Separate path elements are typically slower than a single path element. However, distinct path elements are useful for styling and interaction (e.g., click or mouseover). - * Canvas rendering (see path.context) is typically faster than SVG, but requires more effort to implement styling and interaction. - * - * The first generic type of the GeoPath generator used, must correspond to the "this" context bound to the function upon invocation. - * - * @param object An object to be rendered. - */ - (this: This, object: DatumObject, ...args: any[]): string | null; - /** - * Renders the given object, which may be any GeoJSON feature or geometry object: - * - * + Point - a single position. - * + MultiPoint - an array of positions. - * + LineString - an array of positions forming a continuous line. - * + MultiLineString - an array of arrays of positions forming several lines. - * + Polygon - an array of arrays of positions forming a polygon (possibly with holes). - * + MultiPolygon - a multidimensional array of positions forming multiple polygons. - * + GeometryCollection - an array of geometry objects. - * + Feature - a feature containing one of the above geometry objects. - * + FeatureCollection - an array of feature objects. - * - * The type Sphere is also supported, which is useful for rendering the outline of the globe; a sphere has no coordinates. - * - * - * Any additional arguments are passed along to the pointRadius accessor. - * - * IMPORTANT: If the geoPath generator has been configured with a rendering context, - * then the geoPath is rendered to this context as a sequence of path method calls and this function returns void. - * - * Separate path elements are typically slower than a single path element. However, distinct path elements are useful for styling and interaction (e.g., click or mouseover). - * Canvas rendering (see path.context) is typically faster than SVG, but requires more effort to implement styling and interaction. - * - * The first generic type of the GeoPath generator used, must correspond to the "this" context bound to the function upon invocation. - * - * @param object An object to be rendered. - */ - (this: This, object: DatumObject, ...args: any[]): void; - - /** - * Returns the projected planar area (typically in square pixels) for the specified GeoJSON object. - * Point, MultiPoint, LineString and MultiLineString geometries have zero area. For Polygon and MultiPolygon geometries, - * this method first computes the area of the exterior ring, and then subtracts the area of any interior holes. - * This method observes any clipping performed by the projection; see projection.clipAngle and projection.clipExtent. This is the planar equivalent of d3.geoArea. - * - * @param object An object for which the area is to be calculated. - */ - area(object: DatumObject): number; - - /** - * Returns the projected planar bounding box (typically in pixels) for the specified GeoJSON object. - * The bounding box is represented by a two-dimensional array: [[xâ‚€, yâ‚€], [xâ‚, yâ‚]], where xâ‚€ is the minimum x-coordinate, yâ‚€ is the minimum y-coordinate, - * xâ‚ is maximum x-coordinate, and yâ‚ is the maximum y-coordinate. - * - * This is handy for, say, zooming in to a particular feature. (Note that in projected planar coordinates, - * the minimum latitude is typically the maximum y-value, and the maximum latitude is typically the minimum y-value.) - * This method observes any clipping performed by the projection; see projection.clipAngle and projection.clipExtent. This is the planar equivalent of d3.geoBounds. - * - * @param object An object for which the bounds are to be calculated. - */ - bounds(object: DatumObject): [[number, number], [number, number]]; - - /** - * Returns the projected planar centroid (typically in pixels) for the specified GeoJSON object. - * This is handy for, say, labeling state or county boundaries, or displaying a symbol map. - * For example, a noncontiguous cartogram might scale each state around its centroid. - * This method observes any clipping performed by the projection; see projection.clipAngle and projection.clipExtent. This is the planar equivalent of d3.geoCentroid. - * - * @param object An object for which the centroid is to be calculated. - */ - centroid(object: DatumObject): [number, number]; - - /** - * Returns the projected planar length (typically in pixels) for the specified GeoJSON object. - * Point and MultiPoint geometries have zero length. For Polygon and MultiPolygon geometries, this method computes the summed length of all rings. - * - * This method observes any clipping performed by the projection; see projection.clipAngle and projection.clipExtent. This is the planar equivalent of d3.geoLength. - * - * @param object An object for which the measure is to be calculated. - */ - measure(object: DatumObject): number; - - /** - * Returns the current render context which defaults to null. - * - * Use the generic to cast the return type of the rendering context, if it is known for a specific application. - */ - context<C extends GeoContext | null>(): C; - - /** - * Set the current rendering context to null and return the path generator. - * The path generator will return an SVG path string; - * - * @param context Null to remove the current rendering context, if any. - */ - context(context: null): this; - - /** - * Set the current rendering context and return the path generator. - * The path generator will render to the specified context. - * - * @param context Rendering context to be used by the path generator. - * The context must at least implement GeoContext, a subset of the CanvasRenderingContext2D API. - */ - context(context: GeoContext): this; - - /** - * Get the current projection. The generic parameter can be used to cast the result to the - * correct, known type of the projection, e.g. GeoProjection or GeoConicProjection. Otherwise, - * the return type defaults to the minimum type requirement for a projection which - * can be passed into a GeoPath. - * - * Use the generic to cast the return type of the projection, if it is known for a specific application. - */ - projection<P extends GeoConicProjection | GeoProjection | GeoStreamWrapper | null>(): P; - - /** - * Set the projection to the identity projection. - * - * @param projection Use null to set the identity projection. - */ - projection(projection: null): this; - - /** - * Set the current projection to be used with the geo path generator. - * - * The given projection is typically one of D3’s built-in geographic projections; - * however, any object that exposes a projection.stream function can be used, enabling the use of custom projections. - * See D3’s transforms for more examples of arbitrary geometric transformations. - * - * @param projection A projection. - */ - projection(projection: GeoProjection): this; - - /** - * Set the projection to be used with the geo path generator to a custom projection. - * Custom projections must minimally contain a stream method. - * - * The given projection is typically one of D3’s built-in geographic projections; - * however, any object that exposes a projection.stream function can be used, enabling the use of custom projections. - * See D3’s transforms for more examples of arbitrary geometric transformations. - * - * @param projection A wrapper object exposing, at a minimum a "stream" method to be used for custom projections. - */ - projection(projection: GeoStreamWrapper): this; - - /** - * Returns the current radius or radius accessor used to determine the radius for the display of Point and MultiPoint geometries. - * The default is a constant radius of 4.5. - */ - pointRadius(): ((this: This, object: DatumObject, ...args: any[]) => number) | number; - - /** - * Sets the radius used to display Point and MultiPoint geometries to the specified number and return the geo path generator. - * - * @param value Fixed radius value. - */ - pointRadius(value: number): this; - - /** - * Sets the radius used to display Point and MultiPoint geometries to use the specified radius accessor function. - * - * While the radius is commonly specified as a number constant, it may also be specified as a function which is computed per feature, - * being passed the any arguments passed to the path generator. For example, if your GeoJSON data has additional properties, - * you might access those properties inside the radius function to vary the point size; - * alternatively, you could d3.symbol and a projection for greater flexibility. - * - * @param value A value accessor function for the radius which is evaluated for each path to be rendered. - * The value accessor function is invoked within the "this" context in which the path generator is used. - * It is passed the object to be rendered, and any additional arguments which have been passed into the call to the render function of the path generator. - */ - pointRadius(value: (this: This, object: DatumObject, ...args: any[]) => number): this; -} - -/** - * Creates a new geographic path generator. - * - * The default projection is the null projection. The null projection represents the identity transformation, i.e. - * the input geometry is not projected and is instead rendered directly in raw coordinates. - * This can be useful for fast rendering of pre-projected geometry, or for fast rendering of the equirectangular projection. - * - * The default context is null, which implies that the path generator will return an SVG path string. - * - * @param projection An (optional) current projection to be used. Typically this is one of D3’s built-in geographic projections; - * however, any object that exposes a projection.stream function can be used, enabling the use of custom projections. - * See D3’s transforms for more examples of arbitrary geometric transformations. Setting the projection to "null" uses the identity projection. The default value is "null", the identity projection. - * @param context An (optional) rendering context to be used. If a context is provided, it must at least implement the interface described by GeoContext, a subset of the CanvasRenderingContext2D API. - * Setting the context to "null" means that the path generator will return an SVG path string representing the to be rendered object. The default is "null". - */ -export function geoPath(projection?: GeoProjection | GeoStreamWrapper | null, context?: GeoContext | null): GeoPath; -/** - * Creates a new geographic path generator with the default settings. - * - * The default projection is the null projection. The null projection represents the identity transformation: - * the input geometry is not projected and is instead rendered directly in raw coordinates. - * This can be useful for fast rendering of pre-projected geometry, or for fast rendering of the equirectangular projection. - * - * The default context is null, which implies that the path generator will return an SVG path string. - * - * The generic corresponds to the type of the DatumObject which will be passed into the geo path generator for rendering - * - * @param projection An (optional) current projection to be used. Typically this is one of D3’s built-in geographic projections; - * however, any object that exposes a projection.stream function can be used, enabling the use of custom projections. - * See D3’s transforms for more examples of arbitrary geometric transformations. Setting the projection to "null" uses the identity projection. The default value is "null", the identity projection. - * @param context An (optional) rendering context to be used. If a context is provided, it must at least implement the interface described by GeoContext, a subset of the CanvasRenderingContext2D API. - * Setting the context to "null" means that the path generator will return an SVG path string representing the to be rendered object. The default is "null". - */ -export function geoPath<DatumObject extends GeoPermissibleObjects>(projection?: GeoProjection | GeoStreamWrapper | null, context?: GeoContext | null): GeoPath<any, DatumObject>; -/** - * Creates a new geographic path generator with the default settings. - * - * The default projection is the null projection. The null projection represents the identity transformation: - * the input geometry is not projected and is instead rendered directly in raw coordinates. - * This can be useful for fast rendering of pre-projected geometry, or for fast rendering of the equirectangular projection. - * - * The default context is null, which implies that the path generator will return an SVG path string. - * - * The first generic corresponds to the "this"-context within which the geo path generator will be invoked. - * This could be e.g. the DOMElement bound to "this" when using selection.attr("d", ...) with the path generator. - * - * The second generic corresponds to the type of the DatumObject which will be passed into the geo path generator for rendering. - * - * @param projection An (optional) current projection to be used. Typically this is one of D3’s built-in geographic projections; - * however, any object that exposes a projection.stream function can be used, enabling the use of custom projections. - * See D3’s transforms for more examples of arbitrary geometric transformations. Setting the projection to "null" uses the identity projection. The default value is "null", the identity projection. - * @param context An (optional) rendering context to be used. If a context is provided, it must at least implement the interface described by GeoContext, a subset of the CanvasRenderingContext2D API. - * Setting the context to "null" means that the path generator will return an SVG path string representing the to be rendered object. The default is "null". - */ -export function geoPath<This, DatumObject extends GeoPermissibleObjects>(projection?: GeoProjection | GeoStreamWrapper | null, context?: GeoContext | null): GeoPath<This, DatumObject>; - -// geoProjection ========================================================== - -/** - * Constructs a new projection from the specified raw projection, project. - * The project function takes the longitude and latitude of a given point in radians, - * often referred to as lambda (λ) and phi (φ), and returns a two-element array [x, y] representing its unit projection. - * The project function does not need to scale or translate the point, as these are applied automatically by projection.scale, projection.translate, and projection.center. - * Likewise, the project function does not need to perform any spherical rotation, as projection.rotate is applied prior to projection. - * - * If the project function exposes an invert method, the returned projection will also expose projection.invert. - */ -export function geoProjection(project: GeoRawProjection): GeoProjection; - -// geoProjectionMutator ==================================================== - -/** - * Constructs a new projection from the specified raw projection factory and returns a mutate function to call whenever the raw projection changes. - * The factory must return a raw projection. The returned mutate function returns the wrapped projection. - * - * When creating a mutable projection, the mutate function is typically not exposed. - */ -export function geoProjectionMutator(factory: (...args: any[]) => GeoRawProjection): () => GeoProjection; - -// Pre-Defined Projections and Raw Projections ============================= - -// Azimuthal Projections --------------------------------------------------- - -/** - * The azimuthal equal-area projection. - */ -export function geoAzimuthalEqualArea(): GeoProjection; - -/** - * The raw azimuthal equal-area projection. - */ -export function geoAzimuthalEqualAreaRaw(): GeoRawProjection; - -/** - * The azimuthal equidistant projection. - */ -export function geoAzimuthalEquidistant(): GeoProjection; -/** - * The raw azimuthal equidistant projection. - */ -export function geoAzimuthalEquidistantRaw(): GeoRawProjection; - -/** - * The gnomonic projection. - */ -export function geoGnomonic(): GeoProjection; - -/** - * The raw gnomonic projection. - */ -export function geoGnomonicRaw(): GeoRawProjection; - -/** - * The orthographic projection. - */ -export function geoOrthographic(): GeoProjection; - -/** - * The raw orthographic projection. - */ -export function geoOrthographicRaw(): GeoRawProjection; - -/** - * The stereographic projection. - */ -export function geoStereographic(): GeoProjection; - -/** - * The raw stereographic projection. - */ -export function geoStereographicRaw(): GeoRawProjection; - -/** - * The Equal Eartch projection, by Bojan Å avriÄ et al., 2018. - */ -export function geoEqualEarth(): GeoProjection; - -/** - * The raw Equal Earth projection, by Bojan Å avriÄ et al., 2018. - */ -export function geoEqualEarthRaw(): GeoRawProjection; - -// Composite Projections --------------------------------------------------- - -/** - * A U.S.-centric composite projection of three d3.geoConicEqualArea projections: d3.geoAlbers is used for the lower forty-eight states, - * and separate conic equal-area projections are used for Alaska and Hawaii. Note that the scale for Alaska is diminished: it is projected at 0.35× its true relative area. - * - * Composite consist of several projections that are composed into a single display. The constituent projections have fixed clip, center and rotation, - * and thus composite projections do not support projection.center, projection.rotate, projection.clipAngle, or projection.clipExtent. - */ -export function geoAlbersUsa(): GeoProjection; - -// Conic Projections ------------------------------------------------------- - -/** - * The Albers’ equal area-conic projection. This is a U.S.-centric configuration of d3.geoConicEqualArea. - */ -export function geoAlbers(): GeoConicProjection; - -/** - * The conic conformal projection. The parallels default to [30°, 30°] resulting in flat top. - */ -export function geoConicConformal(): GeoConicProjection; - -/** - * The raw conic conformal projection. - */ -export function geoConicConformalRaw(phi0: number, phi1: number): GeoRawProjection; - -/** - * The Albers’ equal-area conic projection. - */ -export function geoConicEqualArea(): GeoConicProjection; - -/** - * The raw Albers’ equal-area conic projection. - */ -export function geoConicEqualAreaRaw(phi0: number, phi1: number): GeoRawProjection; - -/** - * The conic equidistant projection. - */ -export function geoConicEquidistant(): GeoConicProjection; - -/** - * The raw conic equidistant projection. - */ -export function geoConicEquidistantRaw(phi0: number, phi1: number): GeoRawProjection; - -// Cylindrical Projections ------------------------------------------------ - -/** - * The equirectangular (plate carrée) projection. - */ -export function geoEquirectangular(): GeoProjection; - -/** - * The raw equirectangular (plate carrée) projection. - */ -export function geoEquirectangularRaw(): GeoRawProjection; - -/** - * The spherical Mercator projection. - * Defines a default projection.clipExtent such that the world is projected to a square, clipped to approximately ±85° latitude. - */ -export function geoMercator(): GeoProjection; -/** - * The raw spherical Mercator projection. - */ -export function geoMercatorRaw(): GeoRawProjection; - -/** - * The transverse spherical Mercator projection. - * Defines a default projection.clipExtent such that the world is projected to a square, clipped to approximately ±85° latitude. - */ -export function geoTransverseMercator(): GeoProjection; - -/** - * The raw transverse spherical Mercator projection. - */ -export function geoTransverseMercatorRaw(): GeoRawProjection; - -/** - * The Natural Earth projection is a pseudocylindrical projection designed by Tom Patterson. It is neither conformal nor equal-area, but appealing to the eye for small-scale maps of the whole world. - */ -export function geoNaturalEarth1(): GeoProjection; - -/** - * The raw pseudo-cylindircal Natural Earth projection. - */ -export function geoNaturalEarth1Raw(): GeoRawProjection; - -// ---------------------------------------------------------------------- -// Projection Transforms -// ---------------------------------------------------------------------- - -// geoTransform(...) ==================================================== - -/** - * A Prototype interface which serves as a template for the implementation of a geometric transform using geoTransform(...) - * It serves as a reference for the custom methods which can be passed into geoTransform as argument to crete a generalized - * transform projection. - */ -export interface GeoTransformPrototype { - /** - * Indicates the end of a line or ring. Within a polygon, indicates the end of a ring. - * Unlike GeoJSON, the redundant closing coordinate of a ring is not indicated via point, and instead is implied via lineEnd within a polygon. - */ - lineEnd?(this: this & { stream: GeoStream }): void; - /** - * Indicates the start of a line or ring. Within a polygon, indicates the start of a ring. The first ring of a polygon is the exterior ring, and is typically clockwise. - * Any subsequent rings indicate holes in the polygon, and are typically counterclockwise. - */ - lineStart?(this: this & { stream: GeoStream }): void; - /** - * Indicates a point with the specified coordinates x and y (and optionally z). The coordinate system is unspecified and implementation-dependent; - * for example, projection streams require spherical coordinates in degrees as input. Outside the context of a polygon or line, - * a point indicates a point geometry object (Point or MultiPoint). Within a line or polygon ring, the point indicates a control point. - * - * @param x x-coordinate of point. - * @param y y-coordinate of point. - * @param z Optional z-coordinate of point. - */ - point?(this: this & { stream: GeoStream }, x: number, y: number, z?: number): void; - /** - * Indicates the end of a polygon. - */ - polygonEnd?(this: this & { stream: GeoStream }): void; - /** - * Indicates the start of a polygon. The first line of a polygon indicates the exterior ring, and any subsequent lines indicate interior holes. - */ - polygonStart?(this: this & { stream: GeoStream }): void; - /** - * Indicates the sphere (the globe; the unit sphere centered at ⟨0,0,0⟩). - */ - sphere?(this: this & { stream: GeoStream }): void; -} - -// TODO: Review whether GeoStreamWrapper should be included into return value union type, i.e. ({ stream: (s: GeoStream) => (T & GeoStream & GeoStreamWrapper)})? -// It probably should be omitted for purposes of this API. The stream method added to (T & GeoStream) is more of a private member used internally to -// implement the Transform factory - -/** - * Defines an arbitrary transform using the methods defined on the specified methods object. - * Any undefined methods will use pass-through methods that propagate inputs to the output stream. - * - * @param methods An object with custom method implementations, which are used to create a transform projection. - */ -export function geoTransform<T extends GeoTransformPrototype>(methods: T): { stream(s: GeoStream): T & GeoStream }; - -// geoIdentity() ================================================================= - -/** - * @deprecated Misspelled name. Use GeoIdentityTransform. - */ -export type GeoIdentityTranform = GeoIdentityTransform; - -/** - * Geo Identity Transform - */ -export interface GeoIdentityTransform extends GeoStreamWrapper { - /** - * Returns a new array [x, y] (typically in pixels) representing the projected point of the given point. - * The point must be specified as a two-element array [longitude, latitude] in degrees. - * May return null if the specified point has no defined projected position, such as when the point is outside the clipping bounds of the projection. - * - * @param point A point specified as a two-dimensional array [longitude, latitude] in degrees. - */ - (point: [number, number]): [number, number] | null; - - /** - * Returns a new array [longitude, latitude] in degrees representing the unprojected point of the given projected point. - * May return null if the specified point has no defined projected position, such as when the point is outside the clipping bounds of the projection. - * - * @param point The projected point, specified as a two-element array [x, y] (typically in pixels). - */ - invert(point: [number, number]): [number, number] | null; - - /** - * Returns the current cartesian clipping function. - * Post-clipping occurs on the plane, when a projection is bounded to a certain extent such as a rectangle. - */ - postclip(): (stream: GeoStream) => GeoStream; - /** - * Sets the projection’s cartesian clipping to the specified function and returns the projection. - * - * @param postclip A cartesian clipping function. Clipping functions are implemented as transformations of a projection stream. - * Post-clipping operates on planar coordinates, in pixels. - */ - postclip(postclip: (stream: GeoStream) => GeoStream): this; - - /** - * Returns the current scale factor. - * - * The scale factor corresponds linearly to the distance between projected points; however, absolute scale factors are not equivalent across projections. - */ - scale(): number; - /** - * Sets the projection’s scale factor to the specified value and returns the projection. - * The scale factor corresponds linearly to the distance between projected points; however, absolute scale factors are not equivalent across projections. - * - * @param scale Scale factor to be used for the projection. - */ - scale(scale: number): this; - - /** - * Returns the current translation offset. - * The translation offset determines the pixel coordinates of the projection’s center. - */ - translate(): [number, number]; - /** - * Sets the projection’s translation offset to the specified two-element array [tx, ty] and returns the projection. - * The translation offset determines the pixel coordinates of the projection’s center. - * - * @param point A two-element array [tx, ty] specifying the translation offset. - */ - translate(point: [number, number]): this; - - /** - * Returns the projection’s current angle, which defaults to 0°. - */ - angle(): number; - /** - * Sets the projection’s post-projection planar rotation angle to the specified angle in degrees and returns the projection. - * @param angle The new rotation angle of the projection. - */ - angle(angle: number): this; - - /** - * Sets the projection’s scale and translate to fit the specified geographic feature in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[xâ‚€, yâ‚€], [xâ‚, yâ‚]], where xâ‚€ is the left side of the bounding box, yâ‚€ is the top, xâ‚ is the right and yâ‚ is the bottom. - * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). - */ - fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeature): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[xâ‚€, yâ‚€], [xâ‚, yâ‚]], where xâ‚€ is the left side of the bounding box, yâ‚€ is the top, xâ‚ is the right and yâ‚ is the bottom. - * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). - */ - fitExtent(extent: [[number, number], [number, number]], object: ExtendedFeatureCollection): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic geometry object in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[xâ‚€, yâ‚€], [xâ‚, yâ‚]], where xâ‚€ is the left side of the bounding box, yâ‚€ is the top, xâ‚ is the right and yâ‚ is the bottom. - * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). - */ - fitExtent(extent: [[number, number], [number, number]], object: GeoGeometryObjects): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic geometry collection in the center of the given extent. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param extent The extent, specified as an array [[xâ‚€, yâ‚€], [xâ‚, yâ‚]], where xâ‚€ is the left side of the bounding box, yâ‚€ is the top, xâ‚ is the right and yâ‚ is the bottom. - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - */ - fitExtent(extent: [[number, number], [number, number]], object: ExtendedGeometryCollection): this; - - /** - * Sets the projection’s scale and translate to fit the specified geographic feature in the center of an extent with the given size and top-left corner of [0, 0]. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param size The size of the extent, specified as an array [width, height]. - * @param object A geographic feature supported by d3-geo (An extension of GeoJSON feature). - */ - fitSize(size: [number, number], object: ExtendedFeature): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic feature collection in the center of an extent with the given size and top-left corner of [0, 0]. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param size The size of the extent, specified as an array [width, height]. - * @param object A geographic feature collection supported by d3-geo (An extension of GeoJSON feature collection). - */ - fitSize(size: [number, number], object: ExtendedFeatureCollection): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic geometry object in the center of an extent with the given size and top-left corner of [0, 0]. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param size The size of the extent, specified as an array [width, height]. - * @param object A GeoJson Geometry Object or GeoSphere object supported by d3-geo (An extension of GeoJSON). - */ - fitSize(size: [number, number], object: GeoGeometryObjects): this; - /** - * Sets the projection’s scale and translate to fit the specified geographic geometry collection in the center of an extent with the given size and top-left corner of [0, 0]. - * Returns the projection. - * - * Any clip extent is ignored when determining the new scale and translate. The precision used to compute the bounding box of the given object is computed at an effective scale of 150. - * - * @param size The size of the extent, specified as an array [width, height]. - * @param object A geographic geometry collection supported by d3-geo (An extension of GeoJSON geometry collection). - */ - fitSize(size: [number, number], object: ExtendedGeometryCollection): this; - - /** - * Returns the current viewport clip extent which defaults to null. - */ - clipExtent(): [[number, number], [number, number]] | null; - /** - * Sets the clip extent to null and returns the projection. - * With a clip extent of null, no viewport clipping is performed. - * - * Viewport clipping is independent of small-circle clipping via projection.clipAngle. - * - * @param extent Set to null to disable viewport clipping. - */ - clipExtent(extent: null): this; - /** - * Sets the projection’s viewport clip extent to the specified bounds in pixels and returns the projection. - * The extent bounds are specified as an array [[xâ‚€, yâ‚€], [xâ‚, yâ‚]], where xâ‚€ is the left-side of the viewport, yâ‚€ is the top, xâ‚ is the right and yâ‚ is the bottom. - * - * Viewport clipping is independent of small-circle clipping via projection.clipAngle. - * - * @param extent The extent bounds are specified as an array [[xâ‚€, yâ‚€], [xâ‚, yâ‚]], where xâ‚€ is the left-side of the viewport, yâ‚€ is the top, xâ‚ is the right and yâ‚ is the bottom. - */ - clipExtent(extent: [[number, number], [number, number]]): this; - - /** - * Returns true if x-reflection is enabled, which defaults to false. - */ - reflectX(): boolean; - /** - * Sets whether or not the x-dimension is reflected (negated) in the output. - * - * @param reflect true = reflect x-dimension, false = do not reflect x-dimension. - */ - reflectX(reflect: boolean): this; - - /** - * Returns true if y-reflection is enabled, which defaults to false. - */ - reflectY(): boolean; - /** - * Sets whether or not the y-dimension is reflected (negated) in the output. - * - * This is especially useful for transforming from standard spatial reference systems, - * which treat positive y as pointing up, to display coordinate systems such as Canvas and SVG, - * which treat positive y as pointing down. - * - * @param reflect true = reflect y-dimension, false = do not reflect y-dimension. - */ - reflectY(reflect: boolean): this; -} - -/** - * Returns the identity transform which can be used to scale, translate and clip planar geometry. - */ -export function geoIdentity(): GeoIdentityTransform; - -// ---------------------------------------------------------------------- -// Clipping Functions -// ---------------------------------------------------------------------- - -/** - * A clipping function transforming a stream such that geometries (lines or polygons) that cross the antimeridian line are cut in two, one on each side. - * Typically used for pre-clipping. - */ -export const geoClipAntimeridian: ((stream: GeoStream) => GeoStream); - -/** - * Generates a clipping function transforming a stream such that geometries are bounded by a small circle of radius angle around the projection’s center. - * Typically used for pre-clipping. - * - * @param angle A clipping angle. - */ -export function geoClipCircle(angle: number): (stream: GeoStream) => GeoStream; - -/** - * Generates a clipping function transforming a stream such that geometries are bounded by a rectangle of coordinates [[x0, y0], [x1, y1]]. - * Typically used for post-clipping. - * - * @param x0 x0 coordinate. - * @param y0 y0 coordinate. - * @param x1 x1 coordinate. - * @param y1 y1 coordinate. - */ -export function geoClipRectangle(x0: number, y0: number, x1: number, y1: number): (stream: GeoStream) => GeoStream; diff --git a/node_modules/@types/d3-geo/package.json b/node_modules/@types/d3-geo/package.json deleted file mode 100644 index 6579c84f07772e925adecac81acd91ae7aa88f39..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-geo/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_from": "@types/d3-geo@^1", - "_id": "@types/d3-geo@1.12.1", - "_inBundle": false, - "_integrity": "sha512-8+gyGFyMCXIHtnMNKQDT++tZ4XYFXgiP5NK7mcv34aYXA16GQFiBBITjKzxghpO8QNVceOd9rUn1JY92WLNGQw==", - "_location": "/@types/d3-geo", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-geo@^1", - "name": "@types/d3-geo", - "escapedName": "@types%2fd3-geo", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-1.12.1.tgz", - "_shasum": "bec8692ffee9f60e18483af9008f92d4a8428118", - "_spec": "@types/d3-geo@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Hugues Stefanski", - "url": "https://github.com/ledragon" - }, - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": { - "@types/geojson": "*" - }, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-geo module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-geo", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-geo" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "bd7514f5d690c496b0b78d04e1470bad686e238c753eb2fdc95ae89f4a6f2c40", - "version": "1.12.1" -} diff --git a/node_modules/@types/d3-hierarchy/LICENSE b/node_modules/@types/d3-hierarchy/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-hierarchy/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-hierarchy/README.md b/node_modules/@types/d3-hierarchy/README.md deleted file mode 100644 index 4b36f71124b186d890fb2a0f39dfcaf77a157914..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-hierarchy/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-hierarchy` - -# Summary -This package contains type definitions for D3JS d3-hierarchy module (https://github.com/d3/d3-hierarchy/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-hierarchy/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 00:01:32 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-hierarchy/index.d.ts b/node_modules/@types/d3-hierarchy/index.d.ts deleted file mode 100644 index 53ee68eccbd9cccf75a5fe8085f6c479903d7bce..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-hierarchy/index.d.ts +++ /dev/null @@ -1,858 +0,0 @@ -// Type definitions for D3JS d3-hierarchy module 1.1 -// Project: https://github.com/d3/d3-hierarchy/, https://d3js.org/d3-hierarchy -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// Last module patch version validated against: 1.1.9 - -// ----------------------------------------------------------------------- -// Hierarchy -// ----------------------------------------------------------------------- - -export interface HierarchyLink<Datum> { - /** - * The source of the link. - */ - source: HierarchyNode<Datum>; - - /** - * The target of the link. - */ - target: HierarchyNode<Datum>; -} - -export interface HierarchyNode<Datum> { - /** - * The associated data, as specified to the constructor. - */ - data: Datum; - - /** - * Zero for the root node, and increasing by one for each descendant generation. - */ - readonly depth: number; - - /** - * Zero for leaf nodes, and the greatest distance from any descendant leaf for internal nodes. - */ - readonly height: number; - - /** - * The parent node, or null for the root node. - */ - parent: this | null; - - /** - * An array of child nodes, if any; undefined for leaf nodes. - */ - children?: this[]; - - /** - * Aggregated numeric value as calculated by `sum(value)` or `count()`, if previously invoked. - */ - readonly value?: number; - - /** - * Optional node id string set by `StratifyOperator`, if hierarchical data was created from tabular data using stratify(). - */ - readonly id?: string; - - /** - * Returns the array of ancestors nodes, starting with this node, then followed by each parent up to the root. - */ - ancestors(): this[]; - - /** - * Returns the array of descendant nodes, starting with this node, then followed by each child in topological order. - */ - descendants(): this[]; - - /** - * Returns the array of leaf nodes in traversal order; leaves are nodes with no children. - */ - leaves(): this[]; - - /** - * Returns the shortest path through the hierarchy from this node to the specified target node. - * The path starts at this node, ascends to the least common ancestor of this node and the target node, and then descends to the target node. - * - * @param target The target node. - */ - path(target: this): this[]; - - /** - * Returns an array of links for this node, where each link is an object that defines source and target properties. - * The source of each link is the parent node, and the target is a child node. - */ - links(): Array<HierarchyLink<Datum>>; - - /** - * Evaluates the specified value function for this node and each descendant in post-order traversal, and returns this node. - * The `node.value` property of each node is set to the numeric value returned by the specified function plus the combined value of all descendants. - * - * @param value The value function is passed the node’s data, and must return a non-negative number. - */ - sum(value: (d: Datum) => number): this; - - /** - * Computes the number of leaves under this node and assigns it to `node.value`, and similarly for every descendant of node. - * If this node is a leaf, its count is one. Returns this node. - */ - count(): this; - - /** - * Sorts the children of this node, if any, and each of this node’s descendants’ children, - * in pre-order traversal using the specified compare function, and returns this node. - * - * @param compare The compare function is passed two nodes a and b to compare. - * If a should be before b, the function must return a value less than zero; - * if b should be before a, the function must return a value greater than zero; - * otherwise, the relative order of a and b are not specified. See `array.sort` for more. - */ - sort(compare: (a: this, b: this) => number): this; - - /** - * Invokes the specified function for node and each descendant in breadth-first order, - * such that a given node is only visited if all nodes of lesser depth have already been visited, - * as well as all preceding nodes of the same depth. - * - * @param func The specified function is passed the current node. - */ - each(func: (node: this) => void): this; - - /** - * Invokes the specified function for node and each descendant in post-order traversal, - * such that a given node is only visited after all of its descendants have already been visited. - * - * @param func The specified function is passed the current node. - */ - eachAfter(func: (node: this) => void): this; - - /** - * Invokes the specified function for node and each descendant in pre-order traversal, - * such that a given node is only visited after all of its ancestors have already been visited. - * - * @param func The specified function is passed the current node. - */ - eachBefore(func: (node: this) => void): this; - - /** - * Return a deep copy of the subtree starting at this node. The returned deep copy shares the same data, however. - * The returned node is the root of a new tree; the returned node’s parent is always null and its depth is always zero. - */ - copy(): this; -} - -/** - * Constructs a root node from the specified hierarchical data. - * - * @param data The root specified data. - * @param children The specified children accessor function invoked for each datum, starting with the root data. - * Must return an array of data representing the children, and return null or undefined if the current datum has no children. - * If children is not specified, it defaults to: `(d) => d.children`. - */ -export function hierarchy<Datum>(data: Datum, children?: (d: Datum) => (Datum[] | null | undefined)): HierarchyNode<Datum>; - -// ----------------------------------------------------------------------- -// Stratify -// ----------------------------------------------------------------------- - -export interface StratifyOperator<Datum> { - /** - * Generates a new hierarchy from the specified tabular data. Each node in the returned object has a shallow copy of the properties - * from the corresponding data object, excluding the following reserved properties: id, parentId, children. - * - * @param data The root specified data. - * @throws Error on missing id, ambiguous id, cycle, multiple roots or no root. - */ - (data: Datum[]): HierarchyNode<Datum>; - - /** - * Returns the current id accessor, which defaults to: `(d) => d.id`. - */ - id(): (d: Datum, i: number, data: Datum[]) => (string | null | '' | undefined); - /** - * Sets the id accessor to the given function. - * The id accessor is invoked for each element in the input data passed to the stratify operator. - * The returned string is then used to identify the node's relationships in conjunction with the parent id. - * For leaf nodes, the id may be undefined, null or the empty string; otherwise, the id must be unique. - * - * @param id The id accessor. - */ - id(id: (d: Datum, i: number, data: Datum[]) => (string | null | '' | undefined)): this; - - /** - * Returns the current parent id accessor, which defaults to: `(d) => d.parentId`. - */ - parentId(): (d: Datum, i: number, data: Datum[]) => (string | null | '' | undefined); - /** - * Sets the parent id accessor to the given function. - * The parent id accessor is invoked for each element in the input data passed to the stratify operator. - * The returned string is then used to identify the node's relationships in conjunction with the id. - * For the root node, the parent id should be undefined, null or the empty string. - * There must be exactly one root node in the input data, and no circular relationships. - * - * @param parentId The parent id accessor. - */ - parentId(parentId: (d: Datum, i: number, data: Datum[]) => (string | null | '' | undefined)): this; -} - -/** - * Constructs a new stratify operator with the default settings. - */ -export function stratify<Datum>(): StratifyOperator<Datum>; - -// ----------------------------------------------------------------------- -// Cluster -// ----------------------------------------------------------------------- - -export interface HierarchyPointLink<Datum> { - /** - * The source of the link. - */ - source: HierarchyPointNode<Datum>; - - /** - * The target of the link. - */ - target: HierarchyPointNode<Datum>; -} - -export interface HierarchyPointNode<Datum> extends HierarchyNode<Datum> { - /** - * The x-coordinate of the node. - */ - x: number; - - /** - * The y-coordinate of the node. - */ - y: number; - - /** - * Returns an array of links for this node, where each link is an object that defines source and target properties. - * The source of each link is the parent node, and the target is a child node. - */ - links(): Array<HierarchyPointLink<Datum>>; -} - -export interface ClusterLayout<Datum> { - /** - * Lays out the specified root hierarchy. - * You may want to call `root.sort` before passing the hierarchy to the cluster layout. - * - * @param root The specified root hierarchy. - */ - (root: HierarchyNode<Datum>): HierarchyPointNode<Datum>; - - /** - * Returns the current layout size, which defaults to [1, 1]. A layout size of null indicates that a node size will be used instead. - */ - size(): [number, number] | null; - /** - * Sets this cluster layout’s size to the specified [width, height] array and returns the cluster layout. - * The size represent an arbitrary coordinate system; for example, to produce a radial layout, - * a size of [360, radius] corresponds to a breadth of 360° and a depth of radius. - * - * @param size The specified two-element size array. - */ - size(size: [number, number]): this; - - /** - * Returns the current node size, which defaults to null. A node size of null indicates that a layout size will be used instead. - */ - nodeSize(): [number, number] | null; - /** - * Sets this cluster layout’s node size to the specified [width, height] array and returns this cluster layout. - * When a node size is specified, the root node is always positioned at <0, 0>. - * - * @param size The specified two-element size array. - */ - nodeSize(size: [number, number]): this; - - /** - * Returns the current separation accessor, which defaults to: `(a, b) => a.parent == b.parent ? 1 : 2`. - */ - separation(): (a: HierarchyPointNode<Datum>, b: HierarchyPointNode<Datum>) => number; - /** - * Sets the separation accessor to the specified function and returns this cluster layout. - * The separation accessor is used to separate neighboring leaves. - * - * @param separation The separation function is passed two leaves a and b, and must return the desired separation. - * The nodes are typically siblings, though the nodes may be more distantly related if the layout decides to place such nodes adjacent. - */ - separation(separation: (a: HierarchyPointNode<Datum>, b: HierarchyPointNode<Datum>) => number): this; -} - -/** - * Creates a new cluster layout with default settings. - */ -export function cluster<Datum>(): ClusterLayout<Datum>; - -// ----------------------------------------------------------------------- -// Tree -// ----------------------------------------------------------------------- - -export interface TreeLayout<Datum> { - /** - * Lays out the specified root hierarchy. - * You may want to call `root.sort` before passing the hierarchy to the tree layout. - * - * @param root The specified root hierarchy. - */ - (root: HierarchyNode<Datum>): HierarchyPointNode<Datum>; - - /** - * Returns the current layout size, which defaults to [1, 1]. A layout size of null indicates that a node size will be used instead. - */ - size(): [number, number] | null; - /** - * Sets this tree layout’s size to the specified [width, height] array and returns the tree layout. - * The size represent an arbitrary coordinate system; for example, to produce a radial layout, - * a size of [360, radius] corresponds to a breadth of 360° and a depth of radius. - * - * @param size The specified two-element size array. - */ - size(size: [number, number]): this; - - /** - * Returns the current node size, which defaults to null. A node size of null indicates that a layout size will be used instead. - */ - nodeSize(): [number, number] | null; - /** - * Sets this tree layout’s node size to the specified [width, height] array and returns this tree layout. - * When a node size is specified, the root node is always positioned at <0, 0>. - * - * @param size The specified two-element size array. - */ - nodeSize(size: [number, number]): this; - - /** - * Returns the current separation accessor, which defaults to: `(a, b) => a.parent == b.parent ? 1 : 2`. - */ - separation(): (a: HierarchyPointNode<Datum>, b: HierarchyPointNode<Datum>) => number; - /** - * Sets the separation accessor to the specified function and returns this tree layout. - * The separation accessor is used to separate neighboring nodes. - * - * @param separation The separation function is passed two nodes a and b, and must return the desired separation. - * The nodes are typically siblings, though the nodes may be more distantly related if the layout decides to place such nodes adjacent. - */ - separation(separation: (a: HierarchyPointNode<Datum>, b: HierarchyPointNode<Datum>) => number): this; -} - -/** - * Creates a new tree layout with default settings. - */ -export function tree<Datum>(): TreeLayout<Datum>; - -// ----------------------------------------------------------------------- -// Treemap -// ----------------------------------------------------------------------- - -export interface HierarchyRectangularLink<Datum> { - /** - * The source of the link. - */ - source: HierarchyRectangularNode<Datum>; - - /** - * The target of the link. - */ - target: HierarchyRectangularNode<Datum>; -} - -export interface HierarchyRectangularNode<Datum> extends HierarchyNode<Datum> { - /** - * The left edge of the rectangle. - */ - x0: number; - - /** - * The top edge of the rectangle - */ - y0: number; - - /** - * The right edge of the rectangle. - */ - x1: number; - - /** - * The bottom edge of the rectangle. - */ - y1: number; - - /** - * Returns an array of links for this node, where each link is an object that defines source and target properties. - * The source of each link is the parent node, and the target is a child node. - */ - links(): Array<HierarchyRectangularLink<Datum>>; -} - -export interface TreemapLayout<Datum> { - /** - * Lays out the specified root hierarchy. - * You must call `root.sum` before passing the hierarchy to the treemap layout. - * You probably also want to call `root.sort` to order the hierarchy before computing the layout. - * - * @param root The specified root hierarchy. - */ - (root: HierarchyNode<Datum>): HierarchyRectangularNode<Datum>; - - /** - * Returns the current tiling method, which defaults to `d3.treemapSquarify` with the golden ratio. - */ - tile(): (node: HierarchyRectangularNode<Datum>, x0: number, y0: number, x1: number, y1: number) => void; - /** - * Sets the tiling method to the specified function and returns this treemap layout. - * - * @param tile The specified tiling function. - */ - tile(tile: (node: HierarchyRectangularNode<Datum>, x0: number, y0: number, x1: number, y1: number) => void): this; - - /** - * Returns the current size, which defaults to [1, 1]. - */ - size(): [number, number]; - /** - * Sets this treemap layout’s size to the specified [width, height] array and returns this treemap layout. - * - * @param size The specified two-element size array. - */ - size(size: [number, number]): this; - - /** - * Returns the current rounding state, which defaults to false. - */ - round(): boolean; - /** - * Enables or disables rounding according to the given boolean and returns this treemap layout. - * - * @param round The specified boolean flag. - */ - round(round: boolean): this; - - /** - * Returns the current inner padding function. - */ - padding(): (node: HierarchyRectangularNode<Datum>) => number; - /** - * Sets the inner and outer padding to the specified number and returns this treemap layout. - * - * @param padding The specified padding value. - */ - padding(padding: number): this; - /** - * Sets the inner and outer padding to the specified function and returns this treemap layout. - * - * @param padding The specified padding function. - */ - padding(padding: (node: HierarchyRectangularNode<Datum>) => number): this; - - /** - * Returns the current inner padding function, which defaults to the constant zero. - */ - paddingInner(): (node: HierarchyRectangularNode<Datum>) => number; - /** - * Sets the inner padding to the specified number and returns this treemap layout. - * The inner padding is used to separate a node’s adjacent children. - * - * @param padding The specified inner padding value. - */ - paddingInner(padding: number): this; - /** - * Sets the inner padding to the specified function and returns this treemap layout. - * The function is invoked for each node with children, being passed the current node. - * The inner padding is used to separate a node’s adjacent children. - * - * @param padding The specified inner padding function. - */ - paddingInner(padding: (node: HierarchyRectangularNode<Datum>) => number): this; - - /** - * Returns the current top padding function. - */ - paddingOuter(): (node: HierarchyRectangularNode<Datum>) => number; - /** - * Sets the top, right, bottom and left padding to the specified function and returns this treemap layout. - * - * @param padding The specified padding outer value. - */ - paddingOuter(padding: number): this; - /** - * Sets the top, right, bottom and left padding to the specified function and returns this treemap layout. - * - * @param padding The specified padding outer function. - */ - paddingOuter(padding: (node: HierarchyRectangularNode<Datum>) => number): this; - - /** - * Returns the current top padding function, which defaults to the constant zero. - */ - paddingTop(): (node: HierarchyRectangularNode<Datum>) => number; - /** - * Sets the top padding to the specified number and returns this treemap layout. - * The top padding is used to separate the top edge of a node from its children. - * - * @param padding The specified top padding value. - */ - paddingTop(padding: number): this; - /** - * Sets the top padding to the specified function and returns this treemap layout. - * The function is invoked for each node with children, being passed the current node. - * The top padding is used to separate the top edge of a node from its children. - * - * @param padding The specified top padding function. - */ - paddingTop(padding: (node: HierarchyRectangularNode<Datum>) => number): this; - - /** - * Returns the current right padding function, which defaults to the constant zero. - */ - paddingRight(): (node: HierarchyRectangularNode<Datum>) => number; - /** - * Sets the right padding to the specified number and returns this treemap layout. - * The right padding is used to separate the right edge of a node from its children. - * - * @param padding The specified right padding value. - */ - paddingRight(padding: number): this; - /** - * Sets the right padding to the specified function and returns this treemap layout. - * The function is invoked for each node with children, being passed the current node. - * The right padding is used to separate the right edge of a node from its children. - * - * @param padding The specified right padding function. - */ - paddingRight(padding: (node: HierarchyRectangularNode<Datum>) => number): this; - - /** - * Returns the current bottom padding function, which defaults to the constant zero. - */ - paddingBottom(): (node: HierarchyRectangularNode<Datum>) => number; - /** - * Sets the bottom padding to the specified number and returns this treemap layout. - * The bottom padding is used to separate the bottom edge of a node from its children. - * - * @param padding The specified bottom padding value. - */ - paddingBottom(padding: number): this; - /** - * Sets the bottom padding to the specified function and returns this treemap layout. - * The function is invoked for each node with children, being passed the current node. - * The bottom padding is used to separate the bottom edge of a node from its children. - * - * @param padding The specified bottom padding function. - */ - paddingBottom(padding: (node: HierarchyRectangularNode<Datum>) => number): this; - - /** - * Returns the current left padding function, which defaults to the constant zero. - */ - paddingLeft(): (node: HierarchyRectangularNode<Datum>) => number; - /** - * Sets the left padding to the specified number and returns this treemap layout. - * The left padding is used to separate the left edge of a node from its children. - * - * @param padding The specified left padding value. - */ - paddingLeft(padding: number): this; - /** - * Sets the left padding to the specified function and returns this treemap layout. - * The function is invoked for each node with children, being passed the current node. - * The left padding is used to separate the left edge of a node from its children. - * - * @param padding The specified left padding function. - */ - paddingLeft(padding: (node: HierarchyRectangularNode<Datum>) => number): this; -} - -/** - * Creates a new treemap layout with default settings. - */ -export function treemap<Datum>(): TreemapLayout<Datum>; - -// Tiling functions ------------------------------------------------------ - -/** - * Recursively partitions the specified nodes into an approximately-balanced binary tree, - * choosing horizontal partitioning for wide rectangles and vertical partitioning for tall rectangles. - */ -export function treemapBinary(node: HierarchyRectangularNode<any>, x0: number, y0: number, x1: number, y1: number): void; - -/** - * Divides the rectangular area specified by x0, y0, x1, y1 horizontally according the value of each of the specified node’s children. - * The children are positioned in order, starting with the left edge (x0) of the given rectangle. - * If the sum of the children’s values is less than the specified node’s value (i.e., if the specified node has a non-zero internal value), - * the remaining empty space will be positioned on the right edge (x1) of the given rectangle. - */ -export function treemapDice(node: HierarchyRectangularNode<any>, x0: number, y0: number, x1: number, y1: number): void; - -/** - * Divides the rectangular area specified by x0, y0, x1, y1 vertically according the value of each of the specified node’s children. - * The children are positioned in order, starting with the top edge (y0) of the given rectangle. - * If the sum of the children’s values is less than the specified node’s value (i.e., if the specified node has a non-zero internal value), - * the remaining empty space will be positioned on the bottom edge (y1) of the given rectangle. - */ -export function treemapSlice(node: HierarchyRectangularNode<any>, x0: number, y0: number, x1: number, y1: number): void; - -/** - * If the specified node has odd depth, delegates to treemapSlice; otherwise delegates to treemapDice. - */ -export function treemapSliceDice(node: HierarchyRectangularNode<any>, x0: number, y0: number, x1: number, y1: number): void; - -// TODO: Test Factory code -export interface RatioSquarifyTilingFactory { - (node: HierarchyRectangularNode<any>, x0: number, y0: number, x1: number, y1: number): void; - - /** - * Specifies the desired aspect ratio of the generated rectangles. - * Note that the orientation of the generated rectangles (tall or wide) is not implied by the ratio. - * Furthermore, the rectangles ratio are not guaranteed to have the exact specified aspect ratio. - * If not specified, the aspect ratio defaults to the golden ratio, φ = (1 + sqrt(5)) / 2, per Kong et al. - * - * @param ratio The specified ratio value greater than or equal to one. - */ - ratio(ratio: number): RatioSquarifyTilingFactory; -} - -/** - * Implements the squarified treemap algorithm by Bruls et al., which seeks to produce rectangles of a given aspect ratio. - */ -export const treemapSquarify: RatioSquarifyTilingFactory; - -/** - * Like `d3.treemapSquarify`, except preserves the topology (node adjacencies) of the previous layout computed by `d3.treemapResquarify`, - * if there is one and it used the same target aspect ratio. This tiling method is good for animating changes to treemaps because - * it only changes node sizes and not their relative positions, thus avoiding distracting shuffling and occlusion. - * The downside of a stable update, however, is a suboptimal layout for subsequent updates: only the first layout uses the Bruls et al. squarified algorithm. - */ -export const treemapResquarify: RatioSquarifyTilingFactory; - -// ----------------------------------------------------------------------- -// Partition -// ----------------------------------------------------------------------- - -export interface PartitionLayout<Datum> { - /** - * Lays out the specified root hierarchy. - * You must call `root.sum` before passing the hierarchy to the partition layout. - * You probably also want to call `root.sort` to order the hierarchy before computing the layout. - * - * @param root The specified root hierarchy. - */ - (root: HierarchyNode<Datum>): HierarchyRectangularNode<Datum>; - - /** - * Returns the current size, which defaults to [1, 1]. - */ - size(): [number, number]; - /** - * Sets this partition layout’s size to the specified [width, height] array and returns this partition layout. - * - * @param size The specified two-element size array. - */ - size(size: [number, number]): this; - - /** - * Returns the current rounding state, which defaults to false. - */ - round(): boolean; - /** - * Enables or disables rounding according to the given boolean and returns this partition layout. - * - * @param round The specified boolean flag. - */ - round(round: boolean): this; - - /** - * Returns the current padding, which defaults to zero. - */ - padding(): number; - /** - * Sets the padding to the specified number and returns this partition layout. - * The padding is used to separate a node’s adjacent children. - * - * @param padding The specified padding value. - */ - padding(padding: number): this; -} - -/** - * Creates a new partition layout with the default settings. - */ -export function partition<Datum>(): PartitionLayout<Datum>; - -// ----------------------------------------------------------------------- -// Pack -// ----------------------------------------------------------------------- - -export interface HierarchyCircularLink<Datum> { - /** - * The source of the link. - */ - source: HierarchyCircularNode<Datum>; - - /** - * The target of the link. - */ - target: HierarchyCircularNode<Datum>; -} - -export interface HierarchyCircularNode<Datum> extends HierarchyNode<Datum> { - /** - * The x-coordinate of the circle’s center. - */ - x: number; - - /** - * The y-coordinate of the circle’s center. - */ - y: number; - - /** - * The radius of the circle. - */ - r: number; - - /** - * Returns an array of links for this node, where each link is an object that defines source and target properties. - * The source of each link is the parent node, and the target is a child node. - */ - links(): Array<HierarchyCircularLink<Datum>>; -} - -export interface PackLayout<Datum> { - /** - * Lays out the specified root hierarchy. - * You must call `root.sum` before passing the hierarchy to the pack layout. - * You probably also want to call `root.sort` to order the hierarchy before computing the layout. - * - * @param root The specified root hierarchy. - */ - (root: HierarchyNode<Datum>): HierarchyCircularNode<Datum>; - - /** - * Returns the current radius accessor, which defaults to null. - */ - radius(): null | ((node: HierarchyCircularNode<Datum>) => number); - /** - * Sets the pack layout’s radius accessor to the specified function and returns this pack layout. - * If the radius accessor is null, the radius of each leaf circle is derived from the leaf `node.value` (computed by `node.sum`); - * the radii are then scaled proportionally to fit the layout size. - * If the radius accessor is not null, the radius of each leaf circle is specified exactly by the function. - * - * @param radius The specified radius accessor. - */ - radius(radius: null | ((node: HierarchyCircularNode<Datum>) => number)): this; - - /** - * Returns the current size, which defaults to [1, 1]. - */ - size(): [number, number]; - /** - * Sets this pack layout’s size to the specified [width, height] array and returns this pack layout. - * - * @param size The specified two-element size array. - */ - size(size: [number, number]): this; - - /** - * Returns the current padding accessor, which defaults to the constant zero. - */ - padding(): (node: HierarchyCircularNode<Datum>) => number; - /** - * Sets this pack layout’s padding accessor to the specified number and returns this pack layout. - * Returns the current padding accessor, which defaults to the constant zero. - * - * When siblings are packed, tangent siblings will be separated by approximately the specified padding; - * the enclosing parent circle will also be separated from its children by approximately the specified padding. - * If an explicit radius is not specified, the padding is approximate because a two-pass algorithm - * is needed to fit within the layout size: the circles are first packed without padding; - * a scaling factor is computed and applied to the specified padding; and lastly the circles are re-packed with padding. - * - * @param padding The specified padding value. - */ - padding(padding: number): this; - /** - * Sets this pack layout’s padding accessor to the specified function and returns this pack layout. - * Returns the current padding accessor, which defaults to the constant zero. - * - * When siblings are packed, tangent siblings will be separated by approximately the specified padding; - * the enclosing parent circle will also be separated from its children by approximately the specified padding. - * If an explicit radius is not specified, the padding is approximate because a two-pass algorithm - * is needed to fit within the layout size: the circles are first packed without padding; - * a scaling factor is computed and applied to the specified padding; and lastly the circles are re-packed with padding. - * - * @param padding The specified padding function. - */ - padding(padding: (node: HierarchyCircularNode<Datum>) => number): this; -} - -/** - * Creates a new pack layout with the default settings. - */ -export function pack<Datum>(): PackLayout<Datum>; - -// ----------------------------------------------------------------------- -// Pack Siblings and Enclosure -// ----------------------------------------------------------------------- - -export interface PackRadius { - /** - * The radius of the circle. - */ - r: number; - - /** - * The x-coordinate of the circle’s center. - */ - x?: number; - - /** - * The y-coordinate of the circle’s center. - */ - y?: number; -} - -export interface PackCircle { - /** - * The radius of the circle. - */ - r: number; - - /** - * The x-coordinate of the circle’s center. - */ - x: number; - - /** - * The y-coordinate of the circle’s center. - */ - y: number; -} - -// TODO: Since packSiblings manipulates the circles array in place, technically the x and y properties -// are optional on invocation, but will be created after execution for each entry. - -/** - * Packs the specified array of circles, each of which must have a `circle.r` property specifying the circle’s radius. - * The circles are positioned according to the front-chain packing algorithm by Wang et al. - * - * @param circles The specified array of circles to pack. - */ -export function packSiblings<Datum extends PackRadius>(circles: Datum[]): Array<Datum & PackCircle>; - -/** - * Computes the smallest circle that encloses the specified array of circles, each of which must have - * a `circle.r` property specifying the circle’s radius, and `circle.x` and `circle.y` properties specifying the circle’s center. - * The enclosing circle is computed using the MatouÅ¡ek-Sharir-Welzl algorithm. (See also Apollonius’ Problem.) - * - * @param circles The specified array of circles to pack. - */ -export function packEnclose<Datum extends PackCircle>(circles: Datum[]): PackCircle; diff --git a/node_modules/@types/d3-hierarchy/package.json b/node_modules/@types/d3-hierarchy/package.json deleted file mode 100644 index a553f6b763bfdc835e9ce199a589a769b1f5d4c8..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-hierarchy/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "@types/d3-hierarchy@^1", - "_id": "@types/d3-hierarchy@1.1.7", - "_inBundle": false, - "_integrity": "sha512-fvht6DOYKzqmXjMb/+xfgkmrWM4SD7rMA/ZbM+gGwr9ZTuIDfky95J8CARtaJo/ExeWyS0xGVdL2gqno2zrQ0Q==", - "_location": "/@types/d3-hierarchy", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-hierarchy@^1", - "name": "@types/d3-hierarchy", - "escapedName": "@types%2fd3-hierarchy", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-1.1.7.tgz", - "_shasum": "14a57b0539f8929015f8ad96490de50a16211040", - "_spec": "@types/d3-hierarchy@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-hierarchy module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-hierarchy", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-hierarchy" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "5529ade67720181b50407939710ccdc1d7fde22ef1798891bd50ac9e49330d10", - "version": "1.1.7" -} diff --git a/node_modules/@types/d3-interpolate/LICENSE b/node_modules/@types/d3-interpolate/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-interpolate/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-interpolate/README.md b/node_modules/@types/d3-interpolate/README.md deleted file mode 100644 index f848aed02275698aa02f59da363e11f4e5eaa855..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-interpolate/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-interpolate` - -# Summary -This package contains type definitions for D3JS d3-interpolate module (https://github.com/d3/d3-interpolate/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-interpolate/v1. - -### Additional Details - * Last updated: Thu, 01 Oct 2020 22:50:46 GMT - * Dependencies: [@types/d3-color](https://npmjs.com/package/@types/d3-color) - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-interpolate/index.d.ts b/node_modules/@types/d3-interpolate/index.d.ts deleted file mode 100644 index 2f406ba18d2ad2424d6c51ddc4c8d79de1aa010e..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-interpolate/index.d.ts +++ /dev/null @@ -1,339 +0,0 @@ -// Type definitions for D3JS d3-interpolate module 1.4 -// Project: https://github.com/d3/d3-interpolate/, https://d3js.org/d3-interpolate -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.4.0 - -import { ColorCommonInstance } from 'd3-color'; - -// --------------------------------------------------------------------------- -// Shared Type Definitions and Interfaces -// --------------------------------------------------------------------------- - -export interface ZoomInterpolator extends Function { - (t: number): ZoomView; - /** - * Recommended duration of zoom transition in milliseconds. - */ - duration: number; -} - -export interface ColorGammaInterpolationFactory extends Function { - (a: string | ColorCommonInstance, b: string | ColorCommonInstance): ((t: number) => string); - /** - * Returns a new interpolator factory of the same type using the specified *gamma*. - * For example, to interpolate from purple to orange with a gamma of 2.2 in RGB space: `d3.interpolateRgb.gamma(2.2)("purple", "orange")`. - * See Eric Brasseur’s article, [Gamma error in picture scaling](https://web.archive.org/web/20160112115812/http://www.4p8.com/eric.brasseur/gamma.html), for more on gamma correction. - */ - gamma(g: number): ColorGammaInterpolationFactory; -} - -/** - * Type zoomView is used to represent a numeric array with three elements. - * In order of appearance the elements correspond to: - * - cx: *x*-coordinate of the center of the viewport - * - cy: *y*-coordinate of the center of the viewport - * - width: size of the viewport - */ -export type ZoomView = [number, number, number]; - -export type TypedArray = - | Int8Array - | Uint8Array - | Int16Array - | Uint16Array - | Int32Array - | Uint32Array - | Uint8ClampedArray - | Float32Array - | Float64Array; - -export type NumberArray = TypedArray | DataView; - -// --------------------------------------------------------------------------- -// Interpolation Function Factories -// --------------------------------------------------------------------------- - -/** - * Returns an `null` constant interpolator. - */ -export function interpolate(a: any, b: null): ((t: number) => null); -/** - * Returns an boolean constant interpolator of value `b`. - */ -export function interpolate(a: any, b: boolean): ((t: number) => boolean); -/** - * Returns a `interpolateNumber` interpolator. - */ -export function interpolate(a: number | { valueOf(): number }, b: number): ((t: number) => number); -/** - * Returns a `interpolateRgb` interpolator. - */ -export function interpolate(a: string | ColorCommonInstance, b: ColorCommonInstance): ((t: number) => string); -/** - * Returns a `interpolateDate` interpolator. - */ -export function interpolate(a: Date, b: Date): ((t: number) => Date); -/** - * Returns a `interpolateNumberArray` interpolator. - */ -export function interpolate<T extends NumberArray>(a: NumberArray | number[], b: T): ((t: number) => T); -/** - * Returns a `interpolateString` interpolator. If `b` is a string coercible to a color use use `interpolateRgb`. - */ -export function interpolate(a: string | { toString(): string }, b: string): ((t: number) => string); -/** - * Returns a `interpolateArray` interpolator. - */ -export function interpolate<U extends any[]>(a: any[], b: U): ((t: number) => U); -/** - * Returns a `interpolateNumber` interpolator. - */ -export function interpolate(a: number | { valueOf(): number }, b: { valueOf(): number }): ((t: number) => number); -/** - * Returns a `interpolateObject` interpolator. - */ -export function interpolate<U extends object>(a: any, b: U): ((t: number) => U); - -/** - * Returns an interpolator between the two numbers `a` and `b`. - * The returned interpolator is equivalent to: `(t) => a * (1 - t) + b * t`. - */ -export function interpolateNumber(a: number | { valueOf(): number }, b: number | { valueOf(): number }): ((t: number) => number); - -/** - * Returns an interpolator between the two numbers `a` and `b`; the interpolator is similar to `interpolateNumber`, - * except it will round the resulting value to the nearest integer. - */ -export function interpolateRound(a: number | { valueOf(): number }, b: number | { valueOf(): number }): ((t: number) => number); - -/** - * Returns an interpolator between the two strings `a` and `b`. - * The string interpolator finds numbers embedded in `a` and `b`, where each number is of the form understood by JavaScript. - * A few examples of numbers that will be detected within a string: `-1`, `42`, `3.14159`, and `6.0221413e+23`. - * - * For each number embedded in `b`, the interpolator will attempt to find a corresponding number in `a`. - * If a corresponding number is found, a numeric interpolator is created using `interpolateNumber`. - * The remaining parts of the string `b` are used as a template. - * - * For example, if `a` is `"300 12px sans-serif"`, and `b` is `"500 36px Comic-Sans"`, two embedded numbers are found. - * The remaining static parts (of string `b`) are a space between the two numbers (`" "`), and the suffix (`"px Comic-Sans"`). - * The result of the interpolator at `t` = 0.5 is `"400 24px Comic-Sans"`. - */ -export function interpolateString(a: string | { toString(): string }, b: string | { toString(): string }): ((t: number) => string); - -/** - * Returns an interpolator between the two dates `a` and `b`. - * - * Note: *no defensive copy* of the returned date is created; the same Date instance is returned for every evaluation of the interpolator. - * No copy is made for performance reasons; interpolators are often part of the inner loop of animated transitions. - */ -export function interpolateDate(a: Date, b: Date): ((t: number) => Date); - -export type ArrayInterpolator<A extends any[]> = ((t: number) => A); - -/** - * Returns an interpolator between the two arrays `a` and `b`. Internally, an array template is created that is the same length in `b`. - * For each element in `b`, if there exists a corresponding element in `a`, a generic interpolator is created for the two elements using `interpolate`. - * If there is no such element, the static value from `b` is used in the template. - * Then, for the given parameter `t`, the template’s embedded interpolators are evaluated. The updated array template is then returned. - * - * For example, if `a` is the array `[0, 1]` and `b` is the array `[1, 10, 100]`, then the result of the interpolator for `t = 0.5` is the array `[0.5, 5.5, 100]`. - * - * Note: *no defensive copy* of the template array is created; modifications of the returned array may adversely affect subsequent evaluation of the interpolator. - * No copy is made for performance reasons; interpolators are often part of the inner loop of animated transitions. - */ -export function interpolateArray<A extends any[]>(a: any[], b: A): ArrayInterpolator<A>; -/** - * interpolateNumberArray is called - */ -export function interpolateArray<T extends NumberArray>(a: NumberArray | number[], b: T): ((t: number) => T); - -/** - * Returns an interpolator between the two arrays of numbers a and b. - * Internally, an array template is created that is the same type and length as b. - * For each element in b, if there exists a corresponding element in a, the values are directly interpolated in the array template. - * If there is no such element, the static value from b is copied. - * The updated array template is then returned. - * - * Note: For performance reasons, no defensive copy is made of the template array and the arguments a and b; modifications of these arrays may affect subsequent evaluation of the interpolator. - */ -export function interpolateNumberArray<T extends NumberArray | number[]>(a: NumberArray | number[], b: T): ((t: number) => T); - -/** - * Returns an interpolator between the two objects `a` and `b`. Internally, an object template is created that has the same properties as `b`. - * For each property in `b`, if there exists a corresponding property in `a`, a generic interpolator is created for the two elements using `interpolate`. - * If there is no such property, the static value from `b` is used in the template. - * Then, for the given parameter `t`, the template's embedded interpolators are evaluated and the updated object template is then returned. - * - * For example, if `a` is the object `{x: 0, y: 1}` and `b` is the object `{x: 1, y: 10, z: 100}`, the result of the interpolator for `t = 0.5` is the object `{x: 0.5, y: 5.5, z: 100}`. - * - * Note: *no defensive copy* of the template object is created; modifications of the returned object may adversely affect subsequent evaluation of the interpolator. - * No copy is made for performance reasons; interpolators are often part of the inner loop of animated transitions. - */ -export function interpolateObject<U extends object>(a: any, b: U): ((t: number) => U); - -/** - * Returns an interpolator between the two 2D CSS transforms represented by `a` and `b`. - * Each transform is decomposed to a standard representation of translate, rotate, *x*-skew and scale; these component transformations are then interpolated. - * This behavior is standardized by CSS: see [matrix decomposition for animation](http://www.w3.org/TR/css3-2d-transforms/#matrix-decomposition). - */ -export function interpolateTransformCss(a: string, b: string): ((t: number) => string); - -/** - * Returns an interpolator between the two 2D SVG transforms represented by `a` and `b`. - * Each transform is decomposed to a standard representation of translate, rotate, *x*-skew and scale; these component transformations are then interpolated. - * This behavior is standardized by CSS: see [matrix decomposition for animation](http://www.w3.org/TR/css3-2d-transforms/#matrix-decomposition). - */ -export function interpolateTransformSvg(a: string, b: string): ((t: number) => string); - -/** - * Returns an interpolator between the two views `a` and `b` of a two-dimensional plane, - * based on [“Smooth and efficient zooming and panningâ€](http://www.win.tue.nl/~vanwijk/zoompan.pdf). - * Each view is defined as an array of three numbers: *cx*, *cy* and *width*. - * The first two coordinates *cx*, *cy* represent the center of the viewport; the last coordinate *width* represents the size of the viewport. - * - * The returned interpolator exposes a *duration* property which encodes the recommended transition duration in milliseconds. - * This duration is based on the path length of the curved trajectory through *x,y* space. - * If you want to a slower or faster transition, multiply this by an arbitrary scale factor (*V* as described in the original paper). - */ -export function interpolateZoom(a: ZoomView, b: ZoomView): ZoomInterpolator; - -/** - * Returns a discrete interpolator for the given array of values. The returned interpolator maps `t` in `[0, 1 / n)` to values[0], - * `t` in `[1 / n, 2 / n)` to `values[1]`, and so on, where `n = values.length`. In effect, this is a lightweight quantize scale with a fixed domain of [0, 1]. - */ -export function interpolateDiscrete<T>(values: T[]): ((t: number) => T); - -// Sampling ------------------------------------------------------------------ - -/** - * Returns `n` uniformly-spaced samples from the specified `interpolator`, where `n` is an integer greater than one. - * The first sample is always at `t = 0`, and the last sample is always at `t = 1`. - * This can be useful in generating a fixed number of samples from a given interpolator, - * such as to derive the range of a [quantize scale](https://github.com/d3/d3-scale#quantize-scales) from a [continuous interpolator](https://github.com/d3/d3-scale#interpolateWarm). - * - * Caution: this method will not work with interpolators that do not return defensive copies of their output, - * such as `d3.interpolateArray`, `d3.interpolateDate` and `d3.interpolateObject`. For those interpolators, you must wrap the interpolator and create a copy for each returned value. - */ -export function quantize<T>(interpolator: ((t: number) => T), n: number): T[]; - -// Color Spaces - -/** - * Returns an RGB color space interpolator between the two colors `a` and `b` with a configurable gamma. If the gamma is not specified, it defaults to 1.0. - * The colors `a` and `b` need not be in RGB; they will be converted to RGB using [`d3.rgb`](https://github.com/d3/d3-color#rgb). The return value of the interpolator is an RGB string. - */ -export const interpolateRgb: ColorGammaInterpolationFactory; - -/** - * Returns a uniform nonrational B-spline interpolator through the specified array of *colors*, which are converted to RGB color space. - * Implicit control points are generated such that the interpolator returns `colors[0]` at `t = 0` and `colors[colors.length - 1]` at `t = 1`. - * Opacity interpolation is not currently supported. See also `d3.interpolateBasis`, and see [d3-scale-chromatic](https://github.com/d3/d3-scale-chromatic) for examples. - */ -export function interpolateRgbBasis(colors: Array<string | ColorCommonInstance>): ((t: number) => string); - -/** - * Returns a uniform nonrational B-spline interpolator through the specified array of colors, which are converted to RGB color space. - * The control points are implicitly repeated such that the resulting spline has cyclical C² continuity when repeated around `t` in [0,1]; - * this is useful, for example, to create cyclical color scales. Opacity interpolation is not currently supported. - * See also `d3.interpolateBasisClosed, and see [d3-scale-chromatic](https://github.com/d3/d3-scale-chromatic) for examples. - */ -export function interpolateRgbBasisClosed(colors: Array<string | ColorCommonInstance>): ((t: number) => string); - -/** - * Returns an HSL color space interpolator between the two colors *a* and *b*. The colors *a* and *b* need not be in HSL; - * they will be converted to HSL using `d3.hsl`. If either color’s hue or saturation is NaN, the opposing color’s channel value is used. - * The shortest path between hues is used. The return value of the interpolator is an RGB string. - */ -export function interpolateHsl(a: string | ColorCommonInstance, b: string | ColorCommonInstance): ((t: number) => string); - -/** - * Like `interpolateHsl`, but does not use the shortest path between hues. - */ -export function interpolateHslLong(a: string | ColorCommonInstance, b: string | ColorCommonInstance): ((t: number) => string); - -/** - * Returns a Lab color space interpolator between the two colors *a* and *b*. The colors *a* and *b* need not be in Lab; - * they will be converted to Lab using `d3.lab`. The return value of the interpolator is an RGB string. - */ -export function interpolateLab(a: string | ColorCommonInstance, b: string | ColorCommonInstance): ((t: number) => string); - -/** - * Returns an HCL color space interpolator between the two colors `a` and `b`. The colors `a` and `b` need not be in HCL; - * they will be converted to HCL using `d3.hcl`. If either color’s hue or chroma is NaN, the opposing color’s channel value is used. - * The shortest path between hues is used. The return value of the interpolator is an RGB string. - */ -export function interpolateHcl(a: string | ColorCommonInstance, b: string | ColorCommonInstance): ((t: number) => string); - -/** - * Like `interpolateHcl`, but does not use the shortest path between hues. - */ -export function interpolateHclLong(a: string | ColorCommonInstance, b: string | ColorCommonInstance): ((t: number) => string); - -/** - * Returns a Cubehelix color space interpolator between the two colors `a` and `b` using a configurable `gamma`. - * If the gamma is not specified, it defaults to 1.0. The colors `a` and `b` need not be in Cubehelix; - * they will be converted to Cubehelix using [`d3.cubehelix`](https://github.com/d3/d3-color#cubehelix). - * If either color’s hue or saturation is NaN, the opposing color’s channel value is used. The shortest path between hues is used. The return value of the interpolator is an RGB string. - */ -export const interpolateCubehelix: ColorGammaInterpolationFactory; - -/** - * Like `interpolateCubehelix`, but does not use the shortest path between hues. - */ -export const interpolateCubehelixLong: ColorGammaInterpolationFactory; - -/** - * Returns an interpolator between the two hue angles `a` and `b`. If either hue is NaN, the opposing value is used. - * The shortest path between hues is used. The return value of the interpolator is a number in `[0, 360)`. - */ -export function interpolateHue(a: number, b: number): ((t: number) => number); - -// Splines ------------------------------------------------------------------- - -/** - * Returns a uniform nonrational B-spline interpolator through the specified array of `values`, which must be numbers. - * Implicit control points are generated such that the interpolator returns `values[0]` at `t` = 0 and `values[values.length - 1]` at `t` = 1. - * See also [`d3.curveBasis`](https://github.com/d3/d3-shape#curveBasis). - */ -export function interpolateBasis(splineNodes: number[]): ((t: number) => number); - -/** - * Returns a uniform nonrational B-spline interpolator through the specified array of `values`, which must be numbers. - * The control points are implicitly repeated such that the resulting one-dimensional spline has cyclical C² continuity when repeated around `t` in [0,1]. - * See also [`d3.curveBasisClosed`](https://github.com/d3/d3-shape#curveBasisClosed). - */ -export function interpolateBasisClosed(splineNodes: number[]): ((t: number) => number); - -// Piecewise ----------------------------------------------------------------- - -/** - * Returns a piecewise zoom interpolator, composing zoom interpolators for each adjacent pair of zoom view. - * The returned interpolator maps `t` in `[0, 1 / (n - 1)]` to `interpolate(values[0], values[1])`, `t` in `[1 / (n - 1), 2 / (n - 1)]` to `interpolate(values[1], values[2])`, - * and so on, where `n = values.length`. In effect, this is a lightweight linear scale. - * For example, to blend through three different zoom views: `d3.piecewise(d3.interpolateZoom, [[0, 0, 1], [0, 0, 10], [0, 0, 15]])`. - */ -export function piecewise(interpolate: (a: ZoomView, b: ZoomView) => ZoomInterpolator, values: ZoomView[]): ZoomInterpolator; - -/** - * Returns a piecewise array interpolator, composing array interpolators for each adjacent pair of arrays. - * The returned interpolator maps `t` in `[0, 1 / (n - 1)]` to `interpolate(values[0], values[1])`, `t` in `[1 / (n - 1), 2 / (n - 1)]` to `interpolate(values[1], values[2])`, - * and so on, where `n = values.length`. In effect, this is a lightweight linear scale. - * For example, to blend through three different arrays: `d3.piecewise(d3.interpolateArray, [[0, 0, 1], [0, 0, 10], [0, 0, 15]])`. - */ -export function piecewise<A extends any[]>(interpolate: (a: any[], b: A) => ArrayInterpolator<A>, values: A[]): ArrayInterpolator<A>; - -/** - * Returns a piecewise interpolator, composing interpolators for each adjacent pair of values. - * The returned interpolator maps `t` in `[0, 1 / (n - 1)]` to `interpolate(values[0], values[1])`, `t` in `[1 / (n - 1), 2 / (n - 1)]` to `interpolate(values[1], values[2])`, - * and so on, where `n = values.length`. In effect, this is a lightweight linear scale. - * For example, to blend through red, green and blue: `d3.piecewise(d3.interpolateRgb.gamma(2.2), ["red", "green", "blue"])`. - */ -export function piecewise<TData, Interpolator>(interpolate: (a: TData, b: TData) => Interpolator, values: TData[]): (t: number) => any; diff --git a/node_modules/@types/d3-interpolate/package.json b/node_modules/@types/d3-interpolate/package.json deleted file mode 100644 index 15eddabd50d72b8e781d5864134953b61cbdbd46..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-interpolate/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_from": "@types/d3-interpolate@^1", - "_id": "@types/d3-interpolate@1.4.2", - "_inBundle": false, - "_integrity": "sha512-ylycts6llFf8yAEs1tXzx2loxxzDZHseuhPokrqKprTQSTcD3JbJI1omZP1rphsELZO3Q+of3ff0ZS7+O6yVzg==", - "_location": "/@types/d3-interpolate", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-interpolate@^1", - "name": "@types/d3-interpolate", - "escapedName": "@types%2fd3-interpolate", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3", - "/@types/d3-zoom" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-1.4.2.tgz", - "_shasum": "88902a205f682773a517612299a44699285eed7b", - "_spec": "@types/d3-interpolate@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": { - "@types/d3-color": "^1" - }, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-interpolate module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-interpolate", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-interpolate" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "f9c99f31f2c51b5a61886d5d876b93ee19364914515acdcc8c3c1158cc9099bb", - "version": "1.4.2" -} diff --git a/node_modules/@types/d3-path/LICENSE b/node_modules/@types/d3-path/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-path/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-path/README.md b/node_modules/@types/d3-path/README.md deleted file mode 100644 index 80c424e7ce768134ef72979513679de194fbfb9f..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-path/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-path` - -# Summary -This package contains type definitions for D3JS d3-path module (https://github.com/d3/d3-path/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-path/v1. - -### Additional Details - * Last updated: Tue, 29 Sep 2020 22:54:46 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-path/index.d.ts b/node_modules/@types/d3-path/index.d.ts deleted file mode 100644 index 1c1facc1e9cbbd791feb9319d73b576c0f87ffa4..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-path/index.d.ts +++ /dev/null @@ -1,109 +0,0 @@ -// Type definitions for D3JS d3-path module 1.0 -// Project: https://github.com/d3/d3-path/, https://d3js.org/d3-path -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// Last module patch version validated against: 1.0.9 - -/** - * A D3 path serializer implementing CanvasPathMethods - */ -export interface Path { - /** - * Move to the specified point ⟨x, y⟩. Equivalent to context.moveTo and SVG’s “moveto†command. - * - * @param x x-Coordinate of point to move to - * @param y y-Coordinate of point to move to - */ - moveTo(x: number, y: number): void; - - /** - * Ends the current subpath and causes an automatic straight line to be drawn from the current point to the initial point of the current subpath. - * Equivalent to context.closePath and SVG’s “closepath†command. - */ - closePath(): void; - - /** - * Draws a straight line from the current point to the specified point ⟨x, y⟩. - * Equivalent to context.lineTo and SVG’s “lineto†command. - * - * @param x x-Coordinate of point to draw the line to - * @param y y-Coordinate of point to draw the line to - */ - lineTo(x: number, y: number): void; - - /** - * Draws a quadratic Bézier segment from the current point to the specified point ⟨x, y⟩, with the specified control point ⟨cpx, cpy⟩. - * Equivalent to context.quadraticCurveTo and SVG’s quadratic Bézier curve commands. - * - * @param cpx x-Coordinate of the control point for the quadratic Bézier curve - * @param cpy y-Coordinate of the control point for the quadratic Bézier curve - * @param x x-Coordinate of point to draw the curve to - * @param y y-Coordinate of point to draw the curve to - */ - quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; - - /** - * Draws a cubic Bézier segment from the current point to the specified point ⟨x, y⟩, with the specified control points ⟨cpx1, cpy1⟩ and ⟨cpx2, cpy2⟩. - * Equivalent to context.bezierCurveTo and SVG’s cubic Bézier curve commands. - * - * @param cpx1 x-Coordinate of the first control point for the Bézier curve - * @param cpy1 y-Coordinate of the first control point for the Bézier curve - * @param cpx2 x-Coordinate of the second control point for the Bézier curve - * @param cpy2 y-Coordinate of the second control point for the Bézier curve - * @param x x-Coordinate of point to draw the curve to - * @param y y-Coordinate of point to draw the curve to - */ - bezierCurveTo(cpx1: number, cpy1: number, cpx2: number, cpy2: number, x: number, y: number): void; - - /** - * Draws a circular arc segment with the specified radius that starts tangent to the line between the current point and the specified point ⟨x1, y1⟩ - * and ends tangent to the line between the specified points ⟨x1, y1⟩ and ⟨x2, y2⟩. If the first tangent point is not equal to the current point, - * a straight line is drawn between the current point and the first tangent point. Equivalent to context.arcTo and uses SVG’s elliptical arc curve commands. - * - * @param x1 x-Coordinate of the first tangent point - * @param y1 y-Coordinate of the first tangent point - * @param x2 x-Coordinate of the second tangent point - * @param y2 y-Coordinate of the second tangent point - * @param r Radius of the arc segment - */ - arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; - - /** - * Draws a circular arc segment with the specified center ⟨x, y⟩, radius, startAngle and endAngle. If anticlockwise is true, - * the arc is drawn in the anticlockwise direction; otherwise, it is drawn in the clockwise direction. - * If the current point is not equal to the starting point of the arc, a straight line is drawn from the current point to the start of the arc. - * Equivalent to context.arc and uses SVG’s elliptical arc curve commands. - * - * @param x x-Coordinate of the center point of the arc segment - * @param y y-Coordinate of the center point of the arc segment - * @param startAngle Start angle of arc segment - * @param endAngle End angle of arc segment - * @param anticlockwise Flag indicating directionality (true = anti-clockwise, false = clockwise) - */ - arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; - - /** - * Creates a new subpath containing just the four points ⟨x, y⟩, ⟨x + w, y⟩, ⟨x + w, y + h⟩, ⟨x, y + h⟩, - * with those four points connected by straight lines, and then marks the subpath as closed. Equivalent to context.rect and uses SVG’s “lineto†commands. - * - * @param x x-Coordinate of starting point for drawing the rectangle - * @param y y-Coordinate of starting point for drawing the rectangle - * @param w Width of rectangle - * @param h Height of rectangle - */ - rect(x: number, y: number, w: number, h: number): void; - - /** - * Returns the string representation of this path according to SVG’s path data specification. - */ - toString(): string; -} - -/** - * Construct a D3 Path serializer - */ -export function path(): Path; diff --git a/node_modules/@types/d3-path/package.json b/node_modules/@types/d3-path/package.json deleted file mode 100644 index 6c36fc0ef06554528f76ab2dd9641b182b8c63e1..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-path/package.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "_from": "@types/d3-path@^1", - "_id": "@types/d3-path@1.0.9", - "_inBundle": false, - "_integrity": "sha512-NaIeSIBiFgSC6IGUBjZWcscUJEq7vpVu7KthHN8eieTV9d9MqkSOZLH4chq1PmcKy06PNe3axLeKmRIyxJ+PZQ==", - "_location": "/@types/d3-path", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-path@^1", - "name": "@types/d3-path", - "escapedName": "@types%2fd3-path", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3", - "/@types/d3-shape" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-1.0.9.tgz", - "_shasum": "73526b150d14cd96e701597cbf346cfd1fd4a58c", - "_spec": "@types/d3-path@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-path module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-path", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-path" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "812d4aa372c835aa1f5e6f30e0119ce014ea5c2f42fe6dd3b0fcfc5ec97d6d38", - "version": "1.0.9" -} diff --git a/node_modules/@types/d3-polygon/LICENSE b/node_modules/@types/d3-polygon/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-polygon/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-polygon/README.md b/node_modules/@types/d3-polygon/README.md deleted file mode 100644 index 86ed7a8e1a03d49485572cd06d314e916ec3b315..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-polygon/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-polygon` - -# Summary -This package contains type definitions for D3JS d3-polygon module (https://github.com/d3/d3-polygon/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-polygon/v1. - -### Additional Details - * Last updated: Tue, 29 Sep 2020 22:54:47 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-polygon/index.d.ts b/node_modules/@types/d3-polygon/index.d.ts deleted file mode 100644 index 7bda8c045b27ee6a594f8a1613108bd4c61e600d..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-polygon/index.d.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Type definitions for D3JS d3-polygon module 1.0 -// Project: https://github.com/d3/d3-polygon/, https://d3js.org/d3-polygon -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// Last module patch version validated against: 1.0.6 - -/** - * Returns the signed area of the specified polygon. If the vertices of the polygon are in counterclockwise order - * (assuming a coordinate system where the origin <0,0> is in the top-left corner), the returned area is positive; - * otherwise it is negative, or zero. - * - * @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on. - */ -export function polygonArea(polygon: Array<[number, number]>): number; - -/** - * Returns the centroid of the specified polygon. - * - * @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on. - */ -export function polygonCentroid(polygon: Array<[number, number]>): [number, number]; - -/** - * Returns the convex hull of the specified points using Andrew’s monotone chain algorithm. - * The returned hull is represented as an array containing a subset of the input points arranged in - * counterclockwise order. Returns null if points has fewer than three elements. - * - * @param points Array of coordinates <x0, y0>, <x1, y1> and so on. - */ -export function polygonHull(points: Array<[number, number]>): Array<[number, number]> | null; - -/** - * Returns true if and only if the specified point is inside the specified polygon. - * - * @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on. - * @param point Coordinates of point <x, y>. - */ -export function polygonContains(polygon: Array<[number, number]>, point: [number, number]): boolean; - -/** - * Returns the length of the perimeter of the specified polygon. - * - * @param polygon Array of coordinates <x0, y0>, <x1, y1> and so on. - */ -export function polygonLength(polygon: Array<[number, number]>): number; diff --git a/node_modules/@types/d3-polygon/package.json b/node_modules/@types/d3-polygon/package.json deleted file mode 100644 index d4fd3afd3a2e0e82b35fc0d2e1ed054689a7bc10..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-polygon/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "@types/d3-polygon@^1", - "_id": "@types/d3-polygon@1.0.8", - "_inBundle": false, - "_integrity": "sha512-1TOJPXCBJC9V3+K3tGbTqD/CsqLyv/YkTXAcwdsZzxqw5cvpdnCuDl42M4Dvi8XzMxZNCT9pL4ibrK2n4VmAcw==", - "_location": "/@types/d3-polygon", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-polygon@^1", - "name": "@types/d3-polygon", - "escapedName": "@types%2fd3-polygon", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-1.0.8.tgz", - "_shasum": "127ee83fccda5bf57384011da90f31367fea1530", - "_spec": "@types/d3-polygon@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-polygon module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-polygon", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-polygon" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "d31fa81dac1b4b1e8697b565f277e9596934771d2c101d64623cd4a35c2e85e4", - "version": "1.0.8" -} diff --git a/node_modules/@types/d3-quadtree/LICENSE b/node_modules/@types/d3-quadtree/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-quadtree/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-quadtree/README.md b/node_modules/@types/d3-quadtree/README.md deleted file mode 100644 index 1be480a5f5f6d3d5d76775e410558f7bbca44dda..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-quadtree/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-quadtree` - -# Summary -This package contains type definitions for D3JS d3-quadtree module (https://github.com/d3/d3-quadtree/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-quadtree/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 21:08:23 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-quadtree/index.d.ts b/node_modules/@types/d3-quadtree/index.d.ts deleted file mode 100644 index 193e9e47f7c4935dc8dc1ca624a4ecc968cb6591..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-quadtree/index.d.ts +++ /dev/null @@ -1,209 +0,0 @@ -// Type definitions for D3JS d3-quadtree module 1.0 -// Project: https://github.com/d3/d3-quadtree/, https://d3js.org/d3-quadtree -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.0.7 - -/** - * Leaf node of the quadtree. - */ -export interface QuadtreeLeaf<T> { - /** - * The data associated with this point, as passed to quadtree.add. - */ - data: T; - - /** - * The next datum in this leaf, if any. - */ - next?: QuadtreeLeaf<T>; - - /** - * The length property may be used to distinguish leaf nodes from internal nodes: it is undefined for leaf nodes, and 4 for internal nodes. - */ - length?: undefined; -} - -/** - * Internal nodes of the quadtree are represented as four-element arrays in left-to-right, top-to-bottom order: - * - * 0 - the top-left quadrant, if any. - * 1 - the top-right quadrant, if any. - * 2 - the bottom-left quadrant, if any. - * 3 - the bottom-right quadrant, if any. - * - * A child quadrant may be undefined if it is empty. - */ -export interface QuadtreeInternalNode<T> extends Array<QuadtreeInternalNode<T> | QuadtreeLeaf<T> | undefined> { - /** - * The length property may be used to distinguish leaf nodes from internal nodes: it is undefined for leaf nodes, and 4 for internal nodes. - */ - length: 4; -} - -export interface Quadtree<T> { - /** - * Returns the current x-accessor, which defaults to: `x(d) => d[0]`. - */ - x(): (d: T) => number; - /** - * Sets the current x-coordinate accessor and returns the quadtree. - * The x-accessors must be consistent, returning the same value given the same input. - * - * @param x The x-coordinate accessor. - */ - x(x: (d: T) => number): this; - - /** - * Returns the current y-accessor, which defaults to: `y(d) => d[1]`. - */ - y(): (d: T) => number; - /** - * Sets the current y-coordinate accessor and returns the quadtree. - * The y-accessors must be consistent, returning the same value given the same input. - * - * @param y The y-coordinate accessor. - */ - y(y: (d: T) => number): this; - - /** - * Returns the quadtree's current extent `[[x0, y0], [x1, y1]]`, - * where `x0` and `y0` are the inclusive lower bounds and `x1` and `y1` are the inclusive upper bounds, - * or `undefined` if the quadtree has no extent. - */ - extent(): [[number, number], [number, number]] | undefined; - /** - * Expands the quadtree to cover the specified points `[[x0, y0], [x1, y1]]` and returns the quadtree. - * The extent may also be expanded by calling `quadtree.cover` or `quadtree.add`. - * - * @param extend The specified points to cover. - */ - extent(extend: [[number, number], [number, number]]): this; - - /** - * Expands the quadtree to cover the specified point ⟨x,y⟩, and returns the quadtree. - * * If the quadtree’s extent already covers the specified point, this method does nothing. - * * If the quadtree has an extent, the extent is repeatedly doubled to cover the specified point, wrapping the root node as necessary. - * * If the quadtree is empty, the extent is initialized to the extent `[[⌊x⌋, ⌊y⌋], [⌈x⌉, ⌈y⌉]]`. - * Rounding is necessary such that if the extent is later doubled, the boundaries of existing quadrants do not change due to floating point error. - * - * @param x The x-coordinate for the specified point to cover. - * @param y The y-coordinate for the specified point to cover. - */ - cover(x: number, y: number): this; - - /** - * Adds the specified datum to the quadtree, deriving its coordinates ⟨x,y⟩ using the current x- and y-accessors, and returns the quadtree. - * If the new point is outside the current extent of the quadtree, the quadtree is automatically expanded to cover the new point. - * - * @param datum The specified datum to add. - */ - add(datum: T): this; - - /** - * Adds the specified array of data to the quadtree, deriving each element’s coordinates ⟨x,y⟩ using the current x- and y-accessors, and return this quadtree. - * This is approximately equivalent to calling quadtree.add repeatedly. - * However, this method results in a more compact quadtree because the extent of the data is computed first before adding the data. - * - * @param data The specified array of data to add. - */ - addAll(data: T[]): this; - - /** - * Removes the specified datum to the quadtree, deriving its coordinates ⟨x,y⟩ using the current x- and y-accessors, and returns the quadtree. - * If the specified datum does not exist in this quadtree, this method does nothing. - * - * @param datum The specified datum to remove. - */ - remove(datum: T): this; - - /** - * Removes the specified data to the quadtree, deriving their coordinates ⟨x,y⟩ using the current x- and y-accessors, and returns the quadtree. - * If a specified datum does not exist in this quadtree, it is ignored. - * - * @param data The specified array of data to remove. - */ - removeAll(data: T[]): this; - - /** - * Returns a copy of the quadtree. All nodes in the returned quadtree are identical copies of the corresponding node in the quadtree; - * however, any data in the quadtree is shared by reference and not copied. - */ - copy(): Quadtree<T>; - - /** - * Returns the root node of the quadtree. - */ - root(): QuadtreeInternalNode<T> | QuadtreeLeaf<T>; - - /** - * Returns an array of all data in the quadtree. - */ - data(): T[]; - - /** - * Returns the total number of data in the quadtree. - */ - size(): number; - - /** - * Returns the datum closest to the position ⟨x,y⟩ with the given search radius. If radius is not specified, it defaults to infinity. - * If there is no datum within the search area, returns undefined. - * - * @param x The x-coordinate for the search position. - * @param y The y-coordinate for the search position. - * @param radius The optional search radius. - */ - find(x: number, y: number, radius?: number): T | undefined; - - /** - * Visits each node in the quadtree in pre-order traversal, invoking the specified callback with arguments `node`, `x0`, `y0`, `x1`, `y1` for each node, - * where `node` is the node being visited, ⟨x0, y0⟩ are the lower bounds of the node, and ⟨x1, y1⟩ are the upper bounds, and returns the quadtree. - * - * If the callback returns true for a given node, then the children of that node are not visited; otherwise, all child nodes are visited. - * This can be used to quickly visit only parts of the tree. - * Note, however, that child quadrants are always visited in sibling order: top-left, top-right, bottom-left, bottom-right. - * In cases such as search, visiting siblings in a specific order may be faster. - * - * @param callback The callback invoked for each node. - */ - visit(callback: (node: QuadtreeInternalNode<T> | QuadtreeLeaf<T>, x0: number, y0: number, x1: number, y1: number) => void | boolean): this; - - /** - * Visits each node in the quadtree in post-order traversal, invoking the specified callback with arguments `node`, `x0`, `y0`, `x1`, `y1` for each node, - * where `node` is the node being visited, ⟨x0, y0⟩ are the lower bounds of the node, and ⟨x1, y1⟩ are the upper bounds, and returns the quadtree. - * - * @param callback The callback invoked for each node. - */ - visitAfter(callback: (node: QuadtreeInternalNode<T> | QuadtreeLeaf<T>, x0: number, y0: number, x1: number, y1: number) => void): this; -} - -/** - * Creates a new, empty quadtree with an empty extent and the default x- and y-accessors. - * - * The generic refers to the data type. If omitted, the default setting assumes that, - * the data used with the quadtree are two-element arrays. - * The first element corresponds to the x-dimension, the second to the y-dimension. - * When using another type, The x- and y-accessors must be specified. - */ -export function quadtree<T = [number, number]>(): Quadtree<T>; -/** - * Creates a new quadtree with the specified array of data. - * If `x` and `y` are also specified, sets the x- and y- accessors to the specified functions before adding the specified array of data to the quadtree, otherwise use the default x- and y-accessors. - * - * The generic refers to the data type. If omitted, the default setting assumes that, - * the data used with the quadtree are two-element arrays. - * The first element corresponds to the x-dimension, the second to the y-dimension. - * When using another type, The x- and y-accessors must be specified. - * - * @param data The specified array of data to add. - * @param x The x-coordinate accessor. - * @param y The y-coordinate accessor. - */ -export function quadtree<T = [number, number]>(data: T[], x?: (d: T) => number, y?: (d: T) => number): Quadtree<T>; diff --git a/node_modules/@types/d3-quadtree/package.json b/node_modules/@types/d3-quadtree/package.json deleted file mode 100644 index 2ebb8c5db6a773251795efd25d11b29982683018..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-quadtree/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "@types/d3-quadtree@^1", - "_id": "@types/d3-quadtree@1.0.8", - "_inBundle": false, - "_integrity": "sha512-FuqYiexeSQZlc+IcGAVK8jSJKDFKHcSf/jx8rqJUUVx6rzv7ecQiXKyatrLHHh3W4CAvgNeVI23JKgk4+x2wFg==", - "_location": "/@types/d3-quadtree", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-quadtree@^1", - "name": "@types/d3-quadtree", - "escapedName": "@types%2fd3-quadtree", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-1.0.8.tgz", - "_shasum": "980998eb20d5e1c1494089ad9a8466a0e98825a7", - "_spec": "@types/d3-quadtree@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-quadtree module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-quadtree", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-quadtree" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "4969363e3f6607338022433e9b064e78eef9e690a8f370d62ee5c181b50642b3", - "version": "1.0.8" -} diff --git a/node_modules/@types/d3-random/LICENSE b/node_modules/@types/d3-random/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-random/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-random/README.md b/node_modules/@types/d3-random/README.md deleted file mode 100644 index be8a33242ab0b88eb77543d4db3c54f73756bcfd..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-random/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-random` - -# Summary -This package contains type definitions for D3JS d3-random module (https://github.com/d3/d3-random/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-random/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 20:01:30 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-random/index.d.ts b/node_modules/@types/d3-random/index.d.ts deleted file mode 100644 index d53ed0b861a9d74fdf86e64e5a6cfbd8dce57c89..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-random/index.d.ts +++ /dev/null @@ -1,115 +0,0 @@ -// Type definitions for D3JS d3-random module 1.1 -// Project: https://github.com/d3/d3-random/, https://d3js.org/d3-random -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// Last module patch version validated against: 1.1.2 - -export interface RandomNumberGenerationSource { - /** - * Returns the same type of function for generating random numbers but where the given random number - * generator source is used as the source of randomness instead of Math.random. - * This is useful when a seeded random number generator is preferable to Math.random. - * - * @param source Source (pseudo-)random number generator implementing the Math.random interface. - * The given random number generator must implement the same interface as Math.random and - * only return values in the range [0, 1). - */ - source(source: () => number): this; -} - -/** - * A configurable random number generator for the uniform distribution. - */ -export interface RandomUniform extends RandomNumberGenerationSource { - /** - * Returns a function for generating random numbers with a uniform distribution). - * The minimum allowed value of a returned number is min, and the maximum is max. - * If min is not specified, it defaults to 0; if max is not specified, it defaults to 1. - * - * @param min The minimum allowed value of a returned number, defaults to 0. - * @param max The maximum allowed value of a returned number, defaults to 1. - */ - (min?: number, max?: number): () => number; -} - -export const randomUniform: RandomUniform; - -/** - * A configurable random number generator for the normal (Gaussian) distribution. - */ -export interface RandomNormal extends RandomNumberGenerationSource { - /** - * Returns a function for generating random numbers with a normal (Gaussian) distribution. - * The expected value of the generated numbers is mu, with the given standard deviation sigma. - * If mu is not specified, it defaults to 0; if sigma is not specified, it defaults to 1. - * - * @param mu Expected value, defaults to 0. - * @param sigma Standard deviation, defaults to 1. - */ - (mu?: number, sigma?: number): () => number; -} - -export const randomNormal: RandomNormal; - -/** - * A configurable random number generator for the log-normal distribution. - */ -export interface RandomLogNormal extends RandomNumberGenerationSource { - /** - * Returns a function for generating random numbers with a log-normal distribution. The expected value of the random variable’s natural logarithm is mu, - * with the given standard deviation sigma. If mu is not specified, it defaults to 0; if sigma is not specified, it defaults to 1. - * - * @param mu Expected value, defaults to 0. - * @param sigma Standard deviation, defaults to 1. - */ - (mu?: number, sigma?: number): () => number; -} - -export const randomLogNormal: RandomLogNormal; - -/** - * A configurable random number generator for the Bates distribution. - */ -export interface RandomBates extends RandomNumberGenerationSource { - /** - * Returns a function for generating random numbers with a Bates distribution with n independent variables. - * - * @param n Number of independent random variables to use. - */ - (n: number): () => number; -} - -export const randomBates: RandomBates; - -/** - * A configurable random number generator for the Irwin–Hall distribution. - */ -export interface RandomIrwinHall extends RandomNumberGenerationSource { - /** - * Returns a function for generating random numbers with an Irwin–Hall distribution with n independent variables. - * - * @param n Number of independent random variables to use. - */ - (n: number): () => number; -} - -export const randomIrwinHall: RandomIrwinHall; - -/** - * A configurable random number generator for the exponential distribution. - */ -export interface RandomExponential extends RandomNumberGenerationSource { - /** - * Returns a function for generating random numbers with an exponential distribution with the rate lambda; - * equivalent to time between events in a Poisson process with a mean of 1 / lambda. - * - * @param lambda Expected time between events. - */ - (lambda: number): () => number; -} - -export const randomExponential: RandomExponential; diff --git a/node_modules/@types/d3-random/package.json b/node_modules/@types/d3-random/package.json deleted file mode 100644 index c3727645efebb0f95825ea92d78c4a53417e0ea4..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-random/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "@types/d3-random@^1", - "_id": "@types/d3-random@1.1.3", - "_inBundle": false, - "_integrity": "sha512-XXR+ZbFCoOd4peXSMYJzwk0/elP37WWAzS/DG+90eilzVbUSsgKhBcWqylGWe+lA2ubgr7afWAOBaBxRgMUrBQ==", - "_location": "/@types/d3-random", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-random@^1", - "name": "@types/d3-random", - "escapedName": "@types%2fd3-random", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-1.1.3.tgz", - "_shasum": "8f7fdc23f92d1561e0694eb49567e8ab50537a19", - "_spec": "@types/d3-random@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-random module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-random", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-random" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "1bf6b0a1a4d8885a2eea9f1b6632d82e176b4b967af7195f678e159a370e64ed", - "version": "1.1.3" -} diff --git a/node_modules/@types/d3-scale-chromatic/LICENSE b/node_modules/@types/d3-scale-chromatic/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-scale-chromatic/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-scale-chromatic/README.md b/node_modules/@types/d3-scale-chromatic/README.md deleted file mode 100644 index 0305d7bca3c37a85c6441e45315470e4ee387362..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-scale-chromatic/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-scale-chromatic` - -# Summary -This package contains type definitions for D3JS d3-scale-chromatic module (https://github.com/d3/d3-scale-chromatic/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-scale-chromatic/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 00:21:15 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Hugues Stefanski](https://github.com/Ledragon), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [Henrique Machado](https://github.com/henriquefm), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-scale-chromatic/index.d.ts b/node_modules/@types/d3-scale-chromatic/index.d.ts deleted file mode 100644 index 2095710d4737bb8c4f1d45cd7fc62a22ee4b2992..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-scale-chromatic/index.d.ts +++ /dev/null @@ -1,525 +0,0 @@ -// Type definitions for D3JS d3-scale-chromatic module 1.5 -// Project: https://github.com/d3/d3-scale-chromatic/, https://d3js.org/d3-scale-chromatic -// Definitions by: Hugues Stefanski <https://github.com/Ledragon> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// Henrique Machado <https://github.com/henriquefm> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// Last module patch version validated against: 1.5.0 - -// ----------------------------------------------------------------------- -// Categorical -// ----------------------------------------------------------------------- -/** - * An array of ten categorical colors represented as RGB hexadecimal strings. - */ -export const schemeCategory10: ReadonlyArray<string>; -/** - * An array of eight categorical colors represented as RGB hexadecimal strings. - */ -export const schemeAccent: ReadonlyArray<string>; -/** - * An array of eight categorical colors represented as RGB hexadecimal strings. - */ -export const schemeDark2: ReadonlyArray<string>; -/** - * An array of twelve categorical colors represented as RGB hexadecimal strings. - */ -export const schemePaired: ReadonlyArray<string>; -/** - * An array of nine categorical colors represented as RGB hexadecimal strings. - */ -export const schemePastel1: ReadonlyArray<string>; -/** - * An array of eight categorical colors represented as RGB hexadecimal strings. - */ -export const schemePastel2: ReadonlyArray<string>; -/** - * An array of nine categorical colors represented as RGB hexadecimal strings. - */ -export const schemeSet1: ReadonlyArray<string>; -/** - * An array of eight categorical colors represented as RGB hexadecimal strings. - */ -export const schemeSet2: ReadonlyArray<string>; -/** - * An array of twelve categorical colors represented as RGB hexadecimal strings. - */ -export const schemeSet3: ReadonlyArray<string>; -/** - * An array of ten categorical colors authored by Tableau as part of Tableau 10 represented as RGB hexadecimal strings. - */ -export const schemeTableau10: ReadonlyArray<string>; - -// ----------------------------------------------------------------------- -// Diverging -// ----------------------------------------------------------------------- -/** - * Given a number t in the range [0,1], returns the corresponding color from the “BrBG†diverging color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateBrBG(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “BrBG†diverging color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeBrBG[9] contains an array of nine strings representing the nine colors of the - * brown-blue-green diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. - */ -export const schemeBrBG: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “PRGn†diverging color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolatePRGn(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “PRGn†diverging color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemePRGn[9] contains an array of nine strings representing the nine colors of the - * purple-green diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. - */ -export const schemePRGn: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “PiYG†diverging color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolatePiYG(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “PiYG†diverging color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemePiYG[9] contains an array of nine strings representing the nine colors of the - * pink-yellow-green diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. - */ -export const schemePiYG: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “PuOr†diverging color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolatePuOr(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “PuOr†diverging color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemePuOr[9] contains an array of nine strings representing the nine colors of the - * purple-orange diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. - */ -export const schemePuOr: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “RdBu†diverging color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateRdBu(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “RdBu†diverging color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeRdBu[9] contains an array of nine strings representing the nine colors of the - * red-blue diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. - */ -export const schemeRdBu: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “RdGy†diverging color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateRdGy(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “RdGy†diverging color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeRdGy[9] contains an array of nine strings representing the nine colors of the - * red-grey diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. - */ -export const schemeRdGy: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “RdYlBu†diverging color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateRdYlBu(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “RdYlBu†diverging color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeRdYlBu[9] contains an array of nine strings representing the nine colors of the - * red-yellow-blue diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. - */ -export const schemeRdYlBu: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “RdYlGn†diverging color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateRdYlGn(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “RdYlGn†diverging color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeRdYlGn[9] contains an array of nine strings representing the nine colors of the - * red-yellow-green diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. - */ -export const schemeRdYlGn: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “Spectral†diverging color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateSpectral(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “Spectral†diverging color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeSpectral[9] contains an array of nine strings representing the nine colors of the - * spectral diverging color scheme. Diverging color schemes support a size k ranging from 3 to 11. - */ -export const schemeSpectral: ReadonlyArray<ReadonlyArray<string>>; - -// ----------------------------------------------------------------------- -// Sequential -// ----------------------------------------------------------------------- -/** - * Given a number t in the range [0,1], returns the corresponding color from the “Blues†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateBlues(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “Blues†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeBlues[9] contains an array of nine strings representing the nine colors of the - * blue sequential color scheme. Sequential, single-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemeBlues: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “Greens†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateGreens(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “Greens†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeGreens[9] contains an array of nine strings representing the nine colors of the - * green sequential color scheme. Sequential, single-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemeGreens: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “Greys†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateGreys(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “Greys†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeGreys[9] contains an array of nine strings representing the nine colors of the - * grey sequential color scheme. Sequential, single-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemeGreys: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “Oranges†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateOranges(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “Oranges†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeOranges[9] contains an array of nine strings representing the nine colors of the - * orange sequential color scheme. Sequential, single-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemeOranges: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “Purples†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolatePurples(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “Purples†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemePurples[9] contains an array of nine strings representing the nine colors of the - * purple sequential color scheme. Sequential, single-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemePurples: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “Reds†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateReds(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “Reds†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeReds[9] contains an array of nine strings representing the nine colors of the - * red sequential color scheme. Sequential, single-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemeReds: ReadonlyArray<ReadonlyArray<string>>; - -// ----------------------------------------------------------------------- -// Sequential(Multi-Hue) -// ----------------------------------------------------------------------- - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “turbo†color scheme by Anton Mikhailov. - * - * @param t A number in the interval [0, 1]. - */ -export function interpolateTurbo(t: number): string; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “viridis†perceptually-uniform color scheme designed by van der Walt, Smith and Firing for matplotlib, - * represented as an RGB string. - * - * @param t A number in the interval [0, 1]. - */ -export function interpolateViridis(t: number): string; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “inferno†perceptually-uniform color scheme designed by van der Walt and Smith for matplotlib, - * represented as an RGB string. - * - * @param t A number in the interval [0, 1]. - */ -export function interpolateInferno(t: number): string; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “magma†perceptually-uniform color scheme designed by van der Walt and Smith for matplotlib, - * represented as an RGB string. - * - * @param t A number in the interval [0, 1]. - */ -export function interpolateMagma(t: number): string; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “plasma†perceptually-uniform color scheme designed by van der Walt and Smith for matplotlib, - * represented as an RGB string. - * - * @param t A number in the interval [0, 1]. - */ -export function interpolatePlasma(t: number): string; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “plasma†perceptually-uniform color scheme designed by van der Walt and Smith for matplotlib, - * represented as an RGB string. - * - * @param t A number in the interval [0, 1]. - */ -export function interpolateCividis(t: number): string; - -/** - * Given a number t in the range [0,1], returns the corresponding color from a 180° rotation of Niccoli’s perceptual rainbow, represented as an RGB string. - * - * @param t A number in the interval [0, 1]. - */ -export function interpolateWarm(t: number): string; - -/** - * Given a number t in the range [0,1], returns the corresponding color from Niccoli’s perceptual rainbow, represented as an RGB string. - * - * @param t A number in the interval [0, 1]. - */ -export function interpolateCool(t: number): string; - -/** - * Given a number t in the range [0,1], returns the corresponding color from d3.interpolateWarm scale from [0.0, 0.5] followed by the d3.interpolateCool scale from [0.5, 1.0], - * thus implementing the cyclical less-angry rainbow color scheme. - * - * @param t A number in the interval [0, 1]. - */ -export function interpolateRainbow(t: number): string; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “sinebow†color scheme by Jim Bumgardner and Charlie Loyd. - * - * @param t A number in the interval [0, 1]. - */ -export function interpolateSinebow(t: number): string; - -/** - * Given a number t in the range [0,1], returns the corresponding color from Green’s default Cubehelix represented as an RGB string. - * - * @param t A number in the interval [0, 1]. - */ -export function interpolateCubehelixDefault(t: number): string; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “BuGn†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateBuGn(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “BuGn†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeBuGn[9] contains an array of nine strings representing the nine colors of the - * blue-green sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemeBuGn: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “BuPu†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateBuPu(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “BuPu†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeBuPu[9] contains an array of nine strings representing the nine colors of the - * blue-purple sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemeBuPu: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “GnBu†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateGnBu(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “GnBu†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeGnBu[9] contains an array of nine strings representing the nine colors of the - * green-blue sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemeGnBu: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “OrRd†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateOrRd(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “OrRd†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeOrRd[9] contains an array of nine strings representing the nine colors of the - * orange-red sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemeOrRd: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “PuBuGn†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolatePuBuGn(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “PuBuGn†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemePuBuGn[9] contains an array of nine strings representing the nine colors of the - * purple-blue-green sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemePuBuGn: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “PuBu†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolatePuBu(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “PuBu†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemePuBu[9] contains an array of nine strings representing the nine colors of the - * purple-blue sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemePuBu: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “PuRd†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolatePuRd(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “PuRd†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemePuRd[9] contains an array of nine strings representing the nine colors of the - * purple-red sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemePuRd: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “RdPu†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateRdPu(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “RdPu†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeRdPu[9] contains an array of nine strings representing the nine colors of the - * red-purple sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemeRdPu: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “YlGnBu†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateYlGnBu(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “YlGnBu†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeYlGnBu[9] contains an array of nine strings representing the nine colors of the - * yellow-green-blue sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemeYlGnBu: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “YlGn†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateYlGn(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “YlGn†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeYlGn[9] contains an array of nine strings representing the nine colors of the - * yellow-green sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemeYlGn: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “YlOrBr†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateYlOrBr(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “YlOrBr†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeYlOrBr[9] contains an array of nine strings representing the nine colors of the - * yellow-orange-brown sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemeYlOrBr: ReadonlyArray<ReadonlyArray<string>>; - -/** - * Given a number t in the range [0,1], returns the corresponding color from the “YlOrRd†sequential color scheme represented as an RGB string. - * - * @param t Number in the range [0, 1]. - */ -export function interpolateYlOrRd(t: number): string; - -/** - * An array of arrays of hexadecimal color strings from the “YlOrRd†sequential color scheme. The kth element of this array contains - * the color scheme of size k; for example, d3.schemeYlOrRd[9] contains an array of nine strings representing the nine colors of the - * yellow-orange-red sequential color scheme. Sequential, multi-hue color schemes support a size k ranging from 3 to 9. - */ -export const schemeYlOrRd: ReadonlyArray<ReadonlyArray<string>>; diff --git a/node_modules/@types/d3-scale-chromatic/package.json b/node_modules/@types/d3-scale-chromatic/package.json deleted file mode 100644 index b627fc690f8d7c1fc3c3a0d52bf5f9c8cbfdc1e7..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-scale-chromatic/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "@types/d3-scale-chromatic@^1", - "_id": "@types/d3-scale-chromatic@1.5.1", - "_inBundle": false, - "_integrity": "sha512-7FtJYrmXTEWLykShjYhoGuDNR/Bda0+tstZMkFj4RRxUEryv16AGh3be21tqg84B6KfEwiZyEpBcTyPyU+GWjg==", - "_location": "/@types/d3-scale-chromatic", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-scale-chromatic@^1", - "name": "@types/d3-scale-chromatic", - "escapedName": "@types%2fd3-scale-chromatic", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-1.5.1.tgz", - "_shasum": "e2b7c3401e5c13809f831911eb820e444f4fc67a", - "_spec": "@types/d3-scale-chromatic@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Hugues Stefanski", - "url": "https://github.com/Ledragon" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "Henrique Machado", - "url": "https://github.com/henriquefm" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-scale-chromatic module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-scale-chromatic", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-scale-chromatic" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "93ac873501f2519d34cb0751a70b95c4193d42a751d214e5c2ef5c3f7eada7fb", - "version": "1.5.1" -} diff --git a/node_modules/@types/d3-scale/LICENSE b/node_modules/@types/d3-scale/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-scale/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-scale/README.md b/node_modules/@types/d3-scale/README.md deleted file mode 100644 index 95a710e76cb736a0d3a180c831005ad356b33e36..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-scale/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-scale` - -# Summary -This package contains type definitions for D3JS d3-scale module (https://github.com/d3/d3-scale/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-scale/v2. - -### Additional Details - * Last updated: Thu, 01 Oct 2020 22:50:47 GMT - * Dependencies: [@types/d3-time](https://npmjs.com/package/@types/d3-time) - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), [rulonder](https://github.com/rulonder), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-scale/index.d.ts b/node_modules/@types/d3-scale/index.d.ts deleted file mode 100644 index 7a0c0e7a63caa03bfb060febcde66bca2a4afb25..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-scale/index.d.ts +++ /dev/null @@ -1,2367 +0,0 @@ -// Type definitions for D3JS d3-scale module 2.2 -// Project: https://github.com/d3/d3-scale/, https://d3js.org/d3-scale -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// rulonder <https://github.com/rulonder> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 2.2.2 - -import { CountableTimeInterval, TimeInterval } from 'd3-time'; - -// ------------------------------------------------------------------------------- -// Shared Types and Interfaces -// ------------------------------------------------------------------------------- - -/** - * An Interpolator factory returns an interpolator function. - * - * The first generic corresponds to the data type of the interpolation boundaries. - * The second generic corresponds to the data type of the return type of the interpolator. - */ -export interface InterpolatorFactory<T, U> { - /** - * Construct a new interpolator function, based on the provided interpolation boundaries. - * - * @param a Start boundary of the interpolation interval. - * @param b End boundary of the interpolation interval. - */ - (a: T, b: T): (t: number) => U; -} - -export type NumberValue = number | { valueOf(): number }; - -/** - * A helper interface for a continuous scale defined over a numeric domain. - */ -export interface ScaleContinuousNumeric<Range, Output> { - /** - * Given a value from the domain, returns the corresponding value from the range, subject to interpolation, if any. - * - * If the given value is outside the domain, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the range. - * - * Note: The interpolation function applied by the scale may change the output type from the range type as part of the interpolation. - * - * @param value A numeric value from the domain. - */ - (value: NumberValue): Output | undefined; - - /** - * Given a value from the range, returns the corresponding value from the domain. Inversion is useful for interaction, - * say to determine the data value corresponding to the position of the mouse. - * - * If the given value is outside the range, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the domain. - * - * IMPORTANT: This method is only supported if the range is numeric. If the range is not numeric, returns NaN. - * - * For a valid value y in the range, continuous(continuous.invert(y)) approximately equals y; - * similarly, for a valid value x in the domain, continuous.invert(continuous(x)) approximately equals x. - * The scale and its inverse may not be exact due to the limitations of floating point precision. - * - * @param value A numeric value from the range. - */ - invert(value: NumberValue): number; - - /** - * Returns a copy of the scale’s current domain. - */ - domain(): number[]; - /** - * Sets the scale’s domain to the specified array of numbers. The array must contain two or more elements. - * If the elements in the given array are not numbers, they will be coerced to numbers - * - * Although continuous scales typically have two values each in their domain and range, specifying more than two values produces a piecewise scale. - * - * Internally, a piecewise scale performs a binary search for the range interpolator corresponding to the given domain value. - * Thus, the domain must be in ascending or descending order. If the domain and range have different lengths N and M, only the first min(N,M) elements in each are observed. - * - * @param domain Array of numeric domain values. - */ - domain(domain: NumberValue[]): this; - - /** - * Returns a copy of the scale’s current range. - */ - range(): Range[]; - /** - * Sets the scale’s range to the specified array of values. - * - * The array must contain two or more elements. Unlike the domain, elements in the given array need not be numbers; - * any value that is supported by the underlying interpolator will work, though note that numeric ranges are required for invert. - * - * @param range Array of range values. - */ - range(range: ReadonlyArray<Range>): this; - - /** - * Sets the scale’s range to the specified array of values while also setting the scale’s interpolator to interpolateRound. - * - * The rounding interpolator is sometimes useful for avoiding antialiasing artifacts, - * though also consider the shape-rendering “crispEdges†styles. Note that this interpolator can only be used with numeric ranges. - * - * The array must contain two or more elements. Unlike the domain, elements in the given array need not be numbers; - * any value that is supported by the underlying interpolator will work, though note that numeric ranges are required for invert. - * - * @param range Array of range values. - */ - rangeRound(range: NumberValue[]): this; - - /** - * Returns whether or not the scale currently clamps values to within the range. - */ - clamp(): boolean; - /** - * Enables or disables clamping, respectively. If clamping is disabled and the scale is passed a value outside the domain, - * the scale may return a value outside the range through extrapolation. - * - * If clamping is enabled, the return value of the scale is always within the scale’s range. Clamping similarly applies to the "invert" method. - * - * @param clamp A flag to enable (true) or disable (false) clamping. - */ - clamp(clamp: boolean): this; - - /** - * Returns the current unknown value, which defaults to undefined. - */ - unknown(): Range | undefined; - /** - * Sets the output value of the scale for undefined (or NaN) input values and returns this scale. - * - * @param value The output value of the scale for undefined (or NaN) input values. - */ - unknown(value: Range | undefined): this; - - /** - * Returns approximately count representative values from the scale’s domain. - * - * If count is not specified, it defaults to 10. - * - * The returned tick values are uniformly spaced, have human-readable values (such as multiples of powers of 10), - * and are guaranteed to be within the extent of the domain. Ticks are often used to display reference lines, or tick marks, in conjunction with the visualized data. - * The specified count is only a hint; the scale may return more or fewer values depending on the domain. See also d3-array’s ticks. - * - * @param count Optional approximate number of ticks to be returned. If count is not specified, it defaults to 10. - */ - ticks(count?: number): number[]; - - /** - * Returns a number format function suitable for displaying a tick value, automatically computing the appropriate precision based on the fixed interval between tick values. - * The specified count should have the same value as the count that is used to generate the tick values. - * - * @param count Approximate number of ticks to be used when calculating precision for the number format function. - * @param specifier An optional valid format specifier string which allows a custom format where the precision of the format is automatically set by the scale as appropriate for the tick interval. - * If specifier uses the format type "s", the scale will return a SI-prefix format based on the largest value in the domain. - * If the specifier already specifies a precision, this method is equivalent to locale.format. - */ - tickFormat(count?: number, specifier?: string): (d: NumberValue) => string; - - /** - * Extends the domain so that it starts and ends on nice round values. - * This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. - * An optional tick count argument allows greater control over the step size used to extend the bounds, - * guaranteeing that the returned ticks will exactly cover the domain. - * Nicing is useful if the domain is computed from data, say using extent, and may be irregular. - * For example, for a domain of [0.201479…, 0.996679…], a nice domain might be [0.2, 1.0]. - * If the domain has more than two values, nicing the domain only affects the first and last value. - * - * Nicing a scale only modifies the current domain; it does not automatically nice domains that are subsequently set using continuous.domain. - * You must re-nice the scale after setting the new domain, if desired. - * - * @param count An optional number of ticks expected to be used. - */ - nice(count?: number): this; - - /** - * Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. - */ - copy(): this; -} - -/** - * Returns a number format function suitable for displaying a tick value, - * automatically computing the appropriate precision based on the fixed interval between tick values, as determined by d3.tickStep. - * - * @param start Start - * @param stop Stop - * @param count Approximate number of ticks to be used when calculating precision for the number format function. - * @param specifier An optional specifier allows a custom format where the precision of the format is automatically set by the scale as appropriate for the tick interval. - * If specifier uses the format type s, the scale will return a SI-prefix format based on the larger absolute value of start and stop. - * If the specifier already specifies a precision, this method is equivalent to locale.format. - */ -export function tickFormat(start: number, stop: number, count: number, specifier?: string): (d: NumberValue) => string; - -// ------------------------------------------------------------------------------- -// Linear Scale Factory -// ------------------------------------------------------------------------------- - -/** - * A linear continuous scale defined over a numeric domain. - * - * Continuous scales map a continuous, quantitative input domain to a continuous output range. - * Each range value y can be expressed as a function of the domain value x: y = mx + b. - * - * If the range is also numeric, the mapping may be inverted. - * - * Note that the data types of the range and output of the scale must be compatible with the interpolator applied by the scale. - * - * The first generic corresponds to the data type of the range elements. - * - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - */ -export interface ScaleLinear<Range, Output> extends ScaleContinuousNumeric<Range, Output> { - /** - * Returns the scale’s current interpolator factory, which defaults to interpolate. - */ - interpolate(): InterpolatorFactory<any, any>; - - /** - * Sets the scale’s range interpolator factory. This interpolator factory is used to create interpolators for each adjacent pair of values from the range; - * these interpolators then map a normalized domain parameter t in [0, 1] to the corresponding value in the range. - * - * Note: the default interpolator may reuse return values. For example, if the range values are objects, then the value interpolator always returns the same object, modifying it in-place. - * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); - * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. - * - * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. - * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. - */ - interpolate(interpolate: InterpolatorFactory<Range, Output>): this; - /** - * Sets the scale’s range interpolator factory. This interpolator factory is used to create interpolators for each adjacent pair of values from the range; - * these interpolators then map a normalized domain parameter t in [0, 1] to the corresponding value in the range. - * - * Note: the default interpolator may reuse return values. For example, if the range values are objects, then the value interpolator always returns the same object, modifying it in-place. - * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); - * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. - * - * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. - * - * The generic "NewOutput" can be used to change the scale to have a different output element type corresponding to the new interpolation factory. - * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. - */ - interpolate<NewOutput>(interpolate: InterpolatorFactory<Range, NewOutput>): ScaleLinear<Range, NewOutput>; -} - -/** - * Constructs a new continuous scale with the specified range, the default interpolator and clamping disabled. - * The domain defaults to [0, 1]. - * If range is not specified, it defaults to [0, 1]. - * - * The first generic corresponds to the data type of the range elements. - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - * - * The range must be set in accordance with the range element type. - * - * The interpolator factory may be set using the interpolate(...) method of the scale. - * - * @param range Array of range values. - */ -export function scaleLinear<Range = number, Output = Range>(range?: ReadonlyArray<Range>): ScaleLinear<Range, Output>; -/** - * Constructs a new continuous scale with the specified domain and range, the default interpolator and clamping disabled. - * - * The first generic corresponds to the data type of the range elements. - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - * - * The range must be set in accordance with the range element type. - * - * The interpolator factory may be set using the interpolate(...) method of the scale. - * - * @param domain Array of numeric domain values. - * @param range Array of range values. - */ -export function scaleLinear<Range, Output = Range>( - domain: NumberValue[], - range: ReadonlyArray<Range> -): ScaleLinear<Range, Output>; - -// ------------------------------------------------------------------------------- -// Power Scale Factories -// ------------------------------------------------------------------------------- - -/** - * A continuous power scale defined over a numeric domain. - * - * Continuous scales map a continuous, quantitative input domain to a continuous output range. - * - * Each range value y can be expressed as a function of the domain value x: y = mx^k + b, where k is the exponent value. - * Power scales also support negative domain values, in which case the input value and the resulting output value are multiplied by -1. - * - * If the range is also numeric, the mapping may be inverted. - * - * Note that the data types of the range and output of the scale must be compatible with the interpolator applied by the scale. - * - * The first generic corresponds to the data type of the range elements. - * - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - */ -export interface ScalePower<Range, Output> extends ScaleContinuousNumeric<Range, Output> { - /** - * Returns the scale’s current interpolator factory, which defaults to interpolate. - */ - interpolate(): InterpolatorFactory<any, any>; - - /** - * Sets the scale’s range interpolator factory. This interpolator factory is used to create interpolators for each adjacent pair of values from the range; - * these interpolators then map a normalized domain parameter t in [0, 1] to the corresponding value in the range. - * - * Note: the default interpolator may reuse return values. For example, if the range values are objects, then the value interpolator always returns the same object, modifying it in-place. - * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); - * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. - * - * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. - * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. - */ - interpolate(interpolate: InterpolatorFactory<Range, Output>): this; - /** - * Sets the scale’s range interpolator factory. This interpolator factory is used to create interpolators for each adjacent pair of values from the range; - * these interpolators then map a normalized domain parameter t in [0, 1] to the corresponding value in the range. - * - * Note: the default interpolator may reuse return values. For example, if the range values are objects, then the value interpolator always returns the same object, modifying it in-place. - * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); - * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. - * - * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. - * - * The generic "NewOutput" can be used to change the scale to have a different output element type corresponding to the new interpolation factory. - * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. - */ - interpolate<NewOutput>(interpolate: InterpolatorFactory<Range, NewOutput>): ScalePower<Range, NewOutput>; - - /** - * If exponent is not specified, returns the current exponent, which defaults to 1. - * (Note that this is effectively a linear scale until you set a different exponent.) - */ - exponent(): number; - /** - * Sets the current exponent to the given numeric value. - * (Note that this is effectively a linear scale until you set a different exponent.) - */ - exponent(exponent: number): this; -} - -/** - * Constructs a new continuous scale with the specified range, the exponent 1, the default interpolator and clamping disabled. - * The domain defaults to [0, 1]. - * If range is not specified, it defaults to [0, 1]. - * (Note that this is effectively a linear scale until you set a different exponent.) - * - * The first generic corresponds to the data type of the range elements. - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - * - * The range must be set in accordance with the range element type. - * - * The interpolator factory may be set using the interpolate(...) method of the scale. - * - * @param range Array of range values. - */ -export function scalePow<Range = number, Output = Range>(range?: ReadonlyArray<Range>): ScalePower<Range, Output>; -/** - * Constructs a new continuous scale with the specified domain and range, the exponent 1, the default interpolator and clamping disabled. - * (Note that this is effectively a linear scale until you set a different exponent.) - * - * The first generic corresponds to the data type of the range elements. - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - * - * The range must be set in accordance with the range element type. - * - * The interpolator factory may be set using the interpolate(...) method of the scale. - * - * @param domain Array of numeric domain values. - * @param range Array of range values. - */ -export function scalePow<Range, Output = Range>( - domain: NumberValue[], - range: ReadonlyArray<Range> -): ScalePower<Range, Output>; - -/** - * Constructs a new continuous power scale with the specified range, the exponent 0.5, the default interpolator and clamping disabled. - * The domain defaults to [0, 1]. - * If range is not specified, it defaults to [0, 1]. - * This is a convenience method equivalent to d3.scalePow().exponent(0.5). - * - * The first generic corresponds to the data type of the range elements. - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - * - * The range must be set in accordance with the range element type. - * - * The interpolator factory may be set using the interpolate(...) method of the scale. - * - * @param range Array of range values. - */ -export function scaleSqrt<Range = number, Output = Range>(range?: ReadonlyArray<Range>): ScalePower<Range, Output>; -/** - * Constructs a new continuous power scale with the specified domain and range, the exponent 0.5, the default interpolator and clamping disabled. - * This is a convenience method equivalent to d3.scalePow().exponent(0.5). - * - * The first generic corresponds to the data type of the range elements. - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - * - * The range must be set in accordance with the range element type. - * - * The interpolator factory may be set using the interpolate(...) method of the scale. - * - * @param domain Array of numeric domain values. - * @param range Array of range values. - */ -export function scaleSqrt<Range, Output = Range>( - domain: NumberValue[], - range: ReadonlyArray<Range> -): ScalePower<Range, Output>; - -// ------------------------------------------------------------------------------- -// Logarithmic Scale Factory -// ------------------------------------------------------------------------------- - -/** - * A continuous logarithmic scale defined over a numeric domain. - * - * Continuous scales map a continuous, quantitative input domain to a continuous output range. - * - * The mapping to the range value y can be expressed as a function of the domain value x: y = m log(x) + b. - * - * As log(0) = -∞, a log scale domain must be strictly-positive or strictly-negative; the domain must not include or cross zero. - * A log scale with a positive domain has a well-defined behavior for positive values, and a log scale with a negative domain has a well-defined behavior for negative values. - * (For a negative domain, input and output values are implicitly multiplied by -1.) - * The behavior of the scale is undefined if you pass a negative value to a log scale with a positive domain or vice versa. - * - * If the range is also numeric, the mapping may be inverted. - * - * Note that the data types of the range and output of the scale must be compatible with the interpolator applied by the scale. - * - * The first generic corresponds to the data type of the range elements. - * - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - */ -export interface ScaleLogarithmic<Range, Output> extends ScaleContinuousNumeric<Range, Output> { - /** - * Returns a copy of the scale’s current domain. - */ - domain(): number[]; - /** - * Sets the scale’s domain to the specified array of numbers. The array must contain two or more elements. - * If the elements in the given array are not numbers, they will be coerced to numbers - * - * As log(0) = -∞, a log scale domain must be strictly-positive or strictly-negative; the domain must not include or cross zero. - * A log scale with a positive domain has a well-defined behavior for positive values, and a log scale with a negative domain has a well-defined behavior for negative values. - * (For a negative domain, input and output values are implicitly multiplied by -1.) - * The behavior of the scale is undefined if you pass a negative value to a log scale with a positive domain or vice versa. - * - * Although continuous scales typically have two values each in their domain and range, specifying more than two values produces a piecewise scale. - * - * Internally, a piecewise scale performs a binary search for the range interpolator corresponding to the given domain value. - * Thus, the domain must be in ascending or descending order. If the domain and range have different lengths N and M, only the first min(N,M) elements in each are observed. - * - * @param domain Array of numeric domain values. - */ - domain(domain: NumberValue[]): this; - - /** - * Returns the scale’s current interpolator factory, which defaults to interpolate. - */ - interpolate(): InterpolatorFactory<any, any>; - - /** - * Sets the scale’s range interpolator factory. This interpolator factory is used to create interpolators for each adjacent pair of values from the range; - * these interpolators then map a normalized domain parameter t in [0, 1] to the corresponding value in the range. - * - * Note: the default interpolator may reuse return values. For example, if the range values are objects, then the value interpolator always returns the same object, modifying it in-place. - * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); - * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. - * - * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. - * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. - */ - interpolate(interpolate: InterpolatorFactory<Range, Output>): this; - /** - * Sets the scale’s range interpolator factory. This interpolator factory is used to create interpolators for each adjacent pair of values from the range; - * these interpolators then map a normalized domain parameter t in [0, 1] to the corresponding value in the range. - * - * Note: the default interpolator may reuse return values. For example, if the range values are objects, then the value interpolator always returns the same object, modifying it in-place. - * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); - * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. - * - * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. - * - * The generic "NewOutput" can be used to change the scale to have a different output element type corresponding to the new interpolation factory. - * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. - */ - interpolate<NewOutput>(interpolate: InterpolatorFactory<Range, NewOutput>): ScaleLogarithmic<Range, NewOutput>; - - /** - * Returns approximately count representative values from the scale’s domain. - * - * If count is not specified, it defaults to 10. - * - * If the base is an integer, the returned ticks are uniformly spaced within each integer power of base; otherwise, one tick per power of base is returned. - * The returned ticks are guaranteed to be within the extent of the domain. If the orders of magnitude in the domain is greater than count, then at most one tick per power is returned. - * Otherwise, the tick values are unfiltered, but note that you can use log.tickFormat to filter the display of tick labels. - * - * @param count Optional approximate number of ticks to be returned. If count is not specified, it defaults to 10. - */ - ticks(count?: number): number[]; - - /** - * Returns a number format function suitable for displaying a tick value, automatically computing the appropriate precision based on the fixed interval between tick values. - * - * The specified count typically has the same value as the count that is used to generate the tick values. - * If there are too many ticks, the formatter may return the empty string for some of the tick labels; - * however, note that the ticks are still shown. - * To disable filtering, specify a count of Infinity. When specifying a count, you may also provide a format specifier or format function. - * For example, to get a tick formatter that will display 20 ticks of a currency, say log.tickFormat(20, "$,f"). - * If the specifier does not have a defined precision, the precision will be set automatically by the scale, returning the appropriate format. - * This provides a convenient way of specifying a format whose precision will be automatically set by the scale. - * - * @param count Approximate number of ticks to be used when calculating precision for the number format function. - * @param specifier An optional valid format specifier string which allows a custom format where the precision of the format is automatically set by the scale as appropriate for the tick interval. - * For example, to get a tick formatter that will display 20 ticks of a currency, say log.tickFormat(20, "$,f"). - * If the specifier does not have a defined precision, the precision will be set automatically by the scale, returning the appropriate format. - * This provides a convenient way of specifying a format whose precision will be automatically set by the scale. - */ - tickFormat(count?: number, specifier?: string): (d: NumberValue) => string; - - /** - * Extends the domain to integer powers of base. For example, for a domain of [0.201479…, 0.996679…], and base 10, the nice domain is [0.1, 1]. - * If the domain has more than two values, nicing the domain only affects the first and last value. - * - * Nicing a scale only modifies the current domain; it does not automatically nice domains that are subsequently set using continuous.domain. - * You must re-nice the scale after setting the new domain, if desired. - */ - nice(): this; - - /** - * Returns the current base, which defaults to 10. - */ - base(): number; - /** - * Sets the base for this logarithmic scale to the specified value. - */ - base(base: number): this; -} - -/** - * Constructs a new continuous scale with the specified range, the base 10, the default interpolator and clamping disabled. - * The domain defaults to [1, 10]. - * If range is not specified, it defaults to [0, 1]. - * - * The first generic corresponds to the data type of the range elements. - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - * - * The range must be set in accordance with the range element type. - * - * The interpolator factory may be set using the interpolate(...) method of the scale. - * - * @param range Array of range values. - */ -export function scaleLog<Range = number, Output = Range>(range?: ReadonlyArray<Range>): ScaleLogarithmic<Range, Output>; -/** - * Constructs a new continuous scale with the specified domain and range, the base 10, the default interpolator and clamping disabled. - * - * The first generic corresponds to the data type of the range elements. - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - * - * The range must be set in accordance with the range element type. - * - * The interpolator factory may be set using the interpolate(...) method of the scale. - * - * @param domain Array of numeric domain values. - * @param range Array of range values. - */ -export function scaleLog<Range, Output = Range>( - domain: NumberValue[], - range: ReadonlyArray<Range> -): ScaleLogarithmic<Range, Output>; - -// ------------------------------------------------------------------------------- -// Symlog Scale Factory -// ------------------------------------------------------------------------------- - -/** - * A bi-symmetric log transformation for wide-range data by Webber scale defined over a numeric domain. - * - * Continuous scales map a continuous, quantitative input domain to a continuous output range. - * - * See “A bi-symmetric log transformation for wide-range data†by Webber for more - * - * If the range is also numeric, the mapping may be inverted. - * - * Note that the data types of the range and output of the scale must be compatible with the interpolator applied by the scale. - * - * The first generic corresponds to the data type of the range elements. - * - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - */ -export interface ScaleSymLog<Range, Output> extends ScaleContinuousNumeric<Range, Output> { - /** - * Returns a number format function suitable for displaying a tick value, automatically computing the appropriate precision based on the fixed interval between tick values. - * - * The specified count typically has the same value as the count that is used to generate the tick values. - * If there are too many ticks, the formatter may return the empty string for some of the tick labels; - * however, note that the ticks are still shown. - * To disable filtering, specify a count of Infinity. When specifying a count, you may also provide a format specifier or format function. - * For example, to get a tick formatter that will display 20 ticks of a currency, say log.tickFormat(20, "$,f"). - * If the specifier does not have a defined precision, the precision will be set automatically by the scale, returning the appropriate format. - * This provides a convenient way of specifying a format whose precision will be automatically set by the scale. - * - * @param count Approximate number of ticks to be used when calculating precision for the number format function. - * @param specifier An optional valid format specifier string which allows a custom format where the precision of the format is automatically set by the scale as appropriate for the tick interval. - * For example, to get a tick formatter that will display 20 ticks of a currency, say log.tickFormat(20, "$,f"). - * If the specifier does not have a defined precision, the precision will be set automatically by the scale, returning the appropriate format. - * This provides a convenient way of specifying a format whose precision will be automatically set by the scale. - */ - tickFormat(count?: number, specifier?: string): (d: NumberValue) => string; - /** - * Returns the current constant, which defaults to 1. - */ - constant(): number; - /** - * Sets the symlog constant to the specified number and returns this scale; - * otherwise returns the current value of the symlog constant, which defaults to 1. See “A bi-symmetric log transformation for wide-range data†by Webber for more. - */ - constant(constant: number): this; -} - -/** - * Constructs a new continuous scale with the specified range, the constant 1, the default interpolator and clamping disabled. - * The domain defaults to [0, 1]. - * If range is not specified, it defaults to [0, 1]. - * - * The first generic corresponds to the data type of the range elements. - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - * - * The range must be set in accordance with the range element type. - * - * The interpolator factory may be set using the interpolate(...) method of the scale. - * - * @param range Array of range values. - */ -export function scaleSymlog<Range = number, Output = Range>(range?: ReadonlyArray<Range>): ScaleSymLog<Range, Output>; -/** - * Constructs a new continuous scale with the specified domain and range, the constant 1, the default interpolator and clamping disabled. - * - * The first generic corresponds to the data type of the range elements. - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - * - * The range must be set in accordance with the range element type. - * - * The interpolator factory may be set using the interpolate(...) method of the scale. - * - * @param domain Array of numeric domain values. - * @param range Array of range values. - */ -export function scaleSymlog<Range, Output = Range>( - domain: NumberValue[], - range: ReadonlyArray<Range> -): ScaleSymLog<Range, Output>; - -// ------------------------------------------------------------------------------- -// Identity Scale Factory -// ------------------------------------------------------------------------------- - -/** - * Identity scales are a special case of linear scales where the domain and range are identical; the scale and its invert method are thus the identity function. - * These scales are occasionally useful when working with pixel coordinates, say in conjunction with an axis or brush. - */ -export interface ScaleIdentity { - /** - * Given a value from the domain, returns the corresponding value from the range, subject to interpolation, if any. - * - * If the given value is outside the domain, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the range. - * - * Note: The interpolation function applied by the scale may change the output type from the range type as part of the interpolation. - * - * @param value A numeric value from the domain. - */ - (value: NumberValue): number | undefined; - - /** - * Given a value from the range, returns the corresponding value from the domain. Inversion is useful for interaction, - * say to determine the data value corresponding to the position of the mouse. - * - * If the given value is outside the range, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the domain. - * - * IMPORTANT: This method is only supported if the range is numeric. If the range is not numeric, returns NaN. - * - * For a valid value y in the range, continuous(continuous.invert(y)) approximately equals y; - * similarly, for a valid value x in the domain, continuous.invert(continuous(x)) approximately equals x. - * The scale and its inverse may not be exact due to the limitations of floating point precision. - * - * @param value A numeric value from the range. - */ - invert(value: NumberValue): number; - - /** - * Returns a copy of the scale’s current domain. - */ - domain(): number[]; - /** - * Sets the scale’s domain to the specified array of numbers. The array must contain two or more elements. - * If the elements in the given array are not numbers, they will be coerced to numbers - * - * Although continuous scales typically have two values each in their domain and range, specifying more than two values produces a piecewise scale. - * - * Internally, a piecewise scale performs a binary search for the range interpolator corresponding to the given domain value. - * Thus, the domain must be in ascending or descending order. If the domain and range have different lengths N and M, only the first min(N,M) elements in each are observed. - * - * @param domain Array of numeric domain values. - */ - domain(domain: NumberValue[]): this; - - /** - * Returns a copy of the scale’s current range. - */ - range(): number[]; - /** - * Sets the scale’s range to the specified array of values. - * - * The array must contain two or more elements. Unlike the domain, elements in the given array need not be numbers; - * any value that is supported by the underlying interpolator will work, though note that numeric ranges are required for invert. - * - * @param range Array of range values. - */ - range(range: NumberValue[]): this; - - /** - * Returns approximately count representative values from the scale’s domain. - * - * If count is not specified, it defaults to 10. - * - * The returned tick values are uniformly spaced, have human-readable values (such as multiples of powers of 10), - * and are guaranteed to be within the extent of the domain. Ticks are often used to display reference lines, or tick marks, in conjunction with the visualized data. - * The specified count is only a hint; the scale may return more or fewer values depending on the domain. See also d3-array’s ticks. - * - * @param count Optional approximate number of ticks to be returned. If count is not specified, it defaults to 10. - */ - ticks(count?: number): number[]; - - /** - * Returns a number format function suitable for displaying a tick value, automatically computing the appropriate precision based on the fixed interval between tick values. - * The specified count should have the same value as the count that is used to generate the tick values. - * - * @param count Approximate number of ticks to be used when calculating precision for the number format function. - * @param specifier An optional valid format specifier string which allows a custom format where the precision of the format is automatically set by the scale as appropriate for the tick interval. - * If specifier uses the format type "s", the scale will return a SI-prefix format based on the largest value in the domain. - * If the specifier already specifies a precision, this method is equivalent to locale.format. - */ - tickFormat(count?: number, specifier?: string): (d: NumberValue) => string; - - /** - * Extends the domain so that it starts and ends on nice round values. - * This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. - * An optional tick count argument allows greater control over the step size used to extend the bounds, - * guaranteeing that the returned ticks will exactly cover the domain. - * Nicing is useful if the domain is computed from data, say using extent, and may be irregular. - * For example, for a domain of [0.201479…, 0.996679…], a nice domain might be [0.2, 1.0]. - * If the domain has more than two values, nicing the domain only affects the first and last value. - * - * Nicing a scale only modifies the current domain; it does not automatically nice domains that are subsequently set using continuous.domain. - * You must re-nice the scale after setting the new domain, if desired. - * - * @param count An optional number of ticks expected to be used. - */ - nice(count?: number): this; - - /** - * Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. - */ - copy(): ScaleIdentity; - - /** - * Returns the current unknown value, which defaults to undefined. - */ - unknown(): number | undefined; - /** - * Sets the output value of the scale for undefined (or NaN) input values and returns this scale. - * - * @param value The output value of the scale for undefined (or NaN) input values. - */ - unknown(value: number | undefined): this; -} - -/** - * Constructs a new identity scale with the specified domain and range. - * If range is not specified, it defaults to [0, 1]. - * - * @param range Array of range values. - */ -export function scaleIdentity(range?: NumberValue[]): ScaleIdentity; - -// ------------------------------------------------------------------------------- -// Time Scale Factories -// ------------------------------------------------------------------------------- - -/** - * A linear scale defined over a temporal domain. - * - * Time scales implement ticks based on calendar intervals, taking the pain out of generating axes for temporal domains. - * - * If the range is numeric, the mapping may be inverted to return a date. - * - * Note that the data types of the range and output of the scale must be compatible with the interpolator applied by the scale. - * - * The first generic corresponds to the data type of the range elements. - * - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - */ -export interface ScaleTime<Range, Output> { - /** - * Given a value from the domain, returns the corresponding value from the range, subject to interpolation, if any. - * - * If the given value is outside the domain, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the range. - * - * Note: The interpolation function applied by the scale may change the output type from the range type as part of the interpolation. - * - * @param value A temporal value from the domain. If the value is not a Date, it will be coerced to Date. - */ - (value: Date | NumberValue): Output | undefined; - - /** - * Given a value from the range, returns the corresponding value from the domain. Inversion is useful for interaction, - * say to determine the data value corresponding to the position of the mouse. - * - * If the given value is outside the range, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the domain. - * - * IMPORTANT: This method is only supported if the range is numeric. If the range is not numeric, returns Invalid Date. - * - * For a valid value y in the range, time(time.invert(y)) equals y; similarly, for a valid value x in the domain, time.invert(time(x)) equals x. - * The invert method is useful for interaction, say to determine the value in the domain that corresponds to the pixel location under the mouse. - * - * @param value A numeric value from the range. - */ - invert(value: NumberValue): Date; - - /** - * Returns a copy of the scale’s current domain. - */ - domain(): Date[]; - - /** - * Sets the scale’s domain to the specified array of temporal domain values. The array must contain two or more elements. - * If the elements in the given array are not dates, they will be coerced to dates. - * - * Although continuous scales typically have two values each in their domain and range, specifying more than two values produces a piecewise scale. - * - * Internally, a piecewise scale performs a binary search for the range interpolator corresponding to the given domain value. - * Thus, the domain must be in ascending or descending order. If the domain and range have different lengths N and M, only the first min(N,M) elements in each are observed. - * - * @param domain Array of temporal domain values. Numeric values will be coerced to dates. - */ - domain(domain: Array<Date | NumberValue>): this; - - /** - * Returns a copy of the scale’s current range. - */ - range(): Range[]; - /** - * Sets the scale’s range to the specified array of values. - * - * The array must contain two or more elements. Unlike the domain, elements in the given array need not be temporal domain values; - * any value that is supported by the underlying interpolator will work, though note that numeric ranges are required for invert. - * - * @param range Array of range values. - */ - range(range: ReadonlyArray<Range>): this; - - /** - * Sets the scale’s range to the specified array of values while also setting the scale’s interpolator to interpolateRound. - * - * The rounding interpolator is sometimes useful for avoiding antialiasing artifacts, - * though also consider the shape-rendering “crispEdges†styles. Note that this interpolator can only be used with numeric ranges. - * - * The array must contain two or more elements. Unlike the domain, elements in the given array need not be temporal domain values; - * any value that is supported by the underlying interpolator will work, though note that numeric ranges are required for invert. - * - * @param range Array of range values. - */ - rangeRound(range: NumberValue[]): this; - - /** - * Returns whether or not the scale currently clamps values to within the range. - */ - clamp(): boolean; - /** - * Enables or disables clamping, respectively. If clamping is disabled and the scale is passed a value outside the domain, - * the scale may return a value outside the range through extrapolation. - * - * If clamping is enabled, the return value of the scale is always within the scale’s range. Clamping similarly applies to the "invert" method. - * - * @param clamp A flag to enable (true) or disable (false) clamping. - */ - clamp(clamp: boolean): this; - - /** - * Returns the scale’s current interpolator factory, which defaults to interpolate. - */ - interpolate(): InterpolatorFactory<any, any>; - - /** - * Sets the scale’s range interpolator factory. This interpolator factory is used to create interpolators for each adjacent pair of values from the range; - * these interpolators then map a normalized domain parameter t in [0, 1] to the corresponding value in the range. - * - * Note: the default interpolator may reuse return values. For example, if the range values are objects, then the value interpolator always returns the same object, modifying it in-place. - * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); - * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. - * - * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. - * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. - */ - interpolate(interpolate: InterpolatorFactory<Range, Output>): this; - /** - * Sets the scale’s range interpolator factory. This interpolator factory is used to create interpolators for each adjacent pair of values from the range; - * these interpolators then map a normalized domain parameter t in [0, 1] to the corresponding value in the range. - * - * Note: the default interpolator may reuse return values. For example, if the range values are objects, then the value interpolator always returns the same object, modifying it in-place. - * If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); - * however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. - * - * As part of the interpolation process the interpolated value from the range may be converted to a corresponding output value. - * - * The generic "NewOutput" can be used to change the scale to have a different output element type corresponding to the new interpolation factory. - * - * @param interpolate An interpolation factory. The generics for Range and Output of the scale must correspond to the interpolation factory applied to the scale. - */ - interpolate<NewOutput>(interpolate: InterpolatorFactory<Range, NewOutput>): ScaleTime<Range, NewOutput>; - - /** - * Returns representative dates from the scale’s domain. The returned tick values are uniformly-spaced (mostly), - * have sensible values (such as every day at midnight), and are guaranteed to be within the extent of the domain. - * Ticks are often used to display reference lines, or tick marks, in conjunction with the visualized data. - * - * Without specifying a count or time interval to control the number of ticks returned, a default count of 10 is used. - * The specified count is only a hint; the scale may return more or fewer values depending on the domain. - */ - ticks(): Date[]; - /** - * Returns representative dates from the scale’s domain. The returned tick values are uniformly-spaced (mostly), - * have sensible values (such as every day at midnight), and are guaranteed to be within the extent of the domain. - * Ticks are often used to display reference lines, or tick marks, in conjunction with the visualized data. - * - * The specified count controls the number of ticks to be returned. The specified count is only a hint; - * the scale may return more or fewer values depending on the domain. - * - * @param count Expected number of ticks. - */ - ticks(count: number): Date[]; - /** - * Returns representative dates from the scale’s domain. The returned tick values are uniformly-spaced (mostly), - * have sensible values (such as every day at midnight), and are guaranteed to be within the extent of the domain. - * Ticks are often used to display reference lines, or tick marks, in conjunction with the visualized data. - * - * The specified time interval controls the ticks generated and returned. To prune the generated ticks for a given time interval, - * use interval.every(...) or interval.filter(...). - * - * @param interval A time interval to specify the expected ticks. - */ - ticks(interval: TimeInterval): Date[]; - - /** - * Returns a time format function suitable for displaying tick values. - * - * The default multi-scale time format chooses a human-readable representation based on the specified date as follows: - * - * - %Y - for year boundaries, such as 2011. - * - %B - for month boundaries, such as February. - * - %b %d - for week boundaries, such as Feb 06. - * - %a %d - for day boundaries, such as Mon 07. - * - %I %p - for hour boundaries, such as 01 AM. - * - %I:%M - for minute boundaries, such as 01:23. - * - :%S - for second boundaries, such as :45. - * - .%L - milliseconds for all other times, such as .012. - * - * Although somewhat unusual, this default behavior has the benefit of providing both local and global context: - * for example, formatting a sequence of ticks as [11 PM, Mon 07, 01 AM] reveals information about hours, dates, and day simultaneously, - * rather than just the hours [11 PM, 12 AM, 01 AM]. - */ - tickFormat(): (d: Date) => string; - /** - * Returns a time format function suitable for displaying tick values. - * - * The specified count is currently ignored, but is accepted for consistency with other scales such as continuous.tickFormat. - * - * @param count Expected number of ticks. (Currently ignored) - * @param specifier An optional valid date format specifier string (see d3-time-format). - */ - tickFormat(count: number, specifier?: string): (d: Date) => string; - /** - * Returns a time format function suitable for displaying tick values. - * - * The specified time interval is currently ignored, but is accepted for consistency with other scales such as continuous.tickFormat. - * - * @param interval A time interval to specify the expected ticks. (Currently ignored) - * @param specifier An optional valid date format specifier string (see d3-time-format). - */ - tickFormat(interval: TimeInterval, specifier?: string): (d: Date) => string; - - /** - * Extends the domain so that it starts and ends on nice round values. - * This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. - * - * Nicing is useful if the domain is computed from data, say using extent, and may be irregular. - * For example, for a domain of [2009-07-13T00:02, 2009-07-13T23:48], the nice domain is [2009-07-13, 2009-07-14]. - * If the domain has more than two values, nicing the domain only affects the first and last value. - */ - nice(): this; - /** - * Extends the domain so that it starts and ends on nice round values. - * This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. - * - * A tick count argument allows greater control over the step size used to extend the bounds, guaranteeing that the returned ticks will exactly cover the domain. - * - * Nicing is useful if the domain is computed from data, say using extent, and may be irregular. - * For example, for a domain of [2009-07-13T00:02, 2009-07-13T23:48], the nice domain is [2009-07-13, 2009-07-14]. - * If the domain has more than two values, nicing the domain only affects the first and last value. - * - * @param count Expected number of ticks. - */ - nice(count: number): this; - /** - * Extends the domain so that it starts and ends on nice round values. - * This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. - * - * a time interval may be specified to explicitly set the ticks. If an interval is specified, an optional step may also be specified to skip some ticks. - * For example, time.nice(d3.timeSecond, 10) will extend the domain to an even ten seconds (0, 10, 20, etc.). - * - * Nicing is useful if the domain is computed from data, say using extent, and may be irregular. - * For example, for a domain of [2009-07-13T00:02, 2009-07-13T23:48], the nice domain is [2009-07-13, 2009-07-14]. - * If the domain has more than two values, nicing the domain only affects the first and last value. - * - * @param interval A time interval to specify the expected ticks. - * @param step An optional step number to be applied to the time interval when considering ticks. - */ - nice(interval: CountableTimeInterval, step?: number): this; - - /** - * Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. - */ - copy(): this; - - /** - * Returns the current unknown value, which defaults to undefined. - */ - unknown(): Range | undefined; - /** - * Sets the output value of the scale for undefined (or NaN) input values and returns this scale. - * - * @param value The output value of the scale for undefined (or NaN) input values. - */ - unknown(value: Range | undefined): this; -} - -/** - * Constructs a new time scale with the specified range, the default interpolator and clamping disabled. - * The domain defaults to [2000-01-01, 2000-01-02]. - * If range is not specified, it defaults to [0, 1]. - * - * The first generic corresponds to the data type of the range elements. - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - * - * The range must be set in accordance with the range element type. - * - * The interpolator factory may be set using the interpolate(...) method of the scale. - * - * @param range Array of range values. - */ -export function scaleTime<Range = number, Output = Range>(range?: ReadonlyArray<Range>): ScaleTime<Range, Output>; -/** - * Constructs a new time scale with the specified domain and range, the default interpolator and clamping disabled. - * - * The first generic corresponds to the data type of the range elements. - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - * - * The range must be set in accordance with the range element type. - * - * The interpolator factory may be set using the interpolate(...) method of the scale. - * - * @param domain Array of temporal domain values. Numeric values will be coerced to dates. - * @param range Array of range values. - */ -export function scaleTime<Range, Output = Range>( - domain: Array<Date | NumberValue>, - range: ReadonlyArray<Range> -): ScaleTime<Range, Output>; - -/** - * Constructs a new time scale using Coordinated Universal Time (UTC) with the specified range, the default interpolator and clamping disabled. - * The domain defaults to [2000-01-01, 2000-01-02]. - * If range is not specified, it defaults to [0, 1]. - * - * The first generic corresponds to the data type of the range elements. - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - * - * The range must be set in accordance with the range element type. - * - * The interpolator factory may be set using the interpolate(...) method of the scale. - * - * @param range Array of range values. - */ -export function scaleUtc<Range = number, Output = Range>(range?: ReadonlyArray<Range>): ScaleTime<Range, Output>; -/** - * Constructs a new time scale using Coordinated Universal Time (UTC) with the specified domain and range, the default interpolator and clamping disabled. - * - * The first generic corresponds to the data type of the range elements. - * The second generic corresponds to the data type of the output elements generated by the scale. - * - * If range element and output element type differ, the interpolator factory used with the scale must match this behavior and - * convert the interpolated range element to a corresponding output element. - * - * The range must be set in accordance with the range element type. - * - * The interpolator factory may be set using the interpolate(...) method of the scale. - * - * @param domain Array of temporal domain values. Numeric values will be coerced to dates. - * @param range Array of range values. - */ -export function scaleUtc<Range, Output = Range>( - domain: NumberValue[], - range: ReadonlyArray<Range> -): ScaleTime<Range, Output>; - -// ------------------------------------------------------------------------------- -// Sequential Scale Factory -// ------------------------------------------------------------------------------- - -/** - * Sequential scales are similar to continuous scales in that they map a continuous, - * numeric input domain to a continuous output range. However, unlike continuous scales, - * the output range of a sequential scale is fixed by its interpolator and not configurable. - * - * The generic corresponds to the data type of the output of the interpolator underlying the scale. - */ -export interface ScaleSequential<Output> { - /** - * Given a value from the domain, returns the corresponding value from the output range, subject to interpolation. - * - * If the given value is outside the domain, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the range. - * - * @param value A numeric value from the domain. - */ - (value: NumberValue): Output | undefined; - - /** - * Returns a copy of the scale’s current domain. - */ - domain(): [number, number]; - /** - * Sets the scale’s domain to the specified array of numbers. The array must contain exactly two elements. - * If the elements in the given array are not numbers, they will be coerced to numbers - * - * @param domain A two-element array of numeric domain values. - */ - domain(domain: [NumberValue, NumberValue]): this; - - /** - * Returns whether or not the scale currently clamps values to within the range. - */ - clamp(): boolean; - /** - * Enables or disables clamping, respectively. If clamping is disabled and the scale is passed a value outside the domain, - * the scale may return a value outside the range through extrapolation. - * - * If clamping is enabled, the return value of the scale is always within the scale’s range. Clamping similarly applies to the "invert" method. - * - * @param clamp A flag to enable (true) or disable (false) clamping. - */ - clamp(clamp: boolean): this; - - /** - * Returns the current interpolator underlying the scale. - */ - interpolator(): (t: number) => Output; - /** - * Sets the scale’s interpolator to the specified function. - * - * @param interpolator An interpolator function mapping a value from the [0, 1] interval to an output value. - */ - interpolator(interpolator: (t: number) => Output): this; - /** - * Sets the scale’s interpolator to the specified function. - * - * The generic corresponds to a the new output type of the scale. The output type of the scale is determined by the output type of the interpolator function. - * - * @param interpolator An interpolator function mapping a value from the [0, 1] interval to an output value. - */ - interpolator<NewOutput>(interpolator: (t: number) => NewOutput): ScaleSequential<NewOutput>; - - /** - * Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. - */ - copy(): ScaleSequential<Output>; - - /** - * Returns the current unknown value, which defaults to undefined. - */ - unknown(): number | undefined; - /** - * Sets the output value of the scale for undefined (or NaN) input values and returns this scale. - * - * @param value The output value of the scale for undefined (or NaN) input values. - */ - unknown(value: number | undefined): this; -} - -/** - * Constructs a new sequential scale with the specified interpolator function. - * The domain defaults to [0, 1]. - * If interpolator is not specified, it defaults to the identity function. - * When the scale is applied, the interpolator will be invoked with a value typically in the range [0, 1], where 0 represents the minimum value and 1 represents the maximum value. - * - * The generic corresponds to the data type of the output of the interpolator underlying the scale. - * - * @param interpolator The interpolator function to be used with the scale. - */ -export function scaleSequential<Output = number>(interpolator?: (t: number) => Output): ScaleSequential<Output>; -/** - * Constructs a new sequential scale with the specified domain and interpolator function. - * When the scale is applied, the interpolator will be invoked with a value typically in the range [0, 1], where 0 represents the minimum value and 1 represents the maximum value. - * - * The generic corresponds to the data type of the output of the interpolator underlying the scale. - * - * @param domain A two-element array of numeric domain values. - * @param interpolator The interpolator function to be used with the scale. - */ -export function scaleSequential<Output>( - domain: [NumberValue, NumberValue], - interpolator: (t: number) => Output -): ScaleSequential<Output>; - -/** - * A sequential scale with a logarithmic transform, analogous to a log scale. - * - * The generic corresponds to the data type of the output of the interpolator underlying the scale. - * - * @param interpolator The interpolator function to be used with the scale. - */ -export function scaleSequentialLog<Output = number>(interpolator?: (t: number) => Output): ScaleSequential<Output>; -/** - * A sequential scale with a logarithmic transform, analogous to a log scale. - * - * The generic corresponds to the data type of the output of the interpolator underlying the scale. - * - * @param domain A two-element array of numeric domain values. - * @param interpolator The interpolator function to be used with the scale. - */ -export function scaleSequentialLog<Output>( - domain: [NumberValue, NumberValue], - interpolator: (t: number) => Output -): ScaleSequential<Output>; - -/** - * A sequential scale with a exponential transform, analogous to a power scale. - * - * The generic corresponds to the data type of the output of the interpolator underlying the scale. - * - * @param interpolator The interpolator function to be used with the scale. - */ -export function scaleSequentialPow<Output = number>(interpolator?: (t: number) => Output): ScaleSequential<Output>; -/** - * A sequential scale with a exponential transform, analogous to a power scale. - * - * The generic corresponds to the data type of the output of the interpolator underlying the scale. - * - * @param domain A two-element array of numeric domain values. - * @param interpolator The interpolator function to be used with the scale. - */ -export function scaleSequentialPow<Output>( - domain: [NumberValue, NumberValue], - interpolator: (t: number) => Output -): ScaleSequential<Output>; - -/** - * A sequential scale with a square-root transform, analogous to a d3.scaleSqrt. - * - * The generic corresponds to the data type of the output of the interpolator underlying the scale. - * - * @param interpolator The interpolator function to be used with the scale. - */ -export function scaleSequentialSqrt<Output = number>(interpolator?: (t: number) => Output): ScaleSequential<Output>; -/** - * A sequential scale with a square-root transform, analogous to a d3.scaleSqrt. - * - * The generic corresponds to the data type of the output of the interpolator underlying the scale. - * - * @param domain A two-element array of numeric domain values. - * @param interpolator The interpolator function to be used with the scale. - */ -export function scaleSequentialSqrt<Output>( - domain: [NumberValue, NumberValue], - interpolator: (t: number) => Output -): ScaleSequential<Output>; - -/** - * A sequential scale with a symmetric logarithmic transform, analogous to a symlog scale. - * - * The generic corresponds to the data type of the output of the interpolator underlying the scale. - * - * @param interpolator The interpolator function to be used with the scale. - */ -export function scaleSequentialSymlog<Output = number>(interpolator?: (t: number) => Output): ScaleSequential<Output>; -/** - * A sequential scale with a symmetric logarithmic transform, analogous to a symlog scale. - * - * The generic corresponds to the data type of the output of the interpolator underlying the scale. - * - * @param domain A two-element array of numeric domain values. - * @param interpolator The interpolator function to be used with the scale. - */ -export function scaleSequentialSymlog<Output>( - domain: [NumberValue, NumberValue], - interpolator: (t: number) => Output -): ScaleSequential<Output>; - -/** - * A sequential scale using a p-quantile transform, analogous to a quantile scale. - * - * The generic corresponds to the data type of the output of the interpolator underlying the scale. - * - * @param interpolator The interpolator function to be used with the scale. - */ -export function scaleSequentialQuantile<Output = number>(interpolator?: (t: number) => Output): ScaleSequential<Output>; -/** - * A sequential scale using a p-quantile transform, analogous to a quantile scale. - * - * The generic corresponds to the data type of the output of the interpolator underlying the scale. - * - * @param domain A two-element array of numeric domain values. - * @param interpolator The interpolator function to be used with the scale. - */ -export function scaleSequentialQuantile<Output>( - domain: [NumberValue, NumberValue], - interpolator: (t: number) => Output -): ScaleSequential<Output>; - -// ------------------------------------------------------------------------------- -// Diverging Scale Factory -// ------------------------------------------------------------------------------- - -/** - * Diverging scales, like sequential scales, are similar to continuous scales in that they map a continuous, numeric input domain to a continuous output range. - * However, unlike continuous scales, the output range of a diverging scale is fixed by its interpolator and not configurable. - * These scales do not expose invert, range, rangeRound and interpolate methods. - * - * The generic corresponds to the data type of the interpolator return type. - */ -export interface ScaleDiverging<Output> { - /** - * Given a value from the domain, returns the corresponding value subject to interpolation. - * - * If the given value is outside the domain, and clamping is not enabled, the mapping may be extrapolated such that the returned value is outside the range. - * - * @param value A numeric value from the domain. - */ - (value: NumberValue): Output | undefined; - - /** - * Returns a copy of the scale’s current domain. - */ - domain(): [number, number, number]; - /** - * Sets the scale’s domain to the specified array of numbers. - * The domain must be numeric and must contain exactly three values. The default domain is [0, 0.5, 1]. - * If the elements in the given array are not numbers, they will be coerced to numbers - * - * @param domain Array of three numeric domain values. - */ - domain( - domain: [NumberValue, NumberValue, NumberValue], - ): this; - - /** - * Returns whether or not the scale currently clamps values to within the range. - */ - clamp(): boolean; - /** - * Enables or disables clamping, respectively. If clamping is disabled and the scale is passed a value outside the domain, - * the scale may return a value outside the range through extrapolation. - * - * If clamping is enabled, the return value of the scale is always within the interpolator scale’s range. - * - * @param clamp A flag to enable (true) or disable (false) clamping. - */ - clamp(clamp: boolean): this; - - /** - * Returns the scale’s current interpolator. - */ - interpolator(): (t: number) => Output; - /** - * Sets the scale’s interpolator to the specified function. - * - * @param interpolator The scale’s interpolator. - */ - interpolator(interpolator?: (t: number) => Output): this; - - /** - * Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. - */ - copy(): this; - - /** - * Returns the current unknown value, which defaults to undefined. - */ - unknown(): number | undefined; - /** - * Sets the output value of the scale for undefined (or NaN) input values and returns this scale. - * - * @param value The output value of the scale for undefined (or NaN) input values. - */ - unknown(value: number | undefined): this; -} - -/** - * Constructs a new diverging scale with the specified interpolator function. - * The domain defaults to [0, 1]. - * If interpolator is not specified, it defaults to the identity function. - * When the scale is applied, the interpolator will be invoked with a value typically in the range [0, 1], - * where 0 represents the extreme negative value, 0.5 represents the neutral value, and 1 represents the extreme positive value. - * - * The generic corresponds to the data type of the interpolator return type. - * - * @param interpolator The scale’s interpolator. - */ -export function scaleDiverging<Output = number>(interpolator?: (t: number) => Output): ScaleDiverging<Output>; -/** - * Constructs a new diverging scale with the specified domain and interpolator function. - * When the scale is applied, the interpolator will be invoked with a value typically in the range [0, 1], - * where 0 represents the extreme negative value, 0.5 represents the neutral value, and 1 represents the extreme positive value. - * - * The generic corresponds to the data type of the interpolator return type. - * - * @param domain Array of three numeric domain values. - * @param interpolator The scale’s interpolator. - */ -export function scaleDiverging<Output>( - domain: [NumberValue, NumberValue, NumberValue], - interpolator: (t: number) => Output -): ScaleDiverging<Output>; - -/** - * A diverging scale with a logarithmic transform, analogous to a log scale. - * - * The generic corresponds to the data type of the interpolator return type. - * - * @param interpolator The scale’s interpolator. - */ -export function scaleDivergingLog<Output = number>(interpolator?: (t: number) => Output): ScaleDiverging<Output>; -/** - * A diverging scale with a logarithmic transform, analogous to a log scale. - * - * The generic corresponds to the data type of the interpolator return type. - * - * @param domain Array of three numeric domain values. - * @param interpolator The scale’s interpolator. - */ -export function scaleDivergingLog<Output>( - domain: [NumberValue, NumberValue, NumberValue], - interpolator: (t: number) => Output -): ScaleDiverging<Output>; - -/** - * A diverging scale with a exponential transform, analogous to a power scale. - * - * The generic corresponds to the data type of the interpolator return type. - * - * @param interpolator The scale’s interpolator. - */ -export function scaleDivergingPow<Output = number>(interpolator?: (t: number) => Output): ScaleDiverging<Output>; -/** - * A diverging scale with a exponential transform, analogous to a power scale. - * - * The generic corresponds to the data type of the interpolator return type. - * - * @param domain Array of three numeric domain values. - * @param interpolator The scale’s interpolator. - */ -export function scaleDivergingPow<Output>( - domain: [NumberValue, NumberValue, NumberValue], - interpolator: (t: number) => Output -): ScaleDiverging<Output>; - -/** - * A diverging scale with a square-root transform, analogous to a d3.scaleSqrt. - * - * The generic corresponds to the data type of the interpolator return type. - * - * @param interpolator The scale’s interpolator. - */ -export function scaleDivergingSqrt<Output = number>(interpolator?: (t: number) => Output): ScaleDiverging<Output>; -/** - * A diverging scale with a square-root transform, analogous to a d3.scaleSqrt. - * - * The generic corresponds to the data type of the interpolator return type. - * - * @param domain Array of three numeric domain values. - * @param interpolator The scale’s interpolator. - */ -export function scaleDivergingSqrt<Output>( - domain: [NumberValue, NumberValue, NumberValue], - interpolator: (t: number) => Output -): ScaleDiverging<Output>; - -/** - * A diverging scale with a symmetric logarithmic transform, analogous to a symlog scale. - * - * The generic corresponds to the data type of the interpolator return type. - * - * @param interpolator The scale’s interpolator. - */ -export function scaleDivergingSymlog<Output = number>(interpolator?: (t: number) => Output): ScaleDiverging<Output>; -/** - * A diverging scale with a symmetric logarithmic transform, analogous to a symlog scale. - * - * The generic corresponds to the data type of the interpolator return type. - * - * @param domain Array of three numeric domain values. - * @param interpolator The scale’s interpolator. - */ -export function scaleDivergingSymlog<Output>( - domain: [NumberValue, NumberValue, NumberValue], - interpolator: (t: number) => Output -): ScaleDiverging<Output>; - -// ------------------------------------------------------------------------------- -// Quantize Scale Factory -// ------------------------------------------------------------------------------- - -/** - * Quantize scales are similar to linear scales, except they use a discrete rather than continuous range. - * The continuous input domain is divided into uniform segments based on the number of values in (i.e., the cardinality of) the output range. - * - * Each range value y can be expressed as a quantized linear function of the domain value x: y = m round(x) + b. - * - * The generic corresponds to the data type of the range elements. - */ -export interface ScaleQuantize<Range> { - /** - * Given a value in the input domain, returns the corresponding value in the output range. - */ - (value: NumberValue): Range | undefined; - /** - * Returns the extent of values in the domain [x0, x1] for the corresponding value in the range: the inverse of quantize. - * This method is useful for interaction, say to determine the value in the domain that corresponds to the pixel location under the mouse. - * - * If an invalid range value is entered, returns [NaN, NaN]. - * - * @param value A value from the range. - */ - invertExtent(value: Range): [number, number]; - - /** - * Returns the scale’s current domain. - */ - domain(): [number, number]; - - /** - * Sets the scale’s domain to the specified two-element array of numbers. - * If the elements in the given array are not numbers, they will be coerced to numbers. - * - * @param domain A two-element array of numeric values defining the domain. - */ - domain(domain: [NumberValue, NumberValue]): this; - - /** - * Returns the scale’s current range. - */ - range(): Range[]; - /** - * Sets the scale’s range to the specified array of values. The array may contain any number of discrete values. - * - * @param range Array of range values. - */ - range(range: ReadonlyArray<Range>): this; - - /** - * Returns approximately count representative values from the scale’s domain. - * - * If count is not specified, it defaults to 10. - * - * The returned tick values are uniformly spaced, have human-readable values (such as multiples of powers of 10), - * and are guaranteed to be within the extent of the domain. Ticks are often used to display reference lines, or tick marks, in conjunction with the visualized data. - * The specified count is only a hint; the scale may return more or fewer values depending on the domain. See also d3-array’s ticks. - * - * @param count Optional approximate number of ticks to be returned. If count is not specified, it defaults to 10. - */ - ticks(count?: number): number[]; - - /** - * Returns a number format function suitable for displaying a tick value, automatically computing the appropriate precision based on the fixed interval between tick values. - * The specified count should have the same value as the count that is used to generate the tick values. - * - * @param count Approximate number of ticks to be used when calculating precision for the number format function. - * @param specifier An optional valid format specifier string which allows a custom format where the precision of the format is automatically set by the scale as appropriate for the tick interval. - * If specifier uses the format type "s", the scale will return a SI-prefix format based on the largest value in the domain. - * If the specifier already specifies a precision, this method is equivalent to locale.format. - */ - tickFormat(count?: number, specifier?: string): (d: NumberValue) => string; - - /** - * Extends the domain so that it starts and ends on nice round values. - * This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. - * - * Nicing is useful if the domain is computed from data, say using extent, and may be irregular. - * For example, for a domain of [0.201479…, 0.996679…], a nice domain might be [0.2, 1.0]. - * - * Nicing a scale only modifies the current domain; it does not automatically nice domains that are subsequently set using continuous.domain. - * You must re-nice the scale after setting the new domain, if desired. - * - * @param count An optional number of ticks expected to be used. - */ - nice(count?: number): this; - - /** - * Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. - */ - copy(): this; - - /** - * Returns the current unknown value, which defaults to undefined. - */ - unknown(): Range | undefined; - /** - * Sets the output value of the scale for undefined (or NaN) input values and returns this scale. - * - * @param value The output value of the scale for undefined (or NaN) input values. - */ - unknown(value: Range | undefined): this; -} - -/** - * Constructs a new quantize scale with the specified range. - * The domain defaults to [0, 1]. - * If range is not specified, it defaults to [0, 1]. - * Thus, the default quantize scale is equivalent to the Math.round function. - * - * The range must be set corresponding to the type of the range elements. - * - * The generic corresponds to the data type of the range elements. - * - * @param range Array of range values. - */ -export function scaleQuantize<Range = number>(range?: ReadonlyArray<Range>): ScaleQuantize<Range>; -/** - * Constructs a new quantize scale with the specified domain and range. - * Thus, the default quantize scale is equivalent to the Math.round function. - * - * The range must be set corresponding to the type of the range elements. - * - * The generic corresponds to the data type of the range elements. - * - * @param domain A two-element array of numeric values defining the domain. - * @param range Array of range values. - */ -export function scaleQuantize<Range>( - domain: [NumberValue, NumberValue], - range: ReadonlyArray<Range> -): ScaleQuantize<Range>; - -// ------------------------------------------------------------------------------- -// Quantile Scale Factory -// ------------------------------------------------------------------------------- - -/** - * Quantile scales map a sampled input domain to a discrete range. - * The domain is considered continuous and thus the scale will accept any reasonable input value; - * however, the domain is specified as a discrete set of sample values. - * The number of values in (the cardinality of) the output range determines the number of quantiles that will be computed from the domain. - * To compute the quantiles, the domain is sorted, and treated as a population of discrete values; see d3-array’s quantile. - * - * The generic corresponds to the data type of range elements. - */ -export interface ScaleQuantile<Range> { - /** - * Given a value in the input domain, returns the corresponding value in the output range. - * - * @param value A numeric value in the input domain. - */ - (value: NumberValue): Range | undefined; - - /** - * Returns the extent of values in the domain [x0, x1] for the corresponding value in the range: the inverse of quantile. - * This method is useful for interaction, say to determine the value in the domain that corresponds to the pixel location under the mouse. - * - * @param value A value from the range. - */ - invertExtent(value: Range): [number, number]; - - /** - * Returns the scale’s current domain. - */ - domain(): number[]; - /** - * Sets the domain of the quantile scale to the specified set of discrete numeric values. - * The array must not be empty, and must contain at least one numeric value; NaN, null and undefined values are ignored and not considered part of the sample population. - * - * If the elements in the given array are not numbers, they will be coerced to numbers. A copy of the input array is sorted and stored internally. - * - * @param domain Array of domain values. - */ - domain(domain: Array<NumberValue | null | undefined>): this; - - /** - * Returns the current range. - */ - range(): Range[]; - /** - * Sets the discrete values in the range. The array must not be empty. - * The number of values in (the cardinality, or length, of) the range array determines the number of quantiles that are computed. - * - * For example, to compute quartiles, range must be an array of four elements such as [0, 1, 2, 3]. - * - * @param range Array of range values. - */ - range(range: ReadonlyArray<Range>): this; - - /** - * Returns the quantile thresholds. If the range contains n discrete values, the returned array will contain n - 1 thresholds. - * Values less than the first threshold are considered in the first quantile; - * values greater than or equal to the first threshold but less than the second threshold are in the second quantile, and so on. - * Internally, the thresholds array is used with bisect to find the output quantile associated with the given input value. - */ - quantiles(): number[]; - - /** - * Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. - */ - copy(): this; - - /** - * Returns the current unknown value, which defaults to undefined. - */ - unknown(): Range | undefined; - /** - * Sets the output value of the scale for undefined (or NaN) input values and returns this scale. - * - * @param value The output value of the scale for undefined (or NaN) input values. - */ - unknown(value: Range | undefined): this; -} - -/** - * Constructs a new quantile scale with the specified range. - * The domain defaults to the empty array. - * If range is not specified, it defaults to the empty array. - * The quantile scale is invalid until both a domain and range are specified. - * - * The generic corresponds to the data type of range elements. - * - * @param range Array of range values. - */ -export function scaleQuantile<Range = number>(range?: ReadonlyArray<Range>): ScaleQuantile<Range>; -/** - * Constructs a new quantile scale with the specified domain and range. - * The quantile scale is invalid until both a domain and range are specified. - * - * The generic corresponds to the data type of range elements. - * - * @param domain Array of domain values. - * @param range Array of range values. - */ -export function scaleQuantile<Range>( - domain: Array<NumberValue | null | undefined>, - range: ReadonlyArray<Range> -): ScaleQuantile<Range>; - -// ------------------------------------------------------------------------------- -// Threshold Scale Factory -// ------------------------------------------------------------------------------- - -/** - * Threshold scales are similar to quantize scales, except they allow you to map arbitrary subsets of the domain to discrete values in the range. - * The input domain is still continuous, and divided into slices based on a set of threshold values. - * - * If the number of values in the scale’s range is N+1, the number of values in the scale’s domain must be N. - * If there are fewer than N elements in the domain, the additional values in the range are ignored. - * If there are more than N elements in the domain, the scale may return undefined for some inputs. - * - * The first generic corresponds to the data type of domain values. - * The second generic corresponds to the data type of range values. - */ -export interface ScaleThreshold<Domain extends number | string | Date, Range> { - /** - * Given a value in the input domain, returns the corresponding value in the output range. - * - * @param value A domain value. - */ - (value: Domain): Range | undefined; - - /** - * Returns the extent of values in the domain [x0, x1] for the corresponding value in the range, representing the inverse mapping from range to domain. - * This method is useful for interaction, say to determine the value in the domain that corresponds to the pixel location under the mouse. - * - * @param value A range value. - */ - invertExtent(value: Range): [Domain | undefined, Domain | undefined]; - - /** - * Returns the scale’s current domain. - */ - domain(): Domain[]; - /** - * Sets the scale’s domain to the specified array of values. The values must be in sorted ascending order, or the behavior of the scale is undefined. - * The values are typically numbers, but any naturally ordered values (such as strings) will work; a threshold scale can be used to encode any type that is ordered. - * If the number of values in the scale’s range is N+1, the number of values in the scale’s domain must be N. - * If there are fewer than N elements in the domain, the additional values in the range are ignored. - * If there are more than N elements in the domain, the scale may return undefined for some inputs. - * - * @param domain Array of domain values. - */ - domain(domain: ReadonlyArray<Domain>): this; - - /** - * Returns the scale’s current range. - */ - range(): Range[]; - /** - * Sets the scale’s range to the specified array of values. If the number of values in the scale’s domain is N, the number of values in the scale’s range must be N+1. - * If there are fewer than N+1 elements in the range, the scale may return undefined for some inputs. - * If there are more than N+1 elements in the range, the additional values are ignored. - * - * @param range Array of range values. - */ - range(range: ReadonlyArray<Range>): this; - - /** - * Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. - */ - copy(): this; - - /** - * Returns the current unknown value, which defaults to undefined. - */ - unknown(): Range | undefined; - /** - * Sets the output value of the scale for undefined (or NaN) input values and returns this scale. - * - * @param value The output value of the scale for undefined (or NaN) input values. - */ - unknown(value: Range | undefined): this; -} - -/** - * Constructs a new threshold scale with the specified range. - * The domain defaults to [0.5]. - * If range is not specified, it defaults to [0, 1]. - * Thus, the default threshold scale is equivalent to the Math.round function for numbers; for example threshold(0.49) returns 0, and threshold(0.51) returns 1. - * - * The first generic corresponds to the data type of domain values. - * The second generic corresponds to the data type of range values. - * - * @param range Array of range values. - */ -export function scaleThreshold<Domain extends number | string | Date = number, Range = number>( - range?: ReadonlyArray<Range>, -): ScaleThreshold<Domain, Range>; -/** - * Constructs a new threshold scale with the specified domain and range. - * Thus, the default threshold scale is equivalent to the Math.round function for numbers; for example threshold(0.49) returns 0, and threshold(0.51) returns 1. - * - * The first generic corresponds to the data type of domain values. - * The second generic corresponds to the data type of range values. - * - * @param domain Array of domain values. - * @param range Array of range values. - */ -export function scaleThreshold<Domain extends number | string | Date, Range>( - domain: ReadonlyArray<Domain>, - range: ReadonlyArray<Range>, -): ScaleThreshold<Domain, Range>; - -// ------------------------------------------------------------------------------- -// Ordinal Scale Factory -// ------------------------------------------------------------------------------- - -/** - * Unlike continuous scales, ordinal scales have a discrete domain and range. For example, an ordinal scale might map a set of named categories to a set of colors, - * or determine the horizontal positions of columns in a column chart. - * - * The first element in the domain will be mapped to the first element in range, the second domain value to the second range value, and so on. - * If there are fewer elements in the range than in the domain, the scale will reuse values from the start of the range. - * - * The first generic corresponds to the data type of domain values. - * The second generic corresponds to the data type of range values. - */ -export interface ScaleOrdinal<Domain extends { toString(): string }, Range> { - /** - * Given a value in the input domain, returns the corresponding value in the output range. - * If the given value is not in the scale’s domain, returns the unknown; or, if the unknown value is implicit (the default), - * then the value is implicitly added to the domain and the next-available value in the range is assigned to value, - * such that this and subsequent invocations of the scale given the same input value return the same output value. - * - * @param x A value from the domain. - */ - (x: Domain): Range; - - /** - * Returns the scale's current domain. - */ - domain(): Domain[]; - /** - * Sets the domain to the specified array of values. - * - * The first element in domain will be mapped to the first element in the range, - * the second domain value to the second range value, and so on. - * - * Domain values are stored internally in a map from stringified value to index; the resulting index is then used to retrieve a value from the range. - * Thus, an ordinal scale’s values must be coercible to a string, and the stringified version of the domain value uniquely identifies the corresponding range value. - * - * Setting the domain on an ordinal scale is optional if the unknown value is implicit (the default). - * In this case, the domain will be inferred implicitly from usage by assigning each unique value passed to the scale a new value from the range. - * Note that an explicit domain is recommended to ensure deterministic behavior, as inferring the domain from usage will be dependent on ordering. - * - * @param domain Array of domain values. - */ - domain(domain: ReadonlyArray<Domain>): this; - - /** - * Returns the scale's current range. - */ - range(): Range[]; - /** - * Sets the range of the ordinal scale to the specified array of values. - * - * The first element in the domain will be mapped to the first element in range, the second domain value to the second range value, and so on. - * - * If there are fewer elements in the range than in the domain, the scale will reuse values from the start of the range. - * - * @param range Array of range values. - */ - range(range: ReadonlyArray<Range>): this; - - /** - * Returns the current unknown value, which defaults to "implicit". - */ - unknown(): Range | { name: 'implicit' }; - /** - * Sets the output value of the scale for unknown input values and returns this scale. - * The implicit value enables implicit domain construction. scaleImplicit can be used as a convenience to set the implicit value. - * - * @param value Unknown value to be used or scaleImplicit to set implicit scale generation. - */ - unknown(value: Range | { name: 'implicit' }): this; - - /** - * Returns an exact copy of this ordinal scale. Changes to this scale will not affect the returned scale, and vice versa. - */ - copy(): this; -} - -/** - * Constructs a new ordinal scale with the specified range. - * The domain defaults to the empty array. - * If range is not specified, it defaults to the empty array; an ordinal scale always returns undefined until a non-empty range is defined. - * - * The generic corresponds to the data type of range elements. - * - * @param range An optional array of range values to initialize the scale with. - */ -export function scaleOrdinal<Range>(range?: ReadonlyArray<Range>): ScaleOrdinal<string, Range>; -/** - * Constructs a new ordinal scale with the specified range. - * The domain defaults to the empty array. - * If range is not specified, it defaults to the empty array; an ordinal scale always returns undefined until a non-empty range is defined. - * - * The first generic corresponds to the data type of domain elements. - * The second generic corresponds to the data type of range elements. - * - * @param range An optional array of range values to initialize the scale with. - */ -export function scaleOrdinal<Domain extends { toString(): string }, Range>( - range?: ReadonlyArray<Range>, -): ScaleOrdinal<Domain, Range>; -/** - * Constructs a new ordinal scale with the specified domain and range. - * - * The first generic corresponds to the data type of domain elements. - * The second generic corresponds to the data type of range elements. - * - * @param domain Array of domain values. - * @param range An optional array of range values to initialize the scale with. - */ -export function scaleOrdinal<Domain extends { toString(): string }, Range>( - domain: ReadonlyArray<Domain>, - range: ReadonlyArray<Range>, -): ScaleOrdinal<Domain, Range>; - -/** - * A special value for ordinal.unknown that enables implicit domain construction: unknown values are implicitly added to the domain. - */ -export const scaleImplicit: { name: 'implicit' }; - -// ------------------------------------------------------------------------------- -// Band Scale Factory -// ------------------------------------------------------------------------------- - -/** - * Band scales are like ordinal scales except the output range is continuous and numeric. - * Discrete output values are automatically computed by the scale by dividing the continuous range into uniform bands. - * Band scales are typically used for bar charts with an ordinal or categorical dimension. - * The unknown value of a band scale is effectively undefined: they do not allow implicit domain construction. - * - * The generic corresponds to the data type of domain elements. - */ -export interface ScaleBand<Domain extends { toString(): string }> { - /** - * Given a value in the input domain, returns the start of the corresponding band derived from the output range. - * If the given value is not in the scale’s domain, returns undefined. - * - * @param x A value from the domain. - */ - (x: Domain): number | undefined; - - /** - * Returns to scale's current domain - */ - domain(): Domain[]; - /** - * Sets the domain to the specified array of values. The first element in domain will be mapped to the first band, the second domain value to the second band, and so on. - * Domain values are stored internally in a map from stringified value to index; the resulting index is then used to determine the band. - * Thus, a band scale’s values must be coercible to a string, and the stringified version of the domain value uniquely identifies the corresponding band. - * - * @param domain Array of domain values. - */ - domain(domain: ReadonlyArray<Domain>): this; - - /** - * Returns the scale’s current range, which defaults to [0, 1]. - */ - range(): [number, number]; - /** - * Sets the scale’s range to the specified two-element array of numbers. If the elements in the given array are not numbers, they will be coerced to numbers. - * The default range is [0, 1]. - * - * @param range A two-element array of numeric values. - */ - range(range: [NumberValue, NumberValue]): this; - - /** - * Sets the scale’s range to the specified two-element array of numbers while also enabling rounding. - * If the elements in the given array are not numbers, they will be coerced to numbers. - * - * Rounding is sometimes useful for avoiding antialiasing artifacts, though also consider the shape-rendering “crispEdges†styles. - * - * @param range A two-element array of numeric values. - */ - rangeRound(range: [NumberValue, NumberValue]): this; - - /** - * Returns the current rounding status for the scale: enabled (= true) or disabled (= false). - */ - round(): boolean; - /** - * Enables or disables rounding accordingly. If rounding is enabled, the start and stop of each band will be integers. - * Rounding is sometimes useful for avoiding antialiasing artifacts, though also consider the shape-rendering “crispEdges†styles. - * Note that if the width of the domain is not a multiple of the cardinality of the range, there may be leftover unused space, even without padding! - * Use band.align to specify how the leftover space is distributed. - * - * @param round Enable rounding (= true), disable rounding (= false). - */ - round(round: boolean): this; - - /** - * Returns the current inner padding which defaults to 0. - */ - paddingInner(): number; - /** - * Sets the inner padding to the specified value which must be in the range [0, 1]. - * The inner padding determines the ratio of the range that is reserved for blank space between bands. - * - * The default setting is 0. - * - * @param padding Value for inner padding in [0, 1] interval. - */ - paddingInner(padding: number): this; - - /** - * Returns the current outer padding which defaults to 0. - */ - paddingOuter(): number; - /** - * Sets the outer padding to the specified value which must be in the range [0, 1]. - * The outer padding determines the ratio of the range that is reserved for blank space before the first band and after the last band. - * - * The default setting is 0. - * - * @param padding Value for outer padding in [0, 1] interval. - */ - paddingOuter(padding: number): this; - - /** - * Returns the inner padding. - */ - padding(): number; - /** - * A convenience method for setting the inner and outer padding to the same padding value. - * - * @param padding Value for inner and outer padding in [0, 1] interval. - */ - padding(padding: number): this; - - /** - * Returns the current alignment which defaults to 0.5. - */ - align(): number; - /** - * Sets the alignment to the specified value which must be in the range [0, 1]. - * - * The default is 0.5. - * - * The alignment determines how any leftover unused space in the range is distributed. - * A value of 0.5 indicates that the leftover space should be equally distributed before the first band and after the last band; - * i.e., the bands should be centered within the range. A value of 0 or 1 may be used to shift the bands to one side, say to position them adjacent to an axis. - * - * @param align Value for alignment setting in [0, 1] interval. - */ - align(align: number): this; - - /** - * Returns the width of each band. - */ - bandwidth(): number; - - /** - * Returns the distance between the starts of adjacent bands. - */ - step(): number; - - /** - * Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. - */ - copy(): this; -} - -/** - * Constructs a new band scale with the specified range, no padding, no rounding and center alignment. - * The domain defaults to the empty domain. - * If range is not specified, it defaults to the unit range [0, 1]. - * - * The generic corresponds to the data type of domain elements. - * - * @param range A two-element array of numeric values. - */ -export function scaleBand<Domain extends { toString(): string } = string>( - range?: [NumberValue, NumberValue] -): ScaleBand<Domain>; -/** - * Constructs a new band scale with the specified domain and range, no padding, no rounding and center alignment. - * - * The generic corresponds to the data type of domain elements. - * - * @param domain Array of domain values. - * @param range A two-element array of numeric values. - */ -export function scaleBand<Domain extends { toString(): string }>( - domain: ReadonlyArray<Domain>, - range: [NumberValue, NumberValue] -): ScaleBand<Domain>; - -// ------------------------------------------------------------------------------- -// Point Scale Factory -// ------------------------------------------------------------------------------- - -/** - * Point scales are a variant of band scales with the bandwidth fixed to zero. - * Point scales are typically used for scatterplots with an ordinal or categorical dimension. - * The unknown value of a point scale is always undefined: they do not allow implicit domain construction. - * - * The generic corresponds to the data type of domain elements. - */ -export interface ScalePoint<Domain extends { toString(): string }> { - /** - * Given a value in the input domain, returns the corresponding point derived from the output range. - * If the given value is not in the scale’s domain, returns undefined. - * - * @param x A value from the domain. - */ - (x: Domain): number | undefined; - - /** - * Returns the scale's current domain. - */ - domain(): Domain[]; - /** - * Sets the domain to the specified array of values. The first element in domain will be mapped to the first point, the second domain value to the second point, and so on. - * Domain values are stored internally in a map from stringified value to index; the resulting index is then used to determine the point. - * Thus, a point scale’s values must be coercible to a string, and the stringified version of the domain value uniquely identifies the corresponding point. - * - * @param domain Array of domain values. - */ - domain(domain: ReadonlyArray<Domain>): this; - - /** - * Returns the scale’s current range, which defaults to [0, 1]. - */ - range(): [number, number]; - /** - * Sets the scale’s range to the specified two-element array of numbers. - * If the elements in the given array are not numbers, they will be coerced to numbers. - * The default range is [0, 1]. - * - * @param range A two-element array of numeric values. - */ - range(range: [NumberValue, NumberValue]): this; - - /** - * Sets the scale’s range to the specified two-element array of numbers while also enabling rounding. - * If the elements in the given array are not numbers, they will be coerced to numbers. - * - * Rounding is sometimes useful for avoiding antialiasing artifacts, though also consider the shape-rendering “crispEdges†styles. - * - * @param range A two-element array of numeric values. - */ - rangeRound(range: [NumberValue, NumberValue]): this; - - /** - * Returns the current rounding status for the scale: enabled (= true) or disabled (= false). - */ - round(): boolean; - /** - * Enables or disables rounding accordingly. If rounding is enabled, the position of each point will be integers. - * Rounding is sometimes useful for avoiding antialiasing artifacts, though also consider the shape-rendering “crispEdges†styles. - * Note that if the width of the domain is not a multiple of the cardinality of the range, there may be leftover unused space, even without padding! - * Use point.align to specify how the leftover space is distributed. - * - * @param round Enable rounding (= true), disable rounding (= false). - */ - round(round: boolean): this; - - /** - * Returns the current outer padding which defaults to 0. - * The outer padding determines the ratio of the range that is reserved for blank space - * before the first point and after the last point. - * - */ - padding(): number; - /** - * Sets the outer padding to the specified value which must be in the range [0, 1]. - * The outer padding determines the ratio of the range that is reserved for blank space - * before the first point and after the last point. - * - * The default is 0. - * - * @param padding Value for outer padding in [0, 1] interval. - */ - padding(padding: number): this; - - /** - * Returns the current alignment which defaults to 0.5. - */ - align(): number; - /** - * Sets the alignment to the specified value which must be in the range [0, 1]. - * - * The alignment determines how any leftover unused space in the range is distributed. - * A value of 0.5 indicates that the leftover space should be equally distributed before the first point and after the last point; - * i.e., the points should be centered within the range. A value of 0 or 1 may be used to shift the points to one side, say to position them adjacent to an axis. - * - * The default value is 0.5. - * - * @param align Value for alignment setting in [0, 1] interval. - */ - align(align: number): this; - - /** - * Return 0. - */ - bandwidth(): number; - - /** - * Returns the distance between the starts of adjacent points. - */ - step(): number; - - /** - * Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. - */ - copy(): this; -} - -/** - * Constructs a new point scale with the specified range, no padding, no rounding and center alignment. - * The domain defaults to the empty domain. - * If range is not specified, it defaults to the unit range [0, 1]. - * - * The generic corresponds to the data type of domain elements. - * - * @param range A two-element array of numeric values. - */ -export function scalePoint<Domain extends { toString(): string } = string>( - range?: [NumberValue, NumberValue] -): ScalePoint<Domain>; -/** - * Constructs a new point scale with the specified domain and range, no padding, no rounding and center alignment. - * The domain defaults to the empty domain. - * - * The generic corresponds to the data type of domain elements. - * - * @param domain Array of domain values. - * @param range A two-element array of numeric values. - */ -export function scalePoint<Domain extends { toString(): string }>( - domain: ReadonlyArray<Domain>, - range: [NumberValue, NumberValue] -): ScalePoint<Domain>; diff --git a/node_modules/@types/d3-scale/package.json b/node_modules/@types/d3-scale/package.json deleted file mode 100644 index 8e3f16982755d9e53b7e5e32f7499d59bcca1315..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-scale/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_from": "@types/d3-scale@^2", - "_id": "@types/d3-scale@2.2.4", - "_inBundle": false, - "_integrity": "sha512-wkQXT+IfgfAnKB5rtS1qMJg3FS32r1rVFHvqtiqk8pX8o5aQR3VwX1P7ErHjzNIicTlkWsaMiUTrYB+E75HFeA==", - "_location": "/@types/d3-scale", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-scale@^2", - "name": "@types/d3-scale", - "escapedName": "@types%2fd3-scale", - "scope": "@types", - "rawSpec": "^2", - "saveSpec": null, - "fetchSpec": "^2" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-2.2.4.tgz", - "_shasum": "ca0d4b84d2f88fe058480f81354d14041a667b96", - "_spec": "@types/d3-scale@^2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "rulonder", - "url": "https://github.com/rulonder" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": { - "@types/d3-time": "^1" - }, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-scale module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-scale", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-scale" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "7e46ca6f7c5b34de3a62632f9995fe17c675b3ac953ca0dc06ba7aa97d84f764", - "version": "2.2.4" -} diff --git a/node_modules/@types/d3-selection/LICENSE b/node_modules/@types/d3-selection/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-selection/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-selection/README.md b/node_modules/@types/d3-selection/README.md deleted file mode 100644 index 6bdfd85f894ed4d0953dc3287473869edafc25e8..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-selection/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-selection` - -# Summary -This package contains type definitions for D3JS d3-selection module (https://github.com/d3/d3-selection/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-selection/v1. - -### Additional Details - * Last updated: Tue, 29 Sep 2020 23:28:20 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-selection/index.d.ts b/node_modules/@types/d3-selection/index.d.ts deleted file mode 100644 index e72ce071eb89c9c813f83d25ad2bf732cb0c20c2..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-selection/index.d.ts +++ /dev/null @@ -1,1256 +0,0 @@ -// Type definitions for D3JS d3-selection module 1.4 -// Project: https://github.com/d3/d3-selection/, https://d3js.org/d3-selection -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.4.1 - -// -------------------------------------------------------------------------- -// Shared Type Definitions and Interfaces -// -------------------------------------------------------------------------- - -/** - * BaseType serves as an alias for the 'minimal' data type which can be selected - * without 'd3-selection' trying to use properties internally which would otherwise not - * be supported. - */ -export type BaseType = Element | EnterElement | Document | Window | null; - -/** - * KeyType serves as alias for valid types that d3 supports as key for data binding - */ -export type KeyType = string | number; - -/** - * A helper interface which covers arguments like NodeListOf<T> or HTMLCollectionOf<T> - * argument types - */ -export interface ArrayLike<T> { - length: number; - item(index: number): T | null; - [index: number]: T; -} - -/** - * An interface describing the element type of the Enter Selection group elements - * created when invoking selection.enter(). - */ -export interface EnterElement { - ownerDocument: Document; - namespaceURI: string; - appendChild(newChild: Node): Node; - insertBefore(newChild: Node, refChild: Node): Node; - querySelector(selectors: string): Element; - querySelectorAll(selectors: string): NodeListOf<Element>; -} - -/** - * Container element type usable for mouse/touch functions - */ -export type ContainerElement = HTMLElement | SVGSVGElement | SVGGElement; - -/** - * A User interface event (e.g. mouse event, touch or MSGestureEvent) with captured clientX and clientY properties. - */ -export interface ClientPointEvent { - clientX: number; - clientY: number; -} - -/** - * Interface for optional parameters map, when dispatching custom events - * on a selection - */ -export interface CustomEventParameters { - /** - * If true, the event is dispatched to ancestors in reverse tree order - */ - bubbles: boolean; - /** - * If true, event.preventDefault is allowed - */ - cancelable: boolean; - /** - * Any custom data associated with the event - */ - detail: any; -} - -/** - * Callback type for selections and transitions - */ -export type ValueFn<T extends BaseType, Datum, Result> = (this: T, datum: Datum, index: number, groups: T[] | ArrayLike<T>) => Result; - -/** - * TransitionLike is a helper interface to represent a quasi-Transition, without specifying the full Transition interface in this file. - * For example, wherever d3-zoom allows a Transition to be passed in as an argument, it internally immediately invokes its `selection()` - * method to retrieve the underlying Selection object before proceeding. - * d3-brush uses a subset of Transition methods internally. - * The use of this interface instead of the full imported Transition interface is [referred] to achieve - * two things: - * (1) the d3-transition module may not be required by a projects use case, - * (2) it avoids possible complications from 'module augmentation' from d3-transition to Selection. - */ -export interface TransitionLike<GElement extends BaseType, Datum> { - selection(): Selection<GElement, Datum, any, any>; - on(type: string, listener: null): TransitionLike<GElement, Datum>; - on(type: string, listener: ValueFn<GElement, Datum, void>): TransitionLike<GElement, Datum>; - tween(name: string, tweenFn: null): TransitionLike<GElement, Datum>; - tween(name: string, tweenFn: ValueFn<GElement, Datum, ((t: number) => void)>): TransitionLike<GElement, Datum>; -} - -// -------------------------------------------------------------------------- -// All Selection related interfaces and function -// -------------------------------------------------------------------------- - -/** - * Select the first element that matches the specified selector string. If no elements match the selector, returns an empty selection. - * If multiple elements match the selector, only the first matching element (in document order) will be selected. - * - * The first generic "GElement" refers to the type of element to be selected. The second generic "OldDatum" refers to the type of the - * datum, on the selected element. This is useful when re-selecting an element with a previously set, know datum type. - * - * @param selector CSS selector string - */ -export function select<GElement extends BaseType, OldDatum>(selector: string): Selection<GElement, OldDatum, HTMLElement, any>; -/** - * Select the specified node element. - * - * The first generic "GElement" refers to the type of element to be selected. The second generic "OldDatum" refers to the type of the - * datum, on the selected element. This is useful when re-selecting an element with a previously set, know datum type. - * - * @param node An element to be selected - */ -export function select<GElement extends BaseType, OldDatum>(node: GElement): Selection<GElement, OldDatum, null, undefined>; - -/** - * Create an empty selection. - */ -export function selectAll(): Selection<null, undefined, null, undefined>; -/** - * Create an empty selection. - */ -export function selectAll(selector: null): Selection<null, undefined, null, undefined>; -/** - * Create an empty selection. - */ -export function selectAll(selector: undefined): Selection<null, undefined, null, undefined>; -/** - * Select all elements that match the specified selector string. The elements will be selected in document order (top-to-bottom). - * If no elements in the document match the selector, returns an empty selection. - * - * The first generic "GElement" refers to the type of element to be selected. The second generic "OldDatum" refers to the type of the - * datum, of a selected element. This is useful when re-selecting elements with a previously set, know datum type. - * - * @param selector CSS selector string - */ -export function selectAll<GElement extends BaseType, OldDatum>(selector: string): Selection<GElement, OldDatum, HTMLElement, any>; -/** - * Select the specified array of nodes. - * - * The first generic "GElement" refers to the type of element to be selected. The second generic "OldDatum" refers to the type of the - * datum, of a selected element. This is useful when re-selecting elements with a previously set, know datum type. - * - * @param nodes An Array of nodes - */ -export function selectAll<GElement extends BaseType, OldDatum>(nodes: GElement[]): Selection<GElement, OldDatum, null, undefined>; -/** - * Select the specified nodes. This signature allows the selection of nodes contained in a NodeList, HTMLCollection or similar data structure. - * - * The first generic "GElement" refers to the type of element to be selected. The second generic "OldDatum" refers to the type of the - * datum, of a selected element. This is useful when re-selecting elements with a previously set, know datum type. - * - * @param nodes An Array-like collection of nodes - */ -export function selectAll<GElement extends BaseType, OldDatum>(nodes: ArrayLike<GElement>): Selection<GElement, OldDatum, null, undefined>; - -/** - * A D3 Selection of elements. - * - * The first generic "GElement" refers to the type of the selected element(s). - * The second generic "Datum" refers to the type of the datum of a selected element(s). - * The third generic "PElement" refers to the type of the parent element(s) in the D3 selection. - * The fourth generic "PDatum" refers to the type of the datum of the parent element(s). - */ -export interface Selection<GElement extends BaseType, Datum, PElement extends BaseType, PDatum> { - // Sub-selection ------------------------- - - /** - * For each selected element, select the first descendant element that matches the specified selector string. - * If no element matches the specified selector for the current element, the element at the current index will - * be null in the returned selection. If multiple elements match the selector, only the first matching element - * in document order is selected. Selection.select does not affect grouping: it preserves the existing group - * structure and indexes, and propagates data (if any) to selected children. - * - * If the current element has associated data, this data is propagated to the - * corresponding selected element. - * - * The generic represents the type of the descendant element to be selected. - * - * @param selector CSS selector string - */ - select<DescElement extends BaseType>(selector: string): Selection<DescElement, Datum, PElement, PDatum>; - /** - * Create an empty sub-selection. Selection.select does not affect grouping: it preserves the existing group - * structure and indexes. - */ - select<DescElement extends BaseType>(selector: null): Selection<null, undefined, PElement, PDatum>; - /** - * For each selected element, select the descendant element returned by the selector function. - * If no element is returned by the selector function for the current element, the element at the - * current index will be null in the returned selection. Selection.select does not affect grouping: - * it preserves the existing group structure and indexes, and propagates data (if any) to selected children. - * - * If the current element has associated data, this data is propagated to the - * corresponding selected element. - * - * The generic represents the type of the descendant element to be selected. - * - * @param selector A selector function, which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). - * It must return an element, or null if there is no matching element. - */ - select<DescElement extends BaseType>(selector: ValueFn<GElement, Datum, DescElement>): Selection<DescElement, Datum, PElement, PDatum>; - - /** - * Create an empty sub-selection. Selection.selectAll does affect grouping: The elements in the returned - * selection are grouped by their corresponding parent node in this selection, the group at the current index will be empty. - */ - selectAll(): Selection<null, undefined, GElement, Datum>; - /** - * Create an empty sub-selection. Selection.selectAll does affect grouping: The elements in the returned - * selection are grouped by their corresponding parent node in this selection, the group at the current index will be empty. - */ - selectAll(selector: null): Selection<null, undefined, GElement, Datum>; - /** - * Create an empty sub-selection. Selection.selectAll does affect grouping: The elements in the returned - * selection are grouped by their corresponding parent node in this selection, the group at the current index will be empty. - */ - selectAll(selector: undefined): Selection<null, undefined, GElement, Datum>; - /** - * For each selected element, selects the descendant elements that match the specified selector string. The elements in the returned - * selection are grouped by their corresponding parent node in this selection. If no element matches the specified selector - * for the current element, the group at the current index will be empty. Selection.selectAll does affect grouping: each selected descendant - * is grouped by the parent element in the originating selection. - * - * The selected elements do not inherit data from this selection; use selection.data to propagate data to children. - * - * The first generic "DescElement" refers to the type of descendant element to be selected. The second generic "OldDatum" refers to the type of the - * datum, of a selected element. This is useful when re-selecting elements with a previously set, know datum type. - * - * @param selector CSS selector string - */ - selectAll<DescElement extends BaseType, OldDatum>(selector: string): Selection<DescElement, OldDatum, GElement, Datum>; - - /** - * For each selected element, selects the descendant elements returned by the selector function. The elements in the returned - * selection are grouped by their corresponding parent node in this selection. If no element matches the specified selector - * for the current element, the group at the current index will be empty. Selection.selectAll does affect grouping: each selected descendant - * is grouped by the parent element in the originating selection. - * - * The selected elements do not inherit data from this selection; use selection.data to propagate data to children. - * - * The first generic "DescElement" refers to the type of descendant element to be selected. The second generic "OldDatum" refers to the type of the - * datum, of a selected element. This is useful when re-selecting elements with a previously set, know datum type. - * - * @param selector A selector function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). It must return an array of elements - * (or a pseudo-array, such as a NodeList), or the empty array if there are no matching elements. - */ - selectAll<DescElement extends BaseType, OldDatum>(selector: ValueFn<GElement, Datum, DescElement[] | ArrayLike<DescElement>>): Selection<DescElement, OldDatum, GElement, Datum>; - - // Modifying ------------------------------- - - /** - * Return the current value of the specified attribute for the first (non-null) element in the selection. - * This is generally useful only if you know that the selection contains exactly one element. - * - * @param name Name of the attribute - */ - attr(name: string): string; - /** - * Clear the attribute with the specified name for the selected elements and returns this selection. - * - * @param name Name of the attribute - * @param value null,to clear the attribute - */ - attr(name: string, value: null): this; - /** - * Sets the value of the attribute with the specified name for the selected elements and returns this selection. - * All elements are given the same attribute value. - * - * @param name Name of the attribute - * @param value Constant value for the attribute - */ - attr(name: string, value: string | number | boolean): this; - /** - * Sets the value of the attribute with the specified name for the selected elements and returns this selection. - * The value for the individual selected elements is determined by the value function. - * - * @param name Name of the attribute - * @param value A value function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). A null value will clear the attribute. - */ - attr(name: string, value: ValueFn<GElement, Datum, string | number | boolean | null>): this; - - /** - * Returns true if and only if the first (non-null) selected element has the specified classes. - * This is generally useful only if you know the selection contains exactly one element. - * - * @param name A string of space-separated class names. - */ - classed(names: string): boolean; - /** - * Assigns or unassigns the specified CSS class names on the selected elements by setting - * the class attribute or modifying the classList property and returns this selection. - * If the constant value is truthy, then all elements are assigned the specified classes; otherwise, the classes are unassigned. - * - * @param names A string of space-separated class names. - * @param value A boolean flag (true = assign / false = unassign) - */ - classed(names: string, value: boolean): this; - /** - * Assigns or unassigns the specified CSS class names on the selected elements by setting - * the class attribute or modifying the classList property and returns this selection. - * The assign/unassign status for the individual selected elements is determined by the boolean return - * value of the value function. - * - * @param names A string of space-separated class names. - * @param value A value function which is evaluated for each selected element, in order, - * being passed the current datum (d), the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). - * The function’s return value is then used to assign or unassign classes on each element. - */ - classed(names: string, value: ValueFn<GElement, Datum, boolean>): this; - - /** - * Returns the current value of the specified style property for the first (non-null) element in the selection. - * The current value is defined as the element’s inline value, if present, and otherwise its computed value. - * Accessing the current style value is generally useful only if you know the selection contains exactly one element. - * - * @param name Name of the style - */ - style(name: string): string; - /** - * Clear the style with the specified name for the selected elements and returns this selection. - * - * @param name Name of the style - * @param value null,to clear the style - */ - style(name: string, value: null): this; - /** - * Sets the value of the style with the specified name for the selected elements and returns this selection. - * All elements are given the same style value. - * - * @param name Name of the style - * @param value Constant value for the style - * @param priority An optional priority flag, either null or the string important (without the exclamation point) - */ - style(name: string, value: string | number | boolean, priority?: null | 'important'): this; - /** - * Sets the value of the style with the specified name for the selected elements and returns this selection. - * The value for the individual selected elements is determined by the value function. - * - * @param name Name of the style - * @param value A value function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). A null value will clear the style. - * @param priority An optional priority flag, either null or the string important (without the exclamation point) - */ - style(name: string, value: ValueFn<GElement, Datum, string | number | boolean | null>, priority?: null | 'important'): this; - - /** - * Return the current value of the specified property for the first (non-null) element in the selection. - * This is generally useful only if you know that the selection contains exactly one element. - * - * @param name Name of the property - */ - property(name: string): any; - /** - * Look up a local variable on the first node of this selection. Note that this is not equivalent to `local.get(selection.node())` in that it will not look up locals set on the parent node(s). - * - * @param name The `d3.local` variable to look up. - */ - property<T>(name: Local<T>): T | undefined; - /** - * Sets the value of the property with the specified name for the selected elements and returns this selection. - * The value for the individual selected elements is determined by the value function. - * - * Some HTML elements have special properties that are not addressable using attributes or styles, - * such as a form field’s text value and a checkbox’s checked boolean. Use this method to get or set these properties. - * - * @param name Name of the property - * @param value A value function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). A null value will clear the property. - */ - property(name: string, value: ValueFn<GElement, Datum, any>): this; - /** - * Clears the property with the specified name for the selected elements and returns this selection. - * - * @param name Name of the property - * @param value null,to clear the property - */ - property(name: string, value: null): this; - /** - * Sets the value of the property with the specified name for the selected elements and returns this selection. - * All elements are given the same property value. - * - * @param name Name of the property - * @param value Constant value for the property - */ - property(name: string, value: any): this; - /** - * Store a value in a `d3.local` variable. - * This is equivalent to `selection.each(function (d, i, g) { name.set(this, value.call(this, d, i, g)); })` but more concise. - * - * @param name A `d3.local` variable - * @param value A callback that returns the value to store - */ - property<T>(name: Local<T>, value: ValueFn<GElement, Datum, T>): this; - /** - * Store a value in a `d3.local` variable for each node in the selection. - * This is equivalent to `selection.each(function () { name.set(this, value); })` but more concise. - * - * @param name A `d3.local` variable - * @param value A callback that returns the value to store - */ - property<T>(name: Local<T>, value: T): this; - - /** - * Returns the text content for the first (non-null) element in the selection. - * This is generally useful only if you know the selection contains exactly one element. - */ - text(): string; - /** - * Clear the text content of the selected elements and return the selection. - */ - text(value: null): this; - /** - * Sets the text content to the specified value on all selected elements, replacing any existing child elements. - * All elements are given the same text content. - * - * @param value Text content value for the elements. - */ - text(value: string | number | boolean): this; - /** - * Sets the text content to the specified value on all selected elements, replacing any existing child elements. - * All elements are given the same text content. - * - * @param value A value unction which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). - * The function’s return value is then used to set each element’s text content. A null value will clear the content. - */ - text(value: ValueFn<GElement, Datum, string | number | boolean | null>): this; - - /** - * Returns a string representation of the inner HTML for the first (non-null) element in the selection. - * This is generally useful only if you know the selection contains exactly one element. - */ - html(): string; - /** - * Clear the html content of the selected elements and return the selection. - */ - html(value: null): this; - /** - * Sets the inner HTML to the specified value on all selected elements, replacing any existing child elements. - * All elements are given the same inner HTML - * - * @param value String representation of inner HTML. - */ - html(value: string): this; - /** - * Sets the inner HTML to the specified value on all selected elements, replacing any existing child elements. - * The inner HTML is determined for each individual element using a value function. - * - * @param value A value function which is evaluated for each selected element, in order, being passed the current - * datum (d), the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). - * The function’s return value is then used to set each element’s inner HTML. A null value will clear the content. - */ - html(value: ValueFn<GElement, Datum, string | null>): this; - - /** - * Appends a new element of this type (tag name) as the last child of each selected element, - * or before the next following sibling in the update selection if this is an enter selection. - * The latter behavior for enter selections allows you to insert elements into the DOM in an order consistent with the new bound data; - * however, note that selection.order may still be required if updating elements change order - * (i.e., if the order of new data is inconsistent with old data). - * - * This method returns a new selection containing the appended elements. - * Each new element inherits the data of the current elements, if any. - * - * @param type A string representing the tag name. - */ - append<K extends keyof ElementTagNameMap>(type: K): Selection<ElementTagNameMap[K], Datum, PElement, PDatum>; - /** - * Appends a new element of this type (tag name) as the last child of each selected element, - * or before the next following sibling in the update selection if this is an enter selection. - * The latter behavior for enter selections allows you to insert elements into the DOM in an order consistent with the new bound data; - * however, note that selection.order may still be required if updating elements change order - * (i.e., if the order of new data is inconsistent with old data). - * - * This method returns a new selection containing the appended elements. - * Each new element inherits the data of the current elements, if any. - * - * The generic refers to the type of the child element to be appended. - * - * @param type A string representing the tag name. The specified name may have a namespace prefix, such as svg:text - * to specify a text attribute in the SVG namespace. If no namespace is specified, the namespace will be inherited - * from the parent element; or, if the name is one of the known prefixes, the corresponding namespace will be used - * (for example, svg implies svg:svg) - */ - append<ChildElement extends BaseType>(type: string): Selection<ChildElement, Datum, PElement, PDatum>; - - /** - * Appends a new element of the type provided by the element creator function as the last child of each selected element, - * or before the next following sibling in the update selection if this is an enter selection. - * The latter behavior for enter selections allows you to insert elements into the DOM in an order consistent with the new bound data; - * however, note that selection.order may still be required if updating elements change order - * (i.e., if the order of new data is inconsistent with old data). - * - * This method returns a new selection containing the appended elements. - * Each new element inherits the data of the current elements, if any. - * - * The generic refers to the type of the child element to be appended. - * - * @param type A creator function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). This function should return - * an element to be appended. (The function typically creates a new element, but it may instead return an existing element.) - */ - append<ChildElement extends BaseType>(type: ValueFn<GElement, Datum, ChildElement>): Selection<ChildElement, Datum, PElement, PDatum>; - - /** - * Inserts a new element of the specified type (tag name) before the first element matching the specified - * before selector for each selected element. For example, a before selector :first-child will prepend nodes before the first child. - * If before is not specified, it defaults to null. (To append elements in an order consistent with bound data, use selection.append.) - * - * This method returns a new selection containing the appended elements. - * Each new element inherits the data of the current elements, if any. - * - * The generic refers to the type of the child element to be appended. - * - * @param type A string representing the tag name for the element type to be inserted. - * @param before One of: - * * A CSS selector string for the element before which the insertion should occur. - * * A child selector function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). This function should return the child element - * before which the element should be inserted. - */ - insert<K extends keyof ElementTagNameMap>( - type: K, - before?: string | ValueFn<GElement, Datum, BaseType> - ): Selection<ElementTagNameMap[K], Datum, PElement, PDatum>; - /** - * Inserts a new element of the specified type (tag name) before the first element matching the specified - * before selector for each selected element. For example, a before selector :first-child will prepend nodes before the first child. - * If before is not specified, it defaults to null. (To append elements in an order consistent with bound data, use selection.append.) - * - * This method returns a new selection containing the appended elements. - * Each new element inherits the data of the current elements, if any. - * - * The generic refers to the type of the child element to be appended. - * - * @param type One of: - * * A string representing the tag name for the element type to be inserted. The specified name may have a namespace prefix, - * such as svg:text to specify a text attribute in the SVG namespace. If no namespace is specified, the namespace will be inherited - * from the parent element; or, if the name is one of the known prefixes, the corresponding namespace will be used - * (for example, svg implies svg:svg) - * * A creator function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). This function should return - * an element to be inserted. (The function typically creates a new element, but it may instead return an existing element.) - * @param before One of: - * * A CSS selector string for the element before which the insertion should occur. - * * A child selector function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). This function should return the child element - * before which the element should be inserted. - */ - insert<ChildElement extends BaseType>( - type: string | ValueFn<GElement, Datum, ChildElement>, - before?: string | ValueFn<GElement, Datum, BaseType> - ): Selection<ChildElement, Datum, PElement, PDatum>; - - /** - * Removes the selected elements from the document. - * Returns this selection (the removed elements) which are now detached from the DOM. - */ - remove(): this; - - /** - * Inserts clones of the selected elements immediately following the selected elements and returns a selection of the newly - * added clones. If deep is true, the descendant nodes of the selected elements will be cloned as well. Otherwise, only the elements - * themselves will be cloned. - * - * @param deep Perform deep cloning if this flag is set to true. - */ - clone(deep?: boolean): Selection<GElement, Datum, PElement, PDatum>; - - /** - * Returns a new selection merging this selection with the specified other selection. - * The returned selection has the same number of groups and the same parents as this selection. - * Any missing (null) elements in this selection are filled with the corresponding element, - * if present (not null), from the specified selection. (If the other selection has additional groups or parents, - * they are ignored.) - * - * This method is commonly used to merge the enter and update selections after a data-join. - * After modifying the entering and updating elements separately, you can merge the two selections and - * perform operations on both without duplicate code. - * - * This method is not intended for concatenating arbitrary selections, however: if both this selection - * and the specified other selection have (non-null) elements at the same index, this selection’s element - * is returned in the merge and the other selection’s element is ignored. - * - * @param other Selection to be merged. - */ - merge(other: Selection<GElement, Datum, PElement, PDatum>): Selection<GElement, Datum, PElement, PDatum>; - - /** - * Filters the selection, returning a new selection that contains only the elements for - * which the specified filter is true. - * - * The returned filtered selection preserves the parents of this selection, but like array.filter, - * it does not preserve indexes as some elements may be removed; use selection.select to preserve the index, if needed. - * - * @param selector A CSS selector string to match when filtering. - */ - filter(selector: string): Selection<GElement, Datum, PElement, PDatum>; - /** - * Filters the selection, returning a new selection that contains only the elements for - * which the specified filter is true. - * - * The returned filtered selection preserves the parents of this selection, but like array.filter, - * it does not preserve indexes as some elements may be removed; use selection.select to preserve the index, if needed. - * - * The generic refers to the type of element which will be selected after applying the filter, i.e. if the element types - * contained in a pre-filter selection are narrowed to a subset as part of the filtering. - * - * @param selector A CSS selector string to match when filtering. - */ - filter<FilteredElement extends BaseType>(selector: string): Selection<FilteredElement, Datum, PElement, PDatum>; - /** - * Filter the selection, returning a new selection that contains only the elements for - * which the specified filter is true. - * - * The returned filtered selection preserves the parents of this selection, but like array.filter, - * it does not preserve indexes as some elements may be removed; use selection.select to preserve the index, if needed. - * - * @param selector A value function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). This function should return true - * for an element to be included, and false otherwise. - */ - filter(selector: ValueFn<GElement, Datum, boolean>): Selection<GElement, Datum, PElement, PDatum>; - /** - * Filter the selection, returning a new selection that contains only the elements for - * which the specified filter is true. - * - * The returned filtered selection preserves the parents of this selection, but like array.filter, - * it does not preserve indexes as some elements may be removed; use selection.select to preserve the index, if needed. - * - * @param selector A value function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). This function should return true - * for an element to be included, and false otherwise. - */ - filter<FilteredElement extends BaseType>(selector: ValueFn<GElement, Datum, boolean>): Selection<FilteredElement, Datum, PElement, PDatum>; - - /** - * Return a new selection that contains a copy of each group in this selection sorted according - * to the compare function. After sorting, re-inserts elements to match the resulting order (per selection.order). - * - * Note that sorting is not guaranteed to be stable; however, it is guaranteed to have the same - * behavior as your browser’s built-in sort method on arrays. - * - * @param comparator An optional comparator function, which defaults to "ascending". The function is passed - * two elements’ data a and b to compare. It should return either a negative, positive, or zero value. - * If negative, then a should be before b; if positive, then a should be after b; otherwise, a and b are - * considered equal and the order is arbitrary. - */ - sort(comparator?: (a: Datum, b: Datum) => number): this; - - /** - * Re-insert elements into the document such that the document order of each group matches the selection order. - * This is equivalent to calling selection.sort if the data is already sorted, but much faster. - */ - order(): this; - - /** - * Re-insert each selected element, in order, as the last child of its parent. - */ - raise(): this; - - /** - * Re-insert each selected element, in order, as the first child of its parent. - */ - lower(): this; - - // Data Join --------------------------------- - - /** - * Returns the bound datum for the first (non-null) element in the selection. - * This is generally useful only if you know the selection contains exactly one element. - */ - datum(): Datum; - /** - * Delete the bound data for each element in the selection. - */ - datum(value: null): Selection<GElement, undefined, PElement, PDatum>; - /** - * Sets the element’s bound data using the specified value function on all selected elements. - * Unlike selection.data, this method does not compute a join and does not affect - * indexes or the enter and exit selections. - * - * The generic refers to the type of the new datum to be used for the selected elements. - * - * @param value A value function which is evaluated for each selected element, in order, - * being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element (nodes[i]). The function is then used to set each element’s new data. - * A null value will delete the bound data. - */ - datum<NewDatum>(value: ValueFn<GElement, Datum, NewDatum>): Selection<GElement, NewDatum, PElement, PDatum>; - /** - * Sets the element’s bound data to the specified value on all selected elements. - * Unlike selection.data, this method does not compute a join and does not affect - * indexes or the enter and exit selections. - * - * The generic refers to the type of the new datum to be used for the selected elements. - * - * @param value A value object to be used as the datum for each element. - */ - datum<NewDatum>(value: NewDatum): Selection<GElement, NewDatum, PElement, PDatum>; - - /** - * Returns the array of data for the selected elements. - */ - data(): Datum[]; - /** - * Joins the specified array of data with the selected elements, returning a new selection that represents - * the update selection: the elements successfully bound to data. Also defines the enter and exit selections on - * the returned selection, which can be used to add or remove elements to correspond to the new data. - * - * The data is specified for each group in the selection. If the selection has multiple groups - * (such as d3.selectAll followed by selection.selectAll), then data should typically be specified as a function. - * - * If a key function is not specified, then the first datum in data is assigned to the first selected element, - * the second datum to the second selected element, and so on. - * A key function may be specified to control which datum is assigned to which element, replacing the default join-by-index, - * by computing a string identifier for each datum and element. - * - * The update and enter selections are returned in data order, while the exit selection preserves the selection - * order prior to the join. If a key function is specified, the order of elements in the selection may not match - * their order in the document; use selection.order or selection.sort as needed. - * - * This method cannot be used to clear bound data; use selection.datum instead. - * - * For details see: {@link https://github.com/d3/d3-selection#joining-data } - * - * The generic refers to the type of the new datum to be used for the selected elements. - * - * @param data The specified data is an array of arbitrary values (e.g., numbers or objects). - * @param key An optional key function which is evaluated for each selected element, in order, being passed the - * current datum (d), the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]); the returned string is the element’s key. - * The key function is then also evaluated for each new datum in data, being passed the current datum (d), - * the current index (i), and the group’s new data, with this as the group’s parent DOM element (nodes[i]); the returned string is the datum’s key. - * The datum for a given key is assigned to the element with the matching key. If multiple elements have the same key, - * the duplicate elements are put into the exit selection; if multiple data have the same key, the duplicate data are put into the enter selection. - */ - data<NewDatum>(data: NewDatum[], key?: ValueFn<GElement | PElement, Datum | NewDatum, KeyType>): Selection<GElement, NewDatum, PElement, PDatum>; - /** - * Joins the data returned by the specified value function with the selected elements, returning a new selection that it represents - * the update selection: the elements successfully bound to data. Also defines the enter and exit selections on - * the returned selection, which can be used to add or remove elements to correspond to the new data. - * - * The data is specified for each group in the selection. - * - * If a key function is not specified, then the first datum in data is assigned to the first selected element, - * the second datum to the second selected element, and so on. - * A key function may be specified to control which datum is assigned to which element, replacing the default join-by-index, - * by computing a string identifier for each datum and element. - * - * The update and enter selections are returned in data order, while the exit selection preserves the selection - * order prior to the join. If a key function is specified, the order of elements in the selection may not match - * their order in the document; use selection.order or selection.sort as needed. - * - * This method cannot be used to clear bound data; use selection.datum instead. - * - * For details see: {@link https://github.com/d3/d3-selection#joining-data } - * - * The generic refers to the type of the new datum to be used for the selected elements. - * - * @param data A value function which will be evaluated for each group in order, being passed the group’s parent datum - * (d, which may be undefined), the group index (i), and the selection’s parent nodes (nodes), - * with this as the group’s parent element. The function returns an array of values for each group. - * @param key An optional key function which is evaluated for each selected element, in order, being passed the - * current datum (d), the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]); the returned string is the element’s key. - * The key function is then also evaluated for each new datum in data, being passed the current datum (d), - * the current index (i), and the group’s new data, with this as the group’s parent DOM element (nodes[i]); the returned string is the datum’s key. - * The datum for a given key is assigned to the element with the matching key. If multiple elements have the same key, - * the duplicate elements are put into the exit selection; if multiple data have the same key, the duplicate data are put into the enter selection. - */ - data<NewDatum>(data: ValueFn<PElement, PDatum, NewDatum[]>, key?: ValueFn<GElement | PElement, Datum | NewDatum, KeyType>): Selection<GElement, NewDatum, PElement, PDatum>; - - /** - * Appends, removes and reorders elements as necessary to match the data that was previously bound by `selection.data`, returning the merged enter and update selection. - * This method is a convenient alternative to the more explicit `selection.enter`, `selection.exit`, `selection.append` and `selection.remove`. - * - * The "matching" logic is determined by the key function passed to `selection.data`. - */ - join<K extends keyof ElementTagNameMap, OldDatum = Datum>( - enter: K, - update?: (elem: Selection<GElement, Datum, PElement, PDatum>) => Selection<GElement, Datum, PElement, PDatum> | undefined, - exit?: (elem: Selection<GElement, OldDatum, PElement, PDatum>) => void - ): Selection<GElement | ElementTagNameMap[K], Datum, PElement, PDatum>; - /** - * Appends, removes and reorders elements as necessary to match the data that was previously bound by `selection.data`, returning the merged enter and update selection. - * This method is a convenient alternative to the more explicit `selection.enter`, `selection.exit`, `selection.append` and `selection.remove`. - * - * The "matching" logic is determined by the key function passed to `selection.data`. - */ - join<ChildElement extends BaseType, OldDatum = Datum>( - enter: string, - update?: (elem: Selection<GElement, Datum, PElement, PDatum>) => Selection<GElement, Datum, PElement, PDatum> | undefined, - exit?: (elem: Selection<GElement, OldDatum, PElement, PDatum>) => void - ): Selection<ChildElement | GElement, Datum, PElement, PDatum>; - /** - * Appends, removes and reorders elements as necessary to match the data that was previously bound by `selection.data`, returning the merged enter and update selection. - * This method is a convenient alternative to the more explicit `selection.enter`, `selection.exit`, `selection.append` and `selection.remove`. - * - * The "matching" logic is determined by the key function passed to `selection.data`. - */ - join<ChildElement extends BaseType, OldDatum = Datum>( - enter: (elem: Selection<EnterElement, Datum, PElement, PDatum>) => Selection<ChildElement, Datum, PElement, PDatum>, - update?: (elem: Selection<GElement, Datum, PElement, PDatum>) => Selection<GElement, Datum, PElement, PDatum> | undefined, - exit?: (elem: Selection<GElement, OldDatum, PElement, PDatum>) => void - ): Selection<ChildElement | GElement, Datum, PElement, PDatum>; - - /** - * Return the enter selection: placeholder nodes for each datum that had no corresponding DOM element - * in the selection. (The enter selection is empty for selections not returned by selection.data.) - */ - enter(): Selection<EnterElement, Datum, PElement, PDatum>; - - /** - * Returns the exit selection: existing DOM elements in the selection for which no new datum was found. - * (The exit selection is empty for selections not returned by selection.data.) - * - * IMPORTANT: The generic refers to the type of the old datum associated with the exit selection elements. - * Ensure you set the generic to the correct type, if you need to access the data on the exit selection in - * follow-up steps, e.g. to set styles as part of an exit transition before removing them. - */ - exit<OldDatum>(): Selection<GElement, OldDatum, PElement, PDatum>; - - // Event Handling ------------------- - - /** - * Return the currently-assigned listener for the specified event typename on the first (non-null) selected element, - * if any, If multiple typenames are specified, the first matching listener is returned. - * - * @param typenames The typenames is a string event type, such as click, mouseover, or submit; any DOM event type supported by your browser may be used. - * The type may be optionally followed by a period (.) and a name; the optional name allows multiple callbacks to be registered - * to receive events of the same type, such as click.foo and click.bar. To specify multiple typenames, separate typenames with spaces, - * such as "input change"" or "click.foo click.bar". - */ - on(typenames: string): ValueFn<GElement, Datum, void> | undefined; - /** - * Remove a listener for the specified event type names. To remove all listeners for a given name, - * pass null as the listener and ".foo" as the typename, where foo is the name; to remove all listeners with no name, specify "." as the typename. - * - * @param typenames The typenames is a string event type, such as click, mouseover, or submit; any DOM event type supported by your browser may be used. - * The type may be optionally followed by a period (.) and a name; the optional name allows multiple callbacks to be registered - * to receive events of the same type, such as click.foo and click.bar. To specify multiple typenames, separate typenames with spaces, - * such as "input change"" or "click.foo click.bar". - * @param listener null to indicate removal of listener - */ - on(typenames: string, listener: null): this; - /** - * Add an event listener for the specified event type names. If an event listener was previously registered for the same typename - * on a selected element, the old listener is removed before the new listener is added. - * - * When a specified event is dispatched on a selected node, the specified listener will be evaluated for each selected element. - * - * An optional capture flag may be specified which corresponds to the W3C useCapture flag: - * "After initiating capture, all events of the specified type will be dispatched to the registered EventListener before being - * dispatched to any EventTargets beneath them in the tree. Events which are bubbling upward through the tree will not - * trigger an EventListener designated to use capture." - * - * @param typenames The typenames is a string event type, such as click, mouseover, or submit; any DOM event type supported by your browser may be used. - * The type may be optionally followed by a period (.) and a name; the optional name allows multiple callbacks to be registered - * to receive events of the same type, such as click.foo and click.bar. To specify multiple typenames, separate typenames with spaces, - * such as "input change"" or "click.foo click.bar". - * @param listener A listener function which will be evaluated for each selected element, being passed the current datum (d), the current index (i), - * and the current group (nodes), with this as the current DOM element (nodes[i]). Listeners always see the latest datum for their element, - * but the index is a property of the selection and is fixed when the listener is assigned; to update the index, re-assign the listener. - * To access the current event within a listener, use d3.event. - * @param capture An optional capture flag which corresponds to the W3C useCapture flag. - */ - on(typenames: string, listener: ValueFn<GElement, Datum, void>, capture?: boolean): this; - - /** - * Dispatches a custom event of the specified type to each selected element, in order. - * An optional parameters map may be specified to set additional properties of the event. - * - * @param type Name of event to dispatch - * @param parameters An optional value map with custom event parameters - */ - dispatch(type: string, parameters?: CustomEventParameters): this; - /** - * Dispatches a custom event of the specified type to each selected element, in order. - * An optional value function returning a parameters map for each element in the selection may be specified to set additional properties of the event. - * - * @param type Name of event to dispatch - * @param parameters A value function which is evaluated for each selected element, in order, - * being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element (nodes[i]). It must return the parameters map for the current element. - */ - dispatch(type: string, parameters?: ValueFn<GElement, Datum, CustomEventParameters>): this; - - // Control Flow ---------------------- - - /** - * Invoke the specified function for each selected element, passing in the current datum (d), - * the current index (i), and the current group (nodes), with this of the current DOM element (nodes[i]). - * This method can be used to invoke arbitrary code for each selected element, and is useful for creating a context to access parent and child data simultaneously. - * - * @param func A function which is invoked for each selected element, - * being passed the current datum (d), the current index (i), and the current group (nodes), with this of the current DOM element (nodes[i]). - */ - each(func: ValueFn<GElement, Datum, void>): this; - - /** - * Invoke the specified function exactly once, passing in this selection along with any optional arguments. - * Returns this selection. - * - * @param func A function which is passed this selection as the first argument along with any optional arguments. - * @param args List of optional arguments to be passed to the callback function. - */ - call(func: (selection: Selection<GElement, Datum, PElement, PDatum>, ...args: any[]) => void, ...args: any[]): this; - - /** - * Return true if this selection contains no (non-null) elements. - */ - empty(): boolean; - - /** - * Return the first (non-null) element in this selection. If the selection is empty, returns null. - */ - node(): GElement | null; - - /** - * Return an array of all (non-null) elements in this selection. - */ - nodes(): GElement[]; - - /** - * Returns the total number of elements in this selection. - */ - size(): number; -} - -/** - * Selects the root element, document.documentElement. This function can also be used to test for selections - * (instanceof d3.selection) or to extend the selection prototype. - */ -export type SelectionFn = () => Selection<HTMLElement, any, null, undefined>; - -/** - * Selects the root element, document.documentElement. This function can also be used to test for selections - * (instanceof d3.selection) or to extend the selection prototype. - */ -export const selection: SelectionFn; - -// --------------------------------------------------------------------------- -// on.js event and customEvent related -// --------------------------------------------------------------------------- - -/** - * A D3 Base Event - */ -export interface BaseEvent { - /** - * Event type - */ - type: string; - /** - * The prior value of d3.event, allowing custom events to retain a reference to the originating native event. - */ - sourceEvent?: any; // Could be of all sorts of types, too general: BaseEvent | Event | MouseEvent | TouchEvent | ... | OwnCustomEventType; -} - -/** - * The current event, if any. This is set during the invocation of an event listener, and is reset after the listener terminates. - * Use this to access standard event fields such as event.timeStamp and methods such as event.preventDefault. - * While you can use the native event.pageX and event.pageY, it is often more convenient to transform the event position to - * the local coordinate system of the container that received the event using d3.mouse, d3.touch or d3.touches. - * - * If you use Babel, Webpack, or another ES6-to-ES5 bundler, be aware that the value of d3.event changes during an event! - * An import of d3.event must be a live binding, so you may need to configure the bundler to import from D3’s ES6 modules - * rather than from the generated UMD bundle; not all bundlers observe jsnext:main. - * Also beware of conflicts with the window.event global. - */ -export const event: any; // Could be of all sorts of types, too general: BaseEvent | Event | MouseEvent | TouchEvent | ... | OwnCustomEventType; - -/** - * Invokes the specified listener, using the specified "that" as "this" context and passing the specified arguments, if any. - * During the invocation, d3.event is set to the specified event; after the listener returns (or throws an error), - * d3.event is restored to its previous value. - * In addition, sets event.sourceEvent to the prior value of d3.event, allowing custom events to retain a reference to the originating native event. - * Returns the value returned by the listener. - * - * The first generic "Context" refers to the "this" context type in which the listener will be invoked. - * The second generic "Result" specifies the return type of the listener. - * - * @param event The event to which d3.event will be set during the listener invocation. - * @param listener The event listener function to be invoked. This function will be invoked with the "this" context, provided - * by the "that" argument of customEvent(...). It will be passed all optional arguments passed to customEvent(...). The function returns - * a value corresponding to the type of the second generic type. - * @param that The "this"" context which will be used for the invocation of listener. - * @param args A list of optional arguments, which will be passed to listener. - */ -export function customEvent<Context, Result>(event: BaseEvent, listener: (this: Context, ...args: any[]) => Result, that: Context, ...args: any[]): Result; - -// --------------------------------------------------------------------------- -// mouse.js related -// --------------------------------------------------------------------------- - -/** - * Get (x, y)-coordinates of the current event relative to the specified container element. - * The container may be an HTML or SVG container element, such as a G element or an SVG element. - * The coordinates are returned as a two-element array of numbers [x, y]. - * - * @param container Container element relative to which coordinates are calculated. - */ -export function mouse(container: ContainerElement): [number, number]; - -// --------------------------------------------------------------------------- -// touch.js and touches.js related -// --------------------------------------------------------------------------- - -/** - * Returns the x and y coordinates of the touch with the specified identifier associated - * with the current event relative to the specified container. - * The container may be an HTML or SVG container element, such as a G element or an SVG element. - * The coordinates are returned as a two-element array of numbers [x, y] or null if there is no touch with - * the specified identifier in touches, returns null; this can be useful for ignoring touchmove events - * where the only some touches have moved. - * - * If touches is not specified, it defaults to the current event’s changedTouches property. - * - * @param container Container element relative to which coordinates are calculated. - * @param identifier Touch Identifier associated with the current event. - */ -export function touch(container: ContainerElement, identifier: number): [number, number] | null; - -/** - * Return the x and y coordinates of the touch with the specified identifier associated - * with the current event relative to the specified container. - * The container may be an HTML or SVG container element, such as a G element or an SVG element. - * The coordinates are returned as a two-element array of numbers [x, y] or null if there is no touch with - * the specified identifier in touches, returns null; this can be useful for ignoring touchmove events - * where the only some touches have moved. - * - * If touches is not specified, it defaults to the current event’s changedTouches property. - * - * @param container Container element relative to which coordinates are calculated. - * @param touches TouchList to be used when identifying the touch. - * @param identifier Touch Identifier associated with the current event. - */ -export function touch(container: ContainerElement, touches: TouchList, identifier: number): [number, number] | null; - -/** - * Return the x and y coordinates of the touches associated with the current event relative to the specified container. - * The container may be an HTML or SVG container element, such as a G element or an SVG element. - * The coordinates are returned as an array of two-element arrays of numbers [[x1, y1], [x2, y2], …]. - * - * If touches is not specified, it defaults to the current event’s touches property. - * - * @param container Container element relative to which coordinates are calculated. - * @param touches TouchList to be used. - */ -export function touches(container: ContainerElement, touches?: TouchList): Array<[number, number]>; - -/** - * Returns the x and y coordinates of the specified event relative to the specified container. - * (The event may also be a touch.) The container may be an HTML or SVG container element, such as a G element or an SVG element. - * The coordinates are returned as a two-element array of numbers [x, y]. - * - * @param container Container element relative to which coordinates are calculated. - * @param event A User interface event (e.g. mouse event, touch or MSGestureEvent) with captured clientX and clientY properties. - */ -export function clientPoint(container: ContainerElement, event: ClientPointEvent): [number, number]; - -// --------------------------------------------------------------------------- -// style -// --------------------------------------------------------------------------- - -/** - * Returns the value of the style property with the specified name for the specified node. - * If the node has an inline style with the specified name, its value is returned; otherwise, the computed property value is returned. - * See also selection.style. - * - * @param node A DOM node (e.g. HTMLElement, SVGElement) for which to retrieve the style property. - * @param name Style property name. - */ -export function style(node: Element, name: string): string; - -// --------------------------------------------------------------------------- -// local.js related -// --------------------------------------------------------------------------- - -export interface Local<T> { - /** - * Retrieves a local variable stored on the node (or one of its parents). - * - * @param node A node element. - */ - get(node: Element): T | undefined; - /** - * Deletes the value associated with the given node. Values stored on ancestors are not affected, meaning that child nodes will still see inherited values. - * - * This function returns true if there was a value stored directly on the node, and false otherwise. - * - * @param node A node element. - */ - remove(node: Element): boolean; - /** - * Store a value for this local variable. Calling `.get()` on children of this node will also retrieve the variable's value. - * - * @param node A node element. - * @param value Value to store locally - */ - set(node: Element, value: T): Element; - /** - * Obtain a string with the internally assigned property name for the local - * which is used to store the value on a node - */ - toString(): string; -} - -/** - * Obtain a new local variable - * - * The generic refers to the type of the variable to store locally. - */ -export function local<T>(): Local<T>; - -// --------------------------------------------------------------------------- -// namespace.js related -// --------------------------------------------------------------------------- - -/** - * Interface for object literal containing local name with related fully qualified namespace - */ -export interface NamespaceLocalObject { - /** - * Fully qualified namespace - */ - space: string; - /** - * Name of the local to be namespaced. - */ - local: string; -} - -/** - * Obtain an object with properties of fully qualified namespace string and - * name of local by parsing a shorthand string "prefix:local". If the prefix - * does not exist in the "namespaces" object provided by d3-selection, then - * the local name is returned as a simple string. - * - * @param prefixedLocal A string composed of the namespace prefix and local - * name separated by colon, e.g. "svg:text". - */ -export function namespace(prefixedLocal: string): NamespaceLocalObject | string; - -// --------------------------------------------------------------------------- -// namespaces.js related -// --------------------------------------------------------------------------- - -/** - * Interface for maps of namespace prefixes to corresponding fully qualified namespace strings - */ -export interface NamespaceMap { [prefix: string]: string; } - -/** - * Map of namespace prefixes to corresponding fully qualified namespace strings - */ -export const namespaces: NamespaceMap; - -// --------------------------------------------------------------------------- -// window.js related -// --------------------------------------------------------------------------- - -/** - * Returns the owner window for the specified node. If node is a node, returns the owner document’s default view; - * if node is a document, returns its default view; otherwise returns the node. - * - * @param DOMNode A DOM element - */ -export function window(DOMNode: Window | Document | Element): Window; - -// --------------------------------------------------------------------------- -// creator.js and matcher.js Complex helper closure generating functions -// for explicit bound-context dependent use -// --------------------------------------------------------------------------- - -/** - * Given the specified element name, returns a single-element selection containing - * a detached element of the given name in the current document. - * - * @param name tag name of the element to be added. - */ -export function create<K extends keyof ElementTagNameMap>(name: K): Selection<ElementTagNameMap[K], undefined, null, undefined>; -/** - * Given the specified element name, returns a single-element selection containing - * a detached element of the given name in the current document. - * - * @param name Tag name of the element to be added. See "namespace" for details on supported namespace prefixes, - * such as for SVG elements. - */ -export function create<NewGElement extends Element>(name: string): Selection<NewGElement, undefined, null, undefined>; - -/** - * Given the specified element name, returns a function which creates an element of the given name, - * assuming that "this" is the parent element. - * - * @param name Tag name of the element to be added. - */ -export function creator<K extends keyof ElementTagNameMap>(name: K): (this: BaseType) => ElementTagNameMap[K]; -/** - * Given the specified element name, returns a function which creates an element of the given name, - * assuming that "this" is the parent element. - * - * The generic refers to the type of the new element to be returned by the creator function. - * - * @param name Tag name of the element to be added. See "namespace" for details on supported namespace prefixes, - * such as for SVG elements. - */ -export function creator<NewGElement extends Element>(name: string): (this: BaseType) => NewGElement; - -/** - * Given the specified selector, returns a function which returns true if "this" element matches the specified selector. - * - * @param selector A CSS selector string. - */ -export function matcher(selector: string): (this: BaseType) => boolean; - -// ---------------------------------------------------------------------------- -// selector.js and selectorAll.js related functions -// ---------------------------------------------------------------------------- - -/** - * Given the specified selector, returns a function which returns the first descendant of "this" element - * that matches the specified selector. - * - * The generic refers to the type of the returned descendant element. - * - * @param selector A CSS selector string. - */ -export function selector<DescElement extends Element>(selector: string): (this: BaseType) => DescElement; - -/** - * Given the specified selector, returns a function which returns all descendants of "this" element that match the specified selector. - * - * The generic refers to the type of the returned descendant element. - * - * @param selector A CSS selector string. - */ -export function selectorAll<DescElement extends Element>(selector: string): (this: BaseType) => NodeListOf<DescElement>; diff --git a/node_modules/@types/d3-selection/package.json b/node_modules/@types/d3-selection/package.json deleted file mode 100644 index ebace949bb71dba01e012382fd4cc342fed4bc06..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-selection/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "@types/d3-selection@^1", - "_id": "@types/d3-selection@1.4.3", - "_inBundle": false, - "_integrity": "sha512-GjKQWVZO6Sa96HiKO6R93VBE8DUW+DDkFpIMf9vpY5S78qZTlRRSNUsHr/afDpF7TvLDV7VxrUFOWW7vdIlYkA==", - "_location": "/@types/d3-selection", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-selection@^1", - "name": "@types/d3-selection", - "escapedName": "@types%2fd3-selection", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3", - "/@types/d3-axis", - "/@types/d3-brush", - "/@types/d3-drag", - "/@types/d3-transition", - "/@types/d3-zoom" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-1.4.3.tgz", - "_shasum": "36928bbe64eb8e0bbcbaa01fb05c21ff6c71fa93", - "_spec": "@types/d3-selection@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-selection module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-selection", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-selection" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "4bec9eeb42974a7dfab0b8f949df97306859bc1a7cd29f0aeb97cc1566d630c9", - "version": "1.4.3" -} diff --git a/node_modules/@types/d3-shape/LICENSE b/node_modules/@types/d3-shape/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-shape/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-shape/README.md b/node_modules/@types/d3-shape/README.md deleted file mode 100644 index 1d34f5985d838799d17341c58a507d7fc2126c73..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-shape/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-shape` - -# Summary -This package contains type definitions for D3JS d3-shape module (https://github.com/d3/d3-shape/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-shape/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 21:08:23 GMT - * Dependencies: [@types/d3-path](https://npmjs.com/package/@types/d3-path) - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-shape/index.d.ts b/node_modules/@types/d3-shape/index.d.ts deleted file mode 100644 index 9ed4ca5b88d55530dbac176d5d9e58820fb8993f..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-shape/index.d.ts +++ /dev/null @@ -1,2756 +0,0 @@ -// Type definitions for D3JS d3-shape module 1.3 -// Project: https://github.com/d3/d3-shape/, https://d3js.org/d3-shape -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.3.7 - -import { Path } from 'd3-path'; - -declare global { - interface CanvasRenderingContext2D {} // tslint:disable-line no-empty-interface -} - -// ----------------------------------------------------------------------------------- -// Shared Types and Interfaces -// ----------------------------------------------------------------------------------- - -/** - * @deprecated - * This interface is used to bridge the gap between two incompatible versions of TypeScript (see [#25944](https://github.com/Microsoft/TypeScript/pull/25944)). - * Use `CanvasPathMethods` instead with TS <= 3.0 and `CanvasPath` with TS >= 3.1. - */ -export interface CanvasPath_D3Shape { - arc(x: number, y: number, radius: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; - arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): void; - bezierCurveTo(cp1x: number, cp1y: number, cp2x: number, cp2y: number, x: number, y: number): void; - closePath(): void; - ellipse(x: number, y: number, radiusX: number, radiusY: number, rotation: number, startAngle: number, endAngle: number, anticlockwise?: boolean): void; - lineTo(x: number, y: number): void; - moveTo(x: number, y: number): void; - quadraticCurveTo(cpx: number, cpy: number, x: number, y: number): void; - rect(x: number, y: number, w: number, h: number): void; -} - -// ----------------------------------------------------------------------------------- -// Arc Generator -// ----------------------------------------------------------------------------------- - -/** - * Interface corresponding to the minimum data type assumed by the accessor functions of the Arc generator. - */ -export interface DefaultArcObject { - /** - * Inner radius of arc. - */ - innerRadius: number; - /** - * Outer radius of arc. - */ - outerRadius: number; - /** - * Start angle of arc. The angle is specified in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. - */ - startAngle: number; - /** - * End angle of arc. The angle is specified in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. - */ - endAngle: number; - /** - * Optional. Pad angle of arc in radians. - */ - padAngle?: number; -} - -/** - * The arc generator produces a circular or annular sector, as in a pie or donut chart. - * - * If the difference between the start and end angles (the angular span) is greater than Ï„, the arc generator will produce a complete circle or annulus. - * If it is less than Ï„, arcs may have rounded corners and angular padding. Arcs are always centered at ⟨0,0⟩; use a transform (see: SVG, Canvas) to move the arc to a different position. - * - * See also the pie generator, which computes the necessary angles to represent an array of data as a pie or donut chart; these angles can then be passed to an arc generator. - * - * The first generic corresponds to the type of the "this" context within which the arc generator and its accessor functions will be invoked. - * - * The second generic corresponds to the datum type for which the arc is to be generated. - */ -export interface Arc<This, Datum> { - /** - * Generates an arc for the given arguments. - * - * IMPORTANT: If the rendering context of the arc generator is null, - * then the arc is returned as a path data string. - * - * The "this" context within which this function is invoked, will be the context within which the accessor methods of the generator are invoked. - * All arguments passed into this function, will be passed to the accessor functions of the generator. - * - * @param d The datum for which the arc is to be generated. - */ - (this: This, d: Datum, ...args: any[]): string | null; - /** - * Generates an arc for the given arguments. - * - * IMPORTANT: If the arc generator has been configured with a rendering context, - * then the arc is rendered to this context as a sequence of path method calls and this function returns void. - * - * The "this" context within which this function is invoked, will be the context within which the accessor methods of the generator are invoked. - * All arguments passed into this function, will be passed to the accessor functions of the generator. - * - * @param d The datum for which the arc is to be generated. - */ - (this: This, d: Datum, ...args: any[]): void; - - /** - * Computes the midpoint [x, y] of the center line of the arc that would be generated by the given arguments. - * - * To be consistent with the generated arc, the accessors must be deterministic, i.e., return the same value given the same arguments. - * The midpoint is defined as (startAngle + endAngle) / 2 and (innerRadius + outerRadius) / 2. - * - * Note that this is not the geometric center of the arc, which may be outside the arc; - * this method is merely a convenience for positioning labels. - * - * The method is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that are passed into the arc generator. - * - * @param d The datum for which the arc is to be generated. - */ - centroid(d: Datum, ...args: any[]): [number, number]; - - /** - * Returns the current inner radius accessor, which defaults to a function returning the innerRadius property - * of the first argument passed into it. - */ - innerRadius(): (this: This, d: Datum, ...args: any[]) => number; - /** - * Sets the inner radius to the specified number and returns this arc generator. - * - * Specifying the inner radius as a function is useful for constructing a stacked polar bar chart, often in conjunction with a sqrt scale. - * More commonly, a constant inner radius is used for a donut or pie chart. If the outer radius is smaller than the inner radius, the inner and outer radii are swapped. - * A negative value is treated as zero. - * - * @param radius Constant radius. - */ - innerRadius(radius: number): this; - /** - * Sets the inner radius to the specified function and returns this arc generator. - * - * Specifying the inner radius as a function is useful for constructing a stacked polar bar chart, often in conjunction with a sqrt scale. - * More commonly, a constant inner radius is used for a donut or pie chart. If the outer radius is smaller than the inner radius, the inner and outer radii are swapped. - * A negative value is treated as zero. - * - * @param radius An accessor function returning a number to be used as a radius. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that were passed into the arc generator. - */ - innerRadius(radius: (this: This, d: Datum, ...args: any[]) => number): this; - - /** - * Returns the current outer radius accessor, which defaults to a function returning the outerRadius property - * of the first argument passed into it. - */ - outerRadius(): (this: This, d: Datum, ...args: any[]) => number; - /** - * Sets the outer radius to the specified number and returns this arc generator. - * - * Specifying the outer radius as a function is useful for constructing a coxcomb or polar bar chart, - * often in conjunction with a sqrt scale. More commonly, a constant outer radius is used for a pie or donut chart. - * If the outer radius is smaller than the inner radius, the inner and outer radii are swapped. - * A negative value is treated as zero. - * - * @param radius Constant radius. - */ - outerRadius(radius: number): this; - /** - * Sets the outer radius to the specified function and returns this arc generator. - * - * Specifying the outer radius as a function is useful for constructing a coxcomb or polar bar chart, - * often in conjunction with a sqrt scale. More commonly, a constant outer radius is used for a pie or donut chart. - * If the outer radius is smaller than the inner radius, the inner and outer radii are swapped. - * A negative value is treated as zero. - * - * @param radius An accessor function returning a number to be used as a radius. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that were passed into the arc generator. - */ - outerRadius(radius: (this: This, d: Datum, ...args: any[]) => number): this; - - /** - * Returns the current corner radius accessor, which defaults to a function returning a constant value of zero. - */ - cornerRadius(): (this: This, d: Datum, ...args: any[]) => number; - /** - * Sets the corner radius to the specified number and returns this arc generator. - * - * If the corner radius is greater than zero, the corners of the arc are rounded using circles of the given radius. - * For a circular sector, the two outer corners are rounded; for an annular sector, all four corners are rounded. - * - * The corner radius may not be larger than (outerRadius - innerRadius) / 2. - * In addition, for arcs whose angular span is less than Ï€, the corner radius may be reduced as two adjacent rounded corners intersect. - * This is occurs more often with the inner corners. - * - * @param radius Constant radius. - */ - cornerRadius(radius: number): this; - /** - * Sets the corner radius to the specified function and returns this arc generator. - * - * The corner radius may not be larger than (outerRadius - innerRadius) / 2. - * In addition, for arcs whose angular span is less than Ï€, the corner radius may be reduced as two adjacent rounded corners intersect. - * This is occurs more often with the inner corners. - * - * @param radius An accessor function returning a number to be used as a radius. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that were passed into the arc generator. - */ - cornerRadius(radius: (this: This, d: Datum, ...args: any[]) => number): this; - - /** - * Returns the current start angle accessor, which defaults to a function returning the startAngle property - * of the first argument passed into it. - */ - startAngle(): (this: This, d: Datum, ...args: any[]) => number; - /** - * Sets the start angle to the specified number and returns this arc generator. - * - * The angle is specified in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. - * If |endAngle - startAngle| ≥ Ï„, a complete circle or annulus is generated rather than a sector. - * - * @param angle Constant angle in radians. - */ - startAngle(angle: number): this; - /** - * Sets the start angle to the specified function and returns this arc generator. - * - * The angle is specified in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. - * If |endAngle - startAngle| ≥ Ï„, a complete circle or annulus is generated rather than a sector. - * - * @param angle An accessor function returning a number in radians to be used as an angle. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that were passed into the arc generator. - */ - startAngle(angle: (this: This, d: Datum, ...args: any[]) => number): this; - - /** - * Returns the current end angle accessor, which defaults to a function returning the endAngle property - * of the first argument passed into it. - */ - endAngle(): (this: This, d: Datum, ...args: any[]) => number; - /** - * Sets the end angle to the specified number and returns this arc generator. - * - * The angle is specified in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. - * If |endAngle - startAngle| ≥ Ï„, a complete circle or annulus is generated rather than a sector. - * - * @param angle Constant angle in radians. - */ - endAngle(angle: number): this; - /** - * Sets the end angle to the specified function and returns this arc generator. - * - * The angle is specified in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. - * If |endAngle - startAngle| ≥ Ï„, a complete circle or annulus is generated rather than a sector. - * - * @param angle An accessor function returning a number in radians to be used as an angle. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that were passed into the arc generator. - */ - endAngle(angle: (this: This, d: Datum, ...args: any[]) => number): this; - - /** - * Returns the current pad angle accessor, which defaults to a function returning the padAngle property - * of the first argument passed into it, or false if no data are passed in or the property is not defined. - */ - padAngle(): (this: This, d: Datum, ...args: any[]) => number | undefined; - /** - * Sets the pad angle to the specified number and returns this arc generator. - * - * The pad angle is converted to a fixed linear distance separating adjacent arcs, defined as padRadius * padAngle. This distance is subtracted equally from the start and end of the arc. - * If the arc forms a complete circle or annulus, as when |endAngle - startAngle| ≥ Ï„, the pad angle is ignored. If the inner radius or angular span is small relative to the pad angle, - * it may not be possible to maintain parallel edges between adjacent arcs. In this case, the inner edge of the arc may collapse to a point, similar to a circular sector. - * For this reason, padding is typically only applied to annular sectors (i.e., when innerRadius is positive). - * - * The recommended minimum inner radius when using padding is outerRadius * padAngle / sin(θ), where θ is the angular span of the smallest arc before padding. - * For example, if the outer radius is 200 pixels and the pad angle is 0.02 radians, a reasonable θ is 0.04 radians, and a reasonable inner radius is 100 pixels. - * - * Often, the pad angle is not set directly on the arc generator, but is instead computed by the pie generator so as to ensure that the area of padded arcs is proportional to their value; - * see pie.padAngle. See the pie padding animation for illustration. - * If you apply a constant pad angle to the arc generator directly, it tends to subtract disproportionately from smaller arcs, introducing distortion. - * - * @param angle Constant angle in radians. - */ - padAngle(angle: number | undefined): this; - /** - * Sets the pad angle to the specified function and returns this arc generator. - * - * The pad angle is converted to a fixed linear distance separating adjacent arcs, defined as padRadius * padAngle. This distance is subtracted equally from the start and end of the arc. - * If the arc forms a complete circle or annulus, as when |endAngle - startAngle| ≥ Ï„, the pad angle is ignored. If the inner radius or angular span is small relative to the pad angle, - * it may not be possible to maintain parallel edges between adjacent arcs. In this case, the inner edge of the arc may collapse to a point, similar to a circular sector. - * For this reason, padding is typically only applied to annular sectors (i.e., when innerRadius is positive). - * - * The recommended minimum inner radius when using padding is outerRadius * padAngle / sin(θ), where θ is the angular span of the smallest arc before padding. - * For example, if the outer radius is 200 pixels and the pad angle is 0.02 radians, a reasonable θ is 0.04 radians, and a reasonable inner radius is 100 pixels. - * - * Often, the pad angle is not set directly on the arc generator, but is instead computed by the pie generator so as to ensure that the area of padded arcs is proportional to their value; - * see pie.padAngle. See the pie padding animation for illustration. - * If you apply a constant pad angle to the arc generator directly, it tends to subtract disproportionately from smaller arcs, introducing distortion. - * - * @param angle An accessor function returning a number in radians to be used as an angle. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that were passed into the arc generator. - */ - padAngle(angle: (this: This, d: Datum, ...args: any[]) => number | undefined): this; - - /** - * Returns the current pad radius accessor, which defaults to null, indicating that the pad radius should be automatically computed as sqrt(innerRadius * innerRadius + outerRadius * outerRadius). - */ - padRadius(): ((this: This, d: Datum, ...args: any[]) => number) | null; - /** - * Sets the pad radius to null indicating that the pad radius should be automatically computed as sqrt(innerRadius * innerRadius + outerRadius * outerRadius), and returns this arc generator. - * - * The pad radius determines the fixed linear distance separating adjacent arcs, defined as padRadius * padAngle. - * - * @param radius null to set automatic pad radius calculation. - */ - padRadius(radius: null): this; - /** - * Sets the pad radius to the specified number, and returns this arc generator. - * - * The pad radius determines the fixed linear distance separating adjacent arcs, defined as padRadius * padAngle. - * - * @param radius A constant radius. - */ - padRadius(radius: number): this; - - /* - * Sets the pad radius to the specified function, and returns this arc generator. - * - * @param radius An accessor function returning a number to be used as a radius. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that were passed into the arc generator. - */ - padRadius(radius: (this: This, d: Datum, ...args: any[]) => number): this; - - /** - * Returns the current rendering context, which defaults to null. - */ - context(): CanvasRenderingContext2D | null; - /** - * Sets the rendering context and returns this arc generator. - * - * If the context is not null, then the generated arc is rendered to this context as a sequence of path method calls. - * - * @param context The rendering context. - */ - context(context: CanvasRenderingContext2D): this; - /** - * Sets the rendering context to null and returns this arc generator. - * - * A path data string representing the generated arc will be returned when the generator is invoked with data. - * - * @param context null, to remove rendering context. - */ - context(context: null): this; -} - -/** - * Constructs a new arc generator with the default settings. - * - * Ensure that the accessors used with the arc generator correspond to the arguments passed into them, - * or set them to constants as appropriate. - */ -export function arc(): Arc<any, DefaultArcObject>; -/** - * Constructs a new arc generator with the default settings. - * - * Ensure that the accessors used with the arc generator correspond to the arguments passed into them, - * or set them to constants as appropriate. - * - * The generic corresponds to the datum type representing a arc. - */ -export function arc<Datum>(): Arc<any, Datum>; -/** - * Constructs a new arc generator with the default settings. - * - * Ensure that the accessors used with the arc generator correspond to the arguments passed into them, - * or set them to constants as appropriate. - * - * The first generic corresponds to the type of the "this" context within which the arc generator and its accessor functions will be invoked. - * - * The second generic corresponds to the datum type representing a arc. - */ -export function arc<This, Datum>(): Arc<This, Datum>; - -// ----------------------------------------------------------------------------------- -// Pie Generator -// ----------------------------------------------------------------------------------- - -/** - * Element of the Arc Datums Array created by invoking the Pie generator. - * - * The generic refers to the data type of an element in the input array passed into the Pie generator. - */ -export interface PieArcDatum<T> { - /** - * The input datum; the corresponding element in the input data array of the Pie generator. - */ - data: T; - /** - * The numeric value of the arc. - */ - value: number; - /** - * The zero-based sorted index of the arc. - */ - index: number; - /** - * The start angle of the arc. - * If the pie generator was configured to be used for the arc generator, - * then the units are in radians with 0 at -y (12 o’clock) and positive angles proceeding clockwise. - */ - startAngle: number; - /** - * The end angle of the arc. - * If the pie generator was configured to be used for the arc generator, - * then the units are in radians with 0 at -y (12 o’clock) and positive angles proceeding clockwise. - */ - endAngle: number; - /** - * The pad angle of the arc. If the pie generator was configured to be used for the arc generator, than the units are in radians. - */ - padAngle: number; -} - -/** - * The pie generator does not produce a shape directly, but instead computes the necessary angles to represent a tabular dataset as a pie or donut chart; - * these angles can then be passed to an arc generator. - * - * The first generic corresponds to the type of the "this" context within which the pie generator and its accessor functions will be invoked. - * - * The second generic refers to the data type of an element in the input array passed into the Pie generator. - */ -export interface Pie<This, Datum> { - /** - * Generates a pie for the given array of data, returning an array of objects representing each datum’s arc angles. - * Any additional arguments are arbitrary; they are simply propagated to the pie generator’s accessor functions along with the this object. - * The length of the returned array is the same as data, and each element i in the returned array corresponds to the element i in the input data. - * - * This representation is designed to work with the arc generator’s default startAngle, endAngle and padAngle accessors. - * The angular units are arbitrary, but if you plan to use the pie generator in conjunction with an arc generator, - * you should specify angles in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. - * - * @param data Array of data elements. - */ - (this: This, data: Datum[], ...args: any[]): Array<PieArcDatum<Datum>>; - - /** - * Returns the current value accessor, which defaults to a function returning the first argument passed into it. - * The default value accessor assumes that the input data are numbers, or that they are coercible to numbers using valueOf. - */ - value(): (d: Datum, i: number, data: Datum[]) => number; - /** - * Sets the value accessor to use the specified constant number and returns this pie generator. - * - * @param value Constant value to be used. - */ - value(value: number): this; - /** - * Sets the value accessor to use the specified function and returns this pie generator. - * - * When a pie is generated, the value accessor will be invoked for each element in the input data array. - * The default value accessor assumes that the input data are numbers, or that they are coercible to numbers using valueOf. - * If your data are not simply numbers, then you should specify an accessor that returns the corresponding numeric value for a given datum. - * - * @param value A value accessor function, which is invoked for each element in the input data array, being passed the element d, the index i, and the array data as three arguments. - * It returns a numeric value. - */ - value(value: (d: Datum, i: number, data: Datum[]) => number): this; - - /** - * Returns the current data comparator, which defaults to null. - */ - sort(): ((a: Datum, b: Datum) => number) | null; - /** - * Sets the data comparator to the specified function and returns this pie generator. - * - * If both the data comparator and the value comparator are null, then arcs are positioned in the original input order. - * Otherwise, the data is sorted according to the data comparator, and the resulting order is used. Setting the data comparator implicitly sets the value comparator to null. - * - * Sorting does not affect the order of the generated arc array which is always in the same order as the input data array; it merely affects the computed angles of each arc. - * The first arc starts at the start angle and the last arc ends at the end angle. - * - * @param comparator A compare function takes two arguments a and b, each elements from the input data array. - * If the arc for a should be before the arc for b, then the comparator must return a number less than zero; - * if the arc for a should be after the arc for b, then the comparator must return a number greater than zero; - * returning zero means that the relative order of a and b is unspecified. - */ - sort(comparator: (a: Datum, b: Datum) => number): this; - /** - * Sets the data comparator to null and returns this pie generator. - * - * If both the data comparator and the value comparator are null, then arcs are positioned in the original input order. - * - * @param comparator null, to set the pie generator to use the original input order or use the sortValues comparator, if any. - */ - sort(comparator: null): this; - - /** - * Returns the current value comparator, which defaults to descending value. - */ - sortValues(): ((a: number, b: number) => number) | null; - /** - * Sets the value comparator to the specified function and returns this pie generator. - * - * If both the data comparator and the value comparator are null, then arcs are positioned in the original input order. - * Otherwise, the data is sorted according to the data comparator, and the resulting order is used. - * Setting the value comparator implicitly sets the data comparator to null. - * - * Sorting does not affect the order of the generated arc array which is always in the same order as the input data array; - * it merely affects the computed angles of each arc. The first arc starts at the start angle and the last arc ends at the end angle. - * - * @param comparator The value comparator takes two arguments a and b which are values derived from the input data array using the value accessor, not the data elements. - * If the arc for a should be before the arc for b, then the comparator must return a number less than zero; - * if the arc for a should be after the arc for b, then the comparator must return a number greater than zero; returning zero means that the relative order of a and b is unspecified. - */ - sortValues(comparator: (a: number, b: number) => number): this; - /** - * Sets the value comparator to null and returns this pie generator. - * - * If both the data comparator and the value comparator are null, then arcs are positioned in the original input order. - * - * @param comparator null, to set the pie generator to use the original input order or use the data comparator, if any. - */ - sortValues(comparator: null): this; - - /** - * Returns the current start angle accessor, which defaults to a function returning a constant zero. - */ - startAngle(): (this: This, data: Datum[], ...args: any[]) => number; - /** - * Sets the overall start angle of the pie to the specified number and returns this pie generator. - * - * The default start angle is zero. - * - * The start angle here means the overall start angle of the pie, i.e., the start angle of the first arc. - * The start angle accessor is invoked once, being passed the same arguments and this context as the pie generator. - * The units of angle are arbitrary, but if you plan to use the pie generator in conjunction with an arc generator, - * you should specify an angle in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. - * - * @param angle A constant angle. - */ - startAngle(angle: number): this; - /** - * Sets the overall start angle of the pie to the specified function and returns this pie generator. - * - * The default start angle is zero. - * - * The start angle here means the overall start angle of the pie, i.e., the start angle of the first arc. - * The start angle accessor is invoked once, being passed the same arguments and this context as the pie generator. - * The units of angle are arbitrary, but if you plan to use the pie generator in conjunction with an arc generator, - * you should specify an angle in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. - * - * @param angle An angle accessor function, which is invoked once, being passed the same arguments and this context as the pie generator. - */ - startAngle(angle: (this: This, data: Datum[], ...args: any[]) => number): this; - - /** - * Returns the current end angle accessor, which defaults to a function returning a constant 2*pi. - */ - endAngle(): (this: This, data: Datum[], ...args: any[]) => number; - /** - * Sets the overall end angle of the pie to the specified number and returns this pie generator. - * - * The default end angle is 2*pi. - * - * The end angle here means the overall end angle of the pie, i.e., the end angle of the last arc. - * The units of angle are arbitrary, but if you plan to use the pie generator in conjunction with an arc generator, - * you should specify an angle in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. - * - * The value of the end angle is constrained to startAngle ± Ï„, such that |endAngle - startAngle| ≤ Ï„. - * - * @param angle A constant angle. - */ - endAngle(angle: number): this; - /** - * Sets the overall end angle of the pie to the specified function and returns this pie generator. - * - * The default end angle is 2*pi. - * - * The end angle here means the overall end angle of the pie, i.e., the end angle of the last arc. - * The end angle accessor is invoked once, being passed the same arguments and this context as the pie generator. - * The units of angle are arbitrary, but if you plan to use the pie generator in conjunction with an arc generator, - * you should specify an angle in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. - * - * The value of the end angle is constrained to startAngle ± Ï„, such that |endAngle - startAngle| ≤ Ï„. - * - * @param angle An angle accessor function, which is invoked once, being passed the same arguments and this context as the pie generator. - */ - endAngle(angle: (this: This, data: Datum[], ...args: any[]) => number): this; - - /** - * Returns the current pad angle accessor, which defaults to a function returning a constant zero. - */ - padAngle(): (this: This, data: Datum[], ...args: any[]) => number; - /** - * Sets the pad angle to the specified number and returns this pie generator. - * - * The pad angle here means the angular separation between each adjacent arc. - * The total amount of padding reserved is the specified angle times the number of elements in the input data array, and at most |endAngle - startAngle|; - * the remaining space is then divided proportionally by value such that the relative area of each arc is preserved. - * The units of angle are arbitrary, but if you plan to use the pie generator in conjunction with an arc generator, you should specify an angle in radians. - * - * @param angle A constant angle. - */ - padAngle(angle: number): this; - /** - * Sets the pad angle to the specified function and returns this pie generator. - * - * The pad angle here means the angular separation between each adjacent arc. - * The total amount of padding reserved is the specified angle times the number of elements in the input data array, and at most |endAngle - startAngle|; - * the remaining space is then divided proportionally by value such that the relative area of each arc is preserved. - * The pad angle accessor is invoked once, being passed the same arguments and this context as the pie generator. - * The units of angle are arbitrary, but if you plan to use the pie generator in conjunction with an arc generator, you should specify an angle in radians. - * - * @param angle An angle accessor function, which is invoked once, being passed the same arguments and this context as the pie generator. - */ - padAngle(angle: (this: This, data: Datum[], ...args: any[]) => number): this; -} - -/** - * Constructs a new pie generator with the default settings. - * - * Ensure that the accessors used with the pie generator correspond to the arguments passed into them, - * or set them to constants as appropriate. - */ -export function pie(): Pie<any, number | { valueOf(): number }>; -/** - * Constructs a new pie generator with the default settings. - * - * Ensure that the accessors used with the pie generator correspond to the arguments passed into them, - * or set them to constants as appropriate. - * - * The generic refers to the data type of an element in the input array passed into the Pie generator. - */ -export function pie<Datum>(): Pie<any, Datum>; -/** - * Constructs a new pie generator with the default settings. - * - * Ensure that the accessors used with the pie generator correspond to the arguments passed into them, - * or set them to constants as appropriate. - * - * The first generic corresponds to the type of the "this" context within which the pie generator and its accessor functions will be invoked. - * - * The second generic refers to the data type of an element in the input array passed into the Pie generator. - */ -export function pie<This, Datum>(): Pie<This, Datum>; - -// ----------------------------------------------------------------------------------- -// Line Generators -// ----------------------------------------------------------------------------------- - -/** - * The line generator produces a spline or polyline, as in a line chart. - * Lines also appear in many other visualization types, such as the links in hierarchical edge bundling. - * - * The generic refers to the data type of an element in the input array passed into the line generator. - */ -export interface Line<Datum> { - /** - * Generates a line for the given array of data. Depending on this line generator’s associated curve, - * the given input data may need to be sorted by x-value before being passed to the line generator. - * - * IMPORTANT: If the rendering context of the line generator is null, - * then the line is returned as a path data string. - * - * @param data Array of data elements. - */ - (data: Datum[]): string | null; - /** - * Generates a line for the given array of data. Depending on this line generator’s associated curve, - * the given input data may need to be sorted by x-value before being passed to the line generator. - * - * IMPORTANT: If the line generator has been configured with a rendering context, - * then the line is rendered to this context as a sequence of path method calls and this function returns void. - * - * @param data Array of data elements. - */ - (data: Datum[]): void; - - /** - * Returns the current x-coordinate accessor function, which defaults to a function returning first element of a two-element array of numbers. - */ - x(): (d: Datum, index: number, data: Datum[]) => number; - /** - * Sets the x accessor to the specified number and returns this line generator. - * - * @param x A constant x-coordinate value. - */ - x(x: number): this; - /** - * Sets the x accessor to the specified function and returns this line generator. - * - * When a line is generated, the x accessor will be invoked for each defined element in the input data array. - * - * The default x accessor assumes that the input data are two-element arrays of numbers. If your data are in a different format, or if you wish to transform the data before rendering, - * then you should specify a custom accessor. - * - * @param x A coordinate accessor function which returns the x-coordinate value. The x accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - x(x: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current y-coordinate accessor function, which defaults to a function returning second element of a two-element array of numbers. - */ - y(): (d: Datum, index: number, data: Datum[]) => number; - /** - * Sets the y accessor to the specified number and returns this line generator. - * - * @param y A constant y-coordinate value. - */ - y(y: number): this; - /** - * Sets the y accessor to the specified function and returns this line generator. - * - * When a line is generated, the y accessor will be invoked for each defined element in the input data array. - * - * The default y accessor assumes that the input data are two-element arrays of numbers. If your data are in a different format, or if you wish to transform the data before rendering, - * then you should specify a custom accessor. - * - * @param y A coordinate accessor function which returns the y-coordinate value. The y accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - y(y: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current defined accessor, which defaults to a function returning a constant boolean value of true. - */ - defined(): (d: Datum, index: number, data: Datum[]) => boolean; - /** - * Sets the defined accessor to the specified boolean and returns this line generator. - * - * The default accessor for defined returns a constant boolean value of true, thus assumes that the input data is always defined. - * - * When a line is generated, the defined accessor will be invoked for each element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - * If the given element is defined (i.e., if the defined accessor returns a truthy value for this element), - * the x and y accessors will subsequently be evaluated and the point will be added to the current line segment. - * Otherwise, the element will be skipped, the current line segment will be ended, and a new line segment will be generated for the next defined point. - * As a result, the generated line may have several discrete segments. - * - * Note that if a line segment consists of only a single point, it may appear invisible unless rendered with rounded or square line caps. - * In addition, some curves such as curveCardinalOpen only render a visible segment if it contains multiple points. - * - * @param defined A boolean constant. - */ - defined(defined: boolean): this; - /** - * Sets the defined accessor to the specified function and returns this line generator. - * - * The default accessor for defined returns a constant boolean value of true, thus assumes that the input data is always defined. - * - * When a line is generated, the defined accessor will be invoked for each element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - * If the given element is defined (i.e., if the defined accessor returns a truthy value for this element), - * the x and y accessors will subsequently be evaluated and the point will be added to the current line segment. - * Otherwise, the element will be skipped, the current line segment will be ended, and a new line segment will be generated for the next defined point. - * As a result, the generated line may have several discrete segments. - * - * Note that if a line segment consists of only a single point, it may appear invisible unless rendered with rounded or square line caps. - * In addition, some curves such as curveCardinalOpen only render a visible segment if it contains multiple points. - * - * @param defined An accessor function which returns a boolean value. The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - defined(defined: (d: Datum, index: number, data: Datum[]) => boolean): this; - - /** - * Returns the current curve factory, which defaults to curveLinear. - */ - curve(): CurveFactory | CurveFactoryLineOnly; - /** - * Returns the current curve factory, which defaults to curveLinear. - * - * The generic allows to cast the curve factory to a specific type, if known. - */ - curve<C extends CurveFactory | CurveFactoryLineOnly>(): C; - /** - * Sets the curve factory and returns this line generator. - * - * @param curve A valid curve factory. - */ - curve(curve: CurveFactory | CurveFactoryLineOnly): this; - - /** - * Returns the current rendering context, which defaults to null. - */ - context(): CanvasRenderingContext2D | null; - /** - * Sets the rendering context and returns this line generator. - * - * If the context is not null, then the generated line is rendered to this context as a sequence of path method calls. - * - * @param context The rendering context. - */ - context(context: CanvasRenderingContext2D): this; - /** - * Sets the rendering context to null and returns this line generator. - * - * A path data string representing the generated line will be returned when the generator is invoked with data. - * - * @param context null, to remove rendering context. - */ - context(context: null): this; -} - -/** - * Constructs a new line generator with the default settings. - * - * Ensure that the accessors used with the line generator correspond to the arguments passed into them, - * or set them to constants as appropriate. - */ -export function line(): Line<[number, number]>; -/** - * Constructs a new line generator with the default settings. - * - * Ensure that the accessors used with the line generator correspond to the arguments passed into them, - * or set them to constants as appropriate. - * - * The generic refers to the data type of an element in the input array passed into the line generator. - */ -export function line<Datum>(): Line<Datum>; - -/** - * The radial line generator produces a spline or polyline, as in a line chart. - * - * A radial line generator is equivalent to the standard Cartesian line generator, - * except the x and y accessors are replaced with angle and radius accessors. - * Radial lines are always positioned relative to ⟨0,0⟩; use a transform (see: SVG, Canvas) to change the origin. - * - * The generic refers to the data type of an element in the input array passed into the line generator. - */ -export interface LineRadial<Datum> { - /** - * Generates a radial line for the given array of data. Depending on this radial line generator’s associated curve, - * the given input data may need to be sorted by x-value before being passed to the line generator. - * - * IMPORTANT: If the rendering context of the radial line generator is null, - * then the radial line is returned as a path data string. - * - * @param data Array of data elements. - */ - (data: Datum[]): string | null; - /** - * Generates a radial line for the given array of data. Depending on this radial line generator’s associated curve, - * the given input data may need to be sorted by x-value before being passed to the radial line generator. - * - * IMPORTANT: If the radial line generator has been configured with a rendering context, - * then the radial line is rendered to this context as a sequence of path method calls and this function returns void. - * - * @param data Array of data elements. - */ - (data: Datum[]): void; - - /** - * Returns the current angle accessor function, which defaults to a function returning first element of a two-element array of numbers. - */ - angle(): (d: Datum, index: number, data: Datum[]) => number; - /** - * Sets the angle accessor to the specified number and returns this radial line generator. - * - * @param angle A constant angle value in radians, with 0 at -y (12 o’clock). - */ - angle(angle: number): this; - /** - * Sets the angle accessor to the specified function and returns this radial line generator. - * - * When a radial line is generated, the angle accessor will be invoked for each defined element in the input data array. - * - * The default angle accessor assumes that the input data are two-element arrays of numbers. If your data are in a different format, or if you wish to transform the data before rendering, - * then you should specify a custom accessor. - * - * @param angle An angle accessor function which returns the angle value in radians, with 0 at -y (12 o’clock). The angle accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - angle(angle: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current radius accessor function, which defaults to a function returning second element of a two-element array of numbers. - */ - radius(): (d: Datum, index: number, data: Datum[]) => number; - /** - * Sets the radius accessor to the specified number and returns this radial line generator. - * - * @param radius A constant radius value. - */ - radius(radius: number): this; - /** - * Sets the radius accessor to the specified function and returns this radial line generator. - * - * When a radial line is generated, the radius accessor will be invoked for each defined element in the input data array. - * - * The default radius accessor assumes that the input data are two-element arrays of numbers. If your data are in a different format, or if you wish to transform the data before rendering, - * then you should specify a custom accessor. - * - * @param radius A radius accessor function which returns the radius value. The radius accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - radius(radius: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current defined accessor, which defaults to a function returning a constant boolean value of true. - */ - defined(): (d: Datum, index: number, data: Datum[]) => boolean; - /** - * Sets the defined accessor to the specified boolean and returns this radial line generator. - * - * The default accessor for defined returns a constant boolean value of true, thus assumes that the input data is always defined. - * - * When a radial line is generated, the defined accessor will be invoked for each element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - * If the given element is defined (i.e., if the defined accessor returns a truthy value for this element), - * the angle and radius accessors will subsequently be evaluated and the point will be added to the current radial line segment. - * Otherwise, the element will be skipped, the current radial line segment will be ended, and a new radial line segment will be generated for the next defined point. - * As a result, the generated radial line may have several discrete segments. - * - * Note that if a radial line segment consists of only a single point, it may appear invisible unless rendered with rounded or square line caps. - * In addition, some curves such as curveCardinalOpen only render a visible segment if it contains multiple points. - * - * @param defined A boolean constant. - */ - defined(defined: boolean): this; - /** - * Sets the defined accessor to the specified function and returns this radial line generator. - * - * The default accessor for defined returns a constant boolean value of true, thus assumes that the input data is always defined. - * - * When a radial line is generated, the defined accessor will be invoked for each element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - * If the given element is defined (i.e., if the defined accessor returns a truthy value for this element), - * the angle and radius accessors will subsequently be evaluated and the point will be added to the current radial line segment. - * Otherwise, the element will be skipped, the current radial line segment will be ended, and a new radial line segment will be generated for the next defined point. - * As a result, the generated radial line may have several discrete segments. - * - * Note that if a radial line segment consists of only a single point, it may appear invisible unless rendered with rounded or square line caps. - * In addition, some curves such as curveCardinalOpen only render a visible segment if it contains multiple points. - * - * @param defined An accessor function which returns a boolean value. The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - defined(defined: (d: Datum, index: number, data: Datum[]) => boolean): this; - - /** - * Returns the current curve factory, which defaults to curveLinear. - */ - curve(): CurveFactory | CurveFactoryLineOnly; - /** - * Returns the current curve factory, which defaults to curveLinear. - * - * The generic allows to cast the curve factory to a specific type, if known. - */ - curve<C extends CurveFactory | CurveFactoryLineOnly>(): C; - /** - * Sets the curve factory and returns this radial line generator. - * - * Note that curveMonotoneX or curveMonotoneY are not recommended for radial lines because they assume that the data is monotonic in x or y, - * which is typically untrue of radial lines. - * - * @param curve A valid curve factory. - */ - curve(curve: CurveFactory | CurveFactoryLineOnly): this; - - /** - * Returns the current rendering context, which defaults to null. - */ - context(): CanvasRenderingContext2D | null; - /** - * Sets the rendering context and returns this radial line generator. - * - * If the context is not null, then the generated radial line is rendered to this context as a sequence of path method calls. - * - * @param context The rendering context. - */ - context(context: CanvasRenderingContext2D): this; - /** - * Sets the rendering context to null and returns this radial line generator. - * - * A path data string representing the generated radial line will be returned when the generator is invoked with data. - * - * @param context null, to remove rendering context. - */ - context(context: null): this; -} - -/** - * Constructs a new radial line generator with the default settings. - * - * Ensure that the accessors used with the radial line generator correspond to the arguments passed into them, - * or set them to constants as appropriate. - */ -export function lineRadial(): LineRadial<[number, number]>; -/** - * Constructs a new radial line generator with the default settings. - * - * Ensure that the accessors used with the radial line generator correspond to the arguments passed into them, - * or set them to constants as appropriate. - * - * The generic refers to the data type of an element in the input array passed into the radial line generator. - */ -export function lineRadial<Datum>(): LineRadial<Datum>; - -/** - * @deprecated Use LineRadial<Datum> - */ -export type RadialLine<Datum> = LineRadial<Datum>; - -/** - * @deprecated Use lineRadial() - */ -export function radialLine(): RadialLine<[number, number]>; -/** - * @deprecated Use lineRadial<Datum>() - */ -export function radialLine<Datum>(): RadialLine<Datum>; - -// ----------------------------------------------------------------------------------- -// Area Generators -// ----------------------------------------------------------------------------------- - -/** - * The area generator produces an area, as in an area chart. An area is defined by two bounding lines, either splines or polylines. - * Typically, the two lines share the same x-values (x0 = x1), differing only in y-value (y0 and y1); most commonly, y0 is defined as a constant representing zero. - * The first line (the topline) is defined by x1 and y1 and is rendered first; the second line (the baseline) is defined by x0 and y0 and is rendered second, with the points in reverse order. - * With a curveLinear curve, this produces a clockwise polygon. - * - * The generic refers to the data type of an element in the input array passed into the area generator. - */ -export interface Area<Datum> { - /** - * Generates an area for the given array of data. Depending on this area generator’s associated curve, - * the given input data may need to be sorted by x-value before being passed to the area generator. - * - * IMPORTANT: If the rendering context of the area generator is null, - * then the area is returned as a path data string. - * - * @param data Array of data elements. - */ - (data: Datum[]): string | null; - /** - * Generates an area for the given array of data. Depending on this area generator’s associated curve, - * the given input data may need to be sorted by x-value before being passed to the area generator. - * - * IMPORTANT: If the area generator has been configured with a rendering context, - * then the area is rendered to this context as a sequence of path method calls and this function returns void. - * - * @param data Array of data elements. - */ - (data: Datum[]): void; - - /** - * Returns the current x0 accessor. The default x0 accessor is a function returning the first element of a - * two-element array of numbers. - */ - x(): (d: Datum, index: number, data: Datum[]) => number; - /** - * Sets x0 to a constant number x and x1 to null and returns this area generator. - * - * Setting x1 to null indicates that the previously-computed x0 value should be reused for the x1 value. - * - * @param x A constant value to be used for x0. - */ - x(x: number): this; - /** - * Sets x0 to the specified function x and x1 to null and returns this area generator. - * - * The default x0 accessor assumes that the input data are two-element arrays of numbers and returns the first element. - * If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. - * - * @param x An accessor function returning a value to be used for x0. The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - x(x: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current x0 accessor. The default x0 accessor is a function returning the first element of a - * two-element array of numbers. - */ - x0(): (d: Datum, index: number, data: Datum[]) => number; - /** - * Sets x0 to a constant number and returns this area generator. - * - * @param x A constant value. - */ - x0(x: number): this; - /** - * Sets x0 to the specified function and returns this area generator. - * - * The default x0 accessor assumes that the input data are two-element arrays of numbers and returns the first element. - * If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. - * - * @param x An accessor function returning a value to be used for x0. The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - x0(x: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current x1 accessor, which defaults to null, indicating that the previously-computed x0 value should be reused for the x1 value. - */ - x1(): ((d: Datum, index: number, data: Datum[]) => number) | null; - /** - * Sets x1 to null and returns this area generator. - * - * Setting x1 to null indicates that the previously-computed x0 value should be reused for the x1 value. - * - * @param x null. - */ - x1(x: null): this; - /** - * Sets x1 to a constant number and returns this area generator. - * - * @param x A constant value. - */ - x1(x: number): this; - /** - * Sets x1 to the specified function and returns this area generator. - * - * The default x1 accessor is null, indicating that the previously-computed x0 value should be reused for the x1 value. - * If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. - * - * @param x An accessor function returning a value to be used for x1. The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - x1(x: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current y0 accessor. The default y0 accessor is a function returning a constant value of zero. - */ - y(): (d: Datum, index: number, data: Datum[]) => number; - /** - * Sets y0 to a constant number y and y1 to null and returns this area generator. - * - * Setting y1 to null indicates that the previously-computed y0 value should be reused for the y1 value. - * - * @param y A constant value to be used for y0. - */ - y(y: number): this; - /** - * Sets y0 to the accessor function y and y1 to null and returns this area generator. - * - * The default y0 accessor returns a constant value of zero. - * If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. - * - * @param y An accessor function returning a value to be used for y0. The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - y(y: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current y0 accessor. The default y0 accessor is a function a constant value of zero. - */ - y0(): (d: Datum, index: number, data: Datum[]) => number; - /** - * Sets y0 to a constant number and returns this area generator. - * - * @param y A constant value. - */ - y0(y: number): this; - /** - * Sets y0 to the specified function and returns this area generator. - * - * The default y0 accessor is a function which returns a constant value of zero. - * If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. - * - * @param y An accessor function returning a value to be used for y0. The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - y0(y: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current y1 accessor or null. The default y1 accessor is a function returning the second element of a - * two-element array of numbers. - * - * If the y1 accessor is null, the previously-computed y0 value is reused for the y1 value. - */ - y1(): ((d: Datum, index: number, data: Datum[]) => number) | null; - /** - * Sets y1 to null and returns this area generator. - * - * Setting y1 to null indicates that the previously-computed y0 value should be reused for the y1 value. - * - * @param y null. - */ - y1(y: null): this; - /** - * Sets y1 to a constant number and returns this area generator. - * - * @param y A constant value. - */ - y1(y: number): this; - /** - * Sets y1 to the specified function and returns this area generator. - * - * The default y1 accessor assumes that the input data are two-element arrays of numbers and returns the second element. - * If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. - * - * @param y An accessor function returning a value to be used for y1. The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - y1(y: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current defined accessor, which defaults to a function returning a constant boolean value of true. - */ - defined(): (d: Datum, index: number, data: Datum[]) => boolean; - /** - * Sets the defined accessor to the specified boolean and returns this area generator. - * - * The default accessor for defined returns a constant boolean value of true, thus assumes that the input data is always defined. - * When an area is generated, the defined accessor will be invoked for each element in the input data array, being passed the element d, the index i, and the array data as three arguments. - * If the given element is defined (i.e., if the defined accessor returns a truthy value for this element), - * the x0, x1, y0 and y1 accessors will subsequently be evaluated and the point will be added to the current area segment. - * Otherwise, the element will be skipped, the current area segment will be ended, and a new area segment will be generated for the next defined point. - * As a result, the generated area may have several discrete segments. - * - * Note that if an area segment consists of only a single point, it may appear invisible unless rendered with rounded or square line caps. - * In addition, some curves such as curveCardinalOpen only render a visible segment if it contains multiple points. - * - * @param defined A boolean constant. - */ - defined(defined: boolean): this; - /** - * Sets the defined accessor to the specified function and returns this area generator. - * - * The default accessor for defined returns a constant boolean value of true, thus assumes that the input data is always defined. - * - * The default accessor for defined returns a constant boolean value of true, thus assumes that the input data is always defined. - * When an area is generated, the defined accessor will be invoked for each element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - * If the given element is defined (i.e., if the defined accessor returns a truthy value for this element), - * the x0, x1, y0 and y1 accessors will subsequently be evaluated and the point will be added to the current area segment. - * Otherwise, the element will be skipped, the current area segment will be ended, and a new area segment will be generated for the next defined point. - * As a result, the generated area may have several discrete segments. - * - * Note that if an area segment consists of only a single point, it may appear invisible unless rendered with rounded or square line caps. - * In addition, some curves such as curveCardinalOpen only render a visible segment if it contains multiple points. - * - * @param defined An accessor function which returns a boolean value. The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - defined(defined: (d: Datum, index: number, data: Datum[]) => boolean): this; - - /** - * Returns the current curve factory, which defaults to curveLinear. - */ - curve(): CurveFactory; - /** - * Returns the current curve factory, which defaults to curveLinear. - * - * The generic allows to cast the curve factory to a specific type, if known. - */ - curve<C extends CurveFactory>(): C; - /** - * Sets the curve factory and returns this area generator. - * - * @param curve A valid curve factory. - */ - curve(curve: CurveFactory): this; - - /** - * Returns the current rendering context, which defaults to null. - */ - context(): CanvasRenderingContext2D | null; - /** - * Sets the rendering context and returns this area generator. - * - * If the context is not null, then the generated area is rendered to this context as a sequence of path method calls. - * - * @param context The rendering context. - */ - context(context: CanvasRenderingContext2D): this; - /** - * Sets the rendering context to null and returns this area generator. - * - * A path data string representing the generated area will be returned when the generator is invoked with data. - * - * @param context null, to remove rendering context. - */ - context(context: null): this; - - /** - * Returns a new line generator that has this area generator’s current defined accessor, curve and context. - * The line’s x-accessor is this area’s x0-accessor, and the line’s y-accessor is this area’s y0-accessor. - */ - lineX0(): Line<Datum>; - /** - * Returns a new line generator that has this area generator’s current defined accessor, curve and context. - * The line’s x-accessor is this area’s x0-accessor, and the line’s y-accessor is this area’s y0-accessor. - */ - lineY0(): Line<Datum>; - - /** - * Returns a new line generator that has this area generator’s current defined accessor, curve and context. - * The line’s x-accessor is this area’s x1-accessor, and the line’s y-accessor is this area’s y0-accessor. - */ - lineX1(): Line<Datum>; - /** - * Returns a new line generator that has this area generator’s current defined accessor, curve and context. - * The line’s x-accessor is this area’s x0-accessor, and the line’s y-accessor is this area’s y1-accessor. - */ - lineY1(): Line<Datum>; -} - -/** - * Constructs a new area generator with the default settings. - * - * Ensure that the accessors used with the area generator correspond to the arguments passed into them, - * or set them to constants as appropriate. - */ -export function area(): Area<[number, number]>; -/** - * Constructs a new area generator with the default settings. - * - * Ensure that the accessors used with the area generator correspond to the arguments passed into them, - * or set them to constants as appropriate. - * - * The generic refers to the data type of an element in the input array passed into the area generator. - */ -export function area<Datum>(): Area<Datum>; - -/** - * A radial area generator. - * - * A radial area generator is equivalent to the standard Cartesian area generator, - * except the x and y accessors are replaced with angle and radius accessors. - * Radial areas are always positioned relative to ⟨0,0⟩; use a transform (see: SVG, Canvas) to change the origin. - * - * The generic refers to the data type of an element in the input array passed into the area generator. - */ -export interface AreaRadial<Datum> { - /** - * Generates a radial area for the given array of data. - * - * IMPORTANT: If the rendering context of the radial area generator is null, - * then the radial area is returned as a path data string. - * - * @param data Array of data elements. - */ - (data: Datum[]): string | null; - /** - * Generates a radial area for the given array of data. - * - * IMPORTANT: If the radial area generator has been configured with a rendering context, - * then the radial area is rendered to this context as a sequence of path method calls and this function returns void. - * - * @param data Array of data elements. - */ - (data: Datum[]): void; - - /** - * Returns the current startAngle accessor. The default startAngle accessor is a function returning the first element of a - * two-element array of numbers. - */ - angle(): (d: Datum, index: number, data: Datum[]) => number; - /** - * Sets startAngle to a constant number angle and endAngle to null and returns this radial area generator. - * - * Setting endAngle to null indicates that the previously-computed startAngle value should be reused for the endAngle value. - * - * @param angle A constant value in radians with 0 at -y (12 o’clock). - */ - angle(angle: number): this; - /** - * Sets startAngle to the specified function angle and endAngle to null and returns this radial area generator. - * - * The default startAngle accessor assumes that the input data are two-element arrays of numbers and returns the first element. - * If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. - * - * @param angle An accessor function returning a value to be used for startAngle in radians with 0 at -y (12 o’clock). - * The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - angle(angle: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current startAngle accessor. The default startAngle accessor is a function returning the first element of a - * two-element array of numbers. - */ - startAngle(): (d: Datum, index: number, data: Datum[]) => number; - /** - * Sets startAngle to a constant number and returns this radial area generator. - * - * @param angle A constant value in radians with 0 at -y (12 o’clock). - */ - startAngle(angle: number): this; - /** - * Sets startAngle to the specified function and returns this radial area generator. - * - * The default startAngle accessor assumes that the input data are two-element arrays of numbers and returns the first element. - * If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. - * - * @param angle An accessor function returning a value to be used for startAngle in radians with 0 at -y (12 o’clock). - * The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - startAngle(angle: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current endAngle accessor, which defaults to null, indicating that the previously-computed startAngle value should be reused for the endAngle value. - */ - endAngle(): ((d: Datum, index: number, data: Datum[]) => number) | null; - /** - * Sets endAngle to null and returns this radial area generator. - * - * Setting endAngle to null indicates that the previously-computed startAngle value should be reused for the endAngle value. - * - * @param angle null. - */ - endAngle(angle: null): this; - /** - * Sets endAngle to a constant number and returns this radial area generator. - * - * @param angle A constant value in radians with 0 at -y (12 o’clock). - */ - endAngle(angle: number): this; - /** - * Sets endAngle to the specified function and returns this radial area generator. - * - * The default endAngle accessor is null, indicating that the previously-computed startAngle value should be reused for the endAngle value. - * If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. - * - * @param angle An accessor function returning a value to be used for endAngle in radians with 0 at -y (12 o’clock). - * The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - endAngle(angle: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current innerRadius accessor. The default innerRadius accessor is a function returning a constant value of zero. - */ - radius(): (d: Datum, index: number, data: Datum[]) => number; - /** - * Sets innerRadius to a constant number radius and outerRadius to null and returns this radial area generator. - * - * Setting outerRadius to null indicates that the previously-computed innerRadius value should be reused for the outerRadius value. - * - * @param radius A constant value to be used for innerRadius. - */ - radius(radius: number): this; - /** - * Sets innerRadius to the accessor function radius and outerRadius to null and returns this radial area generator. - * - * The default innerRadius accessor returns a constant value of zero. - * If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. - * - * @param radius An accessor function returning a value to be used for innerRadius. The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - radius(radius: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current innerRadius accessor. The default innerRadius accessor is a function a constant value of zero. - */ - innerRadius(): (d: Datum, index: number, data: Datum[]) => number; - /** - * Sets innerRadius to a constant number and returns this radial area generator. - * - * @param radius A constant value. - */ - innerRadius(radius: number): this; - /** - * Sets innerRadius to the specified function and returns this radial area generator. - * - * The default innerRadius accessor is a function which returns a constant value of zero. - * If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. - * - * @param radius An accessor function returning a value to be used for innerRadius. The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - innerRadius(radius: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current outerRadius accessor or null. The default outerRadius accessor is a function returning the second element of a - * two-element array of numbers. - * - * If the outerRadius accessor is null, the previously-computed innerRadius value is reused for the outerRadius value. - */ - outerRadius(): ((d: Datum, index: number, data: Datum[]) => number) | null; - /** - * Sets outerRadius to null and returns this radial area generator. - * - * Setting outerRadius to null indicates that the previously-computed innerRadius value should be reused for the outerRadius value. - * - * @param radius null. - */ - outerRadius(radius: null): this; - /** - * Sets outerRadius to a constant number and returns this radial area generator. - * - * @param radius A constant value. - */ - outerRadius(radius: number): this; - /** - * Sets outerRadius to the specified function and returns this radial area generator. - * - * The default outerRadius accessor assumes that the input data are two-element arrays of numbers and returns the second element. - * If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. - * - * @param radius An accessor function returning a value to be used for outerRadius. The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - outerRadius(radius: (d: Datum, index: number, data: Datum[]) => number): this; - - /** - * Returns the current defined accessor, which defaults to a function returning a constant boolean value of true. - */ - defined(): (d: Datum, index: number, data: Datum[]) => boolean; - /** - * Sets the defined accessor to the specified boolean and returns this radial area generator. - * - * The default accessor for defined returns a constant boolean value of true, thus assumes that the input data is always defined. - * - * When a radial area is generated, the defined accessor will be invoked for each element in the input data array, being passed the element d, the index i, and the array data as three arguments. - * If the given element is defined (i.e., if the defined accessor returns a truthy value for this element), - * the startAngle, endAngle, innerRadius and outerRadius accessors will subsequently be evaluated and the point will be added to the current area segment. - * - * Otherwise, the element will be skipped, the current area segment will be ended, and a new area segment will be generated for the next defined point. - * As a result, the generated area may have several discrete segments. - * - * Note that if an area segment consists of only a single point, it may appear invisible unless rendered with rounded or square line caps. - * In addition, some curves such as curveCardinalOpen only render a visible segment if it contains multiple points. - * - * @param defined A boolean constant. - */ - defined(defined: boolean): this; - /** - * Sets the defined accessor to the specified function and returns this radial area generator. - * - * The default accessor for defined returns a constant boolean value of true, thus assumes that the input data is always defined. - * - * When a radial area is generated, the defined accessor will be invoked for each element in the input data array, being passed the element d, the index i, and the array data as three arguments. - * If the given element is defined (i.e., if the defined accessor returns a truthy value for this element), - * the startAngle, endAngle, innerRadius and outerRadius accessors will subsequently be evaluated and the point will be added to the current area segment. - * - * Otherwise, the element will be skipped, the current area segment will be ended, and a new area segment will be generated for the next defined point. - * As a result, the generated area may have several discrete segments. - * - * Note that if an area segment consists of only a single point, it may appear invisible unless rendered with rounded or square line caps. - * In addition, some curves such as curveCardinalOpen only render a visible segment if it contains multiple points. - * - * @param defined An accessor function which returns a boolean value. The accessor will be invoked for each defined element in the input data array, - * being passed the element d, the index i, and the array data as three arguments. - */ - defined(defined: (d: Datum, index: number, data: Datum[]) => boolean): this; - - /** - * Returns the current curve factory, which defaults to curveLinear. - */ - curve(): CurveFactory; - /** - * Returns the current curve factory, which defaults to curveLinear. - * - * The generic allows to cast the curve factory to a specific type, if known. - */ - curve<C extends CurveFactory>(): C; - /** - * Sets the curve factory and returns this radial area generator. - * - * Note that curveMonotoneX or curveMonotoneY are not recommended for radial areas because they assume that the data is monotonic in x or y, which is typically untrue of radial areas. - * - * @param curve A valid curve factory. - */ - curve(curve: CurveFactory): this; - - /** - * Returns the current rendering context, which defaults to null. - */ - context(): CanvasRenderingContext2D | null; - /** - * Sets the rendering context and returns this radial area generator. - * - * If the context is not null, then the generated radial area is rendered to this context as a sequence of path method calls. - * - * @param context The rendering context. - */ - context(context: CanvasRenderingContext2D): this; - /** - * Sets the rendering context to null and returns this radial area generator. - * - * A path data string representing the generated radial area will be returned when the generator is invoked with data. - * - * @param context null, to remove rendering context. - */ - context(context: null): this; - - /** - * Returns a new radial line generator that has this radial area generator’s current defined accessor, curve and context. - * The line’s angle accessor is this area’s start angle accessor, and the line’s radius accessor is this area’s inner radius accessor. - */ - lineStartAngle(): LineRadial<Datum>; - - /** - * Returns a new radial line generator that has this radial area generator’s current defined accessor, curve and context. - * The line’s angle accessor is this area’s start angle accessor, and the line’s radius accessor is this area’s inner radius accessor. - */ - lineInnerRadius(): LineRadial<Datum>; - - /** - * Returns a new radial line generator that has this radial area generator’s current defined accessor, curve and context. - * The line’s angle accessor is this area’s end angle accessor, and the line’s radius accessor is this area’s inner radius accessor. - */ - lineEndAngle(): LineRadial<Datum>; - - /** - * Returns a new radial line generator that has this radial area generator’s current defined accessor, curve and context. - * The line’s angle accessor is this area’s start angle accessor, and the line’s radius accessor is this area’s outer radius accessor. - */ - lineOuterRadius(): LineRadial<Datum>; -} - -/** - * Constructs a new radial area generator with the default settings. - * - * Ensure that the accessors used with the area generator correspond to the arguments passed into them, - * or set them to constants as appropriate. - */ -export function areaRadial(): AreaRadial<[number, number]>; -/** - * Constructs a new radial area generator with the default settings. - * - * Ensure that the accessors used with the area generator correspond to the arguments passed into them, - * or set them to constants as appropriate. - * - * The generic refers to the data type of an element in the input array passed into the radial area generator. - */ -export function areaRadial<Datum>(): AreaRadial<Datum>; - -/** - * @deprecated Use AreaRadial interface - */ -export type RadialArea<Datum> = AreaRadial<Datum>; - -/** - * @deprecated Use areaRadial() - */ -export function radialArea(): RadialArea<[number, number]>; -/** - * @deprecated Use areaRadial<Datum>() - */ -export function radialArea<Datum>(): RadialArea<Datum>; - -// ----------------------------------------------------------------------------------- -// Curve Factories -// ----------------------------------------------------------------------------------- - -/** - * A minimal interface for a curve generator which supports only the rendering of lines. - * Methods for related to the rendering of areas are not implemented in this minimal interface. - * - * While lines are defined as a sequence of two-dimensional [x, y] points, - * there remains the task of transforming this discrete representation into a continuous shape: i.e., how to interpolate between the points. - * A curve generator serves this purpose. - * - * Curves are typically not constructed or used directly, instead being passed to line.curve. - */ -export interface CurveGeneratorLineOnly { - /** - * Indicates the start of a new line segment. Zero or more points will follow. - */ - lineStart(): void; - /** - * Indicates the end of the current line segment. - */ - lineEnd(): void; - /** - * Indicates a new point in the current line segment with the given x- and y-values. - */ - point(x: number, y: number): void; -} - -/** - * A factory for curve generators addressing only lines, but not areas. - */ -export type CurveFactoryLineOnly = - /** - * Returns a "lines only" curve generator which renders to the specified context. - * - * @param context A rendering context. - */ - (context: CanvasRenderingContext2D | Path) => CurveGeneratorLineOnly; - -/** - * A minimal interface for a curve generator which supports the rendering of lines and areas. - * - * While lines are defined as a sequence of two-dimensional [x, y] points, - * and areas are similarly defined by a topline and a baseline, - * there remains the task of transforming this discrete representation into a continuous shape: i.e., how to interpolate between the points. - * A curve generator serves this purpose. - * - * Curves are typically not constructed or used directly, instead being passed to line.curve and area.curve. - */ -export interface CurveGenerator extends CurveGeneratorLineOnly { - /** - * Indicates the start of a new area segment. - * Each area segment consists of exactly two line segments: the topline, followed by the baseline, with the baseline points in reverse order. - */ - areaStart(): void; - /** - * Indicates the end of the current area segment. - */ - areaEnd(): void; -} - -/** - * A factory for curve generators addressing both lines and areas. - */ -export type CurveFactory = - /** - * Returns a curve generator which renders to the specified context. - * - * @param context A rendering context. - */ - (context: CanvasRenderingContext2D | Path) => CurveGenerator; - -/** - * A curve factory for cubic basis spline generators. - * - * The curve generators produce a cubic basis spline using the specified control points. - * The first and last points are triplicated such that the spline starts at the first point and ends at the last point, - * and is tangent to the line between the first and second points, and to the line between the penultimate and last points. - */ -export const curveBasis: CurveFactory; - -/** - * A curve factory for closed cubic basis spline generators. - * - * The curve generators produce a closed cubic basis spline using the specified control points. - * When a line segment ends, the first three control points are repeated, producing a closed loop with C2 continuity. - */ -export const curveBasisClosed: CurveFactory; - -/** - * A curve factory for open cubic basis spline generators. - * - * The curve generators produce a cubic basis spline using the specified control points. - * Unlike basis, the first and last points are not repeated, and thus the curve typically does not intersect these points. - */ -export const curveBasisOpen: CurveFactory; - -/** - * A curve factory for straightened cubic basis spline generators. - * - * The curve generators produce a straightened cubic basis spline using the specified control points, - * with the spline straightened according to the curve’s beta, which defaults to 0.85. - * This curve is typically used in hierarchical edge bundling to disambiguate connections, - * as proposed by Danny Holten in Hierarchical Edge Bundles: Visualization of Adjacency Relations in Hierarchical Data. - * - * This curve does not implement curve.areaStart and curve.areaEnd; it is intended to work with d3.line, not d3.area. - */ -export interface CurveBundleFactory extends CurveFactoryLineOnly { - /** - * Returns a bundle curve factory with the specified beta in the range [0, 1], representing the bundle strength. - * If beta equals zero, a straight line between the first and last point is produced; if beta equals one, - * a standard basis spline is produced. - * - * @param beta A constant value in the [0, 1] interval. - */ - beta(beta: number): this; -} - -/** - * A curve factory for straightened cubic basis spline generators. - * - * The curve generators produce a straightened cubic basis spline using the specified control points, - * with the spline straightened according to the curve’s beta, which defaults to 0.85. - * This curve is typically used in hierarchical edge bundling to disambiguate connections, - * as proposed by Danny Holten in Hierarchical Edge Bundles: Visualization of Adjacency Relations in Hierarchical Data. - * - * This curve does not implement curve.areaStart and curve.areaEnd; it is intended to work with d3.line, not d3.area. - */ -export const curveBundle: CurveBundleFactory; - -/** - * A curve factory for cubic cardinal spline generators. - */ -export interface CurveCardinalFactory extends CurveFactory { - /** - * Returns a cardinal curve factory with the specified tension in the range [0, 1]. - * The tension determines the length of the tangents: a tension of one yields all zero tangents, equivalent to curveLinear; a tension of zero produces a uniform Catmull–Rom spline. - * - * @param tension A constant in the [0, 1] interval. - */ - tension(tension: number): this; -} - -/** - * A curve factory for cubic cardinal spline generators. - * - * The curve generators produce a cubic cardinal spline using the specified control points, with one-sided differences used for the first and last piece. - * The default tension is 0. - */ -export const curveCardinal: CurveCardinalFactory; - -/** - * A curve factory for closed cubic cardinal spline generators. - * - * The curve generators produce closed cubic cardinal spline using the specified control points. - * When a line segment ends, the first three control points are repeated, producing a closed loop. - * The default tension is 0. - */ -export const curveCardinalClosed: CurveCardinalFactory; - -/** - * A curve factory for open cubic cardinal spline generators. - * - * The curve generators produce a cubic cardinal spline using the specified control points. - * Unlike curveCardinal, one-sided differences are not used for the first and last piece, - * and thus the curve starts at the second point and ends at the penultimate point. - * The default tension is 0. - */ -export const curveCardinalOpen: CurveCardinalFactory; - -/** - * A curve factory for cubic Catmull–Rom spline generators. - */ -export interface CurveCatmullRomFactory extends CurveFactory { - /** - * Returns a cubic Catmull–Rom curve factory with the specified alpha in the range [0, 1]. - * If alpha is zero, produces a uniform spline, equivalent to curveCardinal with a tension of zero; - * if alpha is one, produces a chordal spline; if alpha is 0.5, produces a centripetal spline. - * Centripetal splines are recommended to avoid self-intersections and overshoot. - * - * @param alpha A constant in the [0, 1] interval. - */ - alpha(alpha: number): this; -} - -/** - * A curve factory for cubic Catmull–Rom spline generators. - * - * The curve generators produce a cubic Catmull–Rom spline using the specified control points and the parameter alpha, - * which defaults to 0.5, as proposed by Yuksel et al. in On the Parameterization of Catmull–Rom Curves, - * with one-sided differences used for the first and last piece. - */ -export const curveCatmullRom: CurveCatmullRomFactory; - -/** - * A curve factory for cubic Catmull–Rom spline generators. - * - * The curve generators produce a closed cubic Catmull–Rom spline using the specified control points and the parameter alpha, - * which defaults to 0.5, as proposed by Yuksel et al. When a line segment ends, - * the first three control points are repeated, producing a closed loop. - */ -export const curveCatmullRomClosed: CurveCatmullRomFactory; - -/** - * A curve factory for cubic Catmull–Rom spline generators. - * - * The curve generators produce a cubic Catmull–Rom spline using the specified control points and the parameter alpha, - * which defaults to 0.5, as proposed by Yuksel et al. Unlike curveCatmullRom, one-sided differences are not used for the first and last piece, - * and thus the curve starts at the second point and ends at the penultimate point. - */ -export const curveCatmullRomOpen: CurveCatmullRomFactory; - -/** - * A curve factory for polyline generators. - * - * The curve generators produce a polyline through the specified points. - */ -export const curveLinear: CurveFactory; - -/** - * A curve factory for closed polyline generators. - * - * The curve generators produce a closed polyline through the specified points by repeating the first point when the line segment ends. - */ -export const curveLinearClosed: CurveFactory; - -/** - * A curve factory for cubic spline generators preserving monotonicity in y. - * - * The curve generators produce a cubic spline that preserves monotonicity in y, assuming monotonicity in x, as proposed by Steffen in A simple method for monotonic interpolation in one dimension: - * “a smooth curve with continuous first-order derivatives that passes through any given set of data points without spurious oscillations. - * Local extrema can occur only at grid points where they are given by the data, but not in between two adjacent grid points.†- */ -export const curveMonotoneX: CurveFactory; - -/** - * A curve factory for cubic spline generators preserving monotonicity in x. - * - * The curve generators produce a cubic spline that preserves monotonicity in x, assuming monotonicity in y, as proposed by Steffen in A simple method for monotonic interpolation in one dimension: - * “a smooth curve with continuous first-order derivatives that passes through any given set of data points without spurious oscillations. - * Local extrema can occur only at grid points where they are given by the data, but not in between two adjacent grid points.†- */ -export const curveMonotoneY: CurveFactory; - -/** - * A curve factory for natural cubic spline generators. - * - * The curve generators produce a natural cubic spline with the second derivative of the spline set to zero at the endpoints. - */ -export const curveNatural: CurveFactory; - -/** - * A curve factory for step function (midpoint) generators. - * - * The curve generators produce a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. - * The y-value changes at the midpoint of each pair of adjacent x-values. - */ -export const curveStep: CurveFactory; - -/** - * A curve factory for step function (after) generators. - * - * The curve generators produce a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. - * The y-value changes after the x-value. - */ -export const curveStepAfter: CurveFactory; - -/** - * A curve factory for step function (before) generators. - * - * The curve generators produce a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. - * The y-value changes before the x-value. - */ -export const curveStepBefore: CurveFactory; - -// ----------------------------------------------------------------------------------- -// LINKS -// ----------------------------------------------------------------------------------- - -/** - * An interface describing the default Link Data structure expected - * by the Link and LinkRadial generators. - */ -export interface DefaultLinkObject { - /** - * Source node of the link. - * - * For a link in a Cartesian coordinate system, the two element array contains - * the coordinates [x, y]. - * - * For a radial link, the two element array contains - * the coordinates [angle, radius]. The angle is stated in radians, with 0 at -y (12 o’clock). - * The radius measures the distance from the origin ⟨0,0⟩. - */ - source: [number, number]; - /** - * Target node of the link. - * - * For a link in a Cartesian coordinate system, the two element array contains - * the coordinates [x, y]. - * - * For a radial link, the two element array contains - * the coordinates [angle, radius]. The angle is stated in radians, with 0 at -y (12 o’clock). - * The radius measures the distance from the origin ⟨0,0⟩. - */ - target: [number, number]; -} - -/** - * A link generator for a Cartesian coordinate system. The link shape generates a smooth cubic Bézier curve from a - * source point to a target point. The tangents of the curve at the start and end are either vertical, horizontal. - * - * The first generic corresponds to the type of the "this" context within which the link generator and its accessor functions will be invoked. - * - * The second generic corresponds to the datum type of the link object for which the link is to be generated. - * - * The third generic corresponds to the datum type of the source/target node contained in the link object. - */ -export interface Link<This, LinkDatum, NodeDatum> { - /** - * Generates a link for the given arguments. - * - * IMPORTANT: If the rendering context of the link generator is null, - * then the link is returned as a path data string. - * - * The "this" context within which this function is invoked, will be the context within which the accessor methods of the generator are invoked. - * All arguments passed into this function, will be passed to the accessor functions of the generator. - * - * @param d The datum for which the link is to be generated. - */ - (this: This, d: LinkDatum, ...args: any[]): string | null; - /** - * Generates an link for the given arguments. - * - * IMPORTANT: If the link generator has been configured with a rendering context, - * then the link is rendered to this context as a sequence of path method calls and this function returns void. - * - * The "this" context within which this function is invoked, will be the context within which the accessor methods of the generator are invoked. - * All arguments passed into this function, will be passed to the accessor functions of the generator. - * - * @param d The datum for which the link is to be generated. - */ - (this: This, d: LinkDatum, ...args: any[]): void; - - /** - * Returns the current source node accessor function. - * The default source accessor function returns a two element array [x, y]. - */ - source(): (this: This, d: LinkDatum, ...args: any[]) => NodeDatum; - /** - * Sets the source accessor to the specified function and returns this link generator. - * - * @param source Source node accessor function. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that were passed into the link generator. The default target accessor function returns a two element array [x, y]. - */ - source(source: (this: This, d: LinkDatum, ...args: any[]) => NodeDatum): this; - - /** - * Returns the current target node accessor function. - * The default target accessor function returns a two element array [x, y]. - */ - target(): (this: This, d: LinkDatum, ...args: any[]) => NodeDatum; - /** - * Sets the target accessor to the specified function and returns this link generator. - * - * @param target Target node accessor function. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that were passed into the link generator. The default target accessor function returns a two element array [x, y]. - */ - target(target: (this: This, d: LinkDatum, ...args: any[]) => NodeDatum): this; - - /** - * Returns the current x-accessor, which defaults to a function accepting an number array - * as its argument an returning the first element of the array. - */ - x(): (this: This, node: NodeDatum, ...args: any[]) => number; - /** - * Sets the x-accessor to the specified function and returns this link generator. - * - * @param x x-coordinate accessor function. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives as its first argument a node object followed by all additional arguments that were passed into the link generator. - */ - x(x: (this: This, node: NodeDatum, ...args: any[]) => number): this; - - /** - * Returns the current y-accessor, which defaults to a function accepting an number array - * as its argument an returning the second element of the array. - */ - y(): (this: This, node: NodeDatum, ...args: any[]) => number; - /** - * Sets the y-accessor to the specified function and returns this link generator. - * - * @param y y-coordinate accessor function. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives as its first argument a node object followed by all additional arguments that were passed into the link generator. - */ - y(y: (this: This, node: NodeDatum, ...args: any[]) => number): this; - - /** - * Returns the current rendering context, which defaults to null. - */ - context(): CanvasRenderingContext2D | null; - /** - * Sets the rendering context and returns this link generator. - * - * If the context is not null, then the generated link is rendered to this context as a sequence of path method calls. - * - * @param context The rendering context. - */ - context(context: CanvasRenderingContext2D): this; - /** - * Sets the rendering context to null and returns this link generator. - * - * A path data string representing the generated link will be returned when the generator is invoked with data. - * - * @param context null, to remove rendering context. - */ - context(context: null): this; -} - -/** - * Constructs a new default link generator with horizontal tangents, for example, to visualize links in a tree diagram - * rooted on the left edge of the display. - * - * With the default settings the link generator accepts a link object conforming to the DefaultLinkObject interface. - */ -export function linkHorizontal(): Link<any, DefaultLinkObject, [number, number]>; -/** - * Constructs a new link generator with horizontal tangents, for example, to visualize links in a tree diagram - * rooted on the left edge of the display. - * - * Important: Ensure that the accessor functions are configured to work with the link and node datum types - * specified in the generics. - * - * The first generic corresponds to the datum type of the link object for which the link is to be generated. - * - * The second generic corresponds to the datum type of the source/target node contained in the link object. - */ -export function linkHorizontal<LinkDatum, NodeDatum>(): Link<any, LinkDatum, NodeDatum>; -/** - * Constructs a new link generator with horizontal tangents, for example, to visualize links in a tree diagram - * rooted on the left edge of the display. - * - * Important: Ensure that the accessor functions are configured to work with the link and node datum types - * specified in the generics. - * - * The first generic corresponds to the type of the "this" context within which the link generator and its accessor functions will be invoked. - * - * The second generic corresponds to the datum type of the link object for which the link is to be generated. - * - * The third generic corresponds to the datum type of the source/target node contained in the link object. - */ -export function linkHorizontal<This, LinkDatum, NodeDatum>(): Link<This, LinkDatum, NodeDatum>; - -/** - * Constructs a new default link generator with vertical tangents, for example, to visualize links in a tree diagram - * rooted on the top edge of the display. - * - * With the default settings the link generator accepts a link object conforming to the DefaultLinkObject interface. - */ -export function linkVertical(): Link<any, DefaultLinkObject, [number, number]>; -/** - * Constructs a new link generator with vertical tangents, for example, to visualize links in a tree diagram - * rooted on the top edge of the display. - * - * Important: Ensure that the accessor functions are configured to work with the link and node datum types - * specified in the generics. - * - * The first generic corresponds to the datum type of the link object for which the link is to be generated. - * - * The second generic corresponds to the datum type of the source/target node contained in the link object. - */ -export function linkVertical<LinkDatum, NodeDatum>(): Link<any, LinkDatum, NodeDatum>; -/** - * Constructs a new link generator with vertical tangents, for example, to visualize links in a tree diagram - * rooted on the top edge of the display. - * - * Important: Ensure that the accessor functions are configured to work with the link and node datum types - * specified in the generics. - * - * The first generic corresponds to the type of the "this" context within which the link generator and its accessor functions will be invoked. - * - * The second generic corresponds to the datum type of the link object for which the link is to be generated. - * - * The third generic corresponds to the datum type of the source/target node contained in the link object. - */ -export function linkVertical<This, LinkDatum, NodeDatum>(): Link<This, LinkDatum, NodeDatum>; - -/** - * A link generator for a radial coordinate system. The link shape generates a smooth cubic Bézier curve from a - * source point to a target point. The tangents of the curve at the start and end are radial. - * - * The first generic corresponds to the type of the "this" context within which the radial link generator and its accessor functions will be invoked. - * - * The second generic corresponds to the datum type of the link object for which the link is to be generated. - * - * The third generic corresponds to the datum type of the source/target node contained in the link object. - */ -export interface LinkRadial<This, LinkDatum, NodeDatum> { - /** - * Generates a radial link for the given arguments. - * - * IMPORTANT: If the rendering context of the radial link generator is null, - * then the link is returned as a path data string. - * - * The "this" context within which this function is invoked, will be the context within which the accessor methods of the generator are invoked. - * All arguments passed into this function, will be passed to the accessor functions of the generator. - * - * @param d The datum for which the link is to be generated. - */ - (this: This, d: LinkDatum, ...args: any[]): string | null; - /** - * Generates an link for the given arguments. - * - * IMPORTANT: If the radial link generator has been configured with a rendering context, - * then the link is rendered to this context as a sequence of path method calls and this function returns void. - * - * The "this" context within which this function is invoked, will be the context within which the accessor methods of the generator are invoked. - * All arguments passed into this function, will be passed to the accessor functions of the generator. - * - * @param d The datum for which the link is to be generated. - */ - (this: This, d: LinkDatum, ...args: any[]): void; - - /** - * Returns the current source node accessor function. - * The default source accessor function returns a two element array [x, y]. - */ - source(): (this: This, d: LinkDatum, ...args: any[]) => NodeDatum; - /** - * Sets the source accessor to the specified function and returns this radial link generator. - * - * @param source Source node accessor function. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that were passed into the radial link generator. The default target accessor function returns a two element array [x, y]. - */ - source(source: (this: This, d: LinkDatum, ...args: any[]) => NodeDatum): this; - - /** - * Returns the current target node accessor function. - * The default target accessor function returns a two element array [x, y]. - */ - target(): (this: This, d: LinkDatum, ...args: any[]) => NodeDatum; - /** - * Sets the target accessor to the specified function and returns this radial link generator. - * - * @param target Target node accessor function. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that were passed into the radial link generator. The default target accessor function returns a two element array [x, y]. - */ - target(target: (this: This, d: LinkDatum, ...args: any[]) => NodeDatum): this; - - /** - * Returns the current angle accessor, which defaults to a function accepting an number array - * as its argument an returning the first element of the array. - */ - angle(): (this: This, node: NodeDatum, ...args: any[]) => number; - /** - * Sets the angle accessor to the specified function and returns this radial link generator. - * The angle is stated in radians, with 0 at -y (12 o’clock). - * - * @param angle Angle accessor function. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives as its first argument a node object followed by all additional arguments that were passed into the radial link generator. - */ - angle(angle: (this: This, node: NodeDatum, ...args: any[]) => number): this; - - /** - * Returns the current radius accessor, which defaults to a function accepting an number array - * as its argument an returning the second element of the array. - */ - radius(): (this: This, node: NodeDatum, ...args: any[]) => number; - /** - * Sets the radius accessor to the specified function and returns this radial link generator. - * The radius is measured as the distance from the origin ⟨0,0⟩. - * - * @param radius Radius accessor function. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives as its first argument a node object followed by all additional arguments that were passed into the radial link generator. - */ - radius(radius: (this: This, node: NodeDatum, ...args: any[]) => number): this; - - /** - * Returns the current rendering context, which defaults to null. - */ - context(): CanvasRenderingContext2D | null; - /** - * Sets the rendering context and returns this radial link generator. - * - * If the context is not null, then the generated radial area is rendered to this context as a sequence of path method calls. - * - * @param context The rendering context. - */ - context(context: CanvasRenderingContext2D): this; - /** - * Sets the rendering context to null and returns this radial link generator. - * - * A path data string representing the generated radial link will be returned when the generator is invoked with data. - * - * @param context null, to remove rendering context. - */ - context(context: null): this; -} - -/** - * @deprecated Use LinkRadial interface - */ -export type RadialLink<This, LinkDatum, NodeDatum> = LinkRadial<This, LinkDatum, NodeDatum>; - -/** - * Constructs a new default link generator with radial tangents, for example, to visualize links in a tree diagram - * rooted in the center of the display. - * - * With the default settings the link generator accepts a link object conforming to the DefaultLinkObject interface. - */ -export function linkRadial(): LinkRadial<any, DefaultLinkObject, [number, number]>; -/** - * Constructs a new link generator with radial tangents, for example, to visualize links in a tree diagram - * rooted in the center of the display. - * - * Important: Ensure that the accessor functions are configured to work with the link and node datum types - * specified in the generics. - * - * The first generic corresponds to the datum type of the link object for which the link is to be generated. - * - * The second generic corresponds to the datum type of the source/target node contained in the link object. - */ -export function linkRadial<LinkDatum, NodeDatum>(): LinkRadial<any, LinkDatum, NodeDatum>; -/** - * Constructs a new link generator with radial tangents, for example, to visualize links in a tree diagram - * rooted in the center of the display. - * - * Important: Ensure that the accessor functions are configured to work with the link and node datum types - * specified in the generics. - * - * The first generic corresponds to the type of the "this" context within which the link generator and its accessor functions will be invoked. - * - * The second generic corresponds to the datum type of the link object for which the link is to be generated. - * - * The third generic corresponds to the datum type of the source/target node contained in the link object. - */ -export function linkRadial<This, LinkDatum, NodeDatum>(): LinkRadial<This, LinkDatum, NodeDatum>; - -// ----------------------------------------------------------------------------------- -// SYMBOLS -// ----------------------------------------------------------------------------------- - -/** - * A Symbol Type. - * - * Symbol types are typically not used directly, instead being passed to symbol.type. - * However, you can define your own symbol type implementation should none of the built-in types satisfy your needs using the following interface. - * You can also use this low-level interface with a built-in symbol type as an alternative to the symbol generator. - */ -export interface SymbolType { - /** - * Renders this symbol type to the specified context with the specified size in square pixels. The context implements the CanvasPath interface. - * (Note that this is a subset of the CanvasRenderingContext2D interface!) - * - * @param context A rendering context implementing CanvasPath. - * @param size Size of the symbol to draw. - */ - draw(context: CanvasPath_D3Shape, size: number): void; -} - -/** - * A symbol generator. - * - * Symbols provide a categorical shape encoding as is commonly used in scatterplots. Symbols are always centered at ⟨0,0⟩; - * use a transform (see: SVG, Canvas) to move the arc to a different position. - * - * The first generic corresponds to the "this" context within which the symbol generator is invoked. - * The second generic corresponds to the data type of the datum underlying the symbol. - */ -export interface Symbol<This, Datum> { - /** - * Generates a symbol for the given arguments. - * - * IMPORTANT: If the rendering context of the symbol generator is null, - * then the symbol is returned as a path data string. - * - * The "this" context within which this function is invoked, will be the context within which the accessor methods of the generator are invoked. - * All arguments passed into this function, will be passed to the accessor functions of the generator. - * - * For example, with the default settings, no arguments are needed to produce a circle with area 64 square pixels. - * - * @param d The datum for which the symbol is to be generated. - */ - (this: This, d?: Datum, ...args: any[]): string | null; - /** - * Generates an symbol for the given arguments. - * - * IMPORTANT: If the symbol generator has been configured with a rendering context, - * then the symbol is rendered to this context as a sequence of path method calls and this function returns void. - * - * The "this" context within which this function is invoked, will be the context within which the accessor methods of the generator are invoked. - * All arguments passed into this function, will be passed to the accessor functions of the generator. - * - * For example, with the default settings, no arguments are needed to produce a circle with area 64 square pixels. - * - * @param d The datum for which the symbol is to be generated. - */ - (this: This, d?: Datum, ...args: any[]): void; - /** - * Returns the current size accessor, which defaults to a function returning a constant value of 64. - */ - size(): (this: This, d: Datum, ...args: any[]) => number; - /** - * Sets the size to the specified number and returns this symbol generator. - * - * @param size A fixed size (area in square pixels). - */ - size(size: number): this; - /** - * Sets the size to the specified function and returns this symbol generator. - * - * Specifying the size as a function is useful for constructing a scatterplot with a size encoding. - * If you wish to scale the symbol to fit a given bounding box, rather than by area, try SVG’s getBBox. - * - * @param size An accessor function returning a number to be used as a symbol size. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that were passed into the symbol generator. - */ - size(size: (this: This, d: Datum, ...args: any[]) => number): this; - - /** - * Returns the current symbol type accessor, which defaults to a function returning the circle symbol type. - */ - type(): (this: This, d: Datum, ...args: any[]) => SymbolType; - /** - * Sets the symbol type to the specified symbol type and returns this symbol generator. - * - * @param type A constant symbol type. - */ - type(type: SymbolType): this; - /** - * Sets the symbol type to the specified function and returns this symbol generator. - * - * @param type An accessor function returning a symbol type. The accessor function is invoked in the same "this" context as the generator was invoked in and - * receives the same arguments that were passed into the symbol generator. See symbols for the set of built-in symbol types. - * To implement a custom symbol type, return an object that implements symbolType.draw. - */ - type(type: (this: This, d: Datum, ...args: any[]) => SymbolType): this; - - /** - * Returns the current rendering context, which defaults to null. - */ - context(): CanvasRenderingContext2D | null; - /** - * Sets the rendering context and returns this symbol generator. - * - * If the context is not null, then the generated symbol is rendered to this context as a sequence of path method calls. - * - * @param context The rendering context. - */ - context(context: CanvasRenderingContext2D): this; - /** - * Sets the rendering context to null and returns this symbol generator. - * - * A path data string representing the generated symbol will be returned when the generator is invoked with data. - * - * @param context null, to remove rendering context. - */ - context(context: null): this; -} - -/** - * Constructs a new symbol generator with the default settings. - */ -export function symbol(): Symbol<any, any>; // tslint:disable-line ban-types - -/** - * Constructs a new symbol generator with the default settings. - * - * The generic corresponds to the data type of the datum underlying the symbol. - */ -export function symbol<Datum>(): Symbol<any, Datum>; // tslint:disable-line ban-types - -/** - * Constructs a new symbol generator with the default settings. - * - * The first generic corresponds to the "this" context within which the symbol generator is invoked. - * The second generic corresponds to the data type of the datum underlying the symbol. - */ -export function symbol<This, Datum>(): Symbol<This, Datum>; // tslint:disable-line ban-types - -/** - * An array containing the set of all built-in symbol types: circle, cross, diamond, square, star, triangle, and wye. - * Useful for constructing the range of an ordinal scale should you wish to use a shape encoding for categorical data. - */ -export const symbols: SymbolType[]; - -/** - * The circle symbol type. - */ -export const symbolCircle: SymbolType; - -/** - * The Greek cross symbol type, with arms of equal length. - */ -export const symbolCross: SymbolType; - -/** - * The rhombus symbol type. - */ -export const symbolDiamond: SymbolType; - -/** - * The square symbol type. - */ -export const symbolSquare: SymbolType; - -/** - * The pentagonal star (pentagram) symbol type. - */ -export const symbolStar: SymbolType; - -/** - * The up-pointing triangle symbol type. - */ -export const symbolTriangle: SymbolType; - -/** - * The Y-shape symbol type. - */ -export const symbolWye: SymbolType; - -// ----------------------------------------------------------------------------------- -// pointRadial -// ----------------------------------------------------------------------------------- - -/** - * Returns the point [x, y] for the given angle and the given radius. - * @param angle Angle in radians, with 0 at -y (12 o’clock) and positive angles proceeding clockwise. - * @param radius Radius. - */ -export function pointRadial(angle: number, radius: number): [number, number]; - -// ----------------------------------------------------------------------------------- -// STACKS -// ----------------------------------------------------------------------------------- - -/** - * Each series point j in a stack chart corresponds to the jth element in the input data. - * Each point is represented as an array [y0, y1] where y0 is the lower value (baseline) and y1 is the upper value (topline); - * the difference between y0 and y1 corresponds to the computed value for this point. - * - * SeriesPoint is a [number, number] two-element Array with added data and index properties - * related to the data element which formed the basis for theSeriesPoint. - */ -export interface SeriesPoint<Datum> extends Array<number> { - /** - * Corresponds to y0, the lower value (baseline). - */ - 0: number; - /** - * Corresponds to y1, the upper value (topline). - */ - 1: number; - /** - * The data element underlying the series point. - */ - data: Datum; -} - -/** - * The series are determined by the keys accessor; each series i in the returned array corresponds to the ith key. - * Each series is an array of points, where each point j corresponds to the jth element in the input data. - * - * The key for each series is available as series.key, and the index as series.index. - */ -export interface Series<Datum, Key> extends Array<SeriesPoint<Datum>> { - /** - * Key of the series. - */ - key: Key; - /** - * Index of the series in the series array returned by stack generator. - */ - index: number; -} - -/** - * A stack generator. - * - * Some shape types can be stacked, placing one shape adjacent to another. - * For example, a bar chart of monthly sales might be broken down into a multi-series bar chart by product category, stacking bars vertically. - * This is equivalent to subdividing a bar chart by an ordinal dimension (such as product category) and applying a color encoding. - * - * Stacked charts can show overall value and per-category value simultaneously; however, it is typically harder to compare across categories, as only the bottom layer of the stack is aligned. - * So, chose the stack order carefully, and consider a streamgraph. (See also grouped charts.) - * - * Like the pie generator, the stack generator does not produce a shape directly. Instead it computes positions which you can then pass to an area generator or use directly, say to position bars. - * - * The first generic corresponds to the "this" context in which the stack generator and its accessor functions are invoked. - * - * The second generic corresponds to the data type of an element in the data array passed into the stack generator. - * - * The third generic corresponds to the data type of key used to identify a series. - */ -export interface Stack<This, Datum, Key> { - /** - * Generates a stack for the given array of data, returning an array representing each series. - * The resulting array has one element per series. Each series in then typically passed to an area generator to render an area chart, - * or used to construct rectangles for a bar chart. - * - * Any additional arguments are arbitrary; they are simply propagated to the generator’s accessor functions along with the this object. - * - * @param data Array of data elements. - */ - (data: Datum[], ...args: any[]): Array<Series<Datum, Key>>; - - /** - * Returns the current keys accessor, which defaults to the empty array. - */ - keys(): (this: This, data: Datum[], ...args: any[]) => Key[]; - /** - * Sets the keys accessor to the specified function or array and returns this stack generator. - * - * A series (layer) is generated for each key. Keys are typically strings, but they may be arbitrary values. - * The series’ key is passed to the value accessor, along with each data point, to compute the point’s value. - * - * @param keys An array of keys. - */ - keys(keys: Key[]): this; - /** - * Sets the keys accessor to the specified function or array and returns this stack generator. - * - * A series (layer) is generated for each key. Keys are typically strings, but they may be arbitrary values. - * The series’ key is passed to the value accessor, along with each data point, to compute the point’s value. - * - * @param keys An accessor function returning the array of keys. - * The accessor function is invoked with the "this" context of the Stack generator and passed the same arguments passed into the generator. - */ - keys(keys: (this: This, data: Datum[], ...args: any[]) => Key[]): this; - - /** - * Returns the current value accessor, which defaults to a function return the property corresponding to the relevant key from the data element. - * - * Thus, by default the stack generator assumes that the input data is an array of objects, with each object exposing named properties with numeric values; see stack for an example. - */ - value(): (d: Datum, key: Key, i: number, data: Datum[]) => number; - /** - * Sets the value accessor to the specified number and returns this stack generator. - * - * @param value A constant value. - */ - value(value: number): this; - /** - * Sets the value accessor to the specified function and returns this stack generator. - * - * @param value A value accessor function which returns the numeric value for a given data element and key combination. The accessor function is invoked for each data element and key being passed - * the datum, the key, index of the data element in the input data array, and the complete data array. - */ - value(value: (d: Datum, key: Key, i: number, data: Datum[]) => number): this; - - /** - * Returns the current order accessor, which defaults to stackOrderNone; this uses the order given by the key accessor. - */ - order(): (series: Series<Datum, Key>) => number[]; - /** - * Reset the order to use stackOrderNone; this uses the order given by the key accessor. - * - * @param order null to set to the default stackOrderNone. - */ - order(order: null): this; - /** - * Sets the order accessor to the specified array and returns this stack generator. - * - * The stack order is computed prior to the offset; thus, the lower value for all points is zero at the time the order is computed. - * The index attribute for each series is also not set until after the order is computed. - * - * @param order An array of numeric indexes representing the stack order. - */ - order(order: number[]): this; - /** - * Sets the order accessor to the specified function and returns this stack generator. - * - * The stack order is computed prior to the offset; thus, the lower value for all points is zero at the time the order is computed. - * The index attribute for each series is also not set until after the order is computed. - * - * See stack orders for the built-in orders. - * - * @param order A function returning a sort order array. It is passed the generated series array and must return an array of numeric indexes representing the stack order. - */ - order(order: (series: Series<Datum, Key>) => number[]): this; - - /** - * Returns the current offset accessor, which defaults to stackOffsetNone; this uses a zero baseline. - */ - offset(): (series: Series<Datum, Key>, order: number[]) => void; - /** - * Reset the offset to use stackOffsetNone; this uses a zero baseline. - * - * @param offset null to set to the default stackOffsetNone. - */ - offset(offset: null): this; - /** - * Sets the offset accessor to the specified function and returns this stack generator. - * - * @param offset A function which is passed the generated series array and the order index array. - * The offset function is then responsible for updating the lower and upper values in the series array to layout the stack. - */ - offset(offset: (series: Series<Datum, Key>, order: number[]) => void): this; -} - -/** - * Constructs a new stack generator with the default settings. - * - * Ensure that the accessors used with the stack generator correspond to the arguments passed into them. - */ -export function stack(): Stack<any, { [key: string]: number }, string>; -/** - * Constructs a new stack generator with the default settings. - * - * Ensure that the accessors used with the stack generator correspond to the arguments passed into them. - * - * The generic corresponds to the data type of an element in the data array passed into the stack generator. - */ -export function stack<Datum>(): Stack<any, Datum, string>; -/** - * Constructs a new stack generator with the default settings. - * - * Ensure that the accessors used with the stack generator correspond to the arguments passed into them. - * - * The first generic corresponds to the data type of an element in the data array passed into the stack generator. - * - * The second generic corresponds to the data type of key used to identify a series. - */ -export function stack<Datum, Key>(): Stack<any, Datum, Key>; -/** - * Constructs a new stack generator with the default settings. - * - * Ensure that the accessors used with the stack generator correspond to the arguments passed into them. - * - * The first generic corresponds to the "this" context in which the stack generator and its accessor functions are invoked. - * - * The second generic corresponds to the data type of an element in the data array passed into the stack generator. - * - * The third generic corresponds to the data type of key used to identify a series. - */ -export function stack<This, Datum, Key>(): Stack<This, Datum, Key>; - -/** - * Returns a series order such that the earliest series (according to the maximum value) is at the bottom. - * - * @param series A series generated by a stack generator. - */ -export function stackOrderAppearance(series: Series<any, any>): number[]; - -/** - * Returns a series order such that the smallest series (according to the sum of values) is at the bottom. - * - * @param series A series generated by a stack generator. - */ -export function stackOrderAscending(series: Series<any, any>): number[]; - -/** - * Returns a series order such that the largest series (according to the sum of values) is at the bottom. - * - * @param series A series generated by a stack generator. - */ -export function stackOrderDescending(series: Series<any, any>): number[]; - -/** - * Returns a series order such that the larger series (according to the sum of values) are on the inside and the smaller series are on the outside. - * This order is recommended for streamgraphs in conjunction with the wiggle offset. See Stacked Graphs—Geometry & Aesthetics by Byron & Wattenberg for more information. - * - * @param series A series generated by a stack generator. - */ -export function stackOrderInsideOut(series: Series<any, any>): number[]; - -/** - * Returns the given series order [0, 1, … n - 1] where n is the number of elements in series. Thus, the stack order is given by the key accessor. - * - * @param series A series generated by a stack generator. - */ -export function stackOrderNone(series: Series<any, any>): number[]; - -/** - * Returns the reverse of the given series order [n - 1, n - 2, … 0] where n is the number of elements in series. Thus, the stack order is given by the reverse of the key accessor. - * - * @param series A series generated by a stack generator. - */ -export function stackOrderReverse(series: Series<any, any>): number[]; - -/** - * Applies a zero baseline and normalizes the values for each point such that the topline is always one. - * - * @param series A series generated by a stack generator. - * @param order An array of numeric indexes representing the stack order. - */ -export function stackOffsetExpand(series: Series<any, any>, order: number[]): void; - -/** - * Positive values are stacked above zero, while negative values are stacked below zero. - * - * @param series A series generated by a stack generator. - * @param order An array of numeric indexes representing the stack order. - */ -export function stackOffsetDiverging(series: Series<any, any>, order: number[]): void; - -/** - * Applies a zero baseline. - * - * @param series A series generated by a stack generator. - * @param order An array of numeric indexes representing the stack order. - */ -export function stackOffsetNone(series: Series<any, any>, order: number[]): void; - -/** - * Shifts the baseline down such that the center of the streamgraph is always at zero. - * - * @param series A series generated by a stack generator. - * @param order An array of numeric indexes representing the stack order. - */ -export function stackOffsetSilhouette(series: Series<any, any>, order: number[]): void; - -/** - * Shifts the baseline so as to minimize the weighted wiggle of layers. This offset is recommended for streamgraphs in conjunction with the inside-out order. - * See Stacked Graphs—Geometry & Aesthetics by Bryon & Wattenberg for more information. - * - * @param series A series generated by a stack generator. - * @param order An array of numeric indexes representing the stack order. - */ -export function stackOffsetWiggle(series: Series<any, any>, order: number[]): void; diff --git a/node_modules/@types/d3-shape/package.json b/node_modules/@types/d3-shape/package.json deleted file mode 100644 index c895b63d362fd2389fa5afc8664f92ddcbdf6a48..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-shape/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_from": "@types/d3-shape@^1", - "_id": "@types/d3-shape@1.3.4", - "_inBundle": false, - "_integrity": "sha512-fxmOjs+UqNQGpztD5BOo+KriE0jLFrBP4Ct++0QExv/xfDOT1cpcMxgsZ+5qPmnR0t+GjbwAe1Um1PHpv3G4oA==", - "_location": "/@types/d3-shape", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-shape@^1", - "name": "@types/d3-shape", - "escapedName": "@types%2fd3-shape", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-1.3.4.tgz", - "_shasum": "5a6d8c3026ba8e8a1a985bda8da40acfc9b7b079", - "_spec": "@types/d3-shape@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": { - "@types/d3-path": "^1" - }, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-shape module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-shape", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-shape" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "7d42558cd869dca66ca9e8fc1b081ee9b6c91eca80242c9815ff3ccdf7c574e2", - "version": "1.3.4" -} diff --git a/node_modules/@types/d3-time-format/LICENSE b/node_modules/@types/d3-time-format/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-time-format/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-time-format/README.md b/node_modules/@types/d3-time-format/README.md deleted file mode 100644 index 074d193544ba8cd55b1b534c3c7365a82924eff2..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-time-format/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-time-format` - -# Summary -This package contains type definitions for d3JS d3-time-format module (https://github.com/d3/d3-time-format/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-time-format/v2. - -### Additional Details - * Last updated: Thu, 01 Oct 2020 22:50:47 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-time-format/index.d.ts b/node_modules/@types/d3-time-format/index.d.ts deleted file mode 100644 index 6482be42488504e38661dfdb7ee2fd3e56573e3b..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-time-format/index.d.ts +++ /dev/null @@ -1,210 +0,0 @@ -// Type definitions for d3JS d3-time-format module 2.3 -// Project: https://github.com/d3/d3-time-format/, https://d3js.org/d3-time-format -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// Last module patch version validated against: 2.3.0 - -/** - * Specification of time locale to use when creating a new TimeLocaleObject - */ -export interface TimeLocaleDefinition { - /** - * The date and time (%c) format specifier (e.g., "%a %b %e %X %Y"). - */ - dateTime: string; - /** - * The date (%x) format specifier (e.g., "%m/%d/%Y"). - */ - date: string; - /** - * The time (%X) format specifier (e.g., "%H:%M:%S"). - */ - time: string; - /** - * The A.M. and P.M. equivalents (e.g., ["AM", "PM"]). - */ - periods: [string, string]; - /** - * The full names of the weekdays, starting with Sunday. - */ - days: [string, string, string, string, string, string, string]; - /** - * The abbreviated names of the weekdays, starting with Sunday. - */ - shortDays: [string, string, string, string, string, string, string]; - /** - * The full names of the months (starting with January). - */ - months: [string, string, string, string, string, string, string, string, string, string, string, string]; - /** - * the abbreviated names of the months (starting with January). - */ - shortMonths: [string, string, string, string, string, string, string, string, string, string, string, string]; -} - -/** - * Interface describing a time-locale-based object which exposes time-formatting/parsing - * methods for a specified locale definition. - */ -export interface TimeLocaleObject { - /** - * Returns a new formatter for the given string specifier. The specifier string may contain the following directives: - * - %a - abbreviated weekday name.* - * - %A - full weekday name.* - * - %b - abbreviated month name.* - * - %B - full month name.* - * - %c - the locale’s date and time, such as %x, %X.* - * - %d - zero-padded day of the month as a decimal number [01,31]. - * - %e - space-padded day of the month as a decimal number [ 1,31]; equivalent to %_d. - * - %f - microseconds as a decimal number [000000, 999999]. - * - %g - ISO 8601 week-based year without century as a decimal number [00,99]. - * - %G - ISO 8601 week-based year with century as a decimal number. - * - %H - hour (24-hour clock) as a decimal number [00,23]. - * - %I - hour (12-hour clock) as a decimal number [01,12]. - * - %j - day of the year as a decimal number [001,366]. - * - %m - month as a decimal number [01,12]. - * - %M - minute as a decimal number [00,59]. - * - %L - milliseconds as a decimal number [000, 999]. - * - %p - either AM or PM.* - * - %q - quarter of the year as a decimal number [1,4]. - * - %Q - milliseconds since UNIX epoch. - * - %s - seconds since UNIX epoch. - * - %S - second as a decimal number [00,61]. - * - %u - Monday-based (ISO) weekday as a decimal number [1,7]. - * - %U - Sunday-based week of the year as a decimal number [00,53]. - * - %V - ISO 8601 week number of the year as a decimal number [01, 53]. - * - %w - Sunday-based weekday as a decimal number [0,6]. - * - %W - Monday-based week of the year as a decimal number [00,53]. - * - %x - the locale’s date, such as %-m/%-d/%Y.* - * - %X - the locale’s time, such as %-I:%M:%S %p.* - * - %y - year without century as a decimal number [00,99]. - * - %Y - year with century as a decimal number. - * - %Z - time zone offset, such as -0700, -07:00, -07, or Z. - * - %% - a literal percent sign (%). - * - * Directives marked with an asterisk (*) may be affected by the locale definition. - * - * For %U, all days in a new year preceding the first Sunday are considered to be in week 0. - * For %W, all days in a new year preceding the first Monday are considered to be in week 0. - * Week numbers are computed using interval.count. For example, 2015-52 and 2016-00 represent Monday, December 28, 2015, while 2015-53 and 2016-01 represent Monday, January 4, 2016. - * This differs from the ISO week date specification (%V), which uses a more complicated definition! - * - * For %V,%g and %G, per the strftime man page: - * - * In this system, weeks start on a Monday, and are numbered from 01, for the first week, up to 52 or 53, for the last week. - * Week 1 is the first week where four or more days fall within the new year (or, synonymously, week 01 is: the first week of the year that contains a Thursday; - * or, the week that has 4 January in it). If the ISO week number belongs to the previous or next year, that year is used instead. - * - * The % sign indicating a directive may be immediately followed by a padding modifier: - * - * 1) 0 - zero-padding - * 2) _ - space-padding - * 3) - disable padding - * - * If no padding modifier is specified, the default is 0 for all directives except %e, which defaults to _. - * (In some implementations of strftime and strptime, a directive may include an optional field width or precision; this feature is not yet implemented.) - * - * The returned function formats a specified date, returning the corresponding string. - * - * @param specifier A specifier string for the date format. - */ - format(specifier: string): (date: Date) => string; - /** - * Returns a new parser for the given string specifier. The specifier string may contain the same directives as locale.format (TimeLocaleObject.format). - * The %d and %e directives are considered equivalent for parsing. - * - * The returned function parses a specified string, returning the corresponding date or null if the string could not be parsed according to this format’s specifier. - * Parsing is strict: if the specified string does not exactly match the associated specifier, this method returns null. - * - * For example, if the associated specifier is %Y-%m-%dT%H:%M:%SZ, then the string "2011-07-01T19:15:28Z" will be parsed as expected, - * but "2011-07-01T19:15:28", "2011-07-01 19:15:28" and "2011-07-01" will return null. (Note that the literal Z here is different from the time zone offset directive %Z.) - * If a more flexible parser is desired, try multiple formats sequentially until one returns non-null. - * - * @param specifier A specifier string for the date format. - */ - parse(specifier: string): (dateString: string) => (Date | null); - /** - * Equivalent to locale.format (TimeLocaleObject.format), except all directives are interpreted as Coordinated Universal Time (UTC) rather than local time. - * - * @param specifier A specifier string for the date format. - */ - utcFormat(specifier: string): (date: Date) => string; - /** - * Equivalent to locale.parse (TimeLocaleObject.parse), except all directives are interpreted as Coordinated Universal Time (UTC) rather than local time. - * - * @param specifier A specifier string for the date format. - */ - utcParse(specifier: string): (dateString: string) => (Date | null); -} - -/** - * Create a new time-locale-based object which exposes time-formatting - * methods for the specified locale definition. - * - * @param definition A time locale definition. - */ -export function timeFormatLocale(definition: TimeLocaleDefinition): TimeLocaleObject; - -/** - * Create a new time-locale-based object which exposes time-formatting - * methods for the specified locale definition. The new time locale definition - * will be set as the new default time locale. - * - * @param definition A time locale definition. - */ -export function timeFormatDefaultLocale(definition: TimeLocaleDefinition): TimeLocaleObject; - -/** - * Returns a new formatter for the given string specifier. The returned function formats a specified date, returning the corresponding string. - * - * An alias for locale.format (TimeLocaleObject.format) on the default locale. - * - * @param specifier A specifier string for the date format. - */ -export function timeFormat(specifier: string): (date: Date) => string; - -/** - * Returns a new parser for the given string specifier. - * - * An alias for locale.parse (TimeLocaleObject.parse) on the default locale. - * - * @param specifier A specifier string for the date format. - */ -export function timeParse(specifier: string): (dateString: string) => (Date | null); - -/** - * Equivalent to timeFormat, except all directives are interpreted as Coordinated Universal Time (UTC) rather than local time. - * - * An alias for locale.utcFormat (TimeLocaleObject.utcFormat) on the default locale. - * - * @param specifier A specifier string for the date format. - */ -export function utcFormat(specifier: string): (date: Date) => string; - -/** - * Equivalent to timeParse, except all directives are interpreted as Coordinated Universal Time (UTC) rather than local time. - * - * An alias for locale.utcParse (TimeLocaleObject.utcParse) on the default locale. - * - * @param specifier A specifier string for the date format. - */ -export function utcParse(specifier: string): (dateString: string) => (Date | null); - -/** - * The full ISO 8601 UTC time formatter. Where available, this method will use Date.toISOString to format. - * - * @param date A date to format. - */ -export function isoFormat(date: Date): string; - -/** - * The full ISO 8601 UTC time parser. Where available, this method will use the Date constructor to parse strings. - * If you depend on strict validation of the input format according to ISO 8601, you should construct a UTC parser function using utcParse. - * - * @param dateString A string encoded date to parse. - */ -export function isoParse(dateString: string): Date | null; diff --git a/node_modules/@types/d3-time-format/package.json b/node_modules/@types/d3-time-format/package.json deleted file mode 100644 index 7ef1ca4ca699e010115590ff6bdccd062e8dd6d4..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-time-format/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "_from": "@types/d3-time-format@^2", - "_id": "@types/d3-time-format@2.3.1", - "_inBundle": false, - "_integrity": "sha512-fck0Z9RGfIQn3GJIEKVrp15h9m6Vlg0d5XXeiE/6+CQiBmMDZxfR21XtjEPuDeg7gC3bBM0SdieA5XF3GW1wKA==", - "_location": "/@types/d3-time-format", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-time-format@^2", - "name": "@types/d3-time-format", - "escapedName": "@types%2fd3-time-format", - "scope": "@types", - "rawSpec": "^2", - "saveSpec": null, - "fetchSpec": "^2" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-2.3.1.tgz", - "_shasum": "87a30e4513b9d1d53b920327a361f87255bf3372", - "_spec": "@types/d3-time-format@^2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for d3JS d3-time-format module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-time-format", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-time-format" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "eddc6081605aeb94fd26ab84955835a79879c1007327eab9db9fda9b5976bce4", - "version": "2.3.1" -} diff --git a/node_modules/@types/d3-time/LICENSE b/node_modules/@types/d3-time/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-time/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-time/README.md b/node_modules/@types/d3-time/README.md deleted file mode 100644 index d3db2e8ef2665435be8ce57a1474879d2ae11ef0..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-time/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-time` - -# Summary -This package contains type definitions for D3JS d3-time module (https://github.com/d3/d3-time/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-time/v1. - -### Additional Details - * Last updated: Wed, 30 Sep 2020 20:01:31 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-time/index.d.ts b/node_modules/@types/d3-time/index.d.ts deleted file mode 100644 index 71f2f67890b7eeb5cffd1d804dc1bc6e31c212d5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-time/index.d.ts +++ /dev/null @@ -1,671 +0,0 @@ -// Type definitions for D3JS d3-time module 1.1 -// Project: https://github.com/d3/d3-time/, https://d3js.org/d3-time -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// Last module patch version validated against: 1.1.0 - -// --------------------------------------------------------------- -// Interfaces -// --------------------------------------------------------------- - -/** - * A D3 Time Interval - */ -export interface TimeInterval { - /** - * Returns a new date representing the latest interval boundary date before or equal to date. - * Equivalent to interval.floor, except it date is not specified, it defaults to the current time. - * For example, d3.timeYear(date) and d3.timeYear.floor(date) are equivalent. - * - * For example, timeDay(date) typically returns 12:00 AM local time on the given date. - * - * This function is idempotent: if the specified date is already floored to the current interval, - * a new date with an identical time is returned. - * Furthermore, the returned date is the minimum expressible value of the associated interval, - * such that interval.floor(interval.floor(date) - 1) returns the preceding interval boundary date. - * - * Note that the == and === operators do not compare by value with Date objects, - * and thus you cannot use them to tell whether the specified date has already been floored. - * Instead, coerce to a number and then compare. - * - * This is more reliable than testing whether the time is 12:00 AM, as in some time zones midnight may not exist due to daylight saving. - * - * @param date A date object. - */ - (date?: Date): Date; - - /** - * Returns a new date representing the latest interval boundary date before or equal to date. - * - * For example, timeDay.floor(date) typically returns 12:00 AM local time on the given date. - * - * This method is idempotent: if the specified date is already floored to the current interval, - * a new date with an identical time is returned. - * Furthermore, the returned date is the minimum expressible value of the associated interval, - * such that interval.floor(interval.floor(date) - 1) returns the preceding interval boundary date. - * - * Note that the == and === operators do not compare by value with Date objects, - * and thus you cannot use them to tell whether the specified date has already been floored. - * Instead, coerce to a number and then compare. - * - * This is more reliable than testing whether the time is 12:00 AM, as in some time zones midnight may not exist due to daylight saving. - * - * @param date A date object. - */ - floor(date: Date): Date; - - /** - * Returns a new date representing the closest interval boundary date to date. - * - * For example, timeDay.round(date) typically returns 12:00 AM local time on the given date if it is on or before noon, - * and 12:00 AM of the following day if it is after noon. - * - * This method is idempotent: if the specified date is already rounded to the current interval, a new date with an identical time is returned. - * - * @param date A date object. - */ - round(date: Date): Date; - - /** - * Returns a new date representing the earliest interval boundary date after or equal to date. - * - * For example, timeDay.ceil(date) typically returns 12:00 AM local time on the date following the given date. - * - * This method is idempotent: if the specified date is already ceilinged to the current interval, - * a new date with an identical time is returned. Furthermore, - * the returned date is the maximum expressible value of the associated interval, - * such that interval.ceil(interval.ceil(date) + 1) returns the following interval boundary date. - * - * @param date A date object. - */ - ceil(date: Date): Date; - - /** - * Returns a new date equal to date plus step intervals. - * - * If step is not specified it defaults to 1. - * - * This method does not round the specified date to the interval. For example, if date is today at 5:34 PM, - * then timeDay.offset(date, 1) returns 5:34 PM tomorrow (even if daylight saving changes!). - * - * @param date A date object. - * @param step An optional number of steps to apply when calculating the offset date. - * If step is negative, then the returned date will be before the specified date; - * if step is zero, then a copy of the specified date is returned; if step is not an integer, it is floored. - */ - offset(date: Date, step?: number): Date; - - /** - * Returns an array of dates representing every interval boundary after or equal to start (inclusive) and before stop (exclusive). - * - * If step is specified, then every step-th boundary will be returned; for example, - * for the timeDay interval a step of 2 will return every other day. - * If step is not an integer, it is floored. - * - * The first date in the returned array is the earliest boundary after or equal to start; - * subsequent dates are offset by step intervals and floored. - * Thus, two overlapping ranges may be inconsistent. - * - * To make ranges consistent when a step is specified, use CountableInterval.every instead. - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ - range(start: Date, stop: Date, step?: number): Date[]; - - /** - * Returns a new interval that is a filtered subset of this interval using the specified test function. - * - * @param test A test function which is passed a date and should return true if and only if - * the specified date should be considered part of the interval. - */ - filter(test: (date: Date) => boolean): TimeInterval; -} - -/** - * A D3 Countable Time Interval - */ -export interface CountableTimeInterval extends TimeInterval { - /** - * Returns the number of interval boundaries after start (exclusive) and before or equal to end (inclusive). - * - * Note that this behavior is slightly different than interval.range, - * because its purpose is to return the zero-based number of the specified end date relative to the specified start date. - * - * @param start A start date object. - * @param end An end date object. - */ - count(start: Date, end: Date): number; - /** - * Returns a filtered view of this interval representing every stepth date. - * - * The meaning of step is dependent on this interval’s parent interval as defined by the field function. - * - * For example, timeMinute.every(15) returns an interval representing every fifteen minutes, - * starting on the hour: :00, :15, :30, :45, etc. Note that for some intervals, - * the resulting dates may not be uniformly-spaced; - * timeDay’s parent interval is timeMonth, and thus the interval number resets at the start of each month. - * - * If step is not valid, returns null. If step is one, returns this interval. - * - * This method can be used in conjunction with interval.range to ensure that two overlapping ranges are consistent. - * - * The returned filtered interval does not support interval.count. See also interval.filter. - * - * @param step Number of steps. - */ - every(step: number): TimeInterval | null; -} - -// --------------------------------------------------------------- -// Custom (Countable)Interval Factories -// --------------------------------------------------------------- - -/** - * Constructs a new custom interval given the specified floor and offset functions. - * - * The returned custom interval is not countable, i.e. does not expose the methods "count(..)" and "every(...)". - * - * @param floor A floor function which takes a single date as an argument and rounds it down to the nearest interval boundary. - * @param offset An offset function which takes a date and an integer step as arguments and advances - * the specified date by the specified number of boundaries; the step may be positive, negative or zero. - */ -export function timeInterval( - floor: (date: Date) => void, - offset: (date: Date, step: number) => void, -): TimeInterval; -/** - * Constructs a new custom interval given the specified floor, offset and count functions. - * - * The returned custom interval is countable and exposes the methods "count(..)" and "every(...)". - * - * Note: due to an internal optimization, the specified count function must not invoke interval.count on other time intervals. - * - * @param floor A floor function which takes a single date as an argument and rounds it down to the nearest interval boundary. - * @param offset An offset function which takes a date and an integer step as arguments and advances - * the specified date by the specified number of boundaries; the step may be positive, negative or zero. - * @param count A count function which takes a start date and an end date, already floored to the current interval, - * and returns the number of boundaries between the start (exclusive) and end (inclusive). - * Note: due to an internal optimization, the specified count function must not invoke interval.count on other time intervals. - * @param field An optional field function which takes a date, already floored to the current interval, - * and returns the field value of the specified date, - * corresponding to the number of boundaries between this date (exclusive) and the latest previous parent boundary. - * For example, for the timeDay interval, this returns the number of days since the start of the month. - * If a field function is not specified, it defaults to counting the number of interval boundaries since - * the UNIX epoch of January 1, 1970 UTC. The field function defines the behavior of interval.every. - */ -export function timeInterval( - floor: (date: Date) => void, - offset: (date: Date, step: number) => void, - count: (start: Date, end: Date) => number, - field?: (date: Date) => number -): CountableTimeInterval; - -// --------------------------------------------------------------- -// Built-In Factories and Date Array Creators -// --------------------------------------------------------------- - -// local time ---------------------------------------------------------- - -/** - * Milliseconds Interval in Local Time; the shortest available time unit. - */ -export const timeMillisecond: CountableTimeInterval; - -/** - * This is a convenience alias for timeMillisecond.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function timeMilliseconds(start: Date, stop: Date, step?: number): Date[]; - -/** - * Seconds Interval in Local Time; seconds (e.g., 01:23:45.0000 AM); 1,000 milliseconds. - */ -export const timeSecond: CountableTimeInterval; - -/** - * This is a convenience alias for timeSecond.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function timeSeconds(start: Date, stop: Date, step?: number): Date[]; - -/** - * Minutes Interval in Local Time; minutes (e.g., 01:02:00 AM); 60 seconds. Note that ECMAScript ignores leap seconds. - */ -export const timeMinute: CountableTimeInterval; - -/** - * This is a convenience alias for timeMinute.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function timeMinutes(start: Date, stop: Date, step?: number): Date[]; - -/** - * Hours Interval in Local Time; Hours (e.g., 01:00 AM); 60 minutes. - * - * Note that advancing time by one hour in local time can return the same hour or skip an hour due to daylight saving. - */ -export const timeHour: CountableTimeInterval; - -/** - * This is a convenience alias for timeHour.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function timeHours(start: Date, stop: Date, step?: number): Date[]; - -/** - * Days Interval in Local Time; days (e.g., February 7, 2012 at 12:00 AM); typically 24 hours. - * Days in local time may range from 23 to 25 hours due to daylight saving. - */ -export const timeDay: CountableTimeInterval; - -/** - * This is a convenience alias for timeDay.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function timeDays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval in Local Time. Alias for sunday; 7 days and typically 168 hours. - * - * Weeks in local time may range from 167 to 169 hours due on daylight saving. - */ -export const timeWeek: CountableTimeInterval; - -/** - * This is a convenience alias for timeWeek.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function timeWeeks(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval for Sunday-based weeks in Local Time (e.g., February 5, 2012 at 12:00 AM). - * 7 days and typically 168 hours. - * - * Weeks in local time may range from 167 to 169 hours due on daylight saving. - */ -export const timeSunday: CountableTimeInterval; - -/** - * This is a convenience alias for timeSunday.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function timeSundays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval for Monday-based weeks in Local Time (e.g., February 6, 2012 at 12:00 AM). - * 7 days and typically 168 hours. - * - * Weeks in local time may range from 167 to 169 hours due on daylight saving. - */ -export const timeMonday: CountableTimeInterval; - -/** - * This is a convenience alias for timeMonday.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function timeMondays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval for Tuesday-based weeks in Local Time (e.g., February 7, 2012 at 12:00 AM). - * 7 days and typically 168 hours. - * - * Weeks in local time may range from 167 to 169 hours due on daylight saving. - */ -export const timeTuesday: CountableTimeInterval; - -/** - * This is a convenience alias for timeTuesday.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function timeTuesdays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval for Wednesday-based weeks in Local Time (e.g., February 8, 2012 at 12:00 AM). - * 7 days and typically 168 hours. - * - * Weeks in local time may range from 167 to 169 hours due on daylight saving. - */ -export const timeWednesday: CountableTimeInterval; - -/** - * This is a convenience alias for timeWednesday.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function timeWednesdays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval for Thursday-based weeks in Local Time (e.g., February 9, 2012 at 12:00 AM). - * 7 days and typically 168 hours. - * - * Weeks in local time may range from 167 to 169 hours due on daylight saving. - */ -export const timeThursday: CountableTimeInterval; - -/** - * This is a convenience alias for timeThursday.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function timeThursdays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval for Friday-based weeks in Local Time (e.g., February 10, 2012 at 12:00 AM). - * 7 days and typically 168 hours. - * - * Weeks in local time may range from 167 to 169 hours due on daylight saving. - */ -export const timeFriday: CountableTimeInterval; - -/** - * This is a convenience alias for timeFriday.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function timeFridays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval for Saturday-based weeks in Local Time (e.g., February 11, 2012 at 12:00 AM). - * 7 days and typically 168 hours. - * - * Weeks in local time may range from 167 to 169 hours due on daylight saving. - */ -export const timeSaturday: CountableTimeInterval; - -/** - * This is a convenience alias for timeSaturday.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function timeSaturdays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Month Interval in Local Time; months (e.g., February 1, 2012 at 12:00 AM); ranges from 28 to 31 days. - */ -export const timeMonth: CountableTimeInterval; - -/** - * This is a convenience alias for timeMonth.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function timeMonths(start: Date, stop: Date, step?: number): Date[]; - -/** - * Year Interval in Local Time; years (e.g., January 1, 2012 at 12:00 AM); ranges from 365 to 366 days. - */ -export const timeYear: CountableTimeInterval; - -/** - * This is a convenience alias for timeYear.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function timeYears(start: Date, stop: Date, step?: number): Date[]; - -// utc Coordinated Universal Time ---------------------------------------------------------- - -/** - * Milliseconds Interval in Coordinated Universal Time (UTC); the shortest available time unit. - */ -export const utcMillisecond: CountableTimeInterval; - -/** - * This is a convenience alias for utcMillisecond.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function utcMilliseconds(start: Date, stop: Date, step?: number): Date[]; - -/** - * Seconds Interval in Coordinated Universal Time (UTC); seconds (e.g., 01:23:45.0000 AM); 1,000 milliseconds. - */ -export const utcSecond: CountableTimeInterval; - -/** - * This is a convenience alias for utcSecond.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function utcSeconds(start: Date, stop: Date, step?: number): Date[]; - -/** - * Minutes Interval in Coordinated Universal Time (UTC); minutes (e.g., 01:02:00 AM); 60 seconds. - * Note that ECMAScript ignores leap seconds. - */ -export const utcMinute: CountableTimeInterval; - -/** - * This is a convenience alias for utcMinute.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function utcMinutes(start: Date, stop: Date, step?: number): Date[]; - -/** - * Hours Interval in Coordinated Universal Time (UTC); Hours (e.g., 01:00 AM); 60 minutes. - */ -export const utcHour: CountableTimeInterval; - -/** - * This is a convenience alias for utcHour.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function utcHours(start: Date, stop: Date, step?: number): Date[]; - -/** - * Days Interval in Coordinated Universal Time (UTC); days (e.g., February 7, 2012 at 12:00 AM); 24 hours. - */ -export const utcDay: CountableTimeInterval; - -/** - * This is a convenience alias for utcDay.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function utcDays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval in Local Time. Alias for sunday; 7 days and 168 hours. - * - */ -export const utcWeek: CountableTimeInterval; - -/** - * This is a convenience alias for utcWeek.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function utcWeeks(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval for Sunday-based weeks in Coordinated Universal Time (UTC) (e.g., February 5, 2012 at 12:00 AM). - * 7 days and 168 hours. - */ -export const utcSunday: CountableTimeInterval; - -/** - * This is a convenience alias for utcSunday.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function utcSundays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval for Monday-based weeks in Coordinated Universal Time (UTC) (e.g., February 6, 2012 at 12:00 AM). - * 7 days and 168 hours. - */ -export const utcMonday: CountableTimeInterval; - -/** - * This is a convenience alias for utcMonday.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function utcMondays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval for Tuesday-based weeks in Coordinated Universal Time (UTC) (e.g., February 7, 2012 at 12:00 AM). - * 7 days and 168 hours. - */ -export const utcTuesday: CountableTimeInterval; - -/** - * This is a convenience alias for utcTuesday.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function utcTuesdays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval for Wednesday-based weeks in Coordinated Universal Time (UTC) (e.g., February 8, 2012 at 12:00 AM). - * 7 days and 168 hours. - */ -export const utcWednesday: CountableTimeInterval; - -/** - * This is a convenience alias for utcWednesday.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function utcWednesdays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval for Thursday-based weeks in Coordinated Universal Time (UTC) (e.g., February 9, 2012 at 12:00 AM). - * 7 days and 168 hours. - */ -export const utcThursday: CountableTimeInterval; - -/** - * This is a convenience alias for utcThursday.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function utcThursdays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval for Friday-based weeks in Coordinated Universal Time (UTC) (e.g., February 10, 2012 at 12:00 AM). - * 7 days and 168 hours. - */ -export const utcFriday: CountableTimeInterval; - -/** - * This is a convenience alias for utcFriday.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function utcFridays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Week Interval for Saturday-based weeks in Coordinated Universal Time (UTC) (e.g., February 11, 2012 at 12:00 AM). - * 7 days and 168 hours. - */ -export const utcSaturday: CountableTimeInterval; - -/** - * This is a convenience alias for utcSaturday.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function utcSaturdays(start: Date, stop: Date, step?: number): Date[]; - -/** - * Month Interval in Coordinated Universal Time (UTC); months (e.g., February 1, 2012 at 12:00 AM); ranges from 28 to 31 days. - */ -export const utcMonth: CountableTimeInterval; - -/** - * This is a convenience alias for utcMonth.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function utcMonths(start: Date, stop: Date, step?: number): Date[]; - -/** - * Year Interval in Coordinated Universal Time (UTC); years (e.g., January 1, 2012 at 12:00 AM); ranges from 365 to 366 days. - */ -export const utcYear: CountableTimeInterval; - -/** - * This is a convenience alias for utcYear.range(...). - * - * @param start A start date object for the range. - * @param stop A stop date object for the range. - * @param step An optional number of steps to apply when calculating the dates in the range. - */ -export function utcYears(start: Date, stop: Date, step?: number): Date[]; diff --git a/node_modules/@types/d3-time/package.json b/node_modules/@types/d3-time/package.json deleted file mode 100644 index 10774e24bc169b4a65f66a9c48ae52ba7fa363d6..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-time/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "@types/d3-time@^1", - "_id": "@types/d3-time@1.1.1", - "_inBundle": false, - "_integrity": "sha512-ULX7LoqXTCYtM+tLYOaeAJK7IwCT+4Gxlm2MaH0ErKLi07R5lh8NHCAyWcDkCCmx1AfRcBEV6H9QE9R25uP7jw==", - "_location": "/@types/d3-time", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-time@^1", - "name": "@types/d3-time", - "escapedName": "@types%2fd3-time", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3", - "/@types/d3-scale" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-1.1.1.tgz", - "_shasum": "6cf3a4242c3bbac00440dfb8ba7884f16bedfcbf", - "_spec": "@types/d3-time@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-time module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-time", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-time" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "6f785f04268bdc5dba285e859eef14ec831abb55a939fb1e9ea258cb6f3db29f", - "version": "1.1.1" -} diff --git a/node_modules/@types/d3-timer/LICENSE b/node_modules/@types/d3-timer/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-timer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-timer/README.md b/node_modules/@types/d3-timer/README.md deleted file mode 100644 index d1b38078a023b776472652175add0552a435824b..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-timer/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-timer` - -# Summary -This package contains type definitions for d3JS d3-timer module (https://github.com/d3/d3-timer/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-timer/v1. - -### Additional Details - * Last updated: Tue, 29 Sep 2020 22:01:30 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-timer/index.d.ts b/node_modules/@types/d3-timer/index.d.ts deleted file mode 100644 index 69ce362c021059b5930f18ec63a50d4f744fb81b..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-timer/index.d.ts +++ /dev/null @@ -1,77 +0,0 @@ -// Type definitions for d3JS d3-timer module 1.0 -// Project: https://github.com/d3/d3-timer/, https://d3js.org/d3-timer -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -// Last module patch version validated against: 1.0.10 - -/** - * Returns the current time as defined by performance.now if available, and Date.now if not. - * The current time is updated at the start of a frame; it is thus consistent during the frame, and any timers scheduled during the same frame will be synchronized. - * If this method is called outside of a frame, such as in response to a user event, the current time is calculated and then fixed until the next frame, - * again ensuring consistent timing during event handling. - */ -export function now(): number; - -export interface Timer { - /** - * Restart a timer with the specified callback and optional delay and time. - * This is equivalent to stopping this timer and creating a new timer with the specified arguments, - * although this timer retains the original invocation priority. - * - * @param callback A callback function to be invoked and passed in the apparent - * elapsed time since the timer became active in milliseconds. - * @param delay An optional numeric delay in milliseconds (default = 0) relative to time. - * @param time An optional time in milliseconds relative to which the delay is calculated (default = now). - */ - restart(callbackFn: (elapsed: number) => void, delay?: number, time?: number): void; - - /** - * Stop the timer. - */ - stop(): void; -} - -/** - * Schedules and returns a new timer, invoking the specified callback repeatedly until the timer is stopped. - * The callback is passed the (apparent) elapsed time since the timer became active. - * - * @param callback A callback function to be invoked and passed in the apparent - * elapsed time since the timer became active in milliseconds. - * @param delay An optional numeric delay in milliseconds (default = 0) relative to time. - * @param time An optional time in milliseconds relative to which the delay is calculated (default = now). - */ -export function timer(callback: (elapsed: number) => void, delay?: number, time?: number): Timer; - -/** - * Immediately invoke any eligible timer callbacks. - */ -export function timerFlush(): void; - -/** - * Schedules and returns a new timer, invoking the specified callback. The timer is stopped automatically - * on its first callback. The callback is passed the (apparent) elapsed time since the timer became active. - * - * @param callback A callback function to be invoked and passed in the apparent - * elapsed time since the timer became active in milliseconds. - * @param delay An optional numeric delay in milliseconds (default = 0) relative to time. - * @param time An optional time in milliseconds relative to which the delay is calculated (default = now). - */ -export function timeout(callback: (elapsed: number) => void, delay?: number, time?: number): Timer; - -/** - * Schedules and returns a new timer, invoking the specified callback repeatedly every 'delay' milliseconds - * until the timer is stopped. - * The callback is passed the (apparent) elapsed time since the timer became active. - * - * @param callback A callback function to be invoked and passed in the apparent - * elapsed time since the timer became active in milliseconds. - * @param delay An optional numeric delay in milliseconds between repeat invocations of the callback. - * If not specified, the interval timer behaves like the regular timer. - * @param time An optional time in milliseconds relative to which the initial delay is calculated (default = now). - */ -export function interval(callback: (elapsed: number) => void, delay?: number, time?: number): Timer; diff --git a/node_modules/@types/d3-timer/package.json b/node_modules/@types/d3-timer/package.json deleted file mode 100644 index 3d0052cc28279ab3267e441ea83758457f76acfb..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-timer/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "_from": "@types/d3-timer@^1", - "_id": "@types/d3-timer@1.0.10", - "_inBundle": false, - "_integrity": "sha512-ZnAbquVqy+4ZjdW0cY6URp+qF/AzTVNda2jYyOzpR2cPT35FTXl78s15Bomph9+ckOiI1TtkljnWkwbIGAb6rg==", - "_location": "/@types/d3-timer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-timer@^1", - "name": "@types/d3-timer", - "escapedName": "@types%2fd3-timer", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-1.0.10.tgz", - "_shasum": "329c51c2c931f44ed0acff78b8c84571acf0ed21", - "_spec": "@types/d3-timer@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for d3JS d3-timer module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-timer", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-timer" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "fe09e9574d07c148e8e85dd3bd98edd2077b413f9213ffd6c43027c67f245e01", - "version": "1.0.10" -} diff --git a/node_modules/@types/d3-transition/LICENSE b/node_modules/@types/d3-transition/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-transition/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-transition/README.md b/node_modules/@types/d3-transition/README.md deleted file mode 100644 index f34bdda6084fddec51823cc04cb69ee6f8f8205a..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-transition/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-transition` - -# Summary -This package contains type definitions for D3JS d3-transition module (https://github.com/d3/d3-transition/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-transition/v1. - -### Additional Details - * Last updated: Thu, 01 Oct 2020 22:50:48 GMT - * Dependencies: [@types/d3-selection](https://npmjs.com/package/@types/d3-selection) - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [Robert Moura](https://github.com/robertmoura), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-transition/index.d.ts b/node_modules/@types/d3-transition/index.d.ts deleted file mode 100644 index 7fb220b1196aaca5d8ed013af9bf19582b2d46c9..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-transition/index.d.ts +++ /dev/null @@ -1,628 +0,0 @@ -// Type definitions for D3JS d3-transition module 1.3 -// Project: https://github.com/d3/d3-transition/, https://d3js.org/d3-transition -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// Robert Moura <https://github.com/robertmoura> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.3.2 - -import { ArrayLike, BaseType, Selection, ValueFn } from 'd3-selection'; - -/** - * Extend interface 'Selection' by declaration merging with 'd3-selection' - */ -declare module 'd3-selection' { - /** - * A D3 Selection of elements. - * - * The first generic "GElement" refers to the type of the selected element(s). - * The second generic "Datum" refers to the type of the datum of a selected element(s). - * The third generic "PElement" refers to the type of the parent element(s) in the D3 selection. - * The fourth generic "PDatum" refers to the type of the datum of the parent element(s). - */ - interface Selection<GElement extends BaseType, Datum, PElement extends BaseType, PDatum> { - /** - * Interrupts the active transition of the specified name on the selected elements, and cancels any pending transitions with the specified name, if any. - * If a name is not specified, null is used. - * - * IMPORTANT: Interrupting a transition on an element has no effect on any transitions on any descendant elements. - * For example, an axis transition consists of multiple independent, synchronized transitions on the descendants of the axis G element - * (the tick lines, the tick labels, the domain path, etc.). To interrupt the axis transition, you must therefore interrupt the descendants. - * - * @param name Name of the transition. - */ - interrupt(name?: string): this; - /** - * Returns a new transition on the given selection with the specified name. If a name is not specified, null is used. - * The new transition is only exclusive with other transitions of the same name. - * - * @param name Name of the transition. - */ - transition(name?: string): Transition<GElement, Datum, PElement, PDatum>; - /** - * Returns a new transition on the given selection. - * - * When using a transition instance, the returned transition has the same id and name as the specified transition. - * If a transition with the same id already exists on a selected element, the existing transition is returned for that element. - * Otherwise, the timing of the returned transition is inherited from the existing transition of the same id on the nearest ancestor of each selected element. - * Thus, this method can be used to synchronize a transition across multiple selections, - * or to re-select a transition for specific elements and modify its configuration. - * - * If the specified transition is not found on a selected node or its ancestors (such as if the transition already ended), - * the default timing parameters are used; however, in a future release, this will likely be changed to throw an error. - * - * @param transition A transition instance. - */ - transition(transition: Transition<BaseType, any, any, any>): Transition<GElement, Datum, PElement, PDatum>; - } -} - -/** - * Return the active transition on the specified node with the specified name, if any. - * If no name is specified, null is used. Returns null if there is no such active transition on the specified node. - * This method is useful for creating chained transitions. - * - * The first generic "GElement" refers to the type of element on which the returned active transition was defined. The second generic "Datum" refers to the type of the - * datum, of a selected element on which the transition is defined. The third generic refers to the type of the parent elements in the returned Transition. - * The fourth generic refers to the type of the datum defined on the parent elements in the returned Transition. - * - * @param node Element for which the active transition should be returned. - * @param name Name of the transition. - */ -export function active<GElement extends BaseType, Datum, PElement extends BaseType, PDatum>(node: GElement, name?: string): Transition<GElement, Datum, PElement, PDatum> | null; - -/** - * Interrupts the active transition of the specified name on the specified node, and cancels any pending transitions with the specified name, if any. - * If a name is not specified, null is used. - * - * @param node Element for which the transition should be interrupted. - * @param name Name of the transition to be interrupted. If a name is not specified, null is used. - */ -export function interrupt(node: BaseType, name?: string): void; - -/** - * A D3 Transition. - * - * The first generic "GElement" refers to the type of the selected element(s) in the Transition. - * The second generic "Datum" refers to the type of the datum of a selected element(s) in the Transition. - * The third generic "PElement" refers to the type of the parent element(s) in the D3 selection in the Transition. - * The fourth generic "PDatum" refers to the type of the datum of the parent element(s) in the Transition. - */ -export interface Transition<GElement extends BaseType, Datum, PElement extends BaseType, PDatum> { - // Sub-selection ------------------------- - - /** - * For each selected element, select the first descendant element that matches the specified selector string, if any, - * and returns a transition on the resulting selection. The new transition has the same id, name and timing as this transition; - * however, if a transition with the same id already exists on a selected element, - * the existing transition is returned for that element. - * - * The generic represents the type of the descendant element to be selected. - * - * @param selector CSS selector string - */ - select<DescElement extends BaseType>(selector: string): Transition<DescElement, Datum, PElement, PDatum>; - /** - * For each selected element, select the descendant element returned by the selector function, if any, - * and returns a transition on the resulting selection. The new transition has the same id, name and timing as this transition; - * however, if a transition with the same id already exists on a selected element, - * the existing transition is returned for that element. - * - * The generic represents the type of the descendant element to be selected. - * - * @param selector A selector function, which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). - * It must return an element, or null if there is no matching element. - */ - select<DescElement extends BaseType>(selector: ValueFn<GElement, Datum, DescElement>): Transition<DescElement, Datum, PElement, PDatum>; - - /** - * For each selected element, select all descendant elements that match the specified selector string, if any, - * and returns a transition on the resulting selection. The new transition has the same id, name and timing as this transition; - * however, if a transition with the same id already exists on a selected element, the existing transition is returned for that element. - * - * The first generic "DescElement" refers to the type of descendant element to be selected. The second generic "OldDatum" refers to the type of the - * datum, of a selected element. This is useful when re-selecting elements with a previously set, know datum type. - * - * @param selector CSS selector string - */ - selectAll<DescElement extends BaseType, OldDatum>(selector: string): Transition<DescElement, OldDatum, GElement, Datum>; - /** - * For each selected element, select all descendant elements returned by the selector function, if any, - * and returns a transition on the resulting selection. The new transition has the same id, name and timing as this transition; - * however, if a transition with the same id already exists on a selected element, the existing transition is returned for that element. - * - * The first generic "DescElement" refers to the type of descendant element to be selected. The second generic "OldDatum" refers to the type of the - * datum, of a selected element. This is useful when re-selecting elements with a previously set, know datum type. - * - * @param selector A selector function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). It must return an array of elements - * (or a pseudo-array, such as a NodeList), or the empty array if there are no matching elements. - */ - selectAll<DescElement extends BaseType, OldDatum>(selector: ValueFn<GElement, Datum, DescElement[] | ArrayLike<DescElement>>): Transition<DescElement, OldDatum, GElement, Datum>; - - /** - * Return the selection corresponding to this transition. - */ - selection(): Selection<GElement, Datum, PElement, PDatum>; - - /** - * Returns a new transition on the same selected elements as this transition, scheduled to start when this transition ends. - * The new transition inherits a reference time equal to this transition’s time plus its delay and duration. - * The new transition also inherits this transition’s name, duration, and easing. - * This method can be used to schedule a sequence of chained transitions. - * - * A delay configured for the new transition will be relative to the previous transition. - */ - transition(): Transition<GElement, Datum, PElement, PDatum>; - - // Modifying ------------------------------- - - /** - * For each selected element, the attribute with the specified name will be cleared at the start of the transition. - * - * @param name Name of the attribute. - * @param value Use null to clear the attribute. - */ - attr(name: string, value: null): this; - /** - * For each selected element, assigns the attribute tween for the attribute with the specified name to the specified target value. - * The starting value of the tween is the attribute’s value when the transition starts. - * The target value is the specified constant value for all elements. - * - * An interpolator is chosen based on the type of the target value, using the following algorithm: - * 1.) If value is a number, use interpolateNumber. - * 2.) If value is a color or a string coercible to a color, use interpolateRgb. - * 3.) Use interpolateString. - * - * To apply a different interpolator, use transition.attrTween. - * - * @param name Name of the attribute. - * @param value Target value for the attribute. - */ - attr(name: string, value: string | number | boolean): this; - /** - * For each selected element, assigns the attribute tween for the attribute with the specified name to the specified target value. - * The starting value of the tween is the attribute’s value when the transition starts. - * The target value is return value of the value function evaluated for the selected element. - * - * An interpolator is chosen based on the type of the target value, using the following algorithm: - * 1.) If value is a number, use interpolateNumber. - * 2.) If value is a color or a string coercible to a color, use interpolateRgb. - * 3.) Use interpolateString. - * - * To apply a different interpolator, use transition.attrTween. - * - * @param name Name of the attribute. - * @param value A value function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). - * A null value will clear the attribute at the start of the transition. - */ - attr(name: string, value: ValueFn<GElement, Datum, string | number | boolean | null>): this; - - /** - * Return the current interpolator factory for attribute with the specified name, or undefined if no such tween exists. - * - * @param name Name of attribute. - */ - attrTween(name: string): ValueFn<GElement, Datum, (this: GElement, t: number) => string> | undefined; - /** - * Remove the previously-assigned attribute tween of the specified name, if any. - * - * @param name Name of attribute. - * @param factory Use null to remove previously-assigned attribute tween. - */ - attrTween(name: string, factory: null): this; - /** - * Assign the attribute tween for the attribute with the specified name to the specified interpolator factory. - * An interpolator factory is a function that returns an interpolator; when the transition starts, the factory is evaluated for each selected element. - * The returned interpolator will then be invoked for each frame of the transition, in order, - * being passed the eased time t, typically in the range [0, 1]. Lastly, the return value of the interpolator will be used to set the attribute value. - * The interpolator must return a string. - * - * @param name Name of attribute. - * @param factory An interpolator factory which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). The interpolator factory returns a string interpolator, - * which takes as its argument eased time t, typically in the range [0, 1] and returns the interpolated string. - */ - attrTween(name: string, factory: ValueFn<GElement, Datum, (this: GElement, t: number) => string>): this; - - /** - * For each selected element, the style with the specified name will be cleared at the start of the transition. - * - * @param name Name of the style. - * @param value Use null to clear the style. - */ - style(name: string, value: null): this; - /** - * For each selected element, assigns the style tween for the style with the specified name to the specified target value with the - * specified priority. - * The starting value of the tween is the style’s inline value if present, and otherwise its computed value. - * The target value is the specified constant value for all elements. - * - * An interpolator is chosen based on the type of the target value, using the following algorithm: - * 1.) If value is a number, use interpolateNumber. - * 2.) If value is a color or a string coercible to a color, use interpolateRgb. - * 3.) Use interpolateString. - * - * To apply a different interpolator, use transition.attrTween. - * - * @param name Name of the style. - * @param value Target value for the style. - * @param priority An optional priority flag, either null or the string important (without the exclamation point) - */ - style(name: string, value: string | number | boolean, priority?: null | 'important'): this; - /** - * For each selected element, assigns the style tween for the style with the specified name to the specified target value with the - * specified priority. - * The starting value of the tween is the style's inline value if present, and otherwise its computed value. - * The target value is return value of the value function evaluated for the selected element. - * - * An interpolator is chosen based on the type of the target value, using the following algorithm: - * 1.) If value is a number, use interpolateNumber. - * 2.) If value is a color or a string coercible to a color, use interpolateRgb. - * 3.) Use interpolateString. - * - * To apply a different interpolator, use transition.attrTween. - * - * @param name Name of the style. - * @param value A value function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). - * A null value will clear the style at the start of the transition. - * @param priority An optional priority flag, either null or the string important (without the exclamation point) - */ - style(name: string, value: ValueFn<GElement, Datum, string | number | boolean | null>, priority?: null | 'important'): this; - - /** - * Return the current interpolator factory for style with the specified name, or undefined if no such tween exists. - * - * @param name Name of style. - */ - styleTween(name: string): ValueFn<GElement, Datum, (this: GElement, t: number) => string> | undefined; - /** - * Remove the previously-assigned style tween of the specified name, if any. - * - * @param name Name of style. - * @param factory Use null to remove previously-assigned style tween. - */ - styleTween(name: string, factory: null): this; - /** - * Assign the style tween for the style with the specified name to the specified interpolator factory. - * An interpolator factory is a function that returns an interpolator; when the transition starts, the factory is evaluated for each selected element. - * The returned interpolator will then be invoked for each frame of the transition, in order, - * being passed the eased time t, typically in the range [0, 1]. Lastly, the return value of the interpolator will be used to set the style value. - * The interpolator must return a string. - * - * @param name Name of style. - * @param factory An interpolator factory which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). The interpolator factory returns a string interpolator, - * which takes as its argument eased time t, typically in the range [0, 1] and returns the interpolated string. - * @param priority An optional priority flag, either null or the string important (without the exclamation point) - */ - styleTween(name: string, factory: ValueFn<GElement, Datum, (this: GElement, t: number) => string>, priority?: null | 'important'): this; - - /** - * For each selected element, the text content will be cleared, replacing any existing child elements. - * - * @param value Use null to clear the text content. - */ - text(value: null): this; - /** - * For each selected element, sets the text content to the specified target value when the transition starts. - * - * To interpolate text rather than to set it on start, use transition.textTween (for example) or append a replacement element and cross-fade opacity (for example). - * Text is not interpolated by default because it is usually undesirable. - * - * @param value Value used for text content - */ - text(value: string | number | boolean): this; - /** - * For each selected element, sets the text content returned by the value function for each selected element when the transition starts. - * - * To interpolate text rather than to set it on start, use transition.textTween (for example) or append a replacement element and cross-fade opacity (for example). - * Text is not interpolated by default because it is usually undesirable. - * - * @param value A value function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). - * A null value will clear the text content at the start of the transition. - */ - text(value: ValueFn<GElement, Datum, string | number | boolean>): this; - - /** - * Returns the current interpolator factory for text, or undefined if no such tween exists. - */ - textTween(): ValueFn<GElement, Datum, (this: GElement, t: number) => string> | undefined; - /** - * Removes the previously-assigned text tween, if any - * - * @param factory Use null to remove previously-assigned text tween. - */ - textTween(factory: null): this; - /** - * Assigns the text tween to the specified interpolator factory. - * An interpolator factory is a function that returns an interpolator; when the transition starts, the factory is evaluated for each selected element, - * in order, being passed the current datum d and index i, with the this context as the current DOM element. - * The returned interpolator will then be invoked for each frame of the transition, in order, being passed the eased time t, typically in the range [0, 1]. - * Lastly, the return value of the interpolator will be used to set the text. - * The interpolator must return a string. - * - * @param factory An interpolator factory is a function that returns an interpolator; when the transition starts, the factory is evaluated for each selected element, - * in order, being passed the current datum d and index i, with the this context as the current DOM element. - * The returned interpolator will then be invoked for each frame of the transition, in order, being passed the eased time t, typically in the range [0, 1]. - * Lastly, the return value of the interpolator will be used to set the text. - * The interpolator must return a string. - */ - textTween(factory: ValueFn<GElement, Datum, (this: GElement, t: number) => string>): this; - - /** - * For each selected element, removes the element when the transition ends, as long as the element has no other active or pending transitions. - * If the element has other active or pending transitions, does nothing. - */ - remove(): this; - - /** - * Returns the tween with the specified name, or undefined, if no tween was previously assigned to - * that name. - * - * @param name Name of tween. - */ - tween(name: string): ValueFn<GElement, Datum, (this: GElement, t: number) => void> | undefined; - /** - * Removes the tween with the specified name, if a tween was previously assigned to - * that name. - * - * @param name Name of tween. - * @param tweenFn Use null to remove a previously-assigned tween. - */ - tween(name: string, tweenFn: null): this; - /** - * For each selected element, assigns the tween with the specified name with the specified value function. - * The value must be specified as a function that returns a function. - * When the transition starts, the value function is evaluated for each selected element. - * The returned function is then invoked for each frame of the transition, in order, - * being passed the eased time t, typically in the range [0, 1]. - * - * @param name Name of tween. - * @param tweenFn A tween function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). The tween function returns a function - * which takes as its argument eased time t, typically in the range [0, 1] and performs the tweening activities for each transition frame. - */ - tween(name: string, tweenFn: ValueFn<GElement, Datum, (this: GElement, t: number) => void>): this; - - /** - * Returns a new transition merging this transition with the specified other transition, - * which must have the same id as this transition. The returned transition has the same number of groups, - * the same parents, the same name and the same id as this transition. - * Any missing (null) elements in this transition are filled with the corresponding element, if present (not null), from the other transition. - * - * @param other The transition to be merged. - */ - merge(other: Transition<GElement, Datum, PElement, PDatum>): Transition<GElement, Datum, PElement, PDatum>; - - /** - * For each selected element, selects only the elements that match the specified filter, and returns a transition on the resulting selection. - * - * The new transition has the same id, name and timing as this transition; however, if a transition with the same id already exists on a selected element, - * the existing transition is returned for that element. - * - * @param filter A CSS selector string. - */ - filter(filter: string): Transition<GElement, Datum, PElement, PDatum>; - /** - * For each selected element, selects only the elements that match the specified filter, and returns a transition on the resulting selection. - * - * The new transition has the same id, name and timing as this transition; however, if a transition with the same id already exists on a selected element, - * the existing transition is returned for that element. - * - * The generic refers to the type of element which will be selected after applying the filter, i.e. if the element types - * contained in a pre-filter selection are narrowed to a subset as part of the filtering. - * - * @param filter A CSS selector string. - */ - filter<FilteredElement extends BaseType>(filter: string): Transition<FilteredElement, Datum, PElement, PDatum>; - /** - * For each selected element, selects only the elements that match the specified filter, and returns a transition on the resulting selection. - * - * The new transition has the same id, name and timing as this transition; however, if a transition with the same id already exists on a selected element, - * the existing transition is returned for that element. - * - * @param filter A filter function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). The filter function returns a boolean indicating, - * whether the selected element matches. - */ - filter(filter: ValueFn<GElement, Datum, boolean>): Transition<GElement, Datum, PElement, PDatum>; - /** - * For each selected element, selects only the elements that match the specified filter, and returns a transition on the resulting selection. - * - * The new transition has the same id, name and timing as this transition; however, if a transition with the same id already exists on a selected element, - * the existing transition is returned for that element. - * - * The generic refers to the type of element which will be selected after applying the filter, i.e. if the element types - * contained in a pre-filter selection are narrowed to a subset as part of the filtering. - * - * @param filter A filter function which is evaluated for each selected element, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element (nodes[i]). The filter function returns a boolean indicating, - * whether the selected element matches. - */ - filter<FilteredElement extends BaseType>(filter: ValueFn<GElement, Datum, boolean>): Transition<FilteredElement, Datum, PElement, PDatum>; - - // Event Handling ------------------- - - /** - * Return the currently-assigned listener for the specified event typename on the first (non-null) selected element, if any. - * If multiple typenames are specified, the first matching listener is returned. - * - * @param typenames The typenames is one of the following string event types: start (when the transition starts), end (when the transition ends), - * interrupt (when the transition is interrupted), cancel(when the transition is cancelled). - * Note that these are not native DOM events. The type may be optionally followed by a period (.) and a name; - * the optional name allows multiple callbacks to be registered to receive events of the same type, such as "start.foo"" and "start.bar". - * To specify multiple typenames, separate typenames with spaces, such as "interrupt end"" or "start.foo start.bar". - */ - on(typenames: string): ValueFn<GElement, Datum, void> | undefined; - /** - * Remove all listeners for a given name. - * - * @param typenames Name of the event type for which the listener should be removed. To remove all listeners for a given name use ".foo" - * as the typename, where foo is the name; to remove all listeners with no name, specify "." as the typename. - * @param listener Use null to remove listeners. - */ - on(typenames: string, listener: null): this; - /** - * Add a listener to each selected element for the specified event typenames. - * - * When a specified transition event is dispatched on a selected node, the specified listener will be invoked for each transitioning element. - * Listeners always see the latest datum for their element, but the index is a property of the selection and is fixed when the listener is assigned; - * to update the index, re-assign the listener. - * - * @param typenames The typenames is one of the following string event types: start (when the transition starts), end (when the transition ends), - * interrupt (when the transition is interrupted), cancel(when the transition is cancelled). - * Note that these are not native DOM events. The type may be optionally followed by a period (.) and a name; - * the optional name allows multiple callbacks to be registered to receive events of the same type, such as "start.foo"" and "start.bar". - * To specify multiple typenames, separate typenames with spaces, such as "interrupt end"" or "start.foo start.bar". - * @param listener A listener function which will be evaluated for each selected element, being passed the current datum (d), the current index (i), - * and the current group (nodes), with this as the current DOM element (nodes[i]). Listeners always see the latest datum for their element, - * but the index is a property of the selection and is fixed when the listener is assigned; to update the index, re-assign the listener. - */ - on(typenames: string, listener: ValueFn<GElement, Datum, void>): this; - - /** - * Returns a promise that resolves when every selected element finishes transitioning. If any element’s transition is cancelled or interrupted, the promise rejects. - */ - end(): Promise<void>; - - // Control Flow ---------------------- - - /** - * Invoke the specified function for each selected element, passing the current datum (d), - * the current index (i), and the current group (nodes), with this of the current DOM element (nodes[i]). - * This method can be used to invoke arbitrary code for each selected element, and is useful for creating a context to access parent and child data simultaneously. - * - * @param func A function which is invoked for each selected element, - * being passed the current datum (d), the current index (i), and the current group (nodes), with this of the current DOM element (nodes[i]). - */ - each(func: ValueFn<GElement, Datum, void>): this; - - /** - * Invoke the specified function exactly once, passing in this transition along with any optional arguments. - * Returns this transition. - * - * @param func A function which is passed this transition as the first argument along with any optional arguments. - * @param args List of optional arguments to be passed to the callback function. - */ - call(func: (transition: Transition<GElement, Datum, PElement, PDatum>, ...args: any[]) => any, ...args: any[]): this; - - /** - * Return true if this transition contains no (non-null) elements. - */ - empty(): boolean; - - /** - * Return the first (non-null) element in this transition. If the transition is empty, returns null. - */ - node(): GElement | null; - - /** - * Return an array of all (non-null) elements in this transition. - */ - nodes(): GElement[]; - - /** - * Returns the total number of elements in this transition. - */ - size(): number; - - // Transition Configuration ---------------------- - - /** - * Returns the current value of the delay for the first (non-null) element in the transition. - * This is generally useful only if you know that the transition contains exactly one element. - */ - delay(): number; - /** - * For each selected element, sets the transition delay to the specified value in milliseconds. - * If a delay is not specified, it defaults to zero. - * - * @param milliseconds Number of milliseconds for the delay. - */ - delay(milliseconds: number): this; - /** - * For each selected element, sets the transition delay to the value in milliseconds returned by the - * value function. - * - * @param milliseconds A value function which is evaluated for each selected element, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this of the current DOM element (nodes[i]). The return value is a number - * specifying the delay in milliseconds. - */ - delay(milliseconds: ValueFn<GElement, Datum, number>): this; - - /** - * Returns the current value of the duration for the first (non-null) element in the transition. - * This is generally useful only if you know that the transition contains exactly one element. - */ - duration(): number; - /** - * For each selected element, sets the transition duration to the specified value in milliseconds. - * If a duration is not specified, it defaults to 250ms. - * - * @param duration Number of milliseconds for the duration. - */ - duration(milliseconds: number): this; - /** - * For each selected element, sets the transition duration to the value in milliseconds returned by the - * value function. - * - * @param milliseconds A value function which is evaluated for each selected element, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this of the current DOM element (nodes[i]). The return value is a number - * specifying the duration in milliseconds. - */ - duration(milliseconds: ValueFn<GElement, Datum, number>): this; - - /** - * Returns the current easing function for the first (non-null) element in the transition. - * This is generally useful only if you know that the transition contains exactly one element. - */ - ease(): (normalizedTime: number) => number; - /** - * Specifies the transition easing function for all selected elements. The value must be specified as a function. - * The easing function is invoked for each frame of the animation, being passed the normalized time t in the range [0, 1]; - * it must then return the eased time tʹ which is typically also in the range [0, 1]. - * A good easing function should return 0 if t = 0 and 1 if t = 1. If an easing function is not specified, - * it defaults to d3.easeCubic. - * - * @param easingFn An easing function which is passed the normalized time t in the range [0, 1]; - * it must then return the eased time tʹ which is typically also in the range [0, 1]. - * A good easing function should return 0 if t = 0 and 1 if t = 1. - */ - ease(easingFn: (normalizedTime: number) => number): this; -} - -/** - * Represents the union of the Selection and Transition types for any usages that operate on both. - * Typically used for functions which take in either a selection or transition and set or update attributes. - */ -export type SelectionOrTransition<GElement extends BaseType, Datum, PElement extends BaseType, PDatum> = Selection<GElement, Datum, PElement, PDatum> | Transition<GElement, Datum, PElement, PDatum>; - -/** - * Returns a new transition with the specified name. If a name is not specified, null is used. - * The new transition is only exclusive with other transitions of the same name. - * - * The generic "OldDatum" refers to the type of a previously-set datum of the selected HTML element in the Transition. - * - * @param name Name of the transition. - */ -export function transition<OldDatum>(name?: string): Transition<HTMLElement, OldDatum, null, undefined>; - -/** - * Returns a new transition from an existing transition. - * - * When using a transition instance, the returned transition has the same id and name as the specified transition. - * - * The generic "OldDatum" refers to the type of a previously-set datum of the selected HTML element in the Transition. - * - * @param transition A transition instance. - */ -export function transition<OldDatum>(transition: Transition<BaseType, any, BaseType, any>): Transition<HTMLElement, OldDatum, null, undefined>; diff --git a/node_modules/@types/d3-transition/package.json b/node_modules/@types/d3-transition/package.json deleted file mode 100644 index 507eef3772c5e4ca22bafae6b1730ce814f61cfd..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-transition/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_from": "@types/d3-transition@^1", - "_id": "@types/d3-transition@1.3.1", - "_inBundle": false, - "_integrity": "sha512-U9CpMlTL/NlqdGXBlHYxTZwbmy/vN1cFv8TuAIFPX+xOW/1iChbeJBY2xmINhDQfkGJbgkH4IovafCwI1ZDrgg==", - "_location": "/@types/d3-transition", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-transition@^1", - "name": "@types/d3-transition", - "escapedName": "@types%2fd3-transition", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-1.3.1.tgz", - "_shasum": "5d658eea2db17684daa04eda81d7db9824d3463f", - "_spec": "@types/d3-transition@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "Robert Moura", - "url": "https://github.com/robertmoura" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": { - "@types/d3-selection": "^1" - }, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-transition module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-transition", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-transition" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "535131fcfed61fbb3f98a7ee6ec853bf38ca2bf25c288fde4b08060010a2b314", - "version": "1.3.1" -} diff --git a/node_modules/@types/d3-voronoi/LICENSE b/node_modules/@types/d3-voronoi/LICENSE deleted file mode 100644 index 4b1ad51b2f0efc36f38aa3349a9f30fbd9217547..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-voronoi/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-voronoi/README.md b/node_modules/@types/d3-voronoi/README.md deleted file mode 100644 index 99b90401b47e4e404c4487d719163600e22fb987..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-voronoi/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-voronoi` - -# Summary -This package contains type definitions for D3JS d3-voronoi module ( https://github.com/d3/d3-voronoi/ ). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-voronoi - -Additional Details - * Last updated: Wed, 13 Feb 2019 18:07:34 GMT - * Dependencies: none - * Global values: none - -# Credits -These definitions were written by Tom Wanzek <https://github.com/tomwanzek>, Alex Ford <https://github.com/gustavderdrache>, Boris Yankov <https://github.com/borisyankov>, denisname <https://github.com/denisname>. diff --git a/node_modules/@types/d3-voronoi/index.d.ts b/node_modules/@types/d3-voronoi/index.d.ts deleted file mode 100644 index 112727213026423c17f3d0437eecc9fa01429405..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-voronoi/index.d.ts +++ /dev/null @@ -1,308 +0,0 @@ -// Type definitions for D3JS d3-voronoi module 1.1 -// Project: https://github.com/d3/d3-voronoi/, https://d3js.org/d3-voronoi -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.1.4 - -// -------------------------------------------------------------------------- -// Shared Type Definitions and Interfaces -// -------------------------------------------------------------------------- - -/** - * The VoronoiPoint interface is defined as a cue that the array is strictly of type [number, number] with two elements - * for x and y coordinates. However, it is used as a base for interface definitions, and [number, number] - * cannot be extended. - */ -export interface VoronoiPoint extends Array<number> { - 0: number; - 1: number; -} - -/** - * The VoronoiPointPair interface is defined as a cue that the array is strictly of type [[number, number], [number, number]] with two elements, one - * for each point containing the respective x and y coordinates. However, it is used as a base for interface definitions, and - * [[number, number], [number, number]] cannot be extended. - */ -export interface VoronoiPointPair extends Array<[number, number]> { - 0: [number, number]; - 1: [number, number]; -} - -/** - * A Voronoi Polygon is represented as an array of points [x, y] where x and y are the point coordinates, and a data field that refers to the corresponding element in data. - * Polygons are open: they do not contain a closing point that duplicates the first point; a triangle, for example, is an array of three points. - * Polygons are also counterclockwise, assuming the origin ⟨0,0⟩ is in the top-left corner. - * - * The generic refers to the type of the data for the corresponding element. - */ -export interface VoronoiPolygon<T> extends Array<[number, number]> { - /** - * The input data corresponding to this Voronoi polygon. - */ - data: T; -} - -/** - * Voronoi Triangle is a three-element array of elements from data. - * - * The generic refers to the type of the data for the corresponding element. - */ -export type VoronoiTriangle<T> = [T, T, T]; - -/** - * A Voronoi Site in the diagram is an array [x, y] with two additional properties: - * index and data. - * - * The generic refers to the type of the data for the corresponding element. - */ -export interface VoronoiSite<T> extends VoronoiPoint { - /** - * The Voronoi Site’s index, corresponding to the associated input point. - */ - index: number; - - /** - * The input data corresponding to this site. - */ - data: T; -} - -/** - * A Voronoi Cell in the diagram is an object with the following properties: - * site and halfedges - * - * The generic refers to the type of the data for the corresponding element. - */ -export interface VoronoiCell<T> { - /** - * The Voronoi Site of the cell’s associated input point. - */ - site: VoronoiSite<T>; - - /** - * An array of indexes into diagram.edges representing the cell’s polygon. - */ - halfedges: number[]; -} - -/** - * Voronoi Edge in the diagram is an array [[x0, y0], [x1, y1]] with two additional properties: - * left and right. - * - * The generic refers to the type of the data for the corresponding element. - */ -export interface VoronoiEdge<T> extends VoronoiPointPair { - /** - * The Voronoi site on the left side of the edge. - */ - left: VoronoiSite<T>; - - /** - * The Voronoi site on the right side of the edge; `null` for a clipped border edge. - */ - right: VoronoiSite<T> | null; -} - -/** - * Voronoi Link for an edge in the mesh created by the Delaunay triangulation of the specified data array. - * Each link has the following attributes: source and target. - * - * The generic refers to the type of the data for the corresponding element. - */ -export interface VoronoiLink<T> { - /** - * The source node, an element in data. - */ - source: T; - - /** - * The target node, an element in data. - */ - target: T; -} - -/** - * A Voronoi Layout. - * - * The generic refers to the type of the data for the corresponding element. - */ -export interface VoronoiLayout<T> { - /** - * Computes the Voronoi diagram for the specified data points. - * @param data Array of data elements - */ - (data: T[]): VoronoiDiagram<T>; - - /** - * Return the current x-coordinate accessor, - * which defaults to accessing the first element of an array (i.e. at index 0). - */ - x(): (d: T) => number; - /** - * Set the x-coordinate accessor and return the layout. - * - * @param x An accessor function which takes a data element as input and return a - * numeric value for the x-coordinate. - */ - x(x: (d: T) => number): this; - - /** - * Return the current y-coordinate accessor, - * which defaults to accessing the second element of an array (i.e. at index 1). - */ - y(): (d: T) => number; - /** - * Set the y-coordinate accessor and return the layout. - * - * @param y An accessor function which takes a data element as input and return a - * numeric value for the y-coordinate. - */ - y(y: (d: T) => number): this; - - /** - * Returns the current clip extent which defaults to null. - * - * The extent bounds are specified as an array [[x0, y0], [x1, y1]], - * where x0 is the left side of the extent, y0 is the top, - * x1 is the right and y1 is the bottom. - * - * A clip extent is required when using voronoi.polygons. - * - */ - extent(): [[number, number], [number, number]] | null; - /** - * Set the clip extent of the Voronoi layout to the specified bounds and return the layout. - * - * A clip extent is required when using voronoi.polygons. - * - * @param extent The extent bounds are specified as an array [[x0, y0], [x1, y1]], - * where x0 is the left side of the extent, y0 is the top, x1 is the right and y1 is the bottom. - */ - extent(extent: [[number, number], [number, number]]): this; - - /** - * Get the clip size of the Voronoi layout. Size is an alias for voronoi.extent - * where the minimum x and y of the extent are ⟨0,0⟩. - */ - size(): [number, number] | null; - /** - * Set the clip size and return the layout. - * - * Size is an alias for voronoi.extent where the minimum x and y of the extent are ⟨0,0⟩. - * - * @param size An array representing the x- and y-size of the clip extent, - * where the minimum x and y of the extent are ⟨0,0⟩. - */ - size(size: [number, number]): this; - - /** - * Return an array of polygons clipped to the extent, one for each input point in the specified data points, - * corresponding to the cells in the computed Voronoi diagram. - * - * Each polygon is represented as an array of points [x, y] where x and y are the point coordinates, - * and a data field that refers to the corresponding element in data. - * Polygons are open: they do not contain a closing point that duplicates the first point; - * a triangle, for example, is an array of three points. Polygons are also counterclockwise, - * assuming the origin ⟨0,0⟩ is in the top-left corner. - * - * If the cell’s site is coincident with an earlier site, the associated polygon is null. - * - * Important: Using polygon requires the extent to be set for the layout. - * - * @param data Array of data points. - */ - polygons(data: T[]): Array<VoronoiPolygon<T>>; - - /** - * Return the Delaunay triangulation of the specified data array as an array of triangles. - * Each triangle is a three-element array of elements from data. - * - * @param data Array of data points. - */ - triangles(data: T[]): Array<VoronoiTriangle<T>>; - - /** - * Return the Delaunay triangulation of the specified data array as an array of links. - * Each link has source and target attributes referring to elements in data. - * - * @param data Array of data points. - */ - links(data: T[]): Array<VoronoiLink<T>>; -} - -/** - * Computed Voronoi diagram - * - * The generic refers to the type of the data for the corresponding element. - */ -export interface VoronoiDiagram<T> { - /** - * Array of Voronoi Edges - */ - edges: Array<VoronoiEdge<T>>; - - /** - * Array of Voronoi Cells, one per input point; a cell may be null for a coincident point. - */ - cells: Array<VoronoiCell<T> | null>; - - /** - * Return an array of polygons clipped to the extent, one for each cell in the diagram. - * Each polygon is represented as an array of points [x, y] where x and y are the point coordinates, - * and a data field that refers to the corresponding element in data. - * Polygons are open: they do not contain a closing point that duplicates the first point; - * a triangle, for example, is an array of three points. Polygons are also counterclockwise, - * assuming the origin ⟨0,0⟩ is in the top-left corner. - * - * If the cell’s site is coincident with an earlier site, the associated polygon is null. - */ - polygons(): Array<VoronoiPolygon<T>>; - - /** - * Returns the Delaunay triangulation of the specified data array as an array of triangles. - * Each triangle is a three-element array of elements from data. - * Since the triangulation is computed as the dual of the Voronoi diagram, and the Voronoi diagram is clipped by the extent, - * a subset of the Delaunay triangulation is returned. - */ - triangles(): Array<VoronoiTriangle<T>>; - - /** - * Returns the Delaunay triangulation of the specified data array as an array of links, one for each edge in the mesh. - * Each link has the following attributes: - * - source (the source node, an element in data) - * - target (the target node, an element in data) - * - * Since the triangulation is computed as the dual of the Voronoi diagram, and the Voronoi diagram is clipped by the extent, a subset of the Delaunay links is returned. - */ - links(): Array<VoronoiLink<T>>; - - /** - * Return the nearest Voronoi Site to point [x, y]. If radius is specified, only sites within radius distance are considered. - * If no Voronoi Site can be found (within the specified radius), null is returned. - * - * @param x x-coordinate - * @param y y-coordinate - * @param radius Optional parameter for search radius around [x, y] - */ - find(x: number, y: number, radius?: number): VoronoiSite<T> | null; -} - -// -------------------------------------------------------------------------- -// voronoi Export -// -------------------------------------------------------------------------- - -/** - * Creates a new Voronoi layout with default x- and y- accessors and a null extent. - * x- and y-accessors may have to be set to correspond to the data type provided by the - * generic. - * - * The generic refers to the type of the data for the corresponding element. - * Without specifying a generic the layout is assumed to be based on data represented - * by a two-dimensional coordinate `[number, number]` for x- and y-coordinate, respectively. - */ -export function voronoi<T = [number, number]>(): VoronoiLayout<T>; diff --git a/node_modules/@types/d3-voronoi/package.json b/node_modules/@types/d3-voronoi/package.json deleted file mode 100644 index c8d8fa7f24048057457f4b6d148678fa9ccf2244..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-voronoi/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "_from": "@types/d3-voronoi@*", - "_id": "@types/d3-voronoi@1.1.9", - "_inBundle": false, - "_integrity": "sha512-DExNQkaHd1F3dFPvGA/Aw2NGyjMln6E9QzsiqOcBgnE+VInYnFBHBBySbZQts6z6xD+5jTfKCP7M4OqMyVjdwQ==", - "_location": "/@types/d3-voronoi", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-voronoi@*", - "name": "@types/d3-voronoi", - "escapedName": "@types%2fd3-voronoi", - "scope": "@types", - "rawSpec": "*", - "saveSpec": null, - "fetchSpec": "*" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-voronoi/-/d3-voronoi-1.1.9.tgz", - "_shasum": "7bbc210818a3a5c5e0bafb051420df206617c9e5", - "_spec": "@types/d3-voronoi@*", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3-voronoi module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-voronoi", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git" - }, - "scripts": {}, - "typeScriptVersion": "2.3", - "types": "index", - "typesPublisherContentHash": "922c8d7f42da78233af875cd940e694867d700b7d08a59fb602524baf3e1ad09", - "version": "1.1.9" -} diff --git a/node_modules/@types/d3-zoom/LICENSE b/node_modules/@types/d3-zoom/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-zoom/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3-zoom/README.md b/node_modules/@types/d3-zoom/README.md deleted file mode 100644 index 5b83f017a3ed2808370f1e0762563fb8f77158b3..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-zoom/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3-zoom` - -# Summary -This package contains type definitions for d3JS d3-zoom module (https://github.com/d3/d3-zoom/). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3-zoom/v1. - -### Additional Details - * Last updated: Mon, 05 Oct 2020 21:03:47 GMT - * Dependencies: [@types/d3-interpolate](https://npmjs.com/package/@types/d3-interpolate), [@types/d3-selection](https://npmjs.com/package/@types/d3-selection) - * Global values: none - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3-zoom/index.d.ts b/node_modules/@types/d3-zoom/index.d.ts deleted file mode 100644 index 25aac292306c7839d4845be98c21c78eefb91135..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-zoom/index.d.ts +++ /dev/null @@ -1,593 +0,0 @@ -// Type definitions for d3JS d3-zoom module 1.8 -// Project: https://github.com/d3/d3-zoom/, https://d3js.org/d3-zoom -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 1.8.3 - -import { ArrayLike, Selection, TransitionLike, ValueFn } from 'd3-selection'; -import { ZoomView, ZoomInterpolator } from 'd3-interpolate'; - -// -------------------------------------------------------------------------- -// Shared Type Definitions and Interfaces -// -------------------------------------------------------------------------- - -/** - * ZoomedElementBaseType serves as an alias for the 'minimal' data type which can be selected - * without 'd3-zoom' (and related code in 'd3-selection') trying to use properties internally which would otherwise not - * be supported. - */ -export type ZoomedElementBaseType = Element; - -/** - * Minimal interface for a continuous scale. - * This interface is used as a minimum contract for scale objects - * that can be passed into zoomTransform methods rescaleX and rescaleY - */ -export interface ZoomScale { - domain(): number[] | Date[]; - domain(domain: Array<Date | number>): this; - range(): number[]; - range(range: number[]): this; - copy(): ZoomScale; - invert(value: number): number | Date; -} - -// -------------------------------------------------------------------------- -// Zoom Behavior -// -------------------------------------------------------------------------- - -/** - * A D3 Zoom Behavior - * - * The first generic refers to the type of reference element to which the zoom behavior is attached. - * The second generic refers to the type of the datum of the reference element. - */ -export interface ZoomBehavior<ZoomRefElement extends ZoomedElementBaseType, Datum> extends Function { - /** - * Applies this zoom behavior to the specified selection, binding the necessary event listeners to - * allow panning and zooming, and initializing the zoom transform on each selected element to the identity transform if not already defined. This function is typically not invoked directly, - * and is instead invoked via selection.call. - * - * For details see: {@link https://github.com/d3/d3-zoom#_zoom} - * - * @param selection A D3 selection of elements. - * @param args Optional arguments to be passed in. - */ - (selection: Selection<ZoomRefElement, Datum, any, any>, ...args: any[]): void; - /** - * If selection is a selection, sets the current zoom transform of the selected elements to the specified transform, instantaneously emitting start, zoom and end events. - * If selection is a transition, defines a “zoom†tween to the specified transform using d3.interpolateZoom, emitting a start event when the transition starts, - * zoom events for each tick of the transition, and then an end event when the transition ends (or is interrupted). - * The transition will attempt to minimize the visual movement around the specified point; if the point is not specified, it defaults to the center of the viewport extent. - * - * This function is typically not invoked directly, and is instead invoked via selection.call or transition.call. - * - * @param selection A selection or a transition. - * @param transform A zoom transform or a function that returns a zoom transform. - * If a function, it is invoked for each selected element, being passed the current datum d and index i, with the this context as the current DOM element. - * @param point A two-element array [x, y] or a function that returns such an array. - * If a function, it is invoked for each selected element, being passed the current datum d and index i, with the this context as the current DOM element. - */ - transform( - selection: Selection<ZoomRefElement, Datum, any, any> | TransitionLike<ZoomRefElement, Datum>, - transform: ZoomTransform | ValueFn<ZoomRefElement, Datum, ZoomTransform>, - point?: [number, number] | ValueFn<ZoomRefElement, Datum, [number, number]> - ): void; - - /** - * If selection is a selection, translates the current zoom transform of the selected elements by x and y, such that the new tx1 = tx0 + kx and ty1 = ty0 + ky. - * If selection is a transition, defines a “zoom†tween translating the current transform. - * This method is a convenience method for zoom.transform. - * - * @param selection A selection or a transition. - * @param x A number or a function that returns a number. - * If a function, it is invoked for each selected element, being passed the current datum d and index i, with the this context as the current DOM element. - * @param y A number or a function that returns a number. - * If a function, it is invoked for each selected element, being passed the current datum d and index i, with the this context as the current DOM element. - */ - translateBy( - selection: Selection<ZoomRefElement, Datum, any, any> | TransitionLike<ZoomRefElement, Datum>, - x: number | ValueFn<ZoomRefElement, Datum, number>, - y: number | ValueFn<ZoomRefElement, Datum, number> - ): void; - - /** - * If selection is a selection, translates the current zoom transform of the selected elements such that the given position ⟨x,y⟩ appears at given point p. - * The new tx = px - kx and ty = py - ky. If p is not specified, it defaults to the center of the viewport extent. - * If selection is a transition, defines a “zoom†tween translating the current transform. This method is a convenience method for zoom.transform. - * - * Translates the current zoom transform of the selected elements such that the specified position ⟨x,y⟩ appears at the center of the viewport extent. - * The new tx = cx - kx and ty = cy - ky, where ⟨cx,cy⟩ is the center. - * - * x is provided as a constant for all elements. - * y is provided as a constant for all elements. - * - * @param selection A selection or a transition. - * @param x A number or a function that returns a number. - * If a function, it is invoked for each selected element, being passed the current datum d and index i, with the this context as the current DOM element. - * @param y A number or a function that returns a number. - * If a function, it is invoked for each selected element, being passed the current datum d and index i, with the this context as the current DOM element. - * @param p A two-element array [px,py] or a function - * If a function, it is invoked for each selected element, being passed the current datum d and index i, with the this context as the current DOM element. - */ - translateTo( - selection: Selection<ZoomRefElement, Datum, any, any> | TransitionLike<ZoomRefElement, Datum>, - x: number | ValueFn<ZoomRefElement, Datum, number>, - y: number | ValueFn<ZoomRefElement, Datum, number>, - p?: [number, number] | ValueFn<ZoomRefElement, Datum, [number, number]> - ): void; - - /** - * If selection is a selection, scales the current zoom transform of the selected elements by k, such that the new kâ‚ = kâ‚€k. - * The reference point p does move. - * If p is not specified, it defaults to the center of the viewport extent. - * If selection is a transition, defines a “zoom†tween translating the current transform. - * This method is a convenience method for zoom.transform. - * - * @param selection A selection or a transition. - * @param k Scale factor. A number or a function that returns a number. - * If a function, it is invoked for each selected element, being passed the current datum d and index i, with the this context as the current DOM element. - * @param p A two-element array [px,py] or a function. - * If a function, it is invoked for each selected element, being passed the current datum d and index i, with the this context as the current DOM element. - */ - scaleBy( - selection: Selection<ZoomRefElement, Datum, any, any> | TransitionLike<ZoomRefElement, Datum>, - k: number | ValueFn<ZoomRefElement, Datum, number>, - p?: [number, number] | ValueFn<ZoomRefElement, Datum, [number, number]> - ): void; - - /** - * If selection is a selection, scales the current zoom transform of the selected elements to k, such that the new kâ‚ = k. - * The reference point p does move. - * If p is not specified, it defaults to the center of the viewport extent. - * If selection is a transition, defines a “zoom†tween translating the current transform. - * This method is a convenience method for zoom.transform. - * - * @param selection: A selection or a transition. - * @param k Scale factor. A number or a function that returns a number. - * If a function, it is invoked for each selected element, being passed the current datum d and index i, with the this context as the current DOM element. - * @param p A two-element array [px,py] or a function. - * If a function, it is invoked for each selected element, being passed the current datum d and index i, with the this context as the current DOM element. - */ - scaleTo( - selection: Selection<ZoomRefElement, Datum, any, any> | TransitionLike<ZoomRefElement, Datum>, - k: number | ValueFn<ZoomRefElement, Datum, number>, - p?: [number, number] - ): void; - - /** - * Returns the current constraint function. - * The default implementation attempts to ensure that the viewport extent does not go outside the translate extent. - */ - constrain(): (transform: ZoomTransform, extent: [[number, number], [number, number]], translateExtent: [[number, number], [number, number]]) => ZoomTransform; - /** - * Sets the transform constraint function to the specified function and returns the zoom behavior. - * - * @param constraint A constraint function which returns a transform given the current transform, viewport extent and translate extent. - * The default implementation attempts to ensure that the viewport extent does not go outside the translate extent. - */ - constrain(constraint: ((transform: ZoomTransform, extent: [[number, number], [number, number]], translateExtent: [[number, number], [number, number]]) => ZoomTransform)): this; - - /** - * Returns the current filter function. - */ - filter(): ValueFn<ZoomRefElement, Datum, boolean>; - /** - * Sets the filter to the specified filter function and returns the zoom behavior. - * The filter function is invoked in the zoom initiating event handlers of each element to which the zoom behavior was applied. - * - * If the filter returns falsey, the initiating event is ignored and no zoom gesture is started. - * Thus, the filter determines which input events are ignored. The default filter ignores mousedown events on secondary buttons, - * since those buttons are typically intended for other purposes, such as the context menu. - * - * @param filterFn A filter function which is invoked in the zoom initiating event handlers of each element to which the zoom behavior was applied, - * in order, being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element. The function returns a boolean value. - */ - filter(filterFn: ValueFn<ZoomRefElement, Datum, boolean>): this; - - /** - * Returns the current touch support detector, which defaults to a function returning true, - * if the "ontouchstart" event is supported on the current element. - */ - touchable(): ValueFn<ZoomRefElement, Datum, boolean>; - /** - * Sets the touch support detector to the specified boolean value and returns the zoom behavior. - * - * Touch event listeners are only registered if the detector returns truthy for the corresponding element when the zoom behavior is applied. - * The default detector works well for most browsers that are capable of touch input, but not all; Chrome’s mobile device emulator, for example, - * fails detection. - * - * @param touchable A boolean value. true when touch event listeners should be applied to the corresponding element, otherwise false. - */ - touchable(touchable: boolean): this; - /** - * Sets the touch support detector to the specified function and returns the zoom behavior. - * - * Touch event listeners are only registered if the detector returns truthy for the corresponding element when the zoom behavior is applied. - * The default detector works well for most browsers that are capable of touch input, but not all; Chrome’s mobile device emulator, for example, - * fails detection. - * - * @param touchable A touch support detector function, which returns true when touch event listeners should be applied to the corresponding element. - * The function is evaluated for each selected element to which the zoom behavior was applied, in order, being passed the current datum (d), - * the current index (i), and the current group (nodes), with this as the current DOM element. The function returns a boolean value. - */ - touchable(touchable: ValueFn<ZoomRefElement, Datum, boolean>): this; - - /** - * Returns the current wheelDelta function. - */ - wheelDelta(): ValueFn<ZoomRefElement, Datum, number>; - /** - * Sets the wheel delta function to the specified function and returns the zoom behavior. The wheel delta function which is invoked in the wheel event handler - * of each element to which the zoom behavior was applied. - * The value Δ returned by the wheel delta function determines the amount of scaling applied in response to a WheelEvent. - * The scale factor transform.k is multiplied by 2Δ; for example, a Δ of +1 doubles the scale factor, Δ of -1 halves the scale factor. - * - * @param delta Wheel delta function which is invoked in the wheel event handler of each element to which the zoom behavior was applied, - * in order, being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element. The function returns a numeric value. - */ - wheelDelta(delta: ValueFn<ZoomRefElement, Datum, number>): this; - - /** - * Return the current extent accessor, which defaults to [[0, 0], [width, height]] where width is the client width of the element and height is its client height; - * for SVG elements, the nearest ancestor SVG element’s width and height is used. In this case, - * the owner SVG element must have defined width and height attributes rather than (for example) relying on CSS properties or the viewBox attribute; - * SVG provides no programmatic method for retrieving the initial viewport size. Alternatively, consider using element.getBoundingClientRect. - * (In Firefox, element.clientWidth and element.clientHeight is zero for SVG elements!) - */ - extent(): ValueFn<ZoomRefElement, Datum, [[number, number], [number, number]]>; - /** - * Set the viewport extent to the specified array of points [[x0, y0], [x1, y1]], - * where [x0, y0] is the top-left corner of the viewport and [x1, y1] is the bottom-right corner of the viewport, - * and return this zoom behavior. - * - * The viewport extent affects several functions: the center of the viewport remains fixed during changes by zoom.scaleBy and zoom.scaleTo; - * the viewport center and dimensions affect the path chosen by d3.interpolateZoom; and the viewport extent is needed to enforce the optional translate extent. - * - * @param extent An extent specified as an array of two coordinates. - */ - extent(extent: [[number, number], [number, number]]): this; - /** - * Set the viewport extent to the array of points [[x0, y0], [x1, y1]] returned by the - * extent accessor function, and return this zoom behavior. - * The extent accessor function is evaluated for each element. - * - * [x0, y0] is the top-left corner of the viewport and [x1, y1] is the bottom-right corner of the viewport. - * - * The viewport extent affects several functions: the center of the viewport remains fixed during changes by zoom.scaleBy and zoom.scaleTo; - * the viewport center and dimensions affect the path chosen by d3.interpolateZoom; and the viewport extent is needed to enforce the optional translate extent. - * - * The default is [[0, 0], [width, height]] where width is the client width of the element and height is its client height; - * for SVG elements, the nearest ancestor SVG element’s width and height is used. - * In this case, the owner SVG element must have defined width and height attributes rather than (for example) relying on CSS properties or the viewBox attribute; - * SVG provides no programmatic method for retrieving the initial viewport size. Alternatively, consider using element.getBoundingClientRect. - * (In Firefox, element.clientWidth and element.clientHeight is zero for SVG elements!) - * - * @extent An extent accessor function which is evaluated for each selected element, - * in order, being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element.The function returns the extent array. - */ - extent(extent: ValueFn<ZoomRefElement, Datum, [[number, number], [number, number]]>): this; - - /** - * Return the current scale extent. - */ - scaleExtent(): [number, number]; - /** - * Set the scale extent to the specified array of numbers [k0, k1] where k0 is the minimum allowed scale factor and k1 is the maximum allowed scale factor, - * and return this zoom behavior. - * - * The scale extent restricts zooming in and out. It is enforced on interaction and when using zoom.scaleBy, zoom.scaleTo and zoom.translateBy; - * however, it is not enforced when using zoom.transform to set the transform explicitly. - * - * The default scale extent is [0, infinity]. - * - * If the user tries to zoom by wheeling when already at the corresponding limit of the scale extent, the wheel events will be ignored and not initiate a zoom gesture. - * This allows the user to scroll down past a zoomable area after zooming in, or to scroll up after zooming out. - * If you would prefer to always prevent scrolling on wheel input regardless of the scale extent, register a wheel event listener to prevent the browser default behavior - * - * @param extent A scale extent array of two numbers representing the scale boundaries. - */ - scaleExtent(extent: [number, number]): this; - - /** - * Return the current translate extent. - */ - translateExtent(): [[number, number], [number, number]]; - /** - * Set the translate extent to the specified array of points [[x0, y0], [x1, y1]], where [x0, y0] is the top-left corner of the world and [x1, y1] - * is the bottom-right corner of the world, and return this zoom behavior. - * - * The translate extent restricts panning, and may cause translation on zoom out. It is enforced on interaction and when using zoom.scaleBy, zoom.scaleTo and zoom.translateBy; - * however, it is not enforced when using zoom.transform to set the transform explicitly. - * - * The default scale extent is [[-infinity, infinity], [-infinity, infinity]]. - * - * @param extent A translate extent array, i.e. an array of two arrays, each representing a point. - */ - translateExtent(extent: [[number, number], [number, number]]): this; - - /** - * Return the current click distance threshold, which defaults to zero. - */ - clickDistance(): number; - /** - * Set the maximum distance that the mouse can move between mousedown and mouseup that will trigger - * a subsequent click event. If at any point between mousedown and mouseup the mouse is greater than or equal to - * distance from its position on mousedown, the click event following mouseup will be suppressed. - * - * @param distance The distance threshold between mousedown and mouseup measured in client coordinates (event.clientX and event.clientY). - * The default is zero. - */ - clickDistance(distance: number): this; - - /** - * Get the duration for zoom transitions on double-click and double-tap in milliseconds. - */ - duration(): number; - /** - * Set the duration for zoom transitions on double-click and double-tap to the specified number of milliseconds and returns the zoom behavior. - * - * To disable double-click and double-tap transitions, you can remove the zoom behavior’s dblclick event listener after applying the zoom behavior to the selection. - * - * @param Duration in milliseconds. - */ - duration(duration: number): this; - - /** - * Returns the current interpolation factory, which defaults to d3.interpolateZoom to implement smooth zooming. - */ - interpolate<InterpolationFactory extends (a: ZoomView, b: ZoomView) => ((t: number) => ZoomView)>(): InterpolationFactory; - - /** - * Sets the interpolation factory for zoom transitions to the specified function. - * Use the default d3.interpolateZoom to implement smooth zooming. - * To apply direct interpolation between two views, try d3.interpolate instead. - * - * Each view is defined as an array of three numbers: cx, cy and width. The first two coordinates cx, cy represent the center of the viewport; - * the last coordinate width represents the size of the viewport. - * - * @param interpolatorFactory An interpolator factory to be used to generate interpolators between zooms for transitions. - */ - interpolate(interpolatorFactory: (a: ZoomView, b: ZoomView) => ((t: number) => ZoomView)): this; - - /** - * Return the first currently-assigned listener matching the specified typenames, if any. - * - * @param typenames The typenames is a string containing one or more typename separated by whitespace. - * Each typename is a type, optionally followed by a period (.) and a name, such as "drag.foo"" and "drag.bar"; - * the name allows multiple listeners to be registered for the same type. The type must be one of the following: - * start (after zooming begins [such as mousedown]), zoom (after a change to the zoom transform [such as mousemove], or - * end (after an active pointer becomes inactive [such as on mouseup].) - */ - on(typenames: string): ValueFn<ZoomRefElement, Datum, void> | undefined; - /** - * Remove the current event listeners for the specified typenames, if any, return the drag behavior. - * - * @param typenames The typenames is a string containing one or more typename separated by whitespace. - * Each typename is a type, optionally followed by a period (.) and a name, such as "drag.foo"" and "drag.bar"; - * the name allows multiple listeners to be registered for the same type. The type must be one of the following: - * start (after zooming begins [such as mousedown]), zoom (after a change to the zoom transform [such as mousemove], or - * end (after an active pointer becomes inactive [such as on mouseup].) - * @param listener Use null to remove the listener. - */ - on(typenames: string, listener: null): this; - /** - * Set the event listener for the specified typenames and return the zoom behavior. - * If an event listener was already registered for the same type and name, - * the existing listener is removed before the new listener is added. - * When a specified event is dispatched, each listener will be invoked with the same context and arguments as selection.on listeners. - * - * - * @param typenames The typenames is a string containing one or more typename separated by whitespace. - * Each typename is a type, optionally followed by a period (.) and a name, such as "drag.foo"" and "drag.bar"; - * the name allows multiple listeners to be registered for the same type. The type must be one of the following: - * start (after zooming begins [such as mousedown]), zoom (after a change to the zoom transform [such as mousemove], or - * end (after an active pointer becomes inactive [such as on mouseup].) - * @param listener An event listener function which is evaluated for each selected element, - * in order, being passed the current datum (d), the current index (i), and the current group (nodes), - * with this as the current DOM element. - */ - on(typenames: string, listener: ValueFn<ZoomRefElement, Datum, void>): this; -} - -/** - * Creates a new zoom behavior. The returned behavior, zoom, is both an object and a function, - * and is typically applied to selected elements via selection.call. - * - * The first generic refers to the type of reference element to which the zoom behavior is attached. - * The second generic refers to the type of the datum of the reference element. - */ -export function zoom<ZoomRefElement extends ZoomedElementBaseType, Datum>(): ZoomBehavior<ZoomRefElement, Datum>; - -// -------------------------------------------------------------------------- -// Zoom Event -// -------------------------------------------------------------------------- - -/** - * A D3 Zoom Event - * - * The first generic refers to the type of reference element to which the zoom behavior is attached. - * The second generic refers to the type of the datum of the reference element. - */ -export interface D3ZoomEvent<ZoomRefElement extends ZoomedElementBaseType, Datum> { - /** - * The ZoomBehavior associated with the event - */ - target: ZoomBehavior<ZoomRefElement, Datum>; - /** - * The event type for the zoom event - */ - type: 'start' | 'zoom' | 'end' | string; // Leave failsafe string type for cases like 'zoom.foo' - /** - * The current zoom transform - */ - transform: ZoomTransform; - /** - * The underlying input event, such as mousemove or touchmove. - */ - sourceEvent: any; -} - -// -------------------------------------------------------------------------- -// Zoom Transforms -// -------------------------------------------------------------------------- - -/** - * A zoom transform - * - * The zoom behavior stores the zoom state on the element to which the zoom behavior was applied, not on the zoom behavior itself. - * This is because the zoom behavior can be applied to many elements simultaneously, and each element can be zoomed independently. - * The zoom state can change either on user interaction or programmatically via zoom.transform. - * - * To retrieve the zoom state, use event.transform on the current zoom event within a zoom event listener (see zoom.on), or use d3.zoomTransform for a given node. - * The latter is particularly useful for modifying the zoom state programmatically, - * say to implement buttons for zooming in and out. - * - * For details see {@link https://github.com/d3/d3-zoom#zoom-transforms} - */ -export interface ZoomTransform { - /** - * The translation amount tx along the x-axis. - * This property should be considered read-only; instead of mutating a transform, - * use transform.scale and transform.translate to derive a new transform. - * Also see zoom.scaleBy, zoom.scaleTo and zoom.translateBy for convenience methods on the zoom behavior. - */ - readonly x: number; - - /** - * The translation amount ty along the y-axis - * This property should be considered read-only; instead of mutating a transform, - * use transform.scale and transform.translate to derive a new transform. - * Also see zoom.scaleBy, zoom.scaleTo and zoom.translateBy for convenience methods on the zoom behavior. - */ - readonly y: number; - - /** - * The scale factor k. - * This property should be considered read-only; instead of mutating a transform, - * use transform.scale and transform.translate to derive a new transform. - * Also see zoom.scaleBy, zoom.scaleTo and zoom.translateBy for convenience methods on the zoom behavior. - */ - readonly k: number; - - /** - * Return the transformation of the specified point which is a two-element array of numbers [x, y]. - * The returned point is equal to [xk + tx, yk + ty]. - * - * @param point Point coordinates [x, y] - */ - apply(point: [number, number]): [number, number]; - - /** - * Return the transformation of the specified x-coordinate, xk + tx. - * - * @param x Value of x-coordinate. - */ - applyX(x: number): number; - - /** - * Return the transformation of the specified y-coordinate, yk + ty. - * - * @param y Value of y-coordinate. - */ - applyY(y: number): number; - - /** - * Return the inverse transformation of the specified point which is a two-element array of numbers [x, y]. - * The returned point is equal to [(x - tx) / k, (y - ty) / k]. - * - * @param point Point coordinates [x, y] - */ - invert(point: [number, number]): [number, number]; - - /** - * Return the inverse transformation of the specified x-coordinate, (x - tx) / k. - * - * @param x Value of x-coordinate. - */ - invertX(x: number): number; - - /** - * Return the inverse transformation of the specified y-coordinate, (y - ty) / k. - * - * @param y Value of y-coordinate. - */ - invertY(y: number): number; - - /** - * Returns a copy of the continuous scale x whose domain is transformed. - * This is implemented by first applying the inverse x-transform on the scale’s range, - * and then applying the inverse scale to compute the corresponding domain - * - * The scale x must use d3.interpolateNumber; do not use continuous.rangeRound as this - * reduces the accuracy of continuous.invert and can lead to an inaccurate rescaled domain. - * This method does not modify the input scale x; x thus represents the untransformed scale, - * while the returned scale represents its transformed view. - * - * @param xScale A continuous scale for x-dimension. - */ - rescaleX<S extends ZoomScale>(xScale: S): S; - - /** - * Returns a copy of the continuous scale y whose domain is transformed. - * This is implemented by first applying the inverse y-transform on the scale’s range, - * and then applying the inverse scale to compute the corresponding domain - * - * The scale y must use d3.interpolateNumber; do not use continuous.rangeRound as this - * reduces the accuracy of continuous.invert and can lead to an inaccurate rescaled domain. - * This method does not modify the input scale x; x thus represents the untransformed scale, - * while the returned scale represents its transformed view. - * - * @param yScale A continuous scale for y-dimension. - */ - rescaleY<S extends ZoomScale>(yScale: S): S; - - /** - * Return a transform whose scale k1 is equal to k0 × k, where k0 is this transform’s scale. - * - * @param k A scale factor. - */ - scale(k: number): ZoomTransform; - - /** - * Return a string representing the SVG transform corresponding to this transform. - */ - toString(): string; - - /** - * Return a transform whose translation tx1 and ty1 is equal to tx0 + x and ty0 + y, - * where tx0 and ty0 is this transform’s translation. - * - * @param x Amount of translation in x-direction. - * @param y Amount of translation in y-direction. - */ - translate(x: number, y: number): ZoomTransform; -} - -/** - * Returns the current transform for the specified node. Note that node should typically be a DOM element, and not a selection. - * (A selection may consist of multiple nodes, in different states, and this function only returns a single transform.) If you have a selection, call selection.node first. - * In the context of an event listener, the node is typically the element that received the input event (which should be equal to event.transform), "this". - * Internally, an element’s transform is stored as element.__zoom; however, you should use this method rather than accessing it directly. - * If the given node has no defined transform, returns the identity transformation. - * The returned transform represents a two-dimensional transformation matrix - * - * For details see {@link https://github.com/d3/d3-zoom#zoom-transforms} - * - * @param node An element for which to retrieve its current zoom transform. - */ -export function zoomTransform(node: ZoomedElementBaseType): ZoomTransform; - -/** - * The identity transform, where k = 1, tx = ty = 0. - */ -export const zoomIdentity: ZoomTransform; diff --git a/node_modules/@types/d3-zoom/package.json b/node_modules/@types/d3-zoom/package.json deleted file mode 100644 index bf23bf5ec26340445f93fe93a5153fd8a3eeca0c..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3-zoom/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_from": "@types/d3-zoom@^1", - "_id": "@types/d3-zoom@1.8.2", - "_inBundle": false, - "_integrity": "sha512-rU0LirorUxkLxEHSzkFs7pPC0KWsxRGc0sHrxEDR0/iQq+7/xpNkKuuOOwthlgvOtpOvtTLJ2JFOD6Kr0Si4Uw==", - "_location": "/@types/d3-zoom", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/d3-zoom@^1", - "name": "@types/d3-zoom", - "escapedName": "@types%2fd3-zoom", - "scope": "@types", - "rawSpec": "^1", - "saveSpec": null, - "fetchSpec": "^1" - }, - "_requiredBy": [ - "/@types/d3" - ], - "_resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-1.8.2.tgz", - "_shasum": "187d33f9ffa59811ce93b2eacd32d92c1ef03f16", - "_spec": "@types/d3-zoom@^1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": { - "@types/d3-interpolate": "^1", - "@types/d3-selection": "^1" - }, - "deprecated": false, - "description": "TypeScript definitions for d3JS d3-zoom module", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3-zoom", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3-zoom" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "d0ef956eec9446a4ce34ed108454d87e1da813cc340af38eea8536821de7901b", - "version": "1.8.2" -} diff --git a/node_modules/@types/d3/LICENSE b/node_modules/@types/d3/LICENSE deleted file mode 100644 index 9e841e7a26e4eb057b24511e7b92d42b257a80e5..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/d3/README.md b/node_modules/@types/d3/README.md deleted file mode 100644 index 400fe7c48675b603e2a2794fef1564c45deb70b1..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/d3` - -# Summary -This package contains type definitions for D3JS d3 standard bundle (https://github.com/d3/d3). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/d3. - -### Additional Details - * Last updated: Mon, 05 Oct 2020 21:03:46 GMT - * Dependencies: [@types/d3-array](https://npmjs.com/package/@types/d3-array), [@types/d3-axis](https://npmjs.com/package/@types/d3-axis), [@types/d3-brush](https://npmjs.com/package/@types/d3-brush), [@types/d3-chord](https://npmjs.com/package/@types/d3-chord), [@types/d3-color](https://npmjs.com/package/@types/d3-color), [@types/d3-contour](https://npmjs.com/package/@types/d3-contour), [@types/d3-dispatch](https://npmjs.com/package/@types/d3-dispatch), [@types/d3-drag](https://npmjs.com/package/@types/d3-drag), [@types/d3-dsv](https://npmjs.com/package/@types/d3-dsv), [@types/d3-ease](https://npmjs.com/package/@types/d3-ease), [@types/d3-fetch](https://npmjs.com/package/@types/d3-fetch), [@types/d3-force](https://npmjs.com/package/@types/d3-force), [@types/d3-format](https://npmjs.com/package/@types/d3-format), [@types/d3-geo](https://npmjs.com/package/@types/d3-geo), [@types/d3-hierarchy](https://npmjs.com/package/@types/d3-hierarchy), [@types/d3-interpolate](https://npmjs.com/package/@types/d3-interpolate), [@types/d3-path](https://npmjs.com/package/@types/d3-path), [@types/d3-polygon](https://npmjs.com/package/@types/d3-polygon), [@types/d3-quadtree](https://npmjs.com/package/@types/d3-quadtree), [@types/d3-random](https://npmjs.com/package/@types/d3-random), [@types/d3-scale](https://npmjs.com/package/@types/d3-scale), [@types/d3-scale-chromatic](https://npmjs.com/package/@types/d3-scale-chromatic), [@types/d3-selection](https://npmjs.com/package/@types/d3-selection), [@types/d3-shape](https://npmjs.com/package/@types/d3-shape), [@types/d3-time](https://npmjs.com/package/@types/d3-time), [@types/d3-time-format](https://npmjs.com/package/@types/d3-time-format), [@types/d3-timer](https://npmjs.com/package/@types/d3-timer), [@types/d3-transition](https://npmjs.com/package/@types/d3-transition), [@types/d3-zoom](https://npmjs.com/package/@types/d3-zoom), [@types/d3-collection](https://npmjs.com/package/@types/d3-collection), [@types/d3-voronoi](https://npmjs.com/package/@types/d3-voronoi) - * Global values: `d3` - -# Credits -These definitions were written by [Tom Wanzek](https://github.com/tomwanzek), [Alex Ford](https://github.com/gustavderdrache), [Boris Yankov](https://github.com/borisyankov), [denisname](https://github.com/denisname), and [Nathan Bierema](https://github.com/Methuselah96). diff --git a/node_modules/@types/d3/index.d.ts b/node_modules/@types/d3/index.d.ts deleted file mode 100644 index da4f4a819f3a9b4f00ed15e1f5aa90d9a82a8cda..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3/index.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -// Type definitions for D3JS d3 standard bundle 5.16 -// Project: https://github.com/d3/d3, https://d3js.org -// Definitions by: Tom Wanzek <https://github.com/tomwanzek> -// Alex Ford <https://github.com/gustavderdrache> -// Boris Yankov <https://github.com/borisyankov> -// denisname <https://github.com/denisname> -// Nathan Bierema <https://github.com/Methuselah96> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Last module patch version validated against: 5.16.0 - -// NOTE TO MAINTAINERS: Review D3 v4.x module dependencies (see v4 sub-folder) and update its path-mappings in tsconfig (v4 folder), -// if new MAJOR version of D3 v4 modules are released!!! - -export as namespace d3; - -/** - * Version number in format _Major.Minor.BugFix_, like 5.0.0. - */ -export const version: string; - -export * from 'd3-array'; -export * from 'd3-axis'; -export * from 'd3-brush'; -export * from 'd3-chord'; -export * from 'd3-collection'; -export * from 'd3-color'; -export * from 'd3-contour'; -export * from 'd3-dispatch'; -export * from 'd3-drag'; -export * from 'd3-dsv'; -export * from 'd3-ease'; -export * from 'd3-fetch'; -export * from 'd3-force'; -export * from 'd3-format'; -export * from 'd3-geo'; -export * from 'd3-hierarchy'; -export * from 'd3-interpolate'; -export * from 'd3-path'; -export * from 'd3-polygon'; -export * from 'd3-quadtree'; -export * from 'd3-random'; -export * from 'd3-scale'; -export * from 'd3-scale-chromatic'; -export * from 'd3-selection'; -export * from 'd3-shape'; -export * from 'd3-time'; -export * from 'd3-time-format'; -export * from 'd3-timer'; -export * from 'd3-transition'; -export * from 'd3-voronoi'; -export * from 'd3-zoom'; diff --git a/node_modules/@types/d3/package.json b/node_modules/@types/d3/package.json deleted file mode 100644 index 4499aa6f9bab1080f5fb83260bfad182fb1a1b3e..0000000000000000000000000000000000000000 --- a/node_modules/@types/d3/package.json +++ /dev/null @@ -1,102 +0,0 @@ -{ - "_from": "@types/d3", - "_id": "@types/d3@5.16.3", - "_inBundle": false, - "_integrity": "sha512-s3wrhYhu25XZQ5p1hI9gEMSX5bx7lg9hAmi0+i5r3v75Gz1zRTgB2Q0psx+SO+4K0AO/PPJ1pnHCz64pANN/4w==", - "_location": "/@types/d3", - "_phantomChildren": {}, - "_requested": { - "type": "tag", - "registry": true, - "raw": "@types/d3", - "name": "@types/d3", - "escapedName": "@types%2fd3", - "scope": "@types", - "rawSpec": "", - "saveSpec": null, - "fetchSpec": "latest" - }, - "_requiredBy": [ - "#DEV:/", - "#USER" - ], - "_resolved": "https://registry.npmjs.org/@types/d3/-/d3-5.16.3.tgz", - "_shasum": "265d506a1b61f558084f2c660f8dd2c93a6d16c8", - "_spec": "@types/d3", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/AngularApp", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Tom Wanzek", - "url": "https://github.com/tomwanzek" - }, - { - "name": "Alex Ford", - "url": "https://github.com/gustavderdrache" - }, - { - "name": "Boris Yankov", - "url": "https://github.com/borisyankov" - }, - { - "name": "denisname", - "url": "https://github.com/denisname" - }, - { - "name": "Nathan Bierema", - "url": "https://github.com/Methuselah96" - } - ], - "dependencies": { - "@types/d3-array": "^1", - "@types/d3-axis": "^1", - "@types/d3-brush": "^1", - "@types/d3-chord": "^1", - "@types/d3-collection": "*", - "@types/d3-color": "^1", - "@types/d3-contour": "^1", - "@types/d3-dispatch": "^1", - "@types/d3-drag": "^1", - "@types/d3-dsv": "^1", - "@types/d3-ease": "^1", - "@types/d3-fetch": "^1", - "@types/d3-force": "^1", - "@types/d3-format": "^1", - "@types/d3-geo": "^1", - "@types/d3-hierarchy": "^1", - "@types/d3-interpolate": "^1", - "@types/d3-path": "^1", - "@types/d3-polygon": "^1", - "@types/d3-quadtree": "^1", - "@types/d3-random": "^1", - "@types/d3-scale": "^2", - "@types/d3-scale-chromatic": "^1", - "@types/d3-selection": "^1", - "@types/d3-shape": "^1", - "@types/d3-time": "^1", - "@types/d3-time-format": "^2", - "@types/d3-timer": "^1", - "@types/d3-transition": "^1", - "@types/d3-voronoi": "*", - "@types/d3-zoom": "^1" - }, - "deprecated": false, - "description": "TypeScript definitions for D3JS d3 standard bundle", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/d3", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/d3" - }, - "scripts": {}, - "typeScriptVersion": "3.2", - "types": "index.d.ts", - "typesPublisherContentHash": "175263bbe439ab9516bba321963a9b18a18e345bd1b9ef34e55a6f9bf7709a54", - "version": "5.16.3" -} diff --git a/node_modules/@types/geojson/LICENSE b/node_modules/@types/geojson/LICENSE deleted file mode 100644 index 4b1ad51b2f0efc36f38aa3349a9f30fbd9217547..0000000000000000000000000000000000000000 --- a/node_modules/@types/geojson/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ - MIT License - - Copyright (c) Microsoft Corporation. All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in all - copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - SOFTWARE diff --git a/node_modules/@types/geojson/README.md b/node_modules/@types/geojson/README.md deleted file mode 100644 index b2f2b545b85d802494d371f5a9317656393514e1..0000000000000000000000000000000000000000 --- a/node_modules/@types/geojson/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# Installation -> `npm install --save @types/geojson` - -# Summary -This package contains type definitions for geojson ( https://geojson.org/ ). - -# Details -Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/geojson - -Additional Details - * Last updated: Tue, 19 Mar 2019 22:35:26 GMT - * Dependencies: none - * Global values: GeoJSON - -# Credits -These definitions were written by Jacob Bruun <https://github.com/cobster>, Arne Schubert <https://github.com/atd-schubert>, Jeff Jacobson <https://github.com/JeffJacobson>, Ilia Choly <https://github.com/icholy>, Dan Vanderkam <https://github.com/danvk>. diff --git a/node_modules/@types/geojson/index.d.ts b/node_modules/@types/geojson/index.d.ts deleted file mode 100644 index 3a486b66b19a4dd9d45fe44b8c14eff52e003548..0000000000000000000000000000000000000000 --- a/node_modules/@types/geojson/index.d.ts +++ /dev/null @@ -1,175 +0,0 @@ -// Type definitions for non-npm package geojson 7946.0 -// Project: https://geojson.org/ -// Definitions by: Jacob Bruun <https://github.com/cobster> -// Arne Schubert <https://github.com/atd-schubert> -// Jeff Jacobson <https://github.com/JeffJacobson> -// Ilia Choly <https://github.com/icholy> -// Dan Vanderkam <https://github.com/danvk> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -// Note: as of the RFC 7946 version of GeoJSON, Coordinate Reference Systems -// are no longer supported. (See https://tools.ietf.org/html/rfc7946#appendix-B)} - -export as namespace GeoJSON; - -/** - * The valid values for the "type" property of GeoJSON geometry objects. - * https://tools.ietf.org/html/rfc7946#section-1.4 - */ -export type GeoJsonGeometryTypes = Geometry['type']; - -/** - * The value values for the "type" property of GeoJSON Objects. - * https://tools.ietf.org/html/rfc7946#section-1.4 - */ -export type GeoJsonTypes = GeoJSON['type']; - -/** - * Bounding box - * https://tools.ietf.org/html/rfc7946#section-5 - */ -export type BBox = [number, number, number, number] | [number, number, number, number, number, number]; - -/** - * A Position is an array of coordinates. - * https://tools.ietf.org/html/rfc7946#section-3.1.1 - * Array should contain between two and three elements. - * The previous GeoJSON specification allowed more elements (e.g., which could be used to represent M values), - * but the current specification only allows X, Y, and (optionally) Z to be defined. - */ -export type Position = number[]; // [number, number] | [number, number, number]; - -/** - * The base GeoJSON object. - * https://tools.ietf.org/html/rfc7946#section-3 - * The GeoJSON specification also allows foreign members - * (https://tools.ietf.org/html/rfc7946#section-6.1) - * Developers should use "&" type in TypeScript or extend the interface - * to add these foreign members. - */ -export interface GeoJsonObject { - // Don't include foreign members directly into this type def. - // in order to preserve type safety. - // [key: string]: any; - /** - * Specifies the type of GeoJSON object. - */ - type: GeoJsonTypes; - /** - * Bounding box of the coordinate range of the object's Geometries, Features, or Feature Collections. - * The value of the bbox member is an array of length 2*n where n is the number of dimensions - * represented in the contained geometries, with all axes of the most southwesterly point - * followed by all axes of the more northeasterly point. - * The axes order of a bbox follows the axes order of geometries. - * https://tools.ietf.org/html/rfc7946#section-5 - */ - bbox?: BBox; -} - -/** - * Union of GeoJSON objects. - */ -export type GeoJSON = Geometry | Feature | FeatureCollection; - -/** - * Geometry object. - * https://tools.ietf.org/html/rfc7946#section-3 - */ -export type Geometry = Point | MultiPoint | LineString | MultiLineString | Polygon | MultiPolygon | GeometryCollection; -export type GeometryObject = Geometry; - -/** - * Point geometry object. - * https://tools.ietf.org/html/rfc7946#section-3.1.2 - */ -export interface Point extends GeoJsonObject { - type: "Point"; - coordinates: Position; -} - -/** - * MultiPoint geometry object. - * https://tools.ietf.org/html/rfc7946#section-3.1.3 - */ -export interface MultiPoint extends GeoJsonObject { - type: "MultiPoint"; - coordinates: Position[]; -} - -/** - * LineString geometry object. - * https://tools.ietf.org/html/rfc7946#section-3.1.4 - */ -export interface LineString extends GeoJsonObject { - type: "LineString"; - coordinates: Position[]; -} - -/** - * MultiLineString geometry object. - * https://tools.ietf.org/html/rfc7946#section-3.1.5 - */ -export interface MultiLineString extends GeoJsonObject { - type: "MultiLineString"; - coordinates: Position[][]; -} - -/** - * Polygon geometry object. - * https://tools.ietf.org/html/rfc7946#section-3.1.6 - */ -export interface Polygon extends GeoJsonObject { - type: "Polygon"; - coordinates: Position[][]; -} - -/** - * MultiPolygon geometry object. - * https://tools.ietf.org/html/rfc7946#section-3.1.7 - */ -export interface MultiPolygon extends GeoJsonObject { - type: "MultiPolygon"; - coordinates: Position[][][]; -} - -/** - * Geometry Collection - * https://tools.ietf.org/html/rfc7946#section-3.1.8 - */ -export interface GeometryCollection extends GeoJsonObject { - type: "GeometryCollection"; - geometries: Geometry[]; -} - -export type GeoJsonProperties = { [name: string]: any; } | null; - -/** - * A feature object which contains a geometry and associated properties. - * https://tools.ietf.org/html/rfc7946#section-3.2 - */ -export interface Feature<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject { - type: "Feature"; - /** - * The feature's geometry - */ - geometry: G; - /** - * A value that uniquely identifies this feature in a - * https://tools.ietf.org/html/rfc7946#section-3.2. - */ - id?: string | number; - /** - * Properties associated with this feature. - */ - properties: P; -} - -/** - * A collection of feature objects. - * https://tools.ietf.org/html/rfc7946#section-3.3 - */ -export interface FeatureCollection<G extends Geometry | null = Geometry, P = GeoJsonProperties> extends GeoJsonObject { - type: "FeatureCollection"; - features: Array<Feature<G, P>>; -} diff --git a/node_modules/@types/geojson/package.json b/node_modules/@types/geojson/package.json deleted file mode 100644 index 62b34f4536201dcf48c1d49e518ceed268f23991..0000000000000000000000000000000000000000 --- a/node_modules/@types/geojson/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "@types/geojson@*", - "_id": "@types/geojson@7946.0.7", - "_inBundle": false, - "_integrity": "sha512-wE2v81i4C4Ol09RtsWFAqg3BUitWbHSpSlIo+bNdsCJijO9sjme+zm+73ZMCa/qMC8UEERxzGbvmr1cffo2SiQ==", - "_location": "/@types/geojson", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "@types/geojson@*", - "name": "@types/geojson", - "escapedName": "@types%2fgeojson", - "scope": "@types", - "rawSpec": "*", - "saveSpec": null, - "fetchSpec": "*" - }, - "_requiredBy": [ - "/@types/d3-contour", - "/@types/d3-geo" - ], - "_resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.7.tgz", - "_shasum": "c8fa532b60a0042219cdf173ca21a975ef0666ad", - "_spec": "@types/geojson@*", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/@types/d3-contour", - "bugs": { - "url": "https://github.com/DefinitelyTyped/DefinitelyTyped/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Jacob Bruun", - "url": "https://github.com/cobster" - }, - { - "name": "Arne Schubert", - "url": "https://github.com/atd-schubert" - }, - { - "name": "Jeff Jacobson", - "url": "https://github.com/JeffJacobson" - }, - { - "name": "Ilia Choly", - "url": "https://github.com/icholy" - }, - { - "name": "Dan Vanderkam", - "url": "https://github.com/danvk" - } - ], - "dependencies": {}, - "deprecated": false, - "description": "TypeScript definitions for geojson", - "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped#readme", - "license": "MIT", - "main": "", - "name": "@types/geojson", - "repository": { - "type": "git", - "url": "git+https://github.com/DefinitelyTyped/DefinitelyTyped.git", - "directory": "types/geojson" - }, - "scripts": {}, - "typeScriptVersion": "2.3", - "types": "index", - "typesPublisherContentHash": "895e4cacd8097634ae7626882a98e99fe9680f725f1bf08089b735c9fc97e830", - "version": "7946.0.7" -} diff --git a/node_modules/commander/CHANGELOG.md b/node_modules/commander/CHANGELOG.md deleted file mode 100644 index 7dce779da8bfec819e3e5eb3d74b72ae505b19c1..0000000000000000000000000000000000000000 --- a/node_modules/commander/CHANGELOG.md +++ /dev/null @@ -1,419 +0,0 @@ -2.20.3 / 2019-10-11 -================== - - * Support Node.js 0.10 (Revert #1059) - * Ran "npm unpublish commander@2.20.2". There is no 2.20.2. - -2.20.1 / 2019-09-29 -================== - - * Improve executable subcommand tracking - * Update dev dependencies - -2.20.0 / 2019-04-02 -================== - - * fix: resolve symbolic links completely when hunting for subcommands (#935) - * Update index.d.ts (#930) - * Update Readme.md (#924) - * Remove --save option as it isn't required anymore (#918) - * Add link to the license file (#900) - * Added example of receiving args from options (#858) - * Added missing semicolon (#882) - * Add extension to .eslintrc (#876) - -2.19.0 / 2018-10-02 -================== - - * Removed newline after Options and Commands headers (#864) - * Bugfix - Error output (#862) - * Fix to change default value to string (#856) - -2.18.0 / 2018-09-07 -================== - - * Standardize help output (#853) - * chmod 644 travis.yml (#851) - * add support for execute typescript subcommand via ts-node (#849) - -2.17.1 / 2018-08-07 -================== - - * Fix bug in command emit (#844) - -2.17.0 / 2018-08-03 -================== - - * fixed newline output after help information (#833) - * Fix to emit the action even without command (#778) - * npm update (#823) - -2.16.0 / 2018-06-29 -================== - - * Remove Makefile and `test/run` (#821) - * Make 'npm test' run on Windows (#820) - * Add badge to display install size (#807) - * chore: cache node_modules (#814) - * chore: remove Node.js 4 (EOL), add Node.js 10 (#813) - * fixed typo in readme (#812) - * Fix types (#804) - * Update eslint to resolve vulnerabilities in lodash (#799) - * updated readme with custom event listeners. (#791) - * fix tests (#794) - -2.15.0 / 2018-03-07 -================== - - * Update downloads badge to point to graph of downloads over time instead of duplicating link to npm - * Arguments description - -2.14.1 / 2018-02-07 -================== - - * Fix typing of help function - -2.14.0 / 2018-02-05 -================== - - * only register the option:version event once - * Fixes issue #727: Passing empty string for option on command is set to undefined - * enable eqeqeq rule - * resolves #754 add linter configuration to project - * resolves #560 respect custom name for version option - * document how to override the version flag - * document using options per command - -2.13.0 / 2018-01-09 -================== - - * Do not print default for --no- - * remove trailing spaces in command help - * Update CI's Node.js to LTS and latest version - * typedefs: Command and Option types added to commander namespace - -2.12.2 / 2017-11-28 -================== - - * fix: typings are not shipped - -2.12.1 / 2017-11-23 -================== - - * Move @types/node to dev dependency - -2.12.0 / 2017-11-22 -================== - - * add attributeName() method to Option objects - * Documentation updated for options with --no prefix - * typings: `outputHelp` takes a string as the first parameter - * typings: use overloads - * feat(typings): update to match js api - * Print default value in option help - * Fix translation error - * Fail when using same command and alias (#491) - * feat(typings): add help callback - * fix bug when description is add after command with options (#662) - * Format js code - * Rename History.md to CHANGELOG.md (#668) - * feat(typings): add typings to support TypeScript (#646) - * use current node - -2.11.0 / 2017-07-03 -================== - - * Fix help section order and padding (#652) - * feature: support for signals to subcommands (#632) - * Fixed #37, --help should not display first (#447) - * Fix translation errors. (#570) - * Add package-lock.json - * Remove engines - * Upgrade package version - * Prefix events to prevent conflicts between commands and options (#494) - * Removing dependency on graceful-readlink - * Support setting name in #name function and make it chainable - * Add .vscode directory to .gitignore (Visual Studio Code metadata) - * Updated link to ruby commander in readme files - -2.10.0 / 2017-06-19 -================== - - * Update .travis.yml. drop support for older node.js versions. - * Fix require arguments in README.md - * On SemVer you do not start from 0.0.1 - * Add missing semi colon in readme - * Add save param to npm install - * node v6 travis test - * Update Readme_zh-CN.md - * Allow literal '--' to be passed-through as an argument - * Test subcommand alias help - * link build badge to master branch - * Support the alias of Git style sub-command - * added keyword commander for better search result on npm - * Fix Sub-Subcommands - * test node.js stable - * Fixes TypeError when a command has an option called `--description` - * Update README.md to make it beginner friendly and elaborate on the difference between angled and square brackets. - * Add chinese Readme file - -2.9.0 / 2015-10-13 -================== - - * Add option `isDefault` to set default subcommand #415 @Qix- - * Add callback to allow filtering or post-processing of help text #434 @djulien - * Fix `undefined` text in help information close #414 #416 @zhiyelee - -2.8.1 / 2015-04-22 -================== - - * Back out `support multiline description` Close #396 #397 - -2.8.0 / 2015-04-07 -================== - - * Add `process.execArg` support, execution args like `--harmony` will be passed to sub-commands #387 @DigitalIO @zhiyelee - * Fix bug in Git-style sub-commands #372 @zhiyelee - * Allow commands to be hidden from help #383 @tonylukasavage - * When git-style sub-commands are in use, yet none are called, display help #382 @claylo - * Add ability to specify arguments syntax for top-level command #258 @rrthomas - * Support multiline descriptions #208 @zxqfox - -2.7.1 / 2015-03-11 -================== - - * Revert #347 (fix collisions when option and first arg have same name) which causes a bug in #367. - -2.7.0 / 2015-03-09 -================== - - * Fix git-style bug when installed globally. Close #335 #349 @zhiyelee - * Fix collisions when option and first arg have same name. Close #346 #347 @tonylukasavage - * Add support for camelCase on `opts()`. Close #353 @nkzawa - * Add node.js 0.12 and io.js to travis.yml - * Allow RegEx options. #337 @palanik - * Fixes exit code when sub-command failing. Close #260 #332 @pirelenito - * git-style `bin` files in $PATH make sense. Close #196 #327 @zhiyelee - -2.6.0 / 2014-12-30 -================== - - * added `Command#allowUnknownOption` method. Close #138 #318 @doozr @zhiyelee - * Add application description to the help msg. Close #112 @dalssoft - -2.5.1 / 2014-12-15 -================== - - * fixed two bugs incurred by variadic arguments. Close #291 @Quentin01 #302 @zhiyelee - -2.5.0 / 2014-10-24 -================== - - * add support for variadic arguments. Closes #277 @whitlockjc - -2.4.0 / 2014-10-17 -================== - - * fixed a bug on executing the coercion function of subcommands option. Closes #270 - * added `Command.prototype.name` to retrieve command name. Closes #264 #266 @tonylukasavage - * added `Command.prototype.opts` to retrieve all the options as a simple object of key-value pairs. Closes #262 @tonylukasavage - * fixed a bug on subcommand name. Closes #248 @jonathandelgado - * fixed function normalize doesn’t honor option terminator. Closes #216 @abbr - -2.3.0 / 2014-07-16 -================== - - * add command alias'. Closes PR #210 - * fix: Typos. Closes #99 - * fix: Unused fs module. Closes #217 - -2.2.0 / 2014-03-29 -================== - - * add passing of previous option value - * fix: support subcommands on windows. Closes #142 - * Now the defaultValue passed as the second argument of the coercion function. - -2.1.0 / 2013-11-21 -================== - - * add: allow cflag style option params, unit test, fixes #174 - -2.0.0 / 2013-07-18 -================== - - * remove input methods (.prompt, .confirm, etc) - -1.3.2 / 2013-07-18 -================== - - * add support for sub-commands to co-exist with the original command - -1.3.1 / 2013-07-18 -================== - - * add quick .runningCommand hack so you can opt-out of other logic when running a sub command - -1.3.0 / 2013-07-09 -================== - - * add EACCES error handling - * fix sub-command --help - -1.2.0 / 2013-06-13 -================== - - * allow "-" hyphen as an option argument - * support for RegExp coercion - -1.1.1 / 2012-11-20 -================== - - * add more sub-command padding - * fix .usage() when args are present. Closes #106 - -1.1.0 / 2012-11-16 -================== - - * add git-style executable subcommand support. Closes #94 - -1.0.5 / 2012-10-09 -================== - - * fix `--name` clobbering. Closes #92 - * fix examples/help. Closes #89 - -1.0.4 / 2012-09-03 -================== - - * add `outputHelp()` method. - -1.0.3 / 2012-08-30 -================== - - * remove invalid .version() defaulting - -1.0.2 / 2012-08-24 -================== - - * add `--foo=bar` support [arv] - * fix password on node 0.8.8. Make backward compatible with 0.6 [focusaurus] - -1.0.1 / 2012-08-03 -================== - - * fix issue #56 - * fix tty.setRawMode(mode) was moved to tty.ReadStream#setRawMode() (i.e. process.stdin.setRawMode()) - -1.0.0 / 2012-07-05 -================== - - * add support for optional option descriptions - * add defaulting of `.version()` to package.json's version - -0.6.1 / 2012-06-01 -================== - - * Added: append (yes or no) on confirmation - * Added: allow node.js v0.7.x - -0.6.0 / 2012-04-10 -================== - - * Added `.prompt(obj, callback)` support. Closes #49 - * Added default support to .choose(). Closes #41 - * Fixed the choice example - -0.5.1 / 2011-12-20 -================== - - * Fixed `password()` for recent nodes. Closes #36 - -0.5.0 / 2011-12-04 -================== - - * Added sub-command option support [itay] - -0.4.3 / 2011-12-04 -================== - - * Fixed custom help ordering. Closes #32 - -0.4.2 / 2011-11-24 -================== - - * Added travis support - * Fixed: line-buffered input automatically trimmed. Closes #31 - -0.4.1 / 2011-11-18 -================== - - * Removed listening for "close" on --help - -0.4.0 / 2011-11-15 -================== - - * Added support for `--`. Closes #24 - -0.3.3 / 2011-11-14 -================== - - * Fixed: wait for close event when writing help info [Jerry Hamlet] - -0.3.2 / 2011-11-01 -================== - - * Fixed long flag definitions with values [felixge] - -0.3.1 / 2011-10-31 -================== - - * Changed `--version` short flag to `-V` from `-v` - * Changed `.version()` so it's configurable [felixge] - -0.3.0 / 2011-10-31 -================== - - * Added support for long flags only. Closes #18 - -0.2.1 / 2011-10-24 -================== - - * "node": ">= 0.4.x < 0.7.0". Closes #20 - -0.2.0 / 2011-09-26 -================== - - * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs] - -0.1.0 / 2011-08-24 -================== - - * Added support for custom `--help` output - -0.0.5 / 2011-08-18 -================== - - * Changed: when the user enters nothing prompt for password again - * Fixed issue with passwords beginning with numbers [NuckChorris] - -0.0.4 / 2011-08-15 -================== - - * Fixed `Commander#args` - -0.0.3 / 2011-08-15 -================== - - * Added default option value support - -0.0.2 / 2011-08-15 -================== - - * Added mask support to `Command#password(str[, mask], fn)` - * Added `Command#password(str, fn)` - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/commander/LICENSE b/node_modules/commander/LICENSE deleted file mode 100644 index 10f997ab104594695189c3fca8fa6c65ae9ccdd6..0000000000000000000000000000000000000000 --- a/node_modules/commander/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/commander/Readme.md b/node_modules/commander/Readme.md deleted file mode 100644 index c846e7a2d2b96eb41c333a8bdb34062cb5b764d6..0000000000000000000000000000000000000000 --- a/node_modules/commander/Readme.md +++ /dev/null @@ -1,428 +0,0 @@ -# Commander.js - - -[](http://travis-ci.org/tj/commander.js) -[](https://www.npmjs.org/package/commander) -[](https://npmcharts.com/compare/commander?minimal=true) -[](https://packagephobia.now.sh/result?p=commander) -[](https://gitter.im/tj/commander.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) - - The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/commander-rb/commander). - [API documentation](http://tj.github.com/commander.js/) - - -## Installation - - $ npm install commander - -## Option parsing - -Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.1.0') - .option('-p, --peppers', 'Add peppers') - .option('-P, --pineapple', 'Add pineapple') - .option('-b, --bbq-sauce', 'Add bbq sauce') - .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') - .parse(process.argv); - -console.log('you ordered a pizza with:'); -if (program.peppers) console.log(' - peppers'); -if (program.pineapple) console.log(' - pineapple'); -if (program.bbqSauce) console.log(' - bbq'); -console.log(' - %s cheese', program.cheese); -``` - -Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. - -Note that multi-word options starting with `--no` prefix negate the boolean value of the following word. For example, `--no-sauce` sets the value of `program.sauce` to false. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .option('--no-sauce', 'Remove sauce') - .parse(process.argv); - -console.log('you ordered a pizza'); -if (program.sauce) console.log(' with sauce'); -else console.log(' without sauce'); -``` - -To get string arguments from options you will need to use angle brackets <> for required inputs or square brackets [] for optional inputs. - -e.g. ```.option('-m --myarg [myVar]', 'my super cool description')``` - -Then to access the input if it was passed in. - -e.g. ```var myInput = program.myarg``` - -**NOTE**: If you pass a argument without using brackets the example above will return true and not the value passed in. - - -## Version option - -Calling the `version` implicitly adds the `-V` and `--version` options to the command. -When either of these options is present, the command prints the version number and exits. - - $ ./examples/pizza -V - 0.0.1 - -If you want your program to respond to the `-v` option instead of the `-V` option, simply pass custom flags to the `version` method using the same syntax as the `option` method. - -```js -program - .version('0.0.1', '-v, --version') -``` - -The version flags can be named anything, but the long option is required. - -## Command-specific options - -You can attach options to a command. - -```js -#!/usr/bin/env node - -var program = require('commander'); - -program - .command('rm <dir>') - .option('-r, --recursive', 'Remove recursively') - .action(function (dir, cmd) { - console.log('remove ' + dir + (cmd.recursive ? ' recursively' : '')) - }) - -program.parse(process.argv) -``` - -A command's options are validated when the command is used. Any unknown options will be reported as an error. However, if an action-based command does not define an action, then the options are not validated. - -## Coercion - -```js -function range(val) { - return val.split('..').map(Number); -} - -function list(val) { - return val.split(','); -} - -function collect(val, memo) { - memo.push(val); - return memo; -} - -function increaseVerbosity(v, total) { - return total + 1; -} - -program - .version('0.1.0') - .usage('[options] <file ...>') - .option('-i, --integer <n>', 'An integer argument', parseInt) - .option('-f, --float <n>', 'A float argument', parseFloat) - .option('-r, --range <a>..<b>', 'A range', range) - .option('-l, --list <items>', 'A list', list) - .option('-o, --optional [value]', 'An optional value') - .option('-c, --collect [value]', 'A repeatable value', collect, []) - .option('-v, --verbose', 'A value that can be increased', increaseVerbosity, 0) - .parse(process.argv); - -console.log(' int: %j', program.integer); -console.log(' float: %j', program.float); -console.log(' optional: %j', program.optional); -program.range = program.range || []; -console.log(' range: %j..%j', program.range[0], program.range[1]); -console.log(' list: %j', program.list); -console.log(' collect: %j', program.collect); -console.log(' verbosity: %j', program.verbose); -console.log(' args: %j', program.args); -``` - -## Regular Expression -```js -program - .version('0.1.0') - .option('-s --size <size>', 'Pizza size', /^(large|medium|small)$/i, 'medium') - .option('-d --drink [drink]', 'Drink', /^(coke|pepsi|izze)$/i) - .parse(process.argv); - -console.log(' size: %j', program.size); -console.log(' drink: %j', program.drink); -``` - -## Variadic arguments - - The last argument of a command can be variadic, and only the last argument. To make an argument variadic you have to - append `...` to the argument name. Here is an example: - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.1.0') - .command('rmdir <dir> [otherDirs...]') - .action(function (dir, otherDirs) { - console.log('rmdir %s', dir); - if (otherDirs) { - otherDirs.forEach(function (oDir) { - console.log('rmdir %s', oDir); - }); - } - }); - -program.parse(process.argv); -``` - - An `Array` is used for the value of a variadic argument. This applies to `program.args` as well as the argument passed - to your action as demonstrated above. - -## Specify the argument syntax - -```js -#!/usr/bin/env node - -var program = require('commander'); - -program - .version('0.1.0') - .arguments('<cmd> [env]') - .action(function (cmd, env) { - cmdValue = cmd; - envValue = env; - }); - -program.parse(process.argv); - -if (typeof cmdValue === 'undefined') { - console.error('no command given!'); - process.exit(1); -} -console.log('command:', cmdValue); -console.log('environment:', envValue || "no environment given"); -``` -Angled brackets (e.g. `<cmd>`) indicate required input. Square brackets (e.g. `[env]`) indicate optional input. - -## Git-style sub-commands - -```js -// file: ./examples/pm -var program = require('commander'); - -program - .version('0.1.0') - .command('install [name]', 'install one or more packages') - .command('search [query]', 'search with optional query') - .command('list', 'list packages installed', {isDefault: true}) - .parse(process.argv); -``` - -When `.command()` is invoked with a description argument, no `.action(callback)` should be called to handle sub-commands, otherwise there will be an error. This tells commander that you're going to use separate executables for sub-commands, much like `git(1)` and other popular tools. -The commander will try to search the executables in the directory of the entry script (like `./examples/pm`) with the name `program-command`, like `pm-install`, `pm-search`. - -Options can be passed with the call to `.command()`. Specifying `true` for `opts.noHelp` will remove the subcommand from the generated help output. Specifying `true` for `opts.isDefault` will run the subcommand if no other subcommand is specified. - -If the program is designed to be installed globally, make sure the executables have proper modes, like `755`. - -### `--harmony` - -You can enable `--harmony` option in two ways: -* Use `#! /usr/bin/env node --harmony` in the sub-commands scripts. Note some os version don’t support this pattern. -* Use the `--harmony` option when call the command, like `node --harmony examples/pm publish`. The `--harmony` option will be preserved when spawning sub-command process. - -## Automated --help - - The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: - -``` -$ ./examples/pizza --help -Usage: pizza [options] - -An application for pizzas ordering - -Options: - -h, --help output usage information - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineapple - -b, --bbq Add bbq sauce - -c, --cheese <type> Add the specified type of cheese [marble] - -C, --no-cheese You do not want any cheese -``` - -## Custom help - - You can display arbitrary `-h, --help` information - by listening for "--help". Commander will automatically - exit once you are done so that the remainder of your program - does not execute causing undesired behaviors, for example - in the following executable "stuff" will not output when - `--help` is used. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.1.0') - .option('-f, --foo', 'enable some foo') - .option('-b, --bar', 'enable some bar') - .option('-B, --baz', 'enable some baz'); - -// must be before .parse() since -// node's emit() is immediate - -program.on('--help', function(){ - console.log('') - console.log('Examples:'); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); -}); - -program.parse(process.argv); - -console.log('stuff'); -``` - -Yields the following help output when `node script-name.js -h` or `node script-name.js --help` are run: - -``` -Usage: custom-help [options] - -Options: - -h, --help output usage information - -V, --version output the version number - -f, --foo enable some foo - -b, --bar enable some bar - -B, --baz enable some baz - -Examples: - $ custom-help --help - $ custom-help -h -``` - -## .outputHelp(cb) - -Output help information without exiting. -Optional callback cb allows post-processing of help text before it is displayed. - -If you want to display help by default (e.g. if no command was provided), you can use something like: - -```js -var program = require('commander'); -var colors = require('colors'); - -program - .version('0.1.0') - .command('getstream [url]', 'get stream URL') - .parse(process.argv); - -if (!process.argv.slice(2).length) { - program.outputHelp(make_red); -} - -function make_red(txt) { - return colors.red(txt); //display the help text in red on the console -} -``` - -## .help(cb) - - Output help information and exit immediately. - Optional callback cb allows post-processing of help text before it is displayed. - - -## Custom event listeners - You can execute custom actions by listening to command and option events. - -```js -program.on('option:verbose', function () { - process.env.VERBOSE = this.verbose; -}); - -// error on unknown commands -program.on('command:*', function () { - console.error('Invalid command: %s\nSee --help for a list of available commands.', program.args.join(' ')); - process.exit(1); -}); -``` - -## Examples - -```js -var program = require('commander'); - -program - .version('0.1.0') - .option('-C, --chdir <path>', 'change the working directory') - .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf') - .option('-T, --no-tests', 'ignore test hook'); - -program - .command('setup [env]') - .description('run setup commands for all envs') - .option("-s, --setup_mode [mode]", "Which setup mode to use") - .action(function(env, options){ - var mode = options.setup_mode || "normal"; - env = env || 'all'; - console.log('setup for %s env(s) with %s mode', env, mode); - }); - -program - .command('exec <cmd>') - .alias('ex') - .description('execute the given remote cmd') - .option("-e, --exec_mode <mode>", "Which exec mode to use") - .action(function(cmd, options){ - console.log('exec "%s" using %s mode', cmd, options.exec_mode); - }).on('--help', function() { - console.log(''); - console.log('Examples:'); - console.log(''); - console.log(' $ deploy exec sequential'); - console.log(' $ deploy exec async'); - }); - -program - .command('*') - .action(function(env){ - console.log('deploying "%s"', env); - }); - -program.parse(process.argv); -``` - -More Demos can be found in the [examples](https://github.com/tj/commander.js/tree/master/examples) directory. - -## License - -[MIT](https://github.com/tj/commander.js/blob/master/LICENSE) diff --git a/node_modules/commander/index.js b/node_modules/commander/index.js deleted file mode 100644 index ec1d61d58723c2078578628808e4e3300e613509..0000000000000000000000000000000000000000 --- a/node_modules/commander/index.js +++ /dev/null @@ -1,1224 +0,0 @@ -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter; -var spawn = require('child_process').spawn; -var path = require('path'); -var dirname = path.dirname; -var basename = path.basename; -var fs = require('fs'); - -/** - * Inherit `Command` from `EventEmitter.prototype`. - */ - -require('util').inherits(Command, EventEmitter); - -/** - * Expose the root command. - */ - -exports = module.exports = new Command(); - -/** - * Expose `Command`. - */ - -exports.Command = Command; - -/** - * Expose `Option`. - */ - -exports.Option = Option; - -/** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {String} flags - * @param {String} description - * @api public - */ - -function Option(flags, description) { - this.flags = flags; - this.required = flags.indexOf('<') >= 0; - this.optional = flags.indexOf('[') >= 0; - this.bool = flags.indexOf('-no-') === -1; - flags = flags.split(/[ ,|]+/); - if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); - this.long = flags.shift(); - this.description = description || ''; -} - -/** - * Return option name. - * - * @return {String} - * @api private - */ - -Option.prototype.name = function() { - return this.long - .replace('--', '') - .replace('no-', ''); -}; - -/** - * Return option name, in a camelcase format that can be used - * as a object attribute key. - * - * @return {String} - * @api private - */ - -Option.prototype.attributeName = function() { - return camelcase(this.name()); -}; - -/** - * Check if `arg` matches the short or long flag. - * - * @param {String} arg - * @return {Boolean} - * @api private - */ - -Option.prototype.is = function(arg) { - return this.short === arg || this.long === arg; -}; - -/** - * Initialize a new `Command`. - * - * @param {String} name - * @api public - */ - -function Command(name) { - this.commands = []; - this.options = []; - this._execs = {}; - this._allowUnknownOption = false; - this._args = []; - this._name = name || ''; -} - -/** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * Examples: - * - * program - * .version('0.0.1') - * .option('-C, --chdir <path>', 'change the working directory') - * .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function() { - * console.log('setup'); - * }); - * - * program - * .command('exec <cmd>') - * .description('run the given remote command') - * .action(function(cmd) { - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('teardown <dir> [otherDirs...]') - * .description('run teardown commands') - * .action(function(dir, otherDirs) { - * console.log('dir "%s"', dir); - * if (otherDirs) { - * otherDirs.forEach(function (oDir) { - * console.log('dir "%s"', oDir); - * }); - * } - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env) { - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {String} name - * @param {String} [desc] for git-style sub-commands - * @return {Command} the new command - * @api public - */ - -Command.prototype.command = function(name, desc, opts) { - if (typeof desc === 'object' && desc !== null) { - opts = desc; - desc = null; - } - opts = opts || {}; - var args = name.split(/ +/); - var cmd = new Command(args.shift()); - - if (desc) { - cmd.description(desc); - this.executables = true; - this._execs[cmd._name] = true; - if (opts.isDefault) this.defaultExecutable = cmd._name; - } - cmd._noHelp = !!opts.noHelp; - this.commands.push(cmd); - cmd.parseExpectedArgs(args); - cmd.parent = this; - - if (desc) return this; - return cmd; -}; - -/** - * Define argument syntax for the top-level command. - * - * @api public - */ - -Command.prototype.arguments = function(desc) { - return this.parseExpectedArgs(desc.split(/ +/)); -}; - -/** - * Add an implicit `help [cmd]` subcommand - * which invokes `--help` for the given command. - * - * @api private - */ - -Command.prototype.addImplicitHelpCommand = function() { - this.command('help [cmd]', 'display help for [cmd]'); -}; - -/** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {Array} args - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parseExpectedArgs = function(args) { - if (!args.length) return; - var self = this; - args.forEach(function(arg) { - var argDetails = { - required: false, - name: '', - variadic: false - }; - - switch (arg[0]) { - case '<': - argDetails.required = true; - argDetails.name = arg.slice(1, -1); - break; - case '[': - argDetails.name = arg.slice(1, -1); - break; - } - - if (argDetails.name.length > 3 && argDetails.name.slice(-3) === '...') { - argDetails.variadic = true; - argDetails.name = argDetails.name.slice(0, -3); - } - if (argDetails.name) { - self._args.push(argDetails); - } - }); - return this; -}; - -/** - * Register callback `fn` for the command. - * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function() { - * // output help here - * }); - * - * @param {Function} fn - * @return {Command} for chaining - * @api public - */ - -Command.prototype.action = function(fn) { - var self = this; - var listener = function(args, unknown) { - // Parse any so-far unknown options - args = args || []; - unknown = unknown || []; - - var parsed = self.parseOptions(unknown); - - // Output help if necessary - outputHelpIfNecessary(self, parsed.unknown); - - // If there are still any unknown options, then we simply - // die, unless someone asked for help, in which case we give it - // to them, and then we die. - if (parsed.unknown.length > 0) { - self.unknownOption(parsed.unknown[0]); - } - - // Leftover arguments need to be pushed back. Fixes issue #56 - if (parsed.args.length) args = parsed.args.concat(args); - - self._args.forEach(function(arg, i) { - if (arg.required && args[i] == null) { - self.missingArgument(arg.name); - } else if (arg.variadic) { - if (i !== self._args.length - 1) { - self.variadicArgNotLast(arg.name); - } - - args[i] = args.splice(i); - } - }); - - // Always append ourselves to the end of the arguments, - // to make sure we match the number of arguments the user - // expects - if (self._args.length) { - args[self._args.length] = self; - } else { - args.push(self); - } - - fn.apply(self, args); - }; - var parent = this.parent || this; - var name = parent === this ? '*' : this._name; - parent.on('command:' + name, listener); - if (this._alias) parent.on('command:' + this._alias, listener); - return this; -}; - -/** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: - * - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to true - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => false - * - * // required argument - * program.option('-C, --chdir <path>', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {String} flags - * @param {String} description - * @param {Function|*} [fn] or default - * @param {*} [defaultValue] - * @return {Command} for chaining - * @api public - */ - -Command.prototype.option = function(flags, description, fn, defaultValue) { - var self = this, - option = new Option(flags, description), - oname = option.name(), - name = option.attributeName(); - - // default as 3rd arg - if (typeof fn !== 'function') { - if (fn instanceof RegExp) { - var regex = fn; - fn = function(val, def) { - var m = regex.exec(val); - return m ? m[0] : def; - }; - } else { - defaultValue = fn; - fn = null; - } - } - - // preassign default value only for --no-*, [optional], or <required> - if (!option.bool || option.optional || option.required) { - // when --no-* we make sure default is true - if (!option.bool) defaultValue = true; - // preassign only if we have a default - if (defaultValue !== undefined) { - self[name] = defaultValue; - option.defaultValue = defaultValue; - } - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on('option:' + oname, function(val) { - // coercion - if (val !== null && fn) { - val = fn(val, self[name] === undefined ? defaultValue : self[name]); - } - - // unassigned or bool - if (typeof self[name] === 'boolean' || typeof self[name] === 'undefined') { - // if no value, bool true, and we have a default, then use it! - if (val == null) { - self[name] = option.bool - ? defaultValue || true - : false; - } else { - self[name] = val; - } - } else if (val !== null) { - // reassign - self[name] = val; - } - }); - - return this; -}; - -/** - * Allow unknown options on the command line. - * - * @param {Boolean} arg if `true` or omitted, no error will be thrown - * for unknown options. - * @api public - */ -Command.prototype.allowUnknownOption = function(arg) { - this._allowUnknownOption = arguments.length === 0 || arg; - return this; -}; - -/** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {Array} argv - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parse = function(argv) { - // implicit help - if (this.executables) this.addImplicitHelpCommand(); - - // store raw args - this.rawArgs = argv; - - // guess name - this._name = this._name || basename(argv[1], '.js'); - - // github-style sub-commands with no sub-command - if (this.executables && argv.length < 3 && !this.defaultExecutable) { - // this user needs help - argv.push('--help'); - } - - // process argv - var parsed = this.parseOptions(this.normalize(argv.slice(2))); - var args = this.args = parsed.args; - - var result = this.parseArgs(this.args, parsed.unknown); - - // executable sub-commands - var name = result.args[0]; - - var aliasCommand = null; - // check alias of sub commands - if (name) { - aliasCommand = this.commands.filter(function(command) { - return command.alias() === name; - })[0]; - } - - if (this._execs[name] === true) { - return this.executeSubCommand(argv, args, parsed.unknown); - } else if (aliasCommand) { - // is alias of a subCommand - args[0] = aliasCommand._name; - return this.executeSubCommand(argv, args, parsed.unknown); - } else if (this.defaultExecutable) { - // use the default subcommand - args.unshift(this.defaultExecutable); - return this.executeSubCommand(argv, args, parsed.unknown); - } - - return result; -}; - -/** - * Execute a sub-command executable. - * - * @param {Array} argv - * @param {Array} args - * @param {Array} unknown - * @api private - */ - -Command.prototype.executeSubCommand = function(argv, args, unknown) { - args = args.concat(unknown); - - if (!args.length) this.help(); - if (args[0] === 'help' && args.length === 1) this.help(); - - // <cmd> --help - if (args[0] === 'help') { - args[0] = args[1]; - args[1] = '--help'; - } - - // executable - var f = argv[1]; - // name of the subcommand, link `pm-install` - var bin = basename(f, path.extname(f)) + '-' + args[0]; - - // In case of globally installed, get the base dir where executable - // subcommand file should be located at - var baseDir; - - var resolvedLink = fs.realpathSync(f); - - baseDir = dirname(resolvedLink); - - // prefer local `./<bin>` to bin in the $PATH - var localBin = path.join(baseDir, bin); - - // whether bin file is a js script with explicit `.js` or `.ts` extension - var isExplicitJS = false; - if (exists(localBin + '.js')) { - bin = localBin + '.js'; - isExplicitJS = true; - } else if (exists(localBin + '.ts')) { - bin = localBin + '.ts'; - isExplicitJS = true; - } else if (exists(localBin)) { - bin = localBin; - } - - args = args.slice(1); - - var proc; - if (process.platform !== 'win32') { - if (isExplicitJS) { - args.unshift(bin); - // add executable arguments to spawn - args = (process.execArgv || []).concat(args); - - proc = spawn(process.argv[0], args, { stdio: 'inherit', customFds: [0, 1, 2] }); - } else { - proc = spawn(bin, args, { stdio: 'inherit', customFds: [0, 1, 2] }); - } - } else { - args.unshift(bin); - proc = spawn(process.execPath, args, { stdio: 'inherit' }); - } - - var signals = ['SIGUSR1', 'SIGUSR2', 'SIGTERM', 'SIGINT', 'SIGHUP']; - signals.forEach(function(signal) { - process.on(signal, function() { - if (proc.killed === false && proc.exitCode === null) { - proc.kill(signal); - } - }); - }); - proc.on('close', process.exit.bind(process)); - proc.on('error', function(err) { - if (err.code === 'ENOENT') { - console.error('error: %s(1) does not exist, try --help', bin); - } else if (err.code === 'EACCES') { - console.error('error: %s(1) not executable. try chmod or run with root', bin); - } - process.exit(1); - }); - - // Store the reference to the child process - this.runningCommand = proc; -}; - -/** - * Normalize `args`, splitting joined short flags. For example - * the arg "-abc" is equivalent to "-a -b -c". - * This also normalizes equal sign and splits "--abc=def" into "--abc def". - * - * @param {Array} args - * @return {Array} - * @api private - */ - -Command.prototype.normalize = function(args) { - var ret = [], - arg, - lastOpt, - index; - - for (var i = 0, len = args.length; i < len; ++i) { - arg = args[i]; - if (i > 0) { - lastOpt = this.optionFor(args[i - 1]); - } - - if (arg === '--') { - // Honor option terminator - ret = ret.concat(args.slice(i)); - break; - } else if (lastOpt && lastOpt.required) { - ret.push(arg); - } else if (arg.length > 1 && arg[0] === '-' && arg[1] !== '-') { - arg.slice(1).split('').forEach(function(c) { - ret.push('-' + c); - }); - } else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) { - ret.push(arg.slice(0, index), arg.slice(index + 1)); - } else { - ret.push(arg); - } - } - - return ret; -}; - -/** - * Parse command `args`. - * - * When listener(s) are available those - * callbacks are invoked, otherwise the "*" - * event is emitted and those actions are invoked. - * - * @param {Array} args - * @return {Command} for chaining - * @api private - */ - -Command.prototype.parseArgs = function(args, unknown) { - var name; - - if (args.length) { - name = args[0]; - if (this.listeners('command:' + name).length) { - this.emit('command:' + args.shift(), args, unknown); - } else { - this.emit('command:*', args); - } - } else { - outputHelpIfNecessary(this, unknown); - - // If there were no args and we have unknown options, - // then they are extraneous and we need to error. - if (unknown.length > 0) { - this.unknownOption(unknown[0]); - } - if (this.commands.length === 0 && - this._args.filter(function(a) { return a.required; }).length === 0) { - this.emit('command:*'); - } - } - - return this; -}; - -/** - * Return an option matching `arg` if any. - * - * @param {String} arg - * @return {Option} - * @api private - */ - -Command.prototype.optionFor = function(arg) { - for (var i = 0, len = this.options.length; i < len; ++i) { - if (this.options[i].is(arg)) { - return this.options[i]; - } - } -}; - -/** - * Parse options from `argv` returning `argv` - * void of these options. - * - * @param {Array} argv - * @return {Array} - * @api public - */ - -Command.prototype.parseOptions = function(argv) { - var args = [], - len = argv.length, - literal, - option, - arg; - - var unknownOptions = []; - - // parse options - for (var i = 0; i < len; ++i) { - arg = argv[i]; - - // literal args after -- - if (literal) { - args.push(arg); - continue; - } - - if (arg === '--') { - literal = true; - continue; - } - - // find matching Option - option = this.optionFor(arg); - - // option is defined - if (option) { - // requires arg - if (option.required) { - arg = argv[++i]; - if (arg == null) return this.optionMissingArgument(option); - this.emit('option:' + option.name(), arg); - // optional arg - } else if (option.optional) { - arg = argv[i + 1]; - if (arg == null || (arg[0] === '-' && arg !== '-')) { - arg = null; - } else { - ++i; - } - this.emit('option:' + option.name(), arg); - // bool - } else { - this.emit('option:' + option.name()); - } - continue; - } - - // looks like an option - if (arg.length > 1 && arg[0] === '-') { - unknownOptions.push(arg); - - // If the next argument looks like it might be - // an argument for this option, we pass it on. - // If it isn't, then it'll simply be ignored - if ((i + 1) < argv.length && argv[i + 1][0] !== '-') { - unknownOptions.push(argv[++i]); - } - continue; - } - - // arg - args.push(arg); - } - - return { args: args, unknown: unknownOptions }; -}; - -/** - * Return an object containing options as key-value pairs - * - * @return {Object} - * @api public - */ -Command.prototype.opts = function() { - var result = {}, - len = this.options.length; - - for (var i = 0; i < len; i++) { - var key = this.options[i].attributeName(); - result[key] = key === this._versionOptionName ? this._version : this[key]; - } - return result; -}; - -/** - * Argument `name` is missing. - * - * @param {String} name - * @api private - */ - -Command.prototype.missingArgument = function(name) { - console.error("error: missing required argument `%s'", name); - process.exit(1); -}; - -/** - * `Option` is missing an argument, but received `flag` or nothing. - * - * @param {String} option - * @param {String} flag - * @api private - */ - -Command.prototype.optionMissingArgument = function(option, flag) { - if (flag) { - console.error("error: option `%s' argument missing, got `%s'", option.flags, flag); - } else { - console.error("error: option `%s' argument missing", option.flags); - } - process.exit(1); -}; - -/** - * Unknown option `flag`. - * - * @param {String} flag - * @api private - */ - -Command.prototype.unknownOption = function(flag) { - if (this._allowUnknownOption) return; - console.error("error: unknown option `%s'", flag); - process.exit(1); -}; - -/** - * Variadic argument with `name` is not the last argument as required. - * - * @param {String} name - * @api private - */ - -Command.prototype.variadicArgNotLast = function(name) { - console.error("error: variadic arguments must be last `%s'", name); - process.exit(1); -}; - -/** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {String} str - * @param {String} [flags] - * @return {Command} for chaining - * @api public - */ - -Command.prototype.version = function(str, flags) { - if (arguments.length === 0) return this._version; - this._version = str; - flags = flags || '-V, --version'; - var versionOption = new Option(flags, 'output the version number'); - this._versionOptionName = versionOption.long.substr(2) || 'version'; - this.options.push(versionOption); - this.on('option:' + this._versionOptionName, function() { - process.stdout.write(str + '\n'); - process.exit(0); - }); - return this; -}; - -/** - * Set the description to `str`. - * - * @param {String} str - * @param {Object} argsDescription - * @return {String|Command} - * @api public - */ - -Command.prototype.description = function(str, argsDescription) { - if (arguments.length === 0) return this._description; - this._description = str; - this._argsDescription = argsDescription; - return this; -}; - -/** - * Set an alias for the command - * - * @param {String} alias - * @return {String|Command} - * @api public - */ - -Command.prototype.alias = function(alias) { - var command = this; - if (this.commands.length !== 0) { - command = this.commands[this.commands.length - 1]; - } - - if (arguments.length === 0) return command._alias; - - if (alias === command._name) throw new Error('Command alias can\'t be the same as its name'); - - command._alias = alias; - return this; -}; - -/** - * Set / get the command usage `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.usage = function(str) { - var args = this._args.map(function(arg) { - return humanReadableArgName(arg); - }); - - var usage = '[options]' + - (this.commands.length ? ' [command]' : '') + - (this._args.length ? ' ' + args.join(' ') : ''); - - if (arguments.length === 0) return this._usage || usage; - this._usage = str; - - return this; -}; - -/** - * Get or set the name of the command - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.name = function(str) { - if (arguments.length === 0) return this._name; - this._name = str; - return this; -}; - -/** - * Return prepared commands. - * - * @return {Array} - * @api private - */ - -Command.prototype.prepareCommands = function() { - return this.commands.filter(function(cmd) { - return !cmd._noHelp; - }).map(function(cmd) { - var args = cmd._args.map(function(arg) { - return humanReadableArgName(arg); - }).join(' '); - - return [ - cmd._name + - (cmd._alias ? '|' + cmd._alias : '') + - (cmd.options.length ? ' [options]' : '') + - (args ? ' ' + args : ''), - cmd._description - ]; - }); -}; - -/** - * Return the largest command length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestCommandLength = function() { - var commands = this.prepareCommands(); - return commands.reduce(function(max, command) { - return Math.max(max, command[0].length); - }, 0); -}; - -/** - * Return the largest option length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestOptionLength = function() { - var options = [].slice.call(this.options); - options.push({ - flags: '-h, --help' - }); - return options.reduce(function(max, option) { - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Return the largest arg length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestArgLength = function() { - return this._args.reduce(function(max, arg) { - return Math.max(max, arg.name.length); - }, 0); -}; - -/** - * Return the pad width. - * - * @return {Number} - * @api private - */ - -Command.prototype.padWidth = function() { - var width = this.largestOptionLength(); - if (this._argsDescription && this._args.length) { - if (this.largestArgLength() > width) { - width = this.largestArgLength(); - } - } - - if (this.commands && this.commands.length) { - if (this.largestCommandLength() > width) { - width = this.largestCommandLength(); - } - } - - return width; -}; - -/** - * Return help for options. - * - * @return {String} - * @api private - */ - -Command.prototype.optionHelp = function() { - var width = this.padWidth(); - - // Append the help information - return this.options.map(function(option) { - return pad(option.flags, width) + ' ' + option.description + - ((option.bool && option.defaultValue !== undefined) ? ' (default: ' + JSON.stringify(option.defaultValue) + ')' : ''); - }).concat([pad('-h, --help', width) + ' ' + 'output usage information']) - .join('\n'); -}; - -/** - * Return command help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.commandHelp = function() { - if (!this.commands.length) return ''; - - var commands = this.prepareCommands(); - var width = this.padWidth(); - - return [ - 'Commands:', - commands.map(function(cmd) { - var desc = cmd[1] ? ' ' + cmd[1] : ''; - return (desc ? pad(cmd[0], width) : cmd[0]) + desc; - }).join('\n').replace(/^/gm, ' '), - '' - ].join('\n'); -}; - -/** - * Return program help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.helpInformation = function() { - var desc = []; - if (this._description) { - desc = [ - this._description, - '' - ]; - - var argsDescription = this._argsDescription; - if (argsDescription && this._args.length) { - var width = this.padWidth(); - desc.push('Arguments:'); - desc.push(''); - this._args.forEach(function(arg) { - desc.push(' ' + pad(arg.name, width) + ' ' + argsDescription[arg.name]); - }); - desc.push(''); - } - } - - var cmdName = this._name; - if (this._alias) { - cmdName = cmdName + '|' + this._alias; - } - var usage = [ - 'Usage: ' + cmdName + ' ' + this.usage(), - '' - ]; - - var cmds = []; - var commandHelp = this.commandHelp(); - if (commandHelp) cmds = [commandHelp]; - - var options = [ - 'Options:', - '' + this.optionHelp().replace(/^/gm, ' '), - '' - ]; - - return usage - .concat(desc) - .concat(options) - .concat(cmds) - .join('\n'); -}; - -/** - * Output help information for this command - * - * @api public - */ - -Command.prototype.outputHelp = function(cb) { - if (!cb) { - cb = function(passthru) { - return passthru; - }; - } - process.stdout.write(cb(this.helpInformation())); - this.emit('--help'); -}; - -/** - * Output help information and exit. - * - * @api public - */ - -Command.prototype.help = function(cb) { - this.outputHelp(cb); - process.exit(); -}; - -/** - * Camel-case the given `flag` - * - * @param {String} flag - * @return {String} - * @api private - */ - -function camelcase(flag) { - return flag.split('-').reduce(function(str, word) { - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Pad `str` to `width`. - * - * @param {String} str - * @param {Number} width - * @return {String} - * @api private - */ - -function pad(str, width) { - var len = Math.max(0, width - str.length); - return str + Array(len + 1).join(' '); -} - -/** - * Output help information if necessary - * - * @param {Command} command to output help for - * @param {Array} array of options to search for -h or --help - * @api private - */ - -function outputHelpIfNecessary(cmd, options) { - options = options || []; - for (var i = 0; i < options.length; i++) { - if (options[i] === '--help' || options[i] === '-h') { - cmd.outputHelp(); - process.exit(0); - } - } -} - -/** - * Takes an argument an returns its human readable equivalent for help usage. - * - * @param {Object} arg - * @return {String} - * @api private - */ - -function humanReadableArgName(arg) { - var nameOutput = arg.name + (arg.variadic === true ? '...' : ''); - - return arg.required - ? '<' + nameOutput + '>' - : '[' + nameOutput + ']'; -} - -// for versions before node v0.8 when there weren't `fs.existsSync` -function exists(file) { - try { - if (fs.statSync(file).isFile()) { - return true; - } - } catch (e) { - return false; - } -} diff --git a/node_modules/commander/package.json b/node_modules/commander/package.json deleted file mode 100644 index 2e5632284df89a4a48627c9f920da51f31f385fa..0000000000000000000000000000000000000000 --- a/node_modules/commander/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "_from": "commander@2", - "_id": "commander@2.20.3", - "_inBundle": false, - "_integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", - "_location": "/commander", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "commander@2", - "name": "commander", - "escapedName": "commander", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3-dsv" - ], - "_resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "_shasum": "fd485e84c03eb4881c20722ba48035e8531aeb33", - "_spec": "commander@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3-dsv", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "bugs": { - "url": "https://github.com/tj/commander.js/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "the complete solution for node.js command-line programs", - "devDependencies": { - "@types/node": "^12.7.8", - "eslint": "^6.4.0", - "should": "^13.2.3", - "sinon": "^7.5.0", - "standard": "^14.3.1", - "ts-node": "^8.4.1", - "typescript": "^3.6.3" - }, - "files": [ - "index.js", - "typings/index.d.ts" - ], - "homepage": "https://github.com/tj/commander.js#readme", - "keywords": [ - "commander", - "command", - "option", - "parser" - ], - "license": "MIT", - "main": "index", - "name": "commander", - "repository": { - "type": "git", - "url": "git+https://github.com/tj/commander.js.git" - }, - "scripts": { - "lint": "eslint index.js", - "test": "node test/run.js && npm run test-typings", - "test-typings": "tsc -p tsconfig.json" - }, - "typings": "typings/index.d.ts", - "version": "2.20.3" -} diff --git a/node_modules/commander/typings/index.d.ts b/node_modules/commander/typings/index.d.ts deleted file mode 100644 index bcda2771ef48ff00a0102935b3bbbeff4580ee23..0000000000000000000000000000000000000000 --- a/node_modules/commander/typings/index.d.ts +++ /dev/null @@ -1,310 +0,0 @@ -// Type definitions for commander 2.11 -// Project: https://github.com/visionmedia/commander.js -// Definitions by: Alan Agius <https://github.com/alan-agius4>, Marcelo Dezem <https://github.com/mdezem>, vvakame <https://github.com/vvakame>, Jules Randolph <https://github.com/sveinburne> -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped - -declare namespace local { - - class Option { - flags: string; - required: boolean; - optional: boolean; - bool: boolean; - short?: string; - long: string; - description: string; - - /** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {string} flags - * @param {string} [description] - */ - constructor(flags: string, description?: string); - } - - class Command extends NodeJS.EventEmitter { - [key: string]: any; - - args: string[]; - - /** - * Initialize a new `Command`. - * - * @param {string} [name] - */ - constructor(name?: string); - - /** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {string} str - * @param {string} [flags] - * @returns {Command} for chaining - */ - version(str: string, flags?: string): Command; - - /** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * @example - * program - * .version('0.0.1') - * .option('-C, --chdir <path>', 'change the working directory') - * .option('-c, --config <path>', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function() { - * console.log('setup'); - * }); - * - * program - * .command('exec <cmd>') - * .description('run the given remote command') - * .action(function(cmd) { - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('teardown <dir> [otherDirs...]') - * .description('run teardown commands') - * .action(function(dir, otherDirs) { - * console.log('dir "%s"', dir); - * if (otherDirs) { - * otherDirs.forEach(function (oDir) { - * console.log('dir "%s"', oDir); - * }); - * } - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env) { - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {string} name - * @param {string} [desc] for git-style sub-commands - * @param {CommandOptions} [opts] command options - * @returns {Command} the new command - */ - command(name: string, desc?: string, opts?: commander.CommandOptions): Command; - - /** - * Define argument syntax for the top-level command. - * - * @param {string} desc - * @returns {Command} for chaining - */ - arguments(desc: string): Command; - - /** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {string[]} args - * @returns {Command} for chaining - */ - parseExpectedArgs(args: string[]): Command; - - /** - * Register callback `fn` for the command. - * - * @example - * program - * .command('help') - * .description('display verbose help') - * .action(function() { - * // output help here - * }); - * - * @param {(...args: any[]) => void} fn - * @returns {Command} for chaining - */ - action(fn: (...args: any[]) => void): Command; - - /** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * @example - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to true - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => false - * - * // required argument - * program.option('-C, --chdir <path>', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {string} flags - * @param {string} [description] - * @param {((arg1: any, arg2: any) => void) | RegExp} [fn] function or default - * @param {*} [defaultValue] - * @returns {Command} for chaining - */ - option(flags: string, description?: string, fn?: ((arg1: any, arg2: any) => void) | RegExp, defaultValue?: any): Command; - option(flags: string, description?: string, defaultValue?: any): Command; - - /** - * Allow unknown options on the command line. - * - * @param {boolean} [arg] if `true` or omitted, no error will be thrown for unknown options. - * @returns {Command} for chaining - */ - allowUnknownOption(arg?: boolean): Command; - - /** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {string[]} argv - * @returns {Command} for chaining - */ - parse(argv: string[]): Command; - - /** - * Parse options from `argv` returning `argv` void of these options. - * - * @param {string[]} argv - * @returns {ParseOptionsResult} - */ - parseOptions(argv: string[]): commander.ParseOptionsResult; - - /** - * Return an object containing options as key-value pairs - * - * @returns {{[key: string]: any}} - */ - opts(): { [key: string]: any }; - - /** - * Set the description to `str`. - * - * @param {string} str - * @param {{[argName: string]: string}} argsDescription - * @return {(Command | string)} - */ - description(str: string, argsDescription?: {[argName: string]: string}): Command; - description(): string; - - /** - * Set an alias for the command. - * - * @param {string} alias - * @return {(Command | string)} - */ - alias(alias: string): Command; - alias(): string; - - /** - * Set or get the command usage. - * - * @param {string} str - * @return {(Command | string)} - */ - usage(str: string): Command; - usage(): string; - - /** - * Set the name of the command. - * - * @param {string} str - * @return {Command} - */ - name(str: string): Command; - - /** - * Get the name of the command. - * - * @return {string} - */ - name(): string; - - /** - * Output help information for this command. - * - * @param {(str: string) => string} [cb] - */ - outputHelp(cb?: (str: string) => string): void; - - /** Output help information and exit. - * - * @param {(str: string) => string} [cb] - */ - help(cb?: (str: string) => string): never; - } - -} - -declare namespace commander { - - type Command = local.Command - - type Option = local.Option - - interface CommandOptions { - noHelp?: boolean; - isDefault?: boolean; - } - - interface ParseOptionsResult { - args: string[]; - unknown: string[]; - } - - interface CommanderStatic extends Command { - Command: typeof local.Command; - Option: typeof local.Option; - CommandOptions: CommandOptions; - ParseOptionsResult: ParseOptionsResult; - } - -} - -declare const commander: commander.CommanderStatic; -export = commander; diff --git a/node_modules/d3-array/LICENSE b/node_modules/d3-array/LICENSE deleted file mode 100644 index 894ddc6549f17d1694d5890c4e6011d95ffc5747..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2020 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-array/README.md b/node_modules/d3-array/README.md deleted file mode 100644 index 5d4667a19922212fede04f781e32c766522499c4..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/README.md +++ /dev/null @@ -1,808 +0,0 @@ -# d3-array - -Data in JavaScript is often represented by an iterable (such as an [array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array), [set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set) or [generator](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Generator)), and so iterable manipulation is a common task when analyzing or visualizing data. For example, you might take a contiguous slice (subset) of an array, filter an array using a predicate function, or map an array to a parallel set of values using a transform function. Before looking at the methods that d3-array provides, familiarize yourself with the powerful [array methods built-in to JavaScript](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array). - -JavaScript includes **mutation methods** that modify the array: - -* [*array*.pop](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/pop) - Remove the last element from the array. -* [*array*.push](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/push) - Add one or more elements to the end of the array. -* [*array*.reverse](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse) - Reverse the order of the elements of the array. -* [*array*.shift](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/shift) - Remove the first element from the array. -* [*array*.sort](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) - Sort the elements of the array. -* [*array*.splice](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice) - Add or remove elements from the array. -* [*array*.unshift](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/unshift) - Add one or more elements to the front of the array. - -There are also **access methods** that return some representation of the array: - -* [*array*.concat](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/concat) - Join the array with other array(s) or value(s). -* [*array*.join](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/join) - Join all elements of the array into a string. -* [*array*.slice](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/slice) - Extract a section of the array. -* [*array*.indexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/indexOf) - Find the first occurrence of a value within the array. -* [*array*.lastIndexOf](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/lastIndexOf) - Find the last occurrence of a value within the array. - -And finally **iteration methods** that apply functions to elements in the array: - -* [*array*.filter](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/filter) - Create a new array with only the elements for which a predicate is true. -* [*array*.forEach](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach) - Call a function for each element in the array. -* [*array*.every](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/every) - See if every element in the array satisfies a predicate. -* [*array*.map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/map) - Create a new array with the result of calling a function on every element in the array. -* [*array*.some](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/some) - See if at least one element in the array satisfies a predicate. -* [*array*.reduce](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce) - Apply a function to reduce the array to a single value (from left-to-right). -* [*array*.reduceRight](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/reduceRight) - Apply a function to reduce the array to a single value (from right-to-left). - -## Installing - -If you use NPM, `npm install d3-array`. Otherwise, download the [latest release](https://github.com/d3/d3-array/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-array.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-array.v2.min.js"></script> -<script> - -var min = d3.min(array); - -</script> -``` - -## API Reference - -* [Statistics](#statistics) -* [Search](#search) -* [Transformations](#transformations) -* [Iterables](#iterables) -* [Sets](#sets) -* [Bins](#bins) - -### Statistics - -Methods for computing basic summary statistics. - -<a name="min" href="#min">#</a> d3.<b>min</b>(<i>iterable</i>[, <i>accessor</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/min.js), [Examples](https://observablehq.com/@d3/d3-min-d3-max-d3-extent) - -Returns the minimum value in the given *iterable* using natural order. If the iterable contains no comparable values, returns undefined. An optional *accessor* function may be specified, which is equivalent to calling Array.from before computing the minimum value. - -Unlike the built-in [Math.min](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Math/min), this method ignores undefined, null and NaN values; this is useful for ignoring missing data. In addition, elements are compared using natural order rather than numeric order. For example, the minimum of the strings [“20â€, “3â€] is “20â€, while the minimum of the numbers [20, 3] is 3. - -See also [extent](#extent). - -<a name="minIndex" href="#minIndex">#</a> d3.<b>minIndex</b>(<i>iterable</i>[, <i>accessor</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/minIndex.js), [Examples](https://observablehq.com/@d3/d3-min-d3-max-d3-extent) - -Returns the index of the minimum value in the given *iterable* using natural order. If the iterable contains no comparable values, returns -1. An optional *accessor* function may be specified, which is equivalent to calling Array.from before computing the minimum value. - -Unlike the built-in [Math.min](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Math/min), this method ignores undefined, null and NaN values; this is useful for ignoring missing data. In addition, elements are compared using natural order rather than numeric order. For example, the minimum of the strings [“20â€, “3â€] is “20â€, while the minimum of the numbers [20, 3] is 3. - -<a name="max" href="#max">#</a> d3.<b>max</b>(<i>iterable</i>[, <i>accessor</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/max.js), [Examples](https://observablehq.com/@d3/d3-min-d3-max-d3-extent) - -Returns the maximum value in the given *iterable* using natural order. If the iterable contains no comparable values, returns undefined. An optional *accessor* function may be specified, which is equivalent to calling Array.from before computing the maximum value. - -Unlike the built-in [Math.max](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Math/max), this method ignores undefined values; this is useful for ignoring missing data. In addition, elements are compared using natural order rather than numeric order. For example, the maximum of the strings [“20â€, “3â€] is “3â€, while the maximum of the numbers [20, 3] is 20. - -See also [extent](#extent). - -<a name="maxIndex" href="#maxIndex">#</a> d3.<b>maxIndex</b>(<i>iterable</i>[, <i>accessor</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/maxIndex.js), [Examples](https://observablehq.com/@d3/d3-min-d3-max-d3-extent) - -Returns the index of the maximum value in the given *iterable* using natural order. If the iterable contains no comparable values, returns -1. An optional *accessor* function may be specified, which is equivalent to calling Array.from before computing the maximum value. - -Unlike the built-in [Math.max](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Math/max), this method ignores undefined values; this is useful for ignoring missing data. In addition, elements are compared using natural order rather than numeric order. For example, the maximum of the strings [“20â€, “3â€] is “3â€, while the maximum of the numbers [20, 3] is 20. - -<a name="extent" href="#extent">#</a> d3.<b>extent</b>(<i>iterable</i>[, <i>accessor</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/extent.js), [Examples](https://observablehq.com/@d3/d3-min-d3-max-d3-extent) - -Returns the [minimum](#min) and [maximum](#max) value in the given *iterable* using natural order. If the iterable contains no comparable values, returns [undefined, undefined]. An optional *accessor* function may be specified, which is equivalent to calling Array.from before computing the extent. - -<a name="sum" href="#sum">#</a> d3.<b>sum</b>(<i>iterable</i>[, <i>accessor</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/sum.js), [Examples](https://observablehq.com/@d3/d3-sum) - -Returns the sum of the given *iterable* of numbers. If the iterable contains no numbers, returns 0. An optional *accessor* function may be specified, which is equivalent to calling Array.from before computing the sum. This method ignores undefined and NaN values; this is useful for ignoring missing data. - -<a name="mean" href="#mean">#</a> d3.<b>mean</b>(<i>iterable</i>[, <i>accessor</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/mean.js), [Examples](https://observablehq.com/@d3/d3-mean-d3-median-and-friends) - -Returns the mean of the given *iterable* of numbers. If the iterable contains no numbers, returns undefined. An optional *accessor* function may be specified, which is equivalent to calling Array.from before computing the mean. This method ignores undefined and NaN values; this is useful for ignoring missing data. - -<a name="median" href="#median">#</a> d3.<b>median</b>(<i>iterable</i>[, <i>accessor</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/median.js), [Examples](https://observablehq.com/@d3/d3-mean-d3-median-and-friends) - -Returns the median of the given *iterable* of numbers using the [R-7 method](https://en.wikipedia.org/wiki/Quantile#Estimating_quantiles_from_a_sample). If the iterable contains no numbers, returns undefined. An optional *accessor* function may be specified, which is equivalent to calling Array.from before computing the median. This method ignores undefined and NaN values; this is useful for ignoring missing data. - -<a name="cumsum" href="#cumsum">#</a> d3.<b>cumsum</b>(<i>iterable</i>[, <i>accessor</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/cumsum.js), [Examples](https://observablehq.com/@d3/d3-cumsum) - -Returns the cumulative sum of the given *iterable* of numbers, as a Float64Array of the same length. If the iterable contains no numbers, returns zeros. An optional *accessor* function may be specified, which is equivalent to calling Array.from before computing the cumulative sum. This method ignores undefined and NaN values; this is useful for ignoring missing data. - -<a name="quantile" href="#quantile">#</a> d3.<b>quantile</b>(<i>iterable</i>, <i>p</i>[, <i>accessor</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/quantile.js), [Examples](https://observablehq.com/@d3/d3-mean-d3-median-and-friends) - -Returns the *p*-quantile of the given *iterable* of numbers, where *p* is a number in the range [0, 1]. For example, the median can be computed using *p* = 0.5, the first quartile at *p* = 0.25, and the third quartile at *p* = 0.75. This particular implementation uses the [R-7 method](http://en.wikipedia.org/wiki/Quantile#Quantiles_of_a_population), which is the default for the R programming language and Excel. For example: - -```js -var a = [0, 10, 30]; -d3.quantile(a, 0); // 0 -d3.quantile(a, 0.5); // 10 -d3.quantile(a, 1); // 30 -d3.quantile(a, 0.25); // 5 -d3.quantile(a, 0.75); // 20 -d3.quantile(a, 0.1); // 2 -``` - -An optional *accessor* function may be specified, which is equivalent to calling *array*.map(*accessor*) before computing the quantile. - -<a name="quantileSorted" href="#quantileSorted">#</a> d3.<b>quantileSorted</b>(<i>array</i>, <i>p</i>[, <i>accessor</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/quantile.js), [Examples](https://observablehq.com/@d3/d3-mean-d3-median-and-friends) - -Similar to *quantile*, but expects the input to be a **sorted** *array* of values. In contrast with *quantile*, the accessor is only called on the elements needed to compute the quantile. - -<a name="variance" href="#variance">#</a> d3.<b>variance</b>(<i>iterable</i>[, <i>accessor</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/variance.js), [Examples](https://observablehq.com/@d3/d3-mean-d3-median-and-friends) - -Returns an [unbiased estimator of the population variance](http://mathworld.wolfram.com/SampleVariance.html) of the given *iterable* of numbers using [Welford’s algorithm](https://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Welford's_online_algorithm). If the iterable has fewer than two numbers, returns undefined. An optional *accessor* function may be specified, which is equivalent to calling Array.from before computing the variance. This method ignores undefined and NaN values; this is useful for ignoring missing data. - -<a name="deviation" href="#deviation">#</a> d3.<b>deviation</b>(<i>iterable</i>[, <i>accessor</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/deviation.js), [Examples](https://observablehq.com/@d3/d3-mean-d3-median-and-friends) - -Returns the standard deviation, defined as the square root of the [bias-corrected variance](#variance), of the given *iterable* of numbers. If the iterable has fewer than two numbers, returns undefined. An optional *accessor* function may be specified, which is equivalent to calling Array.from before computing the standard deviation. This method ignores undefined and NaN values; this is useful for ignoring missing data. - -<a name="fsum" href="#fsum">#</a> d3.<b>fsum</b>([<i>values</i>][, <i>accessor</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/fsum.js), [Examples](https://observablehq.com/@d3/d3-fsum) - -Returns a full precision summation of the given *values*. - -```js -d3.fsum([.1, .1, .1, .1, .1, .1, .1, .1, .1, .1]); // 1 -d3.sum([.1, .1, .1, .1, .1, .1, .1, .1, .1, .1]); // 0.9999999999999999 -``` - -Although slower, d3.fsum can replace d3.sum wherever greater precision is needed. Uses <a href="#adder">d3.Adder</a>. - -<a name="adder" href="#adder">#</a> new d3.<b>Adder</b>() - -Creates a full precision adder for [IEEE 754](https://en.wikipedia.org/wiki/IEEE_754) floating point numbers, setting its initial value to 0. - -<a name="adder_add" href="#adder_add">#</a> *adder*.<b>add</b>(<i>number</i>) - -Adds the specified *number* to the adder’s current value and returns the adder. - -<a name="adder_valueOf" href="#adder_valueOf">#</a> *adder*.<b>valueOf</b>() - -Returns the IEEE 754 double precision representation of the adder’s current value. Most useful as the short-hand notation `+adder`. - -### Search - -Methods for searching arrays for a specific element. - -<a name="least" href="#least">#</a> d3.<b>least</b>(<i>iterable</i>[, <i>comparator</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/least.js), [Examples](https://observablehq.com/@d3/d3-least) -<br><a name="least" href="#least">#</a> d3.<b>least</b>(<i>iterable</i>[, <i>accessor</i>]) - -Returns the least element of the specified *iterable* according to the specified *comparator* or *accessor*. If the given *iterable* contains no comparable elements (*i.e.*, the comparator returns NaN when comparing each element to itself), returns undefined. If *comparator* is not specified, it defaults to [ascending](#ascending). For example: - -```js -const array = [{foo: 42}, {foo: 91}]; -d3.least(array, (a, b) => a.foo - b.foo); // {foo: 42} -d3.least(array, (a, b) => b.foo - a.foo); // {foo: 91} -d3.least(array, a => a.foo); // {foo: 42} -``` - -This function is similar to [min](#min), except it allows the use of a comparator rather than an accessor. - -<a name="leastIndex" href="#leastIndex">#</a> d3.<b>leastIndex</b>(<i>iterable</i>[, <i>comparator</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/leastIndex.js), [Examples](https://observablehq.com/@d3/d3-least) -<br><a name="leastIndex" href="#leastIndex">#</a> d3.<b>leastIndex</b>(<i>iterable</i>[, <i>accessor</i>]) - -Returns the index of the least element of the specified *iterable* according to the specified *comparator* or *accessor*. If the given *iterable* contains no comparable elements (*i.e.*, the comparator returns NaN when comparing each element to itself), returns -1. If *comparator* is not specified, it defaults to [ascending](#ascending). For example: - -```js -const array = [{foo: 42}, {foo: 91}]; -d3.leastIndex(array, (a, b) => a.foo - b.foo); // 0 -d3.leastIndex(array, (a, b) => b.foo - a.foo); // 1 -d3.leastIndex(array, a => a.foo); // 0 -``` - -This function is similar to [minIndex](#minIndex), except it allows the use of a comparator rather than an accessor. - -<a name="greatest" href="#greatest">#</a> d3.<b>greatest</b>(<i>iterable</i>[, <i>comparator</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/greatest.js), [Examples](https://observablehq.com/@d3/d3-least) -<br><a name="greatest" href="#greatest">#</a> d3.<b>greatest</b>(<i>iterable</i>[, <i>accessor</i>]) - -Returns the greatest element of the specified *iterable* according to the specified *comparator* or *accessor*. If the given *iterable* contains no comparable elements (*i.e.*, the comparator returns NaN when comparing each element to itself), returns undefined. If *comparator* is not specified, it defaults to [ascending](#ascending). For example: - -```js -const array = [{foo: 42}, {foo: 91}]; -d3.greatest(array, (a, b) => a.foo - b.foo); // {foo: 91} -d3.greatest(array, (a, b) => b.foo - a.foo); // {foo: 42} -d3.greatest(array, a => a.foo); // {foo: 91} -``` - -This function is similar to [max](#max), except it allows the use of a comparator rather than an accessor. - -<a name="greatestIndex" href="#greatestIndex">#</a> d3.<b>greatestIndex</b>(<i>iterable</i>[, <i>comparator</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/greatestIndex.js), [Examples](https://observablehq.com/@d3/d3-least) -<br><a name="greatestIndex" href="#greatestIndex">#</a> d3.<b>greatestIndex</b>(<i>iterable</i>[, <i>accessor</i>]) - -Returns the index of the greatest element of the specified *iterable* according to the specified *comparator* or *accessor*. If the given *iterable* contains no comparable elements (*i.e.*, the comparator returns NaN when comparing each element to itself), returns -1. If *comparator* is not specified, it defaults to [ascending](#ascending). For example: - -```js -const array = [{foo: 42}, {foo: 91}]; -d3.greatestIndex(array, (a, b) => a.foo - b.foo); // 1 -d3.greatestIndex(array, (a, b) => b.foo - a.foo); // 0 -d3.greatestIndex(array, a => a.foo); // 1 -``` - -This function is similar to [maxIndex](#maxIndex), except it allows the use of a comparator rather than an accessor. - -<a name="bisectLeft" href="#bisectLeft">#</a> d3.<b>bisectLeft</b>(<i>array</i>, <i>x</i>[, <i>lo</i>[, <i>hi</i>]]) · [Source](https://github.com/d3/d3-array/blob/master/src/bisect.js) - -Returns the insertion point for *x* in *array* to maintain sorted order. The arguments *lo* and *hi* may be used to specify a subset of the array which should be considered; by default the entire array is used. If *x* is already present in *array*, the insertion point will be before (to the left of) any existing entries. The return value is suitable for use as the first argument to [splice](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/splice) assuming that *array* is already sorted. The returned insertion point *i* partitions the *array* into two halves so that all *v* < *x* for *v* in *array*.slice(*lo*, *i*) for the left side and all *v* >= *x* for *v* in *array*.slice(*i*, *hi*) for the right side. - -<a name="bisect" href="#bisect">#</a> d3.<b>bisect</b>(<i>array</i>, <i>x</i>[, <i>lo</i>[, <i>hi</i>]]) · [Source](https://github.com/d3/d3-array/blob/master/src/bisect.js), [Examples](https://observablehq.com/@d3/d3-bisect) -<br><a name="bisectRight" href="#bisectRight">#</a> d3.<b>bisectRight</b>(<i>array</i>, <i>x</i>[, <i>lo</i>[, <i>hi</i>]]) - -Similar to [bisectLeft](#bisectLeft), but returns an insertion point which comes after (to the right of) any existing entries of *x* in *array*. The returned insertion point *i* partitions the *array* into two halves so that all *v* <= *x* for *v* in *array*.slice(*lo*, *i*) for the left side and all *v* > *x* for *v* in *array*.slice(*i*, *hi*) for the right side. - -<a name="bisectCenter" href="#bisectCenter">#</a> d3.<b>bisectCenter</b>(<i>array</i>, <i>x</i>[, <i>lo</i>[, <i>hi</i>]]) · [Source](https://github.com/d3/d3-array/blob/master/src/bisect.js), [Examples](https://observablehq.com/@d3/multi-line-chart) - -Returns the index of the value closest to *x* in the given *array* of numbers. The arguments *lo* (inclusive) and *hi* (exclusive) may be used to specify a subset of the array which should be considered; by default the entire array is used. - -See [*bisector*.center](#bisector_center). - -<a name="bisector" href="#bisector">#</a> d3.<b>bisector</b>(<i>accessor</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/bisector.js) -<br><a name="bisector" href="#bisector">#</a> d3.<b>bisector</b>(<i>comparator</i>) - -Returns a new bisector using the specified *accessor* or *comparator* function. This method can be used to bisect arrays of objects instead of being limited to simple arrays of primitives. For example, given the following array of objects: - -```js -var data = [ - {date: new Date(2011, 1, 1), value: 0.5}, - {date: new Date(2011, 2, 1), value: 0.6}, - {date: new Date(2011, 3, 1), value: 0.7}, - {date: new Date(2011, 4, 1), value: 0.8} -]; -``` - -A suitable bisect function could be constructed as: - -```js -var bisectDate = d3.bisector(function(d) { return d.date; }).right; -``` - -This is equivalent to specifying a comparator: - -```js -var bisectDate = d3.bisector(function(d, x) { return d.date - x; }).right; -``` - -And then applied as *bisectDate*(*array*, *date*), returning an index. Note that the comparator is always passed the search value *x* as the second argument. Use a comparator rather than an accessor if you want values to be sorted in an order different than natural order, such as in descending rather than ascending order. - -<a name="bisector_left" href="#bisector_left">#</a> <i>bisector</i>.<b>left</b>(<i>array</i>, <i>x</i>[, <i>lo</i>[, <i>hi</i>]]) · [Source](https://github.com/d3/d3-array/blob/master/src/bisector.js) - -Equivalent to [bisectLeft](#bisectLeft), but uses this bisector’s associated comparator. - -<a name="bisector_right" href="#bisector_right">#</a> <i>bisector</i>.<b>right</b>(<i>array</i>, <i>x</i>[, <i>lo</i>[, <i>hi</i>]]) · [Source](https://github.com/d3/d3-array/blob/master/src/bisector.js) - -Equivalent to [bisectRight](#bisectRight), but uses this bisector’s associated comparator. - -<a name="bisector_center" href="#bisector_center">#</a> <i>bisector</i>.<b>center</b>(<i>array</i>, <i>x</i>[, <i>lo</i>[, <i>hi</i>]]) · [Source](https://github.com/d3/d3-array/blob/master/src/bisector.js) - -Returns the index of the closest value to *x* in the given sorted *array*. This expects that the bisector’s associated accessor returns a quantitative value, or that the bisector’s associated comparator returns a signed distance; otherwise, this method is equivalent to *bisector*.left. - -<a name="quickselect" href="#quickselect">#</a> d3.<b>quickselect</b>(<i>array</i>, <i>k</i>, <i>left</i> = 0, <i>right</i> = <i>array</i>.length - 1, <i>compare</i> = ascending) · [Source](https://github.com/d3/d3-array/blob/master/src/quickselect.js), [Examples](https://observablehq.com/@d3/d3-quickselect) - -See [mourner/quickselect](https://github.com/mourner/quickselect/blob/master/README.md). - -<a name="ascending" href="#ascending">#</a> d3.<b>ascending</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/ascending.js), [Examples](https://observablehq.com/@d3/d3-ascending) - -Returns -1 if *a* is less than *b*, or 1 if *a* is greater than *b*, or 0. This is the comparator function for natural order, and can be used in conjunction with the built-in [*array*.sort](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) method to arrange elements in ascending order. It is implemented as: - -```js -function ascending(a, b) { - return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; -} -``` - -Note that if no comparator function is specified to the built-in sort method, the default order is lexicographic (alphabetical), not natural! This can lead to surprising behavior when sorting an array of numbers. - -<a name="descending" href="#descending">#</a> d3.<b>descending</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/descending.js), [Examples](https://observablehq.com/@d3/d3-ascending) - -Returns -1 if *a* is greater than *b*, or 1 if *a* is less than *b*, or 0. This is the comparator function for reverse natural order, and can be used in conjunction with the built-in array sort method to arrange elements in descending order. It is implemented as: - -```js -function descending(a, b) { - return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; -} -``` - -Note that if no comparator function is specified to the built-in sort method, the default order is lexicographic (alphabetical), not natural! This can lead to surprising behavior when sorting an array of numbers. - -### Transformations - -Methods for transforming arrays and for generating new arrays. - -<a name="group" href="#group">#</a> d3.<b>group</b>(<i>iterable</i>, <i>...keys</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/group.js), [Examples](https://observablehq.com/@d3/d3-group-d3-rollup) - -Groups the specified *iterable* of values into a Map from *key* to array of value. For example, given some data: - -```js -data = [ - {name: "jim", amount: "34.0", date: "11/12/2015"}, - {name: "carl", amount: "120.11", date: "11/12/2015"}, - {name: "stacy", amount: "12.01", date: "01/04/2016"}, - {name: "stacy", amount: "34.05", date: "01/04/2016"} -] -``` - -To group the data by name: - -```js -d3.group(data, d => d.name) -``` - -This produces: - -```js -Map(3) { - "jim" => Array(1) - "carl" => Array(1) - "stacy" => Array(2) -} -``` - -If more than one *key* is specified, a nested Map is returned. For example: - -```js -d3.group(data, d => d.name, d => d.date) -``` - -This produces: - -```js -Map(3) { - "jim" => Map(1) { - "11/12/2015" => Array(1) - } - "carl" => Map(1) { - "11/12/2015" => Array(1) - } - "stacy" => Map(1) { - "01/04/2016" => Array(2) - } -} -``` - -To convert a Map to an Array, use [Array.from](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from). For example: - -```js -Array.from(d3.group(data, d => d.name)) -``` - -This produces: - -```js -[ - ["jim", Array(1)], - ["carl", Array(1)], - ["stacy", Array(2)] -] -``` - -You can also simultaneously convert the [*key*, *value*] to some other representation by passing a map function to Array.from: - -```js -Array.from(d3.group(data, d => d.name), ([key, value]) => ({key, value})) -``` - -This produces: - -```js -[ - {key: "jim", value: Array(1)}, - {key: "carl", value: Array(1)}, - {key: "stacy", value: Array(2)} -] -``` - -In the near future, [*selection*.data](https://github.com/d3/d3-selection/blob/master/README.md#selection_data) will accept iterables directly, meaning that you can use a Map (or Set or other iterable) to perform a data join without first needing to convert to an array. - -<a name="groups" href="#groups">#</a> d3.<b>groups</b>(<i>iterable</i>, <i>...keys</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/group.js), [Examples](https://observablehq.com/@d3/d3-group-d3-rollup) - -Equivalent to [group](#group), but returns nested arrays instead of nested maps. - -<a name="index" href="#index">#</a> d3.<b>index</b>(<i>iterable</i>, <i>...keys</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/group.js)<!-- , [Examples](https://observablehq.com/@d3/d3-index) --> - -Equivalent to [group](#group) but returns a unique value per compound key instead of an array, throwing if the key is not unique. - -For example, given the data defined above, - -```js -d3.index(data, d => d.amount) -``` - -returns - -```js -Map(4) { - "34.0" => Object {name: "jim", amount: "34.0", date: "11/12/2015"} - "120.11" => Object {name: "carl", amount: "120.11", date: "11/12/2015"} - "12.01" => Object {name: "stacy", amount: "12.01", date: "01/04/2016"} - "34.05" => Object {name: "stacy", amount: "34.05", date: "01/04/2016"} -} -``` - -On the other hand, - -```js -d3.index(data, d => d.name) -``` - -throws an error because two objects share the same name. - -<a name="indexes" href="#indexes">#</a> d3.<b>indexes</b>(<i>iterable</i>, <i>...keys</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/group.js)<!-- , [Examples](https://observablehq.com/@d3/d3-index) --> - -Equivalent to [index](#index), but returns nested arrays instead of nested maps. - -<a name="rollup" href="#rollup">#</a> d3.<b>rollup</b>(<i>iterable</i>, <i>reduce</i>, <i>...keys</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/group.js), [Examples](https://observablehq.com/@d3/d3-group-d3-rollup) - -[Groups](#group) and reduces the specified *iterable* of values into a Map from *key* to value. For example, given some data: - -```js -data = [ - {name: "jim", amount: "34.0", date: "11/12/2015"}, - {name: "carl", amount: "120.11", date: "11/12/2015"}, - {name: "stacy", amount: "12.01", date: "01/04/2016"}, - {name: "stacy", amount: "34.05", date: "01/04/2016"} -] -``` - -To count the number of elements by name: - -```js -d3.rollup(data, v => v.length, d => d.name) -``` - -This produces: - -```js -Map(3) { - "jim" => 1 - "carl" => 1 - "stacy" => 2 -} -``` - -If more than one *key* is specified, a nested Map is returned. For example: - -```js -d3.rollup(data, v => v.length, d => d.name, d => d.date) -``` - -This produces: - -```js -Map(3) { - "jim" => Map(1) { - "11/12/2015" => 1 - } - "carl" => Map(1) { - "11/12/2015" => 1 - } - "stacy" => Map(1) { - "01/04/2016" => 2 - } -} -``` - -To convert a Map to an Array, use [Array.from](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from). See [d3.group](#group) for examples. - -<a name="rollups" href="#rollups">#</a> d3.<b>rollups</b>(<i>iterable</i>, <i>...keys</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/group.js), [Examples](https://observablehq.com/@d3/d3-group-d3-rollup) - -Equivalent to [rollup](#rollup), but returns nested arrays instead of nested maps. - -<a name="count" href="#count">#</a> d3.<b>count</b>(<i>iterable</i>[, <i>accessor</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/count.js), [Examples](https://observablehq.com/@d3/d3-count) - -Returns the number of valid number values (*i.e.*, not null, NaN, or undefined) in the specified *iterable*; accepts an accessor. - -For example: - -```js -d3.count([{n: "Alice", age: NaN}, {n: "Bob", age: 18}, {n: "Other"}], d => d.age) // 1 -``` -<a name="cross" href="#cross">#</a> d3.<b>cross</b>(<i>...iterables</i>[, <i>reducer</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/cross.js), [Examples](https://observablehq.com/@d3/d3-cross) - -Returns the [Cartesian product](https://en.wikipedia.org/wiki/Cartesian_product) of the specified *iterables*. For example, if two iterables *a* and *b* are specified, for each element *i* in the iterable *a* and each element *j* in the iterable *b*, in order, invokes the specified *reducer* function passing the element *i* and element *j*. If a *reducer* is not specified, it defaults to a function which creates a two-element array for each pair: - -```js -function pair(a, b) { - return [a, b]; -} -``` - -For example: - -```js -d3.cross([1, 2], ["x", "y"]); // returns [[1, "x"], [1, "y"], [2, "x"], [2, "y"]] -d3.cross([1, 2], ["x", "y"], (a, b) => a + b); // returns ["1x", "1y", "2x", "2y"] -``` - -<a name="merge" href="#merge">#</a> d3.<b>merge</b>(<i>iterables</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/merge.js), [Examples](https://observablehq.com/@d3/d3-merge) - -Merges the specified iterable of *iterables* into a single array. This method is similar to the built-in array concat method; the only difference is that it is more convenient when you have an array of arrays. - -```js -d3.merge([[1], [2, 3]]); // returns [1, 2, 3] -``` - -<a name="pairs" href="#pairs">#</a> d3.<b>pairs</b>(<i>iterable</i>[, <i>reducer</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/pairs.js), [Examples](https://observablehq.com/@d3/d3-pairs) - -For each adjacent pair of elements in the specified *iterable*, in order, invokes the specified *reducer* function passing the element *i* and element *i* - 1. If a *reducer* is not specified, it defaults to a function which creates a two-element array for each pair: - -```js -function pair(a, b) { - return [a, b]; -} -``` - -For example: - -```js -d3.pairs([1, 2, 3, 4]); // returns [[1, 2], [2, 3], [3, 4]] -d3.pairs([1, 2, 3, 4], (a, b) => b - a); // returns [1, 1, 1]; -``` - -If the specified iterable has fewer than two elements, returns the empty array. - -<a name="permute" href="#permute">#</a> d3.<b>permute</b>(<i>source</i>, <i>keys</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/permute.js), [Examples](https://observablehq.com/@d3/d3-permute) - -Returns a permutation of the specified *source* object (or array) using the specified iterable of *keys*. The returned array contains the corresponding property of the source object for each key in *keys*, in order. For example: - -```js -permute(["a", "b", "c"], [1, 2, 0]); // returns ["b", "c", "a"] -``` - -It is acceptable to have more keys than source elements, and for keys to be duplicated or omitted. - -This method can also be used to extract the values from an object into an array with a stable order. Extracting keyed values in order can be useful for generating data arrays in nested selections. For example: - -```js -let object = {yield: 27, variety: "Manchuria", year: 1931, site: "University Farm"}; -let fields = ["site", "variety", "yield"]; - -d3.permute(object, fields); // returns ["University Farm", "Manchuria", 27] -``` - -<a name="shuffle" href="#shuffle">#</a> d3.<b>shuffle</b>(<i>array</i>[, <i>start</i>[, <i>stop</i>]]) · [Source](https://github.com/d3/d3-array/blob/master/src/shuffle.js), [Examples](https://observablehq.com/@d3/d3-shuffle) - -Randomizes the order of the specified *array* in-place using the [Fisher–Yates shuffle](https://bost.ocks.org/mike/shuffle/) and returns the *array*. If *start* is specified, it is the starting index (inclusive) of the *array* to shuffle; if *start* is not specified, it defaults to zero. If *stop* is specified, it is the ending index (exclusive) of the *array* to shuffle; if *stop* is not specified, it defaults to *array*.length. For example, to shuffle the first ten elements of the *array*: shuffle(*array*, 0, 10). - -<a name="shuffler" href="#shuffler">#</a> d3.<b>shuffler</b>(<i>random</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/shuffle.js) - -Returns a [shuffle function](#shuffle) given the specified random source. For example, using [d3.randomLcg](https://github.com/d3/d3-random/blob/master/README.md#randomLcg): - -```js -const random = d3.randomLcg(0.9051667019185816); -const shuffle = d3.shuffler(random); - -shuffle([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]); // returns [7, 4, 5, 3, 9, 0, 6, 1, 2, 8] -``` - -<a name="ticks" href="#ticks">#</a> d3.<b>ticks</b>(<i>start</i>, <i>stop</i>, <i>count</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/ticks.js), [Examples](https://observablehq.com/@d3/d3-ticks) - -Returns an array of approximately *count* + 1 uniformly-spaced, nicely-rounded values between *start* and *stop* (inclusive). Each value is a power of ten multiplied by 1, 2 or 5. See also [d3.tickIncrement](#tickIncrement), [d3.tickStep](#tickStep) and [*linear*.ticks](https://github.com/d3/d3-scale/blob/master/README.md#linear_ticks). - -Ticks are inclusive in the sense that they may include the specified *start* and *stop* values if (and only if) they are exact, nicely-rounded values consistent with the inferred [step](#tickStep). More formally, each returned tick *t* satisfies *start* ≤ *t* and *t* ≤ *stop*. - -<a name="tickIncrement" href="#tickIncrement">#</a> d3.<b>tickIncrement</b>(<i>start</i>, <i>stop</i>, <i>count</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/ticks.js), [Examples](https://observablehq.com/@d3/d3-ticks) - -Like [d3.tickStep](#tickStep), except requires that *start* is always less than or equal to *stop*, and if the tick step for the given *start*, *stop* and *count* would be less than one, returns the negative inverse tick step instead. This method is always guaranteed to return an integer, and is used by [d3.ticks](#ticks) to guarantee that the returned tick values are represented as precisely as possible in IEEE 754 floating point. - -<a name="tickStep" href="#tickStep">#</a> d3.<b>tickStep</b>(<i>start</i>, <i>stop</i>, <i>count</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/ticks.js), [Examples](https://observablehq.com/@d3/d3-ticks) - -Returns the difference between adjacent tick values if the same arguments were passed to [d3.ticks](#ticks): a nicely-rounded value that is a power of ten multiplied by 1, 2 or 5. Note that due to the limited precision of IEEE 754 floating point, the returned value may not be exact decimals; use [d3-format](https://github.com/d3/d3-format) to format numbers for human consumption. - -<a name="nice" href="#nice">#</a> d3.<b>nice</b>(<i>start</i>, <i>stop</i>, <i>count</i>) - -Returns a new interval [*niceStart*, *niceStop*] covering the given interval [*start*, *stop*] and where *niceStart* and *niceStop* are guaranteed to align with the corresponding [tick step](#tickStep). Like [d3.tickIncrement](#tickIncrement), this requires that *start* is less than or equal to *stop*. - -<a name="range" href="#range">#</a> d3.<b>range</b>([<i>start</i>, ]<i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/range.js), [Examples](https://observablehq.com/@d3/d3-range) - -Returns an array containing an arithmetic progression, similar to the Python built-in [range](http://docs.python.org/library/functions.html#range). This method is often used to iterate over a sequence of uniformly-spaced numeric values, such as the indexes of an array or the ticks of a linear scale. (See also [d3.ticks](#ticks) for nicely-rounded values.) - -If *step* is omitted, it defaults to 1. If *start* is omitted, it defaults to 0. The *stop* value is exclusive; it is not included in the result. If *step* is positive, the last element is the largest *start* + *i* \* *step* less than *stop*; if *step* is negative, the last element is the smallest *start* + *i* \* *step* greater than *stop*. If the returned array would contain an infinite number of values, an empty range is returned. - -The arguments are not required to be integers; however, the results are more predictable if they are. The values in the returned array are defined as *start* + *i* \* *step*, where *i* is an integer from zero to one minus the total number of elements in the returned array. For example: - -```js -d3.range(0, 1, 0.2) // [0, 0.2, 0.4, 0.6000000000000001, 0.8] -``` - -This unexpected behavior is due to IEEE 754 double-precision floating point, which defines 0.2 * 3 = 0.6000000000000001. Use [d3-format](https://github.com/d3/d3-format) to format numbers for human consumption with appropriate rounding; see also [linear.tickFormat](https://github.com/d3/d3-scale/blob/master/README.md#linear_tickFormat) in [d3-scale](https://github.com/d3/d3-scale). - -Likewise, if the returned array should have a specific length, consider using [array.map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/map) on an integer range. For example: - -```js -d3.range(0, 1, 1 / 49); // BAD: returns 50 elements! -d3.range(49).map(function(d) { return d / 49; }); // GOOD: returns 49 elements. -``` - -<a name="transpose" href="#transpose">#</a> d3.<b>transpose</b>(<i>matrix</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/transpose.js), [Examples](https://observablehq.com/@d3/d3-transpose) - -Uses the [zip](#zip) operator as a two-dimensional [matrix transpose](http://en.wikipedia.org/wiki/Transpose). - -<a name="zip" href="#zip">#</a> d3.<b>zip</b>(<i>arrays…</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/zip.js), [Examples](https://observablehq.com/@d3/d3-transpose) - -Returns an array of arrays, where the *i*th array contains the *i*th element from each of the argument *arrays*. The returned array is truncated in length to the shortest array in *arrays*. If *arrays* contains only a single array, the returned array contains one-element arrays. With no arguments, the returned array is empty. - -```js -d3.zip([1, 2], [3, 4]); // returns [[1, 3], [2, 4]] -``` - -### Iterables - -These are equivalent to built-in array methods, but work with any iterable including Map, Set, and Generator. - -<a name="every" href="#every">#</a> d3.<b>every</b>(<i>iterable</i>, <i>test</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/every.js) - -Returns true if the given *test* function returns true for every value in the given *iterable*. This method returns as soon as *test* returns a non-truthy value or all values are iterated over. Equivalent to [*array*.every](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every): - -```js -d3.every(new Set([1, 3, 5, 7]), x => x & 1) // true -``` - -<a name="some" href="#some">#</a> d3.<b>some</b>(<i>iterable</i>, <i>test</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/some.js) - -Returns true if the given *test* function returns true for any value in the given *iterable*. This method returns as soon as *test* returns a truthy value or all values are iterated over. Equivalent to [*array*.some](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some): - -```js -d3.some(new Set([0, 2, 3, 4]), x => x & 1) // true -``` - -<a name="filter" href="#filter">#</a> d3.<b>filter</b>(<i>iterable</i>, <i>test</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/filter.js) - -Returns a new array containing the values from *iterable*, in order, for which the given *test* function returns true. Equivalent to [*array*.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter): - -```js -d3.filter(new Set([0, 2, 3, 4]), x => x & 1) // [3] -``` - -<a name="map" href="#map">#</a> d3.<b>map</b>(<i>iterable</i>, <i>mapper</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/map.js) - -Returns a new array containing the mapped values from *iterable*, in order, as defined by given *mapper* function. Equivalent to [*array*.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) and [Array.from](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from): - -```js -d3.map(new Set([0, 2, 3, 4]), x => x & 1) // [0, 0, 1, 0] -``` - -<a name="reduce" href="#reduce">#</a> d3.<b>reduce</b>(<i>iterable</i>, <i>reducer</i>[, <i>initialValue</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/reduce.js) - -Returns the reduced value defined by given *reducer* function, which is repeatedly invoked for each value in *iterable*, being passed the current reduced value and the next value. Equivalent to [*array*.reduce](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce): - -```js -d3.reduce(new Set([0, 2, 3, 4]), (p, v) => p + v, 0) // 9 -``` - -<a name="reverse" href="#reverse">#</a> d3.<b>reverse</b>(<i>iterable</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/reverse.js) - -Returns an array containing the values in the given *iterable* in reverse order. Equivalent to [*array*.reverse](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reverse), except that it does not mutate the given *iterable*: - -```js -d3.reverse(new Set([0, 2, 3, 1])) // [1, 3, 2, 0] -``` - -<a name="sort" href="#sort">#</a> d3.<b>sort</b>(<i>iterable</i>, <i>comparator</i> = d3.ascending) · [Source](https://github.com/d3/d3-array/blob/master/src/sort.js) - -Returns an array containing the values in the given *iterable* in the sorted order defined by the given *comparator* function. If *comparator* is not specified, it defaults to [d3.ascending](#ascending). Equivalent to [*array*.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort), except that it does not mutate the given *iterable*, and the comparator defaults to natural order instead of lexicographic order: - -```js -d3.sort(new Set([0, 2, 3, 1])) // [0, 1, 2, 3] -``` - -### Sets - -This methods implement basic set operations for any iterable. - -<a name="difference" href="#difference">#</a> d3.<b>difference</b>(<i>iterable</i>, ...<i>others</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/difference.js) - -Returns a new Set containing every value in *iterable* that is not in any of the *others* iterables. - -```js -d3.difference([0, 1, 2, 0], [1]) // Set {0, 2} -``` - -<a name="union" href="#union">#</a> d3.<b>union</b>(...<i>iterables</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/union.js) - -Returns a new Set containing every (distinct) value that appears in any of the given *iterables*. The order of values in the returned Set is based on their first occurrence in the given *iterables*. - -```js -d3.union([0, 2, 1, 0], [1, 3]) // Set {0, 2, 1, 3} -``` - -<a name="intersection" href="#intersection">#</a> d3.<b>intersection</b>(...<i>iterables</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/intersection.js) - -Returns a new Set containing every (distinct) value that appears in all of the given *iterables*. The order of values in the returned Set is based on their first occurrence in the given *iterables*. - -```js -d3.intersection([0, 2, 1, 0], [1, 3]) // Set {1} -``` - -<a name="superset" href="#superset">#</a> d3.<b>superset</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/superset.js) - -Returns true if *a* is a superset of *b*: if every value in the given iterable *b* is also in the given iterable *a*. - -```js -d3.superset([0, 2, 1, 3, 0], [1, 3]) // true -``` - -<a name="subset" href="#subset">#</a> d3.<b>subset</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/subset.js) - -Returns true if *a* is a subset of *b*: if every value in the given iterable *a* is also in the given iterable *b*. - -```js -d3.subset([1, 3], [0, 2, 1, 3, 0]) // true -``` - -<a name="disjoint" href="#disjoint">#</a> d3.<b>disjoint</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/disjoint.js) - -Returns true if *a* and *b* are disjoint: if *a* and *b* contain no shared value. - -```js -d3.disjoint([1, 3], [2, 4]) // true -``` - -### Bins - -[<img src="https://raw.githubusercontent.com/d3/d3-array/master/img/histogram.png" width="480" height="250" alt="Histogram">](http://bl.ocks.org/mbostock/3048450) - -Binning groups discrete samples into a smaller number of consecutive, non-overlapping intervals. They are often used to visualize the distribution of numerical data as histograms. - -<a name="bin" href="#bin">#</a> d3.<b>bin</b>() · [Source](https://github.com/d3/d3-array/blob/master/src/bin.js), [Examples](https://observablehq.com/@d3/d3-bin) - -Constructs a new bin generator with the default settings. - -<a name="_bin" href="#_bin">#</a> <i>bin</i>(<i>data</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/bin.js), [Examples](https://observablehq.com/@d3/d3-bin) - -Bins the given iterable of *data* samples. Returns an array of bins, where each bin is an array containing the associated elements from the input *data*. Thus, the `length` of the bin is the number of elements in that bin. Each bin has two additional attributes: - -* `x0` - the lower bound of the bin (inclusive). -* `x1` - the upper bound of the bin (exclusive, except for the last bin). - -<a name="bin_value" href="#bin_value">#</a> <i>bin</i>.<b>value</b>([<i>value</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/bin.js), [Examples](https://observablehq.com/@d3/d3-bin) - -If *value* is specified, sets the value accessor to the specified function or constant and returns this bin generator. If *value* is not specified, returns the current value accessor, which defaults to the identity function. - -When bins are [generated](#_bin), the value accessor will be invoked for each element in the input data array, being passed the element `d`, the index `i`, and the array `data` as three arguments. The default value accessor assumes that the input data are orderable (comparable), such as numbers or dates. If your data are not, then you should specify an accessor that returns the corresponding orderable value for a given datum. - -This is similar to mapping your data to values before invoking the bin generator, but has the benefit that the input data remains associated with the returned bins, thereby making it easier to access other fields of the data. - -<a name="bin_domain" href="#bin_domain">#</a> <i>bin</i>.<b>domain</b>([<i>domain</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/bin.js), [Examples](https://observablehq.com/@d3/d3-bin) - -If *domain* is specified, sets the domain accessor to the specified function or array and returns this bin generator. If *domain* is not specified, returns the current domain accessor, which defaults to [extent](#extent). The bin domain is defined as an array [*min*, *max*], where *min* is the minimum observable value and *max* is the maximum observable value; both values are inclusive. Any value outside of this domain will be ignored when the bins are [generated](#_bin). - -For example, if you are using the bin generator in conjunction with a [linear scale](https://github.com/d3/d3-scale/blob/master/README.md#linear-scales) `x`, you might say: - -```js -var bin = d3.bin() - .domain(x.domain()) - .thresholds(x.ticks(20)); -``` - -You can then compute the bins from an array of numbers like so: - -```js -var bins = bin(numbers); -``` - -If the default [extent](#extent) domain is used and the [thresholds](#bin_thresholds) are specified as a count (rather than explicit values), then the computed domain will be [niced](#nice) such that all bins are uniform width. - -Note that the domain accessor is invoked on the materialized array of [values](#bin_value), not on the input data array. - -<a name="bin_thresholds" href="#bin_thresholds">#</a> <i>bin</i>.<b>thresholds</b>([<i>count</i>]) · [Source](https://github.com/d3/d3-array/blob/master/src/bin.js), [Examples](https://observablehq.com/@d3/d3-bin) -<br><a name="bin_thresholds" href="#bin_thresholds">#</a> <i>bin</i>.<b>thresholds</b>([<i>thresholds</i>]) - -If *thresholds* is specified, sets the [threshold generator](#bin-thresholds) to the specified function or array and returns this bin generator. If *thresholds* is not specified, returns the current threshold generator, which by default implements [Sturges’ formula](#thresholdSturges). (Thus by default, the values to be binned must be numbers!) Thresholds are defined as an array of values [*x0*, *x1*, …]. Any value less than *x0* will be placed in the first bin; any value greater than or equal to *x0* but less than *x1* will be placed in the second bin; and so on. Thus, the [generated bins](#_bin) will have *thresholds*.length + 1 bins. See [bin thresholds](#bin-thresholds) for more information. - -Any threshold values outside the [domain](#bin_domain) are ignored. The first *bin*.x0 is always equal to the minimum domain value, and the last *bin*.x1 is always equal to the maximum domain value. - -If a *count* is specified instead of an array of *thresholds*, then the [domain](#bin_domain) will be uniformly divided into approximately *count* bins; see [ticks](#ticks). - -#### Bin Thresholds - -These functions are typically not used directly; instead, pass them to [*bin*.thresholds](#bin_thresholds). - -<a name="thresholdFreedmanDiaconis" href="#thresholdFreedmanDiaconis">#</a> d3.<b>thresholdFreedmanDiaconis</b>(<i>values</i>, <i>min</i>, <i>max</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/threshold/freedmanDiaconis.js), [Examples](https://observablehq.com/@d3/d3-bin) - -Returns the number of bins according to the [Freedman–Diaconis rule](https://en.wikipedia.org/wiki/Histogram#Mathematical_definition); the input *values* must be numbers. - -<a name="thresholdScott" href="#thresholdScott">#</a> d3.<b>thresholdScott</b>(<i>values</i>, <i>min</i>, <i>max</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/threshold/scott.js), [Examples](https://observablehq.com/@d3/d3-bin) - -Returns the number of bins according to [Scott’s normal reference rule](https://en.wikipedia.org/wiki/Histogram#Mathematical_definition); the input *values* must be numbers. - -<a name="thresholdSturges" href="#thresholdSturges">#</a> d3.<b>thresholdSturges</b>(<i>values</i>) · [Source](https://github.com/d3/d3-array/blob/master/src/threshold/sturges.js), [Examples](https://observablehq.com/@d3/d3-bin) - -Returns the number of bins according to [Sturges’ formula](https://en.wikipedia.org/wiki/Histogram#Mathematical_definition); the input *values* must be numbers. - -You may also implement your own threshold generator taking three arguments: the array of input [*values*](#bin_value) derived from the data, and the [observable domain](#bin_domain) represented as *min* and *max*. The generator may then return either the array of numeric thresholds or the *count* of bins; in the latter case the domain is divided uniformly into approximately *count* bins; see [ticks](#ticks). - -For instance, when binning date values, you might want to use the ticks from a time scale ([Example](https://observablehq.com/@d3/d3-bin-time-thresholds)). diff --git a/node_modules/d3-array/dist/d3-array.js b/node_modules/d3-array/dist/d3-array.js deleted file mode 100644 index 92ee244f02ad4d545341d57e45b181f5976756e6..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/dist/d3-array.js +++ /dev/null @@ -1,1059 +0,0 @@ -// https://d3js.org/d3-array/ v2.8.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.d3 = global.d3 || {})); -}(this, (function (exports) { 'use strict'; - -function ascending(a, b) { - return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; -} - -function bisector(f) { - let delta = f; - let compare = f; - - if (f.length === 1) { - delta = (d, x) => f(d) - x; - compare = ascendingComparator(f); - } - - function left(a, x, lo, hi) { - if (lo == null) lo = 0; - if (hi == null) hi = a.length; - while (lo < hi) { - const mid = (lo + hi) >>> 1; - if (compare(a[mid], x) < 0) lo = mid + 1; - else hi = mid; - } - return lo; - } - - function right(a, x, lo, hi) { - if (lo == null) lo = 0; - if (hi == null) hi = a.length; - while (lo < hi) { - const mid = (lo + hi) >>> 1; - if (compare(a[mid], x) > 0) hi = mid; - else lo = mid + 1; - } - return lo; - } - - function center(a, x, lo, hi) { - if (lo == null) lo = 0; - if (hi == null) hi = a.length; - const i = left(a, x, lo, hi - 1); - return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i; - } - - return {left, center, right}; -} - -function ascendingComparator(f) { - return (d, x) => ascending(f(d), x); -} - -function number(x) { - return x === null ? NaN : +x; -} - -function* numbers(values, valueof) { - if (valueof === undefined) { - for (let value of values) { - if (value != null && (value = +value) >= value) { - yield value; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { - yield value; - } - } - } -} - -const ascendingBisect = bisector(ascending); -const bisectRight = ascendingBisect.right; -const bisectLeft = ascendingBisect.left; -const bisectCenter = bisector(number).center; - -function count(values, valueof) { - let count = 0; - if (valueof === undefined) { - for (let value of values) { - if (value != null && (value = +value) >= value) { - ++count; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { - ++count; - } - } - } - return count; -} - -function length(array) { - return array.length | 0; -} - -function empty(length) { - return !(length > 0); -} - -function arrayify(values) { - return typeof values !== "object" || "length" in values ? values : Array.from(values); -} - -function reducer(reduce) { - return values => reduce(...values); -} - -function cross(...values) { - const reduce = typeof values[values.length - 1] === "function" && reducer(values.pop()); - values = values.map(arrayify); - const lengths = values.map(length); - const j = values.length - 1; - const index = new Array(j + 1).fill(0); - const product = []; - if (j < 0 || lengths.some(empty)) return product; - while (true) { - product.push(index.map((j, i) => values[i][j])); - let i = j; - while (++index[i] === lengths[i]) { - if (i === 0) return reduce ? product.map(reduce) : product; - index[i--] = 0; - } - } -} - -function cumsum(values, valueof) { - var sum = 0, index = 0; - return Float64Array.from(values, valueof === undefined - ? v => (sum += +v || 0) - : v => (sum += +valueof(v, index++, values) || 0)); -} - -function descending(a, b) { - return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; -} - -function variance(values, valueof) { - let count = 0; - let delta; - let mean = 0; - let sum = 0; - if (valueof === undefined) { - for (let value of values) { - if (value != null && (value = +value) >= value) { - delta = value - mean; - mean += delta / ++count; - sum += delta * (value - mean); - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { - delta = value - mean; - mean += delta / ++count; - sum += delta * (value - mean); - } - } - } - if (count > 1) return sum / (count - 1); -} - -function deviation(values, valueof) { - const v = variance(values, valueof); - return v ? Math.sqrt(v) : v; -} - -function extent(values, valueof) { - let min; - let max; - if (valueof === undefined) { - for (const value of values) { - if (value != null) { - if (min === undefined) { - if (value >= value) min = max = value; - } else { - if (min > value) min = value; - if (max < value) max = value; - } - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null) { - if (min === undefined) { - if (value >= value) min = max = value; - } else { - if (min > value) min = value; - if (max < value) max = value; - } - } - } - } - return [min, max]; -} - -// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423 -class Adder { - constructor() { - this._partials = new Float64Array(32); - this._n = 0; - } - add(x) { - const p = this._partials; - let i = 0; - for (let j = 0; j < this._n && j < 32; j++) { - const y = p[j], - hi = x + y, - lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x); - if (lo) p[i++] = lo; - x = hi; - } - p[i] = x; - this._n = i + 1; - return this; - } - valueOf() { - const p = this._partials; - let n = this._n, x, y, lo, hi = 0; - if (n > 0) { - hi = p[--n]; - while (n > 0) { - x = hi; - y = p[--n]; - hi = x + y; - lo = y - (hi - x); - if (lo) break; - } - if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) { - y = lo * 2; - x = hi + y; - if (y == x - hi) hi = x; - } - } - return hi; - } -} - -function fsum(values, valueof) { - const adder = new Adder(); - if (valueof === undefined) { - for (let value of values) { - if (value = +value) { - adder.add(value); - } - } - } else { - let index = -1; - for (let value of values) { - if (value = +valueof(value, ++index, values)) { - adder.add(value); - } - } - } - return +adder; -} - -function identity(x) { - return x; -} - -function group(values, ...keys) { - return nest(values, identity, identity, keys); -} - -function groups(values, ...keys) { - return nest(values, Array.from, identity, keys); -} - -function rollup(values, reduce, ...keys) { - return nest(values, identity, reduce, keys); -} - -function rollups(values, reduce, ...keys) { - return nest(values, Array.from, reduce, keys); -} - -function index(values, ...keys) { - return nest(values, identity, unique, keys); -} - -function indexes(values, ...keys) { - return nest(values, Array.from, unique, keys); -} - -function unique(values) { - if (values.length !== 1) throw new Error("duplicate key"); - return values[0]; -} - -function nest(values, map, reduce, keys) { - return (function regroup(values, i) { - if (i >= keys.length) return reduce(values); - const groups = new Map(); - const keyof = keys[i++]; - let index = -1; - for (const value of values) { - const key = keyof(value, ++index, values); - const group = groups.get(key); - if (group) group.push(value); - else groups.set(key, [value]); - } - for (const [key, values] of groups) { - groups.set(key, regroup(values, i)); - } - return map(groups); - })(values, 0); -} - -var array = Array.prototype; - -var slice = array.slice; - -function constant(x) { - return function() { - return x; - }; -} - -var e10 = Math.sqrt(50), - e5 = Math.sqrt(10), - e2 = Math.sqrt(2); - -function ticks(start, stop, count) { - var reverse, - i = -1, - n, - ticks, - step; - - stop = +stop, start = +start, count = +count; - if (start === stop && count > 0) return [start]; - if (reverse = stop < start) n = start, start = stop, stop = n; - if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return []; - - if (step > 0) { - start = Math.ceil(start / step); - stop = Math.floor(stop / step); - ticks = new Array(n = Math.ceil(stop - start + 1)); - while (++i < n) ticks[i] = (start + i) * step; - } else { - step = -step; - start = Math.ceil(start * step); - stop = Math.floor(stop * step); - ticks = new Array(n = Math.ceil(stop - start + 1)); - while (++i < n) ticks[i] = (start + i) / step; - } - - if (reverse) ticks.reverse(); - - return ticks; -} - -function tickIncrement(start, stop, count) { - var step = (stop - start) / Math.max(0, count), - power = Math.floor(Math.log(step) / Math.LN10), - error = step / Math.pow(10, power); - return power >= 0 - ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) - : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1); -} - -function tickStep(start, stop, count) { - var step0 = Math.abs(stop - start) / Math.max(0, count), - step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), - error = step0 / step1; - if (error >= e10) step1 *= 10; - else if (error >= e5) step1 *= 5; - else if (error >= e2) step1 *= 2; - return stop < start ? -step1 : step1; -} - -function nice(start, stop, count) { - let prestep; - while (true) { - const step = tickIncrement(start, stop, count); - if (step === prestep || step === 0 || !isFinite(step)) { - return [start, stop]; - } else if (step > 0) { - start = Math.floor(start / step) * step; - stop = Math.ceil(stop / step) * step; - } else if (step < 0) { - start = Math.ceil(start * step) / step; - stop = Math.floor(stop * step) / step; - } - prestep = step; - } -} - -function sturges(values) { - return Math.ceil(Math.log(count(values)) / Math.LN2) + 1; -} - -function bin() { - var value = identity, - domain = extent, - threshold = sturges; - - function histogram(data) { - if (!Array.isArray(data)) data = Array.from(data); - - var i, - n = data.length, - x, - values = new Array(n); - - for (i = 0; i < n; ++i) { - values[i] = value(data[i], i, data); - } - - var xz = domain(values), - x0 = xz[0], - x1 = xz[1], - tz = threshold(values, x0, x1); - - // Convert number of thresholds into uniform thresholds, - // and nice the default domain accordingly. - if (!Array.isArray(tz)) { - tz = +tz; - if (domain === extent) [x0, x1] = nice(x0, x1, tz); - tz = ticks(x0, x1, tz); - if (tz[tz.length - 1] === x1) tz.pop(); // exclusive - } - - // Remove any thresholds outside the domain. - var m = tz.length; - while (tz[0] <= x0) tz.shift(), --m; - while (tz[m - 1] > x1) tz.pop(), --m; - - var bins = new Array(m + 1), - bin; - - // Initialize bins. - for (i = 0; i <= m; ++i) { - bin = bins[i] = []; - bin.x0 = i > 0 ? tz[i - 1] : x0; - bin.x1 = i < m ? tz[i] : x1; - } - - // Assign data to bins by value, ignoring any outside the domain. - for (i = 0; i < n; ++i) { - x = values[i]; - if (x0 <= x && x <= x1) { - bins[bisectRight(tz, x, 0, m)].push(data[i]); - } - } - - return bins; - } - - histogram.value = function(_) { - return arguments.length ? (value = typeof _ === "function" ? _ : constant(_), histogram) : value; - }; - - histogram.domain = function(_) { - return arguments.length ? (domain = typeof _ === "function" ? _ : constant([_[0], _[1]]), histogram) : domain; - }; - - histogram.thresholds = function(_) { - return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold; - }; - - return histogram; -} - -function max(values, valueof) { - let max; - if (valueof === undefined) { - for (const value of values) { - if (value != null - && (max < value || (max === undefined && value >= value))) { - max = value; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null - && (max < value || (max === undefined && value >= value))) { - max = value; - } - } - } - return max; -} - -function min(values, valueof) { - let min; - if (valueof === undefined) { - for (const value of values) { - if (value != null - && (min > value || (min === undefined && value >= value))) { - min = value; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null - && (min > value || (min === undefined && value >= value))) { - min = value; - } - } - } - return min; -} - -// Based on https://github.com/mourner/quickselect -// ISC license, Copyright 2018 Vladimir Agafonkin. -function quickselect(array, k, left = 0, right = array.length - 1, compare = ascending) { - while (right > left) { - if (right - left > 600) { - const n = right - left + 1; - const m = k - left + 1; - const z = Math.log(n); - const s = 0.5 * Math.exp(2 * z / 3); - const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1); - const newLeft = Math.max(left, Math.floor(k - m * s / n + sd)); - const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd)); - quickselect(array, k, newLeft, newRight, compare); - } - - const t = array[k]; - let i = left; - let j = right; - - swap(array, left, k); - if (compare(array[right], t) > 0) swap(array, left, right); - - while (i < j) { - swap(array, i, j), ++i, --j; - while (compare(array[i], t) < 0) ++i; - while (compare(array[j], t) > 0) --j; - } - - if (compare(array[left], t) === 0) swap(array, left, j); - else ++j, swap(array, j, right); - - if (j <= k) left = j + 1; - if (k <= j) right = j - 1; - } - return array; -} - -function swap(array, i, j) { - const t = array[i]; - array[i] = array[j]; - array[j] = t; -} - -function quantile(values, p, valueof) { - values = Float64Array.from(numbers(values, valueof)); - if (!(n = values.length)) return; - if ((p = +p) <= 0 || n < 2) return min(values); - if (p >= 1) return max(values); - var n, - i = (n - 1) * p, - i0 = Math.floor(i), - value0 = max(quickselect(values, i0).subarray(0, i0 + 1)), - value1 = min(values.subarray(i0 + 1)); - return value0 + (value1 - value0) * (i - i0); -} - -function quantileSorted(values, p, valueof = number) { - if (!(n = values.length)) return; - if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values); - if (p >= 1) return +valueof(values[n - 1], n - 1, values); - var n, - i = (n - 1) * p, - i0 = Math.floor(i), - value0 = +valueof(values[i0], i0, values), - value1 = +valueof(values[i0 + 1], i0 + 1, values); - return value0 + (value1 - value0) * (i - i0); -} - -function freedmanDiaconis(values, min, max) { - return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(count(values), -1 / 3))); -} - -function scott(values, min, max) { - return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(count(values), -1 / 3))); -} - -function maxIndex(values, valueof) { - let max; - let maxIndex = -1; - let index = -1; - if (valueof === undefined) { - for (const value of values) { - ++index; - if (value != null - && (max < value || (max === undefined && value >= value))) { - max = value, maxIndex = index; - } - } - } else { - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null - && (max < value || (max === undefined && value >= value))) { - max = value, maxIndex = index; - } - } - } - return maxIndex; -} - -function mean(values, valueof) { - let count = 0; - let sum = 0; - if (valueof === undefined) { - for (let value of values) { - if (value != null && (value = +value) >= value) { - ++count, sum += value; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { - ++count, sum += value; - } - } - } - if (count) return sum / count; -} - -function median(values, valueof) { - return quantile(values, 0.5, valueof); -} - -function* flatten(arrays) { - for (const array of arrays) { - yield* array; - } -} - -function merge(arrays) { - return Array.from(flatten(arrays)); -} - -function minIndex(values, valueof) { - let min; - let minIndex = -1; - let index = -1; - if (valueof === undefined) { - for (const value of values) { - ++index; - if (value != null - && (min > value || (min === undefined && value >= value))) { - min = value, minIndex = index; - } - } - } else { - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null - && (min > value || (min === undefined && value >= value))) { - min = value, minIndex = index; - } - } - } - return minIndex; -} - -function pairs(values, pairof = pair) { - const pairs = []; - let previous; - let first = false; - for (const value of values) { - if (first) pairs.push(pairof(previous, value)); - previous = value; - first = true; - } - return pairs; -} - -function pair(a, b) { - return [a, b]; -} - -function permute(source, keys) { - return Array.from(keys, key => source[key]); -} - -function range(start, stop, step) { - start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; - - var i = -1, - n = Math.max(0, Math.ceil((stop - start) / step)) | 0, - range = new Array(n); - - while (++i < n) { - range[i] = start + i * step; - } - - return range; -} - -function least(values, compare = ascending) { - let min; - let defined = false; - if (compare.length === 1) { - let minValue; - for (const element of values) { - const value = compare(element); - if (defined - ? ascending(value, minValue) < 0 - : ascending(value, value) === 0) { - min = element; - minValue = value; - defined = true; - } - } - } else { - for (const value of values) { - if (defined - ? compare(value, min) < 0 - : compare(value, value) === 0) { - min = value; - defined = true; - } - } - } - return min; -} - -function leastIndex(values, compare = ascending) { - if (compare.length === 1) return minIndex(values, compare); - let minValue; - let min = -1; - let index = -1; - for (const value of values) { - ++index; - if (min < 0 - ? compare(value, value) === 0 - : compare(value, minValue) < 0) { - minValue = value; - min = index; - } - } - return min; -} - -function greatest(values, compare = ascending) { - let max; - let defined = false; - if (compare.length === 1) { - let maxValue; - for (const element of values) { - const value = compare(element); - if (defined - ? ascending(value, maxValue) > 0 - : ascending(value, value) === 0) { - max = element; - maxValue = value; - defined = true; - } - } - } else { - for (const value of values) { - if (defined - ? compare(value, max) > 0 - : compare(value, value) === 0) { - max = value; - defined = true; - } - } - } - return max; -} - -function greatestIndex(values, compare = ascending) { - if (compare.length === 1) return maxIndex(values, compare); - let maxValue; - let max = -1; - let index = -1; - for (const value of values) { - ++index; - if (max < 0 - ? compare(value, value) === 0 - : compare(value, maxValue) > 0) { - maxValue = value; - max = index; - } - } - return max; -} - -function scan(values, compare) { - const index = leastIndex(values, compare); - return index < 0 ? undefined : index; -} - -var shuffle = shuffler(Math.random); - -function shuffler(random) { - return function shuffle(array, i0 = 0, i1 = array.length) { - let m = i1 - (i0 = +i0); - while (m) { - const i = random() * m-- | 0, t = array[m + i0]; - array[m + i0] = array[i + i0]; - array[i + i0] = t; - } - return array; - }; -} - -function sum(values, valueof) { - let sum = 0; - if (valueof === undefined) { - for (let value of values) { - if (value = +value) { - sum += value; - } - } - } else { - let index = -1; - for (let value of values) { - if (value = +valueof(value, ++index, values)) { - sum += value; - } - } - } - return sum; -} - -function transpose(matrix) { - if (!(n = matrix.length)) return []; - for (var i = -1, m = min(matrix, length$1), transpose = new Array(m); ++i < m;) { - for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) { - row[j] = matrix[j][i]; - } - } - return transpose; -} - -function length$1(d) { - return d.length; -} - -function zip() { - return transpose(arguments); -} - -function every(values, test) { - if (typeof test !== "function") throw new TypeError("test is not a function"); - let index = -1; - for (const value of values) { - if (!test(value, ++index, values)) { - return false; - } - } - return true; -} - -function some(values, test) { - if (typeof test !== "function") throw new TypeError("test is not a function"); - let index = -1; - for (const value of values) { - if (test(value, ++index, values)) { - return true; - } - } - return false; -} - -function filter(values, test) { - if (typeof test !== "function") throw new TypeError("test is not a function"); - const array = []; - let index = -1; - for (const value of values) { - if (test(value, ++index, values)) { - array.push(value); - } - } - return array; -} - -function map(values, mapper) { - if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); - if (typeof mapper !== "function") throw new TypeError("mapper is not a function"); - return Array.from(values, (value, index) => mapper(value, index, values)); -} - -function reduce(values, reducer, value) { - if (typeof reducer !== "function") throw new TypeError("reducer is not a function"); - const iterator = values[Symbol.iterator](); - let done, next, index = -1; - if (arguments.length < 3) { - ({done, value} = iterator.next()); - if (done) return; - ++index; - } - while (({done, value: next} = iterator.next()), !done) { - value = reducer(value, next, ++index, values); - } - return value; -} - -function reverse(values) { - if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); - return Array.from(values).reverse(); -} - -function sort(values, comparator = ascending) { - if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); - return Array.from(values).sort(comparator); -} - -function difference(values, ...others) { - values = new Set(values); - for (const other of others) { - for (const value of other) { - values.delete(value); - } - } - return values; -} - -function disjoint(values, other) { - const iterator = other[Symbol.iterator](), set = new Set(); - for (const v of values) { - if (set.has(v)) return false; - let value, done; - while (({value, done} = iterator.next())) { - if (done) break; - if (Object.is(v, value)) return false; - set.add(value); - } - } - return true; -} - -function set(values) { - return values instanceof Set ? values : new Set(values); -} - -function intersection(values, ...others) { - values = new Set(values); - others = others.map(set); - out: for (const value of values) { - for (const other of others) { - if (!other.has(value)) { - values.delete(value); - continue out; - } - } - } - return values; -} - -function superset(values, other) { - const iterator = values[Symbol.iterator](), set = new Set(); - for (const o of other) { - if (set.has(o)) continue; - let value, done; - while (({value, done} = iterator.next())) { - if (done) return false; - set.add(value); - if (Object.is(o, value)) break; - } - } - return true; -} - -function subset(values, other) { - return superset(other, values); -} - -function union(...others) { - const set = new Set(); - for (const other of others) { - for (const o of other) { - set.add(o); - } - } - return set; -} - -exports.Adder = Adder; -exports.ascending = ascending; -exports.bin = bin; -exports.bisect = bisectRight; -exports.bisectCenter = bisectCenter; -exports.bisectLeft = bisectLeft; -exports.bisectRight = bisectRight; -exports.bisector = bisector; -exports.count = count; -exports.cross = cross; -exports.cumsum = cumsum; -exports.descending = descending; -exports.deviation = deviation; -exports.difference = difference; -exports.disjoint = disjoint; -exports.every = every; -exports.extent = extent; -exports.filter = filter; -exports.fsum = fsum; -exports.greatest = greatest; -exports.greatestIndex = greatestIndex; -exports.group = group; -exports.groups = groups; -exports.histogram = bin; -exports.index = index; -exports.indexes = indexes; -exports.intersection = intersection; -exports.least = least; -exports.leastIndex = leastIndex; -exports.map = map; -exports.max = max; -exports.maxIndex = maxIndex; -exports.mean = mean; -exports.median = median; -exports.merge = merge; -exports.min = min; -exports.minIndex = minIndex; -exports.nice = nice; -exports.pairs = pairs; -exports.permute = permute; -exports.quantile = quantile; -exports.quantileSorted = quantileSorted; -exports.quickselect = quickselect; -exports.range = range; -exports.reduce = reduce; -exports.reverse = reverse; -exports.rollup = rollup; -exports.rollups = rollups; -exports.scan = scan; -exports.shuffle = shuffle; -exports.shuffler = shuffler; -exports.some = some; -exports.sort = sort; -exports.subset = subset; -exports.sum = sum; -exports.superset = superset; -exports.thresholdFreedmanDiaconis = freedmanDiaconis; -exports.thresholdScott = scott; -exports.thresholdSturges = sturges; -exports.tickIncrement = tickIncrement; -exports.tickStep = tickStep; -exports.ticks = ticks; -exports.transpose = transpose; -exports.union = union; -exports.variance = variance; -exports.zip = zip; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/node_modules/d3-array/dist/d3-array.min.js b/node_modules/d3-array/dist/d3-array.min.js deleted file mode 100644 index 90ab359560eafada62f11326e0a654a369df578a..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/dist/d3-array.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-array/ v2.8.0 Copyright 2020 Mike Bostock -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{})}(this,(function(t){"use strict";function n(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function r(t){let r=t,e=t;function o(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){const f=r+o>>>1;e(t[f],n)<0?r=f+1:o=f}return r}return 1===t.length&&(r=(n,r)=>t(n)-r,e=function(t){return(r,e)=>n(t(r),e)}(t)),{left:o,center:function(t,n,e,f){null==e&&(e=0),null==f&&(f=t.length);const i=o(t,n,e,f-1);return i>e&&r(t[i-1],n)>-r(t[i],n)?i-1:i},right:function(t,n,r,o){for(null==r&&(r=0),null==o&&(o=t.length);r<o;){const f=r+o>>>1;e(t[f],n)>0?o=f:r=f+1}return r}}}function e(t){return null===t?NaN:+t}const o=r(n),f=o.right,i=o.left,u=r(e).center;function l(t,n){let r=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&++r;else{let e=-1;for(let o of t)null!=(o=n(o,++e,t))&&(o=+o)>=o&&++r}return r}function c(t){return 0|t.length}function a(t){return!(t>0)}function s(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function h(t,n){let r,e=0,o=0,f=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(r=n-o,o+=r/++e,f+=r*(n-o));else{let i=-1;for(let u of t)null!=(u=n(u,++i,t))&&(u=+u)>=u&&(r=u-o,o+=r/++e,f+=r*(u-o))}if(e>1)return f/(e-1)}function d(t,n){const r=h(t,n);return r?Math.sqrt(r):r}function p(t,n){let r,e;if(void 0===n)for(const n of t)null!=n&&(void 0===r?n>=n&&(r=e=n):(r>n&&(r=n),e<n&&(e=n)));else{let o=-1;for(let f of t)null!=(f=n(f,++o,t))&&(void 0===r?f>=f&&(r=e=f):(r>f&&(r=f),e<f&&(e=f)))}return[r,e]}class y{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let r=0;for(let e=0;e<this._n&&e<32;e++){const o=n[e],f=t+o,i=Math.abs(t)<Math.abs(o)?t-(f-o):o-(f-t);i&&(n[r++]=i),t=f}return n[r]=t,this._n=r+1,this}valueOf(){const t=this._partials;let n,r,e,o=this._n,f=0;if(o>0){for(f=t[--o];o>0&&(n=f,r=t[--o],f=n+r,e=r-(f-n),!e););o>0&&(e<0&&t[o-1]<0||e>0&&t[o-1]>0)&&(r=2*e,n=f+r,r==n-f&&(f=n))}return f}}function v(t){return t}function m(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function M(t,n,r,e){return function t(o,f){if(f>=e.length)return r(o);const i=new Map,u=e[f++];let l=-1;for(const t of o){const n=u(t,++l,o),r=i.get(n);r?r.push(t):i.set(n,[t])}for(const[n,r]of i)i.set(n,t(r,f));return n(i)}(t,0)}var g=Array.prototype.slice;function w(t){return function(){return t}}var b=Math.sqrt(50),A=Math.sqrt(10),x=Math.sqrt(2);function S(t,n,r){var e,o,f,i,u=-1;if(r=+r,(t=+t)===(n=+n)&&r>0)return[t];if((e=n<t)&&(o=t,t=n,n=o),0===(i=T(t,n,r))||!isFinite(i))return[];if(i>0)for(t=Math.ceil(t/i),n=Math.floor(n/i),f=new Array(o=Math.ceil(n-t+1));++u<o;)f[u]=(t+u)*i;else for(i=-i,t=Math.ceil(t*i),n=Math.floor(n*i),f=new Array(o=Math.ceil(n-t+1));++u<o;)f[u]=(t+u)/i;return e&&f.reverse(),f}function T(t,n,r){var e=(n-t)/Math.max(0,r),o=Math.floor(Math.log(e)/Math.LN10),f=e/Math.pow(10,o);return o>=0?(f>=b?10:f>=A?5:f>=x?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(f>=b?10:f>=A?5:f>=x?2:1)}function E(t,n,r){let e;for(;;){const o=T(t,n,r);if(o===e||0===o||!isFinite(o))return[t,n];o>0?(t=Math.floor(t/o)*o,n=Math.ceil(n/o)*o):o<0&&(t=Math.ceil(t*o)/o,n=Math.floor(n*o)/o),e=o}}function N(t){return Math.ceil(Math.log(l(t))/Math.LN2)+1}function _(){var t=v,n=p,r=N;function e(e){Array.isArray(e)||(e=Array.from(e));var o,i,u=e.length,l=new Array(u);for(o=0;o<u;++o)l[o]=t(e[o],o,e);var c=n(l),a=c[0],s=c[1],h=r(l,a,s);Array.isArray(h)||(h=+h,n===p&&([a,s]=E(a,s,h)),(h=S(a,s,h))[h.length-1]===s&&h.pop());for(var d=h.length;h[0]<=a;)h.shift(),--d;for(;h[d-1]>s;)h.pop(),--d;var y,v=new Array(d+1);for(o=0;o<=d;++o)(y=v[o]=[]).x0=o>0?h[o-1]:a,y.x1=o<d?h[o]:s;for(o=0;o<u;++o)a<=(i=l[o])&&i<=s&&v[f(h,i,0,d)].push(e[o]);return v}return e.value=function(n){return arguments.length?(t="function"==typeof n?n:w(n),e):t},e.domain=function(t){return arguments.length?(n="function"==typeof t?t:w([t[0],t[1]]),e):n},e.thresholds=function(t){return arguments.length?(r="function"==typeof t?t:Array.isArray(t)?w(g.call(t)):w(t),e):r},e}function q(t,n){let r;if(void 0===n)for(const n of t)null!=n&&(r<n||void 0===r&&n>=n)&&(r=n);else{let e=-1;for(let o of t)null!=(o=n(o,++e,t))&&(r<o||void 0===r&&o>=o)&&(r=o)}return r}function j(t,n){let r;if(void 0===n)for(const n of t)null!=n&&(r>n||void 0===r&&n>=n)&&(r=n);else{let e=-1;for(let o of t)null!=(o=n(o,++e,t))&&(r>o||void 0===r&&o>=o)&&(r=o)}return r}function k(t,r,e=0,o=t.length-1,f=n){for(;o>e;){if(o-e>600){const n=o-e+1,i=r-e+1,u=Math.log(n),l=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*l*(n-l)/n)*(i-n/2<0?-1:1);k(t,r,Math.max(e,Math.floor(r-i*l/n+c)),Math.min(o,Math.floor(r+(n-i)*l/n+c)),f)}const n=t[r];let i=e,u=o;for(F(t,e,r),f(t[o],n)>0&&F(t,e,o);i<u;){for(F(t,i,u),++i,--u;f(t[i],n)<0;)++i;for(;f(t[u],n)>0;)--u}0===f(t[e],n)?F(t,e,u):(++u,F(t,u,o)),u<=r&&(e=u+1),r<=u&&(o=u-1)}return t}function F(t,n,r){const e=t[n];t[n]=t[r],t[r]=e}function I(t,n,r){if(e=(t=Float64Array.from(function*(t,n){if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(yield n);else{let r=-1;for(let e of t)null!=(e=n(e,++r,t))&&(e=+e)>=e&&(yield e)}}(t,r))).length){if((n=+n)<=0||e<2)return j(t);if(n>=1)return q(t);var e,o=(e-1)*n,f=Math.floor(o),i=q(k(t,f).subarray(0,f+1));return i+(j(t.subarray(f+1))-i)*(o-f)}}function L(t,n){let r,e=-1,o=-1;if(void 0===n)for(const n of t)++o,null!=n&&(r<n||void 0===r&&n>=n)&&(r=n,e=o);else for(let f of t)null!=(f=n(f,++o,t))&&(r<f||void 0===r&&f>=f)&&(r=f,e=o);return e}function O(t,n){let r,e=-1,o=-1;if(void 0===n)for(const n of t)++o,null!=n&&(r>n||void 0===r&&n>=n)&&(r=n,e=o);else for(let f of t)null!=(f=n(f,++o,t))&&(r>f||void 0===r&&f>=f)&&(r=f,e=o);return e}function z(t,n){return[t,n]}function C(t,r=n){if(1===r.length)return O(t,r);let e,o=-1,f=-1;for(const n of t)++f,(o<0?0===r(n,n):r(n,e)<0)&&(e=n,o=f);return o}var D=P(Math.random);function P(t){return function(n,r=0,e=n.length){let o=e-(r=+r);for(;o;){const e=t()*o--|0,f=n[o+r];n[o+r]=n[e+r],n[e+r]=f}return n}}function R(t){if(!(o=t.length))return[];for(var n=-1,r=j(t,B),e=new Array(r);++n<r;)for(var o,f=-1,i=e[n]=new Array(o);++f<o;)i[f]=t[f][n];return e}function B(t){return t.length}function G(t){return t instanceof Set?t:new Set(t)}function H(t,n){const r=t[Symbol.iterator](),e=new Set;for(const t of n){if(e.has(t))continue;let n,o;for(;({value:n,done:o}=r.next());){if(o)return!1;if(e.add(n),Object.is(t,n))break}}return!0}t.Adder=y,t.ascending=n,t.bin=_,t.bisect=f,t.bisectCenter=u,t.bisectLeft=i,t.bisectRight=f,t.bisector=r,t.count=l,t.cross=function(...t){const n="function"==typeof t[t.length-1]&&function(t){return n=>t(...n)}(t.pop()),r=(t=t.map(s)).map(c),e=t.length-1,o=new Array(e+1).fill(0),f=[];if(e<0||r.some(a))return f;for(;;){f.push(o.map((n,r)=>t[r][n]));let i=e;for(;++o[i]===r[i];){if(0===i)return n?f.map(n):f;o[i--]=0}}},t.cumsum=function(t,n){var r=0,e=0;return Float64Array.from(t,void 0===n?t=>r+=+t||0:o=>r+=+n(o,e++,t)||0)},t.descending=function(t,n){return n<t?-1:n>t?1:n>=t?0:NaN},t.deviation=d,t.difference=function(t,...n){t=new Set(t);for(const r of n)for(const n of r)t.delete(n);return t},t.disjoint=function(t,n){const r=n[Symbol.iterator](),e=new Set;for(const n of t){if(e.has(n))return!1;let t,o;for(;({value:t,done:o}=r.next())&&!o;){if(Object.is(n,t))return!1;e.add(t)}}return!0},t.every=function(t,n){if("function"!=typeof n)throw new TypeError("test is not a function");let r=-1;for(const e of t)if(!n(e,++r,t))return!1;return!0},t.extent=p,t.filter=function(t,n){if("function"!=typeof n)throw new TypeError("test is not a function");const r=[];let e=-1;for(const o of t)n(o,++e,t)&&r.push(o);return r},t.fsum=function(t,n){const r=new y;if(void 0===n)for(let n of t)(n=+n)&&r.add(n);else{let e=-1;for(let o of t)(o=+n(o,++e,t))&&r.add(o)}return+r},t.greatest=function(t,r=n){let e,o=!1;if(1===r.length){let f;for(const i of t){const t=r(i);(o?n(t,f)>0:0===n(t,t))&&(e=i,f=t,o=!0)}}else for(const n of t)(o?r(n,e)>0:0===r(n,n))&&(e=n,o=!0);return e},t.greatestIndex=function(t,r=n){if(1===r.length)return L(t,r);let e,o=-1,f=-1;for(const n of t)++f,(o<0?0===r(n,n):r(n,e)>0)&&(e=n,o=f);return o},t.group=function(t,...n){return M(t,v,v,n)},t.groups=function(t,...n){return M(t,Array.from,v,n)},t.histogram=_,t.index=function(t,...n){return M(t,v,m,n)},t.indexes=function(t,...n){return M(t,Array.from,m,n)},t.intersection=function(t,...n){t=new Set(t),n=n.map(G);t:for(const r of t)for(const e of n)if(!e.has(r)){t.delete(r);continue t}return t},t.least=function(t,r=n){let e,o=!1;if(1===r.length){let f;for(const i of t){const t=r(i);(o?n(t,f)<0:0===n(t,t))&&(e=i,f=t,o=!0)}}else for(const n of t)(o?r(n,e)<0:0===r(n,n))&&(e=n,o=!0);return e},t.leastIndex=C,t.map=function(t,n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");if("function"!=typeof n)throw new TypeError("mapper is not a function");return Array.from(t,(r,e)=>n(r,e,t))},t.max=q,t.maxIndex=L,t.mean=function(t,n){let r=0,e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(++r,e+=n);else{let o=-1;for(let f of t)null!=(f=n(f,++o,t))&&(f=+f)>=f&&(++r,e+=f)}if(r)return e/r},t.median=function(t,n){return I(t,.5,n)},t.merge=function(t){return Array.from(function*(t){for(const n of t)yield*n}(t))},t.min=j,t.minIndex=O,t.nice=E,t.pairs=function(t,n=z){const r=[];let e,o=!1;for(const f of t)o&&r.push(n(e,f)),e=f,o=!0;return r},t.permute=function(t,n){return Array.from(n,n=>t[n])},t.quantile=I,t.quantileSorted=function(t,n,r=e){if(o=t.length){if((n=+n)<=0||o<2)return+r(t[0],0,t);if(n>=1)return+r(t[o-1],o-1,t);var o,f=(o-1)*n,i=Math.floor(f),u=+r(t[i],i,t);return u+(+r(t[i+1],i+1,t)-u)*(f-i)}},t.quickselect=k,t.range=function(t,n,r){t=+t,n=+n,r=(o=arguments.length)<2?(n=t,t=0,1):o<3?1:+r;for(var e=-1,o=0|Math.max(0,Math.ceil((n-t)/r)),f=new Array(o);++e<o;)f[e]=t+e*r;return f},t.reduce=function(t,n,r){if("function"!=typeof n)throw new TypeError("reducer is not a function");const e=t[Symbol.iterator]();let o,f,i=-1;if(arguments.length<3){if(({done:o,value:r}=e.next()),o)return;++i}for(;({done:o,value:f}=e.next()),!o;)r=n(r,f,++i,t);return r},t.reverse=function(t){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()},t.rollup=function(t,n,...r){return M(t,v,n,r)},t.rollups=function(t,n,...r){return M(t,Array.from,n,r)},t.scan=function(t,n){const r=C(t,n);return r<0?void 0:r},t.shuffle=D,t.shuffler=P,t.some=function(t,n){if("function"!=typeof n)throw new TypeError("test is not a function");let r=-1;for(const e of t)if(n(e,++r,t))return!0;return!1},t.sort=function(t,r=n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).sort(r)},t.subset=function(t,n){return H(n,t)},t.sum=function(t,n){let r=0;if(void 0===n)for(let n of t)(n=+n)&&(r+=n);else{let e=-1;for(let o of t)(o=+n(o,++e,t))&&(r+=o)}return r},t.superset=H,t.thresholdFreedmanDiaconis=function(t,n,r){return Math.ceil((r-n)/(2*(I(t,.75)-I(t,.25))*Math.pow(l(t),-1/3)))},t.thresholdScott=function(t,n,r){return Math.ceil((r-n)/(3.5*d(t)*Math.pow(l(t),-1/3)))},t.thresholdSturges=N,t.tickIncrement=T,t.tickStep=function(t,n,r){var e=Math.abs(n-t)/Math.max(0,r),o=Math.pow(10,Math.floor(Math.log(e)/Math.LN10)),f=e/o;return f>=b?o*=10:f>=A?o*=5:f>=x&&(o*=2),n<t?-o:o},t.ticks=S,t.transpose=R,t.union=function(...t){const n=new Set;for(const r of t)for(const t of r)n.add(t);return n},t.variance=h,t.zip=function(){return R(arguments)},Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/node_modules/d3-array/package.json b/node_modules/d3-array/package.json deleted file mode 100644 index 09817629c2c2c60a00fb9a6f653b838933ef5ece..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/package.json +++ /dev/null @@ -1,80 +0,0 @@ -{ - "_from": "d3-array@2", - "_id": "d3-array@2.8.0", - "_inBundle": false, - "_integrity": "sha512-6V272gsOeg7+9pTW1jSYOR1QE37g95I3my1hBmY+vOUNHRrk9yt4OTz/gK7PMkVAVDrYYq4mq3grTiZ8iJdNIw==", - "_location": "/d3-array", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-array@2", - "name": "d3-array", - "escapedName": "d3-array", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3", - "/d3-contour", - "/d3-geo", - "/d3-scale" - ], - "_resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.8.0.tgz", - "_shasum": "f76e10ad47f1f4f75f33db5fc322eb9ffde5ef23", - "_spec": "d3-array@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-array/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Array manipulation, ordering, searching, summarizing, etc.", - "devDependencies": { - "d3-random": "2", - "eslint": "7", - "jsdom": "16", - "rollup": "2", - "rollup-plugin-terser": "7", - "tape": "4", - "tape-await": "0.1" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-array/", - "keywords": [ - "d3", - "d3-module", - "histogram", - "bisect", - "shuffle", - "statistics", - "search", - "sort", - "array" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-array.js", - "module": "src/index.js", - "name": "d3-array", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-array.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "./test/run.sh" - }, - "sideEffects": false, - "unpkg": "dist/d3-array.min.js", - "version": "2.8.0" -} diff --git a/node_modules/d3-array/src/array.js b/node_modules/d3-array/src/array.js deleted file mode 100644 index 80084030e57eea14e15c90d72598f8443fd42f7b..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/array.js +++ /dev/null @@ -1,4 +0,0 @@ -var array = Array.prototype; - -export var slice = array.slice; -export var map = array.map; diff --git a/node_modules/d3-array/src/ascending.js b/node_modules/d3-array/src/ascending.js deleted file mode 100644 index 21a4b8f548c6ba76a4e80683eb1db684de71bf06..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/ascending.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(a, b) { - return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; -} diff --git a/node_modules/d3-array/src/bin.js b/node_modules/d3-array/src/bin.js deleted file mode 100644 index 62ff5ca2edfcbad9faef96ef663c1bd27ac29141..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/bin.js +++ /dev/null @@ -1,80 +0,0 @@ -import {slice} from "./array.js"; -import bisect from "./bisect.js"; -import constant from "./constant.js"; -import extent from "./extent.js"; -import identity from "./identity.js"; -import nice from "./nice.js"; -import ticks from "./ticks.js"; -import sturges from "./threshold/sturges.js"; - -export default function() { - var value = identity, - domain = extent, - threshold = sturges; - - function histogram(data) { - if (!Array.isArray(data)) data = Array.from(data); - - var i, - n = data.length, - x, - values = new Array(n); - - for (i = 0; i < n; ++i) { - values[i] = value(data[i], i, data); - } - - var xz = domain(values), - x0 = xz[0], - x1 = xz[1], - tz = threshold(values, x0, x1); - - // Convert number of thresholds into uniform thresholds, - // and nice the default domain accordingly. - if (!Array.isArray(tz)) { - tz = +tz; - if (domain === extent) [x0, x1] = nice(x0, x1, tz); - tz = ticks(x0, x1, tz); - if (tz[tz.length - 1] === x1) tz.pop(); // exclusive - } - - // Remove any thresholds outside the domain. - var m = tz.length; - while (tz[0] <= x0) tz.shift(), --m; - while (tz[m - 1] > x1) tz.pop(), --m; - - var bins = new Array(m + 1), - bin; - - // Initialize bins. - for (i = 0; i <= m; ++i) { - bin = bins[i] = []; - bin.x0 = i > 0 ? tz[i - 1] : x0; - bin.x1 = i < m ? tz[i] : x1; - } - - // Assign data to bins by value, ignoring any outside the domain. - for (i = 0; i < n; ++i) { - x = values[i]; - if (x0 <= x && x <= x1) { - bins[bisect(tz, x, 0, m)].push(data[i]); - } - } - - return bins; - } - - histogram.value = function(_) { - return arguments.length ? (value = typeof _ === "function" ? _ : constant(_), histogram) : value; - }; - - histogram.domain = function(_) { - return arguments.length ? (domain = typeof _ === "function" ? _ : constant([_[0], _[1]]), histogram) : domain; - }; - - histogram.thresholds = function(_) { - return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold; - }; - - return histogram; -} diff --git a/node_modules/d3-array/src/bisect.js b/node_modules/d3-array/src/bisect.js deleted file mode 100644 index 333a7e431589dbde04f0717d81177a1b6110c174..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/bisect.js +++ /dev/null @@ -1,9 +0,0 @@ -import ascending from "./ascending.js"; -import bisector from "./bisector.js"; -import number from "./number.js"; - -const ascendingBisect = bisector(ascending); -export const bisectRight = ascendingBisect.right; -export const bisectLeft = ascendingBisect.left; -export const bisectCenter = bisector(number).center; -export default bisectRight; diff --git a/node_modules/d3-array/src/bisector.js b/node_modules/d3-array/src/bisector.js deleted file mode 100644 index 7b265dc41b7380b587ae4c5e069a3963fdd8b7a4..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/bisector.js +++ /dev/null @@ -1,46 +0,0 @@ -import ascending from "./ascending.js"; - -export default function(f) { - let delta = f; - let compare = f; - - if (f.length === 1) { - delta = (d, x) => f(d) - x; - compare = ascendingComparator(f); - } - - function left(a, x, lo, hi) { - if (lo == null) lo = 0; - if (hi == null) hi = a.length; - while (lo < hi) { - const mid = (lo + hi) >>> 1; - if (compare(a[mid], x) < 0) lo = mid + 1; - else hi = mid; - } - return lo; - } - - function right(a, x, lo, hi) { - if (lo == null) lo = 0; - if (hi == null) hi = a.length; - while (lo < hi) { - const mid = (lo + hi) >>> 1; - if (compare(a[mid], x) > 0) hi = mid; - else lo = mid + 1; - } - return lo; - } - - function center(a, x, lo, hi) { - if (lo == null) lo = 0; - if (hi == null) hi = a.length; - const i = left(a, x, lo, hi - 1); - return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i; - } - - return {left, center, right}; -} - -function ascendingComparator(f) { - return (d, x) => ascending(f(d), x); -} diff --git a/node_modules/d3-array/src/constant.js b/node_modules/d3-array/src/constant.js deleted file mode 100644 index b7d42e711c01cced1274e5dd70a461a3c0073b77..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/constant.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(x) { - return function() { - return x; - }; -} diff --git a/node_modules/d3-array/src/count.js b/node_modules/d3-array/src/count.js deleted file mode 100644 index b8783f08b2f39adcb29a76f69787eb6dab6d997c..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/count.js +++ /dev/null @@ -1,18 +0,0 @@ -export default function count(values, valueof) { - let count = 0; - if (valueof === undefined) { - for (let value of values) { - if (value != null && (value = +value) >= value) { - ++count; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { - ++count; - } - } - } - return count; -} diff --git a/node_modules/d3-array/src/cross.js b/node_modules/d3-array/src/cross.js deleted file mode 100644 index 7efdbe3cd033a71cd37a6256d81873e30ca7122c..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/cross.js +++ /dev/null @@ -1,33 +0,0 @@ -function length(array) { - return array.length | 0; -} - -function empty(length) { - return !(length > 0); -} - -function arrayify(values) { - return typeof values !== "object" || "length" in values ? values : Array.from(values); -} - -function reducer(reduce) { - return values => reduce(...values); -} - -export default function cross(...values) { - const reduce = typeof values[values.length - 1] === "function" && reducer(values.pop()); - values = values.map(arrayify); - const lengths = values.map(length); - const j = values.length - 1; - const index = new Array(j + 1).fill(0); - const product = []; - if (j < 0 || lengths.some(empty)) return product; - while (true) { - product.push(index.map((j, i) => values[i][j])); - let i = j; - while (++index[i] === lengths[i]) { - if (i === 0) return reduce ? product.map(reduce) : product; - index[i--] = 0; - } - } -} diff --git a/node_modules/d3-array/src/cumsum.js b/node_modules/d3-array/src/cumsum.js deleted file mode 100644 index 86fb0522cc6e1e260c987635c616802775fe2372..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/cumsum.js +++ /dev/null @@ -1,6 +0,0 @@ -export default function cumsum(values, valueof) { - var sum = 0, index = 0; - return Float64Array.from(values, valueof === undefined - ? v => (sum += +v || 0) - : v => (sum += +valueof(v, index++, values) || 0)); -} \ No newline at end of file diff --git a/node_modules/d3-array/src/descending.js b/node_modules/d3-array/src/descending.js deleted file mode 100644 index a4e2d7fbee0f0d7b9c8ac58e20d61f9f3cd4f2fe..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/descending.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(a, b) { - return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; -} diff --git a/node_modules/d3-array/src/deviation.js b/node_modules/d3-array/src/deviation.js deleted file mode 100644 index d5dbe7a9839485d1f311bf059ec1d828d2d9dfa0..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/deviation.js +++ /dev/null @@ -1,6 +0,0 @@ -import variance from "./variance.js"; - -export default function deviation(values, valueof) { - const v = variance(values, valueof); - return v ? Math.sqrt(v) : v; -} diff --git a/node_modules/d3-array/src/difference.js b/node_modules/d3-array/src/difference.js deleted file mode 100644 index 066334babda2c146e99114e8d4442e5920b60b41..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/difference.js +++ /dev/null @@ -1,9 +0,0 @@ -export default function difference(values, ...others) { - values = new Set(values); - for (const other of others) { - for (const value of other) { - values.delete(value); - } - } - return values; -} diff --git a/node_modules/d3-array/src/disjoint.js b/node_modules/d3-array/src/disjoint.js deleted file mode 100644 index 02dfd03a5d421f4c15579465cd0c487266d1fd00..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/disjoint.js +++ /dev/null @@ -1,13 +0,0 @@ -export default function disjoint(values, other) { - const iterator = other[Symbol.iterator](), set = new Set(); - for (const v of values) { - if (set.has(v)) return false; - let value, done; - while (({value, done} = iterator.next())) { - if (done) break; - if (Object.is(v, value)) return false; - set.add(value); - } - } - return true; -} diff --git a/node_modules/d3-array/src/every.js b/node_modules/d3-array/src/every.js deleted file mode 100644 index 484cac23efffd1253b68164cb4efada62c0c2fcd..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/every.js +++ /dev/null @@ -1,10 +0,0 @@ -export default function every(values, test) { - if (typeof test !== "function") throw new TypeError("test is not a function"); - let index = -1; - for (const value of values) { - if (!test(value, ++index, values)) { - return false; - } - } - return true; -} diff --git a/node_modules/d3-array/src/extent.js b/node_modules/d3-array/src/extent.js deleted file mode 100644 index 2e3738d6d95b0d3c1affe30c033d439f1ed10218..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/extent.js +++ /dev/null @@ -1,29 +0,0 @@ -export default function(values, valueof) { - let min; - let max; - if (valueof === undefined) { - for (const value of values) { - if (value != null) { - if (min === undefined) { - if (value >= value) min = max = value; - } else { - if (min > value) min = value; - if (max < value) max = value; - } - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null) { - if (min === undefined) { - if (value >= value) min = max = value; - } else { - if (min > value) min = value; - if (max < value) max = value; - } - } - } - } - return [min, max]; -} diff --git a/node_modules/d3-array/src/filter.js b/node_modules/d3-array/src/filter.js deleted file mode 100644 index d653392f25e93b7c73de3d0feb9655ba063c52f2..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/filter.js +++ /dev/null @@ -1,11 +0,0 @@ -export default function filter(values, test) { - if (typeof test !== "function") throw new TypeError("test is not a function"); - const array = []; - let index = -1; - for (const value of values) { - if (test(value, ++index, values)) { - array.push(value); - } - } - return array; -} diff --git a/node_modules/d3-array/src/fsum.js b/node_modules/d3-array/src/fsum.js deleted file mode 100644 index ff22298ea1fa58d492ed0d1b3625a6c229780068..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/fsum.js +++ /dev/null @@ -1,60 +0,0 @@ -// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423 -export class Adder { - constructor() { - this._partials = new Float64Array(32); - this._n = 0; - } - add(x) { - const p = this._partials; - let i = 0; - for (let j = 0; j < this._n && j < 32; j++) { - const y = p[j], - hi = x + y, - lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x); - if (lo) p[i++] = lo; - x = hi; - } - p[i] = x; - this._n = i + 1; - return this; - } - valueOf() { - const p = this._partials; - let n = this._n, x, y, lo, hi = 0; - if (n > 0) { - hi = p[--n]; - while (n > 0) { - x = hi; - y = p[--n]; - hi = x + y; - lo = y - (hi - x); - if (lo) break; - } - if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) { - y = lo * 2; - x = hi + y; - if (y == x - hi) hi = x; - } - } - return hi; - } -} - -export default function(values, valueof) { - const adder = new Adder(); - if (valueof === undefined) { - for (let value of values) { - if (value = +value) { - adder.add(value); - } - } - } else { - let index = -1; - for (let value of values) { - if (value = +valueof(value, ++index, values)) { - adder.add(value); - } - } - } - return +adder; -} diff --git a/node_modules/d3-array/src/greatest.js b/node_modules/d3-array/src/greatest.js deleted file mode 100644 index 521f4f5c037e8bbad4a56c2961072c0bb56b1ea2..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/greatest.js +++ /dev/null @@ -1,29 +0,0 @@ -import ascending from "./ascending.js"; - -export default function greatest(values, compare = ascending) { - let max; - let defined = false; - if (compare.length === 1) { - let maxValue; - for (const element of values) { - const value = compare(element); - if (defined - ? ascending(value, maxValue) > 0 - : ascending(value, value) === 0) { - max = element; - maxValue = value; - defined = true; - } - } - } else { - for (const value of values) { - if (defined - ? compare(value, max) > 0 - : compare(value, value) === 0) { - max = value; - defined = true; - } - } - } - return max; -} diff --git a/node_modules/d3-array/src/greatestIndex.js b/node_modules/d3-array/src/greatestIndex.js deleted file mode 100644 index 2f390e5b42b8e04958a108026eea7bfbb785f74c..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/greatestIndex.js +++ /dev/null @@ -1,19 +0,0 @@ -import ascending from "./ascending.js"; -import maxIndex from "./maxIndex.js"; - -export default function greatestIndex(values, compare = ascending) { - if (compare.length === 1) return maxIndex(values, compare); - let maxValue; - let max = -1; - let index = -1; - for (const value of values) { - ++index; - if (max < 0 - ? compare(value, value) === 0 - : compare(value, maxValue) > 0) { - maxValue = value; - max = index; - } - } - return max; -} diff --git a/node_modules/d3-array/src/group.js b/node_modules/d3-array/src/group.js deleted file mode 100644 index 57d3a55b23313f2c98138d9121cab24e9bc87639..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/group.js +++ /dev/null @@ -1,49 +0,0 @@ -import identity from "./identity.js"; - -export default function group(values, ...keys) { - return nest(values, identity, identity, keys); -} - -export function groups(values, ...keys) { - return nest(values, Array.from, identity, keys); -} - -export function rollup(values, reduce, ...keys) { - return nest(values, identity, reduce, keys); -} - -export function rollups(values, reduce, ...keys) { - return nest(values, Array.from, reduce, keys); -} - -export function index(values, ...keys) { - return nest(values, identity, unique, keys); -} - -export function indexes(values, ...keys) { - return nest(values, Array.from, unique, keys); -} - -function unique(values) { - if (values.length !== 1) throw new Error("duplicate key"); - return values[0]; -} - -function nest(values, map, reduce, keys) { - return (function regroup(values, i) { - if (i >= keys.length) return reduce(values); - const groups = new Map(); - const keyof = keys[i++]; - let index = -1; - for (const value of values) { - const key = keyof(value, ++index, values); - const group = groups.get(key); - if (group) group.push(value); - else groups.set(key, [value]); - } - for (const [key, values] of groups) { - groups.set(key, regroup(values, i)); - } - return map(groups); - })(values, 0); -} diff --git a/node_modules/d3-array/src/identity.js b/node_modules/d3-array/src/identity.js deleted file mode 100644 index b2f94b2e21fee82e347197f65d2d2c8f0b655642..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/identity.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(x) { - return x; -} diff --git a/node_modules/d3-array/src/index.js b/node_modules/d3-array/src/index.js deleted file mode 100644 index 729e4078d50943f6a07ccf05eaaae81f215bb424..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/index.js +++ /dev/null @@ -1,52 +0,0 @@ -export {default as bisect, bisectRight, bisectLeft, bisectCenter} from "./bisect.js"; -export {default as ascending} from "./ascending.js"; -export {default as bisector} from "./bisector.js"; -export {default as count} from "./count.js"; -export {default as cross} from "./cross.js"; -export {default as cumsum} from "./cumsum.js"; -export {default as descending} from "./descending.js"; -export {default as deviation} from "./deviation.js"; -export {default as extent} from "./extent.js"; -export {default as fsum, Adder} from "./fsum.js"; -export {default as group, groups, index, indexes, rollup, rollups} from "./group.js"; -export {default as bin, default as histogram} from "./bin.js"; // Deprecated; use bin. -export {default as thresholdFreedmanDiaconis} from "./threshold/freedmanDiaconis.js"; -export {default as thresholdScott} from "./threshold/scott.js"; -export {default as thresholdSturges} from "./threshold/sturges.js"; -export {default as max} from "./max.js"; -export {default as maxIndex} from "./maxIndex.js"; -export {default as mean} from "./mean.js"; -export {default as median} from "./median.js"; -export {default as merge} from "./merge.js"; -export {default as min} from "./min.js"; -export {default as minIndex} from "./minIndex.js"; -export {default as nice} from "./nice.js"; -export {default as pairs} from "./pairs.js"; -export {default as permute} from "./permute.js"; -export {default as quantile, quantileSorted} from "./quantile.js"; -export {default as quickselect} from "./quickselect.js"; -export {default as range} from "./range.js"; -export {default as least} from "./least.js"; -export {default as leastIndex} from "./leastIndex.js"; -export {default as greatest} from "./greatest.js"; -export {default as greatestIndex} from "./greatestIndex.js"; -export {default as scan} from "./scan.js"; // Deprecated; use leastIndex. -export {default as shuffle, shuffler} from "./shuffle.js"; -export {default as sum} from "./sum.js"; -export {default as ticks, tickIncrement, tickStep} from "./ticks.js"; -export {default as transpose} from "./transpose.js"; -export {default as variance} from "./variance.js"; -export {default as zip} from "./zip.js"; -export {default as every} from "./every.js"; -export {default as some} from "./some.js"; -export {default as filter} from "./filter.js"; -export {default as map} from "./map.js"; -export {default as reduce} from "./reduce.js"; -export {default as reverse} from "./reverse.js"; -export {default as sort} from "./sort.js"; -export {default as difference} from "./difference.js"; -export {default as disjoint} from "./disjoint.js"; -export {default as intersection} from "./intersection.js"; -export {default as subset} from "./subset.js"; -export {default as superset} from "./superset.js"; -export {default as union} from "./union.js"; diff --git a/node_modules/d3-array/src/intersection.js b/node_modules/d3-array/src/intersection.js deleted file mode 100644 index 2c6af2ab0835678cfdfa1ac080d8ef1f63122c53..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/intersection.js +++ /dev/null @@ -1,15 +0,0 @@ -import set from "./set.js"; - -export default function intersection(values, ...others) { - values = new Set(values); - others = others.map(set); - out: for (const value of values) { - for (const other of others) { - if (!other.has(value)) { - values.delete(value); - continue out; - } - } - } - return values; -} diff --git a/node_modules/d3-array/src/least.js b/node_modules/d3-array/src/least.js deleted file mode 100644 index a756abf4c757d18f408de40ec421246b06c74d73..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/least.js +++ /dev/null @@ -1,29 +0,0 @@ -import ascending from "./ascending.js"; - -export default function least(values, compare = ascending) { - let min; - let defined = false; - if (compare.length === 1) { - let minValue; - for (const element of values) { - const value = compare(element); - if (defined - ? ascending(value, minValue) < 0 - : ascending(value, value) === 0) { - min = element; - minValue = value; - defined = true; - } - } - } else { - for (const value of values) { - if (defined - ? compare(value, min) < 0 - : compare(value, value) === 0) { - min = value; - defined = true; - } - } - } - return min; -} diff --git a/node_modules/d3-array/src/leastIndex.js b/node_modules/d3-array/src/leastIndex.js deleted file mode 100644 index ee3542be8bd1ec4c6e88da86ccd7a1d7b8244bea..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/leastIndex.js +++ /dev/null @@ -1,19 +0,0 @@ -import ascending from "./ascending.js"; -import minIndex from "./minIndex.js"; - -export default function leastIndex(values, compare = ascending) { - if (compare.length === 1) return minIndex(values, compare); - let minValue; - let min = -1; - let index = -1; - for (const value of values) { - ++index; - if (min < 0 - ? compare(value, value) === 0 - : compare(value, minValue) < 0) { - minValue = value; - min = index; - } - } - return min; -} diff --git a/node_modules/d3-array/src/map.js b/node_modules/d3-array/src/map.js deleted file mode 100644 index 4e5681907f95d6cf91cd54ebb72567d782233bd6..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/map.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function map(values, mapper) { - if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); - if (typeof mapper !== "function") throw new TypeError("mapper is not a function"); - return Array.from(values, (value, index) => mapper(value, index, values)); -} diff --git a/node_modules/d3-array/src/max.js b/node_modules/d3-array/src/max.js deleted file mode 100644 index ce287368eb4402d359f18ec1c6c81dde0c774cc5..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/max.js +++ /dev/null @@ -1,20 +0,0 @@ -export default function max(values, valueof) { - let max; - if (valueof === undefined) { - for (const value of values) { - if (value != null - && (max < value || (max === undefined && value >= value))) { - max = value; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null - && (max < value || (max === undefined && value >= value))) { - max = value; - } - } - } - return max; -} diff --git a/node_modules/d3-array/src/maxIndex.js b/node_modules/d3-array/src/maxIndex.js deleted file mode 100644 index 87da1a2c48b87096a44883ef7f72b3a8cdd2991a..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/maxIndex.js +++ /dev/null @@ -1,22 +0,0 @@ -export default function maxIndex(values, valueof) { - let max; - let maxIndex = -1; - let index = -1; - if (valueof === undefined) { - for (const value of values) { - ++index; - if (value != null - && (max < value || (max === undefined && value >= value))) { - max = value, maxIndex = index; - } - } - } else { - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null - && (max < value || (max === undefined && value >= value))) { - max = value, maxIndex = index; - } - } - } - return maxIndex; -} diff --git a/node_modules/d3-array/src/mean.js b/node_modules/d3-array/src/mean.js deleted file mode 100644 index ff6fc461f6c9c1023a6b2af20601df21b80de997..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/mean.js +++ /dev/null @@ -1,19 +0,0 @@ -export default function mean(values, valueof) { - let count = 0; - let sum = 0; - if (valueof === undefined) { - for (let value of values) { - if (value != null && (value = +value) >= value) { - ++count, sum += value; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { - ++count, sum += value; - } - } - } - if (count) return sum / count; -} diff --git a/node_modules/d3-array/src/median.js b/node_modules/d3-array/src/median.js deleted file mode 100644 index 82cbc4e5f9dbad4029fbe8a65e746e13692792e5..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/median.js +++ /dev/null @@ -1,5 +0,0 @@ -import quantile from "./quantile.js"; - -export default function(values, valueof) { - return quantile(values, 0.5, valueof); -} diff --git a/node_modules/d3-array/src/merge.js b/node_modules/d3-array/src/merge.js deleted file mode 100644 index a368002876bb4b47eb04acfbcedf120028fb0194..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/merge.js +++ /dev/null @@ -1,9 +0,0 @@ -function* flatten(arrays) { - for (const array of arrays) { - yield* array; - } -} - -export default function merge(arrays) { - return Array.from(flatten(arrays)); -} diff --git a/node_modules/d3-array/src/min.js b/node_modules/d3-array/src/min.js deleted file mode 100644 index df88bfb2676e32bec9e7ff3416aa3c5d65a585d3..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/min.js +++ /dev/null @@ -1,20 +0,0 @@ -export default function min(values, valueof) { - let min; - if (valueof === undefined) { - for (const value of values) { - if (value != null - && (min > value || (min === undefined && value >= value))) { - min = value; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null - && (min > value || (min === undefined && value >= value))) { - min = value; - } - } - } - return min; -} diff --git a/node_modules/d3-array/src/minIndex.js b/node_modules/d3-array/src/minIndex.js deleted file mode 100644 index 5c07d1ead978be18312c5fd4cdb22852d452a56e..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/minIndex.js +++ /dev/null @@ -1,22 +0,0 @@ -export default function minIndex(values, valueof) { - let min; - let minIndex = -1; - let index = -1; - if (valueof === undefined) { - for (const value of values) { - ++index; - if (value != null - && (min > value || (min === undefined && value >= value))) { - min = value, minIndex = index; - } - } - } else { - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null - && (min > value || (min === undefined && value >= value))) { - min = value, minIndex = index; - } - } - } - return minIndex; -} diff --git a/node_modules/d3-array/src/nice.js b/node_modules/d3-array/src/nice.js deleted file mode 100644 index 579b418c71fcbcd5eeb8173b8599bd93b82c256c..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/nice.js +++ /dev/null @@ -1,18 +0,0 @@ -import {tickIncrement} from "./ticks.js"; - -export default function nice(start, stop, count) { - let prestep; - while (true) { - const step = tickIncrement(start, stop, count); - if (step === prestep || step === 0 || !isFinite(step)) { - return [start, stop]; - } else if (step > 0) { - start = Math.floor(start / step) * step; - stop = Math.ceil(stop / step) * step; - } else if (step < 0) { - start = Math.ceil(start * step) / step; - stop = Math.floor(stop * step) / step; - } - prestep = step; - } -} diff --git a/node_modules/d3-array/src/number.js b/node_modules/d3-array/src/number.js deleted file mode 100644 index 3a9a5243a3669a505dfe8f7062d734155e416c22..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/number.js +++ /dev/null @@ -1,20 +0,0 @@ -export default function(x) { - return x === null ? NaN : +x; -} - -export function* numbers(values, valueof) { - if (valueof === undefined) { - for (let value of values) { - if (value != null && (value = +value) >= value) { - yield value; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { - yield value; - } - } - } -} diff --git a/node_modules/d3-array/src/pairs.js b/node_modules/d3-array/src/pairs.js deleted file mode 100644 index bfaafece59c7e059ebf471d4db6da5c6b7fb5a03..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/pairs.js +++ /dev/null @@ -1,15 +0,0 @@ -export default function pairs(values, pairof = pair) { - const pairs = []; - let previous; - let first = false; - for (const value of values) { - if (first) pairs.push(pairof(previous, value)); - previous = value; - first = true; - } - return pairs; -} - -export function pair(a, b) { - return [a, b]; -} diff --git a/node_modules/d3-array/src/permute.js b/node_modules/d3-array/src/permute.js deleted file mode 100644 index c7e822d1cd7fb9b62a4f33603e82b49bffd29bdf..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/permute.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(source, keys) { - return Array.from(keys, key => source[key]); -} diff --git a/node_modules/d3-array/src/quantile.js b/node_modules/d3-array/src/quantile.js deleted file mode 100644 index 09ddac7cc839f962e4fd3471b559a72293339c60..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/quantile.js +++ /dev/null @@ -1,29 +0,0 @@ -import max from "./max.js"; -import min from "./min.js"; -import quickselect from "./quickselect.js"; -import number, {numbers} from "./number.js"; - -export default function quantile(values, p, valueof) { - values = Float64Array.from(numbers(values, valueof)); - if (!(n = values.length)) return; - if ((p = +p) <= 0 || n < 2) return min(values); - if (p >= 1) return max(values); - var n, - i = (n - 1) * p, - i0 = Math.floor(i), - value0 = max(quickselect(values, i0).subarray(0, i0 + 1)), - value1 = min(values.subarray(i0 + 1)); - return value0 + (value1 - value0) * (i - i0); -} - -export function quantileSorted(values, p, valueof = number) { - if (!(n = values.length)) return; - if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values); - if (p >= 1) return +valueof(values[n - 1], n - 1, values); - var n, - i = (n - 1) * p, - i0 = Math.floor(i), - value0 = +valueof(values[i0], i0, values), - value1 = +valueof(values[i0 + 1], i0 + 1, values); - return value0 + (value1 - value0) * (i - i0); -} diff --git a/node_modules/d3-array/src/quickselect.js b/node_modules/d3-array/src/quickselect.js deleted file mode 100644 index 2a31d3658d1c682ac1e7331f61d87d334470c153..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/quickselect.js +++ /dev/null @@ -1,44 +0,0 @@ -import ascending from "./ascending.js"; - -// Based on https://github.com/mourner/quickselect -// ISC license, Copyright 2018 Vladimir Agafonkin. -export default function quickselect(array, k, left = 0, right = array.length - 1, compare = ascending) { - while (right > left) { - if (right - left > 600) { - const n = right - left + 1; - const m = k - left + 1; - const z = Math.log(n); - const s = 0.5 * Math.exp(2 * z / 3); - const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1); - const newLeft = Math.max(left, Math.floor(k - m * s / n + sd)); - const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd)); - quickselect(array, k, newLeft, newRight, compare); - } - - const t = array[k]; - let i = left; - let j = right; - - swap(array, left, k); - if (compare(array[right], t) > 0) swap(array, left, right); - - while (i < j) { - swap(array, i, j), ++i, --j; - while (compare(array[i], t) < 0) ++i; - while (compare(array[j], t) > 0) --j; - } - - if (compare(array[left], t) === 0) swap(array, left, j); - else ++j, swap(array, j, right); - - if (j <= k) left = j + 1; - if (k <= j) right = j - 1; - } - return array; -} - -function swap(array, i, j) { - const t = array[i]; - array[i] = array[j]; - array[j] = t; -} diff --git a/node_modules/d3-array/src/range.js b/node_modules/d3-array/src/range.js deleted file mode 100644 index 597560151269ed46aeaa0bdda2bc69b7f4afa372..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/range.js +++ /dev/null @@ -1,13 +0,0 @@ -export default function(start, stop, step) { - start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; - - var i = -1, - n = Math.max(0, Math.ceil((stop - start) / step)) | 0, - range = new Array(n); - - while (++i < n) { - range[i] = start + i * step; - } - - return range; -} diff --git a/node_modules/d3-array/src/reduce.js b/node_modules/d3-array/src/reduce.js deleted file mode 100644 index 3b49cf56b2823f7ecb4964d75eb5a7ca0b884aa8..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/reduce.js +++ /dev/null @@ -1,14 +0,0 @@ -export default function reduce(values, reducer, value) { - if (typeof reducer !== "function") throw new TypeError("reducer is not a function"); - const iterator = values[Symbol.iterator](); - let done, next, index = -1; - if (arguments.length < 3) { - ({done, value} = iterator.next()); - if (done) return; - ++index; - } - while (({done, value: next} = iterator.next()), !done) { - value = reducer(value, next, ++index, values); - } - return value; -} diff --git a/node_modules/d3-array/src/reverse.js b/node_modules/d3-array/src/reverse.js deleted file mode 100644 index da6742cf276c9dc0a896a8828d76e3ec080fc354..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/reverse.js +++ /dev/null @@ -1,4 +0,0 @@ -export default function reverse(values) { - if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); - return Array.from(values).reverse(); -} diff --git a/node_modules/d3-array/src/scan.js b/node_modules/d3-array/src/scan.js deleted file mode 100644 index 9c538f8a1894f9d3697dcf387d5c299ebf1ee30e..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/scan.js +++ /dev/null @@ -1,6 +0,0 @@ -import leastIndex from "./leastIndex.js"; - -export default function scan(values, compare) { - const index = leastIndex(values, compare); - return index < 0 ? undefined : index; -} diff --git a/node_modules/d3-array/src/set.js b/node_modules/d3-array/src/set.js deleted file mode 100644 index a115f9a4c8af67d57808c9e3034d9d81ddbac8c0..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/set.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function set(values) { - return values instanceof Set ? values : new Set(values); -} diff --git a/node_modules/d3-array/src/shuffle.js b/node_modules/d3-array/src/shuffle.js deleted file mode 100644 index 426cdac065a9b3a40aade00bcac4780aa718690e..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/shuffle.js +++ /dev/null @@ -1,13 +0,0 @@ -export default shuffler(Math.random); - -export function shuffler(random) { - return function shuffle(array, i0 = 0, i1 = array.length) { - let m = i1 - (i0 = +i0); - while (m) { - const i = random() * m-- | 0, t = array[m + i0]; - array[m + i0] = array[i + i0]; - array[i + i0] = t; - } - return array; - }; -} diff --git a/node_modules/d3-array/src/some.js b/node_modules/d3-array/src/some.js deleted file mode 100644 index 0b8f98b914d815854a04b04bbd43a85599131d22..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/some.js +++ /dev/null @@ -1,10 +0,0 @@ -export default function some(values, test) { - if (typeof test !== "function") throw new TypeError("test is not a function"); - let index = -1; - for (const value of values) { - if (test(value, ++index, values)) { - return true; - } - } - return false; -} diff --git a/node_modules/d3-array/src/sort.js b/node_modules/d3-array/src/sort.js deleted file mode 100644 index 9e7412107d0f53db0c1de6aa1f899a5240dafdaa..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/sort.js +++ /dev/null @@ -1,6 +0,0 @@ -import ascending from "./ascending.js"; - -export default function sort(values, comparator = ascending) { - if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); - return Array.from(values).sort(comparator); -} diff --git a/node_modules/d3-array/src/subset.js b/node_modules/d3-array/src/subset.js deleted file mode 100644 index 8a1c56407ef3d476e67af176b82ac09b2d31f82e..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/subset.js +++ /dev/null @@ -1,5 +0,0 @@ -import superset from "./superset.js"; - -export default function subset(values, other) { - return superset(other, values); -} diff --git a/node_modules/d3-array/src/sum.js b/node_modules/d3-array/src/sum.js deleted file mode 100644 index 0720e2a1f8d6a5e4e5995093a18394455598263d..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/sum.js +++ /dev/null @@ -1,18 +0,0 @@ -export default function sum(values, valueof) { - let sum = 0; - if (valueof === undefined) { - for (let value of values) { - if (value = +value) { - sum += value; - } - } - } else { - let index = -1; - for (let value of values) { - if (value = +valueof(value, ++index, values)) { - sum += value; - } - } - } - return sum; -} diff --git a/node_modules/d3-array/src/superset.js b/node_modules/d3-array/src/superset.js deleted file mode 100644 index 1097f2620a75c9b544f0f250f457d4c1ba7e472d..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/superset.js +++ /dev/null @@ -1,13 +0,0 @@ -export default function superset(values, other) { - const iterator = values[Symbol.iterator](), set = new Set(); - for (const o of other) { - if (set.has(o)) continue; - let value, done; - while (({value, done} = iterator.next())) { - if (done) return false; - set.add(value); - if (Object.is(o, value)) break; - } - } - return true; -} diff --git a/node_modules/d3-array/src/threshold/freedmanDiaconis.js b/node_modules/d3-array/src/threshold/freedmanDiaconis.js deleted file mode 100644 index 2f9a2091a536533a4b6aab872fea7272398ff914..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/threshold/freedmanDiaconis.js +++ /dev/null @@ -1,6 +0,0 @@ -import count from "../count.js"; -import quantile from "../quantile.js"; - -export default function(values, min, max) { - return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(count(values), -1 / 3))); -} diff --git a/node_modules/d3-array/src/threshold/scott.js b/node_modules/d3-array/src/threshold/scott.js deleted file mode 100644 index 219e080de9c1219ec549ef485ea0c8e0cdf8f101..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/threshold/scott.js +++ /dev/null @@ -1,6 +0,0 @@ -import count from "../count.js"; -import deviation from "../deviation.js"; - -export default function(values, min, max) { - return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(count(values), -1 / 3))); -} diff --git a/node_modules/d3-array/src/threshold/sturges.js b/node_modules/d3-array/src/threshold/sturges.js deleted file mode 100644 index eba4ab9c47871f78d3be4e56eeeb50cdfac4b27e..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/threshold/sturges.js +++ /dev/null @@ -1,5 +0,0 @@ -import count from "../count.js"; - -export default function(values) { - return Math.ceil(Math.log(count(values)) / Math.LN2) + 1; -} diff --git a/node_modules/d3-array/src/ticks.js b/node_modules/d3-array/src/ticks.js deleted file mode 100644 index dbb4426d82c03ce3b41d2283e42f1210983cc3fc..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/ticks.js +++ /dev/null @@ -1,52 +0,0 @@ -var e10 = Math.sqrt(50), - e5 = Math.sqrt(10), - e2 = Math.sqrt(2); - -export default function(start, stop, count) { - var reverse, - i = -1, - n, - ticks, - step; - - stop = +stop, start = +start, count = +count; - if (start === stop && count > 0) return [start]; - if (reverse = stop < start) n = start, start = stop, stop = n; - if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return []; - - if (step > 0) { - start = Math.ceil(start / step); - stop = Math.floor(stop / step); - ticks = new Array(n = Math.ceil(stop - start + 1)); - while (++i < n) ticks[i] = (start + i) * step; - } else { - step = -step; - start = Math.ceil(start * step); - stop = Math.floor(stop * step); - ticks = new Array(n = Math.ceil(stop - start + 1)); - while (++i < n) ticks[i] = (start + i) / step; - } - - if (reverse) ticks.reverse(); - - return ticks; -} - -export function tickIncrement(start, stop, count) { - var step = (stop - start) / Math.max(0, count), - power = Math.floor(Math.log(step) / Math.LN10), - error = step / Math.pow(10, power); - return power >= 0 - ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) - : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1); -} - -export function tickStep(start, stop, count) { - var step0 = Math.abs(stop - start) / Math.max(0, count), - step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), - error = step0 / step1; - if (error >= e10) step1 *= 10; - else if (error >= e5) step1 *= 5; - else if (error >= e2) step1 *= 2; - return stop < start ? -step1 : step1; -} diff --git a/node_modules/d3-array/src/transpose.js b/node_modules/d3-array/src/transpose.js deleted file mode 100644 index 5ef3bfeefca43c4eb4aef278b4983b5d33a92f2a..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/transpose.js +++ /dev/null @@ -1,15 +0,0 @@ -import min from "./min.js"; - -export default function(matrix) { - if (!(n = matrix.length)) return []; - for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) { - for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) { - row[j] = matrix[j][i]; - } - } - return transpose; -} - -function length(d) { - return d.length; -} diff --git a/node_modules/d3-array/src/union.js b/node_modules/d3-array/src/union.js deleted file mode 100644 index eb0856e5bcc200c7d66892bf49a8962c2b22d26a..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/union.js +++ /dev/null @@ -1,9 +0,0 @@ -export default function union(...others) { - const set = new Set(); - for (const other of others) { - for (const o of other) { - set.add(o); - } - } - return set; -} diff --git a/node_modules/d3-array/src/variance.js b/node_modules/d3-array/src/variance.js deleted file mode 100644 index 2428bf85fbd3a79c2f1558b960171707a0b42386..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/variance.js +++ /dev/null @@ -1,25 +0,0 @@ -export default function variance(values, valueof) { - let count = 0; - let delta; - let mean = 0; - let sum = 0; - if (valueof === undefined) { - for (let value of values) { - if (value != null && (value = +value) >= value) { - delta = value - mean; - mean += delta / ++count; - sum += delta * (value - mean); - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { - delta = value - mean; - mean += delta / ++count; - sum += delta * (value - mean); - } - } - } - if (count > 1) return sum / (count - 1); -} diff --git a/node_modules/d3-array/src/zip.js b/node_modules/d3-array/src/zip.js deleted file mode 100644 index a4603803b7c570465b9e225758c97f83eac8ef8f..0000000000000000000000000000000000000000 --- a/node_modules/d3-array/src/zip.js +++ /dev/null @@ -1,5 +0,0 @@ -import transpose from "./transpose.js"; - -export default function() { - return transpose(arguments); -} diff --git a/node_modules/d3-axis/LICENSE b/node_modules/d3-axis/LICENSE deleted file mode 100644 index 721bd22ece6587a9408eda1b6a3949c425b5624a..0000000000000000000000000000000000000000 --- a/node_modules/d3-axis/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-axis/README.md b/node_modules/d3-axis/README.md deleted file mode 100644 index 2ad92c0ca17dcc092e8e9f08f6ea1287fd035925..0000000000000000000000000000000000000000 --- a/node_modules/d3-axis/README.md +++ /dev/null @@ -1,194 +0,0 @@ -# d3-axis - -The axis component renders human-readable reference marks for [scales](https://github.com/d3/d3-scale). This alleviates one of the more tedious tasks in visualizing data. - -## Installing - -If you use NPM, `npm install d3-axis`. Otherwise, download the [latest release](https://github.com/d3/d3-axis/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-axis.v2.min.js) or as part of [D3](https://github.com/d3/d3). (To be useful, you’ll also want to use [d3-scale](https://github.com/d3/d3-scale) and [d3-selection](https://github.com/d3/d3-selection), but these are soft dependencies.) AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-axis.v2.min.js"></script> -<script> - -var axis = d3.axisLeft(scale); - -</script> -``` - -[Try d3-axis in your browser.](https://observablehq.com/collection/@d3/d3-axis) - -## API Reference - -Regardless of orientation, axes are always rendered at the origin. To change the position of the axis with respect to the chart, specify a [transform attribute](http://www.w3.org/TR/SVG/coords.html#TransformAttribute) on the containing element. For example: - -```js -d3.select("body").append("svg") - .attr("width", 1440) - .attr("height", 30) - .append("g") - .attr("transform", "translate(0,30)") - .call(axis); -``` - -The elements created by the axis are considered part of its public API. You can apply external stylesheets or modify the generated axis elements to [customize the axis appearance](https://observablehq.com/@d3/styled-axes). - -[<img alt="Custom Axis" src="https://raw.githubusercontent.com/d3/d3-axis/master/img/custom.png" width="420" height="219">](https://observablehq.com/@d3/styled-axes) - -An axis consists of a [path element](https://www.w3.org/TR/SVG/paths.html#PathElement) of class “domain†representing the extent of the scale’s domain, followed by transformed [g elements](https://www.w3.org/TR/SVG/struct.html#Groups) of class “tick†representing each of the scale’s ticks. Each tick has a [line element](https://www.w3.org/TR/SVG/shapes.html#LineElement) to draw the tick line, and a [text element](https://www.w3.org/TR/SVG/text.html#TextElement) for the tick label. For example, here is a typical bottom-oriented axis: - -```html -<g fill="none" font-size="10" font-family="sans-serif" text-anchor="middle"> - <path class="domain" stroke="currentColor" d="M0.5,6V0.5H880.5V6"></path> - <g class="tick" opacity="1" transform="translate(0.5,0)"> - <line stroke="currentColor" y2="6"></line> - <text fill="currentColor" y="9" dy="0.71em">0.0</text> - </g> - <g class="tick" opacity="1" transform="translate(176.5,0)"> - <line stroke="currentColor" y2="6"></line> - <text fill="currentColor" y="9" dy="0.71em">0.2</text> - </g> - <g class="tick" opacity="1" transform="translate(352.5,0)"> - <line stroke="currentColor" y2="6"></line> - <text fill="currentColor" y="9" dy="0.71em">0.4</text> - </g> - <g class="tick" opacity="1" transform="translate(528.5,0)"> - <line stroke="currentColor" y2="6"></line> - <text fill="currentColor" y="9" dy="0.71em">0.6</text> - </g> - <g class="tick" opacity="1" transform="translate(704.5,0)"> - <line stroke="currentColor" y2="6"></line> - <text fill="currentColor" y="9" dy="0.71em">0.8</text> - </g> - <g class="tick" opacity="1" transform="translate(880.5,0)"> - <line stroke="currentColor" y2="6"></line> - <text fill="currentColor" y="9" dy="0.71em">1.0</text> - </g> -</g> -``` - -The orientation of an axis is fixed; to change the orientation, remove the old axis and create a new axis. - -<a name="axisTop" href="#axisTop">#</a> d3.<b>axisTop</b>(<i>scale</i>) · [Source](https://github.com/d3/d3-axis/blob/master/src/axis.js) - -Constructs a new top-oriented axis generator for the given [scale](https://github.com/d3/d3-scale), with empty [tick arguments](#axis_ticks), a [tick size](#axis_tickSize) of 6 and [padding](#axis_tickPadding) of 3. In this orientation, ticks are drawn above the horizontal domain path. - -<a name="axisRight" href="#axisRight">#</a> d3.<b>axisRight</b>(<i>scale</i>) · [Source](https://github.com/d3/d3-axis/blob/master/src/axis.js) - -Constructs a new right-oriented axis generator for the given [scale](https://github.com/d3/d3-scale), with empty [tick arguments](#axis_ticks), a [tick size](#axis_tickSize) of 6 and [padding](#axis_tickPadding) of 3. In this orientation, ticks are drawn to the right of the vertical domain path. - -<a name="axisBottom" href="#axisBottom">#</a> d3.<b>axisBottom</b>(<i>scale</i>) · [Source](https://github.com/d3/d3-axis/blob/master/src/axis.js) - -Constructs a new bottom-oriented axis generator for the given [scale](https://github.com/d3/d3-scale), with empty [tick arguments](#axis_ticks), a [tick size](#axis_tickSize) of 6 and [padding](#axis_tickPadding) of 3. In this orientation, ticks are drawn below the horizontal domain path. - -<a name="axisLeft" href="#axisLeft">#</a> d3.<b>axisLeft</b>(<i>scale</i>) · [Source](https://github.com/d3/d3-axis/blob/master/src/axis.js) - -Constructs a new left-oriented axis generator for the given [scale](https://github.com/d3/d3-scale), with empty [tick arguments](#axis_ticks), a [tick size](#axis_tickSize) of 6 and [padding](#axis_tickPadding) of 3. In this orientation, ticks are drawn to the left of the vertical domain path. - -<a name="_axis" href="#_axis">#</a> <i>axis</i>(<i>context</i>) · [Source](https://github.com/d3/d3-axis/blob/master/src/axis.js) - -Render the axis to the given *context*, which may be either a [selection](https://github.com/d3/d3-selection) of SVG containers (either SVG or G elements) or a corresponding [transition](https://github.com/d3/d3-transition). - -<a name="axis_scale" href="#axis_scale">#</a> <i>axis</i>.<b>scale</b>([<i>scale</i>]) · [Source](https://github.com/d3/d3-axis/blob/master/src/axis.js) - -If *scale* is specified, sets the [scale](https://github.com/d3/d3-scale) and returns the axis. If *scale* is not specified, returns the current scale. - -<a name="axis_ticks" href="#axis_ticks">#</a> <i>axis</i>.<b>ticks</b>(<i>arguments…</i>) · [Source](https://github.com/d3/d3-axis/blob/master/src/axis.js) -<br><a href="#axis_ticks">#</a> <i>axis</i>.<b>ticks</b>([<i>count</i>[, <i>specifier</i>]]) -<br><a href="#axis_ticks">#</a> <i>axis</i>.<b>ticks</b>([<i>interval</i>[, <i>specifier</i>]]) - -Sets the *arguments* that will be passed to [*scale*.ticks](https://github.com/d3/d3-scale/blob/master/README.md#continuous_ticks) and [*scale*.tickFormat](https://github.com/d3/d3-scale/blob/master/README.md#continuous_tickFormat) when the axis is [rendered](#_axis), and returns the axis generator. The meaning of the *arguments* depends on the [axis’ scale](#axis_scale) type: most commonly, the arguments are a suggested *count* for the number of ticks (or a [time *interval*](https://github.com/d3/d3-time) for time scales), and an optional [format *specifier*](https://github.com/d3/d3-format) to customize how the tick values are formatted. - -This method has no effect if the scale does not implement *scale*.ticks, as with [band](https://github.com/d3/d3-scale/blob/master/README.md#band-scales) and [point](https://github.com/d3/d3-scale/blob/master/README.md#point-scales) scales. To set the tick values explicitly, use [*axis*.tickValues](#axis_tickValues). To set the tick format explicitly, use [*axis*.tickFormat](#axis_tickFormat). - -For example, to generate twenty ticks with SI-prefix formatting on a linear scale, say: - -```js -axis.ticks(20, "s"); -``` - -To generate ticks every fifteen minutes with a time scale, say: - -```js -axis.ticks(d3.timeMinute.every(15)); -``` - -This method is also a convenience function for [*axis*.tickArguments](#axis_tickArguments). For example, this: - -```js -axis.ticks(10); -``` - -Is equivalent to: - -```js -axis.tickArguments([10]); -``` - -To generate tick values directly, use [*scale*.ticks](https://github.com/d3/d3-scale/blob/master/README.md#continuous_ticks). - -<a name="axis_tickArguments" href="#axis_tickArguments">#</a> <i>axis</i>.<b>tickArguments</b>([<i>arguments</i>]) · [Source](https://github.com/d3/d3-axis/blob/master/src/axis.js) - -If *arguments* is specified, sets the *arguments* that will be passed to [*scale*.ticks](https://github.com/d3/d3-scale/blob/master/README.md#continuous_ticks) and [*scale*.tickFormat](https://github.com/d3/d3-scale/blob/master/README.md#continuous_tickFormat) when the axis is [rendered](#_axis), and returns the axis generator. The meaning of the *arguments* depends on the [axis’ scale](#axis_scale) type: most commonly, the arguments are a suggested *count* for the number of ticks (or a [time *interval*](https://github.com/d3/d3-time) for time scales), and an optional [format *specifier*](https://github.com/d3/d3-format) to customize how the tick values are formatted. - -If *arguments* is specified, this method has no effect if the scale does not implement *scale*.ticks, as with [band](https://github.com/d3/d3-scale/blob/master/README.md#band-scales) and [point](https://github.com/d3/d3-scale/blob/master/README.md#point-scales) scales. To set the tick values explicitly, use [*axis*.tickValues](#axis_tickValues). To set the tick format explicitly, use [*axis*.tickFormat](#axis_tickFormat). - -If *arguments* is not specified, returns the current tick arguments, which defaults to the empty array. - -For example, to generate twenty ticks with SI-prefix formatting on a linear scale, say: - -```js -axis.tickArguments([20, "s"]); -``` - -To generate ticks every fifteen minutes with a time scale, say: - -```js -axis.tickArguments([d3.timeMinute.every(15)]); -``` - -See also [*axis*.ticks](#axis_ticks). - -<a name="axis_tickValues" href="#axis_tickValues">#</a> <i>axis</i>.<b>tickValues</b>([<i>values</i>]) · [Source](https://github.com/d3/d3-axis/blob/master/src/axis.js) - -If a *values* array is specified, the specified values are used for ticks rather than using the scale’s automatic tick generator. If *values* is null, clears any previously-set explicit tick values and reverts back to the scale’s tick generator. If *values* is not specified, returns the current tick values, which defaults to null. For example, to generate ticks at specific values: - -```js -var xAxis = d3.axisBottom(x) - .tickValues([1, 2, 3, 5, 8, 13, 21]); -``` - -The explicit tick values take precedent over the tick arguments set by [*axis*.tickArguments](#axis_tickArguments). However, any tick arguments will still be passed to the scale’s [tickFormat](#axis_tickFormat) function if a tick format is not also set. - -<a name="axis_tickFormat" href="#axis_tickFormat">#</a> <i>axis</i>.<b>tickFormat</b>([<i>format</i>]) · [Source](https://github.com/d3/d3-axis/blob/master/src/axis.js) - -If *format* is specified, sets the tick format function and returns the axis. If *format* is not specified, returns the current format function, which defaults to null. A null format indicates that the scale’s default formatter should be used, which is generated by calling [*scale*.tickFormat](https://github.com/d3/d3-scale/blob/master/README.md#continuous_tickFormat). In this case, the arguments specified by [*axis*.tickArguments](#axis_tickArguments) are likewise passed to *scale*.tickFormat. - -See [d3-format](https://github.com/d3/d3-format) and [d3-time-format](https://github.com/d3/d3-time-format) for help creating formatters. For example, to display integers with comma-grouping for thousands: - -```js -axis.tickFormat(d3.format(",.0f")); -``` - -More commonly, a format specifier is passed to [*axis*.ticks](#axis_ticks): - -```js -axis.ticks(10, ",f"); -``` - -This has the advantage of setting the format precision automatically based on the tick interval. - -<a name="axis_tickSize" href="#axis_tickSize">#</a> <i>axis</i>.<b>tickSize</b>([<i>size</i>]) · [Source](https://github.com/d3/d3-axis/blob/master/src/axis.js) - -If *size* is specified, sets the [inner](#axis_tickSizeInner) and [outer](#axis_tickSizeOuter) tick size to the specified value and returns the axis. If *size* is not specified, returns the current inner tick size, which defaults to 6. - -<a name="axis_tickSizeInner" href="#axis_tickSizeInner">#</a> <i>axis</i>.<b>tickSizeInner</b>([<i>size</i>]) · [Source](https://github.com/d3/d3-axis/blob/master/src/axis.js) - -If *size* is specified, sets the inner tick size to the specified value and returns the axis. If *size* is not specified, returns the current inner tick size, which defaults to 6. The inner tick size controls the length of the tick lines, offset from the native position of the axis. - -<a name="axis_tickSizeOuter" href="#axis_tickSizeOuter">#</a> <i>axis</i>.<b>tickSizeOuter</b>([<i>size</i>]) · [Source](https://github.com/d3/d3-axis/blob/master/src/axis.js) - -If *size* is specified, sets the outer tick size to the specified value and returns the axis. If *size* is not specified, returns the current outer tick size, which defaults to 6. The outer tick size controls the length of the square ends of the domain path, offset from the native position of the axis. Thus, the “outer ticks†are not actually ticks but part of the domain path, and their position is determined by the associated scale’s domain extent. Thus, outer ticks may overlap with the first or last inner tick. An outer tick size of 0 suppresses the square ends of the domain path, instead producing a straight line. - -<a name="axis_tickPadding" href="#axis_tickPadding">#</a> <i>axis</i>.<b>tickPadding</b>([<i>padding</i>]) · [Source](https://github.com/d3/d3-axis/blob/master/src/axis.js) - -If *padding* is specified, sets the padding to the specified value in pixels and returns the axis. If *padding* is not specified, returns the current padding which defaults to 3 pixels. diff --git a/node_modules/d3-axis/dist/d3-axis.js b/node_modules/d3-axis/dist/d3-axis.js deleted file mode 100644 index 826e1bca31ca6a531802e7d249b5e902edb7ce5d..0000000000000000000000000000000000000000 --- a/node_modules/d3-axis/dist/d3-axis.js +++ /dev/null @@ -1,191 +0,0 @@ -// https://d3js.org/d3-axis/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {})); -}(this, function (exports) { 'use strict'; - -var slice = Array.prototype.slice; - -function identity(x) { - return x; -} - -var top = 1, - right = 2, - bottom = 3, - left = 4, - epsilon = 1e-6; - -function translateX(x) { - return "translate(" + (x + 0.5) + ",0)"; -} - -function translateY(y) { - return "translate(0," + (y + 0.5) + ")"; -} - -function number(scale) { - return d => +scale(d); -} - -function center(scale) { - var offset = Math.max(0, scale.bandwidth() - 1) / 2; // Adjust for 0.5px offset. - if (scale.round()) offset = Math.round(offset); - return function(d) { - return +scale(d) + offset; - }; -} - -function entering() { - return !this.__axis; -} - -function axis(orient, scale) { - var tickArguments = [], - tickValues = null, - tickFormat = null, - tickSizeInner = 6, - tickSizeOuter = 6, - tickPadding = 3, - k = orient === top || orient === left ? -1 : 1, - x = orient === left || orient === right ? "x" : "y", - transform = orient === top || orient === bottom ? translateX : translateY; - - function axis(context) { - var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues, - format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity) : tickFormat, - spacing = Math.max(tickSizeInner, 0) + tickPadding, - range = scale.range(), - range0 = +range[0] + 0.5, - range1 = +range[range.length - 1] + 0.5, - position = (scale.bandwidth ? center : number)(scale.copy()), - selection = context.selection ? context.selection() : context, - path = selection.selectAll(".domain").data([null]), - tick = selection.selectAll(".tick").data(values, scale).order(), - tickExit = tick.exit(), - tickEnter = tick.enter().append("g").attr("class", "tick"), - line = tick.select("line"), - text = tick.select("text"); - - path = path.merge(path.enter().insert("path", ".tick") - .attr("class", "domain") - .attr("stroke", "currentColor")); - - tick = tick.merge(tickEnter); - - line = line.merge(tickEnter.append("line") - .attr("stroke", "currentColor") - .attr(x + "2", k * tickSizeInner)); - - text = text.merge(tickEnter.append("text") - .attr("fill", "currentColor") - .attr(x, k * spacing) - .attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em")); - - if (context !== selection) { - path = path.transition(context); - tick = tick.transition(context); - line = line.transition(context); - text = text.transition(context); - - tickExit = tickExit.transition(context) - .attr("opacity", epsilon) - .attr("transform", function(d) { return isFinite(d = position(d)) ? transform(d) : this.getAttribute("transform"); }); - - tickEnter - .attr("opacity", epsilon) - .attr("transform", function(d) { var p = this.parentNode.__axis; return transform(p && isFinite(p = p(d)) ? p : position(d)); }); - } - - tickExit.remove(); - - path - .attr("d", orient === left || orient == right - ? (tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H0.5V" + range1 + "H" + k * tickSizeOuter : "M0.5," + range0 + "V" + range1) - : (tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V0.5H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + ",0.5H" + range1)); - - tick - .attr("opacity", 1) - .attr("transform", function(d) { return transform(position(d)); }); - - line - .attr(x + "2", k * tickSizeInner); - - text - .attr(x, k * spacing) - .text(format); - - selection.filter(entering) - .attr("fill", "none") - .attr("font-size", 10) - .attr("font-family", "sans-serif") - .attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle"); - - selection - .each(function() { this.__axis = position; }); - } - - axis.scale = function(_) { - return arguments.length ? (scale = _, axis) : scale; - }; - - axis.ticks = function() { - return tickArguments = slice.call(arguments), axis; - }; - - axis.tickArguments = function(_) { - return arguments.length ? (tickArguments = _ == null ? [] : slice.call(_), axis) : tickArguments.slice(); - }; - - axis.tickValues = function(_) { - return arguments.length ? (tickValues = _ == null ? null : slice.call(_), axis) : tickValues && tickValues.slice(); - }; - - axis.tickFormat = function(_) { - return arguments.length ? (tickFormat = _, axis) : tickFormat; - }; - - axis.tickSize = function(_) { - return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner; - }; - - axis.tickSizeInner = function(_) { - return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner; - }; - - axis.tickSizeOuter = function(_) { - return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter; - }; - - axis.tickPadding = function(_) { - return arguments.length ? (tickPadding = +_, axis) : tickPadding; - }; - - return axis; -} - -function axisTop(scale) { - return axis(top, scale); -} - -function axisRight(scale) { - return axis(right, scale); -} - -function axisBottom(scale) { - return axis(bottom, scale); -} - -function axisLeft(scale) { - return axis(left, scale); -} - -exports.axisBottom = axisBottom; -exports.axisLeft = axisLeft; -exports.axisRight = axisRight; -exports.axisTop = axisTop; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-axis/dist/d3-axis.min.js b/node_modules/d3-axis/dist/d3-axis.min.js deleted file mode 100644 index f2325f6c498b5c04defb3f4f8ea67fe9e9266328..0000000000000000000000000000000000000000 --- a/node_modules/d3-axis/dist/d3-axis.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-axis/ v2.0.0 Copyright 2020 Mike Bostock -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t=t||self).d3=t.d3||{})}(this,function(t){"use strict";var n=Array.prototype.slice;function r(t){return t}var e=1,i=2,a=3,o=4,u=1e-6;function c(t){return"translate("+(t+.5)+",0)"}function l(t){return"translate(0,"+(t+.5)+")"}function s(){return!this.__axis}function f(t,f){var d=[],m=null,p=null,h=6,g=6,x=3,k=t===e||t===o?-1:1,y=t===o||t===i?"x":"y",v=t===e||t===a?c:l;function M(n){var c=null==m?f.ticks?f.ticks.apply(f,d):f.domain():m,l=null==p?f.tickFormat?f.tickFormat.apply(f,d):r:p,M=Math.max(h,0)+x,_=f.range(),b=+_[0]+.5,A=+_[_.length-1]+.5,F=(f.bandwidth?function(t){var n=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(n=Math.round(n)),function(r){return+t(r)+n}}:function(t){return n=>+t(n)})(f.copy()),V=n.selection?n.selection():n,z=V.selectAll(".domain").data([null]),H=V.selectAll(".tick").data(c,f).order(),C=H.exit(),S=H.enter().append("g").attr("class","tick"),j=H.select("line"),w=H.select("text");z=z.merge(z.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),H=H.merge(S),j=j.merge(S.append("line").attr("stroke","currentColor").attr(y+"2",k*h)),w=w.merge(S.append("text").attr("fill","currentColor").attr(y,k*M).attr("dy",t===e?"0em":t===a?"0.71em":"0.32em")),n!==V&&(z=z.transition(n),H=H.transition(n),j=j.transition(n),w=w.transition(n),C=C.transition(n).attr("opacity",u).attr("transform",function(t){return isFinite(t=F(t))?v(t):this.getAttribute("transform")}),S.attr("opacity",u).attr("transform",function(t){var n=this.parentNode.__axis;return v(n&&isFinite(n=n(t))?n:F(t))})),C.remove(),z.attr("d",t===o||t==i?g?"M"+k*g+","+b+"H0.5V"+A+"H"+k*g:"M0.5,"+b+"V"+A:g?"M"+b+","+k*g+"V0.5H"+A+"V"+k*g:"M"+b+",0.5H"+A),H.attr("opacity",1).attr("transform",function(t){return v(F(t))}),j.attr(y+"2",k*h),w.attr(y,k*M).text(l),V.filter(s).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===i?"start":t===o?"end":"middle"),V.each(function(){this.__axis=F})}return M.scale=function(t){return arguments.length?(f=t,M):f},M.ticks=function(){return d=n.call(arguments),M},M.tickArguments=function(t){return arguments.length?(d=null==t?[]:n.call(t),M):d.slice()},M.tickValues=function(t){return arguments.length?(m=null==t?null:n.call(t),M):m&&m.slice()},M.tickFormat=function(t){return arguments.length?(p=t,M):p},M.tickSize=function(t){return arguments.length?(h=g=+t,M):h},M.tickSizeInner=function(t){return arguments.length?(h=+t,M):h},M.tickSizeOuter=function(t){return arguments.length?(g=+t,M):g},M.tickPadding=function(t){return arguments.length?(x=+t,M):x},M}t.axisBottom=function(t){return f(a,t)},t.axisLeft=function(t){return f(o,t)},t.axisRight=function(t){return f(i,t)},t.axisTop=function(t){return f(e,t)},Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/node_modules/d3-axis/package.json b/node_modules/d3-axis/package.json deleted file mode 100644 index c8c136e030bcf6a69ea251b59426d2a8ae514b2e..0000000000000000000000000000000000000000 --- a/node_modules/d3-axis/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "d3-axis@2", - "_id": "d3-axis@2.0.0", - "_inBundle": false, - "_integrity": "sha512-9nzB0uePtb+u9+dWir+HTuEAKJOEUYJoEwbJPsZ1B4K3iZUgzJcSENQ05Nj7S4CIfbZZ8/jQGoUzGKFznBhiiQ==", - "_location": "/d3-axis", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-axis@2", - "name": "d3-axis", - "escapedName": "d3-axis", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3" - ], - "_resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-2.0.0.tgz", - "_shasum": "40aebb65626ffe6d95e9441fbf9194274b328a8b", - "_spec": "d3-axis@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-axis/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Displays automatic reference lines for scales.", - "devDependencies": { - "d3-scale": "2 - 3", - "d3-selection": "1 - 2", - "eslint": "6", - "jsdom": "15", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-axis/", - "jsdelivr": "dist/d3-axis.min.js", - "keywords": [ - "d3", - "d3-module", - "axis", - "scale", - "visualization" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-axis.js", - "module": "src/index.js", - "name": "d3-axis", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-axis.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src test" - }, - "sideEffects": false, - "unpkg": "dist/d3-axis.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-axis/src/array.js b/node_modules/d3-axis/src/array.js deleted file mode 100644 index 8eeac161d97560e3ea6e71c120ca15f518d8fb9e..0000000000000000000000000000000000000000 --- a/node_modules/d3-axis/src/array.js +++ /dev/null @@ -1 +0,0 @@ -export var slice = Array.prototype.slice; diff --git a/node_modules/d3-axis/src/axis.js b/node_modules/d3-axis/src/axis.js deleted file mode 100644 index bc65f1b31cea4c2bddf10f3b1b4c2891327b5a4c..0000000000000000000000000000000000000000 --- a/node_modules/d3-axis/src/axis.js +++ /dev/null @@ -1,172 +0,0 @@ -import {slice} from "./array.js"; -import identity from "./identity.js"; - -var top = 1, - right = 2, - bottom = 3, - left = 4, - epsilon = 1e-6; - -function translateX(x) { - return "translate(" + (x + 0.5) + ",0)"; -} - -function translateY(y) { - return "translate(0," + (y + 0.5) + ")"; -} - -function number(scale) { - return d => +scale(d); -} - -function center(scale) { - var offset = Math.max(0, scale.bandwidth() - 1) / 2; // Adjust for 0.5px offset. - if (scale.round()) offset = Math.round(offset); - return function(d) { - return +scale(d) + offset; - }; -} - -function entering() { - return !this.__axis; -} - -function axis(orient, scale) { - var tickArguments = [], - tickValues = null, - tickFormat = null, - tickSizeInner = 6, - tickSizeOuter = 6, - tickPadding = 3, - k = orient === top || orient === left ? -1 : 1, - x = orient === left || orient === right ? "x" : "y", - transform = orient === top || orient === bottom ? translateX : translateY; - - function axis(context) { - var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues, - format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity) : tickFormat, - spacing = Math.max(tickSizeInner, 0) + tickPadding, - range = scale.range(), - range0 = +range[0] + 0.5, - range1 = +range[range.length - 1] + 0.5, - position = (scale.bandwidth ? center : number)(scale.copy()), - selection = context.selection ? context.selection() : context, - path = selection.selectAll(".domain").data([null]), - tick = selection.selectAll(".tick").data(values, scale).order(), - tickExit = tick.exit(), - tickEnter = tick.enter().append("g").attr("class", "tick"), - line = tick.select("line"), - text = tick.select("text"); - - path = path.merge(path.enter().insert("path", ".tick") - .attr("class", "domain") - .attr("stroke", "currentColor")); - - tick = tick.merge(tickEnter); - - line = line.merge(tickEnter.append("line") - .attr("stroke", "currentColor") - .attr(x + "2", k * tickSizeInner)); - - text = text.merge(tickEnter.append("text") - .attr("fill", "currentColor") - .attr(x, k * spacing) - .attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em")); - - if (context !== selection) { - path = path.transition(context); - tick = tick.transition(context); - line = line.transition(context); - text = text.transition(context); - - tickExit = tickExit.transition(context) - .attr("opacity", epsilon) - .attr("transform", function(d) { return isFinite(d = position(d)) ? transform(d) : this.getAttribute("transform"); }); - - tickEnter - .attr("opacity", epsilon) - .attr("transform", function(d) { var p = this.parentNode.__axis; return transform(p && isFinite(p = p(d)) ? p : position(d)); }); - } - - tickExit.remove(); - - path - .attr("d", orient === left || orient == right - ? (tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H0.5V" + range1 + "H" + k * tickSizeOuter : "M0.5," + range0 + "V" + range1) - : (tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V0.5H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + ",0.5H" + range1)); - - tick - .attr("opacity", 1) - .attr("transform", function(d) { return transform(position(d)); }); - - line - .attr(x + "2", k * tickSizeInner); - - text - .attr(x, k * spacing) - .text(format); - - selection.filter(entering) - .attr("fill", "none") - .attr("font-size", 10) - .attr("font-family", "sans-serif") - .attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle"); - - selection - .each(function() { this.__axis = position; }); - } - - axis.scale = function(_) { - return arguments.length ? (scale = _, axis) : scale; - }; - - axis.ticks = function() { - return tickArguments = slice.call(arguments), axis; - }; - - axis.tickArguments = function(_) { - return arguments.length ? (tickArguments = _ == null ? [] : slice.call(_), axis) : tickArguments.slice(); - }; - - axis.tickValues = function(_) { - return arguments.length ? (tickValues = _ == null ? null : slice.call(_), axis) : tickValues && tickValues.slice(); - }; - - axis.tickFormat = function(_) { - return arguments.length ? (tickFormat = _, axis) : tickFormat; - }; - - axis.tickSize = function(_) { - return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner; - }; - - axis.tickSizeInner = function(_) { - return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner; - }; - - axis.tickSizeOuter = function(_) { - return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter; - }; - - axis.tickPadding = function(_) { - return arguments.length ? (tickPadding = +_, axis) : tickPadding; - }; - - return axis; -} - -export function axisTop(scale) { - return axis(top, scale); -} - -export function axisRight(scale) { - return axis(right, scale); -} - -export function axisBottom(scale) { - return axis(bottom, scale); -} - -export function axisLeft(scale) { - return axis(left, scale); -} diff --git a/node_modules/d3-axis/src/identity.js b/node_modules/d3-axis/src/identity.js deleted file mode 100644 index b2f94b2e21fee82e347197f65d2d2c8f0b655642..0000000000000000000000000000000000000000 --- a/node_modules/d3-axis/src/identity.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(x) { - return x; -} diff --git a/node_modules/d3-axis/src/index.js b/node_modules/d3-axis/src/index.js deleted file mode 100644 index d8700430af324384b48bc7a0a5cb1231bafae1cd..0000000000000000000000000000000000000000 --- a/node_modules/d3-axis/src/index.js +++ /dev/null @@ -1,6 +0,0 @@ -export { - axisTop, - axisRight, - axisBottom, - axisLeft -} from "./axis.js"; diff --git a/node_modules/d3-brush/LICENSE b/node_modules/d3-brush/LICENSE deleted file mode 100644 index 721bd22ece6587a9408eda1b6a3949c425b5624a..0000000000000000000000000000000000000000 --- a/node_modules/d3-brush/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-brush/README.md b/node_modules/d3-brush/README.md deleted file mode 100644 index 25e74c66cd5ac41b30adc911783d6c0c781fcc27..0000000000000000000000000000000000000000 --- a/node_modules/d3-brush/README.md +++ /dev/null @@ -1,172 +0,0 @@ -# d3-brush - -Brushing is the interactive specification a one- or two-dimensional selected region using a pointing gesture, such as by clicking and dragging the mouse. Brushing is often used to select discrete elements, such as dots in a scatterplot or files on a desktop. It can also be used to zoom-in to a region of interest, or to select continuous regions for [cross-filtering data](http://square.github.io/crossfilter/) or live histograms: - -[<img alt="Mona Lisa Histogram" src="https://raw.githubusercontent.com/d3/d3-brush/master/img/mona-lisa.jpg" width="420" height="219">](https://observablehq.com/@d3/mona-lisa-histogram) - -The d3-brush module implements brushing for mouse and touch events using [SVG](https://www.w3.org/TR/SVG/). Click and drag on the brush selection to translate the selection. Click and drag on one of the selection handles to move the corresponding edge (or edges) of the selection. Click and drag on the invisible overlay to define a new brush selection, or click anywhere within the brushable region while holding down the META (⌘) key. Holding down the ALT (⌥) key while moving the brush causes it to reposition around its center, while holding down SPACE locks the current brush size, allowing only translation. - -Brushes also support programmatic control. For example, you can listen to [*end* events](#brush-events), and then initiate a transition with [*brush*.move](#brush_move) to snap the brush selection to semantic boundaries: - -[<img alt="Brush Snapping" src="https://raw.githubusercontent.com/d3/d3-brush/master/img/snapping.png" width="420" height="219">](https://observablehq.com/@d3/brush-snapping-transitions) - -Or you can have the brush recenter when you click outside the current selection: - -[<img alt="Click-to-Recenter" src="https://raw.githubusercontent.com/d3/d3-brush/master/img/recenter.jpg" width="420" height="219">](https://observablehq.com/@d3/click-to-recenter-brush) - -## Installing - -If you use NPM, `npm install d3-brush`. Otherwise, download the [latest release](https://github.com/d3/d3-brush/releases/latest). You can load as a [standalone library](https://d3js.org/d3-brush.v1.min.js) or as part of [D3](https://github.com/d3/d3). ES modules, AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-color.v2.min.js"></script> -<script src="https://d3js.org/d3-dispatch.v2.min.js"></script> -<script src="https://d3js.org/d3-ease.v2.min.js"></script> -<script src="https://d3js.org/d3-interpolate.v2.min.js"></script> -<script src="https://d3js.org/d3-timer.v2.min.js"></script> -<script src="https://d3js.org/d3-selection.v2.min.js"></script> -<script src="https://d3js.org/d3-transition.v2.min.js"></script> -<script src="https://d3js.org/d3-drag.v2.min.js"></script> -<script src="https://d3js.org/d3-brush.v2.min.js"></script> -<script> - -var brush = d3.brush(); - -</script> -``` - -[Try d3-brush in your browser.](https://observablehq.com/collection/@d3/d3-brush) - -## API Reference - -<a href="#brush" name="brush">#</a> d3.<b>brush</b>() · [Source](https://github.com/d3/d3-brush/blob/master/src/brush.js), [Examples](https://observablehq.com/@d3/brushable-scatterplot) - -Creates a new two-dimensional brush. - -<a href="#brushX" name="brushX">#</a> d3.<b>brushX</b>() · [Source](https://github.com/d3/d3-brush/blob/master/src/brush.js), [Examples](https://observablehq.com/@d3/focus-context) - -Creates a new one-dimensional brush along the *x*-dimension. - -<a href="#brushY" name="brushY">#</a> d3.<b>brushY</b>() · [Source](https://github.com/d3/d3-brush/blob/master/src/brush.js) - -Creates a new one-dimensional brush along the *y*-dimension. - -<a href="#_brush" name="_brush">#</a> <i>brush</i>(<i>group</i>) · [Source](https://github.com/d3/d3-brush/blob/master/src/brush.js), [Examples](https://observablehq.com/@d3/brushable-scatterplot-matrix) - -Applies the brush to the specified *group*, which must be a [selection](https://github.com/d3/d3-selection) of SVG [G elements](https://www.w3.org/TR/SVG/struct.html#Groups). This function is typically not invoked directly, and is instead invoked via [*selection*.call](https://github.com/d3/d3-selection#selection_call). For example, to render a brush: - -```js -svg.append("g") - .attr("class", "brush") - .call(d3.brush().on("brush", brushed)); -``` - -Internally, the brush uses [*selection*.on](https://github.com/d3/d3-selection#selection_on) to bind the necessary event listeners for dragging. The listeners use the name `.brush`, so you can subsequently unbind the brush event listeners as follows: - -```js -group.on(".brush", null); -``` - -The brush also creates the SVG elements necessary to display the brush selection and to receive input events for interaction. You can add, remove or modify these elements as desired to change the brush appearance; you can also apply stylesheets to modify the brush appearance. The structure of a two-dimensional brush is as follows: - -```html -<g class="brush" fill="none" pointer-events="all" style="-webkit-tap-highlight-color: rgba(0, 0, 0, 0);"> - <rect class="overlay" pointer-events="all" cursor="crosshair" x="0" y="0" width="960" height="500"></rect> - <rect class="selection" cursor="move" fill="#777" fill-opacity="0.3" stroke="#fff" shape-rendering="crispEdges" x="112" y="194" width="182" height="83"></rect> - <rect class="handle handle--n" cursor="ns-resize" x="107" y="189" width="192" height="10"></rect> - <rect class="handle handle--e" cursor="ew-resize" x="289" y="189" width="10" height="93"></rect> - <rect class="handle handle--s" cursor="ns-resize" x="107" y="272" width="192" height="10"></rect> - <rect class="handle handle--w" cursor="ew-resize" x="107" y="189" width="10" height="93"></rect> - <rect class="handle handle--nw" cursor="nwse-resize" x="107" y="189" width="10" height="10"></rect> - <rect class="handle handle--ne" cursor="nesw-resize" x="289" y="189" width="10" height="10"></rect> - <rect class="handle handle--se" cursor="nwse-resize" x="289" y="272" width="10" height="10"></rect> - <rect class="handle handle--sw" cursor="nesw-resize" x="107" y="272" width="10" height="10"></rect> -</g> -``` - -The overlay rect covers the brushable area defined by [*brush*.extent](#brush_extent). The selection rect covers the area defined by the current [brush selection](#brushSelection). The handle rects cover the edges and corners of the brush selection, allowing the corresponding value in the brush selection to be modified interactively. To modify the brush selection programmatically, use [*brush*.move](#brush_move). - -<a href="#brush_move" name="brush_move">#</a> <i>brush</i>.<b>move</b>(<i>group</i>, <i>selection</i>) · [Source](https://github.com/d3/d3-brush/blob/master/src/brush.js), [Examples](https://observablehq.com/d/93b91f86f9ebc9b9) - -Sets the active *selection* of the brush on the specified *group*, which must be a [selection](https://github.com/d3/d3-selection) or a [transition](https://github.com/d3/d3-transition) of SVG [G elements](https://www.w3.org/TR/SVG/struct.html#Groups). The *selection* must be defined as an array of numbers, or null to clear the brush selection. For a [two-dimensional brush](#brush), it must be defined as [[*x0*, *y0*], [*x1*, *y1*]], where *x0* is the minimum *x*-value, *y0* is the minimum *y*-value, *x1* is the maximum *x*-value, and *y1* is the maximum *y*-value. For an [*x*-brush](#brushX), it must be defined as [*x0*, *x1*]; for a [*y*-brush](#brushY), it must be defined as [*y0*, *y1*]. The selection may also be specified as a function which returns such an array; if a function, it is invoked for each selected element, being passed the current datum `d` and index `i`, with the `this` context as the current DOM element. The returned array defines the brush selection for that element. - -<a href="#brush_clear" name="brush_clear">#</a> <i>brush</i>.<b>clear</b>(<i>group</i>) · [Source](https://github.com/d3/d3-brush/blob/master/src/brush.js), [Examples](https://observablehq.com/@d3/double-click-brush-clear) - -An alias for [*brush*.move](#brush_move) with the null selection. - -<a href="#brush_extent" name="brush_extent">#</a> <i>brush</i>.<b>extent</b>([<i>extent</i>]) · [Source](https://github.com/d3/d3-brush/blob/master/src/brush.js), [Examples](https://observablehq.com/@d3/brush-snapping) - -If *extent* is specified, sets the brushable extent to the specified array of points [[*x0*, *y0*], [*x1*, *y1*]], where [*x0*, *y0*] is the top-left corner and [*x1*, *y1*] is the bottom-right corner, and returns this brush. The *extent* may also be specified as a function which returns such an array; if a function, it is invoked for each selected element, being passed the current datum `d` and index `i`, with the `this` context as the current DOM element. If *extent* is not specified, returns the current extent accessor, which defaults to: - -```js -function defaultExtent() { - var svg = this.ownerSVGElement || this; - if (svg.hasAttribute("viewBox")) { - svg = svg.viewBox.baseVal; - return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]]; - } - return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]]; -} -``` - -This default implementation requires that the owner SVG element have a defined [viewBox](https://www.w3.org/TR/SVG/coords.html#ViewBoxAttribute), or [width](https://www.w3.org/TR/SVG/struct.html#SVGElementWidthAttribute) and [height](https://www.w3.org/TR/SVG/struct.html#SVGElementHeightAttribute) attributes. Alternatively, consider using [*element*.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect). (In Firefox, [*element*.clientWidth](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth) and [*element*.clientHeight](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientHeight) is zero for SVG elements!) - -The brush extent determines the size of the invisible overlay and also constrains the brush selection; the brush selection cannot go outside the brush extent. - -<a href="#brush_filter" name="brush_filter">#</a> <i>brush</i>.<b>filter</b>([<i>filter</i>]) · [Source](https://github.com/d3/d3-brush/blob/master/src/brush.js), [Examples](https://observablehq.com/@d3/brush-filter) - -If *filter* is specified, sets the filter to the specified function and returns the brush. If *filter* is not specified, returns the current filter, which defaults to: - -```js -function filter(event) { - return !event.ctrlKey && !event.button; -} -``` - -If the filter returns falsey, the initiating event is ignored and no brush gesture is started. Thus, the filter determines which input events are ignored. The default filter ignores mousedown events on secondary buttons, since those buttons are typically intended for other purposes, such as the context menu. - -<a href="#brush_touchable" name="brush_touchable">#</a> <i>brush</i>.<b>touchable</b>([<i>touchable</i>]) · [Source](https://github.com/d3/d3-brush/blob/master/src/brush.js) - -If *touchable* is specified, sets the touch support detector to the specified function and returns the brush. If *touchable* is not specified, returns the current touch support detector, which defaults to: - -```js -function touchable() { - return navigator.maxTouchPoints || ("ontouchstart" in this); -} -``` - -Touch event listeners are only registered if the detector returns truthy for the corresponding element when the brush is [applied](#_brush). The default detector works well for most browsers that are capable of touch input, but not all; Chrome’s mobile device emulator, for example, fails detection. - -<a href="#brush_keyModifiers" name="brush_keyModifiers">#</a> <i>brush</i>.<b>keyModifiers</b>([<i>modifiers</i>]) · [Source](https://github.com/d3/d3-brush/blob/master/src/brush.js) - -If *modifiers* is specified, sets whether the brush listens to key events during brushing and returns the brush. If *modifiers* is not specified, returns the current behavior, which defaults to true. - -<a href="#brush_handleSize" name="brush_handleSize">#</a> <i>brush</i>.<b>handleSize</b>([<i>size</i>]) · [Source](https://github.com/d3/d3-brush/blob/master/src/brush.js) - -If *size* is specified, sets the size of the brush handles to the specified number and returns the brush. If *size* is not specified, returns the current handle size, which defaults to six. This method must be called before [applying the brush](#_brush) to a selection; changing the handle size does not affect brushes that were previously rendered. - -<a href="#brush_on" name="brush_on">#</a> <i>brush</i>.<b>on</b>(<i>typenames</i>[, <i>listener</i>]) · [Source](https://github.com/d3/d3-brush/blob/master/src/brush.js) - -If *listener* is specified, sets the event *listener* for the specified *typenames* and returns the brush. If an event listener was already registered for the same type and name, the existing listener is removed before the new listener is added. If *listener* is null, removes the current event listeners for the specified *typenames*, if any. If *listener* is not specified, returns the first currently-assigned listener matching the specified *typenames*, if any. When a specified event is dispatched, each *listener* will be invoked with the same context and arguments as [*selection*.on](https://github.com/d3/d3-selection#selection_on) listeners: the current event `event` and datum `d`, with the `this` context as the current DOM element. - -The *typenames* is a string containing one or more *typename* separated by whitespace. Each *typename* is a *type*, optionally followed by a period (`.`) and a *name*, such as `brush.foo` and `brush.bar`; the name allows multiple listeners to be registered for the same *type*. The *type* must be one of the following: - -* `start` - at the start of a brush gesture, such as on mousedown. -* `brush` - when the brush moves, such as on mousemove. -* `end` - at the end of a brush gesture, such as on mouseup. - -See [*dispatch*.on](https://github.com/d3/d3-dispatch#dispatch_on) and [Brush Events](#brush-events) for more. - -<a href="#brushSelection" name="brushSelection">#</a> d3.<b>brushSelection</b>(<i>node</i>) · [Source](https://github.com/d3/d3-brush/blob/master/src/brush.js), [Examples](https://observablehq.com/@d3/double-click-brush-clear) - -Returns the current brush selection for the specified *node*. Internally, an element’s brush state is stored as *element*.\_\_brush; however, you should use this method rather than accessing it directly. If the given *node* has no selection, returns null. Otherwise, the *selection* is defined as an array of numbers. For a [two-dimensional brush](#brush), it is [[*x0*, *y0*], [*x1*, *y1*]], where *x0* is the minimum *x*-value, *y0* is the minimum *y*-value, *x1* is the maximum *x*-value, and *y1* is the maximum *y*-value. For an [*x*-brush](#brushX), it is [*x0*, *x1*]; for a [*y*-brush](#brushY), it is [*y0*, *y1*]. - -### Brush Events - -When a [brush event listener](#brush_on) is invoked, it receives the current brush event. The *event* object exposes several fields: - -* `target` - the associated [brush behavior](#brush). -* `type` - the string “startâ€, “brush†or “endâ€; see [*brush*.on](#brush_on). -* `selection` - the current [brush selection](#brushSelection). -* `sourceEvent` - the underlying input event, such as mousemove or touchmove. -* `mode` - the string “dragâ€, “spaceâ€, “handle†or “centerâ€; the mode of the brush. diff --git a/node_modules/d3-brush/dist/d3-brush.js b/node_modules/d3-brush/dist/d3-brush.js deleted file mode 100644 index 5fdcb5609eb5fdc665d83c4d6ea87726f1691ae6..0000000000000000000000000000000000000000 --- a/node_modules/d3-brush/dist/d3-brush.js +++ /dev/null @@ -1,656 +0,0 @@ -// https://d3js.org/d3-brush/ v2.1.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-dispatch'), require('d3-drag'), require('d3-interpolate'), require('d3-selection'), require('d3-transition')) : -typeof define === 'function' && define.amd ? define(['exports', 'd3-dispatch', 'd3-drag', 'd3-interpolate', 'd3-selection', 'd3-transition'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {}, global.d3, global.d3, global.d3, global.d3, global.d3)); -}(this, function (exports, d3Dispatch, d3Drag, d3Interpolate, d3Selection, d3Transition) { 'use strict'; - -var constant = x => () => x; - -function BrushEvent(type, { - sourceEvent, - target, - selection, - mode, - dispatch -}) { - Object.defineProperties(this, { - type: {value: type, enumerable: true, configurable: true}, - sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, - target: {value: target, enumerable: true, configurable: true}, - selection: {value: selection, enumerable: true, configurable: true}, - mode: {value: mode, enumerable: true, configurable: true}, - _: {value: dispatch} - }); -} - -function nopropagation(event) { - event.stopImmediatePropagation(); -} - -function noevent(event) { - event.preventDefault(); - event.stopImmediatePropagation(); -} - -var MODE_DRAG = {name: "drag"}, - MODE_SPACE = {name: "space"}, - MODE_HANDLE = {name: "handle"}, - MODE_CENTER = {name: "center"}; - -const {abs, max, min} = Math; - -function number1(e) { - return [+e[0], +e[1]]; -} - -function number2(e) { - return [number1(e[0]), number1(e[1])]; -} - -var X = { - name: "x", - handles: ["w", "e"].map(type), - input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; }, - output: function(xy) { return xy && [xy[0][0], xy[1][0]]; } -}; - -var Y = { - name: "y", - handles: ["n", "s"].map(type), - input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; }, - output: function(xy) { return xy && [xy[0][1], xy[1][1]]; } -}; - -var XY = { - name: "xy", - handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(type), - input: function(xy) { return xy == null ? null : number2(xy); }, - output: function(xy) { return xy; } -}; - -var cursors = { - overlay: "crosshair", - selection: "move", - n: "ns-resize", - e: "ew-resize", - s: "ns-resize", - w: "ew-resize", - nw: "nwse-resize", - ne: "nesw-resize", - se: "nwse-resize", - sw: "nesw-resize" -}; - -var flipX = { - e: "w", - w: "e", - nw: "ne", - ne: "nw", - se: "sw", - sw: "se" -}; - -var flipY = { - n: "s", - s: "n", - nw: "sw", - ne: "se", - se: "ne", - sw: "nw" -}; - -var signsX = { - overlay: +1, - selection: +1, - n: null, - e: +1, - s: null, - w: -1, - nw: -1, - ne: +1, - se: +1, - sw: -1 -}; - -var signsY = { - overlay: +1, - selection: +1, - n: -1, - e: null, - s: +1, - w: null, - nw: -1, - ne: -1, - se: +1, - sw: +1 -}; - -function type(t) { - return {type: t}; -} - -// Ignore right-click, since that should open the context menu. -function defaultFilter(event) { - return !event.ctrlKey && !event.button; -} - -function defaultExtent() { - var svg = this.ownerSVGElement || this; - if (svg.hasAttribute("viewBox")) { - svg = svg.viewBox.baseVal; - return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]]; - } - return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]]; -} - -function defaultTouchable() { - return navigator.maxTouchPoints || ("ontouchstart" in this); -} - -// Like d3.local, but with the name “__brush†rather than auto-generated. -function local(node) { - while (!node.__brush) if (!(node = node.parentNode)) return; - return node.__brush; -} - -function empty(extent) { - return extent[0][0] === extent[1][0] - || extent[0][1] === extent[1][1]; -} - -function brushSelection(node) { - var state = node.__brush; - return state ? state.dim.output(state.selection) : null; -} - -function brushX() { - return brush$1(X); -} - -function brushY() { - return brush$1(Y); -} - -function brush() { - return brush$1(XY); -} - -function brush$1(dim) { - var extent = defaultExtent, - filter = defaultFilter, - touchable = defaultTouchable, - keys = true, - listeners = d3Dispatch.dispatch("start", "brush", "end"), - handleSize = 6, - touchending; - - function brush(group) { - var overlay = group - .property("__brush", initialize) - .selectAll(".overlay") - .data([type("overlay")]); - - overlay.enter().append("rect") - .attr("class", "overlay") - .attr("pointer-events", "all") - .attr("cursor", cursors.overlay) - .merge(overlay) - .each(function() { - var extent = local(this).extent; - d3Selection.select(this) - .attr("x", extent[0][0]) - .attr("y", extent[0][1]) - .attr("width", extent[1][0] - extent[0][0]) - .attr("height", extent[1][1] - extent[0][1]); - }); - - group.selectAll(".selection") - .data([type("selection")]) - .enter().append("rect") - .attr("class", "selection") - .attr("cursor", cursors.selection) - .attr("fill", "#777") - .attr("fill-opacity", 0.3) - .attr("stroke", "#fff") - .attr("shape-rendering", "crispEdges"); - - var handle = group.selectAll(".handle") - .data(dim.handles, function(d) { return d.type; }); - - handle.exit().remove(); - - handle.enter().append("rect") - .attr("class", function(d) { return "handle handle--" + d.type; }) - .attr("cursor", function(d) { return cursors[d.type]; }); - - group - .each(redraw) - .attr("fill", "none") - .attr("pointer-events", "all") - .on("mousedown.brush", started) - .filter(touchable) - .on("touchstart.brush", started) - .on("touchmove.brush", touchmoved) - .on("touchend.brush touchcancel.brush", touchended) - .style("touch-action", "none") - .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); - } - - brush.move = function(group, selection) { - if (group.tween) { - group - .on("start.brush", function(event) { emitter(this, arguments).beforestart().start(event); }) - .on("interrupt.brush end.brush", function(event) { emitter(this, arguments).end(event); }) - .tween("brush", function() { - var that = this, - state = that.__brush, - emit = emitter(that, arguments), - selection0 = state.selection, - selection1 = dim.input(typeof selection === "function" ? selection.apply(this, arguments) : selection, state.extent), - i = d3Interpolate.interpolate(selection0, selection1); - - function tween(t) { - state.selection = t === 1 && selection1 === null ? null : i(t); - redraw.call(that); - emit.brush(); - } - - return selection0 !== null && selection1 !== null ? tween : tween(1); - }); - } else { - group - .each(function() { - var that = this, - args = arguments, - state = that.__brush, - selection1 = dim.input(typeof selection === "function" ? selection.apply(that, args) : selection, state.extent), - emit = emitter(that, args).beforestart(); - - d3Transition.interrupt(that); - state.selection = selection1 === null ? null : selection1; - redraw.call(that); - emit.start().brush().end(); - }); - } - }; - - brush.clear = function(group) { - brush.move(group, null); - }; - - function redraw() { - var group = d3Selection.select(this), - selection = local(this).selection; - - if (selection) { - group.selectAll(".selection") - .style("display", null) - .attr("x", selection[0][0]) - .attr("y", selection[0][1]) - .attr("width", selection[1][0] - selection[0][0]) - .attr("height", selection[1][1] - selection[0][1]); - - group.selectAll(".handle") - .style("display", null) - .attr("x", function(d) { return d.type[d.type.length - 1] === "e" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; }) - .attr("y", function(d) { return d.type[0] === "s" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; }) - .attr("width", function(d) { return d.type === "n" || d.type === "s" ? selection[1][0] - selection[0][0] + handleSize : handleSize; }) - .attr("height", function(d) { return d.type === "e" || d.type === "w" ? selection[1][1] - selection[0][1] + handleSize : handleSize; }); - } - - else { - group.selectAll(".selection,.handle") - .style("display", "none") - .attr("x", null) - .attr("y", null) - .attr("width", null) - .attr("height", null); - } - } - - function emitter(that, args, clean) { - var emit = that.__brush.emitter; - return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean); - } - - function Emitter(that, args, clean) { - this.that = that; - this.args = args; - this.state = that.__brush; - this.active = 0; - this.clean = clean; - } - - Emitter.prototype = { - beforestart: function() { - if (++this.active === 1) this.state.emitter = this, this.starting = true; - return this; - }, - start: function(event, mode) { - if (this.starting) this.starting = false, this.emit("start", event, mode); - else this.emit("brush", event); - return this; - }, - brush: function(event, mode) { - this.emit("brush", event, mode); - return this; - }, - end: function(event, mode) { - if (--this.active === 0) delete this.state.emitter, this.emit("end", event, mode); - return this; - }, - emit: function(type, event, mode) { - var d = d3Selection.select(this.that).datum(); - listeners.call( - type, - this.that, - new BrushEvent(type, { - sourceEvent: event, - target: brush, - selection: dim.output(this.state.selection), - mode, - dispatch: listeners - }), - d - ); - } - }; - - function started(event) { - if (touchending && !event.touches) return; - if (!filter.apply(this, arguments)) return; - - var that = this, - type = event.target.__data__.type, - mode = (keys && event.metaKey ? type = "overlay" : type) === "selection" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE), - signX = dim === Y ? null : signsX[type], - signY = dim === X ? null : signsY[type], - state = local(that), - extent = state.extent, - selection = state.selection, - W = extent[0][0], w0, w1, - N = extent[0][1], n0, n1, - E = extent[1][0], e0, e1, - S = extent[1][1], s0, s1, - dx = 0, - dy = 0, - moving, - shifting = signX && signY && keys && event.shiftKey, - lockX, - lockY, - points = Array.from(event.touches || [event], t => { - const i = t.identifier; - t = d3Selection.pointer(t, that); - t.point0 = t.slice(); - t.identifier = i; - return t; - }); - - if (type === "overlay") { - if (selection) moving = true; - const pts = [points[0], points[1] || points[0]]; - state.selection = selection = [[ - w0 = dim === Y ? W : min(pts[0][0], pts[1][0]), - n0 = dim === X ? N : min(pts[0][1], pts[1][1]) - ], [ - e0 = dim === Y ? E : max(pts[0][0], pts[1][0]), - s0 = dim === X ? S : max(pts[0][1], pts[1][1]) - ]]; - if (points.length > 1) move(); - } else { - w0 = selection[0][0]; - n0 = selection[0][1]; - e0 = selection[1][0]; - s0 = selection[1][1]; - } - - w1 = w0; - n1 = n0; - e1 = e0; - s1 = s0; - - var group = d3Selection.select(that) - .attr("pointer-events", "none"); - - var overlay = group.selectAll(".overlay") - .attr("cursor", cursors[type]); - - d3Transition.interrupt(that); - var emit = emitter(that, arguments, true).beforestart(); - - if (event.touches) { - emit.moved = moved; - emit.ended = ended; - } else { - var view = d3Selection.select(event.view) - .on("mousemove.brush", moved, true) - .on("mouseup.brush", ended, true); - if (keys) view - .on("keydown.brush", keydowned, true) - .on("keyup.brush", keyupped, true); - - d3Drag.dragDisable(event.view); - } - - redraw.call(that); - emit.start(event, mode.name); - - function moved(event) { - for (const p of event.changedTouches || [event]) { - for (const d of points) - if (d.identifier === p.identifier) d.cur = d3Selection.pointer(p, that); - } - if (shifting && !lockX && !lockY && points.length === 1) { - const point = points[0]; - if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1])) - lockY = true; - else - lockX = true; - } - for (const point of points) - if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1]; - moving = true; - noevent(event); - move(event); - } - - function move(event) { - const point = points[0], point0 = point.point0; - var t; - - dx = point[0] - point0[0]; - dy = point[1] - point0[1]; - - switch (mode) { - case MODE_SPACE: - case MODE_DRAG: { - if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx; - if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy; - break; - } - case MODE_HANDLE: { - if (points[1]) { - if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1; - if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1; - } else { - if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0; - else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx; - if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0; - else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy; - } - break; - } - case MODE_CENTER: { - if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX)); - if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY)); - break; - } - } - - if (e1 < w1) { - signX *= -1; - t = w0, w0 = e0, e0 = t; - t = w1, w1 = e1, e1 = t; - if (type in flipX) overlay.attr("cursor", cursors[type = flipX[type]]); - } - - if (s1 < n1) { - signY *= -1; - t = n0, n0 = s0, s0 = t; - t = n1, n1 = s1, s1 = t; - if (type in flipY) overlay.attr("cursor", cursors[type = flipY[type]]); - } - - if (state.selection) selection = state.selection; // May be set by brush.move! - if (lockX) w1 = selection[0][0], e1 = selection[1][0]; - if (lockY) n1 = selection[0][1], s1 = selection[1][1]; - - if (selection[0][0] !== w1 - || selection[0][1] !== n1 - || selection[1][0] !== e1 - || selection[1][1] !== s1) { - state.selection = [[w1, n1], [e1, s1]]; - redraw.call(that); - emit.brush(event, mode.name); - } - } - - function ended(event) { - nopropagation(event); - if (event.touches) { - if (event.touches.length) return; - if (touchending) clearTimeout(touchending); - touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! - } else { - d3Drag.dragEnable(event.view, moving); - view.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null); - } - group.attr("pointer-events", "all"); - overlay.attr("cursor", cursors.overlay); - if (state.selection) selection = state.selection; // May be set by brush.move (on start)! - if (empty(selection)) state.selection = null, redraw.call(that); - emit.end(event, mode.name); - } - - function keydowned(event) { - switch (event.keyCode) { - case 16: { // SHIFT - shifting = signX && signY; - break; - } - case 18: { // ALT - if (mode === MODE_HANDLE) { - if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; - if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; - mode = MODE_CENTER; - move(); - } - break; - } - case 32: { // SPACE; takes priority over ALT - if (mode === MODE_HANDLE || mode === MODE_CENTER) { - if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx; - if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy; - mode = MODE_SPACE; - overlay.attr("cursor", cursors.selection); - move(); - } - break; - } - default: return; - } - noevent(event); - } - - function keyupped(event) { - switch (event.keyCode) { - case 16: { // SHIFT - if (shifting) { - lockX = lockY = shifting = false; - move(); - } - break; - } - case 18: { // ALT - if (mode === MODE_CENTER) { - if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; - if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; - mode = MODE_HANDLE; - move(); - } - break; - } - case 32: { // SPACE - if (mode === MODE_SPACE) { - if (event.altKey) { - if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; - if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; - mode = MODE_CENTER; - } else { - if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; - if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; - mode = MODE_HANDLE; - } - overlay.attr("cursor", cursors[type]); - move(); - } - break; - } - default: return; - } - noevent(event); - } - } - - function touchmoved(event) { - emitter(this, arguments).moved(event); - } - - function touchended(event) { - emitter(this, arguments).ended(event); - } - - function initialize() { - var state = this.__brush || {selection: null}; - state.extent = number2(extent.apply(this, arguments)); - state.dim = dim; - return state; - } - - brush.extent = function(_) { - return arguments.length ? (extent = typeof _ === "function" ? _ : constant(number2(_)), brush) : extent; - }; - - brush.filter = function(_) { - return arguments.length ? (filter = typeof _ === "function" ? _ : constant(!!_), brush) : filter; - }; - - brush.touchable = function(_) { - return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), brush) : touchable; - }; - - brush.handleSize = function(_) { - return arguments.length ? (handleSize = +_, brush) : handleSize; - }; - - brush.keyModifiers = function(_) { - return arguments.length ? (keys = !!_, brush) : keys; - }; - - brush.on = function() { - var value = listeners.on.apply(listeners, arguments); - return value === listeners ? brush : value; - }; - - return brush; -} - -exports.brush = brush; -exports.brushSelection = brushSelection; -exports.brushX = brushX; -exports.brushY = brushY; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-brush/dist/d3-brush.min.js b/node_modules/d3-brush/dist/d3-brush.min.js deleted file mode 100644 index eaea3e1b21009f000452f287ecdc4efd8a194a7a..0000000000000000000000000000000000000000 --- a/node_modules/d3-brush/dist/d3-brush.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-brush/ v2.1.0 Copyright 2020 Mike Bostock -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-dispatch"),require("d3-drag"),require("d3-interpolate"),require("d3-selection"),require("d3-transition")):"function"==typeof define&&define.amd?define(["exports","d3-dispatch","d3-drag","d3-interpolate","d3-selection","d3-transition"],t):t((e=e||self).d3=e.d3||{},e.d3,e.d3,e.d3,e.d3,e.d3)}(this,function(e,t,n,r,i,s){"use strict";var u=e=>()=>e;function o(e,{sourceEvent:t,target:n,selection:r,mode:i,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:s}})}function a(e){e.preventDefault(),e.stopImmediatePropagation()}var l={name:"drag"},c={name:"space"},h={name:"handle"},f={name:"center"};const{abs:d,max:p,min:b}=Math;function y(e){return[+e[0],+e[1]]}function v(e){return[y(e[0]),y(e[1])]}var m={name:"x",handles:["w","e"].map(E),input:function(e,t){return null==e?null:[[+e[0],t[0][1]],[+e[1],t[1][1]]]},output:function(e){return e&&[e[0][0],e[1][0]]}},w={name:"y",handles:["n","s"].map(E),input:function(e,t){return null==e?null:[[t[0][0],+e[0]],[t[1][0],+e[1]]]},output:function(e){return e&&[e[0][1],e[1][1]]}},g={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(E),input:function(e){return null==e?null:v(e)},output:function(e){return e}},_={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},x={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},k={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},z={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},A={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function E(e){return{type:e}}function q(e){return!e.ctrlKey&&!e.button}function K(){var e=this.ownerSVGElement||this;return e.hasAttribute("viewBox")?[[(e=e.viewBox.baseVal).x,e.y],[e.x+e.width,e.y+e.height]]:[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]}function P(){return navigator.maxTouchPoints||"ontouchstart"in this}function T(e){for(;!e.__brush;)if(!(e=e.parentNode))return;return e.__brush}function V(e){var y,g=K,V=q,j=P,M=!0,S=t.dispatch("start","brush","end"),B=6;function C(t){var n=t.property("__brush",Y).selectAll(".overlay").data([E("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",_.overlay).merge(n).each(function(){var e=T(this).extent;i.select(this).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1])}),t.selectAll(".selection").data([E("selection")]).enter().append("rect").attr("class","selection").attr("cursor",_.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=t.selectAll(".handle").data(e.handles,function(e){return e.type});r.exit().remove(),r.enter().append("rect").attr("class",function(e){return"handle handle--"+e.type}).attr("cursor",function(e){return _[e.type]}),t.each(D).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",G).filter(j).on("touchstart.brush",G).on("touchmove.brush",N).on("touchend.brush touchcancel.brush",X).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function D(){var e=i.select(this),t=T(this).selection;t?(e.selectAll(".selection").style("display",null).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1]),e.selectAll(".handle").style("display",null).attr("x",function(e){return"e"===e.type[e.type.length-1]?t[1][0]-B/2:t[0][0]-B/2}).attr("y",function(e){return"s"===e.type[0]?t[1][1]-B/2:t[0][1]-B/2}).attr("width",function(e){return"n"===e.type||"s"===e.type?t[1][0]-t[0][0]+B:B}).attr("height",function(e){return"e"===e.type||"w"===e.type?t[1][1]-t[0][1]+B:B})):e.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function I(e,t,n){var r=e.__brush.emitter;return!r||n&&r.clean?new O(e,t,n):r}function O(e,t,n){this.that=e,this.args=t,this.state=e.__brush,this.active=0,this.clean=n}function G(t){if((!y||t.touches)&&V.apply(this,arguments)){var r,u,o,v,g,E,q,K,P,j,S,B=this,C=t.target.__data__.type,O="selection"===(M&&t.metaKey?C="overlay":C)?l:M&&t.altKey?f:h,G=e===w?null:z[C],N=e===m?null:A[C],X=T(B),Y=X.extent,F=X.selection,H=Y[0][0],J=Y[0][1],L=Y[1][0],Q=Y[1][1],R=0,U=0,W=G&&N&&M&&t.shiftKey,Z=Array.from(t.touches||[t],e=>{const t=e.identifier;return(e=i.pointer(e,B)).point0=e.slice(),e.identifier=t,e});if("overlay"===C){F&&(P=!0);const t=[Z[0],Z[1]||Z[0]];X.selection=F=[[r=e===w?H:b(t[0][0],t[1][0]),o=e===m?J:b(t[0][1],t[1][1])],[g=e===w?L:p(t[0][0],t[1][0]),q=e===m?Q:p(t[0][1],t[1][1])]],Z.length>1&&ie()}else r=F[0][0],o=F[0][1],g=F[1][0],q=F[1][1];u=r,v=o,E=g,K=q;var $=i.select(B).attr("pointer-events","none"),ee=$.selectAll(".overlay").attr("cursor",_[C]);s.interrupt(B);var te=I(B,arguments,!0).beforestart();if(t.touches)te.moved=re,te.ended=se;else{var ne=i.select(t.view).on("mousemove.brush",re,!0).on("mouseup.brush",se,!0);M&&ne.on("keydown.brush",function(e){switch(e.keyCode){case 16:W=G&&N;break;case 18:O===h&&(G&&(g=E-R*G,r=u+R*G),N&&(q=K-U*N,o=v+U*N),O=f,ie());break;case 32:O!==h&&O!==f||(G<0?g=E-R:G>0&&(r=u-R),N<0?q=K-U:N>0&&(o=v-U),O=c,ee.attr("cursor",_.selection),ie());break;default:return}a(e)},!0).on("keyup.brush",function(e){switch(e.keyCode){case 16:W&&(j=S=W=!1,ie());break;case 18:O===f&&(G<0?g=E:G>0&&(r=u),N<0?q=K:N>0&&(o=v),O=h,ie());break;case 32:O===c&&(e.altKey?(G&&(g=E-R*G,r=u+R*G),N&&(q=K-U*N,o=v+U*N),O=f):(G<0?g=E:G>0&&(r=u),N<0?q=K:N>0&&(o=v),O=h),ee.attr("cursor",_[C]),ie());break;default:return}a(e)},!0),n.dragDisable(t.view)}D.call(B),te.start(t,O.name)}function re(e){for(const t of e.changedTouches||[e])for(const e of Z)e.identifier===t.identifier&&(e.cur=i.pointer(t,B));if(W&&!j&&!S&&1===Z.length){const e=Z[0];d(e.cur[0]-e[0])>d(e.cur[1]-e[1])?S=!0:j=!0}for(const e of Z)e.cur&&(e[0]=e.cur[0],e[1]=e.cur[1]);P=!0,a(e),ie(e)}function ie(e){const t=Z[0],n=t.point0;var i;switch(R=t[0]-n[0],U=t[1]-n[1],O){case c:case l:G&&(R=p(H-r,b(L-g,R)),u=r+R,E=g+R),N&&(U=p(J-o,b(Q-q,U)),v=o+U,K=q+U);break;case h:Z[1]?(G&&(u=p(H,b(L,Z[0][0])),E=p(H,b(L,Z[1][0])),G=1),N&&(v=p(J,b(Q,Z[0][1])),K=p(J,b(Q,Z[1][1])),N=1)):(G<0?(R=p(H-r,b(L-r,R)),u=r+R,E=g):G>0&&(R=p(H-g,b(L-g,R)),u=r,E=g+R),N<0?(U=p(J-o,b(Q-o,U)),v=o+U,K=q):N>0&&(U=p(J-q,b(Q-q,U)),v=o,K=q+U));break;case f:G&&(u=p(H,b(L,r-R*G)),E=p(H,b(L,g+R*G))),N&&(v=p(J,b(Q,o-U*N)),K=p(J,b(Q,q+U*N)))}E<u&&(G*=-1,i=r,r=g,g=i,i=u,u=E,E=i,C in x&&ee.attr("cursor",_[C=x[C]])),K<v&&(N*=-1,i=o,o=q,q=i,i=v,v=K,K=i,C in k&&ee.attr("cursor",_[C=k[C]])),X.selection&&(F=X.selection),j&&(u=F[0][0],E=F[1][0]),S&&(v=F[0][1],K=F[1][1]),F[0][0]===u&&F[0][1]===v&&F[1][0]===E&&F[1][1]===K||(X.selection=[[u,v],[E,K]],D.call(B),te.brush(e,O.name))}function se(e){if(function(e){e.stopImmediatePropagation()}(e),e.touches){if(e.touches.length)return;y&&clearTimeout(y),y=setTimeout(function(){y=null},500)}else n.dragEnable(e.view,P),ne.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);$.attr("pointer-events","all"),ee.attr("cursor",_.overlay),X.selection&&(F=X.selection),function(e){return e[0][0]===e[1][0]||e[0][1]===e[1][1]}(F)&&(X.selection=null,D.call(B)),te.end(e,O.name)}}function N(e){I(this,arguments).moved(e)}function X(e){I(this,arguments).ended(e)}function Y(){var t=this.__brush||{selection:null};return t.extent=v(g.apply(this,arguments)),t.dim=e,t}return C.move=function(t,n){t.tween?t.on("start.brush",function(e){I(this,arguments).beforestart().start(e)}).on("interrupt.brush end.brush",function(e){I(this,arguments).end(e)}).tween("brush",function(){var t=this,i=t.__brush,s=I(t,arguments),u=i.selection,o=e.input("function"==typeof n?n.apply(this,arguments):n,i.extent),a=r.interpolate(u,o);function l(e){i.selection=1===e&&null===o?null:a(e),D.call(t),s.brush()}return null!==u&&null!==o?l:l(1)}):t.each(function(){var t=this,r=arguments,i=t.__brush,u=e.input("function"==typeof n?n.apply(t,r):n,i.extent),o=I(t,r).beforestart();s.interrupt(t),i.selection=null===u?null:u,D.call(t),o.start().brush().end()})},C.clear=function(e){C.move(e,null)},O.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(e,t){return this.starting?(this.starting=!1,this.emit("start",e,t)):this.emit("brush",e),this},brush:function(e,t){return this.emit("brush",e,t),this},end:function(e,t){return 0==--this.active&&(delete this.state.emitter,this.emit("end",e,t)),this},emit:function(t,n,r){var s=i.select(this.that).datum();S.call(t,this.that,new o(t,{sourceEvent:n,target:C,selection:e.output(this.state.selection),mode:r,dispatch:S}),s)}},C.extent=function(e){return arguments.length?(g="function"==typeof e?e:u(v(e)),C):g},C.filter=function(e){return arguments.length?(V="function"==typeof e?e:u(!!e),C):V},C.touchable=function(e){return arguments.length?(j="function"==typeof e?e:u(!!e),C):j},C.handleSize=function(e){return arguments.length?(B=+e,C):B},C.keyModifiers=function(e){return arguments.length?(M=!!e,C):M},C.on=function(){var e=S.on.apply(S,arguments);return e===S?C:e},C}e.brush=function(){return V(g)},e.brushSelection=function(e){var t=e.__brush;return t?t.dim.output(t.selection):null},e.brushX=function(){return V(m)},e.brushY=function(){return V(w)},Object.defineProperty(e,"__esModule",{value:!0})}); diff --git a/node_modules/d3-brush/package.json b/node_modules/d3-brush/package.json deleted file mode 100644 index 59bbfd2d650ae83eb3a719e7b5cf444545c8326b..0000000000000000000000000000000000000000 --- a/node_modules/d3-brush/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "d3-brush@2", - "_id": "d3-brush@2.1.0", - "_inBundle": false, - "_integrity": "sha512-cHLLAFatBATyIKqZOkk/mDHUbzne2B3ZwxkzMHvFTCZCmLaXDpZRihQSn8UNXTkGD/3lb/W2sQz0etAftmHMJQ==", - "_location": "/d3-brush", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-brush@2", - "name": "d3-brush", - "escapedName": "d3-brush", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3" - ], - "_resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-2.1.0.tgz", - "_shasum": "adadfbb104e8937af142e9a6e2028326f0471065", - "_spec": "d3-brush@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-brush/issues" - }, - "bundleDependencies": false, - "dependencies": { - "d3-dispatch": "1 - 2", - "d3-drag": "2", - "d3-interpolate": "1 - 2", - "d3-selection": "2", - "d3-transition": "2" - }, - "deprecated": false, - "description": "Select a one- or two-dimensional region using the mouse or touch.", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-brush/", - "jsdelivr": "dist/d3-brush.min.js", - "keywords": [ - "d3", - "d3-module", - "brush", - "interaction" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-brush.js", - "module": "src/index.js", - "name": "d3-brush", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-brush.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src" - }, - "unpkg": "dist/d3-brush.min.js", - "version": "2.1.0" -} diff --git a/node_modules/d3-brush/src/brush.js b/node_modules/d3-brush/src/brush.js deleted file mode 100644 index d92053655b2c7d8caf2fe59f4f06f328d5a0212e..0000000000000000000000000000000000000000 --- a/node_modules/d3-brush/src/brush.js +++ /dev/null @@ -1,621 +0,0 @@ -import {dispatch} from "d3-dispatch"; -import {dragDisable, dragEnable} from "d3-drag"; -import {interpolate} from "d3-interpolate"; -import {pointer, select} from "d3-selection"; -import {interrupt} from "d3-transition"; -import constant from "./constant.js"; -import BrushEvent from "./event.js"; -import noevent, {nopropagation} from "./noevent.js"; - -var MODE_DRAG = {name: "drag"}, - MODE_SPACE = {name: "space"}, - MODE_HANDLE = {name: "handle"}, - MODE_CENTER = {name: "center"}; - -const {abs, max, min} = Math; - -function number1(e) { - return [+e[0], +e[1]]; -} - -function number2(e) { - return [number1(e[0]), number1(e[1])]; -} - -var X = { - name: "x", - handles: ["w", "e"].map(type), - input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; }, - output: function(xy) { return xy && [xy[0][0], xy[1][0]]; } -}; - -var Y = { - name: "y", - handles: ["n", "s"].map(type), - input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; }, - output: function(xy) { return xy && [xy[0][1], xy[1][1]]; } -}; - -var XY = { - name: "xy", - handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(type), - input: function(xy) { return xy == null ? null : number2(xy); }, - output: function(xy) { return xy; } -}; - -var cursors = { - overlay: "crosshair", - selection: "move", - n: "ns-resize", - e: "ew-resize", - s: "ns-resize", - w: "ew-resize", - nw: "nwse-resize", - ne: "nesw-resize", - se: "nwse-resize", - sw: "nesw-resize" -}; - -var flipX = { - e: "w", - w: "e", - nw: "ne", - ne: "nw", - se: "sw", - sw: "se" -}; - -var flipY = { - n: "s", - s: "n", - nw: "sw", - ne: "se", - se: "ne", - sw: "nw" -}; - -var signsX = { - overlay: +1, - selection: +1, - n: null, - e: +1, - s: null, - w: -1, - nw: -1, - ne: +1, - se: +1, - sw: -1 -}; - -var signsY = { - overlay: +1, - selection: +1, - n: -1, - e: null, - s: +1, - w: null, - nw: -1, - ne: -1, - se: +1, - sw: +1 -}; - -function type(t) { - return {type: t}; -} - -// Ignore right-click, since that should open the context menu. -function defaultFilter(event) { - return !event.ctrlKey && !event.button; -} - -function defaultExtent() { - var svg = this.ownerSVGElement || this; - if (svg.hasAttribute("viewBox")) { - svg = svg.viewBox.baseVal; - return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]]; - } - return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]]; -} - -function defaultTouchable() { - return navigator.maxTouchPoints || ("ontouchstart" in this); -} - -// Like d3.local, but with the name “__brush†rather than auto-generated. -function local(node) { - while (!node.__brush) if (!(node = node.parentNode)) return; - return node.__brush; -} - -function empty(extent) { - return extent[0][0] === extent[1][0] - || extent[0][1] === extent[1][1]; -} - -export function brushSelection(node) { - var state = node.__brush; - return state ? state.dim.output(state.selection) : null; -} - -export function brushX() { - return brush(X); -} - -export function brushY() { - return brush(Y); -} - -export default function() { - return brush(XY); -} - -function brush(dim) { - var extent = defaultExtent, - filter = defaultFilter, - touchable = defaultTouchable, - keys = true, - listeners = dispatch("start", "brush", "end"), - handleSize = 6, - touchending; - - function brush(group) { - var overlay = group - .property("__brush", initialize) - .selectAll(".overlay") - .data([type("overlay")]); - - overlay.enter().append("rect") - .attr("class", "overlay") - .attr("pointer-events", "all") - .attr("cursor", cursors.overlay) - .merge(overlay) - .each(function() { - var extent = local(this).extent; - select(this) - .attr("x", extent[0][0]) - .attr("y", extent[0][1]) - .attr("width", extent[1][0] - extent[0][0]) - .attr("height", extent[1][1] - extent[0][1]); - }); - - group.selectAll(".selection") - .data([type("selection")]) - .enter().append("rect") - .attr("class", "selection") - .attr("cursor", cursors.selection) - .attr("fill", "#777") - .attr("fill-opacity", 0.3) - .attr("stroke", "#fff") - .attr("shape-rendering", "crispEdges"); - - var handle = group.selectAll(".handle") - .data(dim.handles, function(d) { return d.type; }); - - handle.exit().remove(); - - handle.enter().append("rect") - .attr("class", function(d) { return "handle handle--" + d.type; }) - .attr("cursor", function(d) { return cursors[d.type]; }); - - group - .each(redraw) - .attr("fill", "none") - .attr("pointer-events", "all") - .on("mousedown.brush", started) - .filter(touchable) - .on("touchstart.brush", started) - .on("touchmove.brush", touchmoved) - .on("touchend.brush touchcancel.brush", touchended) - .style("touch-action", "none") - .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); - } - - brush.move = function(group, selection) { - if (group.tween) { - group - .on("start.brush", function(event) { emitter(this, arguments).beforestart().start(event); }) - .on("interrupt.brush end.brush", function(event) { emitter(this, arguments).end(event); }) - .tween("brush", function() { - var that = this, - state = that.__brush, - emit = emitter(that, arguments), - selection0 = state.selection, - selection1 = dim.input(typeof selection === "function" ? selection.apply(this, arguments) : selection, state.extent), - i = interpolate(selection0, selection1); - - function tween(t) { - state.selection = t === 1 && selection1 === null ? null : i(t); - redraw.call(that); - emit.brush(); - } - - return selection0 !== null && selection1 !== null ? tween : tween(1); - }); - } else { - group - .each(function() { - var that = this, - args = arguments, - state = that.__brush, - selection1 = dim.input(typeof selection === "function" ? selection.apply(that, args) : selection, state.extent), - emit = emitter(that, args).beforestart(); - - interrupt(that); - state.selection = selection1 === null ? null : selection1; - redraw.call(that); - emit.start().brush().end(); - }); - } - }; - - brush.clear = function(group) { - brush.move(group, null); - }; - - function redraw() { - var group = select(this), - selection = local(this).selection; - - if (selection) { - group.selectAll(".selection") - .style("display", null) - .attr("x", selection[0][0]) - .attr("y", selection[0][1]) - .attr("width", selection[1][0] - selection[0][0]) - .attr("height", selection[1][1] - selection[0][1]); - - group.selectAll(".handle") - .style("display", null) - .attr("x", function(d) { return d.type[d.type.length - 1] === "e" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; }) - .attr("y", function(d) { return d.type[0] === "s" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; }) - .attr("width", function(d) { return d.type === "n" || d.type === "s" ? selection[1][0] - selection[0][0] + handleSize : handleSize; }) - .attr("height", function(d) { return d.type === "e" || d.type === "w" ? selection[1][1] - selection[0][1] + handleSize : handleSize; }); - } - - else { - group.selectAll(".selection,.handle") - .style("display", "none") - .attr("x", null) - .attr("y", null) - .attr("width", null) - .attr("height", null); - } - } - - function emitter(that, args, clean) { - var emit = that.__brush.emitter; - return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean); - } - - function Emitter(that, args, clean) { - this.that = that; - this.args = args; - this.state = that.__brush; - this.active = 0; - this.clean = clean; - } - - Emitter.prototype = { - beforestart: function() { - if (++this.active === 1) this.state.emitter = this, this.starting = true; - return this; - }, - start: function(event, mode) { - if (this.starting) this.starting = false, this.emit("start", event, mode); - else this.emit("brush", event); - return this; - }, - brush: function(event, mode) { - this.emit("brush", event, mode); - return this; - }, - end: function(event, mode) { - if (--this.active === 0) delete this.state.emitter, this.emit("end", event, mode); - return this; - }, - emit: function(type, event, mode) { - var d = select(this.that).datum(); - listeners.call( - type, - this.that, - new BrushEvent(type, { - sourceEvent: event, - target: brush, - selection: dim.output(this.state.selection), - mode, - dispatch: listeners - }), - d - ); - } - }; - - function started(event) { - if (touchending && !event.touches) return; - if (!filter.apply(this, arguments)) return; - - var that = this, - type = event.target.__data__.type, - mode = (keys && event.metaKey ? type = "overlay" : type) === "selection" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE), - signX = dim === Y ? null : signsX[type], - signY = dim === X ? null : signsY[type], - state = local(that), - extent = state.extent, - selection = state.selection, - W = extent[0][0], w0, w1, - N = extent[0][1], n0, n1, - E = extent[1][0], e0, e1, - S = extent[1][1], s0, s1, - dx = 0, - dy = 0, - moving, - shifting = signX && signY && keys && event.shiftKey, - lockX, - lockY, - points = Array.from(event.touches || [event], t => { - const i = t.identifier; - t = pointer(t, that); - t.point0 = t.slice(); - t.identifier = i; - return t; - }); - - if (type === "overlay") { - if (selection) moving = true; - const pts = [points[0], points[1] || points[0]]; - state.selection = selection = [[ - w0 = dim === Y ? W : min(pts[0][0], pts[1][0]), - n0 = dim === X ? N : min(pts[0][1], pts[1][1]) - ], [ - e0 = dim === Y ? E : max(pts[0][0], pts[1][0]), - s0 = dim === X ? S : max(pts[0][1], pts[1][1]) - ]]; - if (points.length > 1) move(); - } else { - w0 = selection[0][0]; - n0 = selection[0][1]; - e0 = selection[1][0]; - s0 = selection[1][1]; - } - - w1 = w0; - n1 = n0; - e1 = e0; - s1 = s0; - - var group = select(that) - .attr("pointer-events", "none"); - - var overlay = group.selectAll(".overlay") - .attr("cursor", cursors[type]); - - interrupt(that); - var emit = emitter(that, arguments, true).beforestart(); - - if (event.touches) { - emit.moved = moved; - emit.ended = ended; - } else { - var view = select(event.view) - .on("mousemove.brush", moved, true) - .on("mouseup.brush", ended, true); - if (keys) view - .on("keydown.brush", keydowned, true) - .on("keyup.brush", keyupped, true) - - dragDisable(event.view); - } - - redraw.call(that); - emit.start(event, mode.name); - - function moved(event) { - for (const p of event.changedTouches || [event]) { - for (const d of points) - if (d.identifier === p.identifier) d.cur = pointer(p, that); - } - if (shifting && !lockX && !lockY && points.length === 1) { - const point = points[0]; - if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1])) - lockY = true; - else - lockX = true; - } - for (const point of points) - if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1]; - moving = true; - noevent(event); - move(event); - } - - function move(event) { - const point = points[0], point0 = point.point0; - var t; - - dx = point[0] - point0[0]; - dy = point[1] - point0[1]; - - switch (mode) { - case MODE_SPACE: - case MODE_DRAG: { - if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx; - if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy; - break; - } - case MODE_HANDLE: { - if (points[1]) { - if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1; - if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1; - } else { - if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0; - else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx; - if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0; - else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy; - } - break; - } - case MODE_CENTER: { - if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX)); - if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY)); - break; - } - } - - if (e1 < w1) { - signX *= -1; - t = w0, w0 = e0, e0 = t; - t = w1, w1 = e1, e1 = t; - if (type in flipX) overlay.attr("cursor", cursors[type = flipX[type]]); - } - - if (s1 < n1) { - signY *= -1; - t = n0, n0 = s0, s0 = t; - t = n1, n1 = s1, s1 = t; - if (type in flipY) overlay.attr("cursor", cursors[type = flipY[type]]); - } - - if (state.selection) selection = state.selection; // May be set by brush.move! - if (lockX) w1 = selection[0][0], e1 = selection[1][0]; - if (lockY) n1 = selection[0][1], s1 = selection[1][1]; - - if (selection[0][0] !== w1 - || selection[0][1] !== n1 - || selection[1][0] !== e1 - || selection[1][1] !== s1) { - state.selection = [[w1, n1], [e1, s1]]; - redraw.call(that); - emit.brush(event, mode.name); - } - } - - function ended(event) { - nopropagation(event); - if (event.touches) { - if (event.touches.length) return; - if (touchending) clearTimeout(touchending); - touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! - } else { - dragEnable(event.view, moving); - view.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null); - } - group.attr("pointer-events", "all"); - overlay.attr("cursor", cursors.overlay); - if (state.selection) selection = state.selection; // May be set by brush.move (on start)! - if (empty(selection)) state.selection = null, redraw.call(that); - emit.end(event, mode.name); - } - - function keydowned(event) { - switch (event.keyCode) { - case 16: { // SHIFT - shifting = signX && signY; - break; - } - case 18: { // ALT - if (mode === MODE_HANDLE) { - if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; - if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; - mode = MODE_CENTER; - move(); - } - break; - } - case 32: { // SPACE; takes priority over ALT - if (mode === MODE_HANDLE || mode === MODE_CENTER) { - if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx; - if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy; - mode = MODE_SPACE; - overlay.attr("cursor", cursors.selection); - move(); - } - break; - } - default: return; - } - noevent(event); - } - - function keyupped(event) { - switch (event.keyCode) { - case 16: { // SHIFT - if (shifting) { - lockX = lockY = shifting = false; - move(); - } - break; - } - case 18: { // ALT - if (mode === MODE_CENTER) { - if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; - if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; - mode = MODE_HANDLE; - move(); - } - break; - } - case 32: { // SPACE - if (mode === MODE_SPACE) { - if (event.altKey) { - if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; - if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; - mode = MODE_CENTER; - } else { - if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; - if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; - mode = MODE_HANDLE; - } - overlay.attr("cursor", cursors[type]); - move(); - } - break; - } - default: return; - } - noevent(event); - } - } - - function touchmoved(event) { - emitter(this, arguments).moved(event); - } - - function touchended(event) { - emitter(this, arguments).ended(event); - } - - function initialize() { - var state = this.__brush || {selection: null}; - state.extent = number2(extent.apply(this, arguments)); - state.dim = dim; - return state; - } - - brush.extent = function(_) { - return arguments.length ? (extent = typeof _ === "function" ? _ : constant(number2(_)), brush) : extent; - }; - - brush.filter = function(_) { - return arguments.length ? (filter = typeof _ === "function" ? _ : constant(!!_), brush) : filter; - }; - - brush.touchable = function(_) { - return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), brush) : touchable; - }; - - brush.handleSize = function(_) { - return arguments.length ? (handleSize = +_, brush) : handleSize; - }; - - brush.keyModifiers = function(_) { - return arguments.length ? (keys = !!_, brush) : keys; - }; - - brush.on = function() { - var value = listeners.on.apply(listeners, arguments); - return value === listeners ? brush : value; - }; - - return brush; -} diff --git a/node_modules/d3-brush/src/constant.js b/node_modules/d3-brush/src/constant.js deleted file mode 100644 index 3487c0ddfaabca50218341abd733df08493b568c..0000000000000000000000000000000000000000 --- a/node_modules/d3-brush/src/constant.js +++ /dev/null @@ -1 +0,0 @@ -export default x => () => x; diff --git a/node_modules/d3-brush/src/event.js b/node_modules/d3-brush/src/event.js deleted file mode 100644 index 78deba1e9f3a9a46f8fbd25af31ee20e6315b8ed..0000000000000000000000000000000000000000 --- a/node_modules/d3-brush/src/event.js +++ /dev/null @@ -1,16 +0,0 @@ -export default function BrushEvent(type, { - sourceEvent, - target, - selection, - mode, - dispatch -}) { - Object.defineProperties(this, { - type: {value: type, enumerable: true, configurable: true}, - sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, - target: {value: target, enumerable: true, configurable: true}, - selection: {value: selection, enumerable: true, configurable: true}, - mode: {value: mode, enumerable: true, configurable: true}, - _: {value: dispatch} - }); -} diff --git a/node_modules/d3-brush/src/index.js b/node_modules/d3-brush/src/index.js deleted file mode 100644 index 2c55476b970921eef500894147479017d6620a93..0000000000000000000000000000000000000000 --- a/node_modules/d3-brush/src/index.js +++ /dev/null @@ -1,6 +0,0 @@ -export { - default as brush, - brushX, - brushY, - brushSelection -} from "./brush.js"; diff --git a/node_modules/d3-brush/src/noevent.js b/node_modules/d3-brush/src/noevent.js deleted file mode 100644 index b32552dc29f086d1e24b81abbca67ad5598b0cdc..0000000000000000000000000000000000000000 --- a/node_modules/d3-brush/src/noevent.js +++ /dev/null @@ -1,8 +0,0 @@ -export function nopropagation(event) { - event.stopImmediatePropagation(); -} - -export default function(event) { - event.preventDefault(); - event.stopImmediatePropagation(); -} diff --git a/node_modules/d3-chord/LICENSE b/node_modules/d3-chord/LICENSE deleted file mode 100644 index 721bd22ece6587a9408eda1b6a3949c425b5624a..0000000000000000000000000000000000000000 --- a/node_modules/d3-chord/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-chord/README.md b/node_modules/d3-chord/README.md deleted file mode 100644 index ab2594b59f561a7740739c74551674a538f5022f..0000000000000000000000000000000000000000 --- a/node_modules/d3-chord/README.md +++ /dev/null @@ -1,214 +0,0 @@ -# d3-chord - -Visualize relationships or network flow with an aesthetically-pleasing circular layout. - -[<img alt="Chord Diagram" src="https://raw.githubusercontent.com/d3/d3-chord/master/img/chord.png" width="480" height="480">](https://observablehq.com/@d3/chord-diagram) - -## Installing - -If you use NPM, `npm install d3-chord`. Otherwise, download the [latest release](https://github.com/d3/d3-chord/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-chord.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-path.v2.min.js"></script> -<script src="https://d3js.org/d3-chord.v2.min.js"></script> -<script> - -var chord = d3.chord(); - -</script> -``` - -## API Reference - -<a href="#chord" name="chord">#</a> d3.<b>chord</b>() [<>](https://github.com/d3/d3-chord/blob/master/src/chord.js "Source") - -Constructs a new chord layout with the default settings. - -<a href="#_chord" name="_chord">#</a> <i>chord</i>(<i>matrix</i>) [<>](https://github.com/d3/d3-chord/blob/master/src/chord.js "Source") - -Computes the chord layout for the specified square *matrix* of size *n*×*n*, where the *matrix* represents the directed flow amongst a network (a complete digraph) of *n* nodes. The given *matrix* must be an array of length *n*, where each element *matrix*[*i*] is an array of *n* numbers, where each *matrix*[*i*][*j*] represents the flow from the *i*th node in the network to the *j*th node. Each number *matrix*[*i*][*j*] must be nonnegative, though it can be zero if there is no flow from node *i* to node *j*. From the [Circos tableviewer example](http://mkweb.bcgsc.ca/circos/guide/tables/): - -```js -var matrix = [ - [11975, 5871, 8916, 2868], - [ 1951, 10048, 2060, 6171], - [ 8010, 16145, 8090, 8045], - [ 1013, 990, 940, 6907] -]; -``` - -The return value of *chord*(*matrix*) is an array of *chords*, where each chord represents the combined bidirectional flow between two nodes *i* and *j* (where *i* may be equal to *j*) and is an object with the following properties: - -* `source` - the source subgroup -* `target` - the target subgroup - -Each source and target subgroup is also an object with the following properties: - -* `startAngle` - the start angle in radians -* `endAngle` - the end angle in radians -* `value` - the flow value *matrix*[*i*][*j*] -* `index` - the node index *i* - -The chords are typically passed to [d3.ribbon](#ribbon) to display the network relationships. The returned array includes only chord objects for which the value *matrix*[*i*][*j*] or *matrix*[*j*][*i*] is non-zero. Furthermore, the returned array only contains unique chords: a given chord *ij* represents the bidirectional flow from *i* to *j* *and* from *j* to *i*, and does not contain a duplicate chord *ji*; *i* and *j* are chosen such that the chord’s source always represents the larger of *matrix*[*i*][*j*] and *matrix*[*j*][*i*]. - -The *chords* array also defines a secondary array of length *n*, *chords*.groups, where each group represents the combined outflow for node *i*, corresponding to the elements *matrix*[*i*][0 … *n* - 1], and is an object with the following properties: - -* `startAngle` - the start angle in radians -* `endAngle` - the end angle in radians -* `value` - the total outgoing flow value for node *i* -* `index` - the node index *i* - -The groups are typically passed to [d3.arc](https://github.com/d3/d3-shape#arc) to produce a donut chart around the circumference of the chord layout. - -<a href="#chord_padAngle" name="#chord_padAngle">#</a> <i>chord</i>.<b>padAngle</b>([<i>angle</i>]) [<>](https://github.com/d3/d3-chord/blob/master/src/chord.js "Source") - -If *angle* is specified, sets the pad angle between adjacent groups to the specified number in radians and returns this chord layout. If *angle* is not specified, returns the current pad angle, which defaults to zero. - -<a href="#chord_sortGroups" name="#chord_sortGroups">#</a> <i>chord</i>.<b>sortGroups</b>([<i>compare</i>]) [<>](https://github.com/d3/d3-chord/blob/master/src/chord.js "Source") - -If *compare* is specified, sets the group comparator to the specified function or null and returns this chord layout. If *compare* is not specified, returns the current group comparator, which defaults to null. If the group comparator is non-null, it is used to sort the groups by their total outflow. See also [d3.ascending](https://github.com/d3/d3-array/blob/master/README.md#ascending) and [d3.descending](https://github.com/d3/d3-array/blob/master/README.md#descending). - -<a href="#chord_sortSubgroups" name="#chord_sortSubgroups">#</a> <i>chord</i>.<b>sortSubgroups</b>([<i>compare</i>]) [<>](https://github.com/d3/d3-chord/blob/master/src/chord.js "Source") - -If *compare* is specified, sets the subgroup comparator to the specified function or null and returns this chord layout. If *compare* is not specified, returns the current subgroup comparator, which defaults to null. If the subgroup comparator is non-null, it is used to sort the subgroups corresponding to *matrix*[*i*][0 … *n* - 1] for a given group *i* by their total outflow. See also [d3.ascending](https://github.com/d3/d3-array/blob/master/README.md#ascending) and [d3.descending](https://github.com/d3/d3-array/blob/master/README.md#descending). - -<a href="#chord_sortChords" name="#chord_sortChords">#</a> <i>chord</i>.<b>sortChords</b>([<i>compare</i>]) [<>](https://github.com/d3/d3-chord/blob/master/src/chord.js "Source") - -If *compare* is specified, sets the chord comparator to the specified function or null and returns this chord layout. If *compare* is not specified, returns the current chord comparator, which defaults to null. If the chord comparator is non-null, it is used to sort the [chords](#_chord) by their combined flow; this only affects the *z*-order of the chords. See also [d3.ascending](https://github.com/d3/d3-array/blob/master/README.md#ascending) and [d3.descending](https://github.com/d3/d3-array/blob/master/README.md#descending). - -<a href="#ribbon" name="ribbon">#</a> d3.<b>ribbon</b>() [<>](https://github.com/d3/d3-chord/blob/master/src/ribbon.js "Source") - -Creates a new ribbon generator with the default settings. - -<a href="#_ribbon" name="_ribbon">#</a> <i>ribbon</i>(<i>arguments…</i>) [<>](https://github.com/d3/d3-chord/blob/master/src/ribbon.js "Source") - -Generates a ribbon for the given *arguments*. The *arguments* are arbitrary; they are simply propagated to the ribbon generator’s accessor functions along with the `this` object. For example, with the default settings, a [chord object](#_chord) expected: - -```js -var ribbon = d3.ribbon(); - -ribbon({ - source: {startAngle: 0.7524114, endAngle: 1.1212972, radius: 240}, - target: {startAngle: 1.8617078, endAngle: 1.9842927, radius: 240} -}); // "M164.0162810494058,-175.21032946354026A240,240,0,0,1,216.1595644740915,-104.28347273835429Q0,0,229.9158815306728,68.8381247563705A240,240,0,0,1,219.77316791012538,96.43523560788266Q0,0,164.0162810494058,-175.21032946354026Z" -``` - -Or equivalently if the radius is instead defined as a constant: - -```js -var ribbon = d3.ribbon() - .radius(240); - -ribbon({ - source: {startAngle: 0.7524114, endAngle: 1.1212972}, - target: {startAngle: 1.8617078, endAngle: 1.9842927} -}); // "M164.0162810494058,-175.21032946354026A240,240,0,0,1,216.1595644740915,-104.28347273835429Q0,0,229.9158815306728,68.8381247563705A240,240,0,0,1,219.77316791012538,96.43523560788266Q0,0,164.0162810494058,-175.21032946354026Z" -``` - -If the ribbon generator has a context, then the ribbon is rendered to this context as a sequence of path method calls and this function returns void. Otherwise, a path data string is returned. - -<a href="#ribbon_source" name="ribbon_source">#</a> <i>ribbon</i>.<b>source</b>([<i>source</i>]) [<>](https://github.com/d3/d3-chord/blob/master/src/ribbon.js "Source") - -If *source* is specified, sets the source accessor to the specified function and returns this ribbon generator. If *source* is not specified, returns the current source accessor, which defaults to: - -```js -function source(d) { - return d.source; -} -``` - -<a href="#ribbon_target" name="ribbon_target">#</a> <i>ribbon</i>.<b>target</b>([<i>target</i>]) [<>](https://github.com/d3/d3-chord/blob/master/src/ribbon.js "Source") - -If *target* is specified, sets the target accessor to the specified function and returns this ribbon generator. If *target* is not specified, returns the current target accessor, which defaults to: - -```js -function target(d) { - return d.target; -} -``` - -<a href="#ribbon_radius" name="ribbon_radius">#</a> <i>ribbon</i>.<b>radius</b>([<i>radius</i>]) [<>](https://github.com/d3/d3-chord/blob/master/src/ribbon.js "Source") - -If *radius* is specified, sets the source and target radius accessor to the specified function and returns this ribbon generator. If *radius* is not specified, returns the current source radius accessor, which defaults to: - -```js -function radius(d) { - return d.radius; -} -``` - -<a href="#ribbon_sourceRadius" name="ribbon_sourceRadius">#</a> <i>ribbon</i>.<b>sourceRadius</b>([<i>radius</i>]) [<>](https://github.com/d3/d3-chord/blob/master/src/ribbon.js "Source") - -If *radius* is specified, sets the source radius accessor to the specified function and returns this ribbon generator. If *radius* is not specified, returns the current source radius accessor, which defaults to: - -```js -function radius(d) { - return d.radius; -} -``` - -<a href="#ribbon_targetRadius" name="ribbon_targetRadius">#</a> <i>ribbon</i>.<b>targetRadius</b>([<i>radius</i>]) [<>](https://github.com/d3/d3-chord/blob/master/src/ribbon.js "Source") - -If *radius* is specified, sets the target radius accessor to the specified function and returns this ribbon generator. If *radius* is not specified, returns the current target radius accessor, which defaults to: - -```js -function radius(d) { - return d.radius; -} -``` - -By convention, the target radius in asymmetric chord diagrams is typically inset from the source radius, resulting in a gap between the end of the directed link and its associated group arc. - -<a href="#ribbon_startAngle" name="ribbon_startAngle">#</a> <i>ribbon</i>.<b>startAngle</b>([<i>angle</i>]) [<>](https://github.com/d3/d3-chord/blob/master/src/ribbon.js "Source") - -If *angle* is specified, sets the start angle accessor to the specified function and returns this ribbon generator. If *angle* is not specified, returns the current start angle accessor, which defaults to: - -```js -function startAngle(d) { - return d.startAngle; -} -``` - -The *angle* is specified in radians, with 0 at -*y* (12 o’clock) and positive angles proceeding clockwise. - -<a href="#ribbon_endAngle" name="ribbon_endAngle">#</a> <i>ribbon</i>.<b>endAngle</b>([<i>angle</i>]) [<>](https://github.com/d3/d3-chord/blob/master/src/ribbon.js "Source") - -If *angle* is specified, sets the end angle accessor to the specified function and returns this ribbon generator. If *angle* is not specified, returns the current end angle accessor, which defaults to: - -```js -function endAngle(d) { - return d.endAngle; -} -``` - -The *angle* is specified in radians, with 0 at -*y* (12 o’clock) and positive angles proceeding clockwise. - -<a href="#ribbon_padAngle" name="ribbon_padAngle">#</a> <i>ribbon</i>.<b>padAngle</b>([<i>angle</i>]) [<>](https://github.com/d3/d3-chord/blob/master/src/ribbon.js "Source") - -If *angle* is specified, sets the pad angle accessor to the specified function and returns this ribbon generator. If *angle* is not specified, returns the current pad angle accessor, which defaults to: - -```js -function padAngle() { - return 0; -} -``` - -The pad angle specifies the angular gap between adjacent ribbons. - -<a href="#ribbon_context" name="ribbon_context">#</a> <i>ribbon</i>.<b>context</b>([<i>context</i>]) [<>](https://github.com/d3/d3-chord/blob/master/src/ribbon.js "Source") - -If *context* is specified, sets the context and returns this ribbon generator. If *context* is not specified, returns the current context, which defaults to null. If the context is not null, then the [generated ribbon](#_ribbon) is rendered to this context as a sequence of [path method](http://www.w3.org/TR/2dcontext/#canvaspathmethods) calls. Otherwise, a [path data](http://www.w3.org/TR/SVG/paths.html#PathData) string representing the generated ribbon is returned. See also [d3-path](https://github.com/d3/d3-path). - -<a href="#ribbonArrow" name="ribbonArrow">#</a> d3.<b>ribbonArrow</b>() [<>](https://github.com/d3/d3-chord/blob/master/src/ribbon.js "Source") - -Creates a new arrow ribbon generator with the default settings. - -<a href="#ribbonArrow_headRadius" name="ribbonArrow_headRadius">#</a> <i>ribbonArrow</i>.<b>headRadius</b>([<i>radius</i>]) [<>](https://github.com/d3/d3-chord/blob/master/src/ribbon.js "Source") - -If *radius* is specified, sets the arrowhead radius accessor to the specified function and returns this ribbon generator. If *radius* is not specified, returns the current arrowhead radius accessor, which defaults to: - -```js -function headRadius() { - return 10; -} -``` diff --git a/node_modules/d3-chord/dist/d3-chord.js b/node_modules/d3-chord/dist/d3-chord.js deleted file mode 100644 index 2bbc89775130872c20011bbaa1863e99a6273fa2..0000000000000000000000000000000000000000 --- a/node_modules/d3-chord/dist/d3-chord.js +++ /dev/null @@ -1,284 +0,0 @@ -// https://d3js.org/d3-chord/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-path')) : -typeof define === 'function' && define.amd ? define(['exports', 'd3-path'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {}, global.d3)); -}(this, function (exports, d3Path) { 'use strict'; - -var abs = Math.abs; -var cos = Math.cos; -var sin = Math.sin; -var pi = Math.PI; -var halfPi = pi / 2; -var tau = pi * 2; -var max = Math.max; -var epsilon = 1e-12; - -function range(i, j) { - return Array.from({length: j - i}, (_, k) => i + k); -} - -function compareValue(compare) { - return function(a, b) { - return compare( - a.source.value + a.target.value, - b.source.value + b.target.value - ); - }; -} - -function chord() { - return chord$1(false, false); -} - -function chordTranspose() { - return chord$1(false, true); -} - -function chordDirected() { - return chord$1(true, false); -} - -function chord$1(directed, transpose) { - var padAngle = 0, - sortGroups = null, - sortSubgroups = null, - sortChords = null; - - function chord(matrix) { - var n = matrix.length, - groupSums = new Array(n), - groupIndex = range(0, n), - chords = new Array(n * n), - groups = new Array(n), - k = 0, dx; - - matrix = Float64Array.from({length: n * n}, transpose - ? (_, i) => matrix[i % n][i / n | 0] - : (_, i) => matrix[i / n | 0][i % n]); - - // Compute the scaling factor from value to angle in [0, 2pi]. - for (let i = 0; i < n; ++i) { - let x = 0; - for (let j = 0; j < n; ++j) x += matrix[i * n + j] + directed * matrix[j * n + i]; - k += groupSums[i] = x; - } - k = max(0, tau - padAngle * n) / k; - dx = k ? padAngle : tau / n; - - // Compute the angles for each group and constituent chord. - { - let x = 0; - if (sortGroups) groupIndex.sort((a, b) => sortGroups(groupSums[a], groupSums[b])); - for (const i of groupIndex) { - const x0 = x; - if (directed) { - const subgroupIndex = range(~n + 1, n).filter(j => j < 0 ? matrix[~j * n + i] : matrix[i * n + j]); - if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(a < 0 ? -matrix[~a * n + i] : matrix[i * n + a], b < 0 ? -matrix[~b * n + i] : matrix[i * n + b])); - for (const j of subgroupIndex) { - if (j < 0) { - const chord = chords[~j * n + i] || (chords[~j * n + i] = {source: null, target: null}); - chord.target = {index: i, startAngle: x, endAngle: x += matrix[~j * n + i] * k, value: matrix[~j * n + i]}; - } else { - const chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null}); - chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]}; - } - } - groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]}; - } else { - const subgroupIndex = range(0, n).filter(j => matrix[i * n + j] || matrix[j * n + i]); - if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(matrix[i * n + a], matrix[i * n + b])); - for (const j of subgroupIndex) { - let chord; - if (i < j) { - chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null}); - chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]}; - } else { - chord = chords[j * n + i] || (chords[j * n + i] = {source: null, target: null}); - chord.target = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]}; - if (i === j) chord.source = chord.target; - } - if (chord.source && chord.target && chord.source.value < chord.target.value) { - const source = chord.source; - chord.source = chord.target; - chord.target = source; - } - } - groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]}; - } - x += dx; - } - } - - // Remove empty chords. - chords = Object.values(chords); - chords.groups = groups; - return sortChords ? chords.sort(sortChords) : chords; - } - - chord.padAngle = function(_) { - return arguments.length ? (padAngle = max(0, _), chord) : padAngle; - }; - - chord.sortGroups = function(_) { - return arguments.length ? (sortGroups = _, chord) : sortGroups; - }; - - chord.sortSubgroups = function(_) { - return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups; - }; - - chord.sortChords = function(_) { - return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._; - }; - - return chord; -} - -var slice = Array.prototype.slice; - -function constant(x) { - return function() { - return x; - }; -} - -function defaultSource(d) { - return d.source; -} - -function defaultTarget(d) { - return d.target; -} - -function defaultRadius(d) { - return d.radius; -} - -function defaultStartAngle(d) { - return d.startAngle; -} - -function defaultEndAngle(d) { - return d.endAngle; -} - -function defaultPadAngle() { - return 0; -} - -function defaultArrowheadRadius() { - return 10; -} - -function ribbon(headRadius) { - var source = defaultSource, - target = defaultTarget, - sourceRadius = defaultRadius, - targetRadius = defaultRadius, - startAngle = defaultStartAngle, - endAngle = defaultEndAngle, - padAngle = defaultPadAngle, - context = null; - - function ribbon() { - var buffer, - s = source.apply(this, arguments), - t = target.apply(this, arguments), - ap = padAngle.apply(this, arguments) / 2, - argv = slice.call(arguments), - sr = +sourceRadius.apply(this, (argv[0] = s, argv)), - sa0 = startAngle.apply(this, argv) - halfPi, - sa1 = endAngle.apply(this, argv) - halfPi, - tr = +targetRadius.apply(this, (argv[0] = t, argv)), - ta0 = startAngle.apply(this, argv) - halfPi, - ta1 = endAngle.apply(this, argv) - halfPi; - - if (!context) context = buffer = d3Path.path(); - - if (ap > epsilon) { - if (abs(sa1 - sa0) > ap * 2 + epsilon) sa1 > sa0 ? (sa0 += ap, sa1 -= ap) : (sa0 -= ap, sa1 += ap); - else sa0 = sa1 = (sa0 + sa1) / 2; - if (abs(ta1 - ta0) > ap * 2 + epsilon) ta1 > ta0 ? (ta0 += ap, ta1 -= ap) : (ta0 -= ap, ta1 += ap); - else ta0 = ta1 = (ta0 + ta1) / 2; - } - - context.moveTo(sr * cos(sa0), sr * sin(sa0)); - context.arc(0, 0, sr, sa0, sa1); - if (sa0 !== ta0 || sa1 !== ta1) { - if (headRadius) { - var hr = +headRadius.apply(this, arguments), tr2 = tr - hr, ta2 = (ta0 + ta1) / 2; - context.quadraticCurveTo(0, 0, tr2 * cos(ta0), tr2 * sin(ta0)); - context.lineTo(tr * cos(ta2), tr * sin(ta2)); - context.lineTo(tr2 * cos(ta1), tr2 * sin(ta1)); - } else { - context.quadraticCurveTo(0, 0, tr * cos(ta0), tr * sin(ta0)); - context.arc(0, 0, tr, ta0, ta1); - } - } - context.quadraticCurveTo(0, 0, sr * cos(sa0), sr * sin(sa0)); - context.closePath(); - - if (buffer) return context = null, buffer + "" || null; - } - - if (headRadius) ribbon.headRadius = function(_) { - return arguments.length ? (headRadius = typeof _ === "function" ? _ : constant(+_), ribbon) : headRadius; - }; - - ribbon.radius = function(_) { - return arguments.length ? (sourceRadius = targetRadius = typeof _ === "function" ? _ : constant(+_), ribbon) : sourceRadius; - }; - - ribbon.sourceRadius = function(_) { - return arguments.length ? (sourceRadius = typeof _ === "function" ? _ : constant(+_), ribbon) : sourceRadius; - }; - - ribbon.targetRadius = function(_) { - return arguments.length ? (targetRadius = typeof _ === "function" ? _ : constant(+_), ribbon) : targetRadius; - }; - - ribbon.startAngle = function(_) { - return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), ribbon) : startAngle; - }; - - ribbon.endAngle = function(_) { - return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), ribbon) : endAngle; - }; - - ribbon.padAngle = function(_) { - return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), ribbon) : padAngle; - }; - - ribbon.source = function(_) { - return arguments.length ? (source = _, ribbon) : source; - }; - - ribbon.target = function(_) { - return arguments.length ? (target = _, ribbon) : target; - }; - - ribbon.context = function(_) { - return arguments.length ? ((context = _ == null ? null : _), ribbon) : context; - }; - - return ribbon; -} - -function ribbon$1() { - return ribbon(); -} - -function ribbonArrow() { - return ribbon(defaultArrowheadRadius); -} - -exports.chord = chord; -exports.chordDirected = chordDirected; -exports.chordTranspose = chordTranspose; -exports.ribbon = ribbon$1; -exports.ribbonArrow = ribbonArrow; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-chord/dist/d3-chord.min.js b/node_modules/d3-chord/dist/d3-chord.min.js deleted file mode 100644 index 9e808958465edf96d4a66d940aeb7ad3778ee43b..0000000000000000000000000000000000000000 --- a/node_modules/d3-chord/dist/d3-chord.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-chord/ v2.0.0 Copyright 2020 Mike Bostock -!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-path")):"function"==typeof define&&define.amd?define(["exports","d3-path"],t):t((n=n||self).d3=n.d3||{},n.d3)}(this,function(n,t){"use strict";var e=Math.abs,r=Math.cos,u=Math.sin,o=Math.PI,l=o/2,a=2*o,i=Math.max,c=1e-12;function f(n,t){return Array.from({length:t-n},(t,e)=>n+e)}function s(n){return function(t,e){return n(t.source.value+t.target.value,e.source.value+e.target.value)}}function g(n,t){var e=0,r=null,u=null,o=null;function l(l){var c,s=l.length,g=new Array(s),p=f(0,s),d=new Array(s*s),h=new Array(s),y=0;l=Float64Array.from({length:s*s},t?(n,t)=>l[t%s][t/s|0]:(n,t)=>l[t/s|0][t%s]);for(let t=0;t<s;++t){let e=0;for(let r=0;r<s;++r)e+=l[t*s+r]+n*l[r*s+t];y+=g[t]=e}c=(y=i(0,a-e*s)/y)?e:a/s;{let t=0;r&&p.sort((n,t)=>r(g[n],g[t]));for(const e of p){const r=t;if(n){const n=f(1+~s,s).filter(n=>n<0?l[~n*s+e]:l[e*s+n]);u&&n.sort((n,t)=>u(n<0?-l[~n*s+e]:l[e*s+n],t<0?-l[~t*s+e]:l[e*s+t]));for(const r of n)if(r<0){(d[~r*s+e]||(d[~r*s+e]={source:null,target:null})).target={index:e,startAngle:t,endAngle:t+=l[~r*s+e]*y,value:l[~r*s+e]}}else{(d[e*s+r]||(d[e*s+r]={source:null,target:null})).source={index:e,startAngle:t,endAngle:t+=l[e*s+r]*y,value:l[e*s+r]}}h[e]={index:e,startAngle:r,endAngle:t,value:g[e]}}else{const n=f(0,s).filter(n=>l[e*s+n]||l[n*s+e]);u&&n.sort((n,t)=>u(l[e*s+n],l[e*s+t]));for(const r of n){let n;if(e<r?(n=d[e*s+r]||(d[e*s+r]={source:null,target:null})).source={index:e,startAngle:t,endAngle:t+=l[e*s+r]*y,value:l[e*s+r]}:((n=d[r*s+e]||(d[r*s+e]={source:null,target:null})).target={index:e,startAngle:t,endAngle:t+=l[e*s+r]*y,value:l[e*s+r]},e===r&&(n.source=n.target)),n.source&&n.target&&n.source.value<n.target.value){const t=n.source;n.source=n.target,n.target=t}}h[e]={index:e,startAngle:r,endAngle:t,value:g[e]}}t+=c}}return(d=Object.values(d)).groups=h,o?d.sort(o):d}return l.padAngle=function(n){return arguments.length?(e=i(0,n),l):e},l.sortGroups=function(n){return arguments.length?(r=n,l):r},l.sortSubgroups=function(n){return arguments.length?(u=n,l):u},l.sortChords=function(n){return arguments.length?(null==n?o=null:(o=s(n))._=n,l):o&&o._},l}var p=Array.prototype.slice;function d(n){return function(){return n}}function h(n){return n.source}function y(n){return n.target}function v(n){return n.radius}function A(n){return n.startAngle}function x(n){return n.endAngle}function b(){return 0}function T(){return 10}function m(n){var o=h,a=y,i=v,f=v,s=A,g=x,T=b,m=null;function M(){var d,h=o.apply(this,arguments),y=a.apply(this,arguments),v=T.apply(this,arguments)/2,A=p.call(arguments),x=+i.apply(this,(A[0]=h,A)),b=s.apply(this,A)-l,M=g.apply(this,A)-l,q=+f.apply(this,(A[0]=y,A)),w=s.apply(this,A)-l,C=g.apply(this,A)-l;if(m||(m=d=t.path()),v>c&&(e(M-b)>2*v+c?M>b?(b+=v,M-=v):(b-=v,M+=v):b=M=(b+M)/2,e(C-w)>2*v+c?C>w?(w+=v,C-=v):(w-=v,C+=v):w=C=(w+C)/2),m.moveTo(x*r(b),x*u(b)),m.arc(0,0,x,b,M),b!==w||M!==C)if(n){var _=q-+n.apply(this,arguments),j=(w+C)/2;m.quadraticCurveTo(0,0,_*r(w),_*u(w)),m.lineTo(q*r(j),q*u(j)),m.lineTo(_*r(C),_*u(C))}else m.quadraticCurveTo(0,0,q*r(w),q*u(w)),m.arc(0,0,q,w,C);if(m.quadraticCurveTo(0,0,x*r(b),x*u(b)),m.closePath(),d)return m=null,d+""||null}return n&&(M.headRadius=function(t){return arguments.length?(n="function"==typeof t?t:d(+t),M):n}),M.radius=function(n){return arguments.length?(i=f="function"==typeof n?n:d(+n),M):i},M.sourceRadius=function(n){return arguments.length?(i="function"==typeof n?n:d(+n),M):i},M.targetRadius=function(n){return arguments.length?(f="function"==typeof n?n:d(+n),M):f},M.startAngle=function(n){return arguments.length?(s="function"==typeof n?n:d(+n),M):s},M.endAngle=function(n){return arguments.length?(g="function"==typeof n?n:d(+n),M):g},M.padAngle=function(n){return arguments.length?(T="function"==typeof n?n:d(+n),M):T},M.source=function(n){return arguments.length?(o=n,M):o},M.target=function(n){return arguments.length?(a=n,M):a},M.context=function(n){return arguments.length?(m=null==n?null:n,M):m},M}n.chord=function(){return g(!1,!1)},n.chordDirected=function(){return g(!0,!1)},n.chordTranspose=function(){return g(!1,!0)},n.ribbon=function(){return m()},n.ribbonArrow=function(){return m(T)},Object.defineProperty(n,"__esModule",{value:!0})}); diff --git a/node_modules/d3-chord/package.json b/node_modules/d3-chord/package.json deleted file mode 100644 index 33431086957b2a3704aa2cc0e4183ba07e11356e..0000000000000000000000000000000000000000 --- a/node_modules/d3-chord/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_from": "d3-chord@2", - "_id": "d3-chord@2.0.0", - "_inBundle": false, - "_integrity": "sha512-D5PZb7EDsRNdGU4SsjQyKhja8Zgu+SHZfUSO5Ls8Wsn+jsAKUUGkcshLxMg9HDFxG3KqavGWaWkJ8EpU8ojuig==", - "_location": "/d3-chord", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-chord@2", - "name": "d3-chord", - "escapedName": "d3-chord", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3" - ], - "_resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-2.0.0.tgz", - "_shasum": "32491b5665391180560f738e5c1ccd1e3c47ebae", - "_spec": "d3-chord@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-chord/issues" - }, - "bundleDependencies": false, - "dependencies": { - "d3-path": "1 - 2" - }, - "deprecated": false, - "description": "Visualize relationships or network flow with an aesthetically-pleasing circular layout.", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-chord/", - "jsdelivr": "dist/d3-chord.min.js", - "keywords": [ - "d3", - "d3-module", - "chord", - "radial", - "network", - "flow" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-chord.js", - "module": "src/index.js", - "name": "d3-chord", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-chord.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src" - }, - "sideEffects": false, - "unpkg": "dist/d3-chord.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-chord/src/array.js b/node_modules/d3-chord/src/array.js deleted file mode 100644 index 8eeac161d97560e3ea6e71c120ca15f518d8fb9e..0000000000000000000000000000000000000000 --- a/node_modules/d3-chord/src/array.js +++ /dev/null @@ -1 +0,0 @@ -export var slice = Array.prototype.slice; diff --git a/node_modules/d3-chord/src/chord.js b/node_modules/d3-chord/src/chord.js deleted file mode 100644 index f9f1a98a6e93b31295e28a96d612b2e378001b7a..0000000000000000000000000000000000000000 --- a/node_modules/d3-chord/src/chord.js +++ /dev/null @@ -1,122 +0,0 @@ -import {max, tau} from "./math.js"; - -function range(i, j) { - return Array.from({length: j - i}, (_, k) => i + k); -} - -function compareValue(compare) { - return function(a, b) { - return compare( - a.source.value + a.target.value, - b.source.value + b.target.value - ); - }; -} - -export default function() { - return chord(false, false); -} - -export function chordTranspose() { - return chord(false, true); -} - -export function chordDirected() { - return chord(true, false); -} - -function chord(directed, transpose) { - var padAngle = 0, - sortGroups = null, - sortSubgroups = null, - sortChords = null; - - function chord(matrix) { - var n = matrix.length, - groupSums = new Array(n), - groupIndex = range(0, n), - chords = new Array(n * n), - groups = new Array(n), - k = 0, dx; - - matrix = Float64Array.from({length: n * n}, transpose - ? (_, i) => matrix[i % n][i / n | 0] - : (_, i) => matrix[i / n | 0][i % n]); - - // Compute the scaling factor from value to angle in [0, 2pi]. - for (let i = 0; i < n; ++i) { - let x = 0; - for (let j = 0; j < n; ++j) x += matrix[i * n + j] + directed * matrix[j * n + i]; - k += groupSums[i] = x; - } - k = max(0, tau - padAngle * n) / k; - dx = k ? padAngle : tau / n; - - // Compute the angles for each group and constituent chord. - { - let x = 0; - if (sortGroups) groupIndex.sort((a, b) => sortGroups(groupSums[a], groupSums[b])); - for (const i of groupIndex) { - const x0 = x; - if (directed) { - const subgroupIndex = range(~n + 1, n).filter(j => j < 0 ? matrix[~j * n + i] : matrix[i * n + j]); - if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(a < 0 ? -matrix[~a * n + i] : matrix[i * n + a], b < 0 ? -matrix[~b * n + i] : matrix[i * n + b])); - for (const j of subgroupIndex) { - if (j < 0) { - const chord = chords[~j * n + i] || (chords[~j * n + i] = {source: null, target: null}); - chord.target = {index: i, startAngle: x, endAngle: x += matrix[~j * n + i] * k, value: matrix[~j * n + i]}; - } else { - const chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null}); - chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]}; - } - } - groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]}; - } else { - const subgroupIndex = range(0, n).filter(j => matrix[i * n + j] || matrix[j * n + i]); - if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(matrix[i * n + a], matrix[i * n + b])); - for (const j of subgroupIndex) { - let chord; - if (i < j) { - chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null}); - chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]}; - } else { - chord = chords[j * n + i] || (chords[j * n + i] = {source: null, target: null}); - chord.target = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]}; - if (i === j) chord.source = chord.target; - } - if (chord.source && chord.target && chord.source.value < chord.target.value) { - const source = chord.source; - chord.source = chord.target; - chord.target = source; - } - } - groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]}; - } - x += dx; - } - } - - // Remove empty chords. - chords = Object.values(chords); - chords.groups = groups; - return sortChords ? chords.sort(sortChords) : chords; - } - - chord.padAngle = function(_) { - return arguments.length ? (padAngle = max(0, _), chord) : padAngle; - }; - - chord.sortGroups = function(_) { - return arguments.length ? (sortGroups = _, chord) : sortGroups; - }; - - chord.sortSubgroups = function(_) { - return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups; - }; - - chord.sortChords = function(_) { - return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._; - }; - - return chord; -} diff --git a/node_modules/d3-chord/src/constant.js b/node_modules/d3-chord/src/constant.js deleted file mode 100644 index b7d42e711c01cced1274e5dd70a461a3c0073b77..0000000000000000000000000000000000000000 --- a/node_modules/d3-chord/src/constant.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(x) { - return function() { - return x; - }; -} diff --git a/node_modules/d3-chord/src/index.js b/node_modules/d3-chord/src/index.js deleted file mode 100644 index adec60365b5db31b73351b6fc1314a476f910aa9..0000000000000000000000000000000000000000 --- a/node_modules/d3-chord/src/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export {default as chord, chordTranspose, chordDirected} from "./chord.js"; -export {default as ribbon, ribbonArrow} from "./ribbon.js"; diff --git a/node_modules/d3-chord/src/math.js b/node_modules/d3-chord/src/math.js deleted file mode 100644 index 9ad579e2be58462a0d5f2b3e603e15826a100c96..0000000000000000000000000000000000000000 --- a/node_modules/d3-chord/src/math.js +++ /dev/null @@ -1,8 +0,0 @@ -export var abs = Math.abs; -export var cos = Math.cos; -export var sin = Math.sin; -export var pi = Math.PI; -export var halfPi = pi / 2; -export var tau = pi * 2; -export var max = Math.max; -export var epsilon = 1e-12; diff --git a/node_modules/d3-chord/src/ribbon.js b/node_modules/d3-chord/src/ribbon.js deleted file mode 100644 index bcd75b8531c57d069159308bba4fe0d3b03bb3cd..0000000000000000000000000000000000000000 --- a/node_modules/d3-chord/src/ribbon.js +++ /dev/null @@ -1,134 +0,0 @@ -import {path} from "d3-path"; -import {slice} from "./array.js"; -import constant from "./constant.js"; -import {abs, cos, epsilon, halfPi, sin} from "./math.js"; - -function defaultSource(d) { - return d.source; -} - -function defaultTarget(d) { - return d.target; -} - -function defaultRadius(d) { - return d.radius; -} - -function defaultStartAngle(d) { - return d.startAngle; -} - -function defaultEndAngle(d) { - return d.endAngle; -} - -function defaultPadAngle() { - return 0; -} - -function defaultArrowheadRadius() { - return 10; -} - -function ribbon(headRadius) { - var source = defaultSource, - target = defaultTarget, - sourceRadius = defaultRadius, - targetRadius = defaultRadius, - startAngle = defaultStartAngle, - endAngle = defaultEndAngle, - padAngle = defaultPadAngle, - context = null; - - function ribbon() { - var buffer, - s = source.apply(this, arguments), - t = target.apply(this, arguments), - ap = padAngle.apply(this, arguments) / 2, - argv = slice.call(arguments), - sr = +sourceRadius.apply(this, (argv[0] = s, argv)), - sa0 = startAngle.apply(this, argv) - halfPi, - sa1 = endAngle.apply(this, argv) - halfPi, - tr = +targetRadius.apply(this, (argv[0] = t, argv)), - ta0 = startAngle.apply(this, argv) - halfPi, - ta1 = endAngle.apply(this, argv) - halfPi; - - if (!context) context = buffer = path(); - - if (ap > epsilon) { - if (abs(sa1 - sa0) > ap * 2 + epsilon) sa1 > sa0 ? (sa0 += ap, sa1 -= ap) : (sa0 -= ap, sa1 += ap); - else sa0 = sa1 = (sa0 + sa1) / 2; - if (abs(ta1 - ta0) > ap * 2 + epsilon) ta1 > ta0 ? (ta0 += ap, ta1 -= ap) : (ta0 -= ap, ta1 += ap); - else ta0 = ta1 = (ta0 + ta1) / 2; - } - - context.moveTo(sr * cos(sa0), sr * sin(sa0)); - context.arc(0, 0, sr, sa0, sa1); - if (sa0 !== ta0 || sa1 !== ta1) { - if (headRadius) { - var hr = +headRadius.apply(this, arguments), tr2 = tr - hr, ta2 = (ta0 + ta1) / 2; - context.quadraticCurveTo(0, 0, tr2 * cos(ta0), tr2 * sin(ta0)); - context.lineTo(tr * cos(ta2), tr * sin(ta2)); - context.lineTo(tr2 * cos(ta1), tr2 * sin(ta1)); - } else { - context.quadraticCurveTo(0, 0, tr * cos(ta0), tr * sin(ta0)); - context.arc(0, 0, tr, ta0, ta1); - } - } - context.quadraticCurveTo(0, 0, sr * cos(sa0), sr * sin(sa0)); - context.closePath(); - - if (buffer) return context = null, buffer + "" || null; - } - - if (headRadius) ribbon.headRadius = function(_) { - return arguments.length ? (headRadius = typeof _ === "function" ? _ : constant(+_), ribbon) : headRadius; - }; - - ribbon.radius = function(_) { - return arguments.length ? (sourceRadius = targetRadius = typeof _ === "function" ? _ : constant(+_), ribbon) : sourceRadius; - }; - - ribbon.sourceRadius = function(_) { - return arguments.length ? (sourceRadius = typeof _ === "function" ? _ : constant(+_), ribbon) : sourceRadius; - }; - - ribbon.targetRadius = function(_) { - return arguments.length ? (targetRadius = typeof _ === "function" ? _ : constant(+_), ribbon) : targetRadius; - }; - - ribbon.startAngle = function(_) { - return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), ribbon) : startAngle; - }; - - ribbon.endAngle = function(_) { - return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), ribbon) : endAngle; - }; - - ribbon.padAngle = function(_) { - return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), ribbon) : padAngle; - }; - - ribbon.source = function(_) { - return arguments.length ? (source = _, ribbon) : source; - }; - - ribbon.target = function(_) { - return arguments.length ? (target = _, ribbon) : target; - }; - - ribbon.context = function(_) { - return arguments.length ? ((context = _ == null ? null : _), ribbon) : context; - }; - - return ribbon; -} - -export default function() { - return ribbon(); -} - -export function ribbonArrow() { - return ribbon(defaultArrowheadRadius); -} diff --git a/node_modules/d3-color/LICENSE b/node_modules/d3-color/LICENSE deleted file mode 100644 index 721bd22ece6587a9408eda1b6a3949c425b5624a..0000000000000000000000000000000000000000 --- a/node_modules/d3-color/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-color/README.md b/node_modules/d3-color/README.md deleted file mode 100644 index c29bed1fee88ff71544f71653dd80cd404d87d44..0000000000000000000000000000000000000000 --- a/node_modules/d3-color/README.md +++ /dev/null @@ -1,183 +0,0 @@ -# d3-color - -Even though your browser understands a lot about colors, it doesn’t offer much help in manipulating colors through JavaScript. The d3-color module therefore provides representations for various color spaces, allowing specification, conversion and manipulation. (Also see [d3-interpolate](https://github.com/d3/d3-interpolate) for color interpolation.) - -For example, take the color named “steelblueâ€: - -```js -var c = d3.color("steelblue"); // {r: 70, g: 130, b: 180, opacity: 1} -``` - -Let’s try converting it to HSL: - -```js -var c = d3.hsl("steelblue"); // {h: 207.27…, s: 0.44, l: 0.4902…, opacity: 1} -``` - -Now rotate the hue by 90°, bump up the saturation, and format as a string for CSS: - -```js -c.h += 90; -c.s += 0.2; -c + ""; // rgb(198, 45, 205) -``` - -To fade the color slightly: - -```js -c.opacity = 0.8; -c + ""; // rgba(198, 45, 205, 0.8) -``` - -In addition to the ubiquitous and machine-friendly [RGB](#rgb) and [HSL](#hsl) color space, d3-color supports color spaces that are designed for humans: - -* [CIELAB](#lab) (*a.k.a.* “Labâ€) -* [CIELCh<sub>ab</sub>](#lch) (*a.k.a.* “LCh†or “HCLâ€) -* Dave Green’s [Cubehelix](#cubehelix) - -Cubehelix features monotonic lightness, while CIELAB and its polar form CIELCh<sub>ab</sub> are perceptually uniform. - -## Extensions - -For additional color spaces, see: - -* [d3-cam16](https://github.com/d3/d3-cam16) -* [d3-cam02](https://github.com/connorgr/d3-cam02) -* [d3-hsv](https://github.com/d3/d3-hsv) -* [d3-hcg](https://github.com/d3/d3-hcg) -* [d3-hsluv](https://github.com/petulla/d3-hsluv) - -To measure color differences, see: - -* [d3-color-difference](https://github.com/Evercoder/d3-color-difference) - -## Installing - -If you use NPM, `npm install d3-color`. Otherwise, download the [latest release](https://github.com/d3/d3-color/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-color.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-color.v2.min.js"></script> -<script> - -var steelblue = d3.rgb("steelblue"); - -</script> -``` - -[Try d3-color in your browser.](https://observablehq.com/collection/@d3/d3-color) - -## API Reference - -<a name="color" href="#color">#</a> d3.<b>color</b>(<i>specifier</i>) [<>](https://github.com/d3/d3-color/blob/master/src/color.js "Source") - -Parses the specified [CSS Color Module Level 3](http://www.w3.org/TR/css3-color/#colorunits) *specifier* string, returning an [RGB](#rgb) or [HSL](#hsl) color, along with [CSS Color Module Level 4 hex](https://www.w3.org/TR/css-color-4/#hex-notation) *specifier* strings. If the specifier was not valid, null is returned. Some examples: - -* `rgb(255, 255, 255)` -* `rgb(10%, 20%, 30%)` -* `rgba(255, 255, 255, 0.4)` -* `rgba(10%, 20%, 30%, 0.4)` -* `hsl(120, 50%, 20%)` -* `hsla(120, 50%, 20%, 0.4)` -* `#ffeeaa` -* `#fea` -* `#ffeeaa22` -* `#fea2` -* `steelblue` - -The list of supported [named colors](http://www.w3.org/TR/SVG/types.html#ColorKeywords) is specified by CSS. - -Note: this function may also be used with `instanceof` to test if an object is a color instance. The same is true of color subclasses, allowing you to test whether a color is in a particular color space. - -<a name="color_opacity" href="#color_opacity">#</a> *color*.<b>opacity</b> - -This color’s opacity, typically in the range [0, 1]. - -<a name="color_rgb" href="#color_rgb">#</a> *color*.<b>rgb</b>() [<>](https://github.com/d3/d3-color/blob/master/src/color.js "Source") - -Returns the [RGB equivalent](#rgb) of this color. For RGB colors, that’s `this`. - -<a name="color_copy" href="#color_copy">#</a> <i>color</i>.<b>copy</b>([<i>values</i>]) [<>](https://github.com/d3/d3-color/blob/master/src/color.js "Source") - -Returns a copy of this color. If *values* is specified, any enumerable own properties of *values* are assigned to the new returned color. For example, to derive a copy of a *color* with opacity 0.5, say - -```js -color.copy({opacity: 0.5}) -``` - -<a name="color_brighter" href="#color_brighter">#</a> *color*.<b>brighter</b>([<i>k</i>]) [<>](https://github.com/d3/d3-color/blob/master/src/color.js "Source") - -Returns a brighter copy of this color. If *k* is specified, it controls how much brighter the returned color should be. If *k* is not specified, it defaults to 1. The behavior of this method is dependent on the implementing color space. - -<a name="color_darker" href="#color_darker">#</a> *color*.<b>darker</b>([<i>k</i>]) [<>](https://github.com/d3/d3-color/blob/master/src/color.js "Source") - -Returns a darker copy of this color. If *k* is specified, it controls how much darker the returned color should be. If *k* is not specified, it defaults to 1. The behavior of this method is dependent on the implementing color space. - -<a name="color_displayable" href="#color_displayable">#</a> *color*.<b>displayable</b>() [<>](https://github.com/d3/d3-color/blob/master/src/color.js "Source") - -Returns true if and only if the color is displayable on standard hardware. For example, this returns false for an RGB color if any channel value is less than zero or greater than 255 when rounded, or if the opacity is not in the range [0, 1]. - -<a name="color_formatHex" href="#color_formatHex">#</a> *color*.<b>formatHex</b>() [<>](https://github.com/d3/d3-color/blob/master/src/color.js "Source") - -Returns a hexadecimal string representing this color in RGB space, such as `#f7eaba`. If this color is not displayable, a suitable displayable color is returned instead. For example, RGB channel values greater than 255 are clamped to 255. - -<a name="color_formatHsl" href="#color_formatHsl">#</a> *color*.<b>formatHsl</b>() [<>](https://github.com/d3/d3-color/blob/master/src/color.js "Source") - -Returns a string representing this color according to the [CSS Color Module Level 3 specification](https://www.w3.org/TR/css-color-3/#hsl-color), such as `hsl(257, 50%, 80%)` or `hsla(257, 50%, 80%, 0.2)`. If this color is not displayable, a suitable displayable color is returned instead by clamping S and L channel values to the interval [0, 100]. - -<a name="color_formatRgb" href="#color_formatRgb">#</a> *color*.<b>formatRgb</b>() [<>](https://github.com/d3/d3-color/blob/master/src/color.js "Source") - -Returns a string representing this color according to the [CSS Object Model specification](https://drafts.csswg.org/cssom/#serialize-a-css-component-value), such as `rgb(247, 234, 186)` or `rgba(247, 234, 186, 0.2)`. If this color is not displayable, a suitable displayable color is returned instead by clamping RGB channel values to the interval [0, 255]. - -<a name="color_toString" href="#color_toString">#</a> *color*.<b>toString</b>() [<>](https://github.com/d3/d3-color/blob/master/src/color.js "Source") - -An alias for [*color*.formatRgb](#color_formatRgb). - -<a name="rgb" href="#rgb">#</a> d3.<b>rgb</b>(<i>r</i>, <i>g</i>, <i>b</i>[, <i>opacity</i>]) [<>](https://github.com/d3/d3-color/blob/master/src/color.js "Source")<br> -<a href="#rgb">#</a> d3.<b>rgb</b>(<i>specifier</i>)<br> -<a href="#rgb">#</a> d3.<b>rgb</b>(<i>color</i>)<br> - -Constructs a new [RGB](https://en.wikipedia.org/wiki/RGB_color_model) color. The channel values are exposed as `r`, `g` and `b` properties on the returned instance. Use the [RGB color picker](http://bl.ocks.org/mbostock/78d64ca7ef013b4dcf8f) to explore this color space. - -If *r*, *g* and *b* are specified, these represent the channel values of the returned color; an *opacity* may also be specified. If a CSS Color Module Level 3 *specifier* string is specified, it is parsed and then converted to the RGB color space. See [color](#color) for examples. If a [*color*](#color) instance is specified, it is converted to the RGB color space using [*color*.rgb](#color_rgb). Note that unlike [*color*.rgb](#color_rgb) this method *always* returns a new instance, even if *color* is already an RGB color. - -<a name="hsl" href="#hsl">#</a> d3.<b>hsl</b>(<i>h</i>, <i>s</i>, <i>l</i>[, <i>opacity</i>]) [<>](https://github.com/d3/d3-color/blob/master/src/color.js "Source")<br> -<a href="#hsl">#</a> d3.<b>hsl</b>(<i>specifier</i>)<br> -<a href="#hsl">#</a> d3.<b>hsl</b>(<i>color</i>)<br> - -Constructs a new [HSL](https://en.wikipedia.org/wiki/HSL_and_HSV) color. The channel values are exposed as `h`, `s` and `l` properties on the returned instance. Use the [HSL color picker](http://bl.ocks.org/mbostock/debaad4fcce9bcee14cf) to explore this color space. - -If *h*, *s* and *l* are specified, these represent the channel values of the returned color; an *opacity* may also be specified. If a CSS Color Module Level 3 *specifier* string is specified, it is parsed and then converted to the HSL color space. See [color](#color) for examples. If a [*color*](#color) instance is specified, it is converted to the RGB color space using [*color*.rgb](#color_rgb) and then converted to HSL. (Colors already in the HSL color space skip the conversion to RGB.) - -<a name="lab" href="#lab">#</a> d3.<b>lab</b>(<i>l</i>, <i>a</i>, <i>b</i>[, <i>opacity</i>]) [<>](https://github.com/d3/d3-color/blob/master/src/lab.js "Source")<br> -<a href="#lab">#</a> d3.<b>lab</b>(<i>specifier</i>)<br> -<a href="#lab">#</a> d3.<b>lab</b>(<i>color</i>)<br> - -Constructs a new [CIELAB](https://en.wikipedia.org/wiki/Lab_color_space#CIELAB) color. The channel values are exposed as `l`, `a` and `b` properties on the returned instance. Use the [CIELAB color picker](http://bl.ocks.org/mbostock/9f37cc207c0cb166921b) to explore this color space. The value of *l* is typically in the range [0, 100], while *a* and *b* are typically in [-160, +160]. - -If *l*, *a* and *b* are specified, these represent the channel values of the returned color; an *opacity* may also be specified. If a CSS Color Module Level 3 *specifier* string is specified, it is parsed and then converted to the CIELAB color space. See [color](#color) for examples. If a [*color*](#color) instance is specified, it is converted to the RGB color space using [*color*.rgb](#color_rgb) and then converted to CIELAB. (Colors already in the CIELAB color space skip the conversion to RGB, and colors in the HCL color space are converted directly to CIELAB.) - -<a name="gray" href="#gray">#</a> d3.<b>gray</b>(<i>l</i>[, <i>opacity</i>]) [<>](https://github.com/d3/d3-color/blob/master/src/lab.js "Source")<br> - -Constructs a new [CIELAB](#lab) color with the specified *l* value and *a* = *b* = 0. - -<a name="hcl" href="#hcl">#</a> d3.<b>hcl</b>(<i>h</i>, <i>c</i>, <i>l</i>[, <i>opacity</i>]) [<>](https://github.com/d3/d3-color/blob/master/src/lab.js "Source")<br> -<a href="#hcl">#</a> d3.<b>hcl</b>(<i>specifier</i>)<br> -<a href="#hcl">#</a> d3.<b>hcl</b>(<i>color</i>)<br> - -Equivalent to [d3.lch](#lch), but with reversed argument order. - -<a name="lch" href="#lch">#</a> d3.<b>lch</b>(<i>l</i>, <i>c</i>, <i>h</i>[, <i>opacity</i>]) [<>](https://github.com/d3/d3-color/blob/master/src/lab.js "Source")<br> -<a href="#lch">#</a> d3.<b>lch</b>(<i>specifier</i>)<br> -<a href="#lch">#</a> d3.<b>lch</b>(<i>color</i>)<br> - -Constructs a new [CIELCh<sub>ab</sub>](https://en.wikipedia.org/wiki/CIELAB_color_space#Cylindrical_representation:_CIELCh_or_CIEHLC) color. The channel values are exposed as `l`, `c` and `h` properties on the returned instance. Use the [CIELCh<sub>ab</sub> color picker](http://bl.ocks.org/mbostock/3e115519a1b495e0bd95) to explore this color space. The value of *l* is typically in the range [0, 100], *c* is typically in [0, 230], and *h* is typically in [0, 360). - -If *l*, *c*, and *h* are specified, these represent the channel values of the returned color; an *opacity* may also be specified. If a CSS Color Module Level 3 *specifier* string is specified, it is parsed and then converted to CIELCh<sub>ab</sub> color space. See [color](#color) for examples. If a [*color*](#color) instance is specified, it is converted to the RGB color space using [*color*.rgb](#color_rgb) and then converted to CIELCh<sub>ab</sub>. (Colors already in CIELCh<sub>ab</sub> color space skip the conversion to RGB, and colors in CIELAB color space are converted directly to CIELCh<sub>ab</sub>.) - -<a name="cubehelix" href="#cubehelix">#</a> d3.<b>cubehelix</b>(<i>h</i>, <i>s</i>, <i>l</i>[, <i>opacity</i>]) [<>](https://github.com/d3/d3-color/blob/master/src/cubehelix.js "Source")<br> -<a href="#cubehelix">#</a> d3.<b>cubehelix</b>(<i>specifier</i>)<br> -<a href="#cubehelix">#</a> d3.<b>cubehelix</b>(<i>color</i>)<br> - -Constructs a new [Cubehelix](http://www.mrao.cam.ac.uk/~dag/CUBEHELIX/) color. The channel values are exposed as `h`, `s` and `l` properties on the returned instance. Use the [Cubehelix color picker](http://bl.ocks.org/mbostock/ba8d75e45794c27168b5) to explore this color space. - -If *h*, *s* and *l* are specified, these represent the channel values of the returned color; an *opacity* may also be specified. If a CSS Color Module Level 3 *specifier* string is specified, it is parsed and then converted to the Cubehelix color space. See [color](#color) for examples. If a [*color*](#color) instance is specified, it is converted to the RGB color space using [*color*.rgb](#color_rgb) and then converted to Cubehelix. (Colors already in the Cubehelix color space skip the conversion to RGB.) diff --git a/node_modules/d3-color/dist/d3-color.js b/node_modules/d3-color/dist/d3-color.js deleted file mode 100644 index ba460262ea9bb36d4e875dbb20d960fb560bdaab..0000000000000000000000000000000000000000 --- a/node_modules/d3-color/dist/d3-color.js +++ /dev/null @@ -1,581 +0,0 @@ -// https://d3js.org/d3-color/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {})); -}(this, function (exports) { 'use strict'; - -function define(constructor, factory, prototype) { - constructor.prototype = factory.prototype = prototype; - prototype.constructor = constructor; -} - -function extend(parent, definition) { - var prototype = Object.create(parent.prototype); - for (var key in definition) prototype[key] = definition[key]; - return prototype; -} - -function Color() {} - -var darker = 0.7; -var brighter = 1 / darker; - -var reI = "\\s*([+-]?\\d+)\\s*", - reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", - reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", - reHex = /^#([0-9a-f]{3,8})$/, - reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), - reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), - reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), - reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), - reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), - reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); - -var named = { - aliceblue: 0xf0f8ff, - antiquewhite: 0xfaebd7, - aqua: 0x00ffff, - aquamarine: 0x7fffd4, - azure: 0xf0ffff, - beige: 0xf5f5dc, - bisque: 0xffe4c4, - black: 0x000000, - blanchedalmond: 0xffebcd, - blue: 0x0000ff, - blueviolet: 0x8a2be2, - brown: 0xa52a2a, - burlywood: 0xdeb887, - cadetblue: 0x5f9ea0, - chartreuse: 0x7fff00, - chocolate: 0xd2691e, - coral: 0xff7f50, - cornflowerblue: 0x6495ed, - cornsilk: 0xfff8dc, - crimson: 0xdc143c, - cyan: 0x00ffff, - darkblue: 0x00008b, - darkcyan: 0x008b8b, - darkgoldenrod: 0xb8860b, - darkgray: 0xa9a9a9, - darkgreen: 0x006400, - darkgrey: 0xa9a9a9, - darkkhaki: 0xbdb76b, - darkmagenta: 0x8b008b, - darkolivegreen: 0x556b2f, - darkorange: 0xff8c00, - darkorchid: 0x9932cc, - darkred: 0x8b0000, - darksalmon: 0xe9967a, - darkseagreen: 0x8fbc8f, - darkslateblue: 0x483d8b, - darkslategray: 0x2f4f4f, - darkslategrey: 0x2f4f4f, - darkturquoise: 0x00ced1, - darkviolet: 0x9400d3, - deeppink: 0xff1493, - deepskyblue: 0x00bfff, - dimgray: 0x696969, - dimgrey: 0x696969, - dodgerblue: 0x1e90ff, - firebrick: 0xb22222, - floralwhite: 0xfffaf0, - forestgreen: 0x228b22, - fuchsia: 0xff00ff, - gainsboro: 0xdcdcdc, - ghostwhite: 0xf8f8ff, - gold: 0xffd700, - goldenrod: 0xdaa520, - gray: 0x808080, - green: 0x008000, - greenyellow: 0xadff2f, - grey: 0x808080, - honeydew: 0xf0fff0, - hotpink: 0xff69b4, - indianred: 0xcd5c5c, - indigo: 0x4b0082, - ivory: 0xfffff0, - khaki: 0xf0e68c, - lavender: 0xe6e6fa, - lavenderblush: 0xfff0f5, - lawngreen: 0x7cfc00, - lemonchiffon: 0xfffacd, - lightblue: 0xadd8e6, - lightcoral: 0xf08080, - lightcyan: 0xe0ffff, - lightgoldenrodyellow: 0xfafad2, - lightgray: 0xd3d3d3, - lightgreen: 0x90ee90, - lightgrey: 0xd3d3d3, - lightpink: 0xffb6c1, - lightsalmon: 0xffa07a, - lightseagreen: 0x20b2aa, - lightskyblue: 0x87cefa, - lightslategray: 0x778899, - lightslategrey: 0x778899, - lightsteelblue: 0xb0c4de, - lightyellow: 0xffffe0, - lime: 0x00ff00, - limegreen: 0x32cd32, - linen: 0xfaf0e6, - magenta: 0xff00ff, - maroon: 0x800000, - mediumaquamarine: 0x66cdaa, - mediumblue: 0x0000cd, - mediumorchid: 0xba55d3, - mediumpurple: 0x9370db, - mediumseagreen: 0x3cb371, - mediumslateblue: 0x7b68ee, - mediumspringgreen: 0x00fa9a, - mediumturquoise: 0x48d1cc, - mediumvioletred: 0xc71585, - midnightblue: 0x191970, - mintcream: 0xf5fffa, - mistyrose: 0xffe4e1, - moccasin: 0xffe4b5, - navajowhite: 0xffdead, - navy: 0x000080, - oldlace: 0xfdf5e6, - olive: 0x808000, - olivedrab: 0x6b8e23, - orange: 0xffa500, - orangered: 0xff4500, - orchid: 0xda70d6, - palegoldenrod: 0xeee8aa, - palegreen: 0x98fb98, - paleturquoise: 0xafeeee, - palevioletred: 0xdb7093, - papayawhip: 0xffefd5, - peachpuff: 0xffdab9, - peru: 0xcd853f, - pink: 0xffc0cb, - plum: 0xdda0dd, - powderblue: 0xb0e0e6, - purple: 0x800080, - rebeccapurple: 0x663399, - red: 0xff0000, - rosybrown: 0xbc8f8f, - royalblue: 0x4169e1, - saddlebrown: 0x8b4513, - salmon: 0xfa8072, - sandybrown: 0xf4a460, - seagreen: 0x2e8b57, - seashell: 0xfff5ee, - sienna: 0xa0522d, - silver: 0xc0c0c0, - skyblue: 0x87ceeb, - slateblue: 0x6a5acd, - slategray: 0x708090, - slategrey: 0x708090, - snow: 0xfffafa, - springgreen: 0x00ff7f, - steelblue: 0x4682b4, - tan: 0xd2b48c, - teal: 0x008080, - thistle: 0xd8bfd8, - tomato: 0xff6347, - turquoise: 0x40e0d0, - violet: 0xee82ee, - wheat: 0xf5deb3, - white: 0xffffff, - whitesmoke: 0xf5f5f5, - yellow: 0xffff00, - yellowgreen: 0x9acd32 -}; - -define(Color, color, { - copy: function(channels) { - return Object.assign(new this.constructor, this, channels); - }, - displayable: function() { - return this.rgb().displayable(); - }, - hex: color_formatHex, // Deprecated! Use color.formatHex. - formatHex: color_formatHex, - formatHsl: color_formatHsl, - formatRgb: color_formatRgb, - toString: color_formatRgb -}); - -function color_formatHex() { - return this.rgb().formatHex(); -} - -function color_formatHsl() { - return hslConvert(this).formatHsl(); -} - -function color_formatRgb() { - return this.rgb().formatRgb(); -} - -function color(format) { - var m, l; - format = (format + "").trim().toLowerCase(); - return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000 - : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00 - : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 - : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000 - : null) // invalid hex - : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) - : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) - : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) - : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) - : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) - : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) - : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins - : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) - : null; -} - -function rgbn(n) { - return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); -} - -function rgba(r, g, b, a) { - if (a <= 0) r = g = b = NaN; - return new Rgb(r, g, b, a); -} - -function rgbConvert(o) { - if (!(o instanceof Color)) o = color(o); - if (!o) return new Rgb; - o = o.rgb(); - return new Rgb(o.r, o.g, o.b, o.opacity); -} - -function rgb(r, g, b, opacity) { - return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); -} - -function Rgb(r, g, b, opacity) { - this.r = +r; - this.g = +g; - this.b = +b; - this.opacity = +opacity; -} - -define(Rgb, rgb, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - rgb: function() { - return this; - }, - displayable: function() { - return (-0.5 <= this.r && this.r < 255.5) - && (-0.5 <= this.g && this.g < 255.5) - && (-0.5 <= this.b && this.b < 255.5) - && (0 <= this.opacity && this.opacity <= 1); - }, - hex: rgb_formatHex, // Deprecated! Use color.formatHex. - formatHex: rgb_formatHex, - formatRgb: rgb_formatRgb, - toString: rgb_formatRgb -})); - -function rgb_formatHex() { - return "#" + hex(this.r) + hex(this.g) + hex(this.b); -} - -function rgb_formatRgb() { - var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "rgb(" : "rgba(") - + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.b) || 0)) - + (a === 1 ? ")" : ", " + a + ")"); -} - -function hex(value) { - value = Math.max(0, Math.min(255, Math.round(value) || 0)); - return (value < 16 ? "0" : "") + value.toString(16); -} - -function hsla(h, s, l, a) { - if (a <= 0) h = s = l = NaN; - else if (l <= 0 || l >= 1) h = s = NaN; - else if (s <= 0) h = NaN; - return new Hsl(h, s, l, a); -} - -function hslConvert(o) { - if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); - if (!(o instanceof Color)) o = color(o); - if (!o) return new Hsl; - if (o instanceof Hsl) return o; - o = o.rgb(); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - min = Math.min(r, g, b), - max = Math.max(r, g, b), - h = NaN, - s = max - min, - l = (max + min) / 2; - if (s) { - if (r === max) h = (g - b) / s + (g < b) * 6; - else if (g === max) h = (b - r) / s + 2; - else h = (r - g) / s + 4; - s /= l < 0.5 ? max + min : 2 - max - min; - h *= 60; - } else { - s = l > 0 && l < 1 ? 0 : h; - } - return new Hsl(h, s, l, o.opacity); -} - -function hsl(h, s, l, opacity) { - return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); -} - -function Hsl(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} - -define(Hsl, hsl, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = this.h % 360 + (this.h < 0) * 360, - s = isNaN(h) || isNaN(this.s) ? 0 : this.s, - l = this.l, - m2 = l + (l < 0.5 ? l : 1 - l) * s, - m1 = 2 * l - m2; - return new Rgb( - hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), - hsl2rgb(h, m1, m2), - hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), - this.opacity - ); - }, - 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 a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "hsl(" : "hsla(") - + (this.h || 0) + ", " - + (this.s || 0) * 100 + "%, " - + (this.l || 0) * 100 + "%" - + (a === 1 ? ")" : ", " + a + ")"); - } -})); - -/* From FvD 13.37, CSS Color Module Level 3 */ -function hsl2rgb(h, m1, m2) { - return (h < 60 ? m1 + (m2 - m1) * h / 60 - : h < 180 ? m2 - : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 - : m1) * 255; -} - -const radians = Math.PI / 180; -const degrees = 180 / Math.PI; - -// https://observablehq.com/@mbostock/lab-and-rgb -const K = 18, - Xn = 0.96422, - Yn = 1, - Zn = 0.82521, - t0 = 4 / 29, - t1 = 6 / 29, - t2 = 3 * t1 * t1, - t3 = t1 * t1 * t1; - -function labConvert(o) { - if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); - if (o instanceof Hcl) return hcl2lab(o); - if (!(o instanceof Rgb)) o = rgbConvert(o); - var r = rgb2lrgb(o.r), - g = rgb2lrgb(o.g), - b = rgb2lrgb(o.b), - y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z; - if (r === g && g === b) x = z = y; else { - x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); - z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); - } - return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); -} - -function gray(l, opacity) { - return new Lab(l, 0, 0, opacity == null ? 1 : opacity); -} - -function lab(l, a, b, opacity) { - return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); -} - -function Lab(l, a, b, opacity) { - this.l = +l; - this.a = +a; - this.b = +b; - this.opacity = +opacity; -} - -define(Lab, lab, extend(Color, { - brighter: function(k) { - return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); - }, - darker: function(k) { - return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); - }, - rgb: function() { - var y = (this.l + 16) / 116, - x = isNaN(this.a) ? y : y + this.a / 500, - z = isNaN(this.b) ? y : y - this.b / 200; - x = Xn * lab2xyz(x); - y = Yn * lab2xyz(y); - z = Zn * lab2xyz(z); - return new Rgb( - lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z), - lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), - lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z), - this.opacity - ); - } -})); - -function xyz2lab(t) { - return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; -} - -function lab2xyz(t) { - return t > t1 ? t * t * t : t2 * (t - t0); -} - -function lrgb2rgb(x) { - return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); -} - -function rgb2lrgb(x) { - return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); -} - -function hclConvert(o) { - if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); - if (!(o instanceof Lab)) o = labConvert(o); - if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity); - var h = Math.atan2(o.b, o.a) * degrees; - return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); -} - -function lch(l, c, h, opacity) { - return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity); -} - -function hcl(h, c, l, opacity) { - return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); -} - -function Hcl(h, c, l, opacity) { - this.h = +h; - this.c = +c; - this.l = +l; - this.opacity = +opacity; -} - -function hcl2lab(o) { - if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity); - var h = o.h * radians; - return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); -} - -define(Hcl, hcl, extend(Color, { - brighter: function(k) { - return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); - }, - darker: function(k) { - return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); - }, - rgb: function() { - return hcl2lab(this).rgb(); - } -})); - -var A = -0.14861, - B = +1.78277, - C = -0.29227, - D = -0.90649, - E = +1.97294, - ED = E * D, - EB = E * B, - BC_DA = B * C - D * A; - -function cubehelixConvert(o) { - if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); - if (!(o instanceof Rgb)) o = rgbConvert(o); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), - bl = b - l, - k = (E * (g - l) - C * bl) / D, - s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 - h = s ? Math.atan2(k, bl) * degrees - 120 : NaN; - return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); -} - -function cubehelix(h, s, l, opacity) { - return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); -} - -function Cubehelix(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} - -define(Cubehelix, cubehelix, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Cubehelix(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Cubehelix(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = isNaN(this.h) ? 0 : (this.h + 120) * radians, - l = +this.l, - a = isNaN(this.s) ? 0 : this.s * l * (1 - l), - cosh = Math.cos(h), - sinh = Math.sin(h); - return new Rgb( - 255 * (l + a * (A * cosh + B * sinh)), - 255 * (l + a * (C * cosh + D * sinh)), - 255 * (l + a * (E * cosh)), - this.opacity - ); - } -})); - -exports.color = color; -exports.cubehelix = cubehelix; -exports.gray = gray; -exports.hcl = hcl; -exports.hsl = hsl; -exports.lab = lab; -exports.lch = lch; -exports.rgb = rgb; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-color/dist/d3-color.min.js b/node_modules/d3-color/dist/d3-color.min.js deleted file mode 100644 index f3a02f0c6ed572283e40448f84d5032176bb027c..0000000000000000000000000000000000000000 --- a/node_modules/d3-color/dist/d3-color.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-color/ v2.0.0 Copyright 2020 Mike Bostock -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t=t||self).d3=t.d3||{})}(this,function(t){"use strict";function e(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function n(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function i(){}var r="\\s*([+-]?\\d+)\\s*",a="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",o=/^#([0-9a-f]{3,8})$/,h=new RegExp("^rgb\\("+[r,r,r]+"\\)$"),l=new RegExp("^rgb\\("+[s,s,s]+"\\)$"),u=new RegExp("^rgba\\("+[r,r,r,a]+"\\)$"),c=new RegExp("^rgba\\("+[s,s,s,a]+"\\)$"),g=new RegExp("^hsl\\("+[a,s,s]+"\\)$"),f=new RegExp("^hsla\\("+[a,s,s,a]+"\\)$"),d={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function p(){return this.rgb().formatHex()}function b(){return this.rgb().formatRgb()}function y(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=o.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?w(e):3===n?new M(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?m(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?m(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=h.exec(t))?new M(e[1],e[2],e[3],1):(e=l.exec(t))?new M(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=u.exec(t))?m(e[1],e[2],e[3],e[4]):(e=c.exec(t))?m(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=g.exec(t))?R(e[1],e[2]/100,e[3]/100,1):(e=f.exec(t))?R(e[1],e[2]/100,e[3]/100,e[4]):d.hasOwnProperty(t)?w(d[t]):"transparent"===t?new M(NaN,NaN,NaN,0):null}function w(t){return new M(t>>16&255,t>>8&255,255&t,1)}function m(t,e,n,i){return i<=0&&(t=e=n=NaN),new M(t,e,n,i)}function N(t){return t instanceof i||(t=y(t)),t?new M((t=t.rgb()).r,t.g,t.b,t.opacity):new M}function k(t,e,n,i){return 1===arguments.length?N(t):new M(t,e,n,null==i?1:i)}function M(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function v(){return"#"+q(this.r)+q(this.g)+q(this.b)}function x(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function q(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function R(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new H(t,e,n,i)}function E(t){if(t instanceof H)return new H(t.h,t.s,t.l,t.opacity);if(t instanceof i||(t=y(t)),!t)return new H;if(t instanceof H)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,a=Math.min(e,n,r),s=Math.max(e,n,r),o=NaN,h=s-a,l=(s+a)/2;return h?(o=e===s?(n-r)/h+6*(n<r):n===s?(r-e)/h+2:(e-n)/h+4,h/=l<.5?s+a:2-s-a,o*=60):h=l>0&&l<1?0:o,new H(o,h,l,t.opacity)}function $(t,e,n,i){return 1===arguments.length?E(t):new H(t,e,n,null==i?1:i)}function H(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function j(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}e(i,y,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:p,formatHex:p,formatHsl:function(){return E(this).formatHsl()},formatRgb:b,toString:b}),e(M,k,n(i,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new M(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new M(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},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:v,formatHex:v,formatRgb:x,toString:x})),e(H,$,n(i,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new H(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new H(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new M(j(t>=240?t-240:t+120,r,i),j(t,r,i),j(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const O=Math.PI/180,P=180/Math.PI,I=.96422,S=1,_=.82521,z=4/29,C=6/29,L=3*C*C,A=C*C*C;function B(t){if(t instanceof F)return new F(t.l,t.a,t.b,t.opacity);if(t instanceof V)return W(t);t instanceof M||(t=N(t));var e,n,i=Q(t.r),r=Q(t.g),a=Q(t.b),s=G((.2225045*i+.7168786*r+.0606169*a)/S);return i===r&&r===a?e=n=s:(e=G((.4360747*i+.3850649*r+.1430804*a)/I),n=G((.0139322*i+.0971045*r+.7141733*a)/_)),new F(116*s-16,500*(e-s),200*(s-n),t.opacity)}function D(t,e,n,i){return 1===arguments.length?B(t):new F(t,e,n,null==i?1:i)}function F(t,e,n,i){this.l=+t,this.a=+e,this.b=+n,this.opacity=+i}function G(t){return t>A?Math.pow(t,1/3):t/L+z}function J(t){return t>C?t*t*t:L*(t-z)}function K(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Q(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function T(t){if(t instanceof V)return new V(t.h,t.c,t.l,t.opacity);if(t instanceof F||(t=B(t)),0===t.a&&0===t.b)return new V(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*P;return new V(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function U(t,e,n,i){return 1===arguments.length?T(t):new V(t,e,n,null==i?1:i)}function V(t,e,n,i){this.h=+t,this.c=+e,this.l=+n,this.opacity=+i}function W(t){if(isNaN(t.h))return new F(t.l,0,0,t.opacity);var e=t.h*O;return new F(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}e(F,D,n(i,{brighter:function(t){return new F(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new F(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new M(K(3.1338561*(e=I*J(e))-1.6168667*(t=S*J(t))-.4906146*(n=_*J(n))),K(-.9787684*e+1.9161415*t+.033454*n),K(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),e(V,U,n(i,{brighter:function(t){return new V(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new V(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return W(this).rgb()}}));var X=-.14861,Y=1.78277,Z=-.29227,tt=-.90649,et=1.97294,nt=et*tt,it=et*Y,rt=Y*Z-tt*X;function at(t,e,n,i){return 1===arguments.length?function(t){if(t instanceof st)return new st(t.h,t.s,t.l,t.opacity);t instanceof M||(t=N(t));var e=t.r/255,n=t.g/255,i=t.b/255,r=(rt*i+nt*e-it*n)/(rt+nt-it),a=i-r,s=(et*(n-r)-Z*a)/tt,o=Math.sqrt(s*s+a*a)/(et*r*(1-r)),h=o?Math.atan2(s,a)*P-120:NaN;return new st(h<0?h+360:h,o,r,t.opacity)}(t):new st(t,e,n,null==i?1:i)}function st(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}e(st,at,n(i,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new st(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new st(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*O,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),i=Math.cos(t),r=Math.sin(t);return new M(255*(e+n*(X*i+Y*r)),255*(e+n*(Z*i+tt*r)),255*(e+n*(et*i)),this.opacity)}})),t.color=y,t.cubehelix=at,t.gray=function(t,e){return new F(t,0,0,null==e?1:e)},t.hcl=U,t.hsl=$,t.lab=D,t.lch=function(t,e,n,i){return 1===arguments.length?T(t):new V(n,e,t,null==i?1:i)},t.rgb=k,Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/node_modules/d3-color/package.json b/node_modules/d3-color/package.json deleted file mode 100644 index 2ccd184e70c975a18b0587637d83a437147fb56b..0000000000000000000000000000000000000000 --- a/node_modules/d3-color/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_from": "d3-color@2", - "_id": "d3-color@2.0.0", - "_inBundle": false, - "_integrity": "sha512-SPXi0TSKPD4g9tw0NMZFnR95XVgUZiBH+uUTqQuDu1OsE2zomHU7ho0FISciaPvosimixwHFl3WHLGabv6dDgQ==", - "_location": "/d3-color", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-color@2", - "name": "d3-color", - "escapedName": "d3-color", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3", - "/d3-interpolate", - "/d3-scale-chromatic", - "/d3-transition" - ], - "_resolved": "https://registry.npmjs.org/d3-color/-/d3-color-2.0.0.tgz", - "_shasum": "8d625cab42ed9b8f601a1760a389f7ea9189d62e", - "_spec": "d3-color@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-color/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Color spaces! RGB, HSL, Cubehelix, Lab and HCL (Lch).", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-color/", - "jsdelivr": "dist/d3-color.min.js", - "keywords": [ - "d3", - "d3-module", - "color", - "rgb", - "hsl", - "lab", - "hcl", - "lch", - "cubehelix" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-color.js", - "module": "src/index.js", - "name": "d3-color", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-color.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src test" - }, - "sideEffects": false, - "unpkg": "dist/d3-color.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-color/src/color.js b/node_modules/d3-color/src/color.js deleted file mode 100644 index 036d9f4345fed2198461e8b199b9a1b055dd4b82..0000000000000000000000000000000000000000 --- a/node_modules/d3-color/src/color.js +++ /dev/null @@ -1,371 +0,0 @@ -import define, {extend} from "./define.js"; - -export function Color() {} - -export var darker = 0.7; -export var brighter = 1 / darker; - -var reI = "\\s*([+-]?\\d+)\\s*", - reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", - reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", - reHex = /^#([0-9a-f]{3,8})$/, - reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), - reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), - reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), - reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), - reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), - reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); - -var named = { - aliceblue: 0xf0f8ff, - antiquewhite: 0xfaebd7, - aqua: 0x00ffff, - aquamarine: 0x7fffd4, - azure: 0xf0ffff, - beige: 0xf5f5dc, - bisque: 0xffe4c4, - black: 0x000000, - blanchedalmond: 0xffebcd, - blue: 0x0000ff, - blueviolet: 0x8a2be2, - brown: 0xa52a2a, - burlywood: 0xdeb887, - cadetblue: 0x5f9ea0, - chartreuse: 0x7fff00, - chocolate: 0xd2691e, - coral: 0xff7f50, - cornflowerblue: 0x6495ed, - cornsilk: 0xfff8dc, - crimson: 0xdc143c, - cyan: 0x00ffff, - darkblue: 0x00008b, - darkcyan: 0x008b8b, - darkgoldenrod: 0xb8860b, - darkgray: 0xa9a9a9, - darkgreen: 0x006400, - darkgrey: 0xa9a9a9, - darkkhaki: 0xbdb76b, - darkmagenta: 0x8b008b, - darkolivegreen: 0x556b2f, - darkorange: 0xff8c00, - darkorchid: 0x9932cc, - darkred: 0x8b0000, - darksalmon: 0xe9967a, - darkseagreen: 0x8fbc8f, - darkslateblue: 0x483d8b, - darkslategray: 0x2f4f4f, - darkslategrey: 0x2f4f4f, - darkturquoise: 0x00ced1, - darkviolet: 0x9400d3, - deeppink: 0xff1493, - deepskyblue: 0x00bfff, - dimgray: 0x696969, - dimgrey: 0x696969, - dodgerblue: 0x1e90ff, - firebrick: 0xb22222, - floralwhite: 0xfffaf0, - forestgreen: 0x228b22, - fuchsia: 0xff00ff, - gainsboro: 0xdcdcdc, - ghostwhite: 0xf8f8ff, - gold: 0xffd700, - goldenrod: 0xdaa520, - gray: 0x808080, - green: 0x008000, - greenyellow: 0xadff2f, - grey: 0x808080, - honeydew: 0xf0fff0, - hotpink: 0xff69b4, - indianred: 0xcd5c5c, - indigo: 0x4b0082, - ivory: 0xfffff0, - khaki: 0xf0e68c, - lavender: 0xe6e6fa, - lavenderblush: 0xfff0f5, - lawngreen: 0x7cfc00, - lemonchiffon: 0xfffacd, - lightblue: 0xadd8e6, - lightcoral: 0xf08080, - lightcyan: 0xe0ffff, - lightgoldenrodyellow: 0xfafad2, - lightgray: 0xd3d3d3, - lightgreen: 0x90ee90, - lightgrey: 0xd3d3d3, - lightpink: 0xffb6c1, - lightsalmon: 0xffa07a, - lightseagreen: 0x20b2aa, - lightskyblue: 0x87cefa, - lightslategray: 0x778899, - lightslategrey: 0x778899, - lightsteelblue: 0xb0c4de, - lightyellow: 0xffffe0, - lime: 0x00ff00, - limegreen: 0x32cd32, - linen: 0xfaf0e6, - magenta: 0xff00ff, - maroon: 0x800000, - mediumaquamarine: 0x66cdaa, - mediumblue: 0x0000cd, - mediumorchid: 0xba55d3, - mediumpurple: 0x9370db, - mediumseagreen: 0x3cb371, - mediumslateblue: 0x7b68ee, - mediumspringgreen: 0x00fa9a, - mediumturquoise: 0x48d1cc, - mediumvioletred: 0xc71585, - midnightblue: 0x191970, - mintcream: 0xf5fffa, - mistyrose: 0xffe4e1, - moccasin: 0xffe4b5, - navajowhite: 0xffdead, - navy: 0x000080, - oldlace: 0xfdf5e6, - olive: 0x808000, - olivedrab: 0x6b8e23, - orange: 0xffa500, - orangered: 0xff4500, - orchid: 0xda70d6, - palegoldenrod: 0xeee8aa, - palegreen: 0x98fb98, - paleturquoise: 0xafeeee, - palevioletred: 0xdb7093, - papayawhip: 0xffefd5, - peachpuff: 0xffdab9, - peru: 0xcd853f, - pink: 0xffc0cb, - plum: 0xdda0dd, - powderblue: 0xb0e0e6, - purple: 0x800080, - rebeccapurple: 0x663399, - red: 0xff0000, - rosybrown: 0xbc8f8f, - royalblue: 0x4169e1, - saddlebrown: 0x8b4513, - salmon: 0xfa8072, - sandybrown: 0xf4a460, - seagreen: 0x2e8b57, - seashell: 0xfff5ee, - sienna: 0xa0522d, - silver: 0xc0c0c0, - skyblue: 0x87ceeb, - slateblue: 0x6a5acd, - slategray: 0x708090, - slategrey: 0x708090, - snow: 0xfffafa, - springgreen: 0x00ff7f, - steelblue: 0x4682b4, - tan: 0xd2b48c, - teal: 0x008080, - thistle: 0xd8bfd8, - tomato: 0xff6347, - turquoise: 0x40e0d0, - violet: 0xee82ee, - wheat: 0xf5deb3, - white: 0xffffff, - whitesmoke: 0xf5f5f5, - yellow: 0xffff00, - yellowgreen: 0x9acd32 -}; - -define(Color, color, { - copy: function(channels) { - return Object.assign(new this.constructor, this, channels); - }, - displayable: function() { - return this.rgb().displayable(); - }, - hex: color_formatHex, // Deprecated! Use color.formatHex. - formatHex: color_formatHex, - formatHsl: color_formatHsl, - formatRgb: color_formatRgb, - toString: color_formatRgb -}); - -function color_formatHex() { - return this.rgb().formatHex(); -} - -function color_formatHsl() { - return hslConvert(this).formatHsl(); -} - -function color_formatRgb() { - return this.rgb().formatRgb(); -} - -export default function color(format) { - var m, l; - format = (format + "").trim().toLowerCase(); - return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000 - : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00 - : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 - : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000 - : null) // invalid hex - : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) - : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) - : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) - : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) - : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) - : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) - : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins - : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) - : null; -} - -function rgbn(n) { - return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); -} - -function rgba(r, g, b, a) { - if (a <= 0) r = g = b = NaN; - return new Rgb(r, g, b, a); -} - -export function rgbConvert(o) { - if (!(o instanceof Color)) o = color(o); - if (!o) return new Rgb; - o = o.rgb(); - return new Rgb(o.r, o.g, o.b, o.opacity); -} - -export function rgb(r, g, b, opacity) { - return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); -} - -export function Rgb(r, g, b, opacity) { - this.r = +r; - this.g = +g; - this.b = +b; - this.opacity = +opacity; -} - -define(Rgb, rgb, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - rgb: function() { - return this; - }, - displayable: function() { - return (-0.5 <= this.r && this.r < 255.5) - && (-0.5 <= this.g && this.g < 255.5) - && (-0.5 <= this.b && this.b < 255.5) - && (0 <= this.opacity && this.opacity <= 1); - }, - hex: rgb_formatHex, // Deprecated! Use color.formatHex. - formatHex: rgb_formatHex, - formatRgb: rgb_formatRgb, - toString: rgb_formatRgb -})); - -function rgb_formatHex() { - return "#" + hex(this.r) + hex(this.g) + hex(this.b); -} - -function rgb_formatRgb() { - var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "rgb(" : "rgba(") - + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.b) || 0)) - + (a === 1 ? ")" : ", " + a + ")"); -} - -function hex(value) { - value = Math.max(0, Math.min(255, Math.round(value) || 0)); - return (value < 16 ? "0" : "") + value.toString(16); -} - -function hsla(h, s, l, a) { - if (a <= 0) h = s = l = NaN; - else if (l <= 0 || l >= 1) h = s = NaN; - else if (s <= 0) h = NaN; - return new Hsl(h, s, l, a); -} - -export function hslConvert(o) { - if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); - if (!(o instanceof Color)) o = color(o); - if (!o) return new Hsl; - if (o instanceof Hsl) return o; - o = o.rgb(); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - min = Math.min(r, g, b), - max = Math.max(r, g, b), - h = NaN, - s = max - min, - l = (max + min) / 2; - if (s) { - if (r === max) h = (g - b) / s + (g < b) * 6; - else if (g === max) h = (b - r) / s + 2; - else h = (r - g) / s + 4; - s /= l < 0.5 ? max + min : 2 - max - min; - h *= 60; - } else { - s = l > 0 && l < 1 ? 0 : h; - } - return new Hsl(h, s, l, o.opacity); -} - -export function hsl(h, s, l, opacity) { - return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); -} - -function Hsl(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} - -define(Hsl, hsl, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = this.h % 360 + (this.h < 0) * 360, - s = isNaN(h) || isNaN(this.s) ? 0 : this.s, - l = this.l, - m2 = l + (l < 0.5 ? l : 1 - l) * s, - m1 = 2 * l - m2; - return new Rgb( - hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), - hsl2rgb(h, m1, m2), - hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), - this.opacity - ); - }, - 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 a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "hsl(" : "hsla(") - + (this.h || 0) + ", " - + (this.s || 0) * 100 + "%, " - + (this.l || 0) * 100 + "%" - + (a === 1 ? ")" : ", " + a + ")"); - } -})); - -/* From FvD 13.37, CSS Color Module Level 3 */ -function hsl2rgb(h, m1, m2) { - return (h < 60 ? m1 + (m2 - m1) * h / 60 - : h < 180 ? m2 - : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 - : m1) * 255; -} diff --git a/node_modules/d3-color/src/cubehelix.js b/node_modules/d3-color/src/cubehelix.js deleted file mode 100644 index 83536dd2f721a32e72c6bde67d3fb24eff1f1e7a..0000000000000000000000000000000000000000 --- a/node_modules/d3-color/src/cubehelix.js +++ /dev/null @@ -1,61 +0,0 @@ -import define, {extend} from "./define.js"; -import {Color, rgbConvert, Rgb, darker, brighter} from "./color.js"; -import {degrees, radians} from "./math.js"; - -var A = -0.14861, - B = +1.78277, - C = -0.29227, - D = -0.90649, - E = +1.97294, - ED = E * D, - EB = E * B, - BC_DA = B * C - D * A; - -function cubehelixConvert(o) { - if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); - if (!(o instanceof Rgb)) o = rgbConvert(o); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), - bl = b - l, - k = (E * (g - l) - C * bl) / D, - s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 - h = s ? Math.atan2(k, bl) * degrees - 120 : NaN; - return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); -} - -export default function cubehelix(h, s, l, opacity) { - return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); -} - -export function Cubehelix(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} - -define(Cubehelix, cubehelix, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Cubehelix(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Cubehelix(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = isNaN(this.h) ? 0 : (this.h + 120) * radians, - l = +this.l, - a = isNaN(this.s) ? 0 : this.s * l * (1 - l), - cosh = Math.cos(h), - sinh = Math.sin(h); - return new Rgb( - 255 * (l + a * (A * cosh + B * sinh)), - 255 * (l + a * (C * cosh + D * sinh)), - 255 * (l + a * (E * cosh)), - this.opacity - ); - } -})); diff --git a/node_modules/d3-color/src/define.js b/node_modules/d3-color/src/define.js deleted file mode 100644 index 2bba2d3a4fdf3cdee152aacc711366f91c1d5747..0000000000000000000000000000000000000000 --- a/node_modules/d3-color/src/define.js +++ /dev/null @@ -1,10 +0,0 @@ -export default function(constructor, factory, prototype) { - constructor.prototype = factory.prototype = prototype; - prototype.constructor = constructor; -} - -export function extend(parent, definition) { - var prototype = Object.create(parent.prototype); - for (var key in definition) prototype[key] = definition[key]; - return prototype; -} diff --git a/node_modules/d3-color/src/index.js b/node_modules/d3-color/src/index.js deleted file mode 100644 index 831cf529518caae3bfee557707141a0d2e0c9d5f..0000000000000000000000000000000000000000 --- a/node_modules/d3-color/src/index.js +++ /dev/null @@ -1,3 +0,0 @@ -export {default as color, rgb, hsl} from "./color.js"; -export {default as lab, hcl, lch, gray} from "./lab.js"; -export {default as cubehelix} from "./cubehelix.js"; diff --git a/node_modules/d3-color/src/lab.js b/node_modules/d3-color/src/lab.js deleted file mode 100644 index 645e1a50e89ffbae6b1e965259f5d65089b6b75d..0000000000000000000000000000000000000000 --- a/node_modules/d3-color/src/lab.js +++ /dev/null @@ -1,123 +0,0 @@ -import define, {extend} from "./define.js"; -import {Color, rgbConvert, Rgb} from "./color.js"; -import {degrees, radians} from "./math.js"; - -// https://observablehq.com/@mbostock/lab-and-rgb -const K = 18, - Xn = 0.96422, - Yn = 1, - Zn = 0.82521, - t0 = 4 / 29, - t1 = 6 / 29, - t2 = 3 * t1 * t1, - t3 = t1 * t1 * t1; - -function labConvert(o) { - if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); - if (o instanceof Hcl) return hcl2lab(o); - if (!(o instanceof Rgb)) o = rgbConvert(o); - var r = rgb2lrgb(o.r), - g = rgb2lrgb(o.g), - b = rgb2lrgb(o.b), - y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z; - if (r === g && g === b) x = z = y; else { - x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); - z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); - } - return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); -} - -export function gray(l, opacity) { - return new Lab(l, 0, 0, opacity == null ? 1 : opacity); -} - -export default function lab(l, a, b, opacity) { - return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); -} - -export function Lab(l, a, b, opacity) { - this.l = +l; - this.a = +a; - this.b = +b; - this.opacity = +opacity; -} - -define(Lab, lab, extend(Color, { - brighter: function(k) { - return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); - }, - darker: function(k) { - return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); - }, - rgb: function() { - var y = (this.l + 16) / 116, - x = isNaN(this.a) ? y : y + this.a / 500, - z = isNaN(this.b) ? y : y - this.b / 200; - x = Xn * lab2xyz(x); - y = Yn * lab2xyz(y); - z = Zn * lab2xyz(z); - return new Rgb( - lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z), - lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), - lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z), - this.opacity - ); - } -})); - -function xyz2lab(t) { - return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; -} - -function lab2xyz(t) { - return t > t1 ? t * t * t : t2 * (t - t0); -} - -function lrgb2rgb(x) { - return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); -} - -function rgb2lrgb(x) { - return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); -} - -function hclConvert(o) { - if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); - if (!(o instanceof Lab)) o = labConvert(o); - if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity); - var h = Math.atan2(o.b, o.a) * degrees; - return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); -} - -export function lch(l, c, h, opacity) { - return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity); -} - -export function hcl(h, c, l, opacity) { - return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); -} - -export function Hcl(h, c, l, opacity) { - this.h = +h; - this.c = +c; - this.l = +l; - this.opacity = +opacity; -} - -function hcl2lab(o) { - if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity); - var h = o.h * radians; - return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); -} - -define(Hcl, hcl, extend(Color, { - brighter: function(k) { - return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); - }, - darker: function(k) { - return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); - }, - rgb: function() { - return hcl2lab(this).rgb(); - } -})); diff --git a/node_modules/d3-color/src/math.js b/node_modules/d3-color/src/math.js deleted file mode 100644 index 66b172e7a61622565a0c594ce5fe4c3b10e93e1a..0000000000000000000000000000000000000000 --- a/node_modules/d3-color/src/math.js +++ /dev/null @@ -1,2 +0,0 @@ -export const radians = Math.PI / 180; -export const degrees = 180 / Math.PI; diff --git a/node_modules/d3-contour/LICENSE b/node_modules/d3-contour/LICENSE deleted file mode 100644 index b1c85d060639292f9d9c6ec81c8ad85e1ff99d23..0000000000000000000000000000000000000000 --- a/node_modules/d3-contour/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2012-2017 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-contour/README.md b/node_modules/d3-contour/README.md deleted file mode 100644 index acd2a84601bdc6e1c7e523c84b368e97dd562d4d..0000000000000000000000000000000000000000 --- a/node_modules/d3-contour/README.md +++ /dev/null @@ -1,171 +0,0 @@ -# d3-contour - -This library computes contour polygons by applying [marching squares](https://en.wikipedia.org/wiki/Marching_squares) to a rectangular array of numeric values. For example, here is Maungawhau’s topology (the classic `volcano` dataset and `terrain.colors` from R): - -[<img alt="Volcano Contours" src="https://raw.githubusercontent.com/d3/d3-contour/master/img/volcano.gif" width="420" height="295">](https://observablehq.com/@d3/volcano-contours) - -For each [threshold value](#contours_thresholds), the [contour generator](#_contours) constructs a GeoJSON MultiPolygon geometry object representing the area where the input values are greater than or equal to the threshold value. The geometry is in planar coordinates, where ⟨<i>i</i> + 0.5, <i>j</i> + 0.5⟩ corresponds to element <i>i</i> + <i>jn</i> in the input values array. Here is an example that loads a GeoTIFF of surface temperatures, and another that blurs a noisy monochrome PNG to produce smooth contours of cloud fraction: - -[<img alt="GeoTiff Contours" src="https://raw.githubusercontent.com/d3/d3-contour/master/img/temperature.png" width="420" height="219">](https://bl.ocks.org/mbostock/4886c227038510f1c103ce305bef6fcc) -[<img alt="Cloud Contours" src="https://raw.githubusercontent.com/d3/d3-contour/master/img/clouds.png" width="420" height="219">](https://bl.ocks.org/mbostock/818053c76d79d4841790c332656bf9da) - -Since the contour polygons are GeoJSON, you can transform and display them using standard tools; see [d3.geoPath](https://github.com/d3/d3-geo/blob/master/README.md#geoPath), [d3.geoProject](https://github.com/d3/d3-geo-projection/blob/master/README.md#geoProject) and [d3.geoStitch](https://github.com/d3/d3-geo-projection/blob/master/README.md#geoStitch), for example. Here the above contours of surface temperature are displayed in the Natural Earth projection: - -[<img alt="GeoTiff Contours II" src="https://raw.githubusercontent.com/d3/d3-contour/master/img/reprojection.png" width="420" height="219">](https://bl.ocks.org/mbostock/83c0be21dba7602ee14982b020b12f51) - -Contour plots can also visualize continuous functions by sampling. Here is the Goldstein–Price function (a test function for global optimization) and a trippy animation of *sin*(*x* + *y*)*sin*(*x* - *y*): - -[<img alt="Contours" src="https://raw.githubusercontent.com/d3/d3-contour/master/img/goldstein-price.png" width="420" height="219">](https://observablehq.com/@d3/contours) -[<img alt="Animated Contours" src="https://raw.githubusercontent.com/d3/d3-contour/master/img/sin-cos.png" width="420" height="219">](https://observablehq.com/@d3/animated-contours) - -Contours can also show the [estimated density](#density-estimation) of point clouds, which is especially useful to avoid overplotting in large datasets. This library implements fast two-dimensional kernel density estimation; see [d3.contourDensity](#contourDensity). Here is a scatterplot showing the relationship between the idle duration and eruption duration for Old Faithful: - -[<img alt="Density Contours" src="https://raw.githubusercontent.com/d3/d3-contour/master/img/faithful.png" width="420" height="219">](https://bl.ocks.org/mbostock/e3f4376d54e02d5d43ae32a7cf0e6aa9) - -And here is a density contour plot showing the relationship between the weight and price of 53,940 diamonds: - -[<img alt="Density Contours" src="https://raw.githubusercontent.com/d3/d3-contour/master/img/diamonds.png" width="420" height="420">](https://observablehq.com/@d3/density-contours) - -## Installing - -If you use NPM, `npm install d3-contour`. Otherwise, download the [latest release](https://github.com/d3/d3-contour/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-contour.v1.min.js) or as part of [D3 4.0](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-array.v2.min.js"></script> -<script src="https://d3js.org/d3-contour.v2.min.js"></script> -<script> - -// Populate a grid of n×m values where -2 ≤ x ≤ 2 and -2 ≤ y ≤ 1. -var n = 256, m = 256, values = new Array(n * m); -for (var j = 0.5, k = 0; j < m; ++j) { - for (var i = 0.5; i < n; ++i, ++k) { - values[k] = goldsteinPrice(i / n * 4 - 2, 1 - j / m * 3); - } -} - -// Compute the contour polygons at log-spaced intervals; returns an array of MultiPolygon. -var contours = d3.contours() - .size([n, m]) - .thresholds(d3.range(2, 21).map(p => Math.pow(2, p))) - (values); - -// See https://en.wikipedia.org/wiki/Test_functions_for_optimization -function goldsteinPrice(x, y) { - return (1 + Math.pow(x + y + 1, 2) * (19 - 14 * x + 3 * x * x - 14 * y + 6 * x * x + 3 * y * y)) - * (30 + Math.pow(2 * x - 3 * y, 2) * (18 - 32 * x + 12 * x * x + 48 * y - 36 * x * y + 27 * y * y)); -} - -</script> -``` - -## API Reference - -<a name="contours" href="#contours">#</a> d3.<b>contours</b>() [<>](https://github.com/d3/d3-contour/blob/master/src/contours.js "Source") - -Constructs a new contour generator with the default settings. - -<a name="_contours" href="#_contours">#</a> <i>contours</i>(<i>values</i>) [<>](https://github.com/d3/d3-contour/blob/master/src/contours.js "Source") - -Computes the contours for the given array of *values*, returning an array of [GeoJSON](http://geojson.org/geojson-spec.html) [MultiPolygon](http://geojson.org/geojson-spec.html#multipolygon) [geometry objects](http://geojson.org/geojson-spec.html#geometry-objects). Each geometry object represents the area where the input <i>values</i> are greater than or equal to the corresponding [threshold value](#contours_thresholds); the threshold value for each geometry object is exposed as <i>geometry</i>.value. - -The input *values* must be an array of length <i>n</i>×<i>m</i> where [<i>n</i>, <i>m</i>] is the contour generator’s [size](#contours_size); furthermore, each <i>values</i>[<i>i</i> + <i>jn</i>] must represent the value at the position ⟨<i>i</i>, <i>j</i>⟩. For example, to construct a 256×256 grid for the [Goldstein–Price function](https://en.wikipedia.org/wiki/Test_functions_for_optimization) where -2 ≤ <i>x</i> ≤ 2 and -2 ≤ <i>y</i> ≤ 1: - -```js -var n = 256, m = 256, values = new Array(n * m); -for (var j = 0.5, k = 0; j < m; ++j) { - for (var i = 0.5; i < n; ++i, ++k) { - values[k] = goldsteinPrice(i / n * 4 - 2, 1 - j / m * 3); - } -} - -function goldsteinPrice(x, y) { - return (1 + Math.pow(x + y + 1, 2) * (19 - 14 * x + 3 * x * x - 14 * y + 6 * x * x + 3 * y * y)) - * (30 + Math.pow(2 * x - 3 * y, 2) * (18 - 32 * x + 12 * x * x + 48 * y - 36 * x * y + 27 * y * y)); -} -``` - -The returned geometry objects are typically passed to [d3.geoPath](https://github.com/d3/d3-geo/blob/master/README.md#geoPath) to display, using null or [d3.geoIdentity](https://github.com/d3/d3-geo/blob/master/README.md#geoIdentity) as the associated projection. - -<a name="contours_contour" href="#contours_contour">#</a> <i>contours</i>.<b>contour</b>(<i>values</i>, <i>threshold</i>) [<>](https://github.com/d3/d3-contour/blob/master/src/contours.js "Source") - -Computes a single contour, returning a [GeoJSON](http://geojson.org/geojson-spec.html) [MultiPolygon](http://geojson.org/geojson-spec.html#multipolygon) [geometry object](http://geojson.org/geojson-spec.html#geometry-objects) representing the area where the input <i>values</i> are greater than or equal to the given [*threshold* value](#contours_thresholds); the threshold value for each geometry object is exposed as <i>geometry</i>.value. - -The input *values* must be an array of length <i>n</i>×<i>m</i> where [<i>n</i>, <i>m</i>] is the contour generator’s [size](#contours_size); furthermore, each <i>values</i>[<i>i</i> + <i>jn</i>] must represent the value at the position ⟨<i>i</i>, <i>j</i>⟩. See [*contours*](#_contours) for an example. - -<a name="contours_size" href="#contours_size">#</a> <i>contours</i>.<b>size</b>([<i>size</i>]) [<>](https://github.com/d3/d3-contour/blob/master/src/contours.js "Source") - -If *size* is specified, sets the expected size of the input *values* grid to the [contour generator](#_contour) and returns the contour generator. The *size* is specified as an array \[<i>n</i>, <i>m</i>\] where <i>n</i> is the number of columns in the grid and <i>m</i> is the number of rows; *n* and *m* must be positive integers. If *size* is not specified, returns the current size which defaults to [1, 1]. - -<a name="contours_smooth" href="#contours_smooth">#</a> <i>contours</i>.<b>smooth</b>([<i>smooth</i>]) [<>](https://github.com/d3/d3-contour/blob/master/src/contours.js "Source") - -If *smooth* is specified, sets whether or not the generated contour polygons are smoothed using linear interpolation. If *smooth* is not specified, returns the current smoothing flag, which defaults to true. - -<a name="contours_thresholds" href="#contours_thresholds">#</a> <i>contours</i>.<b>thresholds</b>([<i>thresholds</i>]) [<>](https://github.com/d3/d3-contour/blob/master/src/contours.js "Source") - -If *thresholds* is specified, sets the threshold generator to the specified function or array and returns this contour generator. If *thresholds* is not specified, returns the current threshold generator, which by default implements [Sturges’ formula](https://github.com/d3/d3-array/blob/master/README.md#thresholdSturges). - -Thresholds are defined as an array of values [*x0*, *x1*, …]. The first [generated contour](#_contour) corresponds to the area where the input values are greater than or equal to *x0*; the second contour corresponds to the area where the input values are greater than or equal to *x1*, and so on. Thus, there is exactly one generated MultiPolygon geometry object for each specified threshold value; the threshold value is exposed as <i>geometry</i>.value. - -If a *count* is specified instead of an array of *thresholds*, then the input values’ [extent](https://github.com/d3/d3-array/blob/master/README.md#extent) will be uniformly divided into approximately *count* bins; see [d3.ticks](https://github.com/d3/d3-array/blob/master/README.md#ticks). - -## Density Estimation - -<a name="contourDensity" href="#contourDensity">#</a> d3.<b>contourDensity</b>() [<>](https://github.com/d3/d3-contour/blob/master/src/density.js "Source") - -Constructs a new density estimator with the default settings. - -<a name="_density" href="#_density">#</a> <i>density</i>(<i>data</i>) [<>](https://github.com/d3/d3-contour/blob/master/src/density.js "Source") - -Estimates the density contours for the given array of *data*, returning an array of [GeoJSON](http://geojson.org/geojson-spec.html) [MultiPolygon](http://geojson.org/geojson-spec.html#multipolygon) [geometry objects](http://geojson.org/geojson-spec.html#geometry-objects). Each geometry object represents the area where the estimated number of points per square pixel is greater than or equal to the corresponding [threshold value](#density_thresholds); the threshold value for each geometry object is exposed as <i>geometry</i>.value. The returned geometry objects are typically passed to [d3.geoPath](https://github.com/d3/d3-geo/blob/master/README.md#geoPath) to display, using null or [d3.geoIdentity](https://github.com/d3/d3-geo/blob/master/README.md#geoIdentity) as the associated projection. See also [d3.contours](#contours). - -The *x*- and *y*-coordinate for each data point are computed using [*density*.x](#density_x) and [*density*.y](#density_y). In addition, [*density*.weight](#density_weight) indicates the relative contribution of each data point (default 1). The generated contours are only accurate within the estimator’s [defined size](#density_size). - -<a name="density_x" href="#density_x">#</a> <i>density</i>.<b>x</b>([<i>x</i>]) [<>](https://github.com/d3/d3-contour/blob/master/src/density.js "Source") - -If *x* is specified, sets the *x*-coordinate accessor. If *x* is not specified, returns the current *x*-coordinate accessor, which defaults to: - -```js -function x(d) { - return d[0]; -} -``` - -<a name="density_y" href="#density_y">#</a> <i>density</i>.<b>y</b>([<i>y</i>]) [<>](https://github.com/d3/d3-contour/blob/master/src/density.js "Source") - -If *y* is specified, sets the *y*-coordinate accessor. If *y* is not specified, returns the current *y*-coordinate accessor, which defaults to: - -```js -function y(d) { - return d[1]; -} -``` - -<a name="density_weight" href="#density_weight">#</a> <i>density</i>.<b>weight</b>([<i>weight</i>]) [<>](https://github.com/d3/d3-contour/blob/master/src/density.js "Source") - -If *weight* is specified, sets the accessor for point weights. If *weight* is not specified, returns the current point weight accessor, which defaults to: - -```js -function weight() { - return 1; -} -``` - -<a name="density_size" href="#density_size">#</a> <i>density</i>.<b>size</b>([<i>size</i>]) [<>](https://github.com/d3/d3-contour/blob/master/src/density.js "Source") - -If *size* is specified, sets the size of the density estimator to the specified bounds and returns the estimator. The *size* is specified as an array \[<i>width</i>, <i>height</i>\], where <i>width</i> is the maximum *x*-value and <i>height</i> is the maximum *y*-value. If *size* is not specified, returns the current size which defaults to [960, 500]. The [estimated density contours](#_density) are only accurate within the defined size. - -<a name="density_cellSize" href="#density_cellSize">#</a> <i>density</i>.<b>cellSize</b>([<i>cellSize</i>]) [<>](https://github.com/d3/d3-contour/blob/master/src/density.js "Source") - -If *cellSize* is specified, sets the size of individual cells in the underlying bin grid to the specified positive integer and returns the estimator. If *cellSize* is not specified, returns the current cell size, which defaults to 4. The cell size is rounded down to the nearest power of two. Smaller cells produce more detailed contour polygons, but are more expensive to compute. - -<a name="density_thresholds" href="#density_thresholds">#</a> <i>density</i>.<b>thresholds</b>([<i>thresholds</i>]) [<>](https://github.com/d3/d3-contour/blob/master/src/density.js "Source") - -If *thresholds* is specified, sets the threshold generator to the specified function or array and returns this contour generator. If *thresholds* is not specified, returns the current threshold generator, which by default generates about twenty nicely-rounded density thresholds. - -Thresholds are defined as an array of values [*x0*, *x1*, …]. The first [generated density contour](#_density) corresponds to the area where the estimated density is greater than or equal to *x0*; the second contour corresponds to the area where the estimated density is greater than or equal to *x1*, and so on. Thus, there is exactly one generated MultiPolygon geometry object for each specified threshold value; the threshold value is exposed as <i>geometry</i>.value. The first value *x0* should typically be greater than zero. - -If a *count* is specified instead of an array of *thresholds*, then approximately *count* uniformly-spaced nicely-rounded thresholds will be generated; see [d3.ticks](https://github.com/d3/d3-array/blob/master/README.md#ticks). - -<a name="density_bandwidth" href="#density_bandwidth">#</a> <i>density</i>.<b>bandwidth</b>([<i>bandwidth</i>]) [<>](https://github.com/d3/d3-contour/blob/master/src/density.js "Source") - -If *bandwidth* is specified, sets the bandwidth (the standard deviation) of the Gaussian kernel and returns the estimate. If *bandwidth* is not specified, returns the current bandwidth, which defaults to 20.4939…. The specified *bandwidth* is currently rounded to the nearest supported value by this implementation, and must be nonnegative. diff --git a/node_modules/d3-contour/dist/d3-contour.js b/node_modules/d3-contour/dist/d3-contour.js deleted file mode 100644 index 0903808e1b2880d3d2049d0aa0d6b6f2cb1392a3..0000000000000000000000000000000000000000 --- a/node_modules/d3-contour/dist/d3-contour.js +++ /dev/null @@ -1,427 +0,0 @@ -// https://d3js.org/d3-contour/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-array')) : -typeof define === 'function' && define.amd ? define(['exports', 'd3-array'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {}, global.d3)); -}(this, function (exports, d3Array) { 'use strict'; - -var array = Array.prototype; - -var slice = array.slice; - -function ascending(a, b) { - return a - b; -} - -function area(ring) { - var i = 0, n = ring.length, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1]; - while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1]; - return area; -} - -var constant = x => () => x; - -function contains(ring, hole) { - var i = -1, n = hole.length, c; - while (++i < n) if (c = ringContains(ring, hole[i])) return c; - return 0; -} - -function ringContains(ring, point) { - var x = point[0], y = point[1], contains = -1; - for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) { - var pi = ring[i], xi = pi[0], yi = pi[1], pj = ring[j], xj = pj[0], yj = pj[1]; - if (segmentContains(pi, pj, point)) return 0; - if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) contains = -contains; - } - return contains; -} - -function segmentContains(a, b, c) { - var i; return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]); -} - -function collinear(a, b, c) { - return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]); -} - -function within(p, q, r) { - return p <= q && q <= r || r <= q && q <= p; -} - -function noop() {} - -var cases = [ - [], - [[[1.0, 1.5], [0.5, 1.0]]], - [[[1.5, 1.0], [1.0, 1.5]]], - [[[1.5, 1.0], [0.5, 1.0]]], - [[[1.0, 0.5], [1.5, 1.0]]], - [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]], - [[[1.0, 0.5], [1.0, 1.5]]], - [[[1.0, 0.5], [0.5, 1.0]]], - [[[0.5, 1.0], [1.0, 0.5]]], - [[[1.0, 1.5], [1.0, 0.5]]], - [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]], - [[[1.5, 1.0], [1.0, 0.5]]], - [[[0.5, 1.0], [1.5, 1.0]]], - [[[1.0, 1.5], [1.5, 1.0]]], - [[[0.5, 1.0], [1.0, 1.5]]], - [] -]; - -function contours() { - var dx = 1, - dy = 1, - threshold = d3Array.thresholdSturges, - smooth = smoothLinear; - - function contours(values) { - var tz = threshold(values); - - // Convert number of thresholds into uniform thresholds. - if (!Array.isArray(tz)) { - var domain = d3Array.extent(values), start = domain[0], stop = domain[1]; - tz = d3Array.tickStep(start, stop, tz); - tz = d3Array.range(Math.floor(start / tz) * tz, Math.floor(stop / tz) * tz, tz); - } else { - tz = tz.slice().sort(ascending); - } - - return tz.map(function(value) { - return contour(values, value); - }); - } - - // Accumulate, smooth contour rings, assign holes to exterior rings. - // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js - function contour(values, value) { - var polygons = [], - holes = []; - - isorings(values, value, function(ring) { - smooth(ring, values, value); - if (area(ring) > 0) polygons.push([ring]); - else holes.push(ring); - }); - - holes.forEach(function(hole) { - for (var i = 0, n = polygons.length, polygon; i < n; ++i) { - if (contains((polygon = polygons[i])[0], hole) !== -1) { - polygon.push(hole); - return; - } - } - }); - - return { - type: "MultiPolygon", - value: value, - coordinates: polygons - }; - } - - // Marching squares with isolines stitched into rings. - // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js - function isorings(values, value, callback) { - var fragmentByStart = new Array, - fragmentByEnd = new Array, - x, y, t0, t1, t2, t3; - - // Special case for the first row (y = -1, t2 = t3 = 0). - x = y = -1; - t1 = values[0] >= value; - cases[t1 << 1].forEach(stitch); - while (++x < dx - 1) { - t0 = t1, t1 = values[x + 1] >= value; - cases[t0 | t1 << 1].forEach(stitch); - } - cases[t1 << 0].forEach(stitch); - - // General case for the intermediate rows. - while (++y < dy - 1) { - x = -1; - t1 = values[y * dx + dx] >= value; - t2 = values[y * dx] >= value; - cases[t1 << 1 | t2 << 2].forEach(stitch); - while (++x < dx - 1) { - t0 = t1, t1 = values[y * dx + dx + x + 1] >= value; - t3 = t2, t2 = values[y * dx + x + 1] >= value; - cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch); - } - cases[t1 | t2 << 3].forEach(stitch); - } - - // Special case for the last row (y = dy - 1, t0 = t1 = 0). - x = -1; - t2 = values[y * dx] >= value; - cases[t2 << 2].forEach(stitch); - while (++x < dx - 1) { - t3 = t2, t2 = values[y * dx + x + 1] >= value; - cases[t2 << 2 | t3 << 3].forEach(stitch); - } - cases[t2 << 3].forEach(stitch); - - function stitch(line) { - var start = [line[0][0] + x, line[0][1] + y], - end = [line[1][0] + x, line[1][1] + y], - startIndex = index(start), - endIndex = index(end), - f, g; - if (f = fragmentByEnd[startIndex]) { - if (g = fragmentByStart[endIndex]) { - delete fragmentByEnd[f.end]; - delete fragmentByStart[g.start]; - if (f === g) { - f.ring.push(end); - callback(f.ring); - } else { - fragmentByStart[f.start] = fragmentByEnd[g.end] = {start: f.start, end: g.end, ring: f.ring.concat(g.ring)}; - } - } else { - delete fragmentByEnd[f.end]; - f.ring.push(end); - fragmentByEnd[f.end = endIndex] = f; - } - } else if (f = fragmentByStart[endIndex]) { - if (g = fragmentByEnd[startIndex]) { - delete fragmentByStart[f.start]; - delete fragmentByEnd[g.end]; - if (f === g) { - f.ring.push(end); - callback(f.ring); - } else { - fragmentByStart[g.start] = fragmentByEnd[f.end] = {start: g.start, end: f.end, ring: g.ring.concat(f.ring)}; - } - } else { - delete fragmentByStart[f.start]; - f.ring.unshift(start); - fragmentByStart[f.start = startIndex] = f; - } - } else { - fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {start: startIndex, end: endIndex, ring: [start, end]}; - } - } - } - - function index(point) { - return point[0] * 2 + point[1] * (dx + 1) * 4; - } - - function smoothLinear(ring, values, value) { - ring.forEach(function(point) { - var x = point[0], - y = point[1], - xt = x | 0, - yt = y | 0, - v0, - v1 = values[yt * dx + xt]; - if (x > 0 && x < dx && xt === x) { - v0 = values[yt * dx + xt - 1]; - point[0] = x + (value - v0) / (v1 - v0) - 0.5; - } - if (y > 0 && y < dy && yt === y) { - v0 = values[(yt - 1) * dx + xt]; - point[1] = y + (value - v0) / (v1 - v0) - 0.5; - } - }); - } - - contours.contour = contour; - - contours.size = function(_) { - if (!arguments.length) return [dx, dy]; - var _0 = Math.floor(_[0]), _1 = Math.floor(_[1]); - if (!(_0 >= 0 && _1 >= 0)) throw new Error("invalid size"); - return dx = _0, dy = _1, contours; - }; - - contours.thresholds = function(_) { - return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), contours) : threshold; - }; - - contours.smooth = function(_) { - return arguments.length ? (smooth = _ ? smoothLinear : noop, contours) : smooth === smoothLinear; - }; - - return contours; -} - -// TODO Optimize edge cases. -// TODO Optimize index calculation. -// TODO Optimize arguments. -function blurX(source, target, r) { - var n = source.width, - m = source.height, - w = (r << 1) + 1; - for (var j = 0; j < m; ++j) { - for (var i = 0, sr = 0; i < n + r; ++i) { - if (i < n) { - sr += source.data[i + j * n]; - } - if (i >= r) { - if (i >= w) { - sr -= source.data[i - w + j * n]; - } - target.data[i - r + j * n] = sr / Math.min(i + 1, n - 1 + w - i, w); - } - } - } -} - -// TODO Optimize edge cases. -// TODO Optimize index calculation. -// TODO Optimize arguments. -function blurY(source, target, r) { - var n = source.width, - m = source.height, - w = (r << 1) + 1; - for (var i = 0; i < n; ++i) { - for (var j = 0, sr = 0; j < m + r; ++j) { - if (j < m) { - sr += source.data[i + j * n]; - } - if (j >= r) { - if (j >= w) { - sr -= source.data[i + (j - w) * n]; - } - target.data[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w); - } - } - } -} - -function defaultX(d) { - return d[0]; -} - -function defaultY(d) { - return d[1]; -} - -function defaultWeight() { - return 1; -} - -function density() { - var x = defaultX, - y = defaultY, - weight = defaultWeight, - dx = 960, - dy = 500, - r = 20, // blur radius - k = 2, // log2(grid cell size) - o = r * 3, // grid offset, to pad for blur - n = (dx + o * 2) >> k, // grid width - m = (dy + o * 2) >> k, // grid height - threshold = constant(20); - - function density(data) { - var values0 = new Float32Array(n * m), - values1 = new Float32Array(n * m); - - data.forEach(function(d, i, data) { - var xi = (+x(d, i, data) + o) >> k, - yi = (+y(d, i, data) + o) >> k, - wi = +weight(d, i, data); - if (xi >= 0 && xi < n && yi >= 0 && yi < m) { - values0[xi + yi * n] += wi; - } - }); - - // TODO Optimize. - blurX({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); - blurY({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); - blurX({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); - blurY({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); - blurX({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); - blurY({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); - - var tz = threshold(values0); - - // Convert number of thresholds into uniform thresholds. - if (!Array.isArray(tz)) { - var stop = d3Array.max(values0); - tz = d3Array.tickStep(0, stop, tz); - tz = d3Array.range(0, Math.floor(stop / tz) * tz, tz); - tz.shift(); - } - - return contours() - .thresholds(tz) - .size([n, m]) - (values0) - .map(transform); - } - - function transform(geometry) { - geometry.value *= Math.pow(2, -2 * k); // Density in points per square pixel. - geometry.coordinates.forEach(transformPolygon); - return geometry; - } - - function transformPolygon(coordinates) { - coordinates.forEach(transformRing); - } - - function transformRing(coordinates) { - coordinates.forEach(transformPoint); - } - - // TODO Optimize. - function transformPoint(coordinates) { - coordinates[0] = coordinates[0] * Math.pow(2, k) - o; - coordinates[1] = coordinates[1] * Math.pow(2, k) - o; - } - - function resize() { - o = r * 3; - n = (dx + o * 2) >> k; - m = (dy + o * 2) >> k; - return density; - } - - density.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : constant(+_), density) : x; - }; - - density.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : constant(+_), density) : y; - }; - - density.weight = function(_) { - return arguments.length ? (weight = typeof _ === "function" ? _ : constant(+_), density) : weight; - }; - - density.size = function(_) { - if (!arguments.length) return [dx, dy]; - var _0 = +_[0], _1 = +_[1]; - if (!(_0 >= 0 && _1 >= 0)) throw new Error("invalid size"); - return dx = _0, dy = _1, resize(); - }; - - density.cellSize = function(_) { - if (!arguments.length) return 1 << k; - if (!((_ = +_) >= 1)) throw new Error("invalid cell size"); - return k = Math.floor(Math.log(_) / Math.LN2), resize(); - }; - - density.thresholds = function(_) { - return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), density) : threshold; - }; - - density.bandwidth = function(_) { - if (!arguments.length) return Math.sqrt(r * (r + 1)); - if (!((_ = +_) >= 0)) throw new Error("invalid bandwidth"); - return r = Math.round((Math.sqrt(4 * _ * _ + 1) - 1) / 2), resize(); - }; - - return density; -} - -exports.contourDensity = density; -exports.contours = contours; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-contour/dist/d3-contour.min.js b/node_modules/d3-contour/dist/d3-contour.min.js deleted file mode 100644 index 53abde598056d9b228cc8ff7e9aac2c0650bcfab..0000000000000000000000000000000000000000 --- a/node_modules/d3-contour/dist/d3-contour.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-contour/ v2.0.0 Copyright 2020 Mike Bostock -!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("d3-array")):"function"==typeof define&&define.amd?define(["exports","d3-array"],r):r((t=t||self).d3=t.d3||{},t.d3)}(this,function(t,r){"use strict";var n=Array.prototype.slice;function e(t,r){return t-r}var i=t=>()=>t;function a(t,r){for(var n,e=-1,i=r.length;++e<i;)if(n=o(t,r[e]))return n;return 0}function o(t,r){for(var n=r[0],e=r[1],i=-1,a=0,o=t.length,f=o-1;a<o;f=a++){var u=t[a],c=u[0],d=u[1],l=t[f],s=l[0],g=l[1];if(h(u,l,r))return 0;d>e!=g>e&&n<(s-c)*(e-d)/(g-d)+c&&(i=-i)}return i}function h(t,r,n){var e,i,a,o;return function(t,r,n){return(r[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(r[1]-t[1])}(t,r,n)&&(i=t[e=+(t[0]===r[0])],a=n[e],o=r[e],i<=a&&a<=o||o<=a&&a<=i)}function f(){}var u=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function c(){var t=1,o=1,h=r.thresholdSturges,c=g;function d(t){var n=h(t);if(Array.isArray(n))n=n.slice().sort(e);else{var i=r.extent(t),a=i[0],o=i[1];n=r.tickStep(a,o,n),n=r.range(Math.floor(a/n)*n,Math.floor(o/n)*n,n)}return n.map(function(r){return l(t,r)})}function l(r,n){var e=[],i=[];return function(r,n,e){var i,a,h,f,c,d,l=new Array,g=new Array;i=a=-1,f=r[0]>=n,u[f<<1].forEach(v);for(;++i<t-1;)h=f,f=r[i+1]>=n,u[h|f<<1].forEach(v);u[f<<0].forEach(v);for(;++a<o-1;){for(i=-1,f=r[a*t+t]>=n,c=r[a*t]>=n,u[f<<1|c<<2].forEach(v);++i<t-1;)h=f,f=r[a*t+t+i+1]>=n,d=c,c=r[a*t+i+1]>=n,u[h|f<<1|c<<2|d<<3].forEach(v);u[f|c<<3].forEach(v)}i=-1,c=r[a*t]>=n,u[c<<2].forEach(v);for(;++i<t-1;)d=c,c=r[a*t+i+1]>=n,u[c<<2|d<<3].forEach(v);function v(t){var r,n,o=[t[0][0]+i,t[0][1]+a],h=[t[1][0]+i,t[1][1]+a],f=s(o),u=s(h);(r=g[f])?(n=l[u])?(delete g[r.end],delete l[n.start],r===n?(r.ring.push(h),e(r.ring)):l[r.start]=g[n.end]={start:r.start,end:n.end,ring:r.ring.concat(n.ring)}):(delete g[r.end],r.ring.push(h),g[r.end=u]=r):(r=l[u])?(n=g[f])?(delete l[r.start],delete g[n.end],r===n?(r.ring.push(h),e(r.ring)):l[n.start]=g[r.end]={start:n.start,end:r.end,ring:n.ring.concat(r.ring)}):(delete l[r.start],r.ring.unshift(o),l[r.start=f]=r):l[f]=g[u]={start:f,end:u,ring:[o,h]}}u[c<<3].forEach(v)}(r,n,function(t){c(t,r,n),function(t){for(var r=0,n=t.length,e=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++r<n;)e+=t[r-1][1]*t[r][0]-t[r-1][0]*t[r][1];return e}(t)>0?e.push([t]):i.push(t)}),i.forEach(function(t){for(var r,n=0,i=e.length;n<i;++n)if(-1!==a((r=e[n])[0],t))return void r.push(t)}),{type:"MultiPolygon",value:n,coordinates:e}}function s(r){return 2*r[0]+r[1]*(t+1)*4}function g(r,n,e){r.forEach(function(r){var i,a=r[0],h=r[1],f=0|a,u=0|h,c=n[u*t+f];a>0&&a<t&&f===a&&(i=n[u*t+f-1],r[0]=a+(e-i)/(c-i)-.5),h>0&&h<o&&u===h&&(i=n[(u-1)*t+f],r[1]=h+(e-i)/(c-i)-.5)})}return d.contour=l,d.size=function(r){if(!arguments.length)return[t,o];var n=Math.floor(r[0]),e=Math.floor(r[1]);if(!(n>=0&&e>=0))throw new Error("invalid size");return t=n,o=e,d},d.thresholds=function(t){return arguments.length?(h="function"==typeof t?t:Array.isArray(t)?i(n.call(t)):i(t),d):h},d.smooth=function(t){return arguments.length?(c=t?g:f,d):c===g},d}function d(t,r,n){for(var e=t.width,i=t.height,a=1+(n<<1),o=0;o<i;++o)for(var h=0,f=0;h<e+n;++h)h<e&&(f+=t.data[h+o*e]),h>=n&&(h>=a&&(f-=t.data[h-a+o*e]),r.data[h-n+o*e]=f/Math.min(h+1,e-1+a-h,a))}function l(t,r,n){for(var e=t.width,i=t.height,a=1+(n<<1),o=0;o<e;++o)for(var h=0,f=0;h<i+n;++h)h<i&&(f+=t.data[o+h*e]),h>=n&&(h>=a&&(f-=t.data[o+(h-a)*e]),r.data[o+(h-n)*e]=f/Math.min(h+1,i-1+a-h,a))}function s(t){return t[0]}function g(t){return t[1]}function v(){return 1}t.contourDensity=function(){var t=s,e=g,a=v,o=960,h=500,f=20,u=2,w=3*f,y=o+2*w>>u,p=h+2*w>>u,E=i(20);function M(n){var i=new Float32Array(y*p),o=new Float32Array(y*p);n.forEach(function(r,n,o){var h=+t(r,n,o)+w>>u,f=+e(r,n,o)+w>>u,c=+a(r,n,o);h>=0&&h<y&&f>=0&&f<p&&(i[h+f*y]+=c)}),d({width:y,height:p,data:i},{width:y,height:p,data:o},f>>u),l({width:y,height:p,data:o},{width:y,height:p,data:i},f>>u),d({width:y,height:p,data:i},{width:y,height:p,data:o},f>>u),l({width:y,height:p,data:o},{width:y,height:p,data:i},f>>u),d({width:y,height:p,data:i},{width:y,height:p,data:o},f>>u),l({width:y,height:p,data:o},{width:y,height:p,data:i},f>>u);var h=E(i);if(!Array.isArray(h)){var s=r.max(i);h=r.tickStep(0,s,h),(h=r.range(0,Math.floor(s/h)*h,h)).shift()}return c().thresholds(h).size([y,p])(i).map(A)}function A(t){return t.value*=Math.pow(2,-2*u),t.coordinates.forEach(m),t}function m(t){t.forEach(z)}function z(t){t.forEach(x)}function x(t){t[0]=t[0]*Math.pow(2,u)-w,t[1]=t[1]*Math.pow(2,u)-w}function b(){return y=o+2*(w=3*f)>>u,p=h+2*w>>u,M}return M.x=function(r){return arguments.length?(t="function"==typeof r?r:i(+r),M):t},M.y=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),M):e},M.weight=function(t){return arguments.length?(a="function"==typeof t?t:i(+t),M):a},M.size=function(t){if(!arguments.length)return[o,h];var r=+t[0],n=+t[1];if(!(r>=0&&n>=0))throw new Error("invalid size");return o=r,h=n,b()},M.cellSize=function(t){if(!arguments.length)return 1<<u;if(!((t=+t)>=1))throw new Error("invalid cell size");return u=Math.floor(Math.log(t)/Math.LN2),b()},M.thresholds=function(t){return arguments.length?(E="function"==typeof t?t:Array.isArray(t)?i(n.call(t)):i(t),M):E},M.bandwidth=function(t){if(!arguments.length)return Math.sqrt(f*(f+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return f=Math.round((Math.sqrt(4*t*t+1)-1)/2),b()},M},t.contours=c,Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/node_modules/d3-contour/package.json b/node_modules/d3-contour/package.json deleted file mode 100644 index d7db6a1701c20dc86f962238eb512fd13657e3e4..0000000000000000000000000000000000000000 --- a/node_modules/d3-contour/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_from": "d3-contour@2", - "_id": "d3-contour@2.0.0", - "_inBundle": false, - "_integrity": "sha512-9unAtvIaNk06UwqBmvsdHX7CZ+NPDZnn8TtNH1myW93pWJkhsV25JcgnYAu0Ck5Veb1DHiCv++Ic5uvJ+h50JA==", - "_location": "/d3-contour", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-contour@2", - "name": "d3-contour", - "escapedName": "d3-contour", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3" - ], - "_resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-2.0.0.tgz", - "_shasum": "80ee834988563e3bea9d99ddde72c0f8c089ea40", - "_spec": "d3-contour@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-contour/issues" - }, - "bundleDependencies": false, - "dependencies": { - "d3-array": "2" - }, - "deprecated": false, - "description": "Compute contour polygons using marching squares.", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-contour/", - "jsdelivr": "dist/d3-contour.min.js", - "keywords": [ - "d3", - "d3-module", - "contour", - "isoline" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-contour.js", - "module": "src/index.js", - "name": "d3-contour", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-contour.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src" - }, - "sideEffects": false, - "unpkg": "dist/d3-contour.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-contour/src/area.js b/node_modules/d3-contour/src/area.js deleted file mode 100644 index 2157a7efc0315c7856556420dae502960e2883a8..0000000000000000000000000000000000000000 --- a/node_modules/d3-contour/src/area.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(ring) { - var i = 0, n = ring.length, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1]; - while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1]; - return area; -} diff --git a/node_modules/d3-contour/src/array.js b/node_modules/d3-contour/src/array.js deleted file mode 100644 index d2361352433e0bf183766f6c66d398891208e13d..0000000000000000000000000000000000000000 --- a/node_modules/d3-contour/src/array.js +++ /dev/null @@ -1,3 +0,0 @@ -var array = Array.prototype; - -export var slice = array.slice; diff --git a/node_modules/d3-contour/src/ascending.js b/node_modules/d3-contour/src/ascending.js deleted file mode 100644 index 8939af70dc3f84e032d5d37adfda27ba9d1427a1..0000000000000000000000000000000000000000 --- a/node_modules/d3-contour/src/ascending.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(a, b) { - return a - b; -} diff --git a/node_modules/d3-contour/src/blur.js b/node_modules/d3-contour/src/blur.js deleted file mode 100644 index 0edfb3ef4947286de349a77e989260180805a12d..0000000000000000000000000000000000000000 --- a/node_modules/d3-contour/src/blur.js +++ /dev/null @@ -1,43 +0,0 @@ -// TODO Optimize edge cases. -// TODO Optimize index calculation. -// TODO Optimize arguments. -export function blurX(source, target, r) { - var n = source.width, - m = source.height, - w = (r << 1) + 1; - for (var j = 0; j < m; ++j) { - for (var i = 0, sr = 0; i < n + r; ++i) { - if (i < n) { - sr += source.data[i + j * n]; - } - if (i >= r) { - if (i >= w) { - sr -= source.data[i - w + j * n]; - } - target.data[i - r + j * n] = sr / Math.min(i + 1, n - 1 + w - i, w); - } - } - } -} - -// TODO Optimize edge cases. -// TODO Optimize index calculation. -// TODO Optimize arguments. -export function blurY(source, target, r) { - var n = source.width, - m = source.height, - w = (r << 1) + 1; - for (var i = 0; i < n; ++i) { - for (var j = 0, sr = 0; j < m + r; ++j) { - if (j < m) { - sr += source.data[i + j * n]; - } - if (j >= r) { - if (j >= w) { - sr -= source.data[i + (j - w) * n]; - } - target.data[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w); - } - } - } -} diff --git a/node_modules/d3-contour/src/constant.js b/node_modules/d3-contour/src/constant.js deleted file mode 100644 index 3487c0ddfaabca50218341abd733df08493b568c..0000000000000000000000000000000000000000 --- a/node_modules/d3-contour/src/constant.js +++ /dev/null @@ -1 +0,0 @@ -export default x => () => x; diff --git a/node_modules/d3-contour/src/contains.js b/node_modules/d3-contour/src/contains.js deleted file mode 100644 index f364b354459966a950954c4adacdb5b78f35ec4a..0000000000000000000000000000000000000000 --- a/node_modules/d3-contour/src/contains.js +++ /dev/null @@ -1,27 +0,0 @@ -export default function(ring, hole) { - var i = -1, n = hole.length, c; - while (++i < n) if (c = ringContains(ring, hole[i])) return c; - return 0; -} - -function ringContains(ring, point) { - var x = point[0], y = point[1], contains = -1; - for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) { - var pi = ring[i], xi = pi[0], yi = pi[1], pj = ring[j], xj = pj[0], yj = pj[1]; - if (segmentContains(pi, pj, point)) return 0; - if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) contains = -contains; - } - return contains; -} - -function segmentContains(a, b, c) { - var i; return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]); -} - -function collinear(a, b, c) { - return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]); -} - -function within(p, q, r) { - return p <= q && q <= r || r <= q && q <= p; -} diff --git a/node_modules/d3-contour/src/contours.js b/node_modules/d3-contour/src/contours.js deleted file mode 100644 index 614e9ecfcfbb137ef5ebcb970510109c95c2b599..0000000000000000000000000000000000000000 --- a/node_modules/d3-contour/src/contours.js +++ /dev/null @@ -1,203 +0,0 @@ -import {extent, thresholdSturges, tickStep, range} from "d3-array"; -import {slice} from "./array.js"; -import ascending from "./ascending.js"; -import area from "./area.js"; -import constant from "./constant.js"; -import contains from "./contains.js"; -import noop from "./noop.js"; - -var cases = [ - [], - [[[1.0, 1.5], [0.5, 1.0]]], - [[[1.5, 1.0], [1.0, 1.5]]], - [[[1.5, 1.0], [0.5, 1.0]]], - [[[1.0, 0.5], [1.5, 1.0]]], - [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]], - [[[1.0, 0.5], [1.0, 1.5]]], - [[[1.0, 0.5], [0.5, 1.0]]], - [[[0.5, 1.0], [1.0, 0.5]]], - [[[1.0, 1.5], [1.0, 0.5]]], - [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]], - [[[1.5, 1.0], [1.0, 0.5]]], - [[[0.5, 1.0], [1.5, 1.0]]], - [[[1.0, 1.5], [1.5, 1.0]]], - [[[0.5, 1.0], [1.0, 1.5]]], - [] -]; - -export default function() { - var dx = 1, - dy = 1, - threshold = thresholdSturges, - smooth = smoothLinear; - - function contours(values) { - var tz = threshold(values); - - // Convert number of thresholds into uniform thresholds. - if (!Array.isArray(tz)) { - var domain = extent(values), start = domain[0], stop = domain[1]; - tz = tickStep(start, stop, tz); - tz = range(Math.floor(start / tz) * tz, Math.floor(stop / tz) * tz, tz); - } else { - tz = tz.slice().sort(ascending); - } - - return tz.map(function(value) { - return contour(values, value); - }); - } - - // Accumulate, smooth contour rings, assign holes to exterior rings. - // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js - function contour(values, value) { - var polygons = [], - holes = []; - - isorings(values, value, function(ring) { - smooth(ring, values, value); - if (area(ring) > 0) polygons.push([ring]); - else holes.push(ring); - }); - - holes.forEach(function(hole) { - for (var i = 0, n = polygons.length, polygon; i < n; ++i) { - if (contains((polygon = polygons[i])[0], hole) !== -1) { - polygon.push(hole); - return; - } - } - }); - - return { - type: "MultiPolygon", - value: value, - coordinates: polygons - }; - } - - // Marching squares with isolines stitched into rings. - // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js - function isorings(values, value, callback) { - var fragmentByStart = new Array, - fragmentByEnd = new Array, - x, y, t0, t1, t2, t3; - - // Special case for the first row (y = -1, t2 = t3 = 0). - x = y = -1; - t1 = values[0] >= value; - cases[t1 << 1].forEach(stitch); - while (++x < dx - 1) { - t0 = t1, t1 = values[x + 1] >= value; - cases[t0 | t1 << 1].forEach(stitch); - } - cases[t1 << 0].forEach(stitch); - - // General case for the intermediate rows. - while (++y < dy - 1) { - x = -1; - t1 = values[y * dx + dx] >= value; - t2 = values[y * dx] >= value; - cases[t1 << 1 | t2 << 2].forEach(stitch); - while (++x < dx - 1) { - t0 = t1, t1 = values[y * dx + dx + x + 1] >= value; - t3 = t2, t2 = values[y * dx + x + 1] >= value; - cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch); - } - cases[t1 | t2 << 3].forEach(stitch); - } - - // Special case for the last row (y = dy - 1, t0 = t1 = 0). - x = -1; - t2 = values[y * dx] >= value; - cases[t2 << 2].forEach(stitch); - while (++x < dx - 1) { - t3 = t2, t2 = values[y * dx + x + 1] >= value; - cases[t2 << 2 | t3 << 3].forEach(stitch); - } - cases[t2 << 3].forEach(stitch); - - function stitch(line) { - var start = [line[0][0] + x, line[0][1] + y], - end = [line[1][0] + x, line[1][1] + y], - startIndex = index(start), - endIndex = index(end), - f, g; - if (f = fragmentByEnd[startIndex]) { - if (g = fragmentByStart[endIndex]) { - delete fragmentByEnd[f.end]; - delete fragmentByStart[g.start]; - if (f === g) { - f.ring.push(end); - callback(f.ring); - } else { - fragmentByStart[f.start] = fragmentByEnd[g.end] = {start: f.start, end: g.end, ring: f.ring.concat(g.ring)}; - } - } else { - delete fragmentByEnd[f.end]; - f.ring.push(end); - fragmentByEnd[f.end = endIndex] = f; - } - } else if (f = fragmentByStart[endIndex]) { - if (g = fragmentByEnd[startIndex]) { - delete fragmentByStart[f.start]; - delete fragmentByEnd[g.end]; - if (f === g) { - f.ring.push(end); - callback(f.ring); - } else { - fragmentByStart[g.start] = fragmentByEnd[f.end] = {start: g.start, end: f.end, ring: g.ring.concat(f.ring)}; - } - } else { - delete fragmentByStart[f.start]; - f.ring.unshift(start); - fragmentByStart[f.start = startIndex] = f; - } - } else { - fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {start: startIndex, end: endIndex, ring: [start, end]}; - } - } - } - - function index(point) { - return point[0] * 2 + point[1] * (dx + 1) * 4; - } - - function smoothLinear(ring, values, value) { - ring.forEach(function(point) { - var x = point[0], - y = point[1], - xt = x | 0, - yt = y | 0, - v0, - v1 = values[yt * dx + xt]; - if (x > 0 && x < dx && xt === x) { - v0 = values[yt * dx + xt - 1]; - point[0] = x + (value - v0) / (v1 - v0) - 0.5; - } - if (y > 0 && y < dy && yt === y) { - v0 = values[(yt - 1) * dx + xt]; - point[1] = y + (value - v0) / (v1 - v0) - 0.5; - } - }); - } - - contours.contour = contour; - - contours.size = function(_) { - if (!arguments.length) return [dx, dy]; - var _0 = Math.floor(_[0]), _1 = Math.floor(_[1]); - if (!(_0 >= 0 && _1 >= 0)) throw new Error("invalid size"); - return dx = _0, dy = _1, contours; - }; - - contours.thresholds = function(_) { - return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), contours) : threshold; - }; - - contours.smooth = function(_) { - return arguments.length ? (smooth = _ ? smoothLinear : noop, contours) : smooth === smoothLinear; - }; - - return contours; -} diff --git a/node_modules/d3-contour/src/density.js b/node_modules/d3-contour/src/density.js deleted file mode 100644 index a817f0a890dca4114dafcef0b49c95221f7beedc..0000000000000000000000000000000000000000 --- a/node_modules/d3-contour/src/density.js +++ /dev/null @@ -1,133 +0,0 @@ -import {max, range, tickStep} from "d3-array"; -import {slice} from "./array.js"; -import {blurX, blurY} from "./blur.js"; -import constant from "./constant.js"; -import contours from "./contours.js"; - -function defaultX(d) { - return d[0]; -} - -function defaultY(d) { - return d[1]; -} - -function defaultWeight() { - return 1; -} - -export default function() { - var x = defaultX, - y = defaultY, - weight = defaultWeight, - dx = 960, - dy = 500, - r = 20, // blur radius - k = 2, // log2(grid cell size) - o = r * 3, // grid offset, to pad for blur - n = (dx + o * 2) >> k, // grid width - m = (dy + o * 2) >> k, // grid height - threshold = constant(20); - - function density(data) { - var values0 = new Float32Array(n * m), - values1 = new Float32Array(n * m); - - data.forEach(function(d, i, data) { - var xi = (+x(d, i, data) + o) >> k, - yi = (+y(d, i, data) + o) >> k, - wi = +weight(d, i, data); - if (xi >= 0 && xi < n && yi >= 0 && yi < m) { - values0[xi + yi * n] += wi; - } - }); - - // TODO Optimize. - blurX({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); - blurY({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); - blurX({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); - blurY({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); - blurX({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); - blurY({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); - - var tz = threshold(values0); - - // Convert number of thresholds into uniform thresholds. - if (!Array.isArray(tz)) { - var stop = max(values0); - tz = tickStep(0, stop, tz); - tz = range(0, Math.floor(stop / tz) * tz, tz); - tz.shift(); - } - - return contours() - .thresholds(tz) - .size([n, m]) - (values0) - .map(transform); - } - - function transform(geometry) { - geometry.value *= Math.pow(2, -2 * k); // Density in points per square pixel. - geometry.coordinates.forEach(transformPolygon); - return geometry; - } - - function transformPolygon(coordinates) { - coordinates.forEach(transformRing); - } - - function transformRing(coordinates) { - coordinates.forEach(transformPoint); - } - - // TODO Optimize. - function transformPoint(coordinates) { - coordinates[0] = coordinates[0] * Math.pow(2, k) - o; - coordinates[1] = coordinates[1] * Math.pow(2, k) - o; - } - - function resize() { - o = r * 3; - n = (dx + o * 2) >> k; - m = (dy + o * 2) >> k; - return density; - } - - density.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : constant(+_), density) : x; - }; - - density.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : constant(+_), density) : y; - }; - - density.weight = function(_) { - return arguments.length ? (weight = typeof _ === "function" ? _ : constant(+_), density) : weight; - }; - - density.size = function(_) { - if (!arguments.length) return [dx, dy]; - var _0 = +_[0], _1 = +_[1]; - if (!(_0 >= 0 && _1 >= 0)) throw new Error("invalid size"); - return dx = _0, dy = _1, resize(); - }; - - density.cellSize = function(_) { - if (!arguments.length) return 1 << k; - if (!((_ = +_) >= 1)) throw new Error("invalid cell size"); - return k = Math.floor(Math.log(_) / Math.LN2), resize(); - }; - - density.thresholds = function(_) { - return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), density) : threshold; - }; - - density.bandwidth = function(_) { - if (!arguments.length) return Math.sqrt(r * (r + 1)); - if (!((_ = +_) >= 0)) throw new Error("invalid bandwidth"); - return r = Math.round((Math.sqrt(4 * _ * _ + 1) - 1) / 2), resize(); - }; - - return density; -} diff --git a/node_modules/d3-contour/src/index.js b/node_modules/d3-contour/src/index.js deleted file mode 100644 index 8e6b5f0de7769338715b3bcc137d341575f81c0f..0000000000000000000000000000000000000000 --- a/node_modules/d3-contour/src/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export {default as contours} from "./contours.js"; -export {default as contourDensity} from "./density.js"; diff --git a/node_modules/d3-contour/src/noop.js b/node_modules/d3-contour/src/noop.js deleted file mode 100644 index 6ab80bc8d76f773adb2ad898b2ebf98afca9e6f0..0000000000000000000000000000000000000000 --- a/node_modules/d3-contour/src/noop.js +++ /dev/null @@ -1 +0,0 @@ -export default function() {} diff --git a/node_modules/d3-delaunay/LICENSE b/node_modules/d3-delaunay/LICENSE deleted file mode 100644 index cf16bc445987f3f9452c0eea009768e2ff88b385..0000000000000000000000000000000000000000 --- a/node_modules/d3-delaunay/LICENSE +++ /dev/null @@ -1,13 +0,0 @@ -Copyright 2018 Observable, Inc. - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. diff --git a/node_modules/d3-delaunay/README.md b/node_modules/d3-delaunay/README.md deleted file mode 100644 index baf0481286a44c19d9bbcb939432e26c96a11f8d..0000000000000000000000000000000000000000 --- a/node_modules/d3-delaunay/README.md +++ /dev/null @@ -1,201 +0,0 @@ -# d3-delaunay - -<p align="center"><img src="https://raw.githubusercontent.com/d3/d3-delaunay/master/img/voronator.jpg" width="300"> -<p align="center">Georgy “The Voronator†Voronoy - -This is a fast, no-dependency library for computing the [Voronoi diagram](https://en.wikipedia.org/wiki/Voronoi_diagram) of a set of two-dimensional points. It is based on [Delaunator](https://github.com/mapbox/delaunator), a fast library for computing the [Delaunay triangulation](https://en.wikipedia.org/wiki/Delaunay_triangulation) using [sweep algorithms](https://github.com/mapbox/delaunator/blob/master/README.md#papers). The Voronoi diagram is constructed by connecting the circumcenters of adjacent triangles in the Delaunay triangulation. - -For an interactive explanation of how this library works, see [The Delaunay’s Dual](https://observablehq.com/@mbostock/the-delaunays-dual). - -## Installing - -To install, `npm install d3-delaunay` or `yarn add d3-delaunay`. You can also download the [latest release](https://github.com/d3/d3-delaunay/releases/latest) or load directly from [unpkg](https://unpkg.com/d3-delaunay/). AMD, CommonJS and ES6+ environments are supported. In vanilla, a `d3` global is exported. - -```js -import {Delaunay} from "d3-delaunay"; - -const points = [[0, 0], [0, 1], [1, 0], [1, 1]]; -const delaunay = Delaunay.from(points); -const voronoi = delaunay.voronoi([0, 0, 960, 500]); -``` - -## API Reference - -### Delaunay - -<a href="#new_Delaunay" name="new_Delaunay">#</a> new <b>Delaunay</b>(<i>points</i>) [<>](https://github.com/d3/d3-delaunay/blob/master/src/delaunay.js "Source") - -Returns the Delaunay triangulation for the given flat array [*x0*, *y0*, *x1*, *y1*, …] of *points*. - -```js -const delaunay = new Delaunay(Float64Array.of(0, 0, 0, 1, 1, 0, 1, 1)); -``` - -<a href="#delaunay_from" name="delaunay_from">#</a> Delaunay.<b>from</b>(<i>points</i>[, <i>fx</i>[, <i>fy</i>[, <i>that</i>]]]) [<>](https://github.com/d3/d3-delaunay/blob/master/src/delaunay.js "Source") - -Returns the Delaunay triangulation for the given array or iterable of *points*. If *fx* and *fy* are not specified, then *points* is assumed to be an array of two-element arrays of numbers: [[*x0*, *y0*], [*x1*, *y1*], …]. Otherwise, *fx* and *fy* are functions that are invoked for each element in the *points* array in order, and must return the respective *x*- and *y*-coordinate for each point. If *that* is specified, the functions *fx* and *fy* are invoked with *that* as *this*. (See [Array.from](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/from) for reference.) - -```js -const delaunay = Delaunay.from([[0, 0], [0, 1], [1, 0], [1, 1]]); -``` - -<a href="#delaunay_points" name="delaunay_points">#</a> <i>delaunay</i>.<b>points</b> - -The coordinates of the points as an array [*x0*, *y0*, *x1*, *y1*, …]. Typically, this is a Float64Array, however you can use any array-like type in the [constructor](#new_Delaunay). - -<a href="#delaunay_halfedges" name="delaunay_halfedges">#</a> <i>delaunay</i>.<b>halfedges</b> - -The halfedge indexes as an Int32Array [*j0*, *j1*, …]. For each index 0 ≤ *i* < *halfedges*.length, there is a halfedge from triangle vertex *j* = *halfedges*[*i*] to triangle vertex *i*. Equivalently, this means that triangle ⌊*i* / 3⌋ is adjacent to triangle ⌊*j* / 3⌋. If *j* is negative, then triangle ⌊*i* / 3⌋ is an exterior triangle on the [convex hull](#delaunay_hull). For example, to render the internal edges of the Delaunay triangulation: - -```js -const {points, halfedges, triangles} = delaunay; -for (let i = 0, n = halfedges.length; i < n; ++i) { - const j = halfedges[i]; - if (j < i) continue; - const ti = triangles[i]; - const tj = triangles[j]; - context.moveTo(points[ti * 2], points[ti * 2 + 1]); - context.lineTo(points[tj * 2], points[tj * 2 + 1]); -} -``` - -See also [*delaunay*.render](#delaunay_render). - -<a href="#delaunay_hull" name="delaunay_hull">#</a> <i>delaunay</i>.<b>hull</b> - -An Int32Array of point indexes that form the convex hull in counterclockwise order. If the points are collinear, returns them ordered. - -See also [*delaunay*.renderHull](#delaunay_renderHull). - -<a href="#delaunay_triangles" name="delaunay_triangles">#</a> <i>delaunay</i>.<b>triangles</b> - -The triangle vertex indexes as an Uint32Array [*i0*, *j0*, *k0*, *i1*, *j1*, *k1*, …]. Each contiguous triplet of indexes *i*, *j*, *k* forms a counterclockwise triangle. The coordinates of the triangle’s points can be found by going through [*delaunay*.points](#delaunay_points). For example, to render triangle *i*: - -```js -const {points, triangles} = delaunay; -const t0 = triangles[i * 3 + 0]; -const t1 = triangles[i * 3 + 1]; -const t2 = triangles[i * 3 + 2]; -context.moveTo(points[t0 * 2], points[t0 * 2 + 1]); -context.lineTo(points[t1 * 2], points[t1 * 2 + 1]); -context.lineTo(points[t2 * 2], points[t2 * 2 + 1]); -context.closePath(); -``` - -See also [*delaunay*.renderTriangle](#delaunay_renderTriangle). - -<a href="#delaunay_inedges" name="delaunay_inedges">#</a> <i>delaunay</i>.<b>inedges</b> - -The incoming halfedge indexes as a Int32Array [*e0*, *e1*, *e2*, …]. For each point *i*, *inedges*[*i*] is the halfedge index *e* of an incoming halfedge. For coincident points, the halfedge index is -1; for points on the convex hull, the incoming halfedge is on the convex hull; for other points, the choice of incoming halfedge is arbitrary. The *inedges* table can be used to traverse the Delaunay triangulation; see also [*delaunay*.neighbors](#delaunay_neighbors). - -<a href="#delaunay_find" name="delaunay_find">#</a> <i>delaunay</i>.<b>find</b>(<i>x</i>, <i>y</i>[, <i>i</i>]) [<>](https://github.com/d3/d3-delaunay/blob/master/src/delaunay.js "Source") - -Returns the index of the input point that is closest to the specified point ⟨*x*, *y*⟩. The search is started at the specified point *i*. If *i* is not specified, it defaults to zero. - -<a href="#delaunay_neighbors" name="delaunay_neighbors">#</a> <i>delaunay</i>.<b>neighbors</b>(<i>i</i>) [<>](https://github.com/d3/d3-delaunay/blob/master/src/delaunay.js "Source") - -Returns an iterable over the indexes of the neighboring points to the specified point *i*. The iterable is empty if *i* is a coincident point. - -<a href="#delaunay_render" name="delaunay_render">#</a> <i>delaunay</i>.<b>render</b>([<i>context</i>]) [<>](https://github.com/d3/d3-delaunay/blob/master/src/delaunay.js "Source") - -<img alt="delaunay.render" src="https://raw.githubusercontent.com/d3/d3-delaunay/master/img/delaunay-mesh.png"> - -Renders the edges of the Delaunay triangulation to the specified *context*. The specified *context* must implement the *context*.moveTo and *context*.lineTo methods from the [CanvasPathMethods API](https://www.w3.org/TR/2dcontext/#canvaspathmethods). If a *context* is not specified, an SVG path string is returned instead. - -<a href="#delaunay_renderHull" name="delaunay_renderHull">#</a> <i>delaunay</i>.<b>renderHull</b>([<i>context</i>]) [<>](https://github.com/d3/d3-delaunay/blob/master/src/delaunay.js "Source") - -<img alt="delaunay.renderHull" src="https://raw.githubusercontent.com/d3/d3-delaunay/master/img/delaunay-hull.png"> - -Renders the convex hull of the Delaunay triangulation to the specified *context*. The specified *context* must implement the *context*.moveTo and *context*.lineTo methods from the [CanvasPathMethods API](https://www.w3.org/TR/2dcontext/#canvaspathmethods). If a *context* is not specified, an SVG path string is returned instead. - -<a href="#delaunay_renderTriangle" name="delaunay_renderTriangle">#</a> <i>delaunay</i>.<b>renderTriangle</b>(<i>i</i>[, <i>context</i>]) [<>](https://github.com/d3/d3-delaunay/blob/master/src/delaunay.js "Source") - -<img alt="delaunay.renderTriangle" src="https://raw.githubusercontent.com/d3/d3-delaunay/master/img/delaunay-triangle.png"> - -Renders triangle *i* of the Delaunay triangulation to the specified *context*. The specified *context* must implement the *context*.moveTo, *context*.lineTo and *context*.closePath methods from the [CanvasPathMethods API](https://www.w3.org/TR/2dcontext/#canvaspathmethods). If a *context* is not specified, an SVG path string is returned instead. - -<a href="#delaunay_renderPoints" name="delaunay_renderPoints">#</a> <i>delaunay</i>.<b>renderPoints</b>(\[<i>context</i>\]\[, <i>radius</i>\]) [<>](https://github.com/d3/d3-delaunay/blob/master/src/delaunay.js "Source") - -Renders the input points of the Delaunay triangulation to the specified *context* as circles with the specified *radius*. If *radius* is not specified, it defaults to 2. The specified *context* must implement the *context*.moveTo and *context*.arc methods from the [CanvasPathMethods API](https://www.w3.org/TR/2dcontext/#canvaspathmethods). If a *context* is not specified, an SVG path string is returned instead. - -<a href="#delaunay_hullPolygon" name="delaunay_hullPolygon">#</a> <i>delaunay</i>.<b>hullPolygon()</b> [<>](https://github.com/d3/d3-delaunay/blob/master/src/delaunay.js "Source") - -Returns the closed polygon [[*x0*, *y0*], [*x1*, *y1*], …, [*x0*, *y0*]] representing the convex hull. - -<a href="#delaunay_trianglePolygons" name="delaunay_trianglePolygons">#</a> <i>delaunay</i>.<b>trianglePolygons()</b> [<>](https://github.com/d3/d3-delaunay/blob/master/src/delaunay.js "Source") - -Returns an iterable over the [polygons for each triangle](#delaunay_trianglePolygon), in order. - -<a href="#delaunay_trianglePolygon" name="delaunay_trianglePolygon">#</a> <i>delaunay</i>.<b>trianglePolygon(<i>i</i>)</b> [<>](https://github.com/d3/d3-delaunay/blob/master/src/delaunay.js "Source") - -Returns the closed polygon [[*x0*, *y0*], [*x1*, *y1*], [*x2*, *y2*], [*x0*, *y0*]] representing the triangle *i*. - -<a href="#delaunay_update" name="delaunay_update">#</a> <i>delaunay</i>.<b>update</b>() [<>](https://github.com/d3/d3-delaunay/blob/master/src/delaunay.js "Source") - -Updates the triangulation after the points have been modified in-place. - -<a href="#delaunay_voronoi" name="delaunay_voronoi">#</a> <i>delaunay</i>.<b>voronoi</b>([<i>bounds</i>]) [<>](https://github.com/d3/d3-delaunay/blob/master/src/delaunay.js "Source") - -Returns the [Voronoi diagram](#voronoi) for the associated [points](#delaunay_points). When rendering, the diagram will be clipped to the specified *bounds* = [*xmin*, *ymin*, *xmax*, *ymax*]. If *bounds* is not specified, it defaults to [0, 0, 960, 500]. See [To Infinity and Back Again](https://observablehq.com/@mbostock/to-infinity-and-back-again) for an interactive explanation of Voronoi cell clipping. - -The Voronoi diagram is returned even in degenerate cases where no triangulation exists — namely 0, 1 or 2 points, and collinear points. - -### Voronoi - -<a href="#voronoi_delaunay" name="voronoi_delaunay">#</a> <i>voronoi</i>.<b>delaunay</b> - -The Voronoi diagram’s associated [Delaunay triangulation](#delaunay). - -<a href="#voronoi_circumcenters" name="voronoi_circumcenters">#</a> <i>voronoi</i>.<b>circumcenters</b> - -The [circumcenters](http://mathworld.wolfram.com/Circumcenter.html) of the Delaunay triangles as a Float64Array [*cx0*, *cy0*, *cx1*, *cy1*, …]. Each contiguous pair of coordinates *cx*, *cy* is the circumcenter for the corresponding triangle. These circumcenters form the coordinates of the Voronoi cell polygons. - -<a href="#voronoi_vectors" name="voronoi_vectors">#</a> <i>voronoi</i>.<b>vectors</b> - -A Float64Array [*vx0*, *vy0*, *wx0*, *wy0*, …] where each non-zero quadruple describes an open (infinite) cell on the outer hull, giving the directions of two open half-lines. - -<a href="#voronoi_xmin" name="voronoi_xmin">#</a> <i>voronoi</i>.<b>xmin</b><br> -<a href="#voronoi_ymin" name="voronoi_ymin">#</a> <i>voronoi</i>.<b>ymin</b><br> -<a href="#voronoi_xmax" name="voronoi_xmax">#</a> <i>voronoi</i>.<b>xmax</b><br> -<a href="#voronoi_ymax" name="voronoi_ymax">#</a> <i>voronoi</i>.<b>ymax</b><br> - -The bounds of the viewport [*xmin*, *ymin*, *xmax*, *ymax*] for rendering the Voronoi diagram. These values only affect the rendering methods ([*voronoi*.render](#voronoi_render), [*voronoi*.renderBounds](#voronoi_renderBounds), [*cell*.render](#cell_render)). - -<a href="#voronoi_contains" name="voronoi_contains">#</a> <i>voronoi</i>.<b>contains</b>(<i>i</i>, <i>x</i>, <i>y</i>) [<>](https://github.com/d3/d3-delaunay/blob/master/src/cell.js "Source") - -Returns true if the cell with the specified index *i* contains the specified point ⟨*x*, *y*⟩. (This method is not affected by the associated Voronoi diagram’s viewport [bounds](#voronoi_xmin).) - -<a href="#voronoi_neighbors" name="voronoi_neighbors">#</a> <i>voronoi</i>.<b>neighbors</b>(<i>i</i>) [<>](https://github.com/d3/d3-delaunay/blob/master/src/voronoi.js "Source") - -Returns an iterable over the indexes of the cells that share a common edge with the specified cell *i*. Voronoi neighbors are always neighbors on the Delaunay graph, but the converse is false when the common edge has been clipped out by the Voronoi diagram’s viewport. - -<a href="#voronoi_render" name="voronoi_render">#</a> <i>voronoi</i>.<b>render</b>([<i>context</i>]) [<>](https://github.com/d3/d3-delaunay/blob/master/src/voronoi.js "Source") - -<img alt="voronoi.render" src="https://raw.githubusercontent.com/d3/d3-delaunay/master/img/voronoi-mesh.png"> - -Renders the mesh of Voronoi cells to the specified *context*. The specified *context* must implement the *context*.moveTo and *context*.lineTo methods from the [CanvasPathMethods API](https://www.w3.org/TR/2dcontext/#canvaspathmethods). If a *context* is not specified, an SVG path string is returned instead. - -<a href="#voronoi_renderBounds" name="voronoi_renderBounds">#</a> <i>voronoi</i>.<b>renderBounds</b>([<i>context</i>]) [<>](https://github.com/d3/d3-delaunay/blob/master/src/voronoi.js "Source") - -<img alt="voronoi.renderBounds" src="https://raw.githubusercontent.com/d3/d3-delaunay/master/img/voronoi-bounds.png"> - -Renders the viewport extent to the specified *context*. The specified *context* must implement the *context*.rect method from the [CanvasPathMethods API](https://www.w3.org/TR/2dcontext/#canvaspathmethods). Equivalent to *context*.rect(*voronoi*.xmin, *voronoi*.ymin, *voronoi*.xmax - *voronoi*.xmin, *voronoi*.ymax - *voronoi*.ymin). If a *context* is not specified, an SVG path string is returned instead. - -<a href="#voronoi_renderCell" name="voronoi_renderCell">#</a> <i>voronoi</i>.<b>renderCell</b>(<i>i</i>[, <i>context</i>]) [<>](https://github.com/d3/d3-delaunay/blob/master/src/voronoi.js "Source") - -<img alt="cell.render" src="https://raw.githubusercontent.com/d3/d3-delaunay/master/img/spectral.png"> - -Renders the cell with the specified index *i* to the specified *context*. The specified *context* must implement the *context*.moveTo , *context*.lineTo and *context*.closePath methods from the [CanvasPathMethods API](https://www.w3.org/TR/2dcontext/#canvaspathmethods). If a *context* is not specified, an SVG path string is returned instead. - -<a href="#voronoi_cellPolygons" name="voronoi_cellPolygons">#</a> <i>voronoi</i>.<b>cellPolygons</b>() [<>](https://github.com/d3/d3-delaunay/blob/master/src/voronoi.js "Source") - -Returns an iterable over the non-empty [polygons for each cell](#voronoi_cellPolygon), with the cell index as property. - -<a href="#voronoi_cellPolygon" name="voronoi_cellPolygon">#</a> <i>voronoi</i>.<b>cellPolygon</b>(<i>i</i>) [<>](https://github.com/d3/d3-delaunay/blob/master/src/voronoi.js "Source") - -Returns the convex, closed polygon [[*x0*, *y0*], [*x1*, *y1*], …, [*x0*, *y0*]] representing the cell for the specified point *i*. - -<a href="#voronoi_update" name="voronoi_update">#</a> <i>voronoi</i>.<b>update</b>() [<>](https://github.com/d3/d3-delaunay/blob/master/src/voronoi.js "Source") - -Updates the Voronoi diagram and underlying triangulation after the points have been modified in-place — useful for Lloyd’s relaxation. - diff --git a/node_modules/d3-delaunay/dist/d3-delaunay.js b/node_modules/d3-delaunay/dist/d3-delaunay.js deleted file mode 100644 index 6ab616484aea762f70bd0038c5a3dd9fd87831d4..0000000000000000000000000000000000000000 --- a/node_modules/d3-delaunay/dist/d3-delaunay.js +++ /dev/null @@ -1,1123 +0,0 @@ -// https://github.com/d3/d3-delaunay v5.3.0 Copyright 2020 Mike Bostock -// https://github.com/mapbox/delaunator v4.0.1. Copyright 2019 Mapbox, Inc. -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {})); -}(this, function (exports) { 'use strict'; - -const EPSILON = Math.pow(2, -52); -const EDGE_STACK = new Uint32Array(512); - -class Delaunator { - - static from(points, getX = defaultGetX, getY = defaultGetY) { - const n = points.length; - const coords = new Float64Array(n * 2); - - for (let i = 0; i < n; i++) { - const p = points[i]; - coords[2 * i] = getX(p); - coords[2 * i + 1] = getY(p); - } - - return new Delaunator(coords); - } - - constructor(coords) { - const n = coords.length >> 1; - if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.'); - - this.coords = coords; - - // arrays that will store the triangulation graph - const maxTriangles = Math.max(2 * n - 5, 0); - this._triangles = new Uint32Array(maxTriangles * 3); - this._halfedges = new Int32Array(maxTriangles * 3); - - // temporary arrays for tracking the edges of the advancing convex hull - this._hashSize = Math.ceil(Math.sqrt(n)); - this._hullPrev = new Uint32Array(n); // edge to prev edge - this._hullNext = new Uint32Array(n); // edge to next edge - this._hullTri = new Uint32Array(n); // edge to adjacent triangle - this._hullHash = new Int32Array(this._hashSize).fill(-1); // angular edge hash - - // temporary arrays for sorting points - this._ids = new Uint32Array(n); - this._dists = new Float64Array(n); - - this.update(); - } - - update() { - const {coords, _hullPrev: hullPrev, _hullNext: hullNext, _hullTri: hullTri, _hullHash: hullHash} = this; - const n = coords.length >> 1; - - // populate an array of point indices; calculate input data bbox - let minX = Infinity; - let minY = Infinity; - let maxX = -Infinity; - let maxY = -Infinity; - - for (let i = 0; i < n; i++) { - const x = coords[2 * i]; - const y = coords[2 * i + 1]; - if (x < minX) minX = x; - if (y < minY) minY = y; - if (x > maxX) maxX = x; - if (y > maxY) maxY = y; - this._ids[i] = i; - } - const cx = (minX + maxX) / 2; - const cy = (minY + maxY) / 2; - - let minDist = Infinity; - let i0, i1, i2; - - // pick a seed point close to the center - for (let i = 0; i < n; i++) { - const d = dist(cx, cy, coords[2 * i], coords[2 * i + 1]); - if (d < minDist) { - i0 = i; - minDist = d; - } - } - const i0x = coords[2 * i0]; - const i0y = coords[2 * i0 + 1]; - - minDist = Infinity; - - // find the point closest to the seed - for (let i = 0; i < n; i++) { - if (i === i0) continue; - const d = dist(i0x, i0y, coords[2 * i], coords[2 * i + 1]); - if (d < minDist && d > 0) { - i1 = i; - minDist = d; - } - } - let i1x = coords[2 * i1]; - let i1y = coords[2 * i1 + 1]; - - let minRadius = Infinity; - - // find the third point which forms the smallest circumcircle with the first two - for (let i = 0; i < n; i++) { - if (i === i0 || i === i1) continue; - const r = circumradius(i0x, i0y, i1x, i1y, coords[2 * i], coords[2 * i + 1]); - if (r < minRadius) { - i2 = i; - minRadius = r; - } - } - let i2x = coords[2 * i2]; - let i2y = coords[2 * i2 + 1]; - - if (minRadius === Infinity) { - // order collinear points by dx (or dy if all x are identical) - // and return the list as a hull - for (let i = 0; i < n; i++) { - this._dists[i] = (coords[2 * i] - coords[0]) || (coords[2 * i + 1] - coords[1]); - } - quicksort(this._ids, this._dists, 0, n - 1); - const hull = new Uint32Array(n); - let j = 0; - for (let i = 0, d0 = -Infinity; i < n; i++) { - const id = this._ids[i]; - if (this._dists[id] > d0) { - hull[j++] = id; - d0 = this._dists[id]; - } - } - this.hull = hull.subarray(0, j); - this.triangles = new Uint32Array(0); - this.halfedges = new Uint32Array(0); - return; - } - - // swap the order of the seed points for counter-clockwise orientation - if (orient(i0x, i0y, i1x, i1y, i2x, i2y)) { - const i = i1; - const x = i1x; - const y = i1y; - i1 = i2; - i1x = i2x; - i1y = i2y; - i2 = i; - i2x = x; - i2y = y; - } - - const center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y); - this._cx = center.x; - this._cy = center.y; - - for (let i = 0; i < n; i++) { - this._dists[i] = dist(coords[2 * i], coords[2 * i + 1], center.x, center.y); - } - - // sort the points by distance from the seed triangle circumcenter - quicksort(this._ids, this._dists, 0, n - 1); - - // set up the seed triangle as the starting hull - this._hullStart = i0; - let hullSize = 3; - - hullNext[i0] = hullPrev[i2] = i1; - hullNext[i1] = hullPrev[i0] = i2; - hullNext[i2] = hullPrev[i1] = i0; - - hullTri[i0] = 0; - hullTri[i1] = 1; - hullTri[i2] = 2; - - hullHash.fill(-1); - hullHash[this._hashKey(i0x, i0y)] = i0; - hullHash[this._hashKey(i1x, i1y)] = i1; - hullHash[this._hashKey(i2x, i2y)] = i2; - - this.trianglesLen = 0; - this._addTriangle(i0, i1, i2, -1, -1, -1); - - for (let k = 0, xp, yp; k < this._ids.length; k++) { - const i = this._ids[k]; - const x = coords[2 * i]; - const y = coords[2 * i + 1]; - - // skip near-duplicate points - if (k > 0 && Math.abs(x - xp) <= EPSILON && Math.abs(y - yp) <= EPSILON) continue; - xp = x; - yp = y; - - // skip seed triangle points - if (i === i0 || i === i1 || i === i2) continue; - - // find a visible edge on the convex hull using edge hash - let start = 0; - for (let j = 0, key = this._hashKey(x, y); j < this._hashSize; j++) { - start = hullHash[(key + j) % this._hashSize]; - if (start !== -1 && start !== hullNext[start]) break; - } - - start = hullPrev[start]; - let e = start, q; - while (q = hullNext[e], !orient(x, y, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1])) { - e = q; - if (e === start) { - e = -1; - break; - } - } - if (e === -1) continue; // likely a near-duplicate point; skip it - - // add the first triangle from the point - let t = this._addTriangle(e, i, hullNext[e], -1, -1, hullTri[e]); - - // recursively flip triangles from the point until they satisfy the Delaunay condition - hullTri[i] = this._legalize(t + 2); - hullTri[e] = t; // keep track of boundary triangles on the hull - hullSize++; - - // walk forward through the hull, adding more triangles and flipping recursively - let n = hullNext[e]; - while (q = hullNext[n], orient(x, y, coords[2 * n], coords[2 * n + 1], coords[2 * q], coords[2 * q + 1])) { - t = this._addTriangle(n, i, q, hullTri[i], -1, hullTri[n]); - hullTri[i] = this._legalize(t + 2); - hullNext[n] = n; // mark as removed - hullSize--; - n = q; - } - - // walk backward from the other side, adding more triangles and flipping - if (e === start) { - while (q = hullPrev[e], orient(x, y, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1])) { - t = this._addTriangle(q, i, e, -1, hullTri[e], hullTri[q]); - this._legalize(t + 2); - hullTri[q] = t; - hullNext[e] = e; // mark as removed - hullSize--; - e = q; - } - } - - // update the hull indices - this._hullStart = hullPrev[i] = e; - hullNext[e] = hullPrev[n] = i; - hullNext[i] = n; - - // save the two new edges in the hash table - hullHash[this._hashKey(x, y)] = i; - hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e; - } - - this.hull = new Uint32Array(hullSize); - for (let i = 0, e = this._hullStart; i < hullSize; i++) { - this.hull[i] = e; - e = hullNext[e]; - } - - // trim typed triangle mesh arrays - this.triangles = this._triangles.subarray(0, this.trianglesLen); - this.halfedges = this._halfedges.subarray(0, this.trianglesLen); - } - - _hashKey(x, y) { - return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize; - } - - _legalize(a) { - const {_triangles: triangles, _halfedges: halfedges, coords} = this; - - let i = 0; - let ar = 0; - - // recursion eliminated with a fixed-size stack - while (true) { - const b = halfedges[a]; - - /* if the pair of triangles doesn't satisfy the Delaunay condition - * (p1 is inside the circumcircle of [p0, pl, pr]), flip them, - * then do the same check/flip recursively for the new pair of triangles - * - * pl pl - * /||\ / \ - * al/ || \bl al/ \a - * / || \ / \ - * / a||b \ flip /___ar___\ - * p0\ || /p1 => p0\---bl---/p1 - * \ || / \ / - * ar\ || /br b\ /br - * \||/ \ / - * pr pr - */ - const a0 = a - a % 3; - ar = a0 + (a + 2) % 3; - - if (b === -1) { // convex hull edge - if (i === 0) break; - a = EDGE_STACK[--i]; - continue; - } - - const b0 = b - b % 3; - const al = a0 + (a + 1) % 3; - const bl = b0 + (b + 2) % 3; - - const p0 = triangles[ar]; - const pr = triangles[a]; - const pl = triangles[al]; - const p1 = triangles[bl]; - - const illegal = inCircle( - coords[2 * p0], coords[2 * p0 + 1], - coords[2 * pr], coords[2 * pr + 1], - coords[2 * pl], coords[2 * pl + 1], - coords[2 * p1], coords[2 * p1 + 1]); - - if (illegal) { - triangles[a] = p1; - triangles[b] = p0; - - const hbl = halfedges[bl]; - - // edge swapped on the other side of the hull (rare); fix the halfedge reference - if (hbl === -1) { - let e = this._hullStart; - do { - if (this._hullTri[e] === bl) { - this._hullTri[e] = a; - break; - } - e = this._hullPrev[e]; - } while (e !== this._hullStart); - } - this._link(a, hbl); - this._link(b, halfedges[ar]); - this._link(ar, bl); - - const br = b0 + (b + 1) % 3; - - // don't worry about hitting the cap: it can only happen on extremely degenerate input - if (i < EDGE_STACK.length) { - EDGE_STACK[i++] = br; - } - } else { - if (i === 0) break; - a = EDGE_STACK[--i]; - } - } - - return ar; - } - - _link(a, b) { - this._halfedges[a] = b; - if (b !== -1) this._halfedges[b] = a; - } - - // add a new triangle given vertex indices and adjacent half-edge ids - _addTriangle(i0, i1, i2, a, b, c) { - const t = this.trianglesLen; - - this._triangles[t] = i0; - this._triangles[t + 1] = i1; - this._triangles[t + 2] = i2; - - this._link(t, a); - this._link(t + 1, b); - this._link(t + 2, c); - - this.trianglesLen += 3; - - return t; - } -} - -// monotonically increases with real angle, but doesn't need expensive trigonometry -function pseudoAngle(dx, dy) { - const p = dx / (Math.abs(dx) + Math.abs(dy)); - return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1] -} - -function dist(ax, ay, bx, by) { - const dx = ax - bx; - const dy = ay - by; - return dx * dx + dy * dy; -} - -// return 2d orientation sign if we're confident in it through J. Shewchuk's error bound check -function orientIfSure(px, py, rx, ry, qx, qy) { - const l = (ry - py) * (qx - px); - const r = (rx - px) * (qy - py); - return Math.abs(l - r) >= 3.3306690738754716e-16 * Math.abs(l + r) ? l - r : 0; -} - -// a more robust orientation test that's stable in a given triangle (to fix robustness issues) -function orient(rx, ry, qx, qy, px, py) { - const sign = orientIfSure(px, py, rx, ry, qx, qy) || - orientIfSure(rx, ry, qx, qy, px, py) || - orientIfSure(qx, qy, px, py, rx, ry); - return sign < 0; -} - -function inCircle(ax, ay, bx, by, cx, cy, px, py) { - const dx = ax - px; - const dy = ay - py; - const ex = bx - px; - const ey = by - py; - const fx = cx - px; - const fy = cy - py; - - const ap = dx * dx + dy * dy; - const bp = ex * ex + ey * ey; - const cp = fx * fx + fy * fy; - - return dx * (ey * cp - bp * fy) - - dy * (ex * cp - bp * fx) + - ap * (ex * fy - ey * fx) < 0; -} - -function circumradius(ax, ay, bx, by, cx, cy) { - const dx = bx - ax; - const dy = by - ay; - const ex = cx - ax; - const ey = cy - ay; - - const bl = dx * dx + dy * dy; - const cl = ex * ex + ey * ey; - const d = 0.5 / (dx * ey - dy * ex); - - const x = (ey * bl - dy * cl) * d; - const y = (dx * cl - ex * bl) * d; - - return x * x + y * y; -} - -function circumcenter(ax, ay, bx, by, cx, cy) { - const dx = bx - ax; - const dy = by - ay; - const ex = cx - ax; - const ey = cy - ay; - - const bl = dx * dx + dy * dy; - const cl = ex * ex + ey * ey; - const d = 0.5 / (dx * ey - dy * ex); - - const x = ax + (ey * bl - dy * cl) * d; - const y = ay + (dx * cl - ex * bl) * d; - - return {x, y}; -} - -function quicksort(ids, dists, left, right) { - if (right - left <= 20) { - for (let i = left + 1; i <= right; i++) { - const temp = ids[i]; - const tempDist = dists[temp]; - let j = i - 1; - while (j >= left && dists[ids[j]] > tempDist) ids[j + 1] = ids[j--]; - ids[j + 1] = temp; - } - } else { - const median = (left + right) >> 1; - let i = left + 1; - let j = right; - swap(ids, median, i); - if (dists[ids[left]] > dists[ids[right]]) swap(ids, left, right); - if (dists[ids[i]] > dists[ids[right]]) swap(ids, i, right); - if (dists[ids[left]] > dists[ids[i]]) swap(ids, left, i); - - const temp = ids[i]; - const tempDist = dists[temp]; - while (true) { - do i++; while (dists[ids[i]] < tempDist); - do j--; while (dists[ids[j]] > tempDist); - if (j < i) break; - swap(ids, i, j); - } - ids[left + 1] = ids[j]; - ids[j] = temp; - - if (right - i + 1 >= j - left) { - quicksort(ids, dists, i, right); - quicksort(ids, dists, left, j - 1); - } else { - quicksort(ids, dists, left, j - 1); - quicksort(ids, dists, i, right); - } - } -} - -function swap(arr, i, j) { - const tmp = arr[i]; - arr[i] = arr[j]; - arr[j] = tmp; -} - -function defaultGetX(p) { - return p[0]; -} -function defaultGetY(p) { - return p[1]; -} - -const epsilon = 1e-6; - -class Path { - constructor() { - this._x0 = this._y0 = // start of current subpath - this._x1 = this._y1 = null; // end of current subpath - this._ = ""; - } - moveTo(x, y) { - this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`; - } - closePath() { - if (this._x1 !== null) { - this._x1 = this._x0, this._y1 = this._y0; - this._ += "Z"; - } - } - lineTo(x, y) { - this._ += `L${this._x1 = +x},${this._y1 = +y}`; - } - arc(x, y, r) { - x = +x, y = +y, r = +r; - const x0 = x + r; - const y0 = y; - if (r < 0) throw new Error("negative radius"); - if (this._x1 === null) this._ += `M${x0},${y0}`; - else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) this._ += "L" + x0 + "," + y0; - if (!r) return; - this._ += `A${r},${r},0,1,1,${x - r},${y}A${r},${r},0,1,1,${this._x1 = x0},${this._y1 = y0}`; - } - rect(x, y, w, h) { - this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${+w}v${+h}h${-w}Z`; - } - value() { - return this._ || null; - } -} - -class Polygon { - constructor() { - this._ = []; - } - moveTo(x, y) { - this._.push([x, y]); - } - closePath() { - this._.push(this._[0].slice()); - } - lineTo(x, y) { - this._.push([x, y]); - } - value() { - return this._.length ? this._ : null; - } -} - -class Voronoi { - constructor(delaunay, [xmin, ymin, xmax, ymax] = [0, 0, 960, 500]) { - if (!((xmax = +xmax) >= (xmin = +xmin)) || !((ymax = +ymax) >= (ymin = +ymin))) throw new Error("invalid bounds"); - this.delaunay = delaunay; - this._circumcenters = new Float64Array(delaunay.points.length * 2); - this.vectors = new Float64Array(delaunay.points.length * 2); - this.xmax = xmax, this.xmin = xmin; - this.ymax = ymax, this.ymin = ymin; - this._init(); - } - update() { - this.delaunay.update(); - this._init(); - return this; - } - _init() { - const {delaunay: {points, hull, triangles}, vectors} = this; - - // Compute circumcenters. - const circumcenters = this.circumcenters = this._circumcenters.subarray(0, triangles.length / 3 * 2); - for (let i = 0, j = 0, n = triangles.length, x, y; i < n; i += 3, j += 2) { - const t1 = triangles[i] * 2; - const t2 = triangles[i + 1] * 2; - const t3 = triangles[i + 2] * 2; - const x1 = points[t1]; - const y1 = points[t1 + 1]; - const x2 = points[t2]; - const y2 = points[t2 + 1]; - const x3 = points[t3]; - const y3 = points[t3 + 1]; - - const dx = x2 - x1; - const dy = y2 - y1; - const ex = x3 - x1; - const ey = y3 - y1; - const bl = dx * dx + dy * dy; - const cl = ex * ex + ey * ey; - const ab = (dx * ey - dy * ex) * 2; - - if (!ab) { - // degenerate case (collinear diagram) - x = (x1 + x3) / 2 - 1e8 * ey; - y = (y1 + y3) / 2 + 1e8 * ex; - } - else if (Math.abs(ab) < 1e-8) { - // almost equal points (degenerate triangle) - x = (x1 + x3) / 2; - y = (y1 + y3) / 2; - } else { - const d = 1 / ab; - x = x1 + (ey * bl - dy * cl) * d; - y = y1 + (dx * cl - ex * bl) * d; - } - circumcenters[j] = x; - circumcenters[j + 1] = y; - } - - // Compute exterior cell rays. - let h = hull[hull.length - 1]; - let p0, p1 = h * 4; - let x0, x1 = points[2 * h]; - let y0, y1 = points[2 * h + 1]; - vectors.fill(0); - for (let i = 0; i < hull.length; ++i) { - h = hull[i]; - p0 = p1, x0 = x1, y0 = y1; - p1 = h * 4, x1 = points[2 * h], y1 = points[2 * h + 1]; - vectors[p0 + 2] = vectors[p1] = y0 - y1; - vectors[p0 + 3] = vectors[p1 + 1] = x1 - x0; - } - } - render(context) { - const buffer = context == null ? context = new Path : undefined; - const {delaunay: {halfedges, inedges, hull}, circumcenters, vectors} = this; - if (hull.length <= 1) return null; - for (let i = 0, n = halfedges.length; i < n; ++i) { - const j = halfedges[i]; - if (j < i) continue; - const ti = Math.floor(i / 3) * 2; - const tj = Math.floor(j / 3) * 2; - const xi = circumcenters[ti]; - const yi = circumcenters[ti + 1]; - const xj = circumcenters[tj]; - const yj = circumcenters[tj + 1]; - this._renderSegment(xi, yi, xj, yj, context); - } - let h0, h1 = hull[hull.length - 1]; - for (let i = 0; i < hull.length; ++i) { - h0 = h1, h1 = hull[i]; - const t = Math.floor(inedges[h1] / 3) * 2; - const x = circumcenters[t]; - const y = circumcenters[t + 1]; - const v = h0 * 4; - const p = this._project(x, y, vectors[v + 2], vectors[v + 3]); - if (p) this._renderSegment(x, y, p[0], p[1], context); - } - return buffer && buffer.value(); - } - renderBounds(context) { - const buffer = context == null ? context = new Path : undefined; - context.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin); - return buffer && buffer.value(); - } - renderCell(i, context) { - const buffer = context == null ? context = new Path : undefined; - const points = this._clip(i); - if (points === null || !points.length) return; - context.moveTo(points[0], points[1]); - let n = points.length; - while (points[0] === points[n-2] && points[1] === points[n-1] && n > 1) n -= 2; - for (let i = 2; i < n; i += 2) { - if (points[i] !== points[i-2] || points[i+1] !== points[i-1]) - context.lineTo(points[i], points[i + 1]); - } - context.closePath(); - return buffer && buffer.value(); - } - *cellPolygons() { - const {delaunay: {points}} = this; - for (let i = 0, n = points.length / 2; i < n; ++i) { - const cell = this.cellPolygon(i); - if (cell) cell.index = i, yield cell; - } - } - cellPolygon(i) { - const polygon = new Polygon; - this.renderCell(i, polygon); - return polygon.value(); - } - _renderSegment(x0, y0, x1, y1, context) { - let S; - const c0 = this._regioncode(x0, y0); - const c1 = this._regioncode(x1, y1); - if (c0 === 0 && c1 === 0) { - context.moveTo(x0, y0); - context.lineTo(x1, y1); - } else if (S = this._clipSegment(x0, y0, x1, y1, c0, c1)) { - context.moveTo(S[0], S[1]); - context.lineTo(S[2], S[3]); - } - } - contains(i, x, y) { - if ((x = +x, x !== x) || (y = +y, y !== y)) return false; - return this.delaunay._step(i, x, y) === i; - } - *neighbors(i) { - const ci = this._clip(i); - if (ci) for (const j of this.delaunay.neighbors(i)) { - const cj = this._clip(j); - // find the common edge - if (cj) loop: for (let ai = 0, li = ci.length; ai < li; ai += 2) { - for (let aj = 0, lj = cj.length; aj < lj; aj += 2) { - if (ci[ai] == cj[aj] - && ci[ai + 1] == cj[aj + 1] - && ci[(ai + 2) % li] == cj[(aj + lj - 2) % lj] - && ci[(ai + 3) % li] == cj[(aj + lj - 1) % lj] - ) { - yield j; - break loop; - } - } - } - } - } - _cell(i) { - const {circumcenters, delaunay: {inedges, halfedges, triangles}} = this; - const e0 = inedges[i]; - if (e0 === -1) return null; // coincident point - const points = []; - let e = e0; - do { - const t = Math.floor(e / 3); - points.push(circumcenters[t * 2], circumcenters[t * 2 + 1]); - e = e % 3 === 2 ? e - 2 : e + 1; - if (triangles[e] !== i) break; // bad triangulation - e = halfedges[e]; - } while (e !== e0 && e !== -1); - return points; - } - _clip(i) { - // degenerate case (1 valid point: return the box) - if (i === 0 && this.delaunay.hull.length === 1) { - return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin]; - } - const points = this._cell(i); - if (points === null) return null; - const {vectors: V} = this; - const v = i * 4; - return V[v] || V[v + 1] - ? this._clipInfinite(i, points, V[v], V[v + 1], V[v + 2], V[v + 3]) - : this._clipFinite(i, points); - } - _clipFinite(i, points) { - const n = points.length; - let P = null; - let x0, y0, x1 = points[n - 2], y1 = points[n - 1]; - let c0, c1 = this._regioncode(x1, y1); - let e0, e1; - for (let j = 0; j < n; j += 2) { - x0 = x1, y0 = y1, x1 = points[j], y1 = points[j + 1]; - c0 = c1, c1 = this._regioncode(x1, y1); - if (c0 === 0 && c1 === 0) { - e0 = e1, e1 = 0; - if (P) P.push(x1, y1); - else P = [x1, y1]; - } else { - let S, sx0, sy0, sx1, sy1; - if (c0 === 0) { - if ((S = this._clipSegment(x0, y0, x1, y1, c0, c1)) === null) continue; - [sx0, sy0, sx1, sy1] = S; - } else { - if ((S = this._clipSegment(x1, y1, x0, y0, c1, c0)) === null) continue; - [sx1, sy1, sx0, sy0] = S; - e0 = e1, e1 = this._edgecode(sx0, sy0); - if (e0 && e1) this._edge(i, e0, e1, P, P.length); - if (P) P.push(sx0, sy0); - else P = [sx0, sy0]; - } - e0 = e1, e1 = this._edgecode(sx1, sy1); - if (e0 && e1) this._edge(i, e0, e1, P, P.length); - if (P) P.push(sx1, sy1); - else P = [sx1, sy1]; - } - } - if (P) { - e0 = e1, e1 = this._edgecode(P[0], P[1]); - if (e0 && e1) this._edge(i, e0, e1, P, P.length); - } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) { - return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin]; - } - return P; - } - _clipSegment(x0, y0, x1, y1, c0, c1) { - while (true) { - if (c0 === 0 && c1 === 0) return [x0, y0, x1, y1]; - if (c0 & c1) return null; - let x, y, c = c0 || c1; - if (c & 0b1000) x = x0 + (x1 - x0) * (this.ymax - y0) / (y1 - y0), y = this.ymax; - else if (c & 0b0100) x = x0 + (x1 - x0) * (this.ymin - y0) / (y1 - y0), y = this.ymin; - else if (c & 0b0010) y = y0 + (y1 - y0) * (this.xmax - x0) / (x1 - x0), x = this.xmax; - else y = y0 + (y1 - y0) * (this.xmin - x0) / (x1 - x0), x = this.xmin; - if (c0) x0 = x, y0 = y, c0 = this._regioncode(x0, y0); - else x1 = x, y1 = y, c1 = this._regioncode(x1, y1); - } - } - _clipInfinite(i, points, vx0, vy0, vxn, vyn) { - let P = Array.from(points), p; - if (p = this._project(P[0], P[1], vx0, vy0)) P.unshift(p[0], p[1]); - if (p = this._project(P[P.length - 2], P[P.length - 1], vxn, vyn)) P.push(p[0], p[1]); - if (P = this._clipFinite(i, P)) { - for (let j = 0, n = P.length, c0, c1 = this._edgecode(P[n - 2], P[n - 1]); j < n; j += 2) { - c0 = c1, c1 = this._edgecode(P[j], P[j + 1]); - if (c0 && c1) j = this._edge(i, c0, c1, P, j), n = P.length; - } - } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) { - P = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax]; - } - return P; - } - _edge(i, e0, e1, P, j) { - while (e0 !== e1) { - let x, y; - switch (e0) { - case 0b0101: e0 = 0b0100; continue; // top-left - case 0b0100: e0 = 0b0110, x = this.xmax, y = this.ymin; break; // top - case 0b0110: e0 = 0b0010; continue; // top-right - case 0b0010: e0 = 0b1010, x = this.xmax, y = this.ymax; break; // right - case 0b1010: e0 = 0b1000; continue; // bottom-right - case 0b1000: e0 = 0b1001, x = this.xmin, y = this.ymax; break; // bottom - case 0b1001: e0 = 0b0001; continue; // bottom-left - case 0b0001: e0 = 0b0101, x = this.xmin, y = this.ymin; break; // left - } - if ((P[j] !== x || P[j + 1] !== y) && this.contains(i, x, y)) { - P.splice(j, 0, x, y), j += 2; - } - } - if (P.length > 4) { - for (let i = 0; i < P.length; i+= 2) { - const j = (i + 2) % P.length, k = (i + 4) % P.length; - if (P[i] === P[j] && P[j] === P[k] - || P[i + 1] === P[j + 1] && P[j + 1] === P[k + 1]) - P.splice(j, 2), i -= 2; - } - } - return j; - } - _project(x0, y0, vx, vy) { - let t = Infinity, c, x, y; - if (vy < 0) { // top - if (y0 <= this.ymin) return null; - if ((c = (this.ymin - y0) / vy) < t) y = this.ymin, x = x0 + (t = c) * vx; - } else if (vy > 0) { // bottom - if (y0 >= this.ymax) return null; - if ((c = (this.ymax - y0) / vy) < t) y = this.ymax, x = x0 + (t = c) * vx; - } - if (vx > 0) { // right - if (x0 >= this.xmax) return null; - if ((c = (this.xmax - x0) / vx) < t) x = this.xmax, y = y0 + (t = c) * vy; - } else if (vx < 0) { // left - if (x0 <= this.xmin) return null; - if ((c = (this.xmin - x0) / vx) < t) x = this.xmin, y = y0 + (t = c) * vy; - } - return [x, y]; - } - _edgecode(x, y) { - return (x === this.xmin ? 0b0001 - : x === this.xmax ? 0b0010 : 0b0000) - | (y === this.ymin ? 0b0100 - : y === this.ymax ? 0b1000 : 0b0000); - } - _regioncode(x, y) { - return (x < this.xmin ? 0b0001 - : x > this.xmax ? 0b0010 : 0b0000) - | (y < this.ymin ? 0b0100 - : y > this.ymax ? 0b1000 : 0b0000); - } -} - -const tau = 2 * Math.PI, pow = Math.pow; - -function pointX(p) { - return p[0]; -} - -function pointY(p) { - return p[1]; -} - -// A triangulation is collinear if all its triangles have a non-null area -function collinear(d) { - const {triangles, coords} = d; - for (let i = 0; i < triangles.length; i += 3) { - const a = 2 * triangles[i], - b = 2 * triangles[i + 1], - c = 2 * triangles[i + 2], - cross = (coords[c] - coords[a]) * (coords[b + 1] - coords[a + 1]) - - (coords[b] - coords[a]) * (coords[c + 1] - coords[a + 1]); - if (cross > 1e-10) return false; - } - return true; -} - -function jitter(x, y, r) { - return [x + Math.sin(x + y) * r, y + Math.cos(x - y) * r]; -} - -class Delaunay { - static from(points, fx = pointX, fy = pointY, that) { - return new Delaunay("length" in points - ? flatArray(points, fx, fy, that) - : Float64Array.from(flatIterable(points, fx, fy, that))); - } - constructor(points) { - this._delaunator = new Delaunator(points); - this.inedges = new Int32Array(points.length / 2); - this._hullIndex = new Int32Array(points.length / 2); - this.points = this._delaunator.coords; - this._init(); - } - update() { - this._delaunator.update(); - this._init(); - return this; - } - _init() { - const d = this._delaunator, points = this.points; - - // check for collinear - if (d.hull && d.hull.length > 2 && collinear(d)) { - this.collinear = Int32Array.from({length: points.length/2}, (_,i) => i) - .sort((i, j) => points[2 * i] - points[2 * j] || points[2 * i + 1] - points[2 * j + 1]); // for exact neighbors - const e = this.collinear[0], f = this.collinear[this.collinear.length - 1], - bounds = [ points[2 * e], points[2 * e + 1], points[2 * f], points[2 * f + 1] ], - r = 1e-8 * Math.hypot(bounds[3] - bounds[1], bounds[2] - bounds[0]); - for (let i = 0, n = points.length / 2; i < n; ++i) { - const p = jitter(points[2 * i], points[2 * i + 1], r); - points[2 * i] = p[0]; - points[2 * i + 1] = p[1]; - } - this._delaunator = new Delaunator(points); - } else { - delete this.collinear; - } - - const halfedges = this.halfedges = this._delaunator.halfedges; - const hull = this.hull = this._delaunator.hull; - const triangles = this.triangles = this._delaunator.triangles; - const inedges = this.inedges.fill(-1); - const hullIndex = this._hullIndex.fill(-1); - - // Compute an index from each point to an (arbitrary) incoming halfedge - // Used to give the first neighbor of each point; for this reason, - // on the hull we give priority to exterior halfedges - for (let e = 0, n = halfedges.length; e < n; ++e) { - const p = triangles[e % 3 === 2 ? e - 2 : e + 1]; - if (halfedges[e] === -1 || inedges[p] === -1) inedges[p] = e; - } - for (let i = 0, n = hull.length; i < n; ++i) { - hullIndex[hull[i]] = i; - } - - // degenerate case: 1 or 2 (distinct) points - if (hull.length <= 2 && hull.length > 0) { - this.triangles = new Int32Array(3).fill(-1); - this.halfedges = new Int32Array(3).fill(-1); - this.triangles[0] = hull[0]; - this.triangles[1] = hull[1]; - this.triangles[2] = hull[1]; - inedges[hull[0]] = 1; - if (hull.length === 2) inedges[hull[1]] = 0; - } - } - voronoi(bounds) { - return new Voronoi(this, bounds); - } - *neighbors(i) { - const {inedges, hull, _hullIndex, halfedges, triangles, collinear} = this; - - // degenerate case with several collinear points - if (collinear) { - const l = collinear.indexOf(i); - if (l > 0) yield collinear[l - 1]; - if (l < collinear.length - 1) yield collinear[l + 1]; - return; - } - - const e0 = inedges[i]; - if (e0 === -1) return; // coincident point - let e = e0, p0 = -1; - do { - yield p0 = triangles[e]; - e = e % 3 === 2 ? e - 2 : e + 1; - if (triangles[e] !== i) return; // bad triangulation - e = halfedges[e]; - if (e === -1) { - const p = hull[(_hullIndex[i] + 1) % hull.length]; - if (p !== p0) yield p; - return; - } - } while (e !== e0); - } - find(x, y, i = 0) { - if ((x = +x, x !== x) || (y = +y, y !== y)) return -1; - const i0 = i; - let c; - while ((c = this._step(i, x, y)) >= 0 && c !== i && c !== i0) i = c; - return c; - } - _step(i, x, y) { - const {inedges, hull, _hullIndex, halfedges, triangles, points} = this; - if (inedges[i] === -1 || !points.length) return (i + 1) % (points.length >> 1); - let c = i; - let dc = pow(x - points[i * 2], 2) + pow(y - points[i * 2 + 1], 2); - const e0 = inedges[i]; - let e = e0; - do { - let t = triangles[e]; - const dt = pow(x - points[t * 2], 2) + pow(y - points[t * 2 + 1], 2); - if (dt < dc) dc = dt, c = t; - e = e % 3 === 2 ? e - 2 : e + 1; - if (triangles[e] !== i) break; // bad triangulation - e = halfedges[e]; - if (e === -1) { - e = hull[(_hullIndex[i] + 1) % hull.length]; - if (e !== t) { - if (pow(x - points[e * 2], 2) + pow(y - points[e * 2 + 1], 2) < dc) return e; - } - break; - } - } while (e !== e0); - return c; - } - render(context) { - const buffer = context == null ? context = new Path : undefined; - const {points, halfedges, triangles} = this; - for (let i = 0, n = halfedges.length; i < n; ++i) { - const j = halfedges[i]; - if (j < i) continue; - const ti = triangles[i] * 2; - const tj = triangles[j] * 2; - context.moveTo(points[ti], points[ti + 1]); - context.lineTo(points[tj], points[tj + 1]); - } - this.renderHull(context); - return buffer && buffer.value(); - } - renderPoints(context, r = 2) { - const buffer = context == null ? context = new Path : undefined; - const {points} = this; - for (let i = 0, n = points.length; i < n; i += 2) { - const x = points[i], y = points[i + 1]; - context.moveTo(x + r, y); - context.arc(x, y, r, 0, tau); - } - return buffer && buffer.value(); - } - renderHull(context) { - const buffer = context == null ? context = new Path : undefined; - const {hull, points} = this; - const h = hull[0] * 2, n = hull.length; - context.moveTo(points[h], points[h + 1]); - for (let i = 1; i < n; ++i) { - const h = 2 * hull[i]; - context.lineTo(points[h], points[h + 1]); - } - context.closePath(); - return buffer && buffer.value(); - } - hullPolygon() { - const polygon = new Polygon; - this.renderHull(polygon); - return polygon.value(); - } - renderTriangle(i, context) { - const buffer = context == null ? context = new Path : undefined; - const {points, triangles} = this; - const t0 = triangles[i *= 3] * 2; - const t1 = triangles[i + 1] * 2; - const t2 = triangles[i + 2] * 2; - context.moveTo(points[t0], points[t0 + 1]); - context.lineTo(points[t1], points[t1 + 1]); - context.lineTo(points[t2], points[t2 + 1]); - context.closePath(); - return buffer && buffer.value(); - } - *trianglePolygons() { - const {triangles} = this; - for (let i = 0, n = triangles.length / 3; i < n; ++i) { - yield this.trianglePolygon(i); - } - } - trianglePolygon(i) { - const polygon = new Polygon; - this.renderTriangle(i, polygon); - return polygon.value(); - } -} - -function flatArray(points, fx, fy, that) { - const n = points.length; - const array = new Float64Array(n * 2); - for (let i = 0; i < n; ++i) { - const p = points[i]; - array[i * 2] = fx.call(that, p, i, points); - array[i * 2 + 1] = fy.call(that, p, i, points); - } - return array; -} - -function* flatIterable(points, fx, fy, that) { - let i = 0; - for (const p of points) { - yield fx.call(that, p, i, points); - yield fy.call(that, p, i, points); - ++i; - } -} - -exports.Delaunay = Delaunay; -exports.Voronoi = Voronoi; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-delaunay/dist/d3-delaunay.min.js b/node_modules/d3-delaunay/dist/d3-delaunay.min.js deleted file mode 100644 index 2473bdf2aa4498f9dc00e67abb209f7ea0f22ba2..0000000000000000000000000000000000000000 --- a/node_modules/d3-delaunay/dist/d3-delaunay.min.js +++ /dev/null @@ -1,3 +0,0 @@ -// https://github.com/d3/d3-delaunay v5.3.0 Copyright 2020 Mike Bostock -// https://github.com/mapbox/delaunator v4.0.1. Copyright 2019 Mapbox, Inc. -!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((t=t||self).d3=t.d3||{})}(this,function(t){"use strict";const i=Math.pow(2,-52),e=new Uint32Array(512);class n{static from(t,i=u,e=_){const s=t.length,h=new Float64Array(2*s);for(let n=0;n<s;n++){const s=t[n];h[2*n]=i(s),h[2*n+1]=e(s)}return new n(h)}constructor(t){const i=t.length>>1;if(i>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const e=Math.max(2*i-5,0);this._triangles=new Uint32Array(3*e),this._halfedges=new Int32Array(3*e),this._hashSize=Math.ceil(Math.sqrt(i)),this._hullPrev=new Uint32Array(i),this._hullNext=new Uint32Array(i),this._hullTri=new Uint32Array(i),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(i),this._dists=new Float64Array(i),this.update()}update(){const{coords:t,_hullPrev:e,_hullNext:n,_hullTri:h,_hullHash:r}=this,c=t.length>>1;let u=1/0,_=1/0,f=-1/0,d=-1/0;for(let i=0;i<c;i++){const e=t[2*i],n=t[2*i+1];e<u&&(u=e),n<_&&(_=n),e>f&&(f=e),n>d&&(d=n),this._ids[i]=i}const g=(u+f)/2,y=(_+d)/2;let m,x,p,w=1/0;for(let i=0;i<c;i++){const e=s(g,y,t[2*i],t[2*i+1]);e<w&&(m=i,w=e)}const v=t[2*m],b=t[2*m+1];w=1/0;for(let i=0;i<c;i++){if(i===m)continue;const e=s(v,b,t[2*i],t[2*i+1]);e<w&&e>0&&(x=i,w=e)}let T=t[2*x],M=t[2*x+1],A=1/0;for(let i=0;i<c;i++){if(i===m||i===x)continue;const e=o(v,b,T,M,t[2*i],t[2*i+1]);e<A&&(p=i,A=e)}let k=t[2*p],$=t[2*p+1];if(A===1/0){for(let i=0;i<c;i++)this._dists[i]=t[2*i]-t[0]||t[2*i+1]-t[1];a(this._ids,this._dists,0,c-1);const i=new Uint32Array(c);let e=0;for(let t=0,n=-1/0;t<c;t++){const s=this._ids[t];this._dists[s]>n&&(i[e++]=s,n=this._dists[s])}return this.hull=i.subarray(0,e),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(l(v,b,T,M,k,$)){const t=x,i=T,e=M;x=p,T=k,M=$,p=t,k=i,$=e}const P=function(t,i,e,n,s,h){const l=e-t,r=n-i,o=s-t,a=h-i,c=l*l+r*r,u=o*o+a*a,_=.5/(l*a-r*o);return{x:t+(a*c-r*u)*_,y:i+(l*u-o*c)*_}}(v,b,T,M,k,$);this._cx=P.x,this._cy=P.y;for(let i=0;i<c;i++)this._dists[i]=s(t[2*i],t[2*i+1],P.x,P.y);a(this._ids,this._dists,0,c-1),this._hullStart=m;let S=3;n[m]=e[p]=x,n[x]=e[m]=p,n[p]=e[x]=m,h[m]=0,h[x]=1,h[p]=2,r.fill(-1),r[this._hashKey(v,b)]=m,r[this._hashKey(T,M)]=x,r[this._hashKey(k,$)]=p,this.trianglesLen=0,this._addTriangle(m,x,p,-1,-1,-1);for(let s,o,a=0;a<this._ids.length;a++){const c=this._ids[a],u=t[2*c],_=t[2*c+1];if(a>0&&Math.abs(u-s)<=i&&Math.abs(_-o)<=i)continue;if(s=u,o=_,c===m||c===x||c===p)continue;let f=0;for(let t=0,i=this._hashKey(u,_);t<this._hashSize&&(-1===(f=r[(i+t)%this._hashSize])||f===n[f]);t++);let d,g=f=e[f];for(;d=n[g],!l(u,_,t[2*g],t[2*g+1],t[2*d],t[2*d+1]);)if((g=d)===f){g=-1;break}if(-1===g)continue;let y=this._addTriangle(g,c,n[g],-1,-1,h[g]);h[c]=this._legalize(y+2),h[g]=y,S++;let w=n[g];for(;d=n[w],l(u,_,t[2*w],t[2*w+1],t[2*d],t[2*d+1]);)y=this._addTriangle(w,c,d,h[c],-1,h[w]),h[c]=this._legalize(y+2),n[w]=w,S--,w=d;if(g===f)for(;l(u,_,t[2*(d=e[g])],t[2*d+1],t[2*g],t[2*g+1]);)y=this._addTriangle(d,c,g,-1,h[g],h[d]),this._legalize(y+2),h[d]=y,n[g]=g,S--,g=d;this._hullStart=e[c]=g,n[g]=e[w]=c,n[c]=w,r[this._hashKey(u,_)]=c,r[this._hashKey(t[2*g],t[2*g+1])]=g}this.hull=new Uint32Array(S);for(let t=0,i=this._hullStart;t<S;t++)this.hull[t]=i,i=n[i];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,i){return Math.floor(function(t,i){const e=t/(Math.abs(t)+Math.abs(i));return(i>0?3-e:1+e)/4}(t-this._cx,i-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:i,_halfedges:n,coords:s}=this;let h=0,l=0;for(;;){const o=n[t],a=t-t%3;if(l=a+(t+2)%3,-1===o){if(0===h)break;t=e[--h];continue}const c=o-o%3,u=a+(t+1)%3,_=c+(o+2)%3,f=i[l],d=i[t],g=i[u],y=i[_];if(r(s[2*f],s[2*f+1],s[2*d],s[2*d+1],s[2*g],s[2*g+1],s[2*y],s[2*y+1])){i[t]=y,i[o]=f;const s=n[_];if(-1===s){let i=this._hullStart;do{if(this._hullTri[i]===_){this._hullTri[i]=t;break}i=this._hullPrev[i]}while(i!==this._hullStart)}this._link(t,s),this._link(o,n[l]),this._link(l,_);const r=c+(o+1)%3;h<e.length&&(e[h++]=r)}else{if(0===h)break;t=e[--h]}}return l}_link(t,i){this._halfedges[t]=i,-1!==i&&(this._halfedges[i]=t)}_addTriangle(t,i,e,n,s,h){const l=this.trianglesLen;return this._triangles[l]=t,this._triangles[l+1]=i,this._triangles[l+2]=e,this._link(l,n),this._link(l+1,s),this._link(l+2,h),this.trianglesLen+=3,l}}function s(t,i,e,n){const s=t-e,h=i-n;return s*s+h*h}function h(t,i,e,n,s,h){const l=(n-i)*(s-t),r=(e-t)*(h-i);return Math.abs(l-r)>=33306690738754716e-32*Math.abs(l+r)?l-r:0}function l(t,i,e,n,s,l){return(h(s,l,t,i,e,n)||h(t,i,e,n,s,l)||h(e,n,s,l,t,i))<0}function r(t,i,e,n,s,h,l,r){const o=t-l,a=i-r,c=e-l,u=n-r,_=s-l,f=h-r,d=c*c+u*u,g=_*_+f*f;return o*(u*g-d*f)-a*(c*g-d*_)+(o*o+a*a)*(c*f-u*_)<0}function o(t,i,e,n,s,h){const l=e-t,r=n-i,o=s-t,a=h-i,c=l*l+r*r,u=o*o+a*a,_=.5/(l*a-r*o),f=(a*c-r*u)*_,d=(l*u-o*c)*_;return f*f+d*d}function a(t,i,e,n){if(n-e<=20)for(let s=e+1;s<=n;s++){const n=t[s],h=i[n];let l=s-1;for(;l>=e&&i[t[l]]>h;)t[l+1]=t[l--];t[l+1]=n}else{let s=e+1,h=n;c(t,e+n>>1,s),i[t[e]]>i[t[n]]&&c(t,e,n),i[t[s]]>i[t[n]]&&c(t,s,n),i[t[e]]>i[t[s]]&&c(t,e,s);const l=t[s],r=i[l];for(;;){do{s++}while(i[t[s]]<r);do{h--}while(i[t[h]]>r);if(h<s)break;c(t,s,h)}t[e+1]=t[h],t[h]=l,n-s+1>=h-e?(a(t,i,s,n),a(t,i,e,h-1)):(a(t,i,e,h-1),a(t,i,s,n))}}function c(t,i,e){const n=t[i];t[i]=t[e],t[e]=n}function u(t){return t[0]}function _(t){return t[1]}const f=1e-6;class d{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,i){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,i){this._+=`L${this._x1=+t},${this._y1=+i}`}arc(t,i,e){const n=(t=+t)+(e=+e),s=i=+i;if(e<0)throw new Error("negative radius");null===this._x1?this._+=`M${n},${s}`:(Math.abs(this._x1-n)>f||Math.abs(this._y1-s)>f)&&(this._+="L"+n+","+s),e&&(this._+=`A${e},${e},0,1,1,${t-e},${i}A${e},${e},0,1,1,${this._x1=n},${this._y1=s}`)}rect(t,i,e,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${+e}v${+n}h${-e}Z`}value(){return this._||null}}class g{constructor(){this._=[]}moveTo(t,i){this._.push([t,i])}closePath(){this._.push(this._[0].slice())}lineTo(t,i){this._.push([t,i])}value(){return this._.length?this._:null}}class y{constructor(t,[i,e,n,s]=[0,0,960,500]){if(!((n=+n)>=(i=+i)&&(s=+s)>=(e=+e)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=n,this.xmin=i,this.ymax=s,this.ymin=e,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:i,triangles:e},vectors:n}=this,s=this.circumcenters=this._circumcenters.subarray(0,e.length/3*2);for(let i,n,h=0,l=0,r=e.length;h<r;h+=3,l+=2){const r=2*e[h],o=2*e[h+1],a=2*e[h+2],c=t[r],u=t[r+1],_=t[o],f=t[o+1],d=t[a],g=t[a+1],y=_-c,m=f-u,x=d-c,p=g-u,w=y*y+m*m,v=x*x+p*p,b=2*(y*p-m*x);if(b)if(Math.abs(b)<1e-8)i=(c+d)/2,n=(u+g)/2;else{const t=1/b;i=c+(p*w-m*v)*t,n=u+(y*v-x*w)*t}else i=(c+d)/2-1e8*p,n=(u+g)/2+1e8*x;s[l]=i,s[l+1]=n}let h,l,r,o=i[i.length-1],a=4*o,c=t[2*o],u=t[2*o+1];n.fill(0);for(let e=0;e<i.length;++e)h=a,l=c,r=u,a=4*(o=i[e]),c=t[2*o],u=t[2*o+1],n[h+2]=n[a]=r-u,n[h+3]=n[a+1]=c-l}render(t){const i=null==t?t=new d:void 0,{delaunay:{halfedges:e,inedges:n,hull:s},circumcenters:h,vectors:l}=this;if(s.length<=1)return null;for(let i=0,n=e.length;i<n;++i){const n=e[i];if(n<i)continue;const s=2*Math.floor(i/3),l=2*Math.floor(n/3),r=h[s],o=h[s+1],a=h[l],c=h[l+1];this._renderSegment(r,o,a,c,t)}let r,o=s[s.length-1];for(let i=0;i<s.length;++i){r=o,o=s[i];const e=2*Math.floor(n[o]/3),a=h[e],c=h[e+1],u=4*r,_=this._project(a,c,l[u+2],l[u+3]);_&&this._renderSegment(a,c,_[0],_[1],t)}return i&&i.value()}renderBounds(t){const i=null==t?t=new d:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),i&&i.value()}renderCell(t,i){const e=null==i?i=new d:void 0,n=this._clip(t);if(null===n||!n.length)return;i.moveTo(n[0],n[1]);let s=n.length;for(;n[0]===n[s-2]&&n[1]===n[s-1]&&s>1;)s-=2;for(let t=2;t<s;t+=2)n[t]===n[t-2]&&n[t+1]===n[t-1]||i.lineTo(n[t],n[t+1]);return i.closePath(),e&&e.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let i=0,e=t.length/2;i<e;++i){const t=this.cellPolygon(i);t&&(t.index=i,yield t)}}cellPolygon(t){const i=new g;return this.renderCell(t,i),i.value()}_renderSegment(t,i,e,n,s){let h;const l=this._regioncode(t,i),r=this._regioncode(e,n);0===l&&0===r?(s.moveTo(t,i),s.lineTo(e,n)):(h=this._clipSegment(t,i,e,n,l,r))&&(s.moveTo(h[0],h[1]),s.lineTo(h[2],h[3]))}contains(t,i,e){return(i=+i)==i&&(e=+e)==e&&this.delaunay._step(t,i,e)===t}*neighbors(t){const i=this._clip(t);if(i)for(const e of this.delaunay.neighbors(t)){const t=this._clip(e);if(t)t:for(let n=0,s=i.length;n<s;n+=2)for(let h=0,l=t.length;h<l;h+=2)if(i[n]==t[h]&&i[n+1]==t[h+1]&&i[(n+2)%s]==t[(h+l-2)%l]&&i[(n+3)%s]==t[(h+l-1)%l]){yield e;break t}}}_cell(t){const{circumcenters:i,delaunay:{inedges:e,halfedges:n,triangles:s}}=this,h=e[t];if(-1===h)return null;const l=[];let r=h;do{const e=Math.floor(r/3);if(l.push(i[2*e],i[2*e+1]),s[r=r%3==2?r-2:r+1]!==t)break;r=n[r]}while(r!==h&&-1!==r);return l}_clip(t){if(0===t&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const i=this._cell(t);if(null===i)return null;const{vectors:e}=this,n=4*t;return e[n]||e[n+1]?this._clipInfinite(t,i,e[n],e[n+1],e[n+2],e[n+3]):this._clipFinite(t,i)}_clipFinite(t,i){const e=i.length;let n,s,h,l,r,o=null,a=i[e-2],c=i[e-1],u=this._regioncode(a,c);for(let _=0;_<e;_+=2)if(n=a,s=c,a=i[_],c=i[_+1],h=u,u=this._regioncode(a,c),0===h&&0===u)l=r,r=0,o?o.push(a,c):o=[a,c];else{let i,e,_,f,d;if(0===h){if(null===(i=this._clipSegment(n,s,a,c,h,u)))continue;[e,_,f,d]=i}else{if(null===(i=this._clipSegment(a,c,n,s,u,h)))continue;[f,d,e,_]=i,l=r,r=this._edgecode(e,_),l&&r&&this._edge(t,l,r,o,o.length),o?o.push(e,_):o=[e,_]}l=r,r=this._edgecode(f,d),l&&r&&this._edge(t,l,r,o,o.length),o?o.push(f,d):o=[f,d]}if(o)l=r,r=this._edgecode(o[0],o[1]),l&&r&&this._edge(t,l,r,o,o.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return o}_clipSegment(t,i,e,n,s,h){for(;;){if(0===s&&0===h)return[t,i,e,n];if(s&h)return null;let l,r,o=s||h;8&o?(l=t+(e-t)*(this.ymax-i)/(n-i),r=this.ymax):4&o?(l=t+(e-t)*(this.ymin-i)/(n-i),r=this.ymin):2&o?(r=i+(n-i)*(this.xmax-t)/(e-t),l=this.xmax):(r=i+(n-i)*(this.xmin-t)/(e-t),l=this.xmin),s?(t=l,i=r,s=this._regioncode(t,i)):(e=l,n=r,h=this._regioncode(e,n))}}_clipInfinite(t,i,e,n,s,h){let l,r=Array.from(i);if((l=this._project(r[0],r[1],e,n))&&r.unshift(l[0],l[1]),(l=this._project(r[r.length-2],r[r.length-1],s,h))&&r.push(l[0],l[1]),r=this._clipFinite(t,r))for(let i,e=0,n=r.length,s=this._edgecode(r[n-2],r[n-1]);e<n;e+=2)i=s,s=this._edgecode(r[e],r[e+1]),i&&s&&(e=this._edge(t,i,s,r,e),n=r.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(r=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return r}_edge(t,i,e,n,s){for(;i!==e;){let e,h;switch(i){case 5:i=4;continue;case 4:i=6,e=this.xmax,h=this.ymin;break;case 6:i=2;continue;case 2:i=10,e=this.xmax,h=this.ymax;break;case 10:i=8;continue;case 8:i=9,e=this.xmin,h=this.ymax;break;case 9:i=1;continue;case 1:i=5,e=this.xmin,h=this.ymin}n[s]===e&&n[s+1]===h||!this.contains(t,e,h)||(n.splice(s,0,e,h),s+=2)}if(n.length>4)for(let t=0;t<n.length;t+=2){const i=(t+2)%n.length,e=(t+4)%n.length;(n[t]===n[i]&&n[i]===n[e]||n[t+1]===n[i+1]&&n[i+1]===n[e+1])&&(n.splice(i,2),t-=2)}return s}_project(t,i,e,n){let s,h,l,r=1/0;if(n<0){if(i<=this.ymin)return null;(s=(this.ymin-i)/n)<r&&(l=this.ymin,h=t+(r=s)*e)}else if(n>0){if(i>=this.ymax)return null;(s=(this.ymax-i)/n)<r&&(l=this.ymax,h=t+(r=s)*e)}if(e>0){if(t>=this.xmax)return null;(s=(this.xmax-t)/e)<r&&(h=this.xmax,l=i+(r=s)*n)}else if(e<0){if(t<=this.xmin)return null;(s=(this.xmin-t)/e)<r&&(h=this.xmin,l=i+(r=s)*n)}return[h,l]}_edgecode(t,i){return(t===this.xmin?1:t===this.xmax?2:0)|(i===this.ymin?4:i===this.ymax?8:0)}_regioncode(t,i){return(t<this.xmin?1:t>this.xmax?2:0)|(i<this.ymin?4:i>this.ymax?8:0)}}const m=2*Math.PI,x=Math.pow;function p(t){return t[0]}function w(t){return t[1]}function v(t,i,e){return[t+Math.sin(t+i)*e,i+Math.cos(t-i)*e]}class b{static from(t,i=p,e=w,n){return new b("length"in t?function(t,i,e,n){const s=t.length,h=new Float64Array(2*s);for(let l=0;l<s;++l){const s=t[l];h[2*l]=i.call(n,s,l,t),h[2*l+1]=e.call(n,s,l,t)}return h}(t,i,e,n):Float64Array.from(function*(t,i,e,n){let s=0;for(const h of t)yield i.call(n,h,s,t),yield e.call(n,h,s,t),++s}(t,i,e,n)))}constructor(t){this._delaunator=new n(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,i=this.points;if(t.hull&&t.hull.length>2&&function(t){const{triangles:i,coords:e}=t;for(let t=0;t<i.length;t+=3){const n=2*i[t],s=2*i[t+1],h=2*i[t+2];if((e[h]-e[n])*(e[s+1]-e[n+1])-(e[s]-e[n])*(e[h+1]-e[n+1])>1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:i.length/2},(t,i)=>i).sort((t,e)=>i[2*t]-i[2*e]||i[2*t+1]-i[2*e+1]);const t=this.collinear[0],e=this.collinear[this.collinear.length-1],s=[i[2*t],i[2*t+1],i[2*e],i[2*e+1]],h=1e-8*Math.hypot(s[3]-s[1],s[2]-s[0]);for(let t=0,e=i.length/2;t<e;++t){const e=v(i[2*t],i[2*t+1],h);i[2*t]=e[0],i[2*t+1]=e[1]}this._delaunator=new n(i)}else delete this.collinear;const e=this.halfedges=this._delaunator.halfedges,s=this.hull=this._delaunator.hull,h=this.triangles=this._delaunator.triangles,l=this.inedges.fill(-1),r=this._hullIndex.fill(-1);for(let t=0,i=e.length;t<i;++t){const i=h[t%3==2?t-2:t+1];-1!==e[t]&&-1!==l[i]||(l[i]=t)}for(let t=0,i=s.length;t<i;++t)r[s[t]]=t;s.length<=2&&s.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=s[0],this.triangles[1]=s[1],this.triangles[2]=s[1],l[s[0]]=1,2===s.length&&(l[s[1]]=0))}voronoi(t){return new y(this,t)}*neighbors(t){const{inedges:i,hull:e,_hullIndex:n,halfedges:s,triangles:h,collinear:l}=this;if(l){const i=l.indexOf(t);return i>0&&(yield l[i-1]),void(i<l.length-1&&(yield l[i+1]))}const r=i[t];if(-1===r)return;let o=r,a=-1;do{if(yield a=h[o],h[o=o%3==2?o-2:o+1]!==t)return;if(-1===(o=s[o])){const i=e[(n[t]+1)%e.length];return void(i!==a&&(yield i))}}while(o!==r)}find(t,i,e=0){if((t=+t)!=t||(i=+i)!=i)return-1;const n=e;let s;for(;(s=this._step(e,t,i))>=0&&s!==e&&s!==n;)e=s;return s}_step(t,i,e){const{inedges:n,hull:s,_hullIndex:h,halfedges:l,triangles:r,points:o}=this;if(-1===n[t]||!o.length)return(t+1)%(o.length>>1);let a=t,c=x(i-o[2*t],2)+x(e-o[2*t+1],2);const u=n[t];let _=u;do{let n=r[_];const u=x(i-o[2*n],2)+x(e-o[2*n+1],2);if(u<c&&(c=u,a=n),r[_=_%3==2?_-2:_+1]!==t)break;if(-1===(_=l[_])){if((_=s[(h[t]+1)%s.length])!==n&&x(i-o[2*_],2)+x(e-o[2*_+1],2)<c)return _;break}}while(_!==u);return a}render(t){const i=null==t?t=new d:void 0,{points:e,halfedges:n,triangles:s}=this;for(let i=0,h=n.length;i<h;++i){const h=n[i];if(h<i)continue;const l=2*s[i],r=2*s[h];t.moveTo(e[l],e[l+1]),t.lineTo(e[r],e[r+1])}return this.renderHull(t),i&&i.value()}renderPoints(t,i=2){const e=null==t?t=new d:void 0,{points:n}=this;for(let e=0,s=n.length;e<s;e+=2){const s=n[e],h=n[e+1];t.moveTo(s+i,h),t.arc(s,h,i,0,m)}return e&&e.value()}renderHull(t){const i=null==t?t=new d:void 0,{hull:e,points:n}=this,s=2*e[0],h=e.length;t.moveTo(n[s],n[s+1]);for(let i=1;i<h;++i){const s=2*e[i];t.lineTo(n[s],n[s+1])}return t.closePath(),i&&i.value()}hullPolygon(){const t=new g;return this.renderHull(t),t.value()}renderTriangle(t,i){const e=null==i?i=new d:void 0,{points:n,triangles:s}=this,h=2*s[t*=3],l=2*s[t+1],r=2*s[t+2];return i.moveTo(n[h],n[h+1]),i.lineTo(n[l],n[l+1]),i.lineTo(n[r],n[r+1]),i.closePath(),e&&e.value()}*trianglePolygons(){const{triangles:t}=this;for(let i=0,e=t.length/3;i<e;++i)yield this.trianglePolygon(i)}trianglePolygon(t){const i=new g;return this.renderTriangle(t,i),i.value()}}t.Delaunay=b,t.Voronoi=y,Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/node_modules/d3-delaunay/package.json b/node_modules/d3-delaunay/package.json deleted file mode 100644 index 5eb050053451397280abbeda739f07a4cb539d6b..0000000000000000000000000000000000000000 --- a/node_modules/d3-delaunay/package.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "_from": "d3-delaunay@5", - "_id": "d3-delaunay@5.3.0", - "_inBundle": false, - "_integrity": "sha512-amALSrOllWVLaHTnDLHwMIiz0d1bBu9gZXd1FiLfXf8sHcX9jrcj81TVZOqD4UX7MgBZZ07c8GxzEgBpJqc74w==", - "_location": "/d3-delaunay", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-delaunay@5", - "name": "d3-delaunay", - "escapedName": "d3-delaunay", - "rawSpec": "5", - "saveSpec": null, - "fetchSpec": "5" - }, - "_requiredBy": [ - "/d3" - ], - "_resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-5.3.0.tgz", - "_shasum": "b47f05c38f854a4e7b3cea80e0bb12e57398772d", - "_spec": "d3-delaunay@5", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "https://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-delaunay/issues" - }, - "bundleDependencies": false, - "contributors": [ - { - "name": "Vladimir Agafonkin", - "url": "https://agafonkin.com" - }, - { - "name": "Philippe Rivière", - "url": "https://visionscarto.net" - } - ], - "dependencies": { - "delaunator": "4" - }, - "deprecated": false, - "description": "Compute the Voronoi diagram of a set of two-dimensional points.", - "devDependencies": { - "@observablehq/tape": "~0.0.1", - "eslint": "6", - "esm": "3", - "rollup": "1", - "rollup-plugin-node-resolve": "5", - "rollup-plugin-terser": "5" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://github.com/d3/d3-delaunay", - "keywords": [ - "voronoi", - "delaunay", - "geometry" - ], - "license": "ISC", - "main": "dist/d3-delaunay.js", - "module": "src/index.js", - "name": "d3-delaunay", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-delaunay.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "yarn test && rm -rf dist && rollup -c", - "test": "tape -r esm 'test/**/*-test.js' && eslint src test" - }, - "sideEffects": false, - "unpkg": "dist/d3-delaunay.min.js", - "version": "5.3.0" -} diff --git a/node_modules/d3-delaunay/src/delaunay.js b/node_modules/d3-delaunay/src/delaunay.js deleted file mode 100644 index 8be1933834f9d0ca9ecc7417e14da5bc2f1fbb91..0000000000000000000000000000000000000000 --- a/node_modules/d3-delaunay/src/delaunay.js +++ /dev/null @@ -1,244 +0,0 @@ -import Delaunator from "delaunator"; -import Path from "./path.js"; -import Polygon from "./polygon.js"; -import Voronoi from "./voronoi.js"; - -const tau = 2 * Math.PI, pow = Math.pow; - -function pointX(p) { - return p[0]; -} - -function pointY(p) { - return p[1]; -} - -// A triangulation is collinear if all its triangles have a non-null area -function collinear(d) { - const {triangles, coords} = d; - for (let i = 0; i < triangles.length; i += 3) { - const a = 2 * triangles[i], - b = 2 * triangles[i + 1], - c = 2 * triangles[i + 2], - cross = (coords[c] - coords[a]) * (coords[b + 1] - coords[a + 1]) - - (coords[b] - coords[a]) * (coords[c + 1] - coords[a + 1]); - if (cross > 1e-10) return false; - } - return true; -} - -function jitter(x, y, r) { - return [x + Math.sin(x + y) * r, y + Math.cos(x - y) * r]; -} - -export default class Delaunay { - static from(points, fx = pointX, fy = pointY, that) { - return new Delaunay("length" in points - ? flatArray(points, fx, fy, that) - : Float64Array.from(flatIterable(points, fx, fy, that))); - } - constructor(points) { - this._delaunator = new Delaunator(points); - this.inedges = new Int32Array(points.length / 2); - this._hullIndex = new Int32Array(points.length / 2); - this.points = this._delaunator.coords; - this._init(); - } - update() { - this._delaunator.update(); - this._init(); - return this; - } - _init() { - const d = this._delaunator, points = this.points; - - // check for collinear - if (d.hull && d.hull.length > 2 && collinear(d)) { - this.collinear = Int32Array.from({length: points.length/2}, (_,i) => i) - .sort((i, j) => points[2 * i] - points[2 * j] || points[2 * i + 1] - points[2 * j + 1]); // for exact neighbors - const e = this.collinear[0], f = this.collinear[this.collinear.length - 1], - bounds = [ points[2 * e], points[2 * e + 1], points[2 * f], points[2 * f + 1] ], - r = 1e-8 * Math.hypot(bounds[3] - bounds[1], bounds[2] - bounds[0]); - for (let i = 0, n = points.length / 2; i < n; ++i) { - const p = jitter(points[2 * i], points[2 * i + 1], r); - points[2 * i] = p[0]; - points[2 * i + 1] = p[1]; - } - this._delaunator = new Delaunator(points); - } else { - delete this.collinear; - } - - const halfedges = this.halfedges = this._delaunator.halfedges; - const hull = this.hull = this._delaunator.hull; - const triangles = this.triangles = this._delaunator.triangles; - const inedges = this.inedges.fill(-1); - const hullIndex = this._hullIndex.fill(-1); - - // Compute an index from each point to an (arbitrary) incoming halfedge - // Used to give the first neighbor of each point; for this reason, - // on the hull we give priority to exterior halfedges - for (let e = 0, n = halfedges.length; e < n; ++e) { - const p = triangles[e % 3 === 2 ? e - 2 : e + 1]; - if (halfedges[e] === -1 || inedges[p] === -1) inedges[p] = e; - } - for (let i = 0, n = hull.length; i < n; ++i) { - hullIndex[hull[i]] = i; - } - - // degenerate case: 1 or 2 (distinct) points - if (hull.length <= 2 && hull.length > 0) { - this.triangles = new Int32Array(3).fill(-1); - this.halfedges = new Int32Array(3).fill(-1); - this.triangles[0] = hull[0]; - this.triangles[1] = hull[1]; - this.triangles[2] = hull[1]; - inedges[hull[0]] = 1; - if (hull.length === 2) inedges[hull[1]] = 0; - } - } - voronoi(bounds) { - return new Voronoi(this, bounds); - } - *neighbors(i) { - const {inedges, hull, _hullIndex, halfedges, triangles, collinear} = this; - - // degenerate case with several collinear points - if (collinear) { - const l = collinear.indexOf(i); - if (l > 0) yield collinear[l - 1]; - if (l < collinear.length - 1) yield collinear[l + 1]; - return; - } - - const e0 = inedges[i]; - if (e0 === -1) return; // coincident point - let e = e0, p0 = -1; - do { - yield p0 = triangles[e]; - e = e % 3 === 2 ? e - 2 : e + 1; - if (triangles[e] !== i) return; // bad triangulation - e = halfedges[e]; - if (e === -1) { - const p = hull[(_hullIndex[i] + 1) % hull.length]; - if (p !== p0) yield p; - return; - } - } while (e !== e0); - } - find(x, y, i = 0) { - if ((x = +x, x !== x) || (y = +y, y !== y)) return -1; - const i0 = i; - let c; - while ((c = this._step(i, x, y)) >= 0 && c !== i && c !== i0) i = c; - return c; - } - _step(i, x, y) { - const {inedges, hull, _hullIndex, halfedges, triangles, points} = this; - if (inedges[i] === -1 || !points.length) return (i + 1) % (points.length >> 1); - let c = i; - let dc = pow(x - points[i * 2], 2) + pow(y - points[i * 2 + 1], 2); - const e0 = inedges[i]; - let e = e0; - do { - let t = triangles[e]; - const dt = pow(x - points[t * 2], 2) + pow(y - points[t * 2 + 1], 2); - if (dt < dc) dc = dt, c = t; - e = e % 3 === 2 ? e - 2 : e + 1; - if (triangles[e] !== i) break; // bad triangulation - e = halfedges[e]; - if (e === -1) { - e = hull[(_hullIndex[i] + 1) % hull.length]; - if (e !== t) { - if (pow(x - points[e * 2], 2) + pow(y - points[e * 2 + 1], 2) < dc) return e; - } - break; - } - } while (e !== e0); - return c; - } - render(context) { - const buffer = context == null ? context = new Path : undefined; - const {points, halfedges, triangles} = this; - for (let i = 0, n = halfedges.length; i < n; ++i) { - const j = halfedges[i]; - if (j < i) continue; - const ti = triangles[i] * 2; - const tj = triangles[j] * 2; - context.moveTo(points[ti], points[ti + 1]); - context.lineTo(points[tj], points[tj + 1]); - } - this.renderHull(context); - return buffer && buffer.value(); - } - renderPoints(context, r = 2) { - const buffer = context == null ? context = new Path : undefined; - const {points} = this; - for (let i = 0, n = points.length; i < n; i += 2) { - const x = points[i], y = points[i + 1]; - context.moveTo(x + r, y); - context.arc(x, y, r, 0, tau); - } - return buffer && buffer.value(); - } - renderHull(context) { - const buffer = context == null ? context = new Path : undefined; - const {hull, points} = this; - const h = hull[0] * 2, n = hull.length; - context.moveTo(points[h], points[h + 1]); - for (let i = 1; i < n; ++i) { - const h = 2 * hull[i]; - context.lineTo(points[h], points[h + 1]); - } - context.closePath(); - return buffer && buffer.value(); - } - hullPolygon() { - const polygon = new Polygon; - this.renderHull(polygon); - return polygon.value(); - } - renderTriangle(i, context) { - const buffer = context == null ? context = new Path : undefined; - const {points, triangles} = this; - const t0 = triangles[i *= 3] * 2; - const t1 = triangles[i + 1] * 2; - const t2 = triangles[i + 2] * 2; - context.moveTo(points[t0], points[t0 + 1]); - context.lineTo(points[t1], points[t1 + 1]); - context.lineTo(points[t2], points[t2 + 1]); - context.closePath(); - return buffer && buffer.value(); - } - *trianglePolygons() { - const {triangles} = this; - for (let i = 0, n = triangles.length / 3; i < n; ++i) { - yield this.trianglePolygon(i); - } - } - trianglePolygon(i) { - const polygon = new Polygon; - this.renderTriangle(i, polygon); - return polygon.value(); - } -} - -function flatArray(points, fx, fy, that) { - const n = points.length; - const array = new Float64Array(n * 2); - for (let i = 0; i < n; ++i) { - const p = points[i]; - array[i * 2] = fx.call(that, p, i, points); - array[i * 2 + 1] = fy.call(that, p, i, points); - } - return array; -} - -function* flatIterable(points, fx, fy, that) { - let i = 0; - for (const p of points) { - yield fx.call(that, p, i, points); - yield fy.call(that, p, i, points); - ++i; - } -} diff --git a/node_modules/d3-delaunay/src/index.js b/node_modules/d3-delaunay/src/index.js deleted file mode 100644 index dc9022e8c2bb6d7c579d0f057c53d02ae0091873..0000000000000000000000000000000000000000 --- a/node_modules/d3-delaunay/src/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export {default as Delaunay} from "./delaunay.js"; -export {default as Voronoi} from "./voronoi.js"; diff --git a/node_modules/d3-delaunay/src/path.js b/node_modules/d3-delaunay/src/path.js deleted file mode 100644 index 0eaa69e37bef8e3c503e750531e459e2f42db803..0000000000000000000000000000000000000000 --- a/node_modules/d3-delaunay/src/path.js +++ /dev/null @@ -1,37 +0,0 @@ -const epsilon = 1e-6; - -export default class Path { - constructor() { - this._x0 = this._y0 = // start of current subpath - this._x1 = this._y1 = null; // end of current subpath - this._ = ""; - } - moveTo(x, y) { - this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`; - } - closePath() { - if (this._x1 !== null) { - this._x1 = this._x0, this._y1 = this._y0; - this._ += "Z"; - } - } - lineTo(x, y) { - this._ += `L${this._x1 = +x},${this._y1 = +y}`; - } - arc(x, y, r) { - x = +x, y = +y, r = +r; - const x0 = x + r; - const y0 = y; - if (r < 0) throw new Error("negative radius"); - if (this._x1 === null) this._ += `M${x0},${y0}`; - else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) this._ += "L" + x0 + "," + y0; - if (!r) return; - this._ += `A${r},${r},0,1,1,${x - r},${y}A${r},${r},0,1,1,${this._x1 = x0},${this._y1 = y0}`; - } - rect(x, y, w, h) { - this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${+w}v${+h}h${-w}Z`; - } - value() { - return this._ || null; - } -} diff --git a/node_modules/d3-delaunay/src/polygon.js b/node_modules/d3-delaunay/src/polygon.js deleted file mode 100644 index bdbbdc308ae81108d2e2b376a8accd188cfe4aa9..0000000000000000000000000000000000000000 --- a/node_modules/d3-delaunay/src/polygon.js +++ /dev/null @@ -1,17 +0,0 @@ -export default class Polygon { - constructor() { - this._ = []; - } - moveTo(x, y) { - this._.push([x, y]); - } - closePath() { - this._.push(this._[0].slice()); - } - lineTo(x, y) { - this._.push([x, y]); - } - value() { - return this._.length ? this._ : null; - } -} diff --git a/node_modules/d3-delaunay/src/voronoi.js b/node_modules/d3-delaunay/src/voronoi.js deleted file mode 100644 index b2d8d49e5185aad2aa94bc336b7885ed2cf0b6cc..0000000000000000000000000000000000000000 --- a/node_modules/d3-delaunay/src/voronoi.js +++ /dev/null @@ -1,320 +0,0 @@ -import Path from "./path.js"; -import Polygon from "./polygon.js"; - -export default class Voronoi { - constructor(delaunay, [xmin, ymin, xmax, ymax] = [0, 0, 960, 500]) { - if (!((xmax = +xmax) >= (xmin = +xmin)) || !((ymax = +ymax) >= (ymin = +ymin))) throw new Error("invalid bounds"); - this.delaunay = delaunay; - this._circumcenters = new Float64Array(delaunay.points.length * 2); - this.vectors = new Float64Array(delaunay.points.length * 2); - this.xmax = xmax, this.xmin = xmin; - this.ymax = ymax, this.ymin = ymin; - this._init(); - } - update() { - this.delaunay.update(); - this._init(); - return this; - } - _init() { - const {delaunay: {points, hull, triangles}, vectors} = this; - - // Compute circumcenters. - const circumcenters = this.circumcenters = this._circumcenters.subarray(0, triangles.length / 3 * 2); - for (let i = 0, j = 0, n = triangles.length, x, y; i < n; i += 3, j += 2) { - const t1 = triangles[i] * 2; - const t2 = triangles[i + 1] * 2; - const t3 = triangles[i + 2] * 2; - const x1 = points[t1]; - const y1 = points[t1 + 1]; - const x2 = points[t2]; - const y2 = points[t2 + 1]; - const x3 = points[t3]; - const y3 = points[t3 + 1]; - - const dx = x2 - x1; - const dy = y2 - y1; - const ex = x3 - x1; - const ey = y3 - y1; - const bl = dx * dx + dy * dy; - const cl = ex * ex + ey * ey; - const ab = (dx * ey - dy * ex) * 2; - - if (!ab) { - // degenerate case (collinear diagram) - x = (x1 + x3) / 2 - 1e8 * ey; - y = (y1 + y3) / 2 + 1e8 * ex; - } - else if (Math.abs(ab) < 1e-8) { - // almost equal points (degenerate triangle) - x = (x1 + x3) / 2; - y = (y1 + y3) / 2; - } else { - const d = 1 / ab; - x = x1 + (ey * bl - dy * cl) * d; - y = y1 + (dx * cl - ex * bl) * d; - } - circumcenters[j] = x; - circumcenters[j + 1] = y; - } - - // Compute exterior cell rays. - let h = hull[hull.length - 1]; - let p0, p1 = h * 4; - let x0, x1 = points[2 * h]; - let y0, y1 = points[2 * h + 1]; - vectors.fill(0); - for (let i = 0; i < hull.length; ++i) { - h = hull[i]; - p0 = p1, x0 = x1, y0 = y1; - p1 = h * 4, x1 = points[2 * h], y1 = points[2 * h + 1]; - vectors[p0 + 2] = vectors[p1] = y0 - y1; - vectors[p0 + 3] = vectors[p1 + 1] = x1 - x0; - } - } - render(context) { - const buffer = context == null ? context = new Path : undefined; - const {delaunay: {halfedges, inedges, hull}, circumcenters, vectors} = this; - if (hull.length <= 1) return null; - for (let i = 0, n = halfedges.length; i < n; ++i) { - const j = halfedges[i]; - if (j < i) continue; - const ti = Math.floor(i / 3) * 2; - const tj = Math.floor(j / 3) * 2; - const xi = circumcenters[ti]; - const yi = circumcenters[ti + 1]; - const xj = circumcenters[tj]; - const yj = circumcenters[tj + 1]; - this._renderSegment(xi, yi, xj, yj, context); - } - let h0, h1 = hull[hull.length - 1]; - for (let i = 0; i < hull.length; ++i) { - h0 = h1, h1 = hull[i]; - const t = Math.floor(inedges[h1] / 3) * 2; - const x = circumcenters[t]; - const y = circumcenters[t + 1]; - const v = h0 * 4; - const p = this._project(x, y, vectors[v + 2], vectors[v + 3]); - if (p) this._renderSegment(x, y, p[0], p[1], context); - } - return buffer && buffer.value(); - } - renderBounds(context) { - const buffer = context == null ? context = new Path : undefined; - context.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin); - return buffer && buffer.value(); - } - renderCell(i, context) { - const buffer = context == null ? context = new Path : undefined; - const points = this._clip(i); - if (points === null || !points.length) return; - context.moveTo(points[0], points[1]); - let n = points.length; - while (points[0] === points[n-2] && points[1] === points[n-1] && n > 1) n -= 2; - for (let i = 2; i < n; i += 2) { - if (points[i] !== points[i-2] || points[i+1] !== points[i-1]) - context.lineTo(points[i], points[i + 1]); - } - context.closePath(); - return buffer && buffer.value(); - } - *cellPolygons() { - const {delaunay: {points}} = this; - for (let i = 0, n = points.length / 2; i < n; ++i) { - const cell = this.cellPolygon(i); - if (cell) cell.index = i, yield cell; - } - } - cellPolygon(i) { - const polygon = new Polygon; - this.renderCell(i, polygon); - return polygon.value(); - } - _renderSegment(x0, y0, x1, y1, context) { - let S; - const c0 = this._regioncode(x0, y0); - const c1 = this._regioncode(x1, y1); - if (c0 === 0 && c1 === 0) { - context.moveTo(x0, y0); - context.lineTo(x1, y1); - } else if (S = this._clipSegment(x0, y0, x1, y1, c0, c1)) { - context.moveTo(S[0], S[1]); - context.lineTo(S[2], S[3]); - } - } - contains(i, x, y) { - if ((x = +x, x !== x) || (y = +y, y !== y)) return false; - return this.delaunay._step(i, x, y) === i; - } - *neighbors(i) { - const ci = this._clip(i); - if (ci) for (const j of this.delaunay.neighbors(i)) { - const cj = this._clip(j); - // find the common edge - if (cj) loop: for (let ai = 0, li = ci.length; ai < li; ai += 2) { - for (let aj = 0, lj = cj.length; aj < lj; aj += 2) { - if (ci[ai] == cj[aj] - && ci[ai + 1] == cj[aj + 1] - && ci[(ai + 2) % li] == cj[(aj + lj - 2) % lj] - && ci[(ai + 3) % li] == cj[(aj + lj - 1) % lj] - ) { - yield j; - break loop; - } - } - } - } - } - _cell(i) { - const {circumcenters, delaunay: {inedges, halfedges, triangles}} = this; - const e0 = inedges[i]; - if (e0 === -1) return null; // coincident point - const points = []; - let e = e0; - do { - const t = Math.floor(e / 3); - points.push(circumcenters[t * 2], circumcenters[t * 2 + 1]); - e = e % 3 === 2 ? e - 2 : e + 1; - if (triangles[e] !== i) break; // bad triangulation - e = halfedges[e]; - } while (e !== e0 && e !== -1); - return points; - } - _clip(i) { - // degenerate case (1 valid point: return the box) - if (i === 0 && this.delaunay.hull.length === 1) { - return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin]; - } - const points = this._cell(i); - if (points === null) return null; - const {vectors: V} = this; - const v = i * 4; - return V[v] || V[v + 1] - ? this._clipInfinite(i, points, V[v], V[v + 1], V[v + 2], V[v + 3]) - : this._clipFinite(i, points); - } - _clipFinite(i, points) { - const n = points.length; - let P = null; - let x0, y0, x1 = points[n - 2], y1 = points[n - 1]; - let c0, c1 = this._regioncode(x1, y1); - let e0, e1; - for (let j = 0; j < n; j += 2) { - x0 = x1, y0 = y1, x1 = points[j], y1 = points[j + 1]; - c0 = c1, c1 = this._regioncode(x1, y1); - if (c0 === 0 && c1 === 0) { - e0 = e1, e1 = 0; - if (P) P.push(x1, y1); - else P = [x1, y1]; - } else { - let S, sx0, sy0, sx1, sy1; - if (c0 === 0) { - if ((S = this._clipSegment(x0, y0, x1, y1, c0, c1)) === null) continue; - [sx0, sy0, sx1, sy1] = S; - } else { - if ((S = this._clipSegment(x1, y1, x0, y0, c1, c0)) === null) continue; - [sx1, sy1, sx0, sy0] = S; - e0 = e1, e1 = this._edgecode(sx0, sy0); - if (e0 && e1) this._edge(i, e0, e1, P, P.length); - if (P) P.push(sx0, sy0); - else P = [sx0, sy0]; - } - e0 = e1, e1 = this._edgecode(sx1, sy1); - if (e0 && e1) this._edge(i, e0, e1, P, P.length); - if (P) P.push(sx1, sy1); - else P = [sx1, sy1]; - } - } - if (P) { - e0 = e1, e1 = this._edgecode(P[0], P[1]); - if (e0 && e1) this._edge(i, e0, e1, P, P.length); - } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) { - return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin]; - } - return P; - } - _clipSegment(x0, y0, x1, y1, c0, c1) { - while (true) { - if (c0 === 0 && c1 === 0) return [x0, y0, x1, y1]; - if (c0 & c1) return null; - let x, y, c = c0 || c1; - if (c & 0b1000) x = x0 + (x1 - x0) * (this.ymax - y0) / (y1 - y0), y = this.ymax; - else if (c & 0b0100) x = x0 + (x1 - x0) * (this.ymin - y0) / (y1 - y0), y = this.ymin; - else if (c & 0b0010) y = y0 + (y1 - y0) * (this.xmax - x0) / (x1 - x0), x = this.xmax; - else y = y0 + (y1 - y0) * (this.xmin - x0) / (x1 - x0), x = this.xmin; - if (c0) x0 = x, y0 = y, c0 = this._regioncode(x0, y0); - else x1 = x, y1 = y, c1 = this._regioncode(x1, y1); - } - } - _clipInfinite(i, points, vx0, vy0, vxn, vyn) { - let P = Array.from(points), p; - if (p = this._project(P[0], P[1], vx0, vy0)) P.unshift(p[0], p[1]); - if (p = this._project(P[P.length - 2], P[P.length - 1], vxn, vyn)) P.push(p[0], p[1]); - if (P = this._clipFinite(i, P)) { - for (let j = 0, n = P.length, c0, c1 = this._edgecode(P[n - 2], P[n - 1]); j < n; j += 2) { - c0 = c1, c1 = this._edgecode(P[j], P[j + 1]); - if (c0 && c1) j = this._edge(i, c0, c1, P, j), n = P.length; - } - } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) { - P = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax]; - } - return P; - } - _edge(i, e0, e1, P, j) { - while (e0 !== e1) { - let x, y; - switch (e0) { - case 0b0101: e0 = 0b0100; continue; // top-left - case 0b0100: e0 = 0b0110, x = this.xmax, y = this.ymin; break; // top - case 0b0110: e0 = 0b0010; continue; // top-right - case 0b0010: e0 = 0b1010, x = this.xmax, y = this.ymax; break; // right - case 0b1010: e0 = 0b1000; continue; // bottom-right - case 0b1000: e0 = 0b1001, x = this.xmin, y = this.ymax; break; // bottom - case 0b1001: e0 = 0b0001; continue; // bottom-left - case 0b0001: e0 = 0b0101, x = this.xmin, y = this.ymin; break; // left - } - if ((P[j] !== x || P[j + 1] !== y) && this.contains(i, x, y)) { - P.splice(j, 0, x, y), j += 2; - } - } - if (P.length > 4) { - for (let i = 0; i < P.length; i+= 2) { - const j = (i + 2) % P.length, k = (i + 4) % P.length; - if (P[i] === P[j] && P[j] === P[k] - || P[i + 1] === P[j + 1] && P[j + 1] === P[k + 1]) - P.splice(j, 2), i -= 2; - } - } - return j; - } - _project(x0, y0, vx, vy) { - let t = Infinity, c, x, y; - if (vy < 0) { // top - if (y0 <= this.ymin) return null; - if ((c = (this.ymin - y0) / vy) < t) y = this.ymin, x = x0 + (t = c) * vx; - } else if (vy > 0) { // bottom - if (y0 >= this.ymax) return null; - if ((c = (this.ymax - y0) / vy) < t) y = this.ymax, x = x0 + (t = c) * vx; - } - if (vx > 0) { // right - if (x0 >= this.xmax) return null; - if ((c = (this.xmax - x0) / vx) < t) x = this.xmax, y = y0 + (t = c) * vy; - } else if (vx < 0) { // left - if (x0 <= this.xmin) return null; - if ((c = (this.xmin - x0) / vx) < t) x = this.xmin, y = y0 + (t = c) * vy; - } - return [x, y]; - } - _edgecode(x, y) { - return (x === this.xmin ? 0b0001 - : x === this.xmax ? 0b0010 : 0b0000) - | (y === this.ymin ? 0b0100 - : y === this.ymax ? 0b1000 : 0b0000); - } - _regioncode(x, y) { - return (x < this.xmin ? 0b0001 - : x > this.xmax ? 0b0010 : 0b0000) - | (y < this.ymin ? 0b0100 - : y > this.ymax ? 0b1000 : 0b0000); - } -} diff --git a/node_modules/d3-dispatch/LICENSE b/node_modules/d3-dispatch/LICENSE deleted file mode 100644 index 721bd22ece6587a9408eda1b6a3949c425b5624a..0000000000000000000000000000000000000000 --- a/node_modules/d3-dispatch/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-dispatch/README.md b/node_modules/d3-dispatch/README.md deleted file mode 100644 index 65dfaf0abcbc485d2eeaf54ab001574fff8b95b3..0000000000000000000000000000000000000000 --- a/node_modules/d3-dispatch/README.md +++ /dev/null @@ -1,82 +0,0 @@ -# d3-dispatch - -Dispatching is a convenient mechanism for separating concerns with loosely-coupled code: register named callbacks and then call them with arbitrary arguments. A variety of D3 components, such as [d3-request](https://github.com/d3/d3-request), use this mechanism to emit events to listeners. Think of this like Node’s [EventEmitter](https://nodejs.org/api/events.html), except every listener has a well-defined name so it’s easy to remove or replace them. - -For example, to create a dispatch for *start* and *end* events: - -```js -var dispatch = d3.dispatch("start", "end"); -``` - -You can then register callbacks for these events using [*dispatch*.on](#dispatch_on): - -```js -dispatch.on("start", callback1); -dispatch.on("start.foo", callback2); -dispatch.on("end", callback3); -``` - -Then, you can invoke all the *start* callbacks using [*dispatch*.call](#dispatch_call) or [*dispatch*.apply](#dispatch_apply): - -```js -dispatch.call("start"); -``` - -Like *function*.call, you may also specify the `this` context and any arguments: - -```js -dispatch.call("start", {about: "I am a context object"}, "I am an argument"); -``` - -Want a more involved example? See how to use [d3-dispatch for coordinated views](http://bl.ocks.org/mbostock/5872848). - -## Installing - -If you use NPM, `npm install d3-dispatch`. Otherwise, download the [latest release](https://github.com/d3/d3-dispatch/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-dispatch.v1.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-dispatch.v1.min.js"></script> -<script> - -var dispatch = d3.dispatch("start", "end"); - -</script> -``` - -[Try d3-dispatch in your browser.](https://observablehq.com/collection/@d3/d3-dispatch) - -## API Reference - -<a name="dispatch" href="#dispatch">#</a> d3.<b>dispatch</b>(<i>types…</i>) · [Source](https://github.com/d3/d3-dispatch/blob/master/src/dispatch.js) - -Creates a new dispatch for the specified event *types*. Each *type* is a string, such as `"start"` or `"end"`. - -<a name="dispatch_on" href="#dispatch_on">#</a> *dispatch*.<b>on</b>(<i>typenames</i>[, <i>callback</i>]) · [Source](https://github.com/d3/d3-dispatch/blob/master/src/dispatch.js) - -Adds, removes or gets the *callback* for the specified *typenames*. If a *callback* function is specified, it is registered for the specified (fully-qualified) *typenames*. If a callback was already registered for the given *typenames*, the existing callback is removed before the new callback is added. - -The specified *typenames* is a string, such as `start` or `end.foo`. The type may be optionally followed by a period (`.`) and a name; the optional name allows multiple callbacks to be registered to receive events of the same type, such as `start.foo` and `start.bar`. To specify multiple typenames, separate typenames with spaces, such as `start end` or `start.foo start.bar`. - -To remove all callbacks for a given name `foo`, say `dispatch.on(".foo", null)`. - -If *callback* is not specified, returns the current callback for the specified *typenames*, if any. If multiple typenames are specified, the first matching callback is returned. - -<a name="dispatch_copy" href="#dispatch_copy">#</a> *dispatch*.<b>copy</b>() · [Source](https://github.com/d3/d3-dispatch/blob/master/src/dispatch.js) - -Returns a copy of this dispatch object. Changes to this dispatch do not affect the returned copy and <i>vice versa</i>. - -<a name="dispatch_call" href="#dispatch_call">#</a> *dispatch*.<b>call</b>(<i>type</i>[, <i>that</i>[, <i>arguments…</i>]]) · [Source](https://github.com/d3/d3-dispatch/blob/master/src/dispatch.js) - -Like [*function*.call](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call), invokes each registered callback for the specified *type*, passing the callback the specified *arguments*, with *that* as the `this` context. See [*dispatch*.apply](#dispatch_apply) for more information. - -<a name="dispatch_apply" href="#dispatch_apply">#</a> *dispatch*.<b>apply</b>(<i>type</i>[, <i>that</i>[, <i>arguments</i>]]) · [Source](https://github.com/d3/d3-dispatch/blob/master/src/dispatch.js) - -Like [*function*.apply](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call), invokes each registered callback for the specified *type*, passing the callback the specified *arguments*, with *that* as the `this` context. For example, if you wanted to dispatch your *custom* callbacks after handling a native *click* event, while preserving the current `this` context and arguments, you could say: - -```js -selection.on("click", function() { - dispatch.apply("custom", this, arguments); -}); -``` - -You can pass whatever arguments you want to callbacks; most commonly, you might create an object that represents an event, or pass the current datum (*d*) and index (*i*). See [function.call](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/Call) and [function.apply](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Function/Apply) for further information. diff --git a/node_modules/d3-dispatch/dist/d3-dispatch.js b/node_modules/d3-dispatch/dist/d3-dispatch.js deleted file mode 100644 index ece01fff0bf0a77190f09f6d4ecf8ad5f2ff274f..0000000000000000000000000000000000000000 --- a/node_modules/d3-dispatch/dist/d3-dispatch.js +++ /dev/null @@ -1,95 +0,0 @@ -// https://d3js.org/d3-dispatch/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {})); -}(this, function (exports) { 'use strict'; - -var noop = {value: () => {}}; - -function dispatch() { - for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { - if (!(t = arguments[i] + "") || (t in _) || /[\s.]/.test(t)) throw new Error("illegal type: " + t); - _[t] = []; - } - return new Dispatch(_); -} - -function Dispatch(_) { - this._ = _; -} - -function parseTypenames(typenames, types) { - return typenames.trim().split(/^|\s+/).map(function(t) { - var name = "", i = t.indexOf("."); - if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); - if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); - return {type: t, name: name}; - }); -} - -Dispatch.prototype = dispatch.prototype = { - constructor: Dispatch, - on: function(typename, callback) { - var _ = this._, - T = parseTypenames(typename + "", _), - t, - i = -1, - n = T.length; - - // If no callback was specified, return the callback of the given type and name. - if (arguments.length < 2) { - while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; - return; - } - - // If a type was specified, set the callback for the given type and name. - // Otherwise, if a null callback was specified, remove callbacks of the given name. - if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); - while (++i < n) { - if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback); - else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null); - } - - return this; - }, - copy: function() { - var copy = {}, _ = this._; - for (var t in _) copy[t] = _[t].slice(); - return new Dispatch(copy); - }, - call: function(type, that) { - if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; - if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); - for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); - }, - apply: function(type, that, args) { - if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); - for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); - } -}; - -function get(type, name) { - for (var i = 0, n = type.length, c; i < n; ++i) { - if ((c = type[i]).name === name) { - return c.value; - } - } -} - -function set(type, name, callback) { - for (var i = 0, n = type.length; i < n; ++i) { - if (type[i].name === name) { - type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); - break; - } - } - if (callback != null) type.push({name: name, value: callback}); - return type; -} - -exports.dispatch = dispatch; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-dispatch/dist/d3-dispatch.min.js b/node_modules/d3-dispatch/dist/d3-dispatch.min.js deleted file mode 100644 index 02a18246efdce70d3f333c54f884f9ce198a68d5..0000000000000000000000000000000000000000 --- a/node_modules/d3-dispatch/dist/d3-dispatch.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-dispatch/ v2.0.0 Copyright 2020 Mike Bostock -!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((n=n||self).d3=n.d3||{})}(this,function(n){"use strict";var e={value:()=>{}};function t(){for(var n,e=0,t=arguments.length,o={};e<t;++e){if(!(n=arguments[e]+"")||n in o||/[\s.]/.test(n))throw new Error("illegal type: "+n);o[n]=[]}return new r(o)}function r(n){this._=n}function o(n,e){return n.trim().split(/^|\s+/).map(function(n){var t="",r=n.indexOf(".");if(r>=0&&(t=n.slice(r+1),n=n.slice(0,r)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:t}})}function i(n,e){for(var t,r=0,o=n.length;r<o;++r)if((t=n[r]).name===e)return t.value}function f(n,t,r){for(var o=0,i=n.length;o<i;++o)if(n[o].name===t){n[o]=e,n=n.slice(0,o).concat(n.slice(o+1));break}return null!=r&&n.push({name:t,value:r}),n}r.prototype=t.prototype={constructor:r,on:function(n,e){var t,r=this._,l=o(n+"",r),u=-1,a=l.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++u<a;)if(t=(n=l[u]).type)r[t]=f(r[t],n.name,e);else if(null==e)for(t in r)r[t]=f(r[t],n.name,null);return this}for(;++u<a;)if((t=(n=l[u]).type)&&(t=i(r[t],n.name)))return t},copy:function(){var n={},e=this._;for(var t in e)n[t]=e[t].slice();return new r(n)},call:function(n,e){if((t=arguments.length-2)>0)for(var t,r,o=new Array(t),i=0;i<t;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(i=0,t=(r=this._[n]).length;i<t;++i)r[i].value.apply(e,o)},apply:function(n,e,t){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var r=this._[n],o=0,i=r.length;o<i;++o)r[o].value.apply(e,t)}},n.dispatch=t,Object.defineProperty(n,"__esModule",{value:!0})}); diff --git a/node_modules/d3-dispatch/package.json b/node_modules/d3-dispatch/package.json deleted file mode 100644 index 77b29a3a6de963e9a1f4dde5a67d65771ed77936..0000000000000000000000000000000000000000 --- a/node_modules/d3-dispatch/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "d3-dispatch@2", - "_id": "d3-dispatch@2.0.0", - "_inBundle": false, - "_integrity": "sha512-S/m2VsXI7gAti2pBoLClFFTMOO1HTtT0j99AuXLoGFKO6deHDdnv6ZGTxSTTUTgO1zVcv82fCOtDjYK4EECmWA==", - "_location": "/d3-dispatch", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-dispatch@2", - "name": "d3-dispatch", - "escapedName": "d3-dispatch", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3", - "/d3-brush", - "/d3-drag", - "/d3-force", - "/d3-transition", - "/d3-zoom" - ], - "_resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-2.0.0.tgz", - "_shasum": "8a18e16f76dd3fcaef42163c97b926aa9b55e7cf", - "_spec": "d3-dispatch@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-dispatch/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Register named callbacks and call them with arguments.", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-dispatch/", - "jsdelivr": "dist/d3-dispatch.min.js", - "keywords": [ - "d3", - "d3-module", - "event", - "listener", - "dispatch" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-dispatch.js", - "module": "src/index.js", - "name": "d3-dispatch", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-dispatch.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src test" - }, - "sideEffects": false, - "unpkg": "dist/d3-dispatch.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-dispatch/src/dispatch.js b/node_modules/d3-dispatch/src/dispatch.js deleted file mode 100644 index c93ac4fafe660b7fbd954ca4bc8f6988f8886e49..0000000000000000000000000000000000000000 --- a/node_modules/d3-dispatch/src/dispatch.js +++ /dev/null @@ -1,84 +0,0 @@ -var noop = {value: () => {}}; - -function dispatch() { - for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { - if (!(t = arguments[i] + "") || (t in _) || /[\s.]/.test(t)) throw new Error("illegal type: " + t); - _[t] = []; - } - return new Dispatch(_); -} - -function Dispatch(_) { - this._ = _; -} - -function parseTypenames(typenames, types) { - return typenames.trim().split(/^|\s+/).map(function(t) { - var name = "", i = t.indexOf("."); - if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); - if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); - return {type: t, name: name}; - }); -} - -Dispatch.prototype = dispatch.prototype = { - constructor: Dispatch, - on: function(typename, callback) { - var _ = this._, - T = parseTypenames(typename + "", _), - t, - i = -1, - n = T.length; - - // If no callback was specified, return the callback of the given type and name. - if (arguments.length < 2) { - while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; - return; - } - - // If a type was specified, set the callback for the given type and name. - // Otherwise, if a null callback was specified, remove callbacks of the given name. - if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); - while (++i < n) { - if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback); - else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null); - } - - return this; - }, - copy: function() { - var copy = {}, _ = this._; - for (var t in _) copy[t] = _[t].slice(); - return new Dispatch(copy); - }, - call: function(type, that) { - if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; - if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); - for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); - }, - apply: function(type, that, args) { - if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); - for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); - } -}; - -function get(type, name) { - for (var i = 0, n = type.length, c; i < n; ++i) { - if ((c = type[i]).name === name) { - return c.value; - } - } -} - -function set(type, name, callback) { - for (var i = 0, n = type.length; i < n; ++i) { - if (type[i].name === name) { - type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); - break; - } - } - if (callback != null) type.push({name: name, value: callback}); - return type; -} - -export default dispatch; diff --git a/node_modules/d3-dispatch/src/index.js b/node_modules/d3-dispatch/src/index.js deleted file mode 100644 index 4b8d3bdd2bae2f825090d251d75e3ae5b46abab1..0000000000000000000000000000000000000000 --- a/node_modules/d3-dispatch/src/index.js +++ /dev/null @@ -1 +0,0 @@ -export {default as dispatch} from "./dispatch.js"; diff --git a/node_modules/d3-drag/LICENSE b/node_modules/d3-drag/LICENSE deleted file mode 100644 index 721bd22ece6587a9408eda1b6a3949c425b5624a..0000000000000000000000000000000000000000 --- a/node_modules/d3-drag/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-drag/README.md b/node_modules/d3-drag/README.md deleted file mode 100644 index fe458474a72972b1afb4a5b742074d220698f7d2..0000000000000000000000000000000000000000 --- a/node_modules/d3-drag/README.md +++ /dev/null @@ -1,236 +0,0 @@ -# d3-drag - -[Drag-and-drop](https://en.wikipedia.org/wiki/Drag_and_drop) is a popular and easy-to-learn pointing gesture: move the pointer to an object, press and hold to grab it, “drag†the object to a new location, and release to “dropâ€. D3’s [drag behavior](#api-reference) provides a convenient but flexible abstraction for enabling drag-and-drop interaction on [selections](https://github.com/d3/d3-selection). For example, you can use d3-drag to facilitate interaction with a [force-directed graph](https://github.com/d3/d3-force), or a simulation of colliding circles: - -[<img alt="Force-Directed Graph" src="https://raw.githubusercontent.com/d3/d3-drag/master/img/force-graph.png" width="420" height="219">](https://observablehq.com/@d3/force-directed-graph)[<img alt="Force Dragging II" src="https://raw.githubusercontent.com/d3/d3-drag/master/img/force-collide.png" width="420" height="219">](https://observablehq.com/d/c55a5839a5bb7c73) - -You can also use d3-drag to implement custom user interface elements, such as a slider. But the drag behavior isn’t just for moving elements around; there are a variety of ways to respond to a drag gesture. For example, you can use it to lasso elements in a scatterplot, or to paint lines on a canvas: - -[<img alt="Line Drawing" src="https://raw.githubusercontent.com/d3/d3-drag/master/img/drawing.png" width="420" height="219">](https://observablehq.com/@d3/draw-me) - -The drag behavior can be combined with other behaviors, such as [d3-zoom](https://github.com/d3/d3-zoom) for zooming. - -[<img alt="Drag & Zoom II" src="https://raw.githubusercontent.com/d3/d3-drag/master/img/dots.png" width="420" height="219">](https://observablehq.com/@d3/drag-zoom) - -The drag behavior is agnostic about the DOM, so you can use it with SVG, HTML or even Canvas! And you can extend it with advanced selection techniques, such as a Voronoi overlay or a closest-target search: - -[<img alt="Circle Dragging IV" src="https://raw.githubusercontent.com/d3/d3-drag/master/img/voronoi.png" width="420" height="219">](https://observablehq.com/@d3/circle-dragging-iii)[<img alt="Circle Dragging II" src="https://raw.githubusercontent.com/d3/d3-drag/master/img/canvas.png" width="420" height="219">](https://observablehq.com/@d3/circle-dragging-ii) - -Best of all, the drag behavior automatically unifies mouse and touch input, and avoids browser idiosyncrasies. When [Pointer Events](https://www.w3.org/TR/pointerevents/) are more widely available, the drag behavior will support those, too. - -## Installing - -If you use NPM, `npm install d3-drag`. Otherwise, download the [latest release](https://github.com/d3/d3-drag/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-drag.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-dispatch.v2.min.js"></script> -<script src="https://d3js.org/d3-selection.v2.min.js"></script> -<script src="https://d3js.org/d3-drag.v2.min.js"></script> -<script> - -var drag = d3.drag(); - -</script> -``` - -[Try d3-drag in your browser.](https://observablehq.com/collection/@d3/d3-drag) - -## API Reference - -This table describes how the drag behavior interprets native events: - -| Event | Listening Element | Drag Event | Default Prevented? | -| ------------ | ----------------- | ---------- | ------------------ | -| mousedownâµ | selection | start | no¹ | -| mousemove² | window¹ | drag | yes | -| mouseup² | window¹ | end | yes | -| dragstart² | window | - | yes | -| selectstart² | window | - | yes | -| click³ | window | - | yes | -| touchstart | selection | start | noâ´ | -| touchmove | selection | drag | yes | -| touchend | selection | end | noâ´ | -| touchcancel | selection | end | noâ´ | - -The propagation of all consumed events is [immediately stopped](https://dom.spec.whatwg.org/#dom-event-stopimmediatepropagation). If you want to prevent some events from initiating a drag gesture, use [*drag*.filter](#drag_filter). - -¹ Necessary to capture events outside an iframe; see [#9](https://github.com/d3/d3-drag/issues/9). -<br>² Only applies during an active, mouse-based gesture; see [#9](https://github.com/d3/d3-drag/issues/9). -<br>³ Only applies immediately after some mouse-based gestures; see [*drag*.clickDistance](#drag_clickDistance). -<br>â´ Necessary to allow [click emulation](https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW7) on touch input; see [#9](https://github.com/d3/d3-drag/issues/9). -<br>âµ Ignored if within 500ms of a touch gesture ending; assumes [click emulation](https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW7). - -<a href="#drag" name="drag">#</a> d3.<b>drag</b>() · [Source](https://github.com/d3/d3-drag/blob/master/src/drag.js), [Examples](https://observablehq.com/collection/@d3/d3-drag) - -Creates a new drag behavior. The returned behavior, [*drag*](#_drag), is both an object and a function, and is typically applied to selected elements via [*selection*.call](https://github.com/d3/d3-selection#selection_call). - -<a href="#_drag" name="_drag">#</a> <i>drag</i>(<i>selection</i>) · [Source](https://github.com/d3/d3-drag/blob/master/src/drag.js), [Examples](https://observablehq.com/collection/@d3/d3-drag) - -Applies this drag behavior to the specified [*selection*](https://github.com/d3/d3-selection). This function is typically not invoked directly, and is instead invoked via [*selection*.call](https://github.com/d3/d3-selection#selection_call). For example, to instantiate a drag behavior and apply it to a selection: - -```js -d3.selectAll(".node").call(d3.drag().on("start", started)); -``` - -Internally, the drag behavior uses [*selection*.on](https://github.com/d3/d3-selection#selection_on) to bind the necessary event listeners for dragging. The listeners use the name `.drag`, so you can subsequently unbind the drag behavior as follows: - -```js -selection.on(".drag", null); -``` - -Applying the drag behavior also sets the [-webkit-tap-highlight-color](https://developer.apple.com/library/mac/documentation/AppleApplications/Reference/SafariWebContent/AdjustingtheTextSize/AdjustingtheTextSize.html#//apple_ref/doc/uid/TP40006510-SW5) style to transparent, disabling the tap highlight on iOS. If you want a different tap highlight color, remove or re-apply this style after applying the drag behavior. - -<a href="#drag_container" name="drag_container">#</a> <i>drag</i>.<b>container</b>([<i>container</i>]) · [Source](https://github.com/d3/d3-drag/blob/master/src/drag.js), [Examples](https://observablehq.com/collection/@d3/d3-drag) - -If *container* is specified, sets the container accessor to the specified object or function and returns the drag behavior. If *container* is not specified, returns the current container accessor, which defaults to: - -```js -function container() { - return this.parentNode; -} -``` - -The *container* of a drag gesture determines the coordinate system of subsequent [drag events](#drag-events), affecting *event*.x and *event*.y. The element returned by the container accessor is subsequently passed to [d3.pointer](https://github.com/d3/d3-selection#pointer) to determine the local coordinates of the pointer. - -The default container accessor returns the parent node of the element in the originating selection (see [*drag*](#_drag)) that received the initiating input event. This is often appropriate when dragging SVG or HTML elements, since those elements are typically positioned relative to a parent. For dragging graphical elements with a Canvas, however, you may want to redefine the container as the initiating element itself: - -```js -function container() { - return this; -} -``` - -Alternatively, the container may be specified as the element directly, such as `drag.container(canvas)`. - - -<a href="#drag_filter" name="drag_filter">#</a> <i>drag</i>.<b>filter</b>([<i>filter</i>]) · [Source](https://github.com/d3/d3-drag/blob/master/src/drag.js), [Examples](https://observablehq.com/d/c55a5839a5bb7c73) - -If *filter* is specified, sets the event filter to the specified function and returns the drag behavior. If *filter* is not specified, returns the current filter, which defaults to: - -```js -function filter(event) { - return !event.ctrlKey && !event.button; -} -``` - -If the filter returns falsey, the initiating event is ignored and no drag gestures are started. Thus, the filter determines which input events are ignored; the default filter ignores mousedown events on secondary buttons, since those buttons are typically intended for other purposes, such as the context menu. - -<a href="#drag_touchable" name="drag_touchable">#</a> <i>drag</i>.<b>touchable</b>([<i>touchable</i>]) · [Source](https://github.com/d3/d3-drag/blob/master/src/drag.js), [Examples](https://observablehq.com/d/c55a5839a5bb7c73) - -If *touchable* is specified, sets the touch support detector to the specified function and returns the drag behavior. If *touchable* is not specified, returns the current touch support detector, which defaults to: - -```js -function touchable() { - return navigator.maxTouchPoints || ("ontouchstart" in this); -} -``` - -Touch event listeners are only registered if the detector returns truthy for the corresponding element when the drag behavior is [applied](#_drag). The default detector works well for most browsers that are capable of touch input, but not all; Chrome’s mobile device emulator, for example, fails detection. - -<a href="#drag_subject" name="drag_subject">#</a> <i>drag</i>.<b>subject</b>([<i>subject</i>]) · [Source](https://github.com/d3/d3-drag/blob/master/src/drag.js), [Examples](https://observablehq.com/collection/@d3/d3-drag) - -If *subject* is specified, sets the subject accessor to the specified object or function and returns the drag behavior. If *subject* is not specified, returns the current subject accessor, which defaults to: - -```js -function subject(event, d) { - return d == null ? {x: event.x, y: event.y} : d; -} -``` - -The *subject* of a drag gesture represents *the thing being dragged*. It is computed when an initiating input event is received, such as a mousedown or touchstart, immediately before the drag gesture starts. The subject is then exposed as *event*.subject on subsequent [drag events](#drag-events) for this gesture. - -The default subject is the [datum](https://github.com/d3/d3-selection#selection_datum) of the element in the originating selection (see [*drag*](#_drag)) that received the initiating input event; if this datum is undefined, an object representing the coordinates of the pointer is created. When dragging circle elements in SVG, the default subject is thus the datum of the circle being dragged. With [Canvas](https://html.spec.whatwg.org/multipage/scripting.html#the-canvas-element), the default subject is the canvas element’s datum (regardless of where on the canvas you click). In this case, a custom subject accessor would be more appropriate, such as one that picks the closest circle to the mouse within a given search *radius*: - -```js -function subject(event) { - var n = circles.length, - i, - dx, - dy, - d2, - s2 = radius * radius, - circle, - subject; - - for (i = 0; i < n; ++i) { - circle = circles[i]; - dx = event.x - circle.x; - dy = event.y - circle.y; - d2 = dx * dx + dy * dy; - if (d2 < s2) subject = circle, s2 = d2; - } - - return subject; -} -``` - -(If necessary, the above can be accelerated using [*quadtree*.find](https://github.com/d3/d3-quadtree/blob/master/README.md#quadtree_find), [*simulation*.find](https://github.com/d3/d3-force/blob/master/README.md#simulation_find) or [*delaunay*.find](https://github.com/d3/d3-delaunay/blob/master/README.md#delaunay_find).) - -The returned subject should be an object that exposes `x` and `y` properties, so that the relative position of the subject and the pointer can be preserved during the drag gesture. If the subject is null or undefined, no drag gesture is started for this pointer; however, other starting touches may yet start drag gestures. See also [*drag*.filter](#drag_filter). - -The subject of a drag gesture may not be changed after the gesture starts. The subject accessor is invoked with the same context and arguments as [*selection*.on](https://github.com/d3/d3-selection#selection_on) listeners: the current event (`event`) and datum `d`, with the `this` context as the current DOM element. During the evaluation of the subject accessor, `event` is a beforestart [drag event](#drag-events). Use *event*.sourceEvent to access the initiating input event and *event*.identifier to access the touch identifier. The *event*.x and *event*.y are relative to the [container](#drag_container), and are computed using [d3.pointer](https://github.com/d3/d3-selection#pointer). - -<a href="#drag_clickDistance" name="drag_clickDistance">#</a> <i>drag</i>.<b>clickDistance</b>([<i>distance</i>]) · [Source](https://github.com/d3/d3-drag/blob/master/src/drag.js) - -If *distance* is specified, sets the maximum distance that the mouse can move between mousedown and mouseup that will trigger a subsequent click event. If at any point between mousedown and mouseup the mouse is greater than or equal to *distance* from its position on mousedown, the click event following mouseup will be suppressed. If *distance* is not specified, returns the current distance threshold, which defaults to zero. The distance threshold is measured in client coordinates ([*event*.clientX](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientX) and [*event*.clientY](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientY)). - -<a href="#drag_on" name="drag_on">#</a> <i>drag</i>.<b>on</b>(<i>typenames</i>, [<i>listener</i>]) · [Source](https://github.com/d3/d3-drag/blob/master/src/drag.js) - -If *listener* is specified, sets the event *listener* for the specified *typenames* and returns the drag behavior. If an event listener was already registered for the same type and name, the existing listener is removed before the new listener is added. If *listener* is null, removes the current event listeners for the specified *typenames*, if any. If *listener* is not specified, returns the first currently-assigned listener matching the specified *typenames*, if any. When a specified event is dispatched, each *listener* will be invoked with the same context and arguments as [*selection*.on](https://github.com/d3/d3-selection#selection_on) listeners: the current event (`event`) and datum `d`, with the `this` context as the current DOM element. - -The *typenames* is a string containing one or more *typename* separated by whitespace. Each *typename* is a *type*, optionally followed by a period (`.`) and a *name*, such as `drag.foo` and `drag.bar`; the name allows multiple listeners to be registered for the same *type*. The *type* must be one of the following: - -* `start` - after a new pointer becomes active (on mousedown or touchstart). -* `drag` - after an active pointer moves (on mousemove or touchmove). -* `end` - after an active pointer becomes inactive (on mouseup, touchend or touchcancel). - -See [*dispatch*.on](https://github.com/d3/d3-dispatch#dispatch_on) for more. - -Changes to registered listeners via *drag*.on during a drag gesture *do not affect* the current drag gesture. Instead, you must use [*event*.on](#event_on), which also allows you to register temporary event listeners for the current drag gesture. **Separate events are dispatched for each active pointer** during a drag gesture. For example, if simultaneously dragging multiple subjects with multiple fingers, a start event is dispatched for each finger, even if both fingers start touching simultaneously. See [Drag Events](#drag-events) for more. - -<a href="#dragDisable" name="dragDisable">#</a> d3.<b>dragDisable</b>(<i>window</i>) · [Source](https://github.com/d3/d3-drag/blob/master/src/nodrag.js) - -Prevents native drag-and-drop and text selection on the specified *window*. As an alternative to preventing the default action of mousedown events (see [#9](https://github.com/d3/d3-drag/issues/9)), this method prevents undesirable default actions following mousedown. In supported browsers, this means capturing dragstart and selectstart events, preventing the associated default actions, and immediately stopping their propagation. In browsers that do not support selection events, the user-select CSS property is set to none on the document element. This method is intended to be called on mousedown, followed by [d3.dragEnable](#dragEnable) on mouseup. - -<a href="#dragEnable" name="dragEnable">#</a> d3.<b>dragEnable</b>(<i>window</i>[, <i>noclick</i>]) · [Source](https://github.com/d3/d3-drag/blob/master/src/nodrag.js) - -Allows native drag-and-drop and text selection on the specified *window*; undoes the effect of [d3.dragDisable](#dragDisable). This method is intended to be called on mouseup, preceded by [d3.dragDisable](#dragDisable) on mousedown. If *noclick* is true, this method also temporarily suppresses click events. The suppression of click events expires after a zero-millisecond timeout, such that it only suppress the click event that would immediately follow the current mouseup event, if any. - -### Drag Events - -When a [drag event listener](#drag_on) is invoked, it receives the current drag event as its first argument. The *event* object exposes several fields: - -* `target` - the associated [drag behavior](#drag). -* `type` - the string “startâ€, “drag†or “endâ€; see [*drag*.on](#drag_on). -* `subject` - the drag subject, defined by [*drag*.subject](#drag_subject). -* `x` - the new *x*-coordinate of the subject; see [*drag*.container](#drag_container). -* `y` - the new *y*-coordinate of the subject; see [*drag*.container](#drag_container). -* `dx` - the change in *x*-coordinate since the previous drag event. -* `dy` - the change in *y*-coordinate since the previous drag event. -* `identifier` - the string “mouseâ€, or a numeric [touch identifier](https://www.w3.org/TR/touch-events/#widl-Touch-identifier). -* `active` - the number of currently active drag gestures (on start and end, not including this one). -* `sourceEvent` - the underlying input event, such as mousemove or touchmove. - -The *event*.active field is useful for detecting the first start event and the last end event in a sequence of concurrent drag gestures: it is zero when the first drag gesture starts, and zero when the last drag gesture ends. - -The *event* object also exposes the [*event*.on](#event_on) method. - -<a href="#event_on" name="event_on">#</a> <i>event</i>.<b>on</b>(<i>typenames</i>, [<i>listener</i>]) · [Source](https://github.com/d3/d3-drag/blob/master/src/event.js) - -Equivalent to [*drag*.on](#drag_on), but only applies to the current drag gesture. Before the drag gesture starts, a [copy](https://github.com/d3/d3-dispatch#dispatch_copy) of the current drag [event listeners](#drag_on) is made. This copy is bound to the current drag gesture and modified by *event*.on. This is useful for temporary listeners that only receive events for the current drag gesture. For example, this start event listener registers temporary drag and end event listeners as closures: - -```js -function started(event) { - var circle = d3.select(this).classed("dragging", true); - - event.on("drag", dragged).on("end", ended); - - function dragged(event, d) { - circle.raise().attr("cx", d.x = event.x).attr("cy", d.y = event.y); - } - - function ended() { - circle.classed("dragging", false); - } -} -``` diff --git a/node_modules/d3-drag/dist/d3-drag.js b/node_modules/d3-drag/dist/d3-drag.js deleted file mode 100644 index b63be9709f1021ff23550cc5f3e87bf7827df5c3..0000000000000000000000000000000000000000 --- a/node_modules/d3-drag/dist/d3-drag.js +++ /dev/null @@ -1,266 +0,0 @@ -// https://d3js.org/d3-drag/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-dispatch'), require('d3-selection')) : -typeof define === 'function' && define.amd ? define(['exports', 'd3-dispatch', 'd3-selection'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {}, global.d3, global.d3)); -}(this, function (exports, d3Dispatch, d3Selection) { 'use strict'; - -function nopropagation(event) { - event.stopImmediatePropagation(); -} - -function noevent(event) { - event.preventDefault(); - event.stopImmediatePropagation(); -} - -function nodrag(view) { - var root = view.document.documentElement, - selection = d3Selection.select(view).on("dragstart.drag", noevent, true); - if ("onselectstart" in root) { - selection.on("selectstart.drag", noevent, true); - } else { - root.__noselect = root.style.MozUserSelect; - root.style.MozUserSelect = "none"; - } -} - -function yesdrag(view, noclick) { - var root = view.document.documentElement, - selection = d3Selection.select(view).on("dragstart.drag", null); - if (noclick) { - selection.on("click.drag", noevent, true); - setTimeout(function() { selection.on("click.drag", null); }, 0); - } - if ("onselectstart" in root) { - selection.on("selectstart.drag", null); - } else { - root.style.MozUserSelect = root.__noselect; - delete root.__noselect; - } -} - -var constant = x => () => x; - -function DragEvent(type, { - sourceEvent, - subject, - target, - identifier, - active, - x, y, dx, dy, - dispatch -}) { - Object.defineProperties(this, { - type: {value: type, enumerable: true, configurable: true}, - sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, - subject: {value: subject, enumerable: true, configurable: true}, - target: {value: target, enumerable: true, configurable: true}, - identifier: {value: identifier, enumerable: true, configurable: true}, - active: {value: active, enumerable: true, configurable: true}, - x: {value: x, enumerable: true, configurable: true}, - y: {value: y, enumerable: true, configurable: true}, - dx: {value: dx, enumerable: true, configurable: true}, - dy: {value: dy, enumerable: true, configurable: true}, - _: {value: dispatch} - }); -} - -DragEvent.prototype.on = function() { - var value = this._.on.apply(this._, arguments); - return value === this._ ? this : value; -}; - -// Ignore right-click, since that should open the context menu. -function defaultFilter(event) { - return !event.ctrlKey && !event.button; -} - -function defaultContainer() { - return this.parentNode; -} - -function defaultSubject(event, d) { - return d == null ? {x: event.x, y: event.y} : d; -} - -function defaultTouchable() { - return navigator.maxTouchPoints || ("ontouchstart" in this); -} - -function drag() { - var filter = defaultFilter, - container = defaultContainer, - subject = defaultSubject, - touchable = defaultTouchable, - gestures = {}, - listeners = d3Dispatch.dispatch("start", "drag", "end"), - active = 0, - mousedownx, - mousedowny, - mousemoving, - touchending, - clickDistance2 = 0; - - function drag(selection) { - selection - .on("mousedown.drag", mousedowned) - .filter(touchable) - .on("touchstart.drag", touchstarted) - .on("touchmove.drag", touchmoved) - .on("touchend.drag touchcancel.drag", touchended) - .style("touch-action", "none") - .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); - } - - function mousedowned(event, d) { - if (touchending || !filter.call(this, event, d)) return; - var gesture = beforestart(this, container.call(this, event, d), event, d, "mouse"); - if (!gesture) return; - d3Selection.select(event.view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true); - nodrag(event.view); - nopropagation(event); - mousemoving = false; - mousedownx = event.clientX; - mousedowny = event.clientY; - gesture("start", event); - } - - function mousemoved(event) { - noevent(event); - if (!mousemoving) { - var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny; - mousemoving = dx * dx + dy * dy > clickDistance2; - } - gestures.mouse("drag", event); - } - - function mouseupped(event) { - d3Selection.select(event.view).on("mousemove.drag mouseup.drag", null); - yesdrag(event.view, mousemoving); - noevent(event); - gestures.mouse("end", event); - } - - function touchstarted(event, d) { - if (!filter.call(this, event, d)) return; - var touches = event.changedTouches, - c = container.call(this, event, d), - n = touches.length, i, gesture; - - for (i = 0; i < n; ++i) { - if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) { - nopropagation(event); - gesture("start", event, touches[i]); - } - } - } - - function touchmoved(event) { - var touches = event.changedTouches, - n = touches.length, i, gesture; - - for (i = 0; i < n; ++i) { - if (gesture = gestures[touches[i].identifier]) { - noevent(event); - gesture("drag", event, touches[i]); - } - } - } - - function touchended(event) { - var touches = event.changedTouches, - n = touches.length, i, gesture; - - if (touchending) clearTimeout(touchending); - touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! - for (i = 0; i < n; ++i) { - if (gesture = gestures[touches[i].identifier]) { - nopropagation(event); - gesture("end", event, touches[i]); - } - } - } - - function beforestart(that, container, event, d, identifier, touch) { - var dispatch = listeners.copy(), - p = d3Selection.pointer(touch || event, container), dx, dy, - s; - - if ((s = subject.call(that, new DragEvent("beforestart", { - sourceEvent: event, - target: drag, - identifier, - active, - x: p[0], - y: p[1], - dx: 0, - dy: 0, - dispatch - }), d)) == null) return; - - dx = s.x - p[0] || 0; - dy = s.y - p[1] || 0; - - return function gesture(type, event, touch) { - var p0 = p, n; - switch (type) { - case "start": gestures[identifier] = gesture, n = active++; break; - case "end": delete gestures[identifier], --active; // nobreak - case "drag": p = d3Selection.pointer(touch || event, container), n = active; break; - } - dispatch.call( - type, - that, - new DragEvent(type, { - sourceEvent: event, - subject: s, - target: drag, - identifier, - active: n, - x: p[0] + dx, - y: p[1] + dy, - dx: p[0] - p0[0], - dy: p[1] - p0[1], - dispatch - }), - d - ); - }; - } - - drag.filter = function(_) { - return arguments.length ? (filter = typeof _ === "function" ? _ : constant(!!_), drag) : filter; - }; - - drag.container = function(_) { - return arguments.length ? (container = typeof _ === "function" ? _ : constant(_), drag) : container; - }; - - drag.subject = function(_) { - return arguments.length ? (subject = typeof _ === "function" ? _ : constant(_), drag) : subject; - }; - - drag.touchable = function(_) { - return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), drag) : touchable; - }; - - drag.on = function() { - var value = listeners.on.apply(listeners, arguments); - return value === listeners ? drag : value; - }; - - drag.clickDistance = function(_) { - return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2); - }; - - return drag; -} - -exports.drag = drag; -exports.dragDisable = nodrag; -exports.dragEnable = yesdrag; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-drag/dist/d3-drag.min.js b/node_modules/d3-drag/dist/d3-drag.min.js deleted file mode 100644 index a489e35ea8ec1147dbce3d560b5ac983fba1ea9e..0000000000000000000000000000000000000000 --- a/node_modules/d3-drag/dist/d3-drag.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-drag/ v2.0.0 Copyright 2020 Mike Bostock -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-dispatch"),require("d3-selection")):"function"==typeof define&&define.amd?define(["exports","d3-dispatch","d3-selection"],t):t((e=e||self).d3=e.d3||{},e.d3,e.d3)}(this,function(e,t,n){"use strict";function o(e){e.stopImmediatePropagation()}function r(e){e.preventDefault(),e.stopImmediatePropagation()}function i(e){var t=e.document.documentElement,o=n.select(e).on("dragstart.drag",r,!0);"onselectstart"in t?o.on("selectstart.drag",r,!0):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function a(e,t){var o=e.document.documentElement,i=n.select(e).on("dragstart.drag",null);t&&(i.on("click.drag",r,!0),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in o?i.on("selectstart.drag",null):(o.style.MozUserSelect=o.__noselect,delete o.__noselect)}var u=e=>()=>e;function c(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:i,x:a,y:u,dx:c,dy:l,dispatch:s}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:s}})}function l(e){return!e.ctrlKey&&!e.button}function s(){return this.parentNode}function d(e,t){return null==t?{x:e.x,y:e.y}:t}function f(){return navigator.maxTouchPoints||"ontouchstart"in this}c.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e},e.drag=function(){var e,g,h,v,m=l,p=s,b=d,y=f,x={},_=t.dispatch("start","drag","end"),w=0,j=0;function E(e){e.on("mousedown.drag",T).filter(y).on("touchstart.drag",P).on("touchmove.drag",q).on("touchend.drag touchcancel.drag",z).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function T(t,r){if(!v&&m.call(this,t,r)){var a=D(this,p.call(this,t,r),t,r,"mouse");a&&(n.select(t.view).on("mousemove.drag",k,!0).on("mouseup.drag",M,!0),i(t.view),o(t),h=!1,e=t.clientX,g=t.clientY,a("start",t))}}function k(t){if(r(t),!h){var n=t.clientX-e,o=t.clientY-g;h=n*n+o*o>j}x.mouse("drag",t)}function M(e){n.select(e.view).on("mousemove.drag mouseup.drag",null),a(e.view,h),r(e),x.mouse("end",e)}function P(e,t){if(m.call(this,e,t)){var n,r,i=e.changedTouches,a=p.call(this,e,t),u=i.length;for(n=0;n<u;++n)(r=D(this,a,e,t,i[n].identifier,i[n]))&&(o(e),r("start",e,i[n]))}}function q(e){var t,n,o=e.changedTouches,i=o.length;for(t=0;t<i;++t)(n=x[o[t].identifier])&&(r(e),n("drag",e,o[t]))}function z(e){var t,n,r=e.changedTouches,i=r.length;for(v&&clearTimeout(v),v=setTimeout(function(){v=null},500),t=0;t<i;++t)(n=x[r[t].identifier])&&(o(e),n("end",e,r[t]))}function D(e,t,o,r,i,a){var u,l,s,d=_.copy(),f=n.pointer(a||o,t);if(null!=(s=b.call(e,new c("beforestart",{sourceEvent:o,target:E,identifier:i,active:w,x:f[0],y:f[1],dx:0,dy:0,dispatch:d}),r)))return u=s.x-f[0]||0,l=s.y-f[1]||0,function o(a,g,h){var v,m=f;switch(a){case"start":x[i]=o,v=w++;break;case"end":delete x[i],--w;case"drag":f=n.pointer(h||g,t),v=w}d.call(a,e,new c(a,{sourceEvent:g,subject:s,target:E,identifier:i,active:v,x:f[0]+u,y:f[1]+l,dx:f[0]-m[0],dy:f[1]-m[1],dispatch:d}),r)}}return E.filter=function(e){return arguments.length?(m="function"==typeof e?e:u(!!e),E):m},E.container=function(e){return arguments.length?(p="function"==typeof e?e:u(e),E):p},E.subject=function(e){return arguments.length?(b="function"==typeof e?e:u(e),E):b},E.touchable=function(e){return arguments.length?(y="function"==typeof e?e:u(!!e),E):y},E.on=function(){var e=_.on.apply(_,arguments);return e===_?E:e},E.clickDistance=function(e){return arguments.length?(j=(e=+e)*e,E):Math.sqrt(j)},E},e.dragDisable=i,e.dragEnable=a,Object.defineProperty(e,"__esModule",{value:!0})}); diff --git a/node_modules/d3-drag/package.json b/node_modules/d3-drag/package.json deleted file mode 100644 index d632dd9241b19616c9f924eadd61d3921e17ed1e..0000000000000000000000000000000000000000 --- a/node_modules/d3-drag/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_from": "d3-drag@2", - "_id": "d3-drag@2.0.0", - "_inBundle": false, - "_integrity": "sha512-g9y9WbMnF5uqB9qKqwIIa/921RYWzlUDv9Jl1/yONQwxbOfszAWTCm8u7HOTgJgRDXiRZN56cHT9pd24dmXs8w==", - "_location": "/d3-drag", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-drag@2", - "name": "d3-drag", - "escapedName": "d3-drag", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3", - "/d3-brush", - "/d3-zoom" - ], - "_resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-2.0.0.tgz", - "_shasum": "9eaf046ce9ed1c25c88661911c1d5a4d8eb7ea6d", - "_spec": "d3-drag@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-drag/issues" - }, - "bundleDependencies": false, - "dependencies": { - "d3-dispatch": "1 - 2", - "d3-selection": "2" - }, - "deprecated": false, - "description": "Drag and drop SVG, HTML or Canvas using mouse or touch input.", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-drag/", - "jsdelivr": "dist/d3-drag.min.js", - "keywords": [ - "d3", - "d3-module", - "drag", - "behavior", - "interaction" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-drag.js", - "module": "src/index.js", - "name": "d3-drag", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-drag.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src" - }, - "sideEffects": false, - "unpkg": "dist/d3-drag.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-drag/src/constant.js b/node_modules/d3-drag/src/constant.js deleted file mode 100644 index 3487c0ddfaabca50218341abd733df08493b568c..0000000000000000000000000000000000000000 --- a/node_modules/d3-drag/src/constant.js +++ /dev/null @@ -1 +0,0 @@ -export default x => () => x; diff --git a/node_modules/d3-drag/src/drag.js b/node_modules/d3-drag/src/drag.js deleted file mode 100644 index 3b84e0f224fea0119c817174ec172fe729d7c26b..0000000000000000000000000000000000000000 --- a/node_modules/d3-drag/src/drag.js +++ /dev/null @@ -1,192 +0,0 @@ -import {dispatch} from "d3-dispatch"; -import {select, pointer} from "d3-selection"; -import nodrag, {yesdrag} from "./nodrag.js"; -import noevent, {nopropagation} from "./noevent.js"; -import constant from "./constant.js"; -import DragEvent from "./event.js"; - -// Ignore right-click, since that should open the context menu. -function defaultFilter(event) { - return !event.ctrlKey && !event.button; -} - -function defaultContainer() { - return this.parentNode; -} - -function defaultSubject(event, d) { - return d == null ? {x: event.x, y: event.y} : d; -} - -function defaultTouchable() { - return navigator.maxTouchPoints || ("ontouchstart" in this); -} - -export default function() { - var filter = defaultFilter, - container = defaultContainer, - subject = defaultSubject, - touchable = defaultTouchable, - gestures = {}, - listeners = dispatch("start", "drag", "end"), - active = 0, - mousedownx, - mousedowny, - mousemoving, - touchending, - clickDistance2 = 0; - - function drag(selection) { - selection - .on("mousedown.drag", mousedowned) - .filter(touchable) - .on("touchstart.drag", touchstarted) - .on("touchmove.drag", touchmoved) - .on("touchend.drag touchcancel.drag", touchended) - .style("touch-action", "none") - .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); - } - - function mousedowned(event, d) { - if (touchending || !filter.call(this, event, d)) return; - var gesture = beforestart(this, container.call(this, event, d), event, d, "mouse"); - if (!gesture) return; - select(event.view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true); - nodrag(event.view); - nopropagation(event); - mousemoving = false; - mousedownx = event.clientX; - mousedowny = event.clientY; - gesture("start", event); - } - - function mousemoved(event) { - noevent(event); - if (!mousemoving) { - var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny; - mousemoving = dx * dx + dy * dy > clickDistance2; - } - gestures.mouse("drag", event); - } - - function mouseupped(event) { - select(event.view).on("mousemove.drag mouseup.drag", null); - yesdrag(event.view, mousemoving); - noevent(event); - gestures.mouse("end", event); - } - - function touchstarted(event, d) { - if (!filter.call(this, event, d)) return; - var touches = event.changedTouches, - c = container.call(this, event, d), - n = touches.length, i, gesture; - - for (i = 0; i < n; ++i) { - if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) { - nopropagation(event); - gesture("start", event, touches[i]); - } - } - } - - function touchmoved(event) { - var touches = event.changedTouches, - n = touches.length, i, gesture; - - for (i = 0; i < n; ++i) { - if (gesture = gestures[touches[i].identifier]) { - noevent(event); - gesture("drag", event, touches[i]); - } - } - } - - function touchended(event) { - var touches = event.changedTouches, - n = touches.length, i, gesture; - - if (touchending) clearTimeout(touchending); - touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! - for (i = 0; i < n; ++i) { - if (gesture = gestures[touches[i].identifier]) { - nopropagation(event); - gesture("end", event, touches[i]); - } - } - } - - function beforestart(that, container, event, d, identifier, touch) { - var dispatch = listeners.copy(), - p = pointer(touch || event, container), dx, dy, - s; - - if ((s = subject.call(that, new DragEvent("beforestart", { - sourceEvent: event, - target: drag, - identifier, - active, - x: p[0], - y: p[1], - dx: 0, - dy: 0, - dispatch - }), d)) == null) return; - - dx = s.x - p[0] || 0; - dy = s.y - p[1] || 0; - - return function gesture(type, event, touch) { - var p0 = p, n; - switch (type) { - case "start": gestures[identifier] = gesture, n = active++; break; - case "end": delete gestures[identifier], --active; // nobreak - case "drag": p = pointer(touch || event, container), n = active; break; - } - dispatch.call( - type, - that, - new DragEvent(type, { - sourceEvent: event, - subject: s, - target: drag, - identifier, - active: n, - x: p[0] + dx, - y: p[1] + dy, - dx: p[0] - p0[0], - dy: p[1] - p0[1], - dispatch - }), - d - ); - }; - } - - drag.filter = function(_) { - return arguments.length ? (filter = typeof _ === "function" ? _ : constant(!!_), drag) : filter; - }; - - drag.container = function(_) { - return arguments.length ? (container = typeof _ === "function" ? _ : constant(_), drag) : container; - }; - - drag.subject = function(_) { - return arguments.length ? (subject = typeof _ === "function" ? _ : constant(_), drag) : subject; - }; - - drag.touchable = function(_) { - return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), drag) : touchable; - }; - - drag.on = function() { - var value = listeners.on.apply(listeners, arguments); - return value === listeners ? drag : value; - }; - - drag.clickDistance = function(_) { - return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2); - }; - - return drag; -} diff --git a/node_modules/d3-drag/src/event.js b/node_modules/d3-drag/src/event.js deleted file mode 100644 index 5f246feab912219182ffddfdbb57f604bbd1ea2b..0000000000000000000000000000000000000000 --- a/node_modules/d3-drag/src/event.js +++ /dev/null @@ -1,28 +0,0 @@ -export default function DragEvent(type, { - sourceEvent, - subject, - target, - identifier, - active, - x, y, dx, dy, - dispatch -}) { - Object.defineProperties(this, { - type: {value: type, enumerable: true, configurable: true}, - sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, - subject: {value: subject, enumerable: true, configurable: true}, - target: {value: target, enumerable: true, configurable: true}, - identifier: {value: identifier, enumerable: true, configurable: true}, - active: {value: active, enumerable: true, configurable: true}, - x: {value: x, enumerable: true, configurable: true}, - y: {value: y, enumerable: true, configurable: true}, - dx: {value: dx, enumerable: true, configurable: true}, - dy: {value: dy, enumerable: true, configurable: true}, - _: {value: dispatch} - }); -} - -DragEvent.prototype.on = function() { - var value = this._.on.apply(this._, arguments); - return value === this._ ? this : value; -}; diff --git a/node_modules/d3-drag/src/index.js b/node_modules/d3-drag/src/index.js deleted file mode 100644 index d2dd6019b4ea9926af855a0bc236b349f24e98b0..0000000000000000000000000000000000000000 --- a/node_modules/d3-drag/src/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export {default as drag} from "./drag.js"; -export {default as dragDisable, yesdrag as dragEnable} from "./nodrag.js"; diff --git a/node_modules/d3-drag/src/nodrag.js b/node_modules/d3-drag/src/nodrag.js deleted file mode 100644 index eab81d3bf6ad754650281efb57c3e52e51a46d1b..0000000000000000000000000000000000000000 --- a/node_modules/d3-drag/src/nodrag.js +++ /dev/null @@ -1,28 +0,0 @@ -import {select} from "d3-selection"; -import noevent from "./noevent.js"; - -export default function(view) { - var root = view.document.documentElement, - selection = select(view).on("dragstart.drag", noevent, true); - if ("onselectstart" in root) { - selection.on("selectstart.drag", noevent, true); - } else { - root.__noselect = root.style.MozUserSelect; - root.style.MozUserSelect = "none"; - } -} - -export function yesdrag(view, noclick) { - var root = view.document.documentElement, - selection = select(view).on("dragstart.drag", null); - if (noclick) { - selection.on("click.drag", noevent, true); - setTimeout(function() { selection.on("click.drag", null); }, 0); - } - if ("onselectstart" in root) { - selection.on("selectstart.drag", null); - } else { - root.style.MozUserSelect = root.__noselect; - delete root.__noselect; - } -} diff --git a/node_modules/d3-drag/src/noevent.js b/node_modules/d3-drag/src/noevent.js deleted file mode 100644 index b32552dc29f086d1e24b81abbca67ad5598b0cdc..0000000000000000000000000000000000000000 --- a/node_modules/d3-drag/src/noevent.js +++ /dev/null @@ -1,8 +0,0 @@ -export function nopropagation(event) { - event.stopImmediatePropagation(); -} - -export default function(event) { - event.preventDefault(); - event.stopImmediatePropagation(); -} diff --git a/node_modules/d3-dsv/LICENSE b/node_modules/d3-dsv/LICENSE deleted file mode 100644 index 3d0802c3bd11af0b30851a9765f40ee4111a98b6..0000000000000000000000000000000000000000 --- a/node_modules/d3-dsv/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2013-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-dsv/README.md b/node_modules/d3-dsv/README.md deleted file mode 100644 index c348489fb5e57621c291fba5cad9282d8e0eed8a..0000000000000000000000000000000000000000 --- a/node_modules/d3-dsv/README.md +++ /dev/null @@ -1,482 +0,0 @@ -# d3-dsv - -This module provides a parser and formatter for delimiter-separated values, most commonly [comma-](https://en.wikipedia.org/wiki/Comma-separated_values) (CSV) or tab-separated values (TSV). These tabular formats are popular with spreadsheet programs such as Microsoft Excel, and are often more space-efficient than JSON. This implementation is based on [RFC 4180](http://tools.ietf.org/html/rfc4180). - -Comma (CSV) and tab (TSV) delimiters are built-in. For example, to parse: - -```js -d3.csvParse("foo,bar\n1,2"); // [{foo: "1", bar: "2"}, columns: ["foo", "bar"]] -d3.tsvParse("foo\tbar\n1\t2"); // [{foo: "1", bar: "2"}, columns: ["foo", "bar"]] -``` - -Or to format: - -```js -d3.csvFormat([{foo: "1", bar: "2"}]); // "foo,bar\n1,2" -d3.tsvFormat([{foo: "1", bar: "2"}]); // "foo\tbar\n1\t2" -``` - -To use a different delimiter, such as “|†for pipe-separated values, use [d3.dsvFormat](#dsvFormat): - -```js -var psv = d3.dsvFormat("|"); - -console.log(psv.parse("foo|bar\n1|2")); // [{foo: "1", bar: "2"}, columns: ["foo", "bar"]] -``` - -For easy loading of DSV files in a browser, see [d3-fetch](https://github.com/d3/d3-fetch)’s [d3.csv](https://github.com/d3/d3-fetch/blob/master/README.md#csv) and [d3.tsv](https://github.com/d3/d3-fetch/blob/master/README.md#tsv) methods. - -## Installing - -If you use NPM, `npm install d3-dsv`. Otherwise, download the [latest release](https://github.com/d3/d3-dsv/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-dsv.v1.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-dsv.v1.min.js"></script> -<script> - -var data = d3.csvParse(string); - -</script> -``` - -[Try d3-dsv in your browser.](https://tonicdev.com/npm/d3-dsv) - -## API Reference - -<a name="csvParse" href="#csvParse">#</a> d3.<b>csvParse</b>(<i>string</i>[, <i>row</i>]) [<>](https://github.com/d3/d3-dsv/blob/master/src/csv.js "Source") - -Equivalent to [dsvFormat](#dsvFormat)(",").[parse](#dsv_parse). Note: requires unsafe-eval [content security policy](#content-security-policy). - -<a name="csvParseRows" href="#csvParseRows">#</a> d3.<b>csvParseRows</b>(<i>string</i>[, <i>row</i>]) [<>](https://github.com/d3/d3-dsv/blob/master/src/csv.js "Source") - -Equivalent to [dsvFormat](#dsvFormat)(",").[parseRows](#dsv_parseRows). - -<a name="csvFormat" href="#csvFormat">#</a> d3.<b>csvFormat</b>(<i>rows</i>[, <i>columns</i>]) [<>](https://github.com/d3/d3-dsv/blob/master/src/csv.js "Source") - -Equivalent to [dsvFormat](#dsvFormat)(",").[format](#dsv_format). - -<a name="csvFormatBody" href="#csvFormatBody">#</a> d3.<b>csvFormatBody</b>(<i>rows</i>[, <i>columns</i>]) [<>](https://github.com/d3/d3-dsv/blob/master/src/csv.js "Source") - -Equivalent to [dsvFormat](#dsvFormat)(",").[formatBody](#dsv_formatBody). - -<a name="csvFormatRows" href="#csvFormatRows">#</a> d3.<b>csvFormatRows</b>(<i>rows</i>) [<>](https://github.com/d3/d3-dsv/blob/master/src/csv.js "Source") - -Equivalent to [dsvFormat](#dsvFormat)(",").[formatRows](#dsv_formatRows). - -<a name="csvFormatRow" href="#csvFormatRow">#</a> d3.<b>csvFormatRow</b>(<i>row</i>) [<>](https://github.com/d3/d3-dsv/blob/master/src/csv.js "Source") - -Equivalent to [dsvFormat](#dsvFormat)(",").[formatRow](#dsv_formatRow). - -<a name="csvFormatValue" href="#csvFormatValue">#</a> d3.<b>csvFormatValue</b>(<i>value</i>) [<>](https://github.com/d3/d3-dsv/blob/master/src/csv.js "Source") - -Equivalent to [dsvFormat](#dsvFormat)(",").[formatValue](#dsv_formatValue). - -<a name="tsvParse" href="#tsvParse">#</a> d3.<b>tsvParse</b>(<i>string</i>[, <i>row</i>]) [<>](https://github.com/d3/d3-dsv/blob/master/src/tsv.js "Source") - -Equivalent to [dsvFormat](#dsvFormat)("\t").[parse](#dsv_parse). Note: requires unsafe-eval [content security policy](#content-security-policy). - -<a name="tsvParseRows" href="#tsvParseRows">#</a> d3.<b>tsvParseRows</b>(<i>string</i>[, <i>row</i>]) [<>](https://github.com/d3/d3-dsv/blob/master/src/tsv.js "Source") - -Equivalent to [dsvFormat](#dsvFormat)("\t").[parseRows](#dsv_parseRows). - -<a name="tsvFormat" href="#tsvFormat">#</a> d3.<b>tsvFormat</b>(<i>rows</i>[, <i>columns</i>]) [<>](https://github.com/d3/d3-dsv/blob/master/src/tsv.js "Source") - -Equivalent to [dsvFormat](#dsvFormat)("\t").[format](#dsv_format). - -<a name="tsvFormatBody" href="#tsvFormatBody">#</a> d3.<b>tsvFormatBody</b>(<i>rows</i>[, <i>columns</i>]) [<>](https://github.com/d3/d3-dsv/blob/master/src/tsv.js "Source") - -Equivalent to [dsvFormat](#dsvFormat)("\t").[formatBody](#dsv_formatBody). - -<a name="tsvFormatRows" href="#tsvFormatRows">#</a> d3.<b>tsvFormatRows</b>(<i>rows</i>) [<>](https://github.com/d3/d3-dsv/blob/master/src/tsv.js "Source") - -Equivalent to [dsvFormat](#dsvFormat)("\t").[formatRows](#dsv_formatRows). - -<a name="tsvFormatRow" href="#tsvFormatRow">#</a> d3.<b>tsvFormatRow</b>(<i>row</i>) [<>](https://github.com/d3/d3-dsv/blob/master/src/tsv.js "Source") - -Equivalent to [dsvFormat](#dsvFormat)("\t").[formatRow](#dsv_formatRow). - -<a name="tsvFormatValue" href="#tsvFormatValue">#</a> d3.<b>tsvFormatValue</b>(<i>value</i>) [<>](https://github.com/d3/d3-dsv/blob/master/src/tsv.js "Source") - -Equivalent to [dsvFormat](#dsvFormat)("\t").[formatValue](#dsv_formatValue). - -<a name="dsvFormat" href="#dsvFormat">#</a> d3.<b>dsvFormat</b>(<i>delimiter</i>) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js) - -Constructs a new DSV parser and formatter for the specified *delimiter*. The *delimiter* must be a single character (*i.e.*, a single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are not. - -<a name="dsv_parse" href="#dsv_parse">#</a> *dsv*.<b>parse</b>(<i>string</i>[, <i>row</i>]) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js "Source") - -Parses the specified *string*, which must be in the delimiter-separated values format with the appropriate delimiter, returning an array of objects representing the parsed rows. - -Unlike [*dsv*.parseRows](#dsv_parseRows), this method requires that the first line of the DSV content contains a delimiter-separated list of column names; these column names become the attributes on the returned objects. For example, consider the following CSV file: - -``` -Year,Make,Model,Length -1997,Ford,E350,2.34 -2000,Mercury,Cougar,2.38 -``` - -The resulting JavaScript array is: - -```js -[ - {"Year": "1997", "Make": "Ford", "Model": "E350", "Length": "2.34"}, - {"Year": "2000", "Make": "Mercury", "Model": "Cougar", "Length": "2.38"} -] -``` - -The returned array also exposes a `columns` property containing the column names in input order (in contrast to Object.keys, whose iteration order is arbitrary). For example: - -```js -data.columns; // ["Year", "Make", "Model", "Length"] -``` - -If the column names are not unique, only the last value is returned for each name; to access all values, use [*dsv*.parseRows](#dsv_parseRows) instead (see [example](https://observablehq.com/@d3/parse-csv-with-duplicate-column-names)). - -If a *row* conversion function is not specified, field values are strings. For safety, there is no automatic conversion to numbers, dates, or other types. In some cases, JavaScript may coerce strings to numbers for you automatically (for example, using the `+` operator), but better is to specify a *row* conversion function. See [d3.autoType](#autoType) for a convenient *row* conversion function that infers and coerces common types like numbers and strings. - -If a *row* conversion function is specified, the specified function is invoked for each row, being passed an object representing the current row (`d`), the index (`i`) starting at zero for the first non-header row, and the array of column names. If the returned value is null or undefined, the row is skipped and will be omitted from the array returned by *dsv*.parse; otherwise, the returned value defines the corresponding row object. For example: - -```js -var data = d3.csvParse(string, function(d) { - return { - year: new Date(+d.Year, 0, 1), // lowercase and convert "Year" to Date - make: d.Make, // lowercase - model: d.Model, // lowercase - length: +d.Length // lowercase and convert "Length" to number - }; -}); -``` - -Note: using `+` rather than [parseInt](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/parseInt) or [parseFloat](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/parseFloat) is typically faster, though more restrictive. For example, `"30px"` when coerced using `+` returns `NaN`, while parseInt and parseFloat return `30`. - -Note: requires unsafe-eval [content security policy](#content-security-policy). - -<a name="dsv_parseRows" href="#dsv_parseRows">#</a> <i>dsv</i>.<b>parseRows</b>(<i>string</i>[, <i>row</i>]) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js "Source") - -Parses the specified *string*, which must be in the delimiter-separated values format with the appropriate delimiter, returning an array of arrays representing the parsed rows. - -Unlike [*dsv*.parse](#dsv_parse), this method treats the header line as a standard row, and should be used whenever DSV content does not contain a header. Each row is represented as an array rather than an object. Rows may have variable length. For example, consider the following CSV file, which notably lacks a header line: - -``` -1997,Ford,E350,2.34 -2000,Mercury,Cougar,2.38 -``` - -The resulting JavaScript array is: - -```js -[ - ["1997", "Ford", "E350", "2.34"], - ["2000", "Mercury", "Cougar", "2.38"] -] -``` - -If a *row* conversion function is not specified, field values are strings. For safety, there is no automatic conversion to numbers, dates, or other types. In some cases, JavaScript may coerce strings to numbers for you automatically (for example, using the `+` operator), but better is to specify a *row* conversion function. See [d3.autoType](#autoType) for a convenient *row* conversion function that infers and coerces common types like numbers and strings. - -If a *row* conversion function is specified, the specified function is invoked for each row, being passed an array representing the current row (`d`), the index (`i`) starting at zero for the first row, and the array of column names. If the returned value is null or undefined, the row is skipped and will be omitted from the array returned by *dsv*.parse; otherwise, the returned value defines the corresponding row object. For example: - -```js -var data = d3.csvParseRows(string, function(d, i) { - return { - year: new Date(+d[0], 0, 1), // convert first colum column to Date - make: d[1], - model: d[2], - length: +d[3] // convert fourth column to number - }; -}); -``` - -In effect, *row* is similar to applying a [map](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/map) and [filter](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/filter) operator to the returned rows. - -<a name="dsv_format" href="#dsv_format">#</a> <i>dsv</i>.<b>format</b>(<i>rows</i>[, <i>columns</i>]) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js "Source") - -Formats the specified array of object *rows* as delimiter-separated values, returning a string. This operation is the inverse of [*dsv*.parse](#dsv_parse). Each row will be separated by a newline (`\n`), and each column within each row will be separated by the delimiter (such as a comma, `,`). Values that contain either the delimiter, a double-quote (`"`) or a newline will be escaped using double-quotes. - -If *columns* is not specified, the list of column names that forms the header row is determined by the union of all properties on all objects in *rows*; the order of columns is nondeterministic. If *columns* is specified, it is an array of strings representing the column names. For example: - -```js -var string = d3.csvFormat(data, ["year", "make", "model", "length"]); -``` - -All fields on each row object will be coerced to strings. If the field value is null or undefined, the empty string is used. If the field value is a Date, the [ECMAScript date-time string format](https://www.ecma-international.org/ecma-262/9.0/index.html#sec-date-time-string-format) (a subset of ISO 8601) is used: for example, dates at UTC midnight are formatted as `YYYY-MM-DD`. For more control over which and how fields are formatted, first map *rows* to an array of array of string, and then use [*dsv*.formatRows](#dsv_formatRows). - -<a name="dsv_formatBody" href="#dsv_formatBody">#</a> <i>dsv</i>.<b>formatBody</b>(<i>rows</i>[, <i>columns</i>]) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js "Source") - -Equivalent to [*dsv*.format](#dsv_format), but omits the header row. This is useful, for example, when appending rows to an existing file. - -<a name="dsv_formatRows" href="#dsv_formatRows">#</a> <i>dsv</i>.<b>formatRows</b>(<i>rows</i>) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js "Source") - -Formats the specified array of array of string *rows* as delimiter-separated values, returning a string. This operation is the reverse of [*dsv*.parseRows](#dsv_parseRows). Each row will be separated by a newline (`\n`), and each column within each row will be separated by the delimiter (such as a comma, `,`). Values that contain either the delimiter, a double-quote (") or a newline will be escaped using double-quotes. - -To convert an array of objects to an array of arrays while explicitly specifying the columns, use [*array*.map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map). For example: - -```js -var string = d3.csvFormatRows(data.map(function(d, i) { - return [ - d.year.getFullYear(), // Assuming d.year is a Date object. - d.make, - d.model, - d.length - ]; -})); -``` - -If you like, you can also [*array*.concat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat) this result with an array of column names to generate the first row: - -```js -var string = d3.csvFormatRows([[ - "year", - "make", - "model", - "length" - ]].concat(data.map(function(d, i) { - return [ - d.year.getFullYear(), // Assuming d.year is a Date object. - d.make, - d.model, - d.length - ]; -}))); -``` - -<a name="dsv_formatRow" href="#dsv_formatRow">#</a> <i>dsv</i>.<b>formatRow</b>(<i>row</i>) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js "Source") - -Formats a single array *row* of strings as delimiter-separated values, returning a string. Each column within the row will be separated by the delimiter (such as a comma, `,`). Values that contain either the delimiter, a double-quote (") or a newline will be escaped using double-quotes. - -<a name="dsv_formatValue" href="#dsv_formatValue">#</a> <i>dsv</i>.<b>formatValue</b>(<i>value</i>) [<>](https://github.com/d3/d3-dsv/blob/master/src/dsv.js "Source") - -Format a single *value* or string as a delimiter-separated value, returning a string. A value that contains either the delimiter, a double-quote (") or a newline will be escaped using double-quotes. - -<a name="autoType" href="#autoType">#</a> d3.<b>autoType</b>(<i>object</i>) [<>](https://github.com/d3/d3-dsv/blob/master/src/autoType.js "Source") - -Given an *object* (or array) representing a parsed row, infers the types of values on the *object* and coerces them accordingly, returning the mutated *object*. This function is intended to be used as a *row* accessor function in conjunction with [*dsv*.parse](#dsv_parse) and [*dsv*.parseRows](#dsv_parseRow). For example, consider the following CSV file: - -``` -Year,Make,Model,Length -1997,Ford,E350,2.34 -2000,Mercury,Cougar,2.38 -``` - -When used with [d3.csvParse](#csvParse), - -```js -d3.csvParse(string, d3.autoType) -``` - -the resulting JavaScript array is: - -```js -[ - {"Year": 1997, "Make": "Ford", "Model": "E350", "Length": 2.34}, - {"Year": 2000, "Make": "Mercury", "Model": "Cougar", "Length": 2.38} -] -``` - -Type inference works as follows. For each *value* in the given *object*, the [trimmed](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim) value is computed; the value is then re-assigned as follows: - -1. If empty, then `null`. -1. If exactly `"true"`, then `true`. -1. If exactly `"false"`, then `false`. -1. If exactly `"NaN"`, then `NaN`. -1. Otherwise, if [coercible to a number](https://www.ecma-international.org/ecma-262/9.0/index.html#sec-tonumber-applied-to-the-string-type), then a number. -1. Otherwise, if a [date-only or date-time string](https://www.ecma-international.org/ecma-262/9.0/index.html#sec-date-time-string-format), then a Date. -1. Otherwise, a string (the original untrimmed value). - -Values with leading zeroes may be coerced to numbers; for example `"08904"` coerces to `8904`. However, extra characters such as commas or units (*e.g.*, `"$1.00"`, `"(123)"`, `"1,234"` or `"32px"`) will prevent number coercion, resulting in a string. - -Date strings must be in ECMAScript’s subset of the [ISO 8601 format](https://en.wikipedia.org/wiki/ISO_8601). When a date-only string such as YYYY-MM-DD is specified, the inferred time is midnight UTC; however, if a date-time string such as YYYY-MM-DDTHH:MM is specified without a time zone, it is assumed to be local time. - -Automatic type inference is primarily intended to provide safe, predictable behavior in conjunction with [*dsv*.format](#dsv_format) and [*dsv*.formatRows](#dsv_formatRows) for common JavaScript types. If you need different behavior, you should implement your own row accessor function. - -For more, see [the d3.autoType notebook](https://observablehq.com/@d3/d3-autotype). - -### Content Security Policy - -If a [content security policy](http://www.w3.org/TR/CSP/) is in place, note that [*dsv*.parse](#dsv_parse) requires `unsafe-eval` in the `script-src` directive, due to the (safe) use of dynamic code generation for fast parsing. (See [source](https://github.com/d3/d3-dsv/blob/master/src/dsv.js).) Alternatively, use [*dsv*.parseRows](#dsv_parseRows). - -### Byte-Order Marks - -DSV files sometimes begin with a [byte order mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark); saving a spreadsheet in CSV UTF-8 format from Microsoft Excel, for example, will include a BOM. On the web this is not usually a problem because the [UTF-8 decode algorithm](https://encoding.spec.whatwg.org/#utf-8-decode) specified in the Encoding standard removes the BOM. Node.js, on the other hand, [does not remove the BOM](https://github.com/nodejs/node-v0.x-archive/issues/1918) when decoding UTF-8. - -If the BOM is not removed, the first character of the text is a zero-width non-breaking space. So if a CSV file with a BOM is parsed by [d3.csvParse](#csvParse), the first column’s name will begin with a zero-width non-breaking space. This can be hard to spot since this character is usually invisible when printed. - -To remove the BOM before parsing, consider using [strip-bom](https://www.npmjs.com/package/strip-bom). - -## Command Line Reference - -### dsv2dsv - -<a name="dsv2dsv" href="#dsv2dsv">#</a> <b>dsv2dsv</b> [<i>options…</i>] [<i>file</i>] - -Converts the specified DSV input *file* to DSV (typically with a different delimiter or encoding). If *file* is not specified, defaults to reading from stdin. For example, to convert to CSV to TSV: - -``` -csv2tsv < example.csv > example.tsv -``` - -To convert windows-1252 CSV to utf-8 CSV: - -``` -dsv2dsv --input-encoding windows-1252 < latin1.csv > utf8.csv -``` - -<a name="dsv2dsv_help" href="dsv2dsv_help">#</a> dsv2dsv <b>-h</b> -<br><a href="dsv2dsv_help">#</a> dsv2dsv <b>--help</b> - -Output usage information. - -<a name="dsv2dsv_version" href="dsv2dsv_version">#</a> dsv2dsv <b>-V</b> -<br><a href="dsv2dsv_version">#</a> dsv2dsv <b>--version</b> - -Output the version number. - -<a name="dsv2dsv_out" href="dsv2dsv_out">#</a> dsv2dsv <b>-o</b> <i>file</i> -<br><a href="dsv2dsv_out">#</a> dsv2dsv <b>--out</b> <i>file</i> - -Specify the output file name. Defaults to “-†for stdout. - -<a name="dsv2dsv_input_delimiter" href="dsv2dsv_input_delimiter">#</a> dsv2dsv <b>-r</b> <i>delimiter</i> -<br><a href="dsv2dsv_input_delimiter">#</a> dsv2dsv <b>--input-delimiter</b> <i>delimiter</i> - -Specify the input delimiter character. Defaults to “,†for reading CSV. (You can enter a tab on the command line by typing ⌃V.) - -<a name="dsv2dsv_input_encoding" href="dsv2dsv_input_encoding">#</a> dsv2dsv <b>--input-encoding</b> <i>encoding</i> - -Specify the input character encoding. Defaults to “utf8â€. - -<a name="dsv2dsv_output_delimiter" href="dsv2dsv_output_delimiter">#</a> dsv2dsv <b>-w</b> <i>delimiter</i> -<br><a href="dsv2dsv_output_delimiter">#</a> dsv2dsv <b>--output-delimiter</b> <i>delimiter</i> - -Specify the output delimiter character. Defaults to “,†for writing CSV. (You can enter a tab on the command line by typing ⌃V.) - -<a name="dsv2dsv_output_encoding" href="dsv2dsv_output_encoding">#</a> dsv2dsv <b>--output-encoding</b> <i>encoding</i> - -Specify the output character encoding. Defaults to “utf8â€. - -<a name="csv2tsv" href="#csv2tsv">#</a> <b>csv2tsv</b> [<i>options…</i>] [<i>file</i>] - -Equivalent to [dsv2dsv](#dsv2dsv), but the [output delimiter](#dsv2dsv_output_delimiter) defaults to the tab character (\t). - -<a name="tsv2csv" href="#tsv2csv">#</a> <b>tsv2csv</b> [<i>options…</i>] [<i>file</i>] - -Equivalent to [dsv2dsv](#dsv2dsv), but the [input delimiter](#dsv2dsv_output_delimiter) defaults to the tab character (\t). - -### dsv2json - -<a name="dsv2json" href="#dsv2json">#</a> <b>dsv2json</b> [<i>options…</i>] [<i>file</i>] - -Converts the specified DSV input *file* to JSON. If *file* is not specified, defaults to reading from stdin. For example, to convert to CSV to JSON: - -``` -csv2json < example.csv > example.json -``` - -Or to convert CSV to a newline-delimited JSON stream: - -``` -csv2json -n < example.csv > example.ndjson -``` - -<a name="dsv2json_help" href="dsv2json_help">#</a> dsv2json <b>-h</b> -<br><a href="dsv2json_help">#</a> dsv2json <b>--help</b> - -Output usage information. - -<a name="dsv2json_version" href="dsv2json_version">#</a> dsv2json <b>-V</b> -<br><a href="dsv2json_version">#</a> dsv2json <b>--version</b> - -Output the version number. - -<a name="dsv2json_out" href="dsv2json_out">#</a> dsv2json <b>-o</b> <i>file</i> -<br><a href="dsv2json_out">#</a> dsv2json <b>--out</b> <i>file</i> - -Specify the output file name. Defaults to “-†for stdout. - -<a name="dsv2json_autotype" href="dsv2json_autotype">#</a> dsv2json <b>-a</b> -<br><a href="dsv2json_autotype">#</a> dsv2json <b>--auto-type</b> - -Use type inference when parsing rows. See <a href="#autoType">d3.autoType</a> for how it works. - -<a name="dsv2json_input_delimiter" href="dsv2json_input_delimiter">#</a> dsv2json <b>-r</b> <i>delimiter</i> -<br><a href="dsv2json_input_delimiter">#</a> dsv2json <b>--input-delimiter</b> <i>delimiter</i> - -Specify the input delimiter character. Defaults to “,†for reading CSV. (You can enter a tab on the command line by typing ⌃V.) - -<a name="dsv2json_input_encoding" href="dsv2json_input_encoding">#</a> dsv2json <b>--input-encoding</b> <i>encoding</i> - -Specify the input character encoding. Defaults to “utf8â€. - -<a name="dsv2json_output_encoding" href="dsv2json_output_encoding">#</a> dsv2json <b>-r</b> <i>encoding</i> -<br><a href="dsv2json_output_encoding">#</a> dsv2json <b>--output-encoding</b> <i>encoding</i> - -Specify the output character encoding. Defaults to “utf8â€. - -<a name="dsv2json_newline_delimited" href="dsv2json_newline_delimited">#</a> dsv2json <b>-n</b> -<br><a href="dsv2json_newline_delimited">#</a> dsv2json <b>--newline-delimited</b> - -Output [newline-delimited JSON](https://github.com/mbostock/ndjson-cli) instead of a single JSON array. - -<a name="csv2json" href="#csv2json">#</a> <b>csv2json</b> [<i>options…</i>] [<i>file</i>] - -Equivalent to [dsv2json](#dsv2json). - -<a name="tsv2json" href="#csv2json">#</a> <b>tsv2json</b> [<i>options…</i>] [<i>file</i>] - -Equivalent to [dsv2json](#dsv2json), but the [input delimiter](#dsv2json_input_delimiter) defaults to the tab character (\t). - -### json2dsv - -<a name="json2dsv" href="#json2dsv">#</a> <b>json2dsv</b> [<i>options…</i>] [<i>file</i>] - -Converts the specified JSON input *file* to DSV. If *file* is not specified, defaults to reading from stdin. For example, to convert to JSON to CSV: - -``` -json2csv < example.json > example.csv -``` - -Or to convert a newline-delimited JSON stream to CSV: - -``` -json2csv -n < example.ndjson > example.csv -``` - -<a name="json2dsv_help" href="json2dsv_help">#</a> json2dsv <b>-h</b> -<br><a href="json2dsv_help">#</a> json2dsv <b>--help</b> - -Output usage information. - -<a name="json2dsv_version" href="json2dsv_version">#</a> json2dsv <b>-V</b> -<br><a href="json2dsv_version">#</a> json2dsv <b>--version</b> - -Output the version number. - -<a name="json2dsv_out" href="json2dsv_out">#</a> json2dsv <b>-o</b> <i>file</i> -<br><a href="json2dsv_out">#</a> json2dsv <b>--out</b> <i>file</i> - -Specify the output file name. Defaults to “-†for stdout. - -<a name="json2dsv_input_encoding" href="json2dsv_input_encoding">#</a> json2dsv <b>--input-encoding</b> <i>encoding</i> - -Specify the input character encoding. Defaults to “utf8â€. - -<a name="json2dsv_output_delimiter" href="json2dsv_output_delimiter">#</a> json2dsv <b>-w</b> <i>delimiter</i> -<br><a href="json2dsv_output_delimiter">#</a> json2dsv <b>--output-delimiter</b> <i>delimiter</i> - -Specify the output delimiter character. Defaults to “,†for writing CSV. (You can enter a tab on the command line by typing ⌃V.) - -<a name="json2dsv_output_encoding" href="json2dsv_output_encoding">#</a> json2dsv <b>--output-encoding</b> <i>encoding</i> - -Specify the output character encoding. Defaults to “utf8â€. - -<a name="json2dsv_newline_delimited" href="json2dsv_newline_delimited">#</a> json2dsv <b>-n</b> -<br><a href="json2dsv_newline_delimited">#</a> json2dsv <b>--newline-delimited</b> - -Read [newline-delimited JSON](https://github.com/mbostock/ndjson-cli) instead of a single JSON array. - -<a name="json2csv" href="#json2csv">#</a> <b>json2csv</b> [<i>options…</i>] [<i>file</i>] - -Equivalent to [json2dsv](#json2dsv). - -<a name="json2tsv" href="#json2tsv">#</a> <b>json2tsv</b> [<i>options…</i>] [<i>file</i>] - -Equivalent to [json2dsv](#json2dsv), but the [output delimiter](#json2dsv_output_delimiter) defaults to the tab character (\t). diff --git a/node_modules/d3-dsv/bin/dsv2dsv b/node_modules/d3-dsv/bin/dsv2dsv deleted file mode 100755 index 63ca9caf3af35afc41269370eafb40f7dbf152aa..0000000000000000000000000000000000000000 --- a/node_modules/d3-dsv/bin/dsv2dsv +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env node - -var os = require("os"), - rw = require("rw").dash, - path = require("path"), - iconv = require("iconv-lite"), - commander = require("commander"), - dsv = require("../"); - -var program = path.basename(process.argv[1]), - defaultInDelimiter = program.slice(0, 3) === "tsv" ? "\t" : ",", - defaultOutDelimiter = program.slice(-3) === "tsv" ? "\t" : ","; - -commander - .version(require("../package.json").version) - .usage("[options] [file]") - .option("-o, --out <file>", "output file name; defaults to “-†for stdout", "-") - .option("-r, --input-delimiter <character>", "input delimiter character", defaultInDelimiter) - .option("-w, --output-delimiter <character>", "output delimiter character", defaultOutDelimiter) - .option("--input-encoding <encoding>", "input character encoding; defaults to “utf8â€", "utf8") - .option("--output-encoding <encoding>", "output character encoding; defaults to “utf8â€", "utf8") - .parse(process.argv); - -var inFormat = dsv.dsvFormat(commander.inputDelimiter), - outFormat = dsv.dsvFormat(commander.outputDelimiter); - -rw.readFile(commander.args[0] || "-", function(error, text) { - if (error) throw error; - rw.writeFile("-", iconv.encode(outFormat.format(inFormat.parse(iconv.decode(text, commander.inputEncoding))) + os.EOL, commander.outputEncoding), function(error) { - if (error) throw error; - }); -}); diff --git a/node_modules/d3-dsv/bin/dsv2json b/node_modules/d3-dsv/bin/dsv2json deleted file mode 100755 index c0ec2a3f70b1830e653d3cfac1bbb54b94305985..0000000000000000000000000000000000000000 --- a/node_modules/d3-dsv/bin/dsv2json +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env node - -var os = require("os"), - rw = require("rw").dash, - path = require("path"), - iconv = require("iconv-lite"), - commander = require("commander"), - dsv = require("../"); - -var program = path.basename(process.argv[1]), - defaultInDelimiter = program.slice(0, 3) === "tsv" ? "\t" : ","; - -commander - .version(require("../package.json").version) - .usage("[options] [file]") - .option("-o, --out <file>", "output file name; defaults to “-†for stdout", "-") - .option("-r, --input-delimiter <character>", "input delimiter character", defaultInDelimiter) - .option("-a, --auto-type", "parse rows with type inference (see d3.autoType)") - .option("-n, --newline-delimited", "output newline-delimited JSON") - .option("--input-encoding <encoding>", "input character encoding; defaults to “utf8â€", "utf8") - .option("--output-encoding <encoding>", "output character encoding; defaults to “utf8â€", "utf8") - .parse(process.argv); - -var inFormat = dsv.dsvFormat(commander.inputDelimiter); - -rw.readFile(commander.args[0] || "-", function(error, text) { - if (error) throw error; - - var rowConverter = commander.autoType ? dsv.autoType : null - var rows = inFormat.parse(iconv.decode(text, commander.inputEncoding), rowConverter); - - rw.writeFile(commander.out, iconv.encode(commander.newlineDelimited - ? rows.map(function(row) { return JSON.stringify(row); }).join("\n") + "\n" - : JSON.stringify(rows) + os.EOL, commander.outputEncoding), function(error) { - if (error) throw error; - }); -}); diff --git a/node_modules/d3-dsv/bin/json2dsv b/node_modules/d3-dsv/bin/json2dsv deleted file mode 100755 index ed6f2e0a298543d8a9726cd0d450956424327c33..0000000000000000000000000000000000000000 --- a/node_modules/d3-dsv/bin/json2dsv +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var os = require("os"), - rw = require("rw").dash, - path = require("path"), - iconv = require("iconv-lite"), - commander = require("commander"), - dsv = require("../"); - -var program = path.basename(process.argv[1]), - defaultOutDelimiter = program.slice(-3) === "tsv" ? "\t" : ","; - -commander - .version(require("../package.json").version) - .usage("[options] [file]") - .option("-o, --out <file>", "output file name; defaults to “-†for stdout", "-") - .option("-w, --output-delimiter <character>", "output delimiter character", defaultOutDelimiter) - .option("-n, --newline-delimited", "accept newline-delimited JSON") - .option("--input-encoding <encoding>", "input character encoding; defaults to “utf8â€", "utf8") - .option("--output-encoding <encoding>", "output character encoding; defaults to “utf8â€", "utf8") - .parse(process.argv); - -var outFormat = dsv.dsvFormat(commander.outputDelimiter); - -rw.readFile(commander.args[0] || "-", function(error, text) { - if (error) throw error; - text = iconv.decode(text, commander.inputEncoding); - rw.writeFile(commander.out, iconv.encode(outFormat.format(commander.newlineDelimited - ? text.trim().split(/\r?\n/g).map(function(line) { return JSON.parse(line); }) - : JSON.parse(text)) + os.EOL, commander.outputEncoding), function(error) { - if (error) throw error; - }); -}); diff --git a/node_modules/d3-dsv/dist/d3-dsv.js b/node_modules/d3-dsv/dist/d3-dsv.js deleted file mode 100644 index 0b6956a3cde137da61cb861574167519b7a610b0..0000000000000000000000000000000000000000 --- a/node_modules/d3-dsv/dist/d3-dsv.js +++ /dev/null @@ -1,233 +0,0 @@ -// https://d3js.org/d3-dsv/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {})); -}(this, function (exports) { 'use strict'; - -var EOL = {}, - EOF = {}, - QUOTE = 34, - NEWLINE = 10, - RETURN = 13; - -function objectConverter(columns) { - return new Function("d", "return {" + columns.map(function(name, i) { - return JSON.stringify(name) + ": d[" + i + "] || \"\""; - }).join(",") + "}"); -} - -function customConverter(columns, f) { - var object = objectConverter(columns); - return function(row, i) { - return f(object(row), i, columns); - }; -} - -// Compute unique columns in order of discovery. -function inferColumns(rows) { - var columnSet = Object.create(null), - columns = []; - - rows.forEach(function(row) { - for (var column in row) { - if (!(column in columnSet)) { - columns.push(columnSet[column] = column); - } - } - }); - - return columns; -} - -function pad(value, width) { - var s = value + "", length = s.length; - return length < width ? new Array(width - length + 1).join(0) + s : s; -} - -function formatYear(year) { - return year < 0 ? "-" + pad(-year, 6) - : year > 9999 ? "+" + pad(year, 6) - : pad(year, 4); -} - -function formatDate(date) { - var hours = date.getUTCHours(), - minutes = date.getUTCMinutes(), - seconds = date.getUTCSeconds(), - milliseconds = date.getUTCMilliseconds(); - return isNaN(date) ? "Invalid Date" - : formatYear(date.getUTCFullYear()) + "-" + pad(date.getUTCMonth() + 1, 2) + "-" + pad(date.getUTCDate(), 2) - + (milliseconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "." + pad(milliseconds, 3) + "Z" - : seconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "Z" - : minutes || hours ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + "Z" - : ""); -} - -function dsv(delimiter) { - var reFormat = new RegExp("[\"" + delimiter + "\n\r]"), - DELIMITER = delimiter.charCodeAt(0); - - function parse(text, f) { - var convert, columns, rows = parseRows(text, function(row, i) { - if (convert) return convert(row, i - 1); - columns = row, convert = f ? customConverter(row, f) : objectConverter(row); - }); - rows.columns = columns || []; - return rows; - } - - function parseRows(text, f) { - var rows = [], // output rows - N = text.length, - I = 0, // current character index - n = 0, // current line number - t, // current token - eof = N <= 0, // current token followed by EOF? - eol = false; // current token followed by EOL? - - // Strip the trailing newline. - if (text.charCodeAt(N - 1) === NEWLINE) --N; - if (text.charCodeAt(N - 1) === RETURN) --N; - - function token() { - if (eof) return EOF; - if (eol) return eol = false, EOL; - - // Unescape quotes. - var i, j = I, c; - if (text.charCodeAt(j) === QUOTE) { - while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE); - if ((i = I) >= N) eof = true; - else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true; - else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } - return text.slice(j + 1, i - 1).replace(/""/g, "\""); - } - - // Find next delimiter or newline. - while (I < N) { - if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true; - else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } - else if (c !== DELIMITER) continue; - return text.slice(j, i); - } - - // Return last token before EOF. - return eof = true, text.slice(j, N); - } - - while ((t = token()) !== EOF) { - var row = []; - while (t !== EOL && t !== EOF) row.push(t), t = token(); - if (f && (row = f(row, n++)) == null) continue; - rows.push(row); - } - - return rows; - } - - function preformatBody(rows, columns) { - return rows.map(function(row) { - return columns.map(function(column) { - return formatValue(row[column]); - }).join(delimiter); - }); - } - - function format(rows, columns) { - if (columns == null) columns = inferColumns(rows); - return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join("\n"); - } - - function formatBody(rows, columns) { - if (columns == null) columns = inferColumns(rows); - return preformatBody(rows, columns).join("\n"); - } - - function formatRows(rows) { - return rows.map(formatRow).join("\n"); - } - - function formatRow(row) { - return row.map(formatValue).join(delimiter); - } - - function formatValue(value) { - return value == null ? "" - : value instanceof Date ? formatDate(value) - : reFormat.test(value += "") ? "\"" + value.replace(/"/g, "\"\"") + "\"" - : value; - } - - return { - parse: parse, - parseRows: parseRows, - format: format, - formatBody: formatBody, - formatRows: formatRows, - formatRow: formatRow, - formatValue: formatValue - }; -} - -var csv = dsv(","); - -var csvParse = csv.parse; -var csvParseRows = csv.parseRows; -var csvFormat = csv.format; -var csvFormatBody = csv.formatBody; -var csvFormatRows = csv.formatRows; -var csvFormatRow = csv.formatRow; -var csvFormatValue = csv.formatValue; - -var tsv = dsv("\t"); - -var tsvParse = tsv.parse; -var tsvParseRows = tsv.parseRows; -var tsvFormat = tsv.format; -var tsvFormatBody = tsv.formatBody; -var tsvFormatRows = tsv.formatRows; -var tsvFormatRow = tsv.formatRow; -var tsvFormatValue = tsv.formatValue; - -function autoType(object) { - for (var key in object) { - var value = object[key].trim(), number, m; - if (!value) value = null; - else if (value === "true") value = true; - else if (value === "false") value = false; - else if (value === "NaN") value = NaN; - else if (!isNaN(number = +value)) value = number; - else if (m = value.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)) { - if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, "/").replace(/T/, " "); - value = new Date(value); - } - else continue; - object[key] = value; - } - return object; -} - -// https://github.com/d3/d3-dsv/issues/45 -const fixtz = new Date("2019-01-01T00:00").getHours() || new Date("2019-07-01T00:00").getHours(); - -exports.autoType = autoType; -exports.csvFormat = csvFormat; -exports.csvFormatBody = csvFormatBody; -exports.csvFormatRow = csvFormatRow; -exports.csvFormatRows = csvFormatRows; -exports.csvFormatValue = csvFormatValue; -exports.csvParse = csvParse; -exports.csvParseRows = csvParseRows; -exports.dsvFormat = dsv; -exports.tsvFormat = tsvFormat; -exports.tsvFormatBody = tsvFormatBody; -exports.tsvFormatRow = tsvFormatRow; -exports.tsvFormatRows = tsvFormatRows; -exports.tsvFormatValue = tsvFormatValue; -exports.tsvParse = tsvParse; -exports.tsvParseRows = tsvParseRows; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-dsv/dist/d3-dsv.min.js b/node_modules/d3-dsv/dist/d3-dsv.min.js deleted file mode 100644 index 627ced444a707fe9acd1e4eece2fc36cef2d8b53..0000000000000000000000000000000000000000 --- a/node_modules/d3-dsv/dist/d3-dsv.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-dsv/ v2.0.0 Copyright 2020 Mike Bostock -!function(t,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((t=t||self).d3=t.d3||{})}(this,function(t){"use strict";var r={},e={},n=34,o=10,a=13;function u(t){return new Function("d","return {"+t.map(function(t,r){return JSON.stringify(t)+": d["+r+'] || ""'}).join(",")+"}")}function f(t){var r=Object.create(null),e=[];return t.forEach(function(t){for(var n in t)n in r||e.push(r[n]=n)}),e}function i(t,r){var e=t+"",n=e.length;return n<r?new Array(r-n+1).join(0)+e:e}function s(t){var r,e=t.getUTCHours(),n=t.getUTCMinutes(),o=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((r=t.getUTCFullYear())<0?"-"+i(-r,6):r>9999?"+"+i(r,6):i(r,4))+"-"+i(t.getUTCMonth()+1,2)+"-"+i(t.getUTCDate(),2)+(a?"T"+i(e,2)+":"+i(n,2)+":"+i(o,2)+"."+i(a,3)+"Z":o?"T"+i(e,2)+":"+i(n,2)+":"+i(o,2)+"Z":n||e?"T"+i(e,2)+":"+i(n,2)+"Z":"")}function c(t){var i=new RegExp('["'+t+"\n\r]"),c=t.charCodeAt(0);function l(t,u){var f,i=[],s=t.length,l=0,d=0,m=s<=0,v=!1;function p(){if(m)return e;if(v)return v=!1,r;var u,f,i=l;if(t.charCodeAt(i)===n){for(;l++<s&&t.charCodeAt(l)!==n||t.charCodeAt(++l)===n;);return(u=l)>=s?m=!0:(f=t.charCodeAt(l++))===o?v=!0:f===a&&(v=!0,t.charCodeAt(l)===o&&++l),t.slice(i+1,u-1).replace(/""/g,'"')}for(;l<s;){if((f=t.charCodeAt(u=l++))===o)v=!0;else if(f===a)v=!0,t.charCodeAt(l)===o&&++l;else if(f!==c)continue;return t.slice(i,u)}return m=!0,t.slice(i,s)}for(t.charCodeAt(s-1)===o&&--s,t.charCodeAt(s-1)===a&&--s;(f=p())!==e;){for(var w=[];f!==r&&f!==e;)w.push(f),f=p();u&&null==(w=u(w,d++))||i.push(w)}return i}function d(r,e){return r.map(function(r){return e.map(function(t){return v(r[t])}).join(t)})}function m(r){return r.map(v).join(t)}function v(t){return null==t?"":t instanceof Date?s(t):i.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,r){var e,n,o=l(t,function(t,o){if(e)return e(t,o-1);n=t,e=r?function(t,r){var e=u(t);return function(n,o){return r(e(n),o,t)}}(t,r):u(t)});return o.columns=n||[],o},parseRows:l,format:function(r,e){return null==e&&(e=f(r)),[e.map(v).join(t)].concat(d(r,e)).join("\n")},formatBody:function(t,r){return null==r&&(r=f(t)),d(t,r).join("\n")},formatRows:function(t){return t.map(m).join("\n")},formatRow:m,formatValue:v}}var l=c(","),d=l.parse,m=l.parseRows,v=l.format,p=l.formatBody,w=l.formatRows,h=l.formatRow,C=l.formatValue,g=c("\t"),R=g.parse,T=g.parseRows,F=g.format,y=g.formatBody,j=g.formatRows,A=g.formatRow,N=g.formatValue;const U=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();t.autoType=function(t){for(var r in t){var e,n,o=t[r].trim();if(o)if("true"===o)o=!0;else if("false"===o)o=!1;else if("NaN"===o)o=NaN;else if(isNaN(e=+o)){if(!(n=o.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;U&&n[4]&&!n[7]&&(o=o.replace(/-/g,"/").replace(/T/," ")),o=new Date(o)}else o=e;else o=null;t[r]=o}return t},t.csvFormat=v,t.csvFormatBody=p,t.csvFormatRow=h,t.csvFormatRows=w,t.csvFormatValue=C,t.csvParse=d,t.csvParseRows=m,t.dsvFormat=c,t.tsvFormat=F,t.tsvFormatBody=y,t.tsvFormatRow=A,t.tsvFormatRows=j,t.tsvFormatValue=N,t.tsvParse=R,t.tsvParseRows=T,Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/node_modules/d3-dsv/package.json b/node_modules/d3-dsv/package.json deleted file mode 100644 index 1fb668ef064f92aec24db130ccbfc0e24aa10e6f..0000000000000000000000000000000000000000 --- a/node_modules/d3-dsv/package.json +++ /dev/null @@ -1,90 +0,0 @@ -{ - "_from": "d3-dsv@2", - "_id": "d3-dsv@2.0.0", - "_inBundle": false, - "_integrity": "sha512-E+Pn8UJYx9mViuIUkoc93gJGGYut6mSDKy2+XaPwccwkRGlR+LO97L2VCCRjQivTwLHkSnAJG7yo00BWY6QM+w==", - "_location": "/d3-dsv", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-dsv@2", - "name": "d3-dsv", - "escapedName": "d3-dsv", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3", - "/d3-fetch" - ], - "_resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-2.0.0.tgz", - "_shasum": "b37b194b6df42da513a120d913ad1be22b5fe7c5", - "_spec": "d3-dsv@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bin": { - "csv2json": "bin/dsv2json", - "csv2tsv": "bin/dsv2dsv", - "dsv2dsv": "bin/dsv2dsv", - "dsv2json": "bin/dsv2json", - "json2csv": "bin/json2dsv", - "json2dsv": "bin/json2dsv", - "json2tsv": "bin/json2dsv", - "tsv2csv": "bin/dsv2dsv", - "tsv2json": "bin/dsv2json" - }, - "bugs": { - "url": "https://github.com/d3/d3-dsv/issues" - }, - "bundleDependencies": false, - "dependencies": { - "commander": "2", - "iconv-lite": "0.4", - "rw": "1" - }, - "deprecated": false, - "description": "A parser and formatter for delimiter-separated values, such as CSV and TSV", - "devDependencies": { - "csv-spectrum": "1", - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "bin/*", - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-dsv/", - "jsdelivr": "dist/d3-dsv.min.js", - "keywords": [ - "d3", - "d3-module", - "dsv", - "csv", - "tsv" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-dsv.js", - "module": "src/index.js", - "name": "d3-dsv", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-dsv.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "TZ=America/Los_Angeles tape 'test/**/*-test.js' && eslint src test" - }, - "sideEffects": false, - "unpkg": "dist/d3-dsv.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-dsv/src/autoType.js b/node_modules/d3-dsv/src/autoType.js deleted file mode 100644 index 13864f5e6b96ffddddccdca94ba7c16de68feec8..0000000000000000000000000000000000000000 --- a/node_modules/d3-dsv/src/autoType.js +++ /dev/null @@ -1,20 +0,0 @@ -export default function autoType(object) { - for (var key in object) { - var value = object[key].trim(), number, m; - if (!value) value = null; - else if (value === "true") value = true; - else if (value === "false") value = false; - else if (value === "NaN") value = NaN; - else if (!isNaN(number = +value)) value = number; - else if (m = value.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)) { - if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, "/").replace(/T/, " "); - value = new Date(value); - } - else continue; - object[key] = value; - } - return object; -} - -// https://github.com/d3/d3-dsv/issues/45 -const fixtz = new Date("2019-01-01T00:00").getHours() || new Date("2019-07-01T00:00").getHours(); \ No newline at end of file diff --git a/node_modules/d3-dsv/src/csv.js b/node_modules/d3-dsv/src/csv.js deleted file mode 100644 index 47afda8549c623211cde882fdafd343ba2be56aa..0000000000000000000000000000000000000000 --- a/node_modules/d3-dsv/src/csv.js +++ /dev/null @@ -1,11 +0,0 @@ -import dsv from "./dsv.js"; - -var csv = dsv(","); - -export var csvParse = csv.parse; -export var csvParseRows = csv.parseRows; -export var csvFormat = csv.format; -export var csvFormatBody = csv.formatBody; -export var csvFormatRows = csv.formatRows; -export var csvFormatRow = csv.formatRow; -export var csvFormatValue = csv.formatValue; diff --git a/node_modules/d3-dsv/src/dsv.js b/node_modules/d3-dsv/src/dsv.js deleted file mode 100644 index 17838fb3e3c6d68969933ffb280ed370975b0968..0000000000000000000000000000000000000000 --- a/node_modules/d3-dsv/src/dsv.js +++ /dev/null @@ -1,164 +0,0 @@ -var EOL = {}, - EOF = {}, - QUOTE = 34, - NEWLINE = 10, - RETURN = 13; - -function objectConverter(columns) { - return new Function("d", "return {" + columns.map(function(name, i) { - return JSON.stringify(name) + ": d[" + i + "] || \"\""; - }).join(",") + "}"); -} - -function customConverter(columns, f) { - var object = objectConverter(columns); - return function(row, i) { - return f(object(row), i, columns); - }; -} - -// Compute unique columns in order of discovery. -function inferColumns(rows) { - var columnSet = Object.create(null), - columns = []; - - rows.forEach(function(row) { - for (var column in row) { - if (!(column in columnSet)) { - columns.push(columnSet[column] = column); - } - } - }); - - return columns; -} - -function pad(value, width) { - var s = value + "", length = s.length; - return length < width ? new Array(width - length + 1).join(0) + s : s; -} - -function formatYear(year) { - return year < 0 ? "-" + pad(-year, 6) - : year > 9999 ? "+" + pad(year, 6) - : pad(year, 4); -} - -function formatDate(date) { - var hours = date.getUTCHours(), - minutes = date.getUTCMinutes(), - seconds = date.getUTCSeconds(), - milliseconds = date.getUTCMilliseconds(); - return isNaN(date) ? "Invalid Date" - : formatYear(date.getUTCFullYear(), 4) + "-" + pad(date.getUTCMonth() + 1, 2) + "-" + pad(date.getUTCDate(), 2) - + (milliseconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "." + pad(milliseconds, 3) + "Z" - : seconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "Z" - : minutes || hours ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + "Z" - : ""); -} - -export default function(delimiter) { - var reFormat = new RegExp("[\"" + delimiter + "\n\r]"), - DELIMITER = delimiter.charCodeAt(0); - - function parse(text, f) { - var convert, columns, rows = parseRows(text, function(row, i) { - if (convert) return convert(row, i - 1); - columns = row, convert = f ? customConverter(row, f) : objectConverter(row); - }); - rows.columns = columns || []; - return rows; - } - - function parseRows(text, f) { - var rows = [], // output rows - N = text.length, - I = 0, // current character index - n = 0, // current line number - t, // current token - eof = N <= 0, // current token followed by EOF? - eol = false; // current token followed by EOL? - - // Strip the trailing newline. - if (text.charCodeAt(N - 1) === NEWLINE) --N; - if (text.charCodeAt(N - 1) === RETURN) --N; - - function token() { - if (eof) return EOF; - if (eol) return eol = false, EOL; - - // Unescape quotes. - var i, j = I, c; - if (text.charCodeAt(j) === QUOTE) { - while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE); - if ((i = I) >= N) eof = true; - else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true; - else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } - return text.slice(j + 1, i - 1).replace(/""/g, "\""); - } - - // Find next delimiter or newline. - while (I < N) { - if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true; - else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } - else if (c !== DELIMITER) continue; - return text.slice(j, i); - } - - // Return last token before EOF. - return eof = true, text.slice(j, N); - } - - while ((t = token()) !== EOF) { - var row = []; - while (t !== EOL && t !== EOF) row.push(t), t = token(); - if (f && (row = f(row, n++)) == null) continue; - rows.push(row); - } - - return rows; - } - - function preformatBody(rows, columns) { - return rows.map(function(row) { - return columns.map(function(column) { - return formatValue(row[column]); - }).join(delimiter); - }); - } - - function format(rows, columns) { - if (columns == null) columns = inferColumns(rows); - return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join("\n"); - } - - function formatBody(rows, columns) { - if (columns == null) columns = inferColumns(rows); - return preformatBody(rows, columns).join("\n"); - } - - function formatRows(rows) { - return rows.map(formatRow).join("\n"); - } - - function formatRow(row) { - return row.map(formatValue).join(delimiter); - } - - function formatValue(value) { - return value == null ? "" - : value instanceof Date ? formatDate(value) - : reFormat.test(value += "") ? "\"" + value.replace(/"/g, "\"\"") + "\"" - : value; - } - - return { - parse: parse, - parseRows: parseRows, - format: format, - formatBody: formatBody, - formatRows: formatRows, - formatRow: formatRow, - formatValue: formatValue - }; -} diff --git a/node_modules/d3-dsv/src/index.js b/node_modules/d3-dsv/src/index.js deleted file mode 100644 index 0a63fff2e76113df59ae674d0ae15ee3158dd92c..0000000000000000000000000000000000000000 --- a/node_modules/d3-dsv/src/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export {default as dsvFormat} from "./dsv.js"; -export {csvParse, csvParseRows, csvFormat, csvFormatBody, csvFormatRows, csvFormatRow, csvFormatValue} from "./csv.js"; -export {tsvParse, tsvParseRows, tsvFormat, tsvFormatBody, tsvFormatRows, tsvFormatRow, tsvFormatValue} from "./tsv.js"; -export {default as autoType} from "./autoType.js"; diff --git a/node_modules/d3-dsv/src/tsv.js b/node_modules/d3-dsv/src/tsv.js deleted file mode 100644 index 38b16c21b2ddd19008f90cc0c19629ab4be29ac7..0000000000000000000000000000000000000000 --- a/node_modules/d3-dsv/src/tsv.js +++ /dev/null @@ -1,11 +0,0 @@ -import dsv from "./dsv.js"; - -var tsv = dsv("\t"); - -export var tsvParse = tsv.parse; -export var tsvParseRows = tsv.parseRows; -export var tsvFormat = tsv.format; -export var tsvFormatBody = tsv.formatBody; -export var tsvFormatRows = tsv.formatRows; -export var tsvFormatRow = tsv.formatRow; -export var tsvFormatValue = tsv.formatValue; diff --git a/node_modules/d3-ease/LICENSE b/node_modules/d3-ease/LICENSE deleted file mode 100644 index 6c05ba05ebf3838716a13865fe76580c2b0678ea..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/LICENSE +++ /dev/null @@ -1,28 +0,0 @@ -Copyright 2010-2016 Mike Bostock -Copyright 2001 Robert Penner -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-ease/README.md b/node_modules/d3-ease/README.md deleted file mode 100644 index f2c86a8fc93ab72c78635b703a8976d3ac087308..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/README.md +++ /dev/null @@ -1,241 +0,0 @@ -# d3-ease - -*Easing* is a method of distorting time to control apparent motion in animation. It is most commonly used for [slow-in, slow-out](https://en.wikipedia.org/wiki/12_basic_principles_of_animation#Slow_In_and_Slow_Out). By easing time, [animated transitions](https://github.com/d3/d3-transition) are smoother and exhibit more plausible motion. - -The easing types in this module implement the [ease method](#ease_ease), which takes a normalized time *t* and returns the corresponding “eased†time *tʹ*. Both the normalized time and the eased time are typically in the range [0,1], where 0 represents the start of the animation and 1 represents the end; some easing types, such as [elastic](#easeElastic), may return eased times slightly outside this range. A good easing type should return 0 if *t* = 0 and 1 if *t* = 1. See the [easing explorer](https://observablehq.com/@d3/easing) for a visual demonstration. - -These easing types are largely based on work by [Robert Penner](http://robertpenner.com/easing/). - -## Installing - -If you use NPM, `npm install d3-ease`. Otherwise, download the [latest release](https://github.com/d3/d3-ease/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-ease.v1.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-ease.v2.min.js"></script> -<script> - -var ease = d3.easeCubic; - -</script> -``` - -[Try d3-ease in your browser.](https://observablehq.com/@d3/easing-animations) - -## API Reference - -<a name="_ease" href="#_ease">#</a> <i>ease</i>(<i>t</i>) - -Given the specified normalized time *t*, typically in the range [0,1], returns the “eased†time *tʹ*, also typically in [0,1]. 0 represents the start of the animation and 1 represents the end. A good implementation returns 0 if *t* = 0 and 1 if *t* = 1. See the [easing explorer](https://observablehq.com/@d3/easing) for a visual demonstration. For example, to apply [cubic](#easeCubic) easing: - -```js -var te = d3.easeCubic(t); -``` - -Similarly, to apply custom [elastic](#easeElastic) easing: - -```js -// Before the animation starts, create your easing function. -var customElastic = d3.easeElastic.period(0.4); - -// During the animation, apply the easing function. -var te = customElastic(t); -``` - -<a name="easeLinear" href="#easeLinear">#</a> d3.<b>easeLinear</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/linear.js "Source") - -Linear easing; the identity function; *linear*(*t*) returns *t*. - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/linear.png" alt="linear">](https://observablehq.com/@d3/easing#linear) - -<a name="easePolyIn" href="#easePolyIn">#</a> d3.<b>easePolyIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/poly.js#L3 "Source") - -Polynomial easing; raises *t* to the specified [exponent](#poly_exponent). If the exponent is not specified, it defaults to 3, equivalent to [cubicIn](#easeCubicIn). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/polyIn.png" alt="polyIn">](https://observablehq.com/@d3/easing#polyIn) - -<a name="easePolyOut" href="#easePolyOut">#</a> d3.<b>easePolyOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/poly.js#L15 "Source") - -Reverse polynomial easing; equivalent to 1 - [polyIn](#easePolyIn)(1 - *t*). If the [exponent](#poly_exponent) is not specified, it defaults to 3, equivalent to [cubicOut](#easeCubicOut). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/polyOut.png" alt="polyOut">](https://observablehq.com/@d3/easing#polyOut) - -<a name="easePoly" href="#easePoly">#</a> d3.<b>easePoly</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/poly.js "Source") -<br><a name="easePolyInOut" href="#easePolyInOut">#</a> d3.<b>easePolyInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/poly.js#L27 "Source") - -Symmetric polynomial easing; scales [polyIn](#easePolyIn) for *t* in [0, 0.5] and [polyOut](#easePolyOut) for *t* in [0.5, 1]. If the [exponent](#poly_exponent) is not specified, it defaults to 3, equivalent to [cubic](#easeCubic). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/polyInOut.png" alt="polyInOut">](https://observablehq.com/@d3/easing#polyInOut) - -<a name="poly_exponent" href="#poly_exponent">#</a> <i>poly</i>.<b>exponent</b>(<i>e</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/poly.js#L1 "Source") - -Returns a new polynomial easing with the specified exponent *e*. For example, to create equivalents of [linear](#easeLinear), [quad](#easeQuad), and [cubic](#easeCubic): - -```js -var linear = d3.easePoly.exponent(1), - quad = d3.easePoly.exponent(2), - cubic = d3.easePoly.exponent(3); -``` - -<a name="easeQuadIn" href="#easeQuadIn">#</a> d3.<b>easeQuadIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/quad.js#L1 "Source") - -Quadratic easing; equivalent to [polyIn](#easePolyIn).[exponent](#poly_exponent)(2). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/quadIn.png" alt="quadIn">](https://observablehq.com/@d3/easing#quadIn) - -<a name="easeQuadOut" href="#easeQuadOut">#</a> d3.<b>easeQuadOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/quad.js#L5 "Source") - -Reverse quadratic easing; equivalent to 1 - [quadIn](#easeQuadIn)(1 - *t*). Also equivalent to [polyOut](#easePolyOut).[exponent](#poly_exponent)(2). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/quadOut.png" alt="quadOut">](https://observablehq.com/@d3/easing#quadOut) - -<a name="easeQuad" href="#easeQuad">#</a> d3.<b>easeQuad</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/quad.js "Source") -<br><a name="easeQuadInOut" href="#easeQuadInOut">#</a> d3.<b>easeQuadInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/quad.js#L9 "Source") - -Symmetric quadratic easing; scales [quadIn](#easeQuadIn) for *t* in [0, 0.5] and [quadOut](#easeQuadOut) for *t* in [0.5, 1]. Also equivalent to [poly](#easePoly).[exponent](#poly_exponent)(2). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/quadInOut.png" alt="quadInOut">](https://observablehq.com/@d3/easing#quadInOut) - -<a name="easeCubicIn" href="#easeCubicIn">#</a> d3.<b>easeCubicIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/cubic.js#L1 "Source") - -Cubic easing; equivalent to [polyIn](#easePolyIn).[exponent](#poly_exponent)(3). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/cubicIn.png" alt="cubicIn">](https://observablehq.com/@d3/easing#cubicIn) - -<a name="easeCubicOut" href="#easeCubicOut">#</a> d3.<b>easeCubicOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/cubic.js#L5 "Source") - -Reverse cubic easing; equivalent to 1 - [cubicIn](#easeCubicIn)(1 - *t*). Also equivalent to [polyOut](#easePolyOut).[exponent](#poly_exponent)(3). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/cubicOut.png" alt="cubicOut">](https://observablehq.com/@d3/easing#cubicOut) - -<a name="easeCubic" href="#easeCubic">#</a> d3.<b>easeCubic</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/cubic.js "Source") -<br><a name="easeCubicInOut" href="#easeCubicInOut">#</a> d3.<b>easeCubicInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/cubic.js#L9 "Source") - -Symmetric cubic easing; scales [cubicIn](#easeCubicIn) for *t* in [0, 0.5] and [cubicOut](#easeCubicOut) for *t* in [0.5, 1]. Also equivalent to [poly](#easePoly).[exponent](#poly_exponent)(3). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/cubicInOut.png" alt="cubicInOut">](https://observablehq.com/@d3/easing#cubicInOut) - -<a name="easeSinIn" href="#easeSinIn">#</a> d3.<b>easeSinIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/sin.js#L4 "Source") - -Sinusoidal easing; returns sin(*t*). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/sinIn.png" alt="sinIn">](https://observablehq.com/@d3/easing#sinIn) - -<a name="easeSinOut" href="#easeSinOut">#</a> d3.<b>easeSinOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/sin.js#L8 "Source") - -Reverse sinusoidal easing; equivalent to 1 - [sinIn](#easeSinIn)(1 - *t*). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/sinOut.png" alt="sinOut">](https://observablehq.com/@d3/easing#sinOut) - -<a name="easeSin" href="#easeSin">#</a> d3.<b>easeSin</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/sin.js "Source") -<br><a name="easeSinInOut" href="#easeSinInOut">#</a> d3.<b>easeSinInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/sin.js#L12 "Source") - -Symmetric sinusoidal easing; scales [sinIn](#easeSinIn) for *t* in [0, 0.5] and [sinOut](#easeSinOut) for *t* in [0.5, 1]. - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/sinInOut.png" alt="sinInOut">](https://observablehq.com/@d3/easing#sinInOut) - -<a name="easeExpIn" href="#easeExpIn">#</a> d3.<b>easeExpIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/exp.js#L1 "Source") - -Exponential easing; raises 2 to the exponent 10 \* (*t* - 1). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/expIn.png" alt="expIn">](https://observablehq.com/@d3/easing#expIn) - -<a name="easeExpOut" href="#easeExpOut">#</a> d3.<b>easeExpOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/exp.js#L5 "Source") - -Reverse exponential easing; equivalent to 1 - [expIn](#easeExpIn)(1 - *t*). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/expOut.png" alt="expOut">](https://observablehq.com/@d3/easing#expOut) - -<a name="easeExp" href="#easeExp">#</a> d3.<b>easeExp</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/exp.js "Source") -<br><a name="easeExpInOut" href="#easeExpInOut">#</a> d3.<b>easeExpInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/exp.js#L9 "Source") - -Symmetric exponential easing; scales [expIn](#easeExpIn) for *t* in [0, 0.5] and [expOut](#easeExpOut) for *t* in [0.5, 1]. - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/expInOut.png" alt="expInOut">](https://observablehq.com/@d3/easing#expInOut) - -<a name="easeCircleIn" href="#easeCircleIn">#</a> d3.<b>easeCircleIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/circle.js#L1 "Source") - -Circular easing. - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/circleIn.png" alt="circleIn">](https://observablehq.com/@d3/easing#circleIn) - -<a name="easeCircleOut" href="#easeCircleOut">#</a> d3.<b>easeCircleOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/circle.js#L5 "Source") - -Reverse circular easing; equivalent to 1 - [circleIn](#easeCircleIn)(1 - *t*). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/circleOut.png" alt="circleOut">](https://observablehq.com/@d3/easing#circleOut) - -<a name="easeCircle" href="#easeCircle">#</a> d3.<b>easeCircle</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/circle.js "Source") -<br><a name="easeCircleInOut" href="#easeCircleInOut">#</a> d3.<b>easeCircleInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/circle.js#L9 "Source") - -Symmetric circular easing; scales [circleIn](#easeCircleIn) for *t* in [0, 0.5] and [circleOut](#easeCircleOut) for *t* in [0.5, 1]. - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/circleInOut.png" alt="circleInOut">](https://observablehq.com/@d3/easing#circleInOut) - -<a name="easeElasticIn" href="#easeElasticIn">#</a> d3.<b>easeElasticIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/elastic.js#L5 "Source") - -Elastic easing, like a rubber band. The [amplitude](#elastic_amplitude) and [period](#elastic_period) of the oscillation are configurable; if not specified, they default to 1 and 0.3, respectively. - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/elasticIn.png" alt="elasticIn">](https://observablehq.com/@d3/easing#elasticIn) - -<a name="easeElastic" href="#easeElastic">#</a> d3.<b>easeElastic</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/elastic.js "Source") -<br><a name="easeElasticOut" href="#easeElasticOut">#</a> d3.<b>easeElasticOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/elastic.js#L18 "Source") - -Reverse elastic easing; equivalent to 1 - [elasticIn](#easeElasticIn)(1 - *t*). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/elasticOut.png" alt="elasticOut">](https://observablehq.com/@d3/easing#elasticOut) - -<a name="easeElasticInOut" href="#easeElasticInOut">#</a> d3.<b>easeElasticInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/elastic.js#L31 "Source") - -Symmetric elastic easing; scales [elasticIn](#easeElasticIn) for *t* in [0, 0.5] and [elasticOut](#easeElasticOut) for *t* in [0.5, 1]. - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/elasticInOut.png" alt="elasticInOut">](https://observablehq.com/@d3/easing#elasticInOut) - -<a name="elastic_amplitude" href="#elastic_amplitude">#</a> <i>elastic</i>.<b>amplitude</b>(<i>a</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/elastic.js#L40 "Source") - -Returns a new elastic easing with the specified amplitude *a*. - -<a name="elastic_period" href="#elastic_period">#</a> <i>elastic</i>.<b>period</b>(<i>p</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/elastic.js#L41 "Source") - -Returns a new elastic easing with the specified period *p*. - -<a name="easeBackIn" href="#easeBackIn">#</a> d3.<b>easeBackIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/back.js#L3 "Source") - -[Anticipatory](https://en.wikipedia.org/wiki/12_basic_principles_of_animation#Anticipation) easing, like a dancer bending his knees before jumping off the floor. The degree of [overshoot](#back_overshoot) is configurable; if not specified, it defaults to 1.70158. - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/backIn.png" alt="backIn">](https://observablehq.com/@d3/easing#backIn) - -<a name="easeBackOut" href="#easeBackOut">#</a> d3.<b>easeBackOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/back.js#L15 "Source") - -Reverse anticipatory easing; equivalent to 1 - [backIn](#easeBackIn)(1 - *t*). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/backOut.png" alt="backOut">](https://observablehq.com/@d3/easing#backOut) - -<a name="easeBack" href="#easeBack">#</a> d3.<b>easeBack</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/back.js "Source") -<br><a name="easeBackInOut" href="#easeBackInOut">#</a> d3.<b>easeBackInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/back.js#L27 "Source") - -Symmetric anticipatory easing; scales [backIn](#easeBackIn) for *t* in [0, 0.5] and [backOut](#easeBackOut) for *t* in [0.5, 1]. - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/backInOut.png" alt="backInOut">](https://observablehq.com/@d3/easing#backInOut) - -<a name="back_overshoot" href="#back_overshoot">#</a> <i>back</i>.<b>overshoot</b>(<i>s</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/back.js#L1 "Source") - -Returns a new back easing with the specified overshoot *s*. - -<a name="easeBounceIn" href="#easeBounceIn">#</a> d3.<b>easeBounceIn</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/bounce.js#L12 "Source") - -Bounce easing, like a rubber ball. - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/bounceIn.png" alt="bounceIn">](https://observablehq.com/@d3/easing#bounceIn) - -<a name="easeBounce" href="#easeBounce">#</a> d3.<b>easeBounce</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/bounce.js "Source") -<br><a name="easeBounceOut" href="#easeBounceOut">#</a> d3.<b>easeBounceOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/bounce.js#L16 "Source") - -Reverse bounce easing; equivalent to 1 - [bounceIn](#easeBounceIn)(1 - *t*). - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/bounceOut.png" alt="bounceOut">](https://observablehq.com/@d3/easing#bounceOut) - -<a name="easeBounceInOut" href="#easeBounceInOut">#</a> d3.<b>easeBounceInOut</b>(<i>t</i>) [<>](https://github.com/d3/d3-ease/blob/master/src/bounce.js#L20 "Source") - -Symmetric bounce easing; scales [bounceIn](#easeBounceIn) for *t* in [0, 0.5] and [bounceOut](#easeBounceOut) for *t* in [0.5, 1]. - -[<img src="https://raw.githubusercontent.com/d3/d3-ease/master/img/bounceInOut.png" alt="bounceInOut">](https://observablehq.com/@d3/easing#bounceInOut) diff --git a/node_modules/d3-ease/dist/d3-ease.js b/node_modules/d3-ease/dist/d3-ease.js deleted file mode 100644 index a8750ba783ed62765731322ed596dea57bcebd0e..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/dist/d3-ease.js +++ /dev/null @@ -1,262 +0,0 @@ -// https://d3js.org/d3-ease/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {})); -}(this, function (exports) { 'use strict'; - -const linear = t => +t; - -function quadIn(t) { - return t * t; -} - -function quadOut(t) { - return t * (2 - t); -} - -function quadInOut(t) { - return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2; -} - -function cubicIn(t) { - return t * t * t; -} - -function cubicOut(t) { - return --t * t * t + 1; -} - -function cubicInOut(t) { - return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; -} - -var exponent = 3; - -var polyIn = (function custom(e) { - e = +e; - - function polyIn(t) { - return Math.pow(t, e); - } - - polyIn.exponent = custom; - - return polyIn; -})(exponent); - -var polyOut = (function custom(e) { - e = +e; - - function polyOut(t) { - return 1 - Math.pow(1 - t, e); - } - - polyOut.exponent = custom; - - return polyOut; -})(exponent); - -var polyInOut = (function custom(e) { - e = +e; - - function polyInOut(t) { - return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2; - } - - polyInOut.exponent = custom; - - return polyInOut; -})(exponent); - -var pi = Math.PI, - halfPi = pi / 2; - -function sinIn(t) { - return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi); -} - -function sinOut(t) { - return Math.sin(t * halfPi); -} - -function sinInOut(t) { - return (1 - Math.cos(pi * t)) / 2; -} - -// tpmt is two power minus ten times t scaled to [0,1] -function tpmt(x) { - return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494; -} - -function expIn(t) { - return tpmt(1 - +t); -} - -function expOut(t) { - return 1 - tpmt(t); -} - -function expInOut(t) { - return ((t *= 2) <= 1 ? tpmt(1 - t) : 2 - tpmt(t - 1)) / 2; -} - -function circleIn(t) { - return 1 - Math.sqrt(1 - t * t); -} - -function circleOut(t) { - return Math.sqrt(1 - --t * t); -} - -function circleInOut(t) { - return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2; -} - -var b1 = 4 / 11, - b2 = 6 / 11, - b3 = 8 / 11, - b4 = 3 / 4, - b5 = 9 / 11, - b6 = 10 / 11, - b7 = 15 / 16, - b8 = 21 / 22, - b9 = 63 / 64, - b0 = 1 / b1 / b1; - -function bounceIn(t) { - return 1 - bounceOut(1 - t); -} - -function bounceOut(t) { - return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9; -} - -function bounceInOut(t) { - return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2; -} - -var overshoot = 1.70158; - -var backIn = (function custom(s) { - s = +s; - - function backIn(t) { - return (t = +t) * t * (s * (t - 1) + t); - } - - backIn.overshoot = custom; - - return backIn; -})(overshoot); - -var backOut = (function custom(s) { - s = +s; - - function backOut(t) { - return --t * t * ((t + 1) * s + t) + 1; - } - - backOut.overshoot = custom; - - return backOut; -})(overshoot); - -var backInOut = (function custom(s) { - s = +s; - - function backInOut(t) { - return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2; - } - - backInOut.overshoot = custom; - - return backInOut; -})(overshoot); - -var tau = 2 * Math.PI, - amplitude = 1, - period = 0.3; - -var elasticIn = (function custom(a, p) { - var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); - - function elasticIn(t) { - return a * tpmt(-(--t)) * Math.sin((s - t) / p); - } - - elasticIn.amplitude = function(a) { return custom(a, p * tau); }; - elasticIn.period = function(p) { return custom(a, p); }; - - return elasticIn; -})(amplitude, period); - -var elasticOut = (function custom(a, p) { - var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); - - function elasticOut(t) { - return 1 - a * tpmt(t = +t) * Math.sin((t + s) / p); - } - - elasticOut.amplitude = function(a) { return custom(a, p * tau); }; - elasticOut.period = function(p) { return custom(a, p); }; - - return elasticOut; -})(amplitude, period); - -var elasticInOut = (function custom(a, p) { - var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); - - function elasticInOut(t) { - return ((t = t * 2 - 1) < 0 - ? a * tpmt(-t) * Math.sin((s - t) / p) - : 2 - a * tpmt(t) * Math.sin((s + t) / p)) / 2; - } - - elasticInOut.amplitude = function(a) { return custom(a, p * tau); }; - elasticInOut.period = function(p) { return custom(a, p); }; - - return elasticInOut; -})(amplitude, period); - -exports.easeBack = backInOut; -exports.easeBackIn = backIn; -exports.easeBackInOut = backInOut; -exports.easeBackOut = backOut; -exports.easeBounce = bounceOut; -exports.easeBounceIn = bounceIn; -exports.easeBounceInOut = bounceInOut; -exports.easeBounceOut = bounceOut; -exports.easeCircle = circleInOut; -exports.easeCircleIn = circleIn; -exports.easeCircleInOut = circleInOut; -exports.easeCircleOut = circleOut; -exports.easeCubic = cubicInOut; -exports.easeCubicIn = cubicIn; -exports.easeCubicInOut = cubicInOut; -exports.easeCubicOut = cubicOut; -exports.easeElastic = elasticOut; -exports.easeElasticIn = elasticIn; -exports.easeElasticInOut = elasticInOut; -exports.easeElasticOut = elasticOut; -exports.easeExp = expInOut; -exports.easeExpIn = expIn; -exports.easeExpInOut = expInOut; -exports.easeExpOut = expOut; -exports.easeLinear = linear; -exports.easePoly = polyInOut; -exports.easePolyIn = polyIn; -exports.easePolyInOut = polyInOut; -exports.easePolyOut = polyOut; -exports.easeQuad = quadInOut; -exports.easeQuadIn = quadIn; -exports.easeQuadInOut = quadInOut; -exports.easeQuadOut = quadOut; -exports.easeSin = sinInOut; -exports.easeSinIn = sinIn; -exports.easeSinInOut = sinInOut; -exports.easeSinOut = sinOut; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-ease/dist/d3-ease.min.js b/node_modules/d3-ease/dist/d3-ease.min.js deleted file mode 100644 index a44a0588d294186ee42a05e2973666d0569e5431..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/dist/d3-ease.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-ease/ v2.0.0 Copyright 2020 Mike Bostock -!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((n=n||self).d3=n.d3||{})}(this,function(n){"use strict";function e(n){return((n*=2)<=1?n*n:--n*(2-n)+1)/2}function t(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var u=function n(e){function t(n){return Math.pow(n,e)}return e=+e,t.exponent=n,t}(3),r=function n(e){function t(n){return 1-Math.pow(1-n,e)}return e=+e,t.exponent=n,t}(3),a=function n(e){function t(n){return((n*=2)<=1?Math.pow(n,e):2-Math.pow(2-n,e))/2}return e=+e,t.exponent=n,t}(3),o=Math.PI,i=o/2;function c(n){return(1-Math.cos(o*n))/2}function s(n){return 1.0009775171065494*(Math.pow(2,-10*n)-.0009765625)}function f(n){return((n*=2)<=1?s(1-n):2-s(n-1))/2}function h(n){return((n*=2)<=1?1-Math.sqrt(1-n*n):Math.sqrt(1-(n-=2)*n)+1)/2}var p=4/11,M=6/11,d=8/11,I=.75,l=9/11,O=10/11,x=.9375,v=21/22,m=63/64,y=1/p/p;function B(n){return(n=+n)<p?y*n*n:n<d?y*(n-=M)*n+I:n<O?y*(n-=l)*n+x:y*(n-=v)*n+m}var C=function n(e){function t(n){return(n=+n)*n*(e*(n-1)+n)}return e=+e,t.overshoot=n,t}(1.70158),E=function n(e){function t(n){return--n*n*((n+1)*e+n)+1}return e=+e,t.overshoot=n,t}(1.70158),P=function n(e){function t(n){return((n*=2)<1?n*n*((e+1)*n-e):(n-=2)*n*((e+1)*n+e)+2)/2}return e=+e,t.overshoot=n,t}(1.70158),b=2*Math.PI,w=function n(e,t){var u=Math.asin(1/(e=Math.max(1,e)))*(t/=b);function r(n){return e*s(- --n)*Math.sin((u-n)/t)}return r.amplitude=function(e){return n(e,t*b)},r.period=function(t){return n(e,t)},r}(1,.3),k=function n(e,t){var u=Math.asin(1/(e=Math.max(1,e)))*(t/=b);function r(n){return 1-e*s(n=+n)*Math.sin((n+u)/t)}return r.amplitude=function(e){return n(e,t*b)},r.period=function(t){return n(e,t)},r}(1,.3),q=function n(e,t){var u=Math.asin(1/(e=Math.max(1,e)))*(t/=b);function r(n){return((n=2*n-1)<0?e*s(-n)*Math.sin((u-n)/t):2-e*s(n)*Math.sin((u+n)/t))/2}return r.amplitude=function(e){return n(e,t*b)},r.period=function(t){return n(e,t)},r}(1,.3);n.easeBack=P,n.easeBackIn=C,n.easeBackInOut=P,n.easeBackOut=E,n.easeBounce=B,n.easeBounceIn=function(n){return 1-B(1-n)},n.easeBounceInOut=function(n){return((n*=2)<=1?1-B(1-n):B(n-1)+1)/2},n.easeBounceOut=B,n.easeCircle=h,n.easeCircleIn=function(n){return 1-Math.sqrt(1-n*n)},n.easeCircleInOut=h,n.easeCircleOut=function(n){return Math.sqrt(1- --n*n)},n.easeCubic=t,n.easeCubicIn=function(n){return n*n*n},n.easeCubicInOut=t,n.easeCubicOut=function(n){return--n*n*n+1},n.easeElastic=k,n.easeElasticIn=w,n.easeElasticInOut=q,n.easeElasticOut=k,n.easeExp=f,n.easeExpIn=function(n){return s(1-+n)},n.easeExpInOut=f,n.easeExpOut=function(n){return 1-s(n)},n.easeLinear=n=>+n,n.easePoly=a,n.easePolyIn=u,n.easePolyInOut=a,n.easePolyOut=r,n.easeQuad=e,n.easeQuadIn=function(n){return n*n},n.easeQuadInOut=e,n.easeQuadOut=function(n){return n*(2-n)},n.easeSin=c,n.easeSinIn=function(n){return 1==+n?1:1-Math.cos(n*i)},n.easeSinInOut=c,n.easeSinOut=function(n){return Math.sin(n*i)},Object.defineProperty(n,"__esModule",{value:!0})}); diff --git a/node_modules/d3-ease/package.json b/node_modules/d3-ease/package.json deleted file mode 100644 index 5cafb3ff791cda419ff86de784f1a6d19a3dc248..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_from": "d3-ease@2", - "_id": "d3-ease@2.0.0", - "_inBundle": false, - "_integrity": "sha512-68/n9JWarxXkOWMshcT5IcjbB+agblQUaIsbnXmrzejn2O82n3p2A9R2zEB9HIEFWKFwPAEDDN8gR0VdSAyyAQ==", - "_location": "/d3-ease", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-ease@2", - "name": "d3-ease", - "escapedName": "d3-ease", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3", - "/d3-transition" - ], - "_resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-2.0.0.tgz", - "_shasum": "fd1762bfca00dae4bacea504b1d628ff290ac563", - "_spec": "d3-ease@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-ease/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Easing functions for smooth animation.", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-ease/", - "jsdelivr": "dist/d3-ease.min.js", - "keywords": [ - "d3", - "d3-module", - "ease", - "easing", - "animation", - "transition" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-ease.js", - "module": "src/index.js", - "name": "d3-ease", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-ease.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src test" - }, - "sideEffects": false, - "unpkg": "dist/d3-ease.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-ease/src/back.js b/node_modules/d3-ease/src/back.js deleted file mode 100644 index b9c1bcc90eaaa8f39d9eeee2894857f60c5b3633..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/src/back.js +++ /dev/null @@ -1,37 +0,0 @@ -var overshoot = 1.70158; - -export var backIn = (function custom(s) { - s = +s; - - function backIn(t) { - return (t = +t) * t * (s * (t - 1) + t); - } - - backIn.overshoot = custom; - - return backIn; -})(overshoot); - -export var backOut = (function custom(s) { - s = +s; - - function backOut(t) { - return --t * t * ((t + 1) * s + t) + 1; - } - - backOut.overshoot = custom; - - return backOut; -})(overshoot); - -export var backInOut = (function custom(s) { - s = +s; - - function backInOut(t) { - return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2; - } - - backInOut.overshoot = custom; - - return backInOut; -})(overshoot); diff --git a/node_modules/d3-ease/src/bounce.js b/node_modules/d3-ease/src/bounce.js deleted file mode 100644 index d2d81caf0193c48fa903bb02f0edef00be260a07..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/src/bounce.js +++ /dev/null @@ -1,22 +0,0 @@ -var b1 = 4 / 11, - b2 = 6 / 11, - b3 = 8 / 11, - b4 = 3 / 4, - b5 = 9 / 11, - b6 = 10 / 11, - b7 = 15 / 16, - b8 = 21 / 22, - b9 = 63 / 64, - b0 = 1 / b1 / b1; - -export function bounceIn(t) { - return 1 - bounceOut(1 - t); -} - -export function bounceOut(t) { - return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9; -} - -export function bounceInOut(t) { - return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2; -} diff --git a/node_modules/d3-ease/src/circle.js b/node_modules/d3-ease/src/circle.js deleted file mode 100644 index 8b9bb1de2d53dd38a7d2f4ddceb1576b1e98c295..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/src/circle.js +++ /dev/null @@ -1,11 +0,0 @@ -export function circleIn(t) { - return 1 - Math.sqrt(1 - t * t); -} - -export function circleOut(t) { - return Math.sqrt(1 - --t * t); -} - -export function circleInOut(t) { - return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2; -} diff --git a/node_modules/d3-ease/src/cubic.js b/node_modules/d3-ease/src/cubic.js deleted file mode 100644 index bad3a7caad3720303622ffb800f303545ecf710b..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/src/cubic.js +++ /dev/null @@ -1,11 +0,0 @@ -export function cubicIn(t) { - return t * t * t; -} - -export function cubicOut(t) { - return --t * t * t + 1; -} - -export function cubicInOut(t) { - return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; -} diff --git a/node_modules/d3-ease/src/elastic.js b/node_modules/d3-ease/src/elastic.js deleted file mode 100644 index 48ca6733fc7bf5cc2b74cddfb50eaf2c1f2b0908..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/src/elastic.js +++ /dev/null @@ -1,46 +0,0 @@ -import {tpmt} from "./math.js"; - -var tau = 2 * Math.PI, - amplitude = 1, - period = 0.3; - -export var elasticIn = (function custom(a, p) { - var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); - - function elasticIn(t) { - return a * tpmt(-(--t)) * Math.sin((s - t) / p); - } - - elasticIn.amplitude = function(a) { return custom(a, p * tau); }; - elasticIn.period = function(p) { return custom(a, p); }; - - return elasticIn; -})(amplitude, period); - -export var elasticOut = (function custom(a, p) { - var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); - - function elasticOut(t) { - return 1 - a * tpmt(t = +t) * Math.sin((t + s) / p); - } - - elasticOut.amplitude = function(a) { return custom(a, p * tau); }; - elasticOut.period = function(p) { return custom(a, p); }; - - return elasticOut; -})(amplitude, period); - -export var elasticInOut = (function custom(a, p) { - var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); - - function elasticInOut(t) { - return ((t = t * 2 - 1) < 0 - ? a * tpmt(-t) * Math.sin((s - t) / p) - : 2 - a * tpmt(t) * Math.sin((s + t) / p)) / 2; - } - - elasticInOut.amplitude = function(a) { return custom(a, p * tau); }; - elasticInOut.period = function(p) { return custom(a, p); }; - - return elasticInOut; -})(amplitude, period); diff --git a/node_modules/d3-ease/src/exp.js b/node_modules/d3-ease/src/exp.js deleted file mode 100644 index f3c1cf0f6df81cf9dba1d6cf56fc2bf720013884..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/src/exp.js +++ /dev/null @@ -1,13 +0,0 @@ -import {tpmt} from "./math.js"; - -export function expIn(t) { - return tpmt(1 - +t); -} - -export function expOut(t) { - return 1 - tpmt(t); -} - -export function expInOut(t) { - return ((t *= 2) <= 1 ? tpmt(1 - t) : 2 - tpmt(t - 1)) / 2; -} diff --git a/node_modules/d3-ease/src/index.js b/node_modules/d3-ease/src/index.js deleted file mode 100644 index 710d3df5c407b81a34605f06071c5187599d0ef2..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/src/index.js +++ /dev/null @@ -1,66 +0,0 @@ -export { - linear as easeLinear -} from "./linear.js"; - -export { - quadInOut as easeQuad, - quadIn as easeQuadIn, - quadOut as easeQuadOut, - quadInOut as easeQuadInOut -} from "./quad.js"; - -export { - cubicInOut as easeCubic, - cubicIn as easeCubicIn, - cubicOut as easeCubicOut, - cubicInOut as easeCubicInOut -} from "./cubic.js"; - -export { - polyInOut as easePoly, - polyIn as easePolyIn, - polyOut as easePolyOut, - polyInOut as easePolyInOut -} from "./poly.js"; - -export { - sinInOut as easeSin, - sinIn as easeSinIn, - sinOut as easeSinOut, - sinInOut as easeSinInOut -} from "./sin.js"; - -export { - expInOut as easeExp, - expIn as easeExpIn, - expOut as easeExpOut, - expInOut as easeExpInOut -} from "./exp.js"; - -export { - circleInOut as easeCircle, - circleIn as easeCircleIn, - circleOut as easeCircleOut, - circleInOut as easeCircleInOut -} from "./circle.js"; - -export { - bounceOut as easeBounce, - bounceIn as easeBounceIn, - bounceOut as easeBounceOut, - bounceInOut as easeBounceInOut -} from "./bounce.js"; - -export { - backInOut as easeBack, - backIn as easeBackIn, - backOut as easeBackOut, - backInOut as easeBackInOut -} from "./back.js"; - -export { - elasticOut as easeElastic, - elasticIn as easeElasticIn, - elasticOut as easeElasticOut, - elasticInOut as easeElasticInOut -} from "./elastic.js"; diff --git a/node_modules/d3-ease/src/linear.js b/node_modules/d3-ease/src/linear.js deleted file mode 100644 index 7b7d2c11b5f9405abebc16734e01580ca3941282..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/src/linear.js +++ /dev/null @@ -1 +0,0 @@ -export const linear = t => +t; diff --git a/node_modules/d3-ease/src/math.js b/node_modules/d3-ease/src/math.js deleted file mode 100644 index d342db17777210e9c239decc454308132b0974ff..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/src/math.js +++ /dev/null @@ -1,4 +0,0 @@ -// tpmt is two power minus ten times t scaled to [0,1] -export function tpmt(x) { - return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494; -} diff --git a/node_modules/d3-ease/src/poly.js b/node_modules/d3-ease/src/poly.js deleted file mode 100644 index 827cf87433ac741a8ee2655aa955b548302f9e12..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/src/poly.js +++ /dev/null @@ -1,37 +0,0 @@ -var exponent = 3; - -export var polyIn = (function custom(e) { - e = +e; - - function polyIn(t) { - return Math.pow(t, e); - } - - polyIn.exponent = custom; - - return polyIn; -})(exponent); - -export var polyOut = (function custom(e) { - e = +e; - - function polyOut(t) { - return 1 - Math.pow(1 - t, e); - } - - polyOut.exponent = custom; - - return polyOut; -})(exponent); - -export var polyInOut = (function custom(e) { - e = +e; - - function polyInOut(t) { - return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2; - } - - polyInOut.exponent = custom; - - return polyInOut; -})(exponent); diff --git a/node_modules/d3-ease/src/quad.js b/node_modules/d3-ease/src/quad.js deleted file mode 100644 index df65bc29c203754b2a7351e380d1a8a149df58b3..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/src/quad.js +++ /dev/null @@ -1,11 +0,0 @@ -export function quadIn(t) { - return t * t; -} - -export function quadOut(t) { - return t * (2 - t); -} - -export function quadInOut(t) { - return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2; -} diff --git a/node_modules/d3-ease/src/sin.js b/node_modules/d3-ease/src/sin.js deleted file mode 100644 index d8e09b8ea08913cb3f895af2d5a7e84b7fb81ba5..0000000000000000000000000000000000000000 --- a/node_modules/d3-ease/src/sin.js +++ /dev/null @@ -1,14 +0,0 @@ -var pi = Math.PI, - halfPi = pi / 2; - -export function sinIn(t) { - return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi); -} - -export function sinOut(t) { - return Math.sin(t * halfPi); -} - -export function sinInOut(t) { - return (1 - Math.cos(pi * t)) / 2; -} diff --git a/node_modules/d3-fetch/LICENSE b/node_modules/d3-fetch/LICENSE deleted file mode 100644 index fb54fc9ee3da2b629d16c3db0faf8c9454e1803b..0000000000000000000000000000000000000000 --- a/node_modules/d3-fetch/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-fetch/README.md b/node_modules/d3-fetch/README.md deleted file mode 100644 index 36283fb5fc745b12fee3f0e1859bf0963003048e..0000000000000000000000000000000000000000 --- a/node_modules/d3-fetch/README.md +++ /dev/null @@ -1,104 +0,0 @@ -# d3-fetch - -This module provides convenient parsing on top of [Fetch](https://fetch.spec.whatwg.org/). For example, to load a text file: - -```js -d3.text("/path/to/file.txt").then(function(text) { - console.log(text); // Hello, world! -}); -``` - -To load and parse a CSV file: - -```js -d3.csv("/path/to/file.csv").then(function(data) { - console.log(data); // [{"Hello": "world"}, …] -}); -``` - -This module has built-in support for parsing [JSON](#json), [CSV](#csv), and [TSV](#tsv). You can parse additional formats by using [text](#text) directly. (This module replaced [d3-request](https://github.com/d3/d3-request).) - -## Installing - -If you use NPM, `npm install d3-fetch`. Otherwise, download the [latest release](https://github.com/d3/d3-fetch/releases/latest). You can also load directly from [d3js.org](https://d3js.org) as a [standalone library](https://d3js.org/d3-fetch.v1.min.js). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-dsv.v2.min.js"></script> -<script src="https://d3js.org/d3-fetch.v2.min.js"></script> -<script> - -d3.csv("/path/to/file.csv").then(function(data) { - console.log(data); // [{"Hello": "world"}, …] -}); - -</script> -``` - -## API Reference - -<a name="blob" href="#blob">#</a> d3.<b>blob</b>(<i>input</i>[, <i>init</i>]) [<>](https://github.com/d3/d3-fetch/blob/master/src/blob.js "Source") - -Fetches the binary file at the specified *input* URL as a Blob. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields. - -<a name="buffer" href="#buffer">#</a> d3.<b>buffer</b>(<i>input</i>[, <i>init</i>]) [<>](https://github.com/d3/d3-fetch/blob/master/src/buffer.js "Source") - -Fetches the binary file at the specified *input* URL as an ArrayBuffer. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields. - -<a name="csv" href="#csv">#</a> d3.<b>csv</b>(<i>input</i>[, <i>init</i>][, <i>row</i>]) [<>](https://github.com/d3/d3-fetch/blob/master/src/dsv.js "Source") - -Equivalent to [d3.dsv](#dsv) with the comma character as the delimiter. - -<a name="dsv" href="#dsv">#</a> d3.<b>dsv</b>(<i>delimiter</i>, <i>input</i>[, <i>init</i>][, <i>row</i>]) [<>](https://github.com/d3/d3-fetch/blob/master/src/dsv.js "Source") - -Fetches the [DSV](https://github.com/d3/d3-dsv) file at the specified *input* URL. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields. An optional *row* conversion function may be specified to map and filter row objects to a more-specific representation; see [*dsv*.parse](https://github.com/d3/d3-dsv#dsv_parse) for details. For example: - -```js -d3.dsv(",", "test.csv", function(d) { - return { - year: new Date(+d.Year, 0, 1), // convert "Year" column to Date - make: d.Make, - model: d.Model, - length: +d.Length // convert "Length" column to number - }; -}).then(function(data) { - console.log(data); -}); -``` - -If only one of *init* and *row* is specified, it is interpreted as the *row* conversion function if it is a function, and otherwise an *init* object. - -See also [d3.csv](#csv) and [d3.tsv](#tsv). - -<a name="html" href="#html">#</a> d3.<b>html</b>(<i>input</i>[, <i>init</i>]) [<>](https://github.com/d3/d3-fetch/blob/master/src/xml.js "Source") - -Fetches the file at the specified *input* URL as [text](#text) and then [parses it](https://developer.mozilla.org/docs/Web/API/DOMParser) as HTML. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields. - -<a name="image" href="#image">#</a> d3.<b>image</b>(<i>input</i>[, <i>init</i>]) [<>](https://github.com/d3/d3-fetch/blob/master/src/image.js "Source") - -Fetches the image at the specified *input* URL. If *init* is specified, sets any additional properties on the image before loading. For example, to enable an anonymous [cross-origin request](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image): - -```js -d3.image("https://example.com/test.png", {crossOrigin: "anonymous"}).then(function(img) { - console.log(img); -}); -``` - -<a name="json" href="#json">#</a> d3.<b>json</b>(<i>input</i>[, <i>init</i>]) [<>](https://github.com/d3/d3-fetch/blob/master/src/json.js "Source") - -Fetches the [JSON](http://json.org) file at the specified *input* URL. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields. If the server returns a status code of [204 No Content](https://developer.mozilla.org/docs/Web/HTTP/Status/204) or [205 Reset Content](https://developer.mozilla.org/docs/Web/HTTP/Status/205), the promise resolves to `undefined`. - -<a name="svg" href="#svg">#</a> d3.<b>svg</b>(<i>input</i>[, <i>init</i>]) [<>](https://github.com/d3/d3-fetch/blob/master/src/xml.js "Source") - -Fetches the file at the specified *input* URL as [text](#text) and then [parses it](https://developer.mozilla.org/docs/Web/API/DOMParser) as SVG. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields. - -<a name="text" href="#text">#</a> d3.<b>text</b>(<i>input</i>[, <i>init</i>]) [<>](https://github.com/d3/d3-fetch/blob/master/src/text.js "Source") - -Fetches the text file at the specified *input* URL. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields. - -<a name="tsv" href="#tsv">#</a> d3.<b>tsv</b>(<i>input</i>[, <i>init</i>][, <i>row</i>]) [<>](https://github.com/d3/d3-fetch/blob/master/src/dsv.js "Source") - -Equivalent to [d3.dsv](#dsv) with the tab character as the delimiter. - -<a name="xml" href="#xml">#</a> d3.<b>xml</b>(<i>input</i>[, <i>init</i>]) [<>](https://github.com/d3/d3-fetch/blob/master/src/xml.js "Source") - -Fetches the file at the specified *input* URL as [text](#text) and then [parses it](https://developer.mozilla.org/docs/Web/API/DOMParser) as XML. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields. diff --git a/node_modules/d3-fetch/dist/d3-fetch.js b/node_modules/d3-fetch/dist/d3-fetch.js deleted file mode 100644 index 81c7e1a5debfa8bdb0fc103775694eb783eafc63..0000000000000000000000000000000000000000 --- a/node_modules/d3-fetch/dist/d3-fetch.js +++ /dev/null @@ -1,100 +0,0 @@ -// https://d3js.org/d3-fetch/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-dsv')) : -typeof define === 'function' && define.amd ? define(['exports', 'd3-dsv'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {}, global.d3)); -}(this, function (exports, d3Dsv) { 'use strict'; - -function responseBlob(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - return response.blob(); -} - -function blob(input, init) { - return fetch(input, init).then(responseBlob); -} - -function responseArrayBuffer(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - return response.arrayBuffer(); -} - -function buffer(input, init) { - return fetch(input, init).then(responseArrayBuffer); -} - -function responseText(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - return response.text(); -} - -function text(input, init) { - return fetch(input, init).then(responseText); -} - -function dsvParse(parse) { - return function(input, init, row) { - if (arguments.length === 2 && typeof init === "function") row = init, init = undefined; - return text(input, init).then(function(response) { - return parse(response, row); - }); - }; -} - -function dsv(delimiter, input, init, row) { - if (arguments.length === 3 && typeof init === "function") row = init, init = undefined; - var format = d3Dsv.dsvFormat(delimiter); - return text(input, init).then(function(response) { - return format.parse(response, row); - }); -} - -var csv = dsvParse(d3Dsv.csvParse); -var tsv = dsvParse(d3Dsv.tsvParse); - -function image(input, init) { - return new Promise(function(resolve, reject) { - var image = new Image; - for (var key in init) image[key] = init[key]; - image.onerror = reject; - image.onload = function() { resolve(image); }; - image.src = input; - }); -} - -function responseJson(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - if (response.status === 204 || response.status === 205) return; - return response.json(); -} - -function json(input, init) { - return fetch(input, init).then(responseJson); -} - -function parser(type) { - return (input, init) => text(input, init) - .then(text => (new DOMParser).parseFromString(text, type)); -} - -var xml = parser("application/xml"); - -var html = parser("text/html"); - -var svg = parser("image/svg+xml"); - -exports.blob = blob; -exports.buffer = buffer; -exports.csv = csv; -exports.dsv = dsv; -exports.html = html; -exports.image = image; -exports.json = json; -exports.svg = svg; -exports.text = text; -exports.tsv = tsv; -exports.xml = xml; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-fetch/dist/d3-fetch.min.js b/node_modules/d3-fetch/dist/d3-fetch.min.js deleted file mode 100644 index 205ed4526183c9d0c8eee3621d586750b3d09870..0000000000000000000000000000000000000000 --- a/node_modules/d3-fetch/dist/d3-fetch.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-fetch/ v2.0.0 Copyright 2020 Mike Bostock -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-dsv")):"function"==typeof define&&define.amd?define(["exports","d3-dsv"],n):n((t=t||self).d3=t.d3||{},t.d3)}(this,function(t,n){"use strict";function e(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function r(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function o(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function u(t,n){return fetch(t,n).then(o)}function f(t){return function(n,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=void 0),u(n,e).then(function(n){return t(n,r)})}}var s=f(n.csvParse),i=f(n.tsvParse);function c(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function a(t){return(n,e)=>u(n,e).then(n=>(new DOMParser).parseFromString(n,t))}var d=a("application/xml"),h=a("text/html"),v=a("image/svg+xml");t.blob=function(t,n){return fetch(t,n).then(e)},t.buffer=function(t,n){return fetch(t,n).then(r)},t.csv=s,t.dsv=function(t,e,r,o){3===arguments.length&&"function"==typeof r&&(o=r,r=void 0);var f=n.dsvFormat(t);return u(e,r).then(function(t){return f.parse(t,o)})},t.html=h,t.image=function(t,n){return new Promise(function(e,r){var o=new Image;for(var u in n)o[u]=n[u];o.onerror=r,o.onload=function(){e(o)},o.src=t})},t.json=function(t,n){return fetch(t,n).then(c)},t.svg=v,t.text=u,t.tsv=i,t.xml=d,Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/node_modules/d3-fetch/package.json b/node_modules/d3-fetch/package.json deleted file mode 100644 index eafaa56d644fe64bb6b4d86001b67856eded4789..0000000000000000000000000000000000000000 --- a/node_modules/d3-fetch/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "d3-fetch@2", - "_id": "d3-fetch@2.0.0", - "_inBundle": false, - "_integrity": "sha512-TkYv/hjXgCryBeNKiclrwqZH7Nb+GaOwo3Neg24ZVWA3MKB+Rd+BY84Nh6tmNEMcjUik1CSUWjXYndmeO6F7sw==", - "_location": "/d3-fetch", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-fetch@2", - "name": "d3-fetch", - "escapedName": "d3-fetch", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3" - ], - "_resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-2.0.0.tgz", - "_shasum": "ecd7ef2128d9847a3b41b548fec80918d645c064", - "_spec": "d3-fetch@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-fetch/issues" - }, - "bundleDependencies": false, - "dependencies": { - "d3-dsv": "1 - 2" - }, - "deprecated": false, - "description": "Convenient parsing for Fetch.", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-fetch/", - "jsdelivr": "dist/d3-fetch.min.js", - "keywords": [ - "d3", - "d3-module", - "fetch", - "ajax", - "XMLHttpRequest" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-fetch.js", - "module": "src/index.js", - "name": "d3-fetch", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-fetch.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src" - }, - "sideEffects": false, - "unpkg": "dist/d3-fetch.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-fetch/src/blob.js b/node_modules/d3-fetch/src/blob.js deleted file mode 100644 index 646664c31b16cbfb48f3a9c34c853d60f2c571f7..0000000000000000000000000000000000000000 --- a/node_modules/d3-fetch/src/blob.js +++ /dev/null @@ -1,8 +0,0 @@ -function responseBlob(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - return response.blob(); -} - -export default function(input, init) { - return fetch(input, init).then(responseBlob); -} diff --git a/node_modules/d3-fetch/src/buffer.js b/node_modules/d3-fetch/src/buffer.js deleted file mode 100644 index f776a94bdbc2ae9d0715db173e64b473cab6dd54..0000000000000000000000000000000000000000 --- a/node_modules/d3-fetch/src/buffer.js +++ /dev/null @@ -1,8 +0,0 @@ -function responseArrayBuffer(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - return response.arrayBuffer(); -} - -export default function(input, init) { - return fetch(input, init).then(responseArrayBuffer); -} diff --git a/node_modules/d3-fetch/src/dsv.js b/node_modules/d3-fetch/src/dsv.js deleted file mode 100644 index 99d7bc39fc8f4b75026195d790f36f54e78fa450..0000000000000000000000000000000000000000 --- a/node_modules/d3-fetch/src/dsv.js +++ /dev/null @@ -1,22 +0,0 @@ -import {csvParse, dsvFormat, tsvParse} from "d3-dsv"; -import text from "./text.js"; - -function dsvParse(parse) { - return function(input, init, row) { - if (arguments.length === 2 && typeof init === "function") row = init, init = undefined; - return text(input, init).then(function(response) { - return parse(response, row); - }); - }; -} - -export default function dsv(delimiter, input, init, row) { - if (arguments.length === 3 && typeof init === "function") row = init, init = undefined; - var format = dsvFormat(delimiter); - return text(input, init).then(function(response) { - return format.parse(response, row); - }); -} - -export var csv = dsvParse(csvParse); -export var tsv = dsvParse(tsvParse); diff --git a/node_modules/d3-fetch/src/image.js b/node_modules/d3-fetch/src/image.js deleted file mode 100644 index c80a74bc654439d461a7a1696d660af4c1f65328..0000000000000000000000000000000000000000 --- a/node_modules/d3-fetch/src/image.js +++ /dev/null @@ -1,9 +0,0 @@ -export default function(input, init) { - return new Promise(function(resolve, reject) { - var image = new Image; - for (var key in init) image[key] = init[key]; - image.onerror = reject; - image.onload = function() { resolve(image); }; - image.src = input; - }); -} diff --git a/node_modules/d3-fetch/src/index.js b/node_modules/d3-fetch/src/index.js deleted file mode 100644 index f3ac0f994f14c675cb4b71b042bf94241e24a8e6..0000000000000000000000000000000000000000 --- a/node_modules/d3-fetch/src/index.js +++ /dev/null @@ -1,7 +0,0 @@ -export {default as blob} from "./blob.js"; -export {default as buffer} from "./buffer.js"; -export {default as dsv, csv, tsv} from "./dsv.js"; -export {default as image} from "./image.js"; -export {default as json} from "./json.js"; -export {default as text} from "./text.js"; -export {default as xml, html, svg} from "./xml.js"; diff --git a/node_modules/d3-fetch/src/json.js b/node_modules/d3-fetch/src/json.js deleted file mode 100644 index 25e9798d5a6469a012135b472a9390d048203db1..0000000000000000000000000000000000000000 --- a/node_modules/d3-fetch/src/json.js +++ /dev/null @@ -1,9 +0,0 @@ -function responseJson(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - if (response.status === 204 || response.status === 205) return; - return response.json(); -} - -export default function(input, init) { - return fetch(input, init).then(responseJson); -} diff --git a/node_modules/d3-fetch/src/text.js b/node_modules/d3-fetch/src/text.js deleted file mode 100644 index 8ea18f8e18191915f7d34c96eea97905bbfc76ea..0000000000000000000000000000000000000000 --- a/node_modules/d3-fetch/src/text.js +++ /dev/null @@ -1,8 +0,0 @@ -function responseText(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - return response.text(); -} - -export default function(input, init) { - return fetch(input, init).then(responseText); -} diff --git a/node_modules/d3-fetch/src/xml.js b/node_modules/d3-fetch/src/xml.js deleted file mode 100644 index 562828048845a3b48469e105370701b4b2c0a19e..0000000000000000000000000000000000000000 --- a/node_modules/d3-fetch/src/xml.js +++ /dev/null @@ -1,12 +0,0 @@ -import text from "./text.js"; - -function parser(type) { - return (input, init) => text(input, init) - .then(text => (new DOMParser).parseFromString(text, type)); -} - -export default parser("application/xml"); - -export var html = parser("text/html"); - -export var svg = parser("image/svg+xml"); diff --git a/node_modules/d3-force/LICENSE b/node_modules/d3-force/LICENSE deleted file mode 100644 index 721bd22ece6587a9408eda1b6a3949c425b5624a..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-force/README.md b/node_modules/d3-force/README.md deleted file mode 100644 index 08323395ba5ecdad5e4cd3f949aee06a2a52f444..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/README.md +++ /dev/null @@ -1,468 +0,0 @@ -# d3-force - -This module implements a [velocity Verlet](https://en.wikipedia.org/wiki/Verlet_integration) numerical integrator for simulating physical forces on particles. The simulation is simplified: it assumes a constant unit time step Δ*t* = 1 for each step, and a constant unit mass *m* = 1 for all particles. As a result, a force *F* acting on a particle is equivalent to a constant acceleration *a* over the time interval Δ*t*, and can be simulated simply by adding to the particle’s velocity, which is then added to the particle’s position. - -In the domain of information visualization, physical simulations are useful for studying [networks](http://bl.ocks.org/mbostock/ad70335eeef6d167bc36fd3c04378048) and [hierarchies](http://bl.ocks.org/mbostock/95aa92e2f4e8345aaa55a4a94d41ce37)! - -[<img alt="Force Dragging III" src="https://raw.githubusercontent.com/d3/d3-force/master/img/graph.png" width="420" height="219">](http://bl.ocks.org/mbostock/ad70335eeef6d167bc36fd3c04378048)[<img alt="Force-Directed Tree" src="https://raw.githubusercontent.com/d3/d3-force/master/img/tree.png" width="420" height="219">](http://bl.ocks.org/mbostock/95aa92e2f4e8345aaa55a4a94d41ce37) - -You can also simulate circles (disks) with collision, such as for [bubble charts](http://www.nytimes.com/interactive/2012/09/06/us/politics/convention-word-counts.html) or [beeswarm plots](http://bl.ocks.org/mbostock/6526445e2b44303eebf21da3b6627320): - -[<img alt="Collision Detection" src="https://raw.githubusercontent.com/d3/d3-force/master/img/collide.png" width="420" height="219">](http://bl.ocks.org/mbostock/31ce330646fa8bcb7289ff3b97aab3f5)[<img alt="Beeswarm" src="https://raw.githubusercontent.com/d3/d3-force/master/img/beeswarm.png" width="420" height="219">](http://bl.ocks.org/mbostock/6526445e2b44303eebf21da3b6627320) - -You can even use it as a rudimentary physics engine, say to simulate cloth: - -[<img alt="Force-Directed Lattice" src="https://raw.githubusercontent.com/d3/d3-force/master/img/lattice.png" width="480" height="250">](http://bl.ocks.org/mbostock/1b64ec067fcfc51e7471d944f51f1611) - -To use this module, create a [simulation](#simulation) for an array of [nodes](#simulation_nodes), and compose the desired [forces](#simulation_force). Then [listen](#simulation_on) for tick events to render the nodes as they update in your preferred graphics system, such as Canvas or SVG. - -## Installing - -If you use NPM, `npm install d3-force`. Otherwise, download the [latest release](https://github.com/d3/d3-force/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-force.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3_force` global is exported: - -```html -<script src="https://d3js.org/d3-dispatch.v1.min.js"></script> -<script src="https://d3js.org/d3-quadtree.v1.min.js"></script> -<script src="https://d3js.org/d3-timer.v1.min.js"></script> -<script src="https://d3js.org/d3-force.v2.min.js"></script> -<script> - -var simulation = d3.forceSimulation(nodes); - -</script> -``` - -[Try d3-force in your browser.](https://observablehq.com/collection/@d3/d3-force) - -## API Reference - -### Simulation - -<a name="forceSimulation" href="#forceSimulation">#</a> d3.<b>forceSimulation</b>([<i>nodes</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js "Source") - -Creates a new simulation with the specified array of [*nodes*](#simulation_nodes) and no [forces](#simulation_force). If *nodes* is not specified, it defaults to the empty array. The simulator [starts](#simulation_restart) automatically; use [*simulation*.on](#simulation_on) to listen for tick events as the simulation runs. If you wish to run the simulation manually instead, call [*simulation*.stop](#simulation_stop), and then call [*simulation*.tick](#simulation_tick) as desired. - -<a name="simulation_restart" href="#simulation_restart">#</a> <i>simulation</i>.<b>restart</b>() [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L86 "Source") - -Restarts the simulation’s internal timer and returns the simulation. In conjunction with [*simulation*.alphaTarget](#simulation_alphaTarget) or [*simulation*.alpha](#simulation_alpha), this method can be used to “reheat†the simulation during interaction, such as when dragging a node, or to resume the simulation after temporarily pausing it with [*simulation*.stop](#simulation_stop). - -<a name="simulation_stop" href="#simulation_stop">#</a> <i>simulation</i>.<b>stop</b>() [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L90 "Source") - -Stops the simulation’s internal timer, if it is running, and returns the simulation. If the timer is already stopped, this method does nothing. This method is useful for running the simulation manually; see [*simulation*.tick](#simulation_tick). - -<a name="simulation_tick" href="#simulation_tick">#</a> <i>simulation</i>.<b>tick</b>([<i>iterations</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L38 "Source") - -Manually steps the simulation by the specified number of *iterations*, and returns the simulation. If *iterations* is not specified, it defaults to 1 (single step). - -For each iteration, it increments the current [*alpha*](#simulation_alpha) by ([*alphaTarget*](#simulation_alphaTarget) - *alpha*) × [*alphaDecay*](#simulation_alphaDecay); then invokes each registered [force](#simulation_force), passing the new *alpha*; then decrements each [node](#simulation_nodes)’s velocity by *velocity* × [*velocityDecay*](#simulation_velocityDecay); lastly increments each node’s position by *velocity*. - -This method does not dispatch [events](#simulation_on); events are only dispatched by the internal timer when the simulation is started automatically upon [creation](#forceSimulation) or by calling [*simulation*.restart](#simulation_restart). The natural number of ticks when the simulation is started is ⌈*log*([*alphaMin*](#simulation_alphaMin)) / *log*(1 - [*alphaDecay*](#simulation_alphaDecay))⌉; by default, this is 300. - -This method can be used in conjunction with [*simulation*.stop](#simulation_stop) to compute a [static force layout](https://bl.ocks.org/mbostock/1667139). For large graphs, static layouts should be computed [in a web worker](https://bl.ocks.org/mbostock/01ab2e85e8727d6529d20391c0fd9a16) to avoid freezing the user interface. - -<a name="simulation_nodes" href="#simulation_nodes">#</a> <i>simulation</i>.<b>nodes</b>([<i>nodes</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L94 "Source") - -If *nodes* is specified, sets the simulation’s nodes to the specified array of objects, initializing their positions and velocities if necessary, and then [re-initializes](#force_initialize) any bound [forces](#simulation_force); returns the simulation. If *nodes* is not specified, returns the simulation’s array of nodes as specified to the [constructor](#forceSimulation). - -Each *node* must be an object. The following properties are assigned by the simulation: - -* `index` - the node’s zero-based index into *nodes* -* `x` - the node’s current *x*-position -* `y` - the node’s current *y*-position -* `vx` - the node’s current *x*-velocity -* `vy` - the node’s current *y*-velocity - -The position ⟨*x*,*y*⟩ and velocity ⟨*vx*,*vy*⟩ may be subsequently modified by [forces](#forces) and by the simulation. If either *vx* or *vy* is NaN, the velocity is initialized to ⟨0,0⟩. If either *x* or *y* is NaN, the position is initialized in a [phyllotaxis arrangement](https://observablehq.com/@d3/force-layout-phyllotaxis), so chosen to ensure a deterministic, uniform distribution. - -To fix a node in a given position, you may specify two additional properties: - -* `fx` - the node’s fixed *x*-position -* `fy` - the node’s fixed *y*-position - -At the end of each [tick](#simulation_tick), after the application of any forces, a node with a defined *node*.fx has *node*.x reset to this value and *node*.vx set to zero; likewise, a node with a defined *node*.fy has *node*.y reset to this value and *node*.vy set to zero. To unfix a node that was previously fixed, set *node*.fx and *node*.fy to null, or delete these properties. - -If the specified array of *nodes* is modified, such as when nodes are added to or removed from the simulation, this method must be called again with the new (or changed) array to notify the simulation and bound forces of the change; the simulation does not make a defensive copy of the specified array. - -<a name="simulation_alpha" href="#simulation_alpha">#</a> <i>simulation</i>.<b>alpha</b>([<i>alpha</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L98 "Source") - -*alpha* is roughly analogous to temperature in [simulated annealing](https://en.wikipedia.org/wiki/Simulated_annealing#Overview). It decreases over time as the simulation “cools downâ€. When *alpha* reaches *alphaMin*, the simulation stops; see [*simulation*.restart](#simulation_restart). - -If *alpha* is specified, sets the current alpha to the specified number in the range [0,1] and returns this simulation. If *alpha* is not specified, returns the current alpha value, which defaults to 1. - -<a name="simulation_alphaMin" href="#simulation_alphaMin">#</a> <i>simulation</i>.<b>alphaMin</b>([<i>min</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L102 "Source") - -If *min* is specified, sets the minimum *alpha* to the specified number in the range [0,1] and returns this simulation. If *min* is not specified, returns the current minimum *alpha* value, which defaults to 0.001. The simulation’s internal timer stops when the current [*alpha*](#simulation_alpha) is less than the minimum *alpha*. The default [alpha decay rate](#simulation_alphaDecay) of ~0.0228 corresponds to 300 iterations. - -<a name="simulation_alphaDecay" href="#simulation_alphaDecay">#</a> <i>simulation</i>.<b>alphaDecay</b>([<i>decay</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L106 "Source") - -If *decay* is specified, sets the [*alpha*](#simulation_alpha) decay rate to the specified number in the range [0,1] and returns this simulation. If *decay* is not specified, returns the current *alpha* decay rate, which defaults to 0.0228… = 1 - *pow*(0.001, 1 / 300) where 0.001 is the default [minimum *alpha*](#simulation_alphaMin). - -The alpha decay rate determines how quickly the current alpha interpolates towards the desired [target *alpha*](#simulation_alphaTarget); since the default target *alpha* is zero, by default this controls how quickly the simulation cools. Higher decay rates cause the simulation to stabilize more quickly, but risk getting stuck in a local minimum; lower values cause the simulation to take longer to run, but typically converge on a better layout. To have the simulation run forever at the current *alpha*, set the *decay* rate to zero; alternatively, set a [target *alpha*](#simulation_alphaTarget) greater than the [minimum *alpha*](#simulation_alphaMin). - -<a name="simulation_alphaTarget" href="#simulation_alphaTarget">#</a> <i>simulation</i>.<b>alphaTarget</b>([<i>target</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L110 "Source") - -If *target* is specified, sets the current target [*alpha*](#simulation_alpha) to the specified number in the range [0,1] and returns this simulation. If *target* is not specified, returns the current target alpha value, which defaults to 0. - -<a name="simulation_velocityDecay" href="#simulation_velocityDecay">#</a> <i>simulation</i>.<b>velocityDecay</b>([<i>decay</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L114 "Source") - -If *decay* is specified, sets the velocity decay factor to the specified number in the range [0,1] and returns this simulation. If *decay* is not specified, returns the current velocity decay factor, which defaults to 0.4. The decay factor is akin to atmospheric friction; after the application of any forces during a [tick](#simulation_tick), each node’s velocity is multiplied by 1 - *decay*. As with lowering the [alpha decay rate](#simulation_alphaDecay), less velocity decay may converge on a better solution, but risks numerical instabilities and oscillation. - -<a name="simulation_force" href="#simulation_force">#</a> <i>simulation</i>.<b>force</b>(<i>name</i>[, <i>force</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L118 "Source") - -If *force* is specified, assigns the [force](#forces) for the specified *name* and returns this simulation. If *force* is not specified, returns the force with the specified name, or undefined if there is no such force. (By default, new simulations have no forces.) For example, to create a new simulation to layout a graph, you might say: - -```js -var simulation = d3.forceSimulation(nodes) - .force("charge", d3.forceManyBody()) - .force("link", d3.forceLink(links)) - .force("center", d3.forceCenter()); -``` - -To remove the force with the given *name*, pass null as the *force*. For example, to remove the charge force: - -```js -simulation.force("charge", null); -``` - -<a name="simulation_find" href="#simulation_find">#</a> <i>simulation</i>.<b>find</b>(<i>x</i>, <i>y</i>[, <i>radius</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L122 "Source") - -Returns the node closest to the position ⟨*x*,*y*⟩ with the given search *radius*. If *radius* is not specified, it defaults to infinity. If there is no node within the search area, returns undefined. - -<a name="simulation_randomSource" href="#simulation_randomSource">#</a> <i>simulation</i>.<b>randomSource</b>([<i>source</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js "Source")) - -If *source* is specified, sets the function used to generate random numbers; this should be a function that returns a number between 0 (inclusive) and 1 (exclusive). If *source* is not specified, returns this simulation’s current random source which defaults to a fixed-seed [linear congruential generator](https://en.wikipedia.org/wiki/Linear_congruential_generator). See also [*random*.source](https://github.com/d3/d3-random/blob/master/README.md#random_source). - -<a name="simulation_on" href="#simulation_on">#</a> <i>simulation</i>.<b>on</b>(<i>typenames</i>, [<i>listener</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L145 "Source") - -If *listener* is specified, sets the event *listener* for the specified *typenames* and returns this simulation. If an event listener was already registered for the same type and name, the existing listener is removed before the new listener is added. If *listener* is null, removes the current event listeners for the specified *typenames*, if any. If *listener* is not specified, returns the first currently-assigned listener matching the specified *typenames*, if any. When a specified event is dispatched, each *listener* will be invoked with the `this` context as the simulation. - -The *typenames* is a string containing one or more *typename* separated by whitespace. Each *typename* is a *type*, optionally followed by a period (`.`) and a *name*, such as `tick.foo` and `tick.bar`; the name allows multiple listeners to be registered for the same *type*. The *type* must be one of the following: - -* `tick` - after each tick of the simulation’s internal timer. -* `end` - after the simulation’s timer stops when *alpha* < [*alphaMin*](#simulation_alphaMin). - -Note that *tick* events are not dispatched when [*simulation*.tick](#simulation_tick) is called manually; events are only dispatched by the internal timer and are intended for interactive rendering of the simulation. To affect the simulation, register [forces](#simulation_force) instead of modifying nodes’ positions or velocities inside a tick event listener. - -See [*dispatch*.on](https://github.com/d3/d3-dispatch#dispatch_on) for details. - -### Forces - -A *force* is simply a function that modifies nodes’ positions or velocities; in this context, a *force* can apply a classical physical force such as electrical charge or gravity, or it can resolve a geometric constraint, such as keeping nodes within a bounding box or keeping linked nodes a fixed distance apart. For example, a simple positioning force that moves nodes towards the origin ⟨0,0⟩ might be implemented as: - -```js -function force(alpha) { - for (var i = 0, n = nodes.length, node, k = alpha * 0.1; i < n; ++i) { - node = nodes[i]; - node.vx -= node.x * k; - node.vy -= node.y * k; - } -} -``` - -Forces typically read the node’s current position ⟨*x*,*y*⟩ and then add to (or subtract from) the node’s velocity ⟨*vx*,*vy*⟩. However, forces may also “peek ahead†to the anticipated next position of the node, ⟨*x* + *vx*,*y* + *vy*⟩; this is necessary for resolving geometric constraints through [iterative relaxation](https://en.wikipedia.org/wiki/Relaxation_\(iterative_method\)). Forces may also modify the position directly, which is sometimes useful to avoid adding energy to the simulation, such as when recentering the simulation in the viewport. - -Simulations typically compose multiple forces as desired. This module provides several for your enjoyment: - -* [Centering](#centering) -* [Collision](#collision) -* [Links](#links) -* [Many-Body](#many-body) -* [Positioning](#positioning) - -Forces may optionally implement [*force*.initialize](#force_initialize) to receive the simulation’s array of nodes. - -<a name="_force" href="#_force">#</a> <i>force</i>(<i>alpha</i>) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L47 "Source") - -Applies this force, optionally observing the specified *alpha*. Typically, the force is applied to the array of nodes previously passed to [*force*.initialize](#force_initialize), however, some forces may apply to a subset of nodes, or behave differently. For example, [d3.forceLink](#links) applies to the source and target of each link. - -<a name="force_initialize" href="#force_initialize">#</a> <i>force</i>.<b>initialize</b>(<i>nodes</i>, <i>random</i>) [<>](https://github.com/d3/d3-force/blob/master/src/simulation.js#L77 "Source") - -Supplies the array of *nodes* and *random* source to this force. This method is called when a force is bound to a simulation via [*simulation*.force](#simulation_force) and when the simulation’s nodes change via [*simulation*.nodes](#simulation_nodes). A force may perform necessary work during initialization, such as evaluating per-node parameters, to avoid repeatedly performing work during each application of the force. - -#### Centering - -The centering force translates nodes uniformly so that the mean position of all nodes (the center of mass if all nodes have equal weight) is at the given position ⟨[*x*](#center_x),[*y*](#center_y)⟩. This force modifies the positions of nodes on each application; it does not modify velocities, as doing so would typically cause the nodes to overshoot and oscillate around the desired center. This force helps keeps nodes in the center of the viewport, and unlike the [positioning force](#positioning), it does not distort their relative positions. - -<a name="forceCenter" href="#forceCenter">#</a> d3.<b>forceCenter</b>([<i>x</i>, <i>y</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/center.js "Source") - -Creates a new centering force with the specified [*x*-](#center_x) and [*y*-](#center_y) coordinates. If *x* and *y* are not specified, they default to ⟨0,0⟩. - -<a name="center_x" href="#center_x">#</a> <i>center</i>.<b>x</b>([<i>x</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/center.js "Source") - -If *x* is specified, sets the *x*-coordinate of the centering position to the specified number and returns this force. If *x* is not specified, returns the current *x*-coordinate, which defaults to zero. - -<a name="center_y" href="#center_y">#</a> <i>center</i>.<b>y</b>([<i>y</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/center.js "Source") - -If *y* is specified, sets the *y*-coordinate of the centering position to the specified number and returns this force. If *y* is not specified, returns the current *y*-coordinate, which defaults to zero. - -<a name="center_strength" href="#center_strength">#</a> <i>center</i>.<b>strength</b>([<i>strength</i>]) · [<>](https://github.com/d3/d3-force/blob/master/src/center.js "Source") - -If *strength* is specified, sets the centering force’s strength. A reduced strength of e.g. 0.05 softens the movements on interactive graphs in which new nodes enter or exit the graph. If *strength* is not specified, returns the force’s current strength, which defaults to 1. - -#### Collision - -The collision force treats nodes as circles with a given [radius](#collide_radius), rather than points, and prevents nodes from overlapping. More formally, two nodes *a* and *b* are separated so that the distance between *a* and *b* is at least *radius*(*a*) + *radius*(*b*). To reduce jitter, this is by default a “soft†constraint with a configurable [strength](#collide_strength) and [iteration count](#collide_iterations). - -<a name="forceCollide" href="#forceCollide">#</a> d3.<b>forceCollide</b>([<i>radius</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/collide.js "Source") - -Creates a new circle collision force with the specified [*radius*](#collide_radius). If *radius* is not specified, it defaults to the constant one for all nodes. - -<a name="collide_radius" href="#collide_radius">#</a> <i>collide</i>.<b>radius</b>([<i>radius</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/collide.js#L86 "Source") - -If *radius* is specified, sets the radius accessor to the specified number or function, re-evaluates the radius accessor for each node, and returns this force. If *radius* is not specified, returns the current radius accessor, which defaults to: - -```js -function radius() { - return 1; -} -``` - -The radius accessor is invoked for each [node](#simulation_nodes) in the simulation, being passed the *node* and its zero-based *index*. The resulting number is then stored internally, such that the radius of each node is only recomputed when the force is initialized or when this method is called with a new *radius*, and not on every application of the force. - -<a name="collide_strength" href="#collide_strength">#</a> <i>collide</i>.<b>strength</b>([<i>strength</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/collide.js#L82 "Source") - -If *strength* is specified, sets the force strength to the specified number in the range [0,1] and returns this force. If *strength* is not specified, returns the current strength which defaults to 1. - -Overlapping nodes are resolved through iterative relaxation. For each node, the other nodes that are anticipated to overlap at the next tick (using the anticipated positions ⟨*x* + *vx*,*y* + *vy*⟩) are determined; the node’s velocity is then modified to push the node out of each overlapping node. The change in velocity is dampened by the force’s strength such that the resolution of simultaneous overlaps can be blended together to find a stable solution. - -<a name="collide_iterations" href="#collide_iterations">#</a> <i>collide</i>.<b>iterations</b>([<i>iterations</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/collide.js#L78 "Source") - -If *iterations* is specified, sets the number of iterations per application to the specified number and returns this force. If *iterations* is not specified, returns the current iteration count which defaults to 1. Increasing the number of iterations greatly increases the rigidity of the constraint and avoids partial overlap of nodes, but also increases the runtime cost to evaluate the force. - -#### Links - -The link force pushes linked nodes together or apart according to the desired [link distance](#link_distance). The strength of the force is proportional to the difference between the linked nodes’ distance and the target distance, similar to a spring force. - -<a name="forceLink" href="#forceLink">#</a> d3.<b>forceLink</b>([<i>links</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/link.js "Source") - -Creates a new link force with the specified *links* and default parameters. If *links* is not specified, it defaults to the empty array. - -<a name="link_links" href="#link_links">#</a> <i>link</i>.<b>links</b>([<i>links</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/link.js#L92 "Source") - -If *links* is specified, sets the array of links associated with this force, recomputes the [distance](#link_distance) and [strength](#link_strength) parameters for each link, and returns this force. If *links* is not specified, returns the current array of links, which defaults to the empty array. - -Each link is an object with the following properties: - -* `source` - the link’s source node; see [*simulation*.nodes](#simulation_nodes) -* `target` - the link’s target node; see [*simulation*.nodes](#simulation_nodes) -* `index` - the zero-based index into *links*, assigned by this method - -For convenience, a link’s source and target properties may be initialized using numeric or string identifiers rather than object references; see [*link*.id](#link_id). When the link force is [initialized](#force_initialize) (or re-initialized, as when the nodes or links change), any *link*.source or *link*.target property which is *not* an object is replaced by an object reference to the corresponding *node* with the given identifier. - -If the specified array of *links* is modified, such as when links are added to or removed from the simulation, this method must be called again with the new (or changed) array to notify the force of the change; the force does not make a defensive copy of the specified array. - -<a name="link_id" href="#link_id">#</a> <i>link</i>.<b>id</b>([<i>id</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/link.js#L96 "Source") - -If *id* is specified, sets the node id accessor to the specified function and returns this force. If *id* is not specified, returns the current node id accessor, which defaults to the numeric *node*.index: - -```js -function id(d) { - return d.index; -} -``` - -The default id accessor allows each link’s source and target to be specified as a zero-based index into the [nodes](#simulation_nodes) array. For example: - -```js -var nodes = [ - {"id": "Alice"}, - {"id": "Bob"}, - {"id": "Carol"} -]; - -var links = [ - {"source": 0, "target": 1}, // Alice → Bob - {"source": 1, "target": 2} // Bob → Carol -]; -``` - -Now consider a different id accessor that returns a string: - -```js -function id(d) { - return d.id; -} -``` - -With this accessor, you can use named sources and targets: - -```js -var nodes = [ - {"id": "Alice"}, - {"id": "Bob"}, - {"id": "Carol"} -]; - -var links = [ - {"source": "Alice", "target": "Bob"}, - {"source": "Bob", "target": "Carol"} -]; -``` - -This is particularly useful when representing graphs in JSON, as JSON does not allow references. See [this example](http://bl.ocks.org/mbostock/f584aa36df54c451c94a9d0798caed35). - -The id accessor is invoked for each node whenever the force is initialized, as when the [nodes](#simulation_nodes) or [links](#link_links) change, being passed the node and its zero-based index. - -<a name="link_distance" href="#link_distance">#</a> <i>link</i>.<b>distance</b>([<i>distance</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/link.js#L108 "Source") - -If *distance* is specified, sets the distance accessor to the specified number or function, re-evaluates the distance accessor for each link, and returns this force. If *distance* is not specified, returns the current distance accessor, which defaults to: - -```js -function distance() { - return 30; -} -``` - -The distance accessor is invoked for each [link](#link_links), being passed the *link* and its zero-based *index*. The resulting number is then stored internally, such that the distance of each link is only recomputed when the force is initialized or when this method is called with a new *distance*, and not on every application of the force. - -<a name="link_strength" href="#link_strength">#</a> <i>link</i>.<b>strength</b>([<i>strength</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/link.js#L104 "Source") - -If *strength* is specified, sets the strength accessor to the specified number or function, re-evaluates the strength accessor for each link, and returns this force. If *strength* is not specified, returns the current strength accessor, which defaults to: - -```js -function strength(link) { - return 1 / Math.min(count(link.source), count(link.target)); -} -``` - -Where *count*(*node*) is a function that returns the number of links with the given node as a source or target. This default was chosen because it automatically reduces the strength of links connected to heavily-connected nodes, improving stability. - -The strength accessor is invoked for each [link](#link_links), being passed the *link* and its zero-based *index*. The resulting number is then stored internally, such that the strength of each link is only recomputed when the force is initialized or when this method is called with a new *strength*, and not on every application of the force. - -<a name="link_iterations" href="#link_iterations">#</a> <i>link</i>.<b>iterations</b>([<i>iterations</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/link.js#L100 "Source") - -If *iterations* is specified, sets the number of iterations per application to the specified number and returns this force. If *iterations* is not specified, returns the current iteration count which defaults to 1. Increasing the number of iterations greatly increases the rigidity of the constraint and is useful for [complex structures such as lattices](http://bl.ocks.org/mbostock/1b64ec067fcfc51e7471d944f51f1611), but also increases the runtime cost to evaluate the force. - -#### Many-Body - -The many-body (or *n*-body) force applies mutually amongst all [nodes](#simulation_nodes). It can be used to simulate gravity (attraction) if the [strength](#manyBody_strength) is positive, or electrostatic charge (repulsion) if the strength is negative. This implementation uses quadtrees and the [Barnes–Hut approximation](https://en.wikipedia.org/wiki/Barnes–Hut_simulation) to greatly improve performance; the accuracy can be customized using the [theta](#manyBody_theta) parameter. - -Unlike links, which only affect two linked nodes, the charge force is global: every node affects every other node, even if they are on disconnected subgraphs. - -<a name="forceManyBody" href="#forceManyBody">#</a> d3.<b>forceManyBody</b>() [<>](https://github.com/d3/d3-force/blob/master/src/manyBody.js "Source") - -Creates a new many-body force with the default parameters. - -<a name="manyBody_strength" href="#manyBody_strength">#</a> <i>manyBody</i>.<b>strength</b>([<i>strength</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/manyBody.js#L97 "Source") - -If *strength* is specified, sets the strength accessor to the specified number or function, re-evaluates the strength accessor for each node, and returns this force. A positive value causes nodes to attract each other, similar to gravity, while a negative value causes nodes to repel each other, similar to electrostatic charge. If *strength* is not specified, returns the current strength accessor, which defaults to: - -```js -function strength() { - return -30; -} -``` - -The strength accessor is invoked for each [node](#simulation_nodes) in the simulation, being passed the *node* and its zero-based *index*. The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or when this method is called with a new *strength*, and not on every application of the force. - -<a name="manyBody_theta" href="#manyBody_theta">#</a> <i>manyBody</i>.<b>theta</b>([<i>theta</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/manyBody.js#L109 "Source") - -If *theta* is specified, sets the Barnes–Hut approximation criterion to the specified number and returns this force. If *theta* is not specified, returns the current value, which defaults to 0.9. - -To accelerate computation, this force implements the [Barnes–Hut approximation](http://en.wikipedia.org/wiki/Barnes–Hut_simulation) which takes O(*n* log *n*) per application where *n* is the number of [nodes](#simulation_nodes). For each application, a [quadtree](https://github.com/d3/d3-quadtree) stores the current node positions; then for each node, the combined force of all other nodes on the given node is computed. For a cluster of nodes that is far away, the charge force can be approximated by treating the cluster as a single, larger node. The *theta* parameter determines the accuracy of the approximation: if the ratio *w* / *l* of the width *w* of the quadtree cell to the distance *l* from the node to the cell’s center of mass is less than *theta*, all nodes in the given cell are treated as a single node rather than individually. - -<a name="manyBody_distanceMin" href="#manyBody_distanceMin">#</a> <i>manyBody</i>.<b>distanceMin</b>([<i>distance</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/manyBody.js#L101 "Source") - -If *distance* is specified, sets the minimum distance between nodes over which this force is considered. If *distance* is not specified, returns the current minimum distance, which defaults to 1. A minimum distance establishes an upper bound on the strength of the force between two nearby nodes, avoiding instability. In particular, it avoids an infinitely-strong force if two nodes are exactly coincident; in this case, the direction of the force is random. - -<a name="manyBody_distanceMax" href="#manyBody_distanceMax">#</a> <i>manyBody</i>.<b>distanceMax</b>([<i>distance</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/manyBody.js#L105 "Source") - -If *distance* is specified, sets the maximum distance between nodes over which this force is considered. If *distance* is not specified, returns the current maximum distance, which defaults to infinity. Specifying a finite maximum distance improves performance and produces a more localized layout. - -#### Positioning - -The [*x*](#forceX)- and [*y*](#forceY)-positioning forces push nodes towards a desired position along the given dimension with a configurable strength. The [*radial*](#forceRadial) force is similar, except it pushes nodes towards the closest point on a given circle. The strength of the force is proportional to the one-dimensional distance between the node’s position and the target position. While these forces can be used to position individual nodes, they are intended primarily for global forces that apply to all (or most) nodes. - -<a name="forceX" href="#forceX">#</a> d3.<b>forceX</b>([<i>x</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/x.js "Source") - -Creates a new positioning force along the *x*-axis towards the given position [*x*](#x_x). If *x* is not specified, it defaults to 0. - -<a name="x_strength" href="#x_strength">#</a> <i>x</i>.<b>strength</b>([<i>strength</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/x.js#L32 "Source") - -If *strength* is specified, sets the strength accessor to the specified number or function, re-evaluates the strength accessor for each node, and returns this force. The *strength* determines how much to increment the node’s *x*-velocity: ([*x*](#x_x) - *node*.x) × *strength*. For example, a value of 0.1 indicates that the node should move a tenth of the way from its current *x*-position to the target *x*-position with each application. Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints. A value outside the range [0,1] is not recommended. - -If *strength* is not specified, returns the current strength accessor, which defaults to: - -```js -function strength() { - return 0.1; -} -``` - -The strength accessor is invoked for each [node](#simulation_nodes) in the simulation, being passed the *node* and its zero-based *index*. The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or when this method is called with a new *strength*, and not on every application of the force. - -<a name="x_x" href="#x_x">#</a> <i>x</i>.<b>x</b>([<i>x</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/x.js#L36 "Source") - -If *x* is specified, sets the *x*-coordinate accessor to the specified number or function, re-evaluates the *x*-accessor for each node, and returns this force. If *x* is not specified, returns the current *x*-accessor, which defaults to: - -```js -function x() { - return 0; -} -``` - -The *x*-accessor is invoked for each [node](#simulation_nodes) in the simulation, being passed the *node* and its zero-based *index*. The resulting number is then stored internally, such that the target *x*-coordinate of each node is only recomputed when the force is initialized or when this method is called with a new *x*, and not on every application of the force. - -<a name="forceY" href="#forceY">#</a> d3.<b>forceY</b>([<i>y</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/y.js "Source") - -Creates a new positioning force along the *y*-axis towards the given position [*y*](#y_y). If *y* is not specified, it defaults to 0. - -<a name="y_strength" href="#y_strength">#</a> <i>y</i>.<b>strength</b>([<i>strength</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/y.js#L32 "Source") - -If *strength* is specified, sets the strength accessor to the specified number or function, re-evaluates the strength accessor for each node, and returns this force. The *strength* determines how much to increment the node’s *y*-velocity: ([*y*](#y_y) - *node*.y) × *strength*. For example, a value of 0.1 indicates that the node should move a tenth of the way from its current *y*-position to the target *y*-position with each application. Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints. A value outside the range [0,1] is not recommended. - -If *strength* is not specified, returns the current strength accessor, which defaults to: - -```js -function strength() { - return 0.1; -} -``` - -The strength accessor is invoked for each [node](#simulation_nodes) in the simulation, being passed the *node* and its zero-based *index*. The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or when this method is called with a new *strength*, and not on every application of the force. - -<a name="y_y" href="#y_y">#</a> <i>y</i>.<b>y</b>([<i>y</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/y.js#L36 "Source") - -If *y* is specified, sets the *y*-coordinate accessor to the specified number or function, re-evaluates the *y*-accessor for each node, and returns this force. If *y* is not specified, returns the current *y*-accessor, which defaults to: - -```js -function y() { - return 0; -} -``` - -The *y*-accessor is invoked for each [node](#simulation_nodes) in the simulation, being passed the *node* and its zero-based *index*. The resulting number is then stored internally, such that the target *y*-coordinate of each node is only recomputed when the force is initialized or when this method is called with a new *y*, and not on every application of the force. - -<a name="forceRadial" href="#forceRadial">#</a> d3.<b>forceRadial</b>(<i>radius</i>[, <i>x</i>][, <i>y</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/radial.js "Source") - -[<img alt="Radial Force" src="https://raw.githubusercontent.com/d3/d3-force/master/img/radial.png" width="420" height="219">](https://bl.ocks.org/mbostock/cd98bf52e9067e26945edd95e8cf6ef9) - -Creates a new positioning force towards a circle of the specified [*radius*](#radial_radius) centered at ⟨[*x*](#radial_x),[*y*](#radial_y)⟩. If *x* and *y* are not specified, they default to ⟨0,0⟩. - -<a name="radial_strength" href="#radial_strength">#</a> <i>radial</i>.<b>strength</b>([<i>strength</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/radial.js "Source") - -If *strength* is specified, sets the strength accessor to the specified number or function, re-evaluates the strength accessor for each node, and returns this force. The *strength* determines how much to increment the node’s *x*- and *y*-velocity. For example, a value of 0.1 indicates that the node should move a tenth of the way from its current position to the closest point on the circle with each application. Higher values moves nodes more quickly to the target position, often at the expense of other forces or constraints. A value outside the range [0,1] is not recommended. - -If *strength* is not specified, returns the current strength accessor, which defaults to: - -```js -function strength() { - return 0.1; -} -``` - -The strength accessor is invoked for each [node](#simulation_nodes) in the simulation, being passed the *node* and its zero-based *index*. The resulting number is then stored internally, such that the strength of each node is only recomputed when the force is initialized or when this method is called with a new *strength*, and not on every application of the force. - -<a name="radial_radius" href="#radial_radius">#</a> <i>radial</i>.<b>radius</b>([<i>radius</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/radial.js "Source") - -If *radius* is specified, sets the circle *radius* to the specified number or function, re-evaluates the *radius* accessor for each node, and returns this force. If *radius* is not specified, returns the current *radius* accessor. - -The *radius* accessor is invoked for each [node](#simulation_nodes) in the simulation, being passed the *node* and its zero-based *index*. The resulting number is then stored internally, such that the target radius of each node is only recomputed when the force is initialized or when this method is called with a new *radius*, and not on every application of the force. - -<a name="radial_x" href="#radial_x">#</a> <i>radial</i>.<b>x</b>([<i>x</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/radial.js "Source") - -If *x* is specified, sets the *x*-coordinate of the circle center to the specified number and returns this force. If *x* is not specified, returns the current *x*-coordinate of the center, which defaults to zero. - -<a name="radial_y" href="#radial_y">#</a> <i>radial</i>.<b>y</b>([<i>y</i>]) [<>](https://github.com/d3/d3-force/blob/master/src/radial.js "Source") - -If *y* is specified, sets the *y*-coordinate of the circle center to the specified number and returns this force. If *y* is not specified, returns the current *y*-coordinate of the center, which defaults to zero. diff --git a/node_modules/d3-force/dist/d3-force.js b/node_modules/d3-force/dist/d3-force.js deleted file mode 100644 index d96788ddcbee4d42d60c9cbd4477d499aa8f4e8e..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/dist/d3-force.js +++ /dev/null @@ -1,693 +0,0 @@ -// https://d3js.org/d3-force/ v2.1.1 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-quadtree'), require('d3-dispatch'), require('d3-timer')) : -typeof define === 'function' && define.amd ? define(['exports', 'd3-quadtree', 'd3-dispatch', 'd3-timer'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {}, global.d3, global.d3, global.d3)); -}(this, function (exports, d3Quadtree, d3Dispatch, d3Timer) { 'use strict'; - -function center(x, y) { - var nodes, strength = 1; - - if (x == null) x = 0; - if (y == null) y = 0; - - function force() { - var i, - n = nodes.length, - node, - sx = 0, - sy = 0; - - for (i = 0; i < n; ++i) { - node = nodes[i], sx += node.x, sy += node.y; - } - - for (sx = (sx / n - x) * strength, sy = (sy / n - y) * strength, i = 0; i < n; ++i) { - node = nodes[i], node.x -= sx, node.y -= sy; - } - } - - force.initialize = function(_) { - nodes = _; - }; - - force.x = function(_) { - return arguments.length ? (x = +_, force) : x; - }; - - force.y = function(_) { - return arguments.length ? (y = +_, force) : y; - }; - - force.strength = function(_) { - return arguments.length ? (strength = +_, force) : strength; - }; - - return force; -} - -function constant(x) { - return function() { - return x; - }; -} - -function jiggle(random) { - return (random() - 0.5) * 1e-6; -} - -function x(d) { - return d.x + d.vx; -} - -function y(d) { - return d.y + d.vy; -} - -function collide(radius) { - var nodes, - radii, - random, - strength = 1, - iterations = 1; - - if (typeof radius !== "function") radius = constant(radius == null ? 1 : +radius); - - function force() { - var i, n = nodes.length, - tree, - node, - xi, - yi, - ri, - ri2; - - for (var k = 0; k < iterations; ++k) { - tree = d3Quadtree.quadtree(nodes, x, y).visitAfter(prepare); - for (i = 0; i < n; ++i) { - node = nodes[i]; - ri = radii[node.index], ri2 = ri * ri; - xi = node.x + node.vx; - yi = node.y + node.vy; - tree.visit(apply); - } - } - - function apply(quad, x0, y0, x1, y1) { - var data = quad.data, rj = quad.r, r = ri + rj; - if (data) { - if (data.index > node.index) { - var x = xi - data.x - data.vx, - y = yi - data.y - data.vy, - l = x * x + y * y; - if (l < r * r) { - if (x === 0) x = jiggle(random), l += x * x; - if (y === 0) y = jiggle(random), l += y * y; - l = (r - (l = Math.sqrt(l))) / l * strength; - node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj)); - node.vy += (y *= l) * r; - data.vx -= x * (r = 1 - r); - data.vy -= y * r; - } - } - return; - } - return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r; - } - } - - function prepare(quad) { - if (quad.data) return quad.r = radii[quad.data.index]; - for (var i = quad.r = 0; i < 4; ++i) { - if (quad[i] && quad[i].r > quad.r) { - quad.r = quad[i].r; - } - } - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length, node; - radii = new Array(n); - for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes); - } - - force.initialize = function(_nodes, _random) { - nodes = _nodes; - random = _random; - initialize(); - }; - - force.iterations = function(_) { - return arguments.length ? (iterations = +_, force) : iterations; - }; - - force.strength = function(_) { - return arguments.length ? (strength = +_, force) : strength; - }; - - force.radius = function(_) { - return arguments.length ? (radius = typeof _ === "function" ? _ : constant(+_), initialize(), force) : radius; - }; - - return force; -} - -function index(d) { - return d.index; -} - -function find(nodeById, nodeId) { - var node = nodeById.get(nodeId); - if (!node) throw new Error("node not found: " + nodeId); - return node; -} - -function link(links) { - var id = index, - strength = defaultStrength, - strengths, - distance = constant(30), - distances, - nodes, - count, - bias, - random, - iterations = 1; - - if (links == null) links = []; - - function defaultStrength(link) { - return 1 / Math.min(count[link.source.index], count[link.target.index]); - } - - function force(alpha) { - for (var k = 0, n = links.length; k < iterations; ++k) { - for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) { - link = links[i], source = link.source, target = link.target; - x = target.x + target.vx - source.x - source.vx || jiggle(random); - y = target.y + target.vy - source.y - source.vy || jiggle(random); - l = Math.sqrt(x * x + y * y); - l = (l - distances[i]) / l * alpha * strengths[i]; - x *= l, y *= l; - target.vx -= x * (b = bias[i]); - target.vy -= y * b; - source.vx += x * (b = 1 - b); - source.vy += y * b; - } - } - } - - function initialize() { - if (!nodes) return; - - var i, - n = nodes.length, - m = links.length, - nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])), - link; - - for (i = 0, count = new Array(n); i < m; ++i) { - link = links[i], link.index = i; - if (typeof link.source !== "object") link.source = find(nodeById, link.source); - if (typeof link.target !== "object") link.target = find(nodeById, link.target); - count[link.source.index] = (count[link.source.index] || 0) + 1; - count[link.target.index] = (count[link.target.index] || 0) + 1; - } - - for (i = 0, bias = new Array(m); i < m; ++i) { - link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]); - } - - strengths = new Array(m), initializeStrength(); - distances = new Array(m), initializeDistance(); - } - - function initializeStrength() { - if (!nodes) return; - - for (var i = 0, n = links.length; i < n; ++i) { - strengths[i] = +strength(links[i], i, links); - } - } - - function initializeDistance() { - if (!nodes) return; - - for (var i = 0, n = links.length; i < n; ++i) { - distances[i] = +distance(links[i], i, links); - } - } - - force.initialize = function(_nodes, _random) { - nodes = _nodes; - random = _random; - initialize(); - }; - - force.links = function(_) { - return arguments.length ? (links = _, initialize(), force) : links; - }; - - force.id = function(_) { - return arguments.length ? (id = _, force) : id; - }; - - force.iterations = function(_) { - return arguments.length ? (iterations = +_, force) : iterations; - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initializeStrength(), force) : strength; - }; - - force.distance = function(_) { - return arguments.length ? (distance = typeof _ === "function" ? _ : constant(+_), initializeDistance(), force) : distance; - }; - - return force; -} - -// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use -const a = 1664525; -const c = 1013904223; -const m = 4294967296; // 2^32 - -function lcg() { - let s = 1; - return () => (s = (a * s + c) % m) / m; -} - -function x$1(d) { - return d.x; -} - -function y$1(d) { - return d.y; -} - -var initialRadius = 10, - initialAngle = Math.PI * (3 - Math.sqrt(5)); - -function simulation(nodes) { - var simulation, - alpha = 1, - alphaMin = 0.001, - alphaDecay = 1 - Math.pow(alphaMin, 1 / 300), - alphaTarget = 0, - velocityDecay = 0.6, - forces = new Map(), - stepper = d3Timer.timer(step), - event = d3Dispatch.dispatch("tick", "end"), - random = lcg(); - - if (nodes == null) nodes = []; - - function step() { - tick(); - event.call("tick", simulation); - if (alpha < alphaMin) { - stepper.stop(); - event.call("end", simulation); - } - } - - function tick(iterations) { - var i, n = nodes.length, node; - - if (iterations === undefined) iterations = 1; - - for (var k = 0; k < iterations; ++k) { - alpha += (alphaTarget - alpha) * alphaDecay; - - forces.forEach(function(force) { - force(alpha); - }); - - for (i = 0; i < n; ++i) { - node = nodes[i]; - if (node.fx == null) node.x += node.vx *= velocityDecay; - else node.x = node.fx, node.vx = 0; - if (node.fy == null) node.y += node.vy *= velocityDecay; - else node.y = node.fy, node.vy = 0; - } - } - - return simulation; - } - - function initializeNodes() { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.index = i; - if (node.fx != null) node.x = node.fx; - if (node.fy != null) node.y = node.fy; - if (isNaN(node.x) || isNaN(node.y)) { - var radius = initialRadius * Math.sqrt(0.5 + i), angle = i * initialAngle; - node.x = radius * Math.cos(angle); - node.y = radius * Math.sin(angle); - } - if (isNaN(node.vx) || isNaN(node.vy)) { - node.vx = node.vy = 0; - } - } - } - - function initializeForce(force) { - if (force.initialize) force.initialize(nodes, random); - return force; - } - - initializeNodes(); - - return simulation = { - tick: tick, - - restart: function() { - return stepper.restart(step), simulation; - }, - - stop: function() { - return stepper.stop(), simulation; - }, - - nodes: function(_) { - return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes; - }, - - alpha: function(_) { - return arguments.length ? (alpha = +_, simulation) : alpha; - }, - - alphaMin: function(_) { - return arguments.length ? (alphaMin = +_, simulation) : alphaMin; - }, - - alphaDecay: function(_) { - return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay; - }, - - alphaTarget: function(_) { - return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget; - }, - - velocityDecay: function(_) { - return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay; - }, - - randomSource: function(_) { - return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random; - }, - - force: function(name, _) { - return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name); - }, - - find: function(x, y, radius) { - var i = 0, - n = nodes.length, - dx, - dy, - d2, - node, - closest; - - if (radius == null) radius = Infinity; - else radius *= radius; - - for (i = 0; i < n; ++i) { - node = nodes[i]; - dx = x - node.x; - dy = y - node.y; - d2 = dx * dx + dy * dy; - if (d2 < radius) closest = node, radius = d2; - } - - return closest; - }, - - on: function(name, _) { - return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name); - } - }; -} - -function manyBody() { - var nodes, - node, - random, - alpha, - strength = constant(-30), - strengths, - distanceMin2 = 1, - distanceMax2 = Infinity, - theta2 = 0.81; - - function force(_) { - var i, n = nodes.length, tree = d3Quadtree.quadtree(nodes, x$1, y$1).visitAfter(accumulate); - for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply); - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length, node; - strengths = new Array(n); - for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes); - } - - function accumulate(quad) { - var strength = 0, q, c, weight = 0, x, y, i; - - // For internal nodes, accumulate forces from child quadrants. - if (quad.length) { - for (x = y = i = 0; i < 4; ++i) { - if ((q = quad[i]) && (c = Math.abs(q.value))) { - strength += q.value, weight += c, x += c * q.x, y += c * q.y; - } - } - quad.x = x / weight; - quad.y = y / weight; - } - - // For leaf nodes, accumulate forces from coincident quadrants. - else { - q = quad; - q.x = q.data.x; - q.y = q.data.y; - do strength += strengths[q.data.index]; - while (q = q.next); - } - - quad.value = strength; - } - - function apply(quad, x1, _, x2) { - if (!quad.value) return true; - - var x = quad.x - node.x, - y = quad.y - node.y, - w = x2 - x1, - l = x * x + y * y; - - // Apply the Barnes-Hut approximation if possible. - // Limit forces for very close nodes; randomize direction if coincident. - if (w * w / theta2 < l) { - if (l < distanceMax2) { - if (x === 0) x = jiggle(random), l += x * x; - if (y === 0) y = jiggle(random), l += y * y; - if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); - node.vx += x * quad.value * alpha / l; - node.vy += y * quad.value * alpha / l; - } - return true; - } - - // Otherwise, process points directly. - else if (quad.length || l >= distanceMax2) return; - - // Limit forces for very close nodes; randomize direction if coincident. - if (quad.data !== node || quad.next) { - if (x === 0) x = jiggle(random), l += x * x; - if (y === 0) y = jiggle(random), l += y * y; - if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); - } - - do if (quad.data !== node) { - w = strengths[quad.data.index] * alpha / l; - node.vx += x * w; - node.vy += y * w; - } while (quad = quad.next); - } - - force.initialize = function(_nodes, _random) { - nodes = _nodes; - random = _random; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; - }; - - force.distanceMin = function(_) { - return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2); - }; - - force.distanceMax = function(_) { - return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2); - }; - - force.theta = function(_) { - return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2); - }; - - return force; -} - -function radial(radius, x, y) { - var nodes, - strength = constant(0.1), - strengths, - radiuses; - - if (typeof radius !== "function") radius = constant(+radius); - if (x == null) x = 0; - if (y == null) y = 0; - - function force(alpha) { - for (var i = 0, n = nodes.length; i < n; ++i) { - var node = nodes[i], - dx = node.x - x || 1e-6, - dy = node.y - y || 1e-6, - r = Math.sqrt(dx * dx + dy * dy), - k = (radiuses[i] - r) * strengths[i] * alpha / r; - node.vx += dx * k; - node.vy += dy * k; - } - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - radiuses = new Array(n); - for (i = 0; i < n; ++i) { - radiuses[i] = +radius(nodes[i], i, nodes); - strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes); - } - } - - force.initialize = function(_) { - nodes = _, initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; - }; - - force.radius = function(_) { - return arguments.length ? (radius = typeof _ === "function" ? _ : constant(+_), initialize(), force) : radius; - }; - - force.x = function(_) { - return arguments.length ? (x = +_, force) : x; - }; - - force.y = function(_) { - return arguments.length ? (y = +_, force) : y; - }; - - return force; -} - -function x$2(x) { - var strength = constant(0.1), - nodes, - strengths, - xz; - - if (typeof x !== "function") x = constant(x == null ? 0 : +x); - - function force(alpha) { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha; - } - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - xz = new Array(n); - for (i = 0; i < n; ++i) { - strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); - } - } - - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; - }; - - force.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : constant(+_), initialize(), force) : x; - }; - - return force; -} - -function y$2(y) { - var strength = constant(0.1), - nodes, - strengths, - yz; - - if (typeof y !== "function") y = constant(y == null ? 0 : +y); - - function force(alpha) { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha; - } - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - yz = new Array(n); - for (i = 0; i < n; ++i) { - strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); - } - } - - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; - }; - - force.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : constant(+_), initialize(), force) : y; - }; - - return force; -} - -exports.forceCenter = center; -exports.forceCollide = collide; -exports.forceLink = link; -exports.forceManyBody = manyBody; -exports.forceRadial = radial; -exports.forceSimulation = simulation; -exports.forceX = x$2; -exports.forceY = y$2; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-force/dist/d3-force.min.js b/node_modules/d3-force/dist/d3-force.min.js deleted file mode 100644 index d6dcb2c0e0341b0f5db486f62708106711e1e95e..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/dist/d3-force.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-force/ v2.1.1 Copyright 2020 Mike Bostock -!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-quadtree"),require("d3-dispatch"),require("d3-timer")):"function"==typeof define&&define.amd?define(["exports","d3-quadtree","d3-dispatch","d3-timer"],t):t((n=n||self).d3=n.d3||{},n.d3,n.d3,n.d3)}(this,function(n,t,r,e){"use strict";function i(n){return function(){return n}}function u(n){return 1e-6*(n()-.5)}function o(n){return n.x+n.vx}function f(n){return n.y+n.vy}function a(n){return n.index}function c(n,t){var r=n.get(t);if(!r)throw new Error("node not found: "+t);return r}const l=1664525,h=1013904223,v=4294967296;function y(n){return n.x}function d(n){return n.y}var x=10,g=Math.PI*(3-Math.sqrt(5));n.forceCenter=function(n,t){var r,e=1;function i(){var i,u,o=r.length,f=0,a=0;for(i=0;i<o;++i)f+=(u=r[i]).x,a+=u.y;for(f=(f/o-n)*e,a=(a/o-t)*e,i=0;i<o;++i)(u=r[i]).x-=f,u.y-=a}return null==n&&(n=0),null==t&&(t=0),i.initialize=function(n){r=n},i.x=function(t){return arguments.length?(n=+t,i):n},i.y=function(n){return arguments.length?(t=+n,i):t},i.strength=function(n){return arguments.length?(e=+n,i):e},i},n.forceCollide=function(n){var r,e,a,c=1,l=1;function h(){for(var n,i,h,y,d,x,g,s=r.length,p=0;p<l;++p)for(i=t.quadtree(r,o,f).visitAfter(v),n=0;n<s;++n)h=r[n],x=e[h.index],g=x*x,y=h.x+h.vx,d=h.y+h.vy,i.visit(M);function M(n,t,r,e,i){var o=n.data,f=n.r,l=x+f;if(!o)return t>y+l||e<y-l||r>d+l||i<d-l;if(o.index>h.index){var v=y-o.x-o.vx,s=d-o.y-o.vy,p=v*v+s*s;p<l*l&&(0===v&&(p+=(v=u(a))*v),0===s&&(p+=(s=u(a))*s),p=(l-(p=Math.sqrt(p)))/p*c,h.vx+=(v*=p)*(l=(f*=f)/(g+f)),h.vy+=(s*=p)*l,o.vx-=v*(l=1-l),o.vy-=s*l)}}}function v(n){if(n.data)return n.r=e[n.data.index];for(var t=n.r=0;t<4;++t)n[t]&&n[t].r>n.r&&(n.r=n[t].r)}function y(){if(r){var t,i,u=r.length;for(e=new Array(u),t=0;t<u;++t)i=r[t],e[i.index]=+n(i,t,r)}}return"function"!=typeof n&&(n=i(null==n?1:+n)),h.initialize=function(n,t){r=n,a=t,y()},h.iterations=function(n){return arguments.length?(l=+n,h):l},h.strength=function(n){return arguments.length?(c=+n,h):c},h.radius=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),y(),h):n},h},n.forceLink=function(n){var t,r,e,o,f,l,h=a,v=function(n){return 1/Math.min(o[n.source.index],o[n.target.index])},y=i(30),d=1;function x(e){for(var i=0,o=n.length;i<d;++i)for(var a,c,h,v,y,x,g,s=0;s<o;++s)c=(a=n[s]).source,v=(h=a.target).x+h.vx-c.x-c.vx||u(l),y=h.y+h.vy-c.y-c.vy||u(l),v*=x=((x=Math.sqrt(v*v+y*y))-r[s])/x*e*t[s],y*=x,h.vx-=v*(g=f[s]),h.vy-=y*g,c.vx+=v*(g=1-g),c.vy+=y*g}function g(){if(e){var i,u,a=e.length,l=n.length,v=new Map(e.map((n,t)=>[h(n,t,e),n]));for(i=0,o=new Array(a);i<l;++i)(u=n[i]).index=i,"object"!=typeof u.source&&(u.source=c(v,u.source)),"object"!=typeof u.target&&(u.target=c(v,u.target)),o[u.source.index]=(o[u.source.index]||0)+1,o[u.target.index]=(o[u.target.index]||0)+1;for(i=0,f=new Array(l);i<l;++i)u=n[i],f[i]=o[u.source.index]/(o[u.source.index]+o[u.target.index]);t=new Array(l),s(),r=new Array(l),p()}}function s(){if(e)for(var r=0,i=n.length;r<i;++r)t[r]=+v(n[r],r,n)}function p(){if(e)for(var t=0,i=n.length;t<i;++t)r[t]=+y(n[t],t,n)}return null==n&&(n=[]),x.initialize=function(n,t){e=n,l=t,g()},x.links=function(t){return arguments.length?(n=t,g(),x):n},x.id=function(n){return arguments.length?(h=n,x):h},x.iterations=function(n){return arguments.length?(d=+n,x):d},x.strength=function(n){return arguments.length?(v="function"==typeof n?n:i(+n),s(),x):v},x.distance=function(n){return arguments.length?(y="function"==typeof n?n:i(+n),p(),x):y},x},n.forceManyBody=function(){var n,r,e,o,f,a=i(-30),c=1,l=1/0,h=.81;function v(e){var i,u=n.length,f=t.quadtree(n,y,d).visitAfter(g);for(o=e,i=0;i<u;++i)r=n[i],f.visit(s)}function x(){if(n){var t,r,e=n.length;for(f=new Array(e),t=0;t<e;++t)r=n[t],f[r.index]=+a(r,t,n)}}function g(n){var t,r,e,i,u,o=0,a=0;if(n.length){for(e=i=u=0;u<4;++u)(t=n[u])&&(r=Math.abs(t.value))&&(o+=t.value,a+=r,e+=r*t.x,i+=r*t.y);n.x=e/a,n.y=i/a}else{(t=n).x=t.data.x,t.y=t.data.y;do{o+=f[t.data.index]}while(t=t.next)}n.value=o}function s(n,t,i,a){if(!n.value)return!0;var v=n.x-r.x,y=n.y-r.y,d=a-t,x=v*v+y*y;if(d*d/h<x)return x<l&&(0===v&&(x+=(v=u(e))*v),0===y&&(x+=(y=u(e))*y),x<c&&(x=Math.sqrt(c*x)),r.vx+=v*n.value*o/x,r.vy+=y*n.value*o/x),!0;if(!(n.length||x>=l)){(n.data!==r||n.next)&&(0===v&&(x+=(v=u(e))*v),0===y&&(x+=(y=u(e))*y),x<c&&(x=Math.sqrt(c*x)));do{n.data!==r&&(d=f[n.data.index]*o/x,r.vx+=v*d,r.vy+=y*d)}while(n=n.next)}}return v.initialize=function(t,r){n=t,e=r,x()},v.strength=function(n){return arguments.length?(a="function"==typeof n?n:i(+n),x(),v):a},v.distanceMin=function(n){return arguments.length?(c=n*n,v):Math.sqrt(c)},v.distanceMax=function(n){return arguments.length?(l=n*n,v):Math.sqrt(l)},v.theta=function(n){return arguments.length?(h=n*n,v):Math.sqrt(h)},v},n.forceRadial=function(n,t,r){var e,u,o,f=i(.1);function a(n){for(var i=0,f=e.length;i<f;++i){var a=e[i],c=a.x-t||1e-6,l=a.y-r||1e-6,h=Math.sqrt(c*c+l*l),v=(o[i]-h)*u[i]*n/h;a.vx+=c*v,a.vy+=l*v}}function c(){if(e){var t,r=e.length;for(u=new Array(r),o=new Array(r),t=0;t<r;++t)o[t]=+n(e[t],t,e),u[t]=isNaN(o[t])?0:+f(e[t],t,e)}}return"function"!=typeof n&&(n=i(+n)),null==t&&(t=0),null==r&&(r=0),a.initialize=function(n){e=n,c()},a.strength=function(n){return arguments.length?(f="function"==typeof n?n:i(+n),c(),a):f},a.radius=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),c(),a):n},a.x=function(n){return arguments.length?(t=+n,a):t},a.y=function(n){return arguments.length?(r=+n,a):r},a},n.forceSimulation=function(n){var t,i=1,u=.001,o=1-Math.pow(u,1/300),f=0,a=.6,c=new Map,y=e.timer(p),d=r.dispatch("tick","end"),s=function(){let n=1;return()=>(n=(l*n+h)%v)/v}();function p(){M(),d.call("tick",t),i<u&&(y.stop(),d.call("end",t))}function M(r){var e,u,l=n.length;void 0===r&&(r=1);for(var h=0;h<r;++h)for(i+=(f-i)*o,c.forEach(function(n){n(i)}),e=0;e<l;++e)null==(u=n[e]).fx?u.x+=u.vx*=a:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=a:(u.y=u.fy,u.vy=0);return t}function w(){for(var t,r=0,e=n.length;r<e;++r){if((t=n[r]).index=r,null!=t.fx&&(t.x=t.fx),null!=t.fy&&(t.y=t.fy),isNaN(t.x)||isNaN(t.y)){var i=x*Math.sqrt(.5+r),u=r*g;t.x=i*Math.cos(u),t.y=i*Math.sin(u)}(isNaN(t.vx)||isNaN(t.vy))&&(t.vx=t.vy=0)}}function q(t){return t.initialize&&t.initialize(n,s),t}return null==n&&(n=[]),w(),t={tick:M,restart:function(){return y.restart(p),t},stop:function(){return y.stop(),t},nodes:function(r){return arguments.length?(n=r,w(),c.forEach(q),t):n},alpha:function(n){return arguments.length?(i=+n,t):i},alphaMin:function(n){return arguments.length?(u=+n,t):u},alphaDecay:function(n){return arguments.length?(o=+n,t):+o},alphaTarget:function(n){return arguments.length?(f=+n,t):f},velocityDecay:function(n){return arguments.length?(a=1-n,t):1-a},randomSource:function(n){return arguments.length?(s=n,c.forEach(q),t):s},force:function(n,r){return arguments.length>1?(null==r?c.delete(n):c.set(n,q(r)),t):c.get(n)},find:function(t,r,e){var i,u,o,f,a,c=0,l=n.length;for(null==e?e=1/0:e*=e,c=0;c<l;++c)(o=(i=t-(f=n[c]).x)*i+(u=r-f.y)*u)<e&&(a=f,e=o);return a},on:function(n,r){return arguments.length>1?(d.on(n,r),t):d.on(n)}}},n.forceX=function(n){var t,r,e,u=i(.1);function o(n){for(var i,u=0,o=t.length;u<o;++u)(i=t[u]).vx+=(e[u]-i.x)*r[u]*n}function f(){if(t){var i,o=t.length;for(r=new Array(o),e=new Array(o),i=0;i<o;++i)r[i]=isNaN(e[i]=+n(t[i],i,t))?0:+u(t[i],i,t)}}return"function"!=typeof n&&(n=i(null==n?0:+n)),o.initialize=function(n){t=n,f()},o.strength=function(n){return arguments.length?(u="function"==typeof n?n:i(+n),f(),o):u},o.x=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),f(),o):n},o},n.forceY=function(n){var t,r,e,u=i(.1);function o(n){for(var i,u=0,o=t.length;u<o;++u)(i=t[u]).vy+=(e[u]-i.y)*r[u]*n}function f(){if(t){var i,o=t.length;for(r=new Array(o),e=new Array(o),i=0;i<o;++i)r[i]=isNaN(e[i]=+n(t[i],i,t))?0:+u(t[i],i,t)}}return"function"!=typeof n&&(n=i(null==n?0:+n)),o.initialize=function(n){t=n,f()},o.strength=function(n){return arguments.length?(u="function"==typeof n?n:i(+n),f(),o):u},o.y=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),f(),o):n},o},Object.defineProperty(n,"__esModule",{value:!0})}); diff --git a/node_modules/d3-force/package.json b/node_modules/d3-force/package.json deleted file mode 100644 index fa35ca9e3337d11784236327594c50b404d80c12..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_from": "d3-force@2", - "_id": "d3-force@2.1.1", - "_inBundle": false, - "_integrity": "sha512-nAuHEzBqMvpFVMf9OX75d00OxvOXdxY+xECIXjW6Gv8BRrXu6gAWbv/9XKrvfJ5i5DCokDW7RYE50LRoK092ew==", - "_location": "/d3-force", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-force@2", - "name": "d3-force", - "escapedName": "d3-force", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3" - ], - "_resolved": "https://registry.npmjs.org/d3-force/-/d3-force-2.1.1.tgz", - "_shasum": "f20ccbf1e6c9e80add1926f09b51f686a8bc0937", - "_spec": "d3-force@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-force/issues" - }, - "bundleDependencies": false, - "dependencies": { - "d3-dispatch": "1 - 2", - "d3-quadtree": "1 - 2", - "d3-timer": "1 - 2" - }, - "deprecated": false, - "description": "Force-directed graph layout using velocity Verlet integration.", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "src/**/*.js", - "dist/**/*.js" - ], - "homepage": "https://d3js.org/d3-force/", - "jsdelivr": "dist/d3-force.min.js", - "keywords": [ - "d3", - "d3-module", - "layout", - "network", - "graph", - "force", - "verlet", - "infovis" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-force.js", - "module": "src/index.js", - "name": "d3-force", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-force.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src" - }, - "sideEffects": false, - "unpkg": "dist/d3-force.min.js", - "version": "2.1.1" -} diff --git a/node_modules/d3-force/src/center.js b/node_modules/d3-force/src/center.js deleted file mode 100644 index 280d3e41049698be3c0108ff41a111dde3a01af2..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/src/center.js +++ /dev/null @@ -1,40 +0,0 @@ -export default function(x, y) { - var nodes, strength = 1; - - if (x == null) x = 0; - if (y == null) y = 0; - - function force() { - var i, - n = nodes.length, - node, - sx = 0, - sy = 0; - - for (i = 0; i < n; ++i) { - node = nodes[i], sx += node.x, sy += node.y; - } - - for (sx = (sx / n - x) * strength, sy = (sy / n - y) * strength, i = 0; i < n; ++i) { - node = nodes[i], node.x -= sx, node.y -= sy; - } - } - - force.initialize = function(_) { - nodes = _; - }; - - force.x = function(_) { - return arguments.length ? (x = +_, force) : x; - }; - - force.y = function(_) { - return arguments.length ? (y = +_, force) : y; - }; - - force.strength = function(_) { - return arguments.length ? (strength = +_, force) : strength; - }; - - return force; -} diff --git a/node_modules/d3-force/src/collide.js b/node_modules/d3-force/src/collide.js deleted file mode 100644 index 8ebd8d91c966a1a97a953c60563c94fb203e0258..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/src/collide.js +++ /dev/null @@ -1,100 +0,0 @@ -import {quadtree} from "d3-quadtree"; -import constant from "./constant.js"; -import jiggle from "./jiggle.js"; - -function x(d) { - return d.x + d.vx; -} - -function y(d) { - return d.y + d.vy; -} - -export default function(radius) { - var nodes, - radii, - random, - strength = 1, - iterations = 1; - - if (typeof radius !== "function") radius = constant(radius == null ? 1 : +radius); - - function force() { - var i, n = nodes.length, - tree, - node, - xi, - yi, - ri, - ri2; - - for (var k = 0; k < iterations; ++k) { - tree = quadtree(nodes, x, y).visitAfter(prepare); - for (i = 0; i < n; ++i) { - node = nodes[i]; - ri = radii[node.index], ri2 = ri * ri; - xi = node.x + node.vx; - yi = node.y + node.vy; - tree.visit(apply); - } - } - - function apply(quad, x0, y0, x1, y1) { - var data = quad.data, rj = quad.r, r = ri + rj; - if (data) { - if (data.index > node.index) { - var x = xi - data.x - data.vx, - y = yi - data.y - data.vy, - l = x * x + y * y; - if (l < r * r) { - if (x === 0) x = jiggle(random), l += x * x; - if (y === 0) y = jiggle(random), l += y * y; - l = (r - (l = Math.sqrt(l))) / l * strength; - node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj)); - node.vy += (y *= l) * r; - data.vx -= x * (r = 1 - r); - data.vy -= y * r; - } - } - return; - } - return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r; - } - } - - function prepare(quad) { - if (quad.data) return quad.r = radii[quad.data.index]; - for (var i = quad.r = 0; i < 4; ++i) { - if (quad[i] && quad[i].r > quad.r) { - quad.r = quad[i].r; - } - } - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length, node; - radii = new Array(n); - for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes); - } - - force.initialize = function(_nodes, _random) { - nodes = _nodes; - random = _random; - initialize(); - }; - - force.iterations = function(_) { - return arguments.length ? (iterations = +_, force) : iterations; - }; - - force.strength = function(_) { - return arguments.length ? (strength = +_, force) : strength; - }; - - force.radius = function(_) { - return arguments.length ? (radius = typeof _ === "function" ? _ : constant(+_), initialize(), force) : radius; - }; - - return force; -} diff --git a/node_modules/d3-force/src/constant.js b/node_modules/d3-force/src/constant.js deleted file mode 100644 index b7d42e711c01cced1274e5dd70a461a3c0073b77..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/src/constant.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(x) { - return function() { - return x; - }; -} diff --git a/node_modules/d3-force/src/index.js b/node_modules/d3-force/src/index.js deleted file mode 100644 index a76c1c49cd8e3b48797bf3171564839d964c1021..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/src/index.js +++ /dev/null @@ -1,8 +0,0 @@ -export {default as forceCenter} from "./center.js"; -export {default as forceCollide} from "./collide.js"; -export {default as forceLink} from "./link.js"; -export {default as forceManyBody} from "./manyBody.js"; -export {default as forceRadial} from "./radial.js"; -export {default as forceSimulation} from "./simulation.js"; -export {default as forceX} from "./x.js"; -export {default as forceY} from "./y.js"; diff --git a/node_modules/d3-force/src/jiggle.js b/node_modules/d3-force/src/jiggle.js deleted file mode 100644 index 00752b9f5bd3187b644af71ccdf2e4b217651841..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/src/jiggle.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(random) { - return (random() - 0.5) * 1e-6; -} diff --git a/node_modules/d3-force/src/lcg.js b/node_modules/d3-force/src/lcg.js deleted file mode 100644 index a13cf79e689aa44551ad9cff1e31e6a2e73c42c5..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/src/lcg.js +++ /dev/null @@ -1,9 +0,0 @@ -// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use -const a = 1664525; -const c = 1013904223; -const m = 4294967296; // 2^32 - -export default function() { - let s = 1; - return () => (s = (a * s + c) % m) / m; -} diff --git a/node_modules/d3-force/src/link.js b/node_modules/d3-force/src/link.js deleted file mode 100644 index df6afa695a57897f7d30bcb4a3811675276b206e..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/src/link.js +++ /dev/null @@ -1,117 +0,0 @@ -import constant from "./constant.js"; -import jiggle from "./jiggle.js"; - -function index(d) { - return d.index; -} - -function find(nodeById, nodeId) { - var node = nodeById.get(nodeId); - if (!node) throw new Error("node not found: " + nodeId); - return node; -} - -export default function(links) { - var id = index, - strength = defaultStrength, - strengths, - distance = constant(30), - distances, - nodes, - count, - bias, - random, - iterations = 1; - - if (links == null) links = []; - - function defaultStrength(link) { - return 1 / Math.min(count[link.source.index], count[link.target.index]); - } - - function force(alpha) { - for (var k = 0, n = links.length; k < iterations; ++k) { - for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) { - link = links[i], source = link.source, target = link.target; - x = target.x + target.vx - source.x - source.vx || jiggle(random); - y = target.y + target.vy - source.y - source.vy || jiggle(random); - l = Math.sqrt(x * x + y * y); - l = (l - distances[i]) / l * alpha * strengths[i]; - x *= l, y *= l; - target.vx -= x * (b = bias[i]); - target.vy -= y * b; - source.vx += x * (b = 1 - b); - source.vy += y * b; - } - } - } - - function initialize() { - if (!nodes) return; - - var i, - n = nodes.length, - m = links.length, - nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])), - link; - - for (i = 0, count = new Array(n); i < m; ++i) { - link = links[i], link.index = i; - if (typeof link.source !== "object") link.source = find(nodeById, link.source); - if (typeof link.target !== "object") link.target = find(nodeById, link.target); - count[link.source.index] = (count[link.source.index] || 0) + 1; - count[link.target.index] = (count[link.target.index] || 0) + 1; - } - - for (i = 0, bias = new Array(m); i < m; ++i) { - link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]); - } - - strengths = new Array(m), initializeStrength(); - distances = new Array(m), initializeDistance(); - } - - function initializeStrength() { - if (!nodes) return; - - for (var i = 0, n = links.length; i < n; ++i) { - strengths[i] = +strength(links[i], i, links); - } - } - - function initializeDistance() { - if (!nodes) return; - - for (var i = 0, n = links.length; i < n; ++i) { - distances[i] = +distance(links[i], i, links); - } - } - - force.initialize = function(_nodes, _random) { - nodes = _nodes; - random = _random; - initialize(); - }; - - force.links = function(_) { - return arguments.length ? (links = _, initialize(), force) : links; - }; - - force.id = function(_) { - return arguments.length ? (id = _, force) : id; - }; - - force.iterations = function(_) { - return arguments.length ? (iterations = +_, force) : iterations; - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initializeStrength(), force) : strength; - }; - - force.distance = function(_) { - return arguments.length ? (distance = typeof _ === "function" ? _ : constant(+_), initializeDistance(), force) : distance; - }; - - return force; -} diff --git a/node_modules/d3-force/src/manyBody.js b/node_modules/d3-force/src/manyBody.js deleted file mode 100644 index 746a0d00983ffc020a98c1d7d817eceec5b0219f..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/src/manyBody.js +++ /dev/null @@ -1,116 +0,0 @@ -import {quadtree} from "d3-quadtree"; -import constant from "./constant.js"; -import jiggle from "./jiggle.js"; -import {x, y} from "./simulation.js"; - -export default function() { - var nodes, - node, - random, - alpha, - strength = constant(-30), - strengths, - distanceMin2 = 1, - distanceMax2 = Infinity, - theta2 = 0.81; - - function force(_) { - var i, n = nodes.length, tree = quadtree(nodes, x, y).visitAfter(accumulate); - for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply); - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length, node; - strengths = new Array(n); - for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes); - } - - function accumulate(quad) { - var strength = 0, q, c, weight = 0, x, y, i; - - // For internal nodes, accumulate forces from child quadrants. - if (quad.length) { - for (x = y = i = 0; i < 4; ++i) { - if ((q = quad[i]) && (c = Math.abs(q.value))) { - strength += q.value, weight += c, x += c * q.x, y += c * q.y; - } - } - quad.x = x / weight; - quad.y = y / weight; - } - - // For leaf nodes, accumulate forces from coincident quadrants. - else { - q = quad; - q.x = q.data.x; - q.y = q.data.y; - do strength += strengths[q.data.index]; - while (q = q.next); - } - - quad.value = strength; - } - - function apply(quad, x1, _, x2) { - if (!quad.value) return true; - - var x = quad.x - node.x, - y = quad.y - node.y, - w = x2 - x1, - l = x * x + y * y; - - // Apply the Barnes-Hut approximation if possible. - // Limit forces for very close nodes; randomize direction if coincident. - if (w * w / theta2 < l) { - if (l < distanceMax2) { - if (x === 0) x = jiggle(random), l += x * x; - if (y === 0) y = jiggle(random), l += y * y; - if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); - node.vx += x * quad.value * alpha / l; - node.vy += y * quad.value * alpha / l; - } - return true; - } - - // Otherwise, process points directly. - else if (quad.length || l >= distanceMax2) return; - - // Limit forces for very close nodes; randomize direction if coincident. - if (quad.data !== node || quad.next) { - if (x === 0) x = jiggle(random), l += x * x; - if (y === 0) y = jiggle(random), l += y * y; - if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); - } - - do if (quad.data !== node) { - w = strengths[quad.data.index] * alpha / l; - node.vx += x * w; - node.vy += y * w; - } while (quad = quad.next); - } - - force.initialize = function(_nodes, _random) { - nodes = _nodes; - random = _random; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; - }; - - force.distanceMin = function(_) { - return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2); - }; - - force.distanceMax = function(_) { - return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2); - }; - - force.theta = function(_) { - return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2); - }; - - return force; -} diff --git a/node_modules/d3-force/src/radial.js b/node_modules/d3-force/src/radial.js deleted file mode 100644 index 609516bfb160382b22a7675b0f44298e520cf8be..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/src/radial.js +++ /dev/null @@ -1,57 +0,0 @@ -import constant from "./constant.js"; - -export default function(radius, x, y) { - var nodes, - strength = constant(0.1), - strengths, - radiuses; - - if (typeof radius !== "function") radius = constant(+radius); - if (x == null) x = 0; - if (y == null) y = 0; - - function force(alpha) { - for (var i = 0, n = nodes.length; i < n; ++i) { - var node = nodes[i], - dx = node.x - x || 1e-6, - dy = node.y - y || 1e-6, - r = Math.sqrt(dx * dx + dy * dy), - k = (radiuses[i] - r) * strengths[i] * alpha / r; - node.vx += dx * k; - node.vy += dy * k; - } - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - radiuses = new Array(n); - for (i = 0; i < n; ++i) { - radiuses[i] = +radius(nodes[i], i, nodes); - strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes); - } - } - - force.initialize = function(_) { - nodes = _, initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; - }; - - force.radius = function(_) { - return arguments.length ? (radius = typeof _ === "function" ? _ : constant(+_), initialize(), force) : radius; - }; - - force.x = function(_) { - return arguments.length ? (x = +_, force) : x; - }; - - force.y = function(_) { - return arguments.length ? (y = +_, force) : y; - }; - - return force; -} diff --git a/node_modules/d3-force/src/simulation.js b/node_modules/d3-force/src/simulation.js deleted file mode 100644 index 7a1ff823365e8a96f50e74c286c1c60d845fc376..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/src/simulation.js +++ /dev/null @@ -1,156 +0,0 @@ -import {dispatch} from "d3-dispatch"; -import {timer} from "d3-timer"; -import lcg from "./lcg.js"; - -export function x(d) { - return d.x; -} - -export function y(d) { - return d.y; -} - -var initialRadius = 10, - initialAngle = Math.PI * (3 - Math.sqrt(5)); - -export default function(nodes) { - var simulation, - alpha = 1, - alphaMin = 0.001, - alphaDecay = 1 - Math.pow(alphaMin, 1 / 300), - alphaTarget = 0, - velocityDecay = 0.6, - forces = new Map(), - stepper = timer(step), - event = dispatch("tick", "end"), - random = lcg(); - - if (nodes == null) nodes = []; - - function step() { - tick(); - event.call("tick", simulation); - if (alpha < alphaMin) { - stepper.stop(); - event.call("end", simulation); - } - } - - function tick(iterations) { - var i, n = nodes.length, node; - - if (iterations === undefined) iterations = 1; - - for (var k = 0; k < iterations; ++k) { - alpha += (alphaTarget - alpha) * alphaDecay; - - forces.forEach(function(force) { - force(alpha); - }); - - for (i = 0; i < n; ++i) { - node = nodes[i]; - if (node.fx == null) node.x += node.vx *= velocityDecay; - else node.x = node.fx, node.vx = 0; - if (node.fy == null) node.y += node.vy *= velocityDecay; - else node.y = node.fy, node.vy = 0; - } - } - - return simulation; - } - - function initializeNodes() { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.index = i; - if (node.fx != null) node.x = node.fx; - if (node.fy != null) node.y = node.fy; - if (isNaN(node.x) || isNaN(node.y)) { - var radius = initialRadius * Math.sqrt(0.5 + i), angle = i * initialAngle; - node.x = radius * Math.cos(angle); - node.y = radius * Math.sin(angle); - } - if (isNaN(node.vx) || isNaN(node.vy)) { - node.vx = node.vy = 0; - } - } - } - - function initializeForce(force) { - if (force.initialize) force.initialize(nodes, random); - return force; - } - - initializeNodes(); - - return simulation = { - tick: tick, - - restart: function() { - return stepper.restart(step), simulation; - }, - - stop: function() { - return stepper.stop(), simulation; - }, - - nodes: function(_) { - return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes; - }, - - alpha: function(_) { - return arguments.length ? (alpha = +_, simulation) : alpha; - }, - - alphaMin: function(_) { - return arguments.length ? (alphaMin = +_, simulation) : alphaMin; - }, - - alphaDecay: function(_) { - return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay; - }, - - alphaTarget: function(_) { - return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget; - }, - - velocityDecay: function(_) { - return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay; - }, - - randomSource: function(_) { - return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random; - }, - - force: function(name, _) { - return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name); - }, - - find: function(x, y, radius) { - var i = 0, - n = nodes.length, - dx, - dy, - d2, - node, - closest; - - if (radius == null) radius = Infinity; - else radius *= radius; - - for (i = 0; i < n; ++i) { - node = nodes[i]; - dx = x - node.x; - dy = y - node.y; - d2 = dx * dx + dy * dy; - if (d2 < radius) closest = node, radius = d2; - } - - return closest; - }, - - on: function(name, _) { - return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name); - } - }; -} diff --git a/node_modules/d3-force/src/x.js b/node_modules/d3-force/src/x.js deleted file mode 100644 index 2e7a821934f1d75213d6359e6477a7e1820c6298..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/src/x.js +++ /dev/null @@ -1,41 +0,0 @@ -import constant from "./constant.js"; - -export default function(x) { - var strength = constant(0.1), - nodes, - strengths, - xz; - - if (typeof x !== "function") x = constant(x == null ? 0 : +x); - - function force(alpha) { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha; - } - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - xz = new Array(n); - for (i = 0; i < n; ++i) { - strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); - } - } - - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; - }; - - force.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : constant(+_), initialize(), force) : x; - }; - - return force; -} diff --git a/node_modules/d3-force/src/y.js b/node_modules/d3-force/src/y.js deleted file mode 100644 index 5fcde6760ef9384a0cd5486fdbed29782276dbc7..0000000000000000000000000000000000000000 --- a/node_modules/d3-force/src/y.js +++ /dev/null @@ -1,41 +0,0 @@ -import constant from "./constant.js"; - -export default function(y) { - var strength = constant(0.1), - nodes, - strengths, - yz; - - if (typeof y !== "function") y = constant(y == null ? 0 : +y); - - function force(alpha) { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha; - } - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - yz = new Array(n); - for (i = 0; i < n; ++i) { - strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); - } - } - - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant(+_), initialize(), force) : strength; - }; - - force.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : constant(+_), initialize(), force) : y; - }; - - return force; -} diff --git a/node_modules/d3-format/LICENSE b/node_modules/d3-format/LICENSE deleted file mode 100644 index 4f0b022ceefd39f1f270bce414220b2aa51faff5..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2015 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-format/README.md b/node_modules/d3-format/README.md deleted file mode 100644 index 1038a43539fd95c82ac49d4582ac72ebcdb3f891..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/README.md +++ /dev/null @@ -1,343 +0,0 @@ -# d3-format - -Ever noticed how sometimes JavaScript doesn’t display numbers the way you expect? Like, you tried to print tenths with a simple loop: - -```js -for (var i = 0; i < 10; i++) { - console.log(0.1 * i); -} -``` - -And you got this: - -```js -0 -0.1 -0.2 -0.30000000000000004 -0.4 -0.5 -0.6000000000000001 -0.7000000000000001 -0.8 -0.9 -``` - -Welcome to [binary floating point](https://en.wikipedia.org/wiki/Double-precision_floating-point_format)! ಠ_ಠ- -Yet rounding error is not the only reason to customize number formatting. A table of numbers should be formatted consistently for comparison; above, 0.0 would be better than 0. Large numbers should have grouped digits (e.g., 42,000) or be in scientific or metric notation (4.2e+4, 42k). Currencies should have fixed precision ($3.50). Reported numerical results should be rounded to significant digits (4021 becomes 4000). Number formats should appropriate to the reader’s locale (42.000,00 or 42,000.00). The list goes on. - -Formatting numbers for human consumption is the purpose of d3-format, which is modeled after Python 3’s [format specification mini-language](https://docs.python.org/3/library/string.html#format-specification-mini-language) ([PEP 3101](https://www.python.org/dev/peps/pep-3101/)). Revisiting the example above: - -```js -var f = d3.format(".1f"); -for (var i = 0; i < 10; i++) { - console.log(f(0.1 * i)); -} -``` - -Now you get this: - -```js -0.0 -0.1 -0.2 -0.3 -0.4 -0.5 -0.6 -0.7 -0.8 -0.9 -``` - -But d3-format is much more than an alias for [number.toFixed](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toFixed)! A few more examples: - -```js -d3.format(".0%")(0.123); // rounded percentage, "12%" -d3.format("($.2f")(-3.5); // localized fixed-point currency, "(£3.50)" -d3.format("+20")(42); // space-filled and signed, " +42" -d3.format(".^20")(42); // dot-filled and centered, ".........42........." -d3.format(".2s")(42e6); // SI-prefix with two significant digits, "42M" -d3.format("#x")(48879); // prefixed lowercase hexadecimal, "0xbeef" -d3.format(",.2r")(4223); // grouped thousands with two significant digits, "4,200" -``` - -See [*locale*.format](#locale_format) for a detailed specification, and try running [d3.formatSpecifier](#formatSpecifier) on the above formats to decode their meaning. - -## Installing - -If you use NPM, `npm install d3-format`. Otherwise, download the [latest release](https://github.com/d3/d3-format/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-format.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-format.v2.min.js"></script> -<script> - -var format = d3.format(".2s"); - -</script> -``` - -Locale files are published to npm and can be loaded using [d3.json](https://github.com/d3/d3-request/blob/master/README.md#json). For example, to set Russian as the default locale: - -```js -d3.json("https://cdn.jsdelivr.net/npm/d3-format@2/locale/ru-RU.json", function(error, locale) { - if (error) throw error; - - d3.formatDefaultLocale(locale); - - var format = d3.format("$,"); - - console.log(format(1234.56)); // 1 234,56 руб. -}); -``` - -[Try d3-format in your browser.](https://observablehq.com/@d3/d3-format) - -## API Reference - -<a name="format" href="#format">#</a> d3.<b>format</b>(<i>specifier</i>) [<>](https://github.com/d3/d3-format/blob/master/src/defaultLocale.js#L4 "Source") - -An alias for [*locale*.format](#locale_format) on the [default locale](#formatDefaultLocale). - -<a name="formatPrefix" href="#formatPrefix">#</a> d3.<b>formatPrefix</b>(<i>specifier</i>, <i>value</i>) [<>](https://github.com/d3/d3-format/blob/master/src/defaultLocale.js#L5 "Source") - -An alias for [*locale*.formatPrefix](#locale_formatPrefix) on the [default locale](#formatDefaultLocale). - -<a name="locale_format" href="#locale_format">#</a> <i>locale</i>.<b>format</b>(<i>specifier</i>) [<>](https://github.com/d3/d3-format/blob/master/src/locale.js#L18 "Source") - -Returns a new format function for the given string *specifier*. The returned function takes a number as the only argument, and returns a string representing the formatted number. The general form of a specifier is: - -``` -[​[fill]align][sign][symbol][0][width][,][.precision][~][type] -``` - -The *fill* can be any character. The presence of a fill character is signaled by the *align* character following it, which must be one of the following: - -* `>` - Forces the field to be right-aligned within the available space. (Default behavior). -* `<` - Forces the field to be left-aligned within the available space. -* `^` - Forces the field to be centered within the available space. -* `=` - like `>`, but with any sign and symbol to the left of any padding. - -The *sign* can be: - -* `-` - nothing for zero or positive and a minus sign for negative. (Default behavior.) -* `+` - a plus sign for zero or positive and a minus sign for negative. -* `(` - nothing for zero or positive and parentheses for negative. -* ` ` (space) - a space for zero or positive and a minus sign for negative. - -The *symbol* can be: - -* `$` - apply currency symbols per the locale definition. -* `#` - for binary, octal, or hexadecimal notation, prefix by `0b`, `0o`, or `0x`, respectively. - -The *zero* (`0`) option enables zero-padding; this implicitly sets *fill* to `0` and *align* to `=`. The *width* defines the minimum field width; if not specified, then the width will be determined by the content. The *comma* (`,`) option enables the use of a group separator, such as a comma for thousands. - -Depending on the *type*, the *precision* either indicates the number of digits that follow the decimal point (types `f` and `%`), or the number of significant digits (types `​`, `e`, `g`, `r`, `s` and `p`). If the precision is not specified, it defaults to 6 for all types except `​` (none), which defaults to 12. Precision is ignored for integer formats (types `b`, `o`, `d`, `x`, `X` and `c`). See [precisionFixed](#precisionFixed) and [precisionRound](#precisionRound) for help picking an appropriate precision. - -The `~` option trims insignificant trailing zeros across all format types. This is most commonly used in conjunction with types `r`, `e`, `s` and `%`. For example: - -```js -d3.format("s")(1500); // "1.50000k" -d3.format("~s")(1500); // "1.5k" -``` - -The available *type* values are: - -* `e` - exponent notation. -* `f` - fixed point notation. -* `g` - either decimal or exponent notation, rounded to significant digits. -* `r` - decimal notation, rounded to significant digits. -* `s` - decimal notation with an [SI prefix](#locale_formatPrefix), rounded to significant digits. -* `%` - multiply by 100, and then decimal notation with a percent sign. -* `p` - multiply by 100, round to significant digits, and then decimal notation with a percent sign. -* `b` - binary notation, rounded to integer. -* `o` - octal notation, rounded to integer. -* `d` - decimal notation, rounded to integer. -* `x` - hexadecimal notation, using lower-case letters, rounded to integer. -* `X` - hexadecimal notation, using upper-case letters, rounded to integer. -* `c` - converts the integer to the corresponding unicode character before printing. - -The type `​` (none) is also supported as shorthand for `~g` (with a default precision of 12 instead of 6), and the type `n` is shorthand for `,g`. For the `g`, `n` and `​` (none) types, decimal notation is used if the resulting string would have *precision* or fewer digits; otherwise, exponent notation is used. For example: - -```js -d3.format(".2")(42); // "42" -d3.format(".2")(4.2); // "4.2" -d3.format(".1")(42); // "4e+1" -d3.format(".1")(4.2); // "4" -``` - -<a name="locale_formatPrefix" href="#locale_formatPrefix">#</a> <i>locale</i>.<b>formatPrefix</b>(<i>specifier</i>, <i>value</i>) [<>](https://github.com/d3/d3-format/blob/master/src/locale.js#L127 "Source") - -Equivalent to [*locale*.format](#locale_format), except the returned function will convert values to the units of the appropriate [SI prefix](https://en.wikipedia.org/wiki/Metric_prefix#List_of_SI_prefixes) for the specified numeric reference *value* before formatting in fixed point notation. The following prefixes are supported: - -* `y` - yocto, 10â»Â²â´ -* `z` - zepto, 10â»Â²Â¹ -* `a` - atto, 10â»Â¹â¸ -* `f` - femto, 10â»Â¹âµ -* `p` - pico, 10â»Â¹Â² -* `n` - nano, 10â»â¹ -* `µ` - micro, 10â»â¶ -* `m` - milli, 10â»Â³ -* `​` (none) - 10â° -* `k` - kilo, 10³ -* `M` - mega, 10ⶠ-* `G` - giga, 10â¹ -* `T` - tera, 10¹² -* `P` - peta, 10¹ⵠ-* `E` - exa, 10¹⸠-* `Z` - zetta, 10²¹ -* `Y` - yotta, 10²ⴠ- -Unlike [*locale*.format](#locale_format) with the `s` format type, this method returns a formatter with a consistent SI prefix, rather than computing the prefix dynamically for each number. In addition, the *precision* for the given *specifier* represents the number of digits past the decimal point (as with `f` fixed point notation), not the number of significant digits. For example: - -```js -var f = d3.formatPrefix(",.0", 1e-6); -f(0.00042); // "420µ" -f(0.0042); // "4,200µ" -``` - -This method is useful when formatting multiple numbers in the same units for easy comparison. See [precisionPrefix](#precisionPrefix) for help picking an appropriate precision, and [bl.ocks.org/9764126](http://bl.ocks.org/mbostock/9764126) for an example. - -<a name="formatSpecifier" href="#formatSpecifier">#</a> d3.<b>formatSpecifier</b>(<i>specifier</i>) [<>](https://github.com/d3/d3-format/blob/master/src/formatSpecifier.js "Source") - -Parses the specified *specifier*, returning an object with exposed fields that correspond to the [format specification mini-language](#locale_format) and a toString method that reconstructs the specifier. For example, `formatSpecifier("s")` returns: - -```js -FormatSpecifier { - "fill": " ", - "align": ">", - "sign": "-", - "symbol": "", - "zero": false, - "width": undefined, - "comma": false, - "precision": undefined, - "trim": false, - "type": "s" -} -``` - -This method is useful for understanding how format specifiers are parsed and for deriving new specifiers. For example, you might compute an appropriate precision based on the numbers you want to format using [precisionFixed](#precisionFixed) and then create a new format: - -```js -var s = d3.formatSpecifier("f"); -s.precision = d3.precisionFixed(0.01); -var f = d3.format(s); -f(42); // "42.00"; -``` - -<a name="FormatSpecifier" href="#FormatSpecifier">#</a> new d3.<b>FormatSpecifier</b>(<i>specifier</i>) [<>](https://github.com/d3/d3-format/blob/master/src/formatSpecifier.js "Source") - -Given the specified *specifier* object, returning an object with exposed fields that correspond to the [format specification mini-language](#locale_format) and a toString method that reconstructs the specifier. For example, `new FormatSpecifier({type: "s"})` returns: - -```js -FormatSpecifier { - "fill": " ", - "align": ">", - "sign": "-", - "symbol": "", - "zero": false, - "width": undefined, - "comma": false, - "precision": undefined, - "trim": false, - "type": "s" -} -``` - -<a name="precisionFixed" href="#precisionFixed">#</a> d3.<b>precisionFixed</b>(<i>step</i>) [<>](https://github.com/d3/d3-format/blob/master/src/precisionFixed.js "Source") - -Returns a suggested decimal precision for fixed point notation given the specified numeric *step* value. The *step* represents the minimum absolute difference between values that will be formatted. (This assumes that the values to be formatted are also multiples of *step*.) For example, given the numbers 1, 1.5, and 2, the *step* should be 0.5 and the suggested precision is 1: - -```js -var p = d3.precisionFixed(0.5), - f = d3.format("." + p + "f"); -f(1); // "1.0" -f(1.5); // "1.5" -f(2); // "2.0" -``` - -Whereas for the numbers 1, 2 and 3, the *step* should be 1 and the suggested precision is 0: - -```js -var p = d3.precisionFixed(1), - f = d3.format("." + p + "f"); -f(1); // "1" -f(2); // "2" -f(3); // "3" -``` - -Note: for the `%` format type, subtract two: - -```js -var p = Math.max(0, d3.precisionFixed(0.05) - 2), - f = d3.format("." + p + "%"); -f(0.45); // "45%" -f(0.50); // "50%" -f(0.55); // "55%" -``` - -<a name="precisionPrefix" href="#precisionPrefix">#</a> d3.<b>precisionPrefix</b>(<i>step</i>, <i>value</i>) [<>](https://github.com/d3/d3-format/blob/master/src/precisionPrefix.js "Source") - -Returns a suggested decimal precision for use with [*locale*.formatPrefix](#locale_formatPrefix) given the specified numeric *step* and reference *value*. The *step* represents the minimum absolute difference between values that will be formatted, and *value* determines which SI prefix will be used. (This assumes that the values to be formatted are also multiples of *step*.) For example, given the numbers 1.1e6, 1.2e6, and 1.3e6, the *step* should be 1e5, the *value* could be 1.3e6, and the suggested precision is 1: - -```js -var p = d3.precisionPrefix(1e5, 1.3e6), - f = d3.formatPrefix("." + p, 1.3e6); -f(1.1e6); // "1.1M" -f(1.2e6); // "1.2M" -f(1.3e6); // "1.3M" -``` - -<a name="precisionRound" href="#precisionRound">#</a> d3.<b>precisionRound</b>(<i>step</i>, <i>max</i>) [<>](https://github.com/d3/d3-format/blob/master/src/precisionRound.js "Source") - -Returns a suggested decimal precision for format types that round to significant digits given the specified numeric *step* and *max* values. The *step* represents the minimum absolute difference between values that will be formatted, and the *max* represents the largest absolute value that will be formatted. (This assumes that the values to be formatted are also multiples of *step*.) For example, given the numbers 0.99, 1.0, and 1.01, the *step* should be 0.01, the *max* should be 1.01, and the suggested precision is 3: - -```js -var p = d3.precisionRound(0.01, 1.01), - f = d3.format("." + p + "r"); -f(0.99); // "0.990" -f(1.0); // "1.00" -f(1.01); // "1.01" -``` - -Whereas for the numbers 0.9, 1.0, and 1.1, the *step* should be 0.1, the *max* should be 1.1, and the suggested precision is 2: - -```js -var p = d3.precisionRound(0.1, 1.1), - f = d3.format("." + p + "r"); -f(0.9); // "0.90" -f(1.0); // "1.0" -f(1.1); // "1.1" -``` - -Note: for the `e` format type, subtract one: - -```js -var p = Math.max(0, d3.precisionRound(0.01, 1.01) - 1), - f = d3.format("." + p + "e"); -f(0.01); // "1.00e-2" -f(1.01); // "1.01e+0" -``` - -### Locales - -<a name="formatLocale" href="#formatLocale">#</a> d3.<b>formatLocale</b>(<i>definition</i>) [<>](https://github.com/d3/d3-format/blob/master/src/locale.js "Source") - -Returns a *locale* object for the specified *definition* with [*locale*.format](#locale_format) and [*locale*.formatPrefix](#locale_formatPrefix) methods. The *definition* must include the following properties: - -* `decimal` - the decimal point (e.g., `"."`). -* `thousands` - the group separator (e.g., `","`). -* `grouping` - the array of group sizes (e.g., `[3]`), cycled as needed. -* `currency` - the currency prefix and suffix (e.g., `["$", ""]`). -* `numerals` - optional; an array of ten strings to replace the numerals 0-9. -* `percent` - optional; the percent sign (defaults to `"%"`). -* `minus` - optional; the minus sign (defaults to `"−"`). -* `nan` - optional; the not-a-number value (defaults `"NaN"`). - -Note that the *thousands* property is a misnomer, as the grouping definition allows groups other than thousands. - -<a name="formatDefaultLocale" href="#formatDefaultLocale">#</a> d3.<b>formatDefaultLocale</b>(<i>definition</i>) [<>](https://github.com/d3/d3-format/blob/master/src/defaultLocale.js "Source") - -Equivalent to [d3.formatLocale](#formatLocale), except it also redefines [d3.format](#format) and [d3.formatPrefix](#formatPrefix) to the new locale’s [*locale*.format](#locale_format) and [*locale*.formatPrefix](#locale_formatPrefix). If you do not set a default locale, it defaults to [U.S. English](https://github.com/d3/d3-format/blob/master/locale/en-US.json). diff --git a/node_modules/d3-format/dist/d3-format.js b/node_modules/d3-format/dist/d3-format.js deleted file mode 100644 index 21b0a2c502f5c2d76bc6001cb48c508643581052..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/dist/d3-format.js +++ /dev/null @@ -1,343 +0,0 @@ -// https://d3js.org/d3-format/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.d3 = global.d3 || {})); -}(this, (function (exports) { 'use strict'; - -function formatDecimal(x) { - return Math.abs(x = Math.round(x)) >= 1e21 - ? x.toLocaleString("en").replace(/,/g, "") - : x.toString(10); -} - -// Computes the decimal coefficient and exponent of the specified number x with -// significant digits p, where x is positive and p is in [1, 21] or undefined. -// For example, formatDecimalParts(1.23) returns ["123", 0]. -function formatDecimalParts(x, p) { - if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity - var i, coefficient = x.slice(0, i); - - // The string returned by toExponential either has the form \d\.\d+e[-+]\d+ - // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3). - return [ - coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, - +x.slice(i + 1) - ]; -} - -function exponent(x) { - return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN; -} - -function formatGroup(grouping, thousands) { - return function(value, width) { - var i = value.length, - t = [], - j = 0, - g = grouping[0], - length = 0; - - while (i > 0 && g > 0) { - if (length + g + 1 > width) g = Math.max(1, width - length); - t.push(value.substring(i -= g, i + g)); - if ((length += g + 1) > width) break; - g = grouping[j = (j + 1) % grouping.length]; - } - - return t.reverse().join(thousands); - }; -} - -function formatNumerals(numerals) { - return function(value) { - return value.replace(/[0-9]/g, function(i) { - return numerals[+i]; - }); - }; -} - -// [[fill]align][sign][symbol][0][width][,][.precision][~][type] -var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; - -function formatSpecifier(specifier) { - if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier); - var match; - return new FormatSpecifier({ - fill: match[1], - align: match[2], - sign: match[3], - symbol: match[4], - zero: match[5], - width: match[6], - comma: match[7], - precision: match[8] && match[8].slice(1), - trim: match[9], - type: match[10] - }); -} - -formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof - -function FormatSpecifier(specifier) { - this.fill = specifier.fill === undefined ? " " : specifier.fill + ""; - this.align = specifier.align === undefined ? ">" : specifier.align + ""; - this.sign = specifier.sign === undefined ? "-" : specifier.sign + ""; - this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + ""; - this.zero = !!specifier.zero; - this.width = specifier.width === undefined ? undefined : +specifier.width; - this.comma = !!specifier.comma; - this.precision = specifier.precision === undefined ? undefined : +specifier.precision; - this.trim = !!specifier.trim; - this.type = specifier.type === undefined ? "" : specifier.type + ""; -} - -FormatSpecifier.prototype.toString = function() { - return this.fill - + this.align - + this.sign - + this.symbol - + (this.zero ? "0" : "") - + (this.width === undefined ? "" : Math.max(1, this.width | 0)) - + (this.comma ? "," : "") - + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0)) - + (this.trim ? "~" : "") - + this.type; -}; - -// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k. -function formatTrim(s) { - out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) { - switch (s[i]) { - case ".": i0 = i1 = i; break; - case "0": if (i0 === 0) i0 = i; i1 = i; break; - default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break; - } - } - return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s; -} - -var prefixExponent; - -function formatPrefixAuto(x, p) { - var d = formatDecimalParts(x, p); - if (!d) return x + ""; - var coefficient = d[0], - exponent = d[1], - i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, - n = coefficient.length; - return i === n ? coefficient - : i > n ? coefficient + new Array(i - n + 1).join("0") - : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) - : "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y! -} - -function formatRounded(x, p) { - var d = formatDecimalParts(x, p); - if (!d) return x + ""; - var coefficient = d[0], - exponent = d[1]; - return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient - : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) - : coefficient + new Array(exponent - coefficient.length + 2).join("0"); -} - -var formatTypes = { - "%": (x, p) => (x * 100).toFixed(p), - "b": (x) => Math.round(x).toString(2), - "c": (x) => x + "", - "d": formatDecimal, - "e": (x, p) => x.toExponential(p), - "f": (x, p) => x.toFixed(p), - "g": (x, p) => x.toPrecision(p), - "o": (x) => Math.round(x).toString(8), - "p": (x, p) => formatRounded(x * 100, p), - "r": formatRounded, - "s": formatPrefixAuto, - "X": (x) => Math.round(x).toString(16).toUpperCase(), - "x": (x) => Math.round(x).toString(16) -}; - -function identity(x) { - return x; -} - -var map = Array.prototype.map, - prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]; - -function formatLocale(locale) { - var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""), - currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "", - currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "", - decimal = locale.decimal === undefined ? "." : locale.decimal + "", - numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)), - percent = locale.percent === undefined ? "%" : locale.percent + "", - minus = locale.minus === undefined ? "−" : locale.minus + "", - nan = locale.nan === undefined ? "NaN" : locale.nan + ""; - - function newFormat(specifier) { - specifier = formatSpecifier(specifier); - - var fill = specifier.fill, - align = specifier.align, - sign = specifier.sign, - symbol = specifier.symbol, - zero = specifier.zero, - width = specifier.width, - comma = specifier.comma, - precision = specifier.precision, - trim = specifier.trim, - type = specifier.type; - - // The "n" type is an alias for ",g". - if (type === "n") comma = true, type = "g"; - - // The "" type, and any invalid type, is an alias for ".12~g". - else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = "g"; - - // If zero fill is specified, padding goes after sign and before digits. - if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "="; - - // Compute the prefix and suffix. - // For SI-prefix, the suffix is lazily computed. - var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", - suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : ""; - - // What format function should we use? - // Is this an integer type? - // Can this type generate exponential notation? - var formatType = formatTypes[type], - maybeSuffix = /[defgprs%]/.test(type); - - // Set the default precision if not specified, - // or clamp the specified precision to the supported range. - // For significant precision, it must be in [1, 21]. - // For fixed precision, it must be in [0, 20]. - precision = precision === undefined ? 6 - : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) - : Math.max(0, Math.min(20, precision)); - - function format(value) { - var valuePrefix = prefix, - valueSuffix = suffix, - i, n, c; - - if (type === "c") { - valueSuffix = formatType(value) + valueSuffix; - value = ""; - } else { - value = +value; - - // Determine the sign. -0 is not less than 0, but 1 / -0 is! - var valueNegative = value < 0 || 1 / value < 0; - - // Perform the initial formatting. - value = isNaN(value) ? nan : formatType(Math.abs(value), precision); - - // Trim insignificant zeros. - if (trim) value = formatTrim(value); - - // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign. - if (valueNegative && +value === 0 && sign !== "+") valueNegative = false; - - // Compute the prefix and suffix. - valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix; - valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : ""); - - // Break the formatted value into the integer “value†part that can be - // grouped, and fractional or exponential “suffix†part that is not. - if (maybeSuffix) { - i = -1, n = value.length; - while (++i < n) { - if (c = value.charCodeAt(i), 48 > c || c > 57) { - valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix; - value = value.slice(0, i); - break; - } - } - } - } - - // If the fill character is not "0", grouping is applied before padding. - if (comma && !zero) value = group(value, Infinity); - - // Compute the padding. - var length = valuePrefix.length + value.length + valueSuffix.length, - padding = length < width ? new Array(width - length + 1).join(fill) : ""; - - // If the fill character is "0", grouping is applied after padding. - if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = ""; - - // Reconstruct the final output based on the desired alignment. - switch (align) { - case "<": value = valuePrefix + value + valueSuffix + padding; break; - case "=": value = valuePrefix + padding + value + valueSuffix; break; - case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break; - default: value = padding + valuePrefix + value + valueSuffix; break; - } - - return numerals(value); - } - - format.toString = function() { - return specifier + ""; - }; - - return format; - } - - function formatPrefix(specifier, value) { - var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), - e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3, - k = Math.pow(10, -e), - prefix = prefixes[8 + e / 3]; - return function(value) { - return f(k * value) + prefix; - }; - } - - return { - format: newFormat, - formatPrefix: formatPrefix - }; -} - -var locale; - -defaultLocale({ - thousands: ",", - grouping: [3], - currency: ["$", ""] -}); - -function defaultLocale(definition) { - locale = formatLocale(definition); - exports.format = locale.format; - exports.formatPrefix = locale.formatPrefix; - return locale; -} - -function precisionFixed(step) { - return Math.max(0, -exponent(Math.abs(step))); -} - -function precisionPrefix(step, value) { - return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step))); -} - -function precisionRound(step, max) { - step = Math.abs(step), max = Math.abs(max) - step; - return Math.max(0, exponent(max) - exponent(step)) + 1; -} - -exports.FormatSpecifier = FormatSpecifier; -exports.formatDefaultLocale = defaultLocale; -exports.formatLocale = formatLocale; -exports.formatSpecifier = formatSpecifier; -exports.precisionFixed = precisionFixed; -exports.precisionPrefix = precisionPrefix; -exports.precisionRound = precisionRound; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/node_modules/d3-format/dist/d3-format.min.js b/node_modules/d3-format/dist/d3-format.min.js deleted file mode 100644 index f4460fd9b2eb885d5fc52b8d4a1a882295225860..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/dist/d3-format.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-format/ v2.0.0 Copyright 2020 Mike Bostock -!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{})}(this,(function(t){"use strict";function i(t,i){if((n=(t=i?t.toExponential(i-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function n(t){return(t=i(Math.abs(t)))?t[1]:NaN}var r,e=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(t){if(!(i=e.exec(t)))throw new Error("invalid format: "+t);var i;return new a({fill:i[1],align:i[2],sign:i[3],symbol:i[4],zero:i[5],width:i[6],comma:i[7],precision:i[8]&&i[8].slice(1),trim:i[9],type:i[10]})}function a(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function s(t,n){var r=i(t,n);if(!r)return t+"";var e=r[0],o=r[1];return o<0?"0."+new Array(-o).join("0")+e:e.length>o+1?e.slice(0,o+1)+"."+e.slice(o+1):e+new Array(o-e.length+2).join("0")}o.prototype=a.prototype,a.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var c={"%":(t,i)=>(100*t).toFixed(i),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,i)=>t.toExponential(i),f:(t,i)=>t.toFixed(i),g:(t,i)=>t.toPrecision(i),o:t=>Math.round(t).toString(8),p:(t,i)=>s(100*t,i),r:s,s:function(t,n){var e=i(t,n);if(!e)return t+"";var o=e[0],a=e[1],s=a-(r=3*Math.max(-8,Math.min(8,Math.floor(a/3))))+1,c=o.length;return s===c?o:s>c?o+new Array(s-c+1).join("0"):s>0?o.slice(0,s)+"."+o.slice(s):"0."+new Array(1-s).join("0")+i(t,Math.max(0,n+s-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function h(t){return t}var l,u=Array.prototype.map,f=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function d(t){var i,e,a=void 0===t.grouping||void 0===t.thousands?h:(i=u.call(t.grouping,Number),e=t.thousands+"",function(t,n){for(var r=t.length,o=[],a=0,s=i[0],c=0;r>0&&s>0&&(c+s+1>n&&(s=Math.max(1,n-c)),o.push(t.substring(r-=s,r+s)),!((c+=s+1)>n));)s=i[a=(a+1)%i.length];return o.reverse().join(e)}),s=void 0===t.currency?"":t.currency[0]+"",l=void 0===t.currency?"":t.currency[1]+"",d=void 0===t.decimal?".":t.decimal+"",m=void 0===t.numerals?h:function(t){return function(i){return i.replace(/[0-9]/g,(function(i){return t[+i]}))}}(u.call(t.numerals,String)),p=void 0===t.percent?"%":t.percent+"",g=void 0===t.minus?"−":t.minus+"",v=void 0===t.nan?"NaN":t.nan+"";function M(t){var i=(t=o(t)).fill,n=t.align,e=t.sign,h=t.symbol,u=t.zero,M=t.width,y=t.comma,x=t.precision,b=t.trim,w=t.type;"n"===w?(y=!0,w="g"):c[w]||(void 0===x&&(x=12),b=!0,w="g"),(u||"0"===i&&"="===n)&&(u=!0,i="0",n="=");var S="$"===h?s:"#"===h&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",j="$"===h?l:/[%p]/.test(w)?p:"",k=c[w],z=/[defgprs%]/.test(w);function A(t){var o,s,c,h=S,l=j;if("c"===w)l=k(t)+l,t="";else{var p=(t=+t)<0||1/t<0;if(t=isNaN(t)?v:k(Math.abs(t),x),b&&(t=function(t){t:for(var i,n=t.length,r=1,e=-1;r<n;++r)switch(t[r]){case".":e=i=r;break;case"0":0===e&&(e=r),i=r;break;default:if(!+t[r])break t;e>0&&(e=0)}return e>0?t.slice(0,e)+t.slice(i+1):t}(t)),p&&0==+t&&"+"!==e&&(p=!1),h=(p?"("===e?e:g:"-"===e||"("===e?"":e)+h,l=("s"===w?f[8+r/3]:"")+l+(p&&"("===e?")":""),z)for(o=-1,s=t.length;++o<s;)if(48>(c=t.charCodeAt(o))||c>57){l=(46===c?d+t.slice(o+1):t.slice(o))+l,t=t.slice(0,o);break}}y&&!u&&(t=a(t,1/0));var A=h.length+t.length+l.length,N=A<M?new Array(M-A+1).join(i):"";switch(y&&u&&(t=a(N+t,N.length?M-l.length:1/0),N=""),n){case"<":t=h+t+l+N;break;case"=":t=h+N+t+l;break;case"^":t=N.slice(0,A=N.length>>1)+h+t+l+N.slice(A);break;default:t=N+h+t+l}return m(t)}return x=void 0===x?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x)),A.toString=function(){return t+""},A}return{format:M,formatPrefix:function(t,i){var r=M(((t=o(t)).type="f",t)),e=3*Math.max(-8,Math.min(8,Math.floor(n(i)/3))),a=Math.pow(10,-e),s=f[8+e/3];return function(t){return r(a*t)+s}}}}function m(i){return l=d(i),t.format=l.format,t.formatPrefix=l.formatPrefix,l}m({thousands:",",grouping:[3],currency:["$",""]}),t.FormatSpecifier=a,t.formatDefaultLocale=m,t.formatLocale=d,t.formatSpecifier=o,t.precisionFixed=function(t){return Math.max(0,-n(Math.abs(t)))},t.precisionPrefix=function(t,i){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(n(i)/3)))-n(Math.abs(t)))},t.precisionRound=function(t,i){return t=Math.abs(t),i=Math.abs(i)-t,Math.max(0,n(i)-n(t))+1},Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/node_modules/d3-format/locale/ar-001.json b/node_modules/d3-format/locale/ar-001.json deleted file mode 100644 index 0376eb9f3b8a9faeb826a9a435c9da187bf85064..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-001.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", ""], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-AE.json b/node_modules/d3-format/locale/ar-AE.json deleted file mode 100644 index a82730893e98d6f2a5a1bdd8e2659954fe67be6c..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-AE.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", " \u062f\u002e\u0625\u002e"], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-BH.json b/node_modules/d3-format/locale/ar-BH.json deleted file mode 100644 index 5f4e5dde161f432a0099970c129dee8a9df0f9ba..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-BH.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", " \u062f\u002e\u0628\u002e"], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-DJ.json b/node_modules/d3-format/locale/ar-DJ.json deleted file mode 100644 index b893ff0c6d4f9feda5fd0db0697ef95e05d022e5..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-DJ.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["\u200f\u0046\u0064\u006a ", ""], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-DZ.json b/node_modules/d3-format/locale/ar-DZ.json deleted file mode 100644 index e1438af1f566bfe62099ab752b00788e5103f744..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-DZ.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": "\u002c", - "thousands": "\u002e", - "grouping": [3], - "currency": ["\u062f\u002e\u062c\u002e ", ""] -} diff --git a/node_modules/d3-format/locale/ar-EG.json b/node_modules/d3-format/locale/ar-EG.json deleted file mode 100644 index 2b1ff3aada33b47504d11799e60c2d2043d9d485..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-EG.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", " \u062c\u002e\u0645\u002e"], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-EH.json b/node_modules/d3-format/locale/ar-EH.json deleted file mode 100644 index b33c32afc6de1ee3466af34efedf22b4846e698d..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-EH.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": "\u002e", - "thousands": "\u002c", - "grouping": [3], - "currency": ["\u062f\u002e\u0645\u002e ", ""] -} diff --git a/node_modules/d3-format/locale/ar-ER.json b/node_modules/d3-format/locale/ar-ER.json deleted file mode 100644 index b0f82bbe78bbe3d36d7ddedc9eb71abd2254b6d3..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-ER.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["\u004e\u0066\u006b ", ""], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-IL.json b/node_modules/d3-format/locale/ar-IL.json deleted file mode 100644 index ce15fb476fe820d79e6af22e1f1b4ac9eed8e100..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-IL.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["\u20aa ", ""], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-IQ.json b/node_modules/d3-format/locale/ar-IQ.json deleted file mode 100644 index a6c9b3faf077dd4a145606722023542bede7a970..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-IQ.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", " \u062f\u002e\u0639\u002e"], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-JO.json b/node_modules/d3-format/locale/ar-JO.json deleted file mode 100644 index 94df180b3cf2fdc295949dc00ce5bd7c3f881528..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-JO.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", " \u062f\u002e\u0623\u002e"], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-KM.json b/node_modules/d3-format/locale/ar-KM.json deleted file mode 100644 index 84dd81ad969a3fdd339d995cba5c74a10ed1b4a2..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-KM.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", " \u0641\u002e\u062c\u002e\u0642\u002e"], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-KW.json b/node_modules/d3-format/locale/ar-KW.json deleted file mode 100644 index b4018ab7e973b0b8a799eb6781ed16b01dc87180..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-KW.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", " \u062f\u002e\u0643\u002e"], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-LB.json b/node_modules/d3-format/locale/ar-LB.json deleted file mode 100644 index c732df33beec3699227b79c4341141aaadb8b193..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-LB.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", " \u0644\u002e\u0644\u002e"], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-LY.json b/node_modules/d3-format/locale/ar-LY.json deleted file mode 100644 index 431f230c7ee45b11f65fb0f6182803f88dddfd59..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-LY.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": "\u002c", - "thousands": "\u002e", - "grouping": [3], - "currency": ["\u062f\u002e\u0644\u002e ", ""] -} diff --git a/node_modules/d3-format/locale/ar-MA.json b/node_modules/d3-format/locale/ar-MA.json deleted file mode 100644 index abc0663b26fe6a2900cff0e7f41ba3e7a01db6e2..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-MA.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": "\u002c", - "thousands": "\u002e", - "grouping": [3], - "currency": ["\u062f\u002e\u0645\u002e ", ""] -} diff --git a/node_modules/d3-format/locale/ar-MR.json b/node_modules/d3-format/locale/ar-MR.json deleted file mode 100644 index 8d1f8c27dfd8990aeb85fd731d12a8034c484df9..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-MR.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", " \u0623\u002e\u0645\u002e"], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-OM.json b/node_modules/d3-format/locale/ar-OM.json deleted file mode 100644 index 04ad53adea8119cc2990c8cbf09313d0cc04f38e..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-OM.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", " \u0631\u002e\u0639\u002e"], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-PS.json b/node_modules/d3-format/locale/ar-PS.json deleted file mode 100644 index ce15fb476fe820d79e6af22e1f1b4ac9eed8e100..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-PS.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["\u20aa ", ""], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-QA.json b/node_modules/d3-format/locale/ar-QA.json deleted file mode 100644 index 94aef298b794c712da2ae866fb9cb05d3146a0f7..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-QA.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", " \u0631\u002e\u0642\u002e"], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-SA.json b/node_modules/d3-format/locale/ar-SA.json deleted file mode 100644 index 4d64227e5e067c8b83f9e328129120e64f5a1688..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-SA.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", " \u0631\u002e\u0633\u002e"], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-SD.json b/node_modules/d3-format/locale/ar-SD.json deleted file mode 100644 index 1ae41ae87f1eec6117ad5f209b113750bb05fb4c..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-SD.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", " \u062c\u002e\u0633\u002e"], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-SO.json b/node_modules/d3-format/locale/ar-SO.json deleted file mode 100644 index 143b46f6d6392f19de5f617a1f9eca481989f249..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-SO.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["\u200f\u0053 ", ""], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-SS.json b/node_modules/d3-format/locale/ar-SS.json deleted file mode 100644 index 03ca5b4a66bbe2bfc54422ee1904f976660f47e0..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-SS.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["\u00a3 ", ""], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-SY.json b/node_modules/d3-format/locale/ar-SY.json deleted file mode 100644 index 40263fbb7e2f3ee6aa1f71939f84c239b8cd3953..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-SY.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", " \u0644\u002e\u0633\u002e"], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-TD.json b/node_modules/d3-format/locale/ar-TD.json deleted file mode 100644 index 7bc36467a1b92d3a605d41855692b212b93d48e7..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-TD.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["\u200f\u0046\u0043\u0046\u0041 ", ""], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ar-TN.json b/node_modules/d3-format/locale/ar-TN.json deleted file mode 100644 index 16829aa54498a414819fc6defb32c8914a125e01..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-TN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": "\u002c", - "thousands": "\u002e", - "grouping": [3], - "currency": ["\u062f\u002e\u062a\u002e ", ""] -} diff --git a/node_modules/d3-format/locale/ar-YE.json b/node_modules/d3-format/locale/ar-YE.json deleted file mode 100644 index ed9f48e8a11e4acdc011955012c13eee96855ac0..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ar-YE.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": "\u066b", - "thousands": "\u066c", - "grouping": [3], - "currency": ["", " \u0631\u002e\u0649\u002e"], - "numerals" : ["\u0660", "\u0661", "\u0662", "\u0663", "\u0664", "\u0665", "\u0666", "\u0667", "\u0668", "\u0669"] -} diff --git a/node_modules/d3-format/locale/ca-ES.json b/node_modules/d3-format/locale/ca-ES.json deleted file mode 100644 index a2497624db79a2cbb5a793b86449c77499349ded..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ca-ES.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": ".", - "grouping": [3], - "currency": ["", "\u00a0€"] -} diff --git a/node_modules/d3-format/locale/cs-CZ.json b/node_modules/d3-format/locale/cs-CZ.json deleted file mode 100644 index 7ff40eb99c20f51a9f56ee713171d808a042e30b..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/cs-CZ.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": "\u00a0", - "grouping": [3], - "currency": ["", "\u00a0KÄ"] -} diff --git a/node_modules/d3-format/locale/de-CH.json b/node_modules/d3-format/locale/de-CH.json deleted file mode 100644 index 874bb56a5d3125fb1e31980b5600a773591a5939..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/de-CH.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": "'", - "grouping": [3], - "currency": ["", "\u00a0CHF"] -} diff --git a/node_modules/d3-format/locale/de-DE.json b/node_modules/d3-format/locale/de-DE.json deleted file mode 100644 index a2497624db79a2cbb5a793b86449c77499349ded..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/de-DE.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": ".", - "grouping": [3], - "currency": ["", "\u00a0€"] -} diff --git a/node_modules/d3-format/locale/en-CA.json b/node_modules/d3-format/locale/en-CA.json deleted file mode 100644 index f075b861bf5f6cefb76f17437cdabaab510ae62a..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/en-CA.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ".", - "thousands": ",", - "grouping": [3], - "currency": ["$", ""] -} diff --git a/node_modules/d3-format/locale/en-GB.json b/node_modules/d3-format/locale/en-GB.json deleted file mode 100644 index 3d22d7a69f2fc0d876029e08d90d92ffa9a60d64..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/en-GB.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ".", - "thousands": ",", - "grouping": [3], - "currency": ["£", ""] -} diff --git a/node_modules/d3-format/locale/en-IE.json b/node_modules/d3-format/locale/en-IE.json deleted file mode 100644 index 7d644154728c52a7f2ac4d409f2a8a92a7f9c987..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/en-IE.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ".", - "thousands": ",", - "grouping": [3], - "currency": ["€", ""] -} diff --git a/node_modules/d3-format/locale/en-IN.json b/node_modules/d3-format/locale/en-IN.json deleted file mode 100644 index ada1510f27635825e9fe9df8d0e86c23fafcf4e4..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/en-IN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ".", - "thousands": ",", - "grouping": [3, 2, 2, 2, 2, 2, 2, 2, 2, 2], - "currency": ["₹", ""] -} diff --git a/node_modules/d3-format/locale/en-US.json b/node_modules/d3-format/locale/en-US.json deleted file mode 100644 index f075b861bf5f6cefb76f17437cdabaab510ae62a..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/en-US.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ".", - "thousands": ",", - "grouping": [3], - "currency": ["$", ""] -} diff --git a/node_modules/d3-format/locale/es-BO.json b/node_modules/d3-format/locale/es-BO.json deleted file mode 100644 index 98fe6467a1acfd7aef107b9fd73c727b81788304..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/es-BO.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": ",", - "thousands": ".", - "grouping": [3], - "currency": ["Bs\u00a0", ""], - "percent": "\u202f%" -} diff --git a/node_modules/d3-format/locale/es-ES.json b/node_modules/d3-format/locale/es-ES.json deleted file mode 100644 index a2497624db79a2cbb5a793b86449c77499349ded..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/es-ES.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": ".", - "grouping": [3], - "currency": ["", "\u00a0€"] -} diff --git a/node_modules/d3-format/locale/es-MX.json b/node_modules/d3-format/locale/es-MX.json deleted file mode 100644 index f075b861bf5f6cefb76f17437cdabaab510ae62a..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/es-MX.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ".", - "thousands": ",", - "grouping": [3], - "currency": ["$", ""] -} diff --git a/node_modules/d3-format/locale/fi-FI.json b/node_modules/d3-format/locale/fi-FI.json deleted file mode 100644 index e2218ec9f14a46a54b0216e5f87fea72b681af0c..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/fi-FI.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": "\u00a0", - "grouping": [3], - "currency": ["", "\u00a0€"] -} diff --git a/node_modules/d3-format/locale/fr-CA.json b/node_modules/d3-format/locale/fr-CA.json deleted file mode 100644 index 0d927b92c2cab17f595c0810cdc34b08621bc3cf..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/fr-CA.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": "\u00a0", - "grouping": [3], - "currency": ["", "$"] -} diff --git a/node_modules/d3-format/locale/fr-FR.json b/node_modules/d3-format/locale/fr-FR.json deleted file mode 100644 index e0cf89de6625832845ecd713b9ed93308e0734b3..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/fr-FR.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "decimal": ",", - "thousands": "\u00a0", - "grouping": [3], - "currency": ["", "\u00a0€"], - "percent": "\u202f%" -} diff --git a/node_modules/d3-format/locale/he-IL.json b/node_modules/d3-format/locale/he-IL.json deleted file mode 100644 index 23926cb8bef6eb7bce15176f81920ac4792c5b22..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/he-IL.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ".", - "thousands": ",", - "grouping": [3], - "currency": ["₪", ""] -} diff --git a/node_modules/d3-format/locale/hu-HU.json b/node_modules/d3-format/locale/hu-HU.json deleted file mode 100644 index 1baff74316985cb4bdfeafc0380549227614ace5..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/hu-HU.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": "\u00a0", - "grouping": [3], - "currency": ["", "\u00a0Ft"] -} diff --git a/node_modules/d3-format/locale/it-IT.json b/node_modules/d3-format/locale/it-IT.json deleted file mode 100644 index 564ed46ef0fd63497c60c1bdd57308882a9dee0b..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/it-IT.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": ".", - "grouping": [3], - "currency": ["€", ""] -} diff --git a/node_modules/d3-format/locale/ja-JP.json b/node_modules/d3-format/locale/ja-JP.json deleted file mode 100644 index fdcba6c723ebd900de499e7a7ff8beb797653006..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ja-JP.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ".", - "thousands": ",", - "grouping": [3], - "currency": ["", "円"] -} diff --git a/node_modules/d3-format/locale/ko-KR.json b/node_modules/d3-format/locale/ko-KR.json deleted file mode 100644 index d1d882cdb18330e7e07381b6fd6740113c9b3458..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ko-KR.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ".", - "thousands": ",", - "grouping": [3], - "currency": ["â‚©", ""] -} diff --git a/node_modules/d3-format/locale/mk-MK.json b/node_modules/d3-format/locale/mk-MK.json deleted file mode 100644 index 33528b8e0defaa8bed7b2f9c57be856f0c21ef14..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/mk-MK.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": ".", - "grouping": [3], - "currency": ["", "\u00a0ден."] -} diff --git a/node_modules/d3-format/locale/nl-NL.json b/node_modules/d3-format/locale/nl-NL.json deleted file mode 100644 index 7176b373ecd0b080261a89e953df8128699d7056..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/nl-NL.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": ".", - "grouping": [3], - "currency": ["€\u00a0", ""] -} diff --git a/node_modules/d3-format/locale/pl-PL.json b/node_modules/d3-format/locale/pl-PL.json deleted file mode 100644 index 12c673fafd0aae67868ae2953c7e4b72e171e65b..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/pl-PL.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": ".", - "grouping": [3], - "currency": ["", "zÅ‚"] -} diff --git a/node_modules/d3-format/locale/pt-BR.json b/node_modules/d3-format/locale/pt-BR.json deleted file mode 100644 index e6705f1e0cfc93776670f0ddc49370344bcfe065..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/pt-BR.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": ".", - "grouping": [3], - "currency": ["R$", ""] -} diff --git a/node_modules/d3-format/locale/ru-RU.json b/node_modules/d3-format/locale/ru-RU.json deleted file mode 100644 index 3b0acf63f1a8e9e8cfbb9b32077099852f688f59..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/ru-RU.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": "\u00a0", - "grouping": [3], - "currency": ["", "\u00a0руб."] -} diff --git a/node_modules/d3-format/locale/sv-SE.json b/node_modules/d3-format/locale/sv-SE.json deleted file mode 100644 index 870eba3295f538bfeef883b7ef9609dc6763c852..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/sv-SE.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": "\u00a0", - "grouping": [3], - "currency": ["", " kr"] -} diff --git a/node_modules/d3-format/locale/uk-UA.json b/node_modules/d3-format/locale/uk-UA.json deleted file mode 100644 index 75cee2d99b0a44d71b41219bebfdae08f4b61bd2..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/uk-UA.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ",", - "thousands": "\u00a0", - "grouping": [3], - "currency": ["", "\u00a0â‚´."] -} diff --git a/node_modules/d3-format/locale/zh-CN.json b/node_modules/d3-format/locale/zh-CN.json deleted file mode 100644 index 1ffc7b68f512340ecc1ecfddc0b0b16d54cd046e..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/locale/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "decimal": ".", - "thousands": ",", - "grouping": [3], - "currency": ["Â¥", ""] -} diff --git a/node_modules/d3-format/package.json b/node_modules/d3-format/package.json deleted file mode 100644 index 98fc5a049c3fe33b31e9618bf66b7d47c67b17c1..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/package.json +++ /dev/null @@ -1,74 +0,0 @@ -{ - "_from": "d3-format@2", - "_id": "d3-format@2.0.0", - "_inBundle": false, - "_integrity": "sha512-Ab3S6XuE/Q+flY96HXT0jOXcM4EAClYFnRGY5zsjRGNy6qCYrQsMffs7cV5Q9xejb35zxW5hf/guKw34kvIKsA==", - "_location": "/d3-format", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-format@2", - "name": "d3-format", - "escapedName": "d3-format", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3", - "/d3-scale" - ], - "_resolved": "https://registry.npmjs.org/d3-format/-/d3-format-2.0.0.tgz", - "_shasum": "a10bcc0f986c372b729ba447382413aabf5b0767", - "_spec": "d3-format@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-format/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Format numbers for human consumption.", - "devDependencies": { - "eslint": "7", - "rollup": "2", - "rollup-plugin-terser": "7", - "tape": "5" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js", - "locale/*.json" - ], - "homepage": "https://d3js.org/d3-format/", - "jsdelivr": "dist/d3-format.min.js", - "keywords": [ - "d3", - "d3-module", - "format", - "localization" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-format.js", - "module": "src/index.js", - "name": "d3-format", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-format.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src test" - }, - "sideEffects": [ - "./src/defaultLocale.js" - ], - "unpkg": "dist/d3-format.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-format/src/defaultLocale.js b/node_modules/d3-format/src/defaultLocale.js deleted file mode 100644 index 2fab0577fbed402baa577a86ea3e4a0aab963ded..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/defaultLocale.js +++ /dev/null @@ -1,18 +0,0 @@ -import formatLocale from "./locale.js"; - -var locale; -export var format; -export var formatPrefix; - -defaultLocale({ - thousands: ",", - grouping: [3], - currency: ["$", ""] -}); - -export default function defaultLocale(definition) { - locale = formatLocale(definition); - format = locale.format; - formatPrefix = locale.formatPrefix; - return locale; -} diff --git a/node_modules/d3-format/src/exponent.js b/node_modules/d3-format/src/exponent.js deleted file mode 100644 index 79b67e3d273f5fb03067b2263cf4adf53cc70a69..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/exponent.js +++ /dev/null @@ -1,5 +0,0 @@ -import {formatDecimalParts} from "./formatDecimal.js"; - -export default function(x) { - return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN; -} diff --git a/node_modules/d3-format/src/formatDecimal.js b/node_modules/d3-format/src/formatDecimal.js deleted file mode 100644 index 4b34192482fbe5a5d56f2971bca8df23aae4b9c7..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/formatDecimal.js +++ /dev/null @@ -1,20 +0,0 @@ -export default function(x) { - return Math.abs(x = Math.round(x)) >= 1e21 - ? x.toLocaleString("en").replace(/,/g, "") - : x.toString(10); -} - -// Computes the decimal coefficient and exponent of the specified number x with -// significant digits p, where x is positive and p is in [1, 21] or undefined. -// For example, formatDecimalParts(1.23) returns ["123", 0]. -export function formatDecimalParts(x, p) { - if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity - var i, coefficient = x.slice(0, i); - - // The string returned by toExponential either has the form \d\.\d+e[-+]\d+ - // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3). - return [ - coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, - +x.slice(i + 1) - ]; -} diff --git a/node_modules/d3-format/src/formatGroup.js b/node_modules/d3-format/src/formatGroup.js deleted file mode 100644 index ae603d3ab45a7e7e7690afb8cb9ac074b9f963c8..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/formatGroup.js +++ /dev/null @@ -1,18 +0,0 @@ -export default function(grouping, thousands) { - return function(value, width) { - var i = value.length, - t = [], - j = 0, - g = grouping[0], - length = 0; - - while (i > 0 && g > 0) { - if (length + g + 1 > width) g = Math.max(1, width - length); - t.push(value.substring(i -= g, i + g)); - if ((length += g + 1) > width) break; - g = grouping[j = (j + 1) % grouping.length]; - } - - return t.reverse().join(thousands); - }; -} diff --git a/node_modules/d3-format/src/formatNumerals.js b/node_modules/d3-format/src/formatNumerals.js deleted file mode 100644 index 046317e949683f9d7147c31f75db34b3c6283bfc..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/formatNumerals.js +++ /dev/null @@ -1,7 +0,0 @@ -export default function(numerals) { - return function(value) { - return value.replace(/[0-9]/g, function(i) { - return numerals[+i]; - }); - }; -} diff --git a/node_modules/d3-format/src/formatPrefixAuto.js b/node_modules/d3-format/src/formatPrefixAuto.js deleted file mode 100644 index 907742aad7c0c740350279b7b5f8619af3e1adc4..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/formatPrefixAuto.js +++ /dev/null @@ -1,16 +0,0 @@ -import {formatDecimalParts} from "./formatDecimal.js"; - -export var prefixExponent; - -export default function(x, p) { - var d = formatDecimalParts(x, p); - if (!d) return x + ""; - var coefficient = d[0], - exponent = d[1], - i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, - n = coefficient.length; - return i === n ? coefficient - : i > n ? coefficient + new Array(i - n + 1).join("0") - : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) - : "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y! -} diff --git a/node_modules/d3-format/src/formatRounded.js b/node_modules/d3-format/src/formatRounded.js deleted file mode 100644 index ea5e10da428664c110151faa2017239c15ae0e90..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/formatRounded.js +++ /dev/null @@ -1,11 +0,0 @@ -import {formatDecimalParts} from "./formatDecimal.js"; - -export default function(x, p) { - var d = formatDecimalParts(x, p); - if (!d) return x + ""; - var coefficient = d[0], - exponent = d[1]; - return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient - : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) - : coefficient + new Array(exponent - coefficient.length + 2).join("0"); -} diff --git a/node_modules/d3-format/src/formatSpecifier.js b/node_modules/d3-format/src/formatSpecifier.js deleted file mode 100644 index 2dabb2f4922643a004d96c337303d516e9adca11..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/formatSpecifier.js +++ /dev/null @@ -1,47 +0,0 @@ -// [[fill]align][sign][symbol][0][width][,][.precision][~][type] -var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; - -export default function formatSpecifier(specifier) { - if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier); - var match; - return new FormatSpecifier({ - fill: match[1], - align: match[2], - sign: match[3], - symbol: match[4], - zero: match[5], - width: match[6], - comma: match[7], - precision: match[8] && match[8].slice(1), - trim: match[9], - type: match[10] - }); -} - -formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof - -export function FormatSpecifier(specifier) { - this.fill = specifier.fill === undefined ? " " : specifier.fill + ""; - this.align = specifier.align === undefined ? ">" : specifier.align + ""; - this.sign = specifier.sign === undefined ? "-" : specifier.sign + ""; - this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + ""; - this.zero = !!specifier.zero; - this.width = specifier.width === undefined ? undefined : +specifier.width; - this.comma = !!specifier.comma; - this.precision = specifier.precision === undefined ? undefined : +specifier.precision; - this.trim = !!specifier.trim; - this.type = specifier.type === undefined ? "" : specifier.type + ""; -} - -FormatSpecifier.prototype.toString = function() { - return this.fill - + this.align - + this.sign - + this.symbol - + (this.zero ? "0" : "") - + (this.width === undefined ? "" : Math.max(1, this.width | 0)) - + (this.comma ? "," : "") - + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0)) - + (this.trim ? "~" : "") - + this.type; -}; diff --git a/node_modules/d3-format/src/formatTrim.js b/node_modules/d3-format/src/formatTrim.js deleted file mode 100644 index b0d647b33d5e270c9719ad7817317d041ba78584..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/formatTrim.js +++ /dev/null @@ -1,11 +0,0 @@ -// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k. -export default function(s) { - out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) { - switch (s[i]) { - case ".": i0 = i1 = i; break; - case "0": if (i0 === 0) i0 = i; i1 = i; break; - default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break; - } - } - return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s; -} diff --git a/node_modules/d3-format/src/formatTypes.js b/node_modules/d3-format/src/formatTypes.js deleted file mode 100644 index 007db36dc816fae831be5e2fe0660644058c5dfb..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/formatTypes.js +++ /dev/null @@ -1,19 +0,0 @@ -import formatDecimal from "./formatDecimal.js"; -import formatPrefixAuto from "./formatPrefixAuto.js"; -import formatRounded from "./formatRounded.js"; - -export default { - "%": (x, p) => (x * 100).toFixed(p), - "b": (x) => Math.round(x).toString(2), - "c": (x) => x + "", - "d": formatDecimal, - "e": (x, p) => x.toExponential(p), - "f": (x, p) => x.toFixed(p), - "g": (x, p) => x.toPrecision(p), - "o": (x) => Math.round(x).toString(8), - "p": (x, p) => formatRounded(x * 100, p), - "r": formatRounded, - "s": formatPrefixAuto, - "X": (x) => Math.round(x).toString(16).toUpperCase(), - "x": (x) => Math.round(x).toString(16) -}; diff --git a/node_modules/d3-format/src/identity.js b/node_modules/d3-format/src/identity.js deleted file mode 100644 index b2f94b2e21fee82e347197f65d2d2c8f0b655642..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/identity.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(x) { - return x; -} diff --git a/node_modules/d3-format/src/index.js b/node_modules/d3-format/src/index.js deleted file mode 100644 index 22ae6b24af310778e5811e1053504726b52fd777..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/index.js +++ /dev/null @@ -1,6 +0,0 @@ -export {default as formatDefaultLocale, format, formatPrefix} from "./defaultLocale.js"; -export {default as formatLocale} from "./locale.js"; -export {default as formatSpecifier, FormatSpecifier} from "./formatSpecifier.js"; -export {default as precisionFixed} from "./precisionFixed.js"; -export {default as precisionPrefix} from "./precisionPrefix.js"; -export {default as precisionRound} from "./precisionRound.js"; diff --git a/node_modules/d3-format/src/locale.js b/node_modules/d3-format/src/locale.js deleted file mode 100644 index 404f9414d17c78cfb4ad355d0d5d0a50c02c738c..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/locale.js +++ /dev/null @@ -1,148 +0,0 @@ -import exponent from "./exponent.js"; -import formatGroup from "./formatGroup.js"; -import formatNumerals from "./formatNumerals.js"; -import formatSpecifier from "./formatSpecifier.js"; -import formatTrim from "./formatTrim.js"; -import formatTypes from "./formatTypes.js"; -import {prefixExponent} from "./formatPrefixAuto.js"; -import identity from "./identity.js"; - -var map = Array.prototype.map, - prefixes = ["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"]; - -export default function(locale) { - var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""), - currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "", - currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "", - decimal = locale.decimal === undefined ? "." : locale.decimal + "", - numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)), - percent = locale.percent === undefined ? "%" : locale.percent + "", - minus = locale.minus === undefined ? "−" : locale.minus + "", - nan = locale.nan === undefined ? "NaN" : locale.nan + ""; - - function newFormat(specifier) { - specifier = formatSpecifier(specifier); - - var fill = specifier.fill, - align = specifier.align, - sign = specifier.sign, - symbol = specifier.symbol, - zero = specifier.zero, - width = specifier.width, - comma = specifier.comma, - precision = specifier.precision, - trim = specifier.trim, - type = specifier.type; - - // The "n" type is an alias for ",g". - if (type === "n") comma = true, type = "g"; - - // The "" type, and any invalid type, is an alias for ".12~g". - else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = "g"; - - // If zero fill is specified, padding goes after sign and before digits. - if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "="; - - // Compute the prefix and suffix. - // For SI-prefix, the suffix is lazily computed. - var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", - suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : ""; - - // What format function should we use? - // Is this an integer type? - // Can this type generate exponential notation? - var formatType = formatTypes[type], - maybeSuffix = /[defgprs%]/.test(type); - - // Set the default precision if not specified, - // or clamp the specified precision to the supported range. - // For significant precision, it must be in [1, 21]. - // For fixed precision, it must be in [0, 20]. - precision = precision === undefined ? 6 - : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) - : Math.max(0, Math.min(20, precision)); - - function format(value) { - var valuePrefix = prefix, - valueSuffix = suffix, - i, n, c; - - if (type === "c") { - valueSuffix = formatType(value) + valueSuffix; - value = ""; - } else { - value = +value; - - // Determine the sign. -0 is not less than 0, but 1 / -0 is! - var valueNegative = value < 0 || 1 / value < 0; - - // Perform the initial formatting. - value = isNaN(value) ? nan : formatType(Math.abs(value), precision); - - // Trim insignificant zeros. - if (trim) value = formatTrim(value); - - // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign. - if (valueNegative && +value === 0 && sign !== "+") valueNegative = false; - - // Compute the prefix and suffix. - valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix; - valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : ""); - - // Break the formatted value into the integer “value†part that can be - // grouped, and fractional or exponential “suffix†part that is not. - if (maybeSuffix) { - i = -1, n = value.length; - while (++i < n) { - if (c = value.charCodeAt(i), 48 > c || c > 57) { - valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix; - value = value.slice(0, i); - break; - } - } - } - } - - // If the fill character is not "0", grouping is applied before padding. - if (comma && !zero) value = group(value, Infinity); - - // Compute the padding. - var length = valuePrefix.length + value.length + valueSuffix.length, - padding = length < width ? new Array(width - length + 1).join(fill) : ""; - - // If the fill character is "0", grouping is applied after padding. - if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = ""; - - // Reconstruct the final output based on the desired alignment. - switch (align) { - case "<": value = valuePrefix + value + valueSuffix + padding; break; - case "=": value = valuePrefix + padding + value + valueSuffix; break; - case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break; - default: value = padding + valuePrefix + value + valueSuffix; break; - } - - return numerals(value); - } - - format.toString = function() { - return specifier + ""; - }; - - return format; - } - - function formatPrefix(specifier, value) { - var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), - e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3, - k = Math.pow(10, -e), - prefix = prefixes[8 + e / 3]; - return function(value) { - return f(k * value) + prefix; - }; - } - - return { - format: newFormat, - formatPrefix: formatPrefix - }; -} diff --git a/node_modules/d3-format/src/precisionFixed.js b/node_modules/d3-format/src/precisionFixed.js deleted file mode 100644 index 237f53f8969565cb84af2e5d02b6d2ee09568605..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/precisionFixed.js +++ /dev/null @@ -1,5 +0,0 @@ -import exponent from "./exponent.js"; - -export default function(step) { - return Math.max(0, -exponent(Math.abs(step))); -} diff --git a/node_modules/d3-format/src/precisionPrefix.js b/node_modules/d3-format/src/precisionPrefix.js deleted file mode 100644 index fd6af8446731f956dbdfaee19bc02c4b766f93b0..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/precisionPrefix.js +++ /dev/null @@ -1,5 +0,0 @@ -import exponent from "./exponent.js"; - -export default function(step, value) { - return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step))); -} diff --git a/node_modules/d3-format/src/precisionRound.js b/node_modules/d3-format/src/precisionRound.js deleted file mode 100644 index 5c704370d85459c476a63a21e1ae4d0d2075b70b..0000000000000000000000000000000000000000 --- a/node_modules/d3-format/src/precisionRound.js +++ /dev/null @@ -1,6 +0,0 @@ -import exponent from "./exponent.js"; - -export default function(step, max) { - step = Math.abs(step), max = Math.abs(max) - step; - return Math.max(0, exponent(max) - exponent(step)) + 1; -} diff --git a/node_modules/d3-geo/LICENSE b/node_modules/d3-geo/LICENSE deleted file mode 100644 index f9488eb5b5b315c14f9b359ec141554287099a1f..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/LICENSE +++ /dev/null @@ -1,48 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This license applies to GeographicLib, versions 1.12 and later. - -Copyright (c) 2008-2012, Charles Karney - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/d3-geo/README.md b/node_modules/d3-geo/README.md deleted file mode 100644 index f5dfa9468021cbc1c466d231d5f0766ec0d51e4a..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/README.md +++ /dev/null @@ -1,683 +0,0 @@ -# d3-geo - -Map projections are sometimes implemented as point transformations. For instance, spherical Mercator: - -```js -function mercator(x, y) { - return [x, Math.log(Math.tan(Math.PI / 4 + y / 2))]; -} -``` - -This is a reasonable *mathematical* approach if your geometry consists of continuous, infinite point sets. Yet computers do not have infinite memory, so we must instead work with discrete geometry such as polygons and polylines! - -Discrete geometry makes the challenge of projecting from the sphere to the plane much harder. The edges of a spherical polygon are [geodesics](https://en.wikipedia.org/wiki/Geodesic) (segments of great circles), not straight lines. Projected to the plane, geodesics are curves in all map projections except [gnomonic](#geoGnomonic), and thus accurate projection requires interpolation along each arc. D3 uses [adaptive sampling](https://bl.ocks.org/mbostock/3795544) inspired by a popular [line simplification method](https://bost.ocks.org/mike/simplify/) to balance accuracy and performance. - -The projection of polygons and polylines must also deal with the topological differences between the sphere and the plane. Some projections require cutting geometry that [crosses the antimeridian](https://bl.ocks.org/mbostock/3788999), while others require [clipping geometry to a great circle](https://bl.ocks.org/mbostock/3021474). - -Spherical polygons also require a [winding order convention](https://bl.ocks.org/mbostock/a7bdfeb041e850799a8d3dce4d8c50c8) to determine which side of the polygon is the inside: the exterior ring for polygons smaller than a hemisphere must be clockwise, while the exterior ring for polygons [larger than a hemisphere](https://bl.ocks.org/mbostock/6713736) must be anticlockwise. Interior rings representing holes must use the opposite winding order of their exterior ring. This winding order convention is also used by [TopoJSON](https://github.com/topojson) and [ESRI shapefiles](https://github.com/mbostock/shapefile); however, it is the **opposite** convention of GeoJSON’s [RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.1.6). (Also note that standard GeoJSON WGS84 uses planar equirectangular coordinates, not spherical coordinates, and thus may require [stitching](https://github.com/d3/d3-geo-projection/blob/master/README.md#geostitch) to remove antimeridian cuts.) - -D3’s approach affords great expressiveness: you can choose the right projection, and the right aspect, for your data. D3 supports a wide variety of common and [unusual map projections](https://github.com/d3/d3-geo-projection). For more, see Part 2 of [The Toolmaker’s Guide](https://vimeo.com/106198518#t=20m0s). - -D3 uses [GeoJSON](http://geojson.org/geojson-spec.html) to represent geographic features in JavaScript. (See also [TopoJSON](https://github.com/mbostock/topojson), an extension of GeoJSON that is significantly more compact and encodes topology.) To convert shapefiles to GeoJSON, use [shp2json](https://github.com/mbostock/shapefile/blob/master/README.md#shp2json), part of the [shapefile package](https://github.com/mbostock/shapefile). See [Command-Line Cartography](https://medium.com/@mbostock/command-line-cartography-part-1-897aa8f8ca2c) for an introduction to d3-geo and related tools. - -## Installing - -If you use NPM, `npm install d3-geo`. Otherwise, download the [latest release](https://github.com/d3/d3-geo/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-geo.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-array.v2.min.js"></script> -<script src="https://d3js.org/d3-geo.v2.min.js"></script> -<script> - -var projection = d3.geoEqualEarth(), - path = d3.geoPath(projection); - -</script> -``` - -[Try d3-geo in your browser.](https://observablehq.com/collection/@d3/d3-geo) - -## API Reference - -* [Paths](#paths) -* [Projections](#projections) ([Azimuthal](#azimuthal-projections), [Composite](#composite-projections), [Conic](#conic-projections), [Cylindrical](#cylindrical-projections)) -* [Raw Projections](#raw-projections) -* [Spherical Math](#spherical-math) -* [Spherical Shapes](#spherical-shapes) -* [Streams](#streams) -* [Transforms](#transforms) -* [Clipping](#clipping) - -### Paths - -The geographic path generator, [d3.geoPath](#geoPath), is similar to the shape generators in [d3-shape](https://github.com/d3/d3-shape): given a GeoJSON geometry or feature object, it generates an SVG path data string or [renders the path to a Canvas](https://bl.ocks.org/mbostock/3783604). Canvas is recommended for dynamic or interactive projections to improve performance. Paths can be used with [projections](#projections) or [transforms](#transforms), or they can be used to render planar geometry directly to Canvas or SVG. - -<a href="#geoPath" name="geoPath">#</a> d3.<b>geoPath</b>([<i>projection</i>[, <i>context</i>]]) [<>](https://github.com/d3/d3-geo/blob/master/src/path/index.js "Source") - -Creates a new geographic path generator with the default settings. If *projection* is specified, sets the [current projection](#path_projection). If *context* is specified, sets the [current context](#path_context). - -<a href="#_path" name="_path">#</a> <i>path</i>(<i>object</i>[, <i>arguments…</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/path/index.js "Source") - -Renders the given *object*, which may be any GeoJSON feature or geometry object: - -* Point - a single position. -* MultiPoint - an array of positions. -* LineString - an array of positions forming a continuous line. -* MultiLineString - an array of arrays of positions forming several lines. -* Polygon - an array of arrays of positions forming a polygon (possibly with holes). -* MultiPolygon - a multidimensional array of positions forming multiple polygons. -* GeometryCollection - an array of geometry objects. -* Feature - a feature containing one of the above geometry objects. -* FeatureCollection - an array of feature objects. - -The type *Sphere* is also supported, which is useful for rendering the outline of the globe; a sphere has no coordinates. Any additional *arguments* are passed along to the [pointRadius](#path_pointRadius) accessor. - -To display multiple features, combine them into a feature collection: - -```js -svg.append("path") - .datum({type: "FeatureCollection", features: features}) - .attr("d", d3.geoPath()); -``` - -Or use multiple path elements: - -```js -svg.selectAll("path") - .data(features) - .enter().append("path") - .attr("d", d3.geoPath()); -``` - -Separate path elements are typically slower than a single path element. However, distinct path elements are useful for styling and interaction (e.g., click or mouseover). Canvas rendering (see [*path*.context](#path_context)) is typically faster than SVG, but requires more effort to implement styling and interaction. - -<a href="#path_area" name="path_area">#</a> <i>path</i>.<b>area</b>(<i>object</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/path/area.js "Source") - -Returns the projected planar area (typically in square pixels) for the specified GeoJSON *object*. Point, MultiPoint, LineString and MultiLineString geometries have zero area. For Polygon and MultiPolygon geometries, this method first computes the area of the exterior ring, and then subtracts the area of any interior holes. This method observes any clipping performed by the [projection](#path_projection); see [*projection*.clipAngle](#projection_clipAngle) and [*projection*.clipExtent](#projection_clipExtent). This is the planar equivalent of [d3.geoArea](#geoArea). - -<a href="#path_bounds" name="path_bounds">#</a> <i>path</i>.<b>bounds</b>(<i>object</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/path/bounds.js "Source") - -Returns the projected planar bounding box (typically in pixels) for the specified GeoJSON *object*. The bounding box is represented by a two-dimensional array: \[\[*xâ‚€*, *yâ‚€*\], \[*xâ‚*, *yâ‚*\]\], where *xâ‚€* is the minimum *x*-coordinate, *yâ‚€* is the minimum *y*-coordinate, *xâ‚* is maximum *x*-coordinate, and *yâ‚* is the maximum *y*-coordinate. This is handy for, say, zooming in to a particular feature. (Note that in projected planar coordinates, the minimum latitude is typically the maximum *y*-value, and the maximum latitude is typically the minimum *y*-value.) This method observes any clipping performed by the [projection](#path_projection); see [*projection*.clipAngle](#projection_clipAngle) and [*projection*.clipExtent](#projection_clipExtent). This is the planar equivalent of [d3.geoBounds](#geoBounds). - -<a href="#path_centroid" name="path_centroid">#</a> <i>path</i>.<b>centroid</b>(<i>object</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/path/centroid.js "Source") - -Returns the projected planar centroid (typically in pixels) for the specified GeoJSON *object*. This is handy for, say, labeling state or county boundaries, or displaying a symbol map. For example, a [noncontiguous cartogram](https://bl.ocks.org/mbostock/4055908) might scale each state around its centroid. This method observes any clipping performed by the [projection](#path_projection); see [*projection*.clipAngle](#projection_clipAngle) and [*projection*.clipExtent](#projection_clipExtent). This is the planar equivalent of [d3.geoCentroid](#geoCentroid). - -<a href="#path_measure" name="path_measure">#</a> <i>path</i>.<b>measure</b>(<i>object</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/path/measure.js "Source") - -Returns the projected planar length (typically in pixels) for the specified GeoJSON *object*. Point and MultiPoint geometries have zero length. For Polygon and MultiPolygon geometries, this method computes the summed length of all rings. This method observes any clipping performed by the [projection](#path_projection); see [*projection*.clipAngle](#projection_clipAngle) and [*projection*.clipExtent](#projection_clipExtent). This is the planar equivalent of [d3.geoLength](#geoLength). - -<a href="#path_projection" name="path_projection">#</a> <i>path</i>.<b>projection</b>([<i>projection</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/path/index.js "Source") - -If a *projection* is specified, sets the current projection to the specified projection. If *projection* is not specified, returns the current projection, which defaults to null. The null projection represents the identity transformation: the input geometry is not projected and is instead rendered directly in raw coordinates. This can be useful for fast rendering of [pre-projected geometry](https://bl.ocks.org/mbostock/5557726), or for fast rendering of the equirectangular projection. - -The given *projection* is typically one of D3’s built-in [geographic projections](#projections); however, any object that exposes a [*projection*.stream](#projection_stream) function can be used, enabling the use of [custom projections](https://bl.ocks.org/mbostock/5663666). See D3’s [transforms](#transforms) for more examples of arbitrary geometric transformations. - -<a href="#path_context" name="path_context">#</a> <i>path</i>.<b>context</b>([<i>context</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/path/index.js "Source") - -If *context* is specified, sets the current render context and returns the path generator. If the *context* is null, then the [path generator](#_path) will return an SVG path string; if the context is non-null, the path generator will instead call methods on the specified context to render geometry. The context must implement the following subset of the [CanvasRenderingContext2D API](https://www.w3.org/TR/2dcontext/#canvasrenderingcontext2d): - -* *context*.beginPath() -* *context*.moveTo(*x*, *y*) -* *context*.lineTo(*x*, *y*) -* *context*.arc(*x*, *y*, *radius*, *startAngle*, *endAngle*) -* *context*.closePath() - -If a *context* is not specified, returns the current render context which defaults to null. - -<a href="#path_pointRadius" name="path_pointRadius">#</a> <i>path</i>.<b>pointRadius</b>([<i>radius</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/path/index.js "Source") - -If *radius* is specified, sets the radius used to display Point and MultiPoint geometries to the specified number. If *radius* is not specified, returns the current radius accessor, which defaults to 4.5. While the radius is commonly specified as a number constant, it may also be specified as a function which is computed per feature, being passed the any arguments passed to the [path generator](#_path). For example, if your GeoJSON data has additional properties, you might access those properties inside the radius function to vary the point size; alternatively, you could [d3.symbol](https://github.com/d3/d3-shape#symbols) and a [projection](#geoProjection) for greater flexibility. - -### Projections - -Projections transform spherical polygonal geometry to planar polygonal geometry. D3 provides implementations of several classes of standard projections: - -* [Azimuthal](#azimuthal-projections) -* [Composite](#composite-projections) -* [Conic](#conic-projections) -* [Cylindrical](#cylindrical-projections) - -For many more projections, see [d3-geo-projection](https://github.com/d3/d3-geo-projection). You can implement [custom projections](#raw-projections) using [d3.geoProjection](#geoProjection) or [d3.geoProjectionMutator](#geoProjectionMutator). - -<a href="#_projection" name="_projection">#</a> <i>projection</i>(<i>point</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -Returns a new array \[*x*, *y*\] (typically in pixels) representing the projected point of the given *point*. The point must be specified as a two-element array \[*longitude*, *latitude*\] in degrees. May return null if the specified *point* has no defined projected position, such as when the point is outside the clipping bounds of the projection. - -<a href="#projection_invert" name="projection_invert">#</a> <i>projection</i>.<b>invert</b>(<i>point</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -Returns a new array \[*longitude*, *latitude*\] in degrees representing the unprojected point of the given projected *point*. The point must be specified as a two-element array \[*x*, *y*\] (typically in pixels). May return null if the specified *point* has no defined projected position, such as when the point is outside the clipping bounds of the projection. - -This method is only defined on invertible projections. - -<a href="#projection_stream" name="projection_stream">#</a> <i>projection</i>.<b>stream</b>(<i>stream</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -Returns a [projection stream](#streams) for the specified output *stream*. Any input geometry is projected before being streamed to the output stream. A typical projection involves several geometry transformations: the input geometry is first converted to radians, rotated on three axes, clipped to the small circle or cut along the antimeridian, and lastly projected to the plane with adaptive resampling, scale and translation. - -<a href="#projection_preclip" name="projection_preclip">#</a> <i>projection</i>.<b>preclip</b>([<i>preclip</i>]) - -If *preclip* is specified, sets the projection’s spherical clipping to the specified function and returns the projection. If *preclip* is not specified, returns the current spherical clipping function (see [preclip](#preclip)). - -<a href="#projection_postclip" name="projection_postclip">#</a> <i>projection</i>.<b>postclip</b>([<i>postclip</i>]) - -If *postclip* is specified, sets the projection’s cartesian clipping to the specified function and returns the projection. If *postclip* is not specified, returns the current cartesian clipping function (see [postclip](#postclip)). - -<a href="#projection_clipAngle" name="projection_clipAngle">#</a> <i>projection</i>.<b>clipAngle</b>([<i>angle</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -If *angle* is specified, sets the projection’s clipping circle radius to the specified angle in degrees and returns the projection. If *angle* is null, switches to [antimeridian cutting](https://bl.ocks.org/mbostock/3788999) rather than small-circle clipping. If *angle* is not specified, returns the current clip angle which defaults to null. Small-circle clipping is independent of viewport clipping via [*projection*.clipExtent](#projection_clipExtent). - -See also [*projection*.preclip](#projection_preclip), [d3.geoClipAntimeridian](#geoClipAntimeridian), [d3.geoClipCircle](#geoClipCircle). - -<a href="#projection_clipExtent" name="projection_clipExtent">#</a> <i>projection</i>.<b>clipExtent</b>([<i>extent</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -If *extent* is specified, sets the projection’s viewport clip extent to the specified bounds in pixels and returns the projection. The *extent* bounds are specified as an array \[\[<i>xâ‚€</i>, <i>yâ‚€</i>\], \[<i>xâ‚</i>, <i>yâ‚</i>\]\], where <i>xâ‚€</i> is the left-side of the viewport, <i>yâ‚€</i> is the top, <i>xâ‚</i> is the right and <i>yâ‚</i> is the bottom. If *extent* is null, no viewport clipping is performed. If *extent* is not specified, returns the current viewport clip extent which defaults to null. Viewport clipping is independent of small-circle clipping via [*projection*.clipAngle](#projection_clipAngle). - -See also [*projection*.postclip](#projection_postclip), [d3.geoClipRectangle](#geoClipRectangle). - -<a href="#projection_scale" name="projection_scale">#</a> <i>projection</i>.<b>scale</b>([<i>scale</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -If *scale* is specified, sets the projection’s scale factor to the specified value and returns the projection. If *scale* is not specified, returns the current scale factor; the default scale is projection-specific. The scale factor corresponds linearly to the distance between projected points; however, absolute scale factors are not equivalent across projections. - -<a href="#projection_translate" name="projection_translate">#</a> <i>projection</i>.<b>translate</b>([<i>translate</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -If *translate* is specified, sets the projection’s translation offset to the specified two-element array [<i>t<sub>x</sub></i>, <i>t<sub>y</sub></i>] and returns the projection. If *translate* is not specified, returns the current translation offset which defaults to [480, 250]. The translation offset determines the pixel coordinates of the projection’s [center](#projection_center). The default translation offset places ⟨0°,0°⟩ at the center of a 960×500 area. - -<a href="#projection_center" name="projection_center">#</a> <i>projection</i>.<b>center</b>([<i>center</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -If *center* is specified, sets the projection’s center to the specified *center*, a two-element array of [*longitude*, *latitude*] in degrees and returns the projection. If *center* is not specified, returns the current center, which defaults to ⟨0°,0°⟩. - -<a href="#projection_angle" name="projection_angle">#</a> <i>projection</i>.<b>angle</b>([<i>angle</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -If *angle* is specified, sets the projection’s post-projection planar rotation angle to the specified *angle* in degrees and returns the projection. If *angle* is not specified, returns the projection’s current angle, which defaults to 0°. Note that it may be faster to rotate during rendering (e.g., using [*context*.rotate](https://developer.mozilla.org/docs/Web/API/CanvasRenderingContext2D/rotate)) rather than during projection. - -<a href="#projection_reflectX" name="projection_reflectX">#</a> <i>projection</i>.<b>reflectX</b>([<i>reflect</i>]) - -If *reflect* is specified, sets whether or not the *x*-dimension is reflected (negated) in the output. If *reflect* is not specified, returns true if *x*-reflection is enabled, which defaults to false. This can be useful to display sky and astronomical data with the orb seen from below: right ascension (eastern direction) will point to the left when North is pointing up. - -<a href="#projection_reflectY" name="projection_reflectY">#</a> <i>projection</i>.<b>reflectY</b>([<i>reflect</i>]) - -If *reflect* is specified, sets whether or not the *y*-dimension is reflected (negated) in the output. If *reflect* is not specified, returns true if *y*-reflection is enabled, which defaults to false. This is especially useful for transforming from standard [spatial reference systems](https://en.wikipedia.org/wiki/Spatial_reference_system), which treat positive *y* as pointing up, to display coordinate systems such as Canvas and SVG, which treat positive *y* as pointing down. - -<a href="#projection_rotate" name="projection_rotate">#</a> <i>projection</i>.<b>rotate</b>([<i>angles</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -If *rotation* is specified, sets the projection’s [three-axis spherical rotation](https://bl.ocks.org/mbostock/4282586) to the specified *angles*, which must be a two- or three-element array of numbers [*lambda*, *phi*, *gamma*] specifying the rotation angles in degrees about [each spherical axis](https://bl.ocks.org/mbostock/4282586). (These correspond to [yaw, pitch and roll](https://en.wikipedia.org/wiki/Aircraft_principal_axes).) If the rotation angle *gamma* is omitted, it defaults to 0. See also [d3.geoRotation](#geoRotation). If *rotation* is not specified, returns the current rotation which defaults [0, 0, 0]. - -<a href="#projection_precision" name="projection_precision">#</a> <i>projection</i>.<b>precision</b>([<i>precision</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -If *precision* is specified, sets the threshold for the projection’s [adaptive resampling](https://bl.ocks.org/mbostock/3795544) to the specified value in pixels and returns the projection. This value corresponds to the [Douglas–Peucker](https://en.wikipedia.org/wiki/Ramer–Douglas–Peucker_algorithm) distance. If *precision* is not specified, returns the projection’s current resampling precision which defaults to √0.5 ≅ 0.70710… - -<a href="#projection_fitExtent" name="projection_fitExtent">#</a> <i>projection</i>.<b>fitExtent</b>(<i>extent</i>, <i>object</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -Sets the projection’s [scale](#projection_scale) and [translate](#projection_translate) to fit the specified GeoJSON *object* in the center of the given *extent*. The extent is specified as an array \[\[xâ‚€, yâ‚€\], \[xâ‚, yâ‚\]\], where xâ‚€ is the left side of the bounding box, yâ‚€ is the top, xâ‚ is the right and yâ‚ is the bottom. Returns the projection. - -For example, to scale and translate the [New Jersey State Plane projection](https://bl.ocks.org/mbostock/5126418) to fit a GeoJSON object *nj* in the center of a 960×500 bounding box with 20 pixels of padding on each side: - -```js -var projection = d3.geoTransverseMercator() - .rotate([74 + 30 / 60, -38 - 50 / 60]) - .fitExtent([[20, 20], [940, 480]], nj); -``` - -Any [clip extent](#projection_clipExtent) is ignored when determining the new scale and translate. The [precision](#projection_precision) used to compute the bounding box of the given *object* is computed at an effective scale of 150. - -<a href="#projection_fitSize" name="projection_fitSize">#</a> <i>projection</i>.<b>fitSize</b>(<i>size</i>, <i>object</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -A convenience method for [*projection*.fitExtent](#projection_fitExtent) where the top-left corner of the extent is [0, 0]. The following two statements are equivalent: - -```js -projection.fitExtent([[0, 0], [width, height]], object); -projection.fitSize([width, height], object); -``` - -<a href="#projection_fitWidth" name="projection_fitWidth">#</a> <i>projection</i>.<b>fitWidth</b>(<i>width</i>, <i>object</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -A convenience method for [*projection*.fitSize](#projection_fitSize) where the height is automatically chosen from the aspect ratio of *object* and the given constraint on *width*. - -<a href="#projection_fitHeight" name="projection_fitHeight">#</a> <i>projection</i>.<b>fitHeight</b>(<i>height</i>, <i>object</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -A convenience method for [*projection*.fitSize](#projection_fitSize) where the width is automatically chosen from the aspect ratio of *object* and the given constraint on *height*. - -#### Azimuthal Projections - -Azimuthal projections project the sphere directly onto a plane. - -<a href="#geoAzimuthalEqualArea" name="geoAzimuthalEqualArea">#</a> d3.<b>geoAzimuthalEqualArea</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/azimuthalEqualArea.js "Source") -<br><a href="#geoAzimuthalEqualAreaRaw" name="geoAzimuthalEqualAreaRaw">#</a> d3.<b>geoAzimuthalEqualAreaRaw</b> - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/azimuthalEqualArea.png" width="480" height="250">](https://observablehq.com/@d3/azimuthal-equal-area) - -The azimuthal equal-area projection. - -<a href="#geoAzimuthalEquidistant" name="geoAzimuthalEquidistant">#</a> d3.<b>geoAzimuthalEquidistant</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/azimuthalEquidistant.js "Source") -<br><a href="#geoAzimuthalEquidistantRaw" name="geoAzimuthalEquidistantRaw">#</a> d3.<b>geoAzimuthalEquidistantRaw</b> - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/azimuthalEquidistant.png" width="480" height="250">](https://observablehq.com/@d3/azimuthal-equidistant) - -The azimuthal equidistant projection. - -<a href="#geoGnomonic" name="geoGnomonic">#</a> d3.<b>geoGnomonic</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/gnomonic.js "Source") -<br><a href="#geoGnomonicRaw" name="geoGnomonicRaw">#</a> d3.<b>geoGnomonicRaw</b> - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/gnomonic.png" width="480" height="250">](https://observablehq.com/@d3/gnomonic) - -The gnomonic projection. - -<a href="#geoOrthographic" name="geoOrthographic">#</a> d3.<b>geoOrthographic</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/orthographic.js "Source") -<br><a href="#geoOrthographicRaw" name="geoOrthographicRaw">#</a> d3.<b>geoOrthographicRaw</b> - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/orthographic.png" width="480" height="250">](https://observablehq.com/@d3/orthographic) - -The orthographic projection. - -<a href="#geoStereographic" name="geoStereographic">#</a> d3.<b>geoStereographic</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/stereographic.js "Source") -<br><a href="#geoStereographicRaw" name="geoStereographicRaw">#</a> d3.<b>geoStereographicRaw</b> - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/stereographic.png" width="480" height="250">](https://observablehq.com/@d3/stereographic) - -The stereographic projection. - -#### Equal-Earth - -<a href="#geoEqualEarth" name="geoEqualEarth">#</a> d3.<b>geoEqualEarth</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/equalEarth.js "Source") -<br><a href="#geoEqualEarthRaw" name="geoEqualEarthRaw">#</a> d3.<b>geoEqualEarthRaw</b> - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/equalEarth.png" width="480" height="250">](https://observablehq.com/@d3/equal-earth) - -The Equal Earth projection, by Bojan Å avriÄ _et al._, 2018. - -#### Composite Projections - -Composite consist of several projections that are composed into a single display. The constituent projections have fixed clip, center and rotation, and thus composite projections do not support [*projection*.center](#projection_center), [*projection*.rotate](#projection_rotate), [*projection*.clipAngle](#projection_clipAngle), or [*projection*.clipExtent](#projection_clipExtent). - -<a href="#geoAlbersUsa" name="geoAlbersUsa">#</a> d3.<b>geoAlbersUsa</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/albersUsa.js "Source") - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/albersUsa.png" width="480" height="250">](https://observablehq.com/@d3/u-s-map) - -This is a U.S.-centric composite projection of three [d3.geoConicEqualArea](#geoConicEqualArea) projections: [d3.geoAlbers](#geoAlbers) is used for the lower forty-eight states, and separate conic equal-area projections are used for Alaska and Hawaii. Note that the scale for Alaska is diminished: it is projected at 0.35× its true relative area. This diagram by Philippe Rivière illustrates how this projection uses two rectangular insets for Alaska and Hawaii: - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/albersUsa-parameters.png" width="480" height="250">](https://bl.ocks.org/Fil/7723167596af40d9159be34ffbf8d36b) - -See [Albers USA with Territories](https://www.npmjs.com/package/geo-albers-usa-territories) for an extension to all US territories, and [d3-composite-projections](http://geoexamples.com/d3-composite-projections/) for more examples. - -#### Conic Projections - -Conic projections project the sphere onto a cone, and then unroll the cone onto the plane. Conic projections have [two standard parallels](#conic_parallels). - -<a href="#conic_parallels" name="conic_parallels">#</a> <i>conic</i>.<b>parallels</b>([<i>parallels</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/conic.js "Source") - -The [two standard parallels](https://en.wikipedia.org/wiki/Map_projection#Conic) that define the map layout in conic projections. - -<a href="#geoAlbers" name="geoAlbers">#</a> d3.<b>geoAlbers</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/albers.js "Source") - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/albers.png" width="480" height="250">](https://observablehq.com/@d3/u-s-map) - -The Albers’ equal area-conic projection. This is a U.S.-centric configuration of [d3.geoConicEqualArea](#geoConicEqualArea). - -<a href="#geoConicConformal" name="geoConicConformal">#</a> d3.<b>geoConicConformal</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/conicConformal.js "Source") -<br><a href="#geoConicConformalRaw" name="geoConicConformalRaw">#</a> d3.<b>geoConicConformalRaw</b>(<i>phi0</i>, <i>phi1</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/conicConformal.js "Source") - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/conicConformal.png" width="480" height="250">](https://observablehq.com/@d3/conic-conformal) - -The conic conformal projection. The parallels default to [30°, 30°] resulting in flat top. See also [*conic*.parallels](#conic_parallels). - -<a href="#geoConicEqualArea" name="geoConicEqualArea">#</a> d3.<b>geoConicEqualArea</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/conicEqualArea.js "Source") -<br><a href="#geoConicEqualAreaRaw" name="geoConicEqualAreaRaw">#</a> d3.<b>geoConicEqualAreaRaw</b>(<i>phi0</i>, <i>phi1</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/conicEqualArea.js "Source") - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/conicEqualArea.png" width="480" height="250">](https://observablehq.com/@d3/conic-equal-area) - -The Albers’ equal-area conic projection. See also [*conic*.parallels](#conic_parallels). - -<a href="#geoConicEquidistant" name="geoConicEquidistant">#</a> d3.<b>geoConicEquidistant</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/conicEquidistant.js "Source") -<br><a href="#geoConicEquidistantRaw" name="geoConicEquidistantRaw">#</a> d3.<b>geoConicEquidistantRaw</b>(<i>phi0</i>, <i>phi1</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/conicEquidistant.js "Source") - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/conicEquidistant.png" width="480" height="250">](https://observablehq.com/@d3/conic-equidistant) - -The conic equidistant projection. See also [*conic*.parallels](#conic_parallels). - -#### Cylindrical Projections - -Cylindrical projections project the sphere onto a containing cylinder, and then unroll the cylinder onto the plane. [Pseudocylindrical projections](https://web.archive.org/web/20150928042327/http://www.progonos.com/furuti/MapProj/Normal/ProjPCyl/projPCyl.html) are a generalization of cylindrical projections. - -<a href="#geoEquirectangular" name="geoEquirectangular">#</a> d3.<b>geoEquirectangular</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/equirectangular.js "Source") -<br><a href="#geoEquirectangularRaw" name="geoEquirectangularRaw">#</a> d3.<b>geoEquirectangularRaw</b> - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/equirectangular.png" width="480" height="250">](https://observablehq.com/@d3/equirectangular) - -The equirectangular (plate carrée) projection. - -<a href="#geoMercator" name="geoMercator">#</a> d3.<b>geoMercator</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/mercator.js "Source") -<br><a href="#geoMercatorRaw" name="geoMercatorRaw">#</a> d3.<b>geoMercatorRaw</b> - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/mercator.png" width="480" height="250">](https://observablehq.com/@d3/mercator) - -The spherical Mercator projection. Defines a default [*projection*.clipExtent](#projection_clipExtent) such that the world is projected to a square, clipped to approximately ±85° latitude. - -<a href="#geoTransverseMercator" name="geoTransverseMercator">#</a> d3.<b>geoTransverseMercator</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/transverseMercator.js "Source") -<br><a href="#geoTransverseMercatorRaw" name="geoTransverseMercatorRaw">#</a> d3.<b>geoTransverseMercatorRaw</b> - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/transverseMercator.png" width="480" height="250">](https://observablehq.com/@d3/transverse-mercator) - -The transverse spherical Mercator projection. Defines a default [*projection*.clipExtent](#projection_clipExtent) such that the world is projected to a square, clipped to approximately ±85° latitude. - -<a href="#geoNaturalEarth1" name="geoNaturalEarth1">#</a> d3.<b>geoNaturalEarth1</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/naturalEarth1.js "Source") -<br><a href="#geoNaturalEarth1Raw" name="geoNaturalEarth1Raw">#</a> d3.<b>geoNaturalEarth1Raw</b> - -[<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/naturalEarth1.png" width="480" height="250">](https://observablehq.com/@d3/natural-earth) - -The [Natural Earth projection](http://www.shadedrelief.com/NE_proj/) is a pseudocylindrical projection designed by Tom Patterson. It is neither conformal nor equal-area, but appealing to the eye for small-scale maps of the whole world. - -### Raw Projections - -Raw projections are point transformation functions that are used to implement custom projections; they typically passed to [d3.geoProjection](#geoProjection) or [d3.geoProjectionMutator](#geoProjectionMutator). They are exposed here to facilitate the derivation of related projections. Raw projections take spherical coordinates \[*lambda*, *phi*\] in radians (not degrees!) and return a point \[*x*, *y*\], typically in the unit square centered around the origin. - -<a href="#_project" name="_project">#</a> <i>project</i>(<i>lambda</i>, <i>phi</i>) - -Projects the specified point [<i>lambda</i>, <i>phi</i>] in radians, returning a new point \[*x*, *y*\] in unitless coordinates. - -<a href="#project_invert" name="project_invert">#</a> <i>project</i>.<b>invert</b>(<i>x</i>, <i>y</i>) - -The inverse of [*project*](#_project). - -<a href="#geoProjection" name="geoProjection">#</a> d3.<b>geoProjection</b>(<i>project</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -Constructs a new projection from the specified [raw projection](#_project), *project*. The *project* function takes the *longitude* and *latitude* of a given point in [radians](http://mathworld.wolfram.com/Radian.html), often referred to as *lambda* (λ) and *phi* (φ), and returns a two-element array \[*x*, *y*\] representing its unit projection. The *project* function does not need to scale or translate the point, as these are applied automatically by [*projection*.scale](#projection_scale), [*projection*.translate](#projection_translate), and [*projection*.center](#projection_center). Likewise, the *project* function does not need to perform any spherical rotation, as [*projection*.rotate](#projection_rotate) is applied prior to projection. - -For example, a spherical Mercator projection can be implemented as: - -```js -var mercator = d3.geoProjection(function(x, y) { - return [x, Math.log(Math.tan(Math.PI / 4 + y / 2))]; -}); -``` - -If the *project* function exposes an *invert* method, the returned projection will also expose [*projection*.invert](#projection_invert). - -<a href="#geoProjectionMutator" name="geoProjectionMutator">#</a> d3.<b>geoProjectionMutator</b>(<i>factory</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/projection/index.js "Source") - -Constructs a new projection from the specified [raw projection](#_project) *factory* and returns a *mutate* function to call whenever the raw projection changes. The *factory* must return a raw projection. The returned *mutate* function returns the wrapped projection. For example, a conic projection typically has two configurable parallels. A suitable *factory* function, such as [d3.geoConicEqualAreaRaw](#geoConicEqualAreaRaw), would have the form: - -```js -// y0 and y1 represent two parallels -function conicFactory(phi0, phi1) { - return function conicRaw(lambda, phi) { - return […, …]; - }; -} -``` - -Using d3.geoProjectionMutator, you can implement a standard projection that allows the parallels to be changed, reassigning the raw projection used internally by [d3.geoProjection](#geoProjection): - -```js -function conicCustom() { - var phi0 = 29.5, - phi1 = 45.5, - mutate = d3.geoProjectionMutator(conicFactory), - projection = mutate(phi0, phi1); - - projection.parallels = function(_) { - return arguments.length ? mutate(phi0 = +_[0], phi1 = +_[1]) : [phi0, phi1]; - }; - - return projection; -} -``` - -When creating a mutable projection, the *mutate* function is typically not exposed. - -### Spherical Math - -<a name="geoArea" href="#geoArea">#</a> d3.<b>geoArea</b>(<i>object</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/area.js "Source") - -Returns the spherical area of the specified GeoJSON *object* in [steradians](http://mathworld.wolfram.com/Steradian.html). This is the spherical equivalent of [*path*.area](#path_area). - -<a name="geoBounds" href="#geoBounds">#</a> d3.<b>geoBounds</b>(<i>object</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/bounds.js "Source") - -Returns the [spherical bounding box](https://www.jasondavies.com/maps/bounds/) for the specified GeoJSON *object*. The bounding box is represented by a two-dimensional array: \[\[*left*, *bottom*], \[*right*, *top*\]\], where *left* is the minimum longitude, *bottom* is the minimum latitude, *right* is maximum longitude, and *top* is the maximum latitude. All coordinates are given in degrees. (Note that in projected planar coordinates, the minimum latitude is typically the maximum *y*-value, and the maximum latitude is typically the minimum *y*-value.) This is the spherical equivalent of [*path*.bounds](#path_bounds). - -<a name="geoCentroid" href="#geoCentroid">#</a> d3.<b>geoCentroid</b>(<i>object</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/centroid.js "Source") - -Returns the spherical centroid of the specified GeoJSON *object*. This is the spherical equivalent of [*path*.centroid](#path_centroid). - -<a name="geoDistance" href="#geoDistance">#</a> d3.<b>geoDistance</b>(<i>a</i>, <i>b</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/distance.js "Source") - -Returns the great-arc distance in [radians](http://mathworld.wolfram.com/Radian.html) between the two points *a* and *b*. Each point must be specified as a two-element array \[*longitude*, *latitude*\] in degrees. This is the spherical equivalent of [*path*.measure](#path_measure) given a LineString of two points. - -<a name="geoLength" href="#geoLength">#</a> d3.<b>geoLength</b>(<i>object</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/length.js "Source") - -Returns the great-arc length of the specified GeoJSON *object* in [radians](http://mathworld.wolfram.com/Radian.html). For polygons, returns the perimeter of the exterior ring plus that of any interior rings. This is the spherical equivalent of [*path*.measure](#path_measure). - -<a name="geoInterpolate" href="#geoInterpolate">#</a> d3.<b>geoInterpolate</b>(<i>a</i>, <i>b</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/interpolate.js "Source") - -Returns an interpolator function given two points *a* and *b*. Each point must be specified as a two-element array \[*longitude*, *latitude*\] in degrees. The returned interpolator function takes a single argument *t*, where *t* is a number ranging from 0 to 1; a value of 0 returns the point *a*, while a value of 1 returns the point *b*. Intermediate values interpolate from *a* to *b* along the great arc that passes through both *a* and *b*. If *a* and *b* are antipodes, an arbitrary great arc is chosen. - -<a name="geoContains" href="#geoContains">#</a> d3.<b>geoContains</b>(<i>object</i>, <i>point</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/contains.js "Source") - -Returns true if and only if the specified GeoJSON *object* contains the specified *point*, or false if the *object* does not contain the *point*. The point must be specified as a two-element array \[*longitude*, *latitude*\] in degrees. For Point and MultiPoint geometries, an exact test is used; for a Sphere, true is always returned; for other geometries, an epsilon threshold is applied. - -<a name="geoRotation" href="#geoRotation">#</a> d3.<b>geoRotation</b>(<i>angles</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/rotation.js "Source") - -Returns a [rotation function](#_rotation) for the given *angles*, which must be a two- or three-element array of numbers [*lambda*, *phi*, *gamma*] specifying the rotation angles in degrees about [each spherical axis](https://bl.ocks.org/mbostock/4282586). (These correspond to [yaw, pitch and roll](https://en.wikipedia.org/wiki/Aircraft_principal_axes).) If the rotation angle *gamma* is omitted, it defaults to 0. See also [*projection*.rotate](#projection_rotate). - -<a name="_rotation" href="#_rotation">#</a> <i>rotation</i>(<i>point</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/rotation.js "Source") - -Returns a new array \[*longitude*, *latitude*\] in degrees representing the rotated point of the given *point*. The point must be specified as a two-element array \[*longitude*, *latitude*\] in degrees. - -<a name="rotation_invert" href="#rotation_invert">#</a> <i>rotation</i>.<b>invert</b>(<i>point</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/rotation.js "Source") - -Returns a new array \[*longitude*, *latitude*\] in degrees representing the point of the given rotated *point*; the inverse of [*rotation*](#_rotation). The point must be specified as a two-element array \[*longitude*, *latitude*\] in degrees. - -### Spherical Shapes - -To generate a [great arc](https://en.wikipedia.org/wiki/Great-circle_distance) (a segment of a great circle), simply pass a GeoJSON LineString geometry object to a [d3.geoPath](#geoPath). D3’s projections use great-arc interpolation for intermediate points, so there’s no need for a great arc shape generator. - -<a name="geoCircle" href="#geoCircle">#</a> d3.<b>geoCircle</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/circle.js "Source") - -Returns a new circle generator. - -<a name="_circle" href="#_circle">#</a> <i>circle</i>(<i>arguments…</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/circle.js "Source") - -Returns a new GeoJSON geometry object of type “Polygon†approximating a circle on the surface of a sphere, with the current [center](#circle_center), [radius](#circle_radius) and [precision](#circle_precision). Any *arguments* are passed to the accessors. - -<a name="circle_center" href="#circle_center">#</a> <i>circle</i>.<b>center</b>([<i>center</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/circle.js "Source") - -If *center* is specified, sets the circle center to the specified point \[*longitude*, *latitude*\] in degrees, and returns this circle generator. The center may also be specified as a function; this function will be invoked whenever a circle is [generated](#_circle), being passed any arguments passed to the circle generator. If *center* is not specified, returns the current center accessor, which defaults to: - -```js -function center() { - return [0, 0]; -} -``` - -<a name="circle_radius" href="#circle_radius">#</a> <i>circle</i>.<b>radius</b>([<i>radius</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/circle.js "Source") - -If *radius* is specified, sets the circle radius to the specified angle in degrees, and returns this circle generator. The radius may also be specified as a function; this function will be invoked whenever a circle is [generated](#_circle), being passed any arguments passed to the circle generator. If *radius* is not specified, returns the current radius accessor, which defaults to: - -```js -function radius() { - return 90; -} -``` - -<a name="circle_precision" href="#circle_precision">#</a> <i>circle</i>.<b>precision</b>([<i>angle</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/circle.js "Source") - -If *precision* is specified, sets the circle precision to the specified angle in degrees, and returns this circle generator. The precision may also be specified as a function; this function will be invoked whenever a circle is [generated](#_circle), being passed any arguments passed to the circle generator. If *precision* is not specified, returns the current precision accessor, which defaults to: - -```js -function precision() { - return 6; -} -``` - -Small circles do not follow great arcs and thus the generated polygon is only an approximation. Specifying a smaller precision angle improves the accuracy of the approximate polygon, but also increase the cost to generate and render it. - -<a name="geoGraticule" href="#geoGraticule">#</a> d3.<b>geoGraticule</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/graticule.js "Source") - -Constructs a geometry generator for creating graticules: a uniform grid of [meridians](https://en.wikipedia.org/wiki/Meridian_\(geography\)) and [parallels](https://en.wikipedia.org/wiki/Circle_of_latitude) for showing projection distortion. The default graticule has meridians and parallels every 10° between ±80° latitude; for the polar regions, there are meridians every 90°. - -<img src="https://raw.githubusercontent.com/d3/d3-geo/master/img/graticule.png" width="480" height="360"> - -<a name="_graticule" href="#_graticule">#</a> <i>graticule</i>() [<>](https://github.com/d3/d3-geo/blob/master/src/graticule.js "Source") - -Returns a GeoJSON MultiLineString geometry object representing all meridians and parallels for this graticule. - -<a name="graticule_lines" href="#graticule_lines">#</a> <i>graticule</i>.<b>lines</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/graticule.js "Source") - -Returns an array of GeoJSON LineString geometry objects, one for each meridian or parallel for this graticule. - -<a name="graticule_outline" href="#graticule_outline">#</a> <i>graticule</i>.<b>outline</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/graticule.js "Source") - -Returns a GeoJSON Polygon geometry object representing the outline of this graticule, i.e. along the meridians and parallels defining its extent. - -<a name="graticule_extent" href="#graticule_extent">#</a> <i>graticule</i>.<b>extent</b>([<i>extent</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/graticule.js "Source") - -If *extent* is specified, sets the major and minor extents of this graticule. If *extent* is not specified, returns the current minor extent, which defaults to ⟨⟨-180°, -80° - ε⟩, ⟨180°, 80° + ε⟩⟩. - -<a name="graticule_extentMajor" href="#graticule_extentMajor">#</a> <i>graticule</i>.<b>extentMajor</b>([<i>extent</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/graticule.js "Source") - -If *extent* is specified, sets the major extent of this graticule. If *extent* is not specified, returns the current major extent, which defaults to ⟨⟨-180°, -90° + ε⟩, ⟨180°, 90° - ε⟩⟩. - -<a name="graticule_extentMinor" href="#graticule_extentMinor">#</a> <i>graticule</i>.<b>extentMinor</b>([<i>extent</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/graticule.js "Source") - -If *extent* is specified, sets the minor extent of this graticule. If *extent* is not specified, returns the current minor extent, which defaults to ⟨⟨-180°, -80° - ε⟩, ⟨180°, 80° + ε⟩⟩. - -<a name="graticule_step" href="#graticule_step">#</a> <i>graticule</i>.<b>step</b>([<i>step</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/graticule.js "Source") - -If *step* is specified, sets the major and minor step for this graticule. If *step* is not specified, returns the current minor step, which defaults to ⟨10°, 10°⟩. - -<a name="graticule_stepMajor" href="#graticule_stepMajor">#</a> <i>graticule</i>.<b>stepMajor</b>([<i>step</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/graticule.js "Source") - -If *step* is specified, sets the major step for this graticule. If *step* is not specified, returns the current major step, which defaults to ⟨90°, 360°⟩. - -<a name="graticule_stepMinor" href="#graticule_stepMinor">#</a> <i>graticule</i>.<b>stepMinor</b>([<i>step</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/graticule.js "Source") - -If *step* is specified, sets the minor step for this graticule. If *step* is not specified, returns the current minor step, which defaults to ⟨10°, 10°⟩. - -<a name="graticule_precision" href="#graticule_precision">#</a> <i>graticule</i>.<b>precision</b>([<i>angle</i>]) [<>](https://github.com/d3/d3-geo/blob/master/src/graticule.js "Source") - -If *precision* is specified, sets the precision for this graticule, in degrees. If *precision* is not specified, returns the current precision, which defaults to 2.5°. - -<a name="geoGraticule10" href="#geoGraticule10">#</a> d3.<b>geoGraticule10</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/graticule.js "Source") - -A convenience method for directly generating the default 10° global graticule as a GeoJSON MultiLineString geometry object. Equivalent to: - -```js -function geoGraticule10() { - return d3.geoGraticule()(); -} -``` - -### Streams - -D3 transforms geometry using a sequence of function calls, rather than materializing intermediate representations, to minimize overhead. Streams must implement several methods to receive input geometry. Streams are inherently stateful; the meaning of a [point](#point) depends on whether the point is inside of a [line](#lineStart), and likewise a line is distinguished from a ring by a [polygon](#polygonStart). Despite the name “streamâ€, these method calls are currently synchronous. - -<a href="#geoStream" name="geoStream">#</a> d3.<b>geoStream</b>(<i>object</i>, <i>stream</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/stream.js "Source") - -Streams the specified [GeoJSON](http://geojson.org) *object* to the specified [projection *stream*](#projection-streams). While both features and geometry objects are supported as input, the stream interface only describes the geometry, and thus additional feature properties are not visible to streams. - -<a name="stream_point" href="#stream_point">#</a> <i>stream</i>.<b>point</b>(<i>x</i>, <i>y</i>[, <i>z</i>]) - -Indicates a point with the specified coordinates *x* and *y* (and optionally *z*). The coordinate system is unspecified and implementation-dependent; for example, [projection streams](https://github.com/d3/d3-geo-projection) require spherical coordinates in degrees as input. Outside the context of a polygon or line, a point indicates a point geometry object ([Point](http://www.geojson.org/geojson-spec.html#point) or [MultiPoint](http://www.geojson.org/geojson-spec.html#multipoint)). Within a line or polygon ring, the point indicates a control point. - -<a name="stream_lineStart" href="#stream_lineStart">#</a> <i>stream</i>.<b>lineStart</b>() - -Indicates the start of a line or ring. Within a polygon, indicates the start of a ring. The first ring of a polygon is the exterior ring, and is typically clockwise. Any subsequent rings indicate holes in the polygon, and are typically counterclockwise. - -<a name="stream_lineEnd" href="#stream_lineEnd">#</a> <i>stream</i>.<b>lineEnd</b>() - -Indicates the end of a line or ring. Within a polygon, indicates the end of a ring. Unlike GeoJSON, the redundant closing coordinate of a ring is *not* indicated via [point](#point), and instead is implied via lineEnd within a polygon. Thus, the given polygon input: - -```json -{ - "type": "Polygon", - "coordinates": [ - [[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]] - ] -} -``` - -Will produce the following series of method calls on the stream: - -```js -stream.polygonStart(); -stream.lineStart(); -stream.point(0, 0); -stream.point(0, 1); -stream.point(1, 1); -stream.point(1, 0); -stream.lineEnd(); -stream.polygonEnd(); -``` - -<a name="stream_polygonStart" href="#stream_polygonStart">#</a> <i>stream</i>.<b>polygonStart</b>() - -Indicates the start of a polygon. The first line of a polygon indicates the exterior ring, and any subsequent lines indicate interior holes. - -<a name="stream_polygonEnd" href="#stream_polygonEnd">#</a> <i>stream</i>.<b>polygonEnd</b>() - -Indicates the end of a polygon. - -<a name="stream_sphere" href="#stream_sphere">#</a> <i>stream</i>.<b>sphere</b>() - -Indicates the sphere (the globe; the unit sphere centered at ⟨0,0,0⟩). - -### Transforms - -Transforms are a generalization of projections. Transform implement [*projection*.stream](#projection_stream) and can be passed to [*path*.projection](#path_projection). However, they only implement a subset of the other projection methods, and represent arbitrary geometric transformations rather than projections from spherical to planar coordinates. - -<a href="#geoTransform" name="geoTransform">#</a> d3.<b>geoTransform</b>(<i>methods</i>) [<>](https://github.com/d3/d3-geo/blob/master/src/transform.js "Source") - -Defines an arbitrary transform using the methods defined on the specified *methods* object. Any undefined methods will use pass-through methods that propagate inputs to the output stream. For example, to reflect the *y*-dimension (see also [*identity*.reflectY](#identity_reflectY)): - -```js -var reflectY = d3.geoTransform({ - point: function(x, y) { - this.stream.point(x, -y); - } -}); -``` - -Or to define an affine matrix transformation: - -```js -function matrix(a, b, c, d, tx, ty) { - return d3.geoTransform({ - point: function(x, y) { - this.stream.point(a * x + b * y + tx, c * x + d * y + ty); - } - }); -} -``` - -<a href="#geoIdentity" name="geoIdentity">#</a> d3.<b>geoIdentity</b>() [<>](https://github.com/d3/d3-geo/blob/master/src/projection/identity.js "Source") - -The identity transform can be used to scale, translate and clip planar geometry. It implements [*projection*.scale](#projection_scale), [*projection*.translate](#projection_translate), [*projection*.fitExtent](#projection_fitExtent), [*projection*.fitSize](#projection_fitSize), [*projection*.fitWidth](#projection_fitWidth), [*projection*.fitHeight](#projection_fitHeight), [*projection*.clipExtent](#projection_clipExtent), [*projection*.angle](#projection_angle), [*projection*.reflectX](#projection_reflectX) and [*projection*.reflectY](#projection_reflectY). - -### Clipping - -Projections perform cutting or clipping of geometries in two stages. - -<a name="preclip" href="#preclip">#</a> <i>preclip</i>(<i>stream</i>) - -Pre-clipping occurs in geographic coordinates. Cutting along the antimeridian line, or clipping along a small circle are the most common strategies. - -See [*projection*.preclip](#projection_preclip). - -<a name="postclip" href="#postclip">#</a> <i>postclip</i>(<i>stream</i>) - -Post-clipping occurs on the plane, when a projection is bounded to a certain extent such as a rectangle. - -See [*projection*.postclip](#projection_postclip). - -Clipping functions are implemented as transformations of a [projection stream](#streams). Pre-clipping operates on spherical coordinates, in radians. Post-clipping operates on planar coordinates, in pixels. - -<a name="geoClipAntimeridian" href="#geoClipAntimeridian">#</a> d3.<b>geoClipAntimeridian</b> - -A clipping function which transforms a stream such that geometries (lines or polygons) that cross the antimeridian line are cut in two, one on each side. Typically used for pre-clipping. - -<a name="geoClipCircle" href="#geoClipCircle">#</a> d3.<b>geoClipCircle</b>(<i>angle</i>) - -Generates a clipping function which transforms a stream such that geometries are bounded by a small circle of radius *angle* around the projection’s [center](#projection_center). Typically used for pre-clipping. - -<a name="geoClipRectangle" href="#geoClipRectangle">#</a> d3.<b>geoClipRectangle</b>(<i>x0</i>, <i>y0</i>, <i>x1</i>, <i>y1</i>) - -Generates a clipping function which transforms a stream such that geometries are bounded by a rectangle of coordinates [[<i>x0</i>, <i>y0</i>], [<i>x1</i>, <i>y1</i>]]. Typically used for post-clipping. diff --git a/node_modules/d3-geo/dist/d3-geo.js b/node_modules/d3-geo/dist/d3-geo.js deleted file mode 100644 index 54c5643b4ae262a0a19870a4b70d55c2cdde169a..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/dist/d3-geo.js +++ /dev/null @@ -1,3127 +0,0 @@ -// https://d3js.org/d3-geo/ v2.0.1 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-array')) : -typeof define === 'function' && define.amd ? define(['exports', 'd3-array'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {}, global.d3)); -}(this, function (exports, d3Array) { 'use strict'; - -var epsilon = 1e-6; -var epsilon2 = 1e-12; -var pi = Math.PI; -var halfPi = pi / 2; -var quarterPi = pi / 4; -var tau = pi * 2; - -var degrees = 180 / pi; -var radians = pi / 180; - -var abs = Math.abs; -var atan = Math.atan; -var atan2 = Math.atan2; -var cos = Math.cos; -var ceil = Math.ceil; -var exp = Math.exp; -var hypot = Math.hypot; -var log = Math.log; -var pow = Math.pow; -var sin = Math.sin; -var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; }; -var sqrt = Math.sqrt; -var tan = Math.tan; - -function acos(x) { - return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); -} - -function asin(x) { - return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x); -} - -function haversin(x) { - return (x = sin(x / 2)) * x; -} - -function noop() {} - -function streamGeometry(geometry, stream) { - if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) { - streamGeometryType[geometry.type](geometry, stream); - } -} - -var streamObjectType = { - Feature: function(object, stream) { - streamGeometry(object.geometry, stream); - }, - FeatureCollection: function(object, stream) { - var features = object.features, i = -1, n = features.length; - while (++i < n) streamGeometry(features[i].geometry, stream); - } -}; - -var streamGeometryType = { - Sphere: function(object, stream) { - stream.sphere(); - }, - Point: function(object, stream) { - object = object.coordinates; - stream.point(object[0], object[1], object[2]); - }, - MultiPoint: function(object, stream) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]); - }, - LineString: function(object, stream) { - streamLine(object.coordinates, stream, 0); - }, - MultiLineString: function(object, stream) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) streamLine(coordinates[i], stream, 0); - }, - Polygon: function(object, stream) { - streamPolygon(object.coordinates, stream); - }, - MultiPolygon: function(object, stream) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) streamPolygon(coordinates[i], stream); - }, - GeometryCollection: function(object, stream) { - var geometries = object.geometries, i = -1, n = geometries.length; - while (++i < n) streamGeometry(geometries[i], stream); - } -}; - -function streamLine(coordinates, stream, closed) { - var i = -1, n = coordinates.length - closed, coordinate; - stream.lineStart(); - while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]); - stream.lineEnd(); -} - -function streamPolygon(coordinates, stream) { - var i = -1, n = coordinates.length; - stream.polygonStart(); - while (++i < n) streamLine(coordinates[i], stream, 1); - stream.polygonEnd(); -} - -function geoStream(object, stream) { - if (object && streamObjectType.hasOwnProperty(object.type)) { - streamObjectType[object.type](object, stream); - } else { - streamGeometry(object, stream); - } -} - -var areaRingSum = new d3Array.Adder(); - -// hello? - -var areaSum = new d3Array.Adder(), - lambda00, - phi00, - lambda0, - cosPhi0, - sinPhi0; - -var areaStream = { - point: noop, - lineStart: noop, - lineEnd: noop, - polygonStart: function() { - areaRingSum = new d3Array.Adder(); - areaStream.lineStart = areaRingStart; - areaStream.lineEnd = areaRingEnd; - }, - polygonEnd: function() { - var areaRing = +areaRingSum; - areaSum.add(areaRing < 0 ? tau + areaRing : areaRing); - this.lineStart = this.lineEnd = this.point = noop; - }, - sphere: function() { - areaSum.add(tau); - } -}; - -function areaRingStart() { - areaStream.point = areaPointFirst; -} - -function areaRingEnd() { - areaPoint(lambda00, phi00); -} - -function areaPointFirst(lambda, phi) { - areaStream.point = areaPoint; - lambda00 = lambda, phi00 = phi; - lambda *= radians, phi *= radians; - lambda0 = lambda, cosPhi0 = cos(phi = phi / 2 + quarterPi), sinPhi0 = sin(phi); -} - -function areaPoint(lambda, phi) { - lambda *= radians, phi *= radians; - phi = phi / 2 + quarterPi; // half the angular distance from south pole - - // Spherical excess E for a spherical triangle with vertices: south pole, - // previous point, current point. Uses a formula derived from Cagnoli’s - // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2). - var dLambda = lambda - lambda0, - sdLambda = dLambda >= 0 ? 1 : -1, - adLambda = sdLambda * dLambda, - cosPhi = cos(phi), - sinPhi = sin(phi), - k = sinPhi0 * sinPhi, - u = cosPhi0 * cosPhi + k * cos(adLambda), - v = k * sdLambda * sin(adLambda); - areaRingSum.add(atan2(v, u)); - - // Advance the previous points. - lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi; -} - -function area(object) { - areaSum = new d3Array.Adder(); - geoStream(object, areaStream); - return areaSum * 2; -} - -function spherical(cartesian) { - return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])]; -} - -function cartesian(spherical) { - var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi); - return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)]; -} - -function cartesianDot(a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; -} - -function cartesianCross(a, b) { - return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]]; -} - -// TODO return a -function cartesianAddInPlace(a, b) { - a[0] += b[0], a[1] += b[1], a[2] += b[2]; -} - -function cartesianScale(vector, k) { - return [vector[0] * k, vector[1] * k, vector[2] * k]; -} - -// TODO return d -function cartesianNormalizeInPlace(d) { - var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]); - d[0] /= l, d[1] /= l, d[2] /= l; -} - -var lambda0$1, phi0, lambda1, phi1, // bounds - lambda2, // previous lambda-coordinate - lambda00$1, phi00$1, // first point - p0, // previous 3D point - deltaSum, - ranges, - range; - -var boundsStream = { - point: boundsPoint, - lineStart: boundsLineStart, - lineEnd: boundsLineEnd, - polygonStart: function() { - boundsStream.point = boundsRingPoint; - boundsStream.lineStart = boundsRingStart; - boundsStream.lineEnd = boundsRingEnd; - deltaSum = new d3Array.Adder(); - areaStream.polygonStart(); - }, - polygonEnd: function() { - areaStream.polygonEnd(); - boundsStream.point = boundsPoint; - boundsStream.lineStart = boundsLineStart; - boundsStream.lineEnd = boundsLineEnd; - if (areaRingSum < 0) lambda0$1 = -(lambda1 = 180), phi0 = -(phi1 = 90); - else if (deltaSum > epsilon) phi1 = 90; - else if (deltaSum < -epsilon) phi0 = -90; - range[0] = lambda0$1, range[1] = lambda1; - }, - sphere: function() { - lambda0$1 = -(lambda1 = 180), phi0 = -(phi1 = 90); - } -}; - -function boundsPoint(lambda, phi) { - ranges.push(range = [lambda0$1 = lambda, lambda1 = lambda]); - if (phi < phi0) phi0 = phi; - if (phi > phi1) phi1 = phi; -} - -function linePoint(lambda, phi) { - var p = cartesian([lambda * radians, phi * radians]); - if (p0) { - var normal = cartesianCross(p0, p), - equatorial = [normal[1], -normal[0], 0], - inflection = cartesianCross(equatorial, normal); - cartesianNormalizeInPlace(inflection); - inflection = spherical(inflection); - var delta = lambda - lambda2, - sign = delta > 0 ? 1 : -1, - lambdai = inflection[0] * degrees * sign, - phii, - antimeridian = abs(delta) > 180; - if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) { - phii = inflection[1] * degrees; - if (phii > phi1) phi1 = phii; - } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) { - phii = -inflection[1] * degrees; - if (phii < phi0) phi0 = phii; - } else { - if (phi < phi0) phi0 = phi; - if (phi > phi1) phi1 = phi; - } - if (antimeridian) { - if (lambda < lambda2) { - if (angle(lambda0$1, lambda) > angle(lambda0$1, lambda1)) lambda1 = lambda; - } else { - if (angle(lambda, lambda1) > angle(lambda0$1, lambda1)) lambda0$1 = lambda; - } - } else { - if (lambda1 >= lambda0$1) { - if (lambda < lambda0$1) lambda0$1 = lambda; - if (lambda > lambda1) lambda1 = lambda; - } else { - if (lambda > lambda2) { - if (angle(lambda0$1, lambda) > angle(lambda0$1, lambda1)) lambda1 = lambda; - } else { - if (angle(lambda, lambda1) > angle(lambda0$1, lambda1)) lambda0$1 = lambda; - } - } - } - } else { - ranges.push(range = [lambda0$1 = lambda, lambda1 = lambda]); - } - if (phi < phi0) phi0 = phi; - if (phi > phi1) phi1 = phi; - p0 = p, lambda2 = lambda; -} - -function boundsLineStart() { - boundsStream.point = linePoint; -} - -function boundsLineEnd() { - range[0] = lambda0$1, range[1] = lambda1; - boundsStream.point = boundsPoint; - p0 = null; -} - -function boundsRingPoint(lambda, phi) { - if (p0) { - var delta = lambda - lambda2; - deltaSum.add(abs(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta); - } else { - lambda00$1 = lambda, phi00$1 = phi; - } - areaStream.point(lambda, phi); - linePoint(lambda, phi); -} - -function boundsRingStart() { - areaStream.lineStart(); -} - -function boundsRingEnd() { - boundsRingPoint(lambda00$1, phi00$1); - areaStream.lineEnd(); - if (abs(deltaSum) > epsilon) lambda0$1 = -(lambda1 = 180); - range[0] = lambda0$1, range[1] = lambda1; - p0 = null; -} - -// Finds the left-right distance between two longitudes. -// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want -// the distance between ±180° to be 360°. -function angle(lambda0, lambda1) { - return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1; -} - -function rangeCompare(a, b) { - return a[0] - b[0]; -} - -function rangeContains(range, x) { - return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x; -} - -function bounds(feature) { - var i, n, a, b, merged, deltaMax, delta; - - phi1 = lambda1 = -(lambda0$1 = phi0 = Infinity); - ranges = []; - geoStream(feature, boundsStream); - - // First, sort ranges by their minimum longitudes. - if (n = ranges.length) { - ranges.sort(rangeCompare); - - // Then, merge any ranges that overlap. - for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) { - b = ranges[i]; - if (rangeContains(a, b[0]) || rangeContains(a, b[1])) { - if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1]; - if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0]; - } else { - merged.push(a = b); - } - } - - // Finally, find the largest gap between the merged ranges. - // The final bounding box will be the inverse of this gap. - for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) { - b = merged[i]; - if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0$1 = b[0], lambda1 = a[1]; - } - } - - ranges = range = null; - - return lambda0$1 === Infinity || phi0 === Infinity - ? [[NaN, NaN], [NaN, NaN]] - : [[lambda0$1, phi0], [lambda1, phi1]]; -} - -var W0, W1, - X0, Y0, Z0, - X1, Y1, Z1, - X2, Y2, Z2, - lambda00$2, phi00$2, // first point - x0, y0, z0; // previous point - -var centroidStream = { - sphere: noop, - point: centroidPoint, - lineStart: centroidLineStart, - lineEnd: centroidLineEnd, - polygonStart: function() { - centroidStream.lineStart = centroidRingStart; - centroidStream.lineEnd = centroidRingEnd; - }, - polygonEnd: function() { - centroidStream.lineStart = centroidLineStart; - centroidStream.lineEnd = centroidLineEnd; - } -}; - -// Arithmetic mean of Cartesian vectors. -function centroidPoint(lambda, phi) { - lambda *= radians, phi *= radians; - var cosPhi = cos(phi); - centroidPointCartesian(cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)); -} - -function centroidPointCartesian(x, y, z) { - ++W0; - X0 += (x - X0) / W0; - Y0 += (y - Y0) / W0; - Z0 += (z - Z0) / W0; -} - -function centroidLineStart() { - centroidStream.point = centroidLinePointFirst; -} - -function centroidLinePointFirst(lambda, phi) { - lambda *= radians, phi *= radians; - var cosPhi = cos(phi); - x0 = cosPhi * cos(lambda); - y0 = cosPhi * sin(lambda); - z0 = sin(phi); - centroidStream.point = centroidLinePoint; - centroidPointCartesian(x0, y0, z0); -} - -function centroidLinePoint(lambda, phi) { - lambda *= radians, phi *= radians; - var cosPhi = cos(phi), - x = cosPhi * cos(lambda), - y = cosPhi * sin(lambda), - z = sin(phi), - w = atan2(sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z); - W1 += w; - X1 += w * (x0 + (x0 = x)); - Y1 += w * (y0 + (y0 = y)); - Z1 += w * (z0 + (z0 = z)); - centroidPointCartesian(x0, y0, z0); -} - -function centroidLineEnd() { - centroidStream.point = centroidPoint; -} - -// See J. E. Brock, The Inertia Tensor for a Spherical Triangle, -// J. Applied Mechanics 42, 239 (1975). -function centroidRingStart() { - centroidStream.point = centroidRingPointFirst; -} - -function centroidRingEnd() { - centroidRingPoint(lambda00$2, phi00$2); - centroidStream.point = centroidPoint; -} - -function centroidRingPointFirst(lambda, phi) { - lambda00$2 = lambda, phi00$2 = phi; - lambda *= radians, phi *= radians; - centroidStream.point = centroidRingPoint; - var cosPhi = cos(phi); - x0 = cosPhi * cos(lambda); - y0 = cosPhi * sin(lambda); - z0 = sin(phi); - centroidPointCartesian(x0, y0, z0); -} - -function centroidRingPoint(lambda, phi) { - lambda *= radians, phi *= radians; - var cosPhi = cos(phi), - x = cosPhi * cos(lambda), - y = cosPhi * sin(lambda), - z = sin(phi), - cx = y0 * z - z0 * y, - cy = z0 * x - x0 * z, - cz = x0 * y - y0 * x, - m = hypot(cx, cy, cz), - w = asin(m), // line weight = angle - v = m && -w / m; // area weight multiplier - X2.add(v * cx); - Y2.add(v * cy); - Z2.add(v * cz); - W1 += w; - X1 += w * (x0 + (x0 = x)); - Y1 += w * (y0 + (y0 = y)); - Z1 += w * (z0 + (z0 = z)); - centroidPointCartesian(x0, y0, z0); -} - -function centroid(object) { - W0 = W1 = - X0 = Y0 = Z0 = - X1 = Y1 = Z1 = 0; - X2 = new d3Array.Adder(); - Y2 = new d3Array.Adder(); - Z2 = new d3Array.Adder(); - geoStream(object, centroidStream); - - var x = +X2, - y = +Y2, - z = +Z2, - m = hypot(x, y, z); - - // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid. - if (m < epsilon2) { - x = X1, y = Y1, z = Z1; - // If the feature has zero length, fall back to arithmetic mean of point vectors. - if (W1 < epsilon) x = X0, y = Y0, z = Z0; - m = hypot(x, y, z); - // If the feature still has an undefined ccentroid, then return. - if (m < epsilon2) return [NaN, NaN]; - } - - return [atan2(y, x) * degrees, asin(z / m) * degrees]; -} - -function constant(x) { - return function() { - return x; - }; -} - -function compose(a, b) { - - function compose(x, y) { - return x = a(x, y), b(x[0], x[1]); - } - - if (a.invert && b.invert) compose.invert = function(x, y) { - return x = b.invert(x, y), x && a.invert(x[0], x[1]); - }; - - return compose; -} - -function rotationIdentity(lambda, phi) { - return [abs(lambda) > pi ? lambda + Math.round(-lambda / tau) * tau : lambda, phi]; -} - -rotationIdentity.invert = rotationIdentity; - -function rotateRadians(deltaLambda, deltaPhi, deltaGamma) { - return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma)) - : rotationLambda(deltaLambda)) - : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma) - : rotationIdentity); -} - -function forwardRotationLambda(deltaLambda) { - return function(lambda, phi) { - return lambda += deltaLambda, [lambda > pi ? lambda - tau : lambda < -pi ? lambda + tau : lambda, phi]; - }; -} - -function rotationLambda(deltaLambda) { - var rotation = forwardRotationLambda(deltaLambda); - rotation.invert = forwardRotationLambda(-deltaLambda); - return rotation; -} - -function rotationPhiGamma(deltaPhi, deltaGamma) { - var cosDeltaPhi = cos(deltaPhi), - sinDeltaPhi = sin(deltaPhi), - cosDeltaGamma = cos(deltaGamma), - sinDeltaGamma = sin(deltaGamma); - - function rotation(lambda, phi) { - var cosPhi = cos(phi), - x = cos(lambda) * cosPhi, - y = sin(lambda) * cosPhi, - z = sin(phi), - k = z * cosDeltaPhi + x * sinDeltaPhi; - return [ - atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi), - asin(k * cosDeltaGamma + y * sinDeltaGamma) - ]; - } - - rotation.invert = function(lambda, phi) { - var cosPhi = cos(phi), - x = cos(lambda) * cosPhi, - y = sin(lambda) * cosPhi, - z = sin(phi), - k = z * cosDeltaGamma - y * sinDeltaGamma; - return [ - atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi), - asin(k * cosDeltaPhi - x * sinDeltaPhi) - ]; - }; - - return rotation; -} - -function rotation(rotate) { - rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0); - - function forward(coordinates) { - coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians); - return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates; - } - - forward.invert = function(coordinates) { - coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians); - return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates; - }; - - return forward; -} - -// Generates a circle centered at [0°, 0°], with a given radius and precision. -function circleStream(stream, radius, delta, direction, t0, t1) { - if (!delta) return; - var cosRadius = cos(radius), - sinRadius = sin(radius), - step = direction * delta; - if (t0 == null) { - t0 = radius + direction * tau; - t1 = radius - step / 2; - } else { - t0 = circleRadius(cosRadius, t0); - t1 = circleRadius(cosRadius, t1); - if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau; - } - for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) { - point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]); - stream.point(point[0], point[1]); - } -} - -// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0]. -function circleRadius(cosRadius, point) { - point = cartesian(point), point[0] -= cosRadius; - cartesianNormalizeInPlace(point); - var radius = acos(-point[1]); - return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau; -} - -function circle() { - var center = constant([0, 0]), - radius = constant(90), - precision = constant(6), - ring, - rotate, - stream = {point: point}; - - function point(x, y) { - ring.push(x = rotate(x, y)); - x[0] *= degrees, x[1] *= degrees; - } - - function circle() { - var c = center.apply(this, arguments), - r = radius.apply(this, arguments) * radians, - p = precision.apply(this, arguments) * radians; - ring = []; - rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert; - circleStream(stream, r, p, 1); - c = {type: "Polygon", coordinates: [ring]}; - ring = rotate = null; - return c; - } - - circle.center = function(_) { - return arguments.length ? (center = typeof _ === "function" ? _ : constant([+_[0], +_[1]]), circle) : center; - }; - - circle.radius = function(_) { - return arguments.length ? (radius = typeof _ === "function" ? _ : constant(+_), circle) : radius; - }; - - circle.precision = function(_) { - return arguments.length ? (precision = typeof _ === "function" ? _ : constant(+_), circle) : precision; - }; - - return circle; -} - -function clipBuffer() { - var lines = [], - line; - return { - point: function(x, y, m) { - line.push([x, y, m]); - }, - lineStart: function() { - lines.push(line = []); - }, - lineEnd: noop, - rejoin: function() { - if (lines.length > 1) lines.push(lines.pop().concat(lines.shift())); - }, - result: function() { - var result = lines; - lines = []; - line = null; - return result; - } - }; -} - -function pointEqual(a, b) { - return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon; -} - -function Intersection(point, points, other, entry) { - this.x = point; - this.z = points; - this.o = other; // another intersection - this.e = entry; // is an entry? - this.v = false; // visited - this.n = this.p = null; // next & previous -} - -// A generalized polygon clipping algorithm: given a polygon that has been cut -// into its visible line segments, and rejoins the segments by interpolating -// along the clip edge. -function clipRejoin(segments, compareIntersection, startInside, interpolate, stream) { - var subject = [], - clip = [], - i, - n; - - segments.forEach(function(segment) { - if ((n = segment.length - 1) <= 0) return; - var n, p0 = segment[0], p1 = segment[n], x; - - if (pointEqual(p0, p1)) { - if (!p0[2] && !p1[2]) { - stream.lineStart(); - for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]); - stream.lineEnd(); - return; - } - // handle degenerate cases by moving the point - p1[0] += 2 * epsilon; - } - - subject.push(x = new Intersection(p0, segment, null, true)); - clip.push(x.o = new Intersection(p0, null, x, false)); - subject.push(x = new Intersection(p1, segment, null, false)); - clip.push(x.o = new Intersection(p1, null, x, true)); - }); - - if (!subject.length) return; - - clip.sort(compareIntersection); - link(subject); - link(clip); - - for (i = 0, n = clip.length; i < n; ++i) { - clip[i].e = startInside = !startInside; - } - - var start = subject[0], - points, - point; - - while (1) { - // Find first unvisited intersection. - var current = start, - isSubject = true; - while (current.v) if ((current = current.n) === start) return; - points = current.z; - stream.lineStart(); - do { - current.v = current.o.v = true; - if (current.e) { - if (isSubject) { - for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]); - } else { - interpolate(current.x, current.n.x, 1, stream); - } - current = current.n; - } else { - if (isSubject) { - points = current.p.z; - for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]); - } else { - interpolate(current.x, current.p.x, -1, stream); - } - current = current.p; - } - current = current.o; - points = current.z; - isSubject = !isSubject; - } while (!current.v); - stream.lineEnd(); - } -} - -function link(array) { - if (!(n = array.length)) return; - var n, - i = 0, - a = array[0], - b; - while (++i < n) { - a.n = b = array[i]; - b.p = a; - a = b; - } - a.n = b = array[0]; - b.p = a; -} - -function longitude(point) { - if (abs(point[0]) <= pi) - return point[0]; - else - return sign(point[0]) * ((abs(point[0]) + pi) % tau - pi); -} - -function polygonContains(polygon, point) { - var lambda = longitude(point), - phi = point[1], - sinPhi = sin(phi), - normal = [sin(lambda), -cos(lambda), 0], - angle = 0, - winding = 0; - - var sum = new d3Array.Adder(); - - if (sinPhi === 1) phi = halfPi + epsilon; - else if (sinPhi === -1) phi = -halfPi - epsilon; - - for (var i = 0, n = polygon.length; i < n; ++i) { - if (!(m = (ring = polygon[i]).length)) continue; - var ring, - m, - point0 = ring[m - 1], - lambda0 = longitude(point0), - phi0 = point0[1] / 2 + quarterPi, - sinPhi0 = sin(phi0), - cosPhi0 = cos(phi0); - - for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) { - var point1 = ring[j], - lambda1 = longitude(point1), - phi1 = point1[1] / 2 + quarterPi, - sinPhi1 = sin(phi1), - cosPhi1 = cos(phi1), - delta = lambda1 - lambda0, - sign = delta >= 0 ? 1 : -1, - absDelta = sign * delta, - antimeridian = absDelta > pi, - k = sinPhi0 * sinPhi1; - - sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta))); - angle += antimeridian ? delta + sign * tau : delta; - - // Are the longitudes either side of the point’s meridian (lambda), - // and are the latitudes smaller than the parallel (phi)? - if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) { - var arc = cartesianCross(cartesian(point0), cartesian(point1)); - cartesianNormalizeInPlace(arc); - var intersection = cartesianCross(normal, arc); - cartesianNormalizeInPlace(intersection); - var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]); - if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) { - winding += antimeridian ^ delta >= 0 ? 1 : -1; - } - } - } - } - - // First, determine whether the South pole is inside or outside: - // - // It is inside if: - // * the polygon winds around it in a clockwise direction. - // * the polygon does not (cumulatively) wind around it, but has a negative - // (counter-clockwise) area. - // - // Second, count the (signed) number of times a segment crosses a lambda - // from the point to the South pole. If it is zero, then the point is the - // same side as the South pole. - - return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1); -} - -function clip(pointVisible, clipLine, interpolate, start) { - return function(sink) { - var line = clipLine(sink), - ringBuffer = clipBuffer(), - ringSink = clipLine(ringBuffer), - polygonStarted = false, - polygon, - segments, - ring; - - var clip = { - point: point, - lineStart: lineStart, - lineEnd: lineEnd, - polygonStart: function() { - clip.point = pointRing; - clip.lineStart = ringStart; - clip.lineEnd = ringEnd; - segments = []; - polygon = []; - }, - polygonEnd: function() { - clip.point = point; - clip.lineStart = lineStart; - clip.lineEnd = lineEnd; - segments = d3Array.merge(segments); - var startInside = polygonContains(polygon, start); - if (segments.length) { - if (!polygonStarted) sink.polygonStart(), polygonStarted = true; - clipRejoin(segments, compareIntersection, startInside, interpolate, sink); - } else if (startInside) { - if (!polygonStarted) sink.polygonStart(), polygonStarted = true; - sink.lineStart(); - interpolate(null, null, 1, sink); - sink.lineEnd(); - } - if (polygonStarted) sink.polygonEnd(), polygonStarted = false; - segments = polygon = null; - }, - sphere: function() { - sink.polygonStart(); - sink.lineStart(); - interpolate(null, null, 1, sink); - sink.lineEnd(); - sink.polygonEnd(); - } - }; - - function point(lambda, phi) { - if (pointVisible(lambda, phi)) sink.point(lambda, phi); - } - - function pointLine(lambda, phi) { - line.point(lambda, phi); - } - - function lineStart() { - clip.point = pointLine; - line.lineStart(); - } - - function lineEnd() { - clip.point = point; - line.lineEnd(); - } - - function pointRing(lambda, phi) { - ring.push([lambda, phi]); - ringSink.point(lambda, phi); - } - - function ringStart() { - ringSink.lineStart(); - ring = []; - } - - function ringEnd() { - pointRing(ring[0][0], ring[0][1]); - ringSink.lineEnd(); - - var clean = ringSink.clean(), - ringSegments = ringBuffer.result(), - i, n = ringSegments.length, m, - segment, - point; - - ring.pop(); - polygon.push(ring); - ring = null; - - if (!n) return; - - // No intersections. - if (clean & 1) { - segment = ringSegments[0]; - if ((m = segment.length - 1) > 0) { - if (!polygonStarted) sink.polygonStart(), polygonStarted = true; - sink.lineStart(); - for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]); - sink.lineEnd(); - } - return; - } - - // Rejoin connected segments. - // TODO reuse ringBuffer.rejoin()? - if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift())); - - segments.push(ringSegments.filter(validSegment)); - } - - return clip; - }; -} - -function validSegment(segment) { - return segment.length > 1; -} - -// Intersections are sorted along the clip edge. For both antimeridian cutting -// and circle clipping, the same comparison is used. -function compareIntersection(a, b) { - return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1]) - - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]); -} - -var clipAntimeridian = clip( - function() { return true; }, - clipAntimeridianLine, - clipAntimeridianInterpolate, - [-pi, -halfPi] -); - -// Takes a line and cuts into visible segments. Return values: 0 - there were -// intersections or the line was empty; 1 - no intersections; 2 - there were -// intersections, and the first and last segments should be rejoined. -function clipAntimeridianLine(stream) { - var lambda0 = NaN, - phi0 = NaN, - sign0 = NaN, - clean; // no intersections - - return { - lineStart: function() { - stream.lineStart(); - clean = 1; - }, - point: function(lambda1, phi1) { - var sign1 = lambda1 > 0 ? pi : -pi, - delta = abs(lambda1 - lambda0); - if (abs(delta - pi) < epsilon) { // line crosses a pole - stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi); - stream.point(sign0, phi0); - stream.lineEnd(); - stream.lineStart(); - stream.point(sign1, phi0); - stream.point(lambda1, phi0); - clean = 0; - } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian - if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies - if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon; - phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1); - stream.point(sign0, phi0); - stream.lineEnd(); - stream.lineStart(); - stream.point(sign1, phi0); - clean = 0; - } - stream.point(lambda0 = lambda1, phi0 = phi1); - sign0 = sign1; - }, - lineEnd: function() { - stream.lineEnd(); - lambda0 = phi0 = NaN; - }, - clean: function() { - return 2 - clean; // if intersections, rejoin first and last segments - } - }; -} - -function clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) { - var cosPhi0, - cosPhi1, - sinLambda0Lambda1 = sin(lambda0 - lambda1); - return abs(sinLambda0Lambda1) > epsilon - ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1) - - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0)) - / (cosPhi0 * cosPhi1 * sinLambda0Lambda1)) - : (phi0 + phi1) / 2; -} - -function clipAntimeridianInterpolate(from, to, direction, stream) { - var phi; - if (from == null) { - phi = direction * halfPi; - stream.point(-pi, phi); - stream.point(0, phi); - stream.point(pi, phi); - stream.point(pi, 0); - stream.point(pi, -phi); - stream.point(0, -phi); - stream.point(-pi, -phi); - stream.point(-pi, 0); - stream.point(-pi, phi); - } else if (abs(from[0] - to[0]) > epsilon) { - var lambda = from[0] < to[0] ? pi : -pi; - phi = direction * lambda / 2; - stream.point(-lambda, phi); - stream.point(0, phi); - stream.point(lambda, phi); - } else { - stream.point(to[0], to[1]); - } -} - -function clipCircle(radius) { - var cr = cos(radius), - delta = 6 * radians, - smallRadius = cr > 0, - notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case - - function interpolate(from, to, direction, stream) { - circleStream(stream, radius, delta, direction, from, to); - } - - function visible(lambda, phi) { - return cos(lambda) * cos(phi) > cr; - } - - // Takes a line and cuts into visible segments. Return values used for polygon - // clipping: 0 - there were intersections or the line was empty; 1 - no - // intersections 2 - there were intersections, and the first and last segments - // should be rejoined. - function clipLine(stream) { - var point0, // previous point - c0, // code for previous point - v0, // visibility of previous point - v00, // visibility of first point - clean; // no intersections - return { - lineStart: function() { - v00 = v0 = false; - clean = 1; - }, - point: function(lambda, phi) { - var point1 = [lambda, phi], - point2, - v = visible(lambda, phi), - c = smallRadius - ? v ? 0 : code(lambda, phi) - : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0; - if (!point0 && (v00 = v0 = v)) stream.lineStart(); - if (v !== v0) { - point2 = intersect(point0, point1); - if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2)) - point1[2] = 1; - } - if (v !== v0) { - clean = 0; - if (v) { - // outside going in - stream.lineStart(); - point2 = intersect(point1, point0); - stream.point(point2[0], point2[1]); - } else { - // inside going out - point2 = intersect(point0, point1); - stream.point(point2[0], point2[1], 2); - stream.lineEnd(); - } - point0 = point2; - } else if (notHemisphere && point0 && smallRadius ^ v) { - var t; - // If the codes for two points are different, or are both zero, - // and there this segment intersects with the small circle. - if (!(c & c0) && (t = intersect(point1, point0, true))) { - clean = 0; - if (smallRadius) { - stream.lineStart(); - stream.point(t[0][0], t[0][1]); - stream.point(t[1][0], t[1][1]); - stream.lineEnd(); - } else { - stream.point(t[1][0], t[1][1]); - stream.lineEnd(); - stream.lineStart(); - stream.point(t[0][0], t[0][1], 3); - } - } - } - if (v && (!point0 || !pointEqual(point0, point1))) { - stream.point(point1[0], point1[1]); - } - point0 = point1, v0 = v, c0 = c; - }, - lineEnd: function() { - if (v0) stream.lineEnd(); - point0 = null; - }, - // Rejoin first and last segments if there were intersections and the first - // and last points were visible. - clean: function() { - return clean | ((v00 && v0) << 1); - } - }; - } - - // Intersects the great circle between a and b with the clip circle. - function intersect(a, b, two) { - var pa = cartesian(a), - pb = cartesian(b); - - // We have two planes, n1.p = d1 and n2.p = d2. - // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2). - var n1 = [1, 0, 0], // normal - n2 = cartesianCross(pa, pb), - n2n2 = cartesianDot(n2, n2), - n1n2 = n2[0], // cartesianDot(n1, n2), - determinant = n2n2 - n1n2 * n1n2; - - // Two polar points. - if (!determinant) return !two && a; - - var c1 = cr * n2n2 / determinant, - c2 = -cr * n1n2 / determinant, - n1xn2 = cartesianCross(n1, n2), - A = cartesianScale(n1, c1), - B = cartesianScale(n2, c2); - cartesianAddInPlace(A, B); - - // Solve |p(t)|^2 = 1. - var u = n1xn2, - w = cartesianDot(A, u), - uu = cartesianDot(u, u), - t2 = w * w - uu * (cartesianDot(A, A) - 1); - - if (t2 < 0) return; - - var t = sqrt(t2), - q = cartesianScale(u, (-w - t) / uu); - cartesianAddInPlace(q, A); - q = spherical(q); - - if (!two) return q; - - // Two intersection points. - var lambda0 = a[0], - lambda1 = b[0], - phi0 = a[1], - phi1 = b[1], - z; - - if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z; - - var delta = lambda1 - lambda0, - polar = abs(delta - pi) < epsilon, - meridian = polar || delta < epsilon; - - if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z; - - // Check that the first point is between a and b. - if (meridian - ? polar - ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1) - : phi0 <= q[1] && q[1] <= phi1 - : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) { - var q1 = cartesianScale(u, (-w + t) / uu); - cartesianAddInPlace(q1, A); - return [q, spherical(q1)]; - } - } - - // Generates a 4-bit vector representing the location of a point relative to - // the small circle's bounding box. - function code(lambda, phi) { - var r = smallRadius ? radius : pi - radius, - code = 0; - if (lambda < -r) code |= 1; // left - else if (lambda > r) code |= 2; // right - if (phi < -r) code |= 4; // below - else if (phi > r) code |= 8; // above - return code; - } - - return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]); -} - -function clipLine(a, b, x0, y0, x1, y1) { - var ax = a[0], - ay = a[1], - bx = b[0], - by = b[1], - t0 = 0, - t1 = 1, - dx = bx - ax, - dy = by - ay, - r; - - r = x0 - ax; - if (!dx && r > 0) return; - r /= dx; - if (dx < 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } else if (dx > 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } - - r = x1 - ax; - if (!dx && r < 0) return; - r /= dx; - if (dx < 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } else if (dx > 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } - - r = y0 - ay; - if (!dy && r > 0) return; - r /= dy; - if (dy < 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } else if (dy > 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } - - r = y1 - ay; - if (!dy && r < 0) return; - r /= dy; - if (dy < 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } else if (dy > 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } - - if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy; - if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy; - return true; -} - -var clipMax = 1e9, clipMin = -clipMax; - -// TODO Use d3-polygon’s polygonContains here for the ring check? -// TODO Eliminate duplicate buffering in clipBuffer and polygon.push? - -function clipRectangle(x0, y0, x1, y1) { - - function visible(x, y) { - return x0 <= x && x <= x1 && y0 <= y && y <= y1; - } - - function interpolate(from, to, direction, stream) { - var a = 0, a1 = 0; - if (from == null - || (a = corner(from, direction)) !== (a1 = corner(to, direction)) - || comparePoint(from, to) < 0 ^ direction > 0) { - do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0); - while ((a = (a + direction + 4) % 4) !== a1); - } else { - stream.point(to[0], to[1]); - } - } - - function corner(p, direction) { - return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3 - : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1 - : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0 - : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon - } - - function compareIntersection(a, b) { - return comparePoint(a.x, b.x); - } - - function comparePoint(a, b) { - var ca = corner(a, 1), - cb = corner(b, 1); - return ca !== cb ? ca - cb - : ca === 0 ? b[1] - a[1] - : ca === 1 ? a[0] - b[0] - : ca === 2 ? a[1] - b[1] - : b[0] - a[0]; - } - - return function(stream) { - var activeStream = stream, - bufferStream = clipBuffer(), - segments, - polygon, - ring, - x__, y__, v__, // first point - x_, y_, v_, // previous point - first, - clean; - - var clipStream = { - point: point, - lineStart: lineStart, - lineEnd: lineEnd, - polygonStart: polygonStart, - polygonEnd: polygonEnd - }; - - function point(x, y) { - if (visible(x, y)) activeStream.point(x, y); - } - - function polygonInside() { - var winding = 0; - - for (var i = 0, n = polygon.length; i < n; ++i) { - for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) { - a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1]; - if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; } - else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; } - } - } - - return winding; - } - - // Buffer geometry within a polygon and then clip it en masse. - function polygonStart() { - activeStream = bufferStream, segments = [], polygon = [], clean = true; - } - - function polygonEnd() { - var startInside = polygonInside(), - cleanInside = clean && startInside, - visible = (segments = d3Array.merge(segments)).length; - if (cleanInside || visible) { - stream.polygonStart(); - if (cleanInside) { - stream.lineStart(); - interpolate(null, null, 1, stream); - stream.lineEnd(); - } - if (visible) { - clipRejoin(segments, compareIntersection, startInside, interpolate, stream); - } - stream.polygonEnd(); - } - activeStream = stream, segments = polygon = ring = null; - } - - function lineStart() { - clipStream.point = linePoint; - if (polygon) polygon.push(ring = []); - first = true; - v_ = false; - x_ = y_ = NaN; - } - - // TODO rather than special-case polygons, simply handle them separately. - // Ideally, coincident intersection points should be jittered to avoid - // clipping issues. - function lineEnd() { - if (segments) { - linePoint(x__, y__); - if (v__ && v_) bufferStream.rejoin(); - segments.push(bufferStream.result()); - } - clipStream.point = point; - if (v_) activeStream.lineEnd(); - } - - function linePoint(x, y) { - var v = visible(x, y); - if (polygon) ring.push([x, y]); - if (first) { - x__ = x, y__ = y, v__ = v; - first = false; - if (v) { - activeStream.lineStart(); - activeStream.point(x, y); - } - } else { - if (v && v_) activeStream.point(x, y); - else { - var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))], - b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))]; - if (clipLine(a, b, x0, y0, x1, y1)) { - if (!v_) { - activeStream.lineStart(); - activeStream.point(a[0], a[1]); - } - activeStream.point(b[0], b[1]); - if (!v) activeStream.lineEnd(); - clean = false; - } else if (v) { - activeStream.lineStart(); - activeStream.point(x, y); - clean = false; - } - } - } - x_ = x, y_ = y, v_ = v; - } - - return clipStream; - }; -} - -function extent() { - var x0 = 0, - y0 = 0, - x1 = 960, - y1 = 500, - cache, - cacheStream, - clip; - - return clip = { - stream: function(stream) { - return cache && cacheStream === stream ? cache : cache = clipRectangle(x0, y0, x1, y1)(cacheStream = stream); - }, - extent: function(_) { - return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]]; - } - }; -} - -var lengthSum, - lambda0$2, - sinPhi0$1, - cosPhi0$1; - -var lengthStream = { - sphere: noop, - point: noop, - lineStart: lengthLineStart, - lineEnd: noop, - polygonStart: noop, - polygonEnd: noop -}; - -function lengthLineStart() { - lengthStream.point = lengthPointFirst; - lengthStream.lineEnd = lengthLineEnd; -} - -function lengthLineEnd() { - lengthStream.point = lengthStream.lineEnd = noop; -} - -function lengthPointFirst(lambda, phi) { - lambda *= radians, phi *= radians; - lambda0$2 = lambda, sinPhi0$1 = sin(phi), cosPhi0$1 = cos(phi); - lengthStream.point = lengthPoint; -} - -function lengthPoint(lambda, phi) { - lambda *= radians, phi *= radians; - var sinPhi = sin(phi), - cosPhi = cos(phi), - delta = abs(lambda - lambda0$2), - cosDelta = cos(delta), - sinDelta = sin(delta), - x = cosPhi * sinDelta, - y = cosPhi0$1 * sinPhi - sinPhi0$1 * cosPhi * cosDelta, - z = sinPhi0$1 * sinPhi + cosPhi0$1 * cosPhi * cosDelta; - lengthSum.add(atan2(sqrt(x * x + y * y), z)); - lambda0$2 = lambda, sinPhi0$1 = sinPhi, cosPhi0$1 = cosPhi; -} - -function length(object) { - lengthSum = new d3Array.Adder(); - geoStream(object, lengthStream); - return +lengthSum; -} - -var coordinates = [null, null], - object = {type: "LineString", coordinates: coordinates}; - -function distance(a, b) { - coordinates[0] = a; - coordinates[1] = b; - return length(object); -} - -var containsObjectType = { - Feature: function(object, point) { - return containsGeometry(object.geometry, point); - }, - FeatureCollection: function(object, point) { - var features = object.features, i = -1, n = features.length; - while (++i < n) if (containsGeometry(features[i].geometry, point)) return true; - return false; - } -}; - -var containsGeometryType = { - Sphere: function() { - return true; - }, - Point: function(object, point) { - return containsPoint(object.coordinates, point); - }, - MultiPoint: function(object, point) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) if (containsPoint(coordinates[i], point)) return true; - return false; - }, - LineString: function(object, point) { - return containsLine(object.coordinates, point); - }, - MultiLineString: function(object, point) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) if (containsLine(coordinates[i], point)) return true; - return false; - }, - Polygon: function(object, point) { - return containsPolygon(object.coordinates, point); - }, - MultiPolygon: function(object, point) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) if (containsPolygon(coordinates[i], point)) return true; - return false; - }, - GeometryCollection: function(object, point) { - var geometries = object.geometries, i = -1, n = geometries.length; - while (++i < n) if (containsGeometry(geometries[i], point)) return true; - return false; - } -}; - -function containsGeometry(geometry, point) { - return geometry && containsGeometryType.hasOwnProperty(geometry.type) - ? containsGeometryType[geometry.type](geometry, point) - : false; -} - -function containsPoint(coordinates, point) { - return distance(coordinates, point) === 0; -} - -function containsLine(coordinates, point) { - var ao, bo, ab; - for (var i = 0, n = coordinates.length; i < n; i++) { - bo = distance(coordinates[i], point); - if (bo === 0) return true; - if (i > 0) { - ab = distance(coordinates[i], coordinates[i - 1]); - if ( - ab > 0 && - ao <= ab && - bo <= ab && - (ao + bo - ab) * (1 - Math.pow((ao - bo) / ab, 2)) < epsilon2 * ab - ) - return true; - } - ao = bo; - } - return false; -} - -function containsPolygon(coordinates, point) { - return !!polygonContains(coordinates.map(ringRadians), pointRadians(point)); -} - -function ringRadians(ring) { - return ring = ring.map(pointRadians), ring.pop(), ring; -} - -function pointRadians(point) { - return [point[0] * radians, point[1] * radians]; -} - -function contains(object, point) { - return (object && containsObjectType.hasOwnProperty(object.type) - ? containsObjectType[object.type] - : containsGeometry)(object, point); -} - -function graticuleX(y0, y1, dy) { - var y = d3Array.range(y0, y1 - epsilon, dy).concat(y1); - return function(x) { return y.map(function(y) { return [x, y]; }); }; -} - -function graticuleY(x0, x1, dx) { - var x = d3Array.range(x0, x1 - epsilon, dx).concat(x1); - return function(y) { return x.map(function(x) { return [x, y]; }); }; -} - -function graticule() { - var x1, x0, X1, X0, - y1, y0, Y1, Y0, - dx = 10, dy = dx, DX = 90, DY = 360, - x, y, X, Y, - precision = 2.5; - - function graticule() { - return {type: "MultiLineString", coordinates: lines()}; - } - - function lines() { - return d3Array.range(ceil(X0 / DX) * DX, X1, DX).map(X) - .concat(d3Array.range(ceil(Y0 / DY) * DY, Y1, DY).map(Y)) - .concat(d3Array.range(ceil(x0 / dx) * dx, x1, dx).filter(function(x) { return abs(x % DX) > epsilon; }).map(x)) - .concat(d3Array.range(ceil(y0 / dy) * dy, y1, dy).filter(function(y) { return abs(y % DY) > epsilon; }).map(y)); - } - - graticule.lines = function() { - return lines().map(function(coordinates) { return {type: "LineString", coordinates: coordinates}; }); - }; - - graticule.outline = function() { - return { - type: "Polygon", - coordinates: [ - X(X0).concat( - Y(Y1).slice(1), - X(X1).reverse().slice(1), - Y(Y0).reverse().slice(1)) - ] - }; - }; - - graticule.extent = function(_) { - if (!arguments.length) return graticule.extentMinor(); - return graticule.extentMajor(_).extentMinor(_); - }; - - graticule.extentMajor = function(_) { - if (!arguments.length) return [[X0, Y0], [X1, Y1]]; - X0 = +_[0][0], X1 = +_[1][0]; - Y0 = +_[0][1], Y1 = +_[1][1]; - if (X0 > X1) _ = X0, X0 = X1, X1 = _; - if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _; - return graticule.precision(precision); - }; - - graticule.extentMinor = function(_) { - if (!arguments.length) return [[x0, y0], [x1, y1]]; - x0 = +_[0][0], x1 = +_[1][0]; - y0 = +_[0][1], y1 = +_[1][1]; - if (x0 > x1) _ = x0, x0 = x1, x1 = _; - if (y0 > y1) _ = y0, y0 = y1, y1 = _; - return graticule.precision(precision); - }; - - graticule.step = function(_) { - if (!arguments.length) return graticule.stepMinor(); - return graticule.stepMajor(_).stepMinor(_); - }; - - graticule.stepMajor = function(_) { - if (!arguments.length) return [DX, DY]; - DX = +_[0], DY = +_[1]; - return graticule; - }; - - graticule.stepMinor = function(_) { - if (!arguments.length) return [dx, dy]; - dx = +_[0], dy = +_[1]; - return graticule; - }; - - graticule.precision = function(_) { - if (!arguments.length) return precision; - precision = +_; - x = graticuleX(y0, y1, 90); - y = graticuleY(x0, x1, precision); - X = graticuleX(Y0, Y1, 90); - Y = graticuleY(X0, X1, precision); - return graticule; - }; - - return graticule - .extentMajor([[-180, -90 + epsilon], [180, 90 - epsilon]]) - .extentMinor([[-180, -80 - epsilon], [180, 80 + epsilon]]); -} - -function graticule10() { - return graticule()(); -} - -function interpolate(a, b) { - var x0 = a[0] * radians, - y0 = a[1] * radians, - x1 = b[0] * radians, - y1 = b[1] * radians, - cy0 = cos(y0), - sy0 = sin(y0), - cy1 = cos(y1), - sy1 = sin(y1), - kx0 = cy0 * cos(x0), - ky0 = cy0 * sin(x0), - kx1 = cy1 * cos(x1), - ky1 = cy1 * sin(x1), - d = 2 * asin(sqrt(haversin(y1 - y0) + cy0 * cy1 * haversin(x1 - x0))), - k = sin(d); - - var interpolate = d ? function(t) { - var B = sin(t *= d) / k, - A = sin(d - t) / k, - x = A * kx0 + B * kx1, - y = A * ky0 + B * ky1, - z = A * sy0 + B * sy1; - return [ - atan2(y, x) * degrees, - atan2(z, sqrt(x * x + y * y)) * degrees - ]; - } : function() { - return [x0 * degrees, y0 * degrees]; - }; - - interpolate.distance = d; - - return interpolate; -} - -var identity = x => x; - -var areaSum$1 = new d3Array.Adder(), - areaRingSum$1 = new d3Array.Adder(), - x00, - y00, - x0$1, - y0$1; - -var areaStream$1 = { - point: noop, - lineStart: noop, - lineEnd: noop, - polygonStart: function() { - areaStream$1.lineStart = areaRingStart$1; - areaStream$1.lineEnd = areaRingEnd$1; - }, - polygonEnd: function() { - areaStream$1.lineStart = areaStream$1.lineEnd = areaStream$1.point = noop; - areaSum$1.add(abs(areaRingSum$1)); - areaRingSum$1 = new d3Array.Adder(); - }, - result: function() { - var area = areaSum$1 / 2; - areaSum$1 = new d3Array.Adder(); - return area; - } -}; - -function areaRingStart$1() { - areaStream$1.point = areaPointFirst$1; -} - -function areaPointFirst$1(x, y) { - areaStream$1.point = areaPoint$1; - x00 = x0$1 = x, y00 = y0$1 = y; -} - -function areaPoint$1(x, y) { - areaRingSum$1.add(y0$1 * x - x0$1 * y); - x0$1 = x, y0$1 = y; -} - -function areaRingEnd$1() { - areaPoint$1(x00, y00); -} - -var x0$2 = Infinity, - y0$2 = x0$2, - x1 = -x0$2, - y1 = x1; - -var boundsStream$1 = { - point: boundsPoint$1, - lineStart: noop, - lineEnd: noop, - polygonStart: noop, - polygonEnd: noop, - result: function() { - var bounds = [[x0$2, y0$2], [x1, y1]]; - x1 = y1 = -(y0$2 = x0$2 = Infinity); - return bounds; - } -}; - -function boundsPoint$1(x, y) { - if (x < x0$2) x0$2 = x; - if (x > x1) x1 = x; - if (y < y0$2) y0$2 = y; - if (y > y1) y1 = y; -} - -// TODO Enforce positive area for exterior, negative area for interior? - -var X0$1 = 0, - Y0$1 = 0, - Z0$1 = 0, - X1$1 = 0, - Y1$1 = 0, - Z1$1 = 0, - X2$1 = 0, - Y2$1 = 0, - Z2$1 = 0, - x00$1, - y00$1, - x0$3, - y0$3; - -var centroidStream$1 = { - point: centroidPoint$1, - lineStart: centroidLineStart$1, - lineEnd: centroidLineEnd$1, - polygonStart: function() { - centroidStream$1.lineStart = centroidRingStart$1; - centroidStream$1.lineEnd = centroidRingEnd$1; - }, - polygonEnd: function() { - centroidStream$1.point = centroidPoint$1; - centroidStream$1.lineStart = centroidLineStart$1; - centroidStream$1.lineEnd = centroidLineEnd$1; - }, - result: function() { - var centroid = Z2$1 ? [X2$1 / Z2$1, Y2$1 / Z2$1] - : Z1$1 ? [X1$1 / Z1$1, Y1$1 / Z1$1] - : Z0$1 ? [X0$1 / Z0$1, Y0$1 / Z0$1] - : [NaN, NaN]; - X0$1 = Y0$1 = Z0$1 = - X1$1 = Y1$1 = Z1$1 = - X2$1 = Y2$1 = Z2$1 = 0; - return centroid; - } -}; - -function centroidPoint$1(x, y) { - X0$1 += x; - Y0$1 += y; - ++Z0$1; -} - -function centroidLineStart$1() { - centroidStream$1.point = centroidPointFirstLine; -} - -function centroidPointFirstLine(x, y) { - centroidStream$1.point = centroidPointLine; - centroidPoint$1(x0$3 = x, y0$3 = y); -} - -function centroidPointLine(x, y) { - var dx = x - x0$3, dy = y - y0$3, z = sqrt(dx * dx + dy * dy); - X1$1 += z * (x0$3 + x) / 2; - Y1$1 += z * (y0$3 + y) / 2; - Z1$1 += z; - centroidPoint$1(x0$3 = x, y0$3 = y); -} - -function centroidLineEnd$1() { - centroidStream$1.point = centroidPoint$1; -} - -function centroidRingStart$1() { - centroidStream$1.point = centroidPointFirstRing; -} - -function centroidRingEnd$1() { - centroidPointRing(x00$1, y00$1); -} - -function centroidPointFirstRing(x, y) { - centroidStream$1.point = centroidPointRing; - centroidPoint$1(x00$1 = x0$3 = x, y00$1 = y0$3 = y); -} - -function centroidPointRing(x, y) { - var dx = x - x0$3, - dy = y - y0$3, - z = sqrt(dx * dx + dy * dy); - - X1$1 += z * (x0$3 + x) / 2; - Y1$1 += z * (y0$3 + y) / 2; - Z1$1 += z; - - z = y0$3 * x - x0$3 * y; - X2$1 += z * (x0$3 + x); - Y2$1 += z * (y0$3 + y); - Z2$1 += z * 3; - centroidPoint$1(x0$3 = x, y0$3 = y); -} - -function PathContext(context) { - this._context = context; -} - -PathContext.prototype = { - _radius: 4.5, - pointRadius: function(_) { - return this._radius = _, this; - }, - polygonStart: function() { - this._line = 0; - }, - polygonEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._line === 0) this._context.closePath(); - this._point = NaN; - }, - point: function(x, y) { - switch (this._point) { - case 0: { - this._context.moveTo(x, y); - this._point = 1; - break; - } - case 1: { - this._context.lineTo(x, y); - break; - } - default: { - this._context.moveTo(x + this._radius, y); - this._context.arc(x, y, this._radius, 0, tau); - break; - } - } - }, - result: noop -}; - -var lengthSum$1 = new d3Array.Adder(), - lengthRing, - x00$2, - y00$2, - x0$4, - y0$4; - -var lengthStream$1 = { - point: noop, - lineStart: function() { - lengthStream$1.point = lengthPointFirst$1; - }, - lineEnd: function() { - if (lengthRing) lengthPoint$1(x00$2, y00$2); - lengthStream$1.point = noop; - }, - polygonStart: function() { - lengthRing = true; - }, - polygonEnd: function() { - lengthRing = null; - }, - result: function() { - var length = +lengthSum$1; - lengthSum$1 = new d3Array.Adder(); - return length; - } -}; - -function lengthPointFirst$1(x, y) { - lengthStream$1.point = lengthPoint$1; - x00$2 = x0$4 = x, y00$2 = y0$4 = y; -} - -function lengthPoint$1(x, y) { - x0$4 -= x, y0$4 -= y; - lengthSum$1.add(sqrt(x0$4 * x0$4 + y0$4 * y0$4)); - x0$4 = x, y0$4 = y; -} - -function PathString() { - this._string = []; -} - -PathString.prototype = { - _radius: 4.5, - _circle: circle$1(4.5), - pointRadius: function(_) { - if ((_ = +_) !== this._radius) this._radius = _, this._circle = null; - return this; - }, - polygonStart: function() { - this._line = 0; - }, - polygonEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._line === 0) this._string.push("Z"); - this._point = NaN; - }, - point: function(x, y) { - switch (this._point) { - case 0: { - this._string.push("M", x, ",", y); - this._point = 1; - break; - } - case 1: { - this._string.push("L", x, ",", y); - break; - } - default: { - if (this._circle == null) this._circle = circle$1(this._radius); - this._string.push("M", x, ",", y, this._circle); - break; - } - } - }, - result: function() { - if (this._string.length) { - var result = this._string.join(""); - this._string = []; - return result; - } else { - return null; - } - } -}; - -function circle$1(radius) { - return "m0," + radius - + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius - + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius - + "z"; -} - -function index(projection, context) { - var pointRadius = 4.5, - projectionStream, - contextStream; - - function path(object) { - if (object) { - if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments)); - geoStream(object, projectionStream(contextStream)); - } - return contextStream.result(); - } - - path.area = function(object) { - geoStream(object, projectionStream(areaStream$1)); - return areaStream$1.result(); - }; - - path.measure = function(object) { - geoStream(object, projectionStream(lengthStream$1)); - return lengthStream$1.result(); - }; - - path.bounds = function(object) { - geoStream(object, projectionStream(boundsStream$1)); - return boundsStream$1.result(); - }; - - path.centroid = function(object) { - geoStream(object, projectionStream(centroidStream$1)); - return centroidStream$1.result(); - }; - - path.projection = function(_) { - return arguments.length ? (projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream, path) : projection; - }; - - path.context = function(_) { - if (!arguments.length) return context; - contextStream = _ == null ? (context = null, new PathString) : new PathContext(context = _); - if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius); - return path; - }; - - path.pointRadius = function(_) { - if (!arguments.length) return pointRadius; - pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_); - return path; - }; - - return path.projection(projection).context(context); -} - -function transform(methods) { - return { - stream: transformer(methods) - }; -} - -function transformer(methods) { - return function(stream) { - var s = new TransformStream; - for (var key in methods) s[key] = methods[key]; - s.stream = stream; - return s; - }; -} - -function TransformStream() {} - -TransformStream.prototype = { - constructor: TransformStream, - point: function(x, y) { this.stream.point(x, y); }, - sphere: function() { this.stream.sphere(); }, - lineStart: function() { this.stream.lineStart(); }, - lineEnd: function() { this.stream.lineEnd(); }, - polygonStart: function() { this.stream.polygonStart(); }, - polygonEnd: function() { this.stream.polygonEnd(); } -}; - -function fit(projection, fitBounds, object) { - var clip = projection.clipExtent && projection.clipExtent(); - projection.scale(150).translate([0, 0]); - if (clip != null) projection.clipExtent(null); - geoStream(object, projection.stream(boundsStream$1)); - fitBounds(boundsStream$1.result()); - if (clip != null) projection.clipExtent(clip); - return projection; -} - -function fitExtent(projection, extent, object) { - return fit(projection, function(b) { - var w = extent[1][0] - extent[0][0], - h = extent[1][1] - extent[0][1], - k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])), - x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2, - y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2; - projection.scale(150 * k).translate([x, y]); - }, object); -} - -function fitSize(projection, size, object) { - return fitExtent(projection, [[0, 0], size], object); -} - -function fitWidth(projection, width, object) { - return fit(projection, function(b) { - var w = +width, - k = w / (b[1][0] - b[0][0]), - x = (w - k * (b[1][0] + b[0][0])) / 2, - y = -k * b[0][1]; - projection.scale(150 * k).translate([x, y]); - }, object); -} - -function fitHeight(projection, height, object) { - return fit(projection, function(b) { - var h = +height, - k = h / (b[1][1] - b[0][1]), - x = -k * b[0][0], - y = (h - k * (b[1][1] + b[0][1])) / 2; - projection.scale(150 * k).translate([x, y]); - }, object); -} - -var maxDepth = 16, // maximum depth of subdivision - cosMinDistance = cos(30 * radians); // cos(minimum angular distance) - -function resample(project, delta2) { - return +delta2 ? resample$1(project, delta2) : resampleNone(project); -} - -function resampleNone(project) { - return transformer({ - point: function(x, y) { - x = project(x, y); - this.stream.point(x[0], x[1]); - } - }); -} - -function resample$1(project, delta2) { - - function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) { - var dx = x1 - x0, - dy = y1 - y0, - d2 = dx * dx + dy * dy; - if (d2 > 4 * delta2 && depth--) { - var a = a0 + a1, - b = b0 + b1, - c = c0 + c1, - m = sqrt(a * a + b * b + c * c), - phi2 = asin(c /= m), - lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a), - p = project(lambda2, phi2), - x2 = p[0], - y2 = p[1], - dx2 = x2 - x0, - dy2 = y2 - y0, - dz = dy * dx2 - dx * dy2; - if (dz * dz / d2 > delta2 // perpendicular projected distance - || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end - || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance - resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream); - stream.point(x2, y2); - resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream); - } - } - } - return function(stream) { - var lambda00, x00, y00, a00, b00, c00, // first point - lambda0, x0, y0, a0, b0, c0; // previous point - - var resampleStream = { - point: point, - lineStart: lineStart, - lineEnd: lineEnd, - polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; }, - polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; } - }; - - function point(x, y) { - x = project(x, y); - stream.point(x[0], x[1]); - } - - function lineStart() { - x0 = NaN; - resampleStream.point = linePoint; - stream.lineStart(); - } - - function linePoint(lambda, phi) { - var c = cartesian([lambda, phi]), p = project(lambda, phi); - resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream); - stream.point(x0, y0); - } - - function lineEnd() { - resampleStream.point = point; - stream.lineEnd(); - } - - function ringStart() { - lineStart(); - resampleStream.point = ringPoint; - resampleStream.lineEnd = ringEnd; - } - - function ringPoint(lambda, phi) { - linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0; - resampleStream.point = linePoint; - } - - function ringEnd() { - resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream); - resampleStream.lineEnd = lineEnd; - lineEnd(); - } - - return resampleStream; - }; -} - -var transformRadians = transformer({ - point: function(x, y) { - this.stream.point(x * radians, y * radians); - } -}); - -function transformRotate(rotate) { - return transformer({ - point: function(x, y) { - var r = rotate(x, y); - return this.stream.point(r[0], r[1]); - } - }); -} - -function scaleTranslate(k, dx, dy, sx, sy) { - function transform(x, y) { - x *= sx; y *= sy; - return [dx + k * x, dy - k * y]; - } - transform.invert = function(x, y) { - return [(x - dx) / k * sx, (dy - y) / k * sy]; - }; - return transform; -} - -function scaleTranslateRotate(k, dx, dy, sx, sy, alpha) { - if (!alpha) return scaleTranslate(k, dx, dy, sx, sy); - var cosAlpha = cos(alpha), - sinAlpha = sin(alpha), - a = cosAlpha * k, - b = sinAlpha * k, - ai = cosAlpha / k, - bi = sinAlpha / k, - ci = (sinAlpha * dy - cosAlpha * dx) / k, - fi = (sinAlpha * dx + cosAlpha * dy) / k; - function transform(x, y) { - x *= sx; y *= sy; - return [a * x - b * y + dx, dy - b * x - a * y]; - } - transform.invert = function(x, y) { - return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)]; - }; - return transform; -} - -function projection(project) { - return projectionMutator(function() { return project; })(); -} - -function projectionMutator(projectAt) { - var project, - k = 150, // scale - x = 480, y = 250, // translate - lambda = 0, phi = 0, // center - deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate - alpha = 0, // post-rotate angle - sx = 1, // reflectX - sy = 1, // reflectX - theta = null, preclip = clipAntimeridian, // pre-clip angle - x0 = null, y0, x1, y1, postclip = identity, // post-clip extent - delta2 = 0.5, // precision - projectResample, - projectTransform, - projectRotateTransform, - cache, - cacheStream; - - function projection(point) { - return projectRotateTransform(point[0] * radians, point[1] * radians); - } - - function invert(point) { - point = projectRotateTransform.invert(point[0], point[1]); - return point && [point[0] * degrees, point[1] * degrees]; - } - - projection.stream = function(stream) { - return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream))))); - }; - - projection.preclip = function(_) { - return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip; - }; - - projection.postclip = function(_) { - return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip; - }; - - projection.clipAngle = function(_) { - return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees; - }; - - projection.clipExtent = function(_) { - return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]]; - }; - - projection.scale = function(_) { - return arguments.length ? (k = +_, recenter()) : k; - }; - - projection.translate = function(_) { - return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y]; - }; - - projection.center = function(_) { - return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees]; - }; - - projection.rotate = function(_) { - return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees]; - }; - - projection.angle = function(_) { - return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees; - }; - - projection.reflectX = function(_) { - return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0; - }; - - projection.reflectY = function(_) { - return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0; - }; - - projection.precision = function(_) { - return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2); - }; - - projection.fitExtent = function(extent, object) { - return fitExtent(projection, extent, object); - }; - - projection.fitSize = function(size, object) { - return fitSize(projection, size, object); - }; - - projection.fitWidth = function(width, object) { - return fitWidth(projection, width, object); - }; - - projection.fitHeight = function(height, object) { - return fitHeight(projection, height, object); - }; - - function recenter() { - var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)), - transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha); - rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma); - projectTransform = compose(project, transform); - projectRotateTransform = compose(rotate, projectTransform); - projectResample = resample(projectTransform, delta2); - return reset(); - } - - function reset() { - cache = cacheStream = null; - return projection; - } - - return function() { - project = projectAt.apply(this, arguments); - projection.invert = project.invert && invert; - return recenter(); - }; -} - -function conicProjection(projectAt) { - var phi0 = 0, - phi1 = pi / 3, - m = projectionMutator(projectAt), - p = m(phi0, phi1); - - p.parallels = function(_) { - return arguments.length ? m(phi0 = _[0] * radians, phi1 = _[1] * radians) : [phi0 * degrees, phi1 * degrees]; - }; - - return p; -} - -function cylindricalEqualAreaRaw(phi0) { - var cosPhi0 = cos(phi0); - - function forward(lambda, phi) { - return [lambda * cosPhi0, sin(phi) / cosPhi0]; - } - - forward.invert = function(x, y) { - return [x / cosPhi0, asin(y * cosPhi0)]; - }; - - return forward; -} - -function conicEqualAreaRaw(y0, y1) { - var sy0 = sin(y0), n = (sy0 + sin(y1)) / 2; - - // Are the parallels symmetrical around the Equator? - if (abs(n) < epsilon) return cylindricalEqualAreaRaw(y0); - - var c = 1 + sy0 * (2 * n - sy0), r0 = sqrt(c) / n; - - function project(x, y) { - var r = sqrt(c - 2 * n * sin(y)) / n; - return [r * sin(x *= n), r0 - r * cos(x)]; - } - - project.invert = function(x, y) { - var r0y = r0 - y, - l = atan2(x, abs(r0y)) * sign(r0y); - if (r0y * n < 0) - l -= pi * sign(x) * sign(r0y); - return [l / n, asin((c - (x * x + r0y * r0y) * n * n) / (2 * n))]; - }; - - return project; -} - -function conicEqualArea() { - return conicProjection(conicEqualAreaRaw) - .scale(155.424) - .center([0, 33.6442]); -} - -function albers() { - return conicEqualArea() - .parallels([29.5, 45.5]) - .scale(1070) - .translate([480, 250]) - .rotate([96, 0]) - .center([-0.6, 38.7]); -} - -// The projections must have mutually exclusive clip regions on the sphere, -// as this will avoid emitting interleaving lines and polygons. -function multiplex(streams) { - var n = streams.length; - return { - point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); }, - sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); }, - lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); }, - lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); }, - polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); }, - polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); } - }; -} - -// A composite projection for the United States, configured by default for -// 960×500. The projection also works quite well at 960×600 if you change the -// scale to 1285 and adjust the translate accordingly. The set of standard -// parallels for each region comes from USGS, which is published here: -// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers -function albersUsa() { - var cache, - cacheStream, - lower48 = albers(), lower48Point, - alaska = conicEqualArea().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338 - hawaii = conicEqualArea().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007 - point, pointStream = {point: function(x, y) { point = [x, y]; }}; - - function albersUsa(coordinates) { - var x = coordinates[0], y = coordinates[1]; - return point = null, - (lower48Point.point(x, y), point) - || (alaskaPoint.point(x, y), point) - || (hawaiiPoint.point(x, y), point); - } - - albersUsa.invert = function(coordinates) { - var k = lower48.scale(), - t = lower48.translate(), - x = (coordinates[0] - t[0]) / k, - y = (coordinates[1] - t[1]) / k; - return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska - : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii - : lower48).invert(coordinates); - }; - - albersUsa.stream = function(stream) { - return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]); - }; - - albersUsa.precision = function(_) { - if (!arguments.length) return lower48.precision(); - lower48.precision(_), alaska.precision(_), hawaii.precision(_); - return reset(); - }; - - albersUsa.scale = function(_) { - if (!arguments.length) return lower48.scale(); - lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_); - return albersUsa.translate(lower48.translate()); - }; - - albersUsa.translate = function(_) { - if (!arguments.length) return lower48.translate(); - var k = lower48.scale(), x = +_[0], y = +_[1]; - - lower48Point = lower48 - .translate(_) - .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]]) - .stream(pointStream); - - alaskaPoint = alaska - .translate([x - 0.307 * k, y + 0.201 * k]) - .clipExtent([[x - 0.425 * k + epsilon, y + 0.120 * k + epsilon], [x - 0.214 * k - epsilon, y + 0.234 * k - epsilon]]) - .stream(pointStream); - - hawaiiPoint = hawaii - .translate([x - 0.205 * k, y + 0.212 * k]) - .clipExtent([[x - 0.214 * k + epsilon, y + 0.166 * k + epsilon], [x - 0.115 * k - epsilon, y + 0.234 * k - epsilon]]) - .stream(pointStream); - - return reset(); - }; - - albersUsa.fitExtent = function(extent, object) { - return fitExtent(albersUsa, extent, object); - }; - - albersUsa.fitSize = function(size, object) { - return fitSize(albersUsa, size, object); - }; - - albersUsa.fitWidth = function(width, object) { - return fitWidth(albersUsa, width, object); - }; - - albersUsa.fitHeight = function(height, object) { - return fitHeight(albersUsa, height, object); - }; - - function reset() { - cache = cacheStream = null; - return albersUsa; - } - - return albersUsa.scale(1070); -} - -function azimuthalRaw(scale) { - return function(x, y) { - var cx = cos(x), - cy = cos(y), - k = scale(cx * cy); - if (k === Infinity) return [2, 0]; - return [ - k * cy * sin(x), - k * sin(y) - ]; - } -} - -function azimuthalInvert(angle) { - return function(x, y) { - var z = sqrt(x * x + y * y), - c = angle(z), - sc = sin(c), - cc = cos(c); - return [ - atan2(x * sc, z * cc), - asin(z && y * sc / z) - ]; - } -} - -var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) { - return sqrt(2 / (1 + cxcy)); -}); - -azimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) { - return 2 * asin(z / 2); -}); - -function azimuthalEqualArea() { - return projection(azimuthalEqualAreaRaw) - .scale(124.75) - .clipAngle(180 - 1e-3); -} - -var azimuthalEquidistantRaw = azimuthalRaw(function(c) { - return (c = acos(c)) && c / sin(c); -}); - -azimuthalEquidistantRaw.invert = azimuthalInvert(function(z) { - return z; -}); - -function azimuthalEquidistant() { - return projection(azimuthalEquidistantRaw) - .scale(79.4188) - .clipAngle(180 - 1e-3); -} - -function mercatorRaw(lambda, phi) { - return [lambda, log(tan((halfPi + phi) / 2))]; -} - -mercatorRaw.invert = function(x, y) { - return [x, 2 * atan(exp(y)) - halfPi]; -}; - -function mercator() { - return mercatorProjection(mercatorRaw) - .scale(961 / tau); -} - -function mercatorProjection(project) { - var m = projection(project), - center = m.center, - scale = m.scale, - translate = m.translate, - clipExtent = m.clipExtent, - x0 = null, y0, x1, y1; // clip extent - - m.scale = function(_) { - return arguments.length ? (scale(_), reclip()) : scale(); - }; - - m.translate = function(_) { - return arguments.length ? (translate(_), reclip()) : translate(); - }; - - m.center = function(_) { - return arguments.length ? (center(_), reclip()) : center(); - }; - - m.clipExtent = function(_) { - return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]]; - }; - - function reclip() { - var k = pi * scale(), - t = m(rotation(m.rotate()).invert([0, 0])); - return clipExtent(x0 == null - ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw - ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]] - : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]); - } - - return reclip(); -} - -function tany(y) { - return tan((halfPi + y) / 2); -} - -function conicConformalRaw(y0, y1) { - var cy0 = cos(y0), - n = y0 === y1 ? sin(y0) : log(cy0 / cos(y1)) / log(tany(y1) / tany(y0)), - f = cy0 * pow(tany(y0), n) / n; - - if (!n) return mercatorRaw; - - function project(x, y) { - if (f > 0) { if (y < -halfPi + epsilon) y = -halfPi + epsilon; } - else { if (y > halfPi - epsilon) y = halfPi - epsilon; } - var r = f / pow(tany(y), n); - return [r * sin(n * x), f - r * cos(n * x)]; - } - - project.invert = function(x, y) { - var fy = f - y, r = sign(n) * sqrt(x * x + fy * fy), - l = atan2(x, abs(fy)) * sign(fy); - if (fy * n < 0) - l -= pi * sign(x) * sign(fy); - return [l / n, 2 * atan(pow(f / r, 1 / n)) - halfPi]; - }; - - return project; -} - -function conicConformal() { - return conicProjection(conicConformalRaw) - .scale(109.5) - .parallels([30, 30]); -} - -function equirectangularRaw(lambda, phi) { - return [lambda, phi]; -} - -equirectangularRaw.invert = equirectangularRaw; - -function equirectangular() { - return projection(equirectangularRaw) - .scale(152.63); -} - -function conicEquidistantRaw(y0, y1) { - var cy0 = cos(y0), - n = y0 === y1 ? sin(y0) : (cy0 - cos(y1)) / (y1 - y0), - g = cy0 / n + y0; - - if (abs(n) < epsilon) return equirectangularRaw; - - function project(x, y) { - var gy = g - y, nx = n * x; - return [gy * sin(nx), g - gy * cos(nx)]; - } - - project.invert = function(x, y) { - var gy = g - y, - l = atan2(x, abs(gy)) * sign(gy); - if (gy * n < 0) - l -= pi * sign(x) * sign(gy); - return [l / n, g - sign(n) * sqrt(x * x + gy * gy)]; - }; - - return project; -} - -function conicEquidistant() { - return conicProjection(conicEquidistantRaw) - .scale(131.154) - .center([0, 13.9389]); -} - -var A1 = 1.340264, - A2 = -0.081106, - A3 = 0.000893, - A4 = 0.003796, - M = sqrt(3) / 2, - iterations = 12; - -function equalEarthRaw(lambda, phi) { - var l = asin(M * sin(phi)), l2 = l * l, l6 = l2 * l2 * l2; - return [ - lambda * cos(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))), - l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - ]; -} - -equalEarthRaw.invert = function(x, y) { - var l = y, l2 = l * l, l6 = l2 * l2 * l2; - for (var i = 0, delta, fy, fpy; i < iterations; ++i) { - fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y; - fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2); - l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2; - if (abs(delta) < epsilon2) break; - } - return [ - M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos(l), - asin(sin(l) / M) - ]; -}; - -function equalEarth() { - return projection(equalEarthRaw) - .scale(177.158); -} - -function gnomonicRaw(x, y) { - var cy = cos(y), k = cos(x) * cy; - return [cy * sin(x) / k, sin(y) / k]; -} - -gnomonicRaw.invert = azimuthalInvert(atan); - -function gnomonic() { - return projection(gnomonicRaw) - .scale(144.049) - .clipAngle(60); -} - -function identity$1() { - var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, // scale, translate and reflect - alpha = 0, ca, sa, // angle - x0 = null, y0, x1, y1, // clip extent - kx = 1, ky = 1, - transform = transformer({ - point: function(x, y) { - var p = projection([x, y]); - this.stream.point(p[0], p[1]); - } - }), - postclip = identity, - cache, - cacheStream; - - function reset() { - kx = k * sx; - ky = k * sy; - cache = cacheStream = null; - return projection; - } - - function projection (p) { - var x = p[0] * kx, y = p[1] * ky; - if (alpha) { - var t = y * ca - x * sa; - x = x * ca + y * sa; - y = t; - } - return [x + tx, y + ty]; - } - projection.invert = function(p) { - var x = p[0] - tx, y = p[1] - ty; - if (alpha) { - var t = y * ca + x * sa; - x = x * ca - y * sa; - y = t; - } - return [x / kx, y / ky]; - }; - projection.stream = function(stream) { - return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream)); - }; - projection.postclip = function(_) { - return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip; - }; - projection.clipExtent = function(_) { - return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]]; - }; - projection.scale = function(_) { - return arguments.length ? (k = +_, reset()) : k; - }; - projection.translate = function(_) { - return arguments.length ? (tx = +_[0], ty = +_[1], reset()) : [tx, ty]; - }; - projection.angle = function(_) { - return arguments.length ? (alpha = _ % 360 * radians, sa = sin(alpha), ca = cos(alpha), reset()) : alpha * degrees; - }; - projection.reflectX = function(_) { - return arguments.length ? (sx = _ ? -1 : 1, reset()) : sx < 0; - }; - projection.reflectY = function(_) { - return arguments.length ? (sy = _ ? -1 : 1, reset()) : sy < 0; - }; - projection.fitExtent = function(extent, object) { - return fitExtent(projection, extent, object); - }; - projection.fitSize = function(size, object) { - return fitSize(projection, size, object); - }; - projection.fitWidth = function(width, object) { - return fitWidth(projection, width, object); - }; - projection.fitHeight = function(height, object) { - return fitHeight(projection, height, object); - }; - - return projection; -} - -function naturalEarth1Raw(lambda, phi) { - var phi2 = phi * phi, phi4 = phi2 * phi2; - return [ - lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))), - phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - ]; -} - -naturalEarth1Raw.invert = function(x, y) { - var phi = y, i = 25, delta; - do { - var phi2 = phi * phi, phi4 = phi2 * phi2; - phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) / - (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4))); - } while (abs(delta) > epsilon && --i > 0); - return [ - x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))), - phi - ]; -}; - -function naturalEarth1() { - return projection(naturalEarth1Raw) - .scale(175.295); -} - -function orthographicRaw(x, y) { - return [cos(y) * sin(x), sin(y)]; -} - -orthographicRaw.invert = azimuthalInvert(asin); - -function orthographic() { - return projection(orthographicRaw) - .scale(249.5) - .clipAngle(90 + epsilon); -} - -function stereographicRaw(x, y) { - var cy = cos(y), k = 1 + cos(x) * cy; - return [cy * sin(x) / k, sin(y) / k]; -} - -stereographicRaw.invert = azimuthalInvert(function(z) { - return 2 * atan(z); -}); - -function stereographic() { - return projection(stereographicRaw) - .scale(250) - .clipAngle(142); -} - -function transverseMercatorRaw(lambda, phi) { - return [log(tan((halfPi + phi) / 2)), -lambda]; -} - -transverseMercatorRaw.invert = function(x, y) { - return [-y, 2 * atan(exp(x)) - halfPi]; -}; - -function transverseMercator() { - var m = mercatorProjection(transverseMercatorRaw), - center = m.center, - rotate = m.rotate; - - m.center = function(_) { - return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]); - }; - - m.rotate = function(_) { - return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]); - }; - - return rotate([0, 0, 90]) - .scale(159.155); -} - -exports.geoAlbers = albers; -exports.geoAlbersUsa = albersUsa; -exports.geoArea = area; -exports.geoAzimuthalEqualArea = azimuthalEqualArea; -exports.geoAzimuthalEqualAreaRaw = azimuthalEqualAreaRaw; -exports.geoAzimuthalEquidistant = azimuthalEquidistant; -exports.geoAzimuthalEquidistantRaw = azimuthalEquidistantRaw; -exports.geoBounds = bounds; -exports.geoCentroid = centroid; -exports.geoCircle = circle; -exports.geoClipAntimeridian = clipAntimeridian; -exports.geoClipCircle = clipCircle; -exports.geoClipExtent = extent; -exports.geoClipRectangle = clipRectangle; -exports.geoConicConformal = conicConformal; -exports.geoConicConformalRaw = conicConformalRaw; -exports.geoConicEqualArea = conicEqualArea; -exports.geoConicEqualAreaRaw = conicEqualAreaRaw; -exports.geoConicEquidistant = conicEquidistant; -exports.geoConicEquidistantRaw = conicEquidistantRaw; -exports.geoContains = contains; -exports.geoDistance = distance; -exports.geoEqualEarth = equalEarth; -exports.geoEqualEarthRaw = equalEarthRaw; -exports.geoEquirectangular = equirectangular; -exports.geoEquirectangularRaw = equirectangularRaw; -exports.geoGnomonic = gnomonic; -exports.geoGnomonicRaw = gnomonicRaw; -exports.geoGraticule = graticule; -exports.geoGraticule10 = graticule10; -exports.geoIdentity = identity$1; -exports.geoInterpolate = interpolate; -exports.geoLength = length; -exports.geoMercator = mercator; -exports.geoMercatorRaw = mercatorRaw; -exports.geoNaturalEarth1 = naturalEarth1; -exports.geoNaturalEarth1Raw = naturalEarth1Raw; -exports.geoOrthographic = orthographic; -exports.geoOrthographicRaw = orthographicRaw; -exports.geoPath = index; -exports.geoProjection = projection; -exports.geoProjectionMutator = projectionMutator; -exports.geoRotation = rotation; -exports.geoStereographic = stereographic; -exports.geoStereographicRaw = stereographicRaw; -exports.geoStream = geoStream; -exports.geoTransform = transform; -exports.geoTransverseMercator = transverseMercator; -exports.geoTransverseMercatorRaw = transverseMercatorRaw; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-geo/dist/d3-geo.min.js b/node_modules/d3-geo/dist/d3-geo.min.js deleted file mode 100644 index ddb216909b13277bbdfa9daff9c0d87a405e088f..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/dist/d3-geo.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-geo/ v2.0.1 Copyright 2020 Mike Bostock -!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-array")):"function"==typeof define&&define.amd?define(["exports","d3-array"],t):t((n=n||self).d3=n.d3||{},n.d3)}(this,function(n,t){"use strict";var r=1e-6,e=1e-12,i=Math.PI,o=i/2,u=i/4,a=2*i,c=180/i,l=i/180,f=Math.abs,p=Math.atan,s=Math.atan2,h=Math.cos,g=Math.ceil,v=Math.exp,d=Math.hypot,E=Math.log,y=Math.pow,S=Math.sin,m=Math.sign||function(n){return n>0?1:n<0?-1:0},M=Math.sqrt,x=Math.tan;function w(n){return n>1?0:n<-1?i:Math.acos(n)}function _(n){return n>1?o:n<-1?-o:Math.asin(n)}function N(n){return(n=S(n/2))*n}function A(){}function R(n,t){n&&P.hasOwnProperty(n.type)&&P[n.type](n,t)}var C={Feature:function(n,t){R(n.geometry,t)},FeatureCollection:function(n,t){for(var r=n.features,e=-1,i=r.length;++e<i;)R(r[e].geometry,t)}},P={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var r=n.coordinates,e=-1,i=r.length;++e<i;)n=r[e],t.point(n[0],n[1],n[2])},LineString:function(n,t){j(n.coordinates,t,0)},MultiLineString:function(n,t){for(var r=n.coordinates,e=-1,i=r.length;++e<i;)j(r[e],t,0)},Polygon:function(n,t){q(n.coordinates,t)},MultiPolygon:function(n,t){for(var r=n.coordinates,e=-1,i=r.length;++e<i;)q(r[e],t)},GeometryCollection:function(n,t){for(var r=n.geometries,e=-1,i=r.length;++e<i;)R(r[e],t)}};function j(n,t,r){var e,i=-1,o=n.length-r;for(t.lineStart();++i<o;)e=n[i],t.point(e[0],e[1],e[2]);t.lineEnd()}function q(n,t){var r=-1,e=n.length;for(t.polygonStart();++r<e;)j(n[r],t,1);t.polygonEnd()}function z(n,t){n&&C.hasOwnProperty(n.type)?C[n.type](n,t):R(n,t)}var b,L,O,G,T,k,F,H,I,W,X,Y,B,D,U,Z,J=new t.Adder,K=new t.Adder,Q={point:A,lineStart:A,lineEnd:A,polygonStart:function(){J=new t.Adder,Q.lineStart=V,Q.lineEnd=$},polygonEnd:function(){var n=+J;K.add(n<0?a+n:n),this.lineStart=this.lineEnd=this.point=A},sphere:function(){K.add(a)}};function V(){Q.point=nn}function $(){tn(b,L)}function nn(n,t){Q.point=tn,b=n,L=t,O=n*=l,G=h(t=(t*=l)/2+u),T=S(t)}function tn(n,t){var r=(n*=l)-O,e=r>=0?1:-1,i=e*r,o=h(t=(t*=l)/2+u),a=S(t),c=T*a,f=G*o+c*h(i),p=c*e*S(i);J.add(s(p,f)),O=n,G=o,T=a}function rn(n){return[s(n[1],n[0]),_(n[2])]}function en(n){var t=n[0],r=n[1],e=h(r);return[e*h(t),e*S(t),S(r)]}function on(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function un(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function an(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function cn(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function ln(n){var t=M(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}var fn,pn,sn,hn,gn,vn,dn,En,yn,Sn,mn,Mn,xn,wn,_n,Nn,An={point:Rn,lineStart:Pn,lineEnd:jn,polygonStart:function(){An.point=qn,An.lineStart=zn,An.lineEnd=bn,D=new t.Adder,Q.polygonStart()},polygonEnd:function(){Q.polygonEnd(),An.point=Rn,An.lineStart=Pn,An.lineEnd=jn,J<0?(k=-(H=180),F=-(I=90)):D>r?I=90:D<-r&&(F=-90),Z[0]=k,Z[1]=H},sphere:function(){k=-(H=180),F=-(I=90)}};function Rn(n,t){U.push(Z=[k=n,H=n]),t<F&&(F=t),t>I&&(I=t)}function Cn(n,t){var r=en([n*l,t*l]);if(B){var e=un(B,r),i=un([e[1],-e[0],0],e);ln(i),i=rn(i);var o,u=n-W,a=u>0?1:-1,p=i[0]*c*a,s=f(u)>180;s^(a*W<p&&p<a*n)?(o=i[1]*c)>I&&(I=o):s^(a*W<(p=(p+360)%360-180)&&p<a*n)?(o=-i[1]*c)<F&&(F=o):(t<F&&(F=t),t>I&&(I=t)),s?n<W?Ln(k,n)>Ln(k,H)&&(H=n):Ln(n,H)>Ln(k,H)&&(k=n):H>=k?(n<k&&(k=n),n>H&&(H=n)):n>W?Ln(k,n)>Ln(k,H)&&(H=n):Ln(n,H)>Ln(k,H)&&(k=n)}else U.push(Z=[k=n,H=n]);t<F&&(F=t),t>I&&(I=t),B=r,W=n}function Pn(){An.point=Cn}function jn(){Z[0]=k,Z[1]=H,An.point=Rn,B=null}function qn(n,t){if(B){var r=n-W;D.add(f(r)>180?r+(r>0?360:-360):r)}else X=n,Y=t;Q.point(n,t),Cn(n,t)}function zn(){Q.lineStart()}function bn(){qn(X,Y),Q.lineEnd(),f(D)>r&&(k=-(H=180)),Z[0]=k,Z[1]=H,B=null}function Ln(n,t){return(t-=n)<0?t+360:t}function On(n,t){return n[0]-t[0]}function Gn(n,t){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:t<n[0]||n[1]<t}var Tn={sphere:A,point:kn,lineStart:Hn,lineEnd:Xn,polygonStart:function(){Tn.lineStart=Yn,Tn.lineEnd=Bn},polygonEnd:function(){Tn.lineStart=Hn,Tn.lineEnd=Xn}};function kn(n,t){n*=l;var r=h(t*=l);Fn(r*h(n),r*S(n),S(t))}function Fn(n,t,r){sn+=(n-sn)/++fn,hn+=(t-hn)/fn,gn+=(r-gn)/fn}function Hn(){Tn.point=In}function In(n,t){n*=l;var r=h(t*=l);wn=r*h(n),_n=r*S(n),Nn=S(t),Tn.point=Wn,Fn(wn,_n,Nn)}function Wn(n,t){n*=l;var r=h(t*=l),e=r*h(n),i=r*S(n),o=S(t),u=s(M((u=_n*o-Nn*i)*u+(u=Nn*e-wn*o)*u+(u=wn*i-_n*e)*u),wn*e+_n*i+Nn*o);pn+=u,vn+=u*(wn+(wn=e)),dn+=u*(_n+(_n=i)),En+=u*(Nn+(Nn=o)),Fn(wn,_n,Nn)}function Xn(){Tn.point=kn}function Yn(){Tn.point=Dn}function Bn(){Un(Mn,xn),Tn.point=kn}function Dn(n,t){Mn=n,xn=t,n*=l,t*=l,Tn.point=Un;var r=h(t);wn=r*h(n),_n=r*S(n),Nn=S(t),Fn(wn,_n,Nn)}function Un(n,t){n*=l;var r=h(t*=l),e=r*h(n),i=r*S(n),o=S(t),u=_n*o-Nn*i,a=Nn*e-wn*o,c=wn*i-_n*e,f=d(u,a,c),p=_(f),s=f&&-p/f;yn.add(s*u),Sn.add(s*a),mn.add(s*c),pn+=p,vn+=p*(wn+(wn=e)),dn+=p*(_n+(_n=i)),En+=p*(Nn+(Nn=o)),Fn(wn,_n,Nn)}function Zn(n){return function(){return n}}function Jn(n,t){function r(r,e){return r=n(r,e),t(r[0],r[1])}return n.invert&&t.invert&&(r.invert=function(r,e){return(r=t.invert(r,e))&&n.invert(r[0],r[1])}),r}function Kn(n,t){return[f(n)>i?n+Math.round(-n/a)*a:n,t]}function Qn(n,t,r){return(n%=a)?t||r?Jn($n(n),nt(t,r)):$n(n):t||r?nt(t,r):Kn}function Vn(n){return function(t,r){return[(t+=n)>i?t-a:t<-i?t+a:t,r]}}function $n(n){var t=Vn(n);return t.invert=Vn(-n),t}function nt(n,t){var r=h(n),e=S(n),i=h(t),o=S(t);function u(n,t){var u=h(t),a=h(n)*u,c=S(n)*u,l=S(t),f=l*r+a*e;return[s(c*i-f*o,a*r-l*e),_(f*i+c*o)]}return u.invert=function(n,t){var u=h(t),a=h(n)*u,c=S(n)*u,l=S(t),f=l*i-c*o;return[s(c*i+l*o,a*r+f*e),_(f*r-a*e)]},u}function tt(n){function t(t){return(t=n(t[0]*l,t[1]*l))[0]*=c,t[1]*=c,t}return n=Qn(n[0]*l,n[1]*l,n.length>2?n[2]*l:0),t.invert=function(t){return(t=n.invert(t[0]*l,t[1]*l))[0]*=c,t[1]*=c,t},t}function rt(n,t,r,e,i,o){if(r){var u=h(t),c=S(t),l=e*r;null==i?(i=t+e*a,o=t-l/2):(i=et(u,i),o=et(u,o),(e>0?i<o:i>o)&&(i+=e*a));for(var f,p=i;e>0?p>o:p<o;p-=l)f=rn([u,-c*h(p),-c*S(p)]),n.point(f[0],f[1])}}function et(n,t){(t=en(t))[0]-=n,ln(t);var e=w(-t[1]);return((-t[2]<0?-e:e)+a-r)%a}function it(){var n,t=[];return{point:function(t,r,e){n.push([t,r,e])},lineStart:function(){t.push(n=[])},lineEnd:A,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],n=null,r}}}function ot(n,t){return f(n[0]-t[0])<r&&f(n[1]-t[1])<r}function ut(n,t,r,e){this.x=n,this.z=t,this.o=r,this.e=e,this.v=!1,this.n=this.p=null}function at(n,t,e,i,o){var u,a,c=[],l=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e,i=n[0],a=n[t];if(ot(i,a)){if(!i[2]&&!a[2]){for(o.lineStart(),u=0;u<t;++u)o.point((i=n[u])[0],i[1]);return void o.lineEnd()}a[0]+=2*r}c.push(e=new ut(i,n,null,!0)),l.push(e.o=new ut(i,null,e,!1)),c.push(e=new ut(a,n,null,!1)),l.push(e.o=new ut(a,null,e,!0))}}),c.length){for(l.sort(t),ct(c),ct(l),u=0,a=l.length;u<a;++u)l[u].e=e=!e;for(var f,p,s=c[0];;){for(var h=s,g=!0;h.v;)if((h=h.n)===s)return;f=h.z,o.lineStart();do{if(h.v=h.o.v=!0,h.e){if(g)for(u=0,a=f.length;u<a;++u)o.point((p=f[u])[0],p[1]);else i(h.x,h.n.x,1,o);h=h.n}else{if(g)for(f=h.p.z,u=f.length-1;u>=0;--u)o.point((p=f[u])[0],p[1]);else i(h.x,h.p.x,-1,o);h=h.p}f=(h=h.o).z,g=!g}while(!h.v);o.lineEnd()}}}function ct(n){if(t=n.length){for(var t,r,e=0,i=n[0];++e<t;)i.n=r=n[e],r.p=i,i=r;i.n=r=n[0],r.p=i}}function lt(n){return f(n[0])<=i?n[0]:m(n[0])*((f(n[0])+i)%a-i)}function ft(n,c){var l=lt(c),f=c[1],p=S(f),g=[S(l),-h(l),0],v=0,d=0,E=new t.Adder;1===p?f=o+r:-1===p&&(f=-o-r);for(var y=0,m=n.length;y<m;++y)if(x=(M=n[y]).length)for(var M,x,w=M[x-1],N=lt(w),A=w[1]/2+u,R=S(A),C=h(A),P=0;P<x;++P,N=q,R=b,C=L,w=j){var j=M[P],q=lt(j),z=j[1]/2+u,b=S(z),L=h(z),O=q-N,G=O>=0?1:-1,T=G*O,k=T>i,F=R*b;if(E.add(s(F*G*S(T),C*L+F*h(T))),v+=k?O+G*a:O,k^N>=l^q>=l){var H=un(en(w),en(j));ln(H);var I=un(g,H);ln(I);var W=(k^O>=0?-1:1)*_(I[2]);(f>W||f===W&&(H[0]||H[1]))&&(d+=k^O>=0?1:-1)}}return(v<-r||v<r&&E<-e)^1&d}function pt(n,r,e,i){return function(o){var u,a,c,l=r(o),f=it(),p=r(f),s=!1,h={point:g,lineStart:d,lineEnd:E,polygonStart:function(){h.point=y,h.lineStart=S,h.lineEnd=m,a=[],u=[]},polygonEnd:function(){h.point=g,h.lineStart=d,h.lineEnd=E,a=t.merge(a);var n=ft(u,i);a.length?(s||(o.polygonStart(),s=!0),at(a,ht,n,e,o)):n&&(s||(o.polygonStart(),s=!0),o.lineStart(),e(null,null,1,o),o.lineEnd()),s&&(o.polygonEnd(),s=!1),a=u=null},sphere:function(){o.polygonStart(),o.lineStart(),e(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function g(t,r){n(t,r)&&o.point(t,r)}function v(n,t){l.point(n,t)}function d(){h.point=v,l.lineStart()}function E(){h.point=g,l.lineEnd()}function y(n,t){c.push([n,t]),p.point(n,t)}function S(){p.lineStart(),c=[]}function m(){y(c[0][0],c[0][1]),p.lineEnd();var n,t,r,e,i=p.clean(),l=f.result(),h=l.length;if(c.pop(),u.push(c),c=null,h)if(1&i){if((t=(r=l[0]).length-1)>0){for(s||(o.polygonStart(),s=!0),o.lineStart(),n=0;n<t;++n)o.point((e=r[n])[0],e[1]);o.lineEnd()}}else h>1&&2&i&&l.push(l.pop().concat(l.shift())),a.push(l.filter(st))}return h}}function st(n){return n.length>1}function ht(n,t){return((n=n.x)[0]<0?n[1]-o-r:o-n[1])-((t=t.x)[0]<0?t[1]-o-r:o-t[1])}Kn.invert=Kn;var gt=pt(function(){return!0},function(n){var t,e=NaN,u=NaN,a=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(c,l){var s=c>0?i:-i,g=f(c-e);f(g-i)<r?(n.point(e,u=(u+l)/2>0?o:-o),n.point(a,u),n.lineEnd(),n.lineStart(),n.point(s,u),n.point(c,u),t=0):a!==s&&g>=i&&(f(e-a)<r&&(e-=a*r),f(c-s)<r&&(c-=s*r),u=function(n,t,e,i){var o,u,a=S(n-e);return f(a)>r?p((S(t)*(u=h(i))*S(e)-S(i)*(o=h(t))*S(n))/(o*u*a)):(t+i)/2}(e,u,c,l),n.point(a,u),n.lineEnd(),n.lineStart(),n.point(s,u),t=0),n.point(e=c,u=l),a=s},lineEnd:function(){n.lineEnd(),e=u=NaN},clean:function(){return 2-t}}},function(n,t,e,u){var a;if(null==n)a=e*o,u.point(-i,a),u.point(0,a),u.point(i,a),u.point(i,0),u.point(i,-a),u.point(0,-a),u.point(-i,-a),u.point(-i,0),u.point(-i,a);else if(f(n[0]-t[0])>r){var c=n[0]<t[0]?i:-i;a=e*c/2,u.point(-c,a),u.point(0,a),u.point(c,a)}else u.point(t[0],t[1])},[-i,-o]);function vt(n){var t=h(n),e=6*l,o=t>0,u=f(t)>r;function a(n,r){return h(n)*h(r)>t}function c(n,e,o){var u=[1,0,0],a=un(en(n),en(e)),c=on(a,a),l=a[0],p=c-l*l;if(!p)return!o&&n;var s=t*c/p,h=-t*l/p,g=un(u,a),v=cn(u,s);an(v,cn(a,h));var d=g,E=on(v,d),y=on(d,d),S=E*E-y*(on(v,v)-1);if(!(S<0)){var m=M(S),x=cn(d,(-E-m)/y);if(an(x,v),x=rn(x),!o)return x;var w,_=n[0],N=e[0],A=n[1],R=e[1];N<_&&(w=_,_=N,N=w);var C=N-_,P=f(C-i)<r;if(!P&&R<A&&(w=A,A=R,R=w),P||C<r?P?A+R>0^x[1]<(f(x[0]-_)<r?A:R):A<=x[1]&&x[1]<=R:C>i^(_<=x[0]&&x[0]<=N)){var j=cn(d,(-E+m)/y);return an(j,v),[x,rn(j)]}}}function p(t,r){var e=o?n:i-n,u=0;return t<-e?u|=1:t>e&&(u|=2),r<-e?u|=4:r>e&&(u|=8),u}return pt(a,function(n){var t,r,e,l,f;return{lineStart:function(){l=e=!1,f=1},point:function(s,h){var g,v=[s,h],d=a(s,h),E=o?d?0:p(s,h):d?p(s+(s<0?i:-i),h):0;if(!t&&(l=e=d)&&n.lineStart(),d!==e&&(!(g=c(t,v))||ot(t,g)||ot(v,g))&&(v[2]=1),d!==e)f=0,d?(n.lineStart(),g=c(v,t),n.point(g[0],g[1])):(g=c(t,v),n.point(g[0],g[1],2),n.lineEnd()),t=g;else if(u&&t&&o^d){var y;E&r||!(y=c(v,t,!0))||(f=0,o?(n.lineStart(),n.point(y[0][0],y[0][1]),n.point(y[1][0],y[1][1]),n.lineEnd()):(n.point(y[1][0],y[1][1]),n.lineEnd(),n.lineStart(),n.point(y[0][0],y[0][1],3)))}!d||t&&ot(t,v)||n.point(v[0],v[1]),t=v,e=d,r=E},lineEnd:function(){e&&n.lineEnd(),t=null},clean:function(){return f|(l&&e)<<1}}},function(t,r,i,o){rt(o,n,e,i,t,r)},o?[0,-n]:[-i,n-i])}var dt,Et,yt,St,mt=1e9,Mt=-mt;function xt(n,e,i,o){function u(t,r){return n<=t&&t<=i&&e<=r&&r<=o}function a(t,r,u,a){var l=0,f=0;if(null==t||(l=c(t,u))!==(f=c(r,u))||p(t,r)<0^u>0)do{a.point(0===l||3===l?n:i,l>1?o:e)}while((l=(l+u+4)%4)!==f);else a.point(r[0],r[1])}function c(t,o){return f(t[0]-n)<r?o>0?0:3:f(t[0]-i)<r?o>0?2:1:f(t[1]-e)<r?o>0?1:0:o>0?3:2}function l(n,t){return p(n.x,t.x)}function p(n,t){var r=c(n,1),e=c(t,1);return r!==e?r-e:0===r?t[1]-n[1]:1===r?n[0]-t[0]:2===r?n[1]-t[1]:t[0]-n[0]}return function(r){var c,f,p,s,h,g,v,d,E,y,S,m=r,M=it(),x={point:w,lineStart:function(){x.point=_,f&&f.push(p=[]);y=!0,E=!1,v=d=NaN},lineEnd:function(){c&&(_(s,h),g&&E&&M.rejoin(),c.push(M.result()));x.point=w,E&&m.lineEnd()},polygonStart:function(){m=M,c=[],f=[],S=!0},polygonEnd:function(){var e=function(){for(var t=0,r=0,e=f.length;r<e;++r)for(var i,u,a=f[r],c=1,l=a.length,p=a[0],s=p[0],h=p[1];c<l;++c)i=s,u=h,p=a[c],s=p[0],h=p[1],u<=o?h>o&&(s-i)*(o-u)>(h-u)*(n-i)&&++t:h<=o&&(s-i)*(o-u)<(h-u)*(n-i)&&--t;return t}(),i=S&&e,u=(c=t.merge(c)).length;(i||u)&&(r.polygonStart(),i&&(r.lineStart(),a(null,null,1,r),r.lineEnd()),u&&at(c,l,e,a,r),r.polygonEnd());m=r,c=f=p=null}};function w(n,t){u(n,t)&&m.point(n,t)}function _(t,r){var a=u(t,r);if(f&&p.push([t,r]),y)s=t,h=r,g=a,y=!1,a&&(m.lineStart(),m.point(t,r));else if(a&&E)m.point(t,r);else{var c=[v=Math.max(Mt,Math.min(mt,v)),d=Math.max(Mt,Math.min(mt,d))],l=[t=Math.max(Mt,Math.min(mt,t)),r=Math.max(Mt,Math.min(mt,r))];!function(n,t,r,e,i,o){var u,a=n[0],c=n[1],l=0,f=1,p=t[0]-a,s=t[1]-c;if(u=r-a,p||!(u>0)){if(u/=p,p<0){if(u<l)return;u<f&&(f=u)}else if(p>0){if(u>f)return;u>l&&(l=u)}if(u=i-a,p||!(u<0)){if(u/=p,p<0){if(u>f)return;u>l&&(l=u)}else if(p>0){if(u<l)return;u<f&&(f=u)}if(u=e-c,s||!(u>0)){if(u/=s,s<0){if(u<l)return;u<f&&(f=u)}else if(s>0){if(u>f)return;u>l&&(l=u)}if(u=o-c,s||!(u<0)){if(u/=s,s<0){if(u>f)return;u>l&&(l=u)}else if(s>0){if(u<l)return;u<f&&(f=u)}return l>0&&(n[0]=a+l*p,n[1]=c+l*s),f<1&&(t[0]=a+f*p,t[1]=c+f*s),!0}}}}}(c,l,n,e,i,o)?a&&(m.lineStart(),m.point(t,r),S=!1):(E||(m.lineStart(),m.point(c[0],c[1])),m.point(l[0],l[1]),a||m.lineEnd(),S=!1)}v=t,d=r,E=a}return x}}var wt={sphere:A,point:A,lineStart:function(){wt.point=Nt,wt.lineEnd=_t},lineEnd:A,polygonStart:A,polygonEnd:A};function _t(){wt.point=wt.lineEnd=A}function Nt(n,t){Et=n*=l,yt=S(t*=l),St=h(t),wt.point=At}function At(n,t){n*=l;var r=S(t*=l),e=h(t),i=f(n-Et),o=h(i),u=e*S(i),a=St*r-yt*e*o,c=yt*r+St*e*o;dt.add(s(M(u*u+a*a),c)),Et=n,yt=r,St=e}function Rt(n){return dt=new t.Adder,z(n,wt),+dt}var Ct=[null,null],Pt={type:"LineString",coordinates:Ct};function jt(n,t){return Ct[0]=n,Ct[1]=t,Rt(Pt)}var qt={Feature:function(n,t){return bt(n.geometry,t)},FeatureCollection:function(n,t){for(var r=n.features,e=-1,i=r.length;++e<i;)if(bt(r[e].geometry,t))return!0;return!1}},zt={Sphere:function(){return!0},Point:function(n,t){return Lt(n.coordinates,t)},MultiPoint:function(n,t){for(var r=n.coordinates,e=-1,i=r.length;++e<i;)if(Lt(r[e],t))return!0;return!1},LineString:function(n,t){return Ot(n.coordinates,t)},MultiLineString:function(n,t){for(var r=n.coordinates,e=-1,i=r.length;++e<i;)if(Ot(r[e],t))return!0;return!1},Polygon:function(n,t){return Gt(n.coordinates,t)},MultiPolygon:function(n,t){for(var r=n.coordinates,e=-1,i=r.length;++e<i;)if(Gt(r[e],t))return!0;return!1},GeometryCollection:function(n,t){for(var r=n.geometries,e=-1,i=r.length;++e<i;)if(bt(r[e],t))return!0;return!1}};function bt(n,t){return!(!n||!zt.hasOwnProperty(n.type))&&zt[n.type](n,t)}function Lt(n,t){return 0===jt(n,t)}function Ot(n,t){for(var r,i,o,u=0,a=n.length;u<a;u++){if(0===(i=jt(n[u],t)))return!0;if(u>0&&(o=jt(n[u],n[u-1]))>0&&r<=o&&i<=o&&(r+i-o)*(1-Math.pow((r-i)/o,2))<e*o)return!0;r=i}return!1}function Gt(n,t){return!!ft(n.map(Tt),kt(t))}function Tt(n){return(n=n.map(kt)).pop(),n}function kt(n){return[n[0]*l,n[1]*l]}function Ft(n,e,i){var o=t.range(n,e-r,i).concat(e);return function(n){return o.map(function(t){return[n,t]})}}function Ht(n,e,i){var o=t.range(n,e-r,i).concat(e);return function(n){return o.map(function(t){return[t,n]})}}function It(){var n,e,i,o,u,a,c,l,p,s,h,v,d=10,E=d,y=90,S=360,m=2.5;function M(){return{type:"MultiLineString",coordinates:x()}}function x(){return t.range(g(o/y)*y,i,y).map(h).concat(t.range(g(l/S)*S,c,S).map(v)).concat(t.range(g(e/d)*d,n,d).filter(function(n){return f(n%y)>r}).map(p)).concat(t.range(g(a/E)*E,u,E).filter(function(n){return f(n%S)>r}).map(s))}return M.lines=function(){return x().map(function(n){return{type:"LineString",coordinates:n}})},M.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(v(c).slice(1),h(i).reverse().slice(1),v(l).reverse().slice(1))]}},M.extent=function(n){return arguments.length?M.extentMajor(n).extentMinor(n):M.extentMinor()},M.extentMajor=function(n){return arguments.length?(o=+n[0][0],i=+n[1][0],l=+n[0][1],c=+n[1][1],o>i&&(n=o,o=i,i=n),l>c&&(n=l,l=c,c=n),M.precision(m)):[[o,l],[i,c]]},M.extentMinor=function(t){return arguments.length?(e=+t[0][0],n=+t[1][0],a=+t[0][1],u=+t[1][1],e>n&&(t=e,e=n,n=t),a>u&&(t=a,a=u,u=t),M.precision(m)):[[e,a],[n,u]]},M.step=function(n){return arguments.length?M.stepMajor(n).stepMinor(n):M.stepMinor()},M.stepMajor=function(n){return arguments.length?(y=+n[0],S=+n[1],M):[y,S]},M.stepMinor=function(n){return arguments.length?(d=+n[0],E=+n[1],M):[d,E]},M.precision=function(t){return arguments.length?(m=+t,p=Ft(a,u,90),s=Ht(e,n,m),h=Ft(l,c,90),v=Ht(o,i,m),M):m},M.extentMajor([[-180,-90+r],[180,90-r]]).extentMinor([[-180,-80-r],[180,80+r]])}var Wt,Xt,Yt,Bt,Dt=n=>n,Ut=new t.Adder,Zt=new t.Adder,Jt={point:A,lineStart:A,lineEnd:A,polygonStart:function(){Jt.lineStart=Kt,Jt.lineEnd=$t},polygonEnd:function(){Jt.lineStart=Jt.lineEnd=Jt.point=A,Ut.add(f(Zt)),Zt=new t.Adder},result:function(){var n=Ut/2;return Ut=new t.Adder,n}};function Kt(){Jt.point=Qt}function Qt(n,t){Jt.point=Vt,Wt=Yt=n,Xt=Bt=t}function Vt(n,t){Zt.add(Bt*n-Yt*t),Yt=n,Bt=t}function $t(){Vt(Wt,Xt)}var nr=1/0,tr=nr,rr=-nr,er=rr,ir={point:function(n,t){n<nr&&(nr=n);n>rr&&(rr=n);t<tr&&(tr=t);t>er&&(er=t)},lineStart:A,lineEnd:A,polygonStart:A,polygonEnd:A,result:function(){var n=[[nr,tr],[rr,er]];return rr=er=-(tr=nr=1/0),n}};var or,ur,ar,cr,lr=0,fr=0,pr=0,sr=0,hr=0,gr=0,vr=0,dr=0,Er=0,yr={point:Sr,lineStart:mr,lineEnd:wr,polygonStart:function(){yr.lineStart=_r,yr.lineEnd=Nr},polygonEnd:function(){yr.point=Sr,yr.lineStart=mr,yr.lineEnd=wr},result:function(){var n=Er?[vr/Er,dr/Er]:gr?[sr/gr,hr/gr]:pr?[lr/pr,fr/pr]:[NaN,NaN];return lr=fr=pr=sr=hr=gr=vr=dr=Er=0,n}};function Sr(n,t){lr+=n,fr+=t,++pr}function mr(){yr.point=Mr}function Mr(n,t){yr.point=xr,Sr(ar=n,cr=t)}function xr(n,t){var r=n-ar,e=t-cr,i=M(r*r+e*e);sr+=i*(ar+n)/2,hr+=i*(cr+t)/2,gr+=i,Sr(ar=n,cr=t)}function wr(){yr.point=Sr}function _r(){yr.point=Ar}function Nr(){Rr(or,ur)}function Ar(n,t){yr.point=Rr,Sr(or=ar=n,ur=cr=t)}function Rr(n,t){var r=n-ar,e=t-cr,i=M(r*r+e*e);sr+=i*(ar+n)/2,hr+=i*(cr+t)/2,gr+=i,vr+=(i=cr*n-ar*t)*(ar+n),dr+=i*(cr+t),Er+=3*i,Sr(ar=n,cr=t)}function Cr(n){this._context=n}Cr.prototype={_radius:4.5,pointRadius:function(n){return this._radius=n,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(n,t){switch(this._point){case 0:this._context.moveTo(n,t),this._point=1;break;case 1:this._context.lineTo(n,t);break;default:this._context.moveTo(n+this._radius,t),this._context.arc(n,t,this._radius,0,a)}},result:A};var Pr,jr,qr,zr,br,Lr=new t.Adder,Or={point:A,lineStart:function(){Or.point=Gr},lineEnd:function(){Pr&&Tr(jr,qr),Or.point=A},polygonStart:function(){Pr=!0},polygonEnd:function(){Pr=null},result:function(){var n=+Lr;return Lr=new t.Adder,n}};function Gr(n,t){Or.point=Tr,jr=zr=n,qr=br=t}function Tr(n,t){zr-=n,br-=t,Lr.add(M(zr*zr+br*br)),zr=n,br=t}function kr(){this._string=[]}function Fr(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Hr(n){return function(t){var r=new Ir;for(var e in n)r[e]=n[e];return r.stream=t,r}}function Ir(){}function Wr(n,t,r){var e=n.clipExtent&&n.clipExtent();return n.scale(150).translate([0,0]),null!=e&&n.clipExtent(null),z(r,n.stream(ir)),t(ir.result()),null!=e&&n.clipExtent(e),n}function Xr(n,t,r){return Wr(n,function(r){var e=t[1][0]-t[0][0],i=t[1][1]-t[0][1],o=Math.min(e/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),u=+t[0][0]+(e-o*(r[1][0]+r[0][0]))/2,a=+t[0][1]+(i-o*(r[1][1]+r[0][1]))/2;n.scale(150*o).translate([u,a])},r)}function Yr(n,t,r){return Xr(n,[[0,0],t],r)}function Br(n,t,r){return Wr(n,function(r){var e=+t,i=e/(r[1][0]-r[0][0]),o=(e-i*(r[1][0]+r[0][0]))/2,u=-i*r[0][1];n.scale(150*i).translate([o,u])},r)}function Dr(n,t,r){return Wr(n,function(r){var e=+t,i=e/(r[1][1]-r[0][1]),o=-i*r[0][0],u=(e-i*(r[1][1]+r[0][1]))/2;n.scale(150*i).translate([o,u])},r)}kr.prototype={_radius:4.5,_circle:Fr(4.5),pointRadius:function(n){return(n=+n)!==this._radius&&(this._radius=n,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(n,t){switch(this._point){case 0:this._string.push("M",n,",",t),this._point=1;break;case 1:this._string.push("L",n,",",t);break;default:null==this._circle&&(this._circle=Fr(this._radius)),this._string.push("M",n,",",t,this._circle)}},result:function(){if(this._string.length){var n=this._string.join("");return this._string=[],n}return null}},Ir.prototype={constructor:Ir,point:function(n,t){this.stream.point(n,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var Ur=16,Zr=h(30*l);function Jr(n,t){return+t?function(n,t){function e(i,o,u,a,c,l,p,h,g,v,d,E,y,S){var m=p-i,x=h-o,w=m*m+x*x;if(w>4*t&&y--){var N=a+v,A=c+d,R=l+E,C=M(N*N+A*A+R*R),P=_(R/=C),j=f(f(R)-1)<r||f(u-g)<r?(u+g)/2:s(A,N),q=n(j,P),z=q[0],b=q[1],L=z-i,O=b-o,G=x*L-m*O;(G*G/w>t||f((m*L+x*O)/w-.5)>.3||a*v+c*d+l*E<Zr)&&(e(i,o,u,a,c,l,z,b,j,N/=C,A/=C,R,y,S),S.point(z,b),e(z,b,j,N,A,R,p,h,g,v,d,E,y,S))}}return function(t){var r,i,o,u,a,c,l,f,p,s,h,g,v={point:d,lineStart:E,lineEnd:S,polygonStart:function(){t.polygonStart(),v.lineStart=m},polygonEnd:function(){t.polygonEnd(),v.lineStart=E}};function d(r,e){r=n(r,e),t.point(r[0],r[1])}function E(){f=NaN,v.point=y,t.lineStart()}function y(r,i){var o=en([r,i]),u=n(r,i);e(f,p,l,s,h,g,f=u[0],p=u[1],l=r,s=o[0],h=o[1],g=o[2],Ur,t),t.point(f,p)}function S(){v.point=d,t.lineEnd()}function m(){E(),v.point=M,v.lineEnd=x}function M(n,t){y(r=n,t),i=f,o=p,u=s,a=h,c=g,v.point=y}function x(){e(f,p,l,s,h,g,i,o,r,u,a,c,Ur,t),v.lineEnd=S,S()}return v}}(n,t):function(n){return Hr({point:function(t,r){t=n(t,r),this.stream.point(t[0],t[1])}})}(n)}var Kr=Hr({point:function(n,t){this.stream.point(n*l,t*l)}});function Qr(n,t,r,e,i,o){if(!o)return function(n,t,r,e,i){function o(o,u){return[t+n*(o*=e),r-n*(u*=i)]}return o.invert=function(o,u){return[(o-t)/n*e,(r-u)/n*i]},o}(n,t,r,e,i);var u=h(o),a=S(o),c=u*n,l=a*n,f=u/n,p=a/n,s=(a*r-u*t)/n,g=(a*t+u*r)/n;function v(n,o){return[c*(n*=e)-l*(o*=i)+t,r-l*n-c*o]}return v.invert=function(n,t){return[e*(f*n-p*t+s),i*(g-p*n-f*t)]},v}function Vr(n){return $r(function(){return n})()}function $r(n){var t,r,e,i,o,u,a,f,p,s,h=150,g=480,v=250,d=0,E=0,y=0,S=0,m=0,x=0,w=1,_=1,N=null,A=gt,R=null,C=Dt,P=.5;function j(n){return f(n[0]*l,n[1]*l)}function q(n){return(n=f.invert(n[0],n[1]))&&[n[0]*c,n[1]*c]}function z(){var n=Qr(h,0,0,w,_,x).apply(null,t(d,E)),e=Qr(h,g-n[0],v-n[1],w,_,x);return r=Qn(y,S,m),a=Jn(t,e),f=Jn(r,a),u=Jr(a,P),b()}function b(){return p=s=null,j}return j.stream=function(n){return p&&s===n?p:p=Kr(function(n){return Hr({point:function(t,r){var e=n(t,r);return this.stream.point(e[0],e[1])}})}(r)(A(u(C(s=n)))))},j.preclip=function(n){return arguments.length?(A=n,N=void 0,b()):A},j.postclip=function(n){return arguments.length?(C=n,R=e=i=o=null,b()):C},j.clipAngle=function(n){return arguments.length?(A=+n?vt(N=n*l):(N=null,gt),b()):N*c},j.clipExtent=function(n){return arguments.length?(C=null==n?(R=e=i=o=null,Dt):xt(R=+n[0][0],e=+n[0][1],i=+n[1][0],o=+n[1][1]),b()):null==R?null:[[R,e],[i,o]]},j.scale=function(n){return arguments.length?(h=+n,z()):h},j.translate=function(n){return arguments.length?(g=+n[0],v=+n[1],z()):[g,v]},j.center=function(n){return arguments.length?(d=n[0]%360*l,E=n[1]%360*l,z()):[d*c,E*c]},j.rotate=function(n){return arguments.length?(y=n[0]%360*l,S=n[1]%360*l,m=n.length>2?n[2]%360*l:0,z()):[y*c,S*c,m*c]},j.angle=function(n){return arguments.length?(x=n%360*l,z()):x*c},j.reflectX=function(n){return arguments.length?(w=n?-1:1,z()):w<0},j.reflectY=function(n){return arguments.length?(_=n?-1:1,z()):_<0},j.precision=function(n){return arguments.length?(u=Jr(a,P=n*n),b()):M(P)},j.fitExtent=function(n,t){return Xr(j,n,t)},j.fitSize=function(n,t){return Yr(j,n,t)},j.fitWidth=function(n,t){return Br(j,n,t)},j.fitHeight=function(n,t){return Dr(j,n,t)},function(){return t=n.apply(this,arguments),j.invert=t.invert&&q,z()}}function ne(n){var t=0,r=i/3,e=$r(n),o=e(t,r);return o.parallels=function(n){return arguments.length?e(t=n[0]*l,r=n[1]*l):[t*c,r*c]},o}function te(n,t){var e=S(n),o=(e+S(t))/2;if(f(o)<r)return function(n){var t=h(n);function r(n,r){return[n*t,S(r)/t]}return r.invert=function(n,r){return[n/t,_(r*t)]},r}(n);var u=1+e*(2*o-e),a=M(u)/o;function c(n,t){var r=M(u-2*o*S(t))/o;return[r*S(n*=o),a-r*h(n)]}return c.invert=function(n,t){var r=a-t,e=s(n,f(r))*m(r);return r*o<0&&(e-=i*m(n)*m(r)),[e/o,_((u-(n*n+r*r)*o*o)/(2*o))]},c}function re(){return ne(te).scale(155.424).center([0,33.6442])}function ee(){return re().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function ie(n){return function(t,r){var e=h(t),i=h(r),o=n(e*i);return o===1/0?[2,0]:[o*i*S(t),o*S(r)]}}function oe(n){return function(t,r){var e=M(t*t+r*r),i=n(e),o=S(i),u=h(i);return[s(t*o,e*u),_(e&&r*o/e)]}}var ue=ie(function(n){return M(2/(1+n))});ue.invert=oe(function(n){return 2*_(n/2)});var ae=ie(function(n){return(n=w(n))&&n/S(n)});function ce(n,t){return[n,E(x((o+t)/2))]}function le(n){var t,r,e,o=Vr(n),u=o.center,a=o.scale,c=o.translate,l=o.clipExtent,f=null;function p(){var u=i*a(),c=o(tt(o.rotate()).invert([0,0]));return l(null==f?[[c[0]-u,c[1]-u],[c[0]+u,c[1]+u]]:n===ce?[[Math.max(c[0]-u,f),t],[Math.min(c[0]+u,r),e]]:[[f,Math.max(c[1]-u,t)],[r,Math.min(c[1]+u,e)]])}return o.scale=function(n){return arguments.length?(a(n),p()):a()},o.translate=function(n){return arguments.length?(c(n),p()):c()},o.center=function(n){return arguments.length?(u(n),p()):u()},o.clipExtent=function(n){return arguments.length?(null==n?f=t=r=e=null:(f=+n[0][0],t=+n[0][1],r=+n[1][0],e=+n[1][1]),p()):null==f?null:[[f,t],[r,e]]},p()}function fe(n){return x((o+n)/2)}function pe(n,t){var e=h(n),u=n===t?S(n):E(e/h(t))/E(fe(t)/fe(n)),a=e*y(fe(n),u)/u;if(!u)return ce;function c(n,t){a>0?t<-o+r&&(t=-o+r):t>o-r&&(t=o-r);var e=a/y(fe(t),u);return[e*S(u*n),a-e*h(u*n)]}return c.invert=function(n,t){var r=a-t,e=m(u)*M(n*n+r*r),c=s(n,f(r))*m(r);return r*u<0&&(c-=i*m(n)*m(r)),[c/u,2*p(y(a/e,1/u))-o]},c}function se(n,t){return[n,t]}function he(n,t){var e=h(n),o=n===t?S(n):(e-h(t))/(t-n),u=e/o+n;if(f(o)<r)return se;function a(n,t){var r=u-t,e=o*n;return[r*S(e),u-r*h(e)]}return a.invert=function(n,t){var r=u-t,e=s(n,f(r))*m(r);return r*o<0&&(e-=i*m(n)*m(r)),[e/o,u-m(o)*M(n*n+r*r)]},a}ae.invert=oe(function(n){return n}),ce.invert=function(n,t){return[n,2*p(v(t))-o]},se.invert=se;var ge=1.340264,ve=-.081106,de=893e-6,Ee=.003796,ye=M(3)/2;function Se(n,t){var r=_(ye*S(t)),e=r*r,i=e*e*e;return[n*h(r)/(ye*(ge+3*ve*e+i*(7*de+9*Ee*e))),r*(ge+ve*e+i*(de+Ee*e))]}function me(n,t){var r=h(t),e=h(n)*r;return[r*S(n)/e,S(t)/e]}function Me(n,t){var r=t*t,e=r*r;return[n*(.8707-.131979*r+e*(e*(.003971*r-.001529*e)-.013791)),t*(1.007226+r*(.015085+e*(.028874*r-.044475-.005916*e)))]}function xe(n,t){return[h(t)*S(n),S(t)]}function we(n,t){var r=h(t),e=1+h(n)*r;return[r*S(n)/e,S(t)/e]}function _e(n,t){return[E(x((o+t)/2)),-n]}Se.invert=function(n,t){for(var r,i=t,o=i*i,u=o*o*o,a=0;a<12&&(u=(o=(i-=r=(i*(ge+ve*o+u*(de+Ee*o))-t)/(ge+3*ve*o+u*(7*de+9*Ee*o)))*i)*o*o,!(f(r)<e));++a);return[ye*n*(ge+3*ve*o+u*(7*de+9*Ee*o))/h(i),_(S(i)/ye)]},me.invert=oe(p),Me.invert=function(n,t){var e,i=t,o=25;do{var u=i*i,a=u*u;i-=e=(i*(1.007226+u*(.015085+a*(.028874*u-.044475-.005916*a)))-t)/(1.007226+u*(.045255+a*(.259866*u-.311325-.005916*11*a)))}while(f(e)>r&&--o>0);return[n/(.8707+(u=i*i)*(u*(u*u*u*(.003971-.001529*u)-.013791)-.131979)),i]},xe.invert=oe(_),we.invert=oe(function(n){return 2*p(n)}),_e.invert=function(n,t){return[-t,2*p(v(n))-o]},n.geoAlbers=ee,n.geoAlbersUsa=function(){var n,t,e,i,o,u,a=ee(),c=re().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=re().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f={point:function(n,t){u=[n,t]}};function p(n){var t=n[0],r=n[1];return u=null,e.point(t,r),u||(i.point(t,r),u)||(o.point(t,r),u)}function s(){return n=t=null,p}return p.invert=function(n){var t=a.scale(),r=a.translate(),e=(n[0]-r[0])/t,i=(n[1]-r[1])/t;return(i>=.12&&i<.234&&e>=-.425&&e<-.214?c:i>=.166&&i<.234&&e>=-.214&&e<-.115?l:a).invert(n)},p.stream=function(r){return n&&t===r?n:(e=[a.stream(t=r),c.stream(r),l.stream(r)],i=e.length,n={point:function(n,t){for(var r=-1;++r<i;)e[r].point(n,t)},sphere:function(){for(var n=-1;++n<i;)e[n].sphere()},lineStart:function(){for(var n=-1;++n<i;)e[n].lineStart()},lineEnd:function(){for(var n=-1;++n<i;)e[n].lineEnd()},polygonStart:function(){for(var n=-1;++n<i;)e[n].polygonStart()},polygonEnd:function(){for(var n=-1;++n<i;)e[n].polygonEnd()}});var e,i},p.precision=function(n){return arguments.length?(a.precision(n),c.precision(n),l.precision(n),s()):a.precision()},p.scale=function(n){return arguments.length?(a.scale(n),c.scale(.35*n),l.scale(n),p.translate(a.translate())):a.scale()},p.translate=function(n){if(!arguments.length)return a.translate();var t=a.scale(),u=+n[0],p=+n[1];return e=a.translate(n).clipExtent([[u-.455*t,p-.238*t],[u+.455*t,p+.238*t]]).stream(f),i=c.translate([u-.307*t,p+.201*t]).clipExtent([[u-.425*t+r,p+.12*t+r],[u-.214*t-r,p+.234*t-r]]).stream(f),o=l.translate([u-.205*t,p+.212*t]).clipExtent([[u-.214*t+r,p+.166*t+r],[u-.115*t-r,p+.234*t-r]]).stream(f),s()},p.fitExtent=function(n,t){return Xr(p,n,t)},p.fitSize=function(n,t){return Yr(p,n,t)},p.fitWidth=function(n,t){return Br(p,n,t)},p.fitHeight=function(n,t){return Dr(p,n,t)},p.scale(1070)},n.geoArea=function(n){return K=new t.Adder,z(n,Q),2*K},n.geoAzimuthalEqualArea=function(){return Vr(ue).scale(124.75).clipAngle(179.999)},n.geoAzimuthalEqualAreaRaw=ue,n.geoAzimuthalEquidistant=function(){return Vr(ae).scale(79.4188).clipAngle(179.999)},n.geoAzimuthalEquidistantRaw=ae,n.geoBounds=function(n){var t,r,e,i,o,u,a;if(I=H=-(k=F=1/0),U=[],z(n,An),r=U.length){for(U.sort(On),t=1,o=[e=U[0]];t<r;++t)Gn(e,(i=U[t])[0])||Gn(e,i[1])?(Ln(e[0],i[1])>Ln(e[0],e[1])&&(e[1]=i[1]),Ln(i[0],e[1])>Ln(e[0],e[1])&&(e[0]=i[0])):o.push(e=i);for(u=-1/0,t=0,e=o[r=o.length-1];t<=r;e=i,++t)i=o[t],(a=Ln(e[1],i[0]))>u&&(u=a,k=i[0],H=e[1])}return U=Z=null,k===1/0||F===1/0?[[NaN,NaN],[NaN,NaN]]:[[k,F],[H,I]]},n.geoCentroid=function(n){fn=pn=sn=hn=gn=vn=dn=En=0,yn=new t.Adder,Sn=new t.Adder,mn=new t.Adder,z(n,Tn);var i=+yn,o=+Sn,u=+mn,a=d(i,o,u);return a<e&&(i=vn,o=dn,u=En,pn<r&&(i=sn,o=hn,u=gn),(a=d(i,o,u))<e)?[NaN,NaN]:[s(o,i)*c,_(u/a)*c]},n.geoCircle=function(){var n,t,r=Zn([0,0]),e=Zn(90),i=Zn(6),o={point:function(r,e){n.push(r=t(r,e)),r[0]*=c,r[1]*=c}};function u(){var u=r.apply(this,arguments),a=e.apply(this,arguments)*l,c=i.apply(this,arguments)*l;return n=[],t=Qn(-u[0]*l,-u[1]*l,0).invert,rt(o,a,c,1),u={type:"Polygon",coordinates:[n]},n=t=null,u}return u.center=function(n){return arguments.length?(r="function"==typeof n?n:Zn([+n[0],+n[1]]),u):r},u.radius=function(n){return arguments.length?(e="function"==typeof n?n:Zn(+n),u):e},u.precision=function(n){return arguments.length?(i="function"==typeof n?n:Zn(+n),u):i},u},n.geoClipAntimeridian=gt,n.geoClipCircle=vt,n.geoClipExtent=function(){var n,t,r,e=0,i=0,o=960,u=500;return r={stream:function(r){return n&&t===r?n:n=xt(e,i,o,u)(t=r)},extent:function(a){return arguments.length?(e=+a[0][0],i=+a[0][1],o=+a[1][0],u=+a[1][1],n=t=null,r):[[e,i],[o,u]]}}},n.geoClipRectangle=xt,n.geoConicConformal=function(){return ne(pe).scale(109.5).parallels([30,30])},n.geoConicConformalRaw=pe,n.geoConicEqualArea=re,n.geoConicEqualAreaRaw=te,n.geoConicEquidistant=function(){return ne(he).scale(131.154).center([0,13.9389])},n.geoConicEquidistantRaw=he,n.geoContains=function(n,t){return(n&&qt.hasOwnProperty(n.type)?qt[n.type]:bt)(n,t)},n.geoDistance=jt,n.geoEqualEarth=function(){return Vr(Se).scale(177.158)},n.geoEqualEarthRaw=Se,n.geoEquirectangular=function(){return Vr(se).scale(152.63)},n.geoEquirectangularRaw=se,n.geoGnomonic=function(){return Vr(me).scale(144.049).clipAngle(60)},n.geoGnomonicRaw=me,n.geoGraticule=It,n.geoGraticule10=function(){return It()()},n.geoIdentity=function(){var n,t,r,e,i,o,u,a=1,f=0,p=0,s=1,g=1,v=0,d=null,E=1,y=1,m=Hr({point:function(n,t){var r=w([n,t]);this.stream.point(r[0],r[1])}}),M=Dt;function x(){return E=a*s,y=a*g,o=u=null,w}function w(r){var e=r[0]*E,i=r[1]*y;if(v){var o=i*n-e*t;e=e*n+i*t,i=o}return[e+f,i+p]}return w.invert=function(r){var e=r[0]-f,i=r[1]-p;if(v){var o=i*n+e*t;e=e*n-i*t,i=o}return[e/E,i/y]},w.stream=function(n){return o&&u===n?o:o=m(M(u=n))},w.postclip=function(n){return arguments.length?(M=n,d=r=e=i=null,x()):M},w.clipExtent=function(n){return arguments.length?(M=null==n?(d=r=e=i=null,Dt):xt(d=+n[0][0],r=+n[0][1],e=+n[1][0],i=+n[1][1]),x()):null==d?null:[[d,r],[e,i]]},w.scale=function(n){return arguments.length?(a=+n,x()):a},w.translate=function(n){return arguments.length?(f=+n[0],p=+n[1],x()):[f,p]},w.angle=function(r){return arguments.length?(t=S(v=r%360*l),n=h(v),x()):v*c},w.reflectX=function(n){return arguments.length?(s=n?-1:1,x()):s<0},w.reflectY=function(n){return arguments.length?(g=n?-1:1,x()):g<0},w.fitExtent=function(n,t){return Xr(w,n,t)},w.fitSize=function(n,t){return Yr(w,n,t)},w.fitWidth=function(n,t){return Br(w,n,t)},w.fitHeight=function(n,t){return Dr(w,n,t)},w},n.geoInterpolate=function(n,t){var r=n[0]*l,e=n[1]*l,i=t[0]*l,o=t[1]*l,u=h(e),a=S(e),f=h(o),p=S(o),g=u*h(r),v=u*S(r),d=f*h(i),E=f*S(i),y=2*_(M(N(o-e)+u*f*N(i-r))),m=S(y),x=y?function(n){var t=S(n*=y)/m,r=S(y-n)/m,e=r*g+t*d,i=r*v+t*E,o=r*a+t*p;return[s(i,e)*c,s(o,M(e*e+i*i))*c]}:function(){return[r*c,e*c]};return x.distance=y,x},n.geoLength=Rt,n.geoMercator=function(){return le(ce).scale(961/a)},n.geoMercatorRaw=ce,n.geoNaturalEarth1=function(){return Vr(Me).scale(175.295)},n.geoNaturalEarth1Raw=Me,n.geoOrthographic=function(){return Vr(xe).scale(249.5).clipAngle(90+r)},n.geoOrthographicRaw=xe,n.geoPath=function(n,t){var r,e,i=4.5;function o(n){return n&&("function"==typeof i&&e.pointRadius(+i.apply(this,arguments)),z(n,r(e))),e.result()}return o.area=function(n){return z(n,r(Jt)),Jt.result()},o.measure=function(n){return z(n,r(Or)),Or.result()},o.bounds=function(n){return z(n,r(ir)),ir.result()},o.centroid=function(n){return z(n,r(yr)),yr.result()},o.projection=function(t){return arguments.length?(r=null==t?(n=null,Dt):(n=t).stream,o):n},o.context=function(n){return arguments.length?(e=null==n?(t=null,new kr):new Cr(t=n),"function"!=typeof i&&e.pointRadius(i),o):t},o.pointRadius=function(n){return arguments.length?(i="function"==typeof n?n:(e.pointRadius(+n),+n),o):i},o.projection(n).context(t)},n.geoProjection=Vr,n.geoProjectionMutator=$r,n.geoRotation=tt,n.geoStereographic=function(){return Vr(we).scale(250).clipAngle(142)},n.geoStereographicRaw=we,n.geoStream=z,n.geoTransform=function(n){return{stream:Hr(n)}},n.geoTransverseMercator=function(){var n=le(_e),t=n.center,r=n.rotate;return n.center=function(n){return arguments.length?t([-n[1],n[0]]):[(n=t())[1],-n[0]]},n.rotate=function(n){return arguments.length?r([n[0],n[1],n.length>2?n[2]+90:90]):[(n=r())[0],n[1],n[2]-90]},r([0,0,90]).scale(159.155)},n.geoTransverseMercatorRaw=_e,Object.defineProperty(n,"__esModule",{value:!0})}); diff --git a/node_modules/d3-geo/package.json b/node_modules/d3-geo/package.json deleted file mode 100644 index 28c93595498eca3a0501585f6049754263388e27..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_from": "d3-geo@2", - "_id": "d3-geo@2.0.1", - "_inBundle": false, - "_integrity": "sha512-M6yzGbFRfxzNrVhxDJXzJqSLQ90q1cCyb3EWFZ1LF4eWOBYxFypw7I/NFVBNXKNqxv1bqLathhYvdJ6DC+th3A==", - "_location": "/d3-geo", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-geo@2", - "name": "d3-geo", - "escapedName": "d3-geo", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3" - ], - "_resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-2.0.1.tgz", - "_shasum": "2437fdfed3fe3aba2812bd8f30609cac83a7ee39", - "_spec": "d3-geo@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "https://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-geo/issues" - }, - "bundleDependencies": false, - "dependencies": { - "d3-array": ">=2.5" - }, - "deprecated": false, - "description": "Shapes and calculators for spherical coordinates.", - "devDependencies": { - "canvas": "1 - 2", - "d3-format": "1 - 2", - "eslint": "6", - "esm": "3", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4", - "topojson-client": "3", - "world-atlas": "1" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-geo/", - "jsdelivr": "dist/d3-geo.min.js", - "keywords": [ - "d3", - "d3-module", - "geo", - "maps", - "cartography" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-geo.js", - "module": "src/index.js", - "name": "d3-geo", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-geo.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test && mkdir -p test/output && test/compare-images", - "pretest": "rollup -c", - "test": "tape -r esm 'test/**/*-test.js' && eslint src" - }, - "sideEffects": false, - "unpkg": "dist/d3-geo.min.js", - "version": "2.0.1" -} diff --git a/node_modules/d3-geo/src/area.js b/node_modules/d3-geo/src/area.js deleted file mode 100644 index df91640e66958ac0385b3dd33a19c8f5ef7ef376..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/area.js +++ /dev/null @@ -1,76 +0,0 @@ -import {Adder} from "d3-array"; -import {atan2, cos, quarterPi, radians, sin, tau} from "./math.js"; -import noop from "./noop.js"; -import stream from "./stream.js"; - -export var areaRingSum = new Adder(); - -// hello? - -var areaSum = new Adder(), - lambda00, - phi00, - lambda0, - cosPhi0, - sinPhi0; - -export var areaStream = { - point: noop, - lineStart: noop, - lineEnd: noop, - polygonStart: function() { - areaRingSum = new Adder(); - areaStream.lineStart = areaRingStart; - areaStream.lineEnd = areaRingEnd; - }, - polygonEnd: function() { - var areaRing = +areaRingSum; - areaSum.add(areaRing < 0 ? tau + areaRing : areaRing); - this.lineStart = this.lineEnd = this.point = noop; - }, - sphere: function() { - areaSum.add(tau); - } -}; - -function areaRingStart() { - areaStream.point = areaPointFirst; -} - -function areaRingEnd() { - areaPoint(lambda00, phi00); -} - -function areaPointFirst(lambda, phi) { - areaStream.point = areaPoint; - lambda00 = lambda, phi00 = phi; - lambda *= radians, phi *= radians; - lambda0 = lambda, cosPhi0 = cos(phi = phi / 2 + quarterPi), sinPhi0 = sin(phi); -} - -function areaPoint(lambda, phi) { - lambda *= radians, phi *= radians; - phi = phi / 2 + quarterPi; // half the angular distance from south pole - - // Spherical excess E for a spherical triangle with vertices: south pole, - // previous point, current point. Uses a formula derived from Cagnoli’s - // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2). - var dLambda = lambda - lambda0, - sdLambda = dLambda >= 0 ? 1 : -1, - adLambda = sdLambda * dLambda, - cosPhi = cos(phi), - sinPhi = sin(phi), - k = sinPhi0 * sinPhi, - u = cosPhi0 * cosPhi + k * cos(adLambda), - v = k * sdLambda * sin(adLambda); - areaRingSum.add(atan2(v, u)); - - // Advance the previous points. - lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi; -} - -export default function(object) { - areaSum = new Adder(); - stream(object, areaStream); - return areaSum * 2; -} diff --git a/node_modules/d3-geo/src/bounds.js b/node_modules/d3-geo/src/bounds.js deleted file mode 100644 index 0b398ac9a61a8a29d7341f510e3d29341798d38d..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/bounds.js +++ /dev/null @@ -1,179 +0,0 @@ -import {Adder} from "d3-array"; -import {areaStream, areaRingSum} from "./area.js"; -import {cartesian, cartesianCross, cartesianNormalizeInPlace, spherical} from "./cartesian.js"; -import {abs, degrees, epsilon, radians} from "./math.js"; -import stream from "./stream.js"; - -var lambda0, phi0, lambda1, phi1, // bounds - lambda2, // previous lambda-coordinate - lambda00, phi00, // first point - p0, // previous 3D point - deltaSum, - ranges, - range; - -var boundsStream = { - point: boundsPoint, - lineStart: boundsLineStart, - lineEnd: boundsLineEnd, - polygonStart: function() { - boundsStream.point = boundsRingPoint; - boundsStream.lineStart = boundsRingStart; - boundsStream.lineEnd = boundsRingEnd; - deltaSum = new Adder(); - areaStream.polygonStart(); - }, - polygonEnd: function() { - areaStream.polygonEnd(); - boundsStream.point = boundsPoint; - boundsStream.lineStart = boundsLineStart; - boundsStream.lineEnd = boundsLineEnd; - if (areaRingSum < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90); - else if (deltaSum > epsilon) phi1 = 90; - else if (deltaSum < -epsilon) phi0 = -90; - range[0] = lambda0, range[1] = lambda1; - }, - sphere: function() { - lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90); - } -}; - -function boundsPoint(lambda, phi) { - ranges.push(range = [lambda0 = lambda, lambda1 = lambda]); - if (phi < phi0) phi0 = phi; - if (phi > phi1) phi1 = phi; -} - -function linePoint(lambda, phi) { - var p = cartesian([lambda * radians, phi * radians]); - if (p0) { - var normal = cartesianCross(p0, p), - equatorial = [normal[1], -normal[0], 0], - inflection = cartesianCross(equatorial, normal); - cartesianNormalizeInPlace(inflection); - inflection = spherical(inflection); - var delta = lambda - lambda2, - sign = delta > 0 ? 1 : -1, - lambdai = inflection[0] * degrees * sign, - phii, - antimeridian = abs(delta) > 180; - if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) { - phii = inflection[1] * degrees; - if (phii > phi1) phi1 = phii; - } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) { - phii = -inflection[1] * degrees; - if (phii < phi0) phi0 = phii; - } else { - if (phi < phi0) phi0 = phi; - if (phi > phi1) phi1 = phi; - } - if (antimeridian) { - if (lambda < lambda2) { - if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda; - } else { - if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda; - } - } else { - if (lambda1 >= lambda0) { - if (lambda < lambda0) lambda0 = lambda; - if (lambda > lambda1) lambda1 = lambda; - } else { - if (lambda > lambda2) { - if (angle(lambda0, lambda) > angle(lambda0, lambda1)) lambda1 = lambda; - } else { - if (angle(lambda, lambda1) > angle(lambda0, lambda1)) lambda0 = lambda; - } - } - } - } else { - ranges.push(range = [lambda0 = lambda, lambda1 = lambda]); - } - if (phi < phi0) phi0 = phi; - if (phi > phi1) phi1 = phi; - p0 = p, lambda2 = lambda; -} - -function boundsLineStart() { - boundsStream.point = linePoint; -} - -function boundsLineEnd() { - range[0] = lambda0, range[1] = lambda1; - boundsStream.point = boundsPoint; - p0 = null; -} - -function boundsRingPoint(lambda, phi) { - if (p0) { - var delta = lambda - lambda2; - deltaSum.add(abs(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta); - } else { - lambda00 = lambda, phi00 = phi; - } - areaStream.point(lambda, phi); - linePoint(lambda, phi); -} - -function boundsRingStart() { - areaStream.lineStart(); -} - -function boundsRingEnd() { - boundsRingPoint(lambda00, phi00); - areaStream.lineEnd(); - if (abs(deltaSum) > epsilon) lambda0 = -(lambda1 = 180); - range[0] = lambda0, range[1] = lambda1; - p0 = null; -} - -// Finds the left-right distance between two longitudes. -// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want -// the distance between ±180° to be 360°. -function angle(lambda0, lambda1) { - return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1; -} - -function rangeCompare(a, b) { - return a[0] - b[0]; -} - -function rangeContains(range, x) { - return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x; -} - -export default function(feature) { - var i, n, a, b, merged, deltaMax, delta; - - phi1 = lambda1 = -(lambda0 = phi0 = Infinity); - ranges = []; - stream(feature, boundsStream); - - // First, sort ranges by their minimum longitudes. - if (n = ranges.length) { - ranges.sort(rangeCompare); - - // Then, merge any ranges that overlap. - for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) { - b = ranges[i]; - if (rangeContains(a, b[0]) || rangeContains(a, b[1])) { - if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1]; - if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0]; - } else { - merged.push(a = b); - } - } - - // Finally, find the largest gap between the merged ranges. - // The final bounding box will be the inverse of this gap. - for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) { - b = merged[i]; - if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0 = b[0], lambda1 = a[1]; - } - } - - ranges = range = null; - - return lambda0 === Infinity || phi0 === Infinity - ? [[NaN, NaN], [NaN, NaN]] - : [[lambda0, phi0], [lambda1, phi1]]; -} diff --git a/node_modules/d3-geo/src/cartesian.js b/node_modules/d3-geo/src/cartesian.js deleted file mode 100644 index 73790a6dad714f59b51adb2d7088b70f6bcd6b10..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/cartesian.js +++ /dev/null @@ -1,33 +0,0 @@ -import {asin, atan2, cos, sin, sqrt} from "./math.js"; - -export function spherical(cartesian) { - return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])]; -} - -export function cartesian(spherical) { - var lambda = spherical[0], phi = spherical[1], cosPhi = cos(phi); - return [cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)]; -} - -export function cartesianDot(a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; -} - -export function cartesianCross(a, b) { - return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]]; -} - -// TODO return a -export function cartesianAddInPlace(a, b) { - a[0] += b[0], a[1] += b[1], a[2] += b[2]; -} - -export function cartesianScale(vector, k) { - return [vector[0] * k, vector[1] * k, vector[2] * k]; -} - -// TODO return d -export function cartesianNormalizeInPlace(d) { - var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]); - d[0] /= l, d[1] /= l, d[2] /= l; -} diff --git a/node_modules/d3-geo/src/centroid.js b/node_modules/d3-geo/src/centroid.js deleted file mode 100644 index 6b1eede0e17b0890c13160fd437e88eaf7c50080..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/centroid.js +++ /dev/null @@ -1,143 +0,0 @@ -import {Adder} from "d3-array"; -import {asin, atan2, cos, degrees, epsilon, epsilon2, hypot, radians, sin, sqrt} from "./math.js"; -import noop from "./noop.js"; -import stream from "./stream.js"; - -var W0, W1, - X0, Y0, Z0, - X1, Y1, Z1, - X2, Y2, Z2, - lambda00, phi00, // first point - x0, y0, z0; // previous point - -var centroidStream = { - sphere: noop, - point: centroidPoint, - lineStart: centroidLineStart, - lineEnd: centroidLineEnd, - polygonStart: function() { - centroidStream.lineStart = centroidRingStart; - centroidStream.lineEnd = centroidRingEnd; - }, - polygonEnd: function() { - centroidStream.lineStart = centroidLineStart; - centroidStream.lineEnd = centroidLineEnd; - } -}; - -// Arithmetic mean of Cartesian vectors. -function centroidPoint(lambda, phi) { - lambda *= radians, phi *= radians; - var cosPhi = cos(phi); - centroidPointCartesian(cosPhi * cos(lambda), cosPhi * sin(lambda), sin(phi)); -} - -function centroidPointCartesian(x, y, z) { - ++W0; - X0 += (x - X0) / W0; - Y0 += (y - Y0) / W0; - Z0 += (z - Z0) / W0; -} - -function centroidLineStart() { - centroidStream.point = centroidLinePointFirst; -} - -function centroidLinePointFirst(lambda, phi) { - lambda *= radians, phi *= radians; - var cosPhi = cos(phi); - x0 = cosPhi * cos(lambda); - y0 = cosPhi * sin(lambda); - z0 = sin(phi); - centroidStream.point = centroidLinePoint; - centroidPointCartesian(x0, y0, z0); -} - -function centroidLinePoint(lambda, phi) { - lambda *= radians, phi *= radians; - var cosPhi = cos(phi), - x = cosPhi * cos(lambda), - y = cosPhi * sin(lambda), - z = sin(phi), - w = atan2(sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z); - W1 += w; - X1 += w * (x0 + (x0 = x)); - Y1 += w * (y0 + (y0 = y)); - Z1 += w * (z0 + (z0 = z)); - centroidPointCartesian(x0, y0, z0); -} - -function centroidLineEnd() { - centroidStream.point = centroidPoint; -} - -// See J. E. Brock, The Inertia Tensor for a Spherical Triangle, -// J. Applied Mechanics 42, 239 (1975). -function centroidRingStart() { - centroidStream.point = centroidRingPointFirst; -} - -function centroidRingEnd() { - centroidRingPoint(lambda00, phi00); - centroidStream.point = centroidPoint; -} - -function centroidRingPointFirst(lambda, phi) { - lambda00 = lambda, phi00 = phi; - lambda *= radians, phi *= radians; - centroidStream.point = centroidRingPoint; - var cosPhi = cos(phi); - x0 = cosPhi * cos(lambda); - y0 = cosPhi * sin(lambda); - z0 = sin(phi); - centroidPointCartesian(x0, y0, z0); -} - -function centroidRingPoint(lambda, phi) { - lambda *= radians, phi *= radians; - var cosPhi = cos(phi), - x = cosPhi * cos(lambda), - y = cosPhi * sin(lambda), - z = sin(phi), - cx = y0 * z - z0 * y, - cy = z0 * x - x0 * z, - cz = x0 * y - y0 * x, - m = hypot(cx, cy, cz), - w = asin(m), // line weight = angle - v = m && -w / m; // area weight multiplier - X2.add(v * cx); - Y2.add(v * cy); - Z2.add(v * cz); - W1 += w; - X1 += w * (x0 + (x0 = x)); - Y1 += w * (y0 + (y0 = y)); - Z1 += w * (z0 + (z0 = z)); - centroidPointCartesian(x0, y0, z0); -} - -export default function(object) { - W0 = W1 = - X0 = Y0 = Z0 = - X1 = Y1 = Z1 = 0; - X2 = new Adder(); - Y2 = new Adder(); - Z2 = new Adder(); - stream(object, centroidStream); - - var x = +X2, - y = +Y2, - z = +Z2, - m = hypot(x, y, z); - - // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid. - if (m < epsilon2) { - x = X1, y = Y1, z = Z1; - // If the feature has zero length, fall back to arithmetic mean of point vectors. - if (W1 < epsilon) x = X0, y = Y0, z = Z0; - m = hypot(x, y, z); - // If the feature still has an undefined ccentroid, then return. - if (m < epsilon2) return [NaN, NaN]; - } - - return [atan2(y, x) * degrees, asin(z / m) * degrees]; -} diff --git a/node_modules/d3-geo/src/circle.js b/node_modules/d3-geo/src/circle.js deleted file mode 100644 index 85a0af9477c3345f93a34cb715d1aea7e9dda271..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/circle.js +++ /dev/null @@ -1,72 +0,0 @@ -import {cartesian, cartesianNormalizeInPlace, spherical} from "./cartesian.js"; -import constant from "./constant.js"; -import {acos, cos, degrees, epsilon, radians, sin, tau} from "./math.js"; -import {rotateRadians} from "./rotation.js"; - -// Generates a circle centered at [0°, 0°], with a given radius and precision. -export function circleStream(stream, radius, delta, direction, t0, t1) { - if (!delta) return; - var cosRadius = cos(radius), - sinRadius = sin(radius), - step = direction * delta; - if (t0 == null) { - t0 = radius + direction * tau; - t1 = radius - step / 2; - } else { - t0 = circleRadius(cosRadius, t0); - t1 = circleRadius(cosRadius, t1); - if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau; - } - for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) { - point = spherical([cosRadius, -sinRadius * cos(t), -sinRadius * sin(t)]); - stream.point(point[0], point[1]); - } -} - -// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0]. -function circleRadius(cosRadius, point) { - point = cartesian(point), point[0] -= cosRadius; - cartesianNormalizeInPlace(point); - var radius = acos(-point[1]); - return ((-point[2] < 0 ? -radius : radius) + tau - epsilon) % tau; -} - -export default function() { - var center = constant([0, 0]), - radius = constant(90), - precision = constant(6), - ring, - rotate, - stream = {point: point}; - - function point(x, y) { - ring.push(x = rotate(x, y)); - x[0] *= degrees, x[1] *= degrees; - } - - function circle() { - var c = center.apply(this, arguments), - r = radius.apply(this, arguments) * radians, - p = precision.apply(this, arguments) * radians; - ring = []; - rotate = rotateRadians(-c[0] * radians, -c[1] * radians, 0).invert; - circleStream(stream, r, p, 1); - c = {type: "Polygon", coordinates: [ring]}; - ring = rotate = null; - return c; - } - - circle.center = function(_) { - return arguments.length ? (center = typeof _ === "function" ? _ : constant([+_[0], +_[1]]), circle) : center; - }; - - circle.radius = function(_) { - return arguments.length ? (radius = typeof _ === "function" ? _ : constant(+_), circle) : radius; - }; - - circle.precision = function(_) { - return arguments.length ? (precision = typeof _ === "function" ? _ : constant(+_), circle) : precision; - }; - - return circle; -} diff --git a/node_modules/d3-geo/src/clip/antimeridian.js b/node_modules/d3-geo/src/clip/antimeridian.js deleted file mode 100644 index 7ed32d424bf5668e367bd105dbb83f48e727a738..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/clip/antimeridian.js +++ /dev/null @@ -1,92 +0,0 @@ -import clip from "./index.js"; -import {abs, atan, cos, epsilon, halfPi, pi, sin} from "../math.js"; - -export default clip( - function() { return true; }, - clipAntimeridianLine, - clipAntimeridianInterpolate, - [-pi, -halfPi] -); - -// Takes a line and cuts into visible segments. Return values: 0 - there were -// intersections or the line was empty; 1 - no intersections; 2 - there were -// intersections, and the first and last segments should be rejoined. -function clipAntimeridianLine(stream) { - var lambda0 = NaN, - phi0 = NaN, - sign0 = NaN, - clean; // no intersections - - return { - lineStart: function() { - stream.lineStart(); - clean = 1; - }, - point: function(lambda1, phi1) { - var sign1 = lambda1 > 0 ? pi : -pi, - delta = abs(lambda1 - lambda0); - if (abs(delta - pi) < epsilon) { // line crosses a pole - stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi : -halfPi); - stream.point(sign0, phi0); - stream.lineEnd(); - stream.lineStart(); - stream.point(sign1, phi0); - stream.point(lambda1, phi0); - clean = 0; - } else if (sign0 !== sign1 && delta >= pi) { // line crosses antimeridian - if (abs(lambda0 - sign0) < epsilon) lambda0 -= sign0 * epsilon; // handle degeneracies - if (abs(lambda1 - sign1) < epsilon) lambda1 -= sign1 * epsilon; - phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1); - stream.point(sign0, phi0); - stream.lineEnd(); - stream.lineStart(); - stream.point(sign1, phi0); - clean = 0; - } - stream.point(lambda0 = lambda1, phi0 = phi1); - sign0 = sign1; - }, - lineEnd: function() { - stream.lineEnd(); - lambda0 = phi0 = NaN; - }, - clean: function() { - return 2 - clean; // if intersections, rejoin first and last segments - } - }; -} - -function clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) { - var cosPhi0, - cosPhi1, - sinLambda0Lambda1 = sin(lambda0 - lambda1); - return abs(sinLambda0Lambda1) > epsilon - ? atan((sin(phi0) * (cosPhi1 = cos(phi1)) * sin(lambda1) - - sin(phi1) * (cosPhi0 = cos(phi0)) * sin(lambda0)) - / (cosPhi0 * cosPhi1 * sinLambda0Lambda1)) - : (phi0 + phi1) / 2; -} - -function clipAntimeridianInterpolate(from, to, direction, stream) { - var phi; - if (from == null) { - phi = direction * halfPi; - stream.point(-pi, phi); - stream.point(0, phi); - stream.point(pi, phi); - stream.point(pi, 0); - stream.point(pi, -phi); - stream.point(0, -phi); - stream.point(-pi, -phi); - stream.point(-pi, 0); - stream.point(-pi, phi); - } else if (abs(from[0] - to[0]) > epsilon) { - var lambda = from[0] < to[0] ? pi : -pi; - phi = direction * lambda / 2; - stream.point(-lambda, phi); - stream.point(0, phi); - stream.point(lambda, phi); - } else { - stream.point(to[0], to[1]); - } -} diff --git a/node_modules/d3-geo/src/clip/buffer.js b/node_modules/d3-geo/src/clip/buffer.js deleted file mode 100644 index f5e1ecec1a393000a914ccaa0169650143533398..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/clip/buffer.js +++ /dev/null @@ -1,24 +0,0 @@ -import noop from "../noop.js"; - -export default function() { - var lines = [], - line; - return { - point: function(x, y, m) { - line.push([x, y, m]); - }, - lineStart: function() { - lines.push(line = []); - }, - lineEnd: noop, - rejoin: function() { - if (lines.length > 1) lines.push(lines.pop().concat(lines.shift())); - }, - result: function() { - var result = lines; - lines = []; - line = null; - return result; - } - }; -} diff --git a/node_modules/d3-geo/src/clip/circle.js b/node_modules/d3-geo/src/clip/circle.js deleted file mode 100644 index 30dcf44101d4c6b7eeff565b69decb1895c24043..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/clip/circle.js +++ /dev/null @@ -1,177 +0,0 @@ -import {cartesian, cartesianAddInPlace, cartesianCross, cartesianDot, cartesianScale, spherical} from "../cartesian.js"; -import {circleStream} from "../circle.js"; -import {abs, cos, epsilon, pi, radians, sqrt} from "../math.js"; -import pointEqual from "../pointEqual.js"; -import clip from "./index.js"; - -export default function(radius) { - var cr = cos(radius), - delta = 6 * radians, - smallRadius = cr > 0, - notHemisphere = abs(cr) > epsilon; // TODO optimise for this common case - - function interpolate(from, to, direction, stream) { - circleStream(stream, radius, delta, direction, from, to); - } - - function visible(lambda, phi) { - return cos(lambda) * cos(phi) > cr; - } - - // Takes a line and cuts into visible segments. Return values used for polygon - // clipping: 0 - there were intersections or the line was empty; 1 - no - // intersections 2 - there were intersections, and the first and last segments - // should be rejoined. - function clipLine(stream) { - var point0, // previous point - c0, // code for previous point - v0, // visibility of previous point - v00, // visibility of first point - clean; // no intersections - return { - lineStart: function() { - v00 = v0 = false; - clean = 1; - }, - point: function(lambda, phi) { - var point1 = [lambda, phi], - point2, - v = visible(lambda, phi), - c = smallRadius - ? v ? 0 : code(lambda, phi) - : v ? code(lambda + (lambda < 0 ? pi : -pi), phi) : 0; - if (!point0 && (v00 = v0 = v)) stream.lineStart(); - if (v !== v0) { - point2 = intersect(point0, point1); - if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2)) - point1[2] = 1; - } - if (v !== v0) { - clean = 0; - if (v) { - // outside going in - stream.lineStart(); - point2 = intersect(point1, point0); - stream.point(point2[0], point2[1]); - } else { - // inside going out - point2 = intersect(point0, point1); - stream.point(point2[0], point2[1], 2); - stream.lineEnd(); - } - point0 = point2; - } else if (notHemisphere && point0 && smallRadius ^ v) { - var t; - // If the codes for two points are different, or are both zero, - // and there this segment intersects with the small circle. - if (!(c & c0) && (t = intersect(point1, point0, true))) { - clean = 0; - if (smallRadius) { - stream.lineStart(); - stream.point(t[0][0], t[0][1]); - stream.point(t[1][0], t[1][1]); - stream.lineEnd(); - } else { - stream.point(t[1][0], t[1][1]); - stream.lineEnd(); - stream.lineStart(); - stream.point(t[0][0], t[0][1], 3); - } - } - } - if (v && (!point0 || !pointEqual(point0, point1))) { - stream.point(point1[0], point1[1]); - } - point0 = point1, v0 = v, c0 = c; - }, - lineEnd: function() { - if (v0) stream.lineEnd(); - point0 = null; - }, - // Rejoin first and last segments if there were intersections and the first - // and last points were visible. - clean: function() { - return clean | ((v00 && v0) << 1); - } - }; - } - - // Intersects the great circle between a and b with the clip circle. - function intersect(a, b, two) { - var pa = cartesian(a), - pb = cartesian(b); - - // We have two planes, n1.p = d1 and n2.p = d2. - // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2). - var n1 = [1, 0, 0], // normal - n2 = cartesianCross(pa, pb), - n2n2 = cartesianDot(n2, n2), - n1n2 = n2[0], // cartesianDot(n1, n2), - determinant = n2n2 - n1n2 * n1n2; - - // Two polar points. - if (!determinant) return !two && a; - - var c1 = cr * n2n2 / determinant, - c2 = -cr * n1n2 / determinant, - n1xn2 = cartesianCross(n1, n2), - A = cartesianScale(n1, c1), - B = cartesianScale(n2, c2); - cartesianAddInPlace(A, B); - - // Solve |p(t)|^2 = 1. - var u = n1xn2, - w = cartesianDot(A, u), - uu = cartesianDot(u, u), - t2 = w * w - uu * (cartesianDot(A, A) - 1); - - if (t2 < 0) return; - - var t = sqrt(t2), - q = cartesianScale(u, (-w - t) / uu); - cartesianAddInPlace(q, A); - q = spherical(q); - - if (!two) return q; - - // Two intersection points. - var lambda0 = a[0], - lambda1 = b[0], - phi0 = a[1], - phi1 = b[1], - z; - - if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z; - - var delta = lambda1 - lambda0, - polar = abs(delta - pi) < epsilon, - meridian = polar || delta < epsilon; - - if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z; - - // Check that the first point is between a and b. - if (meridian - ? polar - ? phi0 + phi1 > 0 ^ q[1] < (abs(q[0] - lambda0) < epsilon ? phi0 : phi1) - : phi0 <= q[1] && q[1] <= phi1 - : delta > pi ^ (lambda0 <= q[0] && q[0] <= lambda1)) { - var q1 = cartesianScale(u, (-w + t) / uu); - cartesianAddInPlace(q1, A); - return [q, spherical(q1)]; - } - } - - // Generates a 4-bit vector representing the location of a point relative to - // the small circle's bounding box. - function code(lambda, phi) { - var r = smallRadius ? radius : pi - radius, - code = 0; - if (lambda < -r) code |= 1; // left - else if (lambda > r) code |= 2; // right - if (phi < -r) code |= 4; // below - else if (phi > r) code |= 8; // above - return code; - } - - return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi, radius - pi]); -} diff --git a/node_modules/d3-geo/src/clip/extent.js b/node_modules/d3-geo/src/clip/extent.js deleted file mode 100644 index 5ff06ee1b7d9a9d3a408738abda8b30d974dc673..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/clip/extent.js +++ /dev/null @@ -1,20 +0,0 @@ -import clipRectangle from "./rectangle.js"; - -export default function() { - var x0 = 0, - y0 = 0, - x1 = 960, - y1 = 500, - cache, - cacheStream, - clip; - - return clip = { - stream: function(stream) { - return cache && cacheStream === stream ? cache : cache = clipRectangle(x0, y0, x1, y1)(cacheStream = stream); - }, - extent: function(_) { - return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]]; - } - }; -} diff --git a/node_modules/d3-geo/src/clip/index.js b/node_modules/d3-geo/src/clip/index.js deleted file mode 100644 index af7ac91f8ba92437e28dd5b850aa7c65d76b6174..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/clip/index.js +++ /dev/null @@ -1,131 +0,0 @@ -import clipBuffer from "./buffer.js"; -import clipRejoin from "./rejoin.js"; -import {epsilon, halfPi} from "../math.js"; -import polygonContains from "../polygonContains.js"; -import {merge} from "d3-array"; - -export default function(pointVisible, clipLine, interpolate, start) { - return function(sink) { - var line = clipLine(sink), - ringBuffer = clipBuffer(), - ringSink = clipLine(ringBuffer), - polygonStarted = false, - polygon, - segments, - ring; - - var clip = { - point: point, - lineStart: lineStart, - lineEnd: lineEnd, - polygonStart: function() { - clip.point = pointRing; - clip.lineStart = ringStart; - clip.lineEnd = ringEnd; - segments = []; - polygon = []; - }, - polygonEnd: function() { - clip.point = point; - clip.lineStart = lineStart; - clip.lineEnd = lineEnd; - segments = merge(segments); - var startInside = polygonContains(polygon, start); - if (segments.length) { - if (!polygonStarted) sink.polygonStart(), polygonStarted = true; - clipRejoin(segments, compareIntersection, startInside, interpolate, sink); - } else if (startInside) { - if (!polygonStarted) sink.polygonStart(), polygonStarted = true; - sink.lineStart(); - interpolate(null, null, 1, sink); - sink.lineEnd(); - } - if (polygonStarted) sink.polygonEnd(), polygonStarted = false; - segments = polygon = null; - }, - sphere: function() { - sink.polygonStart(); - sink.lineStart(); - interpolate(null, null, 1, sink); - sink.lineEnd(); - sink.polygonEnd(); - } - }; - - function point(lambda, phi) { - if (pointVisible(lambda, phi)) sink.point(lambda, phi); - } - - function pointLine(lambda, phi) { - line.point(lambda, phi); - } - - function lineStart() { - clip.point = pointLine; - line.lineStart(); - } - - function lineEnd() { - clip.point = point; - line.lineEnd(); - } - - function pointRing(lambda, phi) { - ring.push([lambda, phi]); - ringSink.point(lambda, phi); - } - - function ringStart() { - ringSink.lineStart(); - ring = []; - } - - function ringEnd() { - pointRing(ring[0][0], ring[0][1]); - ringSink.lineEnd(); - - var clean = ringSink.clean(), - ringSegments = ringBuffer.result(), - i, n = ringSegments.length, m, - segment, - point; - - ring.pop(); - polygon.push(ring); - ring = null; - - if (!n) return; - - // No intersections. - if (clean & 1) { - segment = ringSegments[0]; - if ((m = segment.length - 1) > 0) { - if (!polygonStarted) sink.polygonStart(), polygonStarted = true; - sink.lineStart(); - for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]); - sink.lineEnd(); - } - return; - } - - // Rejoin connected segments. - // TODO reuse ringBuffer.rejoin()? - if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift())); - - segments.push(ringSegments.filter(validSegment)); - } - - return clip; - }; -} - -function validSegment(segment) { - return segment.length > 1; -} - -// Intersections are sorted along the clip edge. For both antimeridian cutting -// and circle clipping, the same comparison is used. -function compareIntersection(a, b) { - return ((a = a.x)[0] < 0 ? a[1] - halfPi - epsilon : halfPi - a[1]) - - ((b = b.x)[0] < 0 ? b[1] - halfPi - epsilon : halfPi - b[1]); -} diff --git a/node_modules/d3-geo/src/clip/line.js b/node_modules/d3-geo/src/clip/line.js deleted file mode 100644 index 3b173d7ba4afa99238f67246ef0756390ae9f830..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/clip/line.js +++ /dev/null @@ -1,59 +0,0 @@ -export default function(a, b, x0, y0, x1, y1) { - var ax = a[0], - ay = a[1], - bx = b[0], - by = b[1], - t0 = 0, - t1 = 1, - dx = bx - ax, - dy = by - ay, - r; - - r = x0 - ax; - if (!dx && r > 0) return; - r /= dx; - if (dx < 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } else if (dx > 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } - - r = x1 - ax; - if (!dx && r < 0) return; - r /= dx; - if (dx < 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } else if (dx > 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } - - r = y0 - ay; - if (!dy && r > 0) return; - r /= dy; - if (dy < 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } else if (dy > 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } - - r = y1 - ay; - if (!dy && r < 0) return; - r /= dy; - if (dy < 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } else if (dy > 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } - - if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy; - if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy; - return true; -} diff --git a/node_modules/d3-geo/src/clip/rectangle.js b/node_modules/d3-geo/src/clip/rectangle.js deleted file mode 100644 index 47676261b97dfb8108c927e1ed910354c39e1846..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/clip/rectangle.js +++ /dev/null @@ -1,168 +0,0 @@ -import {abs, epsilon} from "../math.js"; -import clipBuffer from "./buffer.js"; -import clipLine from "./line.js"; -import clipRejoin from "./rejoin.js"; -import {merge} from "d3-array"; - -var clipMax = 1e9, clipMin = -clipMax; - -// TODO Use d3-polygon’s polygonContains here for the ring check? -// TODO Eliminate duplicate buffering in clipBuffer and polygon.push? - -export default function clipRectangle(x0, y0, x1, y1) { - - function visible(x, y) { - return x0 <= x && x <= x1 && y0 <= y && y <= y1; - } - - function interpolate(from, to, direction, stream) { - var a = 0, a1 = 0; - if (from == null - || (a = corner(from, direction)) !== (a1 = corner(to, direction)) - || comparePoint(from, to) < 0 ^ direction > 0) { - do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0); - while ((a = (a + direction + 4) % 4) !== a1); - } else { - stream.point(to[0], to[1]); - } - } - - function corner(p, direction) { - return abs(p[0] - x0) < epsilon ? direction > 0 ? 0 : 3 - : abs(p[0] - x1) < epsilon ? direction > 0 ? 2 : 1 - : abs(p[1] - y0) < epsilon ? direction > 0 ? 1 : 0 - : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon - } - - function compareIntersection(a, b) { - return comparePoint(a.x, b.x); - } - - function comparePoint(a, b) { - var ca = corner(a, 1), - cb = corner(b, 1); - return ca !== cb ? ca - cb - : ca === 0 ? b[1] - a[1] - : ca === 1 ? a[0] - b[0] - : ca === 2 ? a[1] - b[1] - : b[0] - a[0]; - } - - return function(stream) { - var activeStream = stream, - bufferStream = clipBuffer(), - segments, - polygon, - ring, - x__, y__, v__, // first point - x_, y_, v_, // previous point - first, - clean; - - var clipStream = { - point: point, - lineStart: lineStart, - lineEnd: lineEnd, - polygonStart: polygonStart, - polygonEnd: polygonEnd - }; - - function point(x, y) { - if (visible(x, y)) activeStream.point(x, y); - } - - function polygonInside() { - var winding = 0; - - for (var i = 0, n = polygon.length; i < n; ++i) { - for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) { - a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1]; - if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; } - else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; } - } - } - - return winding; - } - - // Buffer geometry within a polygon and then clip it en masse. - function polygonStart() { - activeStream = bufferStream, segments = [], polygon = [], clean = true; - } - - function polygonEnd() { - var startInside = polygonInside(), - cleanInside = clean && startInside, - visible = (segments = merge(segments)).length; - if (cleanInside || visible) { - stream.polygonStart(); - if (cleanInside) { - stream.lineStart(); - interpolate(null, null, 1, stream); - stream.lineEnd(); - } - if (visible) { - clipRejoin(segments, compareIntersection, startInside, interpolate, stream); - } - stream.polygonEnd(); - } - activeStream = stream, segments = polygon = ring = null; - } - - function lineStart() { - clipStream.point = linePoint; - if (polygon) polygon.push(ring = []); - first = true; - v_ = false; - x_ = y_ = NaN; - } - - // TODO rather than special-case polygons, simply handle them separately. - // Ideally, coincident intersection points should be jittered to avoid - // clipping issues. - function lineEnd() { - if (segments) { - linePoint(x__, y__); - if (v__ && v_) bufferStream.rejoin(); - segments.push(bufferStream.result()); - } - clipStream.point = point; - if (v_) activeStream.lineEnd(); - } - - function linePoint(x, y) { - var v = visible(x, y); - if (polygon) ring.push([x, y]); - if (first) { - x__ = x, y__ = y, v__ = v; - first = false; - if (v) { - activeStream.lineStart(); - activeStream.point(x, y); - } - } else { - if (v && v_) activeStream.point(x, y); - else { - var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))], - b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))]; - if (clipLine(a, b, x0, y0, x1, y1)) { - if (!v_) { - activeStream.lineStart(); - activeStream.point(a[0], a[1]); - } - activeStream.point(b[0], b[1]); - if (!v) activeStream.lineEnd(); - clean = false; - } else if (v) { - activeStream.lineStart(); - activeStream.point(x, y); - clean = false; - } - } - } - x_ = x, y_ = y, v_ = v; - } - - return clipStream; - }; -} diff --git a/node_modules/d3-geo/src/clip/rejoin.js b/node_modules/d3-geo/src/clip/rejoin.js deleted file mode 100644 index 37e024114d8b1ee433236e6256418d5372525d9e..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/clip/rejoin.js +++ /dev/null @@ -1,103 +0,0 @@ -import pointEqual from "../pointEqual.js"; -import {epsilon} from "../math.js"; - -function Intersection(point, points, other, entry) { - this.x = point; - this.z = points; - this.o = other; // another intersection - this.e = entry; // is an entry? - this.v = false; // visited - this.n = this.p = null; // next & previous -} - -// A generalized polygon clipping algorithm: given a polygon that has been cut -// into its visible line segments, and rejoins the segments by interpolating -// along the clip edge. -export default function(segments, compareIntersection, startInside, interpolate, stream) { - var subject = [], - clip = [], - i, - n; - - segments.forEach(function(segment) { - if ((n = segment.length - 1) <= 0) return; - var n, p0 = segment[0], p1 = segment[n], x; - - if (pointEqual(p0, p1)) { - if (!p0[2] && !p1[2]) { - stream.lineStart(); - for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]); - stream.lineEnd(); - return; - } - // handle degenerate cases by moving the point - p1[0] += 2 * epsilon; - } - - subject.push(x = new Intersection(p0, segment, null, true)); - clip.push(x.o = new Intersection(p0, null, x, false)); - subject.push(x = new Intersection(p1, segment, null, false)); - clip.push(x.o = new Intersection(p1, null, x, true)); - }); - - if (!subject.length) return; - - clip.sort(compareIntersection); - link(subject); - link(clip); - - for (i = 0, n = clip.length; i < n; ++i) { - clip[i].e = startInside = !startInside; - } - - var start = subject[0], - points, - point; - - while (1) { - // Find first unvisited intersection. - var current = start, - isSubject = true; - while (current.v) if ((current = current.n) === start) return; - points = current.z; - stream.lineStart(); - do { - current.v = current.o.v = true; - if (current.e) { - if (isSubject) { - for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]); - } else { - interpolate(current.x, current.n.x, 1, stream); - } - current = current.n; - } else { - if (isSubject) { - points = current.p.z; - for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]); - } else { - interpolate(current.x, current.p.x, -1, stream); - } - current = current.p; - } - current = current.o; - points = current.z; - isSubject = !isSubject; - } while (!current.v); - stream.lineEnd(); - } -} - -function link(array) { - if (!(n = array.length)) return; - var n, - i = 0, - a = array[0], - b; - while (++i < n) { - a.n = b = array[i]; - b.p = a; - a = b; - } - a.n = b = array[0]; - b.p = a; -} diff --git a/node_modules/d3-geo/src/compose.js b/node_modules/d3-geo/src/compose.js deleted file mode 100644 index f6a967a7159ce9affb48f0c86a985ad5cc518232..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/compose.js +++ /dev/null @@ -1,12 +0,0 @@ -export default function(a, b) { - - function compose(x, y) { - return x = a(x, y), b(x[0], x[1]); - } - - if (a.invert && b.invert) compose.invert = function(x, y) { - return x = b.invert(x, y), x && a.invert(x[0], x[1]); - }; - - return compose; -} diff --git a/node_modules/d3-geo/src/constant.js b/node_modules/d3-geo/src/constant.js deleted file mode 100644 index b7d42e711c01cced1274e5dd70a461a3c0073b77..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/constant.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(x) { - return function() { - return x; - }; -} diff --git a/node_modules/d3-geo/src/contains.js b/node_modules/d3-geo/src/contains.js deleted file mode 100644 index 923f4d4312a1daa1053a8acec9da3d80b948993f..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/contains.js +++ /dev/null @@ -1,97 +0,0 @@ -import {default as polygonContains} from "./polygonContains.js"; -import {default as distance} from "./distance.js"; -import {epsilon2, radians} from "./math.js"; - -var containsObjectType = { - Feature: function(object, point) { - return containsGeometry(object.geometry, point); - }, - FeatureCollection: function(object, point) { - var features = object.features, i = -1, n = features.length; - while (++i < n) if (containsGeometry(features[i].geometry, point)) return true; - return false; - } -}; - -var containsGeometryType = { - Sphere: function() { - return true; - }, - Point: function(object, point) { - return containsPoint(object.coordinates, point); - }, - MultiPoint: function(object, point) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) if (containsPoint(coordinates[i], point)) return true; - return false; - }, - LineString: function(object, point) { - return containsLine(object.coordinates, point); - }, - MultiLineString: function(object, point) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) if (containsLine(coordinates[i], point)) return true; - return false; - }, - Polygon: function(object, point) { - return containsPolygon(object.coordinates, point); - }, - MultiPolygon: function(object, point) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) if (containsPolygon(coordinates[i], point)) return true; - return false; - }, - GeometryCollection: function(object, point) { - var geometries = object.geometries, i = -1, n = geometries.length; - while (++i < n) if (containsGeometry(geometries[i], point)) return true; - return false; - } -}; - -function containsGeometry(geometry, point) { - return geometry && containsGeometryType.hasOwnProperty(geometry.type) - ? containsGeometryType[geometry.type](geometry, point) - : false; -} - -function containsPoint(coordinates, point) { - return distance(coordinates, point) === 0; -} - -function containsLine(coordinates, point) { - var ao, bo, ab; - for (var i = 0, n = coordinates.length; i < n; i++) { - bo = distance(coordinates[i], point); - if (bo === 0) return true; - if (i > 0) { - ab = distance(coordinates[i], coordinates[i - 1]); - if ( - ab > 0 && - ao <= ab && - bo <= ab && - (ao + bo - ab) * (1 - Math.pow((ao - bo) / ab, 2)) < epsilon2 * ab - ) - return true; - } - ao = bo; - } - return false; -} - -function containsPolygon(coordinates, point) { - return !!polygonContains(coordinates.map(ringRadians), pointRadians(point)); -} - -function ringRadians(ring) { - return ring = ring.map(pointRadians), ring.pop(), ring; -} - -function pointRadians(point) { - return [point[0] * radians, point[1] * radians]; -} - -export default function(object, point) { - return (object && containsObjectType.hasOwnProperty(object.type) - ? containsObjectType[object.type] - : containsGeometry)(object, point); -} diff --git a/node_modules/d3-geo/src/distance.js b/node_modules/d3-geo/src/distance.js deleted file mode 100644 index 0cd23db18fa2501eb4a076aa954dd2279431a1ea..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/distance.js +++ /dev/null @@ -1,10 +0,0 @@ -import length from "./length.js"; - -var coordinates = [null, null], - object = {type: "LineString", coordinates: coordinates}; - -export default function(a, b) { - coordinates[0] = a; - coordinates[1] = b; - return length(object); -} diff --git a/node_modules/d3-geo/src/graticule.js b/node_modules/d3-geo/src/graticule.js deleted file mode 100644 index dc8daafd52459baa7f9b0889cc772131dba0505d..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/graticule.js +++ /dev/null @@ -1,105 +0,0 @@ -import {range} from "d3-array"; -import {abs, ceil, epsilon} from "./math.js"; - -function graticuleX(y0, y1, dy) { - var y = range(y0, y1 - epsilon, dy).concat(y1); - return function(x) { return y.map(function(y) { return [x, y]; }); }; -} - -function graticuleY(x0, x1, dx) { - var x = range(x0, x1 - epsilon, dx).concat(x1); - return function(y) { return x.map(function(x) { return [x, y]; }); }; -} - -export default function graticule() { - var x1, x0, X1, X0, - y1, y0, Y1, Y0, - dx = 10, dy = dx, DX = 90, DY = 360, - x, y, X, Y, - precision = 2.5; - - function graticule() { - return {type: "MultiLineString", coordinates: lines()}; - } - - function lines() { - return range(ceil(X0 / DX) * DX, X1, DX).map(X) - .concat(range(ceil(Y0 / DY) * DY, Y1, DY).map(Y)) - .concat(range(ceil(x0 / dx) * dx, x1, dx).filter(function(x) { return abs(x % DX) > epsilon; }).map(x)) - .concat(range(ceil(y0 / dy) * dy, y1, dy).filter(function(y) { return abs(y % DY) > epsilon; }).map(y)); - } - - graticule.lines = function() { - return lines().map(function(coordinates) { return {type: "LineString", coordinates: coordinates}; }); - }; - - graticule.outline = function() { - return { - type: "Polygon", - coordinates: [ - X(X0).concat( - Y(Y1).slice(1), - X(X1).reverse().slice(1), - Y(Y0).reverse().slice(1)) - ] - }; - }; - - graticule.extent = function(_) { - if (!arguments.length) return graticule.extentMinor(); - return graticule.extentMajor(_).extentMinor(_); - }; - - graticule.extentMajor = function(_) { - if (!arguments.length) return [[X0, Y0], [X1, Y1]]; - X0 = +_[0][0], X1 = +_[1][0]; - Y0 = +_[0][1], Y1 = +_[1][1]; - if (X0 > X1) _ = X0, X0 = X1, X1 = _; - if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _; - return graticule.precision(precision); - }; - - graticule.extentMinor = function(_) { - if (!arguments.length) return [[x0, y0], [x1, y1]]; - x0 = +_[0][0], x1 = +_[1][0]; - y0 = +_[0][1], y1 = +_[1][1]; - if (x0 > x1) _ = x0, x0 = x1, x1 = _; - if (y0 > y1) _ = y0, y0 = y1, y1 = _; - return graticule.precision(precision); - }; - - graticule.step = function(_) { - if (!arguments.length) return graticule.stepMinor(); - return graticule.stepMajor(_).stepMinor(_); - }; - - graticule.stepMajor = function(_) { - if (!arguments.length) return [DX, DY]; - DX = +_[0], DY = +_[1]; - return graticule; - }; - - graticule.stepMinor = function(_) { - if (!arguments.length) return [dx, dy]; - dx = +_[0], dy = +_[1]; - return graticule; - }; - - graticule.precision = function(_) { - if (!arguments.length) return precision; - precision = +_; - x = graticuleX(y0, y1, 90); - y = graticuleY(x0, x1, precision); - X = graticuleX(Y0, Y1, 90); - Y = graticuleY(X0, X1, precision); - return graticule; - }; - - return graticule - .extentMajor([[-180, -90 + epsilon], [180, 90 - epsilon]]) - .extentMinor([[-180, -80 - epsilon], [180, 80 + epsilon]]); -} - -export function graticule10() { - return graticule()(); -} diff --git a/node_modules/d3-geo/src/identity.js b/node_modules/d3-geo/src/identity.js deleted file mode 100644 index 9a8005993f4c74c7bfe4d8358cc9fe73cd1e31a3..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/identity.js +++ /dev/null @@ -1 +0,0 @@ -export default x => x; diff --git a/node_modules/d3-geo/src/index.js b/node_modules/d3-geo/src/index.js deleted file mode 100644 index 9a369763d9c70a754cd08e9d92e7277f0a316f96..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/index.js +++ /dev/null @@ -1,34 +0,0 @@ -export {default as geoArea} from "./area.js"; -export {default as geoBounds} from "./bounds.js"; -export {default as geoCentroid} from "./centroid.js"; -export {default as geoCircle} from "./circle.js"; -export {default as geoClipAntimeridian} from "./clip/antimeridian.js"; -export {default as geoClipCircle} from "./clip/circle.js"; -export {default as geoClipExtent} from "./clip/extent.js"; // DEPRECATED! Use d3.geoIdentity().clipExtent(…). -export {default as geoClipRectangle} from "./clip/rectangle.js"; -export {default as geoContains} from "./contains.js"; -export {default as geoDistance} from "./distance.js"; -export {default as geoGraticule, graticule10 as geoGraticule10} from "./graticule.js"; -export {default as geoInterpolate} from "./interpolate.js"; -export {default as geoLength} from "./length.js"; -export {default as geoPath} from "./path/index.js"; -export {default as geoAlbers} from "./projection/albers.js"; -export {default as geoAlbersUsa} from "./projection/albersUsa.js"; -export {default as geoAzimuthalEqualArea, azimuthalEqualAreaRaw as geoAzimuthalEqualAreaRaw} from "./projection/azimuthalEqualArea.js"; -export {default as geoAzimuthalEquidistant, azimuthalEquidistantRaw as geoAzimuthalEquidistantRaw} from "./projection/azimuthalEquidistant.js"; -export {default as geoConicConformal, conicConformalRaw as geoConicConformalRaw} from "./projection/conicConformal.js"; -export {default as geoConicEqualArea, conicEqualAreaRaw as geoConicEqualAreaRaw} from "./projection/conicEqualArea.js"; -export {default as geoConicEquidistant, conicEquidistantRaw as geoConicEquidistantRaw} from "./projection/conicEquidistant.js"; -export {default as geoEqualEarth, equalEarthRaw as geoEqualEarthRaw} from "./projection/equalEarth.js"; -export {default as geoEquirectangular, equirectangularRaw as geoEquirectangularRaw} from "./projection/equirectangular.js"; -export {default as geoGnomonic, gnomonicRaw as geoGnomonicRaw} from "./projection/gnomonic.js"; -export {default as geoIdentity} from "./projection/identity.js"; -export {default as geoProjection, projectionMutator as geoProjectionMutator} from "./projection/index.js"; -export {default as geoMercator, mercatorRaw as geoMercatorRaw} from "./projection/mercator.js"; -export {default as geoNaturalEarth1, naturalEarth1Raw as geoNaturalEarth1Raw} from "./projection/naturalEarth1.js"; -export {default as geoOrthographic, orthographicRaw as geoOrthographicRaw} from "./projection/orthographic.js"; -export {default as geoStereographic, stereographicRaw as geoStereographicRaw} from "./projection/stereographic.js"; -export {default as geoTransverseMercator, transverseMercatorRaw as geoTransverseMercatorRaw} from "./projection/transverseMercator.js"; -export {default as geoRotation} from "./rotation.js"; -export {default as geoStream} from "./stream.js"; -export {default as geoTransform} from "./transform.js"; diff --git a/node_modules/d3-geo/src/interpolate.js b/node_modules/d3-geo/src/interpolate.js deleted file mode 100644 index b19fbbaa4e5c0339c0274cf8aedc31c54617eb3c..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/interpolate.js +++ /dev/null @@ -1,36 +0,0 @@ -import {asin, atan2, cos, degrees, haversin, radians, sin, sqrt} from "./math.js"; - -export default function(a, b) { - var x0 = a[0] * radians, - y0 = a[1] * radians, - x1 = b[0] * radians, - y1 = b[1] * radians, - cy0 = cos(y0), - sy0 = sin(y0), - cy1 = cos(y1), - sy1 = sin(y1), - kx0 = cy0 * cos(x0), - ky0 = cy0 * sin(x0), - kx1 = cy1 * cos(x1), - ky1 = cy1 * sin(x1), - d = 2 * asin(sqrt(haversin(y1 - y0) + cy0 * cy1 * haversin(x1 - x0))), - k = sin(d); - - var interpolate = d ? function(t) { - var B = sin(t *= d) / k, - A = sin(d - t) / k, - x = A * kx0 + B * kx1, - y = A * ky0 + B * ky1, - z = A * sy0 + B * sy1; - return [ - atan2(y, x) * degrees, - atan2(z, sqrt(x * x + y * y)) * degrees - ]; - } : function() { - return [x0 * degrees, y0 * degrees]; - }; - - interpolate.distance = d; - - return interpolate; -} diff --git a/node_modules/d3-geo/src/length.js b/node_modules/d3-geo/src/length.js deleted file mode 100644 index 7899e053b06d97790fa68cd9ebfe514453119ccf..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/length.js +++ /dev/null @@ -1,53 +0,0 @@ -import {Adder} from "d3-array"; -import {abs, atan2, cos, radians, sin, sqrt} from "./math.js"; -import noop from "./noop.js"; -import stream from "./stream.js"; - -var lengthSum, - lambda0, - sinPhi0, - cosPhi0; - -var lengthStream = { - sphere: noop, - point: noop, - lineStart: lengthLineStart, - lineEnd: noop, - polygonStart: noop, - polygonEnd: noop -}; - -function lengthLineStart() { - lengthStream.point = lengthPointFirst; - lengthStream.lineEnd = lengthLineEnd; -} - -function lengthLineEnd() { - lengthStream.point = lengthStream.lineEnd = noop; -} - -function lengthPointFirst(lambda, phi) { - lambda *= radians, phi *= radians; - lambda0 = lambda, sinPhi0 = sin(phi), cosPhi0 = cos(phi); - lengthStream.point = lengthPoint; -} - -function lengthPoint(lambda, phi) { - lambda *= radians, phi *= radians; - var sinPhi = sin(phi), - cosPhi = cos(phi), - delta = abs(lambda - lambda0), - cosDelta = cos(delta), - sinDelta = sin(delta), - x = cosPhi * sinDelta, - y = cosPhi0 * sinPhi - sinPhi0 * cosPhi * cosDelta, - z = sinPhi0 * sinPhi + cosPhi0 * cosPhi * cosDelta; - lengthSum.add(atan2(sqrt(x * x + y * y), z)); - lambda0 = lambda, sinPhi0 = sinPhi, cosPhi0 = cosPhi; -} - -export default function(object) { - lengthSum = new Adder(); - stream(object, lengthStream); - return +lengthSum; -} diff --git a/node_modules/d3-geo/src/math.js b/node_modules/d3-geo/src/math.js deleted file mode 100644 index ace500ffc6e1d8a1a5ef13bea31dd401d30ae5e0..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/math.js +++ /dev/null @@ -1,36 +0,0 @@ -export var epsilon = 1e-6; -export var epsilon2 = 1e-12; -export var pi = Math.PI; -export var halfPi = pi / 2; -export var quarterPi = pi / 4; -export var tau = pi * 2; - -export var degrees = 180 / pi; -export var radians = pi / 180; - -export var abs = Math.abs; -export var atan = Math.atan; -export var atan2 = Math.atan2; -export var cos = Math.cos; -export var ceil = Math.ceil; -export var exp = Math.exp; -export var floor = Math.floor; -export var hypot = Math.hypot; -export var log = Math.log; -export var pow = Math.pow; -export var sin = Math.sin; -export var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; }; -export var sqrt = Math.sqrt; -export var tan = Math.tan; - -export function acos(x) { - return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); -} - -export function asin(x) { - return x > 1 ? halfPi : x < -1 ? -halfPi : Math.asin(x); -} - -export function haversin(x) { - return (x = sin(x / 2)) * x; -} diff --git a/node_modules/d3-geo/src/noop.js b/node_modules/d3-geo/src/noop.js deleted file mode 100644 index ca6a744710d3ca4435f577fa0dfff4550d0f893f..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/noop.js +++ /dev/null @@ -1 +0,0 @@ -export default function noop() {} diff --git a/node_modules/d3-geo/src/path/area.js b/node_modules/d3-geo/src/path/area.js deleted file mode 100644 index bb38b1967196a95ebe0ffbf8c7b12259b11c6398..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/path/area.js +++ /dev/null @@ -1,50 +0,0 @@ -import {Adder} from "d3-array"; -import {abs} from "../math.js"; -import noop from "../noop.js"; - -var areaSum = new Adder(), - areaRingSum = new Adder(), - x00, - y00, - x0, - y0; - -var areaStream = { - point: noop, - lineStart: noop, - lineEnd: noop, - polygonStart: function() { - areaStream.lineStart = areaRingStart; - areaStream.lineEnd = areaRingEnd; - }, - polygonEnd: function() { - areaStream.lineStart = areaStream.lineEnd = areaStream.point = noop; - areaSum.add(abs(areaRingSum)); - areaRingSum = new Adder(); - }, - result: function() { - var area = areaSum / 2; - areaSum = new Adder(); - return area; - } -}; - -function areaRingStart() { - areaStream.point = areaPointFirst; -} - -function areaPointFirst(x, y) { - areaStream.point = areaPoint; - x00 = x0 = x, y00 = y0 = y; -} - -function areaPoint(x, y) { - areaRingSum.add(y0 * x - x0 * y); - x0 = x, y0 = y; -} - -function areaRingEnd() { - areaPoint(x00, y00); -} - -export default areaStream; diff --git a/node_modules/d3-geo/src/path/bounds.js b/node_modules/d3-geo/src/path/bounds.js deleted file mode 100644 index 0c83258abddc07d2c590e99cd3de646bde826d69..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/path/bounds.js +++ /dev/null @@ -1,28 +0,0 @@ -import noop from "../noop.js"; - -var x0 = Infinity, - y0 = x0, - x1 = -x0, - y1 = x1; - -var boundsStream = { - point: boundsPoint, - lineStart: noop, - lineEnd: noop, - polygonStart: noop, - polygonEnd: noop, - result: function() { - var bounds = [[x0, y0], [x1, y1]]; - x1 = y1 = -(y0 = x0 = Infinity); - return bounds; - } -}; - -function boundsPoint(x, y) { - if (x < x0) x0 = x; - if (x > x1) x1 = x; - if (y < y0) y0 = y; - if (y > y1) y1 = y; -} - -export default boundsStream; diff --git a/node_modules/d3-geo/src/path/centroid.js b/node_modules/d3-geo/src/path/centroid.js deleted file mode 100644 index 852ef76790260e59f7cbdd00ae06d686e4f525ff..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/path/centroid.js +++ /dev/null @@ -1,100 +0,0 @@ -import {sqrt} from "../math.js"; - -// TODO Enforce positive area for exterior, negative area for interior? - -var X0 = 0, - Y0 = 0, - Z0 = 0, - X1 = 0, - Y1 = 0, - Z1 = 0, - X2 = 0, - Y2 = 0, - Z2 = 0, - x00, - y00, - x0, - y0; - -var centroidStream = { - point: centroidPoint, - lineStart: centroidLineStart, - lineEnd: centroidLineEnd, - polygonStart: function() { - centroidStream.lineStart = centroidRingStart; - centroidStream.lineEnd = centroidRingEnd; - }, - polygonEnd: function() { - centroidStream.point = centroidPoint; - centroidStream.lineStart = centroidLineStart; - centroidStream.lineEnd = centroidLineEnd; - }, - result: function() { - var centroid = Z2 ? [X2 / Z2, Y2 / Z2] - : Z1 ? [X1 / Z1, Y1 / Z1] - : Z0 ? [X0 / Z0, Y0 / Z0] - : [NaN, NaN]; - X0 = Y0 = Z0 = - X1 = Y1 = Z1 = - X2 = Y2 = Z2 = 0; - return centroid; - } -}; - -function centroidPoint(x, y) { - X0 += x; - Y0 += y; - ++Z0; -} - -function centroidLineStart() { - centroidStream.point = centroidPointFirstLine; -} - -function centroidPointFirstLine(x, y) { - centroidStream.point = centroidPointLine; - centroidPoint(x0 = x, y0 = y); -} - -function centroidPointLine(x, y) { - var dx = x - x0, dy = y - y0, z = sqrt(dx * dx + dy * dy); - X1 += z * (x0 + x) / 2; - Y1 += z * (y0 + y) / 2; - Z1 += z; - centroidPoint(x0 = x, y0 = y); -} - -function centroidLineEnd() { - centroidStream.point = centroidPoint; -} - -function centroidRingStart() { - centroidStream.point = centroidPointFirstRing; -} - -function centroidRingEnd() { - centroidPointRing(x00, y00); -} - -function centroidPointFirstRing(x, y) { - centroidStream.point = centroidPointRing; - centroidPoint(x00 = x0 = x, y00 = y0 = y); -} - -function centroidPointRing(x, y) { - var dx = x - x0, - dy = y - y0, - z = sqrt(dx * dx + dy * dy); - - X1 += z * (x0 + x) / 2; - Y1 += z * (y0 + y) / 2; - Z1 += z; - - z = y0 * x - x0 * y; - X2 += z * (x0 + x); - Y2 += z * (y0 + y); - Z2 += z * 3; - centroidPoint(x0 = x, y0 = y); -} - -export default centroidStream; diff --git a/node_modules/d3-geo/src/path/context.js b/node_modules/d3-geo/src/path/context.js deleted file mode 100644 index 5137fc934cfb828e23b0d0be88275baed2b23ddb..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/path/context.js +++ /dev/null @@ -1,45 +0,0 @@ -import {tau} from "../math.js"; -import noop from "../noop.js"; - -export default function PathContext(context) { - this._context = context; -} - -PathContext.prototype = { - _radius: 4.5, - pointRadius: function(_) { - return this._radius = _, this; - }, - polygonStart: function() { - this._line = 0; - }, - polygonEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._line === 0) this._context.closePath(); - this._point = NaN; - }, - point: function(x, y) { - switch (this._point) { - case 0: { - this._context.moveTo(x, y); - this._point = 1; - break; - } - case 1: { - this._context.lineTo(x, y); - break; - } - default: { - this._context.moveTo(x + this._radius, y); - this._context.arc(x, y, this._radius, 0, tau); - break; - } - } - }, - result: noop -}; diff --git a/node_modules/d3-geo/src/path/index.js b/node_modules/d3-geo/src/path/index.js deleted file mode 100644 index 45da3058da1df1aedd2e59cf5d6d129ebc3633f6..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/path/index.js +++ /dev/null @@ -1,61 +0,0 @@ -import identity from "../identity.js"; -import stream from "../stream.js"; -import pathArea from "./area.js"; -import pathBounds from "./bounds.js"; -import pathCentroid from "./centroid.js"; -import PathContext from "./context.js"; -import pathMeasure from "./measure.js"; -import PathString from "./string.js"; - -export default function(projection, context) { - var pointRadius = 4.5, - projectionStream, - contextStream; - - function path(object) { - if (object) { - if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments)); - stream(object, projectionStream(contextStream)); - } - return contextStream.result(); - } - - path.area = function(object) { - stream(object, projectionStream(pathArea)); - return pathArea.result(); - }; - - path.measure = function(object) { - stream(object, projectionStream(pathMeasure)); - return pathMeasure.result(); - }; - - path.bounds = function(object) { - stream(object, projectionStream(pathBounds)); - return pathBounds.result(); - }; - - path.centroid = function(object) { - stream(object, projectionStream(pathCentroid)); - return pathCentroid.result(); - }; - - path.projection = function(_) { - return arguments.length ? (projectionStream = _ == null ? (projection = null, identity) : (projection = _).stream, path) : projection; - }; - - path.context = function(_) { - if (!arguments.length) return context; - contextStream = _ == null ? (context = null, new PathString) : new PathContext(context = _); - if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius); - return path; - }; - - path.pointRadius = function(_) { - if (!arguments.length) return pointRadius; - pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_); - return path; - }; - - return path.projection(projection).context(context); -} diff --git a/node_modules/d3-geo/src/path/measure.js b/node_modules/d3-geo/src/path/measure.js deleted file mode 100644 index ad4177a7c48007d43a9e62bdd7f305d4f2d65d5a..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/path/measure.js +++ /dev/null @@ -1,45 +0,0 @@ -import {Adder} from "d3-array"; -import {sqrt} from "../math.js"; -import noop from "../noop.js"; - -var lengthSum = new Adder(), - lengthRing, - x00, - y00, - x0, - y0; - -var lengthStream = { - point: noop, - lineStart: function() { - lengthStream.point = lengthPointFirst; - }, - lineEnd: function() { - if (lengthRing) lengthPoint(x00, y00); - lengthStream.point = noop; - }, - polygonStart: function() { - lengthRing = true; - }, - polygonEnd: function() { - lengthRing = null; - }, - result: function() { - var length = +lengthSum; - lengthSum = new Adder(); - return length; - } -}; - -function lengthPointFirst(x, y) { - lengthStream.point = lengthPoint; - x00 = x0 = x, y00 = y0 = y; -} - -function lengthPoint(x, y) { - x0 -= x, y0 -= y; - lengthSum.add(sqrt(x0 * x0 + y0 * y0)); - x0 = x, y0 = y; -} - -export default lengthStream; diff --git a/node_modules/d3-geo/src/path/string.js b/node_modules/d3-geo/src/path/string.js deleted file mode 100644 index 02e57b0a1285592f900f02b54ef9c6332012c182..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/path/string.js +++ /dev/null @@ -1,59 +0,0 @@ -export default function PathString() { - this._string = []; -} - -PathString.prototype = { - _radius: 4.5, - _circle: circle(4.5), - pointRadius: function(_) { - if ((_ = +_) !== this._radius) this._radius = _, this._circle = null; - return this; - }, - polygonStart: function() { - this._line = 0; - }, - polygonEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._line === 0) this._string.push("Z"); - this._point = NaN; - }, - point: function(x, y) { - switch (this._point) { - case 0: { - this._string.push("M", x, ",", y); - this._point = 1; - break; - } - case 1: { - this._string.push("L", x, ",", y); - break; - } - default: { - if (this._circle == null) this._circle = circle(this._radius); - this._string.push("M", x, ",", y, this._circle); - break; - } - } - }, - result: function() { - if (this._string.length) { - var result = this._string.join(""); - this._string = []; - return result; - } else { - return null; - } - } -}; - -function circle(radius) { - return "m0," + radius - + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius - + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius - + "z"; -} diff --git a/node_modules/d3-geo/src/pointEqual.js b/node_modules/d3-geo/src/pointEqual.js deleted file mode 100644 index d25aa115bca31ee395fccd85cab9da8e8c3fe603..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/pointEqual.js +++ /dev/null @@ -1,5 +0,0 @@ -import {abs, epsilon} from "./math.js"; - -export default function(a, b) { - return abs(a[0] - b[0]) < epsilon && abs(a[1] - b[1]) < epsilon; -} diff --git a/node_modules/d3-geo/src/polygonContains.js b/node_modules/d3-geo/src/polygonContains.js deleted file mode 100644 index 117d200fd11f1cb13a266b4c36d58885c66495ba..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/polygonContains.js +++ /dev/null @@ -1,77 +0,0 @@ -import {Adder} from "d3-array"; -import {cartesian, cartesianCross, cartesianNormalizeInPlace} from "./cartesian.js"; -import {abs, asin, atan2, cos, epsilon, epsilon2, halfPi, pi, quarterPi, sign, sin, tau} from "./math.js"; - -function longitude(point) { - if (abs(point[0]) <= pi) - return point[0]; - else - return sign(point[0]) * ((abs(point[0]) + pi) % tau - pi); -} - -export default function(polygon, point) { - var lambda = longitude(point), - phi = point[1], - sinPhi = sin(phi), - normal = [sin(lambda), -cos(lambda), 0], - angle = 0, - winding = 0; - - var sum = new Adder(); - - if (sinPhi === 1) phi = halfPi + epsilon; - else if (sinPhi === -1) phi = -halfPi - epsilon; - - for (var i = 0, n = polygon.length; i < n; ++i) { - if (!(m = (ring = polygon[i]).length)) continue; - var ring, - m, - point0 = ring[m - 1], - lambda0 = longitude(point0), - phi0 = point0[1] / 2 + quarterPi, - sinPhi0 = sin(phi0), - cosPhi0 = cos(phi0); - - for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) { - var point1 = ring[j], - lambda1 = longitude(point1), - phi1 = point1[1] / 2 + quarterPi, - sinPhi1 = sin(phi1), - cosPhi1 = cos(phi1), - delta = lambda1 - lambda0, - sign = delta >= 0 ? 1 : -1, - absDelta = sign * delta, - antimeridian = absDelta > pi, - k = sinPhi0 * sinPhi1; - - sum.add(atan2(k * sign * sin(absDelta), cosPhi0 * cosPhi1 + k * cos(absDelta))); - angle += antimeridian ? delta + sign * tau : delta; - - // Are the longitudes either side of the point’s meridian (lambda), - // and are the latitudes smaller than the parallel (phi)? - if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) { - var arc = cartesianCross(cartesian(point0), cartesian(point1)); - cartesianNormalizeInPlace(arc); - var intersection = cartesianCross(normal, arc); - cartesianNormalizeInPlace(intersection); - var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]); - if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) { - winding += antimeridian ^ delta >= 0 ? 1 : -1; - } - } - } - } - - // First, determine whether the South pole is inside or outside: - // - // It is inside if: - // * the polygon winds around it in a clockwise direction. - // * the polygon does not (cumulatively) wind around it, but has a negative - // (counter-clockwise) area. - // - // Second, count the (signed) number of times a segment crosses a lambda - // from the point to the South pole. If it is zero, then the point is the - // same side as the South pole. - - return (angle < -epsilon || angle < epsilon && sum < -epsilon2) ^ (winding & 1); -} diff --git a/node_modules/d3-geo/src/projection/albers.js b/node_modules/d3-geo/src/projection/albers.js deleted file mode 100644 index 180425dc3fd4cb6c78c59b6b3d6941ad0f6a3e97..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/albers.js +++ /dev/null @@ -1,10 +0,0 @@ -import conicEqualArea from "./conicEqualArea.js"; - -export default function() { - return conicEqualArea() - .parallels([29.5, 45.5]) - .scale(1070) - .translate([480, 250]) - .rotate([96, 0]) - .center([-0.6, 38.7]); -} diff --git a/node_modules/d3-geo/src/projection/albersUsa.js b/node_modules/d3-geo/src/projection/albersUsa.js deleted file mode 100644 index fd295ed40eed435fce2ed12af109af1059fb9ac2..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/albersUsa.js +++ /dev/null @@ -1,111 +0,0 @@ -import {epsilon} from "../math.js"; -import albers from "./albers.js"; -import conicEqualArea from "./conicEqualArea.js"; -import {fitExtent, fitSize, fitWidth, fitHeight} from "./fit.js"; - -// The projections must have mutually exclusive clip regions on the sphere, -// as this will avoid emitting interleaving lines and polygons. -function multiplex(streams) { - var n = streams.length; - return { - point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); }, - sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); }, - lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); }, - lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); }, - polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); }, - polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); } - }; -} - -// A composite projection for the United States, configured by default for -// 960×500. The projection also works quite well at 960×600 if you change the -// scale to 1285 and adjust the translate accordingly. The set of standard -// parallels for each region comes from USGS, which is published here: -// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers -export default function() { - var cache, - cacheStream, - lower48 = albers(), lower48Point, - alaska = conicEqualArea().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338 - hawaii = conicEqualArea().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007 - point, pointStream = {point: function(x, y) { point = [x, y]; }}; - - function albersUsa(coordinates) { - var x = coordinates[0], y = coordinates[1]; - return point = null, - (lower48Point.point(x, y), point) - || (alaskaPoint.point(x, y), point) - || (hawaiiPoint.point(x, y), point); - } - - albersUsa.invert = function(coordinates) { - var k = lower48.scale(), - t = lower48.translate(), - x = (coordinates[0] - t[0]) / k, - y = (coordinates[1] - t[1]) / k; - return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska - : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii - : lower48).invert(coordinates); - }; - - albersUsa.stream = function(stream) { - return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]); - }; - - albersUsa.precision = function(_) { - if (!arguments.length) return lower48.precision(); - lower48.precision(_), alaska.precision(_), hawaii.precision(_); - return reset(); - }; - - albersUsa.scale = function(_) { - if (!arguments.length) return lower48.scale(); - lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_); - return albersUsa.translate(lower48.translate()); - }; - - albersUsa.translate = function(_) { - if (!arguments.length) return lower48.translate(); - var k = lower48.scale(), x = +_[0], y = +_[1]; - - lower48Point = lower48 - .translate(_) - .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]]) - .stream(pointStream); - - alaskaPoint = alaska - .translate([x - 0.307 * k, y + 0.201 * k]) - .clipExtent([[x - 0.425 * k + epsilon, y + 0.120 * k + epsilon], [x - 0.214 * k - epsilon, y + 0.234 * k - epsilon]]) - .stream(pointStream); - - hawaiiPoint = hawaii - .translate([x - 0.205 * k, y + 0.212 * k]) - .clipExtent([[x - 0.214 * k + epsilon, y + 0.166 * k + epsilon], [x - 0.115 * k - epsilon, y + 0.234 * k - epsilon]]) - .stream(pointStream); - - return reset(); - }; - - albersUsa.fitExtent = function(extent, object) { - return fitExtent(albersUsa, extent, object); - }; - - albersUsa.fitSize = function(size, object) { - return fitSize(albersUsa, size, object); - }; - - albersUsa.fitWidth = function(width, object) { - return fitWidth(albersUsa, width, object); - }; - - albersUsa.fitHeight = function(height, object) { - return fitHeight(albersUsa, height, object); - }; - - function reset() { - cache = cacheStream = null; - return albersUsa; - } - - return albersUsa.scale(1070); -} diff --git a/node_modules/d3-geo/src/projection/azimuthal.js b/node_modules/d3-geo/src/projection/azimuthal.js deleted file mode 100644 index 22dffe7cafa23305129819c98bcb8f31d040fdf7..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/azimuthal.js +++ /dev/null @@ -1,27 +0,0 @@ -import {asin, atan2, cos, sin, sqrt} from "../math.js"; - -export function azimuthalRaw(scale) { - return function(x, y) { - var cx = cos(x), - cy = cos(y), - k = scale(cx * cy); - if (k === Infinity) return [2, 0]; - return [ - k * cy * sin(x), - k * sin(y) - ]; - } -} - -export function azimuthalInvert(angle) { - return function(x, y) { - var z = sqrt(x * x + y * y), - c = angle(z), - sc = sin(c), - cc = cos(c); - return [ - atan2(x * sc, z * cc), - asin(z && y * sc / z) - ]; - } -} diff --git a/node_modules/d3-geo/src/projection/azimuthalEqualArea.js b/node_modules/d3-geo/src/projection/azimuthalEqualArea.js deleted file mode 100644 index 795d4c72c0151385dd055386a910c40c025a2878..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/azimuthalEqualArea.js +++ /dev/null @@ -1,17 +0,0 @@ -import {asin, sqrt} from "../math.js"; -import {azimuthalRaw, azimuthalInvert} from "./azimuthal.js"; -import projection from "./index.js"; - -export var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) { - return sqrt(2 / (1 + cxcy)); -}); - -azimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) { - return 2 * asin(z / 2); -}); - -export default function() { - return projection(azimuthalEqualAreaRaw) - .scale(124.75) - .clipAngle(180 - 1e-3); -} diff --git a/node_modules/d3-geo/src/projection/azimuthalEquidistant.js b/node_modules/d3-geo/src/projection/azimuthalEquidistant.js deleted file mode 100644 index 9b89eb9e58bcb069655c4d94f29d5ab6cbd412d5..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/azimuthalEquidistant.js +++ /dev/null @@ -1,17 +0,0 @@ -import {acos, sin} from "../math.js"; -import {azimuthalRaw, azimuthalInvert} from "./azimuthal.js"; -import projection from "./index.js"; - -export var azimuthalEquidistantRaw = azimuthalRaw(function(c) { - return (c = acos(c)) && c / sin(c); -}); - -azimuthalEquidistantRaw.invert = azimuthalInvert(function(z) { - return z; -}); - -export default function() { - return projection(azimuthalEquidistantRaw) - .scale(79.4188) - .clipAngle(180 - 1e-3); -} diff --git a/node_modules/d3-geo/src/projection/conic.js b/node_modules/d3-geo/src/projection/conic.js deleted file mode 100644 index 81c5744b567cbb54899efdcf00cf760c192b9a1b..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/conic.js +++ /dev/null @@ -1,15 +0,0 @@ -import {degrees, pi, radians} from "../math.js"; -import {projectionMutator} from "./index.js"; - -export function conicProjection(projectAt) { - var phi0 = 0, - phi1 = pi / 3, - m = projectionMutator(projectAt), - p = m(phi0, phi1); - - p.parallels = function(_) { - return arguments.length ? m(phi0 = _[0] * radians, phi1 = _[1] * radians) : [phi0 * degrees, phi1 * degrees]; - }; - - return p; -} diff --git a/node_modules/d3-geo/src/projection/conicConformal.js b/node_modules/d3-geo/src/projection/conicConformal.js deleted file mode 100644 index adf73da274a0161fbe1edac8c10d0ff29eaa4395..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/conicConformal.js +++ /dev/null @@ -1,38 +0,0 @@ -import {abs, atan, atan2, cos, epsilon, halfPi, log, pi, pow, sign, sin, sqrt, tan} from "../math.js"; -import {conicProjection} from "./conic.js"; -import {mercatorRaw} from "./mercator.js"; - -function tany(y) { - return tan((halfPi + y) / 2); -} - -export function conicConformalRaw(y0, y1) { - var cy0 = cos(y0), - n = y0 === y1 ? sin(y0) : log(cy0 / cos(y1)) / log(tany(y1) / tany(y0)), - f = cy0 * pow(tany(y0), n) / n; - - if (!n) return mercatorRaw; - - function project(x, y) { - if (f > 0) { if (y < -halfPi + epsilon) y = -halfPi + epsilon; } - else { if (y > halfPi - epsilon) y = halfPi - epsilon; } - var r = f / pow(tany(y), n); - return [r * sin(n * x), f - r * cos(n * x)]; - } - - project.invert = function(x, y) { - var fy = f - y, r = sign(n) * sqrt(x * x + fy * fy), - l = atan2(x, abs(fy)) * sign(fy); - if (fy * n < 0) - l -= pi * sign(x) * sign(fy); - return [l / n, 2 * atan(pow(f / r, 1 / n)) - halfPi]; - }; - - return project; -} - -export default function() { - return conicProjection(conicConformalRaw) - .scale(109.5) - .parallels([30, 30]); -} diff --git a/node_modules/d3-geo/src/projection/conicEqualArea.js b/node_modules/d3-geo/src/projection/conicEqualArea.js deleted file mode 100644 index b4238e4797f8e49761266979b2e9e0d92b4c826f..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/conicEqualArea.js +++ /dev/null @@ -1,33 +0,0 @@ -import {abs, asin, atan2, cos, epsilon, pi, sign, sin, sqrt} from "../math.js"; -import {conicProjection} from "./conic.js"; -import {cylindricalEqualAreaRaw} from "./cylindricalEqualArea.js"; - -export function conicEqualAreaRaw(y0, y1) { - var sy0 = sin(y0), n = (sy0 + sin(y1)) / 2; - - // Are the parallels symmetrical around the Equator? - if (abs(n) < epsilon) return cylindricalEqualAreaRaw(y0); - - var c = 1 + sy0 * (2 * n - sy0), r0 = sqrt(c) / n; - - function project(x, y) { - var r = sqrt(c - 2 * n * sin(y)) / n; - return [r * sin(x *= n), r0 - r * cos(x)]; - } - - project.invert = function(x, y) { - var r0y = r0 - y, - l = atan2(x, abs(r0y)) * sign(r0y); - if (r0y * n < 0) - l -= pi * sign(x) * sign(r0y); - return [l / n, asin((c - (x * x + r0y * r0y) * n * n) / (2 * n))]; - }; - - return project; -} - -export default function() { - return conicProjection(conicEqualAreaRaw) - .scale(155.424) - .center([0, 33.6442]); -} diff --git a/node_modules/d3-geo/src/projection/conicEquidistant.js b/node_modules/d3-geo/src/projection/conicEquidistant.js deleted file mode 100644 index 796710e72d169866a0704aed993b78e88270bac9..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/conicEquidistant.js +++ /dev/null @@ -1,32 +0,0 @@ -import {abs, atan2, cos, epsilon, pi, sign, sin, sqrt} from "../math.js"; -import {conicProjection} from "./conic.js"; -import {equirectangularRaw} from "./equirectangular.js"; - -export function conicEquidistantRaw(y0, y1) { - var cy0 = cos(y0), - n = y0 === y1 ? sin(y0) : (cy0 - cos(y1)) / (y1 - y0), - g = cy0 / n + y0; - - if (abs(n) < epsilon) return equirectangularRaw; - - function project(x, y) { - var gy = g - y, nx = n * x; - return [gy * sin(nx), g - gy * cos(nx)]; - } - - project.invert = function(x, y) { - var gy = g - y, - l = atan2(x, abs(gy)) * sign(gy); - if (gy * n < 0) - l -= pi * sign(x) * sign(gy); - return [l / n, g - sign(n) * sqrt(x * x + gy * gy)]; - }; - - return project; -} - -export default function() { - return conicProjection(conicEquidistantRaw) - .scale(131.154) - .center([0, 13.9389]); -} diff --git a/node_modules/d3-geo/src/projection/cylindricalEqualArea.js b/node_modules/d3-geo/src/projection/cylindricalEqualArea.js deleted file mode 100644 index 1d38b40cb844fbcfc5f377295bd642985c7a0a14..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/cylindricalEqualArea.js +++ /dev/null @@ -1,15 +0,0 @@ -import {asin, cos, sin} from "../math.js"; - -export function cylindricalEqualAreaRaw(phi0) { - var cosPhi0 = cos(phi0); - - function forward(lambda, phi) { - return [lambda * cosPhi0, sin(phi) / cosPhi0]; - } - - forward.invert = function(x, y) { - return [x / cosPhi0, asin(y * cosPhi0)]; - }; - - return forward; -} diff --git a/node_modules/d3-geo/src/projection/equalEarth.js b/node_modules/d3-geo/src/projection/equalEarth.js deleted file mode 100644 index dc5ce2cb39b5c6d6e7f3099319924dabdc5674ec..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/equalEarth.js +++ /dev/null @@ -1,36 +0,0 @@ -import projection from "./index.js"; -import {abs, asin, cos, epsilon2, sin, sqrt} from "../math.js"; - -var A1 = 1.340264, - A2 = -0.081106, - A3 = 0.000893, - A4 = 0.003796, - M = sqrt(3) / 2, - iterations = 12; - -export function equalEarthRaw(lambda, phi) { - var l = asin(M * sin(phi)), l2 = l * l, l6 = l2 * l2 * l2; - return [ - lambda * cos(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))), - l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - ]; -} - -equalEarthRaw.invert = function(x, y) { - var l = y, l2 = l * l, l6 = l2 * l2 * l2; - for (var i = 0, delta, fy, fpy; i < iterations; ++i) { - fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y; - fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2); - l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2; - if (abs(delta) < epsilon2) break; - } - return [ - M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos(l), - asin(sin(l) / M) - ]; -}; - -export default function() { - return projection(equalEarthRaw) - .scale(177.158); -} diff --git a/node_modules/d3-geo/src/projection/equirectangular.js b/node_modules/d3-geo/src/projection/equirectangular.js deleted file mode 100644 index d47065c38ceb6beebc1b8825234ea6b57e9f791c..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/equirectangular.js +++ /dev/null @@ -1,12 +0,0 @@ -import projection from "./index.js"; - -export function equirectangularRaw(lambda, phi) { - return [lambda, phi]; -} - -equirectangularRaw.invert = equirectangularRaw; - -export default function() { - return projection(equirectangularRaw) - .scale(152.63); -} diff --git a/node_modules/d3-geo/src/projection/fit.js b/node_modules/d3-geo/src/projection/fit.js deleted file mode 100644 index d496d0fb818c925b6d8275e53cde7e1e576ee851..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/fit.js +++ /dev/null @@ -1,47 +0,0 @@ -import {default as geoStream} from "../stream.js"; -import boundsStream from "../path/bounds.js"; - -function fit(projection, fitBounds, object) { - var clip = projection.clipExtent && projection.clipExtent(); - projection.scale(150).translate([0, 0]); - if (clip != null) projection.clipExtent(null); - geoStream(object, projection.stream(boundsStream)); - fitBounds(boundsStream.result()); - if (clip != null) projection.clipExtent(clip); - return projection; -} - -export function fitExtent(projection, extent, object) { - return fit(projection, function(b) { - var w = extent[1][0] - extent[0][0], - h = extent[1][1] - extent[0][1], - k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])), - x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2, - y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2; - projection.scale(150 * k).translate([x, y]); - }, object); -} - -export function fitSize(projection, size, object) { - return fitExtent(projection, [[0, 0], size], object); -} - -export function fitWidth(projection, width, object) { - return fit(projection, function(b) { - var w = +width, - k = w / (b[1][0] - b[0][0]), - x = (w - k * (b[1][0] + b[0][0])) / 2, - y = -k * b[0][1]; - projection.scale(150 * k).translate([x, y]); - }, object); -} - -export function fitHeight(projection, height, object) { - return fit(projection, function(b) { - var h = +height, - k = h / (b[1][1] - b[0][1]), - x = -k * b[0][0], - y = (h - k * (b[1][1] + b[0][1])) / 2; - projection.scale(150 * k).translate([x, y]); - }, object); -} diff --git a/node_modules/d3-geo/src/projection/gnomonic.js b/node_modules/d3-geo/src/projection/gnomonic.js deleted file mode 100644 index 5da1cc79479278397cfefea89c019722edaec52d..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/gnomonic.js +++ /dev/null @@ -1,16 +0,0 @@ -import {atan, cos, sin} from "../math.js"; -import {azimuthalInvert} from "./azimuthal.js"; -import projection from "./index.js"; - -export function gnomonicRaw(x, y) { - var cy = cos(y), k = cos(x) * cy; - return [cy * sin(x) / k, sin(y) / k]; -} - -gnomonicRaw.invert = azimuthalInvert(atan); - -export default function() { - return projection(gnomonicRaw) - .scale(144.049) - .clipAngle(60); -} diff --git a/node_modules/d3-geo/src/projection/identity.js b/node_modules/d3-geo/src/projection/identity.js deleted file mode 100644 index cc439d8c5ba06d793b3fe95c7628c1223e346270..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/identity.js +++ /dev/null @@ -1,85 +0,0 @@ -import clipRectangle from "../clip/rectangle.js"; -import identity from "../identity.js"; -import {transformer} from "../transform.js"; -import {fitExtent, fitSize, fitWidth, fitHeight} from "./fit.js"; -import {cos, degrees, radians, sin} from "../math.js"; - -export default function() { - var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, // scale, translate and reflect - alpha = 0, ca, sa, // angle - x0 = null, y0, x1, y1, // clip extent - kx = 1, ky = 1, - transform = transformer({ - point: function(x, y) { - var p = projection([x, y]) - this.stream.point(p[0], p[1]); - } - }), - postclip = identity, - cache, - cacheStream; - - function reset() { - kx = k * sx; - ky = k * sy; - cache = cacheStream = null; - return projection; - } - - function projection (p) { - var x = p[0] * kx, y = p[1] * ky; - if (alpha) { - var t = y * ca - x * sa; - x = x * ca + y * sa; - y = t; - } - return [x + tx, y + ty]; - } - projection.invert = function(p) { - var x = p[0] - tx, y = p[1] - ty; - if (alpha) { - var t = y * ca + x * sa; - x = x * ca - y * sa; - y = t; - } - return [x / kx, y / ky]; - }; - projection.stream = function(stream) { - return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream)); - }; - projection.postclip = function(_) { - return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip; - }; - projection.clipExtent = function(_) { - return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]]; - }; - projection.scale = function(_) { - return arguments.length ? (k = +_, reset()) : k; - }; - projection.translate = function(_) { - return arguments.length ? (tx = +_[0], ty = +_[1], reset()) : [tx, ty]; - } - projection.angle = function(_) { - return arguments.length ? (alpha = _ % 360 * radians, sa = sin(alpha), ca = cos(alpha), reset()) : alpha * degrees; - }; - projection.reflectX = function(_) { - return arguments.length ? (sx = _ ? -1 : 1, reset()) : sx < 0; - }; - projection.reflectY = function(_) { - return arguments.length ? (sy = _ ? -1 : 1, reset()) : sy < 0; - }; - projection.fitExtent = function(extent, object) { - return fitExtent(projection, extent, object); - }; - projection.fitSize = function(size, object) { - return fitSize(projection, size, object); - }; - projection.fitWidth = function(width, object) { - return fitWidth(projection, width, object); - }; - projection.fitHeight = function(height, object) { - return fitHeight(projection, height, object); - }; - - return projection; -} diff --git a/node_modules/d3-geo/src/projection/index.js b/node_modules/d3-geo/src/projection/index.js deleted file mode 100644 index 8ea64bc3389675fa44e8a18b070f240bd732d21b..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/index.js +++ /dev/null @@ -1,177 +0,0 @@ -import clipAntimeridian from "../clip/antimeridian.js"; -import clipCircle from "../clip/circle.js"; -import clipRectangle from "../clip/rectangle.js"; -import compose from "../compose.js"; -import identity from "../identity.js"; -import {cos, degrees, radians, sin, sqrt} from "../math.js"; -import {rotateRadians} from "../rotation.js"; -import {transformer} from "../transform.js"; -import {fitExtent, fitSize, fitWidth, fitHeight} from "./fit.js"; -import resample from "./resample.js"; - -var transformRadians = transformer({ - point: function(x, y) { - this.stream.point(x * radians, y * radians); - } -}); - -function transformRotate(rotate) { - return transformer({ - point: function(x, y) { - var r = rotate(x, y); - return this.stream.point(r[0], r[1]); - } - }); -} - -function scaleTranslate(k, dx, dy, sx, sy) { - function transform(x, y) { - x *= sx; y *= sy; - return [dx + k * x, dy - k * y]; - } - transform.invert = function(x, y) { - return [(x - dx) / k * sx, (dy - y) / k * sy]; - }; - return transform; -} - -function scaleTranslateRotate(k, dx, dy, sx, sy, alpha) { - if (!alpha) return scaleTranslate(k, dx, dy, sx, sy); - var cosAlpha = cos(alpha), - sinAlpha = sin(alpha), - a = cosAlpha * k, - b = sinAlpha * k, - ai = cosAlpha / k, - bi = sinAlpha / k, - ci = (sinAlpha * dy - cosAlpha * dx) / k, - fi = (sinAlpha * dx + cosAlpha * dy) / k; - function transform(x, y) { - x *= sx; y *= sy; - return [a * x - b * y + dx, dy - b * x - a * y]; - } - transform.invert = function(x, y) { - return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)]; - }; - return transform; -} - -export default function projection(project) { - return projectionMutator(function() { return project; })(); -} - -export function projectionMutator(projectAt) { - var project, - k = 150, // scale - x = 480, y = 250, // translate - lambda = 0, phi = 0, // center - deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate - alpha = 0, // post-rotate angle - sx = 1, // reflectX - sy = 1, // reflectX - theta = null, preclip = clipAntimeridian, // pre-clip angle - x0 = null, y0, x1, y1, postclip = identity, // post-clip extent - delta2 = 0.5, // precision - projectResample, - projectTransform, - projectRotateTransform, - cache, - cacheStream; - - function projection(point) { - return projectRotateTransform(point[0] * radians, point[1] * radians); - } - - function invert(point) { - point = projectRotateTransform.invert(point[0], point[1]); - return point && [point[0] * degrees, point[1] * degrees]; - } - - projection.stream = function(stream) { - return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream))))); - }; - - projection.preclip = function(_) { - return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip; - }; - - projection.postclip = function(_) { - return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip; - }; - - projection.clipAngle = function(_) { - return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians) : (theta = null, clipAntimeridian), reset()) : theta * degrees; - }; - - projection.clipExtent = function(_) { - return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]]; - }; - - projection.scale = function(_) { - return arguments.length ? (k = +_, recenter()) : k; - }; - - projection.translate = function(_) { - return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y]; - }; - - projection.center = function(_) { - return arguments.length ? (lambda = _[0] % 360 * radians, phi = _[1] % 360 * radians, recenter()) : [lambda * degrees, phi * degrees]; - }; - - projection.rotate = function(_) { - return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees, deltaPhi * degrees, deltaGamma * degrees]; - }; - - projection.angle = function(_) { - return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees; - }; - - projection.reflectX = function(_) { - return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0; - }; - - projection.reflectY = function(_) { - return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0; - }; - - projection.precision = function(_) { - return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2); - }; - - projection.fitExtent = function(extent, object) { - return fitExtent(projection, extent, object); - }; - - projection.fitSize = function(size, object) { - return fitSize(projection, size, object); - }; - - projection.fitWidth = function(width, object) { - return fitWidth(projection, width, object); - }; - - projection.fitHeight = function(height, object) { - return fitHeight(projection, height, object); - }; - - function recenter() { - var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)), - transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha); - rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma); - projectTransform = compose(project, transform); - projectRotateTransform = compose(rotate, projectTransform); - projectResample = resample(projectTransform, delta2); - return reset(); - } - - function reset() { - cache = cacheStream = null; - return projection; - } - - return function() { - project = projectAt.apply(this, arguments); - projection.invert = project.invert && invert; - return recenter(); - }; -} diff --git a/node_modules/d3-geo/src/projection/mercator.js b/node_modules/d3-geo/src/projection/mercator.js deleted file mode 100644 index be975a9d0b61072e2aa6d7d486d2706d0b0c07cb..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/mercator.js +++ /dev/null @@ -1,52 +0,0 @@ -import {atan, exp, halfPi, log, pi, tan, tau} from "../math.js"; -import rotation from "../rotation.js"; -import projection from "./index.js"; - -export function mercatorRaw(lambda, phi) { - return [lambda, log(tan((halfPi + phi) / 2))]; -} - -mercatorRaw.invert = function(x, y) { - return [x, 2 * atan(exp(y)) - halfPi]; -}; - -export default function() { - return mercatorProjection(mercatorRaw) - .scale(961 / tau); -} - -export function mercatorProjection(project) { - var m = projection(project), - center = m.center, - scale = m.scale, - translate = m.translate, - clipExtent = m.clipExtent, - x0 = null, y0, x1, y1; // clip extent - - m.scale = function(_) { - return arguments.length ? (scale(_), reclip()) : scale(); - }; - - m.translate = function(_) { - return arguments.length ? (translate(_), reclip()) : translate(); - }; - - m.center = function(_) { - return arguments.length ? (center(_), reclip()) : center(); - }; - - m.clipExtent = function(_) { - return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]]; - }; - - function reclip() { - var k = pi * scale(), - t = m(rotation(m.rotate()).invert([0, 0])); - return clipExtent(x0 == null - ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw - ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]] - : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]); - } - - return reclip(); -} diff --git a/node_modules/d3-geo/src/projection/naturalEarth1.js b/node_modules/d3-geo/src/projection/naturalEarth1.js deleted file mode 100644 index fe5ed3106b3e639a8e3b465b06cb222752b3ea79..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/naturalEarth1.js +++ /dev/null @@ -1,28 +0,0 @@ -import projection from "./index.js"; -import {abs, epsilon} from "../math.js"; - -export function naturalEarth1Raw(lambda, phi) { - var phi2 = phi * phi, phi4 = phi2 * phi2; - return [ - lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))), - phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - ]; -} - -naturalEarth1Raw.invert = function(x, y) { - var phi = y, i = 25, delta; - do { - var phi2 = phi * phi, phi4 = phi2 * phi2; - phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) / - (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4))); - } while (abs(delta) > epsilon && --i > 0); - return [ - x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))), - phi - ]; -}; - -export default function() { - return projection(naturalEarth1Raw) - .scale(175.295); -} diff --git a/node_modules/d3-geo/src/projection/orthographic.js b/node_modules/d3-geo/src/projection/orthographic.js deleted file mode 100644 index b5a8351f1533b43deb30bd6d1cc7ad91e13b4b3a..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/orthographic.js +++ /dev/null @@ -1,15 +0,0 @@ -import {asin, cos, epsilon, sin} from "../math.js"; -import {azimuthalInvert} from "./azimuthal.js"; -import projection from "./index.js"; - -export function orthographicRaw(x, y) { - return [cos(y) * sin(x), sin(y)]; -} - -orthographicRaw.invert = azimuthalInvert(asin); - -export default function() { - return projection(orthographicRaw) - .scale(249.5) - .clipAngle(90 + epsilon); -} diff --git a/node_modules/d3-geo/src/projection/resample.js b/node_modules/d3-geo/src/projection/resample.js deleted file mode 100644 index 268fc4428425f635488868127587c81ace91820e..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/resample.js +++ /dev/null @@ -1,102 +0,0 @@ -import {cartesian} from "../cartesian.js"; -import {abs, asin, atan2, cos, epsilon, radians, sqrt} from "../math.js"; -import {transformer} from "../transform.js"; - -var maxDepth = 16, // maximum depth of subdivision - cosMinDistance = cos(30 * radians); // cos(minimum angular distance) - -export default function(project, delta2) { - return +delta2 ? resample(project, delta2) : resampleNone(project); -} - -function resampleNone(project) { - return transformer({ - point: function(x, y) { - x = project(x, y); - this.stream.point(x[0], x[1]); - } - }); -} - -function resample(project, delta2) { - - function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) { - var dx = x1 - x0, - dy = y1 - y0, - d2 = dx * dx + dy * dy; - if (d2 > 4 * delta2 && depth--) { - var a = a0 + a1, - b = b0 + b1, - c = c0 + c1, - m = sqrt(a * a + b * b + c * c), - phi2 = asin(c /= m), - lambda2 = abs(abs(c) - 1) < epsilon || abs(lambda0 - lambda1) < epsilon ? (lambda0 + lambda1) / 2 : atan2(b, a), - p = project(lambda2, phi2), - x2 = p[0], - y2 = p[1], - dx2 = x2 - x0, - dy2 = y2 - y0, - dz = dy * dx2 - dx * dy2; - if (dz * dz / d2 > delta2 // perpendicular projected distance - || abs((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end - || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance - resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream); - stream.point(x2, y2); - resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream); - } - } - } - return function(stream) { - var lambda00, x00, y00, a00, b00, c00, // first point - lambda0, x0, y0, a0, b0, c0; // previous point - - var resampleStream = { - point: point, - lineStart: lineStart, - lineEnd: lineEnd, - polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; }, - polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; } - }; - - function point(x, y) { - x = project(x, y); - stream.point(x[0], x[1]); - } - - function lineStart() { - x0 = NaN; - resampleStream.point = linePoint; - stream.lineStart(); - } - - function linePoint(lambda, phi) { - var c = cartesian([lambda, phi]), p = project(lambda, phi); - resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream); - stream.point(x0, y0); - } - - function lineEnd() { - resampleStream.point = point; - stream.lineEnd(); - } - - function ringStart() { - lineStart(); - resampleStream.point = ringPoint; - resampleStream.lineEnd = ringEnd; - } - - function ringPoint(lambda, phi) { - linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0; - resampleStream.point = linePoint; - } - - function ringEnd() { - resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream); - resampleStream.lineEnd = lineEnd; - lineEnd(); - } - - return resampleStream; - }; -} diff --git a/node_modules/d3-geo/src/projection/stereographic.js b/node_modules/d3-geo/src/projection/stereographic.js deleted file mode 100644 index 5f9694aac27a5d41e9ee3b0a438a73660999daac..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/stereographic.js +++ /dev/null @@ -1,18 +0,0 @@ -import {atan, cos, sin} from "../math.js"; -import {azimuthalInvert} from "./azimuthal.js"; -import projection from "./index.js"; - -export function stereographicRaw(x, y) { - var cy = cos(y), k = 1 + cos(x) * cy; - return [cy * sin(x) / k, sin(y) / k]; -} - -stereographicRaw.invert = azimuthalInvert(function(z) { - return 2 * atan(z); -}); - -export default function() { - return projection(stereographicRaw) - .scale(250) - .clipAngle(142); -} diff --git a/node_modules/d3-geo/src/projection/transverseMercator.js b/node_modules/d3-geo/src/projection/transverseMercator.js deleted file mode 100644 index bedd1c365fce451467ba70df00ae9d01145d5676..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/projection/transverseMercator.js +++ /dev/null @@ -1,27 +0,0 @@ -import {atan, exp, halfPi, log, tan} from "../math.js"; -import {mercatorProjection} from "./mercator.js"; - -export function transverseMercatorRaw(lambda, phi) { - return [log(tan((halfPi + phi) / 2)), -lambda]; -} - -transverseMercatorRaw.invert = function(x, y) { - return [-y, 2 * atan(exp(x)) - halfPi]; -}; - -export default function() { - var m = mercatorProjection(transverseMercatorRaw), - center = m.center, - rotate = m.rotate; - - m.center = function(_) { - return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]); - }; - - m.rotate = function(_) { - return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]); - }; - - return rotate([0, 0, 90]) - .scale(159.155); -} diff --git a/node_modules/d3-geo/src/rotation.js b/node_modules/d3-geo/src/rotation.js deleted file mode 100644 index 4e2def367d9c114e954783ec76d0a50f0cbad38d..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/rotation.js +++ /dev/null @@ -1,76 +0,0 @@ -import compose from "./compose.js"; -import {abs, asin, atan2, cos, degrees, pi, radians, sin, tau} from "./math.js"; - -function rotationIdentity(lambda, phi) { - return [abs(lambda) > pi ? lambda + Math.round(-lambda / tau) * tau : lambda, phi]; -} - -rotationIdentity.invert = rotationIdentity; - -export function rotateRadians(deltaLambda, deltaPhi, deltaGamma) { - return (deltaLambda %= tau) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma)) - : rotationLambda(deltaLambda)) - : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma) - : rotationIdentity); -} - -function forwardRotationLambda(deltaLambda) { - return function(lambda, phi) { - return lambda += deltaLambda, [lambda > pi ? lambda - tau : lambda < -pi ? lambda + tau : lambda, phi]; - }; -} - -function rotationLambda(deltaLambda) { - var rotation = forwardRotationLambda(deltaLambda); - rotation.invert = forwardRotationLambda(-deltaLambda); - return rotation; -} - -function rotationPhiGamma(deltaPhi, deltaGamma) { - var cosDeltaPhi = cos(deltaPhi), - sinDeltaPhi = sin(deltaPhi), - cosDeltaGamma = cos(deltaGamma), - sinDeltaGamma = sin(deltaGamma); - - function rotation(lambda, phi) { - var cosPhi = cos(phi), - x = cos(lambda) * cosPhi, - y = sin(lambda) * cosPhi, - z = sin(phi), - k = z * cosDeltaPhi + x * sinDeltaPhi; - return [ - atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi), - asin(k * cosDeltaGamma + y * sinDeltaGamma) - ]; - } - - rotation.invert = function(lambda, phi) { - var cosPhi = cos(phi), - x = cos(lambda) * cosPhi, - y = sin(lambda) * cosPhi, - z = sin(phi), - k = z * cosDeltaGamma - y * sinDeltaGamma; - return [ - atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi), - asin(k * cosDeltaPhi - x * sinDeltaPhi) - ]; - }; - - return rotation; -} - -export default function(rotate) { - rotate = rotateRadians(rotate[0] * radians, rotate[1] * radians, rotate.length > 2 ? rotate[2] * radians : 0); - - function forward(coordinates) { - coordinates = rotate(coordinates[0] * radians, coordinates[1] * radians); - return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates; - } - - forward.invert = function(coordinates) { - coordinates = rotate.invert(coordinates[0] * radians, coordinates[1] * radians); - return coordinates[0] *= degrees, coordinates[1] *= degrees, coordinates; - }; - - return forward; -} diff --git a/node_modules/d3-geo/src/stream.js b/node_modules/d3-geo/src/stream.js deleted file mode 100644 index ee994ae41fc206aa5d0629ae0be2f1558cb335eb..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/stream.js +++ /dev/null @@ -1,69 +0,0 @@ -function streamGeometry(geometry, stream) { - if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) { - streamGeometryType[geometry.type](geometry, stream); - } -} - -var streamObjectType = { - Feature: function(object, stream) { - streamGeometry(object.geometry, stream); - }, - FeatureCollection: function(object, stream) { - var features = object.features, i = -1, n = features.length; - while (++i < n) streamGeometry(features[i].geometry, stream); - } -}; - -var streamGeometryType = { - Sphere: function(object, stream) { - stream.sphere(); - }, - Point: function(object, stream) { - object = object.coordinates; - stream.point(object[0], object[1], object[2]); - }, - MultiPoint: function(object, stream) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]); - }, - LineString: function(object, stream) { - streamLine(object.coordinates, stream, 0); - }, - MultiLineString: function(object, stream) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) streamLine(coordinates[i], stream, 0); - }, - Polygon: function(object, stream) { - streamPolygon(object.coordinates, stream); - }, - MultiPolygon: function(object, stream) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) streamPolygon(coordinates[i], stream); - }, - GeometryCollection: function(object, stream) { - var geometries = object.geometries, i = -1, n = geometries.length; - while (++i < n) streamGeometry(geometries[i], stream); - } -}; - -function streamLine(coordinates, stream, closed) { - var i = -1, n = coordinates.length - closed, coordinate; - stream.lineStart(); - while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]); - stream.lineEnd(); -} - -function streamPolygon(coordinates, stream) { - var i = -1, n = coordinates.length; - stream.polygonStart(); - while (++i < n) streamLine(coordinates[i], stream, 1); - stream.polygonEnd(); -} - -export default function(object, stream) { - if (object && streamObjectType.hasOwnProperty(object.type)) { - streamObjectType[object.type](object, stream); - } else { - streamGeometry(object, stream); - } -} diff --git a/node_modules/d3-geo/src/transform.js b/node_modules/d3-geo/src/transform.js deleted file mode 100644 index a954bc5a070e3c359e2dd860c5b0fd75bd91eb96..0000000000000000000000000000000000000000 --- a/node_modules/d3-geo/src/transform.js +++ /dev/null @@ -1,26 +0,0 @@ -export default function(methods) { - return { - stream: transformer(methods) - }; -} - -export function transformer(methods) { - return function(stream) { - var s = new TransformStream; - for (var key in methods) s[key] = methods[key]; - s.stream = stream; - return s; - }; -} - -function TransformStream() {} - -TransformStream.prototype = { - constructor: TransformStream, - point: function(x, y) { this.stream.point(x, y); }, - sphere: function() { this.stream.sphere(); }, - lineStart: function() { this.stream.lineStart(); }, - lineEnd: function() { this.stream.lineEnd(); }, - polygonStart: function() { this.stream.polygonStart(); }, - polygonEnd: function() { this.stream.polygonEnd(); } -}; diff --git a/node_modules/d3-hierarchy/LICENSE b/node_modules/d3-hierarchy/LICENSE deleted file mode 100644 index 721bd22ece6587a9408eda1b6a3949c425b5624a..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-hierarchy/README.md b/node_modules/d3-hierarchy/README.md deleted file mode 100644 index 1366d5e0ec8625337d25d9e1f59d4e029a69c094..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/README.md +++ /dev/null @@ -1,572 +0,0 @@ -# d3-hierarchy - -Many datasets are intrinsically hierarchical. Consider [geographic entities](https://www.census.gov/programs-surveys/geography/guidance/hierarchy.html), such as census blocks, census tracts, counties and states; the command structure of businesses and governments; file systems and software packages. And even non-hierarchical data may be arranged empirically into a hierarchy, as with [*k*-means clustering](https://en.wikipedia.org/wiki/K-means_clustering) or [phylogenetic trees](https://observablehq.com/@mbostock/tree-of-life). - -This module implements several popular techniques for visualizing hierarchical data: - -**Node-link diagrams** show topology using discrete marks for nodes and links, such as a circle for each node and a line connecting each parent and child. The [“tidy†tree](#tree) is delightfully compact, while the [dendrogram](#cluster) places leaves at the same level. (These have both polar and Cartesian forms.) [Indented trees](https://observablehq.com/@d3/indented-tree) are useful for interactive browsing. - -**Adjacency diagrams** show topology through the relative placement of nodes. They may also encode a quantitative dimension in the area of each node, for example to show revenue or file size. The [“icicle†diagram](#partition) uses rectangles, while the “sunburst†uses annular segments. - -**Enclosure diagrams** also use an area encoding, but show topology through containment. A [treemap](#treemap) recursively subdivides area into rectangles. [Circle-packing](#pack) tightly nests circles; this is not as space-efficient as a treemap, but perhaps more readily shows topology. - -A good hierarchical visualization facilitates rapid multiscale inference: micro-observations of individual elements and macro-observations of large groups. - -## Installing - -If you use NPM, `npm install d3-hierarchy`. Otherwise, download the [latest release](https://github.com/d3/d3-hierarchy/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-hierarchy.v1.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-hierarchy.v2.min.js"></script> -<script> - -var treemap = d3.treemap(); - -</script> -``` - -## API Reference - -* [Hierarchy](#hierarchy) ([Stratify](#stratify)) -* [Cluster](#cluster) -* [Tree](#tree) -* [Treemap](#treemap) ([Treemap Tiling](#treemap-tiling)) -* [Partition](#partition) -* [Pack](#pack) - -### Hierarchy - -Before you can compute a hierarchical layout, you need a root node. If your data is already in a hierarchical format, such as JSON, you can pass it directly to [d3.hierarchy](#hierarchy); otherwise, you can rearrange tabular data, such as comma-separated values (CSV), into a hierarchy using [d3.stratify](#stratify). - -<a name="hierarchy" href="#hierarchy">#</a> d3.<b>hierarchy</b>(<i>data</i>[, <i>children</i>]) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/hierarchy/index.js), [Examples](https://observablehq.com/@d3/d3-hierarchy) - -Constructs a root node from the specified hierarchical *data*. The specified *data* must be an object representing the root node. For example: - -```json -{ - "name": "Eve", - "children": [ - { - "name": "Cain" - }, - { - "name": "Seth", - "children": [ - { - "name": "Enos" - }, - { - "name": "Noam" - } - ] - }, - { - "name": "Abel" - }, - { - "name": "Awan", - "children": [ - { - "name": "Enoch" - } - ] - }, - { - "name": "Azura" - } - ] -} -``` - -The specified *children* accessor function is invoked for each datum, starting with the root *data*, and must return an iterable of data representing the children, if any. If the children accessor is not specified, it defaults to: - -```js -function children(d) { - return d.children; -} -``` - -If *data* is a Map, it is implicitly converted to the entry [undefined, *data*], and the children accessor instead defaults to: - -```js -function children(d) { - return Array.isArray(d) ? d[1] : null; -} -``` - -This allows you to pass the result of [d3.group](https://github.com/d3/d3-array/blob/master/README.md#group) or [d3.rollup](https://github.com/d3/d3-array/blob/master/README.md#rollup) to d3.hierarchy. - -The returned node and each descendant has the following properties: - -* *node*.data - the associated data, as specified to the [constructor](#hierarchy). -* *node*.depth - zero for the root node, and increasing by one for each descendant generation. -* *node*.height - zero for leaf nodes, and the greatest distance from any descendant leaf for internal nodes. -* *node*.parent - the parent node, or null for the root node. -* *node*.children - an array of child nodes, if any; undefined for leaf nodes. -* *node*.value - the summed value of the node and its [descendants](#node_descendants); optional, see [*node*.sum](#node_sum) and [*node*.count](#node_count). - -This method can also be used to test if a node is an `instanceof d3.hierarchy` and to extend the node prototype. - -<a name="node_ancestors" href="#node_ancestors">#</a> <i>node</i>.<b>ancestors</b>() · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/hierarchy/ancestors.js), [Examples](https://observablehq.com/@d3/d3-hierarchy) - -Returns the array of ancestors nodes, starting with this node, then followed by each parent up to the root. - -<a name="node_descendants" href="#node_descendants">#</a> <i>node</i>.<b>descendants</b>() · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/hierarchy/descendants.js), [Examples](https://observablehq.com/@d3/d3-hierarchy) - -Returns the array of descendant nodes, starting with this node, then followed by each child in topological order. - -<a name="node_leaves" href="#node_leaves">#</a> <i>node</i>.<b>leaves</b>() · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/hierarchy/leaves.js), [Examples](https://observablehq.com/@d3/d3-hierarchy) - -Returns the array of leaf nodes in traversal order; leaves are nodes with no children. - -<a name="node_find" href="#node_find">#</a> <i>node</i>.<b>find</b>(<i>filter</i>) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/hierarchy/find.js)<!-- , [Examples](https://observablehq.com/@d3/d3-hierarchy) --> - -Returns the first node in the hierarchy from this *node* for which the specified *filter* returns a truthy value. undefined if no such node is found. - -<a name="node_path" href="#node_path">#</a> <i>node</i>.<b>path</b>(<i>target</i>) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/hierarchy/path.js), [Examples](https://observablehq.com/@d3/d3-hierarchy) - -Returns the shortest path through the hierarchy from this *node* to the specified *target* node. The path starts at this *node*, ascends to the least common ancestor of this *node* and the *target* node, and then descends to the *target* node. This is particularly useful for [hierarchical edge bundling](https://observablehq.com/@d3/hierarchical-edge-bundling). - -<a name="node_links" href="#node_links">#</a> <i>node</i>.<b>links</b>() · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/hierarchy/links.js), [Examples](https://observablehq.com/@d3/d3-hierarchy) - -Returns an array of links for this *node* and its descendants, where each *link* is an object that defines source and target properties. The source of each link is the parent node, and the target is a child node. - -<a name="node_sum" href="#node_sum">#</a> <i>node</i>.<b>sum</b>(<i>value</i>) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/hierarchy/sum.js), [Examples](https://observablehq.com/@d3/visiting-a-d3-hierarchy) - -Evaluates the specified *value* function for this *node* and each descendant in [post-order traversal](#node_eachAfter), and returns this *node*. The *node*.value property of each node is set to the numeric value returned by the specified function plus the combined value of all children. The function is passed the node’s data, and must return a non-negative number. The *value* accessor is evaluated for *node* and every descendant, including internal nodes; if you only want leaf nodes to have internal value, then return zero for any node with children. [For example](https://observablehq.com/@d3/treemap-by-count), as an alternative to [*node*.count](#node_count): - -```js -root.sum(function(d) { return d.value ? 1 : 0; }); -``` - -You must call *node*.sum or [*node*.count](#node_count) before invoking a hierarchical layout that requires *node*.value, such as [d3.treemap](#treemap). Since the API supports [method chaining](https://en.wikipedia.org/wiki/Method_chaining), you can invoke *node*.sum and [*node*.sort](#node_sort) before computing the layout, and then subsequently generate an array of all [descendant nodes](#node_descendants) like so: - -```js -var treemap = d3.treemap() - .size([width, height]) - .padding(2); - -var nodes = treemap(root - .sum(function(d) { return d.value; }) - .sort(function(a, b) { return b.height - a.height || b.value - a.value; })) - .descendants(); -``` - -This example assumes that the node data has a value field. - -<a name="node_count" href="#node_count">#</a> <i>node</i>.<b>count</b>() · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/hierarchy/count.js), [Examples](https://observablehq.com/@d3/visiting-a-d3-hierarchy) - -Computes the number of leaves under this *node* and assigns it to *node*.value, and similarly for every descendant of *node*. If this *node* is a leaf, its count is one. Returns this *node*. See also [*node*.sum](#node_sum). - -<a name="node_sort" href="#node_sort">#</a> <i>node</i>.<b>sort</b>(<i>compare</i>) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/hierarchy/sort.js), [Examples](https://observablehq.com/@d3/visiting-a-d3-hierarchy) - -Sorts the children of this *node*, if any, and each of this *node*’s descendants’ children, in [pre-order traversal](#node_eachBefore) using the specified *compare* function, and returns this *node*. The specified function is passed two nodes *a* and *b* to compare. If *a* should be before *b*, the function must return a value less than zero; if *b* should be before *a*, the function must return a value greater than zero; otherwise, the relative order of *a* and *b* are not specified. See [*array*.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) for more. - -Unlike [*node*.sum](#node_sum), the *compare* function is passed two [nodes](#hierarchy) rather than two nodes’ data. For example, if the data has a value property, this sorts nodes by the descending aggregate value of the node and all its descendants, as is recommended for [circle-packing](#pack): - -```js -root - .sum(function(d) { return d.value; }) - .sort(function(a, b) { return b.value - a.value; }); -`````` - -Similarly, to sort nodes by descending height (greatest distance from any descendant leaf) and then descending value, as is recommended for [treemaps](#treemap) and [icicles](#partition): - -```js -root - .sum(function(d) { return d.value; }) - .sort(function(a, b) { return b.height - a.height || b.value - a.value; }); -``` - -To sort nodes by descending height and then ascending id, as is recommended for [trees](#tree) and [dendrograms](#cluster): - -```js -root - .sum(function(d) { return d.value; }) - .sort(function(a, b) { return b.height - a.height || a.id.localeCompare(b.id); }); -``` - -You must call *node*.sort before invoking a hierarchical layout if you want the new sort order to affect the layout; see [*node*.sum](#node_sum) for an example. - -<a name="node_iterator" href="#node_iterator">#</a> <i>node</i>[<b>Symbol.iterator</b>]() [<>](https://github.com/d3/d3-hierarchy/blob/master/src/hierarchy/iterator.js "Source") - -Returns an iterator over the *node*’s descendants in breadth-first order. For example: - -```js -for (const descendant of node) { - console.log(descendant); -} -``` - -<a name="node_each" href="#node_each">#</a> <i>node</i>.<b>each</b>(<i>function</i>[, <i>that</i>]) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/hierarchy/each.js), [Examples](https://observablehq.com/@d3/visiting-a-d3-hierarchy) - -Invokes the specified *function* for *node* and each descendant in [breadth-first order](https://en.wikipedia.org/wiki/Breadth-first_search), such that a given *node* is only visited if all nodes of lesser depth have already been visited, as well as all preceding nodes of the same depth. The specified function is passed the current *descendant*, the zero-based traversal *index*, and this *node*. If *that* is specified, it is the this context of the callback. - -<a name="node_eachAfter" href="#node_eachAfter">#</a> <i>node</i>.<b>eachAfter</b>(<i>function</i>[, <i>that</i>]) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/hierarchy/eachAfter.js), [Examples](https://observablehq.com/@d3/visiting-a-d3-hierarchy) - -Invokes the specified *function* for *node* and each descendant in [post-order traversal](https://en.wikipedia.org/wiki/Tree_traversal#Post-order), such that a given *node* is only visited after all of its descendants have already been visited. The specified function is passed the current *descendant*, the zero-based traversal *index*, and this *node*. If *that* is specified, it is the this context of the callback. - -<a name="node_eachBefore" href="#node_eachBefore">#</a> <i>node</i>.<b>eachBefore</b>(<i>function</i>[, <i>that</i>]) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/hierarchy/eachBefore.js), [Examples](https://observablehq.com/@d3/visiting-a-d3-hierarchy) - -Invokes the specified *function* for *node* and each descendant in [pre-order traversal](https://en.wikipedia.org/wiki/Tree_traversal#Pre-order), such that a given *node* is only visited after all of its ancestors have already been visited. The specified function is passed the current *descendant*, the zero-based traversal *index*, and this *node*. If *that* is specified, it is the this context of the callback. - -<a name="node_copy" href="#node_copy">#</a> <i>node</i>.<b>copy</b>() · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/hierarchy/index.js), [Examples](https://observablehq.com/@d3/d3-hierarchy) - -Return a deep copy of the subtree starting at this *node*. (The returned deep copy shares the same data, however.) The returned node is the root of a new tree; the returned node’s parent is always null and its depth is always zero. - -#### Stratify - -Consider the following table of relationships: - -Name | Parent -------|-------- -Eve | -Cain | Eve -Seth | Eve -Enos | Seth -Noam | Seth -Abel | Eve -Awan | Eve -Enoch | Awan -Azura | Eve - -These names are conveniently unique, so we can unambiguously represent the hierarchy as a CSV file: - -``` -name,parent -Eve, -Cain,Eve -Seth,Eve -Enos,Seth -Noam,Seth -Abel,Eve -Awan,Eve -Enoch,Awan -Azura,Eve -``` - -To parse the CSV using [d3.csvParse](https://github.com/d3/d3-dsv#csvParse): - -```js -var table = d3.csvParse(text); -``` - -This returns: - -```json -[ - {"name": "Eve", "parent": ""}, - {"name": "Cain", "parent": "Eve"}, - {"name": "Seth", "parent": "Eve"}, - {"name": "Enos", "parent": "Seth"}, - {"name": "Noam", "parent": "Seth"}, - {"name": "Abel", "parent": "Eve"}, - {"name": "Awan", "parent": "Eve"}, - {"name": "Enoch", "parent": "Awan"}, - {"name": "Azura", "parent": "Eve"} -] -``` - -To convert to a hierarchy: - -```js -var root = d3.stratify() - .id(function(d) { return d.name; }) - .parentId(function(d) { return d.parent; }) - (table); -``` - -This returns: - -[<img alt="Stratify" src="https://raw.githubusercontent.com/d3/d3-hierarchy/master/img/stratify.png">](https://runkit.com/mbostock/56fed33d8630b01300f72daa) - -This hierarchy can now be passed to a hierarchical layout, such as [d3.tree](#_tree), for visualization. - -<a name="stratify" href="#stratify">#</a> d3.<b>stratify</b>() · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/stratify.js), [Examples](https://observablehq.com/@d3/d3-stratify) - -Constructs a new stratify operator with the default settings. - -<a name="_stratify" href="#_stratify">#</a> <i>stratify</i>(<i>data</i>) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/stratify.js), [Examples](https://observablehq.com/@d3/d3-stratify) - -Generates a new hierarchy from the specified tabular *data*. - -<a name="stratify_id" href="#stratify_id">#</a> <i>stratify</i>.<b>id</b>([<i>id</i>]) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/stratify.js), [Examples](https://observablehq.com/@d3/d3-stratify) - -If *id* is specified, sets the id accessor to the given function and returns this stratify operator. Otherwise, returns the current id accessor, which defaults to: - -```js -function id(d) { - return d.id; -} -``` - -The id accessor is invoked for each element in the input data passed to the [stratify operator](#_stratify), being passed the current datum (*d*) and the current index (*i*). The returned string is then used to identify the node’s relationships in conjunction with the [parent id](#stratify_parentId). For leaf nodes, the id may be undefined; otherwise, the id must be unique. (Null and the empty string are equivalent to undefined.) - -<a name="stratify_parentId" href="#stratify_parentId">#</a> <i>stratify</i>.<b>parentId</b>([<i>parentId</i>]) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/stratify.js), [Examples](https://observablehq.com/@d3/d3-stratify) - -If *parentId* is specified, sets the parent id accessor to the given function and returns this stratify operator. Otherwise, returns the current parent id accessor, which defaults to: - -```js -function parentId(d) { - return d.parentId; -} -``` - -The parent id accessor is invoked for each element in the input data passed to the [stratify operator](#_stratify), being passed the current datum (*d*) and the current index (*i*). The returned string is then used to identify the node’s relationships in conjunction with the [id](#stratify_id). For the root node, the parent id should be undefined. (Null and the empty string are equivalent to undefined.) There must be exactly one root node in the input data, and no circular relationships. - -### Cluster - -[<img alt="Dendrogram" src="https://raw.githubusercontent.com/d3/d3-hierarchy/master/img/cluster.png">](https://observablehq.com/@d3/cluster-dendrogram) - -The **cluster layout** produces [dendrograms](http://en.wikipedia.org/wiki/Dendrogram): node-link diagrams that place leaf nodes of the tree at the same depth. Dendrograms are typically less compact than [tidy trees](#tree), but are useful when all the leaves should be at the same level, such as for hierarchical clustering or [phylogenetic tree diagrams](https://observablehq.com/@mbostock/tree-of-life). - -<a name="cluster" href="#cluster">#</a> d3.<b>cluster</b>() · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/cluster.js), [Examples](https://observablehq.com/@d3/cluster-dendrogram) - -Creates a new cluster layout with default settings. - -<a name="_cluster" href="#_cluster">#</a> <i>cluster</i>(<i>root</i>) - -Lays out the specified *root* [hierarchy](#hierarchy), assigning the following properties on *root* and its descendants: - -* *node*.x - the *x*-coordinate of the node -* *node*.y - the *y*-coordinate of the node - -The coordinates *x* and *y* represent an arbitrary coordinate system; for example, you can treat *x* as an angle and *y* as a radius to produce a [radial layout](https://observablehq.com/@d3/radial-dendrogram). You may want to call [*root*.sort](#node_sort) before passing the hierarchy to the cluster layout. - -<a name="cluster_size" href="#cluster_size">#</a> <i>cluster</i>.<b>size</b>([<i>size</i>]) - -If *size* is specified, sets this cluster layout’s size to the specified two-element array of numbers [*width*, *height*] and returns this cluster layout. If *size* is not specified, returns the current layout size, which defaults to [1, 1]. A layout size of null indicates that a [node size](#cluster_nodeSize) will be used instead. The coordinates *x* and *y* represent an arbitrary coordinate system; for example, to produce a [radial layout](https://observablehq.com/@d3/radial-dendrogram), a size of [360, *radius*] corresponds to a breadth of 360° and a depth of *radius*. - -<a name="cluster_nodeSize" href="#cluster_nodeSize">#</a> <i>cluster</i>.<b>nodeSize</b>([<i>size</i>]) - -If *size* is specified, sets this cluster layout’s node size to the specified two-element array of numbers [*width*, *height*] and returns this cluster layout. If *size* is not specified, returns the current node size, which defaults to null. A node size of null indicates that a [layout size](#cluster_size) will be used instead. When a node size is specified, the root node is always positioned at ⟨0, 0⟩. - -<a name="cluster_separation" href="#cluster_separation">#</a> <i>cluster</i>.<b>separation</b>([<i>separation</i>]) - -If *separation* is specified, sets the separation accessor to the specified function and returns this cluster layout. If *separation* is not specified, returns the current separation accessor, which defaults to: - -```js -function separation(a, b) { - return a.parent == b.parent ? 1 : 2; -} -``` - -The separation accessor is used to separate neighboring leaves. The separation function is passed two leaves *a* and *b*, and must return the desired separation. The nodes are typically siblings, though the nodes may be more distantly related if the layout decides to place such nodes adjacent. - -### Tree - -[<img alt="Tidy Tree" src="https://raw.githubusercontent.com/d3/d3-hierarchy/master/img/tree.png">](https://observablehq.com/@d3/tidy-tree) - -The **tree** layout produces tidy node-link diagrams of trees using the [Reingold–Tilford “tidy†algorithm](http://reingold.co/tidier-drawings.pdf), improved to run in linear time by [Buchheim *et al.*](http://dirk.jivas.de/papers/buchheim02improving.pdf) Tidy trees are typically more compact than [dendrograms](#cluster). - -<a name="tree" href="#tree">#</a> d3.<b>tree</b>() · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/tree.js), [Examples](https://observablehq.com/@d3/tidy-tree) - -Creates a new tree layout with default settings. - -<a name="_tree" href="#_tree">#</a> <i>tree</i>(<i>root</i>) - -Lays out the specified *root* [hierarchy](#hierarchy), assigning the following properties on *root* and its descendants: - -* *node*.x - the *x*-coordinate of the node -* *node*.y - the *y*-coordinate of the node - -The coordinates *x* and *y* represent an arbitrary coordinate system; for example, you can treat *x* as an angle and *y* as a radius to produce a [radial layout](https://observablehq.com/@d3/radial-tidy-tree). You may want to call [*root*.sort](#node_sort) before passing the hierarchy to the tree layout. - -<a name="tree_size" href="#tree_size">#</a> <i>tree</i>.<b>size</b>([<i>size</i>]) - -If *size* is specified, sets this tree layout’s size to the specified two-element array of numbers [*width*, *height*] and returns this tree layout. If *size* is not specified, returns the current layout size, which defaults to [1, 1]. A layout size of null indicates that a [node size](#tree_nodeSize) will be used instead. The coordinates *x* and *y* represent an arbitrary coordinate system; for example, to produce a [radial layout](https://observablehq.com/@d3/radial-tidy-tree), a size of [360, *radius*] corresponds to a breadth of 360° and a depth of *radius*. - -<a name="tree_nodeSize" href="#tree_nodeSize">#</a> <i>tree</i>.<b>nodeSize</b>([<i>size</i>]) - -If *size* is specified, sets this tree layout’s node size to the specified two-element array of numbers [*width*, *height*] and returns this tree layout. If *size* is not specified, returns the current node size, which defaults to null. A node size of null indicates that a [layout size](#tree_size) will be used instead. When a node size is specified, the root node is always positioned at ⟨0, 0⟩. - -<a name="tree_separation" href="#tree_separation">#</a> <i>tree</i>.<b>separation</b>([<i>separation</i>]) - -If *separation* is specified, sets the separation accessor to the specified function and returns this tree layout. If *separation* is not specified, returns the current separation accessor, which defaults to: - -```js -function separation(a, b) { - return a.parent == b.parent ? 1 : 2; -} -``` - -A variation that is more appropriate for radial layouts reduces the separation gap proportionally to the radius: - -```js -function separation(a, b) { - return (a.parent == b.parent ? 1 : 2) / a.depth; -} -``` - -The separation accessor is used to separate neighboring nodes. The separation function is passed two nodes *a* and *b*, and must return the desired separation. The nodes are typically siblings, though the nodes may be more distantly related if the layout decides to place such nodes adjacent. - -### Treemap - -[<img alt="Treemap" src="https://raw.githubusercontent.com/d3/d3-hierarchy/master/img/treemap.png">](https://observablehq.com/@d3/treemap) - -Introduced by [Ben Shneiderman](http://www.cs.umd.edu/hcil/treemap-history/) in 1991, a **treemap** recursively subdivides area into rectangles according to each node’s associated value. D3’s treemap implementation supports an extensible [tiling method](#treemap_tile): the default [squarified](#treemapSquarify) method seeks to generate rectangles with a [golden](https://en.wikipedia.org/wiki/Golden_ratio) aspect ratio; this offers better readability and size estimation than [slice-and-dice](#treemapSliceDice), which simply alternates between horizontal and vertical subdivision by depth. - -<a name="treemap" href="#treemap">#</a> d3.<b>treemap</b>() · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/treemap/index.js), [Examples](https://observablehq.com/@d3/treemap) - -Creates a new treemap layout with default settings. - -<a name="_treemap" href="#_treemap">#</a> <i>treemap</i>(<i>root</i>) - -Lays out the specified *root* [hierarchy](#hierarchy), assigning the following properties on *root* and its descendants: - -* *node*.x0 - the left edge of the rectangle -* *node*.y0 - the top edge of the rectangle -* *node*.x1 - the right edge of the rectangle -* *node*.y1 - the bottom edge of the rectangle - -You must call [*root*.sum](#node_sum) before passing the hierarchy to the treemap layout. You probably also want to call [*root*.sort](#node_sort) to order the hierarchy before computing the layout. - -<a name="treemap_tile" href="#treemap_tile">#</a> <i>treemap</i>.<b>tile</b>([<i>tile</i>]) - -If *tile* is specified, sets the [tiling method](#treemap-tiling) to the specified function and returns this treemap layout. If *tile* is not specified, returns the current tiling method, which defaults to [d3.treemapSquarify](#treemapSquarify) with the golden ratio. - -<a name="treemap_size" href="#treemap_size">#</a> <i>treemap</i>.<b>size</b>([<i>size</i>]) - -If *size* is specified, sets this treemap layout’s size to the specified two-element array of numbers [*width*, *height*] and returns this treemap layout. If *size* is not specified, returns the current size, which defaults to [1, 1]. - -<a name="treemap_round" href="#treemap_round">#</a> <i>treemap</i>.<b>round</b>([<i>round</i>]) - -If *round* is specified, enables or disables rounding according to the given boolean and returns this treemap layout. If *round* is not specified, returns the current rounding state, which defaults to false. - -<a name="treemap_padding" href="#treemap_padding">#</a> <i>treemap</i>.<b>padding</b>([<i>padding</i>]) - -If *padding* is specified, sets the [inner](#treemap_paddingInner) and [outer](#treemap_paddingOuter) padding to the specified number or function and returns this treemap layout. If *padding* is not specified, returns the current inner padding function. - -<a name="treemap_paddingInner" href="#treemap_paddingInner">#</a> <i>treemap</i>.<b>paddingInner</b>([<i>padding</i>]) - -If *padding* is specified, sets the inner padding to the specified number or function and returns this treemap layout. If *padding* is not specified, returns the current inner padding function, which defaults to the constant zero. If *padding* is a function, it is invoked for each node with children, being passed the current node. The inner padding is used to separate a node’s adjacent children. - -<a name="treemap_paddingOuter" href="#treemap_paddingOuter">#</a> <i>treemap</i>.<b>paddingOuter</b>([<i>padding</i>]) - -If *padding* is specified, sets the [top](#treemap_paddingTop), [right](#treemap_paddingRight), [bottom](#treemap_paddingBottom) and [left](#treemap_paddingLeft) padding to the specified number or function and returns this treemap layout. If *padding* is not specified, returns the current top padding function. - -<a name="treemap_paddingTop" href="#treemap_paddingTop">#</a> <i>treemap</i>.<b>paddingTop</b>([<i>padding</i>]) - -If *padding* is specified, sets the top padding to the specified number or function and returns this treemap layout. If *padding* is not specified, returns the current top padding function, which defaults to the constant zero. If *padding* is a function, it is invoked for each node with children, being passed the current node. The top padding is used to separate the top edge of a node from its children. - -<a name="treemap_paddingRight" href="#treemap_paddingRight">#</a> <i>treemap</i>.<b>paddingRight</b>([<i>padding</i>]) - -If *padding* is specified, sets the right padding to the specified number or function and returns this treemap layout. If *padding* is not specified, returns the current right padding function, which defaults to the constant zero. If *padding* is a function, it is invoked for each node with children, being passed the current node. The right padding is used to separate the right edge of a node from its children. - -<a name="treemap_paddingBottom" href="#treemap_paddingBottom">#</a> <i>treemap</i>.<b>paddingBottom</b>([<i>padding</i>]) - -If *padding* is specified, sets the bottom padding to the specified number or function and returns this treemap layout. If *padding* is not specified, returns the current bottom padding function, which defaults to the constant zero. If *padding* is a function, it is invoked for each node with children, being passed the current node. The bottom padding is used to separate the bottom edge of a node from its children. - -<a name="treemap_paddingLeft" href="#treemap_paddingLeft">#</a> <i>treemap</i>.<b>paddingLeft</b>([<i>padding</i>]) - -If *padding* is specified, sets the left padding to the specified number or function and returns this treemap layout. If *padding* is not specified, returns the current left padding function, which defaults to the constant zero. If *padding* is a function, it is invoked for each node with children, being passed the current node. The left padding is used to separate the left edge of a node from its children. - -#### Treemap Tiling - -Several built-in tiling methods are provided for use with [*treemap*.tile](#treemap_tile). - -<a name="treemapBinary" href="#treemapBinary">#</a> d3.<b>treemapBinary</b>(<i>node</i>, <i>x0</i>, <i>y0</i>, <i>x1</i>, <i>y1</i>) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/treemap/binary.js), [Examples](https://observablehq.com/@d3/treemap) - -Recursively partitions the specified *nodes* into an approximately-balanced binary tree, choosing horizontal partitioning for wide rectangles and vertical partitioning for tall rectangles. - -<a name="treemapDice" href="#treemapDice">#</a> d3.<b>treemapDice</b>(<i>node</i>, <i>x0</i>, <i>y0</i>, <i>x1</i>, <i>y1</i>) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/treemap/dice.js), [Examples](https://observablehq.com/@d3/treemap) - -Divides the rectangular area specified by *x0*, *y0*, *x1*, *y1* horizontally according the value of each of the specified *node*’s children. The children are positioned in order, starting with the left edge (*x0*) of the given rectangle. If the sum of the children’s values is less than the specified *node*’s value (*i.e.*, if the specified *node* has a non-zero internal value), the remaining empty space will be positioned on the right edge (*x1*) of the given rectangle. - -<a name="treemapSlice" href="#treemapSlice">#</a> d3.<b>treemapSlice</b>(<i>node</i>, <i>x0</i>, <i>y0</i>, <i>x1</i>, <i>y1</i>) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/treemap/slice.js), [Examples](https://observablehq.com/@d3/treemap) - -Divides the rectangular area specified by *x0*, *y0*, *x1*, *y1* vertically according the value of each of the specified *node*’s children. The children are positioned in order, starting with the top edge (*y0*) of the given rectangle. If the sum of the children’s values is less than the specified *node*’s value (*i.e.*, if the specified *node* has a non-zero internal value), the remaining empty space will be positioned on the bottom edge (*y1*) of the given rectangle. - -<a name="treemapSliceDice" href="#treemapSliceDice">#</a> d3.<b>treemapSliceDice</b>(<i>node</i>, <i>x0</i>, <i>y0</i>, <i>x1</i>, <i>y1</i>) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/treemap/sliceDice.js), [Examples](https://observablehq.com/@d3/treemap) - -If the specified *node* has odd depth, delegates to [treemapSlice](#treemapSlice); otherwise delegates to [treemapDice](#treemapDice). - -<a name="treemapSquarify" href="#treemapSquarify">#</a> d3.<b>treemapSquarify</b>(<i>node</i>, <i>x0</i>, <i>y0</i>, <i>x1</i>, <i>y1</i>) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/treemap/squarify.js), [Examples](https://observablehq.com/@d3/treemap) - -Implements the [squarified treemap](https://www.win.tue.nl/~vanwijk/stm.pdf) algorithm by Bruls *et al.*, which seeks to produce rectangles of a given [aspect ratio](#squarify_ratio). - -<a name="treemapResquarify" href="#treemapResquarify">#</a> d3.<b>treemapResquarify</b>(<i>node</i>, <i>x0</i>, <i>y0</i>, <i>x1</i>, <i>y1</i>) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/treemap/resquarify.js), [Examples](https://observablehq.com/@d3/animated-treemap) - -Like [d3.treemapSquarify](#treemapSquarify), except preserves the topology (node adjacencies) of the previous layout computed by d3.treemapResquarify, if there is one and it used the same [target aspect ratio](#squarify_ratio). This tiling method is good for animating changes to treemaps because it only changes node sizes and not their relative positions, thus avoiding distracting shuffling and occlusion. The downside of a stable update, however, is a suboptimal layout for subsequent updates: only the first layout uses the Bruls *et al.* squarified algorithm. - -<a name="squarify_ratio" href="#squarify_ratio">#</a> <i>squarify</i>.<b>ratio</b>(<i>ratio</i>) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/treemap/squarify.js), [Examples](https://observablehq.com/@d3/treemap) - -Specifies the desired aspect ratio of the generated rectangles. The *ratio* must be specified as a number greater than or equal to one. Note that the orientation of the generated rectangles (tall or wide) is not implied by the ratio; for example, a ratio of two will attempt to produce a mixture of rectangles whose *width*:*height* ratio is either 2:1 or 1:2. (However, you can approximately achieve this result by generating a square treemap at different dimensions, and then [stretching the treemap](https://observablehq.com/@d3/stretched-treemap) to the desired aspect ratio.) Furthermore, the specified *ratio* is merely a hint to the tiling algorithm; the rectangles are not guaranteed to have the specified aspect ratio. If not specified, the aspect ratio defaults to the golden ratio, φ = (1 + sqrt(5)) / 2, per [Kong *et al.*](http://vis.stanford.edu/papers/perception-treemaps) - -### Partition - -[<img alt="Partition" src="https://raw.githubusercontent.com/d3/d3-hierarchy/master/img/partition.png">](https://observablehq.com/@d3/icicle) - -The **partition layout** produces adjacency diagrams: a space-filling variant of a node-link tree diagram. Rather than drawing a link between parent and child in the hierarchy, nodes are drawn as solid areas (either arcs or rectangles), and their placement relative to other nodes reveals their position in the hierarchy. The size of the nodes encodes a quantitative dimension that would be difficult to show in a node-link diagram. - -<a name="partition" href="#partition">#</a> d3.<b>partition</b>() · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/partition.js), [Examples](https://observablehq.com/@d3/icicle) - -Creates a new partition layout with the default settings. - -<a name="_partition" href="#_partition">#</a> <i>partition</i>(<i>root</i>) - -Lays out the specified *root* [hierarchy](#hierarchy), assigning the following properties on *root* and its descendants: - -* *node*.x0 - the left edge of the rectangle -* *node*.y0 - the top edge of the rectangle -* *node*.x1 - the right edge of the rectangle -* *node*.y1 - the bottom edge of the rectangle - -You must call [*root*.sum](#node_sum) before passing the hierarchy to the partition layout. You probably also want to call [*root*.sort](#node_sort) to order the hierarchy before computing the layout. - -<a name="partition_size" href="#partition_size">#</a> <i>partition</i>.<b>size</b>([<i>size</i>]) - -If *size* is specified, sets this partition layout’s size to the specified two-element array of numbers [*width*, *height*] and returns this partition layout. If *size* is not specified, returns the current size, which defaults to [1, 1]. - -<a name="partition_round" href="#partition_round">#</a> <i>partition</i>.<b>round</b>([<i>round</i>]) - -If *round* is specified, enables or disables rounding according to the given boolean and returns this partition layout. If *round* is not specified, returns the current rounding state, which defaults to false. - -<a name="partition_padding" href="#partition_padding">#</a> <i>partition</i>.<b>padding</b>([<i>padding</i>]) - -If *padding* is specified, sets the padding to the specified number and returns this partition layout. If *padding* is not specified, returns the current padding, which defaults to zero. The padding is used to separate a node’s adjacent children. - -### Pack - -[<img alt="Circle-Packing" src="https://raw.githubusercontent.com/d3/d3-hierarchy/master/img/pack.png">](https://observablehq.com/@d3/circle-packing) - -Enclosure diagrams use containment (nesting) to represent a hierarchy. The size of the leaf circles encodes a quantitative dimension of the data. The enclosing circles show the approximate cumulative size of each subtree, but due to wasted space there is some distortion; only the leaf nodes can be compared accurately. Although [circle packing](http://en.wikipedia.org/wiki/Circle_packing) does not use space as efficiently as a [treemap](#treemap), the “wasted†space more prominently reveals the hierarchical structure. - -<a name="pack" href="#pack">#</a> d3.<b>pack</b>() · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/pack/index.js), [Examples](https://observablehq.com/@d3/circle-packing) - -Creates a new pack layout with the default settings. - -<a name="_pack" href="#_pack">#</a> <i>pack</i>(<i>root</i>) - -Lays out the specified *root* [hierarchy](#hierarchy), assigning the following properties on *root* and its descendants: - -* *node*.x - the *x*-coordinate of the circle’s center -* *node*.y - the *y*-coordinate of the circle’s center -* *node*.r - the radius of the circle - -You must call [*root*.sum](#node_sum) before passing the hierarchy to the pack layout. You probably also want to call [*root*.sort](#node_sort) to order the hierarchy before computing the layout. - -<a name="pack_radius" href="#pack_radius">#</a> <i>pack</i>.<b>radius</b>([<i>radius</i>]) - -If *radius* is specified, sets the pack layout’s radius accessor to the specified function and returns this pack layout. If *radius* is not specified, returns the current radius accessor, which defaults to null. If the radius accessor is null, the radius of each leaf circle is derived from the leaf *node*.value (computed by [*node*.sum](#node_sum)); the radii are then scaled proportionally to fit the [layout size](#pack_size). If the radius accessor is not null, the radius of each leaf circle is specified exactly by the function. - -<a name="pack_size" href="#pack_size">#</a> <i>pack</i>.<b>size</b>([<i>size</i>]) - -If *size* is specified, sets this pack layout’s size to the specified two-element array of numbers [*width*, *height*] and returns this pack layout. If *size* is not specified, returns the current size, which defaults to [1, 1]. - -<a name="pack_padding" href="#pack_padding">#</a> <i>pack</i>.<b>padding</b>([<i>padding</i>]) - -If *padding* is specified, sets this pack layout’s padding accessor to the specified number or function and returns this pack layout. If *padding* is not specified, returns the current padding accessor, which defaults to the constant zero. When siblings are packed, tangent siblings will be separated by approximately the specified padding; the enclosing parent circle will also be separated from its children by approximately the specified padding. If an [explicit radius](#pack_radius) is not specified, the padding is approximate because a two-pass algorithm is needed to fit within the [layout size](#pack_size): the circles are first packed without padding; a scaling factor is computed and applied to the specified padding; and lastly the circles are re-packed with padding. - -<a name="packSiblings" href="#packSiblings">#</a> d3.<b>packSiblings</b>(<i>circles</i>) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/pack/siblings.js) - -Packs the specified array of *circles*, each of which must have a *circle*.r property specifying the circle’s radius. Assigns the following properties to each circle: - -* *circle*.x - the *x*-coordinate of the circle’s center -* *circle*.y - the *y*-coordinate of the circle’s center - -The circles are positioned according to the front-chain packing algorithm by [Wang *et al.*](https://dl.acm.org/citation.cfm?id=1124851) - -<a name="packEnclose" href="#packEnclose">#</a> d3.<b>packEnclose</b>(<i>circles</i>) · [Source](https://github.com/d3/d3-hierarchy/blob/master/src/pack/enclose.js), [Examples](https://observablehq.com/@d3/d3-packenclose) - -Computes the [smallest circle](https://en.wikipedia.org/wiki/Smallest-circle_problem) that encloses the specified array of *circles*, each of which must have a *circle*.r property specifying the circle’s radius, and *circle*.x and *circle*.y properties specifying the circle’s center. The enclosing circle is computed using the [MatouÅ¡ek-Sharir-Welzl algorithm](http://www.inf.ethz.ch/personal/emo/PublFiles/SubexLinProg_ALG16_96.pdf). (See also [Apollonius’ Problem](https://bl.ocks.org/mbostock/751fdd637f4bc2e3f08b).) diff --git a/node_modules/d3-hierarchy/dist/d3-hierarchy.js b/node_modules/d3-hierarchy/dist/d3-hierarchy.js deleted file mode 100644 index 83d6212b31962250ad9cf6927d97af857c18f881..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/dist/d3-hierarchy.js +++ /dev/null @@ -1,1324 +0,0 @@ -// https://d3js.org/d3-hierarchy/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {})); -}(this, function (exports) { 'use strict'; - -function defaultSeparation(a, b) { - return a.parent === b.parent ? 1 : 2; -} - -function meanX(children) { - return children.reduce(meanXReduce, 0) / children.length; -} - -function meanXReduce(x, c) { - return x + c.x; -} - -function maxY(children) { - return 1 + children.reduce(maxYReduce, 0); -} - -function maxYReduce(y, c) { - return Math.max(y, c.y); -} - -function leafLeft(node) { - var children; - while (children = node.children) node = children[0]; - return node; -} - -function leafRight(node) { - var children; - while (children = node.children) node = children[children.length - 1]; - return node; -} - -function cluster() { - var separation = defaultSeparation, - dx = 1, - dy = 1, - nodeSize = false; - - function cluster(root) { - var previousNode, - x = 0; - - // First walk, computing the initial x & y values. - root.eachAfter(function(node) { - var children = node.children; - if (children) { - node.x = meanX(children); - node.y = maxY(children); - } else { - node.x = previousNode ? x += separation(node, previousNode) : 0; - node.y = 0; - previousNode = node; - } - }); - - var left = leafLeft(root), - right = leafRight(root), - x0 = left.x - separation(left, right) / 2, - x1 = right.x + separation(right, left) / 2; - - // Second walk, normalizing x & y to the desired size. - return root.eachAfter(nodeSize ? function(node) { - node.x = (node.x - root.x) * dx; - node.y = (root.y - node.y) * dy; - } : function(node) { - node.x = (node.x - x0) / (x1 - x0) * dx; - node.y = (1 - (root.y ? node.y / root.y : 1)) * dy; - }); - } - - cluster.separation = function(x) { - return arguments.length ? (separation = x, cluster) : separation; - }; - - cluster.size = function(x) { - return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]); - }; - - cluster.nodeSize = function(x) { - return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null); - }; - - return cluster; -} - -function count(node) { - var sum = 0, - children = node.children, - i = children && children.length; - if (!i) sum = 1; - else while (--i >= 0) sum += children[i].value; - node.value = sum; -} - -function node_count() { - return this.eachAfter(count); -} - -function node_each(callback, that) { - let index = -1; - for (const node of this) { - callback.call(that, node, ++index, this); - } - return this; -} - -function node_eachBefore(callback, that) { - var node = this, nodes = [node], children, i, index = -1; - while (node = nodes.pop()) { - callback.call(that, node, ++index, this); - if (children = node.children) { - for (i = children.length - 1; i >= 0; --i) { - nodes.push(children[i]); - } - } - } - return this; -} - -function node_eachAfter(callback, that) { - var node = this, nodes = [node], next = [], children, i, n, index = -1; - while (node = nodes.pop()) { - next.push(node); - if (children = node.children) { - for (i = 0, n = children.length; i < n; ++i) { - nodes.push(children[i]); - } - } - } - while (node = next.pop()) { - callback.call(that, node, ++index, this); - } - return this; -} - -function node_find(callback, that) { - let index = -1; - for (const node of this) { - if (callback.call(that, node, ++index, this)) { - return node; - } - } -} - -function node_sum(value) { - return this.eachAfter(function(node) { - var sum = +value(node.data) || 0, - children = node.children, - i = children && children.length; - while (--i >= 0) sum += children[i].value; - node.value = sum; - }); -} - -function node_sort(compare) { - return this.eachBefore(function(node) { - if (node.children) { - node.children.sort(compare); - } - }); -} - -function node_path(end) { - var start = this, - ancestor = leastCommonAncestor(start, end), - nodes = [start]; - while (start !== ancestor) { - start = start.parent; - nodes.push(start); - } - var k = nodes.length; - while (end !== ancestor) { - nodes.splice(k, 0, end); - end = end.parent; - } - return nodes; -} - -function leastCommonAncestor(a, b) { - if (a === b) return a; - var aNodes = a.ancestors(), - bNodes = b.ancestors(), - c = null; - a = aNodes.pop(); - b = bNodes.pop(); - while (a === b) { - c = a; - a = aNodes.pop(); - b = bNodes.pop(); - } - return c; -} - -function node_ancestors() { - var node = this, nodes = [node]; - while (node = node.parent) { - nodes.push(node); - } - return nodes; -} - -function node_descendants() { - return Array.from(this); -} - -function node_leaves() { - var leaves = []; - this.eachBefore(function(node) { - if (!node.children) { - leaves.push(node); - } - }); - return leaves; -} - -function node_links() { - var root = this, links = []; - root.each(function(node) { - if (node !== root) { // Don’t include the root’s parent, if any. - links.push({source: node.parent, target: node}); - } - }); - return links; -} - -function* node_iterator() { - var node = this, current, next = [node], children, i, n; - do { - current = next.reverse(), next = []; - while (node = current.pop()) { - yield node; - if (children = node.children) { - for (i = 0, n = children.length; i < n; ++i) { - next.push(children[i]); - } - } - } - } while (next.length); -} - -function hierarchy(data, children) { - if (data instanceof Map) { - data = [undefined, data]; - if (children === undefined) children = mapChildren; - } else if (children === undefined) { - children = objectChildren; - } - - var root = new Node(data), - node, - nodes = [root], - child, - childs, - i, - n; - - while (node = nodes.pop()) { - if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) { - node.children = childs; - for (i = n - 1; i >= 0; --i) { - nodes.push(child = childs[i] = new Node(childs[i])); - child.parent = node; - child.depth = node.depth + 1; - } - } - } - - return root.eachBefore(computeHeight); -} - -function node_copy() { - return hierarchy(this).eachBefore(copyData); -} - -function objectChildren(d) { - return d.children; -} - -function mapChildren(d) { - return Array.isArray(d) ? d[1] : null; -} - -function copyData(node) { - if (node.data.value !== undefined) node.value = node.data.value; - node.data = node.data.data; -} - -function computeHeight(node) { - var height = 0; - do node.height = height; - while ((node = node.parent) && (node.height < ++height)); -} - -function Node(data) { - this.data = data; - this.depth = - this.height = 0; - this.parent = null; -} - -Node.prototype = hierarchy.prototype = { - constructor: Node, - count: node_count, - each: node_each, - eachAfter: node_eachAfter, - eachBefore: node_eachBefore, - find: node_find, - sum: node_sum, - sort: node_sort, - path: node_path, - ancestors: node_ancestors, - descendants: node_descendants, - leaves: node_leaves, - links: node_links, - copy: node_copy, - [Symbol.iterator]: node_iterator -}; - -function array(x) { - return typeof x === "object" && "length" in x - ? x // Array, TypedArray, NodeList, array-like - : Array.from(x); // Map, Set, iterable, string, or anything else -} - -function shuffle(array) { - var m = array.length, - t, - i; - - while (m) { - i = Math.random() * m-- | 0; - t = array[m]; - array[m] = array[i]; - array[i] = t; - } - - return array; -} - -function enclose(circles) { - var i = 0, n = (circles = shuffle(Array.from(circles))).length, B = [], p, e; - - while (i < n) { - p = circles[i]; - if (e && enclosesWeak(e, p)) ++i; - else e = encloseBasis(B = extendBasis(B, p)), i = 0; - } - - return e; -} - -function extendBasis(B, p) { - var i, j; - - if (enclosesWeakAll(p, B)) return [p]; - - // If we get here then B must have at least one element. - for (i = 0; i < B.length; ++i) { - if (enclosesNot(p, B[i]) - && enclosesWeakAll(encloseBasis2(B[i], p), B)) { - return [B[i], p]; - } - } - - // If we get here then B must have at least two elements. - for (i = 0; i < B.length - 1; ++i) { - for (j = i + 1; j < B.length; ++j) { - if (enclosesNot(encloseBasis2(B[i], B[j]), p) - && enclosesNot(encloseBasis2(B[i], p), B[j]) - && enclosesNot(encloseBasis2(B[j], p), B[i]) - && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) { - return [B[i], B[j], p]; - } - } - } - - // If we get here then something is very wrong. - throw new Error; -} - -function enclosesNot(a, b) { - var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y; - return dr < 0 || dr * dr < dx * dx + dy * dy; -} - -function enclosesWeak(a, b) { - var dr = a.r - b.r + Math.max(a.r, b.r, 1) * 1e-9, dx = b.x - a.x, dy = b.y - a.y; - return dr > 0 && dr * dr > dx * dx + dy * dy; -} - -function enclosesWeakAll(a, B) { - for (var i = 0; i < B.length; ++i) { - if (!enclosesWeak(a, B[i])) { - return false; - } - } - return true; -} - -function encloseBasis(B) { - switch (B.length) { - case 1: return encloseBasis1(B[0]); - case 2: return encloseBasis2(B[0], B[1]); - case 3: return encloseBasis3(B[0], B[1], B[2]); - } -} - -function encloseBasis1(a) { - return { - x: a.x, - y: a.y, - r: a.r - }; -} - -function encloseBasis2(a, b) { - var x1 = a.x, y1 = a.y, r1 = a.r, - x2 = b.x, y2 = b.y, r2 = b.r, - x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1, - l = Math.sqrt(x21 * x21 + y21 * y21); - return { - x: (x1 + x2 + x21 / l * r21) / 2, - y: (y1 + y2 + y21 / l * r21) / 2, - r: (l + r1 + r2) / 2 - }; -} - -function encloseBasis3(a, b, c) { - var x1 = a.x, y1 = a.y, r1 = a.r, - x2 = b.x, y2 = b.y, r2 = b.r, - x3 = c.x, y3 = c.y, r3 = c.r, - a2 = x1 - x2, - a3 = x1 - x3, - b2 = y1 - y2, - b3 = y1 - y3, - c2 = r2 - r1, - c3 = r3 - r1, - d1 = x1 * x1 + y1 * y1 - r1 * r1, - d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2, - d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3, - ab = a3 * b2 - a2 * b3, - xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1, - xb = (b3 * c2 - b2 * c3) / ab, - ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1, - yb = (a2 * c3 - a3 * c2) / ab, - A = xb * xb + yb * yb - 1, - B = 2 * (r1 + xa * xb + ya * yb), - C = xa * xa + ya * ya - r1 * r1, - r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B); - return { - x: x1 + xa + xb * r, - y: y1 + ya + yb * r, - r: r - }; -} - -function place(b, a, c) { - var dx = b.x - a.x, x, a2, - dy = b.y - a.y, y, b2, - d2 = dx * dx + dy * dy; - if (d2) { - a2 = a.r + c.r, a2 *= a2; - b2 = b.r + c.r, b2 *= b2; - if (a2 > b2) { - x = (d2 + b2 - a2) / (2 * d2); - y = Math.sqrt(Math.max(0, b2 / d2 - x * x)); - c.x = b.x - x * dx - y * dy; - c.y = b.y - x * dy + y * dx; - } else { - x = (d2 + a2 - b2) / (2 * d2); - y = Math.sqrt(Math.max(0, a2 / d2 - x * x)); - c.x = a.x + x * dx - y * dy; - c.y = a.y + x * dy + y * dx; - } - } else { - c.x = a.x + c.r; - c.y = a.y; - } -} - -function intersects(a, b) { - var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y; - return dr > 0 && dr * dr > dx * dx + dy * dy; -} - -function score(node) { - var a = node._, - b = node.next._, - ab = a.r + b.r, - dx = (a.x * b.r + b.x * a.r) / ab, - dy = (a.y * b.r + b.y * a.r) / ab; - return dx * dx + dy * dy; -} - -function Node$1(circle) { - this._ = circle; - this.next = null; - this.previous = null; -} - -function packEnclose(circles) { - if (!(n = (circles = array(circles)).length)) return 0; - - var a, b, c, n, aa, ca, i, j, k, sj, sk; - - // Place the first circle. - a = circles[0], a.x = 0, a.y = 0; - if (!(n > 1)) return a.r; - - // Place the second circle. - b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0; - if (!(n > 2)) return a.r + b.r; - - // Place the third circle. - place(b, a, c = circles[2]); - - // Initialize the front-chain using the first three circles a, b and c. - a = new Node$1(a), b = new Node$1(b), c = new Node$1(c); - a.next = c.previous = b; - b.next = a.previous = c; - c.next = b.previous = a; - - // Attempt to place each remaining circle… - pack: for (i = 3; i < n; ++i) { - place(a._, b._, c = circles[i]), c = new Node$1(c); - - // Find the closest intersecting circle on the front-chain, if any. - // “Closeness†is determined by linear distance along the front-chain. - // “Ahead†or “behind†is likewise determined by linear distance. - j = b.next, k = a.previous, sj = b._.r, sk = a._.r; - do { - if (sj <= sk) { - if (intersects(j._, c._)) { - b = j, a.next = b, b.previous = a, --i; - continue pack; - } - sj += j._.r, j = j.next; - } else { - if (intersects(k._, c._)) { - a = k, a.next = b, b.previous = a, --i; - continue pack; - } - sk += k._.r, k = k.previous; - } - } while (j !== k.next); - - // Success! Insert the new circle c between a and b. - c.previous = a, c.next = b, a.next = b.previous = b = c; - - // Compute the new closest circle pair to the centroid. - aa = score(a); - while ((c = c.next) !== b) { - if ((ca = score(c)) < aa) { - a = c, aa = ca; - } - } - b = a.next; - } - - // Compute the enclosing circle of the front chain. - a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = enclose(a); - - // Translate the circles to put the enclosing circle around the origin. - for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y; - - return c.r; -} - -function siblings(circles) { - packEnclose(circles); - return circles; -} - -function optional(f) { - return f == null ? null : required(f); -} - -function required(f) { - if (typeof f !== "function") throw new Error; - return f; -} - -function constantZero() { - return 0; -} - -function constant(x) { - return function() { - return x; - }; -} - -function defaultRadius(d) { - return Math.sqrt(d.value); -} - -function index() { - var radius = null, - dx = 1, - dy = 1, - padding = constantZero; - - function pack(root) { - root.x = dx / 2, root.y = dy / 2; - if (radius) { - root.eachBefore(radiusLeaf(radius)) - .eachAfter(packChildren(padding, 0.5)) - .eachBefore(translateChild(1)); - } else { - root.eachBefore(radiusLeaf(defaultRadius)) - .eachAfter(packChildren(constantZero, 1)) - .eachAfter(packChildren(padding, root.r / Math.min(dx, dy))) - .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r))); - } - return root; - } - - pack.radius = function(x) { - return arguments.length ? (radius = optional(x), pack) : radius; - }; - - pack.size = function(x) { - return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy]; - }; - - pack.padding = function(x) { - return arguments.length ? (padding = typeof x === "function" ? x : constant(+x), pack) : padding; - }; - - return pack; -} - -function radiusLeaf(radius) { - return function(node) { - if (!node.children) { - node.r = Math.max(0, +radius(node) || 0); - } - }; -} - -function packChildren(padding, k) { - return function(node) { - if (children = node.children) { - var children, - i, - n = children.length, - r = padding(node) * k || 0, - e; - - if (r) for (i = 0; i < n; ++i) children[i].r += r; - e = packEnclose(children); - if (r) for (i = 0; i < n; ++i) children[i].r -= r; - node.r = e + r; - } - }; -} - -function translateChild(k) { - return function(node) { - var parent = node.parent; - node.r *= k; - if (parent) { - node.x = parent.x + k * node.x; - node.y = parent.y + k * node.y; - } - }; -} - -function roundNode(node) { - node.x0 = Math.round(node.x0); - node.y0 = Math.round(node.y0); - node.x1 = Math.round(node.x1); - node.y1 = Math.round(node.y1); -} - -function treemapDice(parent, x0, y0, x1, y1) { - var nodes = parent.children, - node, - i = -1, - n = nodes.length, - k = parent.value && (x1 - x0) / parent.value; - - while (++i < n) { - node = nodes[i], node.y0 = y0, node.y1 = y1; - node.x0 = x0, node.x1 = x0 += node.value * k; - } -} - -function partition() { - var dx = 1, - dy = 1, - padding = 0, - round = false; - - function partition(root) { - var n = root.height + 1; - root.x0 = - root.y0 = padding; - root.x1 = dx; - root.y1 = dy / n; - root.eachBefore(positionNode(dy, n)); - if (round) root.eachBefore(roundNode); - return root; - } - - function positionNode(dy, n) { - return function(node) { - if (node.children) { - treemapDice(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n); - } - var x0 = node.x0, - y0 = node.y0, - x1 = node.x1 - padding, - y1 = node.y1 - padding; - if (x1 < x0) x0 = x1 = (x0 + x1) / 2; - if (y1 < y0) y0 = y1 = (y0 + y1) / 2; - node.x0 = x0; - node.y0 = y0; - node.x1 = x1; - node.y1 = y1; - }; - } - - partition.round = function(x) { - return arguments.length ? (round = !!x, partition) : round; - }; - - partition.size = function(x) { - return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy]; - }; - - partition.padding = function(x) { - return arguments.length ? (padding = +x, partition) : padding; - }; - - return partition; -} - -var preroot = {depth: -1}, - ambiguous = {}; - -function defaultId(d) { - return d.id; -} - -function defaultParentId(d) { - return d.parentId; -} - -function stratify() { - var id = defaultId, - parentId = defaultParentId; - - function stratify(data) { - var nodes = Array.from(data), - n = nodes.length, - d, - i, - root, - parent, - node, - nodeId, - nodeKey, - nodeByKey = new Map; - - for (i = 0; i < n; ++i) { - d = nodes[i], node = nodes[i] = new Node(d); - if ((nodeId = id(d, i, data)) != null && (nodeId += "")) { - nodeKey = node.id = nodeId; - nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node); - } - if ((nodeId = parentId(d, i, data)) != null && (nodeId += "")) { - node.parent = nodeId; - } - } - - for (i = 0; i < n; ++i) { - node = nodes[i]; - if (nodeId = node.parent) { - parent = nodeByKey.get(nodeId); - if (!parent) throw new Error("missing: " + nodeId); - if (parent === ambiguous) throw new Error("ambiguous: " + nodeId); - if (parent.children) parent.children.push(node); - else parent.children = [node]; - node.parent = parent; - } else { - if (root) throw new Error("multiple roots"); - root = node; - } - } - - if (!root) throw new Error("no root"); - root.parent = preroot; - root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight); - root.parent = null; - if (n > 0) throw new Error("cycle"); - - return root; - } - - stratify.id = function(x) { - return arguments.length ? (id = required(x), stratify) : id; - }; - - stratify.parentId = function(x) { - return arguments.length ? (parentId = required(x), stratify) : parentId; - }; - - return stratify; -} - -function defaultSeparation$1(a, b) { - return a.parent === b.parent ? 1 : 2; -} - -// function radialSeparation(a, b) { -// return (a.parent === b.parent ? 1 : 2) / a.depth; -// } - -// This function is used to traverse the left contour of a subtree (or -// subforest). It returns the successor of v on this contour. This successor is -// either given by the leftmost child of v or by the thread of v. The function -// returns null if and only if v is on the highest level of its subtree. -function nextLeft(v) { - var children = v.children; - return children ? children[0] : v.t; -} - -// This function works analogously to nextLeft. -function nextRight(v) { - var children = v.children; - return children ? children[children.length - 1] : v.t; -} - -// Shifts the current subtree rooted at w+. This is done by increasing -// prelim(w+) and mod(w+) by shift. -function moveSubtree(wm, wp, shift) { - var change = shift / (wp.i - wm.i); - wp.c -= change; - wp.s += shift; - wm.c += change; - wp.z += shift; - wp.m += shift; -} - -// All other shifts, applied to the smaller subtrees between w- and w+, are -// performed by this function. To prepare the shifts, we have to adjust -// change(w+), shift(w+), and change(w-). -function executeShifts(v) { - var shift = 0, - change = 0, - children = v.children, - i = children.length, - w; - while (--i >= 0) { - w = children[i]; - w.z += shift; - w.m += shift; - shift += w.s + (change += w.c); - } -} - -// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise, -// returns the specified (default) ancestor. -function nextAncestor(vim, v, ancestor) { - return vim.a.parent === v.parent ? vim.a : ancestor; -} - -function TreeNode(node, i) { - this._ = node; - this.parent = null; - this.children = null; - this.A = null; // default ancestor - this.a = this; // ancestor - this.z = 0; // prelim - this.m = 0; // mod - this.c = 0; // change - this.s = 0; // shift - this.t = null; // thread - this.i = i; // number -} - -TreeNode.prototype = Object.create(Node.prototype); - -function treeRoot(root) { - var tree = new TreeNode(root, 0), - node, - nodes = [tree], - child, - children, - i, - n; - - while (node = nodes.pop()) { - if (children = node._.children) { - node.children = new Array(n = children.length); - for (i = n - 1; i >= 0; --i) { - nodes.push(child = node.children[i] = new TreeNode(children[i], i)); - child.parent = node; - } - } - } - - (tree.parent = new TreeNode(null, 0)).children = [tree]; - return tree; -} - -// Node-link tree diagram using the Reingold-Tilford "tidy" algorithm -function tree() { - var separation = defaultSeparation$1, - dx = 1, - dy = 1, - nodeSize = null; - - function tree(root) { - var t = treeRoot(root); - - // Compute the layout using Buchheim et al.’s algorithm. - t.eachAfter(firstWalk), t.parent.m = -t.z; - t.eachBefore(secondWalk); - - // If a fixed node size is specified, scale x and y. - if (nodeSize) root.eachBefore(sizeNode); - - // If a fixed tree size is specified, scale x and y based on the extent. - // Compute the left-most, right-most, and depth-most nodes for extents. - else { - var left = root, - right = root, - bottom = root; - root.eachBefore(function(node) { - if (node.x < left.x) left = node; - if (node.x > right.x) right = node; - if (node.depth > bottom.depth) bottom = node; - }); - var s = left === right ? 1 : separation(left, right) / 2, - tx = s - left.x, - kx = dx / (right.x + s + tx), - ky = dy / (bottom.depth || 1); - root.eachBefore(function(node) { - node.x = (node.x + tx) * kx; - node.y = node.depth * ky; - }); - } - - return root; - } - - // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is - // applied recursively to the children of v, as well as the function - // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the - // node v is placed to the midpoint of its outermost children. - function firstWalk(v) { - var children = v.children, - siblings = v.parent.children, - w = v.i ? siblings[v.i - 1] : null; - if (children) { - executeShifts(v); - var midpoint = (children[0].z + children[children.length - 1].z) / 2; - if (w) { - v.z = w.z + separation(v._, w._); - v.m = v.z - midpoint; - } else { - v.z = midpoint; - } - } else if (w) { - v.z = w.z + separation(v._, w._); - } - v.parent.A = apportion(v, w, v.parent.A || siblings[0]); - } - - // Computes all real x-coordinates by summing up the modifiers recursively. - function secondWalk(v) { - v._.x = v.z + v.parent.m; - v.m += v.parent.m; - } - - // The core of the algorithm. Here, a new subtree is combined with the - // previous subtrees. Threads are used to traverse the inside and outside - // contours of the left and right subtree up to the highest common level. The - // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the - // superscript o means outside and i means inside, the subscript - means left - // subtree and + means right subtree. For summing up the modifiers along the - // contour, we use respective variables si+, si-, so-, and so+. Whenever two - // nodes of the inside contours conflict, we compute the left one of the - // greatest uncommon ancestors using the function ANCESTOR and call MOVE - // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees. - // Finally, we add a new thread (if necessary). - function apportion(v, w, ancestor) { - if (w) { - var vip = v, - vop = v, - vim = w, - vom = vip.parent.children[0], - sip = vip.m, - sop = vop.m, - sim = vim.m, - som = vom.m, - shift; - while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) { - vom = nextLeft(vom); - vop = nextRight(vop); - vop.a = v; - shift = vim.z + sim - vip.z - sip + separation(vim._, vip._); - if (shift > 0) { - moveSubtree(nextAncestor(vim, v, ancestor), v, shift); - sip += shift; - sop += shift; - } - sim += vim.m; - sip += vip.m; - som += vom.m; - sop += vop.m; - } - if (vim && !nextRight(vop)) { - vop.t = vim; - vop.m += sim - sop; - } - if (vip && !nextLeft(vom)) { - vom.t = vip; - vom.m += sip - som; - ancestor = v; - } - } - return ancestor; - } - - function sizeNode(node) { - node.x *= dx; - node.y = node.depth * dy; - } - - tree.separation = function(x) { - return arguments.length ? (separation = x, tree) : separation; - }; - - tree.size = function(x) { - return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]); - }; - - tree.nodeSize = function(x) { - return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null); - }; - - return tree; -} - -function treemapSlice(parent, x0, y0, x1, y1) { - var nodes = parent.children, - node, - i = -1, - n = nodes.length, - k = parent.value && (y1 - y0) / parent.value; - - while (++i < n) { - node = nodes[i], node.x0 = x0, node.x1 = x1; - node.y0 = y0, node.y1 = y0 += node.value * k; - } -} - -var phi = (1 + Math.sqrt(5)) / 2; - -function squarifyRatio(ratio, parent, x0, y0, x1, y1) { - var rows = [], - nodes = parent.children, - row, - nodeValue, - i0 = 0, - i1 = 0, - n = nodes.length, - dx, dy, - value = parent.value, - sumValue, - minValue, - maxValue, - newRatio, - minRatio, - alpha, - beta; - - while (i0 < n) { - dx = x1 - x0, dy = y1 - y0; - - // Find the next non-empty node. - do sumValue = nodes[i1++].value; while (!sumValue && i1 < n); - minValue = maxValue = sumValue; - alpha = Math.max(dy / dx, dx / dy) / (value * ratio); - beta = sumValue * sumValue * alpha; - minRatio = Math.max(maxValue / beta, beta / minValue); - - // Keep adding nodes while the aspect ratio maintains or improves. - for (; i1 < n; ++i1) { - sumValue += nodeValue = nodes[i1].value; - if (nodeValue < minValue) minValue = nodeValue; - if (nodeValue > maxValue) maxValue = nodeValue; - beta = sumValue * sumValue * alpha; - newRatio = Math.max(maxValue / beta, beta / minValue); - if (newRatio > minRatio) { sumValue -= nodeValue; break; } - minRatio = newRatio; - } - - // Position and record the row orientation. - rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)}); - if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1); - else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1); - value -= sumValue, i0 = i1; - } - - return rows; -} - -var squarify = (function custom(ratio) { - - function squarify(parent, x0, y0, x1, y1) { - squarifyRatio(ratio, parent, x0, y0, x1, y1); - } - - squarify.ratio = function(x) { - return custom((x = +x) > 1 ? x : 1); - }; - - return squarify; -})(phi); - -function index$1() { - var tile = squarify, - round = false, - dx = 1, - dy = 1, - paddingStack = [0], - paddingInner = constantZero, - paddingTop = constantZero, - paddingRight = constantZero, - paddingBottom = constantZero, - paddingLeft = constantZero; - - function treemap(root) { - root.x0 = - root.y0 = 0; - root.x1 = dx; - root.y1 = dy; - root.eachBefore(positionNode); - paddingStack = [0]; - if (round) root.eachBefore(roundNode); - return root; - } - - function positionNode(node) { - var p = paddingStack[node.depth], - x0 = node.x0 + p, - y0 = node.y0 + p, - x1 = node.x1 - p, - y1 = node.y1 - p; - if (x1 < x0) x0 = x1 = (x0 + x1) / 2; - if (y1 < y0) y0 = y1 = (y0 + y1) / 2; - node.x0 = x0; - node.y0 = y0; - node.x1 = x1; - node.y1 = y1; - if (node.children) { - p = paddingStack[node.depth + 1] = paddingInner(node) / 2; - x0 += paddingLeft(node) - p; - y0 += paddingTop(node) - p; - x1 -= paddingRight(node) - p; - y1 -= paddingBottom(node) - p; - if (x1 < x0) x0 = x1 = (x0 + x1) / 2; - if (y1 < y0) y0 = y1 = (y0 + y1) / 2; - tile(node, x0, y0, x1, y1); - } - } - - treemap.round = function(x) { - return arguments.length ? (round = !!x, treemap) : round; - }; - - treemap.size = function(x) { - return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy]; - }; - - treemap.tile = function(x) { - return arguments.length ? (tile = required(x), treemap) : tile; - }; - - treemap.padding = function(x) { - return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner(); - }; - - treemap.paddingInner = function(x) { - return arguments.length ? (paddingInner = typeof x === "function" ? x : constant(+x), treemap) : paddingInner; - }; - - treemap.paddingOuter = function(x) { - return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop(); - }; - - treemap.paddingTop = function(x) { - return arguments.length ? (paddingTop = typeof x === "function" ? x : constant(+x), treemap) : paddingTop; - }; - - treemap.paddingRight = function(x) { - return arguments.length ? (paddingRight = typeof x === "function" ? x : constant(+x), treemap) : paddingRight; - }; - - treemap.paddingBottom = function(x) { - return arguments.length ? (paddingBottom = typeof x === "function" ? x : constant(+x), treemap) : paddingBottom; - }; - - treemap.paddingLeft = function(x) { - return arguments.length ? (paddingLeft = typeof x === "function" ? x : constant(+x), treemap) : paddingLeft; - }; - - return treemap; -} - -function binary(parent, x0, y0, x1, y1) { - var nodes = parent.children, - i, n = nodes.length, - sum, sums = new Array(n + 1); - - for (sums[0] = sum = i = 0; i < n; ++i) { - sums[i + 1] = sum += nodes[i].value; - } - - partition(0, n, parent.value, x0, y0, x1, y1); - - function partition(i, j, value, x0, y0, x1, y1) { - if (i >= j - 1) { - var node = nodes[i]; - node.x0 = x0, node.y0 = y0; - node.x1 = x1, node.y1 = y1; - return; - } - - var valueOffset = sums[i], - valueTarget = (value / 2) + valueOffset, - k = i + 1, - hi = j - 1; - - while (k < hi) { - var mid = k + hi >>> 1; - if (sums[mid] < valueTarget) k = mid + 1; - else hi = mid; - } - - if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k; - - var valueLeft = sums[k] - valueOffset, - valueRight = value - valueLeft; - - if ((x1 - x0) > (y1 - y0)) { - var xk = value ? (x0 * valueRight + x1 * valueLeft) / value : x1; - partition(i, k, valueLeft, x0, y0, xk, y1); - partition(k, j, valueRight, xk, y0, x1, y1); - } else { - var yk = value ? (y0 * valueRight + y1 * valueLeft) / value : y1; - partition(i, k, valueLeft, x0, y0, x1, yk); - partition(k, j, valueRight, x0, yk, x1, y1); - } - } -} - -function sliceDice(parent, x0, y0, x1, y1) { - (parent.depth & 1 ? treemapSlice : treemapDice)(parent, x0, y0, x1, y1); -} - -var resquarify = (function custom(ratio) { - - function resquarify(parent, x0, y0, x1, y1) { - if ((rows = parent._squarify) && (rows.ratio === ratio)) { - var rows, - row, - nodes, - i, - j = -1, - n, - m = rows.length, - value = parent.value; - - while (++j < m) { - row = rows[j], nodes = row.children; - for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value; - if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += (y1 - y0) * row.value / value : y1); - else treemapSlice(row, x0, y0, value ? x0 += (x1 - x0) * row.value / value : x1, y1); - value -= row.value; - } - } else { - parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1); - rows.ratio = ratio; - } - } - - resquarify.ratio = function(x) { - return custom((x = +x) > 1 ? x : 1); - }; - - return resquarify; -})(phi); - -exports.cluster = cluster; -exports.hierarchy = hierarchy; -exports.pack = index; -exports.packEnclose = enclose; -exports.packSiblings = siblings; -exports.partition = partition; -exports.stratify = stratify; -exports.tree = tree; -exports.treemap = index$1; -exports.treemapBinary = binary; -exports.treemapDice = treemapDice; -exports.treemapResquarify = resquarify; -exports.treemapSlice = treemapSlice; -exports.treemapSliceDice = sliceDice; -exports.treemapSquarify = squarify; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-hierarchy/dist/d3-hierarchy.min.js b/node_modules/d3-hierarchy/dist/d3-hierarchy.min.js deleted file mode 100644 index 23f6f723758ad3718a7e67e4b72de4e138e03311..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/dist/d3-hierarchy.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-hierarchy/ v2.0.0 Copyright 2020 Mike Bostock -!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((n=n||self).d3=n.d3||{})}(this,function(n){"use strict";function r(n,r){return n.parent===r.parent?1:2}function t(n,r){return n+r.x}function e(n,r){return Math.max(n,r.y)}function i(n){var r=0,t=n.children,e=t&&t.length;if(e)for(;--e>=0;)r+=t[e].value;else r=1;n.value=r}function u(n,r){n instanceof Map?(n=[void 0,n],void 0===r&&(r=a)):void 0===r&&(r=o);for(var t,e,i,u,f,h=new Node(n),l=[h];t=l.pop();)if((i=r(t.data))&&(f=(i=Array.from(i)).length))for(t.children=i,u=f-1;u>=0;--u)l.push(e=i[u]=new Node(i[u])),e.parent=t,e.depth=t.depth+1;return h.eachBefore(c)}function o(n){return n.children}function a(n){return Array.isArray(n)?n[1]:null}function f(n){void 0!==n.data.value&&(n.value=n.data.value),n.data=n.data.data}function c(n){var r=0;do{n.height=r}while((n=n.parent)&&n.height<++r)}function Node(n){this.data=n,this.depth=this.height=0,this.parent=null}function h(n){for(var r,t,e=0,i=(n=function(n){for(var r,t,e=n.length;e;)t=Math.random()*e--|0,r=n[e],n[e]=n[t],n[t]=r;return n}(Array.from(n))).length,u=[];e<i;)r=n[e],t&&d(t,r)?++e:(t=v(u=l(u,r)),e=0);return t}function l(n,r){var t,e;if(s(r,n))return[r];for(t=0;t<n.length;++t)if(p(r,n[t])&&s(x(n[t],r),n))return[n[t],r];for(t=0;t<n.length-1;++t)for(e=t+1;e<n.length;++e)if(p(x(n[t],n[e]),r)&&p(x(n[t],r),n[e])&&p(x(n[e],r),n[t])&&s(y(n[t],n[e],r),n))return[n[t],n[e],r];throw new Error}function p(n,r){var t=n.r-r.r,e=r.x-n.x,i=r.y-n.y;return t<0||t*t<e*e+i*i}function d(n,r){var t=n.r-r.r+1e-9*Math.max(n.r,r.r,1),e=r.x-n.x,i=r.y-n.y;return t>0&&t*t>e*e+i*i}function s(n,r){for(var t=0;t<r.length;++t)if(!d(n,r[t]))return!1;return!0}function v(n){switch(n.length){case 1:return{x:(r=n[0]).x,y:r.y,r:r.r};case 2:return x(n[0],n[1]);case 3:return y(n[0],n[1],n[2])}var r}function x(n,r){var t=n.x,e=n.y,i=n.r,u=r.x,o=r.y,a=r.r,f=u-t,c=o-e,h=a-i,l=Math.sqrt(f*f+c*c);return{x:(t+u+f/l*h)/2,y:(e+o+c/l*h)/2,r:(l+i+a)/2}}function y(n,r,t){var e=n.x,i=n.y,u=n.r,o=r.x,a=r.y,f=r.r,c=t.x,h=t.y,l=t.r,p=e-o,d=e-c,s=i-a,v=i-h,x=f-u,y=l-u,g=e*e+i*i-u*u,m=g-o*o-a*a+f*f,w=g-c*c-h*h+l*l,_=d*s-p*v,M=(s*w-v*m)/(2*_)-e,z=(v*x-s*y)/_,B=(d*m-p*w)/(2*_)-i,A=(p*y-d*x)/_,q=z*z+A*A-1,b=2*(u+M*z+B*A),E=M*M+B*B-u*u,S=-(q?(b+Math.sqrt(b*b-4*q*E))/(2*q):E/b);return{x:e+M+z*S,y:i+B+A*S,r:S}}function g(n,r,t){var e,i,u,o,a=n.x-r.x,f=n.y-r.y,c=a*a+f*f;c?(i=r.r+t.r,i*=i,o=n.r+t.r,i>(o*=o)?(e=(c+o-i)/(2*c),u=Math.sqrt(Math.max(0,o/c-e*e)),t.x=n.x-e*a-u*f,t.y=n.y-e*f+u*a):(e=(c+i-o)/(2*c),u=Math.sqrt(Math.max(0,i/c-e*e)),t.x=r.x+e*a-u*f,t.y=r.y+e*f+u*a)):(t.x=r.x+t.r,t.y=r.y)}function m(n,r){var t=n.r+r.r-1e-6,e=r.x-n.x,i=r.y-n.y;return t>0&&t*t>e*e+i*i}function w(n){var r=n._,t=n.next._,e=r.r+t.r,i=(r.x*t.r+t.x*r.r)/e,u=(r.y*t.r+t.y*r.r)/e;return i*i+u*u}function _(n){this._=n,this.next=null,this.previous=null}function M(n){if(!(u=(r=n,n="object"==typeof r&&"length"in r?r:Array.from(r)).length))return 0;var r,t,e,i,u,o,a,f,c,l,p,d;if((t=n[0]).x=0,t.y=0,!(u>1))return t.r;if(e=n[1],t.x=-e.r,e.x=t.r,e.y=0,!(u>2))return t.r+e.r;g(e,t,i=n[2]),t=new _(t),e=new _(e),i=new _(i),t.next=i.previous=e,e.next=t.previous=i,i.next=e.previous=t;n:for(f=3;f<u;++f){g(t._,e._,i=n[f]),i=new _(i),c=e.next,l=t.previous,p=e._.r,d=t._.r;do{if(p<=d){if(m(c._,i._)){e=c,t.next=e,e.previous=t,--f;continue n}p+=c._.r,c=c.next}else{if(m(l._,i._)){(t=l).next=e,e.previous=t,--f;continue n}d+=l._.r,l=l.previous}}while(c!==l.next);for(i.previous=t,i.next=e,t.next=e.previous=e=i,o=w(t);(i=i.next)!==e;)(a=w(i))<o&&(t=i,o=a);e=t.next}for(t=[e._],i=e;(i=i.next)!==e;)t.push(i._);for(i=h(t),f=0;f<u;++f)(t=n[f]).x-=i.x,t.y-=i.y;return i.r}function z(n){return null==n?null:B(n)}function B(n){if("function"!=typeof n)throw new Error;return n}function A(){return 0}function q(n){return function(){return n}}function b(n){return Math.sqrt(n.value)}function E(n){return function(r){r.children||(r.r=Math.max(0,+n(r)||0))}}function S(n,r){return function(t){if(e=t.children){var e,i,u,o=e.length,a=n(t)*r||0;if(a)for(i=0;i<o;++i)e[i].r+=a;if(u=M(e),a)for(i=0;i<o;++i)e[i].r-=a;t.r=u+a}}}function k(n){return function(r){var t=r.parent;r.r*=n,t&&(r.x=t.x+n*r.x,r.y=t.y+n*r.y)}}function I(n){n.x0=Math.round(n.x0),n.y0=Math.round(n.y0),n.x1=Math.round(n.x1),n.y1=Math.round(n.y1)}function j(n,r,t,e,i){for(var u,o=n.children,a=-1,f=o.length,c=n.value&&(e-r)/n.value;++a<f;)(u=o[a]).y0=t,u.y1=i,u.x0=r,u.x1=r+=u.value*c}Node.prototype=u.prototype={constructor:Node,count:function(){return this.eachAfter(i)},each:function(n,r){let t=-1;for(const e of this)n.call(r,e,++t,this);return this},eachAfter:function(n,r){for(var t,e,i,u=this,o=[u],a=[],f=-1;u=o.pop();)if(a.push(u),t=u.children)for(e=0,i=t.length;e<i;++e)o.push(t[e]);for(;u=a.pop();)n.call(r,u,++f,this);return this},eachBefore:function(n,r){for(var t,e,i=this,u=[i],o=-1;i=u.pop();)if(n.call(r,i,++o,this),t=i.children)for(e=t.length-1;e>=0;--e)u.push(t[e]);return this},find:function(n,r){let t=-1;for(const e of this)if(n.call(r,e,++t,this))return e},sum:function(n){return this.eachAfter(function(r){for(var t=+n(r.data)||0,e=r.children,i=e&&e.length;--i>=0;)t+=e[i].value;r.value=t})},sort:function(n){return this.eachBefore(function(r){r.children&&r.children.sort(n)})},path:function(n){for(var r=this,t=function(n,r){if(n===r)return n;var t=n.ancestors(),e=r.ancestors(),i=null;for(n=t.pop(),r=e.pop();n===r;)i=n,n=t.pop(),r=e.pop();return i}(r,n),e=[r];r!==t;)r=r.parent,e.push(r);for(var i=e.length;n!==t;)e.splice(i,0,n),n=n.parent;return e},ancestors:function(){for(var n=this,r=[n];n=n.parent;)r.push(n);return r},descendants:function(){return Array.from(this)},leaves:function(){var n=[];return this.eachBefore(function(r){r.children||n.push(r)}),n},links:function(){var n=this,r=[];return n.each(function(t){t!==n&&r.push({source:t.parent,target:t})}),r},copy:function(){return u(this).eachBefore(f)},[Symbol.iterator]:function*(){var n,r,t,e,i=this,u=[i];do{for(n=u.reverse(),u=[];i=n.pop();)if(yield i,r=i.children)for(t=0,e=r.length;t<e;++t)u.push(r[t])}while(u.length)}};var O={depth:-1},R={};function T(n){return n.id}function D(n){return n.parentId}function L(n,r){return n.parent===r.parent?1:2}function P(n){var r=n.children;return r?r[0]:n.t}function C(n){var r=n.children;return r?r[r.length-1]:n.t}function F(n,r,t){var e=t/(r.i-n.i);r.c-=e,r.s+=t,n.c+=e,r.z+=t,r.m+=t}function G(n,r,t){return n.a.parent===r.parent?n.a:t}function H(n,r){this._=n,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=r}function J(n,r,t,e,i){for(var u,o=n.children,a=-1,f=o.length,c=n.value&&(i-t)/n.value;++a<f;)(u=o[a]).x0=r,u.x1=e,u.y0=t,u.y1=t+=u.value*c}H.prototype=Object.create(Node.prototype);var K=(1+Math.sqrt(5))/2;function N(n,r,t,e,i,u){for(var o,a,f,c,h,l,p,d,s,v,x,y=[],g=r.children,m=0,w=0,_=g.length,M=r.value;m<_;){f=i-t,c=u-e;do{h=g[w++].value}while(!h&&w<_);for(l=p=h,x=h*h*(v=Math.max(c/f,f/c)/(M*n)),s=Math.max(p/x,x/l);w<_;++w){if(h+=a=g[w].value,a<l&&(l=a),a>p&&(p=a),x=h*h*v,(d=Math.max(p/x,x/l))>s){h-=a;break}s=d}y.push(o={value:h,dice:f<c,children:g.slice(m,w)}),o.dice?j(o,t,e,i,M?e+=c*h/M:u):J(o,t,e,M?t+=f*h/M:i,u),M-=h,m=w}return y}var Q=function n(r){function t(n,t,e,i,u){N(r,n,t,e,i,u)}return t.ratio=function(r){return n((r=+r)>1?r:1)},t}(K);var U=function n(r){function t(n,t,e,i,u){if((o=n._squarify)&&o.ratio===r)for(var o,a,f,c,h,l=-1,p=o.length,d=n.value;++l<p;){for(f=(a=o[l]).children,c=a.value=0,h=f.length;c<h;++c)a.value+=f[c].value;a.dice?j(a,t,e,i,d?e+=(u-e)*a.value/d:u):J(a,t,e,d?t+=(i-t)*a.value/d:i,u),d-=a.value}else n._squarify=o=N(r,n,t,e,i,u),o.ratio=r}return t.ratio=function(r){return n((r=+r)>1?r:1)},t}(K);n.cluster=function(){var n=r,i=1,u=1,o=!1;function a(r){var a,f=0;r.eachAfter(function(r){var i=r.children;i?(r.x=function(n){return n.reduce(t,0)/n.length}(i),r.y=function(n){return 1+n.reduce(e,0)}(i)):(r.x=a?f+=n(r,a):0,r.y=0,a=r)});var c=function(n){for(var r;r=n.children;)n=r[0];return n}(r),h=function(n){for(var r;r=n.children;)n=r[r.length-1];return n}(r),l=c.x-n(c,h)/2,p=h.x+n(h,c)/2;return r.eachAfter(o?function(n){n.x=(n.x-r.x)*i,n.y=(r.y-n.y)*u}:function(n){n.x=(n.x-l)/(p-l)*i,n.y=(1-(r.y?n.y/r.y:1))*u})}return a.separation=function(r){return arguments.length?(n=r,a):n},a.size=function(n){return arguments.length?(o=!1,i=+n[0],u=+n[1],a):o?null:[i,u]},a.nodeSize=function(n){return arguments.length?(o=!0,i=+n[0],u=+n[1],a):o?[i,u]:null},a},n.hierarchy=u,n.pack=function(){var n=null,r=1,t=1,e=A;function i(i){return i.x=r/2,i.y=t/2,n?i.eachBefore(E(n)).eachAfter(S(e,.5)).eachBefore(k(1)):i.eachBefore(E(b)).eachAfter(S(A,1)).eachAfter(S(e,i.r/Math.min(r,t))).eachBefore(k(Math.min(r,t)/(2*i.r))),i}return i.radius=function(r){return arguments.length?(n=z(r),i):n},i.size=function(n){return arguments.length?(r=+n[0],t=+n[1],i):[r,t]},i.padding=function(n){return arguments.length?(e="function"==typeof n?n:q(+n),i):e},i},n.packEnclose=h,n.packSiblings=function(n){return M(n),n},n.partition=function(){var n=1,r=1,t=0,e=!1;function i(i){var u=i.height+1;return i.x0=i.y0=t,i.x1=n,i.y1=r/u,i.eachBefore(function(n,r){return function(e){e.children&&j(e,e.x0,n*(e.depth+1)/r,e.x1,n*(e.depth+2)/r);var i=e.x0,u=e.y0,o=e.x1-t,a=e.y1-t;o<i&&(i=o=(i+o)/2),a<u&&(u=a=(u+a)/2),e.x0=i,e.y0=u,e.x1=o,e.y1=a}}(r,u)),e&&i.eachBefore(I),i}return i.round=function(n){return arguments.length?(e=!!n,i):e},i.size=function(t){return arguments.length?(n=+t[0],r=+t[1],i):[n,r]},i.padding=function(n){return arguments.length?(t=+n,i):t},i},n.stratify=function(){var n=T,r=D;function t(t){var e,i,u,o,a,f,h,l=Array.from(t),p=l.length,d=new Map;for(i=0;i<p;++i)e=l[i],a=l[i]=new Node(e),null!=(f=n(e,i,t))&&(f+="")&&(h=a.id=f,d.set(h,d.has(h)?R:a)),null!=(f=r(e,i,t))&&(f+="")&&(a.parent=f);for(i=0;i<p;++i)if(f=(a=l[i]).parent){if(!(o=d.get(f)))throw new Error("missing: "+f);if(o===R)throw new Error("ambiguous: "+f);o.children?o.children.push(a):o.children=[a],a.parent=o}else{if(u)throw new Error("multiple roots");u=a}if(!u)throw new Error("no root");if(u.parent=O,u.eachBefore(function(n){n.depth=n.parent.depth+1,--p}).eachBefore(c),u.parent=null,p>0)throw new Error("cycle");return u}return t.id=function(r){return arguments.length?(n=B(r),t):n},t.parentId=function(n){return arguments.length?(r=B(n),t):r},t},n.tree=function(){var n=L,r=1,t=1,e=null;function i(i){var f=function(n){for(var r,t,e,i,u,o=new H(n,0),a=[o];r=a.pop();)if(e=r._.children)for(r.children=new Array(u=e.length),i=u-1;i>=0;--i)a.push(t=r.children[i]=new H(e[i],i)),t.parent=r;return(o.parent=new H(null,0)).children=[o],o}(i);if(f.eachAfter(u),f.parent.m=-f.z,f.eachBefore(o),e)i.eachBefore(a);else{var c=i,h=i,l=i;i.eachBefore(function(n){n.x<c.x&&(c=n),n.x>h.x&&(h=n),n.depth>l.depth&&(l=n)});var p=c===h?1:n(c,h)/2,d=p-c.x,s=r/(h.x+p+d),v=t/(l.depth||1);i.eachBefore(function(n){n.x=(n.x+d)*s,n.y=n.depth*v})}return i}function u(r){var t=r.children,e=r.parent.children,i=r.i?e[r.i-1]:null;if(t){!function(n){for(var r,t=0,e=0,i=n.children,u=i.length;--u>=0;)(r=i[u]).z+=t,r.m+=t,t+=r.s+(e+=r.c)}(r);var u=(t[0].z+t[t.length-1].z)/2;i?(r.z=i.z+n(r._,i._),r.m=r.z-u):r.z=u}else i&&(r.z=i.z+n(r._,i._));r.parent.A=function(r,t,e){if(t){for(var i,u=r,o=r,a=t,f=u.parent.children[0],c=u.m,h=o.m,l=a.m,p=f.m;a=C(a),u=P(u),a&&u;)f=P(f),(o=C(o)).a=r,(i=a.z+l-u.z-c+n(a._,u._))>0&&(F(G(a,r,e),r,i),c+=i,h+=i),l+=a.m,c+=u.m,p+=f.m,h+=o.m;a&&!C(o)&&(o.t=a,o.m+=l-h),u&&!P(f)&&(f.t=u,f.m+=c-p,e=r)}return e}(r,i,r.parent.A||e[0])}function o(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function a(n){n.x*=r,n.y=n.depth*t}return i.separation=function(r){return arguments.length?(n=r,i):n},i.size=function(n){return arguments.length?(e=!1,r=+n[0],t=+n[1],i):e?null:[r,t]},i.nodeSize=function(n){return arguments.length?(e=!0,r=+n[0],t=+n[1],i):e?[r,t]:null},i},n.treemap=function(){var n=Q,r=!1,t=1,e=1,i=[0],u=A,o=A,a=A,f=A,c=A;function h(n){return n.x0=n.y0=0,n.x1=t,n.y1=e,n.eachBefore(l),i=[0],r&&n.eachBefore(I),n}function l(r){var t=i[r.depth],e=r.x0+t,h=r.y0+t,l=r.x1-t,p=r.y1-t;l<e&&(e=l=(e+l)/2),p<h&&(h=p=(h+p)/2),r.x0=e,r.y0=h,r.x1=l,r.y1=p,r.children&&(t=i[r.depth+1]=u(r)/2,e+=c(r)-t,h+=o(r)-t,(l-=a(r)-t)<e&&(e=l=(e+l)/2),(p-=f(r)-t)<h&&(h=p=(h+p)/2),n(r,e,h,l,p))}return h.round=function(n){return arguments.length?(r=!!n,h):r},h.size=function(n){return arguments.length?(t=+n[0],e=+n[1],h):[t,e]},h.tile=function(r){return arguments.length?(n=B(r),h):n},h.padding=function(n){return arguments.length?h.paddingInner(n).paddingOuter(n):h.paddingInner()},h.paddingInner=function(n){return arguments.length?(u="function"==typeof n?n:q(+n),h):u},h.paddingOuter=function(n){return arguments.length?h.paddingTop(n).paddingRight(n).paddingBottom(n).paddingLeft(n):h.paddingTop()},h.paddingTop=function(n){return arguments.length?(o="function"==typeof n?n:q(+n),h):o},h.paddingRight=function(n){return arguments.length?(a="function"==typeof n?n:q(+n),h):a},h.paddingBottom=function(n){return arguments.length?(f="function"==typeof n?n:q(+n),h):f},h.paddingLeft=function(n){return arguments.length?(c="function"==typeof n?n:q(+n),h):c},h},n.treemapBinary=function(n,r,t,e,i){var u,o,a=n.children,f=a.length,c=new Array(f+1);for(c[0]=o=u=0;u<f;++u)c[u+1]=o+=a[u].value;!function n(r,t,e,i,u,o,f){if(r>=t-1){var h=a[r];return h.x0=i,h.y0=u,h.x1=o,void(h.y1=f)}for(var l=c[r],p=e/2+l,d=r+1,s=t-1;d<s;){var v=d+s>>>1;c[v]<p?d=v+1:s=v}p-c[d-1]<c[d]-p&&r+1<d&&--d;var x=c[d]-l,y=e-x;if(o-i>f-u){var g=e?(i*y+o*x)/e:o;n(r,d,x,i,u,g,f),n(d,t,y,g,u,o,f)}else{var m=e?(u*y+f*x)/e:f;n(r,d,x,i,u,o,m),n(d,t,y,i,m,o,f)}}(0,f,n.value,r,t,e,i)},n.treemapDice=j,n.treemapResquarify=U,n.treemapSlice=J,n.treemapSliceDice=function(n,r,t,e,i){(1&n.depth?J:j)(n,r,t,e,i)},n.treemapSquarify=Q,Object.defineProperty(n,"__esModule",{value:!0})}); diff --git a/node_modules/d3-hierarchy/package.json b/node_modules/d3-hierarchy/package.json deleted file mode 100644 index 223d02268ffc14972a9a31e806a11a52fdc58806..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_from": "d3-hierarchy@2", - "_id": "d3-hierarchy@2.0.0", - "_inBundle": false, - "_integrity": "sha512-SwIdqM3HxQX2214EG9GTjgmCc/mbSx4mQBn+DuEETubhOw6/U3fmnji4uCVrmzOydMHSO1nZle5gh6HB/wdOzw==", - "_location": "/d3-hierarchy", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-hierarchy@2", - "name": "d3-hierarchy", - "escapedName": "d3-hierarchy", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3" - ], - "_resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-2.0.0.tgz", - "_shasum": "dab88a58ca3e7a1bc6cab390e89667fcc6d20218", - "_spec": "d3-hierarchy@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-hierarchy/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Layout algorithms for visualizing hierarchical data.", - "devDependencies": { - "benchmark": "^2.1.4", - "d3-array": "1.2.0 - 2", - "d3-dsv": "1 - 2", - "d3-random": "1.1.0 - 2", - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-hierarchy/", - "jsdelivr": "dist/d3-hierarchy.min.js", - "keywords": [ - "d3", - "d3-module", - "layout", - "tree", - "treemap", - "hierarchy", - "infovis" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-hierarchy.js", - "module": "src/index.js", - "name": "d3-hierarchy", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-hierarchy.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src test" - }, - "sideEffects": false, - "unpkg": "dist/d3-hierarchy.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-hierarchy/src/accessors.js b/node_modules/d3-hierarchy/src/accessors.js deleted file mode 100644 index 369c414577d3d71337e8da94f27ed3711172b8f7..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/accessors.js +++ /dev/null @@ -1,8 +0,0 @@ -export function optional(f) { - return f == null ? null : required(f); -} - -export function required(f) { - if (typeof f !== "function") throw new Error; - return f; -} diff --git a/node_modules/d3-hierarchy/src/array.js b/node_modules/d3-hierarchy/src/array.js deleted file mode 100644 index df69e80742545db83a42a8a34980f8fc6aaf93a6..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/array.js +++ /dev/null @@ -1,20 +0,0 @@ -export default function(x) { - return typeof x === "object" && "length" in x - ? x // Array, TypedArray, NodeList, array-like - : Array.from(x); // Map, Set, iterable, string, or anything else -} - -export function shuffle(array) { - var m = array.length, - t, - i; - - while (m) { - i = Math.random() * m-- | 0; - t = array[m]; - array[m] = array[i]; - array[i] = t; - } - - return array; -} diff --git a/node_modules/d3-hierarchy/src/cluster.js b/node_modules/d3-hierarchy/src/cluster.js deleted file mode 100644 index f5a280e20542197dd052dad83c0ba021b16fb0bc..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/cluster.js +++ /dev/null @@ -1,84 +0,0 @@ -function defaultSeparation(a, b) { - return a.parent === b.parent ? 1 : 2; -} - -function meanX(children) { - return children.reduce(meanXReduce, 0) / children.length; -} - -function meanXReduce(x, c) { - return x + c.x; -} - -function maxY(children) { - return 1 + children.reduce(maxYReduce, 0); -} - -function maxYReduce(y, c) { - return Math.max(y, c.y); -} - -function leafLeft(node) { - var children; - while (children = node.children) node = children[0]; - return node; -} - -function leafRight(node) { - var children; - while (children = node.children) node = children[children.length - 1]; - return node; -} - -export default function() { - var separation = defaultSeparation, - dx = 1, - dy = 1, - nodeSize = false; - - function cluster(root) { - var previousNode, - x = 0; - - // First walk, computing the initial x & y values. - root.eachAfter(function(node) { - var children = node.children; - if (children) { - node.x = meanX(children); - node.y = maxY(children); - } else { - node.x = previousNode ? x += separation(node, previousNode) : 0; - node.y = 0; - previousNode = node; - } - }); - - var left = leafLeft(root), - right = leafRight(root), - x0 = left.x - separation(left, right) / 2, - x1 = right.x + separation(right, left) / 2; - - // Second walk, normalizing x & y to the desired size. - return root.eachAfter(nodeSize ? function(node) { - node.x = (node.x - root.x) * dx; - node.y = (root.y - node.y) * dy; - } : function(node) { - node.x = (node.x - x0) / (x1 - x0) * dx; - node.y = (1 - (root.y ? node.y / root.y : 1)) * dy; - }); - } - - cluster.separation = function(x) { - return arguments.length ? (separation = x, cluster) : separation; - }; - - cluster.size = function(x) { - return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]); - }; - - cluster.nodeSize = function(x) { - return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null); - }; - - return cluster; -} diff --git a/node_modules/d3-hierarchy/src/constant.js b/node_modules/d3-hierarchy/src/constant.js deleted file mode 100644 index 1d947c4f323e431d97da423e4f2fb831f1c184a8..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/constant.js +++ /dev/null @@ -1,9 +0,0 @@ -export function constantZero() { - return 0; -} - -export default function(x) { - return function() { - return x; - }; -} diff --git a/node_modules/d3-hierarchy/src/hierarchy/ancestors.js b/node_modules/d3-hierarchy/src/hierarchy/ancestors.js deleted file mode 100644 index f70c7264fef91462f98e9dc3ea0e4c2117aa2f2a..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/hierarchy/ancestors.js +++ /dev/null @@ -1,7 +0,0 @@ -export default function() { - var node = this, nodes = [node]; - while (node = node.parent) { - nodes.push(node); - } - return nodes; -} diff --git a/node_modules/d3-hierarchy/src/hierarchy/count.js b/node_modules/d3-hierarchy/src/hierarchy/count.js deleted file mode 100644 index 0b90f1bd9d334901a335aa40eacf7fe3164f208a..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/hierarchy/count.js +++ /dev/null @@ -1,12 +0,0 @@ -function count(node) { - var sum = 0, - children = node.children, - i = children && children.length; - if (!i) sum = 1; - else while (--i >= 0) sum += children[i].value; - node.value = sum; -} - -export default function() { - return this.eachAfter(count); -} diff --git a/node_modules/d3-hierarchy/src/hierarchy/descendants.js b/node_modules/d3-hierarchy/src/hierarchy/descendants.js deleted file mode 100644 index 7f38090dfacd19dc623288fac314936455c28a8f..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/hierarchy/descendants.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function() { - return Array.from(this); -} diff --git a/node_modules/d3-hierarchy/src/hierarchy/each.js b/node_modules/d3-hierarchy/src/hierarchy/each.js deleted file mode 100644 index af911cc71566bafca4e459dc7207bfa0967b0e0d..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/hierarchy/each.js +++ /dev/null @@ -1,7 +0,0 @@ -export default function(callback, that) { - let index = -1; - for (const node of this) { - callback.call(that, node, ++index, this); - } - return this; -} diff --git a/node_modules/d3-hierarchy/src/hierarchy/eachAfter.js b/node_modules/d3-hierarchy/src/hierarchy/eachAfter.js deleted file mode 100644 index a3f0a2c09e38f1706055e3b58ec1982dbb860dc1..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/hierarchy/eachAfter.js +++ /dev/null @@ -1,15 +0,0 @@ -export default function(callback, that) { - var node = this, nodes = [node], next = [], children, i, n, index = -1; - while (node = nodes.pop()) { - next.push(node); - if (children = node.children) { - for (i = 0, n = children.length; i < n; ++i) { - nodes.push(children[i]); - } - } - } - while (node = next.pop()) { - callback.call(that, node, ++index, this); - } - return this; -} diff --git a/node_modules/d3-hierarchy/src/hierarchy/eachBefore.js b/node_modules/d3-hierarchy/src/hierarchy/eachBefore.js deleted file mode 100644 index f3cd524beca94425a86b9de6171d9ad31eaa5292..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/hierarchy/eachBefore.js +++ /dev/null @@ -1,12 +0,0 @@ -export default function(callback, that) { - var node = this, nodes = [node], children, i, index = -1; - while (node = nodes.pop()) { - callback.call(that, node, ++index, this); - if (children = node.children) { - for (i = children.length - 1; i >= 0; --i) { - nodes.push(children[i]); - } - } - } - return this; -} diff --git a/node_modules/d3-hierarchy/src/hierarchy/find.js b/node_modules/d3-hierarchy/src/hierarchy/find.js deleted file mode 100644 index f4ed8c688b9e64b1b4b8901dfeda52a0dd2ef5d9..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/hierarchy/find.js +++ /dev/null @@ -1,8 +0,0 @@ -export default function(callback, that) { - let index = -1; - for (const node of this) { - if (callback.call(that, node, ++index, this)) { - return node; - } - } -} diff --git a/node_modules/d3-hierarchy/src/hierarchy/index.js b/node_modules/d3-hierarchy/src/hierarchy/index.js deleted file mode 100644 index b9c1026f07744883ff622c1fff44418557ba9b31..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/hierarchy/index.js +++ /dev/null @@ -1,91 +0,0 @@ -import node_count from "./count.js"; -import node_each from "./each.js"; -import node_eachBefore from "./eachBefore.js"; -import node_eachAfter from "./eachAfter.js"; -import node_find from "./find.js"; -import node_sum from "./sum.js"; -import node_sort from "./sort.js"; -import node_path from "./path.js"; -import node_ancestors from "./ancestors.js"; -import node_descendants from "./descendants.js"; -import node_leaves from "./leaves.js"; -import node_links from "./links.js"; -import node_iterator from "./iterator.js"; - -export default function hierarchy(data, children) { - if (data instanceof Map) { - data = [undefined, data]; - if (children === undefined) children = mapChildren; - } else if (children === undefined) { - children = objectChildren; - } - - var root = new Node(data), - node, - nodes = [root], - child, - childs, - i, - n; - - while (node = nodes.pop()) { - if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) { - node.children = childs; - for (i = n - 1; i >= 0; --i) { - nodes.push(child = childs[i] = new Node(childs[i])); - child.parent = node; - child.depth = node.depth + 1; - } - } - } - - return root.eachBefore(computeHeight); -} - -function node_copy() { - return hierarchy(this).eachBefore(copyData); -} - -function objectChildren(d) { - return d.children; -} - -function mapChildren(d) { - return Array.isArray(d) ? d[1] : null; -} - -function copyData(node) { - if (node.data.value !== undefined) node.value = node.data.value; - node.data = node.data.data; -} - -export function computeHeight(node) { - var height = 0; - do node.height = height; - while ((node = node.parent) && (node.height < ++height)); -} - -export function Node(data) { - this.data = data; - this.depth = - this.height = 0; - this.parent = null; -} - -Node.prototype = hierarchy.prototype = { - constructor: Node, - count: node_count, - each: node_each, - eachAfter: node_eachAfter, - eachBefore: node_eachBefore, - find: node_find, - sum: node_sum, - sort: node_sort, - path: node_path, - ancestors: node_ancestors, - descendants: node_descendants, - leaves: node_leaves, - links: node_links, - copy: node_copy, - [Symbol.iterator]: node_iterator -}; diff --git a/node_modules/d3-hierarchy/src/hierarchy/iterator.js b/node_modules/d3-hierarchy/src/hierarchy/iterator.js deleted file mode 100644 index 7e06b620d87c8b7dac70798f7f479d2ea2b51556..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/hierarchy/iterator.js +++ /dev/null @@ -1,14 +0,0 @@ -export default function*() { - var node = this, current, next = [node], children, i, n; - do { - current = next.reverse(), next = []; - while (node = current.pop()) { - yield node; - if (children = node.children) { - for (i = 0, n = children.length; i < n; ++i) { - next.push(children[i]); - } - } - } - } while (next.length); -} diff --git a/node_modules/d3-hierarchy/src/hierarchy/leaves.js b/node_modules/d3-hierarchy/src/hierarchy/leaves.js deleted file mode 100644 index 401c5b537ca72ed3f54f9ddb8a14dbdf1e69cd4e..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/hierarchy/leaves.js +++ /dev/null @@ -1,9 +0,0 @@ -export default function() { - var leaves = []; - this.eachBefore(function(node) { - if (!node.children) { - leaves.push(node); - } - }); - return leaves; -} diff --git a/node_modules/d3-hierarchy/src/hierarchy/links.js b/node_modules/d3-hierarchy/src/hierarchy/links.js deleted file mode 100644 index 6fcb82fa63ffe0afad42f7fe644faa478206376a..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/hierarchy/links.js +++ /dev/null @@ -1,9 +0,0 @@ -export default function() { - var root = this, links = []; - root.each(function(node) { - if (node !== root) { // Don’t include the root’s parent, if any. - links.push({source: node.parent, target: node}); - } - }); - return links; -} diff --git a/node_modules/d3-hierarchy/src/hierarchy/path.js b/node_modules/d3-hierarchy/src/hierarchy/path.js deleted file mode 100644 index 995891380a0ed3a60bbbd3b68363437170a5121b..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/hierarchy/path.js +++ /dev/null @@ -1,30 +0,0 @@ -export default function(end) { - var start = this, - ancestor = leastCommonAncestor(start, end), - nodes = [start]; - while (start !== ancestor) { - start = start.parent; - nodes.push(start); - } - var k = nodes.length; - while (end !== ancestor) { - nodes.splice(k, 0, end); - end = end.parent; - } - return nodes; -} - -function leastCommonAncestor(a, b) { - if (a === b) return a; - var aNodes = a.ancestors(), - bNodes = b.ancestors(), - c = null; - a = aNodes.pop(); - b = bNodes.pop(); - while (a === b) { - c = a; - a = aNodes.pop(); - b = bNodes.pop(); - } - return c; -} diff --git a/node_modules/d3-hierarchy/src/hierarchy/sort.js b/node_modules/d3-hierarchy/src/hierarchy/sort.js deleted file mode 100644 index 5d0426d54943f7cde02d64b8ab9b6b7f92703142..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/hierarchy/sort.js +++ /dev/null @@ -1,7 +0,0 @@ -export default function(compare) { - return this.eachBefore(function(node) { - if (node.children) { - node.children.sort(compare); - } - }); -} diff --git a/node_modules/d3-hierarchy/src/hierarchy/sum.js b/node_modules/d3-hierarchy/src/hierarchy/sum.js deleted file mode 100644 index 350a965e6020d898f13bf9973de7e08445bbc067..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/hierarchy/sum.js +++ /dev/null @@ -1,9 +0,0 @@ -export default function(value) { - return this.eachAfter(function(node) { - var sum = +value(node.data) || 0, - children = node.children, - i = children && children.length; - while (--i >= 0) sum += children[i].value; - node.value = sum; - }); -} diff --git a/node_modules/d3-hierarchy/src/index.js b/node_modules/d3-hierarchy/src/index.js deleted file mode 100644 index cd4cca39e637eeda2b35986beae0546c42ed2b9f..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/index.js +++ /dev/null @@ -1,15 +0,0 @@ -export {default as cluster} from "./cluster.js"; -export {default as hierarchy} from "./hierarchy/index.js"; -export {default as pack} from "./pack/index.js"; -export {default as packSiblings} from "./pack/siblings.js"; -export {default as packEnclose} from "./pack/enclose.js"; -export {default as partition} from "./partition.js"; -export {default as stratify} from "./stratify.js"; -export {default as tree} from "./tree.js"; -export {default as treemap} from "./treemap/index.js"; -export {default as treemapBinary} from "./treemap/binary.js"; -export {default as treemapDice} from "./treemap/dice.js"; -export {default as treemapSlice} from "./treemap/slice.js"; -export {default as treemapSliceDice} from "./treemap/sliceDice.js"; -export {default as treemapSquarify} from "./treemap/squarify.js"; -export {default as treemapResquarify} from "./treemap/resquarify.js"; diff --git a/node_modules/d3-hierarchy/src/pack/enclose.js b/node_modules/d3-hierarchy/src/pack/enclose.js deleted file mode 100644 index 86231caa738be6dff1055d8ebe8ccbc82193780b..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/pack/enclose.js +++ /dev/null @@ -1,118 +0,0 @@ -import {shuffle} from "../array.js"; - -export default function(circles) { - var i = 0, n = (circles = shuffle(Array.from(circles))).length, B = [], p, e; - - while (i < n) { - p = circles[i]; - if (e && enclosesWeak(e, p)) ++i; - else e = encloseBasis(B = extendBasis(B, p)), i = 0; - } - - return e; -} - -function extendBasis(B, p) { - var i, j; - - if (enclosesWeakAll(p, B)) return [p]; - - // If we get here then B must have at least one element. - for (i = 0; i < B.length; ++i) { - if (enclosesNot(p, B[i]) - && enclosesWeakAll(encloseBasis2(B[i], p), B)) { - return [B[i], p]; - } - } - - // If we get here then B must have at least two elements. - for (i = 0; i < B.length - 1; ++i) { - for (j = i + 1; j < B.length; ++j) { - if (enclosesNot(encloseBasis2(B[i], B[j]), p) - && enclosesNot(encloseBasis2(B[i], p), B[j]) - && enclosesNot(encloseBasis2(B[j], p), B[i]) - && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) { - return [B[i], B[j], p]; - } - } - } - - // If we get here then something is very wrong. - throw new Error; -} - -function enclosesNot(a, b) { - var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y; - return dr < 0 || dr * dr < dx * dx + dy * dy; -} - -function enclosesWeak(a, b) { - var dr = a.r - b.r + Math.max(a.r, b.r, 1) * 1e-9, dx = b.x - a.x, dy = b.y - a.y; - return dr > 0 && dr * dr > dx * dx + dy * dy; -} - -function enclosesWeakAll(a, B) { - for (var i = 0; i < B.length; ++i) { - if (!enclosesWeak(a, B[i])) { - return false; - } - } - return true; -} - -function encloseBasis(B) { - switch (B.length) { - case 1: return encloseBasis1(B[0]); - case 2: return encloseBasis2(B[0], B[1]); - case 3: return encloseBasis3(B[0], B[1], B[2]); - } -} - -function encloseBasis1(a) { - return { - x: a.x, - y: a.y, - r: a.r - }; -} - -function encloseBasis2(a, b) { - var x1 = a.x, y1 = a.y, r1 = a.r, - x2 = b.x, y2 = b.y, r2 = b.r, - x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1, - l = Math.sqrt(x21 * x21 + y21 * y21); - return { - x: (x1 + x2 + x21 / l * r21) / 2, - y: (y1 + y2 + y21 / l * r21) / 2, - r: (l + r1 + r2) / 2 - }; -} - -function encloseBasis3(a, b, c) { - var x1 = a.x, y1 = a.y, r1 = a.r, - x2 = b.x, y2 = b.y, r2 = b.r, - x3 = c.x, y3 = c.y, r3 = c.r, - a2 = x1 - x2, - a3 = x1 - x3, - b2 = y1 - y2, - b3 = y1 - y3, - c2 = r2 - r1, - c3 = r3 - r1, - d1 = x1 * x1 + y1 * y1 - r1 * r1, - d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2, - d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3, - ab = a3 * b2 - a2 * b3, - xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1, - xb = (b3 * c2 - b2 * c3) / ab, - ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1, - yb = (a2 * c3 - a3 * c2) / ab, - A = xb * xb + yb * yb - 1, - B = 2 * (r1 + xa * xb + ya * yb), - C = xa * xa + ya * ya - r1 * r1, - r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B); - return { - x: x1 + xa + xb * r, - y: y1 + ya + yb * r, - r: r - }; -} diff --git a/node_modules/d3-hierarchy/src/pack/index.js b/node_modules/d3-hierarchy/src/pack/index.js deleted file mode 100644 index 6ef2d7c99735d15982428abdca9951557b1d87f9..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/pack/index.js +++ /dev/null @@ -1,79 +0,0 @@ -import {packEnclose} from "./siblings.js"; -import {optional} from "../accessors.js"; -import constant, {constantZero} from "../constant.js"; - -function defaultRadius(d) { - return Math.sqrt(d.value); -} - -export default function() { - var radius = null, - dx = 1, - dy = 1, - padding = constantZero; - - function pack(root) { - root.x = dx / 2, root.y = dy / 2; - if (radius) { - root.eachBefore(radiusLeaf(radius)) - .eachAfter(packChildren(padding, 0.5)) - .eachBefore(translateChild(1)); - } else { - root.eachBefore(radiusLeaf(defaultRadius)) - .eachAfter(packChildren(constantZero, 1)) - .eachAfter(packChildren(padding, root.r / Math.min(dx, dy))) - .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r))); - } - return root; - } - - pack.radius = function(x) { - return arguments.length ? (radius = optional(x), pack) : radius; - }; - - pack.size = function(x) { - return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy]; - }; - - pack.padding = function(x) { - return arguments.length ? (padding = typeof x === "function" ? x : constant(+x), pack) : padding; - }; - - return pack; -} - -function radiusLeaf(radius) { - return function(node) { - if (!node.children) { - node.r = Math.max(0, +radius(node) || 0); - } - }; -} - -function packChildren(padding, k) { - return function(node) { - if (children = node.children) { - var children, - i, - n = children.length, - r = padding(node) * k || 0, - e; - - if (r) for (i = 0; i < n; ++i) children[i].r += r; - e = packEnclose(children); - if (r) for (i = 0; i < n; ++i) children[i].r -= r; - node.r = e + r; - } - }; -} - -function translateChild(k) { - return function(node) { - var parent = node.parent; - node.r *= k; - if (parent) { - node.x = parent.x + k * node.x; - node.y = parent.y + k * node.y; - } - }; -} diff --git a/node_modules/d3-hierarchy/src/pack/siblings.js b/node_modules/d3-hierarchy/src/pack/siblings.js deleted file mode 100644 index 05047cfd55d59aebde38cd07a7a66a250d331954..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/pack/siblings.js +++ /dev/null @@ -1,119 +0,0 @@ -import array from "../array.js"; -import enclose from "./enclose.js"; - -function place(b, a, c) { - var dx = b.x - a.x, x, a2, - dy = b.y - a.y, y, b2, - d2 = dx * dx + dy * dy; - if (d2) { - a2 = a.r + c.r, a2 *= a2; - b2 = b.r + c.r, b2 *= b2; - if (a2 > b2) { - x = (d2 + b2 - a2) / (2 * d2); - y = Math.sqrt(Math.max(0, b2 / d2 - x * x)); - c.x = b.x - x * dx - y * dy; - c.y = b.y - x * dy + y * dx; - } else { - x = (d2 + a2 - b2) / (2 * d2); - y = Math.sqrt(Math.max(0, a2 / d2 - x * x)); - c.x = a.x + x * dx - y * dy; - c.y = a.y + x * dy + y * dx; - } - } else { - c.x = a.x + c.r; - c.y = a.y; - } -} - -function intersects(a, b) { - var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y; - return dr > 0 && dr * dr > dx * dx + dy * dy; -} - -function score(node) { - var a = node._, - b = node.next._, - ab = a.r + b.r, - dx = (a.x * b.r + b.x * a.r) / ab, - dy = (a.y * b.r + b.y * a.r) / ab; - return dx * dx + dy * dy; -} - -function Node(circle) { - this._ = circle; - this.next = null; - this.previous = null; -} - -export function packEnclose(circles) { - if (!(n = (circles = array(circles)).length)) return 0; - - var a, b, c, n, aa, ca, i, j, k, sj, sk; - - // Place the first circle. - a = circles[0], a.x = 0, a.y = 0; - if (!(n > 1)) return a.r; - - // Place the second circle. - b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0; - if (!(n > 2)) return a.r + b.r; - - // Place the third circle. - place(b, a, c = circles[2]); - - // Initialize the front-chain using the first three circles a, b and c. - a = new Node(a), b = new Node(b), c = new Node(c); - a.next = c.previous = b; - b.next = a.previous = c; - c.next = b.previous = a; - - // Attempt to place each remaining circle… - pack: for (i = 3; i < n; ++i) { - place(a._, b._, c = circles[i]), c = new Node(c); - - // Find the closest intersecting circle on the front-chain, if any. - // “Closeness†is determined by linear distance along the front-chain. - // “Ahead†or “behind†is likewise determined by linear distance. - j = b.next, k = a.previous, sj = b._.r, sk = a._.r; - do { - if (sj <= sk) { - if (intersects(j._, c._)) { - b = j, a.next = b, b.previous = a, --i; - continue pack; - } - sj += j._.r, j = j.next; - } else { - if (intersects(k._, c._)) { - a = k, a.next = b, b.previous = a, --i; - continue pack; - } - sk += k._.r, k = k.previous; - } - } while (j !== k.next); - - // Success! Insert the new circle c between a and b. - c.previous = a, c.next = b, a.next = b.previous = b = c; - - // Compute the new closest circle pair to the centroid. - aa = score(a); - while ((c = c.next) !== b) { - if ((ca = score(c)) < aa) { - a = c, aa = ca; - } - } - b = a.next; - } - - // Compute the enclosing circle of the front chain. - a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = enclose(a); - - // Translate the circles to put the enclosing circle around the origin. - for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y; - - return c.r; -} - -export default function(circles) { - packEnclose(circles); - return circles; -} diff --git a/node_modules/d3-hierarchy/src/partition.js b/node_modules/d3-hierarchy/src/partition.js deleted file mode 100644 index 0165ef73d7e8428e6cd3658419e280d6a70b9ba9..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/partition.js +++ /dev/null @@ -1,52 +0,0 @@ -import roundNode from "./treemap/round.js"; -import treemapDice from "./treemap/dice.js"; - -export default function() { - var dx = 1, - dy = 1, - padding = 0, - round = false; - - function partition(root) { - var n = root.height + 1; - root.x0 = - root.y0 = padding; - root.x1 = dx; - root.y1 = dy / n; - root.eachBefore(positionNode(dy, n)); - if (round) root.eachBefore(roundNode); - return root; - } - - function positionNode(dy, n) { - return function(node) { - if (node.children) { - treemapDice(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n); - } - var x0 = node.x0, - y0 = node.y0, - x1 = node.x1 - padding, - y1 = node.y1 - padding; - if (x1 < x0) x0 = x1 = (x0 + x1) / 2; - if (y1 < y0) y0 = y1 = (y0 + y1) / 2; - node.x0 = x0; - node.y0 = y0; - node.x1 = x1; - node.y1 = y1; - }; - } - - partition.round = function(x) { - return arguments.length ? (round = !!x, partition) : round; - }; - - partition.size = function(x) { - return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy]; - }; - - partition.padding = function(x) { - return arguments.length ? (padding = +x, partition) : padding; - }; - - return partition; -} diff --git a/node_modules/d3-hierarchy/src/stratify.js b/node_modules/d3-hierarchy/src/stratify.js deleted file mode 100644 index a6676c25c45fb7fd7d453942f074afa115e2f984..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/stratify.js +++ /dev/null @@ -1,75 +0,0 @@ -import {required} from "./accessors.js"; -import {Node, computeHeight} from "./hierarchy/index.js"; - -var preroot = {depth: -1}, - ambiguous = {}; - -function defaultId(d) { - return d.id; -} - -function defaultParentId(d) { - return d.parentId; -} - -export default function() { - var id = defaultId, - parentId = defaultParentId; - - function stratify(data) { - var nodes = Array.from(data), - n = nodes.length, - d, - i, - root, - parent, - node, - nodeId, - nodeKey, - nodeByKey = new Map; - - for (i = 0; i < n; ++i) { - d = nodes[i], node = nodes[i] = new Node(d); - if ((nodeId = id(d, i, data)) != null && (nodeId += "")) { - nodeKey = node.id = nodeId; - nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node); - } - if ((nodeId = parentId(d, i, data)) != null && (nodeId += "")) { - node.parent = nodeId; - } - } - - for (i = 0; i < n; ++i) { - node = nodes[i]; - if (nodeId = node.parent) { - parent = nodeByKey.get(nodeId); - if (!parent) throw new Error("missing: " + nodeId); - if (parent === ambiguous) throw new Error("ambiguous: " + nodeId); - if (parent.children) parent.children.push(node); - else parent.children = [node]; - node.parent = parent; - } else { - if (root) throw new Error("multiple roots"); - root = node; - } - } - - if (!root) throw new Error("no root"); - root.parent = preroot; - root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight); - root.parent = null; - if (n > 0) throw new Error("cycle"); - - return root; - } - - stratify.id = function(x) { - return arguments.length ? (id = required(x), stratify) : id; - }; - - stratify.parentId = function(x) { - return arguments.length ? (parentId = required(x), stratify) : parentId; - }; - - return stratify; -} diff --git a/node_modules/d3-hierarchy/src/tree.js b/node_modules/d3-hierarchy/src/tree.js deleted file mode 100644 index dc4275e4bee72abecea4dc3856eeb0d2a8f9faf3..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/tree.js +++ /dev/null @@ -1,237 +0,0 @@ -import {Node} from "./hierarchy/index.js"; - -function defaultSeparation(a, b) { - return a.parent === b.parent ? 1 : 2; -} - -// function radialSeparation(a, b) { -// return (a.parent === b.parent ? 1 : 2) / a.depth; -// } - -// This function is used to traverse the left contour of a subtree (or -// subforest). It returns the successor of v on this contour. This successor is -// either given by the leftmost child of v or by the thread of v. The function -// returns null if and only if v is on the highest level of its subtree. -function nextLeft(v) { - var children = v.children; - return children ? children[0] : v.t; -} - -// This function works analogously to nextLeft. -function nextRight(v) { - var children = v.children; - return children ? children[children.length - 1] : v.t; -} - -// Shifts the current subtree rooted at w+. This is done by increasing -// prelim(w+) and mod(w+) by shift. -function moveSubtree(wm, wp, shift) { - var change = shift / (wp.i - wm.i); - wp.c -= change; - wp.s += shift; - wm.c += change; - wp.z += shift; - wp.m += shift; -} - -// All other shifts, applied to the smaller subtrees between w- and w+, are -// performed by this function. To prepare the shifts, we have to adjust -// change(w+), shift(w+), and change(w-). -function executeShifts(v) { - var shift = 0, - change = 0, - children = v.children, - i = children.length, - w; - while (--i >= 0) { - w = children[i]; - w.z += shift; - w.m += shift; - shift += w.s + (change += w.c); - } -} - -// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise, -// returns the specified (default) ancestor. -function nextAncestor(vim, v, ancestor) { - return vim.a.parent === v.parent ? vim.a : ancestor; -} - -function TreeNode(node, i) { - this._ = node; - this.parent = null; - this.children = null; - this.A = null; // default ancestor - this.a = this; // ancestor - this.z = 0; // prelim - this.m = 0; // mod - this.c = 0; // change - this.s = 0; // shift - this.t = null; // thread - this.i = i; // number -} - -TreeNode.prototype = Object.create(Node.prototype); - -function treeRoot(root) { - var tree = new TreeNode(root, 0), - node, - nodes = [tree], - child, - children, - i, - n; - - while (node = nodes.pop()) { - if (children = node._.children) { - node.children = new Array(n = children.length); - for (i = n - 1; i >= 0; --i) { - nodes.push(child = node.children[i] = new TreeNode(children[i], i)); - child.parent = node; - } - } - } - - (tree.parent = new TreeNode(null, 0)).children = [tree]; - return tree; -} - -// Node-link tree diagram using the Reingold-Tilford "tidy" algorithm -export default function() { - var separation = defaultSeparation, - dx = 1, - dy = 1, - nodeSize = null; - - function tree(root) { - var t = treeRoot(root); - - // Compute the layout using Buchheim et al.’s algorithm. - t.eachAfter(firstWalk), t.parent.m = -t.z; - t.eachBefore(secondWalk); - - // If a fixed node size is specified, scale x and y. - if (nodeSize) root.eachBefore(sizeNode); - - // If a fixed tree size is specified, scale x and y based on the extent. - // Compute the left-most, right-most, and depth-most nodes for extents. - else { - var left = root, - right = root, - bottom = root; - root.eachBefore(function(node) { - if (node.x < left.x) left = node; - if (node.x > right.x) right = node; - if (node.depth > bottom.depth) bottom = node; - }); - var s = left === right ? 1 : separation(left, right) / 2, - tx = s - left.x, - kx = dx / (right.x + s + tx), - ky = dy / (bottom.depth || 1); - root.eachBefore(function(node) { - node.x = (node.x + tx) * kx; - node.y = node.depth * ky; - }); - } - - return root; - } - - // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is - // applied recursively to the children of v, as well as the function - // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the - // node v is placed to the midpoint of its outermost children. - function firstWalk(v) { - var children = v.children, - siblings = v.parent.children, - w = v.i ? siblings[v.i - 1] : null; - if (children) { - executeShifts(v); - var midpoint = (children[0].z + children[children.length - 1].z) / 2; - if (w) { - v.z = w.z + separation(v._, w._); - v.m = v.z - midpoint; - } else { - v.z = midpoint; - } - } else if (w) { - v.z = w.z + separation(v._, w._); - } - v.parent.A = apportion(v, w, v.parent.A || siblings[0]); - } - - // Computes all real x-coordinates by summing up the modifiers recursively. - function secondWalk(v) { - v._.x = v.z + v.parent.m; - v.m += v.parent.m; - } - - // The core of the algorithm. Here, a new subtree is combined with the - // previous subtrees. Threads are used to traverse the inside and outside - // contours of the left and right subtree up to the highest common level. The - // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the - // superscript o means outside and i means inside, the subscript - means left - // subtree and + means right subtree. For summing up the modifiers along the - // contour, we use respective variables si+, si-, so-, and so+. Whenever two - // nodes of the inside contours conflict, we compute the left one of the - // greatest uncommon ancestors using the function ANCESTOR and call MOVE - // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees. - // Finally, we add a new thread (if necessary). - function apportion(v, w, ancestor) { - if (w) { - var vip = v, - vop = v, - vim = w, - vom = vip.parent.children[0], - sip = vip.m, - sop = vop.m, - sim = vim.m, - som = vom.m, - shift; - while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) { - vom = nextLeft(vom); - vop = nextRight(vop); - vop.a = v; - shift = vim.z + sim - vip.z - sip + separation(vim._, vip._); - if (shift > 0) { - moveSubtree(nextAncestor(vim, v, ancestor), v, shift); - sip += shift; - sop += shift; - } - sim += vim.m; - sip += vip.m; - som += vom.m; - sop += vop.m; - } - if (vim && !nextRight(vop)) { - vop.t = vim; - vop.m += sim - sop; - } - if (vip && !nextLeft(vom)) { - vom.t = vip; - vom.m += sip - som; - ancestor = v; - } - } - return ancestor; - } - - function sizeNode(node) { - node.x *= dx; - node.y = node.depth * dy; - } - - tree.separation = function(x) { - return arguments.length ? (separation = x, tree) : separation; - }; - - tree.size = function(x) { - return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]); - }; - - tree.nodeSize = function(x) { - return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null); - }; - - return tree; -} diff --git a/node_modules/d3-hierarchy/src/treemap/binary.js b/node_modules/d3-hierarchy/src/treemap/binary.js deleted file mode 100644 index a9395dc2598fe50900dc49b5ecd5a98254952e89..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/treemap/binary.js +++ /dev/null @@ -1,46 +0,0 @@ -export default function(parent, x0, y0, x1, y1) { - var nodes = parent.children, - i, n = nodes.length, - sum, sums = new Array(n + 1); - - for (sums[0] = sum = i = 0; i < n; ++i) { - sums[i + 1] = sum += nodes[i].value; - } - - partition(0, n, parent.value, x0, y0, x1, y1); - - function partition(i, j, value, x0, y0, x1, y1) { - if (i >= j - 1) { - var node = nodes[i]; - node.x0 = x0, node.y0 = y0; - node.x1 = x1, node.y1 = y1; - return; - } - - var valueOffset = sums[i], - valueTarget = (value / 2) + valueOffset, - k = i + 1, - hi = j - 1; - - while (k < hi) { - var mid = k + hi >>> 1; - if (sums[mid] < valueTarget) k = mid + 1; - else hi = mid; - } - - if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k; - - var valueLeft = sums[k] - valueOffset, - valueRight = value - valueLeft; - - if ((x1 - x0) > (y1 - y0)) { - var xk = value ? (x0 * valueRight + x1 * valueLeft) / value : x1; - partition(i, k, valueLeft, x0, y0, xk, y1); - partition(k, j, valueRight, xk, y0, x1, y1); - } else { - var yk = value ? (y0 * valueRight + y1 * valueLeft) / value : y1; - partition(i, k, valueLeft, x0, y0, x1, yk); - partition(k, j, valueRight, x0, yk, x1, y1); - } - } -} diff --git a/node_modules/d3-hierarchy/src/treemap/dice.js b/node_modules/d3-hierarchy/src/treemap/dice.js deleted file mode 100644 index 605c1f66b837a44cc6f425e1fade2ef2a1872dc3..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/treemap/dice.js +++ /dev/null @@ -1,12 +0,0 @@ -export default function(parent, x0, y0, x1, y1) { - var nodes = parent.children, - node, - i = -1, - n = nodes.length, - k = parent.value && (x1 - x0) / parent.value; - - while (++i < n) { - node = nodes[i], node.y0 = y0, node.y1 = y1; - node.x0 = x0, node.x1 = x0 += node.value * k; - } -} diff --git a/node_modules/d3-hierarchy/src/treemap/index.js b/node_modules/d3-hierarchy/src/treemap/index.js deleted file mode 100644 index ccc42c9db4588b832008a0f13a3bd3b3567dd765..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/treemap/index.js +++ /dev/null @@ -1,94 +0,0 @@ -import roundNode from "./round.js"; -import squarify from "./squarify.js"; -import {required} from "../accessors.js"; -import constant, {constantZero} from "../constant.js"; - -export default function() { - var tile = squarify, - round = false, - dx = 1, - dy = 1, - paddingStack = [0], - paddingInner = constantZero, - paddingTop = constantZero, - paddingRight = constantZero, - paddingBottom = constantZero, - paddingLeft = constantZero; - - function treemap(root) { - root.x0 = - root.y0 = 0; - root.x1 = dx; - root.y1 = dy; - root.eachBefore(positionNode); - paddingStack = [0]; - if (round) root.eachBefore(roundNode); - return root; - } - - function positionNode(node) { - var p = paddingStack[node.depth], - x0 = node.x0 + p, - y0 = node.y0 + p, - x1 = node.x1 - p, - y1 = node.y1 - p; - if (x1 < x0) x0 = x1 = (x0 + x1) / 2; - if (y1 < y0) y0 = y1 = (y0 + y1) / 2; - node.x0 = x0; - node.y0 = y0; - node.x1 = x1; - node.y1 = y1; - if (node.children) { - p = paddingStack[node.depth + 1] = paddingInner(node) / 2; - x0 += paddingLeft(node) - p; - y0 += paddingTop(node) - p; - x1 -= paddingRight(node) - p; - y1 -= paddingBottom(node) - p; - if (x1 < x0) x0 = x1 = (x0 + x1) / 2; - if (y1 < y0) y0 = y1 = (y0 + y1) / 2; - tile(node, x0, y0, x1, y1); - } - } - - treemap.round = function(x) { - return arguments.length ? (round = !!x, treemap) : round; - }; - - treemap.size = function(x) { - return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy]; - }; - - treemap.tile = function(x) { - return arguments.length ? (tile = required(x), treemap) : tile; - }; - - treemap.padding = function(x) { - return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner(); - }; - - treemap.paddingInner = function(x) { - return arguments.length ? (paddingInner = typeof x === "function" ? x : constant(+x), treemap) : paddingInner; - }; - - treemap.paddingOuter = function(x) { - return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop(); - }; - - treemap.paddingTop = function(x) { - return arguments.length ? (paddingTop = typeof x === "function" ? x : constant(+x), treemap) : paddingTop; - }; - - treemap.paddingRight = function(x) { - return arguments.length ? (paddingRight = typeof x === "function" ? x : constant(+x), treemap) : paddingRight; - }; - - treemap.paddingBottom = function(x) { - return arguments.length ? (paddingBottom = typeof x === "function" ? x : constant(+x), treemap) : paddingBottom; - }; - - treemap.paddingLeft = function(x) { - return arguments.length ? (paddingLeft = typeof x === "function" ? x : constant(+x), treemap) : paddingLeft; - }; - - return treemap; -} diff --git a/node_modules/d3-hierarchy/src/treemap/resquarify.js b/node_modules/d3-hierarchy/src/treemap/resquarify.js deleted file mode 100644 index de72047377f8bf4fac8a24f3158500dcb84739eb..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/treemap/resquarify.js +++ /dev/null @@ -1,36 +0,0 @@ -import treemapDice from "./dice.js"; -import treemapSlice from "./slice.js"; -import {phi, squarifyRatio} from "./squarify.js"; - -export default (function custom(ratio) { - - function resquarify(parent, x0, y0, x1, y1) { - if ((rows = parent._squarify) && (rows.ratio === ratio)) { - var rows, - row, - nodes, - i, - j = -1, - n, - m = rows.length, - value = parent.value; - - while (++j < m) { - row = rows[j], nodes = row.children; - for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value; - if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += (y1 - y0) * row.value / value : y1); - else treemapSlice(row, x0, y0, value ? x0 += (x1 - x0) * row.value / value : x1, y1); - value -= row.value; - } - } else { - parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1); - rows.ratio = ratio; - } - } - - resquarify.ratio = function(x) { - return custom((x = +x) > 1 ? x : 1); - }; - - return resquarify; -})(phi); diff --git a/node_modules/d3-hierarchy/src/treemap/round.js b/node_modules/d3-hierarchy/src/treemap/round.js deleted file mode 100644 index 7ac45ec299da531fdf83548932c34b52b76f83a1..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/treemap/round.js +++ /dev/null @@ -1,6 +0,0 @@ -export default function(node) { - node.x0 = Math.round(node.x0); - node.y0 = Math.round(node.y0); - node.x1 = Math.round(node.x1); - node.y1 = Math.round(node.y1); -} diff --git a/node_modules/d3-hierarchy/src/treemap/slice.js b/node_modules/d3-hierarchy/src/treemap/slice.js deleted file mode 100644 index 1022bfad29d2ca4fc8717d1030c84baed4c8a13d..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/treemap/slice.js +++ /dev/null @@ -1,12 +0,0 @@ -export default function(parent, x0, y0, x1, y1) { - var nodes = parent.children, - node, - i = -1, - n = nodes.length, - k = parent.value && (y1 - y0) / parent.value; - - while (++i < n) { - node = nodes[i], node.x0 = x0, node.x1 = x1; - node.y0 = y0, node.y1 = y0 += node.value * k; - } -} diff --git a/node_modules/d3-hierarchy/src/treemap/sliceDice.js b/node_modules/d3-hierarchy/src/treemap/sliceDice.js deleted file mode 100644 index 545ad42b1d99ecdaca06960c191a2e3b756e8459..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/treemap/sliceDice.js +++ /dev/null @@ -1,6 +0,0 @@ -import dice from "./dice.js"; -import slice from "./slice.js"; - -export default function(parent, x0, y0, x1, y1) { - (parent.depth & 1 ? slice : dice)(parent, x0, y0, x1, y1); -} diff --git a/node_modules/d3-hierarchy/src/treemap/squarify.js b/node_modules/d3-hierarchy/src/treemap/squarify.js deleted file mode 100644 index f8010703099abb59ed7761c13e34665a8108937b..0000000000000000000000000000000000000000 --- a/node_modules/d3-hierarchy/src/treemap/squarify.js +++ /dev/null @@ -1,66 +0,0 @@ -import treemapDice from "./dice.js"; -import treemapSlice from "./slice.js"; - -export var phi = (1 + Math.sqrt(5)) / 2; - -export function squarifyRatio(ratio, parent, x0, y0, x1, y1) { - var rows = [], - nodes = parent.children, - row, - nodeValue, - i0 = 0, - i1 = 0, - n = nodes.length, - dx, dy, - value = parent.value, - sumValue, - minValue, - maxValue, - newRatio, - minRatio, - alpha, - beta; - - while (i0 < n) { - dx = x1 - x0, dy = y1 - y0; - - // Find the next non-empty node. - do sumValue = nodes[i1++].value; while (!sumValue && i1 < n); - minValue = maxValue = sumValue; - alpha = Math.max(dy / dx, dx / dy) / (value * ratio); - beta = sumValue * sumValue * alpha; - minRatio = Math.max(maxValue / beta, beta / minValue); - - // Keep adding nodes while the aspect ratio maintains or improves. - for (; i1 < n; ++i1) { - sumValue += nodeValue = nodes[i1].value; - if (nodeValue < minValue) minValue = nodeValue; - if (nodeValue > maxValue) maxValue = nodeValue; - beta = sumValue * sumValue * alpha; - newRatio = Math.max(maxValue / beta, beta / minValue); - if (newRatio > minRatio) { sumValue -= nodeValue; break; } - minRatio = newRatio; - } - - // Position and record the row orientation. - rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)}); - if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1); - else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1); - value -= sumValue, i0 = i1; - } - - return rows; -} - -export default (function custom(ratio) { - - function squarify(parent, x0, y0, x1, y1) { - squarifyRatio(ratio, parent, x0, y0, x1, y1); - } - - squarify.ratio = function(x) { - return custom((x = +x) > 1 ? x : 1); - }; - - return squarify; -})(phi); diff --git a/node_modules/d3-interpolate/LICENSE b/node_modules/d3-interpolate/LICENSE deleted file mode 100644 index 721bd22ece6587a9408eda1b6a3949c425b5624a..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-interpolate/README.md b/node_modules/d3-interpolate/README.md deleted file mode 100644 index a7e723226420f4f647a2a08f952576fd9f4988e2..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/README.md +++ /dev/null @@ -1,258 +0,0 @@ -# d3-interpolate - -This module provides a variety of interpolation methods for blending between two values. Values may be numbers, colors, strings, arrays, or even deeply-nested objects. For example: - -```js -var i = d3.interpolateNumber(10, 20); -i(0.0); // 10 -i(0.2); // 12 -i(0.5); // 15 -i(1.0); // 20 -``` - -The returned function `i` is called an *interpolator*. Given a starting value *a* and an ending value *b*, it takes a parameter *t* in the domain [0, 1] and returns the corresponding interpolated value between *a* and *b*. An interpolator typically returns a value equivalent to *a* at *t* = 0 and a value equivalent to *b* at *t* = 1. - -You can interpolate more than just numbers. To find the perceptual midpoint between steelblue and brown: - -```js -d3.interpolateLab("steelblue", "brown")(0.5); // "rgb(142, 92, 109)" -``` - -Here’s a more elaborate example demonstrating type inference used by [interpolate](#interpolate): - -```js -var i = d3.interpolate({colors: ["red", "blue"]}, {colors: ["white", "black"]}); -i(0.0); // {colors: ["rgb(255, 0, 0)", "rgb(0, 0, 255)"]} -i(0.5); // {colors: ["rgb(255, 128, 128)", "rgb(0, 0, 128)"]} -i(1.0); // {colors: ["rgb(255, 255, 255)", "rgb(0, 0, 0)"]} -``` - -Note that the generic value interpolator detects not only nested objects and arrays, but also color strings and numbers embedded in strings! - -## Installing - -If you use NPM, `npm install d3-interpolate`. Otherwise, download the [latest release](https://github.com/d3/d3-interpolate/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-interpolate.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. - -In vanilla, a `d3` global is exported. (If using [color interpolation](#color-spaces), also load [d3-color](https://github.com/d3/d3-color).) - -```html -<script src="https://d3js.org/d3-color.v2.min.js"></script> -<script src="https://d3js.org/d3-interpolate.v2.min.js"></script> -<script> - -var interpolate = d3.interpolateRgb("steelblue", "brown"); - -</script> -``` - -## API Reference - -<a name="interpolate" href="#interpolate">#</a> d3.<b>interpolate</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/value.js), [Examples](https://observablehq.com/@d3/d3-interpolate) - -Returns an interpolator between the two arbitrary values *a* and *b*. The interpolator implementation is based on the type of the end value *b*, using the following algorithm: - -1. If *b* is null, undefined or a boolean, use the constant *b*. -2. If *b* is a number, use [interpolateNumber](#interpolateNumber). -3. If *b* is a [color](https://github.com/d3/d3-color/blob/master/README.md#color) or a string coercible to a color, use [interpolateRgb](#interpolateRgb). -4. If *b* is a [date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date), use [interpolateDate](#interpolateDate). -5. If *b* is a string, use [interpolateString](#interpolateString). -6. If *b* is a [typed array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray) of numbers, use [interpolateNumberArray](#interpolateNumberArray). -7. If *b* is a generic [array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/isArray), use [interpolateArray](#interpolateArray). -8. If *b* is coercible to a number, use [interpolateNumber](#interpolateNumber). -9. Use [interpolateObject](#interpolateObject). - -Based on the chosen interpolator, *a* is coerced to the suitable corresponding type. - -<a name="interpolateNumber" href="#interpolateNumber">#</a> d3.<b>interpolateNumber</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/number.js), [Examples](https://observablehq.com/@d3/d3-interpolatenumber) - -Returns an interpolator between the two numbers *a* and *b*. The returned interpolator is equivalent to: - -```js -function interpolator(t) { - return a * (1 - t) + b * t; -} -``` - -Caution: avoid interpolating to or from the number zero when the interpolator is used to generate a string. When very small values are stringified, they may be converted to scientific notation, which is an invalid attribute or style property value in older browsers. For example, the number `0.0000001` is converted to the string `"1e-7"`. This is particularly noticeable with interpolating opacity. To avoid scientific notation, start or end the transition at 1e-6: the smallest value that is not stringified in scientific notation. - -<a name="interpolateRound" href="#interpolateRound">#</a> d3.<b>interpolateRound</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/round.js), [Examples](https://observablehq.com/@d3/d3-interpolatenumber) - -Returns an interpolator between the two numbers *a* and *b*; the interpolator is similar to [interpolateNumber](#interpolateNumber), except it will round the resulting value to the nearest integer. - -<a name="interpolateString" href="#interpolateString">#</a> d3.<b>interpolateString</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/string.js), [Examples](https://observablehq.com/@d3/d3-interpolatestring) - -Returns an interpolator between the two strings *a* and *b*. The string interpolator finds numbers embedded in *a* and *b*, where each number is of the form understood by JavaScript. A few examples of numbers that will be detected within a string: `-1`, `42`, `3.14159`, and `6.0221413e+23`. - -For each number embedded in *b*, the interpolator will attempt to find a corresponding number in *a*. If a corresponding number is found, a numeric interpolator is created using [interpolateNumber](#interpolateNumber). The remaining parts of the string *b* are used as a template: the static parts of the string *b* remain constant for the interpolation, with the interpolated numeric values embedded in the template. - -For example, if *a* is `"300 12px sans-serif"`, and *b* is `"500 36px Comic-Sans"`, two embedded numbers are found. The remaining static parts (of string *b*) are a space between the two numbers (`" "`), and the suffix (`"px Comic-Sans"`). The result of the interpolator at *t* = 0.5 is `"400 24px Comic-Sans"`. - -<a name="interpolateDate" href="#interpolateDate">#</a> d3.<b>interpolateDate</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/date.js), [Examples](https://observablehq.com/@d3/d3-interpolatedate) - -Returns an interpolator between the two [dates](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) *a* and *b*. - -Note: **no defensive copy** of the returned date is created; the same Date instance is returned for every evaluation of the interpolator. No copy is made for performance reasons; interpolators are often part of the inner loop of [animated transitions](https://github.com/d3/d3-transition). - -<a name="interpolateArray" href="#interpolateArray">#</a> d3.<b>interpolateArray</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/array.js), [Examples](https://observablehq.com/@d3/d3-interpolateobject) - -Returns an interpolator between the two arrays *a* and *b*. If *b* is a typed array (e.g., Float64Array), [interpolateNumberArray](#interpolateNumberArray) is called instead. - -Internally, an array template is created that is the same length as *b*. For each element in *b*, if there exists a corresponding element in *a*, a generic interpolator is created for the two elements using [interpolate](#interpolate). If there is no such element, the static value from *b* is used in the template. Then, for the given parameter *t*, the template’s embedded interpolators are evaluated. The updated array template is then returned. - -For example, if *a* is the array `[0, 1]` and *b* is the array `[1, 10, 100]`, then the result of the interpolator for *t* = 0.5 is the array `[0.5, 5.5, 100]`. - -Note: **no defensive copy** of the template array is created; modifications of the returned array may adversely affect subsequent evaluation of the interpolator. No copy is made for performance reasons; interpolators are often part of the inner loop of [animated transitions](https://github.com/d3/d3-transition). - -<a name="interpolateNumberArray" href="#interpolateNumberArray">#</a> d3.<b>interpolateNumberArray</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/numberArray.js), [Examples](https://observablehq.com/@d3/d3-interpolatenumberarray) - -Returns an interpolator between the two arrays of numbers *a* and *b*. Internally, an array template is created that is the same type and length as *b*. For each element in *b*, if there exists a corresponding element in *a*, the values are directly interpolated in the array template. If there is no such element, the static value from *b* is copied. The updated array template is then returned. - -Note: For performance reasons, **no defensive copy** is made of the template array and the arguments *a* and *b*; modifications of these arrays may affect subsequent evaluation of the interpolator. - -<a name="interpolateObject" href="#interpolateObject">#</a> d3.<b>interpolateObject</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/object.js), [Examples](https://observablehq.com/@d3/d3-interpolateobject) - -Returns an interpolator between the two objects *a* and *b*. Internally, an object template is created that has the same properties as *b*. For each property in *b*, if there exists a corresponding property in *a*, a generic interpolator is created for the two elements using [interpolate](#interpolate). If there is no such property, the static value from *b* is used in the template. Then, for the given parameter *t*, the template's embedded interpolators are evaluated and the updated object template is then returned. - -For example, if *a* is the object `{x: 0, y: 1}` and *b* is the object `{x: 1, y: 10, z: 100}`, the result of the interpolator for *t* = 0.5 is the object `{x: 0.5, y: 5.5, z: 100}`. - -Object interpolation is particularly useful for *dataspace interpolation*, where data is interpolated rather than attribute values. For example, you can interpolate an object which describes an arc in a pie chart, and then use [d3.arc](https://github.com/d3/d3-shape/blob/master/README.md#arc) to compute the new SVG path data. - -Note: **no defensive copy** of the template object is created; modifications of the returned object may adversely affect subsequent evaluation of the interpolator. No copy is made for performance reasons; interpolators are often part of the inner loop of [animated transitions](https://github.com/d3/d3-transition). - -<a name="interpolateTransformCss" href="#interpolateTransformCss">#</a> d3.<b>interpolateTransformCss</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/transform/index.js#L62), [Examples](https://observablehq.com/@d3/d3-interpolatetransformcss) - -Returns an interpolator between the two 2D CSS transforms represented by *a* and *b*. Each transform is decomposed to a standard representation of translate, rotate, *x*-skew and scale; these component transformations are then interpolated. This behavior is standardized by CSS: see [matrix decomposition for animation](http://www.w3.org/TR/css3-2d-transforms/#matrix-decomposition). - -<a name="interpolateTransformSvg" href="#interpolateTransformSvg">#</a> d3.<b>interpolateTransformSvg</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/transform/index.js#L63), [Examples](https://observablehq.com/@d3/d3-interpolatetransformcss) - -Returns an interpolator between the two 2D SVG transforms represented by *a* and *b*. Each transform is decomposed to a standard representation of translate, rotate, *x*-skew and scale; these component transformations are then interpolated. This behavior is standardized by CSS: see [matrix decomposition for animation](http://www.w3.org/TR/css3-2d-transforms/#matrix-decomposition). - -<a name="interpolateZoom" href="#interpolateZoom">#</a> d3.<b>interpolateZoom</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/zoom.js), [Examples](https://observablehq.com/@d3/d3-interpolatezoom) - -Returns an interpolator between the two views *a* and *b* of a two-dimensional plane, based on [“Smooth and efficient zooming and panningâ€](http://www.win.tue.nl/~vanwijk/zoompan.pdf) by Jarke J. van Wijk and Wim A.A. Nuij. Each view is defined as an array of three numbers: *cx*, *cy* and *width*. The first two coordinates *cx*, *cy* represent the center of the viewport; the last coordinate *width* represents the size of the viewport. - -The returned interpolator exposes a *duration* property which encodes the recommended transition duration in milliseconds. This duration is based on the path length of the curved trajectory through *x,y* space. If you want a slower or faster transition, multiply this by an arbitrary scale factor (<i>V</i> as described in the original paper). - -<a name="interpolate_rho" href="#interpolate_rho">#</a> *interpolateZoom*.<b>rho</b>(<i>rho</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/zoom.js)<!-- , [Examples](https://observablehq.com/@d3/interpolatezoom-rho) --> - -Given a [zoom interpolator](#interpolateZoom), returns a new zoom interpolator using the specified curvature *rho*. When *rho* is close to 0, the interpolator is almost linear. The default curvature is sqrt(2). - -<a name="interpolateDiscrete" href="#interpolateDiscrete">#</a> d3.<b>interpolateDiscrete</b>(<i>values</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/discrete.js), [Examples](https://observablehq.com/@d3/d3-interpolatediscrete) - -Returns a discrete interpolator for the given array of *values*. The returned interpolator maps *t* in [0, 1 / *n*) to *values*[0], *t* in [1 / *n*, 2 / *n*) to *values*[1], and so on, where *n* = *values*.length. In effect, this is a lightweight [quantize scale](https://github.com/d3/d3-scale/blob/master/README.md#quantize-scales) with a fixed domain of [0, 1]. - -### Sampling - -<a name="quantize" href="#quantize">#</a> d3.<b>quantize</b>(<i>interpolator</i>, <i>n</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/quantize.js), [Examples](https://observablehq.com/@d3/d3-quantize) - -Returns *n* uniformly-spaced samples from the specified *interpolator*, where *n* is an integer greater than one. The first sample is always at *t* = 0, and the last sample is always at *t* = 1. This can be useful in generating a fixed number of samples from a given interpolator, such as to derive the range of a [quantize scale](https://github.com/d3/d3-scale/blob/master/README.md#quantize-scales) from a [continuous interpolator](https://github.com/d3/d3-scale-chromatic/blob/master/README.md#interpolateWarm). - -Caution: this method will not work with interpolators that do not return defensive copies of their output, such as [d3.interpolateArray](#interpolateArray), [d3.interpolateDate](#interpolateDate) and [d3.interpolateObject](#interpolateObject). For those interpolators, you must wrap the interpolator and create a copy for each returned value. - -### Color Spaces - -<a name="interpolateRgb" href="#interpolateRgb">#</a> d3.<b>interpolateRgb</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/rgb.js), [Examples](https://observablehq.com/@d3/working-with-color) - -<img src="https://raw.githubusercontent.com/d3/d3-interpolate/master/img/rgb.png" width="100%" height="40" alt="rgb"> - -Or, with a corrected [gamma](#interpolate_gamma) of 2.2: - -<img src="https://raw.githubusercontent.com/d3/d3-interpolate/master/img/rgbGamma.png" width="100%" height="40" alt="rgbGamma"> - -Returns an RGB color space interpolator between the two colors *a* and *b* with a configurable [gamma](#interpolate_gamma). If the gamma is not specified, it defaults to 1.0. The colors *a* and *b* need not be in RGB; they will be converted to RGB using [d3.rgb](https://github.com/d3/d3-color/blob/master/README.md#rgb). The return value of the interpolator is an RGB string. - -<a href="#interpolateRgbBasis" name="interpolateRgbBasis">#</a> d3.<b>interpolateRgbBasis</b>(<i>colors</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/rgb.js#L54), [Examples](https://observablehq.com/@d3/working-with-color) - -Returns a uniform nonrational B-spline interpolator through the specified array of *colors*, which are converted to [RGB color space](https://github.com/d3/d3-color/blob/master/README.md#rgb). Implicit control points are generated such that the interpolator returns *colors*[0] at *t* = 0 and *colors*[*colors*.length - 1] at *t* = 1. Opacity interpolation is not currently supported. See also [d3.interpolateBasis](#interpolateBasis), and see [d3-scale-chromatic](https://github.com/d3/d3-scale-chromatic) for examples. - -<a href="#interpolateRgbBasisClosed" name="interpolateRgbBasisClosed">#</a> d3.<b>interpolateRgbBasisClosed</b>(<i>colors</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/rgb.js#L55), [Examples](https://observablehq.com/@d3/working-with-color) - -Returns a uniform nonrational B-spline interpolator through the specified array of *colors*, which are converted to [RGB color space](https://github.com/d3/d3-color/blob/master/README.md#rgb). The control points are implicitly repeated such that the resulting spline has cyclical C² continuity when repeated around *t* in [0,1]; this is useful, for example, to create cyclical color scales. Opacity interpolation is not currently supported. See also [d3.interpolateBasisClosed](#interpolateBasisClosed), and see [d3-scale-chromatic](https://github.com/d3/d3-scale-chromatic) for examples. - -<a name="interpolateHsl" href="#interpolateHsl">#</a> d3.<b>interpolateHsl</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/hsl.js), [Examples](https://observablehq.com/@d3/working-with-color) - -<img src="https://raw.githubusercontent.com/d3/d3-interpolate/master/img/hsl.png" width="100%" height="40" alt="hsl"> - -Returns an HSL color space interpolator between the two colors *a* and *b*. The colors *a* and *b* need not be in HSL; they will be converted to HSL using [d3.hsl](https://github.com/d3/d3-color/blob/master/README.md#hsl). If either color’s hue or saturation is NaN, the opposing color’s channel value is used. The shortest path between hues is used. The return value of the interpolator is an RGB string. - -<a name="interpolateHslLong" href="#interpolateHslLong">#</a> d3.<b>interpolateHslLong</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/hsl.js#L21), [Examples](https://observablehq.com/@d3/working-with-color) - -<img src="https://raw.githubusercontent.com/d3/d3-interpolate/master/img/hslLong.png" width="100%" height="40" alt="hslLong"> - -Like [interpolateHsl](#interpolateHsl), but does not use the shortest path between hues. - -<a name="interpolateLab" href="#interpolateLab">#</a> d3.<b>interpolateLab</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/lab.js), [Examples](https://observablehq.com/@d3/working-with-color) - -<img src="https://raw.githubusercontent.com/d3/d3-interpolate/master/img/lab.png" width="100%" height="40" alt="lab"> - -Returns a [CIELAB color space](https://en.wikipedia.org/wiki/Lab_color_space#CIELAB) interpolator between the two colors *a* and *b*. The colors *a* and *b* need not be in CIELAB; they will be converted to CIELAB using [d3.lab](https://github.com/d3/d3-color/blob/master/README.md#lab). The return value of the interpolator is an RGB string. - -<a name="interpolateHcl" href="#interpolateHcl">#</a> d3.<b>interpolateHcl</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/hcl.js), [Examples](https://observablehq.com/@d3/working-with-color) - -<img src="https://raw.githubusercontent.com/d3/d3-interpolate/master/img/hcl.png" width="100%" height="40" alt="hcl"> - -Returns a [CIELCh<sub>ab</sub> color space](https://en.wikipedia.org/wiki/CIELAB_color_space#Cylindrical_representation:_CIELCh_or_CIEHLC) interpolator between the two colors *a* and *b*. The colors *a* and *b* need not be in CIELCh<sub>ab</sub>; they will be converted to CIELCh<sub>ab</sub> using [d3.hcl](https://github.com/d3/d3-color/blob/master/README.md#hcl). If either color’s hue or chroma is NaN, the opposing color’s channel value is used. The shortest path between hues is used. The return value of the interpolator is an RGB string. - -<a name="interpolateHclLong" href="#interpolateHclLong">#</a> d3.<b>interpolateHclLong</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/hcl.js#L21), [Examples](https://observablehq.com/@d3/working-with-color) - -<img src="https://raw.githubusercontent.com/d3/d3-interpolate/master/img/hclLong.png" width="100%" height="40" alt="hclLong"> - -Like [interpolateHcl](#interpolateHcl), but does not use the shortest path between hues. - -<a name="interpolateCubehelix" href="#interpolateCubehelix">#</a> d3.<b>interpolateCubehelix</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/cubehelix.js), [Examples](https://observablehq.com/@d3/working-with-color) - -<img src="https://raw.githubusercontent.com/d3/d3-interpolate/master/img/cubehelix.png" width="100%" height="40" alt="cubehelix"> - -Or, with a [gamma](#interpolate_gamma) of 3.0 to emphasize high-intensity values: - -<img src="https://raw.githubusercontent.com/d3/d3-interpolate/master/img/cubehelixGamma.png" width="100%" height="40" alt="cubehelixGamma"> - -Returns a Cubehelix color space interpolator between the two colors *a* and *b* using a configurable [gamma](#interpolate_gamma). If the gamma is not specified, it defaults to 1.0. The colors *a* and *b* need not be in Cubehelix; they will be converted to Cubehelix using [d3.cubehelix](https://github.com/d3/d3-color/blob/master/README.md#cubehelix). If either color’s hue or saturation is NaN, the opposing color’s channel value is used. The shortest path between hues is used. The return value of the interpolator is an RGB string. - -<a name="interpolateCubehelixLong" href="#interpolateCubehelixLong">#</a> d3.<b>interpolateCubehelixLong</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/cubehelix.js#L29), [Examples](https://observablehq.com/@d3/working-with-color) - -<img src="https://raw.githubusercontent.com/d3/d3-interpolate/master/img/cubehelixLong.png" width="100%" height="40" alt="cubehelixLong"> - -Or, with a [gamma](#interpolate_gamma) of 3.0 to emphasize high-intensity values: - -<img src="https://raw.githubusercontent.com/d3/d3-interpolate/master/img/cubehelixGammaLong.png" width="100%" height="40" alt="cubehelixGammaLong"> - -Like [interpolateCubehelix](#interpolateCubehelix), but does not use the shortest path between hues. - -<a name="interpolate_gamma" href="#interpolate_gamma">#</a> <i>interpolate</i>.<b>gamma</b>(<i>gamma</i>) - -Given that *interpolate* is one of [interpolateRgb](#interpolateRgb), [interpolateCubehelix](#interpolateCubehelix) or [interpolateCubehelixLong](#interpolateCubehelixLong), returns a new interpolator factory of the same type using the specified *gamma*. For example, to interpolate from purple to orange with a gamma of 2.2 in RGB space: - -```js -var interpolator = d3.interpolateRgb.gamma(2.2)("purple", "orange"); -``` - -See Eric Brasseur’s article, [Gamma error in picture scaling](http://www.ericbrasseur.org/gamma.html), for more on gamma correction. - -<a name="interpolateHue" href="#interpolateHue">#</a> d3.<b>interpolateHue</b>(<i>a</i>, <i>b</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/hue.js), [Examples](https://observablehq.com/@d3/working-with-color) - -Returns an interpolator between the two hue angles *a* and *b*. If either hue is NaN, the opposing value is used. The shortest path between hues is used. The return value of the interpolator is a number in [0, 360). - -### Splines - -Whereas standard interpolators blend from a starting value *a* at *t* = 0 to an ending value *b* at *t* = 1, spline interpolators smoothly blend multiple input values for *t* in [0,1] using piecewise polynomial functions. Only cubic uniform nonrational [B-splines](https://en.wikipedia.org/wiki/B-spline) are currently supported, also known as basis splines. - -<a href="#interpolateBasis" name="interpolateBasis">#</a> d3.<b>interpolateBasis</b>(<i>values</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/basis.js), [Examples](https://observablehq.com/@d3/d3-interpolatebasis) - -Returns a uniform nonrational B-spline interpolator through the specified array of *values*, which must be numbers. Implicit control points are generated such that the interpolator returns *values*[0] at *t* = 0 and *values*[*values*.length - 1] at *t* = 1. See also [d3.curveBasis](https://github.com/d3/d3-shape/blob/master/README.md#curveBasis). - -<a href="#interpolateBasisClosed" name="interpolateBasisClosed">#</a> d3.<b>interpolateBasisClosed</b>(<i>values</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/basisClosed.js), [Examples](https://observablehq.com/@d3/d3-interpolatebasis) - -Returns a uniform nonrational B-spline interpolator through the specified array of *values*, which must be numbers. The control points are implicitly repeated such that the resulting one-dimensional spline has cyclical C² continuity when repeated around *t* in [0,1]. See also [d3.curveBasisClosed](https://github.com/d3/d3-shape/blob/master/README.md#curveBasisClosed). - -### Piecewise - -<a name="piecewise" href="#piecewise">#</a> d3.<b>piecewise</b>([<i>interpolate</i>, ]<i>values</i>) · [Source](https://github.com/d3/d3-interpolate/blob/master/src/piecewise.js), [Examples](https://observablehq.com/@d3/d3-piecewise) - -Returns a piecewise interpolator, composing interpolators for each adjacent pair of *values*. The returned interpolator maps *t* in [0, 1 / (*n* - 1)] to *interpolate*(*values*[0], *values*[1]), *t* in [1 / (*n* - 1), 2 / (*n* - 1)] to *interpolate*(*values*[1], *values*[2]), and so on, where *n* = *values*.length. In effect, this is a lightweight [linear scale](https://github.com/d3/d3-scale/blob/master/README.md#linear-scales). For example, to blend through red, green and blue: - -```js -var interpolate = d3.piecewise(d3.interpolateRgb.gamma(2.2), ["red", "green", "blue"]); -``` - -If *interpolate* is not specified, defaults to [d3.interpolate](#interpolate). diff --git a/node_modules/d3-interpolate/dist/d3-interpolate.js b/node_modules/d3-interpolate/dist/d3-interpolate.js deleted file mode 100644 index 387e7a651e4ff42f433d7ba18f4183ebc3b13d6e..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/dist/d3-interpolate.js +++ /dev/null @@ -1,590 +0,0 @@ -// https://d3js.org/d3-interpolate/ v2.0.1 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-color')) : -typeof define === 'function' && define.amd ? define(['exports', 'd3-color'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {}, global.d3)); -}(this, function (exports, d3Color) { 'use strict'; - -function basis(t1, v0, v1, v2, v3) { - var t2 = t1 * t1, t3 = t2 * t1; - return ((1 - 3 * t1 + 3 * t2 - t3) * v0 - + (4 - 6 * t2 + 3 * t3) * v1 - + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 - + t3 * v3) / 6; -} - -function basis$1(values) { - var n = values.length - 1; - return function(t) { - var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), - v1 = values[i], - v2 = values[i + 1], - v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, - v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; - return basis((t - i / n) * n, v0, v1, v2, v3); - }; -} - -function basisClosed(values) { - var n = values.length; - return function(t) { - var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), - v0 = values[(i + n - 1) % n], - v1 = values[i % n], - v2 = values[(i + 1) % n], - v3 = values[(i + 2) % n]; - return basis((t - i / n) * n, v0, v1, v2, v3); - }; -} - -var constant = x => () => x; - -function linear(a, d) { - return function(t) { - return a + t * d; - }; -} - -function exponential(a, b, y) { - return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { - return Math.pow(a + t * b, y); - }; -} - -function hue(a, b) { - var d = b - a; - return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a); -} - -function gamma(y) { - return (y = +y) === 1 ? nogamma : function(a, b) { - return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a); - }; -} - -function nogamma(a, b) { - var d = b - a; - return d ? linear(a, d) : constant(isNaN(a) ? b : a); -} - -var rgb = (function rgbGamma(y) { - var color = gamma(y); - - function rgb(start, end) { - var r = color((start = d3Color.rgb(start)).r, (end = d3Color.rgb(end)).r), - g = color(start.g, end.g), - b = color(start.b, end.b), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.r = r(t); - start.g = g(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; - } - - rgb.gamma = rgbGamma; - - return rgb; -})(1); - -function rgbSpline(spline) { - return function(colors) { - var n = colors.length, - r = new Array(n), - g = new Array(n), - b = new Array(n), - i, color; - for (i = 0; i < n; ++i) { - color = d3Color.rgb(colors[i]); - r[i] = color.r || 0; - g[i] = color.g || 0; - b[i] = color.b || 0; - } - r = spline(r); - g = spline(g); - b = spline(b); - color.opacity = 1; - return function(t) { - color.r = r(t); - color.g = g(t); - color.b = b(t); - return color + ""; - }; - }; -} - -var rgbBasis = rgbSpline(basis$1); -var rgbBasisClosed = rgbSpline(basisClosed); - -function numberArray(a, b) { - if (!b) b = []; - var n = a ? Math.min(b.length, a.length) : 0, - c = b.slice(), - i; - return function(t) { - for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t; - return c; - }; -} - -function isNumberArray(x) { - return ArrayBuffer.isView(x) && !(x instanceof DataView); -} - -function array(a, b) { - return (isNumberArray(b) ? numberArray : genericArray)(a, b); -} - -function genericArray(a, b) { - var nb = b ? b.length : 0, - na = a ? Math.min(nb, a.length) : 0, - x = new Array(na), - c = new Array(nb), - i; - - for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]); - for (; i < nb; ++i) c[i] = b[i]; - - return function(t) { - for (i = 0; i < na; ++i) c[i] = x[i](t); - return c; - }; -} - -function date(a, b) { - var d = new Date; - return a = +a, b = +b, function(t) { - return d.setTime(a * (1 - t) + b * t), d; - }; -} - -function number(a, b) { - return a = +a, b = +b, function(t) { - return a * (1 - t) + b * t; - }; -} - -function object(a, b) { - var i = {}, - c = {}, - k; - - if (a === null || typeof a !== "object") a = {}; - if (b === null || typeof b !== "object") b = {}; - - for (k in b) { - if (k in a) { - i[k] = value(a[k], b[k]); - } else { - c[k] = b[k]; - } - } - - return function(t) { - for (k in i) c[k] = i[k](t); - return c; - }; -} - -var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, - reB = new RegExp(reA.source, "g"); - -function zero(b) { - return function() { - return b; - }; -} - -function one(b) { - return function(t) { - return b(t) + ""; - }; -} - -function string(a, b) { - var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b - am, // current match in a - bm, // current match in b - bs, // string preceding current number in b, if any - i = -1, // index in s - s = [], // string constants and placeholders - q = []; // number interpolators - - // Coerce inputs to strings. - a = a + "", b = b + ""; - - // Interpolate pairs of numbers in a & b. - while ((am = reA.exec(a)) - && (bm = reB.exec(b))) { - if ((bs = bm.index) > bi) { // a string precedes the next number in b - bs = b.slice(bi, bs); - if (s[i]) s[i] += bs; // coalesce with previous string - else s[++i] = bs; - } - if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match - if (s[i]) s[i] += bm; // coalesce with previous string - else s[++i] = bm; - } else { // interpolate non-matching numbers - s[++i] = null; - q.push({i: i, x: number(am, bm)}); - } - bi = reB.lastIndex; - } - - // Add remains of b. - if (bi < b.length) { - bs = b.slice(bi); - if (s[i]) s[i] += bs; // coalesce with previous string - else s[++i] = bs; - } - - // Special optimization for only a single match. - // Otherwise, interpolate each of the numbers and rejoin the string. - return s.length < 2 ? (q[0] - ? one(q[0].x) - : zero(b)) - : (b = q.length, function(t) { - for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); - return s.join(""); - }); -} - -function value(a, b) { - var t = typeof b, c; - return b == null || t === "boolean" ? constant(b) - : (t === "number" ? number - : t === "string" ? ((c = d3Color.color(b)) ? (b = c, rgb) : string) - : b instanceof d3Color.color ? rgb - : b instanceof Date ? date - : isNumberArray(b) ? numberArray - : Array.isArray(b) ? genericArray - : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object - : number)(a, b); -} - -function discrete(range) { - var n = range.length; - return function(t) { - return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; - }; -} - -function hue$1(a, b) { - var i = hue(+a, +b); - return function(t) { - var x = i(t); - return x - 360 * Math.floor(x / 360); - }; -} - -function round(a, b) { - return a = +a, b = +b, function(t) { - return Math.round(a * (1 - t) + b * t); - }; -} - -var degrees = 180 / Math.PI; - -var identity = { - translateX: 0, - translateY: 0, - rotate: 0, - skewX: 0, - scaleX: 1, - scaleY: 1 -}; - -function decompose(a, b, c, d, e, f) { - var scaleX, scaleY, skewX; - if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; - if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; - if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; - if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; - return { - translateX: e, - translateY: f, - rotate: Math.atan2(b, a) * degrees, - skewX: Math.atan(skewX) * degrees, - scaleX: scaleX, - scaleY: scaleY - }; -} - -var svgNode; - -/* eslint-disable no-undef */ -function parseCss(value) { - const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + ""); - return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f); -} - -function parseSvg(value) { - if (value == null) return identity; - if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); - svgNode.setAttribute("transform", value); - if (!(value = svgNode.transform.baseVal.consolidate())) return identity; - value = value.matrix; - return decompose(value.a, value.b, value.c, value.d, value.e, value.f); -} - -function interpolateTransform(parse, pxComma, pxParen, degParen) { - - function pop(s) { - return s.length ? s.pop() + " " : ""; - } - - function translate(xa, ya, xb, yb, s, q) { - if (xa !== xb || ya !== yb) { - var i = s.push("translate(", null, pxComma, null, pxParen); - q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); - } else if (xb || yb) { - s.push("translate(" + xb + pxComma + yb + pxParen); - } - } - - function rotate(a, b, s, q) { - if (a !== b) { - if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path - q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: number(a, b)}); - } else if (b) { - s.push(pop(s) + "rotate(" + b + degParen); - } - } - - function skewX(a, b, s, q) { - if (a !== b) { - q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: number(a, b)}); - } else if (b) { - s.push(pop(s) + "skewX(" + b + degParen); - } - } - - function scale(xa, ya, xb, yb, s, q) { - if (xa !== xb || ya !== yb) { - var i = s.push(pop(s) + "scale(", null, ",", null, ")"); - q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); - } else if (xb !== 1 || yb !== 1) { - s.push(pop(s) + "scale(" + xb + "," + yb + ")"); - } - } - - return function(a, b) { - var s = [], // string constants and placeholders - q = []; // number interpolators - a = parse(a), b = parse(b); - translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); - rotate(a.rotate, b.rotate, s, q); - skewX(a.skewX, b.skewX, s, q); - scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); - a = b = null; // gc - return function(t) { - var i = -1, n = q.length, o; - while (++i < n) s[(o = q[i]).i] = o.x(t); - return s.join(""); - }; - }; -} - -var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)"); -var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")"); - -var epsilon2 = 1e-12; - -function cosh(x) { - return ((x = Math.exp(x)) + 1 / x) / 2; -} - -function sinh(x) { - return ((x = Math.exp(x)) - 1 / x) / 2; -} - -function tanh(x) { - return ((x = Math.exp(2 * x)) - 1) / (x + 1); -} - -var zoom = (function zoomRho(rho, rho2, rho4) { - - // p0 = [ux0, uy0, w0] - // p1 = [ux1, uy1, w1] - function zoom(p0, p1) { - var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], - ux1 = p1[0], uy1 = p1[1], w1 = p1[2], - dx = ux1 - ux0, - dy = uy1 - uy0, - d2 = dx * dx + dy * dy, - i, - S; - - // Special case for u0 ≅ u1. - if (d2 < epsilon2) { - S = Math.log(w1 / w0) / rho; - i = function(t) { - return [ - ux0 + t * dx, - uy0 + t * dy, - w0 * Math.exp(rho * t * S) - ]; - }; - } - - // General case. - else { - var d1 = Math.sqrt(d2), - b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), - b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), - r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), - r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); - S = (r1 - r0) / rho; - i = function(t) { - var s = t * S, - coshr0 = cosh(r0), - u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); - return [ - ux0 + u * dx, - uy0 + u * dy, - w0 * coshr0 / cosh(rho * s + r0) - ]; - }; - } - - i.duration = S * 1000 * rho / Math.SQRT2; - - return i; - } - - zoom.rho = function(_) { - var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2; - return zoomRho(_1, _2, _4); - }; - - return zoom; -})(Math.SQRT2, 2, 4); - -function hsl(hue) { - return function(start, end) { - var h = hue((start = d3Color.hsl(start)).h, (end = d3Color.hsl(end)).h), - s = nogamma(start.s, end.s), - l = nogamma(start.l, end.l), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.s = s(t); - start.l = l(t); - start.opacity = opacity(t); - return start + ""; - }; - } -} - -var hsl$1 = hsl(hue); -var hslLong = hsl(nogamma); - -function lab(start, end) { - var l = nogamma((start = d3Color.lab(start)).l, (end = d3Color.lab(end)).l), - a = nogamma(start.a, end.a), - b = nogamma(start.b, end.b), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.l = l(t); - start.a = a(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; -} - -function hcl(hue) { - return function(start, end) { - var h = hue((start = d3Color.hcl(start)).h, (end = d3Color.hcl(end)).h), - c = nogamma(start.c, end.c), - l = nogamma(start.l, end.l), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.c = c(t); - start.l = l(t); - start.opacity = opacity(t); - return start + ""; - }; - } -} - -var hcl$1 = hcl(hue); -var hclLong = hcl(nogamma); - -function cubehelix(hue) { - return (function cubehelixGamma(y) { - y = +y; - - function cubehelix(start, end) { - var h = hue((start = d3Color.cubehelix(start)).h, (end = d3Color.cubehelix(end)).h), - s = nogamma(start.s, end.s), - l = nogamma(start.l, end.l), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.s = s(t); - start.l = l(Math.pow(t, y)); - start.opacity = opacity(t); - return start + ""; - }; - } - - cubehelix.gamma = cubehelixGamma; - - return cubehelix; - })(1); -} - -var cubehelix$1 = cubehelix(hue); -var cubehelixLong = cubehelix(nogamma); - -function piecewise(interpolate, values) { - if (values === undefined) values = interpolate, interpolate = value; - var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n); - while (i < n) I[i] = interpolate(v, v = values[++i]); - return function(t) { - var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n))); - return I[i](t - i); - }; -} - -function quantize(interpolator, n) { - var samples = new Array(n); - for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); - return samples; -} - -exports.interpolate = value; -exports.interpolateArray = array; -exports.interpolateBasis = basis$1; -exports.interpolateBasisClosed = basisClosed; -exports.interpolateCubehelix = cubehelix$1; -exports.interpolateCubehelixLong = cubehelixLong; -exports.interpolateDate = date; -exports.interpolateDiscrete = discrete; -exports.interpolateHcl = hcl$1; -exports.interpolateHclLong = hclLong; -exports.interpolateHsl = hsl$1; -exports.interpolateHslLong = hslLong; -exports.interpolateHue = hue$1; -exports.interpolateLab = lab; -exports.interpolateNumber = number; -exports.interpolateNumberArray = numberArray; -exports.interpolateObject = object; -exports.interpolateRgb = rgb; -exports.interpolateRgbBasis = rgbBasis; -exports.interpolateRgbBasisClosed = rgbBasisClosed; -exports.interpolateRound = round; -exports.interpolateString = string; -exports.interpolateTransformCss = interpolateTransformCss; -exports.interpolateTransformSvg = interpolateTransformSvg; -exports.interpolateZoom = zoom; -exports.piecewise = piecewise; -exports.quantize = quantize; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-interpolate/dist/d3-interpolate.min.js b/node_modules/d3-interpolate/dist/d3-interpolate.min.js deleted file mode 100644 index 46dd1c0ecf83c2cf54755d23084922406dbdbc44..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/dist/d3-interpolate.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-interpolate/ v2.0.1 Copyright 2020 Mike Bostock -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-color")):"function"==typeof define&&define.amd?define(["exports","d3-color"],n):n((t=t||self).d3=t.d3||{},t.d3)}(this,function(t,n){"use strict";function r(t,n,r,e,a){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*r+(1+3*t+3*o-3*u)*e+u*a)/6}function e(t){var n=t.length-1;return function(e){var a=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),o=t[a],u=t[a+1],i=a>0?t[a-1]:2*o-u,c=a<n-1?t[a+2]:2*u-o;return r((e-a/n)*n,i,o,u,c)}}function a(t){var n=t.length;return function(e){var a=Math.floor(((e%=1)<0?++e:e)*n),o=t[(a+n-1)%n],u=t[a%n],i=t[(a+1)%n],c=t[(a+2)%n];return r((e-a/n)*n,o,u,i,c)}}var o=t=>()=>t;function u(t,n){return function(r){return t+r*n}}function i(t,n){var r=n-t;return r?u(t,r>180||r<-180?r-360*Math.round(r/360):r):o(isNaN(t)?n:t)}function c(t){return 1==(t=+t)?l:function(n,r){return r-n?function(t,n,r){return t=Math.pow(t,r),n=Math.pow(n,r)-t,r=1/r,function(e){return Math.pow(t+e*n,r)}}(n,r,t):o(isNaN(n)?r:n)}}function l(t,n){var r=n-t;return r?u(t,r):o(isNaN(t)?n:t)}var f=function t(r){var e=c(r);function a(t,r){var a=e((t=n.rgb(t)).r,(r=n.rgb(r)).r),o=e(t.g,r.g),u=e(t.b,r.b),i=l(t.opacity,r.opacity);return function(n){return t.r=a(n),t.g=o(n),t.b=u(n),t.opacity=i(n),t+""}}return a.gamma=t,a}(1);function s(t){return function(r){var e,a,o=r.length,u=new Array(o),i=new Array(o),c=new Array(o);for(e=0;e<o;++e)a=n.rgb(r[e]),u[e]=a.r||0,i[e]=a.g||0,c[e]=a.b||0;return u=t(u),i=t(i),c=t(c),a.opacity=1,function(t){return a.r=u(t),a.g=i(t),a.b=c(t),a+""}}}var h=s(e),p=s(a);function v(t,n){n||(n=[]);var r,e=t?Math.min(n.length,t.length):0,a=n.slice();return function(o){for(r=0;r<e;++r)a[r]=t[r]*(1-o)+n[r]*o;return a}}function g(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function M(t,n){var r,e=n?n.length:0,a=t?Math.min(e,t.length):0,o=new Array(a),u=new Array(e);for(r=0;r<a;++r)o[r]=X(t[r],n[r]);for(;r<e;++r)u[r]=n[r];return function(t){for(r=0;r<a;++r)u[r]=o[r](t);return u}}function y(t,n){var r=new Date;return t=+t,n=+n,function(e){return r.setTime(t*(1-e)+n*e),r}}function x(t,n){return t=+t,n=+n,function(r){return t*(1-r)+n*r}}function b(t,n){var r,e={},a={};for(r in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)r in t?e[r]=X(t[r],n[r]):a[r]=n[r];return function(t){for(r in e)a[r]=e[r](t);return a}}var d=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,w=new RegExp(d.source,"g");function m(t,n){var r,e,a,o=d.lastIndex=w.lastIndex=0,u=-1,i=[],c=[];for(t+="",n+="";(r=d.exec(t))&&(e=w.exec(n));)(a=e.index)>o&&(a=n.slice(o,a),i[u]?i[u]+=a:i[++u]=a),(r=r[0])===(e=e[0])?i[u]?i[u]+=e:i[++u]=e:(i[++u]=null,c.push({i:u,x:x(r,e)})),o=w.lastIndex;return o<n.length&&(a=n.slice(o),i[u]?i[u]+=a:i[++u]=a),i.length<2?c[0]?function(t){return function(n){return t(n)+""}}(c[0].x):function(t){return function(){return t}}(n):(n=c.length,function(t){for(var r,e=0;e<n;++e)i[(r=c[e]).i]=r.x(t);return i.join("")})}function X(t,r){var e,a=typeof r;return null==r||"boolean"===a?o(r):("number"===a?x:"string"===a?(e=n.color(r))?(r=e,f):m:r instanceof n.color?f:r instanceof Date?y:g(r)?v:Array.isArray(r)?M:"function"!=typeof r.valueOf&&"function"!=typeof r.toString||isNaN(r)?b:x)(t,r)}var A,N=180/Math.PI,S={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Y(t,n,r,e,a,o){var u,i,c;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(c=t*r+n*e)&&(r-=t*c,e-=n*c),(i=Math.sqrt(r*r+e*e))&&(r/=i,e/=i,c/=i),t*e<n*r&&(t=-t,n=-n,c=-c,u=-u),{translateX:a,translateY:o,rotate:Math.atan2(n,t)*N,skewX:Math.atan(c)*N,scaleX:u,scaleY:i}}function j(t,n,r,e){function a(t){return t.length?t.pop()+" ":""}return function(o,u){var i=[],c=[];return o=t(o),u=t(u),function(t,e,a,o,u,i){if(t!==a||e!==o){var c=u.push("translate(",null,n,null,r);i.push({i:c-4,x:x(t,a)},{i:c-2,x:x(e,o)})}else(a||o)&&u.push("translate("+a+n+o+r)}(o.translateX,o.translateY,u.translateX,u.translateY,i,c),function(t,n,r,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:r.push(a(r)+"rotate(",null,e)-2,x:x(t,n)})):n&&r.push(a(r)+"rotate("+n+e)}(o.rotate,u.rotate,i,c),function(t,n,r,o){t!==n?o.push({i:r.push(a(r)+"skewX(",null,e)-2,x:x(t,n)}):n&&r.push(a(r)+"skewX("+n+e)}(o.skewX,u.skewX,i,c),function(t,n,r,e,o,u){if(t!==r||n!==e){var i=o.push(a(o)+"scale(",null,",",null,")");u.push({i:i-4,x:x(t,r)},{i:i-2,x:x(n,e)})}else 1===r&&1===e||o.push(a(o)+"scale("+r+","+e+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,i,c),o=u=null,function(t){for(var n,r=-1,e=c.length;++r<e;)i[(n=c[r]).i]=n.x(t);return i.join("")}}}var q=j(function(t){const n=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return n.isIdentity?S:Y(n.a,n.b,n.c,n.d,n.e,n.f)},"px, ","px)","deg)"),D=j(function(t){return null==t?S:(A||(A=document.createElementNS("http://www.w3.org/2000/svg","g")),A.setAttribute("transform",t),(t=A.transform.baseVal.consolidate())?Y((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):S)},", ",")",")"),R=1e-12;function k(t){return((t=Math.exp(t))+1/t)/2}var C=function t(n,r,e){function a(t,a){var o,u,i=t[0],c=t[1],l=t[2],f=a[0],s=a[1],h=a[2],p=f-i,v=s-c,g=p*p+v*v;if(g<R)u=Math.log(h/l)/n,o=function(t){return[i+t*p,c+t*v,l*Math.exp(n*t*u)]};else{var M=Math.sqrt(g),y=(h*h-l*l+e*g)/(2*l*r*M),x=(h*h-l*l-e*g)/(2*h*r*M),b=Math.log(Math.sqrt(y*y+1)-y),d=Math.log(Math.sqrt(x*x+1)-x);u=(d-b)/n,o=function(t){var e,a=t*u,o=k(b),f=l/(r*M)*(o*(e=n*a+b,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(b));return[i+f*p,c+f*v,l*o/k(n*a+b)]}}return o.duration=1e3*u*n/Math.SQRT2,o}return a.rho=function(n){var r=Math.max(.001,+n),e=r*r;return t(r,e,e*e)},a}(Math.SQRT2,2,4);function B(t){return function(r,e){var a=t((r=n.hsl(r)).h,(e=n.hsl(e)).h),o=l(r.s,e.s),u=l(r.l,e.l),i=l(r.opacity,e.opacity);return function(t){return r.h=a(t),r.s=o(t),r.l=u(t),r.opacity=i(t),r+""}}}var H=B(i),I=B(l);function O(t){return function(r,e){var a=t((r=n.hcl(r)).h,(e=n.hcl(e)).h),o=l(r.c,e.c),u=l(r.l,e.l),i=l(r.opacity,e.opacity);return function(t){return r.h=a(t),r.c=o(t),r.l=u(t),r.opacity=i(t),r+""}}}var T=O(i),L=O(l);function E(t){return function r(e){function a(r,a){var o=t((r=n.cubehelix(r)).h,(a=n.cubehelix(a)).h),u=l(r.s,a.s),i=l(r.l,a.l),c=l(r.opacity,a.opacity);return function(t){return r.h=o(t),r.s=u(t),r.l=i(Math.pow(t,e)),r.opacity=c(t),r+""}}return e=+e,a.gamma=r,a}(1)}var V=E(i),P=E(l);t.interpolate=X,t.interpolateArray=function(t,n){return(g(n)?v:M)(t,n)},t.interpolateBasis=e,t.interpolateBasisClosed=a,t.interpolateCubehelix=V,t.interpolateCubehelixLong=P,t.interpolateDate=y,t.interpolateDiscrete=function(t){var n=t.length;return function(r){return t[Math.max(0,Math.min(n-1,Math.floor(r*n)))]}},t.interpolateHcl=T,t.interpolateHclLong=L,t.interpolateHsl=H,t.interpolateHslLong=I,t.interpolateHue=function(t,n){var r=i(+t,+n);return function(t){var n=r(t);return n-360*Math.floor(n/360)}},t.interpolateLab=function(t,r){var e=l((t=n.lab(t)).l,(r=n.lab(r)).l),a=l(t.a,r.a),o=l(t.b,r.b),u=l(t.opacity,r.opacity);return function(n){return t.l=e(n),t.a=a(n),t.b=o(n),t.opacity=u(n),t+""}},t.interpolateNumber=x,t.interpolateNumberArray=v,t.interpolateObject=b,t.interpolateRgb=f,t.interpolateRgbBasis=h,t.interpolateRgbBasisClosed=p,t.interpolateRound=function(t,n){return t=+t,n=+n,function(r){return Math.round(t*(1-r)+n*r)}},t.interpolateString=m,t.interpolateTransformCss=q,t.interpolateTransformSvg=D,t.interpolateZoom=C,t.piecewise=function(t,n){void 0===n&&(n=t,t=X);for(var r=0,e=n.length-1,a=n[0],o=new Array(e<0?0:e);r<e;)o[r]=t(a,a=n[++r]);return function(t){var n=Math.max(0,Math.min(e-1,Math.floor(t*=e)));return o[n](t-n)}},t.quantize=function(t,n){for(var r=new Array(n),e=0;e<n;++e)r[e]=t(e/(n-1));return r},Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/node_modules/d3-interpolate/package.json b/node_modules/d3-interpolate/package.json deleted file mode 100644 index 889eac9fb6f92f26ed7174535372fc58ae3be2e2..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_from": "d3-interpolate@2", - "_id": "d3-interpolate@2.0.1", - "_inBundle": false, - "_integrity": "sha512-c5UhwwTs/yybcmTpAVqwSFl6vrQ8JZJoT5F7xNFK9pymv5C0Ymcc9/LIJHtYIggg/yS9YHw8i8O8tgb9pupjeQ==", - "_location": "/d3-interpolate", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-interpolate@2", - "name": "d3-interpolate", - "escapedName": "d3-interpolate", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3", - "/d3-brush", - "/d3-scale", - "/d3-scale-chromatic", - "/d3-transition", - "/d3-zoom" - ], - "_resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-2.0.1.tgz", - "_shasum": "98be499cfb8a3b94d4ff616900501a64abc91163", - "_spec": "d3-interpolate@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-interpolate/issues" - }, - "bundleDependencies": false, - "dependencies": { - "d3-color": "1 - 2" - }, - "deprecated": false, - "description": "Interpolate numbers, colors, strings, arrays, objects, whatever!", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-interpolate/", - "jsdelivr": "dist/d3-interpolate.min.js", - "keywords": [ - "d3", - "d3-module", - "interpolate", - "interpolation", - "color" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-interpolate.js", - "module": "src/index.js", - "name": "d3-interpolate", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-interpolate.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src" - }, - "sideEffects": false, - "unpkg": "dist/d3-interpolate.min.js", - "version": "2.0.1" -} diff --git a/node_modules/d3-interpolate/src/array.js b/node_modules/d3-interpolate/src/array.js deleted file mode 100644 index 89f77225ad11dbd6cf1d8ddf327205a6c63653da..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/array.js +++ /dev/null @@ -1,22 +0,0 @@ -import value from "./value.js"; -import numberArray, {isNumberArray} from "./numberArray.js"; - -export default function(a, b) { - return (isNumberArray(b) ? numberArray : genericArray)(a, b); -} - -export function genericArray(a, b) { - var nb = b ? b.length : 0, - na = a ? Math.min(nb, a.length) : 0, - x = new Array(na), - c = new Array(nb), - i; - - for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]); - for (; i < nb; ++i) c[i] = b[i]; - - return function(t) { - for (i = 0; i < na; ++i) c[i] = x[i](t); - return c; - }; -} diff --git a/node_modules/d3-interpolate/src/basis.js b/node_modules/d3-interpolate/src/basis.js deleted file mode 100644 index 0d853f05d32f5f468944d56095d7f6af2e67ed2e..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/basis.js +++ /dev/null @@ -1,19 +0,0 @@ -export function basis(t1, v0, v1, v2, v3) { - var t2 = t1 * t1, t3 = t2 * t1; - return ((1 - 3 * t1 + 3 * t2 - t3) * v0 - + (4 - 6 * t2 + 3 * t3) * v1 - + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 - + t3 * v3) / 6; -} - -export default function(values) { - var n = values.length - 1; - return function(t) { - var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), - v1 = values[i], - v2 = values[i + 1], - v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, - v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; - return basis((t - i / n) * n, v0, v1, v2, v3); - }; -} diff --git a/node_modules/d3-interpolate/src/basisClosed.js b/node_modules/d3-interpolate/src/basisClosed.js deleted file mode 100644 index 2639d92803dd9b4a8ac48e72e720909ae10d0daf..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/basisClosed.js +++ /dev/null @@ -1,13 +0,0 @@ -import {basis} from "./basis.js"; - -export default function(values) { - var n = values.length; - return function(t) { - var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), - v0 = values[(i + n - 1) % n], - v1 = values[i % n], - v2 = values[(i + 1) % n], - v3 = values[(i + 2) % n]; - return basis((t - i / n) * n, v0, v1, v2, v3); - }; -} diff --git a/node_modules/d3-interpolate/src/color.js b/node_modules/d3-interpolate/src/color.js deleted file mode 100644 index 4630fb2f949717225d8402e2a1bbdeb2ddfdd271..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/color.js +++ /dev/null @@ -1,29 +0,0 @@ -import constant from "./constant.js"; - -function linear(a, d) { - return function(t) { - return a + t * d; - }; -} - -function exponential(a, b, y) { - return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { - return Math.pow(a + t * b, y); - }; -} - -export function hue(a, b) { - var d = b - a; - return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a); -} - -export function gamma(y) { - return (y = +y) === 1 ? nogamma : function(a, b) { - return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a); - }; -} - -export default function nogamma(a, b) { - var d = b - a; - return d ? linear(a, d) : constant(isNaN(a) ? b : a); -} diff --git a/node_modules/d3-interpolate/src/constant.js b/node_modules/d3-interpolate/src/constant.js deleted file mode 100644 index 3487c0ddfaabca50218341abd733df08493b568c..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/constant.js +++ /dev/null @@ -1 +0,0 @@ -export default x => () => x; diff --git a/node_modules/d3-interpolate/src/cubehelix.js b/node_modules/d3-interpolate/src/cubehelix.js deleted file mode 100644 index 2c4f64bd3f3307d99fec9c9bdceea3f1533487b9..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/cubehelix.js +++ /dev/null @@ -1,29 +0,0 @@ -import {cubehelix as colorCubehelix} from "d3-color"; -import color, {hue} from "./color.js"; - -function cubehelix(hue) { - return (function cubehelixGamma(y) { - y = +y; - - function cubehelix(start, end) { - var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h), - s = color(start.s, end.s), - l = color(start.l, end.l), - opacity = color(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.s = s(t); - start.l = l(Math.pow(t, y)); - start.opacity = opacity(t); - return start + ""; - }; - } - - cubehelix.gamma = cubehelixGamma; - - return cubehelix; - })(1); -} - -export default cubehelix(hue); -export var cubehelixLong = cubehelix(color); diff --git a/node_modules/d3-interpolate/src/date.js b/node_modules/d3-interpolate/src/date.js deleted file mode 100644 index cdfbea79c15d332f1d95b133a04dabea51d9af4a..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/date.js +++ /dev/null @@ -1,6 +0,0 @@ -export default function(a, b) { - var d = new Date; - return a = +a, b = +b, function(t) { - return d.setTime(a * (1 - t) + b * t), d; - }; -} diff --git a/node_modules/d3-interpolate/src/discrete.js b/node_modules/d3-interpolate/src/discrete.js deleted file mode 100644 index b3d1e3b66fc73107bcc75038df508eefa3dafd2c..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/discrete.js +++ /dev/null @@ -1,6 +0,0 @@ -export default function(range) { - var n = range.length; - return function(t) { - return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; - }; -} diff --git a/node_modules/d3-interpolate/src/hcl.js b/node_modules/d3-interpolate/src/hcl.js deleted file mode 100644 index 03125802e868f55a3f5b12177805c4fc0bb838e9..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/hcl.js +++ /dev/null @@ -1,21 +0,0 @@ -import {hcl as colorHcl} from "d3-color"; -import color, {hue} from "./color.js"; - -function hcl(hue) { - return function(start, end) { - var h = hue((start = colorHcl(start)).h, (end = colorHcl(end)).h), - c = color(start.c, end.c), - l = color(start.l, end.l), - opacity = color(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.c = c(t); - start.l = l(t); - start.opacity = opacity(t); - return start + ""; - }; - } -} - -export default hcl(hue); -export var hclLong = hcl(color); diff --git a/node_modules/d3-interpolate/src/hsl.js b/node_modules/d3-interpolate/src/hsl.js deleted file mode 100644 index 2f78a9017cdcc342ee1428e3da60ec69d8610c1c..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/hsl.js +++ /dev/null @@ -1,21 +0,0 @@ -import {hsl as colorHsl} from "d3-color"; -import color, {hue} from "./color.js"; - -function hsl(hue) { - return function(start, end) { - var h = hue((start = colorHsl(start)).h, (end = colorHsl(end)).h), - s = color(start.s, end.s), - l = color(start.l, end.l), - opacity = color(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.s = s(t); - start.l = l(t); - start.opacity = opacity(t); - return start + ""; - }; - } -} - -export default hsl(hue); -export var hslLong = hsl(color); diff --git a/node_modules/d3-interpolate/src/hue.js b/node_modules/d3-interpolate/src/hue.js deleted file mode 100644 index 5d8d4b9cf38e57e06648d9906d23f1a01292dff7..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/hue.js +++ /dev/null @@ -1,9 +0,0 @@ -import {hue} from "./color.js"; - -export default function(a, b) { - var i = hue(+a, +b); - return function(t) { - var x = i(t); - return x - 360 * Math.floor(x / 360); - }; -} diff --git a/node_modules/d3-interpolate/src/index.js b/node_modules/d3-interpolate/src/index.js deleted file mode 100644 index b4dce7d5acd085c177d47839f08fdb75203cd8c0..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/index.js +++ /dev/null @@ -1,21 +0,0 @@ -export {default as interpolate} from "./value.js"; -export {default as interpolateArray} from "./array.js"; -export {default as interpolateBasis} from "./basis.js"; -export {default as interpolateBasisClosed} from "./basisClosed.js"; -export {default as interpolateDate} from "./date.js"; -export {default as interpolateDiscrete} from "./discrete.js"; -export {default as interpolateHue} from "./hue.js"; -export {default as interpolateNumber} from "./number.js"; -export {default as interpolateNumberArray} from "./numberArray.js"; -export {default as interpolateObject} from "./object.js"; -export {default as interpolateRound} from "./round.js"; -export {default as interpolateString} from "./string.js"; -export {interpolateTransformCss, interpolateTransformSvg} from "./transform/index.js"; -export {default as interpolateZoom} from "./zoom.js"; -export {default as interpolateRgb, rgbBasis as interpolateRgbBasis, rgbBasisClosed as interpolateRgbBasisClosed} from "./rgb.js"; -export {default as interpolateHsl, hslLong as interpolateHslLong} from "./hsl.js"; -export {default as interpolateLab} from "./lab.js"; -export {default as interpolateHcl, hclLong as interpolateHclLong} from "./hcl.js"; -export {default as interpolateCubehelix, cubehelixLong as interpolateCubehelixLong} from "./cubehelix.js"; -export {default as piecewise} from "./piecewise.js"; -export {default as quantize} from "./quantize.js"; diff --git a/node_modules/d3-interpolate/src/lab.js b/node_modules/d3-interpolate/src/lab.js deleted file mode 100644 index 8fbf7f35cccb9309647a70f82bf2abc0417436fa..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/lab.js +++ /dev/null @@ -1,16 +0,0 @@ -import {lab as colorLab} from "d3-color"; -import color from "./color.js"; - -export default function lab(start, end) { - var l = color((start = colorLab(start)).l, (end = colorLab(end)).l), - a = color(start.a, end.a), - b = color(start.b, end.b), - opacity = color(start.opacity, end.opacity); - return function(t) { - start.l = l(t); - start.a = a(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; -} diff --git a/node_modules/d3-interpolate/src/number.js b/node_modules/d3-interpolate/src/number.js deleted file mode 100644 index 837b13db1af21cf58ae619176ead47509a59d143..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/number.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(a, b) { - return a = +a, b = +b, function(t) { - return a * (1 - t) + b * t; - }; -} diff --git a/node_modules/d3-interpolate/src/numberArray.js b/node_modules/d3-interpolate/src/numberArray.js deleted file mode 100644 index 4081086c6fbdfea0a8c42063e7cc1e8a6d26ec9e..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/numberArray.js +++ /dev/null @@ -1,14 +0,0 @@ -export default function(a, b) { - if (!b) b = []; - var n = a ? Math.min(b.length, a.length) : 0, - c = b.slice(), - i; - return function(t) { - for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t; - return c; - }; -} - -export function isNumberArray(x) { - return ArrayBuffer.isView(x) && !(x instanceof DataView); -} diff --git a/node_modules/d3-interpolate/src/object.js b/node_modules/d3-interpolate/src/object.js deleted file mode 100644 index b521c3371a2e6a451f5cbfadbf36c164a84c32a2..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/object.js +++ /dev/null @@ -1,23 +0,0 @@ -import value from "./value.js"; - -export default function(a, b) { - var i = {}, - c = {}, - k; - - if (a === null || typeof a !== "object") a = {}; - if (b === null || typeof b !== "object") b = {}; - - for (k in b) { - if (k in a) { - i[k] = value(a[k], b[k]); - } else { - c[k] = b[k]; - } - } - - return function(t) { - for (k in i) c[k] = i[k](t); - return c; - }; -} diff --git a/node_modules/d3-interpolate/src/piecewise.js b/node_modules/d3-interpolate/src/piecewise.js deleted file mode 100644 index 8b568c5f929d4be8eb0d74f55d6e78351f488832..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/piecewise.js +++ /dev/null @@ -1,11 +0,0 @@ -import {default as value} from "./value.js"; - -export default function piecewise(interpolate, values) { - if (values === undefined) values = interpolate, interpolate = value; - var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n); - while (i < n) I[i] = interpolate(v, v = values[++i]); - return function(t) { - var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n))); - return I[i](t - i); - }; -} diff --git a/node_modules/d3-interpolate/src/quantize.js b/node_modules/d3-interpolate/src/quantize.js deleted file mode 100644 index d7c23e69d438888df28cb6d2dbde79600c59cedb..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/quantize.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(interpolator, n) { - var samples = new Array(n); - for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); - return samples; -} diff --git a/node_modules/d3-interpolate/src/rgb.js b/node_modules/d3-interpolate/src/rgb.js deleted file mode 100644 index 495c1f8c5ae4be2b04d2e68a3cd964cbd7f82ea1..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/rgb.js +++ /dev/null @@ -1,55 +0,0 @@ -import {rgb as colorRgb} from "d3-color"; -import basis from "./basis.js"; -import basisClosed from "./basisClosed.js"; -import nogamma, {gamma} from "./color.js"; - -export default (function rgbGamma(y) { - var color = gamma(y); - - function rgb(start, end) { - var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r), - g = color(start.g, end.g), - b = color(start.b, end.b), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.r = r(t); - start.g = g(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; - } - - rgb.gamma = rgbGamma; - - return rgb; -})(1); - -function rgbSpline(spline) { - return function(colors) { - var n = colors.length, - r = new Array(n), - g = new Array(n), - b = new Array(n), - i, color; - for (i = 0; i < n; ++i) { - color = colorRgb(colors[i]); - r[i] = color.r || 0; - g[i] = color.g || 0; - b[i] = color.b || 0; - } - r = spline(r); - g = spline(g); - b = spline(b); - color.opacity = 1; - return function(t) { - color.r = r(t); - color.g = g(t); - color.b = b(t); - return color + ""; - }; - }; -} - -export var rgbBasis = rgbSpline(basis); -export var rgbBasisClosed = rgbSpline(basisClosed); diff --git a/node_modules/d3-interpolate/src/round.js b/node_modules/d3-interpolate/src/round.js deleted file mode 100644 index 2635d28c132b72bc31a56f018001a766c48d7ab6..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/round.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(a, b) { - return a = +a, b = +b, function(t) { - return Math.round(a * (1 - t) + b * t); - }; -} diff --git a/node_modules/d3-interpolate/src/string.js b/node_modules/d3-interpolate/src/string.js deleted file mode 100644 index 7f04d2d052bbd0029e8e65672dfbf1f9fe68dd8b..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/string.js +++ /dev/null @@ -1,64 +0,0 @@ -import number from "./number.js"; - -var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, - reB = new RegExp(reA.source, "g"); - -function zero(b) { - return function() { - return b; - }; -} - -function one(b) { - return function(t) { - return b(t) + ""; - }; -} - -export default function(a, b) { - var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b - am, // current match in a - bm, // current match in b - bs, // string preceding current number in b, if any - i = -1, // index in s - s = [], // string constants and placeholders - q = []; // number interpolators - - // Coerce inputs to strings. - a = a + "", b = b + ""; - - // Interpolate pairs of numbers in a & b. - while ((am = reA.exec(a)) - && (bm = reB.exec(b))) { - if ((bs = bm.index) > bi) { // a string precedes the next number in b - bs = b.slice(bi, bs); - if (s[i]) s[i] += bs; // coalesce with previous string - else s[++i] = bs; - } - if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match - if (s[i]) s[i] += bm; // coalesce with previous string - else s[++i] = bm; - } else { // interpolate non-matching numbers - s[++i] = null; - q.push({i: i, x: number(am, bm)}); - } - bi = reB.lastIndex; - } - - // Add remains of b. - if (bi < b.length) { - bs = b.slice(bi); - if (s[i]) s[i] += bs; // coalesce with previous string - else s[++i] = bs; - } - - // Special optimization for only a single match. - // Otherwise, interpolate each of the numbers and rejoin the string. - return s.length < 2 ? (q[0] - ? one(q[0].x) - : zero(b)) - : (b = q.length, function(t) { - for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); - return s.join(""); - }); -} diff --git a/node_modules/d3-interpolate/src/transform/decompose.js b/node_modules/d3-interpolate/src/transform/decompose.js deleted file mode 100644 index 3535f231ef03fcd4f609282ad9186b975ca0abbf..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/transform/decompose.js +++ /dev/null @@ -1,26 +0,0 @@ -var degrees = 180 / Math.PI; - -export var identity = { - translateX: 0, - translateY: 0, - rotate: 0, - skewX: 0, - scaleX: 1, - scaleY: 1 -}; - -export default function(a, b, c, d, e, f) { - var scaleX, scaleY, skewX; - if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; - if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; - if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; - if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; - return { - translateX: e, - translateY: f, - rotate: Math.atan2(b, a) * degrees, - skewX: Math.atan(skewX) * degrees, - scaleX: scaleX, - scaleY: scaleY - }; -} diff --git a/node_modules/d3-interpolate/src/transform/index.js b/node_modules/d3-interpolate/src/transform/index.js deleted file mode 100644 index 5383d5f83e7049dfca73ae0424833d06cdf6c450..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/transform/index.js +++ /dev/null @@ -1,63 +0,0 @@ -import number from "../number.js"; -import {parseCss, parseSvg} from "./parse.js"; - -function interpolateTransform(parse, pxComma, pxParen, degParen) { - - function pop(s) { - return s.length ? s.pop() + " " : ""; - } - - function translate(xa, ya, xb, yb, s, q) { - if (xa !== xb || ya !== yb) { - var i = s.push("translate(", null, pxComma, null, pxParen); - q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); - } else if (xb || yb) { - s.push("translate(" + xb + pxComma + yb + pxParen); - } - } - - function rotate(a, b, s, q) { - if (a !== b) { - if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path - q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: number(a, b)}); - } else if (b) { - s.push(pop(s) + "rotate(" + b + degParen); - } - } - - function skewX(a, b, s, q) { - if (a !== b) { - q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: number(a, b)}); - } else if (b) { - s.push(pop(s) + "skewX(" + b + degParen); - } - } - - function scale(xa, ya, xb, yb, s, q) { - if (xa !== xb || ya !== yb) { - var i = s.push(pop(s) + "scale(", null, ",", null, ")"); - q.push({i: i - 4, x: number(xa, xb)}, {i: i - 2, x: number(ya, yb)}); - } else if (xb !== 1 || yb !== 1) { - s.push(pop(s) + "scale(" + xb + "," + yb + ")"); - } - } - - return function(a, b) { - var s = [], // string constants and placeholders - q = []; // number interpolators - a = parse(a), b = parse(b); - translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); - rotate(a.rotate, b.rotate, s, q); - skewX(a.skewX, b.skewX, s, q); - scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); - a = b = null; // gc - return function(t) { - var i = -1, n = q.length, o; - while (++i < n) s[(o = q[i]).i] = o.x(t); - return s.join(""); - }; - }; -} - -export var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)"); -export var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")"); diff --git a/node_modules/d3-interpolate/src/transform/parse.js b/node_modules/d3-interpolate/src/transform/parse.js deleted file mode 100644 index c62088e055a3657e249b5b804f55e81de7510fe0..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/transform/parse.js +++ /dev/null @@ -1,18 +0,0 @@ -import decompose, {identity} from "./decompose.js"; - -var svgNode; - -/* eslint-disable no-undef */ -export function parseCss(value) { - const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + ""); - return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f); -} - -export function parseSvg(value) { - if (value == null) return identity; - if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); - svgNode.setAttribute("transform", value); - if (!(value = svgNode.transform.baseVal.consolidate())) return identity; - value = value.matrix; - return decompose(value.a, value.b, value.c, value.d, value.e, value.f); -} diff --git a/node_modules/d3-interpolate/src/value.js b/node_modules/d3-interpolate/src/value.js deleted file mode 100644 index 6a67ac4aa8897cc7cd23968bdbb827349eba6054..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/value.js +++ /dev/null @@ -1,22 +0,0 @@ -import {color} from "d3-color"; -import rgb from "./rgb.js"; -import {genericArray} from "./array.js"; -import date from "./date.js"; -import number from "./number.js"; -import object from "./object.js"; -import string from "./string.js"; -import constant from "./constant.js"; -import numberArray, {isNumberArray} from "./numberArray.js"; - -export default function(a, b) { - var t = typeof b, c; - return b == null || t === "boolean" ? constant(b) - : (t === "number" ? number - : t === "string" ? ((c = color(b)) ? (b = c, rgb) : string) - : b instanceof color ? rgb - : b instanceof Date ? date - : isNumberArray(b) ? numberArray - : Array.isArray(b) ? genericArray - : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object - : number)(a, b); -} diff --git a/node_modules/d3-interpolate/src/zoom.js b/node_modules/d3-interpolate/src/zoom.js deleted file mode 100644 index f2756026894fa24463c1505794f1c61c5e7ca1e8..0000000000000000000000000000000000000000 --- a/node_modules/d3-interpolate/src/zoom.js +++ /dev/null @@ -1,71 +0,0 @@ -var epsilon2 = 1e-12; - -function cosh(x) { - return ((x = Math.exp(x)) + 1 / x) / 2; -} - -function sinh(x) { - return ((x = Math.exp(x)) - 1 / x) / 2; -} - -function tanh(x) { - return ((x = Math.exp(2 * x)) - 1) / (x + 1); -} - -export default (function zoomRho(rho, rho2, rho4) { - - // p0 = [ux0, uy0, w0] - // p1 = [ux1, uy1, w1] - function zoom(p0, p1) { - var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], - ux1 = p1[0], uy1 = p1[1], w1 = p1[2], - dx = ux1 - ux0, - dy = uy1 - uy0, - d2 = dx * dx + dy * dy, - i, - S; - - // Special case for u0 ≅ u1. - if (d2 < epsilon2) { - S = Math.log(w1 / w0) / rho; - i = function(t) { - return [ - ux0 + t * dx, - uy0 + t * dy, - w0 * Math.exp(rho * t * S) - ]; - } - } - - // General case. - else { - var d1 = Math.sqrt(d2), - b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), - b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), - r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), - r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); - S = (r1 - r0) / rho; - i = function(t) { - var s = t * S, - coshr0 = cosh(r0), - u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); - return [ - ux0 + u * dx, - uy0 + u * dy, - w0 * coshr0 / cosh(rho * s + r0) - ]; - } - } - - i.duration = S * 1000 * rho / Math.SQRT2; - - return i; - } - - zoom.rho = function(_) { - var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2; - return zoomRho(_1, _2, _4); - }; - - return zoom; -})(Math.SQRT2, 2, 4); diff --git a/node_modules/d3-path/LICENSE b/node_modules/d3-path/LICENSE deleted file mode 100644 index 576b910b2775b47c0f591ff8746844ccfb4f852b..0000000000000000000000000000000000000000 --- a/node_modules/d3-path/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2015-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-path/README.md b/node_modules/d3-path/README.md deleted file mode 100644 index 63f326a720d5aa00fd884c301de1d736b48f6627..0000000000000000000000000000000000000000 --- a/node_modules/d3-path/README.md +++ /dev/null @@ -1,78 +0,0 @@ -# d3-path - -Say you have some code that draws to a 2D canvas: - -```js -function drawCircle(context, radius) { - context.moveTo(radius, 0); - context.arc(0, 0, radius, 0, 2 * Math.PI); -} -``` - -The d3-path module lets you take this exact code and additionally render to [SVG](http://www.w3.org/TR/SVG/paths.html). It works by [serializing](#path_toString) [CanvasPathMethods](http://www.w3.org/TR/2dcontext/#canvaspathmethods) calls to [SVG path data](http://www.w3.org/TR/SVG/paths.html#PathData). For example: - -```js -var context = d3.path(); -drawCircle(context, 40); -pathElement.setAttribute("d", context.toString()); -``` - -Now code you write once can be used with both Canvas (for performance) and SVG (for convenience). For a practical example, see [d3-shape](https://github.com/d3/d3-shape). - -## Installing - -If you use NPM, `npm install d3-path`. Otherwise, download the [latest release](https://github.com/d3/d3-path/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-path.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-path.v2.min.js"></script> -<script> - -var path = d3.path(); -path.moveTo(1, 2); -path.lineTo(3, 4); -path.closePath(); - -</script> -``` - -## API Reference - -<a name="path" href="#path">#</a> d3.<b>path</b>() · [Source](https://github.com/d3/d3-path/blob/master/src/path.js), [Examples](https://observablehq.com/@d3/d3-path) - -Constructs a new path serializer that implements [CanvasPathMethods](http://www.w3.org/TR/2dcontext/#canvaspathmethods). - -<a name="path_moveTo" href="#path_moveTo">#</a> <i>path</i>.<b>moveTo</b>(<i>x</i>, <i>y</i>) - -Move to the specified point ⟨*x*, *y*⟩. Equivalent to [*context*.moveTo](http://www.w3.org/TR/2dcontext/#dom-context-2d-moveto) and SVG’s [“moveto†command](http://www.w3.org/TR/SVG/paths.html#PathDataMovetoCommands). - -<a name="path_closePath" href="#path_closePath">#</A> <i>path</i>.<b>closePath</b>() - -Ends the current subpath and causes an automatic straight line to be drawn from the current point to the initial point of the current subpath. Equivalent to [*context*.closePath](http://www.w3.org/TR/2dcontext/#dom-context-2d-closepath) and SVG’s [“closepath†command](http://www.w3.org/TR/SVG/paths.html#PathDataClosePathCommand). - -<a name="path_lineTo" href="#path_lineTo">#</a> <i>path</i>.<b>lineTo</b>(<i>x</i>, <i>y</i>) - -Draws a straight line from the current point to the specified point ⟨*x*, *y*⟩. Equivalent to [*context*.lineTo](http://www.w3.org/TR/2dcontext/#dom-context-2d-lineto) and SVG’s [“lineto†command](http://www.w3.org/TR/SVG/paths.html#PathDataLinetoCommands). - -<a name="path_quadraticCurveTo" href="#path_quadraticCurveTo">#</a> <i>path</i>.<b>quadraticCurveTo</b>(<i>cpx</i>, <i>cpy</i>, <i>x</i>, <i>y</i>) - -Draws a quadratic Bézier segment from the current point to the specified point ⟨*x*, *y*⟩, with the specified control point ⟨*cpx*, *cpy*⟩. Equivalent to [*context*.quadraticCurveTo](http://www.w3.org/TR/2dcontext/#dom-context-2d-quadraticcurveto) and SVG’s [quadratic Bézier curve commands](http://www.w3.org/TR/SVG/paths.html#PathDataQuadraticBezierCommands). - -<a name="path_bezierCurveTo" href="#path_bezierCurveTo">#</a> <i>path</i>.<b>bezierCurveTo</b>(<i>cpx1</i>, <i>cpy1</i>, <i>cpx2</i>, <i>cpy2</i>, <i>x</i>, <i>y</i>) - -Draws a cubic Bézier segment from the current point to the specified point ⟨*x*, *y*⟩, with the specified control points ⟨*cpx1*, *cpy1*⟩ and ⟨*cpx2*, *cpy2*⟩. Equivalent to [*context*.bezierCurveTo](http://www.w3.org/TR/2dcontext/#dom-context-2d-beziercurveto) and SVG’s [cubic Bézier curve commands](http://www.w3.org/TR/SVG/paths.html#PathDataCubicBezierCommands). - -<a name="path_arcTo" href="#path_arcTo">#</a> <i>path</i>.<b>arcTo</b>(<i>x1</i>, <i>y1</i>, <i>x2</i>, <i>y2</i>, <i>radius</i>) - -Draws a circular arc segment with the specified *radius* that starts tangent to the line between the current point and the specified point ⟨*x1*, *y1*⟩ and ends tangent to the line between the specified points ⟨*x1*, *y1*⟩ and ⟨*x2*, *y2*⟩. If the first tangent point is not equal to the current point, a straight line is drawn between the current point and the first tangent point. Equivalent to [*context*.arcTo](http://www.w3.org/TR/2dcontext/#dom-context-2d-arcto) and uses SVG’s [elliptical arc curve commands](http://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands). - -<a name="path_arc" href="#path_arc">#</a> <i>path</i>.<b>arc</b>(<i>x</i>, <i>y</i>, <i>radius</i>, <i>startAngle</i>, <i>endAngle</i>[, <i>anticlockwise</i>]) - -Draws a circular arc segment with the specified center ⟨*x*, *y*⟩, *radius*, *startAngle* and *endAngle*. If *anticlockwise* is true, the arc is drawn in the anticlockwise direction; otherwise, it is drawn in the clockwise direction. If the current point is not equal to the starting point of the arc, a straight line is drawn from the current point to the start of the arc. Equivalent to [*context*.arc](http://www.w3.org/TR/2dcontext/#dom-context-2d-arc) and uses SVG’s [elliptical arc curve commands](http://www.w3.org/TR/SVG/paths.html#PathDataEllipticalArcCommands). - -<a name="path_rect" href="#path_rect">#</a> <i>path</i>.<b>rect</b>(<i>x</i>, <i>y</i>, <i>w</i>, <i>h</i>) - -Creates a new subpath containing just the four points ⟨*x*, *y*⟩, ⟨*x* + *w*, *y*⟩, ⟨*x* + *w*, *y* + *h*⟩, ⟨*x*, *y* + *h*⟩, with those four points connected by straight lines, and then marks the subpath as closed. Equivalent to [*context*.rect](http://www.w3.org/TR/2dcontext/#dom-context-2d-rect) and uses SVG’s [“lineto†commands](http://www.w3.org/TR/SVG/paths.html#PathDataLinetoCommands). - -<a name="path_toString" href="#path_toString">#</a> <i>path</i>.<b>toString</b>() - -Returns the string representation of this *path* according to SVG’s [path data specification](http://www.w3.org/TR/SVG/paths.html#PathData). diff --git a/node_modules/d3-path/dist/d3-path.js b/node_modules/d3-path/dist/d3-path.js deleted file mode 100644 index 14086ca3ca86a8cda84ba9b2502906916e238058..0000000000000000000000000000000000000000 --- a/node_modules/d3-path/dist/d3-path.js +++ /dev/null @@ -1,141 +0,0 @@ -// https://d3js.org/d3-path/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {})); -}(this, function (exports) { 'use strict'; - -const pi = Math.PI, - tau = 2 * pi, - epsilon = 1e-6, - tauEpsilon = tau - epsilon; - -function Path() { - this._x0 = this._y0 = // start of current subpath - this._x1 = this._y1 = null; // end of current subpath - this._ = ""; -} - -function path() { - return new Path; -} - -Path.prototype = path.prototype = { - constructor: Path, - moveTo: function(x, y) { - this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y); - }, - closePath: function() { - if (this._x1 !== null) { - this._x1 = this._x0, this._y1 = this._y0; - this._ += "Z"; - } - }, - lineTo: function(x, y) { - this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y); - }, - quadraticCurveTo: function(x1, y1, x, y) { - this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y); - }, - bezierCurveTo: function(x1, y1, x2, y2, x, y) { - this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y); - }, - arcTo: function(x1, y1, x2, y2, r) { - x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; - var x0 = this._x1, - y0 = this._y1, - x21 = x2 - x1, - y21 = y2 - y1, - x01 = x0 - x1, - y01 = y0 - y1, - l01_2 = x01 * x01 + y01 * y01; - - // Is the radius negative? Error. - if (r < 0) throw new Error("negative radius: " + r); - - // Is this path empty? Move to (x1,y1). - if (this._x1 === null) { - this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1); - } - - // Or, is (x1,y1) coincident with (x0,y0)? Do nothing. - else if (!(l01_2 > epsilon)); - - // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear? - // Equivalently, is (x1,y1) coincident with (x2,y2)? - // Or, is the radius zero? Line to (x1,y1). - else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) { - this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1); - } - - // Otherwise, draw an arc! - else { - var x20 = x2 - x0, - y20 = y2 - y0, - l21_2 = x21 * x21 + y21 * y21, - l20_2 = x20 * x20 + y20 * y20, - l21 = Math.sqrt(l21_2), - l01 = Math.sqrt(l01_2), - l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), - t01 = l / l01, - t21 = l / l21; - - // If the start tangent is not coincident with (x0,y0), line to. - if (Math.abs(t01 - 1) > epsilon) { - this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01); - } - - this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21); - } - }, - arc: function(x, y, r, a0, a1, ccw) { - x = +x, y = +y, r = +r, ccw = !!ccw; - var dx = r * Math.cos(a0), - dy = r * Math.sin(a0), - x0 = x + dx, - y0 = y + dy, - cw = 1 ^ ccw, - da = ccw ? a0 - a1 : a1 - a0; - - // Is the radius negative? Error. - if (r < 0) throw new Error("negative radius: " + r); - - // Is this path empty? Move to (x0,y0). - if (this._x1 === null) { - this._ += "M" + x0 + "," + y0; - } - - // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0). - else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) { - this._ += "L" + x0 + "," + y0; - } - - // Is this arc empty? We’re done. - if (!r) return; - - // Does the angle go the wrong way? Flip the direction. - if (da < 0) da = da % tau + tau; - - // Is this a complete circle? Draw two arcs to complete the circle. - if (da > tauEpsilon) { - this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0); - } - - // Is this arc non-empty? Draw an arc! - else if (da > epsilon) { - this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1)); - } - }, - rect: function(x, y, w, h) { - this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z"; - }, - toString: function() { - return this._; - } -}; - -exports.path = path; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-path/dist/d3-path.min.js b/node_modules/d3-path/dist/d3-path.min.js deleted file mode 100644 index 88628d097fbc621170ac4f0cea3fcb9df77fe78c..0000000000000000000000000000000000000000 --- a/node_modules/d3-path/dist/d3-path.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-path/ v2.0.0 Copyright 2020 Mike Bostock -!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((t=t||self).d3=t.d3||{})}(this,function(t){"use strict";const i=Math.PI,s=2*i,h=s-1e-6;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function _(){return new e}e.prototype=_.prototype={constructor:e,moveTo:function(t,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,i){this._+="L"+(this._x1=+t)+","+(this._y1=+i)},quadraticCurveTo:function(t,i,s,h){this._+="Q"+ +t+","+ +i+","+(this._x1=+s)+","+(this._y1=+h)},bezierCurveTo:function(t,i,s,h,e,_){this._+="C"+ +t+","+ +i+","+ +s+","+ +h+","+(this._x1=+e)+","+(this._y1=+_)},arcTo:function(t,s,h,e,_){t=+t,s=+s,h=+h,e=+e,_=+_;var n=this._x1,o=this._y1,r=h-t,a=e-s,u=n-t,c=o-s,f=u*u+c*c;if(_<0)throw new Error("negative radius: "+_);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=s);else if(f>1e-6)if(Math.abs(c*r-a*u)>1e-6&&_){var x=h-n,y=e-o,M=r*r+a*a,l=x*x+y*y,d=Math.sqrt(M),p=Math.sqrt(f),v=_*Math.tan((i-Math.acos((M+f-l)/(2*d*p)))/2),b=v/p,w=v/d;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(s+b*c)),this._+="A"+_+","+_+",0,0,"+ +(c*x>u*y)+","+(this._x1=t+w*r)+","+(this._y1=s+w*a)}else this._+="L"+(this._x1=t)+","+(this._y1=s);else;},arc:function(t,e,_,n,o,r){t=+t,e=+e,r=!!r;var a=(_=+_)*Math.cos(n),u=_*Math.sin(n),c=t+a,f=e+u,x=1^r,y=r?n-o:o-n;if(_<0)throw new Error("negative radius: "+_);null===this._x1?this._+="M"+c+","+f:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-f)>1e-6)&&(this._+="L"+c+","+f),_&&(y<0&&(y=y%s+s),y>h?this._+="A"+_+","+_+",0,1,"+x+","+(t-a)+","+(e-u)+"A"+_+","+_+",0,1,"+x+","+(this._x1=c)+","+(this._y1=f):y>1e-6&&(this._+="A"+_+","+_+",0,"+ +(y>=i)+","+x+","+(this._x1=t+_*Math.cos(o))+","+(this._y1=e+_*Math.sin(o))))},rect:function(t,i,s,h){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+i)+"h"+ +s+"v"+ +h+"h"+-s+"Z"},toString:function(){return this._}},t.path=_,Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/node_modules/d3-path/package.json b/node_modules/d3-path/package.json deleted file mode 100644 index 32a547f7e030141e4ae679dcf8d15f179260e320..0000000000000000000000000000000000000000 --- a/node_modules/d3-path/package.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "_from": "d3-path@2", - "_id": "d3-path@2.0.0", - "_inBundle": false, - "_integrity": "sha512-ZwZQxKhBnv9yHaiWd6ZU4x5BtCQ7pXszEV9CU6kRgwIQVQGLMv1oiL4M+MK/n79sYzsj+gcgpPQSctJUsLN7fA==", - "_location": "/d3-path", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-path@2", - "name": "d3-path", - "escapedName": "d3-path", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3", - "/d3-chord", - "/d3-shape" - ], - "_resolved": "https://registry.npmjs.org/d3-path/-/d3-path-2.0.0.tgz", - "_shasum": "55d86ac131a0548adae241eebfb56b4582dd09d8", - "_spec": "d3-path@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-path/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Serialize Canvas path commands to SVG.", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-path/", - "jsdelivr": "dist/d3-path.min.js", - "keywords": [ - "d3", - "d3-module", - "canvas", - "path", - "svg", - "graphics", - "CanvasRenderingContext2D", - "CanvasPathMethods", - "Path2D" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-path.js", - "module": "src/index.js", - "name": "d3-path", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-path.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src test" - }, - "sideEffects": false, - "unpkg": "dist/d3-path.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-path/src/index.js b/node_modules/d3-path/src/index.js deleted file mode 100644 index 968e6e581f086ebc03e7c37a4d7a55feae82b0bd..0000000000000000000000000000000000000000 --- a/node_modules/d3-path/src/index.js +++ /dev/null @@ -1 +0,0 @@ -export {default as path} from "./path.js"; diff --git a/node_modules/d3-path/src/path.js b/node_modules/d3-path/src/path.js deleted file mode 100644 index 28f1f666a7674cbf760b19e5aa33a0f2dc0d2b35..0000000000000000000000000000000000000000 --- a/node_modules/d3-path/src/path.js +++ /dev/null @@ -1,130 +0,0 @@ -const pi = Math.PI, - tau = 2 * pi, - epsilon = 1e-6, - tauEpsilon = tau - epsilon; - -function Path() { - this._x0 = this._y0 = // start of current subpath - this._x1 = this._y1 = null; // end of current subpath - this._ = ""; -} - -function path() { - return new Path; -} - -Path.prototype = path.prototype = { - constructor: Path, - moveTo: function(x, y) { - this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y); - }, - closePath: function() { - if (this._x1 !== null) { - this._x1 = this._x0, this._y1 = this._y0; - this._ += "Z"; - } - }, - lineTo: function(x, y) { - this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y); - }, - quadraticCurveTo: function(x1, y1, x, y) { - this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y); - }, - bezierCurveTo: function(x1, y1, x2, y2, x, y) { - this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y); - }, - arcTo: function(x1, y1, x2, y2, r) { - x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; - var x0 = this._x1, - y0 = this._y1, - x21 = x2 - x1, - y21 = y2 - y1, - x01 = x0 - x1, - y01 = y0 - y1, - l01_2 = x01 * x01 + y01 * y01; - - // Is the radius negative? Error. - if (r < 0) throw new Error("negative radius: " + r); - - // Is this path empty? Move to (x1,y1). - if (this._x1 === null) { - this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1); - } - - // Or, is (x1,y1) coincident with (x0,y0)? Do nothing. - else if (!(l01_2 > epsilon)); - - // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear? - // Equivalently, is (x1,y1) coincident with (x2,y2)? - // Or, is the radius zero? Line to (x1,y1). - else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) { - this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1); - } - - // Otherwise, draw an arc! - else { - var x20 = x2 - x0, - y20 = y2 - y0, - l21_2 = x21 * x21 + y21 * y21, - l20_2 = x20 * x20 + y20 * y20, - l21 = Math.sqrt(l21_2), - l01 = Math.sqrt(l01_2), - l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), - t01 = l / l01, - t21 = l / l21; - - // If the start tangent is not coincident with (x0,y0), line to. - if (Math.abs(t01 - 1) > epsilon) { - this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01); - } - - this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21); - } - }, - arc: function(x, y, r, a0, a1, ccw) { - x = +x, y = +y, r = +r, ccw = !!ccw; - var dx = r * Math.cos(a0), - dy = r * Math.sin(a0), - x0 = x + dx, - y0 = y + dy, - cw = 1 ^ ccw, - da = ccw ? a0 - a1 : a1 - a0; - - // Is the radius negative? Error. - if (r < 0) throw new Error("negative radius: " + r); - - // Is this path empty? Move to (x0,y0). - if (this._x1 === null) { - this._ += "M" + x0 + "," + y0; - } - - // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0). - else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) { - this._ += "L" + x0 + "," + y0; - } - - // Is this arc empty? We’re done. - if (!r) return; - - // Does the angle go the wrong way? Flip the direction. - if (da < 0) da = da % tau + tau; - - // Is this a complete circle? Draw two arcs to complete the circle. - if (da > tauEpsilon) { - this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0); - } - - // Is this arc non-empty? Draw an arc! - else if (da > epsilon) { - this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1)); - } - }, - rect: function(x, y, w, h) { - this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z"; - }, - toString: function() { - return this._; - } -}; - -export default path; diff --git a/node_modules/d3-polygon/LICENSE b/node_modules/d3-polygon/LICENSE deleted file mode 100644 index 721bd22ece6587a9408eda1b6a3949c425b5624a..0000000000000000000000000000000000000000 --- a/node_modules/d3-polygon/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-polygon/README.md b/node_modules/d3-polygon/README.md deleted file mode 100644 index 4c0736d4226cb63c276e55d17fbd23766c951d2d..0000000000000000000000000000000000000000 --- a/node_modules/d3-polygon/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# d3-polygon - -This module provides a few basic geometric operations for two-dimensional polygons. Each polygon is represented as an array of two-element arrays [​[<i>x1</i>, <i>y1</i>], [<i>x2</i>, <i>y2</i>], …], and may either be closed (wherein the first and last point are the same) or open (wherein they are not). Typically polygons are in counterclockwise order, assuming a coordinate system where the origin ⟨0,0⟩ is in the top-left corner. - -## Installing - -If you use NPM, `npm install d3-polygon`. Otherwise, download the [latest release](https://github.com/d3/d3-polygon/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-polygon.v1.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-polygon.v2.min.js"></script> -<script> - -var hull = d3.polygonHull(points); - -</script> -``` - -## API Reference - -<a href="#polygonArea" name="polygonArea">#</a> d3.<b>polygonArea</b>(<i>polygon</i>) [<>](https://github.com/d3/d3-polygon/blob/master/src/area.js#L1 "Source Code") - -Returns the signed area of the specified *polygon*. If the vertices of the polygon are in counterclockwise order (assuming a coordinate system where the origin ⟨0,0⟩ is in the top-left corner), the returned area is positive; otherwise it is negative, or zero. - -<a href="#polygonCentroid" name="polygonCentroid">#</a> d3.<b>polygonCentroid</b>(<i>polygon</i>) [<>](https://github.com/d3/d3-polygon/blob/master/src/centroid.js#L1 "Source Code") - -Returns the [centroid](https://en.wikipedia.org/wiki/Centroid) of the specified *polygon*. - -<a href="#polygonHull" name="polygonHull">#</a> d3.<b>polygonHull</b>(<i>points</i>) [<>](https://github.com/d3/d3-polygon/blob/master/src/hull.js#L23 "Source Code") - -<a href="http://bl.ocks.org/mbostock/6f14f7b7f267a85f7cdc"><img src="https://raw.githubusercontent.com/d3/d3-polygon/master/img/hull.png" width="250" height="250"></a> - -Returns the [convex hull](https://en.wikipedia.org/wiki/Convex_hull) of the specified *points* using [Andrew’s monotone chain algorithm](http://en.wikibooks.org/wiki/Algorithm_Implementation/Geometry/Convex_hull/Monotone_chain). The returned hull is represented as an array containing a subset of the input *points* arranged in counterclockwise order. Returns null if *points* has fewer than three elements. - -<a href="#polygonContains" name="polygonContains">#</a> d3.<b>polygonContains</b>(<i>polygon</i>, <i>point</i>) [<>](https://github.com/d3/d3-polygon/blob/master/src/contains.js#L1 "Source Code") - -Returns true if and only if the specified *point* is inside the specified *polygon*. - -<a href="#polygonLength" name="polygonLength">#</a> d3.<b>polygonLength</b>(<i>polygon</i>) [<>](https://github.com/d3/d3-polygon/blob/master/src/length.js#L1 "Source Code") - -Returns the length of the perimeter of the specified *polygon*. diff --git a/node_modules/d3-polygon/dist/d3-polygon.js b/node_modules/d3-polygon/dist/d3-polygon.js deleted file mode 100644 index 244a55fa1263f4965af05ef4ca9377b85e8accf8..0000000000000000000000000000000000000000 --- a/node_modules/d3-polygon/dist/d3-polygon.js +++ /dev/null @@ -1,150 +0,0 @@ -// https://d3js.org/d3-polygon/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {})); -}(this, function (exports) { 'use strict'; - -function area(polygon) { - var i = -1, - n = polygon.length, - a, - b = polygon[n - 1], - area = 0; - - while (++i < n) { - a = b; - b = polygon[i]; - area += a[1] * b[0] - a[0] * b[1]; - } - - return area / 2; -} - -function centroid(polygon) { - var i = -1, - n = polygon.length, - x = 0, - y = 0, - a, - b = polygon[n - 1], - c, - k = 0; - - while (++i < n) { - a = b; - b = polygon[i]; - k += c = a[0] * b[1] - b[0] * a[1]; - x += (a[0] + b[0]) * c; - y += (a[1] + b[1]) * c; - } - - return k *= 3, [x / k, y / k]; -} - -// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of -// the 3D cross product in a quadrant I Cartesian coordinate system (+x is -// right, +y is up). Returns a positive value if ABC is counter-clockwise, -// negative if clockwise, and zero if the points are collinear. -function cross(a, b, c) { - return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]); -} - -function lexicographicOrder(a, b) { - return a[0] - b[0] || a[1] - b[1]; -} - -// Computes the upper convex hull per the monotone chain algorithm. -// Assumes points.length >= 3, is sorted by x, unique in y. -// Returns an array of indices into points in left-to-right order. -function computeUpperHullIndexes(points) { - const n = points.length, - indexes = [0, 1]; - let size = 2, i; - - for (i = 2; i < n; ++i) { - while (size > 1 && cross(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size; - indexes[size++] = i; - } - - return indexes.slice(0, size); // remove popped points -} - -function hull(points) { - if ((n = points.length) < 3) return null; - - var i, - n, - sortedPoints = new Array(n), - flippedPoints = new Array(n); - - for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i]; - sortedPoints.sort(lexicographicOrder); - for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]]; - - var upperIndexes = computeUpperHullIndexes(sortedPoints), - lowerIndexes = computeUpperHullIndexes(flippedPoints); - - // Construct the hull polygon, removing possible duplicate endpoints. - var skipLeft = lowerIndexes[0] === upperIndexes[0], - skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1], - hull = []; - - // Add upper hull in right-to-l order. - // Then add lower hull in left-to-right order. - for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]); - for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]); - - return hull; -} - -function contains(polygon, point) { - var n = polygon.length, - p = polygon[n - 1], - x = point[0], y = point[1], - x0 = p[0], y0 = p[1], - x1, y1, - inside = false; - - for (var i = 0; i < n; ++i) { - p = polygon[i], x1 = p[0], y1 = p[1]; - if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside; - x0 = x1, y0 = y1; - } - - return inside; -} - -function length(polygon) { - var i = -1, - n = polygon.length, - b = polygon[n - 1], - xa, - ya, - xb = b[0], - yb = b[1], - perimeter = 0; - - while (++i < n) { - xa = xb; - ya = yb; - b = polygon[i]; - xb = b[0]; - yb = b[1]; - xa -= xb; - ya -= yb; - perimeter += Math.hypot(xa, ya); - } - - return perimeter; -} - -exports.polygonArea = area; -exports.polygonCentroid = centroid; -exports.polygonContains = contains; -exports.polygonHull = hull; -exports.polygonLength = length; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-polygon/dist/d3-polygon.min.js b/node_modules/d3-polygon/dist/d3-polygon.min.js deleted file mode 100644 index f5f446470fc2be45abb00076b16367203de3dfe1..0000000000000000000000000000000000000000 --- a/node_modules/d3-polygon/dist/d3-polygon.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-polygon/ v2.0.0 Copyright 2020 Mike Bostock -!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((n=n||self).d3=n.d3||{})}(this,function(n){"use strict";function e(n,e){return n[0]-e[0]||n[1]-e[1]}function t(n){const e=n.length,t=[0,1];let r,o=2;for(r=2;r<e;++r){for(;o>1&&(f=n[t[o-2]],u=n[t[o-1]],l=n[r],(u[0]-f[0])*(l[1]-f[1])-(u[1]-f[1])*(l[0]-f[0])<=0);)--o;t[o++]=r}var f,u,l;return t.slice(0,o)}n.polygonArea=function(n){for(var e,t=-1,r=n.length,o=n[r-1],f=0;++t<r;)e=o,o=n[t],f+=e[1]*o[0]-e[0]*o[1];return f/2},n.polygonCentroid=function(n){for(var e,t,r=-1,o=n.length,f=0,u=0,l=n[o-1],i=0;++r<o;)e=l,l=n[r],i+=t=e[0]*l[1]-l[0]*e[1],f+=(e[0]+l[0])*t,u+=(e[1]+l[1])*t;return[f/(i*=3),u/i]},n.polygonContains=function(n,e){for(var t,r,o=n.length,f=n[o-1],u=e[0],l=e[1],i=f[0],g=f[1],h=!1,c=0;c<o;++c)t=(f=n[c])[0],(r=f[1])>l!=g>l&&u<(i-t)*(l-r)/(g-r)+t&&(h=!h),i=t,g=r;return h},n.polygonHull=function(n){if((o=n.length)<3)return null;var r,o,f=new Array(o),u=new Array(o);for(r=0;r<o;++r)f[r]=[+n[r][0],+n[r][1],r];for(f.sort(e),r=0;r<o;++r)u[r]=[f[r][0],-f[r][1]];var l=t(f),i=t(u),g=i[0]===l[0],h=i[i.length-1]===l[l.length-1],c=[];for(r=l.length-1;r>=0;--r)c.push(n[f[l[r]][2]]);for(r=+g;r<i.length-h;++r)c.push(n[f[i[r]][2]]);return c},n.polygonLength=function(n){for(var e,t,r=-1,o=n.length,f=n[o-1],u=f[0],l=f[1],i=0;++r<o;)e=u,t=l,e-=u=(f=n[r])[0],t-=l=f[1],i+=Math.hypot(e,t);return i},Object.defineProperty(n,"__esModule",{value:!0})}); diff --git a/node_modules/d3-polygon/package.json b/node_modules/d3-polygon/package.json deleted file mode 100644 index 27a1166e9c902487b51d9c0c060edf8c6f02af0c..0000000000000000000000000000000000000000 --- a/node_modules/d3-polygon/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "_from": "d3-polygon@2", - "_id": "d3-polygon@2.0.0", - "_inBundle": false, - "_integrity": "sha512-MsexrCK38cTGermELs0cO1d79DcTsQRN7IWMJKczD/2kBjzNXxLUWP33qRF6VDpiLV/4EI4r6Gs0DAWQkE8pSQ==", - "_location": "/d3-polygon", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-polygon@2", - "name": "d3-polygon", - "escapedName": "d3-polygon", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3" - ], - "_resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-2.0.0.tgz", - "_shasum": "13608ef042fbec625ba1598327564f03c0396d8e", - "_spec": "d3-polygon@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-polygon/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Operations for two-dimensional polygons.", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-polygon/", - "jsdelivr": "dist/d3-polygon.min.js", - "keywords": [ - "d3", - "d3-module", - "polygon", - "hull", - "geometry", - "graphics" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-polygon.js", - "module": "src/index.js", - "name": "d3-polygon", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-polygon.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src test" - }, - "sideEffects": false, - "unpkg": "dist/d3-polygon.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-polygon/src/area.js b/node_modules/d3-polygon/src/area.js deleted file mode 100644 index 109efb481ca97ef1a3071a05648cff1d3dd4689c..0000000000000000000000000000000000000000 --- a/node_modules/d3-polygon/src/area.js +++ /dev/null @@ -1,15 +0,0 @@ -export default function(polygon) { - var i = -1, - n = polygon.length, - a, - b = polygon[n - 1], - area = 0; - - while (++i < n) { - a = b; - b = polygon[i]; - area += a[1] * b[0] - a[0] * b[1]; - } - - return area / 2; -} diff --git a/node_modules/d3-polygon/src/centroid.js b/node_modules/d3-polygon/src/centroid.js deleted file mode 100644 index 6c8ece1f2fca836e6472a34d1a297357ea59af1f..0000000000000000000000000000000000000000 --- a/node_modules/d3-polygon/src/centroid.js +++ /dev/null @@ -1,20 +0,0 @@ -export default function(polygon) { - var i = -1, - n = polygon.length, - x = 0, - y = 0, - a, - b = polygon[n - 1], - c, - k = 0; - - while (++i < n) { - a = b; - b = polygon[i]; - k += c = a[0] * b[1] - b[0] * a[1]; - x += (a[0] + b[0]) * c; - y += (a[1] + b[1]) * c; - } - - return k *= 3, [x / k, y / k]; -} diff --git a/node_modules/d3-polygon/src/contains.js b/node_modules/d3-polygon/src/contains.js deleted file mode 100644 index a0beabca5e0691ea71d4b74ea37a6a693aa02b37..0000000000000000000000000000000000000000 --- a/node_modules/d3-polygon/src/contains.js +++ /dev/null @@ -1,16 +0,0 @@ -export default function(polygon, point) { - var n = polygon.length, - p = polygon[n - 1], - x = point[0], y = point[1], - x0 = p[0], y0 = p[1], - x1, y1, - inside = false; - - for (var i = 0; i < n; ++i) { - p = polygon[i], x1 = p[0], y1 = p[1]; - if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside; - x0 = x1, y0 = y1; - } - - return inside; -} diff --git a/node_modules/d3-polygon/src/cross.js b/node_modules/d3-polygon/src/cross.js deleted file mode 100644 index 11a6df0736e7556f0f0cd494a98a1e3e2e53ef05..0000000000000000000000000000000000000000 --- a/node_modules/d3-polygon/src/cross.js +++ /dev/null @@ -1,7 +0,0 @@ -// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of -// the 3D cross product in a quadrant I Cartesian coordinate system (+x is -// right, +y is up). Returns a positive value if ABC is counter-clockwise, -// negative if clockwise, and zero if the points are collinear. -export default function(a, b, c) { - return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]); -} diff --git a/node_modules/d3-polygon/src/hull.js b/node_modules/d3-polygon/src/hull.js deleted file mode 100644 index daaf9a51eba7ceaef030818b7560af98ef6ffc47..0000000000000000000000000000000000000000 --- a/node_modules/d3-polygon/src/hull.js +++ /dev/null @@ -1,49 +0,0 @@ -import cross from "./cross.js"; - -function lexicographicOrder(a, b) { - return a[0] - b[0] || a[1] - b[1]; -} - -// Computes the upper convex hull per the monotone chain algorithm. -// Assumes points.length >= 3, is sorted by x, unique in y. -// Returns an array of indices into points in left-to-right order. -function computeUpperHullIndexes(points) { - const n = points.length, - indexes = [0, 1]; - let size = 2, i; - - for (i = 2; i < n; ++i) { - while (size > 1 && cross(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size; - indexes[size++] = i; - } - - return indexes.slice(0, size); // remove popped points -} - -export default function(points) { - if ((n = points.length) < 3) return null; - - var i, - n, - sortedPoints = new Array(n), - flippedPoints = new Array(n); - - for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i]; - sortedPoints.sort(lexicographicOrder); - for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]]; - - var upperIndexes = computeUpperHullIndexes(sortedPoints), - lowerIndexes = computeUpperHullIndexes(flippedPoints); - - // Construct the hull polygon, removing possible duplicate endpoints. - var skipLeft = lowerIndexes[0] === upperIndexes[0], - skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1], - hull = []; - - // Add upper hull in right-to-l order. - // Then add lower hull in left-to-right order. - for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]); - for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]); - - return hull; -} diff --git a/node_modules/d3-polygon/src/index.js b/node_modules/d3-polygon/src/index.js deleted file mode 100644 index e774be9713ebe9bdb7afcb3264d797923de20275..0000000000000000000000000000000000000000 --- a/node_modules/d3-polygon/src/index.js +++ /dev/null @@ -1,5 +0,0 @@ -export {default as polygonArea} from "./area.js"; -export {default as polygonCentroid} from "./centroid.js"; -export {default as polygonHull} from "./hull.js"; -export {default as polygonContains} from "./contains.js"; -export {default as polygonLength} from "./length.js"; diff --git a/node_modules/d3-polygon/src/length.js b/node_modules/d3-polygon/src/length.js deleted file mode 100644 index 8e4da5edf078b2502808830b190f237176211685..0000000000000000000000000000000000000000 --- a/node_modules/d3-polygon/src/length.js +++ /dev/null @@ -1,23 +0,0 @@ -export default function(polygon) { - var i = -1, - n = polygon.length, - b = polygon[n - 1], - xa, - ya, - xb = b[0], - yb = b[1], - perimeter = 0; - - while (++i < n) { - xa = xb; - ya = yb; - b = polygon[i]; - xb = b[0]; - yb = b[1]; - xa -= xb; - ya -= yb; - perimeter += Math.hypot(xa, ya); - } - - return perimeter; -} diff --git a/node_modules/d3-quadtree/LICENSE b/node_modules/d3-quadtree/LICENSE deleted file mode 100644 index 721bd22ece6587a9408eda1b6a3949c425b5624a..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-quadtree/README.md b/node_modules/d3-quadtree/README.md deleted file mode 100644 index fd99aae710faec83a7c8dac3efb3d393a1185ecd..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/README.md +++ /dev/null @@ -1,183 +0,0 @@ -# d3-quadtree - -A [quadtree](https://en.wikipedia.org/wiki/Quadtree) recursively partitions two-dimensional space into squares, dividing each square into four equally-sized squares. Each distinct point exists in a unique leaf [node](#nodes); coincident points are represented by a linked list. Quadtrees can accelerate various spatial operations, such as the [Barnes–Hut approximation](https://en.wikipedia.org/wiki/Barnes–Hut_simulation) for computing many-body forces, collision detection, and searching for nearby points. - -<a href="http://bl.ocks.org/mbostock/9078690"><img src="http://bl.ocks.org/mbostock/raw/9078690/thumbnail.png" width="202"></a> -<a href="http://bl.ocks.org/mbostock/4343214"><img src="http://bl.ocks.org/mbostock/raw/4343214/thumbnail.png" width="202"></a> - -## Installing - -If you use NPM, `npm install d3-quadtree`. Otherwise, download the [latest release](https://github.com/d3/d3-quadtree/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-quadtree.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-quadtree.v1.min.js"></script> -<script> - -var quadtree = d3.quadtree(); - -</script> -``` - -## API Reference - -<a name="quadtree" href="#quadtree">#</a> d3.<b>quadtree</b>([<i>data</i>[, <i>x</i>, <i>y</i>]]) - [<>](https://github.com/d3/d3-quadtree/blob/master/src/quadtree.js "Source") - -Creates a new, empty quadtree with an empty [extent](#quadtree_extent) and the default [*x*-](#quadtree_x) and [*y*-](#quadtree_y)accessors. If *data* is specified, [adds](#quadtree_addAll) the specified array of data to the quadtree. This is equivalent to: - -```js -var tree = d3.quadtree() - .addAll(data); -``` - -If *x* and *y* are also specified, sets the [*x*-](#quadtree_x) and [*y*-](#quadtree_y) accessors to the specified functions before adding the specified array of data to the quadtree, equivalent to: - -```js -var tree = d3.quadtree() - .x(x) - .y(y) - .addAll(data); -``` - -<a name="quadtree_x" href="#quadtree_x">#</a> <i>quadtree</i>.<b>x</b>([<i>x</i>]) [<>](https://github.com/d3/d3-quadtree/blob/master/src/x.js "Source") - -If *x* is specified, sets the current *x*-coordinate accessor and returns the quadtree. If *x* is not specified, returns the current *x*-accessor, which defaults to: - -```js -function x(d) { - return d[0]; -} -``` - -The *x*-acccessor is used to derive the *x*-coordinate of data when [adding](#quadtree_add) to and [removing](#quadtree_remove) from the tree. It is also used when [finding](#quadtree_find) to re-access the coordinates of data previously added to the tree; therefore, the *x*- and *y*-accessors must be consistent, returning the same value given the same input. - -<a name="quadtree_y" href="#quadtree_y">#</a> <i>quadtree</i>.<b>y</b>([<i>y</i>]) - [<>](https://github.com/d3/d3-quadtree/blob/master/src/y.js "Source") - -If *y* is specified, sets the current *y*-coordinate accessor and returns the quadtree. If *y* is not specified, returns the current *y*-accessor, which defaults to: - -```js -function y(d) { - return d[1]; -} -``` - -The *y*-acccessor is used to derive the *y*-coordinate of data when [adding](#quadtree_add) to and [removing](#quadtree_remove) from the tree. It is also used when [finding](#quadtree_find) to re-access the coordinates of data previously added to the tree; therefore, the *x*- and *y*-accessors must be consistent, returning the same value given the same input. - -<a name="quadtree_extent" href="#quadtree_extent">#</a> <i>quadtree</i>.<b>extent</b>([*extent*]) - [<>](https://github.com/d3/d3-quadtree/blob/master/src/extent.js "Source") - -If *extent* is specified, expands the quadtree to [cover](#quadtree_cover) the specified points [[*x0*, *y0*], [*x1*, *y1*]] and returns the quadtree. If *extent* is not specified, returns the quadtree’s current extent [[*x0*, *y0*], [*x1*, *y1*]], where *x0* and *y0* are the inclusive lower bounds and *x1* and *y1* are the inclusive upper bounds, or undefined if the quadtree has no extent. The extent may also be expanded by calling [*quadtree*.cover](#quadtree_cover) or [*quadtree*.add](#quadtree_add). - -<a name="quadtree_cover" href="#quadtree_cover">#</a> <i>quadtree</i>.<b>cover</b>(<i>x</i>, <i>y</i>) - [<>](https://github.com/d3/d3-quadtree/blob/master/src/cover.js "Source") - -Expands the quadtree to cover the specified point ⟨*x*,*y*⟩, and returns the quadtree. If the quadtree’s extent already covers the specified point, this method does nothing. If the quadtree has an extent, the extent is repeatedly doubled to cover the specified point, wrapping the [root](#quadtree_root) [node](#nodes) as necessary; if the quadtree is empty, the extent is initialized to the extent [[⌊*x*⌋, ⌊*y*⌋], [⌈*x*⌉, ⌈*y*⌉]]. (Rounding is necessary such that if the extent is later doubled, the boundaries of existing quadrants do not change due to floating point error.) - -<a name="quadtree_add" href="#quadtree_add">#</a> <i>quadtree</i>.<b>add</b>(<i>datum</i>) - [<>](https://github.com/d3/d3-quadtree/blob/master/src/add.js "Source") - -Adds the specified *datum* to the quadtree, deriving its coordinates ⟨*x*,*y*⟩ using the current [*x*-](#quadtree_x) and [*y*-](#quadtree_y)accessors, and returns the quadtree. If the new point is outside the current [extent](#quadtree_extent) of the quadtree, the quadtree is automatically expanded to [cover](#quadtree_cover) the new point. - -<a name="quadtree_addAll" href="#quadtree_addAll">#</a> <i>quadtree</i>.<b>addAll</b>(<i>data</i>) - [<>](https://github.com/d3/d3-quadtree/blob/master/src/add.js "Source") - -Adds the specified array of *data* to the quadtree, deriving each element’s coordinates ⟨*x*,*y*⟩ using the current [*x*-](#quadtree_x) and [*y*-](#quadtree_y)accessors, and return this quadtree. This is approximately equivalent to calling [*quadtree*.add](#quadtree_add) repeatedly: - -```js -for (var i = 0, n = data.length; i < n; ++i) { - quadtree.add(data[i]); -} -``` - -However, this method results in a more compact quadtree because the extent of the *data* is computed first before adding the data. - -<a name="quadtree_remove" href="#quadtree_remove">#</a> <i>quadtree</i>.<b>remove</b>(<i>datum</i>) - [<>](https://github.com/d3/d3-quadtree/blob/master/src/remove.js "Source") - -Removes the specified *datum* from the quadtree, deriving its coordinates ⟨*x*,*y*⟩ using the current [*x*-](#quadtree_x) and [*y*-](#quadtree_y)accessors, and returns the quadtree. If the specified *datum* does not exist in this quadtree, this method does nothing. - -<a name="quadtree_removeAll" href="#quadtree_removeAll">#</a> <i>quadtree</i>.<b>removeAll</b>(<i>data</i>) - [<>](https://github.com/d3/d3-quadtree/blob/master/src/remove.js "Source") - -Removes the specified *data* from the quadtree, deriving their coordinates ⟨*x*,*y*⟩ using the current [*x*-](#quadtree_x) and [*y*-](#quadtree_y)accessors, and returns the quadtree. If a specified datum does not exist in this quadtree, it is ignored. - -<a name="quadtree_copy" href="#quadtree_copy">#</a> <i>quadtree</i>.<b>copy</b>() - -Returns a copy of the quadtree. All [nodes](#nodes) in the returned quadtree are identical copies of the corresponding node in the quadtree; however, any data in the quadtree is shared by reference and not copied. - -<a name="quadtree_root" href="#quadtree_root">#</a> <i>quadtree</i>.<b>root</b>() - [<>](https://github.com/d3/d3-quadtree/blob/master/src/root.js "Source") - -Returns the root [node](#nodes) of the quadtree. - -<a name="quadtree_data" href="#quadtree_data">#</a> <i>quadtree</i>.<b>data</b>() - [<>](https://github.com/d3/d3-quadtree/blob/master/src/data.js "Source") - -Returns an array of all data in the quadtree. - -<a name="quadtree_size" href="#quadtree_size">#</a> <i>quadtree</i>.<b>size</b>() - [<>](https://github.com/d3/d3-quadtree/blob/master/src/size.js "Source") - -Returns the total number of data in the quadtree. - -<a name="quadtree_find" href="#quadtree_find">#</a> <i>quadtree</i>.<b>find</b>(<i>x</i>, <i>y</i>[, <i>radius</i>]) - [<>](https://github.com/d3/d3-quadtree/blob/master/src/find.js "Source") - -Returns the datum closest to the position ⟨*x*,*y*⟩ with the given search *radius*. If *radius* is not specified, it defaults to infinity. If there is no datum within the search area, returns undefined. - -<a name="quadtree_visit" href="#quadtree_visit">#</a> <i>quadtree</i>.<b>visit</b>(<i>callback</i>) - [<>](https://github.com/d3/d3-quadtree/blob/master/src/visit.js "Source") - -Visits each [node](#nodes) in the quadtree in pre-order traversal, invoking the specified *callback* with arguments *node*, *x0*, *y0*, *x1*, *y1* for each node, where *node* is the node being visited, ⟨*x0*, *y0*⟩ are the lower bounds of the node, and ⟨*x1*, *y1*⟩ are the upper bounds, and returns the quadtree. (Assuming that positive *x* is right and positive *y* is down, as is typically the case in Canvas and SVG, ⟨*x0*, *y0*⟩ is the top-left corner and ⟨*x1*, *y1*⟩ is the lower-right corner; however, the coordinate system is arbitrary, so more formally *x0* <= *x1* and *y0* <= *y1*.) - -If the *callback* returns true for a given node, then the children of that node are not visited; otherwise, all child nodes are visited. This can be used to quickly visit only parts of the tree, for example when using the [Barnes–Hut approximation](https://en.wikipedia.org/wiki/Barnes–Hut_simulation). Note, however, that child quadrants are always visited in sibling order: top-left, top-right, bottom-left, bottom-right. In cases such as [search](#quadtree_find), visiting siblings in a specific order may be faster. - -As an example, the following visits the quadtree and returns all the nodes within a rectangular extent [xmin, ymin, xmax, ymax], ignoring quads that cannot possibly contain any such node: - -```js -function search(quadtree, xmin, ymin, xmax, ymax) { - const results = []; - quadtree.visit(function(node, x1, y1, x2, y2) { - if (!node.length) { - do { - var d = node.data; - if (d[0] >= xmin && d[0] < xmax && d[1] >= ymin && d[1] < ymax) { - results.push(d); - } - } while (node = node.next); - } - return x1 >= xmax || y1 >= ymax || x2 < xmin || y2 < ymin; - }); - return results; -} -``` - -<a name="quadtree_visitAfter" href="#quadtree_visitAfter">#</a> <i>quadtree</i>.<b>visitAfter</b>(<i>callback</i>) - [<>](https://github.com/d3/d3-quadtree/blob/master/src/visitAfter.js "Source") - -Visits each [node](#nodes) in the quadtree in post-order traversal, invoking the specified *callback* with arguments *node*, *x0*, *y0*, *x1*, *y1* for each node, where *node* is the node being visited, ⟨*x0*, *y0*⟩ are the lower bounds of the node, and ⟨*x1*, *y1*⟩ are the upper bounds, and returns the quadtree. (Assuming that positive *x* is right and positive *y* is down, as is typically the case in Canvas and SVG, ⟨*x0*, *y0*⟩ is the top-left corner and ⟨*x1*, *y1*⟩ is the lower-right corner; however, the coordinate system is arbitrary, so more formally *x0* <= *x1* and *y0* <= *y1*.) Returns *root*. - -### Nodes - -Internal nodes of the quadtree are represented as four-element arrays in left-to-right, top-to-bottom order: - -* `0` - the top-left quadrant, if any. -* `1` - the top-right quadrant, if any. -* `2` - the bottom-left quadrant, if any. -* `3` - the bottom-right quadrant, if any. - -A child quadrant may be undefined if it is empty. - -Leaf nodes are represented as objects with the following properties: - -* `data` - the data associated with this point, as passed to [*quadtree*.add](#quadtree_add). -* `next` - the next datum in this leaf, if any. - -The `length` property may be used to distinguish leaf nodes from internal nodes: it is undefined for leaf nodes, and 4 for internal nodes. For example, to iterate over all data in a leaf node: - -```js -if (!node.length) do console.log(node.data); while (node = node.next); -``` - -The point’s *x*- and *y*-coordinates **must not be modified** while the point is in the quadtree. To update a point’s position, [remove](#quadtree_remove) the point and then re-[add](#quadtree_add) it to the quadtree at the new position. Alternatively, you may discard the existing quadtree entirely and create a new one from scratch; this may be more efficient if many of the points have moved. diff --git a/node_modules/d3-quadtree/dist/d3-quadtree.js b/node_modules/d3-quadtree/dist/d3-quadtree.js deleted file mode 100644 index 4e2c117dfaea281b344ea531b8297606b859ebca..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/dist/d3-quadtree.js +++ /dev/null @@ -1,419 +0,0 @@ -// https://d3js.org/d3-quadtree/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {})); -}(this, function (exports) { 'use strict'; - -function tree_add(d) { - const x = +this._x.call(null, d), - y = +this._y.call(null, d); - return add(this.cover(x, y), x, y, d); -} - -function add(tree, x, y, d) { - if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points - - var parent, - node = tree._root, - leaf = {data: d}, - x0 = tree._x0, - y0 = tree._y0, - x1 = tree._x1, - y1 = tree._y1, - xm, - ym, - xp, - yp, - right, - bottom, - i, - j; - - // If the tree is empty, initialize the root as a leaf. - if (!node) return tree._root = leaf, tree; - - // Find the existing leaf for the new point, or add it. - while (node.length) { - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree; - } - - // Is the new point is exactly coincident with the existing point? - xp = +tree._x.call(null, node.data); - yp = +tree._y.call(null, node.data); - if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree; - - // Otherwise, split the leaf node until the old and new point are separated. - do { - parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4); - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm))); - return parent[j] = node, parent[i] = leaf, tree; -} - -function addAll(data) { - var d, i, n = data.length, - x, - y, - xz = new Array(n), - yz = new Array(n), - x0 = Infinity, - y0 = Infinity, - x1 = -Infinity, - y1 = -Infinity; - - // Compute the points and their extent. - for (i = 0; i < n; ++i) { - if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue; - xz[i] = x; - yz[i] = y; - if (x < x0) x0 = x; - if (x > x1) x1 = x; - if (y < y0) y0 = y; - if (y > y1) y1 = y; - } - - // If there were no (valid) points, abort. - if (x0 > x1 || y0 > y1) return this; - - // Expand the tree to cover the new points. - this.cover(x0, y0).cover(x1, y1); - - // Add the new points. - for (i = 0; i < n; ++i) { - add(this, xz[i], yz[i], data[i]); - } - - return this; -} - -function tree_cover(x, y) { - if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points - - var x0 = this._x0, - y0 = this._y0, - x1 = this._x1, - y1 = this._y1; - - // If the quadtree has no extent, initialize them. - // Integer extent are necessary so that if we later double the extent, - // the existing quadrant boundaries don’t change due to floating point error! - if (isNaN(x0)) { - x1 = (x0 = Math.floor(x)) + 1; - y1 = (y0 = Math.floor(y)) + 1; - } - - // Otherwise, double repeatedly to cover. - else { - var z = x1 - x0 || 1, - node = this._root, - parent, - i; - - while (x0 > x || x >= x1 || y0 > y || y >= y1) { - i = (y < y0) << 1 | (x < x0); - parent = new Array(4), parent[i] = node, node = parent, z *= 2; - switch (i) { - case 0: x1 = x0 + z, y1 = y0 + z; break; - case 1: x0 = x1 - z, y1 = y0 + z; break; - case 2: x1 = x0 + z, y0 = y1 - z; break; - case 3: x0 = x1 - z, y0 = y1 - z; break; - } - } - - if (this._root && this._root.length) this._root = node; - } - - this._x0 = x0; - this._y0 = y0; - this._x1 = x1; - this._y1 = y1; - return this; -} - -function tree_data() { - var data = []; - this.visit(function(node) { - if (!node.length) do data.push(node.data); while (node = node.next) - }); - return data; -} - -function tree_extent(_) { - return arguments.length - ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) - : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]]; -} - -function Quad(node, x0, y0, x1, y1) { - this.node = node; - this.x0 = x0; - this.y0 = y0; - this.x1 = x1; - this.y1 = y1; -} - -function tree_find(x, y, radius) { - var data, - x0 = this._x0, - y0 = this._y0, - x1, - y1, - x2, - y2, - x3 = this._x1, - y3 = this._y1, - quads = [], - node = this._root, - q, - i; - - if (node) quads.push(new Quad(node, x0, y0, x3, y3)); - if (radius == null) radius = Infinity; - else { - x0 = x - radius, y0 = y - radius; - x3 = x + radius, y3 = y + radius; - radius *= radius; - } - - while (q = quads.pop()) { - - // Stop searching if this quadrant can’t contain a closer node. - if (!(node = q.node) - || (x1 = q.x0) > x3 - || (y1 = q.y0) > y3 - || (x2 = q.x1) < x0 - || (y2 = q.y1) < y0) continue; - - // Bisect the current quadrant. - if (node.length) { - var xm = (x1 + x2) / 2, - ym = (y1 + y2) / 2; - - quads.push( - new Quad(node[3], xm, ym, x2, y2), - new Quad(node[2], x1, ym, xm, y2), - new Quad(node[1], xm, y1, x2, ym), - new Quad(node[0], x1, y1, xm, ym) - ); - - // Visit the closest quadrant first. - if (i = (y >= ym) << 1 | (x >= xm)) { - q = quads[quads.length - 1]; - quads[quads.length - 1] = quads[quads.length - 1 - i]; - quads[quads.length - 1 - i] = q; - } - } - - // Visit this point. (Visiting coincident points isn’t necessary!) - else { - var dx = x - +this._x.call(null, node.data), - dy = y - +this._y.call(null, node.data), - d2 = dx * dx + dy * dy; - if (d2 < radius) { - var d = Math.sqrt(radius = d2); - x0 = x - d, y0 = y - d; - x3 = x + d, y3 = y + d; - data = node.data; - } - } - } - - return data; -} - -function tree_remove(d) { - if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points - - var parent, - node = this._root, - retainer, - previous, - next, - x0 = this._x0, - y0 = this._y0, - x1 = this._x1, - y1 = this._y1, - x, - y, - xm, - ym, - right, - bottom, - i, - j; - - // If the tree is empty, initialize the root as a leaf. - if (!node) return this; - - // Find the leaf node for the point. - // While descending, also retain the deepest parent with a non-removed sibling. - if (node.length) while (true) { - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - if (!(parent = node, node = node[i = bottom << 1 | right])) return this; - if (!node.length) break; - if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i; - } - - // Find the point to remove. - while (node.data !== d) if (!(previous = node, node = node.next)) return this; - if (next = node.next) delete node.next; - - // If there are multiple coincident points, remove just the point. - if (previous) return (next ? previous.next = next : delete previous.next), this; - - // If this is the root point, remove it. - if (!parent) return this._root = next, this; - - // Remove this leaf. - next ? parent[i] = next : delete parent[i]; - - // If the parent now contains exactly one leaf, collapse superfluous parents. - if ((node = parent[0] || parent[1] || parent[2] || parent[3]) - && node === (parent[3] || parent[2] || parent[1] || parent[0]) - && !node.length) { - if (retainer) retainer[j] = node; - else this._root = node; - } - - return this; -} - -function removeAll(data) { - for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]); - return this; -} - -function tree_root() { - return this._root; -} - -function tree_size() { - var size = 0; - this.visit(function(node) { - if (!node.length) do ++size; while (node = node.next) - }); - return size; -} - -function tree_visit(callback) { - var quads = [], q, node = this._root, child, x0, y0, x1, y1; - if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1)); - while (q = quads.pop()) { - if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) { - var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; - if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1)); - if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); - if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); - if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); - } - } - return this; -} - -function tree_visitAfter(callback) { - var quads = [], next = [], q; - if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1)); - while (q = quads.pop()) { - var node = q.node; - if (node.length) { - var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; - if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); - if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); - if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); - if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1)); - } - next.push(q); - } - while (q = next.pop()) { - callback(q.node, q.x0, q.y0, q.x1, q.y1); - } - return this; -} - -function defaultX(d) { - return d[0]; -} - -function tree_x(_) { - return arguments.length ? (this._x = _, this) : this._x; -} - -function defaultY(d) { - return d[1]; -} - -function tree_y(_) { - return arguments.length ? (this._y = _, this) : this._y; -} - -function quadtree(nodes, x, y) { - var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN); - return nodes == null ? tree : tree.addAll(nodes); -} - -function Quadtree(x, y, x0, y0, x1, y1) { - this._x = x; - this._y = y; - this._x0 = x0; - this._y0 = y0; - this._x1 = x1; - this._y1 = y1; - this._root = undefined; -} - -function leaf_copy(leaf) { - var copy = {data: leaf.data}, next = copy; - while (leaf = leaf.next) next = next.next = {data: leaf.data}; - return copy; -} - -var treeProto = quadtree.prototype = Quadtree.prototype; - -treeProto.copy = function() { - var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), - node = this._root, - nodes, - child; - - if (!node) return copy; - - if (!node.length) return copy._root = leaf_copy(node), copy; - - nodes = [{source: node, target: copy._root = new Array(4)}]; - while (node = nodes.pop()) { - for (var i = 0; i < 4; ++i) { - if (child = node.source[i]) { - if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)}); - else node.target[i] = leaf_copy(child); - } - } - } - - return copy; -}; - -treeProto.add = tree_add; -treeProto.addAll = addAll; -treeProto.cover = tree_cover; -treeProto.data = tree_data; -treeProto.extent = tree_extent; -treeProto.find = tree_find; -treeProto.remove = tree_remove; -treeProto.removeAll = removeAll; -treeProto.root = tree_root; -treeProto.size = tree_size; -treeProto.visit = tree_visit; -treeProto.visitAfter = tree_visitAfter; -treeProto.x = tree_x; -treeProto.y = tree_y; - -exports.quadtree = quadtree; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-quadtree/dist/d3-quadtree.min.js b/node_modules/d3-quadtree/dist/d3-quadtree.min.js deleted file mode 100644 index db82ed2ccc5abf6e0beae33d2948d3259ed2e301..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/dist/d3-quadtree.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-quadtree/ v2.0.0 Copyright 2020 Mike Bostock -!function(t,i){"object"==typeof exports&&"undefined"!=typeof module?i(exports):"function"==typeof define&&define.amd?define(["exports"],i):i((t=t||self).d3=t.d3||{})}(this,function(t){"use strict";function i(t,i,n,e){if(isNaN(i)||isNaN(n))return t;var r,s,h,o,a,u,l,_,f,c=t._root,x={data:e},y=t._x0,d=t._y0,v=t._x1,p=t._y1;if(!c)return t._root=x,t;for(;c.length;)if((u=i>=(s=(y+v)/2))?y=s:v=s,(l=n>=(h=(d+p)/2))?d=h:p=h,r=c,!(c=c[_=l<<1|u]))return r[_]=x,t;if(o=+t._x.call(null,c.data),a=+t._y.call(null,c.data),i===o&&n===a)return x.next=c,r?r[_]=x:t._root=x,t;do{r=r?r[_]=new Array(4):t._root=new Array(4),(u=i>=(s=(y+v)/2))?y=s:v=s,(l=n>=(h=(d+p)/2))?d=h:p=h}while((_=l<<1|u)==(f=(a>=h)<<1|o>=s));return r[f]=c,r[_]=x,t}function n(t,i,n,e,r){this.node=t,this.x0=i,this.y0=n,this.x1=e,this.y1=r}function e(t){return t[0]}function r(t){return t[1]}function s(t,i,n){var s=new h(null==i?e:i,null==n?r:n,NaN,NaN,NaN,NaN);return null==t?s:s.addAll(t)}function h(t,i,n,e,r,s){this._x=t,this._y=i,this._x0=n,this._y0=e,this._x1=r,this._y1=s,this._root=void 0}function o(t){for(var i={data:t.data},n=i;t=t.next;)n=n.next={data:t.data};return i}var a=s.prototype=h.prototype;a.copy=function(){var t,i,n=new h(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root;if(!e)return n;if(!e.length)return n._root=o(e),n;for(t=[{source:e,target:n._root=new Array(4)}];e=t.pop();)for(var r=0;r<4;++r)(i=e.source[r])&&(i.length?t.push({source:i,target:e.target[r]=new Array(4)}):e.target[r]=o(i));return n},a.add=function(t){const n=+this._x.call(null,t),e=+this._y.call(null,t);return i(this.cover(n,e),n,e,t)},a.addAll=function(t){var n,e,r,s,h=t.length,o=new Array(h),a=new Array(h),u=1/0,l=1/0,_=-1/0,f=-1/0;for(e=0;e<h;++e)isNaN(r=+this._x.call(null,n=t[e]))||isNaN(s=+this._y.call(null,n))||(o[e]=r,a[e]=s,r<u&&(u=r),r>_&&(_=r),s<l&&(l=s),s>f&&(f=s));if(u>_||l>f)return this;for(this.cover(u,l).cover(_,f),e=0;e<h;++e)i(this,o[e],a[e],t[e]);return this},a.cover=function(t,i){if(isNaN(t=+t)||isNaN(i=+i))return this;var n=this._x0,e=this._y0,r=this._x1,s=this._y1;if(isNaN(n))r=(n=Math.floor(t))+1,s=(e=Math.floor(i))+1;else{for(var h,o,a=r-n||1,u=this._root;n>t||t>=r||e>i||i>=s;)switch(o=(i<e)<<1|t<n,(h=new Array(4))[o]=u,u=h,a*=2,o){case 0:r=n+a,s=e+a;break;case 1:n=r-a,s=e+a;break;case 2:r=n+a,e=s-a;break;case 3:n=r-a,e=s-a}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=e,this._x1=r,this._y1=s,this},a.data=function(){var t=[];return this.visit(function(i){if(!i.length)do{t.push(i.data)}while(i=i.next)}),t},a.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},a.find=function(t,i,e){var r,s,h,o,a,u,l,_=this._x0,f=this._y0,c=this._x1,x=this._y1,y=[],d=this._root;for(d&&y.push(new n(d,_,f,c,x)),null==e?e=1/0:(_=t-e,f=i-e,c=t+e,x=i+e,e*=e);u=y.pop();)if(!(!(d=u.node)||(s=u.x0)>c||(h=u.y0)>x||(o=u.x1)<_||(a=u.y1)<f))if(d.length){var v=(s+o)/2,p=(h+a)/2;y.push(new n(d[3],v,p,o,a),new n(d[2],s,p,v,a),new n(d[1],v,h,o,p),new n(d[0],s,h,v,p)),(l=(i>=p)<<1|t>=v)&&(u=y[y.length-1],y[y.length-1]=y[y.length-1-l],y[y.length-1-l]=u)}else{var w=t-+this._x.call(null,d.data),N=i-+this._y.call(null,d.data),g=w*w+N*N;if(g<e){var A=Math.sqrt(e=g);_=t-A,f=i-A,c=t+A,x=i+A,r=d.data}}return r},a.remove=function(t){if(isNaN(s=+this._x.call(null,t))||isNaN(h=+this._y.call(null,t)))return this;var i,n,e,r,s,h,o,a,u,l,_,f,c=this._root,x=this._x0,y=this._y0,d=this._x1,v=this._y1;if(!c)return this;if(c.length)for(;;){if((u=s>=(o=(x+d)/2))?x=o:d=o,(l=h>=(a=(y+v)/2))?y=a:v=a,i=c,!(c=c[_=l<<1|u]))return this;if(!c.length)break;(i[_+1&3]||i[_+2&3]||i[_+3&3])&&(n=i,f=_)}for(;c.data!==t;)if(e=c,!(c=c.next))return this;return(r=c.next)&&delete c.next,e?(r?e.next=r:delete e.next,this):i?(r?i[_]=r:delete i[_],(c=i[0]||i[1]||i[2]||i[3])&&c===(i[3]||i[2]||i[1]||i[0])&&!c.length&&(n?n[f]=c:this._root=c),this):(this._root=r,this)},a.removeAll=function(t){for(var i=0,n=t.length;i<n;++i)this.remove(t[i]);return this},a.root=function(){return this._root},a.size=function(){var t=0;return this.visit(function(i){if(!i.length)do{++t}while(i=i.next)}),t},a.visit=function(t){var i,e,r,s,h,o,a=[],u=this._root;for(u&&a.push(new n(u,this._x0,this._y0,this._x1,this._y1));i=a.pop();)if(!t(u=i.node,r=i.x0,s=i.y0,h=i.x1,o=i.y1)&&u.length){var l=(r+h)/2,_=(s+o)/2;(e=u[3])&&a.push(new n(e,l,_,h,o)),(e=u[2])&&a.push(new n(e,r,_,l,o)),(e=u[1])&&a.push(new n(e,l,s,h,_)),(e=u[0])&&a.push(new n(e,r,s,l,_))}return this},a.visitAfter=function(t){var i,e=[],r=[];for(this._root&&e.push(new n(this._root,this._x0,this._y0,this._x1,this._y1));i=e.pop();){var s=i.node;if(s.length){var h,o=i.x0,a=i.y0,u=i.x1,l=i.y1,_=(o+u)/2,f=(a+l)/2;(h=s[0])&&e.push(new n(h,o,a,_,f)),(h=s[1])&&e.push(new n(h,_,a,u,f)),(h=s[2])&&e.push(new n(h,o,f,_,l)),(h=s[3])&&e.push(new n(h,_,f,u,l))}r.push(i)}for(;i=r.pop();)t(i.node,i.x0,i.y0,i.x1,i.y1);return this},a.x=function(t){return arguments.length?(this._x=t,this):this._x},a.y=function(t){return arguments.length?(this._y=t,this):this._y},t.quadtree=s,Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/node_modules/d3-quadtree/package.json b/node_modules/d3-quadtree/package.json deleted file mode 100644 index fab062b58542a8b23d47e8c7059483e0ca634841..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/package.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "_from": "d3-quadtree@2", - "_id": "d3-quadtree@2.0.0", - "_inBundle": false, - "_integrity": "sha512-b0Ed2t1UUalJpc3qXzKi+cPGxeXRr4KU9YSlocN74aTzp6R/Ud43t79yLLqxHRWZfsvWXmbDWPpoENK1K539xw==", - "_location": "/d3-quadtree", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-quadtree@2", - "name": "d3-quadtree", - "escapedName": "d3-quadtree", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3", - "/d3-force" - ], - "_resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-2.0.0.tgz", - "_shasum": "edbad045cef88701f6fee3aee8e93fb332d30f9d", - "_spec": "d3-quadtree@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-quadtree/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Two-dimensional recursive spatial subdivision.", - "devDependencies": { - "d3-array": "1 - 2", - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-quadtree/", - "jsdelivr": "dist/d3-quadtree.min.js", - "keywords": [ - "d3", - "d3-module", - "quadtree" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-quadtree.js", - "module": "src/index.js", - "name": "d3-quadtree", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-quadtree.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src test" - }, - "sideEffects": false, - "unpkg": "dist/d3-quadtree.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-quadtree/src/add.js b/node_modules/d3-quadtree/src/add.js deleted file mode 100644 index 985adfcf662654efeb440905a57608911f98c825..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/src/add.js +++ /dev/null @@ -1,84 +0,0 @@ -export default function(d) { - const x = +this._x.call(null, d), - y = +this._y.call(null, d); - return add(this.cover(x, y), x, y, d); -} - -function add(tree, x, y, d) { - if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points - - var parent, - node = tree._root, - leaf = {data: d}, - x0 = tree._x0, - y0 = tree._y0, - x1 = tree._x1, - y1 = tree._y1, - xm, - ym, - xp, - yp, - right, - bottom, - i, - j; - - // If the tree is empty, initialize the root as a leaf. - if (!node) return tree._root = leaf, tree; - - // Find the existing leaf for the new point, or add it. - while (node.length) { - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree; - } - - // Is the new point is exactly coincident with the existing point? - xp = +tree._x.call(null, node.data); - yp = +tree._y.call(null, node.data); - if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree; - - // Otherwise, split the leaf node until the old and new point are separated. - do { - parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4); - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm))); - return parent[j] = node, parent[i] = leaf, tree; -} - -export function addAll(data) { - var d, i, n = data.length, - x, - y, - xz = new Array(n), - yz = new Array(n), - x0 = Infinity, - y0 = Infinity, - x1 = -Infinity, - y1 = -Infinity; - - // Compute the points and their extent. - for (i = 0; i < n; ++i) { - if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue; - xz[i] = x; - yz[i] = y; - if (x < x0) x0 = x; - if (x > x1) x1 = x; - if (y < y0) y0 = y; - if (y > y1) y1 = y; - } - - // If there were no (valid) points, abort. - if (x0 > x1 || y0 > y1) return this; - - // Expand the tree to cover the new points. - this.cover(x0, y0).cover(x1, y1); - - // Add the new points. - for (i = 0; i < n; ++i) { - add(this, xz[i], yz[i], data[i]); - } - - return this; -} diff --git a/node_modules/d3-quadtree/src/cover.js b/node_modules/d3-quadtree/src/cover.js deleted file mode 100644 index e1d47cd67dcc3ed33f0d77901bac77bf29d85f25..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/src/cover.js +++ /dev/null @@ -1,43 +0,0 @@ -export default function(x, y) { - if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points - - var x0 = this._x0, - y0 = this._y0, - x1 = this._x1, - y1 = this._y1; - - // If the quadtree has no extent, initialize them. - // Integer extent are necessary so that if we later double the extent, - // the existing quadrant boundaries don’t change due to floating point error! - if (isNaN(x0)) { - x1 = (x0 = Math.floor(x)) + 1; - y1 = (y0 = Math.floor(y)) + 1; - } - - // Otherwise, double repeatedly to cover. - else { - var z = x1 - x0 || 1, - node = this._root, - parent, - i; - - while (x0 > x || x >= x1 || y0 > y || y >= y1) { - i = (y < y0) << 1 | (x < x0); - parent = new Array(4), parent[i] = node, node = parent, z *= 2; - switch (i) { - case 0: x1 = x0 + z, y1 = y0 + z; break; - case 1: x0 = x1 - z, y1 = y0 + z; break; - case 2: x1 = x0 + z, y0 = y1 - z; break; - case 3: x0 = x1 - z, y0 = y1 - z; break; - } - } - - if (this._root && this._root.length) this._root = node; - } - - this._x0 = x0; - this._y0 = y0; - this._x1 = x1; - this._y1 = y1; - return this; -} diff --git a/node_modules/d3-quadtree/src/data.js b/node_modules/d3-quadtree/src/data.js deleted file mode 100644 index e934fa9d84f3ba2b8059e52a8c6667265afa9278..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/src/data.js +++ /dev/null @@ -1,7 +0,0 @@ -export default function() { - var data = []; - this.visit(function(node) { - if (!node.length) do data.push(node.data); while (node = node.next) - }); - return data; -} diff --git a/node_modules/d3-quadtree/src/extent.js b/node_modules/d3-quadtree/src/extent.js deleted file mode 100644 index 9e65a90aa42740c94e911893289d589162a3ceb8..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/src/extent.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(_) { - return arguments.length - ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) - : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]]; -} diff --git a/node_modules/d3-quadtree/src/find.js b/node_modules/d3-quadtree/src/find.js deleted file mode 100644 index e9db6c414e887c58d051d2ec55f0f3cf6f94dae0..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/src/find.js +++ /dev/null @@ -1,70 +0,0 @@ -import Quad from "./quad.js"; - -export default function(x, y, radius) { - var data, - x0 = this._x0, - y0 = this._y0, - x1, - y1, - x2, - y2, - x3 = this._x1, - y3 = this._y1, - quads = [], - node = this._root, - q, - i; - - if (node) quads.push(new Quad(node, x0, y0, x3, y3)); - if (radius == null) radius = Infinity; - else { - x0 = x - radius, y0 = y - radius; - x3 = x + radius, y3 = y + radius; - radius *= radius; - } - - while (q = quads.pop()) { - - // Stop searching if this quadrant can’t contain a closer node. - if (!(node = q.node) - || (x1 = q.x0) > x3 - || (y1 = q.y0) > y3 - || (x2 = q.x1) < x0 - || (y2 = q.y1) < y0) continue; - - // Bisect the current quadrant. - if (node.length) { - var xm = (x1 + x2) / 2, - ym = (y1 + y2) / 2; - - quads.push( - new Quad(node[3], xm, ym, x2, y2), - new Quad(node[2], x1, ym, xm, y2), - new Quad(node[1], xm, y1, x2, ym), - new Quad(node[0], x1, y1, xm, ym) - ); - - // Visit the closest quadrant first. - if (i = (y >= ym) << 1 | (x >= xm)) { - q = quads[quads.length - 1]; - quads[quads.length - 1] = quads[quads.length - 1 - i]; - quads[quads.length - 1 - i] = q; - } - } - - // Visit this point. (Visiting coincident points isn’t necessary!) - else { - var dx = x - +this._x.call(null, node.data), - dy = y - +this._y.call(null, node.data), - d2 = dx * dx + dy * dy; - if (d2 < radius) { - var d = Math.sqrt(radius = d2); - x0 = x - d, y0 = y - d; - x3 = x + d, y3 = y + d; - data = node.data; - } - } - } - - return data; -} diff --git a/node_modules/d3-quadtree/src/index.js b/node_modules/d3-quadtree/src/index.js deleted file mode 100644 index e2b2c313d06395bbf3fb04187afb0e932c1daf5d..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/src/index.js +++ /dev/null @@ -1 +0,0 @@ -export {default as quadtree} from "./quadtree.js"; diff --git a/node_modules/d3-quadtree/src/quad.js b/node_modules/d3-quadtree/src/quad.js deleted file mode 100644 index 6f714dbb3527e8ea193681380929f0abb4eec2a5..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/src/quad.js +++ /dev/null @@ -1,7 +0,0 @@ -export default function(node, x0, y0, x1, y1) { - this.node = node; - this.x0 = x0; - this.y0 = y0; - this.x1 = x1; - this.y1 = y1; -} diff --git a/node_modules/d3-quadtree/src/quadtree.js b/node_modules/d3-quadtree/src/quadtree.js deleted file mode 100644 index 5d585938c71cb2cd4082610fb60faafb79828229..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/src/quadtree.js +++ /dev/null @@ -1,73 +0,0 @@ -import tree_add, {addAll as tree_addAll} from "./add.js"; -import tree_cover from "./cover.js"; -import tree_data from "./data.js"; -import tree_extent from "./extent.js"; -import tree_find from "./find.js"; -import tree_remove, {removeAll as tree_removeAll} from "./remove.js"; -import tree_root from "./root.js"; -import tree_size from "./size.js"; -import tree_visit from "./visit.js"; -import tree_visitAfter from "./visitAfter.js"; -import tree_x, {defaultX} from "./x.js"; -import tree_y, {defaultY} from "./y.js"; - -export default function quadtree(nodes, x, y) { - var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN); - return nodes == null ? tree : tree.addAll(nodes); -} - -function Quadtree(x, y, x0, y0, x1, y1) { - this._x = x; - this._y = y; - this._x0 = x0; - this._y0 = y0; - this._x1 = x1; - this._y1 = y1; - this._root = undefined; -} - -function leaf_copy(leaf) { - var copy = {data: leaf.data}, next = copy; - while (leaf = leaf.next) next = next.next = {data: leaf.data}; - return copy; -} - -var treeProto = quadtree.prototype = Quadtree.prototype; - -treeProto.copy = function() { - var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), - node = this._root, - nodes, - child; - - if (!node) return copy; - - if (!node.length) return copy._root = leaf_copy(node), copy; - - nodes = [{source: node, target: copy._root = new Array(4)}]; - while (node = nodes.pop()) { - for (var i = 0; i < 4; ++i) { - if (child = node.source[i]) { - if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)}); - else node.target[i] = leaf_copy(child); - } - } - } - - return copy; -}; - -treeProto.add = tree_add; -treeProto.addAll = tree_addAll; -treeProto.cover = tree_cover; -treeProto.data = tree_data; -treeProto.extent = tree_extent; -treeProto.find = tree_find; -treeProto.remove = tree_remove; -treeProto.removeAll = tree_removeAll; -treeProto.root = tree_root; -treeProto.size = tree_size; -treeProto.visit = tree_visit; -treeProto.visitAfter = tree_visitAfter; -treeProto.x = tree_x; -treeProto.y = tree_y; diff --git a/node_modules/d3-quadtree/src/remove.js b/node_modules/d3-quadtree/src/remove.js deleted file mode 100644 index 0ba27abe77d6b1b07970072f849bb9f641084ba4..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/src/remove.js +++ /dev/null @@ -1,62 +0,0 @@ -export default function(d) { - if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points - - var parent, - node = this._root, - retainer, - previous, - next, - x0 = this._x0, - y0 = this._y0, - x1 = this._x1, - y1 = this._y1, - x, - y, - xm, - ym, - right, - bottom, - i, - j; - - // If the tree is empty, initialize the root as a leaf. - if (!node) return this; - - // Find the leaf node for the point. - // While descending, also retain the deepest parent with a non-removed sibling. - if (node.length) while (true) { - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - if (!(parent = node, node = node[i = bottom << 1 | right])) return this; - if (!node.length) break; - if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i; - } - - // Find the point to remove. - while (node.data !== d) if (!(previous = node, node = node.next)) return this; - if (next = node.next) delete node.next; - - // If there are multiple coincident points, remove just the point. - if (previous) return (next ? previous.next = next : delete previous.next), this; - - // If this is the root point, remove it. - if (!parent) return this._root = next, this; - - // Remove this leaf. - next ? parent[i] = next : delete parent[i]; - - // If the parent now contains exactly one leaf, collapse superfluous parents. - if ((node = parent[0] || parent[1] || parent[2] || parent[3]) - && node === (parent[3] || parent[2] || parent[1] || parent[0]) - && !node.length) { - if (retainer) retainer[j] = node; - else this._root = node; - } - - return this; -} - -export function removeAll(data) { - for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]); - return this; -} diff --git a/node_modules/d3-quadtree/src/root.js b/node_modules/d3-quadtree/src/root.js deleted file mode 100644 index c32889f7fca3c5345152547b39860ca96701792a..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/src/root.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function() { - return this._root; -} diff --git a/node_modules/d3-quadtree/src/size.js b/node_modules/d3-quadtree/src/size.js deleted file mode 100644 index d2d5ab6147acf7e622d221bbb588ebce19e6dcca..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/src/size.js +++ /dev/null @@ -1,7 +0,0 @@ -export default function() { - var size = 0; - this.visit(function(node) { - if (!node.length) do ++size; while (node = node.next) - }); - return size; -} diff --git a/node_modules/d3-quadtree/src/visit.js b/node_modules/d3-quadtree/src/visit.js deleted file mode 100644 index 941ab884afe7255ce4a837be8747b6f5f56b95ba..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/src/visit.js +++ /dev/null @@ -1,16 +0,0 @@ -import Quad from "./quad.js"; - -export default function(callback) { - var quads = [], q, node = this._root, child, x0, y0, x1, y1; - if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1)); - while (q = quads.pop()) { - if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) { - var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; - if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1)); - if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); - if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); - if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); - } - } - return this; -} diff --git a/node_modules/d3-quadtree/src/visitAfter.js b/node_modules/d3-quadtree/src/visitAfter.js deleted file mode 100644 index 20966553737be5bc770c87f7b6b4d754ccbc65df..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/src/visitAfter.js +++ /dev/null @@ -1,21 +0,0 @@ -import Quad from "./quad.js"; - -export default function(callback) { - var quads = [], next = [], q; - if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1)); - while (q = quads.pop()) { - var node = q.node; - if (node.length) { - var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; - if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); - if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); - if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); - if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1)); - } - next.push(q); - } - while (q = next.pop()) { - callback(q.node, q.x0, q.y0, q.x1, q.y1); - } - return this; -} diff --git a/node_modules/d3-quadtree/src/x.js b/node_modules/d3-quadtree/src/x.js deleted file mode 100644 index ffea5075fbcdf12f11df8bdf0ea61ee4883be2fb..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/src/x.js +++ /dev/null @@ -1,7 +0,0 @@ -export function defaultX(d) { - return d[0]; -} - -export default function(_) { - return arguments.length ? (this._x = _, this) : this._x; -} diff --git a/node_modules/d3-quadtree/src/y.js b/node_modules/d3-quadtree/src/y.js deleted file mode 100644 index d2d29cb79786b3c94e60a43024e35269bd1dad0f..0000000000000000000000000000000000000000 --- a/node_modules/d3-quadtree/src/y.js +++ /dev/null @@ -1,7 +0,0 @@ -export function defaultY(d) { - return d[1]; -} - -export default function(_) { - return arguments.length ? (this._y = _, this) : this._y; -} diff --git a/node_modules/d3-random/LICENSE b/node_modules/d3-random/LICENSE deleted file mode 100644 index 721bd22ece6587a9408eda1b6a3949c425b5624a..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-random/README.md b/node_modules/d3-random/README.md deleted file mode 100644 index 87c163fba76acd01898640ac779bf0da017f60d9..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/README.md +++ /dev/null @@ -1,120 +0,0 @@ -# d3-random - -Generate random numbers from various distributions. - -See the [d3-random collection on Observable](https://observablehq.com/collection/@d3/d3-random) for examples. - -## Installing - -If you use NPM, `npm install d3-random`. Otherwise, download the [latest release](https://github.com/d3/d3-random/releases/latest). You can also load directly as a [standalone library](https://d3js.org/d3-random.v2.min.js) or as part of [D3](https://github.com/d3/d3). ES modules, AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-random.v2.min.js"></script> -<script> - -var random = d3.randomUniform(1, 10); - -</script> -``` - -## API Reference - -<a name="randomUniform" href="#randomUniform">#</a> d3.<b>randomUniform</b>([<i>min</i>, ][<i>max</i>]) · [Source](https://github.com/d3/d3-random/blob/master/src/uniform.js), [Examples](https://observablehq.com/@d3/d3-random#uniform) - -Returns a function for generating random numbers with a [uniform distribution](https://en.wikipedia.org/wiki/Uniform_distribution_\(continuous\)). The minimum allowed value of a returned number is *min* (inclusive), and the maximum is *max* (exclusive). If *min* is not specified, it defaults to 0; if *max* is not specified, it defaults to 1. For example: - -```js -d3.randomUniform(6)(); // Returns a number greater than or equal to 0 and less than 6. -d3.randomUniform(1, 5)(); // Returns a number greater than or equal to 1 and less than 5. -``` - -<a name="randomInt" href="#randomInt">#</a> d3.<b>randomInt</b>([<i>min</i>, ][<i>max</i>]) · [Source](https://github.com/d3/d3-random/blob/master/src/int.js), [Examples](https://observablehq.com/@d3/d3-random#int) - -Returns a function for generating random integers with a [uniform distribution](https://en.wikipedia.org/wiki/Uniform_distribution_\(continuous\)). The minimum allowed value of a returned number is ⌊*min*⌋ (inclusive), and the maximum is ⌊*max* - 1⌋ (inclusive). If *min* is not specified, it defaults to 0. For example: - -```js -d3.randomInt(6)(); // Returns an integer greater than or equal to 0 and less than 6. -d3.randomInt(1, 5)(); // Returns an integer greater than or equal to 1 and less than 5. -``` - -<a name="randomNormal" href="#randomNormal">#</a> d3.<b>randomNormal</b>([<i>mu</i>][, <i>sigma</i>]) · [Source](https://github.com/d3/d3-random/blob/master/src/normal.js), [Examples](https://observablehq.com/@d3/d3-random#normal) - -Returns a function for generating random numbers with a [normal (Gaussian) distribution](https://en.wikipedia.org/wiki/Normal_distribution). The expected value of the generated numbers is *mu*, with the given standard deviation *sigma*. If *mu* is not specified, it defaults to 0; if *sigma* is not specified, it defaults to 1. - -<a name="randomLogNormal" href="#randomLogNormal">#</a> d3.<b>randomLogNormal</b>([<i>mu</i>][, <i>sigma</i>]) · [Source](https://github.com/d3/d3-random/blob/master/src/logNormal.js), [Examples](https://observablehq.com/@d3/d3-random#logNormal) - -Returns a function for generating random numbers with a [log-normal distribution](https://en.wikipedia.org/wiki/Log-normal_distribution). The expected value of the random variable’s natural logarithm is *mu*, with the given standard deviation *sigma*. If *mu* is not specified, it defaults to 0; if *sigma* is not specified, it defaults to 1. - -<a name="randomBates" href="#randomBates">#</a> d3.<b>randomBates</b>(<i>n</i>) · [Source](https://github.com/d3/d3-random/blob/master/src/bates.js), [Examples](https://observablehq.com/@d3/d3-random#bates) - -Returns a function for generating random numbers with a [Bates distribution](https://en.wikipedia.org/wiki/Bates_distribution) with *n* independent variables. The case of fractional *n* is handled as with d3.randomIrwinHall, and d3.randomBates(0) is equivalent to d3.randomUniform(). - -<a name="randomIrwinHall" href="#randomIrwinHall">#</a> d3.<b>randomIrwinHall</b>(<i>n</i>) · [Source](https://github.com/d3/d3-random/blob/master/src/irwinHall.js), [Examples](https://observablehq.com/@d3/d3-random#irwinHall) - -Returns a function for generating random numbers with an [Irwin–Hall distribution](https://en.wikipedia.org/wiki/Irwin–Hall_distribution) with *n* independent variables. If the fractional part of *n* is non-zero, this is treated as adding d3.randomUniform() times that fractional part to the integral part. - -<a name="randomExponential" href="#randomExponential">#</a> d3.<b>randomExponential</b>(<i>lambda</i>) · [Source](https://github.com/d3/d3-random/blob/master/src/exponential.js), [Examples](https://observablehq.com/@d3/d3-random#exponential) - -Returns a function for generating random numbers with an [exponential distribution](https://en.wikipedia.org/wiki/Exponential_distribution) with the rate *lambda*; equivalent to time between events in a [Poisson process](https://en.wikipedia.org/wiki/Poisson_point_process) with a mean of 1 / *lambda*. For example, exponential(1/40) generates random times between events where, on average, one event occurs every 40 units of time. - -<a name="randomPareto" href="#randomPareto">#</a> d3.<b>randomPareto</b>(<i>alpha</i>) · [Source](https://github.com/d3/d3-random/blob/master/src/pareto.js), [Examples](https://observablehq.com/@d3/d3-random#pareto) - -Returns a function for generating random numbers with a [Pareto distribution](https://en.wikipedia.org/wiki/Pareto_distribution) with the shape *alpha*. The value *alpha* must be a positive value. - -<a name="randomBernoulli" href="#randomBernoulli">#</a> d3.<b>randomBernoulli</b>(<i>p</i>) · [Source](https://github.com/d3/d3-random/blob/master/src/bernoulli.js), [Examples](https://observablehq.com/@d3/d3-random#bernoulli) - -Returns a function for generating either 1 or 0 according to a [Bernoulli distribution](https://en.wikipedia.org/wiki/Binomial_distribution) with 1 being returned with success probability *p* and 0 with failure probability *q* = 1 - *p*. The value *p* is in the range [0, 1]. - -<a name="randomGeometric" href="#randomGeometric">#</a> d3.<b>randomGeometric</b>(<i>p</i>) · [Source](https://github.com/d3/d3-random/blob/master/src/geometric.js), [Examples](https://observablehq.com/@d3/d3-random#geometric) - -Returns a function for generating numbers with a [geometric distribution](https://en.wikipedia.org/wiki/Geometric_distribution) with success probability *p*. The value *p* is in the range [0, 1]. - -<a name="randomBinomial" href="#randomBinomial">#</a> d3.<b>randomBinomial</b>(<i>n</i>, <i>p</i>) · [Source](https://github.com/d3/d3-random/blob/master/src/binomial.js), [Examples](https://observablehq.com/@d3/d3-random#binomial) - -Returns a function for generating random numbers with a [binomial distribution](https://en.wikipedia.org/wiki/Binomial_distribution) with *n* the number of trials and *p* the probability of success in each trial. The value *n* is greater or equal to 0, and the value *p* is in the range [0, 1]. - -<a name="randomGamma" href="#randomGamma">#</a> d3.<b>randomGamma</b>(<i>k</i>, [<i>theta</i>]) · [Source](https://github.com/d3/d3-random/blob/master/src/gamma.js), [Examples](https://observablehq.com/@parcly-taxel/the-gamma-and-beta-distributions) - -Returns a function for generating random numbers with a [gamma distribution](https://en.wikipedia.org/wiki/Gamma_distribution) with *k* the shape parameter and *theta* the scale parameter. The value *k* must be a positive value; if *theta* is not specified, it defaults to 1. - -<a name="randomBeta" href="#randomBeta">#</a> d3.<b>randomBeta</b>(<i>alpha</i>, <i>beta</i>) · [Source](https://github.com/d3/d3-random/blob/master/src/beta.js), [Examples](https://observablehq.com/@parcly-taxel/the-gamma-and-beta-distributions) - -Returns a function for generating random numbers with a [beta distribution](https://en.wikipedia.org/wiki/Beta_distribution) with *alpha* and *beta* shape parameters, which must both be positive. - -<a name="randomWeibull" href="#randomWeibull">#</a> d3.<b>randomWeibull</b>(<i>k</i>, [<i>a</i>], [<i>b</i>]) · [Source](https://github.com/d3/d3-random/blob/master/src/weibull.js), [Examples](https://observablehq.com/@parcly-taxel/frechet-gumbel-weibull) - -Returns a function for generating random numbers with one of the [generalized extreme value distributions](https://en.wikipedia.org/wiki/Generalized_extreme_value_distribution), depending on *k*: - -* If *k* is positive, the [Weibull distribution](https://en.wikipedia.org/wiki/Weibull_distribution) with shape parameter *k* -* If *k* is zero, the [Gumbel distribution](https://en.wikipedia.org/wiki/Gumbel_distribution) -* If *k* is negative, the [Fréchet distribution](https://en.wikipedia.org/wiki/Fréchet_distribution) with shape parameter −*k* - -In all three cases, *a* is the location parameter and *b* is the scale parameter. If *a* is not specified, it defaults to 0; if *b* is not specified, it defaults to 1. - -<a name="randomCauchy" href="#randomCauchy">#</a> d3.<b>randomCauchy</b>([<i>a</i>], [<i>b</i>]) · [Source](https://github.com/d3/d3-random/blob/master/src/cauchy.js), [Examples](https://observablehq.com/@parcly-taxel/cauchy-and-logistic-distributions) - -Returns a function for generating random numbers with a [Cauchy distribution](https://en.wikipedia.org/wiki/Cauchy_distribution). *a* and *b* have the same meanings and default values as in d3.randomWeibull. - -<a name="randomLogistic" href="#randomLogistic">#</a> d3.<b>randomLogistic</b>([<i>a</i>], [<i>b</i>]) · [Source](https://github.com/d3/d3-random/blob/master/src/logistic.js), [Examples](https://observablehq.com/@parcly-taxel/cauchy-and-logistic-distributions) - -Returns a function for generating random numbers with a [logistic distribution](https://en.wikipedia.org/wiki/Logistic_distribution). *a* and *b* have the same meanings and default values as in d3.randomWeibull. - -<a name="randomPoisson" href="#randomPoisson">#</a> d3.<b>randomPoisson</b>(<i>lambda</i>) · [Source](https://github.com/d3/d3-random/blob/master/src/poisson.js), [Examples](https://observablehq.com/@parcly-taxel/the-poisson-distribution) - -Returns a function for generating random numbers with a [Poisson distribution](https://en.wikipedia.org/wiki/Poisson_distribution) with mean *lambda*. - -<a name="random_source" href="#random_source">#</a> <i>random</i>.<b>source</b>(<i>source</i>) · [Examples](https://observablehq.com/@d3/random-source) - -Returns the same type of function for generating random numbers but where the given random number generator *source* is used as the source of randomness instead of Math.random. The given random number generator must implement the same interface as Math.random and only return values in the range [0, 1). This is useful when a seeded random number generator is preferable to Math.random. For example: - -```js -const d3 = require("d3-random"); -const seed = 0.44871573888282423; // any number in [0, 1) -const random = d3.randomNormal.source(d3.randomLcg(seed))(0, 1); - -random(); // -0.6253955998897069 -``` - -<a name="randomLcg" href="#randomLcg">#</a> d3.<b>randomLcg</b>([<i>seed</i>]) · [Source](https://github.com/d3/d3-random/blob/master/src/lcg.js), [Examples](https://observablehq.com/@d3/d3-randomlcg) - -Returns a [linear congruential generator](https://en.wikipedia.org/wiki/Linear_congruential_generator); this function can be called repeatedly to obtain pseudorandom values well-distributed on the interval [0,1) and with a long period (up to 1 billion numbers), similar to Math.random. A *seed* can be specified as a real number in the interval [0,1) or as any integer. In the latter case, only the lower 32 bits are considered. Two generators instanced with the same seed generate the same sequence, allowing to create reproducible pseudo-random experiments. If the *seed* is not specified, one is chosen using Math.random. diff --git a/node_modules/d3-random/dist/d3-random.js b/node_modules/d3-random/dist/d3-random.js deleted file mode 100644 index a586cf8f631a8fef6fbd66dfb5b96d0952d38296..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/dist/d3-random.js +++ /dev/null @@ -1,358 +0,0 @@ -// https://d3js.org/d3-random/ v2.2.2 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.d3 = global.d3 || {})); -}(this, (function (exports) { 'use strict'; - -var defaultSource = Math.random; - -var uniform = (function sourceRandomUniform(source) { - function randomUniform(min, max) { - min = min == null ? 0 : +min; - max = max == null ? 1 : +max; - if (arguments.length === 1) max = min, min = 0; - else max -= min; - return function() { - return source() * max + min; - }; - } - - randomUniform.source = sourceRandomUniform; - - return randomUniform; -})(defaultSource); - -var int = (function sourceRandomInt(source) { - function randomInt(min, max) { - if (arguments.length < 2) max = min, min = 0; - min = Math.floor(min); - max = Math.floor(max) - min; - return function() { - return Math.floor(source() * max + min); - }; - } - - randomInt.source = sourceRandomInt; - - return randomInt; -})(defaultSource); - -var normal = (function sourceRandomNormal(source) { - function randomNormal(mu, sigma) { - var x, r; - mu = mu == null ? 0 : +mu; - sigma = sigma == null ? 1 : +sigma; - return function() { - var y; - - // If available, use the second previously-generated uniform random. - if (x != null) y = x, x = null; - - // Otherwise, generate a new x and y. - else do { - x = source() * 2 - 1; - y = source() * 2 - 1; - r = x * x + y * y; - } while (!r || r > 1); - - return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r); - }; - } - - randomNormal.source = sourceRandomNormal; - - return randomNormal; -})(defaultSource); - -var logNormal = (function sourceRandomLogNormal(source) { - var N = normal.source(source); - - function randomLogNormal() { - var randomNormal = N.apply(this, arguments); - return function() { - return Math.exp(randomNormal()); - }; - } - - randomLogNormal.source = sourceRandomLogNormal; - - return randomLogNormal; -})(defaultSource); - -var irwinHall = (function sourceRandomIrwinHall(source) { - function randomIrwinHall(n) { - if ((n = +n) <= 0) return () => 0; - return function() { - for (var sum = 0, i = n; i > 1; --i) sum += source(); - return sum + i * source(); - }; - } - - randomIrwinHall.source = sourceRandomIrwinHall; - - return randomIrwinHall; -})(defaultSource); - -var bates = (function sourceRandomBates(source) { - var I = irwinHall.source(source); - - function randomBates(n) { - // use limiting distribution at n === 0 - if ((n = +n) === 0) return source; - var randomIrwinHall = I(n); - return function() { - return randomIrwinHall() / n; - }; - } - - randomBates.source = sourceRandomBates; - - return randomBates; -})(defaultSource); - -var exponential = (function sourceRandomExponential(source) { - function randomExponential(lambda) { - return function() { - return -Math.log1p(-source()) / lambda; - }; - } - - randomExponential.source = sourceRandomExponential; - - return randomExponential; -})(defaultSource); - -var pareto = (function sourceRandomPareto(source) { - function randomPareto(alpha) { - if ((alpha = +alpha) < 0) throw new RangeError("invalid alpha"); - alpha = 1 / -alpha; - return function() { - return Math.pow(1 - source(), alpha); - }; - } - - randomPareto.source = sourceRandomPareto; - - return randomPareto; -})(defaultSource); - -var bernoulli = (function sourceRandomBernoulli(source) { - function randomBernoulli(p) { - if ((p = +p) < 0 || p > 1) throw new RangeError("invalid p"); - return function() { - return Math.floor(source() + p); - }; - } - - randomBernoulli.source = sourceRandomBernoulli; - - return randomBernoulli; -})(defaultSource); - -var geometric = (function sourceRandomGeometric(source) { - function randomGeometric(p) { - if ((p = +p) < 0 || p > 1) throw new RangeError("invalid p"); - if (p === 0) return () => Infinity; - if (p === 1) return () => 1; - p = Math.log1p(-p); - return function() { - return 1 + Math.floor(Math.log1p(-source()) / p); - }; - } - - randomGeometric.source = sourceRandomGeometric; - - return randomGeometric; -})(defaultSource); - -var gamma = (function sourceRandomGamma(source) { - var randomNormal = normal.source(source)(); - - function randomGamma(k, theta) { - if ((k = +k) < 0) throw new RangeError("invalid k"); - // degenerate distribution if k === 0 - if (k === 0) return () => 0; - theta = theta == null ? 1 : +theta; - // exponential distribution if k === 1 - if (k === 1) return () => -Math.log1p(-source()) * theta; - - var d = (k < 1 ? k + 1 : k) - 1 / 3, - c = 1 / (3 * Math.sqrt(d)), - multiplier = k < 1 ? () => Math.pow(source(), 1 / k) : () => 1; - return function() { - do { - do { - var x = randomNormal(), - v = 1 + c * x; - } while (v <= 0); - v *= v * v; - var u = 1 - source(); - } while (u >= 1 - 0.0331 * x * x * x * x && Math.log(u) >= 0.5 * x * x + d * (1 - v + Math.log(v))); - return d * v * multiplier() * theta; - }; - } - - randomGamma.source = sourceRandomGamma; - - return randomGamma; -})(defaultSource); - -var beta = (function sourceRandomBeta(source) { - var G = gamma.source(source); - - function randomBeta(alpha, beta) { - var X = G(alpha), - Y = G(beta); - return function() { - var x = X(); - return x === 0 ? 0 : x / (x + Y()); - }; - } - - randomBeta.source = sourceRandomBeta; - - return randomBeta; -})(defaultSource); - -var binomial = (function sourceRandomBinomial(source) { - var G = geometric.source(source), - B = beta.source(source); - - function randomBinomial(n, p) { - n = +n; - if ((p = +p) >= 1) return () => n; - if (p <= 0) return () => 0; - return function() { - var acc = 0, nn = n, pp = p; - while (nn * pp > 16 && nn * (1 - pp) > 16) { - var i = Math.floor((nn + 1) * pp), - y = B(i, nn - i + 1)(); - if (y <= pp) { - acc += i; - nn -= i; - pp = (pp - y) / (1 - y); - } else { - nn = i - 1; - pp /= y; - } - } - var sign = pp < 0.5, - pFinal = sign ? pp : 1 - pp, - g = G(pFinal); - for (var s = g(), k = 0; s <= nn; ++k) s += g(); - return acc + (sign ? k : nn - k); - }; - } - - randomBinomial.source = sourceRandomBinomial; - - return randomBinomial; -})(defaultSource); - -var weibull = (function sourceRandomWeibull(source) { - function randomWeibull(k, a, b) { - var outerFunc; - if ((k = +k) === 0) { - outerFunc = x => -Math.log(x); - } else { - k = 1 / k; - outerFunc = x => Math.pow(x, k); - } - a = a == null ? 0 : +a; - b = b == null ? 1 : +b; - return function() { - return a + b * outerFunc(-Math.log1p(-source())); - }; - } - - randomWeibull.source = sourceRandomWeibull; - - return randomWeibull; -})(defaultSource); - -var cauchy = (function sourceRandomCauchy(source) { - function randomCauchy(a, b) { - a = a == null ? 0 : +a; - b = b == null ? 1 : +b; - return function() { - return a + b * Math.tan(Math.PI * source()); - }; - } - - randomCauchy.source = sourceRandomCauchy; - - return randomCauchy; -})(defaultSource); - -var logistic = (function sourceRandomLogistic(source) { - function randomLogistic(a, b) { - a = a == null ? 0 : +a; - b = b == null ? 1 : +b; - return function() { - var u = source(); - return a + b * Math.log(u / (1 - u)); - }; - } - - randomLogistic.source = sourceRandomLogistic; - - return randomLogistic; -})(defaultSource); - -var poisson = (function sourceRandomPoisson(source) { - var G = gamma.source(source), - B = binomial.source(source); - - function randomPoisson(lambda) { - return function() { - var acc = 0, l = lambda; - while (l > 16) { - var n = Math.floor(0.875 * l), - t = G(n)(); - if (t > l) return acc + B(n - 1, l / t)(); - acc += n; - l -= t; - } - for (var s = -Math.log1p(-source()), k = 0; s <= l; ++k) s -= Math.log1p(-source()); - return acc + k; - }; - } - - randomPoisson.source = sourceRandomPoisson; - - return randomPoisson; -})(defaultSource); - -// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use -const mul = 0x19660D; -const inc = 0x3C6EF35F; -const eps = 1 / 0x100000000; - -function lcg(seed = Math.random()) { - let state = (0 <= seed && seed < 1 ? seed / eps : Math.abs(seed)) | 0; - return () => (state = mul * state + inc | 0, eps * (state >>> 0)); -} - -exports.randomBates = bates; -exports.randomBernoulli = bernoulli; -exports.randomBeta = beta; -exports.randomBinomial = binomial; -exports.randomCauchy = cauchy; -exports.randomExponential = exponential; -exports.randomGamma = gamma; -exports.randomGeometric = geometric; -exports.randomInt = int; -exports.randomIrwinHall = irwinHall; -exports.randomLcg = lcg; -exports.randomLogNormal = logNormal; -exports.randomLogistic = logistic; -exports.randomNormal = normal; -exports.randomPareto = pareto; -exports.randomPoisson = poisson; -exports.randomUniform = uniform; -exports.randomWeibull = weibull; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/node_modules/d3-random/dist/d3-random.min.js b/node_modules/d3-random/dist/d3-random.min.js deleted file mode 100644 index 920a9f91d526032d6cdf2b67c7c1a5428d8a40f0..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/dist/d3-random.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-random/ v2.2.2 Copyright 2020 Mike Bostock -!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((n="undefined"!=typeof globalThis?globalThis:n||self).d3=n.d3||{})}(this,(function(n){"use strict";var r=Math.random,t=function n(r){function t(n,t){return n=null==n?0:+n,t=null==t?1:+t,1===arguments.length?(t=n,n=0):t-=n,function(){return r()*t+n}}return t.source=n,t}(r),o=function n(r){function t(n,t){return arguments.length<2&&(t=n,n=0),n=Math.floor(n),t=Math.floor(t)-n,function(){return Math.floor(r()*t+n)}}return t.source=n,t}(r),u=function n(r){function t(n,t){var o,u;return n=null==n?0:+n,t=null==t?1:+t,function(){var e;if(null!=o)e=o,o=null;else do{o=2*r()-1,e=2*r()-1,u=o*o+e*e}while(!u||u>1);return n+t*e*Math.sqrt(-2*Math.log(u)/u)}}return t.source=n,t}(r),e=function n(r){var t=u.source(r);function o(){var n=t.apply(this,arguments);return function(){return Math.exp(n())}}return o.source=n,o}(r),a=function n(r){function t(n){return(n=+n)<=0?()=>0:function(){for(var t=0,o=n;o>1;--o)t+=r();return t+o*r()}}return t.source=n,t}(r),i=function n(r){var t=a.source(r);function o(n){if(0==(n=+n))return r;var o=t(n);return function(){return o()/n}}return o.source=n,o}(r),c=function n(r){function t(n){return function(){return-Math.log1p(-r())/n}}return t.source=n,t}(r),f=function n(r){function t(n){if((n=+n)<0)throw new RangeError("invalid alpha");return n=1/-n,function(){return Math.pow(1-r(),n)}}return t.source=n,t}(r),l=function n(r){function t(n){if((n=+n)<0||n>1)throw new RangeError("invalid p");return function(){return Math.floor(r()+n)}}return t.source=n,t}(r),h=function n(r){function t(n){if((n=+n)<0||n>1)throw new RangeError("invalid p");return 0===n?()=>1/0:1===n?()=>1:(n=Math.log1p(-n),function(){return 1+Math.floor(Math.log1p(-r())/n)})}return t.source=n,t}(r),s=function n(r){var t=u.source(r)();function o(n,o){if((n=+n)<0)throw new RangeError("invalid k");if(0===n)return()=>0;if(o=null==o?1:+o,1===n)return()=>-Math.log1p(-r())*o;var u=(n<1?n+1:n)-1/3,e=1/(3*Math.sqrt(u)),a=n<1?()=>Math.pow(r(),1/n):()=>1;return function(){do{do{var n=t(),i=1+e*n}while(i<=0);i*=i*i;var c=1-r()}while(c>=1-.0331*n*n*n*n&&Math.log(c)>=.5*n*n+u*(1-i+Math.log(i)));return u*i*a()*o}}return o.source=n,o}(r),d=function n(r){var t=s.source(r);function o(n,r){var o=t(n),u=t(r);return function(){var n=o();return 0===n?0:n/(n+u())}}return o.source=n,o}(r),M=function n(r){var t=h.source(r),o=d.source(r);function u(n,r){return n=+n,(r=+r)>=1?()=>n:r<=0?()=>0:function(){for(var u=0,e=n,a=r;e*a>16&&e*(1-a)>16;){var i=Math.floor((e+1)*a),c=o(i,e-i+1)();c<=a?(u+=i,e-=i,a=(a-c)/(1-c)):(e=i-1,a/=c)}for(var f=a<.5,l=t(f?a:1-a),h=l(),s=0;h<=e;++s)h+=l();return u+(f?s:e-s)}}return u.source=n,u}(r),v=function n(r){function t(n,t,o){var u;return 0==(n=+n)?u=n=>-Math.log(n):(n=1/n,u=r=>Math.pow(r,n)),t=null==t?0:+t,o=null==o?1:+o,function(){return t+o*u(-Math.log1p(-r()))}}return t.source=n,t}(r),m=function n(r){function t(n,t){return n=null==n?0:+n,t=null==t?1:+t,function(){return n+t*Math.tan(Math.PI*r())}}return t.source=n,t}(r),p=function n(r){function t(n,t){return n=null==n?0:+n,t=null==t?1:+t,function(){var o=r();return n+t*Math.log(o/(1-o))}}return t.source=n,t}(r),g=function n(r){var t=s.source(r),o=M.source(r);function u(n){return function(){for(var u=0,e=n;e>16;){var a=Math.floor(.875*e),i=t(a)();if(i>e)return u+o(a-1,e/i)();u+=a,e-=i}for(var c=-Math.log1p(-r()),f=0;c<=e;++f)c-=Math.log1p(-r());return u+f}}return u.source=n,u}(r);const w=1/4294967296;n.randomBates=i,n.randomBernoulli=l,n.randomBeta=d,n.randomBinomial=M,n.randomCauchy=m,n.randomExponential=c,n.randomGamma=s,n.randomGeometric=h,n.randomInt=o,n.randomIrwinHall=a,n.randomLcg=function(n=Math.random()){let r=0|(0<=n&&n<1?n/w:Math.abs(n));return()=>(r=1664525*r+1013904223|0,w*(r>>>0))},n.randomLogNormal=e,n.randomLogistic=p,n.randomNormal=u,n.randomPareto=f,n.randomPoisson=g,n.randomUniform=t,n.randomWeibull=v,Object.defineProperty(n,"__esModule",{value:!0})})); diff --git a/node_modules/d3-random/package.json b/node_modules/d3-random/package.json deleted file mode 100644 index 486089ba45c1a1e5260f5c4b6a06055cf8bf3332..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_from": "d3-random@2", - "_id": "d3-random@2.2.2", - "_inBundle": false, - "_integrity": "sha512-0D9P8TRj6qDAtHhRQn6EfdOtHMfsUWanl3yb/84C4DqpZ+VsgfI5iTVRNRbELCfNvRfpMr8OrqqUTQ6ANGCijw==", - "_location": "/d3-random", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-random@2", - "name": "d3-random", - "escapedName": "d3-random", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3" - ], - "_resolved": "https://registry.npmjs.org/d3-random/-/d3-random-2.2.2.tgz", - "_shasum": "5eebd209ef4e45a2b362b019c1fb21c2c98cbb6e", - "_spec": "d3-random@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-random/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Generate random numbers from various distributions.", - "devDependencies": { - "d3-array": "1 - 2", - "eslint": "7", - "jsdom": "16", - "rollup": "2", - "rollup-plugin-terser": "7", - "tape": "4", - "tape-await": "0.1" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-random/", - "jsdelivr": "dist/d3-random.min.js", - "keywords": [ - "d3", - "d3-module", - "random", - "rng" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-random.js", - "module": "src/index.js", - "name": "d3-random", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-random.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "./test/run.sh" - }, - "sideEffects": false, - "unpkg": "dist/d3-random.min.js", - "version": "2.2.2" -} diff --git a/node_modules/d3-random/src/bates.js b/node_modules/d3-random/src/bates.js deleted file mode 100644 index 6bafddd0dad2c80d34ce3d409c5d82a014b13ae5..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/bates.js +++ /dev/null @@ -1,19 +0,0 @@ -import defaultSource from "./defaultSource.js"; -import irwinHall from "./irwinHall.js"; - -export default (function sourceRandomBates(source) { - var I = irwinHall.source(source); - - function randomBates(n) { - // use limiting distribution at n === 0 - if ((n = +n) === 0) return source; - var randomIrwinHall = I(n); - return function() { - return randomIrwinHall() / n; - }; - } - - randomBates.source = sourceRandomBates; - - return randomBates; -})(defaultSource); diff --git a/node_modules/d3-random/src/bernoulli.js b/node_modules/d3-random/src/bernoulli.js deleted file mode 100644 index 8751b43396834acd9dd900cf708af735df99aafe..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/bernoulli.js +++ /dev/null @@ -1,14 +0,0 @@ -import defaultSource from "./defaultSource.js"; - -export default (function sourceRandomBernoulli(source) { - function randomBernoulli(p) { - if ((p = +p) < 0 || p > 1) throw new RangeError("invalid p"); - return function() { - return Math.floor(source() + p); - }; - } - - randomBernoulli.source = sourceRandomBernoulli; - - return randomBernoulli; -})(defaultSource); diff --git a/node_modules/d3-random/src/beta.js b/node_modules/d3-random/src/beta.js deleted file mode 100644 index 15bb2b35b6e1e3806ade2b2d0c01018cca06add4..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/beta.js +++ /dev/null @@ -1,19 +0,0 @@ -import defaultSource from "./defaultSource.js"; -import gamma from "./gamma.js"; - -export default (function sourceRandomBeta(source) { - var G = gamma.source(source); - - function randomBeta(alpha, beta) { - var X = G(alpha), - Y = G(beta); - return function() { - var x = X(); - return x === 0 ? 0 : x / (x + Y()); - }; - } - - randomBeta.source = sourceRandomBeta; - - return randomBeta; -})(defaultSource); diff --git a/node_modules/d3-random/src/binomial.js b/node_modules/d3-random/src/binomial.js deleted file mode 100644 index 3213b4a7d7299fdefd55631ca623de19d9e9cc6c..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/binomial.js +++ /dev/null @@ -1,38 +0,0 @@ -import defaultSource from "./defaultSource.js"; -import beta from "./beta.js"; -import geometric from "./geometric.js"; - -export default (function sourceRandomBinomial(source) { - var G = geometric.source(source), - B = beta.source(source); - - function randomBinomial(n, p) { - n = +n; - if ((p = +p) >= 1) return () => n; - if (p <= 0) return () => 0; - return function() { - var acc = 0, nn = n, pp = p; - while (nn * pp > 16 && nn * (1 - pp) > 16) { - var i = Math.floor((nn + 1) * pp), - y = B(i, nn - i + 1)(); - if (y <= pp) { - acc += i; - nn -= i; - pp = (pp - y) / (1 - y); - } else { - nn = i - 1; - pp /= y; - } - } - var sign = pp < 0.5, - pFinal = sign ? pp : 1 - pp, - g = G(pFinal); - for (var s = g(), k = 0; s <= nn; ++k) s += g(); - return acc + (sign ? k : nn - k); - }; - } - - randomBinomial.source = sourceRandomBinomial; - - return randomBinomial; -})(defaultSource); diff --git a/node_modules/d3-random/src/cauchy.js b/node_modules/d3-random/src/cauchy.js deleted file mode 100644 index 95c15ca1e94071bc5d1819aa2491d373628b0fc2..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/cauchy.js +++ /dev/null @@ -1,15 +0,0 @@ -import defaultSource from "./defaultSource.js"; - -export default (function sourceRandomCauchy(source) { - function randomCauchy(a, b) { - a = a == null ? 0 : +a; - b = b == null ? 1 : +b; - return function() { - return a + b * Math.tan(Math.PI * source()); - }; - } - - randomCauchy.source = sourceRandomCauchy; - - return randomCauchy; -})(defaultSource); diff --git a/node_modules/d3-random/src/defaultSource.js b/node_modules/d3-random/src/defaultSource.js deleted file mode 100644 index ef54f3df4027447ec3e21d1434b5ea9b460e0b66..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/defaultSource.js +++ /dev/null @@ -1 +0,0 @@ -export default Math.random; diff --git a/node_modules/d3-random/src/exponential.js b/node_modules/d3-random/src/exponential.js deleted file mode 100644 index 0d4304ccd4680dbaf5ab6af3a057665c61280c75..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/exponential.js +++ /dev/null @@ -1,13 +0,0 @@ -import defaultSource from "./defaultSource.js"; - -export default (function sourceRandomExponential(source) { - function randomExponential(lambda) { - return function() { - return -Math.log1p(-source()) / lambda; - }; - } - - randomExponential.source = sourceRandomExponential; - - return randomExponential; -})(defaultSource); diff --git a/node_modules/d3-random/src/gamma.js b/node_modules/d3-random/src/gamma.js deleted file mode 100644 index 48bf70625ede96a4ee3a48ad3c139fa65dddd055..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/gamma.js +++ /dev/null @@ -1,34 +0,0 @@ -import defaultSource from "./defaultSource.js"; -import normal from "./normal.js"; - -export default (function sourceRandomGamma(source) { - var randomNormal = normal.source(source)(); - - function randomGamma(k, theta) { - if ((k = +k) < 0) throw new RangeError("invalid k"); - // degenerate distribution if k === 0 - if (k === 0) return () => 0; - theta = theta == null ? 1 : +theta; - // exponential distribution if k === 1 - if (k === 1) return () => -Math.log1p(-source()) * theta; - - var d = (k < 1 ? k + 1 : k) - 1 / 3, - c = 1 / (3 * Math.sqrt(d)), - multiplier = k < 1 ? () => Math.pow(source(), 1 / k) : () => 1; - return function() { - do { - do { - var x = randomNormal(), - v = 1 + c * x; - } while (v <= 0); - v *= v * v; - var u = 1 - source(); - } while (u >= 1 - 0.0331 * x * x * x * x && Math.log(u) >= 0.5 * x * x + d * (1 - v + Math.log(v))); - return d * v * multiplier() * theta; - }; - } - - randomGamma.source = sourceRandomGamma; - - return randomGamma; -})(defaultSource); diff --git a/node_modules/d3-random/src/geometric.js b/node_modules/d3-random/src/geometric.js deleted file mode 100644 index 2cae2cc8e0470f156a1ff456a4bfc0ee82d4de6c..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/geometric.js +++ /dev/null @@ -1,17 +0,0 @@ -import defaultSource from "./defaultSource.js"; - -export default (function sourceRandomGeometric(source) { - function randomGeometric(p) { - if ((p = +p) < 0 || p > 1) throw new RangeError("invalid p"); - if (p === 0) return () => Infinity; - if (p === 1) return () => 1; - p = Math.log1p(-p); - return function() { - return 1 + Math.floor(Math.log1p(-source()) / p); - }; - } - - randomGeometric.source = sourceRandomGeometric; - - return randomGeometric; -})(defaultSource); diff --git a/node_modules/d3-random/src/index.js b/node_modules/d3-random/src/index.js deleted file mode 100644 index 033891e95c2cbc3934eb101ab210adf529ece724..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/index.js +++ /dev/null @@ -1,18 +0,0 @@ -export {default as randomUniform} from "./uniform.js"; -export {default as randomInt} from "./int.js"; -export {default as randomNormal} from "./normal.js"; -export {default as randomLogNormal} from "./logNormal.js"; -export {default as randomBates} from "./bates.js"; -export {default as randomIrwinHall} from "./irwinHall.js"; -export {default as randomExponential} from "./exponential.js"; -export {default as randomPareto} from "./pareto.js"; -export {default as randomBernoulli} from "./bernoulli.js"; -export {default as randomGeometric} from "./geometric.js"; -export {default as randomBinomial} from "./binomial.js"; -export {default as randomGamma} from "./gamma.js"; -export {default as randomBeta} from "./beta.js"; -export {default as randomWeibull} from "./weibull.js"; -export {default as randomCauchy} from "./cauchy.js"; -export {default as randomLogistic} from "./logistic.js"; -export {default as randomPoisson} from "./poisson.js"; -export {default as randomLcg} from "./lcg.js"; diff --git a/node_modules/d3-random/src/int.js b/node_modules/d3-random/src/int.js deleted file mode 100644 index a47249b7a4f1c8decc640d1a4d641014e2c0e32d..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/int.js +++ /dev/null @@ -1,16 +0,0 @@ -import defaultSource from "./defaultSource.js"; - -export default (function sourceRandomInt(source) { - function randomInt(min, max) { - if (arguments.length < 2) max = min, min = 0; - min = Math.floor(min); - max = Math.floor(max) - min; - return function() { - return Math.floor(source() * max + min); - }; - } - - randomInt.source = sourceRandomInt; - - return randomInt; -})(defaultSource); diff --git a/node_modules/d3-random/src/irwinHall.js b/node_modules/d3-random/src/irwinHall.js deleted file mode 100644 index 4db5dccb99ca41bc4378b02852298a23a373cab0..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/irwinHall.js +++ /dev/null @@ -1,15 +0,0 @@ -import defaultSource from "./defaultSource.js"; - -export default (function sourceRandomIrwinHall(source) { - function randomIrwinHall(n) { - if ((n = +n) <= 0) return () => 0; - return function() { - for (var sum = 0, i = n; i > 1; --i) sum += source(); - return sum + i * source(); - }; - } - - randomIrwinHall.source = sourceRandomIrwinHall; - - return randomIrwinHall; -})(defaultSource); diff --git a/node_modules/d3-random/src/lcg.js b/node_modules/d3-random/src/lcg.js deleted file mode 100644 index fb058788c193c30dce7548d27b368c5f2a863bdb..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/lcg.js +++ /dev/null @@ -1,9 +0,0 @@ -// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use -const mul = 0x19660D; -const inc = 0x3C6EF35F; -const eps = 1 / 0x100000000; - -export default function lcg(seed = Math.random()) { - let state = (0 <= seed && seed < 1 ? seed / eps : Math.abs(seed)) | 0; - return () => (state = mul * state + inc | 0, eps * (state >>> 0)); -} diff --git a/node_modules/d3-random/src/logNormal.js b/node_modules/d3-random/src/logNormal.js deleted file mode 100644 index 3465fba3d384d8b445d8eb5a6c1905653d84e3f5..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/logNormal.js +++ /dev/null @@ -1,17 +0,0 @@ -import defaultSource from "./defaultSource.js"; -import normal from "./normal.js"; - -export default (function sourceRandomLogNormal(source) { - var N = normal.source(source); - - function randomLogNormal() { - var randomNormal = N.apply(this, arguments); - return function() { - return Math.exp(randomNormal()); - }; - } - - randomLogNormal.source = sourceRandomLogNormal; - - return randomLogNormal; -})(defaultSource); diff --git a/node_modules/d3-random/src/logistic.js b/node_modules/d3-random/src/logistic.js deleted file mode 100644 index b2cda2a325fd9919fafa5922b41b263b6338496e..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/logistic.js +++ /dev/null @@ -1,16 +0,0 @@ -import defaultSource from "./defaultSource.js"; - -export default (function sourceRandomLogistic(source) { - function randomLogistic(a, b) { - a = a == null ? 0 : +a; - b = b == null ? 1 : +b; - return function() { - var u = source(); - return a + b * Math.log(u / (1 - u)); - }; - } - - randomLogistic.source = sourceRandomLogistic; - - return randomLogistic; -})(defaultSource); diff --git a/node_modules/d3-random/src/normal.js b/node_modules/d3-random/src/normal.js deleted file mode 100644 index b6838d6762081629d2a885eef6ab57e6e62c76b0..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/normal.js +++ /dev/null @@ -1,28 +0,0 @@ -import defaultSource from "./defaultSource.js"; - -export default (function sourceRandomNormal(source) { - function randomNormal(mu, sigma) { - var x, r; - mu = mu == null ? 0 : +mu; - sigma = sigma == null ? 1 : +sigma; - return function() { - var y; - - // If available, use the second previously-generated uniform random. - if (x != null) y = x, x = null; - - // Otherwise, generate a new x and y. - else do { - x = source() * 2 - 1; - y = source() * 2 - 1; - r = x * x + y * y; - } while (!r || r > 1); - - return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r); - }; - } - - randomNormal.source = sourceRandomNormal; - - return randomNormal; -})(defaultSource); diff --git a/node_modules/d3-random/src/pareto.js b/node_modules/d3-random/src/pareto.js deleted file mode 100644 index e5496f0c5643527ae9539a147b21ebab3fc616f4..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/pareto.js +++ /dev/null @@ -1,15 +0,0 @@ -import defaultSource from "./defaultSource.js"; - -export default (function sourceRandomPareto(source) { - function randomPareto(alpha) { - if ((alpha = +alpha) < 0) throw new RangeError("invalid alpha"); - alpha = 1 / -alpha; - return function() { - return Math.pow(1 - source(), alpha); - }; - } - - randomPareto.source = sourceRandomPareto; - - return randomPareto; -})(defaultSource); diff --git a/node_modules/d3-random/src/poisson.js b/node_modules/d3-random/src/poisson.js deleted file mode 100644 index da93995528633b3f82f084934268bcde4a603084..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/poisson.js +++ /dev/null @@ -1,27 +0,0 @@ -import defaultSource from "./defaultSource.js"; -import binomial from "./binomial.js"; -import gamma from "./gamma.js"; - -export default (function sourceRandomPoisson(source) { - var G = gamma.source(source), - B = binomial.source(source); - - function randomPoisson(lambda) { - return function() { - var acc = 0, l = lambda; - while (l > 16) { - var n = Math.floor(0.875 * l), - t = G(n)(); - if (t > l) return acc + B(n - 1, l / t)(); - acc += n; - l -= t; - } - for (var s = -Math.log1p(-source()), k = 0; s <= l; ++k) s -= Math.log1p(-source()); - return acc + k; - }; - } - - randomPoisson.source = sourceRandomPoisson; - - return randomPoisson; -})(defaultSource); diff --git a/node_modules/d3-random/src/uniform.js b/node_modules/d3-random/src/uniform.js deleted file mode 100644 index a2bc468a70ef506b25c69080d3299eadf1acaa31..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/uniform.js +++ /dev/null @@ -1,17 +0,0 @@ -import defaultSource from "./defaultSource.js"; - -export default (function sourceRandomUniform(source) { - function randomUniform(min, max) { - min = min == null ? 0 : +min; - max = max == null ? 1 : +max; - if (arguments.length === 1) max = min, min = 0; - else max -= min; - return function() { - return source() * max + min; - }; - } - - randomUniform.source = sourceRandomUniform; - - return randomUniform; -})(defaultSource); diff --git a/node_modules/d3-random/src/weibull.js b/node_modules/d3-random/src/weibull.js deleted file mode 100644 index b7d796cc98c5ce882286a6d773973abfe3cdb6db..0000000000000000000000000000000000000000 --- a/node_modules/d3-random/src/weibull.js +++ /dev/null @@ -1,22 +0,0 @@ -import defaultSource from "./defaultSource.js"; - -export default (function sourceRandomWeibull(source) { - function randomWeibull(k, a, b) { - var outerFunc; - if ((k = +k) === 0) { - outerFunc = x => -Math.log(x); - } else { - k = 1 / k; - outerFunc = x => Math.pow(x, k); - } - a = a == null ? 0 : +a; - b = b == null ? 1 : +b; - return function() { - return a + b * outerFunc(-Math.log1p(-source())); - }; - } - - randomWeibull.source = sourceRandomWeibull; - - return randomWeibull; -})(defaultSource); diff --git a/node_modules/d3-scale-chromatic/LICENSE b/node_modules/d3-scale-chromatic/LICENSE deleted file mode 100644 index b10990f4869e94ff88462d2b8bedab276fbba9e4..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/LICENSE +++ /dev/null @@ -1,44 +0,0 @@ -Copyright 2010-2018 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Apache-Style Software License for ColorBrewer software and ColorBrewer Color -Schemes - -Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania State -University. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use -this file except in compliance with the License. You may obtain a copy of the -License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed -under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. diff --git a/node_modules/d3-scale-chromatic/README.md b/node_modules/d3-scale-chromatic/README.md deleted file mode 100644 index 20ae5fec092002e399607b1b0505020b50ffa685..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/README.md +++ /dev/null @@ -1,386 +0,0 @@ -# d3-scale-chromatic - -This module provides sequential, diverging and categorical color schemes designed to work with [d3-scale](https://github.com/d3/d3-scale)’s [d3.scaleOrdinal](https://github.com/d3/d3-scale#ordinal-scales) and [d3.scaleSequential](https://github.com/d3/d3-scale#sequential-scales). Most of these schemes are derived from Cynthia A. Brewer’s [ColorBrewer](http://colorbrewer2.org). Since ColorBrewer publishes only discrete color schemes, the sequential and diverging scales are interpolated using [uniform B-splines](https://bl.ocks.org/mbostock/048d21cf747371b11884f75ad896e5a5). - -For example, to create a categorical color scale using the [Accent](#schemeAccent) color scheme: - -```js -var accent = d3.scaleOrdinal(d3.schemeAccent); -``` - -To create a sequential discrete nine-color scale using the [Blues](#schemeBlues) color scheme: - -```js -var blues = d3.scaleOrdinal(d3.schemeBlues[9]); -``` - -To create a diverging, continuous color scale using the [PiYG](#interpolatePiYG) color scheme: - -```js -var piyg = d3.scaleSequential(d3.interpolatePiYG); -``` - -## Installing - -If you use NPM, `npm install d3-scale-chromatic`. Otherwise, download the [latest release](https://github.com/d3/d3-scale-chromatic/releases/latest) or load directly from [d3js.org](https://d3js.org) as a [standalone library](https://d3js.org/d3-scale-chromatic.v1.min.js). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-color.v2.min.js"></script> -<script src="https://d3js.org/d3-interpolate.v2.min.js"></script> -<script src="https://d3js.org/d3-scale-chromatic.v2.min.js"></script> -<script> - -var yellow = d3.interpolateYlGn(0), // "rgb(255, 255, 229)" - yellowGreen = d3.interpolateYlGn(0.5), // "rgb(120, 197, 120)" - green = d3.interpolateYlGn(1); // "rgb(0, 69, 41)" - -</script> -``` - -Or, as part of the [D3 default bundle](https://github.com/d3/d3): - -```html -<script src="https://d3js.org/d3.v6.min.js"></script> -<script> - -var yellow = d3.interpolateYlGn(0), // "rgb(255, 255, 229)" - yellowGreen = d3.interpolateYlGn(0.5), // "rgb(120, 197, 120)" - green = d3.interpolateYlGn(1); // "rgb(0, 69, 41)" - -</script> -``` - -[Try d3-scale-chromatic in your browser.](https://observablehq.com/collection/@d3/d3-scale-chromatic) - -## API Reference - -### Categorical - -<a name="schemeCategory10" href="#schemeCategory10">#</a> d3.<b>schemeCategory10</b> [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/categorical/category10.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/category10.png" width="100%" height="40" alt="category10"> - -An array of ten categorical colors represented as RGB hexadecimal strings. - -<a href="#schemeAccent" name="schemeAccent">#</a> d3.<b>schemeAccent</b> [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/categorical/Accent.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Accent.png" width="100%" height="40" alt="Accent"> - -An array of eight categorical colors represented as RGB hexadecimal strings. - -<a href="#schemeDark2" name="schemeDark2">#</a> d3.<b>schemeDark2</b> [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/categorical/Dark2.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Dark2.png" width="100%" height="40" alt="Dark2"> - -An array of eight categorical colors represented as RGB hexadecimal strings. - -<a href="#schemePaired" name="schemePaired">#</a> d3.<b>schemePaired</b> [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/categorical/Paired.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Paired.png" width="100%" height="40" alt="Paired"> - -An array of twelve categorical colors represented as RGB hexadecimal strings. - -<a href="#schemePastel1" name="schemePastel1">#</a> d3.<b>schemePastel1</b> [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/categorical/Pastel1.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Pastel1.png" width="100%" height="40" alt="Pastel1"> - -An array of nine categorical colors represented as RGB hexadecimal strings. - -<a href="#schemePastel2" name="schemePastel2">#</a> d3.<b>schemePastel2</b> [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/categorical/Pastel2.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Pastel2.png" width="100%" height="40" alt="Pastel2"> - -An array of eight categorical colors represented as RGB hexadecimal strings. - -<a href="#schemeSet1" name="schemeSet1">#</a> d3.<b>schemeSet1</b> [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/categorical/Set1.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Set1.png" width="100%" height="40" alt="Set1"> - -An array of nine categorical colors represented as RGB hexadecimal strings. - -<a href="#schemeSet2" name="schemeSet2">#</a> d3.<b>schemeSet2</b> [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/categorical/Set2.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Set2.png" width="100%" height="40" alt="Set2"> - -An array of eight categorical colors represented as RGB hexadecimal strings. - -<a href="#schemeSet3" name="schemeSet3">#</a> d3.<b>schemeSet3</b> [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/categorical/Set3.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Set3.png" width="100%" height="40" alt="Set3"> - -An array of twelve categorical colors represented as RGB hexadecimal strings. - -<a href="#schemeTableau10" name="schemeTableau10">#</a> d3.<b>schemeTableau10</b> [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/categorical/Tableau10.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Tableau10.png" width="100%" height="40" alt="Tableau10"> - -An array of ten categorical colors authored by Tableau as part of [Tableau 10](https://www.tableau.com/about/blog/2016/7/colors-upgrade-tableau-10-56782) represented as RGB hexadecimal strings. - -### Diverging - -Diverging color schemes are available as continuous interpolators (often used with [d3.scaleSequential](https://github.com/d3/d3-scale/blob/master/README.md#sequential-scales)) and as discrete schemes (often used with [d3.scaleOrdinal](https://github.com/d3/d3-scale/blob/master/README.md#ordinal-scales)). Each discrete scheme, such as [d3.schemeBrBG](#schemeBrBG), is represented as an array of arrays of hexadecimal color strings. The *k*th element of this array contains the color scheme of size *k*; for example, `d3.schemeBrBG[9]` contains an array of nine strings representing the nine colors of the brown-blue-green diverging color scheme. Diverging color schemes support a size *k* ranging from 3 to 11. - -<a href="#interpolateBrBG" name="interpolateBrBG">#</a> d3.<b>interpolateBrBG</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/diverging/BrBG.js "Source") -<br><a href="#schemeBrBG" name="schemeBrBG">#</a> d3.<b>schemeBrBG</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/BrBG.png" width="100%" height="40" alt="BrBG"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “BrBG†diverging color scheme represented as an RGB string. - -<a href="#interpolatePRGn" name="interpolatePRGn">#</a> d3.<b>interpolatePRGn</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/diverging/PRGn.js "Source") -<br><a href="#schemePRGn" name="schemePRGn">#</a> d3.<b>schemePRGn</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/PRGn.png" width="100%" height="40" alt="PRGn"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “PRGn†diverging color scheme represented as an RGB string. - -<a href="#interpolatePiYG" name="interpolatePiYG">#</a> d3.<b>interpolatePiYG</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/diverging/PiYG.js "Source") -<br><a href="#schemePiYG" name="schemePiYG">#</a> d3.<b>schemePiYG</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/PiYG.png" width="100%" height="40" alt="PiYG"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “PiYG†diverging color scheme represented as an RGB string. - -<a href="#interpolatePuOr" name="interpolatePuOr">#</a> d3.<b>interpolatePuOr</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/diverging/PuOr.js "Source") -<br><a href="#schemePuOr" name="schemePuOr">#</a> d3.<b>schemePuOr</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/PuOr.png" width="100%" height="40" alt="PuOr"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “PuOr†diverging color scheme represented as an RGB string. - -<a href="#interpolateRdBu" name="interpolateRdBu">#</a> d3.<b>interpolateRdBu</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/diverging/RdBu.js "Source") -<br><a href="#schemeRdBu" name="schemeRdBu">#</a> d3.<b>schemeRdBu</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/RdBu.png" width="100%" height="40" alt="RdBu"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “RdBu†diverging color scheme represented as an RGB string. - -<a href="#interpolateRdGy" name="interpolateRdGy">#</a> d3.<b>interpolateRdGy</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/diverging/RdGy.js "Source") -<br><a href="#schemeRdGy" name="schemeRdGy">#</a> d3.<b>schemeRdGy</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/RdGy.png" width="100%" height="40" alt="RdGy"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “RdGy†diverging color scheme represented as an RGB string. - -<a href="#interpolateRdYlBu" name="interpolateRdYlBu">#</a> d3.<b>interpolateRdYlBu</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/diverging/RdYlBu.js "Source") -<br><a href="#schemeRdYlBu" name="schemeRdYlBu">#</a> d3.<b>schemeRdYlBu</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/RdYlBu.png" width="100%" height="40" alt="RdYlBu"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “RdYlBu†diverging color scheme represented as an RGB string. - -<a href="#interpolateRdYlGn" name="interpolateRdYlGn">#</a> d3.<b>interpolateRdYlGn</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/diverging/RdYlGn.js "Source") -<br><a href="#schemeRdYlGn" name="schemeRdYlGn">#</a> d3.<b>schemeRdYlGn</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/RdYlGn.png" width="100%" height="40" alt="RdYlGn"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “RdYlGn†diverging color scheme represented as an RGB string. - -<a href="#interpolateSpectral" name="interpolateSpectral">#</a> d3.<b>interpolateSpectral</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/diverging/Spectral.js "Source") -<br><a href="#schemeSpectral" name="schemeSpectral">#</a> d3.<b>schemeSpectral</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Spectral.png" width="100%" height="40" alt="Spectral"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “Spectral†diverging color scheme represented as an RGB string. - -### Sequential (Single Hue) - -Sequential, single-hue color schemes are available as continuous interpolators (often used with [d3.scaleSequential](https://github.com/d3/d3-scale/blob/master/README.md#sequential-scales)) and as discrete schemes (often used with [d3.scaleOrdinal](https://github.com/d3/d3-scale/blob/master/README.md#ordinal-scales)). Each discrete scheme, such as [d3.schemeBlues](#schemeBlues), is represented as an array of arrays of hexadecimal color strings. The *k*th element of this array contains the color scheme of size *k*; for example, `d3.schemeBlues[9]` contains an array of nine strings representing the nine colors of the blue sequential color scheme. Sequential, single-hue color schemes support a size *k* ranging from 3 to 9. - -<a href="#interpolateBlues" name="interpolateBlues">#</a> d3.<b>interpolateBlues</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-single/Blues.js "Source") -<br><a href="#schemeBlues" name="schemeBlues">#</a> d3.<b>schemeBlues</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Blues.png" width="100%" height="40" alt="Blues"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “Blues†sequential color scheme represented as an RGB string. - -<a href="#interpolateGreens" name="interpolateGreens">#</a> d3.<b>interpolateGreens</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-single/Greens.js "Source") -<br><a href="#schemeGreens" name="schemeGreens">#</a> d3.<b>schemeGreens</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Greens.png" width="100%" height="40" alt="Greens"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “Greens†sequential color scheme represented as an RGB string. - -<a href="#interpolateGreys" name="interpolateGreys">#</a> d3.<b>interpolateGreys</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-single/Greys.js "Source") -<br><a href="#schemeGreys" name="schemeGreys">#</a> d3.<b>schemeGreys</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Greys.png" width="100%" height="40" alt="Greys"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “Greys†sequential color scheme represented as an RGB string. - -<a href="#interpolateOranges" name="interpolateOranges">#</a> d3.<b>interpolateOranges</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-single/Oranges.js "Source") -<br><a href="#schemeOranges" name="schemeOranges">#</a> d3.<b>schemeOranges</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Oranges.png" width="100%" height="40" alt="Oranges"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “Oranges†sequential color scheme represented as an RGB string. - -<a href="#interpolatePurples" name="interpolatePurples">#</a> d3.<b>interpolatePurples</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-single/Purples.js "Source") -<br><a href="#schemePurples" name="schemePurples">#</a> d3.<b>schemePurples</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Purples.png" width="100%" height="40" alt="Purples"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “Purples†sequential color scheme represented as an RGB string. - -<a href="#interpolateReds" name="interpolateReds">#</a> d3.<b>interpolateReds</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-single/Reds.js "Source") -<br><a href="#schemeReds" name="schemeReds">#</a> d3.<b>schemeReds</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/Reds.png" width="100%" height="40" alt="Reds"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “Reds†sequential color scheme represented as an RGB string. - -### Sequential (Multi-Hue) - -Sequential, multi-hue color schemes are available as continuous interpolators (often used with [d3.scaleSequential](https://github.com/d3/d3-scale/blob/master/README.md#sequential-scales)) and as discrete schemes (often used with [d3.scaleOrdinal](https://github.com/d3/d3-scale/blob/master/README.md#ordinal-scales)). Each discrete scheme, such as [d3.schemeBuGn](#schemeBuGn), is represented as an array of arrays of hexadecimal color strings. The *k*th element of this array contains the color scheme of size *k*; for example, `d3.schemeBuGn[9]` contains an array of nine strings representing the nine colors of the blue-green sequential color scheme. Sequential, multi-hue color schemes support a size *k* ranging from 3 to 9. - -<a name="interpolateTurbo" href="#interpolateTurbo">#</a> d3.<b>interpolateTurbo</b>(<i>t</i>) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/turbo.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/turbo.png" width="100%" height="40" alt="turbo"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “turbo†color scheme by [Anton Mikhailov](https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html). - -<a name="interpolateViridis" href="#interpolateViridis">#</a> d3.<b>interpolateViridis</b>(<i>t</i>) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/viridis.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/viridis.png" width="100%" height="40" alt="viridis"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “viridis†perceptually-uniform color scheme designed by [van der Walt, Smith and Firing](https://bids.github.io/colormap/) for matplotlib, represented as an RGB string. - -<a name="interpolateInferno" href="#interpolateInferno">#</a> d3.<b>interpolateInferno</b>(<i>t</i>) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/viridis.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/inferno.png" width="100%" height="40" alt="inferno"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “inferno†perceptually-uniform color scheme designed by [van der Walt and Smith](https://bids.github.io/colormap/) for matplotlib, represented as an RGB string. - -<a name="interpolateMagma" href="#interpolateMagma">#</a> d3.<b>interpolateMagma</b>(<i>t</i>) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/viridis.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/magma.png" width="100%" height="40" alt="magma"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “magma†perceptually-uniform color scheme designed by [van der Walt and Smith](https://bids.github.io/colormap/) for matplotlib, represented as an RGB string. - -<a name="interpolatePlasma" href="#interpolatePlasma">#</a> d3.<b>interpolatePlasma</b>(<i>t</i>) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/viridis.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/plasma.png" width="100%" height="40" alt="plasma"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “plasma†perceptually-uniform color scheme designed by [van der Walt and Smith](https://bids.github.io/colormap/) for matplotlib, represented as an RGB string. - -<a name="interpolateCividis" href="#interpolateCividis">#</a> d3.<b>interpolateCividis</b>(<i>t</i>) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/cividis.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/cividis.png" width="100%" height="40" alt="cividis"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “cividis†color vision deficiency-optimized color scheme designed by [Nuñez, Anderton, and Renslow](https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0199239), represented as an RGB string. - -<a name="interpolateWarm" href="#interpolateWarm">#</a> d3.<b>interpolateWarm</b>(<i>t</i>) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/rainbow.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/warm.png" width="100%" height="40" alt="warm"> - -Given a number *t* in the range [0,1], returns the corresponding color from a 180° rotation of [Niccoli’s perceptual rainbow](https://mycarta.wordpress.com/2013/02/21/perceptual-rainbow-palette-the-method/), represented as an RGB string. - -<a name="interpolateCool" href="#interpolateCool">#</a> d3.<b>interpolateCool</b>(<i>t</i>) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/rainbow.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/cool.png" width="100%" height="40" alt="cool"> - -Given a number *t* in the range [0,1], returns the corresponding color from [Niccoli’s perceptual rainbow](https://mycarta.wordpress.com/2013/02/21/perceptual-rainbow-palette-the-method/), represented as an RGB string. - -<a name="interpolateCubehelixDefault" href="#interpolateCubehelixDefault">#</a> d3.<b>interpolateCubehelixDefault</b>(<i>t</i>) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/cubehelix.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/cubehelix.png" width="100%" height="40" alt="cubehelix"> - -Given a number *t* in the range [0,1], returns the corresponding color from [Green’s default Cubehelix](http://www.mrao.cam.ac.uk/~dag/CUBEHELIX/) represented as an RGB string. - -<a href="#interpolateBuGn" name="interpolateBuGn">#</a> d3.<b>interpolateBuGn</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/BuGn.js "Source") -<br><a href="#schemeBuGn" name="schemeBuGn">#</a> d3.<b>schemeBuGn</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/BuGn.png" width="100%" height="40" alt="BuGn"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “BuGn†sequential color scheme represented as an RGB string. - -<a href="#interpolateBuPu" name="interpolateBuPu">#</a> d3.<b>interpolateBuPu</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/BuPu.js "Source") -<br><a href="#schemeBuPu" name="schemeBuPu">#</a> d3.<b>schemeBuPu</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/BuPu.png" width="100%" height="40" alt="BuPu"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “BuPu†sequential color scheme represented as an RGB string. - -<a href="#interpolateGnBu" name="interpolateGnBu">#</a> d3.<b>interpolateGnBu</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/GnBu.js "Source") -<br><a href="#schemeGnBu" name="schemeGnBu">#</a> d3.<b>schemeGnBu</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/GnBu.png" width="100%" height="40" alt="GnBu"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “GnBu†sequential color scheme represented as an RGB string. - -<a href="#interpolateOrRd" name="interpolateOrRd">#</a> d3.<b>interpolateOrRd</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/OrRd.js "Source") -<br><a href="#schemeOrRd" name="schemeOrRd">#</a> d3.<b>schemeOrRd</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/OrRd.png" width="100%" height="40" alt="OrRd"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “OrRd†sequential color scheme represented as an RGB string. - -<a href="#interpolatePuBuGn" name="interpolatePuBuGn">#</a> d3.<b>interpolatePuBuGn</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/PuBuGn.js "Source") -<br><a href="#schemePuBuGn" name="schemePuBuGn">#</a> d3.<b>schemePuBuGn</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/PuBuGn.png" width="100%" height="40" alt="PuBuGn"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “PuBuGn†sequential color scheme represented as an RGB string. - -<a href="#interpolatePuBu" name="interpolatePuBu">#</a> d3.<b>interpolatePuBu</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/PuBu.js "Source") -<br><a href="#schemePuBu" name="schemePuBu">#</a> d3.<b>schemePuBu</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/PuBu.png" width="100%" height="40" alt="PuBu"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “PuBu†sequential color scheme represented as an RGB string. - -<a href="#interpolatePuRd" name="interpolatePuRd">#</a> d3.<b>interpolatePuRd</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/PuRd.js "Source") -<br><a href="#schemePuRd" name="schemePuRd">#</a> d3.<b>schemePuRd</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/PuRd.png" width="100%" height="40" alt="PuRd"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “PuRd†sequential color scheme represented as an RGB string. - -<a href="#interpolateRdPu" name="interpolateRdPu">#</a> d3.<b>interpolateRdPu</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/RdPu.js "Source") -<br><a href="#schemeRdPu" name="schemeRdPu">#</a> d3.<b>schemeRdPu</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/RdPu.png" width="100%" height="40" alt="RdPu"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “RdPu†sequential color scheme represented as an RGB string. - -<a href="#interpolateYlGnBu" name="interpolateYlGnBu">#</a> d3.<b>interpolateYlGnBu</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/YlGnBu.js "Source") -<br><a href="#schemeYlGnBu" name="schemeYlGnBu">#</a> d3.<b>schemeYlGnBu</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/YlGnBu.png" width="100%" height="40" alt="YlGnBu"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “YlGnBu†sequential color scheme represented as an RGB string. - -<a href="#interpolateYlGn" name="interpolateYlGn">#</a> d3.<b>interpolateYlGn</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/YlGn.js "Source") -<br><a href="#schemeYlGn" name="schemeYlGn">#</a> d3.<b>schemeYlGn</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/YlGn.png" width="100%" height="40" alt="YlGn"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “YlGn†sequential color scheme represented as an RGB string. - -<a href="#interpolateYlOrBr" name="interpolateYlOrBr">#</a> d3.<b>interpolateYlOrBr</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/YlOrBr.js "Source") -<br><a href="#schemeYlOrBr" name="schemeYlOrBr">#</a> d3.<b>schemeYlOrBr</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/YlOrBr.png" width="100%" height="40" alt="YlOrBr"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “YlOrBr†sequential color scheme represented as an RGB string. - -<a href="#interpolateYlOrRd" name="interpolateYlOrRd">#</a> d3.<b>interpolateYlOrRd</b>(*t*) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/YlOrRd.js "Source") -<br><a href="#schemeYlOrRd" name="schemeYlOrRd">#</a> d3.<b>schemeYlOrRd</b>[*k*] - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/YlOrRd.png" width="100%" height="40" alt="YlOrRd"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “YlOrRd†sequential color scheme represented as an RGB string. - -### Cyclical - -<a name="interpolateRainbow" href="#interpolateRainbow">#</a> d3.<b>interpolateRainbow</b>(<i>t</i>) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/rainbow.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/rainbow.png" width="100%" height="40" alt="rainbow"> - -Given a number *t* in the range [0,1], returns the corresponding color from [d3.interpolateWarm](#interpolateWarm) scale from [0.0, 0.5] followed by the [d3.interpolateCool](#interpolateCool) scale from [0.5, 1.0], thus implementing the cyclical [less-angry rainbow](http://bl.ocks.org/mbostock/310c99e53880faec2434) color scheme. - -<a name="interpolateSinebow" href="#interpolateSinebow">#</a> d3.<b>interpolateSinebow</b>(<i>t</i>) [<>](https://github.com/d3/d3-scale-chromatic/blob/master/src/sequential-multi/sinebow.js "Source") - -<img src="https://raw.githubusercontent.com/d3/d3-scale-chromatic/master/img/sinebow.png" width="100%" height="40" alt="sinebow"> - -Given a number *t* in the range [0,1], returns the corresponding color from the “sinebow†color scheme by [Jim Bumgardner](https://krazydad.com/tutorials/makecolors.php) and [Charlie Loyd](http://basecase.org/env/on-rainbows). diff --git a/node_modules/d3-scale-chromatic/dist/d3-scale-chromatic.js b/node_modules/d3-scale-chromatic/dist/d3-scale-chromatic.js deleted file mode 100644 index b68a151035905b3b8e74581a7e3c68b15bc106a6..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/dist/d3-scale-chromatic.js +++ /dev/null @@ -1,519 +0,0 @@ -// https://d3js.org/d3-scale-chromatic/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-interpolate'), require('d3-color')) : -typeof define === 'function' && define.amd ? define(['exports', 'd3-interpolate', 'd3-color'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {}, global.d3, global.d3)); -}(this, function (exports, d3Interpolate, d3Color) { 'use strict'; - -function colors(specifier) { - var n = specifier.length / 6 | 0, colors = new Array(n), i = 0; - while (i < n) colors[i] = "#" + specifier.slice(i * 6, ++i * 6); - return colors; -} - -var category10 = colors("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"); - -var Accent = colors("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"); - -var Dark2 = colors("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"); - -var Paired = colors("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"); - -var Pastel1 = colors("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"); - -var Pastel2 = colors("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"); - -var Set1 = colors("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"); - -var Set2 = colors("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"); - -var Set3 = colors("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"); - -var Tableau10 = colors("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"); - -var ramp = scheme => d3Interpolate.interpolateRgbBasis(scheme[scheme.length - 1]); - -var scheme = new Array(3).concat( - "d8b365f5f5f55ab4ac", - "a6611adfc27d80cdc1018571", - "a6611adfc27df5f5f580cdc1018571", - "8c510ad8b365f6e8c3c7eae55ab4ac01665e", - "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e", - "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e", - "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e", - "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30", - "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30" -).map(colors); - -var BrBG = ramp(scheme); - -var scheme$1 = new Array(3).concat( - "af8dc3f7f7f77fbf7b", - "7b3294c2a5cfa6dba0008837", - "7b3294c2a5cff7f7f7a6dba0008837", - "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837", - "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837", - "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837", - "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837", - "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b", - "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b" -).map(colors); - -var PRGn = ramp(scheme$1); - -var scheme$2 = new Array(3).concat( - "e9a3c9f7f7f7a1d76a", - "d01c8bf1b6dab8e1864dac26", - "d01c8bf1b6daf7f7f7b8e1864dac26", - "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221", - "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221", - "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221", - "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221", - "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419", - "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419" -).map(colors); - -var PiYG = ramp(scheme$2); - -var scheme$3 = new Array(3).concat( - "998ec3f7f7f7f1a340", - "5e3c99b2abd2fdb863e66101", - "5e3c99b2abd2f7f7f7fdb863e66101", - "542788998ec3d8daebfee0b6f1a340b35806", - "542788998ec3d8daebf7f7f7fee0b6f1a340b35806", - "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806", - "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806", - "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08", - "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08" -).map(colors); - -var PuOr = ramp(scheme$3); - -var scheme$4 = new Array(3).concat( - "ef8a62f7f7f767a9cf", - "ca0020f4a58292c5de0571b0", - "ca0020f4a582f7f7f792c5de0571b0", - "b2182bef8a62fddbc7d1e5f067a9cf2166ac", - "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac", - "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac", - "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac", - "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061", - "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061" -).map(colors); - -var RdBu = ramp(scheme$4); - -var scheme$5 = new Array(3).concat( - "ef8a62ffffff999999", - "ca0020f4a582bababa404040", - "ca0020f4a582ffffffbababa404040", - "b2182bef8a62fddbc7e0e0e09999994d4d4d", - "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d", - "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d", - "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d", - "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a", - "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a" -).map(colors); - -var RdGy = ramp(scheme$5); - -var scheme$6 = new Array(3).concat( - "fc8d59ffffbf91bfdb", - "d7191cfdae61abd9e92c7bb6", - "d7191cfdae61ffffbfabd9e92c7bb6", - "d73027fc8d59fee090e0f3f891bfdb4575b4", - "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4", - "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4", - "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4", - "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695", - "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695" -).map(colors); - -var RdYlBu = ramp(scheme$6); - -var scheme$7 = new Array(3).concat( - "fc8d59ffffbf91cf60", - "d7191cfdae61a6d96a1a9641", - "d7191cfdae61ffffbfa6d96a1a9641", - "d73027fc8d59fee08bd9ef8b91cf601a9850", - "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850", - "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850", - "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850", - "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837", - "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837" -).map(colors); - -var RdYlGn = ramp(scheme$7); - -var scheme$8 = new Array(3).concat( - "fc8d59ffffbf99d594", - "d7191cfdae61abdda42b83ba", - "d7191cfdae61ffffbfabdda42b83ba", - "d53e4ffc8d59fee08be6f59899d5943288bd", - "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd", - "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd", - "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd", - "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2", - "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2" -).map(colors); - -var Spectral = ramp(scheme$8); - -var scheme$9 = new Array(3).concat( - "e5f5f999d8c92ca25f", - "edf8fbb2e2e266c2a4238b45", - "edf8fbb2e2e266c2a42ca25f006d2c", - "edf8fbccece699d8c966c2a42ca25f006d2c", - "edf8fbccece699d8c966c2a441ae76238b45005824", - "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824", - "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b" -).map(colors); - -var BuGn = ramp(scheme$9); - -var scheme$a = new Array(3).concat( - "e0ecf49ebcda8856a7", - "edf8fbb3cde38c96c688419d", - "edf8fbb3cde38c96c68856a7810f7c", - "edf8fbbfd3e69ebcda8c96c68856a7810f7c", - "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b", - "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b", - "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b" -).map(colors); - -var BuPu = ramp(scheme$a); - -var scheme$b = new Array(3).concat( - "e0f3dba8ddb543a2ca", - "f0f9e8bae4bc7bccc42b8cbe", - "f0f9e8bae4bc7bccc443a2ca0868ac", - "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac", - "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e", - "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e", - "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081" -).map(colors); - -var GnBu = ramp(scheme$b); - -var scheme$c = new Array(3).concat( - "fee8c8fdbb84e34a33", - "fef0d9fdcc8afc8d59d7301f", - "fef0d9fdcc8afc8d59e34a33b30000", - "fef0d9fdd49efdbb84fc8d59e34a33b30000", - "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000", - "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000", - "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000" -).map(colors); - -var OrRd = ramp(scheme$c); - -var scheme$d = new Array(3).concat( - "ece2f0a6bddb1c9099", - "f6eff7bdc9e167a9cf02818a", - "f6eff7bdc9e167a9cf1c9099016c59", - "f6eff7d0d1e6a6bddb67a9cf1c9099016c59", - "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450", - "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450", - "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636" -).map(colors); - -var PuBuGn = ramp(scheme$d); - -var scheme$e = new Array(3).concat( - "ece7f2a6bddb2b8cbe", - "f1eef6bdc9e174a9cf0570b0", - "f1eef6bdc9e174a9cf2b8cbe045a8d", - "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d", - "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b", - "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b", - "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858" -).map(colors); - -var PuBu = ramp(scheme$e); - -var scheme$f = new Array(3).concat( - "e7e1efc994c7dd1c77", - "f1eef6d7b5d8df65b0ce1256", - "f1eef6d7b5d8df65b0dd1c77980043", - "f1eef6d4b9dac994c7df65b0dd1c77980043", - "f1eef6d4b9dac994c7df65b0e7298ace125691003f", - "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f", - "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f" -).map(colors); - -var PuRd = ramp(scheme$f); - -var scheme$g = new Array(3).concat( - "fde0ddfa9fb5c51b8a", - "feebe2fbb4b9f768a1ae017e", - "feebe2fbb4b9f768a1c51b8a7a0177", - "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177", - "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177", - "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177", - "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a" -).map(colors); - -var RdPu = ramp(scheme$g); - -var scheme$h = new Array(3).concat( - "edf8b17fcdbb2c7fb8", - "ffffcca1dab441b6c4225ea8", - "ffffcca1dab441b6c42c7fb8253494", - "ffffccc7e9b47fcdbb41b6c42c7fb8253494", - "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84", - "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84", - "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58" -).map(colors); - -var YlGnBu = ramp(scheme$h); - -var scheme$i = new Array(3).concat( - "f7fcb9addd8e31a354", - "ffffccc2e69978c679238443", - "ffffccc2e69978c67931a354006837", - "ffffccd9f0a3addd8e78c67931a354006837", - "ffffccd9f0a3addd8e78c67941ab5d238443005a32", - "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32", - "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529" -).map(colors); - -var YlGn = ramp(scheme$i); - -var scheme$j = new Array(3).concat( - "fff7bcfec44fd95f0e", - "ffffd4fed98efe9929cc4c02", - "ffffd4fed98efe9929d95f0e993404", - "ffffd4fee391fec44ffe9929d95f0e993404", - "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04", - "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04", - "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506" -).map(colors); - -var YlOrBr = ramp(scheme$j); - -var scheme$k = new Array(3).concat( - "ffeda0feb24cf03b20", - "ffffb2fecc5cfd8d3ce31a1c", - "ffffb2fecc5cfd8d3cf03b20bd0026", - "ffffb2fed976feb24cfd8d3cf03b20bd0026", - "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026", - "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026", - "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026" -).map(colors); - -var YlOrRd = ramp(scheme$k); - -var scheme$l = new Array(3).concat( - "deebf79ecae13182bd", - "eff3ffbdd7e76baed62171b5", - "eff3ffbdd7e76baed63182bd08519c", - "eff3ffc6dbef9ecae16baed63182bd08519c", - "eff3ffc6dbef9ecae16baed64292c62171b5084594", - "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594", - "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b" -).map(colors); - -var Blues = ramp(scheme$l); - -var scheme$m = new Array(3).concat( - "e5f5e0a1d99b31a354", - "edf8e9bae4b374c476238b45", - "edf8e9bae4b374c47631a354006d2c", - "edf8e9c7e9c0a1d99b74c47631a354006d2c", - "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32", - "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32", - "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b" -).map(colors); - -var Greens = ramp(scheme$m); - -var scheme$n = new Array(3).concat( - "f0f0f0bdbdbd636363", - "f7f7f7cccccc969696525252", - "f7f7f7cccccc969696636363252525", - "f7f7f7d9d9d9bdbdbd969696636363252525", - "f7f7f7d9d9d9bdbdbd969696737373525252252525", - "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525", - "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000" -).map(colors); - -var Greys = ramp(scheme$n); - -var scheme$o = new Array(3).concat( - "efedf5bcbddc756bb1", - "f2f0f7cbc9e29e9ac86a51a3", - "f2f0f7cbc9e29e9ac8756bb154278f", - "f2f0f7dadaebbcbddc9e9ac8756bb154278f", - "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486", - "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486", - "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d" -).map(colors); - -var Purples = ramp(scheme$o); - -var scheme$p = new Array(3).concat( - "fee0d2fc9272de2d26", - "fee5d9fcae91fb6a4acb181d", - "fee5d9fcae91fb6a4ade2d26a50f15", - "fee5d9fcbba1fc9272fb6a4ade2d26a50f15", - "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d", - "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d", - "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d" -).map(colors); - -var Reds = ramp(scheme$p); - -var scheme$q = new Array(3).concat( - "fee6cefdae6be6550d", - "feeddefdbe85fd8d3cd94701", - "feeddefdbe85fd8d3ce6550da63603", - "feeddefdd0a2fdae6bfd8d3ce6550da63603", - "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04", - "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04", - "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704" -).map(colors); - -var Oranges = ramp(scheme$q); - -function cividis(t) { - t = Math.max(0, Math.min(1, t)); - return "rgb(" - + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + ", " - + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + ", " - + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67))))))) - + ")"; -} - -var cubehelix = d3Interpolate.interpolateCubehelixLong(d3Color.cubehelix(300, 0.5, 0.0), d3Color.cubehelix(-240, 0.5, 1.0)); - -var warm = d3Interpolate.interpolateCubehelixLong(d3Color.cubehelix(-100, 0.75, 0.35), d3Color.cubehelix(80, 1.50, 0.8)); - -var cool = d3Interpolate.interpolateCubehelixLong(d3Color.cubehelix(260, 0.75, 0.35), d3Color.cubehelix(80, 1.50, 0.8)); - -var c = d3Color.cubehelix(); - -function rainbow(t) { - if (t < 0 || t > 1) t -= Math.floor(t); - var ts = Math.abs(t - 0.5); - c.h = 360 * t - 100; - c.s = 1.5 - 1.5 * ts; - c.l = 0.8 - 0.9 * ts; - return c + ""; -} - -var c$1 = d3Color.rgb(), - pi_1_3 = Math.PI / 3, - pi_2_3 = Math.PI * 2 / 3; - -function sinebow(t) { - var x; - t = (0.5 - t) * Math.PI; - c$1.r = 255 * (x = Math.sin(t)) * x; - c$1.g = 255 * (x = Math.sin(t + pi_1_3)) * x; - c$1.b = 255 * (x = Math.sin(t + pi_2_3)) * x; - return c$1 + ""; -} - -function turbo(t) { - t = Math.max(0, Math.min(1, t)); - return "rgb(" - + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + ", " - + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + ", " - + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66))))))) - + ")"; -} - -function ramp$1(range) { - var n = range.length; - return function(t) { - return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; - }; -} - -var viridis = ramp$1(colors("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")); - -var magma = ramp$1(colors("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")); - -var inferno = ramp$1(colors("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")); - -var plasma = ramp$1(colors("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")); - -exports.interpolateBlues = Blues; -exports.interpolateBrBG = BrBG; -exports.interpolateBuGn = BuGn; -exports.interpolateBuPu = BuPu; -exports.interpolateCividis = cividis; -exports.interpolateCool = cool; -exports.interpolateCubehelixDefault = cubehelix; -exports.interpolateGnBu = GnBu; -exports.interpolateGreens = Greens; -exports.interpolateGreys = Greys; -exports.interpolateInferno = inferno; -exports.interpolateMagma = magma; -exports.interpolateOrRd = OrRd; -exports.interpolateOranges = Oranges; -exports.interpolatePRGn = PRGn; -exports.interpolatePiYG = PiYG; -exports.interpolatePlasma = plasma; -exports.interpolatePuBu = PuBu; -exports.interpolatePuBuGn = PuBuGn; -exports.interpolatePuOr = PuOr; -exports.interpolatePuRd = PuRd; -exports.interpolatePurples = Purples; -exports.interpolateRainbow = rainbow; -exports.interpolateRdBu = RdBu; -exports.interpolateRdGy = RdGy; -exports.interpolateRdPu = RdPu; -exports.interpolateRdYlBu = RdYlBu; -exports.interpolateRdYlGn = RdYlGn; -exports.interpolateReds = Reds; -exports.interpolateSinebow = sinebow; -exports.interpolateSpectral = Spectral; -exports.interpolateTurbo = turbo; -exports.interpolateViridis = viridis; -exports.interpolateWarm = warm; -exports.interpolateYlGn = YlGn; -exports.interpolateYlGnBu = YlGnBu; -exports.interpolateYlOrBr = YlOrBr; -exports.interpolateYlOrRd = YlOrRd; -exports.schemeAccent = Accent; -exports.schemeBlues = scheme$l; -exports.schemeBrBG = scheme; -exports.schemeBuGn = scheme$9; -exports.schemeBuPu = scheme$a; -exports.schemeCategory10 = category10; -exports.schemeDark2 = Dark2; -exports.schemeGnBu = scheme$b; -exports.schemeGreens = scheme$m; -exports.schemeGreys = scheme$n; -exports.schemeOrRd = scheme$c; -exports.schemeOranges = scheme$q; -exports.schemePRGn = scheme$1; -exports.schemePaired = Paired; -exports.schemePastel1 = Pastel1; -exports.schemePastel2 = Pastel2; -exports.schemePiYG = scheme$2; -exports.schemePuBu = scheme$e; -exports.schemePuBuGn = scheme$d; -exports.schemePuOr = scheme$3; -exports.schemePuRd = scheme$f; -exports.schemePurples = scheme$o; -exports.schemeRdBu = scheme$4; -exports.schemeRdGy = scheme$5; -exports.schemeRdPu = scheme$g; -exports.schemeRdYlBu = scheme$6; -exports.schemeRdYlGn = scheme$7; -exports.schemeReds = scheme$p; -exports.schemeSet1 = Set1; -exports.schemeSet2 = Set2; -exports.schemeSet3 = Set3; -exports.schemeSpectral = scheme$8; -exports.schemeTableau10 = Tableau10; -exports.schemeYlGn = scheme$i; -exports.schemeYlGnBu = scheme$h; -exports.schemeYlOrBr = scheme$j; -exports.schemeYlOrRd = scheme$k; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-scale-chromatic/dist/d3-scale-chromatic.min.js b/node_modules/d3-scale-chromatic/dist/d3-scale-chromatic.min.js deleted file mode 100644 index 191130aff8561f3f10a4b6ed7a6787b25a3d1371..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/dist/d3-scale-chromatic.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-scale-chromatic/ v2.0.0 Copyright 2020 Mike Bostock -!function(f,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("d3-interpolate"),require("d3-color")):"function"==typeof define&&define.amd?define(["exports","d3-interpolate","d3-color"],e):e((f=f||self).d3=f.d3||{},f.d3,f.d3)}(this,function(f,e,d){"use strict";function a(f){for(var e=f.length/6|0,d=new Array(e),a=0;a<e;)d[a]="#"+f.slice(6*a,6*++a);return d}var c=a("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),b=a("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),t=a("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),n=a("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),r=a("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),o=a("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),i=a("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),l=a("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),m=a("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),h=a("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),p=f=>e.interpolateRgbBasis(f[f.length-1]),u=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(a),s=p(u),y=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(a),M=p(y),w=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(a),A=p(w),P=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(a),B=p(P),G=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(a),x=p(G),R=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(a),g=p(R),Y=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(a),O=p(Y),v=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(a),C=p(v),S=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(a),I=p(S),L=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(a),j=p(L),q=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(a),D=p(q),T=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(a),_=p(T),k=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(a),V=p(k),W=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(a),z=p(W),E=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(a),F=p(E),H=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(a),J=p(H),K=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(a),N=p(K),Q=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(a),U=p(Q),X=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(a),Z=p(X),$=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(a),ff=p($),ef=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(a),df=p(ef),af=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(a),cf=p(af),bf=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(a),tf=p(bf),nf=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(a),rf=p(nf),of=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(a),lf=p(of),mf=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(a),hf=p(mf),pf=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(a),uf=p(pf);var sf=e.interpolateCubehelixLong(d.cubehelix(300,.5,0),d.cubehelix(-240,.5,1)),yf=e.interpolateCubehelixLong(d.cubehelix(-100,.75,.35),d.cubehelix(80,1.5,.8)),Mf=e.interpolateCubehelixLong(d.cubehelix(260,.75,.35),d.cubehelix(80,1.5,.8)),wf=d.cubehelix();var Af=d.rgb(),Pf=Math.PI/3,Bf=2*Math.PI/3;function Gf(f){var e=f.length;return function(d){return f[Math.max(0,Math.min(e-1,Math.floor(d*e)))]}}var xf=Gf(a("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),Rf=Gf(a("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),gf=Gf(a("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Yf=Gf(a("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));f.interpolateBlues=cf,f.interpolateBrBG=s,f.interpolateBuGn=j,f.interpolateBuPu=D,f.interpolateCividis=function(f){return f=Math.max(0,Math.min(1,f)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-f*(35.34-f*(2381.73-f*(6402.7-f*(7024.72-2710.57*f)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+f*(170.73+f*(52.82-f*(131.46-f*(176.58-67.37*f)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+f*(442.36-f*(2482.43-f*(6167.24-f*(6614.94-2475.67*f)))))))+")"},f.interpolateCool=Mf,f.interpolateCubehelixDefault=sf,f.interpolateGnBu=_,f.interpolateGreens=tf,f.interpolateGreys=rf,f.interpolateInferno=gf,f.interpolateMagma=Rf,f.interpolateOrRd=V,f.interpolateOranges=uf,f.interpolatePRGn=M,f.interpolatePiYG=A,f.interpolatePlasma=Yf,f.interpolatePuBu=F,f.interpolatePuBuGn=z,f.interpolatePuOr=B,f.interpolatePuRd=J,f.interpolatePurples=lf,f.interpolateRainbow=function(f){(f<0||f>1)&&(f-=Math.floor(f));var e=Math.abs(f-.5);return wf.h=360*f-100,wf.s=1.5-1.5*e,wf.l=.8-.9*e,wf+""},f.interpolateRdBu=x,f.interpolateRdGy=g,f.interpolateRdPu=N,f.interpolateRdYlBu=O,f.interpolateRdYlGn=C,f.interpolateReds=hf,f.interpolateSinebow=function(f){var e;return f=(.5-f)*Math.PI,Af.r=255*(e=Math.sin(f))*e,Af.g=255*(e=Math.sin(f+Pf))*e,Af.b=255*(e=Math.sin(f+Bf))*e,Af+""},f.interpolateSpectral=I,f.interpolateTurbo=function(f){return f=Math.max(0,Math.min(1,f)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+f*(1172.33-f*(10793.56-f*(33300.12-f*(38394.49-14825.05*f)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+f*(557.33+f*(1225.33-f*(3574.96-f*(1073.77+707.56*f)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+f*(3211.1-f*(15327.97-f*(27814-f*(22569.18-6838.66*f)))))))+")"},f.interpolateViridis=xf,f.interpolateWarm=yf,f.interpolateYlGn=Z,f.interpolateYlGnBu=U,f.interpolateYlOrBr=ff,f.interpolateYlOrRd=df,f.schemeAccent=b,f.schemeBlues=af,f.schemeBrBG=u,f.schemeBuGn=L,f.schemeBuPu=q,f.schemeCategory10=c,f.schemeDark2=t,f.schemeGnBu=T,f.schemeGreens=bf,f.schemeGreys=nf,f.schemeOrRd=k,f.schemeOranges=pf,f.schemePRGn=y,f.schemePaired=n,f.schemePastel1=r,f.schemePastel2=o,f.schemePiYG=w,f.schemePuBu=E,f.schemePuBuGn=W,f.schemePuOr=P,f.schemePuRd=H,f.schemePurples=of,f.schemeRdBu=G,f.schemeRdGy=R,f.schemeRdPu=K,f.schemeRdYlBu=Y,f.schemeRdYlGn=v,f.schemeReds=mf,f.schemeSet1=i,f.schemeSet2=l,f.schemeSet3=m,f.schemeSpectral=S,f.schemeTableau10=h,f.schemeYlGn=X,f.schemeYlGnBu=Q,f.schemeYlOrBr=$,f.schemeYlOrRd=ef,Object.defineProperty(f,"__esModule",{value:!0})}); diff --git a/node_modules/d3-scale-chromatic/package.json b/node_modules/d3-scale-chromatic/package.json deleted file mode 100644 index 5cb0507beb14ab218e78997fcf5a4f5a0b58369a..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "d3-scale-chromatic@2", - "_id": "d3-scale-chromatic@2.0.0", - "_inBundle": false, - "_integrity": "sha512-LLqy7dJSL8yDy7NRmf6xSlsFZ6zYvJ4BcWFE4zBrOPnQERv9zj24ohnXKRbyi9YHnYV+HN1oEO3iFK971/gkzA==", - "_location": "/d3-scale-chromatic", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-scale-chromatic@2", - "name": "d3-scale-chromatic", - "escapedName": "d3-scale-chromatic", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3" - ], - "_resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-2.0.0.tgz", - "_shasum": "c13f3af86685ff91323dc2f0ebd2dabbd72d8bab", - "_spec": "d3-scale-chromatic@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-scale-chromatic/issues" - }, - "bundleDependencies": false, - "dependencies": { - "d3-color": "1 - 2", - "d3-interpolate": "1 - 2" - }, - "deprecated": false, - "description": "Sequential, diverging and categorical color schemes.", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-scale-chromatic/", - "jsdelivr": "dist/d3-scale-chromatic.min.js", - "keywords": [ - "d3", - "d3-module", - "color", - "scale", - "sequential", - "colorbrewer" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-scale-chromatic.js", - "module": "src/index.js", - "name": "d3-scale-chromatic", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-scale-chromatic.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src" - }, - "sideEffects": false, - "unpkg": "dist/d3-scale-chromatic.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-scale-chromatic/src/categorical/Accent.js b/node_modules/d3-scale-chromatic/src/categorical/Accent.js deleted file mode 100644 index 3a1a9fd448f76d51ea63771fb7957e94f4ae8093..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/categorical/Accent.js +++ /dev/null @@ -1,3 +0,0 @@ -import colors from "../colors.js"; - -export default colors("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"); diff --git a/node_modules/d3-scale-chromatic/src/categorical/Dark2.js b/node_modules/d3-scale-chromatic/src/categorical/Dark2.js deleted file mode 100644 index 1fe995da77a23c43a6d3b9f7e0bd34c3db56b44e..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/categorical/Dark2.js +++ /dev/null @@ -1,3 +0,0 @@ -import colors from "../colors.js"; - -export default colors("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"); diff --git a/node_modules/d3-scale-chromatic/src/categorical/Paired.js b/node_modules/d3-scale-chromatic/src/categorical/Paired.js deleted file mode 100644 index 831fba326060a05da5a5c9ea8af6ad2458997629..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/categorical/Paired.js +++ /dev/null @@ -1,3 +0,0 @@ -import colors from "../colors.js"; - -export default colors("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"); diff --git a/node_modules/d3-scale-chromatic/src/categorical/Pastel1.js b/node_modules/d3-scale-chromatic/src/categorical/Pastel1.js deleted file mode 100644 index d39c8034c416ad647fd91baf8d031821e42d4359..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/categorical/Pastel1.js +++ /dev/null @@ -1,3 +0,0 @@ -import colors from "../colors.js"; - -export default colors("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"); diff --git a/node_modules/d3-scale-chromatic/src/categorical/Pastel2.js b/node_modules/d3-scale-chromatic/src/categorical/Pastel2.js deleted file mode 100644 index 342e3ce35aab71a5908b03ef83346c6fc995b62f..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/categorical/Pastel2.js +++ /dev/null @@ -1,3 +0,0 @@ -import colors from "../colors.js"; - -export default colors("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"); diff --git a/node_modules/d3-scale-chromatic/src/categorical/Set1.js b/node_modules/d3-scale-chromatic/src/categorical/Set1.js deleted file mode 100644 index 408887bacdd674baec2a50160f0bd9d947e27cf4..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/categorical/Set1.js +++ /dev/null @@ -1,3 +0,0 @@ -import colors from "../colors.js"; - -export default colors("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"); diff --git a/node_modules/d3-scale-chromatic/src/categorical/Set2.js b/node_modules/d3-scale-chromatic/src/categorical/Set2.js deleted file mode 100644 index 9aa8030140e35dcb6884e1974f8f742f71991138..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/categorical/Set2.js +++ /dev/null @@ -1,3 +0,0 @@ -import colors from "../colors.js"; - -export default colors("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"); diff --git a/node_modules/d3-scale-chromatic/src/categorical/Set3.js b/node_modules/d3-scale-chromatic/src/categorical/Set3.js deleted file mode 100644 index d3b9b27dbc3d129c97c141961ccb083d2b46a11b..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/categorical/Set3.js +++ /dev/null @@ -1,3 +0,0 @@ -import colors from "../colors.js"; - -export default colors("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"); diff --git a/node_modules/d3-scale-chromatic/src/categorical/Tableau10.js b/node_modules/d3-scale-chromatic/src/categorical/Tableau10.js deleted file mode 100644 index 370c95020a634d8d14236b78ba1015db91593fed..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/categorical/Tableau10.js +++ /dev/null @@ -1,3 +0,0 @@ -import colors from "../colors.js"; - -export default colors("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"); diff --git a/node_modules/d3-scale-chromatic/src/categorical/category10.js b/node_modules/d3-scale-chromatic/src/categorical/category10.js deleted file mode 100644 index 9adcd019ec688ab7f1d734b0be8dd16ee49bcc31..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/categorical/category10.js +++ /dev/null @@ -1,3 +0,0 @@ -import colors from "../colors.js"; - -export default colors("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"); diff --git a/node_modules/d3-scale-chromatic/src/colors.js b/node_modules/d3-scale-chromatic/src/colors.js deleted file mode 100644 index aeedad53d18e1f6e8704e6560e98f01b2efbd5e5..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/colors.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(specifier) { - var n = specifier.length / 6 | 0, colors = new Array(n), i = 0; - while (i < n) colors[i] = "#" + specifier.slice(i * 6, ++i * 6); - return colors; -} diff --git a/node_modules/d3-scale-chromatic/src/diverging/BrBG.js b/node_modules/d3-scale-chromatic/src/diverging/BrBG.js deleted file mode 100644 index 6a467f7cabbd923b947bf25fbbb0678d9701d430..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/diverging/BrBG.js +++ /dev/null @@ -1,16 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "d8b365f5f5f55ab4ac", - "a6611adfc27d80cdc1018571", - "a6611adfc27df5f5f580cdc1018571", - "8c510ad8b365f6e8c3c7eae55ab4ac01665e", - "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e", - "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e", - "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e", - "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30", - "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/diverging/PRGn.js b/node_modules/d3-scale-chromatic/src/diverging/PRGn.js deleted file mode 100644 index dd278aa3142fd4b8dabca6ecec081da749081cd7..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/diverging/PRGn.js +++ /dev/null @@ -1,16 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "af8dc3f7f7f77fbf7b", - "7b3294c2a5cfa6dba0008837", - "7b3294c2a5cff7f7f7a6dba0008837", - "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837", - "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837", - "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837", - "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837", - "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b", - "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/diverging/PiYG.js b/node_modules/d3-scale-chromatic/src/diverging/PiYG.js deleted file mode 100644 index 43ef32d7332461240be86f00ad93280896cf8ebf..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/diverging/PiYG.js +++ /dev/null @@ -1,16 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "e9a3c9f7f7f7a1d76a", - "d01c8bf1b6dab8e1864dac26", - "d01c8bf1b6daf7f7f7b8e1864dac26", - "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221", - "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221", - "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221", - "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221", - "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419", - "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/diverging/PuOr.js b/node_modules/d3-scale-chromatic/src/diverging/PuOr.js deleted file mode 100644 index 770ef90f66d65986f49d4b416ea3db7db5f62ce5..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/diverging/PuOr.js +++ /dev/null @@ -1,16 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "998ec3f7f7f7f1a340", - "5e3c99b2abd2fdb863e66101", - "5e3c99b2abd2f7f7f7fdb863e66101", - "542788998ec3d8daebfee0b6f1a340b35806", - "542788998ec3d8daebf7f7f7fee0b6f1a340b35806", - "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806", - "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806", - "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08", - "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/diverging/RdBu.js b/node_modules/d3-scale-chromatic/src/diverging/RdBu.js deleted file mode 100644 index 703d61c5c7f3d88dac367781395ce01e85240cea..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/diverging/RdBu.js +++ /dev/null @@ -1,16 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "ef8a62f7f7f767a9cf", - "ca0020f4a58292c5de0571b0", - "ca0020f4a582f7f7f792c5de0571b0", - "b2182bef8a62fddbc7d1e5f067a9cf2166ac", - "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac", - "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac", - "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac", - "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061", - "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/diverging/RdGy.js b/node_modules/d3-scale-chromatic/src/diverging/RdGy.js deleted file mode 100644 index b4deb6a014b8a1f508902851f3de83f766e16f2e..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/diverging/RdGy.js +++ /dev/null @@ -1,16 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "ef8a62ffffff999999", - "ca0020f4a582bababa404040", - "ca0020f4a582ffffffbababa404040", - "b2182bef8a62fddbc7e0e0e09999994d4d4d", - "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d", - "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d", - "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d", - "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a", - "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js b/node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js deleted file mode 100644 index ad1a412879b528f1c01b982a29446fb34669056d..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/diverging/RdYlBu.js +++ /dev/null @@ -1,16 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "fc8d59ffffbf91bfdb", - "d7191cfdae61abd9e92c7bb6", - "d7191cfdae61ffffbfabd9e92c7bb6", - "d73027fc8d59fee090e0f3f891bfdb4575b4", - "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4", - "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4", - "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4", - "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695", - "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js b/node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js deleted file mode 100644 index 3cd897e155537c5648fa66d43f36c4cd174454b8..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/diverging/RdYlGn.js +++ /dev/null @@ -1,16 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "fc8d59ffffbf91cf60", - "d7191cfdae61a6d96a1a9641", - "d7191cfdae61ffffbfa6d96a1a9641", - "d73027fc8d59fee08bd9ef8b91cf601a9850", - "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850", - "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850", - "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850", - "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837", - "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/diverging/Spectral.js b/node_modules/d3-scale-chromatic/src/diverging/Spectral.js deleted file mode 100644 index cd1e1085fb0e2bb7f3f646abf05331465f19bf24..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/diverging/Spectral.js +++ /dev/null @@ -1,16 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "fc8d59ffffbf99d594", - "d7191cfdae61abdda42b83ba", - "d7191cfdae61ffffbfabdda42b83ba", - "d53e4ffc8d59fee08be6f59899d5943288bd", - "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd", - "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd", - "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd", - "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2", - "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/index.js b/node_modules/d3-scale-chromatic/src/index.js deleted file mode 100644 index 3170296bc608bd30fc88b4e3f7cb2936c33ba75d..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/index.js +++ /dev/null @@ -1,43 +0,0 @@ -export {default as schemeCategory10} from "./categorical/category10.js"; -export {default as schemeAccent} from "./categorical/Accent.js"; -export {default as schemeDark2} from "./categorical/Dark2.js"; -export {default as schemePaired} from "./categorical/Paired.js"; -export {default as schemePastel1} from "./categorical/Pastel1.js"; -export {default as schemePastel2} from "./categorical/Pastel2.js"; -export {default as schemeSet1} from "./categorical/Set1.js"; -export {default as schemeSet2} from "./categorical/Set2.js"; -export {default as schemeSet3} from "./categorical/Set3.js"; -export {default as schemeTableau10} from "./categorical/Tableau10.js"; -export {default as interpolateBrBG, scheme as schemeBrBG} from "./diverging/BrBG.js"; -export {default as interpolatePRGn, scheme as schemePRGn} from "./diverging/PRGn.js"; -export {default as interpolatePiYG, scheme as schemePiYG} from "./diverging/PiYG.js"; -export {default as interpolatePuOr, scheme as schemePuOr} from "./diverging/PuOr.js"; -export {default as interpolateRdBu, scheme as schemeRdBu} from "./diverging/RdBu.js"; -export {default as interpolateRdGy, scheme as schemeRdGy} from "./diverging/RdGy.js"; -export {default as interpolateRdYlBu, scheme as schemeRdYlBu} from "./diverging/RdYlBu.js"; -export {default as interpolateRdYlGn, scheme as schemeRdYlGn} from "./diverging/RdYlGn.js"; -export {default as interpolateSpectral, scheme as schemeSpectral} from "./diverging/Spectral.js"; -export {default as interpolateBuGn, scheme as schemeBuGn} from "./sequential-multi/BuGn.js"; -export {default as interpolateBuPu, scheme as schemeBuPu} from "./sequential-multi/BuPu.js"; -export {default as interpolateGnBu, scheme as schemeGnBu} from "./sequential-multi/GnBu.js"; -export {default as interpolateOrRd, scheme as schemeOrRd} from "./sequential-multi/OrRd.js"; -export {default as interpolatePuBuGn, scheme as schemePuBuGn} from "./sequential-multi/PuBuGn.js"; -export {default as interpolatePuBu, scheme as schemePuBu} from "./sequential-multi/PuBu.js"; -export {default as interpolatePuRd, scheme as schemePuRd} from "./sequential-multi/PuRd.js"; -export {default as interpolateRdPu, scheme as schemeRdPu} from "./sequential-multi/RdPu.js"; -export {default as interpolateYlGnBu, scheme as schemeYlGnBu} from "./sequential-multi/YlGnBu.js"; -export {default as interpolateYlGn, scheme as schemeYlGn} from "./sequential-multi/YlGn.js"; -export {default as interpolateYlOrBr, scheme as schemeYlOrBr} from "./sequential-multi/YlOrBr.js"; -export {default as interpolateYlOrRd, scheme as schemeYlOrRd} from "./sequential-multi/YlOrRd.js"; -export {default as interpolateBlues, scheme as schemeBlues} from "./sequential-single/Blues.js"; -export {default as interpolateGreens, scheme as schemeGreens} from "./sequential-single/Greens.js"; -export {default as interpolateGreys, scheme as schemeGreys} from "./sequential-single/Greys.js"; -export {default as interpolatePurples, scheme as schemePurples} from "./sequential-single/Purples.js"; -export {default as interpolateReds, scheme as schemeReds} from "./sequential-single/Reds.js"; -export {default as interpolateOranges, scheme as schemeOranges} from "./sequential-single/Oranges.js"; -export {default as interpolateCividis} from "./sequential-multi/cividis.js"; -export {default as interpolateCubehelixDefault} from "./sequential-multi/cubehelix.js"; -export {default as interpolateRainbow, warm as interpolateWarm, cool as interpolateCool} from "./sequential-multi/rainbow.js"; -export {default as interpolateSinebow} from "./sequential-multi/sinebow.js"; -export {default as interpolateTurbo} from "./sequential-multi/turbo.js"; -export {default as interpolateViridis, magma as interpolateMagma, inferno as interpolateInferno, plasma as interpolatePlasma} from "./sequential-multi/viridis.js"; diff --git a/node_modules/d3-scale-chromatic/src/ramp.js b/node_modules/d3-scale-chromatic/src/ramp.js deleted file mode 100644 index 14f4050816116094b67966701d2cab3d0aff7572..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/ramp.js +++ /dev/null @@ -1,3 +0,0 @@ -import {interpolateRgbBasis} from "d3-interpolate"; - -export default scheme => interpolateRgbBasis(scheme[scheme.length - 1]); diff --git a/node_modules/d3-scale-chromatic/src/rampClosed.js b/node_modules/d3-scale-chromatic/src/rampClosed.js deleted file mode 100644 index 217d5024c07744f779bb74af6378fdd7f311b548..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/rampClosed.js +++ /dev/null @@ -1,9 +0,0 @@ -import {scaleSequential} from "d3-scale"; -import {interpolateRgbBasisClosed} from "d3-interpolate"; -import colors from "./colors.js"; - -export default function(range) { - var s = scaleSequential(interpolateRgbBasisClosed(colors(range))).clamp(true); - delete s.clamp; - return s; -} diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js b/node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js deleted file mode 100644 index bfd4ff4a3313b801ea7a799cb53a7d1e67320e6c..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/BuGn.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "e5f5f999d8c92ca25f", - "edf8fbb2e2e266c2a4238b45", - "edf8fbb2e2e266c2a42ca25f006d2c", - "edf8fbccece699d8c966c2a42ca25f006d2c", - "edf8fbccece699d8c966c2a441ae76238b45005824", - "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824", - "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js b/node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js deleted file mode 100644 index 7b6b7cc8ce2cdd2d0ed6b6a9fca04dfe0b2edd81..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/BuPu.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "e0ecf49ebcda8856a7", - "edf8fbb3cde38c96c688419d", - "edf8fbb3cde38c96c68856a7810f7c", - "edf8fbbfd3e69ebcda8c96c68856a7810f7c", - "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b", - "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b", - "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js b/node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js deleted file mode 100644 index 0e1a31c69dcb9d7f11aa70e207be475e27bc49a5..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/GnBu.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "e0f3dba8ddb543a2ca", - "f0f9e8bae4bc7bccc42b8cbe", - "f0f9e8bae4bc7bccc443a2ca0868ac", - "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac", - "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e", - "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e", - "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js b/node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js deleted file mode 100644 index 6726f75b6cddadfc54971b5621f08b07ea627bfc..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/OrRd.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "fee8c8fdbb84e34a33", - "fef0d9fdcc8afc8d59d7301f", - "fef0d9fdcc8afc8d59e34a33b30000", - "fef0d9fdd49efdbb84fc8d59e34a33b30000", - "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000", - "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000", - "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js b/node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js deleted file mode 100644 index 4a632812b5fb8773a171e53a696b02f1f0065bc4..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/PuBu.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "ece7f2a6bddb2b8cbe", - "f1eef6bdc9e174a9cf0570b0", - "f1eef6bdc9e174a9cf2b8cbe045a8d", - "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d", - "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b", - "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b", - "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js b/node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js deleted file mode 100644 index 11a60d4cba48afd4dbcedcf356d9844ccce9a482..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/PuBuGn.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "ece2f0a6bddb1c9099", - "f6eff7bdc9e167a9cf02818a", - "f6eff7bdc9e167a9cf1c9099016c59", - "f6eff7d0d1e6a6bddb67a9cf1c9099016c59", - "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450", - "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450", - "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js b/node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js deleted file mode 100644 index 2d9e1435148066b77ff51db960c9f5841d46573a..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/PuRd.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "e7e1efc994c7dd1c77", - "f1eef6d7b5d8df65b0ce1256", - "f1eef6d7b5d8df65b0dd1c77980043", - "f1eef6d4b9dac994c7df65b0dd1c77980043", - "f1eef6d4b9dac994c7df65b0e7298ace125691003f", - "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f", - "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js b/node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js deleted file mode 100644 index 680a5b136daa29b48db2bb2c8c014957be4e005e..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/RdPu.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "fde0ddfa9fb5c51b8a", - "feebe2fbb4b9f768a1ae017e", - "feebe2fbb4b9f768a1c51b8a7a0177", - "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177", - "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177", - "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177", - "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js b/node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js deleted file mode 100644 index 883ce593263b62c428c23a2fc9148387cdf173a8..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/YlGn.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "f7fcb9addd8e31a354", - "ffffccc2e69978c679238443", - "ffffccc2e69978c67931a354006837", - "ffffccd9f0a3addd8e78c67931a354006837", - "ffffccd9f0a3addd8e78c67941ab5d238443005a32", - "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32", - "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js b/node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js deleted file mode 100644 index d002b3d5e79f7f82e81306420d7bcfb2135faf2f..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/YlGnBu.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "edf8b17fcdbb2c7fb8", - "ffffcca1dab441b6c4225ea8", - "ffffcca1dab441b6c42c7fb8253494", - "ffffccc7e9b47fcdbb41b6c42c7fb8253494", - "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84", - "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84", - "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js b/node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js deleted file mode 100644 index cb32c44abb98d3c388e999696939c1951cd661f0..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/YlOrBr.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "fff7bcfec44fd95f0e", - "ffffd4fed98efe9929cc4c02", - "ffffd4fed98efe9929d95f0e993404", - "ffffd4fee391fec44ffe9929d95f0e993404", - "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04", - "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04", - "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js b/node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js deleted file mode 100644 index 6c314bad7f01ebd0ab904086cb1f0782e7b45bc7..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/YlOrRd.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "ffeda0feb24cf03b20", - "ffffb2fecc5cfd8d3ce31a1c", - "ffffb2fecc5cfd8d3cf03b20bd0026", - "ffffb2fed976feb24cfd8d3cf03b20bd0026", - "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026", - "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026", - "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js b/node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js deleted file mode 100644 index 46da9aba01300b42d83ad02f474c72dbf2cd79b7..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/cividis.js +++ /dev/null @@ -1,8 +0,0 @@ -export default function(t) { - t = Math.max(0, Math.min(1, t)); - return "rgb(" - + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + ", " - + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + ", " - + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67))))))) - + ")"; -} diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js b/node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js deleted file mode 100644 index 7e9be127aec6f2c3a81ba6c3c6d860e7dcf62fe6..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/cubehelix.js +++ /dev/null @@ -1,4 +0,0 @@ -import {cubehelix} from "d3-color"; -import {interpolateCubehelixLong} from "d3-interpolate"; - -export default interpolateCubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0)); diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js b/node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js deleted file mode 100644 index b33cd35acccef562d04a5c20714f3f514845b14e..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/rainbow.js +++ /dev/null @@ -1,17 +0,0 @@ -import {cubehelix} from "d3-color"; -import {interpolateCubehelixLong} from "d3-interpolate"; - -export var warm = interpolateCubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8)); - -export var cool = interpolateCubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8)); - -var c = cubehelix(); - -export default function(t) { - if (t < 0 || t > 1) t -= Math.floor(t); - var ts = Math.abs(t - 0.5); - c.h = 360 * t - 100; - c.s = 1.5 - 1.5 * ts; - c.l = 0.8 - 0.9 * ts; - return c + ""; -} diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js b/node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js deleted file mode 100644 index 09eb2de941ecc04707285f5f59c7f76367b4ba22..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/sinebow.js +++ /dev/null @@ -1,14 +0,0 @@ -import {rgb} from "d3-color"; - -var c = rgb(), - pi_1_3 = Math.PI / 3, - pi_2_3 = Math.PI * 2 / 3; - -export default function(t) { - var x; - t = (0.5 - t) * Math.PI; - c.r = 255 * (x = Math.sin(t)) * x; - c.g = 255 * (x = Math.sin(t + pi_1_3)) * x; - c.b = 255 * (x = Math.sin(t + pi_2_3)) * x; - return c + ""; -} diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js b/node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js deleted file mode 100644 index 31ae8a444b4a03133f2282fa22e37e8535dbf884..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/turbo.js +++ /dev/null @@ -1,8 +0,0 @@ -export default function(t) { - t = Math.max(0, Math.min(1, t)); - return "rgb(" - + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + ", " - + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + ", " - + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66))))))) - + ")"; -} diff --git a/node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js b/node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js deleted file mode 100644 index 2eeb758ffb5484a3bcddabf549e1aa898176fdae..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-multi/viridis.js +++ /dev/null @@ -1,16 +0,0 @@ -import colors from "../colors.js"; - -function ramp(range) { - var n = range.length; - return function(t) { - return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; - }; -} - -export default ramp(colors("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")); - -export var magma = ramp(colors("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")); - -export var inferno = ramp(colors("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")); - -export var plasma = ramp(colors("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")); diff --git a/node_modules/d3-scale-chromatic/src/sequential-single/Blues.js b/node_modules/d3-scale-chromatic/src/sequential-single/Blues.js deleted file mode 100644 index 7acfdd319a3884467233b4ac245b2252092f1c68..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-single/Blues.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "deebf79ecae13182bd", - "eff3ffbdd7e76baed62171b5", - "eff3ffbdd7e76baed63182bd08519c", - "eff3ffc6dbef9ecae16baed63182bd08519c", - "eff3ffc6dbef9ecae16baed64292c62171b5084594", - "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594", - "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-single/Greens.js b/node_modules/d3-scale-chromatic/src/sequential-single/Greens.js deleted file mode 100644 index 48eb102e796ba5fe301802fcfacfac85214ef7a3..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-single/Greens.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "e5f5e0a1d99b31a354", - "edf8e9bae4b374c476238b45", - "edf8e9bae4b374c47631a354006d2c", - "edf8e9c7e9c0a1d99b74c47631a354006d2c", - "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32", - "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32", - "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-single/Greys.js b/node_modules/d3-scale-chromatic/src/sequential-single/Greys.js deleted file mode 100644 index 315ca0a17d02ed693fc04faf482d9b35f94d6eda..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-single/Greys.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "f0f0f0bdbdbd636363", - "f7f7f7cccccc969696525252", - "f7f7f7cccccc969696636363252525", - "f7f7f7d9d9d9bdbdbd969696636363252525", - "f7f7f7d9d9d9bdbdbd969696737373525252252525", - "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525", - "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js b/node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js deleted file mode 100644 index 392bf233888d6616276007a4580cab42c4912d9f..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-single/Oranges.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "fee6cefdae6be6550d", - "feeddefdbe85fd8d3cd94701", - "feeddefdbe85fd8d3ce6550da63603", - "feeddefdd0a2fdae6bfd8d3ce6550da63603", - "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04", - "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04", - "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-single/Purples.js b/node_modules/d3-scale-chromatic/src/sequential-single/Purples.js deleted file mode 100644 index f4b22a5a9fad8abc64cc6bcb61c25de68c5336e4..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-single/Purples.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "efedf5bcbddc756bb1", - "f2f0f7cbc9e29e9ac86a51a3", - "f2f0f7cbc9e29e9ac8756bb154278f", - "f2f0f7dadaebbcbddc9e9ac8756bb154278f", - "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486", - "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486", - "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale-chromatic/src/sequential-single/Reds.js b/node_modules/d3-scale-chromatic/src/sequential-single/Reds.js deleted file mode 100644 index 35a048fa36dcf72b2369f878e3f30b6759a5c458..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale-chromatic/src/sequential-single/Reds.js +++ /dev/null @@ -1,14 +0,0 @@ -import colors from "../colors.js"; -import ramp from "../ramp.js"; - -export var scheme = new Array(3).concat( - "fee0d2fc9272de2d26", - "fee5d9fcae91fb6a4acb181d", - "fee5d9fcae91fb6a4ade2d26a50f15", - "fee5d9fcbba1fc9272fb6a4ade2d26a50f15", - "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d", - "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d", - "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d" -).map(colors); - -export default ramp(scheme); diff --git a/node_modules/d3-scale/LICENSE b/node_modules/d3-scale/LICENSE deleted file mode 100644 index 4f0b022ceefd39f1f270bce414220b2aa51faff5..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2015 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-scale/README.md b/node_modules/d3-scale/README.md deleted file mode 100644 index 45eb09936d7c6c1fa7bf3c6b0843cbdee65d12fe..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/README.md +++ /dev/null @@ -1,991 +0,0 @@ -# d3-scale - -Scales are a convenient abstraction for a fundamental task in visualization: mapping a dimension of abstract data to a visual representation. Although most often used for position-encoding quantitative data, such as mapping a measurement in meters to a position in pixels for dots in a scatterplot, scales can represent virtually any visual encoding, such as diverging colors, stroke widths, or symbol size. Scales can also be used with virtually any type of data, such as named categorical data or discrete data that requires sensible breaks. - -For [continuous](#continuous-scales) quantitative data, you typically want a [linear scale](#linear-scales). (For time series data, a [time scale](#time-scales).) If the distribution calls for it, consider transforming data using a [power](#power-scales) or [log](#log-scales) scale. A [quantize scale](#quantize-scales) may aid differentiation by rounding continuous data to a fixed set of discrete values; similarly, a [quantile scale](#quantile-scales) computes quantiles from a sample population, and a [threshold scale](#threshold-scales) allows you to specify arbitrary breaks in continuous data. - -For discrete ordinal (ordered) or categorical (unordered) data, an [ordinal scale](#ordinal-scales) specifies an explicit mapping from a set of data values to a corresponding set of visual attributes (such as colors). The related [band](#band-scales) and [point](#point-scales) scales are useful for position-encoding ordinal data, such as bars in a bar chart or dots in an categorical scatterplot. - -This repository does not provide color schemes; see [d3-scale-chromatic](https://github.com/d3/d3-scale-chromatic) for color schemes designed to work with d3-scale. - -Scales have no intrinsic visual representation. However, most scales can [generate](#continuous_ticks) and [format](#continuous_tickFormat) ticks for reference marks to aid in the construction of axes. - -For a longer introduction, see these recommended tutorials: - -* [Introducing d3-scale](https://medium.com/@mbostock/introducing-d3-scale-61980c51545f) by Mike Bostock - -* Chapter 7. Scales of [*Interactive Data Visualization for the Web*](http://alignedleft.com/work/d3-book) by Scott Murray - -* [d3: scales, and color.](http://www.jeromecukier.net/2011/08/11/d3-scales-and-color/) by Jérôme Cukier - -## Installing - -If you use NPM, `npm install d3-scale`. Otherwise, download the [latest release](https://github.com/d3/d3-scale/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-scale.v3.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-array.v2.min.js"></script> -<script src="https://d3js.org/d3-color.v2.min.js"></script> -<script src="https://d3js.org/d3-format.v2.min.js"></script> -<script src="https://d3js.org/d3-interpolate.v2.min.js"></script> -<script src="https://d3js.org/d3-time.v2.min.js"></script> -<script src="https://d3js.org/d3-time-format.v3.min.js"></script> -<script src="https://d3js.org/d3-scale.v3.min.js"></script> -<script> - -var x = d3.scaleLinear(); - -</script> -``` - -(You can omit d3-time and d3-time-format if you’re not using [d3.scaleTime](#scaleTime) or [d3.scaleUtc](#scaleUtc).) - -## API Reference - -* [Continuous](#continuous-scales) ([Linear](#linear-scales), [Power](#power-scales), [Log](#log-scales), [Identity](#identity-scales), [Time](#time-scales), [Radial](#radial-scales)) -* [Sequential](#sequential-scales) -* [Diverging](#diverging-scales) -* [Quantize](#quantize-scales) -* [Quantile](#quantile-scales) -* [Threshold](#threshold-scales) -* [Ordinal](#ordinal-scales) ([Band](#band-scales), [Point](#point-scales)) - -### Continuous Scales - -Continuous scales map a continuous, quantitative input [domain](#continuous_domain) to a continuous output [range](#continuous_range). If the range is also numeric, the mapping may be [inverted](#continuous_invert). A continuous scale is not constructed directly; instead, try a [linear](#linear-scales), [power](#power-scales), [log](#log-scales), [identity](#identity-scales), [radial](#radial-scales), [time](#time-scales) or [sequential color](#sequential-scales) scale. - -<a name="_continuous" href="#_continuous">#</a> <i>continuous</i>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/continuous.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -Given a *value* from the [domain](#continuous_domain), returns the corresponding value from the [range](#continuous_range). If the given *value* is outside the domain, and [clamping](#continuous_clamp) is not enabled, the mapping may be extrapolated such that the returned value is outside the range. For example, to apply a position encoding: - -```js -var x = d3.scaleLinear() - .domain([10, 130]) - .range([0, 960]); - -x(20); // 80 -x(50); // 320 -``` - -Or to apply a color encoding: - -```js -var color = d3.scaleLinear() - .domain([10, 100]) - .range(["brown", "steelblue"]); - -color(20); // "#9a3439" -color(50); // "#7b5167" -``` - -Or, in shorthand: - -```js -var x = d3.scaleLinear([10, 130], [0, 960]); -var color = d3.scaleLinear([10, 100], ["brown", "steelblue"]); -``` - -<a name="continuous_invert" href="#continuous_invert">#</a> <i>continuous</i>.<b>invert</b>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/continuous.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -Given a *value* from the [range](#continuous_range), returns the corresponding value from the [domain](#continuous_domain). Inversion is useful for interaction, say to determine the data value corresponding to the position of the mouse. For example, to invert a position encoding: - -```js -var x = d3.scaleLinear() - .domain([10, 130]) - .range([0, 960]); - -x.invert(80); // 20 -x.invert(320); // 50 -``` - -If the given *value* is outside the range, and [clamping](#continuous_clamp) is not enabled, the mapping may be extrapolated such that the returned value is outside the domain. This method is only supported if the range is numeric. If the range is not numeric, returns NaN. - -For a valid value *y* in the range, <i>continuous</i>(<i>continuous</i>.invert(<i>y</i>)) approximately equals *y*; similarly, for a valid value *x* in the domain, <i>continuous</i>.invert(<i>continuous</i>(<i>x</i>)) approximately equals *x*. The scale and its inverse may not be exact due to the limitations of floating point precision. - -<a name="continuous_domain" href="#continuous_domain">#</a> <i>continuous</i>.<b>domain</b>([<i>domain</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/continuous.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -If *domain* is specified, sets the scale’s domain to the specified array of numbers. The array must contain two or more elements. If the elements in the given array are not numbers, they will be coerced to numbers. If *domain* is not specified, returns a copy of the scale’s current domain. - -Although continuous scales typically have two values each in their domain and range, specifying more than two values produces a piecewise scale. For example, to create a [diverging color scale](#diverging-scales) that interpolates between white and red for negative values, and white and green for positive values, say: - -```js -var color = d3.scaleLinear() - .domain([-1, 0, 1]) - .range(["red", "white", "green"]); - -color(-0.5); // "rgb(255, 128, 128)" -color(+0.5); // "rgb(128, 192, 128)" -``` - -Internally, a piecewise scale performs a [binary search](https://github.com/d3/d3-array/blob/master/README.md#bisect) for the range interpolator corresponding to the given domain value. Thus, the domain must be in ascending or descending order. If the domain and range have different lengths *N* and *M*, only the first *min(N,M)* elements in each are observed. - -<a name="continuous_range" href="#continuous_range">#</a> <i>continuous</i>.<b>range</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/continuous.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -If *range* is specified, sets the scale’s range to the specified array of values. The array must contain two or more elements. Unlike the [domain](#continuous_domain), elements in the given array need not be numbers; any value that is supported by the underlying [interpolator](#continuous_interpolate) will work, though note that numeric ranges are required for [invert](#continuous_invert). If *range* is not specified, returns a copy of the scale’s current range. See [*continuous*.interpolate](#continuous_interpolate) for more examples. - -<a name="continuous_rangeRound" href="#continuous_rangeRound">#</a> <i>continuous</i>.<b>rangeRound</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/continuous.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -Sets the scale’s [*range*](#continuous_range) to the specified array of values while also setting the scale’s [interpolator](#continuous_interpolate) to [interpolateRound](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateRound). This is a convenience method equivalent to: - -```js -continuous - .range(range) - .interpolate(d3.interpolateRound); -``` - -The rounding interpolator is sometimes useful for avoiding antialiasing artifacts, though also consider the [shape-rendering](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering) “crispEdges†styles. Note that this interpolator can only be used with numeric ranges. - -<a name="continuous_clamp" href="#continuous_clamp">#</a> <i>continuous</i>.<b>clamp</b>(<i>clamp</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/continuous.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -If *clamp* is specified, enables or disables clamping accordingly. If clamping is disabled and the scale is passed a value outside the [domain](#continuous_domain), the scale may return a value outside the [range](#continuous_range) through extrapolation. If clamping is enabled, the return value of the scale is always within the scale’s range. Clamping similarly applies to [*continuous*.invert](#continuous_invert). For example: - -```js -var x = d3.scaleLinear() - .domain([10, 130]) - .range([0, 960]); - -x(-10); // -160, outside range -x.invert(-160); // -10, outside domain - -x.clamp(true); -x(-10); // 0, clamped to range -x.invert(-160); // 10, clamped to domain -``` - -If *clamp* is not specified, returns whether or not the scale currently clamps values to within the range. - -<a name="continuous_unknown" href="#continuous_unknown">#</a> <i>continuous</i>.<b>unknown</b>([<i>value</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/continuous.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -If *value* is specified, sets the output value of the scale for undefined (or NaN) input values and returns this scale. If *value* is not specified, returns the current unknown value, which defaults to undefined. - -<a name="continuous_interpolate" href="#continuous_interpolate">#</a> <i>continuous</i>.<b>interpolate</b>(<i>interpolate</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/continuous.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -If *interpolate* is specified, sets the scale’s [range](#continuous_range) interpolator factory. This interpolator factory is used to create interpolators for each adjacent pair of values from the range; these interpolators then map a normalized domain parameter *t* in [0, 1] to the corresponding value in the range. If *factory* is not specified, returns the scale’s current interpolator factory, which defaults to [d3.interpolate](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolate). See [d3-interpolate](https://github.com/d3/d3-interpolate) for more interpolators. - -For example, consider a diverging color scale with three colors in the range: - -```js -var color = d3.scaleLinear() - .domain([-100, 0, +100]) - .range(["red", "white", "green"]); -``` - -Two interpolators are created internally by the scale, equivalent to: - -```js -var i0 = d3.interpolate("red", "white"), - i1 = d3.interpolate("white", "green"); -``` - -A common reason to specify a custom interpolator is to change the color space of interpolation. For example, to use [HCL](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateHcl): - -```js -var color = d3.scaleLinear() - .domain([10, 100]) - .range(["brown", "steelblue"]) - .interpolate(d3.interpolateHcl); -``` - -Or for [Cubehelix](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateCubehelix) with a custom gamma: - -```js -var color = d3.scaleLinear() - .domain([10, 100]) - .range(["brown", "steelblue"]) - .interpolate(d3.interpolateCubehelix.gamma(3)); -``` - -Note: the [default interpolator](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolate) **may reuse return values**. For example, if the range values are objects, then the value interpolator always returns the same object, modifying it in-place. If the scale is used to set an attribute or style, this is typically acceptable (and desirable for performance); however, if you need to store the scale’s return value, you must specify your own interpolator or make a copy as appropriate. - -<a name="continuous_ticks" href="#continuous_ticks">#</a> <i>continuous</i>.<b>ticks</b>([<i>count</i>]) - -Returns approximately *count* representative values from the scale’s [domain](#continuous_domain). If *count* is not specified, it defaults to 10. The returned tick values are uniformly spaced, have human-readable values (such as multiples of powers of 10), and are guaranteed to be within the extent of the domain. Ticks are often used to display reference lines, or tick marks, in conjunction with the visualized data. The specified *count* is only a hint; the scale may return more or fewer values depending on the domain. See also d3-array’s [ticks](https://github.com/d3/d3-array/blob/master/README.md#ticks). - -<a name="continuous_tickFormat" href="#continuous_tickFormat">#</a> <i>continuous</i>.<b>tickFormat</b>([<i>count</i>[, <i>specifier</i>]]) · [Source](https://github.com/d3/d3-scale/blob/master/src/tickFormat.js), [Examples](https://observablehq.com/@d3/scale-ticks) - -Returns a [number format](https://github.com/d3/d3-format) function suitable for displaying a tick value, automatically computing the appropriate precision based on the fixed interval between tick values. The specified *count* should have the same value as the count that is used to generate the [tick values](#continuous_ticks). - -An optional *specifier* allows a [custom format](https://github.com/d3/d3-format/blob/master/README.md#locale_format) where the precision of the format is automatically set by the scale as appropriate for the tick interval. For example, to format percentage change, you might say: - -```js -var x = d3.scaleLinear() - .domain([-1, 1]) - .range([0, 960]); - -var ticks = x.ticks(5), - tickFormat = x.tickFormat(5, "+%"); - -ticks.map(tickFormat); // ["-100%", "-50%", "+0%", "+50%", "+100%"] -``` - -If *specifier* uses the format type `s`, the scale will return a [SI-prefix format](https://github.com/d3/d3-format/blob/master/README.md#locale_formatPrefix) based on the largest value in the domain. If the *specifier* already specifies a precision, this method is equivalent to [*locale*.format](https://github.com/d3/d3-format/blob/master/README.md#locale_format). - -See also [d3.tickFormat](#tickFormat). - -<a name="continuous_nice" href="#continuous_nice">#</a> <i>continuous</i>.<b>nice</b>([<i>count</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/nice.js), [Examples](https://observablehq.com/@d3/d3-scalelinear) - -Extends the [domain](#continuous_domain) so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. An optional tick *count* argument allows greater control over the step size used to extend the bounds, guaranteeing that the returned [ticks](#continuous_ticks) will exactly cover the domain. Nicing is useful if the domain is computed from data, say using [extent](https://github.com/d3/d3-array/blob/master/README.md#extent), and may be irregular. For example, for a domain of [0.201479…, 0.996679…], a nice domain might be [0.2, 1.0]. If the domain has more than two values, nicing the domain only affects the first and last value. See also d3-array’s [tickStep](https://github.com/d3/d3-array/blob/master/README.md#tickStep). - -Nicing a scale only modifies the current domain; it does not automatically nice domains that are subsequently set using [*continuous*.domain](#continuous_domain). You must re-nice the scale after setting the new domain, if desired. - -<a name="continuous_copy" href="#continuous_copy">#</a> <i>continuous</i>.<b>copy</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/continuous.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. - -<a name="tickFormat" href="#tickFormat">#</a> d3.<b>tickFormat</b>(<i>start</i>, <i>stop</i>, <i>count</i>[, <i>specifier</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/tickFormat.js), [Examples](https://observablehq.com/@d3/scale-ticks) - -Returns a [number format](https://github.com/d3/d3-format) function suitable for displaying a tick value, automatically computing the appropriate precision based on the fixed interval between tick values, as determined by [d3.tickStep](https://github.com/d3/d3-array/blob/master/README.md#tickStep). - -An optional *specifier* allows a [custom format](https://github.com/d3/d3-format/blob/master/README.md#locale_format) where the precision of the format is automatically set by the scale as appropriate for the tick interval. For example, to format percentage change, you might say: - -```js -var tickFormat = d3.tickFormat(-1, 1, 5, "+%"); - -tickFormat(-0.5); // "-50%" -``` - -If *specifier* uses the format type `s`, the scale will return a [SI-prefix format](https://github.com/d3/d3-format/blob/master/README.md#locale_formatPrefix) based on the larger absolute value of *start* and *stop*. If the *specifier* already specifies a precision, this method is equivalent to [*locale*.format](https://github.com/d3/d3-format/blob/master/README.md#locale_format). - -#### Linear Scales - -<a name="scaleLinear" href="#scaleLinear">#</a> d3.<b>scaleLinear</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/linear.js), [Examples](https://observablehq.com/@d3/d3-scalelinear) - -Constructs a new [continuous scale](#continuous-scales) with the specified [domain](#continuous_domain) and [range](#continuous_range), the [default](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolate) [interpolator](#continuous_interpolate) and [clamping](#continuous_clamp) disabled. If either *domain* or *range* are not specified, each defaults to [0, 1]. Linear scales are a good default choice for continuous quantitative data because they preserve proportional differences. Each range value *y* can be expressed as a function of the domain value *x*: *y* = *mx* + *b*. - -#### Power Scales - -Power scales are similar to [linear scales](#linear-scales), except an exponential transform is applied to the input domain value before the output range value is computed. Each range value *y* can be expressed as a function of the domain value *x*: *y* = *mx^k* + *b*, where *k* is the [exponent](#pow_exponent) value. Power scales also support negative domain values, in which case the input value and the resulting output value are multiplied by -1. - -<a name="scalePow" href="#scalePow">#</a> d3.<b>scalePow</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/pow.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -Constructs a new [continuous scale](#continuous-scales) with the specified [domain](#continuous_domain) and [range](#continuous_range), the [exponent](#pow_exponent) 1, the [default](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolate) [interpolator](#continuous_interpolate) and [clamping](#continuous_clamp) disabled. If either *domain* or *range* are not specified, each defaults to [0, 1]. (Note that this is effectively a [linear](#linear-scales) scale until you set a different exponent.) - -<a name="_pow" href="#_pow">#</a> <i>pow</i>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/pow.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*](#_continuous). - -<a name="pow_invert" href="#pow_invert">#</a> <i>pow</i>.<b>invert</b>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/pow.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*.invert](#continuous_invert). - -<a name="pow_exponent" href="#pow_exponent">#</a> <i>pow</i>.<b>exponent</b>([<i>exponent</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/pow.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -If *exponent* is specified, sets the current exponent to the given numeric value. If *exponent* is not specified, returns the current exponent, which defaults to 1. (Note that this is effectively a [linear](#linear-scales) scale until you set a different exponent.) - -<a name="pow_domain" href="#pow_domain">#</a> <i>pow</i>.<b>domain</b>([<i>domain</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/pow.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*.domain](#continuous_domain). - -<a name="pow_range" href="#pow_range">#</a> <i>pow</i>.<b>range</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/pow.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*.range](#continuous_range). - -<a name="pow_rangeRound" href="#pow_rangeRound">#</a> <i>pow</i>.<b>rangeRound</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/pow.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*.rangeRound](#continuous_rangeRound). - -<a name="pow_clamp" href="#pow_clamp">#</a> <i>pow</i>.<b>clamp</b>(<i>clamp</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/pow.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*.clamp](#continuous_clamp). - -<a name="pow_interpolate" href="#pow_interpolate">#</a> <i>pow</i>.<b>interpolate</b>(<i>interpolate</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/pow.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*.interpolate](#continuous_interpolate). - -<a name="pow_ticks" href="#pow_ticks">#</a> <i>pow</i>.<b>ticks</b>([<i>count</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/pow.js), [Examples](https://observablehq.com/@d3/scale-ticks) - -See [*continuous*.ticks](#continuous_ticks). - -<a name="pow_tickFormat" href="#pow_tickFormat">#</a> <i>pow</i>.<b>tickFormat</b>([<i>count</i>[, <i>specifier</i>]]) · [Source](https://github.com/d3/d3-scale/blob/master/src/pow.js), [Examples](https://observablehq.com/@d3/scale-ticks) - -See [*continuous*.tickFormat](#continuous_tickFormat). - -<a name="pow_nice" href="#pow_nice">#</a> <i>pow</i>.<b>nice</b>([<i>count</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/pow.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*.nice](#continuous_nice). - -<a name="pow_copy" href="#pow_copy">#</a> <i>pow</i>.<b>copy</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/pow.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*.copy](#continuous_copy). - -<a name="scaleSqrt" href="#scaleSqrt">#</a> d3.<b>scaleSqrt</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/pow.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -Constructs a new [continuous](#continuous-scales) [power scale](#power-scales) with the specified [domain](#continuous_domain) and [range](#continuous_range), the [exponent](#pow_exponent) 0.5, the [default](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolate) [interpolator](#continuous_interpolate) and [clamping](#continuous_clamp) disabled. If either *domain* or *range* are not specified, each defaults to [0, 1]. This is a convenience method equivalent to `d3.scalePow(…).exponent(0.5)`. - -#### Log Scales - -Log scales are similar to [linear scales](#linear-scales), except a logarithmic transform is applied to the input domain value before the output range value is computed. The mapping to the range value *y* can be expressed as a function of the domain value *x*: *y* = *m* log(<i>x</i>) + *b*. - -As log(0) = -∞, a log scale domain must be **strictly-positive or strictly-negative**; the domain must not include or cross zero. A log scale with a positive domain has a well-defined behavior for positive values, and a log scale with a negative domain has a well-defined behavior for negative values. (For a negative domain, input and output values are implicitly multiplied by -1.) The behavior of the scale is undefined if you pass a negative value to a log scale with a positive domain or vice versa. - -<a name="scaleLog" href="#scaleLog">#</a> d3.<b>scaleLog</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/log.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -Constructs a new [continuous scale](#continuous-scales) with the specified [domain](#log_domain) and [range](#log_range), the [base](#log_base) 10, the [default](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolate) [interpolator](#log_interpolate) and [clamping](#log_clamp) disabled. If *domain* is not specified, it defaults to [1, 10]. If *range* is not specified, it defaults to [0, 1]. - -<a name="_log" href="#_log">#</a> <i>log</i>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/log.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*](#_continuous). - -<a name="log_invert" href="#log_invert">#</a> <i>log</i>.<b>invert</b>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/log.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*.invert](#continuous_invert). - -<a name="log_base" href="#log_base">#</a> <i>log</i>.<b>base</b>([<i>base</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/log.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -If *base* is specified, sets the base for this logarithmic scale to the specified value. If *base* is not specified, returns the current base, which defaults to 10. - -<a name="log_domain" href="#log_domain">#</a> <i>log</i>.<b>domain</b>([<i>domain</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/log.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*.domain](#continuous_domain). - -<a name="log_range" href="#log_range">#</a> <i>log</i>.<b>range</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/continuous.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*.range](#continuous_range). - -<a name="log_rangeRound" href="#log_rangeRound">#</a> <i>log</i>.<b>rangeRound</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/log.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*.rangeRound](#continuous_rangeRound). - -<a name="log_clamp" href="#log_clamp">#</a> <i>log</i>.<b>clamp</b>(<i>clamp</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/log.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*.clamp](#continuous_clamp). - -<a name="log_interpolate" href="#log_interpolate">#</a> <i>log</i>.<b>interpolate</b>(<i>interpolate</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/log.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*.interpolate](#continuous_interpolate). - -<a name="log_ticks" href="#log_ticks">#</a> <i>log</i>.<b>ticks</b>([<i>count</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/log.js), [Examples](https://observablehq.com/@d3/scale-ticks) - -Like [*continuous*.ticks](#continuous_ticks), but customized for a log scale. If the [base](#log_base) is an integer, the returned ticks are uniformly spaced within each integer power of base; otherwise, one tick per power of base is returned. The returned ticks are guaranteed to be within the extent of the domain. If the orders of magnitude in the [domain](#log_domain) is greater than *count*, then at most one tick per power is returned. Otherwise, the tick values are unfiltered, but note that you can use [*log*.tickFormat](#log_tickFormat) to filter the display of tick labels. If *count* is not specified, it defaults to 10. - -<a name="log_tickFormat" href="#log_tickFormat">#</a> <i>log</i>.<b>tickFormat</b>([<i>count</i>[, <i>specifier</i>]]) · [Source](https://github.com/d3/d3-scale/blob/master/src/log.js), [Examples](https://observablehq.com/@d3/scale-ticks) - -Like [*continuous*.tickFormat](#continuous_tickFormat), but customized for a log scale. The specified *count* typically has the same value as the count that is used to generate the [tick values](#continuous_ticks). If there are too many ticks, the formatter may return the empty string for some of the tick labels; however, note that the ticks are still shown. To disable filtering, specify a *count* of Infinity. When specifying a count, you may also provide a format *specifier* or format function. For example, to get a tick formatter that will display 20 ticks of a currency, say `log.tickFormat(20, "$,f")`. If the specifier does not have a defined precision, the precision will be set automatically by the scale, returning the appropriate format. This provides a convenient way of specifying a format whose precision will be automatically set by the scale. - -<a name="log_nice" href="#log_nice">#</a> <i>log</i>.<b>nice</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/log.js), [Examples](https://observablehq.com/@d3/d3-scalelinear) - -Like [*continuous*.nice](#continuous_nice), except extends the domain to integer powers of [base](#log_base). For example, for a domain of [0.201479…, 0.996679…], and base 10, the nice domain is [0.1, 1]. If the domain has more than two values, nicing the domain only affects the first and last value. - -<a name="log_copy" href="#log_copy">#</a> <i>log</i>.<b>copy</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/log.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -See [*continuous*.copy](#continuous_copy). - -#### Symlog Scales - -See [A bi-symmetric log transformation for wide-range data](https://www.researchgate.net/profile/John_Webber4/publication/233967063_A_bi-symmetric_log_transformation_for_wide-range_data/links/0fcfd50d791c85082e000000.pdf) by Webber for more. - -<a name="scaleSymlog" href="#scaleSymlog">#</a> d3.<b>scaleSymlog</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/symlog.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -Constructs a new [continuous scale](#continuous-scales) with the specified [domain](#continuous_domain) and [range](#continuous_range), the [constant](#symlog_constant) 1, the [default](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolate) [interpolator](#continuous_interpolate) and [clamping](#continuous_clamp) disabled. If *domain* is not specified, it defaults to [0, 1]. If *range* is not specified, it defaults to [0, 1]. - -<a name="symlog_constant" href="#symlog_constant">#</a> <i>symlog</i>.<b>constant</b>([<i>constant</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/symlog.js), [Examples](https://observablehq.com/@d3/continuous-scales) - -If *constant* is specified, sets the symlog constant to the specified number and returns this scale; otherwise returns the current value of the symlog constant, which defaults to 1. See “A bi-symmetric log transformation for wide-range data†by Webber for more. - -#### Identity Scales - -Identity scales are a special case of [linear scales](#linear-scales) where the domain and range are identical; the scale and its invert method are thus the identity function. These scales are occasionally useful when working with pixel coordinates, say in conjunction with an axis. Identity scales do not support [rangeRound](#continuous_rangeRound), [clamp](#continuous_clamp) or [interpolate](#continuous_interpolate). - -<a name="scaleIdentity" href="#scaleIdentity">#</a> d3.<b>scaleIdentity</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/identity.js), [Examples](https://observablehq.com/@d3/d3-scalelinear) - -Constructs a new identity scale with the specified [domain](#continuous_domain) and [range](#continuous_range). If *range* is not specified, it defaults to [0, 1]. - -#### Radial Scales - -Radial scales are a variant of [linear scales](#linear-scales) where the range is internally squared so that an input value corresponds linearly to the squared output value. These scales are useful when you want the input value to correspond to the area of a graphical mark and the mark is specified by radius, as in a radial bar chart. Radial scales do not support [interpolate](#continuous_interpolate). - -<a name="scaleRadial" href="#scaleRadial">#</a> d3.<b>scaleRadial</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/radial.js), [Examples](https://observablehq.com/@d3/radial-stacked-bar-chart) - -Constructs a new radial scale with the specified [domain](#continuous_domain) and [range](#continuous_range). If *domain* or *range* is not specified, each defaults to [0, 1]. - -#### Time Scales - -Time scales are a variant of [linear scales](#linear-scales) that have a temporal domain: domain values are coerced to [dates](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date) rather than numbers, and [invert](#continuous_invert) likewise returns a date. Time scales implement [ticks](#time_ticks) based on [calendar intervals](https://github.com/d3/d3-time), taking the pain out of generating axes for temporal domains. - -For example, to create a position encoding: - -```js -var x = d3.scaleTime() - .domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]) - .range([0, 960]); - -x(new Date(2000, 0, 1, 5)); // 200 -x(new Date(2000, 0, 1, 16)); // 640 -x.invert(200); // Sat Jan 01 2000 05:00:00 GMT-0800 (PST) -x.invert(640); // Sat Jan 01 2000 16:00:00 GMT-0800 (PST) -``` - -For a valid value *y* in the range, <i>time</i>(<i>time</i>.invert(<i>y</i>)) equals *y*; similarly, for a valid value *x* in the domain, <i>time</i>.invert(<i>time</i>(<i>x</i>)) equals *x*. The invert method is useful for interaction, say to determine the value in the domain that corresponds to the pixel location under the mouse. - -<a name="scaleTime" href="#scaleTime">#</a> d3.<b>scaleTime</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/time.js), [Examples](https://observablehq.com/@d3/d3-scaletime) - -Constructs a new time scale with the specified [domain](#time_domain) and [range](#time_range), the [default](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolate) [interpolator](#time_interpolate) and [clamping](#time_clamp) disabled. If *domain* is not specified, it defaults to [2000-01-01, 2000-01-02]. If *range* is not specified, it defaults to [0, 1]. - -<a name="_time" href="#_time">#</a> <i>time</i>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/time.js), [Examples](https://observablehq.com/@d3/d3-scaletime) - -See [*continuous*](#_continuous). - -<a name="time_invert" href="#time_invert">#</a> <i>time</i>.<b>invert</b>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/time.js), [Examples](https://observablehq.com/@d3/d3-scaletime) - -See [*continuous*.invert](#continuous_invert). - -<a name="time_domain" href="#time_domain">#</a> <i>time</i>.<b>domain</b>([<i>domain</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/time.js), [Examples](https://observablehq.com/@d3/d3-scaletime) - -See [*continuous*.domain](#continuous_domain). - -<a name="time_range" href="#time_range">#</a> <i>time</i>.<b>range</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/time.js), [Examples](https://observablehq.com/@d3/d3-scaletime) - -See [*continuous*.range](#continuous_range). - -<a name="time_rangeRound" href="#time_rangeRound">#</a> <i>time</i>.<b>rangeRound</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/time.js), [Examples](https://observablehq.com/@d3/d3-scaletime) - -See [*continuous*.rangeRound](#continuous_rangeRound). - -<a name="time_clamp" href="#time_clamp">#</a> <i>time</i>.<b>clamp</b>(<i>clamp</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/time.js), [Examples](https://observablehq.com/@d3/d3-scaletime) - -See [*continuous*.clamp](#continuous_clamp). - -<a name="time_interpolate" href="#time_interpolate">#</a> <i>time</i>.<b>interpolate</b>(<i>interpolate</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/time.js), [Examples](https://observablehq.com/@d3/d3-scaletime) - -See [*continuous*.interpolate](#continuous_interpolate). - -<a name="time_ticks" href="#time_ticks">#</a> <i>time</i>.<b>ticks</b>([<i>count</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/time.js), [Examples](https://observablehq.com/@d3/d3-scaletime) -<br><a name="time_ticks" href="#time_ticks">#</a> <i>time</i>.<b>ticks</b>([<i>interval</i>]) - -Returns representative dates from the scale’s [domain](#time_domain). The returned tick values are uniformly-spaced (mostly), have sensible values (such as every day at midnight), and are guaranteed to be within the extent of the domain. Ticks are often used to display reference lines, or tick marks, in conjunction with the visualized data. - -An optional *count* may be specified to affect how many ticks are generated. If *count* is not specified, it defaults to 10. The specified *count* is only a hint; the scale may return more or fewer values depending on the domain. For example, to create ten default ticks, say: - -```js -var x = d3.scaleTime(); - -x.ticks(10); -// [Sat Jan 01 2000 00:00:00 GMT-0800 (PST), -// Sat Jan 01 2000 03:00:00 GMT-0800 (PST), -// Sat Jan 01 2000 06:00:00 GMT-0800 (PST), -// Sat Jan 01 2000 09:00:00 GMT-0800 (PST), -// Sat Jan 01 2000 12:00:00 GMT-0800 (PST), -// Sat Jan 01 2000 15:00:00 GMT-0800 (PST), -// Sat Jan 01 2000 18:00:00 GMT-0800 (PST), -// Sat Jan 01 2000 21:00:00 GMT-0800 (PST), -// Sun Jan 02 2000 00:00:00 GMT-0800 (PST)] -``` - -The following time intervals are considered for automatic ticks: - -* 1-, 5-, 15- and 30-second. -* 1-, 5-, 15- and 30-minute. -* 1-, 3-, 6- and 12-hour. -* 1- and 2-day. -* 1-week. -* 1- and 3-month. -* 1-year. - -In lieu of a *count*, a [time *interval*](https://github.com/d3/d3-time/blob/master/README.md#intervals) may be explicitly specified. To prune the generated ticks for a given time *interval*, use [*interval*.every](https://github.com/d3/d3-time/blob/master/README.md#interval_every). For example, to generate ticks at 15-[minute](https://github.com/d3/d3-time/blob/master/README.md#minute) intervals: - -```js -var x = d3.scaleTime() - .domain([new Date(2000, 0, 1, 0), new Date(2000, 0, 1, 2)]); - -x.ticks(d3.timeMinute.every(15)); -// [Sat Jan 01 2000 00:00:00 GMT-0800 (PST), -// Sat Jan 01 2000 00:15:00 GMT-0800 (PST), -// Sat Jan 01 2000 00:30:00 GMT-0800 (PST), -// Sat Jan 01 2000 00:45:00 GMT-0800 (PST), -// Sat Jan 01 2000 01:00:00 GMT-0800 (PST), -// Sat Jan 01 2000 01:15:00 GMT-0800 (PST), -// Sat Jan 01 2000 01:30:00 GMT-0800 (PST), -// Sat Jan 01 2000 01:45:00 GMT-0800 (PST), -// Sat Jan 01 2000 02:00:00 GMT-0800 (PST)] -``` - -Alternatively, pass a test function to [*interval*.filter](https://github.com/d3/d3-time/blob/master/README.md#interval_filter): - -```js -x.ticks(d3.timeMinute.filter(function(d) { - return d.getMinutes() % 15 === 0; -})); -``` - -Note: in some cases, such as with day ticks, specifying a *step* can result in irregular spacing of ticks because time intervals have varying length. - -<a name="time_tickFormat" href="#time_tickFormat">#</a> <i>time</i>.<b>tickFormat</b>([<i>count</i>[, <i>specifier</i>]]) · [Source](https://github.com/d3/d3-scale/blob/master/src/time.js), [Examples](https://observablehq.com/@d3/scale-ticks) -<br><a href="#time_tickFormat">#</a> <i>time</i>.<b>tickFormat</b>([<i>interval</i>[, <i>specifier</i>]]) - -Returns a time format function suitable for displaying [tick](#time_ticks) values. The specified *count* or *interval* is currently ignored, but is accepted for consistency with other scales such as [*continuous*.tickFormat](#continuous_tickFormat). If a format *specifier* is specified, this method is equivalent to [format](https://github.com/d3/d3-time-format/blob/master/README.md#format). If *specifier* is not specified, the default time format is returned. The default multi-scale time format chooses a human-readable representation based on the specified date as follows: - -* `%Y` - for year boundaries, such as `2011`. -* `%B` - for month boundaries, such as `February`. -* `%b %d` - for week boundaries, such as `Feb 06`. -* `%a %d` - for day boundaries, such as `Mon 07`. -* `%I %p` - for hour boundaries, such as `01 AM`. -* `%I:%M` - for minute boundaries, such as `01:23`. -* `:%S` - for second boundaries, such as `:45`. -* `.%L` - milliseconds for all other times, such as `.012`. - -Although somewhat unusual, this default behavior has the benefit of providing both local and global context: for example, formatting a sequence of ticks as [11 PM, Mon 07, 01 AM] reveals information about hours, dates, and day simultaneously, rather than just the hours [11 PM, 12 AM, 01 AM]. See [d3-time-format](https://github.com/d3/d3-time-format) if you’d like to roll your own conditional time format. - -<a name="time_nice" href="#time_nice">#</a> <i>time</i>.<b>nice</b>([<i>count</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/time.js), [Examples](https://observablehq.com/@d3/d3-scaletime) -<br><a name="time_nice" href="#time_nice">#</a> <i>time</i>.<b>nice</b>([<i>interval</i>]) - -Extends the [domain](#time_domain) so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. See [*continuous*.nice](#continuous_nice) for more. - -An optional tick *count* argument allows greater control over the step size used to extend the bounds, guaranteeing that the returned [ticks](#time_ticks) will exactly cover the domain. Alternatively, a [time *interval*](https://github.com/d3/d3-time/blob/master/README.md#intervals) may be specified to explicitly set the ticks. If an *interval* is specified, an optional *step* may also be specified to skip some ticks. For example, `time.nice(d3.timeSecond.every(10))` will extend the domain to an even ten seconds (0, 10, 20, <i>etc.</i>). See [*time*.ticks](#time_ticks) and [*interval*.every](https://github.com/d3/d3-time/blob/master/README.md#interval_every) for further detail. - -Nicing is useful if the domain is computed from data, say using [extent](https://github.com/d3/d3-array/blob/master/README.md#extent), and may be irregular. For example, for a domain of [2009-07-13T00:02, 2009-07-13T23:48], the nice domain is [2009-07-13, 2009-07-14]. If the domain has more than two values, nicing the domain only affects the first and last value. - -<a name="time_copy" href="#time_copy">#</a> <i>time</i>.<b>copy</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/time.js), [Examples](https://observablehq.com/@d3/d3-scaletime) - -See [*continuous*.copy](#continuous_copy). - -<a name="scaleUtc" href="#scaleUtc">#</a> d3.<b>scaleUtc</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/utcTime.js), [Examples](https://observablehq.com/@d3/d3-scaletime) - -Equivalent to [scaleTime](#scaleTime), but the returned time scale operates in [Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) rather than local time. - -### Sequential Scales - -Sequential scales, like [diverging scales](#diverging-scales), are similar to [continuous scales](#continuous-scales) in that they map a continuous, numeric input domain to a continuous output range. However, unlike continuous scales, the input domain and output range of a sequential scale always has exactly two elements, and the output range is typically specified as an interpolator rather than an array of values. These scales do not expose [invert](#continuous_invert) and [interpolate](#continuous_interpolate) methods. - -<a name="scaleSequential" href="#scaleSequential">#</a> d3.<b>scaleSequential</b>([[<i>domain</i>, ]<i>interpolator</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/sequential.js), [Examples](https://observablehq.com/@d3/sequential-scales) - -Constructs a new sequential scale with the specified [*domain*](#sequential_domain) and [*interpolator*](#sequential_interpolator) function or array. If *domain* is not specified, it defaults to [0, 1]. If *interpolator* is not specified, it defaults to the identity function. When the scale is [applied](#_sequential), the interpolator will be invoked with a value typically in the range [0, 1], where 0 represents the minimum value and 1 represents the maximum value. For example, to implement the ill-advised [HSL](https://github.com/d3/d3-color/blob/master/README.md#hsl) rainbow scale: - -```js -var rainbow = d3.scaleSequential(function(t) { - return d3.hsl(t * 360, 1, 0.5) + ""; -}); -``` - -A more aesthetically-pleasing and perceptually-effective cyclical hue encoding is to use [d3.interpolateRainbow](https://github.com/d3/d3-scale-chromatic/blob/master/README.md#interpolateRainbow): - -```js -var rainbow = d3.scaleSequential(d3.interpolateRainbow); -``` - -If *interpolator* is an array, it represents the scale’s two-element output range and is converted to an interpolator function using [d3.interpolate](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolate). - -<a name="_sequential" href="#_sequential">#</a> <i>sequential</i>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/sequential.js), [Examples](https://observablehq.com/@d3/sequential-scales) - -See [*continuous*](#_continuous). - -<a name="sequential_domain" href="#sequential_domain">#</a> <i>sequential</i>.<b>domain</b>([<i>domain</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/sequential.js), [Examples](https://observablehq.com/@d3/sequential-scales) - -See [*continuous*.domain](#continuous_domain). Note that a sequential scale’s domain must be numeric and must contain exactly two values. - -<a name="sequential_clamp" href="#sequential_clamp">#</a> <i>sequential</i>.<b>clamp</b>([<i>clamp</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/sequential.js), [Examples](https://observablehq.com/@d3/sequential-scales) - -See [*continuous*.clamp](#continuous_clamp). - -<a name="sequential_interpolator" href="#sequential_interpolator">#</a> <i>sequential</i>.<b>interpolator</b>([<i>interpolator</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/sequential.js), [Examples](https://observablehq.com/@d3/sequential-scales) - -If *interpolator* is specified, sets the scale’s interpolator to the specified function. If *interpolator* is not specified, returns the scale’s current interpolator. - -<a name="sequential_range" href="#sequential_range">#</a> <i>sequential</i>.<b>range</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/sequential.js), [Examples](https://observablehq.com/@d3/sequential-scales) - -See [*continuous*.range](#continuous_range). If *range* is specified, the given two-element array is converted to an interpolator function using [d3.interpolate](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolate). - -<a name="sequential_rangeRound" href="#sequential_rangeRound">#</a> <i>sequential</i>.<b>rangeRound</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/sequential.js), [Examples](https://observablehq.com/@d3/sequential-scales) - -See [*continuous*.rangeRound](#continuous_rangeRound). If *range* is specified, implicitly uses [d3.interpolateRound](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateRound) as the interpolator. - -<a name="sequential_copy" href="#sequential_copy">#</a> <i>sequential</i>.<b>copy</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/sequential.js), [Examples](https://observablehq.com/@d3/sequential-scales) - -See [*continuous*.copy](#continuous_copy). - -<a name="scaleSequentialLog" href="#scaleSequentialLog">#</a> d3.<b>scaleSequentialLog</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/sequential.js), [Examples](https://observablehq.com/@d3/sequential-scales) - -A [sequential scale](#sequential-scales) with a logarithmic transform, analogous to a [log scale](#log-scales). - -<a name="scaleSequentialPow" href="#scaleSequentialPow">#</a> d3.<b>scaleSequentialPow</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/sequential.js), [Examples](https://observablehq.com/@d3/sequential-scales) - -A [sequential scale](#sequential-scales) with an exponential transform, analogous to a [power scale](#pow-scales). - -<a name="scaleSequentialSqrt" href="#scaleSequentialSqrt">#</a> d3.<b>scaleSequentialSqrt</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/sequential.js), [Examples](https://observablehq.com/@d3/sequential-scales) - -A [sequential scale](#sequential-scales) with a square-root transform, analogous to a [d3.scaleSqrt](#scaleSqrt). - -<a name="scaleSequentialSymlog" href="#scaleSequentialSymlog">#</a> d3.<b>scaleSequentialSymlog</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/sequential.js), [Examples](https://observablehq.com/@d3/sequential-scales) - -A [sequential scale](#sequential-scales) with a symmetric logarithmic transform, analogous to a [symlog scale](#symlog-scales). - -<a name="scaleSequentialQuantile" href="#scaleSequentialQuantile">#</a> d3.<b>scaleSequentialQuantile</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/sequentialQuantile.js), [Examples](https://observablehq.com/@d3/sequential-scales) - -A [sequential scale](#sequential-scales) using a *p*-quantile transform, analogous to a [quantile scale](#quantile-scales). - -<a name="sequentialQuantile_quantiles" href="#sequentialQuantile_quantiles">#</a> <i>sequentialQuantile</i>.<b>quantiles</b>(<i>n</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/sequentialQuantile.js), [Examples](https://observablehq.com/@d3/sequential-scales) - -Returns an array of *n* + 1 quantiles. For example, if *n* = 4, returns an array of five numbers: the minimum value, the first quartile, the median, the third quartile, and the maximum. - -### Diverging Scales - -Diverging scales, like [sequential scales](#sequential-scales), are similar to [continuous scales](#continuous-scales) in that they map a continuous, numeric input domain to a continuous output range. However, unlike continuous scales, the input domain and output range of a diverging scale always has exactly three elements, and the output range is typically specified as an interpolator rather than an array of values. These scales do not expose [invert](#continuous_invert) and [interpolate](#continuous_interpolate) methods. - -<a name="scaleDiverging" href="#scaleDiverging">#</a> d3.<b>scaleDiverging</b>([[<i>domain</i>, ]<i>interpolator</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/diverging.js), [Examples](https://observablehq.com/@d3/diverging-scales) - -Constructs a new diverging scale with the specified [*domain*](#diverging_domain) and [*interpolator*](#diverging_interpolator) function or array. If *domain* is not specified, it defaults to [0, 0.5, 1]. If *interpolator* is not specified, it defaults to the identity function. When the scale is [applied](#_diverging), the interpolator will be invoked with a value typically in the range [0, 1], where 0 represents the extreme negative value, 0.5 represents the neutral value, and 1 represents the extreme positive value. For example, using [d3.interpolateSpectral](https://github.com/d3/d3-scale-chromatic/blob/master/README.md#interpolateSpectral): - -```js -var spectral = d3.scaleDiverging(d3.interpolateSpectral); -``` - -If *interpolator* is an array, it represents the scale’s three-element output range and is converted to an interpolator function using [d3.interpolate](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolate) and [d3.piecewise](https://github.com/d3/d3-interpolate/blob/master/README.md#piecewise). - -<a name="_diverging" href="#_diverging">#</a> <i>diverging</i>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/diverging.js), [Examples](https://observablehq.com/@d3/diverging-scales) - -See [*continuous*](#_continuous). - -<a name="diverging_domain" href="#diverging_domain">#</a> <i>diverging</i>.<b>domain</b>([<i>domain</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/diverging.js), [Examples](https://observablehq.com/@d3/diverging-scales) - -See [*continuous*.domain](#continuous_domain). Note that a diverging scale’s domain must be numeric and must contain exactly three values. The default domain is [0, 0.5, 1]. - -<a name="diverging_clamp" href="#diverging_clamp">#</a> <i>diverging</i>.<b>clamp</b>([<i>clamp</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/diverging.js), [Examples](https://observablehq.com/@d3/diverging-scales) - -See [*continuous*.clamp](#continuous_clamp). - -<a name="diverging_interpolator" href="#diverging_interpolator">#</a> <i>diverging</i>.<b>interpolator</b>([<i>interpolator</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/diverging.js), [Examples](https://observablehq.com/@d3/diverging-scales) - -If *interpolator* is specified, sets the scale’s interpolator to the specified function. If *interpolator* is not specified, returns the scale’s current interpolator. - -<a name="diverging_range" href="#diverging_range">#</a> <i>diverging</i>.<b>range</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/diverging.js), [Examples](https://observablehq.com/@d3/diverging-scales) - -See [*continuous*.range](#continuous_range). If *range* is specified, the given three-element array is converted to an interpolator function using [d3.interpolate](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolate) and [d3.piecewise](https://github.com/d3/d3-interpolate/blob/master/README.md#piecewise). - -<a name="diverging_rangeRound" href="#diverging_rangeRound">#</a> <i>diverging</i>.<b>rangeRound</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/diverging.js), [Examples](https://observablehq.com/@d3/diverging-scales) - -See [*continuous*.range](#continuous_rangeRound). If *range* is specified, implicitly uses [d3.interpolateRound](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateRound) as the interpolator. - -<a name="diverging_copy" href="#diverging_copy">#</a> <i>diverging</i>.<b>copy</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/diverging.js), [Examples](https://observablehq.com/@d3/diverging-scales) - -See [*continuous*.copy](#continuous_copy). - -<a name="diverging_unknown" href="#diverging_unknown">#</a> <i>diverging</i>.<b>unknown</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/diverging.js), [Examples](https://observablehq.com/@d3/diverging-scales) - -See [*continuous*.unknown](#continuous_unknown). - -<a name="scaleDivergingLog" href="#scaleDivergingLog">#</a> d3.<b>scaleDivergingLog</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/diverging.js), [Examples](https://observablehq.com/@d3/diverging-scales) - -A [diverging scale](#diverging-scales) with a logarithmic transform, analogous to a [log scale](#log-scales). - -<a name="scaleDivergingPow" href="#scaleDivergingPow">#</a> d3.<b>scaleDivergingPow</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/diverging.js), [Examples](https://observablehq.com/@d3/diverging-scales) - -A [diverging scale](#diverging-scales) with an exponential transform, analogous to a [power scale](#pow-scales). - -<a name="scaleDivergingSqrt" href="#scaleDivergingSqrt">#</a> d3.<b>scaleDivergingSqrt</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/diverging.js), [Examples](https://observablehq.com/@d3/diverging-scales) - -A [diverging scale](#diverging-scales) with a square-root transform, analogous to a [d3.scaleSqrt](#scaleSqrt). - -<a name="scaleDivergingSymlog" href="#scaleDivergingSymlog">#</a> d3.<b>scaleDivergingSymlog</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/diverging.js), [Examples](https://observablehq.com/@d3/diverging-scales) - -A [diverging scale](#diverging-scales) with a symmetric logarithmic transform, analogous to a [symlog scale](#symlog-scales). - -### Quantize Scales - -Quantize scales are similar to [linear scales](#linear-scales), except they use a discrete rather than continuous range. The continuous input domain is divided into uniform segments based on the number of values in (*i.e.*, the cardinality of) the output range. Each range value *y* can be expressed as a quantized linear function of the domain value *x*: *y* = *m round(x)* + *b*. See [this choropleth](https://observablehq.com/@d3/choropleth) for an example. - -<a name="scaleQuantize" href="#scaleQuantize">#</a> d3.<b>scaleQuantize</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/quantize.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -Constructs a new quantize scale with the specified [*domain*](#quantize_domain) and [*range*](#quantize_range). If either *domain* or *range* is not specified, each defaults to [0, 1]. Thus, the default quantize scale is equivalent to the [Math.round](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Math/round) function. - -<a name="_quantize" href="#_quantize">#</a> <i>quantize</i>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/quantize.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -Given a *value* in the input [domain](#quantize_domain), returns the corresponding value in the output [range](#quantize_range). For example, to apply a color encoding: - -```js -var color = d3.scaleQuantize() - .domain([0, 1]) - .range(["brown", "steelblue"]); - -color(0.49); // "brown" -color(0.51); // "steelblue" -``` - -Or dividing the domain into three equally-sized parts with different range values to compute an appropriate stroke width: - -```js -var width = d3.scaleQuantize() - .domain([10, 100]) - .range([1, 2, 4]); - -width(20); // 1 -width(50); // 2 -width(80); // 4 -``` - -<a name="quantize_invertExtent" href="#quantize_invertExtent">#</a> <i>quantize</i>.<b>invertExtent</b>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/quantize.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -Returns the extent of values in the [domain](#quantize_domain) [<i>x0</i>, <i>x1</i>] for the corresponding *value* in the [range](#quantize_range): the inverse of [*quantize*](#_quantize). This method is useful for interaction, say to determine the value in the domain that corresponds to the pixel location under the mouse. - -```js -var width = d3.scaleQuantize() - .domain([10, 100]) - .range([1, 2, 4]); - -width.invertExtent(2); // [40, 70] -``` - -<a name="quantize_domain" href="#quantize_domain">#</a> <i>quantize</i>.<b>domain</b>([<i>domain</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/quantize.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -If *domain* is specified, sets the scale’s domain to the specified two-element array of numbers. If the elements in the given array are not numbers, they will be coerced to numbers. The numbers must be in ascending order or the behavior of the scale is undefined. If *domain* is not specified, returns the scale’s current domain. - -<a name="quantize_range" href="#quantize_range">#</a> <i>quantize</i>.<b>range</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/quantize.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -If *range* is specified, sets the scale’s range to the specified array of values. The array may contain any number of discrete values. The elements in the given array need not be numbers; any value or type will work. If *range* is not specified, returns the scale’s current range. - -<a name="quantize_ticks" href="#quantize_ticks">#</a> <i>quantize</i>.<b>ticks</b>([<i>count</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/quantize.js), [Examples](https://observablehq.com/@d3/scale-ticks) - -Equivalent to [*continuous*.ticks](#continuous_ticks). - -<a name="quantize_tickFormat" href="#quantize_tickFormat">#</a> <i>quantize</i>.<b>tickFormat</b>([<i>count</i>[, <i>specifier</i>]]) · [Source](https://github.com/d3/d3-scale/blob/master/src/linear.js), [Examples](https://observablehq.com/@d3/scale-ticks) - -Equivalent to [*continuous*.tickFormat](#continuous_tickFormat). - -<a name="quantize_nice" href="#quantize_nice">#</a> <i>quantize</i>.<b>nice</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/quantize.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -Equivalent to [*continuous*.nice](#continuous_nice). - -<a name="quantize_thresholds" href="#quantize_thresholds">#</a> <i>quantize</i>.<b>thresholds</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/quantize.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -Returns the array of computed thresholds within the [domain](#quantize_domain). - -<a name="quantize_copy" href="#quantize_copy">#</a> <i>quantize</i>.<b>copy</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/quantize.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. - -### Quantile Scales - -Quantile scales map a sampled input domain to a discrete range. The domain is considered continuous and thus the scale will accept any reasonable input value; however, the domain is specified as a discrete set of sample values. The number of values in (the cardinality of) the output range determines the number of quantiles that will be computed from the domain. To compute the quantiles, the domain is sorted, and treated as a [population of discrete values](https://en.wikipedia.org/wiki/Quantile#Quantiles_of_a_population); see d3-array’s [quantile](https://github.com/d3/d3-array/blob/master/README.md#quantile). See [this quantile choropleth](https://observablehq.com/@d3/quantile-choropleth) for an example. - -<a name="scaleQuantile" href="#scaleQuantile">#</a> d3.<b>scaleQuantile</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/quantile.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -Constructs a new quantile scale with the specified [*domain*](#quantile_domain) and [*range*](#quantile_range). If either *domain* or *range* is not specified, each defaults to the empty array. The quantile scale is invalid until both a domain and range are specified. - -<a name="_quantile" href="#_quantile">#</a> <i>quantile</i>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/quantile.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -Given a *value* in the input [domain](#quantile_domain), returns the corresponding value in the output [range](#quantile_range). - -<a name="quantile_invertExtent" href="#quantile_invertExtent">#</a> <i>quantile</i>.<b>invertExtent</b>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/quantile.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -Returns the extent of values in the [domain](#quantile_domain) [<i>x0</i>, <i>x1</i>] for the corresponding *value* in the [range](#quantile_range): the inverse of [*quantile*](#_quantile). This method is useful for interaction, say to determine the value in the domain that corresponds to the pixel location under the mouse. - -<a name="quantile_domain" href="#quantile_domain">#</a> <i>quantile</i>.<b>domain</b>([<i>domain</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/quantile.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -If *domain* is specified, sets the domain of the quantile scale to the specified set of discrete numeric values. The array must not be empty, and must contain at least one numeric value; NaN, null and undefined values are ignored and not considered part of the sample population. If the elements in the given array are not numbers, they will be coerced to numbers. A copy of the input array is sorted and stored internally. If *domain* is not specified, returns the scale’s current domain. - -<a name="quantile_range" href="#quantile_range">#</a> <i>quantile</i>.<b>range</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/quantile.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -If *range* is specified, sets the discrete values in the range. The array must not be empty, and may contain any type of value. The number of values in (the cardinality, or length, of) the *range* array determines the number of quantiles that are computed. For example, to compute quartiles, *range* must be an array of four elements such as [0, 1, 2, 3]. If *range* is not specified, returns the current range. - -<a name="quantile_quantiles" href="#quantile_quantiles">#</a> <i>quantile</i>.<b>quantiles</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/quantile.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -Returns the quantile thresholds. If the [range](#quantile_range) contains *n* discrete values, the returned array will contain *n* - 1 thresholds. Values less than the first threshold are considered in the first quantile; values greater than or equal to the first threshold but less than the second threshold are in the second quantile, and so on. Internally, the thresholds array is used with [bisect](https://github.com/d3/d3-array/blob/master/README.md#bisect) to find the output quantile associated with the given input value. - -<a name="quantile_copy" href="#quantile_copy">#</a> <i>quantile</i>.<b>copy</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/quantile.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. - -### Threshold Scales - -Threshold scales are similar to [quantize scales](#quantize-scales), except they allow you to map arbitrary subsets of the domain to discrete values in the range. The input domain is still continuous, and divided into slices based on a set of threshold values. See [this choropleth](https://observablehq.com/@d3/threshold-choropleth) for an example. - -<a name="scaleThreshold" href="#scaleThreshold">#</a> d3.<b>scaleThreshold</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/threshold.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -Constructs a new threshold scale with the specified [*domain*](#threshold_domain) and [*range*](#threshold_range). If *domain* is not specified, it defaults to [0.5]. If *range* is not specified, it defaults to [0, 1]. Thus, the default threshold scale is equivalent to the [Math.round](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Math/round) function for numbers; for example threshold(0.49) returns 0, and threshold(0.51) returns 1. - -<a name="_threshold" href="#_threshold">#</a> <i>threshold</i>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/threshold.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -Given a *value* in the input [domain](#threshold_domain), returns the corresponding value in the output [range](#threshold_range). For example: - -```js -var color = d3.scaleThreshold() - .domain([0, 1]) - .range(["red", "white", "green"]); - -color(-1); // "red" -color(0); // "white" -color(0.5); // "white" -color(1); // "green" -color(1000); // "green" -``` - -<a name="threshold_invertExtent" href="#threshold_invertExtent">#</a> <i>threshold</i>.<b>invertExtent</b>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/threshold.js), [Examples](https://observablehq.com/@d3/choropleth) - -Returns the extent of values in the [domain](#threshold_domain) [<i>x0</i>, <i>x1</i>] for the corresponding *value* in the [range](#threshold_range), representing the inverse mapping from range to domain. This method is useful for interaction, say to determine the value in the domain that corresponds to the pixel location under the mouse. For example: - -```js -var color = d3.scaleThreshold() - .domain([0, 1]) - .range(["red", "white", "green"]); - -color.invertExtent("red"); // [undefined, 0] -color.invertExtent("white"); // [0, 1] -color.invertExtent("green"); // [1, undefined] -``` - -<a name="threshold_domain" href="#threshold_domain">#</a> <i>threshold</i>.<b>domain</b>([<i>domain</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/threshold.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -If *domain* is specified, sets the scale’s domain to the specified array of values. The values must be in ascending order or the behavior of the scale is undefined. The values are typically numbers, but any naturally ordered values (such as strings) will work; a threshold scale can be used to encode any type that is ordered. If the number of values in the scale’s range is N+1, the number of values in the scale’s domain must be N. If there are fewer than N elements in the domain, the additional values in the range are ignored. If there are more than N elements in the domain, the scale may return undefined for some inputs. If *domain* is not specified, returns the scale’s current domain. - -<a name="threshold_range" href="#threshold_range">#</a> <i>threshold</i>.<b>range</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/threshold.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -If *range* is specified, sets the scale’s range to the specified array of values. If the number of values in the scale’s domain is N, the number of values in the scale’s range must be N+1. If there are fewer than N+1 elements in the range, the scale may return undefined for some inputs. If there are more than N+1 elements in the range, the additional values are ignored. The elements in the given array need not be numbers; any value or type will work. If *range* is not specified, returns the scale’s current range. - -<a name="threshold_copy" href="#threshold_copy">#</a> <i>threshold</i>.<b>copy</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/threshold.js), [Examples](https://observablehq.com/@d3/quantile-quantize-and-threshold-scales) - -Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. - -### Ordinal Scales - -Unlike [continuous scales](#continuous-scales), ordinal scales have a discrete domain and range. For example, an ordinal scale might map a set of named categories to a set of colors, or determine the horizontal positions of columns in a column chart. - -<a name="scaleOrdinal" href="#scaleOrdinal">#</a> d3.<b>scaleOrdinal</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/ordinal.js), [Examples](https://observablehq.com/@d3/d3-scaleordinal) - -Constructs a new ordinal scale with the specified [*domain*](#ordinal_domain) and [*range*](#ordinal_range). If *domain* is not specified, it defaults to the empty array. If *range* is not specified, it defaults to the empty array; an ordinal scale always returns undefined until a non-empty range is defined. - -<a name="_ordinal" href="#_ordinal">#</a> <i>ordinal</i>(<i>value</i>) · [Source](https://github.com/d3/d3-scale/blob/master/src/ordinal.js), [Examples](https://observablehq.com/@d3/d3-scaleordinal) - -Given a *value* in the input [domain](#ordinal_domain), returns the corresponding value in the output [range](#ordinal_range). If the given *value* is not in the scale’s [domain](#ordinal_domain), returns the [unknown](#ordinal_unknown); or, if the unknown value is [implicit](#scaleImplicit) (the default), then the *value* is implicitly added to the domain and the next-available value in the range is assigned to *value*, such that this and subsequent invocations of the scale given the same input *value* return the same output value. - -<a name="ordinal_domain" href="#ordinal_domain">#</a> <i>ordinal</i>.<b>domain</b>([<i>domain</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/ordinal.js), [Examples](https://observablehq.com/@d3/d3-scaleordinal) - -If *domain* is specified, sets the domain to the specified array of values. The first element in *domain* will be mapped to the first element in the range, the second domain value to the second range value, and so on. Domain values are stored internally in a map from stringified value to index; the resulting index is then used to retrieve a value from the range. Thus, an ordinal scale’s values must be coercible to a string, and the stringified version of the domain value uniquely identifies the corresponding range value. If *domain* is not specified, this method returns the current domain. - -Setting the domain on an ordinal scale is optional if the [unknown value](#ordinal_unknown) is [implicit](#scaleImplicit) (the default). In this case, the domain will be inferred implicitly from usage by assigning each unique value passed to the scale a new value from the range. Note that an explicit domain is recommended to ensure deterministic behavior, as inferring the domain from usage will be dependent on ordering. - -<a name="ordinal_range" href="#ordinal_range">#</a> <i>ordinal</i>.<b>range</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/ordinal.js), [Examples](https://observablehq.com/@d3/d3-scaleordinal) - -If *range* is specified, sets the range of the ordinal scale to the specified array of values. The first element in the domain will be mapped to the first element in *range*, the second domain value to the second range value, and so on. If there are fewer elements in the range than in the domain, the scale will reuse values from the start of the range. If *range* is not specified, this method returns the current range. - -<a name="ordinal_unknown" href="#ordinal_unknown">#</a> <i>ordinal</i>.<b>unknown</b>([<i>value</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/ordinal.js), [Examples](https://observablehq.com/@d3/d3-scaleordinal) - -If *value* is specified, sets the output value of the scale for unknown input values and returns this scale. If *value* is not specified, returns the current unknown value, which defaults to [implicit](#scaleImplicit). The implicit value enables implicit domain construction; see [*ordinal*.domain](#ordinal_domain). - -<a name="ordinal_copy" href="#ordinal_copy">#</a> <i>ordinal</i>.<b>copy</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/ordinal.js), [Examples](https://observablehq.com/@d3/d3-scaleordinal) - -Returns an exact copy of this ordinal scale. Changes to this scale will not affect the returned scale, and vice versa. - -<a name="scaleImplicit" href="#scaleImplicit">#</a> d3.<b>scaleImplicit</b> · [Source](https://github.com/d3/d3-scale/blob/master/src/ordinal.js), [Examples](https://observablehq.com/@d3/d3-scaleordinal) - -A special value for [*ordinal*.unknown](#ordinal_unknown) that enables implicit domain construction: unknown values are implicitly added to the domain. - -#### Band Scales - -Band scales are like [ordinal scales](#ordinal-scales) except the output range is continuous and numeric. Discrete output values are automatically computed by the scale by dividing the continuous range into uniform bands. Band scales are typically used for bar charts with an ordinal or categorical dimension. The [unknown value](#ordinal_unknown) of a band scale is effectively undefined: they do not allow implicit domain construction. - -<img src="https://raw.githubusercontent.com/d3/d3-scale/master/img/band.png" width="751" height="238" alt="band"> - -<a name="scaleBand" href="#scaleBand">#</a> d3.<b>scaleBand</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scaleband) - -Constructs a new band scale with the specified [*domain*](#band_domain) and [*range*](#band_range), no [padding](#band_padding), no [rounding](#band_round) and center [alignment](#band_align). If *domain* is not specified, it defaults to the empty domain. If *range* is not specified, it defaults to the unit range [0, 1]. - -<a name="_band" href="#_band">#</a> <i>band</i>(*value*) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scaleband) - -Given a *value* in the input [domain](#band_domain), returns the start of the corresponding band derived from the output [range](#band_range). If the given *value* is not in the scale’s domain, returns undefined. - -<a name="band_domain" href="#band_domain">#</a> <i>band</i>.<b>domain</b>([<i>domain</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scaleband) - -If *domain* is specified, sets the domain to the specified array of values. The first element in *domain* will be mapped to the first band, the second domain value to the second band, and so on. Domain values are stored internally in a map from stringified value to index; the resulting index is then used to determine the band. Thus, a band scale’s values must be coercible to a string, and the stringified version of the domain value uniquely identifies the corresponding band. If *domain* is not specified, this method returns the current domain. - -<a name="band_range" href="#band_range">#</a> <i>band</i>.<b>range</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scaleband) - -If *range* is specified, sets the scale’s range to the specified two-element array of numbers. If the elements in the given array are not numbers, they will be coerced to numbers. If *range* is not specified, returns the scale’s current range, which defaults to [0, 1]. - -<a name="band_rangeRound" href="#band_rangeRound">#</a> <i>band</i>.<b>rangeRound</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scaleband) - -Sets the scale’s [*range*](#band_range) to the specified two-element array of numbers while also enabling [rounding](#band_round). This is a convenience method equivalent to: - -```js -band - .range(range) - .round(true); -``` - -Rounding is sometimes useful for avoiding antialiasing artifacts, though also consider the [shape-rendering](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering) “crispEdges†styles. - -<a name="band_round" href="#band_round">#</a> <i>band</i>.<b>round</b>([<i>round</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scaleband) - -If *round* is specified, enables or disables rounding accordingly. If rounding is enabled, the start and stop of each band will be integers. Rounding is sometimes useful for avoiding antialiasing artifacts, though also consider the [shape-rendering](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering) “crispEdges†styles. Note that if the width of the domain is not a multiple of the cardinality of the range, there may be leftover unused space, even without padding! Use [*band*.align](#band_align) to specify how the leftover space is distributed. - -<a name="band_paddingInner" href="#band_paddingInner">#</a> <i>band</i>.<b>paddingInner</b>([<i>padding</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scaleband) - -If *padding* is specified, sets the inner padding to the specified number which must be less than or equal to 1. If *padding* is not specified, returns the current inner padding which defaults to 0. The inner padding specifies the proportion of the range that is reserved for blank space between bands; a value of 0 means no blank space between bands, and a value of 1 means a [bandwidth](#band_bandwidth) of zero. - -<a name="band_paddingOuter" href="#band_paddingOuter">#</a> <i>band</i>.<b>paddingOuter</b>([<i>padding</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scaleband) - -If *padding* is specified, sets the outer padding to the specified number which is typically in the range [0, 1]. If *padding* is not specified, returns the current outer padding which defaults to 0. The outer padding specifies the amount of blank space, in terms of multiples of the [step](#band_step), to reserve before the first band and after the last band. - -<a name="band_padding" href="#band_padding">#</a> <i>band</i>.<b>padding</b>([<i>padding</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scaleband) - -A convenience method for setting the [inner](#band_paddingInner) and [outer](#band_paddingOuter) padding to the same *padding* value. If *padding* is not specified, returns the inner padding. - -<a name="band_align" href="#band_align">#</a> <i>band</i>.<b>align</b>([<i>align</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scaleband) - -If *align* is specified, sets the alignment to the specified value which must be in the range [0, 1]. If *align* is not specified, returns the current alignment which defaults to 0.5. The alignment specifies how outer padding is distributed in the range. A value of 0.5 indicates that the outer padding should be equally distributed before the first band and after the last band; *i.e.*, the bands should be centered within the range. A value of 0 or 1 may be used to shift the bands to one side, say to position them adjacent to an axis. For more, [see this explainer](https://observablehq.com/@d3/band-align). - -<a name="band_bandwidth" href="#band_bandwidth">#</a> <i>band</i>.<b>bandwidth</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scaleband) - -Returns the width of each band. - -<a name="band_step" href="#band_step">#</a> <i>band</i>.<b>step</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scaleband) - -Returns the distance between the starts of adjacent bands. - -<a name="band_copy" href="#band_copy">#</a> <i>band</i>.<b>copy</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scaleband) - -Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. - -#### Point Scales - -Point scales are a variant of [band scales](#band-scales) with the bandwidth fixed to zero. Point scales are typically used for scatterplots with an ordinal or categorical dimension. The [unknown value](#ordinal_unknown) of a point scale is always undefined: they do not allow implicit domain construction. - -<img src="https://raw.githubusercontent.com/d3/d3-scale/master/img/point.png" width="648" height="155" alt="point"> - -<a name="scalePoint" href="#scalePoint">#</a> d3.<b>scalePoint</b>([[<i>domain</i>, ]<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scalepoint) - -Constructs a new point scale with the specified [*domain*](#point_domain) and [*range*](#point_range), no [padding](#point_padding), no [rounding](#point_round) and center [alignment](#point_align). If *domain* is not specified, it defaults to the empty domain. If *range* is not specified, it defaults to the unit range [0, 1]. - -<a name="_point" href="#_point">#</a> <i>point</i>(*value*) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scalepoint) - -Given a *value* in the input [domain](#point_domain), returns the corresponding point derived from the output [range](#point_range). If the given *value* is not in the scale’s domain, returns undefined. - -<a name="point_domain" href="#point_domain">#</a> <i>point</i>.<b>domain</b>([<i>domain</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scalepoint) - -If *domain* is specified, sets the domain to the specified array of values. The first element in *domain* will be mapped to the first point, the second domain value to the second point, and so on. Domain values are stored internally in a map from stringified value to index; the resulting index is then used to determine the point. Thus, a point scale’s values must be coercible to a string, and the stringified version of the domain value uniquely identifies the corresponding point. If *domain* is not specified, this method returns the current domain. - -<a name="point_range" href="#point_range">#</a> <i>point</i>.<b>range</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scalepoint) - -If *range* is specified, sets the scale’s range to the specified two-element array of numbers. If the elements in the given array are not numbers, they will be coerced to numbers. If *range* is not specified, returns the scale’s current range, which defaults to [0, 1]. - -<a name="point_rangeRound" href="#point_rangeRound">#</a> <i>point</i>.<b>rangeRound</b>([<i>range</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scalepoint) - -Sets the scale’s [*range*](#point_range) to the specified two-element array of numbers while also enabling [rounding](#point_round). This is a convenience method equivalent to: - -```js -point - .range(range) - .round(true); -``` - -Rounding is sometimes useful for avoiding antialiasing artifacts, though also consider the [shape-rendering](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering) “crispEdges†styles. - -<a name="point_round" href="#point_round">#</a> <i>point</i>.<b>round</b>([<i>round</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scalepoint) - -If *round* is specified, enables or disables rounding accordingly. If rounding is enabled, the position of each point will be integers. Rounding is sometimes useful for avoiding antialiasing artifacts, though also consider the [shape-rendering](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering) “crispEdges†styles. Note that if the width of the domain is not a multiple of the cardinality of the range, there may be leftover unused space, even without padding! Use [*point*.align](#point_align) to specify how the leftover space is distributed. - -<a name="point_padding" href="#point_padding">#</a> <i>point</i>.<b>padding</b>([<i>padding</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scalepoint) - -If *padding* is specified, sets the outer padding to the specified number which is typically in the range [0, 1]. If *padding* is not specified, returns the current outer padding which defaults to 0. The outer padding specifies the amount of blank space, in terms of multiples of the [step](#band_step), to reserve before the first point and after the last point. Equivalent to [*band*.paddingOuter](#band_paddingOuter). - -<a name="point_align" href="#point_align">#</a> <i>point</i>.<b>align</b>([<i>align</i>]) · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scalepoint) - -If *align* is specified, sets the alignment to the specified value which must be in the range [0, 1]. If *align* is not specified, returns the current alignment which defaults to 0.5. The alignment specifies how any leftover unused space in the range is distributed. A value of 0.5 indicates that the leftover space should be equally distributed before the first point and after the last point; *i.e.*, the points should be centered within the range. A value of 0 or 1 may be used to shift the points to one side, say to position them adjacent to an axis. - -<a name="point_bandwidth" href="#point_bandwidth">#</a> <i>point</i>.<b>bandwidth</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scalepoint) - -Returns zero. - -<a name="point_step" href="#point_step">#</a> <i>point</i>.<b>step</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scalepoint) - -Returns the distance between the starts of adjacent points. - -<a name="point_copy" href="#point_copy">#</a> <i>point</i>.<b>copy</b>() · [Source](https://github.com/d3/d3-scale/blob/master/src/band.js), [Examples](https://observablehq.com/@d3/d3-scalepoint) - -Returns an exact copy of this scale. Changes to this scale will not affect the returned scale, and vice versa. diff --git a/node_modules/d3-scale/dist/d3-scale.js b/node_modules/d3-scale/dist/d3-scale.js deleted file mode 100644 index 7a8c7e1e439a35a3f61d697acbb9ce5ee76acc89..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/dist/d3-scale.js +++ /dev/null @@ -1,1267 +0,0 @@ -// https://d3js.org/d3-scale/ v3.2.3 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-array'), require('d3-interpolate'), require('d3-format'), require('d3-time'), require('d3-time-format')) : -typeof define === 'function' && define.amd ? define(['exports', 'd3-array', 'd3-interpolate', 'd3-format', 'd3-time', 'd3-time-format'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {}, global.d3, global.d3, global.d3, global.d3, global.d3)); -}(this, function (exports, d3Array, d3Interpolate, d3Format, d3Time, d3TimeFormat) { 'use strict'; - -function initRange(domain, range) { - switch (arguments.length) { - case 0: break; - case 1: this.range(domain); break; - default: this.range(range).domain(domain); break; - } - return this; -} - -function initInterpolator(domain, interpolator) { - switch (arguments.length) { - case 0: break; - case 1: { - if (typeof domain === "function") this.interpolator(domain); - else this.range(domain); - break; - } - default: { - this.domain(domain); - if (typeof interpolator === "function") this.interpolator(interpolator); - else this.range(interpolator); - break; - } - } - return this; -} - -const implicit = Symbol("implicit"); - -function ordinal() { - var index = new Map(), - domain = [], - range = [], - unknown = implicit; - - function scale(d) { - var key = d + "", i = index.get(key); - if (!i) { - if (unknown !== implicit) return unknown; - index.set(key, i = domain.push(d)); - } - return range[(i - 1) % range.length]; - } - - scale.domain = function(_) { - if (!arguments.length) return domain.slice(); - domain = [], index = new Map(); - for (const value of _) { - const key = value + ""; - if (index.has(key)) continue; - index.set(key, domain.push(value)); - } - return scale; - }; - - scale.range = function(_) { - return arguments.length ? (range = Array.from(_), scale) : range.slice(); - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.copy = function() { - return ordinal(domain, range).unknown(unknown); - }; - - initRange.apply(scale, arguments); - - return scale; -} - -function band() { - var scale = ordinal().unknown(undefined), - domain = scale.domain, - ordinalRange = scale.range, - r0 = 0, - r1 = 1, - step, - bandwidth, - round = false, - paddingInner = 0, - paddingOuter = 0, - align = 0.5; - - delete scale.unknown; - - function rescale() { - var n = domain().length, - reverse = r1 < r0, - start = reverse ? r1 : r0, - stop = reverse ? r0 : r1; - step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2); - if (round) step = Math.floor(step); - start += (stop - start - step * (n - paddingInner)) * align; - bandwidth = step * (1 - paddingInner); - if (round) start = Math.round(start), bandwidth = Math.round(bandwidth); - var values = d3Array.range(n).map(function(i) { return start + step * i; }); - return ordinalRange(reverse ? values.reverse() : values); - } - - scale.domain = function(_) { - return arguments.length ? (domain(_), rescale()) : domain(); - }; - - scale.range = function(_) { - return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1]; - }; - - scale.rangeRound = function(_) { - return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale(); - }; - - scale.bandwidth = function() { - return bandwidth; - }; - - scale.step = function() { - return step; - }; - - scale.round = function(_) { - return arguments.length ? (round = !!_, rescale()) : round; - }; - - scale.padding = function(_) { - return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner; - }; - - scale.paddingInner = function(_) { - return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner; - }; - - scale.paddingOuter = function(_) { - return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter; - }; - - scale.align = function(_) { - return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align; - }; - - scale.copy = function() { - return band(domain(), [r0, r1]) - .round(round) - .paddingInner(paddingInner) - .paddingOuter(paddingOuter) - .align(align); - }; - - return initRange.apply(rescale(), arguments); -} - -function pointish(scale) { - var copy = scale.copy; - - scale.padding = scale.paddingOuter; - delete scale.paddingInner; - delete scale.paddingOuter; - - scale.copy = function() { - return pointish(copy()); - }; - - return scale; -} - -function point() { - return pointish(band.apply(null, arguments).paddingInner(1)); -} - -function constants(x) { - return function() { - return x; - }; -} - -function number(x) { - return +x; -} - -var unit = [0, 1]; - -function identity(x) { - return x; -} - -function normalize(a, b) { - return (b -= (a = +a)) - ? function(x) { return (x - a) / b; } - : constants(isNaN(b) ? NaN : 0.5); -} - -function clamper(a, b) { - var t; - if (a > b) t = a, a = b, b = t; - return function(x) { return Math.max(a, Math.min(b, x)); }; -} - -// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1]. -// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b]. -function bimap(domain, range, interpolate) { - var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1]; - if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0); - else d0 = normalize(d0, d1), r0 = interpolate(r0, r1); - return function(x) { return r0(d0(x)); }; -} - -function polymap(domain, range, interpolate) { - var j = Math.min(domain.length, range.length) - 1, - d = new Array(j), - r = new Array(j), - i = -1; - - // Reverse descending domains. - if (domain[j] < domain[0]) { - domain = domain.slice().reverse(); - range = range.slice().reverse(); - } - - while (++i < j) { - d[i] = normalize(domain[i], domain[i + 1]); - r[i] = interpolate(range[i], range[i + 1]); - } - - return function(x) { - var i = d3Array.bisect(domain, x, 1, j) - 1; - return r[i](d[i](x)); - }; -} - -function copy(source, target) { - return target - .domain(source.domain()) - .range(source.range()) - .interpolate(source.interpolate()) - .clamp(source.clamp()) - .unknown(source.unknown()); -} - -function transformer() { - var domain = unit, - range = unit, - interpolate = d3Interpolate.interpolate, - transform, - untransform, - unknown, - clamp = identity, - piecewise, - output, - input; - - function rescale() { - var n = Math.min(domain.length, range.length); - if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]); - piecewise = n > 2 ? polymap : bimap; - output = input = null; - return scale; - } - - function scale(x) { - return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x))); - } - - scale.invert = function(y) { - return clamp(untransform((input || (input = piecewise(range, domain.map(transform), d3Interpolate.interpolateNumber)))(y))); - }; - - scale.domain = function(_) { - return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice(); - }; - - scale.range = function(_) { - return arguments.length ? (range = Array.from(_), rescale()) : range.slice(); - }; - - scale.rangeRound = function(_) { - return range = Array.from(_), interpolate = d3Interpolate.interpolateRound, rescale(); - }; - - scale.clamp = function(_) { - return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity; - }; - - scale.interpolate = function(_) { - return arguments.length ? (interpolate = _, rescale()) : interpolate; - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - return function(t, u) { - transform = t, untransform = u; - return rescale(); - }; -} - -function continuous() { - return transformer()(identity, identity); -} - -function tickFormat(start, stop, count, specifier) { - var step = d3Array.tickStep(start, stop, count), - precision; - specifier = d3Format.formatSpecifier(specifier == null ? ",f" : specifier); - switch (specifier.type) { - case "s": { - var value = Math.max(Math.abs(start), Math.abs(stop)); - if (specifier.precision == null && !isNaN(precision = d3Format.precisionPrefix(step, value))) specifier.precision = precision; - return d3Format.formatPrefix(specifier, value); - } - case "": - case "e": - case "g": - case "p": - case "r": { - if (specifier.precision == null && !isNaN(precision = d3Format.precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e"); - break; - } - case "f": - case "%": { - if (specifier.precision == null && !isNaN(precision = d3Format.precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2; - break; - } - } - return d3Format.format(specifier); -} - -function linearish(scale) { - var domain = scale.domain; - - scale.ticks = function(count) { - var d = domain(); - return d3Array.ticks(d[0], d[d.length - 1], count == null ? 10 : count); - }; - - scale.tickFormat = function(count, specifier) { - var d = domain(); - return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier); - }; - - scale.nice = function(count) { - if (count == null) count = 10; - - var d = domain(); - var i0 = 0; - var i1 = d.length - 1; - var start = d[i0]; - var stop = d[i1]; - var prestep; - var step; - var maxIter = 10; - - if (stop < start) { - step = start, start = stop, stop = step; - step = i0, i0 = i1, i1 = step; - } - - while (maxIter-- > 0) { - step = d3Array.tickIncrement(start, stop, count); - if (step === prestep) { - d[i0] = start; - d[i1] = stop; - return domain(d); - } else if (step > 0) { - start = Math.floor(start / step) * step; - stop = Math.ceil(stop / step) * step; - } else if (step < 0) { - start = Math.ceil(start * step) / step; - stop = Math.floor(stop * step) / step; - } else { - break; - } - prestep = step; - } - - return scale; - }; - - return scale; -} - -function linear() { - var scale = continuous(); - - scale.copy = function() { - return copy(scale, linear()); - }; - - initRange.apply(scale, arguments); - - return linearish(scale); -} - -function identity$1(domain) { - var unknown; - - function scale(x) { - return isNaN(x = +x) ? unknown : x; - } - - scale.invert = scale; - - scale.domain = scale.range = function(_) { - return arguments.length ? (domain = Array.from(_, number), scale) : domain.slice(); - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.copy = function() { - return identity$1(domain).unknown(unknown); - }; - - domain = arguments.length ? Array.from(domain, number) : [0, 1]; - - return linearish(scale); -} - -function nice(domain, interval) { - domain = domain.slice(); - - var i0 = 0, - i1 = domain.length - 1, - x0 = domain[i0], - x1 = domain[i1], - t; - - if (x1 < x0) { - t = i0, i0 = i1, i1 = t; - t = x0, x0 = x1, x1 = t; - } - - domain[i0] = interval.floor(x0); - domain[i1] = interval.ceil(x1); - return domain; -} - -function transformLog(x) { - return Math.log(x); -} - -function transformExp(x) { - return Math.exp(x); -} - -function transformLogn(x) { - return -Math.log(-x); -} - -function transformExpn(x) { - return -Math.exp(-x); -} - -function pow10(x) { - return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x; -} - -function powp(base) { - return base === 10 ? pow10 - : base === Math.E ? Math.exp - : function(x) { return Math.pow(base, x); }; -} - -function logp(base) { - return base === Math.E ? Math.log - : base === 10 && Math.log10 - || base === 2 && Math.log2 - || (base = Math.log(base), function(x) { return Math.log(x) / base; }); -} - -function reflect(f) { - return function(x) { - return -f(-x); - }; -} - -function loggish(transform) { - var scale = transform(transformLog, transformExp), - domain = scale.domain, - base = 10, - logs, - pows; - - function rescale() { - logs = logp(base), pows = powp(base); - if (domain()[0] < 0) { - logs = reflect(logs), pows = reflect(pows); - transform(transformLogn, transformExpn); - } else { - transform(transformLog, transformExp); - } - return scale; - } - - scale.base = function(_) { - return arguments.length ? (base = +_, rescale()) : base; - }; - - scale.domain = function(_) { - return arguments.length ? (domain(_), rescale()) : domain(); - }; - - scale.ticks = function(count) { - var d = domain(), - u = d[0], - v = d[d.length - 1], - r; - - if (r = v < u) i = u, u = v, v = i; - - var i = logs(u), - j = logs(v), - p, - k, - t, - n = count == null ? 10 : +count, - z = []; - - if (!(base % 1) && j - i < n) { - i = Math.floor(i), j = Math.ceil(j); - if (u > 0) for (; i <= j; ++i) { - for (k = 1, p = pows(i); k < base; ++k) { - t = p * k; - if (t < u) continue; - if (t > v) break; - z.push(t); - } - } else for (; i <= j; ++i) { - for (k = base - 1, p = pows(i); k >= 1; --k) { - t = p * k; - if (t < u) continue; - if (t > v) break; - z.push(t); - } - } - if (z.length * 2 < n) z = d3Array.ticks(u, v, n); - } else { - z = d3Array.ticks(i, j, Math.min(j - i, n)).map(pows); - } - - return r ? z.reverse() : z; - }; - - scale.tickFormat = function(count, specifier) { - if (specifier == null) specifier = base === 10 ? ".0e" : ","; - if (typeof specifier !== "function") specifier = d3Format.format(specifier); - if (count === Infinity) return specifier; - if (count == null) count = 10; - var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate? - return function(d) { - var i = d / pows(Math.round(logs(d))); - if (i * base < base - 0.5) i *= base; - return i <= k ? specifier(d) : ""; - }; - }; - - scale.nice = function() { - return domain(nice(domain(), { - floor: function(x) { return pows(Math.floor(logs(x))); }, - ceil: function(x) { return pows(Math.ceil(logs(x))); } - })); - }; - - return scale; -} - -function log() { - var scale = loggish(transformer()).domain([1, 10]); - - scale.copy = function() { - return copy(scale, log()).base(scale.base()); - }; - - initRange.apply(scale, arguments); - - return scale; -} - -function transformSymlog(c) { - return function(x) { - return Math.sign(x) * Math.log1p(Math.abs(x / c)); - }; -} - -function transformSymexp(c) { - return function(x) { - return Math.sign(x) * Math.expm1(Math.abs(x)) * c; - }; -} - -function symlogish(transform) { - var c = 1, scale = transform(transformSymlog(c), transformSymexp(c)); - - scale.constant = function(_) { - return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c; - }; - - return linearish(scale); -} - -function symlog() { - var scale = symlogish(transformer()); - - scale.copy = function() { - return copy(scale, symlog()).constant(scale.constant()); - }; - - return initRange.apply(scale, arguments); -} - -function transformPow(exponent) { - return function(x) { - return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent); - }; -} - -function transformSqrt(x) { - return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x); -} - -function transformSquare(x) { - return x < 0 ? -x * x : x * x; -} - -function powish(transform) { - var scale = transform(identity, identity), - exponent = 1; - - function rescale() { - return exponent === 1 ? transform(identity, identity) - : exponent === 0.5 ? transform(transformSqrt, transformSquare) - : transform(transformPow(exponent), transformPow(1 / exponent)); - } - - scale.exponent = function(_) { - return arguments.length ? (exponent = +_, rescale()) : exponent; - }; - - return linearish(scale); -} - -function pow() { - var scale = powish(transformer()); - - scale.copy = function() { - return copy(scale, pow()).exponent(scale.exponent()); - }; - - initRange.apply(scale, arguments); - - return scale; -} - -function sqrt() { - return pow.apply(null, arguments).exponent(0.5); -} - -function square(x) { - return Math.sign(x) * x * x; -} - -function unsquare(x) { - return Math.sign(x) * Math.sqrt(Math.abs(x)); -} - -function radial() { - var squared = continuous(), - range = [0, 1], - round = false, - unknown; - - function scale(x) { - var y = unsquare(squared(x)); - return isNaN(y) ? unknown : round ? Math.round(y) : y; - } - - scale.invert = function(y) { - return squared.invert(square(y)); - }; - - scale.domain = function(_) { - return arguments.length ? (squared.domain(_), scale) : squared.domain(); - }; - - scale.range = function(_) { - return arguments.length ? (squared.range((range = Array.from(_, number)).map(square)), scale) : range.slice(); - }; - - scale.rangeRound = function(_) { - return scale.range(_).round(true); - }; - - scale.round = function(_) { - return arguments.length ? (round = !!_, scale) : round; - }; - - scale.clamp = function(_) { - return arguments.length ? (squared.clamp(_), scale) : squared.clamp(); - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.copy = function() { - return radial(squared.domain(), range) - .round(round) - .clamp(squared.clamp()) - .unknown(unknown); - }; - - initRange.apply(scale, arguments); - - return linearish(scale); -} - -function quantile() { - var domain = [], - range = [], - thresholds = [], - unknown; - - function rescale() { - var i = 0, n = Math.max(1, range.length); - thresholds = new Array(n - 1); - while (++i < n) thresholds[i - 1] = d3Array.quantileSorted(domain, i / n); - return scale; - } - - function scale(x) { - return isNaN(x = +x) ? unknown : range[d3Array.bisect(thresholds, x)]; - } - - scale.invertExtent = function(y) { - var i = range.indexOf(y); - return i < 0 ? [NaN, NaN] : [ - i > 0 ? thresholds[i - 1] : domain[0], - i < thresholds.length ? thresholds[i] : domain[domain.length - 1] - ]; - }; - - scale.domain = function(_) { - if (!arguments.length) return domain.slice(); - domain = []; - for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d); - domain.sort(d3Array.ascending); - return rescale(); - }; - - scale.range = function(_) { - return arguments.length ? (range = Array.from(_), rescale()) : range.slice(); - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.quantiles = function() { - return thresholds.slice(); - }; - - scale.copy = function() { - return quantile() - .domain(domain) - .range(range) - .unknown(unknown); - }; - - return initRange.apply(scale, arguments); -} - -function quantize() { - var x0 = 0, - x1 = 1, - n = 1, - domain = [0.5], - range = [0, 1], - unknown; - - function scale(x) { - return x <= x ? range[d3Array.bisect(domain, x, 0, n)] : unknown; - } - - function rescale() { - var i = -1; - domain = new Array(n); - while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1); - return scale; - } - - scale.domain = function(_) { - return arguments.length ? ([x0, x1] = _, x0 = +x0, x1 = +x1, rescale()) : [x0, x1]; - }; - - scale.range = function(_) { - return arguments.length ? (n = (range = Array.from(_)).length - 1, rescale()) : range.slice(); - }; - - scale.invertExtent = function(y) { - var i = range.indexOf(y); - return i < 0 ? [NaN, NaN] - : i < 1 ? [x0, domain[0]] - : i >= n ? [domain[n - 1], x1] - : [domain[i - 1], domain[i]]; - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : scale; - }; - - scale.thresholds = function() { - return domain.slice(); - }; - - scale.copy = function() { - return quantize() - .domain([x0, x1]) - .range(range) - .unknown(unknown); - }; - - return initRange.apply(linearish(scale), arguments); -} - -function threshold() { - var domain = [0.5], - range = [0, 1], - unknown, - n = 1; - - function scale(x) { - return x <= x ? range[d3Array.bisect(domain, x, 0, n)] : unknown; - } - - scale.domain = function(_) { - return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice(); - }; - - scale.range = function(_) { - return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice(); - }; - - scale.invertExtent = function(y) { - var i = range.indexOf(y); - return [domain[i - 1], domain[i]]; - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.copy = function() { - return threshold() - .domain(domain) - .range(range) - .unknown(unknown); - }; - - return initRange.apply(scale, arguments); -} - -var durationSecond = 1000, - durationMinute = durationSecond * 60, - durationHour = durationMinute * 60, - durationDay = durationHour * 24, - durationWeek = durationDay * 7, - durationMonth = durationDay * 30, - durationYear = durationDay * 365; - -function date(t) { - return new Date(t); -} - -function number$1(t) { - return t instanceof Date ? +t : +new Date(+t); -} - -function calendar(year, month, week, day, hour, minute, second, millisecond, format) { - var scale = continuous(), - invert = scale.invert, - domain = scale.domain; - - var formatMillisecond = format(".%L"), - formatSecond = format(":%S"), - formatMinute = format("%I:%M"), - formatHour = format("%I %p"), - formatDay = format("%a %d"), - formatWeek = format("%b %d"), - formatMonth = format("%B"), - formatYear = format("%Y"); - - var tickIntervals = [ - [second, 1, durationSecond], - [second, 5, 5 * durationSecond], - [second, 15, 15 * durationSecond], - [second, 30, 30 * durationSecond], - [minute, 1, durationMinute], - [minute, 5, 5 * durationMinute], - [minute, 15, 15 * durationMinute], - [minute, 30, 30 * durationMinute], - [ hour, 1, durationHour ], - [ hour, 3, 3 * durationHour ], - [ hour, 6, 6 * durationHour ], - [ hour, 12, 12 * durationHour ], - [ day, 1, durationDay ], - [ day, 2, 2 * durationDay ], - [ week, 1, durationWeek ], - [ month, 1, durationMonth ], - [ month, 3, 3 * durationMonth ], - [ year, 1, durationYear ] - ]; - - function tickFormat(date) { - return (second(date) < date ? formatMillisecond - : minute(date) < date ? formatSecond - : hour(date) < date ? formatMinute - : day(date) < date ? formatHour - : month(date) < date ? (week(date) < date ? formatDay : formatWeek) - : year(date) < date ? formatMonth - : formatYear)(date); - } - - function tickInterval(interval, start, stop) { - if (interval == null) interval = 10; - - // If a desired tick count is specified, pick a reasonable tick interval - // based on the extent of the domain and a rough estimate of tick size. - // Otherwise, assume interval is already a time interval and use it. - if (typeof interval === "number") { - var target = Math.abs(stop - start) / interval, - i = d3Array.bisector(function(i) { return i[2]; }).right(tickIntervals, target), - step; - if (i === tickIntervals.length) { - step = d3Array.tickStep(start / durationYear, stop / durationYear, interval); - interval = year; - } else if (i) { - i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i]; - step = i[1]; - interval = i[0]; - } else { - step = Math.max(d3Array.tickStep(start, stop, interval), 1); - interval = millisecond; - } - return interval.every(step); - } - - return interval; - } - - scale.invert = function(y) { - return new Date(invert(y)); - }; - - scale.domain = function(_) { - return arguments.length ? domain(Array.from(_, number$1)) : domain().map(date); - }; - - scale.ticks = function(interval) { - var d = domain(), - t0 = d[0], - t1 = d[d.length - 1], - r = t1 < t0, - t; - if (r) t = t0, t0 = t1, t1 = t; - t = tickInterval(interval, t0, t1); - t = t ? t.range(t0, t1 + 1) : []; // inclusive stop - return r ? t.reverse() : t; - }; - - scale.tickFormat = function(count, specifier) { - return specifier == null ? tickFormat : format(specifier); - }; - - scale.nice = function(interval) { - var d = domain(); - return (interval = tickInterval(interval, d[0], d[d.length - 1])) - ? domain(nice(d, interval)) - : scale; - }; - - scale.copy = function() { - return copy(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format)); - }; - - return scale; -} - -function time() { - return initRange.apply(calendar(d3Time.timeYear, d3Time.timeMonth, d3Time.timeWeek, d3Time.timeDay, d3Time.timeHour, d3Time.timeMinute, d3Time.timeSecond, d3Time.timeMillisecond, d3TimeFormat.timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments); -} - -function utcTime() { - return initRange.apply(calendar(d3Time.utcYear, d3Time.utcMonth, d3Time.utcWeek, d3Time.utcDay, d3Time.utcHour, d3Time.utcMinute, d3Time.utcSecond, d3Time.utcMillisecond, d3TimeFormat.utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments); -} - -function transformer$1() { - var x0 = 0, - x1 = 1, - t0, - t1, - k10, - transform, - interpolator = identity, - clamp = false, - unknown; - - function scale(x) { - return isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x)); - } - - scale.domain = function(_) { - return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1]; - }; - - scale.clamp = function(_) { - return arguments.length ? (clamp = !!_, scale) : clamp; - }; - - scale.interpolator = function(_) { - return arguments.length ? (interpolator = _, scale) : interpolator; - }; - - function range(interpolate) { - return function(_) { - var r0, r1; - return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)]; - }; - } - - scale.range = range(d3Interpolate.interpolate); - - scale.rangeRound = range(d3Interpolate.interpolateRound); - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - return function(t) { - transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0); - return scale; - }; -} - -function copy$1(source, target) { - return target - .domain(source.domain()) - .interpolator(source.interpolator()) - .clamp(source.clamp()) - .unknown(source.unknown()); -} - -function sequential() { - var scale = linearish(transformer$1()(identity)); - - scale.copy = function() { - return copy$1(scale, sequential()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function sequentialLog() { - var scale = loggish(transformer$1()).domain([1, 10]); - - scale.copy = function() { - return copy$1(scale, sequentialLog()).base(scale.base()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function sequentialSymlog() { - var scale = symlogish(transformer$1()); - - scale.copy = function() { - return copy$1(scale, sequentialSymlog()).constant(scale.constant()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function sequentialPow() { - var scale = powish(transformer$1()); - - scale.copy = function() { - return copy$1(scale, sequentialPow()).exponent(scale.exponent()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function sequentialSqrt() { - return sequentialPow.apply(null, arguments).exponent(0.5); -} - -function sequentialQuantile() { - var domain = [], - interpolator = identity; - - function scale(x) { - if (!isNaN(x = +x)) return interpolator((d3Array.bisect(domain, x, 1) - 1) / (domain.length - 1)); - } - - scale.domain = function(_) { - if (!arguments.length) return domain.slice(); - domain = []; - for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d); - domain.sort(d3Array.ascending); - return scale; - }; - - scale.interpolator = function(_) { - return arguments.length ? (interpolator = _, scale) : interpolator; - }; - - scale.range = function() { - return domain.map((d, i) => interpolator(i / (domain.length - 1))); - }; - - scale.quantiles = function(n) { - return Array.from({length: n + 1}, (_, i) => d3Array.quantile(domain, i / n)); - }; - - scale.copy = function() { - return sequentialQuantile(interpolator).domain(domain); - }; - - return initInterpolator.apply(scale, arguments); -} - -function transformer$2() { - var x0 = 0, - x1 = 0.5, - x2 = 1, - s = 1, - t0, - t1, - t2, - k10, - k21, - interpolator = identity, - transform, - clamp = false, - unknown; - - function scale(x) { - return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x)); - } - - scale.domain = function(_) { - return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2]; - }; - - scale.clamp = function(_) { - return arguments.length ? (clamp = !!_, scale) : clamp; - }; - - scale.interpolator = function(_) { - return arguments.length ? (interpolator = _, scale) : interpolator; - }; - - function range(interpolate) { - return function(_) { - var r0, r1, r2; - return arguments.length ? ([r0, r1, r2] = _, interpolator = d3Interpolate.piecewise(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)]; - }; - } - - scale.range = range(d3Interpolate.interpolate); - - scale.rangeRound = range(d3Interpolate.interpolateRound); - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - return function(t) { - transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1; - return scale; - }; -} - -function diverging() { - var scale = linearish(transformer$2()(identity)); - - scale.copy = function() { - return copy$1(scale, diverging()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function divergingLog() { - var scale = loggish(transformer$2()).domain([0.1, 1, 10]); - - scale.copy = function() { - return copy$1(scale, divergingLog()).base(scale.base()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function divergingSymlog() { - var scale = symlogish(transformer$2()); - - scale.copy = function() { - return copy$1(scale, divergingSymlog()).constant(scale.constant()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function divergingPow() { - var scale = powish(transformer$2()); - - scale.copy = function() { - return copy$1(scale, divergingPow()).exponent(scale.exponent()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function divergingSqrt() { - return divergingPow.apply(null, arguments).exponent(0.5); -} - -exports.scaleBand = band; -exports.scaleDiverging = diverging; -exports.scaleDivergingLog = divergingLog; -exports.scaleDivergingPow = divergingPow; -exports.scaleDivergingSqrt = divergingSqrt; -exports.scaleDivergingSymlog = divergingSymlog; -exports.scaleIdentity = identity$1; -exports.scaleImplicit = implicit; -exports.scaleLinear = linear; -exports.scaleLog = log; -exports.scaleOrdinal = ordinal; -exports.scalePoint = point; -exports.scalePow = pow; -exports.scaleQuantile = quantile; -exports.scaleQuantize = quantize; -exports.scaleRadial = radial; -exports.scaleSequential = sequential; -exports.scaleSequentialLog = sequentialLog; -exports.scaleSequentialPow = sequentialPow; -exports.scaleSequentialQuantile = sequentialQuantile; -exports.scaleSequentialSqrt = sequentialSqrt; -exports.scaleSequentialSymlog = sequentialSymlog; -exports.scaleSqrt = sqrt; -exports.scaleSymlog = symlog; -exports.scaleThreshold = threshold; -exports.scaleTime = time; -exports.scaleUtc = utcTime; -exports.tickFormat = tickFormat; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-scale/dist/d3-scale.min.js b/node_modules/d3-scale/dist/d3-scale.min.js deleted file mode 100644 index 81799bfa1978f99add60691fc5fd0969f11928db..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/dist/d3-scale.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-scale/ v3.2.3 Copyright 2020 Mike Bostock -!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-array"),require("d3-interpolate"),require("d3-format"),require("d3-time"),require("d3-time-format")):"function"==typeof define&&define.amd?define(["exports","d3-array","d3-interpolate","d3-format","d3-time","d3-time-format"],t):t((n=n||self).d3=n.d3||{},n.d3,n.d3,n.d3,n.d3,n.d3)}(this,function(n,t,r,e,u,i){"use strict";function o(n,t){switch(arguments.length){case 0:break;case 1:this.range(n);break;default:this.range(t).domain(n)}return this}function a(n,t){switch(arguments.length){case 0:break;case 1:"function"==typeof n?this.interpolator(n):this.range(n);break;default:this.domain(n),"function"==typeof t?this.interpolator(t):this.range(t)}return this}const c=Symbol("implicit");function f(){var n=new Map,t=[],r=[],e=c;function u(u){var i=u+"",o=n.get(i);if(!o){if(e!==c)return e;n.set(i,o=t.push(u))}return r[(o-1)%r.length]}return u.domain=function(r){if(!arguments.length)return t.slice();t=[],n=new Map;for(const e of r){const r=e+"";n.has(r)||n.set(r,t.push(e))}return u},u.range=function(n){return arguments.length?(r=Array.from(n),u):r.slice()},u.unknown=function(n){return arguments.length?(e=n,u):e},u.copy=function(){return f(t,r).unknown(e)},o.apply(u,arguments),u}function l(){var n,r,e=f().unknown(void 0),u=e.domain,i=e.range,a=0,c=1,p=!1,s=0,h=0,g=.5;function m(){var e=u().length,o=c<a,f=o?c:a,l=o?a:c;n=(l-f)/Math.max(1,e-s+2*h),p&&(n=Math.floor(n)),f+=(l-f-n*(e-s))*g,r=n*(1-s),p&&(f=Math.round(f),r=Math.round(r));var m=t.range(e).map(function(t){return f+n*t});return i(o?m.reverse():m)}return delete e.unknown,e.domain=function(n){return arguments.length?(u(n),m()):u()},e.range=function(n){return arguments.length?([a,c]=n,a=+a,c=+c,m()):[a,c]},e.rangeRound=function(n){return[a,c]=n,a=+a,c=+c,p=!0,m()},e.bandwidth=function(){return r},e.step=function(){return n},e.round=function(n){return arguments.length?(p=!!n,m()):p},e.padding=function(n){return arguments.length?(s=Math.min(1,h=+n),m()):s},e.paddingInner=function(n){return arguments.length?(s=Math.min(1,n),m()):s},e.paddingOuter=function(n){return arguments.length?(h=+n,m()):h},e.align=function(n){return arguments.length?(g=Math.max(0,Math.min(1,n)),m()):g},e.copy=function(){return l(u(),[a,c]).round(p).paddingInner(s).paddingOuter(h).align(g)},o.apply(m(),arguments)}function p(n){return+n}var s=[0,1];function h(n){return n}function g(n,t){return(t-=n=+n)?function(r){return(r-n)/t}:(r=isNaN(t)?NaN:.5,function(){return r});var r}function m(n,t,r){var e=n[0],u=n[1],i=t[0],o=t[1];return u<e?(e=g(u,e),i=r(o,i)):(e=g(e,u),i=r(i,o)),function(n){return i(e(n))}}function d(n,r,e){var u=Math.min(n.length,r.length)-1,i=new Array(u),o=new Array(u),a=-1;for(n[u]<n[0]&&(n=n.slice().reverse(),r=r.slice().reverse());++a<u;)i[a]=g(n[a],n[a+1]),o[a]=e(r[a],r[a+1]);return function(r){var e=t.bisect(n,r,1,u)-1;return o[e](i[e](r))}}function y(n,t){return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown())}function v(){var n,t,e,u,i,o,a=s,c=s,f=r.interpolate,l=h;function g(){var n,t,r,e=Math.min(a.length,c.length);return l!==h&&(n=a[0],t=a[e-1],n>t&&(r=n,n=t,t=r),l=function(r){return Math.max(n,Math.min(t,r))}),u=e>2?d:m,i=o=null,y}function y(t){return isNaN(t=+t)?e:(i||(i=u(a.map(n),c,f)))(n(l(t)))}return y.invert=function(e){return l(t((o||(o=u(c,a.map(n),r.interpolateNumber)))(e)))},y.domain=function(n){return arguments.length?(a=Array.from(n,p),g()):a.slice()},y.range=function(n){return arguments.length?(c=Array.from(n),g()):c.slice()},y.rangeRound=function(n){return c=Array.from(n),f=r.interpolateRound,g()},y.clamp=function(n){return arguments.length?(l=!!n||h,g()):l!==h},y.interpolate=function(n){return arguments.length?(f=n,g()):f},y.unknown=function(n){return arguments.length?(e=n,y):e},function(r,e){return n=r,t=e,g()}}function M(){return v()(h,h)}function k(n,r,u,i){var o,a=t.tickStep(n,r,u);switch((i=e.formatSpecifier(null==i?",f":i)).type){case"s":var c=Math.max(Math.abs(n),Math.abs(r));return null!=i.precision||isNaN(o=e.precisionPrefix(a,c))||(i.precision=o),e.formatPrefix(i,c);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=e.precisionRound(a,Math.max(Math.abs(n),Math.abs(r))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=e.precisionFixed(a))||(i.precision=o-2*("%"===i.type))}return e.format(i)}function w(n){var r=n.domain;return n.ticks=function(n){var e=r();return t.ticks(e[0],e[e.length-1],null==n?10:n)},n.tickFormat=function(n,t){var e=r();return k(e[0],e[e.length-1],null==n?10:n,t)},n.nice=function(e){null==e&&(e=10);var u,i,o=r(),a=0,c=o.length-1,f=o[a],l=o[c],p=10;for(l<f&&(i=f,f=l,l=i,i=a,a=c,c=i);p-- >0;){if((i=t.tickIncrement(f,l,e))===u)return o[a]=f,o[c]=l,r(o);if(i>0)f=Math.floor(f/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;f=Math.ceil(f*i)/i,l=Math.floor(l*i)/i}u=i}return n},n}function N(n,t){var r,e=0,u=(n=n.slice()).length-1,i=n[e],o=n[u];return o<i&&(r=e,e=u,u=r,r=i,i=o,o=r),n[e]=t.floor(i),n[u]=t.ceil(o),n}function b(n){return Math.log(n)}function x(n){return Math.exp(n)}function q(n){return-Math.log(-n)}function S(n){return-Math.exp(-n)}function A(n){return isFinite(n)?+("1e"+n):n<0?0:n}function D(n){return function(t){return-n(-t)}}function R(n){var r,u,i=n(b,x),o=i.domain,a=10;function c(){return r=function(n){return n===Math.E?Math.log:10===n&&Math.log10||2===n&&Math.log2||(n=Math.log(n),function(t){return Math.log(t)/n})}(a),u=function(n){return 10===n?A:n===Math.E?Math.exp:function(t){return Math.pow(n,t)}}(a),o()[0]<0?(r=D(r),u=D(u),n(q,S)):n(b,x),i}return i.base=function(n){return arguments.length?(a=+n,c()):a},i.domain=function(n){return arguments.length?(o(n),c()):o()},i.ticks=function(n){var e,i=o(),c=i[0],f=i[i.length-1];(e=f<c)&&(h=c,c=f,f=h);var l,p,s,h=r(c),g=r(f),m=null==n?10:+n,d=[];if(!(a%1)&&g-h<m){if(h=Math.floor(h),g=Math.ceil(g),c>0){for(;h<=g;++h)for(p=1,l=u(h);p<a;++p)if(!((s=l*p)<c)){if(s>f)break;d.push(s)}}else for(;h<=g;++h)for(p=a-1,l=u(h);p>=1;--p)if(!((s=l*p)<c)){if(s>f)break;d.push(s)}2*d.length<m&&(d=t.ticks(c,f,m))}else d=t.ticks(h,g,Math.min(g-h,m)).map(u);return e?d.reverse():d},i.tickFormat=function(n,t){if(null==t&&(t=10===a?".0e":","),"function"!=typeof t&&(t=e.format(t)),n===1/0)return t;null==n&&(n=10);var o=Math.max(1,a*n/i.ticks().length);return function(n){var e=n/u(Math.round(r(n)));return e*a<a-.5&&(e*=a),e<=o?t(n):""}},i.nice=function(){return o(N(o(),{floor:function(n){return u(Math.floor(r(n)))},ceil:function(n){return u(Math.ceil(r(n)))}}))},i}function I(n){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/n))}}function O(n){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*n}}function F(n){var t=1,r=n(I(t),O(t));return r.constant=function(r){return arguments.length?n(I(t=+r),O(t)):t},w(r)}function P(n){return function(t){return t<0?-Math.pow(-t,n):Math.pow(t,n)}}function E(n){return n<0?-Math.sqrt(-n):Math.sqrt(n)}function L(n){return n<0?-n*n:n*n}function T(n){var t=n(h,h),r=1;function e(){return 1===r?n(h,h):.5===r?n(E,L):n(P(r),P(1/r))}return t.exponent=function(n){return arguments.length?(r=+n,e()):r},w(t)}function Q(){var n=T(v());return n.copy=function(){return y(n,Q()).exponent(n.exponent())},o.apply(n,arguments),n}function U(n){return Math.sign(n)*n*n}var Y=1e3,j=60*Y,B=60*j,C=24*B,H=7*C,W=30*C,_=365*C;function z(n){return new Date(n)}function G(n){return n instanceof Date?+n:+new Date(+n)}function J(n,r,e,u,i,o,a,c,f){var l=M(),p=l.invert,s=l.domain,h=f(".%L"),g=f(":%S"),m=f("%I:%M"),d=f("%I %p"),v=f("%a %d"),k=f("%b %d"),w=f("%B"),b=f("%Y"),x=[[a,1,Y],[a,5,5*Y],[a,15,15*Y],[a,30,30*Y],[o,1,j],[o,5,5*j],[o,15,15*j],[o,30,30*j],[i,1,B],[i,3,3*B],[i,6,6*B],[i,12,12*B],[u,1,C],[u,2,2*C],[e,1,H],[r,1,W],[r,3,3*W],[n,1,_]];function q(t){return(a(t)<t?h:o(t)<t?g:i(t)<t?m:u(t)<t?d:r(t)<t?e(t)<t?v:k:n(t)<t?w:b)(t)}function S(r,e,u){if(null==r&&(r=10),"number"==typeof r){var i,o=Math.abs(u-e)/r,a=t.bisector(function(n){return n[2]}).right(x,o);return a===x.length?(i=t.tickStep(e/_,u/_,r),r=n):a?(i=(a=x[o/x[a-1][2]<x[a][2]/o?a-1:a])[1],r=a[0]):(i=Math.max(t.tickStep(e,u,r),1),r=c),r.every(i)}return r}return l.invert=function(n){return new Date(p(n))},l.domain=function(n){return arguments.length?s(Array.from(n,G)):s().map(z)},l.ticks=function(n){var t,r=s(),e=r[0],u=r[r.length-1],i=u<e;return i&&(t=e,e=u,u=t),t=(t=S(n,e,u))?t.range(e,u+1):[],i?t.reverse():t},l.tickFormat=function(n,t){return null==t?q:f(t)},l.nice=function(n){var t=s();return(n=S(n,t[0],t[t.length-1]))?s(N(t,n)):l},l.copy=function(){return y(l,J(n,r,e,u,i,o,a,c,f))},l}function K(){var n,t,e,u,i,o=0,a=1,c=h,f=!1;function l(t){return isNaN(t=+t)?i:c(0===e?.5:(t=(u(t)-n)*e,f?Math.max(0,Math.min(1,t)):t))}function p(n){return function(t){var r,e;return arguments.length?([r,e]=t,c=n(r,e),l):[c(0),c(1)]}}return l.domain=function(r){return arguments.length?([o,a]=r,n=u(o=+o),t=u(a=+a),e=n===t?0:1/(t-n),l):[o,a]},l.clamp=function(n){return arguments.length?(f=!!n,l):f},l.interpolator=function(n){return arguments.length?(c=n,l):c},l.range=p(r.interpolate),l.rangeRound=p(r.interpolateRound),l.unknown=function(n){return arguments.length?(i=n,l):i},function(r){return u=r,n=r(o),t=r(a),e=n===t?0:1/(t-n),l}}function V(n,t){return t.domain(n.domain()).interpolator(n.interpolator()).clamp(n.clamp()).unknown(n.unknown())}function X(){var n=T(K());return n.copy=function(){return V(n,X()).exponent(n.exponent())},a.apply(n,arguments)}function Z(){var n,t,e,u,i,o,a,c=0,f=.5,l=1,p=1,s=h,g=!1;function m(n){return isNaN(n=+n)?a:(n=.5+((n=+o(n))-t)*(p*n<p*t?u:i),s(g?Math.max(0,Math.min(1,n)):n))}function d(n){return function(t){var e,u,i;return arguments.length?([e,u,i]=t,s=r.piecewise(n,[e,u,i]),m):[s(0),s(.5),s(1)]}}return m.domain=function(r){return arguments.length?([c,f,l]=r,n=o(c=+c),t=o(f=+f),e=o(l=+l),u=n===t?0:.5/(t-n),i=t===e?0:.5/(e-t),p=t<n?-1:1,m):[c,f,l]},m.clamp=function(n){return arguments.length?(g=!!n,m):g},m.interpolator=function(n){return arguments.length?(s=n,m):s},m.range=d(r.interpolate),m.rangeRound=d(r.interpolateRound),m.unknown=function(n){return arguments.length?(a=n,m):a},function(r){return o=r,n=r(c),t=r(f),e=r(l),u=n===t?0:.5/(t-n),i=t===e?0:.5/(e-t),p=t<n?-1:1,m}}function $(){var n=T(Z());return n.copy=function(){return V(n,$()).exponent(n.exponent())},a.apply(n,arguments)}n.scaleBand=l,n.scaleDiverging=function n(){var t=w(Z()(h));return t.copy=function(){return V(t,n())},a.apply(t,arguments)},n.scaleDivergingLog=function n(){var t=R(Z()).domain([.1,1,10]);return t.copy=function(){return V(t,n()).base(t.base())},a.apply(t,arguments)},n.scaleDivergingPow=$,n.scaleDivergingSqrt=function(){return $.apply(null,arguments).exponent(.5)},n.scaleDivergingSymlog=function n(){var t=F(Z());return t.copy=function(){return V(t,n()).constant(t.constant())},a.apply(t,arguments)},n.scaleIdentity=function n(t){var r;function e(n){return isNaN(n=+n)?r:n}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=Array.from(n,p),e):t.slice()},e.unknown=function(n){return arguments.length?(r=n,e):r},e.copy=function(){return n(t).unknown(r)},t=arguments.length?Array.from(t,p):[0,1],w(e)},n.scaleImplicit=c,n.scaleLinear=function n(){var t=M();return t.copy=function(){return y(t,n())},o.apply(t,arguments),w(t)},n.scaleLog=function n(){var t=R(v()).domain([1,10]);return t.copy=function(){return y(t,n()).base(t.base())},o.apply(t,arguments),t},n.scaleOrdinal=f,n.scalePoint=function(){return function n(t){var r=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return n(r())},t}(l.apply(null,arguments).paddingInner(1))},n.scalePow=Q,n.scaleQuantile=function n(){var r,e=[],u=[],i=[];function a(){var n=0,r=Math.max(1,u.length);for(i=new Array(r-1);++n<r;)i[n-1]=t.quantileSorted(e,n/r);return c}function c(n){return isNaN(n=+n)?r:u[t.bisect(i,n)]}return c.invertExtent=function(n){var t=u.indexOf(n);return t<0?[NaN,NaN]:[t>0?i[t-1]:e[0],t<i.length?i[t]:e[e.length-1]]},c.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let t of n)null==t||isNaN(t=+t)||e.push(t);return e.sort(t.ascending),a()},c.range=function(n){return arguments.length?(u=Array.from(n),a()):u.slice()},c.unknown=function(n){return arguments.length?(r=n,c):r},c.quantiles=function(){return i.slice()},c.copy=function(){return n().domain(e).range(u).unknown(r)},o.apply(c,arguments)},n.scaleQuantize=function n(){var r,e=0,u=1,i=1,a=[.5],c=[0,1];function f(n){return n<=n?c[t.bisect(a,n,0,i)]:r}function l(){var n=-1;for(a=new Array(i);++n<i;)a[n]=((n+1)*u-(n-i)*e)/(i+1);return f}return f.domain=function(n){return arguments.length?([e,u]=n,e=+e,u=+u,l()):[e,u]},f.range=function(n){return arguments.length?(i=(c=Array.from(n)).length-1,l()):c.slice()},f.invertExtent=function(n){var t=c.indexOf(n);return t<0?[NaN,NaN]:t<1?[e,a[0]]:t>=i?[a[i-1],u]:[a[t-1],a[t]]},f.unknown=function(n){return arguments.length?(r=n,f):f},f.thresholds=function(){return a.slice()},f.copy=function(){return n().domain([e,u]).range(c).unknown(r)},o.apply(w(f),arguments)},n.scaleRadial=function n(){var t,r=M(),e=[0,1],u=!1;function i(n){var e=function(n){return Math.sign(n)*Math.sqrt(Math.abs(n))}(r(n));return isNaN(e)?t:u?Math.round(e):e}return i.invert=function(n){return r.invert(U(n))},i.domain=function(n){return arguments.length?(r.domain(n),i):r.domain()},i.range=function(n){return arguments.length?(r.range((e=Array.from(n,p)).map(U)),i):e.slice()},i.rangeRound=function(n){return i.range(n).round(!0)},i.round=function(n){return arguments.length?(u=!!n,i):u},i.clamp=function(n){return arguments.length?(r.clamp(n),i):r.clamp()},i.unknown=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return n(r.domain(),e).round(u).clamp(r.clamp()).unknown(t)},o.apply(i,arguments),w(i)},n.scaleSequential=function n(){var t=w(K()(h));return t.copy=function(){return V(t,n())},a.apply(t,arguments)},n.scaleSequentialLog=function n(){var t=R(K()).domain([1,10]);return t.copy=function(){return V(t,n()).base(t.base())},a.apply(t,arguments)},n.scaleSequentialPow=X,n.scaleSequentialQuantile=function n(){var r=[],e=h;function u(n){if(!isNaN(n=+n))return e((t.bisect(r,n,1)-1)/(r.length-1))}return u.domain=function(n){if(!arguments.length)return r.slice();r=[];for(let t of n)null==t||isNaN(t=+t)||r.push(t);return r.sort(t.ascending),u},u.interpolator=function(n){return arguments.length?(e=n,u):e},u.range=function(){return r.map((n,t)=>e(t/(r.length-1)))},u.quantiles=function(n){return Array.from({length:n+1},(e,u)=>t.quantile(r,u/n))},u.copy=function(){return n(e).domain(r)},a.apply(u,arguments)},n.scaleSequentialSqrt=function(){return X.apply(null,arguments).exponent(.5)},n.scaleSequentialSymlog=function n(){var t=F(K());return t.copy=function(){return V(t,n()).constant(t.constant())},a.apply(t,arguments)},n.scaleSqrt=function(){return Q.apply(null,arguments).exponent(.5)},n.scaleSymlog=function n(){var t=F(v());return t.copy=function(){return y(t,n()).constant(t.constant())},o.apply(t,arguments)},n.scaleThreshold=function n(){var r,e=[.5],u=[0,1],i=1;function a(n){return n<=n?u[t.bisect(e,n,0,i)]:r}return a.domain=function(n){return arguments.length?(e=Array.from(n),i=Math.min(e.length,u.length-1),a):e.slice()},a.range=function(n){return arguments.length?(u=Array.from(n),i=Math.min(e.length,u.length-1),a):u.slice()},a.invertExtent=function(n){var t=u.indexOf(n);return[e[t-1],e[t]]},a.unknown=function(n){return arguments.length?(r=n,a):r},a.copy=function(){return n().domain(e).range(u).unknown(r)},o.apply(a,arguments)},n.scaleTime=function(){return o.apply(J(u.timeYear,u.timeMonth,u.timeWeek,u.timeDay,u.timeHour,u.timeMinute,u.timeSecond,u.timeMillisecond,i.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},n.scaleUtc=function(){return o.apply(J(u.utcYear,u.utcMonth,u.utcWeek,u.utcDay,u.utcHour,u.utcMinute,u.utcSecond,u.utcMillisecond,i.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},n.tickFormat=k,Object.defineProperty(n,"__esModule",{value:!0})}); diff --git a/node_modules/d3-scale/package.json b/node_modules/d3-scale/package.json deleted file mode 100644 index 41ea826c6a906d0ba178b88153c7d255d2f157ac..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_from": "d3-scale@3", - "_id": "d3-scale@3.2.3", - "_inBundle": false, - "_integrity": "sha512-8E37oWEmEzj57bHcnjPVOBS3n4jqakOeuv1EDdQSiSrYnMCBdMd3nc4HtKk7uia8DUHcY/CGuJ42xxgtEYrX0g==", - "_location": "/d3-scale", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-scale@3", - "name": "d3-scale", - "escapedName": "d3-scale", - "rawSpec": "3", - "saveSpec": null, - "fetchSpec": "3" - }, - "_requiredBy": [ - "/d3" - ], - "_resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-3.2.3.tgz", - "_shasum": "be380f57f1f61d4ff2e6cbb65a40593a51649cfd", - "_spec": "d3-scale@3", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-scale/issues" - }, - "bundleDependencies": false, - "dependencies": { - "d3-array": "^2.3.0", - "d3-format": "1 - 2", - "d3-interpolate": "1.2.0 - 2", - "d3-time": "1 - 2", - "d3-time-format": "2 - 3" - }, - "deprecated": false, - "description": "Encodings that map abstract data to visual representation.", - "devDependencies": { - "d3-color": "1 - 2", - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-scale/", - "jsdelivr": "dist/d3-scale.min.js", - "keywords": [ - "d3", - "d3-module", - "scale", - "visualization" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-scale.js", - "module": "src/index.js", - "name": "d3-scale", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-scale.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "TZ=America/Los_Angeles tape 'test/**/*-test.js' && eslint src" - }, - "sideEffects": false, - "unpkg": "dist/d3-scale.min.js", - "version": "3.2.3" -} diff --git a/node_modules/d3-scale/src/band.js b/node_modules/d3-scale/src/band.js deleted file mode 100644 index 88e1fbdf9f5c1953ffb756a97f55a544841c08c8..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/band.js +++ /dev/null @@ -1,101 +0,0 @@ -import {range as sequence} from "d3-array"; -import {initRange} from "./init.js"; -import ordinal from "./ordinal.js"; - -export default function band() { - var scale = ordinal().unknown(undefined), - domain = scale.domain, - ordinalRange = scale.range, - r0 = 0, - r1 = 1, - step, - bandwidth, - round = false, - paddingInner = 0, - paddingOuter = 0, - align = 0.5; - - delete scale.unknown; - - function rescale() { - var n = domain().length, - reverse = r1 < r0, - start = reverse ? r1 : r0, - stop = reverse ? r0 : r1; - step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2); - if (round) step = Math.floor(step); - start += (stop - start - step * (n - paddingInner)) * align; - bandwidth = step * (1 - paddingInner); - if (round) start = Math.round(start), bandwidth = Math.round(bandwidth); - var values = sequence(n).map(function(i) { return start + step * i; }); - return ordinalRange(reverse ? values.reverse() : values); - } - - scale.domain = function(_) { - return arguments.length ? (domain(_), rescale()) : domain(); - }; - - scale.range = function(_) { - return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1]; - }; - - scale.rangeRound = function(_) { - return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale(); - }; - - scale.bandwidth = function() { - return bandwidth; - }; - - scale.step = function() { - return step; - }; - - scale.round = function(_) { - return arguments.length ? (round = !!_, rescale()) : round; - }; - - scale.padding = function(_) { - return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner; - }; - - scale.paddingInner = function(_) { - return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner; - }; - - scale.paddingOuter = function(_) { - return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter; - }; - - scale.align = function(_) { - return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align; - }; - - scale.copy = function() { - return band(domain(), [r0, r1]) - .round(round) - .paddingInner(paddingInner) - .paddingOuter(paddingOuter) - .align(align); - }; - - return initRange.apply(rescale(), arguments); -} - -function pointish(scale) { - var copy = scale.copy; - - scale.padding = scale.paddingOuter; - delete scale.paddingInner; - delete scale.paddingOuter; - - scale.copy = function() { - return pointish(copy()); - }; - - return scale; -} - -export function point() { - return pointish(band.apply(null, arguments).paddingInner(1)); -} diff --git a/node_modules/d3-scale/src/colors.js b/node_modules/d3-scale/src/colors.js deleted file mode 100644 index b344ddb7098b8297045e79e70f6d5b3e8d9959d2..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/colors.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function colors(s) { - return s.match(/.{6}/g).map(function(x) { - return "#" + x; - }); -} diff --git a/node_modules/d3-scale/src/constant.js b/node_modules/d3-scale/src/constant.js deleted file mode 100644 index be84feecdd99fb90c8d48ffd76825d79b5e57342..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/constant.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function constants(x) { - return function() { - return x; - }; -} diff --git a/node_modules/d3-scale/src/continuous.js b/node_modules/d3-scale/src/continuous.js deleted file mode 100644 index 2dd1cf97ecb35096b755b7c4fbe9413284fdc890..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/continuous.js +++ /dev/null @@ -1,125 +0,0 @@ -import {bisect} from "d3-array"; -import {interpolate as interpolateValue, interpolateNumber, interpolateRound} from "d3-interpolate"; -import constant from "./constant.js"; -import number from "./number.js"; - -var unit = [0, 1]; - -export function identity(x) { - return x; -} - -function normalize(a, b) { - return (b -= (a = +a)) - ? function(x) { return (x - a) / b; } - : constant(isNaN(b) ? NaN : 0.5); -} - -function clamper(a, b) { - var t; - if (a > b) t = a, a = b, b = t; - return function(x) { return Math.max(a, Math.min(b, x)); }; -} - -// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1]. -// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b]. -function bimap(domain, range, interpolate) { - var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1]; - if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0); - else d0 = normalize(d0, d1), r0 = interpolate(r0, r1); - return function(x) { return r0(d0(x)); }; -} - -function polymap(domain, range, interpolate) { - var j = Math.min(domain.length, range.length) - 1, - d = new Array(j), - r = new Array(j), - i = -1; - - // Reverse descending domains. - if (domain[j] < domain[0]) { - domain = domain.slice().reverse(); - range = range.slice().reverse(); - } - - while (++i < j) { - d[i] = normalize(domain[i], domain[i + 1]); - r[i] = interpolate(range[i], range[i + 1]); - } - - return function(x) { - var i = bisect(domain, x, 1, j) - 1; - return r[i](d[i](x)); - }; -} - -export function copy(source, target) { - return target - .domain(source.domain()) - .range(source.range()) - .interpolate(source.interpolate()) - .clamp(source.clamp()) - .unknown(source.unknown()); -} - -export function transformer() { - var domain = unit, - range = unit, - interpolate = interpolateValue, - transform, - untransform, - unknown, - clamp = identity, - piecewise, - output, - input; - - function rescale() { - var n = Math.min(domain.length, range.length); - if (clamp !== identity) clamp = clamper(domain[0], domain[n - 1]); - piecewise = n > 2 ? polymap : bimap; - output = input = null; - return scale; - } - - function scale(x) { - return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate)))(transform(clamp(x))); - } - - scale.invert = function(y) { - return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y))); - }; - - scale.domain = function(_) { - return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice(); - }; - - scale.range = function(_) { - return arguments.length ? (range = Array.from(_), rescale()) : range.slice(); - }; - - scale.rangeRound = function(_) { - return range = Array.from(_), interpolate = interpolateRound, rescale(); - }; - - scale.clamp = function(_) { - return arguments.length ? (clamp = _ ? true : identity, rescale()) : clamp !== identity; - }; - - scale.interpolate = function(_) { - return arguments.length ? (interpolate = _, rescale()) : interpolate; - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - return function(t, u) { - transform = t, untransform = u; - return rescale(); - }; -} - -export default function continuous() { - return transformer()(identity, identity); -} diff --git a/node_modules/d3-scale/src/diverging.js b/node_modules/d3-scale/src/diverging.js deleted file mode 100644 index f59074883b5d1c7a1a4dfbff395770386d0d0a81..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/diverging.js +++ /dev/null @@ -1,104 +0,0 @@ -import {interpolate, interpolateRound, piecewise} from "d3-interpolate"; -import {identity} from "./continuous.js"; -import {initInterpolator} from "./init.js"; -import {linearish} from "./linear.js"; -import {loggish} from "./log.js"; -import {copy} from "./sequential.js"; -import {symlogish} from "./symlog.js"; -import {powish} from "./pow.js"; - -function transformer() { - var x0 = 0, - x1 = 0.5, - x2 = 1, - s = 1, - t0, - t1, - t2, - k10, - k21, - interpolator = identity, - transform, - clamp = false, - unknown; - - function scale(x) { - return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x)); - } - - scale.domain = function(_) { - return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2]; - }; - - scale.clamp = function(_) { - return arguments.length ? (clamp = !!_, scale) : clamp; - }; - - scale.interpolator = function(_) { - return arguments.length ? (interpolator = _, scale) : interpolator; - }; - - function range(interpolate) { - return function(_) { - var r0, r1, r2; - return arguments.length ? ([r0, r1, r2] = _, interpolator = piecewise(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)]; - }; - } - - scale.range = range(interpolate); - - scale.rangeRound = range(interpolateRound); - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - return function(t) { - transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1; - return scale; - }; -} - -export default function diverging() { - var scale = linearish(transformer()(identity)); - - scale.copy = function() { - return copy(scale, diverging()); - }; - - return initInterpolator.apply(scale, arguments); -} - -export function divergingLog() { - var scale = loggish(transformer()).domain([0.1, 1, 10]); - - scale.copy = function() { - return copy(scale, divergingLog()).base(scale.base()); - }; - - return initInterpolator.apply(scale, arguments); -} - -export function divergingSymlog() { - var scale = symlogish(transformer()); - - scale.copy = function() { - return copy(scale, divergingSymlog()).constant(scale.constant()); - }; - - return initInterpolator.apply(scale, arguments); -} - -export function divergingPow() { - var scale = powish(transformer()); - - scale.copy = function() { - return copy(scale, divergingPow()).exponent(scale.exponent()); - }; - - return initInterpolator.apply(scale, arguments); -} - -export function divergingSqrt() { - return divergingPow.apply(null, arguments).exponent(0.5); -} diff --git a/node_modules/d3-scale/src/identity.js b/node_modules/d3-scale/src/identity.js deleted file mode 100644 index af41c591fc2cfa0b42e8d249c181a6eb75518272..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/identity.js +++ /dev/null @@ -1,28 +0,0 @@ -import {linearish} from "./linear.js"; -import number from "./number.js"; - -export default function identity(domain) { - var unknown; - - function scale(x) { - return isNaN(x = +x) ? unknown : x; - } - - scale.invert = scale; - - scale.domain = scale.range = function(_) { - return arguments.length ? (domain = Array.from(_, number), scale) : domain.slice(); - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.copy = function() { - return identity(domain).unknown(unknown); - }; - - domain = arguments.length ? Array.from(domain, number) : [0, 1]; - - return linearish(scale); -} diff --git a/node_modules/d3-scale/src/index.js b/node_modules/d3-scale/src/index.js deleted file mode 100644 index 510103ccf95d801131b5ace69c505b3934d928b6..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/index.js +++ /dev/null @@ -1,78 +0,0 @@ -export { - default as scaleBand, - point as scalePoint -} from "./band.js"; - -export { - default as scaleIdentity -} from "./identity.js"; - -export { - default as scaleLinear -} from "./linear.js"; - -export { - default as scaleLog -} from "./log.js"; - -export { - default as scaleSymlog -} from "./symlog.js"; - -export { - default as scaleOrdinal, - implicit as scaleImplicit -} from "./ordinal.js"; - -export { - default as scalePow, - sqrt as scaleSqrt -} from "./pow.js"; - -export { - default as scaleRadial -} from "./radial.js"; - -export { - default as scaleQuantile -} from "./quantile.js"; - -export { - default as scaleQuantize -} from "./quantize.js"; - -export { - default as scaleThreshold -} from "./threshold.js"; - -export { - default as scaleTime -} from "./time.js"; - -export { - default as scaleUtc -} from "./utcTime.js"; - -export { - default as scaleSequential, - sequentialLog as scaleSequentialLog, - sequentialPow as scaleSequentialPow, - sequentialSqrt as scaleSequentialSqrt, - sequentialSymlog as scaleSequentialSymlog -} from "./sequential.js"; - -export { - default as scaleSequentialQuantile -} from "./sequentialQuantile.js"; - -export { - default as scaleDiverging, - divergingLog as scaleDivergingLog, - divergingPow as scaleDivergingPow, - divergingSqrt as scaleDivergingSqrt, - divergingSymlog as scaleDivergingSymlog -} from "./diverging.js"; - -export { - default as tickFormat -} from "./tickFormat.js"; diff --git a/node_modules/d3-scale/src/init.js b/node_modules/d3-scale/src/init.js deleted file mode 100644 index 61f51a07e8bab382c144236f73b1b1dc24874bf8..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/init.js +++ /dev/null @@ -1,26 +0,0 @@ -export function initRange(domain, range) { - switch (arguments.length) { - case 0: break; - case 1: this.range(domain); break; - default: this.range(range).domain(domain); break; - } - return this; -} - -export function initInterpolator(domain, interpolator) { - switch (arguments.length) { - case 0: break; - case 1: { - if (typeof domain === "function") this.interpolator(domain); - else this.range(domain); - break; - } - default: { - this.domain(domain); - if (typeof interpolator === "function") this.interpolator(interpolator); - else this.range(interpolator); - break; - } - } - return this; -} diff --git a/node_modules/d3-scale/src/linear.js b/node_modules/d3-scale/src/linear.js deleted file mode 100644 index 3617d32a64ce3fdc8600b8773fde1e8b2aa1f1d1..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/linear.js +++ /dev/null @@ -1,70 +0,0 @@ -import {ticks, tickIncrement} from "d3-array"; -import continuous, {copy} from "./continuous.js"; -import {initRange} from "./init.js"; -import tickFormat from "./tickFormat.js"; - -export function linearish(scale) { - var domain = scale.domain; - - scale.ticks = function(count) { - var d = domain(); - return ticks(d[0], d[d.length - 1], count == null ? 10 : count); - }; - - scale.tickFormat = function(count, specifier) { - var d = domain(); - return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier); - }; - - scale.nice = function(count) { - if (count == null) count = 10; - - var d = domain(); - var i0 = 0; - var i1 = d.length - 1; - var start = d[i0]; - var stop = d[i1]; - var prestep; - var step; - var maxIter = 10; - - if (stop < start) { - step = start, start = stop, stop = step; - step = i0, i0 = i1, i1 = step; - } - - while (maxIter-- > 0) { - step = tickIncrement(start, stop, count); - if (step === prestep) { - d[i0] = start - d[i1] = stop - return domain(d); - } else if (step > 0) { - start = Math.floor(start / step) * step; - stop = Math.ceil(stop / step) * step; - } else if (step < 0) { - start = Math.ceil(start * step) / step; - stop = Math.floor(stop * step) / step; - } else { - break; - } - prestep = step; - } - - return scale; - }; - - return scale; -} - -export default function linear() { - var scale = continuous(); - - scale.copy = function() { - return copy(scale, linear()); - }; - - initRange.apply(scale, arguments); - - return linearish(scale); -} diff --git a/node_modules/d3-scale/src/log.js b/node_modules/d3-scale/src/log.js deleted file mode 100644 index ad3f231e08c220108215336fbced9539235fbe78..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/log.js +++ /dev/null @@ -1,146 +0,0 @@ -import {ticks} from "d3-array"; -import {format} from "d3-format"; -import nice from "./nice.js"; -import {copy, transformer} from "./continuous.js"; -import {initRange} from "./init.js"; - -function transformLog(x) { - return Math.log(x); -} - -function transformExp(x) { - return Math.exp(x); -} - -function transformLogn(x) { - return -Math.log(-x); -} - -function transformExpn(x) { - return -Math.exp(-x); -} - -function pow10(x) { - return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x; -} - -function powp(base) { - return base === 10 ? pow10 - : base === Math.E ? Math.exp - : function(x) { return Math.pow(base, x); }; -} - -function logp(base) { - return base === Math.E ? Math.log - : base === 10 && Math.log10 - || base === 2 && Math.log2 - || (base = Math.log(base), function(x) { return Math.log(x) / base; }); -} - -function reflect(f) { - return function(x) { - return -f(-x); - }; -} - -export function loggish(transform) { - var scale = transform(transformLog, transformExp), - domain = scale.domain, - base = 10, - logs, - pows; - - function rescale() { - logs = logp(base), pows = powp(base); - if (domain()[0] < 0) { - logs = reflect(logs), pows = reflect(pows); - transform(transformLogn, transformExpn); - } else { - transform(transformLog, transformExp); - } - return scale; - } - - scale.base = function(_) { - return arguments.length ? (base = +_, rescale()) : base; - }; - - scale.domain = function(_) { - return arguments.length ? (domain(_), rescale()) : domain(); - }; - - scale.ticks = function(count) { - var d = domain(), - u = d[0], - v = d[d.length - 1], - r; - - if (r = v < u) i = u, u = v, v = i; - - var i = logs(u), - j = logs(v), - p, - k, - t, - n = count == null ? 10 : +count, - z = []; - - if (!(base % 1) && j - i < n) { - i = Math.floor(i), j = Math.ceil(j); - if (u > 0) for (; i <= j; ++i) { - for (k = 1, p = pows(i); k < base; ++k) { - t = p * k; - if (t < u) continue; - if (t > v) break; - z.push(t); - } - } else for (; i <= j; ++i) { - for (k = base - 1, p = pows(i); k >= 1; --k) { - t = p * k; - if (t < u) continue; - if (t > v) break; - z.push(t); - } - } - if (z.length * 2 < n) z = ticks(u, v, n); - } else { - z = ticks(i, j, Math.min(j - i, n)).map(pows); - } - - return r ? z.reverse() : z; - }; - - scale.tickFormat = function(count, specifier) { - if (specifier == null) specifier = base === 10 ? ".0e" : ","; - if (typeof specifier !== "function") specifier = format(specifier); - if (count === Infinity) return specifier; - if (count == null) count = 10; - var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate? - return function(d) { - var i = d / pows(Math.round(logs(d))); - if (i * base < base - 0.5) i *= base; - return i <= k ? specifier(d) : ""; - }; - }; - - scale.nice = function() { - return domain(nice(domain(), { - floor: function(x) { return pows(Math.floor(logs(x))); }, - ceil: function(x) { return pows(Math.ceil(logs(x))); } - })); - }; - - return scale; -} - -export default function log() { - var scale = loggish(transformer()).domain([1, 10]); - - scale.copy = function() { - return copy(scale, log()).base(scale.base()); - }; - - initRange.apply(scale, arguments); - - return scale; -} diff --git a/node_modules/d3-scale/src/nice.js b/node_modules/d3-scale/src/nice.js deleted file mode 100644 index a44e6015ee404a5ec27a3c6d51decf4e67e23437..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/nice.js +++ /dev/null @@ -1,18 +0,0 @@ -export default function nice(domain, interval) { - domain = domain.slice(); - - var i0 = 0, - i1 = domain.length - 1, - x0 = domain[i0], - x1 = domain[i1], - t; - - if (x1 < x0) { - t = i0, i0 = i1, i1 = t; - t = x0, x0 = x1, x1 = t; - } - - domain[i0] = interval.floor(x0); - domain[i1] = interval.ceil(x1); - return domain; -} diff --git a/node_modules/d3-scale/src/number.js b/node_modules/d3-scale/src/number.js deleted file mode 100644 index d185907fb427269c03be78680c6b3103be984f2e..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/number.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function number(x) { - return +x; -} diff --git a/node_modules/d3-scale/src/ordinal.js b/node_modules/d3-scale/src/ordinal.js deleted file mode 100644 index e98f600a2f18c0d812f397da0a0e6bed2e760218..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/ordinal.js +++ /dev/null @@ -1,46 +0,0 @@ -import {initRange} from "./init.js"; - -export const implicit = Symbol("implicit"); - -export default function ordinal() { - var index = new Map(), - domain = [], - range = [], - unknown = implicit; - - function scale(d) { - var key = d + "", i = index.get(key); - if (!i) { - if (unknown !== implicit) return unknown; - index.set(key, i = domain.push(d)); - } - return range[(i - 1) % range.length]; - } - - scale.domain = function(_) { - if (!arguments.length) return domain.slice(); - domain = [], index = new Map(); - for (const value of _) { - const key = value + ""; - if (index.has(key)) continue; - index.set(key, domain.push(value)); - } - return scale; - }; - - scale.range = function(_) { - return arguments.length ? (range = Array.from(_), scale) : range.slice(); - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.copy = function() { - return ordinal(domain, range).unknown(unknown); - }; - - initRange.apply(scale, arguments); - - return scale; -} diff --git a/node_modules/d3-scale/src/pow.js b/node_modules/d3-scale/src/pow.js deleted file mode 100644 index 8146f1c0421bd257fa1563e233e26dee3bd520c9..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/pow.js +++ /dev/null @@ -1,50 +0,0 @@ -import {linearish} from "./linear.js"; -import {copy, identity, transformer} from "./continuous.js"; -import {initRange} from "./init.js"; - -function transformPow(exponent) { - return function(x) { - return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent); - }; -} - -function transformSqrt(x) { - return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x); -} - -function transformSquare(x) { - return x < 0 ? -x * x : x * x; -} - -export function powish(transform) { - var scale = transform(identity, identity), - exponent = 1; - - function rescale() { - return exponent === 1 ? transform(identity, identity) - : exponent === 0.5 ? transform(transformSqrt, transformSquare) - : transform(transformPow(exponent), transformPow(1 / exponent)); - } - - scale.exponent = function(_) { - return arguments.length ? (exponent = +_, rescale()) : exponent; - }; - - return linearish(scale); -} - -export default function pow() { - var scale = powish(transformer()); - - scale.copy = function() { - return copy(scale, pow()).exponent(scale.exponent()); - }; - - initRange.apply(scale, arguments); - - return scale; -} - -export function sqrt() { - return pow.apply(null, arguments).exponent(0.5); -} diff --git a/node_modules/d3-scale/src/quantile.js b/node_modules/d3-scale/src/quantile.js deleted file mode 100644 index b4e708c0315224094db025fd904e148f55044eaf..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/quantile.js +++ /dev/null @@ -1,57 +0,0 @@ -import {ascending, bisect, quantileSorted as threshold} from "d3-array"; -import {initRange} from "./init.js"; - -export default function quantile() { - var domain = [], - range = [], - thresholds = [], - unknown; - - function rescale() { - var i = 0, n = Math.max(1, range.length); - thresholds = new Array(n - 1); - while (++i < n) thresholds[i - 1] = threshold(domain, i / n); - return scale; - } - - function scale(x) { - return isNaN(x = +x) ? unknown : range[bisect(thresholds, x)]; - } - - scale.invertExtent = function(y) { - var i = range.indexOf(y); - return i < 0 ? [NaN, NaN] : [ - i > 0 ? thresholds[i - 1] : domain[0], - i < thresholds.length ? thresholds[i] : domain[domain.length - 1] - ]; - }; - - scale.domain = function(_) { - if (!arguments.length) return domain.slice(); - domain = []; - for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d); - domain.sort(ascending); - return rescale(); - }; - - scale.range = function(_) { - return arguments.length ? (range = Array.from(_), rescale()) : range.slice(); - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.quantiles = function() { - return thresholds.slice(); - }; - - scale.copy = function() { - return quantile() - .domain(domain) - .range(range) - .unknown(unknown); - }; - - return initRange.apply(scale, arguments); -} diff --git a/node_modules/d3-scale/src/quantize.js b/node_modules/d3-scale/src/quantize.js deleted file mode 100644 index 735a53148ed3c2f4b8c2fd740f797200a3b4b06f..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/quantize.js +++ /dev/null @@ -1,56 +0,0 @@ -import {bisect} from "d3-array"; -import {linearish} from "./linear.js"; -import {initRange} from "./init.js"; - -export default function quantize() { - var x0 = 0, - x1 = 1, - n = 1, - domain = [0.5], - range = [0, 1], - unknown; - - function scale(x) { - return x <= x ? range[bisect(domain, x, 0, n)] : unknown; - } - - function rescale() { - var i = -1; - domain = new Array(n); - while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1); - return scale; - } - - scale.domain = function(_) { - return arguments.length ? ([x0, x1] = _, x0 = +x0, x1 = +x1, rescale()) : [x0, x1]; - }; - - scale.range = function(_) { - return arguments.length ? (n = (range = Array.from(_)).length - 1, rescale()) : range.slice(); - }; - - scale.invertExtent = function(y) { - var i = range.indexOf(y); - return i < 0 ? [NaN, NaN] - : i < 1 ? [x0, domain[0]] - : i >= n ? [domain[n - 1], x1] - : [domain[i - 1], domain[i]]; - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : scale; - }; - - scale.thresholds = function() { - return domain.slice(); - }; - - scale.copy = function() { - return quantize() - .domain([x0, x1]) - .range(range) - .unknown(unknown); - }; - - return initRange.apply(linearish(scale), arguments); -} diff --git a/node_modules/d3-scale/src/radial.js b/node_modules/d3-scale/src/radial.js deleted file mode 100644 index 5c00cc6d3e3b7f481f9d708b3a0361c2098aed0c..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/radial.js +++ /dev/null @@ -1,63 +0,0 @@ -import continuous from "./continuous.js"; -import {initRange} from "./init.js"; -import {linearish} from "./linear.js"; -import number from "./number.js"; - -function square(x) { - return Math.sign(x) * x * x; -} - -function unsquare(x) { - return Math.sign(x) * Math.sqrt(Math.abs(x)); -} - -export default function radial() { - var squared = continuous(), - range = [0, 1], - round = false, - unknown; - - function scale(x) { - var y = unsquare(squared(x)); - return isNaN(y) ? unknown : round ? Math.round(y) : y; - } - - scale.invert = function(y) { - return squared.invert(square(y)); - }; - - scale.domain = function(_) { - return arguments.length ? (squared.domain(_), scale) : squared.domain(); - }; - - scale.range = function(_) { - return arguments.length ? (squared.range((range = Array.from(_, number)).map(square)), scale) : range.slice(); - }; - - scale.rangeRound = function(_) { - return scale.range(_).round(true); - }; - - scale.round = function(_) { - return arguments.length ? (round = !!_, scale) : round; - }; - - scale.clamp = function(_) { - return arguments.length ? (squared.clamp(_), scale) : squared.clamp(); - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.copy = function() { - return radial(squared.domain(), range) - .round(round) - .clamp(squared.clamp()) - .unknown(unknown); - }; - - initRange.apply(scale, arguments); - - return linearish(scale); -} diff --git a/node_modules/d3-scale/src/sequential.js b/node_modules/d3-scale/src/sequential.js deleted file mode 100644 index bd38dba451378a90164079132b10882174a3aab9..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/sequential.js +++ /dev/null @@ -1,107 +0,0 @@ -import {interpolate, interpolateRound} from "d3-interpolate"; -import {identity} from "./continuous.js"; -import {initInterpolator} from "./init.js"; -import {linearish} from "./linear.js"; -import {loggish} from "./log.js"; -import {symlogish} from "./symlog.js"; -import {powish} from "./pow.js"; - -function transformer() { - var x0 = 0, - x1 = 1, - t0, - t1, - k10, - transform, - interpolator = identity, - clamp = false, - unknown; - - function scale(x) { - return isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x)); - } - - scale.domain = function(_) { - return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1]; - }; - - scale.clamp = function(_) { - return arguments.length ? (clamp = !!_, scale) : clamp; - }; - - scale.interpolator = function(_) { - return arguments.length ? (interpolator = _, scale) : interpolator; - }; - - function range(interpolate) { - return function(_) { - var r0, r1; - return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)]; - }; - } - - scale.range = range(interpolate); - - scale.rangeRound = range(interpolateRound); - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - return function(t) { - transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0); - return scale; - }; -} - -export function copy(source, target) { - return target - .domain(source.domain()) - .interpolator(source.interpolator()) - .clamp(source.clamp()) - .unknown(source.unknown()); -} - -export default function sequential() { - var scale = linearish(transformer()(identity)); - - scale.copy = function() { - return copy(scale, sequential()); - }; - - return initInterpolator.apply(scale, arguments); -} - -export function sequentialLog() { - var scale = loggish(transformer()).domain([1, 10]); - - scale.copy = function() { - return copy(scale, sequentialLog()).base(scale.base()); - }; - - return initInterpolator.apply(scale, arguments); -} - -export function sequentialSymlog() { - var scale = symlogish(transformer()); - - scale.copy = function() { - return copy(scale, sequentialSymlog()).constant(scale.constant()); - }; - - return initInterpolator.apply(scale, arguments); -} - -export function sequentialPow() { - var scale = powish(transformer()); - - scale.copy = function() { - return copy(scale, sequentialPow()).exponent(scale.exponent()); - }; - - return initInterpolator.apply(scale, arguments); -} - -export function sequentialSqrt() { - return sequentialPow.apply(null, arguments).exponent(0.5); -} diff --git a/node_modules/d3-scale/src/sequentialQuantile.js b/node_modules/d3-scale/src/sequentialQuantile.js deleted file mode 100644 index 132ebd053065fb1ae383b12f6ef6aeaa73b51775..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/sequentialQuantile.js +++ /dev/null @@ -1,38 +0,0 @@ -import {ascending, bisect, quantile} from "d3-array"; -import {identity} from "./continuous.js"; -import {initInterpolator} from "./init.js"; - -export default function sequentialQuantile() { - var domain = [], - interpolator = identity; - - function scale(x) { - if (!isNaN(x = +x)) return interpolator((bisect(domain, x, 1) - 1) / (domain.length - 1)); - } - - scale.domain = function(_) { - if (!arguments.length) return domain.slice(); - domain = []; - for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d); - domain.sort(ascending); - return scale; - }; - - scale.interpolator = function(_) { - return arguments.length ? (interpolator = _, scale) : interpolator; - }; - - scale.range = function() { - return domain.map((d, i) => interpolator(i / (domain.length - 1))); - }; - - scale.quantiles = function(n) { - return Array.from({length: n + 1}, (_, i) => quantile(domain, i / n)); - }; - - scale.copy = function() { - return sequentialQuantile(interpolator).domain(domain); - }; - - return initInterpolator.apply(scale, arguments); -} diff --git a/node_modules/d3-scale/src/symlog.js b/node_modules/d3-scale/src/symlog.js deleted file mode 100644 index 125fa7b518b23625e1dd6c927b0dde762a1dc18c..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/symlog.js +++ /dev/null @@ -1,35 +0,0 @@ -import {linearish} from "./linear.js"; -import {copy, transformer} from "./continuous.js"; -import {initRange} from "./init.js"; - -function transformSymlog(c) { - return function(x) { - return Math.sign(x) * Math.log1p(Math.abs(x / c)); - }; -} - -function transformSymexp(c) { - return function(x) { - return Math.sign(x) * Math.expm1(Math.abs(x)) * c; - }; -} - -export function symlogish(transform) { - var c = 1, scale = transform(transformSymlog(c), transformSymexp(c)); - - scale.constant = function(_) { - return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c; - }; - - return linearish(scale); -} - -export default function symlog() { - var scale = symlogish(transformer()); - - scale.copy = function() { - return copy(scale, symlog()).constant(scale.constant()); - }; - - return initRange.apply(scale, arguments); -} diff --git a/node_modules/d3-scale/src/threshold.js b/node_modules/d3-scale/src/threshold.js deleted file mode 100644 index 79d3559d4fbf2557a114585e824768a9952a1823..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/threshold.js +++ /dev/null @@ -1,39 +0,0 @@ -import {bisect} from "d3-array"; -import {initRange} from "./init.js"; - -export default function threshold() { - var domain = [0.5], - range = [0, 1], - unknown, - n = 1; - - function scale(x) { - return x <= x ? range[bisect(domain, x, 0, n)] : unknown; - } - - scale.domain = function(_) { - return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice(); - }; - - scale.range = function(_) { - return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice(); - }; - - scale.invertExtent = function(y) { - var i = range.indexOf(y); - return [domain[i - 1], domain[i]]; - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.copy = function() { - return threshold() - .domain(domain) - .range(range) - .unknown(unknown); - }; - - return initRange.apply(scale, arguments); -} diff --git a/node_modules/d3-scale/src/tickFormat.js b/node_modules/d3-scale/src/tickFormat.js deleted file mode 100644 index 15fc54efc68a25a7f70d4137a2bc579afd4cab8f..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/tickFormat.js +++ /dev/null @@ -1,29 +0,0 @@ -import {tickStep} from "d3-array"; -import {format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound} from "d3-format"; - -export default function tickFormat(start, stop, count, specifier) { - var step = tickStep(start, stop, count), - precision; - specifier = formatSpecifier(specifier == null ? ",f" : specifier); - switch (specifier.type) { - case "s": { - var value = Math.max(Math.abs(start), Math.abs(stop)); - if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision; - return formatPrefix(specifier, value); - } - case "": - case "e": - case "g": - case "p": - case "r": { - if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e"); - break; - } - case "f": - case "%": { - if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2; - break; - } - } - return format(specifier); -} diff --git a/node_modules/d3-scale/src/time.js b/node_modules/d3-scale/src/time.js deleted file mode 100644 index 3cbf81e098836d2b19877daf7af45692aa73e646..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/time.js +++ /dev/null @@ -1,136 +0,0 @@ -import {bisector, tickStep} from "d3-array"; -import {timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeMillisecond} from "d3-time"; -import {timeFormat} from "d3-time-format"; -import continuous, {copy} from "./continuous.js"; -import {initRange} from "./init.js"; -import nice from "./nice.js"; - -var durationSecond = 1000, - durationMinute = durationSecond * 60, - durationHour = durationMinute * 60, - durationDay = durationHour * 24, - durationWeek = durationDay * 7, - durationMonth = durationDay * 30, - durationYear = durationDay * 365; - -function date(t) { - return new Date(t); -} - -function number(t) { - return t instanceof Date ? +t : +new Date(+t); -} - -export function calendar(year, month, week, day, hour, minute, second, millisecond, format) { - var scale = continuous(), - invert = scale.invert, - domain = scale.domain; - - var formatMillisecond = format(".%L"), - formatSecond = format(":%S"), - formatMinute = format("%I:%M"), - formatHour = format("%I %p"), - formatDay = format("%a %d"), - formatWeek = format("%b %d"), - formatMonth = format("%B"), - formatYear = format("%Y"); - - var tickIntervals = [ - [second, 1, durationSecond], - [second, 5, 5 * durationSecond], - [second, 15, 15 * durationSecond], - [second, 30, 30 * durationSecond], - [minute, 1, durationMinute], - [minute, 5, 5 * durationMinute], - [minute, 15, 15 * durationMinute], - [minute, 30, 30 * durationMinute], - [ hour, 1, durationHour ], - [ hour, 3, 3 * durationHour ], - [ hour, 6, 6 * durationHour ], - [ hour, 12, 12 * durationHour ], - [ day, 1, durationDay ], - [ day, 2, 2 * durationDay ], - [ week, 1, durationWeek ], - [ month, 1, durationMonth ], - [ month, 3, 3 * durationMonth ], - [ year, 1, durationYear ] - ]; - - function tickFormat(date) { - return (second(date) < date ? formatMillisecond - : minute(date) < date ? formatSecond - : hour(date) < date ? formatMinute - : day(date) < date ? formatHour - : month(date) < date ? (week(date) < date ? formatDay : formatWeek) - : year(date) < date ? formatMonth - : formatYear)(date); - } - - function tickInterval(interval, start, stop) { - if (interval == null) interval = 10; - - // If a desired tick count is specified, pick a reasonable tick interval - // based on the extent of the domain and a rough estimate of tick size. - // Otherwise, assume interval is already a time interval and use it. - if (typeof interval === "number") { - var target = Math.abs(stop - start) / interval, - i = bisector(function(i) { return i[2]; }).right(tickIntervals, target), - step; - if (i === tickIntervals.length) { - step = tickStep(start / durationYear, stop / durationYear, interval); - interval = year; - } else if (i) { - i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i]; - step = i[1]; - interval = i[0]; - } else { - step = Math.max(tickStep(start, stop, interval), 1); - interval = millisecond; - } - return interval.every(step); - } - - return interval; - } - - scale.invert = function(y) { - return new Date(invert(y)); - }; - - scale.domain = function(_) { - return arguments.length ? domain(Array.from(_, number)) : domain().map(date); - }; - - scale.ticks = function(interval) { - var d = domain(), - t0 = d[0], - t1 = d[d.length - 1], - r = t1 < t0, - t; - if (r) t = t0, t0 = t1, t1 = t; - t = tickInterval(interval, t0, t1); - t = t ? t.range(t0, t1 + 1) : []; // inclusive stop - return r ? t.reverse() : t; - }; - - scale.tickFormat = function(count, specifier) { - return specifier == null ? tickFormat : format(specifier); - }; - - scale.nice = function(interval) { - var d = domain(); - return (interval = tickInterval(interval, d[0], d[d.length - 1])) - ? domain(nice(d, interval)) - : scale; - }; - - scale.copy = function() { - return copy(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format)); - }; - - return scale; -} - -export default function time() { - return initRange.apply(calendar(timeYear, timeMonth, timeWeek, timeDay, timeHour, timeMinute, timeSecond, timeMillisecond, timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments); -} diff --git a/node_modules/d3-scale/src/utcTime.js b/node_modules/d3-scale/src/utcTime.js deleted file mode 100644 index 4e7ed84c0b182b0cd18f2a9cbacf48dbeb1e1460..0000000000000000000000000000000000000000 --- a/node_modules/d3-scale/src/utcTime.js +++ /dev/null @@ -1,8 +0,0 @@ -import {calendar} from "./time.js"; -import {utcFormat} from "d3-time-format"; -import {utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcMillisecond} from "d3-time"; -import {initRange} from "./init.js"; - -export default function utcTime() { - return initRange.apply(calendar(utcYear, utcMonth, utcWeek, utcDay, utcHour, utcMinute, utcSecond, utcMillisecond, utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments); -} diff --git a/node_modules/d3-selection/LICENSE b/node_modules/d3-selection/LICENSE deleted file mode 100644 index 74945c0e0583cf8620efdf3b27c42c3930bba482..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2010-2018, Michael Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* The name Michael Bostock may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-selection/README.md b/node_modules/d3-selection/README.md deleted file mode 100644 index 95254fb4aaafee43b83dc32405a010d80796aa17..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/README.md +++ /dev/null @@ -1,859 +0,0 @@ -# d3-selection - -Selections allow powerful data-driven transformation of the document object model (DOM): set [attributes](#selection_attr), [styles](#selection_style), [properties](#selection_property), [HTML](#selection_html) or [text](#selection_text) content, and more. Using the [data join](#joining-data)’s [enter](#selection_enter) and [exit](#selection_enter) selections, you can also [add](#selection_append) or [remove](#selection_remove) elements to correspond to data. - -Selection methods typically return the current selection, or a new selection, allowing the concise application of multiple operations on a given selection via method chaining. For example, to set the class and color style of all paragraph elements in the current document: - -```js -d3.selectAll("p") - .attr("class", "graf") - .style("color", "red"); -``` - -This is equivalent to: - -```js -const p = d3.selectAll("p"); -p.attr("class", "graf"); -p.style("color", "red"); -``` - -By convention, selection methods that return the current selection use *four* spaces of indent, while methods that return a new selection use only *two*. This helps reveal changes of context by making them stick out of the chain: - -```js -d3.select("body") - .append("svg") - .attr("width", 960) - .attr("height", 500) - .append("g") - .attr("transform", "translate(20,20)") - .append("rect") - .attr("width", 920) - .attr("height", 460); -``` - -Selections are immutable. All selection methods that affect which elements are selected (or their order) return a new selection rather than modifying the current selection. However, note that elements are necessarily mutable, as selections drive transformations of the document! - -For more, see [the d3-selection collection on Observable](https://observablehq.com/collection/@d3/d3-selection). - -## Installing - -If you use NPM, `npm install d3-selection`. Otherwise, download the [latest release](https://github.com/d3/d3-selection/releases/latest). You can also load d3-selection as a standalone library or as part of [D3](https://github.com/d3/d3). ES modules, AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://cdn.jsdelivr.net/npm/d3-selection@2"></script> -<script> - -const div = d3.selectAll("div"); - -</script> -``` - -[Try d3-selection in your browser.](https://observablehq.com/collection/@d3/d3-selection) - -## API Reference - -* [Selecting Elements](#selecting-elements) -* [Modifying Elements](#modifying-elements) -* [Joining Data](#joining-data) -* [Handling Events](#handling-events) -* [Control Flow](#control-flow) -* [Local Variables](#local-variables) -* [Namespaces](#namespaces) - -### Selecting Elements - -Selection methods accept [W3C selector strings](http://www.w3.org/TR/selectors-api/) such as `.fancy` to select elements with the class *fancy*, or `div` to select DIV elements. Selection methods come in two forms: select and selectAll: the former selects only the first matching element, while the latter selects all matching elements in document order. The top-level selection methods, [d3.select](#select) and [d3.selectAll](#selectAll), query the entire document; the subselection methods, [*selection*.select](#selection_select) and [*selection*.selectAll](#selection_selectAll), restrict selection to descendants of the selected elements. - -<a name="selection" href="#selection">#</a> d3.<b>selection</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/index.js) - -[Selects](#select) the root element, `document.documentElement`. This function can also be used to test for selections (`instanceof d3.selection`) or to extend the selection prototype. For example, to add a method to check checkboxes: - -```js -d3.selection.prototype.checked = function(value) { - return arguments.length < 1 - ? this.property("checked") - : this.property("checked", !!value); -}; -``` - -And then to use: - -```js -d3.selectAll("input[type=checkbox]").checked(true); -``` - -<a name="select" href="#select">#</a> d3.<b>select</b>(<i>selector</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/select.js) - -Selects the first element that matches the specified *selector* string. If no elements match the *selector*, returns an empty selection. If multiple elements match the *selector*, only the first matching element (in document order) will be selected. For example, to select the first anchor element: - -```js -const anchor = d3.select("a"); -``` - -If the *selector* is not a string, instead selects the specified node; this is useful if you already have a reference to a node, such as `this` within an event listener or a global such as `document.body`. For example, to make a clicked paragraph red: - -```js -d3.selectAll("p").on("click", function(event) { - d3.select(this).style("color", "red"); -}); -``` - -<a name="selectAll" href="#selectAll">#</a> d3.<b>selectAll</b>(<i>selector</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/selectAll.js) - -Selects all elements that match the specified *selector* string. The elements will be selected in document order (top-to-bottom). If no elements in the document match the *selector*, or if the *selector* is null or undefined, returns an empty selection. For example, to select all paragraphs: - -```js -const paragraph = d3.selectAll("p"); -``` - -If the *selector* is not a string, instead selects the specified array of nodes; this is useful if you already have a reference to nodes, such as `this.childNodes` within an event listener or a global such as `document.links`. The nodes may instead be an iterable, or a pseudo-array such as a NodeList. For example, to color all links red: - -```js -d3.selectAll(document.links).style("color", "red"); -``` - -<a name="selection_select" href="#selection_select">#</a> <i>selection</i>.<b>select</b>(<i>selector</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/select.js) - -For each selected element, selects the first descendant element that matches the specified *selector* string. If no element matches the specified selector for the current element, the element at the current index will be null in the returned selection. (If the *selector* is null, every element in the returned selection will be null, resulting in an empty selection.) If the current element has associated data, this data is propagated to the corresponding selected element. If multiple elements match the selector, only the first matching element in document order is selected. For example, to select the first bold element in every paragraph: - -```js -const b = d3.selectAll("p").select("b"); -``` - -If the *selector* is a function, it is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element (*nodes*[*i*]). It must return an element, or null if there is no matching element. For example, to select the previous sibling of each paragraph: - -```js -const previous = d3.selectAll("p").select(function() { - return this.previousElementSibling; -}); -``` - -Unlike [*selection*.selectAll](#selection_selectAll), *selection*.select does not affect grouping: it preserves the existing group structure and indexes, and propagates data (if any) to selected children. Grouping plays an important role in the [data join](#joining-data). See [Nested Selections](http://bost.ocks.org/mike/nest/) and [How Selections Work](http://bost.ocks.org/mike/selection/) for more on this topic. - -<a name="selection_selectAll" href="#selection_selectAll">#</a> <i>selection</i>.<b>selectAll</b>(<i>selector</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/selectAll.js) - -For each selected element, selects the descendant elements that match the specified *selector* string. The elements in the returned selection are grouped by their corresponding parent node in this selection. If no element matches the specified selector for the current element, or if the *selector* is null, the group at the current index will be empty. The selected elements do not inherit data from this selection; use [*selection*.data](#selection_data) to propagate data to children. For example, to select the bold elements in every paragraph: - -```js -const b = d3.selectAll("p").selectAll("b"); -``` - -If the *selector* is a function, it is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element (*nodes*[*i*]). It must return an array of elements (or an iterable, or a pseudo-array such as a NodeList), or the empty array if there are no matching elements. For example, to select the previous and next siblings of each paragraph: - -```js -const sibling = d3.selectAll("p").selectAll(function() { - return [ - this.previousElementSibling, - this.nextElementSibling - ]; -}); -``` - -Unlike [*selection*.select](#selection_select), *selection*.selectAll does affect grouping: each selected descendant is grouped by the parent element in the originating selection. Grouping plays an important role in the [data join](#joining-data). See [Nested Selections](http://bost.ocks.org/mike/nest/) and [How Selections Work](http://bost.ocks.org/mike/selection/) for more on this topic. - -<a name="selection_filter" href="#selection_filter">#</a> <i>selection</i>.<b>filter</b>(<i>filter</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/filter.js) - -Filters the selection, returning a new selection that contains only the elements for which the specified *filter* is true. The *filter* may be specified either as a selector string or a function. If the *filter* is a function, it is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element (*nodes*[*i*]). - -For example, to filter a selection of table rows to contain only even rows: - -```js -const even = d3.selectAll("tr").filter(":nth-child(even)"); -``` - -This is approximately equivalent to using [d3.selectAll](#selectAll) directly, although the indexes may be different: - -```js -const even = d3.selectAll("tr:nth-child(even)"); -``` - -Similarly, using a function: - -```js -const even = d3.selectAll("tr").filter((d, i) => i & 1); -``` - -Or using [*selection*.select](#selection_select) (and avoiding an arrow function, since *this* is needed to refer to the current element): - -```js -const even = d3.selectAll("tr").select(function(d, i) { return i & 1 ? this : null; }); -``` - -Note that the `:nth-child` pseudo-class is a one-based index rather than a zero-based index. Also, the above filter functions do not have precisely the same meaning as `:nth-child`; they rely on the selection index rather than the number of preceding sibling elements in the DOM. - -The returned filtered selection preserves the parents of this selection, but like [*array*.filter](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), it does not preserve indexes as some elements may be removed; use [*selection*.select](#selection_select) to preserve the index, if needed. - -<a name="selection_merge" href="#selection_merge">#</a> <i>selection</i>.<b>merge</b>(<i>other</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/merge.js) - -Returns a new selection merging this selection with the specified *other* selection. The returned selection has the same number of groups and the same parents as this selection. Any missing (null) elements in this selection are filled with the corresponding element, if present (not null), from the specified *selection*. (If the *other* selection has additional groups or parents, they are ignored.) - -This method is used internally by [*selection*.join](#selection_join) to merge the [enter](#selection_enter) and [update](#selection_data) selections after [binding data](#joining-data). You can also merge explicitly, although note that since merging is based on element index, you should use operations that preserve index, such as [*selection*.select](#selection_select) instead of [*selection*.filter](#selection_filter). For example: - -```js -const odd = selection.select(function(d, i) { return i & 1 ? this : null; )); -const even = selection.select(function(d, i) { return i & 1 ? null : this; )); -const merged = odd.merge(even); -``` - -See [*selection*.data](#selection_data) for more. - -This method is not intended for concatenating arbitrary selections, however: if both this selection and the specified *other* selection have (non-null) elements at the same index, this selection’s element is returned in the merge and the *other* selection’s element is ignored. - -<a name="selection_selectChild" href="#selection_selectChild">#</a> <i>selection</i>.<b>selectChild</b>([<i>selector</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/selectChild.js) - -Returns a new selection with the (first) child of each element of the current selection matching the *selector*. If no *selector* is specified, selects the first child (if any). If the *selector* is specified as a string, selects the first child that matches (if any). If the *selector* is a function, it is evaluated for each of the children nodes, in order, being passed the child (*child*), the child’s index (*i*), and the list of children (*children*); the method selects the first child for which the selector return truthy, if any. - -<a name="selection_selectChildren" href="#selection_selectChildren">#</a> <i>selection</i>.<b>selectChildren</b>([<i>selector</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/selectChildren.js) - -Returns a new selection with the children of each element of the current selection matching the *selector*. If no *selector* is specified, selects all the children. If the *selector* is specified as a string, selects the children that match (if any). If the *selector* is a function, it is evaluated for each of the children nodes, in order, being passed the child (*child*), the child’s index (*i*), and the list of children (*children*); the method selects all children for which the selector return truthy. - -<a name="selection_selection" href="#selection_selection">#</a> <i>selection</i>.<b>selection</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/index.js) - -Returns the selection (for symmetry with [<i>transition</i>.selection](https://github.com/d3/d3-transition/blob/master/README.md#transition_selection)). - -<a name="matcher" href="#matcher">#</a> d3.<b>matcher</b>(<i>selector</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/matcher.js) - -Given the specified *selector*, returns a function which returns true if `this` element [matches](https://developer.mozilla.org/en-US/docs/Web/API/Element/matches) the specified selector. This method is used internally by [*selection*.filter](#selection_filter). For example, this: - -```js -const div = selection.filter("div"); -``` - -Is equivalent to: - -```js -const div = selection.filter(d3.matcher("div")); -``` - -(Although D3 is not a compatibility layer, this implementation does support vendor-prefixed implementations due to the recent standardization of *element*.matches.) - -<a name="selector" href="#selector">#</a> d3.<b>selector</b>(<i>selector</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/selector.js) - -Given the specified *selector*, returns a function which returns the first descendant of `this` element that matches the specified selector. This method is used internally by [*selection*.select](#selection_select). For example, this: - -```js -const div = selection.select("div"); -``` - -Is equivalent to: - -```js -const div = selection.select(d3.selector("div")); -``` - -<a name="selectorAll" href="#selectorAll">#</a> d3.<b>selectorAll</b>(<i>selector</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/selectAll.js) - -Given the specified *selector*, returns a function which returns all descendants of `this` element that match the specified selector. This method is used internally by [*selection*.selectAll](#selection_selectAll). For example, this: - -```js -const div = selection.selectAll("div"); -``` - -Is equivalent to: - -```js -const div = selection.selectAll(d3.selectorAll("div")); -``` - -<a name="window" href="#window">#</a> d3.<b>window</b>(<i>node</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/window.js) - -Returns the owner window for the specified *node*. If *node* is a node, returns the owner document’s default view; if *node* is a document, returns its default view; otherwise returns the *node*. - -<a name="style" href="#style">#</a> d3.<b>style</b>(<i>node</i>, <i>name</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/style.js) - -Returns the value of the style property with the specified *name* for the specified *node*. If the *node* has an inline style with the specified *name*, its value is returned; otherwise, the [computed property value](https://developer.mozilla.org/en-US/docs/Web/CSS/computed_value) is returned. See also [*selection*.style](#selection_style). - -### Modifying Elements - -After selecting elements, use the selection’s transformation methods to affect document content. For example, to set the name attribute and color style of an anchor element: - -```js -d3.select("a") - .attr("name", "fred") - .style("color", "red"); -``` - -To experiment with selections, visit [d3js.org](https://d3js.org) and open your browser’s developer console! (In Chrome, open the console with ⌥⌘J.) Select elements and then inspect the returned selection to see which elements are selected and how they are grouped. Call selection methods and see how the page content changes. - -<a name="selection_attr" href="#selection_attr">#</a> <i>selection</i>.<b>attr</b>(<i>name</i>[, <i>value</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/attr.js) - -If a *value* is specified, sets the attribute with the specified *name* to the specified value on the selected elements and returns this selection. If the *value* is a constant, all elements are given the same attribute value; otherwise, if the *value* is a function, it is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element (*nodes*[*i*]). The function’s return value is then used to set each element’s attribute. A null value will remove the specified attribute. - -If a *value* is not specified, returns the current value of the specified attribute for the first (non-null) element in the selection. This is generally useful only if you know that the selection contains exactly one element. - -The specified *name* may have a namespace prefix, such as `xlink:href` to specify the `href` attribute in the XLink namespace. See [namespaces](#namespaces) for the map of supported namespaces; additional namespaces can be registered by adding to the map. - -<a name="selection_classed" href="#selection_classed">#</a> <i>selection</i>.<b>classed</b>(<i>names</i>[, <i>value</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/classed.js) - -If a *value* is specified, assigns or unassigns the specified CSS class *names* on the selected elements by setting the `class` attribute or modifying the `classList` property and returns this selection. The specified *names* is a string of space-separated class names. For example, to assign the classes `foo` and `bar` to the selected elements: - -```js -selection.classed("foo bar", true); -``` - -If the *value* is truthy, then all elements are assigned the specified classes; otherwise, the classes are unassigned. If the *value* is a function, it is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element (*nodes*[*i*]). The function’s return value is then used to assign or unassign classes on each element. For example, to randomly associate the class *foo* with on average half the selected elements: - -```js -selection.classed("foo", () => Math.random() > 0.5); -``` - -If a *value* is not specified, returns true if and only if the first (non-null) selected element has the specified *classes*. This is generally useful only if you know the selection contains exactly one element. - -<a name="selection_style" href="#selection_style">#</a> <i>selection</i>.<b>style</b>(<i>name</i>[, <i>value</i>[, <i>priority</i>]]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/style.js) - -If a *value* is specified, sets the style property with the specified *name* to the specified value on the selected elements and returns this selection. If the *value* is a constant, then all elements are given the same style property value; otherwise, if the *value* is a function, it is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element (*nodes*[*i*]). The function’s return value is then used to set each element’s style property. A null value will remove the style property. An optional *priority* may also be specified, either as null or the string `important` (without the exclamation point). - -If a *value* is not specified, returns the current value of the specified style property for the first (non-null) element in the selection. The current value is defined as the element’s inline value, if present, and otherwise its [computed value](https://developer.mozilla.org/en-US/docs/Web/CSS/computed_value). Accessing the current style value is generally useful only if you know the selection contains exactly one element. - -Caution: unlike many SVG attributes, CSS styles typically have associated units. For example, `3px` is a valid stroke-width property value, while `3` is not. Some browsers implicitly assign the `px` (pixel) unit to numeric values, but not all browsers do: IE, for example, throws an “invalid arguments†error! - -<a name="selection_property" href="#selection_property">#</a> <i>selection</i>.<b>property</b>(<i>name</i>[, <i>value</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/property.js) - -Some HTML elements have special properties that are not addressable using attributes or styles, such as a form field’s text `value` and a checkbox’s `checked` boolean. Use this method to get or set these properties. - -If a *value* is specified, sets the property with the specified *name* to the specified value on selected elements. If the *value* is a constant, then all elements are given the same property value; otherwise, if the *value* is a function, it is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element (*nodes*[*i*]). The function’s return value is then used to set each element’s property. A null value will delete the specified property. - -If a *value* is not specified, returns the value of the specified property for the first (non-null) element in the selection. This is generally useful only if you know the selection contains exactly one element. - -<a name="selection_text" href="#selection_text">#</a> <i>selection</i>.<b>text</b>([<i>value</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/text.js) - -If a *value* is specified, sets the [text content](http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent) to the specified value on all selected elements, replacing any existing child elements. If the *value* is a constant, then all elements are given the same text content; otherwise, if the *value* is a function, it is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element (*nodes*[*i*]). The function’s return value is then used to set each element’s text content. A null value will clear the content. - -If a *value* is not specified, returns the text content for the first (non-null) element in the selection. This is generally useful only if you know the selection contains exactly one element. - -<a name="selection_html" href="#selection_html">#</a> <i>selection</i>.<b>html</b>([<i>value</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/html.js) - -If a *value* is specified, sets the [inner HTML](http://dev.w3.org/html5/spec-LC/apis-in-html-documents.html#innerhtml) to the specified value on all selected elements, replacing any existing child elements. If the *value* is a constant, then all elements are given the same inner HTML; otherwise, if the *value* is a function, it is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element (*nodes*[*i*]). The function’s return value is then used to set each element’s inner HTML. A null value will clear the content. - -If a *value* is not specified, returns the inner HTML for the first (non-null) element in the selection. This is generally useful only if you know the selection contains exactly one element. - -Use [*selection*.append](#selection_append) or [*selection*.insert](#selection_insert) instead to create data-driven content; this method is intended for when you want a little bit of HTML, say for rich formatting. Also, *selection*.html is only supported on HTML elements. SVG elements and other non-HTML elements do not support the innerHTML property, and thus are incompatible with *selection*.html. Consider using [XMLSerializer](https://developer.mozilla.org/en-US/docs/XMLSerializer) to convert a DOM subtree to text. See also the [innersvg polyfill](https://code.google.com/p/innersvg/), which provides a shim to support the innerHTML property on SVG elements. - -<a name="selection_append" href="#selection_append">#</a> <i>selection</i>.<b>append</b>(<i>type</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/append.js) - -If the specified *type* is a string, appends a new element of this type (tag name) as the last child of each selected element, or before the next following sibling in the update selection if this is an [enter selection](#selection_enter). The latter behavior for enter selections allows you to insert elements into the DOM in an order consistent with the new bound data; however, note that [*selection*.order](#selection_order) may still be required if updating elements change order (*i.e.*, if the order of new data is inconsistent with old data). - -If the specified *type* is a function, it is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element (*nodes*[*i*]). This function should return an element to be appended. (The function typically creates a new element, but it may instead return an existing element.) For example, to append a paragraph to each DIV element: - -```js -d3.selectAll("div").append("p"); -``` - -This is equivalent to: - -```js -d3.selectAll("div").append(() => document.createElement("p")); -``` - -Which is equivalent to: - -```js -d3.selectAll("div").select(function() { - return this.appendChild(document.createElement("p")); -}); -``` - -In both cases, this method returns a new selection containing the appended elements. Each new element inherits the data of the current elements, if any, in the same manner as [*selection*.select](#selection_select). - -The specified *name* may have a namespace prefix, such as `svg:text` to specify a `text` attribute in the SVG namespace. See [namespaces](#namespaces) for the map of supported namespaces; additional namespaces can be registered by adding to the map. If no namespace is specified, the namespace will be inherited from the parent element; or, if the name is one of the known prefixes, the corresponding namespace will be used (for example, `svg` implies `svg:svg`). - -<a name="selection_insert" href="#selection_insert">#</a> <i>selection</i>.<b>insert</b>(<i>type</i>[, <i>before</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/insert.js) - -If the specified *type* is a string, inserts a new element of this type (tag name) before the first element matching the specified *before* selector for each selected element. For example, a *before* selector `:first-child` will prepend nodes before the first child. If *before* is not specified, it defaults to null. (To append elements in an order consistent with [bound data](#joining-data), use [*selection*.append](#selection_append).) - -Both *type* and *before* may instead be specified as functions which are evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element (*nodes*[*i*]). The *type* function should return an element to be inserted; the *before* function should return the child element before which the element should be inserted. For example, to append a paragraph to each DIV element: - -```js -d3.selectAll("div").insert("p"); -``` - -This is equivalent to: - -```js -d3.selectAll("div").insert(() => document.createElement("p")); -``` - -Which is equivalent to: - -```js -d3.selectAll("div").select(function() { - return this.insertBefore(document.createElement("p"), null); -}); -``` - -In both cases, this method returns a new selection containing the appended elements. Each new element inherits the data of the current elements, if any, in the same manner as [*selection*.select](#selection_select). - -The specified *name* may have a namespace prefix, such as `svg:text` to specify a `text` attribute in the SVG namespace. See [namespaces](#namespaces) for the map of supported namespaces; additional namespaces can be registered by adding to the map. If no namespace is specified, the namespace will be inherited from the parent element; or, if the name is one of the known prefixes, the corresponding namespace will be used (for example, `svg` implies `svg:svg`). - -<a name="selection_remove" href="#selection_remove">#</a> <i>selection</i>.<b>remove</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/remove.js) - -Removes the selected elements from the document. Returns this selection (the removed elements) which are now detached from the DOM. There is not currently a dedicated API to add removed elements back to the document; however, you can pass a function to [*selection*.append](#selection_append) or [*selection*.insert](#selection_insert) to re-add elements. - -<a name="selection_clone" href="#selection_clone">#</a> <i>selection</i>.<b>clone</b>([<i>deep</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/clone.js) - -Inserts clones of the selected elements immediately following the selected elements and returns a selection of the newly added clones. If *deep* is truthy, the descendant nodes of the selected elements will be cloned as well. Otherwise, only the elements themselves will be cloned. Equivalent to: - -```js -selection.select(function() { - return this.parentNode.insertBefore(this.cloneNode(deep), this.nextSibling); -}); -``` - -<a name="selection_sort" href="#selection_sort">#</a> <i>selection</i>.<b>sort</b>(<i>compare</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/sort.js) - -Returns a new selection that contains a copy of each group in this selection sorted according to the *compare* function. After sorting, re-inserts elements to match the resulting order (per [*selection*.order](#selection_order)). - -The compare function, which defaults to [ascending](https://github.com/d3/d3-array#ascending), is passed two elements’ data *a* and *b* to compare. It should return either a negative, positive, or zero value. If negative, then *a* should be before *b*; if positive, then *a* should be after *b*; otherwise, *a* and *b* are considered equal and the order is arbitrary. - -Note that sorting is not guaranteed to be stable; however, it is guaranteed to have the same behavior as your browser’s built-in [sort](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/sort) method on arrays. - -<a name="selection_order" href="#selection_order">#</a> <i>selection</i>.<b>order</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/order.js) - -Re-inserts elements into the document such that the document order of each group matches the selection order. This is equivalent to calling [*selection*.sort](#selection_sort) if the data is already sorted, but much faster. - -<a name="selection_raise" href="#selection_raise">#</a> <i>selection</i>.<b>raise</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/raise.js) - -Re-inserts each selected element, in order, as the last child of its parent. Equivalent to: - -```js -selection.each(function() { - this.parentNode.appendChild(this); -}); -``` - -<a name="selection_lower" href="#selection_lower">#</a> <i>selection</i>.<b>lower</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/lower.js) - -Re-inserts each selected element, in order, as the first child of its parent. Equivalent to: - -```js -selection.each(function() { - this.parentNode.insertBefore(this, this.parentNode.firstChild); -}); -``` - -<a name="create" href="#create">#</a> d3.<b>create</b>(<i>name</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/create.js) - -Given the specified element *name*, returns a single-element selection containing a detached element of the given name in the current document. This method assumes the HTML namespace, so you must specify a namespace explicitly when creating SVG or other non-HTML elements; see [namespace](#namespace) for details on supported namespace prefixes. - -```js -d3.create("svg") // equivalent to svg:svg -d3.create("svg:svg") // more explicitly -d3.create("svg:g") // an SVG G element -d3.create("g") // an HTML G (unknown) element -``` - -<a name="creator" href="#creator">#</a> d3.<b>creator</b>(<i>name</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/creator.js) - -Given the specified element *name*, returns a function which creates an element of the given name, assuming that `this` is the parent element. This method is used internally by [*selection*.append](#selection_append) and [*selection*.insert](#selection_insert) to create new elements. For example, this: - -```js -selection.append("div"); -``` - -Is equivalent to: - -```js -selection.append(d3.creator("div")); -``` - -See [namespace](#namespace) for details on supported namespace prefixes, such as for SVG elements. - -### Joining Data - -For an introduction to D3’s data joins, see the [*selection*.join notebook](https://observablehq.com/@d3/selection-join). Also see [Thinking With Joins](http://bost.ocks.org/mike/join/). - -<a name="selection_data" href="#selection_data">#</a> <i>selection</i>.<b>data</b>([<i>data</i>[, <i>key</i>]]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/data.js) - -Binds the specified array of *data* with the selected elements, returning a new selection that represents the *update* selection: the elements successfully bound to data. Also defines the [enter](#selection_enter) and [exit](#selection_exit) selections on the returned selection, which can be used to add or remove elements to correspond to the new data. The specified *data* is an array of arbitrary values (*e.g.*, numbers or objects), or a function that returns an array of values for each group. When data is assigned to an element, it is stored in the property `__data__`, thus making the data “sticky†and available on re-selection. - -The *data* is specified **for each group** in the selection. If the selection has multiple groups (such as [d3.selectAll](#selectAll) followed by [*selection*.selectAll](#selection_selectAll)), then *data* should typically be specified as a function. This function will be evaluated for each group in order, being passed the group’s parent datum (*d*, which may be undefined), the group index (*i*), and the selection’s parent nodes (*nodes*), with *this* as the group’s parent element. - -In conjunction with [*selection*.join](#selection_join) (or more explicitly with [*selection*.enter](#selection_enter), [*selection*.exit](#selection_exit), [*selection*.append](#selection_append) and [*selection*.remove](#selection_remove)), *selection*.data can be used to enter, update and exit elements to match data. For example, to create an HTML table from a matrix of numbers: - -```js -const matrix = [ - [11975, 5871, 8916, 2868], - [ 1951, 10048, 2060, 6171], - [ 8010, 16145, 8090, 8045], - [ 1013, 990, 940, 6907] -]; - -d3.select("body") - .append("table") - .selectAll("tr") - .data(matrix) - .join("tr") - .selectAll("td") - .data(d => d) - .join("td") - .text(d => d); -``` - -In this example the *data* function is the identity function: for each table row, it returns the corresponding row from the data matrix. - -If a *key* function is not specified, then the first datum in *data* is assigned to the first selected element, the second datum to the second selected element, and so on. A *key* function may be specified to control which datum is assigned to which element, replacing the default join-by-index, by computing a string identifier for each datum and element. This key function is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element (*nodes*[*i*]); the returned string is the element’s key. The key function is then also evaluated for each new datum in *data*, being passed the current datum (*d*), the current index (*i*), and the group’s new *data*, with *this* as the group’s parent DOM element; the returned string is the datum’s key. The datum for a given key is assigned to the element with the matching key. If multiple elements have the same key, the duplicate elements are put into the exit selection; if multiple data have the same key, the duplicate data are put into the enter selection. - -For example, given this document: - -```html -<div id="Ford"></div> -<div id="Jarrah"></div> -<div id="Kwon"></div> -<div id="Locke"></div> -<div id="Reyes"></div> -<div id="Shephard"></div> -``` - -You could join data by key as follows: - - -```js -const data = [ - {name: "Locke", number: 4}, - {name: "Reyes", number: 8}, - {name: "Ford", number: 15}, - {name: "Jarrah", number: 16}, - {name: "Shephard", number: 23}, - {name: "Kwon", number: 42} -]; - -d3.selectAll("div") - .data(data, function(d) { return d ? d.name : this.id; }) - .text(d => d.number); -``` - -This example key function uses the datum *d* if present, and otherwise falls back to the element’s id property. Since these elements were not previously bound to data, the datum *d* is null when the key function is evaluated on selected elements, and non-null when the key function is evaluated on the new data. - -The *update* and *enter* selections are returned in data order, while the *exit* selection preserves the selection order prior to the join. If a key function is specified, the order of elements in the selection may not match their order in the document; use [*selection*.order](#selection_order) or [*selection*.sort](#selection_sort) as needed. For more on how the key function affects the join, see [A Bar Chart, Part 2](http://bost.ocks.org/mike/bar/2/) and [Object Constancy](http://bost.ocks.org/mike/constancy/). - -If *data* is not specified, this method returns the array of data for the selected elements. - -This method cannot be used to clear bound data; use [*selection*.datum](#selection_datum) instead. - -<a name="selection_join" href="#selection_join">#</a> <i>selection</i>.<b>join</b>(<i>enter</i>[, <i>update</i>][, <i>exit</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/join.js) - -Appends, removes and reorders elements as necessary to match the data that was previously bound by [*selection*.data](#selection_data), returning the [merged](#selection_merge) enter and update selection. This method is a convenient alternative to the explicit [general update pattern](https://bl.ocks.org/mbostock/3808218), replacing [*selection*.enter](#selection_enter), [*selection*.exit](#selection_exit), [*selection*.append](#selection_append), [*selection*.remove](#selection_remove), and [*selection*.order](#selection_order). For example: - -```js -svg.selectAll("circle") - .data(data) - .join("circle") - .attr("fill", "none") - .attr("stroke", "black"); -``` - -The *enter* function may be specified as a string shorthand, as above, which is equivalent to [*selection*.append](#selection_append) with the given element name. Likewise, optional *update* and *exit* functions may be specified, which default to the identity function and calling [*selection*.remove](#selection_remove), respectively. The shorthand above is thus equivalent to: - -```js -svg.selectAll("circle") - .data(data) - .join( - enter => enter.append("circle"), - update => update, - exit => exit.remove() - ) - .attr("fill", "none") - .attr("stroke", "black"); -```` - -By passing separate functions on enter, update and exit, you have greater control over what happens. And by specifying a key function to [*selection*.data](#selection_data), you can minimize changes to the DOM to optimize performance. For example, to set different fill colors for enter and update: - -```js -svg.selectAll("circle") - .data(data) - .join( - enter => enter.append("circle").attr("fill", "green"), - update => update.attr("fill", "blue") - ) - .attr("stroke", "black"); -``` - -The selections returned by the *enter* and *update* functions are merged and then returned by *selection*.join. - -You also animate enter, update and exit by creating transitions inside the *enter*, *update* and *exit* functions. To avoid breaking the method chain, use *selection*.call to create transitions, or return an undefined enter or update selection to prevent merging: the return value of the *enter* and *update* functions specifies the two selections to merge and return by *selection*.join. - -For more, see the [*selection*.join notebook](https://observablehq.com/@d3/selection-join). - -<a name="selection_enter" href="#selection_enter">#</a> <i>selection</i>.<b>enter</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/enter.js) - -Returns the enter selection: placeholder nodes for each datum that had no corresponding DOM element in the selection. (The enter selection is empty for selections not returned by [*selection*.data](#selection_data).) - -The enter selection is typically used to create “missing†elements corresponding to new data. For example, to create DIV elements from an array of numbers: - -```js -const div = d3.select("body") - .selectAll("div") - .data([4, 8, 15, 16, 23, 42]) - .enter().append("div") - .text(d => d); -``` - -If the body is initially empty, the above code will create six new DIV elements, append them to the body in-order, and assign their text content as the associated (string-coerced) number: - -```html -<div>4</div> -<div>8</div> -<div>15</div> -<div>16</div> -<div>23</div> -<div>42</div> -``` - -Conceptually, the enter selection’s placeholders are pointers to the parent element (in this example, the document body). The enter selection is typically only used transiently to append elements, and is often [merged](#selection_merge) with the update selection after appending, such that modifications can be applied to both entering and updating elements. - -<a name="selection_exit" href="#selection_exit">#</a> <i>selection</i>.<b>exit</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/exit.js) - -Returns the exit selection: existing DOM elements in the selection for which no new datum was found. (The exit selection is empty for selections not returned by [*selection*.data](#selection_data).) - -The exit selection is typically used to remove “superfluous†elements corresponding to old data. For example, to update the DIV elements created previously with a new array of numbers: - -```js -div = div.data([1, 2, 4, 8, 16, 32], d => d); -``` - -Since a key function was specified (as the identity function), and the new data contains the numbers [4, 8, 16] which match existing elements in the document, the update selection contains three DIV elements. Leaving those elements as-is, we can append new elements for [1, 2, 32] using the enter selection: - -```js -div.enter().append("div").text(d => d); -``` - -Likewise, to remove the exiting elements [15, 23, 42]: - -```js -div.exit().remove(); -``` - -Now the document body looks like this: - -```html -<div>1</div> -<div>2</div> -<div>4</div> -<div>8</div> -<div>16</div> -<div>32</div> -``` - -The order of the DOM elements matches the order of the data because the old data’s order and the new data’s order were consistent. If the new data’s order is different, use [*selection*.order](#selection_order) to reorder the elements in the DOM. See the [General Update Pattern](http://bl.ocks.org/mbostock/3808218) example thread for more on data joins. - -<a name="selection_datum" href="#selection_datum">#</a> <i>selection</i>.<b>datum</b>([<i>value</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/datum.js) - -Gets or sets the bound data for each selected element. Unlike [*selection*.data](#selection_data), this method does not compute a join and does not affect indexes or the enter and exit selections. - -If a *value* is specified, sets the element’s bound data to the specified value on all selected elements. If the *value* is a constant, all elements are given the same datum; otherwise, if the *value* is a function, it is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element (*nodes*[*i*]). The function is then used to set each element’s new data. A null value will delete the bound data. - -If a *value* is not specified, returns the bound datum for the first (non-null) element in the selection. This is generally useful only if you know the selection contains exactly one element. - -This method is useful for accessing HTML5 [custom data attributes](http://www.w3.org/TR/html5/dom.html#custom-data-attribute). For example, given the following elements: - -```html -<ul id="list"> - <li data-username="shawnbot">Shawn Allen</li> - <li data-username="mbostock">Mike Bostock</li> -</ul> -``` - -You can expose the custom data attributes by setting each element’s data as the built-in [dataset](http://www.w3.org/TR/html5/dom.html#dom-dataset) property: - -```js -selection.datum(function() { return this.dataset; }) -``` - -### Handling Events - -For interaction, selections allow listening for and dispatching of events. - -<a name="selection_on" href="#selection_on">#</a> <i>selection</i>.<b>on</b>(<i>typenames</i>[, <i>listener</i>[, <i>options</i>]]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/on.js) - -Adds or removes a *listener* to each selected element for the specified event *typenames*. The *typenames* is a string event type, such as `click`, `mouseover`, or `submit`; any [DOM event type](https://developer.mozilla.org/en-US/docs/Web/Events#Standard_events) supported by your browser may be used. The type may be optionally followed by a period (`.`) and a name; the optional name allows multiple callbacks to be registered to receive events of the same type, such as `click.foo` and `click.bar`. To specify multiple typenames, separate typenames with spaces, such as `input change` or `click.foo click.bar`. - -When a specified event is dispatched on a selected element, the specified *listener* will be evaluated for the element, being passed the current event (*event*) and the current datum (*d*), with *this* as the current DOM element (*event*.currentTarget). Listeners always see the latest datum for their element. Note: while you can use [*event*.pageX](https://developer.mozilla.org/en/DOM/event.pageX) and [*event*.pageY](https://developer.mozilla.org/en/DOM/event.pageY) directly, it is often convenient to transform the event position to the local coordinate system of the element that received the event using [d3.pointer](#pointer). - -If an event listener was previously registered for the same *typename* on a selected element, the old listener is removed before the new listener is added. To remove a listener, pass null as the *listener*. To remove all listeners for a given name, pass null as the *listener* and `.foo` as the *typename*, where `foo` is the name; to remove all listeners with no name, specify `.` as the *typename*. - -An optional *options* object may specify characteristics about the event listener, such as whether it is capturing or passive; see [*element*.addEventListener](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener). - -If a *listener* is not specified, returns the currently-assigned listener for the specified event *typename* on the first (non-null) selected element, if any. If multiple typenames are specified, the first matching listener is returned. - -<a name="selection_dispatch" href="#selection_dispatch">#</a> <i>selection</i>.<b>dispatch</b>(<i>type</i>[, <i>parameters</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/dispatch.js) - -Dispatches a [custom event](http://www.w3.org/TR/dom/#interface-customevent) of the specified *type* to each selected element, in order. An optional *parameters* map may be specified to set additional properties of the event. It may contain the following fields: - -* [`bubbles`](https://www.w3.org/TR/dom/#dom-event-bubbles) - if true, the event is dispatched to ancestors in reverse tree order. -* [`cancelable`](https://www.w3.org/TR/dom/#dom-event-cancelable) - if true, *event*.preventDefault is allowed. -* [`detail`](https://www.w3.org/TR/dom/#dom-customevent-detail) - any custom data associated with the event. - -If *parameters* is a function, it is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element (*nodes*[*i*]). It must return the parameters map for the current element. - -<a name="pointer" href="#pointer">#</a> d3.<b>pointer</b>(<i>event</i>[, <i>target</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/pointer.js) - -Returns a two-element array of numbers [*x*, *y*] representing the coordinates of the specified *event* relative to the specified *target*. *event* can be a [UIEvent](https://developer.mozilla.org/en-US/docs/Web/API/UIEvent) (MouseEvent or TouchEvent), a [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent), a custom event holding a UIEvent as *event*.sourceEvent, or a [touch](https://www.w3.org/TR/touch-events/#touch-interface). - -If *target* is not specified, it defaults to the source event’s currentTarget property, if available. - -If the *target* is an SVG element, the event’s coordinates are transformed using the [inverse](https://www.w3.org/TR/geometry-1/#dom-dommatrixreadonly-inverse) of the [screen coordinate transformation matrix](https://www.w3.org/TR/SVG/types.html#__svg__SVGGraphicsElement__getScreenCTM). - -If the *target* is an HTML element, the event’s coordinates are translated relative to the top-left corner of the *target*’s [bounding client rectangle](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect). (As such, the coordinate system can only be translated relative to the client coordinates. See also [GeometryUtils](https://www.w3.org/TR/cssom-view-1/#the-geometryutils-interface).) - -Otherwise, [*event*.pageX, *event*.pageY] is returned. - -In the case of touch events, the coordinates of the first touch are returned. To handle multitouch interactions, see [pointers](#pointers) instead. - -<a name="pointers" href="#pointers">#</a> d3.<b>pointers</b>(<i>event</i>[, <i>target</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/pointers.js) - -Returns an array [[*x0*, *y0*], [*x1*, *y1*]…] of coordinates of the specified *event*’s pointer locations relative to the specified *target*. For mouse, stylus or single touch events, [*x0*, *y0*] is equivalent to d3.pointer(event, target). In the case of multi-touch events, the returned array contains a pair of coordinates for each of the touches. - -If *target* is not specified, it defaults to the source event’s currentTarget property, if available. - -### Control Flow - -For advanced usage, selections provide methods for custom control flow. - -<a name="selection_each" href="#selection_each">#</a> <i>selection</i>.<b>each</b>(<i>function</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/each.js) - -Invokes the specified *function* for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element (*nodes*[*i*]). This method can be used to invoke arbitrary code for each selected element, and is useful for creating a context to access parent and child data simultaneously, such as: - -```js -parent.each(function(p, j) { - d3.select(this) - .selectAll(".child") - .text(d => `child ${d.name} of ${p.name}`); -}); -``` - -See [Sized Donut Multiples](http://bl.ocks.org/mbostock/4c5fad723c87d2fd8273) for an example. - -<a name="selection_call" href="#selection_call">#</a> <i>selection</i>.<b>call</b>(<i>function</i>[, <i>arguments…</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/call.js) - -Invokes the specified *function* exactly once, passing in this selection along with any optional *arguments*. Returns this selection. This is equivalent to invoking the function by hand but facilitates method chaining. For example, to set several styles in a reusable function: - -```js -function name(selection, first, last) { - selection - .attr("first-name", first) - .attr("last-name", last); -} -``` - -Now say: - -```js -d3.selectAll("div").call(name, "John", "Snow"); -``` - -This is roughly equivalent to: - -```js -name(d3.selectAll("div"), "John", "Snow"); -``` - -The only difference is that *selection*.call always returns the *selection* and not the return value of the called *function*, `name`. - -<a name="selection_empty" href="#selection_empty">#</a> <i>selection</i>.<b>empty</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/empty.js) - -Returns true if this selection contains no (non-null) elements. - -<a name="selection_nodes" href="#selection_nodes">#</a> <i>selection</i>.<b>nodes</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/nodes.js) - -Returns an array of all (non-null) elements in this selection. Equivalent to: - -```js -const elements = Array.from(selection); -```` - -See also [*selection*[Symbol.iterator]](#selection_iterator). - -<a name="selection_node" href="#selection_node">#</a> <i>selection</i>.<b>node</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/node.js) - -Returns the first (non-null) element in this selection. If the selection is empty, returns null. - -<a name="selection_size" href="#selection_size">#</a> <i>selection</i>.<b>size</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/size.js) - -Returns the total number of (non-null) elements in this selection. - -<a name="selection_iterator" href="#selection_iterator">#</a> <i>selection</i>[<b>Symbol.iterator</b>]() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/iterator.js) - -Returns an iterator over the selected (non-null) elements. For example, to iterate over the selected elements: - -```js -for (const element of selection) { - console.log(element); -} -``` - -To flatten the selection to an array: - -```js -const elements = [...selection]; -```` - -### Local Variables - -D3 locals allow you to define local state independent of data. For instance, when rendering [small multiples](http://bl.ocks.org/mbostock/e1192fe405703d8321a5187350910e08) of time-series data, you might want the same *x*-scale for all charts but distinct *y*-scales to compare the relative performance of each metric. D3 locals are scoped by DOM elements: on set, the value is stored on the given element; on get, the value is retrieved from given element or the nearest ancestor that defines it. - -<a name="local" href="#local">#</a> d3.<b>local</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/local.js) - -Declares a new local variable. For example: - -```js -const foo = d3.local(); -``` - -Like `var`, each local is a distinct symbolic reference; unlike `var`, the value of each local is also scoped by the DOM. - -<a name="local_set" href="#local_set">#</a> <i>local</i>.<b>set</b>(<i>node</i>, <i>value</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/local.js) - -Sets the value of this local on the specified *node* to the *value*, and returns the specified *value*. This is often performed using [*selection*.each](#selection_each): - -```js -selection.each(function(d) { foo.set(this, d.value); }); -``` - -If you are just setting a single variable, consider using [*selection*.property](#selection_property): - -```js -selection.property(foo, d => d.value); -``` - -<a name="local_get" href="#local_get">#</a> <i>local</i>.<b>get</b>(<i>node</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/local.js) - -Returns the value of this local on the specified *node*. If the *node* does not define this local, returns the value from the nearest ancestor that defines it. Returns undefined if no ancestor defines this local. - -<a name="local_remove" href="#local_remove">#</a> <i>local</i>.<b>remove</b>(<i>node</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/local.js) - -Deletes this local’s value from the specified *node*. Returns true if the *node* defined this local prior to removal, and false otherwise. If ancestors also define this local, those definitions are unaffected, and thus [*local*.get](#local_get) will still return the inherited value. - -<a name="local_toString" href="#local_toString">#</a> <i>local</i>.<b>toString</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/local.js) - -Returns the automatically-generated identifier for this local. This is the name of the property that is used to store the local’s value on elements, and thus you can also set or get the local’s value using *element*[*local*] or by using [*selection*.property](#selection_property). - -### Namespaces - -XML namespaces are fun! Right? Fortunately you can mostly ignore them. - -<a name="namespace" href="#namespace">#</a> d3.<b>namespace</b>(<i>name</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/namespace.js) - -Qualifies the specified *name*, which may or may not have a namespace prefix. If the name contains a colon (`:`), the substring before the colon is interpreted as the namespace prefix, which must be registered in [d3.namespaces](#namespaces). Returns an object `space` and `local` attributes describing the full namespace URL and the local name. For example: - -```js -d3.namespace("svg:text"); // {space: "http://www.w3.org/2000/svg", local: "text"} -``` - -If the name does not contain a colon, this function merely returns the input name. - -<a name="namespaces" href="#namespaces">#</a> d3.<b>namespaces</b> · [Source](https://github.com/d3/d3-selection/blob/master/src/namespaces.js) - -The map of registered namespace prefixes. The initial value is: - -```js -{ - svg: "http://www.w3.org/2000/svg", - xhtml: "http://www.w3.org/1999/xhtml", - xlink: "http://www.w3.org/1999/xlink", - xml: "http://www.w3.org/XML/1998/namespace", - xmlns: "http://www.w3.org/2000/xmlns/" -} -``` - -Additional prefixes may be assigned as needed to create elements or attributes in other namespaces. diff --git a/node_modules/d3-selection/dist/d3-selection.js b/node_modules/d3-selection/dist/d3-selection.js deleted file mode 100644 index 582cfababf22ad692ef95ecc72d05575e02f4a32..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/dist/d3-selection.js +++ /dev/null @@ -1,999 +0,0 @@ -// https://d3js.org/d3-selection/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {})); -}(this, function (exports) { 'use strict'; - -var xhtml = "http://www.w3.org/1999/xhtml"; - -var namespaces = { - svg: "http://www.w3.org/2000/svg", - xhtml: xhtml, - xlink: "http://www.w3.org/1999/xlink", - xml: "http://www.w3.org/XML/1998/namespace", - xmlns: "http://www.w3.org/2000/xmlns/" -}; - -function namespace(name) { - var prefix = name += "", i = prefix.indexOf(":"); - if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1); - return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins -} - -function creatorInherit(name) { - return function() { - var document = this.ownerDocument, - uri = this.namespaceURI; - return uri === xhtml && document.documentElement.namespaceURI === xhtml - ? document.createElement(name) - : document.createElementNS(uri, name); - }; -} - -function creatorFixed(fullname) { - return function() { - return this.ownerDocument.createElementNS(fullname.space, fullname.local); - }; -} - -function creator(name) { - var fullname = namespace(name); - return (fullname.local - ? creatorFixed - : creatorInherit)(fullname); -} - -function none() {} - -function selector(selector) { - return selector == null ? none : function() { - return this.querySelector(selector); - }; -} - -function selection_select(select) { - if (typeof select !== "function") select = selector(select); - - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { - if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { - if ("__data__" in node) subnode.__data__ = node.__data__; - subgroup[i] = subnode; - } - } - } - - return new Selection(subgroups, this._parents); -} - -function array(x) { - return typeof x === "object" && "length" in x - ? x // Array, TypedArray, NodeList, array-like - : Array.from(x); // Map, Set, iterable, string, or anything else -} - -function empty() { - return []; -} - -function selectorAll(selector) { - return selector == null ? empty : function() { - return this.querySelectorAll(selector); - }; -} - -function arrayAll(select) { - return function() { - var group = select.apply(this, arguments); - return group == null ? [] : array(group); - }; -} - -function selection_selectAll(select) { - if (typeof select === "function") select = arrayAll(select); - else select = selectorAll(select); - - for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - subgroups.push(select.call(node, node.__data__, i, group)); - parents.push(node); - } - } - } - - return new Selection(subgroups, parents); -} - -function matcher(selector) { - return function() { - return this.matches(selector); - }; -} - -function childMatcher(selector) { - return function(node) { - return node.matches(selector); - }; -} - -var find = Array.prototype.find; - -function childFind(match) { - return function() { - return find.call(this.children, match); - }; -} - -function childFirst() { - return this.firstElementChild; -} - -function selection_selectChild(match) { - return this.select(match == null ? childFirst - : childFind(typeof match === "function" ? match : childMatcher(match))); -} - -var filter = Array.prototype.filter; - -function children() { - return this.children; -} - -function childrenFilter(match) { - return function() { - return filter.call(this.children, match); - }; -} - -function selection_selectChildren(match) { - return this.selectAll(match == null ? children - : childrenFilter(typeof match === "function" ? match : childMatcher(match))); -} - -function selection_filter(match) { - if (typeof match !== "function") match = matcher(match); - - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { - if ((node = group[i]) && match.call(node, node.__data__, i, group)) { - subgroup.push(node); - } - } - } - - return new Selection(subgroups, this._parents); -} - -function sparse(update) { - return new Array(update.length); -} - -function selection_enter() { - return new Selection(this._enter || this._groups.map(sparse), this._parents); -} - -function EnterNode(parent, datum) { - this.ownerDocument = parent.ownerDocument; - this.namespaceURI = parent.namespaceURI; - this._next = null; - this._parent = parent; - this.__data__ = datum; -} - -EnterNode.prototype = { - constructor: EnterNode, - appendChild: function(child) { return this._parent.insertBefore(child, this._next); }, - insertBefore: function(child, next) { return this._parent.insertBefore(child, next); }, - querySelector: function(selector) { return this._parent.querySelector(selector); }, - querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); } -}; - -function constant(x) { - return function() { - return x; - }; -} - -function bindIndex(parent, group, enter, update, exit, data) { - var i = 0, - node, - groupLength = group.length, - dataLength = data.length; - - // Put any non-null nodes that fit into update. - // Put any null nodes into enter. - // Put any remaining data into enter. - for (; i < dataLength; ++i) { - if (node = group[i]) { - node.__data__ = data[i]; - update[i] = node; - } else { - enter[i] = new EnterNode(parent, data[i]); - } - } - - // Put any non-null nodes that don’t fit into exit. - for (; i < groupLength; ++i) { - if (node = group[i]) { - exit[i] = node; - } - } -} - -function bindKey(parent, group, enter, update, exit, data, key) { - var i, - node, - nodeByKeyValue = new Map, - groupLength = group.length, - dataLength = data.length, - keyValues = new Array(groupLength), - keyValue; - - // Compute the key for each node. - // If multiple nodes have the same key, the duplicates are added to exit. - for (i = 0; i < groupLength; ++i) { - if (node = group[i]) { - keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + ""; - if (nodeByKeyValue.has(keyValue)) { - exit[i] = node; - } else { - nodeByKeyValue.set(keyValue, node); - } - } - } - - // Compute the key for each datum. - // If there a node associated with this key, join and add it to update. - // If there is not (or the key is a duplicate), add it to enter. - for (i = 0; i < dataLength; ++i) { - keyValue = key.call(parent, data[i], i, data) + ""; - if (node = nodeByKeyValue.get(keyValue)) { - update[i] = node; - node.__data__ = data[i]; - nodeByKeyValue.delete(keyValue); - } else { - enter[i] = new EnterNode(parent, data[i]); - } - } - - // Add any remaining nodes that were not bound to data to exit. - for (i = 0; i < groupLength; ++i) { - if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) { - exit[i] = node; - } - } -} - -function datum(node) { - return node.__data__; -} - -function selection_data(value, key) { - if (!arguments.length) return Array.from(this, datum); - - var bind = key ? bindKey : bindIndex, - parents = this._parents, - groups = this._groups; - - if (typeof value !== "function") value = constant(value); - - for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) { - var parent = parents[j], - group = groups[j], - groupLength = group.length, - data = array(value.call(parent, parent && parent.__data__, j, parents)), - dataLength = data.length, - enterGroup = enter[j] = new Array(dataLength), - updateGroup = update[j] = new Array(dataLength), - exitGroup = exit[j] = new Array(groupLength); - - bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); - - // Now connect the enter nodes to their following update node, such that - // appendChild can insert the materialized enter node before this node, - // rather than at the end of the parent node. - for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) { - if (previous = enterGroup[i0]) { - if (i0 >= i1) i1 = i0 + 1; - while (!(next = updateGroup[i1]) && ++i1 < dataLength); - previous._next = next || null; - } - } - } - - update = new Selection(update, parents); - update._enter = enter; - update._exit = exit; - return update; -} - -function selection_exit() { - return new Selection(this._exit || this._groups.map(sparse), this._parents); -} - -function selection_join(onenter, onupdate, onexit) { - var enter = this.enter(), update = this, exit = this.exit(); - enter = typeof onenter === "function" ? onenter(enter) : enter.append(onenter + ""); - if (onupdate != null) update = onupdate(update); - if (onexit == null) exit.remove(); else onexit(exit); - return enter && update ? enter.merge(update).order() : update; -} - -function selection_merge(selection) { - if (!(selection instanceof Selection)) throw new Error("invalid merge"); - - for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { - for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { - if (node = group0[i] || group1[i]) { - merge[i] = node; - } - } - } - - for (; j < m0; ++j) { - merges[j] = groups0[j]; - } - - return new Selection(merges, this._parents); -} - -function selection_order() { - - for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) { - for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) { - if (node = group[i]) { - if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next); - next = node; - } - } - } - - return this; -} - -function selection_sort(compare) { - if (!compare) compare = ascending; - - function compareNode(a, b) { - return a && b ? compare(a.__data__, b.__data__) : !a - !b; - } - - for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) { - if (node = group[i]) { - sortgroup[i] = node; - } - } - sortgroup.sort(compareNode); - } - - return new Selection(sortgroups, this._parents).order(); -} - -function ascending(a, b) { - return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; -} - -function selection_call() { - var callback = arguments[0]; - arguments[0] = this; - callback.apply(null, arguments); - return this; -} - -function selection_nodes() { - return Array.from(this); -} - -function selection_node() { - - for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { - for (var group = groups[j], i = 0, n = group.length; i < n; ++i) { - var node = group[i]; - if (node) return node; - } - } - - return null; -} - -function selection_size() { - let size = 0; - for (const node of this) ++size; // eslint-disable-line no-unused-vars - return size; -} - -function selection_empty() { - return !this.node(); -} - -function selection_each(callback) { - - for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { - for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { - if (node = group[i]) callback.call(node, node.__data__, i, group); - } - } - - return this; -} - -function attrRemove(name) { - return function() { - this.removeAttribute(name); - }; -} - -function attrRemoveNS(fullname) { - return function() { - this.removeAttributeNS(fullname.space, fullname.local); - }; -} - -function attrConstant(name, value) { - return function() { - this.setAttribute(name, value); - }; -} - -function attrConstantNS(fullname, value) { - return function() { - this.setAttributeNS(fullname.space, fullname.local, value); - }; -} - -function attrFunction(name, value) { - return function() { - var v = value.apply(this, arguments); - if (v == null) this.removeAttribute(name); - else this.setAttribute(name, v); - }; -} - -function attrFunctionNS(fullname, value) { - return function() { - var v = value.apply(this, arguments); - if (v == null) this.removeAttributeNS(fullname.space, fullname.local); - else this.setAttributeNS(fullname.space, fullname.local, v); - }; -} - -function selection_attr(name, value) { - var fullname = namespace(name); - - if (arguments.length < 2) { - var node = this.node(); - return fullname.local - ? node.getAttributeNS(fullname.space, fullname.local) - : node.getAttribute(fullname); - } - - return this.each((value == null - ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === "function" - ? (fullname.local ? attrFunctionNS : attrFunction) - : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value)); -} - -function defaultView(node) { - return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node - || (node.document && node) // node is a Window - || node.defaultView; // node is a Document -} - -function styleRemove(name) { - return function() { - this.style.removeProperty(name); - }; -} - -function styleConstant(name, value, priority) { - return function() { - this.style.setProperty(name, value, priority); - }; -} - -function styleFunction(name, value, priority) { - return function() { - var v = value.apply(this, arguments); - if (v == null) this.style.removeProperty(name); - else this.style.setProperty(name, v, priority); - }; -} - -function selection_style(name, value, priority) { - return arguments.length > 1 - ? this.each((value == null - ? styleRemove : typeof value === "function" - ? styleFunction - : styleConstant)(name, value, priority == null ? "" : priority)) - : styleValue(this.node(), name); -} - -function styleValue(node, name) { - return node.style.getPropertyValue(name) - || defaultView(node).getComputedStyle(node, null).getPropertyValue(name); -} - -function propertyRemove(name) { - return function() { - delete this[name]; - }; -} - -function propertyConstant(name, value) { - return function() { - this[name] = value; - }; -} - -function propertyFunction(name, value) { - return function() { - var v = value.apply(this, arguments); - if (v == null) delete this[name]; - else this[name] = v; - }; -} - -function selection_property(name, value) { - return arguments.length > 1 - ? this.each((value == null - ? propertyRemove : typeof value === "function" - ? propertyFunction - : propertyConstant)(name, value)) - : this.node()[name]; -} - -function classArray(string) { - return string.trim().split(/^|\s+/); -} - -function classList(node) { - return node.classList || new ClassList(node); -} - -function ClassList(node) { - this._node = node; - this._names = classArray(node.getAttribute("class") || ""); -} - -ClassList.prototype = { - add: function(name) { - var i = this._names.indexOf(name); - if (i < 0) { - this._names.push(name); - this._node.setAttribute("class", this._names.join(" ")); - } - }, - remove: function(name) { - var i = this._names.indexOf(name); - if (i >= 0) { - this._names.splice(i, 1); - this._node.setAttribute("class", this._names.join(" ")); - } - }, - contains: function(name) { - return this._names.indexOf(name) >= 0; - } -}; - -function classedAdd(node, names) { - var list = classList(node), i = -1, n = names.length; - while (++i < n) list.add(names[i]); -} - -function classedRemove(node, names) { - var list = classList(node), i = -1, n = names.length; - while (++i < n) list.remove(names[i]); -} - -function classedTrue(names) { - return function() { - classedAdd(this, names); - }; -} - -function classedFalse(names) { - return function() { - classedRemove(this, names); - }; -} - -function classedFunction(names, value) { - return function() { - (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names); - }; -} - -function selection_classed(name, value) { - var names = classArray(name + ""); - - if (arguments.length < 2) { - var list = classList(this.node()), i = -1, n = names.length; - while (++i < n) if (!list.contains(names[i])) return false; - return true; - } - - return this.each((typeof value === "function" - ? classedFunction : value - ? classedTrue - : classedFalse)(names, value)); -} - -function textRemove() { - this.textContent = ""; -} - -function textConstant(value) { - return function() { - this.textContent = value; - }; -} - -function textFunction(value) { - return function() { - var v = value.apply(this, arguments); - this.textContent = v == null ? "" : v; - }; -} - -function selection_text(value) { - return arguments.length - ? this.each(value == null - ? textRemove : (typeof value === "function" - ? textFunction - : textConstant)(value)) - : this.node().textContent; -} - -function htmlRemove() { - this.innerHTML = ""; -} - -function htmlConstant(value) { - return function() { - this.innerHTML = value; - }; -} - -function htmlFunction(value) { - return function() { - var v = value.apply(this, arguments); - this.innerHTML = v == null ? "" : v; - }; -} - -function selection_html(value) { - return arguments.length - ? this.each(value == null - ? htmlRemove : (typeof value === "function" - ? htmlFunction - : htmlConstant)(value)) - : this.node().innerHTML; -} - -function raise() { - if (this.nextSibling) this.parentNode.appendChild(this); -} - -function selection_raise() { - return this.each(raise); -} - -function lower() { - if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild); -} - -function selection_lower() { - return this.each(lower); -} - -function selection_append(name) { - var create = typeof name === "function" ? name : creator(name); - return this.select(function() { - return this.appendChild(create.apply(this, arguments)); - }); -} - -function constantNull() { - return null; -} - -function selection_insert(name, before) { - var create = typeof name === "function" ? name : creator(name), - select = before == null ? constantNull : typeof before === "function" ? before : selector(before); - return this.select(function() { - return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null); - }); -} - -function remove() { - var parent = this.parentNode; - if (parent) parent.removeChild(this); -} - -function selection_remove() { - return this.each(remove); -} - -function selection_cloneShallow() { - var clone = this.cloneNode(false), parent = this.parentNode; - return parent ? parent.insertBefore(clone, this.nextSibling) : clone; -} - -function selection_cloneDeep() { - var clone = this.cloneNode(true), parent = this.parentNode; - return parent ? parent.insertBefore(clone, this.nextSibling) : clone; -} - -function selection_clone(deep) { - return this.select(deep ? selection_cloneDeep : selection_cloneShallow); -} - -function selection_datum(value) { - return arguments.length - ? this.property("__data__", value) - : this.node().__data__; -} - -function contextListener(listener) { - return function(event) { - listener.call(this, event, this.__data__); - }; -} - -function parseTypenames(typenames) { - return typenames.trim().split(/^|\s+/).map(function(t) { - var name = "", i = t.indexOf("."); - if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); - return {type: t, name: name}; - }); -} - -function onRemove(typename) { - return function() { - var on = this.__on; - if (!on) return; - for (var j = 0, i = -1, m = on.length, o; j < m; ++j) { - if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) { - this.removeEventListener(o.type, o.listener, o.options); - } else { - on[++i] = o; - } - } - if (++i) on.length = i; - else delete this.__on; - }; -} - -function onAdd(typename, value, options) { - return function() { - var on = this.__on, o, listener = contextListener(value); - if (on) for (var j = 0, m = on.length; j < m; ++j) { - if ((o = on[j]).type === typename.type && o.name === typename.name) { - this.removeEventListener(o.type, o.listener, o.options); - this.addEventListener(o.type, o.listener = listener, o.options = options); - o.value = value; - return; - } - } - this.addEventListener(typename.type, listener, options); - o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options}; - if (!on) this.__on = [o]; - else on.push(o); - }; -} - -function selection_on(typename, value, options) { - var typenames = parseTypenames(typename + ""), i, n = typenames.length, t; - - if (arguments.length < 2) { - var on = this.node().__on; - if (on) for (var j = 0, m = on.length, o; j < m; ++j) { - for (i = 0, o = on[j]; i < n; ++i) { - if ((t = typenames[i]).type === o.type && t.name === o.name) { - return o.value; - } - } - } - return; - } - - on = value ? onAdd : onRemove; - for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options)); - return this; -} - -function dispatchEvent(node, type, params) { - var window = defaultView(node), - event = window.CustomEvent; - - if (typeof event === "function") { - event = new event(type, params); - } else { - event = window.document.createEvent("Event"); - if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail; - else event.initEvent(type, false, false); - } - - node.dispatchEvent(event); -} - -function dispatchConstant(type, params) { - return function() { - return dispatchEvent(this, type, params); - }; -} - -function dispatchFunction(type, params) { - return function() { - return dispatchEvent(this, type, params.apply(this, arguments)); - }; -} - -function selection_dispatch(type, params) { - return this.each((typeof params === "function" - ? dispatchFunction - : dispatchConstant)(type, params)); -} - -function* selection_iterator() { - for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { - for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { - if (node = group[i]) yield node; - } - } -} - -var root = [null]; - -function Selection(groups, parents) { - this._groups = groups; - this._parents = parents; -} - -function selection() { - return new Selection([[document.documentElement]], root); -} - -function selection_selection() { - return this; -} - -Selection.prototype = selection.prototype = { - constructor: Selection, - select: selection_select, - selectAll: selection_selectAll, - selectChild: selection_selectChild, - selectChildren: selection_selectChildren, - filter: selection_filter, - data: selection_data, - enter: selection_enter, - exit: selection_exit, - join: selection_join, - merge: selection_merge, - selection: selection_selection, - order: selection_order, - sort: selection_sort, - call: selection_call, - nodes: selection_nodes, - node: selection_node, - size: selection_size, - empty: selection_empty, - each: selection_each, - attr: selection_attr, - style: selection_style, - property: selection_property, - classed: selection_classed, - text: selection_text, - html: selection_html, - raise: selection_raise, - lower: selection_lower, - append: selection_append, - insert: selection_insert, - remove: selection_remove, - clone: selection_clone, - datum: selection_datum, - on: selection_on, - dispatch: selection_dispatch, - [Symbol.iterator]: selection_iterator -}; - -function select(selector) { - return typeof selector === "string" - ? new Selection([[document.querySelector(selector)]], [document.documentElement]) - : new Selection([[selector]], root); -} - -function create(name) { - return select(creator(name).call(document.documentElement)); -} - -var nextId = 0; - -function local() { - return new Local; -} - -function Local() { - this._ = "@" + (++nextId).toString(36); -} - -Local.prototype = local.prototype = { - constructor: Local, - get: function(node) { - var id = this._; - while (!(id in node)) if (!(node = node.parentNode)) return; - return node[id]; - }, - set: function(node, value) { - return node[this._] = value; - }, - remove: function(node) { - return this._ in node && delete node[this._]; - }, - toString: function() { - return this._; - } -}; - -function sourceEvent(event) { - let sourceEvent; - while (sourceEvent = event.sourceEvent) event = sourceEvent; - return event; -} - -function pointer(event, node) { - event = sourceEvent(event); - if (node === undefined) node = event.currentTarget; - if (node) { - var svg = node.ownerSVGElement || node; - if (svg.createSVGPoint) { - var point = svg.createSVGPoint(); - point.x = event.clientX, point.y = event.clientY; - point = point.matrixTransform(node.getScreenCTM().inverse()); - return [point.x, point.y]; - } - if (node.getBoundingClientRect) { - var rect = node.getBoundingClientRect(); - return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop]; - } - } - return [event.pageX, event.pageY]; -} - -function pointers(events, node) { - if (events.target) { // i.e., instanceof Event, not TouchList or iterable - events = sourceEvent(events); - if (node === undefined) node = events.currentTarget; - events = events.touches || [events]; - } - return Array.from(events, event => pointer(event, node)); -} - -function selectAll(selector) { - return typeof selector === "string" - ? new Selection([document.querySelectorAll(selector)], [document.documentElement]) - : new Selection([selector == null ? [] : array(selector)], root); -} - -exports.create = create; -exports.creator = creator; -exports.local = local; -exports.matcher = matcher; -exports.namespace = namespace; -exports.namespaces = namespaces; -exports.pointer = pointer; -exports.pointers = pointers; -exports.select = select; -exports.selectAll = selectAll; -exports.selection = selection; -exports.selector = selector; -exports.selectorAll = selectorAll; -exports.style = styleValue; -exports.window = defaultView; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-selection/dist/d3-selection.min.js b/node_modules/d3-selection/dist/d3-selection.min.js deleted file mode 100644 index 46a30ba49d285890e0e562926461e872cf96c8e1..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/dist/d3-selection.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-selection/ v2.0.0 Copyright 2020 Mike Bostock -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t=t||self).d3=t.d3||{})}(this,function(t){"use strict";var n="http://www.w3.org/1999/xhtml",e={svg:"http://www.w3.org/2000/svg",xhtml:n,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function r(t){var n=t+="",r=n.indexOf(":");return r>=0&&"xmlns"!==(n=t.slice(0,r))&&(t=t.slice(r+1)),e.hasOwnProperty(n)?{space:e[n],local:t}:t}function i(t){var e=r(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===n&&e.documentElement.namespaceURI===n?e.createElement(t):e.createElementNS(r,t)}})(e)}function o(){}function u(t){return null==t?o:function(){return this.querySelector(t)}}function c(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function s(){return[]}function l(t){return null==t?s:function(){return this.querySelectorAll(t)}}function a(t){return function(){return this.matches(t)}}function f(t){return function(n){return n.matches(t)}}var h=Array.prototype.find;function p(){return this.firstElementChild}var _=Array.prototype.filter;function d(){return this.children}function y(t){return new Array(t.length)}function v(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function m(t,n,e,r,i,o){for(var u,c=0,s=n.length,l=o.length;c<l;++c)(u=n[c])?(u.__data__=o[c],r[c]=u):e[c]=new v(t,o[c]);for(;c<s;++c)(u=n[c])&&(i[c]=u)}function g(t,n,e,r,i,o,u){var c,s,l,a=new Map,f=n.length,h=o.length,p=new Array(f);for(c=0;c<f;++c)(s=n[c])&&(p[c]=l=u.call(s,s.__data__,c,n)+"",a.has(l)?i[c]=s:a.set(l,s));for(c=0;c<h;++c)l=u.call(t,o[c],c,o)+"",(s=a.get(l))?(r[c]=s,s.__data__=o[c],a.delete(l)):e[c]=new v(t,o[c]);for(c=0;c<f;++c)(s=n[c])&&a.get(p[c])===s&&(i[c]=s)}function w(t){return t.__data__}function A(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function x(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function S(t,n){return t.style.getPropertyValue(n)||x(t).getComputedStyle(t,null).getPropertyValue(n)}function b(t){return t.trim().split(/^|\s+/)}function E(t){return t.classList||new N(t)}function N(t){this._node=t,this._names=b(t.getAttribute("class")||"")}function C(t,n){for(var e=E(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function L(t,n){for(var e=E(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function P(){this.textContent=""}function B(){this.innerHTML=""}function M(){this.nextSibling&&this.parentNode.appendChild(this)}function T(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function q(){return null}function D(){var t=this.parentNode;t&&t.removeChild(this)}function O(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function V(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function j(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.options);++i?n.length=i:delete this.__on}}}function R(t,n,e){return function(){var r,i=this.__on,o=function(t){return function(n){t.call(this,n,this.__data__)}}(n);if(i)for(var u=0,c=i.length;u<c;++u)if((r=i[u]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=e),void(r.value=n);this.addEventListener(t.type,o,e),r={type:t.type,name:t.name,value:n,listener:o,options:e},i?i.push(r):this.__on=[r]}}function H(t,n,e){var r=x(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}v.prototype={constructor:v,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},N.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var I=[null];function U(t,n){this._groups=t,this._parents=n}function X(){return new U([[document.documentElement]],I)}function G(t){return"string"==typeof t?new U([[document.querySelector(t)]],[document.documentElement]):new U([[t]],I)}U.prototype=X.prototype={constructor:U,select:function(t){"function"!=typeof t&&(t=u(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,c,s=n[i],l=s.length,a=r[i]=new Array(l),f=0;f<l;++f)(o=s[f])&&(c=t.call(o,o.__data__,f,s))&&("__data__"in o&&(c.__data__=o.__data__),a[f]=c);return new U(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);return null==n?[]:c(n)}}(t):l(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,s=n[o],a=s.length,f=0;f<a;++f)(u=s[f])&&(r.push(t.call(u,u.__data__,f,s)),i.push(u));return new U(r,i)},selectChild:function(t){return this.select(null==t?p:function(t){return function(){return h.call(this.children,t)}}("function"==typeof t?t:f(t)))},selectChildren:function(t){return this.selectAll(null==t?d:function(t){return function(){return _.call(this.children,t)}}("function"==typeof t?t:f(t)))},filter:function(t){"function"!=typeof t&&(t=a(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],c=u.length,s=r[i]=[],l=0;l<c;++l)(o=u[l])&&t.call(o,o.__data__,l,u)&&s.push(o);return new U(r,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,w);var e,r=n?g:m,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var u=o.length,s=new Array(u),l=new Array(u),a=new Array(u),f=0;f<u;++f){var h=i[f],p=o[f],_=p.length,d=c(t.call(h,h&&h.__data__,f,i)),y=d.length,v=l[f]=new Array(y),A=s[f]=new Array(y);r(h,p,v,A,a[f]=new Array(_),d,n);for(var x,S,b=0,E=0;b<y;++b)if(x=v[b]){for(b>=E&&(E=b+1);!(S=A[E])&&++E<y;);x._next=S||null}}return(s=new U(s,i))._enter=l,s._exit=a,s},enter:function(){return new U(this._enter||this._groups.map(y),this._parents)},exit:function(){return new U(this._exit||this._groups.map(y),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=n&&(i=n(i)),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){if(!(t instanceof U))throw new Error("invalid merge");for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),c=0;c<o;++c)for(var s,l=n[c],a=e[c],f=l.length,h=u[c]=new Array(f),p=0;p<f;++p)(s=l[p]||a[p])&&(h[p]=s);for(;c<r;++c)u[c]=n[c];return new U(u,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=A);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,c=e[o],s=c.length,l=i[o]=new Array(s),a=0;a<s;++a)(u=c[a])&&(l[a]=u);l.sort(n)}return new U(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,c=o.length;u<c;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},attr:function(t,n){var e=r(t);if(arguments.length<2){var i=this.node();return e.local?i.getAttributeNS(e.space,e.local):i.getAttribute(e)}return this.each((null==n?e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof n?e.local?function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}:function(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}:e.local?function(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}:function(t,n){return function(){this.setAttribute(t,n)}})(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):S(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=b(t+"");if(arguments.length<2){for(var r=E(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?function(t,n){return function(){(n.apply(this,arguments)?C:L)(this,t)}}:n?function(t){return function(){C(this,t)}}:function(t){return function(){L(this,t)}})(e,n))},text:function(t){return arguments.length?this.each(null==t?P:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?B:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(M)},lower:function(){return this.each(T)},append:function(t){var n="function"==typeof t?t:i(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var e="function"==typeof t?t:i(t),r=null==n?q:"function"==typeof n?n:u(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(D)},clone:function(t){return this.select(t?V:O)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}(t+""),u=o.length;if(!(arguments.length<2)){for(c=n?R:j,r=0;r<u;++r)this.each(c(o[r],n,e));return this}var c=this.node().__on;if(c)for(var s,l=0,a=c.length;l<a;++l)for(r=0,s=c[l];r<u;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,n){return this.each(("function"==typeof n?function(t,n){return function(){return H(this,t,n.apply(this,arguments))}}:function(t,n){return function(){return H(this,t,n)}})(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r,i=t[n],o=0,u=i.length;o<u;++o)(r=i[o])&&(yield r)}};var Y=0;function k(){return new z}function z(){this._="@"+(++Y).toString(36)}function F(t){let n;for(;n=t.sourceEvent;)t=n;return t}function J(t,n){if(t=F(t),void 0===n&&(n=t.currentTarget),n){var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(n.getScreenCTM().inverse())).x,r.y]}if(n.getBoundingClientRect){var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}}return[t.pageX,t.pageY]}z.prototype=k.prototype={constructor:z,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}},t.create=function(t){return G(i(t).call(document.documentElement))},t.creator=i,t.local=k,t.matcher=a,t.namespace=r,t.namespaces=e,t.pointer=J,t.pointers=function(t,n){return t.target&&(t=F(t),void 0===n&&(n=t.currentTarget),t=t.touches||[t]),Array.from(t,t=>J(t,n))},t.select=G,t.selectAll=function(t){return"string"==typeof t?new U([document.querySelectorAll(t)],[document.documentElement]):new U([null==t?[]:c(t)],I)},t.selection=X,t.selector=u,t.selectorAll=l,t.style=S,t.window=x,Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/node_modules/d3-selection/package.json b/node_modules/d3-selection/package.json deleted file mode 100644 index dffa7505c2ae8e433ff22dd24b7b6f8f21eac866..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "_from": "d3-selection@2", - "_id": "d3-selection@2.0.0", - "_inBundle": false, - "_integrity": "sha512-XoGGqhLUN/W14NmaqcO/bb1nqjDAw5WtSYb2X8wiuQWvSZUsUVYsOSkOybUrNvcBjaywBdYPy03eXHMXjk9nZA==", - "_location": "/d3-selection", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-selection@2", - "name": "d3-selection", - "escapedName": "d3-selection", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3", - "/d3-brush", - "/d3-drag", - "/d3-zoom" - ], - "_resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-2.0.0.tgz", - "_shasum": "94a11638ea2141b7565f883780dabc7ef6a61066", - "_spec": "d3-selection@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "https://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-selection/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Data-driven DOM manipulation: select elements and join them to data.", - "devDependencies": { - "eslint": "6", - "jsdom": "15", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-selection/", - "jsdelivr": "dist/d3-selection.min.js", - "keywords": [ - "d3", - "d3-module", - "dom", - "selection", - "data-join" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-selection.js", - "module": "src/index.js", - "name": "d3-selection", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-selection.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src" - }, - "sideEffects": false, - "unpkg": "dist/d3-selection.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-selection/src/array.js b/node_modules/d3-selection/src/array.js deleted file mode 100644 index f82c3ac65ec16489cabfa2fa46d1b28bc1a50482..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/array.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(x) { - return typeof x === "object" && "length" in x - ? x // Array, TypedArray, NodeList, array-like - : Array.from(x); // Map, Set, iterable, string, or anything else -} diff --git a/node_modules/d3-selection/src/constant.js b/node_modules/d3-selection/src/constant.js deleted file mode 100644 index b7d42e711c01cced1274e5dd70a461a3c0073b77..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/constant.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(x) { - return function() { - return x; - }; -} diff --git a/node_modules/d3-selection/src/create.js b/node_modules/d3-selection/src/create.js deleted file mode 100644 index 077a6a3d56ab019d6dceeaf40e12d8dcf66fb29e..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/create.js +++ /dev/null @@ -1,6 +0,0 @@ -import creator from "./creator.js"; -import select from "./select.js"; - -export default function(name) { - return select(creator(name).call(document.documentElement)); -} diff --git a/node_modules/d3-selection/src/creator.js b/node_modules/d3-selection/src/creator.js deleted file mode 100644 index 4f1b1621b0341f525d9ec611c99ff5cd841ed4bc..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/creator.js +++ /dev/null @@ -1,25 +0,0 @@ -import namespace from "./namespace.js"; -import {xhtml} from "./namespaces.js"; - -function creatorInherit(name) { - return function() { - var document = this.ownerDocument, - uri = this.namespaceURI; - return uri === xhtml && document.documentElement.namespaceURI === xhtml - ? document.createElement(name) - : document.createElementNS(uri, name); - }; -} - -function creatorFixed(fullname) { - return function() { - return this.ownerDocument.createElementNS(fullname.space, fullname.local); - }; -} - -export default function(name) { - var fullname = namespace(name); - return (fullname.local - ? creatorFixed - : creatorInherit)(fullname); -} diff --git a/node_modules/d3-selection/src/identity.js b/node_modules/d3-selection/src/identity.js deleted file mode 100644 index b2f94b2e21fee82e347197f65d2d2c8f0b655642..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/identity.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(x) { - return x; -} diff --git a/node_modules/d3-selection/src/index.js b/node_modules/d3-selection/src/index.js deleted file mode 100644 index dc51a3bd0286b2d80c1ddc23811a90cb5b4f5065..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/index.js +++ /dev/null @@ -1,15 +0,0 @@ -export {default as create} from "./create.js"; -export {default as creator} from "./creator.js"; -export {default as local} from "./local.js"; -export {default as matcher} from "./matcher.js"; -export {default as namespace} from "./namespace.js"; -export {default as namespaces} from "./namespaces.js"; -export {default as pointer} from "./pointer.js"; -export {default as pointers} from "./pointers.js"; -export {default as select} from "./select.js"; -export {default as selectAll} from "./selectAll.js"; -export {default as selection} from "./selection/index.js"; -export {default as selector} from "./selector.js"; -export {default as selectorAll} from "./selectorAll.js"; -export {styleValue as style} from "./selection/style.js"; -export {default as window} from "./window.js"; diff --git a/node_modules/d3-selection/src/local.js b/node_modules/d3-selection/src/local.js deleted file mode 100644 index ab4c20f900285cc3962e2f877a71e1edd4156c83..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/local.js +++ /dev/null @@ -1,27 +0,0 @@ -var nextId = 0; - -export default function local() { - return new Local; -} - -function Local() { - this._ = "@" + (++nextId).toString(36); -} - -Local.prototype = local.prototype = { - constructor: Local, - get: function(node) { - var id = this._; - while (!(id in node)) if (!(node = node.parentNode)) return; - return node[id]; - }, - set: function(node, value) { - return node[this._] = value; - }, - remove: function(node) { - return this._ in node && delete node[this._]; - }, - toString: function() { - return this._; - } -}; diff --git a/node_modules/d3-selection/src/matcher.js b/node_modules/d3-selection/src/matcher.js deleted file mode 100644 index 854b0d921f30eb51181061bb4b80f20ca2d052e2..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/matcher.js +++ /dev/null @@ -1,12 +0,0 @@ -export default function(selector) { - return function() { - return this.matches(selector); - }; -} - -export function childMatcher(selector) { - return function(node) { - return node.matches(selector); - }; -} - diff --git a/node_modules/d3-selection/src/namespace.js b/node_modules/d3-selection/src/namespace.js deleted file mode 100644 index 72db9df526b7a00593ab7d0abff2255a006450a7..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/namespace.js +++ /dev/null @@ -1,7 +0,0 @@ -import namespaces from "./namespaces.js"; - -export default function(name) { - var prefix = name += "", i = prefix.indexOf(":"); - if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1); - return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins -} diff --git a/node_modules/d3-selection/src/namespaces.js b/node_modules/d3-selection/src/namespaces.js deleted file mode 100644 index 01749bdc0281d41df8c520657d0a1f42a1590e65..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/namespaces.js +++ /dev/null @@ -1,9 +0,0 @@ -export var xhtml = "http://www.w3.org/1999/xhtml"; - -export default { - svg: "http://www.w3.org/2000/svg", - xhtml: xhtml, - xlink: "http://www.w3.org/1999/xlink", - xml: "http://www.w3.org/XML/1998/namespace", - xmlns: "http://www.w3.org/2000/xmlns/" -}; diff --git a/node_modules/d3-selection/src/pointer.js b/node_modules/d3-selection/src/pointer.js deleted file mode 100644 index 3e2298f63ca7f1ff25a26842091d71ca36b8fd3a..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/pointer.js +++ /dev/null @@ -1,20 +0,0 @@ -import sourceEvent from "./sourceEvent.js"; - -export default function(event, node) { - event = sourceEvent(event); - if (node === undefined) node = event.currentTarget; - if (node) { - var svg = node.ownerSVGElement || node; - if (svg.createSVGPoint) { - var point = svg.createSVGPoint(); - point.x = event.clientX, point.y = event.clientY; - point = point.matrixTransform(node.getScreenCTM().inverse()); - return [point.x, point.y]; - } - if (node.getBoundingClientRect) { - var rect = node.getBoundingClientRect(); - return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop]; - } - } - return [event.pageX, event.pageY]; -} diff --git a/node_modules/d3-selection/src/pointers.js b/node_modules/d3-selection/src/pointers.js deleted file mode 100644 index 43d17d1968c4d363327e0486ee8e1560786249d4..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/pointers.js +++ /dev/null @@ -1,11 +0,0 @@ -import pointer from "./pointer.js"; -import sourceEvent from "./sourceEvent.js"; - -export default function(events, node) { - if (events.target) { // i.e., instanceof Event, not TouchList or iterable - events = sourceEvent(events); - if (node === undefined) node = events.currentTarget; - events = events.touches || [events]; - } - return Array.from(events, event => pointer(event, node)); -} diff --git a/node_modules/d3-selection/src/select.js b/node_modules/d3-selection/src/select.js deleted file mode 100644 index dcea22e8199db3f5146917a4040048c01dd0c159..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/select.js +++ /dev/null @@ -1,7 +0,0 @@ -import {Selection, root} from "./selection/index.js"; - -export default function(selector) { - return typeof selector === "string" - ? new Selection([[document.querySelector(selector)]], [document.documentElement]) - : new Selection([[selector]], root); -} diff --git a/node_modules/d3-selection/src/selectAll.js b/node_modules/d3-selection/src/selectAll.js deleted file mode 100644 index 9345898ed4bbd24c5a62f3a8a0345af16be092c7..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selectAll.js +++ /dev/null @@ -1,8 +0,0 @@ -import array from "./array.js"; -import {Selection, root} from "./selection/index.js"; - -export default function(selector) { - return typeof selector === "string" - ? new Selection([document.querySelectorAll(selector)], [document.documentElement]) - : new Selection([selector == null ? [] : array(selector)], root); -} diff --git a/node_modules/d3-selection/src/selection/append.js b/node_modules/d3-selection/src/selection/append.js deleted file mode 100644 index 333363315b40eeefe9b5402a643c70518d7a1b4e..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/append.js +++ /dev/null @@ -1,8 +0,0 @@ -import creator from "../creator.js"; - -export default function(name) { - var create = typeof name === "function" ? name : creator(name); - return this.select(function() { - return this.appendChild(create.apply(this, arguments)); - }); -} diff --git a/node_modules/d3-selection/src/selection/attr.js b/node_modules/d3-selection/src/selection/attr.js deleted file mode 100644 index 5e933538557d4625cf274a02ccac997a45a2d1d0..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/attr.js +++ /dev/null @@ -1,57 +0,0 @@ -import namespace from "../namespace.js"; - -function attrRemove(name) { - return function() { - this.removeAttribute(name); - }; -} - -function attrRemoveNS(fullname) { - return function() { - this.removeAttributeNS(fullname.space, fullname.local); - }; -} - -function attrConstant(name, value) { - return function() { - this.setAttribute(name, value); - }; -} - -function attrConstantNS(fullname, value) { - return function() { - this.setAttributeNS(fullname.space, fullname.local, value); - }; -} - -function attrFunction(name, value) { - return function() { - var v = value.apply(this, arguments); - if (v == null) this.removeAttribute(name); - else this.setAttribute(name, v); - }; -} - -function attrFunctionNS(fullname, value) { - return function() { - var v = value.apply(this, arguments); - if (v == null) this.removeAttributeNS(fullname.space, fullname.local); - else this.setAttributeNS(fullname.space, fullname.local, v); - }; -} - -export default function(name, value) { - var fullname = namespace(name); - - if (arguments.length < 2) { - var node = this.node(); - return fullname.local - ? node.getAttributeNS(fullname.space, fullname.local) - : node.getAttribute(fullname); - } - - return this.each((value == null - ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === "function" - ? (fullname.local ? attrFunctionNS : attrFunction) - : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value)); -} diff --git a/node_modules/d3-selection/src/selection/call.js b/node_modules/d3-selection/src/selection/call.js deleted file mode 100644 index 2c41eeef8751375893f77c4badd6fa71a15ec979..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/call.js +++ /dev/null @@ -1,6 +0,0 @@ -export default function() { - var callback = arguments[0]; - arguments[0] = this; - callback.apply(null, arguments); - return this; -} diff --git a/node_modules/d3-selection/src/selection/classed.js b/node_modules/d3-selection/src/selection/classed.js deleted file mode 100644 index b3563731d2d6ff5832f7d6e3a7ecc2eae8c3abfd..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/classed.js +++ /dev/null @@ -1,75 +0,0 @@ -function classArray(string) { - return string.trim().split(/^|\s+/); -} - -function classList(node) { - return node.classList || new ClassList(node); -} - -function ClassList(node) { - this._node = node; - this._names = classArray(node.getAttribute("class") || ""); -} - -ClassList.prototype = { - add: function(name) { - var i = this._names.indexOf(name); - if (i < 0) { - this._names.push(name); - this._node.setAttribute("class", this._names.join(" ")); - } - }, - remove: function(name) { - var i = this._names.indexOf(name); - if (i >= 0) { - this._names.splice(i, 1); - this._node.setAttribute("class", this._names.join(" ")); - } - }, - contains: function(name) { - return this._names.indexOf(name) >= 0; - } -}; - -function classedAdd(node, names) { - var list = classList(node), i = -1, n = names.length; - while (++i < n) list.add(names[i]); -} - -function classedRemove(node, names) { - var list = classList(node), i = -1, n = names.length; - while (++i < n) list.remove(names[i]); -} - -function classedTrue(names) { - return function() { - classedAdd(this, names); - }; -} - -function classedFalse(names) { - return function() { - classedRemove(this, names); - }; -} - -function classedFunction(names, value) { - return function() { - (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names); - }; -} - -export default function(name, value) { - var names = classArray(name + ""); - - if (arguments.length < 2) { - var list = classList(this.node()), i = -1, n = names.length; - while (++i < n) if (!list.contains(names[i])) return false; - return true; - } - - return this.each((typeof value === "function" - ? classedFunction : value - ? classedTrue - : classedFalse)(names, value)); -} diff --git a/node_modules/d3-selection/src/selection/clone.js b/node_modules/d3-selection/src/selection/clone.js deleted file mode 100644 index 5e273bf1c4c9e2b1eefd47c93b046f0ba7036c6a..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/clone.js +++ /dev/null @@ -1,13 +0,0 @@ -function selection_cloneShallow() { - var clone = this.cloneNode(false), parent = this.parentNode; - return parent ? parent.insertBefore(clone, this.nextSibling) : clone; -} - -function selection_cloneDeep() { - var clone = this.cloneNode(true), parent = this.parentNode; - return parent ? parent.insertBefore(clone, this.nextSibling) : clone; -} - -export default function(deep) { - return this.select(deep ? selection_cloneDeep : selection_cloneShallow); -} diff --git a/node_modules/d3-selection/src/selection/data.js b/node_modules/d3-selection/src/selection/data.js deleted file mode 100644 index 4e0cf0aaac2824363298a8e5c382aeb3a109f53d..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/data.js +++ /dev/null @@ -1,117 +0,0 @@ -import {Selection} from "./index.js"; -import {EnterNode} from "./enter.js"; -import array from "../array.js"; -import constant from "../constant.js"; - -function bindIndex(parent, group, enter, update, exit, data) { - var i = 0, - node, - groupLength = group.length, - dataLength = data.length; - - // Put any non-null nodes that fit into update. - // Put any null nodes into enter. - // Put any remaining data into enter. - for (; i < dataLength; ++i) { - if (node = group[i]) { - node.__data__ = data[i]; - update[i] = node; - } else { - enter[i] = new EnterNode(parent, data[i]); - } - } - - // Put any non-null nodes that don’t fit into exit. - for (; i < groupLength; ++i) { - if (node = group[i]) { - exit[i] = node; - } - } -} - -function bindKey(parent, group, enter, update, exit, data, key) { - var i, - node, - nodeByKeyValue = new Map, - groupLength = group.length, - dataLength = data.length, - keyValues = new Array(groupLength), - keyValue; - - // Compute the key for each node. - // If multiple nodes have the same key, the duplicates are added to exit. - for (i = 0; i < groupLength; ++i) { - if (node = group[i]) { - keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + ""; - if (nodeByKeyValue.has(keyValue)) { - exit[i] = node; - } else { - nodeByKeyValue.set(keyValue, node); - } - } - } - - // Compute the key for each datum. - // If there a node associated with this key, join and add it to update. - // If there is not (or the key is a duplicate), add it to enter. - for (i = 0; i < dataLength; ++i) { - keyValue = key.call(parent, data[i], i, data) + ""; - if (node = nodeByKeyValue.get(keyValue)) { - update[i] = node; - node.__data__ = data[i]; - nodeByKeyValue.delete(keyValue); - } else { - enter[i] = new EnterNode(parent, data[i]); - } - } - - // Add any remaining nodes that were not bound to data to exit. - for (i = 0; i < groupLength; ++i) { - if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) { - exit[i] = node; - } - } -} - -function datum(node) { - return node.__data__; -} - -export default function(value, key) { - if (!arguments.length) return Array.from(this, datum); - - var bind = key ? bindKey : bindIndex, - parents = this._parents, - groups = this._groups; - - if (typeof value !== "function") value = constant(value); - - for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) { - var parent = parents[j], - group = groups[j], - groupLength = group.length, - data = array(value.call(parent, parent && parent.__data__, j, parents)), - dataLength = data.length, - enterGroup = enter[j] = new Array(dataLength), - updateGroup = update[j] = new Array(dataLength), - exitGroup = exit[j] = new Array(groupLength); - - bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); - - // Now connect the enter nodes to their following update node, such that - // appendChild can insert the materialized enter node before this node, - // rather than at the end of the parent node. - for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) { - if (previous = enterGroup[i0]) { - if (i0 >= i1) i1 = i0 + 1; - while (!(next = updateGroup[i1]) && ++i1 < dataLength); - previous._next = next || null; - } - } - } - - update = new Selection(update, parents); - update._enter = enter; - update._exit = exit; - return update; -} diff --git a/node_modules/d3-selection/src/selection/datum.js b/node_modules/d3-selection/src/selection/datum.js deleted file mode 100644 index 5de4e5801e988076f5e18d2fae57c8186cc8a77f..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/datum.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(value) { - return arguments.length - ? this.property("__data__", value) - : this.node().__data__; -} diff --git a/node_modules/d3-selection/src/selection/dispatch.js b/node_modules/d3-selection/src/selection/dispatch.js deleted file mode 100644 index 8f57915f91372387a337bda98d532c0d6bd7da1c..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/dispatch.js +++ /dev/null @@ -1,34 +0,0 @@ -import defaultView from "../window.js"; - -function dispatchEvent(node, type, params) { - var window = defaultView(node), - event = window.CustomEvent; - - if (typeof event === "function") { - event = new event(type, params); - } else { - event = window.document.createEvent("Event"); - if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail; - else event.initEvent(type, false, false); - } - - node.dispatchEvent(event); -} - -function dispatchConstant(type, params) { - return function() { - return dispatchEvent(this, type, params); - }; -} - -function dispatchFunction(type, params) { - return function() { - return dispatchEvent(this, type, params.apply(this, arguments)); - }; -} - -export default function(type, params) { - return this.each((typeof params === "function" - ? dispatchFunction - : dispatchConstant)(type, params)); -} diff --git a/node_modules/d3-selection/src/selection/each.js b/node_modules/d3-selection/src/selection/each.js deleted file mode 100644 index 260af8f27e43bb2db339b2def0d02b18b77b60aa..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/each.js +++ /dev/null @@ -1,10 +0,0 @@ -export default function(callback) { - - for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { - for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { - if (node = group[i]) callback.call(node, node.__data__, i, group); - } - } - - return this; -} diff --git a/node_modules/d3-selection/src/selection/empty.js b/node_modules/d3-selection/src/selection/empty.js deleted file mode 100644 index 4e2cf4285bb9887c81d029d1bd27b94db56bc2d5..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/empty.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function() { - return !this.node(); -} diff --git a/node_modules/d3-selection/src/selection/enter.js b/node_modules/d3-selection/src/selection/enter.js deleted file mode 100644 index 83a3ed4d4cf0843020c8892ce032143343a40cfa..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/enter.js +++ /dev/null @@ -1,22 +0,0 @@ -import sparse from "./sparse.js"; -import {Selection} from "./index.js"; - -export default function() { - return new Selection(this._enter || this._groups.map(sparse), this._parents); -} - -export function EnterNode(parent, datum) { - this.ownerDocument = parent.ownerDocument; - this.namespaceURI = parent.namespaceURI; - this._next = null; - this._parent = parent; - this.__data__ = datum; -} - -EnterNode.prototype = { - constructor: EnterNode, - appendChild: function(child) { return this._parent.insertBefore(child, this._next); }, - insertBefore: function(child, next) { return this._parent.insertBefore(child, next); }, - querySelector: function(selector) { return this._parent.querySelector(selector); }, - querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); } -}; diff --git a/node_modules/d3-selection/src/selection/exit.js b/node_modules/d3-selection/src/selection/exit.js deleted file mode 100644 index f5d7b45dd6f9a2606671886596bfa39e682ccb61..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/exit.js +++ /dev/null @@ -1,6 +0,0 @@ -import sparse from "./sparse.js"; -import {Selection} from "./index.js"; - -export default function() { - return new Selection(this._exit || this._groups.map(sparse), this._parents); -} diff --git a/node_modules/d3-selection/src/selection/filter.js b/node_modules/d3-selection/src/selection/filter.js deleted file mode 100644 index 74b3d6f2ef7c0adc31385e3f4839bbe6da4f4494..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/filter.js +++ /dev/null @@ -1,16 +0,0 @@ -import {Selection} from "./index.js"; -import matcher from "../matcher.js"; - -export default function(match) { - if (typeof match !== "function") match = matcher(match); - - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { - if ((node = group[i]) && match.call(node, node.__data__, i, group)) { - subgroup.push(node); - } - } - } - - return new Selection(subgroups, this._parents); -} diff --git a/node_modules/d3-selection/src/selection/html.js b/node_modules/d3-selection/src/selection/html.js deleted file mode 100644 index df274428ecf2e2d0ee5bb9a0f5bcb1197f1ac9d3..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/html.js +++ /dev/null @@ -1,25 +0,0 @@ -function htmlRemove() { - this.innerHTML = ""; -} - -function htmlConstant(value) { - return function() { - this.innerHTML = value; - }; -} - -function htmlFunction(value) { - return function() { - var v = value.apply(this, arguments); - this.innerHTML = v == null ? "" : v; - }; -} - -export default function(value) { - return arguments.length - ? this.each(value == null - ? htmlRemove : (typeof value === "function" - ? htmlFunction - : htmlConstant)(value)) - : this.node().innerHTML; -} diff --git a/node_modules/d3-selection/src/selection/index.js b/node_modules/d3-selection/src/selection/index.js deleted file mode 100644 index a593a21945b409d55fb62f7b189cae350363fd17..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/index.js +++ /dev/null @@ -1,90 +0,0 @@ -import selection_select from "./select.js"; -import selection_selectAll from "./selectAll.js"; -import selection_selectChild from "./selectChild.js"; -import selection_selectChildren from "./selectChildren.js"; -import selection_filter from "./filter.js"; -import selection_data from "./data.js"; -import selection_enter from "./enter.js"; -import selection_exit from "./exit.js"; -import selection_join from "./join.js"; -import selection_merge from "./merge.js"; -import selection_order from "./order.js"; -import selection_sort from "./sort.js"; -import selection_call from "./call.js"; -import selection_nodes from "./nodes.js"; -import selection_node from "./node.js"; -import selection_size from "./size.js"; -import selection_empty from "./empty.js"; -import selection_each from "./each.js"; -import selection_attr from "./attr.js"; -import selection_style from "./style.js"; -import selection_property from "./property.js"; -import selection_classed from "./classed.js"; -import selection_text from "./text.js"; -import selection_html from "./html.js"; -import selection_raise from "./raise.js"; -import selection_lower from "./lower.js"; -import selection_append from "./append.js"; -import selection_insert from "./insert.js"; -import selection_remove from "./remove.js"; -import selection_clone from "./clone.js"; -import selection_datum from "./datum.js"; -import selection_on from "./on.js"; -import selection_dispatch from "./dispatch.js"; -import selection_iterator from "./iterator.js"; - -export var root = [null]; - -export function Selection(groups, parents) { - this._groups = groups; - this._parents = parents; -} - -function selection() { - return new Selection([[document.documentElement]], root); -} - -function selection_selection() { - return this; -} - -Selection.prototype = selection.prototype = { - constructor: Selection, - select: selection_select, - selectAll: selection_selectAll, - selectChild: selection_selectChild, - selectChildren: selection_selectChildren, - filter: selection_filter, - data: selection_data, - enter: selection_enter, - exit: selection_exit, - join: selection_join, - merge: selection_merge, - selection: selection_selection, - order: selection_order, - sort: selection_sort, - call: selection_call, - nodes: selection_nodes, - node: selection_node, - size: selection_size, - empty: selection_empty, - each: selection_each, - attr: selection_attr, - style: selection_style, - property: selection_property, - classed: selection_classed, - text: selection_text, - html: selection_html, - raise: selection_raise, - lower: selection_lower, - append: selection_append, - insert: selection_insert, - remove: selection_remove, - clone: selection_clone, - datum: selection_datum, - on: selection_on, - dispatch: selection_dispatch, - [Symbol.iterator]: selection_iterator -}; - -export default selection; diff --git a/node_modules/d3-selection/src/selection/insert.js b/node_modules/d3-selection/src/selection/insert.js deleted file mode 100644 index 1733de54b317a81a6171de46859380fd2ac66c17..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/insert.js +++ /dev/null @@ -1,14 +0,0 @@ -import creator from "../creator.js"; -import selector from "../selector.js"; - -function constantNull() { - return null; -} - -export default function(name, before) { - var create = typeof name === "function" ? name : creator(name), - select = before == null ? constantNull : typeof before === "function" ? before : selector(before); - return this.select(function() { - return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null); - }); -} diff --git a/node_modules/d3-selection/src/selection/iterator.js b/node_modules/d3-selection/src/selection/iterator.js deleted file mode 100644 index 58728191006e7ed4506012d11744619633bb2182..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/iterator.js +++ /dev/null @@ -1,7 +0,0 @@ -export default function*() { - for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { - for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { - if (node = group[i]) yield node; - } - } -} diff --git a/node_modules/d3-selection/src/selection/join.js b/node_modules/d3-selection/src/selection/join.js deleted file mode 100644 index 625cd47409153ef0af4851cd52e9deaa34a41fb3..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/join.js +++ /dev/null @@ -1,7 +0,0 @@ -export default function(onenter, onupdate, onexit) { - var enter = this.enter(), update = this, exit = this.exit(); - enter = typeof onenter === "function" ? onenter(enter) : enter.append(onenter + ""); - if (onupdate != null) update = onupdate(update); - if (onexit == null) exit.remove(); else onexit(exit); - return enter && update ? enter.merge(update).order() : update; -} diff --git a/node_modules/d3-selection/src/selection/lower.js b/node_modules/d3-selection/src/selection/lower.js deleted file mode 100644 index d72471329029f69e4c81868b37812121a8b84ef5..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/lower.js +++ /dev/null @@ -1,7 +0,0 @@ -function lower() { - if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild); -} - -export default function() { - return this.each(lower); -} diff --git a/node_modules/d3-selection/src/selection/merge.js b/node_modules/d3-selection/src/selection/merge.js deleted file mode 100644 index eac96044e0897a6003ce249dff5fe98f2bb959d0..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/merge.js +++ /dev/null @@ -1,19 +0,0 @@ -import {Selection} from "./index.js"; - -export default function(selection) { - if (!(selection instanceof Selection)) throw new Error("invalid merge"); - - for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { - for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { - if (node = group0[i] || group1[i]) { - merge[i] = node; - } - } - } - - for (; j < m0; ++j) { - merges[j] = groups0[j]; - } - - return new Selection(merges, this._parents); -} diff --git a/node_modules/d3-selection/src/selection/node.js b/node_modules/d3-selection/src/selection/node.js deleted file mode 100644 index 0691cbc0b7c4fadc8971ecd5241f7981f0f18b0b..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/node.js +++ /dev/null @@ -1,11 +0,0 @@ -export default function() { - - for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { - for (var group = groups[j], i = 0, n = group.length; i < n; ++i) { - var node = group[i]; - if (node) return node; - } - } - - return null; -} diff --git a/node_modules/d3-selection/src/selection/nodes.js b/node_modules/d3-selection/src/selection/nodes.js deleted file mode 100644 index 7f38090dfacd19dc623288fac314936455c28a8f..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/nodes.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function() { - return Array.from(this); -} diff --git a/node_modules/d3-selection/src/selection/on.js b/node_modules/d3-selection/src/selection/on.js deleted file mode 100644 index 7906c8ca2c3683a2c4e99e638d38d2bbd2b32752..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/on.js +++ /dev/null @@ -1,67 +0,0 @@ -function contextListener(listener) { - return function(event) { - listener.call(this, event, this.__data__); - }; -} - -function parseTypenames(typenames) { - return typenames.trim().split(/^|\s+/).map(function(t) { - var name = "", i = t.indexOf("."); - if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); - return {type: t, name: name}; - }); -} - -function onRemove(typename) { - return function() { - var on = this.__on; - if (!on) return; - for (var j = 0, i = -1, m = on.length, o; j < m; ++j) { - if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) { - this.removeEventListener(o.type, o.listener, o.options); - } else { - on[++i] = o; - } - } - if (++i) on.length = i; - else delete this.__on; - }; -} - -function onAdd(typename, value, options) { - return function() { - var on = this.__on, o, listener = contextListener(value); - if (on) for (var j = 0, m = on.length; j < m; ++j) { - if ((o = on[j]).type === typename.type && o.name === typename.name) { - this.removeEventListener(o.type, o.listener, o.options); - this.addEventListener(o.type, o.listener = listener, o.options = options); - o.value = value; - return; - } - } - this.addEventListener(typename.type, listener, options); - o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options}; - if (!on) this.__on = [o]; - else on.push(o); - }; -} - -export default function(typename, value, options) { - var typenames = parseTypenames(typename + ""), i, n = typenames.length, t; - - if (arguments.length < 2) { - var on = this.node().__on; - if (on) for (var j = 0, m = on.length, o; j < m; ++j) { - for (i = 0, o = on[j]; i < n; ++i) { - if ((t = typenames[i]).type === o.type && t.name === o.name) { - return o.value; - } - } - } - return; - } - - on = value ? onAdd : onRemove; - for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options)); - return this; -} diff --git a/node_modules/d3-selection/src/selection/order.js b/node_modules/d3-selection/src/selection/order.js deleted file mode 100644 index f8c52b4b500a9d9d16b4a58b0023c5e7e57bdaa3..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/order.js +++ /dev/null @@ -1,13 +0,0 @@ -export default function() { - - for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) { - for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) { - if (node = group[i]) { - if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next); - next = node; - } - } - } - - return this; -} diff --git a/node_modules/d3-selection/src/selection/property.js b/node_modules/d3-selection/src/selection/property.js deleted file mode 100644 index 3b7efd397b5b1cea1420c5332b0f02d822ff1a38..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/property.js +++ /dev/null @@ -1,28 +0,0 @@ -function propertyRemove(name) { - return function() { - delete this[name]; - }; -} - -function propertyConstant(name, value) { - return function() { - this[name] = value; - }; -} - -function propertyFunction(name, value) { - return function() { - var v = value.apply(this, arguments); - if (v == null) delete this[name]; - else this[name] = v; - }; -} - -export default function(name, value) { - return arguments.length > 1 - ? this.each((value == null - ? propertyRemove : typeof value === "function" - ? propertyFunction - : propertyConstant)(name, value)) - : this.node()[name]; -} diff --git a/node_modules/d3-selection/src/selection/raise.js b/node_modules/d3-selection/src/selection/raise.js deleted file mode 100644 index 3e9e1c9b56e1d87919b4d27f7804ac75c9ff472c..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/raise.js +++ /dev/null @@ -1,7 +0,0 @@ -function raise() { - if (this.nextSibling) this.parentNode.appendChild(this); -} - -export default function() { - return this.each(raise); -} diff --git a/node_modules/d3-selection/src/selection/remove.js b/node_modules/d3-selection/src/selection/remove.js deleted file mode 100644 index 12a81060ae571fb184eb17f7b609406f300f7a70..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/remove.js +++ /dev/null @@ -1,8 +0,0 @@ -function remove() { - var parent = this.parentNode; - if (parent) parent.removeChild(this); -} - -export default function() { - return this.each(remove); -} diff --git a/node_modules/d3-selection/src/selection/select.js b/node_modules/d3-selection/src/selection/select.js deleted file mode 100644 index 223cc2437ec94d597babf2104583fbed41c5ceac..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/select.js +++ /dev/null @@ -1,17 +0,0 @@ -import {Selection} from "./index.js"; -import selector from "../selector.js"; - -export default function(select) { - if (typeof select !== "function") select = selector(select); - - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { - if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { - if ("__data__" in node) subnode.__data__ = node.__data__; - subgroup[i] = subnode; - } - } - } - - return new Selection(subgroups, this._parents); -} diff --git a/node_modules/d3-selection/src/selection/selectAll.js b/node_modules/d3-selection/src/selection/selectAll.js deleted file mode 100644 index 1eb90276ad05622db6a6417cb870965f5a7379c0..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/selectAll.js +++ /dev/null @@ -1,26 +0,0 @@ -import {Selection} from "./index.js"; -import array from "../array.js"; -import selectorAll from "../selectorAll.js"; - -function arrayAll(select) { - return function() { - var group = select.apply(this, arguments); - return group == null ? [] : array(group); - }; -} - -export default function(select) { - if (typeof select === "function") select = arrayAll(select); - else select = selectorAll(select); - - for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - subgroups.push(select.call(node, node.__data__, i, group)); - parents.push(node); - } - } - } - - return new Selection(subgroups, parents); -} diff --git a/node_modules/d3-selection/src/selection/selectChild.js b/node_modules/d3-selection/src/selection/selectChild.js deleted file mode 100644 index d0427947bb664588d654a7e2390db29e48c47977..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/selectChild.js +++ /dev/null @@ -1,18 +0,0 @@ -import {childMatcher} from "../matcher.js"; - -var find = Array.prototype.find; - -function childFind(match) { - return function() { - return find.call(this.children, match); - }; -} - -function childFirst() { - return this.firstElementChild; -} - -export default function(match) { - return this.select(match == null ? childFirst - : childFind(typeof match === "function" ? match : childMatcher(match))); -} diff --git a/node_modules/d3-selection/src/selection/selectChildren.js b/node_modules/d3-selection/src/selection/selectChildren.js deleted file mode 100644 index a1d0836f2ff22d939e738e7b8a185f92f0c81eb8..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/selectChildren.js +++ /dev/null @@ -1,18 +0,0 @@ -import {childMatcher} from "../matcher.js"; - -var filter = Array.prototype.filter; - -function children() { - return this.children; -} - -function childrenFilter(match) { - return function() { - return filter.call(this.children, match); - }; -} - -export default function(match) { - return this.selectAll(match == null ? children - : childrenFilter(typeof match === "function" ? match : childMatcher(match))); -} diff --git a/node_modules/d3-selection/src/selection/size.js b/node_modules/d3-selection/src/selection/size.js deleted file mode 100644 index e07eaa4fb1477e281b3efe2e6600fed8fa09046a..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/size.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function() { - let size = 0; - for (const node of this) ++size; // eslint-disable-line no-unused-vars - return size; -} diff --git a/node_modules/d3-selection/src/selection/sort.js b/node_modules/d3-selection/src/selection/sort.js deleted file mode 100644 index 336760f19080deba836ee8bb4a79564e1ae4decf..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/sort.js +++ /dev/null @@ -1,24 +0,0 @@ -import {Selection} from "./index.js"; - -export default function(compare) { - if (!compare) compare = ascending; - - function compareNode(a, b) { - return a && b ? compare(a.__data__, b.__data__) : !a - !b; - } - - for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) { - if (node = group[i]) { - sortgroup[i] = node; - } - } - sortgroup.sort(compareNode); - } - - return new Selection(sortgroups, this._parents).order(); -} - -function ascending(a, b) { - return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; -} diff --git a/node_modules/d3-selection/src/selection/sparse.js b/node_modules/d3-selection/src/selection/sparse.js deleted file mode 100644 index 7b261ad1849af756deb752346c6cca110d01c79f..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/sparse.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(update) { - return new Array(update.length); -} diff --git a/node_modules/d3-selection/src/selection/style.js b/node_modules/d3-selection/src/selection/style.js deleted file mode 100644 index 7e0f058687e9cacd2d82a31dc7f848b76a35c8b9..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/style.js +++ /dev/null @@ -1,35 +0,0 @@ -import defaultView from "../window.js"; - -function styleRemove(name) { - return function() { - this.style.removeProperty(name); - }; -} - -function styleConstant(name, value, priority) { - return function() { - this.style.setProperty(name, value, priority); - }; -} - -function styleFunction(name, value, priority) { - return function() { - var v = value.apply(this, arguments); - if (v == null) this.style.removeProperty(name); - else this.style.setProperty(name, v, priority); - }; -} - -export default function(name, value, priority) { - return arguments.length > 1 - ? this.each((value == null - ? styleRemove : typeof value === "function" - ? styleFunction - : styleConstant)(name, value, priority == null ? "" : priority)) - : styleValue(this.node(), name); -} - -export function styleValue(node, name) { - return node.style.getPropertyValue(name) - || defaultView(node).getComputedStyle(node, null).getPropertyValue(name); -} diff --git a/node_modules/d3-selection/src/selection/text.js b/node_modules/d3-selection/src/selection/text.js deleted file mode 100644 index a902980ca71016e0fdcaf2e55b43597965b1959a..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selection/text.js +++ /dev/null @@ -1,25 +0,0 @@ -function textRemove() { - this.textContent = ""; -} - -function textConstant(value) { - return function() { - this.textContent = value; - }; -} - -function textFunction(value) { - return function() { - var v = value.apply(this, arguments); - this.textContent = v == null ? "" : v; - }; -} - -export default function(value) { - return arguments.length - ? this.each(value == null - ? textRemove : (typeof value === "function" - ? textFunction - : textConstant)(value)) - : this.node().textContent; -} diff --git a/node_modules/d3-selection/src/selector.js b/node_modules/d3-selection/src/selector.js deleted file mode 100644 index 058bd73aa0fc9e072c2a1915c8be049d1cd2a455..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selector.js +++ /dev/null @@ -1,7 +0,0 @@ -function none() {} - -export default function(selector) { - return selector == null ? none : function() { - return this.querySelector(selector); - }; -} diff --git a/node_modules/d3-selection/src/selectorAll.js b/node_modules/d3-selection/src/selectorAll.js deleted file mode 100644 index ea42ffa3922f33573d144a6bc2239db85d4c38d6..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/selectorAll.js +++ /dev/null @@ -1,9 +0,0 @@ -function empty() { - return []; -} - -export default function(selector) { - return selector == null ? empty : function() { - return this.querySelectorAll(selector); - }; -} diff --git a/node_modules/d3-selection/src/sourceEvent.js b/node_modules/d3-selection/src/sourceEvent.js deleted file mode 100644 index 8ab130e2e955246a32ee30c4aed4eec817fa7328..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/sourceEvent.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(event) { - let sourceEvent; - while (sourceEvent = event.sourceEvent) event = sourceEvent; - return event; -} diff --git a/node_modules/d3-selection/src/window.js b/node_modules/d3-selection/src/window.js deleted file mode 100644 index ca1105bd195460f2c9357a8a1b65c24652f41509..0000000000000000000000000000000000000000 --- a/node_modules/d3-selection/src/window.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(node) { - return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node - || (node.document && node) // node is a Window - || node.defaultView; // node is a Document -} diff --git a/node_modules/d3-shape/LICENSE b/node_modules/d3-shape/LICENSE deleted file mode 100644 index 4f0b022ceefd39f1f270bce414220b2aa51faff5..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2015 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-shape/README.md b/node_modules/d3-shape/README.md deleted file mode 100644 index 754df39a4b139b7fc0422bc4a931b34e2fa6003c..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/README.md +++ /dev/null @@ -1,1149 +0,0 @@ -# d3-shape - -Visualizations typically consist of discrete graphical marks, such as [symbols](#symbols), [arcs](#arcs), [lines](#lines) and [areas](#areas). While the rectangles of a bar chart may be easy enough to generate directly using [SVG](http://www.w3.org/TR/SVG/paths.html#PathData) or [Canvas](http://www.w3.org/TR/2dcontext/#canvaspathmethods), other shapes are complex, such as rounded annular sectors and centripetal Catmull–Rom splines. This module provides a variety of shape generators for your convenience. - -As with other aspects of D3, these shapes are driven by data: each shape generator exposes accessors that control how the input data are mapped to a visual representation. For example, you might define a line generator for a time series by [scaling](https://github.com/d3/d3-scale) fields of your data to fit the chart: - -```js -var line = d3.line() - .x(function(d) { return x(d.date); }) - .y(function(d) { return y(d.value); }); -``` - -This line generator can then be used to compute the `d` attribute of an SVG path element: - -```js -path.datum(data).attr("d", line); -``` - -Or you can use it to render to a Canvas 2D context: - -```js -line.context(context)(data); -``` - -For more, read [Introducing d3-shape](https://medium.com/@mbostock/introducing-d3-shape-73f8367e6d12). - -## Installing - -If you use NPM, `npm install d3-shape`. Otherwise, download the [latest release](https://github.com/d3/d3-shape/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-shape.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-path.v2.min.js"></script> -<script src="https://d3js.org/d3-shape.v2.min.js"></script> -<script> - -var line = d3.line(); - -</script> -``` - - -## API Reference - -* [Arcs](#arcs) -* [Pies](#pies) -* [Lines](#lines) -* [Areas](#areas) -* [Curves](#curves) -* [Custom Curves](#custom-curves) -* [Links](#links) -* [Symbols](#symbols) -* [Custom Symbol Types](#custom-symbol-types) -* [Stacks](#stacks) - -Note: all the methods that accept arrays also accept iterables and convert them to arrays internally. - -### Arcs - -[<img alt="Pie Chart" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/pie.png" width="295" height="295">](http://bl.ocks.org/mbostock/8878e7fd82034f1d63cf)[<img alt="Donut Chart" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/donut.png" width="295" height="295">](http://bl.ocks.org/mbostock/2394b23da1994fc202e1) - -The arc generator produces a [circular](https://en.wikipedia.org/wiki/Circular_sector) or [annular](https://en.wikipedia.org/wiki/Annulus_\(mathematics\)) sector, as in a pie or donut chart. If the difference between the [start](#arc_startAngle) and [end](#arc_endAngle) angles (the *angular span*) is greater than [Ï„](https://en.wikipedia.org/wiki/Turn_\(geometry\)#Tau_proposal), the arc generator will produce a complete circle or annulus. If it is less than Ï„, arcs may have [rounded corners](#arc_cornerRadius) and [angular padding](#arc_padAngle). Arcs are always centered at ⟨0,0⟩; use a transform (see: [SVG](http://www.w3.org/TR/SVG/coords.html#TransformAttribute), [Canvas](http://www.w3.org/TR/2dcontext/#transformations)) to move the arc to a different position. - -See also the [pie generator](#pies), which computes the necessary angles to represent an array of data as a pie or donut chart; these angles can then be passed to an arc generator. - -<a name="arc" href="#arc">#</a> d3.<b>arc</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/arc.js) - -Constructs a new arc generator with the default settings. - -<a name="_arc" href="#_arc">#</a> <i>arc</i>(<i>arguments…</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/arc.js) - -Generates an arc for the given *arguments*. The *arguments* are arbitrary; they are simply propagated to the arc generator’s accessor functions along with the `this` object. For example, with the default settings, an object with radii and angles is expected: - -```js -var arc = d3.arc(); - -arc({ - innerRadius: 0, - outerRadius: 100, - startAngle: 0, - endAngle: Math.PI / 2 -}); // "M0,-100A100,100,0,0,1,100,0L0,0Z" -``` - -If the radii and angles are instead defined as constants, you can generate an arc without any arguments: - -```js -var arc = d3.arc() - .innerRadius(0) - .outerRadius(100) - .startAngle(0) - .endAngle(Math.PI / 2); - -arc(); // "M0,-100A100,100,0,0,1,100,0L0,0Z" -``` - -If the arc generator has a [context](#arc_context), then the arc is rendered to this context as a sequence of [path method](http://www.w3.org/TR/2dcontext/#canvaspathmethods) calls and this function returns void. Otherwise, a [path data](http://www.w3.org/TR/SVG/paths.html#PathData) string is returned. - -<a name="arc_centroid" href="#arc_centroid">#</a> <i>arc</i>.<b>centroid</b>(<i>arguments…</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/arc.js) - -Computes the midpoint [*x*, *y*] of the center line of the arc that would be [generated](#_arc) by the given *arguments*. The *arguments* are arbitrary; they are simply propagated to the arc generator’s accessor functions along with the `this` object. To be consistent with the generated arc, the accessors must be deterministic, *i.e.*, return the same value given the same arguments. The midpoint is defined as ([startAngle](#arc_startAngle) + [endAngle](#arc_endAngle)) / 2 and ([innerRadius](#arc_innerRadius) + [outerRadius](#arc_outerRadius)) / 2. For example: - -[<img alt="Circular Sector Centroids" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/centroid-circular-sector.png" width="250" height="250">](http://bl.ocks.org/mbostock/9b5a2fd1ce1a146f27e4)[<img alt="Annular Sector Centroids" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/centroid-annular-sector.png" width="250" height="250">](http://bl.ocks.org/mbostock/c274877f647361f3df7d) - -Note that this is **not the geometric center** of the arc, which may be outside the arc; this method is merely a convenience for positioning labels. - -<a name="arc_innerRadius" href="#arc_innerRadius">#</a> <i>arc</i>.<b>innerRadius</b>([<i>radius</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/arc.js) - -If *radius* is specified, sets the inner radius to the specified function or number and returns this arc generator. If *radius* is not specified, returns the current inner radius accessor, which defaults to: - -```js -function innerRadius(d) { - return d.innerRadius; -} -``` - -Specifying the inner radius as a function is useful for constructing a stacked polar bar chart, often in conjunction with a [sqrt scale](https://github.com/d3/d3-scale#sqrt). More commonly, a constant inner radius is used for a donut or pie chart. If the outer radius is smaller than the inner radius, the inner and outer radii are swapped. A negative value is treated as zero. - -<a name="arc_outerRadius" href="#arc_outerRadius">#</a> <i>arc</i>.<b>outerRadius</b>([<i>radius</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/arc.js) - -If *radius* is specified, sets the outer radius to the specified function or number and returns this arc generator. If *radius* is not specified, returns the current outer radius accessor, which defaults to: - -```js -function outerRadius(d) { - return d.outerRadius; -} -``` - -Specifying the outer radius as a function is useful for constructing a coxcomb or polar bar chart, often in conjunction with a [sqrt scale](https://github.com/d3/d3-scale#sqrt). More commonly, a constant outer radius is used for a pie or donut chart. If the outer radius is smaller than the inner radius, the inner and outer radii are swapped. A negative value is treated as zero. - -<a name="arc_cornerRadius" href="#arc_cornerRadius">#</a> <i>arc</i>.<b>cornerRadius</b>([<i>radius</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/arc.js) - -If *radius* is specified, sets the corner radius to the specified function or number and returns this arc generator. If *radius* is not specified, returns the current corner radius accessor, which defaults to: - -```js -function cornerRadius() { - return 0; -} -``` - -If the corner radius is greater than zero, the corners of the arc are rounded using circles of the given radius. For a circular sector, the two outer corners are rounded; for an annular sector, all four corners are rounded. The corner circles are shown in this diagram: - -[<img alt="Rounded Circular Sectors" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/rounded-circular-sector.png" width="250" height="250">](http://bl.ocks.org/mbostock/e5e3680f3079cf5c3437)[<img alt="Rounded Annular Sectors" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/rounded-annular-sector.png" width="250" height="250">](http://bl.ocks.org/mbostock/f41f50e06a6c04828b6e) - -The corner radius may not be larger than ([outerRadius](#arc_outerRadius) - [innerRadius](#arc_innerRadius)) / 2. In addition, for arcs whose angular span is less than Ï€, the corner radius may be reduced as two adjacent rounded corners intersect. This is occurs more often with the inner corners. See the [arc corners animation](http://bl.ocks.org/mbostock/b7671cb38efdfa5da3af) for illustration. - -<a name="arc_startAngle" href="#arc_startAngle">#</a> <i>arc</i>.<b>startAngle</b>([<i>angle</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/arc.js) - -If *angle* is specified, sets the start angle to the specified function or number and returns this arc generator. If *angle* is not specified, returns the current start angle accessor, which defaults to: - -```js -function startAngle(d) { - return d.startAngle; -} -``` - -The *angle* is specified in radians, with 0 at -*y* (12 o’clock) and positive angles proceeding clockwise. If |endAngle - startAngle| ≥ Ï„, a complete circle or annulus is generated rather than a sector. - -<a name="arc_endAngle" href="#arc_endAngle">#</a> <i>arc</i>.<b>endAngle</b>([<i>angle</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/arc.js) - -If *angle* is specified, sets the end angle to the specified function or number and returns this arc generator. If *angle* is not specified, returns the current end angle accessor, which defaults to: - -```js -function endAngle(d) { - return d.endAngle; -} -``` - -The *angle* is specified in radians, with 0 at -*y* (12 o’clock) and positive angles proceeding clockwise. If |endAngle - startAngle| ≥ Ï„, a complete circle or annulus is generated rather than a sector. - -<a name="arc_padAngle" href="#arc_padAngle">#</a> <i>arc</i>.<b>padAngle</b>([<i>angle</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/arc.js) - -If *angle* is specified, sets the pad angle to the specified function or number and returns this arc generator. If *angle* is not specified, returns the current pad angle accessor, which defaults to: - -```js -function padAngle() { - return d && d.padAngle; -} -``` - -The pad angle is converted to a fixed linear distance separating adjacent arcs, defined as [padRadius](#arc_padRadius) * padAngle. This distance is subtracted equally from the [start](#arc_startAngle) and [end](#arc_endAngle) of the arc. If the arc forms a complete circle or annulus, as when |endAngle - startAngle| ≥ Ï„, the pad angle is ignored. - -If the [inner radius](#arc_innerRadius) or angular span is small relative to the pad angle, it may not be possible to maintain parallel edges between adjacent arcs. In this case, the inner edge of the arc may collapse to a point, similar to a circular sector. For this reason, padding is typically only applied to annular sectors (*i.e.*, when innerRadius is positive), as shown in this diagram: - -[<img alt="Padded Circular Sectors" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/padded-circular-sector.png" width="250" height="250">](http://bl.ocks.org/mbostock/f37b07b92633781a46f7)[<img alt="Padded Annular Sectors" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/padded-annular-sector.png" width="250" height="250">](http://bl.ocks.org/mbostock/99f0a6533f7c949cf8b8) - -The recommended minimum inner radius when using padding is outerRadius \* padAngle / sin(θ), where θ is the angular span of the smallest arc before padding. For example, if the outer radius is 200 pixels and the pad angle is 0.02 radians, a reasonable θ is 0.04 radians, and a reasonable inner radius is 100 pixels. See the [arc padding animation](http://bl.ocks.org/mbostock/053fcc2295a445afab07) for illustration. - -Often, the pad angle is not set directly on the arc generator, but is instead computed by the [pie generator](#pies) so as to ensure that the area of padded arcs is proportional to their value; see [*pie*.padAngle](#pie_padAngle). See the [pie padding animation](http://bl.ocks.org/mbostock/3e961b4c97a1b543fff2) for illustration. If you apply a constant pad angle to the arc generator directly, it tends to subtract disproportionately from smaller arcs, introducing distortion. - -<a name="arc_padRadius" href="#arc_padRadius">#</a> <i>arc</i>.<b>padRadius</b>([<i>radius</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/arc.js) - -If *radius* is specified, sets the pad radius to the specified function or number and returns this arc generator. If *radius* is not specified, returns the current pad radius accessor, which defaults to null, indicating that the pad radius should be automatically computed as sqrt([innerRadius](#arc_innerRadius) * innerRadius + [outerRadius](#arc_outerRadius) * outerRadius). The pad radius determines the fixed linear distance separating adjacent arcs, defined as padRadius * [padAngle](#arc_padAngle). - -<a name="arc_context" href="#arc_context">#</a> <i>arc</i>.<b>context</b>([<i>context</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/arc.js) - -If *context* is specified, sets the context and returns this arc generator. If *context* is not specified, returns the current context, which defaults to null. If the context is not null, then the [generated arc](#_arc) is rendered to this context as a sequence of [path method](http://www.w3.org/TR/2dcontext/#canvaspathmethods) calls. Otherwise, a [path data](http://www.w3.org/TR/SVG/paths.html#PathData) string representing the generated arc is returned. - -### Pies - -The pie generator does not produce a shape directly, but instead computes the necessary angles to represent a tabular dataset as a pie or donut chart; these angles can then be passed to an [arc generator](#arcs). - -<a name="pie" href="#pie">#</a> d3.<b>pie</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/pie.js) - -Constructs a new pie generator with the default settings. - -<a name="_pie" href="#_pie">#</a> <i>pie</i>(<i>data</i>[, <i>arguments…</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/pie.js) - -Generates a pie for the given array of *data*, returning an array of objects representing each datum’s arc angles. Any additional *arguments* are arbitrary; they are simply propagated to the pie generator’s accessor functions along with the `this` object. The length of the returned array is the same as *data*, and each element *i* in the returned array corresponds to the element *i* in the input data. Each object in the returned array has the following properties: - -* `data` - the input datum; the corresponding element in the input data array. -* `value` - the numeric [value](#pie_value) of the arc. -* `index` - the zero-based [sorted index](#pie_sort) of the arc. -* `startAngle` - the [start angle](#pie_startAngle) of the arc. -* `endAngle` - the [end angle](#pie_endAngle) of the arc. -* `padAngle` - the [pad angle](#pie_padAngle) of the arc. - -This representation is designed to work with the arc generator’s default [startAngle](#arc_startAngle), [endAngle](#arc_endAngle) and [padAngle](#arc_padAngle) accessors. The angular units are arbitrary, but if you plan to use the pie generator in conjunction with an [arc generator](#arcs), you should specify angles in radians, with 0 at -*y* (12 o’clock) and positive angles proceeding clockwise. - -Given a small dataset of numbers, here is how to compute the arc angles to render this data as a pie chart: - -```js -var data = [1, 1, 2, 3, 5, 8, 13, 21]; -var arcs = d3.pie()(data); -``` - -The first pair of parens, `pie()`, [constructs](#pie) a default pie generator. The second, `pie()(data)`, [invokes](#_pie) this generator on the dataset, returning an array of objects: - -```json -[ - {"data": 1, "value": 1, "index": 6, "startAngle": 6.050474740247008, "endAngle": 6.166830023713296, "padAngle": 0}, - {"data": 1, "value": 1, "index": 7, "startAngle": 6.166830023713296, "endAngle": 6.283185307179584, "padAngle": 0}, - {"data": 2, "value": 2, "index": 5, "startAngle": 5.817764173314431, "endAngle": 6.050474740247008, "padAngle": 0}, - {"data": 3, "value": 3, "index": 4, "startAngle": 5.468698322915565, "endAngle": 5.817764173314431, "padAngle": 0}, - {"data": 5, "value": 5, "index": 3, "startAngle": 4.886921905584122, "endAngle": 5.468698322915565, "padAngle": 0}, - {"data": 8, "value": 8, "index": 2, "startAngle": 3.956079637853813, "endAngle": 4.886921905584122, "padAngle": 0}, - {"data": 13, "value": 13, "index": 1, "startAngle": 2.443460952792061, "endAngle": 3.956079637853813, "padAngle": 0}, - {"data": 21, "value": 21, "index": 0, "startAngle": 0.000000000000000, "endAngle": 2.443460952792061, "padAngle": 0} -] -``` - -Note that the returned array is in the same order as the data, even though this pie chart is [sorted](#pie_sortValues) by descending value, starting with the arc for the last datum (value 21) at 12 o’clock. - -<a name="pie_value" href="#pie_value">#</a> <i>pie</i>.<b>value</b>([<i>value</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/pie.js) - -If *value* is specified, sets the value accessor to the specified function or number and returns this pie generator. If *value* is not specified, returns the current value accessor, which defaults to: - -```js -function value(d) { - return d; -} -``` - -When a pie is [generated](#_pie), the value accessor will be invoked for each element in the input data array, being passed the element `d`, the index `i`, and the array `data` as three arguments. The default value accessor assumes that the input data are numbers, or that they are coercible to numbers using [valueOf](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf). If your data are not simply numbers, then you should specify an accessor that returns the corresponding numeric value for a given datum. For example: - -```js -var data = [ - {"number": 4, "name": "Locke"}, - {"number": 8, "name": "Reyes"}, - {"number": 15, "name": "Ford"}, - {"number": 16, "name": "Jarrah"}, - {"number": 23, "name": "Shephard"}, - {"number": 42, "name": "Kwon"} -]; - -var arcs = d3.pie() - .value(function(d) { return d.number; }) - (data); -``` - -This is similar to [mapping](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) your data to values before invoking the pie generator: - -```js -var arcs = d3.pie()(data.map(function(d) { return d.number; })); -``` - -The benefit of an accessor is that the input data remains associated with the returned objects, thereby making it easier to access other fields of the data, for example to set the color or to add text labels. - -<a name="pie_sort" href="#pie_sort">#</a> <i>pie</i>.<b>sort</b>([<i>compare</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/pie.js) - -If *compare* is specified, sets the data comparator to the specified function and returns this pie generator. If *compare* is not specified, returns the current data comparator, which defaults to null. If both the data comparator and the value comparator are null, then arcs are positioned in the original input order. Otherwise, the data is sorted according to the data comparator, and the resulting order is used. Setting the data comparator implicitly sets the [value comparator](#pie_sortValues) to null. - -The *compare* function takes two arguments *a* and *b*, each elements from the input data array. If the arc for *a* should be before the arc for *b*, then the comparator must return a number less than zero; if the arc for *a* should be after the arc for *b*, then the comparator must return a number greater than zero; returning zero means that the relative order of *a* and *b* is unspecified. For example, to sort arcs by their associated name: - -```js -pie.sort(function(a, b) { return a.name.localeCompare(b.name); }); -``` - -Sorting does not affect the order of the [generated arc array](#_pie) which is always in the same order as the input data array; it merely affects the computed angles of each arc. The first arc starts at the [start angle](#pie_startAngle) and the last arc ends at the [end angle](#pie_endAngle). - -<a name="pie_sortValues" href="#pie_sortValues">#</a> <i>pie</i>.<b>sortValues</b>([<i>compare</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/pie.js) - -If *compare* is specified, sets the value comparator to the specified function and returns this pie generator. If *compare* is not specified, returns the current value comparator, which defaults to descending value. The default value comparator is implemented as: - -```js -function compare(a, b) { - return b - a; -} -``` - -If both the data comparator and the value comparator are null, then arcs are positioned in the original input order. Otherwise, the data is sorted according to the data comparator, and the resulting order is used. Setting the value comparator implicitly sets the [data comparator](#pie_sort) to null. - -The value comparator is similar to the [data comparator](#pie_sort), except the two arguments *a* and *b* are values derived from the input data array using the [value accessor](#pie_value), not the data elements. If the arc for *a* should be before the arc for *b*, then the comparator must return a number less than zero; if the arc for *a* should be after the arc for *b*, then the comparator must return a number greater than zero; returning zero means that the relative order of *a* and *b* is unspecified. For example, to sort arcs by ascending value: - -```js -pie.sortValues(function(a, b) { return a - b; }); -``` - -Sorting does not affect the order of the [generated arc array](#_pie) which is always in the same order as the input data array; it merely affects the computed angles of each arc. The first arc starts at the [start angle](#pie_startAngle) and the last arc ends at the [end angle](#pie_endAngle). - -<a name="pie_startAngle" href="#pie_startAngle">#</a> <i>pie</i>.<b>startAngle</b>([<i>angle</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/pie.js) - -If *angle* is specified, sets the overall start angle of the pie to the specified function or number and returns this pie generator. If *angle* is not specified, returns the current start angle accessor, which defaults to: - -```js -function startAngle() { - return 0; -} -``` - -The start angle here means the *overall* start angle of the pie, *i.e.*, the start angle of the first arc. The start angle accessor is invoked once, being passed the same arguments and `this` context as the [pie generator](#_pie). The units of *angle* are arbitrary, but if you plan to use the pie generator in conjunction with an [arc generator](#arcs), you should specify an angle in radians, with 0 at -*y* (12 o’clock) and positive angles proceeding clockwise. - -<a name="pie_endAngle" href="#pie_endAngle">#</a> <i>pie</i>.<b>endAngle</b>([<i>angle</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/pie.js) - -If *angle* is specified, sets the overall end angle of the pie to the specified function or number and returns this pie generator. If *angle* is not specified, returns the current end angle accessor, which defaults to: - -```js -function endAngle() { - return 2 * Math.PI; -} -``` - -The end angle here means the *overall* end angle of the pie, *i.e.*, the end angle of the last arc. The end angle accessor is invoked once, being passed the same arguments and `this` context as the [pie generator](#_pie). The units of *angle* are arbitrary, but if you plan to use the pie generator in conjunction with an [arc generator](#arcs), you should specify an angle in radians, with 0 at -*y* (12 o’clock) and positive angles proceeding clockwise. - -The value of the end angle is constrained to [startAngle](#pie_startAngle) ± τ, such that |endAngle - startAngle| ≤ Ï„. - -<a name="pie_padAngle" href="#pie_padAngle">#</a> <i>pie</i>.<b>padAngle</b>([<i>angle</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/pie.js) - -If *angle* is specified, sets the pad angle to the specified function or number and returns this pie generator. If *angle* is not specified, returns the current pad angle accessor, which defaults to: - -```js -function padAngle() { - return 0; -} -``` - -The pad angle here means the angular separation between each adjacent arc. The total amount of padding reserved is the specified *angle* times the number of elements in the input data array, and at most |endAngle - startAngle|; the remaining space is then divided proportionally by [value](#pie_value) such that the relative area of each arc is preserved. See the [pie padding animation](http://bl.ocks.org/mbostock/3e961b4c97a1b543fff2) for illustration. The pad angle accessor is invoked once, being passed the same arguments and `this` context as the [pie generator](#_pie). The units of *angle* are arbitrary, but if you plan to use the pie generator in conjunction with an [arc generator](#arcs), you should specify an angle in radians. - -### Lines - -[<img width="295" height="154" alt="Line Chart" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/line.png">](https://observablehq.com/@d3/line-chart) - -The line generator produces a [spline](https://en.wikipedia.org/wiki/Spline_\(mathematics\)) or [polyline](https://en.wikipedia.org/wiki/Polygonal_chain), as in a line chart. Lines also appear in many other visualization types, such as the links in [hierarchical edge bundling](https://observablehq.com/@d3/hierarchical-edge-bundling). - -<a name="line" href="#line">#</a> d3.<b>line</b>([<i>x</i>][, <i>y</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/line.js), [Examples](https://observablehq.com/@d3/d3-line) - -Constructs a new line generator with the default settings. If *x* or *y* are specified, sets the corresponding accessors to the specified function or number and returns this line generator. - -<a name="_line" href="#_line">#</a> <i>line</i>(<i>data</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/line.js), [Examples](https://observablehq.com/@d3/d3-line) - -Generates a line for the given array of *data*. Depending on this line generator’s associated [curve](#line_curve), the given input *data* may need to be sorted by *x*-value before being passed to the line generator. If the line generator has a [context](#line_context), then the line is rendered to this context as a sequence of [path method](http://www.w3.org/TR/2dcontext/#canvaspathmethods) calls and this function returns void. Otherwise, a [path data](http://www.w3.org/TR/SVG/paths.html#PathData) string is returned. - -<a name="line_x" href="#line_x">#</a> <i>line</i>.<b>x</b>([<i>x</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/line.js), [Examples](https://observablehq.com/@d3/d3-line) - -If *x* is specified, sets the x accessor to the specified function or number and returns this line generator. If *x* is not specified, returns the current x accessor, which defaults to: - -```js -function x(d) { - return d[0]; -} -``` - -When a line is [generated](#_line), the x accessor will be invoked for each [defined](#line_defined) element in the input data array, being passed the element `d`, the index `i`, and the array `data` as three arguments. The default x accessor assumes that the input data are two-element arrays of numbers. If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. For example, if `x` is a [time scale](https://github.com/d3/d3-scale#time-scales) and `y` is a [linear scale](https://github.com/d3/d3-scale#linear-scales): - -```js -var data = [ - {date: new Date(2007, 3, 24), value: 93.24}, - {date: new Date(2007, 3, 25), value: 95.35}, - {date: new Date(2007, 3, 26), value: 98.84}, - {date: new Date(2007, 3, 27), value: 99.92}, - {date: new Date(2007, 3, 30), value: 99.80}, - {date: new Date(2007, 4, 1), value: 99.47}, - … -]; - -var line = d3.line() - .x(function(d) { return x(d.date); }) - .y(function(d) { return y(d.value); }); -``` - -<a name="line_y" href="#line_y">#</a> <i>line</i>.<b>y</b>([<i>y</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/line.js), [Examples](https://observablehq.com/@d3/d3-line) - -If *y* is specified, sets the y accessor to the specified function or number and returns this line generator. If *y* is not specified, returns the current y accessor, which defaults to: - -```js -function y(d) { - return d[1]; -} -``` - -When a line is [generated](#_line), the y accessor will be invoked for each [defined](#line_defined) element in the input data array, being passed the element `d`, the index `i`, and the array `data` as three arguments. The default y accessor assumes that the input data are two-element arrays of numbers. See [*line*.x](#line_x) for more information. - -<a name="line_defined" href="#line_defined">#</a> <i>line</i>.<b>defined</b>([<i>defined</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/line.js), [Examples](https://observablehq.com/@d3/d3-line) - -If *defined* is specified, sets the defined accessor to the specified function or boolean and returns this line generator. If *defined* is not specified, returns the current defined accessor, which defaults to: - -```js -function defined() { - return true; -} -``` - -The default accessor thus assumes that the input data is always defined. When a line is [generated](#_line), the defined accessor will be invoked for each element in the input data array, being passed the element `d`, the index `i`, and the array `data` as three arguments. If the given element is defined (*i.e.*, if the defined accessor returns a truthy value for this element), the [x](#line_x) and [y](#line_y) accessors will subsequently be evaluated and the point will be added to the current line segment. Otherwise, the element will be skipped, the current line segment will be ended, and a new line segment will be generated for the next defined point. As a result, the generated line may have several discrete segments. For example: - -[<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/line-defined.png" width="480" height="250" alt="Line with Missing Data">](http://bl.ocks.org/mbostock/0533f44f2cfabecc5e3a) - -Note that if a line segment consists of only a single point, it may appear invisible unless rendered with rounded or square [line caps](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap). In addition, some curves such as [curveCardinalOpen](#curveCardinalOpen) only render a visible segment if it contains multiple points. - -<a name="line_curve" href="#line_curve">#</a> <i>line</i>.<b>curve</b>([<i>curve</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/line.js), [Examples](https://observablehq.com/@d3/d3-line) - -If *curve* is specified, sets the [curve factory](#curves) and returns this line generator. If *curve* is not specified, returns the current curve factory, which defaults to [curveLinear](#curveLinear). - -<a name="line_context" href="#line_context">#</a> <i>line</i>.<b>context</b>([<i>context</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/line.js), [Examples](https://observablehq.com/@d3/d3-line) - -If *context* is specified, sets the context and returns this line generator. If *context* is not specified, returns the current context, which defaults to null. If the context is not null, then the [generated line](#_line) is rendered to this context as a sequence of [path method](http://www.w3.org/TR/2dcontext/#canvaspathmethods) calls. Otherwise, a [path data](http://www.w3.org/TR/SVG/paths.html#PathData) string representing the generated line is returned. - -<a name="lineRadial" href="#lineRadial">#</a> d3.<b>lineRadial</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/lineRadial.js), [Examples](https://observablehq.com/@d3/d3-lineradial) - -<img alt="Radial Line" width="250" height="250" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/line-radial.png"> - -Constructs a new radial line generator with the default settings. A radial line generator is equivalent to the standard Cartesian [line generator](#line), except the [x](#line_x) and [y](#line_y) accessors are replaced with [angle](#lineRadial_angle) and [radius](#lineRadial_radius) accessors. Radial lines are always positioned relative to ⟨0,0⟩; use a transform (see: [SVG](http://www.w3.org/TR/SVG/coords.html#TransformAttribute), [Canvas](http://www.w3.org/TR/2dcontext/#transformations)) to change the origin. - -<a name="_lineRadial" href="#_lineRadial">#</a> <i>lineRadial</i>(<i>data</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/lineRadial.js#L4), [Examples](https://observablehq.com/@d3/d3-lineradial) - -Equivalent to [*line*](#_line). - -<a name="lineRadial_angle" href="#lineRadial_angle">#</a> <i>lineRadial</i>.<b>angle</b>([<i>angle</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/lineRadial.js#L7), [Examples](https://observablehq.com/@d3/d3-lineradial) - -Equivalent to [*line*.x](#line_x), except the accessor returns the angle in radians, with 0 at -*y* (12 o’clock). - -<a name="lineRadial_radius" href="#lineRadial_radius">#</a> <i>lineRadial</i>.<b>radius</b>([<i>radius</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/lineRadial.js#L8), [Examples](https://observablehq.com/@d3/d3-lineradial) - -Equivalent to [*line*.y](#line_y), except the accessor returns the radius: the distance from the origin ⟨0,0⟩. - -<a name="lineRadial_defined" href="#lineRadial_defined">#</a> <i>lineRadial</i>.<b>defined</b>([<i>defined</i>]) - -Equivalent to [*line*.defined](#line_defined). - -<a name="lineRadial_curve" href="#lineRadial_curve">#</a> <i>lineRadial</i>.<b>curve</b>([<i>curve</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/lineRadial.js), [Examples](https://observablehq.com/@d3/d3-lineradial) - -Equivalent to [*line*.curve](#line_curve). Note that [curveMonotoneX](#curveMonotoneX) or [curveMonotoneY](#curveMonotoneY) are not recommended for radial lines because they assume that the data is monotonic in *x* or *y*, which is typically untrue of radial lines. - -<a name="lineRadial_context" href="#lineRadial_context">#</a> <i>lineRadial</i>.<b>context</b>([<i>context</i>]) - -Equivalent to [*line*.context](#line_context). - -### Areas - -[<img alt="Area Chart" width="295" height="154" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/area.png">](https://observablehq.com/@d3/area-chart)[<img alt="Stacked Area Chart" width="295" height="154" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/area-stacked.png">](https://observablehq.com/@d3/stacked-area-chart)[<img alt="Difference Chart" width="295" height="154" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/area-difference.png">](https://observablehq.com/@d3/difference-chart) - -The area generator produces an area, as in an area chart. An area is defined by two bounding [lines](#lines), either splines or polylines. Typically, the two lines share the same [*x*-values](#area_x) ([x0](#area_x0) = [x1](#area_x1)), differing only in *y*-value ([y0](#area_y0) and [y1](#area_y1)); most commonly, y0 is defined as a constant representing [zero](http://www.vox.com/2015/11/19/9758062/y-axis-zero-chart). The first line (the <i>topline</i>) is defined by x1 and y1 and is rendered first; the second line (the <i>baseline</i>) is defined by x0 and y0 and is rendered second, with the points in reverse order. With a [curveLinear](#curveLinear) [curve](#area_curve), this produces a clockwise polygon. - -<a name="area" href="#area">#</a> d3.<b>area</b>([<i>x</i>][, <i>y0</i>][, <i>y1</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/area.js) - -Constructs a new area generator with the default settings. If *x*, *y0* or *y1* are specified, sets the corresponding accessors to the specified function or number and returns this area generator. - -<a name="_area" href="#_area">#</a> <i>area</i>(<i>data</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/area.js) - -Generates an area for the given array of *data*. Depending on this area generator’s associated [curve](#area_curve), the given input *data* may need to be sorted by *x*-value before being passed to the area generator. If the area generator has a [context](#line_context), then the area is rendered to this context as a sequence of [path method](http://www.w3.org/TR/2dcontext/#canvaspathmethods) calls and this function returns void. Otherwise, a [path data](http://www.w3.org/TR/SVG/paths.html#PathData) string is returned. - -<a name="area_x" href="#area_x">#</a> <i>area</i>.<b>x</b>([<i>x</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/area.js) - -If *x* is specified, sets [x0](#area_x0) to *x* and [x1](#area_x1) to null and returns this area generator. If *x* is not specified, returns the current x0 accessor. - -<a name="area_x0" href="#area_x0">#</a> <i>area</i>.<b>x0</b>([<i>x</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/area.js) - -If *x* is specified, sets the x0 accessor to the specified function or number and returns this area generator. If *x* is not specified, returns the current x0 accessor, which defaults to: - -```js -function x(d) { - return d[0]; -} -``` - -When an area is [generated](#_area), the x0 accessor will be invoked for each [defined](#area_defined) element in the input data array, being passed the element `d`, the index `i`, and the array `data` as three arguments. The default x0 accessor assumes that the input data are two-element arrays of numbers. If your data are in a different format, or if you wish to transform the data before rendering, then you should specify a custom accessor. For example, if `x` is a [time scale](https://github.com/d3/d3-scale#time-scales) and `y` is a [linear scale](https://github.com/d3/d3-scale#linear-scales): - -```js -var data = [ - {date: new Date(2007, 3, 24), value: 93.24}, - {date: new Date(2007, 3, 25), value: 95.35}, - {date: new Date(2007, 3, 26), value: 98.84}, - {date: new Date(2007, 3, 27), value: 99.92}, - {date: new Date(2007, 3, 30), value: 99.80}, - {date: new Date(2007, 4, 1), value: 99.47}, - … -]; - -var area = d3.area() - .x(d => x(d.date)) - .y1(d => y(d.value)) - .y0(y(0)); -``` - -<a name="area_x1" href="#area_x1">#</a> <i>area</i>.<b>x1</b>([<i>x</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/area.js) - -If *x* is specified, sets the x1 accessor to the specified function or number and returns this area generator. If *x* is not specified, returns the current x1 accessor, which defaults to null, indicating that the previously-computed [x0](#area_x0) value should be reused for the x1 value. - -When an area is [generated](#_area), the x1 accessor will be invoked for each [defined](#area_defined) element in the input data array, being passed the element `d`, the index `i`, and the array `data` as three arguments. See [*area*.x0](#area_x0) for more information. - -<a name="area_y" href="#area_y">#</a> <i>area</i>.<b>y</b>([<i>y</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/area.js) - -If *y* is specified, sets [y0](#area_y0) to *y* and [y1](#area_y1) to null and returns this area generator. If *y* is not specified, returns the current y0 accessor. - -<a name="area_y0" href="#area_y0">#</a> <i>area</i>.<b>y0</b>([<i>y</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/area.js) - -If *y* is specified, sets the y0 accessor to the specified function or number and returns this area generator. If *y* is not specified, returns the current y0 accessor, which defaults to: - -```js -function y() { - return 0; -} -``` - -When an area is [generated](#_area), the y0 accessor will be invoked for each [defined](#area_defined) element in the input data array, being passed the element `d`, the index `i`, and the array `data` as three arguments. See [*area*.x0](#area_x0) for more information. - -<a name="area_y1" href="#area_y1">#</a> <i>area</i>.<b>y1</b>([<i>y</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/area.js) - -If *y* is specified, sets the y1 accessor to the specified function or number and returns this area generator. If *y* is not specified, returns the current y1 accessor, which defaults to: - -```js -function y(d) { - return d[1]; -} -``` - -A null accessor is also allowed, indicating that the previously-computed [y0](#area_y0) value should be reused for the y1 value. When an area is [generated](#_area), the y1 accessor will be invoked for each [defined](#area_defined) element in the input data array, being passed the element `d`, the index `i`, and the array `data` as three arguments. See [*area*.x0](#area_x0) for more information. - -<a name="area_defined" href="#area_defined">#</a> <i>area</i>.<b>defined</b>([<i>defined</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/area.js) - -If *defined* is specified, sets the defined accessor to the specified function or boolean and returns this area generator. If *defined* is not specified, returns the current defined accessor, which defaults to: - -```js -function defined() { - return true; -} -``` - -The default accessor thus assumes that the input data is always defined. When an area is [generated](#_area), the defined accessor will be invoked for each element in the input data array, being passed the element `d`, the index `i`, and the array `data` as three arguments. If the given element is defined (*i.e.*, if the defined accessor returns a truthy value for this element), the [x0](#area_x0), [x1](#area_x1), [y0](#area_y0) and [y1](#area_y1) accessors will subsequently be evaluated and the point will be added to the current area segment. Otherwise, the element will be skipped, the current area segment will be ended, and a new area segment will be generated for the next defined point. As a result, the generated area may have several discrete segments. For example: - -[<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/area-defined.png" width="480" height="250" alt="Area with Missing Data">](http://bl.ocks.org/mbostock/3035090) - -Note that if an area segment consists of only a single point, it may appear invisible unless rendered with rounded or square [line caps](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap). In addition, some curves such as [curveCardinalOpen](#curveCardinalOpen) only render a visible segment if it contains multiple points. - -<a name="area_curve" href="#area_curve">#</a> <i>area</i>.<b>curve</b>([<i>curve</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/area.js) - -If *curve* is specified, sets the [curve factory](#curves) and returns this area generator. If *curve* is not specified, returns the current curve factory, which defaults to [curveLinear](#curveLinear). - -<a name="area_context" href="#area_context">#</a> <i>area</i>.<b>context</b>([<i>context</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/area.js) - -If *context* is specified, sets the context and returns this area generator. If *context* is not specified, returns the current context, which defaults to null. If the context is not null, then the [generated area](#_area) is rendered to this context as a sequence of [path method](http://www.w3.org/TR/2dcontext/#canvaspathmethods) calls. Otherwise, a [path data](http://www.w3.org/TR/SVG/paths.html#PathData) string representing the generated area is returned. - -<a name="area_lineX0" href="#area_lineX0">#</a> <i>area</i>.<b>lineX0</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/area.js) -<br><a name="area_lineY0" href="#area_lineY0">#</a> <i>area</i>.<b>lineY0</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/area.js) - -Returns a new [line generator](#lines) that has this area generator’s current [defined accessor](#area_defined), [curve](#area_curve) and [context](#area_context). The line’s [*x*-accessor](#line_x) is this area’s [*x0*-accessor](#area_x0), and the line’s [*y*-accessor](#line_y) is this area’s [*y0*-accessor](#area_y0). - -<a name="area_lineX1" href="#area_lineX1">#</a> <i>area</i>.<b>lineX1</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/area.js) - -Returns a new [line generator](#lines) that has this area generator’s current [defined accessor](#area_defined), [curve](#area_curve) and [context](#area_context). The line’s [*x*-accessor](#line_x) is this area’s [*x1*-accessor](#area_x1), and the line’s [*y*-accessor](#line_y) is this area’s [*y0*-accessor](#area_y0). - -<a name="area_lineY1" href="#area_lineY1">#</a> <i>area</i>.<b>lineY1</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/area.js) - -Returns a new [line generator](#lines) that has this area generator’s current [defined accessor](#area_defined), [curve](#area_curve) and [context](#area_context). The line’s [*x*-accessor](#line_x) is this area’s [*x0*-accessor](#area_x0), and the line’s [*y*-accessor](#line_y) is this area’s [*y1*-accessor](#area_y1). - -<a name="areaRadial" href="#areaRadial">#</a> d3.<b>areaRadial</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/areaRadial.js) - -<img alt="Radial Area" width="250" height="250" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/area-radial.png"> - -Constructs a new radial area generator with the default settings. A radial area generator is equivalent to the standard Cartesian [area generator](#area), except the [x](#area_x) and [y](#area_y) accessors are replaced with [angle](#areaRadial_angle) and [radius](#areaRadial_radius) accessors. Radial areas are always positioned relative to ⟨0,0⟩; use a transform (see: [SVG](http://www.w3.org/TR/SVG/coords.html#TransformAttribute), [Canvas](http://www.w3.org/TR/2dcontext/#transformations)) to change the origin. - -<a name="_areaRadial" href="#_areaRadial">#</a> <i>areaRadial</i>(<i>data</i>) - -Equivalent to [*area*](#_area). - -<a name="areaRadial_angle" href="#areaRadial_angle">#</a> <i>areaRadial</i>.<b>angle</b>([<i>angle</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/areaRadial.js) - -Equivalent to [*area*.x](#area_x), except the accessor returns the angle in radians, with 0 at -*y* (12 o’clock). - -<a name="areaRadial_startAngle" href="#areaRadial_startAngle">#</a> <i>areaRadial</i>.<b>startAngle</b>([<i>angle</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/areaRadial.js) - -Equivalent to [*area*.x0](#area_x0), except the accessor returns the angle in radians, with 0 at -*y* (12 o’clock). Note: typically [angle](#areaRadial_angle) is used instead of setting separate start and end angles. - -<a name="areaRadial_endAngle" href="#areaRadial_endAngle">#</a> <i>areaRadial</i>.<b>endAngle</b>([<i>angle</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/areaRadial.js) - -Equivalent to [*area*.x1](#area_x1), except the accessor returns the angle in radians, with 0 at -*y* (12 o’clock). Note: typically [angle](#areaRadial_angle) is used instead of setting separate start and end angles. - -<a name="areaRadial_radius" href="#areaRadial_radius">#</a> <i>areaRadial</i>.<b>radius</b>([<i>radius</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/areaRadial.js) - -Equivalent to [*area*.y](#area_y), except the accessor returns the radius: the distance from the origin ⟨0,0⟩. - -<a name="areaRadial_innerRadius" href="#areaRadial_innerRadius">#</a> <i>areaRadial</i>.<b>innerRadius</b>([<i>radius</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/areaRadial.js) - -Equivalent to [*area*.y0](#area_y0), except the accessor returns the radius: the distance from the origin ⟨0,0⟩. - -<a name="areaRadial_outerRadius" href="#areaRadial_outerRadius">#</a> <i>areaRadial</i>.<b>outerRadius</b>([<i>radius</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/areaRadial.js) - -Equivalent to [*area*.y1](#area_y1), except the accessor returns the radius: the distance from the origin ⟨0,0⟩. - -<a name="areaRadial_defined" href="#areaRadial_defined">#</a> <i>areaRadial</i>.<b>defined</b>([<i>defined</i>]) - -Equivalent to [*area*.defined](#area_defined). - -<a name="areaRadial_curve" href="#areaRadial_curve">#</a> <i>areaRadial</i>.<b>curve</b>([<i>curve</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/areaRadial.js) - -Equivalent to [*area*.curve](#area_curve). Note that [curveMonotoneX](#curveMonotoneX) or [curveMonotoneY](#curveMonotoneY) are not recommended for radial areas because they assume that the data is monotonic in *x* or *y*, which is typically untrue of radial areas. - -<a name="areaRadial_context" href="#areaRadial_context">#</a> <i>areaRadial</i>.<b>context</b>([<i>context</i>]) - -Equivalent to [*line*.context](#line_context). - -<a name="areaRadial_lineStartAngle" href="#areaRadial_lineStartAngle">#</a> <i>areaRadial</i>.<b>lineStartAngle</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/areaRadial.js) -<br><a name="areaRadial_lineInnerRadius" href="#areaRadial_lineInnerRadius">#</a> <i>areaRadial</i>.<b>lineInnerRadius</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/areaRadial.js) - -Returns a new [radial line generator](#lineRadial) that has this radial area generator’s current [defined accessor](#areaRadial_defined), [curve](#areaRadial_curve) and [context](#areaRadial_context). The line’s [angle accessor](#lineRadial_angle) is this area’s [start angle accessor](#areaRadial_startAngle), and the line’s [radius accessor](#lineRadial_radius) is this area’s [inner radius accessor](#areaRadial_innerRadius). - -<a name="areaRadial_lineEndAngle" href="#areaRadial_lineEndAngle">#</a> <i>areaRadial</i>.<b>lineEndAngle</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/areaRadial.js) - -Returns a new [radial line generator](#lineRadial) that has this radial area generator’s current [defined accessor](#areaRadial_defined), [curve](#areaRadial_curve) and [context](#areaRadial_context). The line’s [angle accessor](#lineRadial_angle) is this area’s [end angle accessor](#areaRadial_endAngle), and the line’s [radius accessor](#lineRadial_radius) is this area’s [inner radius accessor](#areaRadial_innerRadius). - -<a name="areaRadial_lineOuterRadius" href="#areaRadial_lineOuterRadius">#</a> <i>areaRadial</i>.<b>lineOuterRadius</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/areaRadial.js) - -Returns a new [radial line generator](#lineRadial) that has this radial area generator’s current [defined accessor](#areaRadial_defined), [curve](#areaRadial_curve) and [context](#areaRadial_context). The line’s [angle accessor](#lineRadial_angle) is this area’s [start angle accessor](#areaRadial_startAngle), and the line’s [radius accessor](#lineRadial_radius) is this area’s [outer radius accessor](#areaRadial_outerRadius). - -### Curves - -While [lines](#lines) are defined as a sequence of two-dimensional [*x*, *y*] points, and [areas](#areas) are similarly defined by a topline and a baseline, there remains the task of transforming this discrete representation into a continuous shape: *i.e.*, how to interpolate between the points. A variety of curves are provided for this purpose. - -Curves are typically not constructed or used directly, instead being passed to [*line*.curve](#line_curve) and [*area*.curve](#area_curve). For example: - -```js -var line = d3.line(d => d.date, d => d.value) - .curve(d3.curveCatmullRom.alpha(0.5)); -``` - -<a name="curveBasis" href="#curveBasis">#</a> d3.<b>curveBasis</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/basis.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/basis.png" width="888" height="240" alt="basis"> - -Produces a cubic [basis spline](https://en.wikipedia.org/wiki/B-spline) using the specified control points. The first and last points are triplicated such that the spline starts at the first point and ends at the last point, and is tangent to the line between the first and second points, and to the line between the penultimate and last points. - -<a name="curveBasisClosed" href="#curveBasisClosed">#</a> d3.<b>curveBasisClosed</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/basisClosed.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/basisClosed.png" width="888" height="240" alt="basisClosed"> - -Produces a closed cubic [basis spline](https://en.wikipedia.org/wiki/B-spline) using the specified control points. When a line segment ends, the first three control points are repeated, producing a closed loop with C2 continuity. - -<a name="curveBasisOpen" href="#curveBasisOpen">#</a> d3.<b>curveBasisOpen</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/basisOpen.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/basisOpen.png" width="888" height="240" alt="basisOpen"> - -Produces a cubic [basis spline](https://en.wikipedia.org/wiki/B-spline) using the specified control points. Unlike [basis](#basis), the first and last points are not repeated, and thus the curve typically does not intersect these points. - -<a name="curveBundle" href="#curveBundle">#</a> d3.<b>curveBundle</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/bundle.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/bundle.png" width="888" height="240" alt="bundle"> - -Produces a straightened cubic [basis spline](https://en.wikipedia.org/wiki/B-spline) using the specified control points, with the spline straightened according to the curve’s [*beta*](#curveBundle_beta), which defaults to 0.85. This curve is typically used in [hierarchical edge bundling](https://observablehq.com/@d3/hierarchical-edge-bundling) to disambiguate connections, as proposed by [Danny Holten](https://www.win.tue.nl/vis1/home/dholten/) in [Hierarchical Edge Bundles: Visualization of Adjacency Relations in Hierarchical Data](https://www.win.tue.nl/vis1/home/dholten/papers/bundles_infovis.pdf). This curve does not implement [*curve*.areaStart](#curve_areaStart) and [*curve*.areaEnd](#curve_areaEnd); it is intended to work with [d3.line](#lines), not [d3.area](#areas). - -<a name="curveBundle_beta" href="#curveBundle_beta">#</a> <i>bundle</i>.<b>beta</b>(<i>beta</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/bundle.js) - -Returns a bundle curve with the specified *beta* in the range [0, 1], representing the bundle strength. If *beta* equals zero, a straight line between the first and last point is produced; if *beta* equals one, a standard [basis](#basis) spline is produced. For example: - -```js -var line = d3.line().curve(d3.curveBundle.beta(0.5)); -``` - -<a name="curveCardinal" href="#curveCardinal">#</a> d3.<b>curveCardinal</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/cardinal.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/cardinal.png" width="888" height="240" alt="cardinal"> - -Produces a cubic [cardinal spline](https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline) using the specified control points, with one-sided differences used for the first and last piece. The default [tension](#curveCardinal_tension) is 0. - -<a name="curveCardinalClosed" href="#curveCardinalClosed">#</a> d3.<b>curveCardinalClosed</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/cardinalClosed.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/cardinalClosed.png" width="888" height="240" alt="cardinalClosed"> - -Produces a closed cubic [cardinal spline](https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline) using the specified control points. When a line segment ends, the first three control points are repeated, producing a closed loop. The default [tension](#curveCardinal_tension) is 0. - -<a name="curveCardinalOpen" href="#curveCardinalOpen">#</a> d3.<b>curveCardinalOpen</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/cardinalOpen.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/cardinalOpen.png" width="888" height="240" alt="cardinalOpen"> - -Produces a cubic [cardinal spline](https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline) using the specified control points. Unlike [curveCardinal](#curveCardinal), one-sided differences are not used for the first and last piece, and thus the curve starts at the second point and ends at the penultimate point. The default [tension](#curveCardinal_tension) is 0. - -<a name="curveCardinal_tension" href="#curveCardinal_tension">#</a> <i>cardinal</i>.<b>tension</b>(<i>tension</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/cardinalOpen.js) - -Returns a cardinal curve with the specified *tension* in the range [0, 1]. The *tension* determines the length of the tangents: a *tension* of one yields all zero tangents, equivalent to [curveLinear](#curveLinear); a *tension* of zero produces a uniform [Catmull–Rom](#curveCatmullRom) spline. For example: - -```js -var line = d3.line().curve(d3.curveCardinal.tension(0.5)); -``` - -<a name="curveCatmullRom" href="#curveCatmullRom">#</a> d3.<b>curveCatmullRom</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/catmullRom.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/catmullRom.png" width="888" height="240" alt="catmullRom"> - -Produces a cubic Catmull–Rom spline using the specified control points and the parameter [*alpha*](#curveCatmullRom_alpha), which defaults to 0.5, as proposed by Yuksel et al. in [On the Parameterization of Catmull–Rom Curves](http://www.cemyuksel.com/research/catmullrom_param/), with one-sided differences used for the first and last piece. - -<a name="curveCatmullRomClosed" href="#curveCatmullRomClosed">#</a> d3.<b>curveCatmullRomClosed</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/catmullRomClosed.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/catmullRomClosed.png" width="888" height="330" alt="catmullRomClosed"> - -Produces a closed cubic Catmull–Rom spline using the specified control points and the parameter [*alpha*](#curveCatmullRom_alpha), which defaults to 0.5, as proposed by Yuksel et al. When a line segment ends, the first three control points are repeated, producing a closed loop. - -<a name="curveCatmullRomOpen" href="#curveCatmullRomOpen">#</a> d3.<b>curveCatmullRomOpen</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/catmullRomOpen.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/catmullRomOpen.png" width="888" height="240" alt="catmullRomOpen"> - -Produces a cubic Catmull–Rom spline using the specified control points and the parameter [*alpha*](#curveCatmullRom_alpha), which defaults to 0.5, as proposed by Yuksel et al. Unlike [curveCatmullRom](#curveCatmullRom), one-sided differences are not used for the first and last piece, and thus the curve starts at the second point and ends at the penultimate point. - -<a name="curveCatmullRom_alpha" href="#curveCatmullRom_alpha">#</a> <i>catmullRom</i>.<b>alpha</b>(<i>alpha</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/catmullRom.js) - -Returns a cubic Catmull–Rom curve with the specified *alpha* in the range [0, 1]. If *alpha* is zero, produces a uniform spline, equivalent to [curveCardinal](#curveCardinal) with a tension of zero; if *alpha* is one, produces a chordal spline; if *alpha* is 0.5, produces a [centripetal spline](https://en.wikipedia.org/wiki/Centripetal_Catmull–Rom_spline). Centripetal splines are recommended to avoid self-intersections and overshoot. For example: - -```js -var line = d3.line().curve(d3.curveCatmullRom.alpha(0.5)); -``` - -<a name="curveLinear" href="#curveLinear">#</a> d3.<b>curveLinear</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/linear.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/linear.png" width="888" height="240" alt="linear"> - -Produces a polyline through the specified points. - -<a name="curveLinearClosed" href="#curveLinearClosed">#</a> d3.<b>curveLinearClosed</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/linearClosed.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/linearClosed.png" width="888" height="240" alt="linearClosed"> - -Produces a closed polyline through the specified points by repeating the first point when the line segment ends. - -<a name="curveMonotoneX" href="#curveMonotoneX">#</a> d3.<b>curveMonotoneX</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/monotone.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/monotoneX.png" width="888" height="240" alt="monotoneX"> - -Produces a cubic spline that [preserves monotonicity](https://en.wikipedia.org/wiki/Monotone_cubic_interpolation) in *y*, assuming monotonicity in *x*, as proposed by Steffen in [A simple method for monotonic interpolation in one dimension](http://adsabs.harvard.edu/full/1990A%26A...239..443S): “a smooth curve with continuous first-order derivatives that passes through any given set of data points without spurious oscillations. Local extrema can occur only at grid points where they are given by the data, but not in between two adjacent grid points.†- -<a name="curveMonotoneY" href="#curveMonotoneY">#</a> d3.<b>curveMonotoneY</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/monotone.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/monotoneY.png" width="888" height="240" alt="monotoneY"> - -Produces a cubic spline that [preserves monotonicity](https://en.wikipedia.org/wiki/Monotone_cubic_interpolation) in *x*, assuming monotonicity in *y*, as proposed by Steffen in [A simple method for monotonic interpolation in one dimension](http://adsabs.harvard.edu/full/1990A%26A...239..443S): “a smooth curve with continuous first-order derivatives that passes through any given set of data points without spurious oscillations. Local extrema can occur only at grid points where they are given by the data, but not in between two adjacent grid points.†- -<a name="curveNatural" href="#curveNatural">#</a> d3.<b>curveNatural</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/natural.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/natural.png" width="888" height="240" alt="natural"> - -Produces a [natural](https://en.wikipedia.org/wiki/Spline_interpolation) [cubic spline](http://mathworld.wolfram.com/CubicSpline.html) with the second derivative of the spline set to zero at the endpoints. - -<a name="curveStep" href="#curveStep">#</a> d3.<b>curveStep</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/step.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/step.png" width="888" height="240" alt="step"> - -Produces a piecewise constant function (a [step function](https://en.wikipedia.org/wiki/Step_function)) consisting of alternating horizontal and vertical lines. The *y*-value changes at the midpoint of each pair of adjacent *x*-values. - -<a name="curveStepAfter" href="#curveStepAfter">#</a> d3.<b>curveStepAfter</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/step.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/stepAfter.png" width="888" height="240" alt="stepAfter"> - -Produces a piecewise constant function (a [step function](https://en.wikipedia.org/wiki/Step_function)) consisting of alternating horizontal and vertical lines. The *y*-value changes after the *x*-value. - -<a name="curveStepBefore" href="#curveStepBefore">#</a> d3.<b>curveStepBefore</b>(<i>context</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/step.js) - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/stepBefore.png" width="888" height="240" alt="stepBefore"> - -Produces a piecewise constant function (a [step function](https://en.wikipedia.org/wiki/Step_function)) consisting of alternating horizontal and vertical lines. The *y*-value changes before the *x*-value. - -### Custom Curves - -Curves are typically not used directly, instead being passed to [*line*.curve](#line_curve) and [*area*.curve](#area_curve). However, you can define your own curve implementation should none of the built-in curves satisfy your needs using the following interface. You can also use this low-level interface with a built-in curve type as an alternative to the line and area generators. - -<a name="curve_areaStart" href="#curve_areaStart">#</a> <i>curve</i>.<b>areaStart</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/step.js#L7) - -Indicates the start of a new area segment. Each area segment consists of exactly two [line segments](#curve_lineStart): the topline, followed by the baseline, with the baseline points in reverse order. - -<a name="curve_areaEnd" href="#curve_areaEnd">#</a> <i>curve</i>.<b>areaEnd</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/step.js) - -Indicates the end of the current area segment. - -<a name="curve_lineStart" href="#curve_lineStart">#</a> <i>curve</i>.<b>lineStart</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/step.js) - -Indicates the start of a new line segment. Zero or more [points](#curve_point) will follow. - -<a name="curve_lineEnd" href="#curve_lineEnd">#</a> <i>curve</i>.<b>lineEnd</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/step.js) - -Indicates the end of the current line segment. - -<a name="curve_point" href="#curve_point">#</a> <i>curve</i>.<b>point</b>(<i>x</i>, <i>y</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/curve/step.js) - -Indicates a new point in the current line segment with the given *x*- and *y*-values. - -### Links - -[<img alt="Tidy Tree" src="https://raw.githubusercontent.com/d3/d3-hierarchy/master/img/tree.png">](https://observablehq.com/@d3/tidy-tree) - -The **link** shape generates a smooth cubic Bézier curve from a source point to a target point. The tangents of the curve at the start and end are either [vertical](#linkVertical), [horizontal](#linkHorizontal) or [radial](#linkRadial). - -<a name="linkVertical" href="#linkVertical">#</a> d3.<b>linkVertical</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/link/index.js) - -Returns a new [link generator](#_link) with vertical tangents. For example, to visualize [links](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_links) in a [tree diagram](https://github.com/d3/d3-hierarchy/blob/master/README.md#tree) rooted on the top edge of the display, you might say: - -```js -var link = d3.linkVertical() - .x(function(d) { return d.x; }) - .y(function(d) { return d.y; }); -``` - -<a name="linkHorizontal" href="#linkHorizontal">#</a> d3.<b>linkHorizontal</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/link/index.js) - -Returns a new [link generator](#_link) with horizontal tangents. For example, to visualize [links](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_links) in a [tree diagram](https://github.com/d3/d3-hierarchy/blob/master/README.md#tree) rooted on the left edge of the display, you might say: - -```js -var link = d3.linkHorizontal() - .x(function(d) { return d.y; }) - .y(function(d) { return d.x; }); -``` - -<a href="#_link" name="_link">#</a> <i>link</i>(<i>arguments…</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/link/index.js) - -Generates a link for the given *arguments*. The *arguments* are arbitrary; they are simply propagated to the link generator’s accessor functions along with the `this` object. For example, with the default settings, an object expected: - -```js -link({ - source: [100, 100], - target: [300, 300] -}); -``` - -<a name="link_source" href="#link_source">#</a> <i>link</i>.<b>source</b>([<i>source</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/link/index.js) - -If *source* is specified, sets the source accessor to the specified function and returns this link generator. If *source* is not specified, returns the current source accessor, which defaults to: - -```js -function source(d) { - return d.source; -} -``` - -<a name="link_target" href="#link_target">#</a> <i>link</i>.<b>target</b>([<i>target</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/link/index.js) - -If *target* is specified, sets the target accessor to the specified function and returns this link generator. If *target* is not specified, returns the current target accessor, which defaults to: - -```js -function target(d) { - return d.target; -} -``` - -<a name="link_x" href="#link_x">#</a> <i>link</i>.<b>x</b>([<i>x</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/link/index.js) - -If *x* is specified, sets the *x*-accessor to the specified function or number and returns this link generator. If *x* is not specified, returns the current *x*-accessor, which defaults to: - -```js -function x(d) { - return d[0]; -} -``` - -<a name="link_y" href="#link_y">#</a> <i>link</i>.<b>y</b>([<i>y</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/link/index.js) - -If *y* is specified, sets the *y*-accessor to the specified function or number and returns this link generator. If *y* is not specified, returns the current *y*-accessor, which defaults to: - -```js -function y(d) { - return d[1]; -} -``` - -<a name="link_context" href="#link_context">#</a> <i>link</i>.<b>context</b>([<i>context</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/link/index.js) - -If *context* is specified, sets the context and returns this link generator. If *context* is not specified, returns the current context, which defaults to null. If the context is not null, then the [generated link](#_link) is rendered to this context as a sequence of [path method](http://www.w3.org/TR/2dcontext/#canvaspathmethods) calls. Otherwise, a [path data](http://www.w3.org/TR/SVG/paths.html#PathData) string representing the generated link is returned. See also [d3-path](https://github.com/d3/d3-path). - -<a name="linkRadial" href="#linkRadial">#</a> d3.<b>linkRadial</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/link/index.js) - -Returns a new [link generator](#_link) with radial tangents. For example, to visualize [links](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_links) in a [tree diagram](https://github.com/d3/d3-hierarchy/blob/master/README.md#tree) rooted in the center of the display, you might say: - -```js -var link = d3.linkRadial() - .angle(function(d) { return d.x; }) - .radius(function(d) { return d.y; }); -``` - -<a name="linkRadial_angle" href="#linkRadial_angle">#</a> <i>linkRadial</i>.<b>angle</b>([<i>angle</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/link/index.js) - -Equivalent to [*link*.x](#link_x), except the accessor returns the angle in radians, with 0 at -*y* (12 o’clock). - -<a name="linkRadial_radius" href="#linkRadial_radius">#</a> <i>linkRadial</i>.<b>radius</b>([<i>radius</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/link/index.js) - -Equivalent to [*link*.y](#link_y), except the accessor returns the radius: the distance from the origin ⟨0,0⟩. - -### Symbols - -<a href="#symbolCircle"><img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/circle.png" width="100" height="100"></a><a href="#symbolCross"><img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/cross.png" width="100" height="100"></a><a href="#symbolDiamond"><img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/diamond.png" width="100" height="100"></a><a href="#symbolSquare"><img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/square.png" width="100" height="100"></a><a href="#symbolStar"><img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/star.png" width="100" height="100"></a><a href="#symbolTriangle"><img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/triangle.png" width="100" height="100"><a href="#symbolWye"><img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/wye.png" width="100" height="100"></a> - -Symbols provide a categorical shape encoding as is commonly used in scatterplots. Symbols are always centered at ⟨0,0⟩; use a transform (see: [SVG](http://www.w3.org/TR/SVG/coords.html#TransformAttribute), [Canvas](http://www.w3.org/TR/2dcontext/#transformations)) to move the symbol to a different position. - -<a name="symbol" href="#symbol">#</a> d3.<b>symbol</b>([<i>type</i>][, <i>size</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/symbol.js), [Examples](https://observablehq.com/@d3/fitted-symbols) - -Constructs a new symbol generator of the specified [type](#symbol_type) and [size](#symbol_size). If not specified, *type* defaults to a circle, and *size* defaults to 64. - -<a name="_symbol" href="#_symbol">#</a> <i>symbol</i>(<i>arguments</i>…) · [Source](https://github.com/d3/d3-shape/blob/master/src/symbol.js), [Examples](https://observablehq.com/@d3/fitted-symbols) - -Generates a symbol for the given *arguments*. The *arguments* are arbitrary; they are simply propagated to the symbol generator’s accessor functions along with the `this` object. For example, with the default settings, no arguments are needed to produce a circle with area 64 square pixels. If the symbol generator has a [context](#symbol_context), then the symbol is rendered to this context as a sequence of [path method](http://www.w3.org/TR/2dcontext/#canvaspathmethods) calls and this function returns void. Otherwise, a [path data](http://www.w3.org/TR/SVG/paths.html#PathData) string is returned. - -<a name="symbol_type" href="#symbol_type">#</a> <i>symbol</i>.<b>type</b>([<i>type</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/symbol.js), [Examples](https://observablehq.com/@d3/fitted-symbols) - -If *type* is specified, sets the symbol type to the specified function or symbol type and returns this symbol generator. If *type* is a function, the symbol generator’s arguments and *this* are passed through. (See [*selection*.attr](https://github.com/d3/d3-selection/blob/master/README.md#selection_attr) if you are using d3-selection.) If *type* is not specified, returns the current symbol type accessor, which defaults to: - -```js -function type() { - return circle; -} -``` - -See [symbols](#symbols) for the set of built-in symbol types. To implement a custom symbol type, pass an object that implements [*symbolType*.draw](#symbolType_draw). - -<a name="symbol_size" href="#symbol_size">#</a> <i>symbol</i>.<b>size</b>([<i>size</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/symbol.js), [Examples](https://observablehq.com/@d3/fitted-symbols) - -If *size* is specified, sets the size to the specified function or number and returns this symbol generator. If *size* is a function, the symbol generator’s arguments and *this* are passed through. (See [*selection*.attr](https://github.com/d3/d3-selection/blob/master/README.md#selection_attr) if you are using d3-selection.) If *size* is not specified, returns the current size accessor, which defaults to: - -```js -function size() { - return 64; -} -``` - -Specifying the size as a function is useful for constructing a scatterplot with a size encoding. If you wish to scale the symbol to fit a given bounding box, rather than by area, try [SVG’s getBBox](https://observablehq.com/d/1fac2626b9e1b65f). - -<a name="symbol_context" href="#symbol_context">#</a> <i>symbol</i>.<b>context</b>([<i>context</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/symbol.js) - -If *context* is specified, sets the context and returns this symbol generator. If *context* is not specified, returns the current context, which defaults to null. If the context is not null, then the [generated symbol](#_symbol) is rendered to this context as a sequence of [path method](http://www.w3.org/TR/2dcontext/#canvaspathmethods) calls. Otherwise, a [path data](http://www.w3.org/TR/SVG/paths.html#PathData) string representing the generated symbol is returned. - -<a name="symbols" href="#symbols">#</a> d3.<b>symbols</b> · [Source](https://github.com/d3/d3-shape/blob/master/src/symbol.js), [Examples](https://observablehq.com/@d3/fitted-symbols) - -An array containing the set of all built-in symbol types: [circle](#symbolCircle), [cross](#symbolCross), [diamond](#symbolDiamond), [square](#symbolSquare), [star](#symbolStar), [triangle](#symbolTriangle), and [wye](#symbolWye). Useful for constructing the range of an [ordinal scale](https://github.com/d3/d3-scale#ordinal-scales) should you wish to use a shape encoding for categorical data. - -<a name="symbolCircle" href="#symbolCircle">#</a> d3.<b>symbolCircle</b> · [Source](https://github.com/d3/d3-shape/blob/master/src/symbol/circle.js), [Examples](https://observablehq.com/@d3/fitted-symbols) - -The circle symbol type. - -<a name="symbolCross" href="#symbolCross">#</a> d3.<b>symbolCross</b> · [Source](https://github.com/d3/d3-shape/blob/master/src/symbol/cross.js), [Examples](https://observablehq.com/@d3/fitted-symbols) - -The Greek cross symbol type, with arms of equal length. - -<a name="symbolDiamond" href="#symbolDiamond">#</a> d3.<b>symbolDiamond</b> · [Source](https://github.com/d3/d3-shape/blob/master/src/symbol/diamond.js), [Examples](https://observablehq.com/@d3/fitted-symbols) - -The rhombus symbol type. - -<a name="symbolSquare" href="#symbolSquare">#</a> d3.<b>symbolSquare</b> · [Source](https://github.com/d3/d3-shape/blob/master/src/symbol/square.js), [Examples](https://observablehq.com/@d3/fitted-symbols) - -The square symbol type. - -<a name="symbolStar" href="#symbolStar">#</a> d3.<b>symbolStar</b> · [Source](https://github.com/d3/d3-shape/blob/master/src/symbol/star.js), [Examples](https://observablehq.com/@d3/fitted-symbols) - -The pentagonal star (pentagram) symbol type. - -<a name="symbolTriangle" href="#symbolTriangle">#</a> d3.<b>symbolTriangle</b> · [Source](https://github.com/d3/d3-shape/blob/master/src/symbol/triangle.js), [Examples](https://observablehq.com/@d3/fitted-symbols) - -The up-pointing triangle symbol type. - -<a name="symbolWye" href="#symbolWye">#</a> d3.<b>symbolWye</b> · [Source](https://github.com/d3/d3-shape/blob/master/src/symbol/wye.js), [Examples](https://observablehq.com/@d3/fitted-symbols) - -The Y-shape symbol type. - -<a name="pointRadial" href="#pointRadial">#</a> d3.<b>pointRadial</b>(<i>angle</i>, <i>radius</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/pointRadial.js), [Examples](https://observablehq.com/@d3/radial-area-chart) - -Returns the point [<i>x</i>, <i>y</i>] for the given *angle* in radians, with 0 at -*y* (12 o’clock) and positive angles proceeding clockwise, and the given *radius*. - -### Custom Symbol Types - -Symbol types are typically not used directly, instead being passed to [*symbol*.type](#symbol_type). However, you can define your own symbol type implementation should none of the built-in types satisfy your needs using the following interface. You can also use this low-level interface with a built-in symbol type as an alternative to the symbol generator. - -<a name="symbolType_draw" href="#symbolType_draw">#</a> <i>symbolType</i>.<b>draw</b>(<i>context</i>, <i>size</i>) - -Renders this symbol type to the specified *context* with the specified *size* in square pixels. The *context* implements the [CanvasPathMethods](http://www.w3.org/TR/2dcontext/#canvaspathmethods) interface. (Note that this is a subset of the CanvasRenderingContext2D interface!) - -### Stacks - -[<img alt="Stacked Bar Chart" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/stacked-bar.png" width="295" height="154">](https://observablehq.com/@d3/stacked-bar-chart)[<img alt="Streamgraph" src="https://raw.githubusercontent.com/d3/d3-shape/master/img/stacked-stream.png" width="295" height="154">](https://observablehq.com/@mbostock/streamgraph-transitions) - -Some shape types can be stacked, placing one shape adjacent to another. For example, a bar chart of monthly sales might be broken down into a multi-series bar chart by product category, stacking bars vertically. This is equivalent to subdividing a bar chart by an ordinal dimension (such as product category) and applying a color encoding. - -Stacked charts can show overall value and per-category value simultaneously; however, it is typically harder to compare across categories, as only the bottom layer of the stack is aligned. So, chose the [stack order](#stack_order) carefully, and consider a [streamgraph](#stackOffsetWiggle). (See also [grouped charts](https://observablehq.com/@d3/grouped-bar-chart).) - -Like the [pie generator](#pies), the stack generator does not produce a shape directly. Instead it computes positions which you can then pass to an [area generator](#areas) or use directly, say to position bars. - -<a name="stack" href="#stack">#</a> d3.<b>stack</b>() · [Source](https://github.com/d3/d3-shape/blob/master/src/stack.js) - -Constructs a new stack generator with the default settings. - -<a name="_stack" href="#_stack">#</a> <i>stack</i>(<i>data</i>[, <i>arguments…</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/stack.js) - -Generates a stack for the given array of *data*, returning an array representing each series. Any additional *arguments* are arbitrary; they are simply propagated to accessors along with the `this` object. - -The series are determined by the [keys accessor](#stack_keys); each series *i* in the returned array corresponds to the *i*th key. Each series is an array of points, where each point *j* corresponds to the *j*th element in the input *data*. Lastly, each point is represented as an array [*y0*, *y1*] where *y0* is the lower value (baseline) and *y1* is the upper value (topline); the difference between *y0* and *y1* corresponds to the computed [value](#stack_value) for this point. The key for each series is available as *series*.key, and the [index](#stack_order) as *series*.index. The input data element for each point is available as *point*.data. - -For example, consider the following table representing monthly sales of fruits: - -Month | Apples | Bananas | Cherries | Dates ---------|--------|---------|----------|------- - 1/2015 | 3840 | 1920 | 960 | 400 - 2/2015 | 1600 | 1440 | 960 | 400 - 3/2015 | 640 | 960 | 640 | 400 - 4/2015 | 320 | 480 | 640 | 400 - -This might be represented in JavaScript as an array of objects: - -```js -var data = [ - {month: new Date(2015, 0, 1), apples: 3840, bananas: 1920, cherries: 960, dates: 400}, - {month: new Date(2015, 1, 1), apples: 1600, bananas: 1440, cherries: 960, dates: 400}, - {month: new Date(2015, 2, 1), apples: 640, bananas: 960, cherries: 640, dates: 400}, - {month: new Date(2015, 3, 1), apples: 320, bananas: 480, cherries: 640, dates: 400} -]; -``` - -To produce a stack for this data: - -```js -var stack = d3.stack() - .keys(["apples", "bananas", "cherries", "dates"]) - .order(d3.stackOrderNone) - .offset(d3.stackOffsetNone); - -var series = stack(data); -``` - -The resulting array has one element per *series*. Each series has one point per month, and each point has a lower and upper value defining the baseline and topline: - -```js -[ - [[ 0, 3840], [ 0, 1600], [ 0, 640], [ 0, 320]], // apples - [[3840, 5760], [1600, 3040], [ 640, 1600], [ 320, 800]], // bananas - [[5760, 6720], [3040, 4000], [1600, 2240], [ 800, 1440]], // cherries - [[6720, 7120], [4000, 4400], [2240, 2640], [1440, 1840]], // dates -] -``` - -Each series in then typically passed to an [area generator](#areas) to render an area chart, or used to construct rectangles for a bar chart. - -<a name="stack_keys" href="#stack_keys">#</a> <i>stack</i>.<b>keys</b>([<i>keys</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/stack.js) - -If *keys* is specified, sets the keys accessor to the specified function or array and returns this stack generator. If *keys* is not specified, returns the current keys accessor, which defaults to the empty array. A series (layer) is [generated](#_stack) for each key. Keys are typically strings, but they may be arbitrary values. The series’ key is passed to the [value accessor](#stack_value), along with each data point, to compute the point’s value. - -<a name="stack_value" href="#stack_value">#</a> <i>stack</i>.<b>value</b>([<i>value</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/stack.js) - -If *value* is specified, sets the value accessor to the specified function or number and returns this stack generator. If *value* is not specified, returns the current value accessor, which defaults to: - -```js -function value(d, key) { - return d[key]; -} -``` - -Thus, by default the stack generator assumes that the input data is an array of objects, with each object exposing named properties with numeric values; see [*stack*](#_stack) for an example. - -<a name="stack_order" href="#stack_order">#</a> <i>stack</i>.<b>order</b>([<i>order</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/stack.js) - -If *order* is specified, sets the order accessor to the specified function or array and returns this stack generator. If *order* is not specified, returns the current order accessor, which defaults to [stackOrderNone](#stackOrderNone); this uses the order given by the [key accessor](#stack_key). See [stack orders](#stack-orders) for the built-in orders. - -If *order* is a function, it is passed the generated series array and must return an array of numeric indexes representing the stack order. For example, the default order is defined as: - -```js -function orderNone(series) { - var n = series.length, o = new Array(n); - while (--n >= 0) o[n] = n; - return o; -} -``` - -The stack order is computed prior to the [offset](#stack_offset); thus, the lower value for all points is zero at the time the order is computed. The index attribute for each series is also not set until after the order is computed. - -<a name="stack_offset" href="#stack_offset">#</a> <i>stack</i>.<b>offset</b>([<i>offset</i>]) · [Source](https://github.com/d3/d3-shape/blob/master/src/stack.js) - -If *offset* is specified, sets the offset accessor to the specified function and returns this stack generator. If *offset* is not specified, returns the current offset acccesor, which defaults to [stackOffsetNone](#stackOffsetNone); this uses a zero baseline. See [stack offsets](#stack-offsets) for the built-in offsets. - -The offset function is passed the generated series array and the order index array; it is then responsible for updating the lower and upper values in the series array. For example, the default offset is defined as: - -```js -function offsetNone(series, order) { - if (!((n = series.length) > 1)) return; - for (var i = 1, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) { - s0 = s1, s1 = series[order[i]]; - for (var j = 0; j < m; ++j) { - s1[j][1] += s1[j][0] = s0[j][1]; - } - } -} -``` - -### Stack Orders - -Stack orders are typically not used directly, but are instead passed to [*stack*.order](#stack_order). - -<a name="stackOrderAppearance" href="#stackOrderAppearance">#</a> d3.<b>stackOrderAppearance</b>(<i>series</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/order/appearance.js) - -Returns a series order such that the earliest series (according to the maximum value) is at the bottom. - -<a name="stackOrderAscending" href="#stackOrderAscending">#</a> d3.<b>stackOrderAscending</b>(<i>series</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/order/ascending.js) - -Returns a series order such that the smallest series (according to the sum of values) is at the bottom. - -<a name="stackOrderDescending" href="#stackOrderDescending">#</a> d3.<b>stackOrderDescending</b>(<i>series</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/order/descending.js) - -Returns a series order such that the largest series (according to the sum of values) is at the bottom. - -<a name="stackOrderInsideOut" href="#stackOrderInsideOut">#</a> d3.<b>stackOrderInsideOut</b>(<i>series</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/order/insideOut.js) - -Returns a series order such that the earliest series (according to the maximum value) are on the inside and the later series are on the outside. This order is recommended for streamgraphs in conjunction with the [wiggle offset](#stackOffsetWiggle). See [Stacked Graphs—Geometry & Aesthetics](http://leebyron.com/streamgraph/) by Byron & Wattenberg for more information. - -<a name="stackOrderNone" href="#stackOrderNone">#</a> d3.<b>stackOrderNone</b>(<i>series</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/order/none.js) - -Returns the given series order [0, 1, … *n* - 1] where *n* is the number of elements in *series*. Thus, the stack order is given by the [key accessor](#stack_keys). - -<a name="stackOrderReverse" href="#stackOrderReverse">#</a> d3.<b>stackOrderReverse</b>(<i>series</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/order/reverse.js) - -Returns the reverse of the given series order [*n* - 1, *n* - 2, … 0] where *n* is the number of elements in *series*. Thus, the stack order is given by the reverse of the [key accessor](#stack_keys). - -### Stack Offsets - -Stack offsets are typically not used directly, but are instead passed to [*stack*.offset](#stack_offset). - -<a name="stackOffsetExpand" href="#stackOffsetExpand">#</a> d3.<b>stackOffsetExpand</b>(<i>series</i>, <i>order</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/offset/expand.js) - -Applies a zero baseline and normalizes the values for each point such that the topline is always one. - -<a name="stackOffsetDiverging" href="#stackOffsetDiverging">#</a> d3.<b>stackOffsetDiverging</b>(<i>series</i>, <i>order</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/offset/diverging.js) - -Positive values are stacked above zero, negative values are [stacked below zero](https://bl.ocks.org/mbostock/b5935342c6d21928111928401e2c8608), and zero values are stacked at zero. - -<a name="stackOffsetNone" href="#stackOffsetNone">#</a> d3.<b>stackOffsetNone</b>(<i>series</i>, <i>order</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/offset/none.js) - -Applies a zero baseline. - -<a name="stackOffsetSilhouette" href="#stackOffsetSilhouette">#</a> d3.<b>stackOffsetSilhouette</b>(<i>series</i>, <i>order</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/offset/silhouette.js) - -Shifts the baseline down such that the center of the streamgraph is always at zero. - -<a name="stackOffsetWiggle" href="#stackOffsetWiggle">#</a> d3.<b>stackOffsetWiggle</b>(<i>series</i>, <i>order</i>) · [Source](https://github.com/d3/d3-shape/blob/master/src/offset/wiggle.js) - -Shifts the baseline so as to minimize the weighted wiggle of layers. This offset is recommended for streamgraphs in conjunction with the [inside-out order](#stackOrderInsideOut). See [Stacked Graphs—Geometry & Aesthetics](http://leebyron.com/streamgraph/) by Bryon & Wattenberg for more information. diff --git a/node_modules/d3-shape/dist/d3-shape.js b/node_modules/d3-shape/dist/d3-shape.js deleted file mode 100644 index 84ba471a346462b370464c0ec37a7e05449e034b..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/dist/d3-shape.js +++ /dev/null @@ -1,1958 +0,0 @@ -// https://d3js.org/d3-shape/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-path')) : -typeof define === 'function' && define.amd ? define(['exports', 'd3-path'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {}, global.d3)); -}(this, function (exports, d3Path) { 'use strict'; - -function constant(x) { - return function constant() { - return x; - }; -} - -var abs = Math.abs; -var atan2 = Math.atan2; -var cos = Math.cos; -var max = Math.max; -var min = Math.min; -var sin = Math.sin; -var sqrt = Math.sqrt; - -var epsilon = 1e-12; -var pi = Math.PI; -var halfPi = pi / 2; -var tau = 2 * pi; - -function acos(x) { - return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); -} - -function asin(x) { - return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x); -} - -function arcInnerRadius(d) { - return d.innerRadius; -} - -function arcOuterRadius(d) { - return d.outerRadius; -} - -function arcStartAngle(d) { - return d.startAngle; -} - -function arcEndAngle(d) { - return d.endAngle; -} - -function arcPadAngle(d) { - return d && d.padAngle; // Note: optional! -} - -function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { - var x10 = x1 - x0, y10 = y1 - y0, - x32 = x3 - x2, y32 = y3 - y2, - t = y32 * x10 - x32 * y10; - if (t * t < epsilon) return; - t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t; - return [x0 + t * x10, y0 + t * y10]; -} - -// Compute perpendicular offset line of length rc. -// http://mathworld.wolfram.com/Circle-LineIntersection.html -function cornerTangents(x0, y0, x1, y1, r1, rc, cw) { - var x01 = x0 - x1, - y01 = y0 - y1, - lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01), - ox = lo * y01, - oy = -lo * x01, - x11 = x0 + ox, - y11 = y0 + oy, - x10 = x1 + ox, - y10 = y1 + oy, - x00 = (x11 + x10) / 2, - y00 = (y11 + y10) / 2, - dx = x10 - x11, - dy = y10 - y11, - d2 = dx * dx + dy * dy, - r = r1 - rc, - D = x11 * y10 - x10 * y11, - d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)), - cx0 = (D * dy - dx * d) / d2, - cy0 = (-D * dx - dy * d) / d2, - cx1 = (D * dy + dx * d) / d2, - cy1 = (-D * dx + dy * d) / d2, - dx0 = cx0 - x00, - dy0 = cy0 - y00, - dx1 = cx1 - x00, - dy1 = cy1 - y00; - - // Pick the closer of the two intersection points. - // TODO Is there a faster way to determine which intersection to use? - if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1; - - return { - cx: cx0, - cy: cy0, - x01: -ox, - y01: -oy, - x11: cx0 * (r1 / r - 1), - y11: cy0 * (r1 / r - 1) - }; -} - -function arc() { - var innerRadius = arcInnerRadius, - outerRadius = arcOuterRadius, - cornerRadius = constant(0), - padRadius = null, - startAngle = arcStartAngle, - endAngle = arcEndAngle, - padAngle = arcPadAngle, - context = null; - - function arc() { - var buffer, - r, - r0 = +innerRadius.apply(this, arguments), - r1 = +outerRadius.apply(this, arguments), - a0 = startAngle.apply(this, arguments) - halfPi, - a1 = endAngle.apply(this, arguments) - halfPi, - da = abs(a1 - a0), - cw = a1 > a0; - - if (!context) context = buffer = d3Path.path(); - - // Ensure that the outer radius is always larger than the inner radius. - if (r1 < r0) r = r1, r1 = r0, r0 = r; - - // Is it a point? - if (!(r1 > epsilon)) context.moveTo(0, 0); - - // Or is it a circle or annulus? - else if (da > tau - epsilon) { - context.moveTo(r1 * cos(a0), r1 * sin(a0)); - context.arc(0, 0, r1, a0, a1, !cw); - if (r0 > epsilon) { - context.moveTo(r0 * cos(a1), r0 * sin(a1)); - context.arc(0, 0, r0, a1, a0, cw); - } - } - - // Or is it a circular or annular sector? - else { - var a01 = a0, - a11 = a1, - a00 = a0, - a10 = a1, - da0 = da, - da1 = da, - ap = padAngle.apply(this, arguments) / 2, - rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)), - rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), - rc0 = rc, - rc1 = rc, - t0, - t1; - - // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0. - if (rp > epsilon) { - var p0 = asin(rp / r0 * sin(ap)), - p1 = asin(rp / r1 * sin(ap)); - if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0; - else da0 = 0, a00 = a10 = (a0 + a1) / 2; - if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1; - else da1 = 0, a01 = a11 = (a0 + a1) / 2; - } - - var x01 = r1 * cos(a01), - y01 = r1 * sin(a01), - x10 = r0 * cos(a10), - y10 = r0 * sin(a10); - - // Apply rounded corners? - if (rc > epsilon) { - var x11 = r1 * cos(a11), - y11 = r1 * sin(a11), - x00 = r0 * cos(a00), - y00 = r0 * sin(a00), - oc; - - // Restrict the corner radius according to the sector angle. - if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) { - var ax = x01 - oc[0], - ay = y01 - oc[1], - bx = x11 - oc[0], - by = y11 - oc[1], - kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2), - lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]); - rc0 = min(rc, (r0 - lc) / (kc - 1)); - rc1 = min(rc, (r1 - lc) / (kc + 1)); - } - } - - // Is the sector collapsed to a line? - if (!(da1 > epsilon)) context.moveTo(x01, y01); - - // Does the sector’s outer ring have rounded corners? - else if (rc1 > epsilon) { - t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw); - t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw); - - context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01); - - // Have the corners merged? - if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw); - - // Otherwise, draw the two corners and the ring. - else { - context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw); - context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw); - context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw); - } - } - - // Or is the outer ring just a circular arc? - else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); - - // Is there no inner ring, and it’s a circular sector? - // Or perhaps it’s an annular sector collapsed due to padding? - if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10); - - // Does the sector’s inner ring (or point) have rounded corners? - else if (rc0 > epsilon) { - t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw); - t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw); - - context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01); - - // Have the corners merged? - if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw); - - // Otherwise, draw the two corners and the ring. - else { - context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw); - context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw); - context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw); - } - } - - // Or is the inner ring just a circular arc? - else context.arc(0, 0, r0, a10, a00, cw); - } - - context.closePath(); - - if (buffer) return context = null, buffer + "" || null; - } - - arc.centroid = function() { - var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, - a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2; - return [cos(a) * r, sin(a) * r]; - }; - - arc.innerRadius = function(_) { - return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant(+_), arc) : innerRadius; - }; - - arc.outerRadius = function(_) { - return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant(+_), arc) : outerRadius; - }; - - arc.cornerRadius = function(_) { - return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant(+_), arc) : cornerRadius; - }; - - arc.padRadius = function(_) { - return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant(+_), arc) : padRadius; - }; - - arc.startAngle = function(_) { - return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), arc) : startAngle; - }; - - arc.endAngle = function(_) { - return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), arc) : endAngle; - }; - - arc.padAngle = function(_) { - return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), arc) : padAngle; - }; - - arc.context = function(_) { - return arguments.length ? ((context = _ == null ? null : _), arc) : context; - }; - - return arc; -} - -var slice = Array.prototype.slice; - -function array(x) { - return typeof x === "object" && "length" in x - ? x // Array, TypedArray, NodeList, array-like - : Array.from(x); // Map, Set, iterable, string, or anything else -} - -function Linear(context) { - this._context = context; -} - -Linear.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; // proceed - default: this._context.lineTo(x, y); break; - } - } -}; - -function curveLinear(context) { - return new Linear(context); -} - -function x(p) { - return p[0]; -} - -function y(p) { - return p[1]; -} - -function line(x$1, y$1) { - var defined = constant(true), - context = null, - curve = curveLinear, - output = null; - - x$1 = typeof x$1 === "function" ? x$1 : (x$1 === undefined) ? x : constant(x$1); - y$1 = typeof y$1 === "function" ? y$1 : (y$1 === undefined) ? y : constant(y$1); - - function line(data) { - var i, - n = (data = array(data)).length, - d, - defined0 = false, - buffer; - - if (context == null) output = curve(buffer = d3Path.path()); - - for (i = 0; i <= n; ++i) { - if (!(i < n && defined(d = data[i], i, data)) === defined0) { - if (defined0 = !defined0) output.lineStart(); - else output.lineEnd(); - } - if (defined0) output.point(+x$1(d, i, data), +y$1(d, i, data)); - } - - if (buffer) return output = null, buffer + "" || null; - } - - line.x = function(_) { - return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant(+_), line) : x$1; - }; - - line.y = function(_) { - return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant(+_), line) : y$1; - }; - - line.defined = function(_) { - return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), line) : defined; - }; - - line.curve = function(_) { - return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve; - }; - - line.context = function(_) { - return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context; - }; - - return line; -} - -function area(x0, y0, y1) { - var x1 = null, - defined = constant(true), - context = null, - curve = curveLinear, - output = null; - - x0 = typeof x0 === "function" ? x0 : (x0 === undefined) ? x : constant(+x0); - y0 = typeof y0 === "function" ? y0 : (y0 === undefined) ? constant(0) : constant(+y0); - y1 = typeof y1 === "function" ? y1 : (y1 === undefined) ? y : constant(+y1); - - function area(data) { - var i, - j, - k, - n = (data = array(data)).length, - d, - defined0 = false, - buffer, - x0z = new Array(n), - y0z = new Array(n); - - if (context == null) output = curve(buffer = d3Path.path()); - - for (i = 0; i <= n; ++i) { - if (!(i < n && defined(d = data[i], i, data)) === defined0) { - if (defined0 = !defined0) { - j = i; - output.areaStart(); - output.lineStart(); - } else { - output.lineEnd(); - output.lineStart(); - for (k = i - 1; k >= j; --k) { - output.point(x0z[k], y0z[k]); - } - output.lineEnd(); - output.areaEnd(); - } - } - if (defined0) { - x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data); - output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]); - } - } - - if (buffer) return output = null, buffer + "" || null; - } - - function arealine() { - return line().defined(defined).curve(curve).context(context); - } - - area.x = function(_) { - return arguments.length ? (x0 = typeof _ === "function" ? _ : constant(+_), x1 = null, area) : x0; - }; - - area.x0 = function(_) { - return arguments.length ? (x0 = typeof _ === "function" ? _ : constant(+_), area) : x0; - }; - - area.x1 = function(_) { - return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : constant(+_), area) : x1; - }; - - area.y = function(_) { - return arguments.length ? (y0 = typeof _ === "function" ? _ : constant(+_), y1 = null, area) : y0; - }; - - area.y0 = function(_) { - return arguments.length ? (y0 = typeof _ === "function" ? _ : constant(+_), area) : y0; - }; - - area.y1 = function(_) { - return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : constant(+_), area) : y1; - }; - - area.lineX0 = - area.lineY0 = function() { - return arealine().x(x0).y(y0); - }; - - area.lineY1 = function() { - return arealine().x(x0).y(y1); - }; - - area.lineX1 = function() { - return arealine().x(x1).y(y0); - }; - - area.defined = function(_) { - return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), area) : defined; - }; - - area.curve = function(_) { - return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve; - }; - - area.context = function(_) { - return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context; - }; - - return area; -} - -function descending(a, b) { - return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; -} - -function identity(d) { - return d; -} - -function pie() { - var value = identity, - sortValues = descending, - sort = null, - startAngle = constant(0), - endAngle = constant(tau), - padAngle = constant(0); - - function pie(data) { - var i, - n = (data = array(data)).length, - j, - k, - sum = 0, - index = new Array(n), - arcs = new Array(n), - a0 = +startAngle.apply(this, arguments), - da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)), - a1, - p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)), - pa = p * (da < 0 ? -1 : 1), - v; - - for (i = 0; i < n; ++i) { - if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) { - sum += v; - } - } - - // Optionally sort the arcs by previously-computed values or by data. - if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); }); - else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); }); - - // Compute the arcs! They are stored in the original data's order. - for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) { - j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = { - data: data[j], - index: i, - value: v, - startAngle: a0, - endAngle: a1, - padAngle: p - }; - } - - return arcs; - } - - pie.value = function(_) { - return arguments.length ? (value = typeof _ === "function" ? _ : constant(+_), pie) : value; - }; - - pie.sortValues = function(_) { - return arguments.length ? (sortValues = _, sort = null, pie) : sortValues; - }; - - pie.sort = function(_) { - return arguments.length ? (sort = _, sortValues = null, pie) : sort; - }; - - pie.startAngle = function(_) { - return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), pie) : startAngle; - }; - - pie.endAngle = function(_) { - return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), pie) : endAngle; - }; - - pie.padAngle = function(_) { - return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), pie) : padAngle; - }; - - return pie; -} - -var curveRadialLinear = curveRadial(curveLinear); - -function Radial(curve) { - this._curve = curve; -} - -Radial.prototype = { - areaStart: function() { - this._curve.areaStart(); - }, - areaEnd: function() { - this._curve.areaEnd(); - }, - lineStart: function() { - this._curve.lineStart(); - }, - lineEnd: function() { - this._curve.lineEnd(); - }, - point: function(a, r) { - this._curve.point(r * Math.sin(a), r * -Math.cos(a)); - } -}; - -function curveRadial(curve) { - - function radial(context) { - return new Radial(curve(context)); - } - - radial._curve = curve; - - return radial; -} - -function lineRadial(l) { - var c = l.curve; - - l.angle = l.x, delete l.x; - l.radius = l.y, delete l.y; - - l.curve = function(_) { - return arguments.length ? c(curveRadial(_)) : c()._curve; - }; - - return l; -} - -function lineRadial$1() { - return lineRadial(line().curve(curveRadialLinear)); -} - -function areaRadial() { - var a = area().curve(curveRadialLinear), - c = a.curve, - x0 = a.lineX0, - x1 = a.lineX1, - y0 = a.lineY0, - y1 = a.lineY1; - - a.angle = a.x, delete a.x; - a.startAngle = a.x0, delete a.x0; - a.endAngle = a.x1, delete a.x1; - a.radius = a.y, delete a.y; - a.innerRadius = a.y0, delete a.y0; - a.outerRadius = a.y1, delete a.y1; - a.lineStartAngle = function() { return lineRadial(x0()); }, delete a.lineX0; - a.lineEndAngle = function() { return lineRadial(x1()); }, delete a.lineX1; - a.lineInnerRadius = function() { return lineRadial(y0()); }, delete a.lineY0; - a.lineOuterRadius = function() { return lineRadial(y1()); }, delete a.lineY1; - - a.curve = function(_) { - return arguments.length ? c(curveRadial(_)) : c()._curve; - }; - - return a; -} - -function pointRadial(x, y) { - return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)]; -} - -function linkSource(d) { - return d.source; -} - -function linkTarget(d) { - return d.target; -} - -function link(curve) { - var source = linkSource, - target = linkTarget, - x$1 = x, - y$1 = y, - context = null; - - function link() { - var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv); - if (!context) context = buffer = d3Path.path(); - curve(context, +x$1.apply(this, (argv[0] = s, argv)), +y$1.apply(this, argv), +x$1.apply(this, (argv[0] = t, argv)), +y$1.apply(this, argv)); - if (buffer) return context = null, buffer + "" || null; - } - - link.source = function(_) { - return arguments.length ? (source = _, link) : source; - }; - - link.target = function(_) { - return arguments.length ? (target = _, link) : target; - }; - - link.x = function(_) { - return arguments.length ? (x$1 = typeof _ === "function" ? _ : constant(+_), link) : x$1; - }; - - link.y = function(_) { - return arguments.length ? (y$1 = typeof _ === "function" ? _ : constant(+_), link) : y$1; - }; - - link.context = function(_) { - return arguments.length ? ((context = _ == null ? null : _), link) : context; - }; - - return link; -} - -function curveHorizontal(context, x0, y0, x1, y1) { - context.moveTo(x0, y0); - context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1); -} - -function curveVertical(context, x0, y0, x1, y1) { - context.moveTo(x0, y0); - context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1); -} - -function curveRadial$1(context, x0, y0, x1, y1) { - var p0 = pointRadial(x0, y0), - p1 = pointRadial(x0, y0 = (y0 + y1) / 2), - p2 = pointRadial(x1, y0), - p3 = pointRadial(x1, y1); - context.moveTo(p0[0], p0[1]); - context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]); -} - -function linkHorizontal() { - return link(curveHorizontal); -} - -function linkVertical() { - return link(curveVertical); -} - -function linkRadial() { - var l = link(curveRadial$1); - l.angle = l.x, delete l.x; - l.radius = l.y, delete l.y; - return l; -} - -var circle = { - draw: function(context, size) { - var r = Math.sqrt(size / pi); - context.moveTo(r, 0); - context.arc(0, 0, r, 0, tau); - } -}; - -var cross = { - draw: function(context, size) { - var r = Math.sqrt(size / 5) / 2; - context.moveTo(-3 * r, -r); - context.lineTo(-r, -r); - context.lineTo(-r, -3 * r); - context.lineTo(r, -3 * r); - context.lineTo(r, -r); - context.lineTo(3 * r, -r); - context.lineTo(3 * r, r); - context.lineTo(r, r); - context.lineTo(r, 3 * r); - context.lineTo(-r, 3 * r); - context.lineTo(-r, r); - context.lineTo(-3 * r, r); - context.closePath(); - } -}; - -var tan30 = Math.sqrt(1 / 3), - tan30_2 = tan30 * 2; - -var diamond = { - draw: function(context, size) { - var y = Math.sqrt(size / tan30_2), - x = y * tan30; - context.moveTo(0, -y); - context.lineTo(x, 0); - context.lineTo(0, y); - context.lineTo(-x, 0); - context.closePath(); - } -}; - -var ka = 0.89081309152928522810, - kr = Math.sin(pi / 10) / Math.sin(7 * pi / 10), - kx = Math.sin(tau / 10) * kr, - ky = -Math.cos(tau / 10) * kr; - -var star = { - draw: function(context, size) { - var r = Math.sqrt(size * ka), - x = kx * r, - y = ky * r; - context.moveTo(0, -r); - context.lineTo(x, y); - for (var i = 1; i < 5; ++i) { - var a = tau * i / 5, - c = Math.cos(a), - s = Math.sin(a); - context.lineTo(s * r, -c * r); - context.lineTo(c * x - s * y, s * x + c * y); - } - context.closePath(); - } -}; - -var square = { - draw: function(context, size) { - var w = Math.sqrt(size), - x = -w / 2; - context.rect(x, x, w, w); - } -}; - -var sqrt3 = Math.sqrt(3); - -var triangle = { - draw: function(context, size) { - var y = -Math.sqrt(size / (sqrt3 * 3)); - context.moveTo(0, y * 2); - context.lineTo(-sqrt3 * y, -y); - context.lineTo(sqrt3 * y, -y); - context.closePath(); - } -}; - -var c = -0.5, - s = Math.sqrt(3) / 2, - k = 1 / Math.sqrt(12), - a = (k / 2 + 1) * 3; - -var wye = { - draw: function(context, size) { - var r = Math.sqrt(size / a), - x0 = r / 2, - y0 = r * k, - x1 = x0, - y1 = r * k + r, - x2 = -x1, - y2 = y1; - context.moveTo(x0, y0); - context.lineTo(x1, y1); - context.lineTo(x2, y2); - context.lineTo(c * x0 - s * y0, s * x0 + c * y0); - context.lineTo(c * x1 - s * y1, s * x1 + c * y1); - context.lineTo(c * x2 - s * y2, s * x2 + c * y2); - context.lineTo(c * x0 + s * y0, c * y0 - s * x0); - context.lineTo(c * x1 + s * y1, c * y1 - s * x1); - context.lineTo(c * x2 + s * y2, c * y2 - s * x2); - context.closePath(); - } -}; - -var symbols = [ - circle, - cross, - diamond, - square, - star, - triangle, - wye -]; - -function symbol(type, size) { - var context = null; - type = typeof type === "function" ? type : constant(type || circle); - size = typeof size === "function" ? size : constant(size === undefined ? 64 : +size); - - function symbol() { - var buffer; - if (!context) context = buffer = d3Path.path(); - type.apply(this, arguments).draw(context, +size.apply(this, arguments)); - if (buffer) return context = null, buffer + "" || null; - } - - symbol.type = function(_) { - return arguments.length ? (type = typeof _ === "function" ? _ : constant(_), symbol) : type; - }; - - symbol.size = function(_) { - return arguments.length ? (size = typeof _ === "function" ? _ : constant(+_), symbol) : size; - }; - - symbol.context = function(_) { - return arguments.length ? (context = _ == null ? null : _, symbol) : context; - }; - - return symbol; -} - -function noop() {} - -function point(that, x, y) { - that._context.bezierCurveTo( - (2 * that._x0 + that._x1) / 3, - (2 * that._y0 + that._y1) / 3, - (that._x0 + 2 * that._x1) / 3, - (that._y0 + 2 * that._y1) / 3, - (that._x0 + 4 * that._x1 + x) / 6, - (that._y0 + 4 * that._y1 + y) / 6 - ); -} - -function Basis(context) { - this._context = context; -} - -Basis.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = - this._y0 = this._y1 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 3: point(this, this._x1, this._y1); // proceed - case 2: this._context.lineTo(this._x1, this._y1); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; break; - case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed - default: point(this, x, y); break; - } - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - } -}; - -function basis(context) { - return new Basis(context); -} - -function BasisClosed(context) { - this._context = context; -} - -BasisClosed.prototype = { - areaStart: noop, - areaEnd: noop, - lineStart: function() { - this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = - this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 1: { - this._context.moveTo(this._x2, this._y2); - this._context.closePath(); - break; - } - case 2: { - this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3); - this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3); - this._context.closePath(); - break; - } - case 3: { - this.point(this._x2, this._y2); - this.point(this._x3, this._y3); - this.point(this._x4, this._y4); - break; - } - } - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._x2 = x, this._y2 = y; break; - case 1: this._point = 2; this._x3 = x, this._y3 = y; break; - case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break; - default: point(this, x, y); break; - } - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - } -}; - -function basisClosed(context) { - return new BasisClosed(context); -} - -function BasisOpen(context) { - this._context = context; -} - -BasisOpen.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = - this._y0 = this._y1 = NaN; - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; break; - case 1: this._point = 2; break; - case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break; - case 3: this._point = 4; // proceed - default: point(this, x, y); break; - } - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - } -}; - -function basisOpen(context) { - return new BasisOpen(context); -} - -function Bundle(context, beta) { - this._basis = new Basis(context); - this._beta = beta; -} - -Bundle.prototype = { - lineStart: function() { - this._x = []; - this._y = []; - this._basis.lineStart(); - }, - lineEnd: function() { - var x = this._x, - y = this._y, - j = x.length - 1; - - if (j > 0) { - var x0 = x[0], - y0 = y[0], - dx = x[j] - x0, - dy = y[j] - y0, - i = -1, - t; - - while (++i <= j) { - t = i / j; - this._basis.point( - this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), - this._beta * y[i] + (1 - this._beta) * (y0 + t * dy) - ); - } - } - - this._x = this._y = null; - this._basis.lineEnd(); - }, - point: function(x, y) { - this._x.push(+x); - this._y.push(+y); - } -}; - -var bundle = (function custom(beta) { - - function bundle(context) { - return beta === 1 ? new Basis(context) : new Bundle(context, beta); - } - - bundle.beta = function(beta) { - return custom(+beta); - }; - - return bundle; -})(0.85); - -function point$1(that, x, y) { - that._context.bezierCurveTo( - that._x1 + that._k * (that._x2 - that._x0), - that._y1 + that._k * (that._y2 - that._y0), - that._x2 + that._k * (that._x1 - x), - that._y2 + that._k * (that._y1 - y), - that._x2, - that._y2 - ); -} - -function Cardinal(context, tension) { - this._context = context; - this._k = (1 - tension) / 6; -} - -Cardinal.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 2: this._context.lineTo(this._x2, this._y2); break; - case 3: point$1(this, this._x1, this._y1); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; this._x1 = x, this._y1 = y; break; - case 2: this._point = 3; // proceed - default: point$1(this, x, y); break; - } - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -var cardinal = (function custom(tension) { - - function cardinal(context) { - return new Cardinal(context, tension); - } - - cardinal.tension = function(tension) { - return custom(+tension); - }; - - return cardinal; -})(0); - -function CardinalClosed(context, tension) { - this._context = context; - this._k = (1 - tension) / 6; -} - -CardinalClosed.prototype = { - areaStart: noop, - areaEnd: noop, - lineStart: function() { - this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = - this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 1: { - this._context.moveTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 2: { - this._context.lineTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 3: { - this.point(this._x3, this._y3); - this.point(this._x4, this._y4); - this.point(this._x5, this._y5); - break; - } - } - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._x3 = x, this._y3 = y; break; - case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; - case 2: this._point = 3; this._x5 = x, this._y5 = y; break; - default: point$1(this, x, y); break; - } - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -var cardinalClosed = (function custom(tension) { - - function cardinal(context) { - return new CardinalClosed(context, tension); - } - - cardinal.tension = function(tension) { - return custom(+tension); - }; - - return cardinal; -})(0); - -function CardinalOpen(context, tension) { - this._context = context; - this._k = (1 - tension) / 6; -} - -CardinalOpen.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; break; - case 1: this._point = 2; break; - case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; - case 3: this._point = 4; // proceed - default: point$1(this, x, y); break; - } - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -var cardinalOpen = (function custom(tension) { - - function cardinal(context) { - return new CardinalOpen(context, tension); - } - - cardinal.tension = function(tension) { - return custom(+tension); - }; - - return cardinal; -})(0); - -function point$2(that, x, y) { - var x1 = that._x1, - y1 = that._y1, - x2 = that._x2, - y2 = that._y2; - - if (that._l01_a > epsilon) { - var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, - n = 3 * that._l01_a * (that._l01_a + that._l12_a); - x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n; - y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n; - } - - if (that._l23_a > epsilon) { - var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, - m = 3 * that._l23_a * (that._l23_a + that._l12_a); - x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m; - y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m; - } - - that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2); -} - -function CatmullRom(context, alpha) { - this._context = context; - this._alpha = alpha; -} - -CatmullRom.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._l01_a = this._l12_a = this._l23_a = - this._l01_2a = this._l12_2a = this._l23_2a = - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 2: this._context.lineTo(this._x2, this._y2); break; - case 3: this.point(this._x2, this._y2); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - - if (this._point) { - var x23 = this._x2 - x, - y23 = this._y2 - y; - this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); - } - - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; break; - case 2: this._point = 3; // proceed - default: point$2(this, x, y); break; - } - - this._l01_a = this._l12_a, this._l12_a = this._l23_a; - this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -var catmullRom = (function custom(alpha) { - - function catmullRom(context) { - return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0); - } - - catmullRom.alpha = function(alpha) { - return custom(+alpha); - }; - - return catmullRom; -})(0.5); - -function CatmullRomClosed(context, alpha) { - this._context = context; - this._alpha = alpha; -} - -CatmullRomClosed.prototype = { - areaStart: noop, - areaEnd: noop, - lineStart: function() { - this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = - this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; - this._l01_a = this._l12_a = this._l23_a = - this._l01_2a = this._l12_2a = this._l23_2a = - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 1: { - this._context.moveTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 2: { - this._context.lineTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 3: { - this.point(this._x3, this._y3); - this.point(this._x4, this._y4); - this.point(this._x5, this._y5); - break; - } - } - }, - point: function(x, y) { - x = +x, y = +y; - - if (this._point) { - var x23 = this._x2 - x, - y23 = this._y2 - y; - this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); - } - - switch (this._point) { - case 0: this._point = 1; this._x3 = x, this._y3 = y; break; - case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; - case 2: this._point = 3; this._x5 = x, this._y5 = y; break; - default: point$2(this, x, y); break; - } - - this._l01_a = this._l12_a, this._l12_a = this._l23_a; - this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -var catmullRomClosed = (function custom(alpha) { - - function catmullRom(context) { - return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0); - } - - catmullRom.alpha = function(alpha) { - return custom(+alpha); - }; - - return catmullRom; -})(0.5); - -function CatmullRomOpen(context, alpha) { - this._context = context; - this._alpha = alpha; -} - -CatmullRomOpen.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._l01_a = this._l12_a = this._l23_a = - this._l01_2a = this._l12_2a = this._l23_2a = - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - - if (this._point) { - var x23 = this._x2 - x, - y23 = this._y2 - y; - this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); - } - - switch (this._point) { - case 0: this._point = 1; break; - case 1: this._point = 2; break; - case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; - case 3: this._point = 4; // proceed - default: point$2(this, x, y); break; - } - - this._l01_a = this._l12_a, this._l12_a = this._l23_a; - this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -var catmullRomOpen = (function custom(alpha) { - - function catmullRom(context) { - return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0); - } - - catmullRom.alpha = function(alpha) { - return custom(+alpha); - }; - - return catmullRom; -})(0.5); - -function LinearClosed(context) { - this._context = context; -} - -LinearClosed.prototype = { - areaStart: noop, - areaEnd: noop, - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._point) this._context.closePath(); - }, - point: function(x, y) { - x = +x, y = +y; - if (this._point) this._context.lineTo(x, y); - else this._point = 1, this._context.moveTo(x, y); - } -}; - -function linearClosed(context) { - return new LinearClosed(context); -} - -function sign(x) { - return x < 0 ? -1 : 1; -} - -// Calculate the slopes of the tangents (Hermite-type interpolation) based on -// the following paper: Steffen, M. 1990. A Simple Method for Monotonic -// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO. -// NOV(II), P. 443, 1990. -function slope3(that, x2, y2) { - var h0 = that._x1 - that._x0, - h1 = x2 - that._x1, - s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), - s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), - p = (s0 * h1 + s1 * h0) / (h0 + h1); - return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0; -} - -// Calculate a one-sided slope. -function slope2(that, t) { - var h = that._x1 - that._x0; - return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t; -} - -// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations -// "you can express cubic Hermite interpolation in terms of cubic Bézier curves -// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1". -function point$3(that, t0, t1) { - var x0 = that._x0, - y0 = that._y0, - x1 = that._x1, - y1 = that._y1, - dx = (x1 - x0) / 3; - that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1); -} - -function MonotoneX(context) { - this._context = context; -} - -MonotoneX.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = - this._y0 = this._y1 = - this._t0 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 2: this._context.lineTo(this._x1, this._y1); break; - case 3: point$3(this, this._t0, slope2(this, this._t0)); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - var t1 = NaN; - - x = +x, y = +y; - if (x === this._x1 && y === this._y1) return; // Ignore coincident points. - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; break; - case 2: this._point = 3; point$3(this, slope2(this, t1 = slope3(this, x, y)), t1); break; - default: point$3(this, this._t0, t1 = slope3(this, x, y)); break; - } - - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - this._t0 = t1; - } -}; - -function MonotoneY(context) { - this._context = new ReflectContext(context); -} - -(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) { - MonotoneX.prototype.point.call(this, y, x); -}; - -function ReflectContext(context) { - this._context = context; -} - -ReflectContext.prototype = { - moveTo: function(x, y) { this._context.moveTo(y, x); }, - closePath: function() { this._context.closePath(); }, - lineTo: function(x, y) { this._context.lineTo(y, x); }, - bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); } -}; - -function monotoneX(context) { - return new MonotoneX(context); -} - -function monotoneY(context) { - return new MonotoneY(context); -} - -function Natural(context) { - this._context = context; -} - -Natural.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x = []; - this._y = []; - }, - lineEnd: function() { - var x = this._x, - y = this._y, - n = x.length; - - if (n) { - this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]); - if (n === 2) { - this._context.lineTo(x[1], y[1]); - } else { - var px = controlPoints(x), - py = controlPoints(y); - for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) { - this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]); - } - } - } - - if (this._line || (this._line !== 0 && n === 1)) this._context.closePath(); - this._line = 1 - this._line; - this._x = this._y = null; - }, - point: function(x, y) { - this._x.push(+x); - this._y.push(+y); - } -}; - -// See https://www.particleincell.com/2012/bezier-splines/ for derivation. -function controlPoints(x) { - var i, - n = x.length - 1, - m, - a = new Array(n), - b = new Array(n), - r = new Array(n); - a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1]; - for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1]; - a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n]; - for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1]; - a[n - 1] = r[n - 1] / b[n - 1]; - for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i]; - b[n - 1] = (x[n] + a[n - 1]) / 2; - for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1]; - return [a, b]; -} - -function natural(context) { - return new Natural(context); -} - -function Step(context, t) { - this._context = context; - this._t = t; -} - -Step.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x = this._y = NaN; - this._point = 0; - }, - lineEnd: function() { - if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y); - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; // proceed - default: { - if (this._t <= 0) { - this._context.lineTo(this._x, y); - this._context.lineTo(x, y); - } else { - var x1 = this._x * (1 - this._t) + x * this._t; - this._context.lineTo(x1, this._y); - this._context.lineTo(x1, y); - } - break; - } - } - this._x = x, this._y = y; - } -}; - -function step(context) { - return new Step(context, 0.5); -} - -function stepBefore(context) { - return new Step(context, 0); -} - -function stepAfter(context) { - return new Step(context, 1); -} - -function none(series, order) { - if (!((n = series.length) > 1)) return; - for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) { - s0 = s1, s1 = series[order[i]]; - for (j = 0; j < m; ++j) { - s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1]; - } - } -} - -function none$1(series) { - var n = series.length, o = new Array(n); - while (--n >= 0) o[n] = n; - return o; -} - -function stackValue(d, key) { - return d[key]; -} - -function stackSeries(key) { - const series = []; - series.key = key; - return series; -} - -function stack() { - var keys = constant([]), - order = none$1, - offset = none, - value = stackValue; - - function stack(data) { - var sz = Array.from(keys.apply(this, arguments), stackSeries), - i, n = sz.length, j = -1, - oz; - - for (const d of data) { - for (i = 0, ++j; i < n; ++i) { - (sz[i][j] = [0, +value(d, sz[i].key, j, data)]).data = d; - } - } - - for (i = 0, oz = array(order(sz)); i < n; ++i) { - sz[oz[i]].index = i; - } - - offset(sz, oz); - return sz; - } - - stack.keys = function(_) { - return arguments.length ? (keys = typeof _ === "function" ? _ : constant(Array.from(_)), stack) : keys; - }; - - stack.value = function(_) { - return arguments.length ? (value = typeof _ === "function" ? _ : constant(+_), stack) : value; - }; - - stack.order = function(_) { - return arguments.length ? (order = _ == null ? none$1 : typeof _ === "function" ? _ : constant(Array.from(_)), stack) : order; - }; - - stack.offset = function(_) { - return arguments.length ? (offset = _ == null ? none : _, stack) : offset; - }; - - return stack; -} - -function expand(series, order) { - if (!((n = series.length) > 0)) return; - for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) { - for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0; - if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y; - } - none(series, order); -} - -function diverging(series, order) { - if (!((n = series.length) > 0)) return; - for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) { - for (yp = yn = 0, i = 0; i < n; ++i) { - if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) { - d[0] = yp, d[1] = yp += dy; - } else if (dy < 0) { - d[1] = yn, d[0] = yn += dy; - } else { - d[0] = 0, d[1] = dy; - } - } - } -} - -function silhouette(series, order) { - if (!((n = series.length) > 0)) return; - for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) { - for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0; - s0[j][1] += s0[j][0] = -y / 2; - } - none(series, order); -} - -function wiggle(series, order) { - if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return; - for (var y = 0, j = 1, s0, m, n; j < m; ++j) { - for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) { - var si = series[order[i]], - sij0 = si[j][1] || 0, - sij1 = si[j - 1][1] || 0, - s3 = (sij0 - sij1) / 2; - for (var k = 0; k < i; ++k) { - var sk = series[order[k]], - skj0 = sk[j][1] || 0, - skj1 = sk[j - 1][1] || 0; - s3 += skj0 - skj1; - } - s1 += sij0, s2 += s3 * sij0; - } - s0[j - 1][1] += s0[j - 1][0] = y; - if (s1) y -= s2 / s1; - } - s0[j - 1][1] += s0[j - 1][0] = y; - none(series, order); -} - -function appearance(series) { - var peaks = series.map(peak); - return none$1(series).sort(function(a, b) { return peaks[a] - peaks[b]; }); -} - -function peak(series) { - var i = -1, j = 0, n = series.length, vi, vj = -Infinity; - while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i; - return j; -} - -function ascending(series) { - var sums = series.map(sum); - return none$1(series).sort(function(a, b) { return sums[a] - sums[b]; }); -} - -function sum(series) { - var s = 0, i = -1, n = series.length, v; - while (++i < n) if (v = +series[i][1]) s += v; - return s; -} - -function descending$1(series) { - return ascending(series).reverse(); -} - -function insideOut(series) { - var n = series.length, - i, - j, - sums = series.map(sum), - order = appearance(series), - top = 0, - bottom = 0, - tops = [], - bottoms = []; - - for (i = 0; i < n; ++i) { - j = order[i]; - if (top < bottom) { - top += sums[j]; - tops.push(j); - } else { - bottom += sums[j]; - bottoms.push(j); - } - } - - return bottoms.reverse().concat(tops); -} - -function reverse(series) { - return none$1(series).reverse(); -} - -exports.arc = arc; -exports.area = area; -exports.areaRadial = areaRadial; -exports.curveBasis = basis; -exports.curveBasisClosed = basisClosed; -exports.curveBasisOpen = basisOpen; -exports.curveBundle = bundle; -exports.curveCardinal = cardinal; -exports.curveCardinalClosed = cardinalClosed; -exports.curveCardinalOpen = cardinalOpen; -exports.curveCatmullRom = catmullRom; -exports.curveCatmullRomClosed = catmullRomClosed; -exports.curveCatmullRomOpen = catmullRomOpen; -exports.curveLinear = curveLinear; -exports.curveLinearClosed = linearClosed; -exports.curveMonotoneX = monotoneX; -exports.curveMonotoneY = monotoneY; -exports.curveNatural = natural; -exports.curveStep = step; -exports.curveStepAfter = stepAfter; -exports.curveStepBefore = stepBefore; -exports.line = line; -exports.lineRadial = lineRadial$1; -exports.linkHorizontal = linkHorizontal; -exports.linkRadial = linkRadial; -exports.linkVertical = linkVertical; -exports.pie = pie; -exports.pointRadial = pointRadial; -exports.radialArea = areaRadial; -exports.radialLine = lineRadial$1; -exports.stack = stack; -exports.stackOffsetDiverging = diverging; -exports.stackOffsetExpand = expand; -exports.stackOffsetNone = none; -exports.stackOffsetSilhouette = silhouette; -exports.stackOffsetWiggle = wiggle; -exports.stackOrderAppearance = appearance; -exports.stackOrderAscending = ascending; -exports.stackOrderDescending = descending$1; -exports.stackOrderInsideOut = insideOut; -exports.stackOrderNone = none$1; -exports.stackOrderReverse = reverse; -exports.symbol = symbol; -exports.symbolCircle = circle; -exports.symbolCross = cross; -exports.symbolDiamond = diamond; -exports.symbolSquare = square; -exports.symbolStar = star; -exports.symbolTriangle = triangle; -exports.symbolWye = wye; -exports.symbols = symbols; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-shape/dist/d3-shape.min.js b/node_modules/d3-shape/dist/d3-shape.min.js deleted file mode 100644 index 2724bf6713a12af773f618c61cd9acd463b38a62..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/dist/d3-shape.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-shape/ v2.0.0 Copyright 2020 Mike Bostock -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-path")):"function"==typeof define&&define.amd?define(["exports","d3-path"],n):n((t=t||self).d3=t.d3||{},t.d3)}(this,function(t,n){"use strict";function i(t){return function(){return t}}var e=Math.abs,s=Math.atan2,o=Math.cos,h=Math.max,_=Math.min,r=Math.sin,a=Math.sqrt,c=1e-12,u=Math.PI,l=u/2,f=2*u;function y(t){return t>=1?l:t<=-1?-l:Math.asin(t)}function x(t){return t.innerRadius}function p(t){return t.outerRadius}function v(t){return t.startAngle}function d(t){return t.endAngle}function T(t){return t&&t.padAngle}function g(t,n,i,e,s,o,_){var r=t-i,c=n-e,u=(_?o:-o)/a(r*r+c*c),l=u*c,f=-u*r,y=t+l,x=n+f,p=i+l,v=e+f,d=(y+p)/2,T=(x+v)/2,g=p-y,b=v-x,m=g*g+b*b,k=s-o,w=y*v-p*x,N=(b<0?-1:1)*a(h(0,k*k*m-w*w)),M=(w*b-g*N)/m,S=(-w*g-b*N)/m,E=(w*b+g*N)/m,A=(-w*g+b*N)/m,P=M-d,C=S-T,O=E-d,R=A-T;return P*P+C*C>O*O+R*R&&(M=E,S=A),{cx:M,cy:S,x01:-l,y01:-f,x11:M*(s/k-1),y11:S*(s/k-1)}}var b=Array.prototype.slice;function m(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function k(t){this._context=t}function w(t){return new k(t)}function N(t){return t[0]}function M(t){return t[1]}function S(t,e){var s=i(!0),o=null,h=w,_=null;function r(i){var r,a,c,u=(i=m(i)).length,l=!1;for(null==o&&(_=h(c=n.path())),r=0;r<=u;++r)!(r<u&&s(a=i[r],r,i))===l&&((l=!l)?_.lineStart():_.lineEnd()),l&&_.point(+t(a,r,i),+e(a,r,i));if(c)return _=null,c+""||null}return t="function"==typeof t?t:void 0===t?N:i(t),e="function"==typeof e?e:void 0===e?M:i(e),r.x=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),r):e},r.defined=function(t){return arguments.length?(s="function"==typeof t?t:i(!!t),r):s},r.curve=function(t){return arguments.length?(h=t,null!=o&&(_=h(o)),r):h},r.context=function(t){return arguments.length?(null==t?o=_=null:_=h(o=t),r):o},r}function E(t,e,s){var o=null,h=i(!0),_=null,r=w,a=null;function c(i){var c,u,l,f,y,x=(i=m(i)).length,p=!1,v=new Array(x),d=new Array(x);for(null==_&&(a=r(y=n.path())),c=0;c<=x;++c){if(!(c<x&&h(f=i[c],c,i))===p)if(p=!p)u=c,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),l=c-1;l>=u;--l)a.point(v[l],d[l]);a.lineEnd(),a.areaEnd()}p&&(v[c]=+t(f,c,i),d[c]=+e(f,c,i),a.point(o?+o(f,c,i):v[c],s?+s(f,c,i):d[c]))}if(y)return a=null,y+""||null}function u(){return S().defined(h).curve(r).context(_)}return t="function"==typeof t?t:void 0===t?N:i(+t),e="function"==typeof e?e:i(void 0===e?0:+e),s="function"==typeof s?s:void 0===s?M:i(+s),c.x=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),o=null,c):t},c.x0=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),c):t},c.x1=function(t){return arguments.length?(o=null==t?null:"function"==typeof t?t:i(+t),c):o},c.y=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),s=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),c):e},c.y1=function(t){return arguments.length?(s=null==t?null:"function"==typeof t?t:i(+t),c):s},c.lineX0=c.lineY0=function(){return u().x(t).y(e)},c.lineY1=function(){return u().x(t).y(s)},c.lineX1=function(){return u().x(o).y(e)},c.defined=function(t){return arguments.length?(h="function"==typeof t?t:i(!!t),c):h},c.curve=function(t){return arguments.length?(r=t,null!=_&&(a=r(_)),c):r},c.context=function(t){return arguments.length?(null==t?_=a=null:a=r(_=t),c):_},c}function A(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function P(t){return t}k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var C=R(w);function O(t){this._curve=t}function R(t){function n(n){return new O(t(n))}return n._curve=t,n}function q(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(R(t)):n()._curve},t}function z(){return q(S().curve(C))}function X(){var t=E().curve(C),n=t.curve,i=t.lineX0,e=t.lineX1,s=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return q(i())},delete t.lineX0,t.lineEndAngle=function(){return q(e())},delete t.lineX1,t.lineInnerRadius=function(){return q(s())},delete t.lineY0,t.lineOuterRadius=function(){return q(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(R(t)):n()._curve},t}function Y(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}function B(t){return t.source}function j(t){return t.target}function I(t){var e=B,s=j,o=N,h=M,_=null;function r(){var i,r=b.call(arguments),a=e.apply(this,r),c=s.apply(this,r);if(_||(_=i=n.path()),t(_,+o.apply(this,(r[0]=a,r)),+h.apply(this,r),+o.apply(this,(r[0]=c,r)),+h.apply(this,r)),i)return _=null,i+""||null}return r.source=function(t){return arguments.length?(e=t,r):e},r.target=function(t){return arguments.length?(s=t,r):s},r.x=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),r):o},r.y=function(t){return arguments.length?(h="function"==typeof t?t:i(+t),r):h},r.context=function(t){return arguments.length?(_=null==t?null:t,r):_},r}function D(t,n,i,e,s){t.moveTo(n,i),t.bezierCurveTo(n=(n+e)/2,i,n,s,e,s)}function L(t,n,i,e,s){t.moveTo(n,i),t.bezierCurveTo(n,i=(i+s)/2,e,i,e,s)}function V(t,n,i,e,s){var o=Y(n,i),h=Y(n,i=(i+s)/2),_=Y(e,i),r=Y(e,s);t.moveTo(o[0],o[1]),t.bezierCurveTo(h[0],h[1],_[0],_[1],r[0],r[1])}O.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var W={draw:function(t,n){var i=Math.sqrt(n/u);t.moveTo(i,0),t.arc(0,0,i,0,f)}},H={draw:function(t,n){var i=Math.sqrt(n/5)/2;t.moveTo(-3*i,-i),t.lineTo(-i,-i),t.lineTo(-i,-3*i),t.lineTo(i,-3*i),t.lineTo(i,-i),t.lineTo(3*i,-i),t.lineTo(3*i,i),t.lineTo(i,i),t.lineTo(i,3*i),t.lineTo(-i,3*i),t.lineTo(-i,i),t.lineTo(-3*i,i),t.closePath()}},F=Math.sqrt(1/3),G=2*F,J={draw:function(t,n){var i=Math.sqrt(n/G),e=i*F;t.moveTo(0,-i),t.lineTo(e,0),t.lineTo(0,i),t.lineTo(-e,0),t.closePath()}},K=Math.sin(u/10)/Math.sin(7*u/10),Q=Math.sin(f/10)*K,U=-Math.cos(f/10)*K,Z={draw:function(t,n){var i=Math.sqrt(.8908130915292852*n),e=Q*i,s=U*i;t.moveTo(0,-i),t.lineTo(e,s);for(var o=1;o<5;++o){var h=f*o/5,_=Math.cos(h),r=Math.sin(h);t.lineTo(r*i,-_*i),t.lineTo(_*e-r*s,r*e+_*s)}t.closePath()}},$={draw:function(t,n){var i=Math.sqrt(n),e=-i/2;t.rect(e,e,i,i)}},tt=Math.sqrt(3),nt={draw:function(t,n){var i=-Math.sqrt(n/(3*tt));t.moveTo(0,2*i),t.lineTo(-tt*i,-i),t.lineTo(tt*i,-i),t.closePath()}},it=-.5,et=Math.sqrt(3)/2,st=1/Math.sqrt(12),ot=3*(st/2+1),ht={draw:function(t,n){var i=Math.sqrt(n/ot),e=i/2,s=i*st,o=e,h=i*st+i,_=-o,r=h;t.moveTo(e,s),t.lineTo(o,h),t.lineTo(_,r),t.lineTo(it*e-et*s,et*e+it*s),t.lineTo(it*o-et*h,et*o+it*h),t.lineTo(it*_-et*r,et*_+it*r),t.lineTo(it*e+et*s,it*s-et*e),t.lineTo(it*o+et*h,it*h-et*o),t.lineTo(it*_+et*r,it*r-et*_),t.closePath()}},_t=[W,H,J,$,Z,nt,ht];function rt(){}function at(t,n,i){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+i)/6)}function ct(t){this._context=t}function ut(t){this._context=t}function lt(t){this._context=t}function ft(t,n){this._basis=new ct(t),this._beta=n}ct.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:at(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:at(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},ut.prototype={areaStart:rt,areaEnd:rt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:at(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},lt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var i=(this._x0+4*this._x1+t)/6,e=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(i,e):this._context.moveTo(i,e);break;case 3:this._point=4;default:at(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},ft.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,i=t.length-1;if(i>0)for(var e,s=t[0],o=n[0],h=t[i]-s,_=n[i]-o,r=-1;++r<=i;)e=r/i,this._basis.point(this._beta*t[r]+(1-this._beta)*(s+e*h),this._beta*n[r]+(1-this._beta)*(o+e*_));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var yt=function t(n){function i(t){return 1===n?new ct(t):new ft(t,n)}return i.beta=function(n){return t(+n)},i}(.85);function xt(t,n,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function pt(t,n){this._context=t,this._k=(1-n)/6}pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:xt(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:xt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var vt=function t(n){function i(t){return new pt(t,n)}return i.tension=function(n){return t(+n)},i}(0);function dt(t,n){this._context=t,this._k=(1-n)/6}dt.prototype={areaStart:rt,areaEnd:rt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:xt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Tt=function t(n){function i(t){return new dt(t,n)}return i.tension=function(n){return t(+n)},i}(0);function gt(t,n){this._context=t,this._k=(1-n)/6}gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xt(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var bt=function t(n){function i(t){return new gt(t,n)}return i.tension=function(n){return t(+n)},i}(0);function mt(t,n,i){var e=t._x1,s=t._y1,o=t._x2,h=t._y2;if(t._l01_a>c){var _=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,r=3*t._l01_a*(t._l01_a+t._l12_a);e=(e*_-t._x0*t._l12_2a+t._x2*t._l01_2a)/r,s=(s*_-t._y0*t._l12_2a+t._y2*t._l01_2a)/r}if(t._l23_a>c){var a=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*a+t._x1*t._l23_2a-n*t._l12_2a)/u,h=(h*a+t._y1*t._l23_2a-i*t._l12_2a)/u}t._context.bezierCurveTo(e,s,o,h,t._x2,t._y2)}function kt(t,n){this._context=t,this._alpha=n}kt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:mt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var wt=function t(n){function i(t){return n?new kt(t,n):new pt(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function Nt(t,n){this._context=t,this._alpha=n}Nt.prototype={areaStart:rt,areaEnd:rt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:mt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Mt=function t(n){function i(t){return n?new Nt(t,n):new dt(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function St(t,n){this._context=t,this._alpha=n}St.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var i=this._x2-t,e=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(i*i+e*e,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:mt(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Et=function t(n){function i(t){return n?new St(t,n):new gt(t,0)}return i.alpha=function(n){return t(+n)},i}(.5);function At(t){this._context=t}function Pt(t){return t<0?-1:1}function Ct(t,n,i){var e=t._x1-t._x0,s=n-t._x1,o=(t._y1-t._y0)/(e||s<0&&-0),h=(i-t._y1)/(s||e<0&&-0),_=(o*s+h*e)/(e+s);return(Pt(o)+Pt(h))*Math.min(Math.abs(o),Math.abs(h),.5*Math.abs(_))||0}function Ot(t,n){var i=t._x1-t._x0;return i?(3*(t._y1-t._y0)/i-n)/2:n}function Rt(t,n,i){var e=t._x0,s=t._y0,o=t._x1,h=t._y1,_=(o-e)/3;t._context.bezierCurveTo(e+_,s+_*n,o-_,h-_*i,o,h)}function qt(t){this._context=t}function zt(t){this._context=new Xt(t)}function Xt(t){this._context=t}function Yt(t){this._context=t}function Bt(t){var n,i,e=t.length-1,s=new Array(e),o=new Array(e),h=new Array(e);for(s[0]=0,o[0]=2,h[0]=t[0]+2*t[1],n=1;n<e-1;++n)s[n]=1,o[n]=4,h[n]=4*t[n]+2*t[n+1];for(s[e-1]=2,o[e-1]=7,h[e-1]=8*t[e-1]+t[e],n=1;n<e;++n)i=s[n]/o[n-1],o[n]-=i,h[n]-=i*h[n-1];for(s[e-1]=h[e-1]/o[e-1],n=e-2;n>=0;--n)s[n]=(h[n]-s[n+1])/o[n];for(o[e-1]=(t[e]+s[e-1])/2,n=0;n<e-1;++n)o[n]=2*t[n+1]-s[n+1];return[s,o]}function jt(t,n){this._context=t,this._t=n}function It(t,n){if((s=t.length)>1)for(var i,e,s,o=1,h=t[n[0]],_=h.length;o<s;++o)for(e=h,h=t[n[o]],i=0;i<_;++i)h[i][1]+=h[i][0]=isNaN(e[i][1])?e[i][0]:e[i][1]}function Dt(t){for(var n=t.length,i=new Array(n);--n>=0;)i[n]=n;return i}function Lt(t,n){return t[n]}function Vt(t){const n=[];return n.key=t,n}function Wt(t){var n=t.map(Ht);return Dt(t).sort(function(t,i){return n[t]-n[i]})}function Ht(t){for(var n,i=-1,e=0,s=t.length,o=-1/0;++i<s;)(n=+t[i][1])>o&&(o=n,e=i);return e}function Ft(t){var n=t.map(Gt);return Dt(t).sort(function(t,i){return n[t]-n[i]})}function Gt(t){for(var n,i=0,e=-1,s=t.length;++e<s;)(n=+t[e][1])&&(i+=n);return i}At.prototype={areaStart:rt,areaEnd:rt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}},qt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Rt(this,this._t0,Ot(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var i=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Rt(this,Ot(this,i=Ct(this,t,n)),i);break;default:Rt(this,this._t0,i=Ct(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=i}}},(zt.prototype=Object.create(qt.prototype)).point=function(t,n){qt.prototype.point.call(this,n,t)},Xt.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,i,e,s,o){this._context.bezierCurveTo(n,t,e,i,o,s)}},Yt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,i=t.length;if(i)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===i)this._context.lineTo(t[1],n[1]);else for(var e=Bt(t),s=Bt(n),o=0,h=1;h<i;++o,++h)this._context.bezierCurveTo(e[0][o],s[0][o],e[1][o],s[1][o],t[h],n[h]);(this._line||0!==this._line&&1===i)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},jt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,n)}}this._x=t,this._y=n}},t.arc=function(){var t=x,h=p,b=i(0),m=null,k=v,w=d,N=T,M=null;function S(){var i,x,p=+t.apply(this,arguments),v=+h.apply(this,arguments),d=k.apply(this,arguments)-l,T=w.apply(this,arguments)-l,S=e(T-d),E=T>d;if(M||(M=i=n.path()),v<p&&(x=v,v=p,p=x),v>c)if(S>f-c)M.moveTo(v*o(d),v*r(d)),M.arc(0,0,v,d,T,!E),p>c&&(M.moveTo(p*o(T),p*r(T)),M.arc(0,0,p,T,d,E));else{var A,P,C=d,O=T,R=d,q=T,z=S,X=S,Y=N.apply(this,arguments)/2,B=Y>c&&(m?+m.apply(this,arguments):a(p*p+v*v)),j=_(e(v-p)/2,+b.apply(this,arguments)),I=j,D=j;if(B>c){var L=y(B/p*r(Y)),V=y(B/v*r(Y));(z-=2*L)>c?(R+=L*=E?1:-1,q-=L):(z=0,R=q=(d+T)/2),(X-=2*V)>c?(C+=V*=E?1:-1,O-=V):(X=0,C=O=(d+T)/2)}var W=v*o(C),H=v*r(C),F=p*o(q),G=p*r(q);if(j>c){var J,K=v*o(O),Q=v*r(O),U=p*o(R),Z=p*r(R);if(S<u&&(J=function(t,n,i,e,s,o,h,_){var r=i-t,a=e-n,u=h-s,l=_-o,f=l*r-u*a;if(!(f*f<c))return[t+(f=(u*(n-o)-l*(t-s))/f)*r,n+f*a]}(W,H,U,Z,K,Q,F,G))){var $=W-J[0],tt=H-J[1],nt=K-J[0],it=Q-J[1],et=1/r(function(t){return t>1?0:t<-1?u:Math.acos(t)}(($*nt+tt*it)/(a($*$+tt*tt)*a(nt*nt+it*it)))/2),st=a(J[0]*J[0]+J[1]*J[1]);I=_(j,(p-st)/(et-1)),D=_(j,(v-st)/(et+1))}}X>c?D>c?(A=g(U,Z,W,H,v,D,E),P=g(K,Q,F,G,v,D,E),M.moveTo(A.cx+A.x01,A.cy+A.y01),D<j?M.arc(A.cx,A.cy,D,s(A.y01,A.x01),s(P.y01,P.x01),!E):(M.arc(A.cx,A.cy,D,s(A.y01,A.x01),s(A.y11,A.x11),!E),M.arc(0,0,v,s(A.cy+A.y11,A.cx+A.x11),s(P.cy+P.y11,P.cx+P.x11),!E),M.arc(P.cx,P.cy,D,s(P.y11,P.x11),s(P.y01,P.x01),!E))):(M.moveTo(W,H),M.arc(0,0,v,C,O,!E)):M.moveTo(W,H),p>c&&z>c?I>c?(A=g(F,G,K,Q,p,-I,E),P=g(W,H,U,Z,p,-I,E),M.lineTo(A.cx+A.x01,A.cy+A.y01),I<j?M.arc(A.cx,A.cy,I,s(A.y01,A.x01),s(P.y01,P.x01),!E):(M.arc(A.cx,A.cy,I,s(A.y01,A.x01),s(A.y11,A.x11),!E),M.arc(0,0,p,s(A.cy+A.y11,A.cx+A.x11),s(P.cy+P.y11,P.cx+P.x11),E),M.arc(P.cx,P.cy,I,s(P.y11,P.x11),s(P.y01,P.x01),!E))):M.arc(0,0,p,q,R,E):M.lineTo(F,G)}else M.moveTo(0,0);if(M.closePath(),i)return M=null,i+""||null}return S.centroid=function(){var n=(+t.apply(this,arguments)+ +h.apply(this,arguments))/2,i=(+k.apply(this,arguments)+ +w.apply(this,arguments))/2-u/2;return[o(i)*n,r(i)*n]},S.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),S):t},S.outerRadius=function(t){return arguments.length?(h="function"==typeof t?t:i(+t),S):h},S.cornerRadius=function(t){return arguments.length?(b="function"==typeof t?t:i(+t),S):b},S.padRadius=function(t){return arguments.length?(m=null==t?null:"function"==typeof t?t:i(+t),S):m},S.startAngle=function(t){return arguments.length?(k="function"==typeof t?t:i(+t),S):k},S.endAngle=function(t){return arguments.length?(w="function"==typeof t?t:i(+t),S):w},S.padAngle=function(t){return arguments.length?(N="function"==typeof t?t:i(+t),S):N},S.context=function(t){return arguments.length?(M=null==t?null:t,S):M},S},t.area=E,t.areaRadial=X,t.curveBasis=function(t){return new ct(t)},t.curveBasisClosed=function(t){return new ut(t)},t.curveBasisOpen=function(t){return new lt(t)},t.curveBundle=yt,t.curveCardinal=vt,t.curveCardinalClosed=Tt,t.curveCardinalOpen=bt,t.curveCatmullRom=wt,t.curveCatmullRomClosed=Mt,t.curveCatmullRomOpen=Et,t.curveLinear=w,t.curveLinearClosed=function(t){return new At(t)},t.curveMonotoneX=function(t){return new qt(t)},t.curveMonotoneY=function(t){return new zt(t)},t.curveNatural=function(t){return new Yt(t)},t.curveStep=function(t){return new jt(t,.5)},t.curveStepAfter=function(t){return new jt(t,1)},t.curveStepBefore=function(t){return new jt(t,0)},t.line=S,t.lineRadial=z,t.linkHorizontal=function(){return I(D)},t.linkRadial=function(){var t=I(V);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.linkVertical=function(){return I(L)},t.pie=function(){var t=P,n=A,e=null,s=i(0),o=i(f),h=i(0);function _(i){var _,r,a,c,u,l=(i=m(i)).length,y=0,x=new Array(l),p=new Array(l),v=+s.apply(this,arguments),d=Math.min(f,Math.max(-f,o.apply(this,arguments)-v)),T=Math.min(Math.abs(d)/l,h.apply(this,arguments)),g=T*(d<0?-1:1);for(_=0;_<l;++_)(u=p[x[_]=_]=+t(i[_],_,i))>0&&(y+=u);for(null!=n?x.sort(function(t,i){return n(p[t],p[i])}):null!=e&&x.sort(function(t,n){return e(i[t],i[n])}),_=0,a=y?(d-l*g)/y:0;_<l;++_,v=c)r=x[_],c=v+((u=p[r])>0?u*a:0)+g,p[r]={data:i[r],index:_,value:u,startAngle:v,endAngle:c,padAngle:T};return p}return _.value=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),_):t},_.sortValues=function(t){return arguments.length?(n=t,e=null,_):n},_.sort=function(t){return arguments.length?(e=t,n=null,_):e},_.startAngle=function(t){return arguments.length?(s="function"==typeof t?t:i(+t),_):s},_.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),_):o},_.padAngle=function(t){return arguments.length?(h="function"==typeof t?t:i(+t),_):h},_},t.pointRadial=Y,t.radialArea=X,t.radialLine=z,t.stack=function(){var t=i([]),n=Dt,e=It,s=Lt;function o(i){var o,h,_=Array.from(t.apply(this,arguments),Vt),r=_.length,a=-1;for(const t of i)for(o=0,++a;o<r;++o)(_[o][a]=[0,+s(t,_[o].key,a,i)]).data=t;for(o=0,h=m(n(_));o<r;++o)_[h[o]].index=o;return e(_,h),_}return o.keys=function(n){return arguments.length?(t="function"==typeof n?n:i(Array.from(n)),o):t},o.value=function(t){return arguments.length?(s="function"==typeof t?t:i(+t),o):s},o.order=function(t){return arguments.length?(n=null==t?Dt:"function"==typeof t?t:i(Array.from(t)),o):n},o.offset=function(t){return arguments.length?(e=null==t?It:t,o):e},o},t.stackOffsetDiverging=function(t,n){if((_=t.length)>0)for(var i,e,s,o,h,_,r=0,a=t[n[0]].length;r<a;++r)for(o=h=0,i=0;i<_;++i)(s=(e=t[n[i]][r])[1]-e[0])>0?(e[0]=o,e[1]=o+=s):s<0?(e[1]=h,e[0]=h+=s):(e[0]=0,e[1]=s)},t.stackOffsetExpand=function(t,n){if((e=t.length)>0){for(var i,e,s,o=0,h=t[0].length;o<h;++o){for(s=i=0;i<e;++i)s+=t[i][o][1]||0;if(s)for(i=0;i<e;++i)t[i][o][1]/=s}It(t,n)}},t.stackOffsetNone=It,t.stackOffsetSilhouette=function(t,n){if((i=t.length)>0){for(var i,e=0,s=t[n[0]],o=s.length;e<o;++e){for(var h=0,_=0;h<i;++h)_+=t[h][e][1]||0;s[e][1]+=s[e][0]=-_/2}It(t,n)}},t.stackOffsetWiggle=function(t,n){if((s=t.length)>0&&(e=(i=t[n[0]]).length)>0){for(var i,e,s,o=0,h=1;h<e;++h){for(var _=0,r=0,a=0;_<s;++_){for(var c=t[n[_]],u=c[h][1]||0,l=(u-(c[h-1][1]||0))/2,f=0;f<_;++f){var y=t[n[f]];l+=(y[h][1]||0)-(y[h-1][1]||0)}r+=u,a+=l*u}i[h-1][1]+=i[h-1][0]=o,r&&(o-=a/r)}i[h-1][1]+=i[h-1][0]=o,It(t,n)}},t.stackOrderAppearance=Wt,t.stackOrderAscending=Ft,t.stackOrderDescending=function(t){return Ft(t).reverse()},t.stackOrderInsideOut=function(t){var n,i,e=t.length,s=t.map(Gt),o=Wt(t),h=0,_=0,r=[],a=[];for(n=0;n<e;++n)i=o[n],h<_?(h+=s[i],r.push(i)):(_+=s[i],a.push(i));return a.reverse().concat(r)},t.stackOrderNone=Dt,t.stackOrderReverse=function(t){return Dt(t).reverse()},t.symbol=function(t,e){var s=null;function o(){var i;if(s||(s=i=n.path()),t.apply(this,arguments).draw(s,+e.apply(this,arguments)),i)return s=null,i+""||null}return t="function"==typeof t?t:i(t||W),e="function"==typeof e?e:i(void 0===e?64:+e),o.type=function(n){return arguments.length?(t="function"==typeof n?n:i(n),o):t},o.size=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),o):e},o.context=function(t){return arguments.length?(s=null==t?null:t,o):s},o},t.symbolCircle=W,t.symbolCross=H,t.symbolDiamond=J,t.symbolSquare=$,t.symbolStar=Z,t.symbolTriangle=nt,t.symbolWye=ht,t.symbols=_t,Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/node_modules/d3-shape/package.json b/node_modules/d3-shape/package.json deleted file mode 100644 index 3999346bd6839a9e7e42b9de476a67bad05962a1..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "d3-shape@2", - "_id": "d3-shape@2.0.0", - "_inBundle": false, - "_integrity": "sha512-djpGlA779ua+rImicYyyjnOjeubyhql1Jyn1HK0bTyawuH76UQRWXd+pftr67H6Fa8hSwetkgb/0id3agKWykw==", - "_location": "/d3-shape", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-shape@2", - "name": "d3-shape", - "escapedName": "d3-shape", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3" - ], - "_resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-2.0.0.tgz", - "_shasum": "2331b62fa784a2a1daac47a7233cfd69301381fd", - "_spec": "d3-shape@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-shape/issues" - }, - "bundleDependencies": false, - "dependencies": { - "d3-path": "1 - 2" - }, - "deprecated": false, - "description": "Graphical primitives for visualization, such as lines and areas.", - "devDependencies": { - "d3-polygon": "1 - 2", - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-shape/", - "jsdelivr": "dist/d3-shape.min.js", - "keywords": [ - "d3", - "d3-module", - "graphics", - "visualization", - "canvas", - "svg" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-shape.js", - "module": "src/index.js", - "name": "d3-shape", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-shape.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src" - }, - "sideEffects": false, - "unpkg": "dist/d3-shape.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-shape/src/arc.js b/node_modules/d3-shape/src/arc.js deleted file mode 100644 index 2032882df365b4e5ce7307045229d865bdd1c76a..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/arc.js +++ /dev/null @@ -1,261 +0,0 @@ -import {path} from "d3-path"; -import constant from "./constant.js"; -import {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from "./math.js"; - -function arcInnerRadius(d) { - return d.innerRadius; -} - -function arcOuterRadius(d) { - return d.outerRadius; -} - -function arcStartAngle(d) { - return d.startAngle; -} - -function arcEndAngle(d) { - return d.endAngle; -} - -function arcPadAngle(d) { - return d && d.padAngle; // Note: optional! -} - -function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { - var x10 = x1 - x0, y10 = y1 - y0, - x32 = x3 - x2, y32 = y3 - y2, - t = y32 * x10 - x32 * y10; - if (t * t < epsilon) return; - t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t; - return [x0 + t * x10, y0 + t * y10]; -} - -// Compute perpendicular offset line of length rc. -// http://mathworld.wolfram.com/Circle-LineIntersection.html -function cornerTangents(x0, y0, x1, y1, r1, rc, cw) { - var x01 = x0 - x1, - y01 = y0 - y1, - lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01), - ox = lo * y01, - oy = -lo * x01, - x11 = x0 + ox, - y11 = y0 + oy, - x10 = x1 + ox, - y10 = y1 + oy, - x00 = (x11 + x10) / 2, - y00 = (y11 + y10) / 2, - dx = x10 - x11, - dy = y10 - y11, - d2 = dx * dx + dy * dy, - r = r1 - rc, - D = x11 * y10 - x10 * y11, - d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)), - cx0 = (D * dy - dx * d) / d2, - cy0 = (-D * dx - dy * d) / d2, - cx1 = (D * dy + dx * d) / d2, - cy1 = (-D * dx + dy * d) / d2, - dx0 = cx0 - x00, - dy0 = cy0 - y00, - dx1 = cx1 - x00, - dy1 = cy1 - y00; - - // Pick the closer of the two intersection points. - // TODO Is there a faster way to determine which intersection to use? - if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1; - - return { - cx: cx0, - cy: cy0, - x01: -ox, - y01: -oy, - x11: cx0 * (r1 / r - 1), - y11: cy0 * (r1 / r - 1) - }; -} - -export default function() { - var innerRadius = arcInnerRadius, - outerRadius = arcOuterRadius, - cornerRadius = constant(0), - padRadius = null, - startAngle = arcStartAngle, - endAngle = arcEndAngle, - padAngle = arcPadAngle, - context = null; - - function arc() { - var buffer, - r, - r0 = +innerRadius.apply(this, arguments), - r1 = +outerRadius.apply(this, arguments), - a0 = startAngle.apply(this, arguments) - halfPi, - a1 = endAngle.apply(this, arguments) - halfPi, - da = abs(a1 - a0), - cw = a1 > a0; - - if (!context) context = buffer = path(); - - // Ensure that the outer radius is always larger than the inner radius. - if (r1 < r0) r = r1, r1 = r0, r0 = r; - - // Is it a point? - if (!(r1 > epsilon)) context.moveTo(0, 0); - - // Or is it a circle or annulus? - else if (da > tau - epsilon) { - context.moveTo(r1 * cos(a0), r1 * sin(a0)); - context.arc(0, 0, r1, a0, a1, !cw); - if (r0 > epsilon) { - context.moveTo(r0 * cos(a1), r0 * sin(a1)); - context.arc(0, 0, r0, a1, a0, cw); - } - } - - // Or is it a circular or annular sector? - else { - var a01 = a0, - a11 = a1, - a00 = a0, - a10 = a1, - da0 = da, - da1 = da, - ap = padAngle.apply(this, arguments) / 2, - rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)), - rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), - rc0 = rc, - rc1 = rc, - t0, - t1; - - // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0. - if (rp > epsilon) { - var p0 = asin(rp / r0 * sin(ap)), - p1 = asin(rp / r1 * sin(ap)); - if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0; - else da0 = 0, a00 = a10 = (a0 + a1) / 2; - if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1; - else da1 = 0, a01 = a11 = (a0 + a1) / 2; - } - - var x01 = r1 * cos(a01), - y01 = r1 * sin(a01), - x10 = r0 * cos(a10), - y10 = r0 * sin(a10); - - // Apply rounded corners? - if (rc > epsilon) { - var x11 = r1 * cos(a11), - y11 = r1 * sin(a11), - x00 = r0 * cos(a00), - y00 = r0 * sin(a00), - oc; - - // Restrict the corner radius according to the sector angle. - if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) { - var ax = x01 - oc[0], - ay = y01 - oc[1], - bx = x11 - oc[0], - by = y11 - oc[1], - kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2), - lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]); - rc0 = min(rc, (r0 - lc) / (kc - 1)); - rc1 = min(rc, (r1 - lc) / (kc + 1)); - } - } - - // Is the sector collapsed to a line? - if (!(da1 > epsilon)) context.moveTo(x01, y01); - - // Does the sector’s outer ring have rounded corners? - else if (rc1 > epsilon) { - t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw); - t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw); - - context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01); - - // Have the corners merged? - if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw); - - // Otherwise, draw the two corners and the ring. - else { - context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw); - context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw); - context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw); - } - } - - // Or is the outer ring just a circular arc? - else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); - - // Is there no inner ring, and it’s a circular sector? - // Or perhaps it’s an annular sector collapsed due to padding? - if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10); - - // Does the sector’s inner ring (or point) have rounded corners? - else if (rc0 > epsilon) { - t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw); - t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw); - - context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01); - - // Have the corners merged? - if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw); - - // Otherwise, draw the two corners and the ring. - else { - context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw); - context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw); - context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw); - } - } - - // Or is the inner ring just a circular arc? - else context.arc(0, 0, r0, a10, a00, cw); - } - - context.closePath(); - - if (buffer) return context = null, buffer + "" || null; - } - - arc.centroid = function() { - var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, - a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2; - return [cos(a) * r, sin(a) * r]; - }; - - arc.innerRadius = function(_) { - return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant(+_), arc) : innerRadius; - }; - - arc.outerRadius = function(_) { - return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant(+_), arc) : outerRadius; - }; - - arc.cornerRadius = function(_) { - return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant(+_), arc) : cornerRadius; - }; - - arc.padRadius = function(_) { - return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant(+_), arc) : padRadius; - }; - - arc.startAngle = function(_) { - return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), arc) : startAngle; - }; - - arc.endAngle = function(_) { - return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), arc) : endAngle; - }; - - arc.padAngle = function(_) { - return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), arc) : padAngle; - }; - - arc.context = function(_) { - return arguments.length ? ((context = _ == null ? null : _), arc) : context; - }; - - return arc; -} diff --git a/node_modules/d3-shape/src/area.js b/node_modules/d3-shape/src/area.js deleted file mode 100644 index 8726630a2ad094450c364002377a783330949125..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/area.js +++ /dev/null @@ -1,111 +0,0 @@ -import {path} from "d3-path"; -import array from "./array.js"; -import constant from "./constant.js"; -import curveLinear from "./curve/linear.js"; -import line from "./line.js"; -import {x as pointX, y as pointY} from "./point.js"; - -export default function(x0, y0, y1) { - var x1 = null, - defined = constant(true), - context = null, - curve = curveLinear, - output = null; - - x0 = typeof x0 === "function" ? x0 : (x0 === undefined) ? pointX : constant(+x0); - y0 = typeof y0 === "function" ? y0 : (y0 === undefined) ? constant(0) : constant(+y0); - y1 = typeof y1 === "function" ? y1 : (y1 === undefined) ? pointY : constant(+y1); - - function area(data) { - var i, - j, - k, - n = (data = array(data)).length, - d, - defined0 = false, - buffer, - x0z = new Array(n), - y0z = new Array(n); - - if (context == null) output = curve(buffer = path()); - - for (i = 0; i <= n; ++i) { - if (!(i < n && defined(d = data[i], i, data)) === defined0) { - if (defined0 = !defined0) { - j = i; - output.areaStart(); - output.lineStart(); - } else { - output.lineEnd(); - output.lineStart(); - for (k = i - 1; k >= j; --k) { - output.point(x0z[k], y0z[k]); - } - output.lineEnd(); - output.areaEnd(); - } - } - if (defined0) { - x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data); - output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]); - } - } - - if (buffer) return output = null, buffer + "" || null; - } - - function arealine() { - return line().defined(defined).curve(curve).context(context); - } - - area.x = function(_) { - return arguments.length ? (x0 = typeof _ === "function" ? _ : constant(+_), x1 = null, area) : x0; - }; - - area.x0 = function(_) { - return arguments.length ? (x0 = typeof _ === "function" ? _ : constant(+_), area) : x0; - }; - - area.x1 = function(_) { - return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : constant(+_), area) : x1; - }; - - area.y = function(_) { - return arguments.length ? (y0 = typeof _ === "function" ? _ : constant(+_), y1 = null, area) : y0; - }; - - area.y0 = function(_) { - return arguments.length ? (y0 = typeof _ === "function" ? _ : constant(+_), area) : y0; - }; - - area.y1 = function(_) { - return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : constant(+_), area) : y1; - }; - - area.lineX0 = - area.lineY0 = function() { - return arealine().x(x0).y(y0); - }; - - area.lineY1 = function() { - return arealine().x(x0).y(y1); - }; - - area.lineX1 = function() { - return arealine().x(x1).y(y0); - }; - - area.defined = function(_) { - return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), area) : defined; - }; - - area.curve = function(_) { - return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve; - }; - - area.context = function(_) { - return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context; - }; - - return area; -} diff --git a/node_modules/d3-shape/src/areaRadial.js b/node_modules/d3-shape/src/areaRadial.js deleted file mode 100644 index 61e01d78ee1cf9c8967c4fcf86628ba32bf1e2a7..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/areaRadial.js +++ /dev/null @@ -1,29 +0,0 @@ -import curveRadial, {curveRadialLinear} from "./curve/radial.js"; -import area from "./area.js"; -import {lineRadial} from "./lineRadial.js"; - -export default function() { - var a = area().curve(curveRadialLinear), - c = a.curve, - x0 = a.lineX0, - x1 = a.lineX1, - y0 = a.lineY0, - y1 = a.lineY1; - - a.angle = a.x, delete a.x; - a.startAngle = a.x0, delete a.x0; - a.endAngle = a.x1, delete a.x1; - a.radius = a.y, delete a.y; - a.innerRadius = a.y0, delete a.y0; - a.outerRadius = a.y1, delete a.y1; - a.lineStartAngle = function() { return lineRadial(x0()); }, delete a.lineX0; - a.lineEndAngle = function() { return lineRadial(x1()); }, delete a.lineX1; - a.lineInnerRadius = function() { return lineRadial(y0()); }, delete a.lineY0; - a.lineOuterRadius = function() { return lineRadial(y1()); }, delete a.lineY1; - - a.curve = function(_) { - return arguments.length ? c(curveRadial(_)) : c()._curve; - }; - - return a; -} diff --git a/node_modules/d3-shape/src/array.js b/node_modules/d3-shape/src/array.js deleted file mode 100644 index 90808ffe6a29bfc57fc047a22222c0451f8935be..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/array.js +++ /dev/null @@ -1,7 +0,0 @@ -export var slice = Array.prototype.slice; - -export default function(x) { - return typeof x === "object" && "length" in x - ? x // Array, TypedArray, NodeList, array-like - : Array.from(x); // Map, Set, iterable, string, or anything else -} diff --git a/node_modules/d3-shape/src/constant.js b/node_modules/d3-shape/src/constant.js deleted file mode 100644 index 6fa95b71b7ba96d403092bd1d97f0bb4c0c9b274..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/constant.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(x) { - return function constant() { - return x; - }; -} diff --git a/node_modules/d3-shape/src/curve/basis.js b/node_modules/d3-shape/src/curve/basis.js deleted file mode 100644 index b186bed5ffa478b82d6a749e1edf7ae2e56d5b65..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/basis.js +++ /dev/null @@ -1,51 +0,0 @@ -export function point(that, x, y) { - that._context.bezierCurveTo( - (2 * that._x0 + that._x1) / 3, - (2 * that._y0 + that._y1) / 3, - (that._x0 + 2 * that._x1) / 3, - (that._y0 + 2 * that._y1) / 3, - (that._x0 + 4 * that._x1 + x) / 6, - (that._y0 + 4 * that._y1 + y) / 6 - ); -} - -export function Basis(context) { - this._context = context; -} - -Basis.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = - this._y0 = this._y1 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 3: point(this, this._x1, this._y1); // proceed - case 2: this._context.lineTo(this._x1, this._y1); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; break; - case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed - default: point(this, x, y); break; - } - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - } -}; - -export default function(context) { - return new Basis(context); -} diff --git a/node_modules/d3-shape/src/curve/basisClosed.js b/node_modules/d3-shape/src/curve/basisClosed.js deleted file mode 100644 index 535df90f02f457924e3ed293fe0c773de0336654..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/basisClosed.js +++ /dev/null @@ -1,52 +0,0 @@ -import noop from "../noop.js"; -import {point} from "./basis.js"; - -function BasisClosed(context) { - this._context = context; -} - -BasisClosed.prototype = { - areaStart: noop, - areaEnd: noop, - lineStart: function() { - this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = - this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 1: { - this._context.moveTo(this._x2, this._y2); - this._context.closePath(); - break; - } - case 2: { - this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3); - this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3); - this._context.closePath(); - break; - } - case 3: { - this.point(this._x2, this._y2); - this.point(this._x3, this._y3); - this.point(this._x4, this._y4); - break; - } - } - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._x2 = x, this._y2 = y; break; - case 1: this._point = 2; this._x3 = x, this._y3 = y; break; - case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break; - default: point(this, x, y); break; - } - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - } -}; - -export default function(context) { - return new BasisClosed(context); -} diff --git a/node_modules/d3-shape/src/curve/basisOpen.js b/node_modules/d3-shape/src/curve/basisOpen.js deleted file mode 100644 index 4f2e5b10191233717a3afcd80aec6a60a46aa3b2..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/basisOpen.js +++ /dev/null @@ -1,39 +0,0 @@ -import {point} from "./basis.js"; - -function BasisOpen(context) { - this._context = context; -} - -BasisOpen.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = - this._y0 = this._y1 = NaN; - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; break; - case 1: this._point = 2; break; - case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break; - case 3: this._point = 4; // proceed - default: point(this, x, y); break; - } - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - } -}; - -export default function(context) { - return new BasisOpen(context); -} diff --git a/node_modules/d3-shape/src/curve/bundle.js b/node_modules/d3-shape/src/curve/bundle.js deleted file mode 100644 index ac1014ebc0324e8a0fed7f8a5082f47f31f3b553..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/bundle.js +++ /dev/null @@ -1,56 +0,0 @@ -import {Basis} from "./basis.js"; - -function Bundle(context, beta) { - this._basis = new Basis(context); - this._beta = beta; -} - -Bundle.prototype = { - lineStart: function() { - this._x = []; - this._y = []; - this._basis.lineStart(); - }, - lineEnd: function() { - var x = this._x, - y = this._y, - j = x.length - 1; - - if (j > 0) { - var x0 = x[0], - y0 = y[0], - dx = x[j] - x0, - dy = y[j] - y0, - i = -1, - t; - - while (++i <= j) { - t = i / j; - this._basis.point( - this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), - this._beta * y[i] + (1 - this._beta) * (y0 + t * dy) - ); - } - } - - this._x = this._y = null; - this._basis.lineEnd(); - }, - point: function(x, y) { - this._x.push(+x); - this._y.push(+y); - } -}; - -export default (function custom(beta) { - - function bundle(context) { - return beta === 1 ? new Basis(context) : new Bundle(context, beta); - } - - bundle.beta = function(beta) { - return custom(+beta); - }; - - return bundle; -})(0.85); diff --git a/node_modules/d3-shape/src/curve/cardinal.js b/node_modules/d3-shape/src/curve/cardinal.js deleted file mode 100644 index 3ab107019ccd54ccf02c7721d7b39c83df1df56f..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/cardinal.js +++ /dev/null @@ -1,61 +0,0 @@ -export function point(that, x, y) { - that._context.bezierCurveTo( - that._x1 + that._k * (that._x2 - that._x0), - that._y1 + that._k * (that._y2 - that._y0), - that._x2 + that._k * (that._x1 - x), - that._y2 + that._k * (that._y1 - y), - that._x2, - that._y2 - ); -} - -export function Cardinal(context, tension) { - this._context = context; - this._k = (1 - tension) / 6; -} - -Cardinal.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 2: this._context.lineTo(this._x2, this._y2); break; - case 3: point(this, this._x1, this._y1); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; this._x1 = x, this._y1 = y; break; - case 2: this._point = 3; // proceed - default: point(this, x, y); break; - } - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -export default (function custom(tension) { - - function cardinal(context) { - return new Cardinal(context, tension); - } - - cardinal.tension = function(tension) { - return custom(+tension); - }; - - return cardinal; -})(0); diff --git a/node_modules/d3-shape/src/curve/cardinalClosed.js b/node_modules/d3-shape/src/curve/cardinalClosed.js deleted file mode 100644 index acef52e3094ba4c64295d2381ab8a4117a69dd1a..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/cardinalClosed.js +++ /dev/null @@ -1,61 +0,0 @@ -import noop from "../noop.js"; -import {point} from "./cardinal.js"; - -export function CardinalClosed(context, tension) { - this._context = context; - this._k = (1 - tension) / 6; -} - -CardinalClosed.prototype = { - areaStart: noop, - areaEnd: noop, - lineStart: function() { - this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = - this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 1: { - this._context.moveTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 2: { - this._context.lineTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 3: { - this.point(this._x3, this._y3); - this.point(this._x4, this._y4); - this.point(this._x5, this._y5); - break; - } - } - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._x3 = x, this._y3 = y; break; - case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; - case 2: this._point = 3; this._x5 = x, this._y5 = y; break; - default: point(this, x, y); break; - } - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -export default (function custom(tension) { - - function cardinal(context) { - return new CardinalClosed(context, tension); - } - - cardinal.tension = function(tension) { - return custom(+tension); - }; - - return cardinal; -})(0); diff --git a/node_modules/d3-shape/src/curve/cardinalOpen.js b/node_modules/d3-shape/src/curve/cardinalOpen.js deleted file mode 100644 index e7368419f434babc307950e7058e356d48281843..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/cardinalOpen.js +++ /dev/null @@ -1,49 +0,0 @@ -import {point} from "./cardinal.js"; - -export function CardinalOpen(context, tension) { - this._context = context; - this._k = (1 - tension) / 6; -} - -CardinalOpen.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; break; - case 1: this._point = 2; break; - case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; - case 3: this._point = 4; // proceed - default: point(this, x, y); break; - } - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -export default (function custom(tension) { - - function cardinal(context) { - return new CardinalOpen(context, tension); - } - - cardinal.tension = function(tension) { - return custom(+tension); - }; - - return cardinal; -})(0); diff --git a/node_modules/d3-shape/src/curve/catmullRom.js b/node_modules/d3-shape/src/curve/catmullRom.js deleted file mode 100644 index 643d10f337f8f573de3b216842ea8cd32895a971..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/catmullRom.js +++ /dev/null @@ -1,88 +0,0 @@ -import {epsilon} from "../math.js"; -import {Cardinal} from "./cardinal.js"; - -export function point(that, x, y) { - var x1 = that._x1, - y1 = that._y1, - x2 = that._x2, - y2 = that._y2; - - if (that._l01_a > epsilon) { - var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, - n = 3 * that._l01_a * (that._l01_a + that._l12_a); - x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n; - y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n; - } - - if (that._l23_a > epsilon) { - var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, - m = 3 * that._l23_a * (that._l23_a + that._l12_a); - x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m; - y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m; - } - - that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2); -} - -function CatmullRom(context, alpha) { - this._context = context; - this._alpha = alpha; -} - -CatmullRom.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._l01_a = this._l12_a = this._l23_a = - this._l01_2a = this._l12_2a = this._l23_2a = - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 2: this._context.lineTo(this._x2, this._y2); break; - case 3: this.point(this._x2, this._y2); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - - if (this._point) { - var x23 = this._x2 - x, - y23 = this._y2 - y; - this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); - } - - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; break; - case 2: this._point = 3; // proceed - default: point(this, x, y); break; - } - - this._l01_a = this._l12_a, this._l12_a = this._l23_a; - this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -export default (function custom(alpha) { - - function catmullRom(context) { - return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0); - } - - catmullRom.alpha = function(alpha) { - return custom(+alpha); - }; - - return catmullRom; -})(0.5); diff --git a/node_modules/d3-shape/src/curve/catmullRomClosed.js b/node_modules/d3-shape/src/curve/catmullRomClosed.js deleted file mode 100644 index 6c6b965588909fb427f12cc2ad6953fcb0cbfda2..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/catmullRomClosed.js +++ /dev/null @@ -1,74 +0,0 @@ -import {CardinalClosed} from "./cardinalClosed.js"; -import noop from "../noop.js"; -import {point} from "./catmullRom.js"; - -function CatmullRomClosed(context, alpha) { - this._context = context; - this._alpha = alpha; -} - -CatmullRomClosed.prototype = { - areaStart: noop, - areaEnd: noop, - lineStart: function() { - this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = - this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; - this._l01_a = this._l12_a = this._l23_a = - this._l01_2a = this._l12_2a = this._l23_2a = - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 1: { - this._context.moveTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 2: { - this._context.lineTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 3: { - this.point(this._x3, this._y3); - this.point(this._x4, this._y4); - this.point(this._x5, this._y5); - break; - } - } - }, - point: function(x, y) { - x = +x, y = +y; - - if (this._point) { - var x23 = this._x2 - x, - y23 = this._y2 - y; - this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); - } - - switch (this._point) { - case 0: this._point = 1; this._x3 = x, this._y3 = y; break; - case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; - case 2: this._point = 3; this._x5 = x, this._y5 = y; break; - default: point(this, x, y); break; - } - - this._l01_a = this._l12_a, this._l12_a = this._l23_a; - this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -export default (function custom(alpha) { - - function catmullRom(context) { - return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0); - } - - catmullRom.alpha = function(alpha) { - return custom(+alpha); - }; - - return catmullRom; -})(0.5); diff --git a/node_modules/d3-shape/src/curve/catmullRomOpen.js b/node_modules/d3-shape/src/curve/catmullRomOpen.js deleted file mode 100644 index 7e4c5ca7afb4403e2dfea16e40166cbec819f3d8..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/catmullRomOpen.js +++ /dev/null @@ -1,62 +0,0 @@ -import {CardinalOpen} from "./cardinalOpen.js"; -import {point} from "./catmullRom.js"; - -function CatmullRomOpen(context, alpha) { - this._context = context; - this._alpha = alpha; -} - -CatmullRomOpen.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._l01_a = this._l12_a = this._l23_a = - this._l01_2a = this._l12_2a = this._l23_2a = - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - - if (this._point) { - var x23 = this._x2 - x, - y23 = this._y2 - y; - this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); - } - - switch (this._point) { - case 0: this._point = 1; break; - case 1: this._point = 2; break; - case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; - case 3: this._point = 4; // proceed - default: point(this, x, y); break; - } - - this._l01_a = this._l12_a, this._l12_a = this._l23_a; - this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -export default (function custom(alpha) { - - function catmullRom(context) { - return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0); - } - - catmullRom.alpha = function(alpha) { - return custom(+alpha); - }; - - return catmullRom; -})(0.5); diff --git a/node_modules/d3-shape/src/curve/linear.js b/node_modules/d3-shape/src/curve/linear.js deleted file mode 100644 index 62454931e53b77d5ccf92a476aad49e4891cca26..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/linear.js +++ /dev/null @@ -1,31 +0,0 @@ -function Linear(context) { - this._context = context; -} - -Linear.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; // proceed - default: this._context.lineTo(x, y); break; - } - } -}; - -export default function(context) { - return new Linear(context); -} diff --git a/node_modules/d3-shape/src/curve/linearClosed.js b/node_modules/d3-shape/src/curve/linearClosed.js deleted file mode 100644 index e25606ff7af2a04ead269244f6b5acbad6d4f6f2..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/linearClosed.js +++ /dev/null @@ -1,25 +0,0 @@ -import noop from "../noop.js"; - -function LinearClosed(context) { - this._context = context; -} - -LinearClosed.prototype = { - areaStart: noop, - areaEnd: noop, - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._point) this._context.closePath(); - }, - point: function(x, y) { - x = +x, y = +y; - if (this._point) this._context.lineTo(x, y); - else this._point = 1, this._context.moveTo(x, y); - } -}; - -export default function(context) { - return new LinearClosed(context); -} diff --git a/node_modules/d3-shape/src/curve/monotone.js b/node_modules/d3-shape/src/curve/monotone.js deleted file mode 100644 index 2599031ccd6f425d2fa6d61b1db9b0803aa38096..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/monotone.js +++ /dev/null @@ -1,104 +0,0 @@ -function sign(x) { - return x < 0 ? -1 : 1; -} - -// Calculate the slopes of the tangents (Hermite-type interpolation) based on -// the following paper: Steffen, M. 1990. A Simple Method for Monotonic -// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO. -// NOV(II), P. 443, 1990. -function slope3(that, x2, y2) { - var h0 = that._x1 - that._x0, - h1 = x2 - that._x1, - s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), - s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), - p = (s0 * h1 + s1 * h0) / (h0 + h1); - return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0; -} - -// Calculate a one-sided slope. -function slope2(that, t) { - var h = that._x1 - that._x0; - return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t; -} - -// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations -// "you can express cubic Hermite interpolation in terms of cubic Bézier curves -// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1". -function point(that, t0, t1) { - var x0 = that._x0, - y0 = that._y0, - x1 = that._x1, - y1 = that._y1, - dx = (x1 - x0) / 3; - that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1); -} - -function MonotoneX(context) { - this._context = context; -} - -MonotoneX.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = - this._y0 = this._y1 = - this._t0 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 2: this._context.lineTo(this._x1, this._y1); break; - case 3: point(this, this._t0, slope2(this, this._t0)); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - var t1 = NaN; - - x = +x, y = +y; - if (x === this._x1 && y === this._y1) return; // Ignore coincident points. - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; break; - case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break; - default: point(this, this._t0, t1 = slope3(this, x, y)); break; - } - - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - this._t0 = t1; - } -} - -function MonotoneY(context) { - this._context = new ReflectContext(context); -} - -(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) { - MonotoneX.prototype.point.call(this, y, x); -}; - -function ReflectContext(context) { - this._context = context; -} - -ReflectContext.prototype = { - moveTo: function(x, y) { this._context.moveTo(y, x); }, - closePath: function() { this._context.closePath(); }, - lineTo: function(x, y) { this._context.lineTo(y, x); }, - bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); } -}; - -export function monotoneX(context) { - return new MonotoneX(context); -} - -export function monotoneY(context) { - return new MonotoneY(context); -} diff --git a/node_modules/d3-shape/src/curve/natural.js b/node_modules/d3-shape/src/curve/natural.js deleted file mode 100644 index d51eb513527f181e23c1e731c20b417b9a0a05fe..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/natural.js +++ /dev/null @@ -1,65 +0,0 @@ -function Natural(context) { - this._context = context; -} - -Natural.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x = []; - this._y = []; - }, - lineEnd: function() { - var x = this._x, - y = this._y, - n = x.length; - - if (n) { - this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]); - if (n === 2) { - this._context.lineTo(x[1], y[1]); - } else { - var px = controlPoints(x), - py = controlPoints(y); - for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) { - this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]); - } - } - } - - if (this._line || (this._line !== 0 && n === 1)) this._context.closePath(); - this._line = 1 - this._line; - this._x = this._y = null; - }, - point: function(x, y) { - this._x.push(+x); - this._y.push(+y); - } -}; - -// See https://www.particleincell.com/2012/bezier-splines/ for derivation. -function controlPoints(x) { - var i, - n = x.length - 1, - m, - a = new Array(n), - b = new Array(n), - r = new Array(n); - a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1]; - for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1]; - a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n]; - for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1]; - a[n - 1] = r[n - 1] / b[n - 1]; - for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i]; - b[n - 1] = (x[n] + a[n - 1]) / 2; - for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1]; - return [a, b]; -} - -export default function(context) { - return new Natural(context); -} diff --git a/node_modules/d3-shape/src/curve/radial.js b/node_modules/d3-shape/src/curve/radial.js deleted file mode 100644 index 730c989f98cdcde1d8d554939600e5c4676e349f..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/radial.js +++ /dev/null @@ -1,36 +0,0 @@ -import curveLinear from "./linear.js"; - -export var curveRadialLinear = curveRadial(curveLinear); - -function Radial(curve) { - this._curve = curve; -} - -Radial.prototype = { - areaStart: function() { - this._curve.areaStart(); - }, - areaEnd: function() { - this._curve.areaEnd(); - }, - lineStart: function() { - this._curve.lineStart(); - }, - lineEnd: function() { - this._curve.lineEnd(); - }, - point: function(a, r) { - this._curve.point(r * Math.sin(a), r * -Math.cos(a)); - } -}; - -export default function curveRadial(curve) { - - function radial(context) { - return new Radial(curve(context)); - } - - radial._curve = curve; - - return radial; -} diff --git a/node_modules/d3-shape/src/curve/step.js b/node_modules/d3-shape/src/curve/step.js deleted file mode 100644 index e9fb78ff52c008dbdefbfff475edb6dcd85cb623..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/curve/step.js +++ /dev/null @@ -1,53 +0,0 @@ -function Step(context, t) { - this._context = context; - this._t = t; -} - -Step.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x = this._y = NaN; - this._point = 0; - }, - lineEnd: function() { - if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y); - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; // proceed - default: { - if (this._t <= 0) { - this._context.lineTo(this._x, y); - this._context.lineTo(x, y); - } else { - var x1 = this._x * (1 - this._t) + x * this._t; - this._context.lineTo(x1, this._y); - this._context.lineTo(x1, y); - } - break; - } - } - this._x = x, this._y = y; - } -}; - -export default function(context) { - return new Step(context, 0.5); -} - -export function stepBefore(context) { - return new Step(context, 0); -} - -export function stepAfter(context) { - return new Step(context, 1); -} diff --git a/node_modules/d3-shape/src/descending.js b/node_modules/d3-shape/src/descending.js deleted file mode 100644 index a4e2d7fbee0f0d7b9c8ac58e20d61f9f3cd4f2fe..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/descending.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(a, b) { - return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; -} diff --git a/node_modules/d3-shape/src/identity.js b/node_modules/d3-shape/src/identity.js deleted file mode 100644 index ca161abe8439bb37dc5844dfcc0cce182865fb57..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/identity.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(d) { - return d; -} diff --git a/node_modules/d3-shape/src/index.js b/node_modules/d3-shape/src/index.js deleted file mode 100644 index aca91a561518fb94534f641b367c9b912c2268ff..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/index.js +++ /dev/null @@ -1,46 +0,0 @@ -export {default as arc} from "./arc.js"; -export {default as area} from "./area.js"; -export {default as line} from "./line.js"; -export {default as pie} from "./pie.js"; -export {default as areaRadial, default as radialArea} from "./areaRadial.js"; // Note: radialArea is deprecated! -export {default as lineRadial, default as radialLine} from "./lineRadial.js"; // Note: radialLine is deprecated! -export {default as pointRadial} from "./pointRadial.js"; -export {linkHorizontal, linkVertical, linkRadial} from "./link/index.js"; - -export {default as symbol, symbols} from "./symbol.js"; -export {default as symbolCircle} from "./symbol/circle.js"; -export {default as symbolCross} from "./symbol/cross.js"; -export {default as symbolDiamond} from "./symbol/diamond.js"; -export {default as symbolSquare} from "./symbol/square.js"; -export {default as symbolStar} from "./symbol/star.js"; -export {default as symbolTriangle} from "./symbol/triangle.js"; -export {default as symbolWye} from "./symbol/wye.js"; - -export {default as curveBasisClosed} from "./curve/basisClosed.js"; -export {default as curveBasisOpen} from "./curve/basisOpen.js"; -export {default as curveBasis} from "./curve/basis.js"; -export {default as curveBundle} from "./curve/bundle.js"; -export {default as curveCardinalClosed} from "./curve/cardinalClosed.js"; -export {default as curveCardinalOpen} from "./curve/cardinalOpen.js"; -export {default as curveCardinal} from "./curve/cardinal.js"; -export {default as curveCatmullRomClosed} from "./curve/catmullRomClosed.js"; -export {default as curveCatmullRomOpen} from "./curve/catmullRomOpen.js"; -export {default as curveCatmullRom} from "./curve/catmullRom.js"; -export {default as curveLinearClosed} from "./curve/linearClosed.js"; -export {default as curveLinear} from "./curve/linear.js"; -export {monotoneX as curveMonotoneX, monotoneY as curveMonotoneY} from "./curve/monotone.js"; -export {default as curveNatural} from "./curve/natural.js"; -export {default as curveStep, stepAfter as curveStepAfter, stepBefore as curveStepBefore} from "./curve/step.js"; - -export {default as stack} from "./stack.js"; -export {default as stackOffsetExpand} from "./offset/expand.js"; -export {default as stackOffsetDiverging} from "./offset/diverging.js"; -export {default as stackOffsetNone} from "./offset/none.js"; -export {default as stackOffsetSilhouette} from "./offset/silhouette.js"; -export {default as stackOffsetWiggle} from "./offset/wiggle.js"; -export {default as stackOrderAppearance} from "./order/appearance.js"; -export {default as stackOrderAscending} from "./order/ascending.js"; -export {default as stackOrderDescending} from "./order/descending.js"; -export {default as stackOrderInsideOut} from "./order/insideOut.js"; -export {default as stackOrderNone} from "./order/none.js"; -export {default as stackOrderReverse} from "./order/reverse.js"; diff --git a/node_modules/d3-shape/src/line.js b/node_modules/d3-shape/src/line.js deleted file mode 100644 index 1ad92b23d9e72e9fa4a20a0a9e6c828f354f5af5..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/line.js +++ /dev/null @@ -1,57 +0,0 @@ -import {path} from "d3-path"; -import array from "./array.js"; -import constant from "./constant.js"; -import curveLinear from "./curve/linear.js"; -import {x as pointX, y as pointY} from "./point.js"; - -export default function(x, y) { - var defined = constant(true), - context = null, - curve = curveLinear, - output = null; - - x = typeof x === "function" ? x : (x === undefined) ? pointX : constant(x); - y = typeof y === "function" ? y : (y === undefined) ? pointY : constant(y); - - function line(data) { - var i, - n = (data = array(data)).length, - d, - defined0 = false, - buffer; - - if (context == null) output = curve(buffer = path()); - - for (i = 0; i <= n; ++i) { - if (!(i < n && defined(d = data[i], i, data)) === defined0) { - if (defined0 = !defined0) output.lineStart(); - else output.lineEnd(); - } - if (defined0) output.point(+x(d, i, data), +y(d, i, data)); - } - - if (buffer) return output = null, buffer + "" || null; - } - - line.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : constant(+_), line) : x; - }; - - line.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : constant(+_), line) : y; - }; - - line.defined = function(_) { - return arguments.length ? (defined = typeof _ === "function" ? _ : constant(!!_), line) : defined; - }; - - line.curve = function(_) { - return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve; - }; - - line.context = function(_) { - return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context; - }; - - return line; -} diff --git a/node_modules/d3-shape/src/lineRadial.js b/node_modules/d3-shape/src/lineRadial.js deleted file mode 100644 index beaf57735a3674cd7897c1ef9706db1e7c3291a0..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/lineRadial.js +++ /dev/null @@ -1,19 +0,0 @@ -import curveRadial, {curveRadialLinear} from "./curve/radial.js"; -import line from "./line.js"; - -export function lineRadial(l) { - var c = l.curve; - - l.angle = l.x, delete l.x; - l.radius = l.y, delete l.y; - - l.curve = function(_) { - return arguments.length ? c(curveRadial(_)) : c()._curve; - }; - - return l; -} - -export default function() { - return lineRadial(line().curve(curveRadialLinear)); -} diff --git a/node_modules/d3-shape/src/link/index.js b/node_modules/d3-shape/src/link/index.js deleted file mode 100644 index b3075d306ea13a5a4d39872e176ad874ca42edfb..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/link/index.js +++ /dev/null @@ -1,84 +0,0 @@ -import {path} from "d3-path"; -import {slice} from "../array.js"; -import constant from "../constant.js"; -import {x as pointX, y as pointY} from "../point.js"; -import pointRadial from "../pointRadial.js"; - -function linkSource(d) { - return d.source; -} - -function linkTarget(d) { - return d.target; -} - -function link(curve) { - var source = linkSource, - target = linkTarget, - x = pointX, - y = pointY, - context = null; - - function link() { - var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv); - if (!context) context = buffer = path(); - curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv)); - if (buffer) return context = null, buffer + "" || null; - } - - link.source = function(_) { - return arguments.length ? (source = _, link) : source; - }; - - link.target = function(_) { - return arguments.length ? (target = _, link) : target; - }; - - link.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : constant(+_), link) : x; - }; - - link.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : constant(+_), link) : y; - }; - - link.context = function(_) { - return arguments.length ? ((context = _ == null ? null : _), link) : context; - }; - - return link; -} - -function curveHorizontal(context, x0, y0, x1, y1) { - context.moveTo(x0, y0); - context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1); -} - -function curveVertical(context, x0, y0, x1, y1) { - context.moveTo(x0, y0); - context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1); -} - -function curveRadial(context, x0, y0, x1, y1) { - var p0 = pointRadial(x0, y0), - p1 = pointRadial(x0, y0 = (y0 + y1) / 2), - p2 = pointRadial(x1, y0), - p3 = pointRadial(x1, y1); - context.moveTo(p0[0], p0[1]); - context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]); -} - -export function linkHorizontal() { - return link(curveHorizontal); -} - -export function linkVertical() { - return link(curveVertical); -} - -export function linkRadial() { - var l = link(curveRadial); - l.angle = l.x, delete l.x; - l.radius = l.y, delete l.y; - return l; -} diff --git a/node_modules/d3-shape/src/math.js b/node_modules/d3-shape/src/math.js deleted file mode 100644 index 131af621d1aeae10d0ba65eb40a80c63ef4726bc..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/math.js +++ /dev/null @@ -1,20 +0,0 @@ -export var abs = Math.abs; -export var atan2 = Math.atan2; -export var cos = Math.cos; -export var max = Math.max; -export var min = Math.min; -export var sin = Math.sin; -export var sqrt = Math.sqrt; - -export var epsilon = 1e-12; -export var pi = Math.PI; -export var halfPi = pi / 2; -export var tau = 2 * pi; - -export function acos(x) { - return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); -} - -export function asin(x) { - return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x); -} diff --git a/node_modules/d3-shape/src/noop.js b/node_modules/d3-shape/src/noop.js deleted file mode 100644 index 6ab80bc8d76f773adb2ad898b2ebf98afca9e6f0..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/noop.js +++ /dev/null @@ -1 +0,0 @@ -export default function() {} diff --git a/node_modules/d3-shape/src/offset/diverging.js b/node_modules/d3-shape/src/offset/diverging.js deleted file mode 100644 index 45a5fff6ea7a9d4011e8fe5c62005092e78e299a..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/offset/diverging.js +++ /dev/null @@ -1,14 +0,0 @@ -export default function(series, order) { - if (!((n = series.length) > 0)) return; - for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) { - for (yp = yn = 0, i = 0; i < n; ++i) { - if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) { - d[0] = yp, d[1] = yp += dy; - } else if (dy < 0) { - d[1] = yn, d[0] = yn += dy; - } else { - d[0] = 0, d[1] = dy; - } - } - } -} diff --git a/node_modules/d3-shape/src/offset/expand.js b/node_modules/d3-shape/src/offset/expand.js deleted file mode 100644 index 965bea1e9d9d0337fc5c81f706c63aeb01f87fce..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/offset/expand.js +++ /dev/null @@ -1,10 +0,0 @@ -import none from "./none.js"; - -export default function(series, order) { - if (!((n = series.length) > 0)) return; - for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) { - for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0; - if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y; - } - none(series, order); -} diff --git a/node_modules/d3-shape/src/offset/none.js b/node_modules/d3-shape/src/offset/none.js deleted file mode 100644 index d8e11dcbc7c81f5f5f0acfc3aaf961cdf77571e6..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/offset/none.js +++ /dev/null @@ -1,9 +0,0 @@ -export default function(series, order) { - if (!((n = series.length) > 1)) return; - for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) { - s0 = s1, s1 = series[order[i]]; - for (j = 0; j < m; ++j) { - s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1]; - } - } -} diff --git a/node_modules/d3-shape/src/offset/silhouette.js b/node_modules/d3-shape/src/offset/silhouette.js deleted file mode 100644 index 87829becd8628b49de766b5fc04eee32b1d637e4..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/offset/silhouette.js +++ /dev/null @@ -1,10 +0,0 @@ -import none from "./none.js"; - -export default function(series, order) { - if (!((n = series.length) > 0)) return; - for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) { - for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0; - s0[j][1] += s0[j][0] = -y / 2; - } - none(series, order); -} diff --git a/node_modules/d3-shape/src/offset/wiggle.js b/node_modules/d3-shape/src/offset/wiggle.js deleted file mode 100644 index 8db717cd3138cc8aaeacd22a3c6bc15e02d1ab5f..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/offset/wiggle.js +++ /dev/null @@ -1,24 +0,0 @@ -import none from "./none.js"; - -export default function(series, order) { - if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return; - for (var y = 0, j = 1, s0, m, n; j < m; ++j) { - for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) { - var si = series[order[i]], - sij0 = si[j][1] || 0, - sij1 = si[j - 1][1] || 0, - s3 = (sij0 - sij1) / 2; - for (var k = 0; k < i; ++k) { - var sk = series[order[k]], - skj0 = sk[j][1] || 0, - skj1 = sk[j - 1][1] || 0; - s3 += skj0 - skj1; - } - s1 += sij0, s2 += s3 * sij0; - } - s0[j - 1][1] += s0[j - 1][0] = y; - if (s1) y -= s2 / s1; - } - s0[j - 1][1] += s0[j - 1][0] = y; - none(series, order); -} diff --git a/node_modules/d3-shape/src/order/appearance.js b/node_modules/d3-shape/src/order/appearance.js deleted file mode 100644 index e052924bfd655ed5ce924c91497473e569382478..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/order/appearance.js +++ /dev/null @@ -1,12 +0,0 @@ -import none from "./none.js"; - -export default function(series) { - var peaks = series.map(peak); - return none(series).sort(function(a, b) { return peaks[a] - peaks[b]; }); -} - -function peak(series) { - var i = -1, j = 0, n = series.length, vi, vj = -Infinity; - while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i; - return j; -} diff --git a/node_modules/d3-shape/src/order/ascending.js b/node_modules/d3-shape/src/order/ascending.js deleted file mode 100644 index e0d28e3ea0fb96c237b6b6e0a26b0e19a3c8e62a..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/order/ascending.js +++ /dev/null @@ -1,12 +0,0 @@ -import none from "./none.js"; - -export default function(series) { - var sums = series.map(sum); - return none(series).sort(function(a, b) { return sums[a] - sums[b]; }); -} - -export function sum(series) { - var s = 0, i = -1, n = series.length, v; - while (++i < n) if (v = +series[i][1]) s += v; - return s; -} diff --git a/node_modules/d3-shape/src/order/descending.js b/node_modules/d3-shape/src/order/descending.js deleted file mode 100644 index dd272014d0883fd1a245dff948d77e34c094a733..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/order/descending.js +++ /dev/null @@ -1,5 +0,0 @@ -import ascending from "./ascending.js"; - -export default function(series) { - return ascending(series).reverse(); -} diff --git a/node_modules/d3-shape/src/order/insideOut.js b/node_modules/d3-shape/src/order/insideOut.js deleted file mode 100644 index b0b2abdabdd64f6d13c78edb28699c5a61b622c4..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/order/insideOut.js +++ /dev/null @@ -1,27 +0,0 @@ -import appearance from "./appearance.js"; -import {sum} from "./ascending.js"; - -export default function(series) { - var n = series.length, - i, - j, - sums = series.map(sum), - order = appearance(series), - top = 0, - bottom = 0, - tops = [], - bottoms = []; - - for (i = 0; i < n; ++i) { - j = order[i]; - if (top < bottom) { - top += sums[j]; - tops.push(j); - } else { - bottom += sums[j]; - bottoms.push(j); - } - } - - return bottoms.reverse().concat(tops); -} diff --git a/node_modules/d3-shape/src/order/none.js b/node_modules/d3-shape/src/order/none.js deleted file mode 100644 index b0d7d6f598bfb8c1bcda31004038fdf345303053..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/order/none.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(series) { - var n = series.length, o = new Array(n); - while (--n >= 0) o[n] = n; - return o; -} diff --git a/node_modules/d3-shape/src/order/reverse.js b/node_modules/d3-shape/src/order/reverse.js deleted file mode 100644 index 8380ca04490f23c4ff09a80c5ed8063e1768e72b..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/order/reverse.js +++ /dev/null @@ -1,5 +0,0 @@ -import none from "./none.js"; - -export default function(series) { - return none(series).reverse(); -} diff --git a/node_modules/d3-shape/src/pie.js b/node_modules/d3-shape/src/pie.js deleted file mode 100644 index 6748f45fb6ad3da91e7a84da366b7837b6724114..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/pie.js +++ /dev/null @@ -1,80 +0,0 @@ -import array from "./array.js"; -import constant from "./constant.js"; -import descending from "./descending.js"; -import identity from "./identity.js"; -import {tau} from "./math.js"; - -export default function() { - var value = identity, - sortValues = descending, - sort = null, - startAngle = constant(0), - endAngle = constant(tau), - padAngle = constant(0); - - function pie(data) { - var i, - n = (data = array(data)).length, - j, - k, - sum = 0, - index = new Array(n), - arcs = new Array(n), - a0 = +startAngle.apply(this, arguments), - da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)), - a1, - p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)), - pa = p * (da < 0 ? -1 : 1), - v; - - for (i = 0; i < n; ++i) { - if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) { - sum += v; - } - } - - // Optionally sort the arcs by previously-computed values or by data. - if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); }); - else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); }); - - // Compute the arcs! They are stored in the original data's order. - for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) { - j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = { - data: data[j], - index: i, - value: v, - startAngle: a0, - endAngle: a1, - padAngle: p - }; - } - - return arcs; - } - - pie.value = function(_) { - return arguments.length ? (value = typeof _ === "function" ? _ : constant(+_), pie) : value; - }; - - pie.sortValues = function(_) { - return arguments.length ? (sortValues = _, sort = null, pie) : sortValues; - }; - - pie.sort = function(_) { - return arguments.length ? (sort = _, sortValues = null, pie) : sort; - }; - - pie.startAngle = function(_) { - return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant(+_), pie) : startAngle; - }; - - pie.endAngle = function(_) { - return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant(+_), pie) : endAngle; - }; - - pie.padAngle = function(_) { - return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant(+_), pie) : padAngle; - }; - - return pie; -} diff --git a/node_modules/d3-shape/src/point.js b/node_modules/d3-shape/src/point.js deleted file mode 100644 index c34525730a9e118b1319e3e64e2b6d68fac2b405..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/point.js +++ /dev/null @@ -1,7 +0,0 @@ -export function x(p) { - return p[0]; -} - -export function y(p) { - return p[1]; -} diff --git a/node_modules/d3-shape/src/pointRadial.js b/node_modules/d3-shape/src/pointRadial.js deleted file mode 100644 index 1cccb705a8c93222bf5383ea7303ff508ca3664a..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/pointRadial.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(x, y) { - return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)]; -} diff --git a/node_modules/d3-shape/src/stack.js b/node_modules/d3-shape/src/stack.js deleted file mode 100644 index c4d30b1b2b8169976985699e9acaad1d86918bca..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/stack.js +++ /dev/null @@ -1,58 +0,0 @@ -import array from "./array.js"; -import constant from "./constant.js"; -import offsetNone from "./offset/none.js"; -import orderNone from "./order/none.js"; - -function stackValue(d, key) { - return d[key]; -} - -function stackSeries(key) { - const series = []; - series.key = key; - return series; -} - -export default function() { - var keys = constant([]), - order = orderNone, - offset = offsetNone, - value = stackValue; - - function stack(data) { - var sz = Array.from(keys.apply(this, arguments), stackSeries), - i, n = sz.length, j = -1, - oz; - - for (const d of data) { - for (i = 0, ++j; i < n; ++i) { - (sz[i][j] = [0, +value(d, sz[i].key, j, data)]).data = d; - } - } - - for (i = 0, oz = array(order(sz)); i < n; ++i) { - sz[oz[i]].index = i; - } - - offset(sz, oz); - return sz; - } - - stack.keys = function(_) { - return arguments.length ? (keys = typeof _ === "function" ? _ : constant(Array.from(_)), stack) : keys; - }; - - stack.value = function(_) { - return arguments.length ? (value = typeof _ === "function" ? _ : constant(+_), stack) : value; - }; - - stack.order = function(_) { - return arguments.length ? (order = _ == null ? orderNone : typeof _ === "function" ? _ : constant(Array.from(_)), stack) : order; - }; - - stack.offset = function(_) { - return arguments.length ? (offset = _ == null ? offsetNone : _, stack) : offset; - }; - - return stack; -} diff --git a/node_modules/d3-shape/src/symbol.js b/node_modules/d3-shape/src/symbol.js deleted file mode 100644 index 749b4923377fae20c1d6377dfeae1869ab68755a..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/symbol.js +++ /dev/null @@ -1,46 +0,0 @@ -import {path} from "d3-path"; -import circle from "./symbol/circle.js"; -import cross from "./symbol/cross.js"; -import diamond from "./symbol/diamond.js"; -import star from "./symbol/star.js"; -import square from "./symbol/square.js"; -import triangle from "./symbol/triangle.js"; -import wye from "./symbol/wye.js"; -import constant from "./constant.js"; - -export var symbols = [ - circle, - cross, - diamond, - square, - star, - triangle, - wye -]; - -export default function(type, size) { - var context = null; - type = typeof type === "function" ? type : constant(type || circle); - size = typeof size === "function" ? size : constant(size === undefined ? 64 : +size); - - function symbol() { - var buffer; - if (!context) context = buffer = path(); - type.apply(this, arguments).draw(context, +size.apply(this, arguments)); - if (buffer) return context = null, buffer + "" || null; - } - - symbol.type = function(_) { - return arguments.length ? (type = typeof _ === "function" ? _ : constant(_), symbol) : type; - }; - - symbol.size = function(_) { - return arguments.length ? (size = typeof _ === "function" ? _ : constant(+_), symbol) : size; - }; - - symbol.context = function(_) { - return arguments.length ? (context = _ == null ? null : _, symbol) : context; - }; - - return symbol; -} diff --git a/node_modules/d3-shape/src/symbol/circle.js b/node_modules/d3-shape/src/symbol/circle.js deleted file mode 100644 index 46536511bcf728e33b2823c3bfa217f917c601f6..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/symbol/circle.js +++ /dev/null @@ -1,9 +0,0 @@ -import {pi, tau} from "../math.js"; - -export default { - draw: function(context, size) { - var r = Math.sqrt(size / pi); - context.moveTo(r, 0); - context.arc(0, 0, r, 0, tau); - } -}; diff --git a/node_modules/d3-shape/src/symbol/cross.js b/node_modules/d3-shape/src/symbol/cross.js deleted file mode 100644 index a282f8054cfb1861c473e02a5440164e51663e09..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/symbol/cross.js +++ /dev/null @@ -1,18 +0,0 @@ -export default { - draw: function(context, size) { - var r = Math.sqrt(size / 5) / 2; - context.moveTo(-3 * r, -r); - context.lineTo(-r, -r); - context.lineTo(-r, -3 * r); - context.lineTo(r, -3 * r); - context.lineTo(r, -r); - context.lineTo(3 * r, -r); - context.lineTo(3 * r, r); - context.lineTo(r, r); - context.lineTo(r, 3 * r); - context.lineTo(-r, 3 * r); - context.lineTo(-r, r); - context.lineTo(-3 * r, r); - context.closePath(); - } -}; diff --git a/node_modules/d3-shape/src/symbol/diamond.js b/node_modules/d3-shape/src/symbol/diamond.js deleted file mode 100644 index 9f4ff1af5dc0d5499e2b841e31c937ddb3b02d54..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/symbol/diamond.js +++ /dev/null @@ -1,14 +0,0 @@ -var tan30 = Math.sqrt(1 / 3), - tan30_2 = tan30 * 2; - -export default { - draw: function(context, size) { - var y = Math.sqrt(size / tan30_2), - x = y * tan30; - context.moveTo(0, -y); - context.lineTo(x, 0); - context.lineTo(0, y); - context.lineTo(-x, 0); - context.closePath(); - } -}; diff --git a/node_modules/d3-shape/src/symbol/square.js b/node_modules/d3-shape/src/symbol/square.js deleted file mode 100644 index 10beccd57c24ba881d2c1becbc50ea262f6a731d..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/symbol/square.js +++ /dev/null @@ -1,7 +0,0 @@ -export default { - draw: function(context, size) { - var w = Math.sqrt(size), - x = -w / 2; - context.rect(x, x, w, w); - } -}; diff --git a/node_modules/d3-shape/src/symbol/star.js b/node_modules/d3-shape/src/symbol/star.js deleted file mode 100644 index c3560c3511d1789b2a03145333893d5c32702207..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/symbol/star.js +++ /dev/null @@ -1,24 +0,0 @@ -import {pi, tau} from "../math.js"; - -var ka = 0.89081309152928522810, - kr = Math.sin(pi / 10) / Math.sin(7 * pi / 10), - kx = Math.sin(tau / 10) * kr, - ky = -Math.cos(tau / 10) * kr; - -export default { - draw: function(context, size) { - var r = Math.sqrt(size * ka), - x = kx * r, - y = ky * r; - context.moveTo(0, -r); - context.lineTo(x, y); - for (var i = 1; i < 5; ++i) { - var a = tau * i / 5, - c = Math.cos(a), - s = Math.sin(a); - context.lineTo(s * r, -c * r); - context.lineTo(c * x - s * y, s * x + c * y); - } - context.closePath(); - } -}; diff --git a/node_modules/d3-shape/src/symbol/triangle.js b/node_modules/d3-shape/src/symbol/triangle.js deleted file mode 100644 index a323d20086d3f94848a626585e7bc7c900f4ba8a..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/symbol/triangle.js +++ /dev/null @@ -1,11 +0,0 @@ -var sqrt3 = Math.sqrt(3); - -export default { - draw: function(context, size) { - var y = -Math.sqrt(size / (sqrt3 * 3)); - context.moveTo(0, y * 2); - context.lineTo(-sqrt3 * y, -y); - context.lineTo(sqrt3 * y, -y); - context.closePath(); - } -}; diff --git a/node_modules/d3-shape/src/symbol/wye.js b/node_modules/d3-shape/src/symbol/wye.js deleted file mode 100644 index 697f2c3c7be80c3bb5c0d6bb103f87732688d268..0000000000000000000000000000000000000000 --- a/node_modules/d3-shape/src/symbol/wye.js +++ /dev/null @@ -1,26 +0,0 @@ -var c = -0.5, - s = Math.sqrt(3) / 2, - k = 1 / Math.sqrt(12), - a = (k / 2 + 1) * 3; - -export default { - draw: function(context, size) { - var r = Math.sqrt(size / a), - x0 = r / 2, - y0 = r * k, - x1 = x0, - y1 = r * k + r, - x2 = -x1, - y2 = y1; - context.moveTo(x0, y0); - context.lineTo(x1, y1); - context.lineTo(x2, y2); - context.lineTo(c * x0 - s * y0, s * x0 + c * y0); - context.lineTo(c * x1 - s * y1, s * x1 + c * y1); - context.lineTo(c * x2 - s * y2, s * x2 + c * y2); - context.lineTo(c * x0 + s * y0, c * y0 - s * x0); - context.lineTo(c * x1 + s * y1, c * y1 - s * x1); - context.lineTo(c * x2 + s * y2, c * y2 - s * x2); - context.closePath(); - } -}; diff --git a/node_modules/d3-time-format/LICENSE b/node_modules/d3-time-format/LICENSE deleted file mode 100644 index 1d9d875edb469786a9c6dbae5aaeef9a3bcb2c33..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2017 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-time-format/README.md b/node_modules/d3-time-format/README.md deleted file mode 100644 index 18b86dd8ba2124256c7429a8811925108ab294f8..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/README.md +++ /dev/null @@ -1,199 +0,0 @@ -# d3-time-format - -This module provides a JavaScript implementation of the venerable [strptime](http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html) and [strftime](http://pubs.opengroup.org/onlinepubs/007908799/xsh/strftime.html) functions from the C standard library, and can be used to parse or format [dates](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) in a variety of locale-specific representations. To format a date, create a [formatter](#locale_format) from a specifier (a string with the desired format *directives*, indicated by `%`); then pass a date to the formatter, which returns a string. For example, to convert the current date to a human-readable string: - -```js -var formatTime = d3.timeFormat("%B %d, %Y"); -formatTime(new Date); // "June 30, 2015" -``` - -Likewise, to convert a string back to a date, create a [parser](#locale_parse): - -```js -var parseTime = d3.timeParse("%B %d, %Y"); -parseTime("June 30, 2015"); // Tue Jun 30 2015 00:00:00 GMT-0700 (PDT) -``` - -You can implement more elaborate conditional time formats, too. For example, here’s a [multi-scale time format](https://bl.ocks.org/mbostock/4149176) using [time intervals](https://github.com/d3/d3-time): - -```js -var formatMillisecond = d3.timeFormat(".%L"), - formatSecond = d3.timeFormat(":%S"), - formatMinute = d3.timeFormat("%I:%M"), - formatHour = d3.timeFormat("%I %p"), - formatDay = d3.timeFormat("%a %d"), - formatWeek = d3.timeFormat("%b %d"), - formatMonth = d3.timeFormat("%B"), - formatYear = d3.timeFormat("%Y"); - -function multiFormat(date) { - return (d3.timeSecond(date) < date ? formatMillisecond - : d3.timeMinute(date) < date ? formatSecond - : d3.timeHour(date) < date ? formatMinute - : d3.timeDay(date) < date ? formatHour - : d3.timeMonth(date) < date ? (d3.timeWeek(date) < date ? formatDay : formatWeek) - : d3.timeYear(date) < date ? formatMonth - : formatYear)(date); -} -``` - -This module is used by D3 [time scales](https://github.com/d3/d3-scale/blob/master/README.md#time-scales) to generate human-readable ticks. - -## Installing - -If you use NPM, `npm install d3-time-format`. Otherwise, download the [latest release](https://github.com/d3/d3-time-format/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-time-format.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-time.v2.min.js"></script> -<script src="https://d3js.org/d3-time-format.v3.min.js"></script> -<script> - -var format = d3.timeFormat("%x"); - -</script> -``` - -Locale files are published to npm and can be loaded using [d3.json](https://github.com/d3/d3-request/blob/master/README.md#json). For example, to set Russian as the default locale: - -```js -d3.json("https://cdn.jsdelivr.net/npm/d3-time-format@3/locale/ru-RU.json", function(error, locale) { - if (error) throw error; - - d3.timeFormatDefaultLocale(locale); - - var format = d3.timeFormat("%c"); - - console.log(format(new Date)); // понедельник, 5 Ð´ÐµÐºÐ°Ð±Ñ€Ñ 2016 г. 10:31:59 -}); -``` - -## API Reference - -<a name="timeFormat" href="#timeFormat">#</a> d3.<b>timeFormat</b>(<i>specifier</i>) · [Source](https://github.com/d3/d3-time-format/blob/master/src/defaultLocale.js) - -An alias for [*locale*.format](#locale_format) on the [default locale](#timeFormatDefaultLocale). - -<a name="timeParse" href="#timeParse">#</a> d3.<b>timeParse</b>(<i>specifier</i>) · [Source](https://github.com/d3/d3-time-format/blob/master/src/defaultLocale.js) - -An alias for [*locale*.parse](#locale_parse) on the [default locale](#timeFormatDefaultLocale). - -<a name="utcFormat" href="#utcFormat">#</a> d3.<b>utcFormat</b>(<i>specifier</i>) · [Source](https://github.com/d3/d3-time-format/blob/master/src/defaultLocale.js) - -An alias for [*locale*.utcFormat](#locale_utcFormat) on the [default locale](#timeFormatDefaultLocale). - -<a name="utcParse" href="#utcParse">#</a> d3.<b>utcParse</b>(<i>specifier</i>) · [Source](https://github.com/d3/d3-time-format/blob/master/src/defaultLocale.js) - -An alias for [*locale*.utcParse](#locale_utcParse) on the [default locale](#timeFormatDefaultLocale). - -<a name="isoFormat" href="#isoFormat">#</a> d3.<b>isoFormat</b> · [Source](https://github.com/d3/d3-time-format/blob/master/src/isoFormat.js) - -The full [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC time formatter. Where available, this method will use [Date.toISOString](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/toISOString) to format. - -<a name="isoParse" href="#isoParse">#</a> d3.<b>isoParse</b> · [Source](https://github.com/d3/d3-time-format/blob/master/src/isoParse.js) - -The full [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) UTC time parser. Where available, this method will use the [Date constructor](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date) to parse strings. If you depend on strict validation of the input format according to ISO 8601, you should construct a [UTC parser function](#utcParse): - -```js -var strictIsoParse = d3.utcParse("%Y-%m-%dT%H:%M:%S.%LZ"); -``` - -<a name="locale_format" href="#locale_format">#</a> <i>locale</i>.<b>format</b>(<i>specifier</i>) · [Source](https://github.com/d3/d3-time-format/blob/master/src/locale.js) - -Returns a new formatter for the given string *specifier*. The specifier string may contain the following directives: - -* `%a` - abbreviated weekday name.* -* `%A` - full weekday name.* -* `%b` - abbreviated month name.* -* `%B` - full month name.* -* `%c` - the locale’s date and time, such as `%x, %X`.* -* `%d` - zero-padded day of the month as a decimal number [01,31]. -* `%e` - space-padded day of the month as a decimal number [ 1,31]; equivalent to `%_d`. -* `%f` - microseconds as a decimal number [000000, 999999]. -* `%g` - ISO 8601 week-based year without century as a decimal number [00,99]. -* `%G` - ISO 8601 week-based year with century as a decimal number. -* `%H` - hour (24-hour clock) as a decimal number [00,23]. -* `%I` - hour (12-hour clock) as a decimal number [01,12]. -* `%j` - day of the year as a decimal number [001,366]. -* `%m` - month as a decimal number [01,12]. -* `%M` - minute as a decimal number [00,59]. -* `%L` - milliseconds as a decimal number [000, 999]. -* `%p` - either AM or PM.* -* `%q` - quarter of the year as a decimal number [1,4]. -* `%Q` - milliseconds since UNIX epoch. -* `%s` - seconds since UNIX epoch. -* `%S` - second as a decimal number [00,61]. -* `%u` - Monday-based (ISO 8601) weekday as a decimal number [1,7]. -* `%U` - Sunday-based week of the year as a decimal number [00,53]. -* `%V` - ISO 8601 week of the year as a decimal number [01, 53]. -* `%w` - Sunday-based weekday as a decimal number [0,6]. -* `%W` - Monday-based week of the year as a decimal number [00,53]. -* `%x` - the locale’s date, such as `%-m/%-d/%Y`.* -* `%X` - the locale’s time, such as `%-I:%M:%S %p`.* -* `%y` - year without century as a decimal number [00,99]. -* `%Y` - year with century as a decimal number, such as `1999`. -* `%Z` - time zone offset, such as `-0700`, `-07:00`, `-07`, or `Z`. -* `%%` - a literal percent sign (`%`). - -Directives marked with an asterisk (\*) may be affected by the [locale definition](#locales). - -For `%U`, all days in a new year preceding the first Sunday are considered to be in week 0. For `%W`, all days in a new year preceding the first Monday are considered to be in week 0. Week numbers are computed using [*interval*.count](https://github.com/d3/d3-time/blob/master/README.md#interval_count). For example, 2015-52 and 2016-00 represent Monday, December 28, 2015, while 2015-53 and 2016-01 represent Monday, January 4, 2016. This differs from the [ISO week date](https://en.wikipedia.org/wiki/ISO_week_date) specification (`%V`), which uses a more complicated definition! - -For `%V`,`%g` and `%G`, per the [strftime man page](http://man7.org/linux/man-pages/man3/strftime.3.html): - -> In this system, weeks start on a Monday, and are numbered from 01, for the first week, up to 52 or 53, for the last week. Week 1 is the first week where four or more days fall within the new year (or, synonymously, week 01 is: the first week of the year that contains a Thursday; or, the week that has 4 January in it). If the ISO week number belongs to the previous or next year, that year is used instead. - -The `%` sign indicating a directive may be immediately followed by a padding modifier: - -* `0` - zero-padding -* `_` - space-padding -* `-` - disable padding - -If no padding modifier is specified, the default is `0` for all directives except `%e`, which defaults to `_`. (In some implementations of strftime and strptime, a directive may include an optional field width or precision; this feature is not yet implemented.) - -The returned function formats a specified *[date](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date)*, returning the corresponding string. - -```js -var formatMonth = d3.timeFormat("%B"), - formatDay = d3.timeFormat("%A"), - date = new Date(2014, 4, 1); // Thu May 01 2014 00:00:00 GMT-0700 (PDT) - -formatMonth(date); // "May" -formatDay(date); // "Thursday" -``` - -<a name="locale_parse" href="#locale_parse">#</a> <i>locale</i>.<b>parse</b>(<i>specifier</i>) · [Source](https://github.com/d3/d3-time-format/blob/master/src/locale.js) - -Returns a new parser for the given string *specifier*. The specifier string may contain the same directives as [*locale*.format](#locale_format). The `%d` and `%e` directives are considered equivalent for parsing. - -The returned function parses a specified *string*, returning the corresponding [date](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date) or null if the string could not be parsed according to this format’s specifier. Parsing is strict: if the specified <i>string</i> does not exactly match the associated specifier, this method returns null. For example, if the associated specifier is `%Y-%m-%dT%H:%M:%SZ`, then the string `"2011-07-01T19:15:28Z"` will be parsed as expected, but `"2011-07-01T19:15:28"`, `"2011-07-01 19:15:28"` and `"2011-07-01"` will return null. (Note that the literal `Z` here is different from the time zone offset directive `%Z`.) If a more flexible parser is desired, try multiple formats sequentially until one returns non-null. - -<a name="locale_utcFormat" href="#locale_utcFormat">#</a> <i>locale</i>.<b>utcFormat</b>(<i>specifier</i>) · [Source](https://github.com/d3/d3-time-format/blob/master/src/locale.js) - -Equivalent to [*locale*.format](#locale_format), except all directives are interpreted as [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) rather than local time. - -<a name="locale_utcParse" href="#locale_utcParse">#</a> <i>locale</i>.<b>utcParse</b>(<i>specifier</i>) · [Source](https://github.com/d3/d3-time-format/blob/master/src/locale.js) - -Equivalent to [*locale*.parse](#locale_parse), except all directives are interpreted as [Coordinated Universal Time (UTC)](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) rather than local time. - -### Locales - -<a name="timeFormatLocale" href="#timeFormatLocale">#</a> d3.<b>timeFormatLocale</b>(<i>definition</i>) · [Source](https://github.com/d3/d3-time-format/blob/master/src/locale.js) - -Returns a *locale* object for the specified *definition* with [*locale*.format](#locale_format), [*locale*.parse](#locale_parse), [*locale*.utcFormat](#locale_utcFormat), [*locale*.utcParse](#locale_utcParse) methods. The *definition* must include the following properties: - -* `dateTime` - the date and time (`%c`) format specifier (<i>e.g.</i>, `"%a %b %e %X %Y"`). -* `date` - the date (`%x`) format specifier (<i>e.g.</i>, `"%m/%d/%Y"`). -* `time` - the time (`%X`) format specifier (<i>e.g.</i>, `"%H:%M:%S"`). -* `periods` - the A.M. and P.M. equivalents (<i>e.g.</i>, `["AM", "PM"]`). -* `days` - the full names of the weekdays, starting with Sunday. -* `shortDays` - the abbreviated names of the weekdays, starting with Sunday. -* `months` - the full names of the months (starting with January). -* `shortMonths` - the abbreviated names of the months (starting with January). - -For an example, see [Localized Time Axis II](https://bl.ocks.org/mbostock/805115ebaa574e771db1875a6d828949). - -<a name="timeFormatDefaultLocale" href="#timeFormatDefaultLocale">#</a> d3.<b>timeFormatDefaultLocale</b>(<i>definition</i>) · [Source](https://github.com/d3/d3-time-format/blob/master/src/defaultLocale.js) - -Equivalent to [d3.timeFormatLocale](#timeFormatLocale), except it also redefines [d3.timeFormat](#timeFormat), [d3.timeParse](#timeParse), [d3.utcFormat](#utcFormat) and [d3.utcParse](#utcParse) to the new locale’s [*locale*.format](#locale_format), [*locale*.parse](#locale_parse), [*locale*.utcFormat](#locale_utcFormat) and [*locale*.utcParse](#locale_utcParse). If you do not set a default locale, it defaults to [U.S. English](https://github.com/d3/d3-time-format/blob/master/locale/en-US.json). - -For an example, see [Localized Time Axis](https://bl.ocks.org/mbostock/6f1cc065d4d172bcaf322e399aa8d62f). diff --git a/node_modules/d3-time-format/dist/d3-time-format.js b/node_modules/d3-time-format/dist/d3-time-format.js deleted file mode 100644 index 516c0730d6363af6d03b7aea0056a7c729a0ae28..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/dist/d3-time-format.js +++ /dev/null @@ -1,741 +0,0 @@ -// https://d3js.org/d3-time-format/ v3.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-time')) : -typeof define === 'function' && define.amd ? define(['exports', 'd3-time'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {}, global.d3)); -}(this, function (exports, d3Time) { 'use strict'; - -function localDate(d) { - if (0 <= d.y && d.y < 100) { - var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L); - date.setFullYear(d.y); - return date; - } - return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L); -} - -function utcDate(d) { - if (0 <= d.y && d.y < 100) { - var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L)); - date.setUTCFullYear(d.y); - return date; - } - return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L)); -} - -function newDate(y, m, d) { - return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0}; -} - -function formatLocale(locale) { - var locale_dateTime = locale.dateTime, - locale_date = locale.date, - locale_time = locale.time, - locale_periods = locale.periods, - locale_weekdays = locale.days, - locale_shortWeekdays = locale.shortDays, - locale_months = locale.months, - locale_shortMonths = locale.shortMonths; - - var periodRe = formatRe(locale_periods), - periodLookup = formatLookup(locale_periods), - weekdayRe = formatRe(locale_weekdays), - weekdayLookup = formatLookup(locale_weekdays), - shortWeekdayRe = formatRe(locale_shortWeekdays), - shortWeekdayLookup = formatLookup(locale_shortWeekdays), - monthRe = formatRe(locale_months), - monthLookup = formatLookup(locale_months), - shortMonthRe = formatRe(locale_shortMonths), - shortMonthLookup = formatLookup(locale_shortMonths); - - var formats = { - "a": formatShortWeekday, - "A": formatWeekday, - "b": formatShortMonth, - "B": formatMonth, - "c": null, - "d": formatDayOfMonth, - "e": formatDayOfMonth, - "f": formatMicroseconds, - "g": formatYearISO, - "G": formatFullYearISO, - "H": formatHour24, - "I": formatHour12, - "j": formatDayOfYear, - "L": formatMilliseconds, - "m": formatMonthNumber, - "M": formatMinutes, - "p": formatPeriod, - "q": formatQuarter, - "Q": formatUnixTimestamp, - "s": formatUnixTimestampSeconds, - "S": formatSeconds, - "u": formatWeekdayNumberMonday, - "U": formatWeekNumberSunday, - "V": formatWeekNumberISO, - "w": formatWeekdayNumberSunday, - "W": formatWeekNumberMonday, - "x": null, - "X": null, - "y": formatYear, - "Y": formatFullYear, - "Z": formatZone, - "%": formatLiteralPercent - }; - - var utcFormats = { - "a": formatUTCShortWeekday, - "A": formatUTCWeekday, - "b": formatUTCShortMonth, - "B": formatUTCMonth, - "c": null, - "d": formatUTCDayOfMonth, - "e": formatUTCDayOfMonth, - "f": formatUTCMicroseconds, - "g": formatUTCYearISO, - "G": formatUTCFullYearISO, - "H": formatUTCHour24, - "I": formatUTCHour12, - "j": formatUTCDayOfYear, - "L": formatUTCMilliseconds, - "m": formatUTCMonthNumber, - "M": formatUTCMinutes, - "p": formatUTCPeriod, - "q": formatUTCQuarter, - "Q": formatUnixTimestamp, - "s": formatUnixTimestampSeconds, - "S": formatUTCSeconds, - "u": formatUTCWeekdayNumberMonday, - "U": formatUTCWeekNumberSunday, - "V": formatUTCWeekNumberISO, - "w": formatUTCWeekdayNumberSunday, - "W": formatUTCWeekNumberMonday, - "x": null, - "X": null, - "y": formatUTCYear, - "Y": formatUTCFullYear, - "Z": formatUTCZone, - "%": formatLiteralPercent - }; - - var parses = { - "a": parseShortWeekday, - "A": parseWeekday, - "b": parseShortMonth, - "B": parseMonth, - "c": parseLocaleDateTime, - "d": parseDayOfMonth, - "e": parseDayOfMonth, - "f": parseMicroseconds, - "g": parseYear, - "G": parseFullYear, - "H": parseHour24, - "I": parseHour24, - "j": parseDayOfYear, - "L": parseMilliseconds, - "m": parseMonthNumber, - "M": parseMinutes, - "p": parsePeriod, - "q": parseQuarter, - "Q": parseUnixTimestamp, - "s": parseUnixTimestampSeconds, - "S": parseSeconds, - "u": parseWeekdayNumberMonday, - "U": parseWeekNumberSunday, - "V": parseWeekNumberISO, - "w": parseWeekdayNumberSunday, - "W": parseWeekNumberMonday, - "x": parseLocaleDate, - "X": parseLocaleTime, - "y": parseYear, - "Y": parseFullYear, - "Z": parseZone, - "%": parseLiteralPercent - }; - - // These recursive directive definitions must be deferred. - formats.x = newFormat(locale_date, formats); - formats.X = newFormat(locale_time, formats); - formats.c = newFormat(locale_dateTime, formats); - utcFormats.x = newFormat(locale_date, utcFormats); - utcFormats.X = newFormat(locale_time, utcFormats); - utcFormats.c = newFormat(locale_dateTime, utcFormats); - - function newFormat(specifier, formats) { - return function(date) { - var string = [], - i = -1, - j = 0, - n = specifier.length, - c, - pad, - format; - - if (!(date instanceof Date)) date = new Date(+date); - - while (++i < n) { - if (specifier.charCodeAt(i) === 37) { - string.push(specifier.slice(j, i)); - if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i); - else pad = c === "e" ? " " : "0"; - if (format = formats[c]) c = format(date, pad); - string.push(c); - j = i + 1; - } - } - - string.push(specifier.slice(j, i)); - return string.join(""); - }; - } - - function newParse(specifier, Z) { - return function(string) { - var d = newDate(1900, undefined, 1), - i = parseSpecifier(d, specifier, string += "", 0), - week, day; - if (i != string.length) return null; - - // If a UNIX timestamp is specified, return it. - if ("Q" in d) return new Date(d.Q); - if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0)); - - // If this is utcParse, never use the local timezone. - if (Z && !("Z" in d)) d.Z = 0; - - // The am-pm flag is 0 for AM, and 1 for PM. - if ("p" in d) d.H = d.H % 12 + d.p * 12; - - // If the month was not specified, inherit from the quarter. - if (d.m === undefined) d.m = "q" in d ? d.q : 0; - - // Convert day-of-week and week-of-year to day-of-year. - if ("V" in d) { - if (d.V < 1 || d.V > 53) return null; - if (!("w" in d)) d.w = 1; - if ("Z" in d) { - week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay(); - week = day > 4 || day === 0 ? d3Time.utcMonday.ceil(week) : d3Time.utcMonday(week); - week = d3Time.utcDay.offset(week, (d.V - 1) * 7); - d.y = week.getUTCFullYear(); - d.m = week.getUTCMonth(); - d.d = week.getUTCDate() + (d.w + 6) % 7; - } else { - week = localDate(newDate(d.y, 0, 1)), day = week.getDay(); - week = day > 4 || day === 0 ? d3Time.timeMonday.ceil(week) : d3Time.timeMonday(week); - week = d3Time.timeDay.offset(week, (d.V - 1) * 7); - d.y = week.getFullYear(); - d.m = week.getMonth(); - d.d = week.getDate() + (d.w + 6) % 7; - } - } else if ("W" in d || "U" in d) { - if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; - day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(); - d.m = 0; - d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7; - } - - // If a time zone is specified, all fields are interpreted as UTC and then - // offset according to the specified time zone. - if ("Z" in d) { - d.H += d.Z / 100 | 0; - d.M += d.Z % 100; - return utcDate(d); - } - - // Otherwise, all fields are in local time. - return localDate(d); - }; - } - - function parseSpecifier(d, specifier, string, j) { - var i = 0, - n = specifier.length, - m = string.length, - c, - parse; - - while (i < n) { - if (j >= m) return -1; - c = specifier.charCodeAt(i++); - if (c === 37) { - c = specifier.charAt(i++); - parse = parses[c in pads ? specifier.charAt(i++) : c]; - if (!parse || ((j = parse(d, string, j)) < 0)) return -1; - } else if (c != string.charCodeAt(j++)) { - return -1; - } - } - - return j; - } - - function parsePeriod(d, string, i) { - var n = periodRe.exec(string.slice(i)); - return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; - } - - function parseShortWeekday(d, string, i) { - var n = shortWeekdayRe.exec(string.slice(i)); - return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; - } - - function parseWeekday(d, string, i) { - var n = weekdayRe.exec(string.slice(i)); - return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; - } - - function parseShortMonth(d, string, i) { - var n = shortMonthRe.exec(string.slice(i)); - return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; - } - - function parseMonth(d, string, i) { - var n = monthRe.exec(string.slice(i)); - return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; - } - - function parseLocaleDateTime(d, string, i) { - return parseSpecifier(d, locale_dateTime, string, i); - } - - function parseLocaleDate(d, string, i) { - return parseSpecifier(d, locale_date, string, i); - } - - function parseLocaleTime(d, string, i) { - return parseSpecifier(d, locale_time, string, i); - } - - function formatShortWeekday(d) { - return locale_shortWeekdays[d.getDay()]; - } - - function formatWeekday(d) { - return locale_weekdays[d.getDay()]; - } - - function formatShortMonth(d) { - return locale_shortMonths[d.getMonth()]; - } - - function formatMonth(d) { - return locale_months[d.getMonth()]; - } - - function formatPeriod(d) { - return locale_periods[+(d.getHours() >= 12)]; - } - - function formatQuarter(d) { - return 1 + ~~(d.getMonth() / 3); - } - - function formatUTCShortWeekday(d) { - return locale_shortWeekdays[d.getUTCDay()]; - } - - function formatUTCWeekday(d) { - return locale_weekdays[d.getUTCDay()]; - } - - function formatUTCShortMonth(d) { - return locale_shortMonths[d.getUTCMonth()]; - } - - function formatUTCMonth(d) { - return locale_months[d.getUTCMonth()]; - } - - function formatUTCPeriod(d) { - return locale_periods[+(d.getUTCHours() >= 12)]; - } - - function formatUTCQuarter(d) { - return 1 + ~~(d.getUTCMonth() / 3); - } - - return { - format: function(specifier) { - var f = newFormat(specifier += "", formats); - f.toString = function() { return specifier; }; - return f; - }, - parse: function(specifier) { - var p = newParse(specifier += "", false); - p.toString = function() { return specifier; }; - return p; - }, - utcFormat: function(specifier) { - var f = newFormat(specifier += "", utcFormats); - f.toString = function() { return specifier; }; - return f; - }, - utcParse: function(specifier) { - var p = newParse(specifier += "", true); - p.toString = function() { return specifier; }; - return p; - } - }; -} - -var pads = {"-": "", "_": " ", "0": "0"}, - numberRe = /^\s*\d+/, // note: ignores next directive - percentRe = /^%/, - requoteRe = /[\\^$*+?|[\]().{}]/g; - -function pad(value, fill, width) { - var sign = value < 0 ? "-" : "", - string = (sign ? -value : value) + "", - length = string.length; - return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); -} - -function requote(s) { - return s.replace(requoteRe, "\\$&"); -} - -function formatRe(names) { - return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i"); -} - -function formatLookup(names) { - return new Map(names.map((name, i) => [name.toLowerCase(), i])); -} - -function parseWeekdayNumberSunday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 1)); - return n ? (d.w = +n[0], i + n[0].length) : -1; -} - -function parseWeekdayNumberMonday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 1)); - return n ? (d.u = +n[0], i + n[0].length) : -1; -} - -function parseWeekNumberSunday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.U = +n[0], i + n[0].length) : -1; -} - -function parseWeekNumberISO(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.V = +n[0], i + n[0].length) : -1; -} - -function parseWeekNumberMonday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.W = +n[0], i + n[0].length) : -1; -} - -function parseFullYear(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 4)); - return n ? (d.y = +n[0], i + n[0].length) : -1; -} - -function parseYear(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1; -} - -function parseZone(d, string, i) { - var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6)); - return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1; -} - -function parseQuarter(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 1)); - return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1; -} - -function parseMonthNumber(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.m = n[0] - 1, i + n[0].length) : -1; -} - -function parseDayOfMonth(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.d = +n[0], i + n[0].length) : -1; -} - -function parseDayOfYear(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 3)); - return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1; -} - -function parseHour24(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.H = +n[0], i + n[0].length) : -1; -} - -function parseMinutes(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.M = +n[0], i + n[0].length) : -1; -} - -function parseSeconds(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.S = +n[0], i + n[0].length) : -1; -} - -function parseMilliseconds(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 3)); - return n ? (d.L = +n[0], i + n[0].length) : -1; -} - -function parseMicroseconds(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 6)); - return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1; -} - -function parseLiteralPercent(d, string, i) { - var n = percentRe.exec(string.slice(i, i + 1)); - return n ? i + n[0].length : -1; -} - -function parseUnixTimestamp(d, string, i) { - var n = numberRe.exec(string.slice(i)); - return n ? (d.Q = +n[0], i + n[0].length) : -1; -} - -function parseUnixTimestampSeconds(d, string, i) { - var n = numberRe.exec(string.slice(i)); - return n ? (d.s = +n[0], i + n[0].length) : -1; -} - -function formatDayOfMonth(d, p) { - return pad(d.getDate(), p, 2); -} - -function formatHour24(d, p) { - return pad(d.getHours(), p, 2); -} - -function formatHour12(d, p) { - return pad(d.getHours() % 12 || 12, p, 2); -} - -function formatDayOfYear(d, p) { - return pad(1 + d3Time.timeDay.count(d3Time.timeYear(d), d), p, 3); -} - -function formatMilliseconds(d, p) { - return pad(d.getMilliseconds(), p, 3); -} - -function formatMicroseconds(d, p) { - return formatMilliseconds(d, p) + "000"; -} - -function formatMonthNumber(d, p) { - return pad(d.getMonth() + 1, p, 2); -} - -function formatMinutes(d, p) { - return pad(d.getMinutes(), p, 2); -} - -function formatSeconds(d, p) { - return pad(d.getSeconds(), p, 2); -} - -function formatWeekdayNumberMonday(d) { - var day = d.getDay(); - return day === 0 ? 7 : day; -} - -function formatWeekNumberSunday(d, p) { - return pad(d3Time.timeSunday.count(d3Time.timeYear(d) - 1, d), p, 2); -} - -function dISO(d) { - var day = d.getDay(); - return (day >= 4 || day === 0) ? d3Time.timeThursday(d) : d3Time.timeThursday.ceil(d); -} - -function formatWeekNumberISO(d, p) { - d = dISO(d); - return pad(d3Time.timeThursday.count(d3Time.timeYear(d), d) + (d3Time.timeYear(d).getDay() === 4), p, 2); -} - -function formatWeekdayNumberSunday(d) { - return d.getDay(); -} - -function formatWeekNumberMonday(d, p) { - return pad(d3Time.timeMonday.count(d3Time.timeYear(d) - 1, d), p, 2); -} - -function formatYear(d, p) { - return pad(d.getFullYear() % 100, p, 2); -} - -function formatYearISO(d, p) { - d = dISO(d); - return pad(d.getFullYear() % 100, p, 2); -} - -function formatFullYear(d, p) { - return pad(d.getFullYear() % 10000, p, 4); -} - -function formatFullYearISO(d, p) { - var day = d.getDay(); - d = (day >= 4 || day === 0) ? d3Time.timeThursday(d) : d3Time.timeThursday.ceil(d); - return pad(d.getFullYear() % 10000, p, 4); -} - -function formatZone(d) { - var z = d.getTimezoneOffset(); - return (z > 0 ? "-" : (z *= -1, "+")) - + pad(z / 60 | 0, "0", 2) - + pad(z % 60, "0", 2); -} - -function formatUTCDayOfMonth(d, p) { - return pad(d.getUTCDate(), p, 2); -} - -function formatUTCHour24(d, p) { - return pad(d.getUTCHours(), p, 2); -} - -function formatUTCHour12(d, p) { - return pad(d.getUTCHours() % 12 || 12, p, 2); -} - -function formatUTCDayOfYear(d, p) { - return pad(1 + d3Time.utcDay.count(d3Time.utcYear(d), d), p, 3); -} - -function formatUTCMilliseconds(d, p) { - return pad(d.getUTCMilliseconds(), p, 3); -} - -function formatUTCMicroseconds(d, p) { - return formatUTCMilliseconds(d, p) + "000"; -} - -function formatUTCMonthNumber(d, p) { - return pad(d.getUTCMonth() + 1, p, 2); -} - -function formatUTCMinutes(d, p) { - return pad(d.getUTCMinutes(), p, 2); -} - -function formatUTCSeconds(d, p) { - return pad(d.getUTCSeconds(), p, 2); -} - -function formatUTCWeekdayNumberMonday(d) { - var dow = d.getUTCDay(); - return dow === 0 ? 7 : dow; -} - -function formatUTCWeekNumberSunday(d, p) { - return pad(d3Time.utcSunday.count(d3Time.utcYear(d) - 1, d), p, 2); -} - -function UTCdISO(d) { - var day = d.getUTCDay(); - return (day >= 4 || day === 0) ? d3Time.utcThursday(d) : d3Time.utcThursday.ceil(d); -} - -function formatUTCWeekNumberISO(d, p) { - d = UTCdISO(d); - return pad(d3Time.utcThursday.count(d3Time.utcYear(d), d) + (d3Time.utcYear(d).getUTCDay() === 4), p, 2); -} - -function formatUTCWeekdayNumberSunday(d) { - return d.getUTCDay(); -} - -function formatUTCWeekNumberMonday(d, p) { - return pad(d3Time.utcMonday.count(d3Time.utcYear(d) - 1, d), p, 2); -} - -function formatUTCYear(d, p) { - return pad(d.getUTCFullYear() % 100, p, 2); -} - -function formatUTCYearISO(d, p) { - d = UTCdISO(d); - return pad(d.getUTCFullYear() % 100, p, 2); -} - -function formatUTCFullYear(d, p) { - return pad(d.getUTCFullYear() % 10000, p, 4); -} - -function formatUTCFullYearISO(d, p) { - var day = d.getUTCDay(); - d = (day >= 4 || day === 0) ? d3Time.utcThursday(d) : d3Time.utcThursday.ceil(d); - return pad(d.getUTCFullYear() % 10000, p, 4); -} - -function formatUTCZone() { - return "+0000"; -} - -function formatLiteralPercent() { - return "%"; -} - -function formatUnixTimestamp(d) { - return +d; -} - -function formatUnixTimestampSeconds(d) { - return Math.floor(+d / 1000); -} - -var locale; - -defaultLocale({ - 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 defaultLocale(definition) { - locale = formatLocale(definition); - exports.timeFormat = locale.format; - exports.timeParse = locale.parse; - exports.utcFormat = locale.utcFormat; - exports.utcParse = locale.utcParse; - return locale; -} - -var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ"; - -function formatIsoNative(date) { - return date.toISOString(); -} - -var formatIso = Date.prototype.toISOString - ? formatIsoNative - : exports.utcFormat(isoSpecifier); - -function parseIsoNative(string) { - var date = new Date(string); - return isNaN(date) ? null : date; -} - -var parseIso = +new Date("2000-01-01T00:00:00.000Z") - ? parseIsoNative - : exports.utcParse(isoSpecifier); - -exports.isoFormat = formatIso; -exports.isoParse = parseIso; -exports.timeFormatDefaultLocale = defaultLocale; -exports.timeFormatLocale = formatLocale; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-time-format/dist/d3-time-format.min.js b/node_modules/d3-time-format/dist/d3-time-format.min.js deleted file mode 100644 index 668a1275198759d27c810e070f8a56abc894f136..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/dist/d3-time-format.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-time-format/ v3.0.0 Copyright 2020 Mike Bostock -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("d3-time")):"function"==typeof define&&define.amd?define(["exports","d3-time"],t):t((e=e||self).d3=e.d3||{},e.d3)}(this,function(e,t){"use strict";function n(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function r(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function u(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function i(e){var i=e.dateTime,c=e.date,a=e.time,f=e.periods,l=e.days,s=e.shortDays,g=e.months,G=e.shortMonths,ge=y(f),pe=d(f),we=y(l),Se=d(l),Ye=y(s),Fe=d(s),Le=y(g),He=d(g),Ae=y(G),Ze=d(G),be={a:function(e){return s[e.getDay()]},A:function(e){return l[e.getDay()]},b:function(e){return G[e.getMonth()]},B:function(e){return g[e.getMonth()]},c:null,d:V,e:V,f:J,g:R,G:K,H:j,I:P,j:q,L:I,m:O,M:Q,p:function(e){return f[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:Ue,s:xe,S:X,u:N,U:B,V:_,w:$,W:z,x:null,X:null,y:E,Y:k,Z:ee,"%":Ce},We={a:function(e){return s[e.getUTCDay()]},A:function(e){return l[e.getUTCDay()]},b:function(e){return G[e.getUTCMonth()]},B:function(e){return g[e.getUTCMonth()]},c:null,d:te,e:te,f:ce,g:ve,G:Me,H:ne,I:re,j:ue,L:ie,m:oe,M:ae,p:function(e){return f[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:Ue,s:xe,S:fe,u:le,U:se,V:ye,w:de,W:he,x:null,X:null,y:me,Y:Te,Z:De,"%":Ce},Ve={a:function(e,t,n){var r=Ye.exec(t.slice(n));return r?(e.w=Fe.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){var r=we.exec(t.slice(n));return r?(e.w=Se.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){var r=Ae.exec(t.slice(n));return r?(e.m=Ze.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){var r=Le.exec(t.slice(n));return r?(e.m=He.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,t,n){return qe(e,i,t,n)},d:w,e:w,f:A,g:C,G:D,H:Y,I:Y,j:S,L:H,m:p,M:F,p:function(e,t,n){var r=ge.exec(t.slice(n));return r?(e.p=pe.get(r[0].toLowerCase()),n+r[0].length):-1},q:x,Q:b,s:W,S:L,u:m,U:v,V:T,w:h,W:M,x:function(e,t,n){return qe(e,c,t,n)},X:function(e,t,n){return qe(e,a,t,n)},y:C,Y:D,Z:U,"%":Z};function je(e,t){return function(n){var r,u,i,c=[],a=-1,f=0,l=e.length;for(n instanceof Date||(n=new Date(+n));++a<l;)37===e.charCodeAt(a)&&(c.push(e.slice(f,a)),null!=(u=o[r=e.charAt(++a)])?r=e.charAt(++a):u="e"===r?" ":"0",(i=t[r])&&(r=i(n,u)),c.push(r),f=a+1);return c.push(e.slice(f,a)),c.join("")}}function Pe(e,i){return function(c){var o,a,f=u(1900,void 0,1);if(qe(f,e,c+="",0)!=c.length)return null;if("Q"in f)return new Date(f.Q);if("s"in f)return new Date(1e3*f.s+("L"in f?f.L:0));if(!i||"Z"in f||(f.Z=0),"p"in f&&(f.H=f.H%12+12*f.p),void 0===f.m&&(f.m="q"in f?f.q:0),"V"in f){if(f.V<1||f.V>53)return null;"w"in f||(f.w=1),"Z"in f?(a=(o=r(u(f.y,0,1))).getUTCDay(),o=a>4||0===a?t.utcMonday.ceil(o):t.utcMonday(o),o=t.utcDay.offset(o,7*(f.V-1)),f.y=o.getUTCFullYear(),f.m=o.getUTCMonth(),f.d=o.getUTCDate()+(f.w+6)%7):(a=(o=n(u(f.y,0,1))).getDay(),o=a>4||0===a?t.timeMonday.ceil(o):t.timeMonday(o),o=t.timeDay.offset(o,7*(f.V-1)),f.y=o.getFullYear(),f.m=o.getMonth(),f.d=o.getDate()+(f.w+6)%7)}else("W"in f||"U"in f)&&("w"in f||(f.w="u"in f?f.u%7:"W"in f?1:0),a="Z"in f?r(u(f.y,0,1)).getUTCDay():n(u(f.y,0,1)).getDay(),f.m=0,f.d="W"in f?(f.w+6)%7+7*f.W-(a+5)%7:f.w+7*f.U-(a+6)%7);return"Z"in f?(f.H+=f.Z/100|0,f.M+=f.Z%100,r(f)):n(f)}}function qe(e,t,n,r){for(var u,i,c=0,a=t.length,f=n.length;c<a;){if(r>=f)return-1;if(37===(u=t.charCodeAt(c++))){if(u=t.charAt(c++),!(i=Ve[u in o?t.charAt(c++):u])||(r=i(e,n,r))<0)return-1}else if(u!=n.charCodeAt(r++))return-1}return r}return be.x=je(c,be),be.X=je(a,be),be.c=je(i,be),We.x=je(c,We),We.X=je(a,We),We.c=je(i,We),{format:function(e){var t=je(e+="",be);return t.toString=function(){return e},t},parse:function(e){var t=Pe(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=je(e+="",We);return t.toString=function(){return e},t},utcParse:function(e){var t=Pe(e+="",!0);return t.toString=function(){return e},t}}}var c,o={"-":"",_:" ",0:"0"},a=/^\s*\d+/,f=/^%/,l=/[\\^$*+?|[\]().{}]/g;function s(e,t,n){var r=e<0?"-":"",u=(r?-e:e)+"",i=u.length;return r+(i<n?new Array(n-i+1).join(t)+u:u)}function g(e){return e.replace(l,"\\$&")}function y(e){return new RegExp("^(?:"+e.map(g).join("|")+")","i")}function d(e){return new Map(e.map((e,t)=>[e.toLowerCase(),t]))}function h(e,t,n){var r=a.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function m(e,t,n){var r=a.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function v(e,t,n){var r=a.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function T(e,t,n){var r=a.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function M(e,t,n){var r=a.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function D(e,t,n){var r=a.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function C(e,t,n){var r=a.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function U(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function x(e,t,n){var r=a.exec(t.slice(n,n+1));return r?(e.q=3*r[0]-3,n+r[0].length):-1}function p(e,t,n){var r=a.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function w(e,t,n){var r=a.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function S(e,t,n){var r=a.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function Y(e,t,n){var r=a.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function F(e,t,n){var r=a.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function L(e,t,n){var r=a.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function H(e,t,n){var r=a.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function A(e,t,n){var r=a.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Z(e,t,n){var r=f.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function b(e,t,n){var r=a.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function W(e,t,n){var r=a.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function V(e,t){return s(e.getDate(),t,2)}function j(e,t){return s(e.getHours(),t,2)}function P(e,t){return s(e.getHours()%12||12,t,2)}function q(e,n){return s(1+t.timeDay.count(t.timeYear(e),e),n,3)}function I(e,t){return s(e.getMilliseconds(),t,3)}function J(e,t){return I(e,t)+"000"}function O(e,t){return s(e.getMonth()+1,t,2)}function Q(e,t){return s(e.getMinutes(),t,2)}function X(e,t){return s(e.getSeconds(),t,2)}function N(e){var t=e.getDay();return 0===t?7:t}function B(e,n){return s(t.timeSunday.count(t.timeYear(e)-1,e),n,2)}function G(e){var n=e.getDay();return n>=4||0===n?t.timeThursday(e):t.timeThursday.ceil(e)}function _(e,n){return e=G(e),s(t.timeThursday.count(t.timeYear(e),e)+(4===t.timeYear(e).getDay()),n,2)}function $(e){return e.getDay()}function z(e,n){return s(t.timeMonday.count(t.timeYear(e)-1,e),n,2)}function E(e,t){return s(e.getFullYear()%100,t,2)}function R(e,t){return s((e=G(e)).getFullYear()%100,t,2)}function k(e,t){return s(e.getFullYear()%1e4,t,4)}function K(e,n){var r=e.getDay();return s((e=r>=4||0===r?t.timeThursday(e):t.timeThursday.ceil(e)).getFullYear()%1e4,n,4)}function ee(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+s(t/60|0,"0",2)+s(t%60,"0",2)}function te(e,t){return s(e.getUTCDate(),t,2)}function ne(e,t){return s(e.getUTCHours(),t,2)}function re(e,t){return s(e.getUTCHours()%12||12,t,2)}function ue(e,n){return s(1+t.utcDay.count(t.utcYear(e),e),n,3)}function ie(e,t){return s(e.getUTCMilliseconds(),t,3)}function ce(e,t){return ie(e,t)+"000"}function oe(e,t){return s(e.getUTCMonth()+1,t,2)}function ae(e,t){return s(e.getUTCMinutes(),t,2)}function fe(e,t){return s(e.getUTCSeconds(),t,2)}function le(e){var t=e.getUTCDay();return 0===t?7:t}function se(e,n){return s(t.utcSunday.count(t.utcYear(e)-1,e),n,2)}function ge(e){var n=e.getUTCDay();return n>=4||0===n?t.utcThursday(e):t.utcThursday.ceil(e)}function ye(e,n){return e=ge(e),s(t.utcThursday.count(t.utcYear(e),e)+(4===t.utcYear(e).getUTCDay()),n,2)}function de(e){return e.getUTCDay()}function he(e,n){return s(t.utcMonday.count(t.utcYear(e)-1,e),n,2)}function me(e,t){return s(e.getUTCFullYear()%100,t,2)}function ve(e,t){return s((e=ge(e)).getUTCFullYear()%100,t,2)}function Te(e,t){return s(e.getUTCFullYear()%1e4,t,4)}function Me(e,n){var r=e.getUTCDay();return s((e=r>=4||0===r?t.utcThursday(e):t.utcThursday.ceil(e)).getUTCFullYear()%1e4,n,4)}function De(){return"+0000"}function Ce(){return"%"}function Ue(e){return+e}function xe(e){return Math.floor(+e/1e3)}function pe(t){return c=i(t),e.timeFormat=c.format,e.timeParse=c.parse,e.utcFormat=c.utcFormat,e.utcParse=c.utcParse,c}pe({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"]});var we=Date.prototype.toISOString?function(e){return e.toISOString()}:e.utcFormat("%Y-%m-%dT%H:%M:%S.%LZ");var Se=+new Date("2000-01-01T00:00:00.000Z")?function(e){var t=new Date(e);return isNaN(t)?null:t}:e.utcParse("%Y-%m-%dT%H:%M:%S.%LZ");e.isoFormat=we,e.isoParse=Se,e.timeFormatDefaultLocale=pe,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})}); diff --git a/node_modules/d3-time-format/locale/ar-EG.json b/node_modules/d3-time-format/locale/ar-EG.json deleted file mode 100644 index 8ac02650253e8b189a5dceeacdcef5b6fe20e680..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/ar-EG.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%x, %X", - "date": "%-d/%-m/%Y", - "time": "%-I:%M:%S %p", - "periods": ["ص", "Ù…"], - "days": ["الأØد", "الإثنين", "الثلاثاء", "الأربعاء", "الخميس", "الجمعة", "السبت"], - "shortDays": ["Ø£Øد", "إثنين", "ثلاثاء", "أربعاء", "خميس", "جمعة", "سبت"], - "months": ["يناير", "Ùبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوÙمبر", "ديسمبر"], - "shortMonths": ["يناير", "Ùبراير", "مارس", "أبريل", "مايو", "يونيو", "يوليو", "أغسطس", "سبتمبر", "أكتوبر", "نوÙمبر", "ديسمبر"] -} diff --git a/node_modules/d3-time-format/locale/ca-ES.json b/node_modules/d3-time-format/locale/ca-ES.json deleted file mode 100644 index a27087357cef334f5f6186af89863c88feaddfdb..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/ca-ES.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A, %e de %B de %Y, %X", - "date": "%d/%m/%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["diumenge", "dilluns", "dimarts", "dimecres", "dijous", "divendres", "dissabte"], - "shortDays": ["dg.", "dl.", "dt.", "dc.", "dj.", "dv.", "ds."], - "months": ["gener", "febrer", "març", "abril", "maig", "juny", "juliol", "agost", "setembre", "octubre", "novembre", "desembre"], - "shortMonths": ["gen.", "febr.", "març", "abr.", "maig", "juny", "jul.", "ag.", "set.", "oct.", "nov.", "des."] -} diff --git a/node_modules/d3-time-format/locale/cs-CZ.json b/node_modules/d3-time-format/locale/cs-CZ.json deleted file mode 100644 index ced34ea54db99367229d358aec2768fc5a8de457..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/cs-CZ.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A,%e.%B %Y, %X", - "date": "%-d.%-m.%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["nedÄ›le", "pondÄ›lÃ", "úterý", "stÅ™eda", "Ävrtek", "pátek", "sobota"], - "shortDays": ["ne.", "po.", "út.", "st.", "Ät.", "pá.", "so."], - "months": ["leden", "únor", "bÅ™ezen", "duben", "kvÄ›ten", "Äerven", "Äervenec", "srpen", "zářÃ", "Å™Ãjen", "listopad", "prosinec"], - "shortMonths": ["led", "úno", "bÅ™ez", "dub", "kvÄ›", "Äer", "Äerv", "srp", "zář", "Å™Ãj", "list", "pros"] -} diff --git a/node_modules/d3-time-format/locale/da-DK.json b/node_modules/d3-time-format/locale/da-DK.json deleted file mode 100644 index f0c2349c2213361e96b614f1092d1f8582b60cd2..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/da-DK.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A den %d %B %Y %X", - "date": "%d-%m-%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"], - "shortDays": ["søn", "man", "tir", "ons", "tor", "fre", "lør"], - "months": ["januar", "februar", "marts", "april", "maj", "juni", "juli", "august", "september", "oktober", "november", "december"], - "shortMonths": ["jan", "feb", "mar", "apr", "maj", "jun", "jul", "aug", "sep", "okt", "nov", "dec"] -} diff --git a/node_modules/d3-time-format/locale/de-CH.json b/node_modules/d3-time-format/locale/de-CH.json deleted file mode 100644 index 466b749b5dd07c104ec200342ea4484b48ed2841..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/de-CH.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A, der %e. %B %Y, %X", - "date": "%d.%m.%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], - "shortDays": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], - "months": ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], - "shortMonths": ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"] -} diff --git a/node_modules/d3-time-format/locale/de-DE.json b/node_modules/d3-time-format/locale/de-DE.json deleted file mode 100644 index 466b749b5dd07c104ec200342ea4484b48ed2841..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/de-DE.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A, der %e. %B %Y, %X", - "date": "%d.%m.%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"], - "shortDays": ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"], - "months": ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"], - "shortMonths": ["Jan", "Feb", "Mrz", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"] -} diff --git a/node_modules/d3-time-format/locale/en-CA.json b/node_modules/d3-time-format/locale/en-CA.json deleted file mode 100644 index 5c13ae3c06ba933691baa5a98419bf7089a98255..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/en-CA.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%a %b %e %X %Y", - "date": "%Y-%m-%d", - "time": "%H:%M:%S", - "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"] -} diff --git a/node_modules/d3-time-format/locale/en-GB.json b/node_modules/d3-time-format/locale/en-GB.json deleted file mode 100644 index 9f651c5c773f6f70bfbebb3dc338cbaf9812dece..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/en-GB.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%a %e %b %X %Y", - "date": "%d/%m/%Y", - "time": "%H:%M:%S", - "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"] -} diff --git a/node_modules/d3-time-format/locale/en-US.json b/node_modules/d3-time-format/locale/en-US.json deleted file mode 100644 index a7ac951373460ec266fba25f2d8ec60d88cbfd82..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/en-US.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "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"] -} diff --git a/node_modules/d3-time-format/locale/es-ES.json b/node_modules/d3-time-format/locale/es-ES.json deleted file mode 100644 index 8c5f754f5da47b4963b7c5ff9f3b9330a6193ec7..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/es-ES.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A, %e de %B de %Y, %X", - "date": "%d/%m/%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"], - "shortDays": ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"], - "months": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"], - "shortMonths": ["ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"] -} diff --git a/node_modules/d3-time-format/locale/es-MX.json b/node_modules/d3-time-format/locale/es-MX.json deleted file mode 100644 index 4dc2077ea4e819a8117512dc51e02eb3f98d879d..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/es-MX.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%x, %X", - "date": "%d/%m/%Y", - "time": "%-I:%M:%S %p", - "periods": ["AM", "PM"], - "days": ["domingo", "lunes", "martes", "miércoles", "jueves", "viernes", "sábado"], - "shortDays": ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"], - "months": ["enero", "febrero", "marzo", "abril", "mayo", "junio", "julio", "agosto", "septiembre", "octubre", "noviembre", "diciembre"], - "shortMonths": ["ene", "feb", "mar", "abr", "may", "jun", "jul", "ago", "sep", "oct", "nov", "dic"] -} diff --git a/node_modules/d3-time-format/locale/fa-IR.json b/node_modules/d3-time-format/locale/fa-IR.json deleted file mode 100644 index badff07ba1eb0ce2b9df896ef99ba180c1abb988..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/fa-IR.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%x, %X", - "date": "%-d/%-m/%Y", - "time": "%-I:%M:%S %p", - "periods": ["صبØ", "عصر"], - "days": ["یکشنبه", "دوشنبه", "سه شنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"], - "shortDays": ["یکشنبه", "دوشنبه", "سه شنبه", "چهارشنبه", "پنجشنبه", "جمعه", "شنبه"], - "months": ["ژانویه", "Ùوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"], - "shortMonths": ["ژانویه", "Ùوریه", "مارس", "آوریل", "مه", "ژوئن", "ژوئیه", "اوت", "سپتامبر", "اکتبر", "نوامبر", "دسامبر"] -} diff --git a/node_modules/d3-time-format/locale/fi-FI.json b/node_modules/d3-time-format/locale/fi-FI.json deleted file mode 100644 index 2422199ee9d49cf03a79fb771eaeb1f851fdca1f..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/fi-FI.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A, %-d. %Bta %Y klo %X", - "date": "%-d.%-m.%Y", - "time": "%H:%M:%S", - "periods": ["a.m.", "p.m."], - "days": ["sunnuntai", "maanantai", "tiistai", "keskiviikko", "torstai", "perjantai", "lauantai"], - "shortDays": ["Su", "Ma", "Ti", "Ke", "To", "Pe", "La"], - "months": ["tammikuu", "helmikuu", "maaliskuu", "huhtikuu", "toukokuu", "kesäkuu", "heinäkuu", "elokuu", "syyskuu", "lokakuu", "marraskuu", "joulukuu"], - "shortMonths": ["Tammi", "Helmi", "Maalis", "Huhti", "Touko", "Kesä", "Heinä", "Elo", "Syys", "Loka", "Marras", "Joulu"] -} diff --git a/node_modules/d3-time-format/locale/fr-CA.json b/node_modules/d3-time-format/locale/fr-CA.json deleted file mode 100644 index 1300cabd3c72eef82a944f0e77b635847f172d2d..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/fr-CA.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%a %e %b %Y %X", - "date": "%Y-%m-%d", - "time": "%H:%M:%S", - "periods": ["", ""], - "days": ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"], - "shortDays": ["dim", "lun", "mar", "mer", "jeu", "ven", "sam"], - "months": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"], - "shortMonths": ["jan", "fév", "mar", "avr", "mai", "jui", "jul", "aoû", "sep", "oct", "nov", "déc"] -} diff --git a/node_modules/d3-time-format/locale/fr-FR.json b/node_modules/d3-time-format/locale/fr-FR.json deleted file mode 100644 index 6ac05ee2d31ac68d88897e710bf63793d5a8275d..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/fr-FR.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A %e %B %Y à %X", - "date": "%d/%m/%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["dimanche", "lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi"], - "shortDays": ["dim.", "lun.", "mar.", "mer.", "jeu.", "ven.", "sam."], - "months": ["janvier", "février", "mars", "avril", "mai", "juin", "juillet", "août", "septembre", "octobre", "novembre", "décembre"], - "shortMonths": ["janv.", "févr.", "mars", "avr.", "mai", "juin", "juil.", "août", "sept.", "oct.", "nov.", "déc."] -} diff --git a/node_modules/d3-time-format/locale/he-IL.json b/node_modules/d3-time-format/locale/he-IL.json deleted file mode 100644 index 0ce27cdd717a99bab7810d5614e88772177af143..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/he-IL.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A, %e ב%B %Y %X", - "date": "%d.%m.%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["ר×שון", "×©× ×™", "שלישי", "רביעי", "חמישי", "שישי", "שבת"], - "shortDays": ["×׳", "ב׳", "ג׳", "ד׳", "ה׳", "ו׳", "ש׳"], - "months": ["×™× ×•×ר", "פברו×ר", "מרץ", "×פריל", "מ××™", "×™×•× ×™", "יולי", "×וגוסט", "ספטמבר", "×וקטובר", "× ×•×‘×ž×‘×¨", "דצמבר"], - "shortMonths": ["×™× ×•×³", "פבר׳", "מרץ", "×פר׳", "מ××™", "×™×•× ×™", "יולי", "×וג׳", "ספט׳", "×וק׳", "× ×•×‘×³", "דצמ׳"] -} diff --git a/node_modules/d3-time-format/locale/hu-HU.json b/node_modules/d3-time-format/locale/hu-HU.json deleted file mode 100644 index d81acf22536e99152acc0fc34c87ac301219630c..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/hu-HU.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%Y. %B %-e., %A %X", - "date": "%Y. %m. %d.", - "time": "%H:%M:%S", - "periods": ["de.", "du."], - "days": ["vasárnap", "hétfÅ‘", "kedd", "szerda", "csütörtök", "péntek", "szombat"], - "shortDays": ["V", "H", "K", "Sze", "Cs", "P", "Szo"], - "months": ["január", "február", "március", "április", "május", "június", "július", "augusztus", "szeptember", "október", "november", "december"], - "shortMonths": ["jan.", "feb.", "már.", "ápr.", "máj.", "jún.", "júl.", "aug.", "szept.", "okt.", "nov.", "dec."] -} diff --git a/node_modules/d3-time-format/locale/it-IT.json b/node_modules/d3-time-format/locale/it-IT.json deleted file mode 100644 index 0fc08e025eb2d37016f7f884b5e87437c0058fd7..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/it-IT.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A %e %B %Y, %X", - "date": "%d/%m/%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["Domenica", "Lunedì", "Martedì", "Mercoledì", "Giovedì", "Venerdì", "Sabato"], - "shortDays": ["Dom", "Lun", "Mar", "Mer", "Gio", "Ven", "Sab"], - "months": ["Gennaio", "Febbraio", "Marzo", "Aprile", "Maggio", "Giugno", "Luglio", "Agosto", "Settembre", "Ottobre", "Novembre", "Dicembre"], - "shortMonths": ["Gen", "Feb", "Mar", "Apr", "Mag", "Giu", "Lug", "Ago", "Set", "Ott", "Nov", "Dic"] -} diff --git a/node_modules/d3-time-format/locale/ja-JP.json b/node_modules/d3-time-format/locale/ja-JP.json deleted file mode 100644 index 72c460d7414f8af6a458a5bd04825355435aaa4a..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/ja-JP.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%x %a %X", - "date": "%Y/%m/%d", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["日曜日", "月曜日", "ç«æ›œæ—¥", "水曜日", "木曜日", "金曜日", "土曜日"], - "shortDays": ["æ—¥", "月", "ç«", "æ°´", "木", "金", "土"], - "months": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"], - "shortMonths": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"] -} diff --git a/node_modules/d3-time-format/locale/ko-KR.json b/node_modules/d3-time-format/locale/ko-KR.json deleted file mode 100644 index 7055666a7610ecc4aea43b5fe174d39e7b2cba3e..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/ko-KR.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%Y/%m/%d %a %X", - "date": "%Y/%m/%d", - "time": "%H:%M:%S", - "periods": ["ì˜¤ì „", "오후"], - "days": ["ì¼ìš”ì¼", "월요ì¼", "화요ì¼", "수요ì¼", "목요ì¼", "금요ì¼", "í† ìš”ì¼"], - "shortDays": ["ì¼", "ì›”", "í™”", "수", "목", "금", "í† "], - "months": ["1ì›”", "2ì›”", "3ì›”", "4ì›”", "5ì›”", "6ì›”", "7ì›”", "8ì›”", "9ì›”", "10ì›”", "11ì›”", "12ì›”"], - "shortMonths": ["1ì›”", "2ì›”", "3ì›”", "4ì›”", "5ì›”", "6ì›”", "7ì›”", "8ì›”", "9ì›”", "10ì›”", "11ì›”", "12ì›”"] -} diff --git a/node_modules/d3-time-format/locale/mk-MK.json b/node_modules/d3-time-format/locale/mk-MK.json deleted file mode 100644 index 4a47fd11eaad4816b1adf5778f5c31142de5d616..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/mk-MK.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A, %e %B %Y г. %X", - "date": "%d.%m.%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["недела", "понеделник", "вторник", "Ñреда", "четврток", "петок", "Ñабота"], - "shortDays": ["нед", "пон", "вто", "Ñре", "чет", "пет", "Ñаб"], - "months": ["јануари", "февруари", "март", "април", "мај", "јуни", "јули", "авгуÑÑ‚", "Ñептември", "октомври", "ноември", "декември"], - "shortMonths": ["јан", "фев", "мар", "апр", "мај", "јун", "јул", "авг", "Ñеп", "окт", "ное", "дек"] -} diff --git a/node_modules/d3-time-format/locale/nb-NO.json b/node_modules/d3-time-format/locale/nb-NO.json deleted file mode 100644 index a8bfd20e87651963d236e319f774a9bb687f36fa..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/nb-NO.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A den %d. %B %Y %X", - "date": "%d.%m.%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["søndag", "mandag", "tirsdag", "onsdag", "torsdag", "fredag", "lørdag"], - "shortDays": ["søn", "man", "tir", "ons", "tor", "fre", "lør"], - "months": ["januar", "februar", "mars", "april", "mai", "juni", "juli", "august", "september", "oktober", "november", "desember"], - "shortMonths": ["jan", "feb", "mars", "apr", "mai", "juni", "juli", "aug", "sep", "okt", "nov", "des"] -} diff --git a/node_modules/d3-time-format/locale/nl-NL.json b/node_modules/d3-time-format/locale/nl-NL.json deleted file mode 100644 index 375b0feb6da9d3fe530783026c9505482ca7655f..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/nl-NL.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%a %e %B %Y %X", - "date": "%d-%m-%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["zondag", "maandag", "dinsdag", "woensdag", "donderdag", "vrijdag", "zaterdag"], - "shortDays": ["zo", "ma", "di", "wo", "do", "vr", "za"], - "months": ["januari", "februari", "maart", "april", "mei", "juni", "juli", "augustus", "september", "oktober", "november", "december"], - "shortMonths": ["jan", "feb", "mrt", "apr", "mei", "jun", "jul", "aug", "sep", "okt", "nov", "dec"] -} diff --git a/node_modules/d3-time-format/locale/pl-PL.json b/node_modules/d3-time-format/locale/pl-PL.json deleted file mode 100644 index 616b4cd1b3a16be57cf4968a51c28709823e467e..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/pl-PL.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A, %e %B %Y, %X", - "date": "%d/%m/%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["Niedziela", "PoniedziaÅ‚ek", "Wtorek", "Åšroda", "Czwartek", "PiÄ…tek", "Sobota"], - "shortDays": ["Niedz.", "Pon.", "Wt.", "Åšr.", "Czw.", "Pt.", "Sob."], - "months": ["StyczeÅ„", "Luty", "Marzec", "KwiecieÅ„", "Maj", "Czerwiec", "Lipiec", "SierpieÅ„", "WrzesieÅ„", "Październik", "Listopad", "GrudzieÅ„"], - "shortMonths": ["Stycz.", "Luty", "Marz.", "Kwie.", "Maj", "Czerw.", "Lipc.", "Sierp.", "Wrz.", "Paźdz.", "Listop.", "Grudz."] -} diff --git a/node_modules/d3-time-format/locale/pt-BR.json b/node_modules/d3-time-format/locale/pt-BR.json deleted file mode 100644 index 4e9ff893c228f0fddb5e05652d5f28c56a35abe4..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/pt-BR.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A, %e de %B de %Y. %X", - "date": "%d/%m/%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"], - "shortDays": ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"], - "months": ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"], - "shortMonths": ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"] -} diff --git a/node_modules/d3-time-format/locale/ru-RU.json b/node_modules/d3-time-format/locale/ru-RU.json deleted file mode 100644 index c04231838d6fe8e3130ef0c9d62c47891c374d38..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/ru-RU.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A, %e %B %Y г. %X", - "date": "%d.%m.%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["воÑкреÑенье", "понедельник", "вторник", "Ñреда", "четверг", "пÑтница", "Ñуббота"], - "shortDays": ["вÑ", "пн", "вт", "ÑÑ€", "чт", "пт", "Ñб"], - "months": ["ÑнварÑ", "февралÑ", "марта", "апрелÑ", "маÑ", "июнÑ", "июлÑ", "авгуÑта", "ÑентÑбрÑ", "октÑбрÑ", "ноÑбрÑ", "декабрÑ"], - "shortMonths": ["Ñнв", "фев", "мар", "апр", "май", "июн", "июл", "авг", "Ñен", "окт", "ноÑ", "дек"] -} diff --git a/node_modules/d3-time-format/locale/sv-SE.json b/node_modules/d3-time-format/locale/sv-SE.json deleted file mode 100644 index 231838805ea7b59ce70af58c77d497598e32ad9f..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/sv-SE.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A den %d %B %Y %X", - "date": "%Y-%m-%d", - "time": "%H:%M:%S", - "periods": ["fm", "em"], - "days": ["Söndag", "MÃ¥ndag", "Tisdag", "Onsdag", "Torsdag", "Fredag", "Lördag"], - "shortDays": ["Sön", "MÃ¥n", "Tis", "Ons", "Tor", "Fre", "Lör"], - "months": ["Januari", "Februari", "Mars", "April", "Maj", "Juni", "Juli", "Augusti", "September", "Oktober", "November", "December"], - "shortMonths": ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dec"] -} diff --git a/node_modules/d3-time-format/locale/tr-TR.json b/node_modules/d3-time-format/locale/tr-TR.json deleted file mode 100644 index ea0557e17698d71b0c040beb7d14ad8b4193ad47..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/tr-TR.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%a %e %b %X %Y", - "date": "%d/%m/%Y", - "time": "%H:%M:%S", - "periods": ["AM", "PM"], - "days": ["Pazar", "Pazartesi", "Salı", "ÇarÅŸamba", "PerÅŸembe", "Cuma", "Cumartesi"], - "shortDays": ["Paz", "Pzt", "Sal", "Çar", "Per", "Cum", "Cmt"], - "months": ["Ocak", "Åžubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "AÄŸustos", "Eylül", "Ekim", "Kasım", "Aralık"], - "shortMonths": ["Oca", "Åžub", "Mar", "Nis", "May", "Haz", "Tem", "AÄŸu", "Eyl", "Eki", "Kas", "Ara"] -} diff --git a/node_modules/d3-time-format/locale/uk-UA.json b/node_modules/d3-time-format/locale/uk-UA.json deleted file mode 100644 index 555eed4a8e4fb0a4b3faae27490ff56d21fd72a4..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/uk-UA.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%A, %e %B %Y Ñ€. %X", - "date": "%d.%m.%Y", - "time": "%H:%M:%S", - "periods": ["дп", "пп"], - "days": ["неділÑ", "понеділок", "вівторок", "Ñереда", "четвер", "п'ÑтницÑ", "Ñубота"], - "shortDays": ["нд", "пн", "вт", "ÑÑ€", "чт", "пт", "Ñб"], - "months": ["ÑічнÑ", "лютого", "березнÑ", "квітнÑ", "травнÑ", "червнÑ", "липнÑ", "ÑерпнÑ", "вереÑнÑ", "жовтнÑ", "лиÑтопада", "груднÑ"], - "shortMonths": ["Ñіч.", "лют.", "бер.", "квіт.", "трав.", "черв.", "лип.", "Ñерп.", "вер.", "жовт.", "лиÑÑ‚.", "груд."] -} diff --git a/node_modules/d3-time-format/locale/zh-CN.json b/node_modules/d3-time-format/locale/zh-CN.json deleted file mode 100644 index 762f212a14a70ad9af7cdf4655c28effde6f6f42..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/zh-CN.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%x %A %X", - "date": "%Yå¹´%-m月%-dæ—¥", - "time": "%H:%M:%S", - "periods": ["上åˆ", "下åˆ"], - "days": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期å…"], - "shortDays": ["周日", "周一", "周二", "周三", "周四", "周五", "周å…"], - "months": ["一月", "二月", "三月", "四月", "五月", "å…月", "七月", "八月", "ä¹æœˆ", "å月", "å一月", "å二月"], - "shortMonths": ["一月", "二月", "三月", "四月", "五月", "å…月", "七月", "八月", "ä¹æœˆ", "å月", "å一月", "å二月"] -} diff --git a/node_modules/d3-time-format/locale/zh-TW.json b/node_modules/d3-time-format/locale/zh-TW.json deleted file mode 100644 index 767b2baf81454277b75a491135eca30e6978cf02..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/locale/zh-TW.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "dateTime": "%x %A %X", - "date": "%Yå¹´%-m月%-dæ—¥", - "time": "%H:%M:%S", - "periods": ["上åˆ", "下åˆ"], - "days": ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期å…"], - "shortDays": ["æ—¥", "一", "二", "三", "å››", "五", "å…"], - "months": ["一月", "二月", "三月", "四月", "五月", "å…月", "七月", "八月", "ä¹æœˆ", "å月", "å一月", "å二月"], - "shortMonths": ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"] -} diff --git a/node_modules/d3-time-format/package.json b/node_modules/d3-time-format/package.json deleted file mode 100644 index 70d7bd726ff03cd9a2d3a25fa7f39dab6d20b8ed..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/package.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "_from": "d3-time-format@3", - "_id": "d3-time-format@3.0.0", - "_inBundle": false, - "_integrity": "sha512-UXJh6EKsHBTjopVqZBhFysQcoXSv/5yLONZvkQ5Kk3qbwiUYkdX17Xa1PT6U1ZWXGGfB1ey5L8dKMlFq2DO0Ag==", - "_location": "/d3-time-format", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-time-format@3", - "name": "d3-time-format", - "escapedName": "d3-time-format", - "rawSpec": "3", - "saveSpec": null, - "fetchSpec": "3" - }, - "_requiredBy": [ - "/d3", - "/d3-scale" - ], - "_resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-3.0.0.tgz", - "_shasum": "df8056c83659e01f20ac5da5fdeae7c08d5f1bb6", - "_spec": "d3-time-format@3", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-time-format/issues" - }, - "bundleDependencies": false, - "dependencies": { - "d3-time": "1 - 2" - }, - "deprecated": false, - "description": "A JavaScript time formatter and parser inspired by strftime and strptime.", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js", - "locale/*.json" - ], - "homepage": "https://d3js.org/d3-time-format/", - "jsdelivr": "dist/d3-time-format.min.js", - "keywords": [ - "d3", - "d3-module", - "time", - "format", - "strftime", - "strptime" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-time-format.js", - "module": "src/index.js", - "name": "d3-time-format", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-time-format.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "TZ=America/Los_Angeles tape 'test/**/*-test.js' && eslint src" - }, - "sideEffects": [ - "./src/defaultLocale.js" - ], - "unpkg": "dist/d3-time-format.min.js", - "version": "3.0.0" -} diff --git a/node_modules/d3-time-format/src/defaultLocale.js b/node_modules/d3-time-format/src/defaultLocale.js deleted file mode 100644 index d762db519429d6d547f88480707044b42a318c72..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/src/defaultLocale.js +++ /dev/null @@ -1,27 +0,0 @@ -import formatLocale from "./locale.js"; - -var locale; -export var timeFormat; -export var timeParse; -export var utcFormat; -export var utcParse; - -defaultLocale({ - 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"] -}); - -export default function defaultLocale(definition) { - locale = formatLocale(definition); - timeFormat = locale.format; - timeParse = locale.parse; - utcFormat = locale.utcFormat; - utcParse = locale.utcParse; - return locale; -} diff --git a/node_modules/d3-time-format/src/index.js b/node_modules/d3-time-format/src/index.js deleted file mode 100644 index 6c93971d86cf358743a4125913bdce00c9452d16..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/src/index.js +++ /dev/null @@ -1,4 +0,0 @@ -export {default as timeFormatDefaultLocale, timeFormat, timeParse, utcFormat, utcParse} from "./defaultLocale.js"; -export {default as timeFormatLocale} from "./locale.js"; -export {default as isoFormat} from "./isoFormat.js"; -export {default as isoParse} from "./isoParse.js"; diff --git a/node_modules/d3-time-format/src/isoFormat.js b/node_modules/d3-time-format/src/isoFormat.js deleted file mode 100644 index 43185a3771d86fa19261cf8d89f939061ea4910a..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/src/isoFormat.js +++ /dev/null @@ -1,13 +0,0 @@ -import {utcFormat} from "./defaultLocale.js"; - -export var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ"; - -function formatIsoNative(date) { - return date.toISOString(); -} - -var formatIso = Date.prototype.toISOString - ? formatIsoNative - : utcFormat(isoSpecifier); - -export default formatIso; diff --git a/node_modules/d3-time-format/src/isoParse.js b/node_modules/d3-time-format/src/isoParse.js deleted file mode 100644 index 381d1c96db79cf81508f47a4718daf4145129064..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/src/isoParse.js +++ /dev/null @@ -1,13 +0,0 @@ -import {isoSpecifier} from "./isoFormat.js"; -import {utcParse} from "./defaultLocale.js"; - -function parseIsoNative(string) { - var date = new Date(string); - return isNaN(date) ? null : date; -} - -var parseIso = +new Date("2000-01-01T00:00:00.000Z") - ? parseIsoNative - : utcParse(isoSpecifier); - -export default parseIso; diff --git a/node_modules/d3-time-format/src/locale.js b/node_modules/d3-time-format/src/locale.js deleted file mode 100644 index cc0dac2557f94cc3fa1962c396b30a1fc6bb0b01..0000000000000000000000000000000000000000 --- a/node_modules/d3-time-format/src/locale.js +++ /dev/null @@ -1,697 +0,0 @@ -import { - timeDay, - timeSunday, - timeMonday, - timeThursday, - timeYear, - utcDay, - utcSunday, - utcMonday, - utcThursday, - utcYear -} from "d3-time"; - -function localDate(d) { - if (0 <= d.y && d.y < 100) { - var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L); - date.setFullYear(d.y); - return date; - } - return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L); -} - -function utcDate(d) { - if (0 <= d.y && d.y < 100) { - var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L)); - date.setUTCFullYear(d.y); - return date; - } - return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L)); -} - -function newDate(y, m, d) { - return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0}; -} - -export default function formatLocale(locale) { - var locale_dateTime = locale.dateTime, - locale_date = locale.date, - locale_time = locale.time, - locale_periods = locale.periods, - locale_weekdays = locale.days, - locale_shortWeekdays = locale.shortDays, - locale_months = locale.months, - locale_shortMonths = locale.shortMonths; - - var periodRe = formatRe(locale_periods), - periodLookup = formatLookup(locale_periods), - weekdayRe = formatRe(locale_weekdays), - weekdayLookup = formatLookup(locale_weekdays), - shortWeekdayRe = formatRe(locale_shortWeekdays), - shortWeekdayLookup = formatLookup(locale_shortWeekdays), - monthRe = formatRe(locale_months), - monthLookup = formatLookup(locale_months), - shortMonthRe = formatRe(locale_shortMonths), - shortMonthLookup = formatLookup(locale_shortMonths); - - var formats = { - "a": formatShortWeekday, - "A": formatWeekday, - "b": formatShortMonth, - "B": formatMonth, - "c": null, - "d": formatDayOfMonth, - "e": formatDayOfMonth, - "f": formatMicroseconds, - "g": formatYearISO, - "G": formatFullYearISO, - "H": formatHour24, - "I": formatHour12, - "j": formatDayOfYear, - "L": formatMilliseconds, - "m": formatMonthNumber, - "M": formatMinutes, - "p": formatPeriod, - "q": formatQuarter, - "Q": formatUnixTimestamp, - "s": formatUnixTimestampSeconds, - "S": formatSeconds, - "u": formatWeekdayNumberMonday, - "U": formatWeekNumberSunday, - "V": formatWeekNumberISO, - "w": formatWeekdayNumberSunday, - "W": formatWeekNumberMonday, - "x": null, - "X": null, - "y": formatYear, - "Y": formatFullYear, - "Z": formatZone, - "%": formatLiteralPercent - }; - - var utcFormats = { - "a": formatUTCShortWeekday, - "A": formatUTCWeekday, - "b": formatUTCShortMonth, - "B": formatUTCMonth, - "c": null, - "d": formatUTCDayOfMonth, - "e": formatUTCDayOfMonth, - "f": formatUTCMicroseconds, - "g": formatUTCYearISO, - "G": formatUTCFullYearISO, - "H": formatUTCHour24, - "I": formatUTCHour12, - "j": formatUTCDayOfYear, - "L": formatUTCMilliseconds, - "m": formatUTCMonthNumber, - "M": formatUTCMinutes, - "p": formatUTCPeriod, - "q": formatUTCQuarter, - "Q": formatUnixTimestamp, - "s": formatUnixTimestampSeconds, - "S": formatUTCSeconds, - "u": formatUTCWeekdayNumberMonday, - "U": formatUTCWeekNumberSunday, - "V": formatUTCWeekNumberISO, - "w": formatUTCWeekdayNumberSunday, - "W": formatUTCWeekNumberMonday, - "x": null, - "X": null, - "y": formatUTCYear, - "Y": formatUTCFullYear, - "Z": formatUTCZone, - "%": formatLiteralPercent - }; - - var parses = { - "a": parseShortWeekday, - "A": parseWeekday, - "b": parseShortMonth, - "B": parseMonth, - "c": parseLocaleDateTime, - "d": parseDayOfMonth, - "e": parseDayOfMonth, - "f": parseMicroseconds, - "g": parseYear, - "G": parseFullYear, - "H": parseHour24, - "I": parseHour24, - "j": parseDayOfYear, - "L": parseMilliseconds, - "m": parseMonthNumber, - "M": parseMinutes, - "p": parsePeriod, - "q": parseQuarter, - "Q": parseUnixTimestamp, - "s": parseUnixTimestampSeconds, - "S": parseSeconds, - "u": parseWeekdayNumberMonday, - "U": parseWeekNumberSunday, - "V": parseWeekNumberISO, - "w": parseWeekdayNumberSunday, - "W": parseWeekNumberMonday, - "x": parseLocaleDate, - "X": parseLocaleTime, - "y": parseYear, - "Y": parseFullYear, - "Z": parseZone, - "%": parseLiteralPercent - }; - - // These recursive directive definitions must be deferred. - formats.x = newFormat(locale_date, formats); - formats.X = newFormat(locale_time, formats); - formats.c = newFormat(locale_dateTime, formats); - utcFormats.x = newFormat(locale_date, utcFormats); - utcFormats.X = newFormat(locale_time, utcFormats); - utcFormats.c = newFormat(locale_dateTime, utcFormats); - - function newFormat(specifier, formats) { - return function(date) { - var string = [], - i = -1, - j = 0, - n = specifier.length, - c, - pad, - format; - - if (!(date instanceof Date)) date = new Date(+date); - - while (++i < n) { - if (specifier.charCodeAt(i) === 37) { - string.push(specifier.slice(j, i)); - if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i); - else pad = c === "e" ? " " : "0"; - if (format = formats[c]) c = format(date, pad); - string.push(c); - j = i + 1; - } - } - - string.push(specifier.slice(j, i)); - return string.join(""); - }; - } - - function newParse(specifier, Z) { - return function(string) { - var d = newDate(1900, undefined, 1), - i = parseSpecifier(d, specifier, string += "", 0), - week, day; - if (i != string.length) return null; - - // If a UNIX timestamp is specified, return it. - if ("Q" in d) return new Date(d.Q); - if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0)); - - // If this is utcParse, never use the local timezone. - if (Z && !("Z" in d)) d.Z = 0; - - // The am-pm flag is 0 for AM, and 1 for PM. - if ("p" in d) d.H = d.H % 12 + d.p * 12; - - // If the month was not specified, inherit from the quarter. - if (d.m === undefined) d.m = "q" in d ? d.q : 0; - - // Convert day-of-week and week-of-year to day-of-year. - if ("V" in d) { - if (d.V < 1 || d.V > 53) return null; - if (!("w" in d)) d.w = 1; - if ("Z" in d) { - week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay(); - week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week); - week = utcDay.offset(week, (d.V - 1) * 7); - d.y = week.getUTCFullYear(); - d.m = week.getUTCMonth(); - d.d = week.getUTCDate() + (d.w + 6) % 7; - } else { - week = localDate(newDate(d.y, 0, 1)), day = week.getDay(); - week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week); - week = timeDay.offset(week, (d.V - 1) * 7); - d.y = week.getFullYear(); - d.m = week.getMonth(); - d.d = week.getDate() + (d.w + 6) % 7; - } - } else if ("W" in d || "U" in d) { - if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; - day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(); - d.m = 0; - d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7; - } - - // If a time zone is specified, all fields are interpreted as UTC and then - // offset according to the specified time zone. - if ("Z" in d) { - d.H += d.Z / 100 | 0; - d.M += d.Z % 100; - return utcDate(d); - } - - // Otherwise, all fields are in local time. - return localDate(d); - }; - } - - function parseSpecifier(d, specifier, string, j) { - var i = 0, - n = specifier.length, - m = string.length, - c, - parse; - - while (i < n) { - if (j >= m) return -1; - c = specifier.charCodeAt(i++); - if (c === 37) { - c = specifier.charAt(i++); - parse = parses[c in pads ? specifier.charAt(i++) : c]; - if (!parse || ((j = parse(d, string, j)) < 0)) return -1; - } else if (c != string.charCodeAt(j++)) { - return -1; - } - } - - return j; - } - - function parsePeriod(d, string, i) { - var n = periodRe.exec(string.slice(i)); - return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; - } - - function parseShortWeekday(d, string, i) { - var n = shortWeekdayRe.exec(string.slice(i)); - return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; - } - - function parseWeekday(d, string, i) { - var n = weekdayRe.exec(string.slice(i)); - return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; - } - - function parseShortMonth(d, string, i) { - var n = shortMonthRe.exec(string.slice(i)); - return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; - } - - function parseMonth(d, string, i) { - var n = monthRe.exec(string.slice(i)); - return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; - } - - function parseLocaleDateTime(d, string, i) { - return parseSpecifier(d, locale_dateTime, string, i); - } - - function parseLocaleDate(d, string, i) { - return parseSpecifier(d, locale_date, string, i); - } - - function parseLocaleTime(d, string, i) { - return parseSpecifier(d, locale_time, string, i); - } - - function formatShortWeekday(d) { - return locale_shortWeekdays[d.getDay()]; - } - - function formatWeekday(d) { - return locale_weekdays[d.getDay()]; - } - - function formatShortMonth(d) { - return locale_shortMonths[d.getMonth()]; - } - - function formatMonth(d) { - return locale_months[d.getMonth()]; - } - - function formatPeriod(d) { - return locale_periods[+(d.getHours() >= 12)]; - } - - function formatQuarter(d) { - return 1 + ~~(d.getMonth() / 3); - } - - function formatUTCShortWeekday(d) { - return locale_shortWeekdays[d.getUTCDay()]; - } - - function formatUTCWeekday(d) { - return locale_weekdays[d.getUTCDay()]; - } - - function formatUTCShortMonth(d) { - return locale_shortMonths[d.getUTCMonth()]; - } - - function formatUTCMonth(d) { - return locale_months[d.getUTCMonth()]; - } - - function formatUTCPeriod(d) { - return locale_periods[+(d.getUTCHours() >= 12)]; - } - - function formatUTCQuarter(d) { - return 1 + ~~(d.getUTCMonth() / 3); - } - - return { - format: function(specifier) { - var f = newFormat(specifier += "", formats); - f.toString = function() { return specifier; }; - return f; - }, - parse: function(specifier) { - var p = newParse(specifier += "", false); - p.toString = function() { return specifier; }; - return p; - }, - utcFormat: function(specifier) { - var f = newFormat(specifier += "", utcFormats); - f.toString = function() { return specifier; }; - return f; - }, - utcParse: function(specifier) { - var p = newParse(specifier += "", true); - p.toString = function() { return specifier; }; - return p; - } - }; -} - -var pads = {"-": "", "_": " ", "0": "0"}, - numberRe = /^\s*\d+/, // note: ignores next directive - percentRe = /^%/, - requoteRe = /[\\^$*+?|[\]().{}]/g; - -function pad(value, fill, width) { - var sign = value < 0 ? "-" : "", - string = (sign ? -value : value) + "", - length = string.length; - return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); -} - -function requote(s) { - return s.replace(requoteRe, "\\$&"); -} - -function formatRe(names) { - return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i"); -} - -function formatLookup(names) { - return new Map(names.map((name, i) => [name.toLowerCase(), i])); -} - -function parseWeekdayNumberSunday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 1)); - return n ? (d.w = +n[0], i + n[0].length) : -1; -} - -function parseWeekdayNumberMonday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 1)); - return n ? (d.u = +n[0], i + n[0].length) : -1; -} - -function parseWeekNumberSunday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.U = +n[0], i + n[0].length) : -1; -} - -function parseWeekNumberISO(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.V = +n[0], i + n[0].length) : -1; -} - -function parseWeekNumberMonday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.W = +n[0], i + n[0].length) : -1; -} - -function parseFullYear(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 4)); - return n ? (d.y = +n[0], i + n[0].length) : -1; -} - -function parseYear(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1; -} - -function parseZone(d, string, i) { - var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6)); - return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1; -} - -function parseQuarter(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 1)); - return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1; -} - -function parseMonthNumber(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.m = n[0] - 1, i + n[0].length) : -1; -} - -function parseDayOfMonth(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.d = +n[0], i + n[0].length) : -1; -} - -function parseDayOfYear(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 3)); - return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1; -} - -function parseHour24(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.H = +n[0], i + n[0].length) : -1; -} - -function parseMinutes(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.M = +n[0], i + n[0].length) : -1; -} - -function parseSeconds(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.S = +n[0], i + n[0].length) : -1; -} - -function parseMilliseconds(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 3)); - return n ? (d.L = +n[0], i + n[0].length) : -1; -} - -function parseMicroseconds(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 6)); - return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1; -} - -function parseLiteralPercent(d, string, i) { - var n = percentRe.exec(string.slice(i, i + 1)); - return n ? i + n[0].length : -1; -} - -function parseUnixTimestamp(d, string, i) { - var n = numberRe.exec(string.slice(i)); - return n ? (d.Q = +n[0], i + n[0].length) : -1; -} - -function parseUnixTimestampSeconds(d, string, i) { - var n = numberRe.exec(string.slice(i)); - return n ? (d.s = +n[0], i + n[0].length) : -1; -} - -function formatDayOfMonth(d, p) { - return pad(d.getDate(), p, 2); -} - -function formatHour24(d, p) { - return pad(d.getHours(), p, 2); -} - -function formatHour12(d, p) { - return pad(d.getHours() % 12 || 12, p, 2); -} - -function formatDayOfYear(d, p) { - return pad(1 + timeDay.count(timeYear(d), d), p, 3); -} - -function formatMilliseconds(d, p) { - return pad(d.getMilliseconds(), p, 3); -} - -function formatMicroseconds(d, p) { - return formatMilliseconds(d, p) + "000"; -} - -function formatMonthNumber(d, p) { - return pad(d.getMonth() + 1, p, 2); -} - -function formatMinutes(d, p) { - return pad(d.getMinutes(), p, 2); -} - -function formatSeconds(d, p) { - return pad(d.getSeconds(), p, 2); -} - -function formatWeekdayNumberMonday(d) { - var day = d.getDay(); - return day === 0 ? 7 : day; -} - -function formatWeekNumberSunday(d, p) { - return pad(timeSunday.count(timeYear(d) - 1, d), p, 2); -} - -function dISO(d) { - var day = d.getDay(); - return (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d); -} - -function formatWeekNumberISO(d, p) { - d = dISO(d); - return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2); -} - -function formatWeekdayNumberSunday(d) { - return d.getDay(); -} - -function formatWeekNumberMonday(d, p) { - return pad(timeMonday.count(timeYear(d) - 1, d), p, 2); -} - -function formatYear(d, p) { - return pad(d.getFullYear() % 100, p, 2); -} - -function formatYearISO(d, p) { - d = dISO(d); - return pad(d.getFullYear() % 100, p, 2); -} - -function formatFullYear(d, p) { - return pad(d.getFullYear() % 10000, p, 4); -} - -function formatFullYearISO(d, p) { - var day = d.getDay(); - d = (day >= 4 || day === 0) ? timeThursday(d) : timeThursday.ceil(d); - return pad(d.getFullYear() % 10000, p, 4); -} - -function formatZone(d) { - var z = d.getTimezoneOffset(); - return (z > 0 ? "-" : (z *= -1, "+")) - + pad(z / 60 | 0, "0", 2) - + pad(z % 60, "0", 2); -} - -function formatUTCDayOfMonth(d, p) { - return pad(d.getUTCDate(), p, 2); -} - -function formatUTCHour24(d, p) { - return pad(d.getUTCHours(), p, 2); -} - -function formatUTCHour12(d, p) { - return pad(d.getUTCHours() % 12 || 12, p, 2); -} - -function formatUTCDayOfYear(d, p) { - return pad(1 + utcDay.count(utcYear(d), d), p, 3); -} - -function formatUTCMilliseconds(d, p) { - return pad(d.getUTCMilliseconds(), p, 3); -} - -function formatUTCMicroseconds(d, p) { - return formatUTCMilliseconds(d, p) + "000"; -} - -function formatUTCMonthNumber(d, p) { - return pad(d.getUTCMonth() + 1, p, 2); -} - -function formatUTCMinutes(d, p) { - return pad(d.getUTCMinutes(), p, 2); -} - -function formatUTCSeconds(d, p) { - return pad(d.getUTCSeconds(), p, 2); -} - -function formatUTCWeekdayNumberMonday(d) { - var dow = d.getUTCDay(); - return dow === 0 ? 7 : dow; -} - -function formatUTCWeekNumberSunday(d, p) { - return pad(utcSunday.count(utcYear(d) - 1, d), p, 2); -} - -function UTCdISO(d) { - var day = d.getUTCDay(); - return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d); -} - -function formatUTCWeekNumberISO(d, p) { - d = UTCdISO(d); - return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2); -} - -function formatUTCWeekdayNumberSunday(d) { - return d.getUTCDay(); -} - -function formatUTCWeekNumberMonday(d, p) { - return pad(utcMonday.count(utcYear(d) - 1, d), p, 2); -} - -function formatUTCYear(d, p) { - return pad(d.getUTCFullYear() % 100, p, 2); -} - -function formatUTCYearISO(d, p) { - d = UTCdISO(d); - return pad(d.getUTCFullYear() % 100, p, 2); -} - -function formatUTCFullYear(d, p) { - return pad(d.getUTCFullYear() % 10000, p, 4); -} - -function formatUTCFullYearISO(d, p) { - var day = d.getUTCDay(); - d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d); - return pad(d.getUTCFullYear() % 10000, p, 4); -} - -function formatUTCZone() { - return "+0000"; -} - -function formatLiteralPercent() { - return "%"; -} - -function formatUnixTimestamp(d) { - return +d; -} - -function formatUnixTimestampSeconds(d) { - return Math.floor(+d / 1000); -} diff --git a/node_modules/d3-time/LICENSE b/node_modules/d3-time/LICENSE deleted file mode 100644 index 721bd22ece6587a9408eda1b6a3949c425b5624a..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-time/README.md b/node_modules/d3-time/README.md deleted file mode 100644 index 94e9183dcef27a18c84be451be2efb0656a9c400..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/README.md +++ /dev/null @@ -1,333 +0,0 @@ -# d3-time - -When visualizing time series data, analyzing temporal patterns, or working with time in general, the irregularities of conventional time units quickly become apparent. In the [Gregorian calendar](https://en.wikipedia.org/wiki/Gregorian_calendar), for example, most months have 31 days but some have 28, 29 or 30; most years have 365 days but [leap years](https://en.wikipedia.org/wiki/Leap_year) have 366; and with [daylight saving](https://en.wikipedia.org/wiki/Daylight_saving_time), most days have 24 hours but some have 23 or 25. Adding to complexity, daylight saving conventions vary around the world. - -As a result of these temporal peculiarities, it can be difficult to perform seemingly-trivial tasks. For example, if you want to compute the number of days that have passed between two dates, you can’t simply subtract and divide by 24 hours (86,400,000 ms): - -```js -var start = new Date(2015, 02, 01), // Sun Mar 01 2015 00:00:00 GMT-0800 (PST) - end = new Date(2015, 03, 01); // Wed Apr 01 2015 00:00:00 GMT-0700 (PDT) -(end - start) / 864e5; // 30.958333333333332, oops! -``` - -You can, however, use [d3.timeDay](#timeDay).[count](#interval_count): - -```js -d3.timeDay.count(start, end); // 31 -``` - -The [day](#day) [interval](#api-reference) is one of several provided by d3-time. Each interval represents a conventional unit of time—[hours](#timeHour), [weeks](#timeWeek), [months](#timeMonth), *etc.*—and has methods to calculate boundary dates. For example, [d3.timeDay](#timeDay) computes midnight (typically 12:00 AM local time) of the corresponding day. In addition to [rounding](#interval_round) and [counting](#interval_count), intervals can also be used to generate arrays of boundary dates. For example, to compute each Sunday in the current month: - -```js -var now = new Date; -d3.timeWeek.range(d3.timeMonth.floor(now), d3.timeMonth.ceil(now)); -// [Sun Jun 07 2015 00:00:00 GMT-0700 (PDT), -// Sun Jun 14 2015 00:00:00 GMT-0700 (PDT), -// Sun Jun 21 2015 00:00:00 GMT-0700 (PDT), -// Sun Jun 28 2015 00:00:00 GMT-0700 (PDT)] -``` - -The d3-time module does not implement its own calendaring system; it merely implements a convenient API for calendar math on top of ECMAScript [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date). Thus, it ignores leap seconds and can only work with the local time zone and [Coordinated Universal Time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time) (UTC). - -This module is used by D3’s time scales to generate sensible ticks, by D3’s time format, and can also be used directly to do things like [calendar layouts](http://bl.ocks.org/mbostock/4063318). - -## Installing - -If you use NPM, `npm install d3-time`. Otherwise, download the [latest release](https://github.com/d3/d3-time/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-time.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-time.v2.min.js"></script> -<script> - -var day = d3.timeDay(new Date); - -</script> -``` - -[Try d3-time in your browser.](https://observablehq.com/collection/@d3/d3-time) - -## API Reference - -<a name="_interval" href="#_interval">#</a> <i>interval</i>([<i>date</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/interval.js) - -Equivalent to [*interval*.floor](#interval_floor), except it *date* is not specified, it defaults to the current time. For example, [d3.timeYear](#timeYear)(*date*) and d3.timeYear.floor(*date*) are equivalent. - -```js -var monday = d3.timeMonday(); // The latest preceeding Monday, local time. -``` - -<a name="interval_floor" href="#interval_floor">#</a> <i>interval</i>.<b>floor</b>(<i>date</i>) · [Source](https://github.com/d3/d3-time/blob/master/src/interval.js) - -Returns a new date representing the latest interval boundary date before or equal to *date*. For example, [d3.timeDay](#timeDay).floor(*date*) typically returns 12:00 AM local time on the given *date*. - -This method is idempotent: if the specified *date* is already floored to the current interval, a new date with an identical time is returned. Furthermore, the returned date is the minimum expressible value of the associated interval, such that *interval*.floor(*interval*.floor(*date*) - 1) returns the preceeding interval boundary date. - -Note that the `==` and `===` operators do not compare by value with [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) objects, and thus you cannot use them to tell whether the specified *date* has already been floored. Instead, coerce to a number and then compare: - -```js -// Returns true if the specified date is a day boundary. -function isDay(date) { - return +d3.timeDay.floor(date) === +date; -} -``` - -This is more reliable than testing whether the time is 12:00 AM, as in some time zones midnight may not exist due to daylight saving. - -<a name="interval_round" href="#interval_round">#</a> <i>interval</i>.<b>round</b>(<i>date</i>) · [Source](https://github.com/d3/d3-time/blob/master/src/interval.js) - -Returns a new date representing the closest interval boundary date to *date*. For example, [d3.timeDay](#timeDay).round(*date*) typically returns 12:00 AM local time on the given *date* if it is on or before noon, and 12:00 AM of the following day if it is after noon. - -This method is idempotent: if the specified *date* is already rounded to the current interval, a new date with an identical time is returned. - -<a name="interval_ceil" href="#interval_ceil">#</a> <i>interval</i>.<b>ceil</b>(<i>date</i>) · [Source](https://github.com/d3/d3-time/blob/master/src/interval.js) - -Returns a new date representing the earliest interval boundary date after or equal to *date*. For example, [d3.timeDay](#timeDay).ceil(*date*) typically returns 12:00 AM local time on the date following the given *date*. - -This method is idempotent: if the specified *date* is already ceilinged to the current interval, a new date with an identical time is returned. Furthermore, the returned date is the maximum expressible value of the associated interval, such that *interval*.ceil(*interval*.ceil(*date*) + 1) returns the following interval boundary date. - -<a name="interval_offset" href="#interval_offset">#</a> <i>interval</i>.<b>offset</b>(<i>date</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/interval.js) - -Returns a new date equal to *date* plus *step* intervals. If *step* is not specified it defaults to 1. If *step* is negative, then the returned date will be before the specified *date*; if *step* is zero, then a copy of the specified *date* is returned; if *step* is not an integer, it is [floored](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor). This method does not round the specified *date* to the interval. For example, if *date* is today at 5:34 PM, then [d3.timeDay](#timeDay).offset(*date*, 1) returns 5:34 PM tomorrow (even if daylight saving changes!). - -<a name="interval_range" href="#interval_range">#</a> <i>interval</i>.<b>range</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/interval.js) - -Returns an array of dates representing every interval boundary after or equal to *start* (inclusive) and before *stop* (exclusive). If *step* is specified, then every *step*th boundary will be returned; for example, for the [d3.timeDay](#timeDay) interval a *step* of 2 will return every other day. If *step* is not an integer, it is [floored](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/floor). - -The first date in the returned array is the earliest boundary after or equal to *start*; subsequent dates are [offset](#interval_offset) by *step* intervals and [floored](#interval_floor). Thus, two overlapping ranges may be consistent. For example, this range contains odd days: - -```js -d3.timeDay.range(new Date(2015, 0, 1), new Date(2015, 0, 7), 2); -// [Thu Jan 01 2015 00:00:00 GMT-0800 (PST), -// Sat Jan 03 2015 00:00:00 GMT-0800 (PST), -// Mon Jan 05 2015 00:00:00 GMT-0800 (PST)] -``` - -While this contains even days: - -```js -d3.timeDay.range(new Date(2015, 0, 2), new Date(2015, 0, 8), 2); -// [Fri Jan 02 2015 00:00:00 GMT-0800 (PST), -// Sun Jan 04 2015 00:00:00 GMT-0800 (PST), -// Tue Jan 06 2015 00:00:00 GMT-0800 (PST)] -``` - -To make ranges consistent when a *step* is specified, use [*interval*.every](#interval_every) instead. - -<a name="interval_filter" href="#interval_filter">#</a> <i>interval</i>.<b>filter</b>(<i>test</i>) · [Source](https://github.com/d3/d3-time/blob/master/src/interval.js) - -Returns a new interval that is a filtered subset of this interval using the specified *test* function. The *test* function is passed a date and should return true if and only if the specified date should be considered part of the interval. For example, to create an interval that returns the 1st, 11th, 21th and 31th (if it exists) of each month: - -```js -var i = d3.timeDay.filter(function(d) { return (d.getDate() - 1) % 10 === 0; }); -``` - -The returned filtered interval does not support [*interval*.count](#interval_count). See also [*interval*.every](#interval_every). - -<a name="interval_every" href="#interval_every">#</a> <i>interval</i>.<b>every</b>(<i>step</i>) · [Source](https://github.com/d3/d3-time/blob/master/src/interval.js) - -Returns a [filtered](#interval_filter) view of this interval representing every *step*th date. The meaning of *step* is dependent on this interval’s parent interval as defined by the field function. For example, [d3.timeMinute](#timeMinute).every(15) returns an interval representing every fifteen minutes, starting on the hour: :00, :15, :30, :45, <i>etc.</i> Note that for some intervals, the resulting dates may not be uniformly-spaced; [d3.timeDay](#timeDay)’s parent interval is [d3.timeMonth](#timeMonth), and thus the interval number resets at the start of each month. If *step* is not valid, returns null. If *step* is one, returns this interval. - -This method can be used in conjunction with [*interval*.range](#interval_range) to ensure that two overlapping ranges are consistent. For example, this range contains odd days: - -```js -d3.timeDay.every(2).range(new Date(2015, 0, 1), new Date(2015, 0, 7)); -// [Thu Jan 01 2015 00:00:00 GMT-0800 (PST), -// Sat Jan 03 2015 00:00:00 GMT-0800 (PST), -// Mon Jan 05 2015 00:00:00 GMT-0800 (PST)] -``` - -As does this one: - -```js -d3.timeDay.every(2).range(new Date(2015, 0, 2), new Date(2015, 0, 8)); -// [Sat Jan 03 2015 00:00:00 GMT-0800 (PST), -// Mon Jan 05 2015 00:00:00 GMT-0800 (PST), -// Wed Jan 07 2015 00:00:00 GMT-0800 (PST)] -``` - -The returned filtered interval does not support [*interval*.count](#interval_count). See also [*interval*.filter](#interval_filter). - -<a name="interval_count" href="#interval_count">#</a> <i>interval</i>.<b>count</b>(<i>start</i>, <i>end</i>) · [Source](https://github.com/d3/d3-time/blob/master/src/interval.js) - -Returns the number of interval boundaries after *start* (exclusive) and before or equal to *end* (inclusive). Note that this behavior is slightly different than [*interval*.range](#interval_range) because its purpose is to return the zero-based number of the specified *end* date relative to the specified *start* date. For example, to compute the current zero-based day-of-year number: - -```js -var now = new Date; -d3.timeDay.count(d3.timeYear(now), now); // 177 -``` - -Likewise, to compute the current zero-based week-of-year number for weeks that start on Sunday: - -```js -d3.timeSunday.count(d3.timeYear(now), now); // 25 -``` - -<a name="timeInterval" href="#timeInterval">#</a> d3.<b>timeInterval</b>(<i>floor</i>, <i>offset</i>[, <i>count</i>[, <i>field</i>]]) · [Source](https://github.com/d3/d3-time/blob/master/src/interval.js) - -Constructs a new custom interval given the specified *floor* and *offset* functions and an optional *count* function. - -The *floor* function takes a single date as an argument and rounds it down to the nearest interval boundary. - -The *offset* function takes a date and an integer step as arguments and advances the specified date by the specified number of boundaries; the step may be positive, negative or zero. - -The optional *count* function takes a start date and an end date, already floored to the current interval, and returns the number of boundaries between the start (exclusive) and end (inclusive). If a *count* function is not specified, the returned interval does not expose [*interval*.count](#interval_count) or [*interval*.every](#interval_every) methods. Note: due to an internal optimization, the specified *count* function must not invoke *interval*.count on other time intervals. - -The optional *field* function takes a date, already floored to the current interval, and returns the field value of the specified date, corresponding to the number of boundaries between this date (exclusive) and the latest previous parent boundary. For example, for the [d3.timeDay](#timeDay) interval, this returns the number of days since the start of the month. If a *field* function is not specified, it defaults to counting the number of interval boundaries since the UNIX epoch of January 1, 1970 UTC. The *field* function defines the behavior of [*interval*.every](#interval_every). - -### Intervals - -The following intervals are provided: - -<a name="timeMillisecond" href="#timeMillisecond">#</a> d3.<b>timeMillisecond</b> · [Source](https://github.com/d3/d3-time/blob/master/src/millisecond.js "Source") -<br><a href="#timeMillisecond">#</a> d3.<b>utcMillisecond</b> - -Milliseconds; the shortest available time unit. - -<a name="timeSecond" href="#timeSecond">#</a> d3.<b>timeSecond</b> · [Source](https://github.com/d3/d3-time/blob/master/src/second.js "Source") -<br><a href="#timeSecond">#</a> d3.<b>utcSecond</b> - -Seconds (e.g., 01:23:45.0000 AM); 1,000 milliseconds. - -<a name="timeMinute" href="#timeMinute">#</a> d3.<b>timeMinute</b> · [Source](https://github.com/d3/d3-time/blob/master/src/minute.js "Source") -<br><a href="#timeMinute">#</a> d3.<b>utcMinute</b> · [Source](https://github.com/d3/d3-time/blob/master/src/utcMinute.js "Source") - -Minutes (e.g., 01:02:00 AM); 60 seconds. Note that ECMAScript [ignores leap seconds](http://www.ecma-international.org/ecma-262/5.1/#sec-15.9.1.1). - -<a name="timeHour" href="#timeHour">#</a> d3.<b>timeHour</b> · [Source](https://github.com/d3/d3-time/blob/master/src/hour.js "Source") -<br><a href="#timeHour">#</a> d3.<b>utcHour</b> · [Source](https://github.com/d3/d3-time/blob/master/src/utcHour.js "Source") - -Hours (e.g., 01:00 AM); 60 minutes. Note that advancing time by one hour in local time can return the same hour or skip an hour due to daylight saving. - -<a name="timeDay" href="#timeDay">#</a> d3.<b>timeDay</b> · [Source](https://github.com/d3/d3-time/blob/master/src/day.js "Source") -<br><a href="#timeDay">#</a> d3.<b>utcDay</b> · [Source](https://github.com/d3/d3-time/blob/master/src/utcDay.js "Source") - -Days (e.g., February 7, 2012 at 12:00 AM); typically 24 hours. Days in local time may range from 23 to 25 hours due to daylight saving. - -<a name="timeWeek" href="#timeWeek">#</a> d3.<b>timeWeek</b> · [Source](https://github.com/d3/d3-time/blob/master/src/week.js "Source") -<br><a href="#timeWeek">#</a> d3.<b>utcWeek</b> · [Source](https://github.com/d3/d3-time/blob/master/src/utcWeek.js "Source") - -Alias for [d3.timeSunday](#timeSunday); 7 days and typically 168 hours. Weeks in local time may range from 167 to 169 hours due on daylight saving. - -<a name="timeSunday" href="#timeSunday">#</a> d3.<b>timeSunday</b> · [Source](https://github.com/d3/d3-time/blob/master/src/week.js) -<br><a href="#timeSunday">#</a> d3.<b>utcSunday</b> · [Source](https://github.com/d3/d3-time/blob/master/src/utcWeek.js) - -Sunday-based weeks (e.g., February 5, 2012 at 12:00 AM). - -<a name="timeMonday" href="#timeMonday">#</a> d3.<b>timeMonday</b> · [Source](https://github.com/d3/d3-time/blob/master/src/week.js) -<br><a href="#timeMonday">#</a> d3.<b>utcMonday</b> · [Source](https://github.com/d3/d3-time/blob/master/src/utcWeek.js) - -Monday-based weeks (e.g., February 6, 2012 at 12:00 AM). - -<a name="timeTuesday" href="#timeTuesday">#</a> d3.<b>timeTuesday</b> · [Source](https://github.com/d3/d3-time/blob/master/src/week.js) -<br><a href="#timeTuesday">#</a> d3.<b>utcTuesday</b> · [Source](https://github.com/d3/d3-time/blob/master/src/utcWeek.js) - -Tuesday-based weeks (e.g., February 7, 2012 at 12:00 AM). - -<a name="timeWednesday" href="#timeWednesday">#</a> d3.<b>timeWednesday</b> · [Source](https://github.com/d3/d3-time/blob/master/src/week.js) -<br><a href="#timeWednesday">#</a> d3.<b>utcWednesday</b> · [Source](https://github.com/d3/d3-time/blob/master/src/utcWeek.js) - -Wednesday-based weeks (e.g., February 8, 2012 at 12:00 AM). - -<a name="timeThursday" href="#timeThursday">#</a> d3.<b>timeThursday</b> · [Source](https://github.com/d3/d3-time/blob/master/src/week.js) -<br><a href="#timeThursday">#</a> d3.<b>utcThursday</b> · [Source](https://github.com/d3/d3-time/blob/master/src/utcWeek.js) - -Thursday-based weeks (e.g., February 9, 2012 at 12:00 AM). - -<a name="timeFriday" href="#timeFriday">#</a> d3.<b>timeFriday</b> · [Source](https://github.com/d3/d3-time/blob/master/src/week.js) -<br><a href="#timeFriday">#</a> d3.<b>utcFriday</b> · [Source](https://github.com/d3/d3-time/blob/master/src/utcWeek.js) - -Friday-based weeks (e.g., February 10, 2012 at 12:00 AM). - -<a name="timeSaturday" href="#timeSaturday">#</a> d3.<b>timeSaturday</b> · [Source](https://github.com/d3/d3-time/blob/master/src/week.js) -<br><a href="#timeSaturday">#</a> d3.<b>utcSaturday</b> · [Source](https://github.com/d3/d3-time/blob/master/src/utcWeek.js) - -Saturday-based weeks (e.g., February 11, 2012 at 12:00 AM). - -<a name="timeMonth" href="#timeMonth">#</a> d3.<b>timeMonth</b> · [Source](https://github.com/d3/d3-time/blob/master/src/month.js "Source") -<br><a href="#timeMonth">#</a> d3.<b>utcMonth</b> · [Source](https://github.com/d3/d3-time/blob/master/src/utcMonth.js "Source") - -Months (e.g., February 1, 2012 at 12:00 AM); ranges from 28 to 31 days. - -<a name="timeYear" href="#timeYear">#</a> d3.<b>timeYear</b> · [Source](https://github.com/d3/d3-time/blob/master/src/year.js "Source") -<br><a href="#timeYear">#</a> d3.<b>utcYear</b> · [Source](https://github.com/d3/d3-time/blob/master/src/utcYear.js "Source") - -Years (e.g., January 1, 2012 at 12:00 AM); ranges from 365 to 366 days. - -### Ranges - -For convenience, aliases for [*interval*.range](#interval_range) are also provided as plural forms of the corresponding interval. - -<a name="timeMilliseconds" href="#timeMilliseconds">#</a> d3.<b>timeMilliseconds</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/millisecond.js) -<br><a href="#timeMilliseconds">#</a> d3.<b>utcMilliseconds</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) - -Aliases for [d3.timeMillisecond](#timeMillisecond).[range](#interval_range) and [d3.utcMillisecond](#timeMillisecond).[range](#interval_range). - -<a name="timeSeconds" href="#timeSeconds">#</a> d3.<b>timeSeconds</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/second.js) -<br><a href="#timeSeconds">#</a> d3.<b>utcSeconds</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) - -Aliases for [d3.timeSecond](#timeSecond).[range](#interval_range) and [d3.utcSecond](#timeSecond).[range](#interval_range). - -<a name="timeMinutes" href="#timeMinutes">#</a> d3.<b>timeMinutes</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/minute.js) -<br><a href="#timeMinutes">#</a> d3.<b>utcMinutes</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/utcMinute.js) - -Aliases for [d3.timeMinute](#timeMinute).[range](#interval_range) and [d3.utcMinute](#timeMinute).[range](#interval_range). - -<a name="timeHours" href="#timeHours">#</a> d3.<b>timeHours</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/hour.js) -<br><a href="#timeHours">#</a> d3.<b>utcHours</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/utcHour.js) - -Aliases for [d3.timeHour](#timeHour).[range](#interval_range) and [d3.utcHour](#timeHour).[range](#interval_range). - -<a name="timeDays" href="#timeDays">#</a> d3.<b>timeDays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/day.js) -<br><a href="#timeDays">#</a> d3.<b>utcDays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/utcDay.js) - -Aliases for [d3.timeDay](#timeDay).[range](#interval_range) and [d3.utcDay](#timeDay).[range](#interval_range). - -<a name="timeWeeks" href="#timeWeeks">#</a> d3.<b>timeWeeks</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) -<br><a href="#timeWeeks">#</a> d3.<b>utcWeeks</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) - -Aliases for [d3.timeWeek](#timeWeek).[range](#interval_range) and [d3.utcWeek](#timeWeek).[range](#interval_range). - -<a name="timeSundays" href="#timeSundays">#</a> d3.<b>timeSundays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/week.js) -<br><a href="#timeSundays">#</a> d3.<b>utcSundays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/utcWeek.js) - -Aliases for [d3.timeSunday](#timeSunday).[range](#interval_range) and [d3.utcSunday](#timeSunday).[range](#interval_range). - -<a name="timeMondays" href="#timeMondays">#</a> d3.<b>timeMondays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/week.js) -<br><a href="#timeMondays">#</a> d3.<b>utcMondays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/utcWeek.js) - -Aliases for [d3.timeMonday](#timeMonday).[range](#interval_range) and [d3.utcMonday](#timeMonday).[range](#interval_range). - -<a name="timeTuesdays" href="#timeTuesdays">#</a> d3.<b>timeTuesdays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/week.js) -<br><a href="#timeTuesdays">#</a> d3.<b>utcTuesdays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/utcWeek.js) - -Aliases for [d3.timeTuesday](#timeTuesday).[range](#interval_range) and [d3.utcTuesday](#timeTuesday).[range](#interval_range). - -<a name="timeWednesdays" href="#timeWednesdays">#</a> d3.<b>timeWednesdays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/week.js) -<br><a href="#timeWednesdays">#</a> d3.<b>utcWednesdays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/utcWeek.js) - -Aliases for [d3.timeWednesday](#timeWednesday).[range](#interval_range) and [d3.utcWednesday](#timeWednesday).[range](#interval_range). - -<a name="timeThursdays" href="#timeThursdays">#</a> d3.<b>timeThursdays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/week.js) -<br><a href="#timeThursdays">#</a> d3.<b>utcThursdays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/utcWeek.js) - -Aliases for [d3.timeThursday](#timeThursday).[range](#interval_range) and [d3.utcThursday](#timeThursday).[range](#interval_range). - -<a name="timeFridays" href="#timeFridays">#</a> d3.<b>timeFridays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/week.js) -<br><a href="#timeFridays">#</a> d3.<b>utcFridays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/utcWeek.js) - -Aliases for [d3.timeFriday](#timeFriday).[range](#interval_range) and [d3.utcFriday](#timeFriday).[range](#interval_range). - -<a name="timeSaturdays" href="#timeSaturdays">#</a> d3.<b>timeSaturdays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/week.js) -<br><a href="#timeSaturdays">#</a> d3.<b>utcSaturdays</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/utcWeek.js) - -Aliases for [d3.timeSaturday](#timeSaturday).[range](#interval_range) and [d3.utcSaturday](#timeSaturday).[range](#interval_range). - -<a name="timeMonths" href="#timeMonths">#</a> d3.<b>timeMonths</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/month.js) -<br><a href="#timeMonths">#</a> d3.<b>utcMonths</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/utcMonth.js) - -Aliases for [d3.timeMonth](#timeMonth).[range](#interval_range) and [d3.utcMonth](#timeMonth).[range](#interval_range). - -<a name="timeYears" href="#timeYears">#</a> d3.<b>timeYears</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/year.js) -<br><a href="#timeYears">#</a> d3.<b>utcYears</b>(<i>start</i>, <i>stop</i>[, <i>step</i>]) · [Source](https://github.com/d3/d3-time/blob/master/src/utcYear.js) - -Aliases for [d3.timeYear](#timeYear).[range](#interval_range) and [d3.utcYear](#timeYear).[range](#interval_range). diff --git a/node_modules/d3-time/dist/d3-time.js b/node_modules/d3-time/dist/d3-time.js deleted file mode 100644 index da701cb9fdbd5c69a2b128e0787106ad6599efd2..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/dist/d3-time.js +++ /dev/null @@ -1,370 +0,0 @@ -// https://d3js.org/d3-time/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {})); -}(this, function (exports) { 'use strict'; - -var t0 = new Date, - t1 = new Date; - -function newInterval(floori, offseti, count, field) { - - function interval(date) { - return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date; - } - - interval.floor = function(date) { - return floori(date = new Date(+date)), date; - }; - - interval.ceil = function(date) { - return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date; - }; - - interval.round = function(date) { - var d0 = interval(date), - d1 = interval.ceil(date); - return date - d0 < d1 - date ? d0 : d1; - }; - - interval.offset = function(date, step) { - return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date; - }; - - interval.range = function(start, stop, step) { - var range = [], previous; - start = interval.ceil(start); - step = step == null ? 1 : Math.floor(step); - if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date - do range.push(previous = new Date(+start)), offseti(start, step), floori(start); - while (previous < start && start < stop); - return range; - }; - - interval.filter = function(test) { - return newInterval(function(date) { - if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1); - }, function(date, step) { - if (date >= date) { - if (step < 0) while (++step <= 0) { - while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty - } else while (--step >= 0) { - while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty - } - } - }); - }; - - if (count) { - interval.count = function(start, end) { - t0.setTime(+start), t1.setTime(+end); - floori(t0), floori(t1); - return Math.floor(count(t0, t1)); - }; - - interval.every = function(step) { - step = Math.floor(step); - return !isFinite(step) || !(step > 0) ? null - : !(step > 1) ? interval - : interval.filter(field - ? function(d) { return field(d) % step === 0; } - : function(d) { return interval.count(0, d) % step === 0; }); - }; - } - - return interval; -} - -var millisecond = newInterval(function() { - // noop -}, function(date, step) { - date.setTime(+date + step); -}, function(start, end) { - return end - start; -}); - -// An optimized implementation for this simple case. -millisecond.every = function(k) { - k = Math.floor(k); - if (!isFinite(k) || !(k > 0)) return null; - if (!(k > 1)) return millisecond; - return newInterval(function(date) { - date.setTime(Math.floor(date / k) * k); - }, function(date, step) { - date.setTime(+date + step * k); - }, function(start, end) { - return (end - start) / k; - }); -}; -var milliseconds = millisecond.range; - -var durationSecond = 1e3; -var durationMinute = 6e4; -var durationHour = 36e5; -var durationDay = 864e5; -var durationWeek = 6048e5; - -var second = newInterval(function(date) { - date.setTime(date - date.getMilliseconds()); -}, function(date, step) { - date.setTime(+date + step * durationSecond); -}, function(start, end) { - return (end - start) / durationSecond; -}, function(date) { - return date.getUTCSeconds(); -}); -var seconds = second.range; - -var minute = newInterval(function(date) { - date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond); -}, function(date, step) { - date.setTime(+date + step * durationMinute); -}, function(start, end) { - return (end - start) / durationMinute; -}, function(date) { - return date.getMinutes(); -}); -var minutes = minute.range; - -var hour = newInterval(function(date) { - date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute); -}, function(date, step) { - date.setTime(+date + step * durationHour); -}, function(start, end) { - return (end - start) / durationHour; -}, function(date) { - return date.getHours(); -}); -var hours = hour.range; - -var day = newInterval( - date => date.setHours(0, 0, 0, 0), - (date, step) => date.setDate(date.getDate() + step), - (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay, - date => date.getDate() - 1 -); -var days = day.range; - -function weekday(i) { - return newInterval(function(date) { - date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7); - date.setHours(0, 0, 0, 0); - }, function(date, step) { - date.setDate(date.getDate() + step * 7); - }, function(start, end) { - return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek; - }); -} - -var sunday = weekday(0); -var monday = weekday(1); -var tuesday = weekday(2); -var wednesday = weekday(3); -var thursday = weekday(4); -var friday = weekday(5); -var saturday = weekday(6); - -var sundays = sunday.range; -var mondays = monday.range; -var tuesdays = tuesday.range; -var wednesdays = wednesday.range; -var thursdays = thursday.range; -var fridays = friday.range; -var saturdays = saturday.range; - -var month = newInterval(function(date) { - date.setDate(1); - date.setHours(0, 0, 0, 0); -}, function(date, step) { - date.setMonth(date.getMonth() + step); -}, function(start, end) { - return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12; -}, function(date) { - return date.getMonth(); -}); -var months = month.range; - -var year = newInterval(function(date) { - date.setMonth(0, 1); - date.setHours(0, 0, 0, 0); -}, function(date, step) { - date.setFullYear(date.getFullYear() + step); -}, function(start, end) { - return end.getFullYear() - start.getFullYear(); -}, function(date) { - return date.getFullYear(); -}); - -// An optimized implementation for this simple case. -year.every = function(k) { - return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) { - date.setFullYear(Math.floor(date.getFullYear() / k) * k); - date.setMonth(0, 1); - date.setHours(0, 0, 0, 0); - }, function(date, step) { - date.setFullYear(date.getFullYear() + step * k); - }); -}; -var years = year.range; - -var utcMinute = newInterval(function(date) { - date.setUTCSeconds(0, 0); -}, function(date, step) { - date.setTime(+date + step * durationMinute); -}, function(start, end) { - return (end - start) / durationMinute; -}, function(date) { - return date.getUTCMinutes(); -}); -var utcMinutes = utcMinute.range; - -var utcHour = newInterval(function(date) { - date.setUTCMinutes(0, 0, 0); -}, function(date, step) { - date.setTime(+date + step * durationHour); -}, function(start, end) { - return (end - start) / durationHour; -}, function(date) { - return date.getUTCHours(); -}); -var utcHours = utcHour.range; - -var utcDay = newInterval(function(date) { - date.setUTCHours(0, 0, 0, 0); -}, function(date, step) { - date.setUTCDate(date.getUTCDate() + step); -}, function(start, end) { - return (end - start) / durationDay; -}, function(date) { - return date.getUTCDate() - 1; -}); -var utcDays = utcDay.range; - -function utcWeekday(i) { - return newInterval(function(date) { - date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7); - date.setUTCHours(0, 0, 0, 0); - }, function(date, step) { - date.setUTCDate(date.getUTCDate() + step * 7); - }, function(start, end) { - return (end - start) / durationWeek; - }); -} - -var utcSunday = utcWeekday(0); -var utcMonday = utcWeekday(1); -var utcTuesday = utcWeekday(2); -var utcWednesday = utcWeekday(3); -var utcThursday = utcWeekday(4); -var utcFriday = utcWeekday(5); -var utcSaturday = utcWeekday(6); - -var utcSundays = utcSunday.range; -var utcMondays = utcMonday.range; -var utcTuesdays = utcTuesday.range; -var utcWednesdays = utcWednesday.range; -var utcThursdays = utcThursday.range; -var utcFridays = utcFriday.range; -var utcSaturdays = utcSaturday.range; - -var utcMonth = newInterval(function(date) { - date.setUTCDate(1); - date.setUTCHours(0, 0, 0, 0); -}, function(date, step) { - date.setUTCMonth(date.getUTCMonth() + step); -}, function(start, end) { - return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12; -}, function(date) { - return date.getUTCMonth(); -}); -var utcMonths = utcMonth.range; - -var utcYear = newInterval(function(date) { - date.setUTCMonth(0, 1); - date.setUTCHours(0, 0, 0, 0); -}, function(date, step) { - date.setUTCFullYear(date.getUTCFullYear() + step); -}, function(start, end) { - return end.getUTCFullYear() - start.getUTCFullYear(); -}, function(date) { - return date.getUTCFullYear(); -}); - -// An optimized implementation for this simple case. -utcYear.every = function(k) { - return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) { - date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k); - date.setUTCMonth(0, 1); - date.setUTCHours(0, 0, 0, 0); - }, function(date, step) { - date.setUTCFullYear(date.getUTCFullYear() + step * k); - }); -}; -var utcYears = utcYear.range; - -exports.timeDay = day; -exports.timeDays = days; -exports.timeFriday = friday; -exports.timeFridays = fridays; -exports.timeHour = hour; -exports.timeHours = hours; -exports.timeInterval = newInterval; -exports.timeMillisecond = millisecond; -exports.timeMilliseconds = milliseconds; -exports.timeMinute = minute; -exports.timeMinutes = minutes; -exports.timeMonday = monday; -exports.timeMondays = mondays; -exports.timeMonth = month; -exports.timeMonths = months; -exports.timeSaturday = saturday; -exports.timeSaturdays = saturdays; -exports.timeSecond = second; -exports.timeSeconds = seconds; -exports.timeSunday = sunday; -exports.timeSundays = sundays; -exports.timeThursday = thursday; -exports.timeThursdays = thursdays; -exports.timeTuesday = tuesday; -exports.timeTuesdays = tuesdays; -exports.timeWednesday = wednesday; -exports.timeWednesdays = wednesdays; -exports.timeWeek = sunday; -exports.timeWeeks = sundays; -exports.timeYear = year; -exports.timeYears = years; -exports.utcDay = utcDay; -exports.utcDays = utcDays; -exports.utcFriday = utcFriday; -exports.utcFridays = utcFridays; -exports.utcHour = utcHour; -exports.utcHours = utcHours; -exports.utcMillisecond = millisecond; -exports.utcMilliseconds = milliseconds; -exports.utcMinute = utcMinute; -exports.utcMinutes = utcMinutes; -exports.utcMonday = utcMonday; -exports.utcMondays = utcMondays; -exports.utcMonth = utcMonth; -exports.utcMonths = utcMonths; -exports.utcSaturday = utcSaturday; -exports.utcSaturdays = utcSaturdays; -exports.utcSecond = second; -exports.utcSeconds = seconds; -exports.utcSunday = utcSunday; -exports.utcSundays = utcSundays; -exports.utcThursday = utcThursday; -exports.utcThursdays = utcThursdays; -exports.utcTuesday = utcTuesday; -exports.utcTuesdays = utcTuesdays; -exports.utcWednesday = utcWednesday; -exports.utcWednesdays = utcWednesdays; -exports.utcWeek = utcSunday; -exports.utcWeeks = utcSundays; -exports.utcYear = utcYear; -exports.utcYears = utcYears; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-time/dist/d3-time.min.js b/node_modules/d3-time/dist/d3-time.min.js deleted file mode 100644 index 248be5030d466b09105d34a066fe862ae648bd99..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/dist/d3-time.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-time/ v2.0.0 Copyright 2020 Mike Bostock -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).d3=e.d3||{})}(this,function(e){"use strict";var t=new Date,n=new Date;function u(e,r,i,o){function a(t){return e(t=0===arguments.length?new Date:new Date(+t)),t}return a.floor=function(t){return e(t=new Date(+t)),t},a.ceil=function(t){return e(t=new Date(t-1)),r(t,1),e(t),t},a.round=function(e){var t=a(e),n=a.ceil(e);return e-t<n-e?t:n},a.offset=function(e,t){return r(e=new Date(+e),null==t?1:Math.floor(t)),e},a.range=function(t,n,u){var i,o=[];if(t=a.ceil(t),u=null==u?1:Math.floor(u),!(t<n&&u>0))return o;do{o.push(i=new Date(+t)),r(t,u),e(t)}while(i<t&&t<n);return o},a.filter=function(t){return u(function(n){if(n>=n)for(;e(n),!t(n);)n.setTime(n-1)},function(e,n){if(e>=e)if(n<0)for(;++n<=0;)for(;r(e,-1),!t(e););else for(;--n>=0;)for(;r(e,1),!t(e););})},i&&(a.count=function(u,r){return t.setTime(+u),n.setTime(+r),e(t),e(n),Math.floor(i(t,n))},a.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?a.filter(o?function(t){return o(t)%e==0}:function(t){return a.count(0,t)%e==0}):a:null}),a}var r=u(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});r.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?u(function(t){t.setTime(Math.floor(t/e)*e)},function(t,n){t.setTime(+t+n*e)},function(t,n){return(n-t)/e}):r:null};var i=r.range,o=6e4,a=6048e5,s=u(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()}),c=s.range,f=u(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},function(e,t){e.setTime(+e+t*o)},function(e,t){return(t-e)/o},function(e){return e.getMinutes()}),l=f.range,g=u(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-e.getMinutes()*o)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getHours()}),T=g.range,d=u(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*o)/864e5,e=>e.getDate()-1),m=d.range;function M(e){return u(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*o)/a})}var y=M(0),C=M(1),U=M(2),h=M(3),D=M(4),F=M(5),Y=M(6),H=y.range,S=C.range,v=U.range,w=h.range,p=D.range,W=F.range,O=Y.range,k=u(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear())},function(e){return e.getMonth()}),z=k.range,x=u(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});x.every=function(e){return isFinite(e=Math.floor(e))&&e>0?u(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null};var b=x.range,j=u(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+t*o)},function(e,t){return(t-e)/o},function(e){return e.getUTCMinutes()}),_=j.range,I=u(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getUTCHours()}),P=I.range,q=u(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5},function(e){return e.getUTCDate()-1}),A=q.range;function B(e){return u(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/a})}var E=B(0),G=B(1),J=B(2),K=B(3),L=B(4),N=B(5),Q=B(6),R=E.range,V=G.range,X=J.range,Z=K.range,$=L.range,ee=N.range,te=Q.range,ne=u(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+12*(t.getUTCFullYear()-e.getUTCFullYear())},function(e){return e.getUTCMonth()}),ue=ne.range,re=u(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});re.every=function(e){return isFinite(e=Math.floor(e))&&e>0?u(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null};var ie=re.range;e.timeDay=d,e.timeDays=m,e.timeFriday=F,e.timeFridays=W,e.timeHour=g,e.timeHours=T,e.timeInterval=u,e.timeMillisecond=r,e.timeMilliseconds=i,e.timeMinute=f,e.timeMinutes=l,e.timeMonday=C,e.timeMondays=S,e.timeMonth=k,e.timeMonths=z,e.timeSaturday=Y,e.timeSaturdays=O,e.timeSecond=s,e.timeSeconds=c,e.timeSunday=y,e.timeSundays=H,e.timeThursday=D,e.timeThursdays=p,e.timeTuesday=U,e.timeTuesdays=v,e.timeWednesday=h,e.timeWednesdays=w,e.timeWeek=y,e.timeWeeks=H,e.timeYear=x,e.timeYears=b,e.utcDay=q,e.utcDays=A,e.utcFriday=N,e.utcFridays=ee,e.utcHour=I,e.utcHours=P,e.utcMillisecond=r,e.utcMilliseconds=i,e.utcMinute=j,e.utcMinutes=_,e.utcMonday=G,e.utcMondays=V,e.utcMonth=ne,e.utcMonths=ue,e.utcSaturday=Q,e.utcSaturdays=te,e.utcSecond=s,e.utcSeconds=c,e.utcSunday=E,e.utcSundays=R,e.utcThursday=L,e.utcThursdays=$,e.utcTuesday=J,e.utcTuesdays=X,e.utcWednesday=K,e.utcWednesdays=Z,e.utcWeek=E,e.utcWeeks=R,e.utcYear=re,e.utcYears=ie,Object.defineProperty(e,"__esModule",{value:!0})}); diff --git a/node_modules/d3-time/package.json b/node_modules/d3-time/package.json deleted file mode 100644 index 72736ec46fabe18ac9d77715a20f151fd7678661..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/package.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "_from": "d3-time@2", - "_id": "d3-time@2.0.0", - "_inBundle": false, - "_integrity": "sha512-2mvhstTFcMvwStWd9Tj3e6CEqtOivtD8AUiHT8ido/xmzrI9ijrUUihZ6nHuf/vsScRBonagOdj0Vv+SEL5G3Q==", - "_location": "/d3-time", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-time@2", - "name": "d3-time", - "escapedName": "d3-time", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3", - "/d3-scale", - "/d3-time-format" - ], - "_resolved": "https://registry.npmjs.org/d3-time/-/d3-time-2.0.0.tgz", - "_shasum": "ad7c127d17c67bd57a4c61f3eaecb81108b1e0ab", - "_spec": "d3-time@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-time/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "A calculator for humanity’s peculiar conventions of time.", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-time/", - "jsdelivr": "dist/d3-time.min.js", - "keywords": [ - "d3", - "d3-module", - "time", - "interval", - "calendar" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-time.js", - "module": "src/index.js", - "name": "d3-time", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-time.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "TZ=America/Los_Angeles tape 'test/**/*-test.js' && eslint src" - }, - "sideEffects": false, - "unpkg": "dist/d3-time.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-time/src/day.js b/node_modules/d3-time/src/day.js deleted file mode 100644 index 6c3f9ca233077f450c9fc95f86baf7bddedb8eb7..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/day.js +++ /dev/null @@ -1,12 +0,0 @@ -import interval from "./interval.js"; -import {durationDay, durationMinute} from "./duration.js"; - -var day = interval( - date => date.setHours(0, 0, 0, 0), - (date, step) => date.setDate(date.getDate() + step), - (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay, - date => date.getDate() - 1 -); - -export default day; -export var days = day.range; diff --git a/node_modules/d3-time/src/duration.js b/node_modules/d3-time/src/duration.js deleted file mode 100644 index fee16e797306ca589dbf7decf0748df62b1d7085..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/duration.js +++ /dev/null @@ -1,5 +0,0 @@ -export var durationSecond = 1e3; -export var durationMinute = 6e4; -export var durationHour = 36e5; -export var durationDay = 864e5; -export var durationWeek = 6048e5; diff --git a/node_modules/d3-time/src/hour.js b/node_modules/d3-time/src/hour.js deleted file mode 100644 index 9b944d624258513488b2e70710c41540e21ce64e..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/hour.js +++ /dev/null @@ -1,15 +0,0 @@ -import interval from "./interval.js"; -import {durationHour, durationMinute, durationSecond} from "./duration.js"; - -var hour = interval(function(date) { - date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute); -}, function(date, step) { - date.setTime(+date + step * durationHour); -}, function(start, end) { - return (end - start) / durationHour; -}, function(date) { - return date.getHours(); -}); - -export default hour; -export var hours = hour.range; diff --git a/node_modules/d3-time/src/index.js b/node_modules/d3-time/src/index.js deleted file mode 100644 index 354dc70fb995eeacd965af0f045f23e2c26b6aaa..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/index.js +++ /dev/null @@ -1,105 +0,0 @@ -export { - default as timeInterval -} from "./interval.js"; - -export { - default as timeMillisecond, - milliseconds as timeMilliseconds, - default as utcMillisecond, - milliseconds as utcMilliseconds -} from "./millisecond.js"; - -export { - default as timeSecond, - seconds as timeSeconds, - default as utcSecond, - seconds as utcSeconds -} from "./second.js"; - -export { - default as timeMinute, - minutes as timeMinutes -} from "./minute.js"; - -export { - default as timeHour, - hours as timeHours -} from "./hour.js"; - -export { - default as timeDay, - days as timeDays -} from "./day.js"; - -export { - sunday as timeWeek, - sundays as timeWeeks, - sunday as timeSunday, - sundays as timeSundays, - monday as timeMonday, - mondays as timeMondays, - tuesday as timeTuesday, - tuesdays as timeTuesdays, - wednesday as timeWednesday, - wednesdays as timeWednesdays, - thursday as timeThursday, - thursdays as timeThursdays, - friday as timeFriday, - fridays as timeFridays, - saturday as timeSaturday, - saturdays as timeSaturdays -} from "./week.js"; - -export { - default as timeMonth, - months as timeMonths -} from "./month.js"; - -export { - default as timeYear, - years as timeYears -} from "./year.js"; - -export { - default as utcMinute, - utcMinutes as utcMinutes -} from "./utcMinute.js"; - -export { - default as utcHour, - utcHours as utcHours -} from "./utcHour.js"; - -export { - default as utcDay, - utcDays as utcDays -} from "./utcDay.js"; - -export { - utcSunday as utcWeek, - utcSundays as utcWeeks, - utcSunday as utcSunday, - utcSundays as utcSundays, - utcMonday as utcMonday, - utcMondays as utcMondays, - utcTuesday as utcTuesday, - utcTuesdays as utcTuesdays, - utcWednesday as utcWednesday, - utcWednesdays as utcWednesdays, - utcThursday as utcThursday, - utcThursdays as utcThursdays, - utcFriday as utcFriday, - utcFridays as utcFridays, - utcSaturday as utcSaturday, - utcSaturdays as utcSaturdays -} from "./utcWeek.js"; - -export { - default as utcMonth, - utcMonths as utcMonths -} from "./utcMonth.js"; - -export { - default as utcYear, - utcYears as utcYears -} from "./utcYear.js"; diff --git a/node_modules/d3-time/src/interval.js b/node_modules/d3-time/src/interval.js deleted file mode 100644 index 2714a81dbe5385dd76d5006057d9262a476fc7ba..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/interval.js +++ /dev/null @@ -1,70 +0,0 @@ -var t0 = new Date, - t1 = new Date; - -export default function newInterval(floori, offseti, count, field) { - - function interval(date) { - return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date; - } - - interval.floor = function(date) { - return floori(date = new Date(+date)), date; - }; - - interval.ceil = function(date) { - return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date; - }; - - interval.round = function(date) { - var d0 = interval(date), - d1 = interval.ceil(date); - return date - d0 < d1 - date ? d0 : d1; - }; - - interval.offset = function(date, step) { - return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date; - }; - - interval.range = function(start, stop, step) { - var range = [], previous; - start = interval.ceil(start); - step = step == null ? 1 : Math.floor(step); - if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date - do range.push(previous = new Date(+start)), offseti(start, step), floori(start); - while (previous < start && start < stop); - return range; - }; - - interval.filter = function(test) { - return newInterval(function(date) { - if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1); - }, function(date, step) { - if (date >= date) { - if (step < 0) while (++step <= 0) { - while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty - } else while (--step >= 0) { - while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty - } - } - }); - }; - - if (count) { - interval.count = function(start, end) { - t0.setTime(+start), t1.setTime(+end); - floori(t0), floori(t1); - return Math.floor(count(t0, t1)); - }; - - interval.every = function(step) { - step = Math.floor(step); - return !isFinite(step) || !(step > 0) ? null - : !(step > 1) ? interval - : interval.filter(field - ? function(d) { return field(d) % step === 0; } - : function(d) { return interval.count(0, d) % step === 0; }); - }; - } - - return interval; -} diff --git a/node_modules/d3-time/src/millisecond.js b/node_modules/d3-time/src/millisecond.js deleted file mode 100644 index d89585c2353b1157179a5342afdc193276ef8240..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/millisecond.js +++ /dev/null @@ -1,26 +0,0 @@ -import interval from "./interval.js"; - -var millisecond = interval(function() { - // noop -}, function(date, step) { - date.setTime(+date + step); -}, function(start, end) { - return end - start; -}); - -// An optimized implementation for this simple case. -millisecond.every = function(k) { - k = Math.floor(k); - if (!isFinite(k) || !(k > 0)) return null; - if (!(k > 1)) return millisecond; - return interval(function(date) { - date.setTime(Math.floor(date / k) * k); - }, function(date, step) { - date.setTime(+date + step * k); - }, function(start, end) { - return (end - start) / k; - }); -}; - -export default millisecond; -export var milliseconds = millisecond.range; diff --git a/node_modules/d3-time/src/minute.js b/node_modules/d3-time/src/minute.js deleted file mode 100644 index 2ed894bfe33e580ee50d2e62c9e1ede7da9f2b0e..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/minute.js +++ /dev/null @@ -1,15 +0,0 @@ -import interval from "./interval.js"; -import {durationMinute, durationSecond} from "./duration.js"; - -var minute = interval(function(date) { - date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond); -}, function(date, step) { - date.setTime(+date + step * durationMinute); -}, function(start, end) { - return (end - start) / durationMinute; -}, function(date) { - return date.getMinutes(); -}); - -export default minute; -export var minutes = minute.range; diff --git a/node_modules/d3-time/src/month.js b/node_modules/d3-time/src/month.js deleted file mode 100644 index ac995decdf7381b5fd989e35b527e7afc6707b29..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/month.js +++ /dev/null @@ -1,15 +0,0 @@ -import interval from "./interval.js"; - -var month = interval(function(date) { - date.setDate(1); - date.setHours(0, 0, 0, 0); -}, function(date, step) { - date.setMonth(date.getMonth() + step); -}, function(start, end) { - return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12; -}, function(date) { - return date.getMonth(); -}); - -export default month; -export var months = month.range; diff --git a/node_modules/d3-time/src/second.js b/node_modules/d3-time/src/second.js deleted file mode 100644 index 62069ef1830646e3009aa2af11bf0b2657a2afea..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/second.js +++ /dev/null @@ -1,15 +0,0 @@ -import interval from "./interval.js"; -import {durationSecond} from "./duration.js"; - -var second = interval(function(date) { - date.setTime(date - date.getMilliseconds()); -}, function(date, step) { - date.setTime(+date + step * durationSecond); -}, function(start, end) { - return (end - start) / durationSecond; -}, function(date) { - return date.getUTCSeconds(); -}); - -export default second; -export var seconds = second.range; diff --git a/node_modules/d3-time/src/utcDay.js b/node_modules/d3-time/src/utcDay.js deleted file mode 100644 index 8023be1585e0cd7801553ffef885bb435b637fc2..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/utcDay.js +++ /dev/null @@ -1,15 +0,0 @@ -import interval from "./interval.js"; -import {durationDay} from "./duration.js"; - -var utcDay = interval(function(date) { - date.setUTCHours(0, 0, 0, 0); -}, function(date, step) { - date.setUTCDate(date.getUTCDate() + step); -}, function(start, end) { - return (end - start) / durationDay; -}, function(date) { - return date.getUTCDate() - 1; -}); - -export default utcDay; -export var utcDays = utcDay.range; diff --git a/node_modules/d3-time/src/utcHour.js b/node_modules/d3-time/src/utcHour.js deleted file mode 100644 index 98b88222b33ed829006e294e65888000462ddd41..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/utcHour.js +++ /dev/null @@ -1,15 +0,0 @@ -import interval from "./interval.js"; -import {durationHour} from "./duration.js"; - -var utcHour = interval(function(date) { - date.setUTCMinutes(0, 0, 0); -}, function(date, step) { - date.setTime(+date + step * durationHour); -}, function(start, end) { - return (end - start) / durationHour; -}, function(date) { - return date.getUTCHours(); -}); - -export default utcHour; -export var utcHours = utcHour.range; diff --git a/node_modules/d3-time/src/utcMinute.js b/node_modules/d3-time/src/utcMinute.js deleted file mode 100644 index 4e5e7e56e002189ad8d8270a86bfcac4a73749de..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/utcMinute.js +++ /dev/null @@ -1,15 +0,0 @@ -import interval from "./interval.js"; -import {durationMinute} from "./duration.js"; - -var utcMinute = interval(function(date) { - date.setUTCSeconds(0, 0); -}, function(date, step) { - date.setTime(+date + step * durationMinute); -}, function(start, end) { - return (end - start) / durationMinute; -}, function(date) { - return date.getUTCMinutes(); -}); - -export default utcMinute; -export var utcMinutes = utcMinute.range; diff --git a/node_modules/d3-time/src/utcMonth.js b/node_modules/d3-time/src/utcMonth.js deleted file mode 100644 index 3991b180d44b23a6966cf5a97f115893c5dbbf29..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/utcMonth.js +++ /dev/null @@ -1,15 +0,0 @@ -import interval from "./interval.js"; - -var utcMonth = interval(function(date) { - date.setUTCDate(1); - date.setUTCHours(0, 0, 0, 0); -}, function(date, step) { - date.setUTCMonth(date.getUTCMonth() + step); -}, function(start, end) { - return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12; -}, function(date) { - return date.getUTCMonth(); -}); - -export default utcMonth; -export var utcMonths = utcMonth.range; diff --git a/node_modules/d3-time/src/utcWeek.js b/node_modules/d3-time/src/utcWeek.js deleted file mode 100644 index e36fac8bd7437ff9b3c3621124ddfb65ad55c85f..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/utcWeek.js +++ /dev/null @@ -1,29 +0,0 @@ -import interval from "./interval.js"; -import {durationWeek} from "./duration.js"; - -function utcWeekday(i) { - return interval(function(date) { - date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7); - date.setUTCHours(0, 0, 0, 0); - }, function(date, step) { - date.setUTCDate(date.getUTCDate() + step * 7); - }, function(start, end) { - return (end - start) / durationWeek; - }); -} - -export var utcSunday = utcWeekday(0); -export var utcMonday = utcWeekday(1); -export var utcTuesday = utcWeekday(2); -export var utcWednesday = utcWeekday(3); -export var utcThursday = utcWeekday(4); -export var utcFriday = utcWeekday(5); -export var utcSaturday = utcWeekday(6); - -export var utcSundays = utcSunday.range; -export var utcMondays = utcMonday.range; -export var utcTuesdays = utcTuesday.range; -export var utcWednesdays = utcWednesday.range; -export var utcThursdays = utcThursday.range; -export var utcFridays = utcFriday.range; -export var utcSaturdays = utcSaturday.range; diff --git a/node_modules/d3-time/src/utcYear.js b/node_modules/d3-time/src/utcYear.js deleted file mode 100644 index ee8976485b43704eb72b2b00acc8f9ad4ffb45da..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/utcYear.js +++ /dev/null @@ -1,26 +0,0 @@ -import interval from "./interval.js"; - -var utcYear = interval(function(date) { - date.setUTCMonth(0, 1); - date.setUTCHours(0, 0, 0, 0); -}, function(date, step) { - date.setUTCFullYear(date.getUTCFullYear() + step); -}, function(start, end) { - return end.getUTCFullYear() - start.getUTCFullYear(); -}, function(date) { - return date.getUTCFullYear(); -}); - -// An optimized implementation for this simple case. -utcYear.every = function(k) { - return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) { - date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k); - date.setUTCMonth(0, 1); - date.setUTCHours(0, 0, 0, 0); - }, function(date, step) { - date.setUTCFullYear(date.getUTCFullYear() + step * k); - }); -}; - -export default utcYear; -export var utcYears = utcYear.range; diff --git a/node_modules/d3-time/src/week.js b/node_modules/d3-time/src/week.js deleted file mode 100644 index c0f1b0302df42efb8516a7d3a07e7b84b1f407bd..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/week.js +++ /dev/null @@ -1,29 +0,0 @@ -import interval from "./interval.js"; -import {durationMinute, durationWeek} from "./duration.js"; - -function weekday(i) { - return interval(function(date) { - date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7); - date.setHours(0, 0, 0, 0); - }, function(date, step) { - date.setDate(date.getDate() + step * 7); - }, function(start, end) { - return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek; - }); -} - -export var sunday = weekday(0); -export var monday = weekday(1); -export var tuesday = weekday(2); -export var wednesday = weekday(3); -export var thursday = weekday(4); -export var friday = weekday(5); -export var saturday = weekday(6); - -export var sundays = sunday.range; -export var mondays = monday.range; -export var tuesdays = tuesday.range; -export var wednesdays = wednesday.range; -export var thursdays = thursday.range; -export var fridays = friday.range; -export var saturdays = saturday.range; diff --git a/node_modules/d3-time/src/year.js b/node_modules/d3-time/src/year.js deleted file mode 100644 index a86872d7737c6ed0462f1db1818445c995570eb5..0000000000000000000000000000000000000000 --- a/node_modules/d3-time/src/year.js +++ /dev/null @@ -1,26 +0,0 @@ -import interval from "./interval.js"; - -var year = interval(function(date) { - date.setMonth(0, 1); - date.setHours(0, 0, 0, 0); -}, function(date, step) { - date.setFullYear(date.getFullYear() + step); -}, function(start, end) { - return end.getFullYear() - start.getFullYear(); -}, function(date) { - return date.getFullYear(); -}); - -// An optimized implementation for this simple case. -year.every = function(k) { - return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function(date) { - date.setFullYear(Math.floor(date.getFullYear() / k) * k); - date.setMonth(0, 1); - date.setHours(0, 0, 0, 0); - }, function(date, step) { - date.setFullYear(date.getFullYear() + step * k); - }); -}; - -export default year; -export var years = year.range; diff --git a/node_modules/d3-timer/LICENSE b/node_modules/d3-timer/LICENSE deleted file mode 100644 index 721bd22ece6587a9408eda1b6a3949c425b5624a..0000000000000000000000000000000000000000 --- a/node_modules/d3-timer/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-timer/README.md b/node_modules/d3-timer/README.md deleted file mode 100644 index d1aafd06061e9b09a635fe48847fb171be7bd71a..0000000000000000000000000000000000000000 --- a/node_modules/d3-timer/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# d3-timer - -This module provides an efficient queue capable of managing thousands of concurrent animations, while guaranteeing consistent, synchronized timing with concurrent or staged animations. Internally, it uses [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) for fluid animation (if available), switching to [setTimeout](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout) for delays longer than 24ms. - -## Installing - -If you use NPM, `npm install d3-timer`. Otherwise, download the [latest release](https://github.com/d3/d3-timer/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-timer.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-timer.v2.min.js"></script> -<script> - -var timer = d3.timer(callback); - -</script> -``` - -## API Reference - -<a name="now" href="#now">#</a> d3.<b>now</b>() [<>](https://github.com/d3/d3-timer/blob/master/src/timer.js "Source") - -Returns the current time as defined by [performance.now](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now) if available, and [Date.now](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/Date/now) if not. The current time is updated at the start of a frame; it is thus consistent during the frame, and any timers scheduled during the same frame will be synchronized. If this method is called outside of a frame, such as in response to a user event, the current time is calculated and then fixed until the next frame, again ensuring consistent timing during event handling. - -<a name="timer" href="#timer">#</a> d3.<b>timer</b>(<i>callback</i>[, <i>delay</i>[, <i>time</i>]]) [<>](https://github.com/d3/d3-timer/blob/master/src/timer.js "Source") - -Schedules a new timer, invoking the specified *callback* repeatedly until the timer is [stopped](#timer_stop). An optional numeric *delay* in milliseconds may be specified to invoke the given *callback* after a delay; if *delay* is not specified, it defaults to zero. The delay is relative to the specified *time* in milliseconds; if *time* is not specified, it defaults to [now](#now). - -The *callback* is passed the (apparent) *elapsed* time since the timer became active. For example: - -```js -var t = d3.timer(function(elapsed) { - console.log(elapsed); - if (elapsed > 200) t.stop(); -}, 150); -``` - -This produces roughly the following console output: - -``` -3 -25 -48 -65 -85 -106 -125 -146 -167 -189 -209 -``` - -(The exact values may vary depending on your JavaScript runtime and what else your computer is doing.) Note that the first *elapsed* time is 3ms: this is the elapsed time since the timer started, not since the timer was scheduled. Here the timer started 150ms after it was scheduled due to the specified delay. The apparent *elapsed* time may be less than the true *elapsed* time if the page is backgrounded and [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) is paused; in the background, apparent time is frozen. - -If [timer](#timer) is called within the callback of another timer, the new timer callback (if eligible as determined by the specified *delay* and *time*) will be invoked immediately at the end of the current frame, rather than waiting until the next frame. Within a frame, timer callbacks are guaranteed to be invoked in the order they were scheduled, regardless of their start time. - -<a name="timer_restart" href="#timer_restart">#</a> <i>timer</i>.<b>restart</b>(<i>callback</i>[, <i>delay</i>[, <i>time</i>]]) [<>](https://github.com/d3/d3-timer/blob/master/src/timer.js "Source") - -Restart a timer with the specified *callback* and optional *delay* and *time*. This is equivalent to stopping this timer and creating a new timer with the specified arguments, although this timer retains the original invocation priority. - -<a name="timer_stop" href="#timer_stop">#</a> <i>timer</i>.<b>stop</b>() [<>](https://github.com/d3/d3-timer/blob/master/src/timer.js "Source") - -Stops this timer, preventing subsequent callbacks. This method has no effect if the timer has already stopped. - -<a name="timerFlush" href="#timerFlush">#</a> d3.<b>timerFlush</b>() [<>](https://github.com/d3/d3-timer/blob/master/src/timer.js "Source") - -Immediately invoke any eligible timer callbacks. Note that zero-delay timers are normally first executed after one frame (~17ms). This can cause a brief flicker because the browser renders the page twice: once at the end of the first event loop, then again immediately on the first timer callback. By flushing the timer queue at the end of the first event loop, you can run any zero-delay timers immediately and avoid the flicker. - -<a name="timeout" href="#timeout">#</a> d3.<b>timeout</b>(<i>callback</i>[, <i>delay</i>[, <i>time</i>]]) [<>](https://github.com/d3/d3-timer/blob/master/src/timeout.js "Source") - -Like [timer](#timer), except the timer automatically [stops](#timer_stop) on its first callback. A suitable replacement for [setTimeout](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout) that is guaranteed to not run in the background. The *callback* is passed the elapsed time. - -<a name="interval" href="#interval">#</a> d3.<b>interval</b>(<i>callback</i>[, <i>delay</i>[, <i>time</i>]]) [<>](https://github.com/d3/d3-timer/blob/master/src/interval.js "Source") - -Like [timer](#timer), except the *callback* is invoked only every *delay* milliseconds; if *delay* is not specified, this is equivalent to [timer](#timer). A suitable replacement for [setInterval](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval) that is guaranteed to not run in the background. The *callback* is passed the elapsed time. diff --git a/node_modules/d3-timer/dist/d3-timer.js b/node_modules/d3-timer/dist/d3-timer.js deleted file mode 100644 index cbf45ecd81dc25cac6d5bd2024cd19945cb9cb78..0000000000000000000000000000000000000000 --- a/node_modules/d3-timer/dist/d3-timer.js +++ /dev/null @@ -1,153 +0,0 @@ -// https://d3js.org/d3-timer/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {})); -}(this, function (exports) { 'use strict'; - -var frame = 0, // is an animation frame pending? - timeout = 0, // is a timeout pending? - interval = 0, // are any timers active? - pokeDelay = 1000, // how frequently we check for clock skew - taskHead, - taskTail, - clockLast = 0, - clockNow = 0, - clockSkew = 0, - clock = typeof performance === "object" && performance.now ? performance : Date, - setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); }; - -function now() { - return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); -} - -function clearNow() { - clockNow = 0; -} - -function Timer() { - this._call = - this._time = - this._next = null; -} - -Timer.prototype = timer.prototype = { - constructor: Timer, - restart: function(callback, delay, time) { - if (typeof callback !== "function") throw new TypeError("callback is not a function"); - time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); - if (!this._next && taskTail !== this) { - if (taskTail) taskTail._next = this; - else taskHead = this; - taskTail = this; - } - this._call = callback; - this._time = time; - sleep(); - }, - stop: function() { - if (this._call) { - this._call = null; - this._time = Infinity; - sleep(); - } - } -}; - -function timer(callback, delay, time) { - var t = new Timer; - t.restart(callback, delay, time); - return t; -} - -function timerFlush() { - now(); // Get the current time, if not already set. - ++frame; // Pretend we’ve set an alarm, if we haven’t already. - var t = taskHead, e; - while (t) { - if ((e = clockNow - t._time) >= 0) t._call.call(null, e); - t = t._next; - } - --frame; -} - -function wake() { - clockNow = (clockLast = clock.now()) + clockSkew; - frame = timeout = 0; - try { - timerFlush(); - } finally { - frame = 0; - nap(); - clockNow = 0; - } -} - -function poke() { - var now = clock.now(), delay = now - clockLast; - if (delay > pokeDelay) clockSkew -= delay, clockLast = now; -} - -function nap() { - var t0, t1 = taskHead, t2, time = Infinity; - while (t1) { - if (t1._call) { - if (time > t1._time) time = t1._time; - t0 = t1, t1 = t1._next; - } else { - t2 = t1._next, t1._next = null; - t1 = t0 ? t0._next = t2 : taskHead = t2; - } - } - taskTail = t0; - sleep(time); -} - -function sleep(time) { - if (frame) return; // Soonest alarm already set, or will be. - if (timeout) timeout = clearTimeout(timeout); - var delay = time - clockNow; // Strictly less than if we recomputed clockNow. - if (delay > 24) { - if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew); - if (interval) interval = clearInterval(interval); - } else { - if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay); - frame = 1, setFrame(wake); - } -} - -function timeout$1(callback, delay, time) { - var t = new Timer; - delay = delay == null ? 0 : +delay; - t.restart(elapsed => { - t.stop(); - callback(elapsed + delay); - }, delay, time); - return t; -} - -function interval$1(callback, delay, time) { - var t = new Timer, total = delay; - if (delay == null) return t.restart(callback, delay, time), t; - t._restart = t.restart; - t.restart = function(callback, delay, time) { - delay = +delay, time = time == null ? now() : +time; - t._restart(function tick(elapsed) { - elapsed += total; - t._restart(tick, total += delay, time); - callback(elapsed); - }, delay, time); - }; - t.restart(callback, delay, time); - return t; -} - -exports.interval = interval$1; -exports.now = now; -exports.timeout = timeout$1; -exports.timer = timer; -exports.timerFlush = timerFlush; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-timer/dist/d3-timer.min.js b/node_modules/d3-timer/dist/d3-timer.min.js deleted file mode 100644 index f03d7118753f2ca5db36305b8cce1586e185782d..0000000000000000000000000000000000000000 --- a/node_modules/d3-timer/dist/d3-timer.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-timer/ v2.0.0 Copyright 2020 Mike Bostock -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t=t||self).d3=t.d3||{})}(this,function(t){"use strict";var n,e,o=0,r=0,i=0,u=1e3,l=0,a=0,c=0,s="object"==typeof performance&&performance.now?performance:Date,f="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function _(){return a||(f(m),a=s.now()+c)}function m(){a=0}function p(){this._call=this._time=this._next=null}function w(t,n,e){var o=new p;return o.restart(t,n,e),o}function d(){_(),++o;for(var t,e=n;e;)(t=a-e._time)>=0&&e._call.call(null,t),e=e._next;--o}function h(){a=(l=s.now())+c,o=r=0;try{d()}finally{o=0,function(){var t,o,r=n,i=1/0;for(;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(o=r._next,r._next=null,r=t?t._next=o:n=o);e=t,v(i)}(),a=0}}function y(){var t=s.now(),n=t-l;n>u&&(c-=n,l=t)}function v(t){o||(r&&(r=clearTimeout(r)),t-a>24?(t<1/0&&(r=setTimeout(h,t-s.now()-c)),i&&(i=clearInterval(i))):(i||(l=s.now(),i=setInterval(y,u)),o=1,f(h)))}p.prototype=w.prototype={constructor:p,restart:function(t,o,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?_():+r)+(null==o?0:+o),this._next||e===this||(e?e._next=this:n=this,e=this),this._call=t,this._time=r,v()},stop:function(){this._call&&(this._call=null,this._time=1/0,v())}},t.interval=function(t,n,e){var o=new p,r=n;return null==n?(o.restart(t,n,e),o):(o._restart=o.restart,o.restart=function(t,n,e){n=+n,e=null==e?_():+e,o._restart(function i(u){u+=r,o._restart(i,r+=n,e),t(u)},n,e)},o.restart(t,n,e),o)},t.now=_,t.timeout=function(t,n,e){var o=new p;return n=null==n?0:+n,o.restart(e=>{o.stop(),t(e+n)},n,e),o},t.timer=w,t.timerFlush=d,Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/node_modules/d3-timer/package.json b/node_modules/d3-timer/package.json deleted file mode 100644 index bf8574803ceaf8759a90a6cf610bc99f19e74e9e..0000000000000000000000000000000000000000 --- a/node_modules/d3-timer/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "d3-timer@2", - "_id": "d3-timer@2.0.0", - "_inBundle": false, - "_integrity": "sha512-TO4VLh0/420Y/9dO3+f9abDEFYeCUr2WZRlxJvbp4HPTQcSylXNiL6yZa9FIUvV1yRiFufl1bszTCLDqv9PWNA==", - "_location": "/d3-timer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-timer@2", - "name": "d3-timer", - "escapedName": "d3-timer", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3", - "/d3-force", - "/d3-transition" - ], - "_resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-2.0.0.tgz", - "_shasum": "055edb1d170cfe31ab2da8968deee940b56623e6", - "_spec": "d3-timer@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-timer/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "An efficient queue capable of managing thousands of concurrent animations.", - "devDependencies": { - "eslint": "6", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-timer/", - "jsdelivr": "dist/d3-timer.min.js", - "keywords": [ - "d3", - "d3-module", - "timer", - "transition", - "animation", - "requestAnimationFrame", - "setTimeout", - "setInterval" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-timer.js", - "module": "src/index.js", - "name": "d3-timer", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-timer.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src" - }, - "sideEffects": false, - "unpkg": "dist/d3-timer.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-timer/src/index.js b/node_modules/d3-timer/src/index.js deleted file mode 100644 index 66fb8c97b904c4222a396f6668a10cd79c8678fc..0000000000000000000000000000000000000000 --- a/node_modules/d3-timer/src/index.js +++ /dev/null @@ -1,13 +0,0 @@ -export { - now, - timer, - timerFlush -} from "./timer.js"; - -export { - default as timeout -} from "./timeout.js"; - -export { - default as interval -} from "./interval.js"; diff --git a/node_modules/d3-timer/src/interval.js b/node_modules/d3-timer/src/interval.js deleted file mode 100644 index e38e1bd81d5e6c0fc39b2942c56eaeb74e71dab1..0000000000000000000000000000000000000000 --- a/node_modules/d3-timer/src/interval.js +++ /dev/null @@ -1,17 +0,0 @@ -import {Timer, now} from "./timer.js"; - -export default function(callback, delay, time) { - var t = new Timer, total = delay; - if (delay == null) return t.restart(callback, delay, time), t; - t._restart = t.restart; - t.restart = function(callback, delay, time) { - delay = +delay, time = time == null ? now() : +time; - t._restart(function tick(elapsed) { - elapsed += total; - t._restart(tick, total += delay, time); - callback(elapsed); - }, delay, time); - } - t.restart(callback, delay, time); - return t; -} diff --git a/node_modules/d3-timer/src/timeout.js b/node_modules/d3-timer/src/timeout.js deleted file mode 100644 index 29b4dd2d2d71e7ae39470ed3743fb703404e75a6..0000000000000000000000000000000000000000 --- a/node_modules/d3-timer/src/timeout.js +++ /dev/null @@ -1,11 +0,0 @@ -import {Timer} from "./timer.js"; - -export default function(callback, delay, time) { - var t = new Timer; - delay = delay == null ? 0 : +delay; - t.restart(elapsed => { - t.stop(); - callback(elapsed + delay); - }, delay, time); - return t; -} diff --git a/node_modules/d3-timer/src/timer.js b/node_modules/d3-timer/src/timer.js deleted file mode 100644 index 7db3564699266b1f48ab02fb484b13f1210ba345..0000000000000000000000000000000000000000 --- a/node_modules/d3-timer/src/timer.js +++ /dev/null @@ -1,110 +0,0 @@ -var frame = 0, // is an animation frame pending? - timeout = 0, // is a timeout pending? - interval = 0, // are any timers active? - pokeDelay = 1000, // how frequently we check for clock skew - taskHead, - taskTail, - clockLast = 0, - clockNow = 0, - clockSkew = 0, - clock = typeof performance === "object" && performance.now ? performance : Date, - setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); }; - -export function now() { - return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); -} - -function clearNow() { - clockNow = 0; -} - -export function Timer() { - this._call = - this._time = - this._next = null; -} - -Timer.prototype = timer.prototype = { - constructor: Timer, - restart: function(callback, delay, time) { - if (typeof callback !== "function") throw new TypeError("callback is not a function"); - time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); - if (!this._next && taskTail !== this) { - if (taskTail) taskTail._next = this; - else taskHead = this; - taskTail = this; - } - this._call = callback; - this._time = time; - sleep(); - }, - stop: function() { - if (this._call) { - this._call = null; - this._time = Infinity; - sleep(); - } - } -}; - -export function timer(callback, delay, time) { - var t = new Timer; - t.restart(callback, delay, time); - return t; -} - -export function timerFlush() { - now(); // Get the current time, if not already set. - ++frame; // Pretend we’ve set an alarm, if we haven’t already. - var t = taskHead, e; - while (t) { - if ((e = clockNow - t._time) >= 0) t._call.call(null, e); - t = t._next; - } - --frame; -} - -function wake() { - clockNow = (clockLast = clock.now()) + clockSkew; - frame = timeout = 0; - try { - timerFlush(); - } finally { - frame = 0; - nap(); - clockNow = 0; - } -} - -function poke() { - var now = clock.now(), delay = now - clockLast; - if (delay > pokeDelay) clockSkew -= delay, clockLast = now; -} - -function nap() { - var t0, t1 = taskHead, t2, time = Infinity; - while (t1) { - if (t1._call) { - if (time > t1._time) time = t1._time; - t0 = t1, t1 = t1._next; - } else { - t2 = t1._next, t1._next = null; - t1 = t0 ? t0._next = t2 : taskHead = t2; - } - } - taskTail = t0; - sleep(time); -} - -function sleep(time) { - if (frame) return; // Soonest alarm already set, or will be. - if (timeout) timeout = clearTimeout(timeout); - var delay = time - clockNow; // Strictly less than if we recomputed clockNow. - if (delay > 24) { - if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew); - if (interval) interval = clearInterval(interval); - } else { - if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay); - frame = 1, setFrame(wake); - } -} diff --git a/node_modules/d3-transition/LICENSE b/node_modules/d3-transition/LICENSE deleted file mode 100644 index 6f3bc8f5b26391ff779ae69a10fe4edf66511963..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/LICENSE +++ /dev/null @@ -1,58 +0,0 @@ -Copyright (c) 2010-2015, Michael Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* The name Michael Bostock may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -TERMS OF USE - EASING EQUATIONS - -Open source under the BSD License. - -Copyright 2001 Robert Penner -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -- Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -- Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -- Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-transition/README.md b/node_modules/d3-transition/README.md deleted file mode 100644 index bad872d0be1f68ced6a5d1b83f4f1a8efcabfac9..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/README.md +++ /dev/null @@ -1,452 +0,0 @@ -# d3-transition - -A transition is a [selection](https://github.com/d3/d3-selection)-like interface for animating changes to the DOM. Instead of applying changes instantaneously, transitions smoothly interpolate the DOM from its current state to the desired target state over a given duration. - -To apply a transition, select elements, call [*selection*.transition](#selection_transition), and then make the desired changes. For example: - -```js -d3.select("body") - .transition() - .style("background-color", "red"); -``` - -Transitions support most selection methods (such as [*transition*.attr](#transition_attr) and [*transition*.style](#transition_style) in place of [*selection*.attr](https://github.com/d3/d3-selection#selection_attr) and [*selection*.style](https://github.com/d3/d3-selection#selection_style)), but not all methods are supported; for example, you must [append](https://github.com/d3/d3-selection#selection_append) elements or [bind data](https://github.com/d3/d3-selection#joining-data) before a transition starts. A [*transition*.remove](#transition_remove) operator is provided for convenient removal of elements when the transition ends. - -To compute intermediate state, transitions leverage a variety of [built-in interpolators](https://github.com/d3/d3-interpolate). [Colors](https://github.com/d3/d3-interpolate#interpolateRgb), [numbers](https://github.com/d3/d3-interpolate#interpolateNumber), and [transforms](https://github.com/d3/d3-interpolate#interpolateTransform) are automatically detected. [Strings](https://github.com/d3/d3-interpolate#interpolateString) with embedded numbers are also detected, as is common with many styles (such as padding or font sizes) and paths. To specify a custom interpolator, use [*transition*.attrTween](#transition_attrTween), [*transition*.styleTween](#transition_styleTween) or [*transition*.tween](#transition_tween). - -## Installing - -If you use NPM, `npm install d3-transition`. Otherwise, download the [latest release](https://github.com/d3/d3-transition/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-transition.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-color.v2.min.js"></script> -<script src="https://d3js.org/d3-dispatch.v2.min.js"></script> -<script src="https://d3js.org/d3-ease.v2.min.js"></script> -<script src="https://d3js.org/d3-interpolate.v2.min.js"></script> -<script src="https://d3js.org/d3-selection.v2.min.js"></script> -<script src="https://d3js.org/d3-timer.v2.min.js"></script> -<script src="https://d3js.org/d3-transition.v2.min.js"></script> -<script> - -var transition = d3.transition(); - -</script> -``` - -[Try d3-transition in your browser.](https://tonicdev.com/npm/d3-transition) - -## API Reference - -* [Selecting Elements](#selecting-elements) -* [Modifying Elements](#modifying-elements) -* [Timing](#timing) -* [Control Flow](#control-flow) -* [The Life of a Transition](#the-life-of-a-transition) - -### Selecting Elements - -Transitions are derived from [selections](https://github.com/d3/d3-selection) via [*selection*.transition](#selection_transition). You can also create a transition on the document root element using [d3.transition](#transition). - -<a name="selection_transition" href="#selection_transition">#</a> <i>selection</i>.<b>transition</b>([<i>name</i>]) · [Source](https://github.com/d3/d3-transition/blob/master/src/selection/transition.js) - -Returns a new transition on the given *selection* with the specified *name*. If a *name* is not specified, null is used. The new transition is only exclusive with other transitions of the same name. - -If the *name* is a [transition](#transition) instance, the returned transition has the same id and name as the specified transition. If a transition with the same id already exists on a selected element, the existing transition is returned for that element. Otherwise, the timing of the returned transition is inherited from the existing transition of the same id on the nearest ancestor of each selected element. Thus, this method can be used to synchronize a transition across multiple selections, or to re-select a transition for specific elements and modify its configuration. For example: - -```js -var t = d3.transition() - .duration(750) - .ease(d3.easeLinear); - -d3.selectAll(".apple").transition(t) - .style("fill", "red"); - -d3.selectAll(".orange").transition(t) - .style("fill", "orange"); -``` - -If the specified *transition* is not found on a selected node or its ancestors (such as if the transition [already ended](#the-life-of-a-transition)), the default timing parameters are used; however, in a future release, this will likely be changed to throw an error. See [#59](https://github.com/d3/d3-transition/issues/59). - -<a name="selection_interrupt" href="#selection_interrupt">#</a> <i>selection</i>.<b>interrupt</b>([<i>name</i>]) · [Source](https://github.com/d3/d3-transition/blob/master/src/selection/interrupt.js) - -Interrupts the active transition of the specified *name* on the selected elements, and cancels any pending transitions with the specified *name*, if any. If a name is not specified, null is used. - -Interrupting a transition on an element has no effect on any transitions on any descendant elements. For example, an [axis transition](https://github.com/d3/d3-axis) consists of multiple independent, synchronized transitions on the descendants of the axis [G element](https://www.w3.org/TR/SVG/struct.html#Groups) (the tick lines, the tick labels, the domain path, *etc.*). To interrupt the axis transition, you must therefore interrupt the descendants: - -```js -selection.selectAll("*").interrupt(); -``` - -The [universal selector](https://developer.mozilla.org/en-US/docs/Web/CSS/Universal_selectors), `*`, selects all descendant elements. If you also want to interrupt the G element itself: - -```js -selection.interrupt().selectAll("*").interrupt(); -``` - -<a name="interrupt" href="#interrupt">#</a> d3.<b>interrupt</b>(<i>node</i>[, <i>name</i>]) · [Source](https://github.com/d3/d3-transition/blob/master/src/interrupt.js) - -Interrupts the active transition of the specified *name* on the specified *node*, and cancels any pending transitions with the specified *name*, if any. If a name is not specified, null is used. See also [*selection*.interrupt](#selection_interrupt). - -<a name="transition" href="#transition">#</a> d3.<b>transition</b>([<i>name</i>]) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/index.js#L29) - -Returns a new transition on the root element, `document.documentElement`, with the specified *name*. If a *name* is not specified, null is used. The new transition is only exclusive with other transitions of the same name. The *name* may also be a [transition](#transition) instance; see [*selection*.transition](#selection_transition). This method is equivalent to: - -```js -d3.selection() - .transition(name) -``` - -This function can also be used to test for transitions (`instanceof d3.transition`) or to extend the transition prototype. - -<a name="transition_select" href="#transition_select">#</a> <i>transition</i>.<b>select</b>(<i>selector</i>) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/select.js) - -For each selected element, selects the first descendant element that matches the specified *selector* string, if any, and returns a transition on the resulting selection. The *selector* may be specified either as a selector string or a function. If a function, it is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element. The new transition has the same id, name and timing as this transition; however, if a transition with the same id already exists on a selected element, the existing transition is returned for that element. - -This method is equivalent to deriving the selection for this transition via [*transition*.selection](#transition_selection), creating a subselection via [*selection*.select](https://github.com/d3/d3-selection#selection_select), and then creating a new transition via [*selection*.transition](#selection_transition): - -```js -transition - .selection() - .select(selector) - .transition(transition) -``` - -<a name="transition_selectAll" href="#transition_selectAll">#</a> <i>transition</i>.<b>selectAll</b>(<i>selector</i>) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/selectAll.js) - -For each selected element, selects all descendant elements that match the specified *selector* string, if any, and returns a transition on the resulting selection. The *selector* may be specified either as a selector string or a function. If a function, it is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element. The new transition has the same id, name and timing as this transition; however, if a transition with the same id already exists on a selected element, the existing transition is returned for that element. - -This method is equivalent to deriving the selection for this transition via [*transition*.selection](#transition_selection), creating a subselection via [*selection*.selectAll](https://github.com/d3/d3-selection#selection_selectAll), and then creating a new transition via [*selection*.transition](#selection_transition): - -```js -transition - .selection() - .selectAll(selector) - .transition(transition) -``` - -<a name="transition_filter" href="#transition_filter">#</a> <i>transition</i>.<b>filter</b>(<i>filter</i>) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/filter.js) - -For each selected element, selects only the elements that match the specified *filter*, and returns a transition on the resulting selection. The *filter* may be specified either as a selector string or a function. If a function, it is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element. The new transition has the same id, name and timing as this transition; however, if a transition with the same id already exists on a selected element, the existing transition is returned for that element. - -This method is equivalent to deriving the selection for this transition via [*transition*.selection](#transition_selection), creating a subselection via [*selection*.filter](https://github.com/d3/d3-selection#selection_filter), and then creating a new transition via [*selection*.transition](#selection_transition): - -```js -transition - .selection() - .filter(filter) - .transition(transition) -``` - -<a name="transition_merge" href="#transition_merge">#</a> <i>transition</i>.<b>merge</b>(<i>other</i>) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/merge.js) - -Returns a new transition merging this transition with the specified *other* transition, which must have the same id as this transition. The returned transition has the same number of groups, the same parents, the same name and the same id as this transition. Any missing (null) elements in this transition are filled with the corresponding element, if present (not null), from the *other* transition. - -This method is equivalent to deriving the selection for this transition via [*transition*.selection](#transition_selection), merging with the selection likewise derived from the *other* transition via [*selection*.merge](https://github.com/d3/d3-selection#selection_merge), and then creating a new transition via [*selection*.transition](#selection_transition): - -```js -transition - .selection() - .merge(other.selection()) - .transition(transition) -``` - -<a name="transition_transition" href="#transition_transition">#</a> <i>transition</i>.<b>transition</b>() · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/transition.js) - -Returns a new transition on the same selected elements as this transition, scheduled to start when this transition ends. The new transition inherits a reference time equal to this transition’s time plus its [delay](#transition_delay) and [duration](#transition_duration). The new transition also inherits this transition’s name, duration, and [easing](#transition_ease). This method can be used to schedule a sequence of chained transitions. For example: - -```js -d3.selectAll(".apple") - .transition() // First fade to green. - .style("fill", "green") - .transition() // Then red. - .style("fill", "red") - .transition() // Wait one second. Then brown, and remove. - .delay(1000) - .style("fill", "brown") - .remove(); -``` - -The delay for each transition is relative to its previous transition. Thus, in the above example, apples will stay red for one second before the last transition to brown starts. - -<a name="transition_selection" href="#transition_selection">#</a> <i>transition</i>.<b>selection</b>() · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/selection.js) - -Returns the [selection](https://github.com/d3/d3-selection#selection) corresponding to this transition. - -<a name="active" href="#active">#</a> d3.<b>active</b>(<i>node</i>[, <i>name</i>]) · [Source](https://github.com/d3/d3-transition/blob/master/src/active.js) - -Returns the active transition on the specified *node* with the specified *name*, if any. If no *name* is specified, null is used. Returns null if there is no such active transition on the specified node. This method is useful for creating chained transitions. For example, to initiate disco mode: - -```js -d3.selectAll("circle").transition() - .delay(function(d, i) { return i * 50; }) - .on("start", function repeat() { - d3.active(this) - .style("fill", "red") - .transition() - .style("fill", "green") - .transition() - .style("fill", "blue") - .transition() - .on("start", repeat); - }); -``` - -See [chained transitions](https://bl.ocks.org/mbostock/70d5541b547cc222aa02) for an example. - -### Modifying Elements - -After selecting elements and creating a transition with [*selection*.transition](#selection_transition), use the transition’s transformation methods to affect document content. - -<a name="transition_attr" href="#transition_attr">#</a> <i>transition</i>.<b>attr</b>(<i>name</i>, <i>value</i>) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/attr.js) - -For each selected element, assigns the [attribute tween](#transition_attrTween) for the attribute with the specified *name* to the specified target *value*. The starting value of the tween is the attribute’s value when the transition starts. The target *value* may be specified either as a constant or a function. If a function, it is immediately evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element. - -If the target value is null, the attribute is removed when the transition starts. Otherwise, an interpolator is chosen based on the type of the target value, using the following algorithm: - -1. If *value* is a number, use [interpolateNumber](https://github.com/d3/d3-interpolate#interpolateNumber). -2. If *value* is a [color](https://github.com/d3/d3-color#color) or a string coercible to a color, use [interpolateRgb](https://github.com/d3/d3-interpolate#interpolateRgb). -3. Use [interpolateString](https://github.com/d3/d3-interpolate#interpolateString). - -To apply a different interpolator, use [*transition*.attrTween](#transition_attrTween). - -<a name="transition_attrTween" href="#transition_attrTween">#</a> <i>transition</i>.<b>attrTween</b>(<i>name</i>[, <i>factory</i>]) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/attrTween.js) - -If *factory* is specified and not null, assigns the attribute [tween](#transition_tween) for the attribute with the specified *name* to the specified interpolator *factory*. An interpolator factory is a function that returns an [interpolator](https://github.com/d3/d3-interpolate); when the transition starts, the *factory* is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element. The returned interpolator will then be invoked for each frame of the transition, in order, being passed the [eased](#transition_ease) time *t*, typically in the range [0, 1]. Lastly, the return value of the interpolator will be used to set the attribute value. The interpolator must return a string. (To remove an attribute at the start of a transition, use [*transition*.attr](#transition_attr); to remove an attribute at the end of a transition, use [*transition*.on](#transition_on) to listen for the *end* event.) - -If the specified *factory* is null, removes the previously-assigned attribute tween of the specified *name*, if any. If *factory* is not specified, returns the current interpolator factory for attribute with the specified *name*, or undefined if no such tween exists. - -For example, to interpolate the fill attribute from red to blue: - -```js -transition.attrTween("fill", function() { - return d3.interpolateRgb("red", "blue"); -}); -``` - -Or to interpolate from the current fill to blue, like [*transition*.attr](#transition_attr): - -```js -transition.attrTween("fill", function() { - return d3.interpolateRgb(this.getAttribute("fill"), "blue"); -}); -``` - -Or to apply a custom rainbow interpolator: - -```js -transition.attrTween("fill", function() { - return function(t) { - return "hsl(" + t * 360 + ",100%,50%)"; - }; -}); -``` - -This method is useful to specify a custom interpolator, such as one that understands [SVG paths](https://bl.ocks.org/mbostock/3916621). A useful technique is *data interpolation*, where [d3.interpolateObject](https://github.com/d3/d3-interpolate#interpolateObject) is used to interpolate two data values, and the resulting value is then used (say, with a [shape](https://github.com/d3/d3-shape)) to compute the new attribute value. - -<a name="transition_style" href="#transition_style">#</a> <i>transition</i>.<b>style</b>(<i>name</i>, <i>value</i>[, <i>priority</i>]) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/style.js) - -For each selected element, assigns the [style tween](#transition_styleTween) for the style with the specified *name* to the specified target *value* with the specified *priority*. The starting value of the tween is the style’s inline value if present, and otherwise its computed value, when the transition starts. The target *value* may be specified either as a constant or a function. If a function, it is immediately evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element. - -If the target value is null, the style is removed when the transition starts. Otherwise, an interpolator is chosen based on the type of the target value, using the following algorithm: - -1. If *value* is a number, use [interpolateNumber](https://github.com/d3/d3-interpolate#interpolateNumber). -2. If *value* is a [color](https://github.com/d3/d3-color#color) or a string coercible to a color, use [interpolateRgb](https://github.com/d3/d3-interpolate#interpolateRgb). -3. Use [interpolateString](https://github.com/d3/d3-interpolate#interpolateString). - -To apply a different interpolator, use [*transition*.styleTween](#transition_styleTween). - -<a name="transition_styleTween" href="#transition_styleTween">#</a> <i>transition</i>.<b>styleTween</b>(<i>name</i>[, <i>factory</i>[, <i>priority</i>]])) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/styleTween.js) - -If *factory* is specified and not null, assigns the style [tween](#transition_tween) for the style with the specified *name* to the specified interpolator *factory*. An interpolator factory is a function that returns an [interpolator](https://github.com/d3/d3-interpolate); when the transition starts, the *factory* is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element. The returned interpolator will then be invoked for each frame of the transition, in order, being passed the [eased](#transition_ease) time *t*, typically in the range [0, 1]. Lastly, the return value of the interpolator will be used to set the style value with the specified *priority*. The interpolator must return a string. (To remove an style at the start of a transition, use [*transition*.style](#transition_style); to remove an style at the end of a transition, use [*transition*.on](#transition_on) to listen for the *end* event.) - -If the specified *factory* is null, removes the previously-assigned style tween of the specified *name*, if any. If *factory* is not specified, returns the current interpolator factory for style with the specified *name*, or undefined if no such tween exists. - -For example, to interpolate the fill style from red to blue: - -```js -transition.styleTween("fill", function() { - return d3.interpolateRgb("red", "blue"); -}); -``` - -Or to interpolate from the current fill to blue, like [*transition*.style](#transition_style): - -```js -transition.styleTween("fill", function() { - return d3.interpolateRgb(this.style.fill, "blue"); -}); -``` - -Or to apply a custom rainbow interpolator: - -```js -transition.styleTween("fill", function() { - return function(t) { - return "hsl(" + t * 360 + ",100%,50%)"; - }; -}); -``` - -This method is useful to specify a custom interpolator, such as with *data interpolation*, where [d3.interpolateObject](https://github.com/d3/d3-interpolate#interpolateObject) is used to interpolate two data values, and the resulting value is then used to compute the new style value. - -<a name="transition_text" href="#transition_text">#</a> <i>transition</i>.<b>text</b>(<i>value</i>) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/text.js) - -For each selected element, sets the [text content](http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-textContent) to the specified target *value* when the transition starts. The *value* may be specified either as a constant or a function. If a function, it is immediately evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element. The function’s return value is then used to set each element’s text content. A null value will clear the content. - -To interpolate text rather than to set it on start, use [*transition*.textTween](#transition_textTween) or append a replacement element and cross-fade opacity. Text is not interpolated by default because it is usually undesirable. - -<a name="transition_textTween" href="#transition_textTween">#</a> <i>transition</i>.<b>textTween</b>(<i>factory</i>) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/textTween.js), [Examples](https://observablehq.com/@d3/transition-texttween) - -If *factory* is specified and not null, assigns the text [tween](#transition_tween) to the specified interpolator *factory*. An interpolator factory is a function that returns an [interpolator](https://github.com/d3/d3-interpolate); when the transition starts, the *factory* is evaluated for each selected element, in order, being passed the current datum `d` and index `i`, with the `this` context as the current DOM element. The returned interpolator will then be invoked for each frame of the transition, in order, being passed the [eased](#transition_ease) time *t*, typically in the range [0, 1]. Lastly, the return value of the interpolator will be used to set the text. The interpolator must return a string. - -For example, to interpolate the text with integers from 0 to 100: - -```js -transition.textTween(function() { - return d3.interpolateRound(0, 100); -}); -``` - -If the specified *factory* is null, removes the previously-assigned text tween, if any. If *factory* is not specified, returns the current interpolator factory for text, or undefined if no such tween exists. - -<a name="transition_remove" href="#transition_remove">#</a> <i>transition</i>.<b>remove</b>() · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/remove.js) - -For each selected element, [removes](https://github.com/d3/d3-selection#selection_remove) the element when the transition ends, as long as the element has no other active or pending transitions. If the element has other active or pending transitions, does nothing. - -<a name="transition_tween" href="#transition_tween">#</a> <i>transition</i>.<b>tween</b>(<i>name</i>[, <i>value</i>]) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/tween.js) - -For each selected element, assigns the tween with the specified *name* with the specified *value* function. The *value* must be specified as a function that returns a function. When the transition starts, the *value* function is evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element. The returned function is then invoked for each frame of the transition, in order, being passed the [eased](#transition_ease) time *t*, typically in the range [0, 1]. If the specified *value* is null, removes the previously-assigned tween of the specified *name*, if any. - -For example, to interpolate the fill attribute to blue, like [*transition*.attr](#transition_attr): - -```js -transition.tween("attr.fill", function() { - var i = d3.interpolateRgb(this.getAttribute("fill"), "blue"); - return function(t) { - this.setAttribute("fill", i(t)); - }; -}); -``` - -This method is useful to specify a custom interpolator, or to perform side-effects, say to animate the [scroll offset](https://bl.ocks.org/mbostock/1649463). - -### Timing - -The [easing](#transition_ease), [delay](#transition_delay) and [duration](#transition_duration) of a transition is configurable. For example, a per-element delay can be used to [stagger the reordering](https://observablehq.com/@d3/sortable-bar-chart) of elements, improving perception. See [Animated Transitions in Statistical Data Graphics](http://vis.berkeley.edu/papers/animated_transitions/) for recommendations. - -<a name="transition_delay" href="#transition_delay">#</a> <i>transition</i>.<b>delay</b>([<i>value</i>]) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/delay.js) - -For each selected element, sets the transition delay to the specified *value* in milliseconds. The *value* may be specified either as a constant or a function. If a function, it is immediately evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element. The function’s return value is then used to set each element’s transition delay. If a delay is not specified, it defaults to zero. - -If a *value* is not specified, returns the current value of the delay for the first (non-null) element in the transition. This is generally useful only if you know that the transition contains exactly one element. - -Setting the delay to a multiple of the index `i` is a convenient way to stagger transitions across a set of elements. For example: - -```js -transition.delay(function(d, i) { return i * 10; }); -``` - -Of course, you can also compute the delay as a function of the data, or [sort the selection](https://github.com/d3/d3-selection#selection_sort) before computed an index-based delay. - -<a name="transition_duration" href="#transition_duration">#</a> <i>transition</i>.<b>duration</b>([<i>value</i>]) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/duration.js) - -For each selected element, sets the transition duration to the specified *value* in milliseconds. The *value* may be specified either as a constant or a function. If a function, it is immediately evaluated for each selected element, in order, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element. The function’s return value is then used to set each element’s transition duration. If a duration is not specified, it defaults to 250ms. - -If a *value* is not specified, returns the current value of the duration for the first (non-null) element in the transition. This is generally useful only if you know that the transition contains exactly one element. - -<a name="transition_ease" href="#transition_ease">#</a> <i>transition</i>.<b>ease</b>([<i>value</i>]) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/ease.js) - -Specifies the transition [easing function](https://github.com/d3/d3-ease) for all selected elements. The *value* must be specified as a function. The easing function is invoked for each frame of the animation, being passed the normalized time *t* in the range [0, 1]; it must then return the eased time *tʹ* which is typically also in the range [0, 1]. A good easing function should return 0 if *t* = 0 and 1 if *t* = 1. If an easing function is not specified, it defaults to [d3.easeCubic](https://github.com/d3/d3-ease#easeCubic). - -If a *value* is not specified, returns the current easing function for the first (non-null) element in the transition. This is generally useful only if you know that the transition contains exactly one element. - -<a name="transition_easeVarying" href="#transition_easeVarying">#</a> <i>transition</i>.<b>easeVarying</b>(<i>factory</i>) [<>](https://github.com/d3/d3-transition/blob/master/src/transition/easeVarying.js "Source") - -Specifies a factory for the transition [easing function](https://github.com/d3/d3-ease). The *factory* must be a function. It is invoked for each node of the selection, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element. It must return an easing function. - -### Control Flow - -For advanced usage, transitions provide methods for custom control flow. - -<a name="transition_end" href="#transition_end">#</a> <i>transition</i>.<b>end</b>() · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/end.js) - -Returns a promise that resolves when every selected element finishes transitioning. If any element’s transition is cancelled or interrupted, the promise rejects. - -<a name="transition_on" href="#transition_on">#</a> <i>transition</i>.<b>on</b>(<i>typenames</i>[, <i>listener</i>]) · [Source](https://github.com/d3/d3-transition/blob/master/src/transition/on.js) - -Adds or removes a *listener* to each selected element for the specified event *typenames*. The *typenames* is one of the following string event types: - -* `start` - when the transition starts. -* `end` - when the transition ends. -* `interrupt` - when the transition is interrupted. -* `cancel` - when the transition is cancelled. - -See [The Life of a Transition](#the-life-of-a-transition) for more. Note that these are *not* native DOM events as implemented by [*selection*.on](https://github.com/d3/d3-selection#selection_on) and [*selection*.dispatch](https://github.com/d3/d3-selection#selection_dispatch), but transition events! - -The type may be optionally followed by a period (`.`) and a name; the optional name allows multiple callbacks to be registered to receive events of the same type, such as `start.foo` and `start.bar`. To specify multiple typenames, separate typenames with spaces, such as `interrupt end` or `start.foo start.bar`. - -When a specified transition event is dispatched on a selected node, the specified *listener* will be invoked for the transitioning element, being passed the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element. Listeners always see the latest datum for their element, but the index is a property of the selection and is fixed when the listener is assigned; to update the index, re-assign the listener. - -If an event listener was previously registered for the same *typename* on a selected element, the old listener is removed before the new listener is added. To remove a listener, pass null as the *listener*. To remove all listeners for a given name, pass null as the *listener* and `.foo` as the *typename*, where `foo` is the name; to remove all listeners with no name, specify `.` as the *typename*. - -If a *listener* is not specified, returns the currently-assigned listener for the specified event *typename* on the first (non-null) selected element, if any. If multiple typenames are specified, the first matching listener is returned. - -<a name="transition_each" href="#transition_each">#</a> <i>transition</i>.<b>each</b>(<i>function</i>) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/each.js) - -Invokes the specified *function* for each selected element, passing in the current datum (*d*), the current index (*i*), and the current group (*nodes*), with *this* as the current DOM element. This method can be used to invoke arbitrary code for each selected element, and is useful for creating a context to access parent and child data simultaneously. Equivalent to [*selection*.each](https://github.com/d3/d3-selection#selection_each). - -<a name="transition_call" href="#transition_call">#</a> <i>transition</i>.<b>call</b>(<i>function</i>[, <i>arguments…</i>]) · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/call.js) - -Invokes the specified *function* exactly once, passing in this transition along with any optional *arguments*. Returns this transition. This is equivalent to invoking the function by hand but facilitates method chaining. For example, to set several attributes in a reusable function: - -```js -function color(transition, fill, stroke) { - transition - .style("fill", fill) - .style("stroke", stroke); -} -``` - -Now say: - -```js -d3.selectAll("div").transition().call(color, "red", "blue"); -``` - -This is equivalent to: - -```js -color(d3.selectAll("div").transition(), "red", "blue"); -``` - -Equivalent to [*selection*.call](https://github.com/d3/d3-selection#selection_call). - -<a name="transition_empty" href="#transition_empty">#</a> <i>transition</i>.<b>empty</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/empty.js) - -Returns true if this transition contains no (non-null) elements. Equivalent to [*selection*.empty](https://github.com/d3/d3-selection#selection_empty). - -<a name="transition_nodes" href="#transition_nodes">#</a> <i>transition</i>.<b>nodes</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/nodes.js) - -Returns an array of all (non-null) elements in this transition. Equivalent to [*selection*.nodes](https://github.com/d3/d3-selection#selection_nodes). - -<a name="transition_node" href="#transition_node">#</a> <i>transition</i>.<b>node</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/node.js) - -Returns the first (non-null) element in this transition. If the transition is empty, returns null. Equivalent to [*selection*.node](https://github.com/d3/d3-selection#selection_node). - -<a name="transition_size" href="#transition_size">#</a> <i>transition</i>.<b>size</b>() · [Source](https://github.com/d3/d3-selection/blob/master/src/selection/size.js) - -Returns the total number of elements in this transition. Equivalent to [*selection*.size](https://github.com/d3/d3-selection#selection_size). - -### The Life of a Transition - -Immediately after creating a transition, such as by [*selection*.transition](#selection_transition) or [*transition*.transition](#transition_transition), you may configure the transition using methods such as [*transition*.delay](#transition_delay), [*transition*.duration](#transition_duration), [*transition*.attr](#transition_attr) and [*transition*.style](#transition_style). Methods that specify target values (such as *transition*.attr) are evaluated synchronously; however, methods that require the starting value for interpolation, such as [*transition*.attrTween](#transition_attrTween) and [*transition*.styleTween](#transition_styleTween), must be deferred until the transition starts. - -Shortly after creation, either at the end of the current frame or during the next frame, the transition is scheduled. At this point, the delay and `start` event listeners may no longer be changed; attempting to do so throws an error with the message “too late: already scheduled†(or if the transition has ended, “transition not foundâ€). - -When the transition subsequently starts, it interrupts the active transition of the same name on the same element, if any, dispatching an `interrupt` event to registered listeners. (Note that interrupts happen on start, not creation, and thus even a zero-delay transition will not immediately interrupt the active transition: the old transition is given a final frame. Use [*selection*.interrupt](#selection_interrupt) to interrupt immediately.) The starting transition also cancels any pending transitions of the same name on the same element that were created before the starting transition. The transition then dispatches a `start` event to registered listeners. This is the last moment at which the transition may be modified: the transition’s timing, tweens, and listeners may not be changed when it is running; attempting to do so throws an error with the message “too late: already running†(or if the transition has ended, “transition not foundâ€). The transition initializes its tweens immediately after starting. - -During the frame the transition starts, but *after* all transitions starting this frame have been started, the transition invokes its tweens for the first time. Batching tween initialization, which typically involves reading from the DOM, improves performance by avoiding interleaved DOM reads and writes. - -For each frame that a transition is active, it invokes its tweens with an [eased](#transition_ease) *t*-value ranging from 0 to 1. Within each frame, the transition invokes its tweens in the order they were registered. - -When a transition ends, it invokes its tweens a final time with a (non-eased) *t*-value of 1. It then dispatches an `end` event to registered listeners. This is the last moment at which the transition may be inspected: after ending, the transition is deleted from the element, and its configuration is destroyed. (A transition’s configuration is also destroyed on interrupt or cancel.) Attempting to inspect a transition after it is destroyed throws an error with the message “transition not foundâ€. diff --git a/node_modules/d3-transition/dist/d3-transition.js b/node_modules/d3-transition/dist/d3-transition.js deleted file mode 100644 index 0628d87bae8838297a52b8b1a45afb9a88e1476c..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/dist/d3-transition.js +++ /dev/null @@ -1,898 +0,0 @@ -// https://d3js.org/d3-transition/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-selection'), require('d3-dispatch'), require('d3-timer'), require('d3-interpolate'), require('d3-color'), require('d3-ease')) : -typeof define === 'function' && define.amd ? define(['exports', 'd3-selection', 'd3-dispatch', 'd3-timer', 'd3-interpolate', 'd3-color', 'd3-ease'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {}, global.d3, global.d3, global.d3, global.d3, global.d3, global.d3)); -}(this, function (exports, d3Selection, d3Dispatch, d3Timer, d3Interpolate, d3Color, d3Ease) { 'use strict'; - -var emptyOn = d3Dispatch.dispatch("start", "end", "cancel", "interrupt"); -var emptyTween = []; - -var CREATED = 0; -var SCHEDULED = 1; -var STARTING = 2; -var STARTED = 3; -var RUNNING = 4; -var ENDING = 5; -var ENDED = 6; - -function schedule(node, name, id, index, group, timing) { - var schedules = node.__transition; - if (!schedules) node.__transition = {}; - else if (id in schedules) return; - create(node, id, { - name: name, - index: index, // For context during callback. - group: group, // For context during callback. - on: emptyOn, - tween: emptyTween, - time: timing.time, - delay: timing.delay, - duration: timing.duration, - ease: timing.ease, - timer: null, - state: CREATED - }); -} - -function init(node, id) { - var schedule = get(node, id); - if (schedule.state > CREATED) throw new Error("too late; already scheduled"); - return schedule; -} - -function set(node, id) { - var schedule = get(node, id); - if (schedule.state > STARTED) throw new Error("too late; already running"); - return schedule; -} - -function get(node, id) { - var schedule = node.__transition; - if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found"); - return schedule; -} - -function create(node, id, self) { - var schedules = node.__transition, - tween; - - // Initialize the self timer when the transition is created. - // Note the actual delay is not known until the first callback! - schedules[id] = self; - self.timer = d3Timer.timer(schedule, 0, self.time); - - function schedule(elapsed) { - self.state = SCHEDULED; - self.timer.restart(start, self.delay, self.time); - - // If the elapsed delay is less than our first sleep, start immediately. - if (self.delay <= elapsed) start(elapsed - self.delay); - } - - function start(elapsed) { - var i, j, n, o; - - // If the state is not SCHEDULED, then we previously errored on start. - if (self.state !== SCHEDULED) return stop(); - - for (i in schedules) { - o = schedules[i]; - if (o.name !== self.name) continue; - - // While this element already has a starting transition during this frame, - // defer starting an interrupting transition until that transition has a - // chance to tick (and possibly end); see d3/d3-transition#54! - if (o.state === STARTED) return d3Timer.timeout(start); - - // Interrupt the active transition, if any. - if (o.state === RUNNING) { - o.state = ENDED; - o.timer.stop(); - o.on.call("interrupt", node, node.__data__, o.index, o.group); - delete schedules[i]; - } - - // Cancel any pre-empted transitions. - else if (+i < id) { - o.state = ENDED; - o.timer.stop(); - o.on.call("cancel", node, node.__data__, o.index, o.group); - delete schedules[i]; - } - } - - // Defer the first tick to end of the current frame; see d3/d3#1576. - // Note the transition may be canceled after start and before the first tick! - // Note this must be scheduled before the start event; see d3/d3-transition#16! - // Assuming this is successful, subsequent callbacks go straight to tick. - d3Timer.timeout(function() { - if (self.state === STARTED) { - self.state = RUNNING; - self.timer.restart(tick, self.delay, self.time); - tick(elapsed); - } - }); - - // Dispatch the start event. - // Note this must be done before the tween are initialized. - self.state = STARTING; - self.on.call("start", node, node.__data__, self.index, self.group); - if (self.state !== STARTING) return; // interrupted - self.state = STARTED; - - // Initialize the tween, deleting null tween. - tween = new Array(n = self.tween.length); - for (i = 0, j = -1; i < n; ++i) { - if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) { - tween[++j] = o; - } - } - tween.length = j + 1; - } - - function tick(elapsed) { - var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), - i = -1, - n = tween.length; - - while (++i < n) { - tween[i].call(node, t); - } - - // Dispatch the end event. - if (self.state === ENDING) { - self.on.call("end", node, node.__data__, self.index, self.group); - stop(); - } - } - - function stop() { - self.state = ENDED; - self.timer.stop(); - delete schedules[id]; - for (var i in schedules) return; // eslint-disable-line no-unused-vars - delete node.__transition; - } -} - -function interrupt(node, name) { - var schedules = node.__transition, - schedule, - active, - empty = true, - i; - - if (!schedules) return; - - name = name == null ? null : name + ""; - - for (i in schedules) { - if ((schedule = schedules[i]).name !== name) { empty = false; continue; } - active = schedule.state > STARTING && schedule.state < ENDING; - schedule.state = ENDED; - schedule.timer.stop(); - schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group); - delete schedules[i]; - } - - if (empty) delete node.__transition; -} - -function selection_interrupt(name) { - return this.each(function() { - interrupt(this, name); - }); -} - -function tweenRemove(id, name) { - var tween0, tween1; - return function() { - var schedule = set(this, id), - tween = schedule.tween; - - // If this node shared tween with the previous node, - // just assign the updated shared tween and we’re done! - // Otherwise, copy-on-write. - if (tween !== tween0) { - tween1 = tween0 = tween; - for (var i = 0, n = tween1.length; i < n; ++i) { - if (tween1[i].name === name) { - tween1 = tween1.slice(); - tween1.splice(i, 1); - break; - } - } - } - - schedule.tween = tween1; - }; -} - -function tweenFunction(id, name, value) { - var tween0, tween1; - if (typeof value !== "function") throw new Error; - return function() { - var schedule = set(this, id), - tween = schedule.tween; - - // If this node shared tween with the previous node, - // just assign the updated shared tween and we’re done! - // Otherwise, copy-on-write. - if (tween !== tween0) { - tween1 = (tween0 = tween).slice(); - for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) { - if (tween1[i].name === name) { - tween1[i] = t; - break; - } - } - if (i === n) tween1.push(t); - } - - schedule.tween = tween1; - }; -} - -function transition_tween(name, value) { - var id = this._id; - - name += ""; - - if (arguments.length < 2) { - var tween = get(this.node(), id).tween; - for (var i = 0, n = tween.length, t; i < n; ++i) { - if ((t = tween[i]).name === name) { - return t.value; - } - } - return null; - } - - return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value)); -} - -function tweenValue(transition, name, value) { - var id = transition._id; - - transition.each(function() { - var schedule = set(this, id); - (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments); - }); - - return function(node) { - return get(node, id).value[name]; - }; -} - -function interpolate(a, b) { - var c; - return (typeof b === "number" ? d3Interpolate.interpolateNumber - : b instanceof d3Color.color ? d3Interpolate.interpolateRgb - : (c = d3Color.color(b)) ? (b = c, d3Interpolate.interpolateRgb) - : d3Interpolate.interpolateString)(a, b); -} - -function attrRemove(name) { - return function() { - this.removeAttribute(name); - }; -} - -function attrRemoveNS(fullname) { - return function() { - this.removeAttributeNS(fullname.space, fullname.local); - }; -} - -function attrConstant(name, interpolate, value1) { - var string00, - string1 = value1 + "", - interpolate0; - return function() { - var string0 = this.getAttribute(name); - return string0 === string1 ? null - : string0 === string00 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, value1); - }; -} - -function attrConstantNS(fullname, interpolate, value1) { - var string00, - string1 = value1 + "", - interpolate0; - return function() { - var string0 = this.getAttributeNS(fullname.space, fullname.local); - return string0 === string1 ? null - : string0 === string00 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, value1); - }; -} - -function attrFunction(name, interpolate, value) { - var string00, - string10, - interpolate0; - return function() { - var string0, value1 = value(this), string1; - if (value1 == null) return void this.removeAttribute(name); - string0 = this.getAttribute(name); - string1 = value1 + ""; - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); - }; -} - -function attrFunctionNS(fullname, interpolate, value) { - var string00, - string10, - interpolate0; - return function() { - var string0, value1 = value(this), string1; - if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local); - string0 = this.getAttributeNS(fullname.space, fullname.local); - string1 = value1 + ""; - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); - }; -} - -function transition_attr(name, value) { - var fullname = d3Selection.namespace(name), i = fullname === "transform" ? d3Interpolate.interpolateTransformSvg : interpolate; - return this.attrTween(name, typeof value === "function" - ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, "attr." + name, value)) - : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) - : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value)); -} - -function attrInterpolate(name, i) { - return function(t) { - this.setAttribute(name, i.call(this, t)); - }; -} - -function attrInterpolateNS(fullname, i) { - return function(t) { - this.setAttributeNS(fullname.space, fullname.local, i.call(this, t)); - }; -} - -function attrTweenNS(fullname, value) { - var t0, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i); - return t0; - } - tween._value = value; - return tween; -} - -function attrTween(name, value) { - var t0, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i); - return t0; - } - tween._value = value; - return tween; -} - -function transition_attrTween(name, value) { - var key = "attr." + name; - if (arguments.length < 2) return (key = this.tween(key)) && key._value; - if (value == null) return this.tween(key, null); - if (typeof value !== "function") throw new Error; - var fullname = d3Selection.namespace(name); - return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value)); -} - -function delayFunction(id, value) { - return function() { - init(this, id).delay = +value.apply(this, arguments); - }; -} - -function delayConstant(id, value) { - return value = +value, function() { - init(this, id).delay = value; - }; -} - -function transition_delay(value) { - var id = this._id; - - return arguments.length - ? this.each((typeof value === "function" - ? delayFunction - : delayConstant)(id, value)) - : get(this.node(), id).delay; -} - -function durationFunction(id, value) { - return function() { - set(this, id).duration = +value.apply(this, arguments); - }; -} - -function durationConstant(id, value) { - return value = +value, function() { - set(this, id).duration = value; - }; -} - -function transition_duration(value) { - var id = this._id; - - return arguments.length - ? this.each((typeof value === "function" - ? durationFunction - : durationConstant)(id, value)) - : get(this.node(), id).duration; -} - -function easeConstant(id, value) { - if (typeof value !== "function") throw new Error; - return function() { - set(this, id).ease = value; - }; -} - -function transition_ease(value) { - var id = this._id; - - return arguments.length - ? this.each(easeConstant(id, value)) - : get(this.node(), id).ease; -} - -function easeVarying(id, value) { - return function() { - var v = value.apply(this, arguments); - if (typeof v !== "function") throw new Error; - set(this, id).ease = v; - }; -} - -function transition_easeVarying(value) { - if (typeof value !== "function") throw new Error; - return this.each(easeVarying(this._id, value)); -} - -function transition_filter(match) { - if (typeof match !== "function") match = d3Selection.matcher(match); - - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { - if ((node = group[i]) && match.call(node, node.__data__, i, group)) { - subgroup.push(node); - } - } - } - - return new Transition(subgroups, this._parents, this._name, this._id); -} - -function transition_merge(transition) { - if (transition._id !== this._id) throw new Error; - - for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { - for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { - if (node = group0[i] || group1[i]) { - merge[i] = node; - } - } - } - - for (; j < m0; ++j) { - merges[j] = groups0[j]; - } - - return new Transition(merges, this._parents, this._name, this._id); -} - -function start(name) { - return (name + "").trim().split(/^|\s+/).every(function(t) { - var i = t.indexOf("."); - if (i >= 0) t = t.slice(0, i); - return !t || t === "start"; - }); -} - -function onFunction(id, name, listener) { - var on0, on1, sit = start(name) ? init : set; - return function() { - var schedule = sit(this, id), - on = schedule.on; - - // If this node shared a dispatch with the previous node, - // just assign the updated shared dispatch and we’re done! - // Otherwise, copy-on-write. - if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener); - - schedule.on = on1; - }; -} - -function transition_on(name, listener) { - var id = this._id; - - return arguments.length < 2 - ? get(this.node(), id).on.on(name) - : this.each(onFunction(id, name, listener)); -} - -function removeFunction(id) { - return function() { - var parent = this.parentNode; - for (var i in this.__transition) if (+i !== id) return; - if (parent) parent.removeChild(this); - }; -} - -function transition_remove() { - return this.on("end.remove", removeFunction(this._id)); -} - -function transition_select(select) { - var name = this._name, - id = this._id; - - if (typeof select !== "function") select = d3Selection.selector(select); - - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { - if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { - if ("__data__" in node) subnode.__data__ = node.__data__; - subgroup[i] = subnode; - schedule(subgroup[i], name, id, i, subgroup, get(node, id)); - } - } - } - - return new Transition(subgroups, this._parents, name, id); -} - -function transition_selectAll(select) { - var name = this._name, - id = this._id; - - if (typeof select !== "function") select = d3Selection.selectorAll(select); - - for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) { - if (child = children[k]) { - schedule(child, name, id, k, children, inherit); - } - } - subgroups.push(children); - parents.push(node); - } - } - } - - return new Transition(subgroups, parents, name, id); -} - -var Selection = d3Selection.selection.prototype.constructor; - -function transition_selection() { - return new Selection(this._groups, this._parents); -} - -function styleNull(name, interpolate) { - var string00, - string10, - interpolate0; - return function() { - var string0 = d3Selection.style(this, name), - string1 = (this.style.removeProperty(name), d3Selection.style(this, name)); - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, string10 = string1); - }; -} - -function styleRemove(name) { - return function() { - this.style.removeProperty(name); - }; -} - -function styleConstant(name, interpolate, value1) { - var string00, - string1 = value1 + "", - interpolate0; - return function() { - var string0 = d3Selection.style(this, name); - return string0 === string1 ? null - : string0 === string00 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, value1); - }; -} - -function styleFunction(name, interpolate, value) { - var string00, - string10, - interpolate0; - return function() { - var string0 = d3Selection.style(this, name), - value1 = value(this), - string1 = value1 + ""; - if (value1 == null) string1 = value1 = (this.style.removeProperty(name), d3Selection.style(this, name)); - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); - }; -} - -function styleMaybeRemove(id, name) { - var on0, on1, listener0, key = "style." + name, event = "end." + key, remove; - return function() { - var schedule = set(this, id), - on = schedule.on, - listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined; - - // If this node shared a dispatch with the previous node, - // just assign the updated shared dispatch and we’re done! - // Otherwise, copy-on-write. - if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener); - - schedule.on = on1; - }; -} - -function transition_style(name, value, priority) { - var i = (name += "") === "transform" ? d3Interpolate.interpolateTransformCss : interpolate; - return value == null ? this - .styleTween(name, styleNull(name, i)) - .on("end.style." + name, styleRemove(name)) - : typeof value === "function" ? this - .styleTween(name, styleFunction(name, i, tweenValue(this, "style." + name, value))) - .each(styleMaybeRemove(this._id, name)) - : this - .styleTween(name, styleConstant(name, i, value), priority) - .on("end.style." + name, null); -} - -function styleInterpolate(name, i, priority) { - return function(t) { - this.style.setProperty(name, i.call(this, t), priority); - }; -} - -function styleTween(name, value, priority) { - var t, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority); - return t; - } - tween._value = value; - return tween; -} - -function transition_styleTween(name, value, priority) { - var key = "style." + (name += ""); - if (arguments.length < 2) return (key = this.tween(key)) && key._value; - if (value == null) return this.tween(key, null); - if (typeof value !== "function") throw new Error; - return this.tween(key, styleTween(name, value, priority == null ? "" : priority)); -} - -function textConstant(value) { - return function() { - this.textContent = value; - }; -} - -function textFunction(value) { - return function() { - var value1 = value(this); - this.textContent = value1 == null ? "" : value1; - }; -} - -function transition_text(value) { - return this.tween("text", typeof value === "function" - ? textFunction(tweenValue(this, "text", value)) - : textConstant(value == null ? "" : value + "")); -} - -function textInterpolate(i) { - return function(t) { - this.textContent = i.call(this, t); - }; -} - -function textTween(value) { - var t0, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t0 = (i0 = i) && textInterpolate(i); - return t0; - } - tween._value = value; - return tween; -} - -function transition_textTween(value) { - var key = "text"; - if (arguments.length < 1) return (key = this.tween(key)) && key._value; - if (value == null) return this.tween(key, null); - if (typeof value !== "function") throw new Error; - return this.tween(key, textTween(value)); -} - -function transition_transition() { - var name = this._name, - id0 = this._id, - id1 = newId(); - - for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - var inherit = get(node, id0); - schedule(node, name, id1, i, group, { - time: inherit.time + inherit.delay + inherit.duration, - delay: 0, - duration: inherit.duration, - ease: inherit.ease - }); - } - } - } - - return new Transition(groups, this._parents, name, id1); -} - -function transition_end() { - var on0, on1, that = this, id = that._id, size = that.size(); - return new Promise(function(resolve, reject) { - var cancel = {value: reject}, - end = {value: function() { if (--size === 0) resolve(); }}; - - that.each(function() { - var schedule = set(this, id), - on = schedule.on; - - // If this node shared a dispatch with the previous node, - // just assign the updated shared dispatch and we’re done! - // Otherwise, copy-on-write. - if (on !== on0) { - on1 = (on0 = on).copy(); - on1._.cancel.push(cancel); - on1._.interrupt.push(cancel); - on1._.end.push(end); - } - - schedule.on = on1; - }); - - // The selection was empty, resolve end immediately - if (size === 0) resolve(); - }); -} - -var id = 0; - -function Transition(groups, parents, name, id) { - this._groups = groups; - this._parents = parents; - this._name = name; - this._id = id; -} - -function transition(name) { - return d3Selection.selection().transition(name); -} - -function newId() { - return ++id; -} - -var selection_prototype = d3Selection.selection.prototype; - -Transition.prototype = transition.prototype = { - constructor: Transition, - select: transition_select, - selectAll: transition_selectAll, - filter: transition_filter, - merge: transition_merge, - selection: transition_selection, - transition: transition_transition, - call: selection_prototype.call, - nodes: selection_prototype.nodes, - node: selection_prototype.node, - size: selection_prototype.size, - empty: selection_prototype.empty, - each: selection_prototype.each, - on: transition_on, - attr: transition_attr, - attrTween: transition_attrTween, - style: transition_style, - styleTween: transition_styleTween, - text: transition_text, - textTween: transition_textTween, - remove: transition_remove, - tween: transition_tween, - delay: transition_delay, - duration: transition_duration, - ease: transition_ease, - easeVarying: transition_easeVarying, - end: transition_end, - [Symbol.iterator]: selection_prototype[Symbol.iterator] -}; - -var defaultTiming = { - time: null, // Set on use. - delay: 0, - duration: 250, - ease: d3Ease.easeCubicInOut -}; - -function inherit(node, id) { - var timing; - while (!(timing = node.__transition) || !(timing = timing[id])) { - if (!(node = node.parentNode)) { - throw new Error(`transition ${id} not found`); - } - } - return timing; -} - -function selection_transition(name) { - var id, - timing; - - if (name instanceof Transition) { - id = name._id, name = name._name; - } else { - id = newId(), (timing = defaultTiming).time = d3Timer.now(), name = name == null ? null : name + ""; - } - - for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - schedule(node, name, id, i, group, timing || inherit(node, id)); - } - } - } - - return new Transition(groups, this._parents, name, id); -} - -d3Selection.selection.prototype.interrupt = selection_interrupt; -d3Selection.selection.prototype.transition = selection_transition; - -var root = [null]; - -function active(node, name) { - var schedules = node.__transition, - schedule, - i; - - if (schedules) { - name = name == null ? null : name + ""; - for (i in schedules) { - if ((schedule = schedules[i]).state > SCHEDULED && schedule.name === name) { - return new Transition([[node]], root, name, +i); - } - } - } - - return null; -} - -exports.active = active; -exports.interrupt = interrupt; -exports.transition = transition; - -Object.defineProperty(exports, '__esModule', { value: true }); - -})); diff --git a/node_modules/d3-transition/dist/d3-transition.min.js b/node_modules/d3-transition/dist/d3-transition.min.js deleted file mode 100644 index b4fd717e84d879c18108f35dd5a3a1d10d9a24be..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/dist/d3-transition.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-transition/ v2.0.0 Copyright 2020 Mike Bostock -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-selection"),require("d3-dispatch"),require("d3-timer"),require("d3-interpolate"),require("d3-color"),require("d3-ease")):"function"==typeof define&&define.amd?define(["exports","d3-selection","d3-dispatch","d3-timer","d3-interpolate","d3-color","d3-ease"],n):n((t=t||self).d3=t.d3||{},t.d3,t.d3,t.d3,t.d3,t.d3,t.d3)}(this,function(t,n,e,r,i,o,u){"use strict";var a=e.dispatch("start","end","cancel","interrupt"),s=[],l=0,f=1,c=2,h=3,d=4,p=5,_=6;function v(t,n,e,i,o,u){var v=t.__transition;if(v){if(e in v)return}else t.__transition={};!function(t,n,e){var i,o=t.__transition;function u(l){var p,v,y,m;if(e.state!==f)return s();for(p in o)if((m=o[p]).name===e.name){if(m.state===h)return r.timeout(u);m.state===d?(m.state=_,m.timer.stop(),m.on.call("interrupt",t,t.__data__,m.index,m.group),delete o[p]):+p<n&&(m.state=_,m.timer.stop(),m.on.call("cancel",t,t.__data__,m.index,m.group),delete o[p])}if(r.timeout(function(){e.state===h&&(e.state=d,e.timer.restart(a,e.delay,e.time),a(l))}),e.state=c,e.on.call("start",t,t.__data__,e.index,e.group),e.state===c){for(e.state=h,i=new Array(y=e.tween.length),p=0,v=-1;p<y;++p)(m=e.tween[p].value.call(t,t.__data__,e.index,e.group))&&(i[++v]=m);i.length=v+1}}function a(n){for(var r=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(s),e.state=p,1),o=-1,u=i.length;++o<u;)i[o].call(t,r);e.state===p&&(e.on.call("end",t,t.__data__,e.index,e.group),s())}function s(){for(var r in e.state=_,e.timer.stop(),delete o[n],o)return;delete t.__transition}o[n]=e,e.timer=r.timer(function(t){e.state=f,e.timer.restart(u,e.delay,e.time),e.delay<=t&&u(t-e.delay)},0,e.time)}(t,e,{name:n,index:i,group:o,on:a,tween:s,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:l})}function y(t,n){var e=w(t,n);if(e.state>l)throw new Error("too late; already scheduled");return e}function m(t,n){var e=w(t,n);if(e.state>h)throw new Error("too late; already running");return e}function w(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function g(t,n){var e,r,i,o=t.__transition,u=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>c&&e.state<p,e.state=_,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}}function b(t,n,e){var r=t._id;return t.each(function(){var t=m(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return w(t,r).value[n]}}function x(t,n){var e;return("number"==typeof n?i.interpolateNumber:n instanceof o.color?i.interpolateRgb:(e=o.color(n))?(n=e,i.interpolateRgb):i.interpolateString)(t,n)}var A=n.selection.prototype.constructor;function E(t){return function(){this.style.removeProperty(t)}}var S=0;function T(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function N(t){return n.selection().transition(t)}function q(){return++S}var C=n.selection.prototype;T.prototype=N.prototype={constructor:T,select:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=n.selector(t));for(var i=this._groups,o=i.length,u=new Array(o),a=0;a<o;++a)for(var s,l,f=i[a],c=f.length,h=u[a]=new Array(c),d=0;d<c;++d)(s=f[d])&&(l=t.call(s,s.__data__,d,f))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,v(h[d],e,r,d,h,w(s,r)));return new T(u,this._parents,e,r)},selectAll:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=n.selectorAll(t));for(var i=this._groups,o=i.length,u=[],a=[],s=0;s<o;++s)for(var l,f=i[s],c=f.length,h=0;h<c;++h)if(l=f[h]){for(var d,p=t.call(l,l.__data__,h,f),_=w(l,r),y=0,m=p.length;y<m;++y)(d=p[y])&&v(d,e,r,y,p,_);u.push(p),a.push(l)}return new T(u,a,e,r)},filter:function(t){"function"!=typeof t&&(t=n.matcher(t));for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o)for(var u,a=e[o],s=a.length,l=i[o]=[],f=0;f<s;++f)(u=a[f])&&t.call(u,u.__data__,f,a)&&l.push(u);return new T(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],f=e[a],c=l.length,h=u[a]=new Array(c),d=0;d<c;++d)(s=l[d]||f[d])&&(h[d]=s);for(;a<r;++a)u[a]=n[a];return new T(u,this._parents,this._name,this._id)},selection:function(){return new A(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=q(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,l=0;l<s;++l)if(u=a[l]){var f=w(u,n);v(u,t,e,l,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new T(r,this._parents,t,e)},call:C.call,nodes:C.nodes,node:C.node,size:C.size,empty:C.empty,each:C.each,on:function(t,n){var e=this._id;return arguments.length<2?w(this.node(),e).on.on(t):this.each(function(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}(n)?y:m;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}(e,t,n))},attr:function(t,e){var r=n.namespace(t),o="transform"===r?i.interpolateTransformSvg:x;return this.attrTween(t,"function"==typeof e?(r.local?function(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttributeNS(t.space,t.local))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttribute(t))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttribute(t)}})(r,o,b(this,"attr."+t,e)):null==e?(r.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(r):(r.local?function(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttributeNS(t.space,t.local);return u===o?null:u===r?i:i=n(r=u,e)}}:function(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttribute(t);return u===o?null:u===r?i:i=n(r=u,e)}})(r,o,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=n.namespace(t);return this.tween(r,(i.local?function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}(t,i)),e}return i._value=n,i}:function(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}(t,i)),e}return i._value=n,i})(i,e))},style:function(t,e,r){var o="transform"==(t+="")?i.interpolateTransformCss:x;return null==e?this.styleTween(t,function(t,e){var r,i,o;return function(){var u=n.style(this,t),a=(this.style.removeProperty(t),n.style(this,t));return u===a?null:u===r&&a===i?o:o=e(r=u,i=a)}}(t,o)).on("end.style."+t,E(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,o,u;return function(){var a=n.style(this,t),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=n.style(this,t)),a===l?null:a===i&&l===o?u:(o=l,u=e(i=a,s))}}(t,o,b(this,"style."+t,e))).each(function(t,n){var e,r,i,o,u="style."+n,a="end."+u;return function(){var s=m(this,t),l=s.on,f=null==s.value[u]?o||(o=E(n)):void 0;l===e&&i===f||(r=(e=l).copy()).on(a,i=f),s.on=r}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,o,u=r+"";return function(){var a=n.style(this,t);return a===u?null:a===i?o:o=e(i=a,r)}}(t,o,e),r).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}(t,o,e)),r}return o._value=n,o}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(b(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,function(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&function(t){return function(n){this.textContent=t.call(this,n)}}(r)),n}return r._value=t,r}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=w(this.node(),e).tween,o=0,u=i.length;o<u;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?function(t,n){var e,r;return function(){var i=m(this,t),o=i.tween;if(o!==e)for(var u=0,a=(r=e=o).length;u<a;++u)if(r[u].name===n){(r=r.slice()).splice(u,1);break}i.tween=r}}:function(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=m(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},s=0,l=i.length;s<l;++s)if(i[s].name===n){i[s]=a;break}s===l&&i.push(a)}o.tween=i}})(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){y(this,t).delay=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){y(this,t).delay=n}})(n,t)):w(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){m(this,t).duration=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){m(this,t).duration=n}})(n,t)):w(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(t,n){if("function"!=typeof n)throw new Error;return function(){m(this,t).ease=n}}(n,t)):w(this.node(),n).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,n){return function(){var e=n.apply(this,arguments);if("function"!=typeof e)throw new Error;m(this,t).ease=e}}(this._id,t))},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(o,u){var a={value:u},s={value:function(){0==--i&&o()}};e.each(function(){var e=m(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(a),n._.interrupt.push(a),n._.end.push(s)),e.on=n}),0===i&&o()})},[Symbol.iterator]:C[Symbol.iterator]};var P={time:null,delay:0,duration:250,ease:u.easeCubicInOut};function z(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw new Error(`transition ${n} not found`);return e}n.selection.prototype.interrupt=function(t){return this.each(function(){g(this,t)})},n.selection.prototype.transition=function(t){var n,e;t instanceof T?(n=t._id,t=t._name):(n=q(),(e=P).time=r.now(),t=null==t?null:t+"");for(var i=this._groups,o=i.length,u=0;u<o;++u)for(var a,s=i[u],l=s.length,f=0;f<l;++f)(a=s[f])&&v(a,t,n,f,s,e||z(a,n));return new T(i,this._parents,t,n)};var O=[null];t.active=function(t,n){var e,r,i=t.__transition;if(i)for(r in n=null==n?null:n+"",i)if((e=i[r]).state>f&&e.name===n)return new T([[t]],O,n,+r);return null},t.interrupt=g,t.transition=N,Object.defineProperty(t,"__esModule",{value:!0})}); diff --git a/node_modules/d3-transition/package.json b/node_modules/d3-transition/package.json deleted file mode 100644 index daba5eeb59b2d288ed2f28f078cbf41a6a298733..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/package.json +++ /dev/null @@ -1,85 +0,0 @@ -{ - "_from": "d3-transition@2", - "_id": "d3-transition@2.0.0", - "_inBundle": false, - "_integrity": "sha512-42ltAGgJesfQE3u9LuuBHNbGrI/AJjNL2OAUdclE70UE6Vy239GCBEYD38uBPoLeNsOhFStGpPI0BAOV+HMxog==", - "_location": "/d3-transition", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-transition@2", - "name": "d3-transition", - "escapedName": "d3-transition", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3", - "/d3-brush", - "/d3-zoom" - ], - "_resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-2.0.0.tgz", - "_shasum": "366ef70c22ef88d1e34105f507516991a291c94c", - "_spec": "d3-transition@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "https://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-transition/issues" - }, - "bundleDependencies": false, - "dependencies": { - "d3-color": "1 - 2", - "d3-dispatch": "1 - 2", - "d3-ease": "1 - 2", - "d3-interpolate": "1 - 2", - "d3-timer": "1 - 2" - }, - "deprecated": false, - "description": "Animated transitions for D3 selections.", - "devDependencies": { - "d3-selection": "2", - "eslint": "6", - "jsdom": "15", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-transition/", - "jsdelivr": "dist/d3-transition.min.js", - "keywords": [ - "d3", - "d3-module", - "dom", - "transition", - "animation" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-transition.js", - "module": "src/index.js", - "name": "d3-transition", - "peerDependencies": { - "d3-selection": "2" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-transition.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src" - }, - "sideEffects": true, - "unpkg": "dist/d3-transition.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-transition/src/active.js b/node_modules/d3-transition/src/active.js deleted file mode 100644 index abd4c67e1cf61f1c04f7e0346efae1fcc885c8ab..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/active.js +++ /dev/null @@ -1,21 +0,0 @@ -import {Transition} from "./transition/index.js"; -import {SCHEDULED} from "./transition/schedule.js"; - -var root = [null]; - -export default function(node, name) { - var schedules = node.__transition, - schedule, - i; - - if (schedules) { - name = name == null ? null : name + ""; - for (i in schedules) { - if ((schedule = schedules[i]).state > SCHEDULED && schedule.name === name) { - return new Transition([[node]], root, name, +i); - } - } - } - - return null; -} diff --git a/node_modules/d3-transition/src/index.js b/node_modules/d3-transition/src/index.js deleted file mode 100644 index d6a6dd35f3e49670fce24bef729832cf5b8a34be..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/index.js +++ /dev/null @@ -1,4 +0,0 @@ -import "./selection/index.js"; -export {default as transition} from "./transition/index.js"; -export {default as active} from "./active.js"; -export {default as interrupt} from "./interrupt.js"; diff --git a/node_modules/d3-transition/src/interrupt.js b/node_modules/d3-transition/src/interrupt.js deleted file mode 100644 index efb455ebfb2f65d59378407e3062e39d5d8e6301..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/interrupt.js +++ /dev/null @@ -1,24 +0,0 @@ -import {STARTING, ENDING, ENDED} from "./transition/schedule.js"; - -export default function(node, name) { - var schedules = node.__transition, - schedule, - active, - empty = true, - i; - - if (!schedules) return; - - name = name == null ? null : name + ""; - - for (i in schedules) { - if ((schedule = schedules[i]).name !== name) { empty = false; continue; } - active = schedule.state > STARTING && schedule.state < ENDING; - schedule.state = ENDED; - schedule.timer.stop(); - schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group); - delete schedules[i]; - } - - if (empty) delete node.__transition; -} diff --git a/node_modules/d3-transition/src/selection/index.js b/node_modules/d3-transition/src/selection/index.js deleted file mode 100644 index c5512eff5a689c3aac72bdab6cdfbf5982eff5b2..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/selection/index.js +++ /dev/null @@ -1,6 +0,0 @@ -import {selection} from "d3-selection"; -import selection_interrupt from "./interrupt.js"; -import selection_transition from "./transition.js"; - -selection.prototype.interrupt = selection_interrupt; -selection.prototype.transition = selection_transition; diff --git a/node_modules/d3-transition/src/selection/interrupt.js b/node_modules/d3-transition/src/selection/interrupt.js deleted file mode 100644 index 799a9238e71f3706935190526a9b2eddd07c07cc..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/selection/interrupt.js +++ /dev/null @@ -1,7 +0,0 @@ -import interrupt from "../interrupt.js"; - -export default function(name) { - return this.each(function() { - interrupt(this, name); - }); -} diff --git a/node_modules/d3-transition/src/selection/transition.js b/node_modules/d3-transition/src/selection/transition.js deleted file mode 100644 index a328dcb33cd85d49264cae3f7942435d56dc6c90..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/selection/transition.js +++ /dev/null @@ -1,42 +0,0 @@ -import {Transition, newId} from "../transition/index.js"; -import schedule from "../transition/schedule.js"; -import {easeCubicInOut} from "d3-ease"; -import {now} from "d3-timer"; - -var defaultTiming = { - time: null, // Set on use. - delay: 0, - duration: 250, - ease: easeCubicInOut -}; - -function inherit(node, id) { - var timing; - while (!(timing = node.__transition) || !(timing = timing[id])) { - if (!(node = node.parentNode)) { - throw new Error(`transition ${id} not found`); - } - } - return timing; -} - -export default function(name) { - var id, - timing; - - if (name instanceof Transition) { - id = name._id, name = name._name; - } else { - id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + ""; - } - - for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - schedule(node, name, id, i, group, timing || inherit(node, id)); - } - } - } - - return new Transition(groups, this._parents, name, id); -} diff --git a/node_modules/d3-transition/src/transition/attr.js b/node_modules/d3-transition/src/transition/attr.js deleted file mode 100644 index 3c3c764e71daa85e5c00bd8ec8e5eace5743ebb1..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/attr.js +++ /dev/null @@ -1,78 +0,0 @@ -import {interpolateTransformSvg as interpolateTransform} from "d3-interpolate"; -import {namespace} from "d3-selection"; -import {tweenValue} from "./tween.js"; -import interpolate from "./interpolate.js"; - -function attrRemove(name) { - return function() { - this.removeAttribute(name); - }; -} - -function attrRemoveNS(fullname) { - return function() { - this.removeAttributeNS(fullname.space, fullname.local); - }; -} - -function attrConstant(name, interpolate, value1) { - var string00, - string1 = value1 + "", - interpolate0; - return function() { - var string0 = this.getAttribute(name); - return string0 === string1 ? null - : string0 === string00 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, value1); - }; -} - -function attrConstantNS(fullname, interpolate, value1) { - var string00, - string1 = value1 + "", - interpolate0; - return function() { - var string0 = this.getAttributeNS(fullname.space, fullname.local); - return string0 === string1 ? null - : string0 === string00 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, value1); - }; -} - -function attrFunction(name, interpolate, value) { - var string00, - string10, - interpolate0; - return function() { - var string0, value1 = value(this), string1; - if (value1 == null) return void this.removeAttribute(name); - string0 = this.getAttribute(name); - string1 = value1 + ""; - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); - }; -} - -function attrFunctionNS(fullname, interpolate, value) { - var string00, - string10, - interpolate0; - return function() { - var string0, value1 = value(this), string1; - if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local); - string0 = this.getAttributeNS(fullname.space, fullname.local); - string1 = value1 + ""; - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); - }; -} - -export default function(name, value) { - var fullname = namespace(name), i = fullname === "transform" ? interpolateTransform : interpolate; - return this.attrTween(name, typeof value === "function" - ? (fullname.local ? attrFunctionNS : attrFunction)(fullname, i, tweenValue(this, "attr." + name, value)) - : value == null ? (fullname.local ? attrRemoveNS : attrRemove)(fullname) - : (fullname.local ? attrConstantNS : attrConstant)(fullname, i, value)); -} diff --git a/node_modules/d3-transition/src/transition/attrTween.js b/node_modules/d3-transition/src/transition/attrTween.js deleted file mode 100644 index 0dd4a0058a265277e46796ad97dd3cda0e4eb7c5..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/attrTween.js +++ /dev/null @@ -1,44 +0,0 @@ -import {namespace} from "d3-selection"; - -function attrInterpolate(name, i) { - return function(t) { - this.setAttribute(name, i.call(this, t)); - }; -} - -function attrInterpolateNS(fullname, i) { - return function(t) { - this.setAttributeNS(fullname.space, fullname.local, i.call(this, t)); - }; -} - -function attrTweenNS(fullname, value) { - var t0, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i); - return t0; - } - tween._value = value; - return tween; -} - -function attrTween(name, value) { - var t0, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i); - return t0; - } - tween._value = value; - return tween; -} - -export default function(name, value) { - var key = "attr." + name; - if (arguments.length < 2) return (key = this.tween(key)) && key._value; - if (value == null) return this.tween(key, null); - if (typeof value !== "function") throw new Error; - var fullname = namespace(name); - return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value)); -} diff --git a/node_modules/d3-transition/src/transition/delay.js b/node_modules/d3-transition/src/transition/delay.js deleted file mode 100644 index 1ba1acd1439776c21825f9fa95474a27aa3ea743..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/delay.js +++ /dev/null @@ -1,23 +0,0 @@ -import {get, init} from "./schedule.js"; - -function delayFunction(id, value) { - return function() { - init(this, id).delay = +value.apply(this, arguments); - }; -} - -function delayConstant(id, value) { - return value = +value, function() { - init(this, id).delay = value; - }; -} - -export default function(value) { - var id = this._id; - - return arguments.length - ? this.each((typeof value === "function" - ? delayFunction - : delayConstant)(id, value)) - : get(this.node(), id).delay; -} diff --git a/node_modules/d3-transition/src/transition/duration.js b/node_modules/d3-transition/src/transition/duration.js deleted file mode 100644 index 445691ef95ed7a47c95e3cd074a20b9e49533db3..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/duration.js +++ /dev/null @@ -1,23 +0,0 @@ -import {get, set} from "./schedule.js"; - -function durationFunction(id, value) { - return function() { - set(this, id).duration = +value.apply(this, arguments); - }; -} - -function durationConstant(id, value) { - return value = +value, function() { - set(this, id).duration = value; - }; -} - -export default function(value) { - var id = this._id; - - return arguments.length - ? this.each((typeof value === "function" - ? durationFunction - : durationConstant)(id, value)) - : get(this.node(), id).duration; -} diff --git a/node_modules/d3-transition/src/transition/ease.js b/node_modules/d3-transition/src/transition/ease.js deleted file mode 100644 index 83b1445bfab9e48ab9c8f402d7cb508705b1fa23..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/ease.js +++ /dev/null @@ -1,16 +0,0 @@ -import {get, set} from "./schedule.js"; - -function easeConstant(id, value) { - if (typeof value !== "function") throw new Error; - return function() { - set(this, id).ease = value; - }; -} - -export default function(value) { - var id = this._id; - - return arguments.length - ? this.each(easeConstant(id, value)) - : get(this.node(), id).ease; -} diff --git a/node_modules/d3-transition/src/transition/easeVarying.js b/node_modules/d3-transition/src/transition/easeVarying.js deleted file mode 100644 index 51e3a0d67783c836e6cd4e1cde6956541f5b96e5..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/easeVarying.js +++ /dev/null @@ -1,14 +0,0 @@ -import {set} from "./schedule.js"; - -function easeVarying(id, value) { - return function() { - var v = value.apply(this, arguments); - if (typeof v !== "function") throw new Error; - set(this, id).ease = v; - }; -} - -export default function(value) { - if (typeof value !== "function") throw new Error; - return this.each(easeVarying(this._id, value)); -} diff --git a/node_modules/d3-transition/src/transition/end.js b/node_modules/d3-transition/src/transition/end.js deleted file mode 100644 index d9aa3734cbf6db6271d80a9fb98e0286d7897b1c..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/end.js +++ /dev/null @@ -1,29 +0,0 @@ -import {set} from "./schedule.js"; - -export default function() { - var on0, on1, that = this, id = that._id, size = that.size(); - return new Promise(function(resolve, reject) { - var cancel = {value: reject}, - end = {value: function() { if (--size === 0) resolve(); }}; - - that.each(function() { - var schedule = set(this, id), - on = schedule.on; - - // If this node shared a dispatch with the previous node, - // just assign the updated shared dispatch and we’re done! - // Otherwise, copy-on-write. - if (on !== on0) { - on1 = (on0 = on).copy(); - on1._.cancel.push(cancel); - on1._.interrupt.push(cancel); - on1._.end.push(end); - } - - schedule.on = on1; - }); - - // The selection was empty, resolve end immediately - if (size === 0) resolve(); - }); -} diff --git a/node_modules/d3-transition/src/transition/filter.js b/node_modules/d3-transition/src/transition/filter.js deleted file mode 100644 index f5237be519c4821508f8bd78369014132343e256..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/filter.js +++ /dev/null @@ -1,16 +0,0 @@ -import {matcher} from "d3-selection"; -import {Transition} from "./index.js"; - -export default function(match) { - if (typeof match !== "function") match = matcher(match); - - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { - if ((node = group[i]) && match.call(node, node.__data__, i, group)) { - subgroup.push(node); - } - } - } - - return new Transition(subgroups, this._parents, this._name, this._id); -} diff --git a/node_modules/d3-transition/src/transition/index.js b/node_modules/d3-transition/src/transition/index.js deleted file mode 100644 index 355be71fdbd52433441bc16416167f7e85bd92d3..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/index.js +++ /dev/null @@ -1,71 +0,0 @@ -import {selection} from "d3-selection"; -import transition_attr from "./attr.js"; -import transition_attrTween from "./attrTween.js"; -import transition_delay from "./delay.js"; -import transition_duration from "./duration.js"; -import transition_ease from "./ease.js"; -import transition_easeVarying from "./easeVarying.js"; -import transition_filter from "./filter.js"; -import transition_merge from "./merge.js"; -import transition_on from "./on.js"; -import transition_remove from "./remove.js"; -import transition_select from "./select.js"; -import transition_selectAll from "./selectAll.js"; -import transition_selection from "./selection.js"; -import transition_style from "./style.js"; -import transition_styleTween from "./styleTween.js"; -import transition_text from "./text.js"; -import transition_textTween from "./textTween.js"; -import transition_transition from "./transition.js"; -import transition_tween from "./tween.js"; -import transition_end from "./end.js"; - -var id = 0; - -export function Transition(groups, parents, name, id) { - this._groups = groups; - this._parents = parents; - this._name = name; - this._id = id; -} - -export default function transition(name) { - return selection().transition(name); -} - -export function newId() { - return ++id; -} - -var selection_prototype = selection.prototype; - -Transition.prototype = transition.prototype = { - constructor: Transition, - select: transition_select, - selectAll: transition_selectAll, - filter: transition_filter, - merge: transition_merge, - selection: transition_selection, - transition: transition_transition, - call: selection_prototype.call, - nodes: selection_prototype.nodes, - node: selection_prototype.node, - size: selection_prototype.size, - empty: selection_prototype.empty, - each: selection_prototype.each, - on: transition_on, - attr: transition_attr, - attrTween: transition_attrTween, - style: transition_style, - styleTween: transition_styleTween, - text: transition_text, - textTween: transition_textTween, - remove: transition_remove, - tween: transition_tween, - delay: transition_delay, - duration: transition_duration, - ease: transition_ease, - easeVarying: transition_easeVarying, - end: transition_end, - [Symbol.iterator]: selection_prototype[Symbol.iterator] -}; diff --git a/node_modules/d3-transition/src/transition/interpolate.js b/node_modules/d3-transition/src/transition/interpolate.js deleted file mode 100644 index d389d62c6b6e452299acc4652099a0b6bfca10e7..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/interpolate.js +++ /dev/null @@ -1,10 +0,0 @@ -import {color} from "d3-color"; -import {interpolateNumber, interpolateRgb, interpolateString} from "d3-interpolate"; - -export default function(a, b) { - var c; - return (typeof b === "number" ? interpolateNumber - : b instanceof color ? interpolateRgb - : (c = color(b)) ? (b = c, interpolateRgb) - : interpolateString)(a, b); -} diff --git a/node_modules/d3-transition/src/transition/merge.js b/node_modules/d3-transition/src/transition/merge.js deleted file mode 100644 index 4660953791f1774e5dd85d0f126e576e8be49bca..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/merge.js +++ /dev/null @@ -1,19 +0,0 @@ -import {Transition} from "./index.js"; - -export default function(transition) { - if (transition._id !== this._id) throw new Error; - - for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { - for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { - if (node = group0[i] || group1[i]) { - merge[i] = node; - } - } - } - - for (; j < m0; ++j) { - merges[j] = groups0[j]; - } - - return new Transition(merges, this._parents, this._name, this._id); -} diff --git a/node_modules/d3-transition/src/transition/on.js b/node_modules/d3-transition/src/transition/on.js deleted file mode 100644 index b6a91d3ab4a381dc3a2478975aff5cd70d75c508..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/on.js +++ /dev/null @@ -1,32 +0,0 @@ -import {get, set, init} from "./schedule.js"; - -function start(name) { - return (name + "").trim().split(/^|\s+/).every(function(t) { - var i = t.indexOf("."); - if (i >= 0) t = t.slice(0, i); - return !t || t === "start"; - }); -} - -function onFunction(id, name, listener) { - var on0, on1, sit = start(name) ? init : set; - return function() { - var schedule = sit(this, id), - on = schedule.on; - - // If this node shared a dispatch with the previous node, - // just assign the updated shared dispatch and we’re done! - // Otherwise, copy-on-write. - if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener); - - schedule.on = on1; - }; -} - -export default function(name, listener) { - var id = this._id; - - return arguments.length < 2 - ? get(this.node(), id).on.on(name) - : this.each(onFunction(id, name, listener)); -} diff --git a/node_modules/d3-transition/src/transition/remove.js b/node_modules/d3-transition/src/transition/remove.js deleted file mode 100644 index c4bff9b3fa7bb8c505dc487d43128ee5d96455af..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/remove.js +++ /dev/null @@ -1,11 +0,0 @@ -function removeFunction(id) { - return function() { - var parent = this.parentNode; - for (var i in this.__transition) if (+i !== id) return; - if (parent) parent.removeChild(this); - }; -} - -export default function() { - return this.on("end.remove", removeFunction(this._id)); -} diff --git a/node_modules/d3-transition/src/transition/schedule.js b/node_modules/d3-transition/src/transition/schedule.js deleted file mode 100644 index f4e88d700aaaef065aebe26f71d746df71221dac..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/schedule.js +++ /dev/null @@ -1,153 +0,0 @@ -import {dispatch} from "d3-dispatch"; -import {timer, timeout} from "d3-timer"; - -var emptyOn = dispatch("start", "end", "cancel", "interrupt"); -var emptyTween = []; - -export var CREATED = 0; -export var SCHEDULED = 1; -export var STARTING = 2; -export var STARTED = 3; -export var RUNNING = 4; -export var ENDING = 5; -export var ENDED = 6; - -export default function(node, name, id, index, group, timing) { - var schedules = node.__transition; - if (!schedules) node.__transition = {}; - else if (id in schedules) return; - create(node, id, { - name: name, - index: index, // For context during callback. - group: group, // For context during callback. - on: emptyOn, - tween: emptyTween, - time: timing.time, - delay: timing.delay, - duration: timing.duration, - ease: timing.ease, - timer: null, - state: CREATED - }); -} - -export function init(node, id) { - var schedule = get(node, id); - if (schedule.state > CREATED) throw new Error("too late; already scheduled"); - return schedule; -} - -export function set(node, id) { - var schedule = get(node, id); - if (schedule.state > STARTED) throw new Error("too late; already running"); - return schedule; -} - -export function get(node, id) { - var schedule = node.__transition; - if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found"); - return schedule; -} - -function create(node, id, self) { - var schedules = node.__transition, - tween; - - // Initialize the self timer when the transition is created. - // Note the actual delay is not known until the first callback! - schedules[id] = self; - self.timer = timer(schedule, 0, self.time); - - function schedule(elapsed) { - self.state = SCHEDULED; - self.timer.restart(start, self.delay, self.time); - - // If the elapsed delay is less than our first sleep, start immediately. - if (self.delay <= elapsed) start(elapsed - self.delay); - } - - function start(elapsed) { - var i, j, n, o; - - // If the state is not SCHEDULED, then we previously errored on start. - if (self.state !== SCHEDULED) return stop(); - - for (i in schedules) { - o = schedules[i]; - if (o.name !== self.name) continue; - - // While this element already has a starting transition during this frame, - // defer starting an interrupting transition until that transition has a - // chance to tick (and possibly end); see d3/d3-transition#54! - if (o.state === STARTED) return timeout(start); - - // Interrupt the active transition, if any. - if (o.state === RUNNING) { - o.state = ENDED; - o.timer.stop(); - o.on.call("interrupt", node, node.__data__, o.index, o.group); - delete schedules[i]; - } - - // Cancel any pre-empted transitions. - else if (+i < id) { - o.state = ENDED; - o.timer.stop(); - o.on.call("cancel", node, node.__data__, o.index, o.group); - delete schedules[i]; - } - } - - // Defer the first tick to end of the current frame; see d3/d3#1576. - // Note the transition may be canceled after start and before the first tick! - // Note this must be scheduled before the start event; see d3/d3-transition#16! - // Assuming this is successful, subsequent callbacks go straight to tick. - timeout(function() { - if (self.state === STARTED) { - self.state = RUNNING; - self.timer.restart(tick, self.delay, self.time); - tick(elapsed); - } - }); - - // Dispatch the start event. - // Note this must be done before the tween are initialized. - self.state = STARTING; - self.on.call("start", node, node.__data__, self.index, self.group); - if (self.state !== STARTING) return; // interrupted - self.state = STARTED; - - // Initialize the tween, deleting null tween. - tween = new Array(n = self.tween.length); - for (i = 0, j = -1; i < n; ++i) { - if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) { - tween[++j] = o; - } - } - tween.length = j + 1; - } - - function tick(elapsed) { - var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), - i = -1, - n = tween.length; - - while (++i < n) { - tween[i].call(node, t); - } - - // Dispatch the end event. - if (self.state === ENDING) { - self.on.call("end", node, node.__data__, self.index, self.group); - stop(); - } - } - - function stop() { - self.state = ENDED; - self.timer.stop(); - delete schedules[id]; - for (var i in schedules) return; // eslint-disable-line no-unused-vars - delete node.__transition; - } -} diff --git a/node_modules/d3-transition/src/transition/select.js b/node_modules/d3-transition/src/transition/select.js deleted file mode 100644 index 959c8c0c9a521802d982b2939d9f46c7ca78082e..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/select.js +++ /dev/null @@ -1,22 +0,0 @@ -import {selector} from "d3-selection"; -import {Transition} from "./index.js"; -import schedule, {get} from "./schedule.js"; - -export default function(select) { - var name = this._name, - id = this._id; - - if (typeof select !== "function") select = selector(select); - - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { - if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { - if ("__data__" in node) subnode.__data__ = node.__data__; - subgroup[i] = subnode; - schedule(subgroup[i], name, id, i, subgroup, get(node, id)); - } - } - } - - return new Transition(subgroups, this._parents, name, id); -} diff --git a/node_modules/d3-transition/src/transition/selectAll.js b/node_modules/d3-transition/src/transition/selectAll.js deleted file mode 100644 index 1ba4801316f0c1894ed835c12d885e0b68cf2cc4..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/selectAll.js +++ /dev/null @@ -1,26 +0,0 @@ -import {selectorAll} from "d3-selection"; -import {Transition} from "./index.js"; -import schedule, {get} from "./schedule.js"; - -export default function(select) { - var name = this._name, - id = this._id; - - if (typeof select !== "function") select = selectorAll(select); - - for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - for (var children = select.call(node, node.__data__, i, group), child, inherit = get(node, id), k = 0, l = children.length; k < l; ++k) { - if (child = children[k]) { - schedule(child, name, id, k, children, inherit); - } - } - subgroups.push(children); - parents.push(node); - } - } - } - - return new Transition(subgroups, parents, name, id); -} diff --git a/node_modules/d3-transition/src/transition/selection.js b/node_modules/d3-transition/src/transition/selection.js deleted file mode 100644 index d0c5944ff229e3c92f84926448cf04d19c84af23..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/selection.js +++ /dev/null @@ -1,7 +0,0 @@ -import {selection} from "d3-selection"; - -var Selection = selection.prototype.constructor; - -export default function() { - return new Selection(this._groups, this._parents); -} diff --git a/node_modules/d3-transition/src/transition/style.js b/node_modules/d3-transition/src/transition/style.js deleted file mode 100644 index 7dcb18717859b4c67380aac33af565047d47a2b5..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/style.js +++ /dev/null @@ -1,80 +0,0 @@ -import {interpolateTransformCss as interpolateTransform} from "d3-interpolate"; -import {style} from "d3-selection"; -import {set} from "./schedule.js"; -import {tweenValue} from "./tween.js"; -import interpolate from "./interpolate.js"; - -function styleNull(name, interpolate) { - var string00, - string10, - interpolate0; - return function() { - var string0 = style(this, name), - string1 = (this.style.removeProperty(name), style(this, name)); - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, string10 = string1); - }; -} - -function styleRemove(name) { - return function() { - this.style.removeProperty(name); - }; -} - -function styleConstant(name, interpolate, value1) { - var string00, - string1 = value1 + "", - interpolate0; - return function() { - var string0 = style(this, name); - return string0 === string1 ? null - : string0 === string00 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, value1); - }; -} - -function styleFunction(name, interpolate, value) { - var string00, - string10, - interpolate0; - return function() { - var string0 = style(this, name), - value1 = value(this), - string1 = value1 + ""; - if (value1 == null) string1 = value1 = (this.style.removeProperty(name), style(this, name)); - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); - }; -} - -function styleMaybeRemove(id, name) { - var on0, on1, listener0, key = "style." + name, event = "end." + key, remove; - return function() { - var schedule = set(this, id), - on = schedule.on, - listener = schedule.value[key] == null ? remove || (remove = styleRemove(name)) : undefined; - - // If this node shared a dispatch with the previous node, - // just assign the updated shared dispatch and we’re done! - // Otherwise, copy-on-write. - if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener); - - schedule.on = on1; - }; -} - -export default function(name, value, priority) { - var i = (name += "") === "transform" ? interpolateTransform : interpolate; - return value == null ? this - .styleTween(name, styleNull(name, i)) - .on("end.style." + name, styleRemove(name)) - : typeof value === "function" ? this - .styleTween(name, styleFunction(name, i, tweenValue(this, "style." + name, value))) - .each(styleMaybeRemove(this._id, name)) - : this - .styleTween(name, styleConstant(name, i, value), priority) - .on("end.style." + name, null); -} diff --git a/node_modules/d3-transition/src/transition/styleTween.js b/node_modules/d3-transition/src/transition/styleTween.js deleted file mode 100644 index f692483f2a178b4512caff4fdeb68d5f08bdabb2..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/styleTween.js +++ /dev/null @@ -1,24 +0,0 @@ -function styleInterpolate(name, i, priority) { - return function(t) { - this.style.setProperty(name, i.call(this, t), priority); - }; -} - -function styleTween(name, value, priority) { - var t, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority); - return t; - } - tween._value = value; - return tween; -} - -export default function(name, value, priority) { - var key = "style." + (name += ""); - if (arguments.length < 2) return (key = this.tween(key)) && key._value; - if (value == null) return this.tween(key, null); - if (typeof value !== "function") throw new Error; - return this.tween(key, styleTween(name, value, priority == null ? "" : priority)); -} diff --git a/node_modules/d3-transition/src/transition/text.js b/node_modules/d3-transition/src/transition/text.js deleted file mode 100644 index a7f75d9412add2e8d52dbffcfaefc3d2279cfb0d..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/text.js +++ /dev/null @@ -1,20 +0,0 @@ -import {tweenValue} from "./tween.js"; - -function textConstant(value) { - return function() { - this.textContent = value; - }; -} - -function textFunction(value) { - return function() { - var value1 = value(this); - this.textContent = value1 == null ? "" : value1; - }; -} - -export default function(value) { - return this.tween("text", typeof value === "function" - ? textFunction(tweenValue(this, "text", value)) - : textConstant(value == null ? "" : value + "")); -} diff --git a/node_modules/d3-transition/src/transition/textTween.js b/node_modules/d3-transition/src/transition/textTween.js deleted file mode 100644 index 16d1bf17f46c6f1b4156dd265a169907ea0210d8..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/textTween.js +++ /dev/null @@ -1,24 +0,0 @@ -function textInterpolate(i) { - return function(t) { - this.textContent = i.call(this, t); - }; -} - -function textTween(value) { - var t0, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t0 = (i0 = i) && textInterpolate(i); - return t0; - } - tween._value = value; - return tween; -} - -export default function(value) { - var key = "text"; - if (arguments.length < 1) return (key = this.tween(key)) && key._value; - if (value == null) return this.tween(key, null); - if (typeof value !== "function") throw new Error; - return this.tween(key, textTween(value)); -} diff --git a/node_modules/d3-transition/src/transition/transition.js b/node_modules/d3-transition/src/transition/transition.js deleted file mode 100644 index 6a6dd24e7903ddc4abdb9ec6a249e6f0eec73086..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/transition.js +++ /dev/null @@ -1,24 +0,0 @@ -import {Transition, newId} from "./index.js"; -import schedule, {get} from "./schedule.js"; - -export default function() { - var name = this._name, - id0 = this._id, - id1 = newId(); - - for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - var inherit = get(node, id0); - schedule(node, name, id1, i, group, { - time: inherit.time + inherit.delay + inherit.duration, - delay: 0, - duration: inherit.duration, - ease: inherit.ease - }); - } - } - } - - return new Transition(groups, this._parents, name, id1); -} diff --git a/node_modules/d3-transition/src/transition/tween.js b/node_modules/d3-transition/src/transition/tween.js deleted file mode 100644 index ba96781e17b7e00eec6cfc545b52f60124d492c7..0000000000000000000000000000000000000000 --- a/node_modules/d3-transition/src/transition/tween.js +++ /dev/null @@ -1,81 +0,0 @@ -import {get, set} from "./schedule.js"; - -function tweenRemove(id, name) { - var tween0, tween1; - return function() { - var schedule = set(this, id), - tween = schedule.tween; - - // If this node shared tween with the previous node, - // just assign the updated shared tween and we’re done! - // Otherwise, copy-on-write. - if (tween !== tween0) { - tween1 = tween0 = tween; - for (var i = 0, n = tween1.length; i < n; ++i) { - if (tween1[i].name === name) { - tween1 = tween1.slice(); - tween1.splice(i, 1); - break; - } - } - } - - schedule.tween = tween1; - }; -} - -function tweenFunction(id, name, value) { - var tween0, tween1; - if (typeof value !== "function") throw new Error; - return function() { - var schedule = set(this, id), - tween = schedule.tween; - - // If this node shared tween with the previous node, - // just assign the updated shared tween and we’re done! - // Otherwise, copy-on-write. - if (tween !== tween0) { - tween1 = (tween0 = tween).slice(); - for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) { - if (tween1[i].name === name) { - tween1[i] = t; - break; - } - } - if (i === n) tween1.push(t); - } - - schedule.tween = tween1; - }; -} - -export default function(name, value) { - var id = this._id; - - name += ""; - - if (arguments.length < 2) { - var tween = get(this.node(), id).tween; - for (var i = 0, n = tween.length, t; i < n; ++i) { - if ((t = tween[i]).name === name) { - return t.value; - } - } - return null; - } - - return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value)); -} - -export function tweenValue(transition, name, value) { - var id = transition._id; - - transition.each(function() { - var schedule = set(this, id); - (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments); - }); - - return function(node) { - return get(node, id).value[name]; - }; -} diff --git a/node_modules/d3-zoom/LICENSE b/node_modules/d3-zoom/LICENSE deleted file mode 100644 index 721bd22ece6587a9408eda1b6a3949c425b5624a..0000000000000000000000000000000000000000 --- a/node_modules/d3-zoom/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2016 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3-zoom/README.md b/node_modules/d3-zoom/README.md deleted file mode 100644 index dd29d50e9745df816c4b4a132ec166f52b65b45d..0000000000000000000000000000000000000000 --- a/node_modules/d3-zoom/README.md +++ /dev/null @@ -1,402 +0,0 @@ -# d3-zoom - -Panning and zooming are popular interaction techniques which let the user focus on a region of interest by restricting the view. It is easy to learn due to direct manipulation: click-and-drag to pan (translate), spin the wheel to zoom (scale), or use touch. Panning and zooming are widely used in web-based mapping, but can also be used with visualizations such as time-series and scatterplots. - -The zoom behavior implemented by d3-zoom is a convenient but flexible abstraction for enabling pan-and-zoom on [selections](https://github.com/d3/d3-selection). It handles a surprising variety of [input events](#api-reference) and browser quirks. The zoom behavior is agnostic about the DOM, so you can use it with SVG, HTML or Canvas. - -[<img alt="Canvas Zooming" src="https://raw.githubusercontent.com/d3/d3-zoom/master/img/dots.png" width="420" height="219">](https://observablehq.com/@d3/zoom-canvas)[<img alt="SVG Zooming" src="https://raw.githubusercontent.com/d3/d3-zoom/master/img/dots.png" width="420" height="219">](https://observablehq.com/@d3/zoom) - -The zoom behavior is also designed to work with [d3-scale](https://github.com/d3/d3-scale) and [d3-axis](https://github.com/d3/d3-axis); see [*transform*.rescaleX](#transform_rescaleX) and [*transform*.rescaleY](#transform_rescaleY). You can also restrict zooming using [*zoom*.scaleExtent](#zoom_scaleExtent) and panning using [*zoom*.translateExtent](#zoom_translateExtent). - -[<img alt="Axis Zooming" src="https://raw.githubusercontent.com/d3/d3-zoom/master/img/axis.png" width="420" height="219">](https://observablehq.com/@d3/zoomable-scatterplot) - -The zoom behavior can be combined with other behaviors, such as [d3-drag](https://github.com/d3/d3-drag) for dragging, and [d3-brush](https://github.com/d3/d3-brush) for focus + context. - -[<img alt="Drag & Zoom II" src="https://raw.githubusercontent.com/d3/d3-zoom/master/img/dots.png" width="420" height="219">](https://observablehq.com/@d3/drag-zoom)[<img alt="Brush & Zoom" src="https://raw.githubusercontent.com/d3/d3-zoom/master/img/brush.png" width="420" height="219">](https://observablehq.com/@d3/focus-context) - -The zoom behavior can be controlled programmatically using [*zoom*.transform](#zoom_transform), allowing you to implement user interface controls which drive the display or to stage animated tours through your data. Smooth zoom transitions are based on [“Smooth and efficient zooming and panningâ€](http://www.win.tue.nl/~vanwijk/zoompan.pdf) by Jarke J. van Wijk and Wim A.A. Nuij. - -[<img alt="Zoom Transitions" src="https://raw.githubusercontent.com/d3/d3-zoom/master/img/transition.png" width="420" height="219">](https://observablehq.com/@d3/programmatic-zoom) - -See also [d3-tile](https://github.com/d3/d3-tile) for examples panning and zooming maps. - -## Installing - -If you use NPM, `npm install d3-zoom`. Otherwise, download the [latest release](https://github.com/d3/d3-zoom/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-zoom.v2.min.js) or as part of [D3](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: - -```html -<script src="https://d3js.org/d3-color.v2.min.js"></script> -<script src="https://d3js.org/d3-dispatch.v2.min.js"></script> -<script src="https://d3js.org/d3-ease.v2.min.js"></script> -<script src="https://d3js.org/d3-interpolate.v2.min.js"></script> -<script src="https://d3js.org/d3-selection.v2.min.js"></script> -<script src="https://d3js.org/d3-timer.v2.min.js"></script> -<script src="https://d3js.org/d3-transition.v2.min.js"></script> -<script src="https://d3js.org/d3-drag.v2.min.js"></script> -<script src="https://d3js.org/d3-zoom.v2.min.js"></script> -<script> - -var zoom = d3.zoom(); - -</script> -``` - -[Try d3-zoom in your browser.](https://observablehq.com/collection/@d3/d3-zoom) - -## API Reference - -This table describes how the zoom behavior interprets native events: - -| Event | Listening Element | Zoom Event | Default Prevented? | -| ------------ | ----------------- | ----------- | ------------------ | -| mousedownâµ | selection | start | no¹ | -| mousemove² | window¹ | zoom | yes | -| mouseup² | window¹ | end | yes | -| dragstart² | window | - | yes | -| selectstart² | window | - | yes | -| click³ | window | - | yes | -| dblclick | selection | *multiple*ⶠ| yes | -| wheel⸠| selection | zoomâ· | yes | -| touchstart | selection | *multiple*ⶠ| noâ´ | -| touchmove | selection | zoom | yes | -| touchend | selection | end | noâ´ | -| touchcancel | selection | end | noâ´ | - -The propagation of all consumed events is [immediately stopped](https://dom.spec.whatwg.org/#dom-event-stopimmediatepropagation). - -¹ Necessary to capture events outside an iframe; see [d3-drag#9](https://github.com/d3/d3-drag/issues/9). -<br>² Only applies during an active, mouse-based gesture; see [d3-drag#9](https://github.com/d3/d3-drag/issues/9). -<br>³ Only applies immediately after some mouse-based gestures; see [*zoom*.clickDistance](#zoom_clickDistance). -<br>â´ Necessary to allow [click emulation](https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW7) on touch input; see [d3-drag#9](https://github.com/d3/d3-drag/issues/9). -<br>âµ Ignored if within 500ms of a touch gesture ending; assumes [click emulation](https://developer.apple.com/library/ios/documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html#//apple_ref/doc/uid/TP40006511-SW7). -<br>ⶠDouble-click and double-tap initiate a transition that emits start, zoom and end events; see [*zoom*.tapDistance](#zoom_tapDistance).. -<br>â· The first wheel event emits a start event; an end event is emitted when no wheel events are received for 150ms. -<br>⸠Ignored if already at the corresponding limit of the [scale extent](#zoom_scaleExtent). - -<a href="#zoom" name="zoom">#</a> d3.<b>zoom</b>() · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js), [Examples](https://observablehq.com/collection/@d3/d3-zoom) - -Creates a new zoom behavior. The returned behavior, [*zoom*](#_drag), is both an object and a function, and is typically applied to selected elements via [*selection*.call](https://github.com/d3/d3-selection#selection_call). - -<a href="#_zoom" name="_zoom">#</a> <i>zoom</i>(<i>selection</i>) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js), [Examples](https://observablehq.com/collection/@d3/d3-zoom) - -Applies this zoom behavior to the specified [*selection*](https://github.com/d3/d3-selection), binding the necessary event listeners to allow panning and zooming, and initializing the [zoom transform](#zoom-transforms) on each selected element to the identity transform if not already defined. This function is typically not invoked directly, and is instead invoked via [*selection*.call](https://github.com/d3/d3-selection#selection_call). For example, to instantiate a zoom behavior and apply it to a selection: - -```js -selection.call(d3.zoom().on("zoom", zoomed)); -``` - -Internally, the zoom behavior uses [*selection*.on](https://github.com/d3/d3-selection#selection_on) to bind the necessary event listeners for zooming. The listeners use the name `.zoom`, so you can subsequently unbind the zoom behavior as follows: - -```js -selection.on(".zoom", null); -``` - -To disable just wheel-driven zooming (say to not interfere with native scrolling), you can remove the zoom behavior’s wheel event listener after applying the zoom behavior to the selection: - -```js -selection - .call(zoom) - .on("wheel.zoom", null); -``` - -Alternatively, use [*zoom*.filter](#zoom_filter) for greater control over which events can initiate zoom gestures. - -Applying the zoom behavior also sets the [-webkit-tap-highlight-color](https://developer.apple.com/library/mac/documentation/AppleApplications/Reference/SafariWebContent/AdjustingtheTextSize/AdjustingtheTextSize.html#//apple_ref/doc/uid/TP40006510-SW5) style to transparent, disabling the tap highlight on iOS. If you want a different tap highlight color, remove or re-apply this style after applying the drag behavior. - -<a href="#zoom_transform" name="zoom_transform">#</a> <i>zoom</i>.<b>transform</b>(<i>selection</i>, <i>transform</i>[, <i>point</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js), [Examples](https://observablehq.com/collection/@d3/d3-zoom) - -If *selection* is a selection, sets the [current zoom transform](#zoomTransform) of the selected elements to the specified *transform*, instantaneously emitting start, zoom and end [events](#zoom-events). If *selection* is a transition, defines a “zoom†tween to the specified *transform* using [d3.interpolateZoom](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateZoom), emitting a start event when the transition starts, zoom events for each tick of the transition, and then an end event when the transition ends (or is interrupted). The transition will attempt to minimize the visual movement around the specified *point*; if the *point* is not specified, it defaults to the center of the viewport [extent](#zoom_extent). The *transform* may be specified either as a [zoom transform](#zoom-transforms) or as a function that returns a zoom transform; similarly, the *point* may be specified either as a two-element array [*x*, *y*] or a function that returns such an array. If a function, it is invoked for each selected element, being passed the current event (`event`) and datum `d`, with the `this` context as the current DOM element. - -This function is typically not invoked directly, and is instead invoked via [*selection*.call](https://github.com/d3/d3-selection#selection_call) or [*transition*.call](https://github.com/d3/d3-transition#transition_call). For example, to reset the zoom transform to the [identity transform](#zoomIdentity) instantaneously: - -```js -selection.call(zoom.transform, d3.zoomIdentity); -``` - -To smoothly reset the zoom transform to the identity transform over 750 milliseconds: - -```js -selection.transition().duration(750).call(zoom.transform, d3.zoomIdentity); -``` - -This method requires that you specify the new zoom transform completely, and does not enforce the defined [scale extent](#zoom_scaleExtent) and [translate extent](#zoom_translateExtent), if any. To derive a new transform from the existing transform, and to enforce the scale and translate extents, see the convenience methods [*zoom*.translateBy](#zoom_translateBy), [*zoom*.scaleBy](#zoom_scaleBy) and [*zoom*.scaleTo](#zoom_scaleTo). - -<a href="#zoom_translateBy" name="zoom_translateBy">#</a> <i>zoom</i>.<b>translateBy</b>(<i>selection</i>, <i>x</i>, <i>y</i>) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *selection* is a selection, [translates](#transform_translate) the [current zoom transform](#zoomTransform) of the selected elements by *x* and *y*, such that the new *t<sub>x1</sub>* = *t<sub>x0</sub>* + *kx* and *t<sub>y1</sub>* = *t<sub>y0</sub>* + *ky*. If *selection* is a transition, defines a “zoom†tween translating the current transform. This method is a convenience method for [*zoom*.transform](#zoom_transform). The *x* and *y* translation amounts may be specified either as numbers or as functions that return numbers. If a function, it is invoked for each selected element, being passed the current datum `d` and index `i`, with the `this` context as the current DOM element. - -<a href="#zoom_translateTo" name="zoom_translateTo">#</a> <i>zoom</i>.<b>translateTo</b>(<i>selection</i>, <i>x</i>, <i>y</i>[, <i>p</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *selection* is a selection, [translates](#transform_translate) the [current zoom transform](#zoomTransform) of the selected elements such that the given position ⟨*x*,*y*⟩ appears at given point *p*. The new *t<sub>x</sub>* = *p<sub>x</sub>* - *kx* and *t<sub>y</sub>* = *p<sub>y</sub>* - *ky*. If *p* is not specified, it defaults to the center of the viewport [extent](#zoom_extent). If *selection* is a transition, defines a “zoom†tween translating the current transform. This method is a convenience method for [*zoom*.transform](#zoom_transform). The *x* and *y* coordinates may be specified either as numbers or as functions that returns numbers; similarly the *p* point may be specified either as a two-element array [*p<sub>x</sub>*,*p<sub>y</sub>*] or a function. If a function, it is invoked for each selected element, being passed the current datum `d` and index `i`, with the `this` context as the current DOM element. - -<a href="#zoom_scaleBy" name="zoom_scaleBy">#</a> <i>zoom</i>.<b>scaleBy</b>(<i>selection</i>, <i>k</i>[, <i>p</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *selection* is a selection, [scales](#transform_scale) the [current zoom transform](#zoomTransform) of the selected elements by *k*, such that the new *kâ‚* = *kâ‚€k*. The reference point *p* does move. If *p* is not specified, it defaults to the center of the viewport [extent](#zoom_extent). If *selection* is a transition, defines a “zoom†tween translating the current transform. This method is a convenience method for [*zoom*.transform](#zoom_transform). The *k* scale factor may be specified either as a number or a function that returns a number; similarly the *p* point may be specified either as a two-element array [*p<sub>x</sub>*,*p<sub>y</sub>*] or a function. If a function, it is invoked for each selected element, being passed the current datum `d` and index `i`, with the `this` context as the current DOM element. - -<a href="#zoom_scaleTo" name="zoom_scaleTo">#</a> <i>zoom</i>.<b>scaleTo</b>(<i>selection</i>, <i>k</i>[, <i>p</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *selection* is a selection, [scales](#transform_scale) the [current zoom transform](#zoomTransform) of the selected elements to *k*, such that the new *kâ‚* = *k*. The reference point *p* does move. If *p* is not specified, it defaults to the center of the viewport [extent](#zoom_extent). If *selection* is a transition, defines a “zoom†tween translating the current transform. This method is a convenience method for [*zoom*.transform](#zoom_transform). The *k* scale factor may be specified either as a number or a function that returns a number; similarly the *p* point may be specified either as a two-element array [*p<sub>x</sub>*,*p<sub>y</sub>*] or a function. If a function, it is invoked for each selected element, being passed the current datum `d` and index `i`, with the `this` context as the current DOM element. - -<a href="#zoom_constrain" name="zoom_constrain">#</a> <i>zoom</i>.<b>constrain</b>([<i>constrain</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *constrain* is specified, sets the transform constraint function to the specified function and returns the zoom behavior. If *constrain* is not specified, returns the current constraint function, which defaults to: - -```js -function constrain(transform, extent, translateExtent) { - var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0], - dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0], - dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1], - dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1]; - return transform.translate( - dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1), - dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1) - ); -} -``` - -The constraint function must return a [*transform*](#zoom-transforms) given the current *transform*, [viewport extent](#zoom_extent) and [translate extent](#zoom_translateExtent). The default implementation attempts to ensure that the viewport extent does not go outside the translate extent. - -<a href="#zoom_filter" name="zoom_filter">#</a> <i>zoom</i>.<b>filter</b>([<i>filter</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *filter* is specified, sets the filter to the specified function and returns the zoom behavior. If *filter* is not specified, returns the current filter, which defaults to: - -```js -function filter(event) { - return !event.ctrlKey && !event.button; -} -``` - -The filter is passed the current event (`event`) and datum `d`, with the `this` context as the current DOM element. If the filter returns falsey, the initiating event is ignored and no zoom gestures are started. Thus, the filter determines which input events are ignored. The default filter ignores mousedown events on secondary buttons, since those buttons are typically intended for other purposes, such as the context menu. - -<a href="#zoom_touchable" name="zoom_touchable">#</a> <i>zoom</i>.<b>touchable</b>([<i>touchable</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *touchable* is specified, sets the touch support detector to the specified function and returns the zoom behavior. If *touchable* is not specified, returns the current touch support detector, which defaults to: - -```js -function touchable() { - return navigator.maxTouchPoints || ("ontouchstart" in this); -} -``` - -Touch event listeners are only registered if the detector returns truthy for the corresponding element when the zoom behavior is [applied](#_zoom). The default detector works well for most browsers that are capable of touch input, but not all; Chrome’s mobile device emulator, for example, fails detection. - -<a href="#zoom_wheelDelta" name="zoom_wheelDelta">#</a> <i>zoom</i>.<b>wheelDelta</b>([<i>delta</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *delta* is specified, sets the wheel delta function to the specified function and returns the zoom behavior. If *delta* is not specified, returns the current wheel delta function, which defaults to: - -```js -function wheelDelta(event) { - return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002); -} -``` - -The value *Δ* returned by the wheel delta function determines the amount of scaling applied in response to a [WheelEvent](https://developer.mozilla.org/en-US/docs/Web/API/WheelEvent). The scale factor [*transform*.k](#zoomTransform) is multiplied by 2<sup>*Δ*</sup>; for example, a *Δ* of +1 doubles the scale factor, *Δ* of -1 halves the scale factor. - -<a href="#zoom_extent" name="zoom_extent">#</a> <i>zoom</i>.<b>extent</b>([<i>extent</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *extent* is specified, sets the viewport extent to the specified array of points [[*x0*, *y0*], [*x1*, *y1*]], where [*x0*, *y0*] is the top-left corner of the viewport and [*x1*, *y1*] is the bottom-right corner of the viewport, and returns this zoom behavior. The *extent* may also be specified as a function which returns such an array; if a function, it is invoked for each selected element, being passed the current datum `d`, with the `this` context as the current DOM element. - -If *extent* is not specified, returns the current extent accessor, which defaults to [[0, 0], [*width*, *height*]] where *width* is the [client width](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth) of the element and *height* is its [client height](https://developer.mozilla.org/en-US/docs/Web/API/Element/clientHeight); for SVG elements, the nearest ancestor SVG element’s viewBox, or [width](https://www.w3.org/TR/SVG/struct.html#SVGElementWidthAttribute) and [height](https://www.w3.org/TR/SVG/struct.html#SVGElementHeightAttribute) attributes, are used. Alternatively, consider using [*element*.getBoundingClientRect](https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect). - -The viewport extent affects several functions: the center of the viewport remains fixed during changes by [*zoom*.scaleBy](#zoom_scaleBy) and [*zoom*.scaleTo](#zoom_scaleTo); the viewport center and dimensions affect the path chosen by [d3.interpolateZoom](https://github.com/d3/d3-interpolate#interpolateZoom); and the viewport extent is needed to enforce the optional [translate extent](#zoom_translateExtent). - -<a href="#zoom_scaleExtent" name="zoom_scaleExtent">#</a> <i>zoom</i>.<b>scaleExtent</b>([<i>extent</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *extent* is specified, sets the scale extent to the specified array of numbers [*k0*, *k1*] where *k0* is the minimum allowed scale factor and *k1* is the maximum allowed scale factor, and returns this zoom behavior. If *extent* is not specified, returns the current scale extent, which defaults to [0, ∞]. The scale extent restricts zooming in and out. It is enforced on interaction and when using [*zoom*.scaleBy](#zoom_scaleBy), [*zoom*.scaleTo](#zoom_scaleTo) and [*zoom*.translateBy](#zoom_translateBy); however, it is not enforced when using [*zoom*.transform](#zoom_transform) to set the transform explicitly. - -If the user tries to zoom by wheeling when already at the corresponding limit of the scale extent, the wheel events will be ignored and not initiate a zoom gesture. This allows the user to scroll down past a zoomable area after zooming in, or to scroll up after zooming out. If you would prefer to always prevent scrolling on wheel input regardless of the scale extent, register a wheel event listener to prevent the browser default behavior: - -```js -selection - .call(zoom) - .on("wheel", event => event.preventDefault()); -``` - -<a href="#zoom_translateExtent" name="zoom_translateExtent">#</a> <i>zoom</i>.<b>translateExtent</b>([<i>extent</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *extent* is specified, sets the translate extent to the specified array of points [[*x0*, *y0*], [*x1*, *y1*]], where [*x0*, *y0*] is the top-left corner of the world and [*x1*, *y1*] is the bottom-right corner of the world, and returns this zoom behavior. If *extent* is not specified, returns the current translate extent, which defaults to [[-∞, -∞], [+∞, +∞]]. The translate extent restricts panning, and may cause translation on zoom out. It is enforced on interaction and when using [*zoom*.scaleBy](#zoom_scaleBy), [*zoom*.scaleTo](#zoom_scaleTo) and [*zoom*.translateBy](#zoom_translateBy); however, it is not enforced when using [*zoom*.transform](#zoom_transform) to set the transform explicitly. - -<a href="#zoom_clickDistance" name="zoom_clickDistance">#</a> <i>zoom</i>.<b>clickDistance</b>([<i>distance</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *distance* is specified, sets the maximum distance that the mouse can move between mousedown and mouseup that will trigger a subsequent click event. If at any point between mousedown and mouseup the mouse is greater than or equal to *distance* from its position on mousedown, the click event following mouseup will be suppressed. If *distance* is not specified, returns the current distance threshold, which defaults to zero. The distance threshold is measured in client coordinates ([*event*.clientX](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientX) and [*event*.clientY](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientY)). - -<a href="#zoom_tapDistance" name="zoom_tapDistance">#</a> <i>zoom</i>.<b>tapDistance</b>([<i>distance</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *distance* is specified, sets the maximum distance that a double-tap gesture can move between first touchstart and second touchend that will trigger a subsequent double-click event. If *distance* is not specified, returns the current distance threshold, which defaults to 10. The distance threshold is measured in client coordinates ([*event*.clientX](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientX) and [*event*.clientY](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientY)). - -<a href="#zoom_duration" name="zoom_duration">#</a> <i>zoom</i>.<b>duration</b>([<i>duration</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *duration* is specified, sets the duration for zoom transitions on double-click and double-tap to the specified number of milliseconds and returns the zoom behavior. If *duration* is not specified, returns the current duration, which defaults to 250 milliseconds. If the duration is not greater than zero, double-click and -tap trigger instantaneous changes to the zoom transform rather than initiating smooth transitions. - -To disable double-click and double-tap transitions, you can remove the zoom behavior’s dblclick event listener after applying the zoom behavior to the selection: - -```js -selection - .call(zoom) - .on("dblclick.zoom", null); -``` - -<a href="#zoom_interpolate" name="zoom_interpolate">#</a> <i>zoom</i>.<b>interpolate</b>([<i>interpolate</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *interpolate* is specified, sets the interpolation factory for zoom transitions to the specified function. If *interpolate* is not specified, returns the current interpolation factory, which defaults to [d3.interpolateZoom](https://github.com/d3/d3-interpolate#interpolateZoom) to implement smooth zooming. To apply direct interpolation between two views, try [d3.interpolate](https://github.com/d3/d3-interpolate#interpolate) instead. - -<a href="#zoom_on" name="zoom_on">#</a> <i>zoom</i>.<b>on</b>(<i>typenames</i>[, <i>listener</i>]) · [Source](https://github.com/d3/d3-zoom/blob/master/src/zoom.js) - -If *listener* is specified, sets the event *listener* for the specified *typenames* and returns the zoom behavior. If an event listener was already registered for the same type and name, the existing listener is removed before the new listener is added. If *listener* is null, removes the current event listeners for the specified *typenames*, if any. If *listener* is not specified, returns the first currently-assigned listener matching the specified *typenames*, if any. When a specified event is dispatched, each *listener* will be invoked with the same context and arguments as [*selection*.on](https://github.com/d3/d3-selection#selection_on) listeners: the current event (`event`) and datum `d`, with the `this` context as the current DOM element. - -The *typenames* is a string containing one or more *typename* separated by whitespace. Each *typename* is a *type*, optionally followed by a period (`.`) and a *name*, such as `zoom.foo` and `zoom.bar`; the name allows multiple listeners to be registered for the same *type*. The *type* must be one of the following: - -* `start` - after zooming begins (such as on mousedown). -* `zoom` - after a change to the zoom transform (such as on mousemove). -* `end` - after zooming ends (such as on mouseup ). - -See [*dispatch*.on](https://github.com/d3/d3-dispatch#dispatch_on) for more. - -### Zoom Events - -When a [zoom event listener](#zoom_on) is invoked, it receives the current zoom event as a first argument. The *event* object exposes several fields: - -* *event*.target - the associated [zoom behavior](#zoom). -* *event*.type - the string “startâ€, “zoom†or “endâ€; see [*zoom*.on](#zoom_on). -* *event*.transform - the current [zoom transform](#zoom-transforms). -* *event*.sourceEvent - the underlying input event, such as mousemove or touchmove. - -### Zoom Transforms - -The zoom behavior stores the zoom state on the element to which the zoom behavior was [applied](#_zoom), not on the zoom behavior itself. This is because the zoom behavior can be applied to many elements simultaneously, and each element can be zoomed independently. The zoom state can change either on user interaction or programmatically via [*zoom*.transform](#zoom_transform). - -To retrieve the zoom state, use *event*.transform on the current [zoom event](#zoom-events) within a zoom event listener (see [*zoom*.on](#zoom_on)), or use [d3.zoomTransform](#zoomTransform) for a given node. The latter is particularly useful for modifying the zoom state programmatically, say to implement buttons for zooming in and out. - -<a href="#zoomTransform" name="zoomTransform">#</a> d3.<b>zoomTransform</b>(<i>node</i>) · [Source](https://github.com/d3/d3-zoom/blob/master/src/transform.js) - -Returns the current transform for the specified *node*. Note that *node* should typically be a DOM element, not a *selection*. (A selection may consist of multiple nodes, in different states, and this function only returns a single transform.) If you have a selection, call [*selection*.node](https://github.com/d3/d3-selection#selection_node) first: - -```js -var transform = d3.zoomTransform(selection.node()); -``` - -In the context of an [event listener](https://github.com/d3/d3-selection#selection_on), the *node* is typically the element that received the input event (which should be equal to [*event*.transform](#zoom-events)), *this*: - -```js -var transform = d3.zoomTransform(this); -``` - -Internally, an element’s transform is stored as *element*.\_\_zoom; however, you should use this method rather than accessing it directly. If the given *node* has no defined transform, returns the transform of the closest ancestor, or if none exists, the [identity transformation](#zoomIdentity). The returned transform represents a two-dimensional [transformation matrix](https://en.wikipedia.org/wiki/Transformation_matrix#Affine_transformations) of the form: - -*k* 0 *t<sub>x</sub>* -<br>0 *k* *t<sub>y</sub>* -<br>0 0 1 - -(This matrix is capable of representing only scale and translation; a future release may also allow rotation, though this would probably not be a backwards-compatible change.) The position ⟨*x*,*y*⟩ is transformed to ⟨*xk* + *t<sub>x</sub>*,*yk* + *t<sub>y</sub>*⟩. The transform object exposes the following properties: - -* *transform*.x - the translation amount *t<sub>x</sub>* along the *x*-axis. -* *transform*.y - the translation amount *t<sub>y</sub>* along the *y*-axis. -* *transform*.k - the scale factor *k*. - -These properties should be considered read-only; instead of mutating a transform, use [*transform*.scale](#transform_scale) and [*transform*.translate](#transform_translate) to derive a new transform. Also see [*zoom*.scaleBy](#zoom_scaleBy), [*zoom*.scaleTo](#zoom_scaleTo) and [*zoom*.translateBy](#zoom_translateBy) for convenience methods on the zoom behavior. To create a transform with a given *k*, *t<sub>x</sub>*, and *t<sub>y</sub>*: - -```js -var t = d3.zoomIdentity.translate(x, y).scale(k); -``` - -To apply the transformation to a [Canvas 2D context](https://www.w3.org/TR/2dcontext/), use [*context*.translate](https://www.w3.org/TR/2dcontext/#dom-context-2d-translate) followed by [*context*.scale](https://www.w3.org/TR/2dcontext/#dom-context-2d-scale): - -```js -context.translate(transform.x, transform.y); -context.scale(transform.k, transform.k); -``` - -Similarly, to apply the transformation to HTML elements via [CSS](https://www.w3.org/TR/css-transforms-1/): - -```js -div.style("transform", "translate(" + transform.x + "px," + transform.y + "px) scale(" + transform.k + ")"); -div.style("transform-origin", "0 0"); -``` - -To apply the transformation to [SVG](https://www.w3.org/TR/SVG/coords.html#TransformAttribute): - -```js -g.attr("transform", "translate(" + transform.x + "," + transform.y + ") scale(" + transform.k + ")"); -``` - -Or more simply, taking advantage of [*transform*.toString](#transform_toString): - -```js -g.attr("transform", transform); -``` - -Note that the order of transformations matters! The translate must be applied before the scale. - -<a href="#transform_scale" name="transform_scale">#</a> <i>transform</i>.<b>scale</b>(<i>k</i>) · [Source](https://github.com/d3/d3-zoom/blob/master/src/transform.js) - -Returns a transform whose scale *kâ‚* is equal to *kâ‚€k*, where *kâ‚€* is this transform’s scale. - -<a href="#transform_translate" name="transform_translate">#</a> <i>transform</i>.<b>translate</b>(<i>x</i>, <i>y</i>) · [Source](https://github.com/d3/d3-zoom/blob/master/src/transform.js) - -Returns a transform whose translation *t<sub>x1</sub>* and *t<sub>y1</sub>* is equal to *t<sub>x0</sub>* + *t<sub>k</sub> x* and *t<sub>y0</sub>* + *t<sub>k</sub> y*, where *t<sub>x0</sub>* and *t<sub>y0</sub>* is this transform’s translation and *t<sub>k</sub>* is this transform’s scale. - -<a href="#transform_apply" name="transform_apply">#</a> <i>transform</i>.<b>apply</b>(<i>point</i>) · [Source](https://github.com/d3/d3-zoom/blob/master/src/transform.js) - -Returns the transformation of the specified *point* which is a two-element array of numbers [*x*, *y*]. The returned point is equal to [*xk* + *t<sub>x</sub>*, *yk* + *t<sub>y</sub>*]. - -<a href="#transform_applyX" name="transform_applyX">#</a> <i>transform</i>.<b>applyX</b>(<i>x</i>) · [Source](https://github.com/d3/d3-zoom/blob/master/src/transform.js) - -Returns the transformation of the specified *x*-coordinate, *xk* + *t<sub>x</sub>*. - -<a href="#transform_applyY" name="transform_applyY">#</a> <i>transform</i>.<b>applyY</b>(<i>y</i>) · [Source](https://github.com/d3/d3-zoom/blob/master/src/transform.js) - -Returns the transformation of the specified *y*-coordinate, *yk* + *t<sub>y</sub>*. - -<a href="#transform_invert" name="transform_invert">#</a> <i>transform</i>.<b>invert</b>(<i>point</i>) · [Source](https://github.com/d3/d3-zoom/blob/master/src/transform.js) - -Returns the inverse transformation of the specified *point* which is a two-element array of numbers [*x*, *y*]. The returned point is equal to [(*x* - *t<sub>x</sub>*) / *k*, (*y* - *t<sub>y</sub>*) / *k*]. - -<a href="#transform_invertX" name="transform_invertX">#</a> <i>transform</i>.<b>invertX</b>(<i>x</i>) · [Source](https://github.com/d3/d3-zoom/blob/master/src/transform.js) - -Returns the inverse transformation of the specified *x*-coordinate, (*x* - *t<sub>x</sub>*) / *k*. - -<a href="#transform_invertY" name="transform_invertY">#</a> <i>transform</i>.<b>invertY</b>(<i>y</i>) · [Source](https://github.com/d3/d3-zoom/blob/master/src/transform.js) - -Returns the inverse transformation of the specified *y*-coordinate, (*y* - *t<sub>y</sub>*) / *k*. - -<a href="#transform_rescaleX" name="transform_rescaleX">#</a> <i>transform</i>.<b>rescaleX</b>(<i>x</i>) · [Source](https://github.com/d3/d3-zoom/blob/master/src/transform.js) - -Returns a [copy](https://github.com/d3/d3-scale#continuous_copy) of the [continuous scale](https://github.com/d3/d3-scale#continuous-scales) *x* whose [domain](https://github.com/d3/d3-scale#continuous_domain) is transformed. This is implemented by first applying the [inverse *x*-transform](#transform_invertX) on the scale’s [range](https://github.com/d3/d3-scale#continuous_range), and then applying the [inverse scale](https://github.com/d3/d3-scale#continuous_invert) to compute the corresponding domain: - -```js -function rescaleX(x) { - var range = x.range().map(transform.invertX, transform), - domain = range.map(x.invert, x); - return x.copy().domain(domain); -} -``` - -The scale *x* must use [d3.interpolateNumber](https://github.com/d3/d3-interpolate#interpolateNumber); do not use [*continuous*.rangeRound](https://github.com/d3/d3-scale#continuous_rangeRound) as this reduces the accuracy of [*continuous*.invert](https://github.com/d3/d3-scale#continuous_invert) and can lead to an inaccurate rescaled domain. This method does not modify the input scale *x*; *x* thus represents the untransformed scale, while the returned scale represents its transformed view. - -<a href="#transform_rescaleY" name="transform_rescaleY">#</a> <i>transform</i>.<b>rescaleY</b>(<i>y</i>) · [Source](https://github.com/d3/d3-zoom/blob/master/src/transform.js) - -Returns a [copy](https://github.com/d3/d3-scale#continuous_copy) of the [continuous scale](https://github.com/d3/d3-scale#continuous-scales) *y* whose [domain](https://github.com/d3/d3-scale#continuous_domain) is transformed. This is implemented by first applying the [inverse *y*-transform](#transform_invertY) on the scale’s [range](https://github.com/d3/d3-scale#continuous_range), and then applying the [inverse scale](https://github.com/d3/d3-scale#continuous_invert) to compute the corresponding domain: - -```js -function rescaleY(y) { - var range = y.range().map(transform.invertY, transform), - domain = range.map(y.invert, y); - return y.copy().domain(domain); -} -``` - -The scale *y* must use [d3.interpolateNumber](https://github.com/d3/d3-interpolate#interpolateNumber); do not use [*continuous*.rangeRound](https://github.com/d3/d3-scale#continuous_rangeRound) as this reduces the accuracy of [*continuous*.invert](https://github.com/d3/d3-scale#continuous_invert) and can lead to an inaccurate rescaled domain. This method does not modify the input scale *y*; *y* thus represents the untransformed scale, while the returned scale represents its transformed view. - -<a href="#transform_toString" name="transform_toString">#</a> <i>transform</i>.<b>toString</b>() · [Source](https://github.com/d3/d3-zoom/blob/master/src/transform.js) - -Returns a string representing the [SVG transform](https://www.w3.org/TR/SVG/coords.html#TransformAttribute) corresponding to this transform. Implemented as: - -```js -function toString() { - return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"; -} -``` - -<a href="#zoomIdentity" name="zoomIdentity">#</a> d3.<b>zoomIdentity</b> · [Source](https://github.com/d3/d3-zoom/blob/master/src/transform.js) - -The identity transform, where *k* = 1, *t<sub>x</sub>* = *t<sub>y</sub>* = 0. diff --git a/node_modules/d3-zoom/dist/d3-zoom.js b/node_modules/d3-zoom/dist/d3-zoom.js deleted file mode 100644 index 656aaa759695232b76b30e61f272b1ca330568ed..0000000000000000000000000000000000000000 --- a/node_modules/d3-zoom/dist/d3-zoom.js +++ /dev/null @@ -1,530 +0,0 @@ -// https://d3js.org/d3-zoom/ v2.0.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-dispatch'), require('d3-drag'), require('d3-interpolate'), require('d3-selection'), require('d3-transition')) : -typeof define === 'function' && define.amd ? define(['exports', 'd3-dispatch', 'd3-drag', 'd3-interpolate', 'd3-selection', 'd3-transition'], factory) : -(global = global || self, factory(global.d3 = global.d3 || {}, global.d3, global.d3, global.d3, global.d3, global.d3)); -}(this, (function (exports, d3Dispatch, d3Drag, d3Interpolate, d3Selection, d3Transition) { 'use strict'; - -var constant = x => () => x; - -function ZoomEvent(type, { - sourceEvent, - target, - transform, - dispatch -}) { - Object.defineProperties(this, { - type: {value: type, enumerable: true, configurable: true}, - sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, - target: {value: target, enumerable: true, configurable: true}, - transform: {value: transform, enumerable: true, configurable: true}, - _: {value: dispatch} - }); -} - -function Transform(k, x, y) { - this.k = k; - this.x = x; - this.y = y; -} - -Transform.prototype = { - constructor: Transform, - scale: function(k) { - return k === 1 ? this : new Transform(this.k * k, this.x, this.y); - }, - translate: function(x, y) { - return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y); - }, - apply: function(point) { - return [point[0] * this.k + this.x, point[1] * this.k + this.y]; - }, - applyX: function(x) { - return x * this.k + this.x; - }, - applyY: function(y) { - return y * this.k + this.y; - }, - invert: function(location) { - return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k]; - }, - invertX: function(x) { - return (x - this.x) / this.k; - }, - invertY: function(y) { - return (y - this.y) / this.k; - }, - rescaleX: function(x) { - return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x)); - }, - rescaleY: function(y) { - return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y)); - }, - toString: function() { - return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"; - } -}; - -var identity = new Transform(1, 0, 0); - -transform.prototype = Transform.prototype; - -function transform(node) { - while (!node.__zoom) if (!(node = node.parentNode)) return identity; - return node.__zoom; -} - -function nopropagation(event) { - event.stopImmediatePropagation(); -} - -function noevent(event) { - event.preventDefault(); - event.stopImmediatePropagation(); -} - -// Ignore right-click, since that should open the context menu. -// except for pinch-to-zoom, which is sent as a wheel+ctrlKey event -function defaultFilter(event) { - return (!event.ctrlKey || event.type === 'wheel') && !event.button; -} - -function defaultExtent() { - var e = this; - if (e instanceof SVGElement) { - e = e.ownerSVGElement || e; - if (e.hasAttribute("viewBox")) { - e = e.viewBox.baseVal; - return [[e.x, e.y], [e.x + e.width, e.y + e.height]]; - } - return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]; - } - return [[0, 0], [e.clientWidth, e.clientHeight]]; -} - -function defaultTransform() { - return this.__zoom || identity; -} - -function defaultWheelDelta(event) { - return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1); -} - -function defaultTouchable() { - return navigator.maxTouchPoints || ("ontouchstart" in this); -} - -function defaultConstrain(transform, extent, translateExtent) { - var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0], - dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0], - dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1], - dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1]; - return transform.translate( - dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1), - dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1) - ); -} - -function zoom() { - var filter = defaultFilter, - extent = defaultExtent, - constrain = defaultConstrain, - wheelDelta = defaultWheelDelta, - touchable = defaultTouchable, - scaleExtent = [0, Infinity], - translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], - duration = 250, - interpolate = d3Interpolate.interpolateZoom, - listeners = d3Dispatch.dispatch("start", "zoom", "end"), - touchstarting, - touchfirst, - touchending, - touchDelay = 500, - wheelDelay = 150, - clickDistance2 = 0, - tapDistance = 10; - - function zoom(selection) { - selection - .property("__zoom", defaultTransform) - .on("wheel.zoom", wheeled) - .on("mousedown.zoom", mousedowned) - .on("dblclick.zoom", dblclicked) - .filter(touchable) - .on("touchstart.zoom", touchstarted) - .on("touchmove.zoom", touchmoved) - .on("touchend.zoom touchcancel.zoom", touchended) - .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); - } - - zoom.transform = function(collection, transform, point, event) { - var selection = collection.selection ? collection.selection() : collection; - selection.property("__zoom", defaultTransform); - if (collection !== selection) { - schedule(collection, transform, point, event); - } else { - selection.interrupt().each(function() { - gesture(this, arguments) - .event(event) - .start() - .zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform) - .end(); - }); - } - }; - - zoom.scaleBy = function(selection, k, p, event) { - zoom.scaleTo(selection, function() { - var k0 = this.__zoom.k, - k1 = typeof k === "function" ? k.apply(this, arguments) : k; - return k0 * k1; - }, p, event); - }; - - zoom.scaleTo = function(selection, k, p, event) { - zoom.transform(selection, function() { - var e = extent.apply(this, arguments), - t0 = this.__zoom, - p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p, - p1 = t0.invert(p0), - k1 = typeof k === "function" ? k.apply(this, arguments) : k; - return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent); - }, p, event); - }; - - zoom.translateBy = function(selection, x, y, event) { - zoom.transform(selection, function() { - return constrain(this.__zoom.translate( - typeof x === "function" ? x.apply(this, arguments) : x, - typeof y === "function" ? y.apply(this, arguments) : y - ), extent.apply(this, arguments), translateExtent); - }, null, event); - }; - - zoom.translateTo = function(selection, x, y, p, event) { - zoom.transform(selection, function() { - var e = extent.apply(this, arguments), - t = this.__zoom, - p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p; - return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate( - typeof x === "function" ? -x.apply(this, arguments) : -x, - typeof y === "function" ? -y.apply(this, arguments) : -y - ), e, translateExtent); - }, p, event); - }; - - function scale(transform, k) { - k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k)); - return k === transform.k ? transform : new Transform(k, transform.x, transform.y); - } - - function translate(transform, p0, p1) { - var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k; - return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y); - } - - function centroid(extent) { - return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2]; - } - - function schedule(transition, transform, point, event) { - transition - .on("start.zoom", function() { gesture(this, arguments).event(event).start(); }) - .on("interrupt.zoom end.zoom", function() { gesture(this, arguments).event(event).end(); }) - .tween("zoom", function() { - var that = this, - args = arguments, - g = gesture(that, args).event(event), - e = extent.apply(that, args), - p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, - w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), - a = that.__zoom, - b = typeof transform === "function" ? transform.apply(that, args) : transform, - i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k)); - return function(t) { - if (t === 1) t = b; // Avoid rounding error on end. - else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); } - g.zoom(null, t); - }; - }); - } - - function gesture(that, args, clean) { - return (!clean && that.__zooming) || new Gesture(that, args); - } - - function Gesture(that, args) { - this.that = that; - this.args = args; - this.active = 0; - this.sourceEvent = null; - this.extent = extent.apply(that, args); - this.taps = 0; - } - - Gesture.prototype = { - event: function(event) { - if (event) this.sourceEvent = event; - return this; - }, - start: function() { - if (++this.active === 1) { - this.that.__zooming = this; - this.emit("start"); - } - return this; - }, - zoom: function(key, transform) { - if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]); - if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]); - if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]); - this.that.__zoom = transform; - this.emit("zoom"); - return this; - }, - end: function() { - if (--this.active === 0) { - delete this.that.__zooming; - this.emit("end"); - } - return this; - }, - emit: function(type) { - var d = d3Selection.select(this.that).datum(); - listeners.call( - type, - this.that, - new ZoomEvent(type, { - sourceEvent: this.sourceEvent, - target: zoom, - type, - transform: this.that.__zoom, - dispatch: listeners - }), - d - ); - } - }; - - function wheeled(event, ...args) { - if (!filter.apply(this, arguments)) return; - var g = gesture(this, args).event(event), - t = this.__zoom, - k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))), - p = d3Selection.pointer(event); - - // If the mouse is in the same location as before, reuse it. - // If there were recent wheel events, reset the wheel idle timeout. - if (g.wheel) { - if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) { - g.mouse[1] = t.invert(g.mouse[0] = p); - } - clearTimeout(g.wheel); - } - - // If this wheel event won’t trigger a transform change, ignore it. - else if (t.k === k) return; - - // Otherwise, capture the mouse point and location at the start. - else { - g.mouse = [p, t.invert(p)]; - d3Transition.interrupt(this); - g.start(); - } - - noevent(event); - g.wheel = setTimeout(wheelidled, wheelDelay); - g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent)); - - function wheelidled() { - g.wheel = null; - g.end(); - } - } - - function mousedowned(event, ...args) { - if (touchending || !filter.apply(this, arguments)) return; - var g = gesture(this, args, true).event(event), - v = d3Selection.select(event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true), - p = d3Selection.pointer(event, currentTarget), - currentTarget = event.currentTarget, - x0 = event.clientX, - y0 = event.clientY; - - d3Drag.dragDisable(event.view); - nopropagation(event); - g.mouse = [p, this.__zoom.invert(p)]; - d3Transition.interrupt(this); - g.start(); - - function mousemoved(event) { - noevent(event); - if (!g.moved) { - var dx = event.clientX - x0, dy = event.clientY - y0; - g.moved = dx * dx + dy * dy > clickDistance2; - } - g.event(event) - .zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = d3Selection.pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent)); - } - - function mouseupped(event) { - v.on("mousemove.zoom mouseup.zoom", null); - d3Drag.dragEnable(event.view, g.moved); - noevent(event); - g.event(event).end(); - } - } - - function dblclicked(event, ...args) { - if (!filter.apply(this, arguments)) return; - var t0 = this.__zoom, - p0 = d3Selection.pointer(event.changedTouches ? event.changedTouches[0] : event, this), - p1 = t0.invert(p0), - k1 = t0.k * (event.shiftKey ? 0.5 : 2), - t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent); - - noevent(event); - if (duration > 0) d3Selection.select(this).transition().duration(duration).call(schedule, t1, p0, event); - else d3Selection.select(this).call(zoom.transform, t1, p0, event); - } - - function touchstarted(event, ...args) { - if (!filter.apply(this, arguments)) return; - var touches = event.touches, - n = touches.length, - g = gesture(this, args, event.changedTouches.length === n).event(event), - started, i, t, p; - - nopropagation(event); - for (i = 0; i < n; ++i) { - t = touches[i], p = d3Selection.pointer(t, this); - p = [p, this.__zoom.invert(p), t.identifier]; - if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting; - else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0; - } - - if (touchstarting) touchstarting = clearTimeout(touchstarting); - - if (started) { - if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay); - d3Transition.interrupt(this); - g.start(); - } - } - - function touchmoved(event, ...args) { - if (!this.__zooming) return; - var g = gesture(this, args).event(event), - touches = event.changedTouches, - n = touches.length, i, t, p, l; - - noevent(event); - for (i = 0; i < n; ++i) { - t = touches[i], p = d3Selection.pointer(t, this); - if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p; - else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p; - } - t = g.that.__zoom; - if (g.touch1) { - var p0 = g.touch0[0], l0 = g.touch0[1], - p1 = g.touch1[0], l1 = g.touch1[1], - dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp, - dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl; - t = scale(t, Math.sqrt(dp / dl)); - p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2]; - l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2]; - } - else if (g.touch0) p = g.touch0[0], l = g.touch0[1]; - else return; - - g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent)); - } - - function touchended(event, ...args) { - if (!this.__zooming) return; - var g = gesture(this, args).event(event), - touches = event.changedTouches, - n = touches.length, i, t; - - nopropagation(event); - if (touchending) clearTimeout(touchending); - touchending = setTimeout(function() { touchending = null; }, touchDelay); - for (i = 0; i < n; ++i) { - t = touches[i]; - if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0; - else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1; - } - if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1; - if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]); - else { - g.end(); - // If this was a dbltap, reroute to the (optional) dblclick.zoom handler. - if (g.taps === 2) { - t = d3Selection.pointer(t, this); - if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) { - var p = d3Selection.select(this).on("dblclick.zoom"); - if (p) p.apply(this, arguments); - } - } - } - } - - zoom.wheelDelta = function(_) { - return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : constant(+_), zoom) : wheelDelta; - }; - - zoom.filter = function(_) { - return arguments.length ? (filter = typeof _ === "function" ? _ : constant(!!_), zoom) : filter; - }; - - zoom.touchable = function(_) { - return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), zoom) : touchable; - }; - - zoom.extent = function(_) { - return arguments.length ? (extent = typeof _ === "function" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent; - }; - - zoom.scaleExtent = function(_) { - return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]]; - }; - - zoom.translateExtent = function(_) { - return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]]; - }; - - zoom.constrain = function(_) { - return arguments.length ? (constrain = _, zoom) : constrain; - }; - - zoom.duration = function(_) { - return arguments.length ? (duration = +_, zoom) : duration; - }; - - zoom.interpolate = function(_) { - return arguments.length ? (interpolate = _, zoom) : interpolate; - }; - - zoom.on = function() { - var value = listeners.on.apply(listeners, arguments); - return value === listeners ? zoom : value; - }; - - zoom.clickDistance = function(_) { - return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2); - }; - - zoom.tapDistance = function(_) { - return arguments.length ? (tapDistance = +_, zoom) : tapDistance; - }; - - return zoom; -} - -exports.zoom = zoom; -exports.zoomIdentity = identity; -exports.zoomTransform = transform; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/node_modules/d3-zoom/dist/d3-zoom.min.js b/node_modules/d3-zoom/dist/d3-zoom.min.js deleted file mode 100644 index 50c0b8731ff432d07668b4ceaa89a87a3f5f3ed0..0000000000000000000000000000000000000000 --- a/node_modules/d3-zoom/dist/d3-zoom.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org/d3-zoom/ v2.0.0 Copyright 2020 Mike Bostock -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("d3-dispatch"),require("d3-drag"),require("d3-interpolate"),require("d3-selection"),require("d3-transition")):"function"==typeof define&&define.amd?define(["exports","d3-dispatch","d3-drag","d3-interpolate","d3-selection","d3-transition"],e):e((t=t||self).d3=t.d3||{},t.d3,t.d3,t.d3,t.d3,t.d3)}(this,(function(t,e,n,o,i,r){"use strict";var u=t=>()=>t;function s(t,{sourceEvent:e,target:n,transform:o,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:i}})}function h(t,e,n){this.k=t,this.x=e,this.y=n}h.prototype={constructor:h,scale:function(t){return 1===t?this:new h(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new h(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var a=new h(1,0,0);function c(t){for(;!t.__zoom;)if(!(t=t.parentNode))return a;return t.__zoom}function l(t){t.stopImmediatePropagation()}function f(t){t.preventDefault(),t.stopImmediatePropagation()}function p(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function m(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function v(){return this.__zoom||a}function d(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function y(){return navigator.maxTouchPoints||"ontouchstart"in this}function z(t,e,n){var o=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],r=t.invertY(e[0][1])-n[0][1],u=t.invertY(e[1][1])-n[1][1];return t.translate(i>o?(o+i)/2:Math.min(0,o)||Math.max(0,i),u>r?(r+u)/2:Math.min(0,r)||Math.max(0,u))}c.prototype=h.prototype,t.zoom=function(){var t,c,_,g=p,x=m,k=z,w=d,b=y,T=[0,1/0],M=[[-1/0,-1/0],[1/0,1/0]],E=250,Y=o.interpolateZoom,X=e.dispatch("start","zoom","end"),q=0,D=10;function P(t){t.property("__zoom",v).on("wheel.zoom",G).on("mousedown.zoom",O).on("dblclick.zoom",A).filter(b).on("touchstart.zoom",H).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function V(t,e){return(e=Math.max(T[0],Math.min(T[1],e)))===t.k?t:new h(e,t.x,t.y)}function B(t,e,n){var o=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return o===t.x&&i===t.y?t:new h(t.k,o,i)}function j(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function I(t,e,n,o){t.on("start.zoom",(function(){K(this,arguments).event(o).start()})).on("interrupt.zoom end.zoom",(function(){K(this,arguments).event(o).end()})).tween("zoom",(function(){var t=this,i=arguments,r=K(t,i).event(o),u=x.apply(t,i),s=null==n?j(u):"function"==typeof n?n.apply(t,i):n,a=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),c=t.__zoom,l="function"==typeof e?e.apply(t,i):e,f=Y(c.invert(s).concat(a/c.k),l.invert(s).concat(a/l.k));return function(t){if(1===t)t=l;else{var e=f(t),n=a/e[2];t=new h(n,s[0]-e[0]*n,s[1]-e[1]*n)}r.zoom(null,t)}}))}function K(t,e,n){return!n&&t.__zooming||new S(t,e)}function S(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=x.apply(t,e),this.taps=0}function G(t,...e){if(g.apply(this,arguments)){var n=K(this,e).event(t),o=this.__zoom,u=Math.max(T[0],Math.min(T[1],o.k*Math.pow(2,w.apply(this,arguments)))),s=i.pointer(t);if(n.wheel)n.mouse[0][0]===s[0]&&n.mouse[0][1]===s[1]||(n.mouse[1]=o.invert(n.mouse[0]=s)),clearTimeout(n.wheel);else{if(o.k===u)return;n.mouse=[s,o.invert(s)],r.interrupt(this),n.start()}f(t),n.wheel=setTimeout(h,150),n.zoom("mouse",k(B(V(o,u),n.mouse[0],n.mouse[1]),n.extent,M))}function h(){n.wheel=null,n.end()}}function O(t,...e){if(!_&&g.apply(this,arguments)){var o=K(this,e,!0).event(t),u=i.select(t.view).on("mousemove.zoom",p,!0).on("mouseup.zoom",m,!0),s=i.pointer(t,h),h=t.currentTarget,a=t.clientX,c=t.clientY;n.dragDisable(t.view),l(t),o.mouse=[s,this.__zoom.invert(s)],r.interrupt(this),o.start()}function p(t){if(f(t),!o.moved){var e=t.clientX-a,n=t.clientY-c;o.moved=e*e+n*n>q}o.event(t).zoom("mouse",k(B(o.that.__zoom,o.mouse[0]=i.pointer(t,h),o.mouse[1]),o.extent,M))}function m(t){u.on("mousemove.zoom mouseup.zoom",null),n.dragEnable(t.view,o.moved),f(t),o.event(t).end()}}function A(t,...e){if(g.apply(this,arguments)){var n=this.__zoom,o=i.pointer(t.changedTouches?t.changedTouches[0]:t,this),r=n.invert(o),u=n.k*(t.shiftKey?.5:2),s=k(B(V(n,u),o,r),x.apply(this,e),M);f(t),E>0?i.select(this).transition().duration(E).call(I,s,o,t):i.select(this).call(P.transform,s,o,t)}}function H(e,...n){if(g.apply(this,arguments)){var o,u,s,h,a=e.touches,f=a.length,p=K(this,n,e.changedTouches.length===f).event(e);for(l(e),u=0;u<f;++u)s=a[u],h=[h=i.pointer(s,this),this.__zoom.invert(h),s.identifier],p.touch0?p.touch1||p.touch0[2]===h[2]||(p.touch1=h,p.taps=0):(p.touch0=h,o=!0,p.taps=1+!!t);t&&(t=clearTimeout(t)),o&&(p.taps<2&&(c=h[0],t=setTimeout((function(){t=null}),500)),r.interrupt(this),p.start())}}function N(t,...e){if(this.__zooming){var n,o,r,u,s=K(this,e).event(t),h=t.changedTouches,a=h.length;for(f(t),n=0;n<a;++n)o=h[n],r=i.pointer(o,this),s.touch0&&s.touch0[2]===o.identifier?s.touch0[0]=r:s.touch1&&s.touch1[2]===o.identifier&&(s.touch1[0]=r);if(o=s.that.__zoom,s.touch1){var c=s.touch0[0],l=s.touch0[1],p=s.touch1[0],m=s.touch1[1],v=(v=p[0]-c[0])*v+(v=p[1]-c[1])*v,d=(d=m[0]-l[0])*d+(d=m[1]-l[1])*d;o=V(o,Math.sqrt(v/d)),r=[(c[0]+p[0])/2,(c[1]+p[1])/2],u=[(l[0]+m[0])/2,(l[1]+m[1])/2]}else{if(!s.touch0)return;r=s.touch0[0],u=s.touch0[1]}s.zoom("touch",k(B(o,r,u),s.extent,M))}}function W(t,...e){if(this.__zooming){var n,o,r=K(this,e).event(t),u=t.changedTouches,s=u.length;for(l(t),_&&clearTimeout(_),_=setTimeout((function(){_=null}),500),n=0;n<s;++n)o=u[n],r.touch0&&r.touch0[2]===o.identifier?delete r.touch0:r.touch1&&r.touch1[2]===o.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps&&(o=i.pointer(o,this),Math.hypot(c[0]-o[0],c[1]-o[1])<D)){var h=i.select(this).on("dblclick.zoom");h&&h.apply(this,arguments)}}}return P.transform=function(t,e,n,o){var i=t.selection?t.selection():t;i.property("__zoom",v),t!==i?I(t,e,n,o):i.interrupt().each((function(){K(this,arguments).event(o).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},P.scaleBy=function(t,e,n,o){P.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n,o)},P.scaleTo=function(t,e,n,o){P.transform(t,(function(){var t=x.apply(this,arguments),o=this.__zoom,i=null==n?j(t):"function"==typeof n?n.apply(this,arguments):n,r=o.invert(i),u="function"==typeof e?e.apply(this,arguments):e;return k(B(V(o,u),i,r),t,M)}),n,o)},P.translateBy=function(t,e,n,o){P.transform(t,(function(){return k(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),x.apply(this,arguments),M)}),null,o)},P.translateTo=function(t,e,n,o,i){P.transform(t,(function(){var t=x.apply(this,arguments),i=this.__zoom,r=null==o?j(t):"function"==typeof o?o.apply(this,arguments):o;return k(a.translate(r[0],r[1]).scale(i.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,M)}),o,i)},S.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=i.select(this.that).datum();X.call(t,this.that,new s(t,{sourceEvent:this.sourceEvent,target:P,type:t,transform:this.that.__zoom,dispatch:X}),e)}},P.wheelDelta=function(t){return arguments.length?(w="function"==typeof t?t:u(+t),P):w},P.filter=function(t){return arguments.length?(g="function"==typeof t?t:u(!!t),P):g},P.touchable=function(t){return arguments.length?(b="function"==typeof t?t:u(!!t),P):b},P.extent=function(t){return arguments.length?(x="function"==typeof t?t:u([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),P):x},P.scaleExtent=function(t){return arguments.length?(T[0]=+t[0],T[1]=+t[1],P):[T[0],T[1]]},P.translateExtent=function(t){return arguments.length?(M[0][0]=+t[0][0],M[1][0]=+t[1][0],M[0][1]=+t[0][1],M[1][1]=+t[1][1],P):[[M[0][0],M[0][1]],[M[1][0],M[1][1]]]},P.constrain=function(t){return arguments.length?(k=t,P):k},P.duration=function(t){return arguments.length?(E=+t,P):E},P.interpolate=function(t){return arguments.length?(Y=t,P):Y},P.on=function(){var t=X.on.apply(X,arguments);return t===X?P:t},P.clickDistance=function(t){return arguments.length?(q=(t=+t)*t,P):Math.sqrt(q)},P.tapDistance=function(t){return arguments.length?(D=+t,P):D},P},t.zoomIdentity=a,t.zoomTransform=c,Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/node_modules/d3-zoom/package.json b/node_modules/d3-zoom/package.json deleted file mode 100644 index dfbdc4e9290a6dbb55f1a068a667d4a094a27a7f..0000000000000000000000000000000000000000 --- a/node_modules/d3-zoom/package.json +++ /dev/null @@ -1,78 +0,0 @@ -{ - "_from": "d3-zoom@2", - "_id": "d3-zoom@2.0.0", - "_inBundle": false, - "_integrity": "sha512-fFg7aoaEm9/jf+qfstak0IYpnesZLiMX6GZvXtUSdv8RH2o4E2qeelgdU09eKS6wGuiGMfcnMI0nTIqWzRHGpw==", - "_location": "/d3-zoom", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "d3-zoom@2", - "name": "d3-zoom", - "escapedName": "d3-zoom", - "rawSpec": "2", - "saveSpec": null, - "fetchSpec": "2" - }, - "_requiredBy": [ - "/d3" - ], - "_resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-2.0.0.tgz", - "_shasum": "f04d0afd05518becce879d04709c47ecd93fba54", - "_spec": "d3-zoom@2", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3-zoom/issues" - }, - "bundleDependencies": false, - "dependencies": { - "d3-dispatch": "1 - 2", - "d3-drag": "2", - "d3-interpolate": "1 - 2", - "d3-selection": "2", - "d3-transition": "2" - }, - "deprecated": false, - "description": "Pan and zoom SVG, HTML or Canvas using mouse or touch input.", - "devDependencies": { - "eslint": "6", - "jsdom": "^16.2.2", - "rollup": "1", - "rollup-plugin-terser": "5", - "tape": "4" - }, - "files": [ - "dist/**/*.js", - "src/**/*.js" - ], - "homepage": "https://d3js.org/d3-zoom/", - "jsdelivr": "dist/d3-zoom.min.js", - "keywords": [ - "d3", - "d3-module", - "zoom", - "behavior", - "interaction" - ], - "license": "BSD-3-Clause", - "main": "dist/d3-zoom.js", - "module": "src/index.js", - "name": "d3-zoom", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3-zoom.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js", - "prepublishOnly": "rm -rf dist && yarn test", - "pretest": "rollup -c", - "test": "tape 'test/**/*-test.js' && eslint src" - }, - "unpkg": "dist/d3-zoom.min.js", - "version": "2.0.0" -} diff --git a/node_modules/d3-zoom/src/constant.js b/node_modules/d3-zoom/src/constant.js deleted file mode 100644 index 3487c0ddfaabca50218341abd733df08493b568c..0000000000000000000000000000000000000000 --- a/node_modules/d3-zoom/src/constant.js +++ /dev/null @@ -1 +0,0 @@ -export default x => () => x; diff --git a/node_modules/d3-zoom/src/event.js b/node_modules/d3-zoom/src/event.js deleted file mode 100644 index 0a28790ef9993a04317c80f568fc0603830ccfef..0000000000000000000000000000000000000000 --- a/node_modules/d3-zoom/src/event.js +++ /dev/null @@ -1,14 +0,0 @@ -export default function ZoomEvent(type, { - sourceEvent, - target, - transform, - dispatch -}) { - Object.defineProperties(this, { - type: {value: type, enumerable: true, configurable: true}, - sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, - target: {value: target, enumerable: true, configurable: true}, - transform: {value: transform, enumerable: true, configurable: true}, - _: {value: dispatch} - }); -} diff --git a/node_modules/d3-zoom/src/index.js b/node_modules/d3-zoom/src/index.js deleted file mode 100644 index 9cdc0cf8e798787c24f6de9f0362de899b88a33b..0000000000000000000000000000000000000000 --- a/node_modules/d3-zoom/src/index.js +++ /dev/null @@ -1,2 +0,0 @@ -export {default as zoom} from "./zoom.js"; -export {default as zoomTransform, identity as zoomIdentity} from "./transform.js"; diff --git a/node_modules/d3-zoom/src/noevent.js b/node_modules/d3-zoom/src/noevent.js deleted file mode 100644 index b32552dc29f086d1e24b81abbca67ad5598b0cdc..0000000000000000000000000000000000000000 --- a/node_modules/d3-zoom/src/noevent.js +++ /dev/null @@ -1,8 +0,0 @@ -export function nopropagation(event) { - event.stopImmediatePropagation(); -} - -export default function(event) { - event.preventDefault(); - event.stopImmediatePropagation(); -} diff --git a/node_modules/d3-zoom/src/transform.js b/node_modules/d3-zoom/src/transform.js deleted file mode 100644 index 8e19f1bcc9b76a4426d993ae934c771f8a9f2be8..0000000000000000000000000000000000000000 --- a/node_modules/d3-zoom/src/transform.js +++ /dev/null @@ -1,51 +0,0 @@ -export function Transform(k, x, y) { - this.k = k; - this.x = x; - this.y = y; -} - -Transform.prototype = { - constructor: Transform, - scale: function(k) { - return k === 1 ? this : new Transform(this.k * k, this.x, this.y); - }, - translate: function(x, y) { - return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y); - }, - apply: function(point) { - return [point[0] * this.k + this.x, point[1] * this.k + this.y]; - }, - applyX: function(x) { - return x * this.k + this.x; - }, - applyY: function(y) { - return y * this.k + this.y; - }, - invert: function(location) { - return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k]; - }, - invertX: function(x) { - return (x - this.x) / this.k; - }, - invertY: function(y) { - return (y - this.y) / this.k; - }, - rescaleX: function(x) { - return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x)); - }, - rescaleY: function(y) { - return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y)); - }, - toString: function() { - return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"; - } -}; - -export var identity = new Transform(1, 0, 0); - -transform.prototype = Transform.prototype; - -export default function transform(node) { - while (!node.__zoom) if (!(node = node.parentNode)) return identity; - return node.__zoom; -} diff --git a/node_modules/d3-zoom/src/zoom.js b/node_modules/d3-zoom/src/zoom.js deleted file mode 100644 index 93059bd8e2c15e5e715ced390bc2a1c63bf6987a..0000000000000000000000000000000000000000 --- a/node_modules/d3-zoom/src/zoom.js +++ /dev/null @@ -1,447 +0,0 @@ -import {dispatch} from "d3-dispatch"; -import {dragDisable, dragEnable} from "d3-drag"; -import {interpolateZoom} from "d3-interpolate"; -import {select, pointer} from "d3-selection"; -import {interrupt} from "d3-transition"; -import constant from "./constant.js"; -import ZoomEvent from "./event.js"; -import {Transform, identity} from "./transform.js"; -import noevent, {nopropagation} from "./noevent.js"; - -// Ignore right-click, since that should open the context menu. -// except for pinch-to-zoom, which is sent as a wheel+ctrlKey event -function defaultFilter(event) { - return (!event.ctrlKey || event.type === 'wheel') && !event.button; -} - -function defaultExtent() { - var e = this; - if (e instanceof SVGElement) { - e = e.ownerSVGElement || e; - if (e.hasAttribute("viewBox")) { - e = e.viewBox.baseVal; - return [[e.x, e.y], [e.x + e.width, e.y + e.height]]; - } - return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]; - } - return [[0, 0], [e.clientWidth, e.clientHeight]]; -} - -function defaultTransform() { - return this.__zoom || identity; -} - -function defaultWheelDelta(event) { - return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1); -} - -function defaultTouchable() { - return navigator.maxTouchPoints || ("ontouchstart" in this); -} - -function defaultConstrain(transform, extent, translateExtent) { - var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0], - dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0], - dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1], - dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1]; - return transform.translate( - dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1), - dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1) - ); -} - -export default function() { - var filter = defaultFilter, - extent = defaultExtent, - constrain = defaultConstrain, - wheelDelta = defaultWheelDelta, - touchable = defaultTouchable, - scaleExtent = [0, Infinity], - translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], - duration = 250, - interpolate = interpolateZoom, - listeners = dispatch("start", "zoom", "end"), - touchstarting, - touchfirst, - touchending, - touchDelay = 500, - wheelDelay = 150, - clickDistance2 = 0, - tapDistance = 10; - - function zoom(selection) { - selection - .property("__zoom", defaultTransform) - .on("wheel.zoom", wheeled) - .on("mousedown.zoom", mousedowned) - .on("dblclick.zoom", dblclicked) - .filter(touchable) - .on("touchstart.zoom", touchstarted) - .on("touchmove.zoom", touchmoved) - .on("touchend.zoom touchcancel.zoom", touchended) - .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); - } - - zoom.transform = function(collection, transform, point, event) { - var selection = collection.selection ? collection.selection() : collection; - selection.property("__zoom", defaultTransform); - if (collection !== selection) { - schedule(collection, transform, point, event); - } else { - selection.interrupt().each(function() { - gesture(this, arguments) - .event(event) - .start() - .zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform) - .end(); - }); - } - }; - - zoom.scaleBy = function(selection, k, p, event) { - zoom.scaleTo(selection, function() { - var k0 = this.__zoom.k, - k1 = typeof k === "function" ? k.apply(this, arguments) : k; - return k0 * k1; - }, p, event); - }; - - zoom.scaleTo = function(selection, k, p, event) { - zoom.transform(selection, function() { - var e = extent.apply(this, arguments), - t0 = this.__zoom, - p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p, - p1 = t0.invert(p0), - k1 = typeof k === "function" ? k.apply(this, arguments) : k; - return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent); - }, p, event); - }; - - zoom.translateBy = function(selection, x, y, event) { - zoom.transform(selection, function() { - return constrain(this.__zoom.translate( - typeof x === "function" ? x.apply(this, arguments) : x, - typeof y === "function" ? y.apply(this, arguments) : y - ), extent.apply(this, arguments), translateExtent); - }, null, event); - }; - - zoom.translateTo = function(selection, x, y, p, event) { - zoom.transform(selection, function() { - var e = extent.apply(this, arguments), - t = this.__zoom, - p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p; - return constrain(identity.translate(p0[0], p0[1]).scale(t.k).translate( - typeof x === "function" ? -x.apply(this, arguments) : -x, - typeof y === "function" ? -y.apply(this, arguments) : -y - ), e, translateExtent); - }, p, event); - }; - - function scale(transform, k) { - k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k)); - return k === transform.k ? transform : new Transform(k, transform.x, transform.y); - } - - function translate(transform, p0, p1) { - var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k; - return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y); - } - - function centroid(extent) { - return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2]; - } - - function schedule(transition, transform, point, event) { - transition - .on("start.zoom", function() { gesture(this, arguments).event(event).start(); }) - .on("interrupt.zoom end.zoom", function() { gesture(this, arguments).event(event).end(); }) - .tween("zoom", function() { - var that = this, - args = arguments, - g = gesture(that, args).event(event), - e = extent.apply(that, args), - p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, - w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), - a = that.__zoom, - b = typeof transform === "function" ? transform.apply(that, args) : transform, - i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k)); - return function(t) { - if (t === 1) t = b; // Avoid rounding error on end. - else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); } - g.zoom(null, t); - }; - }); - } - - function gesture(that, args, clean) { - return (!clean && that.__zooming) || new Gesture(that, args); - } - - function Gesture(that, args) { - this.that = that; - this.args = args; - this.active = 0; - this.sourceEvent = null; - this.extent = extent.apply(that, args); - this.taps = 0; - } - - Gesture.prototype = { - event: function(event) { - if (event) this.sourceEvent = event; - return this; - }, - start: function() { - if (++this.active === 1) { - this.that.__zooming = this; - this.emit("start"); - } - return this; - }, - zoom: function(key, transform) { - if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]); - if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]); - if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]); - this.that.__zoom = transform; - this.emit("zoom"); - return this; - }, - end: function() { - if (--this.active === 0) { - delete this.that.__zooming; - this.emit("end"); - } - return this; - }, - emit: function(type) { - var d = select(this.that).datum(); - listeners.call( - type, - this.that, - new ZoomEvent(type, { - sourceEvent: this.sourceEvent, - target: zoom, - type, - transform: this.that.__zoom, - dispatch: listeners - }), - d - ); - } - }; - - function wheeled(event, ...args) { - if (!filter.apply(this, arguments)) return; - var g = gesture(this, args).event(event), - t = this.__zoom, - k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))), - p = pointer(event); - - // If the mouse is in the same location as before, reuse it. - // If there were recent wheel events, reset the wheel idle timeout. - if (g.wheel) { - if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) { - g.mouse[1] = t.invert(g.mouse[0] = p); - } - clearTimeout(g.wheel); - } - - // If this wheel event won’t trigger a transform change, ignore it. - else if (t.k === k) return; - - // Otherwise, capture the mouse point and location at the start. - else { - g.mouse = [p, t.invert(p)]; - interrupt(this); - g.start(); - } - - noevent(event); - g.wheel = setTimeout(wheelidled, wheelDelay); - g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent)); - - function wheelidled() { - g.wheel = null; - g.end(); - } - } - - function mousedowned(event, ...args) { - if (touchending || !filter.apply(this, arguments)) return; - var g = gesture(this, args, true).event(event), - v = select(event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true), - p = pointer(event, currentTarget), - currentTarget = event.currentTarget, - x0 = event.clientX, - y0 = event.clientY; - - dragDisable(event.view); - nopropagation(event); - g.mouse = [p, this.__zoom.invert(p)]; - interrupt(this); - g.start(); - - function mousemoved(event) { - noevent(event); - if (!g.moved) { - var dx = event.clientX - x0, dy = event.clientY - y0; - g.moved = dx * dx + dy * dy > clickDistance2; - } - g.event(event) - .zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent)); - } - - function mouseupped(event) { - v.on("mousemove.zoom mouseup.zoom", null); - dragEnable(event.view, g.moved); - noevent(event); - g.event(event).end(); - } - } - - function dblclicked(event, ...args) { - if (!filter.apply(this, arguments)) return; - var t0 = this.__zoom, - p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this), - p1 = t0.invert(p0), - k1 = t0.k * (event.shiftKey ? 0.5 : 2), - t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent); - - noevent(event); - if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0, event); - else select(this).call(zoom.transform, t1, p0, event); - } - - function touchstarted(event, ...args) { - if (!filter.apply(this, arguments)) return; - var touches = event.touches, - n = touches.length, - g = gesture(this, args, event.changedTouches.length === n).event(event), - started, i, t, p; - - nopropagation(event); - for (i = 0; i < n; ++i) { - t = touches[i], p = pointer(t, this); - p = [p, this.__zoom.invert(p), t.identifier]; - if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting; - else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0; - } - - if (touchstarting) touchstarting = clearTimeout(touchstarting); - - if (started) { - if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay); - interrupt(this); - g.start(); - } - } - - function touchmoved(event, ...args) { - if (!this.__zooming) return; - var g = gesture(this, args).event(event), - touches = event.changedTouches, - n = touches.length, i, t, p, l; - - noevent(event); - for (i = 0; i < n; ++i) { - t = touches[i], p = pointer(t, this); - if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p; - else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p; - } - t = g.that.__zoom; - if (g.touch1) { - var p0 = g.touch0[0], l0 = g.touch0[1], - p1 = g.touch1[0], l1 = g.touch1[1], - dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp, - dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl; - t = scale(t, Math.sqrt(dp / dl)); - p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2]; - l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2]; - } - else if (g.touch0) p = g.touch0[0], l = g.touch0[1]; - else return; - - g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent)); - } - - function touchended(event, ...args) { - if (!this.__zooming) return; - var g = gesture(this, args).event(event), - touches = event.changedTouches, - n = touches.length, i, t; - - nopropagation(event); - if (touchending) clearTimeout(touchending); - touchending = setTimeout(function() { touchending = null; }, touchDelay); - for (i = 0; i < n; ++i) { - t = touches[i]; - if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0; - else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1; - } - if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1; - if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]); - else { - g.end(); - // If this was a dbltap, reroute to the (optional) dblclick.zoom handler. - if (g.taps === 2) { - t = pointer(t, this); - if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) { - var p = select(this).on("dblclick.zoom"); - if (p) p.apply(this, arguments); - } - } - } - } - - zoom.wheelDelta = function(_) { - return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : constant(+_), zoom) : wheelDelta; - }; - - zoom.filter = function(_) { - return arguments.length ? (filter = typeof _ === "function" ? _ : constant(!!_), zoom) : filter; - }; - - zoom.touchable = function(_) { - return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), zoom) : touchable; - }; - - zoom.extent = function(_) { - return arguments.length ? (extent = typeof _ === "function" ? _ : constant([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent; - }; - - zoom.scaleExtent = function(_) { - return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]]; - }; - - zoom.translateExtent = function(_) { - return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]]; - }; - - zoom.constrain = function(_) { - return arguments.length ? (constrain = _, zoom) : constrain; - }; - - zoom.duration = function(_) { - return arguments.length ? (duration = +_, zoom) : duration; - }; - - zoom.interpolate = function(_) { - return arguments.length ? (interpolate = _, zoom) : interpolate; - }; - - zoom.on = function() { - var value = listeners.on.apply(listeners, arguments); - return value === listeners ? zoom : value; - }; - - zoom.clickDistance = function(_) { - return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2); - }; - - zoom.tapDistance = function(_) { - return arguments.length ? (tapDistance = +_, zoom) : tapDistance; - }; - - return zoom; -} diff --git a/node_modules/d3/CHANGES.md b/node_modules/d3/CHANGES.md deleted file mode 100644 index b55924450a5e6586c446413ba6c649b5bba5abae..0000000000000000000000000000000000000000 --- a/node_modules/d3/CHANGES.md +++ /dev/null @@ -1,1643 +0,0 @@ -# Changes in D3 6.0 - -[Released August 26, 2020.](https://github.com/d3/d3/releases/tag/v6.0.0) - -*This document covers only major changes. For minor and patch changes, please see the [release notes](https://github.com/d3/d3/releases).* - -D3 now **uses native collections** (Map and Set) and **accepts iterables**. [d3.group and d3.rollup](https://observablehq.com/@d3/d3-group) are powerful new aggregation functions that replace d3.nest and work great [with d3-hierarchy](https://observablehq.com/d/9a453665f405eebf) and d3-selection. There are lots of new helpers in d3-array, too, such as [d3.greatest](https://observablehq.com/@d3/d3-least), [d3.quickselect](https://observablehq.com/@d3/d3-quickselect), and [d3.fsum](https://observablehq.com/@d3/d3-fsum). - -D3 now **passes events directly to listeners**, replacing the d3.event global and bringing D3 inline with vanilla JavaScript and most other frameworks. - -**d3-delaunay** (based on Vladimir Agafonkin’s excellent [Delaunator](https://github.com/mapbox/delaunator)) replaces d3-voronoi, offering dramatic improvements to performance, robustness, and [search](https://observablehq.com/@d3/delaunay-find). And there’s a new [d3-geo-voronoi](https://github.com/Fil/d3-geo-voronoi) for spherical (geographical) data! **d3-random** is [greatly expanded](https://github.com/d3/d3-random/blob/master/README.md) and includes a fast [linear congruential generator](https://observablehq.com/@d3/d3-randomlcg) for seeded randomness. **d3-chord** has new layouts for [directed](https://observablehq.com/@d3/directed-chord-diagram) and transposed chord diagrams. **d3-scale** adds a new [radial scale](https://observablehq.com/@d3/radial-stacked-bar-chart-ii) type. - -… and a variety of other small enhancements. [More than 450 examples](https://observablehq.com/@d3/gallery) have been updated to D3 6.0! - -### d3-array - -* Accept iterables. -* Add [d3.group](https://github.com/d3/d3-array/blob/master/README.md#group). -* Add [d3.groups](https://github.com/d3/d3-array/blob/master/README.md#groups). -* Add [d3.index](https://github.com/d3/d3-array/blob/master/README.md#index). -* Add [d3.indexes](https://github.com/d3/d3-array/blob/master/README.md#indexes). -* Add [d3.rollup](https://github.com/d3/d3-array/blob/master/README.md#rollup). -* Add [d3.rollups](https://github.com/d3/d3-array/blob/master/README.md#rollups). -* Add [d3.maxIndex](https://github.com/d3/d3-array/blob/master/README.md#maxIndex). -* Add [d3.minIndex](https://github.com/d3/d3-array/blob/master/README.md#minIndex). -* Add [d3.greatest](https://github.com/d3/d3-array/blob/master/README.md#greatest). -* Add [d3.greatestIndex](https://github.com/d3/d3-array/blob/master/README.md#greatestIndex). -* Add [d3.least](https://github.com/d3/d3-array/blob/master/README.md#least). -* Add [d3.leastIndex](https://github.com/d3/d3-array/blob/master/README.md#leastIndex). -* Add [d3.bin](https://github.com/d3/d3-array/blob/master/README.md#bin). -* Add [d3.count](https://github.com/d3/d3-array/blob/master/README.md#count). -* Add [d3.cumsum](https://github.com/d3/d3-array/blob/master/README.md#cumsum). -* Add [d3.fsum](https://github.com/d3/d3-array/blob/master/README.md#fsum). -* Add [d3.Adder](https://github.com/d3/d3-array/blob/master/README.md#Adder). -* Add [d3.quantileSorted](https://github.com/d3/d3-array/blob/master/README.md#quantileSorted). -* Add [d3.quickselect](https://github.com/d3/d3-array/blob/master/README.md#quickselect). -* Add [*bisector*.center](https://github.com/d3/d3-array/blob/master/README.md#bisector_center). -* Allow more than two iterables for [d3.cross](https://github.com/d3/d3-array/blob/master/README.md#cross). -* Accept non-sorted input with [d3.quantile](https://github.com/d3/d3-array/blob/master/README.md#quantile). -* Fix a *array*.sort bug in Safari. -* Fix bin thresholds to ignore NaN input. -* Fix [d3.ticks](https://github.com/d3/d3-array/blob/master/README.md#ticks) to not return ticks outside the domain. -* Improve the performance of [d3.median](https://github.com/d3/d3-array/blob/master/README.md#median). - -See https://observablehq.com/@d3/d3-array-2-0 for details. - -### d3-brush - -* Add [*event*.mode](https://github.com/d3/d3-brush/blob/master/README.md#brush-events). -* Change [*brush*.on](https://github.com/d3/d3-brush/blob/master/README.md#brush_on) to pass the *event* directly to listeners. -* Improve multitouch (two-touch) interaction. - -### d3-chord - -* Add [d3.chordDirected](https://github.com/d3/d3-chord/blob/master/README.md#chordDirected). -* Add [d3.chordTranspose](https://github.com/d3/d3-chord/blob/master/README.md#chordTranspose). -* Add [d3.ribbonArrow](https://github.com/d3/d3-chord/blob/master/README.md#ribbonArrow). -* Add [*ribbon*.padAngle](https://github.com/d3/d3-chord/blob/master/README.md#ribbon_padAngle). -* Add [*ribbon*.sourceRadius](https://github.com/d3/d3-chord/blob/master/README.md#ribbon_sourceRadius). -* Add [*ribbon*.targetRadius](https://github.com/d3/d3-chord/blob/master/README.md#ribbon_targetRadius). - -### d3-delaunay - -* Add [d3.Delaunay](https://github.com/d3/d3-delaunay/blob/master/README.md). - -### d3-drag - -* Change [*drag*.on](https://github.com/d3/d3-drag/blob/master/README.md#drag_on) to pass the *event* directly to listeners. - -### d3-force - -* Add *iterations* argument to [*simulation*.tick](https://github.com/d3/d3-force/blob/master/README.md#simulation_tick). -* Add [*forceCenter*.strength](https://github.com/d3/d3-force/blob/master/README.md#center_strength). -* Add [*forceSimulation*.randomSource](https://github.com/d3/d3-force/blob/master/README.md#simulation_randomSource). -* All built-in forces are now fully deterministic (including “jiggling†coincident nodes). -* Improve the default phyllotaxis layout slightly by offsetting by one half-radius. -* Improve the error message when a link references an unknown node. -* [*force*.initialize](https://github.com/d3/d3-force/blob/master/README.md#force_initialize) is now passed a random source. -* Fix bug when initializing nodes with fixed positions. - -### d3-format - -* Change the default minus sign to the minus sign (−) instead of hyphen-minus (-). -* Fix decimal `d` formatting of numbers greater than or equal to 1e21. - -### d3-geo - -* Fix clipping of some degenerate polygons. - -### d3-hierarchy - -* Accept iterables. -* Add [*node*[Symbol.iterator]](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_iterator); hierarchies are now iterable. -* Add [*node*.find](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_find). -* Change [*node*.each](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_each) to pass the traversal index. -* Change [*node*.eachAfter](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_eachAfter) to pass the traversal index. -* Change [*node*.eachBefore](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_eachBefore) to pass the traversal index. -* Fix [d3.packSiblings](https://github.com/d3/d3-hierarchy/blob/master/README.md#packSiblings) for huge circles. -* Fix divide-by-zero bug in [d3.treemapBinary](https://github.com/d3/d3-hierarchy/blob/master/README.md#treemapBinary). -* Fix divide-by-zero bug in [d3.treemapResquarify](https://github.com/d3/d3-hierarchy/blob/master/README.md#treemapResquarify). - -### d3-interpolate - -* Add [*interpolateZoom*.rho](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateZoom_rho). (#25) -* Allow [d3.piecewise](https://github.com/d3/d3-interpolate/blob/master/README.md#piecewise) to default to using d3.interpolate. #90 -* Change [d3.interpolateTransformCss](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateTransformCss) to use DOMMatrix and require absolute units. #83 - -### d3-quadtree - -* Fix an infinite loop when coordinates diverge to huge values. - -### d3-random - -* Add [d3.randomLcg](https://github.com/d3/d3-random/blob/master/README.md#randomLcg). -* Add [d3.randomGamma](https://github.com/d3/d3-random/blob/master/README.md#randomGamma). -* Add [d3.randomBeta](https://github.com/d3/d3-random/blob/master/README.md#randomBeta). -* Add [d3.randomWeibull](https://github.com/d3/d3-random/blob/master/README.md#randomWeibull). -* Add [d3.randomCauchy](https://github.com/d3/d3-random/blob/master/README.md#randomCauchy). -* Add [d3.randomLogistic](https://github.com/d3/d3-random/blob/master/README.md#randomLogistic). -* Add [d3.randomPoisson](https://github.com/d3/d3-random/blob/master/README.md#randomPoisson). -* Add [d3.randomInt](https://github.com/d3/d3-random/blob/master/README.md#randomInt). -* Add [d3.randomBinomial](https://github.com/d3/d3-random/blob/master/README.md#randomBinomial). -* Add [d3.randomGeometric](https://github.com/d3/d3-random/blob/master/README.md#randomGeometric). -* Add [d3.randomPareto](https://github.com/d3/d3-random/blob/master/README.md#randomPareto). -* Add [d3.randomBernoulli](https://github.com/d3/d3-random/blob/master/README.md#randomBernoulli). -* Allow [d3.randomBates](https://github.com/d3/d3-random/blob/master/README.md#randomBates) to take fractional *n*. -* Allow [d3.randomIrwinHall](https://github.com/d3/d3-random/blob/master/README.md#randomIrwinHall) to take fractional *n*. -* Don’t wrap Math.random in the default source. - -Thanks to @Lange, @p-v-d-Veeken, @svanschooten, @Parcly-Taxel and @jrus for your contributions! - -### d3-scale - -* Accept iterables. -* Add [*diverging*.rangeRound](https://github.com/d3/d3-scale/blob/master/README.md#diverging_rangeRound). -* Add [*sequential*.range](https://github.com/d3/d3-scale/blob/master/README.md#sequential_range) (for compatibility with d3-axis). -* Add [*sequential*.rangeRound](https://github.com/d3/d3-scale/blob/master/README.md#sequential_rangeRound). -* Add [*sequentialQuantile*.quantiles](https://github.com/d3/d3-scale/blob/master/README.md#sequentialQuantile_quantiles). -* Add [d3.scaleRadial](https://github.com/d3/d3-scale/blob/master/README.md#radial-scales). -* [*diverging*.range](https://github.com/d3/d3-scale/blob/master/README.md#diverging_range) can now be used to set the interpolator. -* [*sequential*.range](https://github.com/d3/d3-scale/blob/master/README.md#sequential_range) can now be used to set the interpolator. -* [d3.scaleDiverging](https://github.com/d3/d3-scale/blob/master/README.md#diverging-scales) can now accept a range array in place of an interpolator. -* [d3.scaleSequential](https://github.com/d3/d3-scale/blob/master/README.md#sequential-scales) can now accept a range array in place of an interpolator. -* Fix [*continuous*.nice](https://github.com/d3/d3-scale/blob/master/README.md#continuous_nice) to ensure that niced domains always span ticks. -* Fix [*log*.ticks](https://github.com/d3/d3-scale/blob/master/README.md#log_ticks) for small domains. -* Fix [*log*.ticks](https://github.com/d3/d3-scale/blob/master/README.md#log_ticks) for small domains. #44 -* Fix [*scale*.clamp](https://github.com/d3/d3-scale/blob/master/README.md#continuous_clamp) for [sequential quantile scales](https://github.com/d3/d3-scale/blob/master/README.md#scaleSequentialQuantile). Thanks, @Fil! -* Fix [*scale*.clamp](https://github.com/d3/d3-scale/blob/master/README.md#continuous_clamp) for continuous scales with more domain values than range values. -* Fix [diverging scales](https://github.com/d3/d3-scale/blob/master/README.md#diverging-scales) with descending domains. -* Remove deprecated *step* argument from [*time*.ticks](https://github.com/d3/d3-scale/blob/master/README.md#time_ticks) and [*time*.nice](https://github.com/d3/d3-scale/blob/master/README.md#time_nice). - -### d3-selection - -* Add [*selection*.selectChild](https://github.com/d3/d3-selection/blob/master/README.md#selection_selectChild). -* Add [*selection*.selectChildren](https://github.com/d3/d3-selection/blob/master/README.md#selection_selectChildren). -* Add [d3.pointer](https://github.com/d3/d3-selection/blob/master/README.md#pointer). -* Add [d3.pointers](https://github.com/d3/d3-selection/blob/master/README.md#pointers). -* Add *selection*[Symbol.iterator]; selections are now iterable! -* Accept iterables with [*selection*.data](https://github.com/d3/d3-selection/blob/master/README.md#selection_data). -* Accept iterables with [d3.selectAll](https://github.com/d3/d3-selection/blob/master/README.md#selectAll). -* Change [*selection*.on](https://github.com/d3/d3-selection/blob/master/README.md#selection_on) to pass the *event* directly to listeners. -* Remove index and group from *selection*.on listeners! -* Remove d3.event! -* Remove d3.mouse. -* Remove d3.touch. -* Remove d3.touches. -* Remove d3.customEvent. -* Remove d3.clientPoint. -* Remove d3.sourceEvent. -* Fix *selection*.merge(*transition*) to error. - -For an overview of changes, see https://observablehq.com/@d3/d3-selection-2-0. - -### d3-shape - -* Accept iterables. -* Add [d3.line](https://github.com/d3/d3-shape/blob/master/README.md#line)(*x*, *y*) shorthand. -* Add [d3.area](https://github.com/d3/d3-shape/blob/master/README.md#area)(*x*, *y0*, *y1*) shorthand. -* Add [d3.symbol](https://github.com/d3/d3-shape/blob/master/README.md#symbol)(*type*, *size*) shorthand. - -### d3-time-format - -* Add ISO 8601 “week year†(`%G` and `%g`). - -### d3-timer - -* Fix [*interval*.restart](https://github.com/d3/d3-timer/blob/master/README.md#timer_restart) to restart as an interval. - -### d3-transition - -* Add [*transition*.easeVarying](https://github.com/d3/d3-transition/blob/master/README.md#transition_easeVarying). -* Add *transition*[Symbol.iterator]; transitions are now iterable. -* Fix [*selection*.transition](https://github.com/d3/d3-transition/blob/master/README.md#selection_transition) to error if the named transition to inherit is not found.k -* Fix [*transition*.end](https://github.com/d3/d3-transition/blob/master/README.md#transition_end) to resolve immediately if the selection is empty. - -### d3-zoom - -* Add [*zoom*.tapDistance](https://github.com/d3/d3-zoom/blob/master/README.md#zoom_tapDistance). -* Change [*zoom*.on](https://github.com/d3/d3-zoom/blob/master/README.md#zoom_on) to pass the *event* directly to listeners. -* Change the default [*zoom*.filter](https://github.com/d3/d3-zoom/blob/master/README.md#zoom_filter) to observe *wheel* events if the control key is pressed. -* Change the default [*zoom*.wheelDelta](ttps://github.com/d3/d3-zoom/blob/master/README.md#zoom_wheelDelta) to go faster if the control key is pressed. -* Don‘t set touch-action: none. -* Upgrade to [d3-selection 2](https://observablehq.com/@d3/d3-selection-2-0). - -### Breaking Changes - -D3 6.0 introduces several non-backwards-compatible changes. - -* Remove [d3.event](https://observablehq.com/d/f91cccf0cad5e9cb#events). -* Change [*selection*.on](https://observablehq.com/d/f91cccf0cad5e9cb#events) to pass the *event* directly to listeners. -* Change [*transition*.on](https://observablehq.com/d/f91cccf0cad5e9cb#events) to pass the *event* directly to listeners. -* Change [*brush*.on](https://observablehq.com/d/f91cccf0cad5e9cb#event_brush) to pass the *event* directly to listeners. -* Change [*drag*.on](https://observablehq.com/d/f91cccf0cad5e9cb#event_drag) to pass the *event* directly to listeners. -* Change [*zoom*.on](https://observablehq.com/d/f91cccf0cad5e9cb#event_zoom) to pass the *event* directly to listeners. -* Remove d3.mouse; use [d3.pointer](https://observablehq.com/d/f91cccf0cad5e9cb#pointer). -* Remove d3.touch; use [d3.pointer](https://observablehq.com/d/f91cccf0cad5e9cb#pointer). -* Remove d3.touches; use [d3.pointers](https://observablehq.com/d/f91cccf0cad5e9cb#pointer). -* Remove d3.clientPoint; use [d3.pointer](https://observablehq.com/d/f91cccf0cad5e9cb#pointer). -* Remove d3.voronoi; use [d3.Delaunay](https://observablehq.com/d/f91cccf0cad5e9cb#delaunay). -* Remove d3.nest; use [d3.group](https://observablehq.com/d/f91cccf0cad5e9cb#group) and [d3.rollup](https://observablehq.com/d/f91cccf0cad5e9cb#group). -* Remove d3.map; use [Map](https://observablehq.com/d/f91cccf0cad5e9cb#collection). -* Remove d3.set; use [Set](https://observablehq.com/d/f91cccf0cad5e9cb#collection). -* Remove d3.keys; use [Object.keys](https://observablehq.com/d/f91cccf0cad5e9cb#collection). -* Remove d3.values; use [Object.values](https://observablehq.com/d/f91cccf0cad5e9cb#collection). -* Remove d3.entries; use [Object.entries](https://observablehq.com/d/f91cccf0cad5e9cb#collection). -* Rename d3.histogram to [d3.bin](https://observablehq.com/d/f91cccf0cad5e9cb#bin). -* Rename d3.scan to [d3.leastIndex](https://observablehq.com/d/f91cccf0cad5e9cb#leastIndex). -* Change [d3.interpolateTransformCss](https://observablehq.com/d/f91cccf0cad5e9cb#interpolateTransformCss) to require absolute units. -* Change [d3.format](https://observablehq.com/d/f91cccf0cad5e9cb#minus) to default to the minus sign instead of hyphen-minus for negative values. - -D3 now requires a browser that supports [ES2015](http://www.ecma-international.org/ecma-262/6.0/). For older browsers, you must bring your own transpiler. - -Lastly, support for [Bower](https://bower.io) has been dropped; D3 is now exclusively published to npm and GitHub. - -See our [migration guide](https://observablehq.com/d/f91cccf0cad5e9cb) for help upgrading. - -# Changes in D3 5.0 - -[Released March 22, 2018.](https://github.com/d3/d3/releases/tag/v5.0.0) - -D3 5.0 introduces only a few non-backwards-compatible changes. - -D3 now uses [Promises](https://developer.mozilla.org/docs/Web/JavaScript/Guide/Using_promises) instead of asynchronous callbacks to load data. Promises simplify the structure of asynchronous code, especially in modern browsers that support [async and await](https://javascript.info/async-await). (See this [introduction to promises](https://observablehq.com/@observablehq/introduction-to-promises) on [Observable](https://observablehq.com).) For example, to load a CSV file in v4, you might say: - -```js -d3.csv("file.csv", function(error, data) { - if (error) throw error; - console.log(data); -}); -``` - -In v5, using promises: - -```js -d3.csv("file.csv").then(function(data) { - console.log(data); -}); -``` - -Note that you don’t need to rethrow the error—the promise will reject automatically, and you can *promise*.catch if desired. Using await, the code is even simpler: - -```js -const data = await d3.csv("file.csv"); -console.log(data); -``` - -With the adoption of promises, D3 now uses the [Fetch API](https://fetch.spec.whatwg.org/) instead of [XMLHttpRequest](https://developer.mozilla.org/docs/Web/API/XMLHttpRequest): the [d3-request](https://github.com/d3/d3-request) module has been replaced by [d3-fetch](https://github.com/d3/d3-fetch). Fetch supports many powerful new features, such as [streaming responses](https://observablehq.com/@mbostock/streaming-shapefiles). D3 5.0 also deprecates and removes the [d3-queue](https://github.com/d3/d3-queue) module. Use [Promise.all](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise/all) to run a batch of asynchronous tasks in parallel, or a helper library such as [p-queue](https://github.com/sindresorhus/p-queue) to [control concurrency](https://observablehq.com/@mbostock/hello-p-queue). - -D3 no longer provides the d3.schemeCategory20* categorical color schemes. These twenty-color schemes were flawed because their grouped design could falsely imply relationships in the data: a shared hue can imply that the encoded data are part of a group (a super-category), while relative lightness can imply order. Instead, D3 now includes [d3-scale-chromatic](https://github.com/d3/d3-scale-chromatic), which implements excellent schemes from ColorBrewer, including [categorical](https://github.com/d3/d3-scale-chromatic/blob/master/README.md#categorical), [diverging](https://github.com/d3/d3-scale-chromatic/blob/master/README.md#diverging), [sequential single-hue](https://github.com/d3/d3-scale-chromatic/blob/master/README.md#sequential-single-hue) and [sequential multi-hue](https://github.com/d3/d3-scale-chromatic/blob/master/README.md#sequential-multi-hue) schemes. These schemes are available in both discrete and continuous variants. - -D3 now provides implementations of [marching squares](https://observablehq.com/@d3/contours) and [density estimation](https://observablehq.com/@d3/density-contours) via [d3-contour](https://github.com/d3/d3-contour)! There are two new [d3-selection](https://github.com/d3/d3-selection) methods: [*selection*.clone](https://github.com/d3/d3-selection/blob/master/README.md#selection_clone) for inserting clones of the selected nodes, and [d3.create](https://github.com/d3/d3-selection/blob/master/README.md#create) for creating detached elements. [Geographic projections](https://github.com/d3/d3-geo) now support [*projection*.angle](https://github.com/d3/d3-geo/blob/master/README.md#projection_angle), which has enabled several fantastic new [polyhedral projections](https://github.com/d3/d3-geo-polygon) by Philippe Rivière. - -Lastly, D3’s [package.json](https://github.com/d3/d3/blob/master/package.json) no longer pins exact versions of the dependent D3 modules. This fixes an issue with [duplicate installs](https://github.com/d3/d3/issues/3256) of D3 modules. - -# Changes in D3 4.0 - -[Released June 28, 2016.](https://github.com/d3/d3/releases/tag/v4.0.0) - -D3 4.0 is modular. Instead of one library, D3 is now [many small libraries](#table-of-contents) that are designed to work together. You can pick and choose which parts to use as you see fit. Each library is maintained in its own repository, allowing decentralized ownership and independent release cycles. The default bundle combines about thirty of these microlibraries. - -```html -<script src="https://d3js.org/d3.v4.js"></script> -``` - -As before, you can load optional plugins on top of the default bundle, such as [ColorBrewer scales](https://github.com/d3/d3-scale-chromatic): - -```html -<script src="https://d3js.org/d3.v4.js"></script> -<script src="https://d3js.org/d3-scale-chromatic.v0.3.js"></script> -``` - -You are not required to use the default bundle! If you’re just using [d3-selection](https://github.com/d3/d3-selection), use it as a standalone library. Like the default bundle, you can load D3 microlibraries using vanilla script tags or RequireJS (great for HTTP/2!): - -```html -<script src="https://d3js.org/d3-selection.v1.js"></script> -``` - -You can also `cat` D3 microlibraries into a custom bundle, or use tools such as [Webpack](https://webpack.github.io/) and [Rollup](http://rollupjs.org/) to create [optimized bundles](https://bl.ocks.org/mbostock/bb09af4c39c79cffcde4). Custom bundles are great for applications that use a subset of D3’s features; for example, a React chart library might use D3 for scales and shapes, and React to manipulate the DOM. The D3 microlibraries are written as [ES6 modules](http://www.2ality.com/2014/09/es6-modules-final.html), and Rollup lets you pick at the symbol level to produce smaller bundles. - -Small files are nice, but modularity is also about making D3 more *fun*. Microlibraries are easier to understand, develop and test. They make it easier for new people to get involved and contribute. They reduce the distinction between a “core module†and a “pluginâ€, and increase the pace of development in D3 features. - -If you don’t care about modularity, you can mostly ignore this change and keep using the default bundle. However, there is one unavoidable consequence of adopting ES6 modules: every symbol in D3 4.0 now shares a flat namespace rather than the nested one of D3 3.x. For example, d3.scale.linear is now d3.scaleLinear, and d3.layout.treemap is now d3.treemap. The adoption of ES6 modules also means that D3 is now written exclusively in [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode) and has better readability. And there have been many other significant improvements to D3’s features! (Nearly all of the code from D3 3.x has been rewritten.) These changes are covered below. - -### Other Global Changes - -The default [UMD bundle](https://github.com/umdjs/umd) is now [anonymous](https://github.com/requirejs/requirejs/wiki/Updating-existing-libraries#register-as-an-anonymous-module-). No `d3` global is exported if AMD or CommonJS is detected. In a vanilla environment, the D3 microlibraries share the `d3` global, even if you load them independently; thus, code you write is the same whether or not you use the default bundle. (See [Let’s Make a (D3) Plugin](https://bost.ocks.org/mike/d3-plugin/) for more.) The generated bundle is no longer stored in the Git repository; Bower has been repointed to [d3-bower](https://github.com/mbostock-bower/d3-bower), and you can find the generated files on [npm](https://unpkg.com/d3) or attached to the [latest release](https://github.com/d3/d3/releases/latest). The non-minified default bundle is no longer mangled, making it more readable and preserving inline comments. - -To the consternation of some users, 3.x employed Unicode variable names such as λ, φ, Ï„ and Ï€ for a concise representation of mathematical operations. A downside of this approach was that a SyntaxError would occur if you loaded the non-minified D3 using ISO-8859-1 instead of UTF-8. 3.x also used Unicode string literals, such as the SI-prefix µ for 1e-6. 4.0 uses only ASCII variable names and ASCII string literals (see [rollup-plugin-ascii](https://github.com/mbostock/rollup-plugin-ascii)), avoiding encoding problems. - -### Table of Contents - -* [Arrays](#arrays-d3-array) -* [Axes](#axes-d3-axis) -* [Brushes](#brushes-d3-brush) -* [Chords](#chords-d3-chord) -* [Collections](#collections-d3-collection) -* [Colors](#colors-d3-color) -* [Dispatches](#dispatches-d3-dispatch) -* [Dragging](#dragging-d3-drag) -* [Delimiter-Separated Values](#delimiter-separated-values-d3-dsv) -* [Easings](#easings-d3-ease) -* [Forces](#forces-d3-force) -* [Number Formats](#number-formats-d3-format) -* [Geographies](#geographies-d3-geo) -* [Hierarchies](#hierarchies-d3-hierarchy) -* [Internals](#internals) -* [Interpolators](#interpolators-d3-interpolate) -* [Paths](#paths-d3-path) -* [Polygons](#polygons-d3-polygon) -* [Quadtrees](#quadtrees-d3-quadtree) -* [Queues](#queues-d3-queue) -* [Random Numbers](#random-numbers-d3-random) -* [Requests](#requests-d3-request) -* [Scales](#scales-d3-scale) -* [Selections](#selections-d3-selection) -* [Shapes](#shapes-d3-shape) -* [Time Formats](#time-formats-d3-time-format) -* [Time Intervals](#time-intervals-d3-time) -* [Timers](#timers-d3-timer) -* [Transitions](#transitions-d3-transition) -* [Voronoi Diagrams](#voronoi-diagrams-d3-voronoi) -* [Zooming](#zooming-d3-zoom) - -## [Arrays (d3-array)](https://github.com/d3/d3-array/blob/master/README.md) - -The new [d3.scan](https://github.com/d3/d3-array/blob/master/README.md#scan) method performs a linear scan of an array, returning the index of the least element according to the specified comparator. This is similar to [d3.min](https://github.com/d3/d3-array/blob/master/README.md#min) and [d3.max](https://github.com/d3/d3-array/blob/master/README.md#max), except you can use it to find the position of an extreme element, rather than just calculate an extreme value. - -```js -var data = [ - {name: "Alice", value: 2}, - {name: "Bob", value: 3}, - {name: "Carol", value: 1}, - {name: "Dwayne", value: 5} -]; - -var i = d3.scan(data, function(a, b) { return a.value - b.value; }); // 2 -data[i]; // {name: "Carol", value: 1} -``` - -The new [d3.ticks](https://github.com/d3/d3-array/blob/master/README.md#ticks) and [d3.tickStep](https://github.com/d3/d3-array/blob/master/README.md#tickStep) methods are useful for generating human-readable numeric ticks. These methods are a low-level alternative to [*continuous*.ticks](https://github.com/d3/d3-scale/blob/master/README.md#continuous_ticks) from [d3-scale](https://github.com/d3/d3-scale). The new implementation is also more accurate, returning the optimal number of ticks as measured by relative error. - -```js -var ticks = d3.ticks(0, 10, 5); // [0, 2, 4, 6, 8, 10] -``` - -The [d3.range](https://github.com/d3/d3-array/blob/master/README.md#range) method no longer makes an elaborate attempt to avoid floating-point error when *step* is not an integer. The returned values are strictly defined as *start* + *i* \* *step*, where *i* is an integer. (Learn more about [floating point math](http://0.30000000000000004.com/).) d3.range returns the empty array for infinite ranges, rather than throwing an error. - -The method signature for optional accessors has been changed to be more consistent with array methods such as [*array*.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach): the accessor is passed the current element (*d*), the index (*i*), and the array (*data*), with *this* as undefined. This affects [d3.min](https://github.com/d3/d3-array/blob/master/README.md#min), [d3.max](https://github.com/d3/d3-array/blob/master/README.md#max), [d3.extent](https://github.com/d3/d3-array/blob/master/README.md#extent), [d3.sum](https://github.com/d3/d3-array/blob/master/README.md#sum), [d3.mean](https://github.com/d3/d3-array/blob/master/README.md#mean), [d3.median](https://github.com/d3/d3-array/blob/master/README.md#median), [d3.quantile](https://github.com/d3/d3-array/blob/master/README.md#quantile), [d3.variance](https://github.com/d3/d3-array/blob/master/README.md#variance) and [d3.deviation](https://github.com/d3/d3-array/blob/master/README.md#deviation). The [d3.quantile](https://github.com/d3/d3-array/blob/master/README.md#quantile) method previously did not take an accessor. Some methods with optional arguments now treat those arguments as missing if they are null or undefined, rather than strictly checking arguments.length. - -The new [d3.histogram](https://github.com/d3/d3-array/blob/master/README.md#histograms) API replaces d3.layout.histogram. Rather than exposing *bin*.x and *bin*.dx on each returned bin, the histogram exposes *bin*.x0 and *bin*.x1, guaranteeing that *bin*.x0 is exactly equal to *bin*.x1 on the preceding bin. The “frequency†and “probability†modes are no longer supported; each bin is simply an array of elements from the input data, so *bin*.length is equal to D3 3.x’s *bin*.y in frequency mode. To compute a probability distribution, divide the number of elements in each bin by the total number of elements. - -The *histogram*.range method has been renamed [*histogram*.domain](https://github.com/d3/d3-array/blob/master/README.md#histogram_domain) for consistency with scales. The *histogram*.bins method has been renamed [*histogram*.thresholds](https://github.com/d3/d3-array/blob/master/README.md#histogram_thresholds), and no longer accepts an upper value: *n* thresholds will produce *n* + 1 bins. If you specify a desired number of bins rather than thresholds, d3.histogram now uses [d3.ticks](https://github.com/d3/d3-array/blob/master/README.md#ticks) to compute nice bin thresholds. In addition to the default Sturges’ formula, D3 now implements the [Freedman-Diaconis rule](https://github.com/d3/d3-array/blob/master/README.md#thresholdFreedmanDiaconis) and [Scott’s normal reference rule](https://github.com/d3/d3-array/blob/master/README.md#thresholdScott). - -## [Axes (d3-axis)](https://github.com/d3/d3-axis/blob/master/README.md) - -To render axes properly in D3 3.x, you needed to style them: - -```html -<style> - -.axis path, -.axis line { - fill: none; - stroke: #000; - shape-rendering: crispEdges; -} - -.axis text { - font: 10px sans-serif; -} - -</style> -<script> - -d3.select(".axis") - .call(d3.svg.axis() - .scale(x) - .orient("bottom")); - -</script> -``` - -If you didn’t, you saw this: - -<img src="https://raw.githubusercontent.com/d3/d3/master/img/axis-v3.png" width="100%" height="105"> - -D3 4.0 provides default styles and shorter syntax. In place of d3.svg.axis and *axis*.orient, D3 4.0 now provides four constructors for each orientation: [d3.axisTop](https://github.com/d3/d3-axis/blob/master/README.md#axisTop), [d3.axisRight](https://github.com/d3/d3-axis/blob/master/README.md#axisRight), [d3.axisBottom](https://github.com/d3/d3-axis/blob/master/README.md#axisBottom), [d3.axisLeft](https://github.com/d3/d3-axis/blob/master/README.md#axisLeft). These constructors accept a scale, so you can reduce all of the above to: - -```html -<script> - -d3.select(".axis") - .call(d3.axisBottom(x)); - -</script> -``` - -And get this: - -<img src="https://raw.githubusercontent.com/d3/d3/master/img/axis-v4.png" width="100%" height="105"> - -As before, you can customize the axis appearance either by applying stylesheets or by modifying the axis elements. The default appearance has been changed slightly to offset the axis by a half-pixel; this fixes a crisp-edges rendering issue on Safari where the axis would be drawn two-pixels thick. - -There’s now an [*axis*.tickArguments](https://github.com/d3/d3-axis/blob/master/README.md#axis_tickArguments) method, as an alternative to [*axis*.ticks](https://github.com/d3/d3-axis/blob/master/README.md#axis_ticks) that also allows the axis tick arguments to be inspected. The [*axis*.tickSize](https://github.com/d3/d3-axis/blob/master/README.md#axis_tickSize) method has been changed to only allow a single argument when setting the tick size. The *axis*.innerTickSize and *axis*.outerTickSize methods have been renamed [*axis*.tickSizeInner](https://github.com/d3/d3-axis/blob/master/README.md#axis_tickSizeInner) and [*axis*.tickSizeOuter](https://github.com/d3/d3-axis/blob/master/README.md#axis_tickSizeOuter), respectively. - -## [Brushes (d3-brush)](https://github.com/d3/d3-brush/blob/master/README.md) - -Replacing d3.svg.brush, there are now three classes of brush for brushing along the *x*-dimension, the *y*-dimension, or both: [d3.brushX](https://github.com/d3/d3-brush/blob/master/README.md#brushX), [d3.brushY](https://github.com/d3/d3-brush/blob/master/README.md#brushY), [d3.brush](https://github.com/d3/d3-brush/blob/master/README.md#brush). Brushes are no longer dependent on [scales](#scales-d3-scale); instead, each brush defines a selection in screen coordinates. This selection can be [inverted](https://github.com/d3/d3-scale/blob/master/README.md#continuous_invert) if you want to compute the corresponding data domain. And rather than rely on the scales’ ranges to determine the brushable area, there is now a [*brush*.extent](https://github.com/d3/d3-brush/blob/master/README.md#brush_extent) method for setting it. If you do not set the brush extent, it defaults to the full extent of the owner SVG element. The *brush*.clamp method has also been eliminated; brushing is always restricted to the brushable area defined by the brush extent. - -Brushes no longer store the active brush selection (*i.e.*, the highlighted region; the brush’s position) internally. The brush’s position is now stored on any elements to which the brush has been applied. The brush’s position is available as *event*.selection within a brush event or by calling [d3.brushSelection](https://github.com/d3/d3-brush/blob/master/README.md#brushSelection) on a given *element*. To move the brush programmatically, use [*brush*.move](https://github.com/d3/d3-brush/blob/master/README.md#brush_move) with a given [selection](#selections-d3-selection) or [transition](#transitions-d3-transition); see the [brush snapping example](https://bl.ocks.org/mbostock/6232537). The *brush*.event method has been removed. - -Brush interaction has been improved. By default, brushes now ignore right-clicks intended for the context menu; you can change this behavior using [*brush*.filter](https://github.com/d3/d3-brush/blob/master/README.md#brush_filter). Brushes also ignore emulated mouse events on iOS. Holding down SHIFT (⇧) while brushing locks the *x*- or *y*-position of the brush. Holding down META (⌘) while clicking and dragging starts a new selection, rather than translating the existing selection. - -The default appearance of the brush has also been improved and slightly simplified. Previously it was necessary to apply styles to the brush to give it a reasonable appearance, such as: - -```css -.brush .extent { - stroke: #fff; - fill-opacity: .125; - shape-rendering: crispEdges; -} -``` - -These styles are now applied by default as attributes; if you want to customize the brush appearance, you can still apply external styles or modify the brush elements. (D3 4.0 features a similar improvement to [axes](#axes-d3-axis).) A new [*brush*.handleSize](https://github.com/d3/d3-brush/blob/master/README.md#brush_handleSize) method lets you override the brush handle size; it defaults to six pixels. - -The brush now consumes handled events, making it easier to combine with other interactive behaviors such as [dragging](#dragging-d3-drag) and [zooming](#zooming-d3-zoom). The *brushstart* and *brushend* events have been renamed to *start* and *end*, respectively. The brush event no longer reports a *event*.mode to distinguish between resizing and dragging the brush. - -## [Chords (d3-chord)](https://github.com/d3/d3-chord/blob/master/README.md) - -Pursuant to the great namespace flattening: - -* d3.layout.chord ↦ [d3.chord](https://github.com/d3/d3-chord/blob/master/README.md#chord) -* d3.svg.chord ↦ [d3.ribbon](https://github.com/d3/d3-chord/blob/master/README.md#ribbon) - -For consistency with [*arc*.padAngle](https://github.com/d3/d3-shape/blob/master/README.md#arc_padAngle), *chord*.padding has also been renamed to [*ribbon*.padAngle](https://github.com/d3/d3-chord/blob/master/README.md#ribbon_padAngle). A new [*ribbon*.context](https://github.com/d3/d3-chord/blob/master/README.md#ribbon_context) method lets you render chord diagrams to Canvas! See also [d3-path](#paths-d3-path). - -## [Collections (d3-collection)](https://github.com/d3/d3-collection/blob/master/README.md) - -The [d3.set](https://github.com/d3/d3-collection/blob/master/README.md#set) constructor now accepts an existing set for making a copy. If you pass an array to d3.set, you can also pass a value accessor. This accessor takes the standard arguments: the current element (*d*), the index (*i*), and the array (*data*), with *this* undefined. For example: - -```js -var yields = [ - {yield: 22.13333, variety: "Manchuria", year: 1932, site: "Grand Rapids"}, - {yield: 26.76667, variety: "Peatland", year: 1932, site: "Grand Rapids"}, - {yield: 28.10000, variety: "No. 462", year: 1931, site: "Duluth"}, - {yield: 38.50000, variety: "Svansota", year: 1932, site: "Waseca"}, - {yield: 40.46667, variety: "Svansota", year: 1931, site: "Crookston"}, - {yield: 36.03333, variety: "Peatland", year: 1932, site: "Waseca"}, - {yield: 34.46667, variety: "Wisconsin No. 38", year: 1931, site: "Grand Rapids"} -]; - -var sites = d3.set(yields, function(d) { return d.site; }); // Grand Rapids, Duluth, Waseca, Crookston -``` - -The [d3.map](https://github.com/d3/d3-collection/blob/master/README.md#map) constructor also follows the standard array accessor argument pattern. - -The *map*.forEach and *set*.forEach methods have been renamed to [*map*.each](https://github.com/d3/d3-collection/blob/master/README.md#map_each) and [*set*.each](https://github.com/d3/d3-collection/blob/master/README.md#set_each) respectively. The order of arguments for *map*.each has also been changed to *value*, *key* and *map*, while the order of arguments for *set*.each is now *value*, *value* and *set*. This is closer to ES6 [*map*.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/forEach) and [*set*.forEach](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/forEach). Also like ES6 Map and Set, *map*.set and *set*.add now return the current collection (rather than the added value) to facilitate method chaining. New [*map*.clear](https://github.com/d3/d3-collection/blob/master/README.md#map_clear) and [*set*.clear](https://github.com/d3/d3-collection/blob/master/README.md#set_clear) methods can be used to empty collections. - -The [*nest*.map](https://github.com/d3/d3-collection/blob/master/README.md#nest_map) method now always returns a d3.map instance. For a plain object, use [*nest*.object](https://github.com/d3/d3-collection/blob/master/README.md#nest_object) instead. When used in conjunction with [*nest*.rollup](https://github.com/d3/d3-collection/blob/master/README.md#nest_rollup), [*nest*.entries](https://github.com/d3/d3-collection/blob/master/README.md#nest_entries) now returns {key, value} objects for the leaf entries, instead of {key, values}. This makes *nest*.rollup easier to use in conjunction with [hierarchies](#hierarchies-d3-hierarchy), as in this [Nest Treemap example](https://bl.ocks.org/mbostock/2838bf53e0e65f369f476afd653663a2). - -## [Colors (d3-color)](https://github.com/d3/d3-color/blob/master/README.md) - -All colors now have opacity exposed as *color*.opacity, which is a number in [0, 1]. You can pass an optional opacity argument to the color space constructors [d3.rgb](https://github.com/d3/d3-color/blob/master/README.md#rgb), [d3.hsl](https://github.com/d3/d3-color/blob/master/README.md#hsl), [d3.lab](https://github.com/d3/d3-color/blob/master/README.md#lab), [d3.hcl](https://github.com/d3/d3-color/blob/master/README.md#hcl) or [d3.cubehelix](https://github.com/d3/d3-color/blob/master/README.md#cubehelix). - -You can now parse rgba(…) and hsla(…) CSS color specifiers or the string “transparent†using [d3.color](https://github.com/d3/d3-color/blob/master/README.md#color). The “transparent†color is defined as an RGB color with zero opacity and undefined red, green and blue channels; this differs slightly from CSS which defines it as transparent black, but is useful for simplifying color interpolation logic where either the starting or ending color has undefined channels. The [*color*.toString](https://github.com/d3/d3-color/blob/master/README.md#color_toString) method now likewise returns an rgb(…) or rgba(…) string with integer channel values, not the hexadecimal RGB format, consistent with CSS computed values. This improves performance by short-circuiting transitions when the element’s starting style matches its ending style. - -The new [d3.color](https://github.com/d3/d3-color/blob/master/README.md#color) method is the primary method for parsing colors: it returns a d3.color instance in the appropriate color space, or null if the CSS color specifier is invalid. For example: - -```js -var red = d3.color("hsl(0, 80%, 50%)"); // {h: 0, l: 0.5, s: 0.8, opacity: 1} -``` - -The parsing implementation is now more robust. For example, you can no longer mix integers and percentages in rgb(…), and it correctly handles whitespace, decimal points, number signs, and other edge cases. The color space constructors d3.rgb, d3.hsl, d3.lab, d3.hcl and d3.cubehelix now always return a copy of the input color, converted to the corresponding color space. While [*color*.rgb](https://github.com/d3/d3-color/blob/master/README.md#color_rgb) remains, *rgb*.hsl has been removed; use d3.hsl to convert a color to the RGB color space. - -The RGB color space no longer greedily quantizes and clamps channel values when creating colors, improving accuracy in color space conversion. Quantization and clamping now occurs in *color*.toString when formatting a color for display. You can use the new [*color*.displayable](https://github.com/d3/d3-color/blob/master/README.md#color_displayable) to test whether a color is [out-of-gamut](https://en.wikipedia.org/wiki/Gamut). - -The [*rgb*.brighter](https://github.com/d3/d3-color/blob/master/README.md#rgb_brighter) method no longer special-cases black. This is a multiplicative operator, defining a new color *r*′, *g*′, *b*′ where *r*′ = *r* × *pow*(0.7, *k*), *g*′ = *g* × *pow*(0.7, *k*) and *b*′ = *b* × *pow*(0.7, *k*); a brighter black is still black. - -There’s a new [d3.cubehelix](https://github.com/d3/d3-color/blob/master/README.md#cubehelix) color space, generalizing Dave Green’s color scheme! (See also [d3.interpolateCubehelixDefault](https://github.com/d3/d3-scale/blob/master/README.md#interpolateCubehelixDefault) from [d3-scale](#scales-d3-scale).) You can continue to define your own custom color spaces, too; see [d3-hsv](https://github.com/d3/d3-hsv) for an example. - -## [Dispatches (d3-dispatch)](https://github.com/d3/d3-dispatch/blob/master/README.md) - -Rather than decorating the *dispatch* object with each event type, the dispatch object now exposes generic [*dispatch*.call](https://github.com/d3/d3-dispatch/blob/master/README.md#dispatch_call) and [*dispatch*.apply](https://github.com/d3/d3-dispatch/blob/master/README.md#dispatch_apply) methods which take the *type* string as the first argument. For example, in D3 3.x, you might say: - -```js -dispatcher.foo.call(that, "Hello, Foo!"); -``` - -To dispatch a *foo* event in D3 4.0, you’d say: - -```js -dispatcher.call("foo", that, "Hello, Foo!"); -``` - -The [*dispatch*.on](https://github.com/d3/d3-dispatch/blob/master/README.md#dispatch_on) method now accepts multiple typenames, allowing you to add or remove listeners for multiple events simultaneously. For example, to send both *foo* and *bar* events to the same listener: - -```js -dispatcher.on("foo bar", function(message) { - console.log(message); -}); -``` - -This matches the new behavior of [*selection*.on](https://github.com/d3/d3-selection/blob/master/README.md#selection_on) in [d3-selection](#selections-d3-selection). The *dispatch*.on method now validates that the specifier *listener* is a function, rather than throwing an error in the future. - -The new implementation d3.dispatch is faster, using fewer closures to improve performance. There’s also a new [*dispatch*.copy](https://github.com/d3/d3-dispatch/blob/master/README.md#dispatch_copy) method for making a copy of a dispatcher; this is used by [d3-transition](#transitions-d3-transition) to improve the performance of transitions in the common case where all elements in a transition have the same transition event listeners. - -## [Dragging (d3-drag)](https://github.com/d3/d3-drag/blob/master/README.md) - -The drag behavior d3.behavior.drag has been renamed to d3.drag. The *drag*.origin method has been replaced by [*drag*.subject](https://github.com/d3/d3-drag/blob/master/README.md#drag_subject), which allows you to define the thing being dragged at the start of a drag gesture. This is particularly useful with Canvas, where draggable objects typically share a Canvas element (as opposed to SVG, where draggable objects typically have distinct DOM elements); see the [circle dragging example](https://bl.ocks.org/mbostock/444757cc9f0fde320a5f469cd36860f4). - -A new [*drag*.container](https://github.com/d3/d3-drag/blob/master/README.md#drag_container) method lets you override the parent element that defines the drag gesture coordinate system. This defaults to the parent node of the element to which the drag behavior was applied. For dragging on Canvas elements, you probably want to use the Canvas element as the container. - -[Drag events](https://github.com/d3/d3-drag/blob/master/README.md#drag-events) now expose an [*event*.on](https://github.com/d3/d3-drag/blob/master/README.md#event_on) method for registering temporary listeners for duration of the current drag gesture; these listeners can capture state for the current gesture, such as the thing being dragged. A new *event*.active property lets you detect whether multiple (multitouch) drag gestures are active concurrently. The *dragstart* and *dragend* events have been renamed to *start* and *end*. By default, drag behaviors now ignore right-clicks intended for the context menu; use [*drag*.filter](https://github.com/d3/d3-drag/blob/master/README.md#drag_filter) to control which events are ignored. The drag behavior also ignores emulated mouse events on iOS. The drag behavior now consumes handled events, making it easier to combine with other interactive behaviors such as [zooming](#zooming-d3-zoom). - -The new [d3.dragEnable](https://github.com/d3/d3-drag/blob/master/README.md#dragEnable) and [d3.dragDisable](https://github.com/d3/d3-drag/blob/master/README.md#dragDisable) methods provide a low-level API for implementing drag gestures across browsers and devices. These methods are also used by other D3 components, such as the [brush](#brushes-d3-brush). - -## [Delimiter-Separated Values (d3-dsv)](https://github.com/d3/d3-dsv/blob/master/README.md) - -Pursuant to the great namespace flattening, various CSV and TSV methods have new names: - -* d3.csv.parse ↦ [d3.csvParse](https://github.com/d3/d3-dsv/blob/master/README.md#csvParse) -* d3.csv.parseRows ↦ [d3.csvParseRows](https://github.com/d3/d3-dsv/blob/master/README.md#csvParseRows) -* d3.csv.format ↦ [d3.csvFormat](https://github.com/d3/d3-dsv/blob/master/README.md#csvFormat) -* d3.csv.formatRows ↦ [d3.csvFormatRows](https://github.com/d3/d3-dsv/blob/master/README.md#csvFormatRows) -* d3.tsv.parse ↦ [d3.tsvParse](https://github.com/d3/d3-dsv/blob/master/README.md#tsvParse) -* d3.tsv.parseRows ↦ [d3.tsvParseRows](https://github.com/d3/d3-dsv/blob/master/README.md#tsvParseRows) -* d3.tsv.format ↦ [d3.tsvFormat](https://github.com/d3/d3-dsv/blob/master/README.md#tsvFormat) -* d3.tsv.formatRows ↦ [d3.tsvFormatRows](https://github.com/d3/d3-dsv/blob/master/README.md#tsvFormatRows) - -The [d3.csv](https://github.com/d3/d3-request/blob/master/README.md#csv) and [d3.tsv](https://github.com/d3/d3-request/blob/master/README.md#tsv) methods for loading files of the corresponding formats have not been renamed, however! Those are defined in [d3-request](#requests-d3-request).There’s no longer a d3.dsv method, which served the triple purpose of defining a DSV formatter, a DSV parser and a DSV requestor; instead, there’s just [d3.dsvFormat](https://github.com/d3/d3-dsv/blob/master/README.md#dsvFormat) which you can use to define a DSV formatter and parser. You can use [*request*.response](https://github.com/d3/d3-request/blob/master/README.md#request_response) to make a request and then parse the response body, or just use [d3.text](https://github.com/d3/d3-request/blob/master/README.md#text). - -The [*dsv*.parse](https://github.com/d3/d3-dsv/blob/master/README.md#dsv_parse) method now exposes the column names and their input order as *data*.columns. For example: - -```js -d3.csv("cars.csv", function(error, data) { - if (error) throw error; - console.log(data.columns); // ["Year", "Make", "Model", "Length"] -}); -``` - -You can likewise pass an optional array of column names to [*dsv*.format](https://github.com/d3/d3-dsv/blob/master/README.md#dsv_format) to format only a subset of columns, or to specify the column order explicitly: - -```js -var string = d3.csvFormat(data, ["Year", "Model", "Length"]); -``` - -The parser is a bit faster and the formatter is a bit more robust: inputs are coerced to strings before formatting, fixing an obscure crash, and deprecated support for falling back to [*dsv*.formatRows](https://github.com/d3/d3-dsv/blob/master/README.md#dsv_formatRows) when the input *data* is an array of arrays has been removed. - -## [Easings (d3-ease)](https://github.com/d3/d3-ease/blob/master/README.md) - -D3 3.x used strings, such as “cubic-in-outâ€, to identify easing methods; these strings could be passed to d3.ease or *transition*.ease. D3 4.0 uses symbols instead, such as [d3.easeCubicInOut](https://github.com/d3/d3-ease/blob/master/README.md#easeCubicInOut). Symbols are simpler and cleaner. They work well with Rollup to produce smaller custom bundles. You can still define your own custom easing function, too, if desired. Here’s the full list of equivalents: - -* linear ↦ [d3.easeLinear](https://github.com/d3/d3-ease/blob/master/README.md#easeLinear)¹ -* linear-in ↦ [d3.easeLinear](https://github.com/d3/d3-ease/blob/master/README.md#easeLinear)¹ -* linear-out ↦ [d3.easeLinear](https://github.com/d3/d3-ease/blob/master/README.md#easeLinear)¹ -* linear-in-out ↦ [d3.easeLinear](https://github.com/d3/d3-ease/blob/master/README.md#easeLinear)¹ -* linear-out-in ↦ [d3.easeLinear](https://github.com/d3/d3-ease/blob/master/README.md#easeLinear)¹ -* poly-in ↦ [d3.easePolyIn](https://github.com/d3/d3-ease/blob/master/README.md#easePolyIn) -* poly-out ↦ [d3.easePolyOut](https://github.com/d3/d3-ease/blob/master/README.md#easePolyOut) -* poly-in-out ↦ [d3.easePolyInOut](https://github.com/d3/d3-ease/blob/master/README.md#easePolyInOut) -* poly-out-in ↦ REMOVED² -* quad-in ↦ [d3.easeQuadIn](https://github.com/d3/d3-ease/blob/master/README.md#easeQuadIn) -* quad-out ↦ [d3.easeQuadOut](https://github.com/d3/d3-ease/blob/master/README.md#easeQuadOut) -* quad-in-out ↦ [d3.easeQuadInOut](https://github.com/d3/d3-ease/blob/master/README.md#easeQuadInOut) -* quad-out-in ↦ REMOVED² -* cubic-in ↦ [d3.easeCubicIn](https://github.com/d3/d3-ease/blob/master/README.md#easeCubicIn) -* cubic-out ↦ [d3.easeCubicOut](https://github.com/d3/d3-ease/blob/master/README.md#easeCubicOut) -* cubic-in-out ↦ [d3.easeCubicInOut](https://github.com/d3/d3-ease/blob/master/README.md#easeCubicInOut) -* cubic-out-in ↦ REMOVED² -* sin-in ↦ [d3.easeSinIn](https://github.com/d3/d3-ease/blob/master/README.md#easeSinIn) -* sin-out ↦ [d3.easeSinOut](https://github.com/d3/d3-ease/blob/master/README.md#easeSinOut) -* sin-in-out ↦ [d3.easeSinInOut](https://github.com/d3/d3-ease/blob/master/README.md#easeSinInOut) -* sin-out-in ↦ REMOVED² -* exp-in ↦ [d3.easeExpIn](https://github.com/d3/d3-ease/blob/master/README.md#easeExpIn) -* exp-out ↦ [d3.easeExpOut](https://github.com/d3/d3-ease/blob/master/README.md#easeExpOut) -* exp-in-out ↦ [d3.easeExpInOut](https://github.com/d3/d3-ease/blob/master/README.md#easeExpInOut) -* exp-out-in ↦ REMOVED² -* circle-in ↦ [d3.easeCircleIn](https://github.com/d3/d3-ease/blob/master/README.md#easeCircleIn) -* circle-out ↦ [d3.easeCircleOut](https://github.com/d3/d3-ease/blob/master/README.md#easeCircleOut) -* circle-in-out ↦ [d3.easeCircleInOut](https://github.com/d3/d3-ease/blob/master/README.md#easeCircleInOut) -* circle-out-in ↦ REMOVED² -* elastic-in ↦ [d3.easeElasticOut](https://github.com/d3/d3-ease/blob/master/README.md#easeElasticOut)² -* elastic-out ↦ [d3.easeElasticIn](https://github.com/d3/d3-ease/blob/master/README.md#easeElasticIn)² -* elastic-in-out ↦ REMOVED² -* elastic-out-in ↦ [d3.easeElasticInOut](https://github.com/d3/d3-ease/blob/master/README.md#easeElasticInOut)² -* back-in ↦ [d3.easeBackIn](https://github.com/d3/d3-ease/blob/master/README.md#easeBackIn) -* back-out ↦ [d3.easeBackOut](https://github.com/d3/d3-ease/blob/master/README.md#easeBackOut) -* back-in-out ↦ [d3.easeBackInOut](https://github.com/d3/d3-ease/blob/master/README.md#easeBackInOut) -* back-out-in ↦ REMOVED² -* bounce-in ↦ [d3.easeBounceOut](https://github.com/d3/d3-ease/blob/master/README.md#easeBounceOut)² -* bounce-out ↦ [d3.easeBounceIn](https://github.com/d3/d3-ease/blob/master/README.md#easeBounceIn)² -* bounce-in-out ↦ REMOVED² -* bounce-out-in ↦ [d3.easeBounceInOut](https://github.com/d3/d3-ease/blob/master/README.md#easeBounceInOut)² - -¹ The -in, -out and -in-out variants of linear easing are identical, so there’s just d3.easeLinear. -<br>² Elastic and bounce easing were inadvertently reversed in 3.x, so 4.0 eliminates -out-in easing! - -For convenience, there are also default aliases for each easing method. For example, [d3.easeCubic](https://github.com/d3/d3-ease/blob/master/README.md#easeCubic) is an alias for [d3.easeCubicInOut](https://github.com/d3/d3-ease/blob/master/README.md#easeCubicInOut). Most default to -in-out; the exceptions are [d3.easeBounce](https://github.com/d3/d3-ease/blob/master/README.md#easeBounce) and [d3.easeElastic](https://github.com/d3/d3-ease/blob/master/README.md#easeElastic), which default to -out. - -Rather than pass optional arguments to d3.ease or *transition*.ease, parameterizable easing functions now have named parameters: [*poly*.exponent](https://github.com/d3/d3-ease/blob/master/README.md#poly_exponent), [*elastic*.amplitude](https://github.com/d3/d3-ease/blob/master/README.md#elastic_amplitude), [*elastic*.period](https://github.com/d3/d3-ease/blob/master/README.md#elastic_period) and [*back*.overshoot](https://github.com/d3/d3-ease/blob/master/README.md#back_overshoot). For example, in D3 3.x you might say: - -```js -var e = d3.ease("elastic-out-in", 1.2); -``` - -The equivalent in D3 4.0 is: - -```js -var e = d3.easeElastic.amplitude(1.2); -``` - -Many of the easing functions have been optimized for performance and accuracy. Several bugs have been fixed, as well, such as the interpretation of the overshoot parameter for back easing, and the period parameter for elastic easing. Also, [d3-transition](#transitions-d3-transition) now explicitly guarantees that the last tick of the transition happens at exactly *t* = 1, avoiding floating point errors in some easing functions. - -There’s now a nice [visual reference](https://github.com/d3/d3-ease/blob/master/README.md) and an [animated reference](https://bl.ocks.org/mbostock/248bac3b8e354a9103c4) to the new easing functions, too! - -## [Forces (d3-force)](https://github.com/d3/d3-force/blob/master/README.md) - -The force layout d3.layout.force has been renamed to d3.forceSimulation. The force simulation now uses [velocity Verlet integration](https://en.wikipedia.org/wiki/Verlet_integration#Velocity_Verlet) rather than position Verlet, tracking the nodes’ positions (*node*.x, *node*.y) and velocities (*node*.vx, *node*.vy) rather than their previous positions (*node*.px, *node*.py). - -Rather than hard-coding a set of built-in forces, the force simulation is now extensible: you specify which forces you want! The approach affords greater flexibility through composition. The new forces are more flexible, too: force parameters can typically be configured per-node or per-link. There are separate positioning forces for [*x*](https://github.com/d3/d3-force/blob/master/README.md#forceX) and [*y*](https://github.com/d3/d3-force/blob/master/README.md#forceY) that replace *force*.gravity; [*x*.x](https://github.com/d3/d3-force/blob/master/README.md#x_x) and [*y*.y](https://github.com/d3/d3-force/blob/master/README.md#y_y) replace *force*.size. The new [link force](https://github.com/d3/d3-force/blob/master/README.md#forceLink) replaces *force*.linkStrength and employs better default heuristics to improve stability. The new [many-body force](https://github.com/d3/d3-force/blob/master/README.md#forceManyBody) replaces *force*.charge and supports a new [minimum-distance parameter](https://github.com/d3/d3-force/blob/master/README.md#manyBody_distanceMin) and performance improvements thanks to 4.0’s [new quadtrees](#quadtrees-d3-quadtree). There are also brand-new forces for [centering nodes](https://github.com/d3/d3-force/blob/master/README.md#forceCenter) and [collision resolution](https://github.com/d3/d3-force/blob/master/README.md#forceCollision). - -The new forces and simulation have been carefully crafted to avoid nondeterminism. Rather than initializing nodes randomly, if the nodes do not have preset positions, they are placed in a phyllotaxis pattern: - -<img alt="Phyllotaxis" src="https://raw.githubusercontent.com/d3/d3-force/master/img/phyllotaxis.png" width="420" height="219"> - -Random jitter is still needed to resolve link, collision and many-body forces if there are coincident nodes, but at least in the common case, the force simulation (and the resulting force-directed graph layout) is now consistent across browsers and reloads. D3 no longer plays dice! - -The force simulation has several new methods for greater control over heating, such as [*simulation*.alphaMin](https://github.com/d3/d3-force/blob/master/README.md#simulation_alphaMin) and [*simulation*.alphaDecay](https://github.com/d3/d3-force/blob/master/README.md#simulation_alphaDecay), and the internal timer. Calling [*simulation*.alpha](https://github.com/d3/d3-force/blob/master/README.md#simulation_alpha) now has no effect on the internal timer, which is controlled independently via [*simulation*.stop](https://github.com/d3/d3-force/blob/master/README.md#simulation_stop) and [*simulation*.restart](https://github.com/d3/d3-force/blob/master/README.md#simulation_restart). The force layout’s internal timer now starts automatically on creation, removing *force*.start. As in 3.x, you can advance the simulation manually using [*simulation*.tick](https://github.com/d3/d3-force/blob/master/README.md#simulation_tick). The *force*.friction parameter is replaced by *simulation*.velocityDecay. A new [*simulation*.alphaTarget](https://github.com/d3/d3-force/blob/master/README.md#simulation_alphaTarget) method allows you to set the desired alpha (temperature) of the simulation, such that the simulation can be smoothly reheated during interaction, and then smoothly cooled again. This improves the stability of the graph during interaction. - -The force layout no longer depends on the [drag behavior](#dragging-d3-drag), though you can certainly create [draggable force-directed graphs](https://bl.ocks.org/mbostock/ad70335eeef6d167bc36fd3c04378048)! Set *node*.fx and *node*.fy to fix a node’s position. As an alternative to a [Voronoi](#voronoi-d3-voronoi) SVG overlay, you can now use [*simulation*.find](https://github.com/d3/d3-force/blob/master/README.md#simulation_find) to find the closest node to a pointer. - -## [Number Formats (d3-format)](https://github.com/d3/d3-format/blob/master/README.md) - -If a precision is not specified, the formatting behavior has changed: there is now a default precision of 6 for all directives except *none*, which defaults to 12. In 3.x, if you did not specify a precision, the number was formatted using its shortest unique representation (per [*number*.toString](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toString)); this could lead to unexpected digits due to [floating point math](http://0.30000000000000004.com/). The new default precision in 4.0 produces more consistent results: - -```js -var f = d3.format("e"); -f(42); // "4.200000e+1" -f(0.1 + 0.2); // "3.000000e-1" -``` - -To trim insignificant trailing zeroes, use the *none* directive, which is similar `g`. For example: - -```js -var f = d3.format(".3"); -f(0.12345); // "0.123" -f(0.10000); // "0.1" -f(0.1 + 0.2); // "0.3" -``` - -Under the hood, number formatting has improved accuracy with very large and very small numbers by using [*number*.toExponential](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/toExponential) rather than [Math.log](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/log) to extract the mantissa and exponent. Negative zero (-0, an IEEE 754 construct) and very small numbers that round to zero are now formatted as unsigned zero. The inherently unsafe d3.round method has been removed, along with d3.requote. - -The [d3.formatPrefix](https://github.com/d3/d3-format/blob/master/README.md#formatPrefix) method has been changed. Rather than returning an SI-prefix string, it returns an SI-prefix format function for a given *specifier* and reference *value*. For example, to format thousands: - -```js -var f = d3.formatPrefix(",.0", 1e3); -f(1e3); // "1k" -f(1e4); // "10k" -f(1e5); // "100k" -f(1e6); // "1,000k" -``` - -Unlike the `s` format directive, d3.formatPrefix always employs the same SI-prefix, producing consistent results: - -```js -var f = d3.format(".0s"); -f(1e3); // "1k" -f(1e4); // "10k" -f(1e5); // "100k" -f(1e6); // "1M" -``` - -The new `(` sign option uses parentheses for negative values. This is particularly useful in conjunction with `$`. For example: - -```js -d3.format("+.0f")(-42); // "-42" -d3.format("(.0f")(-42); // "(42)" -d3.format("+$.0f")(-42); // "-$42" -d3.format("($.0f")(-42); // "($42)" -``` - -The new `=` align option places any sign and symbol to the left of any padding: - -```js -d3.format(">6d")(-42); // " -42" -d3.format("=6d")(-42); // "- 42" -d3.format(">(6d")(-42); // " (42)" -d3.format("=(6d")(-42); // "( 42)" -``` - -The `b`, `o`, `d` and `x` directives now round to the nearest integer, rather than returning the empty string for non-integers: - -```js -d3.format("b")(41.9); // "101010" -d3.format("o")(41.9); // "52" -d3.format("d")(41.9); // "42" -d3.format("x")(41.9); // "2a" -``` - -The `c` directive is now for character data (*i.e.*, literal strings), not for character codes. The is useful if you just want to apply padding and alignment and don’t care about formatting numbers. For example, the infamous [left-pad](http://blog.npmjs.org/post/141577284765/kik-left-pad-and-npm) (as well as center- and right-pad!) can be conveniently implemented as: - -```js -d3.format(">10c")("foo"); // " foo" -d3.format("^10c")("foo"); // " foo " -d3.format("<10c")("foo"); // "foo " -``` - -There are several new methods for computing suggested decimal precisions; these are used by [d3-scale](#scales-d3-scale) for tick formatting, and are helpful for implementing custom number formats: [d3.precisionFixed](https://github.com/d3/d3-format/blob/master/README.md#precisionFixed), [d3.precisionPrefix](https://github.com/d3/d3-format/blob/master/README.md#precisionPrefix) and [d3.precisionRound](https://github.com/d3/d3-format/blob/master/README.md#precisionRound). There’s also a new [d3.formatSpecifier](https://github.com/d3/d3-format/blob/master/README.md#formatSpecifier) method for parsing, validating and debugging format specifiers; it’s also good for deriving related format specifiers, such as when you want to substitute the precision automatically. - -You can now set the default locale using [d3.formatDefaultLocale](https://github.com/d3/d3-format/blob/master/README.md#formatDefaultLocale)! The locales are published as [JSON](https://github.com/d3/d3-request/blob/master/README.md#json) to [npm](https://unpkg.com/d3-format/locale/). - -## [Geographies (d3-geo)](https://github.com/d3/d3-geo/blob/master/README.md) - -Pursuant to the great namespace flattening, various methods have new names: - -* d3.geo.graticule ↦ [d3.geoGraticule](https://github.com/d3/d3-geo/blob/master/README.md#geoGraticule) -* d3.geo.circle ↦ [d3.geoCircle](https://github.com/d3/d3-geo/blob/master/README.md#geoCircle) -* d3.geo.area ↦ [d3.geoArea](https://github.com/d3/d3-geo/blob/master/README.md#geoArea) -* d3.geo.bounds ↦ [d3.geoBounds](https://github.com/d3/d3-geo/blob/master/README.md#geoBounds) -* d3.geo.centroid ↦ [d3.geoCentroid](https://github.com/d3/d3-geo/blob/master/README.md#geoCentroid) -* d3.geo.distance ↦ [d3.geoDistance](https://github.com/d3/d3-geo/blob/master/README.md#geoDistance) -* d3.geo.interpolate ↦ [d3.geoInterpolate](https://github.com/d3/d3-geo/blob/master/README.md#geoInterpolate) -* d3.geo.length ↦ [d3.geoLength](https://github.com/d3/d3-geo/blob/master/README.md#geoLength) -* d3.geo.rotation ↦ [d3.geoRotation](https://github.com/d3/d3-geo/blob/master/README.md#geoRotation) -* d3.geo.stream ↦ [d3.geoStream](https://github.com/d3/d3-geo/blob/master/README.md#geoStream) -* d3.geo.path ↦ [d3.geoPath](https://github.com/d3/d3-geo/blob/master/README.md#geoPath) -* d3.geo.projection ↦ [d3.geoProjection](https://github.com/d3/d3-geo/blob/master/README.md#geoProjection) -* d3.geo.projectionMutator ↦ [d3.geoProjectionMutator](https://github.com/d3/d3-geo/blob/master/README.md#geoProjectionMutator) -* d3.geo.albers ↦ [d3.geoAlbers](https://github.com/d3/d3-geo/blob/master/README.md#geoAlbers) -* d3.geo.albersUsa ↦ [d3.geoAlbersUsa](https://github.com/d3/d3-geo/blob/master/README.md#geoAlbersUsa) -* d3.geo.azimuthalEqualArea ↦ [d3.geoAzimuthalEqualArea](https://github.com/d3/d3-geo/blob/master/README.md#geoAzimuthalEqualArea) -* d3.geo.azimuthalEquidistant ↦ [d3.geoAzimuthalEquidistant](https://github.com/d3/d3-geo/blob/master/README.md#geoAzimuthalEquidistant) -* d3.geo.conicConformal ↦ [d3.geoConicConformal](https://github.com/d3/d3-geo/blob/master/README.md#geoConicConformal) -* d3.geo.conicEqualArea ↦ [d3.geoConicEqualArea](https://github.com/d3/d3-geo/blob/master/README.md#geoConicEqualArea) -* d3.geo.conicEquidistant ↦ [d3.geoConicEquidistant](https://github.com/d3/d3-geo/blob/master/README.md#geoConicEquidistant) -* d3.geo.equirectangular ↦ [d3.geoEquirectangular](https://github.com/d3/d3-geo/blob/master/README.md#geoEquirectangular) -* d3.geo.gnomonic ↦ [d3.geoGnomonic](https://github.com/d3/d3-geo/blob/master/README.md#geoGnomonic) -* d3.geo.mercator ↦ [d3.geoMercator](https://github.com/d3/d3-geo/blob/master/README.md#geoMercator) -* d3.geo.orthographic ↦ [d3.geoOrthographic](https://github.com/d3/d3-geo/blob/master/README.md#geoOrthographic) -* d3.geo.stereographic ↦ [d3.geoStereographic](https://github.com/d3/d3-geo/blob/master/README.md#geoStereographic) -* d3.geo.transverseMercator ↦ [d3.geoTransverseMercator](https://github.com/d3/d3-geo/blob/master/README.md#geoTransverseMercator) - -Also renamed for consistency: - -* *circle*.origin ↦ [*circle*.center](https://github.com/d3/d3-geo/blob/master/README.md#circle_center) -* *circle*.angle ↦ [*circle*.radius](https://github.com/d3/d3-geo/blob/master/README.md#circle_radius) -* *graticule*.majorExtent ↦ [*graticule*.extentMajor](https://github.com/d3/d3-geo/blob/master/README.md#graticule_extentMajor) -* *graticule*.minorExtent ↦ [*graticule*.extentMinor](https://github.com/d3/d3-geo/blob/master/README.md#graticule_extentMinor) -* *graticule*.majorStep ↦ [*graticule*.stepMajor](https://github.com/d3/d3-geo/blob/master/README.md#graticule_stepMajor) -* *graticule*.minorStep ↦ [*graticule*.stepMinor](https://github.com/d3/d3-geo/blob/master/README.md#graticule_stepMinor) - -Projections now have more appropriate defaults. For example, [d3.geoOrthographic](https://github.com/d3/d3-geo/blob/master/README.md#geoOrthographic) has a 90° clip angle by default, showing only the front hemisphere, and [d3.geoGnomonic](https://github.com/d3/d3-geo/blob/master/README.md#geoGnomonic) has a default 60° clip angle. The default [projection](https://github.com/d3/d3-geo/blob/master/README.md#path_projection) for [d3.geoPath](https://github.com/d3/d3-geo/blob/master/README.md#geoPath) is now null rather than [d3.geoAlbersUsa](https://github.com/d3/d3-geo/blob/master/README.md#geoAlbersUsa); a null projection is used with [pre-projected geometry](https://bl.ocks.org/mbostock/5557726) and is typically faster to render. - -“Fallback projectionsâ€â€”when you pass a function rather than a projection to [*path*.projection](https://github.com/d3/d3-geo/blob/master/README.md#path_projection)—are no longer supported. For geographic projections, use [d3.geoProjection](https://github.com/d3/d3-geo/blob/master/README.md#geoProjection) or [d3.geoProjectionMutator](https://github.com/d3/d3-geo/blob/master/README.md#geoProjectionMutator) to define a custom projection. For arbitrary geometry transformations, implement the [stream interface](https://github.com/d3/d3-geo/blob/master/README.md#streams); see also [d3.geoTransform](https://github.com/d3/d3-geo/blob/master/README.md#geoTransform). The “raw†projections (e.g., d3.geo.equirectangular.raw) are no longer exported. - -## [Hierarchies (d3-hierarchy)](https://github.com/d3/d3-hierarchy/blob/master/README.md) - -Pursuant to the great namespace flattening: - -* d3.layout.cluster ↦ [d3.cluster](https://github.com/d3/d3-hierarchy/blob/master/README.md#cluster) -* d3.layout.hierarchy ↦ [d3.hierarchy](https://github.com/d3/d3-hierarchy/blob/master/README.md#hierarchy) -* d3.layout.pack ↦ [d3.pack](https://github.com/d3/d3-hierarchy/blob/master/README.md#pack) -* d3.layout.partition ↦ [d3.partition](https://github.com/d3/d3-hierarchy/blob/master/README.md#partition) -* d3.layout.tree ↦ [d3.tree](https://github.com/d3/d3-hierarchy/blob/master/README.md#tree) -* d3.layout.treemap ↦ [d3.treemap](https://github.com/d3/d3-hierarchy/blob/master/README.md#treemap) - -As an alternative to using JSON to represent hierarchical data (such as the “flare.json format†used by many D3 examples), the new [d3.stratify](https://github.com/d3/d3-hierarchy/blob/master/README.md#stratify) operator simplifies the conversion of tabular data to hierarchical data! This is convenient if you already have data in a tabular format, such as the result of a SQL query or a CSV file: - -``` -name,parent -Eve, -Cain,Eve -Seth,Eve -Enos,Seth -Noam,Seth -Abel,Eve -Awan,Eve -Enoch,Awan -Azura,Eve -``` - -To convert this to a root [*node*](https://github.com/d3/d3-hierarchy/blob/master/README.md#hierarchy): - -```js -var root = d3.stratify() - .id(function(d) { return d.name; }) - .parentId(function(d) { return d.parent; }) - (nodes); -``` - -The resulting *root* can be passed to [d3.tree](https://github.com/d3/d3-hierarchy/blob/master/README.md#tree) to produce a tree diagram like this: - -<img src="https://raw.githubusercontent.com/d3/d3/master/img/stratify.png" width="298" height="137"> - -Root nodes can also be created from JSON data using [d3.hierarchy](https://github.com/d3/d3-hierarchy/blob/master/README.md#hierarchy). The hierarchy layouts now take these root nodes as input rather than operating directly on JSON data, which helps to provide a cleaner separation between the input data and the computed layout. (For example, use [*node*.copy](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_copy) to isolate layout changes.) It also simplifies the API: rather than each hierarchy layout needing to implement value and sorting accessors, there are now generic [*node*.sum](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_sum) and [*node*.sort](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_sort) methods that work with any hierarchy layout. - -The new d3.hierarchy API also provides a richer set of methods for manipulating hierarchical data. For example, to generate an array of all nodes in topological order, use [*node*.descendants](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_descendants); for just leaf nodes, use [*node*.leaves](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_leaves). To highlight the ancestors of a given *node* on mouseover, use [*node*.ancestors](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_ancestors). To generate an array of {source, target} links for a given hierarchy, use [*node*.links](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_links); this replaces *treemap*.links and similar methods on the other layouts. The new [*node*.path](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_path) method replaces d3.layout.bundle; see also [d3.curveBundle](https://github.com/d3/d3-shape/blob/master/README.md#curveBundle) for hierarchical edge bundling. - -The hierarchy layouts have been rewritten using new, non-recursive traversal methods ([*node*.each](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_each), [*node*.eachAfter](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_eachAfter) and [*node*.eachBefore](https://github.com/d3/d3-hierarchy/blob/master/README.md#node_eachBefore)), improving performance on large datasets. The d3.tree layout no longer uses a *node*.\_ field to store temporary state during layout. - -Treemap tiling is now [extensible](https://github.com/d3/d3-hierarchy/blob/master/README.md#treemap-tiling) via [*treemap*.tile](https://github.com/d3/d3-hierarchy/blob/master/README.md#treemap_tile)! The default squarified tiling algorithm, [d3.treemapSquarify](https://github.com/d3/d3-hierarchy/blob/master/README.md#treemapSquarify), has been completely rewritten, improving performance and fixing bugs in padding and rounding. The *treemap*.sticky method has been replaced with the [d3.treemapResquarify](https://github.com/d3/d3-hierarchy/blob/master/README.md#treemapResquarify), which is identical to d3.treemapSquarify except it performs stable neighbor-preserving updates. The *treemap*.ratio method has been replaced with [*squarify*.ratio](https://github.com/d3/d3-hierarchy/blob/master/README.md#squarify_ratio). And there’s a new [d3.treemapBinary](https://github.com/d3/d3-hierarchy/blob/master/README.md#treemapBinary) for binary treemaps! - -Treemap padding has also been improved. The treemap now distinguishes between [outer padding](https://github.com/d3/d3-hierarchy/blob/master/README.md#treemap_paddingOuter) that separates a parent from its children, and [inner padding](https://github.com/d3/d3-hierarchy/blob/master/README.md#treemap_paddingInner) that separates adjacent siblings. You can set the [top-](https://github.com/d3/d3-hierarchy/blob/master/README.md#treemap_paddingTop), [right-](https://github.com/d3/d3-hierarchy/blob/master/README.md#treemap_paddingRight), [bottom-](https://github.com/d3/d3-hierarchy/blob/master/README.md#treemap_paddingBottom) and [left-](https://github.com/d3/d3-hierarchy/blob/master/README.md#treemap_paddingLeft)outer padding separately. There are new examples for the traditional [nested treemap](https://bl.ocks.org/mbostock/911ad09bdead40ec0061) and for Lü and Fogarty’s [cascaded treemap](https://bl.ocks.org/mbostock/f85ffb3a5ac518598043). And there’s a new example demonstrating [d3.nest with d3.treemap](https://bl.ocks.org/mbostock/2838bf53e0e65f369f476afd653663a2). - -The space-filling layouts [d3.treemap](https://github.com/d3/d3-hierarchy/blob/master/README.md#treemap) and [d3.partition](https://github.com/d3/d3-hierarchy/blob/master/README.md#partition) now output *x0*, *x1*, *y0*, *y1* on each node instead of *x0*, *dx*, *y0*, *dy*. This improves accuracy by ensuring that the edges of adjacent cells are exactly equal, rather than sometimes being slightly off due to floating point math. The partition layout now supports [rounding](https://github.com/d3/d3-hierarchy/blob/master/README.md#partition_round) and [padding](https://github.com/d3/d3-hierarchy/blob/master/README.md#partition_padding). - -The circle-packing layout, [d3.pack](https://github.com/d3/d3-hierarchy/blob/master/README.md#pack), has been completely rewritten to better implement Wang et al.’s algorithm, fixing major bugs and improving results! Welzl’s algorithm is now used to compute the exact [smallest enclosing circle](https://bl.ocks.org/mbostock/29c534ff0b270054a01c) for each parent, rather than the approximate answer used by Wang et al. The 3.x output is shown on the left; 4.0 is shown on the right: - -<img alt="Circle Packing in 3.x" src="https://raw.githubusercontent.com/d3/d3/master/img/pack-v3.png" width="420" height="420"> <img alt="Circle Packing in 4.0" src="https://raw.githubusercontent.com/d3/d3/master/img/pack-v4.png" width="420" height="420"> - -A non-hierarchical implementation is also available as [d3.packSiblings](https://github.com/d3/d3-hierarchy/blob/master/README.md#packSiblings), and the smallest enclosing circle implementation is available as [d3.packEnclose](https://github.com/d3/d3-hierarchy/blob/master/README.md#packEnclose). [Pack padding](https://github.com/d3/d3-hierarchy/blob/master/README.md#pack_padding) now applies between a parent and its children, as well as between adjacent siblings. In addition, you can now specify padding as a function that is computed dynamically for each parent. - -## Internals - -The d3.rebind method has been removed. (See the [3.x source](https://github.com/d3/d3/blob/v3.5.17/src/core/rebind.js).) If you want to wrap a getter-setter method, the recommend pattern is to implement a wrapper method and check the return value. For example, given a *component* that uses an internal [*dispatch*](#dispatches-d3-dispatch), *component*.on can rebind *dispatch*.on as follows: - -```js -component.on = function() { - var value = dispatch.on.apply(dispatch, arguments); - return value === dispatch ? component : value; -}; -``` - -The d3.functor method has been removed. (See the [3.x source](https://github.com/d3/d3/blob/v3.5.17/src/core/functor.js).) If you want to promote a constant value to a function, the recommended pattern is to implement a closure that returns the constant value. If desired, you can use a helper method as follows: - -```js -function constant(x) { - return function() { - return x; - }; -} -``` - -Given a value *x*, to promote *x* to a function if it is not already: - -```js -var fx = typeof x === "function" ? x : constant(x); -``` - -## [Interpolators (d3-interpolate)](https://github.com/d3/d3-interpolate/blob/master/README.md) - -The [d3.interpolate](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolate) method no longer delegates to d3.interpolators, which has been removed; its behavior is now defined by the library. It is now slightly faster in the common case that *b* is a number. It only uses [d3.interpolateRgb](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateRgb) if *b* is a valid CSS color specifier (and not approximately one). And if the end value *b* is null, undefined, true or false, d3.interpolate now returns a constant function which always returns *b*. - -The behavior of [d3.interpolateObject](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateObject) and [d3.interpolateArray](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateArray) has changed slightly with respect to properties or elements in the start value *a* that do not exist in the end value *b*: these properties and elements are now ignored, such that the ending value of the interpolator at *t* = 1 is now precisely equal to *b*. So, in 3.x: - -```js -d3.interpolateObject({foo: 2, bar: 1}, {foo: 3})(0.5); // {bar: 1, foo: 2.5} in 3.x -``` - -Whereas in 4.0, *a*.bar is ignored: - -```js -d3.interpolateObject({foo: 2, bar: 1}, {foo: 3})(0.5); // {foo: 2.5} in 4.0 -``` - -If *a* or *b* are undefined or not an object, they are now implicitly converted to the empty object or empty array as appropriate, rather than throwing a TypeError. - -The d3.interpolateTransform interpolator has been renamed to [d3.interpolateTransformSvg](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateTransformSvg), and there is a new [d3.interpolateTransformCss](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateTransformCss) to interpolate CSS transforms! This allows [d3-transition](#transitions-d3-transition) to automatically interpolate both the SVG [transform attribute](https://www.w3.org/TR/SVG/coords.html#TransformAttribute) and the CSS [transform style property](https://www.w3.org/TR/css-transforms-1/#transform-property). (Note, however, that only 2D CSS transforms are supported.) The d3.transform method has been removed. - -Color space interpolators now interpolate opacity (see [d3-color](#colors-d3-color)) and return rgb(…) or rgba(…) CSS color specifier strings rather than using the RGB hexadecimal format. This is necessary to support opacity interpolation, but is also beneficial because it matches CSS computed values. When a channel in the start color *a* is undefined, color interpolators now use the corresponding channel value from the end color *b*, or *vice versa*. This logic previously applied to some channels (such as saturation in HSL), but now applies to all channels in all color spaces, and is especially useful when interpolating to or from transparent. - -There are now “long†versions of cylindrical color space interpolators: [d3.interpolateHslLong](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateHslLong), [d3.interpolateHclLong](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateHclLong) and [d3.interpolateCubehelixLong](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateCubehelixLong). These interpolators use linear interpolation of hue, rather than using the shortest path around the 360° hue circle. See [d3.interpolateRainbow](https://github.com/d3/d3-scale/blob/master/README.md#interpolateRainbow) for an example. The Cubehelix color space is now supported by [d3-color](#colors-d3-color), and so there are now [d3.interpolateCubehelix](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateCubehelix) and [d3.interpolateCubehelixLong](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateCubehelixLong) interpolators. - -[Gamma-corrected color interpolation](https://web.archive.org/web/20160112115812/http://www.4p8.com/eric.brasseur/gamma.html) is now supported for both RGB and Cubehelix color spaces as [*interpolate*.gamma](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolate_gamma). For example, to interpolate from purple to orange with a gamma of 2.2 in RGB space: - -```js -var interpolate = d3.interpolateRgb.gamma(2.2)("purple", "orange"); -``` - -There are new interpolators for uniform non-rational [B-splines](https://en.wikipedia.org/wiki/B-spline)! These are useful for smoothly interpolating between an arbitrary sequence of values from *t* = 0 to *t* = 1, such as to generate a smooth color gradient from a discrete set of colors. The [d3.interpolateBasis](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateBasis) and [d3.interpolateBasisClosed](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateBasisClosed) interpolators generate one-dimensional B-splines, while [d3.interpolateRgbBasis](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateRgbBasis) and [d3.interpolateRgbBasisClosed](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateRgbBasisClosed) generate three-dimensional B-splines through RGB color space. These are used by [d3-scale-chromatic](https://github.com/d3/d3-scale-chromatic) to generate continuous color scales from ColorBrewer’s discrete color schemes, such as [PiYG](https://bl.ocks.org/mbostock/048d21cf747371b11884f75ad896e5a5). - -There’s also now a [d3.quantize](https://github.com/d3/d3-interpolate/blob/master/README.md#quantize) method for generating uniformly-spaced discrete samples from a continuous interpolator. This is useful for taking one of the built-in color scales (such as [d3.interpolateViridis](https://github.com/d3/d3-scale/blob/master/README.md#interpolateViridis)) and quantizing it for use with [d3.scaleQuantize](https://github.com/d3/d3-scale/blob/master/README.md#scaleQuantize), [d3.scaleQuantile](https://github.com/d3/d3-scale/blob/master/README.md#scaleQuantile) or [d3.scaleThreshold](https://github.com/d3/d3-scale/blob/master/README.md#scaleThreshold). - -## [Paths (d3-path)](https://github.com/d3/d3-path/blob/master/README.md) - -The [d3.path](https://github.com/d3/d3-path/blob/master/README.md#path) serializer implements the [CanvasPathMethods API](https://www.w3.org/TR/2dcontext/#canvaspathmethods), allowing you to write code that can render to either Canvas or SVG. For example, given some code that draws to a canvas: - -```js -function drawCircle(context, radius) { - context.moveTo(radius, 0); - context.arc(0, 0, radius, 0, 2 * Math.PI); -} -``` - -You can render to SVG as follows: - -```js -var context = d3.path(); -drawCircle(context, 40); -pathElement.setAttribute("d", context.toString()); -``` - -The path serializer enables [d3-shape](#shapes-d3-shape) to support both Canvas and SVG; see [*line*.context](https://github.com/d3/d3-shape/blob/master/README.md#line_context) and [*area*.context](https://github.com/d3/d3-shape/blob/master/README.md#area_context), for example. - -## [Polygons (d3-polygon)](https://github.com/d3/d3-polygon/blob/master/README.md) - -There’s no longer a d3.geom.polygon constructor; instead you just pass an array of vertices to the polygon methods. So instead of *polygon*.area and *polygon*.centroid, there’s [d3.polygonArea](https://github.com/d3/d3-polygon/blob/master/README.md#polygonArea) and [d3.polygonCentroid](https://github.com/d3/d3-polygon/blob/master/README.md#polygonCentroid). There are also new [d3.polygonContains](https://github.com/d3/d3-polygon/blob/master/README.md#polygonContains) and [d3.polygonLength](https://github.com/d3/d3-polygon/blob/master/README.md#polygonLength) methods. There’s no longer an equivalent to *polygon*.clip, but if [Sutherland–Hodgman clipping](https://en.wikipedia.org/wiki/Sutherland–Hodgman_algorithm) is needed, please [file a feature request](https://github.com/d3/d3-polygon/issues). - -The d3.geom.hull operator has been simplified: instead of an operator with *hull*.x and *hull*.y accessors, there’s just the [d3.polygonHull](https://github.com/d3/d3-polygon/blob/master/README.md#polygonHull) method which takes an array of points and returns the convex hull. - -## [Quadtrees (d3-quadtree)](https://github.com/d3/d3-quadtree/blob/master/README.md) - -The d3.geom.quadtree method has been replaced by [d3.quadtree](https://github.com/d3/d3-quadtree/blob/master/README.md#quadtree). 4.0 removes the concept of quadtree “generators†(configurable functions that build a quadtree from an array of data); there are now just quadtrees, which you can create via d3.quadtree and add data to via [*quadtree*.add](https://github.com/d3/d3-quadtree/blob/master/README.md#quadtree_add) and [*quadtree*.addAll](https://github.com/d3/d3-quadtree/blob/master/README.md#quadtree_addAll). This code in 3.x: - -```js -var quadtree = d3.geom.quadtree() - .extent([[0, 0], [width, height]]) - (data); -``` - -Can be rewritten in 4.0 as: - -```js -var quadtree = d3.quadtree() - .extent([[0, 0], [width, height]]) - .addAll(data); -``` - -The new quadtree implementation is vastly improved! It is no longer recursive, avoiding stack overflows when there are large numbers of coincident points. The internal storage is now more efficient, and the implementation is also faster; constructing a quadtree of 1M normally-distributed points takes about one second in 4.0, as compared to three seconds in 3.x. - -The change in [internal *node* structure](https://github.com/d3/d3-quadtree/blob/master/README.md#nodes) affects [*quadtree*.visit](https://github.com/d3/d3-quadtree/blob/master/README.md#quadtree_visit): use *node*.length to distinguish leaf nodes from internal nodes. For example, to iterate over all data in a quadtree: - -```js -quadtree.visit(function(node) { - if (!node.length) { - do { - console.log(node.data); - } while (node = node.next) - } -}); -``` - -There’s a new [*quadtree*.visitAfter](https://github.com/d3/d3-quadtree/blob/master/README.md#quadtree_visitAfter) method for visiting nodes in post-order traversal. This feature is used in [d3-force](#forces-d3-force) to implement the [Barnes–Hut approximation](https://en.wikipedia.org/wiki/Barnes–Hut_simulation). - -You can now remove data from a quadtree using [*quadtree*.remove](https://github.com/d3/d3-quadtree/blob/master/README.md#quadtree_remove) and [*quadtree*.removeAll](https://github.com/d3/d3-quadtree/blob/master/README.md#quadtree_removeAll). When adding data to a quadtree, the quadtree will now expand its extent by repeated doubling if the new point is outside the existing extent of the quadtree. There are also [*quadtree*.extent](https://github.com/d3/d3-quadtree/blob/master/README.md#quadtree_extent) and [*quadtree*.cover](https://github.com/d3/d3-quadtree/blob/master/README.md#quadtree_cover) methods for explicitly expanding the extent of the quadtree after creation. - -Quadtrees support several new utility methods: [*quadtree*.copy](https://github.com/d3/d3-quadtree/blob/master/README.md#quadtree_copy) returns a copy of the quadtree sharing the same data; [*quadtree*.data](https://github.com/d3/d3-quadtree/blob/master/README.md#quadtree_data) generates an array of all data in the quadtree; [*quadtree*.size](https://github.com/d3/d3-quadtree/blob/master/README.md#quadtree_size) returns the number of data points in the quadtree; and [*quadtree*.root](https://github.com/d3/d3-quadtree/blob/master/README.md#quadtree_root) returns the root node, which is useful for manual traversal of the quadtree. The [*quadtree*.find](https://github.com/d3/d3-quadtree/blob/master/README.md#quadtree_find) method now takes an optional search radius, which is useful for pointer-based selection in [force-directed graphs](https://bl.ocks.org/mbostock/ad70335eeef6d167bc36fd3c04378048). - -## [Queues (d3-queue)](https://github.com/d3/d3-queue/blob/master/README.md) - -Formerly known as Queue.js and queue-async, [d3.queue](https://github.com/d3/d3-queue) is now included in the default bundle, making it easy to load data files in parallel. It has been rewritten with fewer closures to improve performance, and there are now stricter checks in place to guarantee well-defined behavior. You can now use instanceof d3.queue and inspect the queue’s internal private state. - -## [Random Numbers (d3-random)](https://github.com/d3/d3-random/blob/master/README.md) - -Pursuant to the great namespace flattening, the random number generators have new names: - -* d3.random.normal ↦ [d3.randomNormal](https://github.com/d3/d3-random/blob/master/README.md#randomNormal) -* d3.random.logNormal ↦ [d3.randomLogNormal](https://github.com/d3/d3-random/blob/master/README.md#randomLogNormal) -* d3.random.bates ↦ [d3.randomBates](https://github.com/d3/d3-random/blob/master/README.md#randomBates) -* d3.random.irwinHall ↦ [d3.randomIrwinHall](https://github.com/d3/d3-random/blob/master/README.md#randomIrwinHall) - -There are also new random number generators for [exponential](https://github.com/d3/d3-random/blob/master/README.md#randomExponential) and [uniform](https://github.com/d3/d3-random/blob/master/README.md#randomUniform) distributions. The [normal](https://github.com/d3/d3-random/blob/master/README.md#randomNormal) and [log-normal](https://github.com/d3/d3-random/blob/master/README.md#randomLogNormal) random generators have been optimized. - -## [Requests (d3-request)](https://github.com/d3/d3-request/blob/master/README.md) - -The d3.xhr method has been renamed to [d3.request](https://github.com/d3/d3-request/blob/master/README.md#request). Basic authentication is now supported using [*request*.user](https://github.com/d3/d3-request/blob/master/README.md#request_user) and [*request*.password](https://github.com/d3/d3-request/blob/master/README.md#request_password). You can now configure a timeout using [*request*.timeout](https://github.com/d3/d3-request/blob/master/README.md#request_timeout). - -If an error occurs, the corresponding [ProgressEvent](https://xhr.spec.whatwg.org/#interface-progressevent) of type “error†is now passed to the error listener, rather than the [XMLHttpRequest](https://xhr.spec.whatwg.org/#interface-xmlhttprequest). Likewise, the ProgressEvent is passed to progress event listeners, rather than using [d3.event](https://github.com/d3/d3-selection/blob/master/README.md#event). If [d3.xml](https://github.com/d3/d3-request/blob/master/README.md#xml) encounters an error parsing XML, this error is now reported to error listeners rather than returning a null response. - -The [d3.request](https://github.com/d3/d3-request/blob/master/README.md#request), [d3.text](https://github.com/d3/d3-request/blob/master/README.md#text) and [d3.xml](https://github.com/d3/d3-request/blob/master/README.md#xml) methods no longer take an optional mime type as the second argument; use [*request*.mimeType](https://github.com/d3/d3-request/blob/master/README.md#request_mimeType) instead. For example: - -```js -d3.xml("file.svg").mimeType("image/svg+xml").get(function(error, svg) { - … -}); -``` - -With the exception of [d3.html](https://github.com/d3/d3-request/blob/master/README.md#html) and [d3.xml](https://github.com/d3/d3-request/blob/master/README.md#xml), Node is now supported via [node-XMLHttpRequest](https://github.com/driverdan/node-XMLHttpRequest). - -## [Scales (d3-scale)](https://github.com/d3/d3-scale/blob/master/README.md) - -Pursuant to the great namespace flattening: - -* d3.scale.linear ↦ [d3.scaleLinear](https://github.com/d3/d3-scale/blob/master/README.md#scaleLinear) -* d3.scale.sqrt ↦ [d3.scaleSqrt](https://github.com/d3/d3-scale/blob/master/README.md#scaleSqrt) -* d3.scale.pow ↦ [d3.scalePow](https://github.com/d3/d3-scale/blob/master/README.md#scalePow) -* d3.scale.log ↦ [d3.scaleLog](https://github.com/d3/d3-scale/blob/master/README.md#scaleLog) -* d3.scale.quantize ↦ [d3.scaleQuantize](https://github.com/d3/d3-scale/blob/master/README.md#scaleQuantize) -* d3.scale.threshold ↦ [d3.scaleThreshold](https://github.com/d3/d3-scale/blob/master/README.md#scaleThreshold) -* d3.scale.quantile ↦ [d3.scaleQuantile](https://github.com/d3/d3-scale/blob/master/README.md#scaleQuantile) -* d3.scale.identity ↦ [d3.scaleIdentity](https://github.com/d3/d3-scale/blob/master/README.md#scaleIdentity) -* d3.scale.ordinal ↦ [d3.scaleOrdinal](https://github.com/d3/d3-scale/blob/master/README.md#scaleOrdinal) -* d3.time.scale ↦ [d3.scaleTime](https://github.com/d3/d3-scale/blob/master/README.md#scaleTime) -* d3.time.scale.utc ↦ [d3.scaleUtc](https://github.com/d3/d3-scale/blob/master/README.md#scaleUtc) - -Scales now generate ticks in the same order as the domain: if you have a descending domain, you now get descending ticks. This change affects the order of tick elements generated by [axes](#axes-d3-axis). For example: - -```js -d3.scaleLinear().domain([10, 0]).ticks(5); // [10, 8, 6, 4, 2, 0] -``` - -[Log tick formatting](https://github.com/d3/d3-scale/blob/master/README.md#log_tickFormat) now assumes a default *count* of ten, not Infinity, if not specified. Log scales with domains that span many powers (such as from 1e+3 to 1e+29) now return only one [tick](https://github.com/d3/d3-scale/blob/master/README.md#log_ticks) per power rather than returning *base* ticks per power. Non-linear quantitative scales are slightly more accurate. - -You can now control whether an ordinal scale’s domain is implicitly extended when the scale is passed a value that is not already in its domain. By default, [*ordinal*.unknown](https://github.com/d3/d3-scale/blob/master/README.md#ordinal_unknown) is [d3.scaleImplicit](https://github.com/d3/d3-scale/blob/master/README.md#scaleImplicit), causing unknown values to be added to the domain: - -```js -var x = d3.scaleOrdinal() - .domain([0, 1]) - .range(["red", "green", "blue"]); - -x.domain(); // [0, 1] -x(2); // "blue" -x.domain(); // [0, 1, 2] -``` - -By setting *ordinal*.unknown, you instead define the output value for unknown inputs. This is particularly useful for choropleth maps where you want to assign a color to missing data. - -```js -var x = d3.scaleOrdinal() - .domain([0, 1]) - .range(["red", "green", "blue"]) - .unknown(undefined); - -x.domain(); // [0, 1] -x(2); // undefined -x.domain(); // [0, 1] -``` - -The *ordinal*.rangeBands and *ordinal*.rangeRoundBands methods have been replaced with a new subclass of ordinal scale: [band scales](https://github.com/d3/d3-scale/blob/master/README.md#band-scales). The following code in 3.x: - -```js -var x = d3.scale.ordinal() - .domain(["a", "b", "c"]) - .rangeBands([0, width]); -``` - -Is equivalent to this in 4.0: - -```js -var x = d3.scaleBand() - .domain(["a", "b", "c"]) - .range([0, width]); -``` - -The new [*band*.padding](https://github.com/d3/d3-scale/blob/master/README.md#band_padding), [*band*.paddingInner](https://github.com/d3/d3-scale/blob/master/README.md#band_paddingInner) and [*band*.paddingOuter](https://github.com/d3/d3-scale/blob/master/README.md#band_paddingOuter) methods replace the optional arguments to *ordinal*.rangeBands. The new [*band*.bandwidth](https://github.com/d3/d3-scale/blob/master/README.md#band_bandwidth) and [*band*.step](https://github.com/d3/d3-scale/blob/master/README.md#band_step) methods replace *ordinal*.rangeBand. There’s also a new [*band*.align](https://github.com/d3/d3-scale/blob/master/README.md#band_align) method which you can use to control how the extra space outside the bands is distributed, say to shift columns closer to the *y*-axis. - -Similarly, the *ordinal*.rangePoints and *ordinal*.rangeRoundPoints methods have been replaced with a new subclass of ordinal scale: [point scales](https://github.com/d3/d3-scale/blob/master/README.md#point-scales). The following code in 3.x: - -```js -var x = d3.scale.ordinal() - .domain(["a", "b", "c"]) - .rangePoints([0, width]); -``` - -Is equivalent to this in 4.0: - -```js -var x = d3.scalePoint() - .domain(["a", "b", "c"]) - .range([0, width]); -``` - -The new [*point*.padding](https://github.com/d3/d3-scale/blob/master/README.md#point_padding) method replaces the optional *padding* argument to *ordinal*.rangePoints. Like *ordinal*.rangeBand with *ordinal*.rangePoints, the [*point*.bandwidth](https://github.com/d3/d3-scale/blob/master/README.md#point_bandwidth) method always returns zero; a new [*point*.step](https://github.com/d3/d3-scale/blob/master/README.md#point_step) method returns the interval between adjacent points. - -The [ordinal scale constructor](https://github.com/d3/d3-scale/blob/master/README.md#ordinal-scales) now takes an optional *range* for a shorter alternative to [*ordinal*.range](https://github.com/d3/d3-scale/blob/master/README.md#ordinal_range). This is especially useful now that the categorical color scales have been changed to simple arrays of colors rather than specialized ordinal scale constructors: - -* d3.scale.category10 ↦ [d3.schemeCategory10](https://github.com/d3/d3-scale/blob/master/README.md#schemeCategory10) -* d3.scale.category20 ↦ [d3.schemeCategory20](https://github.com/d3/d3-scale/blob/master/README.md#schemeCategory20) -* d3.scale.category20b ↦ [d3.schemeCategory20b](https://github.com/d3/d3-scale/blob/master/README.md#schemeCategory20b) -* d3.scale.category20c ↦ [d3.schemeCategory20c](https://github.com/d3/d3-scale/blob/master/README.md#schemeCategory20c) - -The following code in 3.x: - -```js -var color = d3.scale.category10(); -``` - -Is equivalent to this in 4.0: - -```js -var color = d3.scaleOrdinal(d3.schemeCategory10); -``` - -[Sequential scales](https://github.com/d3/d3-scale/blob/master/README.md#scaleSequential), are a new class of scales with a fixed output [interpolator](https://github.com/d3/d3-scale/blob/master/README.md#sequential_interpolator) instead of a [range](https://github.com/d3/d3-scale/blob/master/README.md#continuous_range). Typically these scales are used to implement continuous sequential or diverging color schemes. Inspired by Matplotlib’s new [perceptually-motived colormaps](https://bids.github.io/colormap/), 4.0 now features [viridis](https://github.com/d3/d3-scale/blob/master/README.md#interpolateViridis), [inferno](https://github.com/d3/d3-scale/blob/master/README.md#interpolateInferno), [magma](https://github.com/d3/d3-scale/blob/master/README.md#interpolateMagma), [plasma](https://github.com/d3/d3-scale/blob/master/README.md#interpolatePlasma) interpolators for use with sequential scales. Using [d3.quantize](https://github.com/d3/d3-interpolate/blob/master/README.md#quantize), these interpolators can also be applied to [quantile](https://github.com/d3/d3-scale/blob/master/README.md#quantile-scales), [quantize](https://github.com/d3/d3-scale/blob/master/README.md#quantize-scales) and [threshold](https://github.com/d3/d3-scale/blob/master/README.md#threshold-scales) scales. - -[<img src="https://raw.githubusercontent.com/d3/d3-scale/v1.0.0/img/viridis.png" width="100%" height="40" alt="viridis">](https://github.com/d3/d3-scale/blob/master/README.md#interpolateViridis) -[<img src="https://raw.githubusercontent.com/d3/d3-scale/v1.0.0/img/inferno.png" width="100%" height="40" alt="inferno">](https://github.com/d3/d3-scale/blob/master/README.md#interpolateInferno) -[<img src="https://raw.githubusercontent.com/d3/d3-scale/v1.0.0/img/magma.png" width="100%" height="40" alt="magma">](https://github.com/d3/d3-scale/blob/master/README.md#interpolateMagma) -[<img src="https://raw.githubusercontent.com/d3/d3-scale/v1.0.0/img/plasma.png" width="100%" height="40" alt="plasma">](https://github.com/d3/d3-scale/blob/master/README.md#interpolatePlasma) - -4.0 also ships new Cubehelix schemes, including [Dave Green’s default](https://github.com/d3/d3-scale/blob/master/README.md#interpolateCubehelixDefault) and a [cyclical rainbow](https://github.com/d3/d3-scale/blob/master/README.md#interpolateRainbow) inspired by [Matteo Niccoli](https://mycarta.wordpress.com/2013/02/21/perceptual-rainbow-palette-the-method/): - -[<img src="https://raw.githubusercontent.com/d3/d3-scale/v1.0.0/img/cubehelix.png" width="100%" height="40" alt="cubehelix">](https://github.com/d3/d3-scale/blob/master/README.md#interpolateCubehelixDefault) -[<img src="https://raw.githubusercontent.com/d3/d3-scale/v1.0.0/img/rainbow.png" width="100%" height="40" alt="rainbow">](https://github.com/d3/d3-scale/blob/master/README.md#interpolateRainbow) -[<img src="https://raw.githubusercontent.com/d3/d3-scale/v1.0.0/img/warm.png" width="100%" height="40" alt="warm">](https://github.com/d3/d3-scale/blob/master/README.md#interpolateWarm) -[<img src="https://raw.githubusercontent.com/d3/d3-scale/v1.0.0/img/cool.png" width="100%" height="40" alt="cool">](https://github.com/d3/d3-scale/blob/master/README.md#interpolateCool) - -For even more sequential and categorical color schemes, see [d3-scale-chromatic](https://github.com/d3/d3-scale-chromatic). - -For an introduction to scales, see [Introducing d3-scale](https://medium.com/@mbostock/introducing-d3-scale-61980c51545f). - -## [Selections (d3-selection)](https://github.com/d3/d3-selection/blob/master/README.md) - -Selections no longer subclass Array using [prototype chain injection](http://perfectionkills.com/how-ecmascript-5-still-does-not-allow-to-subclass-an-array/#wrappers_prototype_chain_injection); they are now plain objects, improving performance. The internal fields (*selection*.\_groups, *selection*.\_parents) are private; please use the documented public API to manipulate selections. The new [*selection*.nodes](https://github.com/d3/d3-selection/blob/master/README.md#selection_nodes) method generates an array of all nodes in a selection. - -Selections are now immutable: the elements and parents in a selection never change. (The elements’ attributes and content will of course still be modified!) The [*selection*.sort](https://github.com/d3/d3-selection/blob/master/README.md#selection_sort) and [*selection*.data](https://github.com/d3/d3-selection/blob/master/README.md#selection_data) methods now return new selections rather than modifying the selection in-place. In addition, [*selection*.append](https://github.com/d3/d3-selection/blob/master/README.md#selection_append) no longer merges entering nodes into the update selection; use [*selection*.merge](https://github.com/d3/d3-selection/blob/master/README.md#selection_merge) to combine enter and update after a data join. For example, the following [general update pattern](https://bl.ocks.org/mbostock/a8a5baa4c4a470cda598) in 3.x: - -```js -var circle = svg.selectAll("circle").data(data) // UPDATE - .style("fill", "blue"); - -circle.exit().remove(); // EXIT - -circle.enter().append("circle") // ENTER; modifies UPDATE! 🌶 - .style("fill", "green"); - -circle // ENTER + UPDATE - .style("stroke", "black"); -``` - -Would be rewritten in 4.0 as: - -```js -var circle = svg.selectAll("circle").data(data) // UPDATE - .style("fill", "blue"); - -circle.exit().remove(); // EXIT - -circle.enter().append("circle") // ENTER - .style("fill", "green") - .merge(circle) // ENTER + UPDATE - .style("stroke", "black"); -``` - -This change is discussed further in [What Makes Software Good](https://medium.com/@mbostock/what-makes-software-good-943557f8a488). - -In 3.x, the [*selection*.enter](https://github.com/d3/d3-selection/blob/master/README.md#selection_enter) and [*selection*.exit](https://github.com/d3/d3-selection/blob/master/README.md#selection_exit) methods were undefined until you called *selection*.data, resulting in a TypeError if you attempted to access them. In 4.0, now they simply return the empty selection if the selection has not been joined to data. - -In 3.x, [*selection*.append](https://github.com/d3/d3-selection/blob/master/README.md#selection_append) would always append the new element as the last child of its parent. A little-known trick was to use [*selection*.insert](https://github.com/d3/d3-selection/blob/master/README.md#selection_insert) without specifying a *before* selector when entering nodes, causing the entering nodes to be inserted before the following element in the update selection. In 4.0, this is now the default behavior of *selection*.append; if you do not specify a *before* selector to *selection*.insert, the inserted element is appended as the last child. This change makes the general update pattern preserve the relative order of elements and data. For example, given the following DOM: - -```html -<div>a</div> -<div>b</div> -<div>f</div> -``` - -And the following code: - -```js -var div = d3.select("body").selectAll("div") - .data(["a", "b", "c", "d", "e", "f"], function(d) { return d || this.textContent; }); - -div.enter().append("div") - .text(function(d) { return d; }); -``` - -The resulting DOM will be: - -```html -<div>a</div> -<div>b</div> -<div>c</div> -<div>d</div> -<div>e</div> -<div>f</div> -``` - -Thus, the entering *c*, *d* and *e* are inserted before *f*, since *f* is the following element in the update selection. Although this behavior is sufficient to preserve order if the new data’s order is stable, if the data changes order, you must still use [*selection*.order](https://github.com/d3/d3-selection/blob/master/README.md#selection_order) to reorder elements. - -There is now only one class of selection. 3.x implemented enter selections using a special class with different behavior for *enter*.append and *enter*.select; a consequence of this design was that enter selections in 3.x lacked [certain methods](https://github.com/d3/d3/issues/2043). In 4.0, enter selections are simply normal selections; they have the same methods and the same behavior. Placeholder [enter nodes](https://github.com/d3/d3-selection/blob/master/src/selection/enter.js) now implement [*node*.appendChild](https://developer.mozilla.org/en-US/docs/Web/API/Node/appendChild), [*node*.insertBefore](https://developer.mozilla.org/en-US/docs/Web/API/Node/insertBefore), [*node*.querySelector](https://developer.mozilla.org/en-US/docs/Web/API/Element/querySelector), and [*node*.querySelectorAll](https://developer.mozilla.org/en-US/docs/Web/API/Element/querySelectorAll). - -The [*selection*.data](https://github.com/d3/d3-selection/blob/master/README.md#selection_data) method has been changed slightly with respect to duplicate keys. In 3.x, if multiple data had the same key, the duplicate data would be ignored and not included in enter, update or exit; in 4.0 the duplicate data is always put in the enter selection. In both 3.x and 4.0, if multiple elements have the same key, the duplicate elements are put in the exit selection. Thus, 4.0’s behavior is now symmetric for enter and exit, and the general update pattern will now produce a DOM that matches the data even if there are duplicate keys. - -Selections have several new methods! Use [*selection*.raise](https://github.com/d3/d3-selection/blob/master/README.md#selection_raise) to move the selected elements to the front of their siblings, so that they are drawn on top; use [*selection*.lower](https://github.com/d3/d3-selection/blob/master/README.md#selection_lower) to move them to the back. Use [*selection*.dispatch](https://github.com/d3/d3-selection/blob/master/README.md#selection_dispatch) to dispatch a [custom event](https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent) to event listeners. - -When called in getter mode, [*selection*.data](https://github.com/d3/d3-selection/blob/master/README.md#selection_data) now returns the data for all elements in the selection, rather than just the data for the first group of elements. The [*selection*.call](https://github.com/d3/d3-selection/blob/master/README.md#selection_call) method no longer sets the `this` context when invoking the specified function; the *selection* is passed as the first argument to the function, so use that. The [*selection*.on](https://github.com/d3/d3-selection/blob/master/README.md#selection_on) method now accepts multiple whitespace-separated typenames, so you can add or remove multiple listeners simultaneously. For example: - -```js -selection.on("mousedown touchstart", function() { - console.log(d3.event.type); -}); -``` - -The arguments passed to callback functions has changed slightly in 4.0 to be more consistent. The standard arguments are the element’s datum (*d*), the element’s index (*i*), and the element’s group (*nodes*), with *this* as the element. The slight exception to this convention is *selection*.data, which is evaluated for each group rather than each element; it is passed the group’s parent datum (*d*), the group index (*i*), and the selection’s parents (*parents*), with *this* as the group’s parent. - -The new [d3.local](https://github.com/d3/d3-selection/blob/master/README.md#local-variables) provides a mechanism for defining [local variables](https://bl.ocks.org/mbostock/e1192fe405703d8321a5187350910e08): state that is bound to DOM elements, and available to any descendant element. This can be a convenient alternative to using [*selection*.each](https://github.com/d3/d3-selection/blob/master/README.md#selection_each) or storing local state in data. - -The d3.ns.prefix namespace prefix map has been renamed to [d3.namespaces](https://github.com/d3/d3-selection/blob/master/README.md#namespaces), and the d3.ns.qualify method has been renamed to [d3.namespace](https://github.com/d3/d3-selection/blob/master/README.md#namespace). Several new low-level methods are now available, as well. [d3.matcher](https://github.com/d3/d3-selection/blob/master/README.md#matcher) is used internally by [*selection*.filter](https://github.com/d3/d3-selection/blob/master/README.md#selection_filter); [d3.selector](https://github.com/d3/d3-selection/blob/master/README.md#selector) is used by [*selection*.select](https://github.com/d3/d3-selection/blob/master/README.md#selection_select); [d3.selectorAll](https://github.com/d3/d3-selection/blob/master/README.md#selectorAll) is used by [*selection*.selectAll](https://github.com/d3/d3-selection/blob/master/README.md#selection_selectAll); [d3.creator](https://github.com/d3/d3-selection/blob/master/README.md#creator) is used by [*selection*.append](https://github.com/d3/d3-selection/blob/master/README.md#selection_append) and [*selection*.insert](https://github.com/d3/d3-selection/blob/master/README.md#selection_insert). The new [d3.window](https://github.com/d3/d3-selection/blob/master/README.md#window) returns the owner window for a given element, window or document. The new [d3.customEvent](https://github.com/d3/d3-selection/blob/master/README.md#customEvent) temporarily sets [d3.event](https://github.com/d3/d3-selection/blob/master/README.md#event) while invoking a function, allowing you to implement controls which dispatch custom events; this is used by [d3-drag](https://github.com/d3/d3-drag), [d3-zoom](https://github.com/d3/d3-zoom) and [d3-brush](https://github.com/d3/d3-brush). - -For the sake of parsimony, the multi-value methods—where you pass an object to set multiple attributes, styles or properties simultaneously—have been extracted to [d3-selection-multi](https://github.com/d3/d3-selection-multi) and are no longer part of the default bundle. The multi-value map methods have also been renamed to plural form to reduce overload: [*selection*.attrs](https://github.com/d3/d3-selection-multi/blob/master/README.md#selection_attrs), [*selection*.styles](https://github.com/d3/d3-selection-multi/blob/master/README.md#selection_styles) and [*selection*.properties](https://github.com/d3/d3-selection-multi/blob/master/README.md#selection_properties). - -## [Shapes (d3-shape)](https://github.com/d3/d3-shape/blob/master/README.md) - -Pursuant to the great namespace flattening: - -* d3.svg.line ↦ [d3.line](https://github.com/d3/d3-shape/blob/master/README.md#lines) -* d3.svg.line.radial ↦ [d3.radialLine](https://github.com/d3/d3-shape/blob/master/README.md#radialLine) -* d3.svg.area ↦ [d3.area](https://github.com/d3/d3-shape/blob/master/README.md#areas) -* d3.svg.area.radial ↦ [d3.radialArea](https://github.com/d3/d3-shape/blob/master/README.md#radialArea) -* d3.svg.arc ↦ [d3.arc](https://github.com/d3/d3-shape/blob/master/README.md#arcs) -* d3.svg.symbol ↦ [d3.symbol](https://github.com/d3/d3-shape/blob/master/README.md#symbols) -* d3.svg.symbolTypes ↦ [d3.symbolTypes](https://github.com/d3/d3-shape/blob/master/README.md#symbolTypes) -* d3.layout.pie ↦ [d3.pie](https://github.com/d3/d3-shape/blob/master/README.md#pies) -* d3.layout.stack ↦ [d3.stack](https://github.com/d3/d3-shape/blob/master/README.md#stacks) -* d3.svg.diagonal ↦ REMOVED (see [d3/d3-shape#27](https://github.com/d3/d3-shape/issues/27)) -* d3.svg.diagonal.radial ↦ REMOVED - -Shapes are no longer limited to SVG; they can now render to Canvas! Shape generators now support an optional *context*: given a [CanvasRenderingContext2D](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D), you can render a shape as a canvas path to be filled or stroked. For example, a [canvas pie chart](https://bl.ocks.org/mbostock/8878e7fd82034f1d63cf) might use an arc generator: - -```js -var arc = d3.arc() - .outerRadius(radius - 10) - .innerRadius(0) - .context(context); -``` - -To render an arc for a given datum *d*: - -```js -context.beginPath(); -arc(d); -context.fill(); -``` - -See [*line*.context](https://github.com/d3/d3-shape/blob/master/README.md#line_context), [*area*.context](https://github.com/d3/d3-shape/blob/master/README.md#area_context) and [*arc*.context](https://github.com/d3/d3-shape/blob/master/README.md#arc_context) for more. Under the hood, shapes use [d3-path](#paths-d3-path) to serialize canvas path methods to SVG path data when the context is null; thus, shapes are optimized for rendering to canvas. You can also now derive lines from areas. The line shares most of the same accessors, such as [*line*.defined](https://github.com/d3/d3-shape/blob/master/README.md#line_defined) and [*line*.curve](https://github.com/d3/d3-shape/blob/master/README.md#line_curve), with the area from which it is derived. For example, to render the topline of an area, use [*area*.lineY1](https://github.com/d3/d3-shape/blob/master/README.md#area_lineY1); for the baseline, use [*area*.lineY0](https://github.com/d3/d3-shape/blob/master/README.md#area_lineY0). - -4.0 introduces a new curve API for specifying how line and area shapes interpolate between data points. The *line*.interpolate and *area*.interpolate methods have been replaced with [*line*.curve](https://github.com/d3/d3-shape/blob/master/README.md#line_curve) and [*area*.curve](https://github.com/d3/d3-shape/blob/master/README.md#area_curve). Curves are implemented using the [curve interface](https://github.com/d3/d3-shape/blob/master/README.md#custom-curves) rather than as a function that returns an SVG path data string; this allows curves to render to either SVG or Canvas. In addition, *line*.curve and *area*.curve now take a function which instantiates a curve for a given *context*, rather than a string. The full list of equivalents: - -* linear ↦ [d3.curveLinear](https://github.com/d3/d3-shape/blob/master/README.md#curveLinear) -* linear-closed ↦ [d3.curveLinearClosed](https://github.com/d3/d3-shape/blob/master/README.md#curveLinearClosed) -* step ↦ [d3.curveStep](https://github.com/d3/d3-shape/blob/master/README.md#curveStep) -* step-before ↦ [d3.curveStepBefore](https://github.com/d3/d3-shape/blob/master/README.md#curveStepBefore) -* step-after ↦ [d3.curveStepAfter](https://github.com/d3/d3-shape/blob/master/README.md#curveStepAfter) -* basis ↦ [d3.curveBasis](https://github.com/d3/d3-shape/blob/master/README.md#curveBasis) -* basis-open ↦ [d3.curveBasisOpen](https://github.com/d3/d3-shape/blob/master/README.md#curveBasisOpen) -* basis-closed ↦ [d3.curveBasisClosed](https://github.com/d3/d3-shape/blob/master/README.md#curveBasisClosed) -* bundle ↦ [d3.curveBundle](https://github.com/d3/d3-shape/blob/master/README.md#curveBundle) -* cardinal ↦ [d3.curveCardinal](https://github.com/d3/d3-shape/blob/master/README.md#curveCardinal) -* cardinal-open ↦ [d3.curveCardinalOpen](https://github.com/d3/d3-shape/blob/master/README.md#curveCardinalOpen) -* cardinal-closed ↦ [d3.curveCardinalClosed](https://github.com/d3/d3-shape/blob/master/README.md#curveCardinalClosed) -* monotone ↦ [d3.curveMonotoneX](https://github.com/d3/d3-shape/blob/master/README.md#curveMonotoneX) - -But that’s not all! 4.0 now provides parameterized Catmull–Rom splines as proposed by [Yuksel *et al.*](http://www.cemyuksel.com/research/catmullrom_param/). These are available as [d3.curveCatmullRom](https://github.com/d3/d3-shape/blob/master/README.md#curveCatmullRom), [d3.curveCatmullRomClosed](https://github.com/d3/d3-shape/blob/master/README.md#curveCatmullRomClosed) and [d3.curveCatmullRomOpen](https://github.com/d3/d3-shape/blob/master/README.md#curveCatmullRomOpen). - -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/catmullRom.png" width="888" height="240" alt="catmullRom"> -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/catmullRomOpen.png" width="888" height="240" alt="catmullRomOpen"> -<img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/catmullRomClosed.png" width="888" height="330" alt="catmullRomClosed"> - -Each curve type can define its own named parameters, replacing *line*.tension and *area*.tension. For example, Catmull–Rom splines are parameterized using [*catmullRom*.alpha](https://github.com/d3/d3-shape/blob/master/README.md#curveCatmullRom_alpha) and defaults to 0.5, which corresponds to a centripetal spline that avoids self-intersections and overshoot. For a uniform Catmull–Rom spline instead: - -```js -var line = d3.line() - .curve(d3.curveCatmullRom.alpha(0)); -``` - -4.0 fixes the interpretation of the cardinal spline *tension* parameter, which is now specified as [*cardinal*.tension](https://github.com/d3/d3-shape/blob/master/README.md#curveCardinal_tension) and defaults to zero for a uniform Catmull–Rom spline; a tension of one produces a linear curve. The first and last segments of basis and cardinal curves have also been fixed! The undocumented *interpolate*.reverse field has been removed. Curves can define different behavior for toplines and baselines by counting the sequence of [*curve*.lineStart](https://github.com/d3/d3-shape/blob/master/README.md#curve_lineStart) within [*curve*.areaStart](https://github.com/d3/d3-shape/blob/master/README.md#curve_areaStart). See the [d3.curveStep implementation](https://github.com/d3/d3-shape/blob/master/src/curve/step.js) for an example. - -4.0 fixes numerous bugs in the monotone curve implementation, and introduces [d3.curveMonotoneY](https://github.com/d3/d3-shape/blob/master/README.md#curveMonotoneY); this is like d3.curveMonotoneX, except it requires that the input points are monotone in *y* rather than *x*, such as for a vertically-oriented line chart. The new [d3.curveNatural](https://github.com/d3/d3-shape/blob/master/README.md#curveNatural) produces a [natural cubic spline](http://mathworld.wolfram.com/CubicSpline.html). The default [β](https://github.com/d3/d3-shape/blob/master/README.md#bundle_beta) for [d3.curveBundle](https://github.com/d3/d3-shape/blob/master/README.md#curveBundle) is now 0.85, rather than 0.7, matching the values used by [Holten](https://www.win.tue.nl/vis1/home/dholten/papers/bundles_infovis.pdf). 4.0 also has a more robust implementation of arc padding; see [*arc*.padAngle](https://github.com/d3/d3-shape/blob/master/README.md#arc_padAngle) and [*arc*.padRadius](https://github.com/d3/d3-shape/blob/master/README.md#arc_padRadius). - -4.0 introduces a new symbol type API. Symbol types are passed to [*symbol*.type](https://github.com/d3/d3-shape/blob/master/README.md#symbol_type) in place of strings. The equivalents are: - -* circle ↦ [d3.symbolCircle](https://github.com/d3/d3-shape/blob/master/README.md#symbolCircle) -* cross ↦ [d3.symbolCross](https://github.com/d3/d3-shape/blob/master/README.md#symbolCross) -* diamond ↦ [d3.symbolDiamond](https://github.com/d3/d3-shape/blob/master/README.md#symbolDiamond) -* square ↦ [d3.symbolSquare](https://github.com/d3/d3-shape/blob/master/README.md#symbolSquare) -* triangle-down ↦ REMOVED -* triangle-up ↦ [d3.symbolTriangle](https://github.com/d3/d3-shape/blob/master/README.md#symbolTriangle) -* ADDED ↦ [d3.symbolStar](https://github.com/d3/d3-shape/blob/master/README.md#symbolStar) -* ADDED ↦ [d3.symbolWye](https://github.com/d3/d3-shape/blob/master/README.md#symbolWye) - -The full set of symbol types is now: - -<a href="#symbolCircle"><img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/circle.png" width="100" height="100"></a><a href="#symbolCross"><img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/cross.png" width="100" height="100"></a><a href="#symbolDiamond"><img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/diamond.png" width="100" height="100"></a><a href="#symbolSquare"><img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/square.png" width="100" height="100"></a><a href="#symbolStar"><img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/star.png" width="100" height="100"></a><a href="#symbolTriangle"><img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/triangle.png" width="100" height="100"><a href="#symbolWye"><img src="https://raw.githubusercontent.com/d3/d3-shape/master/img/wye.png" width="100" height="100"></a> - -Lastly, 4.0 overhauls the stack layout API, replacing d3.layout.stack with [d3.stack](https://github.com/d3/d3-shape/blob/master/README.md#stacks). The stack generator no longer needs an *x*-accessor. In addition, the API has been simplified: the *stack* generator now accepts tabular input, such as this array of objects: - -```js -var data = [ - {month: new Date(2015, 0, 1), apples: 3840, bananas: 1920, cherries: 960, dates: 400}, - {month: new Date(2015, 1, 1), apples: 1600, bananas: 1440, cherries: 960, dates: 400}, - {month: new Date(2015, 2, 1), apples: 640, bananas: 960, cherries: 640, dates: 400}, - {month: new Date(2015, 3, 1), apples: 320, bananas: 480, cherries: 640, dates: 400} -]; -``` - -To generate the stack layout, first define a stack generator, and then apply it to the data: - -```js -var stack = d3.stack() - .keys(["apples", "bananas", "cherries", "dates"]) - .order(d3.stackOrderNone) - .offset(d3.stackOffsetNone); - -var series = stack(data); -``` - -The resulting array has one element per *series*. Each series has one point per month, and each point has a lower and upper value defining the baseline and topline: - -```js -[ - [[ 0, 3840], [ 0, 1600], [ 0, 640], [ 0, 320]], // apples - [[3840, 5760], [1600, 3040], [ 640, 1600], [ 320, 800]], // bananas - [[5760, 6720], [3040, 4000], [1600, 2240], [ 800, 1440]], // cherries - [[6720, 7120], [4000, 4400], [2240, 2640], [1440, 1840]], // dates -] -``` - -Each series in then typically passed to an [area generator](https://github.com/d3/d3-shape/blob/master/README.md#areas) to render an area chart, or used to construct rectangles for a bar chart. Stack generators no longer modify the input data, so *stack*.out has been removed. - -For an introduction to shapes, see [Introducing d3-shape](https://medium.com/@mbostock/introducing-d3-shape-73f8367e6d12). - -## [Time Formats (d3-time-format)](https://github.com/d3/d3-time-format/blob/master/README.md) - -Pursuant to the great namespace flattening, the format constructors have new names: - -* d3.time.format ↦ [d3.timeFormat](https://github.com/d3/d3-time-format/blob/master/README.md#timeFormat) -* d3.time.format.utc ↦ [d3.utcFormat](https://github.com/d3/d3-time-format/blob/master/README.md#utcFormat) -* d3.time.format.iso ↦ [d3.isoFormat](https://github.com/d3/d3-time-format/blob/master/README.md#isoFormat) - -The *format*.parse method has also been removed in favor of separate [d3.timeParse](https://github.com/d3/d3-time-format/blob/master/README.md#timeParse), [d3.utcParse](https://github.com/d3/d3-time-format/blob/master/README.md#utcParse) and [d3.isoParse](https://github.com/d3/d3-time-format/blob/master/README.md#isoParse) parser constructors. Thus, this code in 3.x: - -```js -var parseTime = d3.time.format("%c").parse; -``` - -Can be rewritten in 4.0 as: - -```js -var parseTime = d3.timeParse("%c"); -``` - -The multi-scale time format d3.time.format.multi has been replaced by [d3.scaleTime](https://github.com/d3/d3-scale/blob/master/README.md#scaleTime)’s [tick format](https://github.com/d3/d3-scale/blob/master/README.md#time_tickFormat). Time formats now coerce inputs to dates, and time parsers coerce inputs to strings. The `%Z` directive now allows more flexible parsing of time zone offsets, such as `-0700`, `-07:00`, `-07`, and `Z`. The `%p` directive is now parsed correctly when the locale’s period name is longer than two characters (*e.g.*, “a.m.â€). - -The default U.S. English locale now uses 12-hour time and a more concise representation of the date. This aligns with local convention and is consistent with [*date*.toLocaleString](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString) in Chrome, Firefox and Node: - -```js -var now = new Date; -d3.timeFormat("%c")(new Date); // "6/23/2016, 2:01:33 PM" -d3.timeFormat("%x")(new Date); // "6/23/2016" -d3.timeFormat("%X")(new Date); // "2:01:38 PM" -``` - -You can now set the default locale using [d3.timeFormatDefaultLocale](https://github.com/d3/d3-time-format/blob/master/README.md#timeFormatDefaultLocale)! The locales are published as [JSON](https://github.com/d3/d3-request/blob/master/README.md#json) to [npm](https://unpkg.com/d3-time-format/locale/). - -The performance of time formatting and parsing has been improved, and the UTC formatter and parser have a cleaner implementation (that avoids temporarily overriding the Date global). - -## [Time Intervals (d3-time)](https://github.com/d3/d3-time/blob/master/README.md) - -Pursuant to the great namespace flattening, the local time intervals have been renamed: - -* ADDED ↦ [d3.timeMillisecond](https://github.com/d3/d3-time/blob/master/README.md#timeMillisecond) -* d3.time.second ↦ [d3.timeSecond](https://github.com/d3/d3-time/blob/master/README.md#timeSecond) -* d3.time.minute ↦ [d3.timeMinute](https://github.com/d3/d3-time/blob/master/README.md#timeMinute) -* d3.time.hour ↦ [d3.timeHour](https://github.com/d3/d3-time/blob/master/README.md#timeHour) -* d3.time.day ↦ [d3.timeDay](https://github.com/d3/d3-time/blob/master/README.md#timeDay) -* d3.time.sunday ↦ [d3.timeSunday](https://github.com/d3/d3-time/blob/master/README.md#timeSunday) -* d3.time.monday ↦ [d3.timeMonday](https://github.com/d3/d3-time/blob/master/README.md#timeMonday) -* d3.time.tuesday ↦ [d3.timeTuesday](https://github.com/d3/d3-time/blob/master/README.md#timeTuesday) -* d3.time.wednesday ↦ [d3.timeWednesday](https://github.com/d3/d3-time/blob/master/README.md#timeWednesday) -* d3.time.thursday ↦ [d3.timeThursday](https://github.com/d3/d3-time/blob/master/README.md#timeThursday) -* d3.time.friday ↦ [d3.timeFriday](https://github.com/d3/d3-time/blob/master/README.md#timeFriday) -* d3.time.saturday ↦ [d3.timeSaturday](https://github.com/d3/d3-time/blob/master/README.md#timeSaturday) -* d3.time.week ↦ [d3.timeWeek](https://github.com/d3/d3-time/blob/master/README.md#timeWeek) -* d3.time.month ↦ [d3.timeMonth](https://github.com/d3/d3-time/blob/master/README.md#timeMonth) -* d3.time.year ↦ [d3.timeYear](https://github.com/d3/d3-time/blob/master/README.md#timeYear) - -The UTC time intervals have likewise been renamed: - -* ADDED ↦ [d3.utcMillisecond](https://github.com/d3/d3-time/blob/master/README.md#utcMillisecond) -* d3.time.second.utc ↦ [d3.utcSecond](https://github.com/d3/d3-time/blob/master/README.md#utcSecond) -* d3.time.minute.utc ↦ [d3.utcMinute](https://github.com/d3/d3-time/blob/master/README.md#utcMinute) -* d3.time.hour.utc ↦ [d3.utcHour](https://github.com/d3/d3-time/blob/master/README.md#utcHour) -* d3.time.day.utc ↦ [d3.utcDay](https://github.com/d3/d3-time/blob/master/README.md#utcDay) -* d3.time.sunday.utc ↦ [d3.utcSunday](https://github.com/d3/d3-time/blob/master/README.md#utcSunday) -* d3.time.monday.utc ↦ [d3.utcMonday](https://github.com/d3/d3-time/blob/master/README.md#utcMonday) -* d3.time.tuesday.utc ↦ [d3.utcTuesday](https://github.com/d3/d3-time/blob/master/README.md#utcTuesday) -* d3.time.wednesday.utc ↦ [d3.utcWednesday](https://github.com/d3/d3-time/blob/master/README.md#utcWednesday) -* d3.time.thursday.utc ↦ [d3.utcThursday](https://github.com/d3/d3-time/blob/master/README.md#utcThursday) -* d3.time.friday.utc ↦ [d3.utcFriday](https://github.com/d3/d3-time/blob/master/README.md#utcFriday) -* d3.time.saturday.utc ↦ [d3.utcSaturday](https://github.com/d3/d3-time/blob/master/README.md#utcSaturday) -* d3.time.week.utc ↦ [d3.utcWeek](https://github.com/d3/d3-time/blob/master/README.md#utcWeek) -* d3.time.month.utc ↦ [d3.utcMonth](https://github.com/d3/d3-time/blob/master/README.md#utcMonth) -* d3.time.year.utc ↦ [d3.utcYear](https://github.com/d3/d3-time/blob/master/README.md#utcYear) - -The local time range aliases have been renamed: - -* d3.time.seconds ↦ [d3.timeSeconds](https://github.com/d3/d3-time/blob/master/README.md#timeSeconds) -* d3.time.minutes ↦ [d3.timeMinutes](https://github.com/d3/d3-time/blob/master/README.md#timeMinutes) -* d3.time.hours ↦ [d3.timeHours](https://github.com/d3/d3-time/blob/master/README.md#timeHours) -* d3.time.days ↦ [d3.timeDays](https://github.com/d3/d3-time/blob/master/README.md#timeDays) -* d3.time.sundays ↦ [d3.timeSundays](https://github.com/d3/d3-time/blob/master/README.md#timeSundays) -* d3.time.mondays ↦ [d3.timeMondays](https://github.com/d3/d3-time/blob/master/README.md#timeMondays) -* d3.time.tuesdays ↦ [d3.timeTuesdays](https://github.com/d3/d3-time/blob/master/README.md#timeTuesdays) -* d3.time.wednesdays ↦ [d3.timeWednesdays](https://github.com/d3/d3-time/blob/master/README.md#timeWednesdays) -* d3.time.thursdays ↦ [d3.timeThursdays](https://github.com/d3/d3-time/blob/master/README.md#timeThursdays) -* d3.time.fridays ↦ [d3.timeFridays](https://github.com/d3/d3-time/blob/master/README.md#timeFridays) -* d3.time.saturdays ↦ [d3.timeSaturdays](https://github.com/d3/d3-time/blob/master/README.md#timeSaturdays) -* d3.time.weeks ↦ [d3.timeWeeks](https://github.com/d3/d3-time/blob/master/README.md#timeWeeks) -* d3.time.months ↦ [d3.timeMonths](https://github.com/d3/d3-time/blob/master/README.md#timeMonths) -* d3.time.years ↦ [d3.timeYears](https://github.com/d3/d3-time/blob/master/README.md#timeYears) - -The UTC time range aliases have been renamed: - -* d3.time.seconds.utc ↦ [d3.utcSeconds](https://github.com/d3/d3-time/blob/master/README.md#utcSeconds) -* d3.time.minutes.utc ↦ [d3.utcMinutes](https://github.com/d3/d3-time/blob/master/README.md#utcMinutes) -* d3.time.hours.utc ↦ [d3.utcHours](https://github.com/d3/d3-time/blob/master/README.md#utcHours) -* d3.time.days.utc ↦ [d3.utcDays](https://github.com/d3/d3-time/blob/master/README.md#utcDays) -* d3.time.sundays.utc ↦ [d3.utcSundays](https://github.com/d3/d3-time/blob/master/README.md#utcSundays) -* d3.time.mondays.utc ↦ [d3.utcMondays](https://github.com/d3/d3-time/blob/master/README.md#utcMondays) -* d3.time.tuesdays.utc ↦ [d3.utcTuesdays](https://github.com/d3/d3-time/blob/master/README.md#utcTuesdays) -* d3.time.wednesdays.utc ↦ [d3.utcWednesdays](https://github.com/d3/d3-time/blob/master/README.md#utcWednesdays) -* d3.time.thursdays.utc ↦ [d3.utcThursdays](https://github.com/d3/d3-time/blob/master/README.md#utcThursdays) -* d3.time.fridays.utc ↦ [d3.utcFridays](https://github.com/d3/d3-time/blob/master/README.md#utcFridays) -* d3.time.saturdays.utc ↦ [d3.utcSaturdays](https://github.com/d3/d3-time/blob/master/README.md#utcSaturdays) -* d3.time.weeks.utc ↦ [d3.utcWeeks](https://github.com/d3/d3-time/blob/master/README.md#utcWeeks) -* d3.time.months.utc ↦ [d3.utcMonths](https://github.com/d3/d3-time/blob/master/README.md#utcMonths) -* d3.time.years.utc ↦ [d3.utcYears](https://github.com/d3/d3-time/blob/master/README.md#utcYears) - -The behavior of [*interval*.range](https://github.com/d3/d3-time/blob/master/README.md#interval_range) (and the convenience aliases such as [d3.timeDays](https://github.com/d3/d3-time/blob/master/README.md#timeDays)) has been changed when *step* is greater than one. Rather than filtering the returned dates using the field number, *interval*.range now behaves like [d3.range](https://github.com/d3/d3-array/blob/master/README.md#range): it simply skips, returning every *step*th date. For example, the following code in 3.x returns only odd days of the month: - -```js -d3.time.days(new Date(2016, 4, 28), new Date(2016, 5, 5), 2); -// [Sun May 29 2016 00:00:00 GMT-0700 (PDT), -// Tue May 31 2016 00:00:00 GMT-0700 (PDT), -// Wed Jun 01 2016 00:00:00 GMT-0700 (PDT), -// Fri Jun 03 2016 00:00:00 GMT-0700 (PDT)] -``` - -Note the returned array of dates does not start on the *start* date because May 28 is even. Also note that May 31 and June 1 are one day apart, not two! The behavior of d3.timeDays in 4.0 is probably closer to what you expect: - -```js -d3.timeDays(new Date(2016, 4, 28), new Date(2016, 5, 5), 2); -// [Sat May 28 2016 00:00:00 GMT-0700 (PDT), -// Mon May 30 2016 00:00:00 GMT-0700 (PDT), -// Wed Jun 01 2016 00:00:00 GMT-0700 (PDT), -// Fri Jun 03 2016 00:00:00 GMT-0700 (PDT)] -``` - -If you want a filtered view of a time interval (say to guarantee that two overlapping ranges are consistent, such as when generating [time scale ticks](https://github.com/d3/d3-scale/blob/master/README.md#time_ticks)), you can use the new [*interval*.every](https://github.com/d3/d3-time/blob/master/README.md#interval_every) method or its more general cousin [*interval*.filter](https://github.com/d3/d3-time/blob/master/README.md#interval_filter): - -```js -d3.timeDay.every(2).range(new Date(2016, 4, 28), new Date(2016, 5, 5)); -// [Sun May 29 2016 00:00:00 GMT-0700 (PDT), -// Tue May 31 2016 00:00:00 GMT-0700 (PDT), -// Wed Jun 01 2016 00:00:00 GMT-0700 (PDT), -// Fri Jun 03 2016 00:00:00 GMT-0700 (PDT)] -``` - -Time intervals now expose an [*interval*.count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) method for counting the number of interval boundaries after a *start* date and before or equal to an *end* date. This replaces d3.time.dayOfYear and related methods in 3.x. For example, this code in 3.x: - -```js -var now = new Date; -d3.time.dayOfYear(now); // 165 -``` - -Can be rewritten in 4.0 as: - -```js -var now = new Date; -d3.timeDay.count(d3.timeYear(now), now); // 165 -``` - -Likewise, in place of 3.x’s d3.time.weekOfYear, in 4.0 you would say: - -```js -d3.timeWeek.count(d3.timeYear(now), now); // 24 -``` - -The new *interval*.count is of course more general. For example, you can use it to compute hour-of-week for a heatmap: - -```js -d3.timeHour.count(d3.timeWeek(now), now); // 64 -``` - -Here are all the equivalences from 3.x to 4.0: - -* d3.time.dayOfYear ↦ [d3.timeDay](https://github.com/d3/d3-time/blob/master/README.md#timeDay).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.sundayOfYear ↦ [d3.timeSunday](https://github.com/d3/d3-time/blob/master/README.md#timeSunday).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.mondayOfYear ↦ [d3.timeMonday](https://github.com/d3/d3-time/blob/master/README.md#timeMonday).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.tuesdayOfYear ↦ [d3.timeTuesday](https://github.com/d3/d3-time/blob/master/README.md#timeTuesday).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.wednesdayOfYear ↦ [d3.timeWednesday](https://github.com/d3/d3-time/blob/master/README.md#timeWednesday).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.thursdayOfYear ↦ [d3.timeThursday](https://github.com/d3/d3-time/blob/master/README.md#timeThursday).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.fridayOfYear ↦ [d3.timeFriday](https://github.com/d3/d3-time/blob/master/README.md#timeFriday).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.saturdayOfYear ↦ [d3.timeSaturday](https://github.com/d3/d3-time/blob/master/README.md#timeSaturday).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.weekOfYear ↦ [d3.timeWeek](https://github.com/d3/d3-time/blob/master/README.md#timeWeek).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.dayOfYear.utc ↦ [d3.utcDay](https://github.com/d3/d3-time/blob/master/README.md#utcDay).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.sundayOfYear.utc ↦ [d3.utcSunday](https://github.com/d3/d3-time/blob/master/README.md#utcSunday).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.mondayOfYear.utc ↦ [d3.utcMonday](https://github.com/d3/d3-time/blob/master/README.md#utcMonday).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.tuesdayOfYear.utc ↦ [d3.utcTuesday](https://github.com/d3/d3-time/blob/master/README.md#utcTuesday).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.wednesdayOfYear.utc ↦ [d3.utcWednesday](https://github.com/d3/d3-time/blob/master/README.md#utcWednesday).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.thursdayOfYear.utc ↦ [d3.utcThursday](https://github.com/d3/d3-time/blob/master/README.md#utcThursday).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.fridayOfYear.utc ↦ [d3.utcFriday](https://github.com/d3/d3-time/blob/master/README.md#utcFriday).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.saturdayOfYear.utc ↦ [d3.utcSaturday](https://github.com/d3/d3-time/blob/master/README.md#utcSaturday).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) -* d3.time.weekOfYear.utc ↦ [d3.utcWeek](https://github.com/d3/d3-time/blob/master/README.md#utcWeek).[count](https://github.com/d3/d3-time/blob/master/README.md#interval_count) - -D3 4.0 now also lets you define custom time intervals using [d3.timeInterval](https://github.com/d3/d3-time/blob/master/README.md#timeInterval). The [d3.timeYear](https://github.com/d3/d3-time/blob/master/README.md#timeYear), [d3.utcYear](https://github.com/d3/d3-time/blob/master/README.md#utcYear), [d3.timeMillisecond](https://github.com/d3/d3-time/blob/master/README.md#timeMillisecond) and [d3.utcMillisecond](https://github.com/d3/d3-time/blob/master/README.md#utcMillisecond) intervals have optimized implementations of [*interval*.every](https://github.com/d3/d3-time/blob/master/README.md#interval_every), which is necessary to generate time ticks for very large or very small domains efficiently. More generally, the performance of time intervals has been improved, and time intervals now do a better job with respect to daylight savings in various locales. - -## [Timers (d3-timer)](https://github.com/d3/d3-timer/blob/master/README.md) - -In D3 3.x, the only way to stop a timer was for its callback to return true. For example, this timer stops after one second: - -```js -d3.timer(function(elapsed) { - console.log(elapsed); - return elapsed >= 1000; -}); -``` - -In 4.0, use [*timer*.stop](https://github.com/d3/d3-timer/blob/master/README.md#timer_stop) instead: - -```js -var t = d3.timer(function(elapsed) { - console.log(elapsed); - if (elapsed >= 1000) { - t.stop(); - } -}); -``` - -The primary benefit of *timer*.stop is that timers are not required to self-terminate: they can be stopped externally, allowing for the immediate and synchronous disposal of associated resources, and the separation of concerns. The above is equivalent to: - -```js -var t = d3.timer(function(elapsed) { - console.log(elapsed); -}); - -d3.timeout(function() { - t.stop(); -}, 1000); -``` - -This improvement extends to [d3-transition](#transitions-d3-transition): now when a transition is interrupted, its resources are immediately freed rather than having to wait for transition to start. - -4.0 also introduces a new [*timer*.restart](https://github.com/d3/d3-timer/blob/master/README.md#timer_restart) method for restarting timers, for replacing the callback of a running timer, or for changing its delay or reference time. Unlike *timer*.stop followed by [d3.timer](https://github.com/d3/d3-timer/blob/master/README.md#timer), *timer*.restart maintains the invocation priority of an existing timer: it guarantees that the order of invocation of active timers remains the same. The d3.timer.flush method has been renamed to [d3.timerFlush](https://github.com/d3/d3-timer/blob/master/README.md#timerFlush). - -Some usage patterns in D3 3.x could cause the browser to hang when a background page returned to the foreground. For example, the following code schedules a transition every second: - -```js -setInterval(function() { - d3.selectAll("div").transition().call(someAnimation); // BAD -}, 1000); -``` - -If such code runs in the background for hours, thousands of queued transitions will try to run simultaneously when the page is foregrounded. D3 4.0 avoids this hang by freezing time in the background: when a page is in the background, time does not advance, and so no queue of timers accumulates to run when the page returns to the foreground. Use d3.timer instead of transitions to schedule a long-running animation, or use [d3.timeout](https://github.com/d3/d3-timer/blob/master/README.md#timeout) and [d3.interval](https://github.com/d3/d3-timer/blob/master/README.md#interval) in place of setTimeout and setInterval to prevent transitions from being queued in the background: - -```js -d3.interval(function() { - d3.selectAll("div").transition().call(someAnimation); // GOOD -}, 1000); -``` - -By freezing time in the background, timers are effectively “unaware†of being backgrounded. It’s like nothing happened! 4.0 also now uses high-precision time ([performance.now](https://developer.mozilla.org/en-US/docs/Web/API/Performance/now)) where available; the current time is available as [d3.now](https://github.com/d3/d3-timer/blob/master/README.md#now). - -## [Transitions (d3-transition)](https://github.com/d3/d3-transition/blob/master/README.md) - -The [*selection*.transition](https://github.com/d3/d3-transition/blob/master/README.md#selection_transition) method now takes an optional *transition* instance which can be used to synchronize a new transition with an existing transition. (This change is discussed further in [What Makes Software Good?](https://medium.com/@mbostock/what-makes-software-good-943557f8a488)) For example: - -```js -var t = d3.transition() - .duration(750) - .ease(d3.easeLinear); - -d3.selectAll(".apple").transition(t) - .style("fill", "red"); - -d3.selectAll(".orange").transition(t) - .style("fill", "orange"); -``` - -Transitions created this way inherit timing from the closest ancestor element, and thus are synchronized even when the referenced *transition* has variable timing such as a staggered delay. This method replaces the deeply magical behavior of *transition*.each in 3.x; in 4.0, [*transition*.each](https://github.com/d3/d3-transition/blob/master/README.md#transition_each) is identical to [*selection*.each](https://github.com/d3/d3-selection/blob/master/README.md#selection_each). Use the new [*transition*.on](https://github.com/d3/d3-transition/blob/master/README.md#transition_on) method to listen to transition events. - -The meaning of [*transition*.delay](https://github.com/d3/d3-transition/blob/master/README.md#transition_delay) has changed for chained transitions created by [*transition*.transition](https://github.com/d3/d3-transition/blob/master/README.md#transition_transition). The specified delay is now relative to the *previous* transition in the chain, rather than the *first* transition in the chain; this makes it easier to insert interstitial pauses. For example: - -```js -d3.selectAll(".apple") - .transition() // First fade to green. - .style("fill", "green") - .transition() // Then red. - .style("fill", "red") - .transition() // Wait one second. Then brown, and remove. - .delay(1000) - .style("fill", "brown") - .remove(); -``` - -Time is now frozen in the background; see [d3-timer](#timers-d3-timer) for more information. While it was previously the case that transitions did not run in the background, now they pick up where they left off when the page returns to the foreground. This avoids page hangs by not scheduling an unbounded number of transitions in the background. If you want to schedule an infinitely-repeating transition, use transition events, or use [d3.timeout](https://github.com/d3/d3-timer/blob/master/README.md#timeout) and [d3.interval](https://github.com/d3/d3-timer/blob/master/README.md#interval) in place of [setTimeout](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout) and [setInterval](https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setInterval). - -The [*selection*.interrupt](https://github.com/d3/d3-transition/blob/master/README.md#selection_interrupt) method now cancels all scheduled transitions on the selected elements, in addition to interrupting any active transition. When transitions are interrupted, any resources associated with the transition are now released immediately, rather than waiting until the transition starts, improving performance. (See also [*timer*.stop](https://github.com/d3/d3-timer/blob/master/README.md#timer_stop).) The new [d3.interrupt](https://github.com/d3/d3-transition/blob/master/README.md#interrupt) method is an alternative to [*selection*.interrupt](https://github.com/d3/d3-transition/blob/master/README.md#selection_interrupt) for quickly interrupting a single node. - -The new [d3.active](https://github.com/d3/d3-transition/blob/master/README.md#active) method allows you to select the currently-active transition on a given *node*, if any. This is useful for modifying in-progress transitions and for scheduling infinitely-repeating transitions. For example, this transition continuously oscillates between red and blue: - -```js -d3.select("circle") - .transition() - .on("start", function repeat() { - d3.active(this) - .style("fill", "red") - .transition() - .style("fill", "blue") - .transition() - .on("start", repeat); - }); -``` - -The [life cycle of a transition](https://github.com/d3/d3-transition/blob/master/README.md#the-life-of-a-transition) is now more formally defined and enforced. For example, attempting to change the duration of a running transition now throws an error rather than silently failing. The [*transition*.remove](https://github.com/d3/d3-transition/blob/master/README.md#transition_remove) method has been fixed if multiple transition names are in use: the element is only removed if it has no scheduled transitions, regardless of name. The [*transition*.ease](https://github.com/d3/d3-transition/blob/master/README.md#transition_ease) method now always takes an [easing function](#easings-d3-ease), not a string. When a transition ends, the tweens are invoked one last time with *t* equal to exactly 1, regardless of the associated easing function. - -As with [selections](#selections-d3-selection) in 4.0, all transition callback functions now receive the standard arguments: the element’s datum (*d*), the element’s index (*i*), and the element’s group (*nodes*), with *this* as the element. This notably affects [*transition*.attrTween](https://github.com/d3/d3-transition/blob/master/README.md#transition_attrTween) and [*transition*.styleTween](https://github.com/d3/d3-transition/blob/master/README.md#transition_styleTween), which no longer pass the *tween* function the current attribute or style value as the third argument. The *transition*.attrTween and *transition*.styleTween methods can now be called in getter modes for debugging or to share tween definitions between transitions. - -Homogenous transitions are now optimized! If all elements in a transition share the same tween, interpolator, or event listeners, this state is now shared across the transition rather than separately allocated for each element. 4.0 also uses an optimized default interpolator in place of [d3.interpolate](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolate) for [*transition*.attr](https://github.com/d3/d3-transition/blob/master/README.md#transition_attr) and [*transition*.style](https://github.com/d3/d3-transition/blob/master/README.md#transition_style). And transitions can now interpolate both [CSS](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateTransformCss) and [SVG](https://github.com/d3/d3-interpolate/blob/master/README.md#interpolateTransformSvg) transforms. - -For reusable components that support transitions, such as [axes](#axes-d3-axis), a new [*transition*.selection](https://github.com/d3/d3-transition/blob/master/README.md#transition_selection) method returns the [selection](#selections-d3-selection) that corresponds to a given transition. There is also a new [*transition*.merge](https://github.com/d3/d3-transition/blob/master/README.md#transition_merge) method that is equivalent to [*selection*.merge](https://github.com/d3/d3-selection/blob/master/README.md#selection_merge). - -For the sake of parsimony, the multi-value map methods have been extracted to [d3-selection-multi](https://github.com/d3/d3-selection-multi) and are no longer part of the default bundle. The multi-value map methods have also been renamed to plural form to reduce overload: [*transition*.attrs](https://github.com/d3/d3-selection-multi/blob/master/README.md#transition_attrs) and [*transition*.styles](https://github.com/d3/d3-selection-multi/blob/master/README.md#transition_styles). - -## [Voronoi Diagrams (d3-voronoi)](https://github.com/d3/d3-voronoi/blob/master/README.md) - -The d3.geom.voronoi method has been renamed to [d3.voronoi](https://github.com/d3/d3-voronoi/blob/master/README.md#voronoi), and the *voronoi*.clipExtent method has been renamed to [*voronoi*.extent](https://github.com/d3/d3-voronoi/blob/master/README.md#voronoi_extent). The undocumented *polygon*.point property in 3.x, which is the element in the input *data* corresponding to the polygon, has been renamed to *polygon*.data. - -Calling [*voronoi*](https://github.com/d3/d3-voronoi/blob/master/README.md#_voronoi) now returns the full [Voronoi diagram](https://github.com/d3/d3-voronoi/blob/master/README.md#voronoi-diagrams), which includes topological information: each Voronoi edge exposes *edge*.left and *edge*.right specifying the sites on either side of the edge, and each Voronoi cell is defined as an array of these edges and a corresponding site. The Voronoi diagram can be used to efficiently compute both the Voronoi and Delaunay tessellations for a set of points: [*diagram*.polygons](https://github.com/d3/d3-voronoi/blob/master/README.md#diagram_polygons), [*diagram*.links](https://github.com/d3/d3-voronoi/blob/master/README.md#diagram_links), and [*diagram*.triangles](https://github.com/d3/d3-voronoi/blob/master/README.md#diagram_triangles). The new topology is also useful in conjunction with TopoJSON; see the [Voronoi topology example](https://bl.ocks.org/mbostock/cd52a201d7694eb9d890). - -The [*voronoi*.polygons](https://github.com/d3/d3-voronoi/blob/master/README.md#voronoi_polygons) and [*diagram*.polygons](https://github.com/d3/d3-voronoi/blob/master/README.md#diagram_polygons) now require an [extent](https://github.com/d3/d3-voronoi/blob/master/README.md#voronoi_extent); there is no longer an implicit extent of ±1e6. The [*voronoi*.links](https://github.com/d3/d3-voronoi/blob/master/README.md#voronoi_links), [*voronoi*.triangles](https://github.com/d3/d3-voronoi/blob/master/README.md#voronoi_triangles), [*diagram*.links](https://github.com/d3/d3-voronoi/blob/master/README.md#diagram_links) and [*diagram*.triangles](https://github.com/d3/d3-voronoi/blob/master/README.md#diagram_triangles) are now affected by the clip extent: as the Delaunay is computed as the dual of the Voronoi, two sites are only linked if the clipped cells are touching. To compute the Delaunay triangulation without respect to clipping, set the extent to null. - -The Voronoi generator finally has well-defined behavior for coincident vertices: the first of a set of coincident points has a defined cell, while the subsequent duplicate points have null cells. The returned array of polygons is sparse, so by using *array*.forEach or *array*.map, you can easily skip undefined cells. The Voronoi generator also now correctly handles the case where no cell edges intersect the extent. - -## [Zooming (d3-zoom)](https://github.com/d3/d3-zoom/blob/master/README.md) - -The zoom behavior d3.behavior.zoom has been renamed to d3.zoom. Zoom behaviors no longer store the active zoom transform (*i.e.*, the visible region; the scale and translate) internally. The zoom transform is now stored on any elements to which the zoom behavior has been applied. The zoom transform is available as *event*.transform within a zoom event or by calling [d3.zoomTransform](https://github.com/d3/d3-zoom/blob/master/README.md#zoomTransform) on a given *element*. To zoom programmatically, use [*zoom*.transform](https://github.com/d3/d3-zoom/blob/master/README.md#zoom_transform) with a given [selection](#selections-d3-selection) or [transition](#transitions-d3-transition); see the [zoom transitions example](https://bl.ocks.org/mbostock/b783fbb2e673561d214e09c7fb5cedee). The *zoom*.event method has been removed. - -To make programmatic zooming easier, there are several new convenience methods on top of *zoom*.transform: [*zoom*.translateBy](https://github.com/d3/d3-zoom/blob/master/README.md#zoom_translateBy), [*zoom*.scaleBy](https://github.com/d3/d3-zoom/blob/master/README.md#zoom_scaleBy) and [*zoom*.scaleTo](https://github.com/d3/d3-zoom/blob/master/README.md#zoom_scaleTo). There is also a new API for describing [zoom transforms](https://github.com/d3/d3-zoom/blob/master/README.md#zoom-transforms). Zoom behaviors are no longer dependent on [scales](#scales-d3-scale), but you can use [*transform*.rescaleX](https://github.com/d3/d3-zoom/blob/master/README.md#transform_rescaleX), [*transform*.rescaleY](https://github.com/d3/d3-zoom/blob/master/README.md#transform_rescaleY), [*transform*.invertX](https://github.com/d3/d3-zoom/blob/master/README.md#transform_invertX) or [*transform*.invertY](https://github.com/d3/d3-zoom/blob/master/README.md#transform_invertY) to transform a scale’s domain. 3.x’s *event*.scale is replaced with *event*.transform.k, and *event*.translate is replaced with *event*.transform.x and *event*.transform.y. The *zoom*.center method has been removed in favor of programmatic zooming. - -The zoom behavior finally supports simple constraints on panning! The new [*zoom*.translateExtent](https://github.com/d3/d3-zoom/blob/master/README.md#zoom_translateExtent) lets you define the viewable extent of the world: the currently-visible extent (the extent of the viewport, as defined by [*zoom*.extent](https://github.com/d3/d3-zoom/blob/master/README.md#zoom_extent)) is always contained within the translate extent. The *zoom*.size method has been replaced by *zoom*.extent, and the default behavior is now smarter: it defaults to the extent of the zoom behavior’s owner element, rather than being hardcoded to 960×500. (This also improves the default path chosen during smooth zoom transitions!) - -The zoom behavior’s interaction has also improved. It now correctly handles concurrent wheeling and dragging, as well as concurrent touching and mousing. The zoom behavior now ignores wheel events at the limits of its scale extent, allowing you to scroll past a zoomable area. The *zoomstart* and *zoomend* events have been renamed *start* and *end*. By default, zoom behaviors now ignore right-clicks intended for the context menu; use [*zoom*.filter](https://github.com/d3/d3-zoom/blob/master/README.md#zoom_filter) to control which events are ignored. The zoom behavior also ignores emulated mouse events on iOS. The zoom behavior now consumes handled events, making it easier to combine with other interactive behaviors such as [dragging](#dragging-d3-drag). diff --git a/node_modules/d3/LICENSE b/node_modules/d3/LICENSE deleted file mode 100644 index 894ddc6549f17d1694d5890c4e6011d95ffc5747..0000000000000000000000000000000000000000 --- a/node_modules/d3/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright 2010-2020 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/d3/README.md b/node_modules/d3/README.md deleted file mode 100644 index 7405831905110815a8040e39edf39c5948f8a7f0..0000000000000000000000000000000000000000 --- a/node_modules/d3/README.md +++ /dev/null @@ -1,57 +0,0 @@ -# D3: Data-Driven Documents - -<a href="https://d3js.org"><img src="https://d3js.org/logo.svg" align="left" hspace="10" vspace="6"></a> - -**D3** (or **D3.js**) is a JavaScript library for visualizing data using web standards. D3 helps you bring data to life using SVG, Canvas and HTML. D3 combines powerful visualization and interaction techniques with a data-driven approach to DOM manipulation, giving you the full capabilities of modern browsers and the freedom to design the right visual interface for your data. - -## Resources - -* [Introduction](https://observablehq.com/@d3/learn-d3) -* [API Reference](https://github.com/d3/d3/blob/master/API.md) -* [Releases](https://github.com/d3/d3/releases) -* [Examples](https://observablehq.com/@d3/gallery) -* [Wiki](https://github.com/d3/d3/wiki) - -## Installing - -If you use npm, `npm install d3`. Otherwise, download the [latest release](https://github.com/d3/d3/releases/latest). The released bundle supports anonymous AMD, CommonJS, and vanilla environments. You can load directly from [d3js.org](https://d3js.org), [CDNJS](https://cdnjs.com/libraries/d3), or [unpkg](https://unpkg.com/d3/). For example: - -```html -<script src="https://d3js.org/d3.v6.js"></script> -``` - -For the minified version: - -```html -<script src="https://d3js.org/d3.v6.min.js"></script> -``` - -You can also use the standalone D3 microlibraries. For example, [d3-selection](https://github.com/d3/d3-selection): - -```html -<script src="https://d3js.org/d3-selection.v2.js"></script> -``` - -D3 is written using [ES2015 modules](http://www.2ality.com/2014/09/es6-modules-final.html). Create a [custom bundle using Rollup](https://bl.ocks.org/mbostock/bb09af4c39c79cffcde4), Webpack, or your preferred bundler. To import D3 into an ES2015 application, either import specific symbols from specific D3 modules: - -```js -import {scaleLinear} from "d3-scale"; -``` - -Or import everything into a namespace (here, `d3`): - -```js -import * as d3 from "d3"; -``` - -In Node: - -```js -const d3 = require("d3"); -``` - -You can also require individual modules and combine them into a `d3` object using [Object.assign](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign): - -```js -const d3 = Object.assign({}, require("d3-format"), require("d3-geo"), require("d3-geo-projection")); -``` diff --git a/node_modules/d3/dist/d3.js b/node_modules/d3/dist/d3.js deleted file mode 100644 index 117f2ba901d5838b18edc7a7bc1563d998f85ce5..0000000000000000000000000000000000000000 --- a/node_modules/d3/dist/d3.js +++ /dev/null @@ -1,19540 +0,0 @@ -// https://d3js.org v6.2.0 Copyright 2020 Mike Bostock -(function (global, factory) { -typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : -typeof define === 'function' && define.amd ? define(['exports'], factory) : -(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.d3 = global.d3 || {})); -}(this, (function (exports) { 'use strict'; - -var version = "6.2.0"; - -function ascending(a, b) { - return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; -} - -function bisector(f) { - let delta = f; - let compare = f; - - if (f.length === 1) { - delta = (d, x) => f(d) - x; - compare = ascendingComparator(f); - } - - function left(a, x, lo, hi) { - if (lo == null) lo = 0; - if (hi == null) hi = a.length; - while (lo < hi) { - const mid = (lo + hi) >>> 1; - if (compare(a[mid], x) < 0) lo = mid + 1; - else hi = mid; - } - return lo; - } - - function right(a, x, lo, hi) { - if (lo == null) lo = 0; - if (hi == null) hi = a.length; - while (lo < hi) { - const mid = (lo + hi) >>> 1; - if (compare(a[mid], x) > 0) hi = mid; - else lo = mid + 1; - } - return lo; - } - - function center(a, x, lo, hi) { - if (lo == null) lo = 0; - if (hi == null) hi = a.length; - const i = left(a, x, lo, hi - 1); - return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i; - } - - return {left, center, right}; -} - -function ascendingComparator(f) { - return (d, x) => ascending(f(d), x); -} - -function number(x) { - return x === null ? NaN : +x; -} - -function* numbers(values, valueof) { - if (valueof === undefined) { - for (let value of values) { - if (value != null && (value = +value) >= value) { - yield value; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { - yield value; - } - } - } -} - -const ascendingBisect = bisector(ascending); -const bisectRight = ascendingBisect.right; -const bisectLeft = ascendingBisect.left; -const bisectCenter = bisector(number).center; - -function count(values, valueof) { - let count = 0; - if (valueof === undefined) { - for (let value of values) { - if (value != null && (value = +value) >= value) { - ++count; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { - ++count; - } - } - } - return count; -} - -function length(array) { - return array.length | 0; -} - -function empty(length) { - return !(length > 0); -} - -function arrayify(values) { - return typeof values !== "object" || "length" in values ? values : Array.from(values); -} - -function reducer(reduce) { - return values => reduce(...values); -} - -function cross(...values) { - const reduce = typeof values[values.length - 1] === "function" && reducer(values.pop()); - values = values.map(arrayify); - const lengths = values.map(length); - const j = values.length - 1; - const index = new Array(j + 1).fill(0); - const product = []; - if (j < 0 || lengths.some(empty)) return product; - while (true) { - product.push(index.map((j, i) => values[i][j])); - let i = j; - while (++index[i] === lengths[i]) { - if (i === 0) return reduce ? product.map(reduce) : product; - index[i--] = 0; - } - } -} - -function cumsum(values, valueof) { - var sum = 0, index = 0; - return Float64Array.from(values, valueof === undefined - ? v => (sum += +v || 0) - : v => (sum += +valueof(v, index++, values) || 0)); -} - -function descending(a, b) { - return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; -} - -function variance(values, valueof) { - let count = 0; - let delta; - let mean = 0; - let sum = 0; - if (valueof === undefined) { - for (let value of values) { - if (value != null && (value = +value) >= value) { - delta = value - mean; - mean += delta / ++count; - sum += delta * (value - mean); - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { - delta = value - mean; - mean += delta / ++count; - sum += delta * (value - mean); - } - } - } - if (count > 1) return sum / (count - 1); -} - -function deviation(values, valueof) { - const v = variance(values, valueof); - return v ? Math.sqrt(v) : v; -} - -function extent(values, valueof) { - let min; - let max; - if (valueof === undefined) { - for (const value of values) { - if (value != null) { - if (min === undefined) { - if (value >= value) min = max = value; - } else { - if (min > value) min = value; - if (max < value) max = value; - } - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null) { - if (min === undefined) { - if (value >= value) min = max = value; - } else { - if (min > value) min = value; - if (max < value) max = value; - } - } - } - } - return [min, max]; -} - -// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423 -class Adder { - constructor() { - this._partials = new Float64Array(32); - this._n = 0; - } - add(x) { - const p = this._partials; - let i = 0; - for (let j = 0; j < this._n && j < 32; j++) { - const y = p[j], - hi = x + y, - lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x); - if (lo) p[i++] = lo; - x = hi; - } - p[i] = x; - this._n = i + 1; - return this; - } - valueOf() { - const p = this._partials; - let n = this._n, x, y, lo, hi = 0; - if (n > 0) { - hi = p[--n]; - while (n > 0) { - x = hi; - y = p[--n]; - hi = x + y; - lo = y - (hi - x); - if (lo) break; - } - if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) { - y = lo * 2; - x = hi + y; - if (y == x - hi) hi = x; - } - } - return hi; - } -} - -function fsum(values, valueof) { - const adder = new Adder(); - if (valueof === undefined) { - for (let value of values) { - if (value = +value) { - adder.add(value); - } - } - } else { - let index = -1; - for (let value of values) { - if (value = +valueof(value, ++index, values)) { - adder.add(value); - } - } - } - return +adder; -} - -function identity(x) { - return x; -} - -function group(values, ...keys) { - return nest(values, identity, identity, keys); -} - -function groups(values, ...keys) { - return nest(values, Array.from, identity, keys); -} - -function rollup(values, reduce, ...keys) { - return nest(values, identity, reduce, keys); -} - -function rollups(values, reduce, ...keys) { - return nest(values, Array.from, reduce, keys); -} - -function index(values, ...keys) { - return nest(values, identity, unique, keys); -} - -function indexes(values, ...keys) { - return nest(values, Array.from, unique, keys); -} - -function unique(values) { - if (values.length !== 1) throw new Error("duplicate key"); - return values[0]; -} - -function nest(values, map, reduce, keys) { - return (function regroup(values, i) { - if (i >= keys.length) return reduce(values); - const groups = new Map(); - const keyof = keys[i++]; - let index = -1; - for (const value of values) { - const key = keyof(value, ++index, values); - const group = groups.get(key); - if (group) group.push(value); - else groups.set(key, [value]); - } - for (const [key, values] of groups) { - groups.set(key, regroup(values, i)); - } - return map(groups); - })(values, 0); -} - -var array = Array.prototype; - -var slice = array.slice; - -function constant(x) { - return function() { - return x; - }; -} - -var e10 = Math.sqrt(50), - e5 = Math.sqrt(10), - e2 = Math.sqrt(2); - -function ticks(start, stop, count) { - var reverse, - i = -1, - n, - ticks, - step; - - stop = +stop, start = +start, count = +count; - if (start === stop && count > 0) return [start]; - if (reverse = stop < start) n = start, start = stop, stop = n; - if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return []; - - if (step > 0) { - start = Math.ceil(start / step); - stop = Math.floor(stop / step); - ticks = new Array(n = Math.ceil(stop - start + 1)); - while (++i < n) ticks[i] = (start + i) * step; - } else { - step = -step; - start = Math.ceil(start * step); - stop = Math.floor(stop * step); - ticks = new Array(n = Math.ceil(stop - start + 1)); - while (++i < n) ticks[i] = (start + i) / step; - } - - if (reverse) ticks.reverse(); - - return ticks; -} - -function tickIncrement(start, stop, count) { - var step = (stop - start) / Math.max(0, count), - power = Math.floor(Math.log(step) / Math.LN10), - error = step / Math.pow(10, power); - return power >= 0 - ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) - : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1); -} - -function tickStep(start, stop, count) { - var step0 = Math.abs(stop - start) / Math.max(0, count), - step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), - error = step0 / step1; - if (error >= e10) step1 *= 10; - else if (error >= e5) step1 *= 5; - else if (error >= e2) step1 *= 2; - return stop < start ? -step1 : step1; -} - -function nice(start, stop, count) { - let prestep; - while (true) { - const step = tickIncrement(start, stop, count); - if (step === prestep || step === 0 || !isFinite(step)) { - return [start, stop]; - } else if (step > 0) { - start = Math.floor(start / step) * step; - stop = Math.ceil(stop / step) * step; - } else if (step < 0) { - start = Math.ceil(start * step) / step; - stop = Math.floor(stop * step) / step; - } - prestep = step; - } -} - -function thresholdSturges(values) { - return Math.ceil(Math.log(count(values)) / Math.LN2) + 1; -} - -function bin() { - var value = identity, - domain = extent, - threshold = thresholdSturges; - - function histogram(data) { - if (!Array.isArray(data)) data = Array.from(data); - - var i, - n = data.length, - x, - values = new Array(n); - - for (i = 0; i < n; ++i) { - values[i] = value(data[i], i, data); - } - - var xz = domain(values), - x0 = xz[0], - x1 = xz[1], - tz = threshold(values, x0, x1); - - // Convert number of thresholds into uniform thresholds, - // and nice the default domain accordingly. - if (!Array.isArray(tz)) { - tz = +tz; - if (domain === extent) [x0, x1] = nice(x0, x1, tz); - tz = ticks(x0, x1, tz); - if (tz[tz.length - 1] === x1) tz.pop(); // exclusive - } - - // Remove any thresholds outside the domain. - var m = tz.length; - while (tz[0] <= x0) tz.shift(), --m; - while (tz[m - 1] > x1) tz.pop(), --m; - - var bins = new Array(m + 1), - bin; - - // Initialize bins. - for (i = 0; i <= m; ++i) { - bin = bins[i] = []; - bin.x0 = i > 0 ? tz[i - 1] : x0; - bin.x1 = i < m ? tz[i] : x1; - } - - // Assign data to bins by value, ignoring any outside the domain. - for (i = 0; i < n; ++i) { - x = values[i]; - if (x0 <= x && x <= x1) { - bins[bisectRight(tz, x, 0, m)].push(data[i]); - } - } - - return bins; - } - - histogram.value = function(_) { - return arguments.length ? (value = typeof _ === "function" ? _ : constant(_), histogram) : value; - }; - - histogram.domain = function(_) { - return arguments.length ? (domain = typeof _ === "function" ? _ : constant([_[0], _[1]]), histogram) : domain; - }; - - histogram.thresholds = function(_) { - return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold; - }; - - return histogram; -} - -function max(values, valueof) { - let max; - if (valueof === undefined) { - for (const value of values) { - if (value != null - && (max < value || (max === undefined && value >= value))) { - max = value; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null - && (max < value || (max === undefined && value >= value))) { - max = value; - } - } - } - return max; -} - -function min(values, valueof) { - let min; - if (valueof === undefined) { - for (const value of values) { - if (value != null - && (min > value || (min === undefined && value >= value))) { - min = value; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null - && (min > value || (min === undefined && value >= value))) { - min = value; - } - } - } - return min; -} - -// Based on https://github.com/mourner/quickselect -// ISC license, Copyright 2018 Vladimir Agafonkin. -function quickselect(array, k, left = 0, right = array.length - 1, compare = ascending) { - while (right > left) { - if (right - left > 600) { - const n = right - left + 1; - const m = k - left + 1; - const z = Math.log(n); - const s = 0.5 * Math.exp(2 * z / 3); - const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1); - const newLeft = Math.max(left, Math.floor(k - m * s / n + sd)); - const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd)); - quickselect(array, k, newLeft, newRight, compare); - } - - const t = array[k]; - let i = left; - let j = right; - - swap(array, left, k); - if (compare(array[right], t) > 0) swap(array, left, right); - - while (i < j) { - swap(array, i, j), ++i, --j; - while (compare(array[i], t) < 0) ++i; - while (compare(array[j], t) > 0) --j; - } - - if (compare(array[left], t) === 0) swap(array, left, j); - else ++j, swap(array, j, right); - - if (j <= k) left = j + 1; - if (k <= j) right = j - 1; - } - return array; -} - -function swap(array, i, j) { - const t = array[i]; - array[i] = array[j]; - array[j] = t; -} - -function quantile(values, p, valueof) { - values = Float64Array.from(numbers(values, valueof)); - if (!(n = values.length)) return; - if ((p = +p) <= 0 || n < 2) return min(values); - if (p >= 1) return max(values); - var n, - i = (n - 1) * p, - i0 = Math.floor(i), - value0 = max(quickselect(values, i0).subarray(0, i0 + 1)), - value1 = min(values.subarray(i0 + 1)); - return value0 + (value1 - value0) * (i - i0); -} - -function quantileSorted(values, p, valueof = number) { - if (!(n = values.length)) return; - if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values); - if (p >= 1) return +valueof(values[n - 1], n - 1, values); - var n, - i = (n - 1) * p, - i0 = Math.floor(i), - value0 = +valueof(values[i0], i0, values), - value1 = +valueof(values[i0 + 1], i0 + 1, values); - return value0 + (value1 - value0) * (i - i0); -} - -function freedmanDiaconis(values, min, max) { - return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(count(values), -1 / 3))); -} - -function scott(values, min, max) { - return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(count(values), -1 / 3))); -} - -function maxIndex(values, valueof) { - let max; - let maxIndex = -1; - let index = -1; - if (valueof === undefined) { - for (const value of values) { - ++index; - if (value != null - && (max < value || (max === undefined && value >= value))) { - max = value, maxIndex = index; - } - } - } else { - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null - && (max < value || (max === undefined && value >= value))) { - max = value, maxIndex = index; - } - } - } - return maxIndex; -} - -function mean(values, valueof) { - let count = 0; - let sum = 0; - if (valueof === undefined) { - for (let value of values) { - if (value != null && (value = +value) >= value) { - ++count, sum += value; - } - } - } else { - let index = -1; - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { - ++count, sum += value; - } - } - } - if (count) return sum / count; -} - -function median(values, valueof) { - return quantile(values, 0.5, valueof); -} - -function* flatten(arrays) { - for (const array of arrays) { - yield* array; - } -} - -function merge(arrays) { - return Array.from(flatten(arrays)); -} - -function minIndex(values, valueof) { - let min; - let minIndex = -1; - let index = -1; - if (valueof === undefined) { - for (const value of values) { - ++index; - if (value != null - && (min > value || (min === undefined && value >= value))) { - min = value, minIndex = index; - } - } - } else { - for (let value of values) { - if ((value = valueof(value, ++index, values)) != null - && (min > value || (min === undefined && value >= value))) { - min = value, minIndex = index; - } - } - } - return minIndex; -} - -function pairs(values, pairof = pair) { - const pairs = []; - let previous; - let first = false; - for (const value of values) { - if (first) pairs.push(pairof(previous, value)); - previous = value; - first = true; - } - return pairs; -} - -function pair(a, b) { - return [a, b]; -} - -function permute(source, keys) { - return Array.from(keys, key => source[key]); -} - -function sequence(start, stop, step) { - start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; - - var i = -1, - n = Math.max(0, Math.ceil((stop - start) / step)) | 0, - range = new Array(n); - - while (++i < n) { - range[i] = start + i * step; - } - - return range; -} - -function least(values, compare = ascending) { - let min; - let defined = false; - if (compare.length === 1) { - let minValue; - for (const element of values) { - const value = compare(element); - if (defined - ? ascending(value, minValue) < 0 - : ascending(value, value) === 0) { - min = element; - minValue = value; - defined = true; - } - } - } else { - for (const value of values) { - if (defined - ? compare(value, min) < 0 - : compare(value, value) === 0) { - min = value; - defined = true; - } - } - } - return min; -} - -function leastIndex(values, compare = ascending) { - if (compare.length === 1) return minIndex(values, compare); - let minValue; - let min = -1; - let index = -1; - for (const value of values) { - ++index; - if (min < 0 - ? compare(value, value) === 0 - : compare(value, minValue) < 0) { - minValue = value; - min = index; - } - } - return min; -} - -function greatest(values, compare = ascending) { - let max; - let defined = false; - if (compare.length === 1) { - let maxValue; - for (const element of values) { - const value = compare(element); - if (defined - ? ascending(value, maxValue) > 0 - : ascending(value, value) === 0) { - max = element; - maxValue = value; - defined = true; - } - } - } else { - for (const value of values) { - if (defined - ? compare(value, max) > 0 - : compare(value, value) === 0) { - max = value; - defined = true; - } - } - } - return max; -} - -function greatestIndex(values, compare = ascending) { - if (compare.length === 1) return maxIndex(values, compare); - let maxValue; - let max = -1; - let index = -1; - for (const value of values) { - ++index; - if (max < 0 - ? compare(value, value) === 0 - : compare(value, maxValue) > 0) { - maxValue = value; - max = index; - } - } - return max; -} - -function scan(values, compare) { - const index = leastIndex(values, compare); - return index < 0 ? undefined : index; -} - -var shuffle = shuffler(Math.random); - -function shuffler(random) { - return function shuffle(array, i0 = 0, i1 = array.length) { - let m = i1 - (i0 = +i0); - while (m) { - const i = random() * m-- | 0, t = array[m + i0]; - array[m + i0] = array[i + i0]; - array[i + i0] = t; - } - return array; - }; -} - -function sum(values, valueof) { - let sum = 0; - if (valueof === undefined) { - for (let value of values) { - if (value = +value) { - sum += value; - } - } - } else { - let index = -1; - for (let value of values) { - if (value = +valueof(value, ++index, values)) { - sum += value; - } - } - } - return sum; -} - -function transpose(matrix) { - if (!(n = matrix.length)) return []; - for (var i = -1, m = min(matrix, length$1), transpose = new Array(m); ++i < m;) { - for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) { - row[j] = matrix[j][i]; - } - } - return transpose; -} - -function length$1(d) { - return d.length; -} - -function zip() { - return transpose(arguments); -} - -function every(values, test) { - if (typeof test !== "function") throw new TypeError("test is not a function"); - let index = -1; - for (const value of values) { - if (!test(value, ++index, values)) { - return false; - } - } - return true; -} - -function some(values, test) { - if (typeof test !== "function") throw new TypeError("test is not a function"); - let index = -1; - for (const value of values) { - if (test(value, ++index, values)) { - return true; - } - } - return false; -} - -function filter(values, test) { - if (typeof test !== "function") throw new TypeError("test is not a function"); - const array = []; - let index = -1; - for (const value of values) { - if (test(value, ++index, values)) { - array.push(value); - } - } - return array; -} - -function map(values, mapper) { - if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); - if (typeof mapper !== "function") throw new TypeError("mapper is not a function"); - return Array.from(values, (value, index) => mapper(value, index, values)); -} - -function reduce(values, reducer, value) { - if (typeof reducer !== "function") throw new TypeError("reducer is not a function"); - const iterator = values[Symbol.iterator](); - let done, next, index = -1; - if (arguments.length < 3) { - ({done, value} = iterator.next()); - if (done) return; - ++index; - } - while (({done, value: next} = iterator.next()), !done) { - value = reducer(value, next, ++index, values); - } - return value; -} - -function reverse(values) { - if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); - return Array.from(values).reverse(); -} - -function sort(values, comparator = ascending) { - if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); - return Array.from(values).sort(comparator); -} - -function difference(values, ...others) { - values = new Set(values); - for (const other of others) { - for (const value of other) { - values.delete(value); - } - } - return values; -} - -function disjoint(values, other) { - const iterator = other[Symbol.iterator](), set = new Set(); - for (const v of values) { - if (set.has(v)) return false; - let value, done; - while (({value, done} = iterator.next())) { - if (done) break; - if (Object.is(v, value)) return false; - set.add(value); - } - } - return true; -} - -function set(values) { - return values instanceof Set ? values : new Set(values); -} - -function intersection(values, ...others) { - values = new Set(values); - others = others.map(set); - out: for (const value of values) { - for (const other of others) { - if (!other.has(value)) { - values.delete(value); - continue out; - } - } - } - return values; -} - -function superset(values, other) { - const iterator = values[Symbol.iterator](), set = new Set(); - for (const o of other) { - if (set.has(o)) continue; - let value, done; - while (({value, done} = iterator.next())) { - if (done) return false; - set.add(value); - if (Object.is(o, value)) break; - } - } - return true; -} - -function subset(values, other) { - return superset(other, values); -} - -function union(...others) { - const set = new Set(); - for (const other of others) { - for (const o of other) { - set.add(o); - } - } - return set; -} - -var slice$1 = Array.prototype.slice; - -function identity$1(x) { - return x; -} - -var top = 1, - right = 2, - bottom = 3, - left = 4, - epsilon = 1e-6; - -function translateX(x) { - return "translate(" + (x + 0.5) + ",0)"; -} - -function translateY(y) { - return "translate(0," + (y + 0.5) + ")"; -} - -function number$1(scale) { - return d => +scale(d); -} - -function center(scale) { - var offset = Math.max(0, scale.bandwidth() - 1) / 2; // Adjust for 0.5px offset. - if (scale.round()) offset = Math.round(offset); - return function(d) { - return +scale(d) + offset; - }; -} - -function entering() { - return !this.__axis; -} - -function axis(orient, scale) { - var tickArguments = [], - tickValues = null, - tickFormat = null, - tickSizeInner = 6, - tickSizeOuter = 6, - tickPadding = 3, - k = orient === top || orient === left ? -1 : 1, - x = orient === left || orient === right ? "x" : "y", - transform = orient === top || orient === bottom ? translateX : translateY; - - function axis(context) { - var values = tickValues == null ? (scale.ticks ? scale.ticks.apply(scale, tickArguments) : scale.domain()) : tickValues, - format = tickFormat == null ? (scale.tickFormat ? scale.tickFormat.apply(scale, tickArguments) : identity$1) : tickFormat, - spacing = Math.max(tickSizeInner, 0) + tickPadding, - range = scale.range(), - range0 = +range[0] + 0.5, - range1 = +range[range.length - 1] + 0.5, - position = (scale.bandwidth ? center : number$1)(scale.copy()), - selection = context.selection ? context.selection() : context, - path = selection.selectAll(".domain").data([null]), - tick = selection.selectAll(".tick").data(values, scale).order(), - tickExit = tick.exit(), - tickEnter = tick.enter().append("g").attr("class", "tick"), - line = tick.select("line"), - text = tick.select("text"); - - path = path.merge(path.enter().insert("path", ".tick") - .attr("class", "domain") - .attr("stroke", "currentColor")); - - tick = tick.merge(tickEnter); - - line = line.merge(tickEnter.append("line") - .attr("stroke", "currentColor") - .attr(x + "2", k * tickSizeInner)); - - text = text.merge(tickEnter.append("text") - .attr("fill", "currentColor") - .attr(x, k * spacing) - .attr("dy", orient === top ? "0em" : orient === bottom ? "0.71em" : "0.32em")); - - if (context !== selection) { - path = path.transition(context); - tick = tick.transition(context); - line = line.transition(context); - text = text.transition(context); - - tickExit = tickExit.transition(context) - .attr("opacity", epsilon) - .attr("transform", function(d) { return isFinite(d = position(d)) ? transform(d) : this.getAttribute("transform"); }); - - tickEnter - .attr("opacity", epsilon) - .attr("transform", function(d) { var p = this.parentNode.__axis; return transform(p && isFinite(p = p(d)) ? p : position(d)); }); - } - - tickExit.remove(); - - path - .attr("d", orient === left || orient == right - ? (tickSizeOuter ? "M" + k * tickSizeOuter + "," + range0 + "H0.5V" + range1 + "H" + k * tickSizeOuter : "M0.5," + range0 + "V" + range1) - : (tickSizeOuter ? "M" + range0 + "," + k * tickSizeOuter + "V0.5H" + range1 + "V" + k * tickSizeOuter : "M" + range0 + ",0.5H" + range1)); - - tick - .attr("opacity", 1) - .attr("transform", function(d) { return transform(position(d)); }); - - line - .attr(x + "2", k * tickSizeInner); - - text - .attr(x, k * spacing) - .text(format); - - selection.filter(entering) - .attr("fill", "none") - .attr("font-size", 10) - .attr("font-family", "sans-serif") - .attr("text-anchor", orient === right ? "start" : orient === left ? "end" : "middle"); - - selection - .each(function() { this.__axis = position; }); - } - - axis.scale = function(_) { - return arguments.length ? (scale = _, axis) : scale; - }; - - axis.ticks = function() { - return tickArguments = slice$1.call(arguments), axis; - }; - - axis.tickArguments = function(_) { - return arguments.length ? (tickArguments = _ == null ? [] : slice$1.call(_), axis) : tickArguments.slice(); - }; - - axis.tickValues = function(_) { - return arguments.length ? (tickValues = _ == null ? null : slice$1.call(_), axis) : tickValues && tickValues.slice(); - }; - - axis.tickFormat = function(_) { - return arguments.length ? (tickFormat = _, axis) : tickFormat; - }; - - axis.tickSize = function(_) { - return arguments.length ? (tickSizeInner = tickSizeOuter = +_, axis) : tickSizeInner; - }; - - axis.tickSizeInner = function(_) { - return arguments.length ? (tickSizeInner = +_, axis) : tickSizeInner; - }; - - axis.tickSizeOuter = function(_) { - return arguments.length ? (tickSizeOuter = +_, axis) : tickSizeOuter; - }; - - axis.tickPadding = function(_) { - return arguments.length ? (tickPadding = +_, axis) : tickPadding; - }; - - return axis; -} - -function axisTop(scale) { - return axis(top, scale); -} - -function axisRight(scale) { - return axis(right, scale); -} - -function axisBottom(scale) { - return axis(bottom, scale); -} - -function axisLeft(scale) { - return axis(left, scale); -} - -var noop = {value: () => {}}; - -function dispatch() { - for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) { - if (!(t = arguments[i] + "") || (t in _) || /[\s.]/.test(t)) throw new Error("illegal type: " + t); - _[t] = []; - } - return new Dispatch(_); -} - -function Dispatch(_) { - this._ = _; -} - -function parseTypenames(typenames, types) { - return typenames.trim().split(/^|\s+/).map(function(t) { - var name = "", i = t.indexOf("."); - if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); - if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t); - return {type: t, name: name}; - }); -} - -Dispatch.prototype = dispatch.prototype = { - constructor: Dispatch, - on: function(typename, callback) { - var _ = this._, - T = parseTypenames(typename + "", _), - t, - i = -1, - n = T.length; - - // If no callback was specified, return the callback of the given type and name. - if (arguments.length < 2) { - while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t; - return; - } - - // If a type was specified, set the callback for the given type and name. - // Otherwise, if a null callback was specified, remove callbacks of the given name. - if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback); - while (++i < n) { - if (t = (typename = T[i]).type) _[t] = set$1(_[t], typename.name, callback); - else if (callback == null) for (t in _) _[t] = set$1(_[t], typename.name, null); - } - - return this; - }, - copy: function() { - var copy = {}, _ = this._; - for (var t in _) copy[t] = _[t].slice(); - return new Dispatch(copy); - }, - call: function(type, that) { - if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2]; - if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); - for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); - }, - apply: function(type, that, args) { - if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type); - for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args); - } -}; - -function get(type, name) { - for (var i = 0, n = type.length, c; i < n; ++i) { - if ((c = type[i]).name === name) { - return c.value; - } - } -} - -function set$1(type, name, callback) { - for (var i = 0, n = type.length; i < n; ++i) { - if (type[i].name === name) { - type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1)); - break; - } - } - if (callback != null) type.push({name: name, value: callback}); - return type; -} - -var xhtml = "http://www.w3.org/1999/xhtml"; - -var namespaces = { - svg: "http://www.w3.org/2000/svg", - xhtml: xhtml, - xlink: "http://www.w3.org/1999/xlink", - xml: "http://www.w3.org/XML/1998/namespace", - xmlns: "http://www.w3.org/2000/xmlns/" -}; - -function namespace(name) { - var prefix = name += "", i = prefix.indexOf(":"); - if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1); - return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name; // eslint-disable-line no-prototype-builtins -} - -function creatorInherit(name) { - return function() { - var document = this.ownerDocument, - uri = this.namespaceURI; - return uri === xhtml && document.documentElement.namespaceURI === xhtml - ? document.createElement(name) - : document.createElementNS(uri, name); - }; -} - -function creatorFixed(fullname) { - return function() { - return this.ownerDocument.createElementNS(fullname.space, fullname.local); - }; -} - -function creator(name) { - var fullname = namespace(name); - return (fullname.local - ? creatorFixed - : creatorInherit)(fullname); -} - -function none() {} - -function selector(selector) { - return selector == null ? none : function() { - return this.querySelector(selector); - }; -} - -function selection_select(select) { - if (typeof select !== "function") select = selector(select); - - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { - if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { - if ("__data__" in node) subnode.__data__ = node.__data__; - subgroup[i] = subnode; - } - } - } - - return new Selection(subgroups, this._parents); -} - -function array$1(x) { - return typeof x === "object" && "length" in x - ? x // Array, TypedArray, NodeList, array-like - : Array.from(x); // Map, Set, iterable, string, or anything else -} - -function empty$1() { - return []; -} - -function selectorAll(selector) { - return selector == null ? empty$1 : function() { - return this.querySelectorAll(selector); - }; -} - -function arrayAll(select) { - return function() { - var group = select.apply(this, arguments); - return group == null ? [] : array$1(group); - }; -} - -function selection_selectAll(select) { - if (typeof select === "function") select = arrayAll(select); - else select = selectorAll(select); - - for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - subgroups.push(select.call(node, node.__data__, i, group)); - parents.push(node); - } - } - } - - return new Selection(subgroups, parents); -} - -function matcher(selector) { - return function() { - return this.matches(selector); - }; -} - -function childMatcher(selector) { - return function(node) { - return node.matches(selector); - }; -} - -var find = Array.prototype.find; - -function childFind(match) { - return function() { - return find.call(this.children, match); - }; -} - -function childFirst() { - return this.firstElementChild; -} - -function selection_selectChild(match) { - return this.select(match == null ? childFirst - : childFind(typeof match === "function" ? match : childMatcher(match))); -} - -var filter$1 = Array.prototype.filter; - -function children() { - return this.children; -} - -function childrenFilter(match) { - return function() { - return filter$1.call(this.children, match); - }; -} - -function selection_selectChildren(match) { - return this.selectAll(match == null ? children - : childrenFilter(typeof match === "function" ? match : childMatcher(match))); -} - -function selection_filter(match) { - if (typeof match !== "function") match = matcher(match); - - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { - if ((node = group[i]) && match.call(node, node.__data__, i, group)) { - subgroup.push(node); - } - } - } - - return new Selection(subgroups, this._parents); -} - -function sparse(update) { - return new Array(update.length); -} - -function selection_enter() { - return new Selection(this._enter || this._groups.map(sparse), this._parents); -} - -function EnterNode(parent, datum) { - this.ownerDocument = parent.ownerDocument; - this.namespaceURI = parent.namespaceURI; - this._next = null; - this._parent = parent; - this.__data__ = datum; -} - -EnterNode.prototype = { - constructor: EnterNode, - appendChild: function(child) { return this._parent.insertBefore(child, this._next); }, - insertBefore: function(child, next) { return this._parent.insertBefore(child, next); }, - querySelector: function(selector) { return this._parent.querySelector(selector); }, - querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); } -}; - -function constant$1(x) { - return function() { - return x; - }; -} - -function bindIndex(parent, group, enter, update, exit, data) { - var i = 0, - node, - groupLength = group.length, - dataLength = data.length; - - // Put any non-null nodes that fit into update. - // Put any null nodes into enter. - // Put any remaining data into enter. - for (; i < dataLength; ++i) { - if (node = group[i]) { - node.__data__ = data[i]; - update[i] = node; - } else { - enter[i] = new EnterNode(parent, data[i]); - } - } - - // Put any non-null nodes that don’t fit into exit. - for (; i < groupLength; ++i) { - if (node = group[i]) { - exit[i] = node; - } - } -} - -function bindKey(parent, group, enter, update, exit, data, key) { - var i, - node, - nodeByKeyValue = new Map, - groupLength = group.length, - dataLength = data.length, - keyValues = new Array(groupLength), - keyValue; - - // Compute the key for each node. - // If multiple nodes have the same key, the duplicates are added to exit. - for (i = 0; i < groupLength; ++i) { - if (node = group[i]) { - keyValues[i] = keyValue = key.call(node, node.__data__, i, group) + ""; - if (nodeByKeyValue.has(keyValue)) { - exit[i] = node; - } else { - nodeByKeyValue.set(keyValue, node); - } - } - } - - // Compute the key for each datum. - // If there a node associated with this key, join and add it to update. - // If there is not (or the key is a duplicate), add it to enter. - for (i = 0; i < dataLength; ++i) { - keyValue = key.call(parent, data[i], i, data) + ""; - if (node = nodeByKeyValue.get(keyValue)) { - update[i] = node; - node.__data__ = data[i]; - nodeByKeyValue.delete(keyValue); - } else { - enter[i] = new EnterNode(parent, data[i]); - } - } - - // Add any remaining nodes that were not bound to data to exit. - for (i = 0; i < groupLength; ++i) { - if ((node = group[i]) && (nodeByKeyValue.get(keyValues[i]) === node)) { - exit[i] = node; - } - } -} - -function datum(node) { - return node.__data__; -} - -function selection_data(value, key) { - if (!arguments.length) return Array.from(this, datum); - - var bind = key ? bindKey : bindIndex, - parents = this._parents, - groups = this._groups; - - if (typeof value !== "function") value = constant$1(value); - - for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) { - var parent = parents[j], - group = groups[j], - groupLength = group.length, - data = array$1(value.call(parent, parent && parent.__data__, j, parents)), - dataLength = data.length, - enterGroup = enter[j] = new Array(dataLength), - updateGroup = update[j] = new Array(dataLength), - exitGroup = exit[j] = new Array(groupLength); - - bind(parent, group, enterGroup, updateGroup, exitGroup, data, key); - - // Now connect the enter nodes to their following update node, such that - // appendChild can insert the materialized enter node before this node, - // rather than at the end of the parent node. - for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) { - if (previous = enterGroup[i0]) { - if (i0 >= i1) i1 = i0 + 1; - while (!(next = updateGroup[i1]) && ++i1 < dataLength); - previous._next = next || null; - } - } - } - - update = new Selection(update, parents); - update._enter = enter; - update._exit = exit; - return update; -} - -function selection_exit() { - return new Selection(this._exit || this._groups.map(sparse), this._parents); -} - -function selection_join(onenter, onupdate, onexit) { - var enter = this.enter(), update = this, exit = this.exit(); - enter = typeof onenter === "function" ? onenter(enter) : enter.append(onenter + ""); - if (onupdate != null) update = onupdate(update); - if (onexit == null) exit.remove(); else onexit(exit); - return enter && update ? enter.merge(update).order() : update; -} - -function selection_merge(selection) { - if (!(selection instanceof Selection)) throw new Error("invalid merge"); - - for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { - for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { - if (node = group0[i] || group1[i]) { - merge[i] = node; - } - } - } - - for (; j < m0; ++j) { - merges[j] = groups0[j]; - } - - return new Selection(merges, this._parents); -} - -function selection_order() { - - for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) { - for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) { - if (node = group[i]) { - if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next); - next = node; - } - } - } - - return this; -} - -function selection_sort(compare) { - if (!compare) compare = ascending$1; - - function compareNode(a, b) { - return a && b ? compare(a.__data__, b.__data__) : !a - !b; - } - - for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) { - if (node = group[i]) { - sortgroup[i] = node; - } - } - sortgroup.sort(compareNode); - } - - return new Selection(sortgroups, this._parents).order(); -} - -function ascending$1(a, b) { - return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; -} - -function selection_call() { - var callback = arguments[0]; - arguments[0] = this; - callback.apply(null, arguments); - return this; -} - -function selection_nodes() { - return Array.from(this); -} - -function selection_node() { - - for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { - for (var group = groups[j], i = 0, n = group.length; i < n; ++i) { - var node = group[i]; - if (node) return node; - } - } - - return null; -} - -function selection_size() { - let size = 0; - for (const node of this) ++size; // eslint-disable-line no-unused-vars - return size; -} - -function selection_empty() { - return !this.node(); -} - -function selection_each(callback) { - - for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { - for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { - if (node = group[i]) callback.call(node, node.__data__, i, group); - } - } - - return this; -} - -function attrRemove(name) { - return function() { - this.removeAttribute(name); - }; -} - -function attrRemoveNS(fullname) { - return function() { - this.removeAttributeNS(fullname.space, fullname.local); - }; -} - -function attrConstant(name, value) { - return function() { - this.setAttribute(name, value); - }; -} - -function attrConstantNS(fullname, value) { - return function() { - this.setAttributeNS(fullname.space, fullname.local, value); - }; -} - -function attrFunction(name, value) { - return function() { - var v = value.apply(this, arguments); - if (v == null) this.removeAttribute(name); - else this.setAttribute(name, v); - }; -} - -function attrFunctionNS(fullname, value) { - return function() { - var v = value.apply(this, arguments); - if (v == null) this.removeAttributeNS(fullname.space, fullname.local); - else this.setAttributeNS(fullname.space, fullname.local, v); - }; -} - -function selection_attr(name, value) { - var fullname = namespace(name); - - if (arguments.length < 2) { - var node = this.node(); - return fullname.local - ? node.getAttributeNS(fullname.space, fullname.local) - : node.getAttribute(fullname); - } - - return this.each((value == null - ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === "function" - ? (fullname.local ? attrFunctionNS : attrFunction) - : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value)); -} - -function defaultView(node) { - return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node - || (node.document && node) // node is a Window - || node.defaultView; // node is a Document -} - -function styleRemove(name) { - return function() { - this.style.removeProperty(name); - }; -} - -function styleConstant(name, value, priority) { - return function() { - this.style.setProperty(name, value, priority); - }; -} - -function styleFunction(name, value, priority) { - return function() { - var v = value.apply(this, arguments); - if (v == null) this.style.removeProperty(name); - else this.style.setProperty(name, v, priority); - }; -} - -function selection_style(name, value, priority) { - return arguments.length > 1 - ? this.each((value == null - ? styleRemove : typeof value === "function" - ? styleFunction - : styleConstant)(name, value, priority == null ? "" : priority)) - : styleValue(this.node(), name); -} - -function styleValue(node, name) { - return node.style.getPropertyValue(name) - || defaultView(node).getComputedStyle(node, null).getPropertyValue(name); -} - -function propertyRemove(name) { - return function() { - delete this[name]; - }; -} - -function propertyConstant(name, value) { - return function() { - this[name] = value; - }; -} - -function propertyFunction(name, value) { - return function() { - var v = value.apply(this, arguments); - if (v == null) delete this[name]; - else this[name] = v; - }; -} - -function selection_property(name, value) { - return arguments.length > 1 - ? this.each((value == null - ? propertyRemove : typeof value === "function" - ? propertyFunction - : propertyConstant)(name, value)) - : this.node()[name]; -} - -function classArray(string) { - return string.trim().split(/^|\s+/); -} - -function classList(node) { - return node.classList || new ClassList(node); -} - -function ClassList(node) { - this._node = node; - this._names = classArray(node.getAttribute("class") || ""); -} - -ClassList.prototype = { - add: function(name) { - var i = this._names.indexOf(name); - if (i < 0) { - this._names.push(name); - this._node.setAttribute("class", this._names.join(" ")); - } - }, - remove: function(name) { - var i = this._names.indexOf(name); - if (i >= 0) { - this._names.splice(i, 1); - this._node.setAttribute("class", this._names.join(" ")); - } - }, - contains: function(name) { - return this._names.indexOf(name) >= 0; - } -}; - -function classedAdd(node, names) { - var list = classList(node), i = -1, n = names.length; - while (++i < n) list.add(names[i]); -} - -function classedRemove(node, names) { - var list = classList(node), i = -1, n = names.length; - while (++i < n) list.remove(names[i]); -} - -function classedTrue(names) { - return function() { - classedAdd(this, names); - }; -} - -function classedFalse(names) { - return function() { - classedRemove(this, names); - }; -} - -function classedFunction(names, value) { - return function() { - (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names); - }; -} - -function selection_classed(name, value) { - var names = classArray(name + ""); - - if (arguments.length < 2) { - var list = classList(this.node()), i = -1, n = names.length; - while (++i < n) if (!list.contains(names[i])) return false; - return true; - } - - return this.each((typeof value === "function" - ? classedFunction : value - ? classedTrue - : classedFalse)(names, value)); -} - -function textRemove() { - this.textContent = ""; -} - -function textConstant(value) { - return function() { - this.textContent = value; - }; -} - -function textFunction(value) { - return function() { - var v = value.apply(this, arguments); - this.textContent = v == null ? "" : v; - }; -} - -function selection_text(value) { - return arguments.length - ? this.each(value == null - ? textRemove : (typeof value === "function" - ? textFunction - : textConstant)(value)) - : this.node().textContent; -} - -function htmlRemove() { - this.innerHTML = ""; -} - -function htmlConstant(value) { - return function() { - this.innerHTML = value; - }; -} - -function htmlFunction(value) { - return function() { - var v = value.apply(this, arguments); - this.innerHTML = v == null ? "" : v; - }; -} - -function selection_html(value) { - return arguments.length - ? this.each(value == null - ? htmlRemove : (typeof value === "function" - ? htmlFunction - : htmlConstant)(value)) - : this.node().innerHTML; -} - -function raise() { - if (this.nextSibling) this.parentNode.appendChild(this); -} - -function selection_raise() { - return this.each(raise); -} - -function lower() { - if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild); -} - -function selection_lower() { - return this.each(lower); -} - -function selection_append(name) { - var create = typeof name === "function" ? name : creator(name); - return this.select(function() { - return this.appendChild(create.apply(this, arguments)); - }); -} - -function constantNull() { - return null; -} - -function selection_insert(name, before) { - var create = typeof name === "function" ? name : creator(name), - select = before == null ? constantNull : typeof before === "function" ? before : selector(before); - return this.select(function() { - return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null); - }); -} - -function remove() { - var parent = this.parentNode; - if (parent) parent.removeChild(this); -} - -function selection_remove() { - return this.each(remove); -} - -function selection_cloneShallow() { - var clone = this.cloneNode(false), parent = this.parentNode; - return parent ? parent.insertBefore(clone, this.nextSibling) : clone; -} - -function selection_cloneDeep() { - var clone = this.cloneNode(true), parent = this.parentNode; - return parent ? parent.insertBefore(clone, this.nextSibling) : clone; -} - -function selection_clone(deep) { - return this.select(deep ? selection_cloneDeep : selection_cloneShallow); -} - -function selection_datum(value) { - return arguments.length - ? this.property("__data__", value) - : this.node().__data__; -} - -function contextListener(listener) { - return function(event) { - listener.call(this, event, this.__data__); - }; -} - -function parseTypenames$1(typenames) { - return typenames.trim().split(/^|\s+/).map(function(t) { - var name = "", i = t.indexOf("."); - if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i); - return {type: t, name: name}; - }); -} - -function onRemove(typename) { - return function() { - var on = this.__on; - if (!on) return; - for (var j = 0, i = -1, m = on.length, o; j < m; ++j) { - if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) { - this.removeEventListener(o.type, o.listener, o.options); - } else { - on[++i] = o; - } - } - if (++i) on.length = i; - else delete this.__on; - }; -} - -function onAdd(typename, value, options) { - return function() { - var on = this.__on, o, listener = contextListener(value); - if (on) for (var j = 0, m = on.length; j < m; ++j) { - if ((o = on[j]).type === typename.type && o.name === typename.name) { - this.removeEventListener(o.type, o.listener, o.options); - this.addEventListener(o.type, o.listener = listener, o.options = options); - o.value = value; - return; - } - } - this.addEventListener(typename.type, listener, options); - o = {type: typename.type, name: typename.name, value: value, listener: listener, options: options}; - if (!on) this.__on = [o]; - else on.push(o); - }; -} - -function selection_on(typename, value, options) { - var typenames = parseTypenames$1(typename + ""), i, n = typenames.length, t; - - if (arguments.length < 2) { - var on = this.node().__on; - if (on) for (var j = 0, m = on.length, o; j < m; ++j) { - for (i = 0, o = on[j]; i < n; ++i) { - if ((t = typenames[i]).type === o.type && t.name === o.name) { - return o.value; - } - } - } - return; - } - - on = value ? onAdd : onRemove; - for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options)); - return this; -} - -function dispatchEvent(node, type, params) { - var window = defaultView(node), - event = window.CustomEvent; - - if (typeof event === "function") { - event = new event(type, params); - } else { - event = window.document.createEvent("Event"); - if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail; - else event.initEvent(type, false, false); - } - - node.dispatchEvent(event); -} - -function dispatchConstant(type, params) { - return function() { - return dispatchEvent(this, type, params); - }; -} - -function dispatchFunction(type, params) { - return function() { - return dispatchEvent(this, type, params.apply(this, arguments)); - }; -} - -function selection_dispatch(type, params) { - return this.each((typeof params === "function" - ? dispatchFunction - : dispatchConstant)(type, params)); -} - -function* selection_iterator() { - for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) { - for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) { - if (node = group[i]) yield node; - } - } -} - -var root = [null]; - -function Selection(groups, parents) { - this._groups = groups; - this._parents = parents; -} - -function selection() { - return new Selection([[document.documentElement]], root); -} - -function selection_selection() { - return this; -} - -Selection.prototype = selection.prototype = { - constructor: Selection, - select: selection_select, - selectAll: selection_selectAll, - selectChild: selection_selectChild, - selectChildren: selection_selectChildren, - filter: selection_filter, - data: selection_data, - enter: selection_enter, - exit: selection_exit, - join: selection_join, - merge: selection_merge, - selection: selection_selection, - order: selection_order, - sort: selection_sort, - call: selection_call, - nodes: selection_nodes, - node: selection_node, - size: selection_size, - empty: selection_empty, - each: selection_each, - attr: selection_attr, - style: selection_style, - property: selection_property, - classed: selection_classed, - text: selection_text, - html: selection_html, - raise: selection_raise, - lower: selection_lower, - append: selection_append, - insert: selection_insert, - remove: selection_remove, - clone: selection_clone, - datum: selection_datum, - on: selection_on, - dispatch: selection_dispatch, - [Symbol.iterator]: selection_iterator -}; - -function select(selector) { - return typeof selector === "string" - ? new Selection([[document.querySelector(selector)]], [document.documentElement]) - : new Selection([[selector]], root); -} - -function create(name) { - return select(creator(name).call(document.documentElement)); -} - -var nextId = 0; - -function local() { - return new Local; -} - -function Local() { - this._ = "@" + (++nextId).toString(36); -} - -Local.prototype = local.prototype = { - constructor: Local, - get: function(node) { - var id = this._; - while (!(id in node)) if (!(node = node.parentNode)) return; - return node[id]; - }, - set: function(node, value) { - return node[this._] = value; - }, - remove: function(node) { - return this._ in node && delete node[this._]; - }, - toString: function() { - return this._; - } -}; - -function sourceEvent(event) { - let sourceEvent; - while (sourceEvent = event.sourceEvent) event = sourceEvent; - return event; -} - -function pointer(event, node) { - event = sourceEvent(event); - if (node === undefined) node = event.currentTarget; - if (node) { - var svg = node.ownerSVGElement || node; - if (svg.createSVGPoint) { - var point = svg.createSVGPoint(); - point.x = event.clientX, point.y = event.clientY; - point = point.matrixTransform(node.getScreenCTM().inverse()); - return [point.x, point.y]; - } - if (node.getBoundingClientRect) { - var rect = node.getBoundingClientRect(); - return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop]; - } - } - return [event.pageX, event.pageY]; -} - -function pointers(events, node) { - if (events.target) { // i.e., instanceof Event, not TouchList or iterable - events = sourceEvent(events); - if (node === undefined) node = events.currentTarget; - events = events.touches || [events]; - } - return Array.from(events, event => pointer(event, node)); -} - -function selectAll(selector) { - return typeof selector === "string" - ? new Selection([document.querySelectorAll(selector)], [document.documentElement]) - : new Selection([selector == null ? [] : array$1(selector)], root); -} - -function nopropagation(event) { - event.stopImmediatePropagation(); -} - -function noevent(event) { - event.preventDefault(); - event.stopImmediatePropagation(); -} - -function dragDisable(view) { - var root = view.document.documentElement, - selection = select(view).on("dragstart.drag", noevent, true); - if ("onselectstart" in root) { - selection.on("selectstart.drag", noevent, true); - } else { - root.__noselect = root.style.MozUserSelect; - root.style.MozUserSelect = "none"; - } -} - -function yesdrag(view, noclick) { - var root = view.document.documentElement, - selection = select(view).on("dragstart.drag", null); - if (noclick) { - selection.on("click.drag", noevent, true); - setTimeout(function() { selection.on("click.drag", null); }, 0); - } - if ("onselectstart" in root) { - selection.on("selectstart.drag", null); - } else { - root.style.MozUserSelect = root.__noselect; - delete root.__noselect; - } -} - -var constant$2 = x => () => x; - -function DragEvent(type, { - sourceEvent, - subject, - target, - identifier, - active, - x, y, dx, dy, - dispatch -}) { - Object.defineProperties(this, { - type: {value: type, enumerable: true, configurable: true}, - sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, - subject: {value: subject, enumerable: true, configurable: true}, - target: {value: target, enumerable: true, configurable: true}, - identifier: {value: identifier, enumerable: true, configurable: true}, - active: {value: active, enumerable: true, configurable: true}, - x: {value: x, enumerable: true, configurable: true}, - y: {value: y, enumerable: true, configurable: true}, - dx: {value: dx, enumerable: true, configurable: true}, - dy: {value: dy, enumerable: true, configurable: true}, - _: {value: dispatch} - }); -} - -DragEvent.prototype.on = function() { - var value = this._.on.apply(this._, arguments); - return value === this._ ? this : value; -}; - -// Ignore right-click, since that should open the context menu. -function defaultFilter(event) { - return !event.ctrlKey && !event.button; -} - -function defaultContainer() { - return this.parentNode; -} - -function defaultSubject(event, d) { - return d == null ? {x: event.x, y: event.y} : d; -} - -function defaultTouchable() { - return navigator.maxTouchPoints || ("ontouchstart" in this); -} - -function drag() { - var filter = defaultFilter, - container = defaultContainer, - subject = defaultSubject, - touchable = defaultTouchable, - gestures = {}, - listeners = dispatch("start", "drag", "end"), - active = 0, - mousedownx, - mousedowny, - mousemoving, - touchending, - clickDistance2 = 0; - - function drag(selection) { - selection - .on("mousedown.drag", mousedowned) - .filter(touchable) - .on("touchstart.drag", touchstarted) - .on("touchmove.drag", touchmoved) - .on("touchend.drag touchcancel.drag", touchended) - .style("touch-action", "none") - .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); - } - - function mousedowned(event, d) { - if (touchending || !filter.call(this, event, d)) return; - var gesture = beforestart(this, container.call(this, event, d), event, d, "mouse"); - if (!gesture) return; - select(event.view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true); - dragDisable(event.view); - nopropagation(event); - mousemoving = false; - mousedownx = event.clientX; - mousedowny = event.clientY; - gesture("start", event); - } - - function mousemoved(event) { - noevent(event); - if (!mousemoving) { - var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny; - mousemoving = dx * dx + dy * dy > clickDistance2; - } - gestures.mouse("drag", event); - } - - function mouseupped(event) { - select(event.view).on("mousemove.drag mouseup.drag", null); - yesdrag(event.view, mousemoving); - noevent(event); - gestures.mouse("end", event); - } - - function touchstarted(event, d) { - if (!filter.call(this, event, d)) return; - var touches = event.changedTouches, - c = container.call(this, event, d), - n = touches.length, i, gesture; - - for (i = 0; i < n; ++i) { - if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) { - nopropagation(event); - gesture("start", event, touches[i]); - } - } - } - - function touchmoved(event) { - var touches = event.changedTouches, - n = touches.length, i, gesture; - - for (i = 0; i < n; ++i) { - if (gesture = gestures[touches[i].identifier]) { - noevent(event); - gesture("drag", event, touches[i]); - } - } - } - - function touchended(event) { - var touches = event.changedTouches, - n = touches.length, i, gesture; - - if (touchending) clearTimeout(touchending); - touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! - for (i = 0; i < n; ++i) { - if (gesture = gestures[touches[i].identifier]) { - nopropagation(event); - gesture("end", event, touches[i]); - } - } - } - - function beforestart(that, container, event, d, identifier, touch) { - var dispatch = listeners.copy(), - p = pointer(touch || event, container), dx, dy, - s; - - if ((s = subject.call(that, new DragEvent("beforestart", { - sourceEvent: event, - target: drag, - identifier, - active, - x: p[0], - y: p[1], - dx: 0, - dy: 0, - dispatch - }), d)) == null) return; - - dx = s.x - p[0] || 0; - dy = s.y - p[1] || 0; - - return function gesture(type, event, touch) { - var p0 = p, n; - switch (type) { - case "start": gestures[identifier] = gesture, n = active++; break; - case "end": delete gestures[identifier], --active; // nobreak - case "drag": p = pointer(touch || event, container), n = active; break; - } - dispatch.call( - type, - that, - new DragEvent(type, { - sourceEvent: event, - subject: s, - target: drag, - identifier, - active: n, - x: p[0] + dx, - y: p[1] + dy, - dx: p[0] - p0[0], - dy: p[1] - p0[1], - dispatch - }), - d - ); - }; - } - - drag.filter = function(_) { - return arguments.length ? (filter = typeof _ === "function" ? _ : constant$2(!!_), drag) : filter; - }; - - drag.container = function(_) { - return arguments.length ? (container = typeof _ === "function" ? _ : constant$2(_), drag) : container; - }; - - drag.subject = function(_) { - return arguments.length ? (subject = typeof _ === "function" ? _ : constant$2(_), drag) : subject; - }; - - drag.touchable = function(_) { - return arguments.length ? (touchable = typeof _ === "function" ? _ : constant$2(!!_), drag) : touchable; - }; - - drag.on = function() { - var value = listeners.on.apply(listeners, arguments); - return value === listeners ? drag : value; - }; - - drag.clickDistance = function(_) { - return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2); - }; - - return drag; -} - -function define(constructor, factory, prototype) { - constructor.prototype = factory.prototype = prototype; - prototype.constructor = constructor; -} - -function extend(parent, definition) { - var prototype = Object.create(parent.prototype); - for (var key in definition) prototype[key] = definition[key]; - return prototype; -} - -function Color() {} - -var darker = 0.7; -var brighter = 1 / darker; - -var reI = "\\s*([+-]?\\d+)\\s*", - reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*", - reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*", - reHex = /^#([0-9a-f]{3,8})$/, - reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"), - reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"), - reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"), - reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"), - reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"), - reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$"); - -var named = { - aliceblue: 0xf0f8ff, - antiquewhite: 0xfaebd7, - aqua: 0x00ffff, - aquamarine: 0x7fffd4, - azure: 0xf0ffff, - beige: 0xf5f5dc, - bisque: 0xffe4c4, - black: 0x000000, - blanchedalmond: 0xffebcd, - blue: 0x0000ff, - blueviolet: 0x8a2be2, - brown: 0xa52a2a, - burlywood: 0xdeb887, - cadetblue: 0x5f9ea0, - chartreuse: 0x7fff00, - chocolate: 0xd2691e, - coral: 0xff7f50, - cornflowerblue: 0x6495ed, - cornsilk: 0xfff8dc, - crimson: 0xdc143c, - cyan: 0x00ffff, - darkblue: 0x00008b, - darkcyan: 0x008b8b, - darkgoldenrod: 0xb8860b, - darkgray: 0xa9a9a9, - darkgreen: 0x006400, - darkgrey: 0xa9a9a9, - darkkhaki: 0xbdb76b, - darkmagenta: 0x8b008b, - darkolivegreen: 0x556b2f, - darkorange: 0xff8c00, - darkorchid: 0x9932cc, - darkred: 0x8b0000, - darksalmon: 0xe9967a, - darkseagreen: 0x8fbc8f, - darkslateblue: 0x483d8b, - darkslategray: 0x2f4f4f, - darkslategrey: 0x2f4f4f, - darkturquoise: 0x00ced1, - darkviolet: 0x9400d3, - deeppink: 0xff1493, - deepskyblue: 0x00bfff, - dimgray: 0x696969, - dimgrey: 0x696969, - dodgerblue: 0x1e90ff, - firebrick: 0xb22222, - floralwhite: 0xfffaf0, - forestgreen: 0x228b22, - fuchsia: 0xff00ff, - gainsboro: 0xdcdcdc, - ghostwhite: 0xf8f8ff, - gold: 0xffd700, - goldenrod: 0xdaa520, - gray: 0x808080, - green: 0x008000, - greenyellow: 0xadff2f, - grey: 0x808080, - honeydew: 0xf0fff0, - hotpink: 0xff69b4, - indianred: 0xcd5c5c, - indigo: 0x4b0082, - ivory: 0xfffff0, - khaki: 0xf0e68c, - lavender: 0xe6e6fa, - lavenderblush: 0xfff0f5, - lawngreen: 0x7cfc00, - lemonchiffon: 0xfffacd, - lightblue: 0xadd8e6, - lightcoral: 0xf08080, - lightcyan: 0xe0ffff, - lightgoldenrodyellow: 0xfafad2, - lightgray: 0xd3d3d3, - lightgreen: 0x90ee90, - lightgrey: 0xd3d3d3, - lightpink: 0xffb6c1, - lightsalmon: 0xffa07a, - lightseagreen: 0x20b2aa, - lightskyblue: 0x87cefa, - lightslategray: 0x778899, - lightslategrey: 0x778899, - lightsteelblue: 0xb0c4de, - lightyellow: 0xffffe0, - lime: 0x00ff00, - limegreen: 0x32cd32, - linen: 0xfaf0e6, - magenta: 0xff00ff, - maroon: 0x800000, - mediumaquamarine: 0x66cdaa, - mediumblue: 0x0000cd, - mediumorchid: 0xba55d3, - mediumpurple: 0x9370db, - mediumseagreen: 0x3cb371, - mediumslateblue: 0x7b68ee, - mediumspringgreen: 0x00fa9a, - mediumturquoise: 0x48d1cc, - mediumvioletred: 0xc71585, - midnightblue: 0x191970, - mintcream: 0xf5fffa, - mistyrose: 0xffe4e1, - moccasin: 0xffe4b5, - navajowhite: 0xffdead, - navy: 0x000080, - oldlace: 0xfdf5e6, - olive: 0x808000, - olivedrab: 0x6b8e23, - orange: 0xffa500, - orangered: 0xff4500, - orchid: 0xda70d6, - palegoldenrod: 0xeee8aa, - palegreen: 0x98fb98, - paleturquoise: 0xafeeee, - palevioletred: 0xdb7093, - papayawhip: 0xffefd5, - peachpuff: 0xffdab9, - peru: 0xcd853f, - pink: 0xffc0cb, - plum: 0xdda0dd, - powderblue: 0xb0e0e6, - purple: 0x800080, - rebeccapurple: 0x663399, - red: 0xff0000, - rosybrown: 0xbc8f8f, - royalblue: 0x4169e1, - saddlebrown: 0x8b4513, - salmon: 0xfa8072, - sandybrown: 0xf4a460, - seagreen: 0x2e8b57, - seashell: 0xfff5ee, - sienna: 0xa0522d, - silver: 0xc0c0c0, - skyblue: 0x87ceeb, - slateblue: 0x6a5acd, - slategray: 0x708090, - slategrey: 0x708090, - snow: 0xfffafa, - springgreen: 0x00ff7f, - steelblue: 0x4682b4, - tan: 0xd2b48c, - teal: 0x008080, - thistle: 0xd8bfd8, - tomato: 0xff6347, - turquoise: 0x40e0d0, - violet: 0xee82ee, - wheat: 0xf5deb3, - white: 0xffffff, - whitesmoke: 0xf5f5f5, - yellow: 0xffff00, - yellowgreen: 0x9acd32 -}; - -define(Color, color, { - copy: function(channels) { - return Object.assign(new this.constructor, this, channels); - }, - displayable: function() { - return this.rgb().displayable(); - }, - hex: color_formatHex, // Deprecated! Use color.formatHex. - formatHex: color_formatHex, - formatHsl: color_formatHsl, - formatRgb: color_formatRgb, - toString: color_formatRgb -}); - -function color_formatHex() { - return this.rgb().formatHex(); -} - -function color_formatHsl() { - return hslConvert(this).formatHsl(); -} - -function color_formatRgb() { - return this.rgb().formatRgb(); -} - -function color(format) { - var m, l; - format = (format + "").trim().toLowerCase(); - return (m = reHex.exec(format)) ? (l = m[1].length, m = parseInt(m[1], 16), l === 6 ? rgbn(m) // #ff0000 - : l === 3 ? new Rgb((m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), ((m & 0xf) << 4) | (m & 0xf), 1) // #f00 - : l === 8 ? rgba(m >> 24 & 0xff, m >> 16 & 0xff, m >> 8 & 0xff, (m & 0xff) / 0xff) // #ff000000 - : l === 4 ? rgba((m >> 12 & 0xf) | (m >> 8 & 0xf0), (m >> 8 & 0xf) | (m >> 4 & 0xf0), (m >> 4 & 0xf) | (m & 0xf0), (((m & 0xf) << 4) | (m & 0xf)) / 0xff) // #f000 - : null) // invalid hex - : (m = reRgbInteger.exec(format)) ? new Rgb(m[1], m[2], m[3], 1) // rgb(255, 0, 0) - : (m = reRgbPercent.exec(format)) ? new Rgb(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, 1) // rgb(100%, 0%, 0%) - : (m = reRgbaInteger.exec(format)) ? rgba(m[1], m[2], m[3], m[4]) // rgba(255, 0, 0, 1) - : (m = reRgbaPercent.exec(format)) ? rgba(m[1] * 255 / 100, m[2] * 255 / 100, m[3] * 255 / 100, m[4]) // rgb(100%, 0%, 0%, 1) - : (m = reHslPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, 1) // hsl(120, 50%, 50%) - : (m = reHslaPercent.exec(format)) ? hsla(m[1], m[2] / 100, m[3] / 100, m[4]) // hsla(120, 50%, 50%, 1) - : named.hasOwnProperty(format) ? rgbn(named[format]) // eslint-disable-line no-prototype-builtins - : format === "transparent" ? new Rgb(NaN, NaN, NaN, 0) - : null; -} - -function rgbn(n) { - return new Rgb(n >> 16 & 0xff, n >> 8 & 0xff, n & 0xff, 1); -} - -function rgba(r, g, b, a) { - if (a <= 0) r = g = b = NaN; - return new Rgb(r, g, b, a); -} - -function rgbConvert(o) { - if (!(o instanceof Color)) o = color(o); - if (!o) return new Rgb; - o = o.rgb(); - return new Rgb(o.r, o.g, o.b, o.opacity); -} - -function rgb(r, g, b, opacity) { - return arguments.length === 1 ? rgbConvert(r) : new Rgb(r, g, b, opacity == null ? 1 : opacity); -} - -function Rgb(r, g, b, opacity) { - this.r = +r; - this.g = +g; - this.b = +b; - this.opacity = +opacity; -} - -define(Rgb, rgb, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Rgb(this.r * k, this.g * k, this.b * k, this.opacity); - }, - rgb: function() { - return this; - }, - displayable: function() { - return (-0.5 <= this.r && this.r < 255.5) - && (-0.5 <= this.g && this.g < 255.5) - && (-0.5 <= this.b && this.b < 255.5) - && (0 <= this.opacity && this.opacity <= 1); - }, - hex: rgb_formatHex, // Deprecated! Use color.formatHex. - formatHex: rgb_formatHex, - formatRgb: rgb_formatRgb, - toString: rgb_formatRgb -})); - -function rgb_formatHex() { - return "#" + hex(this.r) + hex(this.g) + hex(this.b); -} - -function rgb_formatRgb() { - var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "rgb(" : "rgba(") - + Math.max(0, Math.min(255, Math.round(this.r) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.g) || 0)) + ", " - + Math.max(0, Math.min(255, Math.round(this.b) || 0)) - + (a === 1 ? ")" : ", " + a + ")"); -} - -function hex(value) { - value = Math.max(0, Math.min(255, Math.round(value) || 0)); - return (value < 16 ? "0" : "") + value.toString(16); -} - -function hsla(h, s, l, a) { - if (a <= 0) h = s = l = NaN; - else if (l <= 0 || l >= 1) h = s = NaN; - else if (s <= 0) h = NaN; - return new Hsl(h, s, l, a); -} - -function hslConvert(o) { - if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity); - if (!(o instanceof Color)) o = color(o); - if (!o) return new Hsl; - if (o instanceof Hsl) return o; - o = o.rgb(); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - min = Math.min(r, g, b), - max = Math.max(r, g, b), - h = NaN, - s = max - min, - l = (max + min) / 2; - if (s) { - if (r === max) h = (g - b) / s + (g < b) * 6; - else if (g === max) h = (b - r) / s + 2; - else h = (r - g) / s + 4; - s /= l < 0.5 ? max + min : 2 - max - min; - h *= 60; - } else { - s = l > 0 && l < 1 ? 0 : h; - } - return new Hsl(h, s, l, o.opacity); -} - -function hsl(h, s, l, opacity) { - return arguments.length === 1 ? hslConvert(h) : new Hsl(h, s, l, opacity == null ? 1 : opacity); -} - -function Hsl(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} - -define(Hsl, hsl, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Hsl(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = this.h % 360 + (this.h < 0) * 360, - s = isNaN(h) || isNaN(this.s) ? 0 : this.s, - l = this.l, - m2 = l + (l < 0.5 ? l : 1 - l) * s, - m1 = 2 * l - m2; - return new Rgb( - hsl2rgb(h >= 240 ? h - 240 : h + 120, m1, m2), - hsl2rgb(h, m1, m2), - hsl2rgb(h < 120 ? h + 240 : h - 120, m1, m2), - this.opacity - ); - }, - 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 a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a)); - return (a === 1 ? "hsl(" : "hsla(") - + (this.h || 0) + ", " - + (this.s || 0) * 100 + "%, " - + (this.l || 0) * 100 + "%" - + (a === 1 ? ")" : ", " + a + ")"); - } -})); - -/* From FvD 13.37, CSS Color Module Level 3 */ -function hsl2rgb(h, m1, m2) { - return (h < 60 ? m1 + (m2 - m1) * h / 60 - : h < 180 ? m2 - : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 - : m1) * 255; -} - -const radians = Math.PI / 180; -const degrees = 180 / Math.PI; - -// https://observablehq.com/@mbostock/lab-and-rgb -const K = 18, - Xn = 0.96422, - Yn = 1, - Zn = 0.82521, - t0 = 4 / 29, - t1 = 6 / 29, - t2 = 3 * t1 * t1, - t3 = t1 * t1 * t1; - -function labConvert(o) { - if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity); - if (o instanceof Hcl) return hcl2lab(o); - if (!(o instanceof Rgb)) o = rgbConvert(o); - var r = rgb2lrgb(o.r), - g = rgb2lrgb(o.g), - b = rgb2lrgb(o.b), - y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z; - if (r === g && g === b) x = z = y; else { - x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn); - z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn); - } - return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity); -} - -function gray(l, opacity) { - return new Lab(l, 0, 0, opacity == null ? 1 : opacity); -} - -function lab(l, a, b, opacity) { - return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity); -} - -function Lab(l, a, b, opacity) { - this.l = +l; - this.a = +a; - this.b = +b; - this.opacity = +opacity; -} - -define(Lab, lab, extend(Color, { - brighter: function(k) { - return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity); - }, - darker: function(k) { - return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity); - }, - rgb: function() { - var y = (this.l + 16) / 116, - x = isNaN(this.a) ? y : y + this.a / 500, - z = isNaN(this.b) ? y : y - this.b / 200; - x = Xn * lab2xyz(x); - y = Yn * lab2xyz(y); - z = Zn * lab2xyz(z); - return new Rgb( - lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z), - lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), - lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z), - this.opacity - ); - } -})); - -function xyz2lab(t) { - return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0; -} - -function lab2xyz(t) { - return t > t1 ? t * t * t : t2 * (t - t0); -} - -function lrgb2rgb(x) { - return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055); -} - -function rgb2lrgb(x) { - return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4); -} - -function hclConvert(o) { - if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity); - if (!(o instanceof Lab)) o = labConvert(o); - if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity); - var h = Math.atan2(o.b, o.a) * degrees; - return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity); -} - -function lch(l, c, h, opacity) { - return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity); -} - -function hcl(h, c, l, opacity) { - return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity); -} - -function Hcl(h, c, l, opacity) { - this.h = +h; - this.c = +c; - this.l = +l; - this.opacity = +opacity; -} - -function hcl2lab(o) { - if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity); - var h = o.h * radians; - return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity); -} - -define(Hcl, hcl, extend(Color, { - brighter: function(k) { - return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity); - }, - darker: function(k) { - return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity); - }, - rgb: function() { - return hcl2lab(this).rgb(); - } -})); - -var A = -0.14861, - B = +1.78277, - C = -0.29227, - D = -0.90649, - E = +1.97294, - ED = E * D, - EB = E * B, - BC_DA = B * C - D * A; - -function cubehelixConvert(o) { - if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity); - if (!(o instanceof Rgb)) o = rgbConvert(o); - var r = o.r / 255, - g = o.g / 255, - b = o.b / 255, - l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB), - bl = b - l, - k = (E * (g - l) - C * bl) / D, - s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)), // NaN if l=0 or l=1 - h = s ? Math.atan2(k, bl) * degrees - 120 : NaN; - return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity); -} - -function cubehelix(h, s, l, opacity) { - return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity); -} - -function Cubehelix(h, s, l, opacity) { - this.h = +h; - this.s = +s; - this.l = +l; - this.opacity = +opacity; -} - -define(Cubehelix, cubehelix, extend(Color, { - brighter: function(k) { - k = k == null ? brighter : Math.pow(brighter, k); - return new Cubehelix(this.h, this.s, this.l * k, this.opacity); - }, - darker: function(k) { - k = k == null ? darker : Math.pow(darker, k); - return new Cubehelix(this.h, this.s, this.l * k, this.opacity); - }, - rgb: function() { - var h = isNaN(this.h) ? 0 : (this.h + 120) * radians, - l = +this.l, - a = isNaN(this.s) ? 0 : this.s * l * (1 - l), - cosh = Math.cos(h), - sinh = Math.sin(h); - return new Rgb( - 255 * (l + a * (A * cosh + B * sinh)), - 255 * (l + a * (C * cosh + D * sinh)), - 255 * (l + a * (E * cosh)), - this.opacity - ); - } -})); - -function basis(t1, v0, v1, v2, v3) { - var t2 = t1 * t1, t3 = t2 * t1; - return ((1 - 3 * t1 + 3 * t2 - t3) * v0 - + (4 - 6 * t2 + 3 * t3) * v1 - + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 - + t3 * v3) / 6; -} - -function basis$1(values) { - var n = values.length - 1; - return function(t) { - var i = t <= 0 ? (t = 0) : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n), - v1 = values[i], - v2 = values[i + 1], - v0 = i > 0 ? values[i - 1] : 2 * v1 - v2, - v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1; - return basis((t - i / n) * n, v0, v1, v2, v3); - }; -} - -function basisClosed(values) { - var n = values.length; - return function(t) { - var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n), - v0 = values[(i + n - 1) % n], - v1 = values[i % n], - v2 = values[(i + 1) % n], - v3 = values[(i + 2) % n]; - return basis((t - i / n) * n, v0, v1, v2, v3); - }; -} - -var constant$3 = x => () => x; - -function linear(a, d) { - return function(t) { - return a + t * d; - }; -} - -function exponential(a, b, y) { - return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function(t) { - return Math.pow(a + t * b, y); - }; -} - -function hue(a, b) { - var d = b - a; - return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant$3(isNaN(a) ? b : a); -} - -function gamma(y) { - return (y = +y) === 1 ? nogamma : function(a, b) { - return b - a ? exponential(a, b, y) : constant$3(isNaN(a) ? b : a); - }; -} - -function nogamma(a, b) { - var d = b - a; - return d ? linear(a, d) : constant$3(isNaN(a) ? b : a); -} - -var interpolateRgb = (function rgbGamma(y) { - var color = gamma(y); - - function rgb$1(start, end) { - var r = color((start = rgb(start)).r, (end = rgb(end)).r), - g = color(start.g, end.g), - b = color(start.b, end.b), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.r = r(t); - start.g = g(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; - } - - rgb$1.gamma = rgbGamma; - - return rgb$1; -})(1); - -function rgbSpline(spline) { - return function(colors) { - var n = colors.length, - r = new Array(n), - g = new Array(n), - b = new Array(n), - i, color; - for (i = 0; i < n; ++i) { - color = rgb(colors[i]); - r[i] = color.r || 0; - g[i] = color.g || 0; - b[i] = color.b || 0; - } - r = spline(r); - g = spline(g); - b = spline(b); - color.opacity = 1; - return function(t) { - color.r = r(t); - color.g = g(t); - color.b = b(t); - return color + ""; - }; - }; -} - -var rgbBasis = rgbSpline(basis$1); -var rgbBasisClosed = rgbSpline(basisClosed); - -function numberArray(a, b) { - if (!b) b = []; - var n = a ? Math.min(b.length, a.length) : 0, - c = b.slice(), - i; - return function(t) { - for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t; - return c; - }; -} - -function isNumberArray(x) { - return ArrayBuffer.isView(x) && !(x instanceof DataView); -} - -function array$2(a, b) { - return (isNumberArray(b) ? numberArray : genericArray)(a, b); -} - -function genericArray(a, b) { - var nb = b ? b.length : 0, - na = a ? Math.min(nb, a.length) : 0, - x = new Array(na), - c = new Array(nb), - i; - - for (i = 0; i < na; ++i) x[i] = interpolate(a[i], b[i]); - for (; i < nb; ++i) c[i] = b[i]; - - return function(t) { - for (i = 0; i < na; ++i) c[i] = x[i](t); - return c; - }; -} - -function date(a, b) { - var d = new Date; - return a = +a, b = +b, function(t) { - return d.setTime(a * (1 - t) + b * t), d; - }; -} - -function interpolateNumber(a, b) { - return a = +a, b = +b, function(t) { - return a * (1 - t) + b * t; - }; -} - -function object(a, b) { - var i = {}, - c = {}, - k; - - if (a === null || typeof a !== "object") a = {}; - if (b === null || typeof b !== "object") b = {}; - - for (k in b) { - if (k in a) { - i[k] = interpolate(a[k], b[k]); - } else { - c[k] = b[k]; - } - } - - return function(t) { - for (k in i) c[k] = i[k](t); - return c; - }; -} - -var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g, - reB = new RegExp(reA.source, "g"); - -function zero(b) { - return function() { - return b; - }; -} - -function one(b) { - return function(t) { - return b(t) + ""; - }; -} - -function interpolateString(a, b) { - var bi = reA.lastIndex = reB.lastIndex = 0, // scan index for next number in b - am, // current match in a - bm, // current match in b - bs, // string preceding current number in b, if any - i = -1, // index in s - s = [], // string constants and placeholders - q = []; // number interpolators - - // Coerce inputs to strings. - a = a + "", b = b + ""; - - // Interpolate pairs of numbers in a & b. - while ((am = reA.exec(a)) - && (bm = reB.exec(b))) { - if ((bs = bm.index) > bi) { // a string precedes the next number in b - bs = b.slice(bi, bs); - if (s[i]) s[i] += bs; // coalesce with previous string - else s[++i] = bs; - } - if ((am = am[0]) === (bm = bm[0])) { // numbers in a & b match - if (s[i]) s[i] += bm; // coalesce with previous string - else s[++i] = bm; - } else { // interpolate non-matching numbers - s[++i] = null; - q.push({i: i, x: interpolateNumber(am, bm)}); - } - bi = reB.lastIndex; - } - - // Add remains of b. - if (bi < b.length) { - bs = b.slice(bi); - if (s[i]) s[i] += bs; // coalesce with previous string - else s[++i] = bs; - } - - // Special optimization for only a single match. - // Otherwise, interpolate each of the numbers and rejoin the string. - return s.length < 2 ? (q[0] - ? one(q[0].x) - : zero(b)) - : (b = q.length, function(t) { - for (var i = 0, o; i < b; ++i) s[(o = q[i]).i] = o.x(t); - return s.join(""); - }); -} - -function interpolate(a, b) { - var t = typeof b, c; - return b == null || t === "boolean" ? constant$3(b) - : (t === "number" ? interpolateNumber - : t === "string" ? ((c = color(b)) ? (b = c, interpolateRgb) : interpolateString) - : b instanceof color ? interpolateRgb - : b instanceof Date ? date - : isNumberArray(b) ? numberArray - : Array.isArray(b) ? genericArray - : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object - : interpolateNumber)(a, b); -} - -function discrete(range) { - var n = range.length; - return function(t) { - return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; - }; -} - -function hue$1(a, b) { - var i = hue(+a, +b); - return function(t) { - var x = i(t); - return x - 360 * Math.floor(x / 360); - }; -} - -function interpolateRound(a, b) { - return a = +a, b = +b, function(t) { - return Math.round(a * (1 - t) + b * t); - }; -} - -var degrees$1 = 180 / Math.PI; - -var identity$2 = { - translateX: 0, - translateY: 0, - rotate: 0, - skewX: 0, - scaleX: 1, - scaleY: 1 -}; - -function decompose(a, b, c, d, e, f) { - var scaleX, scaleY, skewX; - if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX; - if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX; - if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY; - if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX; - return { - translateX: e, - translateY: f, - rotate: Math.atan2(b, a) * degrees$1, - skewX: Math.atan(skewX) * degrees$1, - scaleX: scaleX, - scaleY: scaleY - }; -} - -var svgNode; - -/* eslint-disable no-undef */ -function parseCss(value) { - const m = new (typeof DOMMatrix === "function" ? DOMMatrix : WebKitCSSMatrix)(value + ""); - return m.isIdentity ? identity$2 : decompose(m.a, m.b, m.c, m.d, m.e, m.f); -} - -function parseSvg(value) { - if (value == null) return identity$2; - if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g"); - svgNode.setAttribute("transform", value); - if (!(value = svgNode.transform.baseVal.consolidate())) return identity$2; - value = value.matrix; - return decompose(value.a, value.b, value.c, value.d, value.e, value.f); -} - -function interpolateTransform(parse, pxComma, pxParen, degParen) { - - function pop(s) { - return s.length ? s.pop() + " " : ""; - } - - function translate(xa, ya, xb, yb, s, q) { - if (xa !== xb || ya !== yb) { - var i = s.push("translate(", null, pxComma, null, pxParen); - q.push({i: i - 4, x: interpolateNumber(xa, xb)}, {i: i - 2, x: interpolateNumber(ya, yb)}); - } else if (xb || yb) { - s.push("translate(" + xb + pxComma + yb + pxParen); - } - } - - function rotate(a, b, s, q) { - if (a !== b) { - if (a - b > 180) b += 360; else if (b - a > 180) a += 360; // shortest path - q.push({i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: interpolateNumber(a, b)}); - } else if (b) { - s.push(pop(s) + "rotate(" + b + degParen); - } - } - - function skewX(a, b, s, q) { - if (a !== b) { - q.push({i: s.push(pop(s) + "skewX(", null, degParen) - 2, x: interpolateNumber(a, b)}); - } else if (b) { - s.push(pop(s) + "skewX(" + b + degParen); - } - } - - function scale(xa, ya, xb, yb, s, q) { - if (xa !== xb || ya !== yb) { - var i = s.push(pop(s) + "scale(", null, ",", null, ")"); - q.push({i: i - 4, x: interpolateNumber(xa, xb)}, {i: i - 2, x: interpolateNumber(ya, yb)}); - } else if (xb !== 1 || yb !== 1) { - s.push(pop(s) + "scale(" + xb + "," + yb + ")"); - } - } - - return function(a, b) { - var s = [], // string constants and placeholders - q = []; // number interpolators - a = parse(a), b = parse(b); - translate(a.translateX, a.translateY, b.translateX, b.translateY, s, q); - rotate(a.rotate, b.rotate, s, q); - skewX(a.skewX, b.skewX, s, q); - scale(a.scaleX, a.scaleY, b.scaleX, b.scaleY, s, q); - a = b = null; // gc - return function(t) { - var i = -1, n = q.length, o; - while (++i < n) s[(o = q[i]).i] = o.x(t); - return s.join(""); - }; - }; -} - -var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)"); -var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")"); - -var epsilon2 = 1e-12; - -function cosh(x) { - return ((x = Math.exp(x)) + 1 / x) / 2; -} - -function sinh(x) { - return ((x = Math.exp(x)) - 1 / x) / 2; -} - -function tanh(x) { - return ((x = Math.exp(2 * x)) - 1) / (x + 1); -} - -var interpolateZoom = (function zoomRho(rho, rho2, rho4) { - - // p0 = [ux0, uy0, w0] - // p1 = [ux1, uy1, w1] - function zoom(p0, p1) { - var ux0 = p0[0], uy0 = p0[1], w0 = p0[2], - ux1 = p1[0], uy1 = p1[1], w1 = p1[2], - dx = ux1 - ux0, - dy = uy1 - uy0, - d2 = dx * dx + dy * dy, - i, - S; - - // Special case for u0 ≅ u1. - if (d2 < epsilon2) { - S = Math.log(w1 / w0) / rho; - i = function(t) { - return [ - ux0 + t * dx, - uy0 + t * dy, - w0 * Math.exp(rho * t * S) - ]; - }; - } - - // General case. - else { - var d1 = Math.sqrt(d2), - b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1), - b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1), - r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0), - r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1); - S = (r1 - r0) / rho; - i = function(t) { - var s = t * S, - coshr0 = cosh(r0), - u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0)); - return [ - ux0 + u * dx, - uy0 + u * dy, - w0 * coshr0 / cosh(rho * s + r0) - ]; - }; - } - - i.duration = S * 1000 * rho / Math.SQRT2; - - return i; - } - - zoom.rho = function(_) { - var _1 = Math.max(1e-3, +_), _2 = _1 * _1, _4 = _2 * _2; - return zoomRho(_1, _2, _4); - }; - - return zoom; -})(Math.SQRT2, 2, 4); - -function hsl$1(hue) { - return function(start, end) { - var h = hue((start = hsl(start)).h, (end = hsl(end)).h), - s = nogamma(start.s, end.s), - l = nogamma(start.l, end.l), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.s = s(t); - start.l = l(t); - start.opacity = opacity(t); - return start + ""; - }; - } -} - -var hsl$2 = hsl$1(hue); -var hslLong = hsl$1(nogamma); - -function lab$1(start, end) { - var l = nogamma((start = lab(start)).l, (end = lab(end)).l), - a = nogamma(start.a, end.a), - b = nogamma(start.b, end.b), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.l = l(t); - start.a = a(t); - start.b = b(t); - start.opacity = opacity(t); - return start + ""; - }; -} - -function hcl$1(hue) { - return function(start, end) { - var h = hue((start = hcl(start)).h, (end = hcl(end)).h), - c = nogamma(start.c, end.c), - l = nogamma(start.l, end.l), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.c = c(t); - start.l = l(t); - start.opacity = opacity(t); - return start + ""; - }; - } -} - -var hcl$2 = hcl$1(hue); -var hclLong = hcl$1(nogamma); - -function cubehelix$1(hue) { - return (function cubehelixGamma(y) { - y = +y; - - function cubehelix$1(start, end) { - var h = hue((start = cubehelix(start)).h, (end = cubehelix(end)).h), - s = nogamma(start.s, end.s), - l = nogamma(start.l, end.l), - opacity = nogamma(start.opacity, end.opacity); - return function(t) { - start.h = h(t); - start.s = s(t); - start.l = l(Math.pow(t, y)); - start.opacity = opacity(t); - return start + ""; - }; - } - - cubehelix$1.gamma = cubehelixGamma; - - return cubehelix$1; - })(1); -} - -var cubehelix$2 = cubehelix$1(hue); -var cubehelixLong = cubehelix$1(nogamma); - -function piecewise(interpolate$1, values) { - if (values === undefined) values = interpolate$1, interpolate$1 = interpolate; - var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n); - while (i < n) I[i] = interpolate$1(v, v = values[++i]); - return function(t) { - var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n))); - return I[i](t - i); - }; -} - -function quantize(interpolator, n) { - var samples = new Array(n); - for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1)); - return samples; -} - -var frame = 0, // is an animation frame pending? - timeout = 0, // is a timeout pending? - interval = 0, // are any timers active? - pokeDelay = 1000, // how frequently we check for clock skew - taskHead, - taskTail, - clockLast = 0, - clockNow = 0, - clockSkew = 0, - clock = typeof performance === "object" && performance.now ? performance : Date, - setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); }; - -function now() { - return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew); -} - -function clearNow() { - clockNow = 0; -} - -function Timer() { - this._call = - this._time = - this._next = null; -} - -Timer.prototype = timer.prototype = { - constructor: Timer, - restart: function(callback, delay, time) { - if (typeof callback !== "function") throw new TypeError("callback is not a function"); - time = (time == null ? now() : +time) + (delay == null ? 0 : +delay); - if (!this._next && taskTail !== this) { - if (taskTail) taskTail._next = this; - else taskHead = this; - taskTail = this; - } - this._call = callback; - this._time = time; - sleep(); - }, - stop: function() { - if (this._call) { - this._call = null; - this._time = Infinity; - sleep(); - } - } -}; - -function timer(callback, delay, time) { - var t = new Timer; - t.restart(callback, delay, time); - return t; -} - -function timerFlush() { - now(); // Get the current time, if not already set. - ++frame; // Pretend we’ve set an alarm, if we haven’t already. - var t = taskHead, e; - while (t) { - if ((e = clockNow - t._time) >= 0) t._call.call(null, e); - t = t._next; - } - --frame; -} - -function wake() { - clockNow = (clockLast = clock.now()) + clockSkew; - frame = timeout = 0; - try { - timerFlush(); - } finally { - frame = 0; - nap(); - clockNow = 0; - } -} - -function poke() { - var now = clock.now(), delay = now - clockLast; - if (delay > pokeDelay) clockSkew -= delay, clockLast = now; -} - -function nap() { - var t0, t1 = taskHead, t2, time = Infinity; - while (t1) { - if (t1._call) { - if (time > t1._time) time = t1._time; - t0 = t1, t1 = t1._next; - } else { - t2 = t1._next, t1._next = null; - t1 = t0 ? t0._next = t2 : taskHead = t2; - } - } - taskTail = t0; - sleep(time); -} - -function sleep(time) { - if (frame) return; // Soonest alarm already set, or will be. - if (timeout) timeout = clearTimeout(timeout); - var delay = time - clockNow; // Strictly less than if we recomputed clockNow. - if (delay > 24) { - if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew); - if (interval) interval = clearInterval(interval); - } else { - if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay); - frame = 1, setFrame(wake); - } -} - -function timeout$1(callback, delay, time) { - var t = new Timer; - delay = delay == null ? 0 : +delay; - t.restart(elapsed => { - t.stop(); - callback(elapsed + delay); - }, delay, time); - return t; -} - -function interval$1(callback, delay, time) { - var t = new Timer, total = delay; - if (delay == null) return t.restart(callback, delay, time), t; - t._restart = t.restart; - t.restart = function(callback, delay, time) { - delay = +delay, time = time == null ? now() : +time; - t._restart(function tick(elapsed) { - elapsed += total; - t._restart(tick, total += delay, time); - callback(elapsed); - }, delay, time); - }; - t.restart(callback, delay, time); - return t; -} - -var emptyOn = dispatch("start", "end", "cancel", "interrupt"); -var emptyTween = []; - -var CREATED = 0; -var SCHEDULED = 1; -var STARTING = 2; -var STARTED = 3; -var RUNNING = 4; -var ENDING = 5; -var ENDED = 6; - -function schedule(node, name, id, index, group, timing) { - var schedules = node.__transition; - if (!schedules) node.__transition = {}; - else if (id in schedules) return; - create$1(node, id, { - name: name, - index: index, // For context during callback. - group: group, // For context during callback. - on: emptyOn, - tween: emptyTween, - time: timing.time, - delay: timing.delay, - duration: timing.duration, - ease: timing.ease, - timer: null, - state: CREATED - }); -} - -function init(node, id) { - var schedule = get$1(node, id); - if (schedule.state > CREATED) throw new Error("too late; already scheduled"); - return schedule; -} - -function set$2(node, id) { - var schedule = get$1(node, id); - if (schedule.state > STARTED) throw new Error("too late; already running"); - return schedule; -} - -function get$1(node, id) { - var schedule = node.__transition; - if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found"); - return schedule; -} - -function create$1(node, id, self) { - var schedules = node.__transition, - tween; - - // Initialize the self timer when the transition is created. - // Note the actual delay is not known until the first callback! - schedules[id] = self; - self.timer = timer(schedule, 0, self.time); - - function schedule(elapsed) { - self.state = SCHEDULED; - self.timer.restart(start, self.delay, self.time); - - // If the elapsed delay is less than our first sleep, start immediately. - if (self.delay <= elapsed) start(elapsed - self.delay); - } - - function start(elapsed) { - var i, j, n, o; - - // If the state is not SCHEDULED, then we previously errored on start. - if (self.state !== SCHEDULED) return stop(); - - for (i in schedules) { - o = schedules[i]; - if (o.name !== self.name) continue; - - // While this element already has a starting transition during this frame, - // defer starting an interrupting transition until that transition has a - // chance to tick (and possibly end); see d3/d3-transition#54! - if (o.state === STARTED) return timeout$1(start); - - // Interrupt the active transition, if any. - if (o.state === RUNNING) { - o.state = ENDED; - o.timer.stop(); - o.on.call("interrupt", node, node.__data__, o.index, o.group); - delete schedules[i]; - } - - // Cancel any pre-empted transitions. - else if (+i < id) { - o.state = ENDED; - o.timer.stop(); - o.on.call("cancel", node, node.__data__, o.index, o.group); - delete schedules[i]; - } - } - - // Defer the first tick to end of the current frame; see d3/d3#1576. - // Note the transition may be canceled after start and before the first tick! - // Note this must be scheduled before the start event; see d3/d3-transition#16! - // Assuming this is successful, subsequent callbacks go straight to tick. - timeout$1(function() { - if (self.state === STARTED) { - self.state = RUNNING; - self.timer.restart(tick, self.delay, self.time); - tick(elapsed); - } - }); - - // Dispatch the start event. - // Note this must be done before the tween are initialized. - self.state = STARTING; - self.on.call("start", node, node.__data__, self.index, self.group); - if (self.state !== STARTING) return; // interrupted - self.state = STARTED; - - // Initialize the tween, deleting null tween. - tween = new Array(n = self.tween.length); - for (i = 0, j = -1; i < n; ++i) { - if (o = self.tween[i].value.call(node, node.__data__, self.index, self.group)) { - tween[++j] = o; - } - } - tween.length = j + 1; - } - - function tick(elapsed) { - var t = elapsed < self.duration ? self.ease.call(null, elapsed / self.duration) : (self.timer.restart(stop), self.state = ENDING, 1), - i = -1, - n = tween.length; - - while (++i < n) { - tween[i].call(node, t); - } - - // Dispatch the end event. - if (self.state === ENDING) { - self.on.call("end", node, node.__data__, self.index, self.group); - stop(); - } - } - - function stop() { - self.state = ENDED; - self.timer.stop(); - delete schedules[id]; - for (var i in schedules) return; // eslint-disable-line no-unused-vars - delete node.__transition; - } -} - -function interrupt(node, name) { - var schedules = node.__transition, - schedule, - active, - empty = true, - i; - - if (!schedules) return; - - name = name == null ? null : name + ""; - - for (i in schedules) { - if ((schedule = schedules[i]).name !== name) { empty = false; continue; } - active = schedule.state > STARTING && schedule.state < ENDING; - schedule.state = ENDED; - schedule.timer.stop(); - schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group); - delete schedules[i]; - } - - if (empty) delete node.__transition; -} - -function selection_interrupt(name) { - return this.each(function() { - interrupt(this, name); - }); -} - -function tweenRemove(id, name) { - var tween0, tween1; - return function() { - var schedule = set$2(this, id), - tween = schedule.tween; - - // If this node shared tween with the previous node, - // just assign the updated shared tween and we’re done! - // Otherwise, copy-on-write. - if (tween !== tween0) { - tween1 = tween0 = tween; - for (var i = 0, n = tween1.length; i < n; ++i) { - if (tween1[i].name === name) { - tween1 = tween1.slice(); - tween1.splice(i, 1); - break; - } - } - } - - schedule.tween = tween1; - }; -} - -function tweenFunction(id, name, value) { - var tween0, tween1; - if (typeof value !== "function") throw new Error; - return function() { - var schedule = set$2(this, id), - tween = schedule.tween; - - // If this node shared tween with the previous node, - // just assign the updated shared tween and we’re done! - // Otherwise, copy-on-write. - if (tween !== tween0) { - tween1 = (tween0 = tween).slice(); - for (var t = {name: name, value: value}, i = 0, n = tween1.length; i < n; ++i) { - if (tween1[i].name === name) { - tween1[i] = t; - break; - } - } - if (i === n) tween1.push(t); - } - - schedule.tween = tween1; - }; -} - -function transition_tween(name, value) { - var id = this._id; - - name += ""; - - if (arguments.length < 2) { - var tween = get$1(this.node(), id).tween; - for (var i = 0, n = tween.length, t; i < n; ++i) { - if ((t = tween[i]).name === name) { - return t.value; - } - } - return null; - } - - return this.each((value == null ? tweenRemove : tweenFunction)(id, name, value)); -} - -function tweenValue(transition, name, value) { - var id = transition._id; - - transition.each(function() { - var schedule = set$2(this, id); - (schedule.value || (schedule.value = {}))[name] = value.apply(this, arguments); - }); - - return function(node) { - return get$1(node, id).value[name]; - }; -} - -function interpolate$1(a, b) { - var c; - return (typeof b === "number" ? interpolateNumber - : b instanceof color ? interpolateRgb - : (c = color(b)) ? (b = c, interpolateRgb) - : interpolateString)(a, b); -} - -function attrRemove$1(name) { - return function() { - this.removeAttribute(name); - }; -} - -function attrRemoveNS$1(fullname) { - return function() { - this.removeAttributeNS(fullname.space, fullname.local); - }; -} - -function attrConstant$1(name, interpolate, value1) { - var string00, - string1 = value1 + "", - interpolate0; - return function() { - var string0 = this.getAttribute(name); - return string0 === string1 ? null - : string0 === string00 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, value1); - }; -} - -function attrConstantNS$1(fullname, interpolate, value1) { - var string00, - string1 = value1 + "", - interpolate0; - return function() { - var string0 = this.getAttributeNS(fullname.space, fullname.local); - return string0 === string1 ? null - : string0 === string00 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, value1); - }; -} - -function attrFunction$1(name, interpolate, value) { - var string00, - string10, - interpolate0; - return function() { - var string0, value1 = value(this), string1; - if (value1 == null) return void this.removeAttribute(name); - string0 = this.getAttribute(name); - string1 = value1 + ""; - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); - }; -} - -function attrFunctionNS$1(fullname, interpolate, value) { - var string00, - string10, - interpolate0; - return function() { - var string0, value1 = value(this), string1; - if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local); - string0 = this.getAttributeNS(fullname.space, fullname.local); - string1 = value1 + ""; - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); - }; -} - -function transition_attr(name, value) { - var fullname = namespace(name), i = fullname === "transform" ? interpolateTransformSvg : interpolate$1; - return this.attrTween(name, typeof value === "function" - ? (fullname.local ? attrFunctionNS$1 : attrFunction$1)(fullname, i, tweenValue(this, "attr." + name, value)) - : value == null ? (fullname.local ? attrRemoveNS$1 : attrRemove$1)(fullname) - : (fullname.local ? attrConstantNS$1 : attrConstant$1)(fullname, i, value)); -} - -function attrInterpolate(name, i) { - return function(t) { - this.setAttribute(name, i.call(this, t)); - }; -} - -function attrInterpolateNS(fullname, i) { - return function(t) { - this.setAttributeNS(fullname.space, fullname.local, i.call(this, t)); - }; -} - -function attrTweenNS(fullname, value) { - var t0, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i); - return t0; - } - tween._value = value; - return tween; -} - -function attrTween(name, value) { - var t0, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i); - return t0; - } - tween._value = value; - return tween; -} - -function transition_attrTween(name, value) { - var key = "attr." + name; - if (arguments.length < 2) return (key = this.tween(key)) && key._value; - if (value == null) return this.tween(key, null); - if (typeof value !== "function") throw new Error; - var fullname = namespace(name); - return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value)); -} - -function delayFunction(id, value) { - return function() { - init(this, id).delay = +value.apply(this, arguments); - }; -} - -function delayConstant(id, value) { - return value = +value, function() { - init(this, id).delay = value; - }; -} - -function transition_delay(value) { - var id = this._id; - - return arguments.length - ? this.each((typeof value === "function" - ? delayFunction - : delayConstant)(id, value)) - : get$1(this.node(), id).delay; -} - -function durationFunction(id, value) { - return function() { - set$2(this, id).duration = +value.apply(this, arguments); - }; -} - -function durationConstant(id, value) { - return value = +value, function() { - set$2(this, id).duration = value; - }; -} - -function transition_duration(value) { - var id = this._id; - - return arguments.length - ? this.each((typeof value === "function" - ? durationFunction - : durationConstant)(id, value)) - : get$1(this.node(), id).duration; -} - -function easeConstant(id, value) { - if (typeof value !== "function") throw new Error; - return function() { - set$2(this, id).ease = value; - }; -} - -function transition_ease(value) { - var id = this._id; - - return arguments.length - ? this.each(easeConstant(id, value)) - : get$1(this.node(), id).ease; -} - -function easeVarying(id, value) { - return function() { - var v = value.apply(this, arguments); - if (typeof v !== "function") throw new Error; - set$2(this, id).ease = v; - }; -} - -function transition_easeVarying(value) { - if (typeof value !== "function") throw new Error; - return this.each(easeVarying(this._id, value)); -} - -function transition_filter(match) { - if (typeof match !== "function") match = matcher(match); - - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) { - if ((node = group[i]) && match.call(node, node.__data__, i, group)) { - subgroup.push(node); - } - } - } - - return new Transition(subgroups, this._parents, this._name, this._id); -} - -function transition_merge(transition) { - if (transition._id !== this._id) throw new Error; - - for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) { - for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) { - if (node = group0[i] || group1[i]) { - merge[i] = node; - } - } - } - - for (; j < m0; ++j) { - merges[j] = groups0[j]; - } - - return new Transition(merges, this._parents, this._name, this._id); -} - -function start(name) { - return (name + "").trim().split(/^|\s+/).every(function(t) { - var i = t.indexOf("."); - if (i >= 0) t = t.slice(0, i); - return !t || t === "start"; - }); -} - -function onFunction(id, name, listener) { - var on0, on1, sit = start(name) ? init : set$2; - return function() { - var schedule = sit(this, id), - on = schedule.on; - - // If this node shared a dispatch with the previous node, - // just assign the updated shared dispatch and we’re done! - // Otherwise, copy-on-write. - if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener); - - schedule.on = on1; - }; -} - -function transition_on(name, listener) { - var id = this._id; - - return arguments.length < 2 - ? get$1(this.node(), id).on.on(name) - : this.each(onFunction(id, name, listener)); -} - -function removeFunction(id) { - return function() { - var parent = this.parentNode; - for (var i in this.__transition) if (+i !== id) return; - if (parent) parent.removeChild(this); - }; -} - -function transition_remove() { - return this.on("end.remove", removeFunction(this._id)); -} - -function transition_select(select) { - var name = this._name, - id = this._id; - - if (typeof select !== "function") select = selector(select); - - for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) { - if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) { - if ("__data__" in node) subnode.__data__ = node.__data__; - subgroup[i] = subnode; - schedule(subgroup[i], name, id, i, subgroup, get$1(node, id)); - } - } - } - - return new Transition(subgroups, this._parents, name, id); -} - -function transition_selectAll(select) { - var name = this._name, - id = this._id; - - if (typeof select !== "function") select = selectorAll(select); - - for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - for (var children = select.call(node, node.__data__, i, group), child, inherit = get$1(node, id), k = 0, l = children.length; k < l; ++k) { - if (child = children[k]) { - schedule(child, name, id, k, children, inherit); - } - } - subgroups.push(children); - parents.push(node); - } - } - } - - return new Transition(subgroups, parents, name, id); -} - -var Selection$1 = selection.prototype.constructor; - -function transition_selection() { - return new Selection$1(this._groups, this._parents); -} - -function styleNull(name, interpolate) { - var string00, - string10, - interpolate0; - return function() { - var string0 = styleValue(this, name), - string1 = (this.style.removeProperty(name), styleValue(this, name)); - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, string10 = string1); - }; -} - -function styleRemove$1(name) { - return function() { - this.style.removeProperty(name); - }; -} - -function styleConstant$1(name, interpolate, value1) { - var string00, - string1 = value1 + "", - interpolate0; - return function() { - var string0 = styleValue(this, name); - return string0 === string1 ? null - : string0 === string00 ? interpolate0 - : interpolate0 = interpolate(string00 = string0, value1); - }; -} - -function styleFunction$1(name, interpolate, value) { - var string00, - string10, - interpolate0; - return function() { - var string0 = styleValue(this, name), - value1 = value(this), - string1 = value1 + ""; - if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue(this, name)); - return string0 === string1 ? null - : string0 === string00 && string1 === string10 ? interpolate0 - : (string10 = string1, interpolate0 = interpolate(string00 = string0, value1)); - }; -} - -function styleMaybeRemove(id, name) { - var on0, on1, listener0, key = "style." + name, event = "end." + key, remove; - return function() { - var schedule = set$2(this, id), - on = schedule.on, - listener = schedule.value[key] == null ? remove || (remove = styleRemove$1(name)) : undefined; - - // If this node shared a dispatch with the previous node, - // just assign the updated shared dispatch and we’re done! - // Otherwise, copy-on-write. - if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener); - - schedule.on = on1; - }; -} - -function transition_style(name, value, priority) { - var i = (name += "") === "transform" ? interpolateTransformCss : interpolate$1; - return value == null ? this - .styleTween(name, styleNull(name, i)) - .on("end.style." + name, styleRemove$1(name)) - : typeof value === "function" ? this - .styleTween(name, styleFunction$1(name, i, tweenValue(this, "style." + name, value))) - .each(styleMaybeRemove(this._id, name)) - : this - .styleTween(name, styleConstant$1(name, i, value), priority) - .on("end.style." + name, null); -} - -function styleInterpolate(name, i, priority) { - return function(t) { - this.style.setProperty(name, i.call(this, t), priority); - }; -} - -function styleTween(name, value, priority) { - var t, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority); - return t; - } - tween._value = value; - return tween; -} - -function transition_styleTween(name, value, priority) { - var key = "style." + (name += ""); - if (arguments.length < 2) return (key = this.tween(key)) && key._value; - if (value == null) return this.tween(key, null); - if (typeof value !== "function") throw new Error; - return this.tween(key, styleTween(name, value, priority == null ? "" : priority)); -} - -function textConstant$1(value) { - return function() { - this.textContent = value; - }; -} - -function textFunction$1(value) { - return function() { - var value1 = value(this); - this.textContent = value1 == null ? "" : value1; - }; -} - -function transition_text(value) { - return this.tween("text", typeof value === "function" - ? textFunction$1(tweenValue(this, "text", value)) - : textConstant$1(value == null ? "" : value + "")); -} - -function textInterpolate(i) { - return function(t) { - this.textContent = i.call(this, t); - }; -} - -function textTween(value) { - var t0, i0; - function tween() { - var i = value.apply(this, arguments); - if (i !== i0) t0 = (i0 = i) && textInterpolate(i); - return t0; - } - tween._value = value; - return tween; -} - -function transition_textTween(value) { - var key = "text"; - if (arguments.length < 1) return (key = this.tween(key)) && key._value; - if (value == null) return this.tween(key, null); - if (typeof value !== "function") throw new Error; - return this.tween(key, textTween(value)); -} - -function transition_transition() { - var name = this._name, - id0 = this._id, - id1 = newId(); - - for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - var inherit = get$1(node, id0); - schedule(node, name, id1, i, group, { - time: inherit.time + inherit.delay + inherit.duration, - delay: 0, - duration: inherit.duration, - ease: inherit.ease - }); - } - } - } - - return new Transition(groups, this._parents, name, id1); -} - -function transition_end() { - var on0, on1, that = this, id = that._id, size = that.size(); - return new Promise(function(resolve, reject) { - var cancel = {value: reject}, - end = {value: function() { if (--size === 0) resolve(); }}; - - that.each(function() { - var schedule = set$2(this, id), - on = schedule.on; - - // If this node shared a dispatch with the previous node, - // just assign the updated shared dispatch and we’re done! - // Otherwise, copy-on-write. - if (on !== on0) { - on1 = (on0 = on).copy(); - on1._.cancel.push(cancel); - on1._.interrupt.push(cancel); - on1._.end.push(end); - } - - schedule.on = on1; - }); - - // The selection was empty, resolve end immediately - if (size === 0) resolve(); - }); -} - -var id = 0; - -function Transition(groups, parents, name, id) { - this._groups = groups; - this._parents = parents; - this._name = name; - this._id = id; -} - -function transition(name) { - return selection().transition(name); -} - -function newId() { - return ++id; -} - -var selection_prototype = selection.prototype; - -Transition.prototype = transition.prototype = { - constructor: Transition, - select: transition_select, - selectAll: transition_selectAll, - filter: transition_filter, - merge: transition_merge, - selection: transition_selection, - transition: transition_transition, - call: selection_prototype.call, - nodes: selection_prototype.nodes, - node: selection_prototype.node, - size: selection_prototype.size, - empty: selection_prototype.empty, - each: selection_prototype.each, - on: transition_on, - attr: transition_attr, - attrTween: transition_attrTween, - style: transition_style, - styleTween: transition_styleTween, - text: transition_text, - textTween: transition_textTween, - remove: transition_remove, - tween: transition_tween, - delay: transition_delay, - duration: transition_duration, - ease: transition_ease, - easeVarying: transition_easeVarying, - end: transition_end, - [Symbol.iterator]: selection_prototype[Symbol.iterator] -}; - -const linear$1 = t => +t; - -function quadIn(t) { - return t * t; -} - -function quadOut(t) { - return t * (2 - t); -} - -function quadInOut(t) { - return ((t *= 2) <= 1 ? t * t : --t * (2 - t) + 1) / 2; -} - -function cubicIn(t) { - return t * t * t; -} - -function cubicOut(t) { - return --t * t * t + 1; -} - -function cubicInOut(t) { - return ((t *= 2) <= 1 ? t * t * t : (t -= 2) * t * t + 2) / 2; -} - -var exponent = 3; - -var polyIn = (function custom(e) { - e = +e; - - function polyIn(t) { - return Math.pow(t, e); - } - - polyIn.exponent = custom; - - return polyIn; -})(exponent); - -var polyOut = (function custom(e) { - e = +e; - - function polyOut(t) { - return 1 - Math.pow(1 - t, e); - } - - polyOut.exponent = custom; - - return polyOut; -})(exponent); - -var polyInOut = (function custom(e) { - e = +e; - - function polyInOut(t) { - return ((t *= 2) <= 1 ? Math.pow(t, e) : 2 - Math.pow(2 - t, e)) / 2; - } - - polyInOut.exponent = custom; - - return polyInOut; -})(exponent); - -var pi = Math.PI, - halfPi = pi / 2; - -function sinIn(t) { - return (+t === 1) ? 1 : 1 - Math.cos(t * halfPi); -} - -function sinOut(t) { - return Math.sin(t * halfPi); -} - -function sinInOut(t) { - return (1 - Math.cos(pi * t)) / 2; -} - -// tpmt is two power minus ten times t scaled to [0,1] -function tpmt(x) { - return (Math.pow(2, -10 * x) - 0.0009765625) * 1.0009775171065494; -} - -function expIn(t) { - return tpmt(1 - +t); -} - -function expOut(t) { - return 1 - tpmt(t); -} - -function expInOut(t) { - return ((t *= 2) <= 1 ? tpmt(1 - t) : 2 - tpmt(t - 1)) / 2; -} - -function circleIn(t) { - return 1 - Math.sqrt(1 - t * t); -} - -function circleOut(t) { - return Math.sqrt(1 - --t * t); -} - -function circleInOut(t) { - return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2; -} - -var b1 = 4 / 11, - b2 = 6 / 11, - b3 = 8 / 11, - b4 = 3 / 4, - b5 = 9 / 11, - b6 = 10 / 11, - b7 = 15 / 16, - b8 = 21 / 22, - b9 = 63 / 64, - b0 = 1 / b1 / b1; - -function bounceIn(t) { - return 1 - bounceOut(1 - t); -} - -function bounceOut(t) { - return (t = +t) < b1 ? b0 * t * t : t < b3 ? b0 * (t -= b2) * t + b4 : t < b6 ? b0 * (t -= b5) * t + b7 : b0 * (t -= b8) * t + b9; -} - -function bounceInOut(t) { - return ((t *= 2) <= 1 ? 1 - bounceOut(1 - t) : bounceOut(t - 1) + 1) / 2; -} - -var overshoot = 1.70158; - -var backIn = (function custom(s) { - s = +s; - - function backIn(t) { - return (t = +t) * t * (s * (t - 1) + t); - } - - backIn.overshoot = custom; - - return backIn; -})(overshoot); - -var backOut = (function custom(s) { - s = +s; - - function backOut(t) { - return --t * t * ((t + 1) * s + t) + 1; - } - - backOut.overshoot = custom; - - return backOut; -})(overshoot); - -var backInOut = (function custom(s) { - s = +s; - - function backInOut(t) { - return ((t *= 2) < 1 ? t * t * ((s + 1) * t - s) : (t -= 2) * t * ((s + 1) * t + s) + 2) / 2; - } - - backInOut.overshoot = custom; - - return backInOut; -})(overshoot); - -var tau = 2 * Math.PI, - amplitude = 1, - period = 0.3; - -var elasticIn = (function custom(a, p) { - var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); - - function elasticIn(t) { - return a * tpmt(-(--t)) * Math.sin((s - t) / p); - } - - elasticIn.amplitude = function(a) { return custom(a, p * tau); }; - elasticIn.period = function(p) { return custom(a, p); }; - - return elasticIn; -})(amplitude, period); - -var elasticOut = (function custom(a, p) { - var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); - - function elasticOut(t) { - return 1 - a * tpmt(t = +t) * Math.sin((t + s) / p); - } - - elasticOut.amplitude = function(a) { return custom(a, p * tau); }; - elasticOut.period = function(p) { return custom(a, p); }; - - return elasticOut; -})(amplitude, period); - -var elasticInOut = (function custom(a, p) { - var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau); - - function elasticInOut(t) { - return ((t = t * 2 - 1) < 0 - ? a * tpmt(-t) * Math.sin((s - t) / p) - : 2 - a * tpmt(t) * Math.sin((s + t) / p)) / 2; - } - - elasticInOut.amplitude = function(a) { return custom(a, p * tau); }; - elasticInOut.period = function(p) { return custom(a, p); }; - - return elasticInOut; -})(amplitude, period); - -var defaultTiming = { - time: null, // Set on use. - delay: 0, - duration: 250, - ease: cubicInOut -}; - -function inherit(node, id) { - var timing; - while (!(timing = node.__transition) || !(timing = timing[id])) { - if (!(node = node.parentNode)) { - throw new Error(`transition ${id} not found`); - } - } - return timing; -} - -function selection_transition(name) { - var id, - timing; - - if (name instanceof Transition) { - id = name._id, name = name._name; - } else { - id = newId(), (timing = defaultTiming).time = now(), name = name == null ? null : name + ""; - } - - for (var groups = this._groups, m = groups.length, j = 0; j < m; ++j) { - for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) { - if (node = group[i]) { - schedule(node, name, id, i, group, timing || inherit(node, id)); - } - } - } - - return new Transition(groups, this._parents, name, id); -} - -selection.prototype.interrupt = selection_interrupt; -selection.prototype.transition = selection_transition; - -var root$1 = [null]; - -function active(node, name) { - var schedules = node.__transition, - schedule, - i; - - if (schedules) { - name = name == null ? null : name + ""; - for (i in schedules) { - if ((schedule = schedules[i]).state > SCHEDULED && schedule.name === name) { - return new Transition([[node]], root$1, name, +i); - } - } - } - - return null; -} - -var constant$4 = x => () => x; - -function BrushEvent(type, { - sourceEvent, - target, - selection, - mode, - dispatch -}) { - Object.defineProperties(this, { - type: {value: type, enumerable: true, configurable: true}, - sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, - target: {value: target, enumerable: true, configurable: true}, - selection: {value: selection, enumerable: true, configurable: true}, - mode: {value: mode, enumerable: true, configurable: true}, - _: {value: dispatch} - }); -} - -function nopropagation$1(event) { - event.stopImmediatePropagation(); -} - -function noevent$1(event) { - event.preventDefault(); - event.stopImmediatePropagation(); -} - -var MODE_DRAG = {name: "drag"}, - MODE_SPACE = {name: "space"}, - MODE_HANDLE = {name: "handle"}, - MODE_CENTER = {name: "center"}; - -const {abs, max: max$1, min: min$1} = Math; - -function number1(e) { - return [+e[0], +e[1]]; -} - -function number2(e) { - return [number1(e[0]), number1(e[1])]; -} - -var X = { - name: "x", - handles: ["w", "e"].map(type), - input: function(x, e) { return x == null ? null : [[+x[0], e[0][1]], [+x[1], e[1][1]]]; }, - output: function(xy) { return xy && [xy[0][0], xy[1][0]]; } -}; - -var Y = { - name: "y", - handles: ["n", "s"].map(type), - input: function(y, e) { return y == null ? null : [[e[0][0], +y[0]], [e[1][0], +y[1]]]; }, - output: function(xy) { return xy && [xy[0][1], xy[1][1]]; } -}; - -var XY = { - name: "xy", - handles: ["n", "w", "e", "s", "nw", "ne", "sw", "se"].map(type), - input: function(xy) { return xy == null ? null : number2(xy); }, - output: function(xy) { return xy; } -}; - -var cursors = { - overlay: "crosshair", - selection: "move", - n: "ns-resize", - e: "ew-resize", - s: "ns-resize", - w: "ew-resize", - nw: "nwse-resize", - ne: "nesw-resize", - se: "nwse-resize", - sw: "nesw-resize" -}; - -var flipX = { - e: "w", - w: "e", - nw: "ne", - ne: "nw", - se: "sw", - sw: "se" -}; - -var flipY = { - n: "s", - s: "n", - nw: "sw", - ne: "se", - se: "ne", - sw: "nw" -}; - -var signsX = { - overlay: +1, - selection: +1, - n: null, - e: +1, - s: null, - w: -1, - nw: -1, - ne: +1, - se: +1, - sw: -1 -}; - -var signsY = { - overlay: +1, - selection: +1, - n: -1, - e: null, - s: +1, - w: null, - nw: -1, - ne: -1, - se: +1, - sw: +1 -}; - -function type(t) { - return {type: t}; -} - -// Ignore right-click, since that should open the context menu. -function defaultFilter$1(event) { - return !event.ctrlKey && !event.button; -} - -function defaultExtent() { - var svg = this.ownerSVGElement || this; - if (svg.hasAttribute("viewBox")) { - svg = svg.viewBox.baseVal; - return [[svg.x, svg.y], [svg.x + svg.width, svg.y + svg.height]]; - } - return [[0, 0], [svg.width.baseVal.value, svg.height.baseVal.value]]; -} - -function defaultTouchable$1() { - return navigator.maxTouchPoints || ("ontouchstart" in this); -} - -// Like d3.local, but with the name “__brush†rather than auto-generated. -function local$1(node) { - while (!node.__brush) if (!(node = node.parentNode)) return; - return node.__brush; -} - -function empty$2(extent) { - return extent[0][0] === extent[1][0] - || extent[0][1] === extent[1][1]; -} - -function brushSelection(node) { - var state = node.__brush; - return state ? state.dim.output(state.selection) : null; -} - -function brushX() { - return brush$1(X); -} - -function brushY() { - return brush$1(Y); -} - -function brush() { - return brush$1(XY); -} - -function brush$1(dim) { - var extent = defaultExtent, - filter = defaultFilter$1, - touchable = defaultTouchable$1, - keys = true, - listeners = dispatch("start", "brush", "end"), - handleSize = 6, - touchending; - - function brush(group) { - var overlay = group - .property("__brush", initialize) - .selectAll(".overlay") - .data([type("overlay")]); - - overlay.enter().append("rect") - .attr("class", "overlay") - .attr("pointer-events", "all") - .attr("cursor", cursors.overlay) - .merge(overlay) - .each(function() { - var extent = local$1(this).extent; - select(this) - .attr("x", extent[0][0]) - .attr("y", extent[0][1]) - .attr("width", extent[1][0] - extent[0][0]) - .attr("height", extent[1][1] - extent[0][1]); - }); - - group.selectAll(".selection") - .data([type("selection")]) - .enter().append("rect") - .attr("class", "selection") - .attr("cursor", cursors.selection) - .attr("fill", "#777") - .attr("fill-opacity", 0.3) - .attr("stroke", "#fff") - .attr("shape-rendering", "crispEdges"); - - var handle = group.selectAll(".handle") - .data(dim.handles, function(d) { return d.type; }); - - handle.exit().remove(); - - handle.enter().append("rect") - .attr("class", function(d) { return "handle handle--" + d.type; }) - .attr("cursor", function(d) { return cursors[d.type]; }); - - group - .each(redraw) - .attr("fill", "none") - .attr("pointer-events", "all") - .on("mousedown.brush", started) - .filter(touchable) - .on("touchstart.brush", started) - .on("touchmove.brush", touchmoved) - .on("touchend.brush touchcancel.brush", touchended) - .style("touch-action", "none") - .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); - } - - brush.move = function(group, selection) { - if (group.tween) { - group - .on("start.brush", function(event) { emitter(this, arguments).beforestart().start(event); }) - .on("interrupt.brush end.brush", function(event) { emitter(this, arguments).end(event); }) - .tween("brush", function() { - var that = this, - state = that.__brush, - emit = emitter(that, arguments), - selection0 = state.selection, - selection1 = dim.input(typeof selection === "function" ? selection.apply(this, arguments) : selection, state.extent), - i = interpolate(selection0, selection1); - - function tween(t) { - state.selection = t === 1 && selection1 === null ? null : i(t); - redraw.call(that); - emit.brush(); - } - - return selection0 !== null && selection1 !== null ? tween : tween(1); - }); - } else { - group - .each(function() { - var that = this, - args = arguments, - state = that.__brush, - selection1 = dim.input(typeof selection === "function" ? selection.apply(that, args) : selection, state.extent), - emit = emitter(that, args).beforestart(); - - interrupt(that); - state.selection = selection1 === null ? null : selection1; - redraw.call(that); - emit.start().brush().end(); - }); - } - }; - - brush.clear = function(group) { - brush.move(group, null); - }; - - function redraw() { - var group = select(this), - selection = local$1(this).selection; - - if (selection) { - group.selectAll(".selection") - .style("display", null) - .attr("x", selection[0][0]) - .attr("y", selection[0][1]) - .attr("width", selection[1][0] - selection[0][0]) - .attr("height", selection[1][1] - selection[0][1]); - - group.selectAll(".handle") - .style("display", null) - .attr("x", function(d) { return d.type[d.type.length - 1] === "e" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; }) - .attr("y", function(d) { return d.type[0] === "s" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; }) - .attr("width", function(d) { return d.type === "n" || d.type === "s" ? selection[1][0] - selection[0][0] + handleSize : handleSize; }) - .attr("height", function(d) { return d.type === "e" || d.type === "w" ? selection[1][1] - selection[0][1] + handleSize : handleSize; }); - } - - else { - group.selectAll(".selection,.handle") - .style("display", "none") - .attr("x", null) - .attr("y", null) - .attr("width", null) - .attr("height", null); - } - } - - function emitter(that, args, clean) { - var emit = that.__brush.emitter; - return emit && (!clean || !emit.clean) ? emit : new Emitter(that, args, clean); - } - - function Emitter(that, args, clean) { - this.that = that; - this.args = args; - this.state = that.__brush; - this.active = 0; - this.clean = clean; - } - - Emitter.prototype = { - beforestart: function() { - if (++this.active === 1) this.state.emitter = this, this.starting = true; - return this; - }, - start: function(event, mode) { - if (this.starting) this.starting = false, this.emit("start", event, mode); - else this.emit("brush", event); - return this; - }, - brush: function(event, mode) { - this.emit("brush", event, mode); - return this; - }, - end: function(event, mode) { - if (--this.active === 0) delete this.state.emitter, this.emit("end", event, mode); - return this; - }, - emit: function(type, event, mode) { - var d = select(this.that).datum(); - listeners.call( - type, - this.that, - new BrushEvent(type, { - sourceEvent: event, - target: brush, - selection: dim.output(this.state.selection), - mode, - dispatch: listeners - }), - d - ); - } - }; - - function started(event) { - if (touchending && !event.touches) return; - if (!filter.apply(this, arguments)) return; - - var that = this, - type = event.target.__data__.type, - mode = (keys && event.metaKey ? type = "overlay" : type) === "selection" ? MODE_DRAG : (keys && event.altKey ? MODE_CENTER : MODE_HANDLE), - signX = dim === Y ? null : signsX[type], - signY = dim === X ? null : signsY[type], - state = local$1(that), - extent = state.extent, - selection = state.selection, - W = extent[0][0], w0, w1, - N = extent[0][1], n0, n1, - E = extent[1][0], e0, e1, - S = extent[1][1], s0, s1, - dx = 0, - dy = 0, - moving, - shifting = signX && signY && keys && event.shiftKey, - lockX, - lockY, - points = Array.from(event.touches || [event], t => { - const i = t.identifier; - t = pointer(t, that); - t.point0 = t.slice(); - t.identifier = i; - return t; - }); - - if (type === "overlay") { - if (selection) moving = true; - const pts = [points[0], points[1] || points[0]]; - state.selection = selection = [[ - w0 = dim === Y ? W : min$1(pts[0][0], pts[1][0]), - n0 = dim === X ? N : min$1(pts[0][1], pts[1][1]) - ], [ - e0 = dim === Y ? E : max$1(pts[0][0], pts[1][0]), - s0 = dim === X ? S : max$1(pts[0][1], pts[1][1]) - ]]; - if (points.length > 1) move(); - } else { - w0 = selection[0][0]; - n0 = selection[0][1]; - e0 = selection[1][0]; - s0 = selection[1][1]; - } - - w1 = w0; - n1 = n0; - e1 = e0; - s1 = s0; - - var group = select(that) - .attr("pointer-events", "none"); - - var overlay = group.selectAll(".overlay") - .attr("cursor", cursors[type]); - - interrupt(that); - var emit = emitter(that, arguments, true).beforestart(); - - if (event.touches) { - emit.moved = moved; - emit.ended = ended; - } else { - var view = select(event.view) - .on("mousemove.brush", moved, true) - .on("mouseup.brush", ended, true); - if (keys) view - .on("keydown.brush", keydowned, true) - .on("keyup.brush", keyupped, true); - - dragDisable(event.view); - } - - redraw.call(that); - emit.start(event, mode.name); - - function moved(event) { - for (const p of event.changedTouches || [event]) { - for (const d of points) - if (d.identifier === p.identifier) d.cur = pointer(p, that); - } - if (shifting && !lockX && !lockY && points.length === 1) { - const point = points[0]; - if (abs(point.cur[0] - point[0]) > abs(point.cur[1] - point[1])) - lockY = true; - else - lockX = true; - } - for (const point of points) - if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1]; - moving = true; - noevent$1(event); - move(event); - } - - function move(event) { - const point = points[0], point0 = point.point0; - var t; - - dx = point[0] - point0[0]; - dy = point[1] - point0[1]; - - switch (mode) { - case MODE_SPACE: - case MODE_DRAG: { - if (signX) dx = max$1(W - w0, min$1(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx; - if (signY) dy = max$1(N - n0, min$1(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy; - break; - } - case MODE_HANDLE: { - if (points[1]) { - if (signX) w1 = max$1(W, min$1(E, points[0][0])), e1 = max$1(W, min$1(E, points[1][0])), signX = 1; - if (signY) n1 = max$1(N, min$1(S, points[0][1])), s1 = max$1(N, min$1(S, points[1][1])), signY = 1; - } else { - if (signX < 0) dx = max$1(W - w0, min$1(E - w0, dx)), w1 = w0 + dx, e1 = e0; - else if (signX > 0) dx = max$1(W - e0, min$1(E - e0, dx)), w1 = w0, e1 = e0 + dx; - if (signY < 0) dy = max$1(N - n0, min$1(S - n0, dy)), n1 = n0 + dy, s1 = s0; - else if (signY > 0) dy = max$1(N - s0, min$1(S - s0, dy)), n1 = n0, s1 = s0 + dy; - } - break; - } - case MODE_CENTER: { - if (signX) w1 = max$1(W, min$1(E, w0 - dx * signX)), e1 = max$1(W, min$1(E, e0 + dx * signX)); - if (signY) n1 = max$1(N, min$1(S, n0 - dy * signY)), s1 = max$1(N, min$1(S, s0 + dy * signY)); - break; - } - } - - if (e1 < w1) { - signX *= -1; - t = w0, w0 = e0, e0 = t; - t = w1, w1 = e1, e1 = t; - if (type in flipX) overlay.attr("cursor", cursors[type = flipX[type]]); - } - - if (s1 < n1) { - signY *= -1; - t = n0, n0 = s0, s0 = t; - t = n1, n1 = s1, s1 = t; - if (type in flipY) overlay.attr("cursor", cursors[type = flipY[type]]); - } - - if (state.selection) selection = state.selection; // May be set by brush.move! - if (lockX) w1 = selection[0][0], e1 = selection[1][0]; - if (lockY) n1 = selection[0][1], s1 = selection[1][1]; - - if (selection[0][0] !== w1 - || selection[0][1] !== n1 - || selection[1][0] !== e1 - || selection[1][1] !== s1) { - state.selection = [[w1, n1], [e1, s1]]; - redraw.call(that); - emit.brush(event, mode.name); - } - } - - function ended(event) { - nopropagation$1(event); - if (event.touches) { - if (event.touches.length) return; - if (touchending) clearTimeout(touchending); - touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed! - } else { - yesdrag(event.view, moving); - view.on("keydown.brush keyup.brush mousemove.brush mouseup.brush", null); - } - group.attr("pointer-events", "all"); - overlay.attr("cursor", cursors.overlay); - if (state.selection) selection = state.selection; // May be set by brush.move (on start)! - if (empty$2(selection)) state.selection = null, redraw.call(that); - emit.end(event, mode.name); - } - - function keydowned(event) { - switch (event.keyCode) { - case 16: { // SHIFT - shifting = signX && signY; - break; - } - case 18: { // ALT - if (mode === MODE_HANDLE) { - if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; - if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; - mode = MODE_CENTER; - move(); - } - break; - } - case 32: { // SPACE; takes priority over ALT - if (mode === MODE_HANDLE || mode === MODE_CENTER) { - if (signX < 0) e0 = e1 - dx; else if (signX > 0) w0 = w1 - dx; - if (signY < 0) s0 = s1 - dy; else if (signY > 0) n0 = n1 - dy; - mode = MODE_SPACE; - overlay.attr("cursor", cursors.selection); - move(); - } - break; - } - default: return; - } - noevent$1(event); - } - - function keyupped(event) { - switch (event.keyCode) { - case 16: { // SHIFT - if (shifting) { - lockX = lockY = shifting = false; - move(); - } - break; - } - case 18: { // ALT - if (mode === MODE_CENTER) { - if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; - if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; - mode = MODE_HANDLE; - move(); - } - break; - } - case 32: { // SPACE - if (mode === MODE_SPACE) { - if (event.altKey) { - if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX; - if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY; - mode = MODE_CENTER; - } else { - if (signX < 0) e0 = e1; else if (signX > 0) w0 = w1; - if (signY < 0) s0 = s1; else if (signY > 0) n0 = n1; - mode = MODE_HANDLE; - } - overlay.attr("cursor", cursors[type]); - move(); - } - break; - } - default: return; - } - noevent$1(event); - } - } - - function touchmoved(event) { - emitter(this, arguments).moved(event); - } - - function touchended(event) { - emitter(this, arguments).ended(event); - } - - function initialize() { - var state = this.__brush || {selection: null}; - state.extent = number2(extent.apply(this, arguments)); - state.dim = dim; - return state; - } - - brush.extent = function(_) { - return arguments.length ? (extent = typeof _ === "function" ? _ : constant$4(number2(_)), brush) : extent; - }; - - brush.filter = function(_) { - return arguments.length ? (filter = typeof _ === "function" ? _ : constant$4(!!_), brush) : filter; - }; - - brush.touchable = function(_) { - return arguments.length ? (touchable = typeof _ === "function" ? _ : constant$4(!!_), brush) : touchable; - }; - - brush.handleSize = function(_) { - return arguments.length ? (handleSize = +_, brush) : handleSize; - }; - - brush.keyModifiers = function(_) { - return arguments.length ? (keys = !!_, brush) : keys; - }; - - brush.on = function() { - var value = listeners.on.apply(listeners, arguments); - return value === listeners ? brush : value; - }; - - return brush; -} - -var abs$1 = Math.abs; -var cos = Math.cos; -var sin = Math.sin; -var pi$1 = Math.PI; -var halfPi$1 = pi$1 / 2; -var tau$1 = pi$1 * 2; -var max$2 = Math.max; -var epsilon$1 = 1e-12; - -function range(i, j) { - return Array.from({length: j - i}, (_, k) => i + k); -} - -function compareValue(compare) { - return function(a, b) { - return compare( - a.source.value + a.target.value, - b.source.value + b.target.value - ); - }; -} - -function chord() { - return chord$1(false, false); -} - -function chordTranspose() { - return chord$1(false, true); -} - -function chordDirected() { - return chord$1(true, false); -} - -function chord$1(directed, transpose) { - var padAngle = 0, - sortGroups = null, - sortSubgroups = null, - sortChords = null; - - function chord(matrix) { - var n = matrix.length, - groupSums = new Array(n), - groupIndex = range(0, n), - chords = new Array(n * n), - groups = new Array(n), - k = 0, dx; - - matrix = Float64Array.from({length: n * n}, transpose - ? (_, i) => matrix[i % n][i / n | 0] - : (_, i) => matrix[i / n | 0][i % n]); - - // Compute the scaling factor from value to angle in [0, 2pi]. - for (let i = 0; i < n; ++i) { - let x = 0; - for (let j = 0; j < n; ++j) x += matrix[i * n + j] + directed * matrix[j * n + i]; - k += groupSums[i] = x; - } - k = max$2(0, tau$1 - padAngle * n) / k; - dx = k ? padAngle : tau$1 / n; - - // Compute the angles for each group and constituent chord. - { - let x = 0; - if (sortGroups) groupIndex.sort((a, b) => sortGroups(groupSums[a], groupSums[b])); - for (const i of groupIndex) { - const x0 = x; - if (directed) { - const subgroupIndex = range(~n + 1, n).filter(j => j < 0 ? matrix[~j * n + i] : matrix[i * n + j]); - if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(a < 0 ? -matrix[~a * n + i] : matrix[i * n + a], b < 0 ? -matrix[~b * n + i] : matrix[i * n + b])); - for (const j of subgroupIndex) { - if (j < 0) { - const chord = chords[~j * n + i] || (chords[~j * n + i] = {source: null, target: null}); - chord.target = {index: i, startAngle: x, endAngle: x += matrix[~j * n + i] * k, value: matrix[~j * n + i]}; - } else { - const chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null}); - chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]}; - } - } - groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]}; - } else { - const subgroupIndex = range(0, n).filter(j => matrix[i * n + j] || matrix[j * n + i]); - if (sortSubgroups) subgroupIndex.sort((a, b) => sortSubgroups(matrix[i * n + a], matrix[i * n + b])); - for (const j of subgroupIndex) { - let chord; - if (i < j) { - chord = chords[i * n + j] || (chords[i * n + j] = {source: null, target: null}); - chord.source = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]}; - } else { - chord = chords[j * n + i] || (chords[j * n + i] = {source: null, target: null}); - chord.target = {index: i, startAngle: x, endAngle: x += matrix[i * n + j] * k, value: matrix[i * n + j]}; - if (i === j) chord.source = chord.target; - } - if (chord.source && chord.target && chord.source.value < chord.target.value) { - const source = chord.source; - chord.source = chord.target; - chord.target = source; - } - } - groups[i] = {index: i, startAngle: x0, endAngle: x, value: groupSums[i]}; - } - x += dx; - } - } - - // Remove empty chords. - chords = Object.values(chords); - chords.groups = groups; - return sortChords ? chords.sort(sortChords) : chords; - } - - chord.padAngle = function(_) { - return arguments.length ? (padAngle = max$2(0, _), chord) : padAngle; - }; - - chord.sortGroups = function(_) { - return arguments.length ? (sortGroups = _, chord) : sortGroups; - }; - - chord.sortSubgroups = function(_) { - return arguments.length ? (sortSubgroups = _, chord) : sortSubgroups; - }; - - chord.sortChords = function(_) { - return arguments.length ? (_ == null ? sortChords = null : (sortChords = compareValue(_))._ = _, chord) : sortChords && sortChords._; - }; - - return chord; -} - -const pi$2 = Math.PI, - tau$2 = 2 * pi$2, - epsilon$2 = 1e-6, - tauEpsilon = tau$2 - epsilon$2; - -function Path() { - this._x0 = this._y0 = // start of current subpath - this._x1 = this._y1 = null; // end of current subpath - this._ = ""; -} - -function path() { - return new Path; -} - -Path.prototype = path.prototype = { - constructor: Path, - moveTo: function(x, y) { - this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y); - }, - closePath: function() { - if (this._x1 !== null) { - this._x1 = this._x0, this._y1 = this._y0; - this._ += "Z"; - } - }, - lineTo: function(x, y) { - this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y); - }, - quadraticCurveTo: function(x1, y1, x, y) { - this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y); - }, - bezierCurveTo: function(x1, y1, x2, y2, x, y) { - this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y); - }, - arcTo: function(x1, y1, x2, y2, r) { - x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; - var x0 = this._x1, - y0 = this._y1, - x21 = x2 - x1, - y21 = y2 - y1, - x01 = x0 - x1, - y01 = y0 - y1, - l01_2 = x01 * x01 + y01 * y01; - - // Is the radius negative? Error. - if (r < 0) throw new Error("negative radius: " + r); - - // Is this path empty? Move to (x1,y1). - if (this._x1 === null) { - this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1); - } - - // Or, is (x1,y1) coincident with (x0,y0)? Do nothing. - else if (!(l01_2 > epsilon$2)); - - // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear? - // Equivalently, is (x1,y1) coincident with (x2,y2)? - // Or, is the radius zero? Line to (x1,y1). - else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon$2) || !r) { - this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1); - } - - // Otherwise, draw an arc! - else { - var x20 = x2 - x0, - y20 = y2 - y0, - l21_2 = x21 * x21 + y21 * y21, - l20_2 = x20 * x20 + y20 * y20, - l21 = Math.sqrt(l21_2), - l01 = Math.sqrt(l01_2), - l = r * Math.tan((pi$2 - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), - t01 = l / l01, - t21 = l / l21; - - // If the start tangent is not coincident with (x0,y0), line to. - if (Math.abs(t01 - 1) > epsilon$2) { - this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01); - } - - this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21); - } - }, - arc: function(x, y, r, a0, a1, ccw) { - x = +x, y = +y, r = +r, ccw = !!ccw; - var dx = r * Math.cos(a0), - dy = r * Math.sin(a0), - x0 = x + dx, - y0 = y + dy, - cw = 1 ^ ccw, - da = ccw ? a0 - a1 : a1 - a0; - - // Is the radius negative? Error. - if (r < 0) throw new Error("negative radius: " + r); - - // Is this path empty? Move to (x0,y0). - if (this._x1 === null) { - this._ += "M" + x0 + "," + y0; - } - - // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0). - else if (Math.abs(this._x1 - x0) > epsilon$2 || Math.abs(this._y1 - y0) > epsilon$2) { - this._ += "L" + x0 + "," + y0; - } - - // Is this arc empty? We’re done. - if (!r) return; - - // Does the angle go the wrong way? Flip the direction. - if (da < 0) da = da % tau$2 + tau$2; - - // Is this a complete circle? Draw two arcs to complete the circle. - if (da > tauEpsilon) { - this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0); - } - - // Is this arc non-empty? Draw an arc! - else if (da > epsilon$2) { - this._ += "A" + r + "," + r + ",0," + (+(da >= pi$2)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1)); - } - }, - rect: function(x, y, w, h) { - this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z"; - }, - toString: function() { - return this._; - } -}; - -var slice$2 = Array.prototype.slice; - -function constant$5(x) { - return function() { - return x; - }; -} - -function defaultSource(d) { - return d.source; -} - -function defaultTarget(d) { - return d.target; -} - -function defaultRadius(d) { - return d.radius; -} - -function defaultStartAngle(d) { - return d.startAngle; -} - -function defaultEndAngle(d) { - return d.endAngle; -} - -function defaultPadAngle() { - return 0; -} - -function defaultArrowheadRadius() { - return 10; -} - -function ribbon(headRadius) { - var source = defaultSource, - target = defaultTarget, - sourceRadius = defaultRadius, - targetRadius = defaultRadius, - startAngle = defaultStartAngle, - endAngle = defaultEndAngle, - padAngle = defaultPadAngle, - context = null; - - function ribbon() { - var buffer, - s = source.apply(this, arguments), - t = target.apply(this, arguments), - ap = padAngle.apply(this, arguments) / 2, - argv = slice$2.call(arguments), - sr = +sourceRadius.apply(this, (argv[0] = s, argv)), - sa0 = startAngle.apply(this, argv) - halfPi$1, - sa1 = endAngle.apply(this, argv) - halfPi$1, - tr = +targetRadius.apply(this, (argv[0] = t, argv)), - ta0 = startAngle.apply(this, argv) - halfPi$1, - ta1 = endAngle.apply(this, argv) - halfPi$1; - - if (!context) context = buffer = path(); - - if (ap > epsilon$1) { - if (abs$1(sa1 - sa0) > ap * 2 + epsilon$1) sa1 > sa0 ? (sa0 += ap, sa1 -= ap) : (sa0 -= ap, sa1 += ap); - else sa0 = sa1 = (sa0 + sa1) / 2; - if (abs$1(ta1 - ta0) > ap * 2 + epsilon$1) ta1 > ta0 ? (ta0 += ap, ta1 -= ap) : (ta0 -= ap, ta1 += ap); - else ta0 = ta1 = (ta0 + ta1) / 2; - } - - context.moveTo(sr * cos(sa0), sr * sin(sa0)); - context.arc(0, 0, sr, sa0, sa1); - if (sa0 !== ta0 || sa1 !== ta1) { - if (headRadius) { - var hr = +headRadius.apply(this, arguments), tr2 = tr - hr, ta2 = (ta0 + ta1) / 2; - context.quadraticCurveTo(0, 0, tr2 * cos(ta0), tr2 * sin(ta0)); - context.lineTo(tr * cos(ta2), tr * sin(ta2)); - context.lineTo(tr2 * cos(ta1), tr2 * sin(ta1)); - } else { - context.quadraticCurveTo(0, 0, tr * cos(ta0), tr * sin(ta0)); - context.arc(0, 0, tr, ta0, ta1); - } - } - context.quadraticCurveTo(0, 0, sr * cos(sa0), sr * sin(sa0)); - context.closePath(); - - if (buffer) return context = null, buffer + "" || null; - } - - if (headRadius) ribbon.headRadius = function(_) { - return arguments.length ? (headRadius = typeof _ === "function" ? _ : constant$5(+_), ribbon) : headRadius; - }; - - ribbon.radius = function(_) { - return arguments.length ? (sourceRadius = targetRadius = typeof _ === "function" ? _ : constant$5(+_), ribbon) : sourceRadius; - }; - - ribbon.sourceRadius = function(_) { - return arguments.length ? (sourceRadius = typeof _ === "function" ? _ : constant$5(+_), ribbon) : sourceRadius; - }; - - ribbon.targetRadius = function(_) { - return arguments.length ? (targetRadius = typeof _ === "function" ? _ : constant$5(+_), ribbon) : targetRadius; - }; - - ribbon.startAngle = function(_) { - return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant$5(+_), ribbon) : startAngle; - }; - - ribbon.endAngle = function(_) { - return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant$5(+_), ribbon) : endAngle; - }; - - ribbon.padAngle = function(_) { - return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant$5(+_), ribbon) : padAngle; - }; - - ribbon.source = function(_) { - return arguments.length ? (source = _, ribbon) : source; - }; - - ribbon.target = function(_) { - return arguments.length ? (target = _, ribbon) : target; - }; - - ribbon.context = function(_) { - return arguments.length ? ((context = _ == null ? null : _), ribbon) : context; - }; - - return ribbon; -} - -function ribbon$1() { - return ribbon(); -} - -function ribbonArrow() { - return ribbon(defaultArrowheadRadius); -} - -var array$3 = Array.prototype; - -var slice$3 = array$3.slice; - -function ascending$2(a, b) { - return a - b; -} - -function area(ring) { - var i = 0, n = ring.length, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1]; - while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1]; - return area; -} - -var constant$6 = x => () => x; - -function contains(ring, hole) { - var i = -1, n = hole.length, c; - while (++i < n) if (c = ringContains(ring, hole[i])) return c; - return 0; -} - -function ringContains(ring, point) { - var x = point[0], y = point[1], contains = -1; - for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) { - var pi = ring[i], xi = pi[0], yi = pi[1], pj = ring[j], xj = pj[0], yj = pj[1]; - if (segmentContains(pi, pj, point)) return 0; - if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) contains = -contains; - } - return contains; -} - -function segmentContains(a, b, c) { - var i; return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]); -} - -function collinear(a, b, c) { - return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]); -} - -function within(p, q, r) { - return p <= q && q <= r || r <= q && q <= p; -} - -function noop$1() {} - -var cases = [ - [], - [[[1.0, 1.5], [0.5, 1.0]]], - [[[1.5, 1.0], [1.0, 1.5]]], - [[[1.5, 1.0], [0.5, 1.0]]], - [[[1.0, 0.5], [1.5, 1.0]]], - [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]], - [[[1.0, 0.5], [1.0, 1.5]]], - [[[1.0, 0.5], [0.5, 1.0]]], - [[[0.5, 1.0], [1.0, 0.5]]], - [[[1.0, 1.5], [1.0, 0.5]]], - [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]], - [[[1.5, 1.0], [1.0, 0.5]]], - [[[0.5, 1.0], [1.5, 1.0]]], - [[[1.0, 1.5], [1.5, 1.0]]], - [[[0.5, 1.0], [1.0, 1.5]]], - [] -]; - -function contours() { - var dx = 1, - dy = 1, - threshold = thresholdSturges, - smooth = smoothLinear; - - function contours(values) { - var tz = threshold(values); - - // Convert number of thresholds into uniform thresholds. - if (!Array.isArray(tz)) { - var domain = extent(values), start = domain[0], stop = domain[1]; - tz = tickStep(start, stop, tz); - tz = sequence(Math.floor(start / tz) * tz, Math.floor(stop / tz) * tz, tz); - } else { - tz = tz.slice().sort(ascending$2); - } - - return tz.map(function(value) { - return contour(values, value); - }); - } - - // Accumulate, smooth contour rings, assign holes to exterior rings. - // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js - function contour(values, value) { - var polygons = [], - holes = []; - - isorings(values, value, function(ring) { - smooth(ring, values, value); - if (area(ring) > 0) polygons.push([ring]); - else holes.push(ring); - }); - - holes.forEach(function(hole) { - for (var i = 0, n = polygons.length, polygon; i < n; ++i) { - if (contains((polygon = polygons[i])[0], hole) !== -1) { - polygon.push(hole); - return; - } - } - }); - - return { - type: "MultiPolygon", - value: value, - coordinates: polygons - }; - } - - // Marching squares with isolines stitched into rings. - // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js - function isorings(values, value, callback) { - var fragmentByStart = new Array, - fragmentByEnd = new Array, - x, y, t0, t1, t2, t3; - - // Special case for the first row (y = -1, t2 = t3 = 0). - x = y = -1; - t1 = values[0] >= value; - cases[t1 << 1].forEach(stitch); - while (++x < dx - 1) { - t0 = t1, t1 = values[x + 1] >= value; - cases[t0 | t1 << 1].forEach(stitch); - } - cases[t1 << 0].forEach(stitch); - - // General case for the intermediate rows. - while (++y < dy - 1) { - x = -1; - t1 = values[y * dx + dx] >= value; - t2 = values[y * dx] >= value; - cases[t1 << 1 | t2 << 2].forEach(stitch); - while (++x < dx - 1) { - t0 = t1, t1 = values[y * dx + dx + x + 1] >= value; - t3 = t2, t2 = values[y * dx + x + 1] >= value; - cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch); - } - cases[t1 | t2 << 3].forEach(stitch); - } - - // Special case for the last row (y = dy - 1, t0 = t1 = 0). - x = -1; - t2 = values[y * dx] >= value; - cases[t2 << 2].forEach(stitch); - while (++x < dx - 1) { - t3 = t2, t2 = values[y * dx + x + 1] >= value; - cases[t2 << 2 | t3 << 3].forEach(stitch); - } - cases[t2 << 3].forEach(stitch); - - function stitch(line) { - var start = [line[0][0] + x, line[0][1] + y], - end = [line[1][0] + x, line[1][1] + y], - startIndex = index(start), - endIndex = index(end), - f, g; - if (f = fragmentByEnd[startIndex]) { - if (g = fragmentByStart[endIndex]) { - delete fragmentByEnd[f.end]; - delete fragmentByStart[g.start]; - if (f === g) { - f.ring.push(end); - callback(f.ring); - } else { - fragmentByStart[f.start] = fragmentByEnd[g.end] = {start: f.start, end: g.end, ring: f.ring.concat(g.ring)}; - } - } else { - delete fragmentByEnd[f.end]; - f.ring.push(end); - fragmentByEnd[f.end = endIndex] = f; - } - } else if (f = fragmentByStart[endIndex]) { - if (g = fragmentByEnd[startIndex]) { - delete fragmentByStart[f.start]; - delete fragmentByEnd[g.end]; - if (f === g) { - f.ring.push(end); - callback(f.ring); - } else { - fragmentByStart[g.start] = fragmentByEnd[f.end] = {start: g.start, end: f.end, ring: g.ring.concat(f.ring)}; - } - } else { - delete fragmentByStart[f.start]; - f.ring.unshift(start); - fragmentByStart[f.start = startIndex] = f; - } - } else { - fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {start: startIndex, end: endIndex, ring: [start, end]}; - } - } - } - - function index(point) { - return point[0] * 2 + point[1] * (dx + 1) * 4; - } - - function smoothLinear(ring, values, value) { - ring.forEach(function(point) { - var x = point[0], - y = point[1], - xt = x | 0, - yt = y | 0, - v0, - v1 = values[yt * dx + xt]; - if (x > 0 && x < dx && xt === x) { - v0 = values[yt * dx + xt - 1]; - point[0] = x + (value - v0) / (v1 - v0) - 0.5; - } - if (y > 0 && y < dy && yt === y) { - v0 = values[(yt - 1) * dx + xt]; - point[1] = y + (value - v0) / (v1 - v0) - 0.5; - } - }); - } - - contours.contour = contour; - - contours.size = function(_) { - if (!arguments.length) return [dx, dy]; - var _0 = Math.floor(_[0]), _1 = Math.floor(_[1]); - if (!(_0 >= 0 && _1 >= 0)) throw new Error("invalid size"); - return dx = _0, dy = _1, contours; - }; - - contours.thresholds = function(_) { - return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant$6(slice$3.call(_)) : constant$6(_), contours) : threshold; - }; - - contours.smooth = function(_) { - return arguments.length ? (smooth = _ ? smoothLinear : noop$1, contours) : smooth === smoothLinear; - }; - - return contours; -} - -// TODO Optimize edge cases. -// TODO Optimize index calculation. -// TODO Optimize arguments. -function blurX(source, target, r) { - var n = source.width, - m = source.height, - w = (r << 1) + 1; - for (var j = 0; j < m; ++j) { - for (var i = 0, sr = 0; i < n + r; ++i) { - if (i < n) { - sr += source.data[i + j * n]; - } - if (i >= r) { - if (i >= w) { - sr -= source.data[i - w + j * n]; - } - target.data[i - r + j * n] = sr / Math.min(i + 1, n - 1 + w - i, w); - } - } - } -} - -// TODO Optimize edge cases. -// TODO Optimize index calculation. -// TODO Optimize arguments. -function blurY(source, target, r) { - var n = source.width, - m = source.height, - w = (r << 1) + 1; - for (var i = 0; i < n; ++i) { - for (var j = 0, sr = 0; j < m + r; ++j) { - if (j < m) { - sr += source.data[i + j * n]; - } - if (j >= r) { - if (j >= w) { - sr -= source.data[i + (j - w) * n]; - } - target.data[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w); - } - } - } -} - -function defaultX(d) { - return d[0]; -} - -function defaultY(d) { - return d[1]; -} - -function defaultWeight() { - return 1; -} - -function density() { - var x = defaultX, - y = defaultY, - weight = defaultWeight, - dx = 960, - dy = 500, - r = 20, // blur radius - k = 2, // log2(grid cell size) - o = r * 3, // grid offset, to pad for blur - n = (dx + o * 2) >> k, // grid width - m = (dy + o * 2) >> k, // grid height - threshold = constant$6(20); - - function density(data) { - var values0 = new Float32Array(n * m), - values1 = new Float32Array(n * m); - - data.forEach(function(d, i, data) { - var xi = (+x(d, i, data) + o) >> k, - yi = (+y(d, i, data) + o) >> k, - wi = +weight(d, i, data); - if (xi >= 0 && xi < n && yi >= 0 && yi < m) { - values0[xi + yi * n] += wi; - } - }); - - // TODO Optimize. - blurX({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); - blurY({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); - blurX({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); - blurY({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); - blurX({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k); - blurY({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k); - - var tz = threshold(values0); - - // Convert number of thresholds into uniform thresholds. - if (!Array.isArray(tz)) { - var stop = max(values0); - tz = tickStep(0, stop, tz); - tz = sequence(0, Math.floor(stop / tz) * tz, tz); - tz.shift(); - } - - return contours() - .thresholds(tz) - .size([n, m]) - (values0) - .map(transform); - } - - function transform(geometry) { - geometry.value *= Math.pow(2, -2 * k); // Density in points per square pixel. - geometry.coordinates.forEach(transformPolygon); - return geometry; - } - - function transformPolygon(coordinates) { - coordinates.forEach(transformRing); - } - - function transformRing(coordinates) { - coordinates.forEach(transformPoint); - } - - // TODO Optimize. - function transformPoint(coordinates) { - coordinates[0] = coordinates[0] * Math.pow(2, k) - o; - coordinates[1] = coordinates[1] * Math.pow(2, k) - o; - } - - function resize() { - o = r * 3; - n = (dx + o * 2) >> k; - m = (dy + o * 2) >> k; - return density; - } - - density.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : constant$6(+_), density) : x; - }; - - density.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : constant$6(+_), density) : y; - }; - - density.weight = function(_) { - return arguments.length ? (weight = typeof _ === "function" ? _ : constant$6(+_), density) : weight; - }; - - density.size = function(_) { - if (!arguments.length) return [dx, dy]; - var _0 = +_[0], _1 = +_[1]; - if (!(_0 >= 0 && _1 >= 0)) throw new Error("invalid size"); - return dx = _0, dy = _1, resize(); - }; - - density.cellSize = function(_) { - if (!arguments.length) return 1 << k; - if (!((_ = +_) >= 1)) throw new Error("invalid cell size"); - return k = Math.floor(Math.log(_) / Math.LN2), resize(); - }; - - density.thresholds = function(_) { - return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? constant$6(slice$3.call(_)) : constant$6(_), density) : threshold; - }; - - density.bandwidth = function(_) { - if (!arguments.length) return Math.sqrt(r * (r + 1)); - if (!((_ = +_) >= 0)) throw new Error("invalid bandwidth"); - return r = Math.round((Math.sqrt(4 * _ * _ + 1) - 1) / 2), resize(); - }; - - return density; -} - -const EPSILON = Math.pow(2, -52); -const EDGE_STACK = new Uint32Array(512); - -class Delaunator { - - static from(points, getX = defaultGetX, getY = defaultGetY) { - const n = points.length; - const coords = new Float64Array(n * 2); - - for (let i = 0; i < n; i++) { - const p = points[i]; - coords[2 * i] = getX(p); - coords[2 * i + 1] = getY(p); - } - - return new Delaunator(coords); - } - - constructor(coords) { - const n = coords.length >> 1; - if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.'); - - this.coords = coords; - - // arrays that will store the triangulation graph - const maxTriangles = Math.max(2 * n - 5, 0); - this._triangles = new Uint32Array(maxTriangles * 3); - this._halfedges = new Int32Array(maxTriangles * 3); - - // temporary arrays for tracking the edges of the advancing convex hull - this._hashSize = Math.ceil(Math.sqrt(n)); - this._hullPrev = new Uint32Array(n); // edge to prev edge - this._hullNext = new Uint32Array(n); // edge to next edge - this._hullTri = new Uint32Array(n); // edge to adjacent triangle - this._hullHash = new Int32Array(this._hashSize).fill(-1); // angular edge hash - - // temporary arrays for sorting points - this._ids = new Uint32Array(n); - this._dists = new Float64Array(n); - - this.update(); - } - - update() { - const {coords, _hullPrev: hullPrev, _hullNext: hullNext, _hullTri: hullTri, _hullHash: hullHash} = this; - const n = coords.length >> 1; - - // populate an array of point indices; calculate input data bbox - let minX = Infinity; - let minY = Infinity; - let maxX = -Infinity; - let maxY = -Infinity; - - for (let i = 0; i < n; i++) { - const x = coords[2 * i]; - const y = coords[2 * i + 1]; - if (x < minX) minX = x; - if (y < minY) minY = y; - if (x > maxX) maxX = x; - if (y > maxY) maxY = y; - this._ids[i] = i; - } - const cx = (minX + maxX) / 2; - const cy = (minY + maxY) / 2; - - let minDist = Infinity; - let i0, i1, i2; - - // pick a seed point close to the center - for (let i = 0; i < n; i++) { - const d = dist(cx, cy, coords[2 * i], coords[2 * i + 1]); - if (d < minDist) { - i0 = i; - minDist = d; - } - } - const i0x = coords[2 * i0]; - const i0y = coords[2 * i0 + 1]; - - minDist = Infinity; - - // find the point closest to the seed - for (let i = 0; i < n; i++) { - if (i === i0) continue; - const d = dist(i0x, i0y, coords[2 * i], coords[2 * i + 1]); - if (d < minDist && d > 0) { - i1 = i; - minDist = d; - } - } - let i1x = coords[2 * i1]; - let i1y = coords[2 * i1 + 1]; - - let minRadius = Infinity; - - // find the third point which forms the smallest circumcircle with the first two - for (let i = 0; i < n; i++) { - if (i === i0 || i === i1) continue; - const r = circumradius(i0x, i0y, i1x, i1y, coords[2 * i], coords[2 * i + 1]); - if (r < minRadius) { - i2 = i; - minRadius = r; - } - } - let i2x = coords[2 * i2]; - let i2y = coords[2 * i2 + 1]; - - if (minRadius === Infinity) { - // order collinear points by dx (or dy if all x are identical) - // and return the list as a hull - for (let i = 0; i < n; i++) { - this._dists[i] = (coords[2 * i] - coords[0]) || (coords[2 * i + 1] - coords[1]); - } - quicksort(this._ids, this._dists, 0, n - 1); - const hull = new Uint32Array(n); - let j = 0; - for (let i = 0, d0 = -Infinity; i < n; i++) { - const id = this._ids[i]; - if (this._dists[id] > d0) { - hull[j++] = id; - d0 = this._dists[id]; - } - } - this.hull = hull.subarray(0, j); - this.triangles = new Uint32Array(0); - this.halfedges = new Uint32Array(0); - return; - } - - // swap the order of the seed points for counter-clockwise orientation - if (orient(i0x, i0y, i1x, i1y, i2x, i2y)) { - const i = i1; - const x = i1x; - const y = i1y; - i1 = i2; - i1x = i2x; - i1y = i2y; - i2 = i; - i2x = x; - i2y = y; - } - - const center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y); - this._cx = center.x; - this._cy = center.y; - - for (let i = 0; i < n; i++) { - this._dists[i] = dist(coords[2 * i], coords[2 * i + 1], center.x, center.y); - } - - // sort the points by distance from the seed triangle circumcenter - quicksort(this._ids, this._dists, 0, n - 1); - - // set up the seed triangle as the starting hull - this._hullStart = i0; - let hullSize = 3; - - hullNext[i0] = hullPrev[i2] = i1; - hullNext[i1] = hullPrev[i0] = i2; - hullNext[i2] = hullPrev[i1] = i0; - - hullTri[i0] = 0; - hullTri[i1] = 1; - hullTri[i2] = 2; - - hullHash.fill(-1); - hullHash[this._hashKey(i0x, i0y)] = i0; - hullHash[this._hashKey(i1x, i1y)] = i1; - hullHash[this._hashKey(i2x, i2y)] = i2; - - this.trianglesLen = 0; - this._addTriangle(i0, i1, i2, -1, -1, -1); - - for (let k = 0, xp, yp; k < this._ids.length; k++) { - const i = this._ids[k]; - const x = coords[2 * i]; - const y = coords[2 * i + 1]; - - // skip near-duplicate points - if (k > 0 && Math.abs(x - xp) <= EPSILON && Math.abs(y - yp) <= EPSILON) continue; - xp = x; - yp = y; - - // skip seed triangle points - if (i === i0 || i === i1 || i === i2) continue; - - // find a visible edge on the convex hull using edge hash - let start = 0; - for (let j = 0, key = this._hashKey(x, y); j < this._hashSize; j++) { - start = hullHash[(key + j) % this._hashSize]; - if (start !== -1 && start !== hullNext[start]) break; - } - - start = hullPrev[start]; - let e = start, q; - while (q = hullNext[e], !orient(x, y, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1])) { - e = q; - if (e === start) { - e = -1; - break; - } - } - if (e === -1) continue; // likely a near-duplicate point; skip it - - // add the first triangle from the point - let t = this._addTriangle(e, i, hullNext[e], -1, -1, hullTri[e]); - - // recursively flip triangles from the point until they satisfy the Delaunay condition - hullTri[i] = this._legalize(t + 2); - hullTri[e] = t; // keep track of boundary triangles on the hull - hullSize++; - - // walk forward through the hull, adding more triangles and flipping recursively - let n = hullNext[e]; - while (q = hullNext[n], orient(x, y, coords[2 * n], coords[2 * n + 1], coords[2 * q], coords[2 * q + 1])) { - t = this._addTriangle(n, i, q, hullTri[i], -1, hullTri[n]); - hullTri[i] = this._legalize(t + 2); - hullNext[n] = n; // mark as removed - hullSize--; - n = q; - } - - // walk backward from the other side, adding more triangles and flipping - if (e === start) { - while (q = hullPrev[e], orient(x, y, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1])) { - t = this._addTriangle(q, i, e, -1, hullTri[e], hullTri[q]); - this._legalize(t + 2); - hullTri[q] = t; - hullNext[e] = e; // mark as removed - hullSize--; - e = q; - } - } - - // update the hull indices - this._hullStart = hullPrev[i] = e; - hullNext[e] = hullPrev[n] = i; - hullNext[i] = n; - - // save the two new edges in the hash table - hullHash[this._hashKey(x, y)] = i; - hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e; - } - - this.hull = new Uint32Array(hullSize); - for (let i = 0, e = this._hullStart; i < hullSize; i++) { - this.hull[i] = e; - e = hullNext[e]; - } - - // trim typed triangle mesh arrays - this.triangles = this._triangles.subarray(0, this.trianglesLen); - this.halfedges = this._halfedges.subarray(0, this.trianglesLen); - } - - _hashKey(x, y) { - return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize; - } - - _legalize(a) { - const {_triangles: triangles, _halfedges: halfedges, coords} = this; - - let i = 0; - let ar = 0; - - // recursion eliminated with a fixed-size stack - while (true) { - const b = halfedges[a]; - - /* if the pair of triangles doesn't satisfy the Delaunay condition - * (p1 is inside the circumcircle of [p0, pl, pr]), flip them, - * then do the same check/flip recursively for the new pair of triangles - * - * pl pl - * /||\ / \ - * al/ || \bl al/ \a - * / || \ / \ - * / a||b \ flip /___ar___\ - * p0\ || /p1 => p0\---bl---/p1 - * \ || / \ / - * ar\ || /br b\ /br - * \||/ \ / - * pr pr - */ - const a0 = a - a % 3; - ar = a0 + (a + 2) % 3; - - if (b === -1) { // convex hull edge - if (i === 0) break; - a = EDGE_STACK[--i]; - continue; - } - - const b0 = b - b % 3; - const al = a0 + (a + 1) % 3; - const bl = b0 + (b + 2) % 3; - - const p0 = triangles[ar]; - const pr = triangles[a]; - const pl = triangles[al]; - const p1 = triangles[bl]; - - const illegal = inCircle( - coords[2 * p0], coords[2 * p0 + 1], - coords[2 * pr], coords[2 * pr + 1], - coords[2 * pl], coords[2 * pl + 1], - coords[2 * p1], coords[2 * p1 + 1]); - - if (illegal) { - triangles[a] = p1; - triangles[b] = p0; - - const hbl = halfedges[bl]; - - // edge swapped on the other side of the hull (rare); fix the halfedge reference - if (hbl === -1) { - let e = this._hullStart; - do { - if (this._hullTri[e] === bl) { - this._hullTri[e] = a; - break; - } - e = this._hullPrev[e]; - } while (e !== this._hullStart); - } - this._link(a, hbl); - this._link(b, halfedges[ar]); - this._link(ar, bl); - - const br = b0 + (b + 1) % 3; - - // don't worry about hitting the cap: it can only happen on extremely degenerate input - if (i < EDGE_STACK.length) { - EDGE_STACK[i++] = br; - } - } else { - if (i === 0) break; - a = EDGE_STACK[--i]; - } - } - - return ar; - } - - _link(a, b) { - this._halfedges[a] = b; - if (b !== -1) this._halfedges[b] = a; - } - - // add a new triangle given vertex indices and adjacent half-edge ids - _addTriangle(i0, i1, i2, a, b, c) { - const t = this.trianglesLen; - - this._triangles[t] = i0; - this._triangles[t + 1] = i1; - this._triangles[t + 2] = i2; - - this._link(t, a); - this._link(t + 1, b); - this._link(t + 2, c); - - this.trianglesLen += 3; - - return t; - } -} - -// monotonically increases with real angle, but doesn't need expensive trigonometry -function pseudoAngle(dx, dy) { - const p = dx / (Math.abs(dx) + Math.abs(dy)); - return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1] -} - -function dist(ax, ay, bx, by) { - const dx = ax - bx; - const dy = ay - by; - return dx * dx + dy * dy; -} - -// return 2d orientation sign if we're confident in it through J. Shewchuk's error bound check -function orientIfSure(px, py, rx, ry, qx, qy) { - const l = (ry - py) * (qx - px); - const r = (rx - px) * (qy - py); - return Math.abs(l - r) >= 3.3306690738754716e-16 * Math.abs(l + r) ? l - r : 0; -} - -// a more robust orientation test that's stable in a given triangle (to fix robustness issues) -function orient(rx, ry, qx, qy, px, py) { - const sign = orientIfSure(px, py, rx, ry, qx, qy) || - orientIfSure(rx, ry, qx, qy, px, py) || - orientIfSure(qx, qy, px, py, rx, ry); - return sign < 0; -} - -function inCircle(ax, ay, bx, by, cx, cy, px, py) { - const dx = ax - px; - const dy = ay - py; - const ex = bx - px; - const ey = by - py; - const fx = cx - px; - const fy = cy - py; - - const ap = dx * dx + dy * dy; - const bp = ex * ex + ey * ey; - const cp = fx * fx + fy * fy; - - return dx * (ey * cp - bp * fy) - - dy * (ex * cp - bp * fx) + - ap * (ex * fy - ey * fx) < 0; -} - -function circumradius(ax, ay, bx, by, cx, cy) { - const dx = bx - ax; - const dy = by - ay; - const ex = cx - ax; - const ey = cy - ay; - - const bl = dx * dx + dy * dy; - const cl = ex * ex + ey * ey; - const d = 0.5 / (dx * ey - dy * ex); - - const x = (ey * bl - dy * cl) * d; - const y = (dx * cl - ex * bl) * d; - - return x * x + y * y; -} - -function circumcenter(ax, ay, bx, by, cx, cy) { - const dx = bx - ax; - const dy = by - ay; - const ex = cx - ax; - const ey = cy - ay; - - const bl = dx * dx + dy * dy; - const cl = ex * ex + ey * ey; - const d = 0.5 / (dx * ey - dy * ex); - - const x = ax + (ey * bl - dy * cl) * d; - const y = ay + (dx * cl - ex * bl) * d; - - return {x, y}; -} - -function quicksort(ids, dists, left, right) { - if (right - left <= 20) { - for (let i = left + 1; i <= right; i++) { - const temp = ids[i]; - const tempDist = dists[temp]; - let j = i - 1; - while (j >= left && dists[ids[j]] > tempDist) ids[j + 1] = ids[j--]; - ids[j + 1] = temp; - } - } else { - const median = (left + right) >> 1; - let i = left + 1; - let j = right; - swap$1(ids, median, i); - if (dists[ids[left]] > dists[ids[right]]) swap$1(ids, left, right); - if (dists[ids[i]] > dists[ids[right]]) swap$1(ids, i, right); - if (dists[ids[left]] > dists[ids[i]]) swap$1(ids, left, i); - - const temp = ids[i]; - const tempDist = dists[temp]; - while (true) { - do i++; while (dists[ids[i]] < tempDist); - do j--; while (dists[ids[j]] > tempDist); - if (j < i) break; - swap$1(ids, i, j); - } - ids[left + 1] = ids[j]; - ids[j] = temp; - - if (right - i + 1 >= j - left) { - quicksort(ids, dists, i, right); - quicksort(ids, dists, left, j - 1); - } else { - quicksort(ids, dists, left, j - 1); - quicksort(ids, dists, i, right); - } - } -} - -function swap$1(arr, i, j) { - const tmp = arr[i]; - arr[i] = arr[j]; - arr[j] = tmp; -} - -function defaultGetX(p) { - return p[0]; -} -function defaultGetY(p) { - return p[1]; -} - -const epsilon$3 = 1e-6; - -class Path$1 { - constructor() { - this._x0 = this._y0 = // start of current subpath - this._x1 = this._y1 = null; // end of current subpath - this._ = ""; - } - moveTo(x, y) { - this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}`; - } - closePath() { - if (this._x1 !== null) { - this._x1 = this._x0, this._y1 = this._y0; - this._ += "Z"; - } - } - lineTo(x, y) { - this._ += `L${this._x1 = +x},${this._y1 = +y}`; - } - arc(x, y, r) { - x = +x, y = +y, r = +r; - const x0 = x + r; - const y0 = y; - if (r < 0) throw new Error("negative radius"); - if (this._x1 === null) this._ += `M${x0},${y0}`; - else if (Math.abs(this._x1 - x0) > epsilon$3 || Math.abs(this._y1 - y0) > epsilon$3) this._ += "L" + x0 + "," + y0; - if (!r) return; - this._ += `A${r},${r},0,1,1,${x - r},${y}A${r},${r},0,1,1,${this._x1 = x0},${this._y1 = y0}`; - } - rect(x, y, w, h) { - this._ += `M${this._x0 = this._x1 = +x},${this._y0 = this._y1 = +y}h${+w}v${+h}h${-w}Z`; - } - value() { - return this._ || null; - } -} - -class Polygon { - constructor() { - this._ = []; - } - moveTo(x, y) { - this._.push([x, y]); - } - closePath() { - this._.push(this._[0].slice()); - } - lineTo(x, y) { - this._.push([x, y]); - } - value() { - return this._.length ? this._ : null; - } -} - -class Voronoi { - constructor(delaunay, [xmin, ymin, xmax, ymax] = [0, 0, 960, 500]) { - if (!((xmax = +xmax) >= (xmin = +xmin)) || !((ymax = +ymax) >= (ymin = +ymin))) throw new Error("invalid bounds"); - this.delaunay = delaunay; - this._circumcenters = new Float64Array(delaunay.points.length * 2); - this.vectors = new Float64Array(delaunay.points.length * 2); - this.xmax = xmax, this.xmin = xmin; - this.ymax = ymax, this.ymin = ymin; - this._init(); - } - update() { - this.delaunay.update(); - this._init(); - return this; - } - _init() { - const {delaunay: {points, hull, triangles}, vectors} = this; - - // Compute circumcenters. - const circumcenters = this.circumcenters = this._circumcenters.subarray(0, triangles.length / 3 * 2); - for (let i = 0, j = 0, n = triangles.length, x, y; i < n; i += 3, j += 2) { - const t1 = triangles[i] * 2; - const t2 = triangles[i + 1] * 2; - const t3 = triangles[i + 2] * 2; - const x1 = points[t1]; - const y1 = points[t1 + 1]; - const x2 = points[t2]; - const y2 = points[t2 + 1]; - const x3 = points[t3]; - const y3 = points[t3 + 1]; - - const dx = x2 - x1; - const dy = y2 - y1; - const ex = x3 - x1; - const ey = y3 - y1; - const bl = dx * dx + dy * dy; - const cl = ex * ex + ey * ey; - const ab = (dx * ey - dy * ex) * 2; - - if (!ab) { - // degenerate case (collinear diagram) - x = (x1 + x3) / 2 - 1e8 * ey; - y = (y1 + y3) / 2 + 1e8 * ex; - } - else if (Math.abs(ab) < 1e-8) { - // almost equal points (degenerate triangle) - x = (x1 + x3) / 2; - y = (y1 + y3) / 2; - } else { - const d = 1 / ab; - x = x1 + (ey * bl - dy * cl) * d; - y = y1 + (dx * cl - ex * bl) * d; - } - circumcenters[j] = x; - circumcenters[j + 1] = y; - } - - // Compute exterior cell rays. - let h = hull[hull.length - 1]; - let p0, p1 = h * 4; - let x0, x1 = points[2 * h]; - let y0, y1 = points[2 * h + 1]; - vectors.fill(0); - for (let i = 0; i < hull.length; ++i) { - h = hull[i]; - p0 = p1, x0 = x1, y0 = y1; - p1 = h * 4, x1 = points[2 * h], y1 = points[2 * h + 1]; - vectors[p0 + 2] = vectors[p1] = y0 - y1; - vectors[p0 + 3] = vectors[p1 + 1] = x1 - x0; - } - } - render(context) { - const buffer = context == null ? context = new Path$1 : undefined; - const {delaunay: {halfedges, inedges, hull}, circumcenters, vectors} = this; - if (hull.length <= 1) return null; - for (let i = 0, n = halfedges.length; i < n; ++i) { - const j = halfedges[i]; - if (j < i) continue; - const ti = Math.floor(i / 3) * 2; - const tj = Math.floor(j / 3) * 2; - const xi = circumcenters[ti]; - const yi = circumcenters[ti + 1]; - const xj = circumcenters[tj]; - const yj = circumcenters[tj + 1]; - this._renderSegment(xi, yi, xj, yj, context); - } - let h0, h1 = hull[hull.length - 1]; - for (let i = 0; i < hull.length; ++i) { - h0 = h1, h1 = hull[i]; - const t = Math.floor(inedges[h1] / 3) * 2; - const x = circumcenters[t]; - const y = circumcenters[t + 1]; - const v = h0 * 4; - const p = this._project(x, y, vectors[v + 2], vectors[v + 3]); - if (p) this._renderSegment(x, y, p[0], p[1], context); - } - return buffer && buffer.value(); - } - renderBounds(context) { - const buffer = context == null ? context = new Path$1 : undefined; - context.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin); - return buffer && buffer.value(); - } - renderCell(i, context) { - const buffer = context == null ? context = new Path$1 : undefined; - const points = this._clip(i); - if (points === null || !points.length) return; - context.moveTo(points[0], points[1]); - let n = points.length; - while (points[0] === points[n-2] && points[1] === points[n-1] && n > 1) n -= 2; - for (let i = 2; i < n; i += 2) { - if (points[i] !== points[i-2] || points[i+1] !== points[i-1]) - context.lineTo(points[i], points[i + 1]); - } - context.closePath(); - return buffer && buffer.value(); - } - *cellPolygons() { - const {delaunay: {points}} = this; - for (let i = 0, n = points.length / 2; i < n; ++i) { - const cell = this.cellPolygon(i); - if (cell) cell.index = i, yield cell; - } - } - cellPolygon(i) { - const polygon = new Polygon; - this.renderCell(i, polygon); - return polygon.value(); - } - _renderSegment(x0, y0, x1, y1, context) { - let S; - const c0 = this._regioncode(x0, y0); - const c1 = this._regioncode(x1, y1); - if (c0 === 0 && c1 === 0) { - context.moveTo(x0, y0); - context.lineTo(x1, y1); - } else if (S = this._clipSegment(x0, y0, x1, y1, c0, c1)) { - context.moveTo(S[0], S[1]); - context.lineTo(S[2], S[3]); - } - } - contains(i, x, y) { - if ((x = +x, x !== x) || (y = +y, y !== y)) return false; - return this.delaunay._step(i, x, y) === i; - } - *neighbors(i) { - const ci = this._clip(i); - if (ci) for (const j of this.delaunay.neighbors(i)) { - const cj = this._clip(j); - // find the common edge - if (cj) loop: for (let ai = 0, li = ci.length; ai < li; ai += 2) { - for (let aj = 0, lj = cj.length; aj < lj; aj += 2) { - if (ci[ai] == cj[aj] - && ci[ai + 1] == cj[aj + 1] - && ci[(ai + 2) % li] == cj[(aj + lj - 2) % lj] - && ci[(ai + 3) % li] == cj[(aj + lj - 1) % lj] - ) { - yield j; - break loop; - } - } - } - } - } - _cell(i) { - const {circumcenters, delaunay: {inedges, halfedges, triangles}} = this; - const e0 = inedges[i]; - if (e0 === -1) return null; // coincident point - const points = []; - let e = e0; - do { - const t = Math.floor(e / 3); - points.push(circumcenters[t * 2], circumcenters[t * 2 + 1]); - e = e % 3 === 2 ? e - 2 : e + 1; - if (triangles[e] !== i) break; // bad triangulation - e = halfedges[e]; - } while (e !== e0 && e !== -1); - return points; - } - _clip(i) { - // degenerate case (1 valid point: return the box) - if (i === 0 && this.delaunay.hull.length === 1) { - return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin]; - } - const points = this._cell(i); - if (points === null) return null; - const {vectors: V} = this; - const v = i * 4; - return V[v] || V[v + 1] - ? this._clipInfinite(i, points, V[v], V[v + 1], V[v + 2], V[v + 3]) - : this._clipFinite(i, points); - } - _clipFinite(i, points) { - const n = points.length; - let P = null; - let x0, y0, x1 = points[n - 2], y1 = points[n - 1]; - let c0, c1 = this._regioncode(x1, y1); - let e0, e1; - for (let j = 0; j < n; j += 2) { - x0 = x1, y0 = y1, x1 = points[j], y1 = points[j + 1]; - c0 = c1, c1 = this._regioncode(x1, y1); - if (c0 === 0 && c1 === 0) { - e0 = e1, e1 = 0; - if (P) P.push(x1, y1); - else P = [x1, y1]; - } else { - let S, sx0, sy0, sx1, sy1; - if (c0 === 0) { - if ((S = this._clipSegment(x0, y0, x1, y1, c0, c1)) === null) continue; - [sx0, sy0, sx1, sy1] = S; - } else { - if ((S = this._clipSegment(x1, y1, x0, y0, c1, c0)) === null) continue; - [sx1, sy1, sx0, sy0] = S; - e0 = e1, e1 = this._edgecode(sx0, sy0); - if (e0 && e1) this._edge(i, e0, e1, P, P.length); - if (P) P.push(sx0, sy0); - else P = [sx0, sy0]; - } - e0 = e1, e1 = this._edgecode(sx1, sy1); - if (e0 && e1) this._edge(i, e0, e1, P, P.length); - if (P) P.push(sx1, sy1); - else P = [sx1, sy1]; - } - } - if (P) { - e0 = e1, e1 = this._edgecode(P[0], P[1]); - if (e0 && e1) this._edge(i, e0, e1, P, P.length); - } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) { - return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin]; - } - return P; - } - _clipSegment(x0, y0, x1, y1, c0, c1) { - while (true) { - if (c0 === 0 && c1 === 0) return [x0, y0, x1, y1]; - if (c0 & c1) return null; - let x, y, c = c0 || c1; - if (c & 0b1000) x = x0 + (x1 - x0) * (this.ymax - y0) / (y1 - y0), y = this.ymax; - else if (c & 0b0100) x = x0 + (x1 - x0) * (this.ymin - y0) / (y1 - y0), y = this.ymin; - else if (c & 0b0010) y = y0 + (y1 - y0) * (this.xmax - x0) / (x1 - x0), x = this.xmax; - else y = y0 + (y1 - y0) * (this.xmin - x0) / (x1 - x0), x = this.xmin; - if (c0) x0 = x, y0 = y, c0 = this._regioncode(x0, y0); - else x1 = x, y1 = y, c1 = this._regioncode(x1, y1); - } - } - _clipInfinite(i, points, vx0, vy0, vxn, vyn) { - let P = Array.from(points), p; - if (p = this._project(P[0], P[1], vx0, vy0)) P.unshift(p[0], p[1]); - if (p = this._project(P[P.length - 2], P[P.length - 1], vxn, vyn)) P.push(p[0], p[1]); - if (P = this._clipFinite(i, P)) { - for (let j = 0, n = P.length, c0, c1 = this._edgecode(P[n - 2], P[n - 1]); j < n; j += 2) { - c0 = c1, c1 = this._edgecode(P[j], P[j + 1]); - if (c0 && c1) j = this._edge(i, c0, c1, P, j), n = P.length; - } - } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) { - P = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax]; - } - return P; - } - _edge(i, e0, e1, P, j) { - while (e0 !== e1) { - let x, y; - switch (e0) { - case 0b0101: e0 = 0b0100; continue; // top-left - case 0b0100: e0 = 0b0110, x = this.xmax, y = this.ymin; break; // top - case 0b0110: e0 = 0b0010; continue; // top-right - case 0b0010: e0 = 0b1010, x = this.xmax, y = this.ymax; break; // right - case 0b1010: e0 = 0b1000; continue; // bottom-right - case 0b1000: e0 = 0b1001, x = this.xmin, y = this.ymax; break; // bottom - case 0b1001: e0 = 0b0001; continue; // bottom-left - case 0b0001: e0 = 0b0101, x = this.xmin, y = this.ymin; break; // left - } - if ((P[j] !== x || P[j + 1] !== y) && this.contains(i, x, y)) { - P.splice(j, 0, x, y), j += 2; - } - } - if (P.length > 4) { - for (let i = 0; i < P.length; i+= 2) { - const j = (i + 2) % P.length, k = (i + 4) % P.length; - if (P[i] === P[j] && P[j] === P[k] - || P[i + 1] === P[j + 1] && P[j + 1] === P[k + 1]) - P.splice(j, 2), i -= 2; - } - } - return j; - } - _project(x0, y0, vx, vy) { - let t = Infinity, c, x, y; - if (vy < 0) { // top - if (y0 <= this.ymin) return null; - if ((c = (this.ymin - y0) / vy) < t) y = this.ymin, x = x0 + (t = c) * vx; - } else if (vy > 0) { // bottom - if (y0 >= this.ymax) return null; - if ((c = (this.ymax - y0) / vy) < t) y = this.ymax, x = x0 + (t = c) * vx; - } - if (vx > 0) { // right - if (x0 >= this.xmax) return null; - if ((c = (this.xmax - x0) / vx) < t) x = this.xmax, y = y0 + (t = c) * vy; - } else if (vx < 0) { // left - if (x0 <= this.xmin) return null; - if ((c = (this.xmin - x0) / vx) < t) x = this.xmin, y = y0 + (t = c) * vy; - } - return [x, y]; - } - _edgecode(x, y) { - return (x === this.xmin ? 0b0001 - : x === this.xmax ? 0b0010 : 0b0000) - | (y === this.ymin ? 0b0100 - : y === this.ymax ? 0b1000 : 0b0000); - } - _regioncode(x, y) { - return (x < this.xmin ? 0b0001 - : x > this.xmax ? 0b0010 : 0b0000) - | (y < this.ymin ? 0b0100 - : y > this.ymax ? 0b1000 : 0b0000); - } -} - -const tau$3 = 2 * Math.PI, pow = Math.pow; - -function pointX(p) { - return p[0]; -} - -function pointY(p) { - return p[1]; -} - -// A triangulation is collinear if all its triangles have a non-null area -function collinear$1(d) { - const {triangles, coords} = d; - for (let i = 0; i < triangles.length; i += 3) { - const a = 2 * triangles[i], - b = 2 * triangles[i + 1], - c = 2 * triangles[i + 2], - cross = (coords[c] - coords[a]) * (coords[b + 1] - coords[a + 1]) - - (coords[b] - coords[a]) * (coords[c + 1] - coords[a + 1]); - if (cross > 1e-10) return false; - } - return true; -} - -function jitter(x, y, r) { - return [x + Math.sin(x + y) * r, y + Math.cos(x - y) * r]; -} - -class Delaunay { - static from(points, fx = pointX, fy = pointY, that) { - return new Delaunay("length" in points - ? flatArray(points, fx, fy, that) - : Float64Array.from(flatIterable(points, fx, fy, that))); - } - constructor(points) { - this._delaunator = new Delaunator(points); - this.inedges = new Int32Array(points.length / 2); - this._hullIndex = new Int32Array(points.length / 2); - this.points = this._delaunator.coords; - this._init(); - } - update() { - this._delaunator.update(); - this._init(); - return this; - } - _init() { - const d = this._delaunator, points = this.points; - - // check for collinear - if (d.hull && d.hull.length > 2 && collinear$1(d)) { - this.collinear = Int32Array.from({length: points.length/2}, (_,i) => i) - .sort((i, j) => points[2 * i] - points[2 * j] || points[2 * i + 1] - points[2 * j + 1]); // for exact neighbors - const e = this.collinear[0], f = this.collinear[this.collinear.length - 1], - bounds = [ points[2 * e], points[2 * e + 1], points[2 * f], points[2 * f + 1] ], - r = 1e-8 * Math.hypot(bounds[3] - bounds[1], bounds[2] - bounds[0]); - for (let i = 0, n = points.length / 2; i < n; ++i) { - const p = jitter(points[2 * i], points[2 * i + 1], r); - points[2 * i] = p[0]; - points[2 * i + 1] = p[1]; - } - this._delaunator = new Delaunator(points); - } else { - delete this.collinear; - } - - const halfedges = this.halfedges = this._delaunator.halfedges; - const hull = this.hull = this._delaunator.hull; - const triangles = this.triangles = this._delaunator.triangles; - const inedges = this.inedges.fill(-1); - const hullIndex = this._hullIndex.fill(-1); - - // Compute an index from each point to an (arbitrary) incoming halfedge - // Used to give the first neighbor of each point; for this reason, - // on the hull we give priority to exterior halfedges - for (let e = 0, n = halfedges.length; e < n; ++e) { - const p = triangles[e % 3 === 2 ? e - 2 : e + 1]; - if (halfedges[e] === -1 || inedges[p] === -1) inedges[p] = e; - } - for (let i = 0, n = hull.length; i < n; ++i) { - hullIndex[hull[i]] = i; - } - - // degenerate case: 1 or 2 (distinct) points - if (hull.length <= 2 && hull.length > 0) { - this.triangles = new Int32Array(3).fill(-1); - this.halfedges = new Int32Array(3).fill(-1); - this.triangles[0] = hull[0]; - this.triangles[1] = hull[1]; - this.triangles[2] = hull[1]; - inedges[hull[0]] = 1; - if (hull.length === 2) inedges[hull[1]] = 0; - } - } - voronoi(bounds) { - return new Voronoi(this, bounds); - } - *neighbors(i) { - const {inedges, hull, _hullIndex, halfedges, triangles, collinear} = this; - - // degenerate case with several collinear points - if (collinear) { - const l = collinear.indexOf(i); - if (l > 0) yield collinear[l - 1]; - if (l < collinear.length - 1) yield collinear[l + 1]; - return; - } - - const e0 = inedges[i]; - if (e0 === -1) return; // coincident point - let e = e0, p0 = -1; - do { - yield p0 = triangles[e]; - e = e % 3 === 2 ? e - 2 : e + 1; - if (triangles[e] !== i) return; // bad triangulation - e = halfedges[e]; - if (e === -1) { - const p = hull[(_hullIndex[i] + 1) % hull.length]; - if (p !== p0) yield p; - return; - } - } while (e !== e0); - } - find(x, y, i = 0) { - if ((x = +x, x !== x) || (y = +y, y !== y)) return -1; - const i0 = i; - let c; - while ((c = this._step(i, x, y)) >= 0 && c !== i && c !== i0) i = c; - return c; - } - _step(i, x, y) { - const {inedges, hull, _hullIndex, halfedges, triangles, points} = this; - if (inedges[i] === -1 || !points.length) return (i + 1) % (points.length >> 1); - let c = i; - let dc = pow(x - points[i * 2], 2) + pow(y - points[i * 2 + 1], 2); - const e0 = inedges[i]; - let e = e0; - do { - let t = triangles[e]; - const dt = pow(x - points[t * 2], 2) + pow(y - points[t * 2 + 1], 2); - if (dt < dc) dc = dt, c = t; - e = e % 3 === 2 ? e - 2 : e + 1; - if (triangles[e] !== i) break; // bad triangulation - e = halfedges[e]; - if (e === -1) { - e = hull[(_hullIndex[i] + 1) % hull.length]; - if (e !== t) { - if (pow(x - points[e * 2], 2) + pow(y - points[e * 2 + 1], 2) < dc) return e; - } - break; - } - } while (e !== e0); - return c; - } - render(context) { - const buffer = context == null ? context = new Path$1 : undefined; - const {points, halfedges, triangles} = this; - for (let i = 0, n = halfedges.length; i < n; ++i) { - const j = halfedges[i]; - if (j < i) continue; - const ti = triangles[i] * 2; - const tj = triangles[j] * 2; - context.moveTo(points[ti], points[ti + 1]); - context.lineTo(points[tj], points[tj + 1]); - } - this.renderHull(context); - return buffer && buffer.value(); - } - renderPoints(context, r = 2) { - const buffer = context == null ? context = new Path$1 : undefined; - const {points} = this; - for (let i = 0, n = points.length; i < n; i += 2) { - const x = points[i], y = points[i + 1]; - context.moveTo(x + r, y); - context.arc(x, y, r, 0, tau$3); - } - return buffer && buffer.value(); - } - renderHull(context) { - const buffer = context == null ? context = new Path$1 : undefined; - const {hull, points} = this; - const h = hull[0] * 2, n = hull.length; - context.moveTo(points[h], points[h + 1]); - for (let i = 1; i < n; ++i) { - const h = 2 * hull[i]; - context.lineTo(points[h], points[h + 1]); - } - context.closePath(); - return buffer && buffer.value(); - } - hullPolygon() { - const polygon = new Polygon; - this.renderHull(polygon); - return polygon.value(); - } - renderTriangle(i, context) { - const buffer = context == null ? context = new Path$1 : undefined; - const {points, triangles} = this; - const t0 = triangles[i *= 3] * 2; - const t1 = triangles[i + 1] * 2; - const t2 = triangles[i + 2] * 2; - context.moveTo(points[t0], points[t0 + 1]); - context.lineTo(points[t1], points[t1 + 1]); - context.lineTo(points[t2], points[t2 + 1]); - context.closePath(); - return buffer && buffer.value(); - } - *trianglePolygons() { - const {triangles} = this; - for (let i = 0, n = triangles.length / 3; i < n; ++i) { - yield this.trianglePolygon(i); - } - } - trianglePolygon(i) { - const polygon = new Polygon; - this.renderTriangle(i, polygon); - return polygon.value(); - } -} - -function flatArray(points, fx, fy, that) { - const n = points.length; - const array = new Float64Array(n * 2); - for (let i = 0; i < n; ++i) { - const p = points[i]; - array[i * 2] = fx.call(that, p, i, points); - array[i * 2 + 1] = fy.call(that, p, i, points); - } - return array; -} - -function* flatIterable(points, fx, fy, that) { - let i = 0; - for (const p of points) { - yield fx.call(that, p, i, points); - yield fy.call(that, p, i, points); - ++i; - } -} - -var EOL = {}, - EOF = {}, - QUOTE = 34, - NEWLINE = 10, - RETURN = 13; - -function objectConverter(columns) { - return new Function("d", "return {" + columns.map(function(name, i) { - return JSON.stringify(name) + ": d[" + i + "] || \"\""; - }).join(",") + "}"); -} - -function customConverter(columns, f) { - var object = objectConverter(columns); - return function(row, i) { - return f(object(row), i, columns); - }; -} - -// Compute unique columns in order of discovery. -function inferColumns(rows) { - var columnSet = Object.create(null), - columns = []; - - rows.forEach(function(row) { - for (var column in row) { - if (!(column in columnSet)) { - columns.push(columnSet[column] = column); - } - } - }); - - return columns; -} - -function pad(value, width) { - var s = value + "", length = s.length; - return length < width ? new Array(width - length + 1).join(0) + s : s; -} - -function formatYear(year) { - return year < 0 ? "-" + pad(-year, 6) - : year > 9999 ? "+" + pad(year, 6) - : pad(year, 4); -} - -function formatDate(date) { - var hours = date.getUTCHours(), - minutes = date.getUTCMinutes(), - seconds = date.getUTCSeconds(), - milliseconds = date.getUTCMilliseconds(); - return isNaN(date) ? "Invalid Date" - : formatYear(date.getUTCFullYear()) + "-" + pad(date.getUTCMonth() + 1, 2) + "-" + pad(date.getUTCDate(), 2) - + (milliseconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "." + pad(milliseconds, 3) + "Z" - : seconds ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + ":" + pad(seconds, 2) + "Z" - : minutes || hours ? "T" + pad(hours, 2) + ":" + pad(minutes, 2) + "Z" - : ""); -} - -function dsvFormat(delimiter) { - var reFormat = new RegExp("[\"" + delimiter + "\n\r]"), - DELIMITER = delimiter.charCodeAt(0); - - function parse(text, f) { - var convert, columns, rows = parseRows(text, function(row, i) { - if (convert) return convert(row, i - 1); - columns = row, convert = f ? customConverter(row, f) : objectConverter(row); - }); - rows.columns = columns || []; - return rows; - } - - function parseRows(text, f) { - var rows = [], // output rows - N = text.length, - I = 0, // current character index - n = 0, // current line number - t, // current token - eof = N <= 0, // current token followed by EOF? - eol = false; // current token followed by EOL? - - // Strip the trailing newline. - if (text.charCodeAt(N - 1) === NEWLINE) --N; - if (text.charCodeAt(N - 1) === RETURN) --N; - - function token() { - if (eof) return EOF; - if (eol) return eol = false, EOL; - - // Unescape quotes. - var i, j = I, c; - if (text.charCodeAt(j) === QUOTE) { - while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE); - if ((i = I) >= N) eof = true; - else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true; - else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } - return text.slice(j + 1, i - 1).replace(/""/g, "\""); - } - - // Find next delimiter or newline. - while (I < N) { - if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true; - else if (c === RETURN) { eol = true; if (text.charCodeAt(I) === NEWLINE) ++I; } - else if (c !== DELIMITER) continue; - return text.slice(j, i); - } - - // Return last token before EOF. - return eof = true, text.slice(j, N); - } - - while ((t = token()) !== EOF) { - var row = []; - while (t !== EOL && t !== EOF) row.push(t), t = token(); - if (f && (row = f(row, n++)) == null) continue; - rows.push(row); - } - - return rows; - } - - function preformatBody(rows, columns) { - return rows.map(function(row) { - return columns.map(function(column) { - return formatValue(row[column]); - }).join(delimiter); - }); - } - - function format(rows, columns) { - if (columns == null) columns = inferColumns(rows); - return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join("\n"); - } - - function formatBody(rows, columns) { - if (columns == null) columns = inferColumns(rows); - return preformatBody(rows, columns).join("\n"); - } - - function formatRows(rows) { - return rows.map(formatRow).join("\n"); - } - - function formatRow(row) { - return row.map(formatValue).join(delimiter); - } - - function formatValue(value) { - return value == null ? "" - : value instanceof Date ? formatDate(value) - : reFormat.test(value += "") ? "\"" + value.replace(/"/g, "\"\"") + "\"" - : value; - } - - return { - parse: parse, - parseRows: parseRows, - format: format, - formatBody: formatBody, - formatRows: formatRows, - formatRow: formatRow, - formatValue: formatValue - }; -} - -var csv = dsvFormat(","); - -var csvParse = csv.parse; -var csvParseRows = csv.parseRows; -var csvFormat = csv.format; -var csvFormatBody = csv.formatBody; -var csvFormatRows = csv.formatRows; -var csvFormatRow = csv.formatRow; -var csvFormatValue = csv.formatValue; - -var tsv = dsvFormat("\t"); - -var tsvParse = tsv.parse; -var tsvParseRows = tsv.parseRows; -var tsvFormat = tsv.format; -var tsvFormatBody = tsv.formatBody; -var tsvFormatRows = tsv.formatRows; -var tsvFormatRow = tsv.formatRow; -var tsvFormatValue = tsv.formatValue; - -function autoType(object) { - for (var key in object) { - var value = object[key].trim(), number, m; - if (!value) value = null; - else if (value === "true") value = true; - else if (value === "false") value = false; - else if (value === "NaN") value = NaN; - else if (!isNaN(number = +value)) value = number; - else if (m = value.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)) { - if (fixtz && !!m[4] && !m[7]) value = value.replace(/-/g, "/").replace(/T/, " "); - value = new Date(value); - } - else continue; - object[key] = value; - } - return object; -} - -// https://github.com/d3/d3-dsv/issues/45 -const fixtz = new Date("2019-01-01T00:00").getHours() || new Date("2019-07-01T00:00").getHours(); - -function responseBlob(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - return response.blob(); -} - -function blob(input, init) { - return fetch(input, init).then(responseBlob); -} - -function responseArrayBuffer(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - return response.arrayBuffer(); -} - -function buffer(input, init) { - return fetch(input, init).then(responseArrayBuffer); -} - -function responseText(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - return response.text(); -} - -function text(input, init) { - return fetch(input, init).then(responseText); -} - -function dsvParse(parse) { - return function(input, init, row) { - if (arguments.length === 2 && typeof init === "function") row = init, init = undefined; - return text(input, init).then(function(response) { - return parse(response, row); - }); - }; -} - -function dsv(delimiter, input, init, row) { - if (arguments.length === 3 && typeof init === "function") row = init, init = undefined; - var format = dsvFormat(delimiter); - return text(input, init).then(function(response) { - return format.parse(response, row); - }); -} - -var csv$1 = dsvParse(csvParse); -var tsv$1 = dsvParse(tsvParse); - -function image(input, init) { - return new Promise(function(resolve, reject) { - var image = new Image; - for (var key in init) image[key] = init[key]; - image.onerror = reject; - image.onload = function() { resolve(image); }; - image.src = input; - }); -} - -function responseJson(response) { - if (!response.ok) throw new Error(response.status + " " + response.statusText); - if (response.status === 204 || response.status === 205) return; - return response.json(); -} - -function json(input, init) { - return fetch(input, init).then(responseJson); -} - -function parser(type) { - return (input, init) => text(input, init) - .then(text => (new DOMParser).parseFromString(text, type)); -} - -var xml = parser("application/xml"); - -var html = parser("text/html"); - -var svg = parser("image/svg+xml"); - -function center$1(x, y) { - var nodes, strength = 1; - - if (x == null) x = 0; - if (y == null) y = 0; - - function force() { - var i, - n = nodes.length, - node, - sx = 0, - sy = 0; - - for (i = 0; i < n; ++i) { - node = nodes[i], sx += node.x, sy += node.y; - } - - for (sx = (sx / n - x) * strength, sy = (sy / n - y) * strength, i = 0; i < n; ++i) { - node = nodes[i], node.x -= sx, node.y -= sy; - } - } - - force.initialize = function(_) { - nodes = _; - }; - - force.x = function(_) { - return arguments.length ? (x = +_, force) : x; - }; - - force.y = function(_) { - return arguments.length ? (y = +_, force) : y; - }; - - force.strength = function(_) { - return arguments.length ? (strength = +_, force) : strength; - }; - - return force; -} - -function tree_add(d) { - const x = +this._x.call(null, d), - y = +this._y.call(null, d); - return add(this.cover(x, y), x, y, d); -} - -function add(tree, x, y, d) { - if (isNaN(x) || isNaN(y)) return tree; // ignore invalid points - - var parent, - node = tree._root, - leaf = {data: d}, - x0 = tree._x0, - y0 = tree._y0, - x1 = tree._x1, - y1 = tree._y1, - xm, - ym, - xp, - yp, - right, - bottom, - i, - j; - - // If the tree is empty, initialize the root as a leaf. - if (!node) return tree._root = leaf, tree; - - // Find the existing leaf for the new point, or add it. - while (node.length) { - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - if (parent = node, !(node = node[i = bottom << 1 | right])) return parent[i] = leaf, tree; - } - - // Is the new point is exactly coincident with the existing point? - xp = +tree._x.call(null, node.data); - yp = +tree._y.call(null, node.data); - if (x === xp && y === yp) return leaf.next = node, parent ? parent[i] = leaf : tree._root = leaf, tree; - - // Otherwise, split the leaf node until the old and new point are separated. - do { - parent = parent ? parent[i] = new Array(4) : tree._root = new Array(4); - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - } while ((i = bottom << 1 | right) === (j = (yp >= ym) << 1 | (xp >= xm))); - return parent[j] = node, parent[i] = leaf, tree; -} - -function addAll(data) { - var d, i, n = data.length, - x, - y, - xz = new Array(n), - yz = new Array(n), - x0 = Infinity, - y0 = Infinity, - x1 = -Infinity, - y1 = -Infinity; - - // Compute the points and their extent. - for (i = 0; i < n; ++i) { - if (isNaN(x = +this._x.call(null, d = data[i])) || isNaN(y = +this._y.call(null, d))) continue; - xz[i] = x; - yz[i] = y; - if (x < x0) x0 = x; - if (x > x1) x1 = x; - if (y < y0) y0 = y; - if (y > y1) y1 = y; - } - - // If there were no (valid) points, abort. - if (x0 > x1 || y0 > y1) return this; - - // Expand the tree to cover the new points. - this.cover(x0, y0).cover(x1, y1); - - // Add the new points. - for (i = 0; i < n; ++i) { - add(this, xz[i], yz[i], data[i]); - } - - return this; -} - -function tree_cover(x, y) { - if (isNaN(x = +x) || isNaN(y = +y)) return this; // ignore invalid points - - var x0 = this._x0, - y0 = this._y0, - x1 = this._x1, - y1 = this._y1; - - // If the quadtree has no extent, initialize them. - // Integer extent are necessary so that if we later double the extent, - // the existing quadrant boundaries don’t change due to floating point error! - if (isNaN(x0)) { - x1 = (x0 = Math.floor(x)) + 1; - y1 = (y0 = Math.floor(y)) + 1; - } - - // Otherwise, double repeatedly to cover. - else { - var z = x1 - x0 || 1, - node = this._root, - parent, - i; - - while (x0 > x || x >= x1 || y0 > y || y >= y1) { - i = (y < y0) << 1 | (x < x0); - parent = new Array(4), parent[i] = node, node = parent, z *= 2; - switch (i) { - case 0: x1 = x0 + z, y1 = y0 + z; break; - case 1: x0 = x1 - z, y1 = y0 + z; break; - case 2: x1 = x0 + z, y0 = y1 - z; break; - case 3: x0 = x1 - z, y0 = y1 - z; break; - } - } - - if (this._root && this._root.length) this._root = node; - } - - this._x0 = x0; - this._y0 = y0; - this._x1 = x1; - this._y1 = y1; - return this; -} - -function tree_data() { - var data = []; - this.visit(function(node) { - if (!node.length) do data.push(node.data); while (node = node.next) - }); - return data; -} - -function tree_extent(_) { - return arguments.length - ? this.cover(+_[0][0], +_[0][1]).cover(+_[1][0], +_[1][1]) - : isNaN(this._x0) ? undefined : [[this._x0, this._y0], [this._x1, this._y1]]; -} - -function Quad(node, x0, y0, x1, y1) { - this.node = node; - this.x0 = x0; - this.y0 = y0; - this.x1 = x1; - this.y1 = y1; -} - -function tree_find(x, y, radius) { - var data, - x0 = this._x0, - y0 = this._y0, - x1, - y1, - x2, - y2, - x3 = this._x1, - y3 = this._y1, - quads = [], - node = this._root, - q, - i; - - if (node) quads.push(new Quad(node, x0, y0, x3, y3)); - if (radius == null) radius = Infinity; - else { - x0 = x - radius, y0 = y - radius; - x3 = x + radius, y3 = y + radius; - radius *= radius; - } - - while (q = quads.pop()) { - - // Stop searching if this quadrant can’t contain a closer node. - if (!(node = q.node) - || (x1 = q.x0) > x3 - || (y1 = q.y0) > y3 - || (x2 = q.x1) < x0 - || (y2 = q.y1) < y0) continue; - - // Bisect the current quadrant. - if (node.length) { - var xm = (x1 + x2) / 2, - ym = (y1 + y2) / 2; - - quads.push( - new Quad(node[3], xm, ym, x2, y2), - new Quad(node[2], x1, ym, xm, y2), - new Quad(node[1], xm, y1, x2, ym), - new Quad(node[0], x1, y1, xm, ym) - ); - - // Visit the closest quadrant first. - if (i = (y >= ym) << 1 | (x >= xm)) { - q = quads[quads.length - 1]; - quads[quads.length - 1] = quads[quads.length - 1 - i]; - quads[quads.length - 1 - i] = q; - } - } - - // Visit this point. (Visiting coincident points isn’t necessary!) - else { - var dx = x - +this._x.call(null, node.data), - dy = y - +this._y.call(null, node.data), - d2 = dx * dx + dy * dy; - if (d2 < radius) { - var d = Math.sqrt(radius = d2); - x0 = x - d, y0 = y - d; - x3 = x + d, y3 = y + d; - data = node.data; - } - } - } - - return data; -} - -function tree_remove(d) { - if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d))) return this; // ignore invalid points - - var parent, - node = this._root, - retainer, - previous, - next, - x0 = this._x0, - y0 = this._y0, - x1 = this._x1, - y1 = this._y1, - x, - y, - xm, - ym, - right, - bottom, - i, - j; - - // If the tree is empty, initialize the root as a leaf. - if (!node) return this; - - // Find the leaf node for the point. - // While descending, also retain the deepest parent with a non-removed sibling. - if (node.length) while (true) { - if (right = x >= (xm = (x0 + x1) / 2)) x0 = xm; else x1 = xm; - if (bottom = y >= (ym = (y0 + y1) / 2)) y0 = ym; else y1 = ym; - if (!(parent = node, node = node[i = bottom << 1 | right])) return this; - if (!node.length) break; - if (parent[(i + 1) & 3] || parent[(i + 2) & 3] || parent[(i + 3) & 3]) retainer = parent, j = i; - } - - // Find the point to remove. - while (node.data !== d) if (!(previous = node, node = node.next)) return this; - if (next = node.next) delete node.next; - - // If there are multiple coincident points, remove just the point. - if (previous) return (next ? previous.next = next : delete previous.next), this; - - // If this is the root point, remove it. - if (!parent) return this._root = next, this; - - // Remove this leaf. - next ? parent[i] = next : delete parent[i]; - - // If the parent now contains exactly one leaf, collapse superfluous parents. - if ((node = parent[0] || parent[1] || parent[2] || parent[3]) - && node === (parent[3] || parent[2] || parent[1] || parent[0]) - && !node.length) { - if (retainer) retainer[j] = node; - else this._root = node; - } - - return this; -} - -function removeAll(data) { - for (var i = 0, n = data.length; i < n; ++i) this.remove(data[i]); - return this; -} - -function tree_root() { - return this._root; -} - -function tree_size() { - var size = 0; - this.visit(function(node) { - if (!node.length) do ++size; while (node = node.next) - }); - return size; -} - -function tree_visit(callback) { - var quads = [], q, node = this._root, child, x0, y0, x1, y1; - if (node) quads.push(new Quad(node, this._x0, this._y0, this._x1, this._y1)); - while (q = quads.pop()) { - if (!callback(node = q.node, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1) && node.length) { - var xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; - if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1)); - if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); - if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); - if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); - } - } - return this; -} - -function tree_visitAfter(callback) { - var quads = [], next = [], q; - if (this._root) quads.push(new Quad(this._root, this._x0, this._y0, this._x1, this._y1)); - while (q = quads.pop()) { - var node = q.node; - if (node.length) { - var child, x0 = q.x0, y0 = q.y0, x1 = q.x1, y1 = q.y1, xm = (x0 + x1) / 2, ym = (y0 + y1) / 2; - if (child = node[0]) quads.push(new Quad(child, x0, y0, xm, ym)); - if (child = node[1]) quads.push(new Quad(child, xm, y0, x1, ym)); - if (child = node[2]) quads.push(new Quad(child, x0, ym, xm, y1)); - if (child = node[3]) quads.push(new Quad(child, xm, ym, x1, y1)); - } - next.push(q); - } - while (q = next.pop()) { - callback(q.node, q.x0, q.y0, q.x1, q.y1); - } - return this; -} - -function defaultX$1(d) { - return d[0]; -} - -function tree_x(_) { - return arguments.length ? (this._x = _, this) : this._x; -} - -function defaultY$1(d) { - return d[1]; -} - -function tree_y(_) { - return arguments.length ? (this._y = _, this) : this._y; -} - -function quadtree(nodes, x, y) { - var tree = new Quadtree(x == null ? defaultX$1 : x, y == null ? defaultY$1 : y, NaN, NaN, NaN, NaN); - return nodes == null ? tree : tree.addAll(nodes); -} - -function Quadtree(x, y, x0, y0, x1, y1) { - this._x = x; - this._y = y; - this._x0 = x0; - this._y0 = y0; - this._x1 = x1; - this._y1 = y1; - this._root = undefined; -} - -function leaf_copy(leaf) { - var copy = {data: leaf.data}, next = copy; - while (leaf = leaf.next) next = next.next = {data: leaf.data}; - return copy; -} - -var treeProto = quadtree.prototype = Quadtree.prototype; - -treeProto.copy = function() { - var copy = new Quadtree(this._x, this._y, this._x0, this._y0, this._x1, this._y1), - node = this._root, - nodes, - child; - - if (!node) return copy; - - if (!node.length) return copy._root = leaf_copy(node), copy; - - nodes = [{source: node, target: copy._root = new Array(4)}]; - while (node = nodes.pop()) { - for (var i = 0; i < 4; ++i) { - if (child = node.source[i]) { - if (child.length) nodes.push({source: child, target: node.target[i] = new Array(4)}); - else node.target[i] = leaf_copy(child); - } - } - } - - return copy; -}; - -treeProto.add = tree_add; -treeProto.addAll = addAll; -treeProto.cover = tree_cover; -treeProto.data = tree_data; -treeProto.extent = tree_extent; -treeProto.find = tree_find; -treeProto.remove = tree_remove; -treeProto.removeAll = removeAll; -treeProto.root = tree_root; -treeProto.size = tree_size; -treeProto.visit = tree_visit; -treeProto.visitAfter = tree_visitAfter; -treeProto.x = tree_x; -treeProto.y = tree_y; - -function constant$7(x) { - return function() { - return x; - }; -} - -function jiggle(random) { - return (random() - 0.5) * 1e-6; -} - -function x(d) { - return d.x + d.vx; -} - -function y(d) { - return d.y + d.vy; -} - -function collide(radius) { - var nodes, - radii, - random, - strength = 1, - iterations = 1; - - if (typeof radius !== "function") radius = constant$7(radius == null ? 1 : +radius); - - function force() { - var i, n = nodes.length, - tree, - node, - xi, - yi, - ri, - ri2; - - for (var k = 0; k < iterations; ++k) { - tree = quadtree(nodes, x, y).visitAfter(prepare); - for (i = 0; i < n; ++i) { - node = nodes[i]; - ri = radii[node.index], ri2 = ri * ri; - xi = node.x + node.vx; - yi = node.y + node.vy; - tree.visit(apply); - } - } - - function apply(quad, x0, y0, x1, y1) { - var data = quad.data, rj = quad.r, r = ri + rj; - if (data) { - if (data.index > node.index) { - var x = xi - data.x - data.vx, - y = yi - data.y - data.vy, - l = x * x + y * y; - if (l < r * r) { - if (x === 0) x = jiggle(random), l += x * x; - if (y === 0) y = jiggle(random), l += y * y; - l = (r - (l = Math.sqrt(l))) / l * strength; - node.vx += (x *= l) * (r = (rj *= rj) / (ri2 + rj)); - node.vy += (y *= l) * r; - data.vx -= x * (r = 1 - r); - data.vy -= y * r; - } - } - return; - } - return x0 > xi + r || x1 < xi - r || y0 > yi + r || y1 < yi - r; - } - } - - function prepare(quad) { - if (quad.data) return quad.r = radii[quad.data.index]; - for (var i = quad.r = 0; i < 4; ++i) { - if (quad[i] && quad[i].r > quad.r) { - quad.r = quad[i].r; - } - } - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length, node; - radii = new Array(n); - for (i = 0; i < n; ++i) node = nodes[i], radii[node.index] = +radius(node, i, nodes); - } - - force.initialize = function(_nodes, _random) { - nodes = _nodes; - random = _random; - initialize(); - }; - - force.iterations = function(_) { - return arguments.length ? (iterations = +_, force) : iterations; - }; - - force.strength = function(_) { - return arguments.length ? (strength = +_, force) : strength; - }; - - force.radius = function(_) { - return arguments.length ? (radius = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : radius; - }; - - return force; -} - -function index$1(d) { - return d.index; -} - -function find$1(nodeById, nodeId) { - var node = nodeById.get(nodeId); - if (!node) throw new Error("node not found: " + nodeId); - return node; -} - -function link(links) { - var id = index$1, - strength = defaultStrength, - strengths, - distance = constant$7(30), - distances, - nodes, - count, - bias, - random, - iterations = 1; - - if (links == null) links = []; - - function defaultStrength(link) { - return 1 / Math.min(count[link.source.index], count[link.target.index]); - } - - function force(alpha) { - for (var k = 0, n = links.length; k < iterations; ++k) { - for (var i = 0, link, source, target, x, y, l, b; i < n; ++i) { - link = links[i], source = link.source, target = link.target; - x = target.x + target.vx - source.x - source.vx || jiggle(random); - y = target.y + target.vy - source.y - source.vy || jiggle(random); - l = Math.sqrt(x * x + y * y); - l = (l - distances[i]) / l * alpha * strengths[i]; - x *= l, y *= l; - target.vx -= x * (b = bias[i]); - target.vy -= y * b; - source.vx += x * (b = 1 - b); - source.vy += y * b; - } - } - } - - function initialize() { - if (!nodes) return; - - var i, - n = nodes.length, - m = links.length, - nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])), - link; - - for (i = 0, count = new Array(n); i < m; ++i) { - link = links[i], link.index = i; - if (typeof link.source !== "object") link.source = find$1(nodeById, link.source); - if (typeof link.target !== "object") link.target = find$1(nodeById, link.target); - count[link.source.index] = (count[link.source.index] || 0) + 1; - count[link.target.index] = (count[link.target.index] || 0) + 1; - } - - for (i = 0, bias = new Array(m); i < m; ++i) { - link = links[i], bias[i] = count[link.source.index] / (count[link.source.index] + count[link.target.index]); - } - - strengths = new Array(m), initializeStrength(); - distances = new Array(m), initializeDistance(); - } - - function initializeStrength() { - if (!nodes) return; - - for (var i = 0, n = links.length; i < n; ++i) { - strengths[i] = +strength(links[i], i, links); - } - } - - function initializeDistance() { - if (!nodes) return; - - for (var i = 0, n = links.length; i < n; ++i) { - distances[i] = +distance(links[i], i, links); - } - } - - force.initialize = function(_nodes, _random) { - nodes = _nodes; - random = _random; - initialize(); - }; - - force.links = function(_) { - return arguments.length ? (links = _, initialize(), force) : links; - }; - - force.id = function(_) { - return arguments.length ? (id = _, force) : id; - }; - - force.iterations = function(_) { - return arguments.length ? (iterations = +_, force) : iterations; - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant$7(+_), initializeStrength(), force) : strength; - }; - - force.distance = function(_) { - return arguments.length ? (distance = typeof _ === "function" ? _ : constant$7(+_), initializeDistance(), force) : distance; - }; - - return force; -} - -// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use -const a = 1664525; -const c = 1013904223; -const m = 4294967296; // 2^32 - -function lcg() { - let s = 1; - return () => (s = (a * s + c) % m) / m; -} - -function x$1(d) { - return d.x; -} - -function y$1(d) { - return d.y; -} - -var initialRadius = 10, - initialAngle = Math.PI * (3 - Math.sqrt(5)); - -function simulation(nodes) { - var simulation, - alpha = 1, - alphaMin = 0.001, - alphaDecay = 1 - Math.pow(alphaMin, 1 / 300), - alphaTarget = 0, - velocityDecay = 0.6, - forces = new Map(), - stepper = timer(step), - event = dispatch("tick", "end"), - random = lcg(); - - if (nodes == null) nodes = []; - - function step() { - tick(); - event.call("tick", simulation); - if (alpha < alphaMin) { - stepper.stop(); - event.call("end", simulation); - } - } - - function tick(iterations) { - var i, n = nodes.length, node; - - if (iterations === undefined) iterations = 1; - - for (var k = 0; k < iterations; ++k) { - alpha += (alphaTarget - alpha) * alphaDecay; - - forces.forEach(function(force) { - force(alpha); - }); - - for (i = 0; i < n; ++i) { - node = nodes[i]; - if (node.fx == null) node.x += node.vx *= velocityDecay; - else node.x = node.fx, node.vx = 0; - if (node.fy == null) node.y += node.vy *= velocityDecay; - else node.y = node.fy, node.vy = 0; - } - } - - return simulation; - } - - function initializeNodes() { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.index = i; - if (node.fx != null) node.x = node.fx; - if (node.fy != null) node.y = node.fy; - if (isNaN(node.x) || isNaN(node.y)) { - var radius = initialRadius * Math.sqrt(0.5 + i), angle = i * initialAngle; - node.x = radius * Math.cos(angle); - node.y = radius * Math.sin(angle); - } - if (isNaN(node.vx) || isNaN(node.vy)) { - node.vx = node.vy = 0; - } - } - } - - function initializeForce(force) { - if (force.initialize) force.initialize(nodes, random); - return force; - } - - initializeNodes(); - - return simulation = { - tick: tick, - - restart: function() { - return stepper.restart(step), simulation; - }, - - stop: function() { - return stepper.stop(), simulation; - }, - - nodes: function(_) { - return arguments.length ? (nodes = _, initializeNodes(), forces.forEach(initializeForce), simulation) : nodes; - }, - - alpha: function(_) { - return arguments.length ? (alpha = +_, simulation) : alpha; - }, - - alphaMin: function(_) { - return arguments.length ? (alphaMin = +_, simulation) : alphaMin; - }, - - alphaDecay: function(_) { - return arguments.length ? (alphaDecay = +_, simulation) : +alphaDecay; - }, - - alphaTarget: function(_) { - return arguments.length ? (alphaTarget = +_, simulation) : alphaTarget; - }, - - velocityDecay: function(_) { - return arguments.length ? (velocityDecay = 1 - _, simulation) : 1 - velocityDecay; - }, - - randomSource: function(_) { - return arguments.length ? (random = _, forces.forEach(initializeForce), simulation) : random; - }, - - force: function(name, _) { - return arguments.length > 1 ? ((_ == null ? forces.delete(name) : forces.set(name, initializeForce(_))), simulation) : forces.get(name); - }, - - find: function(x, y, radius) { - var i = 0, - n = nodes.length, - dx, - dy, - d2, - node, - closest; - - if (radius == null) radius = Infinity; - else radius *= radius; - - for (i = 0; i < n; ++i) { - node = nodes[i]; - dx = x - node.x; - dy = y - node.y; - d2 = dx * dx + dy * dy; - if (d2 < radius) closest = node, radius = d2; - } - - return closest; - }, - - on: function(name, _) { - return arguments.length > 1 ? (event.on(name, _), simulation) : event.on(name); - } - }; -} - -function manyBody() { - var nodes, - node, - random, - alpha, - strength = constant$7(-30), - strengths, - distanceMin2 = 1, - distanceMax2 = Infinity, - theta2 = 0.81; - - function force(_) { - var i, n = nodes.length, tree = quadtree(nodes, x$1, y$1).visitAfter(accumulate); - for (alpha = _, i = 0; i < n; ++i) node = nodes[i], tree.visit(apply); - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length, node; - strengths = new Array(n); - for (i = 0; i < n; ++i) node = nodes[i], strengths[node.index] = +strength(node, i, nodes); - } - - function accumulate(quad) { - var strength = 0, q, c, weight = 0, x, y, i; - - // For internal nodes, accumulate forces from child quadrants. - if (quad.length) { - for (x = y = i = 0; i < 4; ++i) { - if ((q = quad[i]) && (c = Math.abs(q.value))) { - strength += q.value, weight += c, x += c * q.x, y += c * q.y; - } - } - quad.x = x / weight; - quad.y = y / weight; - } - - // For leaf nodes, accumulate forces from coincident quadrants. - else { - q = quad; - q.x = q.data.x; - q.y = q.data.y; - do strength += strengths[q.data.index]; - while (q = q.next); - } - - quad.value = strength; - } - - function apply(quad, x1, _, x2) { - if (!quad.value) return true; - - var x = quad.x - node.x, - y = quad.y - node.y, - w = x2 - x1, - l = x * x + y * y; - - // Apply the Barnes-Hut approximation if possible. - // Limit forces for very close nodes; randomize direction if coincident. - if (w * w / theta2 < l) { - if (l < distanceMax2) { - if (x === 0) x = jiggle(random), l += x * x; - if (y === 0) y = jiggle(random), l += y * y; - if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); - node.vx += x * quad.value * alpha / l; - node.vy += y * quad.value * alpha / l; - } - return true; - } - - // Otherwise, process points directly. - else if (quad.length || l >= distanceMax2) return; - - // Limit forces for very close nodes; randomize direction if coincident. - if (quad.data !== node || quad.next) { - if (x === 0) x = jiggle(random), l += x * x; - if (y === 0) y = jiggle(random), l += y * y; - if (l < distanceMin2) l = Math.sqrt(distanceMin2 * l); - } - - do if (quad.data !== node) { - w = strengths[quad.data.index] * alpha / l; - node.vx += x * w; - node.vy += y * w; - } while (quad = quad.next); - } - - force.initialize = function(_nodes, _random) { - nodes = _nodes; - random = _random; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : strength; - }; - - force.distanceMin = function(_) { - return arguments.length ? (distanceMin2 = _ * _, force) : Math.sqrt(distanceMin2); - }; - - force.distanceMax = function(_) { - return arguments.length ? (distanceMax2 = _ * _, force) : Math.sqrt(distanceMax2); - }; - - force.theta = function(_) { - return arguments.length ? (theta2 = _ * _, force) : Math.sqrt(theta2); - }; - - return force; -} - -function radial(radius, x, y) { - var nodes, - strength = constant$7(0.1), - strengths, - radiuses; - - if (typeof radius !== "function") radius = constant$7(+radius); - if (x == null) x = 0; - if (y == null) y = 0; - - function force(alpha) { - for (var i = 0, n = nodes.length; i < n; ++i) { - var node = nodes[i], - dx = node.x - x || 1e-6, - dy = node.y - y || 1e-6, - r = Math.sqrt(dx * dx + dy * dy), - k = (radiuses[i] - r) * strengths[i] * alpha / r; - node.vx += dx * k; - node.vy += dy * k; - } - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - radiuses = new Array(n); - for (i = 0; i < n; ++i) { - radiuses[i] = +radius(nodes[i], i, nodes); - strengths[i] = isNaN(radiuses[i]) ? 0 : +strength(nodes[i], i, nodes); - } - } - - force.initialize = function(_) { - nodes = _, initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : strength; - }; - - force.radius = function(_) { - return arguments.length ? (radius = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : radius; - }; - - force.x = function(_) { - return arguments.length ? (x = +_, force) : x; - }; - - force.y = function(_) { - return arguments.length ? (y = +_, force) : y; - }; - - return force; -} - -function x$2(x) { - var strength = constant$7(0.1), - nodes, - strengths, - xz; - - if (typeof x !== "function") x = constant$7(x == null ? 0 : +x); - - function force(alpha) { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.vx += (xz[i] - node.x) * strengths[i] * alpha; - } - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - xz = new Array(n); - for (i = 0; i < n; ++i) { - strengths[i] = isNaN(xz[i] = +x(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); - } - } - - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : strength; - }; - - force.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : x; - }; - - return force; -} - -function y$2(y) { - var strength = constant$7(0.1), - nodes, - strengths, - yz; - - if (typeof y !== "function") y = constant$7(y == null ? 0 : +y); - - function force(alpha) { - for (var i = 0, n = nodes.length, node; i < n; ++i) { - node = nodes[i], node.vy += (yz[i] - node.y) * strengths[i] * alpha; - } - } - - function initialize() { - if (!nodes) return; - var i, n = nodes.length; - strengths = new Array(n); - yz = new Array(n); - for (i = 0; i < n; ++i) { - strengths[i] = isNaN(yz[i] = +y(nodes[i], i, nodes)) ? 0 : +strength(nodes[i], i, nodes); - } - } - - force.initialize = function(_) { - nodes = _; - initialize(); - }; - - force.strength = function(_) { - return arguments.length ? (strength = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : strength; - }; - - force.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : y; - }; - - return force; -} - -function formatDecimal(x) { - return Math.abs(x = Math.round(x)) >= 1e21 - ? x.toLocaleString("en").replace(/,/g, "") - : x.toString(10); -} - -// Computes the decimal coefficient and exponent of the specified number x with -// significant digits p, where x is positive and p is in [1, 21] or undefined. -// For example, formatDecimalParts(1.23) returns ["123", 0]. -function formatDecimalParts(x, p) { - if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null; // NaN, ±Infinity - var i, coefficient = x.slice(0, i); - - // The string returned by toExponential either has the form \d\.\d+e[-+]\d+ - // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3). - return [ - coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, - +x.slice(i + 1) - ]; -} - -function exponent$1(x) { - return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN; -} - -function formatGroup(grouping, thousands) { - return function(value, width) { - var i = value.length, - t = [], - j = 0, - g = grouping[0], - length = 0; - - while (i > 0 && g > 0) { - if (length + g + 1 > width) g = Math.max(1, width - length); - t.push(value.substring(i -= g, i + g)); - if ((length += g + 1) > width) break; - g = grouping[j = (j + 1) % grouping.length]; - } - - return t.reverse().join(thousands); - }; -} - -function formatNumerals(numerals) { - return function(value) { - return value.replace(/[0-9]/g, function(i) { - return numerals[+i]; - }); - }; -} - -// [[fill]align][sign][symbol][0][width][,][.precision][~][type] -var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i; - -function formatSpecifier(specifier) { - if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier); - var match; - return new FormatSpecifier({ - fill: match[1], - align: match[2], - sign: match[3], - symbol: match[4], - zero: match[5], - width: match[6], - comma: match[7], - precision: match[8] && match[8].slice(1), - trim: match[9], - type: match[10] - }); -} - -formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof - -function FormatSpecifier(specifier) { - this.fill = specifier.fill === undefined ? " " : specifier.fill + ""; - this.align = specifier.align === undefined ? ">" : specifier.align + ""; - this.sign = specifier.sign === undefined ? "-" : specifier.sign + ""; - this.symbol = specifier.symbol === undefined ? "" : specifier.symbol + ""; - this.zero = !!specifier.zero; - this.width = specifier.width === undefined ? undefined : +specifier.width; - this.comma = !!specifier.comma; - this.precision = specifier.precision === undefined ? undefined : +specifier.precision; - this.trim = !!specifier.trim; - this.type = specifier.type === undefined ? "" : specifier.type + ""; -} - -FormatSpecifier.prototype.toString = function() { - return this.fill - + this.align - + this.sign - + this.symbol - + (this.zero ? "0" : "") - + (this.width === undefined ? "" : Math.max(1, this.width | 0)) - + (this.comma ? "," : "") - + (this.precision === undefined ? "" : "." + Math.max(0, this.precision | 0)) - + (this.trim ? "~" : "") - + this.type; -}; - -// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k. -function formatTrim(s) { - out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) { - switch (s[i]) { - case ".": i0 = i1 = i; break; - case "0": if (i0 === 0) i0 = i; i1 = i; break; - default: if (!+s[i]) break out; if (i0 > 0) i0 = 0; break; - } - } - return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s; -} - -var prefixExponent; - -function formatPrefixAuto(x, p) { - var d = formatDecimalParts(x, p); - if (!d) return x + ""; - var coefficient = d[0], - exponent = d[1], - i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, - n = coefficient.length; - return i === n ? coefficient - : i > n ? coefficient + new Array(i - n + 1).join("0") - : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) - : "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y! -} - -function formatRounded(x, p) { - var d = formatDecimalParts(x, p); - if (!d) return x + ""; - var coefficient = d[0], - exponent = d[1]; - return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient - : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) - : coefficient + new Array(exponent - coefficient.length + 2).join("0"); -} - -var formatTypes = { - "%": (x, p) => (x * 100).toFixed(p), - "b": (x) => Math.round(x).toString(2), - "c": (x) => x + "", - "d": formatDecimal, - "e": (x, p) => x.toExponential(p), - "f": (x, p) => x.toFixed(p), - "g": (x, p) => x.toPrecision(p), - "o": (x) => Math.round(x).toString(8), - "p": (x, p) => formatRounded(x * 100, p), - "r": formatRounded, - "s": formatPrefixAuto, - "X": (x) => Math.round(x).toString(16).toUpperCase(), - "x": (x) => Math.round(x).toString(16) -}; - -function identity$3(x) { - return x; -} - -var map$1 = Array.prototype.map, - prefixes = ["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"]; - -function formatLocale(locale) { - var group = locale.grouping === undefined || locale.thousands === undefined ? identity$3 : formatGroup(map$1.call(locale.grouping, Number), locale.thousands + ""), - currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "", - currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "", - decimal = locale.decimal === undefined ? "." : locale.decimal + "", - numerals = locale.numerals === undefined ? identity$3 : formatNumerals(map$1.call(locale.numerals, String)), - percent = locale.percent === undefined ? "%" : locale.percent + "", - minus = locale.minus === undefined ? "\u2212" : locale.minus + "", - nan = locale.nan === undefined ? "NaN" : locale.nan + ""; - - function newFormat(specifier) { - specifier = formatSpecifier(specifier); - - var fill = specifier.fill, - align = specifier.align, - sign = specifier.sign, - symbol = specifier.symbol, - zero = specifier.zero, - width = specifier.width, - comma = specifier.comma, - precision = specifier.precision, - trim = specifier.trim, - type = specifier.type; - - // The "n" type is an alias for ",g". - if (type === "n") comma = true, type = "g"; - - // The "" type, and any invalid type, is an alias for ".12~g". - else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = "g"; - - // If zero fill is specified, padding goes after sign and before digits. - if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "="; - - // Compute the prefix and suffix. - // For SI-prefix, the suffix is lazily computed. - var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", - suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : ""; - - // What format function should we use? - // Is this an integer type? - // Can this type generate exponential notation? - var formatType = formatTypes[type], - maybeSuffix = /[defgprs%]/.test(type); - - // Set the default precision if not specified, - // or clamp the specified precision to the supported range. - // For significant precision, it must be in [1, 21]. - // For fixed precision, it must be in [0, 20]. - precision = precision === undefined ? 6 - : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) - : Math.max(0, Math.min(20, precision)); - - function format(value) { - var valuePrefix = prefix, - valueSuffix = suffix, - i, n, c; - - if (type === "c") { - valueSuffix = formatType(value) + valueSuffix; - value = ""; - } else { - value = +value; - - // Determine the sign. -0 is not less than 0, but 1 / -0 is! - var valueNegative = value < 0 || 1 / value < 0; - - // Perform the initial formatting. - value = isNaN(value) ? nan : formatType(Math.abs(value), precision); - - // Trim insignificant zeros. - if (trim) value = formatTrim(value); - - // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign. - if (valueNegative && +value === 0 && sign !== "+") valueNegative = false; - - // Compute the prefix and suffix. - valuePrefix = (valueNegative ? (sign === "(" ? sign : minus) : sign === "-" || sign === "(" ? "" : sign) + valuePrefix; - valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : ""); - - // Break the formatted value into the integer “value†part that can be - // grouped, and fractional or exponential “suffix†part that is not. - if (maybeSuffix) { - i = -1, n = value.length; - while (++i < n) { - if (c = value.charCodeAt(i), 48 > c || c > 57) { - valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix; - value = value.slice(0, i); - break; - } - } - } - } - - // If the fill character is not "0", grouping is applied before padding. - if (comma && !zero) value = group(value, Infinity); - - // Compute the padding. - var length = valuePrefix.length + value.length + valueSuffix.length, - padding = length < width ? new Array(width - length + 1).join(fill) : ""; - - // If the fill character is "0", grouping is applied after padding. - if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = ""; - - // Reconstruct the final output based on the desired alignment. - switch (align) { - case "<": value = valuePrefix + value + valueSuffix + padding; break; - case "=": value = valuePrefix + padding + value + valueSuffix; break; - case "^": value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length); break; - default: value = padding + valuePrefix + value + valueSuffix; break; - } - - return numerals(value); - } - - format.toString = function() { - return specifier + ""; - }; - - return format; - } - - function formatPrefix(specifier, value) { - var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), - e = Math.max(-8, Math.min(8, Math.floor(exponent$1(value) / 3))) * 3, - k = Math.pow(10, -e), - prefix = prefixes[8 + e / 3]; - return function(value) { - return f(k * value) + prefix; - }; - } - - return { - format: newFormat, - formatPrefix: formatPrefix - }; -} - -var locale; - -defaultLocale({ - thousands: ",", - grouping: [3], - currency: ["$", ""] -}); - -function defaultLocale(definition) { - locale = formatLocale(definition); - exports.format = locale.format; - exports.formatPrefix = locale.formatPrefix; - return locale; -} - -function precisionFixed(step) { - return Math.max(0, -exponent$1(Math.abs(step))); -} - -function precisionPrefix(step, value) { - return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent$1(value) / 3))) * 3 - exponent$1(Math.abs(step))); -} - -function precisionRound(step, max) { - step = Math.abs(step), max = Math.abs(max) - step; - return Math.max(0, exponent$1(max) - exponent$1(step)) + 1; -} - -var epsilon$4 = 1e-6; -var epsilon2$1 = 1e-12; -var pi$3 = Math.PI; -var halfPi$2 = pi$3 / 2; -var quarterPi = pi$3 / 4; -var tau$4 = pi$3 * 2; - -var degrees$2 = 180 / pi$3; -var radians$1 = pi$3 / 180; - -var abs$2 = Math.abs; -var atan = Math.atan; -var atan2 = Math.atan2; -var cos$1 = Math.cos; -var ceil = Math.ceil; -var exp = Math.exp; -var hypot = Math.hypot; -var log = Math.log; -var pow$1 = Math.pow; -var sin$1 = Math.sin; -var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; }; -var sqrt = Math.sqrt; -var tan = Math.tan; - -function acos(x) { - return x > 1 ? 0 : x < -1 ? pi$3 : Math.acos(x); -} - -function asin(x) { - return x > 1 ? halfPi$2 : x < -1 ? -halfPi$2 : Math.asin(x); -} - -function haversin(x) { - return (x = sin$1(x / 2)) * x; -} - -function noop$2() {} - -function streamGeometry(geometry, stream) { - if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) { - streamGeometryType[geometry.type](geometry, stream); - } -} - -var streamObjectType = { - Feature: function(object, stream) { - streamGeometry(object.geometry, stream); - }, - FeatureCollection: function(object, stream) { - var features = object.features, i = -1, n = features.length; - while (++i < n) streamGeometry(features[i].geometry, stream); - } -}; - -var streamGeometryType = { - Sphere: function(object, stream) { - stream.sphere(); - }, - Point: function(object, stream) { - object = object.coordinates; - stream.point(object[0], object[1], object[2]); - }, - MultiPoint: function(object, stream) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) object = coordinates[i], stream.point(object[0], object[1], object[2]); - }, - LineString: function(object, stream) { - streamLine(object.coordinates, stream, 0); - }, - MultiLineString: function(object, stream) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) streamLine(coordinates[i], stream, 0); - }, - Polygon: function(object, stream) { - streamPolygon(object.coordinates, stream); - }, - MultiPolygon: function(object, stream) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) streamPolygon(coordinates[i], stream); - }, - GeometryCollection: function(object, stream) { - var geometries = object.geometries, i = -1, n = geometries.length; - while (++i < n) streamGeometry(geometries[i], stream); - } -}; - -function streamLine(coordinates, stream, closed) { - var i = -1, n = coordinates.length - closed, coordinate; - stream.lineStart(); - while (++i < n) coordinate = coordinates[i], stream.point(coordinate[0], coordinate[1], coordinate[2]); - stream.lineEnd(); -} - -function streamPolygon(coordinates, stream) { - var i = -1, n = coordinates.length; - stream.polygonStart(); - while (++i < n) streamLine(coordinates[i], stream, 1); - stream.polygonEnd(); -} - -function geoStream(object, stream) { - if (object && streamObjectType.hasOwnProperty(object.type)) { - streamObjectType[object.type](object, stream); - } else { - streamGeometry(object, stream); - } -} - -var areaRingSum = new Adder(); - -// hello? - -var areaSum = new Adder(), - lambda00, - phi00, - lambda0, - cosPhi0, - sinPhi0; - -var areaStream = { - point: noop$2, - lineStart: noop$2, - lineEnd: noop$2, - polygonStart: function() { - areaRingSum = new Adder(); - areaStream.lineStart = areaRingStart; - areaStream.lineEnd = areaRingEnd; - }, - polygonEnd: function() { - var areaRing = +areaRingSum; - areaSum.add(areaRing < 0 ? tau$4 + areaRing : areaRing); - this.lineStart = this.lineEnd = this.point = noop$2; - }, - sphere: function() { - areaSum.add(tau$4); - } -}; - -function areaRingStart() { - areaStream.point = areaPointFirst; -} - -function areaRingEnd() { - areaPoint(lambda00, phi00); -} - -function areaPointFirst(lambda, phi) { - areaStream.point = areaPoint; - lambda00 = lambda, phi00 = phi; - lambda *= radians$1, phi *= radians$1; - lambda0 = lambda, cosPhi0 = cos$1(phi = phi / 2 + quarterPi), sinPhi0 = sin$1(phi); -} - -function areaPoint(lambda, phi) { - lambda *= radians$1, phi *= radians$1; - phi = phi / 2 + quarterPi; // half the angular distance from south pole - - // Spherical excess E for a spherical triangle with vertices: south pole, - // previous point, current point. Uses a formula derived from Cagnoli’s - // theorem. See Todhunter, Spherical Trig. (1871), Sec. 103, Eq. (2). - var dLambda = lambda - lambda0, - sdLambda = dLambda >= 0 ? 1 : -1, - adLambda = sdLambda * dLambda, - cosPhi = cos$1(phi), - sinPhi = sin$1(phi), - k = sinPhi0 * sinPhi, - u = cosPhi0 * cosPhi + k * cos$1(adLambda), - v = k * sdLambda * sin$1(adLambda); - areaRingSum.add(atan2(v, u)); - - // Advance the previous points. - lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi; -} - -function area$1(object) { - areaSum = new Adder(); - geoStream(object, areaStream); - return areaSum * 2; -} - -function spherical(cartesian) { - return [atan2(cartesian[1], cartesian[0]), asin(cartesian[2])]; -} - -function cartesian(spherical) { - var lambda = spherical[0], phi = spherical[1], cosPhi = cos$1(phi); - return [cosPhi * cos$1(lambda), cosPhi * sin$1(lambda), sin$1(phi)]; -} - -function cartesianDot(a, b) { - return a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; -} - -function cartesianCross(a, b) { - return [a[1] * b[2] - a[2] * b[1], a[2] * b[0] - a[0] * b[2], a[0] * b[1] - a[1] * b[0]]; -} - -// TODO return a -function cartesianAddInPlace(a, b) { - a[0] += b[0], a[1] += b[1], a[2] += b[2]; -} - -function cartesianScale(vector, k) { - return [vector[0] * k, vector[1] * k, vector[2] * k]; -} - -// TODO return d -function cartesianNormalizeInPlace(d) { - var l = sqrt(d[0] * d[0] + d[1] * d[1] + d[2] * d[2]); - d[0] /= l, d[1] /= l, d[2] /= l; -} - -var lambda0$1, phi0, lambda1, phi1, // bounds - lambda2, // previous lambda-coordinate - lambda00$1, phi00$1, // first point - p0, // previous 3D point - deltaSum, - ranges, - range$1; - -var boundsStream = { - point: boundsPoint, - lineStart: boundsLineStart, - lineEnd: boundsLineEnd, - polygonStart: function() { - boundsStream.point = boundsRingPoint; - boundsStream.lineStart = boundsRingStart; - boundsStream.lineEnd = boundsRingEnd; - deltaSum = new Adder(); - areaStream.polygonStart(); - }, - polygonEnd: function() { - areaStream.polygonEnd(); - boundsStream.point = boundsPoint; - boundsStream.lineStart = boundsLineStart; - boundsStream.lineEnd = boundsLineEnd; - if (areaRingSum < 0) lambda0$1 = -(lambda1 = 180), phi0 = -(phi1 = 90); - else if (deltaSum > epsilon$4) phi1 = 90; - else if (deltaSum < -epsilon$4) phi0 = -90; - range$1[0] = lambda0$1, range$1[1] = lambda1; - }, - sphere: function() { - lambda0$1 = -(lambda1 = 180), phi0 = -(phi1 = 90); - } -}; - -function boundsPoint(lambda, phi) { - ranges.push(range$1 = [lambda0$1 = lambda, lambda1 = lambda]); - if (phi < phi0) phi0 = phi; - if (phi > phi1) phi1 = phi; -} - -function linePoint(lambda, phi) { - var p = cartesian([lambda * radians$1, phi * radians$1]); - if (p0) { - var normal = cartesianCross(p0, p), - equatorial = [normal[1], -normal[0], 0], - inflection = cartesianCross(equatorial, normal); - cartesianNormalizeInPlace(inflection); - inflection = spherical(inflection); - var delta = lambda - lambda2, - sign = delta > 0 ? 1 : -1, - lambdai = inflection[0] * degrees$2 * sign, - phii, - antimeridian = abs$2(delta) > 180; - if (antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) { - phii = inflection[1] * degrees$2; - if (phii > phi1) phi1 = phii; - } else if (lambdai = (lambdai + 360) % 360 - 180, antimeridian ^ (sign * lambda2 < lambdai && lambdai < sign * lambda)) { - phii = -inflection[1] * degrees$2; - if (phii < phi0) phi0 = phii; - } else { - if (phi < phi0) phi0 = phi; - if (phi > phi1) phi1 = phi; - } - if (antimeridian) { - if (lambda < lambda2) { - if (angle(lambda0$1, lambda) > angle(lambda0$1, lambda1)) lambda1 = lambda; - } else { - if (angle(lambda, lambda1) > angle(lambda0$1, lambda1)) lambda0$1 = lambda; - } - } else { - if (lambda1 >= lambda0$1) { - if (lambda < lambda0$1) lambda0$1 = lambda; - if (lambda > lambda1) lambda1 = lambda; - } else { - if (lambda > lambda2) { - if (angle(lambda0$1, lambda) > angle(lambda0$1, lambda1)) lambda1 = lambda; - } else { - if (angle(lambda, lambda1) > angle(lambda0$1, lambda1)) lambda0$1 = lambda; - } - } - } - } else { - ranges.push(range$1 = [lambda0$1 = lambda, lambda1 = lambda]); - } - if (phi < phi0) phi0 = phi; - if (phi > phi1) phi1 = phi; - p0 = p, lambda2 = lambda; -} - -function boundsLineStart() { - boundsStream.point = linePoint; -} - -function boundsLineEnd() { - range$1[0] = lambda0$1, range$1[1] = lambda1; - boundsStream.point = boundsPoint; - p0 = null; -} - -function boundsRingPoint(lambda, phi) { - if (p0) { - var delta = lambda - lambda2; - deltaSum.add(abs$2(delta) > 180 ? delta + (delta > 0 ? 360 : -360) : delta); - } else { - lambda00$1 = lambda, phi00$1 = phi; - } - areaStream.point(lambda, phi); - linePoint(lambda, phi); -} - -function boundsRingStart() { - areaStream.lineStart(); -} - -function boundsRingEnd() { - boundsRingPoint(lambda00$1, phi00$1); - areaStream.lineEnd(); - if (abs$2(deltaSum) > epsilon$4) lambda0$1 = -(lambda1 = 180); - range$1[0] = lambda0$1, range$1[1] = lambda1; - p0 = null; -} - -// Finds the left-right distance between two longitudes. -// This is almost the same as (lambda1 - lambda0 + 360°) % 360°, except that we want -// the distance between ±180° to be 360°. -function angle(lambda0, lambda1) { - return (lambda1 -= lambda0) < 0 ? lambda1 + 360 : lambda1; -} - -function rangeCompare(a, b) { - return a[0] - b[0]; -} - -function rangeContains(range, x) { - return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x; -} - -function bounds(feature) { - var i, n, a, b, merged, deltaMax, delta; - - phi1 = lambda1 = -(lambda0$1 = phi0 = Infinity); - ranges = []; - geoStream(feature, boundsStream); - - // First, sort ranges by their minimum longitudes. - if (n = ranges.length) { - ranges.sort(rangeCompare); - - // Then, merge any ranges that overlap. - for (i = 1, a = ranges[0], merged = [a]; i < n; ++i) { - b = ranges[i]; - if (rangeContains(a, b[0]) || rangeContains(a, b[1])) { - if (angle(a[0], b[1]) > angle(a[0], a[1])) a[1] = b[1]; - if (angle(b[0], a[1]) > angle(a[0], a[1])) a[0] = b[0]; - } else { - merged.push(a = b); - } - } - - // Finally, find the largest gap between the merged ranges. - // The final bounding box will be the inverse of this gap. - for (deltaMax = -Infinity, n = merged.length - 1, i = 0, a = merged[n]; i <= n; a = b, ++i) { - b = merged[i]; - if ((delta = angle(a[1], b[0])) > deltaMax) deltaMax = delta, lambda0$1 = b[0], lambda1 = a[1]; - } - } - - ranges = range$1 = null; - - return lambda0$1 === Infinity || phi0 === Infinity - ? [[NaN, NaN], [NaN, NaN]] - : [[lambda0$1, phi0], [lambda1, phi1]]; -} - -var W0, W1, - X0, Y0, Z0, - X1, Y1, Z1, - X2, Y2, Z2, - lambda00$2, phi00$2, // first point - x0, y0, z0; // previous point - -var centroidStream = { - sphere: noop$2, - point: centroidPoint, - lineStart: centroidLineStart, - lineEnd: centroidLineEnd, - polygonStart: function() { - centroidStream.lineStart = centroidRingStart; - centroidStream.lineEnd = centroidRingEnd; - }, - polygonEnd: function() { - centroidStream.lineStart = centroidLineStart; - centroidStream.lineEnd = centroidLineEnd; - } -}; - -// Arithmetic mean of Cartesian vectors. -function centroidPoint(lambda, phi) { - lambda *= radians$1, phi *= radians$1; - var cosPhi = cos$1(phi); - centroidPointCartesian(cosPhi * cos$1(lambda), cosPhi * sin$1(lambda), sin$1(phi)); -} - -function centroidPointCartesian(x, y, z) { - ++W0; - X0 += (x - X0) / W0; - Y0 += (y - Y0) / W0; - Z0 += (z - Z0) / W0; -} - -function centroidLineStart() { - centroidStream.point = centroidLinePointFirst; -} - -function centroidLinePointFirst(lambda, phi) { - lambda *= radians$1, phi *= radians$1; - var cosPhi = cos$1(phi); - x0 = cosPhi * cos$1(lambda); - y0 = cosPhi * sin$1(lambda); - z0 = sin$1(phi); - centroidStream.point = centroidLinePoint; - centroidPointCartesian(x0, y0, z0); -} - -function centroidLinePoint(lambda, phi) { - lambda *= radians$1, phi *= radians$1; - var cosPhi = cos$1(phi), - x = cosPhi * cos$1(lambda), - y = cosPhi * sin$1(lambda), - z = sin$1(phi), - w = atan2(sqrt((w = y0 * z - z0 * y) * w + (w = z0 * x - x0 * z) * w + (w = x0 * y - y0 * x) * w), x0 * x + y0 * y + z0 * z); - W1 += w; - X1 += w * (x0 + (x0 = x)); - Y1 += w * (y0 + (y0 = y)); - Z1 += w * (z0 + (z0 = z)); - centroidPointCartesian(x0, y0, z0); -} - -function centroidLineEnd() { - centroidStream.point = centroidPoint; -} - -// See J. E. Brock, The Inertia Tensor for a Spherical Triangle, -// J. Applied Mechanics 42, 239 (1975). -function centroidRingStart() { - centroidStream.point = centroidRingPointFirst; -} - -function centroidRingEnd() { - centroidRingPoint(lambda00$2, phi00$2); - centroidStream.point = centroidPoint; -} - -function centroidRingPointFirst(lambda, phi) { - lambda00$2 = lambda, phi00$2 = phi; - lambda *= radians$1, phi *= radians$1; - centroidStream.point = centroidRingPoint; - var cosPhi = cos$1(phi); - x0 = cosPhi * cos$1(lambda); - y0 = cosPhi * sin$1(lambda); - z0 = sin$1(phi); - centroidPointCartesian(x0, y0, z0); -} - -function centroidRingPoint(lambda, phi) { - lambda *= radians$1, phi *= radians$1; - var cosPhi = cos$1(phi), - x = cosPhi * cos$1(lambda), - y = cosPhi * sin$1(lambda), - z = sin$1(phi), - cx = y0 * z - z0 * y, - cy = z0 * x - x0 * z, - cz = x0 * y - y0 * x, - m = hypot(cx, cy, cz), - w = asin(m), // line weight = angle - v = m && -w / m; // area weight multiplier - X2.add(v * cx); - Y2.add(v * cy); - Z2.add(v * cz); - W1 += w; - X1 += w * (x0 + (x0 = x)); - Y1 += w * (y0 + (y0 = y)); - Z1 += w * (z0 + (z0 = z)); - centroidPointCartesian(x0, y0, z0); -} - -function centroid(object) { - W0 = W1 = - X0 = Y0 = Z0 = - X1 = Y1 = Z1 = 0; - X2 = new Adder(); - Y2 = new Adder(); - Z2 = new Adder(); - geoStream(object, centroidStream); - - var x = +X2, - y = +Y2, - z = +Z2, - m = hypot(x, y, z); - - // If the area-weighted ccentroid is undefined, fall back to length-weighted ccentroid. - if (m < epsilon2$1) { - x = X1, y = Y1, z = Z1; - // If the feature has zero length, fall back to arithmetic mean of point vectors. - if (W1 < epsilon$4) x = X0, y = Y0, z = Z0; - m = hypot(x, y, z); - // If the feature still has an undefined ccentroid, then return. - if (m < epsilon2$1) return [NaN, NaN]; - } - - return [atan2(y, x) * degrees$2, asin(z / m) * degrees$2]; -} - -function constant$8(x) { - return function() { - return x; - }; -} - -function compose(a, b) { - - function compose(x, y) { - return x = a(x, y), b(x[0], x[1]); - } - - if (a.invert && b.invert) compose.invert = function(x, y) { - return x = b.invert(x, y), x && a.invert(x[0], x[1]); - }; - - return compose; -} - -function rotationIdentity(lambda, phi) { - return [abs$2(lambda) > pi$3 ? lambda + Math.round(-lambda / tau$4) * tau$4 : lambda, phi]; -} - -rotationIdentity.invert = rotationIdentity; - -function rotateRadians(deltaLambda, deltaPhi, deltaGamma) { - return (deltaLambda %= tau$4) ? (deltaPhi || deltaGamma ? compose(rotationLambda(deltaLambda), rotationPhiGamma(deltaPhi, deltaGamma)) - : rotationLambda(deltaLambda)) - : (deltaPhi || deltaGamma ? rotationPhiGamma(deltaPhi, deltaGamma) - : rotationIdentity); -} - -function forwardRotationLambda(deltaLambda) { - return function(lambda, phi) { - return lambda += deltaLambda, [lambda > pi$3 ? lambda - tau$4 : lambda < -pi$3 ? lambda + tau$4 : lambda, phi]; - }; -} - -function rotationLambda(deltaLambda) { - var rotation = forwardRotationLambda(deltaLambda); - rotation.invert = forwardRotationLambda(-deltaLambda); - return rotation; -} - -function rotationPhiGamma(deltaPhi, deltaGamma) { - var cosDeltaPhi = cos$1(deltaPhi), - sinDeltaPhi = sin$1(deltaPhi), - cosDeltaGamma = cos$1(deltaGamma), - sinDeltaGamma = sin$1(deltaGamma); - - function rotation(lambda, phi) { - var cosPhi = cos$1(phi), - x = cos$1(lambda) * cosPhi, - y = sin$1(lambda) * cosPhi, - z = sin$1(phi), - k = z * cosDeltaPhi + x * sinDeltaPhi; - return [ - atan2(y * cosDeltaGamma - k * sinDeltaGamma, x * cosDeltaPhi - z * sinDeltaPhi), - asin(k * cosDeltaGamma + y * sinDeltaGamma) - ]; - } - - rotation.invert = function(lambda, phi) { - var cosPhi = cos$1(phi), - x = cos$1(lambda) * cosPhi, - y = sin$1(lambda) * cosPhi, - z = sin$1(phi), - k = z * cosDeltaGamma - y * sinDeltaGamma; - return [ - atan2(y * cosDeltaGamma + z * sinDeltaGamma, x * cosDeltaPhi + k * sinDeltaPhi), - asin(k * cosDeltaPhi - x * sinDeltaPhi) - ]; - }; - - return rotation; -} - -function rotation(rotate) { - rotate = rotateRadians(rotate[0] * radians$1, rotate[1] * radians$1, rotate.length > 2 ? rotate[2] * radians$1 : 0); - - function forward(coordinates) { - coordinates = rotate(coordinates[0] * radians$1, coordinates[1] * radians$1); - return coordinates[0] *= degrees$2, coordinates[1] *= degrees$2, coordinates; - } - - forward.invert = function(coordinates) { - coordinates = rotate.invert(coordinates[0] * radians$1, coordinates[1] * radians$1); - return coordinates[0] *= degrees$2, coordinates[1] *= degrees$2, coordinates; - }; - - return forward; -} - -// Generates a circle centered at [0°, 0°], with a given radius and precision. -function circleStream(stream, radius, delta, direction, t0, t1) { - if (!delta) return; - var cosRadius = cos$1(radius), - sinRadius = sin$1(radius), - step = direction * delta; - if (t0 == null) { - t0 = radius + direction * tau$4; - t1 = radius - step / 2; - } else { - t0 = circleRadius(cosRadius, t0); - t1 = circleRadius(cosRadius, t1); - if (direction > 0 ? t0 < t1 : t0 > t1) t0 += direction * tau$4; - } - for (var point, t = t0; direction > 0 ? t > t1 : t < t1; t -= step) { - point = spherical([cosRadius, -sinRadius * cos$1(t), -sinRadius * sin$1(t)]); - stream.point(point[0], point[1]); - } -} - -// Returns the signed angle of a cartesian point relative to [cosRadius, 0, 0]. -function circleRadius(cosRadius, point) { - point = cartesian(point), point[0] -= cosRadius; - cartesianNormalizeInPlace(point); - var radius = acos(-point[1]); - return ((-point[2] < 0 ? -radius : radius) + tau$4 - epsilon$4) % tau$4; -} - -function circle() { - var center = constant$8([0, 0]), - radius = constant$8(90), - precision = constant$8(6), - ring, - rotate, - stream = {point: point}; - - function point(x, y) { - ring.push(x = rotate(x, y)); - x[0] *= degrees$2, x[1] *= degrees$2; - } - - function circle() { - var c = center.apply(this, arguments), - r = radius.apply(this, arguments) * radians$1, - p = precision.apply(this, arguments) * radians$1; - ring = []; - rotate = rotateRadians(-c[0] * radians$1, -c[1] * radians$1, 0).invert; - circleStream(stream, r, p, 1); - c = {type: "Polygon", coordinates: [ring]}; - ring = rotate = null; - return c; - } - - circle.center = function(_) { - return arguments.length ? (center = typeof _ === "function" ? _ : constant$8([+_[0], +_[1]]), circle) : center; - }; - - circle.radius = function(_) { - return arguments.length ? (radius = typeof _ === "function" ? _ : constant$8(+_), circle) : radius; - }; - - circle.precision = function(_) { - return arguments.length ? (precision = typeof _ === "function" ? _ : constant$8(+_), circle) : precision; - }; - - return circle; -} - -function clipBuffer() { - var lines = [], - line; - return { - point: function(x, y, m) { - line.push([x, y, m]); - }, - lineStart: function() { - lines.push(line = []); - }, - lineEnd: noop$2, - rejoin: function() { - if (lines.length > 1) lines.push(lines.pop().concat(lines.shift())); - }, - result: function() { - var result = lines; - lines = []; - line = null; - return result; - } - }; -} - -function pointEqual(a, b) { - return abs$2(a[0] - b[0]) < epsilon$4 && abs$2(a[1] - b[1]) < epsilon$4; -} - -function Intersection(point, points, other, entry) { - this.x = point; - this.z = points; - this.o = other; // another intersection - this.e = entry; // is an entry? - this.v = false; // visited - this.n = this.p = null; // next & previous -} - -// A generalized polygon clipping algorithm: given a polygon that has been cut -// into its visible line segments, and rejoins the segments by interpolating -// along the clip edge. -function clipRejoin(segments, compareIntersection, startInside, interpolate, stream) { - var subject = [], - clip = [], - i, - n; - - segments.forEach(function(segment) { - if ((n = segment.length - 1) <= 0) return; - var n, p0 = segment[0], p1 = segment[n], x; - - if (pointEqual(p0, p1)) { - if (!p0[2] && !p1[2]) { - stream.lineStart(); - for (i = 0; i < n; ++i) stream.point((p0 = segment[i])[0], p0[1]); - stream.lineEnd(); - return; - } - // handle degenerate cases by moving the point - p1[0] += 2 * epsilon$4; - } - - subject.push(x = new Intersection(p0, segment, null, true)); - clip.push(x.o = new Intersection(p0, null, x, false)); - subject.push(x = new Intersection(p1, segment, null, false)); - clip.push(x.o = new Intersection(p1, null, x, true)); - }); - - if (!subject.length) return; - - clip.sort(compareIntersection); - link$1(subject); - link$1(clip); - - for (i = 0, n = clip.length; i < n; ++i) { - clip[i].e = startInside = !startInside; - } - - var start = subject[0], - points, - point; - - while (1) { - // Find first unvisited intersection. - var current = start, - isSubject = true; - while (current.v) if ((current = current.n) === start) return; - points = current.z; - stream.lineStart(); - do { - current.v = current.o.v = true; - if (current.e) { - if (isSubject) { - for (i = 0, n = points.length; i < n; ++i) stream.point((point = points[i])[0], point[1]); - } else { - interpolate(current.x, current.n.x, 1, stream); - } - current = current.n; - } else { - if (isSubject) { - points = current.p.z; - for (i = points.length - 1; i >= 0; --i) stream.point((point = points[i])[0], point[1]); - } else { - interpolate(current.x, current.p.x, -1, stream); - } - current = current.p; - } - current = current.o; - points = current.z; - isSubject = !isSubject; - } while (!current.v); - stream.lineEnd(); - } -} - -function link$1(array) { - if (!(n = array.length)) return; - var n, - i = 0, - a = array[0], - b; - while (++i < n) { - a.n = b = array[i]; - b.p = a; - a = b; - } - a.n = b = array[0]; - b.p = a; -} - -function longitude(point) { - if (abs$2(point[0]) <= pi$3) - return point[0]; - else - return sign(point[0]) * ((abs$2(point[0]) + pi$3) % tau$4 - pi$3); -} - -function polygonContains(polygon, point) { - var lambda = longitude(point), - phi = point[1], - sinPhi = sin$1(phi), - normal = [sin$1(lambda), -cos$1(lambda), 0], - angle = 0, - winding = 0; - - var sum = new Adder(); - - if (sinPhi === 1) phi = halfPi$2 + epsilon$4; - else if (sinPhi === -1) phi = -halfPi$2 - epsilon$4; - - for (var i = 0, n = polygon.length; i < n; ++i) { - if (!(m = (ring = polygon[i]).length)) continue; - var ring, - m, - point0 = ring[m - 1], - lambda0 = longitude(point0), - phi0 = point0[1] / 2 + quarterPi, - sinPhi0 = sin$1(phi0), - cosPhi0 = cos$1(phi0); - - for (var j = 0; j < m; ++j, lambda0 = lambda1, sinPhi0 = sinPhi1, cosPhi0 = cosPhi1, point0 = point1) { - var point1 = ring[j], - lambda1 = longitude(point1), - phi1 = point1[1] / 2 + quarterPi, - sinPhi1 = sin$1(phi1), - cosPhi1 = cos$1(phi1), - delta = lambda1 - lambda0, - sign = delta >= 0 ? 1 : -1, - absDelta = sign * delta, - antimeridian = absDelta > pi$3, - k = sinPhi0 * sinPhi1; - - sum.add(atan2(k * sign * sin$1(absDelta), cosPhi0 * cosPhi1 + k * cos$1(absDelta))); - angle += antimeridian ? delta + sign * tau$4 : delta; - - // Are the longitudes either side of the point’s meridian (lambda), - // and are the latitudes smaller than the parallel (phi)? - if (antimeridian ^ lambda0 >= lambda ^ lambda1 >= lambda) { - var arc = cartesianCross(cartesian(point0), cartesian(point1)); - cartesianNormalizeInPlace(arc); - var intersection = cartesianCross(normal, arc); - cartesianNormalizeInPlace(intersection); - var phiArc = (antimeridian ^ delta >= 0 ? -1 : 1) * asin(intersection[2]); - if (phi > phiArc || phi === phiArc && (arc[0] || arc[1])) { - winding += antimeridian ^ delta >= 0 ? 1 : -1; - } - } - } - } - - // First, determine whether the South pole is inside or outside: - // - // It is inside if: - // * the polygon winds around it in a clockwise direction. - // * the polygon does not (cumulatively) wind around it, but has a negative - // (counter-clockwise) area. - // - // Second, count the (signed) number of times a segment crosses a lambda - // from the point to the South pole. If it is zero, then the point is the - // same side as the South pole. - - return (angle < -epsilon$4 || angle < epsilon$4 && sum < -epsilon2$1) ^ (winding & 1); -} - -function clip(pointVisible, clipLine, interpolate, start) { - return function(sink) { - var line = clipLine(sink), - ringBuffer = clipBuffer(), - ringSink = clipLine(ringBuffer), - polygonStarted = false, - polygon, - segments, - ring; - - var clip = { - point: point, - lineStart: lineStart, - lineEnd: lineEnd, - polygonStart: function() { - clip.point = pointRing; - clip.lineStart = ringStart; - clip.lineEnd = ringEnd; - segments = []; - polygon = []; - }, - polygonEnd: function() { - clip.point = point; - clip.lineStart = lineStart; - clip.lineEnd = lineEnd; - segments = merge(segments); - var startInside = polygonContains(polygon, start); - if (segments.length) { - if (!polygonStarted) sink.polygonStart(), polygonStarted = true; - clipRejoin(segments, compareIntersection, startInside, interpolate, sink); - } else if (startInside) { - if (!polygonStarted) sink.polygonStart(), polygonStarted = true; - sink.lineStart(); - interpolate(null, null, 1, sink); - sink.lineEnd(); - } - if (polygonStarted) sink.polygonEnd(), polygonStarted = false; - segments = polygon = null; - }, - sphere: function() { - sink.polygonStart(); - sink.lineStart(); - interpolate(null, null, 1, sink); - sink.lineEnd(); - sink.polygonEnd(); - } - }; - - function point(lambda, phi) { - if (pointVisible(lambda, phi)) sink.point(lambda, phi); - } - - function pointLine(lambda, phi) { - line.point(lambda, phi); - } - - function lineStart() { - clip.point = pointLine; - line.lineStart(); - } - - function lineEnd() { - clip.point = point; - line.lineEnd(); - } - - function pointRing(lambda, phi) { - ring.push([lambda, phi]); - ringSink.point(lambda, phi); - } - - function ringStart() { - ringSink.lineStart(); - ring = []; - } - - function ringEnd() { - pointRing(ring[0][0], ring[0][1]); - ringSink.lineEnd(); - - var clean = ringSink.clean(), - ringSegments = ringBuffer.result(), - i, n = ringSegments.length, m, - segment, - point; - - ring.pop(); - polygon.push(ring); - ring = null; - - if (!n) return; - - // No intersections. - if (clean & 1) { - segment = ringSegments[0]; - if ((m = segment.length - 1) > 0) { - if (!polygonStarted) sink.polygonStart(), polygonStarted = true; - sink.lineStart(); - for (i = 0; i < m; ++i) sink.point((point = segment[i])[0], point[1]); - sink.lineEnd(); - } - return; - } - - // Rejoin connected segments. - // TODO reuse ringBuffer.rejoin()? - if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift())); - - segments.push(ringSegments.filter(validSegment)); - } - - return clip; - }; -} - -function validSegment(segment) { - return segment.length > 1; -} - -// Intersections are sorted along the clip edge. For both antimeridian cutting -// and circle clipping, the same comparison is used. -function compareIntersection(a, b) { - return ((a = a.x)[0] < 0 ? a[1] - halfPi$2 - epsilon$4 : halfPi$2 - a[1]) - - ((b = b.x)[0] < 0 ? b[1] - halfPi$2 - epsilon$4 : halfPi$2 - b[1]); -} - -var clipAntimeridian = clip( - function() { return true; }, - clipAntimeridianLine, - clipAntimeridianInterpolate, - [-pi$3, -halfPi$2] -); - -// Takes a line and cuts into visible segments. Return values: 0 - there were -// intersections or the line was empty; 1 - no intersections; 2 - there were -// intersections, and the first and last segments should be rejoined. -function clipAntimeridianLine(stream) { - var lambda0 = NaN, - phi0 = NaN, - sign0 = NaN, - clean; // no intersections - - return { - lineStart: function() { - stream.lineStart(); - clean = 1; - }, - point: function(lambda1, phi1) { - var sign1 = lambda1 > 0 ? pi$3 : -pi$3, - delta = abs$2(lambda1 - lambda0); - if (abs$2(delta - pi$3) < epsilon$4) { // line crosses a pole - stream.point(lambda0, phi0 = (phi0 + phi1) / 2 > 0 ? halfPi$2 : -halfPi$2); - stream.point(sign0, phi0); - stream.lineEnd(); - stream.lineStart(); - stream.point(sign1, phi0); - stream.point(lambda1, phi0); - clean = 0; - } else if (sign0 !== sign1 && delta >= pi$3) { // line crosses antimeridian - if (abs$2(lambda0 - sign0) < epsilon$4) lambda0 -= sign0 * epsilon$4; // handle degeneracies - if (abs$2(lambda1 - sign1) < epsilon$4) lambda1 -= sign1 * epsilon$4; - phi0 = clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1); - stream.point(sign0, phi0); - stream.lineEnd(); - stream.lineStart(); - stream.point(sign1, phi0); - clean = 0; - } - stream.point(lambda0 = lambda1, phi0 = phi1); - sign0 = sign1; - }, - lineEnd: function() { - stream.lineEnd(); - lambda0 = phi0 = NaN; - }, - clean: function() { - return 2 - clean; // if intersections, rejoin first and last segments - } - }; -} - -function clipAntimeridianIntersect(lambda0, phi0, lambda1, phi1) { - var cosPhi0, - cosPhi1, - sinLambda0Lambda1 = sin$1(lambda0 - lambda1); - return abs$2(sinLambda0Lambda1) > epsilon$4 - ? atan((sin$1(phi0) * (cosPhi1 = cos$1(phi1)) * sin$1(lambda1) - - sin$1(phi1) * (cosPhi0 = cos$1(phi0)) * sin$1(lambda0)) - / (cosPhi0 * cosPhi1 * sinLambda0Lambda1)) - : (phi0 + phi1) / 2; -} - -function clipAntimeridianInterpolate(from, to, direction, stream) { - var phi; - if (from == null) { - phi = direction * halfPi$2; - stream.point(-pi$3, phi); - stream.point(0, phi); - stream.point(pi$3, phi); - stream.point(pi$3, 0); - stream.point(pi$3, -phi); - stream.point(0, -phi); - stream.point(-pi$3, -phi); - stream.point(-pi$3, 0); - stream.point(-pi$3, phi); - } else if (abs$2(from[0] - to[0]) > epsilon$4) { - var lambda = from[0] < to[0] ? pi$3 : -pi$3; - phi = direction * lambda / 2; - stream.point(-lambda, phi); - stream.point(0, phi); - stream.point(lambda, phi); - } else { - stream.point(to[0], to[1]); - } -} - -function clipCircle(radius) { - var cr = cos$1(radius), - delta = 6 * radians$1, - smallRadius = cr > 0, - notHemisphere = abs$2(cr) > epsilon$4; // TODO optimise for this common case - - function interpolate(from, to, direction, stream) { - circleStream(stream, radius, delta, direction, from, to); - } - - function visible(lambda, phi) { - return cos$1(lambda) * cos$1(phi) > cr; - } - - // Takes a line and cuts into visible segments. Return values used for polygon - // clipping: 0 - there were intersections or the line was empty; 1 - no - // intersections 2 - there were intersections, and the first and last segments - // should be rejoined. - function clipLine(stream) { - var point0, // previous point - c0, // code for previous point - v0, // visibility of previous point - v00, // visibility of first point - clean; // no intersections - return { - lineStart: function() { - v00 = v0 = false; - clean = 1; - }, - point: function(lambda, phi) { - var point1 = [lambda, phi], - point2, - v = visible(lambda, phi), - c = smallRadius - ? v ? 0 : code(lambda, phi) - : v ? code(lambda + (lambda < 0 ? pi$3 : -pi$3), phi) : 0; - if (!point0 && (v00 = v0 = v)) stream.lineStart(); - if (v !== v0) { - point2 = intersect(point0, point1); - if (!point2 || pointEqual(point0, point2) || pointEqual(point1, point2)) - point1[2] = 1; - } - if (v !== v0) { - clean = 0; - if (v) { - // outside going in - stream.lineStart(); - point2 = intersect(point1, point0); - stream.point(point2[0], point2[1]); - } else { - // inside going out - point2 = intersect(point0, point1); - stream.point(point2[0], point2[1], 2); - stream.lineEnd(); - } - point0 = point2; - } else if (notHemisphere && point0 && smallRadius ^ v) { - var t; - // If the codes for two points are different, or are both zero, - // and there this segment intersects with the small circle. - if (!(c & c0) && (t = intersect(point1, point0, true))) { - clean = 0; - if (smallRadius) { - stream.lineStart(); - stream.point(t[0][0], t[0][1]); - stream.point(t[1][0], t[1][1]); - stream.lineEnd(); - } else { - stream.point(t[1][0], t[1][1]); - stream.lineEnd(); - stream.lineStart(); - stream.point(t[0][0], t[0][1], 3); - } - } - } - if (v && (!point0 || !pointEqual(point0, point1))) { - stream.point(point1[0], point1[1]); - } - point0 = point1, v0 = v, c0 = c; - }, - lineEnd: function() { - if (v0) stream.lineEnd(); - point0 = null; - }, - // Rejoin first and last segments if there were intersections and the first - // and last points were visible. - clean: function() { - return clean | ((v00 && v0) << 1); - } - }; - } - - // Intersects the great circle between a and b with the clip circle. - function intersect(a, b, two) { - var pa = cartesian(a), - pb = cartesian(b); - - // We have two planes, n1.p = d1 and n2.p = d2. - // Find intersection line p(t) = c1 n1 + c2 n2 + t (n1 ⨯ n2). - var n1 = [1, 0, 0], // normal - n2 = cartesianCross(pa, pb), - n2n2 = cartesianDot(n2, n2), - n1n2 = n2[0], // cartesianDot(n1, n2), - determinant = n2n2 - n1n2 * n1n2; - - // Two polar points. - if (!determinant) return !two && a; - - var c1 = cr * n2n2 / determinant, - c2 = -cr * n1n2 / determinant, - n1xn2 = cartesianCross(n1, n2), - A = cartesianScale(n1, c1), - B = cartesianScale(n2, c2); - cartesianAddInPlace(A, B); - - // Solve |p(t)|^2 = 1. - var u = n1xn2, - w = cartesianDot(A, u), - uu = cartesianDot(u, u), - t2 = w * w - uu * (cartesianDot(A, A) - 1); - - if (t2 < 0) return; - - var t = sqrt(t2), - q = cartesianScale(u, (-w - t) / uu); - cartesianAddInPlace(q, A); - q = spherical(q); - - if (!two) return q; - - // Two intersection points. - var lambda0 = a[0], - lambda1 = b[0], - phi0 = a[1], - phi1 = b[1], - z; - - if (lambda1 < lambda0) z = lambda0, lambda0 = lambda1, lambda1 = z; - - var delta = lambda1 - lambda0, - polar = abs$2(delta - pi$3) < epsilon$4, - meridian = polar || delta < epsilon$4; - - if (!polar && phi1 < phi0) z = phi0, phi0 = phi1, phi1 = z; - - // Check that the first point is between a and b. - if (meridian - ? polar - ? phi0 + phi1 > 0 ^ q[1] < (abs$2(q[0] - lambda0) < epsilon$4 ? phi0 : phi1) - : phi0 <= q[1] && q[1] <= phi1 - : delta > pi$3 ^ (lambda0 <= q[0] && q[0] <= lambda1)) { - var q1 = cartesianScale(u, (-w + t) / uu); - cartesianAddInPlace(q1, A); - return [q, spherical(q1)]; - } - } - - // Generates a 4-bit vector representing the location of a point relative to - // the small circle's bounding box. - function code(lambda, phi) { - var r = smallRadius ? radius : pi$3 - radius, - code = 0; - if (lambda < -r) code |= 1; // left - else if (lambda > r) code |= 2; // right - if (phi < -r) code |= 4; // below - else if (phi > r) code |= 8; // above - return code; - } - - return clip(visible, clipLine, interpolate, smallRadius ? [0, -radius] : [-pi$3, radius - pi$3]); -} - -function clipLine(a, b, x0, y0, x1, y1) { - var ax = a[0], - ay = a[1], - bx = b[0], - by = b[1], - t0 = 0, - t1 = 1, - dx = bx - ax, - dy = by - ay, - r; - - r = x0 - ax; - if (!dx && r > 0) return; - r /= dx; - if (dx < 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } else if (dx > 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } - - r = x1 - ax; - if (!dx && r < 0) return; - r /= dx; - if (dx < 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } else if (dx > 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } - - r = y0 - ay; - if (!dy && r > 0) return; - r /= dy; - if (dy < 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } else if (dy > 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } - - r = y1 - ay; - if (!dy && r < 0) return; - r /= dy; - if (dy < 0) { - if (r > t1) return; - if (r > t0) t0 = r; - } else if (dy > 0) { - if (r < t0) return; - if (r < t1) t1 = r; - } - - if (t0 > 0) a[0] = ax + t0 * dx, a[1] = ay + t0 * dy; - if (t1 < 1) b[0] = ax + t1 * dx, b[1] = ay + t1 * dy; - return true; -} - -var clipMax = 1e9, clipMin = -clipMax; - -// TODO Use d3-polygon’s polygonContains here for the ring check? -// TODO Eliminate duplicate buffering in clipBuffer and polygon.push? - -function clipRectangle(x0, y0, x1, y1) { - - function visible(x, y) { - return x0 <= x && x <= x1 && y0 <= y && y <= y1; - } - - function interpolate(from, to, direction, stream) { - var a = 0, a1 = 0; - if (from == null - || (a = corner(from, direction)) !== (a1 = corner(to, direction)) - || comparePoint(from, to) < 0 ^ direction > 0) { - do stream.point(a === 0 || a === 3 ? x0 : x1, a > 1 ? y1 : y0); - while ((a = (a + direction + 4) % 4) !== a1); - } else { - stream.point(to[0], to[1]); - } - } - - function corner(p, direction) { - return abs$2(p[0] - x0) < epsilon$4 ? direction > 0 ? 0 : 3 - : abs$2(p[0] - x1) < epsilon$4 ? direction > 0 ? 2 : 1 - : abs$2(p[1] - y0) < epsilon$4 ? direction > 0 ? 1 : 0 - : direction > 0 ? 3 : 2; // abs(p[1] - y1) < epsilon - } - - function compareIntersection(a, b) { - return comparePoint(a.x, b.x); - } - - function comparePoint(a, b) { - var ca = corner(a, 1), - cb = corner(b, 1); - return ca !== cb ? ca - cb - : ca === 0 ? b[1] - a[1] - : ca === 1 ? a[0] - b[0] - : ca === 2 ? a[1] - b[1] - : b[0] - a[0]; - } - - return function(stream) { - var activeStream = stream, - bufferStream = clipBuffer(), - segments, - polygon, - ring, - x__, y__, v__, // first point - x_, y_, v_, // previous point - first, - clean; - - var clipStream = { - point: point, - lineStart: lineStart, - lineEnd: lineEnd, - polygonStart: polygonStart, - polygonEnd: polygonEnd - }; - - function point(x, y) { - if (visible(x, y)) activeStream.point(x, y); - } - - function polygonInside() { - var winding = 0; - - for (var i = 0, n = polygon.length; i < n; ++i) { - for (var ring = polygon[i], j = 1, m = ring.length, point = ring[0], a0, a1, b0 = point[0], b1 = point[1]; j < m; ++j) { - a0 = b0, a1 = b1, point = ring[j], b0 = point[0], b1 = point[1]; - if (a1 <= y1) { if (b1 > y1 && (b0 - a0) * (y1 - a1) > (b1 - a1) * (x0 - a0)) ++winding; } - else { if (b1 <= y1 && (b0 - a0) * (y1 - a1) < (b1 - a1) * (x0 - a0)) --winding; } - } - } - - return winding; - } - - // Buffer geometry within a polygon and then clip it en masse. - function polygonStart() { - activeStream = bufferStream, segments = [], polygon = [], clean = true; - } - - function polygonEnd() { - var startInside = polygonInside(), - cleanInside = clean && startInside, - visible = (segments = merge(segments)).length; - if (cleanInside || visible) { - stream.polygonStart(); - if (cleanInside) { - stream.lineStart(); - interpolate(null, null, 1, stream); - stream.lineEnd(); - } - if (visible) { - clipRejoin(segments, compareIntersection, startInside, interpolate, stream); - } - stream.polygonEnd(); - } - activeStream = stream, segments = polygon = ring = null; - } - - function lineStart() { - clipStream.point = linePoint; - if (polygon) polygon.push(ring = []); - first = true; - v_ = false; - x_ = y_ = NaN; - } - - // TODO rather than special-case polygons, simply handle them separately. - // Ideally, coincident intersection points should be jittered to avoid - // clipping issues. - function lineEnd() { - if (segments) { - linePoint(x__, y__); - if (v__ && v_) bufferStream.rejoin(); - segments.push(bufferStream.result()); - } - clipStream.point = point; - if (v_) activeStream.lineEnd(); - } - - function linePoint(x, y) { - var v = visible(x, y); - if (polygon) ring.push([x, y]); - if (first) { - x__ = x, y__ = y, v__ = v; - first = false; - if (v) { - activeStream.lineStart(); - activeStream.point(x, y); - } - } else { - if (v && v_) activeStream.point(x, y); - else { - var a = [x_ = Math.max(clipMin, Math.min(clipMax, x_)), y_ = Math.max(clipMin, Math.min(clipMax, y_))], - b = [x = Math.max(clipMin, Math.min(clipMax, x)), y = Math.max(clipMin, Math.min(clipMax, y))]; - if (clipLine(a, b, x0, y0, x1, y1)) { - if (!v_) { - activeStream.lineStart(); - activeStream.point(a[0], a[1]); - } - activeStream.point(b[0], b[1]); - if (!v) activeStream.lineEnd(); - clean = false; - } else if (v) { - activeStream.lineStart(); - activeStream.point(x, y); - clean = false; - } - } - } - x_ = x, y_ = y, v_ = v; - } - - return clipStream; - }; -} - -function extent$1() { - var x0 = 0, - y0 = 0, - x1 = 960, - y1 = 500, - cache, - cacheStream, - clip; - - return clip = { - stream: function(stream) { - return cache && cacheStream === stream ? cache : cache = clipRectangle(x0, y0, x1, y1)(cacheStream = stream); - }, - extent: function(_) { - return arguments.length ? (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1], cache = cacheStream = null, clip) : [[x0, y0], [x1, y1]]; - } - }; -} - -var lengthSum, - lambda0$2, - sinPhi0$1, - cosPhi0$1; - -var lengthStream = { - sphere: noop$2, - point: noop$2, - lineStart: lengthLineStart, - lineEnd: noop$2, - polygonStart: noop$2, - polygonEnd: noop$2 -}; - -function lengthLineStart() { - lengthStream.point = lengthPointFirst; - lengthStream.lineEnd = lengthLineEnd; -} - -function lengthLineEnd() { - lengthStream.point = lengthStream.lineEnd = noop$2; -} - -function lengthPointFirst(lambda, phi) { - lambda *= radians$1, phi *= radians$1; - lambda0$2 = lambda, sinPhi0$1 = sin$1(phi), cosPhi0$1 = cos$1(phi); - lengthStream.point = lengthPoint; -} - -function lengthPoint(lambda, phi) { - lambda *= radians$1, phi *= radians$1; - var sinPhi = sin$1(phi), - cosPhi = cos$1(phi), - delta = abs$2(lambda - lambda0$2), - cosDelta = cos$1(delta), - sinDelta = sin$1(delta), - x = cosPhi * sinDelta, - y = cosPhi0$1 * sinPhi - sinPhi0$1 * cosPhi * cosDelta, - z = sinPhi0$1 * sinPhi + cosPhi0$1 * cosPhi * cosDelta; - lengthSum.add(atan2(sqrt(x * x + y * y), z)); - lambda0$2 = lambda, sinPhi0$1 = sinPhi, cosPhi0$1 = cosPhi; -} - -function length$2(object) { - lengthSum = new Adder(); - geoStream(object, lengthStream); - return +lengthSum; -} - -var coordinates = [null, null], - object$1 = {type: "LineString", coordinates: coordinates}; - -function distance(a, b) { - coordinates[0] = a; - coordinates[1] = b; - return length$2(object$1); -} - -var containsObjectType = { - Feature: function(object, point) { - return containsGeometry(object.geometry, point); - }, - FeatureCollection: function(object, point) { - var features = object.features, i = -1, n = features.length; - while (++i < n) if (containsGeometry(features[i].geometry, point)) return true; - return false; - } -}; - -var containsGeometryType = { - Sphere: function() { - return true; - }, - Point: function(object, point) { - return containsPoint(object.coordinates, point); - }, - MultiPoint: function(object, point) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) if (containsPoint(coordinates[i], point)) return true; - return false; - }, - LineString: function(object, point) { - return containsLine(object.coordinates, point); - }, - MultiLineString: function(object, point) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) if (containsLine(coordinates[i], point)) return true; - return false; - }, - Polygon: function(object, point) { - return containsPolygon(object.coordinates, point); - }, - MultiPolygon: function(object, point) { - var coordinates = object.coordinates, i = -1, n = coordinates.length; - while (++i < n) if (containsPolygon(coordinates[i], point)) return true; - return false; - }, - GeometryCollection: function(object, point) { - var geometries = object.geometries, i = -1, n = geometries.length; - while (++i < n) if (containsGeometry(geometries[i], point)) return true; - return false; - } -}; - -function containsGeometry(geometry, point) { - return geometry && containsGeometryType.hasOwnProperty(geometry.type) - ? containsGeometryType[geometry.type](geometry, point) - : false; -} - -function containsPoint(coordinates, point) { - return distance(coordinates, point) === 0; -} - -function containsLine(coordinates, point) { - var ao, bo, ab; - for (var i = 0, n = coordinates.length; i < n; i++) { - bo = distance(coordinates[i], point); - if (bo === 0) return true; - if (i > 0) { - ab = distance(coordinates[i], coordinates[i - 1]); - if ( - ab > 0 && - ao <= ab && - bo <= ab && - (ao + bo - ab) * (1 - Math.pow((ao - bo) / ab, 2)) < epsilon2$1 * ab - ) - return true; - } - ao = bo; - } - return false; -} - -function containsPolygon(coordinates, point) { - return !!polygonContains(coordinates.map(ringRadians), pointRadians(point)); -} - -function ringRadians(ring) { - return ring = ring.map(pointRadians), ring.pop(), ring; -} - -function pointRadians(point) { - return [point[0] * radians$1, point[1] * radians$1]; -} - -function contains$1(object, point) { - return (object && containsObjectType.hasOwnProperty(object.type) - ? containsObjectType[object.type] - : containsGeometry)(object, point); -} - -function graticuleX(y0, y1, dy) { - var y = sequence(y0, y1 - epsilon$4, dy).concat(y1); - return function(x) { return y.map(function(y) { return [x, y]; }); }; -} - -function graticuleY(x0, x1, dx) { - var x = sequence(x0, x1 - epsilon$4, dx).concat(x1); - return function(y) { return x.map(function(x) { return [x, y]; }); }; -} - -function graticule() { - var x1, x0, X1, X0, - y1, y0, Y1, Y0, - dx = 10, dy = dx, DX = 90, DY = 360, - x, y, X, Y, - precision = 2.5; - - function graticule() { - return {type: "MultiLineString", coordinates: lines()}; - } - - function lines() { - return sequence(ceil(X0 / DX) * DX, X1, DX).map(X) - .concat(sequence(ceil(Y0 / DY) * DY, Y1, DY).map(Y)) - .concat(sequence(ceil(x0 / dx) * dx, x1, dx).filter(function(x) { return abs$2(x % DX) > epsilon$4; }).map(x)) - .concat(sequence(ceil(y0 / dy) * dy, y1, dy).filter(function(y) { return abs$2(y % DY) > epsilon$4; }).map(y)); - } - - graticule.lines = function() { - return lines().map(function(coordinates) { return {type: "LineString", coordinates: coordinates}; }); - }; - - graticule.outline = function() { - return { - type: "Polygon", - coordinates: [ - X(X0).concat( - Y(Y1).slice(1), - X(X1).reverse().slice(1), - Y(Y0).reverse().slice(1)) - ] - }; - }; - - graticule.extent = function(_) { - if (!arguments.length) return graticule.extentMinor(); - return graticule.extentMajor(_).extentMinor(_); - }; - - graticule.extentMajor = function(_) { - if (!arguments.length) return [[X0, Y0], [X1, Y1]]; - X0 = +_[0][0], X1 = +_[1][0]; - Y0 = +_[0][1], Y1 = +_[1][1]; - if (X0 > X1) _ = X0, X0 = X1, X1 = _; - if (Y0 > Y1) _ = Y0, Y0 = Y1, Y1 = _; - return graticule.precision(precision); - }; - - graticule.extentMinor = function(_) { - if (!arguments.length) return [[x0, y0], [x1, y1]]; - x0 = +_[0][0], x1 = +_[1][0]; - y0 = +_[0][1], y1 = +_[1][1]; - if (x0 > x1) _ = x0, x0 = x1, x1 = _; - if (y0 > y1) _ = y0, y0 = y1, y1 = _; - return graticule.precision(precision); - }; - - graticule.step = function(_) { - if (!arguments.length) return graticule.stepMinor(); - return graticule.stepMajor(_).stepMinor(_); - }; - - graticule.stepMajor = function(_) { - if (!arguments.length) return [DX, DY]; - DX = +_[0], DY = +_[1]; - return graticule; - }; - - graticule.stepMinor = function(_) { - if (!arguments.length) return [dx, dy]; - dx = +_[0], dy = +_[1]; - return graticule; - }; - - graticule.precision = function(_) { - if (!arguments.length) return precision; - precision = +_; - x = graticuleX(y0, y1, 90); - y = graticuleY(x0, x1, precision); - X = graticuleX(Y0, Y1, 90); - Y = graticuleY(X0, X1, precision); - return graticule; - }; - - return graticule - .extentMajor([[-180, -90 + epsilon$4], [180, 90 - epsilon$4]]) - .extentMinor([[-180, -80 - epsilon$4], [180, 80 + epsilon$4]]); -} - -function graticule10() { - return graticule()(); -} - -function interpolate$2(a, b) { - var x0 = a[0] * radians$1, - y0 = a[1] * radians$1, - x1 = b[0] * radians$1, - y1 = b[1] * radians$1, - cy0 = cos$1(y0), - sy0 = sin$1(y0), - cy1 = cos$1(y1), - sy1 = sin$1(y1), - kx0 = cy0 * cos$1(x0), - ky0 = cy0 * sin$1(x0), - kx1 = cy1 * cos$1(x1), - ky1 = cy1 * sin$1(x1), - d = 2 * asin(sqrt(haversin(y1 - y0) + cy0 * cy1 * haversin(x1 - x0))), - k = sin$1(d); - - var interpolate = d ? function(t) { - var B = sin$1(t *= d) / k, - A = sin$1(d - t) / k, - x = A * kx0 + B * kx1, - y = A * ky0 + B * ky1, - z = A * sy0 + B * sy1; - return [ - atan2(y, x) * degrees$2, - atan2(z, sqrt(x * x + y * y)) * degrees$2 - ]; - } : function() { - return [x0 * degrees$2, y0 * degrees$2]; - }; - - interpolate.distance = d; - - return interpolate; -} - -var identity$4 = x => x; - -var areaSum$1 = new Adder(), - areaRingSum$1 = new Adder(), - x00, - y00, - x0$1, - y0$1; - -var areaStream$1 = { - point: noop$2, - lineStart: noop$2, - lineEnd: noop$2, - polygonStart: function() { - areaStream$1.lineStart = areaRingStart$1; - areaStream$1.lineEnd = areaRingEnd$1; - }, - polygonEnd: function() { - areaStream$1.lineStart = areaStream$1.lineEnd = areaStream$1.point = noop$2; - areaSum$1.add(abs$2(areaRingSum$1)); - areaRingSum$1 = new Adder(); - }, - result: function() { - var area = areaSum$1 / 2; - areaSum$1 = new Adder(); - return area; - } -}; - -function areaRingStart$1() { - areaStream$1.point = areaPointFirst$1; -} - -function areaPointFirst$1(x, y) { - areaStream$1.point = areaPoint$1; - x00 = x0$1 = x, y00 = y0$1 = y; -} - -function areaPoint$1(x, y) { - areaRingSum$1.add(y0$1 * x - x0$1 * y); - x0$1 = x, y0$1 = y; -} - -function areaRingEnd$1() { - areaPoint$1(x00, y00); -} - -var x0$2 = Infinity, - y0$2 = x0$2, - x1 = -x0$2, - y1 = x1; - -var boundsStream$1 = { - point: boundsPoint$1, - lineStart: noop$2, - lineEnd: noop$2, - polygonStart: noop$2, - polygonEnd: noop$2, - result: function() { - var bounds = [[x0$2, y0$2], [x1, y1]]; - x1 = y1 = -(y0$2 = x0$2 = Infinity); - return bounds; - } -}; - -function boundsPoint$1(x, y) { - if (x < x0$2) x0$2 = x; - if (x > x1) x1 = x; - if (y < y0$2) y0$2 = y; - if (y > y1) y1 = y; -} - -// TODO Enforce positive area for exterior, negative area for interior? - -var X0$1 = 0, - Y0$1 = 0, - Z0$1 = 0, - X1$1 = 0, - Y1$1 = 0, - Z1$1 = 0, - X2$1 = 0, - Y2$1 = 0, - Z2$1 = 0, - x00$1, - y00$1, - x0$3, - y0$3; - -var centroidStream$1 = { - point: centroidPoint$1, - lineStart: centroidLineStart$1, - lineEnd: centroidLineEnd$1, - polygonStart: function() { - centroidStream$1.lineStart = centroidRingStart$1; - centroidStream$1.lineEnd = centroidRingEnd$1; - }, - polygonEnd: function() { - centroidStream$1.point = centroidPoint$1; - centroidStream$1.lineStart = centroidLineStart$1; - centroidStream$1.lineEnd = centroidLineEnd$1; - }, - result: function() { - var centroid = Z2$1 ? [X2$1 / Z2$1, Y2$1 / Z2$1] - : Z1$1 ? [X1$1 / Z1$1, Y1$1 / Z1$1] - : Z0$1 ? [X0$1 / Z0$1, Y0$1 / Z0$1] - : [NaN, NaN]; - X0$1 = Y0$1 = Z0$1 = - X1$1 = Y1$1 = Z1$1 = - X2$1 = Y2$1 = Z2$1 = 0; - return centroid; - } -}; - -function centroidPoint$1(x, y) { - X0$1 += x; - Y0$1 += y; - ++Z0$1; -} - -function centroidLineStart$1() { - centroidStream$1.point = centroidPointFirstLine; -} - -function centroidPointFirstLine(x, y) { - centroidStream$1.point = centroidPointLine; - centroidPoint$1(x0$3 = x, y0$3 = y); -} - -function centroidPointLine(x, y) { - var dx = x - x0$3, dy = y - y0$3, z = sqrt(dx * dx + dy * dy); - X1$1 += z * (x0$3 + x) / 2; - Y1$1 += z * (y0$3 + y) / 2; - Z1$1 += z; - centroidPoint$1(x0$3 = x, y0$3 = y); -} - -function centroidLineEnd$1() { - centroidStream$1.point = centroidPoint$1; -} - -function centroidRingStart$1() { - centroidStream$1.point = centroidPointFirstRing; -} - -function centroidRingEnd$1() { - centroidPointRing(x00$1, y00$1); -} - -function centroidPointFirstRing(x, y) { - centroidStream$1.point = centroidPointRing; - centroidPoint$1(x00$1 = x0$3 = x, y00$1 = y0$3 = y); -} - -function centroidPointRing(x, y) { - var dx = x - x0$3, - dy = y - y0$3, - z = sqrt(dx * dx + dy * dy); - - X1$1 += z * (x0$3 + x) / 2; - Y1$1 += z * (y0$3 + y) / 2; - Z1$1 += z; - - z = y0$3 * x - x0$3 * y; - X2$1 += z * (x0$3 + x); - Y2$1 += z * (y0$3 + y); - Z2$1 += z * 3; - centroidPoint$1(x0$3 = x, y0$3 = y); -} - -function PathContext(context) { - this._context = context; -} - -PathContext.prototype = { - _radius: 4.5, - pointRadius: function(_) { - return this._radius = _, this; - }, - polygonStart: function() { - this._line = 0; - }, - polygonEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._line === 0) this._context.closePath(); - this._point = NaN; - }, - point: function(x, y) { - switch (this._point) { - case 0: { - this._context.moveTo(x, y); - this._point = 1; - break; - } - case 1: { - this._context.lineTo(x, y); - break; - } - default: { - this._context.moveTo(x + this._radius, y); - this._context.arc(x, y, this._radius, 0, tau$4); - break; - } - } - }, - result: noop$2 -}; - -var lengthSum$1 = new Adder(), - lengthRing, - x00$2, - y00$2, - x0$4, - y0$4; - -var lengthStream$1 = { - point: noop$2, - lineStart: function() { - lengthStream$1.point = lengthPointFirst$1; - }, - lineEnd: function() { - if (lengthRing) lengthPoint$1(x00$2, y00$2); - lengthStream$1.point = noop$2; - }, - polygonStart: function() { - lengthRing = true; - }, - polygonEnd: function() { - lengthRing = null; - }, - result: function() { - var length = +lengthSum$1; - lengthSum$1 = new Adder(); - return length; - } -}; - -function lengthPointFirst$1(x, y) { - lengthStream$1.point = lengthPoint$1; - x00$2 = x0$4 = x, y00$2 = y0$4 = y; -} - -function lengthPoint$1(x, y) { - x0$4 -= x, y0$4 -= y; - lengthSum$1.add(sqrt(x0$4 * x0$4 + y0$4 * y0$4)); - x0$4 = x, y0$4 = y; -} - -function PathString() { - this._string = []; -} - -PathString.prototype = { - _radius: 4.5, - _circle: circle$1(4.5), - pointRadius: function(_) { - if ((_ = +_) !== this._radius) this._radius = _, this._circle = null; - return this; - }, - polygonStart: function() { - this._line = 0; - }, - polygonEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._line === 0) this._string.push("Z"); - this._point = NaN; - }, - point: function(x, y) { - switch (this._point) { - case 0: { - this._string.push("M", x, ",", y); - this._point = 1; - break; - } - case 1: { - this._string.push("L", x, ",", y); - break; - } - default: { - if (this._circle == null) this._circle = circle$1(this._radius); - this._string.push("M", x, ",", y, this._circle); - break; - } - } - }, - result: function() { - if (this._string.length) { - var result = this._string.join(""); - this._string = []; - return result; - } else { - return null; - } - } -}; - -function circle$1(radius) { - return "m0," + radius - + "a" + radius + "," + radius + " 0 1,1 0," + -2 * radius - + "a" + radius + "," + radius + " 0 1,1 0," + 2 * radius - + "z"; -} - -function index$2(projection, context) { - var pointRadius = 4.5, - projectionStream, - contextStream; - - function path(object) { - if (object) { - if (typeof pointRadius === "function") contextStream.pointRadius(+pointRadius.apply(this, arguments)); - geoStream(object, projectionStream(contextStream)); - } - return contextStream.result(); - } - - path.area = function(object) { - geoStream(object, projectionStream(areaStream$1)); - return areaStream$1.result(); - }; - - path.measure = function(object) { - geoStream(object, projectionStream(lengthStream$1)); - return lengthStream$1.result(); - }; - - path.bounds = function(object) { - geoStream(object, projectionStream(boundsStream$1)); - return boundsStream$1.result(); - }; - - path.centroid = function(object) { - geoStream(object, projectionStream(centroidStream$1)); - return centroidStream$1.result(); - }; - - path.projection = function(_) { - return arguments.length ? (projectionStream = _ == null ? (projection = null, identity$4) : (projection = _).stream, path) : projection; - }; - - path.context = function(_) { - if (!arguments.length) return context; - contextStream = _ == null ? (context = null, new PathString) : new PathContext(context = _); - if (typeof pointRadius !== "function") contextStream.pointRadius(pointRadius); - return path; - }; - - path.pointRadius = function(_) { - if (!arguments.length) return pointRadius; - pointRadius = typeof _ === "function" ? _ : (contextStream.pointRadius(+_), +_); - return path; - }; - - return path.projection(projection).context(context); -} - -function transform(methods) { - return { - stream: transformer(methods) - }; -} - -function transformer(methods) { - return function(stream) { - var s = new TransformStream; - for (var key in methods) s[key] = methods[key]; - s.stream = stream; - return s; - }; -} - -function TransformStream() {} - -TransformStream.prototype = { - constructor: TransformStream, - point: function(x, y) { this.stream.point(x, y); }, - sphere: function() { this.stream.sphere(); }, - lineStart: function() { this.stream.lineStart(); }, - lineEnd: function() { this.stream.lineEnd(); }, - polygonStart: function() { this.stream.polygonStart(); }, - polygonEnd: function() { this.stream.polygonEnd(); } -}; - -function fit(projection, fitBounds, object) { - var clip = projection.clipExtent && projection.clipExtent(); - projection.scale(150).translate([0, 0]); - if (clip != null) projection.clipExtent(null); - geoStream(object, projection.stream(boundsStream$1)); - fitBounds(boundsStream$1.result()); - if (clip != null) projection.clipExtent(clip); - return projection; -} - -function fitExtent(projection, extent, object) { - return fit(projection, function(b) { - var w = extent[1][0] - extent[0][0], - h = extent[1][1] - extent[0][1], - k = Math.min(w / (b[1][0] - b[0][0]), h / (b[1][1] - b[0][1])), - x = +extent[0][0] + (w - k * (b[1][0] + b[0][0])) / 2, - y = +extent[0][1] + (h - k * (b[1][1] + b[0][1])) / 2; - projection.scale(150 * k).translate([x, y]); - }, object); -} - -function fitSize(projection, size, object) { - return fitExtent(projection, [[0, 0], size], object); -} - -function fitWidth(projection, width, object) { - return fit(projection, function(b) { - var w = +width, - k = w / (b[1][0] - b[0][0]), - x = (w - k * (b[1][0] + b[0][0])) / 2, - y = -k * b[0][1]; - projection.scale(150 * k).translate([x, y]); - }, object); -} - -function fitHeight(projection, height, object) { - return fit(projection, function(b) { - var h = +height, - k = h / (b[1][1] - b[0][1]), - x = -k * b[0][0], - y = (h - k * (b[1][1] + b[0][1])) / 2; - projection.scale(150 * k).translate([x, y]); - }, object); -} - -var maxDepth = 16, // maximum depth of subdivision - cosMinDistance = cos$1(30 * radians$1); // cos(minimum angular distance) - -function resample(project, delta2) { - return +delta2 ? resample$1(project, delta2) : resampleNone(project); -} - -function resampleNone(project) { - return transformer({ - point: function(x, y) { - x = project(x, y); - this.stream.point(x[0], x[1]); - } - }); -} - -function resample$1(project, delta2) { - - function resampleLineTo(x0, y0, lambda0, a0, b0, c0, x1, y1, lambda1, a1, b1, c1, depth, stream) { - var dx = x1 - x0, - dy = y1 - y0, - d2 = dx * dx + dy * dy; - if (d2 > 4 * delta2 && depth--) { - var a = a0 + a1, - b = b0 + b1, - c = c0 + c1, - m = sqrt(a * a + b * b + c * c), - phi2 = asin(c /= m), - lambda2 = abs$2(abs$2(c) - 1) < epsilon$4 || abs$2(lambda0 - lambda1) < epsilon$4 ? (lambda0 + lambda1) / 2 : atan2(b, a), - p = project(lambda2, phi2), - x2 = p[0], - y2 = p[1], - dx2 = x2 - x0, - dy2 = y2 - y0, - dz = dy * dx2 - dx * dy2; - if (dz * dz / d2 > delta2 // perpendicular projected distance - || abs$2((dx * dx2 + dy * dy2) / d2 - 0.5) > 0.3 // midpoint close to an end - || a0 * a1 + b0 * b1 + c0 * c1 < cosMinDistance) { // angular distance - resampleLineTo(x0, y0, lambda0, a0, b0, c0, x2, y2, lambda2, a /= m, b /= m, c, depth, stream); - stream.point(x2, y2); - resampleLineTo(x2, y2, lambda2, a, b, c, x1, y1, lambda1, a1, b1, c1, depth, stream); - } - } - } - return function(stream) { - var lambda00, x00, y00, a00, b00, c00, // first point - lambda0, x0, y0, a0, b0, c0; // previous point - - var resampleStream = { - point: point, - lineStart: lineStart, - lineEnd: lineEnd, - polygonStart: function() { stream.polygonStart(); resampleStream.lineStart = ringStart; }, - polygonEnd: function() { stream.polygonEnd(); resampleStream.lineStart = lineStart; } - }; - - function point(x, y) { - x = project(x, y); - stream.point(x[0], x[1]); - } - - function lineStart() { - x0 = NaN; - resampleStream.point = linePoint; - stream.lineStart(); - } - - function linePoint(lambda, phi) { - var c = cartesian([lambda, phi]), p = project(lambda, phi); - resampleLineTo(x0, y0, lambda0, a0, b0, c0, x0 = p[0], y0 = p[1], lambda0 = lambda, a0 = c[0], b0 = c[1], c0 = c[2], maxDepth, stream); - stream.point(x0, y0); - } - - function lineEnd() { - resampleStream.point = point; - stream.lineEnd(); - } - - function ringStart() { - lineStart(); - resampleStream.point = ringPoint; - resampleStream.lineEnd = ringEnd; - } - - function ringPoint(lambda, phi) { - linePoint(lambda00 = lambda, phi), x00 = x0, y00 = y0, a00 = a0, b00 = b0, c00 = c0; - resampleStream.point = linePoint; - } - - function ringEnd() { - resampleLineTo(x0, y0, lambda0, a0, b0, c0, x00, y00, lambda00, a00, b00, c00, maxDepth, stream); - resampleStream.lineEnd = lineEnd; - lineEnd(); - } - - return resampleStream; - }; -} - -var transformRadians = transformer({ - point: function(x, y) { - this.stream.point(x * radians$1, y * radians$1); - } -}); - -function transformRotate(rotate) { - return transformer({ - point: function(x, y) { - var r = rotate(x, y); - return this.stream.point(r[0], r[1]); - } - }); -} - -function scaleTranslate(k, dx, dy, sx, sy) { - function transform(x, y) { - x *= sx; y *= sy; - return [dx + k * x, dy - k * y]; - } - transform.invert = function(x, y) { - return [(x - dx) / k * sx, (dy - y) / k * sy]; - }; - return transform; -} - -function scaleTranslateRotate(k, dx, dy, sx, sy, alpha) { - if (!alpha) return scaleTranslate(k, dx, dy, sx, sy); - var cosAlpha = cos$1(alpha), - sinAlpha = sin$1(alpha), - a = cosAlpha * k, - b = sinAlpha * k, - ai = cosAlpha / k, - bi = sinAlpha / k, - ci = (sinAlpha * dy - cosAlpha * dx) / k, - fi = (sinAlpha * dx + cosAlpha * dy) / k; - function transform(x, y) { - x *= sx; y *= sy; - return [a * x - b * y + dx, dy - b * x - a * y]; - } - transform.invert = function(x, y) { - return [sx * (ai * x - bi * y + ci), sy * (fi - bi * x - ai * y)]; - }; - return transform; -} - -function projection(project) { - return projectionMutator(function() { return project; })(); -} - -function projectionMutator(projectAt) { - var project, - k = 150, // scale - x = 480, y = 250, // translate - lambda = 0, phi = 0, // center - deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate - alpha = 0, // post-rotate angle - sx = 1, // reflectX - sy = 1, // reflectX - theta = null, preclip = clipAntimeridian, // pre-clip angle - x0 = null, y0, x1, y1, postclip = identity$4, // post-clip extent - delta2 = 0.5, // precision - projectResample, - projectTransform, - projectRotateTransform, - cache, - cacheStream; - - function projection(point) { - return projectRotateTransform(point[0] * radians$1, point[1] * radians$1); - } - - function invert(point) { - point = projectRotateTransform.invert(point[0], point[1]); - return point && [point[0] * degrees$2, point[1] * degrees$2]; - } - - projection.stream = function(stream) { - return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream))))); - }; - - projection.preclip = function(_) { - return arguments.length ? (preclip = _, theta = undefined, reset()) : preclip; - }; - - projection.postclip = function(_) { - return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip; - }; - - projection.clipAngle = function(_) { - return arguments.length ? (preclip = +_ ? clipCircle(theta = _ * radians$1) : (theta = null, clipAntimeridian), reset()) : theta * degrees$2; - }; - - projection.clipExtent = function(_) { - return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity$4) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]]; - }; - - projection.scale = function(_) { - return arguments.length ? (k = +_, recenter()) : k; - }; - - projection.translate = function(_) { - return arguments.length ? (x = +_[0], y = +_[1], recenter()) : [x, y]; - }; - - projection.center = function(_) { - return arguments.length ? (lambda = _[0] % 360 * radians$1, phi = _[1] % 360 * radians$1, recenter()) : [lambda * degrees$2, phi * degrees$2]; - }; - - projection.rotate = function(_) { - return arguments.length ? (deltaLambda = _[0] % 360 * radians$1, deltaPhi = _[1] % 360 * radians$1, deltaGamma = _.length > 2 ? _[2] % 360 * radians$1 : 0, recenter()) : [deltaLambda * degrees$2, deltaPhi * degrees$2, deltaGamma * degrees$2]; - }; - - projection.angle = function(_) { - return arguments.length ? (alpha = _ % 360 * radians$1, recenter()) : alpha * degrees$2; - }; - - projection.reflectX = function(_) { - return arguments.length ? (sx = _ ? -1 : 1, recenter()) : sx < 0; - }; - - projection.reflectY = function(_) { - return arguments.length ? (sy = _ ? -1 : 1, recenter()) : sy < 0; - }; - - projection.precision = function(_) { - return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2); - }; - - projection.fitExtent = function(extent, object) { - return fitExtent(projection, extent, object); - }; - - projection.fitSize = function(size, object) { - return fitSize(projection, size, object); - }; - - projection.fitWidth = function(width, object) { - return fitWidth(projection, width, object); - }; - - projection.fitHeight = function(height, object) { - return fitHeight(projection, height, object); - }; - - function recenter() { - var center = scaleTranslateRotate(k, 0, 0, sx, sy, alpha).apply(null, project(lambda, phi)), - transform = scaleTranslateRotate(k, x - center[0], y - center[1], sx, sy, alpha); - rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma); - projectTransform = compose(project, transform); - projectRotateTransform = compose(rotate, projectTransform); - projectResample = resample(projectTransform, delta2); - return reset(); - } - - function reset() { - cache = cacheStream = null; - return projection; - } - - return function() { - project = projectAt.apply(this, arguments); - projection.invert = project.invert && invert; - return recenter(); - }; -} - -function conicProjection(projectAt) { - var phi0 = 0, - phi1 = pi$3 / 3, - m = projectionMutator(projectAt), - p = m(phi0, phi1); - - p.parallels = function(_) { - return arguments.length ? m(phi0 = _[0] * radians$1, phi1 = _[1] * radians$1) : [phi0 * degrees$2, phi1 * degrees$2]; - }; - - return p; -} - -function cylindricalEqualAreaRaw(phi0) { - var cosPhi0 = cos$1(phi0); - - function forward(lambda, phi) { - return [lambda * cosPhi0, sin$1(phi) / cosPhi0]; - } - - forward.invert = function(x, y) { - return [x / cosPhi0, asin(y * cosPhi0)]; - }; - - return forward; -} - -function conicEqualAreaRaw(y0, y1) { - var sy0 = sin$1(y0), n = (sy0 + sin$1(y1)) / 2; - - // Are the parallels symmetrical around the Equator? - if (abs$2(n) < epsilon$4) return cylindricalEqualAreaRaw(y0); - - var c = 1 + sy0 * (2 * n - sy0), r0 = sqrt(c) / n; - - function project(x, y) { - var r = sqrt(c - 2 * n * sin$1(y)) / n; - return [r * sin$1(x *= n), r0 - r * cos$1(x)]; - } - - project.invert = function(x, y) { - var r0y = r0 - y, - l = atan2(x, abs$2(r0y)) * sign(r0y); - if (r0y * n < 0) - l -= pi$3 * sign(x) * sign(r0y); - return [l / n, asin((c - (x * x + r0y * r0y) * n * n) / (2 * n))]; - }; - - return project; -} - -function conicEqualArea() { - return conicProjection(conicEqualAreaRaw) - .scale(155.424) - .center([0, 33.6442]); -} - -function albers() { - return conicEqualArea() - .parallels([29.5, 45.5]) - .scale(1070) - .translate([480, 250]) - .rotate([96, 0]) - .center([-0.6, 38.7]); -} - -// The projections must have mutually exclusive clip regions on the sphere, -// as this will avoid emitting interleaving lines and polygons. -function multiplex(streams) { - var n = streams.length; - return { - point: function(x, y) { var i = -1; while (++i < n) streams[i].point(x, y); }, - sphere: function() { var i = -1; while (++i < n) streams[i].sphere(); }, - lineStart: function() { var i = -1; while (++i < n) streams[i].lineStart(); }, - lineEnd: function() { var i = -1; while (++i < n) streams[i].lineEnd(); }, - polygonStart: function() { var i = -1; while (++i < n) streams[i].polygonStart(); }, - polygonEnd: function() { var i = -1; while (++i < n) streams[i].polygonEnd(); } - }; -} - -// A composite projection for the United States, configured by default for -// 960×500. The projection also works quite well at 960×600 if you change the -// scale to 1285 and adjust the translate accordingly. The set of standard -// parallels for each region comes from USGS, which is published here: -// http://egsc.usgs.gov/isb/pubs/MapProjections/projections.html#albers -function albersUsa() { - var cache, - cacheStream, - lower48 = albers(), lower48Point, - alaska = conicEqualArea().rotate([154, 0]).center([-2, 58.5]).parallels([55, 65]), alaskaPoint, // EPSG:3338 - hawaii = conicEqualArea().rotate([157, 0]).center([-3, 19.9]).parallels([8, 18]), hawaiiPoint, // ESRI:102007 - point, pointStream = {point: function(x, y) { point = [x, y]; }}; - - function albersUsa(coordinates) { - var x = coordinates[0], y = coordinates[1]; - return point = null, - (lower48Point.point(x, y), point) - || (alaskaPoint.point(x, y), point) - || (hawaiiPoint.point(x, y), point); - } - - albersUsa.invert = function(coordinates) { - var k = lower48.scale(), - t = lower48.translate(), - x = (coordinates[0] - t[0]) / k, - y = (coordinates[1] - t[1]) / k; - return (y >= 0.120 && y < 0.234 && x >= -0.425 && x < -0.214 ? alaska - : y >= 0.166 && y < 0.234 && x >= -0.214 && x < -0.115 ? hawaii - : lower48).invert(coordinates); - }; - - albersUsa.stream = function(stream) { - return cache && cacheStream === stream ? cache : cache = multiplex([lower48.stream(cacheStream = stream), alaska.stream(stream), hawaii.stream(stream)]); - }; - - albersUsa.precision = function(_) { - if (!arguments.length) return lower48.precision(); - lower48.precision(_), alaska.precision(_), hawaii.precision(_); - return reset(); - }; - - albersUsa.scale = function(_) { - if (!arguments.length) return lower48.scale(); - lower48.scale(_), alaska.scale(_ * 0.35), hawaii.scale(_); - return albersUsa.translate(lower48.translate()); - }; - - albersUsa.translate = function(_) { - if (!arguments.length) return lower48.translate(); - var k = lower48.scale(), x = +_[0], y = +_[1]; - - lower48Point = lower48 - .translate(_) - .clipExtent([[x - 0.455 * k, y - 0.238 * k], [x + 0.455 * k, y + 0.238 * k]]) - .stream(pointStream); - - alaskaPoint = alaska - .translate([x - 0.307 * k, y + 0.201 * k]) - .clipExtent([[x - 0.425 * k + epsilon$4, y + 0.120 * k + epsilon$4], [x - 0.214 * k - epsilon$4, y + 0.234 * k - epsilon$4]]) - .stream(pointStream); - - hawaiiPoint = hawaii - .translate([x - 0.205 * k, y + 0.212 * k]) - .clipExtent([[x - 0.214 * k + epsilon$4, y + 0.166 * k + epsilon$4], [x - 0.115 * k - epsilon$4, y + 0.234 * k - epsilon$4]]) - .stream(pointStream); - - return reset(); - }; - - albersUsa.fitExtent = function(extent, object) { - return fitExtent(albersUsa, extent, object); - }; - - albersUsa.fitSize = function(size, object) { - return fitSize(albersUsa, size, object); - }; - - albersUsa.fitWidth = function(width, object) { - return fitWidth(albersUsa, width, object); - }; - - albersUsa.fitHeight = function(height, object) { - return fitHeight(albersUsa, height, object); - }; - - function reset() { - cache = cacheStream = null; - return albersUsa; - } - - return albersUsa.scale(1070); -} - -function azimuthalRaw(scale) { - return function(x, y) { - var cx = cos$1(x), - cy = cos$1(y), - k = scale(cx * cy); - if (k === Infinity) return [2, 0]; - return [ - k * cy * sin$1(x), - k * sin$1(y) - ]; - } -} - -function azimuthalInvert(angle) { - return function(x, y) { - var z = sqrt(x * x + y * y), - c = angle(z), - sc = sin$1(c), - cc = cos$1(c); - return [ - atan2(x * sc, z * cc), - asin(z && y * sc / z) - ]; - } -} - -var azimuthalEqualAreaRaw = azimuthalRaw(function(cxcy) { - return sqrt(2 / (1 + cxcy)); -}); - -azimuthalEqualAreaRaw.invert = azimuthalInvert(function(z) { - return 2 * asin(z / 2); -}); - -function azimuthalEqualArea() { - return projection(azimuthalEqualAreaRaw) - .scale(124.75) - .clipAngle(180 - 1e-3); -} - -var azimuthalEquidistantRaw = azimuthalRaw(function(c) { - return (c = acos(c)) && c / sin$1(c); -}); - -azimuthalEquidistantRaw.invert = azimuthalInvert(function(z) { - return z; -}); - -function azimuthalEquidistant() { - return projection(azimuthalEquidistantRaw) - .scale(79.4188) - .clipAngle(180 - 1e-3); -} - -function mercatorRaw(lambda, phi) { - return [lambda, log(tan((halfPi$2 + phi) / 2))]; -} - -mercatorRaw.invert = function(x, y) { - return [x, 2 * atan(exp(y)) - halfPi$2]; -}; - -function mercator() { - return mercatorProjection(mercatorRaw) - .scale(961 / tau$4); -} - -function mercatorProjection(project) { - var m = projection(project), - center = m.center, - scale = m.scale, - translate = m.translate, - clipExtent = m.clipExtent, - x0 = null, y0, x1, y1; // clip extent - - m.scale = function(_) { - return arguments.length ? (scale(_), reclip()) : scale(); - }; - - m.translate = function(_) { - return arguments.length ? (translate(_), reclip()) : translate(); - }; - - m.center = function(_) { - return arguments.length ? (center(_), reclip()) : center(); - }; - - m.clipExtent = function(_) { - return arguments.length ? ((_ == null ? x0 = y0 = x1 = y1 = null : (x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1])), reclip()) : x0 == null ? null : [[x0, y0], [x1, y1]]; - }; - - function reclip() { - var k = pi$3 * scale(), - t = m(rotation(m.rotate()).invert([0, 0])); - return clipExtent(x0 == null - ? [[t[0] - k, t[1] - k], [t[0] + k, t[1] + k]] : project === mercatorRaw - ? [[Math.max(t[0] - k, x0), y0], [Math.min(t[0] + k, x1), y1]] - : [[x0, Math.max(t[1] - k, y0)], [x1, Math.min(t[1] + k, y1)]]); - } - - return reclip(); -} - -function tany(y) { - return tan((halfPi$2 + y) / 2); -} - -function conicConformalRaw(y0, y1) { - var cy0 = cos$1(y0), - n = y0 === y1 ? sin$1(y0) : log(cy0 / cos$1(y1)) / log(tany(y1) / tany(y0)), - f = cy0 * pow$1(tany(y0), n) / n; - - if (!n) return mercatorRaw; - - function project(x, y) { - if (f > 0) { if (y < -halfPi$2 + epsilon$4) y = -halfPi$2 + epsilon$4; } - else { if (y > halfPi$2 - epsilon$4) y = halfPi$2 - epsilon$4; } - var r = f / pow$1(tany(y), n); - return [r * sin$1(n * x), f - r * cos$1(n * x)]; - } - - project.invert = function(x, y) { - var fy = f - y, r = sign(n) * sqrt(x * x + fy * fy), - l = atan2(x, abs$2(fy)) * sign(fy); - if (fy * n < 0) - l -= pi$3 * sign(x) * sign(fy); - return [l / n, 2 * atan(pow$1(f / r, 1 / n)) - halfPi$2]; - }; - - return project; -} - -function conicConformal() { - return conicProjection(conicConformalRaw) - .scale(109.5) - .parallels([30, 30]); -} - -function equirectangularRaw(lambda, phi) { - return [lambda, phi]; -} - -equirectangularRaw.invert = equirectangularRaw; - -function equirectangular() { - return projection(equirectangularRaw) - .scale(152.63); -} - -function conicEquidistantRaw(y0, y1) { - var cy0 = cos$1(y0), - n = y0 === y1 ? sin$1(y0) : (cy0 - cos$1(y1)) / (y1 - y0), - g = cy0 / n + y0; - - if (abs$2(n) < epsilon$4) return equirectangularRaw; - - function project(x, y) { - var gy = g - y, nx = n * x; - return [gy * sin$1(nx), g - gy * cos$1(nx)]; - } - - project.invert = function(x, y) { - var gy = g - y, - l = atan2(x, abs$2(gy)) * sign(gy); - if (gy * n < 0) - l -= pi$3 * sign(x) * sign(gy); - return [l / n, g - sign(n) * sqrt(x * x + gy * gy)]; - }; - - return project; -} - -function conicEquidistant() { - return conicProjection(conicEquidistantRaw) - .scale(131.154) - .center([0, 13.9389]); -} - -var A1 = 1.340264, - A2 = -0.081106, - A3 = 0.000893, - A4 = 0.003796, - M = sqrt(3) / 2, - iterations = 12; - -function equalEarthRaw(lambda, phi) { - var l = asin(M * sin$1(phi)), l2 = l * l, l6 = l2 * l2 * l2; - return [ - lambda * cos$1(l) / (M * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2))), - l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - ]; -} - -equalEarthRaw.invert = function(x, y) { - var l = y, l2 = l * l, l6 = l2 * l2 * l2; - for (var i = 0, delta, fy, fpy; i < iterations; ++i) { - fy = l * (A1 + A2 * l2 + l6 * (A3 + A4 * l2)) - y; - fpy = A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2); - l -= delta = fy / fpy, l2 = l * l, l6 = l2 * l2 * l2; - if (abs$2(delta) < epsilon2$1) break; - } - return [ - M * x * (A1 + 3 * A2 * l2 + l6 * (7 * A3 + 9 * A4 * l2)) / cos$1(l), - asin(sin$1(l) / M) - ]; -}; - -function equalEarth() { - return projection(equalEarthRaw) - .scale(177.158); -} - -function gnomonicRaw(x, y) { - var cy = cos$1(y), k = cos$1(x) * cy; - return [cy * sin$1(x) / k, sin$1(y) / k]; -} - -gnomonicRaw.invert = azimuthalInvert(atan); - -function gnomonic() { - return projection(gnomonicRaw) - .scale(144.049) - .clipAngle(60); -} - -function identity$5() { - var k = 1, tx = 0, ty = 0, sx = 1, sy = 1, // scale, translate and reflect - alpha = 0, ca, sa, // angle - x0 = null, y0, x1, y1, // clip extent - kx = 1, ky = 1, - transform = transformer({ - point: function(x, y) { - var p = projection([x, y]); - this.stream.point(p[0], p[1]); - } - }), - postclip = identity$4, - cache, - cacheStream; - - function reset() { - kx = k * sx; - ky = k * sy; - cache = cacheStream = null; - return projection; - } - - function projection (p) { - var x = p[0] * kx, y = p[1] * ky; - if (alpha) { - var t = y * ca - x * sa; - x = x * ca + y * sa; - y = t; - } - return [x + tx, y + ty]; - } - projection.invert = function(p) { - var x = p[0] - tx, y = p[1] - ty; - if (alpha) { - var t = y * ca + x * sa; - x = x * ca - y * sa; - y = t; - } - return [x / kx, y / ky]; - }; - projection.stream = function(stream) { - return cache && cacheStream === stream ? cache : cache = transform(postclip(cacheStream = stream)); - }; - projection.postclip = function(_) { - return arguments.length ? (postclip = _, x0 = y0 = x1 = y1 = null, reset()) : postclip; - }; - projection.clipExtent = function(_) { - return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity$4) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]]; - }; - projection.scale = function(_) { - return arguments.length ? (k = +_, reset()) : k; - }; - projection.translate = function(_) { - return arguments.length ? (tx = +_[0], ty = +_[1], reset()) : [tx, ty]; - }; - projection.angle = function(_) { - return arguments.length ? (alpha = _ % 360 * radians$1, sa = sin$1(alpha), ca = cos$1(alpha), reset()) : alpha * degrees$2; - }; - projection.reflectX = function(_) { - return arguments.length ? (sx = _ ? -1 : 1, reset()) : sx < 0; - }; - projection.reflectY = function(_) { - return arguments.length ? (sy = _ ? -1 : 1, reset()) : sy < 0; - }; - projection.fitExtent = function(extent, object) { - return fitExtent(projection, extent, object); - }; - projection.fitSize = function(size, object) { - return fitSize(projection, size, object); - }; - projection.fitWidth = function(width, object) { - return fitWidth(projection, width, object); - }; - projection.fitHeight = function(height, object) { - return fitHeight(projection, height, object); - }; - - return projection; -} - -function naturalEarth1Raw(lambda, phi) { - var phi2 = phi * phi, phi4 = phi2 * phi2; - return [ - lambda * (0.8707 - 0.131979 * phi2 + phi4 * (-0.013791 + phi4 * (0.003971 * phi2 - 0.001529 * phi4))), - phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - ]; -} - -naturalEarth1Raw.invert = function(x, y) { - var phi = y, i = 25, delta; - do { - var phi2 = phi * phi, phi4 = phi2 * phi2; - phi -= delta = (phi * (1.007226 + phi2 * (0.015085 + phi4 * (-0.044475 + 0.028874 * phi2 - 0.005916 * phi4))) - y) / - (1.007226 + phi2 * (0.015085 * 3 + phi4 * (-0.044475 * 7 + 0.028874 * 9 * phi2 - 0.005916 * 11 * phi4))); - } while (abs$2(delta) > epsilon$4 && --i > 0); - return [ - x / (0.8707 + (phi2 = phi * phi) * (-0.131979 + phi2 * (-0.013791 + phi2 * phi2 * phi2 * (0.003971 - 0.001529 * phi2)))), - phi - ]; -}; - -function naturalEarth1() { - return projection(naturalEarth1Raw) - .scale(175.295); -} - -function orthographicRaw(x, y) { - return [cos$1(y) * sin$1(x), sin$1(y)]; -} - -orthographicRaw.invert = azimuthalInvert(asin); - -function orthographic() { - return projection(orthographicRaw) - .scale(249.5) - .clipAngle(90 + epsilon$4); -} - -function stereographicRaw(x, y) { - var cy = cos$1(y), k = 1 + cos$1(x) * cy; - return [cy * sin$1(x) / k, sin$1(y) / k]; -} - -stereographicRaw.invert = azimuthalInvert(function(z) { - return 2 * atan(z); -}); - -function stereographic() { - return projection(stereographicRaw) - .scale(250) - .clipAngle(142); -} - -function transverseMercatorRaw(lambda, phi) { - return [log(tan((halfPi$2 + phi) / 2)), -lambda]; -} - -transverseMercatorRaw.invert = function(x, y) { - return [-y, 2 * atan(exp(x)) - halfPi$2]; -}; - -function transverseMercator() { - var m = mercatorProjection(transverseMercatorRaw), - center = m.center, - rotate = m.rotate; - - m.center = function(_) { - return arguments.length ? center([-_[1], _[0]]) : (_ = center(), [_[1], -_[0]]); - }; - - m.rotate = function(_) { - return arguments.length ? rotate([_[0], _[1], _.length > 2 ? _[2] + 90 : 90]) : (_ = rotate(), [_[0], _[1], _[2] - 90]); - }; - - return rotate([0, 0, 90]) - .scale(159.155); -} - -function defaultSeparation(a, b) { - return a.parent === b.parent ? 1 : 2; -} - -function meanX(children) { - return children.reduce(meanXReduce, 0) / children.length; -} - -function meanXReduce(x, c) { - return x + c.x; -} - -function maxY(children) { - return 1 + children.reduce(maxYReduce, 0); -} - -function maxYReduce(y, c) { - return Math.max(y, c.y); -} - -function leafLeft(node) { - var children; - while (children = node.children) node = children[0]; - return node; -} - -function leafRight(node) { - var children; - while (children = node.children) node = children[children.length - 1]; - return node; -} - -function cluster() { - var separation = defaultSeparation, - dx = 1, - dy = 1, - nodeSize = false; - - function cluster(root) { - var previousNode, - x = 0; - - // First walk, computing the initial x & y values. - root.eachAfter(function(node) { - var children = node.children; - if (children) { - node.x = meanX(children); - node.y = maxY(children); - } else { - node.x = previousNode ? x += separation(node, previousNode) : 0; - node.y = 0; - previousNode = node; - } - }); - - var left = leafLeft(root), - right = leafRight(root), - x0 = left.x - separation(left, right) / 2, - x1 = right.x + separation(right, left) / 2; - - // Second walk, normalizing x & y to the desired size. - return root.eachAfter(nodeSize ? function(node) { - node.x = (node.x - root.x) * dx; - node.y = (root.y - node.y) * dy; - } : function(node) { - node.x = (node.x - x0) / (x1 - x0) * dx; - node.y = (1 - (root.y ? node.y / root.y : 1)) * dy; - }); - } - - cluster.separation = function(x) { - return arguments.length ? (separation = x, cluster) : separation; - }; - - cluster.size = function(x) { - return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? null : [dx, dy]); - }; - - cluster.nodeSize = function(x) { - return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], cluster) : (nodeSize ? [dx, dy] : null); - }; - - return cluster; -} - -function count$1(node) { - var sum = 0, - children = node.children, - i = children && children.length; - if (!i) sum = 1; - else while (--i >= 0) sum += children[i].value; - node.value = sum; -} - -function node_count() { - return this.eachAfter(count$1); -} - -function node_each(callback, that) { - let index = -1; - for (const node of this) { - callback.call(that, node, ++index, this); - } - return this; -} - -function node_eachBefore(callback, that) { - var node = this, nodes = [node], children, i, index = -1; - while (node = nodes.pop()) { - callback.call(that, node, ++index, this); - if (children = node.children) { - for (i = children.length - 1; i >= 0; --i) { - nodes.push(children[i]); - } - } - } - return this; -} - -function node_eachAfter(callback, that) { - var node = this, nodes = [node], next = [], children, i, n, index = -1; - while (node = nodes.pop()) { - next.push(node); - if (children = node.children) { - for (i = 0, n = children.length; i < n; ++i) { - nodes.push(children[i]); - } - } - } - while (node = next.pop()) { - callback.call(that, node, ++index, this); - } - return this; -} - -function node_find(callback, that) { - let index = -1; - for (const node of this) { - if (callback.call(that, node, ++index, this)) { - return node; - } - } -} - -function node_sum(value) { - return this.eachAfter(function(node) { - var sum = +value(node.data) || 0, - children = node.children, - i = children && children.length; - while (--i >= 0) sum += children[i].value; - node.value = sum; - }); -} - -function node_sort(compare) { - return this.eachBefore(function(node) { - if (node.children) { - node.children.sort(compare); - } - }); -} - -function node_path(end) { - var start = this, - ancestor = leastCommonAncestor(start, end), - nodes = [start]; - while (start !== ancestor) { - start = start.parent; - nodes.push(start); - } - var k = nodes.length; - while (end !== ancestor) { - nodes.splice(k, 0, end); - end = end.parent; - } - return nodes; -} - -function leastCommonAncestor(a, b) { - if (a === b) return a; - var aNodes = a.ancestors(), - bNodes = b.ancestors(), - c = null; - a = aNodes.pop(); - b = bNodes.pop(); - while (a === b) { - c = a; - a = aNodes.pop(); - b = bNodes.pop(); - } - return c; -} - -function node_ancestors() { - var node = this, nodes = [node]; - while (node = node.parent) { - nodes.push(node); - } - return nodes; -} - -function node_descendants() { - return Array.from(this); -} - -function node_leaves() { - var leaves = []; - this.eachBefore(function(node) { - if (!node.children) { - leaves.push(node); - } - }); - return leaves; -} - -function node_links() { - var root = this, links = []; - root.each(function(node) { - if (node !== root) { // Don’t include the root’s parent, if any. - links.push({source: node.parent, target: node}); - } - }); - return links; -} - -function* node_iterator() { - var node = this, current, next = [node], children, i, n; - do { - current = next.reverse(), next = []; - while (node = current.pop()) { - yield node; - if (children = node.children) { - for (i = 0, n = children.length; i < n; ++i) { - next.push(children[i]); - } - } - } - } while (next.length); -} - -function hierarchy(data, children) { - if (data instanceof Map) { - data = [undefined, data]; - if (children === undefined) children = mapChildren; - } else if (children === undefined) { - children = objectChildren; - } - - var root = new Node(data), - node, - nodes = [root], - child, - childs, - i, - n; - - while (node = nodes.pop()) { - if ((childs = children(node.data)) && (n = (childs = Array.from(childs)).length)) { - node.children = childs; - for (i = n - 1; i >= 0; --i) { - nodes.push(child = childs[i] = new Node(childs[i])); - child.parent = node; - child.depth = node.depth + 1; - } - } - } - - return root.eachBefore(computeHeight); -} - -function node_copy() { - return hierarchy(this).eachBefore(copyData); -} - -function objectChildren(d) { - return d.children; -} - -function mapChildren(d) { - return Array.isArray(d) ? d[1] : null; -} - -function copyData(node) { - if (node.data.value !== undefined) node.value = node.data.value; - node.data = node.data.data; -} - -function computeHeight(node) { - var height = 0; - do node.height = height; - while ((node = node.parent) && (node.height < ++height)); -} - -function Node(data) { - this.data = data; - this.depth = - this.height = 0; - this.parent = null; -} - -Node.prototype = hierarchy.prototype = { - constructor: Node, - count: node_count, - each: node_each, - eachAfter: node_eachAfter, - eachBefore: node_eachBefore, - find: node_find, - sum: node_sum, - sort: node_sort, - path: node_path, - ancestors: node_ancestors, - descendants: node_descendants, - leaves: node_leaves, - links: node_links, - copy: node_copy, - [Symbol.iterator]: node_iterator -}; - -function array$4(x) { - return typeof x === "object" && "length" in x - ? x // Array, TypedArray, NodeList, array-like - : Array.from(x); // Map, Set, iterable, string, or anything else -} - -function shuffle$1(array) { - var m = array.length, - t, - i; - - while (m) { - i = Math.random() * m-- | 0; - t = array[m]; - array[m] = array[i]; - array[i] = t; - } - - return array; -} - -function enclose(circles) { - var i = 0, n = (circles = shuffle$1(Array.from(circles))).length, B = [], p, e; - - while (i < n) { - p = circles[i]; - if (e && enclosesWeak(e, p)) ++i; - else e = encloseBasis(B = extendBasis(B, p)), i = 0; - } - - return e; -} - -function extendBasis(B, p) { - var i, j; - - if (enclosesWeakAll(p, B)) return [p]; - - // If we get here then B must have at least one element. - for (i = 0; i < B.length; ++i) { - if (enclosesNot(p, B[i]) - && enclosesWeakAll(encloseBasis2(B[i], p), B)) { - return [B[i], p]; - } - } - - // If we get here then B must have at least two elements. - for (i = 0; i < B.length - 1; ++i) { - for (j = i + 1; j < B.length; ++j) { - if (enclosesNot(encloseBasis2(B[i], B[j]), p) - && enclosesNot(encloseBasis2(B[i], p), B[j]) - && enclosesNot(encloseBasis2(B[j], p), B[i]) - && enclosesWeakAll(encloseBasis3(B[i], B[j], p), B)) { - return [B[i], B[j], p]; - } - } - } - - // If we get here then something is very wrong. - throw new Error; -} - -function enclosesNot(a, b) { - var dr = a.r - b.r, dx = b.x - a.x, dy = b.y - a.y; - return dr < 0 || dr * dr < dx * dx + dy * dy; -} - -function enclosesWeak(a, b) { - var dr = a.r - b.r + Math.max(a.r, b.r, 1) * 1e-9, dx = b.x - a.x, dy = b.y - a.y; - return dr > 0 && dr * dr > dx * dx + dy * dy; -} - -function enclosesWeakAll(a, B) { - for (var i = 0; i < B.length; ++i) { - if (!enclosesWeak(a, B[i])) { - return false; - } - } - return true; -} - -function encloseBasis(B) { - switch (B.length) { - case 1: return encloseBasis1(B[0]); - case 2: return encloseBasis2(B[0], B[1]); - case 3: return encloseBasis3(B[0], B[1], B[2]); - } -} - -function encloseBasis1(a) { - return { - x: a.x, - y: a.y, - r: a.r - }; -} - -function encloseBasis2(a, b) { - var x1 = a.x, y1 = a.y, r1 = a.r, - x2 = b.x, y2 = b.y, r2 = b.r, - x21 = x2 - x1, y21 = y2 - y1, r21 = r2 - r1, - l = Math.sqrt(x21 * x21 + y21 * y21); - return { - x: (x1 + x2 + x21 / l * r21) / 2, - y: (y1 + y2 + y21 / l * r21) / 2, - r: (l + r1 + r2) / 2 - }; -} - -function encloseBasis3(a, b, c) { - var x1 = a.x, y1 = a.y, r1 = a.r, - x2 = b.x, y2 = b.y, r2 = b.r, - x3 = c.x, y3 = c.y, r3 = c.r, - a2 = x1 - x2, - a3 = x1 - x3, - b2 = y1 - y2, - b3 = y1 - y3, - c2 = r2 - r1, - c3 = r3 - r1, - d1 = x1 * x1 + y1 * y1 - r1 * r1, - d2 = d1 - x2 * x2 - y2 * y2 + r2 * r2, - d3 = d1 - x3 * x3 - y3 * y3 + r3 * r3, - ab = a3 * b2 - a2 * b3, - xa = (b2 * d3 - b3 * d2) / (ab * 2) - x1, - xb = (b3 * c2 - b2 * c3) / ab, - ya = (a3 * d2 - a2 * d3) / (ab * 2) - y1, - yb = (a2 * c3 - a3 * c2) / ab, - A = xb * xb + yb * yb - 1, - B = 2 * (r1 + xa * xb + ya * yb), - C = xa * xa + ya * ya - r1 * r1, - r = -(A ? (B + Math.sqrt(B * B - 4 * A * C)) / (2 * A) : C / B); - return { - x: x1 + xa + xb * r, - y: y1 + ya + yb * r, - r: r - }; -} - -function place(b, a, c) { - var dx = b.x - a.x, x, a2, - dy = b.y - a.y, y, b2, - d2 = dx * dx + dy * dy; - if (d2) { - a2 = a.r + c.r, a2 *= a2; - b2 = b.r + c.r, b2 *= b2; - if (a2 > b2) { - x = (d2 + b2 - a2) / (2 * d2); - y = Math.sqrt(Math.max(0, b2 / d2 - x * x)); - c.x = b.x - x * dx - y * dy; - c.y = b.y - x * dy + y * dx; - } else { - x = (d2 + a2 - b2) / (2 * d2); - y = Math.sqrt(Math.max(0, a2 / d2 - x * x)); - c.x = a.x + x * dx - y * dy; - c.y = a.y + x * dy + y * dx; - } - } else { - c.x = a.x + c.r; - c.y = a.y; - } -} - -function intersects(a, b) { - var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y; - return dr > 0 && dr * dr > dx * dx + dy * dy; -} - -function score(node) { - var a = node._, - b = node.next._, - ab = a.r + b.r, - dx = (a.x * b.r + b.x * a.r) / ab, - dy = (a.y * b.r + b.y * a.r) / ab; - return dx * dx + dy * dy; -} - -function Node$1(circle) { - this._ = circle; - this.next = null; - this.previous = null; -} - -function packEnclose(circles) { - if (!(n = (circles = array$4(circles)).length)) return 0; - - var a, b, c, n, aa, ca, i, j, k, sj, sk; - - // Place the first circle. - a = circles[0], a.x = 0, a.y = 0; - if (!(n > 1)) return a.r; - - // Place the second circle. - b = circles[1], a.x = -b.r, b.x = a.r, b.y = 0; - if (!(n > 2)) return a.r + b.r; - - // Place the third circle. - place(b, a, c = circles[2]); - - // Initialize the front-chain using the first three circles a, b and c. - a = new Node$1(a), b = new Node$1(b), c = new Node$1(c); - a.next = c.previous = b; - b.next = a.previous = c; - c.next = b.previous = a; - - // Attempt to place each remaining circle… - pack: for (i = 3; i < n; ++i) { - place(a._, b._, c = circles[i]), c = new Node$1(c); - - // Find the closest intersecting circle on the front-chain, if any. - // “Closeness†is determined by linear distance along the front-chain. - // “Ahead†or “behind†is likewise determined by linear distance. - j = b.next, k = a.previous, sj = b._.r, sk = a._.r; - do { - if (sj <= sk) { - if (intersects(j._, c._)) { - b = j, a.next = b, b.previous = a, --i; - continue pack; - } - sj += j._.r, j = j.next; - } else { - if (intersects(k._, c._)) { - a = k, a.next = b, b.previous = a, --i; - continue pack; - } - sk += k._.r, k = k.previous; - } - } while (j !== k.next); - - // Success! Insert the new circle c between a and b. - c.previous = a, c.next = b, a.next = b.previous = b = c; - - // Compute the new closest circle pair to the centroid. - aa = score(a); - while ((c = c.next) !== b) { - if ((ca = score(c)) < aa) { - a = c, aa = ca; - } - } - b = a.next; - } - - // Compute the enclosing circle of the front chain. - a = [b._], c = b; while ((c = c.next) !== b) a.push(c._); c = enclose(a); - - // Translate the circles to put the enclosing circle around the origin. - for (i = 0; i < n; ++i) a = circles[i], a.x -= c.x, a.y -= c.y; - - return c.r; -} - -function siblings(circles) { - packEnclose(circles); - return circles; -} - -function optional(f) { - return f == null ? null : required(f); -} - -function required(f) { - if (typeof f !== "function") throw new Error; - return f; -} - -function constantZero() { - return 0; -} - -function constant$9(x) { - return function() { - return x; - }; -} - -function defaultRadius$1(d) { - return Math.sqrt(d.value); -} - -function index$3() { - var radius = null, - dx = 1, - dy = 1, - padding = constantZero; - - function pack(root) { - root.x = dx / 2, root.y = dy / 2; - if (radius) { - root.eachBefore(radiusLeaf(radius)) - .eachAfter(packChildren(padding, 0.5)) - .eachBefore(translateChild(1)); - } else { - root.eachBefore(radiusLeaf(defaultRadius$1)) - .eachAfter(packChildren(constantZero, 1)) - .eachAfter(packChildren(padding, root.r / Math.min(dx, dy))) - .eachBefore(translateChild(Math.min(dx, dy) / (2 * root.r))); - } - return root; - } - - pack.radius = function(x) { - return arguments.length ? (radius = optional(x), pack) : radius; - }; - - pack.size = function(x) { - return arguments.length ? (dx = +x[0], dy = +x[1], pack) : [dx, dy]; - }; - - pack.padding = function(x) { - return arguments.length ? (padding = typeof x === "function" ? x : constant$9(+x), pack) : padding; - }; - - return pack; -} - -function radiusLeaf(radius) { - return function(node) { - if (!node.children) { - node.r = Math.max(0, +radius(node) || 0); - } - }; -} - -function packChildren(padding, k) { - return function(node) { - if (children = node.children) { - var children, - i, - n = children.length, - r = padding(node) * k || 0, - e; - - if (r) for (i = 0; i < n; ++i) children[i].r += r; - e = packEnclose(children); - if (r) for (i = 0; i < n; ++i) children[i].r -= r; - node.r = e + r; - } - }; -} - -function translateChild(k) { - return function(node) { - var parent = node.parent; - node.r *= k; - if (parent) { - node.x = parent.x + k * node.x; - node.y = parent.y + k * node.y; - } - }; -} - -function roundNode(node) { - node.x0 = Math.round(node.x0); - node.y0 = Math.round(node.y0); - node.x1 = Math.round(node.x1); - node.y1 = Math.round(node.y1); -} - -function treemapDice(parent, x0, y0, x1, y1) { - var nodes = parent.children, - node, - i = -1, - n = nodes.length, - k = parent.value && (x1 - x0) / parent.value; - - while (++i < n) { - node = nodes[i], node.y0 = y0, node.y1 = y1; - node.x0 = x0, node.x1 = x0 += node.value * k; - } -} - -function partition() { - var dx = 1, - dy = 1, - padding = 0, - round = false; - - function partition(root) { - var n = root.height + 1; - root.x0 = - root.y0 = padding; - root.x1 = dx; - root.y1 = dy / n; - root.eachBefore(positionNode(dy, n)); - if (round) root.eachBefore(roundNode); - return root; - } - - function positionNode(dy, n) { - return function(node) { - if (node.children) { - treemapDice(node, node.x0, dy * (node.depth + 1) / n, node.x1, dy * (node.depth + 2) / n); - } - var x0 = node.x0, - y0 = node.y0, - x1 = node.x1 - padding, - y1 = node.y1 - padding; - if (x1 < x0) x0 = x1 = (x0 + x1) / 2; - if (y1 < y0) y0 = y1 = (y0 + y1) / 2; - node.x0 = x0; - node.y0 = y0; - node.x1 = x1; - node.y1 = y1; - }; - } - - partition.round = function(x) { - return arguments.length ? (round = !!x, partition) : round; - }; - - partition.size = function(x) { - return arguments.length ? (dx = +x[0], dy = +x[1], partition) : [dx, dy]; - }; - - partition.padding = function(x) { - return arguments.length ? (padding = +x, partition) : padding; - }; - - return partition; -} - -var preroot = {depth: -1}, - ambiguous = {}; - -function defaultId(d) { - return d.id; -} - -function defaultParentId(d) { - return d.parentId; -} - -function stratify() { - var id = defaultId, - parentId = defaultParentId; - - function stratify(data) { - var nodes = Array.from(data), - n = nodes.length, - d, - i, - root, - parent, - node, - nodeId, - nodeKey, - nodeByKey = new Map; - - for (i = 0; i < n; ++i) { - d = nodes[i], node = nodes[i] = new Node(d); - if ((nodeId = id(d, i, data)) != null && (nodeId += "")) { - nodeKey = node.id = nodeId; - nodeByKey.set(nodeKey, nodeByKey.has(nodeKey) ? ambiguous : node); - } - if ((nodeId = parentId(d, i, data)) != null && (nodeId += "")) { - node.parent = nodeId; - } - } - - for (i = 0; i < n; ++i) { - node = nodes[i]; - if (nodeId = node.parent) { - parent = nodeByKey.get(nodeId); - if (!parent) throw new Error("missing: " + nodeId); - if (parent === ambiguous) throw new Error("ambiguous: " + nodeId); - if (parent.children) parent.children.push(node); - else parent.children = [node]; - node.parent = parent; - } else { - if (root) throw new Error("multiple roots"); - root = node; - } - } - - if (!root) throw new Error("no root"); - root.parent = preroot; - root.eachBefore(function(node) { node.depth = node.parent.depth + 1; --n; }).eachBefore(computeHeight); - root.parent = null; - if (n > 0) throw new Error("cycle"); - - return root; - } - - stratify.id = function(x) { - return arguments.length ? (id = required(x), stratify) : id; - }; - - stratify.parentId = function(x) { - return arguments.length ? (parentId = required(x), stratify) : parentId; - }; - - return stratify; -} - -function defaultSeparation$1(a, b) { - return a.parent === b.parent ? 1 : 2; -} - -// function radialSeparation(a, b) { -// return (a.parent === b.parent ? 1 : 2) / a.depth; -// } - -// This function is used to traverse the left contour of a subtree (or -// subforest). It returns the successor of v on this contour. This successor is -// either given by the leftmost child of v or by the thread of v. The function -// returns null if and only if v is on the highest level of its subtree. -function nextLeft(v) { - var children = v.children; - return children ? children[0] : v.t; -} - -// This function works analogously to nextLeft. -function nextRight(v) { - var children = v.children; - return children ? children[children.length - 1] : v.t; -} - -// Shifts the current subtree rooted at w+. This is done by increasing -// prelim(w+) and mod(w+) by shift. -function moveSubtree(wm, wp, shift) { - var change = shift / (wp.i - wm.i); - wp.c -= change; - wp.s += shift; - wm.c += change; - wp.z += shift; - wp.m += shift; -} - -// All other shifts, applied to the smaller subtrees between w- and w+, are -// performed by this function. To prepare the shifts, we have to adjust -// change(w+), shift(w+), and change(w-). -function executeShifts(v) { - var shift = 0, - change = 0, - children = v.children, - i = children.length, - w; - while (--i >= 0) { - w = children[i]; - w.z += shift; - w.m += shift; - shift += w.s + (change += w.c); - } -} - -// If vi-’s ancestor is a sibling of v, returns vi-’s ancestor. Otherwise, -// returns the specified (default) ancestor. -function nextAncestor(vim, v, ancestor) { - return vim.a.parent === v.parent ? vim.a : ancestor; -} - -function TreeNode(node, i) { - this._ = node; - this.parent = null; - this.children = null; - this.A = null; // default ancestor - this.a = this; // ancestor - this.z = 0; // prelim - this.m = 0; // mod - this.c = 0; // change - this.s = 0; // shift - this.t = null; // thread - this.i = i; // number -} - -TreeNode.prototype = Object.create(Node.prototype); - -function treeRoot(root) { - var tree = new TreeNode(root, 0), - node, - nodes = [tree], - child, - children, - i, - n; - - while (node = nodes.pop()) { - if (children = node._.children) { - node.children = new Array(n = children.length); - for (i = n - 1; i >= 0; --i) { - nodes.push(child = node.children[i] = new TreeNode(children[i], i)); - child.parent = node; - } - } - } - - (tree.parent = new TreeNode(null, 0)).children = [tree]; - return tree; -} - -// Node-link tree diagram using the Reingold-Tilford "tidy" algorithm -function tree() { - var separation = defaultSeparation$1, - dx = 1, - dy = 1, - nodeSize = null; - - function tree(root) { - var t = treeRoot(root); - - // Compute the layout using Buchheim et al.’s algorithm. - t.eachAfter(firstWalk), t.parent.m = -t.z; - t.eachBefore(secondWalk); - - // If a fixed node size is specified, scale x and y. - if (nodeSize) root.eachBefore(sizeNode); - - // If a fixed tree size is specified, scale x and y based on the extent. - // Compute the left-most, right-most, and depth-most nodes for extents. - else { - var left = root, - right = root, - bottom = root; - root.eachBefore(function(node) { - if (node.x < left.x) left = node; - if (node.x > right.x) right = node; - if (node.depth > bottom.depth) bottom = node; - }); - var s = left === right ? 1 : separation(left, right) / 2, - tx = s - left.x, - kx = dx / (right.x + s + tx), - ky = dy / (bottom.depth || 1); - root.eachBefore(function(node) { - node.x = (node.x + tx) * kx; - node.y = node.depth * ky; - }); - } - - return root; - } - - // Computes a preliminary x-coordinate for v. Before that, FIRST WALK is - // applied recursively to the children of v, as well as the function - // APPORTION. After spacing out the children by calling EXECUTE SHIFTS, the - // node v is placed to the midpoint of its outermost children. - function firstWalk(v) { - var children = v.children, - siblings = v.parent.children, - w = v.i ? siblings[v.i - 1] : null; - if (children) { - executeShifts(v); - var midpoint = (children[0].z + children[children.length - 1].z) / 2; - if (w) { - v.z = w.z + separation(v._, w._); - v.m = v.z - midpoint; - } else { - v.z = midpoint; - } - } else if (w) { - v.z = w.z + separation(v._, w._); - } - v.parent.A = apportion(v, w, v.parent.A || siblings[0]); - } - - // Computes all real x-coordinates by summing up the modifiers recursively. - function secondWalk(v) { - v._.x = v.z + v.parent.m; - v.m += v.parent.m; - } - - // The core of the algorithm. Here, a new subtree is combined with the - // previous subtrees. Threads are used to traverse the inside and outside - // contours of the left and right subtree up to the highest common level. The - // vertices used for the traversals are vi+, vi-, vo-, and vo+, where the - // superscript o means outside and i means inside, the subscript - means left - // subtree and + means right subtree. For summing up the modifiers along the - // contour, we use respective variables si+, si-, so-, and so+. Whenever two - // nodes of the inside contours conflict, we compute the left one of the - // greatest uncommon ancestors using the function ANCESTOR and call MOVE - // SUBTREE to shift the subtree and prepare the shifts of smaller subtrees. - // Finally, we add a new thread (if necessary). - function apportion(v, w, ancestor) { - if (w) { - var vip = v, - vop = v, - vim = w, - vom = vip.parent.children[0], - sip = vip.m, - sop = vop.m, - sim = vim.m, - som = vom.m, - shift; - while (vim = nextRight(vim), vip = nextLeft(vip), vim && vip) { - vom = nextLeft(vom); - vop = nextRight(vop); - vop.a = v; - shift = vim.z + sim - vip.z - sip + separation(vim._, vip._); - if (shift > 0) { - moveSubtree(nextAncestor(vim, v, ancestor), v, shift); - sip += shift; - sop += shift; - } - sim += vim.m; - sip += vip.m; - som += vom.m; - sop += vop.m; - } - if (vim && !nextRight(vop)) { - vop.t = vim; - vop.m += sim - sop; - } - if (vip && !nextLeft(vom)) { - vom.t = vip; - vom.m += sip - som; - ancestor = v; - } - } - return ancestor; - } - - function sizeNode(node) { - node.x *= dx; - node.y = node.depth * dy; - } - - tree.separation = function(x) { - return arguments.length ? (separation = x, tree) : separation; - }; - - tree.size = function(x) { - return arguments.length ? (nodeSize = false, dx = +x[0], dy = +x[1], tree) : (nodeSize ? null : [dx, dy]); - }; - - tree.nodeSize = function(x) { - return arguments.length ? (nodeSize = true, dx = +x[0], dy = +x[1], tree) : (nodeSize ? [dx, dy] : null); - }; - - return tree; -} - -function treemapSlice(parent, x0, y0, x1, y1) { - var nodes = parent.children, - node, - i = -1, - n = nodes.length, - k = parent.value && (y1 - y0) / parent.value; - - while (++i < n) { - node = nodes[i], node.x0 = x0, node.x1 = x1; - node.y0 = y0, node.y1 = y0 += node.value * k; - } -} - -var phi = (1 + Math.sqrt(5)) / 2; - -function squarifyRatio(ratio, parent, x0, y0, x1, y1) { - var rows = [], - nodes = parent.children, - row, - nodeValue, - i0 = 0, - i1 = 0, - n = nodes.length, - dx, dy, - value = parent.value, - sumValue, - minValue, - maxValue, - newRatio, - minRatio, - alpha, - beta; - - while (i0 < n) { - dx = x1 - x0, dy = y1 - y0; - - // Find the next non-empty node. - do sumValue = nodes[i1++].value; while (!sumValue && i1 < n); - minValue = maxValue = sumValue; - alpha = Math.max(dy / dx, dx / dy) / (value * ratio); - beta = sumValue * sumValue * alpha; - minRatio = Math.max(maxValue / beta, beta / minValue); - - // Keep adding nodes while the aspect ratio maintains or improves. - for (; i1 < n; ++i1) { - sumValue += nodeValue = nodes[i1].value; - if (nodeValue < minValue) minValue = nodeValue; - if (nodeValue > maxValue) maxValue = nodeValue; - beta = sumValue * sumValue * alpha; - newRatio = Math.max(maxValue / beta, beta / minValue); - if (newRatio > minRatio) { sumValue -= nodeValue; break; } - minRatio = newRatio; - } - - // Position and record the row orientation. - rows.push(row = {value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1)}); - if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1); - else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1); - value -= sumValue, i0 = i1; - } - - return rows; -} - -var squarify = (function custom(ratio) { - - function squarify(parent, x0, y0, x1, y1) { - squarifyRatio(ratio, parent, x0, y0, x1, y1); - } - - squarify.ratio = function(x) { - return custom((x = +x) > 1 ? x : 1); - }; - - return squarify; -})(phi); - -function index$4() { - var tile = squarify, - round = false, - dx = 1, - dy = 1, - paddingStack = [0], - paddingInner = constantZero, - paddingTop = constantZero, - paddingRight = constantZero, - paddingBottom = constantZero, - paddingLeft = constantZero; - - function treemap(root) { - root.x0 = - root.y0 = 0; - root.x1 = dx; - root.y1 = dy; - root.eachBefore(positionNode); - paddingStack = [0]; - if (round) root.eachBefore(roundNode); - return root; - } - - function positionNode(node) { - var p = paddingStack[node.depth], - x0 = node.x0 + p, - y0 = node.y0 + p, - x1 = node.x1 - p, - y1 = node.y1 - p; - if (x1 < x0) x0 = x1 = (x0 + x1) / 2; - if (y1 < y0) y0 = y1 = (y0 + y1) / 2; - node.x0 = x0; - node.y0 = y0; - node.x1 = x1; - node.y1 = y1; - if (node.children) { - p = paddingStack[node.depth + 1] = paddingInner(node) / 2; - x0 += paddingLeft(node) - p; - y0 += paddingTop(node) - p; - x1 -= paddingRight(node) - p; - y1 -= paddingBottom(node) - p; - if (x1 < x0) x0 = x1 = (x0 + x1) / 2; - if (y1 < y0) y0 = y1 = (y0 + y1) / 2; - tile(node, x0, y0, x1, y1); - } - } - - treemap.round = function(x) { - return arguments.length ? (round = !!x, treemap) : round; - }; - - treemap.size = function(x) { - return arguments.length ? (dx = +x[0], dy = +x[1], treemap) : [dx, dy]; - }; - - treemap.tile = function(x) { - return arguments.length ? (tile = required(x), treemap) : tile; - }; - - treemap.padding = function(x) { - return arguments.length ? treemap.paddingInner(x).paddingOuter(x) : treemap.paddingInner(); - }; - - treemap.paddingInner = function(x) { - return arguments.length ? (paddingInner = typeof x === "function" ? x : constant$9(+x), treemap) : paddingInner; - }; - - treemap.paddingOuter = function(x) { - return arguments.length ? treemap.paddingTop(x).paddingRight(x).paddingBottom(x).paddingLeft(x) : treemap.paddingTop(); - }; - - treemap.paddingTop = function(x) { - return arguments.length ? (paddingTop = typeof x === "function" ? x : constant$9(+x), treemap) : paddingTop; - }; - - treemap.paddingRight = function(x) { - return arguments.length ? (paddingRight = typeof x === "function" ? x : constant$9(+x), treemap) : paddingRight; - }; - - treemap.paddingBottom = function(x) { - return arguments.length ? (paddingBottom = typeof x === "function" ? x : constant$9(+x), treemap) : paddingBottom; - }; - - treemap.paddingLeft = function(x) { - return arguments.length ? (paddingLeft = typeof x === "function" ? x : constant$9(+x), treemap) : paddingLeft; - }; - - return treemap; -} - -function binary(parent, x0, y0, x1, y1) { - var nodes = parent.children, - i, n = nodes.length, - sum, sums = new Array(n + 1); - - for (sums[0] = sum = i = 0; i < n; ++i) { - sums[i + 1] = sum += nodes[i].value; - } - - partition(0, n, parent.value, x0, y0, x1, y1); - - function partition(i, j, value, x0, y0, x1, y1) { - if (i >= j - 1) { - var node = nodes[i]; - node.x0 = x0, node.y0 = y0; - node.x1 = x1, node.y1 = y1; - return; - } - - var valueOffset = sums[i], - valueTarget = (value / 2) + valueOffset, - k = i + 1, - hi = j - 1; - - while (k < hi) { - var mid = k + hi >>> 1; - if (sums[mid] < valueTarget) k = mid + 1; - else hi = mid; - } - - if ((valueTarget - sums[k - 1]) < (sums[k] - valueTarget) && i + 1 < k) --k; - - var valueLeft = sums[k] - valueOffset, - valueRight = value - valueLeft; - - if ((x1 - x0) > (y1 - y0)) { - var xk = value ? (x0 * valueRight + x1 * valueLeft) / value : x1; - partition(i, k, valueLeft, x0, y0, xk, y1); - partition(k, j, valueRight, xk, y0, x1, y1); - } else { - var yk = value ? (y0 * valueRight + y1 * valueLeft) / value : y1; - partition(i, k, valueLeft, x0, y0, x1, yk); - partition(k, j, valueRight, x0, yk, x1, y1); - } - } -} - -function sliceDice(parent, x0, y0, x1, y1) { - (parent.depth & 1 ? treemapSlice : treemapDice)(parent, x0, y0, x1, y1); -} - -var resquarify = (function custom(ratio) { - - function resquarify(parent, x0, y0, x1, y1) { - if ((rows = parent._squarify) && (rows.ratio === ratio)) { - var rows, - row, - nodes, - i, - j = -1, - n, - m = rows.length, - value = parent.value; - - while (++j < m) { - row = rows[j], nodes = row.children; - for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value; - if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += (y1 - y0) * row.value / value : y1); - else treemapSlice(row, x0, y0, value ? x0 += (x1 - x0) * row.value / value : x1, y1); - value -= row.value; - } - } else { - parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1); - rows.ratio = ratio; - } - } - - resquarify.ratio = function(x) { - return custom((x = +x) > 1 ? x : 1); - }; - - return resquarify; -})(phi); - -function area$2(polygon) { - var i = -1, - n = polygon.length, - a, - b = polygon[n - 1], - area = 0; - - while (++i < n) { - a = b; - b = polygon[i]; - area += a[1] * b[0] - a[0] * b[1]; - } - - return area / 2; -} - -function centroid$1(polygon) { - var i = -1, - n = polygon.length, - x = 0, - y = 0, - a, - b = polygon[n - 1], - c, - k = 0; - - while (++i < n) { - a = b; - b = polygon[i]; - k += c = a[0] * b[1] - b[0] * a[1]; - x += (a[0] + b[0]) * c; - y += (a[1] + b[1]) * c; - } - - return k *= 3, [x / k, y / k]; -} - -// Returns the 2D cross product of AB and AC vectors, i.e., the z-component of -// the 3D cross product in a quadrant I Cartesian coordinate system (+x is -// right, +y is up). Returns a positive value if ABC is counter-clockwise, -// negative if clockwise, and zero if the points are collinear. -function cross$1(a, b, c) { - return (b[0] - a[0]) * (c[1] - a[1]) - (b[1] - a[1]) * (c[0] - a[0]); -} - -function lexicographicOrder(a, b) { - return a[0] - b[0] || a[1] - b[1]; -} - -// Computes the upper convex hull per the monotone chain algorithm. -// Assumes points.length >= 3, is sorted by x, unique in y. -// Returns an array of indices into points in left-to-right order. -function computeUpperHullIndexes(points) { - const n = points.length, - indexes = [0, 1]; - let size = 2, i; - - for (i = 2; i < n; ++i) { - while (size > 1 && cross$1(points[indexes[size - 2]], points[indexes[size - 1]], points[i]) <= 0) --size; - indexes[size++] = i; - } - - return indexes.slice(0, size); // remove popped points -} - -function hull(points) { - if ((n = points.length) < 3) return null; - - var i, - n, - sortedPoints = new Array(n), - flippedPoints = new Array(n); - - for (i = 0; i < n; ++i) sortedPoints[i] = [+points[i][0], +points[i][1], i]; - sortedPoints.sort(lexicographicOrder); - for (i = 0; i < n; ++i) flippedPoints[i] = [sortedPoints[i][0], -sortedPoints[i][1]]; - - var upperIndexes = computeUpperHullIndexes(sortedPoints), - lowerIndexes = computeUpperHullIndexes(flippedPoints); - - // Construct the hull polygon, removing possible duplicate endpoints. - var skipLeft = lowerIndexes[0] === upperIndexes[0], - skipRight = lowerIndexes[lowerIndexes.length - 1] === upperIndexes[upperIndexes.length - 1], - hull = []; - - // Add upper hull in right-to-l order. - // Then add lower hull in left-to-right order. - for (i = upperIndexes.length - 1; i >= 0; --i) hull.push(points[sortedPoints[upperIndexes[i]][2]]); - for (i = +skipLeft; i < lowerIndexes.length - skipRight; ++i) hull.push(points[sortedPoints[lowerIndexes[i]][2]]); - - return hull; -} - -function contains$2(polygon, point) { - var n = polygon.length, - p = polygon[n - 1], - x = point[0], y = point[1], - x0 = p[0], y0 = p[1], - x1, y1, - inside = false; - - for (var i = 0; i < n; ++i) { - p = polygon[i], x1 = p[0], y1 = p[1]; - if (((y1 > y) !== (y0 > y)) && (x < (x0 - x1) * (y - y1) / (y0 - y1) + x1)) inside = !inside; - x0 = x1, y0 = y1; - } - - return inside; -} - -function length$3(polygon) { - var i = -1, - n = polygon.length, - b = polygon[n - 1], - xa, - ya, - xb = b[0], - yb = b[1], - perimeter = 0; - - while (++i < n) { - xa = xb; - ya = yb; - b = polygon[i]; - xb = b[0]; - yb = b[1]; - xa -= xb; - ya -= yb; - perimeter += Math.hypot(xa, ya); - } - - return perimeter; -} - -var defaultSource$1 = Math.random; - -var uniform = (function sourceRandomUniform(source) { - function randomUniform(min, max) { - min = min == null ? 0 : +min; - max = max == null ? 1 : +max; - if (arguments.length === 1) max = min, min = 0; - else max -= min; - return function() { - return source() * max + min; - }; - } - - randomUniform.source = sourceRandomUniform; - - return randomUniform; -})(defaultSource$1); - -var int = (function sourceRandomInt(source) { - function randomInt(min, max) { - if (arguments.length < 2) max = min, min = 0; - min = Math.floor(min); - max = Math.floor(max) - min; - return function() { - return Math.floor(source() * max + min); - }; - } - - randomInt.source = sourceRandomInt; - - return randomInt; -})(defaultSource$1); - -var normal = (function sourceRandomNormal(source) { - function randomNormal(mu, sigma) { - var x, r; - mu = mu == null ? 0 : +mu; - sigma = sigma == null ? 1 : +sigma; - return function() { - var y; - - // If available, use the second previously-generated uniform random. - if (x != null) y = x, x = null; - - // Otherwise, generate a new x and y. - else do { - x = source() * 2 - 1; - y = source() * 2 - 1; - r = x * x + y * y; - } while (!r || r > 1); - - return mu + sigma * y * Math.sqrt(-2 * Math.log(r) / r); - }; - } - - randomNormal.source = sourceRandomNormal; - - return randomNormal; -})(defaultSource$1); - -var logNormal = (function sourceRandomLogNormal(source) { - var N = normal.source(source); - - function randomLogNormal() { - var randomNormal = N.apply(this, arguments); - return function() { - return Math.exp(randomNormal()); - }; - } - - randomLogNormal.source = sourceRandomLogNormal; - - return randomLogNormal; -})(defaultSource$1); - -var irwinHall = (function sourceRandomIrwinHall(source) { - function randomIrwinHall(n) { - if ((n = +n) <= 0) return () => 0; - return function() { - for (var sum = 0, i = n; i > 1; --i) sum += source(); - return sum + i * source(); - }; - } - - randomIrwinHall.source = sourceRandomIrwinHall; - - return randomIrwinHall; -})(defaultSource$1); - -var bates = (function sourceRandomBates(source) { - var I = irwinHall.source(source); - - function randomBates(n) { - // use limiting distribution at n === 0 - if ((n = +n) === 0) return source; - var randomIrwinHall = I(n); - return function() { - return randomIrwinHall() / n; - }; - } - - randomBates.source = sourceRandomBates; - - return randomBates; -})(defaultSource$1); - -var exponential$1 = (function sourceRandomExponential(source) { - function randomExponential(lambda) { - return function() { - return -Math.log1p(-source()) / lambda; - }; - } - - randomExponential.source = sourceRandomExponential; - - return randomExponential; -})(defaultSource$1); - -var pareto = (function sourceRandomPareto(source) { - function randomPareto(alpha) { - if ((alpha = +alpha) < 0) throw new RangeError("invalid alpha"); - alpha = 1 / -alpha; - return function() { - return Math.pow(1 - source(), alpha); - }; - } - - randomPareto.source = sourceRandomPareto; - - return randomPareto; -})(defaultSource$1); - -var bernoulli = (function sourceRandomBernoulli(source) { - function randomBernoulli(p) { - if ((p = +p) < 0 || p > 1) throw new RangeError("invalid p"); - return function() { - return Math.floor(source() + p); - }; - } - - randomBernoulli.source = sourceRandomBernoulli; - - return randomBernoulli; -})(defaultSource$1); - -var geometric = (function sourceRandomGeometric(source) { - function randomGeometric(p) { - if ((p = +p) < 0 || p > 1) throw new RangeError("invalid p"); - if (p === 0) return () => Infinity; - if (p === 1) return () => 1; - p = Math.log1p(-p); - return function() { - return 1 + Math.floor(Math.log1p(-source()) / p); - }; - } - - randomGeometric.source = sourceRandomGeometric; - - return randomGeometric; -})(defaultSource$1); - -var gamma$1 = (function sourceRandomGamma(source) { - var randomNormal = normal.source(source)(); - - function randomGamma(k, theta) { - if ((k = +k) < 0) throw new RangeError("invalid k"); - // degenerate distribution if k === 0 - if (k === 0) return () => 0; - theta = theta == null ? 1 : +theta; - // exponential distribution if k === 1 - if (k === 1) return () => -Math.log1p(-source()) * theta; - - var d = (k < 1 ? k + 1 : k) - 1 / 3, - c = 1 / (3 * Math.sqrt(d)), - multiplier = k < 1 ? () => Math.pow(source(), 1 / k) : () => 1; - return function() { - do { - do { - var x = randomNormal(), - v = 1 + c * x; - } while (v <= 0); - v *= v * v; - var u = 1 - source(); - } while (u >= 1 - 0.0331 * x * x * x * x && Math.log(u) >= 0.5 * x * x + d * (1 - v + Math.log(v))); - return d * v * multiplier() * theta; - }; - } - - randomGamma.source = sourceRandomGamma; - - return randomGamma; -})(defaultSource$1); - -var beta = (function sourceRandomBeta(source) { - var G = gamma$1.source(source); - - function randomBeta(alpha, beta) { - var X = G(alpha), - Y = G(beta); - return function() { - var x = X(); - return x === 0 ? 0 : x / (x + Y()); - }; - } - - randomBeta.source = sourceRandomBeta; - - return randomBeta; -})(defaultSource$1); - -var binomial = (function sourceRandomBinomial(source) { - var G = geometric.source(source), - B = beta.source(source); - - function randomBinomial(n, p) { - n = +n; - if ((p = +p) >= 1) return () => n; - if (p <= 0) return () => 0; - return function() { - var acc = 0, nn = n, pp = p; - while (nn * pp > 16 && nn * (1 - pp) > 16) { - var i = Math.floor((nn + 1) * pp), - y = B(i, nn - i + 1)(); - if (y <= pp) { - acc += i; - nn -= i; - pp = (pp - y) / (1 - y); - } else { - nn = i - 1; - pp /= y; - } - } - var sign = pp < 0.5, - pFinal = sign ? pp : 1 - pp, - g = G(pFinal); - for (var s = g(), k = 0; s <= nn; ++k) s += g(); - return acc + (sign ? k : nn - k); - }; - } - - randomBinomial.source = sourceRandomBinomial; - - return randomBinomial; -})(defaultSource$1); - -var weibull = (function sourceRandomWeibull(source) { - function randomWeibull(k, a, b) { - var outerFunc; - if ((k = +k) === 0) { - outerFunc = x => -Math.log(x); - } else { - k = 1 / k; - outerFunc = x => Math.pow(x, k); - } - a = a == null ? 0 : +a; - b = b == null ? 1 : +b; - return function() { - return a + b * outerFunc(-Math.log1p(-source())); - }; - } - - randomWeibull.source = sourceRandomWeibull; - - return randomWeibull; -})(defaultSource$1); - -var cauchy = (function sourceRandomCauchy(source) { - function randomCauchy(a, b) { - a = a == null ? 0 : +a; - b = b == null ? 1 : +b; - return function() { - return a + b * Math.tan(Math.PI * source()); - }; - } - - randomCauchy.source = sourceRandomCauchy; - - return randomCauchy; -})(defaultSource$1); - -var logistic = (function sourceRandomLogistic(source) { - function randomLogistic(a, b) { - a = a == null ? 0 : +a; - b = b == null ? 1 : +b; - return function() { - var u = source(); - return a + b * Math.log(u / (1 - u)); - }; - } - - randomLogistic.source = sourceRandomLogistic; - - return randomLogistic; -})(defaultSource$1); - -var poisson = (function sourceRandomPoisson(source) { - var G = gamma$1.source(source), - B = binomial.source(source); - - function randomPoisson(lambda) { - return function() { - var acc = 0, l = lambda; - while (l > 16) { - var n = Math.floor(0.875 * l), - t = G(n)(); - if (t > l) return acc + B(n - 1, l / t)(); - acc += n; - l -= t; - } - for (var s = -Math.log1p(-source()), k = 0; s <= l; ++k) s -= Math.log1p(-source()); - return acc + k; - }; - } - - randomPoisson.source = sourceRandomPoisson; - - return randomPoisson; -})(defaultSource$1); - -// https://en.wikipedia.org/wiki/Linear_congruential_generator#Parameters_in_common_use -const mul = 0x19660D; -const inc = 0x3C6EF35F; -const eps = 1 / 0x100000000; - -function lcg$1(seed = Math.random()) { - let state = (0 <= seed && seed < 1 ? seed / eps : Math.abs(seed)) | 0; - return () => (state = mul * state + inc | 0, eps * (state >>> 0)); -} - -function initRange(domain, range) { - switch (arguments.length) { - case 0: break; - case 1: this.range(domain); break; - default: this.range(range).domain(domain); break; - } - return this; -} - -function initInterpolator(domain, interpolator) { - switch (arguments.length) { - case 0: break; - case 1: { - if (typeof domain === "function") this.interpolator(domain); - else this.range(domain); - break; - } - default: { - this.domain(domain); - if (typeof interpolator === "function") this.interpolator(interpolator); - else this.range(interpolator); - break; - } - } - return this; -} - -const implicit = Symbol("implicit"); - -function ordinal() { - var index = new Map(), - domain = [], - range = [], - unknown = implicit; - - function scale(d) { - var key = d + "", i = index.get(key); - if (!i) { - if (unknown !== implicit) return unknown; - index.set(key, i = domain.push(d)); - } - return range[(i - 1) % range.length]; - } - - scale.domain = function(_) { - if (!arguments.length) return domain.slice(); - domain = [], index = new Map(); - for (const value of _) { - const key = value + ""; - if (index.has(key)) continue; - index.set(key, domain.push(value)); - } - return scale; - }; - - scale.range = function(_) { - return arguments.length ? (range = Array.from(_), scale) : range.slice(); - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.copy = function() { - return ordinal(domain, range).unknown(unknown); - }; - - initRange.apply(scale, arguments); - - return scale; -} - -function band() { - var scale = ordinal().unknown(undefined), - domain = scale.domain, - ordinalRange = scale.range, - r0 = 0, - r1 = 1, - step, - bandwidth, - round = false, - paddingInner = 0, - paddingOuter = 0, - align = 0.5; - - delete scale.unknown; - - function rescale() { - var n = domain().length, - reverse = r1 < r0, - start = reverse ? r1 : r0, - stop = reverse ? r0 : r1; - step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2); - if (round) step = Math.floor(step); - start += (stop - start - step * (n - paddingInner)) * align; - bandwidth = step * (1 - paddingInner); - if (round) start = Math.round(start), bandwidth = Math.round(bandwidth); - var values = sequence(n).map(function(i) { return start + step * i; }); - return ordinalRange(reverse ? values.reverse() : values); - } - - scale.domain = function(_) { - return arguments.length ? (domain(_), rescale()) : domain(); - }; - - scale.range = function(_) { - return arguments.length ? ([r0, r1] = _, r0 = +r0, r1 = +r1, rescale()) : [r0, r1]; - }; - - scale.rangeRound = function(_) { - return [r0, r1] = _, r0 = +r0, r1 = +r1, round = true, rescale(); - }; - - scale.bandwidth = function() { - return bandwidth; - }; - - scale.step = function() { - return step; - }; - - scale.round = function(_) { - return arguments.length ? (round = !!_, rescale()) : round; - }; - - scale.padding = function(_) { - return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner; - }; - - scale.paddingInner = function(_) { - return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner; - }; - - scale.paddingOuter = function(_) { - return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter; - }; - - scale.align = function(_) { - return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align; - }; - - scale.copy = function() { - return band(domain(), [r0, r1]) - .round(round) - .paddingInner(paddingInner) - .paddingOuter(paddingOuter) - .align(align); - }; - - return initRange.apply(rescale(), arguments); -} - -function pointish(scale) { - var copy = scale.copy; - - scale.padding = scale.paddingOuter; - delete scale.paddingInner; - delete scale.paddingOuter; - - scale.copy = function() { - return pointish(copy()); - }; - - return scale; -} - -function point() { - return pointish(band.apply(null, arguments).paddingInner(1)); -} - -function constants(x) { - return function() { - return x; - }; -} - -function number$2(x) { - return +x; -} - -var unit = [0, 1]; - -function identity$6(x) { - return x; -} - -function normalize(a, b) { - return (b -= (a = +a)) - ? function(x) { return (x - a) / b; } - : constants(isNaN(b) ? NaN : 0.5); -} - -function clamper(a, b) { - var t; - if (a > b) t = a, a = b, b = t; - return function(x) { return Math.max(a, Math.min(b, x)); }; -} - -// normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1]. -// interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b]. -function bimap(domain, range, interpolate) { - var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1]; - if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0); - else d0 = normalize(d0, d1), r0 = interpolate(r0, r1); - return function(x) { return r0(d0(x)); }; -} - -function polymap(domain, range, interpolate) { - var j = Math.min(domain.length, range.length) - 1, - d = new Array(j), - r = new Array(j), - i = -1; - - // Reverse descending domains. - if (domain[j] < domain[0]) { - domain = domain.slice().reverse(); - range = range.slice().reverse(); - } - - while (++i < j) { - d[i] = normalize(domain[i], domain[i + 1]); - r[i] = interpolate(range[i], range[i + 1]); - } - - return function(x) { - var i = bisectRight(domain, x, 1, j) - 1; - return r[i](d[i](x)); - }; -} - -function copy(source, target) { - return target - .domain(source.domain()) - .range(source.range()) - .interpolate(source.interpolate()) - .clamp(source.clamp()) - .unknown(source.unknown()); -} - -function transformer$1() { - var domain = unit, - range = unit, - interpolate$1 = interpolate, - transform, - untransform, - unknown, - clamp = identity$6, - piecewise, - output, - input; - - function rescale() { - var n = Math.min(domain.length, range.length); - if (clamp !== identity$6) clamp = clamper(domain[0], domain[n - 1]); - piecewise = n > 2 ? polymap : bimap; - output = input = null; - return scale; - } - - function scale(x) { - return isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate$1)))(transform(clamp(x))); - } - - scale.invert = function(y) { - return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y))); - }; - - scale.domain = function(_) { - return arguments.length ? (domain = Array.from(_, number$2), rescale()) : domain.slice(); - }; - - scale.range = function(_) { - return arguments.length ? (range = Array.from(_), rescale()) : range.slice(); - }; - - scale.rangeRound = function(_) { - return range = Array.from(_), interpolate$1 = interpolateRound, rescale(); - }; - - scale.clamp = function(_) { - return arguments.length ? (clamp = _ ? true : identity$6, rescale()) : clamp !== identity$6; - }; - - scale.interpolate = function(_) { - return arguments.length ? (interpolate$1 = _, rescale()) : interpolate$1; - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - return function(t, u) { - transform = t, untransform = u; - return rescale(); - }; -} - -function continuous() { - return transformer$1()(identity$6, identity$6); -} - -function tickFormat(start, stop, count, specifier) { - var step = tickStep(start, stop, count), - precision; - specifier = formatSpecifier(specifier == null ? ",f" : specifier); - switch (specifier.type) { - case "s": { - var value = Math.max(Math.abs(start), Math.abs(stop)); - if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision; - return exports.formatPrefix(specifier, value); - } - case "": - case "e": - case "g": - case "p": - case "r": { - if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e"); - break; - } - case "f": - case "%": { - if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2; - break; - } - } - return exports.format(specifier); -} - -function linearish(scale) { - var domain = scale.domain; - - scale.ticks = function(count) { - var d = domain(); - return ticks(d[0], d[d.length - 1], count == null ? 10 : count); - }; - - scale.tickFormat = function(count, specifier) { - var d = domain(); - return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier); - }; - - scale.nice = function(count) { - if (count == null) count = 10; - - var d = domain(); - var i0 = 0; - var i1 = d.length - 1; - var start = d[i0]; - var stop = d[i1]; - var prestep; - var step; - var maxIter = 10; - - if (stop < start) { - step = start, start = stop, stop = step; - step = i0, i0 = i1, i1 = step; - } - - while (maxIter-- > 0) { - step = tickIncrement(start, stop, count); - if (step === prestep) { - d[i0] = start; - d[i1] = stop; - return domain(d); - } else if (step > 0) { - start = Math.floor(start / step) * step; - stop = Math.ceil(stop / step) * step; - } else if (step < 0) { - start = Math.ceil(start * step) / step; - stop = Math.floor(stop * step) / step; - } else { - break; - } - prestep = step; - } - - return scale; - }; - - return scale; -} - -function linear$2() { - var scale = continuous(); - - scale.copy = function() { - return copy(scale, linear$2()); - }; - - initRange.apply(scale, arguments); - - return linearish(scale); -} - -function identity$7(domain) { - var unknown; - - function scale(x) { - return isNaN(x = +x) ? unknown : x; - } - - scale.invert = scale; - - scale.domain = scale.range = function(_) { - return arguments.length ? (domain = Array.from(_, number$2), scale) : domain.slice(); - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.copy = function() { - return identity$7(domain).unknown(unknown); - }; - - domain = arguments.length ? Array.from(domain, number$2) : [0, 1]; - - return linearish(scale); -} - -function nice$1(domain, interval) { - domain = domain.slice(); - - var i0 = 0, - i1 = domain.length - 1, - x0 = domain[i0], - x1 = domain[i1], - t; - - if (x1 < x0) { - t = i0, i0 = i1, i1 = t; - t = x0, x0 = x1, x1 = t; - } - - domain[i0] = interval.floor(x0); - domain[i1] = interval.ceil(x1); - return domain; -} - -function transformLog(x) { - return Math.log(x); -} - -function transformExp(x) { - return Math.exp(x); -} - -function transformLogn(x) { - return -Math.log(-x); -} - -function transformExpn(x) { - return -Math.exp(-x); -} - -function pow10(x) { - return isFinite(x) ? +("1e" + x) : x < 0 ? 0 : x; -} - -function powp(base) { - return base === 10 ? pow10 - : base === Math.E ? Math.exp - : function(x) { return Math.pow(base, x); }; -} - -function logp(base) { - return base === Math.E ? Math.log - : base === 10 && Math.log10 - || base === 2 && Math.log2 - || (base = Math.log(base), function(x) { return Math.log(x) / base; }); -} - -function reflect(f) { - return function(x) { - return -f(-x); - }; -} - -function loggish(transform) { - var scale = transform(transformLog, transformExp), - domain = scale.domain, - base = 10, - logs, - pows; - - function rescale() { - logs = logp(base), pows = powp(base); - if (domain()[0] < 0) { - logs = reflect(logs), pows = reflect(pows); - transform(transformLogn, transformExpn); - } else { - transform(transformLog, transformExp); - } - return scale; - } - - scale.base = function(_) { - return arguments.length ? (base = +_, rescale()) : base; - }; - - scale.domain = function(_) { - return arguments.length ? (domain(_), rescale()) : domain(); - }; - - scale.ticks = function(count) { - var d = domain(), - u = d[0], - v = d[d.length - 1], - r; - - if (r = v < u) i = u, u = v, v = i; - - var i = logs(u), - j = logs(v), - p, - k, - t, - n = count == null ? 10 : +count, - z = []; - - if (!(base % 1) && j - i < n) { - i = Math.floor(i), j = Math.ceil(j); - if (u > 0) for (; i <= j; ++i) { - for (k = 1, p = pows(i); k < base; ++k) { - t = p * k; - if (t < u) continue; - if (t > v) break; - z.push(t); - } - } else for (; i <= j; ++i) { - for (k = base - 1, p = pows(i); k >= 1; --k) { - t = p * k; - if (t < u) continue; - if (t > v) break; - z.push(t); - } - } - if (z.length * 2 < n) z = ticks(u, v, n); - } else { - z = ticks(i, j, Math.min(j - i, n)).map(pows); - } - - return r ? z.reverse() : z; - }; - - scale.tickFormat = function(count, specifier) { - if (specifier == null) specifier = base === 10 ? ".0e" : ","; - if (typeof specifier !== "function") specifier = exports.format(specifier); - if (count === Infinity) return specifier; - if (count == null) count = 10; - var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate? - return function(d) { - var i = d / pows(Math.round(logs(d))); - if (i * base < base - 0.5) i *= base; - return i <= k ? specifier(d) : ""; - }; - }; - - scale.nice = function() { - return domain(nice$1(domain(), { - floor: function(x) { return pows(Math.floor(logs(x))); }, - ceil: function(x) { return pows(Math.ceil(logs(x))); } - })); - }; - - return scale; -} - -function log$1() { - var scale = loggish(transformer$1()).domain([1, 10]); - - scale.copy = function() { - return copy(scale, log$1()).base(scale.base()); - }; - - initRange.apply(scale, arguments); - - return scale; -} - -function transformSymlog(c) { - return function(x) { - return Math.sign(x) * Math.log1p(Math.abs(x / c)); - }; -} - -function transformSymexp(c) { - return function(x) { - return Math.sign(x) * Math.expm1(Math.abs(x)) * c; - }; -} - -function symlogish(transform) { - var c = 1, scale = transform(transformSymlog(c), transformSymexp(c)); - - scale.constant = function(_) { - return arguments.length ? transform(transformSymlog(c = +_), transformSymexp(c)) : c; - }; - - return linearish(scale); -} - -function symlog() { - var scale = symlogish(transformer$1()); - - scale.copy = function() { - return copy(scale, symlog()).constant(scale.constant()); - }; - - return initRange.apply(scale, arguments); -} - -function transformPow(exponent) { - return function(x) { - return x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent); - }; -} - -function transformSqrt(x) { - return x < 0 ? -Math.sqrt(-x) : Math.sqrt(x); -} - -function transformSquare(x) { - return x < 0 ? -x * x : x * x; -} - -function powish(transform) { - var scale = transform(identity$6, identity$6), - exponent = 1; - - function rescale() { - return exponent === 1 ? transform(identity$6, identity$6) - : exponent === 0.5 ? transform(transformSqrt, transformSquare) - : transform(transformPow(exponent), transformPow(1 / exponent)); - } - - scale.exponent = function(_) { - return arguments.length ? (exponent = +_, rescale()) : exponent; - }; - - return linearish(scale); -} - -function pow$2() { - var scale = powish(transformer$1()); - - scale.copy = function() { - return copy(scale, pow$2()).exponent(scale.exponent()); - }; - - initRange.apply(scale, arguments); - - return scale; -} - -function sqrt$1() { - return pow$2.apply(null, arguments).exponent(0.5); -} - -function square(x) { - return Math.sign(x) * x * x; -} - -function unsquare(x) { - return Math.sign(x) * Math.sqrt(Math.abs(x)); -} - -function radial$1() { - var squared = continuous(), - range = [0, 1], - round = false, - unknown; - - function scale(x) { - var y = unsquare(squared(x)); - return isNaN(y) ? unknown : round ? Math.round(y) : y; - } - - scale.invert = function(y) { - return squared.invert(square(y)); - }; - - scale.domain = function(_) { - return arguments.length ? (squared.domain(_), scale) : squared.domain(); - }; - - scale.range = function(_) { - return arguments.length ? (squared.range((range = Array.from(_, number$2)).map(square)), scale) : range.slice(); - }; - - scale.rangeRound = function(_) { - return scale.range(_).round(true); - }; - - scale.round = function(_) { - return arguments.length ? (round = !!_, scale) : round; - }; - - scale.clamp = function(_) { - return arguments.length ? (squared.clamp(_), scale) : squared.clamp(); - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.copy = function() { - return radial$1(squared.domain(), range) - .round(round) - .clamp(squared.clamp()) - .unknown(unknown); - }; - - initRange.apply(scale, arguments); - - return linearish(scale); -} - -function quantile$1() { - var domain = [], - range = [], - thresholds = [], - unknown; - - function rescale() { - var i = 0, n = Math.max(1, range.length); - thresholds = new Array(n - 1); - while (++i < n) thresholds[i - 1] = quantileSorted(domain, i / n); - return scale; - } - - function scale(x) { - return isNaN(x = +x) ? unknown : range[bisectRight(thresholds, x)]; - } - - scale.invertExtent = function(y) { - var i = range.indexOf(y); - return i < 0 ? [NaN, NaN] : [ - i > 0 ? thresholds[i - 1] : domain[0], - i < thresholds.length ? thresholds[i] : domain[domain.length - 1] - ]; - }; - - scale.domain = function(_) { - if (!arguments.length) return domain.slice(); - domain = []; - for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d); - domain.sort(ascending); - return rescale(); - }; - - scale.range = function(_) { - return arguments.length ? (range = Array.from(_), rescale()) : range.slice(); - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.quantiles = function() { - return thresholds.slice(); - }; - - scale.copy = function() { - return quantile$1() - .domain(domain) - .range(range) - .unknown(unknown); - }; - - return initRange.apply(scale, arguments); -} - -function quantize$1() { - var x0 = 0, - x1 = 1, - n = 1, - domain = [0.5], - range = [0, 1], - unknown; - - function scale(x) { - return x <= x ? range[bisectRight(domain, x, 0, n)] : unknown; - } - - function rescale() { - var i = -1; - domain = new Array(n); - while (++i < n) domain[i] = ((i + 1) * x1 - (i - n) * x0) / (n + 1); - return scale; - } - - scale.domain = function(_) { - return arguments.length ? ([x0, x1] = _, x0 = +x0, x1 = +x1, rescale()) : [x0, x1]; - }; - - scale.range = function(_) { - return arguments.length ? (n = (range = Array.from(_)).length - 1, rescale()) : range.slice(); - }; - - scale.invertExtent = function(y) { - var i = range.indexOf(y); - return i < 0 ? [NaN, NaN] - : i < 1 ? [x0, domain[0]] - : i >= n ? [domain[n - 1], x1] - : [domain[i - 1], domain[i]]; - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : scale; - }; - - scale.thresholds = function() { - return domain.slice(); - }; - - scale.copy = function() { - return quantize$1() - .domain([x0, x1]) - .range(range) - .unknown(unknown); - }; - - return initRange.apply(linearish(scale), arguments); -} - -function threshold() { - var domain = [0.5], - range = [0, 1], - unknown, - n = 1; - - function scale(x) { - return x <= x ? range[bisectRight(domain, x, 0, n)] : unknown; - } - - scale.domain = function(_) { - return arguments.length ? (domain = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : domain.slice(); - }; - - scale.range = function(_) { - return arguments.length ? (range = Array.from(_), n = Math.min(domain.length, range.length - 1), scale) : range.slice(); - }; - - scale.invertExtent = function(y) { - var i = range.indexOf(y); - return [domain[i - 1], domain[i]]; - }; - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - scale.copy = function() { - return threshold() - .domain(domain) - .range(range) - .unknown(unknown); - }; - - return initRange.apply(scale, arguments); -} - -var t0$1 = new Date, - t1$1 = new Date; - -function newInterval(floori, offseti, count, field) { - - function interval(date) { - return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date; - } - - interval.floor = function(date) { - return floori(date = new Date(+date)), date; - }; - - interval.ceil = function(date) { - return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date; - }; - - interval.round = function(date) { - var d0 = interval(date), - d1 = interval.ceil(date); - return date - d0 < d1 - date ? d0 : d1; - }; - - interval.offset = function(date, step) { - return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date; - }; - - interval.range = function(start, stop, step) { - var range = [], previous; - start = interval.ceil(start); - step = step == null ? 1 : Math.floor(step); - if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date - do range.push(previous = new Date(+start)), offseti(start, step), floori(start); - while (previous < start && start < stop); - return range; - }; - - interval.filter = function(test) { - return newInterval(function(date) { - if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1); - }, function(date, step) { - if (date >= date) { - if (step < 0) while (++step <= 0) { - while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty - } else while (--step >= 0) { - while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty - } - } - }); - }; - - if (count) { - interval.count = function(start, end) { - t0$1.setTime(+start), t1$1.setTime(+end); - floori(t0$1), floori(t1$1); - return Math.floor(count(t0$1, t1$1)); - }; - - interval.every = function(step) { - step = Math.floor(step); - return !isFinite(step) || !(step > 0) ? null - : !(step > 1) ? interval - : interval.filter(field - ? function(d) { return field(d) % step === 0; } - : function(d) { return interval.count(0, d) % step === 0; }); - }; - } - - return interval; -} - -var millisecond = newInterval(function() { - // noop -}, function(date, step) { - date.setTime(+date + step); -}, function(start, end) { - return end - start; -}); - -// An optimized implementation for this simple case. -millisecond.every = function(k) { - k = Math.floor(k); - if (!isFinite(k) || !(k > 0)) return null; - if (!(k > 1)) return millisecond; - return newInterval(function(date) { - date.setTime(Math.floor(date / k) * k); - }, function(date, step) { - date.setTime(+date + step * k); - }, function(start, end) { - return (end - start) / k; - }); -}; -var milliseconds = millisecond.range; - -var durationSecond = 1e3; -var durationMinute = 6e4; -var durationHour = 36e5; -var durationDay = 864e5; -var durationWeek = 6048e5; - -var second = newInterval(function(date) { - date.setTime(date - date.getMilliseconds()); -}, function(date, step) { - date.setTime(+date + step * durationSecond); -}, function(start, end) { - return (end - start) / durationSecond; -}, function(date) { - return date.getUTCSeconds(); -}); -var seconds = second.range; - -var minute = newInterval(function(date) { - date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond); -}, function(date, step) { - date.setTime(+date + step * durationMinute); -}, function(start, end) { - return (end - start) / durationMinute; -}, function(date) { - return date.getMinutes(); -}); -var minutes = minute.range; - -var hour = newInterval(function(date) { - date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute); -}, function(date, step) { - date.setTime(+date + step * durationHour); -}, function(start, end) { - return (end - start) / durationHour; -}, function(date) { - return date.getHours(); -}); -var hours = hour.range; - -var day = newInterval( - date => date.setHours(0, 0, 0, 0), - (date, step) => date.setDate(date.getDate() + step), - (start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay, - date => date.getDate() - 1 -); -var days = day.range; - -function weekday(i) { - return newInterval(function(date) { - date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7); - date.setHours(0, 0, 0, 0); - }, function(date, step) { - date.setDate(date.getDate() + step * 7); - }, function(start, end) { - return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek; - }); -} - -var sunday = weekday(0); -var monday = weekday(1); -var tuesday = weekday(2); -var wednesday = weekday(3); -var thursday = weekday(4); -var friday = weekday(5); -var saturday = weekday(6); - -var sundays = sunday.range; -var mondays = monday.range; -var tuesdays = tuesday.range; -var wednesdays = wednesday.range; -var thursdays = thursday.range; -var fridays = friday.range; -var saturdays = saturday.range; - -var month = newInterval(function(date) { - date.setDate(1); - date.setHours(0, 0, 0, 0); -}, function(date, step) { - date.setMonth(date.getMonth() + step); -}, function(start, end) { - return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12; -}, function(date) { - return date.getMonth(); -}); -var months = month.range; - -var year = newInterval(function(date) { - date.setMonth(0, 1); - date.setHours(0, 0, 0, 0); -}, function(date, step) { - date.setFullYear(date.getFullYear() + step); -}, function(start, end) { - return end.getFullYear() - start.getFullYear(); -}, function(date) { - return date.getFullYear(); -}); - -// An optimized implementation for this simple case. -year.every = function(k) { - return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) { - date.setFullYear(Math.floor(date.getFullYear() / k) * k); - date.setMonth(0, 1); - date.setHours(0, 0, 0, 0); - }, function(date, step) { - date.setFullYear(date.getFullYear() + step * k); - }); -}; -var years = year.range; - -var utcMinute = newInterval(function(date) { - date.setUTCSeconds(0, 0); -}, function(date, step) { - date.setTime(+date + step * durationMinute); -}, function(start, end) { - return (end - start) / durationMinute; -}, function(date) { - return date.getUTCMinutes(); -}); -var utcMinutes = utcMinute.range; - -var utcHour = newInterval(function(date) { - date.setUTCMinutes(0, 0, 0); -}, function(date, step) { - date.setTime(+date + step * durationHour); -}, function(start, end) { - return (end - start) / durationHour; -}, function(date) { - return date.getUTCHours(); -}); -var utcHours = utcHour.range; - -var utcDay = newInterval(function(date) { - date.setUTCHours(0, 0, 0, 0); -}, function(date, step) { - date.setUTCDate(date.getUTCDate() + step); -}, function(start, end) { - return (end - start) / durationDay; -}, function(date) { - return date.getUTCDate() - 1; -}); -var utcDays = utcDay.range; - -function utcWeekday(i) { - return newInterval(function(date) { - date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7); - date.setUTCHours(0, 0, 0, 0); - }, function(date, step) { - date.setUTCDate(date.getUTCDate() + step * 7); - }, function(start, end) { - return (end - start) / durationWeek; - }); -} - -var utcSunday = utcWeekday(0); -var utcMonday = utcWeekday(1); -var utcTuesday = utcWeekday(2); -var utcWednesday = utcWeekday(3); -var utcThursday = utcWeekday(4); -var utcFriday = utcWeekday(5); -var utcSaturday = utcWeekday(6); - -var utcSundays = utcSunday.range; -var utcMondays = utcMonday.range; -var utcTuesdays = utcTuesday.range; -var utcWednesdays = utcWednesday.range; -var utcThursdays = utcThursday.range; -var utcFridays = utcFriday.range; -var utcSaturdays = utcSaturday.range; - -var utcMonth = newInterval(function(date) { - date.setUTCDate(1); - date.setUTCHours(0, 0, 0, 0); -}, function(date, step) { - date.setUTCMonth(date.getUTCMonth() + step); -}, function(start, end) { - return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12; -}, function(date) { - return date.getUTCMonth(); -}); -var utcMonths = utcMonth.range; - -var utcYear = newInterval(function(date) { - date.setUTCMonth(0, 1); - date.setUTCHours(0, 0, 0, 0); -}, function(date, step) { - date.setUTCFullYear(date.getUTCFullYear() + step); -}, function(start, end) { - return end.getUTCFullYear() - start.getUTCFullYear(); -}, function(date) { - return date.getUTCFullYear(); -}); - -// An optimized implementation for this simple case. -utcYear.every = function(k) { - return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) { - date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k); - date.setUTCMonth(0, 1); - date.setUTCHours(0, 0, 0, 0); - }, function(date, step) { - date.setUTCFullYear(date.getUTCFullYear() + step * k); - }); -}; -var utcYears = utcYear.range; - -function localDate(d) { - if (0 <= d.y && d.y < 100) { - var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L); - date.setFullYear(d.y); - return date; - } - return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L); -} - -function utcDate(d) { - if (0 <= d.y && d.y < 100) { - var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L)); - date.setUTCFullYear(d.y); - return date; - } - return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L)); -} - -function newDate(y, m, d) { - return {y: y, m: m, d: d, H: 0, M: 0, S: 0, L: 0}; -} - -function formatLocale$1(locale) { - var locale_dateTime = locale.dateTime, - locale_date = locale.date, - locale_time = locale.time, - locale_periods = locale.periods, - locale_weekdays = locale.days, - locale_shortWeekdays = locale.shortDays, - locale_months = locale.months, - locale_shortMonths = locale.shortMonths; - - var periodRe = formatRe(locale_periods), - periodLookup = formatLookup(locale_periods), - weekdayRe = formatRe(locale_weekdays), - weekdayLookup = formatLookup(locale_weekdays), - shortWeekdayRe = formatRe(locale_shortWeekdays), - shortWeekdayLookup = formatLookup(locale_shortWeekdays), - monthRe = formatRe(locale_months), - monthLookup = formatLookup(locale_months), - shortMonthRe = formatRe(locale_shortMonths), - shortMonthLookup = formatLookup(locale_shortMonths); - - var formats = { - "a": formatShortWeekday, - "A": formatWeekday, - "b": formatShortMonth, - "B": formatMonth, - "c": null, - "d": formatDayOfMonth, - "e": formatDayOfMonth, - "f": formatMicroseconds, - "g": formatYearISO, - "G": formatFullYearISO, - "H": formatHour24, - "I": formatHour12, - "j": formatDayOfYear, - "L": formatMilliseconds, - "m": formatMonthNumber, - "M": formatMinutes, - "p": formatPeriod, - "q": formatQuarter, - "Q": formatUnixTimestamp, - "s": formatUnixTimestampSeconds, - "S": formatSeconds, - "u": formatWeekdayNumberMonday, - "U": formatWeekNumberSunday, - "V": formatWeekNumberISO, - "w": formatWeekdayNumberSunday, - "W": formatWeekNumberMonday, - "x": null, - "X": null, - "y": formatYear$1, - "Y": formatFullYear, - "Z": formatZone, - "%": formatLiteralPercent - }; - - var utcFormats = { - "a": formatUTCShortWeekday, - "A": formatUTCWeekday, - "b": formatUTCShortMonth, - "B": formatUTCMonth, - "c": null, - "d": formatUTCDayOfMonth, - "e": formatUTCDayOfMonth, - "f": formatUTCMicroseconds, - "g": formatUTCYearISO, - "G": formatUTCFullYearISO, - "H": formatUTCHour24, - "I": formatUTCHour12, - "j": formatUTCDayOfYear, - "L": formatUTCMilliseconds, - "m": formatUTCMonthNumber, - "M": formatUTCMinutes, - "p": formatUTCPeriod, - "q": formatUTCQuarter, - "Q": formatUnixTimestamp, - "s": formatUnixTimestampSeconds, - "S": formatUTCSeconds, - "u": formatUTCWeekdayNumberMonday, - "U": formatUTCWeekNumberSunday, - "V": formatUTCWeekNumberISO, - "w": formatUTCWeekdayNumberSunday, - "W": formatUTCWeekNumberMonday, - "x": null, - "X": null, - "y": formatUTCYear, - "Y": formatUTCFullYear, - "Z": formatUTCZone, - "%": formatLiteralPercent - }; - - var parses = { - "a": parseShortWeekday, - "A": parseWeekday, - "b": parseShortMonth, - "B": parseMonth, - "c": parseLocaleDateTime, - "d": parseDayOfMonth, - "e": parseDayOfMonth, - "f": parseMicroseconds, - "g": parseYear, - "G": parseFullYear, - "H": parseHour24, - "I": parseHour24, - "j": parseDayOfYear, - "L": parseMilliseconds, - "m": parseMonthNumber, - "M": parseMinutes, - "p": parsePeriod, - "q": parseQuarter, - "Q": parseUnixTimestamp, - "s": parseUnixTimestampSeconds, - "S": parseSeconds, - "u": parseWeekdayNumberMonday, - "U": parseWeekNumberSunday, - "V": parseWeekNumberISO, - "w": parseWeekdayNumberSunday, - "W": parseWeekNumberMonday, - "x": parseLocaleDate, - "X": parseLocaleTime, - "y": parseYear, - "Y": parseFullYear, - "Z": parseZone, - "%": parseLiteralPercent - }; - - // These recursive directive definitions must be deferred. - formats.x = newFormat(locale_date, formats); - formats.X = newFormat(locale_time, formats); - formats.c = newFormat(locale_dateTime, formats); - utcFormats.x = newFormat(locale_date, utcFormats); - utcFormats.X = newFormat(locale_time, utcFormats); - utcFormats.c = newFormat(locale_dateTime, utcFormats); - - function newFormat(specifier, formats) { - return function(date) { - var string = [], - i = -1, - j = 0, - n = specifier.length, - c, - pad, - format; - - if (!(date instanceof Date)) date = new Date(+date); - - while (++i < n) { - if (specifier.charCodeAt(i) === 37) { - string.push(specifier.slice(j, i)); - if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i); - else pad = c === "e" ? " " : "0"; - if (format = formats[c]) c = format(date, pad); - string.push(c); - j = i + 1; - } - } - - string.push(specifier.slice(j, i)); - return string.join(""); - }; - } - - function newParse(specifier, Z) { - return function(string) { - var d = newDate(1900, undefined, 1), - i = parseSpecifier(d, specifier, string += "", 0), - week, day$1; - if (i != string.length) return null; - - // If a UNIX timestamp is specified, return it. - if ("Q" in d) return new Date(d.Q); - if ("s" in d) return new Date(d.s * 1000 + ("L" in d ? d.L : 0)); - - // If this is utcParse, never use the local timezone. - if (Z && !("Z" in d)) d.Z = 0; - - // The am-pm flag is 0 for AM, and 1 for PM. - if ("p" in d) d.H = d.H % 12 + d.p * 12; - - // If the month was not specified, inherit from the quarter. - if (d.m === undefined) d.m = "q" in d ? d.q : 0; - - // Convert day-of-week and week-of-year to day-of-year. - if ("V" in d) { - if (d.V < 1 || d.V > 53) return null; - if (!("w" in d)) d.w = 1; - if ("Z" in d) { - week = utcDate(newDate(d.y, 0, 1)), day$1 = week.getUTCDay(); - week = day$1 > 4 || day$1 === 0 ? utcMonday.ceil(week) : utcMonday(week); - week = utcDay.offset(week, (d.V - 1) * 7); - d.y = week.getUTCFullYear(); - d.m = week.getUTCMonth(); - d.d = week.getUTCDate() + (d.w + 6) % 7; - } else { - week = localDate(newDate(d.y, 0, 1)), day$1 = week.getDay(); - week = day$1 > 4 || day$1 === 0 ? monday.ceil(week) : monday(week); - week = day.offset(week, (d.V - 1) * 7); - d.y = week.getFullYear(); - d.m = week.getMonth(); - d.d = week.getDate() + (d.w + 6) % 7; - } - } else if ("W" in d || "U" in d) { - if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0; - day$1 = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(); - d.m = 0; - d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day$1 + 5) % 7 : d.w + d.U * 7 - (day$1 + 6) % 7; - } - - // If a time zone is specified, all fields are interpreted as UTC and then - // offset according to the specified time zone. - if ("Z" in d) { - d.H += d.Z / 100 | 0; - d.M += d.Z % 100; - return utcDate(d); - } - - // Otherwise, all fields are in local time. - return localDate(d); - }; - } - - function parseSpecifier(d, specifier, string, j) { - var i = 0, - n = specifier.length, - m = string.length, - c, - parse; - - while (i < n) { - if (j >= m) return -1; - c = specifier.charCodeAt(i++); - if (c === 37) { - c = specifier.charAt(i++); - parse = parses[c in pads ? specifier.charAt(i++) : c]; - if (!parse || ((j = parse(d, string, j)) < 0)) return -1; - } else if (c != string.charCodeAt(j++)) { - return -1; - } - } - - return j; - } - - function parsePeriod(d, string, i) { - var n = periodRe.exec(string.slice(i)); - return n ? (d.p = periodLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; - } - - function parseShortWeekday(d, string, i) { - var n = shortWeekdayRe.exec(string.slice(i)); - return n ? (d.w = shortWeekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; - } - - function parseWeekday(d, string, i) { - var n = weekdayRe.exec(string.slice(i)); - return n ? (d.w = weekdayLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; - } - - function parseShortMonth(d, string, i) { - var n = shortMonthRe.exec(string.slice(i)); - return n ? (d.m = shortMonthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; - } - - function parseMonth(d, string, i) { - var n = monthRe.exec(string.slice(i)); - return n ? (d.m = monthLookup.get(n[0].toLowerCase()), i + n[0].length) : -1; - } - - function parseLocaleDateTime(d, string, i) { - return parseSpecifier(d, locale_dateTime, string, i); - } - - function parseLocaleDate(d, string, i) { - return parseSpecifier(d, locale_date, string, i); - } - - function parseLocaleTime(d, string, i) { - return parseSpecifier(d, locale_time, string, i); - } - - function formatShortWeekday(d) { - return locale_shortWeekdays[d.getDay()]; - } - - function formatWeekday(d) { - return locale_weekdays[d.getDay()]; - } - - function formatShortMonth(d) { - return locale_shortMonths[d.getMonth()]; - } - - function formatMonth(d) { - return locale_months[d.getMonth()]; - } - - function formatPeriod(d) { - return locale_periods[+(d.getHours() >= 12)]; - } - - function formatQuarter(d) { - return 1 + ~~(d.getMonth() / 3); - } - - function formatUTCShortWeekday(d) { - return locale_shortWeekdays[d.getUTCDay()]; - } - - function formatUTCWeekday(d) { - return locale_weekdays[d.getUTCDay()]; - } - - function formatUTCShortMonth(d) { - return locale_shortMonths[d.getUTCMonth()]; - } - - function formatUTCMonth(d) { - return locale_months[d.getUTCMonth()]; - } - - function formatUTCPeriod(d) { - return locale_periods[+(d.getUTCHours() >= 12)]; - } - - function formatUTCQuarter(d) { - return 1 + ~~(d.getUTCMonth() / 3); - } - - return { - format: function(specifier) { - var f = newFormat(specifier += "", formats); - f.toString = function() { return specifier; }; - return f; - }, - parse: function(specifier) { - var p = newParse(specifier += "", false); - p.toString = function() { return specifier; }; - return p; - }, - utcFormat: function(specifier) { - var f = newFormat(specifier += "", utcFormats); - f.toString = function() { return specifier; }; - return f; - }, - utcParse: function(specifier) { - var p = newParse(specifier += "", true); - p.toString = function() { return specifier; }; - return p; - } - }; -} - -var pads = {"-": "", "_": " ", "0": "0"}, - numberRe = /^\s*\d+/, // note: ignores next directive - percentRe = /^%/, - requoteRe = /[\\^$*+?|[\]().{}]/g; - -function pad$1(value, fill, width) { - var sign = value < 0 ? "-" : "", - string = (sign ? -value : value) + "", - length = string.length; - return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string); -} - -function requote(s) { - return s.replace(requoteRe, "\\$&"); -} - -function formatRe(names) { - return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i"); -} - -function formatLookup(names) { - return new Map(names.map((name, i) => [name.toLowerCase(), i])); -} - -function parseWeekdayNumberSunday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 1)); - return n ? (d.w = +n[0], i + n[0].length) : -1; -} - -function parseWeekdayNumberMonday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 1)); - return n ? (d.u = +n[0], i + n[0].length) : -1; -} - -function parseWeekNumberSunday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.U = +n[0], i + n[0].length) : -1; -} - -function parseWeekNumberISO(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.V = +n[0], i + n[0].length) : -1; -} - -function parseWeekNumberMonday(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.W = +n[0], i + n[0].length) : -1; -} - -function parseFullYear(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 4)); - return n ? (d.y = +n[0], i + n[0].length) : -1; -} - -function parseYear(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1; -} - -function parseZone(d, string, i) { - var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6)); - return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1; -} - -function parseQuarter(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 1)); - return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1; -} - -function parseMonthNumber(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.m = n[0] - 1, i + n[0].length) : -1; -} - -function parseDayOfMonth(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.d = +n[0], i + n[0].length) : -1; -} - -function parseDayOfYear(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 3)); - return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1; -} - -function parseHour24(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.H = +n[0], i + n[0].length) : -1; -} - -function parseMinutes(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.M = +n[0], i + n[0].length) : -1; -} - -function parseSeconds(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 2)); - return n ? (d.S = +n[0], i + n[0].length) : -1; -} - -function parseMilliseconds(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 3)); - return n ? (d.L = +n[0], i + n[0].length) : -1; -} - -function parseMicroseconds(d, string, i) { - var n = numberRe.exec(string.slice(i, i + 6)); - return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1; -} - -function parseLiteralPercent(d, string, i) { - var n = percentRe.exec(string.slice(i, i + 1)); - return n ? i + n[0].length : -1; -} - -function parseUnixTimestamp(d, string, i) { - var n = numberRe.exec(string.slice(i)); - return n ? (d.Q = +n[0], i + n[0].length) : -1; -} - -function parseUnixTimestampSeconds(d, string, i) { - var n = numberRe.exec(string.slice(i)); - return n ? (d.s = +n[0], i + n[0].length) : -1; -} - -function formatDayOfMonth(d, p) { - return pad$1(d.getDate(), p, 2); -} - -function formatHour24(d, p) { - return pad$1(d.getHours(), p, 2); -} - -function formatHour12(d, p) { - return pad$1(d.getHours() % 12 || 12, p, 2); -} - -function formatDayOfYear(d, p) { - return pad$1(1 + day.count(year(d), d), p, 3); -} - -function formatMilliseconds(d, p) { - return pad$1(d.getMilliseconds(), p, 3); -} - -function formatMicroseconds(d, p) { - return formatMilliseconds(d, p) + "000"; -} - -function formatMonthNumber(d, p) { - return pad$1(d.getMonth() + 1, p, 2); -} - -function formatMinutes(d, p) { - return pad$1(d.getMinutes(), p, 2); -} - -function formatSeconds(d, p) { - return pad$1(d.getSeconds(), p, 2); -} - -function formatWeekdayNumberMonday(d) { - var day = d.getDay(); - return day === 0 ? 7 : day; -} - -function formatWeekNumberSunday(d, p) { - return pad$1(sunday.count(year(d) - 1, d), p, 2); -} - -function dISO(d) { - var day = d.getDay(); - return (day >= 4 || day === 0) ? thursday(d) : thursday.ceil(d); -} - -function formatWeekNumberISO(d, p) { - d = dISO(d); - return pad$1(thursday.count(year(d), d) + (year(d).getDay() === 4), p, 2); -} - -function formatWeekdayNumberSunday(d) { - return d.getDay(); -} - -function formatWeekNumberMonday(d, p) { - return pad$1(monday.count(year(d) - 1, d), p, 2); -} - -function formatYear$1(d, p) { - return pad$1(d.getFullYear() % 100, p, 2); -} - -function formatYearISO(d, p) { - d = dISO(d); - return pad$1(d.getFullYear() % 100, p, 2); -} - -function formatFullYear(d, p) { - return pad$1(d.getFullYear() % 10000, p, 4); -} - -function formatFullYearISO(d, p) { - var day = d.getDay(); - d = (day >= 4 || day === 0) ? thursday(d) : thursday.ceil(d); - return pad$1(d.getFullYear() % 10000, p, 4); -} - -function formatZone(d) { - var z = d.getTimezoneOffset(); - return (z > 0 ? "-" : (z *= -1, "+")) - + pad$1(z / 60 | 0, "0", 2) - + pad$1(z % 60, "0", 2); -} - -function formatUTCDayOfMonth(d, p) { - return pad$1(d.getUTCDate(), p, 2); -} - -function formatUTCHour24(d, p) { - return pad$1(d.getUTCHours(), p, 2); -} - -function formatUTCHour12(d, p) { - return pad$1(d.getUTCHours() % 12 || 12, p, 2); -} - -function formatUTCDayOfYear(d, p) { - return pad$1(1 + utcDay.count(utcYear(d), d), p, 3); -} - -function formatUTCMilliseconds(d, p) { - return pad$1(d.getUTCMilliseconds(), p, 3); -} - -function formatUTCMicroseconds(d, p) { - return formatUTCMilliseconds(d, p) + "000"; -} - -function formatUTCMonthNumber(d, p) { - return pad$1(d.getUTCMonth() + 1, p, 2); -} - -function formatUTCMinutes(d, p) { - return pad$1(d.getUTCMinutes(), p, 2); -} - -function formatUTCSeconds(d, p) { - return pad$1(d.getUTCSeconds(), p, 2); -} - -function formatUTCWeekdayNumberMonday(d) { - var dow = d.getUTCDay(); - return dow === 0 ? 7 : dow; -} - -function formatUTCWeekNumberSunday(d, p) { - return pad$1(utcSunday.count(utcYear(d) - 1, d), p, 2); -} - -function UTCdISO(d) { - var day = d.getUTCDay(); - return (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d); -} - -function formatUTCWeekNumberISO(d, p) { - d = UTCdISO(d); - return pad$1(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2); -} - -function formatUTCWeekdayNumberSunday(d) { - return d.getUTCDay(); -} - -function formatUTCWeekNumberMonday(d, p) { - return pad$1(utcMonday.count(utcYear(d) - 1, d), p, 2); -} - -function formatUTCYear(d, p) { - return pad$1(d.getUTCFullYear() % 100, p, 2); -} - -function formatUTCYearISO(d, p) { - d = UTCdISO(d); - return pad$1(d.getUTCFullYear() % 100, p, 2); -} - -function formatUTCFullYear(d, p) { - return pad$1(d.getUTCFullYear() % 10000, p, 4); -} - -function formatUTCFullYearISO(d, p) { - var day = d.getUTCDay(); - d = (day >= 4 || day === 0) ? utcThursday(d) : utcThursday.ceil(d); - return pad$1(d.getUTCFullYear() % 10000, p, 4); -} - -function formatUTCZone() { - return "+0000"; -} - -function formatLiteralPercent() { - return "%"; -} - -function formatUnixTimestamp(d) { - return +d; -} - -function formatUnixTimestampSeconds(d) { - return Math.floor(+d / 1000); -} - -var locale$1; - -defaultLocale$1({ - 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 defaultLocale$1(definition) { - locale$1 = formatLocale$1(definition); - exports.timeFormat = locale$1.format; - exports.timeParse = locale$1.parse; - exports.utcFormat = locale$1.utcFormat; - exports.utcParse = locale$1.utcParse; - return locale$1; -} - -var isoSpecifier = "%Y-%m-%dT%H:%M:%S.%LZ"; - -function formatIsoNative(date) { - return date.toISOString(); -} - -var formatIso = Date.prototype.toISOString - ? formatIsoNative - : exports.utcFormat(isoSpecifier); - -function parseIsoNative(string) { - var date = new Date(string); - return isNaN(date) ? null : date; -} - -var parseIso = +new Date("2000-01-01T00:00:00.000Z") - ? parseIsoNative - : exports.utcParse(isoSpecifier); - -var durationSecond$1 = 1000, - durationMinute$1 = durationSecond$1 * 60, - durationHour$1 = durationMinute$1 * 60, - durationDay$1 = durationHour$1 * 24, - durationWeek$1 = durationDay$1 * 7, - durationMonth = durationDay$1 * 30, - durationYear = durationDay$1 * 365; - -function date$1(t) { - return new Date(t); -} - -function number$3(t) { - return t instanceof Date ? +t : +new Date(+t); -} - -function calendar(year, month, week, day, hour, minute, second, millisecond, format) { - var scale = continuous(), - invert = scale.invert, - domain = scale.domain; - - var formatMillisecond = format(".%L"), - formatSecond = format(":%S"), - formatMinute = format("%I:%M"), - formatHour = format("%I %p"), - formatDay = format("%a %d"), - formatWeek = format("%b %d"), - formatMonth = format("%B"), - formatYear = format("%Y"); - - var tickIntervals = [ - [second, 1, durationSecond$1], - [second, 5, 5 * durationSecond$1], - [second, 15, 15 * durationSecond$1], - [second, 30, 30 * durationSecond$1], - [minute, 1, durationMinute$1], - [minute, 5, 5 * durationMinute$1], - [minute, 15, 15 * durationMinute$1], - [minute, 30, 30 * durationMinute$1], - [ hour, 1, durationHour$1 ], - [ hour, 3, 3 * durationHour$1 ], - [ hour, 6, 6 * durationHour$1 ], - [ hour, 12, 12 * durationHour$1 ], - [ day, 1, durationDay$1 ], - [ day, 2, 2 * durationDay$1 ], - [ week, 1, durationWeek$1 ], - [ month, 1, durationMonth ], - [ month, 3, 3 * durationMonth ], - [ year, 1, durationYear ] - ]; - - function tickFormat(date) { - return (second(date) < date ? formatMillisecond - : minute(date) < date ? formatSecond - : hour(date) < date ? formatMinute - : day(date) < date ? formatHour - : month(date) < date ? (week(date) < date ? formatDay : formatWeek) - : year(date) < date ? formatMonth - : formatYear)(date); - } - - function tickInterval(interval, start, stop) { - if (interval == null) interval = 10; - - // If a desired tick count is specified, pick a reasonable tick interval - // based on the extent of the domain and a rough estimate of tick size. - // Otherwise, assume interval is already a time interval and use it. - if (typeof interval === "number") { - var target = Math.abs(stop - start) / interval, - i = bisector(function(i) { return i[2]; }).right(tickIntervals, target), - step; - if (i === tickIntervals.length) { - step = tickStep(start / durationYear, stop / durationYear, interval); - interval = year; - } else if (i) { - i = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i]; - step = i[1]; - interval = i[0]; - } else { - step = Math.max(tickStep(start, stop, interval), 1); - interval = millisecond; - } - return interval.every(step); - } - - return interval; - } - - scale.invert = function(y) { - return new Date(invert(y)); - }; - - scale.domain = function(_) { - return arguments.length ? domain(Array.from(_, number$3)) : domain().map(date$1); - }; - - scale.ticks = function(interval) { - var d = domain(), - t0 = d[0], - t1 = d[d.length - 1], - r = t1 < t0, - t; - if (r) t = t0, t0 = t1, t1 = t; - t = tickInterval(interval, t0, t1); - t = t ? t.range(t0, t1 + 1) : []; // inclusive stop - return r ? t.reverse() : t; - }; - - scale.tickFormat = function(count, specifier) { - return specifier == null ? tickFormat : format(specifier); - }; - - scale.nice = function(interval) { - var d = domain(); - return (interval = tickInterval(interval, d[0], d[d.length - 1])) - ? domain(nice$1(d, interval)) - : scale; - }; - - scale.copy = function() { - return copy(scale, calendar(year, month, week, day, hour, minute, second, millisecond, format)); - }; - - return scale; -} - -function time() { - return initRange.apply(calendar(year, month, sunday, day, hour, minute, second, millisecond, exports.timeFormat).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments); -} - -function utcTime() { - return initRange.apply(calendar(utcYear, utcMonth, utcSunday, utcDay, utcHour, utcMinute, second, millisecond, exports.utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments); -} - -function transformer$2() { - var x0 = 0, - x1 = 1, - t0, - t1, - k10, - transform, - interpolator = identity$6, - clamp = false, - unknown; - - function scale(x) { - return isNaN(x = +x) ? unknown : interpolator(k10 === 0 ? 0.5 : (x = (transform(x) - t0) * k10, clamp ? Math.max(0, Math.min(1, x)) : x)); - } - - scale.domain = function(_) { - return arguments.length ? ([x0, x1] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0), scale) : [x0, x1]; - }; - - scale.clamp = function(_) { - return arguments.length ? (clamp = !!_, scale) : clamp; - }; - - scale.interpolator = function(_) { - return arguments.length ? (interpolator = _, scale) : interpolator; - }; - - function range(interpolate) { - return function(_) { - var r0, r1; - return arguments.length ? ([r0, r1] = _, interpolator = interpolate(r0, r1), scale) : [interpolator(0), interpolator(1)]; - }; - } - - scale.range = range(interpolate); - - scale.rangeRound = range(interpolateRound); - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - return function(t) { - transform = t, t0 = t(x0), t1 = t(x1), k10 = t0 === t1 ? 0 : 1 / (t1 - t0); - return scale; - }; -} - -function copy$1(source, target) { - return target - .domain(source.domain()) - .interpolator(source.interpolator()) - .clamp(source.clamp()) - .unknown(source.unknown()); -} - -function sequential() { - var scale = linearish(transformer$2()(identity$6)); - - scale.copy = function() { - return copy$1(scale, sequential()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function sequentialLog() { - var scale = loggish(transformer$2()).domain([1, 10]); - - scale.copy = function() { - return copy$1(scale, sequentialLog()).base(scale.base()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function sequentialSymlog() { - var scale = symlogish(transformer$2()); - - scale.copy = function() { - return copy$1(scale, sequentialSymlog()).constant(scale.constant()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function sequentialPow() { - var scale = powish(transformer$2()); - - scale.copy = function() { - return copy$1(scale, sequentialPow()).exponent(scale.exponent()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function sequentialSqrt() { - return sequentialPow.apply(null, arguments).exponent(0.5); -} - -function sequentialQuantile() { - var domain = [], - interpolator = identity$6; - - function scale(x) { - if (!isNaN(x = +x)) return interpolator((bisectRight(domain, x, 1) - 1) / (domain.length - 1)); - } - - scale.domain = function(_) { - if (!arguments.length) return domain.slice(); - domain = []; - for (let d of _) if (d != null && !isNaN(d = +d)) domain.push(d); - domain.sort(ascending); - return scale; - }; - - scale.interpolator = function(_) { - return arguments.length ? (interpolator = _, scale) : interpolator; - }; - - scale.range = function() { - return domain.map((d, i) => interpolator(i / (domain.length - 1))); - }; - - scale.quantiles = function(n) { - return Array.from({length: n + 1}, (_, i) => quantile(domain, i / n)); - }; - - scale.copy = function() { - return sequentialQuantile(interpolator).domain(domain); - }; - - return initInterpolator.apply(scale, arguments); -} - -function transformer$3() { - var x0 = 0, - x1 = 0.5, - x2 = 1, - s = 1, - t0, - t1, - t2, - k10, - k21, - interpolator = identity$6, - transform, - clamp = false, - unknown; - - function scale(x) { - return isNaN(x = +x) ? unknown : (x = 0.5 + ((x = +transform(x)) - t1) * (s * x < s * t1 ? k10 : k21), interpolator(clamp ? Math.max(0, Math.min(1, x)) : x)); - } - - scale.domain = function(_) { - return arguments.length ? ([x0, x1, x2] = _, t0 = transform(x0 = +x0), t1 = transform(x1 = +x1), t2 = transform(x2 = +x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1, scale) : [x0, x1, x2]; - }; - - scale.clamp = function(_) { - return arguments.length ? (clamp = !!_, scale) : clamp; - }; - - scale.interpolator = function(_) { - return arguments.length ? (interpolator = _, scale) : interpolator; - }; - - function range(interpolate) { - return function(_) { - var r0, r1, r2; - return arguments.length ? ([r0, r1, r2] = _, interpolator = piecewise(interpolate, [r0, r1, r2]), scale) : [interpolator(0), interpolator(0.5), interpolator(1)]; - }; - } - - scale.range = range(interpolate); - - scale.rangeRound = range(interpolateRound); - - scale.unknown = function(_) { - return arguments.length ? (unknown = _, scale) : unknown; - }; - - return function(t) { - transform = t, t0 = t(x0), t1 = t(x1), t2 = t(x2), k10 = t0 === t1 ? 0 : 0.5 / (t1 - t0), k21 = t1 === t2 ? 0 : 0.5 / (t2 - t1), s = t1 < t0 ? -1 : 1; - return scale; - }; -} - -function diverging() { - var scale = linearish(transformer$3()(identity$6)); - - scale.copy = function() { - return copy$1(scale, diverging()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function divergingLog() { - var scale = loggish(transformer$3()).domain([0.1, 1, 10]); - - scale.copy = function() { - return copy$1(scale, divergingLog()).base(scale.base()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function divergingSymlog() { - var scale = symlogish(transformer$3()); - - scale.copy = function() { - return copy$1(scale, divergingSymlog()).constant(scale.constant()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function divergingPow() { - var scale = powish(transformer$3()); - - scale.copy = function() { - return copy$1(scale, divergingPow()).exponent(scale.exponent()); - }; - - return initInterpolator.apply(scale, arguments); -} - -function divergingSqrt() { - return divergingPow.apply(null, arguments).exponent(0.5); -} - -function colors(specifier) { - var n = specifier.length / 6 | 0, colors = new Array(n), i = 0; - while (i < n) colors[i] = "#" + specifier.slice(i * 6, ++i * 6); - return colors; -} - -var category10 = colors("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"); - -var Accent = colors("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"); - -var Dark2 = colors("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"); - -var Paired = colors("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"); - -var Pastel1 = colors("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"); - -var Pastel2 = colors("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"); - -var Set1 = colors("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"); - -var Set2 = colors("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"); - -var Set3 = colors("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"); - -var Tableau10 = colors("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"); - -var ramp = scheme => rgbBasis(scheme[scheme.length - 1]); - -var scheme = new Array(3).concat( - "d8b365f5f5f55ab4ac", - "a6611adfc27d80cdc1018571", - "a6611adfc27df5f5f580cdc1018571", - "8c510ad8b365f6e8c3c7eae55ab4ac01665e", - "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e", - "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e", - "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e", - "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30", - "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30" -).map(colors); - -var BrBG = ramp(scheme); - -var scheme$1 = new Array(3).concat( - "af8dc3f7f7f77fbf7b", - "7b3294c2a5cfa6dba0008837", - "7b3294c2a5cff7f7f7a6dba0008837", - "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837", - "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837", - "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837", - "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837", - "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b", - "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b" -).map(colors); - -var PRGn = ramp(scheme$1); - -var scheme$2 = new Array(3).concat( - "e9a3c9f7f7f7a1d76a", - "d01c8bf1b6dab8e1864dac26", - "d01c8bf1b6daf7f7f7b8e1864dac26", - "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221", - "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221", - "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221", - "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221", - "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419", - "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419" -).map(colors); - -var PiYG = ramp(scheme$2); - -var scheme$3 = new Array(3).concat( - "998ec3f7f7f7f1a340", - "5e3c99b2abd2fdb863e66101", - "5e3c99b2abd2f7f7f7fdb863e66101", - "542788998ec3d8daebfee0b6f1a340b35806", - "542788998ec3d8daebf7f7f7fee0b6f1a340b35806", - "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806", - "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806", - "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08", - "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08" -).map(colors); - -var PuOr = ramp(scheme$3); - -var scheme$4 = new Array(3).concat( - "ef8a62f7f7f767a9cf", - "ca0020f4a58292c5de0571b0", - "ca0020f4a582f7f7f792c5de0571b0", - "b2182bef8a62fddbc7d1e5f067a9cf2166ac", - "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac", - "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac", - "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac", - "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061", - "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061" -).map(colors); - -var RdBu = ramp(scheme$4); - -var scheme$5 = new Array(3).concat( - "ef8a62ffffff999999", - "ca0020f4a582bababa404040", - "ca0020f4a582ffffffbababa404040", - "b2182bef8a62fddbc7e0e0e09999994d4d4d", - "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d", - "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d", - "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d", - "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a", - "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a" -).map(colors); - -var RdGy = ramp(scheme$5); - -var scheme$6 = new Array(3).concat( - "fc8d59ffffbf91bfdb", - "d7191cfdae61abd9e92c7bb6", - "d7191cfdae61ffffbfabd9e92c7bb6", - "d73027fc8d59fee090e0f3f891bfdb4575b4", - "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4", - "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4", - "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4", - "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695", - "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695" -).map(colors); - -var RdYlBu = ramp(scheme$6); - -var scheme$7 = new Array(3).concat( - "fc8d59ffffbf91cf60", - "d7191cfdae61a6d96a1a9641", - "d7191cfdae61ffffbfa6d96a1a9641", - "d73027fc8d59fee08bd9ef8b91cf601a9850", - "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850", - "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850", - "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850", - "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837", - "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837" -).map(colors); - -var RdYlGn = ramp(scheme$7); - -var scheme$8 = new Array(3).concat( - "fc8d59ffffbf99d594", - "d7191cfdae61abdda42b83ba", - "d7191cfdae61ffffbfabdda42b83ba", - "d53e4ffc8d59fee08be6f59899d5943288bd", - "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd", - "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd", - "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd", - "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2", - "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2" -).map(colors); - -var Spectral = ramp(scheme$8); - -var scheme$9 = new Array(3).concat( - "e5f5f999d8c92ca25f", - "edf8fbb2e2e266c2a4238b45", - "edf8fbb2e2e266c2a42ca25f006d2c", - "edf8fbccece699d8c966c2a42ca25f006d2c", - "edf8fbccece699d8c966c2a441ae76238b45005824", - "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824", - "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b" -).map(colors); - -var BuGn = ramp(scheme$9); - -var scheme$a = new Array(3).concat( - "e0ecf49ebcda8856a7", - "edf8fbb3cde38c96c688419d", - "edf8fbb3cde38c96c68856a7810f7c", - "edf8fbbfd3e69ebcda8c96c68856a7810f7c", - "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b", - "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b", - "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b" -).map(colors); - -var BuPu = ramp(scheme$a); - -var scheme$b = new Array(3).concat( - "e0f3dba8ddb543a2ca", - "f0f9e8bae4bc7bccc42b8cbe", - "f0f9e8bae4bc7bccc443a2ca0868ac", - "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac", - "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e", - "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e", - "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081" -).map(colors); - -var GnBu = ramp(scheme$b); - -var scheme$c = new Array(3).concat( - "fee8c8fdbb84e34a33", - "fef0d9fdcc8afc8d59d7301f", - "fef0d9fdcc8afc8d59e34a33b30000", - "fef0d9fdd49efdbb84fc8d59e34a33b30000", - "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000", - "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000", - "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000" -).map(colors); - -var OrRd = ramp(scheme$c); - -var scheme$d = new Array(3).concat( - "ece2f0a6bddb1c9099", - "f6eff7bdc9e167a9cf02818a", - "f6eff7bdc9e167a9cf1c9099016c59", - "f6eff7d0d1e6a6bddb67a9cf1c9099016c59", - "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450", - "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450", - "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636" -).map(colors); - -var PuBuGn = ramp(scheme$d); - -var scheme$e = new Array(3).concat( - "ece7f2a6bddb2b8cbe", - "f1eef6bdc9e174a9cf0570b0", - "f1eef6bdc9e174a9cf2b8cbe045a8d", - "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d", - "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b", - "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b", - "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858" -).map(colors); - -var PuBu = ramp(scheme$e); - -var scheme$f = new Array(3).concat( - "e7e1efc994c7dd1c77", - "f1eef6d7b5d8df65b0ce1256", - "f1eef6d7b5d8df65b0dd1c77980043", - "f1eef6d4b9dac994c7df65b0dd1c77980043", - "f1eef6d4b9dac994c7df65b0e7298ace125691003f", - "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f", - "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f" -).map(colors); - -var PuRd = ramp(scheme$f); - -var scheme$g = new Array(3).concat( - "fde0ddfa9fb5c51b8a", - "feebe2fbb4b9f768a1ae017e", - "feebe2fbb4b9f768a1c51b8a7a0177", - "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177", - "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177", - "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177", - "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a" -).map(colors); - -var RdPu = ramp(scheme$g); - -var scheme$h = new Array(3).concat( - "edf8b17fcdbb2c7fb8", - "ffffcca1dab441b6c4225ea8", - "ffffcca1dab441b6c42c7fb8253494", - "ffffccc7e9b47fcdbb41b6c42c7fb8253494", - "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84", - "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84", - "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58" -).map(colors); - -var YlGnBu = ramp(scheme$h); - -var scheme$i = new Array(3).concat( - "f7fcb9addd8e31a354", - "ffffccc2e69978c679238443", - "ffffccc2e69978c67931a354006837", - "ffffccd9f0a3addd8e78c67931a354006837", - "ffffccd9f0a3addd8e78c67941ab5d238443005a32", - "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32", - "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529" -).map(colors); - -var YlGn = ramp(scheme$i); - -var scheme$j = new Array(3).concat( - "fff7bcfec44fd95f0e", - "ffffd4fed98efe9929cc4c02", - "ffffd4fed98efe9929d95f0e993404", - "ffffd4fee391fec44ffe9929d95f0e993404", - "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04", - "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04", - "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506" -).map(colors); - -var YlOrBr = ramp(scheme$j); - -var scheme$k = new Array(3).concat( - "ffeda0feb24cf03b20", - "ffffb2fecc5cfd8d3ce31a1c", - "ffffb2fecc5cfd8d3cf03b20bd0026", - "ffffb2fed976feb24cfd8d3cf03b20bd0026", - "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026", - "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026", - "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026" -).map(colors); - -var YlOrRd = ramp(scheme$k); - -var scheme$l = new Array(3).concat( - "deebf79ecae13182bd", - "eff3ffbdd7e76baed62171b5", - "eff3ffbdd7e76baed63182bd08519c", - "eff3ffc6dbef9ecae16baed63182bd08519c", - "eff3ffc6dbef9ecae16baed64292c62171b5084594", - "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594", - "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b" -).map(colors); - -var Blues = ramp(scheme$l); - -var scheme$m = new Array(3).concat( - "e5f5e0a1d99b31a354", - "edf8e9bae4b374c476238b45", - "edf8e9bae4b374c47631a354006d2c", - "edf8e9c7e9c0a1d99b74c47631a354006d2c", - "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32", - "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32", - "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b" -).map(colors); - -var Greens = ramp(scheme$m); - -var scheme$n = new Array(3).concat( - "f0f0f0bdbdbd636363", - "f7f7f7cccccc969696525252", - "f7f7f7cccccc969696636363252525", - "f7f7f7d9d9d9bdbdbd969696636363252525", - "f7f7f7d9d9d9bdbdbd969696737373525252252525", - "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525", - "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000" -).map(colors); - -var Greys = ramp(scheme$n); - -var scheme$o = new Array(3).concat( - "efedf5bcbddc756bb1", - "f2f0f7cbc9e29e9ac86a51a3", - "f2f0f7cbc9e29e9ac8756bb154278f", - "f2f0f7dadaebbcbddc9e9ac8756bb154278f", - "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486", - "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486", - "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d" -).map(colors); - -var Purples = ramp(scheme$o); - -var scheme$p = new Array(3).concat( - "fee0d2fc9272de2d26", - "fee5d9fcae91fb6a4acb181d", - "fee5d9fcae91fb6a4ade2d26a50f15", - "fee5d9fcbba1fc9272fb6a4ade2d26a50f15", - "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d", - "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d", - "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d" -).map(colors); - -var Reds = ramp(scheme$p); - -var scheme$q = new Array(3).concat( - "fee6cefdae6be6550d", - "feeddefdbe85fd8d3cd94701", - "feeddefdbe85fd8d3ce6550da63603", - "feeddefdd0a2fdae6bfd8d3ce6550da63603", - "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04", - "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04", - "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704" -).map(colors); - -var Oranges = ramp(scheme$q); - -function cividis(t) { - t = Math.max(0, Math.min(1, t)); - return "rgb(" - + Math.max(0, Math.min(255, Math.round(-4.54 - t * (35.34 - t * (2381.73 - t * (6402.7 - t * (7024.72 - t * 2710.57))))))) + ", " - + Math.max(0, Math.min(255, Math.round(32.49 + t * (170.73 + t * (52.82 - t * (131.46 - t * (176.58 - t * 67.37))))))) + ", " - + Math.max(0, Math.min(255, Math.round(81.24 + t * (442.36 - t * (2482.43 - t * (6167.24 - t * (6614.94 - t * 2475.67))))))) - + ")"; -} - -var cubehelix$3 = cubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0)); - -var warm = cubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8)); - -var cool = cubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8)); - -var c$1 = cubehelix(); - -function rainbow(t) { - if (t < 0 || t > 1) t -= Math.floor(t); - var ts = Math.abs(t - 0.5); - c$1.h = 360 * t - 100; - c$1.s = 1.5 - 1.5 * ts; - c$1.l = 0.8 - 0.9 * ts; - return c$1 + ""; -} - -var c$2 = rgb(), - pi_1_3 = Math.PI / 3, - pi_2_3 = Math.PI * 2 / 3; - -function sinebow(t) { - var x; - t = (0.5 - t) * Math.PI; - c$2.r = 255 * (x = Math.sin(t)) * x; - c$2.g = 255 * (x = Math.sin(t + pi_1_3)) * x; - c$2.b = 255 * (x = Math.sin(t + pi_2_3)) * x; - return c$2 + ""; -} - -function turbo(t) { - t = Math.max(0, Math.min(1, t)); - return "rgb(" - + Math.max(0, Math.min(255, Math.round(34.61 + t * (1172.33 - t * (10793.56 - t * (33300.12 - t * (38394.49 - t * 14825.05))))))) + ", " - + Math.max(0, Math.min(255, Math.round(23.31 + t * (557.33 + t * (1225.33 - t * (3574.96 - t * (1073.77 + t * 707.56))))))) + ", " - + Math.max(0, Math.min(255, Math.round(27.2 + t * (3211.1 - t * (15327.97 - t * (27814 - t * (22569.18 - t * 6838.66))))))) - + ")"; -} - -function ramp$1(range) { - var n = range.length; - return function(t) { - return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))]; - }; -} - -var viridis = ramp$1(colors("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")); - -var magma = ramp$1(colors("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")); - -var inferno = ramp$1(colors("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")); - -var plasma = ramp$1(colors("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")); - -function constant$a(x) { - return function constant() { - return x; - }; -} - -var abs$3 = Math.abs; -var atan2$1 = Math.atan2; -var cos$2 = Math.cos; -var max$3 = Math.max; -var min$2 = Math.min; -var sin$2 = Math.sin; -var sqrt$2 = Math.sqrt; - -var epsilon$5 = 1e-12; -var pi$4 = Math.PI; -var halfPi$3 = pi$4 / 2; -var tau$5 = 2 * pi$4; - -function acos$1(x) { - return x > 1 ? 0 : x < -1 ? pi$4 : Math.acos(x); -} - -function asin$1(x) { - return x >= 1 ? halfPi$3 : x <= -1 ? -halfPi$3 : Math.asin(x); -} - -function arcInnerRadius(d) { - return d.innerRadius; -} - -function arcOuterRadius(d) { - return d.outerRadius; -} - -function arcStartAngle(d) { - return d.startAngle; -} - -function arcEndAngle(d) { - return d.endAngle; -} - -function arcPadAngle(d) { - return d && d.padAngle; // Note: optional! -} - -function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { - var x10 = x1 - x0, y10 = y1 - y0, - x32 = x3 - x2, y32 = y3 - y2, - t = y32 * x10 - x32 * y10; - if (t * t < epsilon$5) return; - t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t; - return [x0 + t * x10, y0 + t * y10]; -} - -// Compute perpendicular offset line of length rc. -// http://mathworld.wolfram.com/Circle-LineIntersection.html -function cornerTangents(x0, y0, x1, y1, r1, rc, cw) { - var x01 = x0 - x1, - y01 = y0 - y1, - lo = (cw ? rc : -rc) / sqrt$2(x01 * x01 + y01 * y01), - ox = lo * y01, - oy = -lo * x01, - x11 = x0 + ox, - y11 = y0 + oy, - x10 = x1 + ox, - y10 = y1 + oy, - x00 = (x11 + x10) / 2, - y00 = (y11 + y10) / 2, - dx = x10 - x11, - dy = y10 - y11, - d2 = dx * dx + dy * dy, - r = r1 - rc, - D = x11 * y10 - x10 * y11, - d = (dy < 0 ? -1 : 1) * sqrt$2(max$3(0, r * r * d2 - D * D)), - cx0 = (D * dy - dx * d) / d2, - cy0 = (-D * dx - dy * d) / d2, - cx1 = (D * dy + dx * d) / d2, - cy1 = (-D * dx + dy * d) / d2, - dx0 = cx0 - x00, - dy0 = cy0 - y00, - dx1 = cx1 - x00, - dy1 = cy1 - y00; - - // Pick the closer of the two intersection points. - // TODO Is there a faster way to determine which intersection to use? - if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1; - - return { - cx: cx0, - cy: cy0, - x01: -ox, - y01: -oy, - x11: cx0 * (r1 / r - 1), - y11: cy0 * (r1 / r - 1) - }; -} - -function arc() { - var innerRadius = arcInnerRadius, - outerRadius = arcOuterRadius, - cornerRadius = constant$a(0), - padRadius = null, - startAngle = arcStartAngle, - endAngle = arcEndAngle, - padAngle = arcPadAngle, - context = null; - - function arc() { - var buffer, - r, - r0 = +innerRadius.apply(this, arguments), - r1 = +outerRadius.apply(this, arguments), - a0 = startAngle.apply(this, arguments) - halfPi$3, - a1 = endAngle.apply(this, arguments) - halfPi$3, - da = abs$3(a1 - a0), - cw = a1 > a0; - - if (!context) context = buffer = path(); - - // Ensure that the outer radius is always larger than the inner radius. - if (r1 < r0) r = r1, r1 = r0, r0 = r; - - // Is it a point? - if (!(r1 > epsilon$5)) context.moveTo(0, 0); - - // Or is it a circle or annulus? - else if (da > tau$5 - epsilon$5) { - context.moveTo(r1 * cos$2(a0), r1 * sin$2(a0)); - context.arc(0, 0, r1, a0, a1, !cw); - if (r0 > epsilon$5) { - context.moveTo(r0 * cos$2(a1), r0 * sin$2(a1)); - context.arc(0, 0, r0, a1, a0, cw); - } - } - - // Or is it a circular or annular sector? - else { - var a01 = a0, - a11 = a1, - a00 = a0, - a10 = a1, - da0 = da, - da1 = da, - ap = padAngle.apply(this, arguments) / 2, - rp = (ap > epsilon$5) && (padRadius ? +padRadius.apply(this, arguments) : sqrt$2(r0 * r0 + r1 * r1)), - rc = min$2(abs$3(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), - rc0 = rc, - rc1 = rc, - t0, - t1; - - // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0. - if (rp > epsilon$5) { - var p0 = asin$1(rp / r0 * sin$2(ap)), - p1 = asin$1(rp / r1 * sin$2(ap)); - if ((da0 -= p0 * 2) > epsilon$5) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0; - else da0 = 0, a00 = a10 = (a0 + a1) / 2; - if ((da1 -= p1 * 2) > epsilon$5) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1; - else da1 = 0, a01 = a11 = (a0 + a1) / 2; - } - - var x01 = r1 * cos$2(a01), - y01 = r1 * sin$2(a01), - x10 = r0 * cos$2(a10), - y10 = r0 * sin$2(a10); - - // Apply rounded corners? - if (rc > epsilon$5) { - var x11 = r1 * cos$2(a11), - y11 = r1 * sin$2(a11), - x00 = r0 * cos$2(a00), - y00 = r0 * sin$2(a00), - oc; - - // Restrict the corner radius according to the sector angle. - if (da < pi$4 && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) { - var ax = x01 - oc[0], - ay = y01 - oc[1], - bx = x11 - oc[0], - by = y11 - oc[1], - kc = 1 / sin$2(acos$1((ax * bx + ay * by) / (sqrt$2(ax * ax + ay * ay) * sqrt$2(bx * bx + by * by))) / 2), - lc = sqrt$2(oc[0] * oc[0] + oc[1] * oc[1]); - rc0 = min$2(rc, (r0 - lc) / (kc - 1)); - rc1 = min$2(rc, (r1 - lc) / (kc + 1)); - } - } - - // Is the sector collapsed to a line? - if (!(da1 > epsilon$5)) context.moveTo(x01, y01); - - // Does the sector’s outer ring have rounded corners? - else if (rc1 > epsilon$5) { - t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw); - t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw); - - context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01); - - // Have the corners merged? - if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2$1(t0.y01, t0.x01), atan2$1(t1.y01, t1.x01), !cw); - - // Otherwise, draw the two corners and the ring. - else { - context.arc(t0.cx, t0.cy, rc1, atan2$1(t0.y01, t0.x01), atan2$1(t0.y11, t0.x11), !cw); - context.arc(0, 0, r1, atan2$1(t0.cy + t0.y11, t0.cx + t0.x11), atan2$1(t1.cy + t1.y11, t1.cx + t1.x11), !cw); - context.arc(t1.cx, t1.cy, rc1, atan2$1(t1.y11, t1.x11), atan2$1(t1.y01, t1.x01), !cw); - } - } - - // Or is the outer ring just a circular arc? - else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); - - // Is there no inner ring, and it’s a circular sector? - // Or perhaps it’s an annular sector collapsed due to padding? - if (!(r0 > epsilon$5) || !(da0 > epsilon$5)) context.lineTo(x10, y10); - - // Does the sector’s inner ring (or point) have rounded corners? - else if (rc0 > epsilon$5) { - t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw); - t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw); - - context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01); - - // Have the corners merged? - if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2$1(t0.y01, t0.x01), atan2$1(t1.y01, t1.x01), !cw); - - // Otherwise, draw the two corners and the ring. - else { - context.arc(t0.cx, t0.cy, rc0, atan2$1(t0.y01, t0.x01), atan2$1(t0.y11, t0.x11), !cw); - context.arc(0, 0, r0, atan2$1(t0.cy + t0.y11, t0.cx + t0.x11), atan2$1(t1.cy + t1.y11, t1.cx + t1.x11), cw); - context.arc(t1.cx, t1.cy, rc0, atan2$1(t1.y11, t1.x11), atan2$1(t1.y01, t1.x01), !cw); - } - } - - // Or is the inner ring just a circular arc? - else context.arc(0, 0, r0, a10, a00, cw); - } - - context.closePath(); - - if (buffer) return context = null, buffer + "" || null; - } - - arc.centroid = function() { - var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, - a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi$4 / 2; - return [cos$2(a) * r, sin$2(a) * r]; - }; - - arc.innerRadius = function(_) { - return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant$a(+_), arc) : innerRadius; - }; - - arc.outerRadius = function(_) { - return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant$a(+_), arc) : outerRadius; - }; - - arc.cornerRadius = function(_) { - return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant$a(+_), arc) : cornerRadius; - }; - - arc.padRadius = function(_) { - return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant$a(+_), arc) : padRadius; - }; - - arc.startAngle = function(_) { - return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant$a(+_), arc) : startAngle; - }; - - arc.endAngle = function(_) { - return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant$a(+_), arc) : endAngle; - }; - - arc.padAngle = function(_) { - return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant$a(+_), arc) : padAngle; - }; - - arc.context = function(_) { - return arguments.length ? ((context = _ == null ? null : _), arc) : context; - }; - - return arc; -} - -var slice$4 = Array.prototype.slice; - -function array$5(x) { - return typeof x === "object" && "length" in x - ? x // Array, TypedArray, NodeList, array-like - : Array.from(x); // Map, Set, iterable, string, or anything else -} - -function Linear(context) { - this._context = context; -} - -Linear.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; // proceed - default: this._context.lineTo(x, y); break; - } - } -}; - -function curveLinear(context) { - return new Linear(context); -} - -function x$3(p) { - return p[0]; -} - -function y$3(p) { - return p[1]; -} - -function line(x, y) { - var defined = constant$a(true), - context = null, - curve = curveLinear, - output = null; - - x = typeof x === "function" ? x : (x === undefined) ? x$3 : constant$a(x); - y = typeof y === "function" ? y : (y === undefined) ? y$3 : constant$a(y); - - function line(data) { - var i, - n = (data = array$5(data)).length, - d, - defined0 = false, - buffer; - - if (context == null) output = curve(buffer = path()); - - for (i = 0; i <= n; ++i) { - if (!(i < n && defined(d = data[i], i, data)) === defined0) { - if (defined0 = !defined0) output.lineStart(); - else output.lineEnd(); - } - if (defined0) output.point(+x(d, i, data), +y(d, i, data)); - } - - if (buffer) return output = null, buffer + "" || null; - } - - line.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : constant$a(+_), line) : x; - }; - - line.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : constant$a(+_), line) : y; - }; - - line.defined = function(_) { - return arguments.length ? (defined = typeof _ === "function" ? _ : constant$a(!!_), line) : defined; - }; - - line.curve = function(_) { - return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve; - }; - - line.context = function(_) { - return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context; - }; - - return line; -} - -function area$3(x0, y0, y1) { - var x1 = null, - defined = constant$a(true), - context = null, - curve = curveLinear, - output = null; - - x0 = typeof x0 === "function" ? x0 : (x0 === undefined) ? x$3 : constant$a(+x0); - y0 = typeof y0 === "function" ? y0 : (y0 === undefined) ? constant$a(0) : constant$a(+y0); - y1 = typeof y1 === "function" ? y1 : (y1 === undefined) ? y$3 : constant$a(+y1); - - function area(data) { - var i, - j, - k, - n = (data = array$5(data)).length, - d, - defined0 = false, - buffer, - x0z = new Array(n), - y0z = new Array(n); - - if (context == null) output = curve(buffer = path()); - - for (i = 0; i <= n; ++i) { - if (!(i < n && defined(d = data[i], i, data)) === defined0) { - if (defined0 = !defined0) { - j = i; - output.areaStart(); - output.lineStart(); - } else { - output.lineEnd(); - output.lineStart(); - for (k = i - 1; k >= j; --k) { - output.point(x0z[k], y0z[k]); - } - output.lineEnd(); - output.areaEnd(); - } - } - if (defined0) { - x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data); - output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]); - } - } - - if (buffer) return output = null, buffer + "" || null; - } - - function arealine() { - return line().defined(defined).curve(curve).context(context); - } - - area.x = function(_) { - return arguments.length ? (x0 = typeof _ === "function" ? _ : constant$a(+_), x1 = null, area) : x0; - }; - - area.x0 = function(_) { - return arguments.length ? (x0 = typeof _ === "function" ? _ : constant$a(+_), area) : x0; - }; - - area.x1 = function(_) { - return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : constant$a(+_), area) : x1; - }; - - area.y = function(_) { - return arguments.length ? (y0 = typeof _ === "function" ? _ : constant$a(+_), y1 = null, area) : y0; - }; - - area.y0 = function(_) { - return arguments.length ? (y0 = typeof _ === "function" ? _ : constant$a(+_), area) : y0; - }; - - area.y1 = function(_) { - return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : constant$a(+_), area) : y1; - }; - - area.lineX0 = - area.lineY0 = function() { - return arealine().x(x0).y(y0); - }; - - area.lineY1 = function() { - return arealine().x(x0).y(y1); - }; - - area.lineX1 = function() { - return arealine().x(x1).y(y0); - }; - - area.defined = function(_) { - return arguments.length ? (defined = typeof _ === "function" ? _ : constant$a(!!_), area) : defined; - }; - - area.curve = function(_) { - return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve; - }; - - area.context = function(_) { - return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context; - }; - - return area; -} - -function descending$1(a, b) { - return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; -} - -function identity$8(d) { - return d; -} - -function pie() { - var value = identity$8, - sortValues = descending$1, - sort = null, - startAngle = constant$a(0), - endAngle = constant$a(tau$5), - padAngle = constant$a(0); - - function pie(data) { - var i, - n = (data = array$5(data)).length, - j, - k, - sum = 0, - index = new Array(n), - arcs = new Array(n), - a0 = +startAngle.apply(this, arguments), - da = Math.min(tau$5, Math.max(-tau$5, endAngle.apply(this, arguments) - a0)), - a1, - p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)), - pa = p * (da < 0 ? -1 : 1), - v; - - for (i = 0; i < n; ++i) { - if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) { - sum += v; - } - } - - // Optionally sort the arcs by previously-computed values or by data. - if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); }); - else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); }); - - // Compute the arcs! They are stored in the original data's order. - for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) { - j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = { - data: data[j], - index: i, - value: v, - startAngle: a0, - endAngle: a1, - padAngle: p - }; - } - - return arcs; - } - - pie.value = function(_) { - return arguments.length ? (value = typeof _ === "function" ? _ : constant$a(+_), pie) : value; - }; - - pie.sortValues = function(_) { - return arguments.length ? (sortValues = _, sort = null, pie) : sortValues; - }; - - pie.sort = function(_) { - return arguments.length ? (sort = _, sortValues = null, pie) : sort; - }; - - pie.startAngle = function(_) { - return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant$a(+_), pie) : startAngle; - }; - - pie.endAngle = function(_) { - return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant$a(+_), pie) : endAngle; - }; - - pie.padAngle = function(_) { - return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant$a(+_), pie) : padAngle; - }; - - return pie; -} - -var curveRadialLinear = curveRadial(curveLinear); - -function Radial(curve) { - this._curve = curve; -} - -Radial.prototype = { - areaStart: function() { - this._curve.areaStart(); - }, - areaEnd: function() { - this._curve.areaEnd(); - }, - lineStart: function() { - this._curve.lineStart(); - }, - lineEnd: function() { - this._curve.lineEnd(); - }, - point: function(a, r) { - this._curve.point(r * Math.sin(a), r * -Math.cos(a)); - } -}; - -function curveRadial(curve) { - - function radial(context) { - return new Radial(curve(context)); - } - - radial._curve = curve; - - return radial; -} - -function lineRadial(l) { - var c = l.curve; - - l.angle = l.x, delete l.x; - l.radius = l.y, delete l.y; - - l.curve = function(_) { - return arguments.length ? c(curveRadial(_)) : c()._curve; - }; - - return l; -} - -function lineRadial$1() { - return lineRadial(line().curve(curveRadialLinear)); -} - -function areaRadial() { - var a = area$3().curve(curveRadialLinear), - c = a.curve, - x0 = a.lineX0, - x1 = a.lineX1, - y0 = a.lineY0, - y1 = a.lineY1; - - a.angle = a.x, delete a.x; - a.startAngle = a.x0, delete a.x0; - a.endAngle = a.x1, delete a.x1; - a.radius = a.y, delete a.y; - a.innerRadius = a.y0, delete a.y0; - a.outerRadius = a.y1, delete a.y1; - a.lineStartAngle = function() { return lineRadial(x0()); }, delete a.lineX0; - a.lineEndAngle = function() { return lineRadial(x1()); }, delete a.lineX1; - a.lineInnerRadius = function() { return lineRadial(y0()); }, delete a.lineY0; - a.lineOuterRadius = function() { return lineRadial(y1()); }, delete a.lineY1; - - a.curve = function(_) { - return arguments.length ? c(curveRadial(_)) : c()._curve; - }; - - return a; -} - -function pointRadial(x, y) { - return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)]; -} - -function linkSource(d) { - return d.source; -} - -function linkTarget(d) { - return d.target; -} - -function link$2(curve) { - var source = linkSource, - target = linkTarget, - x = x$3, - y = y$3, - context = null; - - function link() { - var buffer, argv = slice$4.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv); - if (!context) context = buffer = path(); - curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv)); - if (buffer) return context = null, buffer + "" || null; - } - - link.source = function(_) { - return arguments.length ? (source = _, link) : source; - }; - - link.target = function(_) { - return arguments.length ? (target = _, link) : target; - }; - - link.x = function(_) { - return arguments.length ? (x = typeof _ === "function" ? _ : constant$a(+_), link) : x; - }; - - link.y = function(_) { - return arguments.length ? (y = typeof _ === "function" ? _ : constant$a(+_), link) : y; - }; - - link.context = function(_) { - return arguments.length ? ((context = _ == null ? null : _), link) : context; - }; - - return link; -} - -function curveHorizontal(context, x0, y0, x1, y1) { - context.moveTo(x0, y0); - context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1); -} - -function curveVertical(context, x0, y0, x1, y1) { - context.moveTo(x0, y0); - context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1); -} - -function curveRadial$1(context, x0, y0, x1, y1) { - var p0 = pointRadial(x0, y0), - p1 = pointRadial(x0, y0 = (y0 + y1) / 2), - p2 = pointRadial(x1, y0), - p3 = pointRadial(x1, y1); - context.moveTo(p0[0], p0[1]); - context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]); -} - -function linkHorizontal() { - return link$2(curveHorizontal); -} - -function linkVertical() { - return link$2(curveVertical); -} - -function linkRadial() { - var l = link$2(curveRadial$1); - l.angle = l.x, delete l.x; - l.radius = l.y, delete l.y; - return l; -} - -var circle$2 = { - draw: function(context, size) { - var r = Math.sqrt(size / pi$4); - context.moveTo(r, 0); - context.arc(0, 0, r, 0, tau$5); - } -}; - -var cross$2 = { - draw: function(context, size) { - var r = Math.sqrt(size / 5) / 2; - context.moveTo(-3 * r, -r); - context.lineTo(-r, -r); - context.lineTo(-r, -3 * r); - context.lineTo(r, -3 * r); - context.lineTo(r, -r); - context.lineTo(3 * r, -r); - context.lineTo(3 * r, r); - context.lineTo(r, r); - context.lineTo(r, 3 * r); - context.lineTo(-r, 3 * r); - context.lineTo(-r, r); - context.lineTo(-3 * r, r); - context.closePath(); - } -}; - -var tan30 = Math.sqrt(1 / 3), - tan30_2 = tan30 * 2; - -var diamond = { - draw: function(context, size) { - var y = Math.sqrt(size / tan30_2), - x = y * tan30; - context.moveTo(0, -y); - context.lineTo(x, 0); - context.lineTo(0, y); - context.lineTo(-x, 0); - context.closePath(); - } -}; - -var ka = 0.89081309152928522810, - kr = Math.sin(pi$4 / 10) / Math.sin(7 * pi$4 / 10), - kx = Math.sin(tau$5 / 10) * kr, - ky = -Math.cos(tau$5 / 10) * kr; - -var star = { - draw: function(context, size) { - var r = Math.sqrt(size * ka), - x = kx * r, - y = ky * r; - context.moveTo(0, -r); - context.lineTo(x, y); - for (var i = 1; i < 5; ++i) { - var a = tau$5 * i / 5, - c = Math.cos(a), - s = Math.sin(a); - context.lineTo(s * r, -c * r); - context.lineTo(c * x - s * y, s * x + c * y); - } - context.closePath(); - } -}; - -var square$1 = { - draw: function(context, size) { - var w = Math.sqrt(size), - x = -w / 2; - context.rect(x, x, w, w); - } -}; - -var sqrt3 = Math.sqrt(3); - -var triangle = { - draw: function(context, size) { - var y = -Math.sqrt(size / (sqrt3 * 3)); - context.moveTo(0, y * 2); - context.lineTo(-sqrt3 * y, -y); - context.lineTo(sqrt3 * y, -y); - context.closePath(); - } -}; - -var c$3 = -0.5, - s = Math.sqrt(3) / 2, - k = 1 / Math.sqrt(12), - a$1 = (k / 2 + 1) * 3; - -var wye = { - draw: function(context, size) { - var r = Math.sqrt(size / a$1), - x0 = r / 2, - y0 = r * k, - x1 = x0, - y1 = r * k + r, - x2 = -x1, - y2 = y1; - context.moveTo(x0, y0); - context.lineTo(x1, y1); - context.lineTo(x2, y2); - context.lineTo(c$3 * x0 - s * y0, s * x0 + c$3 * y0); - context.lineTo(c$3 * x1 - s * y1, s * x1 + c$3 * y1); - context.lineTo(c$3 * x2 - s * y2, s * x2 + c$3 * y2); - context.lineTo(c$3 * x0 + s * y0, c$3 * y0 - s * x0); - context.lineTo(c$3 * x1 + s * y1, c$3 * y1 - s * x1); - context.lineTo(c$3 * x2 + s * y2, c$3 * y2 - s * x2); - context.closePath(); - } -}; - -var symbols = [ - circle$2, - cross$2, - diamond, - square$1, - star, - triangle, - wye -]; - -function symbol(type, size) { - var context = null; - type = typeof type === "function" ? type : constant$a(type || circle$2); - size = typeof size === "function" ? size : constant$a(size === undefined ? 64 : +size); - - function symbol() { - var buffer; - if (!context) context = buffer = path(); - type.apply(this, arguments).draw(context, +size.apply(this, arguments)); - if (buffer) return context = null, buffer + "" || null; - } - - symbol.type = function(_) { - return arguments.length ? (type = typeof _ === "function" ? _ : constant$a(_), symbol) : type; - }; - - symbol.size = function(_) { - return arguments.length ? (size = typeof _ === "function" ? _ : constant$a(+_), symbol) : size; - }; - - symbol.context = function(_) { - return arguments.length ? (context = _ == null ? null : _, symbol) : context; - }; - - return symbol; -} - -function noop$3() {} - -function point$1(that, x, y) { - that._context.bezierCurveTo( - (2 * that._x0 + that._x1) / 3, - (2 * that._y0 + that._y1) / 3, - (that._x0 + 2 * that._x1) / 3, - (that._y0 + 2 * that._y1) / 3, - (that._x0 + 4 * that._x1 + x) / 6, - (that._y0 + 4 * that._y1 + y) / 6 - ); -} - -function Basis(context) { - this._context = context; -} - -Basis.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = - this._y0 = this._y1 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 3: point$1(this, this._x1, this._y1); // proceed - case 2: this._context.lineTo(this._x1, this._y1); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; break; - case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed - default: point$1(this, x, y); break; - } - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - } -}; - -function basis$2(context) { - return new Basis(context); -} - -function BasisClosed(context) { - this._context = context; -} - -BasisClosed.prototype = { - areaStart: noop$3, - areaEnd: noop$3, - lineStart: function() { - this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = - this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 1: { - this._context.moveTo(this._x2, this._y2); - this._context.closePath(); - break; - } - case 2: { - this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3); - this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3); - this._context.closePath(); - break; - } - case 3: { - this.point(this._x2, this._y2); - this.point(this._x3, this._y3); - this.point(this._x4, this._y4); - break; - } - } - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._x2 = x, this._y2 = y; break; - case 1: this._point = 2; this._x3 = x, this._y3 = y; break; - case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break; - default: point$1(this, x, y); break; - } - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - } -}; - -function basisClosed$1(context) { - return new BasisClosed(context); -} - -function BasisOpen(context) { - this._context = context; -} - -BasisOpen.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = - this._y0 = this._y1 = NaN; - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; break; - case 1: this._point = 2; break; - case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break; - case 3: this._point = 4; // proceed - default: point$1(this, x, y); break; - } - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - } -}; - -function basisOpen(context) { - return new BasisOpen(context); -} - -function Bundle(context, beta) { - this._basis = new Basis(context); - this._beta = beta; -} - -Bundle.prototype = { - lineStart: function() { - this._x = []; - this._y = []; - this._basis.lineStart(); - }, - lineEnd: function() { - var x = this._x, - y = this._y, - j = x.length - 1; - - if (j > 0) { - var x0 = x[0], - y0 = y[0], - dx = x[j] - x0, - dy = y[j] - y0, - i = -1, - t; - - while (++i <= j) { - t = i / j; - this._basis.point( - this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), - this._beta * y[i] + (1 - this._beta) * (y0 + t * dy) - ); - } - } - - this._x = this._y = null; - this._basis.lineEnd(); - }, - point: function(x, y) { - this._x.push(+x); - this._y.push(+y); - } -}; - -var bundle = (function custom(beta) { - - function bundle(context) { - return beta === 1 ? new Basis(context) : new Bundle(context, beta); - } - - bundle.beta = function(beta) { - return custom(+beta); - }; - - return bundle; -})(0.85); - -function point$2(that, x, y) { - that._context.bezierCurveTo( - that._x1 + that._k * (that._x2 - that._x0), - that._y1 + that._k * (that._y2 - that._y0), - that._x2 + that._k * (that._x1 - x), - that._y2 + that._k * (that._y1 - y), - that._x2, - that._y2 - ); -} - -function Cardinal(context, tension) { - this._context = context; - this._k = (1 - tension) / 6; -} - -Cardinal.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 2: this._context.lineTo(this._x2, this._y2); break; - case 3: point$2(this, this._x1, this._y1); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; this._x1 = x, this._y1 = y; break; - case 2: this._point = 3; // proceed - default: point$2(this, x, y); break; - } - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -var cardinal = (function custom(tension) { - - function cardinal(context) { - return new Cardinal(context, tension); - } - - cardinal.tension = function(tension) { - return custom(+tension); - }; - - return cardinal; -})(0); - -function CardinalClosed(context, tension) { - this._context = context; - this._k = (1 - tension) / 6; -} - -CardinalClosed.prototype = { - areaStart: noop$3, - areaEnd: noop$3, - lineStart: function() { - this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = - this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 1: { - this._context.moveTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 2: { - this._context.lineTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 3: { - this.point(this._x3, this._y3); - this.point(this._x4, this._y4); - this.point(this._x5, this._y5); - break; - } - } - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._x3 = x, this._y3 = y; break; - case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; - case 2: this._point = 3; this._x5 = x, this._y5 = y; break; - default: point$2(this, x, y); break; - } - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -var cardinalClosed = (function custom(tension) { - - function cardinal(context) { - return new CardinalClosed(context, tension); - } - - cardinal.tension = function(tension) { - return custom(+tension); - }; - - return cardinal; -})(0); - -function CardinalOpen(context, tension) { - this._context = context; - this._k = (1 - tension) / 6; -} - -CardinalOpen.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; break; - case 1: this._point = 2; break; - case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; - case 3: this._point = 4; // proceed - default: point$2(this, x, y); break; - } - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -var cardinalOpen = (function custom(tension) { - - function cardinal(context) { - return new CardinalOpen(context, tension); - } - - cardinal.tension = function(tension) { - return custom(+tension); - }; - - return cardinal; -})(0); - -function point$3(that, x, y) { - var x1 = that._x1, - y1 = that._y1, - x2 = that._x2, - y2 = that._y2; - - if (that._l01_a > epsilon$5) { - var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, - n = 3 * that._l01_a * (that._l01_a + that._l12_a); - x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n; - y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n; - } - - if (that._l23_a > epsilon$5) { - var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, - m = 3 * that._l23_a * (that._l23_a + that._l12_a); - x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m; - y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m; - } - - that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2); -} - -function CatmullRom(context, alpha) { - this._context = context; - this._alpha = alpha; -} - -CatmullRom.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._l01_a = this._l12_a = this._l23_a = - this._l01_2a = this._l12_2a = this._l23_2a = - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 2: this._context.lineTo(this._x2, this._y2); break; - case 3: this.point(this._x2, this._y2); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - - if (this._point) { - var x23 = this._x2 - x, - y23 = this._y2 - y; - this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); - } - - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; break; - case 2: this._point = 3; // proceed - default: point$3(this, x, y); break; - } - - this._l01_a = this._l12_a, this._l12_a = this._l23_a; - this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -var catmullRom = (function custom(alpha) { - - function catmullRom(context) { - return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0); - } - - catmullRom.alpha = function(alpha) { - return custom(+alpha); - }; - - return catmullRom; -})(0.5); - -function CatmullRomClosed(context, alpha) { - this._context = context; - this._alpha = alpha; -} - -CatmullRomClosed.prototype = { - areaStart: noop$3, - areaEnd: noop$3, - lineStart: function() { - this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = - this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; - this._l01_a = this._l12_a = this._l23_a = - this._l01_2a = this._l12_2a = this._l23_2a = - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 1: { - this._context.moveTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 2: { - this._context.lineTo(this._x3, this._y3); - this._context.closePath(); - break; - } - case 3: { - this.point(this._x3, this._y3); - this.point(this._x4, this._y4); - this.point(this._x5, this._y5); - break; - } - } - }, - point: function(x, y) { - x = +x, y = +y; - - if (this._point) { - var x23 = this._x2 - x, - y23 = this._y2 - y; - this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); - } - - switch (this._point) { - case 0: this._point = 1; this._x3 = x, this._y3 = y; break; - case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; - case 2: this._point = 3; this._x5 = x, this._y5 = y; break; - default: point$3(this, x, y); break; - } - - this._l01_a = this._l12_a, this._l12_a = this._l23_a; - this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -var catmullRomClosed = (function custom(alpha) { - - function catmullRom(context) { - return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0); - } - - catmullRom.alpha = function(alpha) { - return custom(+alpha); - }; - - return catmullRom; -})(0.5); - -function CatmullRomOpen(context, alpha) { - this._context = context; - this._alpha = alpha; -} - -CatmullRomOpen.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = this._x2 = - this._y0 = this._y1 = this._y2 = NaN; - this._l01_a = this._l12_a = this._l23_a = - this._l01_2a = this._l12_2a = this._l23_2a = - this._point = 0; - }, - lineEnd: function() { - if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - - if (this._point) { - var x23 = this._x2 - x, - y23 = this._y2 - y; - this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); - } - - switch (this._point) { - case 0: this._point = 1; break; - case 1: this._point = 2; break; - case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; - case 3: this._point = 4; // proceed - default: point$3(this, x, y); break; - } - - this._l01_a = this._l12_a, this._l12_a = this._l23_a; - this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; - this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; - this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; - } -}; - -var catmullRomOpen = (function custom(alpha) { - - function catmullRom(context) { - return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0); - } - - catmullRom.alpha = function(alpha) { - return custom(+alpha); - }; - - return catmullRom; -})(0.5); - -function LinearClosed(context) { - this._context = context; -} - -LinearClosed.prototype = { - areaStart: noop$3, - areaEnd: noop$3, - lineStart: function() { - this._point = 0; - }, - lineEnd: function() { - if (this._point) this._context.closePath(); - }, - point: function(x, y) { - x = +x, y = +y; - if (this._point) this._context.lineTo(x, y); - else this._point = 1, this._context.moveTo(x, y); - } -}; - -function linearClosed(context) { - return new LinearClosed(context); -} - -function sign$1(x) { - return x < 0 ? -1 : 1; -} - -// Calculate the slopes of the tangents (Hermite-type interpolation) based on -// the following paper: Steffen, M. 1990. A Simple Method for Monotonic -// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO. -// NOV(II), P. 443, 1990. -function slope3(that, x2, y2) { - var h0 = that._x1 - that._x0, - h1 = x2 - that._x1, - s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), - s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), - p = (s0 * h1 + s1 * h0) / (h0 + h1); - return (sign$1(s0) + sign$1(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0; -} - -// Calculate a one-sided slope. -function slope2(that, t) { - var h = that._x1 - that._x0; - return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t; -} - -// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations -// "you can express cubic Hermite interpolation in terms of cubic Bézier curves -// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1". -function point$4(that, t0, t1) { - var x0 = that._x0, - y0 = that._y0, - x1 = that._x1, - y1 = that._y1, - dx = (x1 - x0) / 3; - that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1); -} - -function MonotoneX(context) { - this._context = context; -} - -MonotoneX.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x0 = this._x1 = - this._y0 = this._y1 = - this._t0 = NaN; - this._point = 0; - }, - lineEnd: function() { - switch (this._point) { - case 2: this._context.lineTo(this._x1, this._y1); break; - case 3: point$4(this, this._t0, slope2(this, this._t0)); break; - } - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - this._line = 1 - this._line; - }, - point: function(x, y) { - var t1 = NaN; - - x = +x, y = +y; - if (x === this._x1 && y === this._y1) return; // Ignore coincident points. - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; break; - case 2: this._point = 3; point$4(this, slope2(this, t1 = slope3(this, x, y)), t1); break; - default: point$4(this, this._t0, t1 = slope3(this, x, y)); break; - } - - this._x0 = this._x1, this._x1 = x; - this._y0 = this._y1, this._y1 = y; - this._t0 = t1; - } -}; - -function MonotoneY(context) { - this._context = new ReflectContext(context); -} - -(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) { - MonotoneX.prototype.point.call(this, y, x); -}; - -function ReflectContext(context) { - this._context = context; -} - -ReflectContext.prototype = { - moveTo: function(x, y) { this._context.moveTo(y, x); }, - closePath: function() { this._context.closePath(); }, - lineTo: function(x, y) { this._context.lineTo(y, x); }, - bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); } -}; - -function monotoneX(context) { - return new MonotoneX(context); -} - -function monotoneY(context) { - return new MonotoneY(context); -} - -function Natural(context) { - this._context = context; -} - -Natural.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x = []; - this._y = []; - }, - lineEnd: function() { - var x = this._x, - y = this._y, - n = x.length; - - if (n) { - this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]); - if (n === 2) { - this._context.lineTo(x[1], y[1]); - } else { - var px = controlPoints(x), - py = controlPoints(y); - for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) { - this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]); - } - } - } - - if (this._line || (this._line !== 0 && n === 1)) this._context.closePath(); - this._line = 1 - this._line; - this._x = this._y = null; - }, - point: function(x, y) { - this._x.push(+x); - this._y.push(+y); - } -}; - -// See https://www.particleincell.com/2012/bezier-splines/ for derivation. -function controlPoints(x) { - var i, - n = x.length - 1, - m, - a = new Array(n), - b = new Array(n), - r = new Array(n); - a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1]; - for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1]; - a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n]; - for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1]; - a[n - 1] = r[n - 1] / b[n - 1]; - for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i]; - b[n - 1] = (x[n] + a[n - 1]) / 2; - for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1]; - return [a, b]; -} - -function natural(context) { - return new Natural(context); -} - -function Step(context, t) { - this._context = context; - this._t = t; -} - -Step.prototype = { - areaStart: function() { - this._line = 0; - }, - areaEnd: function() { - this._line = NaN; - }, - lineStart: function() { - this._x = this._y = NaN; - this._point = 0; - }, - lineEnd: function() { - if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y); - if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); - if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line; - }, - point: function(x, y) { - x = +x, y = +y; - switch (this._point) { - case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; - case 1: this._point = 2; // proceed - default: { - if (this._t <= 0) { - this._context.lineTo(this._x, y); - this._context.lineTo(x, y); - } else { - var x1 = this._x * (1 - this._t) + x * this._t; - this._context.lineTo(x1, this._y); - this._context.lineTo(x1, y); - } - break; - } - } - this._x = x, this._y = y; - } -}; - -function step(context) { - return new Step(context, 0.5); -} - -function stepBefore(context) { - return new Step(context, 0); -} - -function stepAfter(context) { - return new Step(context, 1); -} - -function none$1(series, order) { - if (!((n = series.length) > 1)) return; - for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) { - s0 = s1, s1 = series[order[i]]; - for (j = 0; j < m; ++j) { - s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1]; - } - } -} - -function none$2(series) { - var n = series.length, o = new Array(n); - while (--n >= 0) o[n] = n; - return o; -} - -function stackValue(d, key) { - return d[key]; -} - -function stackSeries(key) { - const series = []; - series.key = key; - return series; -} - -function stack() { - var keys = constant$a([]), - order = none$2, - offset = none$1, - value = stackValue; - - function stack(data) { - var sz = Array.from(keys.apply(this, arguments), stackSeries), - i, n = sz.length, j = -1, - oz; - - for (const d of data) { - for (i = 0, ++j; i < n; ++i) { - (sz[i][j] = [0, +value(d, sz[i].key, j, data)]).data = d; - } - } - - for (i = 0, oz = array$5(order(sz)); i < n; ++i) { - sz[oz[i]].index = i; - } - - offset(sz, oz); - return sz; - } - - stack.keys = function(_) { - return arguments.length ? (keys = typeof _ === "function" ? _ : constant$a(Array.from(_)), stack) : keys; - }; - - stack.value = function(_) { - return arguments.length ? (value = typeof _ === "function" ? _ : constant$a(+_), stack) : value; - }; - - stack.order = function(_) { - return arguments.length ? (order = _ == null ? none$2 : typeof _ === "function" ? _ : constant$a(Array.from(_)), stack) : order; - }; - - stack.offset = function(_) { - return arguments.length ? (offset = _ == null ? none$1 : _, stack) : offset; - }; - - return stack; -} - -function expand(series, order) { - if (!((n = series.length) > 0)) return; - for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) { - for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0; - if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y; - } - none$1(series, order); -} - -function diverging$1(series, order) { - if (!((n = series.length) > 0)) return; - for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) { - for (yp = yn = 0, i = 0; i < n; ++i) { - if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) { - d[0] = yp, d[1] = yp += dy; - } else if (dy < 0) { - d[1] = yn, d[0] = yn += dy; - } else { - d[0] = 0, d[1] = dy; - } - } - } -} - -function silhouette(series, order) { - if (!((n = series.length) > 0)) return; - for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) { - for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0; - s0[j][1] += s0[j][0] = -y / 2; - } - none$1(series, order); -} - -function wiggle(series, order) { - if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return; - for (var y = 0, j = 1, s0, m, n; j < m; ++j) { - for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) { - var si = series[order[i]], - sij0 = si[j][1] || 0, - sij1 = si[j - 1][1] || 0, - s3 = (sij0 - sij1) / 2; - for (var k = 0; k < i; ++k) { - var sk = series[order[k]], - skj0 = sk[j][1] || 0, - skj1 = sk[j - 1][1] || 0; - s3 += skj0 - skj1; - } - s1 += sij0, s2 += s3 * sij0; - } - s0[j - 1][1] += s0[j - 1][0] = y; - if (s1) y -= s2 / s1; - } - s0[j - 1][1] += s0[j - 1][0] = y; - none$1(series, order); -} - -function appearance(series) { - var peaks = series.map(peak); - return none$2(series).sort(function(a, b) { return peaks[a] - peaks[b]; }); -} - -function peak(series) { - var i = -1, j = 0, n = series.length, vi, vj = -Infinity; - while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i; - return j; -} - -function ascending$3(series) { - var sums = series.map(sum$1); - return none$2(series).sort(function(a, b) { return sums[a] - sums[b]; }); -} - -function sum$1(series) { - var s = 0, i = -1, n = series.length, v; - while (++i < n) if (v = +series[i][1]) s += v; - return s; -} - -function descending$2(series) { - return ascending$3(series).reverse(); -} - -function insideOut(series) { - var n = series.length, - i, - j, - sums = series.map(sum$1), - order = appearance(series), - top = 0, - bottom = 0, - tops = [], - bottoms = []; - - for (i = 0; i < n; ++i) { - j = order[i]; - if (top < bottom) { - top += sums[j]; - tops.push(j); - } else { - bottom += sums[j]; - bottoms.push(j); - } - } - - return bottoms.reverse().concat(tops); -} - -function reverse$1(series) { - return none$2(series).reverse(); -} - -var constant$b = x => () => x; - -function ZoomEvent(type, { - sourceEvent, - target, - transform, - dispatch -}) { - Object.defineProperties(this, { - type: {value: type, enumerable: true, configurable: true}, - sourceEvent: {value: sourceEvent, enumerable: true, configurable: true}, - target: {value: target, enumerable: true, configurable: true}, - transform: {value: transform, enumerable: true, configurable: true}, - _: {value: dispatch} - }); -} - -function Transform(k, x, y) { - this.k = k; - this.x = x; - this.y = y; -} - -Transform.prototype = { - constructor: Transform, - scale: function(k) { - return k === 1 ? this : new Transform(this.k * k, this.x, this.y); - }, - translate: function(x, y) { - return x === 0 & y === 0 ? this : new Transform(this.k, this.x + this.k * x, this.y + this.k * y); - }, - apply: function(point) { - return [point[0] * this.k + this.x, point[1] * this.k + this.y]; - }, - applyX: function(x) { - return x * this.k + this.x; - }, - applyY: function(y) { - return y * this.k + this.y; - }, - invert: function(location) { - return [(location[0] - this.x) / this.k, (location[1] - this.y) / this.k]; - }, - invertX: function(x) { - return (x - this.x) / this.k; - }, - invertY: function(y) { - return (y - this.y) / this.k; - }, - rescaleX: function(x) { - return x.copy().domain(x.range().map(this.invertX, this).map(x.invert, x)); - }, - rescaleY: function(y) { - return y.copy().domain(y.range().map(this.invertY, this).map(y.invert, y)); - }, - toString: function() { - return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")"; - } -}; - -var identity$9 = new Transform(1, 0, 0); - -transform$1.prototype = Transform.prototype; - -function transform$1(node) { - while (!node.__zoom) if (!(node = node.parentNode)) return identity$9; - return node.__zoom; -} - -function nopropagation$2(event) { - event.stopImmediatePropagation(); -} - -function noevent$2(event) { - event.preventDefault(); - event.stopImmediatePropagation(); -} - -// Ignore right-click, since that should open the context menu. -// except for pinch-to-zoom, which is sent as a wheel+ctrlKey event -function defaultFilter$2(event) { - return (!event.ctrlKey || event.type === 'wheel') && !event.button; -} - -function defaultExtent$1() { - var e = this; - if (e instanceof SVGElement) { - e = e.ownerSVGElement || e; - if (e.hasAttribute("viewBox")) { - e = e.viewBox.baseVal; - return [[e.x, e.y], [e.x + e.width, e.y + e.height]]; - } - return [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]; - } - return [[0, 0], [e.clientWidth, e.clientHeight]]; -} - -function defaultTransform() { - return this.__zoom || identity$9; -} - -function defaultWheelDelta(event) { - return -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * (event.ctrlKey ? 10 : 1); -} - -function defaultTouchable$2() { - return navigator.maxTouchPoints || ("ontouchstart" in this); -} - -function defaultConstrain(transform, extent, translateExtent) { - var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0], - dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0], - dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1], - dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1]; - return transform.translate( - dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1), - dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1) - ); -} - -function zoom() { - var filter = defaultFilter$2, - extent = defaultExtent$1, - constrain = defaultConstrain, - wheelDelta = defaultWheelDelta, - touchable = defaultTouchable$2, - scaleExtent = [0, Infinity], - translateExtent = [[-Infinity, -Infinity], [Infinity, Infinity]], - duration = 250, - interpolate = interpolateZoom, - listeners = dispatch("start", "zoom", "end"), - touchstarting, - touchfirst, - touchending, - touchDelay = 500, - wheelDelay = 150, - clickDistance2 = 0, - tapDistance = 10; - - function zoom(selection) { - selection - .property("__zoom", defaultTransform) - .on("wheel.zoom", wheeled) - .on("mousedown.zoom", mousedowned) - .on("dblclick.zoom", dblclicked) - .filter(touchable) - .on("touchstart.zoom", touchstarted) - .on("touchmove.zoom", touchmoved) - .on("touchend.zoom touchcancel.zoom", touchended) - .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)"); - } - - zoom.transform = function(collection, transform, point, event) { - var selection = collection.selection ? collection.selection() : collection; - selection.property("__zoom", defaultTransform); - if (collection !== selection) { - schedule(collection, transform, point, event); - } else { - selection.interrupt().each(function() { - gesture(this, arguments) - .event(event) - .start() - .zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform) - .end(); - }); - } - }; - - zoom.scaleBy = function(selection, k, p, event) { - zoom.scaleTo(selection, function() { - var k0 = this.__zoom.k, - k1 = typeof k === "function" ? k.apply(this, arguments) : k; - return k0 * k1; - }, p, event); - }; - - zoom.scaleTo = function(selection, k, p, event) { - zoom.transform(selection, function() { - var e = extent.apply(this, arguments), - t0 = this.__zoom, - p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p, - p1 = t0.invert(p0), - k1 = typeof k === "function" ? k.apply(this, arguments) : k; - return constrain(translate(scale(t0, k1), p0, p1), e, translateExtent); - }, p, event); - }; - - zoom.translateBy = function(selection, x, y, event) { - zoom.transform(selection, function() { - return constrain(this.__zoom.translate( - typeof x === "function" ? x.apply(this, arguments) : x, - typeof y === "function" ? y.apply(this, arguments) : y - ), extent.apply(this, arguments), translateExtent); - }, null, event); - }; - - zoom.translateTo = function(selection, x, y, p, event) { - zoom.transform(selection, function() { - var e = extent.apply(this, arguments), - t = this.__zoom, - p0 = p == null ? centroid(e) : typeof p === "function" ? p.apply(this, arguments) : p; - return constrain(identity$9.translate(p0[0], p0[1]).scale(t.k).translate( - typeof x === "function" ? -x.apply(this, arguments) : -x, - typeof y === "function" ? -y.apply(this, arguments) : -y - ), e, translateExtent); - }, p, event); - }; - - function scale(transform, k) { - k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k)); - return k === transform.k ? transform : new Transform(k, transform.x, transform.y); - } - - function translate(transform, p0, p1) { - var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k; - return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y); - } - - function centroid(extent) { - return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2]; - } - - function schedule(transition, transform, point, event) { - transition - .on("start.zoom", function() { gesture(this, arguments).event(event).start(); }) - .on("interrupt.zoom end.zoom", function() { gesture(this, arguments).event(event).end(); }) - .tween("zoom", function() { - var that = this, - args = arguments, - g = gesture(that, args).event(event), - e = extent.apply(that, args), - p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, - w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), - a = that.__zoom, - b = typeof transform === "function" ? transform.apply(that, args) : transform, - i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k)); - return function(t) { - if (t === 1) t = b; // Avoid rounding error on end. - else { var l = i(t), k = w / l[2]; t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k); } - g.zoom(null, t); - }; - }); - } - - function gesture(that, args, clean) { - return (!clean && that.__zooming) || new Gesture(that, args); - } - - function Gesture(that, args) { - this.that = that; - this.args = args; - this.active = 0; - this.sourceEvent = null; - this.extent = extent.apply(that, args); - this.taps = 0; - } - - Gesture.prototype = { - event: function(event) { - if (event) this.sourceEvent = event; - return this; - }, - start: function() { - if (++this.active === 1) { - this.that.__zooming = this; - this.emit("start"); - } - return this; - }, - zoom: function(key, transform) { - if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]); - if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]); - if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]); - this.that.__zoom = transform; - this.emit("zoom"); - return this; - }, - end: function() { - if (--this.active === 0) { - delete this.that.__zooming; - this.emit("end"); - } - return this; - }, - emit: function(type) { - var d = select(this.that).datum(); - listeners.call( - type, - this.that, - new ZoomEvent(type, { - sourceEvent: this.sourceEvent, - target: zoom, - type, - transform: this.that.__zoom, - dispatch: listeners - }), - d - ); - } - }; - - function wheeled(event, ...args) { - if (!filter.apply(this, arguments)) return; - var g = gesture(this, args).event(event), - t = this.__zoom, - k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))), - p = pointer(event); - - // If the mouse is in the same location as before, reuse it. - // If there were recent wheel events, reset the wheel idle timeout. - if (g.wheel) { - if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) { - g.mouse[1] = t.invert(g.mouse[0] = p); - } - clearTimeout(g.wheel); - } - - // If this wheel event won’t trigger a transform change, ignore it. - else if (t.k === k) return; - - // Otherwise, capture the mouse point and location at the start. - else { - g.mouse = [p, t.invert(p)]; - interrupt(this); - g.start(); - } - - noevent$2(event); - g.wheel = setTimeout(wheelidled, wheelDelay); - g.zoom("mouse", constrain(translate(scale(t, k), g.mouse[0], g.mouse[1]), g.extent, translateExtent)); - - function wheelidled() { - g.wheel = null; - g.end(); - } - } - - function mousedowned(event, ...args) { - if (touchending || !filter.apply(this, arguments)) return; - var g = gesture(this, args, true).event(event), - v = select(event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true), - p = pointer(event, currentTarget), - currentTarget = event.currentTarget, - x0 = event.clientX, - y0 = event.clientY; - - dragDisable(event.view); - nopropagation$2(event); - g.mouse = [p, this.__zoom.invert(p)]; - interrupt(this); - g.start(); - - function mousemoved(event) { - noevent$2(event); - if (!g.moved) { - var dx = event.clientX - x0, dy = event.clientY - y0; - g.moved = dx * dx + dy * dy > clickDistance2; - } - g.event(event) - .zoom("mouse", constrain(translate(g.that.__zoom, g.mouse[0] = pointer(event, currentTarget), g.mouse[1]), g.extent, translateExtent)); - } - - function mouseupped(event) { - v.on("mousemove.zoom mouseup.zoom", null); - yesdrag(event.view, g.moved); - noevent$2(event); - g.event(event).end(); - } - } - - function dblclicked(event, ...args) { - if (!filter.apply(this, arguments)) return; - var t0 = this.__zoom, - p0 = pointer(event.changedTouches ? event.changedTouches[0] : event, this), - p1 = t0.invert(p0), - k1 = t0.k * (event.shiftKey ? 0.5 : 2), - t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent); - - noevent$2(event); - if (duration > 0) select(this).transition().duration(duration).call(schedule, t1, p0, event); - else select(this).call(zoom.transform, t1, p0, event); - } - - function touchstarted(event, ...args) { - if (!filter.apply(this, arguments)) return; - var touches = event.touches, - n = touches.length, - g = gesture(this, args, event.changedTouches.length === n).event(event), - started, i, t, p; - - nopropagation$2(event); - for (i = 0; i < n; ++i) { - t = touches[i], p = pointer(t, this); - p = [p, this.__zoom.invert(p), t.identifier]; - if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting; - else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0; - } - - if (touchstarting) touchstarting = clearTimeout(touchstarting); - - if (started) { - if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() { touchstarting = null; }, touchDelay); - interrupt(this); - g.start(); - } - } - - function touchmoved(event, ...args) { - if (!this.__zooming) return; - var g = gesture(this, args).event(event), - touches = event.changedTouches, - n = touches.length, i, t, p, l; - - noevent$2(event); - for (i = 0; i < n; ++i) { - t = touches[i], p = pointer(t, this); - if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p; - else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p; - } - t = g.that.__zoom; - if (g.touch1) { - var p0 = g.touch0[0], l0 = g.touch0[1], - p1 = g.touch1[0], l1 = g.touch1[1], - dp = (dp = p1[0] - p0[0]) * dp + (dp = p1[1] - p0[1]) * dp, - dl = (dl = l1[0] - l0[0]) * dl + (dl = l1[1] - l0[1]) * dl; - t = scale(t, Math.sqrt(dp / dl)); - p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2]; - l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2]; - } - else if (g.touch0) p = g.touch0[0], l = g.touch0[1]; - else return; - - g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent)); - } - - function touchended(event, ...args) { - if (!this.__zooming) return; - var g = gesture(this, args).event(event), - touches = event.changedTouches, - n = touches.length, i, t; - - nopropagation$2(event); - if (touchending) clearTimeout(touchending); - touchending = setTimeout(function() { touchending = null; }, touchDelay); - for (i = 0; i < n; ++i) { - t = touches[i]; - if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0; - else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1; - } - if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1; - if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]); - else { - g.end(); - // If this was a dbltap, reroute to the (optional) dblclick.zoom handler. - if (g.taps === 2) { - t = pointer(t, this); - if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) { - var p = select(this).on("dblclick.zoom"); - if (p) p.apply(this, arguments); - } - } - } - } - - zoom.wheelDelta = function(_) { - return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : constant$b(+_), zoom) : wheelDelta; - }; - - zoom.filter = function(_) { - return arguments.length ? (filter = typeof _ === "function" ? _ : constant$b(!!_), zoom) : filter; - }; - - zoom.touchable = function(_) { - return arguments.length ? (touchable = typeof _ === "function" ? _ : constant$b(!!_), zoom) : touchable; - }; - - zoom.extent = function(_) { - return arguments.length ? (extent = typeof _ === "function" ? _ : constant$b([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent; - }; - - zoom.scaleExtent = function(_) { - return arguments.length ? (scaleExtent[0] = +_[0], scaleExtent[1] = +_[1], zoom) : [scaleExtent[0], scaleExtent[1]]; - }; - - zoom.translateExtent = function(_) { - return arguments.length ? (translateExtent[0][0] = +_[0][0], translateExtent[1][0] = +_[1][0], translateExtent[0][1] = +_[0][1], translateExtent[1][1] = +_[1][1], zoom) : [[translateExtent[0][0], translateExtent[0][1]], [translateExtent[1][0], translateExtent[1][1]]]; - }; - - zoom.constrain = function(_) { - return arguments.length ? (constrain = _, zoom) : constrain; - }; - - zoom.duration = function(_) { - return arguments.length ? (duration = +_, zoom) : duration; - }; - - zoom.interpolate = function(_) { - return arguments.length ? (interpolate = _, zoom) : interpolate; - }; - - zoom.on = function() { - var value = listeners.on.apply(listeners, arguments); - return value === listeners ? zoom : value; - }; - - zoom.clickDistance = function(_) { - return arguments.length ? (clickDistance2 = (_ = +_) * _, zoom) : Math.sqrt(clickDistance2); - }; - - zoom.tapDistance = function(_) { - return arguments.length ? (tapDistance = +_, zoom) : tapDistance; - }; - - return zoom; -} - -exports.Adder = Adder; -exports.Delaunay = Delaunay; -exports.FormatSpecifier = FormatSpecifier; -exports.Voronoi = Voronoi; -exports.active = active; -exports.arc = arc; -exports.area = area$3; -exports.areaRadial = areaRadial; -exports.ascending = ascending; -exports.autoType = autoType; -exports.axisBottom = axisBottom; -exports.axisLeft = axisLeft; -exports.axisRight = axisRight; -exports.axisTop = axisTop; -exports.bin = bin; -exports.bisect = bisectRight; -exports.bisectCenter = bisectCenter; -exports.bisectLeft = bisectLeft; -exports.bisectRight = bisectRight; -exports.bisector = bisector; -exports.blob = blob; -exports.brush = brush; -exports.brushSelection = brushSelection; -exports.brushX = brushX; -exports.brushY = brushY; -exports.buffer = buffer; -exports.chord = chord; -exports.chordDirected = chordDirected; -exports.chordTranspose = chordTranspose; -exports.cluster = cluster; -exports.color = color; -exports.contourDensity = density; -exports.contours = contours; -exports.count = count; -exports.create = create; -exports.creator = creator; -exports.cross = cross; -exports.csv = csv$1; -exports.csvFormat = csvFormat; -exports.csvFormatBody = csvFormatBody; -exports.csvFormatRow = csvFormatRow; -exports.csvFormatRows = csvFormatRows; -exports.csvFormatValue = csvFormatValue; -exports.csvParse = csvParse; -exports.csvParseRows = csvParseRows; -exports.cubehelix = cubehelix; -exports.cumsum = cumsum; -exports.curveBasis = basis$2; -exports.curveBasisClosed = basisClosed$1; -exports.curveBasisOpen = basisOpen; -exports.curveBundle = bundle; -exports.curveCardinal = cardinal; -exports.curveCardinalClosed = cardinalClosed; -exports.curveCardinalOpen = cardinalOpen; -exports.curveCatmullRom = catmullRom; -exports.curveCatmullRomClosed = catmullRomClosed; -exports.curveCatmullRomOpen = catmullRomOpen; -exports.curveLinear = curveLinear; -exports.curveLinearClosed = linearClosed; -exports.curveMonotoneX = monotoneX; -exports.curveMonotoneY = monotoneY; -exports.curveNatural = natural; -exports.curveStep = step; -exports.curveStepAfter = stepAfter; -exports.curveStepBefore = stepBefore; -exports.descending = descending; -exports.deviation = deviation; -exports.difference = difference; -exports.disjoint = disjoint; -exports.dispatch = dispatch; -exports.drag = drag; -exports.dragDisable = dragDisable; -exports.dragEnable = yesdrag; -exports.dsv = dsv; -exports.dsvFormat = dsvFormat; -exports.easeBack = backInOut; -exports.easeBackIn = backIn; -exports.easeBackInOut = backInOut; -exports.easeBackOut = backOut; -exports.easeBounce = bounceOut; -exports.easeBounceIn = bounceIn; -exports.easeBounceInOut = bounceInOut; -exports.easeBounceOut = bounceOut; -exports.easeCircle = circleInOut; -exports.easeCircleIn = circleIn; -exports.easeCircleInOut = circleInOut; -exports.easeCircleOut = circleOut; -exports.easeCubic = cubicInOut; -exports.easeCubicIn = cubicIn; -exports.easeCubicInOut = cubicInOut; -exports.easeCubicOut = cubicOut; -exports.easeElastic = elasticOut; -exports.easeElasticIn = elasticIn; -exports.easeElasticInOut = elasticInOut; -exports.easeElasticOut = elasticOut; -exports.easeExp = expInOut; -exports.easeExpIn = expIn; -exports.easeExpInOut = expInOut; -exports.easeExpOut = expOut; -exports.easeLinear = linear$1; -exports.easePoly = polyInOut; -exports.easePolyIn = polyIn; -exports.easePolyInOut = polyInOut; -exports.easePolyOut = polyOut; -exports.easeQuad = quadInOut; -exports.easeQuadIn = quadIn; -exports.easeQuadInOut = quadInOut; -exports.easeQuadOut = quadOut; -exports.easeSin = sinInOut; -exports.easeSinIn = sinIn; -exports.easeSinInOut = sinInOut; -exports.easeSinOut = sinOut; -exports.every = every; -exports.extent = extent; -exports.filter = filter; -exports.forceCenter = center$1; -exports.forceCollide = collide; -exports.forceLink = link; -exports.forceManyBody = manyBody; -exports.forceRadial = radial; -exports.forceSimulation = simulation; -exports.forceX = x$2; -exports.forceY = y$2; -exports.formatDefaultLocale = defaultLocale; -exports.formatLocale = formatLocale; -exports.formatSpecifier = formatSpecifier; -exports.fsum = fsum; -exports.geoAlbers = albers; -exports.geoAlbersUsa = albersUsa; -exports.geoArea = area$1; -exports.geoAzimuthalEqualArea = azimuthalEqualArea; -exports.geoAzimuthalEqualAreaRaw = azimuthalEqualAreaRaw; -exports.geoAzimuthalEquidistant = azimuthalEquidistant; -exports.geoAzimuthalEquidistantRaw = azimuthalEquidistantRaw; -exports.geoBounds = bounds; -exports.geoCentroid = centroid; -exports.geoCircle = circle; -exports.geoClipAntimeridian = clipAntimeridian; -exports.geoClipCircle = clipCircle; -exports.geoClipExtent = extent$1; -exports.geoClipRectangle = clipRectangle; -exports.geoConicConformal = conicConformal; -exports.geoConicConformalRaw = conicConformalRaw; -exports.geoConicEqualArea = conicEqualArea; -exports.geoConicEqualAreaRaw = conicEqualAreaRaw; -exports.geoConicEquidistant = conicEquidistant; -exports.geoConicEquidistantRaw = conicEquidistantRaw; -exports.geoContains = contains$1; -exports.geoDistance = distance; -exports.geoEqualEarth = equalEarth; -exports.geoEqualEarthRaw = equalEarthRaw; -exports.geoEquirectangular = equirectangular; -exports.geoEquirectangularRaw = equirectangularRaw; -exports.geoGnomonic = gnomonic; -exports.geoGnomonicRaw = gnomonicRaw; -exports.geoGraticule = graticule; -exports.geoGraticule10 = graticule10; -exports.geoIdentity = identity$5; -exports.geoInterpolate = interpolate$2; -exports.geoLength = length$2; -exports.geoMercator = mercator; -exports.geoMercatorRaw = mercatorRaw; -exports.geoNaturalEarth1 = naturalEarth1; -exports.geoNaturalEarth1Raw = naturalEarth1Raw; -exports.geoOrthographic = orthographic; -exports.geoOrthographicRaw = orthographicRaw; -exports.geoPath = index$2; -exports.geoProjection = projection; -exports.geoProjectionMutator = projectionMutator; -exports.geoRotation = rotation; -exports.geoStereographic = stereographic; -exports.geoStereographicRaw = stereographicRaw; -exports.geoStream = geoStream; -exports.geoTransform = transform; -exports.geoTransverseMercator = transverseMercator; -exports.geoTransverseMercatorRaw = transverseMercatorRaw; -exports.gray = gray; -exports.greatest = greatest; -exports.greatestIndex = greatestIndex; -exports.group = group; -exports.groups = groups; -exports.hcl = hcl; -exports.hierarchy = hierarchy; -exports.histogram = bin; -exports.hsl = hsl; -exports.html = html; -exports.image = image; -exports.index = index; -exports.indexes = indexes; -exports.interpolate = interpolate; -exports.interpolateArray = array$2; -exports.interpolateBasis = basis$1; -exports.interpolateBasisClosed = basisClosed; -exports.interpolateBlues = Blues; -exports.interpolateBrBG = BrBG; -exports.interpolateBuGn = BuGn; -exports.interpolateBuPu = BuPu; -exports.interpolateCividis = cividis; -exports.interpolateCool = cool; -exports.interpolateCubehelix = cubehelix$2; -exports.interpolateCubehelixDefault = cubehelix$3; -exports.interpolateCubehelixLong = cubehelixLong; -exports.interpolateDate = date; -exports.interpolateDiscrete = discrete; -exports.interpolateGnBu = GnBu; -exports.interpolateGreens = Greens; -exports.interpolateGreys = Greys; -exports.interpolateHcl = hcl$2; -exports.interpolateHclLong = hclLong; -exports.interpolateHsl = hsl$2; -exports.interpolateHslLong = hslLong; -exports.interpolateHue = hue$1; -exports.interpolateInferno = inferno; -exports.interpolateLab = lab$1; -exports.interpolateMagma = magma; -exports.interpolateNumber = interpolateNumber; -exports.interpolateNumberArray = numberArray; -exports.interpolateObject = object; -exports.interpolateOrRd = OrRd; -exports.interpolateOranges = Oranges; -exports.interpolatePRGn = PRGn; -exports.interpolatePiYG = PiYG; -exports.interpolatePlasma = plasma; -exports.interpolatePuBu = PuBu; -exports.interpolatePuBuGn = PuBuGn; -exports.interpolatePuOr = PuOr; -exports.interpolatePuRd = PuRd; -exports.interpolatePurples = Purples; -exports.interpolateRainbow = rainbow; -exports.interpolateRdBu = RdBu; -exports.interpolateRdGy = RdGy; -exports.interpolateRdPu = RdPu; -exports.interpolateRdYlBu = RdYlBu; -exports.interpolateRdYlGn = RdYlGn; -exports.interpolateReds = Reds; -exports.interpolateRgb = interpolateRgb; -exports.interpolateRgbBasis = rgbBasis; -exports.interpolateRgbBasisClosed = rgbBasisClosed; -exports.interpolateRound = interpolateRound; -exports.interpolateSinebow = sinebow; -exports.interpolateSpectral = Spectral; -exports.interpolateString = interpolateString; -exports.interpolateTransformCss = interpolateTransformCss; -exports.interpolateTransformSvg = interpolateTransformSvg; -exports.interpolateTurbo = turbo; -exports.interpolateViridis = viridis; -exports.interpolateWarm = warm; -exports.interpolateYlGn = YlGn; -exports.interpolateYlGnBu = YlGnBu; -exports.interpolateYlOrBr = YlOrBr; -exports.interpolateYlOrRd = YlOrRd; -exports.interpolateZoom = interpolateZoom; -exports.interrupt = interrupt; -exports.intersection = intersection; -exports.interval = interval$1; -exports.isoFormat = formatIso; -exports.isoParse = parseIso; -exports.json = json; -exports.lab = lab; -exports.lch = lch; -exports.least = least; -exports.leastIndex = leastIndex; -exports.line = line; -exports.lineRadial = lineRadial$1; -exports.linkHorizontal = linkHorizontal; -exports.linkRadial = linkRadial; -exports.linkVertical = linkVertical; -exports.local = local; -exports.map = map; -exports.matcher = matcher; -exports.max = max; -exports.maxIndex = maxIndex; -exports.mean = mean; -exports.median = median; -exports.merge = merge; -exports.min = min; -exports.minIndex = minIndex; -exports.namespace = namespace; -exports.namespaces = namespaces; -exports.nice = nice; -exports.now = now; -exports.pack = index$3; -exports.packEnclose = enclose; -exports.packSiblings = siblings; -exports.pairs = pairs; -exports.partition = partition; -exports.path = path; -exports.permute = permute; -exports.pie = pie; -exports.piecewise = piecewise; -exports.pointRadial = pointRadial; -exports.pointer = pointer; -exports.pointers = pointers; -exports.polygonArea = area$2; -exports.polygonCentroid = centroid$1; -exports.polygonContains = contains$2; -exports.polygonHull = hull; -exports.polygonLength = length$3; -exports.precisionFixed = precisionFixed; -exports.precisionPrefix = precisionPrefix; -exports.precisionRound = precisionRound; -exports.quadtree = quadtree; -exports.quantile = quantile; -exports.quantileSorted = quantileSorted; -exports.quantize = quantize; -exports.quickselect = quickselect; -exports.radialArea = areaRadial; -exports.radialLine = lineRadial$1; -exports.randomBates = bates; -exports.randomBernoulli = bernoulli; -exports.randomBeta = beta; -exports.randomBinomial = binomial; -exports.randomCauchy = cauchy; -exports.randomExponential = exponential$1; -exports.randomGamma = gamma$1; -exports.randomGeometric = geometric; -exports.randomInt = int; -exports.randomIrwinHall = irwinHall; -exports.randomLcg = lcg$1; -exports.randomLogNormal = logNormal; -exports.randomLogistic = logistic; -exports.randomNormal = normal; -exports.randomPareto = pareto; -exports.randomPoisson = poisson; -exports.randomUniform = uniform; -exports.randomWeibull = weibull; -exports.range = sequence; -exports.reduce = reduce; -exports.reverse = reverse; -exports.rgb = rgb; -exports.ribbon = ribbon$1; -exports.ribbonArrow = ribbonArrow; -exports.rollup = rollup; -exports.rollups = rollups; -exports.scaleBand = band; -exports.scaleDiverging = diverging; -exports.scaleDivergingLog = divergingLog; -exports.scaleDivergingPow = divergingPow; -exports.scaleDivergingSqrt = divergingSqrt; -exports.scaleDivergingSymlog = divergingSymlog; -exports.scaleIdentity = identity$7; -exports.scaleImplicit = implicit; -exports.scaleLinear = linear$2; -exports.scaleLog = log$1; -exports.scaleOrdinal = ordinal; -exports.scalePoint = point; -exports.scalePow = pow$2; -exports.scaleQuantile = quantile$1; -exports.scaleQuantize = quantize$1; -exports.scaleRadial = radial$1; -exports.scaleSequential = sequential; -exports.scaleSequentialLog = sequentialLog; -exports.scaleSequentialPow = sequentialPow; -exports.scaleSequentialQuantile = sequentialQuantile; -exports.scaleSequentialSqrt = sequentialSqrt; -exports.scaleSequentialSymlog = sequentialSymlog; -exports.scaleSqrt = sqrt$1; -exports.scaleSymlog = symlog; -exports.scaleThreshold = threshold; -exports.scaleTime = time; -exports.scaleUtc = utcTime; -exports.scan = scan; -exports.schemeAccent = Accent; -exports.schemeBlues = scheme$l; -exports.schemeBrBG = scheme; -exports.schemeBuGn = scheme$9; -exports.schemeBuPu = scheme$a; -exports.schemeCategory10 = category10; -exports.schemeDark2 = Dark2; -exports.schemeGnBu = scheme$b; -exports.schemeGreens = scheme$m; -exports.schemeGreys = scheme$n; -exports.schemeOrRd = scheme$c; -exports.schemeOranges = scheme$q; -exports.schemePRGn = scheme$1; -exports.schemePaired = Paired; -exports.schemePastel1 = Pastel1; -exports.schemePastel2 = Pastel2; -exports.schemePiYG = scheme$2; -exports.schemePuBu = scheme$e; -exports.schemePuBuGn = scheme$d; -exports.schemePuOr = scheme$3; -exports.schemePuRd = scheme$f; -exports.schemePurples = scheme$o; -exports.schemeRdBu = scheme$4; -exports.schemeRdGy = scheme$5; -exports.schemeRdPu = scheme$g; -exports.schemeRdYlBu = scheme$6; -exports.schemeRdYlGn = scheme$7; -exports.schemeReds = scheme$p; -exports.schemeSet1 = Set1; -exports.schemeSet2 = Set2; -exports.schemeSet3 = Set3; -exports.schemeSpectral = scheme$8; -exports.schemeTableau10 = Tableau10; -exports.schemeYlGn = scheme$i; -exports.schemeYlGnBu = scheme$h; -exports.schemeYlOrBr = scheme$j; -exports.schemeYlOrRd = scheme$k; -exports.select = select; -exports.selectAll = selectAll; -exports.selection = selection; -exports.selector = selector; -exports.selectorAll = selectorAll; -exports.shuffle = shuffle; -exports.shuffler = shuffler; -exports.some = some; -exports.sort = sort; -exports.stack = stack; -exports.stackOffsetDiverging = diverging$1; -exports.stackOffsetExpand = expand; -exports.stackOffsetNone = none$1; -exports.stackOffsetSilhouette = silhouette; -exports.stackOffsetWiggle = wiggle; -exports.stackOrderAppearance = appearance; -exports.stackOrderAscending = ascending$3; -exports.stackOrderDescending = descending$2; -exports.stackOrderInsideOut = insideOut; -exports.stackOrderNone = none$2; -exports.stackOrderReverse = reverse$1; -exports.stratify = stratify; -exports.style = styleValue; -exports.subset = subset; -exports.sum = sum; -exports.superset = superset; -exports.svg = svg; -exports.symbol = symbol; -exports.symbolCircle = circle$2; -exports.symbolCross = cross$2; -exports.symbolDiamond = diamond; -exports.symbolSquare = square$1; -exports.symbolStar = star; -exports.symbolTriangle = triangle; -exports.symbolWye = wye; -exports.symbols = symbols; -exports.text = text; -exports.thresholdFreedmanDiaconis = freedmanDiaconis; -exports.thresholdScott = scott; -exports.thresholdSturges = thresholdSturges; -exports.tickFormat = tickFormat; -exports.tickIncrement = tickIncrement; -exports.tickStep = tickStep; -exports.ticks = ticks; -exports.timeDay = day; -exports.timeDays = days; -exports.timeFormatDefaultLocale = defaultLocale$1; -exports.timeFormatLocale = formatLocale$1; -exports.timeFriday = friday; -exports.timeFridays = fridays; -exports.timeHour = hour; -exports.timeHours = hours; -exports.timeInterval = newInterval; -exports.timeMillisecond = millisecond; -exports.timeMilliseconds = milliseconds; -exports.timeMinute = minute; -exports.timeMinutes = minutes; -exports.timeMonday = monday; -exports.timeMondays = mondays; -exports.timeMonth = month; -exports.timeMonths = months; -exports.timeSaturday = saturday; -exports.timeSaturdays = saturdays; -exports.timeSecond = second; -exports.timeSeconds = seconds; -exports.timeSunday = sunday; -exports.timeSundays = sundays; -exports.timeThursday = thursday; -exports.timeThursdays = thursdays; -exports.timeTuesday = tuesday; -exports.timeTuesdays = tuesdays; -exports.timeWednesday = wednesday; -exports.timeWednesdays = wednesdays; -exports.timeWeek = sunday; -exports.timeWeeks = sundays; -exports.timeYear = year; -exports.timeYears = years; -exports.timeout = timeout$1; -exports.timer = timer; -exports.timerFlush = timerFlush; -exports.transition = transition; -exports.transpose = transpose; -exports.tree = tree; -exports.treemap = index$4; -exports.treemapBinary = binary; -exports.treemapDice = treemapDice; -exports.treemapResquarify = resquarify; -exports.treemapSlice = treemapSlice; -exports.treemapSliceDice = sliceDice; -exports.treemapSquarify = squarify; -exports.tsv = tsv$1; -exports.tsvFormat = tsvFormat; -exports.tsvFormatBody = tsvFormatBody; -exports.tsvFormatRow = tsvFormatRow; -exports.tsvFormatRows = tsvFormatRows; -exports.tsvFormatValue = tsvFormatValue; -exports.tsvParse = tsvParse; -exports.tsvParseRows = tsvParseRows; -exports.union = union; -exports.utcDay = utcDay; -exports.utcDays = utcDays; -exports.utcFriday = utcFriday; -exports.utcFridays = utcFridays; -exports.utcHour = utcHour; -exports.utcHours = utcHours; -exports.utcMillisecond = millisecond; -exports.utcMilliseconds = milliseconds; -exports.utcMinute = utcMinute; -exports.utcMinutes = utcMinutes; -exports.utcMonday = utcMonday; -exports.utcMondays = utcMondays; -exports.utcMonth = utcMonth; -exports.utcMonths = utcMonths; -exports.utcSaturday = utcSaturday; -exports.utcSaturdays = utcSaturdays; -exports.utcSecond = second; -exports.utcSeconds = seconds; -exports.utcSunday = utcSunday; -exports.utcSundays = utcSundays; -exports.utcThursday = utcThursday; -exports.utcThursdays = utcThursdays; -exports.utcTuesday = utcTuesday; -exports.utcTuesdays = utcTuesdays; -exports.utcWednesday = utcWednesday; -exports.utcWednesdays = utcWednesdays; -exports.utcWeek = utcSunday; -exports.utcWeeks = utcSundays; -exports.utcYear = utcYear; -exports.utcYears = utcYears; -exports.variance = variance; -exports.version = version; -exports.window = defaultView; -exports.xml = xml; -exports.zip = zip; -exports.zoom = zoom; -exports.zoomIdentity = identity$9; -exports.zoomTransform = transform$1; - -Object.defineProperty(exports, '__esModule', { value: true }); - -}))); diff --git a/node_modules/d3/dist/d3.min.js b/node_modules/d3/dist/d3.min.js deleted file mode 100644 index f5d2c719966d715d365486448ab392a63c4c0df6..0000000000000000000000000000000000000000 --- a/node_modules/d3/dist/d3.min.js +++ /dev/null @@ -1,2 +0,0 @@ -// https://d3js.org v6.2.0 Copyright 2020 Mike Bostock -!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{})}(this,(function(t){"use strict";function n(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function e(t){let e=t,r=t;function i(t,n,e,i){for(null==e&&(e=0),null==i&&(i=t.length);e<i;){const o=e+i>>>1;r(t[o],n)<0?e=o+1:i=o}return e}return 1===t.length&&(e=(n,e)=>t(n)-e,r=function(t){return(e,r)=>n(t(e),r)}(t)),{left:i,center:function(t,n,r,o){null==r&&(r=0),null==o&&(o=t.length);const a=i(t,n,r,o-1);return a>r&&e(t[a-1],n)>-e(t[a],n)?a-1:a},right:function(t,n,e,i){for(null==e&&(e=0),null==i&&(i=t.length);e<i;){const o=e+i>>>1;r(t[o],n)>0?i=o:e=o+1}return e}}}function r(t){return null===t?NaN:+t}const i=e(n),o=i.right,a=i.left,u=e(r).center;function c(t,n){let e=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&++e;else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(i=+i)>=i&&++e}return e}function f(t){return 0|t.length}function s(t){return!(t>0)}function l(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function h(t,n){let e,r=0,i=0,o=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(e=n-i,i+=e/++r,o+=e*(n-i));else{let a=-1;for(let u of t)null!=(u=n(u,++a,t))&&(u=+u)>=u&&(e=u-i,i+=e/++r,o+=e*(u-i))}if(r>1)return o/(r-1)}function d(t,n){const e=h(t,n);return e?Math.sqrt(e):e}function p(t,n){let e,r;if(void 0===n)for(const n of t)null!=n&&(void 0===e?n>=n&&(e=r=n):(e>n&&(e=n),r<n&&(r=n)));else{let i=-1;for(let o of t)null!=(o=n(o,++i,t))&&(void 0===e?o>=o&&(e=r=o):(e>o&&(e=o),r<o&&(r=o)))}return[e,r]}class g{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const n=this._partials;let e=0;for(let r=0;r<this._n&&r<32;r++){const i=n[r],o=t+i,a=Math.abs(t)<Math.abs(i)?t-(o-i):i-(o-t);a&&(n[e++]=a),t=o}return n[e]=t,this._n=e+1,this}valueOf(){const t=this._partials;let n,e,r,i=this._n,o=0;if(i>0){for(o=t[--i];i>0&&(n=o,e=t[--i],o=n+e,r=e-(o-n),!r););i>0&&(r<0&&t[i-1]<0||r>0&&t[i-1]>0)&&(e=2*r,n=o+e,e==n-o&&(o=n))}return o}}function y(t){return t}function v(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function _(t,n,e,r){return function t(i,o){if(o>=r.length)return e(i);const a=new Map,u=r[o++];let c=-1;for(const t of i){const n=u(t,++c,i),e=a.get(n);e?e.push(t):a.set(n,[t])}for(const[n,e]of a)a.set(n,t(e,o));return n(a)}(t,0)}var b=Array.prototype.slice;function m(t){return function(){return t}}var x=Math.sqrt(50),w=Math.sqrt(10),M=Math.sqrt(2);function A(t,n,e){var r,i,o,a,u=-1;if(e=+e,(t=+t)===(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(a=T(t,n,e))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),n=Math.floor(n/a),o=new Array(i=Math.ceil(n-t+1));++u<i;)o[u]=(t+u)*a;else for(a=-a,t=Math.ceil(t*a),n=Math.floor(n*a),o=new Array(i=Math.ceil(n-t+1));++u<i;)o[u]=(t+u)/a;return r&&o.reverse(),o}function T(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=x?10:o>=w?5:o>=M?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=x?10:o>=w?5:o>=M?2:1)}function S(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=x?i*=10:o>=w?i*=5:o>=M&&(i*=2),n<t?-i:i}function E(t,n,e){let r;for(;;){const i=T(t,n,e);if(i===r||0===i||!isFinite(i))return[t,n];i>0?(t=Math.floor(t/i)*i,n=Math.ceil(n/i)*i):i<0&&(t=Math.ceil(t*i)/i,n=Math.floor(n*i)/i),r=i}}function k(t){return Math.ceil(Math.log(c(t))/Math.LN2)+1}function N(){var t=y,n=p,e=k;function r(r){Array.isArray(r)||(r=Array.from(r));var i,a,u=r.length,c=new Array(u);for(i=0;i<u;++i)c[i]=t(r[i],i,r);var f=n(c),s=f[0],l=f[1],h=e(c,s,l);Array.isArray(h)||(h=+h,n===p&&([s,l]=E(s,l,h)),(h=A(s,l,h))[h.length-1]===l&&h.pop());for(var d=h.length;h[0]<=s;)h.shift(),--d;for(;h[d-1]>l;)h.pop(),--d;var g,y=new Array(d+1);for(i=0;i<=d;++i)(g=y[i]=[]).x0=i>0?h[i-1]:s,g.x1=i<d?h[i]:l;for(i=0;i<u;++i)s<=(a=c[i])&&a<=l&&y[o(h,a,0,d)].push(r[i]);return y}return r.value=function(n){return arguments.length?(t="function"==typeof n?n:m(n),r):t},r.domain=function(t){return arguments.length?(n="function"==typeof t?t:m([t[0],t[1]]),r):n},r.thresholds=function(t){return arguments.length?(e="function"==typeof t?t:Array.isArray(t)?m(b.call(t)):m(t),r):e},r}function C(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e<n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e<i||void 0===e&&i>=i)&&(e=i)}return e}function P(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e>i||void 0===e&&i>=i)&&(e=i)}return e}function z(t,e,r=0,i=t.length-1,o=n){for(;i>r;){if(i-r>600){const n=i-r+1,a=e-r+1,u=Math.log(n),c=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*c*(n-c)/n)*(a-n/2<0?-1:1);z(t,e,Math.max(r,Math.floor(e-a*c/n+f)),Math.min(i,Math.floor(e+(n-a)*c/n+f)),o)}const n=t[e];let a=r,u=i;for(D(t,r,e),o(t[i],n)>0&&D(t,r,i);a<u;){for(D(t,a,u),++a,--u;o(t[a],n)<0;)++a;for(;o(t[u],n)>0;)--u}0===o(t[r],n)?D(t,r,u):(++u,D(t,u,i)),u<=e&&(r=u+1),e<=u&&(i=u-1)}return t}function D(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function q(t,n,e){if(r=(t=Float64Array.from(function*(t,n){if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(yield n);else{let e=-1;for(let r of t)null!=(r=n(r,++e,t))&&(r=+r)>=r&&(yield r)}}(t,e))).length){if((n=+n)<=0||r<2)return P(t);if(n>=1)return C(t);var r,i=(r-1)*n,o=Math.floor(i),a=C(z(t,o).subarray(0,o+1));return a+(P(t.subarray(o+1))-a)*(i-o)}}function R(t,n,e=r){if(i=t.length){if((n=+n)<=0||i<2)return+e(t[0],0,t);if(n>=1)return+e(t[i-1],i-1,t);var i,o=(i-1)*n,a=Math.floor(o),u=+e(t[a],a,t);return u+(+e(t[a+1],a+1,t)-u)*(o-a)}}function F(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e<n||void 0===e&&n>=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e<o||void 0===e&&o>=o)&&(e=o,r=i);return r}function O(t){return Array.from(function*(t){for(const n of t)yield*n}(t))}function U(t,n){let e,r=-1,i=-1;if(void 0===n)for(const n of t)++i,null!=n&&(e>n||void 0===e&&n>=n)&&(e=n,r=i);else for(let o of t)null!=(o=n(o,++i,t))&&(e>o||void 0===e&&o>=o)&&(e=o,r=i);return r}function I(t,n){return[t,n]}function B(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r<i;)o[r]=t+r*e;return o}function Y(t,e=n){if(1===e.length)return U(t,e);let r,i=-1,o=-1;for(const n of t)++o,(i<0?0===e(n,n):e(n,r)<0)&&(r=n,i=o);return i}var L=j(Math.random);function j(t){return function(n,e=0,r=n.length){let i=r-(e=+e);for(;i;){const r=t()*i--|0,o=n[i+e];n[i+e]=n[r+e],n[r+e]=o}return n}}function H(t){if(!(i=t.length))return[];for(var n=-1,e=P(t,X),r=new Array(e);++n<e;)for(var i,o=-1,a=r[n]=new Array(i);++o<i;)a[o]=t[o][n];return r}function X(t){return t.length}function G(t){return t instanceof Set?t:new Set(t)}function V(t,n){const e=t[Symbol.iterator](),r=new Set;for(const t of n){if(r.has(t))continue;let n,i;for(;({value:n,done:i}=e.next());){if(i)return!1;if(r.add(n),Object.is(t,n))break}}return!0}var $=Array.prototype.slice;function W(t){return t}var Z=1e-6;function K(t){return"translate("+(t+.5)+",0)"}function Q(t){return"translate(0,"+(t+.5)+")"}function J(t){return n=>+t(n)}function tt(t){var n=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(n=Math.round(n)),function(e){return+t(e)+n}}function nt(){return!this.__axis}function et(t,n){var e=[],r=null,i=null,o=6,a=6,u=3,c=1===t||4===t?-1:1,f=4===t||2===t?"x":"y",s=1===t||3===t?K:Q;function l(l){var h=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,d=null==i?n.tickFormat?n.tickFormat.apply(n,e):W:i,p=Math.max(o,0)+u,g=n.range(),y=+g[0]+.5,v=+g[g.length-1]+.5,_=(n.bandwidth?tt:J)(n.copy()),b=l.selection?l.selection():l,m=b.selectAll(".domain").data([null]),x=b.selectAll(".tick").data(h,n).order(),w=x.exit(),M=x.enter().append("g").attr("class","tick"),A=x.select("line"),T=x.select("text");m=m.merge(m.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(M),A=A.merge(M.append("line").attr("stroke","currentColor").attr(f+"2",c*o)),T=T.merge(M.append("text").attr("fill","currentColor").attr(f,c*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),l!==b&&(m=m.transition(l),x=x.transition(l),A=A.transition(l),T=T.transition(l),w=w.transition(l).attr("opacity",Z).attr("transform",(function(t){return isFinite(t=_(t))?s(t):this.getAttribute("transform")})),M.attr("opacity",Z).attr("transform",(function(t){var n=this.parentNode.__axis;return s(n&&isFinite(n=n(t))?n:_(t))}))),w.remove(),m.attr("d",4===t||2==t?a?"M"+c*a+","+y+"H0.5V"+v+"H"+c*a:"M0.5,"+y+"V"+v:a?"M"+y+","+c*a+"V0.5H"+v+"V"+c*a:"M"+y+",0.5H"+v),x.attr("opacity",1).attr("transform",(function(t){return s(_(t))})),A.attr(f+"2",c*o),T.attr(f,c*p).text(d),b.filter(nt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=_}))}return l.scale=function(t){return arguments.length?(n=t,l):n},l.ticks=function(){return e=$.call(arguments),l},l.tickArguments=function(t){return arguments.length?(e=null==t?[]:$.call(t),l):e.slice()},l.tickValues=function(t){return arguments.length?(r=null==t?null:$.call(t),l):r&&r.slice()},l.tickFormat=function(t){return arguments.length?(i=t,l):i},l.tickSize=function(t){return arguments.length?(o=a=+t,l):o},l.tickSizeInner=function(t){return arguments.length?(o=+t,l):o},l.tickSizeOuter=function(t){return arguments.length?(a=+t,l):a},l.tickPadding=function(t){return arguments.length?(u=+t,l):u},l}var rt={value:()=>{}};function it(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ot(r)}function ot(t){this._=t}function at(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function ut(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function ct(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=rt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}ot.prototype=it.prototype={constructor:ot,on:function(t,n){var e,r=this._,i=at(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<a;)if(e=(t=i[o]).type)r[e]=ct(r[e],t.name,n);else if(null==n)for(e in r)r[e]=ct(r[e],t.name,null);return this}for(;++o<a;)if((e=(t=i[o]).type)&&(e=ut(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new ot(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var ft="http://www.w3.org/1999/xhtml",st={svg:"http://www.w3.org/2000/svg",xhtml:ft,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function lt(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),st.hasOwnProperty(n)?{space:st[n],local:t}:t}function ht(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===ft&&n.documentElement.namespaceURI===ft?n.createElement(t):n.createElementNS(e,t)}}function dt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function pt(t){var n=lt(t);return(n.local?dt:ht)(n)}function gt(){}function yt(t){return null==t?gt:function(){return this.querySelector(t)}}function vt(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function _t(){return[]}function bt(t){return null==t?_t:function(){return this.querySelectorAll(t)}}function mt(t){return function(){return this.matches(t)}}function xt(t){return function(n){return n.matches(t)}}var wt=Array.prototype.find;function Mt(){return this.firstElementChild}var At=Array.prototype.filter;function Tt(){return this.children}function St(t){return new Array(t.length)}function Et(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function kt(t){return function(){return t}}function Nt(t,n,e,r,i,o){for(var a,u=0,c=n.length,f=o.length;u<f;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new Et(t,o[u]);for(;u<c;++u)(a=n[u])&&(i[u]=a)}function Ct(t,n,e,r,i,o,a){var u,c,f,s=new Map,l=n.length,h=o.length,d=new Array(l);for(u=0;u<l;++u)(c=n[u])&&(d[u]=f=a.call(c,c.__data__,u,n)+"",s.has(f)?i[u]=c:s.set(f,c));for(u=0;u<h;++u)f=a.call(t,o[u],u,o)+"",(c=s.get(f))?(r[u]=c,c.__data__=o[u],s.delete(f)):e[u]=new Et(t,o[u]);for(u=0;u<l;++u)(c=n[u])&&s.get(d[u])===c&&(i[u]=c)}function Pt(t){return t.__data__}function zt(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function Dt(t){return function(){this.removeAttribute(t)}}function qt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Rt(t,n){return function(){this.setAttribute(t,n)}}function Ft(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Ot(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function Ut(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function It(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Bt(t){return function(){this.style.removeProperty(t)}}function Yt(t,n,e){return function(){this.style.setProperty(t,n,e)}}function Lt(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function jt(t,n){return t.style.getPropertyValue(n)||It(t).getComputedStyle(t,null).getPropertyValue(n)}function Ht(t){return function(){delete this[t]}}function Xt(t,n){return function(){this[t]=n}}function Gt(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function Vt(t){return t.trim().split(/^|\s+/)}function $t(t){return t.classList||new Wt(t)}function Wt(t){this._node=t,this._names=Vt(t.getAttribute("class")||"")}function Zt(t,n){for(var e=$t(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function Kt(t,n){for(var e=$t(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function Qt(t){return function(){Zt(this,t)}}function Jt(t){return function(){Kt(this,t)}}function tn(t,n){return function(){(n.apply(this,arguments)?Zt:Kt)(this,t)}}function nn(){this.textContent=""}function en(t){return function(){this.textContent=t}}function rn(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function on(){this.innerHTML=""}function an(t){return function(){this.innerHTML=t}}function un(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function cn(){this.nextSibling&&this.parentNode.appendChild(this)}function fn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function sn(){return null}function ln(){var t=this.parentNode;t&&t.removeChild(this)}function hn(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function dn(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function pn(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function gn(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.options);++i?n.length=i:delete this.__on}}}function yn(t,n,e){return function(){var r,i=this.__on,o=function(t){return function(n){t.call(this,n,this.__data__)}}(n);if(i)for(var a=0,u=i.length;a<u;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=e),void(r.value=n);this.addEventListener(t.type,o,e),r={type:t.type,name:t.name,value:n,listener:o,options:e},i?i.push(r):this.__on=[r]}}function vn(t,n,e){var r=It(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function _n(t,n){return function(){return vn(this,t,n)}}function bn(t,n){return function(){return vn(this,t,n.apply(this,arguments))}}Et.prototype={constructor:Et,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},Wt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var mn=[null];function xn(t,n){this._groups=t,this._parents=n}function wn(){return new xn([[document.documentElement]],mn)}function Mn(t){return"string"==typeof t?new xn([[document.querySelector(t)]],[document.documentElement]):new xn([[t]],mn)}xn.prototype=wn.prototype={constructor:xn,select:function(t){"function"!=typeof t&&(t=yt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a,u=n[i],c=u.length,f=r[i]=new Array(c),s=0;s<c;++s)(o=u[s])&&(a=t.call(o,o.__data__,s,u))&&("__data__"in o&&(a.__data__=o.__data__),f[s]=a);return new xn(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);return null==n?[]:vt(n)}}(t):bt(t);for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a,u=n[o],c=u.length,f=0;f<c;++f)(a=u[f])&&(r.push(t.call(a,a.__data__,f,u)),i.push(a));return new xn(r,i)},selectChild:function(t){return this.select(null==t?Mt:function(t){return function(){return wt.call(this.children,t)}}("function"==typeof t?t:xt(t)))},selectChildren:function(t){return this.selectAll(null==t?Tt:function(t){return function(){return At.call(this.children,t)}}("function"==typeof t?t:xt(t)))},filter:function(t){"function"!=typeof t&&(t=mt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,c=r[i]=[],f=0;f<u;++f)(o=a[f])&&t.call(o,o.__data__,f,a)&&c.push(o);return new xn(r,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,Pt);var e=n?Ct:Nt,r=this._parents,i=this._groups;"function"!=typeof t&&(t=kt(t));for(var o=i.length,a=new Array(o),u=new Array(o),c=new Array(o),f=0;f<o;++f){var s=r[f],l=i[f],h=l.length,d=vt(t.call(s,s&&s.__data__,f,r)),p=d.length,g=u[f]=new Array(p),y=a[f]=new Array(p),v=c[f]=new Array(h);e(s,l,g,y,v,d,n);for(var _,b,m=0,x=0;m<p;++m)if(_=g[m]){for(m>=x&&(x=m+1);!(b=y[x])&&++x<p;);_._next=b||null}}return(a=new xn(a,r))._enter=u,a._exit=c,a},enter:function(){return new xn(this._enter||this._groups.map(St),this._parents)},exit:function(){return new xn(this._exit||this._groups.map(St),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=n&&(i=n(i)),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){if(!(t instanceof xn))throw new Error("invalid merge");for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var c,f=n[u],s=e[u],l=f.length,h=a[u]=new Array(l),d=0;d<l;++d)(c=f[d]||s[d])&&(h[d]=c);for(;u<r;++u)a[u]=n[u];return new xn(a,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=zt);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var a,u=e[o],c=u.length,f=i[o]=new Array(c),s=0;s<c;++s)(a=u[s])&&(f[s]=a);f.sort(n)}return new xn(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,n){var e=lt(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?qt:Dt:"function"==typeof n?e.local?Ut:Ot:e.local?Ft:Rt)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?Bt:"function"==typeof n?Lt:Yt)(t,n,null==e?"":e)):jt(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?Ht:"function"==typeof n?Gt:Xt)(t,n)):this.node()[t]},classed:function(t,n){var e=Vt(t+"");if(arguments.length<2){for(var r=$t(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?tn:n?Qt:Jt)(e,n))},text:function(t){return arguments.length?this.each(null==t?nn:("function"==typeof t?rn:en)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?on:("function"==typeof t?un:an)(t)):this.node().innerHTML},raise:function(){return this.each(cn)},lower:function(){return this.each(fn)},append:function(t){var n="function"==typeof t?t:pt(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:pt(t),r=null==n?sn:"function"==typeof n?n:yt(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ln)},clone:function(t){return this.select(t?dn:hn)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=pn(t+""),a=o.length;if(!(arguments.length<2)){for(u=n?yn:gn,r=0;r<a;++r)this.each(u(o[r],n,e));return this}var u=this.node().__on;if(u)for(var c,f=0,s=u.length;f<s;++f)for(r=0,c=u[f];r<a;++r)if((i=o[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,n){return this.each(("function"==typeof n?bn:_n)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r,i=t[n],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};var An=0;function Tn(){return new Sn}function Sn(){this._="@"+(++An).toString(36)}function En(t){let n;for(;n=t.sourceEvent;)t=n;return t}function kn(t,n){if(t=En(t),void 0===n&&(n=t.currentTarget),n){var e=n.ownerSVGElement||n;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(n.getScreenCTM().inverse())).x,r.y]}if(n.getBoundingClientRect){var i=n.getBoundingClientRect();return[t.clientX-i.left-n.clientLeft,t.clientY-i.top-n.clientTop]}}return[t.pageX,t.pageY]}function Nn(t){t.stopImmediatePropagation()}function Cn(t){t.preventDefault(),t.stopImmediatePropagation()}function Pn(t){var n=t.document.documentElement,e=Mn(t).on("dragstart.drag",Cn,!0);"onselectstart"in n?e.on("selectstart.drag",Cn,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function zn(t,n){var e=t.document.documentElement,r=Mn(t).on("dragstart.drag",null);n&&(r.on("click.drag",Cn,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in e?r.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}Sn.prototype=Tn.prototype={constructor:Sn,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var Dn=t=>()=>t;function qn(t,{sourceEvent:n,subject:e,target:r,identifier:i,active:o,x:a,y:u,dx:c,dy:f,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},subject:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:c,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:s}})}function Rn(t){return!t.ctrlKey&&!t.button}function Fn(){return this.parentNode}function On(t,n){return null==n?{x:t.x,y:t.y}:n}function Un(){return navigator.maxTouchPoints||"ontouchstart"in this}function In(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function Bn(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Yn(){}qn.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Ln=.7,jn=1/Ln,Hn="\\s*([+-]?\\d+)\\s*",Xn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Gn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Vn=/^#([0-9a-f]{3,8})$/,$n=new RegExp("^rgb\\("+[Hn,Hn,Hn]+"\\)$"),Wn=new RegExp("^rgb\\("+[Gn,Gn,Gn]+"\\)$"),Zn=new RegExp("^rgba\\("+[Hn,Hn,Hn,Xn]+"\\)$"),Kn=new RegExp("^rgba\\("+[Gn,Gn,Gn,Xn]+"\\)$"),Qn=new RegExp("^hsl\\("+[Xn,Gn,Gn]+"\\)$"),Jn=new RegExp("^hsla\\("+[Xn,Gn,Gn,Xn]+"\\)$"),te={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function ne(){return this.rgb().formatHex()}function ee(){return this.rgb().formatRgb()}function re(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=Vn.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?ie(n):3===e?new ce(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?oe(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?oe(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=$n.exec(t))?new ce(n[1],n[2],n[3],1):(n=Wn.exec(t))?new ce(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Zn.exec(t))?oe(n[1],n[2],n[3],n[4]):(n=Kn.exec(t))?oe(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Qn.exec(t))?he(n[1],n[2]/100,n[3]/100,1):(n=Jn.exec(t))?he(n[1],n[2]/100,n[3]/100,n[4]):te.hasOwnProperty(t)?ie(te[t]):"transparent"===t?new ce(NaN,NaN,NaN,0):null}function ie(t){return new ce(t>>16&255,t>>8&255,255&t,1)}function oe(t,n,e,r){return r<=0&&(t=n=e=NaN),new ce(t,n,e,r)}function ae(t){return t instanceof Yn||(t=re(t)),t?new ce((t=t.rgb()).r,t.g,t.b,t.opacity):new ce}function ue(t,n,e,r){return 1===arguments.length?ae(t):new ce(t,n,e,null==r?1:r)}function ce(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function fe(){return"#"+le(this.r)+le(this.g)+le(this.b)}function se(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function le(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function he(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new ge(t,n,e,r)}function de(t){if(t instanceof ge)return new ge(t.h,t.s,t.l,t.opacity);if(t instanceof Yn||(t=re(t)),!t)return new ge;if(t instanceof ge)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,c=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e<r):e===o?(r-n)/u+2:(n-e)/u+4,u/=c<.5?o+i:2-o-i,a*=60):u=c>0&&c<1?0:a,new ge(a,u,c,t.opacity)}function pe(t,n,e,r){return 1===arguments.length?de(t):new ge(t,n,e,null==r?1:r)}function ge(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function ye(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}In(Yn,re,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:ne,formatHex:ne,formatHsl:function(){return de(this).formatHsl()},formatRgb:ee,toString:ee}),In(ce,ue,Bn(Yn,{brighter:function(t){return t=null==t?jn:Math.pow(jn,t),new ce(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Ln:Math.pow(Ln,t),new ce(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},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:fe,formatHex:fe,formatRgb:se,toString:se})),In(ge,pe,Bn(Yn,{brighter:function(t){return t=null==t?jn:Math.pow(jn,t),new ge(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Ln:Math.pow(Ln,t),new ge(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new ce(ye(t>=240?t-240:t+120,i,r),ye(t,i,r),ye(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));const ve=Math.PI/180,_e=180/Math.PI,be=.96422,me=.82521,xe=4/29,we=6/29,Me=3*we*we;function Ae(t){if(t instanceof Se)return new Se(t.l,t.a,t.b,t.opacity);if(t instanceof De)return qe(t);t instanceof ce||(t=ae(t));var n,e,r=Ce(t.r),i=Ce(t.g),o=Ce(t.b),a=Ee((.2225045*r+.7168786*i+.0606169*o)/1);return r===i&&i===o?n=e=a:(n=Ee((.4360747*r+.3850649*i+.1430804*o)/be),e=Ee((.0139322*r+.0971045*i+.7141733*o)/me)),new Se(116*a-16,500*(n-a),200*(a-e),t.opacity)}function Te(t,n,e,r){return 1===arguments.length?Ae(t):new Se(t,n,e,null==r?1:r)}function Se(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Ee(t){return t>.008856451679035631?Math.pow(t,1/3):t/Me+xe}function ke(t){return t>we?t*t*t:Me*(t-xe)}function Ne(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ce(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Pe(t){if(t instanceof De)return new De(t.h,t.c,t.l,t.opacity);if(t instanceof Se||(t=Ae(t)),0===t.a&&0===t.b)return new De(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*_e;return new De(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function ze(t,n,e,r){return 1===arguments.length?Pe(t):new De(t,n,e,null==r?1:r)}function De(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function qe(t){if(isNaN(t.h))return new Se(t.l,0,0,t.opacity);var n=t.h*ve;return new Se(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}In(Se,Te,Bn(Yn,{brighter:function(t){return new Se(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Se(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return new ce(Ne(3.1338561*(n=be*ke(n))-1.6168667*(t=1*ke(t))-.4906146*(e=me*ke(e))),Ne(-.9787684*n+1.9161415*t+.033454*e),Ne(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}})),In(De,ze,Bn(Yn,{brighter:function(t){return new De(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new De(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return qe(this).rgb()}}));var Re=-.14861,Fe=1.78277,Oe=-.29227,Ue=-.90649,Ie=1.97294,Be=Ie*Ue,Ye=Ie*Fe,Le=Fe*Oe-Ue*Re;function je(t){if(t instanceof Xe)return new Xe(t.h,t.s,t.l,t.opacity);t instanceof ce||(t=ae(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Le*r+Be*n-Ye*e)/(Le+Be-Ye),o=r-i,a=(Ie*(e-i)-Oe*o)/Ue,u=Math.sqrt(a*a+o*o)/(Ie*i*(1-i)),c=u?Math.atan2(a,o)*_e-120:NaN;return new Xe(c<0?c+360:c,u,i,t.opacity)}function He(t,n,e,r){return 1===arguments.length?je(t):new Xe(t,n,e,null==r?1:r)}function Xe(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Ge(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}function Ve(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r<n-1?t[r+2]:2*o-i;return Ge((e-r/n)*n,a,i,o,u)}}function $e(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],a=t[(r+1)%n],u=t[(r+2)%n];return Ge((e-r/n)*n,i,o,a,u)}}In(Xe,He,Bn(Yn,{brighter:function(t){return t=null==t?jn:Math.pow(jn,t),new Xe(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Ln:Math.pow(Ln,t),new Xe(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*ve,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new ce(255*(n+e*(Re*r+Fe*i)),255*(n+e*(Oe*r+Ue*i)),255*(n+e*(Ie*r)),this.opacity)}}));var We=t=>()=>t;function Ze(t,n){return function(e){return t+e*n}}function Ke(t,n){var e=n-t;return e?Ze(t,e>180||e<-180?e-360*Math.round(e/360):e):We(isNaN(t)?n:t)}function Qe(t){return 1==(t=+t)?Je:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):We(isNaN(n)?e:n)}}function Je(t,n){var e=n-t;return e?Ze(t,e):We(isNaN(t)?n:t)}var tr=function t(n){var e=Qe(n);function r(t,n){var r=e((t=ue(t)).r,(n=ue(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=Je(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function nr(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;e<i;++e)r=ue(n[e]),o[e]=r.r||0,a[e]=r.g||0,u[e]=r.b||0;return o=t(o),a=t(a),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=u(t),r+""}}}var er=nr(Ve),rr=nr($e);function ir(t,n){n||(n=[]);var e,r=t?Math.min(n.length,t.length):0,i=n.slice();return function(o){for(e=0;e<r;++e)i[e]=t[e]*(1-o)+n[e]*o;return i}}function or(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function ar(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(e=0;e<i;++e)o[e]=dr(t[e],n[e]);for(;e<r;++e)a[e]=n[e];return function(t){for(e=0;e<i;++e)a[e]=o[e](t);return a}}function ur(t,n){var e=new Date;return t=+t,n=+n,function(r){return e.setTime(t*(1-r)+n*r),e}}function cr(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function fr(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=dr(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}}var sr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,lr=new RegExp(sr.source,"g");function hr(t,n){var e,r,i,o=sr.lastIndex=lr.lastIndex=0,a=-1,u=[],c=[];for(t+="",n+="";(e=sr.exec(t))&&(r=lr.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,c.push({i:a,x:cr(e,r)})),o=lr.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?c[0]?function(t){return function(n){return t(n)+""}}(c[0].x):function(t){return function(){return t}}(n):(n=c.length,function(t){for(var e,r=0;r<n;++r)u[(e=c[r]).i]=e.x(t);return u.join("")})}function dr(t,n){var e,r=typeof n;return null==n||"boolean"===r?We(n):("number"===r?cr:"string"===r?(e=re(n))?(n=e,tr):hr:n instanceof re?tr:n instanceof Date?ur:or(n)?ir:Array.isArray(n)?ar:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?fr:cr)(t,n)}function pr(t,n){return t=+t,n=+n,function(e){return Math.round(t*(1-e)+n*e)}}var gr,yr=180/Math.PI,vr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function _r(t,n,e,r,i,o){var a,u,c;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,c/=u),t*r<n*e&&(t=-t,n=-n,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*yr,skewX:Math.atan(c)*yr,scaleX:a,scaleY:u}}function br(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var u=[],c=[];return o=t(o),a=t(a),function(t,r,i,o,a,u){if(t!==i||r!==o){var c=a.push("translate(",null,n,null,e);u.push({i:c-4,x:cr(t,i)},{i:c-2,x:cr(r,o)})}else(i||o)&&a.push("translate("+i+n+o+e)}(o.translateX,o.translateY,a.translateX,a.translateY,u,c),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:cr(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,a.rotate,u,c),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:cr(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,a.skewX,u,c),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:cr(t,e)},{i:u-2,x:cr(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,c),o=a=null,function(t){for(var n,e=-1,r=c.length;++e<r;)u[(n=c[e]).i]=n.x(t);return u.join("")}}}var mr=br((function(t){const n=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return n.isIdentity?vr:_r(n.a,n.b,n.c,n.d,n.e,n.f)}),"px, ","px)","deg)"),xr=br((function(t){return null==t?vr:(gr||(gr=document.createElementNS("http://www.w3.org/2000/svg","g")),gr.setAttribute("transform",t),(t=gr.transform.baseVal.consolidate())?_r((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):vr)}),", ",")",")");function wr(t){return((t=Math.exp(t))+1/t)/2}var Mr=function t(n,e,r){function i(t,i){var o,a,u=t[0],c=t[1],f=t[2],s=i[0],l=i[1],h=i[2],d=s-u,p=l-c,g=d*d+p*p;if(g<1e-12)a=Math.log(h/f)/n,o=function(t){return[u+t*d,c+t*p,f*Math.exp(n*t*a)]};else{var y=Math.sqrt(g),v=(h*h-f*f+r*g)/(2*f*e*y),_=(h*h-f*f-r*g)/(2*h*e*y),b=Math.log(Math.sqrt(v*v+1)-v),m=Math.log(Math.sqrt(_*_+1)-_);a=(m-b)/n,o=function(t){var r=t*a,i=wr(b),o=f/(e*y)*(i*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(n*r+b)-function(t){return((t=Math.exp(t))-1/t)/2}(b));return[u+o*d,c+o*p,f*i/wr(n*r+b)]}}return o.duration=1e3*a*n/Math.SQRT2,o}return i.rho=function(n){var e=Math.max(.001,+n),r=e*e;return t(e,r,r*r)},i}(Math.SQRT2,2,4);function Ar(t){return function(n,e){var r=t((n=pe(n)).h,(e=pe(e)).h),i=Je(n.s,e.s),o=Je(n.l,e.l),a=Je(n.opacity,e.opacity);return function(t){return n.h=r(t),n.s=i(t),n.l=o(t),n.opacity=a(t),n+""}}}var Tr=Ar(Ke),Sr=Ar(Je);function Er(t){return function(n,e){var r=t((n=ze(n)).h,(e=ze(e)).h),i=Je(n.c,e.c),o=Je(n.l,e.l),a=Je(n.opacity,e.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=o(t),n.opacity=a(t),n+""}}}var kr=Er(Ke),Nr=Er(Je);function Cr(t){return function n(e){function r(n,r){var i=t((n=He(n)).h,(r=He(r)).h),o=Je(n.s,r.s),a=Je(n.l,r.l),u=Je(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=a(Math.pow(t,e)),n.opacity=u(t),n+""}}return e=+e,r.gamma=n,r}(1)}var Pr=Cr(Ke),zr=Cr(Je);function Dr(t,n){void 0===n&&(n=t,t=dr);for(var e=0,r=n.length-1,i=n[0],o=new Array(r<0?0:r);e<r;)o[e]=t(i,i=n[++e]);return function(t){var n=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return o[n](t-n)}}var qr,Rr,Fr=0,Or=0,Ur=0,Ir=0,Br=0,Yr=0,Lr="object"==typeof performance&&performance.now?performance:Date,jr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Hr(){return Br||(jr(Xr),Br=Lr.now()+Yr)}function Xr(){Br=0}function Gr(){this._call=this._time=this._next=null}function Vr(t,n,e){var r=new Gr;return r.restart(t,n,e),r}function $r(){Hr(),++Fr;for(var t,n=qr;n;)(t=Br-n._time)>=0&&n._call.call(null,t),n=n._next;--Fr}function Wr(){Br=(Ir=Lr.now())+Yr,Fr=Or=0;try{$r()}finally{Fr=0,function(){var t,n,e=qr,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:qr=n);Rr=t,Kr(r)}(),Br=0}}function Zr(){var t=Lr.now(),n=t-Ir;n>1e3&&(Yr-=n,Ir=t)}function Kr(t){Fr||(Or&&(Or=clearTimeout(Or)),t-Br>24?(t<1/0&&(Or=setTimeout(Wr,t-Lr.now()-Yr)),Ur&&(Ur=clearInterval(Ur))):(Ur||(Ir=Lr.now(),Ur=setInterval(Zr,1e3)),Fr=1,jr(Wr)))}function Qr(t,n,e){var r=new Gr;return n=null==n?0:+n,r.restart(e=>{r.stop(),t(e+n)},n,e),r}Gr.prototype=Vr.prototype={constructor:Gr,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Hr():+e)+(null==n?0:+n),this._next||Rr===this||(Rr?Rr._next=this:qr=this,Rr=this),this._call=t,this._time=e,Kr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Kr())}};var Jr=it("start","end","cancel","interrupt"),ti=[];function ni(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(t){e.state=1,e.timer.restart(a,e.delay,e.time),e.delay<=t&&a(t-e.delay)}function a(o){var f,s,l,h;if(1!==e.state)return c();for(f in i)if((h=i[f]).name===e.name){if(3===h.state)return Qr(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+f<n&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[f])}if(Qr((function(){3===e.state&&(e.state=4,e.timer.restart(u,e.delay,e.time),u(o))})),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),2===e.state){for(e.state=3,r=new Array(l=e.tween.length),f=0,s=-1;f<l;++f)(h=e.tween[f].value.call(t,t.__data__,e.index,e.group))&&(r[++s]=h);r.length=s+1}}function u(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(c),e.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===e.state&&(e.on.call("end",t,t.__data__,e.index,e.group),c())}function c(){for(var r in e.state=6,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=Vr(o,0,e.time)}(t,e,{name:n,index:r,group:i,on:Jr,tween:ti,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function ei(t,n){var e=ii(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function ri(t,n){var e=ii(t,n);if(e.state>3)throw new Error("too late; already running");return e}function ii(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function oi(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}function ai(t,n){var e,r;return function(){var i=ri(this,t),o=i.tween;if(o!==e)for(var a=0,u=(r=e=o).length;a<u;++a)if(r[a].name===n){(r=r.slice()).splice(a,1);break}i.tween=r}}function ui(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=ri(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},c=0,f=i.length;c<f;++c)if(i[c].name===n){i[c]=u;break}c===f&&i.push(u)}o.tween=i}}function ci(t,n,e){var r=t._id;return t.each((function(){var t=ri(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return ii(t,r).value[n]}}function fi(t,n){var e;return("number"==typeof n?cr:n instanceof re?tr:(e=re(n))?(n=e,tr):hr)(t,n)}function si(t){return function(){this.removeAttribute(t)}}function li(t){return function(){this.removeAttributeNS(t.space,t.local)}}function hi(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=n(r=a,e)}}function di(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=n(r=a,e)}}function pi(t,n,e){var r,i,o;return function(){var a,u,c=e(this);if(null!=c)return(a=this.getAttribute(t))===(u=c+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,c));this.removeAttribute(t)}}function gi(t,n,e){var r,i,o;return function(){var a,u,c=e(this);if(null!=c)return(a=this.getAttributeNS(t.space,t.local))===(u=c+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,c));this.removeAttributeNS(t.space,t.local)}}function yi(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function vi(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function _i(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&vi(t,i)),e}return i._value=n,i}function bi(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&yi(t,i)),e}return i._value=n,i}function mi(t,n){return function(){ei(this,t).delay=+n.apply(this,arguments)}}function xi(t,n){return n=+n,function(){ei(this,t).delay=n}}function wi(t,n){return function(){ri(this,t).duration=+n.apply(this,arguments)}}function Mi(t,n){return n=+n,function(){ri(this,t).duration=n}}function Ai(t,n){if("function"!=typeof n)throw new Error;return function(){ri(this,t).ease=n}}function Ti(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?ei:ri;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}var Si=wn.prototype.constructor;function Ei(t){return function(){this.style.removeProperty(t)}}function ki(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function Ni(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&ki(t,o,e)),r}return o._value=n,o}function Ci(t){return function(n){this.textContent=t.call(this,n)}}function Pi(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&Ci(r)),n}return r._value=t,r}var zi=0;function Di(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function qi(t){return wn().transition(t)}function Ri(){return++zi}var Fi=wn.prototype;Di.prototype=qi.prototype={constructor:Di,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=yt(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u,c,f=r[a],s=f.length,l=o[a]=new Array(s),h=0;h<s;++h)(u=f[h])&&(c=t.call(u,u.__data__,h,f))&&("__data__"in u&&(c.__data__=u.__data__),l[h]=c,ni(l[h],n,e,h,l,ii(u,e)));return new Di(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=bt(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var c,f=r[u],s=f.length,l=0;l<s;++l)if(c=f[l]){for(var h,d=t.call(c,c.__data__,l,f),p=ii(c,e),g=0,y=d.length;g<y;++g)(h=d[g])&&ni(h,n,e,g,d,p);o.push(d),a.push(c)}return new Di(o,a,n,e)},filter:function(t){"function"!=typeof t&&(t=mt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,c=r[i]=[],f=0;f<u;++f)(o=a[f])&&t.call(o,o.__data__,f,a)&&c.push(o);return new Di(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var c,f=n[u],s=e[u],l=f.length,h=a[u]=new Array(l),d=0;d<l;++d)(c=f[d]||s[d])&&(h[d]=c);for(;u<r;++u)a[u]=n[u];return new Di(a,this._parents,this._name,this._id)},selection:function(){return new Si(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=Ri(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],c=u.length,f=0;f<c;++f)if(a=u[f]){var s=ii(a,n);ni(a,t,e,f,u,{time:s.time+s.delay+s.duration,delay:0,duration:s.duration,ease:s.ease})}return new Di(r,this._parents,t,e)},call:Fi.call,nodes:Fi.nodes,node:Fi.node,size:Fi.size,empty:Fi.empty,each:Fi.each,on:function(t,n){var e=this._id;return arguments.length<2?ii(this.node(),e).on.on(t):this.each(Ti(e,t,n))},attr:function(t,n){var e=lt(t),r="transform"===e?xr:fi;return this.attrTween(t,"function"==typeof n?(e.local?gi:pi)(e,r,ci(this,"attr."+t,n)):null==n?(e.local?li:si)(e):(e.local?di:hi)(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=lt(t);return this.tween(e,(r.local?_i:bi)(r,n))},style:function(t,n,e){var r="transform"==(t+="")?mr:fi;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=jt(this,t),a=(this.style.removeProperty(t),jt(this,t));return o===a?null:o===e&&a===r?i:i=n(e=o,r=a)}}(t,r)).on("end.style."+t,Ei(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var a=jt(this,t),u=e(this),c=u+"";return null==u&&(this.style.removeProperty(t),c=u=jt(this,t)),a===c?null:a===r&&c===i?o:(i=c,o=n(r=a,u))}}(t,r,ci(this,"style."+t,n))).each(function(t,n){var e,r,i,o,a="style."+n,u="end."+a;return function(){var c=ri(this,t),f=c.on,s=null==c.value[a]?o||(o=Ei(n)):void 0;f===e&&i===s||(r=(e=f).copy()).on(u,i=s),c.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var a=jt(this,t);return a===o?null:a===r?i:i=n(r=a,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,Ni(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(ci(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,Pi(t))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=ii(this.node(),e).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?ai:ui)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?mi:xi)(n,t)):ii(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?wi:Mi)(n,t)):ii(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(Ai(n,t)):ii(this.node(),n).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,n){return function(){var e=n.apply(this,arguments);if("function"!=typeof e)throw new Error;ri(this,t).ease=e}}(this._id,t))},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise((function(o,a){var u={value:a},c={value:function(){0==--i&&o()}};e.each((function(){var e=ri(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(u),n._.interrupt.push(u),n._.end.push(c)),e.on=n})),0===i&&o()}))},[Symbol.iterator]:Fi[Symbol.iterator]};function Oi(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function Ui(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Ii=function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(3),Bi=function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),Yi=function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),Li=Math.PI,ji=Li/2;function Hi(t){return(1-Math.cos(Li*t))/2}function Xi(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Gi(t){return((t*=2)<=1?Xi(1-t):2-Xi(t-1))/2}function Vi(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var $i=4/11,Wi=7.5625;function Zi(t){return(t=+t)<$i?Wi*t*t:t<.7272727272727273?Wi*(t-=.5454545454545454)*t+.75:t<.9090909090909091?Wi*(t-=.8181818181818182)*t+.9375:Wi*(t-=.9545454545454546)*t+.984375}var Ki=1.70158,Qi=function t(n){function e(t){return(t=+t)*t*(n*(t-1)+t)}return n=+n,e.overshoot=t,e}(Ki),Ji=function t(n){function e(t){return--t*t*((t+1)*n+t)+1}return n=+n,e.overshoot=t,e}(Ki),to=function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(Ki),no=2*Math.PI,eo=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=no);function i(t){return n*Xi(- --t)*Math.sin((r-t)/e)}return i.amplitude=function(n){return t(n,e*no)},i.period=function(e){return t(n,e)},i}(1,.3),ro=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=no);function i(t){return 1-n*Xi(t=+t)*Math.sin((t+r)/e)}return i.amplitude=function(n){return t(n,e*no)},i.period=function(e){return t(n,e)},i}(1,.3),io=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=no);function i(t){return((t=2*t-1)<0?n*Xi(-t)*Math.sin((r-t)/e):2-n*Xi(t)*Math.sin((r+t)/e))/2}return i.amplitude=function(n){return t(n,e*no)},i.period=function(e){return t(n,e)},i}(1,.3),oo={time:null,delay:0,duration:250,ease:Ui};function ao(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw new Error(`transition ${n} not found`);return e}wn.prototype.interrupt=function(t){return this.each((function(){oi(this,t)}))},wn.prototype.transition=function(t){var n,e;t instanceof Di?(n=t._id,t=t._name):(n=Ri(),(e=oo).time=Hr(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],c=u.length,f=0;f<c;++f)(a=u[f])&&ni(a,t,n,f,u,e||ao(a,n));return new Di(r,this._parents,t,n)};var uo=[null];var co=t=>()=>t;function fo(t,{sourceEvent:n,target:e,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function so(t){t.stopImmediatePropagation()}function lo(t){t.preventDefault(),t.stopImmediatePropagation()}var ho={name:"drag"},po={name:"space"},go={name:"handle"},yo={name:"center"};const{abs:vo,max:_o,min:bo}=Math;function mo(t){return[+t[0],+t[1]]}function xo(t){return[mo(t[0]),mo(t[1])]}var wo={name:"x",handles:["w","e"].map(Co),input:function(t,n){return null==t?null:[[+t[0],n[0][1]],[+t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Mo={name:"y",handles:["n","s"].map(Co),input:function(t,n){return null==t?null:[[n[0][0],+t[0]],[n[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Ao={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(Co),input:function(t){return null==t?null:xo(t)},output:function(t){return t}},To={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},So={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Eo={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ko={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},No={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Co(t){return{type:t}}function Po(t){return!t.ctrlKey&&!t.button}function zo(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Do(){return navigator.maxTouchPoints||"ontouchstart"in this}function qo(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ro(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Fo(t){var n,e=zo,r=Po,i=Do,o=!0,a=it("start","brush","end"),u=6;function c(n){var e=n.property("__brush",g).selectAll(".overlay").data([Co("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",To.overlay).merge(e).each((function(){var t=qo(this).extent;Mn(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),n.selectAll(".selection").data([Co("selection")]).enter().append("rect").attr("class","selection").attr("cursor",To.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=n.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return To[t.type]})),n.each(f).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",h).filter(i).on("touchstart.brush",h).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(){var t=Mn(this),n=qo(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?n[1][0]-u/2:n[0][0]-u/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-u/2:n[0][1]-u/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+u:u})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+u:u}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function s(t,n,e){var r=t.__brush.emitter;return!r||e&&r.clean?new l(t,n,e):r}function l(t,n,e){this.that=t,this.args=n,this.state=t.__brush,this.active=0,this.clean=e}function h(e){if((!n||e.touches)&&r.apply(this,arguments)){var i,a,u,c,l,h,d,p,g,y,v,_=this,b=e.target.__data__.type,m="selection"===(o&&e.metaKey?b="overlay":b)?ho:o&&e.altKey?yo:go,x=t===Mo?null:ko[b],w=t===wo?null:No[b],M=qo(_),A=M.extent,T=M.selection,S=A[0][0],E=A[0][1],k=A[1][0],N=A[1][1],C=0,P=0,z=x&&w&&o&&e.shiftKey,D=Array.from(e.touches||[e],t=>{const n=t.identifier;return(t=kn(t,_)).point0=t.slice(),t.identifier=n,t});if("overlay"===b){T&&(g=!0);const n=[D[0],D[1]||D[0]];M.selection=T=[[i=t===Mo?S:bo(n[0][0],n[1][0]),u=t===wo?E:bo(n[0][1],n[1][1])],[l=t===Mo?k:_o(n[0][0],n[1][0]),d=t===wo?N:_o(n[0][1],n[1][1])]],D.length>1&&I()}else i=T[0][0],u=T[0][1],l=T[1][0],d=T[1][1];a=i,c=u,h=l,p=d;var q=Mn(_).attr("pointer-events","none"),R=q.selectAll(".overlay").attr("cursor",To[b]);oi(_);var F=s(_,arguments,!0).beforestart();if(e.touches)F.moved=U,F.ended=B;else{var O=Mn(e.view).on("mousemove.brush",U,!0).on("mouseup.brush",B,!0);o&&O.on("keydown.brush",Y,!0).on("keyup.brush",L,!0),Pn(e.view)}f.call(_),F.start(e,m.name)}function U(t){for(const n of t.changedTouches||[t])for(const t of D)t.identifier===n.identifier&&(t.cur=kn(n,_));if(z&&!y&&!v&&1===D.length){const t=D[0];vo(t.cur[0]-t[0])>vo(t.cur[1]-t[1])?v=!0:y=!0}for(const t of D)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);g=!0,lo(t),I(t)}function I(t){const n=D[0],e=n.point0;var r;switch(C=n[0]-e[0],P=n[1]-e[1],m){case po:case ho:x&&(C=_o(S-i,bo(k-l,C)),a=i+C,h=l+C),w&&(P=_o(E-u,bo(N-d,P)),c=u+P,p=d+P);break;case go:D[1]?(x&&(a=_o(S,bo(k,D[0][0])),h=_o(S,bo(k,D[1][0])),x=1),w&&(c=_o(E,bo(N,D[0][1])),p=_o(E,bo(N,D[1][1])),w=1)):(x<0?(C=_o(S-i,bo(k-i,C)),a=i+C,h=l):x>0&&(C=_o(S-l,bo(k-l,C)),a=i,h=l+C),w<0?(P=_o(E-u,bo(N-u,P)),c=u+P,p=d):w>0&&(P=_o(E-d,bo(N-d,P)),c=u,p=d+P));break;case yo:x&&(a=_o(S,bo(k,i-C*x)),h=_o(S,bo(k,l+C*x))),w&&(c=_o(E,bo(N,u-P*w)),p=_o(E,bo(N,d+P*w)))}h<a&&(x*=-1,r=i,i=l,l=r,r=a,a=h,h=r,b in So&&R.attr("cursor",To[b=So[b]])),p<c&&(w*=-1,r=u,u=d,d=r,r=c,c=p,p=r,b in Eo&&R.attr("cursor",To[b=Eo[b]])),M.selection&&(T=M.selection),y&&(a=T[0][0],h=T[1][0]),v&&(c=T[0][1],p=T[1][1]),T[0][0]===a&&T[0][1]===c&&T[1][0]===h&&T[1][1]===p||(M.selection=[[a,c],[h,p]],f.call(_),F.brush(t,m.name))}function B(t){if(so(t),t.touches){if(t.touches.length)return;n&&clearTimeout(n),n=setTimeout((function(){n=null}),500)}else zn(t.view,g),O.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);q.attr("pointer-events","all"),R.attr("cursor",To.overlay),M.selection&&(T=M.selection),Ro(T)&&(M.selection=null,f.call(_)),F.end(t,m.name)}function Y(t){switch(t.keyCode){case 16:z=x&&w;break;case 18:m===go&&(x&&(l=h-C*x,i=a+C*x),w&&(d=p-P*w,u=c+P*w),m=yo,I());break;case 32:m!==go&&m!==yo||(x<0?l=h-C:x>0&&(i=a-C),w<0?d=p-P:w>0&&(u=c-P),m=po,R.attr("cursor",To.selection),I());break;default:return}lo(t)}function L(t){switch(t.keyCode){case 16:z&&(y=v=z=!1,I());break;case 18:m===yo&&(x<0?l=h:x>0&&(i=a),w<0?d=p:w>0&&(u=c),m=go,I());break;case 32:m===po&&(t.altKey?(x&&(l=h-C*x,i=a+C*x),w&&(d=p-P*w,u=c+P*w),m=yo):(x<0?l=h:x>0&&(i=a),w<0?d=p:w>0&&(u=c),m=go),R.attr("cursor",To[b]),I());break;default:return}lo(t)}}function d(t){s(this,arguments).moved(t)}function p(t){s(this,arguments).ended(t)}function g(){var n=this.__brush||{selection:null};return n.extent=xo(e.apply(this,arguments)),n.dim=t,n}return c.move=function(n,e){n.tween?n.on("start.brush",(function(t){s(this,arguments).beforestart().start(t)})).on("interrupt.brush end.brush",(function(t){s(this,arguments).end(t)})).tween("brush",(function(){var n=this,r=n.__brush,i=s(n,arguments),o=r.selection,a=t.input("function"==typeof e?e.apply(this,arguments):e,r.extent),u=dr(o,a);function c(t){r.selection=1===t&&null===a?null:u(t),f.call(n),i.brush()}return null!==o&&null!==a?c:c(1)})):n.each((function(){var n=this,r=arguments,i=n.__brush,o=t.input("function"==typeof e?e.apply(n,r):e,i.extent),a=s(n,r).beforestart();oi(n),i.selection=null===o?null:o,f.call(n),a.start().brush().end()}))},c.clear=function(t){c.move(t,null)},l.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,n){return this.starting?(this.starting=!1,this.emit("start",t,n)):this.emit("brush",t),this},brush:function(t,n){return this.emit("brush",t,n),this},end:function(t,n){return 0==--this.active&&(delete this.state.emitter,this.emit("end",t,n)),this},emit:function(n,e,r){var i=Mn(this.that).datum();a.call(n,this.that,new fo(n,{sourceEvent:e,target:c,selection:t.output(this.state.selection),mode:r,dispatch:a}),i)}},c.extent=function(t){return arguments.length?(e="function"==typeof t?t:co(xo(t)),c):e},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:co(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:co(!!t),c):i},c.handleSize=function(t){return arguments.length?(u=+t,c):u},c.keyModifiers=function(t){return arguments.length?(o=!!t,c):o},c.on=function(){var t=a.on.apply(a,arguments);return t===a?c:t},c}var Oo=Math.abs,Uo=Math.cos,Io=Math.sin,Bo=Math.PI,Yo=Bo/2,Lo=2*Bo,jo=Math.max,Ho=1e-12;function Xo(t,n){return Array.from({length:n-t},(n,e)=>t+e)}function Go(t){return function(n,e){return t(n.source.value+n.target.value,e.source.value+e.target.value)}}function Vo(t,n){var e=0,r=null,i=null,o=null;function a(a){var u,c=a.length,f=new Array(c),s=Xo(0,c),l=new Array(c*c),h=new Array(c),d=0;a=Float64Array.from({length:c*c},n?(t,n)=>a[n%c][n/c|0]:(t,n)=>a[n/c|0][n%c]);for(let n=0;n<c;++n){let e=0;for(let r=0;r<c;++r)e+=a[n*c+r]+t*a[r*c+n];d+=f[n]=e}u=(d=jo(0,Lo-e*c)/d)?e:Lo/c;{let n=0;r&&s.sort((t,n)=>r(f[t],f[n]));for(const e of s){const r=n;if(t){const t=Xo(1+~c,c).filter(t=>t<0?a[~t*c+e]:a[e*c+t]);i&&t.sort((t,n)=>i(t<0?-a[~t*c+e]:a[e*c+t],n<0?-a[~n*c+e]:a[e*c+n]));for(const r of t)if(r<0){(l[~r*c+e]||(l[~r*c+e]={source:null,target:null})).target={index:e,startAngle:n,endAngle:n+=a[~r*c+e]*d,value:a[~r*c+e]}}else{(l[e*c+r]||(l[e*c+r]={source:null,target:null})).source={index:e,startAngle:n,endAngle:n+=a[e*c+r]*d,value:a[e*c+r]}}h[e]={index:e,startAngle:r,endAngle:n,value:f[e]}}else{const t=Xo(0,c).filter(t=>a[e*c+t]||a[t*c+e]);i&&t.sort((t,n)=>i(a[e*c+t],a[e*c+n]));for(const r of t){let t;if(e<r?(t=l[e*c+r]||(l[e*c+r]={source:null,target:null}),t.source={index:e,startAngle:n,endAngle:n+=a[e*c+r]*d,value:a[e*c+r]}):(t=l[r*c+e]||(l[r*c+e]={source:null,target:null}),t.target={index:e,startAngle:n,endAngle:n+=a[e*c+r]*d,value:a[e*c+r]},e===r&&(t.source=t.target)),t.source&&t.target&&t.source.value<t.target.value){const n=t.source;t.source=t.target,t.target=n}}h[e]={index:e,startAngle:r,endAngle:n,value:f[e]}}n+=u}}return(l=Object.values(l)).groups=h,o?l.sort(o):l}return a.padAngle=function(t){return arguments.length?(e=jo(0,t),a):e},a.sortGroups=function(t){return arguments.length?(r=t,a):r},a.sortSubgroups=function(t){return arguments.length?(i=t,a):i},a.sortChords=function(t){return arguments.length?(null==t?o=null:(o=Go(t))._=t,a):o&&o._},a}const $o=Math.PI,Wo=2*$o,Zo=1e-6,Ko=Wo-Zo;function Qo(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Jo(){return new Qo}Qo.prototype=Jo.prototype={constructor:Qo,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,r){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+r)},bezierCurveTo:function(t,n,e,r,i,o){this._+="C"+ +t+","+ +n+","+ +e+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,n,e,r,i){t=+t,n=+n,e=+e,r=+r,i=+i;var o=this._x1,a=this._y1,u=e-t,c=r-n,f=o-t,s=a-n,l=f*f+s*s;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(l>Zo)if(Math.abs(s*u-c*f)>Zo&&i){var h=e-o,d=r-a,p=u*u+c*c,g=h*h+d*d,y=Math.sqrt(p),v=Math.sqrt(l),_=i*Math.tan(($o-Math.acos((p+l-g)/(2*y*v)))/2),b=_/v,m=_/y;Math.abs(b-1)>Zo&&(this._+="L"+(t+b*f)+","+(n+b*s)),this._+="A"+i+","+i+",0,0,"+ +(s*h>f*d)+","+(this._x1=t+m*u)+","+(this._y1=n+m*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n,o=!!o;var a=(e=+e)*Math.cos(r),u=e*Math.sin(r),c=t+a,f=n+u,s=1^o,l=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+c+","+f:(Math.abs(this._x1-c)>Zo||Math.abs(this._y1-f)>Zo)&&(this._+="L"+c+","+f),e&&(l<0&&(l=l%Wo+Wo),l>Ko?this._+="A"+e+","+e+",0,1,"+s+","+(t-a)+","+(n-u)+"A"+e+","+e+",0,1,"+s+","+(this._x1=c)+","+(this._y1=f):l>Zo&&(this._+="A"+e+","+e+",0,"+ +(l>=$o)+","+s+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};var ta=Array.prototype.slice;function na(t){return function(){return t}}function ea(t){return t.source}function ra(t){return t.target}function ia(t){return t.radius}function oa(t){return t.startAngle}function aa(t){return t.endAngle}function ua(){return 0}function ca(){return 10}function fa(t){var n=ea,e=ra,r=ia,i=ia,o=oa,a=aa,u=ua,c=null;function f(){var f,s=n.apply(this,arguments),l=e.apply(this,arguments),h=u.apply(this,arguments)/2,d=ta.call(arguments),p=+r.apply(this,(d[0]=s,d)),g=o.apply(this,d)-Yo,y=a.apply(this,d)-Yo,v=+i.apply(this,(d[0]=l,d)),_=o.apply(this,d)-Yo,b=a.apply(this,d)-Yo;if(c||(c=f=Jo()),h>Ho&&(Oo(y-g)>2*h+Ho?y>g?(g+=h,y-=h):(g-=h,y+=h):g=y=(g+y)/2,Oo(b-_)>2*h+Ho?b>_?(_+=h,b-=h):(_-=h,b+=h):_=b=(_+b)/2),c.moveTo(p*Uo(g),p*Io(g)),c.arc(0,0,p,g,y),g!==_||y!==b)if(t){var m=+t.apply(this,arguments),x=v-m,w=(_+b)/2;c.quadraticCurveTo(0,0,x*Uo(_),x*Io(_)),c.lineTo(v*Uo(w),v*Io(w)),c.lineTo(x*Uo(b),x*Io(b))}else c.quadraticCurveTo(0,0,v*Uo(_),v*Io(_)),c.arc(0,0,v,_,b);if(c.quadraticCurveTo(0,0,p*Uo(g),p*Io(g)),c.closePath(),f)return c=null,f+""||null}return t&&(f.headRadius=function(n){return arguments.length?(t="function"==typeof n?n:na(+n),f):t}),f.radius=function(t){return arguments.length?(r=i="function"==typeof t?t:na(+t),f):r},f.sourceRadius=function(t){return arguments.length?(r="function"==typeof t?t:na(+t),f):r},f.targetRadius=function(t){return arguments.length?(i="function"==typeof t?t:na(+t),f):i},f.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:na(+t),f):o},f.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:na(+t),f):a},f.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:na(+t),f):u},f.source=function(t){return arguments.length?(n=t,f):n},f.target=function(t){return arguments.length?(e=t,f):e},f.context=function(t){return arguments.length?(c=null==t?null:t,f):c},f}var sa=Array.prototype.slice;function la(t,n){return t-n}var ha=t=>()=>t;function da(t,n){for(var e,r=-1,i=n.length;++r<i;)if(e=pa(t,n[r]))return e;return 0}function pa(t,n){for(var e=n[0],r=n[1],i=-1,o=0,a=t.length,u=a-1;o<a;u=o++){var c=t[o],f=c[0],s=c[1],l=t[u],h=l[0],d=l[1];if(ga(c,l,n))return 0;s>r!=d>r&&e<(h-f)*(r-s)/(d-s)+f&&(i=-i)}return i}function ga(t,n,e){var r,i,o,a;return function(t,n,e){return(n[0]-t[0])*(e[1]-t[1])==(e[0]-t[0])*(n[1]-t[1])}(t,n,e)&&(i=t[r=+(t[0]===n[0])],o=e[r],a=n[r],i<=o&&o<=a||a<=o&&o<=i)}function ya(){}var va=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function _a(){var t=1,n=1,e=k,r=u;function i(t){var n=e(t);if(Array.isArray(n))n=n.slice().sort(la);else{var r=p(t),i=r[0],a=r[1];n=S(i,a,n),n=B(Math.floor(i/n)*n,Math.floor(a/n)*n,n)}return n.map((function(n){return o(t,n)}))}function o(e,i){var o=[],u=[];return function(e,r,i){var o,u,c,f,s,l,h=new Array,d=new Array;o=u=-1,f=e[0]>=r,va[f<<1].forEach(p);for(;++o<t-1;)c=f,f=e[o+1]>=r,va[c|f<<1].forEach(p);va[f<<0].forEach(p);for(;++u<n-1;){for(o=-1,f=e[u*t+t]>=r,s=e[u*t]>=r,va[f<<1|s<<2].forEach(p);++o<t-1;)c=f,f=e[u*t+t+o+1]>=r,l=s,s=e[u*t+o+1]>=r,va[c|f<<1|s<<2|l<<3].forEach(p);va[f|s<<3].forEach(p)}o=-1,s=e[u*t]>=r,va[s<<2].forEach(p);for(;++o<t-1;)l=s,s=e[u*t+o+1]>=r,va[s<<2|l<<3].forEach(p);function p(t){var n,e,r=[t[0][0]+o,t[0][1]+u],c=[t[1][0]+o,t[1][1]+u],f=a(r),s=a(c);(n=d[f])?(e=h[s])?(delete d[n.end],delete h[e.start],n===e?(n.ring.push(c),i(n.ring)):h[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[n.end],n.ring.push(c),d[n.end=s]=n):(n=h[s])?(e=d[f])?(delete h[n.start],delete d[e.end],n===e?(n.ring.push(c),i(n.ring)):h[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete h[n.start],n.ring.unshift(r),h[n.start=f]=n):h[f]=d[s]={start:f,end:s,ring:[r,c]}}va[s<<3].forEach(p)}(e,i,(function(t){r(t,e,i),function(t){for(var n=0,e=t.length,r=t[e-1][1]*t[0][0]-t[e-1][0]*t[0][1];++n<e;)r+=t[n-1][1]*t[n][0]-t[n-1][0]*t[n][1];return r}(t)>0?o.push([t]):u.push(t)})),u.forEach((function(t){for(var n,e=0,r=o.length;e<r;++e)if(-1!==da((n=o[e])[0],t))return void n.push(t)})),{type:"MultiPolygon",value:i,coordinates:o}}function a(n){return 2*n[0]+n[1]*(t+1)*4}function u(e,r,i){e.forEach((function(e){var o,a=e[0],u=e[1],c=0|a,f=0|u,s=r[f*t+c];a>0&&a<t&&c===a&&(o=r[f*t+c-1],e[0]=a+(i-o)/(s-o)-.5),u>0&&u<n&&f===u&&(o=r[(f-1)*t+c],e[1]=u+(i-o)/(s-o)-.5)}))}return i.contour=o,i.size=function(e){if(!arguments.length)return[t,n];var r=Math.floor(e[0]),o=Math.floor(e[1]);if(!(r>=0&&o>=0))throw new Error("invalid size");return t=r,n=o,i},i.thresholds=function(t){return arguments.length?(e="function"==typeof t?t:Array.isArray(t)?ha(sa.call(t)):ha(t),i):e},i.smooth=function(t){return arguments.length?(r=t?u:ya,i):r===u},i}function ba(t,n,e){for(var r=t.width,i=t.height,o=1+(e<<1),a=0;a<i;++a)for(var u=0,c=0;u<r+e;++u)u<r&&(c+=t.data[u+a*r]),u>=e&&(u>=o&&(c-=t.data[u-o+a*r]),n.data[u-e+a*r]=c/Math.min(u+1,r-1+o-u,o))}function ma(t,n,e){for(var r=t.width,i=t.height,o=1+(e<<1),a=0;a<r;++a)for(var u=0,c=0;u<i+e;++u)u<i&&(c+=t.data[a+u*r]),u>=e&&(u>=o&&(c-=t.data[a+(u-o)*r]),n.data[a+(u-e)*r]=c/Math.min(u+1,i-1+o-u,o))}function xa(t){return t[0]}function wa(t){return t[1]}function Ma(){return 1}const Aa=Math.pow(2,-52),Ta=new Uint32Array(512);class Sa{static from(t,n=qa,e=Ra){const r=t.length,i=new Float64Array(2*r);for(let o=0;o<r;o++){const r=t[o];i[2*o]=n(r),i[2*o+1]=e(r)}return new Sa(i)}constructor(t){const n=t.length>>1;if(n>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const e=Math.max(2*n-5,0);this._triangles=new Uint32Array(3*e),this._halfedges=new Int32Array(3*e),this._hashSize=Math.ceil(Math.sqrt(n)),this._hullPrev=new Uint32Array(n),this._hullNext=new Uint32Array(n),this._hullTri=new Uint32Array(n),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(n),this._dists=new Float64Array(n),this.update()}update(){const{coords:t,_hullPrev:n,_hullNext:e,_hullTri:r,_hullHash:i}=this,o=t.length>>1;let a=1/0,u=1/0,c=-1/0,f=-1/0;for(let n=0;n<o;n++){const e=t[2*n],r=t[2*n+1];e<a&&(a=e),r<u&&(u=r),e>c&&(c=e),r>f&&(f=r),this._ids[n]=n}const s=(a+c)/2,l=(u+f)/2;let h,d,p,g=1/0;for(let n=0;n<o;n++){const e=Ea(s,l,t[2*n],t[2*n+1]);e<g&&(h=n,g=e)}const y=t[2*h],v=t[2*h+1];g=1/0;for(let n=0;n<o;n++){if(n===h)continue;const e=Ea(y,v,t[2*n],t[2*n+1]);e<g&&e>0&&(d=n,g=e)}let _=t[2*d],b=t[2*d+1],m=1/0;for(let n=0;n<o;n++){if(n===h||n===d)continue;const e=Pa(y,v,_,b,t[2*n],t[2*n+1]);e<m&&(p=n,m=e)}let x=t[2*p],w=t[2*p+1];if(m===1/0){for(let n=0;n<o;n++)this._dists[n]=t[2*n]-t[0]||t[2*n+1]-t[1];za(this._ids,this._dists,0,o-1);const n=new Uint32Array(o);let e=0;for(let t=0,r=-1/0;t<o;t++){const i=this._ids[t];this._dists[i]>r&&(n[e++]=i,r=this._dists[i])}return this.hull=n.subarray(0,e),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(Na(y,v,_,b,x,w)){const t=d,n=_,e=b;d=p,_=x,b=w,p=t,x=n,w=e}const M=function(t,n,e,r,i,o){const a=e-t,u=r-n,c=i-t,f=o-n,s=a*a+u*u,l=c*c+f*f,h=.5/(a*f-u*c);return{x:t+(f*s-u*l)*h,y:n+(a*l-c*s)*h}}(y,v,_,b,x,w);this._cx=M.x,this._cy=M.y;for(let n=0;n<o;n++)this._dists[n]=Ea(t[2*n],t[2*n+1],M.x,M.y);za(this._ids,this._dists,0,o-1),this._hullStart=h;let A=3;e[h]=n[p]=d,e[d]=n[h]=p,e[p]=n[d]=h,r[h]=0,r[d]=1,r[p]=2,i.fill(-1),i[this._hashKey(y,v)]=h,i[this._hashKey(_,b)]=d,i[this._hashKey(x,w)]=p,this.trianglesLen=0,this._addTriangle(h,d,p,-1,-1,-1);for(let o,a,u=0;u<this._ids.length;u++){const c=this._ids[u],f=t[2*c],s=t[2*c+1];if(u>0&&Math.abs(f-o)<=Aa&&Math.abs(s-a)<=Aa)continue;if(o=f,a=s,c===h||c===d||c===p)continue;let l=0;for(let t=0,n=this._hashKey(f,s);t<this._hashSize&&(l=i[(n+t)%this._hashSize],-1===l||l===e[l]);t++);l=n[l];let g,y=l;for(;g=e[y],!Na(f,s,t[2*y],t[2*y+1],t[2*g],t[2*g+1]);)if(y=g,y===l){y=-1;break}if(-1===y)continue;let v=this._addTriangle(y,c,e[y],-1,-1,r[y]);r[c]=this._legalize(v+2),r[y]=v,A++;let _=e[y];for(;g=e[_],Na(f,s,t[2*_],t[2*_+1],t[2*g],t[2*g+1]);)v=this._addTriangle(_,c,g,r[c],-1,r[_]),r[c]=this._legalize(v+2),e[_]=_,A--,_=g;if(y===l)for(;g=n[y],Na(f,s,t[2*g],t[2*g+1],t[2*y],t[2*y+1]);)v=this._addTriangle(g,c,y,-1,r[y],r[g]),this._legalize(v+2),r[g]=v,e[y]=y,A--,y=g;this._hullStart=n[c]=y,e[y]=n[_]=c,e[c]=_,i[this._hashKey(f,s)]=c,i[this._hashKey(t[2*y],t[2*y+1])]=y}this.hull=new Uint32Array(A);for(let t=0,n=this._hullStart;t<A;t++)this.hull[t]=n,n=e[n];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,n){return Math.floor(function(t,n){const e=t/(Math.abs(t)+Math.abs(n));return(n>0?3-e:1+e)/4}(t-this._cx,n-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:n,_halfedges:e,coords:r}=this;let i=0,o=0;for(;;){const a=e[t],u=t-t%3;if(o=u+(t+2)%3,-1===a){if(0===i)break;t=Ta[--i];continue}const c=a-a%3,f=u+(t+1)%3,s=c+(a+2)%3,l=n[o],h=n[t],d=n[f],p=n[s];if(Ca(r[2*l],r[2*l+1],r[2*h],r[2*h+1],r[2*d],r[2*d+1],r[2*p],r[2*p+1])){n[t]=p,n[a]=l;const r=e[s];if(-1===r){let n=this._hullStart;do{if(this._hullTri[n]===s){this._hullTri[n]=t;break}n=this._hullPrev[n]}while(n!==this._hullStart)}this._link(t,r),this._link(a,e[o]),this._link(o,s);const u=c+(a+1)%3;i<Ta.length&&(Ta[i++]=u)}else{if(0===i)break;t=Ta[--i]}}return o}_link(t,n){this._halfedges[t]=n,-1!==n&&(this._halfedges[n]=t)}_addTriangle(t,n,e,r,i,o){const a=this.trianglesLen;return this._triangles[a]=t,this._triangles[a+1]=n,this._triangles[a+2]=e,this._link(a,r),this._link(a+1,i),this._link(a+2,o),this.trianglesLen+=3,a}}function Ea(t,n,e,r){const i=t-e,o=n-r;return i*i+o*o}function ka(t,n,e,r,i,o){const a=(r-n)*(i-t),u=(e-t)*(o-n);return Math.abs(a-u)>=33306690738754716e-32*Math.abs(a+u)?a-u:0}function Na(t,n,e,r,i,o){return(ka(i,o,t,n,e,r)||ka(t,n,e,r,i,o)||ka(e,r,i,o,t,n))<0}function Ca(t,n,e,r,i,o,a,u){const c=t-a,f=n-u,s=e-a,l=r-u,h=i-a,d=o-u,p=s*s+l*l,g=h*h+d*d;return c*(l*g-p*d)-f*(s*g-p*h)+(c*c+f*f)*(s*d-l*h)<0}function Pa(t,n,e,r,i,o){const a=e-t,u=r-n,c=i-t,f=o-n,s=a*a+u*u,l=c*c+f*f,h=.5/(a*f-u*c),d=(f*s-u*l)*h,p=(a*l-c*s)*h;return d*d+p*p}function za(t,n,e,r){if(r-e<=20)for(let i=e+1;i<=r;i++){const r=t[i],o=n[r];let a=i-1;for(;a>=e&&n[t[a]]>o;)t[a+1]=t[a--];t[a+1]=r}else{let i=e+1,o=r;Da(t,e+r>>1,i),n[t[e]]>n[t[r]]&&Da(t,e,r),n[t[i]]>n[t[r]]&&Da(t,i,r),n[t[e]]>n[t[i]]&&Da(t,e,i);const a=t[i],u=n[a];for(;;){do{i++}while(n[t[i]]<u);do{o--}while(n[t[o]]>u);if(o<i)break;Da(t,i,o)}t[e+1]=t[o],t[o]=a,r-i+1>=o-e?(za(t,n,i,r),za(t,n,e,o-1)):(za(t,n,e,o-1),za(t,n,i,r))}}function Da(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function qa(t){return t[0]}function Ra(t){return t[1]}const Fa=1e-6;class Oa{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,n){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,n){this._+=`L${this._x1=+t},${this._y1=+n}`}arc(t,n,e){const r=(t=+t)+(e=+e),i=n=+n;if(e<0)throw new Error("negative radius");null===this._x1?this._+=`M${r},${i}`:(Math.abs(this._x1-r)>Fa||Math.abs(this._y1-i)>Fa)&&(this._+="L"+r+","+i),e&&(this._+=`A${e},${e},0,1,1,${t-e},${n}A${e},${e},0,1,1,${this._x1=r},${this._y1=i}`)}rect(t,n,e,r){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${+e}v${+r}h${-e}Z`}value(){return this._||null}}class Ua{constructor(){this._=[]}moveTo(t,n){this._.push([t,n])}closePath(){this._.push(this._[0].slice())}lineTo(t,n){this._.push([t,n])}value(){return this._.length?this._:null}}class Ia{constructor(t,[n,e,r,i]=[0,0,960,500]){if(!((r=+r)>=(n=+n)&&(i=+i)>=(e=+e)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=r,this.xmin=n,this.ymax=i,this.ymin=e,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:n,triangles:e},vectors:r}=this,i=this.circumcenters=this._circumcenters.subarray(0,e.length/3*2);for(let n,r,o=0,a=0,u=e.length;o<u;o+=3,a+=2){const u=2*e[o],c=2*e[o+1],f=2*e[o+2],s=t[u],l=t[u+1],h=t[c],d=t[c+1],p=t[f],g=t[f+1],y=h-s,v=d-l,_=p-s,b=g-l,m=y*y+v*v,x=_*_+b*b,w=2*(y*b-v*_);if(w)if(Math.abs(w)<1e-8)n=(s+p)/2,r=(l+g)/2;else{const t=1/w;n=s+(b*m-v*x)*t,r=l+(y*x-_*m)*t}else n=(s+p)/2-1e8*b,r=(l+g)/2+1e8*_;i[a]=n,i[a+1]=r}let o,a,u,c=n[n.length-1],f=4*c,s=t[2*c],l=t[2*c+1];r.fill(0);for(let e=0;e<n.length;++e)c=n[e],o=f,a=s,u=l,f=4*c,s=t[2*c],l=t[2*c+1],r[o+2]=r[f]=u-l,r[o+3]=r[f+1]=s-a}render(t){const n=null==t?t=new Oa:void 0,{delaunay:{halfedges:e,inedges:r,hull:i},circumcenters:o,vectors:a}=this;if(i.length<=1)return null;for(let n=0,r=e.length;n<r;++n){const r=e[n];if(r<n)continue;const i=2*Math.floor(n/3),a=2*Math.floor(r/3),u=o[i],c=o[i+1],f=o[a],s=o[a+1];this._renderSegment(u,c,f,s,t)}let u,c=i[i.length-1];for(let n=0;n<i.length;++n){u=c,c=i[n];const e=2*Math.floor(r[c]/3),f=o[e],s=o[e+1],l=4*u,h=this._project(f,s,a[l+2],a[l+3]);h&&this._renderSegment(f,s,h[0],h[1],t)}return n&&n.value()}renderBounds(t){const n=null==t?t=new Oa:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),n&&n.value()}renderCell(t,n){const e=null==n?n=new Oa:void 0,r=this._clip(t);if(null===r||!r.length)return;n.moveTo(r[0],r[1]);let i=r.length;for(;r[0]===r[i-2]&&r[1]===r[i-1]&&i>1;)i-=2;for(let t=2;t<i;t+=2)r[t]===r[t-2]&&r[t+1]===r[t-1]||n.lineTo(r[t],r[t+1]);return n.closePath(),e&&e.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let n=0,e=t.length/2;n<e;++n){const t=this.cellPolygon(n);t&&(t.index=n,yield t)}}cellPolygon(t){const n=new Ua;return this.renderCell(t,n),n.value()}_renderSegment(t,n,e,r,i){let o;const a=this._regioncode(t,n),u=this._regioncode(e,r);0===a&&0===u?(i.moveTo(t,n),i.lineTo(e,r)):(o=this._clipSegment(t,n,e,r,a,u))&&(i.moveTo(o[0],o[1]),i.lineTo(o[2],o[3]))}contains(t,n,e){return(n=+n)==n&&(e=+e)==e&&this.delaunay._step(t,n,e)===t}*neighbors(t){const n=this._clip(t);if(n)for(const e of this.delaunay.neighbors(t)){const t=this._clip(e);if(t)t:for(let r=0,i=n.length;r<i;r+=2)for(let o=0,a=t.length;o<a;o+=2)if(n[r]==t[o]&&n[r+1]==t[o+1]&&n[(r+2)%i]==t[(o+a-2)%a]&&n[(r+3)%i]==t[(o+a-1)%a]){yield e;break t}}}_cell(t){const{circumcenters:n,delaunay:{inedges:e,halfedges:r,triangles:i}}=this,o=e[t];if(-1===o)return null;const a=[];let u=o;do{const e=Math.floor(u/3);if(a.push(n[2*e],n[2*e+1]),u=u%3==2?u-2:u+1,i[u]!==t)break;u=r[u]}while(u!==o&&-1!==u);return a}_clip(t){if(0===t&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const n=this._cell(t);if(null===n)return null;const{vectors:e}=this,r=4*t;return e[r]||e[r+1]?this._clipInfinite(t,n,e[r],e[r+1],e[r+2],e[r+3]):this._clipFinite(t,n)}_clipFinite(t,n){const e=n.length;let r,i,o,a,u,c=null,f=n[e-2],s=n[e-1],l=this._regioncode(f,s);for(let h=0;h<e;h+=2)if(r=f,i=s,f=n[h],s=n[h+1],o=l,l=this._regioncode(f,s),0===o&&0===l)a=u,u=0,c?c.push(f,s):c=[f,s];else{let n,e,h,d,p;if(0===o){if(null===(n=this._clipSegment(r,i,f,s,o,l)))continue;[e,h,d,p]=n}else{if(null===(n=this._clipSegment(f,s,r,i,l,o)))continue;[d,p,e,h]=n,a=u,u=this._edgecode(e,h),a&&u&&this._edge(t,a,u,c,c.length),c?c.push(e,h):c=[e,h]}a=u,u=this._edgecode(d,p),a&&u&&this._edge(t,a,u,c,c.length),c?c.push(d,p):c=[d,p]}if(c)a=u,u=this._edgecode(c[0],c[1]),a&&u&&this._edge(t,a,u,c,c.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return c}_clipSegment(t,n,e,r,i,o){for(;;){if(0===i&&0===o)return[t,n,e,r];if(i&o)return null;let a,u,c=i||o;8&c?(a=t+(e-t)*(this.ymax-n)/(r-n),u=this.ymax):4&c?(a=t+(e-t)*(this.ymin-n)/(r-n),u=this.ymin):2&c?(u=n+(r-n)*(this.xmax-t)/(e-t),a=this.xmax):(u=n+(r-n)*(this.xmin-t)/(e-t),a=this.xmin),i?(t=a,n=u,i=this._regioncode(t,n)):(e=a,r=u,o=this._regioncode(e,r))}}_clipInfinite(t,n,e,r,i,o){let a,u=Array.from(n);if((a=this._project(u[0],u[1],e,r))&&u.unshift(a[0],a[1]),(a=this._project(u[u.length-2],u[u.length-1],i,o))&&u.push(a[0],a[1]),u=this._clipFinite(t,u))for(let n,e=0,r=u.length,i=this._edgecode(u[r-2],u[r-1]);e<r;e+=2)n=i,i=this._edgecode(u[e],u[e+1]),n&&i&&(e=this._edge(t,n,i,u,e),r=u.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(u=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return u}_edge(t,n,e,r,i){for(;n!==e;){let e,o;switch(n){case 5:n=4;continue;case 4:n=6,e=this.xmax,o=this.ymin;break;case 6:n=2;continue;case 2:n=10,e=this.xmax,o=this.ymax;break;case 10:n=8;continue;case 8:n=9,e=this.xmin,o=this.ymax;break;case 9:n=1;continue;case 1:n=5,e=this.xmin,o=this.ymin}r[i]===e&&r[i+1]===o||!this.contains(t,e,o)||(r.splice(i,0,e,o),i+=2)}if(r.length>4)for(let t=0;t<r.length;t+=2){const n=(t+2)%r.length,e=(t+4)%r.length;(r[t]===r[n]&&r[n]===r[e]||r[t+1]===r[n+1]&&r[n+1]===r[e+1])&&(r.splice(n,2),t-=2)}return i}_project(t,n,e,r){let i,o,a,u=1/0;if(r<0){if(n<=this.ymin)return null;(i=(this.ymin-n)/r)<u&&(a=this.ymin,o=t+(u=i)*e)}else if(r>0){if(n>=this.ymax)return null;(i=(this.ymax-n)/r)<u&&(a=this.ymax,o=t+(u=i)*e)}if(e>0){if(t>=this.xmax)return null;(i=(this.xmax-t)/e)<u&&(o=this.xmax,a=n+(u=i)*r)}else if(e<0){if(t<=this.xmin)return null;(i=(this.xmin-t)/e)<u&&(o=this.xmin,a=n+(u=i)*r)}return[o,a]}_edgecode(t,n){return(t===this.xmin?1:t===this.xmax?2:0)|(n===this.ymin?4:n===this.ymax?8:0)}_regioncode(t,n){return(t<this.xmin?1:t>this.xmax?2:0)|(n<this.ymin?4:n>this.ymax?8:0)}}const Ba=2*Math.PI,Ya=Math.pow;function La(t){return t[0]}function ja(t){return t[1]}function Ha(t,n,e){return[t+Math.sin(t+n)*e,n+Math.cos(t-n)*e]}class Xa{static from(t,n=La,e=ja,r){return new Xa("length"in t?function(t,n,e,r){const i=t.length,o=new Float64Array(2*i);for(let a=0;a<i;++a){const i=t[a];o[2*a]=n.call(r,i,a,t),o[2*a+1]=e.call(r,i,a,t)}return o}(t,n,e,r):Float64Array.from(function*(t,n,e,r){let i=0;for(const o of t)yield n.call(r,o,i,t),yield e.call(r,o,i,t),++i}(t,n,e,r)))}constructor(t){this._delaunator=new Sa(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,n=this.points;if(t.hull&&t.hull.length>2&&function(t){const{triangles:n,coords:e}=t;for(let t=0;t<n.length;t+=3){const r=2*n[t],i=2*n[t+1],o=2*n[t+2];if((e[o]-e[r])*(e[i+1]-e[r+1])-(e[i]-e[r])*(e[o+1]-e[r+1])>1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:n.length/2},(t,n)=>n).sort((t,e)=>n[2*t]-n[2*e]||n[2*t+1]-n[2*e+1]);const t=this.collinear[0],e=this.collinear[this.collinear.length-1],r=[n[2*t],n[2*t+1],n[2*e],n[2*e+1]],i=1e-8*Math.hypot(r[3]-r[1],r[2]-r[0]);for(let t=0,e=n.length/2;t<e;++t){const e=Ha(n[2*t],n[2*t+1],i);n[2*t]=e[0],n[2*t+1]=e[1]}this._delaunator=new Sa(n)}else delete this.collinear;const e=this.halfedges=this._delaunator.halfedges,r=this.hull=this._delaunator.hull,i=this.triangles=this._delaunator.triangles,o=this.inedges.fill(-1),a=this._hullIndex.fill(-1);for(let t=0,n=e.length;t<n;++t){const n=i[t%3==2?t-2:t+1];-1!==e[t]&&-1!==o[n]||(o[n]=t)}for(let t=0,n=r.length;t<n;++t)a[r[t]]=t;r.length<=2&&r.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=r[0],this.triangles[1]=r[1],this.triangles[2]=r[1],o[r[0]]=1,2===r.length&&(o[r[1]]=0))}voronoi(t){return new Ia(this,t)}*neighbors(t){const{inedges:n,hull:e,_hullIndex:r,halfedges:i,triangles:o,collinear:a}=this;if(a){const n=a.indexOf(t);return n>0&&(yield a[n-1]),void(n<a.length-1&&(yield a[n+1]))}const u=n[t];if(-1===u)return;let c=u,f=-1;do{if(yield f=o[c],c=c%3==2?c-2:c+1,o[c]!==t)return;if(c=i[c],-1===c){const n=e[(r[t]+1)%e.length];return void(n!==f&&(yield n))}}while(c!==u)}find(t,n,e=0){if((t=+t)!=t||(n=+n)!=n)return-1;const r=e;let i;for(;(i=this._step(e,t,n))>=0&&i!==e&&i!==r;)e=i;return i}_step(t,n,e){const{inedges:r,hull:i,_hullIndex:o,halfedges:a,triangles:u,points:c}=this;if(-1===r[t]||!c.length)return(t+1)%(c.length>>1);let f=t,s=Ya(n-c[2*t],2)+Ya(e-c[2*t+1],2);const l=r[t];let h=l;do{let r=u[h];const l=Ya(n-c[2*r],2)+Ya(e-c[2*r+1],2);if(l<s&&(s=l,f=r),h=h%3==2?h-2:h+1,u[h]!==t)break;if(h=a[h],-1===h){if(h=i[(o[t]+1)%i.length],h!==r&&Ya(n-c[2*h],2)+Ya(e-c[2*h+1],2)<s)return h;break}}while(h!==l);return f}render(t){const n=null==t?t=new Oa:void 0,{points:e,halfedges:r,triangles:i}=this;for(let n=0,o=r.length;n<o;++n){const o=r[n];if(o<n)continue;const a=2*i[n],u=2*i[o];t.moveTo(e[a],e[a+1]),t.lineTo(e[u],e[u+1])}return this.renderHull(t),n&&n.value()}renderPoints(t,n=2){const e=null==t?t=new Oa:void 0,{points:r}=this;for(let e=0,i=r.length;e<i;e+=2){const i=r[e],o=r[e+1];t.moveTo(i+n,o),t.arc(i,o,n,0,Ba)}return e&&e.value()}renderHull(t){const n=null==t?t=new Oa:void 0,{hull:e,points:r}=this,i=2*e[0],o=e.length;t.moveTo(r[i],r[i+1]);for(let n=1;n<o;++n){const i=2*e[n];t.lineTo(r[i],r[i+1])}return t.closePath(),n&&n.value()}hullPolygon(){const t=new Ua;return this.renderHull(t),t.value()}renderTriangle(t,n){const e=null==n?n=new Oa:void 0,{points:r,triangles:i}=this,o=2*i[t*=3],a=2*i[t+1],u=2*i[t+2];return n.moveTo(r[o],r[o+1]),n.lineTo(r[a],r[a+1]),n.lineTo(r[u],r[u+1]),n.closePath(),e&&e.value()}*trianglePolygons(){const{triangles:t}=this;for(let n=0,e=t.length/3;n<e;++n)yield this.trianglePolygon(n)}trianglePolygon(t){const n=new Ua;return this.renderTriangle(t,n),n.value()}}var Ga={},Va={};function $a(t){return new Function("d","return {"+t.map((function(t,n){return JSON.stringify(t)+": d["+n+'] || ""'})).join(",")+"}")}function Wa(t){var n=Object.create(null),e=[];return t.forEach((function(t){for(var r in t)r in n||e.push(n[r]=r)})),e}function Za(t,n){var e=t+"",r=e.length;return r<n?new Array(n-r+1).join(0)+e:e}function Ka(t){var n=t.getUTCHours(),e=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":function(t){return t<0?"-"+Za(-t,6):t>9999?"+"+Za(t,6):Za(t,4)}(t.getUTCFullYear())+"-"+Za(t.getUTCMonth()+1,2)+"-"+Za(t.getUTCDate(),2)+(i?"T"+Za(n,2)+":"+Za(e,2)+":"+Za(r,2)+"."+Za(i,3)+"Z":r?"T"+Za(n,2)+":"+Za(e,2)+":"+Za(r,2)+"Z":e||n?"T"+Za(n,2)+":"+Za(e,2)+"Z":"")}function Qa(t){var n=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function r(t,n){var r,i=[],o=t.length,a=0,u=0,c=o<=0,f=!1;function s(){if(c)return Va;if(f)return f=!1,Ga;var n,r,i=a;if(34===t.charCodeAt(i)){for(;a++<o&&34!==t.charCodeAt(a)||34===t.charCodeAt(++a););return(n=a)>=o?c=!0:10===(r=t.charCodeAt(a++))?f=!0:13===r&&(f=!0,10===t.charCodeAt(a)&&++a),t.slice(i+1,n-1).replace(/""/g,'"')}for(;a<o;){if(10===(r=t.charCodeAt(n=a++)))f=!0;else if(13===r)f=!0,10===t.charCodeAt(a)&&++a;else if(r!==e)continue;return t.slice(i,n)}return c=!0,t.slice(i,o)}for(10===t.charCodeAt(o-1)&&--o,13===t.charCodeAt(o-1)&&--o;(r=s())!==Va;){for(var l=[];r!==Ga&&r!==Va;)l.push(r),r=s();n&&null==(l=n(l,u++))||i.push(l)}return i}function i(n,e){return n.map((function(n){return e.map((function(t){return a(n[t])})).join(t)}))}function o(n){return n.map(a).join(t)}function a(t){return null==t?"":t instanceof Date?Ka(t):n.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,n){var e,i,o=r(t,(function(t,r){if(e)return e(t,r-1);i=t,e=n?function(t,n){var e=$a(t);return function(r,i){return n(e(r),i,t)}}(t,n):$a(t)}));return o.columns=i||[],o},parseRows:r,format:function(n,e){return null==e&&(e=Wa(n)),[e.map(a).join(t)].concat(i(n,e)).join("\n")},formatBody:function(t,n){return null==n&&(n=Wa(t)),i(t,n).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}}var Ja=Qa(","),tu=Ja.parse,nu=Ja.parseRows,eu=Ja.format,ru=Ja.formatBody,iu=Ja.formatRows,ou=Ja.formatRow,au=Ja.formatValue,uu=Qa("\t"),cu=uu.parse,fu=uu.parseRows,su=uu.format,lu=uu.formatBody,hu=uu.formatRows,du=uu.formatRow,pu=uu.formatValue;const gu=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function yu(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function vu(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function _u(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function bu(t,n){return fetch(t,n).then(_u)}function mu(t){return function(n,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=void 0),bu(n,e).then((function(n){return t(n,r)}))}}var xu=mu(tu),wu=mu(cu);function Mu(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function Au(t){return(n,e)=>bu(n,e).then(n=>(new DOMParser).parseFromString(n,t))}var Tu=Au("application/xml"),Su=Au("text/html"),Eu=Au("image/svg+xml");function ku(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,a,u,c,f,s,l,h,d=t._root,p={data:r},g=t._x0,y=t._y0,v=t._x1,_=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((f=n>=(o=(g+v)/2))?g=o:v=o,(s=e>=(a=(y+_)/2))?y=a:_=a,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(u=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===u&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(o=(g+v)/2))?g=o:v=o,(s=e>=(a=(y+_)/2))?y=a:_=a}while((l=s<<1|f)==(h=(c>=a)<<1|u>=o));return i[h]=d,i[l]=p,t}function Nu(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function Cu(t){return t[0]}function Pu(t){return t[1]}function zu(t,n,e){var r=new Du(null==n?Cu:n,null==e?Pu:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Du(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function qu(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Ru=zu.prototype=Du.prototype;function Fu(t){return function(){return t}}function Ou(t){return 1e-6*(t()-.5)}function Uu(t){return t.x+t.vx}function Iu(t){return t.y+t.vy}function Bu(t){return t.index}function Yu(t,n){var e=t.get(n);if(!e)throw new Error("node not found: "+n);return e}Ru.copy=function(){var t,n,e=new Du(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=qu(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=qu(n));return e},Ru.add=function(t){const n=+this._x.call(null,t),e=+this._y.call(null,t);return ku(this.cover(n,e),n,e,t)},Ru.addAll=function(t){var n,e,r,i,o=t.length,a=new Array(o),u=new Array(o),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;e<o;++e)isNaN(r=+this._x.call(null,n=t[e]))||isNaN(i=+this._y.call(null,n))||(a[e]=r,u[e]=i,r<c&&(c=r),r>s&&(s=r),i<f&&(f=i),i>l&&(l=i));if(c>s||f>l)return this;for(this.cover(c,f).cover(s,l),e=0;e<o;++e)ku(this,a[e],u[e],t[e]);return this},Ru.cover=function(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(e))i=(e=Math.floor(t))+1,o=(r=Math.floor(n))+1;else{for(var a,u,c=i-e||1,f=this._root;e>t||t>=i||r>n||n>=o;)switch(u=(n<r)<<1|t<e,(a=new Array(4))[u]=f,f=a,c*=2,u){case 0:i=e+c,o=r+c;break;case 1:e=i-c,o=r+c;break;case 2:i=e+c,r=o-c;break;case 3:e=i-c,r=o-c}this._root&&this._root.length&&(this._root=f)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},Ru.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},Ru.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Ru.find=function(t,n,e){var r,i,o,a,u,c,f,s=this._x0,l=this._y0,h=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new Nu(g,s,l,h,d)),null==e?e=1/0:(s=t-e,l=n-e,h=t+e,d=n+e,e*=e);c=p.pop();)if(!(!(g=c.node)||(i=c.x0)>h||(o=c.y0)>d||(a=c.x1)<s||(u=c.y1)<l))if(g.length){var y=(i+a)/2,v=(o+u)/2;p.push(new Nu(g[3],y,v,a,u),new Nu(g[2],i,v,y,u),new Nu(g[1],y,o,a,v),new Nu(g[0],i,o,y,v)),(f=(n>=v)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var _=t-+this._x.call(null,g.data),b=n-+this._y.call(null,g.data),m=_*_+b*b;if(m<e){var x=Math.sqrt(e=m);s=t-x,l=n-x,h=t+x,d=n+x,r=g.data}}return r},Ru.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var n,e,r,i,o,a,u,c,f,s,l,h,d=this._root,p=this._x0,g=this._y0,y=this._x1,v=this._y1;if(!d)return this;if(d.length)for(;;){if((f=o>=(u=(p+y)/2))?p=u:y=u,(s=a>=(c=(g+v)/2))?g=c:v=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},Ru.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},Ru.root=function(){return this._root},Ru.size=function(){var t=0;return this.visit((function(n){if(!n.length)do{++t}while(n=n.next)})),t},Ru.visit=function(t){var n,e,r,i,o,a,u=[],c=this._root;for(c&&u.push(new Nu(c,this._x0,this._y0,this._x1,this._y1));n=u.pop();)if(!t(c=n.node,r=n.x0,i=n.y0,o=n.x1,a=n.y1)&&c.length){var f=(r+o)/2,s=(i+a)/2;(e=c[3])&&u.push(new Nu(e,f,s,o,a)),(e=c[2])&&u.push(new Nu(e,r,s,f,a)),(e=c[1])&&u.push(new Nu(e,f,i,o,s)),(e=c[0])&&u.push(new Nu(e,r,i,f,s))}return this},Ru.visitAfter=function(t){var n,e=[],r=[];for(this._root&&e.push(new Nu(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var i=n.node;if(i.length){var o,a=n.x0,u=n.y0,c=n.x1,f=n.y1,s=(a+c)/2,l=(u+f)/2;(o=i[0])&&e.push(new Nu(o,a,u,s,l)),(o=i[1])&&e.push(new Nu(o,s,u,c,l)),(o=i[2])&&e.push(new Nu(o,a,l,s,f)),(o=i[3])&&e.push(new Nu(o,s,l,c,f))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},Ru.x=function(t){return arguments.length?(this._x=t,this):this._x},Ru.y=function(t){return arguments.length?(this._y=t,this):this._y};const Lu=4294967296;function ju(t){return t.x}function Hu(t){return t.y}var Xu=Math.PI*(3-Math.sqrt(5));function Gu(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function Vu(t){return(t=Gu(Math.abs(t)))?t[1]:NaN}var $u,Wu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Zu(t){if(!(n=Wu.exec(t)))throw new Error("invalid format: "+t);var n;return new Ku({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Ku(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Qu(t,n){var e=Gu(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Zu.prototype=Ku.prototype,Ku.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Ju={"%":(t,n)=>(100*t).toFixed(n),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,n)=>t.toExponential(n),f:(t,n)=>t.toFixed(n),g:(t,n)=>t.toPrecision(n),o:t=>Math.round(t).toString(8),p:(t,n)=>Qu(100*t,n),r:Qu,s:function(t,n){var e=Gu(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-($u=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Gu(t,Math.max(0,n+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function tc(t){return t}var nc,ec=Array.prototype.map,rc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ic(t){var n,e,r=void 0===t.grouping||void 0===t.thousands?tc:(n=ec.call(t.grouping,Number),e=t.thousands+"",function(t,r){for(var i=t.length,o=[],a=0,u=n[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(t.substring(i-=u,i+u)),!((c+=u+1)>r));)u=n[a=(a+1)%n.length];return o.reverse().join(e)}),i=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",u=void 0===t.numerals?tc:function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(ec.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",f=void 0===t.minus?"−":t.minus+"",s=void 0===t.nan?"NaN":t.nan+"";function l(t){var n=(t=Zu(t)).fill,e=t.align,l=t.sign,h=t.symbol,d=t.zero,p=t.width,g=t.comma,y=t.precision,v=t.trim,_=t.type;"n"===_?(g=!0,_="g"):Ju[_]||(void 0===y&&(y=12),v=!0,_="g"),(d||"0"===n&&"="===e)&&(d=!0,n="0",e="=");var b="$"===h?i:"#"===h&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",m="$"===h?o:/[%p]/.test(_)?c:"",x=Ju[_],w=/[defgprs%]/.test(_);function M(t){var i,o,c,h=b,M=m;if("c"===_)M=x(t)+M,t="";else{var A=(t=+t)<0||1/t<0;if(t=isNaN(t)?s:x(Math.abs(t),y),v&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":0===i&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),A&&0==+t&&"+"!==l&&(A=!1),h=(A?"("===l?l:f:"-"===l||"("===l?"":l)+h,M=("s"===_?rc[8+$u/3]:"")+M+(A&&"("===l?")":""),w)for(i=-1,o=t.length;++i<o;)if(48>(c=t.charCodeAt(i))||c>57){M=(46===c?a+t.slice(i+1):t.slice(i))+M,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var T=h.length+t.length+M.length,S=T<p?new Array(p-T+1).join(n):"";switch(g&&d&&(t=r(S+t,S.length?p-M.length:1/0),S=""),e){case"<":t=h+t+M+S;break;case"=":t=h+S+t+M;break;case"^":t=S.slice(0,T=S.length>>1)+h+t+M+S.slice(T);break;default:t=S+h+t+M}return u(t)}return y=void 0===y?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),M.toString=function(){return t+""},M}return{format:l,formatPrefix:function(t,n){var e=l(((t=Zu(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Vu(n)/3))),i=Math.pow(10,-r),o=rc[8+r/3];return function(t){return e(i*t)+o}}}}function oc(n){return nc=ic(n),t.format=nc.format,t.formatPrefix=nc.formatPrefix,nc}function ac(t){return Math.max(0,-Vu(Math.abs(t)))}function uc(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Vu(n)/3)))-Vu(Math.abs(t)))}function cc(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Vu(n)-Vu(t))+1}oc({thousands:",",grouping:[3],currency:["$",""]});var fc=1e-6,sc=1e-12,lc=Math.PI,hc=lc/2,dc=lc/4,pc=2*lc,gc=180/lc,yc=lc/180,vc=Math.abs,_c=Math.atan,bc=Math.atan2,mc=Math.cos,xc=Math.ceil,wc=Math.exp,Mc=Math.hypot,Ac=Math.log,Tc=Math.pow,Sc=Math.sin,Ec=Math.sign||function(t){return t>0?1:t<0?-1:0},kc=Math.sqrt,Nc=Math.tan;function Cc(t){return t>1?0:t<-1?lc:Math.acos(t)}function Pc(t){return t>1?hc:t<-1?-hc:Math.asin(t)}function zc(t){return(t=Sc(t/2))*t}function Dc(){}function qc(t,n){t&&Fc.hasOwnProperty(t.type)&&Fc[t.type](t,n)}var Rc={Feature:function(t,n){qc(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)qc(e[r].geometry,n)}},Fc={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)t=e[r],n.point(t[0],t[1],t[2])},LineString:function(t,n){Oc(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)Oc(e[r],n,0)},Polygon:function(t,n){Uc(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)Uc(e[r],n)},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)qc(e[r],n)}};function Oc(t,n,e){var r,i=-1,o=t.length-e;for(n.lineStart();++i<o;)r=t[i],n.point(r[0],r[1],r[2]);n.lineEnd()}function Uc(t,n){var e=-1,r=t.length;for(n.polygonStart();++e<r;)Oc(t[e],n,1);n.polygonEnd()}function Ic(t,n){t&&Rc.hasOwnProperty(t.type)?Rc[t.type](t,n):qc(t,n)}var Bc,Yc,Lc,jc,Hc,Xc,Gc,Vc,$c,Wc,Zc,Kc,Qc,Jc,tf,nf,ef=new g,rf=new g,of={point:Dc,lineStart:Dc,lineEnd:Dc,polygonStart:function(){ef=new g,of.lineStart=af,of.lineEnd=uf},polygonEnd:function(){var t=+ef;rf.add(t<0?pc+t:t),this.lineStart=this.lineEnd=this.point=Dc},sphere:function(){rf.add(pc)}};function af(){of.point=cf}function uf(){ff(Bc,Yc)}function cf(t,n){of.point=ff,Bc=t,Yc=n,Lc=t*=yc,jc=mc(n=(n*=yc)/2+dc),Hc=Sc(n)}function ff(t,n){var e=(t*=yc)-Lc,r=e>=0?1:-1,i=r*e,o=mc(n=(n*=yc)/2+dc),a=Sc(n),u=Hc*a,c=jc*o+u*mc(i),f=u*r*Sc(i);ef.add(bc(f,c)),Lc=t,jc=o,Hc=a}function sf(t){return[bc(t[1],t[0]),Pc(t[2])]}function lf(t){var n=t[0],e=t[1],r=mc(e);return[r*mc(n),r*Sc(n),Sc(e)]}function hf(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function df(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function pf(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function gf(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function yf(t){var n=kc(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var vf,_f,bf,mf,xf,wf,Mf,Af,Tf,Sf,Ef,kf,Nf,Cf,Pf,zf,Df={point:qf,lineStart:Ff,lineEnd:Of,polygonStart:function(){Df.point=Uf,Df.lineStart=If,Df.lineEnd=Bf,Jc=new g,of.polygonStart()},polygonEnd:function(){of.polygonEnd(),Df.point=qf,Df.lineStart=Ff,Df.lineEnd=Of,ef<0?(Xc=-(Vc=180),Gc=-($c=90)):Jc>fc?$c=90:Jc<-1e-6&&(Gc=-90),nf[0]=Xc,nf[1]=Vc},sphere:function(){Xc=-(Vc=180),Gc=-($c=90)}};function qf(t,n){tf.push(nf=[Xc=t,Vc=t]),n<Gc&&(Gc=n),n>$c&&($c=n)}function Rf(t,n){var e=lf([t*yc,n*yc]);if(Qc){var r=df(Qc,e),i=df([r[1],-r[0],0],r);yf(i),i=sf(i);var o,a=t-Wc,u=a>0?1:-1,c=i[0]*gc*u,f=vc(a)>180;f^(u*Wc<c&&c<u*t)?(o=i[1]*gc)>$c&&($c=o):f^(u*Wc<(c=(c+360)%360-180)&&c<u*t)?(o=-i[1]*gc)<Gc&&(Gc=o):(n<Gc&&(Gc=n),n>$c&&($c=n)),f?t<Wc?Yf(Xc,t)>Yf(Xc,Vc)&&(Vc=t):Yf(t,Vc)>Yf(Xc,Vc)&&(Xc=t):Vc>=Xc?(t<Xc&&(Xc=t),t>Vc&&(Vc=t)):t>Wc?Yf(Xc,t)>Yf(Xc,Vc)&&(Vc=t):Yf(t,Vc)>Yf(Xc,Vc)&&(Xc=t)}else tf.push(nf=[Xc=t,Vc=t]);n<Gc&&(Gc=n),n>$c&&($c=n),Qc=e,Wc=t}function Ff(){Df.point=Rf}function Of(){nf[0]=Xc,nf[1]=Vc,Df.point=qf,Qc=null}function Uf(t,n){if(Qc){var e=t-Wc;Jc.add(vc(e)>180?e+(e>0?360:-360):e)}else Zc=t,Kc=n;of.point(t,n),Rf(t,n)}function If(){of.lineStart()}function Bf(){Uf(Zc,Kc),of.lineEnd(),vc(Jc)>fc&&(Xc=-(Vc=180)),nf[0]=Xc,nf[1]=Vc,Qc=null}function Yf(t,n){return(n-=t)<0?n+360:n}function Lf(t,n){return t[0]-n[0]}function jf(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var Hf={sphere:Dc,point:Xf,lineStart:Vf,lineEnd:Zf,polygonStart:function(){Hf.lineStart=Kf,Hf.lineEnd=Qf},polygonEnd:function(){Hf.lineStart=Vf,Hf.lineEnd=Zf}};function Xf(t,n){t*=yc;var e=mc(n*=yc);Gf(e*mc(t),e*Sc(t),Sc(n))}function Gf(t,n,e){++vf,bf+=(t-bf)/vf,mf+=(n-mf)/vf,xf+=(e-xf)/vf}function Vf(){Hf.point=$f}function $f(t,n){t*=yc;var e=mc(n*=yc);Cf=e*mc(t),Pf=e*Sc(t),zf=Sc(n),Hf.point=Wf,Gf(Cf,Pf,zf)}function Wf(t,n){t*=yc;var e=mc(n*=yc),r=e*mc(t),i=e*Sc(t),o=Sc(n),a=bc(kc((a=Pf*o-zf*i)*a+(a=zf*r-Cf*o)*a+(a=Cf*i-Pf*r)*a),Cf*r+Pf*i+zf*o);_f+=a,wf+=a*(Cf+(Cf=r)),Mf+=a*(Pf+(Pf=i)),Af+=a*(zf+(zf=o)),Gf(Cf,Pf,zf)}function Zf(){Hf.point=Xf}function Kf(){Hf.point=Jf}function Qf(){ts(kf,Nf),Hf.point=Xf}function Jf(t,n){kf=t,Nf=n,t*=yc,n*=yc,Hf.point=ts;var e=mc(n);Cf=e*mc(t),Pf=e*Sc(t),zf=Sc(n),Gf(Cf,Pf,zf)}function ts(t,n){t*=yc;var e=mc(n*=yc),r=e*mc(t),i=e*Sc(t),o=Sc(n),a=Pf*o-zf*i,u=zf*r-Cf*o,c=Cf*i-Pf*r,f=Mc(a,u,c),s=Pc(f),l=f&&-s/f;Tf.add(l*a),Sf.add(l*u),Ef.add(l*c),_f+=s,wf+=s*(Cf+(Cf=r)),Mf+=s*(Pf+(Pf=i)),Af+=s*(zf+(zf=o)),Gf(Cf,Pf,zf)}function ns(t){return function(){return t}}function es(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}return t.invert&&n.invert&&(e.invert=function(e,r){return(e=n.invert(e,r))&&t.invert(e[0],e[1])}),e}function rs(t,n){return[vc(t)>lc?t+Math.round(-t/pc)*pc:t,n]}function is(t,n,e){return(t%=pc)?n||e?es(as(t),us(n,e)):as(t):n||e?us(n,e):rs}function os(t){return function(n,e){return[(n+=t)>lc?n-pc:n<-lc?n+pc:n,e]}}function as(t){var n=os(t);return n.invert=os(-t),n}function us(t,n){var e=mc(t),r=Sc(t),i=mc(n),o=Sc(n);function a(t,n){var a=mc(n),u=mc(t)*a,c=Sc(t)*a,f=Sc(n),s=f*e+u*r;return[bc(c*i-s*o,u*e-f*r),Pc(s*i+c*o)]}return a.invert=function(t,n){var a=mc(n),u=mc(t)*a,c=Sc(t)*a,f=Sc(n),s=f*i-c*o;return[bc(c*i+f*o,u*e+s*r),Pc(s*e-u*r)]},a}function cs(t){function n(n){return(n=t(n[0]*yc,n[1]*yc))[0]*=gc,n[1]*=gc,n}return t=is(t[0]*yc,t[1]*yc,t.length>2?t[2]*yc:0),n.invert=function(n){return(n=t.invert(n[0]*yc,n[1]*yc))[0]*=gc,n[1]*=gc,n},n}function fs(t,n,e,r,i,o){if(e){var a=mc(n),u=Sc(n),c=r*e;null==i?(i=n+r*pc,o=n-c/2):(i=ss(a,i),o=ss(a,o),(r>0?i<o:i>o)&&(i+=r*pc));for(var f,s=i;r>0?s>o:s<o;s-=c)f=sf([a,-u*mc(s),-u*Sc(s)]),t.point(f[0],f[1])}}function ss(t,n){(n=lf(n))[0]-=t,yf(n);var e=Cc(-n[1]);return((-n[2]<0?-e:e)+pc-fc)%pc}function ls(){var t,n=[];return{point:function(n,e,r){t.push([n,e,r])},lineStart:function(){n.push(t=[])},lineEnd:Dc,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function hs(t,n){return vc(t[0]-n[0])<fc&&vc(t[1]-n[1])<fc}function ds(t,n,e,r){this.x=t,this.z=n,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function ps(t,n,e,r,i){var o,a,u=[],c=[];if(t.forEach((function(t){if(!((n=t.length-1)<=0)){var n,e,r=t[0],a=t[n];if(hs(r,a)){if(!r[2]&&!a[2]){for(i.lineStart(),o=0;o<n;++o)i.point((r=t[o])[0],r[1]);return void i.lineEnd()}a[0]+=2e-6}u.push(e=new ds(r,t,null,!0)),c.push(e.o=new ds(r,null,e,!1)),u.push(e=new ds(a,t,null,!1)),c.push(e.o=new ds(a,null,e,!0))}})),u.length){for(c.sort(n),gs(u),gs(c),o=0,a=c.length;o<a;++o)c[o].e=e=!e;for(var f,s,l=u[0];;){for(var h=l,d=!0;h.v;)if((h=h.n)===l)return;f=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(o=0,a=f.length;o<a;++o)i.point((s=f[o])[0],s[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(d)for(f=h.p.z,o=f.length-1;o>=0;--o)i.point((s=f[o])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}}function gs(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r<n;)i.n=e=t[r],e.p=i,i=e;i.n=e=t[0],e.p=i}}function ys(t){return vc(t[0])<=lc?t[0]:Ec(t[0])*((vc(t[0])+lc)%pc-lc)}function vs(t,n){var e=ys(n),r=n[1],i=Sc(r),o=[Sc(e),-mc(e),0],a=0,u=0,c=new g;1===i?r=hc+fc:-1===i&&(r=-hc-fc);for(var f=0,s=t.length;f<s;++f)if(h=(l=t[f]).length)for(var l,h,d=l[h-1],p=ys(d),y=d[1]/2+dc,v=Sc(y),_=mc(y),b=0;b<h;++b,p=x,v=M,_=A,d=m){var m=l[b],x=ys(m),w=m[1]/2+dc,M=Sc(w),A=mc(w),T=x-p,S=T>=0?1:-1,E=S*T,k=E>lc,N=v*M;if(c.add(bc(N*S*Sc(E),_*A+N*mc(E))),a+=k?T+S*pc:T,k^p>=e^x>=e){var C=df(lf(d),lf(m));yf(C);var P=df(o,C);yf(P);var z=(k^T>=0?-1:1)*Pc(P[2]);(r>z||r===z&&(C[0]||C[1]))&&(u+=k^T>=0?1:-1)}}return(a<-1e-6||a<fc&&c<-1e-12)^1&u}function _s(t,n,e,r){return function(i){var o,a,u,c=n(i),f=ls(),s=n(f),l=!1,h={point:d,lineStart:g,lineEnd:y,polygonStart:function(){h.point=v,h.lineStart=_,h.lineEnd=b,a=[],o=[]},polygonEnd:function(){h.point=d,h.lineStart=g,h.lineEnd=y,a=O(a);var t=vs(o,r);a.length?(l||(i.polygonStart(),l=!0),ps(a,ms,t,e,i)):t&&(l||(i.polygonStart(),l=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),a=o=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(n,e){t(n,e)&&i.point(n,e)}function p(t,n){c.point(t,n)}function g(){h.point=p,c.lineStart()}function y(){h.point=d,c.lineEnd()}function v(t,n){u.push([t,n]),s.point(t,n)}function _(){s.lineStart(),u=[]}function b(){v(u[0][0],u[0][1]),s.lineEnd();var t,n,e,r,c=s.clean(),h=f.result(),d=h.length;if(u.pop(),o.push(u),u=null,d)if(1&c){if((n=(e=h[0]).length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t<n;++t)i.point((r=e[t])[0],r[1]);i.lineEnd()}}else d>1&&2&c&&h.push(h.pop().concat(h.shift())),a.push(h.filter(bs))}return h}}function bs(t){return t.length>1}function ms(t,n){return((t=t.x)[0]<0?t[1]-hc-fc:hc-t[1])-((n=n.x)[0]<0?n[1]-hc-fc:hc-n[1])}rs.invert=rs;var xs=_s((function(){return!0}),(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var u=o>0?lc:-lc,c=vc(o-e);vc(c-lc)<fc?(t.point(e,r=(r+a)/2>0?hc:-hc),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),n=0):i!==u&&c>=lc&&(vc(e-i)<fc&&(e-=i*fc),vc(o-u)<fc&&(o-=u*fc),r=function(t,n,e,r){var i,o,a=Sc(t-e);return vc(a)>fc?_c((Sc(n)*(o=mc(r))*Sc(e)-Sc(r)*(i=mc(n))*Sc(t))/(i*o*a)):(n+r)/2}(e,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=o,r=a),i=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var i;if(null==t)i=e*hc,r.point(-lc,i),r.point(0,i),r.point(lc,i),r.point(lc,0),r.point(lc,-i),r.point(0,-i),r.point(-lc,-i),r.point(-lc,0),r.point(-lc,i);else if(vc(t[0]-n[0])>fc){var o=t[0]<n[0]?lc:-lc;i=e*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(n[0],n[1])}),[-lc,-hc]);function ws(t){var n=mc(t),e=6*yc,r=n>0,i=vc(n)>fc;function o(t,e){return mc(t)*mc(e)>n}function a(t,e,r){var i=[1,0,0],o=df(lf(t),lf(e)),a=hf(o,o),u=o[0],c=a-u*u;if(!c)return!r&&t;var f=n*a/c,s=-n*u/c,l=df(i,o),h=gf(i,f);pf(h,gf(o,s));var d=l,p=hf(h,d),g=hf(d,d),y=p*p-g*(hf(h,h)-1);if(!(y<0)){var v=kc(y),_=gf(d,(-p-v)/g);if(pf(_,h),_=sf(_),!r)return _;var b,m=t[0],x=e[0],w=t[1],M=e[1];x<m&&(b=m,m=x,x=b);var A=x-m,T=vc(A-lc)<fc;if(!T&&M<w&&(b=w,w=M,M=b),T||A<fc?T?w+M>0^_[1]<(vc(_[0]-m)<fc?w:M):w<=_[1]&&_[1]<=M:A>lc^(m<=_[0]&&_[0]<=x)){var S=gf(d,(-p+v)/g);return pf(S,h),[_,sf(S)]}}}function u(n,e){var i=r?t:lc-t,o=0;return n<-i?o|=1:n>i&&(o|=2),e<-i?o|=4:e>i&&(o|=8),o}return _s(o,(function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],g=o(l,h),y=r?g?0:u(l,h):g?u(l+(l<0?lc:-lc),h):0;if(!n&&(f=c=g)&&t.lineStart(),g!==c&&(!(d=a(n,p))||hs(n,d)||hs(p,d))&&(p[2]=1),g!==c)s=0,g?(t.lineStart(),d=a(p,n),t.point(d[0],d[1])):(d=a(n,p),t.point(d[0],d[1],2),t.lineEnd()),n=d;else if(i&&n&&r^g){var v;y&e||!(v=a(p,n,!0))||(s=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1],3)))}!g||n&&hs(n,p)||t.point(p[0],p[1]),n=p,c=g,e=y},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}}),(function(n,r,i,o){fs(o,t,e,i,n,r)}),r?[0,-t]:[-lc,t-lc])}var Ms,As,Ts,Ss,Es=1e9,ks=-Es;function Ns(t,n,e,r){function i(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function o(i,o,u,f){var s=0,l=0;if(null==i||(s=a(i,u))!==(l=a(o,u))||c(i,o)<0^u>0)do{f.point(0===s||3===s?t:e,s>1?r:n)}while((s=(s+u+4)%4)!==l);else f.point(o[0],o[1])}function a(r,i){return vc(r[0]-t)<fc?i>0?0:3:vc(r[0]-e)<fc?i>0?2:1:vc(r[1]-n)<fc?i>0?1:0:i>0?3:2}function u(t,n){return c(t.x,n.x)}function c(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var c,f,s,l,h,d,p,g,y,v,_,b=a,m=ls(),x={point:w,lineStart:function(){x.point=M,f&&f.push(s=[]);v=!0,y=!1,p=g=NaN},lineEnd:function(){c&&(M(l,h),d&&y&&m.rejoin(),c.push(m.result()));x.point=w,y&&b.lineEnd()},polygonStart:function(){b=m,c=[],f=[],_=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,i=f.length;e<i;++e)for(var o,a,u=f[e],c=1,s=u.length,l=u[0],h=l[0],d=l[1];c<s;++c)o=h,a=d,h=(l=u[c])[0],d=l[1],a<=r?d>r&&(h-o)*(r-a)>(d-a)*(t-o)&&++n:d<=r&&(h-o)*(r-a)<(d-a)*(t-o)&&--n;return n}(),e=_&&n,i=(c=O(c)).length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),i&&ps(c,u,n,o,a),a.polygonEnd());b=a,c=f=s=null}};function w(t,n){i(t,n)&&b.point(t,n)}function M(o,a){var u=i(o,a);if(f&&s.push([o,a]),v)l=o,h=a,d=u,v=!1,u&&(b.lineStart(),b.point(o,a));else if(u&&y)b.point(o,a);else{var c=[p=Math.max(ks,Math.min(Es,p)),g=Math.max(ks,Math.min(Es,g))],m=[o=Math.max(ks,Math.min(Es,o)),a=Math.max(ks,Math.min(Es,a))];!function(t,n,e,r,i,o){var a,u=t[0],c=t[1],f=0,s=1,l=n[0]-u,h=n[1]-c;if(a=e-u,l||!(a>0)){if(a/=l,l<0){if(a<f)return;a<s&&(s=a)}else if(l>0){if(a>s)return;a>f&&(f=a)}if(a=i-u,l||!(a<0)){if(a/=l,l<0){if(a>s)return;a>f&&(f=a)}else if(l>0){if(a<f)return;a<s&&(s=a)}if(a=r-c,h||!(a>0)){if(a/=h,h<0){if(a<f)return;a<s&&(s=a)}else if(h>0){if(a>s)return;a>f&&(f=a)}if(a=o-c,h||!(a<0)){if(a/=h,h<0){if(a>s)return;a>f&&(f=a)}else if(h>0){if(a<f)return;a<s&&(s=a)}return f>0&&(t[0]=u+f*l,t[1]=c+f*h),s<1&&(n[0]=u+s*l,n[1]=c+s*h),!0}}}}}(c,m,t,n,e,r)?u&&(b.lineStart(),b.point(o,a),_=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(m[0],m[1]),u||b.lineEnd(),_=!1)}p=o,g=a,y=u}return x}}var Cs={sphere:Dc,point:Dc,lineStart:function(){Cs.point=zs,Cs.lineEnd=Ps},lineEnd:Dc,polygonStart:Dc,polygonEnd:Dc};function Ps(){Cs.point=Cs.lineEnd=Dc}function zs(t,n){As=t*=yc,Ts=Sc(n*=yc),Ss=mc(n),Cs.point=Ds}function Ds(t,n){t*=yc;var e=Sc(n*=yc),r=mc(n),i=vc(t-As),o=mc(i),a=r*Sc(i),u=Ss*e-Ts*r*o,c=Ts*e+Ss*r*o;Ms.add(bc(kc(a*a+u*u),c)),As=t,Ts=e,Ss=r}function qs(t){return Ms=new g,Ic(t,Cs),+Ms}var Rs=[null,null],Fs={type:"LineString",coordinates:Rs};function Os(t,n){return Rs[0]=t,Rs[1]=n,qs(Fs)}var Us={Feature:function(t,n){return Bs(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)if(Bs(e[r].geometry,n))return!0;return!1}},Is={Sphere:function(){return!0},Point:function(t,n){return Ys(t.coordinates,n)},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(Ys(e[r],n))return!0;return!1},LineString:function(t,n){return Ls(t.coordinates,n)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(Ls(e[r],n))return!0;return!1},Polygon:function(t,n){return js(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(js(e[r],n))return!0;return!1},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)if(Bs(e[r],n))return!0;return!1}};function Bs(t,n){return!(!t||!Is.hasOwnProperty(t.type))&&Is[t.type](t,n)}function Ys(t,n){return 0===Os(t,n)}function Ls(t,n){for(var e,r,i,o=0,a=t.length;o<a;o++){if(0===(r=Os(t[o],n)))return!0;if(o>0&&(i=Os(t[o],t[o-1]))>0&&e<=i&&r<=i&&(e+r-i)*(1-Math.pow((e-r)/i,2))<sc*i)return!0;e=r}return!1}function js(t,n){return!!vs(t.map(Hs),Xs(n))}function Hs(t){return(t=t.map(Xs)).pop(),t}function Xs(t){return[t[0]*yc,t[1]*yc]}function Gs(t,n,e){var r=B(t,n-fc,e).concat(n);return function(t){return r.map((function(n){return[t,n]}))}}function Vs(t,n,e){var r=B(t,n-fc,e).concat(n);return function(t){return r.map((function(n){return[n,t]}))}}function $s(){var t,n,e,r,i,o,a,u,c,f,s,l,h=10,d=h,p=90,g=360,y=2.5;function v(){return{type:"MultiLineString",coordinates:_()}}function _(){return B(xc(r/p)*p,e,p).map(s).concat(B(xc(u/g)*g,a,g).map(l)).concat(B(xc(n/h)*h,t,h).filter((function(t){return vc(t%p)>fc})).map(c)).concat(B(xc(o/d)*d,i,d).filter((function(t){return vc(t%g)>fc})).map(f))}return v.lines=function(){return _().map((function(t){return{type:"LineString",coordinates:t}}))},v.outline=function(){return{type:"Polygon",coordinates:[s(r).concat(l(a).slice(1),s(e).reverse().slice(1),l(u).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],u=+t[0][1],a=+t[1][1],r>e&&(t=r,r=e,e=t),u>a&&(t=u,u=a,a=t),v.precision(y)):[[r,u],[e,a]]},v.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],i=+e[1][1],n>t&&(e=n,n=t,t=e),o>i&&(e=o,o=i,i=e),v.precision(y)):[[n,o],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],v):[p,g]},v.stepMinor=function(t){return arguments.length?(h=+t[0],d=+t[1],v):[h,d]},v.precision=function(h){return arguments.length?(y=+h,c=Gs(o,i,90),f=Vs(n,t,y),s=Gs(u,a,90),l=Vs(r,e,y),v):y},v.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}var Ws,Zs,Ks,Qs,Js=t=>t,tl=new g,nl=new g,el={point:Dc,lineStart:Dc,lineEnd:Dc,polygonStart:function(){el.lineStart=rl,el.lineEnd=al},polygonEnd:function(){el.lineStart=el.lineEnd=el.point=Dc,tl.add(vc(nl)),nl=new g},result:function(){var t=tl/2;return tl=new g,t}};function rl(){el.point=il}function il(t,n){el.point=ol,Ws=Ks=t,Zs=Qs=n}function ol(t,n){nl.add(Qs*t-Ks*n),Ks=t,Qs=n}function al(){ol(Ws,Zs)}var ul=1/0,cl=ul,fl=-ul,sl=fl,ll={point:function(t,n){t<ul&&(ul=t);t>fl&&(fl=t);n<cl&&(cl=n);n>sl&&(sl=n)},lineStart:Dc,lineEnd:Dc,polygonStart:Dc,polygonEnd:Dc,result:function(){var t=[[ul,cl],[fl,sl]];return fl=sl=-(cl=ul=1/0),t}};var hl,dl,pl,gl,yl=0,vl=0,_l=0,bl=0,ml=0,xl=0,wl=0,Ml=0,Al=0,Tl={point:Sl,lineStart:El,lineEnd:Cl,polygonStart:function(){Tl.lineStart=Pl,Tl.lineEnd=zl},polygonEnd:function(){Tl.point=Sl,Tl.lineStart=El,Tl.lineEnd=Cl},result:function(){var t=Al?[wl/Al,Ml/Al]:xl?[bl/xl,ml/xl]:_l?[yl/_l,vl/_l]:[NaN,NaN];return yl=vl=_l=bl=ml=xl=wl=Ml=Al=0,t}};function Sl(t,n){yl+=t,vl+=n,++_l}function El(){Tl.point=kl}function kl(t,n){Tl.point=Nl,Sl(pl=t,gl=n)}function Nl(t,n){var e=t-pl,r=n-gl,i=kc(e*e+r*r);bl+=i*(pl+t)/2,ml+=i*(gl+n)/2,xl+=i,Sl(pl=t,gl=n)}function Cl(){Tl.point=Sl}function Pl(){Tl.point=Dl}function zl(){ql(hl,dl)}function Dl(t,n){Tl.point=ql,Sl(hl=pl=t,dl=gl=n)}function ql(t,n){var e=t-pl,r=n-gl,i=kc(e*e+r*r);bl+=i*(pl+t)/2,ml+=i*(gl+n)/2,xl+=i,wl+=(i=gl*t-pl*n)*(pl+t),Ml+=i*(gl+n),Al+=3*i,Sl(pl=t,gl=n)}function Rl(t){this._context=t}Rl.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,pc)}},result:Dc};var Fl,Ol,Ul,Il,Bl,Yl=new g,Ll={point:Dc,lineStart:function(){Ll.point=jl},lineEnd:function(){Fl&&Hl(Ol,Ul),Ll.point=Dc},polygonStart:function(){Fl=!0},polygonEnd:function(){Fl=null},result:function(){var t=+Yl;return Yl=new g,t}};function jl(t,n){Ll.point=Hl,Ol=Il=t,Ul=Bl=n}function Hl(t,n){Il-=t,Bl-=n,Yl.add(kc(Il*Il+Bl*Bl)),Il=t,Bl=n}function Xl(){this._string=[]}function Gl(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Vl(t){return function(n){var e=new $l;for(var r in t)e[r]=t[r];return e.stream=n,e}}function $l(){}function Wl(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Ic(e,t.stream(ll)),n(ll.result()),null!=r&&t.clipExtent(r),t}function Zl(t,n,e){return Wl(t,(function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],o=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),a=+n[0][0]+(r-o*(e[1][0]+e[0][0]))/2,u=+n[0][1]+(i-o*(e[1][1]+e[0][1]))/2;t.scale(150*o).translate([a,u])}),e)}function Kl(t,n,e){return Zl(t,[[0,0],n],e)}function Ql(t,n,e){return Wl(t,(function(e){var r=+n,i=r/(e[1][0]-e[0][0]),o=(r-i*(e[1][0]+e[0][0]))/2,a=-i*e[0][1];t.scale(150*i).translate([o,a])}),e)}function Jl(t,n,e){return Wl(t,(function(e){var r=+n,i=r/(e[1][1]-e[0][1]),o=-i*e[0][0],a=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([o,a])}),e)}Xl.prototype={_radius:4.5,_circle:Gl(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=Gl(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},$l.prototype={constructor:$l,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var th=mc(30*yc);function nh(t,n){return+n?function(t,n){function e(r,i,o,a,u,c,f,s,l,h,d,p,g,y){var v=f-r,_=s-i,b=v*v+_*_;if(b>4*n&&g--){var m=a+h,x=u+d,w=c+p,M=kc(m*m+x*x+w*w),A=Pc(w/=M),T=vc(vc(w)-1)<fc||vc(o-l)<fc?(o+l)/2:bc(x,m),S=t(T,A),E=S[0],k=S[1],N=E-r,C=k-i,P=_*N-v*C;(P*P/b>n||vc((v*N+_*C)/b-.5)>.3||a*h+u*d+c*p<th)&&(e(r,i,o,a,u,c,E,k,T,m/=M,x/=M,w,g,y),y.point(E,k),e(E,k,T,m,x,w,f,s,l,h,d,p,g,y))}}return function(n){var r,i,o,a,u,c,f,s,l,h,d,p,g={point:y,lineStart:v,lineEnd:b,polygonStart:function(){n.polygonStart(),g.lineStart=m},polygonEnd:function(){n.polygonEnd(),g.lineStart=v}};function y(e,r){e=t(e,r),n.point(e[0],e[1])}function v(){s=NaN,g.point=_,n.lineStart()}function _(r,i){var o=lf([r,i]),a=t(r,i);e(s,l,f,h,d,p,s=a[0],l=a[1],f=r,h=o[0],d=o[1],p=o[2],16,n),n.point(s,l)}function b(){g.point=y,n.lineEnd()}function m(){v(),g.point=x,g.lineEnd=w}function x(t,n){_(r=t,n),i=s,o=l,a=h,u=d,c=p,g.point=_}function w(){e(s,l,f,h,d,p,i,o,r,a,u,c,16,n),g.lineEnd=b,b()}return g}}(t,n):function(t){return Vl({point:function(n,e){n=t(n,e),this.stream.point(n[0],n[1])}})}(t)}var eh=Vl({point:function(t,n){this.stream.point(t*yc,n*yc)}});function rh(t,n,e,r,i,o){if(!o)return function(t,n,e,r,i){function o(o,a){return[n+t*(o*=r),e-t*(a*=i)]}return o.invert=function(o,a){return[(o-n)/t*r,(e-a)/t*i]},o}(t,n,e,r,i);var a=mc(o),u=Sc(o),c=a*t,f=u*t,s=a/t,l=u/t,h=(u*e-a*n)/t,d=(u*n+a*e)/t;function p(t,o){return[c*(t*=r)-f*(o*=i)+n,e-f*t-c*o]}return p.invert=function(t,n){return[r*(s*t-l*n+h),i*(d-l*t-s*n)]},p}function ih(t){return oh((function(){return t}))()}function oh(t){var n,e,r,i,o,a,u,c,f,s,l=150,h=480,d=250,p=0,g=0,y=0,v=0,_=0,b=0,m=1,x=1,w=null,M=xs,A=null,T=Js,S=.5;function E(t){return c(t[0]*yc,t[1]*yc)}function k(t){return(t=c.invert(t[0],t[1]))&&[t[0]*gc,t[1]*gc]}function N(){var t=rh(l,0,0,m,x,b).apply(null,n(p,g)),r=rh(l,h-t[0],d-t[1],m,x,b);return e=is(y,v,_),u=es(n,r),c=es(e,u),a=nh(u,S),C()}function C(){return f=s=null,E}return E.stream=function(t){return f&&s===t?f:f=eh(function(t){return Vl({point:function(n,e){var r=t(n,e);return this.stream.point(r[0],r[1])}})}(e)(M(a(T(s=t)))))},E.preclip=function(t){return arguments.length?(M=t,w=void 0,C()):M},E.postclip=function(t){return arguments.length?(T=t,A=r=i=o=null,C()):T},E.clipAngle=function(t){return arguments.length?(M=+t?ws(w=t*yc):(w=null,xs),C()):w*gc},E.clipExtent=function(t){return arguments.length?(T=null==t?(A=r=i=o=null,Js):Ns(A=+t[0][0],r=+t[0][1],i=+t[1][0],o=+t[1][1]),C()):null==A?null:[[A,r],[i,o]]},E.scale=function(t){return arguments.length?(l=+t,N()):l},E.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],N()):[h,d]},E.center=function(t){return arguments.length?(p=t[0]%360*yc,g=t[1]%360*yc,N()):[p*gc,g*gc]},E.rotate=function(t){return arguments.length?(y=t[0]%360*yc,v=t[1]%360*yc,_=t.length>2?t[2]%360*yc:0,N()):[y*gc,v*gc,_*gc]},E.angle=function(t){return arguments.length?(b=t%360*yc,N()):b*gc},E.reflectX=function(t){return arguments.length?(m=t?-1:1,N()):m<0},E.reflectY=function(t){return arguments.length?(x=t?-1:1,N()):x<0},E.precision=function(t){return arguments.length?(a=nh(u,S=t*t),C()):kc(S)},E.fitExtent=function(t,n){return Zl(E,t,n)},E.fitSize=function(t,n){return Kl(E,t,n)},E.fitWidth=function(t,n){return Ql(E,t,n)},E.fitHeight=function(t,n){return Jl(E,t,n)},function(){return n=t.apply(this,arguments),E.invert=n.invert&&k,N()}}function ah(t){var n=0,e=lc/3,r=oh(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*yc,e=t[1]*yc):[n*gc,e*gc]},i}function uh(t,n){var e=Sc(t),r=(e+Sc(n))/2;if(vc(r)<fc)return function(t){var n=mc(t);function e(t,e){return[t*n,Sc(e)/n]}return e.invert=function(t,e){return[t/n,Pc(e*n)]},e}(t);var i=1+e*(2*r-e),o=kc(i)/r;function a(t,n){var e=kc(i-2*r*Sc(n))/r;return[e*Sc(t*=r),o-e*mc(t)]}return a.invert=function(t,n){var e=o-n,a=bc(t,vc(e))*Ec(e);return e*r<0&&(a-=lc*Ec(t)*Ec(e)),[a/r,Pc((i-(t*t+e*e)*r*r)/(2*r))]},a}function ch(){return ah(uh).scale(155.424).center([0,33.6442])}function fh(){return ch().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function sh(t){return function(n,e){var r=mc(n),i=mc(e),o=t(r*i);return o===1/0?[2,0]:[o*i*Sc(n),o*Sc(e)]}}function lh(t){return function(n,e){var r=kc(n*n+e*e),i=t(r),o=Sc(i),a=mc(i);return[bc(n*o,r*a),Pc(r&&e*o/r)]}}var hh=sh((function(t){return kc(2/(1+t))}));hh.invert=lh((function(t){return 2*Pc(t/2)}));var dh=sh((function(t){return(t=Cc(t))&&t/Sc(t)}));function ph(t,n){return[t,Ac(Nc((hc+n)/2))]}function gh(t){var n,e,r,i=ih(t),o=i.center,a=i.scale,u=i.translate,c=i.clipExtent,f=null;function s(){var o=lc*a(),u=i(cs(i.rotate()).invert([0,0]));return c(null==f?[[u[0]-o,u[1]-o],[u[0]+o,u[1]+o]]:t===ph?[[Math.max(u[0]-o,f),n],[Math.min(u[0]+o,e),r]]:[[f,Math.max(u[1]-o,n)],[e,Math.min(u[1]+o,r)]])}return i.scale=function(t){return arguments.length?(a(t),s()):a()},i.translate=function(t){return arguments.length?(u(t),s()):u()},i.center=function(t){return arguments.length?(o(t),s()):o()},i.clipExtent=function(t){return arguments.length?(null==t?f=n=e=r=null:(f=+t[0][0],n=+t[0][1],e=+t[1][0],r=+t[1][1]),s()):null==f?null:[[f,n],[e,r]]},s()}function yh(t){return Nc((hc+t)/2)}function vh(t,n){var e=mc(t),r=t===n?Sc(t):Ac(e/mc(n))/Ac(yh(n)/yh(t)),i=e*Tc(yh(t),r)/r;if(!r)return ph;function o(t,n){i>0?n<-hc+fc&&(n=-hc+fc):n>hc-fc&&(n=hc-fc);var e=i/Tc(yh(n),r);return[e*Sc(r*t),i-e*mc(r*t)]}return o.invert=function(t,n){var e=i-n,o=Ec(r)*kc(t*t+e*e),a=bc(t,vc(e))*Ec(e);return e*r<0&&(a-=lc*Ec(t)*Ec(e)),[a/r,2*_c(Tc(i/o,1/r))-hc]},o}function _h(t,n){return[t,n]}function bh(t,n){var e=mc(t),r=t===n?Sc(t):(e-mc(n))/(n-t),i=e/r+t;if(vc(r)<fc)return _h;function o(t,n){var e=i-n,o=r*t;return[e*Sc(o),i-e*mc(o)]}return o.invert=function(t,n){var e=i-n,o=bc(t,vc(e))*Ec(e);return e*r<0&&(o-=lc*Ec(t)*Ec(e)),[o/r,i-Ec(r)*kc(t*t+e*e)]},o}dh.invert=lh((function(t){return t})),ph.invert=function(t,n){return[t,2*_c(wc(n))-hc]},_h.invert=_h;var mh=1.340264,xh=-.081106,wh=893e-6,Mh=.003796,Ah=kc(3)/2;function Th(t,n){var e=Pc(Ah*Sc(n)),r=e*e,i=r*r*r;return[t*mc(e)/(Ah*(mh+3*xh*r+i*(7*wh+9*Mh*r))),e*(mh+xh*r+i*(wh+Mh*r))]}function Sh(t,n){var e=mc(n),r=mc(t)*e;return[e*Sc(t)/r,Sc(n)/r]}function Eh(t,n){var e=n*n,r=e*e;return[t*(.8707-.131979*e+r*(r*(.003971*e-.001529*r)-.013791)),n*(1.007226+e*(.015085+r*(.028874*e-.044475-.005916*r)))]}function kh(t,n){return[mc(n)*Sc(t),Sc(n)]}function Nh(t,n){var e=mc(n),r=1+mc(t)*e;return[e*Sc(t)/r,Sc(n)/r]}function Ch(t,n){return[Ac(Nc((hc+n)/2)),-t]}function Ph(t,n){return t.parent===n.parent?1:2}function zh(t,n){return t+n.x}function Dh(t,n){return Math.max(t,n.y)}function qh(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function Rh(t,n){t instanceof Map?(t=[void 0,t],void 0===n&&(n=Oh)):void 0===n&&(n=Fh);for(var e,r,i,o,a,u=new Bh(t),c=[u];e=c.pop();)if((i=n(e.data))&&(a=(i=Array.from(i)).length))for(e.children=i,o=a-1;o>=0;--o)c.push(r=i[o]=new Bh(i[o])),r.parent=e,r.depth=e.depth+1;return u.eachBefore(Ih)}function Fh(t){return t.children}function Oh(t){return Array.isArray(t)?t[1]:null}function Uh(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function Ih(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function Bh(t){this.data=t,this.depth=this.height=0,this.parent=null}function Yh(t){for(var n,e,r=0,i=(t=function(t){for(var n,e,r=t.length;r;)e=Math.random()*r--|0,n=t[r],t[r]=t[e],t[e]=n;return t}(Array.from(t))).length,o=[];r<i;)n=t[r],e&&Hh(e,n)?++r:(e=Gh(o=Lh(o,n)),r=0);return e}function Lh(t,n){var e,r;if(Xh(n,t))return[n];for(e=0;e<t.length;++e)if(jh(n,t[e])&&Xh(Vh(t[e],n),t))return[t[e],n];for(e=0;e<t.length-1;++e)for(r=e+1;r<t.length;++r)if(jh(Vh(t[e],t[r]),n)&&jh(Vh(t[e],n),t[r])&&jh(Vh(t[r],n),t[e])&&Xh($h(t[e],t[r],n),t))return[t[e],t[r],n];throw new Error}function jh(t,n){var e=t.r-n.r,r=n.x-t.x,i=n.y-t.y;return e<0||e*e<r*r+i*i}function Hh(t,n){var e=t.r-n.r+1e-9*Math.max(t.r,n.r,1),r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function Xh(t,n){for(var e=0;e<n.length;++e)if(!Hh(t,n[e]))return!1;return!0}function Gh(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return Vh(t[0],t[1]);case 3:return $h(t[0],t[1],t[2])}}function Vh(t,n){var e=t.x,r=t.y,i=t.r,o=n.x,a=n.y,u=n.r,c=o-e,f=a-r,s=u-i,l=Math.sqrt(c*c+f*f);return{x:(e+o+c/l*s)/2,y:(r+a+f/l*s)/2,r:(l+i+u)/2}}function $h(t,n,e){var r=t.x,i=t.y,o=t.r,a=n.x,u=n.y,c=n.r,f=e.x,s=e.y,l=e.r,h=r-a,d=r-f,p=i-u,g=i-s,y=c-o,v=l-o,_=r*r+i*i-o*o,b=_-a*a-u*u+c*c,m=_-f*f-s*s+l*l,x=d*p-h*g,w=(p*m-g*b)/(2*x)-r,M=(g*y-p*v)/x,A=(d*b-h*m)/(2*x)-i,T=(h*v-d*y)/x,S=M*M+T*T-1,E=2*(o+w*M+A*T),k=w*w+A*A-o*o,N=-(S?(E+Math.sqrt(E*E-4*S*k))/(2*S):k/E);return{x:r+w+M*N,y:i+A+T*N,r:N}}function Wh(t,n,e){var r,i,o,a,u=t.x-n.x,c=t.y-n.y,f=u*u+c*c;f?(i=n.r+e.r,i*=i,a=t.r+e.r,i>(a*=a)?(r=(f+a-i)/(2*f),o=Math.sqrt(Math.max(0,a/f-r*r)),e.x=t.x-r*u-o*c,e.y=t.y-r*c+o*u):(r=(f+i-a)/(2*f),o=Math.sqrt(Math.max(0,i/f-r*r)),e.x=n.x+r*u-o*c,e.y=n.y+r*c+o*u)):(e.x=n.x+e.r,e.y=n.y)}function Zh(t,n){var e=t.r+n.r-1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function Kh(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,o=(n.y*e.r+e.y*n.r)/r;return i*i+o*o}function Qh(t){this._=t,this.next=null,this.previous=null}function Jh(t){if(!(i=(t=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(t)).length))return 0;var n,e,r,i,o,a,u,c,f,s,l;if((n=t[0]).x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;Wh(e,n,r=t[2]),n=new Qh(n),e=new Qh(e),r=new Qh(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(u=3;u<i;++u){Wh(n._,e._,r=t[u]),r=new Qh(r),c=e.next,f=n.previous,s=e._.r,l=n._.r;do{if(s<=l){if(Zh(c._,r._)){e=c,n.next=e,e.previous=n,--u;continue t}s+=c._.r,c=c.next}else{if(Zh(f._,r._)){(n=f).next=e,e.previous=n,--u;continue t}l+=f._.r,f=f.previous}}while(c!==f.next);for(r.previous=n,r.next=e,n.next=e.previous=e=r,o=Kh(n);(r=r.next)!==e;)(a=Kh(r))<o&&(n=r,o=a);e=n.next}for(n=[e._],r=e;(r=r.next)!==e;)n.push(r._);for(r=Yh(n),u=0;u<i;++u)(n=t[u]).x-=r.x,n.y-=r.y;return r.r}function td(t){return null==t?null:nd(t)}function nd(t){if("function"!=typeof t)throw new Error;return t}function ed(){return 0}function rd(t){return function(){return t}}function id(t){return Math.sqrt(t.value)}function od(t){return function(n){n.children||(n.r=Math.max(0,+t(n)||0))}}function ad(t,n){return function(e){if(r=e.children){var r,i,o,a=r.length,u=t(e)*n||0;if(u)for(i=0;i<a;++i)r[i].r+=u;if(o=Jh(r),u)for(i=0;i<a;++i)r[i].r-=u;e.r=o+u}}}function ud(t){return function(n){var e=n.parent;n.r*=t,e&&(n.x=e.x+t*n.x,n.y=e.y+t*n.y)}}function cd(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function fd(t,n,e,r,i){for(var o,a=t.children,u=-1,c=a.length,f=t.value&&(r-n)/t.value;++u<c;)(o=a[u]).y0=e,o.y1=i,o.x0=n,o.x1=n+=o.value*f}Th.invert=function(t,n){for(var e,r=n,i=r*r,o=i*i*i,a=0;a<12&&(o=(i=(r-=e=(r*(mh+xh*i+o*(wh+Mh*i))-n)/(mh+3*xh*i+o*(7*wh+9*Mh*i)))*r)*i*i,!(vc(e)<sc));++a);return[Ah*t*(mh+3*xh*i+o*(7*wh+9*Mh*i))/mc(r),Pc(Sc(r)/Ah)]},Sh.invert=lh(_c),Eh.invert=function(t,n){var e,r=n,i=25;do{var o=r*r,a=o*o;r-=e=(r*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-n)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(vc(e)>fc&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},kh.invert=lh(Pc),Nh.invert=lh((function(t){return 2*_c(t)})),Ch.invert=function(t,n){return[-n,2*_c(wc(t))-hc]},Bh.prototype=Rh.prototype={constructor:Bh,count:function(){return this.eachAfter(qh)},each:function(t,n){let e=-1;for(const r of this)t.call(n,r,++e,this);return this},eachAfter:function(t,n){for(var e,r,i,o=this,a=[o],u=[],c=-1;o=a.pop();)if(u.push(o),e=o.children)for(r=0,i=e.length;r<i;++r)a.push(e[r]);for(;o=u.pop();)t.call(n,o,++c,this);return this},eachBefore:function(t,n){for(var e,r,i=this,o=[i],a=-1;i=o.pop();)if(t.call(n,i,++a,this),e=i.children)for(r=e.length-1;r>=0;--r)o.push(e[r]);return this},find:function(t,n){let e=-1;for(const r of this)if(t.call(n,r,++e,this))return r},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;t=e.pop(),n=r.pop();for(;t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return Rh(this).eachBefore(Uh)},[Symbol.iterator]:function*(){var t,n,e,r,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(yield i,n=i.children)for(e=0,r=n.length;e<r;++e)o.push(n[e])}while(o.length)}};var sd={depth:-1},ld={};function hd(t){return t.id}function dd(t){return t.parentId}function pd(t,n){return t.parent===n.parent?1:2}function gd(t){var n=t.children;return n?n[0]:t.t}function yd(t){var n=t.children;return n?n[n.length-1]:t.t}function vd(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function _d(t,n,e){return t.a.parent===n.parent?t.a:e}function bd(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}function md(t,n,e,r,i){for(var o,a=t.children,u=-1,c=a.length,f=t.value&&(i-e)/t.value;++u<c;)(o=a[u]).x0=n,o.x1=r,o.y0=e,o.y1=e+=o.value*f}bd.prototype=Object.create(Bh.prototype);var xd=(1+Math.sqrt(5))/2;function wd(t,n,e,r,i,o){for(var a,u,c,f,s,l,h,d,p,g,y,v=[],_=n.children,b=0,m=0,x=_.length,w=n.value;b<x;){c=i-e,f=o-r;do{s=_[m++].value}while(!s&&m<x);for(l=h=s,y=s*s*(g=Math.max(f/c,c/f)/(w*t)),p=Math.max(h/y,y/l);m<x;++m){if(s+=u=_[m].value,u<l&&(l=u),u>h&&(h=u),y=s*s*g,(d=Math.max(h/y,y/l))>p){s-=u;break}p=d}v.push(a={value:s,dice:c<f,children:_.slice(b,m)}),a.dice?fd(a,e,r,i,w?r+=f*s/w:o):md(a,e,r,w?e+=c*s/w:i,o),w-=s,b=m}return v}var Md=function t(n){function e(t,e,r,i,o){wd(n,t,e,r,i,o)}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(xd);var Ad=function t(n){function e(t,e,r,i,o){if((a=t._squarify)&&a.ratio===n)for(var a,u,c,f,s,l=-1,h=a.length,d=t.value;++l<h;){for(c=(u=a[l]).children,f=u.value=0,s=c.length;f<s;++f)u.value+=c[f].value;u.dice?fd(u,e,r,i,d?r+=(o-r)*u.value/d:o):md(u,e,r,d?e+=(i-e)*u.value/d:i,o),d-=u.value}else t._squarify=a=wd(n,t,e,r,i,o),a.ratio=n}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(xd);function Td(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function Sd(t,n){return t[0]-n[0]||t[1]-n[1]}function Ed(t){const n=t.length,e=[0,1];let r,i=2;for(r=2;r<n;++r){for(;i>1&&Td(t[e[i-2]],t[e[i-1]],t[r])<=0;)--i;e[i++]=r}return e.slice(0,i)}var kd=Math.random,Nd=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,1===arguments.length?(e=t,t=0):e-=t,function(){return n()*e+t}}return e.source=t,e}(kd),Cd=function t(n){function e(t,e){return arguments.length<2&&(e=t,t=0),t=Math.floor(t),e=Math.floor(e)-t,function(){return Math.floor(n()*e+t)}}return e.source=t,e}(kd),Pd=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var o;if(null!=r)o=r,r=null;else do{r=2*n()-1,o=2*n()-1,i=r*r+o*o}while(!i||i>1);return t+e*o*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(kd),zd=function t(n){var e=Pd.source(n);function r(){var t=e.apply(this,arguments);return function(){return Math.exp(t())}}return r.source=t,r}(kd),Dd=function t(n){function e(t){return(t=+t)<=0?()=>0:function(){for(var e=0,r=t;r>1;--r)e+=n();return e+r*n()}}return e.source=t,e}(kd),qd=function t(n){var e=Dd.source(n);function r(t){if(0==(t=+t))return n;var r=e(t);return function(){return r()/t}}return r.source=t,r}(kd),Rd=function t(n){function e(t){return function(){return-Math.log1p(-n())/t}}return e.source=t,e}(kd),Fd=function t(n){function e(t){if((t=+t)<0)throw new RangeError("invalid alpha");return t=1/-t,function(){return Math.pow(1-n(),t)}}return e.source=t,e}(kd),Od=function t(n){function e(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return function(){return Math.floor(n()+t)}}return e.source=t,e}(kd),Ud=function t(n){function e(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return 0===t?()=>1/0:1===t?()=>1:(t=Math.log1p(-t),function(){return 1+Math.floor(Math.log1p(-n())/t)})}return e.source=t,e}(kd),Id=function t(n){var e=Pd.source(n)();function r(t,r){if((t=+t)<0)throw new RangeError("invalid k");if(0===t)return()=>0;if(r=null==r?1:+r,1===t)return()=>-Math.log1p(-n())*r;var i=(t<1?t+1:t)-1/3,o=1/(3*Math.sqrt(i)),a=t<1?()=>Math.pow(n(),1/t):()=>1;return function(){do{do{var t=e(),u=1+o*t}while(u<=0);u*=u*u;var c=1-n()}while(c>=1-.0331*t*t*t*t&&Math.log(c)>=.5*t*t+i*(1-u+Math.log(u)));return i*u*a()*r}}return r.source=t,r}(kd),Bd=function t(n){var e=Id.source(n);function r(t,n){var r=e(t),i=e(n);return function(){var t=r();return 0===t?0:t/(t+i())}}return r.source=t,r}(kd),Yd=function t(n){var e=Ud.source(n),r=Bd.source(n);function i(t,n){return t=+t,(n=+n)>=1?()=>t:n<=0?()=>0:function(){for(var i=0,o=t,a=n;o*a>16&&o*(1-a)>16;){var u=Math.floor((o+1)*a),c=r(u,o-u+1)();c<=a?(i+=u,o-=u,a=(a-c)/(1-c)):(o=u-1,a/=c)}for(var f=a<.5,s=e(f?a:1-a),l=s(),h=0;l<=o;++h)l+=s();return i+(f?h:o-h)}}return i.source=t,i}(kd),Ld=function t(n){function e(t,e,r){var i;return 0==(t=+t)?i=t=>-Math.log(t):(t=1/t,i=n=>Math.pow(n,t)),e=null==e?0:+e,r=null==r?1:+r,function(){return e+r*i(-Math.log1p(-n()))}}return e.source=t,e}(kd),jd=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,function(){return t+e*Math.tan(Math.PI*n())}}return e.source=t,e}(kd),Hd=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,function(){var r=n();return t+e*Math.log(r/(1-r))}}return e.source=t,e}(kd),Xd=function t(n){var e=Id.source(n),r=Yd.source(n);function i(t){return function(){for(var i=0,o=t;o>16;){var a=Math.floor(.875*o),u=e(a)();if(u>o)return i+r(a-1,o/u)();i+=a,o-=u}for(var c=-Math.log1p(-n()),f=0;c<=o;++f)c-=Math.log1p(-n());return i+f}}return i.source=t,i}(kd);const Gd=1/4294967296;function Vd(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function $d(t,n){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof n?this.interpolator(n):this.range(n)}return this}const Wd=Symbol("implicit");function Zd(){var t=new Map,n=[],e=[],r=Wd;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==Wd)return r;t.set(o,a=n.push(i))}return e[(a-1)%e.length]}return i.domain=function(e){if(!arguments.length)return n.slice();n=[],t=new Map;for(const r of e){const e=r+"";t.has(e)||t.set(e,n.push(r))}return i},i.range=function(t){return arguments.length?(e=Array.from(t),i):e.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Zd(n,e).unknown(r)},Vd.apply(i,arguments),i}function Kd(){var t,n,e=Zd().unknown(void 0),r=e.domain,i=e.range,o=0,a=1,u=!1,c=0,f=0,s=.5;function l(){var e=r().length,l=a<o,h=l?a:o,d=l?o:a;t=(d-h)/Math.max(1,e-c+2*f),u&&(t=Math.floor(t)),h+=(d-h-t*(e-c))*s,n=t*(1-c),u&&(h=Math.round(h),n=Math.round(n));var p=B(e).map((function(n){return h+t*n}));return i(l?p.reverse():p)}return delete e.unknown,e.domain=function(t){return arguments.length?(r(t),l()):r()},e.range=function(t){return arguments.length?([o,a]=t,o=+o,a=+a,l()):[o,a]},e.rangeRound=function(t){return[o,a]=t,o=+o,a=+a,u=!0,l()},e.bandwidth=function(){return n},e.step=function(){return t},e.round=function(t){return arguments.length?(u=!!t,l()):u},e.padding=function(t){return arguments.length?(c=Math.min(1,f=+t),l()):c},e.paddingInner=function(t){return arguments.length?(c=Math.min(1,t),l()):c},e.paddingOuter=function(t){return arguments.length?(f=+t,l()):f},e.align=function(t){return arguments.length?(s=Math.max(0,Math.min(1,t)),l()):s},e.copy=function(){return Kd(r(),[o,a]).round(u).paddingInner(c).paddingOuter(f).align(s)},Vd.apply(l(),arguments)}function Qd(t){var n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Qd(n())},t}function Jd(t){return+t}var tp=[0,1];function np(t){return t}function ep(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:function(t){return function(){return t}}(isNaN(n)?NaN:.5)}function rp(t,n,e){var r=t[0],i=t[1],o=n[0],a=n[1];return i<r?(r=ep(i,r),o=e(a,o)):(r=ep(r,i),o=e(o,a)),function(t){return o(r(t))}}function ip(t,n,e){var r=Math.min(t.length,n.length)-1,i=new Array(r),a=new Array(r),u=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++u<r;)i[u]=ep(t[u],t[u+1]),a[u]=e(n[u],n[u+1]);return function(n){var e=o(t,n,1,r)-1;return a[e](i[e](n))}}function op(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function ap(){var t,n,e,r,i,o,a=tp,u=tp,c=dr,f=np;function s(){var t=Math.min(a.length,u.length);return f!==np&&(f=function(t,n){var e;return t>n&&(e=t,t=n,n=e),function(e){return Math.max(t,Math.min(n,e))}}(a[0],a[t-1])),r=t>2?ip:rp,i=o=null,l}function l(n){return isNaN(n=+n)?e:(i||(i=r(a.map(t),u,c)))(t(f(n)))}return l.invert=function(e){return f(n((o||(o=r(u,a.map(t),cr)))(e)))},l.domain=function(t){return arguments.length?(a=Array.from(t,Jd),s()):a.slice()},l.range=function(t){return arguments.length?(u=Array.from(t),s()):u.slice()},l.rangeRound=function(t){return u=Array.from(t),c=pr,s()},l.clamp=function(t){return arguments.length?(f=!!t||np,s()):f!==np},l.interpolate=function(t){return arguments.length?(c=t,s()):c},l.unknown=function(t){return arguments.length?(e=t,l):e},function(e,r){return t=e,n=r,s()}}function up(){return ap()(np,np)}function cp(n,e,r,i){var o,a=S(n,e,r);switch((i=Zu(null==i?",f":i)).type){case"s":var u=Math.max(Math.abs(n),Math.abs(e));return null!=i.precision||isNaN(o=uc(a,u))||(i.precision=o),t.formatPrefix(i,u);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=cc(a,Math.max(Math.abs(n),Math.abs(e))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=ac(a))||(i.precision=o-2*("%"===i.type))}return t.format(i)}function fp(t){var n=t.domain;return t.ticks=function(t){var e=n();return A(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return cp(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i,o=n(),a=0,u=o.length-1,c=o[a],f=o[u],s=10;for(f<c&&(i=c,c=f,f=i,i=a,a=u,u=i);s-- >0;){if((i=T(c,f,e))===r)return o[a]=c,o[u]=f,n(o);if(i>0)c=Math.floor(c/i)*i,f=Math.ceil(f/i)*i;else{if(!(i<0))break;c=Math.ceil(c*i)/i,f=Math.floor(f*i)/i}r=i}return t},t}function sp(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],a=t[i];return a<o&&(e=r,r=i,i=e,e=o,o=a,a=e),t[r]=n.floor(o),t[i]=n.ceil(a),t}function lp(t){return Math.log(t)}function hp(t){return Math.exp(t)}function dp(t){return-Math.log(-t)}function pp(t){return-Math.exp(-t)}function gp(t){return isFinite(t)?+("1e"+t):t<0?0:t}function yp(t){return function(n){return-t(-n)}}function vp(n){var e,r,i=n(lp,hp),o=i.domain,a=10;function u(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(n){return Math.log(n)/t})}(a),r=function(t){return 10===t?gp:t===Math.E?Math.exp:function(n){return Math.pow(t,n)}}(a),o()[0]<0?(e=yp(e),r=yp(r),n(dp,pp)):n(lp,hp),i}return i.base=function(t){return arguments.length?(a=+t,u()):a},i.domain=function(t){return arguments.length?(o(t),u()):o()},i.ticks=function(t){var n,i=o(),u=i[0],c=i[i.length-1];(n=c<u)&&(h=u,u=c,c=h);var f,s,l,h=e(u),d=e(c),p=null==t?10:+t,g=[];if(!(a%1)&&d-h<p){if(h=Math.floor(h),d=Math.ceil(d),u>0){for(;h<=d;++h)for(s=1,f=r(h);s<a;++s)if(!((l=f*s)<u)){if(l>c)break;g.push(l)}}else for(;h<=d;++h)for(s=a-1,f=r(h);s>=1;--s)if(!((l=f*s)<u)){if(l>c)break;g.push(l)}2*g.length<p&&(g=A(u,c,p))}else g=A(h,d,Math.min(d-h,p)).map(r);return n?g.reverse():g},i.tickFormat=function(n,o){if(null==o&&(o=10===a?".0e":","),"function"!=typeof o&&(o=t.format(o)),n===1/0)return o;null==n&&(n=10);var u=Math.max(1,a*n/i.ticks().length);return function(t){var n=t/r(Math.round(e(t)));return n*a<a-.5&&(n*=a),n<=u?o(t):""}},i.nice=function(){return o(sp(o(),{floor:function(t){return r(Math.floor(e(t)))},ceil:function(t){return r(Math.ceil(e(t)))}}))},i}function _p(t){return function(n){return Math.sign(n)*Math.log1p(Math.abs(n/t))}}function bp(t){return function(n){return Math.sign(n)*Math.expm1(Math.abs(n))*t}}function mp(t){var n=1,e=t(_p(n),bp(n));return e.constant=function(e){return arguments.length?t(_p(n=+e),bp(n)):n},fp(e)}function xp(t){return function(n){return n<0?-Math.pow(-n,t):Math.pow(n,t)}}function wp(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Mp(t){return t<0?-t*t:t*t}function Ap(t){var n=t(np,np),e=1;function r(){return 1===e?t(np,np):.5===e?t(wp,Mp):t(xp(e),xp(1/e))}return n.exponent=function(t){return arguments.length?(e=+t,r()):e},fp(n)}function Tp(){var t=Ap(ap());return t.copy=function(){return op(t,Tp()).exponent(t.exponent())},Vd.apply(t,arguments),t}function Sp(t){return Math.sign(t)*t*t}function Ep(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}var kp=new Date,Np=new Date;function Cp(t,n,e,r){function i(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return i.floor=function(n){return t(n=new Date(+n)),n},i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n<e-t?n:e},i.offset=function(t,e){return n(t=new Date(+t),null==e?1:Math.floor(e)),t},i.range=function(e,r,o){var a,u=[];if(e=i.ceil(e),o=null==o?1:Math.floor(o),!(e<r&&o>0))return u;do{u.push(a=new Date(+e)),n(e,o),t(e)}while(a<e&&e<r);return u},i.filter=function(e){return Cp((function(n){if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););}))},e&&(i.count=function(n,r){return kp.setTime(+n),Np.setTime(+r),t(kp),t(Np),Math.floor(e(kp,Np))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var Pp=Cp((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));Pp.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Cp((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):Pp:null};var zp=Pp.range,Dp=1e3,qp=6e4,Rp=36e5,Fp=864e5,Op=6048e5,Up=Cp((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,n){t.setTime(+t+n*Dp)}),(function(t,n){return(n-t)/Dp}),(function(t){return t.getUTCSeconds()})),Ip=Up.range,Bp=Cp((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Dp)}),(function(t,n){t.setTime(+t+n*qp)}),(function(t,n){return(n-t)/qp}),(function(t){return t.getMinutes()})),Yp=Bp.range,Lp=Cp((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*Dp-t.getMinutes()*qp)}),(function(t,n){t.setTime(+t+n*Rp)}),(function(t,n){return(n-t)/Rp}),(function(t){return t.getHours()})),jp=Lp.range,Hp=Cp(t=>t.setHours(0,0,0,0),(t,n)=>t.setDate(t.getDate()+n),(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*qp)/Fp,t=>t.getDate()-1),Xp=Hp.range;function Gp(t){return Cp((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*qp)/Op}))}var Vp=Gp(0),$p=Gp(1),Wp=Gp(2),Zp=Gp(3),Kp=Gp(4),Qp=Gp(5),Jp=Gp(6),tg=Vp.range,ng=$p.range,eg=Wp.range,rg=Zp.range,ig=Kp.range,og=Qp.range,ag=Jp.range,ug=Cp((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),cg=ug.range,fg=Cp((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));fg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Cp((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null};var sg=fg.range,lg=Cp((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+n*qp)}),(function(t,n){return(n-t)/qp}),(function(t){return t.getUTCMinutes()})),hg=lg.range,dg=Cp((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+n*Rp)}),(function(t,n){return(n-t)/Rp}),(function(t){return t.getUTCHours()})),pg=dg.range,gg=Cp((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/Fp}),(function(t){return t.getUTCDate()-1})),yg=gg.range;function vg(t){return Cp((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/Op}))}var _g=vg(0),bg=vg(1),mg=vg(2),xg=vg(3),wg=vg(4),Mg=vg(5),Ag=vg(6),Tg=_g.range,Sg=bg.range,Eg=mg.range,kg=xg.range,Ng=wg.range,Cg=Mg.range,Pg=Ag.range,zg=Cp((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCMonth(t.getUTCMonth()+n)}),(function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),Dg=zg.range,qg=Cp((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));qg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Cp((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null};var Rg=qg.range;function Fg(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Og(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ug(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}function Ig(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,o=t.days,a=t.shortDays,u=t.months,c=t.shortMonths,f=Vg(i),s=$g(i),l=Vg(o),h=$g(o),d=Vg(a),p=$g(a),g=Vg(u),y=$g(u),v=Vg(c),_=$g(c),b={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return u[t.getMonth()]},c:null,d:gy,e:gy,f:my,g:Py,G:Dy,H:yy,I:vy,j:_y,L:by,m:xy,M:wy,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ev,s:rv,S:My,u:Ay,U:Ty,V:Ey,w:ky,W:Ny,x:null,X:null,y:Cy,Y:zy,Z:qy,"%":nv},m={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return u[t.getUTCMonth()]},c:null,d:Ry,e:Ry,f:By,g:Ky,G:Jy,H:Fy,I:Oy,j:Uy,L:Iy,m:Yy,M:Ly,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ev,s:rv,S:jy,u:Hy,U:Xy,V:Vy,w:$y,W:Wy,x:null,X:null,y:Zy,Y:Qy,Z:tv,"%":nv},x={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p.get(r[0].toLowerCase()),e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h.get(r[0].toLowerCase()),e+r[0].length):-1},b:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=_.get(r[0].toLowerCase()),e+r[0].length):-1},B:function(t,n,e){var r=g.exec(n.slice(e));return r?(t.m=y.get(r[0].toLowerCase()),e+r[0].length):-1},c:function(t,e,r){return A(t,n,e,r)},d:oy,e:oy,f:ly,g:ny,G:ty,H:uy,I:uy,j:ay,L:sy,m:iy,M:cy,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s.get(r[0].toLowerCase()),e+r[0].length):-1},q:ry,Q:dy,s:py,S:fy,u:Zg,U:Kg,V:Qg,w:Wg,W:Jg,x:function(t,n,r){return A(t,e,n,r)},X:function(t,n,e){return A(t,r,n,e)},y:ny,Y:ty,Z:ey,"%":hy};function w(t,n){return function(e){var r,i,o,a=[],u=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++u<f;)37===t.charCodeAt(u)&&(a.push(t.slice(c,u)),null!=(i=Yg[r=t.charAt(++u)])?r=t.charAt(++u):i="e"===r?" ":"0",(o=n[r])&&(r=o(e,i)),a.push(r),c=u+1);return a.push(t.slice(c,u)),a.join("")}}function M(t,n){return function(e){var r,i,o=Ug(1900,void 0,1);if(A(o,t,e+="",0)!=e.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(n&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Og(Ug(o.y,0,1))).getUTCDay(),r=i>4||0===i?bg.ceil(r):bg(r),r=gg.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Fg(Ug(o.y,0,1))).getDay(),r=i>4||0===i?$p.ceil(r):$p(r),r=Hp.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Og(Ug(o.y,0,1)).getUTCDay():Fg(Ug(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Og(o)):Fg(o)}}function A(t,n,e,r){for(var i,o,a=0,u=n.length,c=e.length;a<u;){if(r>=c)return-1;if(37===(i=n.charCodeAt(a++))){if(i=n.charAt(a++),!(o=x[i in Yg?n.charAt(a++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return b.x=w(e,b),b.X=w(r,b),b.c=w(n,b),m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),{format:function(t){var n=w(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+="",m);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+="",!0);return n.toString=function(){return t},n}}}var Bg,Yg={"-":"",_:" ",0:"0"},Lg=/^\s*\d+/,jg=/^%/,Hg=/[\\^$*+?|[\]().{}]/g;function Xg(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<e?new Array(e-o+1).join(n)+i:i)}function Gg(t){return t.replace(Hg,"\\$&")}function Vg(t){return new RegExp("^(?:"+t.map(Gg).join("|")+")","i")}function $g(t){return new Map(t.map((t,n)=>[t.toLowerCase(),n]))}function Wg(t,n,e){var r=Lg.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function Zg(t,n,e){var r=Lg.exec(n.slice(e,e+1));return r?(t.u=+r[0],e+r[0].length):-1}function Kg(t,n,e){var r=Lg.exec(n.slice(e,e+2));return r?(t.U=+r[0],e+r[0].length):-1}function Qg(t,n,e){var r=Lg.exec(n.slice(e,e+2));return r?(t.V=+r[0],e+r[0].length):-1}function Jg(t,n,e){var r=Lg.exec(n.slice(e,e+2));return r?(t.W=+r[0],e+r[0].length):-1}function ty(t,n,e){var r=Lg.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function ny(t,n,e){var r=Lg.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function ey(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function ry(t,n,e){var r=Lg.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function iy(t,n,e){var r=Lg.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function oy(t,n,e){var r=Lg.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function ay(t,n,e){var r=Lg.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function uy(t,n,e){var r=Lg.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function cy(t,n,e){var r=Lg.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function fy(t,n,e){var r=Lg.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function sy(t,n,e){var r=Lg.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function ly(t,n,e){var r=Lg.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function hy(t,n,e){var r=jg.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function dy(t,n,e){var r=Lg.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function py(t,n,e){var r=Lg.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function gy(t,n){return Xg(t.getDate(),n,2)}function yy(t,n){return Xg(t.getHours(),n,2)}function vy(t,n){return Xg(t.getHours()%12||12,n,2)}function _y(t,n){return Xg(1+Hp.count(fg(t),t),n,3)}function by(t,n){return Xg(t.getMilliseconds(),n,3)}function my(t,n){return by(t,n)+"000"}function xy(t,n){return Xg(t.getMonth()+1,n,2)}function wy(t,n){return Xg(t.getMinutes(),n,2)}function My(t,n){return Xg(t.getSeconds(),n,2)}function Ay(t){var n=t.getDay();return 0===n?7:n}function Ty(t,n){return Xg(Vp.count(fg(t)-1,t),n,2)}function Sy(t){var n=t.getDay();return n>=4||0===n?Kp(t):Kp.ceil(t)}function Ey(t,n){return t=Sy(t),Xg(Kp.count(fg(t),t)+(4===fg(t).getDay()),n,2)}function ky(t){return t.getDay()}function Ny(t,n){return Xg($p.count(fg(t)-1,t),n,2)}function Cy(t,n){return Xg(t.getFullYear()%100,n,2)}function Py(t,n){return Xg((t=Sy(t)).getFullYear()%100,n,2)}function zy(t,n){return Xg(t.getFullYear()%1e4,n,4)}function Dy(t,n){var e=t.getDay();return Xg((t=e>=4||0===e?Kp(t):Kp.ceil(t)).getFullYear()%1e4,n,4)}function qy(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Xg(n/60|0,"0",2)+Xg(n%60,"0",2)}function Ry(t,n){return Xg(t.getUTCDate(),n,2)}function Fy(t,n){return Xg(t.getUTCHours(),n,2)}function Oy(t,n){return Xg(t.getUTCHours()%12||12,n,2)}function Uy(t,n){return Xg(1+gg.count(qg(t),t),n,3)}function Iy(t,n){return Xg(t.getUTCMilliseconds(),n,3)}function By(t,n){return Iy(t,n)+"000"}function Yy(t,n){return Xg(t.getUTCMonth()+1,n,2)}function Ly(t,n){return Xg(t.getUTCMinutes(),n,2)}function jy(t,n){return Xg(t.getUTCSeconds(),n,2)}function Hy(t){var n=t.getUTCDay();return 0===n?7:n}function Xy(t,n){return Xg(_g.count(qg(t)-1,t),n,2)}function Gy(t){var n=t.getUTCDay();return n>=4||0===n?wg(t):wg.ceil(t)}function Vy(t,n){return t=Gy(t),Xg(wg.count(qg(t),t)+(4===qg(t).getUTCDay()),n,2)}function $y(t){return t.getUTCDay()}function Wy(t,n){return Xg(bg.count(qg(t)-1,t),n,2)}function Zy(t,n){return Xg(t.getUTCFullYear()%100,n,2)}function Ky(t,n){return Xg((t=Gy(t)).getUTCFullYear()%100,n,2)}function Qy(t,n){return Xg(t.getUTCFullYear()%1e4,n,4)}function Jy(t,n){var e=t.getUTCDay();return Xg((t=e>=4||0===e?wg(t):wg.ceil(t)).getUTCFullYear()%1e4,n,4)}function tv(){return"+0000"}function nv(){return"%"}function ev(t){return+t}function rv(t){return Math.floor(+t/1e3)}function iv(n){return Bg=Ig(n),t.timeFormat=Bg.format,t.timeParse=Bg.parse,t.utcFormat=Bg.utcFormat,t.utcParse=Bg.utcParse,Bg}iv({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"]});var ov="%Y-%m-%dT%H:%M:%S.%LZ";var av=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat(ov);var uv=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:t.utcParse(ov),cv=1e3,fv=6e4,sv=36e5,lv=864e5,hv=2592e6,dv=31536e6;function pv(t){return new Date(t)}function gv(t){return t instanceof Date?+t:+new Date(+t)}function yv(t,n,r,i,o,a,u,c,f){var s=up(),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),g=f("%I:%M"),y=f("%I %p"),v=f("%a %d"),_=f("%b %d"),b=f("%B"),m=f("%Y"),x=[[u,1,cv],[u,5,5e3],[u,15,15e3],[u,30,3e4],[a,1,fv],[a,5,3e5],[a,15,9e5],[a,30,18e5],[o,1,sv],[o,3,108e5],[o,6,216e5],[o,12,432e5],[i,1,lv],[i,2,1728e5],[r,1,6048e5],[n,1,hv],[n,3,7776e6],[t,1,dv]];function w(e){return(u(e)<e?d:a(e)<e?p:o(e)<e?g:i(e)<e?y:n(e)<e?r(e)<e?v:_:t(e)<e?b:m)(e)}function M(n,r,i){if(null==n&&(n=10),"number"==typeof n){var o,a=Math.abs(i-r)/n,u=e((function(t){return t[2]})).right(x,a);return u===x.length?(o=S(r/dv,i/dv,n),n=t):u?(o=(u=x[a/x[u-1][2]<x[u][2]/a?u-1:u])[1],n=u[0]):(o=Math.max(S(r,i,n),1),n=c),n.every(o)}return n}return s.invert=function(t){return new Date(l(t))},s.domain=function(t){return arguments.length?h(Array.from(t,gv)):h().map(pv)},s.ticks=function(t){var n,e=h(),r=e[0],i=e[e.length-1],o=i<r;return o&&(n=r,r=i,i=n),n=(n=M(t,r,i))?n.range(r,i+1):[],o?n.reverse():n},s.tickFormat=function(t,n){return null==n?w:f(n)},s.nice=function(t){var n=h();return(t=M(t,n[0],n[n.length-1]))?h(sp(n,t)):s},s.copy=function(){return op(s,yv(t,n,r,i,o,a,u,c,f))},s}function vv(){var t,n,e,r,i,o=0,a=1,u=np,c=!1;function f(n){return isNaN(n=+n)?i:u(0===e?.5:(n=(r(n)-t)*e,c?Math.max(0,Math.min(1,n)):n))}function s(t){return function(n){var e,r;return arguments.length?([e,r]=n,u=t(e,r),f):[u(0),u(1)]}}return f.domain=function(i){return arguments.length?([o,a]=i,t=r(o=+o),n=r(a=+a),e=t===n?0:1/(n-t),f):[o,a]},f.clamp=function(t){return arguments.length?(c=!!t,f):c},f.interpolator=function(t){return arguments.length?(u=t,f):u},f.range=s(dr),f.rangeRound=s(pr),f.unknown=function(t){return arguments.length?(i=t,f):i},function(i){return r=i,t=i(o),n=i(a),e=t===n?0:1/(n-t),f}}function _v(t,n){return n.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function bv(){var t=Ap(vv());return t.copy=function(){return _v(t,bv()).exponent(t.exponent())},$d.apply(t,arguments)}function mv(){var t,n,e,r,i,o,a,u=0,c=.5,f=1,s=1,l=np,h=!1;function d(t){return isNaN(t=+t)?a:(t=.5+((t=+o(t))-n)*(s*t<s*n?r:i),l(h?Math.max(0,Math.min(1,t)):t))}function p(t){return function(n){var e,r,i;return arguments.length?([e,r,i]=n,l=Dr(t,[e,r,i]),d):[l(0),l(.5),l(1)]}}return d.domain=function(a){return arguments.length?([u,c,f]=a,t=o(u=+u),n=o(c=+c),e=o(f=+f),r=t===n?0:.5/(n-t),i=n===e?0:.5/(e-n),s=n<t?-1:1,d):[u,c,f]},d.clamp=function(t){return arguments.length?(h=!!t,d):h},d.interpolator=function(t){return arguments.length?(l=t,d):l},d.range=p(dr),d.rangeRound=p(pr),d.unknown=function(t){return arguments.length?(a=t,d):a},function(a){return o=a,t=a(u),n=a(c),e=a(f),r=t===n?0:.5/(n-t),i=n===e?0:.5/(e-n),s=n<t?-1:1,d}}function xv(){var t=Ap(mv());return t.copy=function(){return _v(t,xv()).exponent(t.exponent())},$d.apply(t,arguments)}function wv(t){for(var n=t.length/6|0,e=new Array(n),r=0;r<n;)e[r]="#"+t.slice(6*r,6*++r);return e}var Mv=wv("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Av=wv("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Tv=wv("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Sv=wv("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Ev=wv("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),kv=wv("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Nv=wv("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Cv=wv("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Pv=wv("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),zv=wv("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),Dv=t=>er(t[t.length-1]),qv=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(wv),Rv=Dv(qv),Fv=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(wv),Ov=Dv(Fv),Uv=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(wv),Iv=Dv(Uv),Bv=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(wv),Yv=Dv(Bv),Lv=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(wv),jv=Dv(Lv),Hv=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(wv),Xv=Dv(Hv),Gv=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(wv),Vv=Dv(Gv),$v=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(wv),Wv=Dv($v),Zv=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(wv),Kv=Dv(Zv),Qv=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(wv),Jv=Dv(Qv),t_=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(wv),n_=Dv(t_),e_=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(wv),r_=Dv(e_),i_=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(wv),o_=Dv(i_),a_=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(wv),u_=Dv(a_),c_=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(wv),f_=Dv(c_),s_=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(wv),l_=Dv(s_),h_=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(wv),d_=Dv(h_),p_=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(wv),g_=Dv(p_),y_=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(wv),v_=Dv(y_),__=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(wv),b_=Dv(__),m_=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(wv),x_=Dv(m_),w_=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(wv),M_=Dv(w_),A_=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(wv),T_=Dv(A_),S_=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(wv),E_=Dv(S_),k_=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(wv),N_=Dv(k_),C_=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(wv),P_=Dv(C_),z_=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(wv),D_=Dv(z_);var q_=zr(He(300,.5,0),He(-240,.5,1)),R_=zr(He(-100,.75,.35),He(80,1.5,.8)),F_=zr(He(260,.75,.35),He(80,1.5,.8)),O_=He();var U_=ue(),I_=Math.PI/3,B_=2*Math.PI/3;function Y_(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var L_=Y_(wv("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),j_=Y_(wv("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),H_=Y_(wv("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),X_=Y_(wv("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function G_(t){return function(){return t}}var V_=Math.abs,$_=Math.atan2,W_=Math.cos,Z_=Math.max,K_=Math.min,Q_=Math.sin,J_=Math.sqrt,tb=1e-12,nb=Math.PI,eb=nb/2,rb=2*nb;function ib(t){return t>1?0:t<-1?nb:Math.acos(t)}function ob(t){return t>=1?eb:t<=-1?-eb:Math.asin(t)}function ab(t){return t.innerRadius}function ub(t){return t.outerRadius}function cb(t){return t.startAngle}function fb(t){return t.endAngle}function sb(t){return t&&t.padAngle}function lb(t,n,e,r,i,o,a,u){var c=e-t,f=r-n,s=a-i,l=u-o,h=l*c-s*f;if(!(h*h<tb))return[t+(h=(s*(n-o)-l*(t-i))/h)*c,n+h*f]}function hb(t,n,e,r,i,o,a){var u=t-e,c=n-r,f=(a?o:-o)/J_(u*u+c*c),s=f*c,l=-f*u,h=t+s,d=n+l,p=e+s,g=r+l,y=(h+p)/2,v=(d+g)/2,_=p-h,b=g-d,m=_*_+b*b,x=i-o,w=h*g-p*d,M=(b<0?-1:1)*J_(Z_(0,x*x*m-w*w)),A=(w*b-_*M)/m,T=(-w*_-b*M)/m,S=(w*b+_*M)/m,E=(-w*_+b*M)/m,k=A-y,N=T-v,C=S-y,P=E-v;return k*k+N*N>C*C+P*P&&(A=S,T=E),{cx:A,cy:T,x01:-s,y01:-l,x11:A*(i/x-1),y11:T*(i/x-1)}}var db=Array.prototype.slice;function pb(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function gb(t){this._context=t}function yb(t){return new gb(t)}function vb(t){return t[0]}function _b(t){return t[1]}function bb(t,n){var e=G_(!0),r=null,i=yb,o=null;function a(a){var u,c,f,s=(a=pb(a)).length,l=!1;for(null==r&&(o=i(f=Jo())),u=0;u<=s;++u)!(u<s&&e(c=a[u],u,a))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(c,u,a),+n(c,u,a));if(f)return o=null,f+""||null}return t="function"==typeof t?t:void 0===t?vb:G_(t),n="function"==typeof n?n:void 0===n?_b:G_(n),a.x=function(n){return arguments.length?(t="function"==typeof n?n:G_(+n),a):t},a.y=function(t){return arguments.length?(n="function"==typeof t?t:G_(+t),a):n},a.defined=function(t){return arguments.length?(e="function"==typeof t?t:G_(!!t),a):e},a.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),a):i},a.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),a):r},a}function mb(t,n,e){var r=null,i=G_(!0),o=null,a=yb,u=null;function c(c){var f,s,l,h,d,p=(c=pb(c)).length,g=!1,y=new Array(p),v=new Array(p);for(null==o&&(u=a(d=Jo())),f=0;f<=p;++f){if(!(f<p&&i(h=c[f],f,c))===g)if(g=!g)s=f,u.areaStart(),u.lineStart();else{for(u.lineEnd(),u.lineStart(),l=f-1;l>=s;--l)u.point(y[l],v[l]);u.lineEnd(),u.areaEnd()}g&&(y[f]=+t(h,f,c),v[f]=+n(h,f,c),u.point(r?+r(h,f,c):y[f],e?+e(h,f,c):v[f]))}if(d)return u=null,d+""||null}function f(){return bb().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?vb:G_(+t),n="function"==typeof n?n:G_(void 0===n?0:+n),e="function"==typeof e?e:void 0===e?_b:G_(+e),c.x=function(n){return arguments.length?(t="function"==typeof n?n:G_(+n),r=null,c):t},c.x0=function(n){return arguments.length?(t="function"==typeof n?n:G_(+n),c):t},c.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:G_(+t),c):r},c.y=function(t){return arguments.length?(n="function"==typeof t?t:G_(+t),e=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:G_(+t),c):n},c.y1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:G_(+t),c):e},c.lineX0=c.lineY0=function(){return f().x(t).y(n)},c.lineY1=function(){return f().x(t).y(e)},c.lineX1=function(){return f().x(r).y(n)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:G_(!!t),c):i},c.curve=function(t){return arguments.length?(a=t,null!=o&&(u=a(o)),c):a},c.context=function(t){return arguments.length?(null==t?o=u=null:u=a(o=t),c):o},c}function xb(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function wb(t){return t}gb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var Mb=Tb(yb);function Ab(t){this._curve=t}function Tb(t){function n(n){return new Ab(t(n))}return n._curve=t,n}function Sb(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(Tb(t)):n()._curve},t}function Eb(){return Sb(bb().curve(Mb))}function kb(){var t=mb().curve(Mb),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Sb(e())},delete t.lineX0,t.lineEndAngle=function(){return Sb(r())},delete t.lineX1,t.lineInnerRadius=function(){return Sb(i())},delete t.lineY0,t.lineOuterRadius=function(){return Sb(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(Tb(t)):n()._curve},t}function Nb(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}function Cb(t){return t.source}function Pb(t){return t.target}function zb(t){var n=Cb,e=Pb,r=vb,i=_b,o=null;function a(){var a,u=db.call(arguments),c=n.apply(this,u),f=e.apply(this,u);if(o||(o=a=Jo()),t(o,+r.apply(this,(u[0]=c,u)),+i.apply(this,u),+r.apply(this,(u[0]=f,u)),+i.apply(this,u)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(n=t,a):n},a.target=function(t){return arguments.length?(e=t,a):e},a.x=function(t){return arguments.length?(r="function"==typeof t?t:G_(+t),a):r},a.y=function(t){return arguments.length?(i="function"==typeof t?t:G_(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}function Db(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function qb(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function Rb(t,n,e,r,i){var o=Nb(n,e),a=Nb(n,e=(e+i)/2),u=Nb(r,e),c=Nb(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(a[0],a[1],u[0],u[1],c[0],c[1])}Ab.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var Fb={draw:function(t,n){var e=Math.sqrt(n/nb);t.moveTo(e,0),t.arc(0,0,e,0,rb)}},Ob={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},Ub=Math.sqrt(1/3),Ib=2*Ub,Bb={draw:function(t,n){var e=Math.sqrt(n/Ib),r=e*Ub;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},Yb=Math.sin(nb/10)/Math.sin(7*nb/10),Lb=Math.sin(rb/10)*Yb,jb=-Math.cos(rb/10)*Yb,Hb={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=Lb*e,i=jb*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;o<5;++o){var a=rb*o/5,u=Math.cos(a),c=Math.sin(a);t.lineTo(c*e,-u*e),t.lineTo(u*r-c*i,c*r+u*i)}t.closePath()}},Xb={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},Gb=Math.sqrt(3),Vb={draw:function(t,n){var e=-Math.sqrt(n/(3*Gb));t.moveTo(0,2*e),t.lineTo(-Gb*e,-e),t.lineTo(Gb*e,-e),t.closePath()}},$b=-.5,Wb=Math.sqrt(3)/2,Zb=1/Math.sqrt(12),Kb=3*(Zb/2+1),Qb={draw:function(t,n){var e=Math.sqrt(n/Kb),r=e/2,i=e*Zb,o=r,a=e*Zb+e,u=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,c),t.lineTo($b*r-Wb*i,Wb*r+$b*i),t.lineTo($b*o-Wb*a,Wb*o+$b*a),t.lineTo($b*u-Wb*c,Wb*u+$b*c),t.lineTo($b*r+Wb*i,$b*i-Wb*r),t.lineTo($b*o+Wb*a,$b*a-Wb*o),t.lineTo($b*u+Wb*c,$b*c-Wb*u),t.closePath()}},Jb=[Fb,Ob,Bb,Xb,Hb,Vb,Qb];function tm(){}function nm(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function em(t){this._context=t}function rm(t){this._context=t}function im(t){this._context=t}function om(t,n){this._basis=new em(t),this._beta=n}em.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:nm(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:nm(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},rm.prototype={areaStart:tm,areaEnd:tm,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:nm(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},im.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:nm(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},om.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],a=t[e]-i,u=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*a),this._beta*n[c]+(1-this._beta)*(o+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var am=function t(n){function e(t){return 1===n?new em(t):new om(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function um(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function cm(t,n){this._context=t,this._k=(1-n)/6}cm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:um(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:um(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var fm=function t(n){function e(t){return new cm(t,n)}return e.tension=function(n){return t(+n)},e}(0);function sm(t,n){this._context=t,this._k=(1-n)/6}sm.prototype={areaStart:tm,areaEnd:tm,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:um(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var lm=function t(n){function e(t){return new sm(t,n)}return e.tension=function(n){return t(+n)},e}(0);function hm(t,n){this._context=t,this._k=(1-n)/6}hm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:um(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var dm=function t(n){function e(t){return new hm(t,n)}return e.tension=function(n){return t(+n)},e}(0);function pm(t,n,e){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>tb){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>tb){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*f+t._x1*t._l23_2a-n*t._l12_2a)/s,a=(a*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function gm(t,n){this._context=t,this._alpha=n}gm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:pm(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var ym=function t(n){function e(t){return n?new gm(t,n):new cm(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function vm(t,n){this._context=t,this._alpha=n}vm.prototype={areaStart:tm,areaEnd:tm,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:pm(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var _m=function t(n){function e(t){return n?new vm(t,n):new sm(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function bm(t,n){this._context=t,this._alpha=n}bm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:pm(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var mm=function t(n){function e(t){return n?new bm(t,n):new hm(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function xm(t){this._context=t}function wm(t){return t<0?-1:1}function Mm(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(e-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(wm(o)+wm(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function Am(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Tm(t,n,e){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*n,o-u,a-u*e,o,a)}function Sm(t){this._context=t}function Em(t){this._context=new km(t)}function km(t){this._context=t}function Nm(t){this._context=t}function Cm(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],n=1;n<r-1;++n)i[n]=1,o[n]=4,a[n]=4*t[n]+2*t[n+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],n=1;n<r;++n)e=i[n]/o[n-1],o[n]-=e,a[n]-=e*a[n-1];for(i[r-1]=a[r-1]/o[r-1],n=r-2;n>=0;--n)i[n]=(a[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n<r-1;++n)o[n]=2*t[n+1]-i[n+1];return[i,o]}function Pm(t,n){this._context=t,this._t=n}function zm(t,n){if((i=t.length)>1)for(var e,r,i,o=1,a=t[n[0]],u=a.length;o<i;++o)for(r=a,a=t[n[o]],e=0;e<u;++e)a[e][1]+=a[e][0]=isNaN(r[e][1])?r[e][0]:r[e][1]}function Dm(t){for(var n=t.length,e=new Array(n);--n>=0;)e[n]=n;return e}function qm(t,n){return t[n]}function Rm(t){const n=[];return n.key=t,n}function Fm(t){var n=t.map(Om);return Dm(t).sort((function(t,e){return n[t]-n[e]}))}function Om(t){for(var n,e=-1,r=0,i=t.length,o=-1/0;++e<i;)(n=+t[e][1])>o&&(o=n,r=e);return r}function Um(t){var n=t.map(Im);return Dm(t).sort((function(t,e){return n[t]-n[e]}))}function Im(t){for(var n,e=0,r=-1,i=t.length;++r<i;)(n=+t[r][1])&&(e+=n);return e}xm.prototype={areaStart:tm,areaEnd:tm,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}},Sm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Tm(this,this._t0,Am(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,Tm(this,Am(this,e=Mm(this,t,n)),e);break;default:Tm(this,this._t0,e=Mm(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(Em.prototype=Object.create(Sm.prototype)).point=function(t,n){Sm.prototype.point.call(this,n,t)},km.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,o){this._context.bezierCurveTo(n,t,r,e,o,i)}},Nm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===e)this._context.lineTo(t[1],n[1]);else for(var r=Cm(t),i=Cm(n),o=0,a=1;a<e;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],n[a]);(this._line||0!==this._line&&1===e)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},Pm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var Bm=t=>()=>t;function Ym(t,{sourceEvent:n,target:e,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:n,enumerable:!0,configurable:!0},target:{value:e,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Lm(t,n,e){this.k=t,this.x=n,this.y=e}Lm.prototype={constructor:Lm,scale:function(t){return 1===t?this:new Lm(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new Lm(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var jm=new Lm(1,0,0);function Hm(t){for(;!t.__zoom;)if(!(t=t.parentNode))return jm;return t.__zoom}function Xm(t){t.stopImmediatePropagation()}function Gm(t){t.preventDefault(),t.stopImmediatePropagation()}function Vm(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function $m(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function Wm(){return this.__zoom||jm}function Zm(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function Km(){return navigator.maxTouchPoints||"ontouchstart"in this}function Qm(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],a=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}Hm.prototype=Lm.prototype,t.Adder=g,t.Delaunay=Xa,t.FormatSpecifier=Ku,t.Voronoi=Ia,t.active=function(t,n){var e,r,i=t.__transition;if(i)for(r in n=null==n?null:n+"",i)if((e=i[r]).state>1&&e.name===n)return new Di([[t]],uo,n,+r);return null},t.arc=function(){var t=ab,n=ub,e=G_(0),r=null,i=cb,o=fb,a=sb,u=null;function c(){var c,f,s=+t.apply(this,arguments),l=+n.apply(this,arguments),h=i.apply(this,arguments)-eb,d=o.apply(this,arguments)-eb,p=V_(d-h),g=d>h;if(u||(u=c=Jo()),l<s&&(f=l,l=s,s=f),l>tb)if(p>rb-tb)u.moveTo(l*W_(h),l*Q_(h)),u.arc(0,0,l,h,d,!g),s>tb&&(u.moveTo(s*W_(d),s*Q_(d)),u.arc(0,0,s,d,h,g));else{var y,v,_=h,b=d,m=h,x=d,w=p,M=p,A=a.apply(this,arguments)/2,T=A>tb&&(r?+r.apply(this,arguments):J_(s*s+l*l)),S=K_(V_(l-s)/2,+e.apply(this,arguments)),E=S,k=S;if(T>tb){var N=ob(T/s*Q_(A)),C=ob(T/l*Q_(A));(w-=2*N)>tb?(m+=N*=g?1:-1,x-=N):(w=0,m=x=(h+d)/2),(M-=2*C)>tb?(_+=C*=g?1:-1,b-=C):(M=0,_=b=(h+d)/2)}var P=l*W_(_),z=l*Q_(_),D=s*W_(x),q=s*Q_(x);if(S>tb){var R,F=l*W_(b),O=l*Q_(b),U=s*W_(m),I=s*Q_(m);if(p<nb&&(R=lb(P,z,U,I,F,O,D,q))){var B=P-R[0],Y=z-R[1],L=F-R[0],j=O-R[1],H=1/Q_(ib((B*L+Y*j)/(J_(B*B+Y*Y)*J_(L*L+j*j)))/2),X=J_(R[0]*R[0]+R[1]*R[1]);E=K_(S,(s-X)/(H-1)),k=K_(S,(l-X)/(H+1))}}M>tb?k>tb?(y=hb(U,I,P,z,l,k,g),v=hb(F,O,D,q,l,k,g),u.moveTo(y.cx+y.x01,y.cy+y.y01),k<S?u.arc(y.cx,y.cy,k,$_(y.y01,y.x01),$_(v.y01,v.x01),!g):(u.arc(y.cx,y.cy,k,$_(y.y01,y.x01),$_(y.y11,y.x11),!g),u.arc(0,0,l,$_(y.cy+y.y11,y.cx+y.x11),$_(v.cy+v.y11,v.cx+v.x11),!g),u.arc(v.cx,v.cy,k,$_(v.y11,v.x11),$_(v.y01,v.x01),!g))):(u.moveTo(P,z),u.arc(0,0,l,_,b,!g)):u.moveTo(P,z),s>tb&&w>tb?E>tb?(y=hb(D,q,F,O,s,-E,g),v=hb(P,z,U,I,s,-E,g),u.lineTo(y.cx+y.x01,y.cy+y.y01),E<S?u.arc(y.cx,y.cy,E,$_(y.y01,y.x01),$_(v.y01,v.x01),!g):(u.arc(y.cx,y.cy,E,$_(y.y01,y.x01),$_(y.y11,y.x11),!g),u.arc(0,0,s,$_(y.cy+y.y11,y.cx+y.x11),$_(v.cy+v.y11,v.cx+v.x11),g),u.arc(v.cx,v.cy,E,$_(v.y11,v.x11),$_(v.y01,v.x01),!g))):u.arc(0,0,s,x,m,g):u.lineTo(D,q)}else u.moveTo(0,0);if(u.closePath(),c)return u=null,c+""||null}return c.centroid=function(){var e=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-nb/2;return[W_(r)*e,Q_(r)*e]},c.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:G_(+n),c):t},c.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:G_(+t),c):n},c.cornerRadius=function(t){return arguments.length?(e="function"==typeof t?t:G_(+t),c):e},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:G_(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:G_(+t),c):i},c.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:G_(+t),c):o},c.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:G_(+t),c):a},c.context=function(t){return arguments.length?(u=null==t?null:t,c):u},c},t.area=mb,t.areaRadial=kb,t.ascending=n,t.autoType=function(t){for(var n in t){var e,r,i=t[n].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(e=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;gu&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=e;else i=null;t[n]=i}return t},t.axisBottom=function(t){return et(3,t)},t.axisLeft=function(t){return et(4,t)},t.axisRight=function(t){return et(2,t)},t.axisTop=function(t){return et(1,t)},t.bin=N,t.bisect=o,t.bisectCenter=u,t.bisectLeft=a,t.bisectRight=o,t.bisector=e,t.blob=function(t,n){return fetch(t,n).then(yu)},t.brush=function(){return Fo(Ao)},t.brushSelection=function(t){var n=t.__brush;return n?n.dim.output(n.selection):null},t.brushX=function(){return Fo(wo)},t.brushY=function(){return Fo(Mo)},t.buffer=function(t,n){return fetch(t,n).then(vu)},t.chord=function(){return Vo(!1,!1)},t.chordDirected=function(){return Vo(!0,!1)},t.chordTranspose=function(){return Vo(!1,!0)},t.cluster=function(){var t=Ph,n=1,e=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(n){var e=n.children;e?(n.x=function(t){return t.reduce(zh,0)/t.length}(e),n.y=function(t){return 1+t.reduce(Dh,0)}(e)):(n.x=o?a+=t(n,o):0,n.y=0,o=n)}));var u=function(t){for(var n;n=t.children;)t=n[0];return t}(i),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),f=u.x-t(u,c)/2,s=c.x+t(c,u)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n,t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-f)/(s-f)*n,t.y=(1-(i.y?t.y/i.y:1))*e})}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},t.color=re,t.contourDensity=function(){var t=xa,n=wa,e=Ma,r=960,i=500,o=20,a=2,u=3*o,c=r+2*u>>a,f=i+2*u>>a,s=ha(20);function l(r){var i=new Float32Array(c*f),l=new Float32Array(c*f);r.forEach((function(r,o,s){var l=+t(r,o,s)+u>>a,h=+n(r,o,s)+u>>a,d=+e(r,o,s);l>=0&&l<c&&h>=0&&h<f&&(i[l+h*c]+=d)})),ba({width:c,height:f,data:i},{width:c,height:f,data:l},o>>a),ma({width:c,height:f,data:l},{width:c,height:f,data:i},o>>a),ba({width:c,height:f,data:i},{width:c,height:f,data:l},o>>a),ma({width:c,height:f,data:l},{width:c,height:f,data:i},o>>a),ba({width:c,height:f,data:i},{width:c,height:f,data:l},o>>a),ma({width:c,height:f,data:l},{width:c,height:f,data:i},o>>a);var d=s(i);if(!Array.isArray(d)){var p=C(i);d=S(0,p,d),(d=B(0,Math.floor(p/d)*d,d)).shift()}return _a().thresholds(d).size([c,f])(i).map(h)}function h(t){return t.value*=Math.pow(2,-2*a),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(g)}function g(t){t[0]=t[0]*Math.pow(2,a)-u,t[1]=t[1]*Math.pow(2,a)-u}function y(){return c=r+2*(u=3*o)>>a,f=i+2*u>>a,l}return l.x=function(n){return arguments.length?(t="function"==typeof n?n:ha(+n),l):t},l.y=function(t){return arguments.length?(n="function"==typeof t?t:ha(+t),l):n},l.weight=function(t){return arguments.length?(e="function"==typeof t?t:ha(+t),l):e},l.size=function(t){if(!arguments.length)return[r,i];var n=+t[0],e=+t[1];if(!(n>=0&&e>=0))throw new Error("invalid size");return r=n,i=e,y()},l.cellSize=function(t){if(!arguments.length)return 1<<a;if(!((t=+t)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(t)/Math.LN2),y()},l.thresholds=function(t){return arguments.length?(s="function"==typeof t?t:Array.isArray(t)?ha(sa.call(t)):ha(t),l):s},l.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return o=Math.round((Math.sqrt(4*t*t+1)-1)/2),y()},l},t.contours=_a,t.count=c,t.create=function(t){return Mn(pt(t).call(document.documentElement))},t.creator=pt,t.cross=function(...t){const n="function"==typeof t[t.length-1]&&function(t){return n=>t(...n)}(t.pop()),e=(t=t.map(l)).map(f),r=t.length-1,i=new Array(r+1).fill(0),o=[];if(r<0||e.some(s))return o;for(;;){o.push(i.map((n,e)=>t[e][n]));let a=r;for(;++i[a]===e[a];){if(0===a)return n?o.map(n):o;i[a--]=0}}},t.csv=xu,t.csvFormat=eu,t.csvFormatBody=ru,t.csvFormatRow=ou,t.csvFormatRows=iu,t.csvFormatValue=au,t.csvParse=tu,t.csvParseRows=nu,t.cubehelix=He,t.cumsum=function(t,n){var e=0,r=0;return Float64Array.from(t,void 0===n?t=>e+=+t||0:i=>e+=+n(i,r++,t)||0)},t.curveBasis=function(t){return new em(t)},t.curveBasisClosed=function(t){return new rm(t)},t.curveBasisOpen=function(t){return new im(t)},t.curveBundle=am,t.curveCardinal=fm,t.curveCardinalClosed=lm,t.curveCardinalOpen=dm,t.curveCatmullRom=ym,t.curveCatmullRomClosed=_m,t.curveCatmullRomOpen=mm,t.curveLinear=yb,t.curveLinearClosed=function(t){return new xm(t)},t.curveMonotoneX=function(t){return new Sm(t)},t.curveMonotoneY=function(t){return new Em(t)},t.curveNatural=function(t){return new Nm(t)},t.curveStep=function(t){return new Pm(t,.5)},t.curveStepAfter=function(t){return new Pm(t,1)},t.curveStepBefore=function(t){return new Pm(t,0)},t.descending=function(t,n){return n<t?-1:n>t?1:n>=t?0:NaN},t.deviation=d,t.difference=function(t,...n){t=new Set(t);for(const e of n)for(const n of e)t.delete(n);return t},t.disjoint=function(t,n){const e=n[Symbol.iterator](),r=new Set;for(const n of t){if(r.has(n))return!1;let t,i;for(;({value:t,done:i}=e.next())&&!i;){if(Object.is(n,t))return!1;r.add(t)}}return!0},t.dispatch=it,t.drag=function(){var t,n,e,r,i=Rn,o=Fn,a=On,u=Un,c={},f=it("start","drag","end"),s=0,l=0;function h(t){t.on("mousedown.drag",d).filter(u).on("touchstart.drag",y).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(a,u){if(!r&&i.call(this,a,u)){var c=b(this,o.call(this,a,u),a,u,"mouse");c&&(Mn(a.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),Pn(a.view),Nn(a),e=!1,t=a.clientX,n=a.clientY,c("start",a))}}function p(r){if(Cn(r),!e){var i=r.clientX-t,o=r.clientY-n;e=i*i+o*o>l}c.mouse("drag",r)}function g(t){Mn(t.view).on("mousemove.drag mouseup.drag",null),zn(t.view,e),Cn(t),c.mouse("end",t)}function y(t,n){if(i.call(this,t,n)){var e,r,a=t.changedTouches,u=o.call(this,t,n),c=a.length;for(e=0;e<c;++e)(r=b(this,u,t,n,a[e].identifier,a[e]))&&(Nn(t),r("start",t,a[e]))}}function v(t){var n,e,r=t.changedTouches,i=r.length;for(n=0;n<i;++n)(e=c[r[n].identifier])&&(Cn(t),e("drag",t,r[n]))}function _(t){var n,e,i=t.changedTouches,o=i.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),n=0;n<o;++n)(e=c[i[n].identifier])&&(Nn(t),e("end",t,i[n]))}function b(t,n,e,r,i,o){var u,l,d,p=f.copy(),g=kn(o||e,n);if(null!=(d=a.call(t,new qn("beforestart",{sourceEvent:e,target:h,identifier:i,active:s,x:g[0],y:g[1],dx:0,dy:0,dispatch:p}),r)))return u=d.x-g[0]||0,l=d.y-g[1]||0,function e(o,a,f){var y,v=g;switch(o){case"start":c[i]=e,y=s++;break;case"end":delete c[i],--s;case"drag":g=kn(f||a,n),y=s}p.call(o,t,new qn(o,{sourceEvent:a,subject:d,target:h,identifier:i,active:y,x:g[0]+u,y:g[1]+l,dx:g[0]-v[0],dy:g[1]-v[1],dispatch:p}),r)}}return h.filter=function(t){return arguments.length?(i="function"==typeof t?t:Dn(!!t),h):i},h.container=function(t){return arguments.length?(o="function"==typeof t?t:Dn(t),h):o},h.subject=function(t){return arguments.length?(a="function"==typeof t?t:Dn(t),h):a},h.touchable=function(t){return arguments.length?(u="function"==typeof t?t:Dn(!!t),h):u},h.on=function(){var t=f.on.apply(f,arguments);return t===f?h:t},h.clickDistance=function(t){return arguments.length?(l=(t=+t)*t,h):Math.sqrt(l)},h},t.dragDisable=Pn,t.dragEnable=zn,t.dsv=function(t,n,e,r){3===arguments.length&&"function"==typeof e&&(r=e,e=void 0);var i=Qa(t);return bu(n,e).then((function(t){return i.parse(t,r)}))},t.dsvFormat=Qa,t.easeBack=to,t.easeBackIn=Qi,t.easeBackInOut=to,t.easeBackOut=Ji,t.easeBounce=Zi,t.easeBounceIn=function(t){return 1-Zi(1-t)},t.easeBounceInOut=function(t){return((t*=2)<=1?1-Zi(1-t):Zi(t-1)+1)/2},t.easeBounceOut=Zi,t.easeCircle=Vi,t.easeCircleIn=function(t){return 1-Math.sqrt(1-t*t)},t.easeCircleInOut=Vi,t.easeCircleOut=function(t){return Math.sqrt(1- --t*t)},t.easeCubic=Ui,t.easeCubicIn=function(t){return t*t*t},t.easeCubicInOut=Ui,t.easeCubicOut=function(t){return--t*t*t+1},t.easeElastic=ro,t.easeElasticIn=eo,t.easeElasticInOut=io,t.easeElasticOut=ro,t.easeExp=Gi,t.easeExpIn=function(t){return Xi(1-+t)},t.easeExpInOut=Gi,t.easeExpOut=function(t){return 1-Xi(t)},t.easeLinear=t=>+t,t.easePoly=Yi,t.easePolyIn=Ii,t.easePolyInOut=Yi,t.easePolyOut=Bi,t.easeQuad=Oi,t.easeQuadIn=function(t){return t*t},t.easeQuadInOut=Oi,t.easeQuadOut=function(t){return t*(2-t)},t.easeSin=Hi,t.easeSinIn=function(t){return 1==+t?1:1-Math.cos(t*ji)},t.easeSinInOut=Hi,t.easeSinOut=function(t){return Math.sin(t*ji)},t.every=function(t,n){if("function"!=typeof n)throw new TypeError("test is not a function");let e=-1;for(const r of t)if(!n(r,++e,t))return!1;return!0},t.extent=p,t.filter=function(t,n){if("function"!=typeof n)throw new TypeError("test is not a function");const e=[];let r=-1;for(const i of t)n(i,++r,t)&&e.push(i);return e},t.forceCenter=function(t,n){var e,r=1;function i(){var i,o,a=e.length,u=0,c=0;for(i=0;i<a;++i)u+=(o=e[i]).x,c+=o.y;for(u=(u/a-t)*r,c=(c/a-n)*r,i=0;i<a;++i)(o=e[i]).x-=u,o.y-=c}return null==t&&(t=0),null==n&&(n=0),i.initialize=function(t){e=t},i.x=function(n){return arguments.length?(t=+n,i):t},i.y=function(t){return arguments.length?(n=+t,i):n},i.strength=function(t){return arguments.length?(r=+t,i):r},i},t.forceCollide=function(t){var n,e,r,i=1,o=1;function a(){for(var t,a,c,f,s,l,h,d=n.length,p=0;p<o;++p)for(a=zu(n,Uu,Iu).visitAfter(u),t=0;t<d;++t)c=n[t],l=e[c.index],h=l*l,f=c.x+c.vx,s=c.y+c.vy,a.visit(g);function g(t,n,e,o,a){var u=t.data,d=t.r,p=l+d;if(!u)return n>f+p||o<f-p||e>s+p||a<s-p;if(u.index>c.index){var g=f-u.x-u.vx,y=s-u.y-u.vy,v=g*g+y*y;v<p*p&&(0===g&&(v+=(g=Ou(r))*g),0===y&&(v+=(y=Ou(r))*y),v=(p-(v=Math.sqrt(v)))/v*i,c.vx+=(g*=v)*(p=(d*=d)/(h+d)),c.vy+=(y*=v)*p,u.vx-=g*(p=1-p),u.vy-=y*p)}}}function u(t){if(t.data)return t.r=e[t.data.index];for(var n=t.r=0;n<4;++n)t[n]&&t[n].r>t.r&&(t.r=t[n].r)}function c(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r<o;++r)i=n[r],e[i.index]=+t(i,r,n)}}return"function"!=typeof t&&(t=Fu(null==t?1:+t)),a.initialize=function(t,e){n=t,r=e,c()},a.iterations=function(t){return arguments.length?(o=+t,a):o},a.strength=function(t){return arguments.length?(i=+t,a):i},a.radius=function(n){return arguments.length?(t="function"==typeof n?n:Fu(+n),c(),a):t},a},t.forceLink=function(t){var n,e,r,i,o,a,u=Bu,c=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},f=Fu(30),s=1;function l(r){for(var i=0,u=t.length;i<s;++i)for(var c,f,l,h,d,p,g,y=0;y<u;++y)f=(c=t[y]).source,h=(l=c.target).x+l.vx-f.x-f.vx||Ou(a),d=l.y+l.vy-f.y-f.vy||Ou(a),h*=p=((p=Math.sqrt(h*h+d*d))-e[y])/p*r*n[y],d*=p,l.vx-=h*(g=o[y]),l.vy-=d*g,f.vx+=h*(g=1-g),f.vy+=d*g}function h(){if(r){var a,c,f=r.length,s=t.length,l=new Map(r.map((t,n)=>[u(t,n,r),t]));for(a=0,i=new Array(f);a<s;++a)(c=t[a]).index=a,"object"!=typeof c.source&&(c.source=Yu(l,c.source)),"object"!=typeof c.target&&(c.target=Yu(l,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(a=0,o=new Array(s);a<s;++a)c=t[a],o[a]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);n=new Array(s),d(),e=new Array(s),p()}}function d(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+c(t[e],e,t)}function p(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+f(t[n],n,t)}return null==t&&(t=[]),l.initialize=function(t,n){r=t,a=n,h()},l.links=function(n){return arguments.length?(t=n,h(),l):t},l.id=function(t){return arguments.length?(u=t,l):u},l.iterations=function(t){return arguments.length?(s=+t,l):s},l.strength=function(t){return arguments.length?(c="function"==typeof t?t:Fu(+t),d(),l):c},l.distance=function(t){return arguments.length?(f="function"==typeof t?t:Fu(+t),p(),l):f},l},t.forceManyBody=function(){var t,n,e,r,i,o=Fu(-30),a=1,u=1/0,c=.81;function f(e){var i,o=t.length,a=zu(t,ju,Hu).visitAfter(l);for(r=e,i=0;i<o;++i)n=t[i],a.visit(h)}function s(){if(t){var n,e,r=t.length;for(i=new Array(r),n=0;n<r;++n)e=t[n],i[e.index]=+o(e,n,t)}}function l(t){var n,e,r,o,a,u=0,c=0;if(t.length){for(r=o=a=0;a<4;++a)(n=t[a])&&(e=Math.abs(n.value))&&(u+=n.value,c+=e,r+=e*n.x,o+=e*n.y);t.x=r/c,t.y=o/c}else{(n=t).x=n.data.x,n.y=n.data.y;do{u+=i[n.data.index]}while(n=n.next)}t.value=u}function h(t,o,f,s){if(!t.value)return!0;var l=t.x-n.x,h=t.y-n.y,d=s-o,p=l*l+h*h;if(d*d/c<p)return p<u&&(0===l&&(p+=(l=Ou(e))*l),0===h&&(p+=(h=Ou(e))*h),p<a&&(p=Math.sqrt(a*p)),n.vx+=l*t.value*r/p,n.vy+=h*t.value*r/p),!0;if(!(t.length||p>=u)){(t.data!==n||t.next)&&(0===l&&(p+=(l=Ou(e))*l),0===h&&(p+=(h=Ou(e))*h),p<a&&(p=Math.sqrt(a*p)));do{t.data!==n&&(d=i[t.data.index]*r/p,n.vx+=l*d,n.vy+=h*d)}while(t=t.next)}}return f.initialize=function(n,r){t=n,e=r,s()},f.strength=function(t){return arguments.length?(o="function"==typeof t?t:Fu(+t),s(),f):o},f.distanceMin=function(t){return arguments.length?(a=t*t,f):Math.sqrt(a)},f.distanceMax=function(t){return arguments.length?(u=t*t,f):Math.sqrt(u)},f.theta=function(t){return arguments.length?(c=t*t,f):Math.sqrt(c)},f},t.forceRadial=function(t,n,e){var r,i,o,a=Fu(.1);function u(t){for(var a=0,u=r.length;a<u;++a){var c=r[a],f=c.x-n||1e-6,s=c.y-e||1e-6,l=Math.sqrt(f*f+s*s),h=(o[a]-l)*i[a]*t/l;c.vx+=f*h,c.vy+=s*h}}function c(){if(r){var n,e=r.length;for(i=new Array(e),o=new Array(e),n=0;n<e;++n)o[n]=+t(r[n],n,r),i[n]=isNaN(o[n])?0:+a(r[n],n,r)}}return"function"!=typeof t&&(t=Fu(+t)),null==n&&(n=0),null==e&&(e=0),u.initialize=function(t){r=t,c()},u.strength=function(t){return arguments.length?(a="function"==typeof t?t:Fu(+t),c(),u):a},u.radius=function(n){return arguments.length?(t="function"==typeof n?n:Fu(+n),c(),u):t},u.x=function(t){return arguments.length?(n=+t,u):n},u.y=function(t){return arguments.length?(e=+t,u):e},u},t.forceSimulation=function(t){var n,e=1,r=.001,i=1-Math.pow(r,1/300),o=0,a=.6,u=new Map,c=Vr(l),f=it("tick","end"),s=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Lu)/Lu}();function l(){h(),f.call("tick",n),e<r&&(c.stop(),f.call("end",n))}function h(r){var c,f,s=t.length;void 0===r&&(r=1);for(var l=0;l<r;++l)for(e+=(o-e)*i,u.forEach((function(t){t(e)})),c=0;c<s;++c)null==(f=t[c]).fx?f.x+=f.vx*=a:(f.x=f.fx,f.vx=0),null==f.fy?f.y+=f.vy*=a:(f.y=f.fy,f.vy=0);return n}function d(){for(var n,e=0,r=t.length;e<r;++e){if((n=t[e]).index=e,null!=n.fx&&(n.x=n.fx),null!=n.fy&&(n.y=n.fy),isNaN(n.x)||isNaN(n.y)){var i=10*Math.sqrt(.5+e),o=e*Xu;n.x=i*Math.cos(o),n.y=i*Math.sin(o)}(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}}function p(n){return n.initialize&&n.initialize(t,s),n}return null==t&&(t=[]),d(),n={tick:h,restart:function(){return c.restart(l),n},stop:function(){return c.stop(),n},nodes:function(e){return arguments.length?(t=e,d(),u.forEach(p),n):t},alpha:function(t){return arguments.length?(e=+t,n):e},alphaMin:function(t){return arguments.length?(r=+t,n):r},alphaDecay:function(t){return arguments.length?(i=+t,n):+i},alphaTarget:function(t){return arguments.length?(o=+t,n):o},velocityDecay:function(t){return arguments.length?(a=1-t,n):1-a},randomSource:function(t){return arguments.length?(s=t,u.forEach(p),n):s},force:function(t,e){return arguments.length>1?(null==e?u.delete(t):u.set(t,p(e)),n):u.get(t)},find:function(n,e,r){var i,o,a,u,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f<s;++f)(a=(i=n-(u=t[f]).x)*i+(o=e-u.y)*o)<r&&(c=u,r=a);return c},on:function(t,e){return arguments.length>1?(f.on(t,e),n):f.on(t)}}},t.forceX=function(t){var n,e,r,i=Fu(.1);function o(t){for(var i,o=0,a=n.length;o<a;++o)(i=n[o]).vx+=(r[o]-i.x)*e[o]*t}function a(){if(n){var o,a=n.length;for(e=new Array(a),r=new Array(a),o=0;o<a;++o)e[o]=isNaN(r[o]=+t(n[o],o,n))?0:+i(n[o],o,n)}}return"function"!=typeof t&&(t=Fu(null==t?0:+t)),o.initialize=function(t){n=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:Fu(+t),a(),o):i},o.x=function(n){return arguments.length?(t="function"==typeof n?n:Fu(+n),a(),o):t},o},t.forceY=function(t){var n,e,r,i=Fu(.1);function o(t){for(var i,o=0,a=n.length;o<a;++o)(i=n[o]).vy+=(r[o]-i.y)*e[o]*t}function a(){if(n){var o,a=n.length;for(e=new Array(a),r=new Array(a),o=0;o<a;++o)e[o]=isNaN(r[o]=+t(n[o],o,n))?0:+i(n[o],o,n)}}return"function"!=typeof t&&(t=Fu(null==t?0:+t)),o.initialize=function(t){n=t,a()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:Fu(+t),a(),o):i},o.y=function(n){return arguments.length?(t="function"==typeof n?n:Fu(+n),a(),o):t},o},t.formatDefaultLocale=oc,t.formatLocale=ic,t.formatSpecifier=Zu,t.fsum=function(t,n){const e=new g;if(void 0===n)for(let n of t)(n=+n)&&e.add(n);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&e.add(i)}return+e},t.geoAlbers=fh,t.geoAlbersUsa=function(){var t,n,e,r,i,o,a=fh(),u=ch().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=ch().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f={point:function(t,n){o=[t,n]}};function s(t){var n=t[0],a=t[1];return o=null,e.point(n,a),o||(r.point(n,a),o)||(i.point(n,a),o)}function l(){return t=n=null,s}return s.invert=function(t){var n=a.scale(),e=a.translate(),r=(t[0]-e[0])/n,i=(t[1]-e[1])/n;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:a).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[a.stream(n=e),u.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e<i;)r[e].point(t,n)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},s.precision=function(t){return arguments.length?(a.precision(t),u.precision(t),c.precision(t),l()):a.precision()},s.scale=function(t){return arguments.length?(a.scale(t),u.scale(.35*t),c.scale(t),s.translate(a.translate())):a.scale()},s.translate=function(t){if(!arguments.length)return a.translate();var n=a.scale(),o=+t[0],s=+t[1];return e=a.translate(t).clipExtent([[o-.455*n,s-.238*n],[o+.455*n,s+.238*n]]).stream(f),r=u.translate([o-.307*n,s+.201*n]).clipExtent([[o-.425*n+fc,s+.12*n+fc],[o-.214*n-fc,s+.234*n-fc]]).stream(f),i=c.translate([o-.205*n,s+.212*n]).clipExtent([[o-.214*n+fc,s+.166*n+fc],[o-.115*n-fc,s+.234*n-fc]]).stream(f),l()},s.fitExtent=function(t,n){return Zl(s,t,n)},s.fitSize=function(t,n){return Kl(s,t,n)},s.fitWidth=function(t,n){return Ql(s,t,n)},s.fitHeight=function(t,n){return Jl(s,t,n)},s.scale(1070)},t.geoArea=function(t){return rf=new g,Ic(t,of),2*rf},t.geoAzimuthalEqualArea=function(){return ih(hh).scale(124.75).clipAngle(179.999)},t.geoAzimuthalEqualAreaRaw=hh,t.geoAzimuthalEquidistant=function(){return ih(dh).scale(79.4188).clipAngle(179.999)},t.geoAzimuthalEquidistantRaw=dh,t.geoBounds=function(t){var n,e,r,i,o,a,u;if($c=Vc=-(Xc=Gc=1/0),tf=[],Ic(t,Df),e=tf.length){for(tf.sort(Lf),n=1,o=[r=tf[0]];n<e;++n)jf(r,(i=tf[n])[0])||jf(r,i[1])?(Yf(r[0],i[1])>Yf(r[0],r[1])&&(r[1]=i[1]),Yf(i[0],r[1])>Yf(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-1/0,n=0,r=o[e=o.length-1];n<=e;r=i,++n)i=o[n],(u=Yf(r[1],i[0]))>a&&(a=u,Xc=i[0],Vc=r[1])}return tf=nf=null,Xc===1/0||Gc===1/0?[[NaN,NaN],[NaN,NaN]]:[[Xc,Gc],[Vc,$c]]},t.geoCentroid=function(t){vf=_f=bf=mf=xf=wf=Mf=Af=0,Tf=new g,Sf=new g,Ef=new g,Ic(t,Hf);var n=+Tf,e=+Sf,r=+Ef,i=Mc(n,e,r);return i<sc&&(n=wf,e=Mf,r=Af,_f<fc&&(n=bf,e=mf,r=xf),(i=Mc(n,e,r))<sc)?[NaN,NaN]:[bc(e,n)*gc,Pc(r/i)*gc]},t.geoCircle=function(){var t,n,e=ns([0,0]),r=ns(90),i=ns(6),o={point:function(e,r){t.push(e=n(e,r)),e[0]*=gc,e[1]*=gc}};function a(){var a=e.apply(this,arguments),u=r.apply(this,arguments)*yc,c=i.apply(this,arguments)*yc;return t=[],n=is(-a[0]*yc,-a[1]*yc,0).invert,fs(o,u,c,1),a={type:"Polygon",coordinates:[t]},t=n=null,a}return a.center=function(t){return arguments.length?(e="function"==typeof t?t:ns([+t[0],+t[1]]),a):e},a.radius=function(t){return arguments.length?(r="function"==typeof t?t:ns(+t),a):r},a.precision=function(t){return arguments.length?(i="function"==typeof t?t:ns(+t),a):i},a},t.geoClipAntimeridian=xs,t.geoClipCircle=ws,t.geoClipExtent=function(){var t,n,e,r=0,i=0,o=960,a=500;return e={stream:function(e){return t&&n===e?t:t=Ns(r,i,o,a)(n=e)},extent:function(u){return arguments.length?(r=+u[0][0],i=+u[0][1],o=+u[1][0],a=+u[1][1],t=n=null,e):[[r,i],[o,a]]}}},t.geoClipRectangle=Ns,t.geoConicConformal=function(){return ah(vh).scale(109.5).parallels([30,30])},t.geoConicConformalRaw=vh,t.geoConicEqualArea=ch,t.geoConicEqualAreaRaw=uh,t.geoConicEquidistant=function(){return ah(bh).scale(131.154).center([0,13.9389])},t.geoConicEquidistantRaw=bh,t.geoContains=function(t,n){return(t&&Us.hasOwnProperty(t.type)?Us[t.type]:Bs)(t,n)},t.geoDistance=Os,t.geoEqualEarth=function(){return ih(Th).scale(177.158)},t.geoEqualEarthRaw=Th,t.geoEquirectangular=function(){return ih(_h).scale(152.63)},t.geoEquirectangularRaw=_h,t.geoGnomonic=function(){return ih(Sh).scale(144.049).clipAngle(60)},t.geoGnomonicRaw=Sh,t.geoGraticule=$s,t.geoGraticule10=function(){return $s()()},t.geoIdentity=function(){var t,n,e,r,i,o,a,u=1,c=0,f=0,s=1,l=1,h=0,d=null,p=1,g=1,y=Vl({point:function(t,n){var e=b([t,n]);this.stream.point(e[0],e[1])}}),v=Js;function _(){return p=u*s,g=u*l,o=a=null,b}function b(e){var r=e[0]*p,i=e[1]*g;if(h){var o=i*t-r*n;r=r*t+i*n,i=o}return[r+c,i+f]}return b.invert=function(e){var r=e[0]-c,i=e[1]-f;if(h){var o=i*t+r*n;r=r*t-i*n,i=o}return[r/p,i/g]},b.stream=function(t){return o&&a===t?o:o=y(v(a=t))},b.postclip=function(t){return arguments.length?(v=t,d=e=r=i=null,_()):v},b.clipExtent=function(t){return arguments.length?(v=null==t?(d=e=r=i=null,Js):Ns(d=+t[0][0],e=+t[0][1],r=+t[1][0],i=+t[1][1]),_()):null==d?null:[[d,e],[r,i]]},b.scale=function(t){return arguments.length?(u=+t,_()):u},b.translate=function(t){return arguments.length?(c=+t[0],f=+t[1],_()):[c,f]},b.angle=function(e){return arguments.length?(n=Sc(h=e%360*yc),t=mc(h),_()):h*gc},b.reflectX=function(t){return arguments.length?(s=t?-1:1,_()):s<0},b.reflectY=function(t){return arguments.length?(l=t?-1:1,_()):l<0},b.fitExtent=function(t,n){return Zl(b,t,n)},b.fitSize=function(t,n){return Kl(b,t,n)},b.fitWidth=function(t,n){return Ql(b,t,n)},b.fitHeight=function(t,n){return Jl(b,t,n)},b},t.geoInterpolate=function(t,n){var e=t[0]*yc,r=t[1]*yc,i=n[0]*yc,o=n[1]*yc,a=mc(r),u=Sc(r),c=mc(o),f=Sc(o),s=a*mc(e),l=a*Sc(e),h=c*mc(i),d=c*Sc(i),p=2*Pc(kc(zc(o-r)+a*c*zc(i-e))),g=Sc(p),y=p?function(t){var n=Sc(t*=p)/g,e=Sc(p-t)/g,r=e*s+n*h,i=e*l+n*d,o=e*u+n*f;return[bc(i,r)*gc,bc(o,kc(r*r+i*i))*gc]}:function(){return[e*gc,r*gc]};return y.distance=p,y},t.geoLength=qs,t.geoMercator=function(){return gh(ph).scale(961/pc)},t.geoMercatorRaw=ph,t.geoNaturalEarth1=function(){return ih(Eh).scale(175.295)},t.geoNaturalEarth1Raw=Eh,t.geoOrthographic=function(){return ih(kh).scale(249.5).clipAngle(90.000001)},t.geoOrthographicRaw=kh,t.geoPath=function(t,n){var e,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Ic(t,e(r))),r.result()}return o.area=function(t){return Ic(t,e(el)),el.result()},o.measure=function(t){return Ic(t,e(Ll)),Ll.result()},o.bounds=function(t){return Ic(t,e(ll)),ll.result()},o.centroid=function(t){return Ic(t,e(Tl)),Tl.result()},o.projection=function(n){return arguments.length?(e=null==n?(t=null,Js):(t=n).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(n=null,new Xl):new Rl(n=t),"function"!=typeof i&&r.pointRadius(i),o):n},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(n)},t.geoProjection=ih,t.geoProjectionMutator=oh,t.geoRotation=cs,t.geoStereographic=function(){return ih(Nh).scale(250).clipAngle(142)},t.geoStereographicRaw=Nh,t.geoStream=Ic,t.geoTransform=function(t){return{stream:Vl(t)}},t.geoTransverseMercator=function(){var t=gh(Ch),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=Ch,t.gray=function(t,n){return new Se(t,0,0,null==n?1:n)},t.greatest=function(t,e=n){let r,i=!1;if(1===e.length){let o;for(const a of t){const t=e(a);(i?n(t,o)>0:0===n(t,t))&&(r=a,o=t,i=!0)}}else for(const n of t)(i?e(n,r)>0:0===e(n,n))&&(r=n,i=!0);return r},t.greatestIndex=function(t,e=n){if(1===e.length)return F(t,e);let r,i=-1,o=-1;for(const n of t)++o,(i<0?0===e(n,n):e(n,r)>0)&&(r=n,i=o);return i},t.group=function(t,...n){return _(t,y,y,n)},t.groups=function(t,...n){return _(t,Array.from,y,n)},t.hcl=ze,t.hierarchy=Rh,t.histogram=N,t.hsl=pe,t.html=Su,t.image=function(t,n){return new Promise((function(e,r){var i=new Image;for(var o in n)i[o]=n[o];i.onerror=r,i.onload=function(){e(i)},i.src=t}))},t.index=function(t,...n){return _(t,y,v,n)},t.indexes=function(t,...n){return _(t,Array.from,v,n)},t.interpolate=dr,t.interpolateArray=function(t,n){return(or(n)?ir:ar)(t,n)},t.interpolateBasis=Ve,t.interpolateBasisClosed=$e,t.interpolateBlues=M_,t.interpolateBrBG=Rv,t.interpolateBuGn=Jv,t.interpolateBuPu=n_,t.interpolateCividis=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"},t.interpolateCool=F_,t.interpolateCubehelix=Pr,t.interpolateCubehelixDefault=q_,t.interpolateCubehelixLong=zr,t.interpolateDate=ur,t.interpolateDiscrete=function(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}},t.interpolateGnBu=r_,t.interpolateGreens=T_,t.interpolateGreys=E_,t.interpolateHcl=kr,t.interpolateHclLong=Nr,t.interpolateHsl=Tr,t.interpolateHslLong=Sr,t.interpolateHue=function(t,n){var e=Ke(+t,+n);return function(t){var n=e(t);return n-360*Math.floor(n/360)}},t.interpolateInferno=H_,t.interpolateLab=function(t,n){var e=Je((t=Te(t)).l,(n=Te(n)).l),r=Je(t.a,n.a),i=Je(t.b,n.b),o=Je(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=r(n),t.b=i(n),t.opacity=o(n),t+""}},t.interpolateMagma=j_,t.interpolateNumber=cr,t.interpolateNumberArray=ir,t.interpolateObject=fr,t.interpolateOrRd=o_,t.interpolateOranges=D_,t.interpolatePRGn=Ov,t.interpolatePiYG=Iv,t.interpolatePlasma=X_,t.interpolatePuBu=f_,t.interpolatePuBuGn=u_,t.interpolatePuOr=Yv,t.interpolatePuRd=l_,t.interpolatePurples=N_,t.interpolateRainbow=function(t){(t<0||t>1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return O_.h=360*t-100,O_.s=1.5-1.5*n,O_.l=.8-.9*n,O_+""},t.interpolateRdBu=jv,t.interpolateRdGy=Xv,t.interpolateRdPu=d_,t.interpolateRdYlBu=Vv,t.interpolateRdYlGn=Wv,t.interpolateReds=P_,t.interpolateRgb=tr,t.interpolateRgbBasis=er,t.interpolateRgbBasisClosed=rr,t.interpolateRound=pr,t.interpolateSinebow=function(t){var n;return t=(.5-t)*Math.PI,U_.r=255*(n=Math.sin(t))*n,U_.g=255*(n=Math.sin(t+I_))*n,U_.b=255*(n=Math.sin(t+B_))*n,U_+""},t.interpolateSpectral=Kv,t.interpolateString=hr,t.interpolateTransformCss=mr,t.interpolateTransformSvg=xr,t.interpolateTurbo=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"},t.interpolateViridis=L_,t.interpolateWarm=R_,t.interpolateYlGn=v_,t.interpolateYlGnBu=g_,t.interpolateYlOrBr=b_,t.interpolateYlOrRd=x_,t.interpolateZoom=Mr,t.interrupt=oi,t.intersection=function(t,...n){t=new Set(t),n=n.map(G);t:for(const e of t)for(const r of n)if(!r.has(e)){t.delete(e);continue t}return t},t.interval=function(t,n,e){var r=new Gr,i=n;return null==n?(r.restart(t,n,e),r):(r._restart=r.restart,r.restart=function(t,n,e){n=+n,e=null==e?Hr():+e,r._restart((function o(a){a+=i,r._restart(o,i+=n,e),t(a)}),n,e)},r.restart(t,n,e),r)},t.isoFormat=av,t.isoParse=uv,t.json=function(t,n){return fetch(t,n).then(Mu)},t.lab=Te,t.lch=function(t,n,e,r){return 1===arguments.length?Pe(t):new De(e,n,t,null==r?1:r)},t.least=function(t,e=n){let r,i=!1;if(1===e.length){let o;for(const a of t){const t=e(a);(i?n(t,o)<0:0===n(t,t))&&(r=a,o=t,i=!0)}}else for(const n of t)(i?e(n,r)<0:0===e(n,n))&&(r=n,i=!0);return r},t.leastIndex=Y,t.line=bb,t.lineRadial=Eb,t.linkHorizontal=function(){return zb(Db)},t.linkRadial=function(){var t=zb(Rb);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.linkVertical=function(){return zb(qb)},t.local=Tn,t.map=function(t,n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");if("function"!=typeof n)throw new TypeError("mapper is not a function");return Array.from(t,(e,r)=>n(e,r,t))},t.matcher=mt,t.max=C,t.maxIndex=F,t.mean=function(t,n){let e=0,r=0;if(void 0===n)for(let n of t)null!=n&&(n=+n)>=n&&(++e,r+=n);else{let i=-1;for(let o of t)null!=(o=n(o,++i,t))&&(o=+o)>=o&&(++e,r+=o)}if(e)return r/e},t.median=function(t,n){return q(t,.5,n)},t.merge=O,t.min=P,t.minIndex=U,t.namespace=lt,t.namespaces=st,t.nice=E,t.now=Hr,t.pack=function(){var t=null,n=1,e=1,r=ed;function i(i){return i.x=n/2,i.y=e/2,t?i.eachBefore(od(t)).eachAfter(ad(r,.5)).eachBefore(ud(1)):i.eachBefore(od(id)).eachAfter(ad(ed,1)).eachAfter(ad(r,i.r/Math.min(n,e))).eachBefore(ud(Math.min(n,e)/(2*i.r))),i}return i.radius=function(n){return arguments.length?(t=td(n),i):t},i.size=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:rd(+t),i):r},i},t.packEnclose=Yh,t.packSiblings=function(t){return Jh(t),t},t.pairs=function(t,n=I){const e=[];let r,i=!1;for(const o of t)i&&e.push(n(r,o)),r=o,i=!0;return e},t.partition=function(){var t=1,n=1,e=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=e,i.x1=t,i.y1=n/o,i.eachBefore(function(t,n){return function(r){r.children&&fd(r,r.x0,t*(r.depth+1)/n,r.x1,t*(r.depth+2)/n);var i=r.x0,o=r.y0,a=r.x1-e,u=r.y1-e;a<i&&(i=a=(i+a)/2),u<o&&(o=u=(o+u)/2),r.x0=i,r.y0=o,r.x1=a,r.y1=u}}(n,o)),r&&i.eachBefore(cd),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(t){return arguments.length?(e=+t,i):e},i},t.path=Jo,t.permute=function(t,n){return Array.from(n,n=>t[n])},t.pie=function(){var t=wb,n=xb,e=null,r=G_(0),i=G_(rb),o=G_(0);function a(a){var u,c,f,s,l,h=(a=pb(a)).length,d=0,p=new Array(h),g=new Array(h),y=+r.apply(this,arguments),v=Math.min(rb,Math.max(-rb,i.apply(this,arguments)-y)),_=Math.min(Math.abs(v)/h,o.apply(this,arguments)),b=_*(v<0?-1:1);for(u=0;u<h;++u)(l=g[p[u]=u]=+t(a[u],u,a))>0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(g[t],g[e])})):null!=e&&p.sort((function(t,n){return e(a[t],a[n])})),u=0,f=d?(v-h*b)/d:0;u<h;++u,y=s)c=p[u],s=y+((l=g[c])>0?l*f:0)+b,g[c]={data:a[c],index:u,value:l,startAngle:y,endAngle:s,padAngle:_};return g}return a.value=function(n){return arguments.length?(t="function"==typeof n?n:G_(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:G_(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:G_(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:G_(+t),a):o},a},t.piecewise=Dr,t.pointRadial=Nb,t.pointer=kn,t.pointers=function(t,n){return t.target&&(t=En(t),void 0===n&&(n=t.currentTarget),t=t.touches||[t]),Array.from(t,t=>kn(t,n))},t.polygonArea=function(t){for(var n,e=-1,r=t.length,i=t[r-1],o=0;++e<r;)n=i,i=t[e],o+=n[1]*i[0]-n[0]*i[1];return o/2},t.polygonCentroid=function(t){for(var n,e,r=-1,i=t.length,o=0,a=0,u=t[i-1],c=0;++r<i;)n=u,u=t[r],c+=e=n[0]*u[1]-u[0]*n[1],o+=(n[0]+u[0])*e,a+=(n[1]+u[1])*e;return[o/(c*=3),a/c]},t.polygonContains=function(t,n){for(var e,r,i=t.length,o=t[i-1],a=n[0],u=n[1],c=o[0],f=o[1],s=!1,l=0;l<i;++l)e=(o=t[l])[0],(r=o[1])>u!=f>u&&a<(c-e)*(u-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},t.polygonHull=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n<e;++n)r[n]=[+t[n][0],+t[n][1],n];for(r.sort(Sd),n=0;n<e;++n)i[n]=[r[n][0],-r[n][1]];var o=Ed(r),a=Ed(i),u=a[0]===o[0],c=a[a.length-1]===o[o.length-1],f=[];for(n=o.length-1;n>=0;--n)f.push(t[r[o[n]][2]]);for(n=+u;n<a.length-c;++n)f.push(t[r[a[n]][2]]);return f},t.polygonLength=function(t){for(var n,e,r=-1,i=t.length,o=t[i-1],a=o[0],u=o[1],c=0;++r<i;)n=a,e=u,n-=a=(o=t[r])[0],e-=u=o[1],c+=Math.hypot(n,e);return c},t.precisionFixed=ac,t.precisionPrefix=uc,t.precisionRound=cc,t.quadtree=zu,t.quantile=q,t.quantileSorted=R,t.quantize=function(t,n){for(var e=new Array(n),r=0;r<n;++r)e[r]=t(r/(n-1));return e},t.quickselect=z,t.radialArea=kb,t.radialLine=Eb,t.randomBates=qd,t.randomBernoulli=Od,t.randomBeta=Bd,t.randomBinomial=Yd,t.randomCauchy=jd,t.randomExponential=Rd,t.randomGamma=Id,t.randomGeometric=Ud,t.randomInt=Cd,t.randomIrwinHall=Dd,t.randomLcg=function(t=Math.random()){let n=0|(0<=t&&t<1?t/Gd:Math.abs(t));return()=>(n=1664525*n+1013904223|0,Gd*(n>>>0))},t.randomLogNormal=zd,t.randomLogistic=Hd,t.randomNormal=Pd,t.randomPareto=Fd,t.randomPoisson=Xd,t.randomUniform=Nd,t.randomWeibull=Ld,t.range=B,t.reduce=function(t,n,e){if("function"!=typeof n)throw new TypeError("reducer is not a function");const r=t[Symbol.iterator]();let i,o,a=-1;if(arguments.length<3){if(({done:i,value:e}=r.next()),i)return;++a}for(;({done:i,value:o}=r.next()),!i;)e=n(e,o,++a,t);return e},t.reverse=function(t){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()},t.rgb=ue,t.ribbon=function(){return fa()},t.ribbonArrow=function(){return fa(ca)},t.rollup=function(t,n,...e){return _(t,y,n,e)},t.rollups=function(t,n,...e){return _(t,Array.from,n,e)},t.scaleBand=Kd,t.scaleDiverging=function t(){var n=fp(mv()(np));return n.copy=function(){return _v(n,t())},$d.apply(n,arguments)},t.scaleDivergingLog=function t(){var n=vp(mv()).domain([.1,1,10]);return n.copy=function(){return _v(n,t()).base(n.base())},$d.apply(n,arguments)},t.scaleDivergingPow=xv,t.scaleDivergingSqrt=function(){return xv.apply(null,arguments).exponent(.5)},t.scaleDivergingSymlog=function t(){var n=mp(mv());return n.copy=function(){return _v(n,t()).constant(n.constant())},$d.apply(n,arguments)},t.scaleIdentity=function t(n){var e;function r(t){return isNaN(t=+t)?e:t}return r.invert=r,r.domain=r.range=function(t){return arguments.length?(n=Array.from(t,Jd),r):n.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return t(n).unknown(e)},n=arguments.length?Array.from(n,Jd):[0,1],fp(r)},t.scaleImplicit=Wd,t.scaleLinear=function t(){var n=up();return n.copy=function(){return op(n,t())},Vd.apply(n,arguments),fp(n)},t.scaleLog=function t(){var n=vp(ap()).domain([1,10]);return n.copy=function(){return op(n,t()).base(n.base())},Vd.apply(n,arguments),n},t.scaleOrdinal=Zd,t.scalePoint=function(){return Qd(Kd.apply(null,arguments).paddingInner(1))},t.scalePow=Tp,t.scaleQuantile=function t(){var e,r=[],i=[],a=[];function u(){var t=0,n=Math.max(1,i.length);for(a=new Array(n-1);++t<n;)a[t-1]=R(r,t/n);return c}function c(t){return isNaN(t=+t)?e:i[o(a,t)]}return c.invertExtent=function(t){var n=i.indexOf(t);return n<0?[NaN,NaN]:[n>0?a[n-1]:r[0],n<a.length?a[n]:r[r.length-1]]},c.domain=function(t){if(!arguments.length)return r.slice();r=[];for(let n of t)null==n||isNaN(n=+n)||r.push(n);return r.sort(n),u()},c.range=function(t){return arguments.length?(i=Array.from(t),u()):i.slice()},c.unknown=function(t){return arguments.length?(e=t,c):e},c.quantiles=function(){return a.slice()},c.copy=function(){return t().domain(r).range(i).unknown(e)},Vd.apply(c,arguments)},t.scaleQuantize=function t(){var n,e=0,r=1,i=1,a=[.5],u=[0,1];function c(t){return t<=t?u[o(a,t,0,i)]:n}function f(){var t=-1;for(a=new Array(i);++t<i;)a[t]=((t+1)*r-(t-i)*e)/(i+1);return c}return c.domain=function(t){return arguments.length?([e,r]=t,e=+e,r=+r,f()):[e,r]},c.range=function(t){return arguments.length?(i=(u=Array.from(t)).length-1,f()):u.slice()},c.invertExtent=function(t){var n=u.indexOf(t);return n<0?[NaN,NaN]:n<1?[e,a[0]]:n>=i?[a[i-1],r]:[a[n-1],a[n]]},c.unknown=function(t){return arguments.length?(n=t,c):c},c.thresholds=function(){return a.slice()},c.copy=function(){return t().domain([e,r]).range(u).unknown(n)},Vd.apply(fp(c),arguments)},t.scaleRadial=function t(){var n,e=up(),r=[0,1],i=!1;function o(t){var r=Ep(e(t));return isNaN(r)?n:i?Math.round(r):r}return o.invert=function(t){return e.invert(Sp(t))},o.domain=function(t){return arguments.length?(e.domain(t),o):e.domain()},o.range=function(t){return arguments.length?(e.range((r=Array.from(t,Jd)).map(Sp)),o):r.slice()},o.rangeRound=function(t){return o.range(t).round(!0)},o.round=function(t){return arguments.length?(i=!!t,o):i},o.clamp=function(t){return arguments.length?(e.clamp(t),o):e.clamp()},o.unknown=function(t){return arguments.length?(n=t,o):n},o.copy=function(){return t(e.domain(),r).round(i).clamp(e.clamp()).unknown(n)},Vd.apply(o,arguments),fp(o)},t.scaleSequential=function t(){var n=fp(vv()(np));return n.copy=function(){return _v(n,t())},$d.apply(n,arguments)},t.scaleSequentialLog=function t(){var n=vp(vv()).domain([1,10]);return n.copy=function(){return _v(n,t()).base(n.base())},$d.apply(n,arguments)},t.scaleSequentialPow=bv,t.scaleSequentialQuantile=function t(){var e=[],r=np;function i(t){if(!isNaN(t=+t))return r((o(e,t,1)-1)/(e.length-1))}return i.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let n of t)null==n||isNaN(n=+n)||e.push(n);return e.sort(n),i},i.interpolator=function(t){return arguments.length?(r=t,i):r},i.range=function(){return e.map((t,n)=>r(n/(e.length-1)))},i.quantiles=function(t){return Array.from({length:t+1},(n,r)=>q(e,r/t))},i.copy=function(){return t(r).domain(e)},$d.apply(i,arguments)},t.scaleSequentialSqrt=function(){return bv.apply(null,arguments).exponent(.5)},t.scaleSequentialSymlog=function t(){var n=mp(vv());return n.copy=function(){return _v(n,t()).constant(n.constant())},$d.apply(n,arguments)},t.scaleSqrt=function(){return Tp.apply(null,arguments).exponent(.5)},t.scaleSymlog=function t(){var n=mp(ap());return n.copy=function(){return op(n,t()).constant(n.constant())},Vd.apply(n,arguments)},t.scaleThreshold=function t(){var n,e=[.5],r=[0,1],i=1;function a(t){return t<=t?r[o(e,t,0,i)]:n}return a.domain=function(t){return arguments.length?(e=Array.from(t),i=Math.min(e.length,r.length-1),a):e.slice()},a.range=function(t){return arguments.length?(r=Array.from(t),i=Math.min(e.length,r.length-1),a):r.slice()},a.invertExtent=function(t){var n=r.indexOf(t);return[e[n-1],e[n]]},a.unknown=function(t){return arguments.length?(n=t,a):n},a.copy=function(){return t().domain(e).range(r).unknown(n)},Vd.apply(a,arguments)},t.scaleTime=function(){return Vd.apply(yv(fg,ug,Vp,Hp,Lp,Bp,Up,Pp,t.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},t.scaleUtc=function(){return Vd.apply(yv(qg,zg,_g,gg,dg,lg,Up,Pp,t.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)},t.scan=function(t,n){const e=Y(t,n);return e<0?void 0:e},t.schemeAccent=Av,t.schemeBlues=w_,t.schemeBrBG=qv,t.schemeBuGn=Qv,t.schemeBuPu=t_,t.schemeCategory10=Mv,t.schemeDark2=Tv,t.schemeGnBu=e_,t.schemeGreens=A_,t.schemeGreys=S_,t.schemeOrRd=i_,t.schemeOranges=z_,t.schemePRGn=Fv,t.schemePaired=Sv,t.schemePastel1=Ev,t.schemePastel2=kv,t.schemePiYG=Uv,t.schemePuBu=c_,t.schemePuBuGn=a_,t.schemePuOr=Bv,t.schemePuRd=s_,t.schemePurples=k_,t.schemeRdBu=Lv,t.schemeRdGy=Hv,t.schemeRdPu=h_,t.schemeRdYlBu=Gv,t.schemeRdYlGn=$v,t.schemeReds=C_,t.schemeSet1=Nv,t.schemeSet2=Cv,t.schemeSet3=Pv,t.schemeSpectral=Zv,t.schemeTableau10=zv,t.schemeYlGn=y_,t.schemeYlGnBu=p_,t.schemeYlOrBr=__,t.schemeYlOrRd=m_,t.select=Mn,t.selectAll=function(t){return"string"==typeof t?new xn([document.querySelectorAll(t)],[document.documentElement]):new xn([null==t?[]:vt(t)],mn)},t.selection=wn,t.selector=yt,t.selectorAll=bt,t.shuffle=L,t.shuffler=j,t.some=function(t,n){if("function"!=typeof n)throw new TypeError("test is not a function");let e=-1;for(const r of t)if(n(r,++e,t))return!0;return!1},t.sort=function(t,e=n){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).sort(e)},t.stack=function(){var t=G_([]),n=Dm,e=zm,r=qm;function i(i){var o,a,u=Array.from(t.apply(this,arguments),Rm),c=u.length,f=-1;for(const t of i)for(o=0,++f;o<c;++o)(u[o][f]=[0,+r(t,u[o].key,f,i)]).data=t;for(o=0,a=pb(n(u));o<c;++o)u[a[o]].index=o;return e(u,a),u}return i.keys=function(n){return arguments.length?(t="function"==typeof n?n:G_(Array.from(n)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:G_(+t),i):r},i.order=function(t){return arguments.length?(n=null==t?Dm:"function"==typeof t?t:G_(Array.from(t)),i):n},i.offset=function(t){return arguments.length?(e=null==t?zm:t,i):e},i},t.stackOffsetDiverging=function(t,n){if((u=t.length)>0)for(var e,r,i,o,a,u,c=0,f=t[n[0]].length;c<f;++c)for(o=a=0,e=0;e<u;++e)(i=(r=t[n[e]][c])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)},t.stackOffsetExpand=function(t,n){if((r=t.length)>0){for(var e,r,i,o=0,a=t[0].length;o<a;++o){for(i=e=0;e<r;++e)i+=t[e][o][1]||0;if(i)for(e=0;e<r;++e)t[e][o][1]/=i}zm(t,n)}},t.stackOffsetNone=zm,t.stackOffsetSilhouette=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r<o;++r){for(var a=0,u=0;a<e;++a)u+=t[a][r][1]||0;i[r][1]+=i[r][0]=-u/2}zm(t,n)}},t.stackOffsetWiggle=function(t,n){if((i=t.length)>0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,a=1;a<r;++a){for(var u=0,c=0,f=0;u<i;++u){for(var s=t[n[u]],l=s[a][1]||0,h=(l-(s[a-1][1]||0))/2,d=0;d<u;++d){var p=t[n[d]];h+=(p[a][1]||0)-(p[a-1][1]||0)}c+=l,f+=h*l}e[a-1][1]+=e[a-1][0]=o,c&&(o-=f/c)}e[a-1][1]+=e[a-1][0]=o,zm(t,n)}},t.stackOrderAppearance=Fm,t.stackOrderAscending=Um,t.stackOrderDescending=function(t){return Um(t).reverse()},t.stackOrderInsideOut=function(t){var n,e,r=t.length,i=t.map(Im),o=Fm(t),a=0,u=0,c=[],f=[];for(n=0;n<r;++n)e=o[n],a<u?(a+=i[e],c.push(e)):(u+=i[e],f.push(e));return f.reverse().concat(c)},t.stackOrderNone=Dm,t.stackOrderReverse=function(t){return Dm(t).reverse()},t.stratify=function(){var t=hd,n=dd;function e(e){var r,i,o,a,u,c,f,s=Array.from(e),l=s.length,h=new Map;for(i=0;i<l;++i)r=s[i],u=s[i]=new Bh(r),null!=(c=t(r,i,e))&&(c+="")&&(f=u.id=c,h.set(f,h.has(f)?ld:u)),null!=(c=n(r,i,e))&&(c+="")&&(u.parent=c);for(i=0;i<l;++i)if(c=(u=s[i]).parent){if(!(a=h.get(c)))throw new Error("missing: "+c);if(a===ld)throw new Error("ambiguous: "+c);a.children?a.children.push(u):a.children=[u],u.parent=a}else{if(o)throw new Error("multiple roots");o=u}if(!o)throw new Error("no root");if(o.parent=sd,o.eachBefore((function(t){t.depth=t.parent.depth+1,--l})).eachBefore(Ih),o.parent=null,l>0)throw new Error("cycle");return o}return e.id=function(n){return arguments.length?(t=nd(n),e):t},e.parentId=function(t){return arguments.length?(n=nd(t),e):n},e},t.style=jt,t.subset=function(t,n){return V(n,t)},t.sum=function(t,n){let e=0;if(void 0===n)for(let n of t)(n=+n)&&(e+=n);else{let r=-1;for(let i of t)(i=+n(i,++r,t))&&(e+=i)}return e},t.superset=V,t.svg=Eu,t.symbol=function(t,n){var e=null;function r(){var r;if(e||(e=r=Jo()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),r)return e=null,r+""||null}return t="function"==typeof t?t:G_(t||Fb),n="function"==typeof n?n:G_(void 0===n?64:+n),r.type=function(n){return arguments.length?(t="function"==typeof n?n:G_(n),r):t},r.size=function(t){return arguments.length?(n="function"==typeof t?t:G_(+t),r):n},r.context=function(t){return arguments.length?(e=null==t?null:t,r):e},r},t.symbolCircle=Fb,t.symbolCross=Ob,t.symbolDiamond=Bb,t.symbolSquare=Xb,t.symbolStar=Hb,t.symbolTriangle=Vb,t.symbolWye=Qb,t.symbols=Jb,t.text=bu,t.thresholdFreedmanDiaconis=function(t,n,e){return Math.ceil((e-n)/(2*(q(t,.75)-q(t,.25))*Math.pow(c(t),-1/3)))},t.thresholdScott=function(t,n,e){return Math.ceil((e-n)/(3.5*d(t)*Math.pow(c(t),-1/3)))},t.thresholdSturges=k,t.tickFormat=cp,t.tickIncrement=T,t.tickStep=S,t.ticks=A,t.timeDay=Hp,t.timeDays=Xp,t.timeFormatDefaultLocale=iv,t.timeFormatLocale=Ig,t.timeFriday=Qp,t.timeFridays=og,t.timeHour=Lp,t.timeHours=jp,t.timeInterval=Cp,t.timeMillisecond=Pp,t.timeMilliseconds=zp,t.timeMinute=Bp,t.timeMinutes=Yp,t.timeMonday=$p,t.timeMondays=ng,t.timeMonth=ug,t.timeMonths=cg,t.timeSaturday=Jp,t.timeSaturdays=ag,t.timeSecond=Up,t.timeSeconds=Ip,t.timeSunday=Vp,t.timeSundays=tg,t.timeThursday=Kp,t.timeThursdays=ig,t.timeTuesday=Wp,t.timeTuesdays=eg,t.timeWednesday=Zp,t.timeWednesdays=rg,t.timeWeek=Vp,t.timeWeeks=tg,t.timeYear=fg,t.timeYears=sg,t.timeout=Qr,t.timer=Vr,t.timerFlush=$r,t.transition=qi,t.transpose=H,t.tree=function(){var t=pd,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,o,a=new bd(t,0),u=[a];n=u.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;i>=0;--i)u.push(e=n.children[i]=new bd(r[i],i)),e.parent=n;return(a.parent=new bd(null,0)).children=[a],a}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(a),r)i.eachBefore(u);else{var f=i,s=i,l=i;i.eachBefore((function(t){t.x<f.x&&(f=t),t.x>s.x&&(s=t),t.depth>l.depth&&(l=t)}));var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),g=e/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return i}function o(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)(n=i[o]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var o=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-o):n.z=o}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,o=n,a=n,u=e,c=o.parent.children[0],f=o.m,s=a.m,l=u.m,h=c.m;u=yd(u),o=gd(o),u&&o;)c=gd(c),(a=yd(a)).a=n,(i=u.z+l-o.z-f+t(u._,o._))>0&&(vd(_d(u,n,r),n,i),f+=i,s+=i),l+=u.m,f+=o.m,h+=c.m,s+=a.m;u&&!yd(a)&&(a.t=u,a.m+=l-s),o&&!gd(c)&&(c.t=o,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},t.treemap=function(){var t=Md,n=!1,e=1,r=1,i=[0],o=ed,a=ed,u=ed,c=ed,f=ed;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(cd),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l<r&&(r=l=(r+l)/2),h<s&&(s=h=(s+h)/2),n.x0=r,n.y0=s,n.x1=l,n.y1=h,n.children&&(e=i[n.depth+1]=o(n)/2,r+=f(n)-e,s+=a(n)-e,(l-=u(n)-e)<r&&(r=l=(r+l)/2),(h-=c(n)-e)<s&&(s=h=(s+h)/2),t(n,r,s,l,h))}return s.round=function(t){return arguments.length?(n=!!t,s):n},s.size=function(t){return arguments.length?(e=+t[0],r=+t[1],s):[e,r]},s.tile=function(n){return arguments.length?(t=nd(n),s):t},s.padding=function(t){return arguments.length?s.paddingInner(t).paddingOuter(t):s.paddingInner()},s.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:rd(+t),s):o},s.paddingOuter=function(t){return arguments.length?s.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):s.paddingTop()},s.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:rd(+t),s):a},s.paddingRight=function(t){return arguments.length?(u="function"==typeof t?t:rd(+t),s):u},s.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:rd(+t),s):c},s.paddingLeft=function(t){return arguments.length?(f="function"==typeof t?t:rd(+t),s):f},s},t.treemapBinary=function(t,n,e,r,i){var o,a,u=t.children,c=u.length,f=new Array(c+1);for(f[0]=a=o=0;o<c;++o)f[o+1]=a+=u[o].value;!function t(n,e,r,i,o,a,c){if(n>=e-1){var s=u[n];return s.x0=i,s.y0=o,s.x1=a,void(s.y1=c)}var l=f[n],h=r/2+l,d=n+1,p=e-1;for(;d<p;){var g=d+p>>>1;f[g]<h?d=g+1:p=g}h-f[d-1]<f[d]-h&&n+1<d&&--d;var y=f[d]-l,v=r-y;if(a-i>c-o){var _=r?(i*v+a*y)/r:a;t(n,d,y,i,o,_,c),t(d,e,v,_,o,a,c)}else{var b=r?(o*v+c*y)/r:c;t(n,d,y,i,o,a,b),t(d,e,v,i,b,a,c)}}(0,c,t.value,n,e,r,i)},t.treemapDice=fd,t.treemapResquarify=Ad,t.treemapSlice=md,t.treemapSliceDice=function(t,n,e,r,i){(1&t.depth?md:fd)(t,n,e,r,i)},t.treemapSquarify=Md,t.tsv=wu,t.tsvFormat=su,t.tsvFormatBody=lu,t.tsvFormatRow=du,t.tsvFormatRows=hu,t.tsvFormatValue=pu,t.tsvParse=cu,t.tsvParseRows=fu,t.union=function(...t){const n=new Set;for(const e of t)for(const t of e)n.add(t);return n},t.utcDay=gg,t.utcDays=yg,t.utcFriday=Mg,t.utcFridays=Cg,t.utcHour=dg,t.utcHours=pg,t.utcMillisecond=Pp,t.utcMilliseconds=zp,t.utcMinute=lg,t.utcMinutes=hg,t.utcMonday=bg,t.utcMondays=Sg,t.utcMonth=zg,t.utcMonths=Dg,t.utcSaturday=Ag,t.utcSaturdays=Pg,t.utcSecond=Up,t.utcSeconds=Ip,t.utcSunday=_g,t.utcSundays=Tg,t.utcThursday=wg,t.utcThursdays=Ng,t.utcTuesday=mg,t.utcTuesdays=Eg,t.utcWednesday=xg,t.utcWednesdays=kg,t.utcWeek=_g,t.utcWeeks=Tg,t.utcYear=qg,t.utcYears=Rg,t.variance=h,t.version="6.2.0",t.window=It,t.xml=Tu,t.zip=function(){return H(arguments)},t.zoom=function(){var t,n,e,r=Vm,i=$m,o=Qm,a=Zm,u=Km,c=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],s=250,l=Mr,h=it("start","zoom","end"),d=500,p=0,g=10;function y(t){t.property("__zoom",Wm).on("wheel.zoom",M).on("mousedown.zoom",A).on("dblclick.zoom",T).filter(u).on("touchstart.zoom",S).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",k).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(t,n){return(n=Math.max(c[0],Math.min(c[1],n)))===t.k?t:new Lm(n,t.x,t.y)}function _(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new Lm(t.k,r,i)}function b(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function m(t,n,e,r){t.on("start.zoom",(function(){x(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){x(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,o=arguments,a=x(t,o).event(r),u=i.apply(t,o),c=null==e?b(u):"function"==typeof e?e.apply(t,o):e,f=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),s=t.__zoom,h="function"==typeof n?n.apply(t,o):n,d=l(s.invert(c).concat(f/s.k),h.invert(c).concat(f/h.k));return function(t){if(1===t)t=h;else{var n=d(t),e=f/n[2];t=new Lm(e,c[0]-n[0]*e,c[1]-n[1]*e)}a.zoom(null,t)}}))}function x(t,n,e){return!e&&t.__zooming||new w(t,n)}function w(t,n){this.that=t,this.args=n,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,n),this.taps=0}function M(t,...n){if(r.apply(this,arguments)){var e=x(this,n).event(t),i=this.__zoom,u=Math.max(c[0],Math.min(c[1],i.k*Math.pow(2,a.apply(this,arguments)))),s=kn(t);if(e.wheel)e.mouse[0][0]===s[0]&&e.mouse[0][1]===s[1]||(e.mouse[1]=i.invert(e.mouse[0]=s)),clearTimeout(e.wheel);else{if(i.k===u)return;e.mouse=[s,i.invert(s)],oi(this),e.start()}Gm(t),e.wheel=setTimeout(l,150),e.zoom("mouse",o(_(v(i,u),e.mouse[0],e.mouse[1]),e.extent,f))}function l(){e.wheel=null,e.end()}}function A(t,...n){if(!e&&r.apply(this,arguments)){var i=x(this,n,!0).event(t),a=Mn(t.view).on("mousemove.zoom",h,!0).on("mouseup.zoom",d,!0),u=kn(t,c),c=t.currentTarget,s=t.clientX,l=t.clientY;Pn(t.view),Xm(t),i.mouse=[u,this.__zoom.invert(u)],oi(this),i.start()}function h(t){if(Gm(t),!i.moved){var n=t.clientX-s,e=t.clientY-l;i.moved=n*n+e*e>p}i.event(t).zoom("mouse",o(_(i.that.__zoom,i.mouse[0]=kn(t,c),i.mouse[1]),i.extent,f))}function d(t){a.on("mousemove.zoom mouseup.zoom",null),zn(t.view,i.moved),Gm(t),i.event(t).end()}}function T(t,...n){if(r.apply(this,arguments)){var e=this.__zoom,a=kn(t.changedTouches?t.changedTouches[0]:t,this),u=e.invert(a),c=e.k*(t.shiftKey?.5:2),l=o(_(v(e,c),a,u),i.apply(this,n),f);Gm(t),s>0?Mn(this).transition().duration(s).call(m,l,a,t):Mn(this).call(y.transform,l,a,t)}}function S(e,...i){if(r.apply(this,arguments)){var o,a,u,c,f=e.touches,s=f.length,l=x(this,i,e.changedTouches.length===s).event(e);for(Xm(e),a=0;a<s;++a)c=[c=kn(u=f[a],this),this.__zoom.invert(c),u.identifier],l.touch0?l.touch1||l.touch0[2]===c[2]||(l.touch1=c,l.taps=0):(l.touch0=c,o=!0,l.taps=1+!!t);t&&(t=clearTimeout(t)),o&&(l.taps<2&&(n=c[0],t=setTimeout((function(){t=null}),d)),oi(this),l.start())}}function E(t,...n){if(this.__zooming){var e,r,i,a,u=x(this,n).event(t),c=t.changedTouches,s=c.length;for(Gm(t),e=0;e<s;++e)i=kn(r=c[e],this),u.touch0&&u.touch0[2]===r.identifier?u.touch0[0]=i:u.touch1&&u.touch1[2]===r.identifier&&(u.touch1[0]=i);if(r=u.that.__zoom,u.touch1){var l=u.touch0[0],h=u.touch0[1],d=u.touch1[0],p=u.touch1[1],g=(g=d[0]-l[0])*g+(g=d[1]-l[1])*g,y=(y=p[0]-h[0])*y+(y=p[1]-h[1])*y;r=v(r,Math.sqrt(g/y)),i=[(l[0]+d[0])/2,(l[1]+d[1])/2],a=[(h[0]+p[0])/2,(h[1]+p[1])/2]}else{if(!u.touch0)return;i=u.touch0[0],a=u.touch0[1]}u.zoom("touch",o(_(r,i,a),u.extent,f))}}function k(t,...r){if(this.__zooming){var i,o,a=x(this,r).event(t),u=t.changedTouches,c=u.length;for(Xm(t),e&&clearTimeout(e),e=setTimeout((function(){e=null}),d),i=0;i<c;++i)o=u[i],a.touch0&&a.touch0[2]===o.identifier?delete a.touch0:a.touch1&&a.touch1[2]===o.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(o=kn(o,this),Math.hypot(n[0]-o[0],n[1]-o[1])<g)){var f=Mn(this).on("dblclick.zoom");f&&f.apply(this,arguments)}}}return y.transform=function(t,n,e,r){var i=t.selection?t.selection():t;i.property("__zoom",Wm),t!==i?m(t,n,e,r):i.interrupt().each((function(){x(this,arguments).event(r).start().zoom(null,"function"==typeof n?n.apply(this,arguments):n).end()}))},y.scaleBy=function(t,n,e,r){y.scaleTo(t,(function(){var t=this.__zoom.k,e="function"==typeof n?n.apply(this,arguments):n;return t*e}),e,r)},y.scaleTo=function(t,n,e,r){y.transform(t,(function(){var t=i.apply(this,arguments),r=this.__zoom,a=null==e?b(t):"function"==typeof e?e.apply(this,arguments):e,u=r.invert(a),c="function"==typeof n?n.apply(this,arguments):n;return o(_(v(r,c),a,u),t,f)}),e,r)},y.translateBy=function(t,n,e,r){y.transform(t,(function(){return o(this.__zoom.translate("function"==typeof n?n.apply(this,arguments):n,"function"==typeof e?e.apply(this,arguments):e),i.apply(this,arguments),f)}),null,r)},y.translateTo=function(t,n,e,r,a){y.transform(t,(function(){var t=i.apply(this,arguments),a=this.__zoom,u=null==r?b(t):"function"==typeof r?r.apply(this,arguments):r;return o(jm.translate(u[0],u[1]).scale(a.k).translate("function"==typeof n?-n.apply(this,arguments):-n,"function"==typeof e?-e.apply(this,arguments):-e),t,f)}),r,a)},w.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,n){return this.mouse&&"mouse"!==t&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var n=Mn(this.that).datum();h.call(t,this.that,new Ym(t,{sourceEvent:this.sourceEvent,target:y,type:t,transform:this.that.__zoom,dispatch:h}),n)}},y.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:Bm(+t),y):a},y.filter=function(t){return arguments.length?(r="function"==typeof t?t:Bm(!!t),y):r},y.touchable=function(t){return arguments.length?(u="function"==typeof t?t:Bm(!!t),y):u},y.extent=function(t){return arguments.length?(i="function"==typeof t?t:Bm([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),y):i},y.scaleExtent=function(t){return arguments.length?(c[0]=+t[0],c[1]=+t[1],y):[c[0],c[1]]},y.translateExtent=function(t){return arguments.length?(f[0][0]=+t[0][0],f[1][0]=+t[1][0],f[0][1]=+t[0][1],f[1][1]=+t[1][1],y):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},y.constrain=function(t){return arguments.length?(o=t,y):o},y.duration=function(t){return arguments.length?(s=+t,y):s},y.interpolate=function(t){return arguments.length?(l=t,y):l},y.on=function(){var t=h.on.apply(h,arguments);return t===h?y:t},y.clickDistance=function(t){return arguments.length?(p=(t=+t)*t,y):Math.sqrt(p)},y.tapDistance=function(t){return arguments.length?(g=+t,y):g},y},t.zoomIdentity=jm,t.zoomTransform=Hm,Object.defineProperty(t,"__esModule",{value:!0})})); diff --git a/node_modules/d3/dist/d3.node.js b/node_modules/d3/dist/d3.node.js deleted file mode 100644 index de9e01f9363036583cc00359788b72f0c92159cf..0000000000000000000000000000000000000000 --- a/node_modules/d3/dist/d3.node.js +++ /dev/null @@ -1,278 +0,0 @@ -'use strict'; - -Object.defineProperty(exports, '__esModule', { value: true }); - -var d3Array = require('d3-array'); -var d3Axis = require('d3-axis'); -var d3Brush = require('d3-brush'); -var d3Chord = require('d3-chord'); -var d3Color = require('d3-color'); -var d3Contour = require('d3-contour'); -var d3Delaunay = require('d3-delaunay'); -var d3Dispatch = require('d3-dispatch'); -var d3Drag = require('d3-drag'); -var d3Dsv = require('d3-dsv'); -var d3Ease = require('d3-ease'); -var d3Fetch = require('d3-fetch'); -var d3Force = require('d3-force'); -var d3Format = require('d3-format'); -var d3Geo = require('d3-geo'); -var d3Hierarchy = require('d3-hierarchy'); -var d3Interpolate = require('d3-interpolate'); -var d3Path = require('d3-path'); -var d3Polygon = require('d3-polygon'); -var d3Quadtree = require('d3-quadtree'); -var d3Random = require('d3-random'); -var d3Scale = require('d3-scale'); -var d3ScaleChromatic = require('d3-scale-chromatic'); -var d3Selection = require('d3-selection'); -var d3Shape = require('d3-shape'); -var d3Time = require('d3-time'); -var d3TimeFormat = require('d3-time-format'); -var d3Timer = require('d3-timer'); -var d3Transition = require('d3-transition'); -var d3Zoom = require('d3-zoom'); - -var version = "6.2.0"; - -Object.keys(d3Array).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Array[k]; - } - }); -}); -Object.keys(d3Axis).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Axis[k]; - } - }); -}); -Object.keys(d3Brush).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Brush[k]; - } - }); -}); -Object.keys(d3Chord).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Chord[k]; - } - }); -}); -Object.keys(d3Color).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Color[k]; - } - }); -}); -Object.keys(d3Contour).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Contour[k]; - } - }); -}); -Object.keys(d3Delaunay).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Delaunay[k]; - } - }); -}); -Object.keys(d3Dispatch).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Dispatch[k]; - } - }); -}); -Object.keys(d3Drag).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Drag[k]; - } - }); -}); -Object.keys(d3Dsv).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Dsv[k]; - } - }); -}); -Object.keys(d3Ease).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Ease[k]; - } - }); -}); -Object.keys(d3Fetch).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Fetch[k]; - } - }); -}); -Object.keys(d3Force).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Force[k]; - } - }); -}); -Object.keys(d3Format).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Format[k]; - } - }); -}); -Object.keys(d3Geo).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Geo[k]; - } - }); -}); -Object.keys(d3Hierarchy).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Hierarchy[k]; - } - }); -}); -Object.keys(d3Interpolate).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Interpolate[k]; - } - }); -}); -Object.keys(d3Path).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Path[k]; - } - }); -}); -Object.keys(d3Polygon).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Polygon[k]; - } - }); -}); -Object.keys(d3Quadtree).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Quadtree[k]; - } - }); -}); -Object.keys(d3Random).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Random[k]; - } - }); -}); -Object.keys(d3Scale).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Scale[k]; - } - }); -}); -Object.keys(d3ScaleChromatic).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3ScaleChromatic[k]; - } - }); -}); -Object.keys(d3Selection).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Selection[k]; - } - }); -}); -Object.keys(d3Shape).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Shape[k]; - } - }); -}); -Object.keys(d3Time).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Time[k]; - } - }); -}); -Object.keys(d3TimeFormat).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3TimeFormat[k]; - } - }); -}); -Object.keys(d3Timer).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Timer[k]; - } - }); -}); -Object.keys(d3Transition).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Transition[k]; - } - }); -}); -Object.keys(d3Zoom).forEach(function (k) { - if (k !== 'default') Object.defineProperty(exports, k, { - enumerable: true, - get: function () { - return d3Zoom[k]; - } - }); -}); -exports.version = version; diff --git a/node_modules/d3/dist/package.js b/node_modules/d3/dist/package.js deleted file mode 100644 index 44051047d9078952abd3099ddb9f1e8ded6fb608..0000000000000000000000000000000000000000 --- a/node_modules/d3/dist/package.js +++ /dev/null @@ -1,16 +0,0 @@ -export var name = "d3"; -export var version = "6.2.0"; -export var description = "Data-Driven Documents"; -export var keywords = ["dom","visualization","svg","animation","canvas"]; -export var homepage = "https://d3js.org"; -export var license = "BSD-3-Clause"; -export var author = {"name":"Mike Bostock","url":"https://bost.ocks.org/mike"}; -export var main = "dist/d3.node.js"; -export var unpkg = "dist/d3.min.js"; -export var jsdelivr = "dist/d3.min.js"; -export var module = "index.js"; -export var repository = {"type":"git","url":"https://github.com/d3/d3.git"}; -export var files = ["dist/**/*.js","index.js"]; -export var scripts = {"pretest":"rimraf dist && mkdir dist && json2module package.json > dist/package.js && rollup -c","test":"tape 'test/**/*-test.js'","prepublishOnly":"yarn test","postpublish":"git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3/dist/d3.js d3.v${npm_package_version%%.*}.js && cp ../d3/dist/d3.min.js d3.v${npm_package_version%%.*}.min.js && git add d3.v${npm_package_version%%.*}.js d3.v${npm_package_version%%.*}.min.js && git commit -m \"d3 ${npm_package_version}\" && git push && cd - && zip -j dist/d3.zip -- LICENSE README.md API.md CHANGES.md dist/d3.js dist/d3.min.js"}; -export var devDependencies = {"json2module":"0.0","rimraf":"3","rollup":"2","rollup-plugin-ascii":"0.0","rollup-plugin-node-resolve":"5","rollup-plugin-terser":"7","tape":"4","tape-await":"0.1"}; -export var dependencies = {"d3-array":"2","d3-axis":"2","d3-brush":"2","d3-chord":"2","d3-color":"2","d3-contour":"2","d3-delaunay":"5","d3-dispatch":"2","d3-drag":"2","d3-dsv":"2","d3-ease":"2","d3-fetch":"2","d3-force":"2","d3-format":"2","d3-geo":"2","d3-hierarchy":"2","d3-interpolate":"2","d3-path":"2","d3-polygon":"2","d3-quadtree":"2","d3-random":"2","d3-scale":"3","d3-scale-chromatic":"2","d3-selection":"2","d3-shape":"2","d3-time":"2","d3-time-format":"3","d3-timer":"2","d3-transition":"2","d3-zoom":"2"}; diff --git a/node_modules/d3/index.js b/node_modules/d3/index.js deleted file mode 100644 index 9dcf0bbdd4922208873cd1f70aec957146fefe7b..0000000000000000000000000000000000000000 --- a/node_modules/d3/index.js +++ /dev/null @@ -1,31 +0,0 @@ -export {version} from "./dist/package.js"; -export * from "d3-array"; -export * from "d3-axis"; -export * from "d3-brush"; -export * from "d3-chord"; -export * from "d3-color"; -export * from "d3-contour"; -export * from "d3-delaunay"; -export * from "d3-dispatch"; -export * from "d3-drag"; -export * from "d3-dsv"; -export * from "d3-ease"; -export * from "d3-fetch"; -export * from "d3-force"; -export * from "d3-format"; -export * from "d3-geo"; -export * from "d3-hierarchy"; -export * from "d3-interpolate"; -export * from "d3-path"; -export * from "d3-polygon"; -export * from "d3-quadtree"; -export * from "d3-random"; -export * from "d3-scale"; -export * from "d3-scale-chromatic"; -export * from "d3-selection"; -export * from "d3-shape"; -export * from "d3-time"; -export * from "d3-time-format"; -export * from "d3-timer"; -export * from "d3-transition"; -export * from "d3-zoom"; diff --git a/node_modules/d3/package.json b/node_modules/d3/package.json deleted file mode 100644 index 4de412d8064ee90fb3b0714dd930d9da139eaacc..0000000000000000000000000000000000000000 --- a/node_modules/d3/package.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "_from": "d3", - "_id": "d3@6.2.0", - "_inBundle": false, - "_integrity": "sha512-aH+kx55J8vRBh4K4k9GN4EbNO3QnZsXy4XBfrnr4fL2gQuszUAPQU3fV2oObO2iSpreRH/bG/wfvO+hDu2+e9w==", - "_location": "/d3", - "_phantomChildren": {}, - "_requested": { - "type": "tag", - "registry": true, - "raw": "d3", - "name": "d3", - "escapedName": "d3", - "rawSpec": "", - "saveSpec": null, - "fetchSpec": "latest" - }, - "_requiredBy": [ - "#USER", - "/" - ], - "_resolved": "https://registry.npmjs.org/d3/-/d3-6.2.0.tgz", - "_shasum": "f19b0ecb16ca4ad2171ce8b37c63247e71c6f01d", - "_spec": "d3", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/AngularApp", - "author": { - "name": "Mike Bostock", - "url": "https://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/d3/d3/issues" - }, - "bundleDependencies": false, - "dependencies": { - "d3-array": "2", - "d3-axis": "2", - "d3-brush": "2", - "d3-chord": "2", - "d3-color": "2", - "d3-contour": "2", - "d3-delaunay": "5", - "d3-dispatch": "2", - "d3-drag": "2", - "d3-dsv": "2", - "d3-ease": "2", - "d3-fetch": "2", - "d3-force": "2", - "d3-format": "2", - "d3-geo": "2", - "d3-hierarchy": "2", - "d3-interpolate": "2", - "d3-path": "2", - "d3-polygon": "2", - "d3-quadtree": "2", - "d3-random": "2", - "d3-scale": "3", - "d3-scale-chromatic": "2", - "d3-selection": "2", - "d3-shape": "2", - "d3-time": "2", - "d3-time-format": "3", - "d3-timer": "2", - "d3-transition": "2", - "d3-zoom": "2" - }, - "deprecated": false, - "description": "Data-Driven Documents", - "devDependencies": { - "json2module": "0.0", - "rimraf": "3", - "rollup": "2", - "rollup-plugin-ascii": "0.0", - "rollup-plugin-node-resolve": "5", - "rollup-plugin-terser": "7", - "tape": "4", - "tape-await": "0.1" - }, - "files": [ - "dist/**/*.js", - "index.js" - ], - "homepage": "https://d3js.org", - "jsdelivr": "dist/d3.min.js", - "keywords": [ - "dom", - "visualization", - "svg", - "animation", - "canvas" - ], - "license": "BSD-3-Clause", - "main": "dist/d3.node.js", - "module": "index.js", - "name": "d3", - "repository": { - "type": "git", - "url": "git+https://github.com/d3/d3.git" - }, - "scripts": { - "postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3/dist/d3.js d3.v${npm_package_version%%.*}.js && cp ../d3/dist/d3.min.js d3.v${npm_package_version%%.*}.min.js && git add d3.v${npm_package_version%%.*}.js d3.v${npm_package_version%%.*}.min.js && git commit -m \"d3 ${npm_package_version}\" && git push && cd - && zip -j dist/d3.zip -- LICENSE README.md API.md CHANGES.md dist/d3.js dist/d3.min.js", - "prepublishOnly": "yarn test", - "pretest": "rimraf dist && mkdir dist && json2module package.json > dist/package.js && rollup -c", - "test": "tape 'test/**/*-test.js'" - }, - "unpkg": "dist/d3.min.js", - "version": "6.2.0" -} diff --git a/node_modules/delaunator/LICENSE b/node_modules/delaunator/LICENSE deleted file mode 100644 index 6f4f868bbc92108cca26dcb3ba22f46b568a2090..0000000000000000000000000000000000000000 --- a/node_modules/delaunator/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -ISC License - -Copyright (c) 2017, Mapbox - -Permission to use, copy, modify, and/or distribute this software for any purpose -with or without fee is hereby granted, provided that the above copyright notice -and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH -REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND -FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, -INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS -OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF -THIS SOFTWARE. diff --git a/node_modules/delaunator/README.md b/node_modules/delaunator/README.md deleted file mode 100644 index b97bff999f1f2bf9cf3599ecd7f4d3e67a7e97db..0000000000000000000000000000000000000000 --- a/node_modules/delaunator/README.md +++ /dev/null @@ -1,127 +0,0 @@ -# Delaunator [](https://travis-ci.org/mapbox/delaunator) [](https://github.com/mourner/projects) - -An incredibly fast JavaScript library for -[Delaunay triangulation](https://en.wikipedia.org/wiki/Delaunay_triangulation) of 2D points. - -- [Interactive Demo](https://mapbox.github.io/delaunator/demo.html) -- [Guide to data structures](https://mapbox.github.io/delaunator/) - -### Projects based on Delaunator - -- [d3-delaunay](https://github.com/d3/d3-delaunay) for Voronoi diagrams, search, traversal and rendering. -- [d3-geo-voronoi](https://github.com/Fil/d3-geo-voronoi) for Delaunay triangulations and Voronoi diagrams on a sphere (e.g. for geographic locations). - -### Ports to other languages - -- [delaunator-rs](https://github.com/mourner/delaunator-rs) (Rust) -- [fogleman/delaunay](https://github.com/fogleman/delaunay) (Go) -- [delaunator-cpp](https://github.com/delfrrr/delaunator-cpp) (C++) - -<img src="delaunator.png" alt="Delaunay triangulation example" width="600" /> - -## Example - -```js -const points = [[168, 180], [168, 178], [168, 179], [168, 181], [168, 183], ...]; - -const delaunay = Delaunator.from(points); -console.log(delaunay.triangles); -// [623, 636, 619, 636, 444, 619, ...] -``` - -## Install - -Install with NPM (`npm install delaunator`) or Yarn (`yarn add delaunator`), then: - -```js -// import as an ES module -import Delaunator from 'delaunator'; - -// or require in Node / Browserify -const Delaunator = require('delaunator'); -``` - -Or use a browser build directly: - -```html -<script src="https://unpkg.com/delaunator@4.0.0/delaunator.min.js"></script> <!-- minified build --> -<script src="https://unpkg.com/delaunator@4.0.0/delaunator.js"></script> <!-- dev build --> -``` - -## API Reference - -#### Delaunator.from(points[, getX, getY]) - -Constructs a delaunay triangulation object given an array of points (`[x, y]` by default). -`getX` and `getY` are optional functions of the form `(point) => value` for custom point formats. -Duplicate points are skipped. - -#### new Delaunator(coords) - -Constructs a delaunay triangulation object given an array of point coordinates of the form: -`[x0, y0, x1, y1, ...]` (use a typed array for best performance). - -#### delaunay.triangles - -A `Uint32Array` array of triangle vertex indices (each group of three numbers forms a triangle). -All triangles are directed counterclockwise. - -To get the coordinates of all triangles, use: - -```js -for (let i = 0; i < triangles.length; i += 3) { - coordinates.push([ - points[triangles[i]], - points[triangles[i + 1]], - points[triangles[i + 2]] - ]); -} -``` - -#### delaunay.halfedges - -A `Int32Array` array of triangle half-edge indices that allows you to traverse the triangulation. -`i`-th half-edge in the array corresponds to vertex `triangles[i]` the half-edge is coming from. -`halfedges[i]` is the index of a twin half-edge in an adjacent triangle -(or `-1` for outer half-edges on the convex hull). - -The flat array-based data structures might be counterintuitive, -but they're one of the key reasons this library is fast. - -#### delaunay.hull - -A `Uint32Array` array of indices that reference points on the convex hull of the input data, counter-clockwise. - -#### delaunay.coords - -An array of input coordinates in the form `[x0, y0, x1, y1, ....]`, -of the type provided in the constructor (or `Float64Array` if you used `Delaunator.from`). - -#### delaunay.update() - -Updates the triangulation if you modified `delaunay.coords` values in place, avoiding expensive memory allocations. -Useful for iterative relaxation algorithms such as [Lloyd's](https://en.wikipedia.org/wiki/Lloyd%27s_algorithm). - -## Performance - -Benchmark results against other Delaunay JS libraries -(`npm run bench` on Macbook Pro Retina 15" 2017, Node v10.10.0): - - | uniform 100k | gauss 100k | grid 100k | degen 100k | uniform 1 million | gauss 1 million | grid 1 million | degen 1 million -:-- | --: | --: | --: | --: | --: | --: | --: | --: -**delaunator** | 82ms | 61ms | 66ms | 25ms | 1.07s | 950ms | 830ms | 278ms -[faster‑delaunay](https://github.com/Bathlamos/delaunay-triangulation) | 473ms | 411ms | 272ms | 68ms | 4.27s | 4.62s | 4.3s | 810ms -[incremental‑delaunay](https://github.com/mikolalysenko/incremental-delaunay) | 547ms | 505ms | 172ms | 528ms | 5.9s | 6.08s | 2.11s | 6.09s -[d3‑voronoi](https://github.com/d3/d3-voronoi) | 972ms | 909ms | 358ms | 720ms | 15.04s | 13.86s | 5.55s | 11.13s -[delaunay‑fast](https://github.com/ironwallaby/delaunay) | 3.8s | 4s | 12.57s | timeout | 132s | 138s | 399s | timeout -[delaunay](https://github.com/darkskyapp/delaunay) | 4.85s | 5.73s | 15.05s | timeout | 156s | 178s | 326s | timeout -[delaunay‑triangulate](https://github.com/mikolalysenko/delaunay-triangulate) | 2.24s | 2.04s | OOM | 1.51s | OOM | OOM | OOM | OOM -[cdt2d](https://github.com/mikolalysenko/cdt2d) | 45s | 51s | 118s | 17s | timeout | timeout | timeout | timeout - -## Papers - -The algorithm is based on ideas from the following papers: - -- [A simple sweep-line Delaunay triangulation algorithm](http://www.academicpub.org/jao/paperInfo.aspx?paperid=15630), 2013, Liu Yonghe, Feng Jinming and Shao Yuehong -- [S-hull: a fast radial sweep-hull routine for Delaunay triangulation](http://www.s-hull.org/paper/s_hull.pdf), 2010, David Sinclair -- [A faster circle-sweep Delaunay triangulation algorithm](http://cglab.ca/~biniaz/papers/Sweep%20Circle.pdf), 2011, Ahmad Biniaz and Gholamhossein Dastghaibyfard diff --git a/node_modules/delaunator/delaunator.js b/node_modules/delaunator/delaunator.js deleted file mode 100644 index 2046537253840af15b515e58e8e22954662a672e..0000000000000000000000000000000000000000 --- a/node_modules/delaunator/delaunator.js +++ /dev/null @@ -1,512 +0,0 @@ -(function (global, factory) { - typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : - typeof define === 'function' && define.amd ? define(factory) : - (global = global || self, global.Delaunator = factory()); -}(this, function () { 'use strict'; - - var EPSILON = Math.pow(2, -52); - var EDGE_STACK = new Uint32Array(512); - - var Delaunator = function Delaunator(coords) { - var n = coords.length >> 1; - if (n > 0 && typeof coords[0] !== 'number') { throw new Error('Expected coords to contain numbers.'); } - - this.coords = coords; - - // arrays that will store the triangulation graph - var maxTriangles = Math.max(2 * n - 5, 0); - this._triangles = new Uint32Array(maxTriangles * 3); - this._halfedges = new Int32Array(maxTriangles * 3); - - // temporary arrays for tracking the edges of the advancing convex hull - this._hashSize = Math.ceil(Math.sqrt(n)); - this._hullPrev = new Uint32Array(n); // edge to prev edge - this._hullNext = new Uint32Array(n); // edge to next edge - this._hullTri = new Uint32Array(n); // edge to adjacent triangle - this._hullHash = new Int32Array(this._hashSize).fill(-1); // angular edge hash - - // temporary arrays for sorting points - this._ids = new Uint32Array(n); - this._dists = new Float64Array(n); - - this.update(); - }; - - Delaunator.from = function from (points, getX, getY) { - if ( getX === void 0 ) getX = defaultGetX; - if ( getY === void 0 ) getY = defaultGetY; - - var n = points.length; - var coords = new Float64Array(n * 2); - - for (var i = 0; i < n; i++) { - var p = points[i]; - coords[2 * i] = getX(p); - coords[2 * i + 1] = getY(p); - } - - return new Delaunator(coords); - }; - - Delaunator.prototype.update = function update () { - var ref = this; - var coords = ref.coords; - var hullPrev = ref._hullPrev; - var hullNext = ref._hullNext; - var hullTri = ref._hullTri; - var hullHash = ref._hullHash; - var n = coords.length >> 1; - - // populate an array of point indices; calculate input data bbox - var minX = Infinity; - var minY = Infinity; - var maxX = -Infinity; - var maxY = -Infinity; - - for (var i = 0; i < n; i++) { - var x = coords[2 * i]; - var y = coords[2 * i + 1]; - if (x < minX) { minX = x; } - if (y < minY) { minY = y; } - if (x > maxX) { maxX = x; } - if (y > maxY) { maxY = y; } - this._ids[i] = i; - } - var cx = (minX + maxX) / 2; - var cy = (minY + maxY) / 2; - - var minDist = Infinity; - var i0, i1, i2; - - // pick a seed point close to the center - for (var i$1 = 0; i$1 < n; i$1++) { - var d = dist(cx, cy, coords[2 * i$1], coords[2 * i$1 + 1]); - if (d < minDist) { - i0 = i$1; - minDist = d; - } - } - var i0x = coords[2 * i0]; - var i0y = coords[2 * i0 + 1]; - - minDist = Infinity; - - // find the point closest to the seed - for (var i$2 = 0; i$2 < n; i$2++) { - if (i$2 === i0) { continue; } - var d$1 = dist(i0x, i0y, coords[2 * i$2], coords[2 * i$2 + 1]); - if (d$1 < minDist && d$1 > 0) { - i1 = i$2; - minDist = d$1; - } - } - var i1x = coords[2 * i1]; - var i1y = coords[2 * i1 + 1]; - - var minRadius = Infinity; - - // find the third point which forms the smallest circumcircle with the first two - for (var i$3 = 0; i$3 < n; i$3++) { - if (i$3 === i0 || i$3 === i1) { continue; } - var r = circumradius(i0x, i0y, i1x, i1y, coords[2 * i$3], coords[2 * i$3 + 1]); - if (r < minRadius) { - i2 = i$3; - minRadius = r; - } - } - var i2x = coords[2 * i2]; - var i2y = coords[2 * i2 + 1]; - - if (minRadius === Infinity) { - // order collinear points by dx (or dy if all x are identical) - // and return the list as a hull - for (var i$4 = 0; i$4 < n; i$4++) { - this._dists[i$4] = (coords[2 * i$4] - coords[0]) || (coords[2 * i$4 + 1] - coords[1]); - } - quicksort(this._ids, this._dists, 0, n - 1); - var hull = new Uint32Array(n); - var j = 0; - for (var i$5 = 0, d0 = -Infinity; i$5 < n; i$5++) { - var id = this._ids[i$5]; - if (this._dists[id] > d0) { - hull[j++] = id; - d0 = this._dists[id]; - } - } - this.hull = hull.subarray(0, j); - this.triangles = new Uint32Array(0); - this.halfedges = new Uint32Array(0); - return; - } - - // swap the order of the seed points for counter-clockwise orientation - if (orient(i0x, i0y, i1x, i1y, i2x, i2y)) { - var i$6 = i1; - var x$1 = i1x; - var y$1 = i1y; - i1 = i2; - i1x = i2x; - i1y = i2y; - i2 = i$6; - i2x = x$1; - i2y = y$1; - } - - var center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y); - this._cx = center.x; - this._cy = center.y; - - for (var i$7 = 0; i$7 < n; i$7++) { - this._dists[i$7] = dist(coords[2 * i$7], coords[2 * i$7 + 1], center.x, center.y); - } - - // sort the points by distance from the seed triangle circumcenter - quicksort(this._ids, this._dists, 0, n - 1); - - // set up the seed triangle as the starting hull - this._hullStart = i0; - var hullSize = 3; - - hullNext[i0] = hullPrev[i2] = i1; - hullNext[i1] = hullPrev[i0] = i2; - hullNext[i2] = hullPrev[i1] = i0; - - hullTri[i0] = 0; - hullTri[i1] = 1; - hullTri[i2] = 2; - - hullHash.fill(-1); - hullHash[this._hashKey(i0x, i0y)] = i0; - hullHash[this._hashKey(i1x, i1y)] = i1; - hullHash[this._hashKey(i2x, i2y)] = i2; - - this.trianglesLen = 0; - this._addTriangle(i0, i1, i2, -1, -1, -1); - - for (var k = 0, xp = (void 0), yp = (void 0); k < this._ids.length; k++) { - var i$8 = this._ids[k]; - var x$2 = coords[2 * i$8]; - var y$2 = coords[2 * i$8 + 1]; - - // skip near-duplicate points - if (k > 0 && Math.abs(x$2 - xp) <= EPSILON && Math.abs(y$2 - yp) <= EPSILON) { continue; } - xp = x$2; - yp = y$2; - - // skip seed triangle points - if (i$8 === i0 || i$8 === i1 || i$8 === i2) { continue; } - - // find a visible edge on the convex hull using edge hash - var start = 0; - for (var j$1 = 0, key = this._hashKey(x$2, y$2); j$1 < this._hashSize; j$1++) { - start = hullHash[(key + j$1) % this._hashSize]; - if (start !== -1 && start !== hullNext[start]) { break; } - } - - start = hullPrev[start]; - var e = start, q = (void 0); - while (q = hullNext[e], !orient(x$2, y$2, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1])) { - e = q; - if (e === start) { - e = -1; - break; - } - } - if (e === -1) { continue; } // likely a near-duplicate point; skip it - - // add the first triangle from the point - var t = this._addTriangle(e, i$8, hullNext[e], -1, -1, hullTri[e]); - - // recursively flip triangles from the point until they satisfy the Delaunay condition - hullTri[i$8] = this._legalize(t + 2); - hullTri[e] = t; // keep track of boundary triangles on the hull - hullSize++; - - // walk forward through the hull, adding more triangles and flipping recursively - var n$1 = hullNext[e]; - while (q = hullNext[n$1], orient(x$2, y$2, coords[2 * n$1], coords[2 * n$1 + 1], coords[2 * q], coords[2 * q + 1])) { - t = this._addTriangle(n$1, i$8, q, hullTri[i$8], -1, hullTri[n$1]); - hullTri[i$8] = this._legalize(t + 2); - hullNext[n$1] = n$1; // mark as removed - hullSize--; - n$1 = q; - } - - // walk backward from the other side, adding more triangles and flipping - if (e === start) { - while (q = hullPrev[e], orient(x$2, y$2, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1])) { - t = this._addTriangle(q, i$8, e, -1, hullTri[e], hullTri[q]); - this._legalize(t + 2); - hullTri[q] = t; - hullNext[e] = e; // mark as removed - hullSize--; - e = q; - } - } - - // update the hull indices - this._hullStart = hullPrev[i$8] = e; - hullNext[e] = hullPrev[n$1] = i$8; - hullNext[i$8] = n$1; - - // save the two new edges in the hash table - hullHash[this._hashKey(x$2, y$2)] = i$8; - hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e; - } - - this.hull = new Uint32Array(hullSize); - for (var i$9 = 0, e$1 = this._hullStart; i$9 < hullSize; i$9++) { - this.hull[i$9] = e$1; - e$1 = hullNext[e$1]; - } - - // trim typed triangle mesh arrays - this.triangles = this._triangles.subarray(0, this.trianglesLen); - this.halfedges = this._halfedges.subarray(0, this.trianglesLen); - }; - - Delaunator.prototype._hashKey = function _hashKey (x, y) { - return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize; - }; - - Delaunator.prototype._legalize = function _legalize (a) { - var ref = this; - var triangles = ref._triangles; - var halfedges = ref._halfedges; - var coords = ref.coords; - - var i = 0; - var ar = 0; - - // recursion eliminated with a fixed-size stack - while (true) { - var b = halfedges[a]; - - /* if the pair of triangles doesn't satisfy the Delaunay condition - * (p1 is inside the circumcircle of [p0, pl, pr]), flip them, - * then do the same check/flip recursively for the new pair of triangles - * - * pl pl - * /||\ / \ - * al/ || \bl al/\a - * / || \ / \ - * / a||b \flip/___ar___\ - * p0\ || /p1 => p0\---bl---/p1 - * \ || / \ / - * ar\ || /br b\/br - * \||/ \ / - * pr pr - */ - var a0 = a - a % 3; - ar = a0 + (a + 2) % 3; - - if (b === -1) { // convex hull edge - if (i === 0) { break; } - a = EDGE_STACK[--i]; - continue; - } - - var b0 = b - b % 3; - var al = a0 + (a + 1) % 3; - var bl = b0 + (b + 2) % 3; - - var p0 = triangles[ar]; - var pr = triangles[a]; - var pl = triangles[al]; - var p1 = triangles[bl]; - - var illegal = inCircle( - coords[2 * p0], coords[2 * p0 + 1], - coords[2 * pr], coords[2 * pr + 1], - coords[2 * pl], coords[2 * pl + 1], - coords[2 * p1], coords[2 * p1 + 1]); - - if (illegal) { - triangles[a] = p1; - triangles[b] = p0; - - var hbl = halfedges[bl]; - - // edge swapped on the other side of the hull (rare); fix the halfedge reference - if (hbl === -1) { - var e = this._hullStart; - do { - if (this._hullTri[e] === bl) { - this._hullTri[e] = a; - break; - } - e = this._hullPrev[e]; - } while (e !== this._hullStart); - } - this._link(a, hbl); - this._link(b, halfedges[ar]); - this._link(ar, bl); - - var br = b0 + (b + 1) % 3; - - // don't worry about hitting the cap: it can only happen on extremely degenerate input - if (i < EDGE_STACK.length) { - EDGE_STACK[i++] = br; - } - } else { - if (i === 0) { break; } - a = EDGE_STACK[--i]; - } - } - - return ar; - }; - - Delaunator.prototype._link = function _link (a, b) { - this._halfedges[a] = b; - if (b !== -1) { this._halfedges[b] = a; } - }; - - // add a new triangle given vertex indices and adjacent half-edge ids - Delaunator.prototype._addTriangle = function _addTriangle (i0, i1, i2, a, b, c) { - var t = this.trianglesLen; - - this._triangles[t] = i0; - this._triangles[t + 1] = i1; - this._triangles[t + 2] = i2; - - this._link(t, a); - this._link(t + 1, b); - this._link(t + 2, c); - - this.trianglesLen += 3; - - return t; - }; - - // monotonically increases with real angle, but doesn't need expensive trigonometry - function pseudoAngle(dx, dy) { - var p = dx / (Math.abs(dx) + Math.abs(dy)); - return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1] - } - - function dist(ax, ay, bx, by) { - var dx = ax - bx; - var dy = ay - by; - return dx * dx + dy * dy; - } - - // return 2d orientation sign if we're confident in it through J. Shewchuk's error bound check - function orientIfSure(px, py, rx, ry, qx, qy) { - var l = (ry - py) * (qx - px); - var r = (rx - px) * (qy - py); - return Math.abs(l - r) >= 3.3306690738754716e-16 * Math.abs(l + r) ? l - r : 0; - } - - // a more robust orientation test that's stable in a given triangle (to fix robustness issues) - function orient(rx, ry, qx, qy, px, py) { - var sign = orientIfSure(px, py, rx, ry, qx, qy) || - orientIfSure(rx, ry, qx, qy, px, py) || - orientIfSure(qx, qy, px, py, rx, ry); - return sign < 0; - } - - function inCircle(ax, ay, bx, by, cx, cy, px, py) { - var dx = ax - px; - var dy = ay - py; - var ex = bx - px; - var ey = by - py; - var fx = cx - px; - var fy = cy - py; - - var ap = dx * dx + dy * dy; - var bp = ex * ex + ey * ey; - var cp = fx * fx + fy * fy; - - return dx * (ey * cp - bp * fy) - - dy * (ex * cp - bp * fx) + - ap * (ex * fy - ey * fx) < 0; - } - - function circumradius(ax, ay, bx, by, cx, cy) { - var dx = bx - ax; - var dy = by - ay; - var ex = cx - ax; - var ey = cy - ay; - - var bl = dx * dx + dy * dy; - var cl = ex * ex + ey * ey; - var d = 0.5 / (dx * ey - dy * ex); - - var x = (ey * bl - dy * cl) * d; - var y = (dx * cl - ex * bl) * d; - - return x * x + y * y; - } - - function circumcenter(ax, ay, bx, by, cx, cy) { - var dx = bx - ax; - var dy = by - ay; - var ex = cx - ax; - var ey = cy - ay; - - var bl = dx * dx + dy * dy; - var cl = ex * ex + ey * ey; - var d = 0.5 / (dx * ey - dy * ex); - - var x = ax + (ey * bl - dy * cl) * d; - var y = ay + (dx * cl - ex * bl) * d; - - return {x: x, y: y}; - } - - function quicksort(ids, dists, left, right) { - if (right - left <= 20) { - for (var i = left + 1; i <= right; i++) { - var temp = ids[i]; - var tempDist = dists[temp]; - var j = i - 1; - while (j >= left && dists[ids[j]] > tempDist) { ids[j + 1] = ids[j--]; } - ids[j + 1] = temp; - } - } else { - var median = (left + right) >> 1; - var i$1 = left + 1; - var j$1 = right; - swap(ids, median, i$1); - if (dists[ids[left]] > dists[ids[right]]) { swap(ids, left, right); } - if (dists[ids[i$1]] > dists[ids[right]]) { swap(ids, i$1, right); } - if (dists[ids[left]] > dists[ids[i$1]]) { swap(ids, left, i$1); } - - var temp$1 = ids[i$1]; - var tempDist$1 = dists[temp$1]; - while (true) { - do { i$1++; } while (dists[ids[i$1]] < tempDist$1); - do { j$1--; } while (dists[ids[j$1]] > tempDist$1); - if (j$1 < i$1) { break; } - swap(ids, i$1, j$1); - } - ids[left + 1] = ids[j$1]; - ids[j$1] = temp$1; - - if (right - i$1 + 1 >= j$1 - left) { - quicksort(ids, dists, i$1, right); - quicksort(ids, dists, left, j$1 - 1); - } else { - quicksort(ids, dists, left, j$1 - 1); - quicksort(ids, dists, i$1, right); - } - } - } - - function swap(arr, i, j) { - var tmp = arr[i]; - arr[i] = arr[j]; - arr[j] = tmp; - } - - function defaultGetX(p) { - return p[0]; - } - function defaultGetY(p) { - return p[1]; - } - - return Delaunator; - -})); diff --git a/node_modules/delaunator/delaunator.min.js b/node_modules/delaunator/delaunator.min.js deleted file mode 100644 index 9cb879987ba0bf170dfc5123ce3523e1f54a33c4..0000000000000000000000000000000000000000 --- a/node_modules/delaunator/delaunator.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(i,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(i=i||self).Delaunator=t()}(this,function(){"use strict";var i=Math.pow(2,-52),t=new Uint32Array(512),r=function(i){var t=i.length>>1;if(t>0&&"number"!=typeof i[0])throw new Error("Expected coords to contain numbers.");this.coords=i;var r=Math.max(2*t-5,0);this._triangles=new Uint32Array(3*r),this._halfedges=new Int32Array(3*r),this._hashSize=Math.ceil(Math.sqrt(t)),this._hullPrev=new Uint32Array(t),this._hullNext=new Uint32Array(t),this._hullTri=new Uint32Array(t),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(t),this._dists=new Float64Array(t),this.update()};function s(i,t,r,s){var h=i-r,a=t-s;return h*h+a*a}function h(i,t,r,s,h,a){var e=(s-t)*(h-i),n=(r-i)*(a-t);return Math.abs(e-n)>=33306690738754716e-32*Math.abs(e+n)?e-n:0}function a(i,t,r,s,a,e){return(h(a,e,i,t,r,s)||h(i,t,r,s,a,e)||h(r,s,a,e,i,t))<0}function e(i,t,r,s,h,a){var e=r-i,n=s-t,l=h-i,o=a-t,f=e*e+n*n,_=l*l+o*o,d=.5/(e*o-n*l),v=(o*f-n*_)*d,u=(e*_-l*f)*d;return v*v+u*u}function n(i,t,r,s){if(s-r<=20)for(var h=r+1;h<=s;h++){for(var a=i[h],e=t[a],o=h-1;o>=r&&t[i[o]]>e;)i[o+1]=i[o--];i[o+1]=a}else{var f=r+1,_=s;l(i,r+s>>1,f),t[i[r]]>t[i[s]]&&l(i,r,s),t[i[f]]>t[i[s]]&&l(i,f,s),t[i[r]]>t[i[f]]&&l(i,r,f);for(var d=i[f],v=t[d];;){do{f++}while(t[i[f]]<v);do{_--}while(t[i[_]]>v);if(_<f)break;l(i,f,_)}i[r+1]=i[_],i[_]=d,s-f+1>=_-r?(n(i,t,f,s),n(i,t,r,_-1)):(n(i,t,r,_-1),n(i,t,f,s))}}function l(i,t,r){var s=i[t];i[t]=i[r],i[r]=s}function o(i){return i[0]}function f(i){return i[1]}return r.from=function(i,t,s){void 0===t&&(t=o),void 0===s&&(s=f);for(var h=i.length,a=new Float64Array(2*h),e=0;e<h;e++){var n=i[e];a[2*e]=t(n),a[2*e+1]=s(n)}return new r(a)},r.prototype.update=function(){for(var t=this.coords,r=this._hullPrev,h=this._hullNext,l=this._hullTri,o=this._hullHash,f=t.length>>1,_=1/0,d=1/0,v=-1/0,u=-1/0,y=0;y<f;y++){var g=t[2*y],c=t[2*y+1];g<_&&(_=g),c<d&&(d=c),g>v&&(v=g),c>u&&(u=c),this._ids[y]=y}for(var w,p,b,A=(_+v)/2,k=(d+u)/2,x=1/0,M=0;M<f;M++){var S=s(A,k,t[2*M],t[2*M+1]);S<x&&(w=M,x=S)}var z=t[2*w],U=t[2*w+1];x=1/0;for(var T=0;T<f;T++)if(T!==w){var m=s(z,U,t[2*T],t[2*T+1]);m<x&&m>0&&(p=T,x=m)}for(var K=t[2*p],L=t[2*p+1],P=1/0,E=0;E<f;E++)if(E!==w&&E!==p){var F=e(z,U,K,L,t[2*E],t[2*E+1]);F<P&&(b=E,P=F)}var H=t[2*b],I=t[2*b+1];if(P===1/0){for(var N=0;N<f;N++)this._dists[N]=t[2*N]-t[0]||t[2*N+1]-t[1];n(this._ids,this._dists,0,f-1);for(var j=new Uint32Array(f),q=0,D=0,B=-1/0;D<f;D++){var C=this._ids[D];this._dists[C]>B&&(j[q++]=C,B=this._dists[C])}return this.hull=j.subarray(0,q),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(a(z,U,K,L,H,I)){var G=p,J=K,O=L;p=b,K=H,L=I,b=G,H=J,I=O}var Q=function(i,t,r,s,h,a){var e=r-i,n=s-t,l=h-i,o=a-t,f=e*e+n*n,_=l*l+o*o,d=.5/(e*o-n*l);return{x:i+(o*f-n*_)*d,y:t+(e*_-l*f)*d}}(z,U,K,L,H,I);this._cx=Q.x,this._cy=Q.y;for(var R=0;R<f;R++)this._dists[R]=s(t[2*R],t[2*R+1],Q.x,Q.y);n(this._ids,this._dists,0,f-1),this._hullStart=w;var V=3;h[w]=r[b]=p,h[p]=r[w]=b,h[b]=r[p]=w,l[w]=0,l[p]=1,l[b]=2,o.fill(-1),o[this._hashKey(z,U)]=w,o[this._hashKey(K,L)]=p,o[this._hashKey(H,I)]=b,this.trianglesLen=0,this._addTriangle(w,p,b,-1,-1,-1);for(var W=0,X=void 0,Y=void 0;W<this._ids.length;W++){var Z=this._ids[W],$=t[2*Z],ii=t[2*Z+1];if(!(W>0&&Math.abs($-X)<=i&&Math.abs(ii-Y)<=i)&&(X=$,Y=ii,Z!==w&&Z!==p&&Z!==b)){for(var ti=0,ri=0,si=this._hashKey($,ii);ri<this._hashSize&&(-1===(ti=o[(si+ri)%this._hashSize])||ti===h[ti]);ri++);for(var hi=ti=r[ti],ai=void 0;ai=h[hi],!a($,ii,t[2*hi],t[2*hi+1],t[2*ai],t[2*ai+1]);)if((hi=ai)===ti){hi=-1;break}if(-1!==hi){var ei=this._addTriangle(hi,Z,h[hi],-1,-1,l[hi]);l[Z]=this._legalize(ei+2),l[hi]=ei,V++;for(var ni=h[hi];ai=h[ni],a($,ii,t[2*ni],t[2*ni+1],t[2*ai],t[2*ai+1]);)ei=this._addTriangle(ni,Z,ai,l[Z],-1,l[ni]),l[Z]=this._legalize(ei+2),h[ni]=ni,V--,ni=ai;if(hi===ti)for(;a($,ii,t[2*(ai=r[hi])],t[2*ai+1],t[2*hi],t[2*hi+1]);)ei=this._addTriangle(ai,Z,hi,-1,l[hi],l[ai]),this._legalize(ei+2),l[ai]=ei,h[hi]=hi,V--,hi=ai;this._hullStart=r[Z]=hi,h[hi]=r[ni]=Z,h[Z]=ni,o[this._hashKey($,ii)]=Z,o[this._hashKey(t[2*hi],t[2*hi+1])]=hi}}}this.hull=new Uint32Array(V);for(var li=0,oi=this._hullStart;li<V;li++)this.hull[li]=oi,oi=h[oi];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)},r.prototype._hashKey=function(i,t){return Math.floor((r=i-this._cx,s=t-this._cy,h=r/(Math.abs(r)+Math.abs(s)),(s>0?3-h:1+h)/4*this._hashSize))%this._hashSize;var r,s,h},r.prototype._legalize=function(i){for(var r,s,h,a,e,n,l,o,f,_,d,v,u,y,g,c,w=this._triangles,p=this._halfedges,b=this.coords,A=0,k=0;;){var x=p[i],M=i-i%3;if(k=M+(i+2)%3,-1!==x){var S=x-x%3,z=M+(i+1)%3,U=S+(x+2)%3,T=w[k],m=w[i],K=w[z],L=w[U];if(r=b[2*T],s=b[2*T+1],h=b[2*m],a=b[2*m+1],e=b[2*K],n=b[2*K+1],l=b[2*L],o=b[2*L+1],f=void 0,_=void 0,d=void 0,v=void 0,u=void 0,y=void 0,void 0,g=void 0,c=void 0,(f=r-l)*((v=a-o)*(c=(u=e-l)*u+(y=n-o)*y)-(g=(d=h-l)*d+v*v)*y)-(_=s-o)*(d*c-g*u)+(f*f+_*_)*(d*y-v*u)<0){w[i]=L,w[x]=T;var P=p[U];if(-1===P){var E=this._hullStart;do{if(this._hullTri[E]===U){this._hullTri[E]=i;break}E=this._hullPrev[E]}while(E!==this._hullStart)}this._link(i,P),this._link(x,p[k]),this._link(k,U);var F=S+(x+1)%3;A<t.length&&(t[A++]=F)}else{if(0===A)break;i=t[--A]}}else{if(0===A)break;i=t[--A]}}return k},r.prototype._link=function(i,t){this._halfedges[i]=t,-1!==t&&(this._halfedges[t]=i)},r.prototype._addTriangle=function(i,t,r,s,h,a){var e=this.trianglesLen;return this._triangles[e]=i,this._triangles[e+1]=t,this._triangles[e+2]=r,this._link(e,s),this._link(e+1,h),this._link(e+2,a),this.trianglesLen+=3,e},r}); diff --git a/node_modules/delaunator/index.js b/node_modules/delaunator/index.js deleted file mode 100644 index 2a84659accc36c2f78026ea5e05d6f28c99edf9e..0000000000000000000000000000000000000000 --- a/node_modules/delaunator/index.js +++ /dev/null @@ -1,495 +0,0 @@ - -const EPSILON = Math.pow(2, -52); -const EDGE_STACK = new Uint32Array(512); - -export default class Delaunator { - - static from(points, getX = defaultGetX, getY = defaultGetY) { - const n = points.length; - const coords = new Float64Array(n * 2); - - for (let i = 0; i < n; i++) { - const p = points[i]; - coords[2 * i] = getX(p); - coords[2 * i + 1] = getY(p); - } - - return new Delaunator(coords); - } - - constructor(coords) { - const n = coords.length >> 1; - if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.'); - - this.coords = coords; - - // arrays that will store the triangulation graph - const maxTriangles = Math.max(2 * n - 5, 0); - this._triangles = new Uint32Array(maxTriangles * 3); - this._halfedges = new Int32Array(maxTriangles * 3); - - // temporary arrays for tracking the edges of the advancing convex hull - this._hashSize = Math.ceil(Math.sqrt(n)); - this._hullPrev = new Uint32Array(n); // edge to prev edge - this._hullNext = new Uint32Array(n); // edge to next edge - this._hullTri = new Uint32Array(n); // edge to adjacent triangle - this._hullHash = new Int32Array(this._hashSize).fill(-1); // angular edge hash - - // temporary arrays for sorting points - this._ids = new Uint32Array(n); - this._dists = new Float64Array(n); - - this.update(); - } - - update() { - const {coords, _hullPrev: hullPrev, _hullNext: hullNext, _hullTri: hullTri, _hullHash: hullHash} = this; - const n = coords.length >> 1; - - // populate an array of point indices; calculate input data bbox - let minX = Infinity; - let minY = Infinity; - let maxX = -Infinity; - let maxY = -Infinity; - - for (let i = 0; i < n; i++) { - const x = coords[2 * i]; - const y = coords[2 * i + 1]; - if (x < minX) minX = x; - if (y < minY) minY = y; - if (x > maxX) maxX = x; - if (y > maxY) maxY = y; - this._ids[i] = i; - } - const cx = (minX + maxX) / 2; - const cy = (minY + maxY) / 2; - - let minDist = Infinity; - let i0, i1, i2; - - // pick a seed point close to the center - for (let i = 0; i < n; i++) { - const d = dist(cx, cy, coords[2 * i], coords[2 * i + 1]); - if (d < minDist) { - i0 = i; - minDist = d; - } - } - const i0x = coords[2 * i0]; - const i0y = coords[2 * i0 + 1]; - - minDist = Infinity; - - // find the point closest to the seed - for (let i = 0; i < n; i++) { - if (i === i0) continue; - const d = dist(i0x, i0y, coords[2 * i], coords[2 * i + 1]); - if (d < minDist && d > 0) { - i1 = i; - minDist = d; - } - } - let i1x = coords[2 * i1]; - let i1y = coords[2 * i1 + 1]; - - let minRadius = Infinity; - - // find the third point which forms the smallest circumcircle with the first two - for (let i = 0; i < n; i++) { - if (i === i0 || i === i1) continue; - const r = circumradius(i0x, i0y, i1x, i1y, coords[2 * i], coords[2 * i + 1]); - if (r < minRadius) { - i2 = i; - minRadius = r; - } - } - let i2x = coords[2 * i2]; - let i2y = coords[2 * i2 + 1]; - - if (minRadius === Infinity) { - // order collinear points by dx (or dy if all x are identical) - // and return the list as a hull - for (let i = 0; i < n; i++) { - this._dists[i] = (coords[2 * i] - coords[0]) || (coords[2 * i + 1] - coords[1]); - } - quicksort(this._ids, this._dists, 0, n - 1); - const hull = new Uint32Array(n); - let j = 0; - for (let i = 0, d0 = -Infinity; i < n; i++) { - const id = this._ids[i]; - if (this._dists[id] > d0) { - hull[j++] = id; - d0 = this._dists[id]; - } - } - this.hull = hull.subarray(0, j); - this.triangles = new Uint32Array(0); - this.halfedges = new Uint32Array(0); - return; - } - - // swap the order of the seed points for counter-clockwise orientation - if (orient(i0x, i0y, i1x, i1y, i2x, i2y)) { - const i = i1; - const x = i1x; - const y = i1y; - i1 = i2; - i1x = i2x; - i1y = i2y; - i2 = i; - i2x = x; - i2y = y; - } - - const center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y); - this._cx = center.x; - this._cy = center.y; - - for (let i = 0; i < n; i++) { - this._dists[i] = dist(coords[2 * i], coords[2 * i + 1], center.x, center.y); - } - - // sort the points by distance from the seed triangle circumcenter - quicksort(this._ids, this._dists, 0, n - 1); - - // set up the seed triangle as the starting hull - this._hullStart = i0; - let hullSize = 3; - - hullNext[i0] = hullPrev[i2] = i1; - hullNext[i1] = hullPrev[i0] = i2; - hullNext[i2] = hullPrev[i1] = i0; - - hullTri[i0] = 0; - hullTri[i1] = 1; - hullTri[i2] = 2; - - hullHash.fill(-1); - hullHash[this._hashKey(i0x, i0y)] = i0; - hullHash[this._hashKey(i1x, i1y)] = i1; - hullHash[this._hashKey(i2x, i2y)] = i2; - - this.trianglesLen = 0; - this._addTriangle(i0, i1, i2, -1, -1, -1); - - for (let k = 0, xp, yp; k < this._ids.length; k++) { - const i = this._ids[k]; - const x = coords[2 * i]; - const y = coords[2 * i + 1]; - - // skip near-duplicate points - if (k > 0 && Math.abs(x - xp) <= EPSILON && Math.abs(y - yp) <= EPSILON) continue; - xp = x; - yp = y; - - // skip seed triangle points - if (i === i0 || i === i1 || i === i2) continue; - - // find a visible edge on the convex hull using edge hash - let start = 0; - for (let j = 0, key = this._hashKey(x, y); j < this._hashSize; j++) { - start = hullHash[(key + j) % this._hashSize]; - if (start !== -1 && start !== hullNext[start]) break; - } - - start = hullPrev[start]; - let e = start, q; - while (q = hullNext[e], !orient(x, y, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1])) { - e = q; - if (e === start) { - e = -1; - break; - } - } - if (e === -1) continue; // likely a near-duplicate point; skip it - - // add the first triangle from the point - let t = this._addTriangle(e, i, hullNext[e], -1, -1, hullTri[e]); - - // recursively flip triangles from the point until they satisfy the Delaunay condition - hullTri[i] = this._legalize(t + 2); - hullTri[e] = t; // keep track of boundary triangles on the hull - hullSize++; - - // walk forward through the hull, adding more triangles and flipping recursively - let n = hullNext[e]; - while (q = hullNext[n], orient(x, y, coords[2 * n], coords[2 * n + 1], coords[2 * q], coords[2 * q + 1])) { - t = this._addTriangle(n, i, q, hullTri[i], -1, hullTri[n]); - hullTri[i] = this._legalize(t + 2); - hullNext[n] = n; // mark as removed - hullSize--; - n = q; - } - - // walk backward from the other side, adding more triangles and flipping - if (e === start) { - while (q = hullPrev[e], orient(x, y, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1])) { - t = this._addTriangle(q, i, e, -1, hullTri[e], hullTri[q]); - this._legalize(t + 2); - hullTri[q] = t; - hullNext[e] = e; // mark as removed - hullSize--; - e = q; - } - } - - // update the hull indices - this._hullStart = hullPrev[i] = e; - hullNext[e] = hullPrev[n] = i; - hullNext[i] = n; - - // save the two new edges in the hash table - hullHash[this._hashKey(x, y)] = i; - hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e; - } - - this.hull = new Uint32Array(hullSize); - for (let i = 0, e = this._hullStart; i < hullSize; i++) { - this.hull[i] = e; - e = hullNext[e]; - } - - // trim typed triangle mesh arrays - this.triangles = this._triangles.subarray(0, this.trianglesLen); - this.halfedges = this._halfedges.subarray(0, this.trianglesLen); - } - - _hashKey(x, y) { - return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize; - } - - _legalize(a) { - const {_triangles: triangles, _halfedges: halfedges, coords} = this; - - let i = 0; - let ar = 0; - - // recursion eliminated with a fixed-size stack - while (true) { - const b = halfedges[a]; - - /* if the pair of triangles doesn't satisfy the Delaunay condition - * (p1 is inside the circumcircle of [p0, pl, pr]), flip them, - * then do the same check/flip recursively for the new pair of triangles - * - * pl pl - * /||\ / \ - * al/ || \bl al/ \a - * / || \ / \ - * / a||b \ flip /___ar___\ - * p0\ || /p1 => p0\---bl---/p1 - * \ || / \ / - * ar\ || /br b\ /br - * \||/ \ / - * pr pr - */ - const a0 = a - a % 3; - ar = a0 + (a + 2) % 3; - - if (b === -1) { // convex hull edge - if (i === 0) break; - a = EDGE_STACK[--i]; - continue; - } - - const b0 = b - b % 3; - const al = a0 + (a + 1) % 3; - const bl = b0 + (b + 2) % 3; - - const p0 = triangles[ar]; - const pr = triangles[a]; - const pl = triangles[al]; - const p1 = triangles[bl]; - - const illegal = inCircle( - coords[2 * p0], coords[2 * p0 + 1], - coords[2 * pr], coords[2 * pr + 1], - coords[2 * pl], coords[2 * pl + 1], - coords[2 * p1], coords[2 * p1 + 1]); - - if (illegal) { - triangles[a] = p1; - triangles[b] = p0; - - const hbl = halfedges[bl]; - - // edge swapped on the other side of the hull (rare); fix the halfedge reference - if (hbl === -1) { - let e = this._hullStart; - do { - if (this._hullTri[e] === bl) { - this._hullTri[e] = a; - break; - } - e = this._hullPrev[e]; - } while (e !== this._hullStart); - } - this._link(a, hbl); - this._link(b, halfedges[ar]); - this._link(ar, bl); - - const br = b0 + (b + 1) % 3; - - // don't worry about hitting the cap: it can only happen on extremely degenerate input - if (i < EDGE_STACK.length) { - EDGE_STACK[i++] = br; - } - } else { - if (i === 0) break; - a = EDGE_STACK[--i]; - } - } - - return ar; - } - - _link(a, b) { - this._halfedges[a] = b; - if (b !== -1) this._halfedges[b] = a; - } - - // add a new triangle given vertex indices and adjacent half-edge ids - _addTriangle(i0, i1, i2, a, b, c) { - const t = this.trianglesLen; - - this._triangles[t] = i0; - this._triangles[t + 1] = i1; - this._triangles[t + 2] = i2; - - this._link(t, a); - this._link(t + 1, b); - this._link(t + 2, c); - - this.trianglesLen += 3; - - return t; - } -} - -// monotonically increases with real angle, but doesn't need expensive trigonometry -function pseudoAngle(dx, dy) { - const p = dx / (Math.abs(dx) + Math.abs(dy)); - return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1] -} - -function dist(ax, ay, bx, by) { - const dx = ax - bx; - const dy = ay - by; - return dx * dx + dy * dy; -} - -// return 2d orientation sign if we're confident in it through J. Shewchuk's error bound check -function orientIfSure(px, py, rx, ry, qx, qy) { - const l = (ry - py) * (qx - px); - const r = (rx - px) * (qy - py); - return Math.abs(l - r) >= 3.3306690738754716e-16 * Math.abs(l + r) ? l - r : 0; -} - -// a more robust orientation test that's stable in a given triangle (to fix robustness issues) -function orient(rx, ry, qx, qy, px, py) { - const sign = orientIfSure(px, py, rx, ry, qx, qy) || - orientIfSure(rx, ry, qx, qy, px, py) || - orientIfSure(qx, qy, px, py, rx, ry); - return sign < 0; -} - -function inCircle(ax, ay, bx, by, cx, cy, px, py) { - const dx = ax - px; - const dy = ay - py; - const ex = bx - px; - const ey = by - py; - const fx = cx - px; - const fy = cy - py; - - const ap = dx * dx + dy * dy; - const bp = ex * ex + ey * ey; - const cp = fx * fx + fy * fy; - - return dx * (ey * cp - bp * fy) - - dy * (ex * cp - bp * fx) + - ap * (ex * fy - ey * fx) < 0; -} - -function circumradius(ax, ay, bx, by, cx, cy) { - const dx = bx - ax; - const dy = by - ay; - const ex = cx - ax; - const ey = cy - ay; - - const bl = dx * dx + dy * dy; - const cl = ex * ex + ey * ey; - const d = 0.5 / (dx * ey - dy * ex); - - const x = (ey * bl - dy * cl) * d; - const y = (dx * cl - ex * bl) * d; - - return x * x + y * y; -} - -function circumcenter(ax, ay, bx, by, cx, cy) { - const dx = bx - ax; - const dy = by - ay; - const ex = cx - ax; - const ey = cy - ay; - - const bl = dx * dx + dy * dy; - const cl = ex * ex + ey * ey; - const d = 0.5 / (dx * ey - dy * ex); - - const x = ax + (ey * bl - dy * cl) * d; - const y = ay + (dx * cl - ex * bl) * d; - - return {x, y}; -} - -function quicksort(ids, dists, left, right) { - if (right - left <= 20) { - for (let i = left + 1; i <= right; i++) { - const temp = ids[i]; - const tempDist = dists[temp]; - let j = i - 1; - while (j >= left && dists[ids[j]] > tempDist) ids[j + 1] = ids[j--]; - ids[j + 1] = temp; - } - } else { - const median = (left + right) >> 1; - let i = left + 1; - let j = right; - swap(ids, median, i); - if (dists[ids[left]] > dists[ids[right]]) swap(ids, left, right); - if (dists[ids[i]] > dists[ids[right]]) swap(ids, i, right); - if (dists[ids[left]] > dists[ids[i]]) swap(ids, left, i); - - const temp = ids[i]; - const tempDist = dists[temp]; - while (true) { - do i++; while (dists[ids[i]] < tempDist); - do j--; while (dists[ids[j]] > tempDist); - if (j < i) break; - swap(ids, i, j); - } - ids[left + 1] = ids[j]; - ids[j] = temp; - - if (right - i + 1 >= j - left) { - quicksort(ids, dists, i, right); - quicksort(ids, dists, left, j - 1); - } else { - quicksort(ids, dists, left, j - 1); - quicksort(ids, dists, i, right); - } - } -} - -function swap(arr, i, j) { - const tmp = arr[i]; - arr[i] = arr[j]; - arr[j] = tmp; -} - -function defaultGetX(p) { - return p[0]; -} -function defaultGetY(p) { - return p[1]; -} diff --git a/node_modules/delaunator/package.json b/node_modules/delaunator/package.json deleted file mode 100644 index b962166da1bda9c2cb0f58dc1aaa7ad1325db85d..0000000000000000000000000000000000000000 --- a/node_modules/delaunator/package.json +++ /dev/null @@ -1,83 +0,0 @@ -{ - "_from": "delaunator@4", - "_id": "delaunator@4.0.1", - "_inBundle": false, - "_integrity": "sha512-WNPWi1IRKZfCt/qIDMfERkDp93+iZEmOxN2yy4Jg+Xhv8SLk2UTqqbe1sfiipn0and9QrE914/ihdx82Y/Giag==", - "_location": "/delaunator", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "delaunator@4", - "name": "delaunator", - "escapedName": "delaunator", - "rawSpec": "4", - "saveSpec": null, - "fetchSpec": "4" - }, - "_requiredBy": [ - "/d3-delaunay" - ], - "_resolved": "https://registry.npmjs.org/delaunator/-/delaunator-4.0.1.tgz", - "_shasum": "3d779687f57919a7a418f8ab947d3bddb6846957", - "_spec": "delaunator@4", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3-delaunay", - "author": { - "name": "Vladimir Agafonkin" - }, - "bugs": { - "url": "https://github.com/mapbox/delaunator/issues" - }, - "bundleDependencies": false, - "dependencies": {}, - "deprecated": false, - "description": "An incredibly fast JavaScript library for Delaunay triangulation of 2D points", - "devDependencies": { - "c8": "^5.0.1", - "eslint": "^6.2.2", - "eslint-config-mourner": "^3.0.0", - "esm": "^3.2.25", - "rollup": "^1.20.3", - "rollup-plugin-buble": "^0.19.8", - "rollup-plugin-terser": "^5.1.1", - "tape": "^4.11.0" - }, - "eslintConfig": { - "extends": "mourner", - "rules": { - "no-sequences": 0 - } - }, - "files": [ - "index.js", - "delaunator.js", - "delaunator.min.js" - ], - "homepage": "https://github.com/mapbox/delaunator#readme", - "jsdelivr": "delaunator.min.js", - "keywords": [ - "delaunay triangulation", - "computational geometry", - "algorithms" - ], - "license": "ISC", - "main": "delaunator.js", - "module": "index.js", - "name": "delaunator", - "repository": { - "type": "git", - "url": "git+https://github.com/mapbox/delaunator.git" - }, - "scripts": { - "bench": "node -r esm bench.js", - "build": "rollup -c", - "cov": "c8 node -r esm test/test.js && c8 report -r html", - "lint": "eslint index.js test/test.js bench.js rollup.config.js docs/diagrams.js", - "prepublishOnly": "npm test && npm run build", - "pretest": "npm run lint", - "start": "rollup -cw", - "test": "node -r esm test/test.js" - }, - "unpkg": "delaunator.min.js", - "version": "4.0.1" -} diff --git a/node_modules/iconv-lite/Changelog.md b/node_modules/iconv-lite/Changelog.md deleted file mode 100644 index f252313f8d0a145a3d1bacb68dbf06c0bf8e67c0..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/Changelog.md +++ /dev/null @@ -1,162 +0,0 @@ -# 0.4.24 / 2018-08-22 - - * Added MIK encoding (#196, by @Ivan-Kalatchev) - - -# 0.4.23 / 2018-05-07 - - * Fix deprecation warning in Node v10 due to the last usage of `new Buffer` (#185, by @felixbuenemann) - * Switched from NodeBuffer to Buffer in typings (#155 by @felixfbecker, #186 by @larssn) - - -# 0.4.22 / 2018-05-05 - - * Use older semver style for dependencies to be compatible with Node version 0.10 (#182, by @dougwilson) - * Fix tests to accomodate fixes in Node v10 (#182, by @dougwilson) - - -# 0.4.21 / 2018-04-06 - - * Fix encoding canonicalization (#156) - * Fix the paths in the "browser" field in package.json (#174 by @LMLB) - * Removed "contributors" section in package.json - see Git history instead. - - -# 0.4.20 / 2018-04-06 - - * Updated `new Buffer()` usages with recommended replacements as it's being deprecated in Node v10 (#176, #178 by @ChALkeR) - - -# 0.4.19 / 2017-09-09 - - * Fixed iso8859-1 codec regression in handling untranslatable characters (#162, caused by #147) - * Re-generated windows1255 codec, because it was updated in iconv project - * Fixed grammar in error message when iconv-lite is loaded with encoding other than utf8 - - -# 0.4.18 / 2017-06-13 - - * Fixed CESU-8 regression in Node v8. - - -# 0.4.17 / 2017-04-22 - - * Updated typescript definition file to support Angular 2 AoT mode (#153 by @larssn) - - -# 0.4.16 / 2017-04-22 - - * Added support for React Native (#150) - * Changed iso8859-1 encoding to usine internal 'binary' encoding, as it's the same thing (#147 by @mscdex) - * Fixed typo in Readme (#138 by @jiangzhuo) - * Fixed build for Node v6.10+ by making correct version comparison - * Added a warning if iconv-lite is loaded not as utf-8 (see #142) - - -# 0.4.15 / 2016-11-21 - - * Fixed typescript type definition (#137) - - -# 0.4.14 / 2016-11-20 - - * Preparation for v1.0 - * Added Node v6 and latest Node versions to Travis CI test rig - * Deprecated Node v0.8 support - * Typescript typings (@larssn) - * Fix encoding of Euro character in GB 18030 (inspired by @lygstate) - * Add ms prefix to dbcs windows encodings (@rokoroku) - - -# 0.4.13 / 2015-10-01 - - * Fix silly mistake in deprecation notice. - - -# 0.4.12 / 2015-09-26 - - * Node v4 support: - * Added CESU-8 decoding (#106) - * Added deprecation notice for `extendNodeEncodings` - * Added Travis tests for Node v4 and io.js latest (#105 by @Mithgol) - - -# 0.4.11 / 2015-07-03 - - * Added CESU-8 encoding. - - -# 0.4.10 / 2015-05-26 - - * Changed UTF-16 endianness heuristic to take into account any ASCII chars, not - just spaces. This should minimize the importance of "default" endianness. - - -# 0.4.9 / 2015-05-24 - - * Streamlined BOM handling: strip BOM by default, add BOM when encoding if - addBOM: true. Added docs to Readme. - * UTF16 now uses UTF16-LE by default. - * Fixed minor issue with big5 encoding. - * Added io.js testing on Travis; updated node-iconv version to test against. - Now we just skip testing SBCS encodings that node-iconv doesn't support. - * (internal refactoring) Updated codec interface to use classes. - * Use strict mode in all files. - - -# 0.4.8 / 2015-04-14 - - * added alias UNICODE-1-1-UTF-7 for UTF-7 encoding (#94) - - -# 0.4.7 / 2015-02-05 - - * stop official support of Node.js v0.8. Should still work, but no guarantees. - reason: Packages needed for testing are hard to get on Travis CI. - * work in environment where Object.prototype is monkey patched with enumerable - props (#89). - - -# 0.4.6 / 2015-01-12 - - * fix rare aliases of single-byte encodings (thanks @mscdex) - * double the timeout for dbcs tests to make them less flaky on travis - - -# 0.4.5 / 2014-11-20 - - * fix windows-31j and x-sjis encoding support (@nleush) - * minor fix: undefined variable reference when internal error happens - - -# 0.4.4 / 2014-07-16 - - * added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3) - * fixed streaming base64 encoding - - -# 0.4.3 / 2014-06-14 - - * added encodings UTF-16BE and UTF-16 with BOM - - -# 0.4.2 / 2014-06-12 - - * don't throw exception if `extendNodeEncodings()` is called more than once - - -# 0.4.1 / 2014-06-11 - - * codepage 808 added - - -# 0.4.0 / 2014-06-10 - - * code is rewritten from scratch - * all widespread encodings are supported - * streaming interface added - * browserify compatibility added - * (optional) extend core primitive encodings to make usage even simpler - * moved from vows to mocha as the testing framework - - diff --git a/node_modules/iconv-lite/LICENSE b/node_modules/iconv-lite/LICENSE deleted file mode 100644 index d518d8376af9faa47af875d83c8cdd51a11f9099..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2011 Alexander Shtuchkin - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/node_modules/iconv-lite/README.md b/node_modules/iconv-lite/README.md deleted file mode 100644 index c981c3708582a563f0f463c1e01715257d5148bd..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/README.md +++ /dev/null @@ -1,156 +0,0 @@ -## Pure JS character encoding conversion [](https://travis-ci.org/ashtuchkin/iconv-lite) - - * Doesn't need native code compilation. Works on Windows and in sandboxed environments like [Cloud9](http://c9.io). - * Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser), - [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others. - * Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison). - * Intuitive encode/decode API - * Streaming support for Node v0.10+ - * [Deprecated] Can extend Node.js primitives (buffers, streams) to support all iconv-lite encodings. - * In-browser usage via [Browserify](https://github.com/substack/node-browserify) (~180k gzip compressed with Buffer shim included). - * Typescript [type definition file](https://github.com/ashtuchkin/iconv-lite/blob/master/lib/index.d.ts) included. - * React Native is supported (need to explicitly `npm install` two more modules: `buffer` and `stream`). - * License: MIT. - -[](https://npmjs.org/packages/iconv-lite/) - -## Usage -### Basic API -```javascript -var iconv = require('iconv-lite'); - -// Convert from an encoded buffer to js string. -str = iconv.decode(Buffer.from([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251'); - -// Convert from js string to an encoded buffer. -buf = iconv.encode("Sample input string", 'win1251'); - -// Check if encoding is supported -iconv.encodingExists("us-ascii") -``` - -### Streaming API (Node v0.10+) -```javascript - -// Decode stream (from binary stream to js strings) -http.createServer(function(req, res) { - var converterStream = iconv.decodeStream('win1251'); - req.pipe(converterStream); - - converterStream.on('data', function(str) { - console.log(str); // Do something with decoded strings, chunk-by-chunk. - }); -}); - -// Convert encoding streaming example -fs.createReadStream('file-in-win1251.txt') - .pipe(iconv.decodeStream('win1251')) - .pipe(iconv.encodeStream('ucs2')) - .pipe(fs.createWriteStream('file-in-ucs2.txt')); - -// Sugar: all encode/decode streams have .collect(cb) method to accumulate data. -http.createServer(function(req, res) { - req.pipe(iconv.decodeStream('win1251')).collect(function(err, body) { - assert(typeof body == 'string'); - console.log(body); // full request body string - }); -}); -``` - -### [Deprecated] Extend Node.js own encodings -> NOTE: This doesn't work on latest Node versions. See [details](https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility). - -```javascript -// After this call all Node basic primitives will understand iconv-lite encodings. -iconv.extendNodeEncodings(); - -// Examples: -buf = new Buffer(str, 'win1251'); -buf.write(str, 'gbk'); -str = buf.toString('latin1'); -assert(Buffer.isEncoding('iso-8859-15')); -Buffer.byteLength(str, 'us-ascii'); - -http.createServer(function(req, res) { - req.setEncoding('big5'); - req.collect(function(err, body) { - console.log(body); - }); -}); - -fs.createReadStream("file.txt", "shift_jis"); - -// External modules are also supported (if they use Node primitives, which they probably do). -request = require('request'); -request({ - url: "http://github.com/", - encoding: "cp932" -}); - -// To remove extensions -iconv.undoExtendNodeEncodings(); -``` - -## Supported encodings - - * All node.js native encodings: utf8, ucs2 / utf16-le, ascii, binary, base64, hex. - * Additional unicode encodings: utf16, utf16-be, utf-7, utf-7-imap. - * All widespread singlebyte encodings: Windows 125x family, ISO-8859 family, - IBM/DOS codepages, Macintosh family, KOI8 family, all others supported by iconv library. - Aliases like 'latin1', 'us-ascii' also supported. - * All widespread multibyte encodings: CP932, CP936, CP949, CP950, GB2312, GBK, GB18030, Big5, Shift_JIS, EUC-JP. - -See [all supported encodings on wiki](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings). - -Most singlebyte encodings are generated automatically from [node-iconv](https://github.com/bnoordhuis/node-iconv). Thank you Ben Noordhuis and libiconv authors! - -Multibyte encodings are generated from [Unicode.org mappings](http://www.unicode.org/Public/MAPPINGS/) and [WHATWG Encoding Standard mappings](http://encoding.spec.whatwg.org/). Thank you, respective authors! - - -## Encoding/decoding speed - -Comparison with node-iconv module (1000x256kb, on MacBook Pro, Core i5/2.6 GHz, Node v0.12.0). -Note: your results may vary, so please always check on your hardware. - - operation iconv@2.1.4 iconv-lite@0.4.7 - ---------------------------------------------------------- - encode('win1251') ~96 Mb/s ~320 Mb/s - decode('win1251') ~95 Mb/s ~246 Mb/s - -## BOM handling - - * Decoding: BOM is stripped by default, unless overridden by passing `stripBOM: false` in options - (f.ex. `iconv.decode(buf, enc, {stripBOM: false})`). - A callback might also be given as a `stripBOM` parameter - it'll be called if BOM character was actually found. - * If you want to detect UTF-8 BOM when decoding other encodings, use [node-autodetect-decoder-stream](https://github.com/danielgindi/node-autodetect-decoder-stream) module. - * Encoding: No BOM added, unless overridden by `addBOM: true` option. - -## UTF-16 Encodings - -This library supports UTF-16LE, UTF-16BE and UTF-16 encodings. First two are straightforward, but UTF-16 is trying to be -smart about endianness in the following ways: - * Decoding: uses BOM and 'spaces heuristic' to determine input endianness. Default is UTF-16LE, but can be - overridden with `defaultEncoding: 'utf-16be'` option. Strips BOM unless `stripBOM: false`. - * Encoding: uses UTF-16LE and writes BOM by default. Use `addBOM: false` to override. - -## Other notes - -When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding). -Untranslatable characters are set to � or ?. No transliteration is currently supported. -Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see #65, #77). - -## Testing - -```bash -$ git clone git@github.com:ashtuchkin/iconv-lite.git -$ cd iconv-lite -$ npm install -$ npm test - -$ # To view performance: -$ node test/performance.js - -$ # To view test coverage: -$ npm run coverage -$ open coverage/lcov-report/index.html -``` diff --git a/node_modules/iconv-lite/encodings/dbcs-codec.js b/node_modules/iconv-lite/encodings/dbcs-codec.js deleted file mode 100644 index 1fe3e160112aa9b896df4b30a0184d76a69dfaef..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/dbcs-codec.js +++ /dev/null @@ -1,555 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. -// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. -// To save memory and loading time, we read table files only when requested. - -exports._dbcs = DBCSCodec; - -var UNASSIGNED = -1, - GB18030_CODE = -2, - SEQ_START = -10, - NODE_START = -1000, - UNASSIGNED_NODE = new Array(0x100), - DEF_CHAR = -1; - -for (var i = 0; i < 0x100; i++) - UNASSIGNED_NODE[i] = UNASSIGNED; - - -// Class DBCSCodec reads and initializes mapping tables. -function DBCSCodec(codecOptions, iconv) { - this.encodingName = codecOptions.encodingName; - if (!codecOptions) - throw new Error("DBCS codec is called without the data.") - if (!codecOptions.table) - throw new Error("Encoding '" + this.encodingName + "' has no data."); - - // Load tables. - var mappingTable = codecOptions.table(); - - - // Decode tables: MBCS -> Unicode. - - // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. - // Trie root is decodeTables[0]. - // Values: >= 0 -> unicode character code. can be > 0xFFFF - // == UNASSIGNED -> unknown/unassigned sequence. - // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. - // <= NODE_START -> index of the next node in our trie to process next byte. - // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. - this.decodeTables = []; - this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. - - // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. - this.decodeTableSeq = []; - - // Actual mapping tables consist of chunks. Use them to fill up decode tables. - for (var i = 0; i < mappingTable.length; i++) - this._addDecodeChunk(mappingTable[i]); - - this.defaultCharUnicode = iconv.defaultCharUnicode; - - - // Encode tables: Unicode -> DBCS. - - // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. - // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. - // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). - // == UNASSIGNED -> no conversion found. Output a default char. - // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. - this.encodeTable = []; - - // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of - // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key - // means end of sequence (needed when one sequence is a strict subsequence of another). - // Objects are kept separately from encodeTable to increase performance. - this.encodeTableSeq = []; - - // Some chars can be decoded, but need not be encoded. - var skipEncodeChars = {}; - if (codecOptions.encodeSkipVals) - for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { - var val = codecOptions.encodeSkipVals[i]; - if (typeof val === 'number') - skipEncodeChars[val] = true; - else - for (var j = val.from; j <= val.to; j++) - skipEncodeChars[j] = true; - } - - // Use decode trie to recursively fill out encode tables. - this._fillEncodeTable(0, 0, skipEncodeChars); - - // Add more encoding pairs when needed. - if (codecOptions.encodeAdd) { - for (var uChar in codecOptions.encodeAdd) - if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) - this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); - } - - this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; - if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; - if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); - - - // Load & create GB18030 tables when needed. - if (typeof codecOptions.gb18030 === 'function') { - this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. - - // Add GB18030 decode tables. - var thirdByteNodeIdx = this.decodeTables.length; - var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0); - - var fourthByteNodeIdx = this.decodeTables.length; - var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0); - - for (var i = 0x81; i <= 0xFE; i++) { - var secondByteNodeIdx = NODE_START - this.decodeTables[0][i]; - var secondByteNode = this.decodeTables[secondByteNodeIdx]; - for (var j = 0x30; j <= 0x39; j++) - secondByteNode[j] = NODE_START - thirdByteNodeIdx; - } - for (var i = 0x81; i <= 0xFE; i++) - thirdByteNode[i] = NODE_START - fourthByteNodeIdx; - for (var i = 0x30; i <= 0x39; i++) - fourthByteNode[i] = GB18030_CODE - } -} - -DBCSCodec.prototype.encoder = DBCSEncoder; -DBCSCodec.prototype.decoder = DBCSDecoder; - -// Decoder helpers -DBCSCodec.prototype._getDecodeTrieNode = function(addr) { - var bytes = []; - for (; addr > 0; addr >>= 8) - bytes.push(addr & 0xFF); - if (bytes.length == 0) - bytes.push(0); - - var node = this.decodeTables[0]; - for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. - var val = node[bytes[i]]; - - if (val == UNASSIGNED) { // Create new node. - node[bytes[i]] = NODE_START - this.decodeTables.length; - this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); - } - else if (val <= NODE_START) { // Existing node. - node = this.decodeTables[NODE_START - val]; - } - else - throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); - } - return node; -} - - -DBCSCodec.prototype._addDecodeChunk = function(chunk) { - // First element of chunk is the hex mbcs code where we start. - var curAddr = parseInt(chunk[0], 16); - - // Choose the decoding node where we'll write our chars. - var writeTable = this._getDecodeTrieNode(curAddr); - curAddr = curAddr & 0xFF; - - // Write all other elements of the chunk to the table. - for (var k = 1; k < chunk.length; k++) { - var part = chunk[k]; - if (typeof part === "string") { // String, write as-is. - for (var l = 0; l < part.length;) { - var code = part.charCodeAt(l++); - if (0xD800 <= code && code < 0xDC00) { // Decode surrogate - var codeTrail = part.charCodeAt(l++); - if (0xDC00 <= codeTrail && codeTrail < 0xE000) - writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); - else - throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); - } - else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) - var len = 0xFFF - code + 2; - var seq = []; - for (var m = 0; m < len; m++) - seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. - - writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; - this.decodeTableSeq.push(seq); - } - else - writeTable[curAddr++] = code; // Basic char - } - } - else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. - var charCode = writeTable[curAddr - 1] + 1; - for (var l = 0; l < part; l++) - writeTable[curAddr++] = charCode++; - } - else - throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); - } - if (curAddr > 0xFF) - throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); -} - -// Encoder helpers -DBCSCodec.prototype._getEncodeBucket = function(uCode) { - var high = uCode >> 8; // This could be > 0xFF because of astral characters. - if (this.encodeTable[high] === undefined) - this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. - return this.encodeTable[high]; -} - -DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; - if (bucket[low] <= SEQ_START) - this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. - else if (bucket[low] == UNASSIGNED) - bucket[low] = dbcsCode; -} - -DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { - - // Get the root of character tree according to first character of the sequence. - var uCode = seq[0]; - var bucket = this._getEncodeBucket(uCode); - var low = uCode & 0xFF; - - var node; - if (bucket[low] <= SEQ_START) { - // There's already a sequence with - use it. - node = this.encodeTableSeq[SEQ_START-bucket[low]]; - } - else { - // There was no sequence object - allocate a new one. - node = {}; - if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. - bucket[low] = SEQ_START - this.encodeTableSeq.length; - this.encodeTableSeq.push(node); - } - - // Traverse the character tree, allocating new nodes as needed. - for (var j = 1; j < seq.length-1; j++) { - var oldVal = node[uCode]; - if (typeof oldVal === 'object') - node = oldVal; - else { - node = node[uCode] = {} - if (oldVal !== undefined) - node[DEF_CHAR] = oldVal - } - } - - // Set the leaf to given dbcsCode. - uCode = seq[seq.length-1]; - node[uCode] = dbcsCode; -} - -DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { - var node = this.decodeTables[nodeIdx]; - for (var i = 0; i < 0x100; i++) { - var uCode = node[i]; - var mbCode = prefix + i; - if (skipEncodeChars[mbCode]) - continue; - - if (uCode >= 0) - this._setEncodeChar(uCode, mbCode); - else if (uCode <= NODE_START) - this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars); - else if (uCode <= SEQ_START) - this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); - } -} - - - -// == Encoder ================================================================== - -function DBCSEncoder(options, codec) { - // Encoder state - this.leadSurrogate = -1; - this.seqObj = undefined; - - // Static data - this.encodeTable = codec.encodeTable; - this.encodeTableSeq = codec.encodeTableSeq; - this.defaultCharSingleByte = codec.defCharSB; - this.gb18030 = codec.gb18030; -} - -DBCSEncoder.prototype.write = function(str) { - var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), - leadSurrogate = this.leadSurrogate, - seqObj = this.seqObj, nextChar = -1, - i = 0, j = 0; - - while (true) { - // 0. Get next character. - if (nextChar === -1) { - if (i == str.length) break; - var uCode = str.charCodeAt(i++); - } - else { - var uCode = nextChar; - nextChar = -1; - } - - // 1. Handle surrogates. - if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. - if (uCode < 0xDC00) { // We've got lead surrogate. - if (leadSurrogate === -1) { - leadSurrogate = uCode; - continue; - } else { - leadSurrogate = uCode; - // Double lead surrogate found. - uCode = UNASSIGNED; - } - } else { // We've got trail surrogate. - if (leadSurrogate !== -1) { - uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); - leadSurrogate = -1; - } else { - // Incomplete surrogate pair - only trail surrogate found. - uCode = UNASSIGNED; - } - - } - } - else if (leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. - leadSurrogate = -1; - } - - // 2. Convert uCode character. - var dbcsCode = UNASSIGNED; - if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence - var resCode = seqObj[uCode]; - if (typeof resCode === 'object') { // Sequence continues. - seqObj = resCode; - continue; - - } else if (typeof resCode == 'number') { // Sequence finished. Write it. - dbcsCode = resCode; - - } else if (resCode == undefined) { // Current character is not part of the sequence. - - // Try default character for this sequence - resCode = seqObj[DEF_CHAR]; - if (resCode !== undefined) { - dbcsCode = resCode; // Found. Write it. - nextChar = uCode; // Current character will be written too in the next iteration. - - } else { - // TODO: What if we have no default? (resCode == undefined) - // Then, we should write first char of the sequence as-is and try the rest recursively. - // Didn't do it for now because no encoding has this situation yet. - // Currently, just skip the sequence and write current char. - } - } - seqObj = undefined; - } - else if (uCode >= 0) { // Regular character - var subtable = this.encodeTable[uCode >> 8]; - if (subtable !== undefined) - dbcsCode = subtable[uCode & 0xFF]; - - if (dbcsCode <= SEQ_START) { // Sequence start - seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; - continue; - } - - if (dbcsCode == UNASSIGNED && this.gb18030) { - // Use GB18030 algorithm to find character(s) to write. - var idx = findIdx(this.gb18030.uChars, uCode); - if (idx != -1) { - var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; - newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; - newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; - newBuf[j++] = 0x30 + dbcsCode; - continue; - } - } - } - - // 3. Write dbcsCode character. - if (dbcsCode === UNASSIGNED) - dbcsCode = this.defaultCharSingleByte; - - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else if (dbcsCode < 0x10000) { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - else { - newBuf[j++] = dbcsCode >> 16; - newBuf[j++] = (dbcsCode >> 8) & 0xFF; - newBuf[j++] = dbcsCode & 0xFF; - } - } - - this.seqObj = seqObj; - this.leadSurrogate = leadSurrogate; - return newBuf.slice(0, j); -} - -DBCSEncoder.prototype.end = function() { - if (this.leadSurrogate === -1 && this.seqObj === undefined) - return; // All clean. Most often case. - - var newBuf = Buffer.alloc(10), j = 0; - - if (this.seqObj) { // We're in the sequence. - var dbcsCode = this.seqObj[DEF_CHAR]; - if (dbcsCode !== undefined) { // Write beginning of the sequence. - if (dbcsCode < 0x100) { - newBuf[j++] = dbcsCode; - } - else { - newBuf[j++] = dbcsCode >> 8; // high byte - newBuf[j++] = dbcsCode & 0xFF; // low byte - } - } else { - // See todo above. - } - this.seqObj = undefined; - } - - if (this.leadSurrogate !== -1) { - // Incomplete surrogate pair - only lead surrogate found. - newBuf[j++] = this.defaultCharSingleByte; - this.leadSurrogate = -1; - } - - return newBuf.slice(0, j); -} - -// Export for testing -DBCSEncoder.prototype.findIdx = findIdx; - - -// == Decoder ================================================================== - -function DBCSDecoder(options, codec) { - // Decoder state - this.nodeIdx = 0; - this.prevBuf = Buffer.alloc(0); - - // Static data - this.decodeTables = codec.decodeTables; - this.decodeTableSeq = codec.decodeTableSeq; - this.defaultCharUnicode = codec.defaultCharUnicode; - this.gb18030 = codec.gb18030; -} - -DBCSDecoder.prototype.write = function(buf) { - var newBuf = Buffer.alloc(buf.length*2), - nodeIdx = this.nodeIdx, - prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length, - seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence. - uCode; - - if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later. - prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]); - - for (var i = 0, j = 0; i < buf.length; i++) { - var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset]; - - // Lookup in current trie node. - var uCode = this.decodeTables[nodeIdx][curByte]; - - if (uCode >= 0) { - // Normal character, just use it. - } - else if (uCode === UNASSIGNED) { // Unknown char. - // TODO: Callback with seq. - //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); - i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle). - uCode = this.defaultCharUnicode.charCodeAt(0); - } - else if (uCode === GB18030_CODE) { - var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); - var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30); - var idx = findIdx(this.gb18030.gbChars, ptr); - uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; - } - else if (uCode <= NODE_START) { // Go to next trie node. - nodeIdx = NODE_START - uCode; - continue; - } - else if (uCode <= SEQ_START) { // Output a sequence of chars. - var seq = this.decodeTableSeq[SEQ_START - uCode]; - for (var k = 0; k < seq.length - 1; k++) { - uCode = seq[k]; - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; - } - uCode = seq[seq.length-1]; - } - else - throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); - - // Write the character to buffer, handling higher planes using surrogate pair. - if (uCode > 0xFFFF) { - uCode -= 0x10000; - var uCodeLead = 0xD800 + Math.floor(uCode / 0x400); - newBuf[j++] = uCodeLead & 0xFF; - newBuf[j++] = uCodeLead >> 8; - - uCode = 0xDC00 + uCode % 0x400; - } - newBuf[j++] = uCode & 0xFF; - newBuf[j++] = uCode >> 8; - - // Reset trie node. - nodeIdx = 0; seqStart = i+1; - } - - this.nodeIdx = nodeIdx; - this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset); - return newBuf.slice(0, j).toString('ucs2'); -} - -DBCSDecoder.prototype.end = function() { - var ret = ''; - - // Try to parse all remaining chars. - while (this.prevBuf.length > 0) { - // Skip 1 character in the buffer. - ret += this.defaultCharUnicode; - var buf = this.prevBuf.slice(1); - - // Parse remaining as usual. - this.prevBuf = Buffer.alloc(0); - this.nodeIdx = 0; - if (buf.length > 0) - ret += this.write(buf); - } - - this.nodeIdx = 0; - return ret; -} - -// Binary search for GB18030. Returns largest i such that table[i] <= val. -function findIdx(table, val) { - if (table[0] > val) - return -1; - - var l = 0, r = table.length; - while (l < r-1) { // always table[l] <= val < table[r] - var mid = l + Math.floor((r-l+1)/2); - if (table[mid] <= val) - l = mid; - else - r = mid; - } - return l; -} - diff --git a/node_modules/iconv-lite/encodings/dbcs-data.js b/node_modules/iconv-lite/encodings/dbcs-data.js deleted file mode 100644 index 4b61914341f9165a4b54543d49e93af6b0d559cf..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/dbcs-data.js +++ /dev/null @@ -1,176 +0,0 @@ -"use strict"; - -// Description of supported double byte encodings and aliases. -// Tables are not require()-d until they are needed to speed up library load. -// require()-s are direct to support Browserify. - -module.exports = { - - // == Japanese/ShiftJIS ==================================================== - // All japanese encodings are based on JIS X set of standards: - // JIS X 0201 - Single-byte encoding of ASCII + Â¥ + Kana chars at 0xA1-0xDF. - // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. - // Has several variations in 1978, 1983, 1990 and 1997. - // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. - // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. - // 2 planes, first is superset of 0208, second - revised 0212. - // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) - - // Byte encodings are: - // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte - // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. - // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. - // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. - // 0x00-0x7F - lower part of 0201 - // 0x8E, 0xA1-0xDF - upper part of 0201 - // (0xA1-0xFE)x2 - 0208 plane (94x94). - // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). - // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. - // Used as-is in ISO2022 family. - // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, - // 0201-1976 Roman, 0208-1978, 0208-1983. - // * ISO2022-JP-1: Adds esc seq for 0212-1990. - // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. - // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. - // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. - // - // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. - // - // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html - - 'shiftjis': { - type: '_dbcs', - table: function() { return require('./tables/shiftjis.json') }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - encodeSkipVals: [{from: 0xED40, to: 0xF940}], - }, - 'csshiftjis': 'shiftjis', - 'mskanji': 'shiftjis', - 'sjis': 'shiftjis', - 'windows31j': 'shiftjis', - 'ms31j': 'shiftjis', - 'xsjis': 'shiftjis', - 'windows932': 'shiftjis', - 'ms932': 'shiftjis', - '932': 'shiftjis', - 'cp932': 'shiftjis', - - 'eucjp': { - type: '_dbcs', - table: function() { return require('./tables/eucjp.json') }, - encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, - }, - - // TODO: KDDI extension to Shift_JIS - // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. - // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. - - - // == Chinese/GBK ========================================================== - // http://en.wikipedia.org/wiki/GBK - // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder - - // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 - 'gb2312': 'cp936', - 'gb231280': 'cp936', - 'gb23121980': 'cp936', - 'csgb2312': 'cp936', - 'csiso58gb231280': 'cp936', - 'euccn': 'cp936', - - // Microsoft's CP936 is a subset and approximation of GBK. - 'windows936': 'cp936', - 'ms936': 'cp936', - '936': 'cp936', - 'cp936': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json') }, - }, - - // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. - 'gbk': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, - }, - 'xgbk': 'gbk', - 'isoir58': 'gbk', - - // GB18030 is an algorithmic extension of GBK. - // Main source: https://www.w3.org/TR/encoding/#gbk-encoder - // http://icu-project.org/docs/papers/gb18030.html - // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml - // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 - 'gb18030': { - type: '_dbcs', - table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, - gb18030: function() { return require('./tables/gb18030-ranges.json') }, - encodeSkipVals: [0x80], - encodeAdd: {'€': 0xA2E3}, - }, - - 'chinese': 'gb18030', - - - // == Korean =============================================================== - // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. - 'windows949': 'cp949', - 'ms949': 'cp949', - '949': 'cp949', - 'cp949': { - type: '_dbcs', - table: function() { return require('./tables/cp949.json') }, - }, - - 'cseuckr': 'cp949', - 'csksc56011987': 'cp949', - 'euckr': 'cp949', - 'isoir149': 'cp949', - 'korean': 'cp949', - 'ksc56011987': 'cp949', - 'ksc56011989': 'cp949', - 'ksc5601': 'cp949', - - - // == Big5/Taiwan/Hong Kong ================================================ - // There are lots of tables for Big5 and cp950. Please see the following links for history: - // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html - // Variations, in roughly number of defined chars: - // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT - // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ - // * Big5-2003 (Taiwan standard) almost superset of cp950. - // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. - // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. - // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. - // Plus, it has 4 combining sequences. - // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 - // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. - // Implementations are not consistent within browsers; sometimes labeled as just big5. - // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. - // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 - // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. - // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt - // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt - // - // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder - // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. - - 'windows950': 'cp950', - 'ms950': 'cp950', - '950': 'cp950', - 'cp950': { - type: '_dbcs', - table: function() { return require('./tables/cp950.json') }, - }, - - // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. - 'big5': 'big5hkscs', - 'big5hkscs': { - type: '_dbcs', - table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) }, - encodeSkipVals: [0xa2cc], - }, - - 'cnbig5': 'big5hkscs', - 'csbig5': 'big5hkscs', - 'xxbig5': 'big5hkscs', -}; diff --git a/node_modules/iconv-lite/encodings/index.js b/node_modules/iconv-lite/encodings/index.js deleted file mode 100644 index e30400317c18fb2fd374e01d52c8f815976db6a5..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/index.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; - -// Update this array if you add/rename/remove files in this directory. -// We support Browserify by skipping automatic module discovery and requiring modules directly. -var modules = [ - require("./internal"), - require("./utf16"), - require("./utf7"), - require("./sbcs-codec"), - require("./sbcs-data"), - require("./sbcs-data-generated"), - require("./dbcs-codec"), - require("./dbcs-data"), -]; - -// Put all encoding/alias/codec definitions to single object and export it. -for (var i = 0; i < modules.length; i++) { - var module = modules[i]; - for (var enc in module) - if (Object.prototype.hasOwnProperty.call(module, enc)) - exports[enc] = module[enc]; -} diff --git a/node_modules/iconv-lite/encodings/internal.js b/node_modules/iconv-lite/encodings/internal.js deleted file mode 100644 index 05ce38b276eee23753837bea9df92a96e5d02c1a..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/internal.js +++ /dev/null @@ -1,188 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Export Node.js internal encodings. - -module.exports = { - // Encodings - utf8: { type: "_internal", bomAware: true}, - cesu8: { type: "_internal", bomAware: true}, - unicode11utf8: "utf8", - - ucs2: { type: "_internal", bomAware: true}, - utf16le: "ucs2", - - binary: { type: "_internal" }, - base64: { type: "_internal" }, - hex: { type: "_internal" }, - - // Codec. - _internal: InternalCodec, -}; - -//------------------------------------------------------------------------------ - -function InternalCodec(codecOptions, iconv) { - this.enc = codecOptions.encodingName; - this.bomAware = codecOptions.bomAware; - - if (this.enc === "base64") - this.encoder = InternalEncoderBase64; - else if (this.enc === "cesu8") { - this.enc = "utf8"; // Use utf8 for decoding. - this.encoder = InternalEncoderCesu8; - - // Add decoder for versions of Node not supporting CESU-8 - if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { - this.decoder = InternalDecoderCesu8; - this.defaultCharUnicode = iconv.defaultCharUnicode; - } - } -} - -InternalCodec.prototype.encoder = InternalEncoder; -InternalCodec.prototype.decoder = InternalDecoder; - -//------------------------------------------------------------------------------ - -// We use node.js internal decoder. Its signature is the same as ours. -var StringDecoder = require('string_decoder').StringDecoder; - -if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. - StringDecoder.prototype.end = function() {}; - - -function InternalDecoder(options, codec) { - StringDecoder.call(this, codec.enc); -} - -InternalDecoder.prototype = StringDecoder.prototype; - - -//------------------------------------------------------------------------------ -// Encoder is mostly trivial - -function InternalEncoder(options, codec) { - this.enc = codec.enc; -} - -InternalEncoder.prototype.write = function(str) { - return Buffer.from(str, this.enc); -} - -InternalEncoder.prototype.end = function() { -} - - -//------------------------------------------------------------------------------ -// Except base64 encoder, which must keep its state. - -function InternalEncoderBase64(options, codec) { - this.prevStr = ''; -} - -InternalEncoderBase64.prototype.write = function(str) { - str = this.prevStr + str; - var completeQuads = str.length - (str.length % 4); - this.prevStr = str.slice(completeQuads); - str = str.slice(0, completeQuads); - - return Buffer.from(str, "base64"); -} - -InternalEncoderBase64.prototype.end = function() { - return Buffer.from(this.prevStr, "base64"); -} - - -//------------------------------------------------------------------------------ -// CESU-8 encoder is also special. - -function InternalEncoderCesu8(options, codec) { -} - -InternalEncoderCesu8.prototype.write = function(str) { - var buf = Buffer.alloc(str.length * 3), bufIdx = 0; - for (var i = 0; i < str.length; i++) { - var charCode = str.charCodeAt(i); - // Naive implementation, but it works because CESU-8 is especially easy - // to convert from UTF-16 (which all JS strings are encoded in). - if (charCode < 0x80) - buf[bufIdx++] = charCode; - else if (charCode < 0x800) { - buf[bufIdx++] = 0xC0 + (charCode >>> 6); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); - } - else { // charCode will always be < 0x10000 in javascript. - buf[bufIdx++] = 0xE0 + (charCode >>> 12); - buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); - buf[bufIdx++] = 0x80 + (charCode & 0x3f); - } - } - return buf.slice(0, bufIdx); -} - -InternalEncoderCesu8.prototype.end = function() { -} - -//------------------------------------------------------------------------------ -// CESU-8 decoder is not implemented in Node v4.0+ - -function InternalDecoderCesu8(options, codec) { - this.acc = 0; - this.contBytes = 0; - this.accBytes = 0; - this.defaultCharUnicode = codec.defaultCharUnicode; -} - -InternalDecoderCesu8.prototype.write = function(buf) { - var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, - res = ''; - for (var i = 0; i < buf.length; i++) { - var curByte = buf[i]; - if ((curByte & 0xC0) !== 0x80) { // Leading byte - if (contBytes > 0) { // Previous code is invalid - res += this.defaultCharUnicode; - contBytes = 0; - } - - if (curByte < 0x80) { // Single-byte code - res += String.fromCharCode(curByte); - } else if (curByte < 0xE0) { // Two-byte code - acc = curByte & 0x1F; - contBytes = 1; accBytes = 1; - } else if (curByte < 0xF0) { // Three-byte code - acc = curByte & 0x0F; - contBytes = 2; accBytes = 1; - } else { // Four or more are not supported for CESU-8. - res += this.defaultCharUnicode; - } - } else { // Continuation byte - if (contBytes > 0) { // We're waiting for it. - acc = (acc << 6) | (curByte & 0x3f); - contBytes--; accBytes++; - if (contBytes === 0) { - // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) - if (accBytes === 2 && acc < 0x80 && acc > 0) - res += this.defaultCharUnicode; - else if (accBytes === 3 && acc < 0x800) - res += this.defaultCharUnicode; - else - // Actually add character. - res += String.fromCharCode(acc); - } - } else { // Unexpected continuation byte - res += this.defaultCharUnicode; - } - } - } - this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; - return res; -} - -InternalDecoderCesu8.prototype.end = function() { - var res = 0; - if (this.contBytes > 0) - res += this.defaultCharUnicode; - return res; -} diff --git a/node_modules/iconv-lite/encodings/sbcs-codec.js b/node_modules/iconv-lite/encodings/sbcs-codec.js deleted file mode 100644 index abac5ffaac97da29fa5c5d8aedf5b47763fc7c58..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/sbcs-codec.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that -// correspond to encoded bytes (if 128 - then lower half is ASCII). - -exports._sbcs = SBCSCodec; -function SBCSCodec(codecOptions, iconv) { - if (!codecOptions) - throw new Error("SBCS codec is called without the data.") - - // Prepare char buffer for decoding. - if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) - throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); - - if (codecOptions.chars.length === 128) { - var asciiString = ""; - for (var i = 0; i < 128; i++) - asciiString += String.fromCharCode(i); - codecOptions.chars = asciiString + codecOptions.chars; - } - - this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2'); - - // Encoding buffer. - var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); - - for (var i = 0; i < codecOptions.chars.length; i++) - encodeBuf[codecOptions.chars.charCodeAt(i)] = i; - - this.encodeBuf = encodeBuf; -} - -SBCSCodec.prototype.encoder = SBCSEncoder; -SBCSCodec.prototype.decoder = SBCSDecoder; - - -function SBCSEncoder(options, codec) { - this.encodeBuf = codec.encodeBuf; -} - -SBCSEncoder.prototype.write = function(str) { - var buf = Buffer.alloc(str.length); - for (var i = 0; i < str.length; i++) - buf[i] = this.encodeBuf[str.charCodeAt(i)]; - - return buf; -} - -SBCSEncoder.prototype.end = function() { -} - - -function SBCSDecoder(options, codec) { - this.decodeBuf = codec.decodeBuf; -} - -SBCSDecoder.prototype.write = function(buf) { - // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. - var decodeBuf = this.decodeBuf; - var newBuf = Buffer.alloc(buf.length*2); - var idx1 = 0, idx2 = 0; - for (var i = 0; i < buf.length; i++) { - idx1 = buf[i]*2; idx2 = i*2; - newBuf[idx2] = decodeBuf[idx1]; - newBuf[idx2+1] = decodeBuf[idx1+1]; - } - return newBuf.toString('ucs2'); -} - -SBCSDecoder.prototype.end = function() { -} diff --git a/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/node_modules/iconv-lite/encodings/sbcs-data-generated.js deleted file mode 100644 index 9b4823607b6071c67dd7b553767bfee98a49de1c..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/sbcs-data-generated.js +++ /dev/null @@ -1,451 +0,0 @@ -"use strict"; - -// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. -module.exports = { - "437": "cp437", - "737": "cp737", - "775": "cp775", - "850": "cp850", - "852": "cp852", - "855": "cp855", - "856": "cp856", - "857": "cp857", - "858": "cp858", - "860": "cp860", - "861": "cp861", - "862": "cp862", - "863": "cp863", - "864": "cp864", - "865": "cp865", - "866": "cp866", - "869": "cp869", - "874": "windows874", - "922": "cp922", - "1046": "cp1046", - "1124": "cp1124", - "1125": "cp1125", - "1129": "cp1129", - "1133": "cp1133", - "1161": "cp1161", - "1162": "cp1162", - "1163": "cp1163", - "1250": "windows1250", - "1251": "windows1251", - "1252": "windows1252", - "1253": "windows1253", - "1254": "windows1254", - "1255": "windows1255", - "1256": "windows1256", - "1257": "windows1257", - "1258": "windows1258", - "28591": "iso88591", - "28592": "iso88592", - "28593": "iso88593", - "28594": "iso88594", - "28595": "iso88595", - "28596": "iso88596", - "28597": "iso88597", - "28598": "iso88598", - "28599": "iso88599", - "28600": "iso885910", - "28601": "iso885911", - "28603": "iso885913", - "28604": "iso885914", - "28605": "iso885915", - "28606": "iso885916", - "windows874": { - "type": "_sbcs", - "chars": "€����…�����������‘’“â€â€¢â€“—�������� à¸à¸‚ฃคฅฆงจฉชซฌà¸à¸Žà¸à¸à¸‘ฒณดตถทธนบปผà¸à¸žà¸Ÿà¸ มยรฤลฦวศษสหฬà¸à¸®à¸¯à¸°à¸±à¸²à¸³à¸´à¸µà¸¶à¸·à¸¸à¸¹à¸ºï¿½ï¿½ï¿½ï¿½à¸¿à¹€à¹à¹‚ใไๅๆ็่้๊๋์à¹à¹Žà¹à¹à¹‘๒๓๔๕๖๗๘๙๚๛����" - }, - "win874": "windows874", - "cp874": "windows874", - "windows1250": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“â€â€¢â€“—�™š›śťžź ˇ˘Å¤Ą¦§¨©Ş«¬Â®Ż°±˛ł´µ¶·¸ąş»ĽËľżŔÃÂĂÄĹĆÇČÉĘËĚÃÃŽÄŽÄŃŇÓÔÅÖ×ŘŮÚŰÜÃŢßŕáâăäĺćçÄéęëěÃîÄđńňóôőö÷řůúűüýţ˙" - }, - "win1250": "windows1250", - "cp1250": "windows1250", - "windows1251": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋÐђ‘’“â€â€¢â€“—�™љ›њќћџ ЎўЈ¤Ò¦§Ð©Є«¬Â®Ї°±Ііґµ¶·ё№є»јЅѕїÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬÐЮЯабвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ" - }, - "win1251": "windows1251", - "cp1251": "windows1251", - "windows1252": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“â€â€¢â€“—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖ×ØÙÚÛÜÃÞßà áâãäåæçèéêëìÃîïðñòóôõö÷øùúûüýþÿ" - }, - "win1252": "windows1252", - "cp1252": "windows1252", - "windows1253": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“â€â€¢â€“—�™�›���� ΅Ά£¤¥¦§¨©�«¬Â®―°±²³΄µ¶·ΈΉΊ»Ό½ΎÎÎΑΒΓΔΕΖΗΘΙΚΛΜÎΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάÎήίΰαβγδεζηθικλμνξοπÏςστυφχψωϊϋόÏώ�" - }, - "win1253": "windows1253", - "cp1253": "windows1253", - "windows1254": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“â€â€¢â€“—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßà áâãäåæçèéêëìÃîïğñòóôõö÷øùúûüışÿ" - }, - "win1254": "windows1254", - "cp1254": "windows1254", - "windows1255": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“â€â€¢â€“—˜™�›���� ¡¢£₪¥¦§¨©×«¬Â®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀×ׂ׃װױײ׳״�������×בגדהוזחטיךכל××ž×Ÿ× ×¡×¢×£×¤×¥×¦×§×¨×©×ªï¿½ï¿½â€Žâ€ï¿½" - }, - "win1255": "windows1255", - "cp1255": "windows1255", - "windows1256": { - "type": "_sbcs", - "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“â€â€¢â€“—ک™ڑ›œ‌â€ÚºÂ ،¢£¤¥¦§¨©ھ«¬Â®¯°±²³´µ¶·¸¹؛»¼½¾؟ÛءآأؤإئابةتثجØخدذرزسشصض×طظعغـÙقكà لâمنهوçèéêëىيîïًٌÙَôÙÙ÷ّùْûü‎â€Û’" - }, - "win1256": "windows1256", - "cp1256": "windows1256", - "windows1257": { - "type": "_sbcs", - "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“â€â€¢â€“—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬Â®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲÅŚŪÜŻŽßąįÄćäåęēÄéźėģķīļšńņóÅõö÷ųłśūüżž˙" - }, - "win1257": "windows1257", - "cp1257": "windows1257", - "windows1258": { - "type": "_sbcs", - "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“â€â€¢â€“—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÃÂĂÄÅÆÇÈÉÊË̀ÃÃŽÃÄÃ‘Ì‰Ã“Ã”Æ Ã–Ã—Ã˜Ã™ÃšÃ›ÃœÆ¯ÌƒÃŸÃ Ã¡Ã¢ÄƒÃ¤Ã¥Ã¦Ã§Ã¨Ã©ÃªÃ«ÌÃîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "win1258": "windows1258", - "cp1258": "windows1258", - "iso88591": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖ×ØÙÚÛÜÃÞßà áâãäåæçèéêëìÃîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28591": "iso88591", - "iso88592": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ Ą˘Å¤ĽŚ§¨ŠŞŤŹÂŽŻ°ą˛ł´ľśˇ¸šşťźËžżŔÃÂĂÄĹĆÇČÉĘËĚÃÃŽÄŽÄŃŇÓÔÅÖ×ŘŮÚŰÜÃŢßŕáâăäĺćçÄéęëěÃîÄđńňóôőö÷řůúűüýţ˙" - }, - "cp28592": "iso88592", - "iso88593": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ Ħ˘£¤�Ĥ§¨İŞĞĴÂ�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÃÂ�ÄĊĈÇÈÉÊËÌÃÃŽÃï¿½Ã‘Ã’Ã“Ã”Ä Ã–Ã—ÄœÃ™ÃšÃ›ÃœÅ¬ÅœÃŸÃ Ã¡Ã¢ï¿½Ã¤Ä‹Ä‰Ã§Ã¨Ã©ÃªÃ«Ã¬Ãîï�ñòóôġö÷ÄùúûüÅÅË™" - }, - "cp28593": "iso88593", - "iso88594": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦÂŽ¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÃÂÃÄÅÆĮČÉĘËĖÃÎĪÄŅŌĶÔÕÖ×ØŲÚÛÜŨŪßÄáâãäåæįÄéęëėÃîīđņÅķôõö÷øųúûüũū˙" - }, - "cp28594": "iso88594", - "iso88595": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ÐЂЃЄЅІЇЈЉЊЋЌÂÐŽÐÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬÐЮЯабвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ№ёђѓєѕіїјљњћќ§ўџ" - }, - "cp28595": "iso88595", - "iso88596": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ���¤�������،Â�������������؛���؟�ءآأؤإئابةتثجØخدذرزسشصضطظعغ�����ـÙقكلمنهوىيًٌÙÙŽÙÙّْ�������������" - }, - "cp28596": "iso88596", - "iso88597": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ‘’£€₯¦§¨©ͺ«¬Â�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎÎÎΑΒΓΔΕΖΗΘΙΚΛΜÎΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάÎήίΰαβγδεζηθικλμνξοπÏςστυφχψωϊϋόÏώ�" - }, - "cp28597": "iso88597", - "iso88598": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ �¢£¤¥¦§¨©×«¬Â®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗×בגדהוזחטיךכל××ž×Ÿ× ×¡×¢×£×¤×¥×¦×§×¨×©×ªï¿½ï¿½â€Žâ€ï¿½" - }, - "cp28598": "iso88598", - "iso88599": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßà áâãäåæçèéêëìÃîïğñòóôõö÷øùúûüışÿ" - }, - "cp28599": "iso88599", - "iso885910": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ĄĒĢĪĨĶ§ĻÄŠŦŽÂŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÃÂÃÄÅÆĮČÉĘËĖÃÃŽÃÃŅŌÓÔÕÖŨØŲÚÛÜÃÞßÄáâãäåæįÄéęëėÃîïðņÅóôõöũøųúûüýþĸ" - }, - "cp28600": "iso885910", - "iso885911": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ à¸à¸‚ฃคฅฆงจฉชซฌà¸à¸Žà¸à¸à¸‘ฒณดตถทธนบปผà¸à¸žà¸Ÿà¸ มยรฤลฦวศษสหฬà¸à¸®à¸¯à¸°à¸±à¸²à¸³à¸´à¸µà¸¶à¸·à¸¸à¸¹à¸ºï¿½ï¿½ï¿½ï¿½à¸¿à¹€à¹à¹‚ใไๅๆ็่้๊๋์à¹à¹Žà¹à¹à¹‘๒๓๔๕๖๗๘๙๚๛����" - }, - "cp28601": "iso885911", - "iso885913": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ â€Â¢Â£Â¤â€žÂ¦Â§Ã˜Â©Å–«¬Â®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲÅŚŪÜŻŽßąįÄćäåęēÄéźėģķīļšńņóÅõö÷ųłśūüżž’" - }, - "cp28603": "iso885913", - "iso885914": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲÂÂ®Å¸á¸žá¸ŸÄ Ä¡á¹€á¹Â¶á¹–áºá¹—ẃṠỳẄẅṡÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃŴÑÒÓÔÕÖṪØÙÚÛÜÃŶßà áâãäåæçèéêëìÃîïŵñòóôõöṫøùúûüýŷÿ" - }, - "cp28604": "iso885914", - "iso885915": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ¡¢£€¥Š§š©ª«¬Â®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÃÂÃÄÅÆÇÈÉÊËÌÃÃŽÃÃÑÒÓÔÕÖ×ØÙÚÛÜÃÞßà áâãäåæçèéêëìÃîïðñòóôõö÷øùúûüýþÿ" - }, - "cp28605": "iso885915", - "iso885916": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ĄąÅ€„Š§š©Ș«ŹÂźŻ°±ČłŽâ€Â¶Â·Å¾Äș»ŒœŸżÀÃÂĂÄĆÆÇÈÉÊËÌÃÃŽÃÄŃÒÓÔÅÖŚŰÙÚÛÜĘȚßà áâăäćæçèéêëìÃîïđńòóôőöśűùúûüęțÿ" - }, - "cp28606": "iso885916", - "cp437": { - "type": "_sbcs", - "chars": "Çüéâäà åçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáÃóúñѪº¿âŒÂ¬Â½Â¼Â¡Â«Â»â–‘▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√â¿Â²â–  " - }, - "ibm437": "cp437", - "csibm437": "cp437", - "cp737": { - "type": "_sbcs", - "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜÎΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπÏσςτυφχψ░▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀ωάÎήϊίόÏϋώΆΈΉΊΌΎÎ±≥≤ΪΫ÷≈°∙·√â¿Â²â–  " - }, - "ibm737": "cp737", - "csibm737": "cp737", - "cp775": { - "type": "_sbcs", - "chars": "ĆüéÄäģåćłēŖŗīŹÄÅÉæÆÅöĢ¢ŚśÖÜø£ØפĀĪóŻżźâ€Â¦Â©Â®Â¬Â½Â¼Å«»░▒▓│┤ĄČĘĖ╣║╗â•Ä®Å â”└┴┬├─┼ŲŪ╚╔╩╦╠â•â•¬Å½Ä…Äęėįšųūž┘┌█▄▌â–▀ÓßŌŃõÕµńĶķĻļņĒŅ’±“¾¶§÷„°∙·¹³²■ " - }, - "ibm775": "cp775", - "csibm775": "cp775", - "cp850": { - "type": "_sbcs", - "chars": "Çüéâäà åçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áÃóúñѪº¿®¬½¼¡«»░▒▓│┤ÃÂÀ©╣║╗â•Â¢Â¥â”└┴┬├─┼ãÃ╚╔╩╦╠â•â•¬Â¤Ã°ÃÊËÈıÃÃŽÃ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýï´Â±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm850": "cp850", - "csibm850": "cp850", - "cp852": { - "type": "_sbcs", - "chars": "ÇüéâäůćçłëÅőîŹÄĆÉĹĺôöĽľŚśÖÜŤťÅ×ÄáÃóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÃÂĚŞ╣║╗â•Å»Å¼â”└┴┬├─┼Ăă╚╔╩╦╠â•â•¬Â¤Ä‘ÄĎËÄŇÃÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÃţ´Â˲ˇ˘§÷¸°¨˙űŘř■ " - }, - "ibm852": "cp852", - "csibm852": "cp852", - "cp855": { - "type": "_sbcs", - "chars": "ђЂѓЃёÐєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџÐюЮъЪаÐбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗â•Ð¹Ð™â”└┴┬├─┼кК╚╔╩╦╠â•â•¬Â¤Ð»Ð›Ð¼ÐœÐ½ÐоОп┘┌█▄ПÑ▀ЯрРÑСтТуУжЖвВьЬ№ÂыЫзЗшШÑÐщЩчЧ§■ " - }, - "ibm855": "cp855", - "csibm855": "cp855", - "cp856": { - "type": "_sbcs", - "chars": "×בגדהוזחטיךכל××ž×Ÿ× ×¡×¢×£×¤×¥×¦×§×¨×©×ªï¿½Â£ï¿½Ã—ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½Â®Â¬Â½Â¼ï¿½Â«Â»â–‘â–’â–“â”‚â”¤ï¿½ï¿½ï¿½Â©â•£â•‘â•—â•Â¢Â¥â”└┴┬├─┼��╚╔╩╦╠â•â•¬Â¤ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½â”˜â”Œâ–ˆâ–„¦�▀������µ�������¯´Â±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm856": "cp856", - "csibm856": "cp856", - "cp857": { - "type": "_sbcs", - "chars": "Çüéâäà åçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáÃóúñÑĞ𿮬½¼¡«»░▒▓│┤ÃÂÀ©╣║╗â•Â¢Â¥â”└┴┬├─┼ãÃ╚╔╩╦╠â•â•¬Â¤ÂºÂªÃŠÃ‹Ãˆï¿½ÃÃŽÃ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´Â±�¾¶§÷¸°¨·¹³²■ " - }, - "ibm857": "cp857", - "csibm857": "cp857", - "cp858": { - "type": "_sbcs", - "chars": "Çüéâäà åçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áÃóúñѪº¿®¬½¼¡«»░▒▓│┤ÃÂÀ©╣║╗â•Â¢Â¥â”└┴┬├─┼ãÃ╚╔╩╦╠â•â•¬Â¤Ã°ÃÊËÈ€ÃÃŽÃ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýï´Â±‗¾¶§÷¸°¨·¹³²■ " - }, - "ibm858": "cp858", - "csibm858": "cp858", - "cp860": { - "type": "_sbcs", - "chars": "Çüéâãà ÃçêÊèÃÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáÃóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√â¿Â²â–  " - }, - "ibm860": "cp860", - "csibm860": "cp860", - "cp861": { - "type": "_sbcs", - "chars": "Çüéâäà åçêëèÃðÞÄÅÉæÆôöþûÃýÖÜø£Ø₧ƒáÃóúÃÃÓÚ¿âŒÂ¬Â½Â¼Â¡Â«Â»â–‘▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√â¿Â²â–  " - }, - "ibm861": "cp861", - "csibm861": "cp861", - "cp862": { - "type": "_sbcs", - "chars": "×בגדהוזחטיךכל××ž×Ÿ× ×¡×¢×£×¤×¥×¦×§×¨×©×ªÂ¢Â£Â¥â‚§Æ’Ã¡ÃóúñѪº¿âŒÂ¬Â½Â¼Â¡Â«Â»â–‘▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√â¿Â²â–  " - }, - "ibm862": "cp862", - "csibm862": "cp862", - "cp863": { - "type": "_sbcs", - "chars": "ÇüéâÂà ¶çêëèïî‗À§ÉÈÊôËÃûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯ÎâŒÂ¬Â½Â¼Â¾Â«Â»â–‘▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√â¿Â²â–  " - }, - "ibm863": "cp863", - "csibm863": "cp863", - "cp864": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$Ùª&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴â”┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� Âﺂ£¤ﺄ��ﺎïºïº•ïº™ØŒïºïº¡ïº¥Ù ١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀïºïºƒïº…ﻊﺋïºïº‘ﺓﺗﺛﺟﺣﺧﺩﺫïºïº¯ïº³ïº·ïº»ïº¿ï»ï»…ﻋï»Â¦Â¬Ã·Ã—ﻉـﻓﻗﻛﻟﻣﻧﻫï»ï»¯ï»³ïº½ï»Œï»Žï»ï»¡ï¹½Ù‘ﻥﻩﻬﻰﻲï»ï»•ï»µï»¶ï»ï»™ï»±â– �" - }, - "ibm864": "cp864", - "csibm864": "cp864", - "cp865": { - "type": "_sbcs", - "chars": "Çüéâäà åçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáÃóúñѪº¿âŒÂ¬Â½Â¼Â¡Â«Â¤â–‘▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√â¿Â²â–  " - }, - "ibm865": "cp865", - "csibm865": "cp865", - "cp866": { - "type": "_sbcs", - "chars": "ÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬÐЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀рÑтуфхцчшщъыьÑÑŽÑÐёЄєЇїЎў°∙·√№¤■ " - }, - "ibm866": "cp866", - "csibm866": "cp866", - "cp869": { - "type": "_sbcs", - "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Î²³ά£ÎήίϊÎÏŒÏΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜÎ╣║╗â•ÎžÎŸâ”└┴┬├─┼ΠΡ╚╔╩╦╠â•â•¬Î£Î¤Î¥Î¦Î§Î¨Î©Î±Î²Î³â”˜â”Œâ–ˆâ–„δε▀ζηθικλμνξοπÏσςτ΄Â±υφχ§ψ΅°¨ωϋΰώ■ " - }, - "ibm869": "cp869", - "csibm869": "cp869", - "cp922": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ¡¢£¤¥¦§¨©ª«¬Â®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÃÂÃÄÅÆÇÈÉÊËÌÃÎÊÑÒÓÔÕÖ×ØÙÚÛÜÃŽßà áâãäåæçèéêëìÃîïšñòóôõö÷øùúûüýžÿ" - }, - "ibm922": "cp922", - "csibm922": "cp922", - "cp1046": { - "type": "_sbcs", - "chars": "ﺈ×÷ﹱˆ■│─â”┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎï»ï»ï»¶ï»¸ï»ºï»¼Â ¤ﺋﺑﺗﺛﺟﺣ،Âﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجØخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـÙقكلمنهوىيًٌÙÙŽÙÙّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" - }, - "ibm1046": "cp1046", - "csibm1046": "cp1046", - "cp1124": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ÐЂÒЄЅІЇЈЉЊЋЌÂÐŽÐÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬÐЮЯабвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ№ёђґєѕіїјљњћќ§ўџ" - }, - "ibm1124": "cp1124", - "csibm1124": "cp1124", - "cp1125": { - "type": "_sbcs", - "chars": "ÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬÐЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀рÑтуфхцчшщъыьÑÑŽÑÐÑ‘ÒґЄєІіЇї·√№¤■ " - }, - "ibm1125": "cp1125", - "csibm1125": "cp1125", - "cp1129": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ¡¢£¤¥¦§œ©ª«¬Â®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÃÂĂÄÅÆÇÈÉÊË̀ÃÃŽÃÄÃ‘Ì‰Ã“Ã”Æ Ã–Ã—Ã˜Ã™ÃšÃ›ÃœÆ¯ÌƒÃŸÃ Ã¡Ã¢ÄƒÃ¤Ã¥Ã¦Ã§Ã¨Ã©ÃªÃ«ÌÃîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1129": "cp1129", - "csibm1129": "cp1129", - "cp1133": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ àºàº‚ຄງຈສຊàºàº”ຕຖທນບປຜàºàºžàºŸàº¡àº¢àº£àº¥àº§àº«àºàº®ï¿½ï¿½ï¿½àº¯àº°àº²àº³àº´àºµàº¶àº·àº¸àº¹àº¼àº±àº»àº½ï¿½ï¿½ï¿½à»€à»à»‚ໃໄ່້໊໋໌à»à»†ï¿½à»œà»â‚����������������à»à»‘໒໓໔໕໖໗໘໙��¢¬¦�" - }, - "ibm1133": "cp1133", - "csibm1133": "cp1133", - "cp1161": { - "type": "_sbcs", - "chars": "��������������������������������่à¸à¸‚ฃคฅฆงจฉชซฌà¸à¸Žà¸à¸à¸‘ฒณดตถทธนบปผà¸à¸žà¸Ÿà¸ มยรฤลฦวศษสหฬà¸à¸®à¸¯à¸°à¸±à¸²à¸³à¸´à¸µà¸¶à¸·à¸¸à¸¹à¸ºà¹‰à¹Šà¹‹â‚¬à¸¿à¹€à¹à¹‚ใไๅๆ็่้๊๋์à¹à¹Žà¹à¹à¹‘๒๓๔๕๖๗๘๙๚๛¢¬¦ " - }, - "ibm1161": "cp1161", - "csibm1161": "cp1161", - "cp1162": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“â€â€¢â€“—˜™š›œÂžŸ à¸à¸‚ฃคฅฆงจฉชซฌà¸à¸Žà¸à¸à¸‘ฒณดตถทธนบปผà¸à¸žà¸Ÿà¸ มยรฤลฦวศษสหฬà¸à¸®à¸¯à¸°à¸±à¸²à¸³à¸´à¸µà¸¶à¸·à¸¸à¸¹à¸ºï¿½ï¿½ï¿½ï¿½à¸¿à¹€à¹à¹‚ใไๅๆ็่้๊๋์à¹à¹Žà¹à¹à¹‘๒๓๔๕๖๗๘๙๚๛����" - }, - "ibm1162": "cp1162", - "csibm1162": "cp1162", - "cp1163": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ¡¢£€¥¦§œ©ª«¬Â®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÃÂĂÄÅÆÇÈÉÊË̀ÃÃŽÃÄÃ‘Ì‰Ã“Ã”Æ Ã–Ã—Ã˜Ã™ÃšÃ›ÃœÆ¯ÌƒÃŸÃ Ã¡Ã¢ÄƒÃ¤Ã¥Ã¦Ã§Ã¨Ã©ÃªÃ«ÌÃîïđṇ̃óôơö÷øùúûüư₫ÿ" - }, - "ibm1163": "cp1163", - "csibm1163": "cp1163", - "maccroatian": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáà âäãåçéèêëÃìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑âˆÅ¡âˆ«ÂªÂºâ„¦Å¾Ã¸Â¿Â¡Â¬âˆšÆ’≈Ć«Č… ÀÃÕŒœÄ—“â€â€˜â€™Ã·â—Šï¿½Â©â„¤‹›Æ»–·‚„‰ÂćÃÄÈÃÃŽÃÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" - }, - "maccyrillic": { - "type": "_sbcs", - "chars": "ÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬÐЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“â€â€˜â€™Ã·â€žÐŽÑžÐÑŸâ„–ÐÑ‘ÑабвгдежзийклмнопрÑтуфхцчшщъыьÑю¤" - }, - "macgreek": { - "type": "_sbcs", - "chars": "Ĺ²É³ÖÜ΅à âä΄¨çéèê룙î‰ôö¦Âùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάάΟΡ≈Τ«»… ΥΧΆΈœ–―“â€â€˜â€™Ã·Î‰ÎŠÎŒÎŽÎήίόÎÏαβψδεφγηιξκλμνοπώÏστθωςχυζϊϋÎΰ�" - }, - "maciceland": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáà âäãåçéèêëÃìîïñóòôöõúùûü𢣧•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑âˆÏ€âˆ«ÂªÂºâ„¦Ã¦Ã¸Â¿Â¡Â¬âˆšÆ’≈∆«»… ÀÃÕŒœ–—“â€â€˜â€™Ã·â—ŠÃ¿Å¸â„¤ÃðÞþý·‚„‰ÂÊÃËÈÃÃŽÃÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸Ë˛ˇ" - }, - "macroman": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáà âäãåçéèêëÃìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑âˆÏ€âˆ«ÂªÂºâ„¦Ã¦Ã¸Â¿Â¡Â¬âˆšÆ’≈∆«»… ÀÃÕŒœ–—“â€â€˜â€™Ã·â—ŠÃ¿Å¸â„¤‹›ï¬ï¬‚‡·‚„‰ÂÊÃËÈÃÃŽÃÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸Ë˛ˇ" - }, - "macromania": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáà âäãåçéèêëÃìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑âˆÏ€âˆ«ÂªÂºâ„¦ÄƒÅŸÂ¿Â¡Â¬âˆšÆ’≈∆«»… ÀÃÕŒœ–—“â€â€˜â€™Ã·â—ŠÃ¿Å¸â„¤‹›Ţţ‡·‚„‰ÂÊÃËÈÃÃŽÃÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸Ë˛ˇ" - }, - "macthai": { - "type": "_sbcs", - "chars": "«»…ï¢ï¢’“â€ï¢™ï¿½â€¢ï¢„ï¢ï¢ï¢“‘’� à¸à¸‚ฃคฅฆงจฉชซฌà¸à¸Žà¸à¸à¸‘ฒณดตถทธนบปผà¸à¸žà¸Ÿà¸ มยรฤลฦวศษสหฬà¸à¸®à¸¯à¸°à¸±à¸²à¸³à¸´à¸µà¸¶à¸·à¸¸à¸¹à¸ºï»¿â€‹â€“—฿เà¹à¹‚ใไๅๆ็่้๊๋์à¹â„¢à¹à¹à¹‘๒๓๔๕๖๗๘๙®©����" - }, - "macturkish": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáà âäãåçéèêëÃìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑âˆÏ€âˆ«ÂªÂºâ„¦Ã¦Ã¸Â¿Â¡Â¬âˆšÆ’≈∆«»… ÀÃÕŒœ–—“â€â€˜â€™Ã·â—ŠÃ¿Å¸ÄžÄŸÄ°Ä±ÅžÅŸâ€¡Â·â€šâ€žâ€°Ã‚ÊÃËÈÃÃŽÃÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸Ë˛ˇ" - }, - "macukraine": { - "type": "_sbcs", - "chars": "ÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬÐЮЯ†°Ò£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“â€â€˜â€™Ã·â€žÐŽÑžÐÑŸâ„–ÐÑ‘ÑабвгдежзийклмнопрÑтуфхцчшщъыьÑю¤" - }, - "koi8r": { - "type": "_sbcs", - "chars": "─│┌â”└┘├┤┬┴┼▀▄█▌â–░▒▓⌠■∙√≈≤≥ ⌡°²·÷â•â•‘╒ё╓╔╕╖╗╘╙╚╛╜â•â•žâ•Ÿâ• â•¡Ð╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопÑÑ€ÑтужвьызшÑщчъЮÐБЦДЕФГХИЙКЛМÐОПЯРСТУЖВЬЫЗШÐЩЧЪ" - }, - "koi8u": { - "type": "_sbcs", - "chars": "─│┌â”└┘├┤┬┴┼▀▄█▌â–░▒▓⌠■∙√≈≤≥ ⌡°²·÷â•â•‘╒ёє╔ії╗╘╙╚╛ґâ•â•žâ•Ÿâ• â•¡ÐЄ╣ІЇ╦╧╨╩╪Ò╬©юабцдефгхийклмнопÑÑ€ÑтужвьызшÑщчъЮÐБЦДЕФГХИЙКЛМÐОПЯРСТУЖВЬЫЗШÐЩЧЪ" - }, - "koi8ru": { - "type": "_sbcs", - "chars": "─│┌â”└┘├┤┬┴┼▀▄█▌â–░▒▓⌠■∙√≈≤≥ ⌡°²·÷â•â•‘╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ÐЄ╣ІЇ╦╧╨╩╪ÒЎ©юабцдефгхийклмнопÑÑ€ÑтужвьызшÑщчъЮÐБЦДЕФГХИЙКЛМÐОПЯРСТУЖВЬЫЗШÐЩЧЪ" - }, - "koi8t": { - "type": "_sbcs", - "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“â€â€¢â€“—�™�›�����ӯӮё¤ӣ¦§���«¬Â®�°±²Ð�Ӣ¶·�№�»���©юабцдефгхийклмнопÑÑ€ÑтужвьызшÑщчъЮÐБЦДЕФГХИЙКЛМÐОПЯРСТУЖВЬЫЗШÐЩЧЪ" - }, - "armscii8": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ �և։)(»«—.Õ,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽÕÔ¾Õ®Ô¿Õ¯Õ€Õ°ÕձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռÕÕ½ÕŽÕ¾ÕÕ¿ÕÖ€Õ‘ÖՒւՓփՔքՕօՖֆ՚�" - }, - "rk1048": { - "type": "_sbcs", - "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺÐђ‘’“â€â€¢â€“—�™љ›њқһџ ҰұӘ¤Ө¦§Ð©Ғ«¬Â®Ү°±Ііөµ¶·ё№ғ»әҢңүÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬÐЮЯабвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ" - }, - "tcvn": { - "type": "_sbcs", - "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÃá»´\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÃẠẶẬÈẺẼÉẸỆÌỈĨÃá»ŠÃ’á»ŽÃ•Ã“á»Œá»˜á»œá»žá» á»šá»¢Ã™á»¦Å¨Â Ä‚Ã‚ÃŠÃ”Æ Æ¯ÄăâêôơưđẰ̀̉̃Ị̀à ảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấáºÃ¨á»‚ẻẽéẹá»á»ƒá»…ếệìỉỄẾỒĩÃịòỔá»ÃµÃ³á»á»“ổỗốộá»á»Ÿá»¡á»›á»£Ã¹á»–ủũúụừá»á»¯á»©á»±á»³á»·á»¹Ã½á»µá»" - }, - "georgianacademy": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“â€â€¢â€“—˜™š›œÂžŸ ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶·¸¹º»¼½¾¿áƒáƒ‘გდევზთიკლმნáƒáƒžáƒŸáƒ სტუფქღყშჩცძწáƒáƒ®áƒ¯áƒ°áƒ±áƒ²áƒ³áƒ´áƒµáƒ¶Ã§Ã¨Ã©ÃªÃ«Ã¬Ãîïðñòóôõö÷øùúûüýþÿ" - }, - "georgianps": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“â€â€¢â€“—˜™š›œÂžŸ ¡¢£¤¥¦§¨©ª«¬Â®¯°±²³´µ¶·¸¹º»¼½¾¿áƒáƒ‘გდევზჱთიკლმნჲáƒáƒžáƒŸáƒ სტჳუფქღყშჩცძწáƒáƒ®áƒ´áƒ¯áƒ°áƒµÃ¦Ã§Ã¨Ã©ÃªÃ«Ã¬Ãîïðñòóôõö÷øùúûüýþÿ" - }, - "pt154": { - "type": "_sbcs", - "chars": "Ò–Ò’Ó®Ò“â€žâ€¦Ò¶Ò®Ò²Ò¯Ò Ó¢Ò¢ÒšÒºÒ¸Ò—â€˜â€™â€œâ€â€¢â€“—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ð©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫÒÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬÐЮЯабвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ" - }, - "viscii": { - "type": "_sbcs", - "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dá»´\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆá»á»’ỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩáºáº½áº¹áº¿á»á»ƒá»…á»‡á»‘á»“á»•á»—á» Æ á»™á»á»Ÿá»‹á»°á»¨á»ªá»¬Æ¡á»›Æ¯Ã€ÃÂÃẢĂẳẵÈÉÊẺÌÃĨỳÄứÒÓÔạỷừá»Ã™Ãšá»¹á»µÃỡưà áâãảăữẫèéêẻìÃĩỉđựòóôõá»á»á»¥Ã¹ÃºÅ©á»§Ã½á»£á»®" - }, - "iso646cn": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#Â¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "iso646jp": { - "type": "_sbcs", - "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[Â¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" - }, - "hproman8": { - "type": "_sbcs", - "chars": "€Â‚ƒ„…†‡ˆ‰Š‹ŒÂŽ‘’“”•–—˜™š›œÂžŸ ÀÂÈÊËÎôˋˆ¨˜ÙÛ₤¯Ãý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúà èòùäëöüÅîØÆåÃøæÄìÖÜÉïßÔÃÃãÃðÃÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" - }, - "macintosh": { - "type": "_sbcs", - "chars": "ÄÅÇÉÑÖÜáà âäãåçéèêëÃìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑âˆÏ€âˆ«ÂªÂºâ„¦Ã¦Ã¸Â¿Â¡Â¬âˆšÆ’≈∆«»… ÀÃÕŒœ–—“â€â€˜â€™Ã·â—ŠÃ¿Å¸â„¤‹›ï¬ï¬‚‡·‚„‰ÂÊÃËÈÃÃŽÃÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸Ë˛ˇ" - }, - "ascii": { - "type": "_sbcs", - "chars": "��������������������������������������������������������������������������������������������������������������������������������" - }, - "tis620": { - "type": "_sbcs", - "chars": "���������������������������������à¸à¸‚ฃคฅฆงจฉชซฌà¸à¸Žà¸à¸à¸‘ฒณดตถทธนบปผà¸à¸žà¸Ÿà¸ มยรฤลฦวศษสหฬà¸à¸®à¸¯à¸°à¸±à¸²à¸³à¸´à¸µà¸¶à¸·à¸¸à¸¹à¸ºï¿½ï¿½ï¿½ï¿½à¸¿à¹€à¹à¹‚ใไๅๆ็่้๊๋์à¹à¹Žà¹à¹à¹‘๒๓๔๕๖๗๘๙๚๛����" - } -} \ No newline at end of file diff --git a/node_modules/iconv-lite/encodings/sbcs-data.js b/node_modules/iconv-lite/encodings/sbcs-data.js deleted file mode 100644 index fdb81a39ac985322057f18f455f9f1160e7ac17f..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/sbcs-data.js +++ /dev/null @@ -1,174 +0,0 @@ -"use strict"; - -// Manually added data to be used by sbcs codec in addition to generated one. - -module.exports = { - // Not supported by iconv, not sure why. - "10029": "maccenteuro", - "maccenteuro": { - "type": "_sbcs", - "chars": "ÄĀÄÉĄÖÜáąČäÄĆć鏟ĎÃÄĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňÅÕőŌ–—“â€â€˜â€™Ã·â—ŠÅŔŕŘ‹›řŖŗŠ‚„šŚśÃŤťÃŽžŪÓÔūŮÚůŰűŲųÃýķŻÅżĢˇ" - }, - - "808": "cp808", - "ibm808": "cp808", - "cp808": { - "type": "_sbcs", - "chars": "ÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬÐЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗â•â•œâ•›â”└┴┬├─┼╞╟╚╔╩╦╠â•â•¬â•§â•¨â•¤â•¥â•™â•˜â•’╓╫╪┘┌█▄▌â–▀рÑтуфхцчшщъыьÑÑŽÑÐёЄєЇїЎў°∙·√№€■ " - }, - - "mik": { - "type": "_sbcs", - "chars": "ÐБВГДЕЖЗИЙКЛМÐОПРСТУФХЦЧШЩЪЫЬÐЮЯабвгдежзийклмнопрÑтуфхцчшщъыьÑÑŽÑ└┴┬├─┼╣║╚╔╩╦╠â•â•¬â”░▒▓│┤№§╗â•â”˜â”Œâ–ˆâ–„â–Œâ–▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√â¿Â²â–  " - }, - - // Aliases of generated encodings. - "ascii8bit": "ascii", - "usascii": "ascii", - "ansix34": "ascii", - "ansix341968": "ascii", - "ansix341986": "ascii", - "csascii": "ascii", - "cp367": "ascii", - "ibm367": "ascii", - "isoir6": "ascii", - "iso646us": "ascii", - "iso646irv": "ascii", - "us": "ascii", - - "latin1": "iso88591", - "latin2": "iso88592", - "latin3": "iso88593", - "latin4": "iso88594", - "latin5": "iso88599", - "latin6": "iso885910", - "latin7": "iso885913", - "latin8": "iso885914", - "latin9": "iso885915", - "latin10": "iso885916", - - "csisolatin1": "iso88591", - "csisolatin2": "iso88592", - "csisolatin3": "iso88593", - "csisolatin4": "iso88594", - "csisolatincyrillic": "iso88595", - "csisolatinarabic": "iso88596", - "csisolatingreek" : "iso88597", - "csisolatinhebrew": "iso88598", - "csisolatin5": "iso88599", - "csisolatin6": "iso885910", - - "l1": "iso88591", - "l2": "iso88592", - "l3": "iso88593", - "l4": "iso88594", - "l5": "iso88599", - "l6": "iso885910", - "l7": "iso885913", - "l8": "iso885914", - "l9": "iso885915", - "l10": "iso885916", - - "isoir14": "iso646jp", - "isoir57": "iso646cn", - "isoir100": "iso88591", - "isoir101": "iso88592", - "isoir109": "iso88593", - "isoir110": "iso88594", - "isoir144": "iso88595", - "isoir127": "iso88596", - "isoir126": "iso88597", - "isoir138": "iso88598", - "isoir148": "iso88599", - "isoir157": "iso885910", - "isoir166": "tis620", - "isoir179": "iso885913", - "isoir199": "iso885914", - "isoir203": "iso885915", - "isoir226": "iso885916", - - "cp819": "iso88591", - "ibm819": "iso88591", - - "cyrillic": "iso88595", - - "arabic": "iso88596", - "arabic8": "iso88596", - "ecma114": "iso88596", - "asmo708": "iso88596", - - "greek" : "iso88597", - "greek8" : "iso88597", - "ecma118" : "iso88597", - "elot928" : "iso88597", - - "hebrew": "iso88598", - "hebrew8": "iso88598", - - "turkish": "iso88599", - "turkish8": "iso88599", - - "thai": "iso885911", - "thai8": "iso885911", - - "celtic": "iso885914", - "celtic8": "iso885914", - "isoceltic": "iso885914", - - "tis6200": "tis620", - "tis62025291": "tis620", - "tis62025330": "tis620", - - "10000": "macroman", - "10006": "macgreek", - "10007": "maccyrillic", - "10079": "maciceland", - "10081": "macturkish", - - "cspc8codepage437": "cp437", - "cspc775baltic": "cp775", - "cspc850multilingual": "cp850", - "cspcp852": "cp852", - "cspc862latinhebrew": "cp862", - "cpgr": "cp869", - - "msee": "cp1250", - "mscyrl": "cp1251", - "msansi": "cp1252", - "msgreek": "cp1253", - "msturk": "cp1254", - "mshebr": "cp1255", - "msarab": "cp1256", - "winbaltrim": "cp1257", - - "cp20866": "koi8r", - "20866": "koi8r", - "ibm878": "koi8r", - "cskoi8r": "koi8r", - - "cp21866": "koi8u", - "21866": "koi8u", - "ibm1168": "koi8u", - - "strk10482002": "rk1048", - - "tcvn5712": "tcvn", - "tcvn57121": "tcvn", - - "gb198880": "iso646cn", - "cn": "iso646cn", - - "csiso14jisc6220ro": "iso646jp", - "jisc62201969ro": "iso646jp", - "jp": "iso646jp", - - "cshproman8": "hproman8", - "r8": "hproman8", - "roman8": "hproman8", - "xroman8": "hproman8", - "ibm1051": "hproman8", - - "mac": "macintosh", - "csmacintosh": "macintosh", -}; - diff --git a/node_modules/iconv-lite/encodings/tables/big5-added.json b/node_modules/iconv-lite/encodings/tables/big5-added.json deleted file mode 100644 index 3c3d3c2f7b14c6a570e58184f68ef0894a5f812d..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/tables/big5-added.json +++ /dev/null @@ -1,122 +0,0 @@ -[ -["8740","ä°ä°²ä˜ƒä–¦ä•¸ð§‰§äµ·ä–³ð§²±ä³¢ð§³…㮕䜶ä„䱇䱀𤊿𣘗ð§’𦺋𧃒䱗ðª‘ä䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡æ™å›»"], -["8767","綕å¤ð¨®¹ã·´éœ´ð§¯¯å¯›ð¡µžåª¤ã˜¥ð©º°å«‘å®·å³¼æ®è–“ð©¥…ç‘¡ç’㡵𡵓𣚞𦀡㻬"], -["87a1","𥣞㫵竼龗𤅡ð¨¤ð£‡ªð ªŠð£‰žäŒŠè’„é¾–é¯ä¤°è˜“墖éŠéˆ˜ç§ç¨²æ™ 権è¢ç‘Œç¯…枂稬å‰é†ã“¦ç„ð¥¶¹ç“†é¿‡åž³ä¤¯å‘Œä„±ð£šŽå ˜ç©²ð§¥è®äš®ð¦ºˆä†ð¥¶™ç®®ð¢’¼é¿ˆð¢“𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿æ‹ç®é¿‹"], -["8840","㇀",4,"𠄌㇅𠃑ð ƒã‡†ã‡‡ð ƒ‹ð¡¿¨ã‡ˆð ƒŠã‡‰ã‡Šã‡‹ã‡Œð „Žã‡ã‡ŽÄ€ÃÇÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊÄáǎà ɑēéěèīÃÇìÅóǒòūúǔùǖǘǚ"], -["88a1","ǜü࿿ê̄ế࿿ê̌á»ÃªÉ¡âšâ›"], -["8940","𪎩𡅅"], -["8943","攊"], -["8946","丽æ»éµŽé‡Ÿ"], -["894c","𧜵撑会伨侨兖兴农凤务动医åŽå‘å˜å›¢å£°å¤„备夲头å¦å®žå®Ÿå²šåº†æ€»æ–‰æŸ¾æ „桥济炼电纤纬纺织ç»ç»Ÿç¼†ç¼·è‰ºè‹è¯è§†è®¾è¯¢è½¦è½§è½®"], -["89a1","ç‘ç³¼ç·æ¥†ç«‰åˆ§"], -["89ab","醌碸酞肼"], -["89b0","贋胶𠧧"], -["89b5","肟黇ä³é·‰é¸Œä°¾ð©·¶ð§€Žé¸Šðª„³ã—"], -["89c1","溚舾甙"], -["89c5","䤑马éªé¾™ç¦‡ð¨‘¬ð¡·Šð —𢫦两äºäº€äº‡äº¿ä»«ä¼·ã‘Œä¾½ã¹ˆå€ƒå‚ˆã‘½ã’“㒥円夅凛凼刅争剹åŠåŒ§ã—‡åŽ©ã•‘厰㕓å‚å£ã•ã•²ãšå’“咣咴咹å“哯唘唣唨㖘唿㖥㖿嗗㗅"], -["8a40","𧶄唥"], -["8a43","𠱂𠴕𥄫å–𢳆㧬ð 蹆𤶸𩓥ä“𨂾çºð¢°¸ã¨´äŸ•ð¨…𦧲𤷪æ“𠵼𠾴𠳕𡃴æ’蹾𠺖𠰋𠽤𢲩𨉖𤓓"], -["8a64","𠵆ð©©ð¨ƒ©äŸ´ð¤º§ð¢³‚骲㩧𩗴ã¿ã”†ð¥‹‡ð©Ÿ”ð§£ˆð¢µ„éµ®é •"], -["8a76","ä™ð¦‚¥æ’´å“£ð¢µŒð¢¯Šð¡·ã§»ð¡¯"], -["8aa1","𦛚𦜖𧦠擪ð¥’𠱃蹨𢆡ð¨Œð œ±"], -["8aac","ä ‹ð †©ã¿ºå¡³ð¢¶"], -["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"], -["8abb","䪴𢩦ð¡‚膪飵𠶜æ¹ã§¾ð¢µè·€åš¡æ‘¼ã¹ƒ"], -["8ac9","ðª˜ð ¸‰ð¢«ð¢³‰"], -["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"], -["8adf","𧕴𢺋𢈈𪙛ð¨³ð ¹ºð °´ð¦ œç¾“ð¡ƒð¢ ƒð¢¤¹ã—»ð¥‡£ð ºŒð ¾ð ºªã¾“𠼰𠵇ð¡…𠹌"], -["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖æ²ð ¾"], -["8b40","ð£´ð§˜¹ð¢¯Žð µ¾ð µ¿ð¢±‘𢱕㨘𠺘𡃇𠼮𪘲ð¦ð¨³’𨶙𨳊閪哌苄喹"], -["8b55","𩻃鰦骶ð§žð¢·®ç…€è…胬尜𦕲脴㞗åŸð¨‚½é†¶ð »ºð ¸ð ¹·ð »»ã—𤷫㘉𠳖嚯𢞵𡃉ð ¸ð ¹¸ð¡¸ð¡…ˆð¨ˆ‡ð¡‘•ð ¹¹ð¤¹ð¢¶¤å©”ð¡€ð¡€žð¡ƒµð¡ƒ¶åžœð ¸‘"], -["8ba1","𧚔ð¨‹ð ¾µð ¹»ð¥…¾ãœƒð ¾¶ð¡†€ð¥‹˜ðªŠ½ð¤§šð¡ ºð¤…·ð¨‰¼å¢™å‰¨ã˜šð¥œ½ç®²å¨ä €ä¬¬é¼§ä§§é°Ÿé®ð¥´ð£„½å—»ã—²åš‰ä¸¨å¤‚ð¡¯ð¯¡¸é‘𠂆乛亻㔾尣彑忄㣺扌攵æºæ°µæ°ºç¬çˆ«ä¸¬çŠð¤£©ç½’礻糹罓𦉪ã“"], -["8bde","ð¦‹è€‚肀𦘒𦥑å衤è§ð§¢²è® è´é’…镸长门ð¨¸éŸ¦é¡µé£Žé£žé¥£ð© 鱼鸟黄æ¯ï¤‡ä¸·ð ‚‡é˜æˆ·é’¢"], -["8c40","倻淾𩱳龦㷉è¢ð¤…Žç·å³µä¬ ð¥‡ã•™ð¥´°æ„¢ð¨¨²è¾§é‡¶ç†‘朙玺ð£Šðª„‡ã²‹ð¡¦€ä¬ç£¤ç‚冮ð¨œä€‰æ©£ðªŠºäˆ£è˜ð ©¯ç¨ªð©¥‡ð¨«ªé•ç匤ð¢¾é´ç›™ð¨§£é¾§çŸäº£ä¿°å‚¼ä¸¯ä¼—龨å´ç¶‹å¢’å£ð¡¶¶åº’庙忂𢜒斋"], -["8ca1","ð£¹æ¤™æ©ƒð£±£æ³¿"], -["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩è¢é¾ªèº¹é¾«è¿è•Ÿé§ 鈡龬𨶹ð¡¿ä±äŠ¢å¨š"], -["8cc9","顨æ«ä‰¶åœ½"], -["8cce","藖𤥻芿ð§„ä²ð¦µ´åµ»ð¦¬•ð¦¾¾é¾é¾®å®–龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"], -["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤ð¦±è«Œä¾´ð ˆ¹å¦¿è…¬é¡–𩣺弻"], -["8d40","𠮟"], -["8d42","ð¢‡ð¨¥ä„‚äš»ð©¹ã¼‡é¾³ðª†µäƒ¸ãŸ–䛷𦱆䅼𨚲ð§¿ä•ã£”𥒚䕡䔛䶉䱻䵶䗪㿈ð¤¬ã™¡ä“žä’½ä‡å´¾åµˆåµ–ã·¼ã 嶤嶹ã 㠸幂庽弥徃㤈㤔㤿ã¥æƒ—愽峥㦉憷憹æ‡ã¦¸æˆ¬æŠæ‹¥æŒ˜ã§¸åš±"], -["8da1","㨃æ¢æ»æ‡æ‘šã©‹æ“€å´•å˜¡é¾Ÿãª—斆㪽旿晓㫲暒㬢朖ã‚æž¤æ €ã˜æ¡Šæ¢„ã²ã±ã»æ¤‰æ¥ƒç‰œæ¥¤æ¦Ÿæ¦…㮼槖ã¯æ©¥æ©´æ©±æª‚㯬檙㯲檫檵櫔櫶æ®æ¯æ¯ªæ±µæ²ªã³‹æ´‚洆洦æ¶ã³¯æ¶¤æ¶±æ¸•æ¸˜æ¸©æº†ð¨§€æº»æ»¢æ»šé½¿æ»¨æ»©æ¼¤æ¼´ãµ†ð£½æ¾æ¾¾ãµªãµµç†·å²™ã¶Šç€¬ã¶‘çç”ç¯ç¿ç‚‰ð Œ¥ä㗱𠻘"], -["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩å´ç©‰ð¥£¡ð©“™ç©¥ç©½ð¥¦¬çª»çª°ç«‚竃燑ð¦’䇊竚ç«ç«ªä‡¯å’²ð¥°ç¬‹ç•ç¬©ð¥ŒŽð¥³¾ç®¢ç¯èŽœð¥®´ð¦±¿ç¯è¡ç®’箸𥴠ã¶ð¥±¥è’’篺簆簵ð¥³ç±„粃𤢂粦晽𤕸糉糇糦籴糳糵糎"], -["8ea1","繧ä”𦹄çµð¦»–ç’綉綫焵綳緒ð¤—𦀩緤㴓緵𡟹緥ð¨ç¸ð¦„¡ð¦…šç¹®çº’䌫鑬縧罀ç½ç½‡ç¤¶ð¦‹é§¡ç¾—ð¦‘羣𡙡ð ¨ä•œð£¦ä”ƒð¨Œºç¿ºð¦’‰è€…耈è€è€¨è€¯ðª‚‡ð¦³ƒè€»è€¼è¡ð¢œ”䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩ð ¬ð¦©’𣵾俹𡓽蓢è¢ð¦¬Šð¤¦§ð£”°ð¡³ð£·¸èŠªæ¤›ð¯¦”䇛"], -["8f40","è•‹è‹èŒšð ¸–ð¡ž´ã›ð£…½ð£•šè‰»è‹¢èŒ˜ð£º‹ð¦¶£ð¦¬…𦮗𣗎㶿èŒå—¬èŽ…䔋𦶥莬èè“㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞èèŽ‘ä’ è’“è“¤ð¥²‘ä‰€ð¥³€ä•ƒè”´å«²ð¦º™ä”§è•³ä”–æž¿è˜–"], -["8fa1","𨘥𨘻è—𧂈蘂𡖂ð§ƒð¯¦²ä•ªè˜¨ã™ˆð¡¢¢å·ð§Žšè™¾è±ðªƒ¸èŸ®ð¢°§èž±èŸšè 噡虬桖ä˜è¡…衆𧗠𣶹𧗤衞袜䙛袴袵æ装ç·ð§œè¦‡è¦Šè¦¦è¦©è¦§è¦¼ð¨¨¥è§§ð§¤¤ð§ª½èªœçž“釾èªð§©™ç«©ð§¬ºð£¾äœ“𧬸煼謌謟ð¥°ð¥•¥è¬¿èŒè誩𤩺è®è®›èª¯ð¡›Ÿä˜•è¡è²›ð§µ”ð§¶ð¯§”㜥𧵓賖𧶘𧶽贒贃ð¡¤è³›çœè´‘𤳉ã»èµ·"], -["9040","趩𨀂𡀔𤦊ã¼ð¨†¼ð§„Œç«§èºèº¶è»ƒé‹”è¼™è¼ð¨¥ð¨’辥錃𪊟ð ©è¾³ä¤ªð¨§žð¨”½ð£¶»å»¸ð£‰¢è¿¹ðª€”𨚼ð¨”𢌥㦀𦻗逷𨔼𧪾é¡ð¨•¬ð¨˜‹é‚¨ð¨œ“郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟é‰é‰¢ð¥–¹éŠ¹ð¨«†ð£²›ð¨¬Œð¥—›"], -["90a1","𠴱錬é«ð¨«¡ð¨¯«ç‚嫃𨫢𨫥䥥鉄𨯬𨰹𨯿é³é‘›èº¼é–…é–¦é¦é– 濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽åŒä¦¡ð¦²¸ð ‰´ð¦ð©‚¯ð©ƒ¥ð¤«‘𡤕𣌊霱虂霶ä¨ä”½ä–…𤫩çµå霛éœð©‡•é—åŠð©‡«éŸé¥åƒð£‚·ð£‚¼éž‰éžŸéž±éž¾éŸ€éŸ’éŸ ð¥‘¬éŸ®çœð©³éŸ¿éŸµð©ð§¥ºä«‘é ´é ³é¡‹é¡¦ã¬Žð§…µãµ‘ð ˜°ð¤…œ"], -["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬é¸é¤¹ð¤¨©ä²ð©¡—𩤅駵騌騻é¨é©˜ð¥œ¥ã›„ð©‚±ð©¯•é« é«¢ð©¬…é«´ä°Žé¬”é¬ð¨˜€å€´é¬´ð¦¦¨ã£ƒð£½éé€ð©´¾å©…𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"], -["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴éºéº•éºžéº¢ä´´éºªéº¯ð¤¤é»ã 㧥ã´ä¼²ãž¾ð¨°«é¼‚鼈䮖é¤ð¦¶¢é¼—鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸ð¤ˆð¤©‘玞𨯚𡣺禟𨥾𨸶é©é³ð¨©„鋬éŽé‹ð¨¥¬ð¤’¹çˆ—㻫ç²ç©ƒçƒð¤‘³ð¤¸ç…¾ð¡Ÿ¯ç‚£ð¡¢¾ð£–™ã»‡ð¡¢…ð¥¯ð¡Ÿ¸ãœ¢ð¡›»ð¡ ¹ã›¡ð¡´ð¡£‘𥽋㜣𡛀å›ð¤¨¥ð¡¾ð¡Š¨"], -["9240","ð¡†ð¡’¶è”ƒð£š¦è”ƒè‘•ð¤¦”𧅥𣸱𥕜𣻻ð§’䓴𣛮ð©¦ð¦¼¦æŸ¹ãœ³ã°•ã·§å¡¬ð¡¤¢æ ä—𣜿𤃡𤂋ð¤„𦰡哋嚞𦚱嚒𠿟𠮨ð ¸é†ð¨¬“鎜仸儫㠙ð¤¶äº¼ð ‘¥ð ¿ä½‹ä¾Šð¥™‘婨𠆫ð ‹ã¦™ð ŒŠð ”ãµä¼©ð ‹€ð¨º³ð ‰µè«šð ˆŒäº˜"], -["92a1","åƒå„侢伃𤨎𣺊佂倮å¬å‚俌俥å˜åƒ¼å…™å…›å…å…žæ¹¶ð£–•ð£¸¹ð£º¿æµ²ð¡¢„ð£º‰å†¨å‡ƒð — ä“𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡é®ä™ºç†Œð¤ŽŒð ° 𤦬𡃤槑ð ¸ç‘¹ã»žç’™ç”瑖玘䮎𤪼ð¤‚åã–„çˆð¤ƒ‰å–´ð …å“𠯆åœé‰é›´é¦åŸåžå¿ã˜¾å£‹åª™ð¨©†ð¡›ºð¡¯ð¡œå¨¬å¦¸éŠå©¾å«å¨’𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"], -["9340","åªð¨¯—ð “é 璌𡌃焅䥲éˆð¨§»éŽ½ãž 尞岞幞幈𡦖𡥼𣫮å»å𡤃𡤄ãœð¡¢ ã›ð¡›¾ã›“脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻å„è˜”ð§—½è¡ æ¾ð¢¡ 𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾ð †ð¢˜›æ†™æ†˜æµð¢²›ð¢´‡ð¤›”ð©…"], -["93a1","摱𤙥ð¢ªã¨©ð¢¬¢ð£‘𩣪𢹸挷𪑛撶挱æ‘𤧣𢵧护𢲡æ»æ•«æ¥²ã¯´ð£‚Žð£Šð¤¦‰ð£Š«å”𣋠𡣙ð©¿æ›Žð£Š‰ð£†³ã« ä†ð¥–„𨬢ð¥–𡛼𥕛ð¥¥ç£®ð£„ƒð¡ ªð£ˆ´ã‘¤ð£ˆð£†‚𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢ð£¾ç“ã®–æžð¤˜ªæ¢¶æ žã¯„檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺æ—ð£¿€ð£²šéŽ é‹²ð¨¯ªð¨«‹"], -["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿ã¶æ¸„𤀼娽渊塇洤硂焻𤌚𤉶烱ç‰çŠ‡çŠ”ð¤žð¤œ¥å…¹ð¤ª¤ð —«ç‘ºð£»¸ð£™Ÿð¤©Šð¤¤—𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌ç¼éŽ‡ç·ä’Ÿð¦·ªä•‘疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"], -["94a1","ã·ð¤©Žã»¿ð¤§…𤣳釺圲é‚𨫣𡡤僟𥈡𥇧ç¸ð£ˆ²çœŽçœç»ð¤š—ð£žã©žð¤£°ç¸ç’›ãº¿ð¤ªºð¤«‡äƒˆð¤ª–𦆮錇ð¥–ç žç¢ç¢ˆç£’ç祙ð§ð¥›£ä„Žç¦›è’–禥æ¨ð£»ºç¨ºç§´ä…®ð¡›¦ä„²éˆµç§±ð µŒð¤¦Œð Š™ð£¶ºð¡®ã–—啫㕰㚪𠇔ð °ç«¢å©™ð¢›µð¥ª¯ð¥ªœå¨ð ‰›ç£°å¨ªð¥¯†ç«¾ä‡¹ç±ç±äˆ‘𥮳𥺼𥺦ç³ð¤§¹ð¡ž°ç²Žç±¼ç²®æª²ç·œç¸‡ç·“罎𦉡"], -["9540","𦅜ð§ˆç¶—𥺂䉪ð¦µð ¤–柖ð Žð£—埄ð¦’ð¦¸ð¤¥¢ç¿ç¬§ð ¬ð¥«©ð¥µƒç¬Œð¥¸Žé§¦è™…驣樜ð£¿ã§¢ð¤§·ð¦–騟𦖠蒀𧄧𦳑䓪脷ä‚胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧è˜ð§ˆ›åª†ä…¿ð¡¡€å¬«ð¡¢¡å«¤ð¡£˜èš 蜨ð£¶è ð§¢å¨‚"], -["95a1","衮佅袇袿裦襥è¥ð¥šƒè¥”𧞅𧞄𨯵𨯙𨮜𨧹ãºè’£ä›µä›ãŸ²è¨½è¨œð©‘ˆå½éˆ«ð¤Š„旔焩烄𡡅éµè²Ÿè³©ð§·œå¦šçŸƒå§°ä®ã›”踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻é„𨩋ä¢ð¨«¼é§ð¨°ð¨°»è“¥è¨«é–™é–§é–—閖𨴴瑅㻂𤣿𤩂ð¤ªã»§ð£ˆ¥éšð¨»§ð¨¹¦ð¨¹¥ã»Œð¤§ð¤©¸ð£¿®ç’瑫㻼éð©‚°"], -["9640","桇ä¨ð©‚“𥟟éé¨ð¨¦‰ð¨°¦ð¨¬¯ð¦Ž¾éŠºå¬‘è©ä¤¼ç¹ð¤ˆ›éž›é±é¤¸ð ¼¦å·ð¨¯…ð¤ª²é Ÿð©“šé‹¶ð©——é‡¥ä“€ð¨ð¤©§ð¨¤é£œð¨©…㼀鈪䤥è”餻é¥ð§¬†ã·½é¦›ä¯é¦ªé©œð¨¥ð¥£ˆæªé¨¡å«¾é¨¯ð©£±ä®ð©¥ˆé¦¼ä®½ä®—é½å¡²ð¡Œ‚å ¢ð¤¦¸"], -["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧æ…ð¢žð¢¥«æ„‡é±é±“鱻鰵é°é¿é¯ð©¸é®Ÿðª‡µðªƒ¾é´¡ä²®ð¤„„鸘䲰鴌𪆴ðªƒðªƒ³ð©¤¯é¶¥è’½ð¦¸’𦿟𦮂藼䔳𦶤𦺄𦷰è 藮𦸀𣟗ð¦¤ç§¢ð£–œð£™€ä¤ð¤§žãµ¢é›éŠ¾éˆð Š¿ç¢¹é‰·é‘俤㑀é¤ð¥•ç ½ç¡”碶硋ð¡—𣇉ð¤¥ãššä½²æ¿šæ¿™ç€žç€žå”𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"], -["9740","愌嫎娋䊼𤒈㜬ä»ð¨§¼éŽ»éŽ¸ð¡£–ð ¼è‘²ð¦³€ð¡“𤋺𢰦ð¤å¦”𣶷ð¦ç¶¨ð¦…›ð¦‚¤ð¤¦¹ð¤¦‹ð¨§ºé‹¥ç¢ã»©ç’´ð¨£ð¡¢Ÿã»¡ð¤ª³æ«˜ç³ç»ã»–𤨾𤪔𡟙𤩦𠎧ð¡¤ð¤§¥ç‘ˆð¤¤–炥𤥶銄ç¦éŸð “¾éŒ±ð¨«Žð¨¨–鎆𨯧𥗕䤵𨪂煫"], -["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂ð¤©ð¡¡’ä”®é㜊𨫀ð¤¦å¦°ð¡¢¿ð¡¢ƒð§’„媡㛢𣵛㚰鉟婹ð¨ªð¡¡¢é´ã³ð ª´äª–㦊僴㵩㵌𡎜煵䋻𨈘æ¸ð©ƒ¤ä“«æµ—ð§¹ç§æ²¯ã³–ð£¿ð£¸æ¸‚漌㵯ð µç•‘㚼㓈䚀㻚䡱姄鉮䤾è½ð¨°œð¦¯€å ’埈㛖𡑒烾ð¤¢ð¤©±ð¢¿£ð¡Š°ð¢Ž½æ¢¹æ¥§ð¡Ž˜ð£“¥ð§¯´ð£›Ÿð¨ªƒð£Ÿ–ð£ºð¤²Ÿæ¨šð£šð¦²·è¾ä“Ÿä“Ž"], -["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺è𦲀ð§“𡟛妉媂𡞳婡婱𡤅𤇼ãœå§¯ð¡œ¼ã›‡ç†ŽéŽæššð¤Š¥å©®å¨«ð¤Š“樫𣻹𧜶𤑛𤋊ç„𤉙𨧡侰𦴨峂𤓎ð§¹ð¤Ž½æ¨Œð¤‰–𡌄炦焳ð¤©ã¶¥æ³Ÿð¯ ¥ð¤©ç¹¥å§«å´¯ã·³å½œð¤©ð¡ŸŸç¶¤è¦"], -["98a1","咅𣫺𣌀𠈔å¾ð £•ð ˜™ã¿¥ð¡¾žðªŠ¶ç€ƒð©…›åµ°çŽç³“𨩙ð© 俈翧ç‹çŒð§«´çŒ¸çŒ¹ð¥›¶ççˆãº©ð§¬˜é¬ç‡µð¤£²ç¡è‡¶ã»ŠçœŒã»‘沢国ç™çžçŸã»¢ã»°ã»´ã»ºç““㼎㽓畂ç•ç•²ç–㽼痈痜㿀ç™ã¿—癴㿜発𤽜熈嘣覀塩ä€çƒä€¹æ¡ä…㗛瞘äªä¯å±žçž¾çŸ‹å£²ç ˜ç‚¹ç œä‚¨ç ¹ç¡‡ç¡‘ç¡¦è‘ˆð¥”µç¤³æ ƒç¤²ä„ƒ"], -["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄ç«ç«›ä‡ä¸¡ç¢ç¬ç»ç°’ç°›ä‰ ä‰ºç±»ç²œäŠŒç²¸äŠ”ç³è¾“烀ð ³ç·ç·”ç·ç·½ç¾®ç¾´çŠŸäŽ—è€ è€¥ç¬¹è€®è€±è”ã·Œåž´ç‚ è‚·èƒ©äè„ŒçŒªè„Žè„’ç• è„”ä㬹腖腙腚"], -["99a1","ä“å ºè…¼è†„ä¥è†“ä膥埯è‡è‡¤è‰”ä’芦艶苊苘苿䒰è—险榊è…烵葤惣蒈䔄蒾蓡蓸è”è”¸è•’ä”»è•¯è•°è— ä•·è™²èš’èš²è›¯é™…èž‹ä˜†ä˜—è¢®è£¿è¤¤è¥‡è¦‘ð§¥§è¨©è¨¸èª”èª´è±‘è³”è³²è´œäž˜å¡Ÿè·ƒäŸä»®è¸ºå—˜å”è¹±å—µèº°ä ·è»Žè»¢è»¤è»è»²è¾·è¿è¿Šè¿Œé€³é§„ä¢é£ 鈓䤞鈨鉘鉫銱銮銿"], -["9a40","鋣鋫鋳鋴鋽éƒéŽ„éŽä¥…䥑麿é—åŒééé¾ä¥ªé‘”鑹é”é–¢ä¦§é—´é˜³ä§¥æž ä¨¤é€ä¨µéž²éŸ‚噔䫤惨颹䬙飱塄餎餙冴餜餷饂é¥é¥¢ä°é§…ä®é¨¼é¬çªƒé©é®é¯é¯±é¯´ä±é° ã¯ð¡¯‚鵉鰺"], -["9aa1","黾å™é¶“é¶½é·€é·¼é“¶è¾¶é¹»éº¬éº±éº½é»†é“œé»¢é»±é»¸ç«ˆé½„ð ‚”ð Š·ð Ž æ¤šé“ƒå¦¬ð “—å¡€é“㞹𠗕𠘕𠙶𡚺å—煳𠫂ð «ð ®¿å‘ªð¯ »ð ¯‹å’žð ¯»ð °»ð ±“𠱥𠱼惧ð ²å™ºð ²µð ³ð ³ð µ¯ð ¶²ð ·ˆæ¥•é°¯èž¥ð ¸„𠸎𠻗ð ¾ð ¼ð ¹³å° 𠾼帋ð¡œð¡ð¡¶æœžð¡»ð¡‚ˆð¡‚–㙇𡂿𡃓𡄯𡄻å¤è’ð¡‹£ð¡µð¡Œ¶è®ð¡•·ð¡˜™ð¡Ÿƒð¡Ÿ‡ä¹¸ç‚»ð¡ 𡥪"], -["9b40","ð¡¨ð¡©…𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕ð¢…槩㛈𢉼ð¢—ð¢ºð¢œªð¢¡±ð¢¥è‹½ð¢¥§ð¢¦“ð¢«•è¦¥ð¢«¨è¾ ð¢¬Žéž¸ð¢¬¿é¡‡éª½ð¢±Œ"], -["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳ð£¦ð£ŒŸð£žå¾±æ™ˆæš¿ð§©¹ð£•§ð£—³çˆð¤¦ºçŸ—𣘚𣜖纇ð †å¢µæœŽ"], -["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚ä£äª¸ð¤„™ð¨ªšð¤‹®ð¤Œð¤€»ð¤Œ´ð¤Ž–𤩅𠗊凒𠘑妟𡺨㮾𣳿ð¤„𤓖垈𤙴㦛𤜯𨗨𩧉ã¢ð¢‡ƒèžð¨Žé§–𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆ð ¹è»šð¥€¬åŠåœ¿ç…±ð¥Š™ð¥™ð£½Šð¤ª§å–¼ð¥‘†ð¥‘®ð¦’釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿ð¥¡å¦ã“»ð£Œæƒžð¥¤ƒä¼ð¨¥ˆð¥ª®ð¥®‰ð¥°†ð¡¶åž¡ç…‘澶𦄂𧰒é–𦆲𤾚è¢ð¦‚𦑊"], -["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧ð¯£ä¾»åš¹ð¤”¡ð¦›¼ä¹ªð¤¤´é™–æ¶ð¦²½ã˜˜è¥·ð¦ž™ð¦¡®ð¦‘𦡞營𦣇ç‚𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦ð¦¨ã™Ÿð¦‘©ð €¡ç¦ƒð¦¨´ð¦›å´¬ð£”™èð¦®ä›ð¦²¤ç”»è¡¥ð¦¶®å¢¶"], -["9ca1","㜜ð¢–ð§‹ð§‡ã±”𧊀𧊅éŠð¢…ºð§Š‹éŒ°ð§‹¦ð¤§æ°¹é’Ÿð§‘ð »¸è §è£µð¢¤¦ð¨‘³ð¡ž±æº¸ð¤¨ªð¡ 㦤㚹å°ç§£ä”¿æš¶ð©²ð©¢¤è¥ƒð§ŸŒð§¡˜å›–䃟𡘊㦡𣜯𨃨ð¡…ç†è¦ð§§ð©†¨å©§ä²·ð§‚¯ð¨¦«ð§§½ð§¨Šð§¬‹ð§µ¦ð¤…ºçƒç¥¾ð¨€‰æ¾µðª‹Ÿæ¨ƒð¨Œ˜åŽ¢ð¦¸‡éŽ¿æ ¶é𨅯𨀣𦦵ð¡ð£ˆ¯ð¨ˆå¶…ð¨°°ð¨‚ƒåœ•é £ð¨¥‰å¶«ð¤¦ˆæ–¾æ§•å’𤪥ð£¾ã°‘朶ð¨‚𨃴𨄮𡾡ð¨…"], -["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺æ¦ð¨¥–ç ˆé‰•ð¨¦¸ä²ð¨§§äŸð¨§¨ð¨†ð¨¯”姸𨰉輋𨿅𩃬ç‘ð©„𩄼㷷𩅞𤫊è¿çŠåš‹ð©“§ð©—©ð©–°ð©–¸ð©œ²ð©£‘𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达å—"], -["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬ð§¢ãœºèº€ð¡Ÿµð¨€¤ð¨¬ð¨®™ð§¨¾ð¦š¯ã·«ð§™•ð£²·ð¥˜µð¥¥–亚ð¥ºð¦‰˜åš¿ð ¹è¸Žå𣺈𤲞æžæ‹ð¡Ÿ¶ð¡¡»æ”°å˜ð¥±Šåšð¥Œ‘㷆𩶘䱽嘢嘞罉𥻘奵𣵀è°ä¸œð ¿ªð µ‰ð£šºè„—鵞贘瘻鱅癎瞹é…å²è…ˆè‹·å˜¥è„²è˜è‚½å—ªç¥¢å™ƒå–ð ºã—Žå˜…嗱曱𨋢ã˜ç”´å—°å–ºå’—啲ð ±ð ²–å»ð¥…ˆð ¹¶ð¢±¢"], -["9e40","𠺢麫絚嗞ð¡µæŠéå’”è³ç‡¶é…¶æ¼æŽ¹æ¾å•©ð¢ƒé±²ð¢º³å†šã“Ÿð ¶§å†§å‘唞唓癦è¸ð¦¢Šç–±è‚¶è „螆裇膶èœð¡ƒä“¬çŒ„𤜆å®èŒ‹ð¦¢“噻𢛴𧴯𤆣𧵳ð¦»ð§Š¶é…°ð¡‡™éˆˆð£³¼ðªš©ð º¬ð »¹ç‰¦ð¡²¢äŽð¤¿‚𧿹𠿫䃺"], -["9ea1","é±æ”Ÿð¢¶ 䣳𤟠𩵼𠿬𠸊æ¢ð§–£ð ¿"], -["9ead","ð¦ˆð¡†‡ç†£çºŽéµä¸šä¸„ã•·å¬æ²²å§ãš¬ã§œå½ãš¥ð¤˜˜å¢šð¤®èˆå‘‹åžªð¥ª•ð ¥¹"], -["9ec5","㩒𢑥ç´ð©º¬ä´‰é¯ð£³¾ð©¼°ä±›ð¤¾©ð©–žð©¿žè‘œð£¶¶ð§Š²ð¦ž³ð£œ 挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔ðª´éº…䳡痹㟻愙𣃚ð¤²"], -["9ef5","å™ð¡Š©åž§ð¤¥£ð©¸†åˆ´ð§‚®ã–汊鵼"], -["9f40","籖鬹埞ð¡¬å±“æ““ð©“𦌵𧅤èšð ´¨ð¦´¢ð¤«¢ð µ±"], -["9f4f","凾ð¡¼å¶Žéœƒð¡·‘éºéŒç¬Ÿé¬‚峑箣扨挵髿ç¯é¬ªç±¾é¬®ç±‚ç²†é°•ç¯¼é¬‰é¼—é°›ð¤¤¾é½šå•³å¯ƒä¿½éº˜ä¿²å‰ ã¸†å‹‘å§å–妷帒韈鶫轜呩鞴饀鞺匬愰"], -["9fa1","椬åšé°Šé´‚ä°»é™æ¦€å‚¦ç•†ð¡é§šå‰³"], -["9fae","é…™éšé…œ"], -["9fb2","酑𨺗æ¿ð¦´£æ«Šå˜‘醎畺抅ð ¼ç籰𥰡𣳽"], -["9fc1","𤤙盖é®ä¸ªð ³”莾衂"], -["9fc9","届槀åƒåºåˆŸå·µä»Žæ°±ð ‡²ä¼¹å’œå“šåŠšè¶‚㗾弌㗳"], -["9fdb","æ’é…¼é¾¥é®—é ®é¢´éªºéº¨éº„ç…ºç¬”"], -["9fe7","æ¯ºè ˜ç½¸"], -["9feb","å˜ ðª™Šè¹·é½“"], -["9ff0","è·”è¹é¸œè¸æŠ‚ð¨½è¸¨è¹µç«“𤩷稾磘泪詧瘇"], -["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢ç±è¬çŒ‚ç“±è³«ð¤ª»è˜¯å¾ºè¢ ä’·"], -["a055","𡠻𦸅"], -["a058","詾𢔛"], -["a05b","惽癧髗鵄é®é®èŸµ"], -["a063","è 賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"], -["a073","åŸæ…¯æŠ¦æˆ¹æ‹Žã©œæ‡¢åŽªð£µæ¤æ ‚ã—’"], -["a0a1","嵗𨯂迚𨸹"], -["a0a6","僙𡵆礆匲阸𠼻ä¥"], -["a0ae","矾"], -["a0b0","糂𥼚糚ç¨è¦è£çµç”…瓲覔舚朌è¢ð§’†è›ç“°è„ƒçœ¤è¦‰ð¦ŸŒç•“𦻑螩蟎臈螌詉è²èƒçœ«ç“¸è“šã˜µæ¦²è¶¦"], -["a0d4","覩瑨涹èŸð¤€‘瓧㷛煶悤憜㳑煢æ·"], -["a0e2","ç½±ð¨¬ç‰æƒ©ä¾åˆ 㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜ð§‚å³ð¦†ð¨¨ð£™·ð ƒ®ð¦¡†ð¤¼Žä•¢å¬Ÿð¦Œé½éº¦ð¦‰«"], -["a3c0","â€",31,"â¡"], -["c6a1","â‘ ",9,"â‘´",9,"â…°",9,"ä¸¶ä¸¿äº…äº å†‚å†–å†«å‹¹åŒ¸å©åŽ¶å¤Šå®€å·›â¼³å¹¿å»´å½å½¡æ”´æ— 疒癶辵隶¨ˆヽヾã‚ゞ〃ä»ã€…〆〇ー[]✽ã",23], -["c740","ã™",58,"ァアィイ"], -["c7a1","ã‚¥",81,"Ð",5,"ÐЖ",4], -["c840","Л",26,"ёж",25,"⇧↸↹ã‡ð ƒŒä¹šð ‚Šåˆ‚ä’‘"], -["c8a1","龰冈龱𧘇"], -["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌âºâº•âºœâºâº¥âº§âºªâº¬âº®âº¶âº¼âº¾â»†â»Šâ»Œâ»â»â»–⻗⻞⻣"], -["c8f5","ʃÉɛɔɵœøŋʊɪ"], -["f9fe","ï¿"], -["fa40","𠕇鋛𠗟𣿅蕌䊵ç¯å†µã™‰ð¤¥‚𨧤é„ð¡§›è‹®ð£³ˆç ¼æ„æ‹Ÿð¤¤³ð¨¦ªð Š ð¦®³ð¡Œ…ä¾«ð¢“倈𦴩𧪄𣘀𤪱𢔓倩ð ¾å¾¤ð Ž€ð ‡æ»›ð Ÿå½å„㑺儎顬ãƒè–ð¤¦¤ð ’‡å… ð£Ž´å…ªð ¯¿ð¢ƒ¼ð ‹¥ð¢”°ð –Žð£ˆ³ð¡¦ƒå®‚è½ð –³ð£²™å†²å†¸"], -["faa1","鴴凉å‡å‡‘㳜凓𤪦决凢å‚å‡è椾ð£œå½»åˆ‹åˆ¦åˆ¼åŠµå‰—åŠ”åŠ¹å‹…ç°•è•‚å‹ è˜ð¦¬“包𨫞啉滙𣾀𠥔𣿬匳å„ð ¯¢æ³‹ð¡œ¦æ ›ç•æŠãºªã£Œð¡›¨ç‡ä’¢åå´ð¨š«å¾å¿ð¡––ð¡˜“çŸ¦åŽ“ð¨ª›åŽ åŽ«åŽ®çŽ§ð¥²ã½™çŽœåå…汉义埾å™ãª«ð ®å 𣿫𢶣å¶ð ±·å“ç¹å”«æ™—æµ›å‘ð¦“ð µ´å•å’咤䞦ð¡œð »ã¶´ð µ"], -["fb40","𨦼𢚘啇ä³å¯ç—喆喩嘅𡣗𤀺䕒ð¤µæš³ð¡‚´å˜·æ›ð£ŠŠæš¤æšå™å™ç£±å›±éž‡å¾åœ€å›¯å›ð¨¦ã˜£ð¡‰å†ð¤†¥æ±®ç‚‹å‚㚱𦱾埦ð¡–å ƒð¡‘”ð¤£å ¦ð¤¯µå¡œå¢ªã•¡å£ 壜𡈼壻寿åƒðª…𤉸é“㖡够梦㛃湙"], -["fba1","𡘾娤啓𡚒蔅姉𠵎ð¦²ð¦´ªð¡Ÿœå§™ð¡Ÿ»ð¡ž²ð¦¶¦æµ±ð¡ ¨ð¡›•å§¹ð¦¹…媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広å‹å¶æ–ˆå¼ð§¨Žä€„ä¡ð ˆ„å¯•æ… ð¡¨´ð¥§Œð –¥å¯³å®ä´å°…ð¡„å°“çŽå°”𡲥𦬨屉ä£å²…峩峯嶋𡷹𡸷å´å´˜åµ†ð¡º¤å²ºå·—苼ã ð¤¤ð¢‰ð¢…³èŠ‡ã ¶ã¯‚帮檊幵幺𤒼𠳓厦亷å»åŽ¨ð¡±å¸‰å»´ð¨’‚"], -["fc40","å»¹å»»ã¢ å»¼æ ¾é›å¼ð ‡ð¯¢”㫞䢮𡌺强𦢈ð¢å½˜ð¢‘±å½£éž½ð¦¹®å½²é€ð¨¨¶å¾§å¶¶ãµŸð¥‰ð¡½ªð§ƒ¸ð¢™¨é‡–𠊞𨨩怱暅𡡷㥣㷇㘹åžð¢ž´ç¥±ã¹€æ‚žæ‚¤æ‚³ð¤¦‚ð¤¦ð§©“ç’¤åƒ¡åª æ…¤è¤æ…‚慈𦻒æ†å‡´ð ™–憇宪𣾷"], -["fca1","𢡟懓ð¨®ð©¥æ‡ã¤²ð¢¦€ð¢£æ€£æ…œæ”žæŽ‹ð „˜æ‹…ð¡°æ‹•ð¢¸æ¬ð¤§Ÿã¨—æ¸æ¸ð¡ŽŽð¡Ÿ¼æ’æ¾Šð¢¸¶é ”ð¤‚Œð¥œæ“¡æ“¥é‘»ã©¦æºã©—æ•æ¼–𤨨𤨣斅æ•æ•Ÿð£¾æ–µð¤¥€ä¬·æ—‘äƒ˜ð¡ ©æ— æ—£å¿Ÿð£€æ˜˜ð£‡·ð£‡¸æ™„𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂æžæ§æ¢ð¤‡ð©ƒæŸ—ä“©æ ¢æ¹éˆ¼æ ð£¦ð¦¶ æ¡"], -["fd40","𣑯槡樋𨫟楳棃ð£—æ¤æ¤€ã´²ã¨ð£˜¼ã®€æž¬æ¥¡ð¨©Šä‹¼æ¤¶æ¦˜ã®¡ð ‰è£å‚槹𣙙𢄪橅𣜃æªã¯³æž±æ«ˆð©†œã°æ¬ð ¤£æƒžæ¬µæ´ð¢Ÿæºµð£«›ð Žµð¡¥˜ã€å¡ð£šæ¯¡ð£»¼æ¯œæ°·ð¢’‹ð¤£±ð¦‘汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"], -["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑ç¾æ ·ð¦´¥ð¦¶¡ð¦·«æ¶–浜湼漄𤥿𤂅𦹲蔳𦽴凇沜æ¸è®ð¨¬¡æ¸¯ð£¸¯ç‘“𣾂秌æ¹åª‘ð£‹æ¿¸ãœæ¾ð£¸°æ»ºð¡’—𤀽䕕é°æ½„潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀ð¦‡ç‹ç¾ç‚§ç‚烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜ð¤¥ç…é¢ð¤‹ç„¬ð¤‘šð¤¨§ð¤¨¢ç†ºð¨¯¨ç‚½çˆŽ"], -["fe40","鑂爕夑鑃爤é𥘅爮牀𤥴梽牕牗㹕ð£„æ 漽犂猪猫𤠣𨠫ä£ð¨ „猨献ç玪𠰺𦨮ç‰ç‘‰ð¤‡¢ð¡›§ð¤¨¤æ˜£ã›…𤦷ð¤¦ð¤§»ç·ç•æ¤ƒð¤¨¦ç¹ð —ƒã»—ç‘œð¢¢ç‘ 𨺲瑇ç¤ç‘¶èŽ¹ç‘¬ãœ°ç‘´é±æ¨¬ç’‚䥓𤪌"], -["fea1","𤅟𤩹ð¨®å†ð¨°ƒð¡¢žç“ˆð¡¦ˆç”Žç“©ç”žð¨»™ð¡©‹å¯—𨺬鎅ç•ç•Šç•§ç•®ð¤¾‚㼄𤴓疎ç‘疞疴瘂瘬癑ç™ç™¯ç™¶ð¦µçšè‡¯ãŸ¸ð¦¤‘𦤎皡皥皷盌𦾟葢ð¥‚𥅽𡸜眞眦ç€æ’¯ð¥ˆ ç˜ð£Š¬çž¯ð¨¥¤ð¨¥¨ð¡›çŸ´ç ‰ð¡¶ð¤¨’棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗ç¦ð§¬¹ç¤¼ç¦©æ¸ªð§„¦ãº¨ç§†ð©„秔"] -] diff --git a/node_modules/iconv-lite/encodings/tables/cp936.json b/node_modules/iconv-lite/encodings/tables/cp936.json deleted file mode 100644 index 49ddb9a1d68fd76a82904ef694de6b2770c04575..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/tables/cp936.json +++ /dev/null @@ -1,264 +0,0 @@ -[ -["0","\u0000",127,"€"], -["8140","丂丄丅丆ä¸ä¸’ä¸—ä¸Ÿä¸ ä¸¡ä¸£ä¸¦ä¸©ä¸®ä¸¯ä¸±ä¸³ä¸µä¸·ä¸¼ä¹€ä¹ä¹‚乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"], -["8180","äºäº–亗亙亜äºäºžäº£äºªäº¯äº°äº±äº´äº¶äº·äº¸äº¹äº¼äº½äº¾ä»ˆä»Œä»ä»ä»’ä»šä»›ä»œä» ä»¢ä»¦ä»§ä»©ä»ä»®ä»¯ä»±ä»´ä»¸ä»¹ä»ºä»¼ä»¾ä¼€ä¼‚",6,"伋伌伒",4,"伜ä¼ä¼¡ä¼£ä¼¨ä¼©ä¼¬ä¼ä¼®ä¼±ä¼³ä¼µä¼·ä¼¹ä¼»ä¼¾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫ä½ä½®ä½±ä½²ä½µä½·ä½¸ä½¹ä½ºä½½ä¾€ä¾ä¾‚侅來侇侊侌侎ä¾ä¾’侓侕侖侘侙侚侜侞侟価侢"], -["8240","侤侫ä¾ä¾°",4,"侶",8,"ä¿€ä¿ä¿‚俆俇俈俉俋俌ä¿ä¿’",4,"ä¿™ä¿›ä¿ ä¿¢ä¿¤ä¿¥ä¿§ä¿«ä¿¬ä¿°ä¿²ä¿´ä¿µä¿¶ä¿·ä¿¹ä¿»ä¿¼ä¿½ä¿¿",11], -["8280","個倎å€å€‘倓倕倖倗倛å€å€žå€ 倢倣値倧倫倯",10,"倻倽倿å€åå‚å„å…å†å‰åŠå‹åå",4,"å–å—å˜å™å›å",7,"å¦",5,"å",8,"å¸å¹åºå¼å½å‚傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫å‚",4,"傳",6,"傼"], -["8340","傽",17,"åƒ",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"], -["8380","儉儊儌",5,"å„“",13,"å„¢",28,"兂兇兊兌兎å…å…兒兓兗兘兙兛å…",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎å†å†å†‘冓冔冘冚å†å†žå†Ÿå†¡å†£å†¦",4,"å†å†®å†´å†¸å†¹å†ºå†¾å†¿å‡å‡‚凃凅凈凊å‡å‡Žå‡å‡’",5], -["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌åˆåˆåˆ“刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎å‰å‰’剓剕剗剘"], -["8480","剙剚剛å‰å‰Ÿå‰ 剢剣剤剦剨剫剬å‰å‰®å‰°å‰±å‰³",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"å‹€å‹å‹‚勄勅勆勈勊勌å‹å‹Žå‹å‹‘勓勔動勗務",5,"å‹ å‹¡å‹¢å‹£å‹¥",10,"勱",7,"勻勼勽åŒåŒ‚匃匄匇匉匊匋匌匎"], -["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬åŒåŒ¯",9,"匼匽å€å‚å„å†å‹åŒååå”å˜å™å›åå¥å¨åªå¬åå²å¶å¹å»å¼å½å¾åŽ€åŽåŽƒåŽ‡åŽˆåŽŠåŽŽåŽ"], -["8580","åŽ",4,"åŽ–åŽ—åŽ™åŽ›åŽœåŽžåŽ åŽ¡åŽ¤åŽ§åŽªåŽ«åŽ¬åŽåŽ¯",6,"厷厸厹厺厼厽厾å€åƒ",4,"åŽååå’å“å•åšåœååžå¡å¢å§å´åºå¾å¿å€å‚å…å‡å‹å”å˜å™åšåœå¢å¤å¥åªå°å³å¶å·åºå½å¿å‘呂呄呅呇呉呌å‘å‘Žå‘å‘‘å‘šå‘",4,"呣呥呧呩",7,"呴呹呺呾呿å’咃咅咇咈咉咊å’å’‘å’“å’—å’˜å’œå’žå’Ÿå’ å’¡"], -["8640","å’¢å’¥å’®å’°å’²å’µå’¶å’·å’¹å’ºå’¼å’¾å“ƒå“…å“Šå“‹å“–å“˜å“›å“ ",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜å”唞唟唡唥唦"], -["8680","唨唩唫å”唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"å•å•žå•Ÿå• 啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌å–å–Žå–å–’å–“å–•å––å–—å–šå–›å–žå– ",6,"å–¨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎å—å—å—•å——",4,"å—žå— å—¢å—§å—©å—嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"], -["8740","嘆嘇嘊嘋å˜å˜",7,"嘙嘚嘜å˜å˜ 嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"å™",4,"噕噖噚噛å™",4], -["8780","噣噥噦噧å™å™®å™¯å™°å™²å™³å™´å™µå™·å™¸å™¹å™ºå™½",7,"嚇",6,"åšåš‘åš’åš”",14,"嚤",10,"åš°",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀åœåœ‚圅圇國",6], -["8840","園",9,"åœåœžåœ 圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿ååƒå„å…å†åˆå‰å‹å’",4,"å˜å™å¢å£å¥å§å¬å®å°å±å²å´åµå¸å¹åºå½å¾å¿åž€"], -["8880","åžåž‡åžˆåž‰åžŠåž",4,"åž”",6,"åžœåžåžžåžŸåž¥åž¨åžªåž¬åž¯åž°åž±åž³åžµåž¶åž·åž¹",8,"埄",6,"埌åŸåŸåŸ‘埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿å å ƒå „å …å ˆå ‰å Šå Œå Žå å å ’å “å ”å –å —å ˜å šå ›å œå å Ÿå ¢å £å ¥",4,"å «",4,"å ±å ²å ³å ´å ¶",7], -["8940","å ¾",5,"å¡…",6,"å¡Žå¡å¡å¡’å¡“å¡•å¡–å¡—å¡™",4,"å¡Ÿ",5,"塦",4,"å¡",16,"塿墂墄墆墇墈墊墋墌"], -["8980","å¢",4,"墔",4,"墛墜å¢å¢ ",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"å£å£¯å£±å£²å£´å£µå£·å£¸å£º",7,"夃夅夆夈",4,"夎å¤å¤‘夒夓夗夘夛å¤å¤žå¤ 夡夢夣夦夨夬夰夲夳夵夶夻"], -["8a40","夽夾夿奀奃奅奆奊奌å¥å¥å¥’奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎å¦å¦å¦‘妔妕妘妚妛妜å¦å¦Ÿå¦ 妡妢妦"], -["8a80","妧妬å¦å¦°å¦±å¦³",5,"妺妼妽妿",6,"姇姈姉姌å§å§Žå§å§•å§–姙姛姞",4,"姤姦姧姩姪姫å§",11,"姺姼姽姾娀娂娊娋å¨å¨Žå¨å¨å¨’娔娕娖娗娙娚娛å¨å¨žå¨¡å¨¢å¨¤å¨¦å¨§å¨¨å¨ª",6,"娳娵娷",4,"娽娾娿å©",4,"婇婈婋",9,"婖婗婘婙婛",5], -["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"], -["8b80","åª",4,"媴媶媷媹",4,"媿嫀嫃",5,"å«Šå«‹å«",4,"嫓嫕嫗嫙嫚嫛å«å«žå«Ÿå«¢å«¤å«¥å«§å«¨å«ªå«¬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"å",6], -["8c40","åˆ",7,"å’å–åžå å¡å§å¨å«åå®å¯å²å´å¶å·å¸å¹å»å¼å¾å¿å®‚宆宊å®å®Žå®å®‘宒宔宖実宧宨宩宬å®å®®å®¯å®±å®²å®·å®ºå®»å®¼å¯€å¯å¯ƒå¯ˆå¯‰å¯Šå¯‹å¯å¯Žå¯"], -["8c80","寑寔",8,"å¯ å¯¢å¯£å¯¦å¯§å¯©",4,"寯寱",6,"寽対尀専尃尅將專尋尌å°å°Žå°å°’å°“å°—å°™å°›å°žå°Ÿå° å°¡å°£å°¦å°¨å°©å°ªå°«å°å°®å°¯å°°å°²å°³å°µå°¶å°·å±ƒå±„屆屇屌å±å±’屓屔屖屗屘屚屛屜å±å±Ÿå±¢å±¤å±§",6,"å±°å±²",6,"屻屼屽屾岀岃",4,"岉岊岋岎å²å²’岓岕å²",4,"岤",4], -["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"å³¼",4], -["8d80","å´å´„å´…å´ˆ",5,"å´",4,"崕崗崘崙崚崜å´å´Ÿ",4,"崥崨崪崫崬崯",4,"å´µ",7,"å´¿",7,"嵈嵉åµ",10,"嵙嵚嵜嵞",10,"嵪åµåµ®åµ°åµ±åµ²åµ³åµµ",12,"嶃",21,"å¶šå¶›å¶œå¶žå¶Ÿå¶ "], -["8e40","嶡",21,"嶸",12,"å·†",6,"å·Ž",12,"å·œå·Ÿå· å·£å·¤å·ªå·¬å·"], -["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋å¸å¸Žå¸’帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀å¹å¹ƒå¹†",5,"å¹",6,"å¹–",4,"幜å¹å¹Ÿå¹ å¹£",14,"幵幷幹幾åºåº‚広庅庈庉庌åºåºŽåº’庘庛åºåº¡åº¢åº£åº¤åº¨",4,"庮",4,"庴庺庻庼庽庿",6], -["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌å¼å¼Žå¼å¼’弔弖弙弚弜å¼å¼žå¼¡å¼¢å¼£å¼¤"], -["8f80","弨弫弬弮弰弲",6,"弻弽弾弿å½",14,"å½‘å½”å½™å½šå½›å½œå½žå½Ÿå½ å½£å½¥å½§å½¨å½«å½®å½¯å½²å½´å½µå½¶å½¸å½ºå½½å½¾å½¿å¾ƒå¾†å¾å¾Žå¾å¾‘従徔徖徚徛å¾å¾žå¾Ÿå¾ å¾¢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"], -["9040","怈怉怋怌æ€æ€‘怓怗怘怚怞怟怢怣怤怬æ€æ€®æ€°",4,"怶",4,"怽怾æ€æ„",6,"æŒæŽææ‘æ“æ”æ–æ—æ˜æ›æœæžæŸæ æ¡æ¥æ¦æ®æ±æ²æ´æµæ·æ¾æ‚€"], -["9080","æ‚悂悅悆悇悈悊悋悎æ‚æ‚悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌æ„",4,"愖愗愘愙愛愜æ„愞愡愢愥愨愩愪愬",18,"æ…€",6], -["9140","慇慉態æ…æ…æ…慒慓慔慖",6,"æ…žæ…Ÿæ… æ…¡æ…£æ…¤æ…¥æ…¦æ…©",6,"慱慲慳慴慶慸",18,"憌æ†æ†",4,"憕"], -["9180","憖",6,"憞",8,"憪憫æ†",9,"憸",5,"憿懀æ‡æ‡ƒ",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜æˆæˆžæˆ 戣戦戧戨戩戫æˆæˆ¯æˆ°æˆ±æˆ²æˆµæˆ¶æˆ¸",4,"扂扄扅扆扊"], -["9240","æ‰æ‰æ‰•æ‰–扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽æŠæŠ‚抃抅抆抇抈抋",5,"抔抙抜æŠæŠžæŠ£æŠ¦æŠ§æŠ©æŠªæŠæŠ®æŠ¯æŠ°æŠ²æŠ³æŠ´æŠ¶æŠ·æŠ¸æŠºæŠ¾æ‹€æ‹"], -["9280","拃拋æ‹æ‹‘æ‹•æ‹æ‹žæ‹ 拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌æŒæŒæŒæŒ’挓挔挕挗挘挙挜挦挧挩挬æŒæŒ®æŒ°æŒ±æŒ³",5,"挻挼挾挿æ€ææ„æ‡æˆæŠæ‘æ’æ“æ”æ–",7,"æ æ¤æ¥æ¦æ¨æªæ«æ¬æ¯æ°æ²æ³æ´æµæ¸æ¹æ¼æ½æ¾æ¿æŽæŽƒæŽ„掅掆掋æŽæŽ‘掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿æ€"], -["9340","ææ‚æƒæ…æ‡æˆæŠæ‹æŒæ‘æ“æ”æ•æ—",6,"æŸæ¢æ¤",4,"æ«æ¬æ®æ¯æ°æ±æ³æµæ·æ¹æºæ»æ¼æ¾æƒæ„æ†",4,"ææŽæ‘æ’æ•",5,"ææŸæ¢æ£æ¤"], -["9380","æ¥æ§æ¨æ©æ«æ®",5,"æµ",4,"æ»æ¼æ¾æ‘€æ‘‚摃摉摋",6,"æ‘“æ‘•æ‘–æ‘—æ‘™",4,"æ‘Ÿ",7,"摨摪摫摬摮",9,"æ‘»",6,"撃撆撈",8,"撓撔撗撘撚撛撜æ’æ’Ÿ",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿æ“擃擄擆",6,"æ“擑擓擔擕擖擙據"], -["9440","擛擜æ“æ“Ÿæ“ æ“¡æ“£æ“¥æ“§",24,"æ”",7,"攊",7,"攓",4,"æ”™",8], -["9480","攢攣攤攦",4,"攬æ”攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋æ•æ•Žæ•æ•’æ•“æ•”æ•—æ•˜æ•šæ•œæ•Ÿæ• æ•¡æ•¤æ•¥æ•§æ•¨æ•©æ•ªæ•æ•®æ•¯æ•±æ•³æ•µæ•¶æ•¸",14,"斈斉斊æ–æ–Žæ–斒斔斕斖斘斚æ–æ–žæ– æ–¢æ–£æ–¦æ–¨æ–ªæ–¬æ–®æ–±",7,"斺斻斾斿旀旂旇旈旉旊æ—æ—旑旓旔旕旘",7,"旡旣旤旪旫"], -["9540","旲旳旴旵旸旹旻",4,"æ˜æ˜„昅昇昈昉昋æ˜æ˜æ˜‘昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"æ™æ™Žæ™æ™‘晘"], -["9580","晙晛晜æ™æ™žæ™ 晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀æšæšƒæš…暆暈暉暊暋æšæšŽæšæšæš’暓暔暕暘",4,"æšž",8,"æš©",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽æœæœ‚會"], -["9640","朄朅朆朇朌朎æœæœ‘æœ’æœ“æœ–æœ˜æœ™æœšæœœæœžæœ ",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿ææ„æ…æ‡æŠæ‹ææ’æ”æ•æ—",4,"ææ¢æ£æ¤æ¦æ§æ«æ¬æ®æ±æ´æ¶"], -["9680","æ¸æ¹æºæ»æ½æž€æž‚枃枅枆枈枊枌æžæžŽæžæž‘æž’æž“æž”æž–æž™æž›æžŸæž æž¡æž¤æž¦æž©æž¬æž®æž±æž²æž´æž¹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫æŸæŸ®æŸ²æŸµ",7,"柾æ æ ‚æ ƒæ „æ †æ æ æ ’æ ”æ •æ ˜",4,"æ žæ Ÿæ æ ¢",6,"æ «",6,"æ ´æ µæ ¶æ ºæ »æ ¿æ¡‡æ¡‹æ¡æ¡æ¡’æ¡–",5], -["9740","æ¡œæ¡æ¡žæ¡Ÿæ¡ªæ¡¬",7,"桵桸",8,"梂梄梇",7,"æ¢æ¢‘梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"], -["9780","梹",6,"æ£æ£ƒ",5,"棊棌棎æ£æ£æ£‘棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌æ¤æ¤‘椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀æ¥æ¥ƒ",16,"楕楖楘楙楛楜楟"], -["9840","楡楢楤楥楧楨楩楪楬æ¥æ¥¯æ¥°æ¥²",4,"楺楻楽楾楿æ¦æ¦ƒæ¦…榊榋榌榎",5,"榖榗榙榚æ¦",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"], -["9880","榾榿槀槂",7,"構æ§æ§æ§‘槒槓槕",5,"槜æ§æ§žæ§¡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"æ¨ æ¨¢",5,"権樫樬æ¨æ¨®æ¨°æ¨²æ¨³æ¨´æ¨¶",6,"樿",4,"橅橆橈",7,"æ©‘",6,"æ©š"], -["9940","æ©œ",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿æªæª‚檃檅",8,"æªæª’",4,"檘",7,"檡",5], -["9980","檧檨檪æª",114,"欥欦欨",6], -["9a40","欯欰欱欳欴欵欶欸欻欼欽欿æ€ææ‚æ„æ…æˆæŠæ‹æ",11,"æš",7,"æ¨æ©æ«",13,"æºæ½æ¾æ¿æ®€æ®…殈"], -["9a80","殌殎æ®æ®æ®‘殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎æ¯æ¯‘毘毚毜",4,"毢",7,"毬æ¯æ¯®æ¯°æ¯±æ¯²æ¯´æ¯¶æ¯·æ¯¸æ¯ºæ¯»æ¯¼æ¯¾",6,"æ°ˆ",4,"æ°Žæ°’æ°—æ°œæ°æ°žæ° 氣氥氫氬æ°æ°±æ°³æ°¶æ°·æ°¹æ°ºæ°»æ°¼æ°¾æ°¿æ±ƒæ±„汅汈汋",4,"汑汒汓汖汘"], -["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋æ²æ²Žæ²‘沒沕沖沗沘沚沜æ²æ²žæ² 沢沨沬沯沰沴沵沶沷沺泀æ³æ³‚泃泆泇泈泋æ³æ³Žæ³æ³‘泒泘"], -["9b80","泙泚泜æ³æ³Ÿæ³¤æ³¦æ³§æ³©æ³¬æ³æ³²æ³´æ³¹æ³¿æ´€æ´‚洃洅洆洈洉洊æ´æ´æ´æ´‘洓洔洕洖洘洜æ´æ´Ÿ",5,"洦洨洩洬æ´æ´¯æ´°æ´´æ´¶æ´·æ´¸æ´ºæ´¿æµ€æµ‚浄浉浌æµæµ•æµ–浗浘浛æµæµŸæµ¡æµ¢æµ¤æµ¥æµ§æµ¨æµ«æµ¬æµæµ°æµ±æµ²æµ³æµµæµ¶æµ¹æµºæµ»æµ½",4,"涃涄涆涇涊涋æ¶æ¶æ¶æ¶’涖",4,"涜涢涥涬æ¶æ¶°æ¶±æ¶³æ¶´æ¶¶æ¶·æ¶¹",5,"æ·æ·‚淃淈淉淊"], -["9c40","æ·æ·Žæ·æ·æ·’淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪æ·æ·¯æ·°æ·²æ·´æ·µæ·¶æ·¸æ·ºæ·½",7,"渆渇済渉渋æ¸æ¸’渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"], -["9c80","渶渷渹渻",7,"æ¹…",7,"æ¹æ¹æ¹‘湒湕湗湙湚湜æ¹æ¹žæ¹ ",10,"湬æ¹æ¹¯",14,"満æºæº‚溄溇溈溊",4,"溑",6,"溙溚溛æºæºžæº 溡溣溤溦溨溩溫溬æºæº®æº°æº³æºµæº¸æº¹æº¼æº¾æº¿æ»€æ»ƒæ»„滅滆滈滉滊滌æ»æ»Žæ»æ»’滖滘滙滛滜æ»æ»£æ»§æ»ª",5], -["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"æ¼æ¼‘æ¼’æ¼–",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀æ½æ½‚"], -["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛æ½æ½Ÿæ½ 潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋æ¾",12,"æ¾æ¾žæ¾Ÿæ¾ æ¾¢",4,"澨",10,"澴澵澷澸澺",5,"æ¿æ¿ƒ",5,"æ¿Š",6,"æ¿“",10,"濟濢濣濤濥"], -["9e40","濦",7,"æ¿°",32,"瀒",7,"瀜",6,"瀤",6], -["9e80","瀫",9,"瀶瀷瀸瀺",17,"ççŽç",13,"çŸ",11,"ç®ç±ç²ç³ç´ç·ç¹çºç»ç½ç‚炂炃炄炆炇炈炋炌ç‚ç‚ç‚炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"], -["9f40","烜çƒçƒžçƒ 烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"ç„‹",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"], -["9f80","焵焷",13,"煆煇煈煉煋ç…ç…",12,"ç…ç…Ÿ",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌ç†ç†Žç†ç†‘熒熓熕熖熗熚",4,"熡",6,"熩熪熫ç†",5,"熴熶熷熸熺",8,"燄",9,"ç‡",4], -["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19], -["a080","爛爜爞",9,"爩爫çˆçˆ®çˆ¯çˆ²çˆ³çˆ´çˆºçˆ¼çˆ¾ç‰€",6,"牉牊牋牎ç‰ç‰ç‰‘ç‰“ç‰”ç‰•ç‰—ç‰˜ç‰šç‰œç‰žç‰ ç‰£ç‰¤ç‰¥ç‰¨ç‰ªç‰«ç‰¬ç‰ç‰°ç‰±ç‰³ç‰´ç‰¶ç‰·ç‰¸ç‰»ç‰¼ç‰½çŠ‚犃犅",4,"犌犎çŠçŠ‘犓",11,"çŠ ",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌ç‹ç‹‘狓狔狕狖狘狚狛"], -["a1a1"," ã€ã€‚·ˉˇ¨〃々—~‖…‘’“â€ã€”〕〈",7,"〖〗ã€ã€‘±×÷∶∧∨∑âˆâˆªâˆ©âˆˆâˆ·âˆšâŠ¥âˆ¥âˆ ⌒⊙∫∮≡≌≈∽âˆâ‰ â‰®â‰¯â‰¤â‰¥âˆžâˆµâˆ´â™‚â™€Â°â€²â€³â„ƒï¼„Â¤ï¿ ï¿¡â€°Â§â„–â˜†â˜…â—‹â—◎◇◆□■△▲※→â†â†‘↓〓"], -["a2a1","â…°",9], -["a2b1","â’ˆ",19,"â‘´",19,"â‘ ",9], -["a2e5","㈠",9], -["a2f1","â… ",11], -["a3a1","ï¼ï¼‚#¥%",88,"ï¿£"], -["a4a1","ã",82], -["a5a1","ã‚¡",85], -["a6a1","Α",16,"Σ",6], -["a6c1","α",16,"σ",6], -["a6e0","︵︶︹︺︿﹀︽︾ï¹ï¹‚﹃﹄"], -["a6ee","︻︼︷︸︱"], -["a6f4","︳︴"], -["a7a1","Ð",5,"ÐЖ",25], -["a7d1","а",5,"ёж",25], -["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿â•",35,"â–",6], -["a880","â–ˆ",7,"▓▔▕▼▽◢◣◤◥☉⊕〒ã€ã€ž"], -["a8a1","Äáǎà ēéěèīÃÇìÅóǒòūúǔùǖǘǚǜüêɑ"], -["a8bd","ńň"], -["a8c0","É¡"], -["a8c5","ã„…",36], -["a940","〡",8,"㊣㎎ãŽãŽœãŽãŽžãŽ¡ã„ãŽã‘ã’ã•ï¸°ï¿¢ï¿¤"], -["a959","℡㈱"], -["a95c","â€"], -["a960","ー゛゜ヽヾ〆ã‚ゞ﹉",9,"﹔﹕﹖﹗﹙",8], -["a980","ï¹¢",4,"﹨﹩﹪﹫"], -["a996","〇"], -["a9a4","─",75], -["aa40","ç‹œç‹ç‹Ÿç‹¢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌çŒçŒçŒçŒ‘çŒ’çŒ”çŒ˜çŒ™çŒšçŒŸçŒ çŒ£çŒ¤çŒ¦çŒ§çŒ¨çŒçŒ¯çŒ°çŒ²çŒ³çŒµçŒ¶çŒºçŒ»çŒ¼çŒ½ç€",8], -["aa80","ç‰çŠç‹çŒçŽçç‘ç“ç”ç•ç–ç˜",7,"ç¡",10,"ç®ç°ç±"], -["ab40","ç²",11,"ç¿",4,"玅玆玈玊玌çŽçŽçŽçŽ’玓玔玕玗玘玙玚玜çŽçŽžçŽ 玡玣",5,"玪玬çŽçŽ±çŽ´çŽµçŽ¶çŽ¸çŽ¹çŽ¼çŽ½çŽ¾çŽ¿ççƒ",4], -["ab80","ç‹çŒçŽç’",6,"çšç›çœççŸç¡ç¢ç£ç¤ç¦ç¨çªç«ç¬ç®ç¯ç°ç±ç³",4], -["ac40","ç¸",10,"ç„ç‡çˆç‹çŒççŽç‘",8,"çœ",5,"ç£ç¤ç§ç©ç«çç¯ç±ç²ç·",4,"ç½ç¾ç¿ç‘€ç‘‚",11], -["ac80","ç‘Ž",6,"瑖瑘ç‘ç‘ ",12,"瑮瑯瑱",4,"瑸瑹瑺"], -["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌ç’ç’ç’‘",10,"ç’ç’Ÿ",7,"ç’ª",15,"ç’»",12], -["ad80","瓈",9,"ç““",8,"ç“瓟瓡瓥瓧",6,"瓰瓱瓲"], -["ae40","瓳瓵瓸",6,"甀ç”甂甃甅",7,"甎ç”甒甔甕甖甗甛ç”ç”žç” ",4,"甦甧甪甮甴甶甹甼甽甿ç•ç•‚畃畄畆畇畉畊ç•ç•ç•‘畒畓畕畖畗畘"], -["ae80","ç•",7,"畧畨畩畫",6,"畳畵當畷畺",4,"ç–€ç–ç–‚ç–„ç–…ç–‡"], -["af40","疈疉疊疌ç–ç–Žç–疓疕疘疛疜疞疢疦",4,"ç–疶疷疺疻疿痀ç—痆痋痌痎ç—ç—痑痓痗痙痚痜ç—ç—Ÿç— ç—¡ç—¥ç—©ç—¬ç—痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"], -["af80","瘈瘉瘋ç˜ç˜Žç˜ç˜‘瘒瘓瘔瘖瘚瘜ç˜ç˜žç˜¡ç˜£ç˜§ç˜¨ç˜¬ç˜®ç˜¯ç˜±ç˜²ç˜¶ç˜·ç˜¹ç˜ºç˜»ç˜½ç™ç™‚癄"], -["b040","ç™…",6,"癎",5,"癕癗",4,"ç™ç™Ÿç™ 癡癢癤",6,"癬ç™ç™®ç™°",7,"癹発發癿皀çšçšƒçš…皉皊皌çšçšçšçš’皔皕皗皘皚皛"], -["b080","çšœ",7,"皥",8,"皯皰皳皵",9,"盀ç›ç›ƒå•Šé˜¿åŸƒæŒ¨å“Žå”‰å“€çš‘癌蔼矮艾ç¢çˆ±éš˜éžæ°¨å®‰ä¿ºæŒ‰æš—岸胺案肮昂盎凹敖熬翱袄傲奥懊澳èŠæŒæ‰’åå§ç¬†å…«ç–¤å·´æ‹”è·‹é¶æŠŠè€™å霸罢爸白æŸç™¾æ‘†ä½°è´¥æ‹œç¨—æ–‘çæ¬æ‰³èˆ¬é¢æ¿ç‰ˆæ‰®æ‹Œä¼´ç“£åŠåŠžç»Šé‚¦å¸®æ¢†æ¦œè†€ç»‘棒磅蚌镑å‚谤苞胞包褒剥"], -["b140","盄盇盉盋盌盓盕盙盚盜ç›ç›žç› ",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜çœçœžçœ¡çœ£çœ¤çœ¥çœ§çœªçœ«"], -["b180","眬眮眰",4,"眹眻眽眾眿ç‚ç„ç…ç†çˆ",7,"ç’",7,"çœè–„雹ä¿å ¡é¥±å®æŠ±æŠ¥æš´è±¹é²çˆ†æ¯ç¢‘悲å‘北辈背è´é’¡å€ç‹ˆå¤‡æƒ«ç„™è¢«å¥”苯本笨崩绷ç”泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖å¸åº‡ç—¹é—æ•å¼Šå¿…辟å£è‡‚é¿é™›éžè¾¹ç¼–è´¬æ‰ä¾¿å˜åžè¾¨è¾©è¾«éæ ‡å½ªè†˜è¡¨é³–æ†‹åˆ«ç˜ªå½¬æ–Œæ¿’æ»¨å®¾æ‘ˆå…µå†°æŸ„ä¸™ç§‰é¥¼ç‚³"], -["b240","ççžçŸç ç¤ç§ç©çªç",11,"çºç»ç¼çžçž‚瞃瞆",5,"çžçžçž“",11,"瞡瞣瞤瞦瞨瞫çžçž®çž¯çž±çž²çž´çž¶",4], -["b280","瞼瞾矀",12,"矎",8,"矘矙矚çŸ",4,"矤病并玻è æ’拨钵波åšå‹ƒæ铂箔伯帛舶脖膊渤泊驳æ•åœå“ºè¡¥åŸ ä¸å¸ƒæ¥ç°¿éƒ¨æ€–擦猜è£ææ‰è´¢ç¬è¸©é‡‡å½©èœè”¡é¤å‚蚕残æƒæƒ¨ç¿è‹èˆ±ä»“沧è—æ“糙槽曹è‰åŽ•ç–侧册测层è¹æ’å‰èŒ¬èŒ¶æŸ¥ç¢´æ½å¯Ÿå²”差诧拆柴豺æ€æŽºè‰é¦‹è°—ç¼ é“²äº§é˜é¢¤æ˜ŒçŒ–"], -["b340","çŸ¦çŸ¨çŸªçŸ¯çŸ°çŸ±çŸ²çŸ´çŸµçŸ·çŸ¹çŸºçŸ»çŸ¼ç ƒ",5,"ç Šç ‹ç Žç ç ç “ç •ç ™ç ›ç žç ç ¡ç ¢ç ¤ç ¨ç ªç «ç ®ç ¯ç ±ç ²ç ³ç µç ¶ç ½ç ¿ç¡ç¡‚硃硄硆硈硉硊硋ç¡ç¡ç¡‘硓硔硘硙硚"], -["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场å°å¸¸é•¿å¿è‚ 厂敞畅唱倡超抄钞æœå˜²æ½®å·¢åµç‚’车扯撤掣彻澈郴臣辰尘晨忱沉陈è¶è¡¬æ’‘称城橙æˆå‘ˆä¹˜ç¨‹æƒ©æ¾„诚承逞骋秤åƒç—´æŒåŒ™æ± è¿Ÿå¼›é©°è€»é½¿ä¾ˆå°ºèµ¤ç¿…æ–¥ç‚½å……å†²è™«å´‡å® æŠ½é…¬ç•´è¸Œç¨ æ„ç¹ä»‡ç»¸çž…丑è‡åˆå‡ºæ©±åŽ¨èº‡é”„é›æ»é™¤æ¥š"], -["b440","碄碅碆碈碊碋ç¢ç¢ç¢’碔碕碖碙ç¢ç¢žç¢ 碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌ç£ç£Žç£ç£‘磒磓磖磗磘磚",9], -["b480","磤磥磦磧磩磪磫ç£",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗æ触处æ£å·ç©¿æ¤½ä¼ 船喘串疮窗幢床闯创å¹ç‚Šæ¶é”¤åž‚æ˜¥æ¤¿é†‡å”‡æ·³çº¯è ¢æˆ³ç»°ç–µèŒ¨ç£é›Œè¾žæ…ˆç“·è¯æ¤åˆºèµæ¬¡èªè‘±å›±åŒ†ä»Žä¸›å‡‘粗醋簇促蹿篡窜摧崔催脆ç˜ç²¹æ·¬ç¿ æ‘å˜å¯¸ç£‹æ’®æ“措挫错æè¾¾ç”瘩打大呆æ¹å‚£æˆ´å¸¦æ®†ä»£è´·è¢‹å¾…逮"], -["b540","ç¤",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"], -["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌ç¦ç¦Žç¦ç¦‘ç¦’æ€ è€½æ‹…ä¸¹å•éƒ¸æŽ¸èƒ†æ—¦æ°®ä½†æƒ®æ·¡è¯žå¼¹è›‹å½“挡党è¡æ¡£åˆ€æ£è¹ˆå€’岛祷导到稻悼é“盗德得的蹬ç¯ç™»ç‰çžªå‡³é‚“å ¤ä½Žæ»´è¿ªæ•Œç¬›ç‹„æ¶¤ç¿Ÿå«¡æŠµåº•åœ°è’‚ç¬¬å¸å¼Ÿé€’ç¼”é¢ æŽ‚æ»‡ç¢˜ç‚¹å…¸é›åž«ç”µä½ƒç”¸åº—æƒ¦å¥ æ·€æ®¿ç¢‰å¼é›•å‡‹åˆæŽ‰åŠé’“调跌爹碟è¶è¿è°å "], -["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎ç§ç§ç§“秔秖秗秙",5,"ç§ ç§¡ç§¢ç§¥ç§¨ç§ª"], -["b680","秬秮秱",6,"秹秺秼秾秿ç¨ç¨„稅稇稈稉稊稌ç¨",4,"稕稖稘稙稛稜ä¸ç›¯å®é’‰é¡¶é¼Žé”å®šè®¢ä¸¢ä¸œå†¬è‘£æ‡‚åŠ¨æ ‹ä¾—æ«å†»æ´žå…œæŠ–斗陡豆逗痘都ç£æ¯’çŠŠç‹¬è¯»å µç¹èµŒæœé•€è‚šåº¦æ¸¡å¦’端çŸé”»æ®µæ–ç¼Žå †å…‘é˜Ÿå¯¹å¢©å¨è¹²æ•¦é¡¿å›¤é’盾é掇哆多夺垛躲朵跺舵å‰æƒ°å •è›¾å³¨é¹…ä¿„é¢è®¹å¨¥æ¶åŽ„扼é鄂饿æ©è€Œå„¿è€³å°”饵洱二"], -["b740","ç¨ç¨Ÿç¨¡ç¨¢ç¨¤",14,"稴稵稶稸稺稾穀",5,"穇",9,"ç©’",4,"穘",16], -["b780","ç©©",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎çªçªçª“窔窙窚窛窞窡窢贰å‘罚çä¼ä¹é˜€æ³•ç藩帆番翻樊矾钒ç¹å‡¡çƒ¦å返范贩犯é¥æ³›åŠèŠ³æ–¹è‚ªæˆ¿é˜²å¦¨ä»¿è®¿çººæ”¾è²éžå•¡é£žè‚¥åŒªè¯½å 肺废沸费芬酚å©æ°›åˆ†çº·åŸç„šæ±¾ç²‰å¥‹ä»½å¿¿æ„¤ç²ªä¸°å°æž«èœ‚峰锋风疯烽逢冯ç¼è®½å¥‰å‡¤ä½›å¦å¤«æ•·è‚¤åµæ‰¶æ‹‚è¾å¹…氟符ä¼ä¿˜æœ"], -["b840","窣窤窧窩窪窫窮",4,"窴",10,"ç«€",10,"ç«Œ",9,"竗竘竚竛竜ç«ç«¡ç«¢ç«¤ç«§",5,"竮竰竱竲竳"], -["b880","ç«´",4,"竻竼竾笀ç¬ç¬‚笅笇笉笌ç¬ç¬Žç¬ç¬’笓笖笗笘笚笜ç¬ç¬Ÿç¬¡ç¬¢ç¬£ç¬§ç¬©ç¬æµ®æ¶ªç¦è¢±å¼—甫抚辅俯釜斧脯腑府è…赴副覆赋å¤å‚…付阜父腹负富讣附妇缚å’噶嘎该改概钙盖溉干甘æ†æŸ‘ç«¿è‚赶感秆敢赣冈刚钢缸肛纲岗港æ 篙皋高è†ç¾”糕æžé•ç¨¿å‘Šå“¥æŒæ戈鸽胳疙割é©è‘›æ ¼è›¤é˜éš”铬个å„ç»™æ ¹è·Ÿè€•æ›´åºšç¾¹"], -["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"ç†çˆçŠççŽç“ç•ç—ç™çœçžçŸç¡ç£",10,"ç¯ç°ç³ç´ç¶ç¸çºç¼ç½ç¿ç®ç®‚箃箄箆",6,"箎ç®"], -["b980","ç®‘ç®’ç®“ç®–ç®˜ç®™ç®šç®›ç®žç®Ÿç® ç®£ç®¤ç®¥ç®®ç®¯ç®°ç®²ç®³ç®µç®¶ç®·ç®¹",7,"篂篃範埂耿梗工攻功æ龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构è´å¤Ÿè¾œè‡å’•ç®ä¼°æ²½å¤å§‘鼓å¤è›Šéª¨è°·è‚¡æ•…顾固雇刮瓜å‰å¯¡æŒ‚褂乖æ‹æ€ªæ£ºå…³å®˜å† 观管馆ç½æƒ¯çŒè´¯å…‰å¹¿é€›ç‘°è§„åœç¡…归龟闺轨鬼诡癸桂柜跪贵刽辊滚æ£é”…éƒå›½æžœè£¹è¿‡å“ˆ"], -["ba40","篅篈築篊篋ç¯ç¯Žç¯ç¯ç¯’篔",4,"ç¯›ç¯œç¯žç¯Ÿç¯ ç¯¢ç¯£ç¯¤ç¯§ç¯¨ç¯©ç¯«ç¯¬ç¯ç¯¯ç¯°ç¯²",4,"篸篹篺篻篽篿",7,"簈簉簊ç°ç°Žç°",5,"簗簘簙"], -["ba80","ç°š",4,"ç° ",5,"簨簩簫",12,"ç°¹",5,"籂骸å©æµ·æ°¦äº¥å®³éª‡é…£æ†¨é‚¯éŸ©å«æ¶µå¯’函喊罕翰撼æ旱憾æ‚焊汗汉夯æ航壕嚎豪毫éƒå¥½è€—å·æµ©å‘µå–è·èæ ¸ç¦¾å’Œä½•åˆç›’貉阂河涸赫è¤é¹¤è´ºå˜¿é»‘ç—•å¾ˆç‹ æ¨å“¼äº¨æ¨ªè¡¡æ’轰哄烘虹鸿洪å®å¼˜çº¢å–‰ä¾¯çŒ´å¼åŽšå€™åŽå‘¼ä¹Žå¿½ç‘šå£¶è‘«èƒ¡è´ç‹ç³Šæ¹–"], -["bb40","籃",9,"籎",36,"ç±µ",5,"ç±¾",9], -["bb80","粈粊",6,"ç²“ç²”ç²–ç²™ç²šç²›ç² ç²¡ç²£ç²¦ç²§ç²¨ç²©ç²«ç²¬ç²ç²¯ç²°ç²´",4,"粺粻弧虎唬护互沪户花哗åŽçŒ¾æ»‘画划化è¯æ§å¾Šæ€€æ·®å欢环桓还缓æ¢æ‚£å”¤ç—ªè±¢ç„•æ¶£å®¦å¹»è’慌黄磺è—簧皇凰惶煌晃幌æè°Žç°æŒ¥è¾‰å¾½æ¢è›”回æ¯æ‚”æ…§å‰æƒ 晦贿秽会烩汇讳诲绘è¤æ˜å©šé‚浑混è±æ´»ä¼™ç«èŽ·æˆ–惑éœè´§ç¥¸å‡»åœ¾åŸºæœºç•¸ç¨½ç§¯ç®•"], -["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛ç³ç³žç³¡",6,"糩",5,"ç³°",7,"糹糺糼",13,"ç´‹",5], -["bc80","ç´‘",14,"紡紣紤紥紦紨紩紪紬ç´ç´®ç´°",6,"肌饥迹激讥鸡姬绩缉å‰æžæ£˜è¾‘ç±é›†åŠæ€¥ç–¾æ±²å³å«‰çº§æŒ¤å‡ 脊己蓟技冀å£ä¼Žç¥å‰‚æ‚¸æµŽå¯„å¯‚è®¡è®°æ—¢å¿Œé™…å¦“ç»§çºªå˜‰æž·å¤¹ä½³å®¶åŠ èšé¢Šè´¾ç”²é’¾å‡ç¨¼ä»·æž¶é©¾å«æ¼ç›‘åšå°–笺间煎兼肩艰奸缄茧检柬碱硷拣æ¡ç®€ä¿å‰ªå‡è槛鉴践贱è§é”®ç®ä»¶"], -["bd40","ç´·",54,"絯",7], -["bd80","絸",32,"å¥èˆ°å‰‘饯æ¸æº…æ¶§å»ºåƒµå§œå°†æµ†æ±Ÿç–†è’‹æ¡¨å¥–è®²åŒ é…±é™è•‰æ¤’ç¤ç„¦èƒ¶äº¤éƒŠæµ‡éª„娇嚼æ…铰矫侥脚狡角饺缴绞剿教酵轿较å«çª–æ接皆秸街阶截劫节桔æ°æ·ç«ç«æ´ç»“解å§æˆ’藉芥界借介疥诫届巾ç‹æ–¤é‡‘今津襟紧锦仅谨进é³æ™‹ç¦è¿‘烬浸"], -["be40","継",12,"綧",6,"綯",42], -["be80","ç·š",32,"尽劲è†å…¢èŒŽç›æ™¶é²¸äº¬æƒŠç²¾ç²³ç»äº•è¦æ™¯é¢ˆé™å¢ƒæ•¬é•œå¾„ç—‰é–竟竞净炯窘æªç©¶çº 玖éŸä¹…ç¸ä¹é…’åŽ©æ•‘æ—§è‡¼èˆ…å’Žå°±ç–šéž æ‹˜ç‹™ç–½å±…é©¹èŠå±€å’€çŸ©ä¸¾æ²®èšæ‹’æ®å·¨å…·è·è¸žé”¯ä¿±å¥æƒ§ç‚¬å‰§æ鹃娟倦眷å·ç»¢æ’…攫抉掘倔爵觉决诀ç»å‡èŒé’§å†›å›å³»"], -["bf40","ç·»",62], -["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡éªå–€å’–å¡å’¯å¼€æ©æ¥·å‡¯æ…¨åˆŠå ªå‹˜åŽç çœ‹åº·æ…·ç³ æ‰›æŠ—äº¢ç‚•è€ƒæ‹·çƒ¤é å·è‹›æŸ¯æ£µç£•é¢—科壳咳å¯æ¸´å…‹åˆ»å®¢è¯¾è‚¯å•ƒåž¦æ³å‘å空æå”æŽ§æŠ å£æ‰£å¯‡æž¯å“窟苦酷库裤夸垮挎跨胯å—ç·ä¾©å¿«å®½æ¬¾åŒ¡ç狂框矿眶旷况äºç›”岿窥葵奎éå‚€"], -["c040","繞",35,"纃",23,"纜çºçºž"], -["c080","纮纴纻纼绖绤绬绹缊ç¼ç¼žç¼·ç¼¹ç¼»",6,"罃罆",9,"罒罓馈愧溃å¤æ˜†æ†å›°æ‹¬æ‰©å»“阔垃拉喇蜡腊辣啦莱æ¥èµ–è“婪æ 拦篮阑兰澜谰æ½è§ˆæ‡’缆烂滥ç…榔狼廊郎朗浪æžåŠ³ç‰¢è€ä½¬å§¥é…ªçƒ™æ¶å‹’ä¹é›·é•è•¾ç£Šç´¯å„¡åž’擂肋类泪棱楞冷厘梨çŠé»Žç¯±ç‹¸ç¦»æ¼“ç†æŽé‡Œé²¤ç¤¼èŽ‰è”åæ —ä¸½åŽ‰åŠ±ç ¾åŽ†åˆ©å‚ˆä¾‹ä¿"], -["c140","罖罙罛罜ç½ç½žç½ ç½£",4,"罫罬ç½ç½¯ç½°ç½³ç½µç½¶ç½·ç½¸ç½ºç½»ç½¼ç½½ç½¿ç¾€ç¾‚",7,"羋ç¾ç¾",4,"羕",4,"ç¾›ç¾œç¾ ç¾¢ç¾£ç¾¥ç¾¦ç¾¨",6,"ç¾±"], -["c180","ç¾³",4,"羺羻羾翀翂翃翄翆翇翈翉翋ç¿ç¿",4,"ç¿–ç¿—ç¿™",5,"翢翣痢立粒沥隶力璃哩俩è”莲连镰廉怜涟帘敛脸链æ‹ç‚¼ç»ƒç²®å‡‰æ¢ç²±è‰¯ä¸¤è¾†é‡æ™¾äº®è°…æ’©èŠåƒšç–—燎寥辽潦了撂镣廖料列裂烈劣猎ç³æž—磷霖临邻鳞淋凛èµå拎玲è±é›¶é¾„铃伶羚凌çµé™µå²é¢†å¦ä»¤æºœç‰æ¦´ç¡«é¦ç•™åˆ˜ç˜¤æµæŸ³å…é¾™è‹å’™ç¬¼çª¿"], -["c240","翤翧翨翪翫翬ç¿ç¿¯ç¿²ç¿´",6,"翽翾翿耂耇耈耉耊耎è€è€‘耓耚耛è€è€žè€Ÿè€¡è€£è€¤è€«",5,"耲耴耹耺耼耾è€èè„è…è‡èˆè‰èŽèèè‘è“è•è–è—"], -["c280","è™è›",13,"è«",5,"è²",11,"隆垄拢陇楼娄æ‚篓æ¼é™‹èŠ¦å¢é¢…åºç‚‰æŽ³å¤è™é²éº“碌露路赂鹿潞禄录陆戮驴å•é“侣旅履屡缕虑氯律率滤绿峦挛åªæ»¦åµä¹±æŽ 略抡轮伦仑沦纶论è螺罗逻锣箩骡裸è½æ´›éª†ç»œå¦ˆéº»çŽ›ç 蚂马骂嘛å—埋买麦å–迈脉瞒馒蛮满蔓曼慢漫"], -["c340","è¾è‚肂肅肈肊è‚",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"èƒ",6,"èƒ˜èƒŸèƒ èƒ¢èƒ£èƒ¦èƒ®èƒµèƒ·èƒ¹èƒ»èƒ¾èƒ¿è„€è„脃脄脅脇脈脋"], -["c380","脌脕脗脙脛脜è„è„Ÿ",12,"è„脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆å¯èŒ‚冒帽貌贸么玫枚梅酶霉煤没眉媒é•æ¯ç¾Žæ˜§å¯å¦¹åªšé—¨é—·ä»¬èŒè’™æª¬ç›Ÿé”°çŒ›æ¢¦åŸçœ¯é†šé¡ç³œè¿·è°œå¼¥ç±³ç§˜è§…æ³Œèœœå¯†å¹‚æ£‰çœ ç»µå†•å…勉娩缅é¢è‹—æçž„è—秒渺庙妙蔑ç民抿皿æ•æ‚¯é—½æ˜ŽèžŸé¸£é“å命谬摸"], -["c440","è…€",5,"腇腉è…è…Žè…腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸è†è†ƒ",4,"膉膋膌è†è†Žè†è†’",5,"膙膚膞",4,"膤膥"], -["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋è‡",6,"摹蘑模膜磨摩é”æŠ¹æœ«èŽ«å¢¨é»˜æ²«æ¼ å¯žé™Œè°‹ç‰ŸæŸæ‹‡ç‰¡äº©å§†æ¯å¢“暮幕募慕木目ç¦ç‰§ç©†æ‹¿å“ªå‘é’ é‚£å¨œçº³æ°–ä¹ƒå¥¶è€å¥ˆå—ç”·éš¾å›ŠæŒ è„‘æ¼é—¹æ·–å‘¢é¦å†…å«©èƒ½å¦®éœ“å€ªæ³¥å°¼æ‹Ÿä½ åŒ¿è…»é€†æººè”«æ‹ˆå¹´ç¢¾æ’µæ»å¿µå¨˜é…¿é¸Ÿå°¿æè‚å½å•®é•Šé•æ¶…æ‚¨æŸ ç‹žå‡å®"], -["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎èˆèˆ‘舓舕",5,"èˆèˆ 舤舥舦舧舩舮舲舺舼舽舿"], -["c580","艀è‰è‰‚艃艅艆艈艊艌è‰è‰Žè‰",7,"艙艛艜è‰è‰žè‰ ",7,"艩拧泞牛æ‰é’®çº½è„“浓农弄奴努怒女暖è™ç–ŸæŒªæ‡¦ç³¯è¯ºå“¦æ¬§é¸¥æ®´è—•å‘•å¶æ²¤å•ªè¶´çˆ¬å¸•æ€•ç¶æ‹æŽ’牌徘湃派攀潘盘ç£ç›¼ç•”判å›ä¹“庞æ—耪胖抛咆刨炮è¢è·‘泡呸胚培裴赔陪é…ä½©æ²›å–·ç›†ç °æŠ¨çƒ¹æ¾Žå½è“¬æ£šç¡¼ç¯·è†¨æœ‹é¹æ§ç¢°å¯ç ’霹批披劈çµæ¯—"], -["c640","艪艫艬è‰è‰±è‰µè‰¶è‰·è‰¸è‰»è‰¼èŠ€èŠèŠƒèŠ…芆芇芉芌èŠèŠ“èŠ”èŠ•èŠ–èŠšèŠ›èŠžèŠ èŠ¢èŠ£èŠ§èŠ²èŠµèŠ¶èŠºèŠ»èŠ¼èŠ¿è‹€è‹‚è‹ƒè‹…è‹†è‹‰è‹è‹–苙苚è‹è‹¢è‹§è‹¨è‹©è‹ªè‹¬è‹è‹®è‹°è‹²è‹³è‹µè‹¶è‹¸"], -["c680","苺苼",4,"茊茋èŒèŒèŒ’茓茖茘茙èŒ",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻å±è¬ç¯‡å片骗飘漂瓢票撇瞥拼频贫å“è˜ä¹’åªè‹¹èå¹³å‡ç“¶è¯„å±å¡æ³¼é¢‡å©†ç ´é„迫粕剖扑铺仆莆葡è©è’²åŸ”朴圃普浦谱æ›ç€‘æœŸæ¬ºæ –æˆšå¦»ä¸ƒå‡„æ¼†æŸ’æ²å…¶æ£‹å¥‡æ§ç•¦å´Žè„é½æ——祈ç¥éª‘起岂乞ä¼å¯å¥‘ç Œå™¨æ°”è¿„å¼ƒæ±½æ³£è®«æŽ"], -["c740","茾茿èè‚è„è…èˆèŠ",4,"è“è•",4,"èè¢è°",6,"è¹èºè¾",6,"莇莈莊莋莌èŽèŽèŽèŽ‘莔莕莖莗莙莚èŽèŽŸèŽ¡",6,"莬èŽèŽ®"], -["c780","莯莵莻莾莿è‚èƒè„è†èˆè‰è‹èèŽèè‘è’è“è•è—è™èšè›èžè¢è£è¤è¦è§è¨è«è¬èæ°æ´½ç‰µæ‰¦é’Žé“…åƒè¿ç¾ä»Ÿè°¦ä¹¾é»”钱钳å‰æ½œé£æµ…è°´å ‘åµŒæ¬ æ‰æžªå‘›è…”羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘å³ä¿çªåˆ‡èŒ„且怯窃钦侵亲秦ç´å‹¤èŠ¹æ“’禽å¯æ²é’轻氢倾å¿æ¸…擎晴氰情顷请庆ç¼ç©·ç§‹ä¸˜é‚±çƒæ±‚å›šé…‹æ³…è¶‹åŒºè›†æ›²èº¯å±ˆé©±æ¸ "], -["c840","è®è¯è³",4,"èºè»è¼è¾è¿è€è‚è…è‡èˆè‰èŠèè’",5,"è™èšè›èž",5,"è©",7,"è²",5,"è¹èºè»è¾",7,"葇葈葉"], -["c880","è‘Š",6,"è‘’",4,"葘è‘è‘žè‘Ÿè‘ è‘¢è‘¤",4,"葪葮葯葰葲葴葷葹葻葼å–娶龋趣去圈颧æƒé†›æ³‰å…¨ç—Šæ‹³çŠ¬åˆ¸åŠç¼ºç‚”瘸å´é¹Šæ¦·ç¡®é›€è£™ç¾¤ç„¶ç‡ƒå†‰æŸ“瓤壤攘嚷让饶扰绕惹çƒå£¬ä»äººå¿éŸ§ä»»è®¤åˆƒå¦Šçº«æ‰”ä»æ—¥æˆŽèŒ¸è“‰è£èžç†”溶容绒冗æ‰æŸ”è‚‰èŒ¹è •å„’åºå¦‚辱乳æ±å…¥è¤¥è½¯é˜®è•Šç‘žé”闰润若弱撒洒è¨è…®é³ƒå¡žèµ›ä¸‰å"], -["c940","葽",4,"蒃蒄蒅蒆蒊è’è’",7,"蒘蒚蒛è’è’žè’Ÿè’ è’¢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎è“蓒蓔蓕蓗"], -["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"è“蓮蓯蓱",10,"蓽蓾蔀è”蔂伞散桑嗓丧æ”éªšæ‰«å«‚ç‘Ÿè‰²æ¶©æ£®åƒ§èŽŽç ‚æ€åˆ¹æ²™çº±å‚»å•¥ç…žç›æ™’çŠè‹«æ‰å±±åˆ 煽衫闪陕擅赡膳善汕扇缮墒伤商èµæ™Œä¸Šå°šè£³æ¢¢æŽç¨çƒ§èŠå‹ºéŸ¶å°‘哨邵ç»å¥¢èµŠè›‡èˆŒèˆèµ¦æ‘„å°„æ…‘æ¶‰ç¤¾è®¾ç ·ç”³å‘»ä¼¸èº«æ·±å¨ ç»…ç¥žæ²ˆå®¡å©¶ç”šè‚¾æ…Žæ¸—å£°ç”Ÿç”¥ç‰²å‡ç»³"], -["ca40","蔃",8,"è”蔎è”è”蔒蔔蔕蔖蔘蔙蔛蔜è”è”žè” è”¢",8,"è”",9,"蔾",4,"蕄蕅蕆蕇蕋",10], -["ca80","蕗蕘蕚蕛蕜è•è•Ÿ",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀è–çœç››å‰©èƒœåœ£å¸ˆå¤±ç‹®æ–½æ¹¿è¯—尸虱å石拾时什食蚀实识å²çŸ¢ä½¿å±Žé©¶å§‹å¼ç¤ºå£«ä¸–柿事æ‹èª“é€åŠ¿æ˜¯å—œå™¬é€‚仕ä¾é‡Šé¥°æ°å¸‚æƒå®¤è§†è¯•æ”¶æ‰‹é¦–守寿授售å—瘦兽蔬枢梳殊抒输å”舒淑ç–书赎å°ç†Ÿè–¯æš‘曙署蜀é»é¼ å±žæœ¯è¿°æ ‘æŸæˆç«–墅庶数漱"], -["cb40","薂薃薆薈",6,"è–",10,"è–",6,"薥薦薧薩薫薬è–è–±",5,"薸薺",6,"è—‚",6,"è—Š",4,"è—‘è—’"], -["cb80","藔藖",5,"è—",6,"藥藦藧藨藪",14,"æ•åˆ·è€æ‘”è¡°ç”©å¸…æ “æ‹´éœœåŒçˆ½è°æ°´ç¡ç¨Žå®çž¬é¡ºèˆœè¯´ç¡•æœ”çƒæ–¯æ’•å˜¶æ€ç§å¸ä¸æ»è‚†å¯ºå—£å››ä¼ºä¼¼é¥²å·³æ¾è€¸æ€‚颂é€å®‹è®¼è¯µæœè‰˜æ“žå—½è‹é…¥ä¿—ç´ é€Ÿç²Ÿåƒ³å¡‘æº¯å®¿è¯‰è‚ƒé…¸è’œç®—è™½éš‹éšç»¥é«“碎å²ç©—é‚隧祟å™æŸç¬‹è“‘æ¢å”†ç¼©çç´¢é”所塌他它她塔"], -["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"], -["cc80","è™",11,"虒虓處",4,"虛虜è™è™Ÿè™ 虡虣",7,"ç挞蹋è¸èƒŽè‹”抬å°æ³°é…žå¤ªæ€æ±°å摊贪瘫滩å›æª€ç—°æ½è°è°ˆå¦æ¯¯è¢’碳探å¹ç‚汤塘æªå ‚æ£ è†›å”糖倘躺淌趟烫æŽæ¶›æ»”绦è„桃逃淘陶讨套特藤腾疼誊梯剔踢锑æ题蹄啼体替åšæƒ•æ¶•å‰ƒå±‰å¤©æ·»å¡«ç”°ç”œæ¬èˆ”腆挑æ¡è¿¢çœºè·³è´´é“帖厅å¬çƒƒ"], -["cd40","è™è™¯è™°è™²",6,"蚃",6,"蚎",4,"蚔蚖",5,"èšž",4,"蚥蚦蚫èšèš®èš²èš³èš·èš¸èš¹èš»",4,"è›è›‚蛃蛅蛈蛌è›è›’蛓蛕蛖蛗蛚蛜"], -["cd80","è›è› 蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿èœèœ„蜅蜆蜋蜌蜎èœèœèœ‘蜔蜖汀廷åœäºåºæŒºè‰‡é€šæ¡é…®çž³åŒé“œå½¤ç«¥æ¡¶æ…ç’统痛å·æŠ•å¤´é€å‡¸ç§ƒçªå›¾å¾’é€”æ¶‚å± åœŸåå…”æ¹å›¢æŽ¨é¢“腿蜕褪退åžå±¯è‡€æ‹–托脱鸵陀驮驼æ¤å¦¥æ‹“唾挖哇蛙洼娃瓦袜æªå¤–豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄å¨"], -["ce40","蜙蜛èœèœŸèœ 蜤蜦蜧蜨蜪蜫蜬èœèœ¯èœ°èœ²èœ³èœµèœ¶èœ¸èœ¹èœºèœ¼èœ½è€",6,"èŠè‹èèèè‘è’è”è•è–è˜èš",5,"è¡è¢è¦",7,"è¯è±è²è³èµ"], -["ce80","è·è¸è¹èºè¿èž€èžèž„螆螇螉螊螌螎",4,"螔螕螖螘",6,"èž ",4,"å·å¾®å±éŸ¦è¿æ¡…围唯惟为æ½ç»´è‹‡èŽå§”伟伪尾纬未蔚味ç•èƒƒå–‚éä½æ¸è°“尉慰å«ç˜Ÿæ¸©èšŠæ–‡é—»çº¹å»ç¨³ç´Šé—®å—¡ç¿ç“®æŒèœ—涡çªæˆ‘æ–¡å§æ¡æ²ƒå·«å‘œé’¨ä¹Œæ±¡è¯¬å±‹æ— 芜梧å¾å´æ¯‹æ¦äº”æ‚åˆèˆžä¼ä¾®åžæˆŠé›¾æ™¤ç‰©å‹¿åŠ¡æ‚Ÿè¯¯æ˜”熙æžè¥¿ç¡’矽晰嘻å¸é”¡ç‰º"], -["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿èŸ",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜èŸèŸžèŸŸèŸ¡èŸ¢èŸ£èŸ¤èŸ¦èŸ§èŸ¨èŸ©èŸ«èŸ¬èŸèŸ¯",9], -["cf80","èŸºèŸ»èŸ¼èŸ½èŸ¿è €è è ‚è „",5,"è ‹",7,"è ”è —è ˜è ™è šè œ",4,"è £ç¨€æ¯å¸Œæ‚‰è†å¤•æƒœç†„烯溪æ±çŠ€æª„è¢å¸ä¹ 媳喜铣洗系隙æˆç»†çžŽè™¾åŒ£éœžè¾–æš‡å³¡ä¾ ç‹ä¸‹åŽ¦å¤å“掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷é™çº¿ç›¸åŽ¢é•¶é¦™ç®±è¥„湘乡翔祥详想å“享项巷橡åƒå‘象è§ç¡éœ„削哮嚣销消宵淆晓"], -["d040","è ¤",13,"è ³",5,"è ºè »è ½è ¾è ¿è¡è¡‚衃衆",5,"è¡Ž",5,"衕衖衘衚",6,"衦衧衪è¡è¡¯è¡±è¡³è¡´è¡µè¡¶è¡¸è¡¹è¡º"], -["d080","衻衼袀袃袆袇袉袊袌袎è¢è¢è¢‘袓袔袕袗",4,"è¢",4,"袣袥",5,"å°åæ ¡è‚–å•¸ç¬‘æ•ˆæ¥”äº›æ‡èŽéž‹å挟æºé‚ªæ–œèƒè°å†™æ¢°å¸èŸ¹æ‡ˆæ³„泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸æ性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须å¾è®¸è“„é…—å™æ—åºç•œæ¤çµ®å©¿ç»ªç»è½©å–§å®£æ‚¬æ—‹çŽ„"], -["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌è£è£è£è£‘裓裖裗裚",4,"è£ è£¡è£¦è£§è£©",6,"裲裵裶裷裺裻製裿褀è¤è¤ƒ",5], -["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬è¤è¤®è¤¯è¤±è¤²è¤³è¤µè¤·é€‰ç™£çœ©ç»šé´è–›å¦ç©´é›ªè¡€å‹‹ç†å¾ªæ—¬è¯¢å¯»é©¯å·¡æ®‰æ±›è®è®¯é€Šè¿…压押鸦é¸å‘€ä¸«èŠ½ç‰™èšœå´–衙涯雅哑亚讶焉咽阉烟淹ç›ä¸¥ç ”蜒岩延言颜阎炎沿奄掩眼è¡æ¼”è‰³å °ç‡•åŽŒç šé›å”彦焰宴谚验殃央鸯秧æ¨æ‰¬ä½¯ç–¡ç¾Šæ´‹é˜³æ°§ä»°ç—’å…»æ ·æ¼¾é‚€è…°å¦–ç‘¶"], -["d240","褸",8,"襂襃襅",24,"è¥ ",5,"襧",19,"襼"], -["d280","襽襾覀覂覄覅覇",26,"摇尧é¥çª‘谣姚咬舀è¯è¦è€€æ¤°å™Žè€¶çˆ·é‡Žå†¶ä¹Ÿé¡µæŽ–业å¶æ›³è…‹å¤œæ¶²ä¸€å£¹åŒ»æ–铱ä¾ä¼Šè¡£é¢å¤·é—移仪胰疑沂宜姨å½æ¤…èšå€šå·²ä¹™çŸ£ä»¥è‰ºæŠ‘易邑屹亿役臆逸肄疫亦裔æ„毅忆义益溢诣议谊译异翼翌绎茵è«å› 殷音阴姻åŸé“¶æ·«å¯…饮尹引éš"], -["d340","覢",30,"觃è§è§“觔觕觗觘觙觛è§è§Ÿè§ 觡觢觤觧觨觩觪觬è§è§®è§°è§±è§²è§´",6], -["d380","觻",4,"è¨",5,"計",21,"å°è‹±æ¨±å©´é¹°åº”缨莹è¤è¥è§è‡è¿Žèµ¢ç›ˆå½±é¢–ç¡¬æ˜ å“Ÿæ‹¥ä½£è‡ƒç—ˆåº¸é›è¸Šè›¹å’泳涌永æ¿å‹‡ç”¨å¹½ä¼˜æ‚ 忧尤由邮铀犹油游酉有å‹å³ä½‘釉诱åˆå¹¼è¿‚淤于盂榆虞愚舆余俞逾鱼愉æ¸æ¸”隅予娱雨与屿禹宇è¯ç¾½çŽ‰åŸŸèŠ‹éƒåé‡å–»å³ªå¾¡æ„ˆæ¬²ç‹±è‚²èª‰"], -["d440","訞",31,"訿",8,"詉",21], -["d480","è©Ÿ",25,"詺",6,"浴寓裕预豫é©é¸³æ¸Šå†¤å…ƒåž£è¢åŽŸæ´è¾•å›å‘˜åœ†çŒ¿æºç¼˜è¿œè‹‘愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨å…è¿è•´é…晕韵å•åŒç ¸æ‚æ ½å“‰ç¾å®°è½½å†åœ¨å’±æ”’暂赞赃è„葬é糟凿藻枣早澡蚤èºå™ªé€ çš‚ç¶ç‡¥è´£æ‹©åˆ™æ³½è´¼æ€Žå¢žæ†Žæ›¾èµ 扎喳渣æœè½§"], -["d540","èª",7,"誋",7,"誔",46], -["d580","諃",32,"é“¡é—¸çœ¨æ …æ¦¨å’‹ä¹ç‚¸è¯ˆæ‘˜æ–‹å®…窄债寨瞻毡詹粘沾ç›æ–©è¾—å´å±•è˜¸æ ˆå æˆ˜ç«™æ¹›ç»½æ¨Ÿç« å½°æ¼³å¼ æŽŒæ¶¨æ–丈å¸è´¦ä»—胀瘴障招æ˜æ‰¾æ²¼èµµç…§ç½©å…†è‚‡å¬é®æŠ˜å“²è›°è¾™è€…锗蔗这浙çæ–ŸçœŸç”„ç §è‡»è´žé’ˆä¾¦æž•ç–¹è¯Šéœ‡æŒ¯é•‡é˜µè’¸æŒ£çå¾ç‹°äº‰æ€”整拯æ£æ”¿"], -["d640","諤",34,"謈",27], -["d680","謤謥謧",30,"帧症郑è¯èŠæžæ”¯å±èœ˜çŸ¥è‚¢è„‚æ±ä¹‹ç»‡èŒç›´æ¤æ®–执值侄å€æŒ‡æ¢è¶¾åªæ—¨çº¸å¿—挚掷至致置帜峙制智秩稚质炙痔滞治窒ä¸ç›…å¿ é’Ÿè¡·ç»ˆç§è‚¿é‡ä»²ä¼—舟周州洲诌粥轴肘帚咒皱宙昼骤ç æ ªè››æœ±çŒªè¯¸è¯›é€ç«¹çƒ›ç…®æ‹„瞩嘱主著柱助蛀贮铸ç‘"], -["d740","è†",31,"è§",4,"è",25], -["d780","讇",24,"讬讱讻诇è¯è¯ªè°‰è°žä½æ³¨ç¥é©»æŠ“çˆªæ‹½ä¸“ç –è½¬æ’°èµšç¯†æ¡©åº„è£…å¦†æ’žå£®çŠ¶æ¤Žé”¥è¿½èµ˜å 缀谆准æ‰æ‹™å“æ¡Œç¢èŒé…Œå•„ç€ç¼æµŠå…¹å’¨èµ„姿滋淄åœç´«ä»”籽滓å自æ¸å—鬃棕踪宗综总纵邹走å¥æ租足å’æ—祖诅阻组钻纂嘴醉最罪尊éµæ˜¨å·¦ä½æŸžåšä½œå座"], -["d840","è°¸",8,"豂豃豄豅豈豊豋è±",7,"豖豗豘豙豛",5,"è±£",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"], -["d880","貈貋è²",6,"貕貖貗貙",20,"äºä¸Œå…€ä¸å»¿å…丕亘丞鬲å¬å™©ä¸¨ç¦ºä¸¿åŒ•ä¹‡å¤çˆ»å®æ°å›Ÿèƒ¤é¦—毓ç¾é¼—丶亟é¼ä¹œä¹©äº“芈å›å•¬å˜ä»„åŽåŽåŽ£åŽ¥åŽ®é¥èµåŒšåµåŒ¦åŒ®åŒ¾èµœå¦å£åˆ‚刈刎åˆåˆ³åˆ¿å‰€å‰Œå‰žå‰¡å‰œè’¯å‰½åŠ‚åŠåŠåŠ“冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚ä½"], -["d940","è²®",62], -["d980","è³",32,"佟佗伲伽佶佴侑侉侃ä¾ä½¾ä½»ä¾ªä½¼ä¾¬ä¾”俦俨俪俅俚俣俜俑俟俸倩åŒä¿³å€¬å€å€®å€ä¿¾å€œå€Œå€¥å€¨å¾åƒå•åˆåŽå¬å»å‚¥å‚§å‚©å‚ºåƒ–儆åƒåƒ¬åƒ¦åƒ®å„‡å„‹ä»æ°½ä½˜ä½¥ä¿Žé¾ 汆籴兮巽黉馘å†å¤”勹åŒè¨‡åŒå‡«å¤™å…•äº å…–äº³è¡®è¢¤äºµè„”è£’ç¦€å¬´è ƒç¾¸å†«å†±å†½å†¼"], -["da40","è´Ž",14,"è´ èµ‘èµ’èµ—èµŸèµ¥èµ¨èµ©èµªèµ¬èµ®èµ¯èµ±èµ²èµ¸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"è¶ è¶¡"], -["da80","趢趤",12,"趲趶趷趹趻趽跀è·è·‚跅跇跈跉跊è·è·è·’è·“è·”å‡‡å†–å†¢å†¥è® è®¦è®§è®ªè®´è®µè®·è¯‚è¯ƒè¯‹è¯è¯Žè¯’è¯“è¯”è¯–è¯˜è¯™è¯œè¯Ÿè¯ è¯¤è¯¨è¯©è¯®è¯°è¯³è¯¶è¯¹è¯¼è¯¿è°€è°‚è°„è°‡è°Œè°è°‘谒谔谕谖谙谛谘è°è°Ÿè° 谡谥谧谪谫谮谯谲谳谵谶å©åºé˜é˜¢é˜¡é˜±é˜ªé˜½é˜¼é™‚陉陔陟陧陬陲陴隈éšéš—éš°é‚—é‚›é‚邙邬邡邴邳邶邺"], -["db40","è·•è·˜è·™è·œè· è·¡è·¢è·¥è·¦è·§è·©è·è·®è·°è·±è·²è·´è·¶è·¼è·¾",6,"踆踇踈踋è¸è¸Žè¸è¸‘踒踓踕",7,"è¸ è¸¡è¸¤",4,"踫è¸è¸°è¸²è¸³è¸´è¸¶è¸·è¸¸è¸»è¸¼è¸¾"], -["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰éƒéƒ…邾éƒéƒ„郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆åˆå¥‚劢劬åŠåŠ¾å“¿å‹å‹–å‹°åŸç‡®çŸå»´å‡µå‡¼é¬¯åŽ¶å¼ç•šå·¯åŒåž©åž¡å¡¾å¢¼å£…壑圩圬圪圳圹圮圯åœåœ»å‚å©åž…å«åž†å¼å»å¨åå¶å³åžåž¤åžŒåž²åŸåž§åž´åž“åž åŸ•åŸ˜åŸšåŸ™åŸ’åž¸åŸ´åŸ¯åŸ¸åŸ¤åŸ"], -["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"èºèºŸ",11,"èºèº®èº°èº±èº³",6,"躻",7], -["dc80","軃",10,"è»",21,"å ‹å 埽åŸå €å žå ™å¡„å 塥塬å¢å¢‰å¢šå¢€é¦¨é¼™æ‡¿è‰¹è‰½è‰¿èŠèŠŠèŠ¨èŠ„芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌è‹èŠ©èŠ´èŠ¡èŠªèŠŸè‹„苎芤苡茉苷苤èŒèŒ‡è‹œè‹´è‹’è‹˜èŒŒè‹»è‹“èŒ‘èŒšèŒ†èŒ”èŒ•è‹ è‹•èŒœè‘è›èœèŒˆèŽ’茼茴茱莛èžèŒ¯èè‡èƒèŸè€èŒ—è èŒèŒºèŒ³è¦è¥"], -["dd40","軥",62], -["dd80","輤",32,"è¨èŒ›è©è¬èªèè®èŽ°è¸èŽ³èŽ´èŽ 莪莓莜莅è¼èŽ¶èŽ©è½èŽ¸è»èŽ˜èŽžèŽ¨èŽºèŽ¼èèè¥è˜å ‡è˜è‹èè½è–èœè¸è‘è†è”èŸèèƒè¸è¹èªè…è€è¦è°è¡è‘œè‘‘葚葙葳蒇蒈葺蒉葸è¼è‘†è‘©è‘¶è’Œè’Žè±è‘è“è“è“è“¦è’½è““è“Šè’¿è’ºè“ è’¡è’¹è’´è’—è“¥è“£è”Œç”蔸蓰蔹蔟蔺"], -["de40","è½…",32,"轪辀辌辒è¾è¾ 辡辢辤辥辦辧辪辬è¾è¾®è¾¯è¾²è¾³è¾´è¾µè¾·è¾¸è¾ºè¾»è¾¼è¾¿è¿€è¿ƒè¿†"], -["de80","迉",4,"è¿è¿’è¿–è¿—è¿šè¿ è¿¡è¿£è¿§è¿¬è¿¯è¿±è¿²è¿´è¿µè¿¶è¿ºè¿»è¿¼è¿¾è¿¿é€‡é€ˆé€Œé€Žé€“é€•é€˜è•–è”»è“¿è“¼è•™è•ˆè•¨è•¤è•žè•ºçž¢è•ƒè•²è•»è–¤è–¨è–‡è–蕹薮薜薅薹薷薰藓è—藜藿蘧蘅蘩蘖蘼廾弈夼å¥è€·å¥•å¥šå¥˜åŒå°¢å°¥å°¬å°´æ‰Œæ‰ªæŠŸæŠ»æ‹Šæ‹šæ‹—拮挢拶挹æ‹æƒæŽæ¶æ±æºæŽŽæŽ´æ掬掊æ©æŽ®æŽ¼æ²æ¸æ æ¿æ„æžæŽæ‘’æ†æŽ¾æ‘…æ‘æ‹æ›æ æŒæ¦æ¡æ‘žæ’„æ‘æ’–"], -["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿é€éƒé…é†éˆ",4,"éŽé”é•é–é™éšéœ",5,"é¤é¦é§é©éªé«é¬é¯",4,"é¶",6,"é¾é‚"], -["df80","還邅邆邇邉邊邌",4,"é‚’é‚”é‚–é‚˜é‚šé‚œé‚žé‚Ÿé‚ é‚¤é‚¥é‚§é‚¨é‚©é‚«é‚邲邷邼邽邿郀摺撷撸撙撺擀æ“擗擤擢攉攥攮弋忒甙弑åŸå±å½å©å¨å»å’å–å†å‘‹å‘’呓呔呖呃å¡å‘—å‘™å£å²å’‚咔呷呱呤咚咛咄呶呦å’å“å’哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤å“å“å“žå”›å“§å” å“½å””å“³å”¢å”£å”唑唧唪啧å–喵啉å•å•å••å”¿å•å”¼"], -["e040","郂郃郆郈郉郋郌éƒéƒ’éƒ”éƒ•éƒ–éƒ˜éƒ™éƒšéƒžéƒŸéƒ éƒ£éƒ¤éƒ¥éƒ©éƒªéƒ¬éƒ®éƒ°éƒ±éƒ²éƒ³éƒµéƒ¶éƒ·éƒ¹éƒºéƒ»éƒ¼éƒ¿é„€é„鄃鄅",19,"鄚鄛鄜"], -["e080","é„é„Ÿé„ é„¡é„¤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈å–喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦å—嗄嗯嗥嗲嗳嗌å—嗨嗵嗤辔嘞嘈嘌å˜å˜¤å˜£å—¾å˜€å˜§å˜å™˜å˜¹å™—嘬å™å™¢å™™å™œå™Œå™”嚆噤噱噫噻噼嚅嚓嚯囔囗å›å›¡å›µå›«å›¹å›¿åœ„圊圉圜å¸å¸™å¸”帑帱帻帼"], -["e140","é……é…‡é…ˆé…‘é…“é…”é…•é…–é…˜é…™é…›é…œé…Ÿé… é…¦é…§é…¨é…«é…酳酺酻酼醀",4,"醆醈醊醎é†é†“",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"], -["e180","醼",10,"釈釋é‡é‡’",9,"é‡",8,"帷幄幔幛幞幡岌屺å²å²å²–岈岘岙岑岚岜岵岢岽岬岫岱岣å³å²·å³„峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯åµåµ«åµ‹åµŠåµ©åµ´å¶‚嶙å¶è±³å¶·å·…彳彷徂徇徉後徕徙徜徨å¾å¾µå¾¼è¡¢å½¡çŠçŠ°çŠ´çŠ·çŠ¸ç‹ƒç‹ç‹Žç‹ç‹’狨狯狩狲狴狷çŒç‹³çŒƒç‹º"], -["e240","釦",62], -["e280","鈥",32,"狻猗猓猡猊猞çŒçŒ•çŒ¢çŒ¹çŒ¥çŒ¬çŒ¸çŒ±ççç—ç ç¬ç¯ç¾èˆ›å¤¥é£§å¤¤å¤‚饣饧",5,"饴饷饽馀馄馇馊é¦é¦é¦‘é¦“é¦”é¦•åº€åº‘åº‹åº–åº¥åº åº¹åºµåº¾åº³èµ“å»’å»‘å»›å»¨å»ªè†ºå¿„å¿‰å¿–å¿æ€ƒå¿®æ€„忡忤忾怅怆忪å¿å¿¸æ€™æ€µæ€¦æ€›æ€æ€æ€©æ€«æ€Šæ€¿æ€¡æ¸æ¹æ»æºæ‚"], -["e340","鉆",45,"鉵",16], -["e380","銆",7,"éŠ",24,"æªæ½æ‚–æ‚šæ‚æ‚悃悒悌悛惬悻悱æƒæƒ˜æƒ†æƒšæ‚´æ„ 愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵å¿éš³é—©é—«é—±é—³é—µé—¶é—¼é—¾é˜ƒé˜„阆阈阊阋阌é˜é˜é˜’阕阖阗阙阚丬爿戕氵汔汜汊沣沅æ²æ²”沌汨汩汴汶沆沩æ³æ³”æ²æ³·æ³¸æ³±æ³—æ²²æ³ æ³–æ³ºæ³«æ³®æ²±æ³“æ³¯æ³¾"], -["e440","銨",5,"銯",24,"鋉",31], -["e480","é‹©",32,"洹洧洌浃浈洇洄洙洎洫æµæ´®æ´µæ´šæµæµ’æµ”æ´³æ¶‘æµ¯æ¶žæ¶ æµžæ¶“æ¶”æµœæµ æµ¼æµ£æ¸šæ·‡æ·…æ·žæ¸Žæ¶¿æ· æ¸‘æ·¦æ·æ·™æ¸–æ¶«æ¸Œæ¶®æ¸«æ¹®æ¹Žæ¹«æº²æ¹Ÿæº†æ¹“æ¹”æ¸²æ¸¥æ¹„æ»Ÿæº±æº˜æ» æ¼æ»¢æº¥æº§æº½æº»æº·æ»—溴æ»æºæ»‚溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉æ¾æ¾Œæ½¸æ½²æ½¼æ½ºæ¿‘"], -["e540","錊",51,"錿",10], -["e580","éŠ",31,"é«æ¿‰æ¾§æ¾¹æ¾¶æ¿‚æ¿¡æ¿®æ¿žæ¿ æ¿¯ç€šç€£ç€›ç€¹ç€µççžå®€å®„宕宓宥宸甯骞æ´å¯¤å¯®è¤°å¯°è¹‡è¬‡è¾¶è¿“迕迥迮迤迩迦迳迨逅逄逋逦逑é€é€–逡逵逶é€é€¯é„é‘é’éé¨é˜é¢é›æš¹é´é½é‚‚邈邃邋å½å½—彖彘尻咫å±å±™å±å±£å±¦ç¾¼å¼ªå¼©å¼è‰´å¼¼é¬»å±®å¦å¦ƒå¦å¦©å¦ªå¦£"], -["e640","é¬",34,"éŽ",27], -["e680","鎬",29,"é‹éŒé妗姊妫妞妤姒妲妯姗妾娅娆å§å¨ˆå§£å§˜å§¹å¨Œå¨‰å¨²å¨´å¨‘å¨£å¨“å©€å©§å©Šå©•å¨¼å©¢å©µèƒ¬åªªåª›å©·å©ºåª¾å««åª²å«’å«”åª¸å« å«£å«±å«–å«¦å«˜å«œå¬‰å¬—å¬–å¬²å¬·å€å°•å°œåšå¥å³å‘å“å¢é©µé©·é©¸é©ºé©¿é©½éª€éªéª…骈骊éªéª’骓骖骘骛骜éªéªŸéª 骢骣骥骧纟纡纣纥纨纩"], -["e740","éŽ",7,"é—",54], -["e780","éŽ",32,"çºçº°çº¾ç»€ç»ç»‚绉绋绌ç»ç»”ç»—ç»›ç» ç»¡ç»¨ç»«ç»®ç»¯ç»±ç»²ç¼ç»¶ç»ºç»»ç»¾ç¼ç¼‚缃缇缈缋缌ç¼ç¼‘缒缗缙缜缛缟缡",6,"缪缫缬ç¼ç¼¯",4,"缵幺畿巛甾邕玎玑玮玢玟çç‚ç‘玷玳ç€ç‰çˆç¥ç™é¡¼çŠç©ç§çžçŽºç²ççªç‘›ç¦ç¥ç¨ç°ç®ç¬"], -["e840","é¯",14,"é¿",43,"鑬é‘鑮鑯"], -["e880","é‘°",20,"钑钖钘铇é“é““é“”é“šé“¦é“»é”œé” ç›çšç‘瑜瑗瑕瑙瑷ç‘瑾璜璎璀ç’璇璋璞璨璩ç’璧瓒璺韪韫韬æŒæ“æžæˆæ©æž¥æž‡æªæ³æž˜æž§æµæž¨æžžæžæž‹æ·æ¼æŸ°æ ‰æŸ˜æ ŠæŸ©æž°æ ŒæŸ™æžµæŸšæž³æŸæ €æŸƒæž¸æŸ¢æ ŽæŸæŸ½æ ²æ ³æ¡ 桡桎桢桄桤梃æ 桕桦æ¡æ¡§æ¡€æ ¾æ¡Šæ¡‰æ ©æ¢µæ¢æ¡´æ¡·æ¢“æ¡«æ£‚æ¥®æ£¼æ¤Ÿæ¤ æ£¹"], -["e940","é”§é”³é”½é•ƒé•ˆé•‹é••é•šé• é•®é•´é•µé•·",7,"é–€",42], -["e980","é–«",32,"椤棰椋æ¤æ¥—棣æ¤æ¥±æ¤¹æ¥ 楂æ¥æ¦„楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫æ¦æ§”榱æ§æ§Šæ§Ÿæ¦•æ§ æ¦æ§¿æ¨¯æ§æ¨—æ¨˜æ©¥æ§²æ©„æ¨¾æª æ©æ©›æ¨µæªŽæ©¹æ¨½æ¨¨æ©˜æ©¼æª‘æªæª©æª—檫猷ç’æ®æ®‚殇殄殒殓æ®æ®šæ®›æ®¡æ®ªè½«è½è½±è½²è½³è½µè½¶è½¸è½·è½¹è½ºè½¼è½¾è¾è¾‚辄辇辋"], -["ea40","é—Œ",27,"é—¬é—¿é˜‡é˜“é˜˜é˜›é˜žé˜ é˜£",6,"阫阬é˜é˜¯é˜°é˜·é˜¸é˜¹é˜ºé˜¾é™é™ƒé™Šé™Žé™é™‘陒陓陖陗"], -["ea80","陘陙陚陜é™é™žé™ 陣陥陦陫é™",4,"陳陸",12,"隇隉隊è¾è¾Žè¾è¾˜è¾šè»Žæˆ‹æˆ—戛戟戢戡戥戤戬臧瓯瓴瓿ç”甑甓攴旮旯旰昊昙æ²æ˜ƒæ˜•æ˜€ç‚…æ›·æ˜æ˜´æ˜±æ˜¶æ˜µè€†æ™Ÿæ™”æ™æ™æ™–晡晗晷暄暌暧æšæš¾æ››æ›œæ›¦æ›©è´²è´³è´¶è´»è´½èµ€èµ…赆赈赉赇èµèµ•èµ™è§‡è§Šè§‹è§Œè§Žè§è§è§‘牮犟ç‰ç‰¦ç‰¯ç‰¾ç‰¿çŠ„犋çŠçŠçŠ’挈挲掰"], -["eb40","隌階隑隒隓隕隖隚際éš",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋é›é›‘雓雔雖",9,"雡",6,"雫"], -["eb80","雬é›é›®é›°é›±é›²é›´é›µé›¸é›ºé›»é›¼é›½é›¿éœ‚霃霅霊霋霌éœéœ‘霒霔霕霗",4,"éœéœŸéœ æ¿æ“˜è€„毪毳毽毵毹氅氇氆æ°æ°•æ°˜æ°™æ°šæ°¡æ°©æ°¤æ°ªæ°²æ”µæ••æ•«ç‰ç‰’牖爰虢刖肟肜肓肼朊肽肱肫è‚肴肷胧胨胩胪胛胂胄胙èƒèƒ—æœèƒèƒ«èƒ±èƒ´èƒè„è„Žèƒ²èƒ¼æœ•è„’è±šè„¶è„žè„¬è„˜è„²è…ˆè…Œè…“è…´è…™è…šè…±è… è…©è…¼è…½è…è…§å¡åªµè†ˆè†‚膑滕膣膪臌朦臊膻"], -["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"é”é•é—é˜éšéœééŸé£é¤é¦é§é¨éª",7], -["ec80","é²éµé·",4,"é½",7,"鞆",4,"鞌鞎éžéžéž“éž•éž–éž—éž™",4,"è‡è†¦æ¬¤æ¬·æ¬¹æƒæ†æ™é£‘飒飓飕飙飚殳彀毂觳æ–齑斓於旆旄旃旌旎旒旖炀炜炖ç‚炻烀炷炫炱烨烊ç„ç„“ç„–ç„¯ç„±ç…³ç…œç…¨ç……ç…²ç…Šç…¸ç…ºç†˜ç†³ç†µç†¨ç† ç‡ ç‡”ç‡§ç‡¹çˆçˆ¨ç¬ç„˜ç…¦ç†¹æˆ¾æˆ½æ‰ƒæ‰ˆæ‰‰ç¤»ç¥€ç¥†ç¥‰ç¥›ç¥œç¥“ç¥šç¥¢ç¥—ç¥ ç¥¯ç¥§ç¥ºç¦…ç¦Šç¦šç¦§ç¦³å¿‘å¿"], -["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46], -["ed80","韤韥韨韮",4,"韴韷",23,"怼ææšæ§ææ™æ£æ‚«æ„†æ„æ…憩æ†æ‡‹æ‡‘戆肀è¿æ²“æ³¶æ·¼çŸ¶çŸ¸ç €ç ‰ç —ç ˜ç ‘æ–«ç ç œç ç ¹ç ºç »ç Ÿç ¼ç ¥ç ¬ç £ç ©ç¡Žç¡ç¡–ç¡—ç ¦ç¡ç¡‡ç¡Œç¡ªç¢›ç¢“碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄çœç›¹çœ‡çœˆçœšçœ¢çœ™çœçœ¦çœµçœ¸çç‘ç‡çƒçšç¨"], -["ee40","é ",62], -["ee80","é¡Ž",32,"ç¢ç¥ç¿çžç½çž€çžŒçž‘çžŸçž çž°çžµçž½ç”ºç•€ç•Žç•‹ç•ˆç•›ç•²ç•¹ç–ƒç½˜ç½¡ç½Ÿè©ˆç½¨ç½´ç½±ç½¹ç¾ç½¾ç›ç›¥è ²é’…钆钇钋钊钌é’é’é’钔钗钕钚钛钜钣钤钫钪é’钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"é“é“‘é“’é“•é“–é“—é“™é“˜é“›é“žé“Ÿé“ é“¢é“¤é“¥é“§é“¨é“ª"], -["ef40","顯",5,"颋颎颒颕颙颣風",37,"é£é£é£”飖飗飛飜é£é£ ",4], -["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊é”锎é”é”’",4,"锘锛é”锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎é•é•’镓镔镖镗镘镙镛镞镟é•é•¡é•¢é•¤",8,"镯镱镲镳锺矧矬雉秕ç§ç§£ç§«ç¨†åµ‡ç¨ƒç¨‚稞稔"], -["f040","餈",4,"餎é¤é¤‘",28,"餯",26], -["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑é»é¦¥ç©°çšˆçšŽçš“çš™çš¤ç“žç“ ç”¬é¸ é¸¢é¸¨",4,"鸲鸱鸶鸸鸷鸹鸺鸾é¹é¹‚鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"é¹±é¹é¹³ç–’ç–”ç––ç– ç–疬疣疳疴疸痄疱疰痃痂痖ç—痣痨痦痤痫痧瘃痱痼痿ç˜ç˜€ç˜…瘌瘗瘊瘥瘘瘕瘙"], -["f140","馌馎馚",10,"馦馧馩",47], -["f180","駙",32,"ç˜›ç˜¼ç˜¢ç˜ ç™€ç˜ç˜°ç˜¿ç˜µç™ƒç˜¾ç˜³ç™ç™žç™”ç™œç™–ç™«ç™¯ç¿Šç«¦ç©¸ç©¹çª€çª†çªˆçª•çª¦çª çª¬çª¨çªçª³è¡¤è¡©è¡²è¡½è¡¿è¢‚袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶è¥è¥¦è¥»ç–‹èƒ¥çš²çš´çŸœè€’è€”è€–è€œè€ è€¢è€¥è€¦è€§è€©è€¨è€±è€‹è€µèƒè†èè’è©è±è¦ƒé¡¸é¢€é¢ƒ"], -["f240","駺",62], -["f280","騹",32,"颉颌é¢é¢é¢”颚颛颞颟颡颢颥颦è™è™”虬虮虿虺虼虻蚨èšèš‹èš¬èšèš§èš£èšªèš“蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉è›èš´è›©è›±è›²è›è›³è›èœ“蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊èœèœ‰èœ£èœ»èœžèœ¥èœ®èœšèœ¾èˆèœ´èœ±èœ©èœ·èœ¿èž‚蜢è½è¾è»è è°èŒè®èž‹è“è£è¼è¤è™è¥èž“螯螨蟒"], -["f340","é©š",17,"驲骃骉éªéªŽéª”骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"é«é«Žé«é«é«’體髕髖髗髙髚髛髜"], -["f380","é«é«žé« 髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅èžèž—èžƒèž«èŸ¥èž¬èžµèž³èŸ‹èŸ“èž½èŸ‘èŸ€èŸŠèŸ›èŸªèŸ èŸ®è –è “èŸ¾è Šè ›è ¡è ¹è ¼ç¼¶ç½‚ç½„ç½…èˆç«ºç«½ç¬ˆç¬ƒç¬„笕笊笫ç¬ç‡ç¬¸ç¬ªç¬™ç¬®ç¬±ç¬ 笥笤笳笾笞ç˜çšç…çµçŒçç ç®ç»ç¢ç²ç±ç®ç®¦ç®§ç®¸ç®¬ç®ç®¨ç®…箪箜箢箫箴篑ç¯ç¯Œç¯ç¯šç¯¥ç¯¦ç¯ªç°Œç¯¾ç¯¼ç°ç°–ç°‹"], -["f440","鬇鬉",5,"é¬é¬‘鬒鬔",10,"é¬ é¬¡é¬¢é¬¤",10,"鬰鬱鬳",7,"鬽鬾鬿é€é†éŠé‹éŒéŽéé’é“é•",5], -["f480","é›",32,"簟簪簦簸ç±ç±€è‡¾èˆèˆ‚舄臬衄舡舢舣èˆèˆ¯èˆ¨èˆ«èˆ¸èˆ»èˆ³èˆ´èˆ¾è‰„艉艋è‰è‰šè‰Ÿè‰¨è¡¾è¢…袈裘裟襞ç¾ç¾Ÿç¾§ç¾¯ç¾°ç¾²ç±¼æ•‰ç²‘ç²ç²œç²žç²¢ç²²ç²¼ç²½ç³ç³‡ç³Œç³ç³ˆç³…糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧èµè±‡è±‰é…Šé…é…Žé…é…¤"], -["f540","é¼",62], -["f580","é®»",32,"酢酡酰酩酯酽酾酲酴酹醌醅é†é†é†‘醢醣醪é†é†®é†¯é†µé†´é†ºè±•é¹¾è¶¸è·«è¸…蹙蹩趵趿趼趺跄跖跗跚跞跎è·è·›è·†è·¬è··è·¸è·£è·¹è·»è·¤è¸‰è·½è¸”è¸è¸Ÿè¸¬è¸®è¸£è¸¯è¸ºè¹€è¸¹è¸µè¸½è¸±è¹‰è¹è¹‚蹑蹒蹊蹰蹶蹼蹯蹴躅èºèº”èºèºœèºžè±¸è²‚貊貅貘貔斛觖觞觚觜"], -["f640","鯜",62], -["f680","é°›",32,"觥觫觯訾謦é“雩雳雯霆éœéœˆéœéœŽéœªéœéœ°éœ¾é¾€é¾ƒé¾…",5,"龌黾鼋é¼éš¹éš¼éš½é›Žé›’çž¿é› éŠŽéŠ®é‹ˆéŒ¾éªéŠéŽé¾é‘«é±¿é²‚鲅鲆鲇鲈稣鲋鲎é²é²‘鲒鲔鲕鲚鲛鲞",5,"é²¥",4,"鲫é²é²®é²°",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"], -["f740","é°¼",62], -["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌é²é²“鲖鲗鲘鲙é²é²ªé²¬é²¯é²¹é²¾",4,"é³ˆé³‰é³‘é³’é³šé³›é³ é³¡é³Œ",4,"鳓鳔鳕鳗鳘鳙鳜é³é³Ÿé³¢é¼éž…鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼é«é«€é«…髂髋髌髑é…éƒé‡é‰éˆéé‘飨é¤é¤®é¥•é¥”髟髡髦髯髫髻é«é«¹é¬ˆé¬é¬“鬟鬣麽麾縻麂麇麈麋麒é–éºéºŸé»›é»œé»é» 黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"], -["f840","é³£",62], -["f880","é´¢",32], -["f940","鵃",62], -["f980","鶂",32], -["fa40","鶣",62], -["fa80","é·¢",32], -["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀é¹é¹é¹’鹓鹔鹖鹙é¹é¹Ÿé¹ 鹡鹢鹥鹮鹯鹲鹴",9,"麀"], -["fb80","éºéºƒéº„麅麆麉麊麌",5,"麔",8,"éºžéº ",5,"麧麨麩麪"], -["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌é»é»’黓黕黖黗黙黚點黡黣黤黦黨黫黬é»é»®é»°",8,"黺黽黿",6], -["fc80","鼆",4,"鼌é¼é¼‘鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"é¼é¼®é¼°é¼±"], -["fd40","é¼²",4,"鼸鼺鼼鼿",4,"é½…",10,"é½’",38], -["fd80","é½¹",5,"é¾é¾‚é¾",11,"龜é¾é¾žé¾¡",4,"郎凉秊裏隣"], -["fe40","兀ï¨ï¨Žï¨ï¨‘ï¨“ï¨”ï¨˜ï¨Ÿï¨ ï¨¡ï¨£ï¨¤ï¨§ï¨¨ï¨©"] -] diff --git a/node_modules/iconv-lite/encodings/tables/cp949.json b/node_modules/iconv-lite/encodings/tables/cp949.json deleted file mode 100644 index 2022a007ff7ac97ce51167903d116eec42bffd9a..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/tables/cp949.json +++ /dev/null @@ -1,273 +0,0 @@ -[ -["0","\u0000",127], -["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"], -["8161","갵갶갷갺갻갽갾갿ê±",9,"걌걎",5,"걕"], -["8181","걖걗걙걚걛ê±",18,"걲걳걵걶걹걻",4,"겂겇겈ê²ê²Žê²ê²‘겒겓겕",6,"겞겢",5,"겫ê²ê²®ê²±",6,"겺겾겿곀곂곃곅곆곇곉곊곋ê³",7,"곖곘",7,"곢곣곥곦곩곫ê³ê³®ê³²ê³´ê³·",4,"곾곿ê´ê´‚괃괅괇",4,"ê´Žê´ê´’ê´“"], -["8241","괔괕괖괗괙괚괛ê´ê´žê´Ÿê´¡",7,"괪괫괮",5], -["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"], -["8281","êµ™",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋ê¶ê¶Žê¶ê¶‘",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"ê·’ê·”",7,"ê·ê·žê·Ÿê·¡ê·¢ê·£ê·¥",18], -["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7], -["8361","ê¸",18,"긲긳긵긶긹긻긼"], -["8381","긽긾긿깂깄깇깈깉깋ê¹ê¹‘깒깓깕깗",4,"깞깢깣깤깦깧깪깫ê¹ê¹®ê¹¯ê¹±",6,"깺깾",5,"꺆",5,"êº",46,"꺿ê»ê»‚껃껅",6,"껎껒",5,"껚껛ê»",8], -["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8], -["8461","꼆꼉꼊꼋꼌꼎ê¼ê¼‘",18], -["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"ê¾ê¾‚꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"ê¾",26,"꾺꾻꾽꾾"], -["8541","꾿ê¿",5,"ê¿Šê¿Œê¿",4,"ê¿•",6,"ê¿",4], -["8561","ê¿¢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"], -["8581","뀅",6,"ë€ë€Žë€ë€‘뀒뀓뀕",6,"뀞",9,"뀩",26,"ë†ë‡ë‰ë‹ëëëë‘ë’ë–ë˜ëšë›ëœëž",29,"ë¾ë¿ë‚낂낃낅",6,"ë‚Žë‚ë‚’",5,"ë‚›ë‚낞낣낤"], -["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"], -["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10], -["8681","냱",22,"ë„Šë„ë„Žë„넑넔넕넖넗넚넞",4,"넦넧넩넪넫ë„",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛ë…ë…žë…Ÿë…¡",22,"녺녻녽녾녿ë†ë†ƒ",4,"놊놌놎ë†ë†ë†‘놕놖놗놙놚놛ë†"], -["8741","놞",9,"놩",15], -["8761","놹",18,"ë‡ë‡Žë‡ë‡‘뇒뇓뇕"], -["8781","뇖",5,"ë‡žë‡ ",7,"뇪뇫ë‡ë‡®ë‡¯ë‡±",7,"뇺뇼뇾",5,"눆눇눉눊ëˆ",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛ë‰ë‰žë‰Ÿë‰¡",6,"뉪",4], -["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4], -["8861","ëŠëŠ’늓늕늖늗늛",4,"늢늤늧늨늩늫ëŠëŠ®ëŠ¯ëŠ±ëŠ²ëŠ³ëŠµëŠ¶ëŠ·"], -["8881","늸",15,"ë‹Šë‹‹ë‹ë‹Žë‹ë‹‘ë‹“",4,"ë‹šë‹œë‹žë‹Ÿë‹ ë‹¡ë‹£ë‹§ë‹©ë‹ªë‹°ë‹±ë‹²ë‹¶ë‹¼ë‹½ë‹¾ëŒ‚ëŒƒëŒ…ëŒ†ëŒ‡ëŒ‰",6,"댒댖",5,"ëŒ",54,"ë—ë™ëšëë ë¡ë¢ë£"], -["8941","ë¦ë¨ëªë¬ëë¯ë²ë³ëµë¶ë·ë¹",6,"뎂뎆",5,"ëŽ"], -["8961","뎎ëŽëŽ‘뎒뎓뎕",10,"뎢",5,"뎩뎪뎫ëŽ"], -["8981","뎮",21,"ë†ë‡ë‰ëŠëëë‘ë’ë“ë–ë˜ëšëœëžëŸë¡ë¢ë£ë¥ë¦ë§ë©",18,"ë½",18,"ë‘",6,"ë™ëšë›ëëžëŸë¡",6,"ëªë¬",7,"ëµ",15], -["8a41","ë‘…",10,"ë‘’ë‘“ë‘•ë‘–ë‘—ë‘™",6,"둢둤둦"], -["8a61","둧",4,"ë‘",18,"ë’ë’‚"], -["8a81","ë’ƒ",4,"ë’‰",19,"ë’ž",5,"뒥뒦뒧뒩뒪뒫ë’",7,"뒶뒸뒺",5,"ë“듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚ë”"], -["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"], -["8b61","땇땈땉땊땎ë•ë•‘ë•’ë•“ë••",6,"ë•žë•¢",8], -["8b81","ë•«",52,"떢떣떥떦떧떩떬ë–떮떯떲떶",4,"떾떿ë—뗂뗃뗅",6,"ë—Žë—’",5,"ë—™",18,"ë—",18], -["8c41","똀",15,"똒똓똕똖똗똙",4], -["8c61","똞",6,"똦",5,"ë˜",6,"똵",5], -["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"ëšëš®ëš¯ëš°ëš²",16], -["8d41","뛃",16,"뛕",8], -["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"], -["8d81","ë›»",4,"뜂뜃뜄뜆",33,"뜪뜫ëœëœ®ëœ±",6,"뜺뜼",7,"ë…ë†ë‡ë‰ëŠë‹ë",6,"ë–",9,"ë¡ë¢ë£ë¥ë¦ë§ë©",6,"ë²ë´ë¶",5,"ë¾ë¿ëžëž‚랃랅",6,"랎랓랔랕랚랛ëžëžž"], -["8e41","랟랡",6,"랪랮",5,"랶랷랹",8], -["8e61","럂",4,"럈럊",19], -["8e81","럞",13,"럮럯럱럲럳럵",6,"ëŸ¾ë ‚",4,"ë Šë ‹ë ë Žë ë ‘",6,"ë šë œë ž",5,"ë ¦ë §ë ©ë ªë «ë ",6,"ë ¶ë º",5,"ë¡ë¡‚롃롅",11,"ë¡’ë¡”",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7], -["8f41","뢅",7,"뢎",17], -["8f61","ë¢ ",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4], -["8f81","뢾뢿룂룄룆",5,"ë£ë£Žë£ë£‘룒룓룕",7,"ë£žë£ ë£¢",5,"룪룫ë£ë£®ë£¯ë£±",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿ë¥ë¥‚륃륅",6,"ë¥ë¥Žë¥ë¥’",5], -["9041","륚륛ë¥ë¥žë¥Ÿë¥¡",6,"륪륬륮",5,"륶륷륹륺륻륽"], -["9061","륾",5,"릆릈릋릌ë¦",15], -["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋ë§ë§“",4,"ë§šë§œë§Ÿë§ ë§¢ë§¦ë§§ë§©ë§ªë§«ë§",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿ë©ë©ƒë©„멅멆"], -["9141","멇멊멌ë©ë©ë©‘멒멖멗멙멚멛ë©",6,"멦멪",5], -["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋ëª",5], -["9181","몓",20,"몪ëªëª®ëª¯ëª±ëª³",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"ë«š",33,"뫽뫾뫿ë¬ë¬‚묃묅",7,"묎ë¬ë¬’",5,"묙묚묛ë¬ë¬žë¬Ÿë¬¡",6], -["9241","묨묪묬",7,"묷묹묺묿",4,"ë†ëˆëŠë‹ëŒëŽë‘ë’"], -["9261","ë“ë•ë–ë—ë™",7,"ë¢ë¤",7,"ë",4], -["9281","ë²",21,"뮉뮊뮋ë®ë®Žë®ë®‘",18,"뮥뮦뮧뮩뮪뮫ë®",6,"뮵뮶뮸",7,"ë¯ë¯‚믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾ë°"], -["9341","ë°ƒ",4,"ë°Šë°Žë°ë°’ë°“ë°™ë°šë° ë°¡ë°¢ë°£ë°¦ë°¨ë°ªë°«ë°¬ë°®ë°¯ë°²ë°³ë°µ"], -["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎ë±ë±‘",8], -["9381","뱚뱛뱜뱞",37,"벆벇벉벊ë²ë²",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿ë³ë³‚볃볅",7,"볎볒볓볔볖볗볙볚볛ë³",22,"볷볹볺볻볽"], -["9441","ë³¾",5,"봆봈봊",5,"ë´‘ë´’ë´“ë´•",8], -["9461","ë´ž",5,"ë´¥",6,"ë´",12], -["9481","ë´º",5,"ëµ",6,"뵊뵋ëµëµŽëµëµ‘",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛ë¶",6,"붥",10,"붱",6,"붹",24], -["9541","뷒뷓뷖뷗뷙뷚뷛ë·",11,"ë·ª",5,"ë·±"], -["9561","뷲뷳뷵뷶뷷뷹",6,"ë¸ë¸‚븄븆",5,"븎ë¸ë¸‘븒븓"], -["9581","븕",6,"ë¸žë¸ ",35,"빆빇빉빊빋ë¹ë¹",4,"빖빘빜ë¹ë¹žë¹Ÿë¹¢ë¹£ë¹¥ë¹¦ë¹§ë¹©ë¹«",4,"빲빶",4,"빾빿ëºëº‚뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14], -["9641","뺸",23,"뻒뻓"], -["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"ë»",8], -["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44], -["9741","뾃",16,"뾕",8], -["9761","뾞",17,"ë¾±",7], -["9781","ë¾¹",11,"뿆",5,"ë¿Žë¿ë¿‘ë¿’ë¿“ë¿•",6,"ë¿ë¿žë¿ ë¿¢",89,"쀽쀾쀿"], -["9841","ì€",16,"ì’",5,"ì™ìšì›"], -["9861","ììžìŸì¡",6,"ìª",15], -["9881","ìº",21,"ì‚’ì‚“ì‚•ì‚–ì‚—ì‚™",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋ìƒìƒŽìƒìƒ‘",6,"샚샞",5,"샦샧샩샪샫ìƒ",6,"샶샸샺",5,"ì„섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"], -["9941","섲섳섴섵섷섺섻섽섾섿ì…",6,"ì…Šì…Ž",5,"ì…–ì…—"], -["9961","셙셚셛ì…",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"], -["9981","ì…¼",8,"솆",5,"ì†ì†‘솒솓솕솗",4,"ì†žì† ì†¢ì†£ì†¤ì†¦ì†§ì†ªì†«ì†ì†®ì†¯ì†±",11,"솾",5,"쇅쇆쇇쇉쇊쇋ì‡",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿ìˆìˆ‚숃숅",6,"숎ìˆìˆ’",5,"숚숛ìˆìˆžìˆ¡ìˆ¢ìˆ£"], -["9a41","숤숥숦숧숪숬숮숰숳숵",16], -["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"], -["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿ìŒ",6,"쌊쌋쌎ìŒ"], -["9b41","ìŒìŒ‘쌒쌖쌗쌙쌚쌛ìŒ",6,"쌦쌧쌪",8], -["9b61","쌳",17,"ì†",7], -["9b81","ìŽ",25,"ìªì«ìì®ì¯ì±ì³",4,"ìºì»ì¾",5,"쎅쎆쎇쎉쎊쎋ìŽ",50,"ì",22,"ìš"], -["9c41","ì›ììžì¡ì£",4,"ìªì«ì¬ì®",5,"ì¶ì·ì¹",5], -["9c61","ì¿",8,"ì‰",6,"ì‘",9], -["9c81","ì›",8,"ì¥",6,"ìì®ì¯ì±ì²ì³ìµ",6,"ì¾",9,"쑉",26,"쑦쑧쑩쑪쑫ì‘",6,"쑶쑷쑸쑺",5,"ì’",18,"ì’•",6,"ì’",12], -["9d41","ì’ª",13,"쒹쒺쒻쒽",8], -["9d61","쓆",25], -["9d81","ì“ ",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"ì”씎ì”씑씒씓씕",6,"ì”",10,"씪씫ì”씮씯씱",6,"씺씼씾",5,"앆앇앋ì•ì•ì•‘앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿ì–얂얃얅얆얈얉얊얋얎ì–ì–’ì–“ì–”"], -["9e41","얖얙얚얛ì–ì–žì–Ÿì–¡",7,"ì–ª",9,"ì–¶"], -["9e61","얷얺얿",4,"ì—‹ì—ì—ì—’ì—“ì—•ì—–ì——ì—™",6,"엢엤엦엧"], -["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋ì˜ì˜Žì˜ì˜‘",6,"옚ì˜",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"ì™’ì™–",5,"왞왟왡",10,"ì™ì™®ì™°ì™²",5,"왺왻왽왾왿ìš",6,"욊욌욎",5,"욖욗욙욚욛ìš",6,"욦"], -["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"], -["9f61","ì›ì›‘웒웓웕",6,"웞웟웢",5,"웪웫ì›ì›®ì›¯ì›±ì›²"], -["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋ìœ",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿ìì‚ìƒì…",4,"ì‹ìŽìì™ìšì›ììžìŸì¡",6,"ì©ìªì¬",7,"ì¶ì·ì¹ìºì»ì¿ìž€ìžìž‚잆잋잌ìžìžìž’잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"], -["a041","잸잹잺잻잾쟂",5,"쟊쟋ìŸìŸìŸ‘",6,"쟙쟚쟛쟜"], -["a061","쟞",5,"쟥쟦쟧쟩쟪쟫ìŸ",13], -["a081","쟻",4,"ì ‚ì ƒì …ì †ì ‡ì ‰ì ‹",4,"ì ’ì ”ì —",4,"ì žì Ÿì ¡ì ¢ì £ì ¥",6,"ì ®ì °ì ²",5,"ì ¹ì ºì »ì ½ì ¾ì ¿ì¡",6,"ì¡Šì¡‹ì¡Ž",5,"ì¡•",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"ì¢žì¢ ì¢¢ì¢£ì¢¤"], -["a141","좥좦좧좩",18,"좾좿죀ì£"], -["a161","죂죃죅죆죇죉죊죋ì£",6,"죖죘죚",5,"죢죣죥"], -["a181","죦",14,"죶",5,"죾죿ì¤ì¤‚줃줇",4,"줎 ã€ã€‚·‥…¨〃Â―∥\∼‘’“â€ã€”〕〈",9,"Â±Ã—Ã·â‰ â‰¤â‰¥âˆžâˆ´Â°â€²â€³â„ƒâ„«ï¿ ï¿¡ï¿¥â™‚â™€âˆ âŠ¥âŒ’âˆ‚âˆ‡â‰¡â‰’Â§â€»â˜†â˜…â—‹â—◎◇◆□■△▲▽▼→â†â†‘↓↔〓≪≫√∽âˆâˆµâˆ«âˆ¬âˆˆâˆ‹âŠ†âŠ‡âŠ‚⊃∪∩∧∨¬"], -["a241","ì¤ì¤’",5,"줙",18], -["a261","ì¤",6,"줵",18], -["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"ì¥ì¥®ì¥¯â‡’⇔∀∃´~ˇ˘Ë˚˙¸˛¡¿Ë∮∑âˆÂ¤â„‰â€°â—◀▷▶♤♠♡♥♧♣⊙◈▣â—◑▒▤▥▨▧▦▩♨â˜â˜Žâ˜œâ˜žÂ¶â€ ‡↕↗↙↖↘â™â™©â™ªâ™¬ã‰¿ãˆœâ„–ã‡â„¢ã‚ã˜â„¡â‚¬Â®"], -["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋ì¦ì¦Žì¦"], -["a361","즑",6,"즚즜즞",16], -["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛ï¼",58,"₩]",32,"ï¿£"], -["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿ì¨ì¨‚쨃쨄"], -["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12], -["a481","쨦쨧쨨쨪",28,"ㄱ",93], -["a541","쩇",4,"ì©Žì©ì©‘ì©’ì©“ì©•",6,"ì©žì©¢",5,"쩩쩪"], -["a561","ì©«",17,"쩾",5,"쪅쪆"], -["a581","쪇",16,"쪙",14,"â…°",9], -["a5b0","â… ",9], -["a5c1","Α",16,"Σ",6], -["a5e1","α",16,"σ",6], -["a641","쪨",19,"쪾쪿ì«ì«‚쫃쫅"], -["a661","쫆",5,"ì«Žì«ì«’쫔쫕쫖쫗쫚",5,"ì«¡",6], -["a681","쫨쫩쫪쫫ì«",6,"쫵",18,"쬉쬊─│┌â”┘└├┬┤┴┼â”┃â”┓┛┗┣┳┫┻╋┠┯┨┷┿â”┰┥┸╂┒┑┚┙┖┕┎â”┞┟┡┢┦┧┩┪â”┮┱┲┵┶┹┺┽┾╀â•â•ƒ",7], -["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7], -["a761","쬪",22,"ì‚ìƒì„"], -["a781","ì…ì†ì‡ìŠì‹ììŽìì‘",6,"ìšì›ìœìž",5,"ì¥",7,"㎕㎖㎗ℓ㎘ã„㎣㎤㎥㎦㎙",9,"ãŠãŽãŽŽãŽã㎈㎉ãˆãŽ§ãŽ¨ãŽ°",9,"㎀",4,"㎺",5,"ãŽ",4,"Ωã€ã㎊㎋㎌ã–ã…ãŽãŽ®ãŽ¯ã›ãŽ©ãŽªãŽ«ãŽ¬ããã“ãƒã‰ãœã†"], -["a841","ì",10,"ìº",14], -["a861","쮉",18,"ì®",6], -["a881","쮤",19,"쮹",11,"ÆêĦ"], -["a8a6","IJ"], -["a8a8","Ä¿ÅØŒºÞŦŊ"], -["a8b1","㉠",27,"â“",25,"â‘ ",14,"½⅓⅔¼¾⅛⅜â…â…ž"], -["a941","쯅",14,"쯕",10], -["a961","ì¯ ì¯¡ì¯¢ì¯£ì¯¥ì¯¦ì¯¨ì¯ª",18], -["a981","쯽",14,"ì°Žì°ì°‘ì°’ì°“ì°•",6,"ì°žì°Ÿì° ì°£ì°¤Ã¦Ä‘Ã°Ä§Ä±Ä³Ä¸Å€Å‚Ã¸Å“ÃŸÃ¾Å§Å‹Å‰ãˆ€",27,"â’œ",25,"â‘´",14,"¹²³â´â¿â‚₂₃₄"], -["aa41","찥찦찪찫ì°ì°¯ì°±",6,"찺찿",4,"챆챇챉챊챋ì±ì±Ž"], -["aa61","ì±",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"], -["aa81","챳챴챶",29,"ã",82], -["ab41","첔첕첖첗첚첛ì²ì²žì²Ÿì²¡",6,"첪첮",5,"첶첷첹"], -["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5], -["ab81","ì³›",8,"ì³¥",6,"ì³ì³®ì³¯ì³±",12,"ã‚¡",85], -["ac41","쳾쳿촀촂",5,"ì´Šì´‹ì´ì´Žì´ì´‘",6,"ì´šì´œì´žì´Ÿì´ "], -["ac61","촡촢촣촥촦촧촩촪촫ì´",11,"ì´º",4], -["ac81","ì´¿",28,"ìµìµžìµŸÐ",5,"ÐЖ",25], -["acd1","а",5,"ёж",25], -["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"ìµ¹",7], -["ad61","ì¶",6,"춉",10,"춖춗춙춚춛ì¶ì¶žì¶Ÿ"], -["ad81","ì¶ ì¶¡ì¶¢ì¶£ì¶¦ì¶¨ì¶ª",5,"춱",18,"ì·…"], -["ae41","ì·†",5,"ì·ì·Žì·ì·‘",16], -["ae61","ì·¢",5,"췩췪췫ì·ì·®ì·¯ì·±",6,"췺췼췾",4], -["ae81","츃츅츆츇츉츊츋ì¸",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"], -["af41","츬ì¸ì¸®ì¸¯ì¸²ì¸´ì¸¶",19], -["af61","칊",13,"칚칛ì¹ì¹žì¹¢",5,"칪칬"], -["af81","ì¹®",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"], -["b041","캚",5,"캢캦",5,"캮",12], -["b061","캻",5,"컂",19], -["b081","ì»–",13,"컦컧컩컪ì»",6,"컶컺",5,"ê°€ê°ê°„갇갈갉갊ê°",7,"ê°™",4,"ê° ê°¤ê°¬ê°ê°¯ê°°ê°±ê°¸ê°¹ê°¼ê±€ê±‹ê±ê±”걘걜거걱건걷걸걺검ê²ê²ƒê²„겅겆겉겊겋게ê²ê²”겜ê²ê²Ÿê² 겡겨격겪견겯결겸겹겻겼경ê³ê³„ê³ˆê³Œê³•ê³—ê³ ê³¡ê³¤ê³§ê³¨ê³ªê³¬ê³¯ê³°ê³±ê³³ê³µê³¶ê³¼ê³½ê´€ê´„ê´†"], -["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"ì¼ì¼žì¼Ÿì¼¡ì¼¢ì¼£"], -["b161","ì¼¥",6,"켮켲",5,"ì¼¹",11], -["b181","ì½…",14,"콖콗콙콚콛ì½",6,"콦콨콪콫콬괌ê´ê´ê´‘ê´˜ê´œê´ ê´©ê´¬ê´ê´´ê´µê´¸ê´¼êµ„굅굇굉êµêµ”굘굡굣구êµêµ°êµ³êµ´êµµêµ¶êµ»êµ¼êµ½êµ¿ê¶ê¶‚궈궉권ê¶ê¶œê¶ê¶¤ê¶·ê·€ê·ê·„ê·ˆê·ê·‘ê·“ê·œê· ê·¤ê·¸ê·¹ê·¼ê·¿ê¸€ê¸ê¸ˆê¸‰ê¸‹ê¸ê¸”기긱긴긷길긺김ê¹ê¹ƒê¹…깆깊까ê¹ê¹Žê¹ê¹”깖깜ê¹ê¹Ÿê¹ 깡깥깨깩깬깰깸"], -["b241","ì½ì½®ì½¯ì½²ì½³ì½µì½¶ì½·ì½¹",6,"ì¾ì¾‚쾃쾄쾆",5,"ì¾"], -["b261","쾎",18,"ì¾¢",5,"쾩"], -["b281","쾪",5,"ì¾±",18,"ì¿…",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌ê»ê»ê»ê»‘께껙껜껨껫ê»ê»´ê»¸ê»¼ê¼‡ê¼ˆê¼ê¼ê¼¬ê¼ê¼°ê¼²ê¼´ê¼¼ê¼½ê¼¿ê½ê½‚꽃꽈꽉ê½ê½œê½ê½¤ê½¥ê½¹ê¾€ê¾„꾈ê¾ê¾‘꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋ê¿ê¿Žê¿”꿜꿨꿩꿰꿱꿴꿸뀀ë€ë€„뀌ë€ë€”뀜ë€ë€¨ë„ë…ëˆëŠëŒëŽë“ë”ë•ë—ë™"], -["b341","ì¿Œ",19,"쿢쿣쿥쿦쿧쿩"], -["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿í€í€‚퀃퀅",5], -["b381","퀋",5,"퀒",5,"퀙",19,"ëë¼ë½ë‚€ë‚„ë‚Œë‚ë‚ë‚‘ë‚˜ë‚™ë‚šë‚œë‚Ÿë‚ ë‚¡ë‚¢ë‚¨ë‚©ë‚«",4,"낱낳내낵낸낼냄냅냇냈냉ëƒëƒ‘ëƒ”ëƒ˜ëƒ ëƒ¥ë„ˆë„‰ë„‹ë„Œë„넒넓넘넙넛넜ë„넣네넥넨넬넴넵넷넸넹녀ë…ë…„ë…ˆë…ë…‘ë…”ë…•ë…˜ë…œë… ë…¸ë…¹ë…¼ë†€ë†‚ë†ˆë†‰ë†‹ë†ë†’놓놔놘놜놨뇌ë‡ë‡”뇜ë‡"], -["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"í†íˆíŠ",5], -["b461","í‘í’í“í•í–í—í™",6,"í¡",10,"í®í¯"], -["b481","í±í²í³íµ",6,"í¾í¿í‚€í‚‚",18,"ë‡Ÿë‡¨ë‡©ë‡¬ë‡°ë‡¹ë‡»ë‡½ëˆ„ëˆ…ëˆˆëˆ‹ëˆŒëˆ”ëˆ•ëˆ—ëˆ™ëˆ ëˆ´ëˆ¼ë‰˜ë‰œë‰ ë‰¨ë‰©ë‰´ë‰µë‰¼ëŠ„ëŠ…ëŠ‰ëŠëŠ‘ëŠ”ëŠ˜ëŠ™ëŠšëŠ ëŠ¡ëŠ£ëŠ¥ëŠ¦ëŠªëŠ¬ëŠ°ëŠ´ë‹ˆë‹‰ë‹Œë‹ë‹’님닙닛ë‹ë‹¢ë‹¤ë‹¥ë‹¦ë‹¨ë‹«",4,"닳담답닷",4,"닿대ëŒëŒ„댈ëŒëŒ‘댓댔댕댜ë”ë•ë–ë˜ë›ëœëžëŸë¤ë¥"], -["b541","í‚•",14,"킦킧킩킪킫í‚",5], -["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4], -["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"ë§ë©ë«ë®ë°ë±ë´ë¸ëŽ€ëŽëŽƒëŽ„뎅뎌ëŽëŽ”ëŽ ëŽ¡ëŽ¨ëŽ¬ë„ë…ëˆë‹ëŒëŽëë”ë•ë—ë™ë›ëë ë¤ë¨ë¼ëë˜ëœë ë¨ë©ë«ë´ë‘ë‘‘ë‘”ë‘˜ë‘ ë‘¡ë‘£ë‘¥ë‘¬ë’€ë’ˆë’뒤뒨뒬뒵뒷뒹듀듄듈ë“ë“•ë“œë“ë“ ë“£ë“¤ë“¦ë“¬ë“듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"], -["b641","í„…",7,"í„Ž",17], -["b661","í„ ",15,"턲턳턵턶턷턹턻턼턽턾"], -["b681","í„¿í…‚í…†",5,"í…Ží…í…‘í…’í…“í…•",6,"í…ží… í…¢",5,"텩텪텫í…ë•€ë•ë•ƒë•„ë•…ë•‹ë•Œë•ë•ë•”ë•œë•ë•Ÿë• ë•¡ë– ë–¡ë–¤ë–¨ë–ªë–«ë–°ë–±ë–³ë–´ë–µë–»ë–¼ë–½ë—€ë—„ë—Œë—ë—ë—뗑뗘뗬ë˜ë˜‘똔똘똥똬똴뙈뙤뙨뚜ëšëš 뚤뚫뚬뚱뛔뛰뛴뛸뜀ëœëœ…뜨뜩뜬뜯뜰뜸뜹뜻ë„ëˆëŒë”ë•ë ë¤ë¨ë°ë±ë³ëµë¼ë½ëž€ëž„람ëžëžëžëž‘ëž’ëž–ëž—"], -["b741","í…®",13,"í…½",6,"톅톆톇톉톊"], -["b761","톋",20,"톢톣톥톦톧"], -["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿í‡",14,"ëž˜ëž™ëžœëž ëž¨ëž©ëž«ëž¬ëžëž´ëžµëž¸ëŸ‡ëŸ‰ëŸ¬ëŸëŸ°ëŸ´ëŸ¼ëŸ½ëŸ¿ë €ë ë ‡ë ˆë ‰ë Œë ë ˜ë ™ë ›ë ë ¤ë ¥ë ¨ë ¬ë ´ë µë ·ë ¸ë ¹ë¡€ë¡„ë¡‘ë¡“ë¡œë¡ë¡ 롤롬ë¡ë¡¯ë¡±ë¡¸ë¡¼ë¢ë¢¨ë¢°ë¢´ë¢¸ë£€ë£ë£ƒë£…료ë£ë£”ë£ë£Ÿë£¡ë£¨ë£©ë£¬ë£°ë£¸ë£¹ë£»ë£½ë¤„ë¤˜ë¤ ë¤¼ë¤½ë¥€ë¥„ë¥Œë¥ë¥‘ë¥˜ë¥™ë¥œë¥ ë¥¨ë¥©"], -["b841","í‡",7,"퇙",17], -["b861","퇫",8,"퇵퇶퇷퇹",13], -["b881","툈툊",5,"툑",24,"륫ë¥ë¥´ë¥µë¥¸ë¥¼ë¦„릅릇릉릊ë¦ë¦Žë¦¬ë¦ë¦°ë¦´ë¦¼ë¦½ë¦¿ë§ë§ˆë§‰ë§Œë§Ž",4,"맘맙맛ë§ë§žë§¡ë§£ë§¤ë§¥ë§¨ë§¬ë§´ë§µë§·ë§¸ë§¹ë§ºë¨€ë¨ë¨ˆë¨•ë¨¸ë¨¹ë¨¼ë©€ë©‚멈멉멋ë©ë©Žë©“메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"], -["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"], -["b961","í‰",14,"í‰",6,"퉥퉦퉧퉨"], -["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄ë¬ë¬ë¬‘ë¬˜ë¬œë¬ ë¬©ë¬«ë¬´ë¬µë¬¶ë¬¸ë¬»ë¬¼ë¬½ë¬¾ë„ë…ë‡ë‰ëëëë”ë˜ë¡ë£ë¬ë®ˆë®Œë®ë®¤ë®¨ë®¬ë®´ë®·ë¯€ë¯„믈ë¯ë¯“미믹민믿밀밂밈밉밋밌ë°ë°ë°‘ë°”",4,"ë°›",4,"밤밥밧방ë°ë°°ë°±ë°´ë°¸ë±€ë±ë±ƒë±„뱅뱉뱌ë±ë±ë±ë²„벅번벋벌벎범법벗"], -["ba41","íŠíŠŽíŠíŠ’튓튔튖",5,"íŠíŠžíŠŸíŠ¡íŠ¢íŠ£íŠ¥",6,"íŠ"], -["ba61","튮튯튰튲",5,"튺튻튽튾í‹í‹ƒ",4,"í‹Ší‹Œ",5], -["ba81","틒틓틕틖틗틙틚틛í‹",6,"틦",9,"í‹²í‹³í‹µí‹¶í‹·í‹¹í‹ºë²™ë²šë² ë²¡ë²¤ë²§ë²¨ë²°ë²±ë²³ë²´ë²µë²¼ë²½ë³€ë³„ë³ë³ë³ë³‘볕볘볜보복볶본볼봄봅봇봉ë´ë´”봤봬뵀뵈뵉뵌ëµëµ˜ëµ™ëµ¤ëµ¨ë¶€ë¶ë¶„붇불붉붊ë¶ë¶‘붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브ë¸ë¸ë¸”븜ë¸ë¸Ÿë¹„ë¹…ë¹ˆë¹Œë¹Žë¹”ë¹•ë¹—ë¹™ë¹šë¹›ë¹ ë¹¡ë¹¤"], -["bb41","í‹»",4,"팂팄팆",5,"íŒíŒ‘팒팓팕팗",4,"팞팢팣"], -["bb61","팤팦팧팪팫íŒíŒ®íŒ¯íŒ±",6,"팺팾",5,"í†í‡íˆí‰"], -["bb81","íŠ",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌ëºëºëºëº‘뺘뺙뺨ë»ë»‘ë»”ë»—ë»˜ë» ë»£ë»¤ë»¥ë»¬ë¼ë¼ˆë¼‰ë¼˜ë¼™ë¼›ë¼œë¼ë½€ë½ë½„뽈ë½ë½‘뽕뾔뾰뿅뿌ë¿ë¿ë¿”뿜뿟뿡쀼ì‘ì˜ìœì ì¨ì©ì‚ì‚‘ì‚”ì‚˜ì‚ ì‚¡ì‚£ì‚¥ì‚¬ì‚삯산삳살삵삶삼삽삿샀ìƒìƒ…새색샌ìƒìƒ˜ìƒ™ìƒ›ìƒœìƒìƒ¤"], -["bc41","íª",17,"í¾í¿íŽíŽ‚펃펅펆펇"], -["bc61","펈펉펊펋펎펒",5,"펚펛íŽíŽžíŽŸíŽ¡",6,"펪펬펮"], -["bc81","펯",4,"펵펶펷펹펺펻펽",6,"í†í‡íŠ",5,"í‘",5,"샥샨샬샴샵샷샹섀섄섈ì„ì„•ì„œ",4,"섣설섦섧섬ì„섯섰성섶세섹센셀셈셉셋셌ì…셔셕션셜셤셥셧셨셩셰셴셸솅소ì†ì†Žì†ì†”솖솜ì†ì†Ÿì†¡ì†¥ì†¨ì†©ì†¬ì†°ì†½ì‡„ì‡ˆì‡Œì‡”ì‡—ì‡˜ì‡ ì‡¤ì‡¨ì‡°ì‡±ì‡³ì‡¼ì‡½ìˆ€ìˆ„ìˆŒìˆìˆìˆ‘ìˆ˜ìˆ™ìˆœìˆŸìˆ ìˆ¨ìˆ©ìˆ«ìˆ"], -["bd41","í—í™",7,"í¢í¤",7,"í®í¯í±í²í³íµí¶í·"], -["bd61","í¸í¹íºí»í¾í€í‚",5,"í‰",13], -["bd81","í—",5,"íž",25,"숯숱숲숴쉈ì‰ì‰‘ì‰”ì‰˜ì‰ ì‰¥ì‰¬ì‰ì‰°ì‰´ì‰¼ì‰½ì‰¿ìŠìŠˆìŠ‰ìŠìŠ˜ìŠ›ìŠìŠ¤ìŠ¥ìŠ¨ìŠ¬ìŠìŠ´ìŠµìŠ·ìŠ¹ì‹œì‹ì‹ 싣실싫심ì‹ì‹¯ì‹±ì‹¶ì‹¸ì‹¹ì‹»ì‹¼ìŒ€ìŒˆìŒ‰ìŒŒìŒìŒ“쌔쌕쌘쌜쌤쌥쌨쌩ì…ì¨ì©ì¬ì°ì²ì¸ì¹ì¼ì½ìŽ„쎈쎌ì€ì˜ì™ìœìŸì ì¢ì¨ì©ìì´ìµì¸ìˆìì¤ì¬ì°"], -["be41","í¸",7,"í‘푂푃푅",14], -["be61","í‘”",7,"í‘푞푟푡푢푣푥",7,"푮푰푱푲"], -["be81","푳",4,"푺푻푽푾í’í’ƒ",4,"풊풌풎",5,"í’•",8,"ì´ì¼ì½ì‘ˆì‘¤ì‘¥ì‘¨ì‘¬ì‘´ì‘µì‘¹ì’€ì’”쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀ì”씌ì”씔씜씨씩씬씰씸씹씻씽아악안앉않알ì•ì•Žì•“암압앗았앙ì•ì•žì• 액앤앨앰앱앳앴앵야약얀얄얇얌ì–ì–ì–‘ì–•ì–—ì–˜ì–œì– ì–©ì–´ì–µì–¸ì–¹ì–»ì–¼ì–½ì–¾ì—„",6,"엌엎"], -["bf41","í’ž",10,"í’ª",14], -["bf61","í’¹",18,"í“í“Ží“í“‘í“’í““í“•"], -["bf81","í“–",5,"í“í“ží“ ",7,"퓩퓪퓫í“퓮퓯퓱",6,"퓹퓺퓼ì—ì—‘ì—”ì—˜ì— ì—¡ì—£ì—¥ì—¬ì—엮연열엶엷염",5,"옅옆옇예옌ì˜ì˜˜ì˜™ì˜›ì˜œì˜¤ì˜¥ì˜¨ì˜¬ì˜ì˜®ì˜°ì˜³ì˜´ì˜µì˜·ì˜¹ì˜»ì™€ì™ì™„왈ì™ì™‘왓왔왕왜ì™ì™ 왬왯왱외왹왼욀욈욉욋ìšìš”욕욘욜욤욥욧용우욱운울욹욺움ì›ì›ƒì›…워ì›ì›ì›”웜ì›ì› 웡웨"], -["c041","퓾",5,"픅픆픇픉픊픋í”",6,"픖픘",5], -["c061","픞",25], -["c081","픸픹픺픻픾픿í•í•‚핃핅",6,"í•Ží•í•’",5,"í•ší•›í•í•ží•Ÿí•¡í•¢í•£ì›©ì›¬ì›°ì›¸ì›¹ì›½ìœ„ìœ…ìœˆìœŒìœ”ìœ•ìœ—ìœ™ìœ ìœ¡ìœ¤ìœ¨ìœ°ìœ±ìœ³ìœµìœ·ìœ¼ìœ½ì€ì„ìŠìŒììì‘",7,"ìœì ì¨ì«ì´ìµì¸ì¼ì½ì¾ìžƒìž„입잇있잉잊잎ìžìž‘ìž”ìž–ìž—ìž˜ìžšìž ìž¡ìž£ìž¤ìž¥ìž¦ìž¬ìžìž°ìž´ìž¼ìž½ìž¿ìŸ€ìŸìŸˆìŸ‰ìŸŒìŸŽìŸìŸ˜ìŸìŸ¤ìŸ¨ìŸ¬ì €ì ì „ì ˆì Š"], -["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"], -["c161","í–Œí–í–Ží–í–‘",19,"햦햧"], -["c181","í–¨",31,"ì ì ‘ì “ì •ì –ì œì ì ì ¤ì ¬ì ì ¯ì ±ì ¸ì ¼ì¡€ì¡ˆì¡‰ì¡Œì¡ì¡”조족존졸졺좀ì¢ì¢ƒì¢…좆좇좋좌ì¢ì¢”ì¢ì¢Ÿì¢¡ì¢¨ì¢¼ì¢½ì£„ì£ˆì£Œì£”ì£•ì£—ì£™ì£ ì£¡ì£¤ì£µì£¼ì£½ì¤€ì¤„ì¤…ì¤†ì¤Œì¤ì¤ì¤‘줘줬줴ì¥ì¥‘ì¥”ì¥˜ì¥ ì¥¡ì¥£ì¥¬ì¥°ì¥´ì¥¼ì¦ˆì¦‰ì¦Œì¦ì¦˜ì¦™ì¦›ì¦ì§€ì§ì§„짇질짊ì§ì§‘짓"], -["c241","í—Ší—‹í—í—Ží—í—‘í—“",4,"헚헜헞",5,"헦헧헩헪헫í—í—®"], -["c261","í—¯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"], -["c281","혖",5,"í˜í˜ží˜Ÿí˜¡í˜¢í˜£í˜¥",7,"혮",9,"혺혻징짖짙짚짜ì§ì§ 짢짤짧짬ì§ì§¯ì§°ì§±ì§¸ì§¹ì§¼ì¨€ì¨ˆì¨‰ì¨‹ì¨Œì¨ì¨”쨘쨩쩌ì©ì©ì©”ì©œì©ì©Ÿì© 쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌ì«ì«ì«‘ì«“ì«˜ì«™ì« ì«¬ì«´ì¬ˆì¬ì¬”ì¬˜ì¬ ì¬¡ììˆì‰ìŒìì˜ì™ìì¤ì¸ì¹ì®œì®¸ì¯”쯤쯧쯩찌ì°ì°ì°”ì°œì°ì°¡ì°¢ì°§ì°¨ì°©ì°¬ì°®ì°°ì°¸ì°¹ì°»"], -["c341","혽혾혿í™í™‚홃홄홆홇홊홌홎í™í™í™’홓홖홗홙홚홛í™",4], -["c361","홢",4,"홨홪",5,"홲홳홵",11], -["c381","íšíš‚횄횆",5,"횎íšíš‘íš’íš“íš•",7,"íšžíš íš¢",5,"íš©íšªì°¼ì°½ì°¾ì±„ì±…ì±ˆì±Œì±”ì±•ì±—ì±˜ì±™ì± ì±¤ì±¦ì±¨ì±°ì±µì²˜ì²™ì²œì² ì²¨ì²©ì²«ì²¬ì²ì²´ì²µì²¸ì²¼ì³„쳅쳇쳉ì³ì³”쳤쳬쳰ì´ì´ˆì´‰ì´Œì´ì´˜ì´™ì´›ì´ì´¤ì´¨ì´¬ì´¹ìµœìµ 쵤쵬ìµìµ¯ìµ±ìµ¸ì¶ˆì¶”축춘출춤춥춧충춰췄췌ì·ì·¨ì·¬ì·°ì·¸ì·¹ì·»ì·½ì¸„ì¸ˆì¸Œì¸”ì¸™ì¸ ì¸¡ì¸¤ì¸¨ì¸°ì¸±ì¸³ì¸µ"], -["c441","íš«íšíš®íš¯íš±",7,"횺횼",7,"훆훇훉훊훋"], -["c461","í›í›Ží›í›í›’훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4], -["c481","훮훯훱훲훳훴훶",5,"훾훿íœíœ‚휃휅",11,"íœ’íœ“íœ”ì¹˜ì¹™ì¹œì¹Ÿì¹ ì¹¡ì¹¨ì¹©ì¹«ì¹ì¹´ì¹µì¹¸ì¹¼ìº„캅캇캉ìºìº‘ìº”ìº˜ìº ìº¡ìº£ìº¤ìº¥ìº¬ìºì»ì»¤ì»¥ì»¨ì»«ì»¬ì»´ì»µì»·ì»¸ì»¹ì¼€ì¼ì¼„켈ì¼ì¼‘ì¼“ì¼•ì¼œì¼ ì¼¤ì¼¬ì¼ì¼¯ì¼°ì¼±ì¼¸ì½”ì½•ì½˜ì½œì½¤ì½¥ì½§ì½©ì½°ì½±ì½´ì½¸ì¾€ì¾…ì¾Œì¾¡ì¾¨ì¾°ì¿„ì¿ ì¿¡ì¿¤ì¿¨ì¿°ì¿±ì¿³ì¿µì¿¼í€€í€„í€‘í€˜í€í€´í€µí€¸í€¼"], -["c541","휕휖휗휚휛íœíœžíœŸíœ¡",6,"휪휬휮",5,"휶휷휹"], -["c561","휺휻휽",6,"í…í†íˆíŠ",5,"í’í“í•íš",4], -["c581","íŸí¢í¤í¦í§í¨íªí«íí®í¯í±í²í³íµ",6,"í¾í¿íž€íž‚",5,"힊힋í„í…í‡í‰íí”í˜í í¬íí°í´í¼í½í‚키킥킨킬킴킵킷킹타íƒíƒ„탈탉íƒíƒ‘탓탔탕태íƒíƒ 탤탬íƒíƒ¯íƒ°íƒ±íƒ¸í„터턱턴털턺텀í…텃텄텅테í…í…텔템í…í…Ÿí…¡í…¨í…¬í…¼í†„í†ˆí† í†¡í†¤í†¨í†°í†±í†³í†µí†ºí†¼í‡€í‡˜í‡´í‡¸íˆ‡íˆ‰íˆíˆ¬íˆíˆ°íˆ´íˆ¼íˆ½íˆ¿í‰í‰ˆí‰œ"], -["c641","ížížŽížíž‘",6,"힚힜힞",5], -["c6a1","퉤튀íŠíŠ„튈íŠíŠ‘íŠ•íŠœíŠ íŠ¤íŠ¬íŠ±íŠ¸íŠ¹íŠ¼íŠ¿í‹€í‹‚í‹ˆí‹‰í‹‹í‹”í‹˜í‹œí‹¤í‹¥í‹°í‹±í‹´í‹¸íŒ€íŒíŒƒíŒ…파íŒíŒŽíŒíŒ”팖팜íŒíŒŸíŒ 팡팥패팩팬팰팸팹팻팼팽í„í…í¼í½íŽ€íŽ„펌íŽíŽíŽíŽ‘íŽ˜íŽ™íŽœíŽ íŽ¨íŽ©íŽ«íŽíŽ´íŽ¸íŽ¼í„í…íˆí‰íí˜í¡í£í¬íí°í´í¼í½í¿í"], -["c7a1","íˆíí‘€í‘„í‘œí‘ í‘¤í‘푯푸푹푼푿풀풂품풉풋í’풔풩퓌í“퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌í•í•í•‘í•˜í•™í•œí• í•¥í•¨í•©í•«í•í•´í•µí•¸í•¼í–„햅햇했행í–향허헉헌í—헒험헙헛í—헤헥헨헬헴헵헷헹혀í˜í˜„혈í˜í˜‘í˜“í˜”í˜•í˜œí˜ "], -["c8a1","혤í˜í˜¸í˜¹í˜¼í™€í™…홈홉홋í™í™‘화확환활홧황홰홱홴횃횅회íšíšíš”íšíšŸíš¡íš¨íš¬íš°íš¹íš»í›„í›…í›ˆí›Œí›‘í›”í›—í›™í› í›¤í›¨í›°í›µí›¼í›½íœ€íœ„íœ‘íœ˜íœ™íœœíœ íœ¨íœ©íœ«íœíœ´íœµíœ¸íœ¼í„í‡í‰íí‘í”í–í—í˜í™í í¡í£í¥í©í¬í°í´í¼í½ížížˆíž‰ížŒížíž˜íž™íž›íž"], -["caa1","伽佳å‡åƒ¹åŠ å¯å‘µå“¥å˜‰å«å®¶æš‡æž¶æž·æŸ¯æŒç‚痂稼苛茄街袈訶賈è·è»»è¿¦é§•åˆ»å´å„æªæ…¤æ®¼ç脚覺角閣侃刊墾奸姦干幹懇æ€æ†æŸ¬æ¡¿æ¾—癎看磵稈竿簡è‚艮艱諫間乫å–曷渴碣ç«è‘›è¤èŽéž¨å‹˜åŽå ªåµŒæ„Ÿæ†¾æˆ¡æ•¢æŸ‘橄減甘疳監瞰紺邯鑑鑒龕"], -["cba1","åŒ£å²¬ç”²èƒ›é‰€é–˜å‰›å ˆå§œå²¡å´—åº·å¼ºå½Šæ…·æ±Ÿç•ºç–†ç³ çµ³ç¶±ç¾Œè…”èˆ¡è–‘è¥è¬›é‹¼é™é±‡ä»‹ä»·å€‹å‡±å¡æ„·æ„¾æ…¨æ”¹æ§ªæ¼‘疥皆盖箇芥蓋豈鎧開喀客å‘ï¤ç²³ç¾¹é†µå€¨åŽ»å±…巨拒æ®æ“šæ“§æ¸ 炬祛è·è¸žï¤‚é½é‰…鋸乾件å¥å·¾å»ºæ„†æ¥—腱虔蹇éµé¨«ä¹žå‚‘æ°æ¡€å„‰åŠåŠ’檢"], -["cca1","çž¼éˆé»”劫怯迲åˆæ†©ææ“Šæ ¼æª„æ¿€è†ˆè¦¡éš”å …ç‰½çŠ¬ç”„çµ¹ç¹è‚©è¦‹è´é£éµ‘抉決潔çµç¼ºè¨£å…¼æ…Šç®è¬™é‰—鎌京俓倞傾儆å‹å‹å¿å°å¢ƒåºšå¾‘慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖è¦è¼•é€•é¡é ƒé ¸é©šé¯¨ä¿‚å•“å ºå¥‘å£å±†æ‚¸æˆ’桂械"], -["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄å¤å©å‘Šå‘±å›ºå§‘å¤å°»åº«æ‹·æ”·æ•…æ•²æš æž¯æ§æ²½ç—¼çšç¾ç¨¿ç¾”考股è†è‹¦è‹½è°è—è ±è¢´èª¥ï¤ƒè¾œéŒ®é›‡é¡§é«˜é¼“å“斛曲æ¢ç©€è°·éµ å›°å¤å´‘昆梱æ£æ»¾ç¨è¢žé¯¤æ±¨ï¤„骨供公共功å”å·¥ææ拱控攻ç™ç©ºèš£è²¢éžä¸²å¯¡æˆˆæžœç“œ"], -["cea1","科è“誇課跨éŽé‹é¡†å»“槨藿éƒï¤…å† å®˜å¯¬æ…£æ£ºæ¬¾çŒç¯ç“˜ç®¡ç½è…觀貫關館刮ææ‹¬é€‚ä¾Šå…‰åŒ¡å£™å»£æ› æ´¸ç‚šç‹‚ç–ç胱鑛å¦æŽ›ç½«ä¹–傀塊壞怪愧æ‹æ§éå®ç´˜è‚±è½Ÿäº¤åƒ‘å’¬å–¬å¬Œå¶ å·§æ”ªæ•Žæ ¡æ©‹ç‹¡çšŽçŸ¯çµžç¿¹è† è•Žè›Ÿè¼ƒè½ŽéƒŠé¤ƒé©•é®«ä¸˜ä¹…ä¹ä»‡ä¿±å…·å‹¾"], -["cfa1","å€å£å¥å’Žå˜”åµåž¢å¯‡å¶‡å»æ‡¼æ‹˜æ•‘枸柩構æ毆毬求æºç¸ç‹—玖çƒçž¿çŸ©ç©¶çµ¿è€‰è‡¼èˆ…舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局èŠéž 鞫麴å›çª˜ç¾¤è£™è»éƒ¡å €å±ˆæŽ˜çªŸå®®å¼“穹窮芎躬倦券勸å·åœˆæ‹³æ²æ¬Šæ·ƒçœ·åŽ¥ç—蕨蹶闕机櫃潰è©è»Œé¥‹ï¤†æ™·æ¸è²´"], -["d0a1","鬼龜å«åœå¥Žæ†æ§»çªç¡…窺竅糾葵è¦èµ³é€µé–¨å‹»å‡ç•‡ç èŒéˆžï¤ˆæ©˜å…‹å‰‹åŠ‡æˆŸæ£˜æ¥µéš™åƒ…åŠ¤å‹¤æ‡ƒæ–¤æ ¹æ§¿ç‘¾ç‹èŠ¹è«è¦²è¬¹è¿‘饉契今妗擒昑檎ç´ç¦ç¦½èŠ©è¡¾è¡¿è¥Ÿï¤ŠéŒ¦ä¼‹åŠæ€¥æ‰±æ±²ç´šçµ¦äº˜å…¢çŸœè‚¯ä¼ä¼Žå…¶å†€å—œå™¨åœ»åŸºåŸ¼å¤”奇妓寄å²å´Žå·±å¹¾å¿ŒæŠ€æ——æ—£"], -["d1a1","朞期æžæ£‹æ£„機欺氣汽沂淇玘ç¦çªç’‚璣畸畿ç¢ç£¯ç¥ç¥‡ç¥ˆç¥ºç®•ç´€ç¶ºç¾ˆè€†è€è‚Œè¨˜è豈起錡錤飢饑騎é¨é©¥éº’緊佶å‰æ‹®æ¡”金喫儺喇奈娜懦ï¤æ‹æ‹¿ï¤Ž",5,"那樂",4,"諾酪駱亂卵暖ï¤ç…–ï¤žï¤Ÿé›£ï¤ ææºå—嵐æžæ¥ 湳濫男藍襤拉"], -["d2a1","ç´ï¤¦ï¤§è¡²å›Šå¨˜ï¤¨",4,"乃ï¤å…§å¥ˆæŸ°è€ï¤®å¥³å¹´æ’šç§Šå¿µæ¬æ‹ˆæ»å¯§å¯—努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥æ»ç´ï¥’",5,"能菱陵尼泥匿溺多茶"], -["d3a1","丹亶但單團壇彖斷旦檀段æ¹çŸç«¯ç°žç·žè›‹è¢’鄲é›æ’»æ¾¾çºç–¸é”å•–å憺擔曇淡湛æ½æ¾¹ç—°èƒè†½è•è¦ƒè«‡èšéŒŸæ²“ç•“ç”è¸éå”å ‚å¡˜å¹¢æˆ‡æ’žæ£ ç•¶ç³–èž³é»¨ä»£åžˆå®å¤§å°å²±å¸¶å¾…æˆ´æ“¡çŽ³è‡ºè¢‹è²¸éšŠé»›å®…å¾·æ‚³å€’åˆ€åˆ°åœ–å µå¡—å°Žå± å³¶å¶‹åº¦å¾’æ‚¼æŒ‘æŽ‰æ—桃"], -["d4a1","棹櫂淘渡滔濤燾盜ç¹ç¦±ç¨»è„覩è³è·³è¹ˆé€ƒé€”é“都é陶韜毒瀆牘犢ç¨ç£ç¦¿ç¯¤çº›è®€å¢©æƒ‡æ•¦æ—½æš¾æ²Œç„žç‡‰è±šé “ä¹çªä»å†¬å‡å‹•åŒæ†§æ±æ¡æ£Ÿæ´žæ½¼ç–¼çž³ç«¥èƒ´è‘£éŠ…兜斗æœæž“痘竇è³ï¥šè±†é€—é 屯臀芚éé¯éˆå¾—å¶æ©™ç‡ˆç™»ç‰è—¤è¬„鄧騰喇懶拏癩羅"], -["d5a1","蘿螺裸é‚樂洛烙çžçµ¡è½ï¥é…ªé§±ï¥žäº‚åµæ¬„欒瀾爛è˜é¸žå‰Œè¾£åµæ“¥æ”¬æ¬–濫籃纜è—è¥¤è¦½æ‹‰è‡˜è Ÿå»Šæœ—æµªç‹¼ç…瑯螂郞來å´å¾ èŠå†·æŽ 略亮倆兩凉æ¢æ¨‘粮粱糧良諒輛é‡ä¾¶å„·å‹µå‘‚å»¬æ…®æˆ¾æ—…æ«šæ¿¾ç¤ªè—œè £é–驢驪麗黎力曆æ·ç€ç¤«è½¢é‚æ†æˆ€æ”£æ¼£"], -["d6a1","煉璉練è¯è“®è¼¦é€£éŠå†½åˆ—劣洌烈裂廉斂殮濂簾çµä»¤ä¼¶å›¹ï¥Ÿå²ºå¶ºæ€œçŽ²ç¬ç¾šç¿Žè†é€žéˆ´é›¶éˆé ˜é½¡ä¾‹æ¾§ç¦®é†´éš·å‹žï¥ 撈擄櫓潞瀘çˆç›§è€è˜†è™œè·¯è¼…露é¯é·ºé¹µç¢Œç¥¿ç¶ è‰éŒ„鹿麓論壟弄朧瀧ç“ç± è¾å„¡ç€¨ç‰¢ç£Šè³‚賚賴雷了僚寮廖料燎療çžèŠè“¼"], -["d7a1","é¼é¬§é¾å£˜å©å±¢æ¨“æ·šæ¼ç˜»ç´¯ç¸·è”žè¤¸é¤é™‹åŠ‰æ—’柳榴æµæºœç€ç‰ç‘ 留瘤硫謬類å…æˆ®é™¸ä¾–å€«å´™æ·ªç¶¸è¼ªå¾‹æ…„æ —ï¥¡éš†å‹’è‚‹å‡œå‡Œæ¥žç¨œç¶¾è±é™µä¿šåˆ©åŽ˜å唎履悧æŽæ¢¨æµ¬çŠç‹¸ç†ç’ƒï¥¢ç—¢ç±¬ç½¹ç¾¸èŽ‰è£è£¡é‡Œé‡é›¢é¯‰åæ½¾ç‡ç’˜è—ºèºªéš£é±—麟林淋ç³è‡¨éœ–ç ¬"], -["d8a1","ç«‹ç¬ ç²’æ‘©ç‘ªç—²ç¢¼ç£¨é¦¬é”éº»å¯žå¹•æ¼ è†œèŽ«é‚ˆä¸‡å娩巒彎慢挽晩曼滿漫ç£çžžè¬è”“è »è¼“é¥…é°»å”œæŠ¹æœ«æ²«èŒ‰è¥ªéºäº¡å¦„忘忙望網罔芒茫莽輞邙埋妹媒å¯æ˜§æžšæ¢…æ¯ç…¤ç½µè²·è³£é‚é…脈貊陌驀麥åŸæ°“猛盲盟èŒå†ªè¦“å…å†•å‹‰æ£‰æ²”çœ„çœ ç¶¿ç·¬é¢éºµæ»…"], -["d9a1","蔑冥å命明æšæ¤§æºŸçš¿çž‘茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮æŸæ¨¡æ¯æ¯›ç‰Ÿç‰¡ç‘眸矛耗芼茅謀謨貌木æ²ç‰§ç›®ç¦ç©†é¶©æ¿æ²’夢朦蒙å¯å¢“妙廟æ昴æ³æ¸ºçŒ«ç«—è‹—éŒ¨å‹™å·«æ†®æ‡‹æˆŠæ‹‡æ’«æ— æ¥™æ¦æ¯‹ç„¡ç·ç•ç¹†èˆžèŒ‚蕪誣貿霧鵡墨默們刎å»å•æ–‡"], -["daa1","汶紊紋èžèšŠé–€é›¯å‹¿æ²•ç‰©å‘³åªšå°¾åµ‹å½Œå¾®æœªæ¢¶æ¥£æ¸¼æ¹„眉米美薇謎迷é¡é»´å²·æ‚¶æ„憫æ•æ—»æ—¼æ°‘泯玟ç‰ç·¡é–”密蜜è¬å‰åšæ‹æ撲朴樸泊ç€ç’žç®”粕縛膊舶薄迫雹é§ä¼´åŠåå›æ‹Œæ¬æ”€æ–‘槃泮潘ç畔瘢盤盼ç£ç£»ç¤¬çµ†èˆ¬èŸ è¿”é ’é£¯å‹ƒæ‹”æ’¥æ¸¤æ½‘"], -["dba1","發跋醱鉢髮éƒå€£å‚åŠå¦¨å°¨å¹‡å½·æˆ¿æ”¾æ–¹æ—昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防é¾å€ä¿³ï¥£åŸ¹å¾˜æ‹œæŽ’æ¯æ¹ƒç„™ç›ƒèƒŒèƒšè£´è£µè¤™è³ 輩é…陪伯佰帛æŸæ ¢ç™½ç™¾é„幡樊煩燔番磻ç¹è•ƒè—©é£œä¼ç罰閥凡帆梵氾汎泛犯範范法çºåƒ»åŠˆå£æ“˜æª—璧癖"], -["dca1","碧蘗闢霹便åžå¼è®Šè¾¨è¾¯é‚Šåˆ¥çž¥é±‰é¼ˆä¸™å€‚兵屛幷昞昺柄棅炳ç”病秉ç«è¼§é¤ 騈ä¿å ¡å ±å¯¶æ™®æ¥æ´‘湺潽ç¤ç”«è©è£œè¤“èœè¼”ä¼åƒ•åŒåœå®“復æœç¦è…¹èŒ¯è””複覆輹輻馥鰒本乶俸奉å°å³¯å³°æ§æ£’烽熢ç«ç¸«è“¬èœ‚逢鋒鳳ä¸ä»˜ä¿¯å‚…剖副å¦å’åŸ å¤«å©¦"], -["dda1","åšåµå¯Œåºœï¥¦æ‰¶æ•·æ–§æµ®æº¥çˆ¶ç¬¦ç°¿ç¼¶è…è…‘è†šè‰€èŠ™èŽ©è¨ƒè² è³¦è³»èµ´è¶ºéƒ¨é‡œé˜œé™„é§™é³§åŒ—åˆ†å©å™´å¢³å¥”奮忿憤扮æ˜æ±¾ç„šç›†ç²‰ç³žç´›èŠ¬è³é›°ï¥§ä½›å¼—彿拂崩朋棚硼繃鵬丕備匕匪å‘妃婢庇悲憊扉批æ–枇榧比毖毗毘沸泌çµç—ºç ’碑秕秘粃緋翡肥"], -["dea1","脾臂è²èœšè£¨èª¹è¬è²»é„™éžé£›é¼»åš¬å¬ªå½¬æ–Œæª³æ®¯æµœæ¿±ç€•ç‰çŽè²§è³“é »æ†‘æ°·è˜é¨ä¹äº‹äº›ä»•ä¼ºä¼¼ä½¿ä¿Ÿåƒ¿å²å¸å”†å—£å››å£«å¥¢å¨‘寫寺射巳師徙æ€æ¨æ–œæ–¯æŸ¶æŸ»æ¢æ»æ²™æ³—渣瀉ç…ç ‚ç¤¾ç¥€ç¥ ç§ç¯©ç´—絲肆èˆèŽŽè“‘蛇裟è©è©žè¬è³œèµ¦è¾é‚ªé£¼é§Ÿéºå‰Šï¥©æœ”索"], -["dfa1","傘刪山散汕çŠç”£ç–算蒜酸霰乷撒殺煞薩三參æ‰æ£®æ¸—芟蔘衫æ·æ¾éˆ’颯上傷åƒå„Ÿå•†å–ªå˜—å€å°™å³ å¸¸åºŠåº å»‚æƒ³æ¡‘æ©¡æ¹˜çˆ½ç‰€ç‹€ç›¸ç¥¥ç®±ç¿”è£³è§´è©³è±¡è³žéœœå¡žç’½è³½å—‡ï¥¬ç©¡ç´¢è‰²ç‰²ç”Ÿç”¥ï¥ç¬™å¢…壻嶼åºåº¶å¾æ•æŠ’æ¿æ•æš‘æ›™æ›¸æ –æ£²çŠ€ç‘žç®çµ®ç·–ç½²"], -["e0a1","胥舒薯西誓é€é‹¤é»é¼ 夕å¥å¸æƒœæ˜”晳æžæ±æ·…潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽ç瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣é¸éŠ‘é¥é¥é®®å¨å±‘楔泄洩渫舌薛褻è¨èªªé›ªé½§å‰¡æš¹æ®²çº–蟾è´é–ƒé™æ”涉燮葉城姓宬性惺æˆæ˜Ÿæ™ŸçŒ©ç¹ç››çœç¬"], -["e1a1","è–è²è…¥èª 醒世勢æ²æ´—稅笹細說貰å¬å˜¯å¡‘宵å°å°‘巢所掃æ”æ˜æ¢³æ²¼æ¶ˆæº¯ç€Ÿç‚¤ç‡’甦ç–ç–Žç˜™ç¬‘ç¯ ç°«ç´ ç´¹è”¬è•è˜‡è¨´é€é¡é‚µéŠ·éŸ¶é¨·ä¿—屬æŸæ¶‘粟續謖贖速å«å·½æè“€éœé£¡çŽ‡å®‹æ‚šæ¾æ·žè¨Ÿèª¦é€é Œåˆ·ï¥°ç‘碎鎖衰釗修å—嗽囚垂壽嫂守岫峀帥æ„"], -["e2a1","æˆæ‰‹æŽˆæœæ”¶æ•¸æ¨¹æ®Šæ°´æ´™æ¼±ç‡§ç‹©ç¸ç‡ç’²ç˜¦ç¡ç§€ç©—竪粹ç¶ç¶¬ç¹¡ç¾žè„©èŒ±è’蓚藪袖誰è®è¼¸é‚é‚ƒé…¬éŠ–éŠ¹éš‹éš§éš¨é›–éœ€é ˆé¦–é«“é¬šå”塾夙å°å®¿æ·‘潚熟ç¡ç’¹è‚…è½å·¡å¾‡å¾ªæ‚æ—¬æ ’æ¥¯æ©“æ®‰æ´µæ·³ç£ç›¾çž¬ç純脣舜è€è“´è•£è©¢è«„é†‡éŒžé †é¦´æˆŒè¡“è¿°é‰¥å´‡å´§"], -["e3a1","嵩瑟è†è¨æ¿•æ‹¾ç¿’褶襲丞乘僧å‹å‡æ‰¿æ˜‡ç¹©è …陞ä¾åŒ™å˜¶å§‹åª¤å°¸å±Žå±å¸‚弑æƒæ–½æ˜¯æ™‚枾柴猜矢示翅蒔è“視試詩諡豕豺埴寔å¼æ¯æ‹æ¤æ®–湜熄篒è•è˜è»¾é£Ÿé£¾ä¼¸ä¾ä¿¡å‘»å¨ 宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心æ²"], -["e4a1","沈深瀋甚芯諶什å拾雙æ°äºžä¿„兒啞娥峨我牙芽莪蛾衙è¨é˜¿é›…餓鴉éµå Šå²³å¶½å¹„惡愕æ¡æ¨‚渥鄂é”é¡Žé°é½·å®‰å²¸æŒ‰æ™æ¡ˆçœ¼é›éžé¡”鮟斡è¬è»‹é–¼å”µå²©å·–庵暗癌è´é—‡å£“押狎鴨仰央æ€æ˜»æ®ƒç§§é´¦åŽ“哀埃崖愛曖涯ç¢è‰¾éš˜é„厄扼掖液縊腋é¡"], -["e5a1","櫻罌鶯鸚也倻冶夜惹æ¶æ¤°çˆºè€¶ï¥´é‡Žå¼±ï¥µï¥¶ç´„若葯蒻藥èºï¥·ä½¯ï¥¸ï¥¹å£¤åƒæ™æšæ”˜æ•æš˜ï¥ºæ¥Šæ¨£æ´‹ç€ç…¬ç—’ç˜ç¦³ç©°ï¥»ç¾Šï¥¼è¥„諒讓釀陽量養圄御於æ¼ç˜€ç¦¦èªžé¦éšé½¬å„„憶抑æªè‡†åƒå °å½¦ç„‰è¨€è«ºå¼è˜–俺儼嚴奄掩淹嶪æ¥å††äºˆä½™ï¥¿ï¦€ï¦å¦‚廬"], -["e6a1","旅æŸæ±ï¦„璵礖礪與艅茹輿è½ï¦†é¤˜ï¦‡ï¦ˆï¦‰äº¦ï¦ŠåŸŸå½¹æ˜“曆歷疫繹è¯ï¦é€†é©›åš¥å §å§¸å¨Ÿå®´ï¦Žå»¶ï¦ï¦æ挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉ç¡ç¡¯ï¦•çµç·£ï¦–縯聯è¡è»Ÿï¦˜ï¦™ï¦šé‰›ï¦›é³¶ï¦œï¦ï¦žæ‚…æ¶…ï¦Ÿç†±ï¦ ï¦¡é–±åŽï¦¢ï¦£ï¦¤æŸ“殮炎焰ç°è‰¶è‹’"], -["e7a1","簾閻髥鹽曄獵ç‡è‘‰ï¦¨ï¦©å¡‹ï¦ªï¦«å¶¸å½±ï¦¬æ˜ 暎楹榮永泳渶æ½æ¿šç€›ç€¯ç…營ç°ï¦ç‘›ï¦®ç“”ç›ˆç©Žçº“ï¦¯ï¦°è‹±è© è¿Žï¦±éˆï¦²éœ™ï¦³ï¦´ä¹‚倪例刈å¡æ›³æ±æ¿ŠçŒŠç¿ç©¢èŠ®è—蘂禮裔詣è½è±«ï¦·éŠ³ï¦¸éœ“é 五ä¼ä¿‰å‚²åˆå¾å³å—šå¡¢å¢ºå¥§å¨›å¯¤æ‚Ÿï¦¹æ‡Šæ•–旿晤梧汚澳"], -["e8a1","çƒç†¬ç’ç½èœˆèª¤é°²é¼‡å±‹æ²ƒç„玉鈺溫瑥瘟穩縕蘊兀壅æ“瓮甕癰ç¿é‚•é›é¥”渦瓦窩窪臥蛙è¸è¨›å©‰å®Œå®›æ¢¡æ¤€æµ£çŽ©ç“ç¬ç¢—ç·©ç¿«è„˜è…•èŽžè±Œé˜®é ‘æ›°å¾€æ—ºæž‰æ±ªçŽ‹å€å¨ƒæªçŸ®å¤–嵬å·çŒ¥ç•ï¦ºï¦»åƒ¥å‡¹å ¯å¤å¦–姚寥寮尿嶢拗æ–撓擾料曜樂橈燎燿瑤ï§"], -["e9a1","窈窯繇繞耀腰蓼蟯è¦è¬ é™ï§ƒé‚€é¥’慾欲浴縟褥辱俑å‚冗勇埇墉容庸慂榕涌湧溶熔瑢用甬è³èŒ¸è“‰è¸ŠéŽ”éžï§„于佑å¶å„ªåˆå‹å³å®‡å¯“尤愚憂旴牛玗瑀盂ç¥ç¦‘禹紆羽芋藕虞迂é‡éƒµé‡ªéš…雨雩勖彧æ—æ˜±æ ¯ç…œç¨¶éƒé Šäº‘暈橒殞æ¾ç†‰è€˜èŠ¸è•“"], -["eaa1","é‹éš•é›²éŸ»è”šé¬±äºç†Šé›„元原員圓園垣媛嫄寃怨愿æ´æ²…洹湲æºçˆ°çŒ¿ç‘—è‹‘è¢è½…é 阮院願鴛月越鉞ä½å‰åƒžå±åœå§”å¨å°‰æ…°æšæ¸çˆ²ç‘‹ç·¯èƒƒèŽè‘¦è”¿èŸè¡›è¤˜è¬‚é•éŸ‹é乳侑儒兪劉唯喩åºå®¥å¹¼å¹½åº¾æ‚ 惟愈愉æ„攸有杻柔柚柳楡楢油洧流游溜"], -["eba1","濡猶猷琉瑜由ï§ç™’硫ï§ç¶è‡¾è¸è£•èª˜è«›è«è¸°è¹‚éŠé€¾éºé…‰é‡‰é®ï§ï§‘å ‰ï§’æ¯“è‚‰è‚²ï§“ï§”å…奫尹崙淪潤玧胤贇輪鈗é–律慄栗率è¿æˆŽç€œçµ¨èžï§œåž æ©æ…‡æ®·èª¾éŠ€éš±ä¹™åŸæ·«è”陰音飮æ–泣邑å‡æ‡‰è†ºé·¹ä¾å€šå„€å®œæ„懿擬椅毅疑矣義艤è–蟻衣誼"], -["eca1","è°é†«äºŒä»¥ä¼Šï§ï§žå¤·å§¨ï§Ÿå·²å¼›å½›æ€¡ï§ 李梨泥爾ç¥ï§¤ç•°ç—痢移罹而耳肄苡è‘裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人ä»åˆƒå°ï§å’½å› 姻寅引å¿æ¹®ï§®ï§¯çµªèŒµï§°èš“èªï§±éé·ï§²ï§³ä¸€ä½šä½¾å£¹æ—¥æº¢é€¸éŽ°é¦¹ä»»å£¬å¦Šå§™æ林淋稔臨è賃入å„"], -["eda1","立笠粒ä»å‰©å•èŠ¿ä»”刺咨姉姿åå—åœæ£æ…ˆæ»‹ç‚™ç…®çŽ†ç“·ç–µç£ç´«è€…自茨蔗藉諮資雌作勺嚼斫昨ç¼ç‚¸çˆµç¶½èŠé…Œé›€éµ²å±æ£§æ®˜æ½ºç›žå²‘æš«æ½›ç®´ç°ªè ¶é›œä¸ˆä»—åŒ å ´å¢»å£¯å¥¬å°‡å¸³åº„å¼µæŽŒæš²æ–樟檣欌漿牆狀çç’‹ç« ç²§è…¸è‡Ÿè‡§èŽŠè‘¬è”£è–”è—è£è´“醬長"], -["eea1","éšœå†å“‰åœ¨å®°æ‰ææ ½æ¢“æ¸½æ»“ç½ç¸¡è£è²¡è¼‰é½‹é½Žçˆç®è«éŒšä½‡ä½Žå„²å’€å§åº•æŠµæµæ¥®æ¨—沮渚狙猪疽箸紵苧è¹è‘—藷詛貯躇這邸雎齟勣åŠå«¡å¯‚摘敵滴狄炙的ç©ç¬›ç±ç¸¾ç¿Ÿè»è¬«è³Šèµ¤è·¡è¹Ÿè¿ªè¿¹é©é‘佃佺傳全典å‰å‰ªå¡¡å¡¼å¥ å°ˆå±•å»›æ‚›æˆ°æ “æ®¿æ°ˆæ¾±"], -["efa1","ç…Žç 田甸畑癲çŒç®‹ç®ç¯†çºè©®è¼¾è½‰éˆ¿éŠ“錢é«é›»é¡šé¡«é¤žåˆ‡æˆªæŠ˜æµ™ç™¤ç«Šç¯€çµ¶å 岾店漸点粘霑鮎點接摺è¶ä¸äº•äºåœåµå‘ˆå§ƒå®šå¹€åºå»·å¾æƒ…挺政整旌晶晸柾楨檉æ£æ±€æ·€æ·¨æ¸Ÿæ¹žç€žç‚¡çŽŽç½ç”ºç›ç¢‡ç¦Žç¨‹ç©½ç²¾ç¶Žè‰‡è¨‚諪貞é„é…Šé‡˜é‰¦é‹ŒéŒ éœ†é–"], -["f0a1","éœé ‚é¼Žåˆ¶åŠ‘å•¼å ¤å¸å¼Ÿæ‚Œæ梯濟ç¥ç¬¬è‡è–ºè£½è«¸è¹„é†é™¤éš›éœ½é¡Œé½Šä¿Žå…†å‡‹åŠ©å˜²å¼”彫措æ“æ—©æ™æ›ºæ›¹æœæ¢æ£—æ§½æ¼•æ½®ç…§ç‡¥çˆªç’ªçœºç¥–ç¥šç§Ÿç¨ çª•ç²—ç³Ÿçµ„ç¹°è‚‡è—»èš¤è©”èª¿è¶™èºé€ é釣阻雕鳥æ—簇足éƒå˜å°Šå’æ‹™çŒå€§å®—從悰慫棕淙ç®ç¨®çµ‚綜縱腫"], -["f1a1","踪踵é¾é˜ä½å左座挫罪主ä½ä¾åšå§èƒ„呪周嗾å¥å®™å·žå»šæ™æœ±æŸ±æ ªæ³¨æ´²æ¹Šæ¾ç‚·ç 疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄é§ç«¹ç²¥ä¿Šå„å‡†åŸˆå¯¯å³»æ™™æ¨½æµšæº–æ¿¬ç„Œç•¯ç«£è ¢é€¡éµé›‹é§¿èŒä¸ä»²è¡†é‡å½æ«›æ¥«æ±è‘ºå¢žæ†Žæ›¾æ‹¯çƒç”‘症繒蒸è‰è´ˆä¹‹åª"], -["f2a1","咫地å€å¿—æŒæŒ‡æ‘¯æ”¯æ—¨æ™ºæžæž³æ¢æ± æ²šæ¼¬çŸ¥ç ¥ç¥‰ç¥—ç´™è‚¢è„‚è‡³èŠèŠ·èœ˜èªŒï§¼è´„趾é²ç›´ç¨™ç¨·ç¹”è·å”‡å—”塵振æ¢æ™‰æ™‹æ¡æ¦›æ®„津溱ç瑨璡畛疹盡眞瞋秦縉ç¸è‡»è”¯è¢—診賑軫辰進éŽé™£é™³éœ‡ä¾„å±å§ªå«‰å¸™æ¡Žç“†ç–¾ç§©çª’膣è›è³ªè·Œè¿æ–Ÿæœ•ï§½åŸ·æ½—ç·è¼¯"], -["f3a1","é¶é›†å¾µæ‡²æ¾„且侘借å‰å—Ÿåµ¯å·®æ¬¡æ¤ç£‹ç®šï§¾è¹‰è»Šé®æ‰æ¾ç€çª„錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽é¤é¥Œåˆ¹å¯Ÿæ“¦æœç´®åƒåƒå¡¹æ…˜æ…™æ‡ºæ–¬ç«™è®’è®–å€‰å€¡å‰µå”±å¨¼å» å½°æ„´æ•žæ˜Œæ˜¶æš¢æ§æ»„漲猖瘡窓脹艙è–è’¼å‚µåŸ°å¯€å¯¨å½©æŽ¡ç ¦ç¶µèœè”¡é‡‡é‡µå†ŠæŸµç–"], -["f4a1","è²¬å‡„å¦»æ‚½è™•å€œï§¿å‰”å°ºæ…½æˆšæ‹“æ“²æ–¥æ»Œç˜ è„Šè¹ é™Ÿéš»ä»Ÿåƒå–˜å¤©å·æ“…泉淺玔穿舛薦賤è¸é·é‡§é—¡é˜¡éŸ†å‡¸å“²å–†å¾¹æ’¤æ¾ˆç¶´è¼Ÿè½éµåƒ‰å°–æ²¾æ·»ç”›çž»ç°½ç±¤è©¹è«‚å žå¦¾å¸–æ·ç‰’ç–Šç«è«œè²¼è¼’廳晴淸è½èè«‹é‘é¯–ï¨€å‰ƒæ›¿æ¶•æ»¯ç· è«¦é€®éžé«”åˆå‰¿å“¨æ†”抄招梢"], -["f5a1","椒楚樵炒焦ç¡ç¤ç¤Žç§’ç¨è‚–艸苕è‰è•‰è²‚超酢醋醮促囑ç‡çŸ—蜀觸寸忖æ‘邨å¢å¡šå¯µæ‚¤æ†æ‘ 總è°è”¥éŠƒæ’®å‚¬å´”最墜抽推椎楸樞湫皺秋芻è©è«è¶¨è¿½é„’酋醜éŒéŒ˜éŽšé››é¨¶é°ä¸‘ç•œç¥ç«ºç‘築縮蓄蹙蹴軸é€æ˜¥æ¤¿ç‘ƒå‡ºæœ®é»œå……å¿ æ²–èŸ²è¡è¡·æ‚´è†µèƒ"], -["f6a1","è´…å–å¹å˜´å¨¶å°±ç‚Šç¿ èšè„†è‡è¶£é†‰é©Ÿé·²å´ä»„åŽ æƒ»æ¸¬å±¤ä¾ˆå€¤å—¤å³™å¹Ÿæ¥æ¢”治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅é£è¦ªä¸ƒæŸ’漆侵寢枕沈浸ç›ç §é‡é¼èŸ„秤稱快他咤唾墮妥惰打拖朶楕舵陀馱é§å€¬å“å•„å¼ï¨æ‰˜ï¨‚擢晫æŸæ¿æ¿¯ç¢ç¸è¨—"], -["f7a1","é¸å‘‘嘆å¦å½ˆæ†šæŽç˜ç‚綻誕奪脫探眈耽貪塔æ榻宕帑湯糖蕩兌å°å¤ªæ€ 態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎å土討慟桶洞痛ç’çµ±é€šå †æ§Œè…¿è¤ªé€€é ¹å¸å¥—妬投é€é¬ªæ…特闖å¡å©†å·´æŠŠæ’擺æ·æ³¢æ´¾çˆ¬ç¶ç ´ç½·èŠè·›é —判å‚æ¿ç‰ˆç“£è²©è¾¦éˆ‘"], -["f8a1","阪八åæŒä½©å”„悖敗沛浿牌狽稗覇è²å½æ¾Žçƒ¹è†¨æ„Žä¾¿åæ‰ç‰‡ç¯‡ç·¨ç¿©ééžé¨™è²¶åªå¹³æž°èè©•å 嬖幣廢弊斃肺蔽閉陛佈包åŒåŒå’†å“ºåœƒå¸ƒæ€–抛抱æ•ï¨†æ³¡æµ¦ç–±ç ²èƒžè„¯è‹žè‘¡è’²è¢è¤’逋鋪飽鮑幅暴æ›ç€‘爆輻俵剽彪慓æ“標漂瓢票表豹飇飄驃"], -["f9a1","å“稟楓諷豊風馮彼披疲皮被é¿é™‚匹弼必泌çŒç•¢ç–‹ç†è‹¾é¦ä¹é€¼ä¸‹ä½•åŽ¦å¤å»ˆæ˜°æ²³ç‘•è·è¦è³€é霞鰕壑å¸è™è¬”鶴寒æ¨æ‚旱汗漢澣瀚罕翰閑閒é™éŸ“割轄函å«å’¸å•£å–Šæª»æ¶µç·˜è‰¦éŠœé™·é¹¹åˆå“ˆç›’蛤閤闔陜亢伉姮嫦巷æ’抗ææ¡æ²†æ¸¯ç¼¸è‚›èˆª"], -["faa1","ï¨ˆï¨‰é …äº¥å•å’³åž“奚å©å®³æ‡ˆæ¥·æµ·ç€£èŸ¹è§£è©²è«§é‚‚é§éª¸åŠ¾æ ¸å€–幸æè‡è¡Œäº«å‘åš®ç¦é„•éŸ¿é¤‰é¥—香噓墟虛許憲櫶ç»è»’æ‡éšªé©—奕爀赫é©ä¿”峴弦懸晛泫炫玄玹ç¾çœ©ç絃絢縣舷衒見賢鉉顯å‘ç©´è¡€é å«Œä¿ å”夾峽挾浹狹脅脇莢é‹é °äº¨å…„刑型"], -["fba1","形泂滎瀅ç炯熒ç©ç‘©èŠèž¢è¡¡é€ˆé‚¢éŽ£é¦¨å…®å½—æƒ æ…§æš³è•™è¹Šé†¯éž‹ä¹Žäº’å‘¼å£•å£ºå¥½å²µå¼§æˆ¶æ‰ˆæ˜Šæ™§æ¯«æµ©æ·æ¹–æ»¸æ¾”æ¿ æ¿©çç‹ç¥ç‘šç“ 皓祜糊縞胡芦葫蒿虎號è´è·è±ªéŽ¬é €é¡¥æƒ‘或酷婚æ˜æ··æ¸¾ç¿é‚忽惚ç¬å“„弘汞泓洪烘紅虹訌鴻化和嬅樺ç«ç•µ"], -["fca1","ç¦ç¦¾èŠ±è¯è©±è貨é´ï¨‹æ“´æ”«ç¢ºç¢»ç©«ä¸¸å–šå¥å®¦å¹»æ‚£æ›æ¡æ™¥æ¡“渙煥環紈還驩鰥活滑猾è±é—Šå‡°å¹Œå¾¨æ惶愰慌晃晄榥æ³æ¹Ÿæ»‰æ½¢ç…Œç’œçš‡ç¯ç°§è’è—é‘éšé»ƒåŒ¯å›žå»»å¾Šæ¢æ‚”懷晦會檜淮澮ç°çªç¹ªè†¾èŒ´è›”誨賄劃ç²å®–æ©«é„哮嚆å效斅曉梟æ¶æ·†"], -["fda1","爻肴酵é©ä¾¯å€™åŽšåŽå¼å–‰å—…帿後朽煦ç逅勛勳塤壎焄ç†ç‡»è–°è¨“暈薨喧暄煊è±å‰å–™æ¯å½™å¾½æ®æš‰ç…‡è«±è¼éº¾ä¼‘æºçƒ‹ç•¦è™§æ¤èŽé·¸å…‡å‡¶åŒˆæ´¶èƒ¸é»‘昕欣炘痕åƒå±¹ç´‡è¨–æ¬ æ¬½æ†å¸æ°æ´½ç¿•èˆˆåƒ–凞喜噫å›å§¬å¬‰å¸Œæ†™æ†˜æˆ±æ™žæ›¦ç†™ç†¹ç†ºçŠ§ç¦§ç¨€ç¾²è©°"] -] diff --git a/node_modules/iconv-lite/encodings/tables/cp950.json b/node_modules/iconv-lite/encodings/tables/cp950.json deleted file mode 100644 index d8bc87178dd38fca1829b9e2109c6f71e9721bdf..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/tables/cp950.json +++ /dev/null @@ -1,177 +0,0 @@ -[ -["0","\u0000",127], -["a140"," ,ã€ã€‚.‧;:?ï¼ï¸°â€¦â€¥ï¹ï¹‘﹒·﹔﹕﹖﹗|–︱—︳╴︴ï¹ï¼ˆï¼‰ï¸µï¸¶ï½›ï½ï¸·ï¸¸ã€”〕︹︺ã€ã€‘︻︼《》︽︾〈〉︿﹀「ã€ï¹ï¹‚『ã€ï¹ƒï¹„﹙﹚"], -["a1a1","﹛﹜ï¹ï¹žâ€˜â€™â€œâ€ã€ã€žâ€µâ€²ï¼ƒï¼†ï¼Šâ€»Â§ã€ƒâ—‹â—△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_Ë﹉﹊ï¹ï¹Žï¹‹ï¹Œï¹Ÿï¹ ﹡+ï¼Ã—÷±√<>ï¼â‰¦â‰§â‰ ∞≒≡﹢",4,"~∩∪⊥∠∟⊿ã’ã‘∫∮∵∴♀♂⊕⊙↑↓â†â†’↖↗↙↘∥∣ï¼"], -["a240","ï¼¼âˆ•ï¹¨ï¼„ï¿¥ã€’ï¿ ï¿¡ï¼…ï¼ â„ƒâ„‰ï¹©ï¹ªï¹«ã•ãŽœãŽãŽžãŽãŽ¡ãŽŽãŽã„°兙兛兞å…兡兣嗧瓩糎â–",7,"â–â–Žâ–▌▋▊▉┼┴┬┤├▔─│▕┌â”└┘â•"], -["a2a1","╮╰╯â•â•žâ•ªâ•¡â—¢â—£â—¥â—¤â•±â•²â•³ï¼",9,"â… ",9,"〡",8,"åå„å…A",25,"ï½",21], -["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ã„…",10], -["a3a1","ã„",25,"˙ˉˊˇˋ"], -["a3e1","€"], -["a440","一乙ä¸ä¸ƒä¹ƒä¹äº†äºŒäººå„¿å…¥å…«å‡ 刀åˆåŠ›åŒ•ååœåˆä¸‰ä¸‹ä¸ˆä¸Šä¸«ä¸¸å‡¡ä¹…么也乞于亡兀刃勺åƒå‰å£åœŸå£«å¤•å¤§å¥³åå‘å“寸å°å°¢å°¸å±±å·å·¥å·±å·²å·³å·¾å¹²å»¾å¼‹å¼“æ‰"], -["a4a1","丑ä¸ä¸ä¸ä¸°ä¸¹ä¹‹å°¹äºˆäº‘井互五亢ä»ä»€ä»ƒä»†ä»‡ä»ä»Šä»‹ä»„å…ƒå…å…§å…兮公冗凶分切刈勻勾勿化匹åˆå‡å…åžåŽ„å‹åŠå壬天夫太å¤å”å°‘å°¤å°ºå±¯å·´å¹»å»¿å¼”å¼•å¿ƒæˆˆæˆ¶æ‰‹æ‰Žæ”¯æ–‡æ–—æ–¤æ–¹æ—¥æ›°æœˆæœ¨æ¬ æ¢æ¹æ¯‹æ¯”毛æ°æ°´ç«çˆªçˆ¶çˆ»ç‰‡ç‰™ç‰›çŠ¬çŽ‹ä¸™"], -["a540","世丕且丘主ä¹ä¹ä¹Žä»¥ä»˜ä»”ä»•ä»–ä»—ä»£ä»¤ä»™ä»žå……å…„å†‰å†Šå†¬å‡¹å‡ºå‡¸åˆŠåŠ åŠŸåŒ…åŒ†åŒ—åŒä»ŸåŠå‰å¡å å¯å®åŽ»å¯å¤å³å¬å®å©å¨å¼å¸åµå«å¦åªå²å±å°å¥åå»å››å›šå¤–"], -["a5a1","央失奴奶å•å®ƒå°¼å·¨å·§å·¦å¸‚布平幼å¼å¼˜å¼—必戊打扔扒扑斥旦朮本未末æœæ£æ¯æ°‘æ°æ°¸æ±æ±€æ°¾çŠ¯çŽ„玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕ä¼ä¼ä¼‘ä¼ä»²ä»¶ä»»ä»°ä»³ä»½ä¼ä¼‹å…‰å…‡å…†å…ˆå…¨"], -["a640","å…±å†å†°åˆ—åˆ‘åˆ’åˆŽåˆ–åŠ£åŒˆåŒ¡åŒ å°å±å‰ååŒåŠååå‹å„å‘ååˆåƒåŽå†å’å› å›žå›åœ³åœ°åœ¨åœåœ¬åœ¯åœ©å¤™å¤šå¤·å¤¸å¦„奸妃好她如å¦å—å˜å®‡å®ˆå®…安寺尖屹州帆并年"], -["a6a1","å¼å¼›å¿™å¿–戎戌æˆæˆæ‰£æ‰›æ‰˜æ”¶æ—©æ—¨æ—¬æ—曲曳有朽朴朱朵次æ¤æ»æ°–æ±æ±—æ±™æ±Ÿæ± æ±æ±•æ±¡æ±›æ±æ±Žç°ç‰Ÿç‰ç™¾ç«¹ç±³ç³¸ç¼¶ç¾Šç¾½è€è€ƒè€Œè€’耳è¿è‚‰è‚‹è‚Œè‡£è‡ªè‡³è‡¼èˆŒèˆ›èˆŸè‰®è‰²è‰¾è™«è¡€è¡Œè¡£è¥¿é˜¡ä¸²äº¨ä½ä½ä½‡ä½—佞伴佛何估ä½ä½‘伽伺伸佃佔似但佣"], -["a740","ä½œä½ ä¼¯ä½Žä¼¶ä½™ä½ä½ˆä½šå…Œå…‹å…兵冶冷別判利刪刨劫助努劬匣å³åµåååžå¾å¦å‘Žå§å‘†å‘ƒå³å‘ˆå‘‚å›å©å‘Šå¹å»å¸å®åµå¶å å¼å‘€å±å«åŸå¬å›ªå›°å›¤å›«åŠå‘å€å"], -["a7a1","å‡åŽåœ¾åå圻壯夾å¦å¦’妨妞妣妙妖å¦å¦¤å¦“妊妥ååœåšå›å®Œå®‹å®å°¬å±€å±å°¿å°¾å²å²‘岔岌巫希åºåº‡åºŠå»·å¼„弟彤形彷役忘忌志å¿å¿±å¿«å¿¸å¿ªæˆ’我抄抗抖技扶抉æ‰æŠŠæ‰¼æ‰¾æ‰¹æ‰³æŠ’扯折扮投抓抑抆改攻攸旱更æŸæŽæææ‘æœæ–æžæ‰æ†æ "], -["a840","æ“æ—æ¥æ¯æ±‚汞沙æ²æ²ˆæ²‰æ²…沛汪決æ²æ±°æ²Œæ±¨æ²–沒汽沃汲汾汴沆汶æ²æ²”沘沂ç¶ç¼ç½ç¸ç‰¢ç‰¡ç‰ 狄狂玖甬甫男甸皂盯矣ç§ç§€ç¦¿ç©¶ç³»ç½•è‚–è‚“è‚肘肛肚育良芒"], -["a8a1","芋èŠè¦‹è§’言谷豆豕è²èµ¤èµ°è¶³èº«è»Šè¾›è¾°è¿‚迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯ä¾ä¾ä½³ä½¿ä½¬ä¾›ä¾‹ä¾†ä¾ƒä½°ä½µä¾ˆä½©ä½»ä¾–ä½¾ä¾ä¾‘佺兔兒兕兩具其典冽函刻券刷刺到刮制å‰åŠ¾åŠ»å’å”å“å‘å¦å·å¸å¹å–å”å—味呵"], -["a940","咖呸咕咀呻呷咄咒咆呼å’呱呶和咚呢周咋命咎固垃å·åªå©å¡å¦å¤å¼å¤œå¥‰å¥‡å¥ˆå¥„奔妾妻委妹妮姑姆å§å§å§‹å§“姊妯妳姒姅åŸå¤å£å®—定官宜宙宛尚屈居"], -["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往å¾å½¿å½¼å¿å¿ 忽念忿æ€æ€”怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押æ‹æ‹™æ‹‡æ‹æŠµæ‹šæŠ±æ‹˜æ‹–拗拆抬拎放斧於旺昔易昌昆昂明昀æ˜æ˜•æ˜Š"], -["aa40","昇æœæœ‹ææž‹æž•æ±æžœæ³æ·æž‡æžæž—æ¯æ°æ¿æž‰æ¾æžæµæžšæž“æ¼æªæ²æ¬£æ¦æ§æ¿æ°“氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油æ³æ²®æ³—æ³…æ³±æ²¿æ²»æ³¡æ³›æ³Šæ²¬æ³¯æ³œæ³–æ³ "], -["aaa1","炕炎炒炊炙爬çˆçˆ¸ç‰ˆç‰§ç‰©ç‹€ç‹Žç‹™ç‹—ç‹çŽ©çŽ¨çŽŸçŽ«çŽ¥ç”½ç–疙疚的盂盲直知矽社祀ç¥ç§‰ç§ˆç©ºç©¹ç«ºç³¾ç½”羌羋者肺肥肢肱股肫肩肴肪肯臥臾èˆèŠ³èŠèŠ™èŠèŠ½èŠŸèŠ¹èŠ±èŠ¬èŠ¥èŠ¯èŠ¸èŠ£èŠ°èŠ¾èŠ·è™Žè™±åˆè¡¨è»‹è¿Žè¿”近邵邸邱邶采金長門阜陀阿阻附"], -["ab40","陂隹雨é’éžäºŸäºäº®ä¿¡ä¾µä¾¯ä¾¿ä¿ ä¿‘ä¿ä¿ä¿ƒä¾¶ä¿˜ä¿Ÿä¿Šä¿—ä¾®ä¿ä¿„ä¿‚ä¿šä¿Žä¿žä¾·å…—å†’å†‘å† å‰Žå‰ƒå‰Šå‰å‰Œå‰‹å‰‡å‹‡å‹‰å‹ƒå‹åŒå—å»åŽšå›å’¬å“€å’¨å“Žå“‰å’¸å’¦å’³å“‡å“‚咽咪å“"], -["aba1","å“„å“ˆå’¯å’«å’±å’»å’©å’§å’¿å›¿åž‚åž‹åž åž£åž¢åŸŽåž®åž“å¥•å¥‘å¥å¥Žå¥å§œå§˜å§¿å§£å§¨å¨ƒå§¥å§ªå§šå§¦å¨å§»å©å®£å®¦å®¤å®¢å®¥å°å±Žå±å±å±‹å³™å³’å··å¸å¸¥å¸Ÿå¹½åº 度建弈å¼å½¥å¾ˆå¾…徊律徇後徉怒æ€æ€ 急怎怨ææ°æ¨æ¢æ†æƒæ¬æ«æªæ¤æ‰æ‹œæŒ–按拼æ‹æŒæ‹®æ‹½æŒ‡æ‹±æ‹·"], -["ac40","拯括拾拴挑挂政故斫施既春æ˜æ˜ 昧是星昨昱昤曷柿染柱柔æŸæŸ¬æž¶æž¯æŸµæŸ©æŸ¯æŸ„柑枴柚查枸æŸæŸžæŸ³æž°æŸ™æŸ¢æŸæŸ’æªæ®ƒæ®†æ®µæ¯’毗氟泉洋洲洪æµæ´¥æ´Œæ´±æ´žæ´—"], -["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯ç‚ç‚¸ç‚®ç‚¤çˆ°ç‰²ç‰¯ç‰´ç‹©ç‹ ç‹¡çŽ·çŠçŽ»çŽ²çç€çŽ³ç”šç”ç•ç•Œç•Žç•‹ç–«ç–¤ç–¥ç–¢ç–£ç™¸çš†çš‡çšˆç›ˆç›†ç›ƒç›…çœç›¹ç›¸çœ‰çœ‹ç›¾ç›¼çœ‡çŸœç ‚ç ”ç Œç 祆祉祈祇禹禺科秒秋穿çªç«¿ç«½ç±½ç´‚紅紀紉紇約紆缸美羿耄"], -["ad40","è€è€è€‘耶胖胥胚胃胄背胡胛胎胞胤èƒè‡´èˆ¢è‹§èŒƒèŒ…苣苛苦茄若茂茉苒苗英èŒè‹œè‹”苑苞苓苟苯茆è™è™¹è™»è™ºè¡è¡«è¦è§”è¨ˆè¨‚è¨ƒè²žè² èµ´èµ³è¶´è»è»Œè¿°è¿¦è¿¢è¿ªè¿¥"], -["ada1","è¿è¿«è¿¤è¿¨éƒŠéƒŽéƒéƒƒé…‹é…Šé‡é–‚é™é™‹é™Œé™é¢é©éŸ‹éŸéŸ³é 風飛食首香乘亳倌å€å€£ä¿¯å€¦å€¥ä¿¸å€©å€–倆值借倚倒們俺倀倔倨俱倡個候倘俳修å€å€ªä¿¾å€«å€‰å…¼å†¤å†¥å†¢å‡å‡Œå‡†å‡‹å‰–剜剔剛å‰åŒªå¿åŽŸåŽåŸå“¨å”å”唷哼哥哲唆哺唔哩å“員唉哮哪"], -["ae40","哦唧唇哽å”åœƒåœ„åŸ‚åŸ”åŸ‹åŸƒå ‰å¤å¥—å¥˜å¥šå¨‘å¨˜å¨œå¨Ÿå¨›å¨“å§¬å¨ å¨£å¨©å¨¥å¨Œå¨‰å«å±˜å®°å®³å®¶å®´å®®å®µå®¹å®¸å°„屑展å±å³å³½å³»å³ªå³¨å³°å³¶å´å³´å·®å¸å¸«åº«åºåº§å¼±å¾’徑å¾æ™"], -["aea1","æ£æ¥ææ•ææ©æ¯æ‚„æ‚Ÿæ‚šæ‚悔悌悅悖扇拳挈拿æŽæŒ¾æŒ¯æ•æ‚æ†ææ‰æŒºæ挽挪挫挨ææŒæ•ˆæ•‰æ–™æ—旅時晉æ™æ™ƒæ™’晌晅æ™æ›¸æœ”æœ•æœ—æ ¡æ ¸æ¡ˆæ¡†æ¡“æ ¹æ¡‚æ¡”æ ©æ¢³æ —æ¡Œæ¡‘æ ½æŸ´æ¡æ¡€æ ¼æ¡ƒæ ªæ¡…æ “æ ˜æ¡æ®Šæ®‰æ®·æ°£æ°§æ°¨æ°¦æ°¤æ³°æµªæ¶•æ¶ˆæ¶‡æµ¦æµ¸æµ·æµ™æ¶“"], -["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈çƒçˆ¹ç‰¹ç‹¼ç‹¹ç‹½ç‹¸ç‹·çŽ†çç‰ç®ç çªçžç•”ç•ç•œç•šç•™ç–¾ç—…症疲疳疽疼疹痂疸皋皰益ç›ç›Žçœ©çœŸçœ çœ¨çŸ©ç °ç §ç ¸ç ç ´ç ·"], -["afa1","ç ¥ç ç ç Ÿç ²ç¥•ç¥ç¥ 祟祖神ç¥ç¥—ç¥šç§¤ç§£ç§§ç§Ÿç§¦ç§©ç§˜çª„çªˆç«™ç¬†ç¬‘ç²‰ç´¡ç´—ç´‹ç´Šç´ ç´¢ç´”ç´ç´•ç´šç´œç´ç´™ç´›ç¼ºç½Ÿç¾”ç¿…ç¿è€†è€˜è€•è€™è€—耽耿胱脂胰脅èƒèƒ´è„†èƒ¸èƒ³è„ˆèƒ½è„Šèƒ¼èƒ¯è‡è‡¬èˆ€èˆèˆªèˆ«èˆ¨èˆ¬èŠ»èŒ«è’è”èŠèŒ¸èè‰èŒµèŒ´è茲茹茶茗è€èŒ±èŒ¨èƒ"], -["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷è¢è¢‚衽衹記è¨è¨Žè¨Œè¨•è¨Šè¨—訓訖è¨è¨‘豈豺豹財貢起躬軒軔è»è¾±é€é€†è¿·é€€è¿ºè¿´é€ƒè¿½é€…迸邕郡éƒéƒ¢é…’é…酌釘é‡é‡—釜釙閃院陣陡"], -["b0a1","é™›é™é™¤é™˜é™žéš»é£¢é¦¬éª¨é«˜é¬¥é¬²é¬¼ä¹¾åºå½åœå‡åƒåŒåšå‰å¥å¶åŽå•åµå´å·åå€å¯å兜冕凰剪副勒務勘動åŒåŒåŒ™åŒ¿å€åŒ¾åƒæ›¼å•†å•ªå•¦å•„啞啡啃啊唱啖å•å••å”¯å•¤å”¸å”®å•œå”¬å•£å”³å•å•—åœˆåœ‹åœ‰åŸŸå …å Šå †åŸ åŸ¤åŸºå ‚å µåŸ·åŸ¹å¤ å¥¢å¨¶å©å©‰å©¦å©ªå©€"], -["b140","娼婢婚婆婊å°å¯‡å¯…å¯„å¯‚å®¿å¯†å°‰å°ˆå°‡å± å±œå±å´‡å´†å´Žå´›å´–å´¢å´‘å´©å´”å´™å´¤å´§å´—å·¢å¸¸å¸¶å¸³å¸·åº·åº¸åº¶åºµåº¾å¼µå¼·å½—å½¬å½©å½«å¾—å¾™å¾žå¾˜å¾¡å¾ å¾œæ¿æ‚£æ‚‰æ‚ 您惋悴惦悽"], -["b1a1","æƒ…æ‚»æ‚µæƒœæ‚¼æƒ˜æƒ•æƒ†æƒŸæ‚¸æƒšæƒ‡æˆšæˆ›æ‰ˆæŽ æŽ§æ²æŽ–探接æ·æ§æŽ˜æŽªæ±æŽ©æŽ‰æŽƒæŽ›æ«æŽ¨æŽ„授掙採掬排æŽæŽ€æ»æ©æ¨æºæ•æ•–救教敗啟æ•æ•˜æ••æ•”斜斛斬æ—旋旌旎æ™æ™šæ™¤æ™¨æ™¦æ™žæ›¹å‹—望æ¢æ¢¯æ¢¢æ¢“梵桿桶梱梧梗械梃棄æ¢æ¢†æ¢…梔æ¢æ¢¨æ¢Ÿæ¢¡æ¢‚欲殺"], -["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽çŠçŒœçŒ›çŒ–猓猙率ç…çŠçƒç†ç¾çç“ ç“¶"], -["b2a1","瓷甜產略畦畢異ç–痔痕疵痊ç—皎盔盒盛眷眾眼眶眸眺硫硃硎祥票ç¥ç§»çª’çª•ç¬ ç¬¨ç¬›ç¬¬ç¬¦ç¬™ç¬žç¬®ç²’ç²—ç²•çµ†çµƒçµ±ç´®ç´¹ç´¼çµ€ç´°ç´³çµ„ç´¯çµ‚ç´²ç´±ç¼½ç¾žç¾šç¿Œç¿Žç¿’è€œèŠè†è„¯è„–脣脫脩脰脤舂舵舷舶船莎莞莘è¸èŽ¢èŽ–èŽ½èŽ«èŽ’èŽŠèŽ“èŽ‰èŽ è·è»è¼"], -["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖è¢è¢‹è¦“è¦è¨ªè¨è¨£è¨¥è¨±è¨è¨Ÿè¨›è¨¢è±‰è±šè²©è²¬è²«è²¨è²ªè²§èµ§èµ¦è¶¾è¶ºè»›è»Ÿé€™é€é€šé€—連速é€é€é€•é€žé€ é€é€¢é€–逛途"], -["b3a1","部éƒéƒ½é…—野釵釦釣釧é‡é‡©é–‰é™ªé™µé™³é™¸é™°é™´é™¶é™·é™¬é›€é›ªé›©ç« ç«Ÿé ‚é ƒéšé³¥é¹µé¹¿éº¥éº»å‚¢å‚傅備傑傀傖傘傚最凱割剴創剩勞å‹å‹›åšåŽ¥å•»å–€å–§å•¼å–Šå–喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙åœå ¯å ªå ´å ¤å °å ±å ¡å å å£¹å£ºå¥ "], -["b440","婷媚婿媒媛媧å³å±å¯’富寓å¯å°Šå°‹å°±åµŒåµå´´åµ‡å·½å¹…帽幀幃幾廊å»å»‚廄弼å½å¾©å¾ªå¾¨æƒ‘æƒ¡æ‚²æ‚¶æƒ æ„œæ„£æƒºæ„•æƒ°æƒ»æƒ´æ…¨æƒ±æ„Žæƒ¶æ„‰æ„€æ„’æˆŸæ‰‰æŽ£æŽŒææ€æ©æ‰æ†æ"], -["b4a1","æ’æ£ææ¡æ–ææ®æ¶æ´æªæ›æ‘’æšæ¹æ•žæ•¦æ•¢æ•£æ–‘æ–斯普晰晴晶景暑智晾晷曾替期æœæ£ºæ£•æ£ 棘棗椅棟棵森棧棹棒棲棣棋æ£æ¤æ¤’æ¤Žæ£‰æ£šæ¥®æ£»æ¬¾æ¬ºæ¬½æ®˜æ®–æ®¼æ¯¯æ°®æ°¯æ°¬æ¸¯æ¸¸æ¹”æ¸¡æ¸²æ¹§æ¹Šæ¸ æ¸¥æ¸£æ¸›æ¹›æ¹˜æ¸¤æ¹–æ¹®æ¸æ¸¦æ¹¯æ¸´æ¹æ¸ºæ¸¬æ¹ƒæ¸æ¸¾æ»‹"], -["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩çºçªç³ç¢ç¥çµç¶ç´ç¯ç›ç¦ç¨ç”¥ç”¦ç•«ç•ªç—¢ç—›ç—£ç—™ç—˜ç—žç— 登發皖皓皴盜ççŸç¡ç¡¬ç¡¯ç¨ç¨ˆç¨‹ç¨…稀窘"], -["b5a1","窗窖童竣ç‰ç–ç†çç’ç”çç‹çç‘粟粥絞çµçµ¨çµ•ç´«çµ®çµ²çµ¡çµ¦çµ¢çµ°çµ³å–„翔翕耋è’肅腕腔腋腑腎脹腆脾腌腓腴舒舜è©èƒè¸èè è…è‹èè¯è±è´è‘—èŠè°èŒèŒè½è²èŠè¸èŽè„èœè‡è”èŸè™›è›Ÿè›™è›è›”蛛蛤è›è›žè¡—è£è£‚è¢±è¦ƒè¦–è¨»è© è©•è©žè¨¼è©"], -["b640","詔詛è©è©†è¨´è¨ºè¨¶è©–象貂貯貼貳貽è³è²»è³€è²´è²·è²¶è²¿è²¸è¶Šè¶…è¶è·Žè·è·‹è·šè·‘跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥é‡éˆ”鈕鈣鈉鈞éˆéˆéˆ‡éˆ‘é–”é–é–‹é–‘"], -["b6a1","間閒閎隊階隋陽隅隆éšé™²éš„é›é›…é›„é›†é›‡é›¯é›²éŸŒé …é †é ˆé£§é£ªé£¯é£©é£²é£é¦®é¦é»ƒé»é»‘亂å‚債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌å¡å¡Šå¡¢å¡’塋奧å«å«‰å«Œåª¾åª½åª¼"], -["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚æ„慈感想愛惹æ„愈慎慌慄æ…愾愴愧æ„愆愷戡戢æ“æ¾æžæªææ½æ¬ææœæ”ææ¶æ–æ—æ†æ•¬æ–Ÿæ–°æš—暉暇暈暖暄暘æšæœƒæ¦”æ¥"], -["b7a1","æ¥šæ¥·æ¥ æ¥”æ¥µæ¤°æ¦‚æ¥Šæ¥¨æ¥«æ¥žæ¥“æ¥¹æ¦†æ¥æ¥£æ¥›æ‡æ²æ¯€æ®¿æ¯“毽溢溯滓溶滂æºæºæ»‡æ»…溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷ç…猿猾瑯瑚瑕瑟瑞ç‘ç¿ç‘™ç‘›ç‘œç•¶ç•¸ç˜€ç—°ç˜ç—²ç—±ç—ºç—¿ç—´ç—³ç›žç›Ÿç›ç«ç¦çžç£"], -["b840","ç¹çªç¬çœç¥ç¨ç¢çŸ®ç¢Žç¢°ç¢—碘碌碉硼碑碓硿祺祿ç¦è¬ç¦½ç¨œç¨šç¨ ç¨”ç¨Ÿç¨žçªŸçª ç·ç¯€ç ç®ç§ç²±ç²³ç²µç¶“絹綑ç¶ç¶çµ›ç½®ç½©ç½ªç½²ç¾©ç¾¨ç¾¤è–è˜è‚†è‚„腱腰腸腥腮腳腫"], -["b8a1","腹腺腦舅艇蒂葷è½è±è‘µè‘¦è‘«è‘‰è‘¬è‘›è¼èµè‘¡è‘£è‘©è‘葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘è£è£¡è£Šè£•è£’è¦œè§£è©«è©²è©³è©¦è©©è©°èª‡è©¼è©£èª è©±èª…è©è©¢è©®è©¬è©¹è©»è¨¾è©¨è±¢è²Šè²‰è³Šè³‡è³ˆè³„貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"], -["b940","辟農é‹éŠé“é‚é”逼é•éé‡ééŽéé‘逾é鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉é‰é‰…鈹鈿鉚閘隘隔隕é›é›‹é›‰é›Šé›·é›»é›¹é›¶é–é´é¶é é ‘é “é Šé ’é Œé£¼é£´"], -["b9a1","é£½é£¾é¦³é¦±é¦´é«¡é³©éº‚é¼Žé¼“é¼ åƒ§åƒ®åƒ¥åƒ–åƒåƒšåƒ•åƒåƒ‘僱僎僩兢凳劃劂匱åŽå—¾å˜€å˜›å˜—嗽嘔嘆嘉å˜å˜Žå—·å˜–嘟嘈å˜å—¶åœ˜åœ–塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣åµå¯žå¯§å¯¡å¯¥å¯¦å¯¨å¯¢å¯¤å¯Ÿå°å±¢å¶„嶇幛幣幕幗幔廓廖弊彆彰徹慇"], -["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧æ´æ‘摻敲斡旗旖暢暨æšæ¦œæ¦¨æ¦•æ§æ¦®æ§“構榛榷榻榫榴æ§æ§æ¦æ§Œæ¦¦æ§ƒæ¦£æ‰æŒæ°³æ¼³æ¼”æ»¾æ¼“æ»´æ¼©æ¼¾æ¼ æ¼¬æ¼æ¼‚æ¼¢"], -["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬æ¼æ»²æ»Œæ»·ç†”熙煽熊熄熒爾犒犖ç„ç瑤瑣瑪瑰ç‘甄疑瘧ç˜ç˜‹ç˜‰ç˜“盡監瞄ç½ç¿ç¡ç£ç¢Ÿç¢§ç¢³ç¢©ç¢£ç¦Žç¦ç¦ç¨®ç¨±çªªçª©ç«ç«¯ç®¡ç®•ç®‹çµç®—ç®ç®”ç®ç®¸ç®‡ç®„ç²¹ç²½ç²¾ç¶»ç¶°ç¶œç¶½ç¶¾ç¶ ç·Šç¶´ç¶²ç¶±ç¶ºç¶¢ç¶¿ç¶µç¶¸ç¶ç·’緇綬"], -["bb40","ç½°ç¿ ç¿¡ç¿Ÿèžèšè‚‡è…膀è†è†ˆè†Šè…¿è†‚臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓è’蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘è•èœ·èœ©è£³è¤‚裴裹裸製裨褚裯誦誌語誣èªèª¡èª“誤"], -["bba1","說誥誨誘誑誚誧豪è²è²Œè³“賑賒赫趙趕跼輔輒輕輓辣é é˜éœé£é™éžé¢éé›é„™é„˜é„žé…µé…¸é…·é…´é‰¸éŠ€éŠ…銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需é¼éž…éŸ¶é —é ˜é¢¯é¢±é¤ƒé¤…é¤Œé¤‰é§éª¯éª°é«¦éé‚鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"], -["bc40","劇劈劉åŠåŠŠå‹°åŽ²å˜®å˜»å˜¹å˜²å˜¿å˜´å˜©å™“噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦å¥å¬‰å«»å¬‹å«µå¬Œå¬ˆå¯®å¯¬å¯©å¯«å±¤å±¥å¶å¶”幢幟幡廢廚廟å»å»£å» 彈影德徵慶慧慮æ…慕憂"], -["bca1","慼慰慫慾憧æ†æ†«æ†Žæ†¬æ†šæ†¤æ†”憮戮摩摯摹撞撲撈æ’撰撥撓撕撩撒撮æ’撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨æ¨æ¨žæ¨™æ§½æ¨¡æ¨“樊槳樂樅æ§æ¨‘ææŽæ®¤æ¯…毆漿潼澄潑潦潔澆æ½æ½›æ½¸æ½®æ¾Žæ½ºæ½°æ½¤æ¾—æ½˜æ»•æ½¯æ½ æ½Ÿç†Ÿç†¬ç†±ç†¨ç‰–çŠ›çŽç—ç‘©ç’‹ç’ƒ"], -["bd40","ç‘¾ç’€ç•¿ç˜ ç˜©ç˜Ÿç˜¤ç˜¦ç˜¡ç˜¢çššçšºç›¤çžŽçž‡çžŒçž‘çž‹ç£‹ç£…ç¢ºç£Šç¢¾ç£•ç¢¼ç£ç¨¿ç¨¼ç©€ç¨½ç¨·ç¨»çª¯çª®ç®ç®±ç¯„箴篆篇ç¯ç® ç¯Œç³Šç· ç·´ç·¯ç·»ç·˜ç·¬ç·ç·¨ç·£ç·šç·žç·©ç¶žç·™ç·²ç·¹ç½µç½·ç¾¯"], -["bda1","翩耦膛膜è†è† 膚膘蔗蔽蔚蓮蔬è”蔓蔑蔣蔡蔔蓬蔥蓿蔆螂è´è¶è è¦è¸è¨è™è—èŒè“è¡›è¡è¤è¤‡è¤’褓褕褊誼諒談諄誕請諸課諉諂調誰論è«èª¶èª¹è«›è±Œè±Žè±¬è³ 賞賦賤賬è³è³¢è³£è³œè³ªè³¡èµè¶Ÿè¶£è¸«è¸è¸è¸¢è¸è¸©è¸Ÿè¸¡è¸žèººè¼è¼›è¼Ÿè¼©è¼¦è¼ªè¼œè¼ž"], -["be40","è¼¥é©é®é¨éé·é„°é„鄧鄱醇醉醋醃鋅銻銷鋪銬鋤é‹éŠ³éŠ¼é‹’鋇鋰銲é–閱霄霆震霉é éžéž‹éžé ¡é «é œé¢³é¤Šé¤“餒餘é§é§é§Ÿé§›é§‘駕駒駙骷髮髯鬧é…é„é·é¯é´†é´‰"], -["bea1","鴃麩麾黎墨齒儒儘儔å„儕冀冪å‡åŠ‘劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶å£å¢¾å£‡å£…奮å¬å¬´å¸å¯°å°Žå½Šæ†²æ†‘憩憊æ‡æ†¶æ†¾æ‡Šæ‡ˆæˆ°æ“…æ“擋撻撼據擄擇擂æ“撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈æ™æ·æ°…濂澱澡"], -["bf40","濃澤æ¿æ¾§æ¾³æ¿€æ¾¹æ¾¶æ¾¦æ¾ 澴熾燉ç‡ç‡’燈燕熹燎燙燜燃燄ç¨ç’œç’£ç’˜ç’Ÿç’žç“¢ç”Œç”ç˜´ç˜¸ç˜ºç›§ç›¥çž çžžçžŸçž¥ç£¨ç£šç£¬ç£§ç¦¦ç©ç©Žç©†ç©Œç©‹çªºç¯™ç°‘築篤篛篡篩篦糕糖縊"], -["bfa1","縑縈縛縣縞ç¸ç¸‰ç¸ç½¹ç¾²ç¿°ç¿±ç¿®è€¨è†³è†©è†¨è‡»èˆˆè‰˜è‰™è•Šè•™è•ˆè•¨è•©è•ƒè•‰è•è•ªè•žèžƒèžŸèžžèž¢èžè¡¡è¤ªè¤²è¤¥è¤«è¤¡è¦ªè¦¦è«¦è«ºè««è«±è¬€è«œè«§è«®è«¾è¬è¬‚è«·è«è«³è«¶è«¼è±«è±è²“賴蹄踱踴蹂踹踵輻輯輸輳辨辦éµé´é¸é²é¼éºé„´é†’éŒ éŒ¶é‹¸éŒ³éŒ¯éŒ¢é‹¼éŒ«éŒ„éŒš"], -["c040","éŒéŒ¦éŒ¡éŒ•éŒ®éŒ™é–»éš§éš¨éšªé›•éœŽéœ‘霖éœéœ“éœé›éœé¦éž˜é °é ¸é »é ·é é ¹é ¤é¤é¤¨é¤žé¤›é¤¡é¤šé§é§¢é§±éª¸éª¼é«»é«é¬¨é®‘鴕鴣鴦鴨鴒鴛默黔é¾é¾œå„ªå„Ÿå„¡å„²å‹µåšŽåš€åšåš…嚇"], -["c0a1","åšå£•å£“壑壎嬰嬪嬤åºå°·å±¨å¶¼å¶ºå¶½å¶¸å¹«å½Œå¾½æ‡‰æ‡‚æ‡‡æ‡¦æ‡‹æˆ²æˆ´æ“Žæ“Šæ“˜æ“ æ“°æ“¦æ“¬æ“±æ“¢æ“斂斃曙曖檀檔檄檢檜櫛檣橾檗æªæª æœæ®®æ¯šæ°ˆæ¿˜æ¿±æ¿Ÿæ¿ 濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥ç‡ç‡¬ç‡´ç‡ 爵牆ç°ç²ç’©ç’°ç’¦ç’¨ç™†ç™‚癌盪瞳瞪瞰瞬"], -["c140","瞧çžçŸ¯ç£·ç£ºç£´ç£¯ç¤ç¦§ç¦ªç©—窿簇ç°ç¯¾ç¯·ç°Œç¯ ç³ ç³œç³žç³¢ç³Ÿç³™ç³ç¸®ç¸¾ç¹†ç¸·ç¸²ç¹ƒç¸«ç¸½ç¸±ç¹…ç¹ç¸´ç¸¹ç¹ˆç¸µç¸¿ç¸¯ç½„翳翼è±è²è°è¯è³è‡†è‡ƒè†ºè‡‚臀膿膽臉膾臨舉艱薪"], -["c1a1","è–„è•¾è–œè–‘è–”è–¯è–›è–‡è–¨è–Šè™§èŸ€èŸ‘èž³èŸ’èŸ†èž«èž»èžºèŸˆèŸ‹è¤»è¤¶è¥„è¤¸è¤½è¦¬è¬Žè¬—è¬™è¬›è¬Šè¬ è¬è¬„è¬è±è°¿è±³è³ºè³½è³¼è³¸è³»è¶¨è¹‰è¹‹è¹ˆè¹Šè½„輾轂轅輿é¿é½é‚„é‚邂邀鄹醣醞醜é鎂錨éµéŠé¥é‹éŒ˜é¾é¬é›é°éšé”é—Šé—‹é—Œé—ˆé—†éš±éš¸é›–éœœéœžéž éŸ“é¡†é¢¶é¤µé¨"], -["c240","駿鮮鮫鮪é®é´»é´¿éº‹é»é»žé»œé»é»›é¼¾é½‹å¢åš•åš®å£™å£˜å¬¸å½æ‡£æˆ³æ“´æ“²æ“¾æ”†æ“ºæ“»æ“·æ–·æ›œæœ¦æª³æª¬æ«ƒæª»æª¸æ«‚檮檯æŸæ¸æ®¯ç€‰ç€‹æ¿¾ç€†æ¿ºç€‘ç€ç‡»ç‡¼ç‡¾ç‡¸ç·çµç’§ç’¿ç”•ç™–癘"], -["c2a1","ç™’çž½çž¿çž»çž¼ç¤Žç¦®ç©¡ç©¢ç© ç«„ç«…ç°«ç°§ç°ªç°žç°£ç°¡ç³§ç¹”ç¹•ç¹žç¹šç¹¡ç¹’ç¹™ç½ˆç¿¹ç¿»è·è¶è‡è‡èˆŠè—è–©è—è—è—‰è–°è–ºè–¹è–¦èŸ¯èŸ¬èŸ²èŸ è¦†è¦²è§´è¬¨è¬¹è¬¬è¬«è±è´…蹙蹣蹦蹤蹟蹕軀轉è½é‚‡é‚ƒé‚ˆé†«é†¬é‡éŽ”鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖é—闕離雜雙雛雞霤鞣鞦"], -["c340","éžéŸ¹é¡é¡é¡Œé¡Žé¡“颺餾餿餽餮馥騎é«é¬ƒé¬†ééŽé鯊鯉鯽鯈鯀鵑éµéµ é» é¼•é¼¬å„³åš¥å£žå£Ÿå£¢å¯µé¾å»¬æ‡²æ‡·æ‡¶æ‡µæ”€æ”æ› æ›æ«¥æ«æ«šæ«“瀛瀟瀨瀚ç€ç€•ç€˜çˆ†çˆç‰˜çŠ¢ç¸"], -["c3a1","çºç’½ç“Šç“£ç–‡ç–†ç™Ÿç™¡çŸ‡ç¤™ç¦±ç©«ç©©ç°¾ç°¿ç°¸ç°½ç°·ç±€ç¹«ç¹ç¹¹ç¹©ç¹ªç¾…繳羶羹羸臘藩è—è—ªè—•è—¤è—¥è—·èŸ»è …è èŸ¹èŸ¾è¥ è¥Ÿè¥–è¥žèèœè˜è‰èšèŽèè†è™è´ˆè´Šè¹¼è¹²èº‡è¹¶è¹¬è¹ºè¹´è½”轎è¾é‚Šé‚‹é†±é†®é¡é‘éŸéƒéˆéœéé–é¢éé˜é¤é—é¨é—œéš´é›£éœªéœ§é¡éŸœéŸ»é¡ž"], -["c440","願顛颼饅饉騖騙é¬é¯¨é¯§é¯–鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤å€åƒå½å¯¶å·‰æ‡¸æ‡ºæ”˜æ””攙曦朧櫬瀾瀰瀲çˆç»ç“癢癥礦礪礬礫竇競籌籃ç±ç³¯ç³°è¾®ç¹½ç¹¼"], -["c4a1","çº‚ç½Œè€€è‡šè‰¦è—»è—¹è˜‘è—ºè˜†è˜‹è˜‡è˜Šè ”è •è¥¤è¦ºè§¸è°è¬è¦è¯èŸè«è´è´èº‰èºèº…躂醴釋é˜éƒé½é—¡éœ°é£„饒饑馨騫騰騷騵鰓é°é¹¹éºµé»¨é¼¯é½Ÿé½£é½¡å„·å„¸å›å›€å›‚夔屬å·æ‡¼æ‡¾æ”攜斕曩櫻欄櫺殲çŒçˆ›çŠ§ç“–瓔癩矓ç±çºçºŒç¾¼è˜—è˜è˜šè £è ¢è ¡è Ÿè¥ªè¥¬è¦½è´"], -["c540","è·è½è´“躊èºèº‹è½Ÿè¾¯é†ºé®é³éµéºé¸é²é«é—¢éœ¸éœ¹éœ²éŸ¿é¡§é¡¥é¥—驅驃驀騾é«é”é‘é°é°¥é¶¯é¶´é·‚鶸éºé»¯é¼™é½œé½¦é½§å„¼å„»å›ˆå›Šå›‰å¿å·”巒彎懿攤權æ¡ç‘ç˜çŽ€ç“¤ç–Šç™®ç™¬"], -["c5a1","ç¦³ç± ç±Ÿè¾è½è‡Ÿè¥²è¥¯è§¼è®€è´–贗躑躓轡酈鑄鑑鑒霽霾韃éŸé¡«é¥•é©•é©é«’鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬æ¬ç“šç«Šç±¤ç±£ç±¥çº“çº–çº”è‡¢è˜¸è˜¿è ±è®Šé‚é‚é‘£é‘ é‘¤é¨é¡¯é¥œé©šé©›é©—髓體髑鱔鱗鱖鷥麟黴囑壩攬çžç™±ç™²çŸ—ç½ç¾ˆè ¶è ¹è¡¢è®“è®’"], -["c640","讖艷贛釀鑪é‚éˆé„韆顰驟鬢é˜é±Ÿé·¹é·ºé¹¼é¹½é¼‡é½·é½²å»³æ¬–ç£ç±¬ç±®è »è§€èº¡é‡é‘²é‘°é¡±é¥žé«–鬣黌ç¤çŸšè®šé‘·éŸ‰é©¢é©¥çºœè®œèºªé‡…鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"], -["c940","乂乜凵匚厂万丌乇äºå›—兀屮彳ä¸å†‡ä¸Žä¸®äº“仂仉仈冘勼å¬åŽ¹åœ 夃夬å°å·¿æ—¡æ®³æ¯Œæ°”爿丱丼仨仜仩仡ä»ä»šåˆŒåŒœåŒåœ¢åœ£å¤—夯å®å®„尒尻屴屳帄庀庂忉戉æ‰æ°•"], -["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈ä¼ä¼‚伅伢伓伄仴伒冱刓刉åˆåŠ¦åŒ¢åŒŸå厊å‡å›¡å›Ÿåœ®åœªåœ´å¤¼å¦€å¥¼å¦…奻奾奷奿å–尕尥屼屺屻屾巟幵庄异弚彴忕忔å¿æ‰œæ‰žæ‰¤æ‰¡æ‰¦æ‰¢æ‰™æ‰ 扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜æ±æ±Šæ±”汋"], -["ca40","汌ç±ç‰žçŠ´çŠµçŽŽç”ªç™¿ç©µç½‘艸艼芀艽艿è™è¥¾é‚™é‚—é‚˜é‚›é‚”é˜¢é˜¤é˜ é˜£ä½–ä¼»ä½¢ä½‰ä½“ä½¤ä¼¾ä½§ä½’ä½Ÿä½ä½˜ä¼ä¼³ä¼¿ä½¡å†å†¹åˆœåˆžåˆ¡åŠåŠ®åŒ‰å£å²åŽŽåŽå°å·åªå‘”å‘…å™åœå¥å˜"], -["caa1","å½å‘å‘å¨å¤å‘‡å›®å›§å›¥åå…åŒå‰å‹å’å¤†å¥€å¦¦å¦˜å¦ å¦—å¦Žå¦¢å¦å¦å¦§å¦¡å®Žå®’尨尪å²å²å²ˆå²‹å²‰å²’å²Šå²†å²“å²•å· å¸Šå¸Žåº‹åº‰åºŒåºˆåºå¼…å¼å½¸å½¶å¿’å¿‘å¿å¿å¿¨å¿®å¿³å¿¡å¿¤å¿£å¿ºå¿¯å¿·å¿»æ€€å¿´æˆºæŠƒæŠŒæŠŽæŠæŠ”抇扱扻扺扰æŠæŠˆæ‰·æ‰½æ‰²æ‰´æ”·æ—°æ—´æ—³æ—²æ—µæ…æ‡"], -["cb40","æ™æ•æŒæˆæææšæ‹æ¯æ°™æ°šæ±¸æ±§æ±«æ²„沋æ²æ±±æ±¯æ±©æ²šæ±æ²‡æ²•æ²œæ±¦æ±³æ±¥æ±»æ²Žç´çºç‰£çŠ¿çŠ½ç‹ƒç‹†ç‹çŠºç‹…玕玗玓玔玒町甹疔疕çšç¤½è€´è‚•è‚™è‚è‚’è‚œèŠèŠèŠ…芎芑芓"], -["cba1","èŠŠèŠƒèŠ„è±¸è¿‰è¾¿é‚Ÿé‚¡é‚¥é‚žé‚§é‚ é˜°é˜¨é˜¯é˜ä¸³ä¾˜ä½¼ä¾…佽侀侇佶佴侉侄佷佌侗佪侚佹ä¾ä½¸ä¾ä¾œä¾”侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿å’咑咂咈呫呺呾呥呬呴呦å’å‘¯å‘¡å‘ å’˜å‘£å‘§å‘¤å›·å›¹å¯å²åå«å±å°å¶åž€åµå»å³å´å¢"], -["cc40","å¨å½å¤Œå¥…妵妺å§å§Žå¦²å§Œå§å¦¶å¦¼å§ƒå§–妱妽姀姈妴姇å¢å¥å®“å®•å±„å±‡å²®å²¤å² å²µå²¯å²¨å²¬å²Ÿå²£å²å²¢å²ªå²§å²å²¥å²¶å²°å²¦å¸—帔帙弨弢弣弤彔徂彾彽忞忥æ€æ€¦æ€™æ€²æ€‹"], -["cca1","怴怊怗怳怚怞怬怢æ€æ€æ€®æ€“怑怌怉怜戔戽æŠæŠ´æ‹‘抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋æ˜æ˜…旽昑æ˜æ›¶æœŠæž…æ¬æžŽæž’æ¶æ»æž˜æž†æž„æ´æžæžŒæºæžŸæž‘枙枃æ½æžæ¸æ¹æž”欥殀æ¾æ¯žæ°æ²“泬泫泮泙沶泔æ²æ³§æ²·æ³æ³‚沺泃泆æ³æ³²"], -["cd40","æ³’æ³æ²´æ²Šæ²æ²€æ³žæ³€æ´°æ³æ³‡æ²°æ³¹æ³æ³©æ³‘炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡çŽçŽ¦çŽ¢çŽ 玬çŽç“瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"], -["cda1","矷祂礿秅穸穻竻籵糽耵è‚肮肣肸肵è‚èˆ èŠ è‹€èŠ«èŠšèŠ˜èŠ›èŠµèŠ§èŠ®èŠ¼èŠžèŠºèŠ´èŠ¨èŠ¡èŠ©è‹‚èŠ¤è‹ƒèŠ¶èŠ¢è™°è™¯è™è™®è±–è¿’è¿‹è¿“è¿è¿–迕迗邲邴邯邳邰阹阽阼阺陃ä¿ä¿…俓侲俉俋ä¿ä¿”俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽å¼åŽ—厖厙厘咺咡å’å’¥å“"], -["ce40","哃èŒå’·å’®å“–å’¶å“…å“†å’ å‘°å’¼å’¢å’¾å‘²å“žå’°åžµåžžåžŸåž¤åžŒåž—åžåž›åž”垘åžåž™åž¥åžšåž•å£´å¤å¥“姡姞姮娀姱å§å§ºå§½å§¼å§¶å§¤å§²å§·å§›å§©å§³å§µå§ 姾姴å§å®¨å±Œå³å³˜å³Œå³—峋峛"], -["cea1","峞峚峉峇峊峖峓峔å³å³ˆå³†å³Žå³Ÿå³¸å·¹å¸¡å¸¢å¸£å¸ 帤庰庤庢庛庣庥弇弮彖徆怷怹æ”æ²æžæ…æ“æ‡æ‰æ›æŒæ€æ‚æŸæ€¤æ„æ˜æ¦æ®æ‰‚扃æ‹æŒæŒ‹æ‹µæŒŽæŒƒæ‹«æ‹¹æŒæŒŒæ‹¸æ‹¶æŒ€æŒ“挔拺挕拻拰æ•æ•ƒæ–ªæ–¿æ˜¶æ˜¡æ˜²æ˜µæ˜œæ˜¦æ˜¢æ˜³æ˜«æ˜ºæ˜æ˜´æ˜¹æ˜®æœæœæŸæŸ²æŸˆæžº"], -["cf40","柜枻柸柘柀枷柅柫柤柟枵æŸæž³æŸ·æŸ¶æŸ®æŸ£æŸ‚枹柎柧柰枲柼柆æŸæŸŒæž®æŸ¦æŸ›æŸºæŸ‰æŸŠæŸƒæŸªæŸ‹æ¬¨æ®‚æ®„æ®¶æ¯–æ¯˜æ¯ æ° æ°¡æ´¨æ´´æ´æ´Ÿæ´¼æ´¿æ´’洊泚洳洄洙洺洚洑洀æ´æµ‚"], -["cfa1","æ´æ´˜æ´·æ´ƒæ´æµ€æ´‡æ´ 洬洈洢洉æ´ç‚·ç‚Ÿç‚¾ç‚±ç‚°ç‚¡ç‚´ç‚µç‚©ç‰ç‰‰ç‰Šç‰¬ç‰°ç‰³ç‰®ç‹Šç‹¤ç‹¨ç‹«ç‹Ÿç‹ªç‹¦ç‹£çŽ…çŒç‚çˆç…玹玶玵玴ç«çŽ¿ç‡çŽ¾çƒç†çŽ¸ç‹ç“¬ç“®ç”®ç•‡ç•ˆç–§ç–ªç™¹ç›„çœˆçœƒçœ„çœ…çœŠç›·ç›»ç›ºçŸ§çŸ¨ç †ç ‘ç ’ç …ç ç ç Žç ‰ç ƒç “ç¥Šç¥Œç¥‹ç¥…ç¥„ç§•ç§ç§ç§–秎窀"], -["d040","穾竑笀ç¬ç±ºç±¸ç±¹ç±¿ç²€ç²ç´ƒç´ˆç´ç½˜ç¾‘ç¾ç¾¾è€‡è€Žè€è€”è€·èƒ˜èƒ‡èƒ èƒ‘èƒˆèƒ‚èƒèƒ…胣胙胜胊胕胉èƒèƒ—胦èƒè‡¿èˆ¡èŠ”苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"], -["d0a1","è‹¤è‹ è‹ºè‹³è‹è™·è™´è™¼è™³è¡è¡Žè¡§è¡ªè¡©è§“è¨„è¨‡èµ²è¿£è¿¡è¿®è¿ éƒ±é‚½é‚¿éƒ•éƒ…é‚¾éƒ‡éƒ‹éƒˆé‡”é‡“é™”é™é™‘é™“é™Šé™Žå€žå€…å€‡å€“å€¢å€°å€›ä¿µä¿´å€³å€·å€¬ä¿¶ä¿·å€—å€œå€ å€§å€µå€¯å€±å€Žå…šå†”å†“å‡Šå‡„å‡…å‡ˆå‡Žå‰¡å‰šå‰’å‰žå‰Ÿå‰•å‰¢å‹åŒŽåŽžå”¦å“¢å”—唒哧哳哤唚哿唄唈哫唑唅哱"], -["d140","å”Šå“»å“·å“¸å“ å”Žå”ƒå”‹åœåœ‚åŸŒå ²åŸ•åŸ’åžºåŸ†åž½åž¼åž¸åž¶åž¿åŸ‡åŸåž¹åŸå¤Žå¥Šå¨™å¨–å¨å¨®å¨•å¨å¨—娊娞娳å¬å®§å®å®¬å°ƒå±–屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧ææšæ§"], -["d1a1","æ悢悈悀悒æ‚æ‚悃悕悛悗悇悜悎戙扆拲æŒæ–挬æ„æ…挶æƒæ¤æŒ¹æ‹æŠæŒ¼æŒ©æ挴æ˜æ”æ™æŒæ‡æŒ³æšæ‘挸æ—æ€æˆæ•Šæ•†æ—†æ—ƒæ—„æ—‚æ™Šæ™Ÿæ™‡æ™‘æœ’æœ“æ Ÿæ šæ¡‰æ ²æ ³æ »æ¡‹æ¡æ –æ ±æ œæ µæ «æ æ ¯æ¡Žæ¡„æ ´æ æ ’æ ”æ ¦æ ¨æ ®æ¡æ ºæ ¥æ 欬欯æ¬æ¬±æ¬´æ肂殈毦毤"], -["d240","毨毣毢毧氥浺浣浤浶æ´æµ¡æ¶’浘浢æµæµ¯æ¶‘æ¶æ·¯æµ¿æ¶†æµžæµ§æµ 涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵æ¶çƒœçƒ“烑çƒçƒ‹ç¼¹çƒ¢çƒ—çƒ’çƒžçƒ çƒ”çƒçƒ…烆烇烚烎烡牂牸"], -["d2a1","牷牶猀狺狴狾狶狳狻çŒç“ç™ç¥ç–玼ç§ç£ç©çœç’ç›ç”ççšç—ç˜ç¨ç“žç“Ÿç“´ç“µç”¡ç•›ç•Ÿç–°ç—疻痄痀疿疶疺皊盉çœçœ›çœçœ“çœ’çœ£çœ‘çœ•çœ™çœšçœ¢çœ§ç £ç ¬ç ¢ç µç ¯ç ¨ç ®ç «ç ¡ç ©ç ³ç ªç ±ç¥”ç¥›ç¥ç¥œç¥“ç¥’ç¥‘ç§«ç§¬ç§ ç§®ç§ç§ªç§œç§žç§çª†çª‰çª…窋窌窊窇竘ç¬"], -["d340","笄笓笅ç¬ç¬ˆç¬Šç¬Žç¬‰ç¬’粄粑粊粌粈ç²ç²…ç´žç´ç´‘紎紘紖紓紟紒ç´ç´Œç½œç½¡ç½žç½ ç½ç½›ç¾–羒翃翂翀耖耾耹胺胲胹胵è„胻脀èˆèˆ¯èˆ¥èŒ³èŒè„茙è‘茥è–茿è茦茜茢"], -["d3a1","è‚èŽèŒ›èŒªèŒˆèŒ¼èèŒ–èŒ¤èŒ èŒ·èŒ¯èŒ©è‡è…èŒè“茞茬è‹èŒ§èˆè™“虒蚢蚨蚖èšèš‘蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎èšèšèš”衃衄è¡è¡µè¡¶è¡²è¢€è¡±è¡¿è¡¯è¢ƒè¡¾è¡´è¡¼è¨’è±‡è±—è±»è²¤è²£èµ¶èµ¸è¶µè¶·è¶¶è»‘è»“è¿¾è¿µé€‚è¿¿è¿»é€„è¿¼è¿¶éƒ–éƒ éƒ™éƒšéƒ£éƒŸéƒ¥éƒ˜éƒ›éƒ—éƒœéƒ¤é…"], -["d440","é…Žé…釕釢釚陜陟隼飣髟鬯乿å°åªå¡åžå å“å‹åå²åˆååå›åŠå¢å€•å…åŸå©å«å£å¤å†å€å®å³å—å‘å‡å‰«å‰å‰¬å‰®å‹–å‹“åŒåŽœå•µå•¶å”¼å•å•å”´å”ªå•‘啢唶唵唰啒啅"], -["d4a1","唌唲啥啎唹啈å”å”»å•€å•‹åœŠåœ‡åŸ»å ”åŸ¢åŸ¶åŸœåŸ´å €åŸåŸ½å ˆåŸ¸å ‹åŸ³åŸå ‡åŸ®åŸ£åŸ²åŸ¥åŸ¬åŸ¡å ŽåŸ¼å 埧å å ŒåŸ±åŸ©åŸ°å å „å¥œå© å©˜å©•å©§å©žå¨¸å¨µå©å©å©Ÿå©¥å©¬å©“婤婗婃å©å©’婄婛婈媎娾å©å¨¹å©Œå©°å©©å©‡å©‘å©–å©‚å©œå²å®å¯å¯€å±™å´žå´‹å´å´šå´ 崌崨å´å´¦å´¥å´"], -["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊æ‚悆悾悰悺惓惔æƒæƒ¤æƒ™æƒæƒˆæ‚±æƒ›æ‚·æƒŠæ‚¿æƒƒæƒæƒ€æŒ²æ¥æŽŠæŽ‚æ½æŽ½æŽžæŽæŽæŽ—掫掎æ¯æŽ‡æŽæ®æŽ¯æµæŽœæ掮æ¼æŽ¤æŒ»æŽŸ"], -["d5a1","æ¸æŽ…æŽæŽ‘æŽæ°æ•“æ—晥晡晛晙晜晢朘桹梇æ¢æ¢œæ¡æ¡®æ¢®æ¢«æ¥–桯梣梬梩桵桴梲æ¢æ¡·æ¢’æ¡¼æ¡«æ¡²æ¢ªæ¢€æ¡±æ¡¾æ¢›æ¢–æ¢‹æ¢ æ¢‰æ¢¤æ¡¸æ¡»æ¢‘æ¢Œæ¢Šæ¡½æ¬¶æ¬³æ¬·æ¬¸æ®‘æ®æ®æ®Žæ®Œæ°ªæ·€æ¶«æ¶´æ¶³æ¹´æ¶¬æ·©æ·¢æ¶·æ·¶æ·”æ¸€æ·ˆæ· æ·Ÿæ·–æ¶¾æ·¥æ·œæ·æ·›æ·´æ·Šæ¶½æ·æ·°æ¶ºæ·•æ·‚æ·æ·‰"], -["d640","æ·æ·²æ·“淽淗æ·æ·£æ¶»çƒºç„烷焗烴焌烰焄烳ç„烼烿焆焓焀烸烶焋焂焎牾牻牼牿çŒçŒ—猇猑猘猊猈狿çŒçŒžçŽˆç¶ç¸çµç„çç½ç‡ç€çºç¼ç¿çŒç‹ç´çˆç•¤ç•£ç—Žç—’ç—"], -["d6a1","痋痌痑ç—çšçš‰ç›“眹眯çœçœ±çœ²çœ´çœ³çœ½çœ¥çœ»çœµç¡ˆç¡’硉ç¡ç¡Šç¡Œç ¦ç¡…ç¡ç¥¤ç¥§ç¥©ç¥ªç¥£ç¥«ç¥¡ç¦»ç§ºç§¸ç§¶ç§·çªçª”çªç¬µç‡ç¬´ç¬¥ç¬°ç¬¢ç¬¤ç¬³ç¬˜ç¬ªç¬ç¬±ç¬«ç¬ç¬¯ç¬²ç¬¸ç¬šç¬£ç²”粘粖粣紵紽紸紶紺絅紬紩çµçµ‡ç´¾ç´¿çµŠç´»ç´¨ç½£ç¾•ç¾œç¾ç¾›ç¿Šç¿‹ç¿ç¿ç¿‘翇ç¿ç¿‰è€Ÿ"], -["d740","耞耛è‡èƒèˆè„˜è„¥è„™è„›è„脟脬脞脡脕脧è„脢舑舸舳舺舴舲艴èŽèŽ£èŽ¨èŽèºè³èŽ¤è´èŽèŽèŽ•èŽ™èµèŽ”莩è½èŽƒèŽŒèŽèŽ›èŽªèŽ‹è¾èŽ¥èŽ¯èŽˆèŽ—莰è¿èŽ¦èŽ‡èŽ®è¶èŽšè™™è™–èš¿èš·"], -["d7a1","蛂è›è›…蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜è±è±½è²¥èµ½èµ»èµ¹è¶¼è·‚趹趿è·è»˜è»žè»è»œè»—è» è»¡é€¤é€‹é€‘é€œé€Œé€¡éƒ¯éƒªéƒ°éƒ´éƒ²éƒ³éƒ”éƒ«éƒ¬éƒ©é…–é…˜é…šé…“é…•é‡¬é‡´é‡±é‡³é‡¸é‡¤é‡¹é‡ª"], -["d840","釫釷釨釮镺閆閈陼é™é™«é™±é™¯éš¿éªé „飥馗傛傕傔傞傋傣傃傌傎å‚å¨å‚œå‚’傂傇兟凔匒匑厤厧喑喨喥å–啷噅喢喓喈å–å–µå–å–£å–’å–¤å•½å–Œå–¦å•¿å–•å–¡å–ŽåœŒå ©å ·"], -["d8a1","å ™å žå §å £å ¨åŸµå¡ˆå ¥å œå ›å ³å ¿å ¶å ®å ¹å ¸å å ¬å »å¥¡åª¯åª”åªŸå©ºåª¢åªžå©¸åª¦å©¼åª¥åª¬åª•åª®å¨·åª„åªŠåª—åªƒåª‹åª©å©»å©½åªŒåªœåªåª“åªå¯ªå¯å¯‹å¯”寑寊寎尌尰崷嵃嵫åµåµ‹å´¿å´µåµ‘嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄å¹å½˜å¾¦å¾¥å¾«æƒ‰æ‚¹æƒŒæƒ¢æƒŽæƒ„æ„”"], -["d940","惲愊愖愅惵愓惸惼惾æƒæ„ƒæ„˜æ„æ„惿愄愋扊掔掱掰æŽæ¥æ¨æ¯æƒæ’æ³æŠæ æ¶æ•æ²æµæ‘¡æŸæŽ¾ææœæ„æ˜æ“æ‚æ‡æŒæ‹æˆæ°æ—æ™æ”²æ•§æ•ªæ•¤æ•œæ•¨æ•¥æ–Œæ–æ–žæ–®æ—æ—’"], -["d9a1","晼晬晻暀晱晹晪晲æœæ¤Œæ£“椄棜椪棬棪棱æ¤æ£–棷棫棤棶椓æ¤æ£³æ£¡æ¤‡æ£Œæ¤ˆæ¥°æ¢´æ¤‘棯棆椔棸æ£æ£½æ£¼æ£¨æ¤‹æ¤Šæ¤—棎棈æ£æ£žæ£¦æ£´æ£‘椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿æ¹æ¹æ¹³æ¸œæ¸³æ¹‹æ¹€æ¹‘渻渃渮湞"], -["da40","æ¹¨æ¹œæ¹¡æ¸±æ¸¨æ¹ æ¹±æ¹«æ¸¹æ¸¢æ¸°æ¹“æ¹¥æ¸§æ¹¸æ¹¤æ¹·æ¹•æ¹¹æ¹’æ¹¦æ¸µæ¸¶æ¹šç„ ç„žç„¯çƒ»ç„®ç„±ç„£ç„¥ç„¢ç„²ç„Ÿç„¨ç„ºç„›ç‰‹ç‰šçŠˆçŠ‰çŠ†çŠ…çŠ‹çŒ’çŒ‹çŒ°çŒ¢çŒ±çŒ³çŒ§çŒ²çŒçŒ¦çŒ£çŒµçŒŒç®ç¬ç°ç«ç–"], -["daa1","çšç¡çç±ç¤ç£çç©ç ç²ç“»ç”¯ç•¯ç•¬ç—§ç—šç—¡ç—¦ç—痟痤痗皕皒盚ç†ç‡ç„çç…çŠçŽç‹çŒçŸžçŸ¬ç¡ 硤硥硜ç¡ç¡±ç¡ªç¡®ç¡°ç¡©ç¡¨ç¡žç¡¢ç¥´ç¥³ç¥²ç¥°ç¨‚稊稃稌稄窙竦竤çŠç¬»ç„çˆçŒçŽç€ç˜ç…粢粞粨粡絘絯絣絓絖絧絪çµçµçµœçµ«çµ’絔絩絑絟絎缾缿罥"], -["db40","ç½¦ç¾¢ç¾ ç¾¡ç¿—è‘èè胾胔腃腊腒è…腇脽è…脺臦臮臷臸臹舄舼舽舿艵茻èè¹è£è€è¨è’è§è¤è¼è¶èè†èˆè«è£èŽ¿èèè¥è˜è¿è¡è‹èŽè–èµè‰è‰èèžè‘è†è‚è³"], -["dba1","è•èºè‡è‘èªè“èƒè¬è®è„è»è—è¢è›è›è¾è›˜è›¢è›¦è›“蛣蛚蛪è›è›«è›œè›¬è›©è›—蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲è¤è£‰è¦•è¦˜è¦—è§è§šè§›è©Žè©è¨¹è©™è©€è©—詘詄詅詒詈詑詊詌è©è±Ÿè²è²€è²ºè²¾è²°è²¹è²µè¶„趀趉跘跓è·è·‡è·–è·œè·è·•è·™è·ˆè·—跅軯軷軺"], -["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩é€é€´é€¯é„†é„¬é„„郿郼鄈郹郻é„é„€é„‡é„…é„ƒé…¡é…¤é…Ÿé…¢é… éˆéˆŠéˆ¥éˆƒéˆšéˆ¦éˆéˆŒéˆ€éˆ’釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻é–é–Œé–隇陾隈"], -["dca1","隉隃隀雂雈雃雱雰é¬é°é®é ‡é¢©é£«é³¦é»¹äºƒäº„亶傽傿僆傮僄僊傴僈僂傰åƒå‚ºå‚±åƒ‹åƒ‰å‚¶å‚¸å‡—剺剸剻剼嗃嗛嗌å—å—‹å—Šå—嗀嗔嗄嗩喿嗒å–å—嗕嗢嗖嗈嗲å—嗙嗂圔塓塨塤å¡å¡å¡‰å¡¯å¡•å¡Žå¡å¡™å¡¥å¡›å ½å¡£å¡±å£¼å«‡å«„嫋媺媸媱媵媰媿嫈媻嫆"], -["dd40","媷嫀嫊媴媶å«åª¹åªå¯–寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰å¹å¹Žå¹Šå¹å¹‹å»…廌廆廋廇彀徯å¾æƒ·æ…‰æ…Šæ„«æ……愶愲愮慆愯æ…æ„©æ…€æˆ é…¨æˆ£æˆ¥æˆ¤æ…æ±æ«ææ’æ‰æ æ¤"], -["dda1","æ³æ‘ƒæŸæ•æ˜æ¹æ·æ¢æ£æŒæ¦æ°æ¨æ‘æµæ¯æŠæšæ‘€æ¥æ§æ‹æ§æ›æ®æ¡æŽæ•¯æ–’旓暆暌暕æšæš‹æšŠæš™æš”æ™¸æœ æ¥¦æ¥Ÿæ¤¸æ¥Žæ¥¢æ¥±æ¤¿æ¥…æ¥ªæ¤¹æ¥‚æ¥—æ¥™æ¥ºæ¥ˆæ¥‰æ¤µæ¥¬æ¤³æ¤½æ¥¥æ£°æ¥¸æ¤´æ¥©æ¥€æ¥¯æ¥„æ¥¶æ¥˜æ¥æ¥´æ¥Œæ¤»æ¥‹æ¤·æ¥œæ¥æ¥‘椲楒椯楻椼æ†æ…æƒæ‚æˆææ®›ï¨æ¯»æ¯¼"], -["de40","毹毷毸溛滖滈æºæ»€æºŸæº“æº”æº æº±æº¹æ»†æ»’æº½æ»æºžæ»‰æº·æº°æ»æº¦æ»æº²æº¾æ»ƒæ»œæ»˜æº™æº’溎æºæº¤æº¡æº¿æº³æ»æ»Šæº—æº®æº£ç…‡ç…”ç…’ç…£ç… ç…ç…煢煲煸煪煡煂煘煃煋煰煟ç…ç…“"], -["dea1","ç…„ç…ç…šç‰çŠçŠŒçŠ‘çŠçŠŽçŒ¼ç‚猻猺ç€çŠç‰ç‘„ç‘Šç‘‹ç‘’ç‘‘ç‘—ç‘€ç‘ç‘瑎瑂瑆ç‘瑔瓡瓿瓾瓽ç”畹畷榃痯ç˜ç˜ƒç—·ç—¾ç—¼ç—¹ç—¸ç˜ç—»ç—¶ç—痵痽皙皵ç›ç•çŸç ç’ç–çšç©ç§ç”ç™ççŸ ç¢‡ç¢šç¢”ç¢ç¢„碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"], -["df40","稛ç¨çª£çª¢çªžç««ç¦ç¤çç´ç©ç²ç¥ç³ç±ç°ç¡ç¸ç¶ç£ç²²ç²´ç²¯ç¶ˆç¶†ç¶€ç¶çµ¿ç¶…絺綎絻綃絼綌綔綄絽綒ç½ç½«ç½§ç½¨ç½¬ç¾¦ç¾¥ç¾§ç¿›ç¿œè€¡è…¤è… 腷腜腩腛腢腲朡腞腶腧腯"], -["dfa1","è…„è…¡èˆè‰‰è‰„艀艂艅蓱è¿è‘–葶葹è’è’葥葑葀蒆葧è°è‘葽葚葙葴葳è‘蔇葞è·èºè´è‘ºè‘ƒè‘¸è²è‘…è©è™è‘‹è¯è‘‚èè‘Ÿè‘°è¹è‘Žè‘Œè‘’葯蓅蒎è»è‘‡è¶è³è‘¨è‘¾è‘„è«è‘ 葔葮è‘蜋蜄蛷蜌蛺蛖蛵è蛸蜎蜉èœè›¶èœèœ…裖裋è£è£Žè£žè£›è£šè£Œè£è¦…覛觟觥觤"], -["e040","è§¡è§ è§¢è§œè§¦è©¶èª†è©¿è©¡è¨¿è©·èª‚èª„è©µèªƒèªè©´è©ºè°¼è±‹è±Šè±¥è±¤è±¦è²†è²„貅賌赨赩趑趌趎è¶è¶è¶“趔è¶è¶’è·°è· è·¬è·±è·®è·è·©è·£è·¢è·§è·²è·«è·´è¼†è»¿è¼è¼€è¼…輇輈輂輋é’逿"], -["e0a1","é„é‰é€½é„é„é„鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆é‰é‰¬é‰é‰ 鉧鉯鈶鉡鉰鈱鉔鉣é‰é‰²é‰Žé‰“鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵é³é·é¸é²é é é Žé¢¬é£¶é£¹é¦¯é¦²é¦°é¦µéªéª«é›é³ªé³é³§éº€é»½åƒ¦åƒ”僗僨僳僛僪åƒåƒ¤åƒ“åƒ¬åƒ°åƒ¯åƒ£åƒ "], -["e140","凘劀åŠå‹©å‹«åŒ°åŽ¬å˜§å˜•å˜Œå˜’å—¼å˜å˜œå˜å˜“嘂嗺å˜å˜„嗿嗹墉塼å¢å¢˜å¢†å¢å¡¿å¡´å¢‹å¡ºå¢‡å¢‘墎塶墂墈塻墔å¢å£¾å¥«å«œå«®å«¥å«•å«ªå«šå«å««å«³å«¢å« 嫛嫬嫞å«å«™å«¨å«Ÿå·å¯ "], -["e1a1","寣屣嶂嶀嵽嶆嵺å¶åµ·å¶Šå¶‰å¶ˆåµ¾åµ¼å¶åµ¹åµ¿å¹˜å¹™å¹“廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨æ…慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫æ«æ‘æ‘›æ‘æ‘´æ‘¶æ‘²æ‘³æ‘½æ‘µæ‘¦æ’¦æ‘Žæ’‚æ‘žæ‘œæ‘‹æ‘“æ‘ æ‘æ‘¿æ¿æ‘¬æ‘«æ‘™æ‘¥æ‘·æ•³æ– æš¡æš æšŸæœ…æœ„æœ¢æ¦±æ¦¶æ§‰"], -["e240","æ¦ æ§Žæ¦–æ¦°æ¦¬æ¦¼æ¦‘æ¦™æ¦Žæ¦§æ¦æ¦©æ¦¾æ¦¯æ¦¿æ§„榽榤槔榹槊榚æ§æ¦³æ¦“榪榡榞槙榗æ¦æ§‚榵榥槆æŠææ‹æ®žæ®Ÿæ® 毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒æ»æ¼Š"], -["e2a1","漶潳滹滮æ¼æ½€æ¼°æ¼¼æ¼µæ»«æ¼‡æ¼Žæ½ƒæ¼…滽滶漹漜滼漺漟æ¼æ¼žæ¼ˆæ¼¡ç†‡ç†ç†‰ç†€ç†…熂ç†ç…»ç††ç†ç†—牄牓犗犕犓çƒçç‘çŒç‘¢ç‘³ç‘±ç‘µç‘²ç‘§ç‘®ç”€ç”‚甃畽ç–瘖瘈瘌瘕瘑瘊瘔皸çžç¼çž…çž‚ç®çž€ç¯ç¾çžƒç¢²ç¢ªç¢´ç¢ç¢¨ç¡¾ç¢«ç¢žç¢¥ç¢ 碬碢碤禘禊禋禖禕禔禓"], -["e340","禗禈禒ç¦ç¨«ç©Šç¨°ç¨¯ç¨¨ç¨¦çª¨çª«çª¬ç«®ç®ˆç®œç®Šç®‘ç®ç®–ç®ç®Œç®›ç®Žç®…箘劄箙箤箂粻粿粼粺綧綷緂綣綪ç·ç·€ç·…ç¶ç·Žç·„緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"], -["e3a1","耤èèœè†‰è††è†ƒè†‡è†è†Œè†‹èˆ•è’—蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴è“è“蒪蒚蒱è“è’蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶è“è’ è“—è“”è“’è“›è’°è’‘è™¡èœ³èœ£èœ¨è«è€èœ®èœžèœ¡èœ™èœ›èƒèœ¬è蜾è†èœ 蜲蜪èœèœ¼èœ’蜺蜱蜵è‚蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"], -["e440","裰裬裫è¦è¦¡è¦Ÿè¦žè§©è§«è§¨èª«èª™èª‹èª’èªèª–谽豨豩賕è³è³—趖踉踂跿è¸è·½è¸Šè¸ƒè¸‡è¸†è¸…跾踀踄è¼è¼‘輎è¼é„£é„œé„ 鄢鄟é„é„šé„¤é„¡é„›é…ºé…²é…¹é…³éŠ¥éŠ¤é‰¶éŠ›é‰ºéŠ éŠ”éŠªéŠ"], -["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩éŠéŠ‹éˆéšžéš¡é›¿é˜é½éºé¾éžƒéž€éž‚é»éž„éžé¿éŸŽéŸé –é¢é¢®é¤‚餀餇é¦é¦œé§ƒé¦¹é¦»é¦ºé§‚馽駇骱髣髧鬾鬿é é¡éŸé³±é³²é³µéº§åƒ¿å„ƒå„°åƒ¸å„†å„‡åƒ¶åƒ¾å„‹å„Œåƒ½å„ŠåŠ‹åŠŒå‹±å‹¯å™ˆå™‚噌嘵å™å™Šå™‰å™†å™˜"], -["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫å¢å¢±å¢ 墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹å¬å¬‡å¬…å¬å±§å¶™å¶—å¶Ÿå¶’å¶¢å¶“å¶•å¶ å¶œå¶¡å¶šå¶žå¹©å¹å¹ 幜緳廛廞廡彉徲憋憃慹憱憰憢憉"], -["e5a1","憛憓憯æ†æ†Ÿæ†’憪憡æ†æ…¦æ†³æˆæ‘®æ‘°æ’–æ’ æ’…æ’—æ’œæ’æ’‹æ’Šæ’Œæ’£æ’Ÿæ‘¨æ’±æ’˜æ•¶æ•ºæ•¹æ•»æ–²æ–³æšµæš°æš©æš²æš·æšªæš¯æ¨€æ¨†æ¨—æ§¥æ§¸æ¨•æ§±æ§¤æ¨ æ§¿æ§¬æ§¢æ¨›æ¨æ§¾æ¨§æ§²æ§®æ¨”槷槧橀樈槦槻æ¨æ§¼æ§«æ¨‰æ¨„樘樥æ¨æ§¶æ¨¦æ¨‡æ§´æ¨–æ‘殥殣殢殦æ°æ°€æ¯¿æ°‚æ½æ¼¦æ½¾æ¾‡æ¿†æ¾’"], -["e640","æ¾æ¾‰æ¾Œæ½¢æ½æ¾…潚澖潶潬澂潕潲潒æ½æ½—澔澓æ½æ¼€æ½¡æ½«æ½½æ½§æ¾æ½“æ¾‹æ½©æ½¿æ¾•æ½£æ½·æ½ªæ½»ç†²ç†¯ç†›ç†°ç† ç†šç†©ç†µç†ç†¥ç†žç†¤ç†¡ç†ªç†œç†§ç†³çŠ˜çŠšç˜ç’çžçŸç çç›ç¡çšç™"], -["e6a1","ç¢ç’‡ç’‰ç’Šç’†ç’瑽璅璈瑼瑹甈甇畾瘥瘞瘙ç˜ç˜œç˜£ç˜šç˜¨ç˜›çšœçšçšžçš›çžçžçž‰çžˆç£ç¢»ç£ç£Œç£‘ç£Žç£”ç£ˆç£ƒç£„ç£‰ç¦šç¦¡ç¦ ç¦œç¦¢ç¦›æ¶ç¨¹çª²çª´çª³ç®·ç¯‹ç®¾ç®¬ç¯Žç®¯ç®¹ç¯Šç®µç³…糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰ç¾ç¿ç¿«ç¿ªç¿¬ç¿¦ç¿¨è¤è§è†£è†Ÿ"], -["e740","膞膕膢膙膗舖è‰è‰“艒è‰è‰Žè‰‘蔤蔻è”蔀蔩蔎蔉è”蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨è”è”®è”‚è“½è”žè“¶è”±è”¦è“§è“¨è“°è“¯è“¹è”˜è” è”°è”‹è”™è”¯è™¢"], -["e7a1","è–è£è¤è·èŸ¡è³è˜è”è›è’è¡èšè‘èžèèªèèŽèŸèè¯è¬èºè®èœè¥èè»èµè¢è§è©è¡šè¤…褌褔褋褗褘褙褆褖褑褎褉覢覤覣è§è§°è§¬è«è«†èª¸è«“諑諔諕誻諗誾諀諅諘諃誺誽諙谾è±è²è³¥è³Ÿè³™è³¨è³šè³è³§è¶ è¶œè¶¡è¶›è¸ è¸£è¸¥è¸¤è¸®è¸•è¸›è¸–è¸‘è¸™è¸¦è¸§"], -["e840","è¸”è¸’è¸˜è¸“è¸œè¸—è¸šè¼¬è¼¤è¼˜è¼šè¼ è¼£è¼–è¼—é³é°é¯é§é«é„¯é„«é„©é„ªé„²é„¦é„®é†…醆醊é†é†‚醄醀é‹é‹ƒé‹„鋀鋙銶é‹é‹±é‹Ÿé‹˜é‹©é‹—é‹é‹Œé‹¯é‹‚鋨鋊鋈鋎鋦é‹é‹•é‹‰é‹ 鋞鋧鋑鋓"], -["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂éšéžŠéžŽéžˆéŸéŸé žé é ¦é ©é ¨é é ›é §é¢²é¤ˆé£ºé¤‘é¤”é¤–é¤—é¤•é§œé§é§é§“駔駎駉駖駘駋駗駌骳髬髫髳髲髱é†éƒé§é´é±é¦é¶éµé°é¨é¤é¬é³¼é³ºé³½é³¿é³·é´‡é´€é³¹é³»é´ˆé´…鴄麃黓é¼é¼å„œå„“儗儚儑凞匴å¡å™°å™ å™®"], -["e940","噳噦噣å™å™²å™žå™·åœœåœ›å£ˆå¢½å£‰å¢¿å¢ºå£‚墼壆嬗嬙嬛嬡嬔嬓å¬å¬–å¬¨å¬šå¬ å¬žå¯¯å¶¬å¶±å¶©å¶§å¶µå¶°å¶®å¶ªå¶¨å¶²å¶å¶¯å¶´å¹§å¹¨å¹¦å¹¯å»©å»§å»¦å»¨å»¥å½‹å¾¼æ†æ†¨æ†–懅憴懆æ‡æ‡Œæ†º"], -["e9a1","憿憸憌擗擖æ“æ“擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋æ›æš½æš»æšºæ›Œæœ£æ¨´æ©¦æ©‰æ©§æ¨²æ©¨æ¨¾æ©æ©æ©¶æ©›æ©‘樨橚樻樿æ©æ©ªæ©¤æ©æ©æ©”æ©¯æ©©æ© æ¨¼æ©žæ©–æ©•æ©æ©Žæ©†æ•æ”æ–殧殪殫毈毇氄氃氆æ¾æ¿‹æ¾£æ¿‡æ¾¼æ¿Žæ¿ˆæ½žæ¿„澽澞濊澨瀄澥澮澺澬澪æ¿æ¾¿æ¾¸"], -["ea40","澢濉澫æ¿æ¾¯æ¾²æ¾°ç‡…燂熿熸燖燀ç‡ç‡‹ç‡”燊燇ç‡ç†½ç‡˜ç†¼ç‡†ç‡šç‡›çŠçŠžç©ç¦ç§ç¬ç¥ç«çªç‘¿ç’šç’ 璔璒璕璡甋疀瘯ç˜ç˜±ç˜½ç˜³ç˜¼ç˜µç˜²ç˜°çš»ç›¦çžšçžçž¡çžœçž›çž¢çž£çž•çž™"], -["eaa1","çž—ç£ç£©ç£¥ç£ªç£žç££ç£›ç£¡ç£¢ç£ç£Ÿç£ 禤穄穈穇窶窸窵窱窷篞篣篧ç¯ç¯•ç¯¥ç¯šç¯¨ç¯¹ç¯”篪篢篜篫篘篟糒糔糗ç³ç³‘ç¸’ç¸¡ç¸—ç¸Œç¸Ÿç¸ ç¸“ç¸Žç¸œç¸•ç¸šç¸¢ç¸‹ç¸ç¸–ç¸ç¸”縥縤罃罻罼罺羱翯耪耩è¬è†±è†¦è†®è†¹è†µè†«è†°è†¬è†´è†²è†·è†§è‡²è‰•è‰–艗蕖蕅蕫è•è•“蕡蕘"], -["eb40","蕀蕆蕤è•è•¢è•„è•‘è•‡è•£è”¾è•›è•±è•Žè•®è•µè••è•§è• è–Œè•¦è•è•”蕥蕬虣虥虤螛èžèž—螓螒螈èžèž–螘è¹èž‡èž£èž…èžèž‘èžèž„螔螜螚螉褞褦褰è¤è¤®è¤§è¤±è¤¢è¤©è¤£è¤¯è¤¬è¤Ÿè§±è« "], -["eba1","諢諲諴諵è«è¬”諤諟諰諈諞諡諨諿諯諻貑貒è²è³µè³®è³±è³°è³³èµ¬èµ®è¶¥è¶§è¸³è¸¾è¸¸è¹€è¹…踶踼踽è¹è¸°è¸¿èº½è¼¶è¼®è¼µè¼²è¼¹è¼·è¼´é¶é¹é»é‚†éƒºé„³é„µé„¶é†“é†é†‘é†é†éŒ§éŒžéŒˆéŒŸéŒ†éŒéºéŒ¸éŒ¼éŒ›éŒ£éŒ’éŒé†éŒéŒŽéŒé‹‹éŒé‹ºéŒ¥éŒ“鋹鋷錴錂錤鋿錩錹錵錪錔錌"], -["ec40","錋鋾錉錀鋻錖閼é—閾閹閺閶閿閵閽隩雔霋霒éœéž™éž—éž”éŸ°éŸ¸é µé ¯é ²é¤¤é¤Ÿé¤§é¤©é¦žé§®é§¬é§¥é§¤é§°é§£é§ªé§©é§§éª¹éª¿éª´éª»é«¶é«ºé«¹é«·é¬³é®€é®…é®‡é¼é¾é»é®‚鮓鮒é®éºé®•"], -["eca1","é½é®ˆé´¥é´—é´ é´žé´”é´©é´é´˜é´¢é´é´™é´Ÿéºˆéº†éº‡éº®éºé»•é»–é»ºé¼’é¼½å„¦å„¥å„¢å„¤å„ å„©å‹´åš“åšŒåšåš†åš„嚃噾嚂噿åšå£–壔å£å£’å¬å¬¥å¬²å¬£å¬¬å¬§å¬¦å¬¯å¬®å»å¯±å¯²å¶·å¹¬å¹ªå¾¾å¾»æ‡ƒæ†µæ†¼æ‡§æ‡ 懥懤懨懞擯擩擣擫擤擨æ–斀斶旚曒æªæª–æªæª¥æª‰æªŸæª›æª¡æªžæª‡æª“檎"], -["ed40","檕檃檨檤檑橿檦檚檅檌檒æ›æ®æ°‰æ¿Œæ¾©æ¿´æ¿”濣濜æ¿æ¿§æ¿¦æ¿žæ¿²æ¿æ¿¢æ¿¨ç‡¡ç‡±ç‡¨ç‡²ç‡¤ç‡°ç‡¢ç³ç®ç¯ç’—璲璫ç’ç’ªç’璱璥璯ç”甑甒ç”疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"], -["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀ç«ç°…ç°ç¯²ç°€ç¯¿ç¯»ç°Žç¯´ç°‹ç¯³ç°‚簉簃ç°ç¯¸ç¯½ç°†ç¯°ç¯±ç°ç°Šç³¨ç¸ç¸¼ç¹‚縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀è–è–§è–•è– è–‹è–£è•»è–¤è–šè–ž"], -["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆è–è–™è–è–薢薂薈薅蕹蕶薘è–薟虨螾螪èžèŸ…螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾è¥è¥’褷襂è¦è¦¯è¦®è§²è§³è¬ž"], -["eea1","謘謖謑謅謋謢è¬è¬’謕謇è¬è¬ˆè¬†è¬œè¬“謚è±è±°è±²è±±è±¯è²•è²”賹赯蹎è¹è¹“è¹è¹Œè¹‡è½ƒè½€é‚…é¾é„¸é†šé†¢é†›é†™é†Ÿé†¡é†é† 鎡鎃鎯é¤é–é‡é¼é˜éœé¶é‰éé‘é ééŽéŒéªé¹é—é•é’éé±é·é»é¡éžé£é§éŽ€éŽé™é—‡é—€é—‰é—ƒé—…é–·éš®éš°éš¬éœ éœŸéœ˜éœéœ™éžšéž¡éžœ"], -["ef40","éžžéžéŸ•éŸ”韱é¡é¡„顊顉顅顃餥餫餬餪餳餲餯é¤é¤±é¤°é¦˜é¦£é¦¡é¨‚駺駴駷駹駸駶駻駽駾駼騃骾髾髽é¬é«¼éˆé®šé®¨é®žé®›é®¦é®¡é®¥é®¤é®†é®¢é® 鮯鴳éµéµ§é´¶é´®é´¯é´±é´¸é´°"], -["efa1","鵅鵂鵃鴾鴷鵀鴽翵é´éºŠéº‰éºéº°é»ˆé»šé»»é»¿é¼¤é¼£é¼¢é½”é¾ å„±å„儮嚘嚜嚗嚚åšåš™å¥°å¬¼å±©å±ªå·€å¹å¹®æ‡˜æ‡Ÿæ‡æ‡®æ‡±æ‡ªæ‡°æ‡«æ‡–懩擿攄擽擸æ”攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴æªæžæ¯‰æ°‹ç€‡ç€Œç€ç€ç€…瀔瀎濿瀀濻瀦濼濷瀊çˆç‡¿ç‡¹çˆƒç‡½ç¶"], -["f040","璸瓀璵ç“璾璶璻瓂甔甓癜癤癙ç™ç™“癗癚皦皽盬矂瞺磿礌礓礔礉ç¤ç¤’礑ç¦ç¦¬ç©Ÿç°œç°©ç°™ç° ç°Ÿç°ç°ç°¦ç°¨ç°¢ç°¥ç°°ç¹œç¹ç¹–ç¹£ç¹˜ç¹¢ç¹Ÿç¹‘ç¹ ç¹—ç¹“ç¾µç¾³ç¿·ç¿¸èµè‡‘臒"], -["f0a1","è‡è‰Ÿè‰žè–´è—†è—€è—ƒè—‚薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓èŸèŸ˜èŸ£èž¤èŸ—蟙è 蟴蟨èŸè¥“襋è¥è¥Œè¥†è¥è¥‘襉謪謧謣謳謰謵è‡è¬¯è¬¼è¬¾è¬±è¬¥è¬·è¬¦è¬¶è¬®è¬¤è¬»è¬½è¬ºè±‚è±µè²™è²˜è²—è³¾è´„è´‚è´€è¹œè¹¢è¹ è¹—è¹–è¹žè¹¥è¹§"], -["f140","蹛蹚蹡è¹è¹©è¹”轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛éŽéŽ‰éŽ§éŽŽéŽªéŽžéŽ¦éŽ•éŽˆéŽ™éŽŸéŽéŽ±éŽ‘鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘é›éœ£éœ¢éœ¥éž¬éž®éž¨éž«éž¤éžª"], -["f1a1","鞢鞥韗韙韖韘韺é¡é¡‘顒颸é¥é¤¼é¤ºé¨é¨‹é¨‰é¨é¨„騑騊騅騇騆髀髜鬈鬄鬅鬩鬵éŠéŒé‹é¯‡é¯†é¯ƒé®¿é¯é®µé®¸é¯“鮶鯄鮹鮽鵜鵓éµéµŠéµ›éµ‹éµ™éµ–鵌鵗鵒鵔鵟鵘鵚麎麌黟é¼é¼€é¼–鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫åšåš¦åš§åšªåš¬å£šå£å£›å¤’嬽嬾嬿巃幰"], -["f240","徿懻攇æ”æ”攉攌攎斄旞æ—æ›žæ«§æ« æ«Œæ«‘æ«™æ«‹æ«Ÿæ«œæ«æ««æ«æ«æ«žæ æ®°æ°Œç€™ç€§ç€ ç€–ç€«ç€¡ç€¢ç€£ç€©ç€—ç€¤ç€œç€ªçˆŒçˆŠçˆ‡çˆ‚çˆ…çŠ¥çŠ¦çŠ¤çŠ£çŠ¡ç“‹ç“…ç’·ç“ƒç”–ç™ çŸ‰çŸŠçŸ„çŸ±ç¤ç¤›"], -["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾è¸è‡—臕艤艡艣藫藱è—è—™è—¡è—¨è—šè——è—¬è—²è—¸è—˜è—Ÿè—£è—œè—‘è—°è—¦è—¯è—žè—¢è €èŸºè ƒèŸ¶èŸ·è ‰è Œè ‹è †èŸ¼è ˆèŸ¿è Šè ‚è¥¢è¥šè¥›è¥—è¥¡è¥œè¥˜è¥è¥™è¦ˆè¦·è¦¶è§¶èèˆèŠè€è“è–è”è‹è•"], -["f340","è‘è‚è’è—豃豷豶貚贆贇贉趬趪è¶è¶«è¹è¹¸è¹³è¹ªè¹¯è¹»è»‚轒轑è½è½è½“辴酀鄿醰é†éžé‡éé‚éšéé¹é¬éŒé™éŽ©é¦éŠé”é®é£é•é„éŽé€é’é§é•½é—šé—›é›¡éœ©éœ«éœ¬éœ¨éœ¦"], -["f3a1","鞳鞷鞶éŸéŸžéŸŸé¡œé¡™é¡é¡—颿颽颻颾饈饇饃馦馧騚騕騥é¨é¨¤é¨›é¨¢é¨ é¨§é¨£é¨žé¨œé¨”é«‚é¬‹é¬Šé¬Žé¬Œé¬·é¯ªé¯«é¯ é¯žé¯¤é¯¦é¯¢é¯°é¯”é¯—é¯¬é¯œé¯™é¯¥é¯•é¯¡é¯šéµ·é¶é¶Šé¶„鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼é¼é½€é½é½é½–齗齘匷嚲"], -["f440","嚵嚳壣å…巆巇廮廯忀å¿æ‡¹æ”—攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱ç‚瀸瀿瀺瀹ç€ç€»ç€³ç爓爔犨ç½ç¼ç’ºçš«çšªçš¾ç›çŸŒçŸŽçŸçŸçŸ²ç¤¥ç¤£ç¤§ç¤¨ç¤¤ç¤©"], -["f4a1","禲穮穬ç©ç«·ç±‰ç±ˆç±Šç±‡ç±…糮繻繾çºçº€ç¾ºç¿¿è¹è‡›è‡™èˆ‹è‰¨è‰©è˜¢è—¿è˜è—¾è˜›è˜€è—¶è˜„è˜‰è˜…è˜Œè—½è ™è è ‘è —è “è –è¥£è¥¦è¦¹è§·è èªèè¨è£è¥è§è趮躆躈躄轙轖轗轕轘轚é‚é…ƒé…醷醵醲醳é‹é“é»é éé”é¾é•éé¨é™ééµé€é·é‡éŽé–é’éºé‰é¸éŠé¿"], -["f540","é¼éŒé¶é‘é†é—žé— é—Ÿéœ®éœ¯éž¹éž»éŸ½éŸ¾é¡ é¡¢é¡£é¡Ÿé£é£‚é¥é¥Žé¥™é¥Œé¥‹é¥“騲騴騱騬騪騶騩騮騸é¨é«‡é«Šé«†é¬é¬’鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤é¶é¶’鶘é¶é¶›"], -["f5a1","é¶ é¶”é¶œé¶ªé¶—é¶¡é¶šé¶¢é¶¨é¶žé¶£é¶¿é¶©é¶–é¶¦é¶§éº™éº›éºšé»¥é»¤é»§é»¦é¼°é¼®é½›é½ é½žé½é½™é¾‘儺儹劘劗囃嚽嚾åˆå‡å·‹å·å»±æ‡½æ”›æ¬‚櫼欃櫸欀çƒç„çŠçˆç‰ç…ç†çˆçˆšçˆ™ç¾ç”—癪çŸç¤ç¤±ç¤¯ç±”籓糲纊纇纈纋纆çºç½ç¾»è€°è‡è˜˜è˜ªè˜¦è˜Ÿè˜£è˜œè˜™è˜§è˜®è˜¡è˜ 蘩蘞蘥"], -["f640","è ©è è ›è è ¤è œè «è¡Šè¥è¥©è¥®è¥«è§ºè¹è¸è…èºè»è´è´”趯躎躌轞轛è½é…†é…„酅醹é¿é»é¶é©é½é¼é°é¹éªé·é¬é‘€é±é—¥é—¤é—£éœµéœºéž¿éŸ¡é¡¤é£‰é£†é£€é¥˜é¥–騹騽驆驄驂é©é¨º"], -["f6a1","騿é«é¬•é¬—鬘鬖鬺é’é°«é°é°œé°¬é°£é°¨é°©é°¤é°¡é¶·é¶¶é¶¼é·é·‡é·Šé·é¶¾é·…鷃鶻鶵鷎鶹鶺鶬鷈鶱é¶é·Œé¶³é·é¶²é¹ºéºœé»«é»®é»é¼›é¼˜é¼šé¼±é½Žé½¥é½¤é¾’亹囆囅囋奱å‹åŒå·•å·‘å»²æ”¡æ” æ”¦æ”¢æ¬‹æ¬ˆæ¬‰æ°ç•ç–ç—ç’爞爟犩ç¿ç“˜ç“•ç“™ç“—ç™çšç¤µç¦´ç©°ç©±ç±—籜籙籛籚"], -["f740","糴糱纑ç½ç¾‡è‡žè‰«è˜´è˜µè˜³è˜¬è˜²è˜¶è ¬è ¨è ¦è ªè ¥è¥±è¦¿è¦¾è§»è¾è®„讂讆讅è¿è´•èº•èº”躚躒èºèº–èº—è½ è½¢é…‡é‘Œé‘é‘Šé‘‹é‘鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌é©é©ˆé©Š"], -["f7a1","驉驒é©é«é¬™é¬«é¬»é–é•é±†é±ˆé°¿é±„鰹鰳é±é°¼é°·é°´é°²é°½é°¶é·›é·’é·žé·šé·‹é·é·œé·‘鷟鷩鷙鷘鷖鷵鷕é·éº¶é»°é¼µé¼³é¼²é½‚齫龕龢儽劙壨壧奲åå·˜è ¯å½æˆæˆƒæˆ„攩攥斖曫欑欒æ¬æ¯Šç›çšçˆ¢çŽ‚çŽçŽƒç™°çŸ”ç±§ç±¦çº•è‰¬è˜ºè™€è˜¹è˜¼è˜±è˜»è˜¾è °è ²è ®è ³è¥¶è¥´è¥³è§¾"], -["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕é‘é‘—é‘žéŸ„éŸ…é €é©–é©™é¬žé¬Ÿé¬ é±’é±˜é±é±Šé±é±‹é±•é±™é±Œé±Žé·»é··é·¯é·£é·«é·¸é·¤é·¶é·¡é·®é·¦é·²é·°é·¢é·¬é·´é·³é·¨é·é»‚é»é»²é»³é¼†é¼œé¼¸é¼·é¼¶é½ƒé½"], -["f8a1","齱齰齮齯囓å›åŽå±æ”æ›æ›®æ¬“çŸç¡çç 爣瓛瓥矕礸禷禶籪纗羉è‰è™ƒè ¸è ·è µè¡‹è®”è®•èºžèºŸèº èºé†¾é†½é‡‚鑫鑨鑩雥é†éƒé‡éŸ‡éŸ¥é©žé«•é™é±£é±§é±¦é±¢é±žé± 鸂鷾鸇鸃鸆鸅鸀é¸é¸‰é·¿é·½é¸„éº é¼žé½†é½´é½µé½¶å›”æ”®æ–¸æ¬˜æ¬™æ¬—æ¬šç¢çˆ¦çŠªçŸ˜çŸ™ç¤¹ç±©ç±«ç³¶çºš"], -["f940","çº˜çº›çº™è‡ è‡¡è™†è™‡è™ˆè¥¹è¥ºè¥¼è¥»è§¿è®˜è®™èº¥èº¤èº£é‘®é‘鑯鑱鑳é‰é¡²é¥Ÿé±¨é±®é±é¸‹é¸é¸é¸é¸’鸑麡黵鼉齇齸齻齺齹圞ç¦ç±¯è ¼è¶²èº¦é‡ƒé‘´é‘¸é‘¶é‘µé© 鱴鱳鱱鱵鸔鸓黶鼊"], -["f9a1","龤ç¨ç¥ç³·è™ªè ¾è ½è ¿è®žè²œèº©è»‰é‹é¡³é¡´é£Œé¥¡é¦«é©¤é©¦é©§é¬¤é¸•é¸—齈戇欞爧虌躨钂钀é’驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺é¸ç©çªéº¤é½¾é½‰é¾˜ç¢éŠ¹è£å¢»æ’粧嫺╔╦╗╠╬╣╚╩â•â•’╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║â•â•â•®â•°â•¯â–“"] -] diff --git a/node_modules/iconv-lite/encodings/tables/eucjp.json b/node_modules/iconv-lite/encodings/tables/eucjp.json deleted file mode 100644 index 4fa61ca116009efc18ecbd1531538f31234ad103..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/tables/eucjp.json +++ /dev/null @@ -1,182 +0,0 @@ -[ -["0","\u0000",127], -["8ea1","。",62], -["a1a1"," ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½ãƒ¾ã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ï½žâˆ¥ï½œâ€¦â€¥â€˜â€™â€œâ€ï¼ˆï¼‰ã€”〕[]{ï½ã€ˆ",9,"+ï¼Â±Ã—÷ï¼â‰ ï¼œï¼žâ‰¦â‰§âˆžâˆ´â™‚â™€Â°â€²â€³â„ƒï¿¥ï¼„ï¿ ï¿¡ï¼…ï¼ƒï¼†ï¼Šï¼ Â§â˜†â˜…â—‹â—â—Žâ—‡"], -["a2a1","◆□■△▲▽▼※〒→â†â†‘↓〓"], -["a2ba","∈∋⊆⊇⊂⊃∪∩"], -["a2ca","∧∨¬⇒⇔∀∃"], -["a2dc","∠⊥⌒∂∇≡≒≪≫√∽âˆâˆµâˆ«âˆ¬"], -["a2f2","ʼn♯â™â™ªâ€ ‡¶"], -["a2fe","â—¯"], -["a3b0","ï¼",9], -["a3c1","A",25], -["a3e1","ï½",25], -["a4a1","ã",82], -["a5a1","ã‚¡",85], -["a6a1","Α",16,"Σ",6], -["a6c1","α",16,"σ",6], -["a7a1","Ð",5,"ÐЖ",25], -["a7d1","а",5,"ёж",25], -["a8a1","─│┌â”┘└├┬┤┴┼â”┃â”┓┛┗┣┳┫┻╋┠┯┨┷┿â”┰┥┸╂"], -["ada1","â‘ ",19,"â… ",9], -["adc0","ã‰ãŒ”㌢ã㌘㌧㌃㌶ã‘ã—ãŒãŒ¦ãŒ£ãŒ«ãŠãŒ»ãŽœãŽãŽžãŽŽãŽã„㎡"], -["addf","ã»ã€ã€Ÿâ„–ã℡㊤",4,"㈱㈲㈹ã¾ã½ã¼â‰’≡∫∮∑√⊥∠∟⊿∵∩∪"], -["b0a1","亜唖娃阿哀愛挨姶逢葵茜ç©æ‚ªæ¡æ¸¥æ—葦芦鯵梓圧斡扱宛å§è™»é£´çµ¢ç¶¾é®Žæˆ–粟袷安庵按暗案闇éžæ以伊ä½ä¾å‰å›²å¤·å§”å¨å°‰æƒŸæ„慰易椅為ç•ç•°ç§»ç¶ç·¯èƒƒèŽè¡£è¬‚é•éºåŒ»äº•äº¥åŸŸè‚²éƒç£¯ä¸€å£±æº¢é€¸ç¨²èŒ¨èŠ‹é°¯å…å°å’½å“¡å› 姻引飲淫胤è”"], -["b1a1","é™¢é™°éš éŸ»å‹å³å®‡çƒç¾½è¿‚雨å¯éµœçªºä¸‘碓臼渦嘘唄æ¬è”šé°»å§¥åŽ©æµ¦ç“œé–噂云é‹é›²è餌å¡å–¶å¬°å½±æ˜ æ›³æ „æ°¸æ³³æ´©ç‘›ç›ˆç©Žé ´è‹±è¡›è© é‹æ¶²ç–«ç›Šé§…悦è¬è¶Šé–²æ¦ŽåŽå††åœ’å °å¥„å®´å»¶æ€¨æŽ©æ´æ²¿æ¼”炎焔煙燕猿ç¸è‰¶è‹‘è–—é 鉛鴛塩於汚甥凹央奥往応"], -["b2a1","押旺横欧殴王ç¿è¥–鴬鴎黄岡沖è»å„„屋憶臆桶牡乙俺å¸æ©æ¸©ç©éŸ³ä¸‹åŒ–ä»®ä½•ä¼½ä¾¡ä½³åŠ å¯å˜‰å¤å«å®¶å¯¡ç§‘暇果架æŒæ²³ç«ç‚ç¦ç¦¾ç¨¼ç®‡èŠ±è‹›èŒ„è·è¯è“è¦èª²å˜©è²¨è¿¦éŽéœžèšŠä¿„峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔æ¢æ‡æˆ’æ‹æ”¹"], -["b3a1","é晦械海ç°ç•Œçš†çµµèŠ¥èŸ¹é–‹éšŽè²å‡±åŠ¾å¤–咳害崖慨概涯ç¢è“‹è¡—該鎧骸浬馨蛙垣柿蛎鈎劃嚇å„å»“æ‹¡æ’¹æ ¼æ ¸æ®»ç²ç¢ºç©«è¦šè§’赫較éƒé–£éš”é©å¦å²³æ¥½é¡é¡ŽæŽ›ç¬ 樫橿梶é°æ½Ÿå‰²å–æ°æ‹¬æ´»æ¸‡æ»‘è‘›è¤è½„且鰹å¶æ¤›æ¨ºéž„æ ªå…œç«ƒè’²é‡œéŽŒå™›é´¨æ ¢èŒ…è±"], -["b4a1","ç²¥åˆˆè‹…ç“¦ä¹¾ä¾ƒå† å¯’åˆŠå‹˜å‹§å·»å–šå ªå§¦å®Œå®˜å¯›å¹²å¹¹æ‚£æ„Ÿæ…£æ†¾æ›æ•¢æŸ‘桓棺款æ“汗漢澗潅環甘監看竿管簡緩缶翰è‚艦莞観諌貫還鑑間閑関陥韓館舘丸å«å²¸å·ŒçŽ©ç™Œçœ¼å²©ç¿«è´‹é›é ‘顔願ä¼ä¼Žå±å–œå™¨åŸºå¥‡å¬‰å¯„å²å¸Œå¹¾å¿Œæ®æœºæ——既期棋棄"], -["b5a1","機帰毅気汽畿祈å£ç¨€ç´€å¾½è¦è¨˜è²´èµ·è»Œè¼é£¢é¨Žé¬¼äº€å½å„€å¦“å®œæˆ¯æŠ€æ“¬æ¬ºçŠ ç–‘ç¥‡ç¾©èŸ»èª¼è°æŽ¬èŠéž å‰åƒå–«æ¡”æ©˜è©°ç §æµé»å´å®¢è„šè™é€†ä¸˜ä¹…仇休åŠå¸å®®å¼“急救朽求汲泣ç¸çƒç©¶çª®ç¬ˆç´šç³¾çµ¦æ—§ç‰›åŽ»å±…å·¨æ‹’æ‹ æŒ™æ¸ è™šè¨±è·é‹¸æ¼ç¦¦éšäº¨äº«äº¬"], -["b6a1","ä¾›ä¾ åƒ‘å…‡ç«¶å…±å‡¶å”匡å¿å«å–¬å¢ƒå³¡å¼·å½Šæ€¯ææ挟教橋æ³ç‹‚ç‹çŸ¯èƒ¸è„…興蕎郷é¡éŸ¿é¥—é©šä»°å‡å°æšæ¥å±€æ›²æ¥µçŽ‰æ¡ç²åƒ…勤å‡å·¾éŒ¦æ–¤æ¬£æ¬½ç´ç¦ç¦½ç‹ç·ŠèŠ¹èŒè¡¿è¥Ÿè¬¹è¿‘金åŸéŠ€ä¹å€¶å¥åŒºç‹—玖矩苦躯駆駈駒具愚虞喰空å¶å¯“é‡éš…串櫛釧屑屈"], -["b7a1","掘窟沓é´è½¡çªªç†Šéšˆç²‚æ —ç¹°æ¡‘é¬å‹²å›è–«è¨“群è»éƒ¡å¦è¢ˆç¥ä¿‚傾刑兄啓åœçªåž‹å¥‘形径æµæ…¶æ…§æ†©æŽ²æºæ•¬æ™¯æ¡‚渓畦稽系経継繋罫茎èŠè›è¨ˆè©£è¦è»½é šé¶èŠ¸è¿Žé¯¨åŠ‡æˆŸæ’ƒæ¿€éš™æ¡å‚‘æ¬ æ±ºæ½”ç©´çµè¡€è¨£æœˆä»¶å€¹å€¦å¥å…¼åˆ¸å‰£å–§åœå …嫌建憲懸拳æ²"], -["b8a1","æ¤œæ¨©ç‰½çŠ¬çŒ®ç ”ç¡¯çµ¹çœŒè‚©è¦‹è¬™è³¢è»’é£éµé™ºé¡•é¨“鹸元原厳幻弦減æºçŽ„ç¾çµƒèˆ·è¨€è«ºé™ä¹Žå€‹å¤å‘¼å›ºå§‘å¤å·±åº«å¼§æˆ¸æ•…枯湖ç‹ç³Šè¢´è‚¡èƒ¡è°è™Žèª‡è·¨éˆ·é›‡é¡§é¼“五互ä¼åˆå‘‰å¾å¨¯å¾Œå¾¡æ‚Ÿæ¢§æªŽç‘šç¢èªžèª¤è·é†ä¹žé¯‰äº¤ä½¼ä¾¯å€™å€–光公功効勾厚å£å‘"], -["b9a1","åŽå–‰å‘垢好å”åå®å·¥å·§å··å¹¸åºƒåºšåº·å¼˜æ’慌抗拘控攻昂晃更ææ ¡æ¢—æ§‹æ±Ÿæ´ªæµ©æ¸¯æºç”²çš‡ç¡¬ç¨¿ç³ 紅紘絞綱耕考肯肱腔è†èˆªè’è¡Œè¡¡è¬›è²¢è³¼éƒŠé…µé‰±ç ¿é‹¼é–¤é™é …香高鴻剛劫å·åˆå£•æ‹·æ¿ è±ªè½Ÿéº¹å…‹åˆ»å‘Šå›½ç©€é…·éµ é»’ç„漉腰甑忽惚骨狛込"], -["baa1","æ¤é ƒä»Šå›°å¤å¢¾å©šæ¨æ‡‡æ˜æ˜†æ ¹æ¢±æ··ç—•ç´ºè‰®é‚些ä½å‰å”†åµ¯å·¦å·®æŸ»æ²™ç‘³ç ‚è©éŽ–裟å座挫債催å†æœ€å“‰å¡žå¦»å®°å½©æ‰æŽ¡æ ½æ³æ¸ˆç½é‡‡çŠ€ç •ç ¦ç¥æ–Žç´°èœè£è¼‰éš›å‰¤åœ¨æ罪財冴å‚é˜ªå ºæ¦Šè‚´å’²å´ŽåŸ¼ç¢•é·ºä½œå‰Šå’‹æ¾æ˜¨æœ”柵窄ç–索錯桜é®ç¬¹åŒ™å†Šåˆ·"], -["bba1","察拶撮擦æœæ®ºè–©é›‘çšé¯–æŒéŒ†é®«çš¿æ™’三傘å‚山惨撒散桟燦çŠç”£ç®—纂蚕讃賛酸é¤æ–¬æš«æ®‹ä»•ä»”伺使刺å¸å²å—£å››å£«å§‹å§‰å§¿åå±å¸‚師志æ€æŒ‡æ”¯åœæ–¯æ–½æ—¨æžæ¢æ»æ°ç…祉ç§ç³¸ç´™ç´«è‚¢è„‚至視詞詩試誌諮資賜雌飼æ¯äº‹ä¼¼ä¾å…å—寺慈æŒæ™‚"], -["bca1","次滋治爾璽痔ç£ç¤ºè€Œè€³è‡ªè’”辞æ±é¹¿å¼è˜é´«ç«ºè»¸å®é›«ä¸ƒå±åŸ·å¤±å«‰å®¤æ‚‰æ¹¿æ¼†ç–¾è³ªå®Ÿè”€ç¯ å²æŸ´èŠå±¡è•Šç¸žèˆŽå†™å°„æ¨èµ¦æ–œç…®ç¤¾ç´—者è¬è»Šé®è›‡é‚ªå€Ÿå‹ºå°ºæ“ç¼çˆµé…Œé‡ˆéŒ«è‹¥å¯‚弱惹主å–守手朱殊狩ç 種腫趣酒首儒å—呪寿授樹綬需囚åŽå‘¨"], -["bda1","宗就州修æ„拾洲秀秋終ç¹ç¿’è‡èˆŸè’衆襲è®è¹´è¼¯é€±é…‹é…¬é›†é†œä»€ä½å……å従戎柔æ±æ¸‹ç£ç¸¦é‡éŠƒå”夙宿淑ç¥ç¸®ç²›å¡¾ç†Ÿå‡ºè¡“述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡éµé†‡é †å‡¦åˆæ‰€æš‘曙渚庶緒署書薯藷諸助å™å¥³åºå¾æ•é‹¤é™¤å‚·å„Ÿ"], -["bea1","å‹åŒ å‡å¬å“¨å•†å”±å˜—奨妾娼宵将å°å°‘å°šåº„åºŠå» å½°æ‰¿æŠ„æ‹›æŽŒæ·æ˜‡æ˜Œæ˜æ™¶æ¾æ¢¢æ¨Ÿæ¨µæ²¼æ¶ˆæ¸‰æ¹˜ç„¼ç„¦ç…§ç—‡çœç¡ç¤ç¥¥ç§°ç« 笑粧紹肖è–蒋蕉è¡è£³è¨Ÿè¨¼è©”詳象賞醤鉦é¾é˜éšœéž˜ä¸Šä¸ˆä¸žä¹—å†—å‰°åŸŽå ´å£Œå¬¢å¸¸æƒ…æ“¾æ¡æ–浄状畳穣蒸è²é†¸éŒ 嘱埴飾"], -["bfa1","æ‹æ¤æ®–ç‡ç¹”è·è‰²è§¦é£Ÿè•è¾±å°»ä¼¸ä¿¡ä¾µå”‡å¨ å¯å¯©å¿ƒæ…ŽæŒ¯æ–°æ™‹æ£®æ¦›æµ¸æ·±ç”³ç–¹çœŸç¥žç§¦ç´³è‡£èŠ¯è–ªè¦ªè¨ºèº«è¾›é€²é‡éœ‡äººä»åˆƒå¡µå£¬å°‹ç”šå°½è…Žè¨Šè¿…陣é笥è«é ˆé…¢å›³åŽ¨é€—å¹åž‚帥推水炊ç¡ç²‹ç¿ è¡°é‚é…”éŒéŒ˜éšç‘žé«„崇嵩数枢趨雛æ®æ‰æ¤™è…é —é›€è£¾"], -["c0a1","澄摺寸世瀬ç•æ˜¯å‡„制勢姓å¾æ€§æˆæ”¿æ•´æ˜Ÿæ™´æ£²æ –æ£æ¸…牲生盛精è–å£°è£½è¥¿èª èª“è«‹é€é†’é’é™æ–‰ç¨Žè„†éš»å¸æƒœæˆšæ–¥æ˜”æžçŸ³ç©ç±ç¸¾è„Šè²¬èµ¤è·¡è¹Ÿç¢©åˆ‡æ‹™æŽ¥æ‘‚折è¨çªƒç¯€èª¬é›ªçµ¶èˆŒè‰ä»™å…ˆåƒå 宣専尖å·æˆ¦æ‰‡æ’°æ “æ ´æ³‰æµ…æ´—æŸ“æ½œç…Žç…½æ—‹ç©¿ç®ç·š"], -["c1a1","繊羨腺舛船薦詮賎践é¸é·éŠéŠ‘閃鮮å‰å–„漸然全禅繕膳糎噌塑岨措曾曽楚狙ç–ç–Žç¤Žç¥–ç§Ÿç²—ç´ çµ„è˜‡è¨´é˜»é¡é¼ 僧創åŒå¢å€‰å–ªå£®å¥çˆ½å®‹å±¤åŒæƒ£æƒ³æœæŽƒæŒ¿æŽ»æ“早曹巣æ§æ§½æ¼•ç‡¥äº‰ç—©ç›¸çª“糟ç·ç¶œè¡è‰è˜è‘¬è’¼è—»è£…èµ°é€é鎗霜騒åƒå¢—憎"], -["c2a1","è‡“è”µè´ˆé€ ä¿ƒå´å‰‡å³æ¯æ‰æŸæ¸¬è¶³é€Ÿä¿—属賊æ—続å’袖其æƒå˜å«å°Šææ‘éœä»–å¤šå¤ªæ±°è©‘å”¾å •å¦¥æƒ°æ‰“æŸèˆµæ¥•é™€é§„é¨¨ä½“å †å¯¾è€å²±å¸¯å¾…æ€ æ…‹æˆ´æ›¿æ³°æ»žèƒŽè…¿è‹”è¢‹è²¸é€€é€®éšŠé»›é¯›ä»£å°å¤§ç¬¬é†é¡Œé·¹æ»ç€§å“啄宅托択拓沢濯ç¢è¨—é¸æ¿è«¾èŒ¸å‡§è›¸åª"], -["c3a1","å©ä½†é”辰奪脱巽竪辿棚谷狸鱈樽誰丹å˜å˜†å¦æ‹…探旦æŽæ·¡æ¹›ç‚çŸç«¯ç®ªç¶»è€½èƒ†è›‹èª•é›å›£å£‡å¼¾æ–暖檀段男談値知地弛æ¥æ™ºæ± 痴稚置致蜘é…馳築畜竹ç‘è“„é€ç§©çª’茶嫡ç€ä¸ä»²å®™å¿ 抽昼柱注虫衷註酎鋳é§æ¨—瀦猪苧著貯ä¸å…†å‡‹å–‹å¯µ"], -["c4a1","帖帳åºå¼”張彫徴懲挑暢æœæ½®ç‰’町眺è´è„¹è…¸è¶èª¿è«œè¶…è·³éŠšé•·é ‚é³¥å‹…æ—直朕沈çè³ƒéŽ®é™³æ´¥å¢œæ¤Žæ§Œè¿½éŽšç—›é€šå¡šæ ‚æŽ´æ§»ä½ƒæ¼¬æŸ˜è¾»è”¦ç¶´é”椿潰åªå£·å¬¬ç´¬çˆªåŠé‡£é¶´äºä½Žåœåµå‰ƒè²žå‘ˆå ¤å®šå¸åº•åºå»·å¼Ÿæ‚ŒæŠµæŒºææ¢¯æ±€ç¢‡ç¦Žç¨‹ç· è‰‡è¨‚è«¦è¹„é€“"], -["c5a1","邸é„釘鼎泥摘擢敵滴的笛é©é‘溺哲徹撤è½è¿é‰„典填天展店添çºç”œè²¼è»¢é¡›ç‚¹ä¼æ®¿æ¾±ç”°é›»å…Žåå µå¡—å¦¬å± å¾’æ–—æœæ¸¡ç™»èŸè³é€”都éç ¥ç ºåŠªåº¦åœŸå¥´æ€’å€’å…šå†¬å‡åˆ€å”塔塘套宕島嶋悼投ææ±æ¡ƒæ¢¼æ£Ÿç›—淘湯涛ç¯ç‡ˆå½“痘祷ç‰ç”ç’糖統到"], -["c6a1","董蕩藤討謄豆è¸é€ƒé€é™é™¶é 騰闘åƒå‹•åŒå ‚導憧撞洞瞳童胴è„é“éŠ…å³ é´‡åŒ¿å¾—å¾³æ¶œç‰¹ç£ç¦¿ç¯¤æ¯’独èªæ ƒæ©¡å‡¸çªæ¤´å±Šé³¶è‹«å¯…酉瀞噸屯惇敦沌豚éé “å‘‘æ›‡éˆå¥ˆé‚£å†…ä¹å‡ªè–™è¬Žç˜æºé‹æ¥¢é¦´ç¸„ç•·å—æ¥ è»Ÿé›£æ±äºŒå°¼å¼è¿©åŒ‚賑肉虹廿日乳入"], -["c7a1","如尿韮任妊å¿èªæ¿¡ç¦°ç¥¢å¯§è‘±çŒ«ç†±å¹´å¿µæ»æ’šç‡ƒç²˜ä¹ƒå»¼ä¹‹åŸœåš¢æ‚©æ¿ƒç´èƒ½è„³è†¿è¾²è¦—蚤巴把æ’覇æ·æ³¢æ´¾ç¶ç ´å©†ç½µèŠé¦¬ä¿³å»ƒæ‹æŽ’æ•—æ¯ç›ƒç‰ŒèƒŒè‚ºè¼©é…å€åŸ¹åª’æ¢…æ¥³ç…¤ç‹½è²·å£²è³ é™ªé€™è¿ç§¤çŸ§è©ä¼¯å‰¥åšæ‹æŸæ³Šç™½ç®”粕舶薄迫æ›æ¼ 爆縛莫é§éº¦"], -["c8a1","函箱硲箸肇çˆæ«¨å¹¡è‚Œç•‘ç• å…«é‰¢æºŒç™ºé†—é«ªä¼ç½°æŠœç閥鳩噺塙蛤隼伴判åŠåå›å¸†æ¬æ–‘æ¿æ°¾æ±Žç‰ˆçŠ¯çç•”ç¹èˆ¬è—©è²©ç¯„é‡†ç…©é ’é£¯æŒ½æ™©ç•ªç›¤ç£è•ƒè›®åŒªå‘å¦å¦ƒåº‡å½¼æ‚²æ‰‰æ‰¹æŠ«æ–比泌疲皮碑秘緋罷肥被誹費é¿éžé£›æ¨‹ç°¸å‚™å°¾å¾®æž‡æ¯˜çµçœ‰ç¾Ž"], -["c9a1","鼻柊稗匹疋é«å½¦è†è±è‚˜å¼¼å¿…ç•¢ç†é€¼æ¡§å§«åª›ç´ç™¾è¬¬ä¿µå½ªæ¨™æ°·æ¼‚瓢票表評豹廟æ病秒苗錨鋲蒜è›é°å“å½¬æ–Œæµœç€•è²§è³“é »æ•ç“¶ä¸ä»˜åŸ 夫婦富冨布府怖扶敷斧普浮父符è…膚芙èœè² 賦赴阜附侮撫æ¦èˆžè‘¡è•ªéƒ¨å°æ¥“風葺蕗ä¼å‰¯å¾©å¹…æœ"], -["caa1","ç¦è…¹è¤‡è¦†æ·µå¼—払沸ä»ç‰©é®’分å»å™´å¢³æ†¤æ‰®ç„šå¥®ç²‰ç³žç´›é›°æ–‡èžä¸™ä½µå…µå¡€å¹£å¹³å¼ŠæŸ„並蔽閉陛米é 僻å£ç™–碧別瞥蔑箆å変片篇編辺返é便勉娩å¼éžä¿èˆ—鋪圃æ•æ©ç”«è£œè¼”穂募墓慕戊暮æ¯ç°¿è©å€£ä¿¸åŒ…å‘†å ±å¥‰å®å³°å³¯å´©åº–抱æ§æ”¾æ–¹æœ‹"], -["cba1","æ³•æ³¡çƒ¹ç ²ç¸«èƒžèŠ³èŒè“¬èœ‚褒訪豊邦鋒飽鳳鵬ä¹äº¡å‚剖åŠå¦¨å¸½å¿˜å¿™æˆ¿æš´æœ›æŸæ£’冒紡肪膨謀貌貿鉾防å é ¬åŒ—åƒ•åœå¢¨æ’²æœ´ç‰§ç¦ç©†é‡¦å‹ƒæ²¡æ®†å €å¹Œå¥”本翻凡盆摩磨é”麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒æ¡äº¦ä¿£åˆæŠ¹æœ«æ²«è¿„ä¾ç¹éº¿ä¸‡æ…¢æº€"], -["cca1","漫蔓味未é…巳箕岬密蜜湊蓑稔脈妙ç²æ°‘çœ å‹™å¤¢ç„¡ç‰ŸçŸ›éœ§éµ¡æ¤‹å©¿å¨˜å†¥å命明盟迷銘鳴姪ç‰æ»…å…棉綿緬é¢éººæ‘¸æ¨¡èŒ‚妄åŸæ¯›çŒ›ç›²ç¶²è€—蒙儲木黙目æ¢å‹¿é¤…尤戻籾貰å•æ‚¶ç´‹é–€åŒä¹Ÿå†¶å¤œçˆºè€¶é‡Žå¼¥çŸ¢åŽ„役約薬訳èºé–柳薮鑓愉愈油癒"], -["cda1","è«è¼¸å”¯ä½‘優勇å‹å®¥å¹½æ‚ 憂æ–有柚湧涌猶猷由ç¥è£•èª˜éŠé‚‘郵雄èžå¤•äºˆä½™ä¸Žèª‰è¼¿é å‚幼妖容庸æšæºæ“曜楊様洋溶熔用窯羊耀葉蓉è¦è¬¡è¸Šé¥é™½é¤Šæ…¾æŠ‘欲沃浴翌翼淀羅螺裸æ¥èŽ±é ¼é›·æ´›çµ¡è½é…ªä¹±åµåµæ¬„æ¿«è—è˜è¦§åˆ©åå±¥æŽæ¢¨ç†ç’ƒ"], -["cea1","ç—¢è£è£¡é‡Œé›¢é™¸å¾‹çŽ‡ç«‹è‘ŽæŽ 略劉æµæºœç‰ç•™ç¡«ç²’隆竜é¾ä¾¶æ…®æ—…虜了亮僚両凌寮料æ¢æ¶¼çŒŸç™‚çžç¨œç³§è‰¯è«’é¼é‡é™µé ˜åŠ›ç·‘倫厘林淋ç‡ç³è‡¨è¼ªéš£é±—éºŸç‘ å¡æ¶™ç´¯é¡žä»¤ä¼¶ä¾‹å†·åŠ±å¶ºæ€œçŽ²ç¤¼è‹“鈴隷零霊麗齢暦æ´åˆ—劣烈裂廉æ‹æ†æ¼£ç…‰ç°¾ç·´è¯"], -["cfa1","蓮連錬呂é¯æ«“炉賂路露労å©å»Šå¼„朗楼榔浪æ¼ç‰¢ç‹¼ç¯è€è¾è‹éƒŽå…麓禄肋録論å€å’Œè©±æªè³„è„‡æƒ‘æž é·²äº™äº˜é°è©«è—蕨椀湾碗腕"], -["d0a1","弌ä¸ä¸•ä¸ªä¸±ä¸¶ä¸¼ä¸¿ä¹‚乖乘亂亅豫亊舒å¼äºŽäºžäºŸäº 亢亰亳亶从ä»ä»„仆仂仗仞ä»ä»Ÿä»·ä¼‰ä½šä¼°ä½›ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛俑俚ä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆åƒå‡æœƒå•ååˆåšå–å¬å¸å‚€å‚šå‚…傴傲"], -["d1a1","僉僊傳僂僖僞僥åƒåƒ£åƒ®åƒ¹åƒµå„‰å„儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉å†å†‘å†“å†•å†–å†¤å†¦å†¢å†©å†ªå†«å†³å†±å†²å†°å†µå†½å‡…å‡‰å‡›å‡ è™•å‡©å‡å‡°å‡µå‡¾åˆ„刋刔刎刧刪刮刳刹å‰å‰„剋剌剞剔剪剴剩剳剿剽åŠåŠ”劒剱劈劑辨"], -["d2a1","辧劬åŠåŠ¼åŠµå‹å‹å‹—勞勣勦é£å‹ 勳勵勸勹匆匈甸åŒåŒåŒåŒ•åŒšåŒ£åŒ¯åŒ±åŒ³åŒ¸å€å†å…丗å‰å凖åžå©å®å¤˜å»å·åŽ‚åŽ–åŽ åŽ¦åŽ¥åŽ®åŽ°åŽ¶åƒç°’é›™åŸæ›¼ç‡®å®å¨ååºåå½å‘€å¬åå¼å®å¶å©åå‘Žå’呵咎呟呱呷呰咒呻咀呶咄å’咆哇咢咸咥咬哄哈咨"], -["d3a1","咫哂咤咾咼哘哥哦å”唔哽哮å“哺哢唹啀啣啌售啜啅啖啗唸唳å•å–™å–€å’¯å–Šå–Ÿå•»å•¾å–˜å–žå–®å•¼å–ƒå–©å–‡å–¨å—šå—…嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎å™ç‡Ÿå˜´å˜¶å˜²å˜¸å™«å™¤å˜¯å™¬å™ªåš†åš€åšŠåš åš”åšåš¥åš®åš¶åš´å›‚åš¼å›å›ƒå›€å›ˆå›Žå›‘囓囗囮囹圀囿圄圉"], -["d4a1","圈國åœåœ“團圖嗇圜圦圷圸åŽåœ»å€åå©åŸ€åžˆå¡å¿åž‰åž“åž åž³åž¤åžªåž°åŸƒåŸ†åŸ”åŸ’åŸ“å ŠåŸ–åŸ£å ‹å ™å å¡²å ¡å¡¢å¡‹å¡°æ¯€å¡’å ½å¡¹å¢…å¢¹å¢Ÿå¢«å¢ºå£žå¢»å¢¸å¢®å£…å£“å£‘å£—å£™å£˜å£¥å£œå£¤å£Ÿå£¯å£ºå£¹å£»å£¼å£½å¤‚å¤Šå¤å¤›æ¢¦å¤¥å¤¬å¤å¤²å¤¸å¤¾ç«’奕å¥å¥Žå¥šå¥˜å¥¢å¥ 奧奬奩"], -["d5a1","奸å¦å¦ä½žä¾«å¦£å¦²å§†å§¨å§œå¦å§™å§šå¨¥å¨Ÿå¨‘娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲å«å¬ªå¬¶å¬¾åƒå…å€å‘å•åšå›å¥å©å°å³åµå¸æ–ˆåºå®€å®ƒå®¦å®¸å¯ƒå¯‡å¯‰å¯”å¯å¯¤å¯¦å¯¢å¯žå¯¥å¯«å¯°å¯¶å¯³å°…將專å°å°“å° å°¢å°¨å°¸å°¹å±å±†å±Žå±“"], -["d6a1","å±å±å±å±¬å±®ä¹¢å±¶å±¹å²Œå²‘岔妛岫岻岶岼岷峅岾峇峙峩峽峺å³å¶Œå³ªå´‹å´•å´—嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢å¶å¶¬å¶®å¶½å¶å¶·å¶¼å·‰å·å·“å·’å·–å·›å·«å·²å·µå¸‹å¸šå¸™å¸‘å¸›å¸¶å¸·å¹„å¹ƒå¹€å¹Žå¹—å¹”å¹Ÿå¹¢å¹¤å¹‡å¹µå¹¶å¹ºéº¼å¹¿åº å»å»‚廈å»å»"], -["d7a1","廖廣å»å»šå»›å»¢å»¡å»¨å»©å»¬å»±å»³å»°å»´å»¸å»¾å¼ƒå¼‰å½å½œå¼‹å¼‘弖弩å¼å¼¸å½å½ˆå½Œå½Žå¼¯å½‘彖彗彙彡å½å½³å½·å¾ƒå¾‚å½¿å¾Šå¾ˆå¾‘å¾‡å¾žå¾™å¾˜å¾ å¾¨å¾å¾¼å¿–忻忤忸忱å¿æ‚³å¿¿æ€¡æ 怙æ€æ€©æ€Žæ€±æ€›æ€•æ€«æ€¦æ€æ€ºæšææªæ·æŸæŠæ†ææ£æƒæ¤æ‚æ¬æ«æ™æ‚æ‚惧悃悚"], -["d8a1","æ‚„æ‚›æ‚–æ‚—æ‚’æ‚§æ‚‹æƒ¡æ‚¸æƒ æƒ“æ‚´å¿°æ‚½æƒ†æ‚µæƒ˜æ…愕愆惶惷愀惴惺愃愡惻惱æ„愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟æ…慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹æ‡æ‡¦æ‡£æ‡¶æ‡ºæ‡´æ‡¿æ‡½æ‡¼æ‡¾æˆ€æˆˆæˆ‰æˆæˆŒæˆ”戛"], -["d9a1","戞戡截戮戰戲戳æ‰æ‰Žæ‰žæ‰£æ‰›æ‰ 扨扼抂抉找抒抓抖拔抃抔拗拑抻æ‹æ‹¿æ‹†æ“”拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵æ挾ææœæ掖掎掀掫æ¶æŽ£æŽæŽ‰æŽŸæŽµæ«æ©æŽ¾æ©æ€æ†æ£æ‰æ’æ¶æ„æ–æ´æ†æ“æ¦æ¶æ”æ—æ¨æ摧摯摶摎攪撕撓撥撩撈撼"], -["daa1","æ“šæ“’æ“…æ“‡æ’»æ“˜æ“‚æ“±æ“§èˆ‰æ“ æ“¡æŠ¬æ“£æ“¯æ”¬æ“¶æ“´æ“²æ“ºæ”€æ“½æ”˜æ”œæ”…æ”¤æ”£æ”«æ”´æ”µæ”·æ”¶æ”¸ç•‹æ•ˆæ•–æ••æ•æ•˜æ•žæ•æ•²æ•¸æ–‚斃變斛斟斫斷旃旆æ—æ—„æ—Œæ—’æ—›æ—™æ— æ—¡æ—±æ²æ˜Šæ˜ƒæ—»æ³æ˜µæ˜¶æ˜´æ˜œæ™æ™„晉æ™æ™žæ™æ™¤æ™§æ™¨æ™Ÿæ™¢æ™°æšƒæšˆæšŽæš‰æš„暘æšæ›æš¹æ›‰æš¾æš¼"], -["dba1","æ›„æš¸æ›–æ›šæ› æ˜¿æ›¦æ›©æ›°æ›µæ›·æœæœ–朞朦朧霸朮朿朶æ朸朷æ†æžæ æ™æ£æ¤æž‰æ°æž©æ¼æªæžŒæž‹æž¦æž¡æž…枷柯枴柬枳柩枸柤柞æŸæŸ¢æŸ®æž¹æŸŽæŸ†æŸ§æªœæ žæ¡†æ ©æ¡€æ¡æ ²æ¡Žæ¢³æ «æ¡™æ¡£æ¡·æ¡¿æ¢Ÿæ¢æ¢æ¢”æ¢æ¢›æ¢ƒæª®æ¢¹æ¡´æ¢µæ¢ 梺æ¤æ¢æ¡¾æ¤æ£Šæ¤ˆæ£˜æ¤¢æ¤¦æ£¡æ¤Œæ£"], -["dca1","æ£”æ£§æ£•æ¤¶æ¤’æ¤„æ£—æ££æ¤¥æ£¹æ£ æ£¯æ¤¨æ¤ªæ¤šæ¤£æ¤¡æ£†æ¥¹æ¥·æ¥œæ¥¸æ¥«æ¥”æ¥¾æ¥®æ¤¹æ¥´æ¤½æ¥™æ¤°æ¥¡æ¥žæ¥æ¦æ¥ªæ¦²æ¦®æ§æ¦¿æ§æ§“榾槎寨槊æ§æ¦»æ§ƒæ¦§æ¨®æ¦‘æ¦ æ¦œæ¦•æ¦´æ§žæ§¨æ¨‚æ¨›æ§¿æ¬Šæ§¹æ§²æ§§æ¨…æ¦±æ¨žæ§æ¨”槫樊樒æ«æ¨£æ¨“橄樌橲樶橸橇橢橙橦橈樸樢æªæªæª 檄檢檣"], -["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮æ‡æƒæ‰ææ™æ”æ›æŸæ¡æ¸æ¹æ¿æ®€æ®„殃æ®æ®˜æ®•æ®žæ®¤æ®ªæ®«æ®¯æ®²æ®±æ®³æ®·æ®¼æ¯†æ¯‹æ¯“毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂æ²æ²šæ²æ²›æ±¾æ±¨æ±³æ²’æ²æ³„泱泓沽泗泅æ³æ²®æ²±æ²¾"], -["dea1","沺泛泯泙泪洟è¡æ´¶æ´«æ´½æ´¸æ´™æ´µæ´³æ´’洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮æ¸æ¹®æ¸®æ¸™æ¹²æ¹Ÿæ¸¾æ¸£æ¹«æ¸«æ¹¶æ¹æ¸Ÿæ¹ƒæ¸ºæ¹Žæ¸¤æ»¿æ¸æ¸¸æº‚溪溘滉溷滓溽溯滄溲滔滕æºæº¥æ»‚溟æ½æ¼‘çŒæ»¬æ»¸æ»¾æ¼¿æ»²æ¼±æ»¯æ¼²æ»Œ"], -["dfa1","漾漓滷澆潺潸æ¾æ¾€æ½¯æ½›æ¿³æ½æ¾‚潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑ç€ç€æ¿¾ç€›ç€šæ½´ç€ç€˜ç€Ÿç€°ç€¾ç€²ç‘ç£ç‚™ç‚’炯烱炬炸炳炮烟烋çƒçƒ™ç„‰çƒ½ç„œç„™ç…¥ç…•ç†ˆç…¦ç…¢ç…Œç…–ç…¬ç†ç‡»ç†„ç†•ç†¨ç†¬ç‡—ç†¹ç†¾ç‡’ç‡‰ç‡”ç‡Žç‡ ç‡¬ç‡§ç‡µç‡¼"], -["e0a1","燹燿çˆçˆçˆ›çˆ¨çˆçˆ¬çˆ°çˆ²çˆ»çˆ¼çˆ¿ç‰€ç‰†ç‰‹ç‰˜ç‰´ç‰¾çŠ‚çŠçŠ‡çŠ’çŠ–çŠ¢çŠ§çŠ¹çŠ²ç‹ƒç‹†ç‹„ç‹Žç‹’ç‹¢ç‹ ç‹¡ç‹¹ç‹·å€çŒ—猊猜猖çŒçŒ´çŒ¯çŒ©çŒ¥çŒ¾çŽç默ç—çªç¨ç°ç¸çµç»çºçˆçŽ³çŽçŽ»ç€ç¥ç®çžç’¢ç…瑯ç¥ç¸ç²çºç‘•ç¿ç‘Ÿç‘™ç‘瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊ç“ç“”ç±"], -["e1a1","ç“ ç“£ç“§ç“©ç“®ç“²ç“°ç“±ç“¸ç“·ç”„ç”ƒç”…ç”Œç”Žç”甕甓甞甦甬甼畄ç•ç•Šç•‰ç•›ç•†ç•šç•©ç•¤ç•§ç•«ç•ç•¸ç•¶ç–†ç–‡ç•´ç–Šç–‰ç–‚疔疚ç–疥疣痂疳痃疵疽疸疼疱ç—痊痒痙痣痞痾痿痼ç˜ç—°ç—ºç—²ç—³ç˜‹ç˜ç˜‰ç˜Ÿç˜§ç˜ 瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"], -["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂ç›ç›–盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸ç‡çšç¨ç«ç›ç¥ç¿ç¾ç¹çžŽçž‹çž‘çž çžžçž°çž¶çž¹çž¿çž¼çž½çž»çŸ‡çŸçŸ—çŸšçŸœçŸ£çŸ®çŸ¼ç Œç ’ç¤¦ç 礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], -["e3a1","ç£§ç£šç£½ç£´ç¤‡ç¤’ç¤‘ç¤™ç¤¬ç¤«ç¥€ç¥ ç¥—ç¥Ÿç¥šç¥•ç¥“ç¥ºç¥¿ç¦Šç¦ç¦§é½‹ç¦ªç¦®ç¦³ç¦¹ç¦ºç§‰ç§•ç§§ç§¬ç§¡ç§£ç¨ˆç¨ç¨˜ç¨™ç¨ 稟禀稱稻稾稷穃穗穉穡穢穩é¾ç©°ç©¹ç©½çªˆçª—窕窘窖窩竈窰窶竅竄窿邃竇竊ç«ç«ç«•ç«“站竚ç«ç«¡ç«¢ç«¦ç«ç«°ç¬‚ç¬ç¬Šç¬†ç¬³ç¬˜ç¬™ç¬žç¬µç¬¨ç¬¶ç"], -["e4a1","çºç¬„ç笋çŒç…çµç¥ç´ç§ç°ç±ç¬ç®ç®ç®˜ç®Ÿç®ç®œç®šç®‹ç®’ç®ç箙篋ç¯ç¯Œç¯ç®´ç¯†ç¯ç¯©ç°‘ç°”ç¯¦ç¯¥ç± ç°€ç°‡ç°“ç¯³ç¯·ç°—ç°ç¯¶ç°£ç°§ç°ªç°Ÿç°·ç°«ç°½ç±Œç±ƒç±”ç±ç±€ç±ç±˜ç±Ÿç±¤ç±–籥籬籵粃ç²ç²¤ç²ç²¢ç²«ç²¡ç²¨ç²³ç²²ç²±ç²®ç²¹ç²½ç³€ç³…糂糘糒糜糢鬻糯糲糴糶糺紆"], -["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮çµçµ£ç¶“綉絛ç¶çµ½ç¶›ç¶ºç¶®ç¶£ç¶µç·‡ç¶½ç¶«ç¸½ç¶¢ç¶¯ç·œç¶¸ç¶Ÿç¶°ç·˜ç·ç·¤ç·žç·»ç·²ç·¡ç¸…縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧ç¹ç¹–繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒çºçº“纔纖纎纛纜缸缺"], -["e6a1","罅罌ç½ç½Žç½ç½‘ç½•ç½”ç½˜ç½Ÿç½ ç½¨ç½©ç½§ç½¸ç¾‚ç¾†ç¾ƒç¾ˆç¾‡ç¾Œç¾”ç¾žç¾ç¾šç¾£ç¾¯ç¾²ç¾¹ç¾®ç¾¶ç¾¸è±ç¿…翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻èŠè†è’è˜èšèŸè¢è¨è³è²è°è¶è¹è½è¿è‚„肆肅肛肓肚è‚å†è‚¬èƒ›èƒ¥èƒ™èƒèƒ„胚胖脉胯胱脛脩脣脯腋"], -["e7a1","éš‹è…†è„¾è…“è…‘èƒ¼è…±è…®è…¥è…¦è…´è†ƒè†ˆè†Šè†€è†‚è† è†•è†¤è†£è…Ÿè†“è†©è†°è†µè†¾è†¸è†½è‡€è‡‚è†ºè‡‰è‡è‡‘è‡™è‡˜è‡ˆè‡šè‡Ÿè‡ è‡§è‡ºè‡»è‡¾èˆèˆ‚舅與舊èˆèˆèˆ–舩舫舸舳艀艙艘è‰è‰šè‰Ÿè‰¤è‰¢è‰¨è‰ªè‰«èˆ®è‰±è‰·è‰¸è‰¾èŠèŠ’芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"], -["e8a1","茵茴茖茲茱è€èŒ¹èè…茯茫茗茘莅莚莪莟莢莖茣莎莇莊è¼èŽµè³èµèŽ 莉莨è´è“è«èŽè½èƒè˜è‹èè·è‡è è²èè¢è 莽è¸è”†è»è‘èªè¼è•šè’„è‘·è‘«è’葮蒂葩葆è¬è‘¯è‘¹èµè“Šè‘¢è’¹è’¿è’Ÿè“™è“蒻蓚è“è“蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], -["e9a1","è•è˜‚蕋蕕薀薤薈薑薊薨è•è–”薛藪薇薜蕷蕾è–藉薺è—è–¹è—è—•è—藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿è™ä¹•è™”è™Ÿè™§è™±èš“èš£èš©èšªèš‹èšŒèš¶èš¯è›„è›†èš°è›‰è £èš«è›”è›žè›©è›¬è›Ÿè››è›¯èœ’èœ†èœˆèœ€èœƒè›»èœ‘èœ‰èœè›¹èœŠèœ´èœ¿èœ·èœ»èœ¥èœ©èœšè èŸè¸èŒèŽè´è—è¨è®è™"], -["eaa1","è“è£èªè …螢螟螂螯蟋螽蟀èŸé›–èž«èŸ„èž³èŸ‡èŸ†èž»èŸ¯èŸ²èŸ è è èŸ¾èŸ¶èŸ·è ŽèŸ’è ‘è –è •è ¢è ¡è ±è ¶è ¹è §è »è¡„è¡‚è¡’è¡™è¡žè¡¢è¡«è¢è¡¾è¢žè¡µè¡½è¢µè¡²è¢‚袗袒袮袙袢è¢è¢¤è¢°è¢¿è¢±è£ƒè£„裔裘裙è£è£¹è¤‚裼裴裨裲褄褌褊褓襃褞褥褪褫è¥è¥„褻褶褸襌è¤è¥ 襞"], -["eba1","襦襤è¥è¥ªè¥¯è¥´è¥·è¥¾è¦ƒè¦ˆè¦Šè¦“覘覡覩覦覬覯覲覺覽覿觀觚觜è§è§§è§´è§¸è¨ƒè¨–è¨è¨Œè¨›è¨è¨¥è¨¶è©è©›è©’詆詈詼è©è©¬è©¢èª…誂誄誨誡誑誥誦誚誣諄è«è«‚è«šè««è«³è«§è«¤è«±è¬”è« è«¢è«·è«žè«›è¬Œè¬‡è¬šè«¡è¬–è¬è¬—è¬ è¬³éž«è¬¦è¬«è¬¾è¬¨èèŒèèŽè‰è–è›èšè«"], -["eca1","èŸè¬è¯è´è½è®€è®Œè®Žè®’讓讖讙讚谺è±è°¿è±ˆè±Œè±Žè±è±•è±¢è±¬è±¸è±ºè²‚貉貅貊è²è²Žè²”豼貘æˆè²è²ªè²½è²²è²³è²®è²¶è³ˆè³è³¤è³£è³šè³½è³ºè³»è´„è´…è´Šè´‡è´è´è´é½Žè´“è³è´”贖赧èµèµ±èµ³è¶è¶™è·‚趾趺è·è·šè·–跌跛跋跪跫跟跣跼踈踉跿è¸è¸žè¸è¸Ÿè¹‚踵踰踴蹊"], -["eda1","蹇蹉蹌è¹è¹ˆè¹™è¹¤è¹ 踪蹣蹕蹶蹲蹼èºèº‡èº…躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣è¾è¾¯è¾·è¿šè¿¥è¿¢è¿ªè¿¯é‚‡è¿´é€…迹迺逑逕逡é€é€žé€–逋逧逶逵逹迸"], -["eea1","ééé‘é’逎é‰é€¾é–é˜éžé¨é¯é¶éš¨é²é‚‚é½é‚邀邊邉é‚邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀é‡é‡‰é‡‹é‡é‡–釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋é‰éŠœéŠ–銓銛鉚é‹éŠ¹éŠ·é‹©éŒé‹ºé„錮"], -["efa1","錙錢錚錣錺錵錻éœé é¼é®é–鎰鎬éŽéŽ”鎹é–é—é¨é¥é˜éƒéééˆé¤éšé”é“éƒé‡éé¶é«éµé¡éºé‘é‘’é‘„é‘›é‘ é‘¢é‘žé‘ªéˆ©é‘°é‘µé‘·é‘½é‘šé‘¼é‘¾é’é‘¿é–‚é–‡é–Šé–”é––é–˜é–™é– é–¨é–§é–閼閻閹閾闊濶闃é—闌闕闔闖關闡闥闢阡阨阮阯陂陌é™é™‹é™·é™œé™ž"], -["f0a1","é™é™Ÿé™¦é™²é™¬éšéš˜éš•éš—險隧隱隲隰隴隶隸隹雎雋雉é›è¥é›œéœé›•é›¹éœ„霆霈霓霎霑éœéœ–霙霤霪霰霹霽霾é„é†éˆé‚é‰éœé é¤é¦é¨å‹’é«é±é¹éž…é¼éžéºéž†éž‹éžéžéžœéž¨éž¦éž£éž³éž´éŸƒéŸ†éŸˆéŸ‹éŸœéŸé½éŸ²ç«ŸéŸ¶éŸµé é Œé ¸é ¤é ¡é ·é ½é¡†é¡é¡‹é¡«é¡¯é¡°"], -["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡é¤é¤žé¤¤é¤ 餬餮餽餾饂饉饅é¥é¥‹é¥‘饒饌饕馗馘馥é¦é¦®é¦¼é§Ÿé§›é§é§˜é§‘é§é§®é§±é§²é§»é§¸é¨é¨é¨…駢騙騫騷驅驂驀驃騾驕é©é©›é©—驟驢驥驤驩驫驪éªéª°éª¼é«€é«é«‘髓體髞髟髢髣髦髯髫髮髴髱髷"], -["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲é„éƒéééŽé‘é˜é´é®“é®ƒé®‘é®–é®—é®Ÿé® é®¨é®´é¯€é¯Šé®¹é¯†é¯é¯‘é¯’é¯£é¯¢é¯¤é¯”é¯¡é°ºé¯²é¯±é¯°é°•é°”é°‰é°“é°Œé°†é°ˆé°’é°Šé°„é°®é°›é°¥é°¤é°¡é°°é±‡é°²é±†é°¾é±šé± é±§é±¶é±¸é³§é³¬é³°é´‰é´ˆé³«é´ƒé´†é´ªé´¦é¶¯é´£é´Ÿéµ„é´•é´’éµé´¿é´¾éµ†éµˆ"], -["f3a1","éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶»é¶¸é¶ºé·†é·é·‚鷙鷓鷸鷦é·é·¯é·½é¸šé¸›é¸žé¹µé¹¹é¹½éºéºˆéº‹éºŒéº’麕麑éºéº¥éº©éº¸éºªéºé¡é»Œé»Žé»é»é»”黜點é»é» é»¥é»¨é»¯é»´é»¶é»·é»¹é»»é»¼é»½é¼‡é¼ˆçš·é¼•é¼¡é¼¬é¼¾é½Šé½’é½”é½£é½Ÿé½ é½¡é½¦é½§é½¬é½ªé½·é½²é½¶é¾•é¾œé¾ "], -["f4a1","å ¯æ§‡é™ç‘¤å‡œç†™"], -["f9a1","纊褜éˆéŠˆè“œä¿‰ç‚»æ˜±æ£ˆé‹¹æ›»å½…丨仡仼伀伃伹佖侒侊侚侔ä¿å€å€¢ä¿¿å€žå†å°å‚傔僴僘兊兤å†å†¾å‡¬åˆ•åŠœåŠ¦å‹€å‹›åŒ€åŒ‡åŒ¤å²åŽ“厲å﨎咜咊咩哿喆å™å¥åž¬åŸˆåŸ‡ï¨ï¨å¢žå¢²å¤‹å¥“奛å¥å¥£å¦¤å¦ºå–寀甯寘寬尞岦岺峵崧嵓﨑嵂åµå¶¸å¶¹å·å¼¡å¼´å½§å¾·"], -["faa1","å¿žææ‚…æ‚Šæƒžæƒ•æ„ æƒ²æ„‘æ„·æ„°æ†˜æˆ“æŠ¦æµæ‘ æ’æ“Žæ•Žæ˜€æ˜•æ˜»æ˜‰æ˜®æ˜žæ˜¤æ™¥æ™—æ™™ï¨’æ™³æš™æš æš²æš¿æ›ºæœŽï¤©æ¦æž»æ¡’柀æ æ¡„æ£ï¨“楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬æ·æ·¸æ·²æ·¼æ¸¹æ¹œæ¸§æ¸¼æº¿æ¾ˆæ¾µæ¿µç€…瀇瀨炅炫ç„焄煜煆煇凞ç‡ç‡¾çŠ±"], -["fba1","犾猤猪ç·çŽ½ç‰ç–ç£ç’ç‡çµç¦çªç©ç®ç‘¢ç’‰ç’Ÿç”畯皂皜皞皛皦益ç†åŠ¯ç ¡ç¡Žç¡¤ç¡ºç¤°ï¨˜ï¨™ï¨šç¦”福禛竑竧靖竫箞ï¨çµˆçµœç¶·ç¶ 緖繒罇羡羽èŒè¢è¿è‡è¶è‘ˆè’´è•“è•™è•«ï¨Ÿè–°ï¨ ï¨¡è ‡è£µè¨’è¨·è©¹èª§èª¾è«Ÿï¨¢è«¶è“è¿è³°è³´è´’赶﨣è»ï¨¤ï¨¥é§éƒžï¨¦é„•é„§é‡š"], -["fca1","釗釞é‡é‡®é‡¤é‡¥éˆ†éˆéˆŠéˆºé‰€éˆ¼é‰Žé‰™é‰‘鈹鉧銧鉷鉸鋧鋗鋙é‹ï¨§é‹•é‹ 鋓錥錡鋻﨨錞鋿éŒéŒ‚é°é—鎤é†éžé¸é±é‘…鑈閒隆﨩éšéš¯éœ³éœ»éƒééé‘é•é¡—顥飯飼餧館馞驎髙髜éµé²é®é®±é®»é°€éµ°éµ«ï¨é¸™é»‘"], -["fcf1","â…°",9,"¬¦'""], -["8fa2af","˘ˇ¸˙˯˛˚~΄΅"], -["8fa2c2","¡¦¿"], -["8fa2eb","ºª©®™¤№"], -["8fa6e1","ΆΈΉΊΪ"], -["8fa6e7","ÎŒ"], -["8fa6e9","ΎΫ"], -["8fa6ec","Î"], -["8fa6f1","άÎήίϊÎόςÏϋΰώ"], -["8fa7c2","Ђ",10,"ÐŽÐ"], -["8fa7f2","Ñ’",10,"ўџ"], -["8fa9a1","ÆÄ"], -["8fa9a4","Ħ"], -["8fa9a6","IJ"], -["8fa9a8","ÅÄ¿"], -["8fa9ab","ŊØŒ"], -["8fa9af","ŦÞ"], -["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"], -["8faaa1","ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"], -["8faaba","ÄœÄžÄ¢Ä Ä¤ÃÃŒÃÃŽÇİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑÅŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴßŶŹŽŻ"], -["8faba1","áà äâăǎÄąåãćĉÄçċÄéèëêěėēęǵÄÄŸ"], -["8fabbd","Ä¡Ä¥ÃìïîÇ"], -["8fabc5","īįĩĵķĺľļńňņñóòöôǒőÅõŕřŗśÅšşťţúùüûÅǔűūųůũǘǜǚǖŵýÿŷźžż"], -["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀ä¹ä¹„乇乑乚乜乣乨乩乴乵乹乿äºäº–亗äºäº¯äº¹ä»ƒä»ä»šä»›ä» ä»¡ä»¢ä»¨ä»¯ä»±ä»³ä»µä»½ä»¾ä»¿ä¼€ä¼‚ä¼ƒä¼ˆä¼‹ä¼Œä¼’ä¼•ä¼–ä¼—ä¼™ä¼®ä¼±ä½ ä¼³ä¼µä¼·ä¼¹ä¼»ä¼¾ä½€ä½‚ä½ˆä½‰ä½‹ä½Œä½’ä½”ä½–ä½˜ä½Ÿä½£ä½ªä½¬ä½®ä½±ä½·ä½¸ä½¹ä½ºä½½ä½¾ä¾ä¾‚侄"], -["8fb1a1","侅侉侊侌侎ä¾ä¾’侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀ä¿ä¿…俆俈俉俋俌ä¿ä¿ä¿’ä¿œä¿ ä¿¢ä¿°ä¿²ä¿¼ä¿½ä¿¿å€€å€å€„倇倊倌倎å€å€“倗倘倛倜å€å€žå€¢å€§å€®å€°å€²å€³å€µå€åå‚å…å†åŠåŒåŽå‘å’å“å—å™åŸå å¢å£å¦å§åªåå°å±å€»å‚傃傄傆傊傎å‚å‚"], -["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎åƒåƒ“僔僘僜åƒåƒŸåƒ¢åƒ¤åƒ¦åƒ¨åƒ©åƒ¯åƒ±åƒ¶åƒºåƒ¾å„ƒå„†å„‡å„ˆå„‹å„Œå„儎僲å„儗儙儛儜å„儞儣儧儨儬å„儯儱儳儴儵儸儹兂兊å…兓兕兗兘兟兤兦兾冃冄冋冎冘å†å†¡å†£å†å†¸å†ºå†¼å†¾å†¿å‡‚"], -["8fb3a1","凈å‡å‡‘凒凓凕凘凞凢凥凮凲凳凴凷åˆåˆ‚åˆ…åˆ’åˆ“åˆ•åˆ–åˆ˜åˆ¢åˆ¨åˆ±åˆ²åˆµåˆ¼å‰…å‰‰å‰•å‰—å‰˜å‰šå‰œå‰Ÿå‰ å‰¡å‰¦å‰®å‰·å‰¸å‰¹åŠ€åŠ‚åŠ…åŠŠåŠŒåŠ“åŠ•åŠ–åŠ—åŠ˜åŠšåŠœåŠ¤åŠ¥åŠ¦åŠ§åŠ¯åŠ°åŠ¶åŠ·åŠ¸åŠºåŠ»åŠ½å‹€å‹„å‹†å‹ˆå‹Œå‹å‹‘勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"], -["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬åŒåŒ°åŒ²åŒµåŒ¼åŒ½åŒ¾å‚åŒå‹å™å›å¡å£å¥å¬åå²å¹å¾åŽƒåŽ‡åŽˆåŽŽåŽ“厔厙åŽåŽ¡åŽ¤åŽªåŽ«åŽ¯åŽ²åŽ´åŽµåŽ·åŽ¸åŽºåŽ½å€å…åå’å“å•åšååžå å¦å§åµå‚å“åšå¡å§å¨åªå¯å±å´åµå‘ƒå‘„呇å‘å‘呞呢呤呦呧呩呫å‘呮呴呿"], -["8fb5a1","å’咃咅咈咉å’咑咕咖咜咟咡咦咧咩咪å’咮咱咷咹咺咻咿哆哊å“å“Žå“ å“ªå“¬å“¯å“¶å“¼å“¾å“¿å”€å”唅唈唉唌å”唎唕唪唫唲唵唶唻唼唽å•å•‡å•‰å•Šå•å•å•‘å•˜å•šå•›å•žå• å•¡å•¤å•¦å•¿å–喂喆喈喎å–喑喒喓喔喗喣喤å–喲喿å—嗃嗆嗉嗋嗌嗎嗑嗒"], -["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊å˜",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀å™å™ƒå™„噆噉噋å™å™å™”å™žå™ å™¡å™¢å™£å™¦å™©å™å™¯å™±å™²å™µåš„嚅嚈嚋嚌嚕嚙嚚åšåšžåšŸåš¦åš§åš¨åš©åš«åš¬åšåš±åš³åš·åš¾å›…囉囊囋å›å›å›Œå›å›™å›œå›å›Ÿå›¡å›¤",4,"囱囫å›"], -["8fb7a1","囶囷åœåœ‚圇圊圌圑圕圚圛åœåœ 圢圣圤圥圩圪圬圮圯圳圴圽圾圿å…å†åŒåå’å¢å¥å§å¨å«å",4,"å³å´åµå·å¹åºå»å¼å¾åžåžƒåžŒåž”垗垙垚垜åžåžžåžŸåž¡åž•åž§åž¨åž©åž¬åž¸åž½åŸ‡åŸˆåŸŒåŸåŸ•åŸåŸžåŸ¤åŸ¦åŸ§åŸ©åŸåŸ°åŸµåŸ¶åŸ¸åŸ½åŸ¾åŸ¿å ƒå „å ˆå ‰åŸ¡"], -["8fb8a1","å Œå å ›å žå Ÿå å ¦å §å å ²å ¹å ¿å¡‰å¡Œå¡å¡å¡å¡•å¡Ÿå¡¡å¡¤å¡§å¡¨å¡¸å¡¼å¡¿å¢€å¢å¢‡å¢ˆå¢‰å¢Šå¢Œå¢å¢å¢å¢”墖å¢å¢ 墡墢墦墩墱墲壄墼壂壈å£å£Žå£å£’壔壖壚å£å£¡å£¢å£©å£³å¤…夆夋夌夒夓夔è™å¤å¤¡å¤£å¤¤å¤¨å¤¯å¤°å¤³å¤µå¤¶å¤¿å¥ƒå¥†å¥’奓奙奛å¥å¥žå¥Ÿå¥¡å¥£å¥«å¥"], -["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧å¦å¦®å¦¯å¦°å¦³å¦·å¦ºå¦¼å§å§ƒå§„姈姊å§å§’å§å§žå§Ÿå§£å§¤å§§å§®å§¯å§±å§²å§´å§·å¨€å¨„娌å¨å¨Žå¨’娓娞娣娤娧娨娪å¨å¨°å©„婅婇婈婌å©å©•å©žå©£å©¥å©§å©å©·å©ºå©»å©¾åª‹åªåª“åª–åª™åªœåªžåªŸåª åª¢åª§åª¬åª±åª²åª³åªµåª¸åªºåª»åª¿"], -["8fbaa1","嫄嫆嫈å«å«šå«œå« 嫥嫪嫮嫵嫶嫽嬀å¬å¬ˆå¬—嬴嬙嬛å¬å¬¡å¬¥å¬å¬¸åå‹åŒå’å–åžå¨å®å¯å¼å½å¾å¿å®å®„宆宊宎å®å®‘宓宔宖宨宩宬å®å®¯å®±å®²å®·å®ºå®¼å¯€å¯å¯å¯å¯–",4,"å¯ å¯¯å¯±å¯´å¯½å°Œå°—å°žå°Ÿå°£å°¦å°©å°«å°¬å°®å°°å°²å°µå°¶å±™å±šå±œå±¢å±£å±§å±¨å±©"], -["8fbba1","å±å±°å±´å±µå±ºå±»å±¼å±½å²‡å²ˆå²Šå²å²’å²å²Ÿå² 岢岣岦岪岲岴岵岺峉峋峒å³å³—峮峱峲峴å´å´†å´å´’å´«å´£å´¤å´¦å´§å´±å´´å´¹å´½å´¿åµ‚åµƒåµ†åµˆåµ•åµ‘åµ™åµŠåµŸåµ åµ¡åµ¢åµ¤åµªåµåµ°åµ¹åµºåµ¾åµ¿å¶å¶ƒå¶ˆå¶Šå¶’å¶“å¶”å¶•å¶™å¶›å¶Ÿå¶ å¶§å¶«å¶°å¶´å¶¸å¶¹å·ƒå·‡å·‹å·å·Žå·˜å·™å· å·¤"], -["8fbca1","巩巸巹帀帇å¸å¸’å¸”å¸•å¸˜å¸Ÿå¸ å¸®å¸¨å¸²å¸µå¸¾å¹‹å¹å¹‰å¹‘幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜å¼å¼¡å¼¢å¼£å¼¤å¼¨å¼«å¼¬å¼®å¼°å¼´å¼¶å¼»å¼½å¼¿å½€å½„彅彇å½å½å½”å½˜å½›å½ å½£å½¤å½§"], -["8fbda1","彯彲彴彵彸彺彽彾徉å¾å¾å¾–徜å¾å¾¢å¾§å¾«å¾¤å¾¬å¾¯å¾°å¾±å¾¸å¿„忇忈忉忋å¿",4,"忞忡忢忨忩忪忬å¿å¿®å¿¯å¿²å¿³å¿¶å¿ºå¿¼æ€‡æ€Šæ€æ€“怔怗怘怚怟怤æ€æ€³æ€µæ€æ‡æˆæ‰æŒæ‘æ”æ–æ—ææ¡æ§æ±æ¾æ¿æ‚‚悆悈悊悎悑悓悕悘æ‚悞悢悤悥您悰悱悷"], -["8fbea1","悻悾惂惄惈惉惊惋惎æƒæƒ”惕惙惛æƒæƒžæƒ¢æƒ¥æƒ²æƒµæƒ¸æƒ¼æƒ½æ„‚愇愊愌æ„",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹æ…æ……æ…†æ…‰æ…žæ… æ…¬æ…²æ…¸æ…»æ…¼æ…¿æ†€æ†æ†ƒæ†„憋æ†æ†’憓憗憘憜æ†æ†Ÿæ† 憥憨憪æ†æ†¸æ†¹æ†¼æ‡€æ‡æ‡‚懎æ‡æ‡•æ‡œæ‡æ‡žæ‡Ÿæ‡¡æ‡¢æ‡§æ‡©æ‡¥"], -["8fbfa1","懬æ‡æ‡¯æˆæˆƒæˆ„æˆ‡æˆ“æˆ•æˆœæˆ æˆ¢æˆ£æˆ§æˆ©æˆ«æˆ¹æˆ½æ‰‚æ‰ƒæ‰„æ‰†æ‰Œæ‰æ‰‘扒扔扖扚扜扤æ‰æ‰¯æ‰³æ‰ºæ‰½æŠæŠŽæŠæŠæŠ¦æŠ¨æŠ³æŠ¶æŠ·æŠºæŠ¾æŠ¿æ‹„拎拕拖拚拪拲拴拼拽挃挄挊挋æŒæŒæŒ“挖挘挩挪æŒæŒµæŒ¶æŒ¹æŒ¼ææ‚æƒæ„æ†æŠæ‹æŽæ’æ“æ”æ˜æ›æ¥æ¦æ¬ææ±æ´æµ"], -["8fc0a1","æ¸æ¼æ½æ¿æŽ‚掄掇掊æŽæŽ”掕掙掚掞掤掦æŽæŽ®æŽ¯æŽ½ææ…æˆæŽæ‘æ“æ”æ•æœæ æ¥æªæ¬æ²æ³æµæ¸æ¹æ‰æŠææ’æ”æ˜æžæ æ¢æ¤æ¥æ©æªæ¯æ°æµæ½æ¿æ‘‹æ‘摑摒摓摔摚摛摜æ‘æ‘Ÿæ‘ æ‘¡æ‘£æ‘摳摴摻摽撅撇æ’æ’撑撘撙撛æ’撟撡撣撦撨撬撳撽撾撿"], -["8fc1a1","擄擉擊擋擌擎æ“擑擕擗擤擥擩擪æ“擰擵擷擻擿æ”攄攈攉攊æ”攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉æ•æ•’æ•”æ•Ÿæ• æ•§æ•«æ•ºæ•½æ–æ–…æ–Šæ–’æ–•æ–˜æ–æ– æ–£æ–¦æ–®æ–²æ–³æ–´æ–¿æ—‚æ—ˆæ—‰æ—Žæ—旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉æ˜æ˜‘昒昕昖æ˜"], -["8fc2a1","æ˜žæ˜¡æ˜¢æ˜£æ˜¤æ˜¦æ˜©æ˜ªæ˜«æ˜¬æ˜®æ˜°æ˜±æ˜³æ˜¹æ˜·æ™€æ™…æ™†æ™Šæ™Œæ™‘æ™Žæ™—æ™˜æ™™æ™›æ™œæ™ æ™¡æ›»æ™ªæ™«æ™¬æ™¾æ™³æ™µæ™¿æ™·æ™¸æ™¹æ™»æš€æ™¼æš‹æšŒæšæšæš’æš™æššæš›æšœæšŸæš æš¤æšæš±æš²æšµæš»æš¿æ›€æ›‚曃曈曌曎æ›æ›”æ››æ›Ÿæ›¨æ›«æ›¬æ›®æ›ºæœ…æœ‡æœŽæœ“æœ™æœœæœ æœ¢æœ³æœ¾æ…æ‡æˆæŒæ”æ•æ"], -["8fc3a1","æ¦æ¬æ®æ´æ¶æ»æžæž„枎æžæž‘æž“æž–æž˜æž™æž›æž°æž±æž²æžµæž»æž¼æž½æŸ¹æŸ€æŸ‚æŸƒæŸ…æŸˆæŸ‰æŸ’æŸ—æŸ™æŸœæŸ¡æŸ¦æŸ°æŸ²æŸ¶æŸ·æ¡’æ ”æ ™æ æ Ÿæ ¨æ §æ ¬æ æ ¯æ °æ ±æ ³æ »æ ¿æ¡„æ¡…æ¡Šæ¡Œæ¡•æ¡—æ¡˜æ¡›æ¡«æ¡®",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌æ£"], -["8fc4a1","æ£æ£‘棓棖棙棜æ£æ£¥æ£¨æ£ªæ£«æ£¬æ£æ£°æ£±æ£µæ£¶æ£»æ£¼æ£½æ¤†æ¤‰æ¤Šæ¤æ¤‘椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀æ¦æ¦’榖榘榡榥榦榨榫æ¦æ¦¯æ¦·æ¦¸æ¦ºæ¦¼æ§…槈槑槖槗槢槥槮槯槱槳槵槾樀æ¨æ¨ƒæ¨æ¨‘樕樚æ¨æ¨ 樤樨樰樲"], -["8fc5a1","樴樷樻樾樿橅橆橉橊橎æ©æ©‘橒橕橖橛橤橧橪橱橳橾æªæªƒæª†æª‡æª‰æª‹æª‘檛æªæªžæªŸæª¥æª«æª¯æª°æª±æª´æª½æª¾æª¿æ«†æ«‰æ«ˆæ«Œæ«æ«”æ«•æ«–æ«œæ«æ«¤æ«§æ«¬æ«°æ«±æ«²æ«¼æ«½æ¬‚欃欆欇欉æ¬æ¬æ¬‘欗欛欞欤欨欫欬欯欵欶欻欿æ†æŠææ’æ–æ˜ææ æ§æ«æ®æ°æµæ½"], -["8fc6a1","æ¾æ®‚æ®…æ®—æ®›æ®Ÿæ® æ®¢æ®£æ®¨æ®©æ®¬æ®æ®®æ®°æ®¸æ®¹æ®½æ®¾æ¯ƒæ¯„毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉æ°æ°Žæ°æ°’氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋æ±æ±æ±’汔汙汛汜汫æ±æ±¯æ±´æ±¶æ±¸æ±¹æ±»æ²…沆沇沉沔沕沗沘沜沟沰沲沴泂泆æ³æ³æ³æ³‘泒泔泖"], -["8fc7a1","æ³šæ³œæ³ æ³§æ³©æ³«æ³¬æ³®æ³²æ³´æ´„æ´‡æ´Šæ´Žæ´æ´‘洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎æ·æ·–æ·›æ·æ·Ÿæ· 淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋æ¹æ¹‘湒湓湔湗湜æ¹æ¹ž"], -["8fc8a1","湢湣湨湳湻湽æºæº“æº™æº æº§æºæº®æº±æº³æº»æº¿æ»€æ»æ»ƒæ»‡æ»ˆæ»Šæ»æ»Žæ»æ»«æ»æ»®æ»¹æ»»æ»½æ¼„漈漊漌æ¼æ¼–漘漚漛漦漩漪漯漰漳漶漻漼æ¼æ½æ½‘潒潓潗潙潚æ½æ½žæ½¡æ½¢æ½¨æ½¬æ½½æ½¾æ¾ƒæ¾‡æ¾ˆæ¾‹æ¾Œæ¾æ¾æ¾’æ¾“æ¾”æ¾–æ¾šæ¾Ÿæ¾ æ¾¥æ¾¦æ¾§æ¾¨æ¾®æ¾¯æ¾°æ¾µæ¾¶æ¾¼æ¿…æ¿‡æ¿ˆæ¿Š"], -["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇ç€ç€—ç€ ç€£ç€¯ç€´ç€·ç€¹ç€¼çƒç„çˆç‰çŠç‹ç”ç•ççžçŽç¤ç¥ç¬ç®çµç¶ç¾ç‚炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"ç„‹ç„Œç„ç„žç„ ç„«ç„焯焰焱焸ç…煅煆煇煊煋ç…ç…’ç…—ç…šç…œç…žç… "], -["8fcaa1","ç…¨ç…¹ç†€ç†…ç†‡ç†Œç†’ç†šç†›ç† ç†¢ç†¯ç†°ç†²ç†³ç†ºç†¿ç‡€ç‡ç‡„燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚çˆçˆŸçˆ¤çˆ«çˆ¯çˆ´çˆ¸çˆ¹ç‰ç‰‚牃牅牎ç‰ç‰ç‰“ç‰•ç‰–ç‰šç‰œç‰žç‰ ç‰£ç‰¨ç‰«ç‰®ç‰¯ç‰±ç‰·ç‰¸ç‰»ç‰¼ç‰¿çŠ„çŠ‰çŠçŠŽçŠ“犛犨çŠçŠ®çŠ±çŠ´çŠ¾ç‹ç‹‡ç‹‰ç‹Œç‹•ç‹–狘狟狥狳狴狺狻"], -["8fcba1","狾猂猄猅猇猋çŒçŒ’猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽çƒççç’ç–ç˜ççžçŸç ç¦ç§ç©ç«ç¬ç®ç¯ç±ç·ç¹ç¼çŽ€çŽçŽƒçŽ…玆玎çŽçŽ“çŽ•çŽ—çŽ˜çŽœçŽžçŽŸçŽ çŽ¢çŽ¥çŽ¦çŽªçŽ«çŽçŽµçŽ·çŽ¹çŽ¼çŽ½çŽ¿ç…ç†ç‰ç‹çŒçç’ç“ç–ç™çç¡ç£ç¦ç§ç©ç´çµç·ç¹çºç»ç½"], -["8fcca1","ç¿ç€çç„ç‡çŠç‘çšç›ç¤ç¦ç¨",9,"ç¹ç‘€ç‘ƒç‘„瑆瑇瑋ç‘ç‘‘ç‘’ç‘—ç‘瑢瑦瑧瑨瑫ç‘瑮瑱瑲璀ç’璅璆璇璉ç’ç’ç’‘ç’’ç’˜ç’™ç’šç’œç’Ÿç’ ç’¡ç’£ç’¦ç’¨ç’©ç’ªç’«ç’®ç’¯ç’±ç’²ç’µç’¹ç’»ç’¿ç“ˆç“‰ç“Œç“瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"], -["8fcda1","ç”’ç”–ç”—ç” ç”¡ç”¤ç”§ç”©ç”ªç”¯ç”¶ç”¹ç”½ç”¾ç”¿ç•€ç•ƒç•‡ç•ˆç•Žç•ç•’畗畞畟畡畯畱畹",5,"ç–ç–…ç–疒疓疕疙疜疢疤疴疺疿痀ç—痄痆痌痎ç—ç——ç—œç—Ÿç— ç—¡ç—¤ç—§ç—¬ç—®ç—¯ç—±ç—¹ç˜€ç˜‚ç˜ƒç˜„ç˜‡ç˜ˆç˜Šç˜Œç˜ç˜’瘓瘕瘖瘙瘛瘜ç˜ç˜žç˜£ç˜¥ç˜¦ç˜©ç˜ç˜²ç˜³ç˜µç˜¸ç˜¹"], -["8fcea1","瘺瘼癊癀ç™ç™ƒç™„癅癉癋癕癙癟癤癥ç™ç™®ç™¯ç™±ç™´çšçš…皌çšçš•çš›çšœçšçšŸçš 皢",6,"皪çšçš½ç›ç›…ç›‰ç›‹ç›Œç›Žç›”ç›™ç› ç›¦ç›¨ç›¬ç›°ç›±ç›¶ç›¹ç›¼çœ€çœ†çœŠçœŽçœ’çœ”çœ•çœ—çœ™çœšçœœçœ¢çœ¨çœçœ®çœ¯çœ´çœµçœ¶çœ¹çœ½çœ¾ç‚ç…ç†çŠççŽçç’ç–ç—çœçžçŸç ç¢"], -["8fcfa1","ç¤ç§çªç¬ç°ç²ç³ç´çºç½çž€çž„瞌çžçž”çž•çž–çžšçžŸçž¢çž§çžªçž®çž¯çž±çžµçž¾çŸƒçŸ‰çŸ‘çŸ’çŸ•çŸ™çŸžçŸŸçŸ çŸ¤çŸ¦çŸªçŸ¬çŸ°çŸ±çŸ´çŸ¸çŸ»ç …ç †ç ‰ç ç Žç ‘ç ç ¡ç ¢ç £ç ç ®ç °ç µç ·ç¡ƒç¡„ç¡‡ç¡ˆç¡Œç¡Žç¡’ç¡œç¡žç¡ ç¡¡ç¡£ç¡¤ç¡¨ç¡ªç¡®ç¡ºç¡¾ç¢Šç¢ç¢”碘碡ç¢ç¢žç¢Ÿç¢¤ç¢¨ç¢¬ç¢ç¢°ç¢±ç¢²ç¢³"], -["8fd0a1","ç¢»ç¢½ç¢¿ç£‡ç£ˆç£‰ç£Œç£Žç£’ç£“ç£•ç£–ç£¤ç£›ç£Ÿç£ ç£¡ç£¦ç£ªç£²ç£³ç¤€ç£¶ç£·ç£ºç£»ç£¿ç¤†ç¤Œç¤ç¤šç¤œç¤žç¤Ÿç¤ 礥礧礩ç¤ç¤±ç¤´ç¤µç¤»ç¤½ç¤¿ç¥„祅祆祊祋ç¥ç¥‘祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊ç§ç§”秖秚ç§ç§ž"], -["8fd1a1","ç§ ç§¢ç§¥ç§ªç§«ç§ç§±ç§¸ç§¼ç¨‚稃稇稉稊稌稑稕稛稞稡稧稫ç¨ç¨¯ç¨°ç¨´ç¨µç¨¸ç¨¹ç¨ºç©„穅穇穈穌穕穖穙穜ç©ç©Ÿç© 穥穧穪ç©ç©µç©¸ç©¾çª€çª‚窅窆窊窋çªçª‘çª”çªžçª çª£çª¬çª³çªµçª¹çª»çª¼ç«†ç«‰ç«Œç«Žç«‘ç«›ç«¨ç«©ç««ç«¬ç«±ç«´ç«»ç«½ç«¾ç¬‡ç¬”ç¬Ÿç¬£ç¬§ç¬©ç¬ªç¬«ç¬ç¬®ç¬¯ç¬°"], -["8fd2a1","笱笴笽笿ç€çç‡çŽç•ç ç¤ç¦ç©çªçç¯ç²ç³ç·ç®„箉箎ç®ç®‘ç®–ç®›ç®žç® ç®¥ç®¬ç®¯ç®°ç®²ç®µç®¶ç®ºç®»ç®¼ç®½ç¯‚ç¯…ç¯ˆç¯Šç¯”ç¯–ç¯—ç¯™ç¯šç¯›ç¯¨ç¯ªç¯²ç¯´ç¯µç¯¸ç¯¹ç¯ºç¯¼ç¯¾ç°ç°‚簃簄簆簉簋簌簎ç°ç°™ç°›ç° 簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5], -["8fd3a1","籡籣籧籩ç±ç±®ç±°ç±²ç±¹ç±¼ç±½ç²†ç²‡ç²ç²”ç²žç² ç²¦ç²°ç²¶ç²·ç²ºç²»ç²¼ç²¿ç³„ç³‡ç³ˆç³‰ç³ç³ç³“糔糕糗糙糚ç³ç³¦ç³©ç³«ç³µç´ƒç´‡ç´ˆç´‰ç´ç´‘ç´’ç´“ç´–ç´ç´žç´£ç´¦ç´ªç´ç´±ç´¼ç´½ç´¾çµ€çµçµ‡çµˆçµçµ‘絓絗絙絚絜çµçµ¥çµ§çµªçµ°çµ¸çµºçµ»çµ¿ç¶ç¶‚綃綅綆綈綋綌ç¶ç¶‘綖綗ç¶"], -["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"ç·Œç·ç·Žç·—緙縀緢緥緦緪緫ç·ç·±ç·µç·¶ç·¹ç·ºç¸ˆç¸ç¸‘縕縗縜ç¸ç¸ 縧縨縬ç¸ç¸¯ç¸³ç¸¶ç¸¿ç¹„繅繇繎ç¹ç¹’繘繟繡繢繥繫繮繯繳繸繾çºçº†çº‡çºŠçºçº‘纕纘纚çºçºžç¼¼ç¼»ç¼½ç¼¾ç¼¿ç½ƒç½„罇ç½ç½’罓罛罜ç½ç½¡ç½£ç½¤ç½¥ç½¦ç½"], -["8fd5a1","罱罽罾罿羀羋ç¾ç¾ç¾ç¾‘羖羗羜羡羢羦羪ç¾ç¾´ç¾¼ç¾¿ç¿€ç¿ƒç¿ˆç¿Žç¿ç¿›ç¿Ÿç¿£ç¿¥ç¿¨ç¿¬ç¿®ç¿¯ç¿²ç¿ºç¿½ç¿¾ç¿¿è€‡è€ˆè€Šè€è€Žè€è€‘耓耔耖è€è€žè€Ÿè€ 耤耦耬耮耰耴耵耷耹耺耼耾è€è„è è¤è¦èè±èµè‚肈肎肜肞肦肧肫肸肹胈èƒèƒèƒ’èƒ”èƒ•èƒ—èƒ˜èƒ èƒèƒ®"], -["8fd6a1","èƒ°èƒ²èƒ³èƒ¶èƒ¹èƒºèƒ¾è„ƒè„‹è„–è„—è„˜è„œè„žè„ è„¤è„§è„¬è„°è„µè„ºè„¼è……è…‡è…Šè…Œè…’è…—è… è…¡è…§è…¨è…©è…腯腷è†è†è†„膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎è‡è‡•è‡—臛è‡è‡žè‡¡è‡¤è‡«è‡¬è‡°è‡±è‡²è‡µè‡¶è‡¸è‡¹è‡½è‡¿èˆ€èˆƒèˆèˆ“舔舙舚èˆèˆ¡èˆ¢èˆ¨èˆ²èˆ´èˆºè‰ƒè‰„艅艆"], -["8fd7a1","艋艎è‰è‰‘è‰–è‰œè‰ è‰£è‰§è‰è‰´è‰»è‰½è‰¿èŠ€èŠèŠƒèŠ„èŠ‡èŠ‰èŠŠèŠŽèŠ‘èŠ”èŠ–èŠ˜èŠšèŠ›èŠ èŠ¡èŠ£èŠ¤èŠ§èŠ¨èŠ©èŠªèŠ®èŠ°èŠ²èŠ´èŠ·èŠºèŠ¼èŠ¾èŠ¿è‹†è‹è‹•è‹šè‹ 苢苤苨苪è‹è‹¯è‹¶è‹·è‹½è‹¾èŒ€èŒèŒ‡èŒˆèŒŠèŒ‹è”茛èŒèŒžèŒŸèŒ¡èŒ¢èŒ¬èŒèŒ®èŒ°èŒ³èŒ·èŒºèŒ¼èŒ½è‚èƒè„è‡èèŽè‘è•è–è—è°è¸"], -["8fd8a1","è½è¿èŽ€èŽ‚莄莆èŽèŽ’莔莕莘莙莛莜èŽèŽ¦èŽ§èŽ©èŽ¬èŽ¾èŽ¿è€è‡è‰èèè‘è”èè“è¨èªè¶è¸è¹è¼èè†èŠèè‘è•è™èŽè¯è¹è‘…葇葈葊è‘è‘è‘‘è‘’è‘–è‘˜è‘™è‘šè‘œè‘ è‘¤è‘¥è‘§è‘ªè‘°è‘³è‘´è‘¶è‘¸è‘¼è‘½è’蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌è“è““"], -["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎è”蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆è•",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿è–薅薆薉薋薌è–è–“è–˜è–è–Ÿè– è–¢è–¥è–§è–´è–¶è–·è–¸è–¼è–½è–¾è–¿è—‚è—‡è—Šè—‹è—Žè–è—˜è—šè—Ÿè— è—¦è—¨è—藳藶藼"], -["8fdaa1","藿蘀蘄蘅è˜è˜Žè˜è˜‘蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙è™è™ ",4,"虩虬虯虵虶虷虺èšèš‘蚖蚘蚚蚜蚡蚦蚧蚨èšèš±èš³èš´èšµèš·èš¸èš¹èš¿è›€è›è›ƒè›…è›‘è›’è›•è›—è›šè›œè› è›£è›¥è›§èšˆè›ºè›¼è›½èœ„èœ…èœ‡èœ‹èœŽèœèœèœ“蜔蜙蜞蜟蜡蜣"], -["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾è€èƒè…èè˜èè¡è¤è¥è¯è±è²è»èžƒ",6,"螋螌èžèž“èž•èž—èž˜èž™èžžèž èž£èž§èž¬èžèž®èž±èžµèž¾èž¿èŸèŸˆèŸ‰èŸŠèŸŽèŸ•èŸ–蟙蟚蟜蟟蟢蟣蟤蟪蟫èŸèŸ±èŸ³èŸ¸èŸºèŸ¿è è ƒè †è ‰è Šè ‹è è ™è ’è “è ”è ˜è šè ›è œè žè Ÿè ¨è è ®è °è ²è µ"], -["8fdca1","è ºè ¼è¡è¡ƒè¡…è¡ˆè¡‰è¡Šè¡‹è¡Žè¡‘è¡•è¡–è¡˜è¡šè¡œè¡Ÿè¡ è¡¤è¡©è¡±è¡¹è¡»è¢€è¢˜è¢šè¢›è¢œè¢Ÿè¢ è¢¨è¢ªè¢ºè¢½è¢¾è£€è£Š",4,"裑裒裓裛裞裧裯裰裱裵裷è¤è¤†è¤è¤Žè¤è¤•è¤–è¤˜è¤™è¤šè¤œè¤ è¤¦è¤§è¤¨è¤°è¤±è¤²è¤µè¤¹è¤ºè¤¾è¥€è¥‚è¥…è¥†è¥‰è¥è¥’襗襚襛襜襡襢襣襫襮襰襳襵襺"], -["8fdda1","襻襼襽覉è¦è¦è¦”è¦•è¦›è¦œè¦Ÿè¦ è¦¥è¦°è¦´è¦µè¦¶è¦·è¦¼è§”",4,"觥觩觫è§è§±è§³è§¶è§¹è§½è§¿è¨„訅訇è¨è¨‘è¨’è¨”è¨•è¨žè¨ è¨¢è¨¤è¨¦è¨«è¨¬è¨¯è¨µè¨·è¨½è¨¾è©€è©ƒè©…è©‡è©‰è©è©Žè©“詖詗詘詜è©è©¡è©¥è©§è©µè©¶è©·è©¹è©ºè©»è©¾è©¿èª€èªƒèª†èª‹èªèªèª’誖誗誙誟誧誩誮誯誳"], -["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗è«è«Ÿè«¬è«°è«´è«µè«¶è«¼è«¿è¬…謆謋謑謜謞謟謊è¬è¬°è¬·è¬¼è‚",4,"èˆè’è“è”è™èèžè£èè¶è¸è¹è¼è¾è®è®„讅讋è®è®è®”讕讜讞讟谸谹谽谾豅豇豉豋è±è±‘豓豔豗豘豛è±è±™è±£è±¤è±¦è±¨è±©è±è±³è±µè±¶è±»è±¾è²†"], -["8fdfa1","貇貋è²è²’貓貙貛貜貤貹貺賅賆賉賋è³è³–賕賙è³è³¡è³¨è³¬è³¯è³°è³²è³µè³·è³¸è³¾è³¿è´è´ƒè´‰è´’贗贛赥赩赬赮赿趂趄趈è¶è¶è¶‘è¶•è¶žè¶Ÿè¶ è¶¦è¶«è¶¬è¶¯è¶²è¶µè¶·è¶¹è¶»è·€è·…è·†è·‡è·ˆè·Šè·Žè·‘è·”è·•è·—è·™è·¤è·¥è·§è·¬è·°è¶¼è·±è·²è·´è·½è¸è¸„è¸…è¸†è¸‹è¸‘è¸”è¸–è¸ è¸¡è¸¢"], -["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀è¹è¹‹è¹è¹Žè¹è¹”蹛蹜è¹è¹žè¹¡è¹¢è¹©è¹¬è¹è¹¯è¹°è¹±è¹¹è¹ºè¹»èº‚躃躉èºèº’躕躚躛èºèºžèº¢èº§èº©èºèº®èº³èºµèººèº»è»€è»è»ƒè»„軇è»è»‘軔軜軨軮軰軱軷軹軺è»è¼€è¼‚輇輈è¼è¼è¼–è¼—è¼˜è¼žè¼ è¼¡è¼£è¼¥è¼§è¼¨è¼¬è¼è¼®è¼´è¼µè¼¶è¼·è¼ºè½€è½"], -["8fe1a1","轃轇è½è½‘",4,"轘è½è½žè½¥è¾è¾ 辡辤辥辦辵辶辸达迀è¿è¿†è¿Šè¿‹è¿è¿è¿’è¿“è¿•è¿ è¿£è¿¤è¿¨è¿®è¿±è¿µè¿¶è¿»è¿¾é€‚é€„é€ˆé€Œé€˜é€›é€¨é€©é€¯é€ªé€¬é€é€³é€´é€·é€¿éƒé„éŒé›éé¢é¦é§é¬é°é´é¹é‚…邈邋邌邎é‚é‚•é‚—é‚˜é‚™é‚›é‚ é‚¡é‚¢é‚¥é‚°é‚²é‚³é‚´é‚¶é‚½éƒŒé‚¾éƒƒ"], -["8fe2a1","郄郅郇郈郕郗郘郙郜éƒéƒŸéƒ¥éƒ’郶郫郯郰郴郾郿鄀鄄鄅鄆鄈é„é„é„”é„–é„—é„˜é„šé„œé„žé„ é„¥é„¢é„£é„§é„©é„®é„¯é„±é„´é„¶é„·é„¹é„ºé„¼é„½é…ƒé…‡é…ˆé…酓酗酙酚酛酡酤酧é…酴酹酺酻é†é†ƒé†…醆醊醎醑醓醔醕醘醞醡醦醨醬é†é†®é†°é†±é†²é†³é†¶é†»é†¼é†½é†¿"], -["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀éˆéˆ„鈅鈆鈇鈉鈊鈌éˆéˆ’鈓鈖鈘鈜éˆéˆ£éˆ¤éˆ¥éˆ¦éˆ¨éˆ®éˆ¯éˆ°éˆ³éˆµéˆ¶éˆ¸éˆ¹éˆºéˆ¼éˆ¾é‰€é‰‚鉃鉆鉇鉊é‰é‰Žé‰é‰‘鉘鉙鉜é‰é‰ 鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊éŠéŠŽéŠ’銗"], -["8fe4a1","éŠ™éŠŸéŠ éŠ¤éŠ¥éŠ§éŠ¨éŠ«éŠ¯éŠ²éŠ¶éŠ¸éŠºéŠ»éŠ¼éŠ½éŠ¿",4,"鋅鋆鋇鋈鋋鋌é‹é‹Žé‹é‹“鋕鋗鋘鋙鋜é‹é‹Ÿé‹ 鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈éŒéŒ‘錔錕錜éŒéŒžéŒŸéŒ¡éŒ¤éŒ¥éŒ§éŒ©éŒªéŒ³éŒ´éŒ¶éŒ·é‡éˆé‰éé‘é’é•é—é˜éšéžé¤é¥é§é©éªéé¯é°é±é³é´é¶"], -["8fe5a1","éºé½é¿éŽ€éŽéŽ‚鎈鎊鎋éŽéŽéŽ’鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩éé„é…é†é‡é‰",4,"é“é™éœéžéŸé¢é¦é§é¹é·é¸éºé»é½éé‚é„éˆé‰ééŽéé•é–é—éŸé®é¯é±é²é³é´é»é¿é½é‘ƒé‘…鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫é‘鑮鑯鑱鑲钄钃镸镹"], -["8fe6a1","镾閄閈閌é–é–Žé–閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋é—闑闒闓闙闚é—é—žé—Ÿé— é—¤é—¦é˜é˜žé˜¢é˜¤é˜¥é˜¦é˜¬é˜±é˜³é˜·é˜¸é˜¹é˜ºé˜¼é˜½é™é™’陔陖陗陘陡陮陴陻陼陾陿éšéš‚隃隄隉隑隖隚éšéšŸéš¤éš¥éš¦éš©éš®éš¯éš³éšºé›Šé›’嶲雘雚é›é›žé›Ÿé›©é›¯é›±é›ºéœ‚"], -["8fe7a1","霃霅霉霚霛éœéœ¡éœ¢éœ£éœ¨éœ±éœ³ééƒéŠéŽéé•é—é˜éšé›é£é§éªé®é³é¶é·é¸é»é½é¿éž€éž‰éž•éž–鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿éŸéŸ„韅韇韉韊韌éŸéŸŽéŸéŸ‘韔韗韘韙éŸéŸžéŸ éŸ›éŸ¡éŸ¤éŸ¯éŸ±éŸ´éŸ·éŸ¸éŸºé ‡é Šé ™é é Žé ”é –é œé žé é £é ¦"], -["8fe8a1","é «é ®é ¯é °é ²é ³é µé ¥é ¾é¡„é¡‡é¡Šé¡‘é¡’é¡“é¡–é¡—é¡™é¡šé¡¢é¡£é¡¥é¡¦é¡ªé¡¬é¢«é¢é¢®é¢°é¢´é¢·é¢¸é¢ºé¢»é¢¿é£‚飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀é¥é¥†é¥‡é¥ˆé¥é¥Žé¥”é¥˜é¥™é¥›é¥œé¥žé¥Ÿé¥ é¦›é¦é¦Ÿé¦¦é¦°é¦±é¦²é¦µ"], -["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌é¨é¨‘é¨–é¨žé¨ é¨¢é¨£é¨¤é¨§é¨é¨®é¨³é¨µé¨¶é¨¸é©‡é©é©„驊驋驌驎驑驔驖é©éªªéª¬éª®éª¯éª²éª´éªµéª¶éª¹éª»éª¾éª¿é«é«ƒé«†é«ˆé«Žé«é«’é«•é«–é«—é«›é«œé« é«¤é«¥é«§é«©é«¬é«²é«³é«µé«¹é«ºé«½é«¿",4], -["8feaa1","鬄鬅鬈鬉鬋鬌é¬é¬Žé¬é¬’é¬–é¬™é¬›é¬œé¬ é¬¦é¬«é¬é¬³é¬´é¬µé¬·é¬¹é¬ºé¬½éˆé‹éŒé•é–é—é›éžé¡é£é¥é¦é¨éª",4,"é³éµé·é¸é¹é¿é®€é®„鮅鮆鮇鮉鮊鮋é®é®é®é®”鮚é®é®žé®¦é®§é®©é®¬é®°é®±é®²é®·é®¸é®»é®¼é®¾é®¿é¯é¯‡é¯ˆé¯Žé¯é¯—鯘é¯é¯Ÿé¯¥é¯§é¯ªé¯«é¯¯é¯³é¯·é¯¸"], -["8feba1","鯹鯺鯽鯿鰀鰂鰋é°é°‘鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽é±é±ƒé±„鱅鱉鱊鱎é±é±é±“鱔鱖鱘鱛é±é±žé±Ÿé±£é±©é±ªé±œé±«é±¨é±®é±°é±²é±µé±·é±»é³¦é³²é³·é³¹é´‹é´‚鴑鴗鴘鴜é´é´žé´¯é´°é´²é´³é´´é´ºé´¼éµ…鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"], -["8feca1","鵼鵾鶃鶄鶆鶊é¶é¶Žé¶’é¶“é¶•é¶–é¶—é¶˜é¶¡é¶ªé¶¬é¶®é¶±é¶µé¶¹é¶¼é¶¿é·ƒé·‡é·‰é·Šé·”é·•é·–é·—é·šé·žé·Ÿé· é·¥é·§é·©é·«é·®é·°é·³é·´é·¾é¸Šé¸‚é¸‡é¸Žé¸é¸‘鸒鸕鸖鸙鸜é¸é¹ºé¹»é¹¼éº€éº‚麃麄麅麇麎éºéº–麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬é»é»®é»°é»±é»²é»µ"], -["8feda1","黸黿鼂鼃鼉é¼é¼é¼‘鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒ",4,"齓齕齖齗齘齚é½é½žé½¨é½©é½",4,"齳齵齺齽é¾é¾é¾‘龒龔龖龗龞龡龢龣龥"] -] diff --git a/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json deleted file mode 100644 index 85c6934757761e98580abf0c26c351b6fdfd6ad5..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +++ /dev/null @@ -1 +0,0 @@ -{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]} \ No newline at end of file diff --git a/node_modules/iconv-lite/encodings/tables/gbk-added.json b/node_modules/iconv-lite/encodings/tables/gbk-added.json deleted file mode 100644 index 8abfa9f7b987ad6effc35544dbc488d9c67e0c5e..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/tables/gbk-added.json +++ /dev/null @@ -1,55 +0,0 @@ -[ -["a140","",62], -["a180","î”…",32], -["a240","",62], -["a280","î•¥",32], -["a2ab","î¦",5], -["a2e3","€î"], -["a2ef","î®î¯"], -["a2fd","î°î±"], -["a340","î–†",62], -["a380","î—…",31," "], -["a440","î—¦",62], -["a480","",32], -["a4f4","î²",10], -["a540","",62], -["a580","îš…",32], -["a5f7","î½",7], -["a640","",62], -["a680","",32], -["a6b9","îž…",7], -["a6d9","îž",6], -["a6ec",""], -["a6f3","îž–"], -["a6f6","îž—",8], -["a740","",62], -["a780","î…",32], -["a7c2","îž ",14], -["a7f2","",12], -["a896","îž¼",10], -["a8bc",""], -["a8bf","ǹ"], -["a8c1",""], -["a8ea","îŸ",20], -["a958",""], -["a95b",""], -["a95d",""], -["a989","〾⿰",11], -["a997","",12], -["a9f0","î ",14], -["aaa1","",93], -["aba1","îž",93], -["aca1","",93], -["ada1","î„š",93], -["aea1","î…¸",93], -["afa1","",93], -["d7fa","î ",4], -["f8a1","",93], -["f9a1","",93], -["faa1","î‹°",93], -["fba1","îŽ",93], -["fca1","",93], -["fda1","îŠ",93], -["fe50","âºî –î —î ˜âº„ã‘³ã‘‡âºˆâº‹î žã–žã˜šã˜ŽâºŒâº—ã¥®ã¤˜î ¦ã§ã§Ÿã©³ã§î «î ¬ãŽã±®ã³ âº§î ±î ²âºªä–ä…Ÿâº®äŒ·âº³âº¶âº·î »äŽ±äŽ¬âº»ä䓖䙡䙌"], -["fe80","䜣䜩ä¼äžâ»Šä¥‡ä¥ºä¥½ä¦‚ä¦ƒä¦…ä¦†ä¦Ÿä¦›ä¦·ä¦¶î¡”î¡•ä²£ä²Ÿä² ä²¡ä±·ä²¢ä´“",6,"䶮",93] -] diff --git a/node_modules/iconv-lite/encodings/tables/shiftjis.json b/node_modules/iconv-lite/encodings/tables/shiftjis.json deleted file mode 100644 index 5a3a43cf8cf6d20324a49b75aff87d1bf902d108..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/tables/shiftjis.json +++ /dev/null @@ -1,125 +0,0 @@ -[ -["0","\u0000",128], -["a1","。",62], -["8140"," ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½ãƒ¾ã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ï½žâˆ¥ï½œâ€¦â€¥â€˜â€™â€œâ€ï¼ˆï¼‰ã€”〕[]{ï½ã€ˆ",9,"+ï¼Â±Ã—"], -["8180","÷ï¼â‰ ï¼œï¼žâ‰¦â‰§âˆžâˆ´â™‚â™€Â°â€²â€³â„ƒï¿¥ï¼„ï¿ ï¿¡ï¼…ï¼ƒï¼†ï¼Šï¼ Â§â˜†â˜…â—‹â—◎◇◆□■△▲▽▼※〒→â†â†‘↓〓"], -["81b8","∈∋⊆⊇⊂⊃∪∩"], -["81c8","∧∨¬⇒⇔∀∃"], -["81da","∠⊥⌒∂∇≡≒≪≫√∽âˆâˆµâˆ«âˆ¬"], -["81f0","ʼn♯â™â™ªâ€ ‡¶"], -["81fc","â—¯"], -["824f","ï¼",9], -["8260","A",25], -["8281","ï½",25], -["829f","ã",82], -["8340","ã‚¡",62], -["8380","ム",22], -["839f","Α",16,"Σ",6], -["83bf","α",16,"σ",6], -["8440","Ð",5,"ÐЖ",25], -["8470","а",5,"ёж",7], -["8480","о",17], -["849f","─│┌â”┘└├┬┤┴┼â”┃â”┓┛┗┣┳┫┻╋┠┯┨┷┿â”┰┥┸╂"], -["8740","â‘ ",19,"â… ",9], -["875f","ã‰ãŒ”㌢ã㌘㌧㌃㌶ã‘ã—ãŒãŒ¦ãŒ£ãŒ«ãŠãŒ»ãŽœãŽãŽžãŽŽãŽã„㎡"], -["877e","ã»"], -["8780","ã€ã€Ÿâ„–ã℡㊤",4,"㈱㈲㈹ã¾ã½ã¼â‰’≡∫∮∑√⊥∠∟⊿∵∩∪"], -["889f","亜唖娃阿哀愛挨姶逢葵茜ç©æ‚ªæ¡æ¸¥æ—葦芦鯵梓圧斡扱宛å§è™»é£´çµ¢ç¶¾é®Žæˆ–粟袷安庵按暗案闇éžæ以伊ä½ä¾å‰å›²å¤·å§”å¨å°‰æƒŸæ„慰易椅為ç•ç•°ç§»ç¶ç·¯èƒƒèŽè¡£è¬‚é•éºåŒ»äº•äº¥åŸŸè‚²éƒç£¯ä¸€å£±æº¢é€¸ç¨²èŒ¨èŠ‹é°¯å…å°å’½å“¡å› 姻引飲淫胤è”"], -["8940","é™¢é™°éš éŸ»å‹å³å®‡çƒç¾½è¿‚雨å¯éµœçªºä¸‘碓臼渦嘘唄æ¬è”šé°»å§¥åŽ©æµ¦ç“œé–噂云é‹é›²è餌å¡å–¶å¬°å½±æ˜ æ›³æ „æ°¸æ³³æ´©ç‘›ç›ˆç©Žé ´è‹±è¡›è© é‹æ¶²ç–«ç›Šé§…悦è¬è¶Šé–²æ¦ŽåŽå††"], -["8980","åœ’å °å¥„å®´å»¶æ€¨æŽ©æ´æ²¿æ¼”炎焔煙燕猿ç¸è‰¶è‹‘è–—é 鉛鴛塩於汚甥凹央奥往応押旺横欧殴王ç¿è¥–鴬鴎黄岡沖è»å„„屋憶臆桶牡乙俺å¸æ©æ¸©ç©éŸ³ä¸‹åŒ–ä»®ä½•ä¼½ä¾¡ä½³åŠ å¯å˜‰å¤å«å®¶å¯¡ç§‘暇果架æŒæ²³ç«ç‚ç¦ç¦¾ç¨¼ç®‡èŠ±è‹›èŒ„è·è¯è“è¦èª²å˜©è²¨è¿¦éŽéœžèšŠä¿„峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔æ¢æ‡æˆ’æ‹æ”¹"], -["8a40","é晦械海ç°ç•Œçš†çµµèŠ¥èŸ¹é–‹éšŽè²å‡±åŠ¾å¤–咳害崖慨概涯ç¢è“‹è¡—該鎧骸浬馨蛙垣柿蛎鈎劃嚇å„å»“æ‹¡æ’¹æ ¼æ ¸æ®»ç²ç¢ºç©«è¦šè§’赫較éƒé–£éš”é©å¦å²³æ¥½é¡é¡ŽæŽ›ç¬ 樫"], -["8a80","橿梶é°æ½Ÿå‰²å–æ°æ‹¬æ´»æ¸‡æ»‘è‘›è¤è½„且鰹å¶æ¤›æ¨ºéž„æ ªå…œç«ƒè’²é‡œéŽŒå™›é´¨æ ¢èŒ…è±ç²¥åˆˆè‹…ç“¦ä¹¾ä¾ƒå† å¯’åˆŠå‹˜å‹§å·»å–šå ªå§¦å®Œå®˜å¯›å¹²å¹¹æ‚£æ„Ÿæ…£æ†¾æ›æ•¢æŸ‘桓棺款æ“汗漢澗潅環甘監看竿管簡緩缶翰è‚艦莞観諌貫還鑑間閑関陥韓館舘丸å«å²¸å·ŒçŽ©ç™Œçœ¼å²©ç¿«è´‹é›é ‘顔願ä¼ä¼Žå±å–œå™¨åŸºå¥‡å¬‰å¯„å²å¸Œå¹¾å¿Œæ®æœºæ——既期棋棄"], -["8b40","機帰毅気汽畿祈å£ç¨€ç´€å¾½è¦è¨˜è²´èµ·è»Œè¼é£¢é¨Žé¬¼äº€å½å„€å¦“å®œæˆ¯æŠ€æ“¬æ¬ºçŠ ç–‘ç¥‡ç¾©èŸ»èª¼è°æŽ¬èŠéž å‰åƒå–«æ¡”æ©˜è©°ç §æµé»å´å®¢è„šè™é€†ä¸˜ä¹…仇休åŠå¸å®®å¼“急救"], -["8b80","朽求汲泣ç¸çƒç©¶çª®ç¬ˆç´šç³¾çµ¦æ—§ç‰›åŽ»å±…å·¨æ‹’æ‹ æŒ™æ¸ è™šè¨±è·é‹¸æ¼ç¦¦éšäº¨äº«äº¬ä¾›ä¾ 僑兇競共凶å”匡å¿å«å–¬å¢ƒå³¡å¼·å½Šæ€¯ææ挟教橋æ³ç‹‚ç‹çŸ¯èƒ¸è„…興蕎郷é¡éŸ¿é¥—é©šä»°å‡å°æšæ¥å±€æ›²æ¥µçŽ‰æ¡ç²åƒ…勤å‡å·¾éŒ¦æ–¤æ¬£æ¬½ç´ç¦ç¦½ç‹ç·ŠèŠ¹èŒè¡¿è¥Ÿè¬¹è¿‘金åŸéŠ€ä¹å€¶å¥åŒºç‹—玖矩苦躯駆駈駒具愚虞喰空å¶å¯“é‡éš…串櫛釧屑屈"], -["8c40","掘窟沓é´è½¡çªªç†Šéšˆç²‚æ —ç¹°æ¡‘é¬å‹²å›è–«è¨“群è»éƒ¡å¦è¢ˆç¥ä¿‚傾刑兄啓åœçªåž‹å¥‘形径æµæ…¶æ…§æ†©æŽ²æºæ•¬æ™¯æ¡‚渓畦稽系経継繋罫茎èŠè›è¨ˆè©£è¦è»½é šé¶èŠ¸è¿Žé¯¨"], -["8c80","劇戟撃激隙æ¡å‚‘æ¬ æ±ºæ½”ç©´çµè¡€è¨£æœˆä»¶å€¹å€¦å¥å…¼åˆ¸å‰£å–§åœå …嫌建憲懸拳æ²æ¤œæ¨©ç‰½çŠ¬çŒ®ç ”硯絹県肩見謙賢軒é£éµé™ºé¡•é¨“鹸元原厳幻弦減æºçŽ„ç¾çµƒèˆ·è¨€è«ºé™ä¹Žå€‹å¤å‘¼å›ºå§‘å¤å·±åº«å¼§æˆ¸æ•…枯湖ç‹ç³Šè¢´è‚¡èƒ¡è°è™Žèª‡è·¨éˆ·é›‡é¡§é¼“五互ä¼åˆå‘‰å¾å¨¯å¾Œå¾¡æ‚Ÿæ¢§æªŽç‘šç¢èªžèª¤è·é†ä¹žé¯‰äº¤ä½¼ä¾¯å€™å€–光公功効勾厚å£å‘"], -["8d40","åŽå–‰å‘垢好å”åå®å·¥å·§å··å¹¸åºƒåºšåº·å¼˜æ’慌抗拘控攻昂晃更ææ ¡æ¢—æ§‹æ±Ÿæ´ªæµ©æ¸¯æºç”²çš‡ç¡¬ç¨¿ç³ 紅紘絞綱耕考肯肱腔è†èˆªè’è¡Œè¡¡è¬›è²¢è³¼éƒŠé…µé‰±ç ¿é‹¼é–¤é™"], -["8d80","é …é¦™é«˜é´»å‰›åŠ«å·åˆå£•æ‹·æ¿ è±ªè½Ÿéº¹å…‹åˆ»å‘Šå›½ç©€é…·éµ é»’ç„漉腰甑忽惚骨狛込æ¤é ƒä»Šå›°å¤å¢¾å©šæ¨æ‡‡æ˜æ˜†æ ¹æ¢±æ··ç—•ç´ºè‰®é‚些ä½å‰å”†åµ¯å·¦å·®æŸ»æ²™ç‘³ç ‚è©éŽ–裟å座挫債催å†æœ€å“‰å¡žå¦»å®°å½©æ‰æŽ¡æ ½æ³æ¸ˆç½é‡‡çŠ€ç •ç ¦ç¥æ–Žç´°èœè£è¼‰éš›å‰¤åœ¨æ罪財冴å‚é˜ªå ºæ¦Šè‚´å’²å´ŽåŸ¼ç¢•é·ºä½œå‰Šå’‹æ¾æ˜¨æœ”柵窄ç–索錯桜é®ç¬¹åŒ™å†Šåˆ·"], -["8e40","察拶撮擦æœæ®ºè–©é›‘çšé¯–æŒéŒ†é®«çš¿æ™’三傘å‚山惨撒散桟燦çŠç”£ç®—纂蚕讃賛酸é¤æ–¬æš«æ®‹ä»•ä»”伺使刺å¸å²å—£å››å£«å§‹å§‰å§¿åå±å¸‚師志æ€æŒ‡æ”¯åœæ–¯æ–½æ—¨æžæ¢"], -["8e80","æ»æ°ç…祉ç§ç³¸ç´™ç´«è‚¢è„‚至視詞詩試誌諮資賜雌飼æ¯äº‹ä¼¼ä¾å…å—寺慈æŒæ™‚次滋治爾璽痔ç£ç¤ºè€Œè€³è‡ªè’”辞æ±é¹¿å¼è˜é´«ç«ºè»¸å®é›«ä¸ƒå±åŸ·å¤±å«‰å®¤æ‚‰æ¹¿æ¼†ç–¾è³ªå®Ÿè”€ç¯ å²æŸ´èŠå±¡è•Šç¸žèˆŽå†™å°„æ¨èµ¦æ–œç…®ç¤¾ç´—者è¬è»Šé®è›‡é‚ªå€Ÿå‹ºå°ºæ“ç¼çˆµé…Œé‡ˆéŒ«è‹¥å¯‚弱惹主å–守手朱殊狩ç 種腫趣酒首儒å—呪寿授樹綬需囚åŽå‘¨"], -["8f40","宗就州修æ„拾洲秀秋終ç¹ç¿’è‡èˆŸè’衆襲è®è¹´è¼¯é€±é…‹é…¬é›†é†œä»€ä½å……å従戎柔æ±æ¸‹ç£ç¸¦é‡éŠƒå”夙宿淑ç¥ç¸®ç²›å¡¾ç†Ÿå‡ºè¡“述俊峻春瞬竣舜駿准循旬楯殉淳"], -["8f80","準潤盾純巡éµé†‡é †å‡¦åˆæ‰€æš‘曙渚庶緒署書薯藷諸助å™å¥³åºå¾æ•é‹¤é™¤å‚·å„Ÿå‹åŒ å‡å¬å“¨å•†å”±å˜—奨妾娼宵将å°å°‘å°šåº„åºŠå» å½°æ‰¿æŠ„æ‹›æŽŒæ·æ˜‡æ˜Œæ˜æ™¶æ¾æ¢¢æ¨Ÿæ¨µæ²¼æ¶ˆæ¸‰æ¹˜ç„¼ç„¦ç…§ç—‡çœç¡ç¤ç¥¥ç§°ç« 笑粧紹肖è–蒋蕉è¡è£³è¨Ÿè¨¼è©”詳象賞醤鉦é¾é˜éšœéž˜ä¸Šä¸ˆä¸žä¹—å†—å‰°åŸŽå ´å£Œå¬¢å¸¸æƒ…æ“¾æ¡æ–浄状畳穣蒸è²é†¸éŒ 嘱埴飾"], -["9040","æ‹æ¤æ®–ç‡ç¹”è·è‰²è§¦é£Ÿè•è¾±å°»ä¼¸ä¿¡ä¾µå”‡å¨ å¯å¯©å¿ƒæ…ŽæŒ¯æ–°æ™‹æ£®æ¦›æµ¸æ·±ç”³ç–¹çœŸç¥žç§¦ç´³è‡£èŠ¯è–ªè¦ªè¨ºèº«è¾›é€²é‡éœ‡äººä»åˆƒå¡µå£¬å°‹ç”šå°½è…Žè¨Šè¿…陣é笥è«é ˆé…¢å›³åŽ¨"], -["9080","逗å¹åž‚帥推水炊ç¡ç²‹ç¿ è¡°é‚é…”éŒéŒ˜éšç‘žé«„崇嵩数枢趨雛æ®æ‰æ¤™è…é —é›€è£¾æ¾„æ‘ºå¯¸ä¸–ç€¬ç•æ˜¯å‡„制勢姓å¾æ€§æˆæ”¿æ•´æ˜Ÿæ™´æ£²æ –æ£æ¸…牲生盛精è–å£°è£½è¥¿èª èª“è«‹é€é†’é’é™æ–‰ç¨Žè„†éš»å¸æƒœæˆšæ–¥æ˜”æžçŸ³ç©ç±ç¸¾è„Šè²¬èµ¤è·¡è¹Ÿç¢©åˆ‡æ‹™æŽ¥æ‘‚折è¨çªƒç¯€èª¬é›ªçµ¶èˆŒè‰ä»™å…ˆåƒå 宣専尖å·æˆ¦æ‰‡æ’°æ “æ ´æ³‰æµ…æ´—æŸ“æ½œç…Žç…½æ—‹ç©¿ç®ç·š"], -["9140","繊羨腺舛船薦詮賎践é¸é·éŠéŠ‘閃鮮å‰å–„漸然全禅繕膳糎噌塑岨措曾曽楚狙ç–ç–Žç¤Žç¥–ç§Ÿç²—ç´ çµ„è˜‡è¨´é˜»é¡é¼ 僧創åŒå¢å€‰å–ªå£®å¥çˆ½å®‹å±¤åŒæƒ£æƒ³æœæŽƒæŒ¿æŽ»"], -["9180","æ“早曹巣æ§æ§½æ¼•ç‡¥äº‰ç—©ç›¸çª“糟ç·ç¶œè¡è‰è˜è‘¬è’¼è—»è£…èµ°é€é鎗霜騒åƒå¢—æ†Žè‡“è”µè´ˆé€ ä¿ƒå´å‰‡å³æ¯æ‰æŸæ¸¬è¶³é€Ÿä¿—属賊æ—続å’袖其æƒå˜å«å°Šææ‘éœä»–å¤šå¤ªæ±°è©‘å”¾å •å¦¥æƒ°æ‰“æŸèˆµæ¥•é™€é§„é¨¨ä½“å †å¯¾è€å²±å¸¯å¾…æ€ æ…‹æˆ´æ›¿æ³°æ»žèƒŽè…¿è‹”è¢‹è²¸é€€é€®éšŠé»›é¯›ä»£å°å¤§ç¬¬é†é¡Œé·¹æ»ç€§å“啄宅托択拓沢濯ç¢è¨—é¸æ¿è«¾èŒ¸å‡§è›¸åª"], -["9240","å©ä½†é”辰奪脱巽竪辿棚谷狸鱈樽誰丹å˜å˜†å¦æ‹…探旦æŽæ·¡æ¹›ç‚çŸç«¯ç®ªç¶»è€½èƒ†è›‹èª•é›å›£å£‡å¼¾æ–暖檀段男談値知地弛æ¥æ™ºæ± 痴稚置致蜘é…馳築畜竹ç‘è“„"], -["9280","é€ç§©çª’茶嫡ç€ä¸ä»²å®™å¿ 抽昼柱注虫衷註酎鋳é§æ¨—瀦猪苧著貯ä¸å…†å‡‹å–‹å¯µå¸–帳åºå¼”張彫徴懲挑暢æœæ½®ç‰’町眺è´è„¹è…¸è¶èª¿è«œè¶…è·³éŠšé•·é ‚é³¥å‹…æ—直朕沈çè³ƒéŽ®é™³æ´¥å¢œæ¤Žæ§Œè¿½éŽšç—›é€šå¡šæ ‚æŽ´æ§»ä½ƒæ¼¬æŸ˜è¾»è”¦ç¶´é”椿潰åªå£·å¬¬ç´¬çˆªåŠé‡£é¶´äºä½Žåœåµå‰ƒè²žå‘ˆå ¤å®šå¸åº•åºå»·å¼Ÿæ‚ŒæŠµæŒºææ¢¯æ±€ç¢‡ç¦Žç¨‹ç· è‰‡è¨‚è«¦è¹„é€“"], -["9340","邸é„釘鼎泥摘擢敵滴的笛é©é‘溺哲徹撤è½è¿é‰„典填天展店添çºç”œè²¼è»¢é¡›ç‚¹ä¼æ®¿æ¾±ç”°é›»å…Žåå µå¡—å¦¬å± å¾’æ–—æœæ¸¡ç™»èŸè³é€”都éç ¥ç ºåŠªåº¦åœŸå¥´æ€’å€’å…šå†¬"], -["9380","å‡åˆ€å”塔塘套宕島嶋悼投ææ±æ¡ƒæ¢¼æ£Ÿç›—淘湯涛ç¯ç‡ˆå½“痘祷ç‰ç”ç’糖統到董蕩藤討謄豆è¸é€ƒé€é™é™¶é 騰闘åƒå‹•åŒå ‚導憧撞洞瞳童胴è„é“éŠ…å³ é´‡åŒ¿å¾—å¾³æ¶œç‰¹ç£ç¦¿ç¯¤æ¯’独èªæ ƒæ©¡å‡¸çªæ¤´å±Šé³¶è‹«å¯…酉瀞噸屯惇敦沌豚éé “å‘‘æ›‡éˆå¥ˆé‚£å†…ä¹å‡ªè–™è¬Žç˜æºé‹æ¥¢é¦´ç¸„ç•·å—æ¥ è»Ÿé›£æ±äºŒå°¼å¼è¿©åŒ‚賑肉虹廿日乳入"], -["9440","如尿韮任妊å¿èªæ¿¡ç¦°ç¥¢å¯§è‘±çŒ«ç†±å¹´å¿µæ»æ’šç‡ƒç²˜ä¹ƒå»¼ä¹‹åŸœåš¢æ‚©æ¿ƒç´èƒ½è„³è†¿è¾²è¦—蚤巴把æ’覇æ·æ³¢æ´¾ç¶ç ´å©†ç½µèŠé¦¬ä¿³å»ƒæ‹æŽ’æ•—æ¯ç›ƒç‰ŒèƒŒè‚ºè¼©é…å€åŸ¹åª’梅"], -["9480","æ¥³ç…¤ç‹½è²·å£²è³ é™ªé€™è¿ç§¤çŸ§è©ä¼¯å‰¥åšæ‹æŸæ³Šç™½ç®”粕舶薄迫æ›æ¼ 爆縛莫é§éº¦å‡½ç®±ç¡²ç®¸è‚‡çˆæ«¨å¹¡è‚Œç•‘ç• å…«é‰¢æºŒç™ºé†—é«ªä¼ç½°æŠœç閥鳩噺塙蛤隼伴判åŠåå›å¸†æ¬æ–‘æ¿æ°¾æ±Žç‰ˆçŠ¯çç•”ç¹èˆ¬è—©è²©ç¯„é‡†ç…©é ’é£¯æŒ½æ™©ç•ªç›¤ç£è•ƒè›®åŒªå‘å¦å¦ƒåº‡å½¼æ‚²æ‰‰æ‰¹æŠ«æ–比泌疲皮碑秘緋罷肥被誹費é¿éžé£›æ¨‹ç°¸å‚™å°¾å¾®æž‡æ¯˜çµçœ‰ç¾Ž"], -["9540","鼻柊稗匹疋é«å½¦è†è±è‚˜å¼¼å¿…ç•¢ç†é€¼æ¡§å§«åª›ç´ç™¾è¬¬ä¿µå½ªæ¨™æ°·æ¼‚瓢票表評豹廟æ病秒苗錨鋲蒜è›é°å“å½¬æ–Œæµœç€•è²§è³“é »æ•ç“¶ä¸ä»˜åŸ 夫婦富冨布府怖扶敷"], -["9580","斧普浮父符è…膚芙èœè² 賦赴阜附侮撫æ¦èˆžè‘¡è•ªéƒ¨å°æ¥“風葺蕗ä¼å‰¯å¾©å¹…æœç¦è…¹è¤‡è¦†æ·µå¼—払沸ä»ç‰©é®’分å»å™´å¢³æ†¤æ‰®ç„šå¥®ç²‰ç³žç´›é›°æ–‡èžä¸™ä½µå…µå¡€å¹£å¹³å¼ŠæŸ„並蔽閉陛米é 僻å£ç™–碧別瞥蔑箆å変片篇編辺返é便勉娩å¼éžä¿èˆ—鋪圃æ•æ©ç”«è£œè¼”穂募墓慕戊暮æ¯ç°¿è©å€£ä¿¸åŒ…å‘†å ±å¥‰å®å³°å³¯å´©åº–抱æ§æ”¾æ–¹æœ‹"], -["9640","æ³•æ³¡çƒ¹ç ²ç¸«èƒžèŠ³èŒè“¬èœ‚褒訪豊邦鋒飽鳳鵬ä¹äº¡å‚剖åŠå¦¨å¸½å¿˜å¿™æˆ¿æš´æœ›æŸæ£’冒紡肪膨謀貌貿鉾防å é ¬åŒ—åƒ•åœå¢¨æ’²æœ´ç‰§ç¦ç©†é‡¦å‹ƒæ²¡æ®†å €å¹Œå¥”本翻凡盆"], -["9680","摩磨é”麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒æ¡äº¦ä¿£åˆæŠ¹æœ«æ²«è¿„ä¾ç¹éº¿ä¸‡æ…¢æº€æ¼«è”“味未é…巳箕岬密蜜湊蓑稔脈妙ç²æ°‘çœ å‹™å¤¢ç„¡ç‰ŸçŸ›éœ§éµ¡æ¤‹å©¿å¨˜å†¥å命明盟迷銘鳴姪ç‰æ»…å…棉綿緬é¢éººæ‘¸æ¨¡èŒ‚妄åŸæ¯›çŒ›ç›²ç¶²è€—蒙儲木黙目æ¢å‹¿é¤…尤戻籾貰å•æ‚¶ç´‹é–€åŒä¹Ÿå†¶å¤œçˆºè€¶é‡Žå¼¥çŸ¢åŽ„役約薬訳èºé–柳薮鑓愉愈油癒"], -["9740","è«è¼¸å”¯ä½‘優勇å‹å®¥å¹½æ‚ 憂æ–有柚湧涌猶猷由ç¥è£•èª˜éŠé‚‘郵雄èžå¤•äºˆä½™ä¸Žèª‰è¼¿é å‚幼妖容庸æšæºæ“曜楊様洋溶熔用窯羊耀葉蓉è¦è¬¡è¸Šé¥é™½é¤Šæ…¾æŠ‘欲"], -["9780","沃浴翌翼淀羅螺裸æ¥èŽ±é ¼é›·æ´›çµ¡è½é…ªä¹±åµåµæ¬„æ¿«è—è˜è¦§åˆ©åå±¥æŽæ¢¨ç†ç’ƒç—¢è£è£¡é‡Œé›¢é™¸å¾‹çŽ‡ç«‹è‘ŽæŽ 略劉æµæºœç‰ç•™ç¡«ç²’隆竜é¾ä¾¶æ…®æ—…虜了亮僚両凌寮料æ¢æ¶¼çŒŸç™‚çžç¨œç³§è‰¯è«’é¼é‡é™µé ˜åŠ›ç·‘倫厘林淋ç‡ç³è‡¨è¼ªéš£é±—éºŸç‘ å¡æ¶™ç´¯é¡žä»¤ä¼¶ä¾‹å†·åŠ±å¶ºæ€œçŽ²ç¤¼è‹“鈴隷零霊麗齢暦æ´åˆ—劣烈裂廉æ‹æ†æ¼£ç…‰ç°¾ç·´è¯"], -["9840","蓮連錬呂é¯æ«“炉賂路露労å©å»Šå¼„朗楼榔浪æ¼ç‰¢ç‹¼ç¯è€è¾è‹éƒŽå…麓禄肋録論å€å’Œè©±æªè³„è„‡æƒ‘æž é·²äº™äº˜é°è©«è—蕨椀湾碗腕"], -["989f","弌ä¸ä¸•ä¸ªä¸±ä¸¶ä¸¼ä¸¿ä¹‚乖乘亂亅豫亊舒å¼äºŽäºžäºŸäº 亢亰亳亶从ä»ä»„仆仂仗仞ä»ä»Ÿä»·ä¼‰ä½šä¼°ä½›ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛俑俚ä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆åƒå‡æœƒå•ååˆåšå–å¬å¸å‚€å‚šå‚…傴傲"], -["9940","僉僊傳僂僖僞僥åƒåƒ£åƒ®åƒ¹åƒµå„‰å„儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉å†å†‘å†“å†•å†–å†¤å†¦å†¢å†©å†ªå†«å†³å†±å†²å†°å†µå†½å‡…å‡‰å‡›å‡ è™•å‡©å‡"], -["9980","凰凵凾刄刋刔刎刧刪刮刳刹å‰å‰„剋剌剞剔剪剴剩剳剿剽åŠåŠ”劒剱劈劑辨辧劬åŠåŠ¼åŠµå‹å‹å‹—勞勣勦é£å‹ 勳勵勸勹匆匈甸åŒåŒåŒåŒ•åŒšåŒ£åŒ¯åŒ±åŒ³åŒ¸å€å†å…丗å‰å凖åžå©å®å¤˜å»å·åŽ‚åŽ–åŽ åŽ¦åŽ¥åŽ®åŽ°åŽ¶åƒç°’é›™åŸæ›¼ç‡®å®å¨ååºåå½å‘€å¬åå¼å®å¶å©åå‘Žå’呵咎呟呱呷呰咒呻咀呶咄å’咆哇咢咸咥咬哄哈咨"], -["9a40","咫哂咤咾咼哘哥哦å”唔哽哮å“哺哢唹啀啣啌售啜啅啖啗唸唳å•å–™å–€å’¯å–Šå–Ÿå•»å•¾å–˜å–žå–®å•¼å–ƒå–©å–‡å–¨å—šå—…嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎å™ç‡Ÿå˜´å˜¶å˜²å˜¸"], -["9a80","å™«å™¤å˜¯å™¬å™ªåš†åš€åšŠåš åš”åšåš¥åš®åš¶åš´å›‚åš¼å›å›ƒå›€å›ˆå›Žå›‘囓囗囮囹圀囿圄圉圈國åœåœ“團圖嗇圜圦圷圸åŽåœ»å€åå©åŸ€åžˆå¡å¿åž‰åž“åž åž³åž¤åžªåž°åŸƒåŸ†åŸ”åŸ’åŸ“å ŠåŸ–åŸ£å ‹å ™å å¡²å ¡å¡¢å¡‹å¡°æ¯€å¡’å ½å¡¹å¢…å¢¹å¢Ÿå¢«å¢ºå£žå¢»å¢¸å¢®å£…å£“å£‘å£—å£™å£˜å£¥å£œå£¤å£Ÿå£¯å£ºå£¹å£»å£¼å£½å¤‚å¤Šå¤å¤›æ¢¦å¤¥å¤¬å¤å¤²å¤¸å¤¾ç«’奕å¥å¥Žå¥šå¥˜å¥¢å¥ 奧奬奩"], -["9b40","奸å¦å¦ä½žä¾«å¦£å¦²å§†å§¨å§œå¦å§™å§šå¨¥å¨Ÿå¨‘娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲å«å¬ªå¬¶å¬¾åƒå…å€å‘å•åšå›å¥å©å°å³åµå¸æ–ˆåºå®€"], -["9b80","它宦宸寃寇寉寔å¯å¯¤å¯¦å¯¢å¯žå¯¥å¯«å¯°å¯¶å¯³å°…將專å°å°“å° å°¢å°¨å°¸å°¹å±å±†å±Žå±“å±å±å±å±¬å±®ä¹¢å±¶å±¹å²Œå²‘岔妛岫岻岶岼岷峅岾峇峙峩峽峺å³å¶Œå³ªå´‹å´•å´—嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢å¶å¶¬å¶®å¶½å¶å¶·å¶¼å·‰å·å·“å·’å·–å·›å·«å·²å·µå¸‹å¸šå¸™å¸‘å¸›å¸¶å¸·å¹„å¹ƒå¹€å¹Žå¹—å¹”å¹Ÿå¹¢å¹¤å¹‡å¹µå¹¶å¹ºéº¼å¹¿åº å»å»‚廈å»å»"], -["9c40","廖廣å»å»šå»›å»¢å»¡å»¨å»©å»¬å»±å»³å»°å»´å»¸å»¾å¼ƒå¼‰å½å½œå¼‹å¼‘弖弩å¼å¼¸å½å½ˆå½Œå½Žå¼¯å½‘彖彗彙彡å½å½³å½·å¾ƒå¾‚å½¿å¾Šå¾ˆå¾‘å¾‡å¾žå¾™å¾˜å¾ å¾¨å¾å¾¼å¿–忻忤忸忱å¿æ‚³å¿¿æ€¡æ "], -["9c80","怙æ€æ€©æ€Žæ€±æ€›æ€•æ€«æ€¦æ€æ€ºæšææªæ·æŸæŠæ†ææ£æƒæ¤æ‚æ¬æ«æ™æ‚æ‚æƒ§æ‚ƒæ‚šæ‚„æ‚›æ‚–æ‚—æ‚’æ‚§æ‚‹æƒ¡æ‚¸æƒ æƒ“æ‚´å¿°æ‚½æƒ†æ‚µæƒ˜æ…愕愆惶惷愀惴惺愃愡惻惱æ„愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟æ…慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹æ‡æ‡¦æ‡£æ‡¶æ‡ºæ‡´æ‡¿æ‡½æ‡¼æ‡¾æˆ€æˆˆæˆ‰æˆæˆŒæˆ”戛"], -["9d40","戞戡截戮戰戲戳æ‰æ‰Žæ‰žæ‰£æ‰›æ‰ 扨扼抂抉找抒抓抖拔抃抔拗拑抻æ‹æ‹¿æ‹†æ“”拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵æ挾ææœæ掖掎掀掫æ¶æŽ£æŽæŽ‰æŽŸæŽµæ«"], -["9d80","æ©æŽ¾æ©æ€æ†æ£æ‰æ’æ¶æ„æ–æ´æ†æ“æ¦æ¶æ”æ—æ¨ææ‘§æ‘¯æ‘¶æ‘Žæ”ªæ’•æ’“æ’¥æ’©æ’ˆæ’¼æ“šæ“’æ“…æ“‡æ’»æ“˜æ“‚æ“±æ“§èˆ‰æ“ æ“¡æŠ¬æ“£æ“¯æ”¬æ“¶æ“´æ“²æ“ºæ”€æ“½æ”˜æ”œæ”…æ”¤æ”£æ”«æ”´æ”µæ”·æ”¶æ”¸ç•‹æ•ˆæ•–æ••æ•æ•˜æ•žæ•æ•²æ•¸æ–‚斃變斛斟斫斷旃旆æ—æ—„æ—Œæ—’æ—›æ—™æ— æ—¡æ—±æ²æ˜Šæ˜ƒæ—»æ³æ˜µæ˜¶æ˜´æ˜œæ™æ™„晉æ™æ™žæ™æ™¤æ™§æ™¨æ™Ÿæ™¢æ™°æšƒæšˆæšŽæš‰æš„暘æšæ›æš¹æ›‰æš¾æš¼"], -["9e40","æ›„æš¸æ›–æ›šæ› æ˜¿æ›¦æ›©æ›°æ›µæ›·æœæœ–朞朦朧霸朮朿朶æ朸朷æ†æžæ æ™æ£æ¤æž‰æ°æž©æ¼æªæžŒæž‹æž¦æž¡æž…枷柯枴柬枳柩枸柤柞æŸæŸ¢æŸ®æž¹æŸŽæŸ†æŸ§æªœæ žæ¡†æ ©æ¡€æ¡æ ²æ¡Ž"], -["9e80","æ¢³æ «æ¡™æ¡£æ¡·æ¡¿æ¢Ÿæ¢æ¢æ¢”æ¢æ¢›æ¢ƒæª®æ¢¹æ¡´æ¢µæ¢ 梺æ¤æ¢æ¡¾æ¤æ£Šæ¤ˆæ£˜æ¤¢æ¤¦æ£¡æ¤Œæ£æ£”æ£§æ£•æ¤¶æ¤’æ¤„æ£—æ££æ¤¥æ£¹æ£ æ£¯æ¤¨æ¤ªæ¤šæ¤£æ¤¡æ£†æ¥¹æ¥·æ¥œæ¥¸æ¥«æ¥”æ¥¾æ¥®æ¤¹æ¥´æ¤½æ¥™æ¤°æ¥¡æ¥žæ¥æ¦æ¥ªæ¦²æ¦®æ§æ¦¿æ§æ§“榾槎寨槊æ§æ¦»æ§ƒæ¦§æ¨®æ¦‘æ¦ æ¦œæ¦•æ¦´æ§žæ§¨æ¨‚æ¨›æ§¿æ¬Šæ§¹æ§²æ§§æ¨…æ¦±æ¨žæ§æ¨”槫樊樒æ«æ¨£æ¨“橄樌橲樶橸橇橢橙橦橈樸樢æªæªæª 檄檢檣"], -["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮æ‡æƒæ‰ææ™æ”æ›æŸæ¡æ¸æ¹æ¿æ®€æ®„殃æ®æ®˜æ®•æ®žæ®¤æ®ªæ®«æ®¯æ®²æ®±æ®³æ®·æ®¼æ¯†æ¯‹æ¯“毟毬毫毳毯"], -["9f80","麾氈氓气氛氤氣汞汕汢汪沂æ²æ²šæ²æ²›æ±¾æ±¨æ±³æ²’æ²æ³„泱泓沽泗泅æ³æ²®æ²±æ²¾æ²ºæ³›æ³¯æ³™æ³ªæ´Ÿè¡æ´¶æ´«æ´½æ´¸æ´™æ´µæ´³æ´’洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮æ¸æ¹®æ¸®æ¸™æ¹²æ¹Ÿæ¸¾æ¸£æ¹«æ¸«æ¹¶æ¹æ¸Ÿæ¹ƒæ¸ºæ¹Žæ¸¤æ»¿æ¸æ¸¸æº‚溪溘滉溷滓溽溯滄溲滔滕æºæº¥æ»‚溟æ½æ¼‘çŒæ»¬æ»¸æ»¾æ¼¿æ»²æ¼±æ»¯æ¼²æ»Œ"], -["e040","漾漓滷澆潺潸æ¾æ¾€æ½¯æ½›æ¿³æ½æ¾‚潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑ç€ç€æ¿¾ç€›ç€šæ½´ç€ç€˜ç€Ÿç€°ç€¾ç€²ç‘ç£ç‚™ç‚’炯烱炬炸炳炮烟烋çƒ"], -["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬ç†ç‡»ç†„ç†•ç†¨ç†¬ç‡—ç†¹ç†¾ç‡’ç‡‰ç‡”ç‡Žç‡ ç‡¬ç‡§ç‡µç‡¼ç‡¹ç‡¿çˆçˆçˆ›çˆ¨çˆçˆ¬çˆ°çˆ²çˆ»çˆ¼çˆ¿ç‰€ç‰†ç‰‹ç‰˜ç‰´ç‰¾çŠ‚çŠçŠ‡çŠ’çŠ–çŠ¢çŠ§çŠ¹çŠ²ç‹ƒç‹†ç‹„ç‹Žç‹’ç‹¢ç‹ ç‹¡ç‹¹ç‹·å€çŒ—猊猜猖çŒçŒ´çŒ¯çŒ©çŒ¥çŒ¾çŽç默ç—çªç¨ç°ç¸çµç»çºçˆçŽ³çŽçŽ»ç€ç¥ç®çžç’¢ç…瑯ç¥ç¸ç²çºç‘•ç¿ç‘Ÿç‘™ç‘瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊ç“ç“”ç±"], -["e140","ç“ ç“£ç“§ç“©ç“®ç“²ç“°ç“±ç“¸ç“·ç”„ç”ƒç”…ç”Œç”Žç”甕甓甞甦甬甼畄ç•ç•Šç•‰ç•›ç•†ç•šç•©ç•¤ç•§ç•«ç•ç•¸ç•¶ç–†ç–‡ç•´ç–Šç–‰ç–‚疔疚ç–疥疣痂疳痃疵疽疸疼疱ç—痊痒痙痣痞痾痿"], -["e180","ç—¼ç˜ç—°ç—ºç—²ç—³ç˜‹ç˜ç˜‰ç˜Ÿç˜§ç˜ 瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂ç›ç›–盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸ç‡çšç¨ç«ç›ç¥ç¿ç¾ç¹çžŽçž‹çž‘çž çžžçž°çž¶çž¹çž¿çž¼çž½çž»çŸ‡çŸçŸ—çŸšçŸœçŸ£çŸ®çŸ¼ç Œç ’ç¤¦ç 礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], -["e240","ç£§ç£šç£½ç£´ç¤‡ç¤’ç¤‘ç¤™ç¤¬ç¤«ç¥€ç¥ ç¥—ç¥Ÿç¥šç¥•ç¥“ç¥ºç¥¿ç¦Šç¦ç¦§é½‹ç¦ªç¦®ç¦³ç¦¹ç¦ºç§‰ç§•ç§§ç§¬ç§¡ç§£ç¨ˆç¨ç¨˜ç¨™ç¨ 稟禀稱稻稾稷穃穗穉穡穢穩é¾ç©°ç©¹ç©½çªˆçª—窕窘窖窩竈窰"], -["e280","窶竅竄窿邃竇竊ç«ç«ç«•ç«“站竚ç«ç«¡ç«¢ç«¦ç«ç«°ç¬‚ç¬ç¬Šç¬†ç¬³ç¬˜ç¬™ç¬žç¬µç¬¨ç¬¶ççºç¬„ç笋çŒç…çµç¥ç´ç§ç°ç±ç¬ç®ç®ç®˜ç®Ÿç®ç®œç®šç®‹ç®’ç®ç箙篋ç¯ç¯Œç¯ç®´ç¯†ç¯ç¯©ç°‘ç°”ç¯¦ç¯¥ç± ç°€ç°‡ç°“ç¯³ç¯·ç°—ç°ç¯¶ç°£ç°§ç°ªç°Ÿç°·ç°«ç°½ç±Œç±ƒç±”ç±ç±€ç±ç±˜ç±Ÿç±¤ç±–籥籬籵粃ç²ç²¤ç²ç²¢ç²«ç²¡ç²¨ç²³ç²²ç²±ç²®ç²¹ç²½ç³€ç³…糂糘糒糜糢鬻糯糲糴糶糺紆"], -["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮çµçµ£ç¶“綉絛ç¶çµ½ç¶›ç¶ºç¶®ç¶£ç¶µç·‡ç¶½ç¶«ç¸½ç¶¢ç¶¯ç·œç¶¸ç¶Ÿç¶°ç·˜ç·ç·¤ç·žç·»ç·²ç·¡ç¸…縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"], -["e380","縲縺繧ç¹ç¹–繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒çºçº“纔纖纎纛纜缸缺罅罌ç½ç½Žç½ç½‘ç½•ç½”ç½˜ç½Ÿç½ ç½¨ç½©ç½§ç½¸ç¾‚ç¾†ç¾ƒç¾ˆç¾‡ç¾Œç¾”ç¾žç¾ç¾šç¾£ç¾¯ç¾²ç¾¹ç¾®ç¾¶ç¾¸è±ç¿…翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻èŠè†è’è˜èšèŸè¢è¨è³è²è°è¶è¹è½è¿è‚„肆肅肛肓肚è‚å†è‚¬èƒ›èƒ¥èƒ™èƒèƒ„胚胖脉胯胱脛脩脣脯腋"], -["e440","éš‹è…†è„¾è…“è…‘èƒ¼è…±è…®è…¥è…¦è…´è†ƒè†ˆè†Šè†€è†‚è† è†•è†¤è†£è…Ÿè†“è†©è†°è†µè†¾è†¸è†½è‡€è‡‚è†ºè‡‰è‡è‡‘è‡™è‡˜è‡ˆè‡šè‡Ÿè‡ è‡§è‡ºè‡»è‡¾èˆèˆ‚舅與舊èˆèˆèˆ–舩舫舸舳艀艙艘è‰è‰šè‰Ÿè‰¤"], -["e480","艢艨艪艫舮艱艷艸艾èŠèŠ’芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱è€èŒ¹èè…茯茫茗茘莅莚莪莟莢莖茣莎莇莊è¼èŽµè³èµèŽ 莉莨è´è“è«èŽè½èƒè˜è‹èè·è‡è è²èè¢è 莽è¸è”†è»è‘èªè¼è•šè’„è‘·è‘«è’葮蒂葩葆è¬è‘¯è‘¹èµè“Šè‘¢è’¹è’¿è’Ÿè“™è“蒻蓚è“è“蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], -["e540","è•è˜‚蕋蕕薀薤薈薑薊薨è•è–”薛藪薇薜蕷蕾è–藉薺è—è–¹è—è—•è—藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿è™ä¹•è™”è™Ÿè™§è™±èš“èš£èš©èšªèš‹èšŒèš¶èš¯è›„è›†èš°è›‰è £èš«è›”è›žè›©è›¬"], -["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉èœè›¹èœŠèœ´èœ¿èœ·èœ»èœ¥èœ©èœšè èŸè¸èŒèŽè´è—è¨è®è™è“è£èªè …螢螟螂螯蟋螽蟀èŸé›–èž«èŸ„èž³èŸ‡èŸ†èž»èŸ¯èŸ²èŸ è è èŸ¾èŸ¶èŸ·è ŽèŸ’è ‘è –è •è ¢è ¡è ±è ¶è ¹è §è »è¡„è¡‚è¡’è¡™è¡žè¡¢è¡«è¢è¡¾è¢žè¡µè¡½è¢µè¡²è¢‚袗袒袮袙袢è¢è¢¤è¢°è¢¿è¢±è£ƒè£„裔裘裙è£è£¹è¤‚裼裴裨裲褄褌褊褓襃褞褥褪褫è¥è¥„褻褶褸襌è¤è¥ 襞"], -["e640","襦襤è¥è¥ªè¥¯è¥´è¥·è¥¾è¦ƒè¦ˆè¦Šè¦“覘覡覩覦覬覯覲覺覽覿觀觚觜è§è§§è§´è§¸è¨ƒè¨–è¨è¨Œè¨›è¨è¨¥è¨¶è©è©›è©’詆詈詼è©è©¬è©¢èª…誂誄誨誡誑誥誦誚誣諄è«è«‚諚諫諳諧"], -["e680","è«¤è«±è¬”è« è«¢è«·è«žè«›è¬Œè¬‡è¬šè«¡è¬–è¬è¬—è¬ è¬³éž«è¬¦è¬«è¬¾è¬¨èèŒèèŽè‰è–è›èšè«èŸè¬è¯è´è½è®€è®Œè®Žè®’讓讖讙讚谺è±è°¿è±ˆè±Œè±Žè±è±•è±¢è±¬è±¸è±ºè²‚貉貅貊è²è²Žè²”豼貘æˆè²è²ªè²½è²²è²³è²®è²¶è³ˆè³è³¤è³£è³šè³½è³ºè³»è´„è´…è´Šè´‡è´è´è´é½Žè´“è³è´”贖赧èµèµ±èµ³è¶è¶™è·‚趾趺è·è·šè·–跌跛跋跪跫跟跣跼踈踉跿è¸è¸žè¸è¸Ÿè¹‚踵踰踴蹊"], -["e740","蹇蹉蹌è¹è¹ˆè¹™è¹¤è¹ 踪蹣蹕蹶蹲蹼èºèº‡èº…躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"], -["e780","轢轣轤辜辟辣è¾è¾¯è¾·è¿šè¿¥è¿¢è¿ªè¿¯é‚‡è¿´é€…迹迺逑逕逡é€é€žé€–逋逧逶逵逹迸ééé‘é’逎é‰é€¾é–é˜éžé¨é¯é¶éš¨é²é‚‚é½é‚邀邊邉é‚邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀é‡é‡‰é‡‹é‡é‡–釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋é‰éŠœéŠ–銓銛鉚é‹éŠ¹éŠ·é‹©éŒé‹ºé„錮"], -["e840","錙錢錚錣錺錵錻éœé é¼é®é–鎰鎬éŽéŽ”鎹é–é—é¨é¥é˜éƒéééˆé¤éšé”é“éƒé‡éé¶é«éµé¡éºé‘é‘’é‘„é‘›é‘ é‘¢é‘žé‘ªéˆ©é‘°é‘µé‘·é‘½é‘šé‘¼é‘¾é’鑿閂閇閊閔閖閘閙"], -["e880","é– é–¨é–§é–閼閻閹閾闊濶闃é—闌闕闔闖關闡闥闢阡阨阮阯陂陌é™é™‹é™·é™œé™žé™é™Ÿé™¦é™²é™¬éšéš˜éš•éš—險隧隱隲隰隴隶隸隹雎雋雉é›è¥é›œéœé›•é›¹éœ„霆霈霓霎霑éœéœ–霙霤霪霰霹霽霾é„é†éˆé‚é‰éœé é¤é¦é¨å‹’é«é±é¹éž…é¼éžéºéž†éž‹éžéžéžœéž¨éž¦éž£éž³éž´éŸƒéŸ†éŸˆéŸ‹éŸœéŸé½éŸ²ç«ŸéŸ¶éŸµé é Œé ¸é ¤é ¡é ·é ½é¡†é¡é¡‹é¡«é¡¯é¡°"], -["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡é¤é¤žé¤¤é¤ 餬餮餽餾饂饉饅é¥é¥‹é¥‘饒饌饕馗馘馥é¦é¦®é¦¼é§Ÿé§›é§é§˜é§‘é§é§®é§±é§²é§»é§¸é¨é¨é¨…駢騙騫騷驅驂驀驃"], -["e980","騾驕é©é©›é©—驟驢驥驤驩驫驪éªéª°éª¼é«€é«é«‘髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲é„éƒéééŽé‘é˜é´é®“é®ƒé®‘é®–é®—é®Ÿé® é®¨é®´é¯€é¯Šé®¹é¯†é¯é¯‘é¯’é¯£é¯¢é¯¤é¯”é¯¡é°ºé¯²é¯±é¯°é°•é°”é°‰é°“é°Œé°†é°ˆé°’é°Šé°„é°®é°›é°¥é°¤é°¡é°°é±‡é°²é±†é°¾é±šé± é±§é±¶é±¸é³§é³¬é³°é´‰é´ˆé³«é´ƒé´†é´ªé´¦é¶¯é´£é´Ÿéµ„é´•é´’éµé´¿é´¾éµ†éµˆ"], -["ea40","éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶»é¶¸é¶ºé·†é·é·‚鷙鷓鷸鷦é·é·¯é·½é¸šé¸›é¸žé¹µé¹¹é¹½éºéºˆéº‹éºŒéº’麕麑éºéº¥éº©éº¸éºªéºé¡é»Œé»Žé»é»é»”黜點é»é» 黥黨黯"], -["ea80","é»´é»¶é»·é»¹é»»é»¼é»½é¼‡é¼ˆçš·é¼•é¼¡é¼¬é¼¾é½Šé½’é½”é½£é½Ÿé½ é½¡é½¦é½§é½¬é½ªé½·é½²é½¶é¾•é¾œé¾ å ¯æ§‡é™ç‘¤å‡œç†™"], -["ed40","纊褜éˆéŠˆè“œä¿‰ç‚»æ˜±æ£ˆé‹¹æ›»å½…丨仡仼伀伃伹佖侒侊侚侔ä¿å€å€¢ä¿¿å€žå†å°å‚傔僴僘兊兤å†å†¾å‡¬åˆ•åŠœåŠ¦å‹€å‹›åŒ€åŒ‡åŒ¤å²åŽ“厲å﨎咜咊咩哿喆å™å¥åž¬åŸˆåŸ‡ï¨"], -["ed80","ï¨å¢žå¢²å¤‹å¥“奛å¥å¥£å¦¤å¦ºå–寀甯寘寬尞岦岺峵崧嵓﨑嵂åµå¶¸å¶¹å·å¼¡å¼´å½§å¾·å¿žææ‚…æ‚Šæƒžæƒ•æ„ æƒ²æ„‘æ„·æ„°æ†˜æˆ“æŠ¦æµæ‘ æ’æ“Žæ•Žæ˜€æ˜•æ˜»æ˜‰æ˜®æ˜žæ˜¤æ™¥æ™—æ™™ï¨’æ™³æš™æš æš²æš¿æ›ºæœŽï¤©æ¦æž»æ¡’柀æ æ¡„æ£ï¨“楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬æ·æ·¸æ·²æ·¼æ¸¹æ¹œæ¸§æ¸¼æº¿æ¾ˆæ¾µæ¿µç€…瀇瀨炅炫ç„焄煜煆煇凞ç‡ç‡¾çŠ±"], -["ee40","犾猤猪ç·çŽ½ç‰ç–ç£ç’ç‡çµç¦çªç©ç®ç‘¢ç’‰ç’Ÿç”畯皂皜皞皛皦益ç†åŠ¯ç ¡ç¡Žç¡¤ç¡ºç¤°ï¨˜ï¨™ï¨šç¦”福禛竑竧靖竫箞ï¨çµˆçµœç¶·ç¶ 緖繒罇羡羽èŒè¢è¿è‡è¶è‘ˆè’´è•“è•™"], -["ee80","è•«ï¨Ÿè–°ï¨ ï¨¡è ‡è£µè¨’è¨·è©¹èª§èª¾è«Ÿï¨¢è«¶è“è¿è³°è³´è´’赶﨣è»ï¨¤ï¨¥é§éƒžï¨¦é„•é„§é‡šé‡—釞é‡é‡®é‡¤é‡¥éˆ†éˆéˆŠéˆºé‰€éˆ¼é‰Žé‰™é‰‘鈹鉧銧鉷鉸鋧鋗鋙é‹ï¨§é‹•é‹ 鋓錥錡鋻﨨錞鋿éŒéŒ‚é°é—鎤é†éžé¸é±é‘…鑈閒隆﨩éšéš¯éœ³éœ»éƒééé‘é•é¡—顥飯飼餧館馞驎髙髜éµé²é®é®±é®»é°€éµ°éµ«ï¨é¸™é»‘"], -["eeef","â…°",9,"¬¦'""], -["f040","",62], -["f080","",124], -["f140","",62], -["f180","",124], -["f240","î…¸",62], -["f280","",124], -["f340","",62], -["f380","",124], -["f440","î‹°",62], -["f480","",124], -["f540","",62], -["f580","î«",124], -["f640","",62], -["f680","î’§",124], -["f740","",62], -["f780","î•£",124], -["f840","î— ",62], -["f880","",124], -["f940","îšœ"], -["fa40","â…°",9,"â… ",9,"¬¦'"㈱№℡∵纊褜éˆéŠˆè“œä¿‰ç‚»æ˜±æ£ˆé‹¹æ›»å½…丨仡仼伀伃伹佖侒侊侚侔ä¿å€å€¢ä¿¿å€žå†å°å‚傔僴僘兊"], -["fa80","å…¤å†å†¾å‡¬åˆ•åŠœåŠ¦å‹€å‹›åŒ€åŒ‡åŒ¤å²åŽ“厲å﨎咜咊咩哿喆å™å¥åž¬åŸˆåŸ‡ï¨ï¨å¢žå¢²å¤‹å¥“奛å¥å¥£å¦¤å¦ºå–寀甯寘寬尞岦岺峵崧嵓﨑嵂åµå¶¸å¶¹å·å¼¡å¼´å½§å¾·å¿žææ‚…æ‚Šæƒžæƒ•æ„ æƒ²æ„‘æ„·æ„°æ†˜æˆ“æŠ¦æµæ‘ æ’æ“Žæ•Žæ˜€æ˜•æ˜»æ˜‰æ˜®æ˜žæ˜¤æ™¥æ™—æ™™ï¨’æ™³æš™æš æš²æš¿æ›ºæœŽï¤©æ¦æž»æ¡’柀æ æ¡„æ£ï¨“楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"], -["fb40","涖涬æ·æ·¸æ·²æ·¼æ¸¹æ¹œæ¸§æ¸¼æº¿æ¾ˆæ¾µæ¿µç€…瀇瀨炅炫ç„焄煜煆煇凞ç‡ç‡¾çŠ±çŠ¾çŒ¤ï¨–ç·çŽ½ç‰ç–ç£ç’ç‡çµç¦çªç©ç®ç‘¢ç’‰ç’Ÿç”畯皂皜皞皛皦益ç†åŠ¯ç ¡ç¡Žç¡¤ç¡ºç¤°ï¨˜ï¨™"], -["fb80","祥禔福禛竑竧靖竫箞ï¨çµˆçµœç¶·ç¶ 緖繒罇羡羽èŒè¢è¿è‡è¶è‘ˆè’´è•“è•™è•«ï¨Ÿè–°ï¨ ï¨¡è ‡è£µè¨’è¨·è©¹èª§èª¾è«Ÿï¨¢è«¶è“è¿è³°è³´è´’赶﨣è»ï¨¤ï¨¥é§éƒžï¨¦é„•é„§é‡šé‡—釞é‡é‡®é‡¤é‡¥éˆ†éˆéˆŠéˆºé‰€éˆ¼é‰Žé‰™é‰‘鈹鉧銧鉷鉸鋧鋗鋙é‹ï¨§é‹•é‹ 鋓錥錡鋻﨨錞鋿éŒéŒ‚é°é—鎤é†éžé¸é±é‘…鑈閒隆﨩éšéš¯éœ³éœ»éƒééé‘é•é¡—顥飯飼餧館馞驎髙"], -["fc40","é«œéµé²é®é®±é®»é°€éµ°éµ«ï¨é¸™é»‘"] -] diff --git a/node_modules/iconv-lite/encodings/utf16.js b/node_modules/iconv-lite/encodings/utf16.js deleted file mode 100644 index 54765aeee2f11ec423c0b719cd424bed876d6402..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/utf16.js +++ /dev/null @@ -1,177 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js - -// == UTF16-BE codec. ========================================================== - -exports.utf16be = Utf16BECodec; -function Utf16BECodec() { -} - -Utf16BECodec.prototype.encoder = Utf16BEEncoder; -Utf16BECodec.prototype.decoder = Utf16BEDecoder; -Utf16BECodec.prototype.bomAware = true; - - -// -- Encoding - -function Utf16BEEncoder() { -} - -Utf16BEEncoder.prototype.write = function(str) { - var buf = Buffer.from(str, 'ucs2'); - for (var i = 0; i < buf.length; i += 2) { - var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; - } - return buf; -} - -Utf16BEEncoder.prototype.end = function() { -} - - -// -- Decoding - -function Utf16BEDecoder() { - this.overflowByte = -1; -} - -Utf16BEDecoder.prototype.write = function(buf) { - if (buf.length == 0) - return ''; - - var buf2 = Buffer.alloc(buf.length + 1), - i = 0, j = 0; - - if (this.overflowByte !== -1) { - buf2[0] = buf[0]; - buf2[1] = this.overflowByte; - i = 1; j = 2; - } - - for (; i < buf.length-1; i += 2, j+= 2) { - buf2[j] = buf[i+1]; - buf2[j+1] = buf[i]; - } - - this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; - - return buf2.slice(0, j).toString('ucs2'); -} - -Utf16BEDecoder.prototype.end = function() { -} - - -// == UTF-16 codec ============================================================= -// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. -// Defaults to UTF-16LE, as it's prevalent and default in Node. -// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le -// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); - -// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). - -exports.utf16 = Utf16Codec; -function Utf16Codec(codecOptions, iconv) { - this.iconv = iconv; -} - -Utf16Codec.prototype.encoder = Utf16Encoder; -Utf16Codec.prototype.decoder = Utf16Decoder; - - -// -- Encoding (pass-through) - -function Utf16Encoder(options, codec) { - options = options || {}; - if (options.addBOM === undefined) - options.addBOM = true; - this.encoder = codec.iconv.getEncoder('utf-16le', options); -} - -Utf16Encoder.prototype.write = function(str) { - return this.encoder.write(str); -} - -Utf16Encoder.prototype.end = function() { - return this.encoder.end(); -} - - -// -- Decoding - -function Utf16Decoder(options, codec) { - this.decoder = null; - this.initialBytes = []; - this.initialBytesLen = 0; - - this.options = options || {}; - this.iconv = codec.iconv; -} - -Utf16Decoder.prototype.write = function(buf) { - if (!this.decoder) { - // Codec is not chosen yet. Accumulate initial bytes. - this.initialBytes.push(buf); - this.initialBytesLen += buf.length; - - if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below) - return ''; - - // We have enough bytes -> detect endianness. - var buf = Buffer.concat(this.initialBytes), - encoding = detectEncoding(buf, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - this.initialBytes.length = this.initialBytesLen = 0; - } - - return this.decoder.write(buf); -} - -Utf16Decoder.prototype.end = function() { - if (!this.decoder) { - var buf = Buffer.concat(this.initialBytes), - encoding = detectEncoding(buf, this.options.defaultEncoding); - this.decoder = this.iconv.getDecoder(encoding, this.options); - - var res = this.decoder.write(buf), - trail = this.decoder.end(); - - return trail ? (res + trail) : res; - } - return this.decoder.end(); -} - -function detectEncoding(buf, defaultEncoding) { - var enc = defaultEncoding || 'utf-16le'; - - if (buf.length >= 2) { - // Check BOM. - if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM - enc = 'utf-16be'; - else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM - enc = 'utf-16le'; - else { - // No BOM found. Try to deduce encoding from initial content. - // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. - // So, we count ASCII as if it was LE or BE, and decide from that. - var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions - _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even. - - for (var i = 0; i < _len; i += 2) { - if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++; - if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++; - } - - if (asciiCharsBE > asciiCharsLE) - enc = 'utf-16be'; - else if (asciiCharsBE < asciiCharsLE) - enc = 'utf-16le'; - } - } - - return enc; -} - - diff --git a/node_modules/iconv-lite/encodings/utf7.js b/node_modules/iconv-lite/encodings/utf7.js deleted file mode 100644 index b7631c23a801b0275c1f12a9d1a8fe00d8f51f0c..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/encodings/utf7.js +++ /dev/null @@ -1,290 +0,0 @@ -"use strict"; -var Buffer = require("safer-buffer").Buffer; - -// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 -// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 - -exports.utf7 = Utf7Codec; -exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 -function Utf7Codec(codecOptions, iconv) { - this.iconv = iconv; -}; - -Utf7Codec.prototype.encoder = Utf7Encoder; -Utf7Codec.prototype.decoder = Utf7Decoder; -Utf7Codec.prototype.bomAware = true; - - -// -- Encoding - -var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; - -function Utf7Encoder(options, codec) { - this.iconv = codec.iconv; -} - -Utf7Encoder.prototype.write = function(str) { - // Naive implementation. - // Non-direct chars are encoded as "+<base64>-"; single "+" char is encoded as "+-". - return Buffer.from(str.replace(nonDirectChars, function(chunk) { - return "+" + (chunk === '+' ? '' : - this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) - + "-"; - }.bind(this))); -} - -Utf7Encoder.prototype.end = function() { -} - - -// -- Decoding - -function Utf7Decoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; -} - -var base64Regex = /[A-Za-z0-9\/+]/; -var base64Chars = []; -for (var i = 0; i < 256; i++) - base64Chars[i] = base64Regex.test(String.fromCharCode(i)); - -var plusChar = '+'.charCodeAt(0), - minusChar = '-'.charCodeAt(0), - andChar = '&'.charCodeAt(0); - -Utf7Decoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; - - // The decoder is more involved as we must handle chunks in stream. - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '+' - if (buf[i] == plusChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64Chars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" - res += "+"; - } else { - var b64str = base64Accum + buf.slice(lastI, i).toString(); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - if (buf[i] != minusChar) // Minus is absorbed after base64. - i--; - - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + buf.slice(lastI).toString(); - - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); - - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - this.inBase64 = inBase64; - this.base64Accum = base64Accum; - - return res; -} - -Utf7Decoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); - - this.inBase64 = false; - this.base64Accum = ''; - return res; -} - - -// UTF-7-IMAP codec. -// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) -// Differences: -// * Base64 part is started by "&" instead of "+" -// * Direct characters are 0x20-0x7E, except "&" (0x26) -// * In Base64, "," is used instead of "/" -// * Base64 must not be used to represent direct characters. -// * No implicit shift back from Base64 (should always end with '-') -// * String must end in non-shifted position. -// * "-&" while in base64 is not allowed. - - -exports.utf7imap = Utf7IMAPCodec; -function Utf7IMAPCodec(codecOptions, iconv) { - this.iconv = iconv; -}; - -Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; -Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; -Utf7IMAPCodec.prototype.bomAware = true; - - -// -- Encoding - -function Utf7IMAPEncoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = Buffer.alloc(6); - this.base64AccumIdx = 0; -} - -Utf7IMAPEncoder.prototype.write = function(str) { - var inBase64 = this.inBase64, - base64Accum = this.base64Accum, - base64AccumIdx = this.base64AccumIdx, - buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0; - - for (var i = 0; i < str.length; i++) { - var uChar = str.charCodeAt(i); - if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. - if (inBase64) { - if (base64AccumIdx > 0) { - bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - base64AccumIdx = 0; - } - - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - inBase64 = false; - } - - if (!inBase64) { - buf[bufIdx++] = uChar; // Write direct character - - if (uChar === andChar) // Ampersand -> '&-' - buf[bufIdx++] = minusChar; - } - - } else { // Non-direct character - if (!inBase64) { - buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. - inBase64 = true; - } - if (inBase64) { - base64Accum[base64AccumIdx++] = uChar >> 8; - base64Accum[base64AccumIdx++] = uChar & 0xFF; - - if (base64AccumIdx == base64Accum.length) { - bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); - base64AccumIdx = 0; - } - } - } - } - - this.inBase64 = inBase64; - this.base64AccumIdx = base64AccumIdx; - - return buf.slice(0, bufIdx); -} - -Utf7IMAPEncoder.prototype.end = function() { - var buf = Buffer.alloc(10), bufIdx = 0; - if (this.inBase64) { - if (this.base64AccumIdx > 0) { - bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); - this.base64AccumIdx = 0; - } - - buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. - this.inBase64 = false; - } - - return buf.slice(0, bufIdx); -} - - -// -- Decoding - -function Utf7IMAPDecoder(options, codec) { - this.iconv = codec.iconv; - this.inBase64 = false; - this.base64Accum = ''; -} - -var base64IMAPChars = base64Chars.slice(); -base64IMAPChars[','.charCodeAt(0)] = true; - -Utf7IMAPDecoder.prototype.write = function(buf) { - var res = "", lastI = 0, - inBase64 = this.inBase64, - base64Accum = this.base64Accum; - - // The decoder is more involved as we must handle chunks in stream. - // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). - - for (var i = 0; i < buf.length; i++) { - if (!inBase64) { // We're in direct mode. - // Write direct chars until '&' - if (buf[i] == andChar) { - res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. - lastI = i+1; - inBase64 = true; - } - } else { // We decode base64. - if (!base64IMAPChars[buf[i]]) { // Base64 ended. - if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" - res += "&"; - } else { - var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/'); - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - if (buf[i] != minusChar) // Minus may be absorbed after base64. - i--; - - lastI = i+1; - inBase64 = false; - base64Accum = ''; - } - } - } - - if (!inBase64) { - res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. - } else { - var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/'); - - var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. - base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. - b64str = b64str.slice(0, canBeDecoded); - - res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); - } - - this.inBase64 = inBase64; - this.base64Accum = base64Accum; - - return res; -} - -Utf7IMAPDecoder.prototype.end = function() { - var res = ""; - if (this.inBase64 && this.base64Accum.length > 0) - res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); - - this.inBase64 = false; - this.base64Accum = ''; - return res; -} - - diff --git a/node_modules/iconv-lite/lib/bom-handling.js b/node_modules/iconv-lite/lib/bom-handling.js deleted file mode 100644 index 1050872385c7f96b4f54d50ebc873b1031e2528c..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/lib/bom-handling.js +++ /dev/null @@ -1,52 +0,0 @@ -"use strict"; - -var BOMChar = '\uFEFF'; - -exports.PrependBOM = PrependBOMWrapper -function PrependBOMWrapper(encoder, options) { - this.encoder = encoder; - this.addBOM = true; -} - -PrependBOMWrapper.prototype.write = function(str) { - if (this.addBOM) { - str = BOMChar + str; - this.addBOM = false; - } - - return this.encoder.write(str); -} - -PrependBOMWrapper.prototype.end = function() { - return this.encoder.end(); -} - - -//------------------------------------------------------------------------------ - -exports.StripBOM = StripBOMWrapper; -function StripBOMWrapper(decoder, options) { - this.decoder = decoder; - this.pass = false; - this.options = options || {}; -} - -StripBOMWrapper.prototype.write = function(buf) { - var res = this.decoder.write(buf); - if (this.pass || !res) - return res; - - if (res[0] === BOMChar) { - res = res.slice(1); - if (typeof this.options.stripBOM === 'function') - this.options.stripBOM(); - } - - this.pass = true; - return res; -} - -StripBOMWrapper.prototype.end = function() { - return this.decoder.end(); -} - diff --git a/node_modules/iconv-lite/lib/extend-node.js b/node_modules/iconv-lite/lib/extend-node.js deleted file mode 100644 index 87f5394a4b3966eca00c9a01a2ef0b2f2f27f5c6..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/lib/extend-node.js +++ /dev/null @@ -1,217 +0,0 @@ -"use strict"; -var Buffer = require("buffer").Buffer; -// Note: not polyfilled with safer-buffer on a purpose, as overrides Buffer - -// == Extend Node primitives to use iconv-lite ================================= - -module.exports = function (iconv) { - var original = undefined; // Place to keep original methods. - - // Node authors rewrote Buffer internals to make it compatible with - // Uint8Array and we cannot patch key functions since then. - // Note: this does use older Buffer API on a purpose - iconv.supportsNodeEncodingsExtension = !(Buffer.from || new Buffer(0) instanceof Uint8Array); - - iconv.extendNodeEncodings = function extendNodeEncodings() { - if (original) return; - original = {}; - - if (!iconv.supportsNodeEncodingsExtension) { - console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node"); - console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility"); - return; - } - - var nodeNativeEncodings = { - 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true, - 'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true, - }; - - Buffer.isNativeEncoding = function(enc) { - return enc && nodeNativeEncodings[enc.toLowerCase()]; - } - - // -- SlowBuffer ----------------------------------------------------------- - var SlowBuffer = require('buffer').SlowBuffer; - - original.SlowBufferToString = SlowBuffer.prototype.toString; - SlowBuffer.prototype.toString = function(encoding, start, end) { - encoding = String(encoding || 'utf8').toLowerCase(); - - // Use native conversion when possible - if (Buffer.isNativeEncoding(encoding)) - return original.SlowBufferToString.call(this, encoding, start, end); - - // Otherwise, use our decoding method. - if (typeof start == 'undefined') start = 0; - if (typeof end == 'undefined') end = this.length; - return iconv.decode(this.slice(start, end), encoding); - } - - original.SlowBufferWrite = SlowBuffer.prototype.write; - SlowBuffer.prototype.write = function(string, offset, length, encoding) { - // Support both (string, offset, length, encoding) - // and the legacy (string, encoding, offset, length) - if (isFinite(offset)) { - if (!isFinite(length)) { - encoding = length; - length = undefined; - } - } else { // legacy - var swap = encoding; - encoding = offset; - offset = length; - length = swap; - } - - offset = +offset || 0; - var remaining = this.length - offset; - if (!length) { - length = remaining; - } else { - length = +length; - if (length > remaining) { - length = remaining; - } - } - encoding = String(encoding || 'utf8').toLowerCase(); - - // Use native conversion when possible - if (Buffer.isNativeEncoding(encoding)) - return original.SlowBufferWrite.call(this, string, offset, length, encoding); - - if (string.length > 0 && (length < 0 || offset < 0)) - throw new RangeError('attempt to write beyond buffer bounds'); - - // Otherwise, use our encoding method. - var buf = iconv.encode(string, encoding); - if (buf.length < length) length = buf.length; - buf.copy(this, offset, 0, length); - return length; - } - - // -- Buffer --------------------------------------------------------------- - - original.BufferIsEncoding = Buffer.isEncoding; - Buffer.isEncoding = function(encoding) { - return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding); - } - - original.BufferByteLength = Buffer.byteLength; - Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) { - encoding = String(encoding || 'utf8').toLowerCase(); - - // Use native conversion when possible - if (Buffer.isNativeEncoding(encoding)) - return original.BufferByteLength.call(this, str, encoding); - - // Slow, I know, but we don't have a better way yet. - return iconv.encode(str, encoding).length; - } - - original.BufferToString = Buffer.prototype.toString; - Buffer.prototype.toString = function(encoding, start, end) { - encoding = String(encoding || 'utf8').toLowerCase(); - - // Use native conversion when possible - if (Buffer.isNativeEncoding(encoding)) - return original.BufferToString.call(this, encoding, start, end); - - // Otherwise, use our decoding method. - if (typeof start == 'undefined') start = 0; - if (typeof end == 'undefined') end = this.length; - return iconv.decode(this.slice(start, end), encoding); - } - - original.BufferWrite = Buffer.prototype.write; - Buffer.prototype.write = function(string, offset, length, encoding) { - var _offset = offset, _length = length, _encoding = encoding; - // Support both (string, offset, length, encoding) - // and the legacy (string, encoding, offset, length) - if (isFinite(offset)) { - if (!isFinite(length)) { - encoding = length; - length = undefined; - } - } else { // legacy - var swap = encoding; - encoding = offset; - offset = length; - length = swap; - } - - encoding = String(encoding || 'utf8').toLowerCase(); - - // Use native conversion when possible - if (Buffer.isNativeEncoding(encoding)) - return original.BufferWrite.call(this, string, _offset, _length, _encoding); - - offset = +offset || 0; - var remaining = this.length - offset; - if (!length) { - length = remaining; - } else { - length = +length; - if (length > remaining) { - length = remaining; - } - } - - if (string.length > 0 && (length < 0 || offset < 0)) - throw new RangeError('attempt to write beyond buffer bounds'); - - // Otherwise, use our encoding method. - var buf = iconv.encode(string, encoding); - if (buf.length < length) length = buf.length; - buf.copy(this, offset, 0, length); - return length; - - // TODO: Set _charsWritten. - } - - - // -- Readable ------------------------------------------------------------- - if (iconv.supportsStreams) { - var Readable = require('stream').Readable; - - original.ReadableSetEncoding = Readable.prototype.setEncoding; - Readable.prototype.setEncoding = function setEncoding(enc, options) { - // Use our own decoder, it has the same interface. - // We cannot use original function as it doesn't handle BOM-s. - this._readableState.decoder = iconv.getDecoder(enc, options); - this._readableState.encoding = enc; - } - - Readable.prototype.collect = iconv._collect; - } - } - - // Remove iconv-lite Node primitive extensions. - iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() { - if (!iconv.supportsNodeEncodingsExtension) - return; - if (!original) - throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.") - - delete Buffer.isNativeEncoding; - - var SlowBuffer = require('buffer').SlowBuffer; - - SlowBuffer.prototype.toString = original.SlowBufferToString; - SlowBuffer.prototype.write = original.SlowBufferWrite; - - Buffer.isEncoding = original.BufferIsEncoding; - Buffer.byteLength = original.BufferByteLength; - Buffer.prototype.toString = original.BufferToString; - Buffer.prototype.write = original.BufferWrite; - - if (iconv.supportsStreams) { - var Readable = require('stream').Readable; - - Readable.prototype.setEncoding = original.ReadableSetEncoding; - delete Readable.prototype.collect; - } - - original = undefined; - } -} diff --git a/node_modules/iconv-lite/lib/index.d.ts b/node_modules/iconv-lite/lib/index.d.ts deleted file mode 100644 index 0547eb346b24f470e041bdf67e15f5861e6c8d14..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/lib/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -/*--------------------------------------------------------------------------------------------- - * Copyright (c) Microsoft Corporation. All rights reserved. - * Licensed under the MIT License. - * REQUIREMENT: This definition is dependent on the @types/node definition. - * Install with `npm install @types/node --save-dev` - *--------------------------------------------------------------------------------------------*/ - -declare module 'iconv-lite' { - export function decode(buffer: Buffer, encoding: string, options?: Options): string; - - export function encode(content: string, encoding: string, options?: Options): Buffer; - - export function encodingExists(encoding: string): boolean; - - export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; - - export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; -} - -export interface Options { - stripBOM?: boolean; - addBOM?: boolean; - defaultEncoding?: string; -} diff --git a/node_modules/iconv-lite/lib/index.js b/node_modules/iconv-lite/lib/index.js deleted file mode 100644 index 5391919ca2c6314bdd7c246e4d00ae1cec42c98d..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/lib/index.js +++ /dev/null @@ -1,153 +0,0 @@ -"use strict"; - -// Some environments don't have global Buffer (e.g. React Native). -// Solution would be installing npm modules "buffer" and "stream" explicitly. -var Buffer = require("safer-buffer").Buffer; - -var bomHandling = require("./bom-handling"), - iconv = module.exports; - -// All codecs and aliases are kept here, keyed by encoding name/alias. -// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. -iconv.encodings = null; - -// Characters emitted in case of error. -iconv.defaultCharUnicode = '�'; -iconv.defaultCharSingleByte = '?'; - -// Public API. -iconv.encode = function encode(str, encoding, options) { - str = "" + (str || ""); // Ensure string. - - var encoder = iconv.getEncoder(encoding, options); - - var res = encoder.write(str); - var trail = encoder.end(); - - return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; -} - -iconv.decode = function decode(buf, encoding, options) { - if (typeof buf === 'string') { - if (!iconv.skipDecodeWarning) { - console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); - iconv.skipDecodeWarning = true; - } - - buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. - } - - var decoder = iconv.getDecoder(encoding, options); - - var res = decoder.write(buf); - var trail = decoder.end(); - - return trail ? (res + trail) : res; -} - -iconv.encodingExists = function encodingExists(enc) { - try { - iconv.getCodec(enc); - return true; - } catch (e) { - return false; - } -} - -// Legacy aliases to convert functions -iconv.toEncoding = iconv.encode; -iconv.fromEncoding = iconv.decode; - -// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. -iconv._codecDataCache = {}; -iconv.getCodec = function getCodec(encoding) { - if (!iconv.encodings) - iconv.encodings = require("../encodings"); // Lazy load all encoding definitions. - - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - var enc = iconv._canonicalizeEncoding(encoding); - - // Traverse iconv.encodings to find actual codec. - var codecOptions = {}; - while (true) { - var codec = iconv._codecDataCache[enc]; - if (codec) - return codec; - - var codecDef = iconv.encodings[enc]; - - switch (typeof codecDef) { - case "string": // Direct alias to other encoding. - enc = codecDef; - break; - - case "object": // Alias with options. Can be layered. - for (var key in codecDef) - codecOptions[key] = codecDef[key]; - - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - enc = codecDef.type; - break; - - case "function": // Codec itself. - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - // The codec function must load all tables and return object with .encoder and .decoder methods. - // It'll be called only once (for each different options object). - codec = new codecDef(codecOptions, iconv); - - iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. - return codec; - - default: - throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); - } - } -} - -iconv._canonicalizeEncoding = function(encoding) { - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); -} - -iconv.getEncoder = function getEncoder(encoding, options) { - var codec = iconv.getCodec(encoding), - encoder = new codec.encoder(options, codec); - - if (codec.bomAware && options && options.addBOM) - encoder = new bomHandling.PrependBOM(encoder, options); - - return encoder; -} - -iconv.getDecoder = function getDecoder(encoding, options) { - var codec = iconv.getCodec(encoding), - decoder = new codec.decoder(options, codec); - - if (codec.bomAware && !(options && options.stripBOM === false)) - decoder = new bomHandling.StripBOM(decoder, options); - - return decoder; -} - - -// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json. -var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node; -if (nodeVer) { - - // Load streaming support in Node v0.10+ - var nodeVerArr = nodeVer.split(".").map(Number); - if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) { - require("./streams")(iconv); - } - - // Load Node primitive extensions. - require("./extend-node")(iconv); -} - -if ("Ä€" != "\u0100") { - console.error("iconv-lite warning: javascript files use encoding different from utf-8. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); -} diff --git a/node_modules/iconv-lite/lib/streams.js b/node_modules/iconv-lite/lib/streams.js deleted file mode 100644 index 4409552958edca1b2eb6b30742759ddf1bb5f3c8..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/lib/streams.js +++ /dev/null @@ -1,121 +0,0 @@ -"use strict"; - -var Buffer = require("buffer").Buffer, - Transform = require("stream").Transform; - - -// == Exports ================================================================== -module.exports = function(iconv) { - - // Additional Public API. - iconv.encodeStream = function encodeStream(encoding, options) { - return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); - } - - iconv.decodeStream = function decodeStream(encoding, options) { - return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); - } - - iconv.supportsStreams = true; - - - // Not published yet. - iconv.IconvLiteEncoderStream = IconvLiteEncoderStream; - iconv.IconvLiteDecoderStream = IconvLiteDecoderStream; - iconv._collect = IconvLiteDecoderStream.prototype.collect; -}; - - -// == Encoder stream ======================================================= -function IconvLiteEncoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.decodeStrings = false; // We accept only strings, so we don't need to decode them. - Transform.call(this, options); -} - -IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteEncoderStream } -}); - -IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { - if (typeof chunk != 'string') - return done(new Error("Iconv encoding stream needs strings as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } -} - -IconvLiteEncoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res); - done(); - } - catch (e) { - done(e); - } -} - -IconvLiteEncoderStream.prototype.collect = function(cb) { - var chunks = []; - this.on('error', cb); - this.on('data', function(chunk) { chunks.push(chunk); }); - this.on('end', function() { - cb(null, Buffer.concat(chunks)); - }); - return this; -} - - -// == Decoder stream ======================================================= -function IconvLiteDecoderStream(conv, options) { - this.conv = conv; - options = options || {}; - options.encoding = this.encoding = 'utf8'; // We output strings. - Transform.call(this, options); -} - -IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { - constructor: { value: IconvLiteDecoderStream } -}); - -IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { - if (!Buffer.isBuffer(chunk)) - return done(new Error("Iconv decoding stream needs buffers as its input.")); - try { - var res = this.conv.write(chunk); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } -} - -IconvLiteDecoderStream.prototype._flush = function(done) { - try { - var res = this.conv.end(); - if (res && res.length) this.push(res, this.encoding); - done(); - } - catch (e) { - done(e); - } -} - -IconvLiteDecoderStream.prototype.collect = function(cb) { - var res = ''; - this.on('error', cb); - this.on('data', function(chunk) { res += chunk; }); - this.on('end', function() { - cb(null, res); - }); - return this; -} - diff --git a/node_modules/iconv-lite/package.json b/node_modules/iconv-lite/package.json deleted file mode 100644 index ae1771b0e5c24c93dc2a377b20c87f4e7232b505..0000000000000000000000000000000000000000 --- a/node_modules/iconv-lite/package.json +++ /dev/null @@ -1,76 +0,0 @@ -{ - "_from": "iconv-lite@0.4", - "_id": "iconv-lite@0.4.24", - "_inBundle": false, - "_integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "_location": "/iconv-lite", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "iconv-lite@0.4", - "name": "iconv-lite", - "escapedName": "iconv-lite", - "rawSpec": "0.4", - "saveSpec": null, - "fetchSpec": "0.4" - }, - "_requiredBy": [ - "/d3-dsv" - ], - "_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "_shasum": "2022b4b25fbddc21d2f524974a474aafe733908b", - "_spec": "iconv-lite@0.4", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3-dsv", - "author": { - "name": "Alexander Shtuchkin", - "email": "ashtuchkin@gmail.com" - }, - "browser": { - "./lib/extend-node": false, - "./lib/streams": false - }, - "bugs": { - "url": "https://github.com/ashtuchkin/iconv-lite/issues" - }, - "bundleDependencies": false, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "deprecated": false, - "description": "Convert character encodings in pure javascript.", - "devDependencies": { - "async": "*", - "errto": "*", - "iconv": "*", - "istanbul": "*", - "mocha": "^3.1.0", - "request": "~2.87.0", - "semver": "*", - "unorm": "*" - }, - "engines": { - "node": ">=0.10.0" - }, - "homepage": "https://github.com/ashtuchkin/iconv-lite", - "keywords": [ - "iconv", - "convert", - "charset", - "icu" - ], - "license": "MIT", - "main": "./lib/index.js", - "name": "iconv-lite", - "repository": { - "type": "git", - "url": "git://github.com/ashtuchkin/iconv-lite.git" - }, - "scripts": { - "coverage": "istanbul cover _mocha -- --grep .", - "coverage-open": "open coverage/lcov-report/index.html", - "test": "mocha --reporter spec --grep ." - }, - "typings": "./lib/index.d.ts", - "version": "0.4.24" -} diff --git a/node_modules/rw/.eslintrc b/node_modules/rw/.eslintrc deleted file mode 100644 index bbad38067ab5c775830371fe23698d10c8bfd92e..0000000000000000000000000000000000000000 --- a/node_modules/rw/.eslintrc +++ /dev/null @@ -1,5 +0,0 @@ -env: - node: true - -extends: - "eslint:recommended" diff --git a/node_modules/rw/.npmignore b/node_modules/rw/.npmignore deleted file mode 100644 index e5c7a3b22c66a3b51e277ac57752fdff39702291..0000000000000000000000000000000000000000 --- a/node_modules/rw/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -.DS_Store -node_modules -test/input.txt diff --git a/node_modules/rw/LICENSE b/node_modules/rw/LICENSE deleted file mode 100644 index da8230d35203598a24354437a3ddb3df5de8fdf9..0000000000000000000000000000000000000000 --- a/node_modules/rw/LICENSE +++ /dev/null @@ -1,26 +0,0 @@ -Copyright (c) 2014-2016, Michael Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* The name Michael Bostock may not be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT, -INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY -OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, -EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/rw/README.md b/node_modules/rw/README.md deleted file mode 100644 index b3c2f713a5537e01b30223852308c25da0138026..0000000000000000000000000000000000000000 --- a/node_modules/rw/README.md +++ /dev/null @@ -1,120 +0,0 @@ -# rw - Now stdin and stdout are files. - -How do you read a file from stdin? If you thought, - -```js -var contents = fs.readFileSync("/dev/stdin", "utf8"); -``` - -you’d be wrong, because Node only reads up to the size of the file reported by fs.stat rather than reading until it receives an EOF. So, if you redirect a file to your program (`cat file | program`), you’ll only read the first 65,536 bytes of your file. Oops. - -What about writing a file to stdout? If you thought, - -```js -fs.writeFileSync("/dev/stdout", contents, "utf8"); -``` - -you’d also be wrong, because this tries to close stdout, so you get this error: - -``` -Error: UNKNOWN, unknown error - at Object.fs.writeSync (fs.js:528:18) - at Object.fs.writeFileSync (fs.js:975:21) -``` - -(Also, this doesn’t work on Windows, because Windows doesn’t support /dev/stdout, /dev/stdin and /dev/stderr!) - -Shucks. So what should you do? - -You could use a different pattern for reading from stdin: - -```js -var chunks = []; - -process.stdin - .on("data", function(chunk) { chunks.push(chunk); }) - .on("end", function() { console.log(chunks.join("").length); }) - .setEncoding("utf8"); -``` - -But that’s a pain, since now your code has two different code paths for reading inputs depending on whether you’re reading a real file or stdin. And the code gets even more complex if you want to [read that file synchronously](https://github.com/mbostock/rw/blob/master/lib/rw/read-file-sync.js). - -You could also try a different pattern for writing to stdout: - -```js -process.stdout.write(contents); -``` - -Or even: - -```js -console.log(contents); -``` - -But if you try to pipe your output to `head`, you’ll get this error: - -``` -Error: write EPIPE - at errnoException (net.js:904:11) - at Object.afterWrite (net.js:720:19) -``` - -Huh. - -The **rw** module fixes these problems. It provides an interface just like readFile, readFileSync, writeFile and writeFileSync, but with implementations that work the way you expect on stdin and stdout. If you use these methods on files other than /dev/stdin or /dev/stdout, they simply delegate to the fs methods, so you can trust that they behave identically to the methods you’re used to. - -For example, now you can read stdin synchronously like so: - -```js -var contents = rw.readFileSync("/dev/stdin", "utf8"); -``` - -Or to write to stdout: - -```js -rw.writeFileSync("/dev/stdout", contents, "utf8"); -``` - -And rw automatically squashes EPIPE errors, so you can pipe the output of your program to `head` and you won’t get a spurious stack trace. - -To install, `npm install rw`. - -### Note - -If you want to read synchronously from stdin using [readFileSync](#readFileSync), you cannot also use process.stdin in the same program. Likewise, if you want to write synchronously to stdout or stderr using [writeFileSync](#writeFileSync), you cannot use process.stdout or process.stderr, respectively. (This includes using console.log and the like!) Failure to heed this warning may result in error: EAGAIN, resource temporarily unavailable. Unfortunately, it does not appear possible for this library to fix this issue automatically, so please use caution. - -Only the asynchronous methods [readFile](#readFile) and [writeFile](#writeFile) are supported on Windows. Node has no synchronous API for reading from process.[stdin](https://nodejs.org/api/process.html#process_process_stdin) or writing to process.[stdout](https://nodejs.org/api/process.html#process_process_stdout) or process.[stderr](https://nodejs.org/api/process.html#process_process_stderr), so you’re out of luck! - -## API Reference - -<a name="readFile" href="#readFile">#</a> rw.<b>readFile</b>(<i>path</i>[, <i>options</i>], <i>callback</i>) - -Reads the file at the specified *path* completely into memory, invoking the specified *callback* once the data is available and the file is closed. The *callback* is invoked with two arguments: the *error* that occurred during read (hopefully null), and the read data. If *options* is a string, it specifies the encoding to use, in which case the read data will be a string; otherwise *options* is an object, and may specify encoding and flag properties. This method is a drop-in replacement for [fs.readFile](https://nodejs.org/api/fs.html#fs_fs_readfile_file_options_callback) and fixes the behavior of special files such as /dev/stdin. - -<a name="readFileSync" href="#readFileSync">#</a> rw.<b>readFileSync</b>(<i>path</i>[, <i>options</i>]) - -Reads the file at the specified *path* completely into memory, synchronously, returning the data. If an error occurred during read, this function throws an error instead. If *options* is a string, it specifies the encoding to use, in which case the read data will be a string; otherwise *options* is an object, and may specify encoding and flag properties. This method is a drop-in replacement for [fs.readFileSync](https://nodejs.org/api/fs.html#fs_fs_readfilesync_file_options) and fixes the behavior of special files such as /dev/stdin. - -<a name="writeFile" href="#writeFile">#</a> rw.<b>writeFile</b>(<i>path</i>, <i>data</i>[, <i>options</i>], <i>callback</i>) - -Writes the specified *data* (completely in memory) to a file at the specified *path*, invoking the specified *callback* once the data is completely written and the file is closed. The *callback* is invoked with a single argument: the *error* that occurred during write (hopefully null). If *options* is a string, it specifies the encoding to use, in which case the *data* must be a string; otherwise *options* is an object, and may specify encoding, mode and flag properties. This method is a drop-in replacement for [fs.writeFile](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) and fixes the behavior of special files such as /dev/stdout. - -<a name="writeFileSync" href="#writeFileSync">#</a> rw.<b>writeFileSync</b>(<i>path</i>, <i>data</i>[, <i>options</i>]) - -Writes the specified *data* (completely in memory) to a file at the specified *path*, synchronously, returning once the data is completely written and the file is closed. Throws an *error* if one occurs during write. If *options* is a string, it specifies the encoding to use, in which case the *data* must be a string; otherwise *options* is an object, and may specify encoding, mode and flag properties. This method is a drop-in replacement for [fs.writeFileSync](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) and fixes the behavior of special files such as /dev/stdout. - -<a name="dash_readFile" href="#dash_readFile">#</a> rw.dash.<b>readFile</b>(<i>path</i>[, <i>options</i>], <i>callback</i>) - -Equivalent to [rw.readFile](#readFile), except treats a *path* of `-` as `/dev/stdin`. Useful for command-line arguments. - -<a name="dash_readFileSync" href="#dash_readFileSync">#</a> rw.dash.<b>readFileSync</b>(<i>path</i>[, <i>options</i>]) - -Equivalent to [rw.readFileSync](#readFileSync), except treats a *path* of `-` as `/dev/stdin`. Useful for command-line arguments. - -<a name="dash_writeFile" href="#dash_writeFile">#</a> rw.dash.<b>writeFile</b>(<i>path</i>, <i>data</i>[, <i>options</i>], <i>callback</i>) - -Equivalent to [rw.writeFile](#writeFile), except treats a *path* of `-` as `/dev/stdout`. Useful for command-line arguments. - -<a name="dash_writeFileSync" href="#dash_writeFileSync">#</a> rw.dash.<b>writeFileSync</b>(<i>path</i>, <i>data</i>[, <i>options</i>]) - -Equivalent to [rw.writeFileSync](#writeFileSync), except treats a *path* of `-` as `/dev/stdout`. Useful for command-line arguments. diff --git a/node_modules/rw/index.js b/node_modules/rw/index.js deleted file mode 100644 index b0c9dc6d95d45e967ceccb23690e54af0464fefe..0000000000000000000000000000000000000000 --- a/node_modules/rw/index.js +++ /dev/null @@ -1,5 +0,0 @@ -exports.dash = require("./lib/rw/dash"); -exports.readFile = require("./lib/rw/read-file"); -exports.readFileSync = require("./lib/rw/read-file-sync"); -exports.writeFile = require("./lib/rw/write-file"); -exports.writeFileSync = require("./lib/rw/write-file-sync"); diff --git a/node_modules/rw/lib/rw/dash.js b/node_modules/rw/lib/rw/dash.js deleted file mode 100644 index 0c005f13c5df90f40c770549e9485453c2bcea91..0000000000000000000000000000000000000000 --- a/node_modules/rw/lib/rw/dash.js +++ /dev/null @@ -1,14 +0,0 @@ -var slice = Array.prototype.slice; - -function dashify(method, file) { - return function(path) { - var argv = arguments; - if (path == "-") (argv = slice.call(argv)).splice(0, 1, file); - return method.apply(null, argv); - }; -} - -exports.readFile = dashify(require("./read-file"), "/dev/stdin"); -exports.readFileSync = dashify(require("./read-file-sync"), "/dev/stdin"); -exports.writeFile = dashify(require("./write-file"), "/dev/stdout"); -exports.writeFileSync = dashify(require("./write-file-sync"), "/dev/stdout"); diff --git a/node_modules/rw/lib/rw/decode.js b/node_modules/rw/lib/rw/decode.js deleted file mode 100644 index 008779b16525292932737384061656198e071b23..0000000000000000000000000000000000000000 --- a/node_modules/rw/lib/rw/decode.js +++ /dev/null @@ -1,23 +0,0 @@ -module.exports = function(options) { - if (options) { - if (typeof options === "string") return encoding(options); - if (options.encoding !== null) return encoding(options.encoding); - } - return identity(); -}; - -function identity() { - var chunks = []; - return { - push: function(chunk) { chunks.push(chunk); }, - value: function() { return Buffer.concat(chunks); } - }; -} - -function encoding(encoding) { - var chunks = []; - return { - push: function(chunk) { chunks.push(chunk); }, - value: function() { return Buffer.concat(chunks).toString(encoding); } - }; -} diff --git a/node_modules/rw/lib/rw/encode.js b/node_modules/rw/lib/rw/encode.js deleted file mode 100644 index 4a3926eb3a9678d86120aa56f9fc8b18e5c529d5..0000000000000000000000000000000000000000 --- a/node_modules/rw/lib/rw/encode.js +++ /dev/null @@ -1,7 +0,0 @@ -module.exports = function(data, options) { - return typeof data === "string" - ? new Buffer(data, typeof options === "string" ? options - : options && options.encoding !== null ? options.encoding - : "utf8") - : data; -}; diff --git a/node_modules/rw/lib/rw/read-file-sync.js b/node_modules/rw/lib/rw/read-file-sync.js deleted file mode 100644 index 374c2a0c1c18ab0e8b969a72738df373b67590e2..0000000000000000000000000000000000000000 --- a/node_modules/rw/lib/rw/read-file-sync.js +++ /dev/null @@ -1,29 +0,0 @@ -var fs = require("fs"), - decode = require("./decode"); - -module.exports = function(filename, options) { - if (fs.statSync(filename).isFile()) { - return fs.readFileSync(filename, options); - } else { - var fd = fs.openSync(filename, options && options.flag || "r"), - decoder = decode(options); - - while (true) { // eslint-disable-line no-constant-condition - try { - var buffer = new Buffer(bufferSize), - bytesRead = fs.readSync(fd, buffer, 0, bufferSize); - } catch (e) { - if (e.code === "EOF") break; - fs.closeSync(fd); - throw e; - } - if (bytesRead === 0) break; - decoder.push(buffer.slice(0, bytesRead)); - } - - fs.closeSync(fd); - return decoder.value(); - } -}; - -var bufferSize = 1 << 16; diff --git a/node_modules/rw/lib/rw/read-file.js b/node_modules/rw/lib/rw/read-file.js deleted file mode 100644 index 02aa122eaff26f89c568ae4a39f60d2d09922ca4..0000000000000000000000000000000000000000 --- a/node_modules/rw/lib/rw/read-file.js +++ /dev/null @@ -1,23 +0,0 @@ -var fs = require("fs"), - decode = require("./decode"); - -module.exports = function(path, options, callback) { - if (arguments.length < 3) callback = options, options = null; - - switch (path) { - case "/dev/stdin": return readStream(process.stdin, options, callback); - } - - fs.stat(path, function(error, stat) { - if (error) return callback(error); - if (stat.isFile()) return fs.readFile(path, options, callback); - readStream(fs.createReadStream(path, options ? {flags: options.flag || "r"} : {}), options, callback); // N.B. flag / flags - }); -}; - -function readStream(stream, options, callback) { - var decoder = decode(options); - stream.on("error", callback); - stream.on("data", function(d) { decoder.push(d); }); - stream.on("end", function() { callback(null, decoder.value()); }); -} diff --git a/node_modules/rw/lib/rw/write-file-sync.js b/node_modules/rw/lib/rw/write-file-sync.js deleted file mode 100644 index 0b04a2a61bef299744815d2e5c9f3b94f2339188..0000000000000000000000000000000000000000 --- a/node_modules/rw/lib/rw/write-file-sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var fs = require("fs"), - encode = require("./encode"); - -module.exports = function(filename, data, options) { - var stat; - - try { - stat = fs.statSync(filename); - } catch (error) { - if (error.code !== "ENOENT") throw error; - } - - if (!stat || stat.isFile()) { - fs.writeFileSync(filename, data, options); - } else { - var fd = fs.openSync(filename, options && options.flag || "w"), - bytesWritten = 0, - bytesTotal = (data = encode(data, options)).length; - - while (bytesWritten < bytesTotal) { - try { - bytesWritten += fs.writeSync(fd, data, bytesWritten, bytesTotal - bytesWritten, null); - } catch (error) { - if (error.code === "EPIPE") break; // ignore broken pipe, e.g., | head - fs.closeSync(fd); - throw error; - } - } - - fs.closeSync(fd); - } -}; diff --git a/node_modules/rw/lib/rw/write-file.js b/node_modules/rw/lib/rw/write-file.js deleted file mode 100644 index 2e2c0b2673dc9d8b2ca04e231d61cf68d4bc4f12..0000000000000000000000000000000000000000 --- a/node_modules/rw/lib/rw/write-file.js +++ /dev/null @@ -1,22 +0,0 @@ -var fs = require("fs"), - encode = require("./encode"); - -module.exports = function(path, data, options, callback) { - if (arguments.length < 4) callback = options, options = null; - - switch (path) { - case "/dev/stdout": return writeStream(process.stdout, "write", data, options, callback); - case "/dev/stderr": return writeStream(process.stderr, "write", data, options, callback); - } - - fs.stat(path, function(error, stat) { - if (error && error.code !== "ENOENT") return callback(error); - if (stat && stat.isFile()) return fs.writeFile(path, data, options, callback); - writeStream(fs.createWriteStream(path, options ? {flags: options.flag || "w"} : {}), "end", data, options, callback); // N.B. flag / flags - }); -}; - -function writeStream(stream, send, data, options, callback) { - stream.on("error", function(error) { callback(error.code === "EPIPE" ? null : error); }); // ignore broken pipe, e.g., | head - stream[send](encode(data, options), function(error) { callback(error && error.code === "EPIPE" ? null : error); }); -} diff --git a/node_modules/rw/package.json b/node_modules/rw/package.json deleted file mode 100644 index ba0c2d6e99c811a5a30e968329fb476c399ce473..0000000000000000000000000000000000000000 --- a/node_modules/rw/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_from": "rw@1", - "_id": "rw@1.3.3", - "_inBundle": false, - "_integrity": "sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=", - "_location": "/rw", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "rw@1", - "name": "rw", - "escapedName": "rw", - "rawSpec": "1", - "saveSpec": null, - "fetchSpec": "1" - }, - "_requiredBy": [ - "/d3-dsv" - ], - "_resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", - "_shasum": "3f862dfa91ab766b14885ef4d01124bfda074fb4", - "_spec": "rw@1", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/d3-dsv", - "author": { - "name": "Mike Bostock", - "url": "http://bost.ocks.org/mike" - }, - "bugs": { - "url": "https://github.com/mbostock/rw/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Now stdin and stdout are files.", - "devDependencies": { - "d3-queue": "3", - "eslint": "3" - }, - "homepage": "https://github.com/mbostock/rw", - "keywords": [ - "fs", - "readFile", - "writeFile", - "stdin", - "stdout" - ], - "license": "BSD-3-Clause", - "main": "index.js", - "name": "rw", - "repository": { - "type": "git", - "url": "git+ssh://git@github.com/mbostock/rw.git" - }, - "scripts": { - "postpublish": "git push && git push --tags", - "prepublish": "npm test", - "test": "test/run-tests && eslint index.js lib" - }, - "version": "1.3.3" -} diff --git a/node_modules/rw/test/cat-async b/node_modules/rw/test/cat-async deleted file mode 100755 index f229958d8e821a22bb5734ef6b242c13424abc61..0000000000000000000000000000000000000000 --- a/node_modules/rw/test/cat-async +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node - -var rw = require("../").dash; - -rw.readFile(process.argv[2] || "-", "utf8", function(error, contents) { - if (error) throw error; - rw.writeFile("-", contents, "utf8", function(error) { - if (error) throw error; - }); -}); diff --git a/node_modules/rw/test/cat-sync b/node_modules/rw/test/cat-sync deleted file mode 100755 index 9ef307f4a5f1a493ef55a3f25ccf0c8973ec7d53..0000000000000000000000000000000000000000 --- a/node_modules/rw/test/cat-sync +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node - -var rw = require("../").dash; - -rw.writeFileSync("-", rw.readFileSync(process.argv[2] || "-", "utf8"), "utf8"); diff --git a/node_modules/rw/test/encode-object-async b/node_modules/rw/test/encode-object-async deleted file mode 100755 index 0351d6368ae54d5039c8ef63e31758ae16e5a2bf..0000000000000000000000000000000000000000 --- a/node_modules/rw/test/encode-object-async +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node - -var rw = require("../").dash; - -rw.writeFile(process.argv[2] || "-", "gréén\n", {encoding: process.argv[3]}, function(error) { - if (error) throw error; -}); diff --git a/node_modules/rw/test/encode-object-sync b/node_modules/rw/test/encode-object-sync deleted file mode 100755 index 60c641c8ce743dc423cb6f66db39b507c304ce34..0000000000000000000000000000000000000000 --- a/node_modules/rw/test/encode-object-sync +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node - -var rw = require("../").dash; - -rw.writeFileSync(process.argv[2] || "-", "gréén\n", {encoding: process.argv[3]}); diff --git a/node_modules/rw/test/encode-string-async b/node_modules/rw/test/encode-string-async deleted file mode 100755 index 348e00ca279313b9752a9ffe451b1273f04ac699..0000000000000000000000000000000000000000 --- a/node_modules/rw/test/encode-string-async +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node - -var rw = require("../").dash; - -rw.writeFile(process.argv[2] || "-", "gréén\n", process.argv[3], function(error) { - if (error) throw error; -}); diff --git a/node_modules/rw/test/encode-string-sync b/node_modules/rw/test/encode-string-sync deleted file mode 100755 index 5fdc4c3cbca693af430a9f97d1e31b8e0986946a..0000000000000000000000000000000000000000 --- a/node_modules/rw/test/encode-string-sync +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node - -var rw = require("../").dash; - -rw.writeFileSync(process.argv[2] || "-", "gréén\n", process.argv[3]); diff --git a/node_modules/rw/test/encoding-async b/node_modules/rw/test/encoding-async deleted file mode 100755 index 9782c92a62979a3c524911b27f8c202987b809a5..0000000000000000000000000000000000000000 --- a/node_modules/rw/test/encoding-async +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env node - -var fs = require("fs"), - queue = require("d3-queue").queue, - rw = require("../"); - -var code = 0; - -queue(1) - .defer(testRead, "utf8", "gréén\n") - .defer(testRead, {encoding: "utf8"}, "gréén\n") - .defer(testRead, "ascii", "grC)C)n\n") - .defer(testRead, {encoding: "ascii"}, "grC)C)n\n") - .defer(testWrite, "utf8", "gréén\n") - .defer(testWrite, {encoding: "utf8"}, "gréén\n") - .defer(testWrite, "ascii", "gr��n\n") - .defer(testWrite, {encoding: "ascii"}, "gr��n\n") - .await(done); - -function testRead(options, expected, callback) { - rw.readFile("test/utf8.txt", options, function(error, actual) { - if (error) return void callback(error); - if (actual !== expected) console.warn(actual + " !== " + expected), code = 1; - callback(null); - }); -} - -function testWrite(options, expected, callback) { - rw.writeFile("test/encoding-async.out", "gréén\n", options, function(error) { - if (error) return void callback(error); - fs.readFile("test/encoding-async.out", "utf8", function(error, actual) { - if (error) return void callback(error); - if (actual !== expected) console.warn(actual + " !== " + expected), code = 1; - callback(null); - }); - }); -} - -function done(error) { - if (error) throw error; - process.exit(code); -} diff --git a/node_modules/rw/test/encoding-sync b/node_modules/rw/test/encoding-sync deleted file mode 100755 index 80f7e4e8fcb7925ccf52e56db61c91fd44a49f42..0000000000000000000000000000000000000000 --- a/node_modules/rw/test/encoding-sync +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node - -var fs = require("fs"), - rw = require("../"); - -var code = 0, - actual, - expected; - -if ((actual = rw.readFileSync("test/utf8.txt", "utf8")) !== (expected = "gréén\n")) code = 1, console.warn(actual + " !== " + expected); -if ((actual = rw.readFileSync("test/utf8.txt", {encoding: "utf8"})) !== (expected = "gréén\n")) code = 1, console.warn(actual + " !== " + expected); -if ((actual = rw.readFileSync("test/utf8.txt", "ascii")) !== (expected = "grC)C)n\n")) code = 1, console.warn(actual + " !== " + expected); -if ((actual = rw.readFileSync("test/utf8.txt", {encoding: "ascii"})) !== (expected = "grC)C)n\n")) code = 1, console.warn(actual + " !== " + expected); - -rw.writeFileSync("test/encoding-sync.out", "gréén\n", "utf8"); if ((actual = fs.readFileSync("test/encoding-sync.out", "utf8")) !== (expected = "gréén\n")) code = 1, console.warn(actual + " !== " + expected); -rw.writeFileSync("test/encoding-sync.out", "gréén\n", {encoding: "utf8"}); if ((actual = fs.readFileSync("test/encoding-sync.out", "utf8")) !== (expected = "gréén\n")) code = 1, console.warn(actual + " !== " + expected); -rw.writeFileSync("test/encoding-sync.out", "gréén\n", "ascii"); if ((actual = fs.readFileSync("test/encoding-sync.out", "utf8")) !== (expected = "gr��n\n")) code = 1, console.warn(actual + " !== " + expected); -rw.writeFileSync("test/encoding-sync.out", "gréén\n", {encoding: "ascii"}); if ((actual = fs.readFileSync("test/encoding-sync.out", "utf8")) !== (expected = "gr��n\n")) code = 1, console.warn(actual + " !== " + expected); - -process.exit(code); diff --git a/node_modules/rw/test/run-tests b/node_modules/rw/test/run-tests deleted file mode 100755 index 5b3272fdc0093a081db29da02b50431c39865750..0000000000000000000000000000000000000000 --- a/node_modules/rw/test/run-tests +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash - -FILE=test/input.txt - -rm -f -- $FILE -for i in {1..10000}; do printf '%09X\n' $RANDOM >> $FILE; done - -function test() -{ - if [[ $1 -eq 0 ]] - then - echo -e "\x1B[1;32m✓ $2\x1B[0m" - else - echo -e "\x1B[1;31m✗ $2\x1B[0m" - fi -} - -test/encoding-sync; test $? "encoding-sync applies the specified encodings" -test/encoding-async; test $? "encoding-async applies the specified encodings" -[ "$(test/wc-async $FILE)" = "100000" ]; test $? "wc-async reads an entire file" -[ "$(test/wc-sync $FILE)" = "100000" ]; test $? "wc-sync reads an entire file" -[ "$(test/wc-async < $FILE)" = "100000" ]; test $? "wc-async reads an entire file from stdin" -[ "$(test/wc-sync < $FILE)" = "100000" ]; test $? "wc-sync reads an entire file from stdin" -[ "$(cat $FILE | test/wc-async)" = "100000" ]; test $? "wc-async reads an entire file from a pipe" -[ "$(cat $FILE | test/wc-sync)" = "100000" ]; test $? "wc-sync reads an entire file from a pipe" -[ "$(test/cat-async $FILE | wc -c | tr -d ' ')" = "100000" ]; test $? "cat-async reads an entire file and writes it to a pipe" -[ "$(test/cat-sync $FILE | wc -c | tr -d ' ')" = "100000" ]; test $? "cat-sync reads an entire file and writes it to a pipe" -[ "$(test/cat-async $FILE | test/wc-async)" = "100000" ]; test $? "cat-async reads an entire file and writes it to a pipe to wc-async " -[ "$(test/cat-async $FILE | test/wc-sync)" = "100000" ]; test $? "cat-async reads an entire file and writes it to a pipe to wc-sync " -[ "$(test/cat-sync $FILE | test/wc-async)" = "100000" ]; test $? "cat-sync reads an entire file and writes it to a pipe to wc-async " -[ "$(test/cat-sync $FILE | test/wc-sync)" = "100000" ]; test $? "cat-sync reads an entire file and writes it to a pipe to wc-sync " -[ "$(test/cat-async < $FILE | wc -c | tr -d ' ')" = "100000" ]; test $? "cat-async reads an entire file from stdin and writes it to a pipe" -[ "$(test/cat-sync < $FILE | wc -c | tr -d ' ')" = "100000" ]; test $? "cat-sync reads an entire file from stdin and writes it to a pipe" -[ "$(test/cat-async < $FILE | test/wc-async)" = "100000" ]; test $? "cat-async reads an entire file from stdin and writes it to a pipe to wc-async" -[ "$(test/cat-async < $FILE | test/wc-sync)" = "100000" ]; test $? "cat-async reads an entire file from stdin and writes it to a pipe to wc-sync" -[ "$(test/cat-sync < $FILE | test/wc-async)" = "100000" ]; test $? "cat-sync reads an entire file from stdin and writes it to a pipe to wc-async" -[ "$(test/cat-sync < $FILE | test/wc-sync)" = "100000" ]; test $? "cat-sync reads an entire file from stdin and writes it to a pipe to wc-sync" -[ "$(cat $FILE | test/cat-async | test/wc-async)" = "100000" ]; test $? "cat-async reads an entire file from a pipe and writes it to a pipe to wc-async" -[ "$(cat $FILE | test/cat-async | test/wc-sync)" = "100000" ]; test $? "cat-async reads an entire file from a pipe and writes it to a pipe to wc-sync" -[ "$(cat $FILE | test/cat-sync | test/wc-async)" = "100000" ]; test $? "cat-sync reads an entire file from a pipe and writes it to a pipe to wc-async" -[ "$(cat $FILE | test/cat-sync | test/wc-sync)" = "100000" ]; test $? "cat-sync reads an entire file from a pipe and writes it to a pipe to wc-sync" -[ "$(cat $FILE | test/cat-async | head -n 100 | test/wc-async)" = "1000" ]; test $? "cat-async reads an entire file from a pipe and writes it to a pipe to head to wc-async" -[ "$(cat $FILE | test/cat-async | head -n 100 | test/wc-sync)" = "1000" ]; test $? "cat-async reads an entire file from a pipe and writes it to a pipe to head to wc-sync" -[ "$(cat $FILE | test/cat-sync | head -n 100 | test/wc-async)" = "1000" ]; test $? "cat-sync reads an entire file from a pipe and writes it to a pipe to head to wc-async" -[ "$(cat $FILE | test/cat-sync | head -n 100 | test/wc-sync)" = "1000" ]; test $? "cat-sync reads an entire file from a pipe and writes it to a pipe to head to wc-sync" -[ "$(cat $FILE 2> /dev/null | head -n 100 | test/cat-async | test/wc-async)" = "1000" ]; test $? "cat-async reads the head of a file from a pipe and writes it to wc-async" -[ "$(cat $FILE 2> /dev/null | head -n 100 | test/cat-async | test/wc-sync)" = "1000" ]; test $? "cat-async reads the head of a file from a pipe and writes it to wc-sync" -[ "$(cat $FILE 2> /dev/null | head -n 100 | test/cat-sync | test/wc-async)" = "1000" ]; test $? "cat-sync reads the head of a file from a pipe and writes it to wc-async" -[ "$(cat $FILE 2> /dev/null | head -n 100 | test/cat-sync | test/wc-sync)" = "1000" ]; test $? "cat-sync reads the head of a file from a pipe and writes it to wc-sync" -[ "$(test/write-async test/write.out && cat test/write.out)" = "Hello, world!" ]; test $? "write-async writes an entire file" -[ "$(test/write-sync test/write.out && cat test/write.out)" = "Hello, world!" ]; test $? "write-sync writes an entire file" - -rm -f -- $FILE test/write.out test/encoding-sync.out test/encoding-async.out diff --git a/node_modules/rw/test/utf8.txt b/node_modules/rw/test/utf8.txt deleted file mode 100644 index 23bfe766067d2e83d4705c95d7a737699d0ca65b..0000000000000000000000000000000000000000 --- a/node_modules/rw/test/utf8.txt +++ /dev/null @@ -1 +0,0 @@ -gréén diff --git a/node_modules/rw/test/wc-async b/node_modules/rw/test/wc-async deleted file mode 100755 index 0810271819d71c13e12779501a1483ef997e1a28..0000000000000000000000000000000000000000 --- a/node_modules/rw/test/wc-async +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node - -var rw = require("../").dash; - -rw.readFile(process.argv[2] || "-", function(error, contents) { - if (error) throw error; - console.log(contents.length); -}); diff --git a/node_modules/rw/test/wc-sync b/node_modules/rw/test/wc-sync deleted file mode 100755 index 6a8d1d79534aeea675e4ef09466afe174a529a22..0000000000000000000000000000000000000000 --- a/node_modules/rw/test/wc-sync +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node - -var rw = require("../").dash; - -console.log(rw.readFileSync(process.argv[2] || "-", "utf8").length); diff --git a/node_modules/rw/test/write-async b/node_modules/rw/test/write-async deleted file mode 100755 index 2444ad0b64b7713ed328289d553d9aa33afa4cf7..0000000000000000000000000000000000000000 --- a/node_modules/rw/test/write-async +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node - -var rw = require("../").dash; - -rw.writeFile(process.argv[2] || "-", "Hello, world!", "utf8", function(error) { - if (error) throw error; -}); diff --git a/node_modules/rw/test/write-sync b/node_modules/rw/test/write-sync deleted file mode 100755 index ef8d0d80f4ff8b2775a94d42803b68c02c2f8082..0000000000000000000000000000000000000000 --- a/node_modules/rw/test/write-sync +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env node - -var rw = require("../").dash; - -rw.writeFileSync(process.argv[2] || "-", "Hello, world!", "utf8"); diff --git a/node_modules/safer-buffer/LICENSE b/node_modules/safer-buffer/LICENSE deleted file mode 100644 index 4fe9e6f10036e619c2407f08ead54802bbfbcbd1..0000000000000000000000000000000000000000 --- a/node_modules/safer-buffer/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2018 Nikita Skovoroda <chalkerx@gmail.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/safer-buffer/Porting-Buffer.md b/node_modules/safer-buffer/Porting-Buffer.md deleted file mode 100644 index 68d86bab032fabc624b2e312ec3a87666a12b07c..0000000000000000000000000000000000000000 --- a/node_modules/safer-buffer/Porting-Buffer.md +++ /dev/null @@ -1,268 +0,0 @@ -# Porting to the Buffer.from/Buffer.alloc API - -<a id="overview"></a> -## Overview - -- [Variant 1: Drop support for Node.js ≤ 4.4.x and 5.0.0 — 5.9.x.](#variant-1) (*recommended*) -- [Variant 2: Use a polyfill](#variant-2) -- [Variant 3: manual detection, with safeguards](#variant-3) - -### Finding problematic bits of code using grep - -Just run `grep -nrE '[^a-zA-Z](Slow)?Buffer\s*\(' --exclude-dir node_modules`. - -It will find all the potentially unsafe places in your own code (with some considerably unlikely -exceptions). - -### Finding problematic bits of code using Node.js 8 - -If you’re using Node.js ≥ 8.0.0 (which is recommended), Node.js exposes multiple options that help with finding the relevant pieces of code: - -- `--trace-warnings` will make Node.js show a stack trace for this warning and other warnings that are printed by Node.js. -- `--trace-deprecation` does the same thing, but only for deprecation warnings. -- `--pending-deprecation` will show more types of deprecation warnings. In particular, it will show the `Buffer()` deprecation warning, even on Node.js 8. - -You can set these flags using an environment variable: - -```console -$ export NODE_OPTIONS='--trace-warnings --pending-deprecation' -$ cat example.js -'use strict'; -const foo = new Buffer('foo'); -$ node example.js -(node:7147) [DEP0005] DeprecationWarning: The Buffer() and new Buffer() constructors are not recommended for use due to security and usability concerns. Please use the new Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() construction methods instead. - at showFlaggedDeprecation (buffer.js:127:13) - at new Buffer (buffer.js:148:3) - at Object.<anonymous> (/path/to/example.js:2:13) - [... more stack trace lines ...] -``` - -### Finding problematic bits of code using linters - -Eslint rules [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor) -or -[node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md) -also find calls to deprecated `Buffer()` API. Those rules are included in some pre-sets. - -There is a drawback, though, that it doesn't always -[work correctly](https://github.com/chalker/safer-buffer#why-not-safe-buffer) when `Buffer` is -overriden e.g. with a polyfill, so recommended is a combination of this and some other method -described above. - -<a id="variant-1"></a> -## Variant 1: Drop support for Node.js ≤ 4.4.x and 5.0.0 — 5.9.x. - -This is the recommended solution nowadays that would imply only minimal overhead. - -The Node.js 5.x release line has been unsupported since July 2016, and the Node.js 4.x release line reaches its End of Life in April 2018 (→ [Schedule](https://github.com/nodejs/Release#release-schedule)). This means that these versions of Node.js will *not* receive any updates, even in case of security issues, so using these release lines should be avoided, if at all possible. - -What you would do in this case is to convert all `new Buffer()` or `Buffer()` calls to use `Buffer.alloc()` or `Buffer.from()`, in the following way: - -- For `new Buffer(number)`, replace it with `Buffer.alloc(number)`. -- For `new Buffer(string)` (or `new Buffer(string, encoding)`), replace it with `Buffer.from(string)` (or `Buffer.from(string, encoding)`). -- For all other combinations of arguments (these are much rarer), also replace `new Buffer(...arguments)` with `Buffer.from(...arguments)`. - -Note that `Buffer.alloc()` is also _faster_ on the current Node.js versions than -`new Buffer(size).fill(0)`, which is what you would otherwise need to ensure zero-filling. - -Enabling eslint rule [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor) -or -[node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md) -is recommended to avoid accidential unsafe Buffer API usage. - -There is also a [JSCodeshift codemod](https://github.com/joyeecheung/node-dep-codemod#dep005) -for automatically migrating Buffer constructors to `Buffer.alloc()` or `Buffer.from()`. -Note that it currently only works with cases where the arguments are literals or where the -constructor is invoked with two arguments. - -_If you currently support those older Node.js versions and dropping them would be a semver-major change -for you, or if you support older branches of your packages, consider using [Variant 2](#variant-2) -or [Variant 3](#variant-3) on older branches, so people using those older branches will also receive -the fix. That way, you will eradicate potential issues caused by unguarded Buffer API usage and -your users will not observe a runtime deprecation warning when running your code on Node.js 10._ - -<a id="variant-2"></a> -## Variant 2: Use a polyfill - -Utilize [safer-buffer](https://www.npmjs.com/package/safer-buffer) as a polyfill to support older -Node.js versions. - -You would take exacly the same steps as in [Variant 1](#variant-1), but with a polyfill -`const Buffer = require('safer-buffer').Buffer` in all files where you use the new `Buffer` api. - -Make sure that you do not use old `new Buffer` API — in any files where the line above is added, -using old `new Buffer()` API will _throw_. It will be easy to notice that in CI, though. - -Alternatively, you could use [buffer-from](https://www.npmjs.com/package/buffer-from) and/or -[buffer-alloc](https://www.npmjs.com/package/buffer-alloc) [ponyfills](https://ponyfill.com/) — -those are great, the only downsides being 4 deps in the tree and slightly more code changes to -migrate off them (as you would be using e.g. `Buffer.from` under a different name). If you need only -`Buffer.from` polyfilled — `buffer-from` alone which comes with no extra dependencies. - -_Alternatively, you could use [safe-buffer](https://www.npmjs.com/package/safe-buffer) — it also -provides a polyfill, but takes a different approach which has -[it's drawbacks](https://github.com/chalker/safer-buffer#why-not-safe-buffer). It will allow you -to also use the older `new Buffer()` API in your code, though — but that's arguably a benefit, as -it is problematic, can cause issues in your code, and will start emitting runtime deprecation -warnings starting with Node.js 10._ - -Note that in either case, it is important that you also remove all calls to the old Buffer -API manually — just throwing in `safe-buffer` doesn't fix the problem by itself, it just provides -a polyfill for the new API. I have seen people doing that mistake. - -Enabling eslint rule [no-buffer-constructor](https://eslint.org/docs/rules/no-buffer-constructor) -or -[node/no-deprecated-api](https://github.com/mysticatea/eslint-plugin-node/blob/master/docs/rules/no-deprecated-api.md) -is recommended. - -_Don't forget to drop the polyfill usage once you drop support for Node.js < 4.5.0._ - -<a id="variant-3"></a> -## Variant 3 — manual detection, with safeguards - -This is useful if you create Buffer instances in only a few places (e.g. one), or you have your own -wrapper around them. - -### Buffer(0) - -This special case for creating empty buffers can be safely replaced with `Buffer.concat([])`, which -returns the same result all the way down to Node.js 0.8.x. - -### Buffer(notNumber) - -Before: - -```js -var buf = new Buffer(notNumber, encoding); -``` - -After: - -```js -var buf; -if (Buffer.from && Buffer.from !== Uint8Array.from) { - buf = Buffer.from(notNumber, encoding); -} else { - if (typeof notNumber === 'number') - throw new Error('The "size" argument must be of type number.'); - buf = new Buffer(notNumber, encoding); -} -``` - -`encoding` is optional. - -Note that the `typeof notNumber` before `new Buffer` is required (for cases when `notNumber` argument is not -hard-coded) and _is not caused by the deprecation of Buffer constructor_ — it's exactly _why_ the -Buffer constructor is deprecated. Ecosystem packages lacking this type-check caused numereous -security issues — situations when unsanitized user input could end up in the `Buffer(arg)` create -problems ranging from DoS to leaking sensitive information to the attacker from the process memory. - -When `notNumber` argument is hardcoded (e.g. literal `"abc"` or `[0,1,2]`), the `typeof` check can -be omitted. - -Also note that using TypeScript does not fix this problem for you — when libs written in -`TypeScript` are used from JS, or when user input ends up there — it behaves exactly as pure JS, as -all type checks are translation-time only and are not present in the actual JS code which TS -compiles to. - -### Buffer(number) - -For Node.js 0.10.x (and below) support: - -```js -var buf; -if (Buffer.alloc) { - buf = Buffer.alloc(number); -} else { - buf = new Buffer(number); - buf.fill(0); -} -``` - -Otherwise (Node.js ≥ 0.12.x): - -```js -const buf = Buffer.alloc ? Buffer.alloc(number) : new Buffer(number).fill(0); -``` - -## Regarding Buffer.allocUnsafe - -Be extra cautious when using `Buffer.allocUnsafe`: - * Don't use it if you don't have a good reason to - * e.g. you probably won't ever see a performance difference for small buffers, in fact, those - might be even faster with `Buffer.alloc()`, - * if your code is not in the hot code path — you also probably won't notice a difference, - * keep in mind that zero-filling minimizes the potential risks. - * If you use it, make sure that you never return the buffer in a partially-filled state, - * if you are writing to it sequentially — always truncate it to the actuall written length - -Errors in handling buffers allocated with `Buffer.allocUnsafe` could result in various issues, -ranged from undefined behaviour of your code to sensitive data (user input, passwords, certs) -leaking to the remote attacker. - -_Note that the same applies to `new Buffer` usage without zero-filling, depending on the Node.js -version (and lacking type checks also adds DoS to the list of potential problems)._ - -<a id="faq"></a> -## FAQ - -<a id="design-flaws"></a> -### What is wrong with the `Buffer` constructor? - -The `Buffer` constructor could be used to create a buffer in many different ways: - -- `new Buffer(42)` creates a `Buffer` of 42 bytes. Before Node.js 8, this buffer contained - *arbitrary memory* for performance reasons, which could include anything ranging from - program source code to passwords and encryption keys. -- `new Buffer('abc')` creates a `Buffer` that contains the UTF-8-encoded version of - the string `'abc'`. A second argument could specify another encoding: For example, - `new Buffer(string, 'base64')` could be used to convert a Base64 string into the original - sequence of bytes that it represents. -- There are several other combinations of arguments. - -This meant that, in code like `var buffer = new Buffer(foo);`, *it is not possible to tell -what exactly the contents of the generated buffer are* without knowing the type of `foo`. - -Sometimes, the value of `foo` comes from an external source. For example, this function -could be exposed as a service on a web server, converting a UTF-8 string into its Base64 form: - -``` -function stringToBase64(req, res) { - // The request body should have the format of `{ string: 'foobar' }` - const rawBytes = new Buffer(req.body.string) - const encoded = rawBytes.toString('base64') - res.end({ encoded: encoded }) -} -``` - -Note that this code does *not* validate the type of `req.body.string`: - -- `req.body.string` is expected to be a string. If this is the case, all goes well. -- `req.body.string` is controlled by the client that sends the request. -- If `req.body.string` is the *number* `50`, the `rawBytes` would be 50 bytes: - - Before Node.js 8, the content would be uninitialized - - After Node.js 8, the content would be `50` bytes with the value `0` - -Because of the missing type check, an attacker could intentionally send a number -as part of the request. Using this, they can either: - -- Read uninitialized memory. This **will** leak passwords, encryption keys and other - kinds of sensitive information. (Information leak) -- Force the program to allocate a large amount of memory. For example, when specifying - `500000000` as the input value, each request will allocate 500MB of memory. - This can be used to either exhaust the memory available of a program completely - and make it crash, or slow it down significantly. (Denial of Service) - -Both of these scenarios are considered serious security issues in a real-world -web server context. - -when using `Buffer.from(req.body.string)` instead, passing a number will always -throw an exception instead, giving a controlled behaviour that can always be -handled by the program. - -<a id="ecosystem-usage"></a> -### The `Buffer()` constructor has been deprecated for a while. Is this really an issue? - -Surveys of code in the `npm` ecosystem have shown that the `Buffer()` constructor is still -widely used. This includes new code, and overall usage of such code has actually been -*increasing*. diff --git a/node_modules/safer-buffer/Readme.md b/node_modules/safer-buffer/Readme.md deleted file mode 100644 index 14b0822909320ff4ffafb1526212866f159470c5..0000000000000000000000000000000000000000 --- a/node_modules/safer-buffer/Readme.md +++ /dev/null @@ -1,156 +0,0 @@ -# safer-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![javascript style guide][standard-image]][standard-url] [![Security Responsible Disclosure][secuirty-image]][secuirty-url] - -[travis-image]: https://travis-ci.org/ChALkeR/safer-buffer.svg?branch=master -[travis-url]: https://travis-ci.org/ChALkeR/safer-buffer -[npm-image]: https://img.shields.io/npm/v/safer-buffer.svg -[npm-url]: https://npmjs.org/package/safer-buffer -[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg -[standard-url]: https://standardjs.com -[secuirty-image]: https://img.shields.io/badge/Security-Responsible%20Disclosure-green.svg -[secuirty-url]: https://github.com/nodejs/security-wg/blob/master/processes/responsible_disclosure_template.md - -Modern Buffer API polyfill without footguns, working on Node.js from 0.8 to current. - -## How to use? - -First, port all `Buffer()` and `new Buffer()` calls to `Buffer.alloc()` and `Buffer.from()` API. - -Then, to achieve compatibility with outdated Node.js versions (`<4.5.0` and 5.x `<5.9.0`), use -`const Buffer = require('safer-buffer').Buffer` in all files where you make calls to the new -Buffer API. _Use `var` instead of `const` if you need that for your Node.js version range support._ - -Also, see the -[porting Buffer](https://github.com/ChALkeR/safer-buffer/blob/master/Porting-Buffer.md) guide. - -## Do I need it? - -Hopefully, not — dropping support for outdated Node.js versions should be fine nowdays, and that -is the recommended path forward. You _do_ need to port to the `Buffer.alloc()` and `Buffer.from()` -though. - -See the [porting guide](https://github.com/ChALkeR/safer-buffer/blob/master/Porting-Buffer.md) -for a better description. - -## Why not [safe-buffer](https://npmjs.com/safe-buffer)? - -_In short: while `safe-buffer` serves as a polyfill for the new API, it allows old API usage and -itself contains footguns._ - -`safe-buffer` could be used safely to get the new API while still keeping support for older -Node.js versions (like this module), but while analyzing ecosystem usage of the old Buffer API -I found out that `safe-buffer` is itself causing problems in some cases. - -For example, consider the following snippet: - -```console -$ cat example.unsafe.js -console.log(Buffer(20)) -$ ./node-v6.13.0-linux-x64/bin/node example.unsafe.js -<Buffer 0a 00 00 00 00 00 00 00 28 13 de 02 00 00 00 00 05 00 00 00> -$ standard example.unsafe.js -standard: Use JavaScript Standard Style (https://standardjs.com) - /home/chalker/repo/safer-buffer/example.unsafe.js:2:13: 'Buffer()' was deprecated since v6. Use 'Buffer.alloc()' or 'Buffer.from()' (use 'https://www.npmjs.com/package/safe-buffer' for '<4.5.0') instead. -``` - -This is allocates and writes to console an uninitialized chunk of memory. -[standard](https://www.npmjs.com/package/standard) linter (among others) catch that and warn people -to avoid using unsafe API. - -Let's now throw in `safe-buffer`! - -```console -$ cat example.safe-buffer.js -const Buffer = require('safe-buffer').Buffer -console.log(Buffer(20)) -$ standard example.safe-buffer.js -$ ./node-v6.13.0-linux-x64/bin/node example.safe-buffer.js -<Buffer 08 00 00 00 00 00 00 00 28 58 01 82 fe 7f 00 00 00 00 00 00> -``` - -See the problem? Adding in `safe-buffer` _magically removes the lint warning_, but the behavior -remains identiÑal to what we had before, and when launched on Node.js 6.x LTS — this dumps out -chunks of uninitialized memory. -_And this code will still emit runtime warnings on Node.js 10.x and above._ - -That was done by design. I first considered changing `safe-buffer`, prohibiting old API usage or -emitting warnings on it, but that significantly diverges from `safe-buffer` design. After some -discussion, it was decided to move my approach into a separate package, and _this is that separate -package_. - -This footgun is not imaginary — I observed top-downloaded packages doing that kind of thing, -«fixing» the lint warning by blindly including `safe-buffer` without any actual changes. - -Also in some cases, even if the API _was_ migrated to use of safe Buffer API — a random pull request -can bring unsafe Buffer API usage back to the codebase by adding new calls — and that could go -unnoticed even if you have a linter prohibiting that (becase of the reason stated above), and even -pass CI. _I also observed that being done in popular packages._ - -Some examples: - * [webdriverio](https://github.com/webdriverio/webdriverio/commit/05cbd3167c12e4930f09ef7cf93b127ba4effae4#diff-124380949022817b90b622871837d56cR31) - (a module with 548 759 downloads/month), - * [websocket-stream](https://github.com/maxogden/websocket-stream/commit/c9312bd24d08271687d76da0fe3c83493871cf61) - (218 288 d/m, fix in [maxogden/websocket-stream#142](https://github.com/maxogden/websocket-stream/pull/142)), - * [node-serialport](https://github.com/node-serialport/node-serialport/commit/e8d9d2b16c664224920ce1c895199b1ce2def48c) - (113 138 d/m, fix in [node-serialport/node-serialport#1510](https://github.com/node-serialport/node-serialport/pull/1510)), - * [karma](https://github.com/karma-runner/karma/commit/3d94b8cf18c695104ca195334dc75ff054c74eec) - (3 973 193 d/m, fix in [karma-runner/karma#2947](https://github.com/karma-runner/karma/pull/2947)), - * [spdy-transport](https://github.com/spdy-http2/spdy-transport/commit/5375ac33f4a62a4f65bcfc2827447d42a5dbe8b1) - (5 970 727 d/m, fix in [spdy-http2/spdy-transport#53](https://github.com/spdy-http2/spdy-transport/pull/53)). - * And there are a lot more over the ecosystem. - -I filed a PR at -[mysticatea/eslint-plugin-node#110](https://github.com/mysticatea/eslint-plugin-node/pull/110) to -partially fix that (for cases when that lint rule is used), but it is a semver-major change for -linter rules and presets, so it would take significant time for that to reach actual setups. -_It also hasn't been released yet (2018-03-20)._ - -Also, `safer-buffer` discourages the usage of `.allocUnsafe()`, which is often done by a mistake. -It still supports it with an explicit concern barier, by placing it under -`require('safer-buffer/dangereous')`. - -## But isn't throwing bad? - -Not really. It's an error that could be noticed and fixed early, instead of causing havoc later like -unguarded `new Buffer()` calls that end up receiving user input can do. - -This package affects only the files where `var Buffer = require('safer-buffer').Buffer` was done, so -it is really simple to keep track of things and make sure that you don't mix old API usage with that. -Also, CI should hint anything that you might have missed. - -New commits, if tested, won't land new usage of unsafe Buffer API this way. -_Node.js 10.x also deals with that by printing a runtime depecation warning._ - -### Would it affect third-party modules? - -No, unless you explicitly do an awful thing like monkey-patching or overriding the built-in `Buffer`. -Don't do that. - -### But I don't want throwing… - -That is also fine! - -Also, it could be better in some cases when you don't comprehensive enough test coverage. - -In that case — just don't override `Buffer` and use -`var SaferBuffer = require('safer-buffer').Buffer` instead. - -That way, everything using `Buffer` natively would still work, but there would be two drawbacks: - -* `Buffer.from`/`Buffer.alloc` won't be polyfilled — use `SaferBuffer.from` and - `SaferBuffer.alloc` instead. -* You are still open to accidentally using the insecure deprecated API — use a linter to catch that. - -Note that using a linter to catch accidential `Buffer` constructor usage in this case is strongly -recommended. `Buffer` is not overriden in this usecase, so linters won't get confused. - -## «Without footguns»? - -Well, it is still possible to do _some_ things with `Buffer` API, e.g. accessing `.buffer` property -on older versions and duping things from there. You shouldn't do that in your code, probabably. - -The intention is to remove the most significant footguns that affect lots of packages in the -ecosystem, and to do it in the proper way. - -Also, this package doesn't protect against security issues affecting some Node.js versions, so for -usage in your own production code, it is still recommended to update to a Node.js version -[supported by upstream](https://github.com/nodejs/release#release-schedule). diff --git a/node_modules/safer-buffer/dangerous.js b/node_modules/safer-buffer/dangerous.js deleted file mode 100644 index ca41fdc549b6553e811d35e44730a51bec68be99..0000000000000000000000000000000000000000 --- a/node_modules/safer-buffer/dangerous.js +++ /dev/null @@ -1,58 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ - -'use strict' - -var buffer = require('buffer') -var Buffer = buffer.Buffer -var safer = require('./safer.js') -var Safer = safer.Buffer - -var dangerous = {} - -var key - -for (key in safer) { - if (!safer.hasOwnProperty(key)) continue - dangerous[key] = safer[key] -} - -var Dangereous = dangerous.Buffer = {} - -// Copy Safer API -for (key in Safer) { - if (!Safer.hasOwnProperty(key)) continue - Dangereous[key] = Safer[key] -} - -// Copy those missing unsafe methods, if they are present -for (key in Buffer) { - if (!Buffer.hasOwnProperty(key)) continue - if (Dangereous.hasOwnProperty(key)) continue - Dangereous[key] = Buffer[key] -} - -if (!Dangereous.allocUnsafe) { - Dangereous.allocUnsafe = function (size) { - if (typeof size !== 'number') { - throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) - } - if (size < 0 || size >= 2 * (1 << 30)) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } - return Buffer(size) - } -} - -if (!Dangereous.allocUnsafeSlow) { - Dangereous.allocUnsafeSlow = function (size) { - if (typeof size !== 'number') { - throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) - } - if (size < 0 || size >= 2 * (1 << 30)) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } - return buffer.SlowBuffer(size) - } -} - -module.exports = dangerous diff --git a/node_modules/safer-buffer/package.json b/node_modules/safer-buffer/package.json deleted file mode 100644 index fd08a8aa08e67771d6d6cd9c85f1d773de6917cd..0000000000000000000000000000000000000000 --- a/node_modules/safer-buffer/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "_from": "safer-buffer@>= 2.1.2 < 3", - "_id": "safer-buffer@2.1.2", - "_inBundle": false, - "_integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "_location": "/safer-buffer", - "_phantomChildren": {}, - "_requested": { - "type": "range", - "registry": true, - "raw": "safer-buffer@>= 2.1.2 < 3", - "name": "safer-buffer", - "escapedName": "safer-buffer", - "rawSpec": ">= 2.1.2 < 3", - "saveSpec": null, - "fetchSpec": ">= 2.1.2 < 3" - }, - "_requiredBy": [ - "/iconv-lite" - ], - "_resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "_shasum": "44fa161b0187b9549dd84bb91802f9bd8385cd6a", - "_spec": "safer-buffer@>= 2.1.2 < 3", - "_where": "/home/dev-laptop/Dylan/locality-sensitive-hashing-visual-analytics/node_modules/iconv-lite", - "author": { - "name": "Nikita Skovoroda", - "email": "chalkerx@gmail.com", - "url": "https://github.com/ChALkeR" - }, - "bugs": { - "url": "https://github.com/ChALkeR/safer-buffer/issues" - }, - "bundleDependencies": false, - "deprecated": false, - "description": "Modern Buffer API polyfill without footguns", - "devDependencies": { - "standard": "^11.0.1", - "tape": "^4.9.0" - }, - "files": [ - "Porting-Buffer.md", - "Readme.md", - "tests.js", - "dangerous.js", - "safer.js" - ], - "homepage": "https://github.com/ChALkeR/safer-buffer#readme", - "license": "MIT", - "main": "safer.js", - "name": "safer-buffer", - "repository": { - "type": "git", - "url": "git+https://github.com/ChALkeR/safer-buffer.git" - }, - "scripts": { - "browserify-test": "browserify --external tape tests.js > browserify-tests.js && tape browserify-tests.js", - "test": "standard && tape tests.js" - }, - "version": "2.1.2" -} diff --git a/node_modules/safer-buffer/safer.js b/node_modules/safer-buffer/safer.js deleted file mode 100644 index 37c7e1aa6cbd4effd94ee28bd7b0655756b80cea..0000000000000000000000000000000000000000 --- a/node_modules/safer-buffer/safer.js +++ /dev/null @@ -1,77 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ - -'use strict' - -var buffer = require('buffer') -var Buffer = buffer.Buffer - -var safer = {} - -var key - -for (key in buffer) { - if (!buffer.hasOwnProperty(key)) continue - if (key === 'SlowBuffer' || key === 'Buffer') continue - safer[key] = buffer[key] -} - -var Safer = safer.Buffer = {} -for (key in Buffer) { - if (!Buffer.hasOwnProperty(key)) continue - if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue - Safer[key] = Buffer[key] -} - -safer.Buffer.prototype = Buffer.prototype - -if (!Safer.from || Safer.from === Uint8Array.from) { - Safer.from = function (value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value) - } - if (value && typeof value.length === 'undefined') { - throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value) - } - return Buffer(value, encodingOrOffset, length) - } -} - -if (!Safer.alloc) { - Safer.alloc = function (size, fill, encoding) { - if (typeof size !== 'number') { - throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size) - } - if (size < 0 || size >= 2 * (1 << 30)) { - throw new RangeError('The value "' + size + '" is invalid for option "size"') - } - var buf = Buffer(size) - if (!fill || fill.length === 0) { - buf.fill(0) - } else if (typeof encoding === 'string') { - buf.fill(fill, encoding) - } else { - buf.fill(fill) - } - return buf - } -} - -if (!safer.kStringMaxLength) { - try { - safer.kStringMaxLength = process.binding('buffer').kStringMaxLength - } catch (e) { - // we can't determine kStringMaxLength in environments where process.binding - // is unsupported, so let's not set it - } -} - -if (!safer.constants) { - safer.constants = { - MAX_LENGTH: safer.kMaxLength - } - if (safer.kStringMaxLength) { - safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength - } -} - -module.exports = safer diff --git a/node_modules/safer-buffer/tests.js b/node_modules/safer-buffer/tests.js deleted file mode 100644 index 7ed2777c92a7991807c516027d5f73d0b47e781b..0000000000000000000000000000000000000000 --- a/node_modules/safer-buffer/tests.js +++ /dev/null @@ -1,406 +0,0 @@ -/* eslint-disable node/no-deprecated-api */ - -'use strict' - -var test = require('tape') - -var buffer = require('buffer') - -var index = require('./') -var safer = require('./safer') -var dangerous = require('./dangerous') - -/* Inheritance tests */ - -test('Default is Safer', function (t) { - t.equal(index, safer) - t.notEqual(safer, dangerous) - t.notEqual(index, dangerous) - t.end() -}) - -test('Is not a function', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.equal(typeof impl, 'object') - t.equal(typeof impl.Buffer, 'object') - }); - [buffer].forEach(function (impl) { - t.equal(typeof impl, 'object') - t.equal(typeof impl.Buffer, 'function') - }) - t.end() -}) - -test('Constructor throws', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.throws(function () { impl.Buffer() }) - t.throws(function () { impl.Buffer(0) }) - t.throws(function () { impl.Buffer('a') }) - t.throws(function () { impl.Buffer('a', 'utf-8') }) - t.throws(function () { return new impl.Buffer() }) - t.throws(function () { return new impl.Buffer(0) }) - t.throws(function () { return new impl.Buffer('a') }) - t.throws(function () { return new impl.Buffer('a', 'utf-8') }) - }) - t.end() -}) - -test('Safe methods exist', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.equal(typeof impl.Buffer.alloc, 'function', 'alloc') - t.equal(typeof impl.Buffer.from, 'function', 'from') - }) - t.end() -}) - -test('Unsafe methods exist only in Dangerous', function (t) { - [index, safer].forEach(function (impl) { - t.equal(typeof impl.Buffer.allocUnsafe, 'undefined') - t.equal(typeof impl.Buffer.allocUnsafeSlow, 'undefined') - }); - [dangerous].forEach(function (impl) { - t.equal(typeof impl.Buffer.allocUnsafe, 'function') - t.equal(typeof impl.Buffer.allocUnsafeSlow, 'function') - }) - t.end() -}) - -test('Generic methods/properties are defined and equal', function (t) { - ['poolSize', 'isBuffer', 'concat', 'byteLength'].forEach(function (method) { - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl.Buffer[method], buffer.Buffer[method], method) - t.notEqual(typeof impl.Buffer[method], 'undefined', method) - }) - }) - t.end() -}) - -test('Built-in buffer static methods/properties are inherited', function (t) { - Object.keys(buffer).forEach(function (method) { - if (method === 'SlowBuffer' || method === 'Buffer') return; - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl[method], buffer[method], method) - t.notEqual(typeof impl[method], 'undefined', method) - }) - }) - t.end() -}) - -test('Built-in Buffer static methods/properties are inherited', function (t) { - Object.keys(buffer.Buffer).forEach(function (method) { - if (method === 'allocUnsafe' || method === 'allocUnsafeSlow') return; - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl.Buffer[method], buffer.Buffer[method], method) - t.notEqual(typeof impl.Buffer[method], 'undefined', method) - }) - }) - t.end() -}) - -test('.prototype property of Buffer is inherited', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl.Buffer.prototype, buffer.Buffer.prototype, 'prototype') - t.notEqual(typeof impl.Buffer.prototype, 'undefined', 'prototype') - }) - t.end() -}) - -test('All Safer methods are present in Dangerous', function (t) { - Object.keys(safer).forEach(function (method) { - if (method === 'Buffer') return; - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl[method], safer[method], method) - if (method !== 'kStringMaxLength') { - t.notEqual(typeof impl[method], 'undefined', method) - } - }) - }) - Object.keys(safer.Buffer).forEach(function (method) { - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl.Buffer[method], safer.Buffer[method], method) - t.notEqual(typeof impl.Buffer[method], 'undefined', method) - }) - }) - t.end() -}) - -test('Safe methods from Dangerous methods are present in Safer', function (t) { - Object.keys(dangerous).forEach(function (method) { - if (method === 'Buffer') return; - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl[method], dangerous[method], method) - if (method !== 'kStringMaxLength') { - t.notEqual(typeof impl[method], 'undefined', method) - } - }) - }) - Object.keys(dangerous.Buffer).forEach(function (method) { - if (method === 'allocUnsafe' || method === 'allocUnsafeSlow') return; - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl.Buffer[method], dangerous.Buffer[method], method) - t.notEqual(typeof impl.Buffer[method], 'undefined', method) - }) - }) - t.end() -}) - -/* Behaviour tests */ - -test('Methods return Buffers', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(0))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(0, 10))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(0, 'a'))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(10))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(10, 'x'))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.alloc(9, 'ab'))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.from(''))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('string'))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('string', 'utf-8'))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64'))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.from([0, 42, 3]))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.from(new Uint8Array([0, 42, 3])))) - t.ok(buffer.Buffer.isBuffer(impl.Buffer.from([]))) - }); - ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { - t.ok(buffer.Buffer.isBuffer(dangerous.Buffer[method](0))) - t.ok(buffer.Buffer.isBuffer(dangerous.Buffer[method](10))) - }) - t.end() -}) - -test('Constructor is buffer.Buffer', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl.Buffer.alloc(0).constructor, buffer.Buffer) - t.equal(impl.Buffer.alloc(0, 10).constructor, buffer.Buffer) - t.equal(impl.Buffer.alloc(0, 'a').constructor, buffer.Buffer) - t.equal(impl.Buffer.alloc(10).constructor, buffer.Buffer) - t.equal(impl.Buffer.alloc(10, 'x').constructor, buffer.Buffer) - t.equal(impl.Buffer.alloc(9, 'ab').constructor, buffer.Buffer) - t.equal(impl.Buffer.from('').constructor, buffer.Buffer) - t.equal(impl.Buffer.from('string').constructor, buffer.Buffer) - t.equal(impl.Buffer.from('string', 'utf-8').constructor, buffer.Buffer) - t.equal(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64').constructor, buffer.Buffer) - t.equal(impl.Buffer.from([0, 42, 3]).constructor, buffer.Buffer) - t.equal(impl.Buffer.from(new Uint8Array([0, 42, 3])).constructor, buffer.Buffer) - t.equal(impl.Buffer.from([]).constructor, buffer.Buffer) - }); - [0, 10, 100].forEach(function (arg) { - t.equal(dangerous.Buffer.allocUnsafe(arg).constructor, buffer.Buffer) - t.equal(dangerous.Buffer.allocUnsafeSlow(arg).constructor, buffer.SlowBuffer(0).constructor) - }) - t.end() -}) - -test('Invalid calls throw', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.throws(function () { impl.Buffer.from(0) }) - t.throws(function () { impl.Buffer.from(10) }) - t.throws(function () { impl.Buffer.from(10, 'utf-8') }) - t.throws(function () { impl.Buffer.from('string', 'invalid encoding') }) - t.throws(function () { impl.Buffer.from(-10) }) - t.throws(function () { impl.Buffer.from(1e90) }) - t.throws(function () { impl.Buffer.from(Infinity) }) - t.throws(function () { impl.Buffer.from(-Infinity) }) - t.throws(function () { impl.Buffer.from(NaN) }) - t.throws(function () { impl.Buffer.from(null) }) - t.throws(function () { impl.Buffer.from(undefined) }) - t.throws(function () { impl.Buffer.from() }) - t.throws(function () { impl.Buffer.from({}) }) - t.throws(function () { impl.Buffer.alloc('') }) - t.throws(function () { impl.Buffer.alloc('string') }) - t.throws(function () { impl.Buffer.alloc('string', 'utf-8') }) - t.throws(function () { impl.Buffer.alloc('b25ldHdvdGhyZWU=', 'base64') }) - t.throws(function () { impl.Buffer.alloc(-10) }) - t.throws(function () { impl.Buffer.alloc(1e90) }) - t.throws(function () { impl.Buffer.alloc(2 * (1 << 30)) }) - t.throws(function () { impl.Buffer.alloc(Infinity) }) - t.throws(function () { impl.Buffer.alloc(-Infinity) }) - t.throws(function () { impl.Buffer.alloc(null) }) - t.throws(function () { impl.Buffer.alloc(undefined) }) - t.throws(function () { impl.Buffer.alloc() }) - t.throws(function () { impl.Buffer.alloc([]) }) - t.throws(function () { impl.Buffer.alloc([0, 42, 3]) }) - t.throws(function () { impl.Buffer.alloc({}) }) - }); - ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { - t.throws(function () { dangerous.Buffer[method]('') }) - t.throws(function () { dangerous.Buffer[method]('string') }) - t.throws(function () { dangerous.Buffer[method]('string', 'utf-8') }) - t.throws(function () { dangerous.Buffer[method](2 * (1 << 30)) }) - t.throws(function () { dangerous.Buffer[method](Infinity) }) - if (dangerous.Buffer[method] === buffer.Buffer.allocUnsafe) { - t.skip('Skipping, older impl of allocUnsafe coerced negative sizes to 0') - } else { - t.throws(function () { dangerous.Buffer[method](-10) }) - t.throws(function () { dangerous.Buffer[method](-1e90) }) - t.throws(function () { dangerous.Buffer[method](-Infinity) }) - } - t.throws(function () { dangerous.Buffer[method](null) }) - t.throws(function () { dangerous.Buffer[method](undefined) }) - t.throws(function () { dangerous.Buffer[method]() }) - t.throws(function () { dangerous.Buffer[method]([]) }) - t.throws(function () { dangerous.Buffer[method]([0, 42, 3]) }) - t.throws(function () { dangerous.Buffer[method]({}) }) - }) - t.end() -}) - -test('Buffers have appropriate lengths', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.equal(impl.Buffer.alloc(0).length, 0) - t.equal(impl.Buffer.alloc(10).length, 10) - t.equal(impl.Buffer.from('').length, 0) - t.equal(impl.Buffer.from('string').length, 6) - t.equal(impl.Buffer.from('string', 'utf-8').length, 6) - t.equal(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64').length, 11) - t.equal(impl.Buffer.from([0, 42, 3]).length, 3) - t.equal(impl.Buffer.from(new Uint8Array([0, 42, 3])).length, 3) - t.equal(impl.Buffer.from([]).length, 0) - }); - ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { - t.equal(dangerous.Buffer[method](0).length, 0) - t.equal(dangerous.Buffer[method](10).length, 10) - }) - t.end() -}) - -test('Buffers have appropriate lengths (2)', function (t) { - t.equal(index.Buffer.alloc, safer.Buffer.alloc) - t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) - var ok = true; - [ safer.Buffer.alloc, - dangerous.Buffer.allocUnsafe, - dangerous.Buffer.allocUnsafeSlow - ].forEach(function (method) { - for (var i = 0; i < 1e2; i++) { - var length = Math.round(Math.random() * 1e5) - var buf = method(length) - if (!buffer.Buffer.isBuffer(buf)) ok = false - if (buf.length !== length) ok = false - } - }) - t.ok(ok) - t.end() -}) - -test('.alloc(size) is zero-filled and has correct length', function (t) { - t.equal(index.Buffer.alloc, safer.Buffer.alloc) - t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) - var ok = true - for (var i = 0; i < 1e2; i++) { - var length = Math.round(Math.random() * 2e6) - var buf = index.Buffer.alloc(length) - if (!buffer.Buffer.isBuffer(buf)) ok = false - if (buf.length !== length) ok = false - var j - for (j = 0; j < length; j++) { - if (buf[j] !== 0) ok = false - } - buf.fill(1) - for (j = 0; j < length; j++) { - if (buf[j] !== 1) ok = false - } - } - t.ok(ok) - t.end() -}) - -test('.allocUnsafe / .allocUnsafeSlow are fillable and have correct lengths', function (t) { - ['allocUnsafe', 'allocUnsafeSlow'].forEach(function (method) { - var ok = true - for (var i = 0; i < 1e2; i++) { - var length = Math.round(Math.random() * 2e6) - var buf = dangerous.Buffer[method](length) - if (!buffer.Buffer.isBuffer(buf)) ok = false - if (buf.length !== length) ok = false - buf.fill(0, 0, length) - var j - for (j = 0; j < length; j++) { - if (buf[j] !== 0) ok = false - } - buf.fill(1, 0, length) - for (j = 0; j < length; j++) { - if (buf[j] !== 1) ok = false - } - } - t.ok(ok, method) - }) - t.end() -}) - -test('.alloc(size, fill) is `fill`-filled', function (t) { - t.equal(index.Buffer.alloc, safer.Buffer.alloc) - t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) - var ok = true - for (var i = 0; i < 1e2; i++) { - var length = Math.round(Math.random() * 2e6) - var fill = Math.round(Math.random() * 255) - var buf = index.Buffer.alloc(length, fill) - if (!buffer.Buffer.isBuffer(buf)) ok = false - if (buf.length !== length) ok = false - for (var j = 0; j < length; j++) { - if (buf[j] !== fill) ok = false - } - } - t.ok(ok) - t.end() -}) - -test('.alloc(size, fill) is `fill`-filled', function (t) { - t.equal(index.Buffer.alloc, safer.Buffer.alloc) - t.equal(index.Buffer.alloc, dangerous.Buffer.alloc) - var ok = true - for (var i = 0; i < 1e2; i++) { - var length = Math.round(Math.random() * 2e6) - var fill = Math.round(Math.random() * 255) - var buf = index.Buffer.alloc(length, fill) - if (!buffer.Buffer.isBuffer(buf)) ok = false - if (buf.length !== length) ok = false - for (var j = 0; j < length; j++) { - if (buf[j] !== fill) ok = false - } - } - t.ok(ok) - t.deepEqual(index.Buffer.alloc(9, 'a'), index.Buffer.alloc(9, 97)) - t.notDeepEqual(index.Buffer.alloc(9, 'a'), index.Buffer.alloc(9, 98)) - - var tmp = new buffer.Buffer(2) - tmp.fill('ok') - if (tmp[1] === tmp[0]) { - // Outdated Node.js - t.deepEqual(index.Buffer.alloc(5, 'ok'), index.Buffer.from('ooooo')) - } else { - t.deepEqual(index.Buffer.alloc(5, 'ok'), index.Buffer.from('okoko')) - } - t.notDeepEqual(index.Buffer.alloc(5, 'ok'), index.Buffer.from('kokok')) - - t.end() -}) - -test('safer.Buffer.from returns results same as Buffer constructor', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.deepEqual(impl.Buffer.from(''), new buffer.Buffer('')) - t.deepEqual(impl.Buffer.from('string'), new buffer.Buffer('string')) - t.deepEqual(impl.Buffer.from('string', 'utf-8'), new buffer.Buffer('string', 'utf-8')) - t.deepEqual(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64'), new buffer.Buffer('b25ldHdvdGhyZWU=', 'base64')) - t.deepEqual(impl.Buffer.from([0, 42, 3]), new buffer.Buffer([0, 42, 3])) - t.deepEqual(impl.Buffer.from(new Uint8Array([0, 42, 3])), new buffer.Buffer(new Uint8Array([0, 42, 3]))) - t.deepEqual(impl.Buffer.from([]), new buffer.Buffer([])) - }) - t.end() -}) - -test('safer.Buffer.from returns consistent results', function (t) { - [index, safer, dangerous].forEach(function (impl) { - t.deepEqual(impl.Buffer.from(''), impl.Buffer.alloc(0)) - t.deepEqual(impl.Buffer.from([]), impl.Buffer.alloc(0)) - t.deepEqual(impl.Buffer.from(new Uint8Array([])), impl.Buffer.alloc(0)) - t.deepEqual(impl.Buffer.from('string', 'utf-8'), impl.Buffer.from('string')) - t.deepEqual(impl.Buffer.from('string'), impl.Buffer.from([115, 116, 114, 105, 110, 103])) - t.deepEqual(impl.Buffer.from('string'), impl.Buffer.from(impl.Buffer.from('string'))) - t.deepEqual(impl.Buffer.from('b25ldHdvdGhyZWU=', 'base64'), impl.Buffer.from('onetwothree')) - t.notDeepEqual(impl.Buffer.from('b25ldHdvdGhyZWU='), impl.Buffer.from('onetwothree')) - }) - t.end() -}) diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 89acad1bdc8ee73d8bcaaf4346a5b2fbd05ad506..0000000000000000000000000000000000000000 --- a/package-lock.json +++ /dev/null @@ -1,525 +0,0 @@ -{ - "requires": true, - "lockfileVersion": 1, - "dependencies": { - "@types/d3": { - "version": "5.16.3", - "resolved": "https://registry.npmjs.org/@types/d3/-/d3-5.16.3.tgz", - "integrity": "sha512-s3wrhYhu25XZQ5p1hI9gEMSX5bx7lg9hAmi0+i5r3v75Gz1zRTgB2Q0psx+SO+4K0AO/PPJ1pnHCz64pANN/4w==", - "dev": true, - "requires": { - "@types/d3-array": "^1", - "@types/d3-axis": "^1", - "@types/d3-brush": "^1", - "@types/d3-chord": "^1", - "@types/d3-collection": "*", - "@types/d3-color": "^1", - "@types/d3-contour": "^1", - "@types/d3-dispatch": "^1", - "@types/d3-drag": "^1", - "@types/d3-dsv": "^1", - "@types/d3-ease": "^1", - "@types/d3-fetch": "^1", - "@types/d3-force": "^1", - "@types/d3-format": "^1", - "@types/d3-geo": "^1", - "@types/d3-hierarchy": "^1", - "@types/d3-interpolate": "^1", - "@types/d3-path": "^1", - "@types/d3-polygon": "^1", - "@types/d3-quadtree": "^1", - "@types/d3-random": "^1", - "@types/d3-scale": "^2", - "@types/d3-scale-chromatic": "^1", - "@types/d3-selection": "^1", - "@types/d3-shape": "^1", - "@types/d3-time": "^1", - "@types/d3-time-format": "^2", - "@types/d3-timer": "^1", - "@types/d3-transition": "^1", - "@types/d3-voronoi": "*", - "@types/d3-zoom": "^1" - } - }, - "@types/d3-array": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@types/d3-array/-/d3-array-1.2.8.tgz", - "integrity": "sha512-wWV0wT6oLUGprrOR5LMK7Dh8EBiondhnqINsvazv6UucYfTdb2oaFF4knlqzZV2RKB9ZC9G7G1Iojt8b/wolsw==" - }, - "@types/d3-axis": { - "version": "1.0.14", - "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-1.0.14.tgz", - "integrity": "sha512-wZAKX/dtFT5t5iuCaiU0QL0BWB19TE6h7C7kgfBVyoka7zidQWvf8E9zQTJ5bNPBQxd0+JmplNqwy1M8O8FOjA==", - "requires": { - "@types/d3-selection": "^1" - } - }, - "@types/d3-brush": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-1.1.4.tgz", - "integrity": "sha512-2t8CgWaha9PsPdSZJ9m6Jl4awqf3DGIXek2e7gfheyfP2R0a/18MX+wuLHx+LyI1Ad7lxDsPWcswKD0XhQEjmg==", - "requires": { - "@types/d3-selection": "^1" - } - }, - "@types/d3-chord": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@types/d3-chord/-/d3-chord-1.0.10.tgz", - "integrity": "sha512-U6YojfET6ITL1/bUJo+/Lh3pMV9XPAfOWwbshl3y3RlgAX9VO/Bxa13IMAylZIDY4VsA3Gkh29kZP1AcAeyoYA==" - }, - "@types/d3-collection": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/d3-collection/-/d3-collection-1.0.9.tgz", - "integrity": "sha512-Oeaor3M3YjN+GH9dYXY3iKeTVTlNVNveLpvb3coDTIcIklVluP9aze++ByNfkZHDeu7eaQTWBloBeoPQNtrG7w==" - }, - "@types/d3-color": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@types/d3-color/-/d3-color-1.4.1.tgz", - "integrity": "sha512-xkPLi+gbgUU9ED6QX4g6jqYL2KCB0/3AlM+ncMGqn49OgH0gFMY/ITGqPF8HwEiLzJaC+2L0I+gNwBgABv1Pvg==" - }, - "@types/d3-contour": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-1.3.1.tgz", - "integrity": "sha512-wWwsM/3NfKTRBdH00cSf+XlsaHlNTkvH66PgDedobyvKQZ4sJrXXpr16LXvDnAal4B67v8JGrWDgyx6dqqKLuQ==", - "requires": { - "@types/d3-array": "^1", - "@types/geojson": "*" - } - }, - "@types/d3-dispatch": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/d3-dispatch/-/d3-dispatch-1.0.9.tgz", - "integrity": "sha512-zJ44YgjqALmyps+II7b1mZLhrtfV/FOxw9owT87mrweGWcg+WK5oiJX2M3SYJ0XUAExBduarysfgbR11YxzojQ==" - }, - "@types/d3-drag": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-1.2.5.tgz", - "integrity": "sha512-7NeTnfolst1Js3Vs7myctBkmJWu6DMI3k597AaHUX98saHjHWJ6vouT83UrpE+xfbSceHV+8A0JgxuwgqgmqWw==", - "requires": { - "@types/d3-selection": "^1" - } - }, - "@types/d3-dsv": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@types/d3-dsv/-/d3-dsv-1.2.1.tgz", - "integrity": "sha512-LLmJmjiqp/fTNEdij5bIwUJ6P6TVNk5hKM9/uk5RPO2YNgEu9XvKO0dJ7Iqd3psEdmZN1m7gB1bOsjr4HmO2BA==" - }, - "@types/d3-ease": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@types/d3-ease/-/d3-ease-1.0.10.tgz", - "integrity": "sha512-fMFTCzd8DOwruE9zlu2O8ci5ct+U5jkGcDS+cH+HCidnJlDs0MZ+TuSVCFtEzh4E5MasItwy+HvgoFtxPHa5Cw==" - }, - "@types/d3-fetch": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-1.2.2.tgz", - "integrity": "sha512-rtFs92GugtV/NpiJQd0WsmGLcg52tIL0uF0bKbbJg231pR9JEb6HT4AUwrtuLq3lOeKdLBhsjV14qb0pMmd0Aw==", - "requires": { - "@types/d3-dsv": "^1" - } - }, - "@types/d3-force": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/@types/d3-force/-/d3-force-1.2.2.tgz", - "integrity": "sha512-TN7KO7sk0tJauedIt0q20RQRFo4V3v97pJKO/TDK40X3LaPM1aXRM2+zFF+nRMtseEiszg4KffudhjR8a3+4cg==" - }, - "@types/d3-format": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/@types/d3-format/-/d3-format-1.4.1.tgz", - "integrity": "sha512-ss9G2snEKmp2In5Z3T0Jpqv8QaDBc2xHltBw83KjnV5B5w+Iwphbvq5ph/Xnu4d03fmmsdt+o1aWch379rxIbA==" - }, - "@types/d3-geo": { - "version": "1.12.1", - "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-1.12.1.tgz", - "integrity": "sha512-8+gyGFyMCXIHtnMNKQDT++tZ4XYFXgiP5NK7mcv34aYXA16GQFiBBITjKzxghpO8QNVceOd9rUn1JY92WLNGQw==", - "requires": { - "@types/geojson": "*" - } - }, - "@types/d3-hierarchy": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/@types/d3-hierarchy/-/d3-hierarchy-1.1.7.tgz", - "integrity": "sha512-fvht6DOYKzqmXjMb/+xfgkmrWM4SD7rMA/ZbM+gGwr9ZTuIDfky95J8CARtaJo/ExeWyS0xGVdL2gqno2zrQ0Q==" - }, - "@types/d3-interpolate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-1.4.2.tgz", - "integrity": "sha512-ylycts6llFf8yAEs1tXzx2loxxzDZHseuhPokrqKprTQSTcD3JbJI1omZP1rphsELZO3Q+of3ff0ZS7+O6yVzg==", - "requires": { - "@types/d3-color": "^1" - } - }, - "@types/d3-path": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@types/d3-path/-/d3-path-1.0.9.tgz", - "integrity": "sha512-NaIeSIBiFgSC6IGUBjZWcscUJEq7vpVu7KthHN8eieTV9d9MqkSOZLH4chq1PmcKy06PNe3axLeKmRIyxJ+PZQ==" - }, - "@types/d3-polygon": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/d3-polygon/-/d3-polygon-1.0.8.tgz", - "integrity": "sha512-1TOJPXCBJC9V3+K3tGbTqD/CsqLyv/YkTXAcwdsZzxqw5cvpdnCuDl42M4Dvi8XzMxZNCT9pL4ibrK2n4VmAcw==" - }, - "@types/d3-quadtree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/d3-quadtree/-/d3-quadtree-1.0.8.tgz", - "integrity": "sha512-FuqYiexeSQZlc+IcGAVK8jSJKDFKHcSf/jx8rqJUUVx6rzv7ecQiXKyatrLHHh3W4CAvgNeVI23JKgk4+x2wFg==" - }, - "@types/d3-random": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@types/d3-random/-/d3-random-1.1.3.tgz", - "integrity": "sha512-XXR+ZbFCoOd4peXSMYJzwk0/elP37WWAzS/DG+90eilzVbUSsgKhBcWqylGWe+lA2ubgr7afWAOBaBxRgMUrBQ==" - }, - "@types/d3-scale": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-2.2.4.tgz", - "integrity": "sha512-wkQXT+IfgfAnKB5rtS1qMJg3FS32r1rVFHvqtiqk8pX8o5aQR3VwX1P7ErHjzNIicTlkWsaMiUTrYB+E75HFeA==", - "requires": { - "@types/d3-time": "^1" - } - }, - "@types/d3-scale-chromatic": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/@types/d3-scale-chromatic/-/d3-scale-chromatic-1.5.1.tgz", - "integrity": "sha512-7FtJYrmXTEWLykShjYhoGuDNR/Bda0+tstZMkFj4RRxUEryv16AGh3be21tqg84B6KfEwiZyEpBcTyPyU+GWjg==" - }, - "@types/d3-selection": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/@types/d3-selection/-/d3-selection-1.4.3.tgz", - "integrity": "sha512-GjKQWVZO6Sa96HiKO6R93VBE8DUW+DDkFpIMf9vpY5S78qZTlRRSNUsHr/afDpF7TvLDV7VxrUFOWW7vdIlYkA==" - }, - "@types/d3-shape": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-1.3.4.tgz", - "integrity": "sha512-fxmOjs+UqNQGpztD5BOo+KriE0jLFrBP4Ct++0QExv/xfDOT1cpcMxgsZ+5qPmnR0t+GjbwAe1Um1PHpv3G4oA==", - "requires": { - "@types/d3-path": "^1" - } - }, - "@types/d3-time": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/d3-time/-/d3-time-1.1.1.tgz", - "integrity": "sha512-ULX7LoqXTCYtM+tLYOaeAJK7IwCT+4Gxlm2MaH0ErKLi07R5lh8NHCAyWcDkCCmx1AfRcBEV6H9QE9R25uP7jw==" - }, - "@types/d3-time-format": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@types/d3-time-format/-/d3-time-format-2.3.1.tgz", - "integrity": "sha512-fck0Z9RGfIQn3GJIEKVrp15h9m6Vlg0d5XXeiE/6+CQiBmMDZxfR21XtjEPuDeg7gC3bBM0SdieA5XF3GW1wKA==" - }, - "@types/d3-timer": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-1.0.10.tgz", - "integrity": "sha512-ZnAbquVqy+4ZjdW0cY6URp+qF/AzTVNda2jYyOzpR2cPT35FTXl78s15Bomph9+ckOiI1TtkljnWkwbIGAb6rg==" - }, - "@types/d3-transition": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-1.3.1.tgz", - "integrity": "sha512-U9CpMlTL/NlqdGXBlHYxTZwbmy/vN1cFv8TuAIFPX+xOW/1iChbeJBY2xmINhDQfkGJbgkH4IovafCwI1ZDrgg==", - "requires": { - "@types/d3-selection": "^1" - } - }, - "@types/d3-voronoi": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@types/d3-voronoi/-/d3-voronoi-1.1.9.tgz", - "integrity": "sha512-DExNQkaHd1F3dFPvGA/Aw2NGyjMln6E9QzsiqOcBgnE+VInYnFBHBBySbZQts6z6xD+5jTfKCP7M4OqMyVjdwQ==" - }, - "@types/d3-zoom": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-1.8.2.tgz", - "integrity": "sha512-rU0LirorUxkLxEHSzkFs7pPC0KWsxRGc0sHrxEDR0/iQq+7/xpNkKuuOOwthlgvOtpOvtTLJ2JFOD6Kr0Si4Uw==", - "requires": { - "@types/d3-interpolate": "^1", - "@types/d3-selection": "^1" - } - }, - "@types/geojson": { - "version": "7946.0.7", - "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.7.tgz", - "integrity": "sha512-wE2v81i4C4Ol09RtsWFAqg3BUitWbHSpSlIo+bNdsCJijO9sjme+zm+73ZMCa/qMC8UEERxzGbvmr1cffo2SiQ==" - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "d3": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/d3/-/d3-6.2.0.tgz", - "integrity": "sha512-aH+kx55J8vRBh4K4k9GN4EbNO3QnZsXy4XBfrnr4fL2gQuszUAPQU3fV2oObO2iSpreRH/bG/wfvO+hDu2+e9w==", - "requires": { - "d3-array": "2", - "d3-axis": "2", - "d3-brush": "2", - "d3-chord": "2", - "d3-color": "2", - "d3-contour": "2", - "d3-delaunay": "5", - "d3-dispatch": "2", - "d3-drag": "2", - "d3-dsv": "2", - "d3-ease": "2", - "d3-fetch": "2", - "d3-force": "2", - "d3-format": "2", - "d3-geo": "2", - "d3-hierarchy": "2", - "d3-interpolate": "2", - "d3-path": "2", - "d3-polygon": "2", - "d3-quadtree": "2", - "d3-random": "2", - "d3-scale": "3", - "d3-scale-chromatic": "2", - "d3-selection": "2", - "d3-shape": "2", - "d3-time": "2", - "d3-time-format": "3", - "d3-timer": "2", - "d3-transition": "2", - "d3-zoom": "2" - } - }, - "d3-array": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.8.0.tgz", - "integrity": "sha512-6V272gsOeg7+9pTW1jSYOR1QE37g95I3my1hBmY+vOUNHRrk9yt4OTz/gK7PMkVAVDrYYq4mq3grTiZ8iJdNIw==" - }, - "d3-axis": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-2.0.0.tgz", - "integrity": "sha512-9nzB0uePtb+u9+dWir+HTuEAKJOEUYJoEwbJPsZ1B4K3iZUgzJcSENQ05Nj7S4CIfbZZ8/jQGoUzGKFznBhiiQ==" - }, - "d3-brush": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-2.1.0.tgz", - "integrity": "sha512-cHLLAFatBATyIKqZOkk/mDHUbzne2B3ZwxkzMHvFTCZCmLaXDpZRihQSn8UNXTkGD/3lb/W2sQz0etAftmHMJQ==", - "requires": { - "d3-dispatch": "1 - 2", - "d3-drag": "2", - "d3-interpolate": "1 - 2", - "d3-selection": "2", - "d3-transition": "2" - } - }, - "d3-chord": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-2.0.0.tgz", - "integrity": "sha512-D5PZb7EDsRNdGU4SsjQyKhja8Zgu+SHZfUSO5Ls8Wsn+jsAKUUGkcshLxMg9HDFxG3KqavGWaWkJ8EpU8ojuig==", - "requires": { - "d3-path": "1 - 2" - } - }, - "d3-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-color/-/d3-color-2.0.0.tgz", - "integrity": "sha512-SPXi0TSKPD4g9tw0NMZFnR95XVgUZiBH+uUTqQuDu1OsE2zomHU7ho0FISciaPvosimixwHFl3WHLGabv6dDgQ==" - }, - "d3-contour": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-2.0.0.tgz", - "integrity": "sha512-9unAtvIaNk06UwqBmvsdHX7CZ+NPDZnn8TtNH1myW93pWJkhsV25JcgnYAu0Ck5Veb1DHiCv++Ic5uvJ+h50JA==", - "requires": { - "d3-array": "2" - } - }, - "d3-delaunay": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/d3-delaunay/-/d3-delaunay-5.3.0.tgz", - "integrity": "sha512-amALSrOllWVLaHTnDLHwMIiz0d1bBu9gZXd1FiLfXf8sHcX9jrcj81TVZOqD4UX7MgBZZ07c8GxzEgBpJqc74w==", - "requires": { - "delaunator": "4" - } - }, - "d3-dispatch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-2.0.0.tgz", - "integrity": "sha512-S/m2VsXI7gAti2pBoLClFFTMOO1HTtT0j99AuXLoGFKO6deHDdnv6ZGTxSTTUTgO1zVcv82fCOtDjYK4EECmWA==" - }, - "d3-drag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-2.0.0.tgz", - "integrity": "sha512-g9y9WbMnF5uqB9qKqwIIa/921RYWzlUDv9Jl1/yONQwxbOfszAWTCm8u7HOTgJgRDXiRZN56cHT9pd24dmXs8w==", - "requires": { - "d3-dispatch": "1 - 2", - "d3-selection": "2" - } - }, - "d3-dsv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-2.0.0.tgz", - "integrity": "sha512-E+Pn8UJYx9mViuIUkoc93gJGGYut6mSDKy2+XaPwccwkRGlR+LO97L2VCCRjQivTwLHkSnAJG7yo00BWY6QM+w==", - "requires": { - "commander": "2", - "iconv-lite": "0.4", - "rw": "1" - } - }, - "d3-ease": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-2.0.0.tgz", - "integrity": "sha512-68/n9JWarxXkOWMshcT5IcjbB+agblQUaIsbnXmrzejn2O82n3p2A9R2zEB9HIEFWKFwPAEDDN8gR0VdSAyyAQ==" - }, - "d3-fetch": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-2.0.0.tgz", - "integrity": "sha512-TkYv/hjXgCryBeNKiclrwqZH7Nb+GaOwo3Neg24ZVWA3MKB+Rd+BY84Nh6tmNEMcjUik1CSUWjXYndmeO6F7sw==", - "requires": { - "d3-dsv": "1 - 2" - } - }, - "d3-force": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-2.1.1.tgz", - "integrity": "sha512-nAuHEzBqMvpFVMf9OX75d00OxvOXdxY+xECIXjW6Gv8BRrXu6gAWbv/9XKrvfJ5i5DCokDW7RYE50LRoK092ew==", - "requires": { - "d3-dispatch": "1 - 2", - "d3-quadtree": "1 - 2", - "d3-timer": "1 - 2" - } - }, - "d3-format": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-format/-/d3-format-2.0.0.tgz", - "integrity": "sha512-Ab3S6XuE/Q+flY96HXT0jOXcM4EAClYFnRGY5zsjRGNy6qCYrQsMffs7cV5Q9xejb35zxW5hf/guKw34kvIKsA==" - }, - "d3-geo": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-2.0.1.tgz", - "integrity": "sha512-M6yzGbFRfxzNrVhxDJXzJqSLQ90q1cCyb3EWFZ1LF4eWOBYxFypw7I/NFVBNXKNqxv1bqLathhYvdJ6DC+th3A==", - "requires": { - "d3-array": ">=2.5" - } - }, - "d3-hierarchy": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-hierarchy/-/d3-hierarchy-2.0.0.tgz", - "integrity": "sha512-SwIdqM3HxQX2214EG9GTjgmCc/mbSx4mQBn+DuEETubhOw6/U3fmnji4uCVrmzOydMHSO1nZle5gh6HB/wdOzw==" - }, - "d3-interpolate": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-2.0.1.tgz", - "integrity": "sha512-c5UhwwTs/yybcmTpAVqwSFl6vrQ8JZJoT5F7xNFK9pymv5C0Ymcc9/LIJHtYIggg/yS9YHw8i8O8tgb9pupjeQ==", - "requires": { - "d3-color": "1 - 2" - } - }, - "d3-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-path/-/d3-path-2.0.0.tgz", - "integrity": "sha512-ZwZQxKhBnv9yHaiWd6ZU4x5BtCQ7pXszEV9CU6kRgwIQVQGLMv1oiL4M+MK/n79sYzsj+gcgpPQSctJUsLN7fA==" - }, - "d3-polygon": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-polygon/-/d3-polygon-2.0.0.tgz", - "integrity": "sha512-MsexrCK38cTGermELs0cO1d79DcTsQRN7IWMJKczD/2kBjzNXxLUWP33qRF6VDpiLV/4EI4r6Gs0DAWQkE8pSQ==" - }, - "d3-quadtree": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-quadtree/-/d3-quadtree-2.0.0.tgz", - "integrity": "sha512-b0Ed2t1UUalJpc3qXzKi+cPGxeXRr4KU9YSlocN74aTzp6R/Ud43t79yLLqxHRWZfsvWXmbDWPpoENK1K539xw==" - }, - "d3-random": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/d3-random/-/d3-random-2.2.2.tgz", - "integrity": "sha512-0D9P8TRj6qDAtHhRQn6EfdOtHMfsUWanl3yb/84C4DqpZ+VsgfI5iTVRNRbELCfNvRfpMr8OrqqUTQ6ANGCijw==" - }, - "d3-scale": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-3.2.3.tgz", - "integrity": "sha512-8E37oWEmEzj57bHcnjPVOBS3n4jqakOeuv1EDdQSiSrYnMCBdMd3nc4HtKk7uia8DUHcY/CGuJ42xxgtEYrX0g==", - "requires": { - "d3-array": "^2.3.0", - "d3-format": "1 - 2", - "d3-interpolate": "1.2.0 - 2", - "d3-time": "1 - 2", - "d3-time-format": "2 - 3" - } - }, - "d3-scale-chromatic": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-2.0.0.tgz", - "integrity": "sha512-LLqy7dJSL8yDy7NRmf6xSlsFZ6zYvJ4BcWFE4zBrOPnQERv9zj24ohnXKRbyi9YHnYV+HN1oEO3iFK971/gkzA==", - "requires": { - "d3-color": "1 - 2", - "d3-interpolate": "1 - 2" - } - }, - "d3-selection": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-2.0.0.tgz", - "integrity": "sha512-XoGGqhLUN/W14NmaqcO/bb1nqjDAw5WtSYb2X8wiuQWvSZUsUVYsOSkOybUrNvcBjaywBdYPy03eXHMXjk9nZA==" - }, - "d3-shape": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-2.0.0.tgz", - "integrity": "sha512-djpGlA779ua+rImicYyyjnOjeubyhql1Jyn1HK0bTyawuH76UQRWXd+pftr67H6Fa8hSwetkgb/0id3agKWykw==", - "requires": { - "d3-path": "1 - 2" - } - }, - "d3-time": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-time/-/d3-time-2.0.0.tgz", - "integrity": "sha512-2mvhstTFcMvwStWd9Tj3e6CEqtOivtD8AUiHT8ido/xmzrI9ijrUUihZ6nHuf/vsScRBonagOdj0Vv+SEL5G3Q==" - }, - "d3-time-format": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-3.0.0.tgz", - "integrity": "sha512-UXJh6EKsHBTjopVqZBhFysQcoXSv/5yLONZvkQ5Kk3qbwiUYkdX17Xa1PT6U1ZWXGGfB1ey5L8dKMlFq2DO0Ag==", - "requires": { - "d3-time": "1 - 2" - } - }, - "d3-timer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-2.0.0.tgz", - "integrity": "sha512-TO4VLh0/420Y/9dO3+f9abDEFYeCUr2WZRlxJvbp4HPTQcSylXNiL6yZa9FIUvV1yRiFufl1bszTCLDqv9PWNA==" - }, - "d3-transition": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-2.0.0.tgz", - "integrity": "sha512-42ltAGgJesfQE3u9LuuBHNbGrI/AJjNL2OAUdclE70UE6Vy239GCBEYD38uBPoLeNsOhFStGpPI0BAOV+HMxog==", - "requires": { - "d3-color": "1 - 2", - "d3-dispatch": "1 - 2", - "d3-ease": "1 - 2", - "d3-interpolate": "1 - 2", - "d3-timer": "1 - 2" - } - }, - "d3-zoom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-2.0.0.tgz", - "integrity": "sha512-fFg7aoaEm9/jf+qfstak0IYpnesZLiMX6GZvXtUSdv8RH2o4E2qeelgdU09eKS6wGuiGMfcnMI0nTIqWzRHGpw==", - "requires": { - "d3-dispatch": "1 - 2", - "d3-drag": "2", - "d3-interpolate": "1 - 2", - "d3-selection": "2", - "d3-transition": "2" - } - }, - "delaunator": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/delaunator/-/delaunator-4.0.1.tgz", - "integrity": "sha512-WNPWi1IRKZfCt/qIDMfERkDp93+iZEmOxN2yy4Jg+Xhv8SLk2UTqqbe1sfiipn0and9QrE914/ihdx82Y/Giag==" - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "rw": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", - "integrity": "sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - } - } -} diff --git a/run-angular.bat b/run-angular.bat deleted file mode 100644 index b72f6009cd2a8e247072b878e820ef2780b6faab..0000000000000000000000000000000000000000 --- a/run-angular.bat +++ /dev/null @@ -1,3 +0,0 @@ -cd AngularApp -cd prototype -ng serve --open \ No newline at end of file diff --git a/run-flask-server.bat b/run-flask-server.bat deleted file mode 100644 index 6e01969e2891183f51fbe0a65b9c7e366e8909d5..0000000000000000000000000000000000000000 --- a/run-flask-server.bat +++ /dev/null @@ -1,2 +0,0 @@ -cd Flaskserver & venv\Scripts\activate & set FLASK_APP=main.py & set FLASK_ENV=development & set FLASK_DEBUG=1 & flask run -