vue-chrts 2.1.0-beta-2 → 2.1.0-beta-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AreaChart/AreaChart.js +127 -107
- package/dist/components/AreaChart/types.d.ts +34 -1
- package/dist/components/BarChart/BarChart.js +76 -65
- package/dist/components/BarChart/types.d.ts +9 -1
- package/dist/components/BubbleChart/BubbleChart.js +55 -45
- package/dist/components/BubbleChart/types.d.ts +9 -1
- package/dist/components/DagreGraph/DagreGraph.js +33 -24
- package/dist/components/DagreGraph/types.d.ts +5 -1
- package/dist/components/DonutChart/DonutChart.js +69 -59
- package/dist/components/DonutChart/types.d.ts +14 -2
- package/dist/components/DualChart/DualChart.js +56 -46
- package/dist/components/DualChart/types.d.ts +10 -1
- package/dist/components/GanttChart/GanttChart.js +58 -48
- package/dist/components/GanttChart/types.d.ts +9 -1
- package/dist/components/LineChart/LineChart.js +17 -9
- package/dist/components/Maps/DottedMap/DottedMap.js +170 -0
- package/dist/components/Maps/DottedMap/DottedMap.vue.d.ts +52 -0
- package/dist/components/Maps/DottedMap/DottedMap2.js +4 -0
- package/dist/components/Maps/DottedMap/MapLegend.vue.d.ts +6 -0
- package/dist/components/Maps/DottedMap/MapZoomControls.js +44 -0
- package/dist/components/Maps/DottedMap/MapZoomControls.vue.d.ts +13 -0
- package/dist/components/Maps/DottedMap/MapZoomControls2.js +4 -0
- package/dist/components/Maps/DottedMap/core.js +122 -0
- package/dist/components/Maps/DottedMap/core.vue.d.ts +36 -0
- package/dist/components/Maps/DottedMap/core2.js +4 -0
- package/dist/components/Maps/DottedMap/mapUtils.d.ts +49 -0
- package/dist/components/Maps/DottedMap/mapUtils.js +130 -0
- package/dist/components/Maps/DottedMap/pins.d.ts +9 -0
- package/dist/components/Maps/DottedMap/pins.js +58 -0
- package/dist/components/Maps/DottedMap/regions.d.ts +4 -0
- package/dist/components/Maps/DottedMap/regions.js +66 -0
- package/dist/components/Maps/DottedMap/types.d.ts +127 -0
- package/dist/components/Maps/DottedMap/useMapPanZoom.d.ts +22 -0
- package/dist/components/Maps/DottedMap/useMapPanZoom.js +41 -0
- package/dist/components/Maps/TopoJSONMap/TopoJSONMap.js +170 -0
- package/dist/components/Maps/TopoJSONMap/TopoJSONMap.vue.d.ts +30 -0
- package/dist/components/Maps/TopoJSONMap/TopoJSONMap2.js +4 -0
- package/dist/components/Maps/TopoJSONMap/data.d.ts +13 -0
- package/dist/components/Maps/TopoJSONMap/types.d.ts +40 -0
- package/dist/components/Maps/types.d.ts +48 -0
- package/dist/components/SankeyChart/SankeyChart.js +50 -40
- package/dist/components/SankeyChart/SankeyChart.vue.d.ts +1 -1
- package/dist/components/SankeyChart/types.d.ts +14 -1
- package/dist/components/Tooltip.js +32 -27
- package/dist/data/countries.geo.json.js +9 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +27 -23
- package/dist/node_modules/.pnpm/@turf_boolean-point-in-polygon@7.3.1/node_modules/@turf/boolean-point-in-polygon/dist/esm/index.js +28 -0
- package/dist/node_modules/.pnpm/@turf_invariant@7.3.1/node_modules/@turf/invariant/dist/esm/index.js +20 -0
- package/dist/node_modules/.pnpm/mgrs@1.0.0/node_modules/mgrs/mgrs.js +222 -0
- package/dist/node_modules/.pnpm/point-in-polygon-hao@1.2.4/node_modules/point-in-polygon-hao/dist/esm/index.js +25 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Point.js +24 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/Proj.js +46 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/adjust_axis.js +31 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/checkSanity.js +15 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lat.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_lon.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/adjust_zone.js +13 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinhy.js +9 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/asinz.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/clens_cmplx.js +10 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/cosh.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e0fn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e1fn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e2fn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/e3fn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gN.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/gatg.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/hypot.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/imlfn.js +11 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/iqsfnz.js +13 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/log1py.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/mlfn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/msfnz.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/phi2z.js +10 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_enfn.js +10 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_inv_mlfn.js +14 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/pj_mlfn.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/qsfnz.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sign.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/sinh.js +7 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/srat.js +6 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/toPoint.js +10 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/tsfnz.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/common/vincenty.js +33 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Datum.js +1278 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/Ellipsoid.js +226 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/PrimeMeridian.js +17 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/units.js +25 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/constants/values.js +22 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/core.js +65 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum.js +8 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datumUtils.js +82 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/datum_transform.js +94 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/defs.js +39 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/deriveConstants.js +30 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/extend.js +12 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/global.js +9 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/index.js +25 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/match.js +11 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/nadgrid.js +128 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/parseCode.js +47 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projString.js +119 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aea.js +43 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/aeqd.js +36 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/bonne.js +55 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cass.js +52 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/cea.js +36 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqc.js +27 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqdc.js +48 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/eqearth.js +30 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/etmerc.js +54 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gauss.js +27 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geocent.js +26 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/geos.js +49 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/gnom.js +28 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/krovak.js +31 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/laea.js +134 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/lcc.js +61 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/longlat.js +19 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/merc.js +49 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/mill.js +26 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/moll.js +37 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/nzmg.js +48 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ob_tran.js +173 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/omerc.js +58 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/ortho.js +28 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/poly.js +68 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/qsc.js +67 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/robin.js +104 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sinu.js +47 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/somerc.js +34 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/stere.js +46 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/sterea.js +33 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tmerc.js +60 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/tpers.js +110 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/utm.js +22 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections/vandg.js +34 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/projections.js +34 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/lib/transform.js +49 -0
- package/dist/node_modules/.pnpm/proj4@2.20.2/node_modules/proj4/projs.js +38 -0
- package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/orient2d.js +23 -0
- package/dist/node_modules/.pnpm/robust-predicates@3.0.2/node_modules/robust-predicates/esm/util.js +30 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2015.js +9 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilder2019.js +20 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/PROJJSONBuilderBase.js +171 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/buildPROJJSON.js +11 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/detectWKTVersion.js +7 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/index.js +104 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/parser.js +117 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/process.js +89 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/transformPROJJSON.js +73 -0
- package/dist/node_modules/.pnpm/wkt-parser@1.5.2/node_modules/wkt-parser/util.js +12 -0
- package/dist/types.d.ts +60 -13
- package/dist/types.js +4 -6
- package/dist/utils/geoJsonToGrid.d.ts +14 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +8 -2
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,9 @@ import { default as GanttChart } from './components/GanttChart/GanttChart.vue';
|
|
|
7
7
|
import { default as DagreGraph } from './components/DagreGraph/DagreGraph.vue';
|
|
8
8
|
import { default as DualChart } from './components/DualChart/DualChart.vue';
|
|
9
9
|
import { default as SankeyChart } from './components/SankeyChart/SankeyChart.vue';
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
import { default as TopoJSONMap } from './components/Maps/TopoJSONMap/TopoJSONMap.vue';
|
|
11
|
+
import { default as DottedMap } from './components/Maps/DottedMap/DottedMap.vue';
|
|
12
|
+
import { LegendPosition, CurveType, Orientation, MarkerConfig, CrosshairConfig, DonutType, BulletLegendItemInterface } from './types';
|
|
13
|
+
export { getMap, getPin } from './components/Maps/DottedMap/mapUtils';
|
|
14
|
+
export { AreaChart, LineChart, BarChart, DonutChart, BubbleChart, GanttChart, DagreGraph, DualChart, SankeyChart, TopoJSONMap, DottedMap, Orientation, CurveType, LegendPosition, DonutType };
|
|
15
|
+
export type { BulletLegendItemInterface, MarkerConfig, CrosshairConfig };
|
package/dist/index.js
CHANGED
|
@@ -1,29 +1,33 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import { default as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
1
|
+
import { default as a } from "./components/AreaChart/AreaChart.js";
|
|
2
|
+
import { default as o } from "./components/LineChart/LineChart.js";
|
|
3
|
+
import { default as p } from "./components/BarChart/BarChart.js";
|
|
4
|
+
import { default as m } from "./components/DonutChart/DonutChart.js";
|
|
5
|
+
import { default as d } from "./components/BubbleChart/BubbleChart.js";
|
|
6
6
|
import { default as s } from "./components/GanttChart/GanttChart.js";
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
7
|
+
import { default as h } from "./components/DagreGraph/DagreGraph.js";
|
|
8
|
+
import { default as i } from "./components/DualChart/DualChart.js";
|
|
9
9
|
import { default as g } from "./components/SankeyChart/SankeyChart.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
10
|
+
import { default as M } from "./components/Maps/TopoJSONMap/TopoJSONMap.js";
|
|
11
|
+
import { default as b } from "./components/Maps/DottedMap/DottedMap.js";
|
|
12
|
+
import { getMap as G, getPin as L } from "./components/Maps/DottedMap/mapUtils.js";
|
|
13
|
+
import { CurveType as P, LegendPosition as S, Orientation as k } from "./types.js";
|
|
14
|
+
import { DonutType as A } from "./components/DonutChart/types.js";
|
|
13
15
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
b as
|
|
22
|
-
|
|
16
|
+
a as AreaChart,
|
|
17
|
+
p as BarChart,
|
|
18
|
+
d as BubbleChart,
|
|
19
|
+
P as CurveType,
|
|
20
|
+
h as DagreGraph,
|
|
21
|
+
m as DonutChart,
|
|
22
|
+
A as DonutType,
|
|
23
|
+
b as DottedMap,
|
|
24
|
+
i as DualChart,
|
|
23
25
|
s as GanttChart,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
S as LegendPosition,
|
|
27
|
+
o as LineChart,
|
|
28
|
+
k as Orientation,
|
|
27
29
|
g as SankeyChart,
|
|
28
|
-
|
|
30
|
+
M as TopoJSONMap,
|
|
31
|
+
G as getMap,
|
|
32
|
+
L as getPin
|
|
29
33
|
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import c from "../../../../../../point-in-polygon-hao@1.2.4/node_modules/point-in-polygon-hao/dist/esm/index.js";
|
|
2
|
+
import { getCoord as d, getGeom as g } from "../../../../../../@turf_invariant@7.3.1/node_modules/@turf/invariant/dist/esm/index.js";
|
|
3
|
+
function y(o, e, u = {}) {
|
|
4
|
+
if (!o)
|
|
5
|
+
throw new Error("point is required");
|
|
6
|
+
if (!e)
|
|
7
|
+
throw new Error("polygon is required");
|
|
8
|
+
const n = d(o), i = g(e), a = i.type, f = e.bbox;
|
|
9
|
+
let r = i.coordinates;
|
|
10
|
+
if (f && m(n, f) === !1)
|
|
11
|
+
return !1;
|
|
12
|
+
a === "Polygon" && (r = [r]);
|
|
13
|
+
let l = !1;
|
|
14
|
+
for (var t = 0; t < r.length; ++t) {
|
|
15
|
+
const s = c(n, r[t]);
|
|
16
|
+
if (s === 0) return !u.ignoreBoundary;
|
|
17
|
+
s && (l = !0);
|
|
18
|
+
}
|
|
19
|
+
return l;
|
|
20
|
+
}
|
|
21
|
+
function m(o, e) {
|
|
22
|
+
return e[0] <= o[0] && e[1] <= o[1] && e[2] >= o[0] && e[3] >= o[1];
|
|
23
|
+
}
|
|
24
|
+
var P = y;
|
|
25
|
+
export {
|
|
26
|
+
y as booleanPointInPolygon,
|
|
27
|
+
P as default
|
|
28
|
+
};
|
package/dist/node_modules/.pnpm/@turf_invariant@7.3.1/node_modules/@turf/invariant/dist/esm/index.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
function e(r) {
|
|
2
|
+
if (!r)
|
|
3
|
+
throw new Error("coord is required");
|
|
4
|
+
if (!Array.isArray(r)) {
|
|
5
|
+
if (r.type === "Feature" && r.geometry !== null && r.geometry.type === "Point")
|
|
6
|
+
return [...r.geometry.coordinates];
|
|
7
|
+
if (r.type === "Point")
|
|
8
|
+
return [...r.coordinates];
|
|
9
|
+
}
|
|
10
|
+
if (Array.isArray(r) && r.length >= 2 && !Array.isArray(r[0]) && !Array.isArray(r[1]))
|
|
11
|
+
return [...r];
|
|
12
|
+
throw new Error("coord must be GeoJSON Point or an Array of numbers");
|
|
13
|
+
}
|
|
14
|
+
function t(r) {
|
|
15
|
+
return r.type === "Feature" ? r.geometry : r;
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
e as getCoord,
|
|
19
|
+
t as getGeom
|
|
20
|
+
};
|
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
var U = 6, F = "AJSAJS", G = "AFAFAF", N = 65, d = 73, k = 79, C = 86, R = 90;
|
|
2
|
+
const Q = {
|
|
3
|
+
forward: _,
|
|
4
|
+
inverse: V,
|
|
5
|
+
toPoint: Z
|
|
6
|
+
};
|
|
7
|
+
function _(e, r) {
|
|
8
|
+
return r = r || 5, B(m({
|
|
9
|
+
lat: e[1],
|
|
10
|
+
lon: e[0]
|
|
11
|
+
}), r);
|
|
12
|
+
}
|
|
13
|
+
function V(e) {
|
|
14
|
+
var r = E(D(e.toUpperCase()));
|
|
15
|
+
return r.lat && r.lon ? [r.lon, r.lat, r.lon, r.lat] : [r.left, r.bottom, r.right, r.top];
|
|
16
|
+
}
|
|
17
|
+
function Z(e) {
|
|
18
|
+
var r = E(D(e.toUpperCase()));
|
|
19
|
+
return r.lat && r.lon ? [r.lon, r.lat] : [(r.left + r.right) / 2, (r.top + r.bottom) / 2];
|
|
20
|
+
}
|
|
21
|
+
function P(e) {
|
|
22
|
+
return e * (Math.PI / 180);
|
|
23
|
+
}
|
|
24
|
+
function O(e) {
|
|
25
|
+
return 180 * (e / Math.PI);
|
|
26
|
+
}
|
|
27
|
+
function m(e) {
|
|
28
|
+
var r = e.lat, n = e.lon, v = 6378137, t = 669438e-8, f = 0.9996, i, a, c, s, l, o, u, M = P(r), h = P(n), L, b;
|
|
29
|
+
b = Math.floor((n + 180) / 6) + 1, n === 180 && (b = 60), r >= 56 && r < 64 && n >= 3 && n < 12 && (b = 32), r >= 72 && r < 84 && (n >= 0 && n < 9 ? b = 31 : n >= 9 && n < 21 ? b = 33 : n >= 21 && n < 33 ? b = 35 : n >= 33 && n < 42 && (b = 37)), i = (b - 1) * 6 - 180 + 3, L = P(i), a = t / (1 - t), c = v / Math.sqrt(1 - t * Math.sin(M) * Math.sin(M)), s = Math.tan(M) * Math.tan(M), l = a * Math.cos(M) * Math.cos(M), o = Math.cos(M) * (h - L), u = v * ((1 - t / 4 - 3 * t * t / 64 - 5 * t * t * t / 256) * M - (3 * t / 8 + 3 * t * t / 32 + 45 * t * t * t / 1024) * Math.sin(2 * M) + (15 * t * t / 256 + 45 * t * t * t / 1024) * Math.sin(4 * M) - 35 * t * t * t / 3072 * Math.sin(6 * M));
|
|
30
|
+
var w = f * c * (o + (1 - s + l) * o * o * o / 6 + (5 - 18 * s + s * s + 72 * l - 58 * a) * o * o * o * o * o / 120) + 5e5, g = f * (u + c * Math.tan(M) * (o * o / 2 + (5 - s + 9 * l + 4 * l * l) * o * o * o * o / 24 + (61 - 58 * s + s * s + 600 * l - 330 * a) * o * o * o * o * o * o / 720));
|
|
31
|
+
return r < 0 && (g += 1e7), {
|
|
32
|
+
northing: Math.round(g),
|
|
33
|
+
easting: Math.round(w),
|
|
34
|
+
zoneNumber: b,
|
|
35
|
+
zoneLetter: x(r)
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function E(e) {
|
|
39
|
+
var r = e.northing, n = e.easting, v = e.zoneLetter, t = e.zoneNumber;
|
|
40
|
+
if (t < 0 || t > 60)
|
|
41
|
+
return null;
|
|
42
|
+
var f = 0.9996, i = 6378137, a = 669438e-8, c, s = (1 - Math.sqrt(1 - a)) / (1 + Math.sqrt(1 - a)), l, o, u, M, h, L, b, w, g, z = n - 5e5, I = r;
|
|
43
|
+
v < "N" && (I -= 1e7), b = (t - 1) * 6 - 180 + 3, c = a / (1 - a), L = I / f, w = L / (i * (1 - a / 4 - 3 * a * a / 64 - 5 * a * a * a / 256)), g = w + (3 * s / 2 - 27 * s * s * s / 32) * Math.sin(2 * w) + (21 * s * s / 16 - 55 * s * s * s * s / 32) * Math.sin(4 * w) + 151 * s * s * s / 96 * Math.sin(6 * w), l = i / Math.sqrt(1 - a * Math.sin(g) * Math.sin(g)), o = Math.tan(g) * Math.tan(g), u = c * Math.cos(g) * Math.cos(g), M = i * (1 - a) / Math.pow(1 - a * Math.sin(g) * Math.sin(g), 1.5), h = z / (l * f);
|
|
44
|
+
var A = g - l * Math.tan(g) / M * (h * h / 2 - (5 + 3 * o + 10 * u - 4 * u * u - 9 * c) * h * h * h * h / 24 + (61 + 90 * o + 298 * u + 45 * o * o - 252 * c - 3 * u * u) * h * h * h * h * h * h / 720);
|
|
45
|
+
A = O(A);
|
|
46
|
+
var T = (h - (1 + 2 * o + u) * h * h * h / 6 + (5 - 2 * u + 28 * o - 3 * u * u + 8 * c + 24 * o * o) * h * h * h * h * h / 120) / Math.cos(g);
|
|
47
|
+
T = b + O(T);
|
|
48
|
+
var p;
|
|
49
|
+
if (e.accuracy) {
|
|
50
|
+
var S = E({
|
|
51
|
+
northing: e.northing + e.accuracy,
|
|
52
|
+
easting: e.easting + e.accuracy,
|
|
53
|
+
zoneLetter: e.zoneLetter,
|
|
54
|
+
zoneNumber: e.zoneNumber
|
|
55
|
+
});
|
|
56
|
+
p = {
|
|
57
|
+
top: S.lat,
|
|
58
|
+
right: S.lon,
|
|
59
|
+
bottom: A,
|
|
60
|
+
left: T
|
|
61
|
+
};
|
|
62
|
+
} else
|
|
63
|
+
p = {
|
|
64
|
+
lat: A,
|
|
65
|
+
lon: T
|
|
66
|
+
};
|
|
67
|
+
return p;
|
|
68
|
+
}
|
|
69
|
+
function x(e) {
|
|
70
|
+
var r = "Z";
|
|
71
|
+
return 84 >= e && e >= 72 ? r = "X" : 72 > e && e >= 64 ? r = "W" : 64 > e && e >= 56 ? r = "V" : 56 > e && e >= 48 ? r = "U" : 48 > e && e >= 40 ? r = "T" : 40 > e && e >= 32 ? r = "S" : 32 > e && e >= 24 ? r = "R" : 24 > e && e >= 16 ? r = "Q" : 16 > e && e >= 8 ? r = "P" : 8 > e && e >= 0 ? r = "N" : 0 > e && e >= -8 ? r = "M" : -8 > e && e >= -16 ? r = "L" : -16 > e && e >= -24 ? r = "K" : -24 > e && e >= -32 ? r = "J" : -32 > e && e >= -40 ? r = "H" : -40 > e && e >= -48 ? r = "G" : -48 > e && e >= -56 ? r = "F" : -56 > e && e >= -64 ? r = "E" : -64 > e && e >= -72 ? r = "D" : -72 > e && e >= -80 && (r = "C"), r;
|
|
72
|
+
}
|
|
73
|
+
function B(e, r) {
|
|
74
|
+
var n = "00000" + e.easting, v = "00000" + e.northing;
|
|
75
|
+
return e.zoneNumber + e.zoneLetter + J(e.easting, e.northing, e.zoneNumber) + n.substr(n.length - 5, r) + v.substr(v.length - 5, r);
|
|
76
|
+
}
|
|
77
|
+
function J(e, r, n) {
|
|
78
|
+
var v = q(n), t = Math.floor(e / 1e5), f = Math.floor(r / 1e5) % 20;
|
|
79
|
+
return K(t, f, v);
|
|
80
|
+
}
|
|
81
|
+
function q(e) {
|
|
82
|
+
var r = e % U;
|
|
83
|
+
return r === 0 && (r = U), r;
|
|
84
|
+
}
|
|
85
|
+
function K(e, r, n) {
|
|
86
|
+
var v = n - 1, t = F.charCodeAt(v), f = G.charCodeAt(v), i = t + e - 1, a = f + r, c = !1;
|
|
87
|
+
i > R && (i = i - R + N - 1, c = !0), (i === d || t < d && i > d || (i > d || t < d) && c) && i++, (i === k || t < k && i > k || (i > k || t < k) && c) && (i++, i === d && i++), i > R && (i = i - R + N - 1), a > C ? (a = a - C + N - 1, c = !0) : c = !1, (a === d || f < d && a > d || (a > d || f < d) && c) && a++, (a === k || f < k && a > k || (a > k || f < k) && c) && (a++, a === d && a++), a > C && (a = a - C + N - 1);
|
|
88
|
+
var s = String.fromCharCode(i) + String.fromCharCode(a);
|
|
89
|
+
return s;
|
|
90
|
+
}
|
|
91
|
+
function D(e) {
|
|
92
|
+
if (e && e.length === 0)
|
|
93
|
+
throw "MGRSPoint coverting from nothing";
|
|
94
|
+
for (var r = e.length, n = null, v = "", t, f = 0; !/[A-Z]/.test(t = e.charAt(f)); ) {
|
|
95
|
+
if (f >= 2)
|
|
96
|
+
throw "MGRSPoint bad conversion from: " + e;
|
|
97
|
+
v += t, f++;
|
|
98
|
+
}
|
|
99
|
+
var i = parseInt(v, 10);
|
|
100
|
+
if (f === 0 || f + 3 > r)
|
|
101
|
+
throw "MGRSPoint bad conversion from: " + e;
|
|
102
|
+
var a = e.charAt(f++);
|
|
103
|
+
if (a <= "A" || a === "B" || a === "Y" || a >= "Z" || a === "I" || a === "O")
|
|
104
|
+
throw "MGRSPoint zone letter " + a + " not handled: " + e;
|
|
105
|
+
n = e.substring(f, f += 2);
|
|
106
|
+
for (var c = q(i), s = y(n.charAt(0), c), l = W(n.charAt(1), c); l < H(a); )
|
|
107
|
+
l += 2e6;
|
|
108
|
+
var o = r - f;
|
|
109
|
+
if (o % 2 !== 0)
|
|
110
|
+
throw `MGRSPoint has to have an even number
|
|
111
|
+
of digits after the zone letter and two 100km letters - front
|
|
112
|
+
half for easting meters, second half for
|
|
113
|
+
northing meters` + e;
|
|
114
|
+
var u = o / 2, M = 0, h = 0, L, b, w, g, z;
|
|
115
|
+
return u > 0 && (L = 1e5 / Math.pow(10, u), b = e.substring(f, f + u), M = parseFloat(b) * L, w = e.substring(f + u), h = parseFloat(w) * L), g = M + s, z = h + l, {
|
|
116
|
+
easting: g,
|
|
117
|
+
northing: z,
|
|
118
|
+
zoneLetter: a,
|
|
119
|
+
zoneNumber: i,
|
|
120
|
+
accuracy: L
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
function y(e, r) {
|
|
124
|
+
for (var n = F.charCodeAt(r - 1), v = 1e5, t = !1; n !== e.charCodeAt(0); ) {
|
|
125
|
+
if (n++, n === d && n++, n === k && n++, n > R) {
|
|
126
|
+
if (t)
|
|
127
|
+
throw "Bad character: " + e;
|
|
128
|
+
n = N, t = !0;
|
|
129
|
+
}
|
|
130
|
+
v += 1e5;
|
|
131
|
+
}
|
|
132
|
+
return v;
|
|
133
|
+
}
|
|
134
|
+
function W(e, r) {
|
|
135
|
+
if (e > "V")
|
|
136
|
+
throw "MGRSPoint given invalid Northing " + e;
|
|
137
|
+
for (var n = G.charCodeAt(r - 1), v = 0, t = !1; n !== e.charCodeAt(0); ) {
|
|
138
|
+
if (n++, n === d && n++, n === k && n++, n > C) {
|
|
139
|
+
if (t)
|
|
140
|
+
throw "Bad character: " + e;
|
|
141
|
+
n = N, t = !0;
|
|
142
|
+
}
|
|
143
|
+
v += 1e5;
|
|
144
|
+
}
|
|
145
|
+
return v;
|
|
146
|
+
}
|
|
147
|
+
function H(e) {
|
|
148
|
+
var r;
|
|
149
|
+
switch (e) {
|
|
150
|
+
case "C":
|
|
151
|
+
r = 11e5;
|
|
152
|
+
break;
|
|
153
|
+
case "D":
|
|
154
|
+
r = 2e6;
|
|
155
|
+
break;
|
|
156
|
+
case "E":
|
|
157
|
+
r = 28e5;
|
|
158
|
+
break;
|
|
159
|
+
case "F":
|
|
160
|
+
r = 37e5;
|
|
161
|
+
break;
|
|
162
|
+
case "G":
|
|
163
|
+
r = 46e5;
|
|
164
|
+
break;
|
|
165
|
+
case "H":
|
|
166
|
+
r = 55e5;
|
|
167
|
+
break;
|
|
168
|
+
case "J":
|
|
169
|
+
r = 64e5;
|
|
170
|
+
break;
|
|
171
|
+
case "K":
|
|
172
|
+
r = 73e5;
|
|
173
|
+
break;
|
|
174
|
+
case "L":
|
|
175
|
+
r = 82e5;
|
|
176
|
+
break;
|
|
177
|
+
case "M":
|
|
178
|
+
r = 91e5;
|
|
179
|
+
break;
|
|
180
|
+
case "N":
|
|
181
|
+
r = 0;
|
|
182
|
+
break;
|
|
183
|
+
case "P":
|
|
184
|
+
r = 8e5;
|
|
185
|
+
break;
|
|
186
|
+
case "Q":
|
|
187
|
+
r = 17e5;
|
|
188
|
+
break;
|
|
189
|
+
case "R":
|
|
190
|
+
r = 26e5;
|
|
191
|
+
break;
|
|
192
|
+
case "S":
|
|
193
|
+
r = 35e5;
|
|
194
|
+
break;
|
|
195
|
+
case "T":
|
|
196
|
+
r = 44e5;
|
|
197
|
+
break;
|
|
198
|
+
case "U":
|
|
199
|
+
r = 53e5;
|
|
200
|
+
break;
|
|
201
|
+
case "V":
|
|
202
|
+
r = 62e5;
|
|
203
|
+
break;
|
|
204
|
+
case "W":
|
|
205
|
+
r = 7e6;
|
|
206
|
+
break;
|
|
207
|
+
case "X":
|
|
208
|
+
r = 79e5;
|
|
209
|
+
break;
|
|
210
|
+
default:
|
|
211
|
+
r = -1;
|
|
212
|
+
}
|
|
213
|
+
if (r >= 0)
|
|
214
|
+
return r;
|
|
215
|
+
throw "Invalid zone letter: " + e;
|
|
216
|
+
}
|
|
217
|
+
export {
|
|
218
|
+
Q as default,
|
|
219
|
+
_ as forward,
|
|
220
|
+
V as inverse,
|
|
221
|
+
Z as toPoint
|
|
222
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { orient2d as o } from "../../../../../robust-predicates@3.0.2/node_modules/robust-predicates/esm/orient2d.js";
|
|
2
|
+
function b(m, d) {
|
|
3
|
+
var n, i, h = 0, s, v, r, t, a, e, u, g = m[0], x = m[1], P = d.length;
|
|
4
|
+
for (n = 0; n < P; n++) {
|
|
5
|
+
i = 0;
|
|
6
|
+
var f = d[n], l = f.length - 1;
|
|
7
|
+
if (e = f[0], e[0] !== f[l][0] && e[1] !== f[l][1])
|
|
8
|
+
throw new Error("First and last coordinates in a ring must be the same");
|
|
9
|
+
for (v = e[0] - g, r = e[1] - x, i; i < l; i++) {
|
|
10
|
+
if (u = f[i + 1], t = u[0] - g, a = u[1] - x, r === 0 && a === 0) {
|
|
11
|
+
if (t <= 0 && v >= 0 || v <= 0 && t >= 0)
|
|
12
|
+
return 0;
|
|
13
|
+
} else if (a >= 0 && r <= 0 || a <= 0 && r >= 0) {
|
|
14
|
+
if (s = o(v, t, r, a, 0, 0), s === 0)
|
|
15
|
+
return 0;
|
|
16
|
+
(s > 0 && a > 0 && r <= 0 || s < 0 && a <= 0 && r > 0) && h++;
|
|
17
|
+
}
|
|
18
|
+
e = u, r = a, v = t;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return h % 2 !== 0;
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
b as default
|
|
25
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { toPoint as r, forward as n } from "../../../../mgrs@1.0.0/node_modules/mgrs/mgrs.js";
|
|
2
|
+
function i(t, e, s) {
|
|
3
|
+
if (!(this instanceof i))
|
|
4
|
+
return new i(t, e, s);
|
|
5
|
+
if (Array.isArray(t))
|
|
6
|
+
this.x = t[0], this.y = t[1], this.z = t[2] || 0;
|
|
7
|
+
else if (typeof t == "object")
|
|
8
|
+
this.x = t.x, this.y = t.y, this.z = t.z || 0;
|
|
9
|
+
else if (typeof t == "string" && typeof e > "u") {
|
|
10
|
+
var o = t.split(",");
|
|
11
|
+
this.x = parseFloat(o[0]), this.y = parseFloat(o[1]), this.z = parseFloat(o[2]) || 0;
|
|
12
|
+
} else
|
|
13
|
+
this.x = t, this.y = e, this.z = s || 0;
|
|
14
|
+
console.warn("proj4.Point will be removed in version 3, use proj4.toPoint");
|
|
15
|
+
}
|
|
16
|
+
i.fromMGRS = function(t) {
|
|
17
|
+
return new i(r(t));
|
|
18
|
+
};
|
|
19
|
+
i.prototype.toMGRS = function(t) {
|
|
20
|
+
return n([this.x, this.y], t);
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
i as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import d from "./parseCode.js";
|
|
2
|
+
import p from "./extend.js";
|
|
3
|
+
import f from "./projections.js";
|
|
4
|
+
import { sphere as l, eccentricity as j } from "./deriveConstants.js";
|
|
5
|
+
import c from "./constants/Datum.js";
|
|
6
|
+
import g from "./datum.js";
|
|
7
|
+
import v from "./match.js";
|
|
8
|
+
import { getNadgrids as w } from "./nadgrid.js";
|
|
9
|
+
function o(a, r) {
|
|
10
|
+
if (!(this instanceof o))
|
|
11
|
+
return new o(a);
|
|
12
|
+
this.forward = null, this.inverse = null, this.init = null, this.name, this.names = null, this.title, r = r || function(m) {
|
|
13
|
+
if (m)
|
|
14
|
+
throw m;
|
|
15
|
+
};
|
|
16
|
+
var t = d(a);
|
|
17
|
+
if (typeof t != "object") {
|
|
18
|
+
r("Could not parse to valid json: " + a);
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
var n = o.projections.get(t.projName);
|
|
22
|
+
if (!n) {
|
|
23
|
+
r("Could not get projection name from: " + a);
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (t.datumCode && t.datumCode !== "none") {
|
|
27
|
+
var e = v(c, t.datumCode);
|
|
28
|
+
e && (t.datum_params = t.datum_params || (e.towgs84 ? e.towgs84.split(",") : null), t.ellps = e.ellipse, t.datumName = e.datumName ? e.datumName : t.datumCode);
|
|
29
|
+
}
|
|
30
|
+
t.k0 = t.k0 || 1, t.axis = t.axis || "enu", t.ellps = t.ellps || "wgs84", t.lat1 = t.lat1 || t.lat0;
|
|
31
|
+
var i = l(t.a, t.b, t.rf, t.ellps, t.sphere), s = j(i.a, i.b, i.rf, t.R_A), h = w(t.nadgrids), u = t.datum || g(
|
|
32
|
+
t.datumCode,
|
|
33
|
+
t.datum_params,
|
|
34
|
+
i.a,
|
|
35
|
+
i.b,
|
|
36
|
+
s.es,
|
|
37
|
+
s.ep2,
|
|
38
|
+
h
|
|
39
|
+
);
|
|
40
|
+
p(this, t), p(this, n), this.a = i.a, this.b = i.b, this.rf = i.rf, this.sphere = i.sphere, this.es = s.es, this.e = s.e, this.ep2 = s.ep2, this.datum = u, "init" in this && typeof this.init == "function" && this.init(), r(null, this);
|
|
41
|
+
}
|
|
42
|
+
o.projections = f;
|
|
43
|
+
o.projections.start();
|
|
44
|
+
export {
|
|
45
|
+
o as default
|
|
46
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function l(n, r, f) {
|
|
2
|
+
var u = f.x, d = f.y, x = f.z || 0, a, e, i, s = {};
|
|
3
|
+
for (i = 0; i < 3; i++)
|
|
4
|
+
if (!(r && i === 2 && f.z === void 0))
|
|
5
|
+
switch (i === 0 ? (a = u, "ew".indexOf(n.axis[i]) !== -1 ? e = "x" : e = "y") : i === 1 ? (a = d, "ns".indexOf(n.axis[i]) !== -1 ? e = "y" : e = "x") : (a = x, e = "z"), n.axis[i]) {
|
|
6
|
+
case "e":
|
|
7
|
+
s[e] = a;
|
|
8
|
+
break;
|
|
9
|
+
case "w":
|
|
10
|
+
s[e] = -a;
|
|
11
|
+
break;
|
|
12
|
+
case "n":
|
|
13
|
+
s[e] = a;
|
|
14
|
+
break;
|
|
15
|
+
case "s":
|
|
16
|
+
s[e] = -a;
|
|
17
|
+
break;
|
|
18
|
+
case "u":
|
|
19
|
+
f[e] !== void 0 && (s.z = a);
|
|
20
|
+
break;
|
|
21
|
+
case "d":
|
|
22
|
+
f[e] !== void 0 && (s.z = -a);
|
|
23
|
+
break;
|
|
24
|
+
default:
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
return s;
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
l as default
|
|
31
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
function r(e) {
|
|
2
|
+
i(e.x), i(e.y);
|
|
3
|
+
}
|
|
4
|
+
function i(e) {
|
|
5
|
+
if (typeof Number.isFinite == "function") {
|
|
6
|
+
if (Number.isFinite(e))
|
|
7
|
+
return;
|
|
8
|
+
throw new TypeError("coordinates must be finite numbers");
|
|
9
|
+
}
|
|
10
|
+
if (typeof e != "number" || e !== e || !isFinite(e))
|
|
11
|
+
throw new TypeError("coordinates must be finite numbers");
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
r as default
|
|
15
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import u from "./sinh.js";
|
|
2
|
+
import x from "./cosh.js";
|
|
3
|
+
function j(s, t, c) {
|
|
4
|
+
for (var _ = Math.sin(t), e = Math.cos(t), l = u(c), m = x(c), r = 2 * e * m, a = -2 * _ * l, n = s.length - 1, h = s[n], i = 0, v = 0, o = 0, f, g; --n >= 0; )
|
|
5
|
+
f = v, g = i, v = h, i = o, h = -f + r * v - a * i + s[n], o = -g + a * v + r * i;
|
|
6
|
+
return r = _ * m, a = e * l, [r * h - a * o, r * o + a * h];
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
j as default
|
|
10
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function o(r, t, n, s, i) {
|
|
2
|
+
var a, h;
|
|
3
|
+
a = r / t;
|
|
4
|
+
for (var M = 0; M < 15; M++)
|
|
5
|
+
if (h = (r - (t * a - n * Math.sin(2 * a) + s * Math.sin(4 * a) - i * Math.sin(6 * a))) / (t - 2 * n * Math.cos(2 * a) + 4 * s * Math.cos(4 * a) - 6 * i * Math.cos(6 * a)), a += h, Math.abs(h) <= 1e-10)
|
|
6
|
+
return a;
|
|
7
|
+
return NaN;
|
|
8
|
+
}
|
|
9
|
+
export {
|
|
10
|
+
o as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { HALF_PI as f } from "../constants/values.js";
|
|
2
|
+
function u(a, h) {
|
|
3
|
+
var p = 1 - (1 - a * a) / (2 * a) * Math.log((1 - a) / (1 + a));
|
|
4
|
+
if (Math.abs(Math.abs(h) - p) < 1e-6)
|
|
5
|
+
return h < 0 ? -1 * f : f;
|
|
6
|
+
for (var i = Math.asin(0.5 * h), o, s, t, r, M = 0; M < 30; M++)
|
|
7
|
+
if (s = Math.sin(i), t = Math.cos(i), r = a * s, o = Math.pow(1 - r * r, 2) / (2 * t) * (h / (1 - a * a) - s / (1 - r * r) + 0.5 / a * Math.log((1 - r) / (1 + r))), i += o, Math.abs(o) <= 1e-10)
|
|
8
|
+
return i;
|
|
9
|
+
return NaN;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
u as default
|
|
13
|
+
};
|