kaabalah 3.3.0 → 3.3.1

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.
@@ -1,57 +1,57 @@
1
1
  'use strict';
2
2
 
3
- var chunkKU4LMTWD_js = require('../chunk-KU4LMTWD.js');
3
+ var chunkT2JS2IJN_js = require('../chunk-T2JS2IJN.js');
4
4
  require('../chunk-2TUXWMP5.js');
5
5
 
6
6
 
7
7
 
8
8
  Object.defineProperty(exports, "CalcFlag", {
9
9
  enumerable: true,
10
- get: function () { return chunkKU4LMTWD_js.CalcFlag; }
10
+ get: function () { return chunkT2JS2IJN_js.CalcFlag; }
11
11
  });
12
12
  Object.defineProperty(exports, "HouseSystem", {
13
13
  enumerable: true,
14
- get: function () { return chunkKU4LMTWD_js.HouseSystem; }
14
+ get: function () { return chunkT2JS2IJN_js.HouseSystem; }
15
15
  });
16
16
  Object.defineProperty(exports, "Planet", {
17
17
  enumerable: true,
18
- get: function () { return chunkKU4LMTWD_js.Planet; }
18
+ get: function () { return chunkT2JS2IJN_js.Planet; }
19
19
  });
20
20
  Object.defineProperty(exports, "SIGNS", {
21
21
  enumerable: true,
22
- get: function () { return chunkKU4LMTWD_js.SIGNS; }
22
+ get: function () { return chunkT2JS2IJN_js.SIGNS; }
23
23
  });
24
24
  Object.defineProperty(exports, "closeSwissEph", {
25
25
  enumerable: true,
26
- get: function () { return chunkKU4LMTWD_js.closeSwissEph; }
26
+ get: function () { return chunkT2JS2IJN_js.closeSwissEph; }
27
27
  });
28
28
  Object.defineProperty(exports, "findHouseOf", {
29
29
  enumerable: true,
30
- get: function () { return chunkKU4LMTWD_js.findHouseOf; }
30
+ get: function () { return chunkT2JS2IJN_js.findHouseOf; }
31
31
  });
32
32
  Object.defineProperty(exports, "formatDegreeMinutes", {
33
33
  enumerable: true,
34
- get: function () { return chunkKU4LMTWD_js.formatDegreeMinutes; }
34
+ get: function () { return chunkT2JS2IJN_js.formatDegreeMinutes; }
35
35
  });
36
36
  Object.defineProperty(exports, "formatHouseCusps", {
37
37
  enumerable: true,
38
- get: function () { return chunkKU4LMTWD_js.formatHouseCusps; }
38
+ get: function () { return chunkT2JS2IJN_js.formatHouseCusps; }
39
39
  });
40
40
  Object.defineProperty(exports, "getBirthChart", {
41
41
  enumerable: true,
42
- get: function () { return chunkKU4LMTWD_js.getBirthChart; }
42
+ get: function () { return chunkT2JS2IJN_js.getBirthChart; }
43
43
  });
44
44
  Object.defineProperty(exports, "getSwissEph", {
45
45
  enumerable: true,
46
- get: function () { return chunkKU4LMTWD_js.getSwissEph; }
46
+ get: function () { return chunkT2JS2IJN_js.getSwissEph; }
47
47
  });
48
48
  Object.defineProperty(exports, "getZodiacPosition", {
49
49
  enumerable: true,
50
- get: function () { return chunkKU4LMTWD_js.getZodiacPosition; }
50
+ get: function () { return chunkT2JS2IJN_js.getZodiacPosition; }
51
51
  });
52
52
  Object.defineProperty(exports, "normalizeAngle", {
53
53
  enumerable: true,
54
- get: function () { return chunkKU4LMTWD_js.normalizeAngle; }
54
+ get: function () { return chunkT2JS2IJN_js.normalizeAngle; }
55
55
  });
56
56
  //# sourceMappingURL=index.js.map
57
57
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- export { CalcFlag, HouseSystem, Planet, SIGNS, closeSwissEph, findHouseOf, formatDegreeMinutes, formatHouseCusps, getBirthChart, getSwissEph, getZodiacPosition, normalizeAngle } from '../chunk-T7D3HPJZ.mjs';
1
+ export { CalcFlag, HouseSystem, Planet, SIGNS, closeSwissEph, findHouseOf, formatDegreeMinutes, formatHouseCusps, getBirthChart, getSwissEph, getZodiacPosition, normalizeAngle } from '../chunk-S6GM43CR.mjs';
2
2
  import '../chunk-PY5SMMJB.mjs';
3
3
  //# sourceMappingURL=index.mjs.map
4
4
  //# sourceMappingURL=index.mjs.map
@@ -3192,32 +3192,32 @@ var SwissEph = class {
3192
3192
  if (longitude < -180 || longitude > 180) {
3193
3193
  throw new Error("Longitude must be between -180 and 180 degrees");
3194
3194
  }
3195
- const totalBytes = (12 + 10) * 8;
3195
+ const HOUSES_DOUBLES = 13;
3196
+ const ASCMC_DOUBLES = 10;
3197
+ const BYTES_PER_F64 = 8;
3198
+ const totalBytes = (HOUSES_DOUBLES + ASCMC_DOUBLES) * BYTES_PER_F64;
3196
3199
  const memoryPtr = this.module._malloc(totalBytes);
3197
- if (!memoryPtr) {
3198
- throw new Error("Memory allocation failed");
3199
- }
3200
+ if (!memoryPtr) throw new Error("Memory allocation failed");
3200
3201
  const housesPtr = memoryPtr;
3201
- const ascmcPtr = memoryPtr + 12 * 8;
3202
+ const ascmcPtr = memoryPtr + HOUSES_DOUBLES * BYTES_PER_F64;
3202
3203
  try {
3203
3204
  const hsysCode = hsys.charCodeAt(0);
3204
3205
  const ret = this.swe_houses(julday, latitude, longitude, hsysCode, housesPtr, ascmcPtr);
3205
3206
  if (ret < 0) {
3206
3207
  throw new Error(`Houses calculation failed with error code ${ret}`);
3207
3208
  }
3208
- const houses = [];
3209
- for (let i = 0; i < 12; i++) {
3210
- const value = this.module.getValue(housesPtr + i * 8, "double");
3211
- houses.push(value);
3209
+ const houses = new Array(HOUSES_DOUBLES);
3210
+ for (let i = 0; i < HOUSES_DOUBLES; i++) {
3211
+ houses[i] = this.module.getValue(housesPtr + i * BYTES_PER_F64, "double");
3212
3212
  }
3213
- const ascendant = this.module.getValue(ascmcPtr + 0, "double");
3214
- const mc = this.module.getValue(ascmcPtr + 8, "double");
3215
- const armc = this.module.getValue(ascmcPtr + 16, "double");
3216
- const vertex = this.module.getValue(ascmcPtr + 24, "double");
3217
- const equasc = this.module.getValue(ascmcPtr + 32, "double");
3218
- const coasc1 = this.module.getValue(ascmcPtr + 40, "double");
3219
- const coasc2 = this.module.getValue(ascmcPtr + 48, "double");
3220
- const polasc = this.module.getValue(ascmcPtr + 56, "double");
3213
+ const ascendant = this.module.getValue(ascmcPtr + 0 * BYTES_PER_F64, "double");
3214
+ const mc = this.module.getValue(ascmcPtr + 1 * BYTES_PER_F64, "double");
3215
+ const armc = this.module.getValue(ascmcPtr + 2 * BYTES_PER_F64, "double");
3216
+ const vertex = this.module.getValue(ascmcPtr + 3 * BYTES_PER_F64, "double");
3217
+ const equasc = this.module.getValue(ascmcPtr + 4 * BYTES_PER_F64, "double");
3218
+ const coasc1 = this.module.getValue(ascmcPtr + 5 * BYTES_PER_F64, "double");
3219
+ const coasc2 = this.module.getValue(ascmcPtr + 6 * BYTES_PER_F64, "double");
3220
+ const polasc = this.module.getValue(ascmcPtr + 7 * BYTES_PER_F64, "double");
3221
3221
  return {
3222
3222
  ascendant,
3223
3223
  mc,
@@ -3467,5 +3467,5 @@ function findHouseOf(longitude, cusps360) {
3467
3467
  }
3468
3468
 
3469
3469
  export { CalcFlag, HouseSystem, Planet, SIGNS, closeSwissEph, findHouseOf, formatDegreeMinutes, formatHouseCusps, getBirthChart, getSwissEph, getZodiacPosition, normalizeAngle };
3470
- //# sourceMappingURL=chunk-T7D3HPJZ.mjs.map
3471
- //# sourceMappingURL=chunk-T7D3HPJZ.mjs.map
3470
+ //# sourceMappingURL=chunk-S6GM43CR.mjs.map
3471
+ //# sourceMappingURL=chunk-S6GM43CR.mjs.map