kaabalah 6.6.4 → 6.8.0
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/astrology/index.js +54 -54
- package/dist/astrology/index.js.map +1 -1
- package/dist/astrology/index.mjs +3 -3
- package/dist/astrology/index.mjs.map +1 -1
- package/dist/chunk-2WCC2KCJ.js +1 -1
- package/dist/chunk-2WCC2KCJ.js.map +1 -1
- package/dist/{chunk-XTE5DSDO.js → chunk-36XZ5WR2.js} +23 -23
- package/dist/chunk-36XZ5WR2.js.map +1 -0
- package/dist/{chunk-6P2CJUTH.mjs → chunk-3UJPBUY4.mjs} +8 -6
- package/dist/chunk-3UJPBUY4.mjs.map +1 -0
- package/dist/{chunk-FM7WUVZV.js → chunk-4337NVKS.js} +8 -4
- package/dist/chunk-4337NVKS.js.map +1 -0
- package/dist/{chunk-3TBUVMHV.mjs → chunk-5HXSHALQ.mjs} +1210 -272
- package/dist/chunk-5HXSHALQ.mjs.map +1 -0
- package/dist/{chunk-EFZUZI22.mjs → chunk-5K4OQ4UB.mjs} +5 -4
- package/dist/chunk-5K4OQ4UB.mjs.map +1 -0
- package/dist/{chunk-ZKIJAZ6B.mjs → chunk-6N5YC2WD.mjs} +338 -10
- package/dist/chunk-6N5YC2WD.mjs.map +1 -0
- package/dist/{chunk-PWYOHULD.mjs → chunk-7YU7TRCG.mjs} +80 -42
- package/dist/chunk-7YU7TRCG.mjs.map +1 -0
- package/dist/{chunk-6O7MTBZN.js → chunk-BEFGGHIJ.js} +84 -46
- package/dist/chunk-BEFGGHIJ.js.map +1 -0
- package/dist/{chunk-MTI2SOQ6.mjs → chunk-ITESL6GR.mjs} +4 -4
- package/dist/chunk-ITESL6GR.mjs.map +1 -0
- package/dist/{chunk-UG6HZK3Z.js → chunk-K33NFXSD.js} +109 -109
- package/dist/chunk-K33NFXSD.js.map +1 -0
- package/dist/{chunk-OKZUVGA3.js → chunk-LQX6PW35.js} +349 -15
- package/dist/chunk-LQX6PW35.js.map +1 -0
- package/dist/{chunk-WY6NIR2V.mjs → chunk-NPQZ2DOY.mjs} +8 -4
- package/dist/chunk-NPQZ2DOY.mjs.map +1 -0
- package/dist/{chunk-WIKUOEOB.mjs → chunk-QS5XAAAG.mjs} +31 -19
- package/dist/chunk-QS5XAAAG.mjs.map +1 -0
- package/dist/{chunk-UN7QMOMX.mjs → chunk-SHKAAZHT.mjs} +8 -8
- package/dist/chunk-SHKAAZHT.mjs.map +1 -0
- package/dist/{chunk-COPYH3O2.js → chunk-SYLFUBAB.js} +51 -39
- package/dist/chunk-SYLFUBAB.js.map +1 -0
- package/dist/chunk-URDMOQRN.mjs +1 -1
- package/dist/chunk-URDMOQRN.mjs.map +1 -1
- package/dist/{chunk-PAKYKIZH.js → chunk-UZ42PN5T.js} +10 -8
- package/dist/chunk-UZ42PN5T.js.map +1 -0
- package/dist/{chunk-S6KNERP7.js → chunk-VJ6RW5H4.js} +8 -7
- package/dist/chunk-VJ6RW5H4.js.map +1 -0
- package/dist/{chunk-NRAAMI6I.js → chunk-WLML6SVX.js} +1228 -275
- package/dist/chunk-WLML6SVX.js.map +1 -0
- package/dist/cli.js +2367 -657
- package/dist/cli.js.map +1 -1
- package/dist/core/index.d.mts +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +69 -45
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +4 -4
- package/dist/core/index.mjs.map +1 -1
- package/dist/gematria/index.js +7 -7
- package/dist/gematria/index.js.map +1 -1
- package/dist/gematria/index.mjs +4 -4
- package/dist/gematria/index.mjs.map +1 -1
- package/dist/ifa/index.js +2 -2
- package/dist/ifa/index.js.map +1 -1
- package/dist/ifa/index.mjs +2 -2
- package/dist/ifa/index.mjs.map +1 -1
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +314 -230
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/dist/numerology/index.js +20 -20
- package/dist/numerology/index.js.map +1 -1
- package/dist/numerology/index.mjs +5 -5
- package/dist/numerology/index.mjs.map +1 -1
- package/dist/semantic/index.js +28 -28
- package/dist/semantic/index.js.map +1 -1
- package/dist/semantic/index.mjs +9 -9
- package/dist/semantic/index.mjs.map +1 -1
- package/dist/{wasm/build/swisseph.node-6H4ISR7M.mjs → swisseph.node-2PWBQLWG.mjs} +270 -156
- package/dist/swisseph.node-2PWBQLWG.mjs.map +1 -0
- package/dist/{wasm/build/swisseph.node-UD2JYYLE.js → swisseph.node-NWM75JF3.js} +283 -169
- package/dist/swisseph.node-NWM75JF3.js.map +1 -0
- package/dist/{wasm/build/swisseph.web-TSFJI7DQ.mjs → swisseph.web-CK57WSU3.mjs} +264 -153
- package/dist/swisseph.web-CK57WSU3.mjs.map +1 -0
- package/dist/{wasm/build/swisseph.web-MXYBWOOS.js → swisseph.web-GPTWPXKT.js} +277 -166
- package/dist/swisseph.web-GPTWPXKT.js.map +1 -0
- package/dist/tarot/index.js +25 -25
- package/dist/tarot/index.js.map +1 -1
- package/dist/tarot/index.mjs +5 -5
- package/dist/tarot/index.mjs.map +1 -1
- package/dist/topology-Bbgniegh.d.ts +102 -0
- package/dist/topology-CSSfYL2c.d.mts +102 -0
- package/dist/visual/index.d.mts +177 -2
- package/dist/visual/index.d.ts +177 -2
- package/dist/visual/index.js +91 -31
- package/dist/visual/index.js.map +1 -1
- package/dist/visual/index.mjs +5 -5
- package/dist/visual/index.mjs.map +1 -1
- package/dist/{swisseph.node-6H4ISR7M.mjs → wasm/build/swisseph.node-2PWBQLWG.mjs} +270 -156
- package/dist/wasm/build/swisseph.node-2PWBQLWG.mjs.map +1 -0
- package/dist/{swisseph.node-UD2JYYLE.js → wasm/build/swisseph.node-NWM75JF3.js} +283 -169
- package/dist/wasm/build/swisseph.node-NWM75JF3.js.map +1 -0
- package/dist/{swisseph.web-TSFJI7DQ.mjs → wasm/build/swisseph.web-CK57WSU3.mjs} +264 -153
- package/dist/wasm/build/swisseph.web-CK57WSU3.mjs.map +1 -0
- package/dist/{swisseph.web-MXYBWOOS.js → wasm/build/swisseph.web-GPTWPXKT.js} +277 -166
- package/dist/wasm/build/swisseph.web-GPTWPXKT.js.map +1 -0
- package/package.json +9 -8
- package/dist/chunk-3TBUVMHV.mjs.map +0 -1
- package/dist/chunk-6O7MTBZN.js.map +0 -1
- package/dist/chunk-6P2CJUTH.mjs.map +0 -1
- package/dist/chunk-COPYH3O2.js.map +0 -1
- package/dist/chunk-EFZUZI22.mjs.map +0 -1
- package/dist/chunk-FM7WUVZV.js.map +0 -1
- package/dist/chunk-MTI2SOQ6.mjs.map +0 -1
- package/dist/chunk-NRAAMI6I.js.map +0 -1
- package/dist/chunk-OKZUVGA3.js.map +0 -1
- package/dist/chunk-PAKYKIZH.js.map +0 -1
- package/dist/chunk-PWYOHULD.mjs.map +0 -1
- package/dist/chunk-S6KNERP7.js.map +0 -1
- package/dist/chunk-UG6HZK3Z.js.map +0 -1
- package/dist/chunk-UN7QMOMX.mjs.map +0 -1
- package/dist/chunk-WIKUOEOB.mjs.map +0 -1
- package/dist/chunk-WY6NIR2V.mjs.map +0 -1
- package/dist/chunk-XTE5DSDO.js.map +0 -1
- package/dist/chunk-ZKIJAZ6B.mjs.map +0 -1
- package/dist/swisseph.node-6H4ISR7M.mjs.map +0 -1
- package/dist/swisseph.node-UD2JYYLE.js.map +0 -1
- package/dist/swisseph.web-MXYBWOOS.js.map +0 -1
- package/dist/swisseph.web-TSFJI7DQ.mjs.map +0 -1
- package/dist/wasm/build/swisseph.node-6H4ISR7M.mjs.map +0 -1
- package/dist/wasm/build/swisseph.node-UD2JYYLE.js.map +0 -1
- package/dist/wasm/build/swisseph.web-MXYBWOOS.js.map +0 -1
- package/dist/wasm/build/swisseph.web-TSFJI7DQ.mjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk4337NVKS_js = require('./chunk-4337NVKS.js');
|
|
4
4
|
|
|
5
5
|
// wasm/build/swisseph.node.wasm?url
|
|
6
6
|
var swisseph_node_default = "./swisseph.node-2K5IHMKE.wasm?url";
|
|
@@ -260,7 +260,8 @@ var SwissEph = class {
|
|
|
260
260
|
const BYTES_PER_F64 = 8;
|
|
261
261
|
const totalBytes = (HOUSES_DOUBLES + ASCMC_DOUBLES) * BYTES_PER_F64;
|
|
262
262
|
const memoryPtr = this.module._malloc(totalBytes);
|
|
263
|
-
if (!memoryPtr)
|
|
263
|
+
if (!memoryPtr)
|
|
264
|
+
throw new Error("Memory allocation failed");
|
|
264
265
|
const housesPtr = memoryPtr;
|
|
265
266
|
const ascmcPtr = memoryPtr + HOUSES_DOUBLES * BYTES_PER_F64;
|
|
266
267
|
try {
|
|
@@ -384,9 +385,12 @@ var SwissEph = class {
|
|
|
384
385
|
const xinPtr = this.module._malloc(3 * BYTES);
|
|
385
386
|
const xazPtr = this.module._malloc(3 * BYTES);
|
|
386
387
|
if (!geoPtr || !xinPtr || !xazPtr) {
|
|
387
|
-
if (geoPtr)
|
|
388
|
-
|
|
389
|
-
if (
|
|
388
|
+
if (geoPtr)
|
|
389
|
+
this.module._free(geoPtr);
|
|
390
|
+
if (xinPtr)
|
|
391
|
+
this.module._free(xinPtr);
|
|
392
|
+
if (xazPtr)
|
|
393
|
+
this.module._free(xazPtr);
|
|
390
394
|
throw new Error("Memory allocation failed for azalt");
|
|
391
395
|
}
|
|
392
396
|
try {
|
|
@@ -433,9 +437,12 @@ var SwissEph = class {
|
|
|
433
437
|
const ERR_BYTES = 512;
|
|
434
438
|
const errPtr = this.module._malloc(ERR_BYTES);
|
|
435
439
|
if (!geoPtr || !tretPtr || !errPtr) {
|
|
436
|
-
if (geoPtr)
|
|
437
|
-
|
|
438
|
-
if (
|
|
440
|
+
if (geoPtr)
|
|
441
|
+
this.module._free(geoPtr);
|
|
442
|
+
if (tretPtr)
|
|
443
|
+
this.module._free(tretPtr);
|
|
444
|
+
if (errPtr)
|
|
445
|
+
this.module._free(errPtr);
|
|
439
446
|
throw new Error("Memory allocation failed for riseTransit");
|
|
440
447
|
}
|
|
441
448
|
this.module.HEAP8.fill(0, errPtr, errPtr + ERR_BYTES);
|
|
@@ -522,7 +529,7 @@ function getBundledNodeSwissEphAssets(options) {
|
|
|
522
529
|
ephePaths: [options.bundledNodeEphePath]
|
|
523
530
|
};
|
|
524
531
|
}
|
|
525
|
-
const resolvePath = options.nodePathResolve ?? ((...paths) =>
|
|
532
|
+
const resolvePath = options.nodePathResolve ?? ((...paths) => chunk4337NVKS_js.__require("path").resolve(...paths));
|
|
526
533
|
return {
|
|
527
534
|
wasmPaths: [
|
|
528
535
|
options.bundledNodeWasmPath,
|
|
@@ -614,7 +621,7 @@ function resolveSwissEphRuntimeAssetsInternal(options = {}) {
|
|
|
614
621
|
};
|
|
615
622
|
}
|
|
616
623
|
const env = getRuntimeEnv(options.env);
|
|
617
|
-
const existsSync = options.existsSync ?? ((path) =>
|
|
624
|
+
const existsSync = options.existsSync ?? ((path) => chunk4337NVKS_js.__require("fs").existsSync(path));
|
|
618
625
|
const bundledAssets = getBundledNodeSwissEphAssets(options);
|
|
619
626
|
const envWasmPath = firstDefinedEnvValue(env, SWISS_EPH_RUNTIME_WASM_ENV_KEYS);
|
|
620
627
|
const envEphePath = firstDefinedEnvValue(env, SWISS_EPH_RUNTIME_EPHE_ENV_KEYS);
|
|
@@ -757,8 +764,8 @@ function resolveNodeEphemerisPath(module, finalEphePath, options = {}) {
|
|
|
757
764
|
const requiredFiles = options.requiredFiles ?? REQUIRED_EPHE_FILES;
|
|
758
765
|
const mountPoint = options.mountPoint ?? NODE_EPHE_MOUNT_POINT;
|
|
759
766
|
const memfsPath = options.memfsPath ?? NODE_EPHE_MEMFS_PATH;
|
|
760
|
-
const nodeFs = options.nodeFs ??
|
|
761
|
-
const pathModule = options.pathModule ??
|
|
767
|
+
const nodeFs = options.nodeFs ?? chunk4337NVKS_js.__require("fs");
|
|
768
|
+
const pathModule = options.pathModule ?? chunk4337NVKS_js.__require("path");
|
|
762
769
|
let mountAttempted = false;
|
|
763
770
|
let mountCheck = null;
|
|
764
771
|
let mountError = null;
|
|
@@ -822,7 +829,7 @@ async function getSwissEph(options = {}) {
|
|
|
822
829
|
ephePath: options.ephePath
|
|
823
830
|
});
|
|
824
831
|
const finalWasmPath = runtimeAssets.wasmPath;
|
|
825
|
-
const moduleFactory = isBrowser ? (await import('./swisseph.web-
|
|
832
|
+
const moduleFactory = isBrowser ? (await import('./swisseph.web-GPTWPXKT.js')).default : (await import('./swisseph.node-NWM75JF3.js')).default;
|
|
826
833
|
const module = await moduleFactory({
|
|
827
834
|
locateFile: () => finalWasmPath
|
|
828
835
|
});
|
|
@@ -1094,7 +1101,8 @@ function computeHorizonLongitude(gmst, ra, dec, latitude, angle) {
|
|
|
1094
1101
|
const tanPhi = Math.tan(latitude * DEG);
|
|
1095
1102
|
const tanDelta = Math.tan(dec * DEG);
|
|
1096
1103
|
const cosH = -(tanPhi * tanDelta);
|
|
1097
|
-
if (Math.abs(cosH) > 1)
|
|
1104
|
+
if (Math.abs(cosH) > 1)
|
|
1105
|
+
return null;
|
|
1098
1106
|
const H = Math.acos(cosH) / DEG;
|
|
1099
1107
|
const lon = angle === "AC" ? normalizeAngle(gmst - ra - H) : normalizeAngle(gmst - ra + H);
|
|
1100
1108
|
return toGeoLon(lon);
|
|
@@ -1126,9 +1134,12 @@ function findParansAtLatitude(equatorialPositions, gmst, latitude, paranOrb = 1)
|
|
|
1126
1134
|
for (const [name, eq] of Object.entries(equatorialPositions)) {
|
|
1127
1135
|
for (const angle of ANGLES) {
|
|
1128
1136
|
let lon;
|
|
1129
|
-
if (angle === "MC")
|
|
1130
|
-
|
|
1131
|
-
else
|
|
1137
|
+
if (angle === "MC")
|
|
1138
|
+
lon = computeMCLongitude(gmst, eq.ra);
|
|
1139
|
+
else if (angle === "IC")
|
|
1140
|
+
lon = computeICLongitude(gmst, eq.ra);
|
|
1141
|
+
else
|
|
1142
|
+
lon = computeHorizonLongitude(gmst, eq.ra, eq.dec, latitude, angle);
|
|
1132
1143
|
if (lon !== null) {
|
|
1133
1144
|
lines.push({ planet: name, angle, longitude: lon });
|
|
1134
1145
|
}
|
|
@@ -1139,8 +1150,10 @@ function findParansAtLatitude(equatorialPositions, gmst, latitude, paranOrb = 1)
|
|
|
1139
1150
|
for (let j = i + 1; j < lines.length; j++) {
|
|
1140
1151
|
const a = lines[i];
|
|
1141
1152
|
const b = lines[j];
|
|
1142
|
-
if (a.planet === b.planet)
|
|
1143
|
-
|
|
1153
|
+
if (a.planet === b.planet)
|
|
1154
|
+
continue;
|
|
1155
|
+
if (a.angle === b.angle)
|
|
1156
|
+
continue;
|
|
1144
1157
|
const dist = geographicAngularDifference(a.longitude, b.longitude);
|
|
1145
1158
|
if (dist <= paranOrb) {
|
|
1146
1159
|
parans.push({
|
|
@@ -1173,8 +1186,10 @@ function queryAstrocartographyLocation(date, options) {
|
|
|
1173
1186
|
for (const [name, eq] of Object.entries(positions)) {
|
|
1174
1187
|
for (const angle of ANGLES) {
|
|
1175
1188
|
let lineLon;
|
|
1176
|
-
if (angle === "MC")
|
|
1177
|
-
|
|
1189
|
+
if (angle === "MC")
|
|
1190
|
+
lineLon = computeMCLongitude(gmst, eq.ra);
|
|
1191
|
+
else if (angle === "IC")
|
|
1192
|
+
lineLon = computeICLongitude(gmst, eq.ra);
|
|
1178
1193
|
else
|
|
1179
1194
|
lineLon = computeHorizonLongitude(
|
|
1180
1195
|
gmst,
|
|
@@ -1183,7 +1198,8 @@ function queryAstrocartographyLocation(date, options) {
|
|
|
1183
1198
|
latitude,
|
|
1184
1199
|
angle
|
|
1185
1200
|
);
|
|
1186
|
-
if (lineLon === null)
|
|
1201
|
+
if (lineLon === null)
|
|
1202
|
+
continue;
|
|
1187
1203
|
const dist = geographicAngularDifference(longitude, lineLon);
|
|
1188
1204
|
lines.push({
|
|
1189
1205
|
planet: name,
|
|
@@ -1316,14 +1332,17 @@ function computeSynastryAspects(planetsA, planetsB, specs = DEFAULT_ASPECT_SPECS
|
|
|
1316
1332
|
}
|
|
1317
1333
|
function shorterArcMidpoint(a, b) {
|
|
1318
1334
|
let diff = b - a;
|
|
1319
|
-
if (diff > 180)
|
|
1320
|
-
|
|
1335
|
+
if (diff > 180)
|
|
1336
|
+
diff -= 360;
|
|
1337
|
+
if (diff < -180)
|
|
1338
|
+
diff += 360;
|
|
1321
1339
|
return normalizeAngle(a + diff / 2);
|
|
1322
1340
|
}
|
|
1323
1341
|
function computeMidpoints(planetsA, planetsB) {
|
|
1324
1342
|
const result = {};
|
|
1325
1343
|
for (const key of Object.keys(planetsA)) {
|
|
1326
|
-
if (!(key in planetsB))
|
|
1344
|
+
if (!(key in planetsB))
|
|
1345
|
+
continue;
|
|
1327
1346
|
result[key] = shorterArcMidpoint(planetsA[key].longitude, planetsB[key].longitude);
|
|
1328
1347
|
}
|
|
1329
1348
|
return result;
|
|
@@ -1349,7 +1368,8 @@ function computeTransitAspects(transitPlanets, natalPlanets, specs = DEFAULT_ASP
|
|
|
1349
1368
|
for (const kN of keysN) {
|
|
1350
1369
|
const n = natalPlanets[kN];
|
|
1351
1370
|
const match = getAspectMatch(t.longitude, n.longitude, specs);
|
|
1352
|
-
if (!match)
|
|
1371
|
+
if (!match)
|
|
1372
|
+
continue;
|
|
1353
1373
|
const tSpeed = t.longitudeSpeed ?? 0;
|
|
1354
1374
|
const nSpeed = n.longitudeSpeed ?? 0;
|
|
1355
1375
|
const dt = 0.01;
|
|
@@ -1812,9 +1832,11 @@ function findHouseOf(longitude, housePositions) {
|
|
|
1812
1832
|
for (let k = 0; k < H.length; k++) {
|
|
1813
1833
|
const cur = H[k], nxt = H[(k + 1) % H.length];
|
|
1814
1834
|
if (nxt.L < cur.L) {
|
|
1815
|
-
if (L >= cur.L || L < nxt.L)
|
|
1835
|
+
if (L >= cur.L || L < nxt.L)
|
|
1836
|
+
return cur.i;
|
|
1816
1837
|
} else {
|
|
1817
|
-
if (L >= cur.L && L < nxt.L)
|
|
1838
|
+
if (L >= cur.L && L < nxt.L)
|
|
1839
|
+
return cur.i;
|
|
1818
1840
|
}
|
|
1819
1841
|
}
|
|
1820
1842
|
return 1;
|
|
@@ -1882,11 +1904,13 @@ function getNatalAspectPoints(planets, ascLon, mcLon) {
|
|
|
1882
1904
|
return points;
|
|
1883
1905
|
}
|
|
1884
1906
|
function filterByNames(points, names) {
|
|
1885
|
-
if (!names || names.length === 0)
|
|
1907
|
+
if (!names || names.length === 0)
|
|
1908
|
+
return points;
|
|
1886
1909
|
const allowed = new Set(names.map((n) => n.toLowerCase()));
|
|
1887
1910
|
const result = {};
|
|
1888
1911
|
for (const [key, val] of Object.entries(points)) {
|
|
1889
|
-
if (allowed.has(key))
|
|
1912
|
+
if (allowed.has(key))
|
|
1913
|
+
result[key] = val;
|
|
1890
1914
|
}
|
|
1891
1915
|
return result;
|
|
1892
1916
|
}
|
|
@@ -1949,7 +1973,8 @@ async function getTransitRange(options) {
|
|
|
1949
1973
|
);
|
|
1950
1974
|
const natalKeys = Object.keys(nPoints);
|
|
1951
1975
|
const rawStep = options.stepDays ?? 1;
|
|
1952
|
-
if (rawStep <= 0)
|
|
1976
|
+
if (rawStep <= 0)
|
|
1977
|
+
throw new Error("stepDays must be greater than 0");
|
|
1953
1978
|
const fromMs = options.from.getTime();
|
|
1954
1979
|
const toMs = options.to.getTime();
|
|
1955
1980
|
const specs = options.aspectSpecs;
|
|
@@ -1970,7 +1995,8 @@ async function getTransitRange(options) {
|
|
|
1970
1995
|
const date = new Date(ms);
|
|
1971
1996
|
const utcDate = await toUtcDate(date, transitLat, transitLon, transitTz ?? { autoTimeZone: true });
|
|
1972
1997
|
const positions = await calculatePlanetaryPositions(utcDate);
|
|
1973
|
-
if (!positions)
|
|
1998
|
+
if (!positions)
|
|
1999
|
+
continue;
|
|
1974
2000
|
const points = {};
|
|
1975
2001
|
for (const [planetId, pos] of Object.entries(positions)) {
|
|
1976
2002
|
const id = planetId;
|
|
@@ -1989,7 +2015,8 @@ async function getTransitRange(options) {
|
|
|
1989
2015
|
for (const step of steps) {
|
|
1990
2016
|
const tPos = step.positions[tKey];
|
|
1991
2017
|
const nPos = nPoints[nKey];
|
|
1992
|
-
if (!tPos || !nPos)
|
|
2018
|
+
if (!tPos || !nPos)
|
|
2019
|
+
continue;
|
|
1993
2020
|
const match = specs ? findClosestAspectOrb(tPos.longitude, nPos.longitude, specs) : findClosestAspectOrb(tPos.longitude, nPos.longitude);
|
|
1994
2021
|
if (!match) {
|
|
1995
2022
|
prevOrb = null;
|
|
@@ -2011,7 +2038,8 @@ async function getTransitRange(options) {
|
|
|
2011
2038
|
transitLon,
|
|
2012
2039
|
transitTz
|
|
2013
2040
|
);
|
|
2014
|
-
if (exactResult)
|
|
2041
|
+
if (exactResult)
|
|
2042
|
+
perfections.push(exactResult);
|
|
2015
2043
|
}
|
|
2016
2044
|
prevDecreasing = wasDecreasing;
|
|
2017
2045
|
} else {
|
|
@@ -2066,7 +2094,8 @@ function computeOrbForAspect(transitLon, natalLon, aspectAngle) {
|
|
|
2066
2094
|
var NAME_TO_PLANET = {};
|
|
2067
2095
|
for (const [id, name] of Object.entries(PLANET_AND_NODE_NAMES)) {
|
|
2068
2096
|
const numId = Number(id);
|
|
2069
|
-
if (!isNaN(numId))
|
|
2097
|
+
if (!isNaN(numId))
|
|
2098
|
+
NAME_TO_PLANET[name.toLowerCase()] = numId;
|
|
2070
2099
|
}
|
|
2071
2100
|
async function getTransitLongitudeAt(ms, transitKey, transitLat, transitLon, transitTz) {
|
|
2072
2101
|
const date = new Date(ms);
|
|
@@ -2080,7 +2109,8 @@ async function getTransitLongitudeAt(ms, transitKey, transitLat, transitLon, tra
|
|
|
2080
2109
|
}
|
|
2081
2110
|
}
|
|
2082
2111
|
const positions = await calculatePlanetaryPositions(utc);
|
|
2083
|
-
if (!positions)
|
|
2112
|
+
if (!positions)
|
|
2113
|
+
return null;
|
|
2084
2114
|
return findPlanetByName(positions, transitKey) ?? null;
|
|
2085
2115
|
}
|
|
2086
2116
|
async function binarySearchPerfection(transitKey, natalKey, spec, startMs, endMs, natalPoint, transitLat, transitLon, transitTz) {
|
|
@@ -2089,12 +2119,14 @@ async function binarySearchPerfection(transitKey, natalKey, spec, startMs, endMs
|
|
|
2089
2119
|
let lo = startMs;
|
|
2090
2120
|
let hi = endMs;
|
|
2091
2121
|
for (let i = 0; i < maxIterations; i++) {
|
|
2092
|
-
if (hi - lo < 6e4)
|
|
2122
|
+
if (hi - lo < 6e4)
|
|
2123
|
+
break;
|
|
2093
2124
|
const m1 = lo + Math.floor((hi - lo) / 3);
|
|
2094
2125
|
const m2 = hi - Math.floor((hi - lo) / 3);
|
|
2095
2126
|
const pos1 = await getTransitLongitudeAt(m1, transitKey, transitLat, transitLon, tz);
|
|
2096
2127
|
const pos2 = await getTransitLongitudeAt(m2, transitKey, transitLat, transitLon, tz);
|
|
2097
|
-
if (!pos1 || !pos2)
|
|
2128
|
+
if (!pos1 || !pos2)
|
|
2129
|
+
break;
|
|
2098
2130
|
const orb1 = computeOrbForAspect(pos1.longitude, natalPoint.longitude, spec.angle);
|
|
2099
2131
|
const orb2 = computeOrbForAspect(pos2.longitude, natalPoint.longitude, spec.angle);
|
|
2100
2132
|
if (orb1 < orb2) {
|
|
@@ -2105,9 +2137,11 @@ async function binarySearchPerfection(transitKey, natalKey, spec, startMs, endMs
|
|
|
2105
2137
|
}
|
|
2106
2138
|
const finalMs = Math.floor((lo + hi) / 2);
|
|
2107
2139
|
const finalPos = await getTransitLongitudeAt(finalMs, transitKey, transitLat, transitLon, tz);
|
|
2108
|
-
if (!finalPos)
|
|
2140
|
+
if (!finalPos)
|
|
2141
|
+
return null;
|
|
2109
2142
|
const finalOrb = computeOrbForAspect(finalPos.longitude, natalPoint.longitude, spec.angle);
|
|
2110
|
-
if (finalOrb > spec.orb)
|
|
2143
|
+
if (finalOrb > spec.orb)
|
|
2144
|
+
return null;
|
|
2111
2145
|
return {
|
|
2112
2146
|
transitPlanet: transitKey,
|
|
2113
2147
|
natalPlanet: natalKey,
|
|
@@ -2121,19 +2155,22 @@ async function binarySearchPerfection(transitKey, natalKey, spec, startMs, endMs
|
|
|
2121
2155
|
function findPlanetByName(positions, name) {
|
|
2122
2156
|
for (const [planetId, pos] of Object.entries(positions)) {
|
|
2123
2157
|
const id = planetId;
|
|
2124
|
-
if (PLANET_AND_NODE_NAMES[id].toLowerCase() === name)
|
|
2158
|
+
if (PLANET_AND_NODE_NAMES[id].toLowerCase() === name)
|
|
2159
|
+
return pos;
|
|
2125
2160
|
}
|
|
2126
2161
|
return void 0;
|
|
2127
2162
|
}
|
|
2128
2163
|
async function getSunLongitudeAtMs(ms) {
|
|
2129
2164
|
const positions = await calculatePlanetaryPositions(new Date(ms));
|
|
2130
2165
|
const sun = findPlanetByName(positions, "sun");
|
|
2131
|
-
if (!sun)
|
|
2166
|
+
if (!sun)
|
|
2167
|
+
throw new Error("Failed to compute Sun position");
|
|
2132
2168
|
return sun.longitude;
|
|
2133
2169
|
}
|
|
2134
2170
|
function signedAngularDelta(current, target) {
|
|
2135
2171
|
let d = normalizeAngle(current - target);
|
|
2136
|
-
if (d > 180)
|
|
2172
|
+
if (d > 180)
|
|
2173
|
+
d -= 360;
|
|
2137
2174
|
return d;
|
|
2138
2175
|
}
|
|
2139
2176
|
async function getSolarReturnChart(options) {
|
|
@@ -2151,7 +2188,8 @@ async function getSolarReturnChart(options) {
|
|
|
2151
2188
|
let lo = approxReturn.getTime() - 2 * 864e5;
|
|
2152
2189
|
let hi = approxReturn.getTime() + 2 * 864e5;
|
|
2153
2190
|
for (let i = 0; i < 30; i++) {
|
|
2154
|
-
if (hi - lo < 6e4)
|
|
2191
|
+
if (hi - lo < 6e4)
|
|
2192
|
+
break;
|
|
2155
2193
|
const mid = Math.floor((lo + hi) / 2);
|
|
2156
2194
|
const sunLon = await getSunLongitudeAtMs(mid);
|
|
2157
2195
|
const delta = signedAngularDelta(sunLon, natalSunLongitude);
|
|
@@ -2233,5 +2271,5 @@ exports.normalizeAngle = normalizeAngle;
|
|
|
2233
2271
|
exports.queryAstrocartographyLocation = queryAstrocartographyLocation;
|
|
2234
2272
|
exports.resolveSwissEphRuntimeAssets = resolveSwissEphRuntimeAssets;
|
|
2235
2273
|
exports.shorterArcMidpoint = shorterArcMidpoint;
|
|
2236
|
-
//# sourceMappingURL=
|
|
2237
|
-
//# sourceMappingURL=chunk-
|
|
2274
|
+
//# sourceMappingURL=out.js.map
|
|
2275
|
+
//# sourceMappingURL=chunk-BEFGGHIJ.js.map
|