kaabalah 3.0.0 → 3.2.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.d.mts +10 -1
- package/dist/astrology/index.d.ts +10 -1
- package/dist/astrology/index.js +9 -9
- package/dist/astrology/index.mjs +1 -1
- package/dist/{chunk-SZXDOHKV.js → chunk-3JIIZ45K.js} +89 -10
- package/dist/{chunk-SZXDOHKV.js.map → chunk-3JIIZ45K.js.map} +1 -1
- package/dist/chunk-3WVZRLPG.js +52 -0
- package/dist/chunk-3WVZRLPG.js.map +1 -0
- package/dist/{chunk-SHEGSIRU.js → chunk-4IMODQPK.js} +15 -8
- package/dist/chunk-4IMODQPK.js.map +1 -0
- package/dist/{chunk-VV2YT6RZ.mjs → chunk-6DHXZLYH.mjs} +15 -8
- package/dist/chunk-6DHXZLYH.mjs.map +1 -0
- package/dist/{chunk-AV7WBVPS.mjs → chunk-O2LE2NXP.mjs} +89 -10
- package/dist/{chunk-AV7WBVPS.mjs.map → chunk-O2LE2NXP.mjs.map} +1 -1
- package/dist/chunk-YTZCZRJG.mjs +50 -0
- package/dist/chunk-YTZCZRJG.mjs.map +1 -0
- package/dist/ifa/index.d.mts +8 -7
- package/dist/ifa/index.d.ts +8 -7
- package/dist/ifa/index.js +6 -47
- package/dist/ifa/index.js.map +1 -1
- package/dist/ifa/index.mjs +1 -49
- 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 +30 -25
- package/dist/index.mjs +3 -2
- package/dist/numerology/index.d.mts +3 -2
- package/dist/numerology/index.d.ts +3 -2
- package/dist/numerology/index.js +16 -16
- package/dist/numerology/index.mjs +1 -1
- package/package.json +1 -1
- package/dist/chunk-SHEGSIRU.js.map +0 -1
- package/dist/chunk-VV2YT6RZ.mjs.map +0 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// src/ifa/index.ts
|
|
4
|
+
function calculateOdu(date) {
|
|
5
|
+
const day = date.getDate().toString().padStart(2, "0");
|
|
6
|
+
const month = (date.getMonth() + 1).toString().padStart(2, "0");
|
|
7
|
+
const year = date.getFullYear().toString();
|
|
8
|
+
const leftNumbers = [
|
|
9
|
+
parseInt(day[0]),
|
|
10
|
+
// First digit of day
|
|
11
|
+
parseInt(month[0]),
|
|
12
|
+
// First digit of month
|
|
13
|
+
parseInt(year[0]),
|
|
14
|
+
// First digit of year
|
|
15
|
+
parseInt(year[2])
|
|
16
|
+
// Third digit of year
|
|
17
|
+
];
|
|
18
|
+
const rightNumbers = [
|
|
19
|
+
parseInt(day[1]),
|
|
20
|
+
// Second digit of day
|
|
21
|
+
parseInt(month[1]),
|
|
22
|
+
// Second digit of month
|
|
23
|
+
parseInt(year[1]),
|
|
24
|
+
// Second digit of year
|
|
25
|
+
parseInt(year[3])
|
|
26
|
+
// Fourth digit of year
|
|
27
|
+
];
|
|
28
|
+
function reduceNumber(num) {
|
|
29
|
+
if (num <= 16) return num;
|
|
30
|
+
return reduceNumber(num.toString().split("").reduce((a, b) => a + parseInt(b), 0));
|
|
31
|
+
}
|
|
32
|
+
const rawLeftSum = leftNumbers.reduce((a, b) => a + b, 0);
|
|
33
|
+
const rawRightSum = rightNumbers.reduce((a, b) => a + b, 0);
|
|
34
|
+
const north = reduceNumber(rawLeftSum);
|
|
35
|
+
const south = reduceNumber(rawRightSum);
|
|
36
|
+
const east = reduceNumber(north + south);
|
|
37
|
+
const west = reduceNumber(north + south + east);
|
|
38
|
+
const center = reduceNumber(north + south + east + west);
|
|
39
|
+
return {
|
|
40
|
+
leftNumbers,
|
|
41
|
+
rightNumbers,
|
|
42
|
+
north,
|
|
43
|
+
south,
|
|
44
|
+
east,
|
|
45
|
+
west,
|
|
46
|
+
center
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
exports.calculateOdu = calculateOdu;
|
|
51
|
+
//# sourceMapp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M,CAAI,GAAA,QAAA,CAAS,CAAC,CAAA,EAAG,CAAC,CAAC,CAAA;AAAA;AAInF,EAAM,MAAA,UAAA,GAAa,YAAY,MAAO,CAAA,CAAC,GAAG,CAAM,KAAA,CAAA,GAAI,GAAG,CAAC,CAAA;AACxD,EAAM,MAAA,WAAA,GAAc,aAAa,MAAO,CAAA,CAAC,GAAG,CAAM,KAAA,CAAA,GAAI,GAAG,CAAC,CAAA;AAG1D,EAAM,MAAA,KAAA,GAAQ,aAAa,UAAU,CAAA;AACrC,EAAM,MAAA,KAAA,GAAQ,aAAa,WAAW,CAAA;AACtC,EAAM,MAAA,IAAA,GAAO,YAAa,CAAA,KAAA,GAAQ,KAAK,CAAA;AACvC,EAAA,MAAM,IAAO,GAAA,YAAA,CAAa,KAAQ,GAAA,KAAA,GAAQ,IAAI,CAAA;AAC9C,EAAA,MAAM,MAAS,GAAA,YAAA,CAAa,KAAQ,GAAA,KAAA,GAAQ,OAAO,IAAI,CAAA;AAEvD,EAAO,OAAA;AAAA,IACL,WAAA;AAAA,IACA,YAAA;AAAA,IACA,KAAA;AAAA,IACA,KAAA;AAAA,IACA,IAAA;AAAA,IACA,IAAA;AAAA,IACA;AAAA,GACF;AACF","file":"chunk-3WVZRLPG.js","sourcesContent":["\nexport type OduNumbers = {\n leftNumbers: number[],\n rightNumbers: number[],\n north: number,\n south: number,\n east: number,\n west: number,\n center: number\n}\n\n/**\n * Calculate the Odu numbers based on a date\n * @param date - Date object\n * @returns Odu numbers\n */\nexport function calculateOdu(date: Date): OduNumbers {\n // Format the date into DD/MM/YYYY\n const day = date.getDate().toString().padStart(2, '0');\n const month = (date.getMonth() + 1).toString().padStart(2, '0');\n const year = date.getFullYear().toString();\n\n // Split into left and right columns\n const leftNumbers = [\n parseInt(day[0]), // First digit of day\n parseInt(month[0]), // First digit of month\n parseInt(year[0]), // First digit of year\n parseInt(year[2]) // Third digit of year\n ];\n\n const rightNumbers = [\n parseInt(day[1]), // Second digit of day\n parseInt(month[1]), // Second digit of month\n parseInt(year[1]), // Second digit of year\n parseInt(year[3]) // Fourth digit of year\n ];\n\n // Reduce numbers if they're greater than 16\n function reduceNumber(num: number): number {\n if (num <= 16) return num;\n return reduceNumber(num.toString().split('').reduce((a, b) => a + parseInt(b), 0));\n }\n\n // Calculate initial sums\n const rawLeftSum = leftNumbers.reduce((a, b) => a + b, 0);\n const rawRightSum = rightNumbers.reduce((a, b) => a + b, 0);\n\n // Calculate and reduce each direction\n const north = reduceNumber(rawLeftSum);\n const south = reduceNumber(rawRightSum);\n const east = reduceNumber(north + south);\n const west = reduceNumber(north + south + east);\n const center = reduceNumber(north + south + east + west);\n\n return {\n leftNumbers,\n rightNumbers,\n north,\n south,\n east,\n west,\n center\n };\n}"]}
|
|
@@ -109,9 +109,11 @@ function calculateKaabalisticLifePath(birthDate) {
|
|
|
109
109
|
const isMasterLifePath = isMasterNumber(lifePath);
|
|
110
110
|
const personalMythologyNumbers = [
|
|
111
111
|
parseInt(`${dayMonthSynthesis}${yearSynthesis}`, 10),
|
|
112
|
-
finalSynthesis
|
|
113
|
-
lifePath
|
|
112
|
+
finalSynthesis
|
|
114
113
|
];
|
|
114
|
+
if (finalSynthesis !== lifePath) {
|
|
115
|
+
personalMythologyNumbers.push(lifePath);
|
|
116
|
+
}
|
|
115
117
|
const reducedLifePath = reduceToSingle(lifePath);
|
|
116
118
|
if (isMasterLifePath) {
|
|
117
119
|
personalMythologyNumbers.push(reducedLifePath);
|
|
@@ -364,7 +366,11 @@ function calculateFibonacciCycle(birthDate, today) {
|
|
|
364
366
|
};
|
|
365
367
|
}
|
|
366
368
|
function calculateSoulNumber(firstName) {
|
|
367
|
-
|
|
369
|
+
const vowels = chunkJJ76YVMI_js.calculateGematria(firstName).vowels;
|
|
370
|
+
return {
|
|
371
|
+
reducedValue: vowels.finalValue,
|
|
372
|
+
reductionSteps: vowels.reductionSteps
|
|
373
|
+
};
|
|
368
374
|
}
|
|
369
375
|
function wrapMonth(month) {
|
|
370
376
|
const wrappedMonth = ((month - 1) % 12 + 12) % 12;
|
|
@@ -429,7 +435,7 @@ function calculatePersonalMonths(birthDate, personalYear, today) {
|
|
|
429
435
|
const { month } = parseDate(birthDate);
|
|
430
436
|
const firstPersonalMonth = parseInt(month, 10);
|
|
431
437
|
const personalMonths = [];
|
|
432
|
-
for (let i = 0; i <
|
|
438
|
+
for (let i = 0; i < 12; i++) {
|
|
433
439
|
const m = wrapMonth(firstPersonalMonth + i);
|
|
434
440
|
const value = reduceToSingleWithSteps(personalYear.reducedValue + m, {
|
|
435
441
|
preserveMasters: true
|
|
@@ -451,7 +457,7 @@ function calculatePersonalCycles(birthDate, today = /* @__PURE__ */ new Date(),
|
|
|
451
457
|
);
|
|
452
458
|
const { lifePath } = calculateKaabalisticLifePath(birthDate);
|
|
453
459
|
const soulNumber = calculateSoulNumber(firstName);
|
|
454
|
-
const personalPeriods = calculatePersonalPeriods(birthDate, yearToUse, lifePath, soulNumber, currentAge);
|
|
460
|
+
const personalPeriods = calculatePersonalPeriods(birthDate, yearToUse, lifePath, soulNumber.reducedValue, currentAge);
|
|
455
461
|
const {
|
|
456
462
|
personalMonths,
|
|
457
463
|
currentPersonalMonthIndex: currentPersonalMonth
|
|
@@ -465,7 +471,8 @@ function calculatePersonalCycles(birthDate, today = /* @__PURE__ */ new Date(),
|
|
|
465
471
|
personalPeriods,
|
|
466
472
|
personalMonths,
|
|
467
473
|
currentPersonalPeriod,
|
|
468
|
-
currentPersonalMonth
|
|
474
|
+
currentPersonalMonth,
|
|
475
|
+
yearUsedOnCalculations: yearToUse
|
|
469
476
|
};
|
|
470
477
|
}
|
|
471
478
|
|
|
@@ -484,5 +491,5 @@ exports.getDateEnergies = getDateEnergies;
|
|
|
484
491
|
exports.isMasterNumber = isMasterNumber;
|
|
485
492
|
exports.reduceToSingle = reduceToSingle;
|
|
486
493
|
exports.reduceToSingleWithSteps = reduceToSingleWithSteps;
|
|
487
|
-
//# sourceMappingURL=chunk-
|
|
488
|
-
//# sourceMappingURL=chunk-
|
|
494
|
+
//# sourceMappingURL=chunk-4IMODQPK.js.map
|
|
495
|
+
//# sourceMappingURL=chunk-4IMODQPK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/numerology/index.ts"],"names":["calculateGematria"],"mappings":";;;;;AAWA,SAAS,UAAU,IAA0D,EAAA;AAC3E,EAAA,IAAI,CAAC,IAAM,EAAA;AACT,IAAM,MAAA,IAAI,MAAM,kBAAkB,CAAA;AAAA;AAGpC,EAAI,IAAA,EAAE,gBAAgB,IAAO,CAAA,EAAA;AAC3B,IAAM,MAAA,IAAI,MAAM,4BAA4B,CAAA;AAAA;AAG9C,EAAA,MAAM,gBAAgB,IAAK,CAAA,WAAA,GAAc,KAAM,CAAA,GAAG,EAAE,CAAC,CAAA;AAErD,EAAI,IAAA,aAAA,CAAc,WAAW,EAAI,EAAA;AAC/B,IAAM,MAAA,IAAI,MAAM,qDAAqD,CAAA;AAAA;AAGvE,EAAM,MAAA,KAAA,GAAQ,aAAc,CAAA,KAAA,CAAM,MAAM,CAAA,CAAE,IAAI,CAAC,CAAA,KAAM,CAAE,CAAA,IAAA,EAAM,CAAA;AAE7D,EAAA,MAAM,UAAa,GAAA,KAAA,CAAM,CAAC,CAAA,CAAE,MAAW,KAAA,CAAA;AAEvC,EAAA,IAAI,UAAY,EAAA;AACd,IAAA,OAAO,EAAE,GAAA,EAAK,KAAM,CAAA,CAAC,CAAG,EAAA,KAAA,EAAO,KAAM,CAAA,CAAC,CAAG,EAAA,IAAA,EAAM,KAAM,CAAA,CAAC,CAAE,EAAA;AAAA,GACnD,MAAA;AACL,IAAA,OAAO,EAAE,GAAA,EAAK,KAAM,CAAA,CAAC,CAAG,EAAA,KAAA,EAAO,KAAM,CAAA,CAAC,CAAG,EAAA,IAAA,EAAM,KAAM,CAAA,CAAC,CAAE,EAAA;AAAA;AAE5D;AAEA,SAAS,yBAA0B,CAAA;AAAA,EACjC,GAAA;AAAA,EACA,KAAA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AAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,eAAA;AAAA,IACA,cAAA;AAAA,IACA,qBAAA;AAAA,IACA,oBAAA;AAAA,IACA,sBAAwB,EAAA;AAAA,GAC1B;AACF","file":"chunk-4IMODQPK.js","sourcesContent":["/**\n * Numerology calculations\n */\n\nimport { calculateGematria } from \"../gematria\";\n\nexport type ReducedValueWithSteps = {\n reducedValue: number;\n reductionSteps: number[];\n};\n\nfunction parseDate(date: Date): { day: string; month: string; year: string } {\n if (!date) {\n throw new Error(\"Date is required\");\n }\n\n if (!(date instanceof Date)) {\n throw new Error(\"Date must be a Date object\");\n }\n\n const formattedDate = date.toISOString().split(\"T\")[0];\n\n if (formattedDate.length !== 10) {\n throw new Error(\"Date must be in the format YYYY-MM-DD or DD-MM-YYYY\");\n }\n\n const parts = formattedDate.split(/[-/]/).map((p) => p.trim());\n\n const isYYYYMMDD = parts[0].length === 4;\n\n if (isYYYYMMDD) {\n return { day: parts[2], month: parts[1], year: parts[0] };\n } else {\n return { day: parts[0], month: parts[1], year: parts[2] };\n }\n}\n\nfunction mapDatePartsToBlocksOfTwo({\n day,\n month,\n year,\n}: {\n day: string;\n month: string;\n year: string;\n}): { day: string; month: string; year1: string; year2: string } {\n return {\n day: day.padStart(2, \"0\"),\n month: month.padStart(2, \"0\"),\n year1: year.slice(0, 2),\n year2: year.slice(2),\n };\n}\n\nfunction digitSum(n: number): number {\n let s = 0;\n\n for (const ch of String(Math.abs(n))) {\n s += ch.charCodeAt(0) - 48;\n }\n\n return s;\n}\n\nexport const MASTER_NUMBERS = [11, 22, 33, 44];\n\nexport function isMasterNumber(n: number): boolean {\n return MASTER_NUMBERS.includes(n);\n}\n\nexport function reduceToSingle(\n n: number,\n options: { preserveMasters?: boolean } = { preserveMasters: false }\n): number {\n // standard digital root with 0 allowed; never preserve masters here\n if (n === 0) {\n return 0;\n }\n\n let reduced = n;\n while (reduced > 9) {\n if (options?.preserveMasters && isMasterNumber(reduced)) {\n break;\n }\n\n reduced = digitSum(reduced);\n }\n\n // optional tweak for exact \"00\" cases will be applied by caller, not here\n return reduced;\n}\n\nexport function reduceToSingleWithSteps(\n n: number,\n options: { preserveMasters?: boolean } = { preserveMasters: false }\n): ReducedValueWithSteps {\n const steps = [n];\n\n if (n === 0) {\n return {\n reducedValue: 0,\n reductionSteps: steps,\n };\n }\n\n let reduced = n;\n\n while (reduced > 9) {\n if (options?.preserveMasters && isMasterNumber(reduced)) {\n break;\n }\n\n reduced = digitSum(reduced);\n steps.push(reduced);\n }\n\n return {\n reducedValue: reduced,\n reductionSteps: steps,\n };\n}\n\nfunction reduceBlock(block: string): number {\n const n = [...block].reduce(\n (acc, curr) => acc + (curr.charCodeAt(0) - 48),\n 0\n );\n\n if (n === 0) {\n return 0;\n }\n\n return reduceToSingle(n);\n}\n\nexport type KaabalisticLifePathResult = {\n parts: {\n day: string;\n month: string;\n year1: string;\n year2: string;\n };\n reducedParts: {\n reducedDay: number;\n reducedMonth: number;\n reducedYear1: number;\n reducedYear2: number;\n };\n syntheses: {\n dayMonthSynthesis: number;\n yearSynthesis: number;\n reducedDayMonthSynthesis: number;\n reducedYearSynthesis: number;\n finalSynthesis: number;\n };\n lifePath: number;\n /**\n * Last three syntheses\n */\n personalMythologyNumbers: number[];\n};\n\n/**\n * Calculate the Kaabalistic life path number based on a birth date.\n * Note: This method produces more master numbers and never produces life path 2s (or any life path that ends with 0 like 10, 20, 30, etc.)\n */\nexport function calculateKaabalisticLifePath(\n birthDate: Date\n): KaabalisticLifePathResult {\n const { day, month, year1, year2 } = mapDatePartsToBlocksOfTwo(\n parseDate(birthDate)\n );\n\n const reducedDay = reduceBlock(day);\n const reducedMonth = reduceBlock(month);\n const reducedYear1 = reduceBlock(year1);\n const reducedYear2 = reduceBlock(year2);\n\n const dayMonthSynthesis = parseInt(`${reducedDay}${reducedMonth}`, 10);\n const yearSynthesis = parseInt(`${reducedYear1}${reducedYear2}`, 10);\n\n const reducedDayMonthSynthesis = reduceToSingle(dayMonthSynthesis);\n const reducedYearSynthesis = reduceToSingle(yearSynthesis);\n\n const finalSynthesis = parseInt(\n `${reducedDayMonthSynthesis}${reducedYearSynthesis}`,\n 10\n );\n\n const lifePath = reduceToSingle(finalSynthesis, { preserveMasters: true });\n const isMasterLifePath = isMasterNumber(lifePath);\n\n const personalMythologyNumbers = [\n parseInt(`${dayMonthSynthesis}${yearSynthesis}`, 10),\n finalSynthesis,\n ];\n\n if (finalSynthesis !== lifePath) {\n personalMythologyNumbers.push(lifePath);\n }\n\n const reducedLifePath = reduceToSingle(lifePath);\n if (isMasterLifePath) {\n personalMythologyNumbers.push(reducedLifePath);\n }\n\n return {\n parts: { day, month, year1, year2 },\n reducedParts: { reducedDay, reducedMonth, reducedYear1, reducedYear2 },\n syntheses: {\n dayMonthSynthesis,\n yearSynthesis,\n reducedDayMonthSynthesis,\n reducedYearSynthesis,\n finalSynthesis,\n },\n lifePath,\n personalMythologyNumbers,\n };\n}\n\nexport type StraightAcrossReductionLifePathResult = {\n lifePath: number;\n reductionSteps: number[];\n};\n\n/**\n * Calculate the traditional straight across reduction life path number based on a birth date.\n */\nexport function calculateStraightAcrossReductionLifePath(\n birthDate: Date\n): StraightAcrossReductionLifePathResult {\n const { day, month, year } = parseDate(birthDate);\n\n const result = reduceToSingleWithSteps(\n parseInt(`${day}${month}${year}`, 10),\n { preserveMasters: true }\n );\n\n return {\n lifePath: result.reducedValue,\n reductionSteps: result.reductionSteps,\n };\n}\n\nexport type DateEnergies = {\n dayEnergy: ReducedValueWithSteps;\n monthEnergy: ReducedValueWithSteps;\n yearEnergy: ReducedValueWithSteps;\n};\n\nexport function getDateEnergies(birthDate: Date): DateEnergies {\n const { day, month, year1, year2 } = mapDatePartsToBlocksOfTwo(\n parseDate(birthDate)\n );\n\n const dayEnergy = reduceToSingleWithSteps(parseInt(day, 10), {\n preserveMasters: true,\n });\n const monthEnergy = reduceToSingleWithSteps(parseInt(month, 10), {\n preserveMasters: true,\n });\n const yearEnergy = reduceToSingleWithSteps(parseInt(year1 + year2, 10), {\n preserveMasters: true,\n });\n\n return {\n dayEnergy,\n monthEnergy,\n yearEnergy,\n };\n}\n\nexport type Challenges = {\n day: number;\n month: number;\n year: number;\n mainChallenge: number;\n subChallenge1: number;\n subChallenge2: number;\n};\n\nexport function calculateChallenges(birthDate: Date): Challenges {\n const { day, month, year } = parseDate(birthDate);\n\n const reducedDay = reduceToSingle(parseInt(day, 10));\n const reducedMonth = reduceToSingle(parseInt(month, 10));\n const reducedYear = reduceToSingle(parseInt(year, 10));\n\n const subChallenge1 = Math.abs(reducedMonth - reducedDay);\n const subChallenge2 = Math.abs(reducedDay - reducedYear);\n const mainChallenge = Math.abs(subChallenge1 - subChallenge2);\n\n return {\n day: reducedDay,\n month: reducedMonth,\n year: reducedYear,\n mainChallenge,\n subChallenge1,\n subChallenge2,\n };\n}\n\nexport const CYCLE_MEANINGS = [\n {\n title: \"Learning\",\n shortDescription:\n \"A period for assertive action and learning through direct experience.\",\n personalDescription:\n \"This period emphasizes assertive action and learning through direct experience. Utilize personal influence to seek favors, loans, or recognition from influential individuals such as government officials or community leaders. Ideal for enhancing personal reputation and prestige, keeping in mind that all actions carry consequences.\",\n businessDescription:\n \"Ideal for promotional activities aimed at building goodwill, public recognition, and securing endorsements from prominent individuals. Prioritize the company's image and reputation over immediate profits.\",\n astrologySign: \"Aries (Actions Have Consequences)\",\n },\n {\n title: \"Hard Work\",\n shortDescription:\n \"A time for diligent effort and adaptability to temporary changes.\",\n personalDescription:\n \"A period where diligent effort and adaptability are crucial. Suitable for temporary changes such as moving homes, short trips, or career shifts. Avoid long-term commitments or significant investments unless carefully formalized.\",\n businessDescription:\n \"Ideal for short-term experiments, temporary staffing adjustments, and forming beneficial business connections. Steer clear of verbal agreements or long-term commitments unless formally documented. Flexibility leads to progress.\",\n astrologySign: \"Taurus (Stop Being Stubborn)\",\n },\n {\n title: \"Friendship\",\n shortDescription:\n \"A dynamic phase for ambitious projects and strengthening relationships.\",\n personalDescription:\n \"A dynamic and energetic phase ideal for initiating ambitious projects requiring persistence and physical strength. Effective communication strengthens relationships, but impulsiveness should be avoided to prevent conflicts.\",\n businessDescription:\n \"Ideal for expansion, energetic ventures, and assertive promotional activities. Excellent for debt collection but avoid legal conflicts. Maintain vigilance against accidents and disputes while leveraging strong communication.\",\n astrologySign: \"Gemini (Communication is Power)\",\n },\n {\n title: \"Opportunities\",\n shortDescription:\n \"An intellectually fertile time for creativity and quick decision-making.\",\n personalDescription:\n \"An intellectually fertile phase ideal for creative projects, innovation, and quick decision-making. Beware of deception, especially concerning documents or agreements. Foster mental growth and create valuable connections, but remain cautious.\",\n businessDescription:\n \"Perfect for launching impactful marketing campaigns and securing new agreements. Excellent for promotional activities and intellectual creativity, but carefully scrutinize documents to avoid fraud.\",\n astrologySign: \"Cancer (Nurture Mental Growth)\",\n },\n {\n title: \"Tears/Decision\",\n shortDescription:\n \"The most prosperous phase for financial resolution and spiritual advancement.\",\n personalDescription:\n \"The most prosperous phase of the year, suitable for resolving financial issues, starting long journeys, and advancing spiritually. Interact with influential figures, manage debts, and engage in expansive social activities. Keep ego and selfishness balanced for optimal outcomes.\",\n businessDescription:\n \"A prime time for investments, financial growth, global promotion, debt collection, and favorable legal outcomes. Emphasize fairness and generosity to enhance business success.\",\n astrologySign: \"Leo (Balance Ego and Generosity)\",\n },\n {\n title: \"Triple Blessing\",\n shortDescription:\n \"Perfect for pleasures, social activities, and creative pursuits.\",\n personalDescription:\n \"Ideal for enjoying pleasures, social activities, artistic endeavors, and short travels. Favorable for romantic interactions, relaxation, and creative pursuits. Organize personal life to balance enjoyment and refinement effectively.\",\n businessDescription:\n \"Excellent time for promoting luxury products, arts, entertainment, and speculative investments. Ideal for forming friendly business alliances and strategic partnerships.\",\n astrologySign: \"Virgo (Organize Your Pleasures)\",\n },\n {\n title: \"Rest\",\n shortDescription:\n \"A period of rest, introspection, and preparation for renewal.\",\n personalDescription:\n \"A critical period of rest, introspection, and cautious preparation for renewal. Avoid initiating new ventures and instead focus on completing pending matters, managing legal affairs carefully, and protecting existing resources. Balance and patience are essential.\",\n businessDescription:\n \"Period to conserve resources, avoid major expansions, and carefully manage internal restructuring. Postpone significant new ventures until the next cycle. Act diplomatically and cautiously to ensure stability.\",\n astrologySign: \"Libra (Seek Balance and Reconstruction)\",\n },\n];\n\nexport interface Cycle {\n number: number;\n description: {\n title: string;\n shortDescription: string;\n personalDescription: string;\n businessDescription: string;\n astrologySign: string;\n };\n isActive?: boolean;\n cycleStart?: Date;\n}\n\nexport interface CycleInfo {\n yearlyCycles: Cycle[];\n ageCycles: Cycle[];\n monthlyCycles: Cycle[];\n currentYearlyCycle: number | null;\n currentAgeCycle: number | null;\n currentMonthlyCycle: number | null;\n daysInMonthlyCycle: number;\n totalDays: number;\n}\n\n// Add days to a date\nfunction addDays(date: Date, days: number): Date {\n const result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n}\n\n// Find the most recent anniversary of the start date\nfunction getMostRecentStartDate(startDate: Date, today: Date): Date {\n const startMonth = startDate.getMonth();\n const startDay = startDate.getDate();\n let recentStart = new Date(today.getFullYear(), startMonth, startDay);\n if (recentStart > today) {\n recentStart = new Date(today.getFullYear() - 1, startMonth, startDay);\n }\n return recentStart;\n}\n\n// Calculate cycles (annual and monthly)\nexport function calculateCycles(startDate: Date, today: Date): CycleInfo {\n const mostRecentStart = getMostRecentStartDate(startDate, today);\n const cycleLength = 52; // Fixed cycle length for monthly cycles\n\n // Skip annual cycle calculation if start date is in the future\n const isFutureDate = startDate > today;\n let currentYearlyCycle = null;\n let currentAgeCycle = null;\n const ageCycles: Cycle[] = [];\n const yearlyCycles: Cycle[] = [];\n if (!isFutureDate) {\n const birthYear = startDate.getFullYear();\n const currentYear = today.getFullYear();\n const ageInYears = currentYear - birthYear;\n currentAgeCycle = (Math.floor(ageInYears / 7) % 7) + 1;\n for (let i = 0; i < 7; i++) {\n // cycle start for year is which year it started\n const cycleStart = new Date(\n birthYear + i * 7,\n startDate.getMonth(),\n startDate.getDate()\n );\n\n const cycle = i + 1;\n const isCurrentCycle = cycle === currentAgeCycle;\n\n if (isCurrentCycle) {\n // Calculate yearly cycles within the current age cycle\n // The yearly cycle is based on the person's exact age in years\n // For example, if someone is 6 years old, they're in the 1st age cycle (0-7 years) and the 6th yearly cycle\n const yearsSinceBirth = ageInYears;\n const yearWithinAgeCycle = yearsSinceBirth % 7; // 0-6 representing which year within the current age cycle\n currentYearlyCycle = yearWithinAgeCycle + 1; // Convert to 1-7 range\n\n for (let j = 0; j < 7; j++) {\n // Calculate the start date for each yearly cycle within the current age cycle\n const ageCycleStartYear = birthYear + Math.floor(ageInYears / 7) * 7; // Start year of current age cycle\n const yearlyCycleStart = new Date(\n ageCycleStartYear + j,\n startDate.getMonth(),\n startDate.getDate()\n );\n const yearlyCycle = j + 1;\n\n const isCurrentYearlyCycle = yearlyCycle === currentYearlyCycle;\n\n yearlyCycles.push({\n number: yearlyCycle,\n description: CYCLE_MEANINGS[j],\n isActive: isCurrentYearlyCycle,\n cycleStart: yearlyCycleStart,\n });\n }\n }\n\n ageCycles.push({\n number: cycle,\n description: CYCLE_MEANINGS[i],\n isActive: isCurrentCycle,\n cycleStart,\n });\n }\n }\n\n // Monthly cycles (relative to start date)\n const monthlyCycles: Cycle[] = [];\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n\n monthlyCycles.push({\n number: i + 1,\n description: CYCLE_MEANINGS[i],\n isActive: false,\n cycleStart: cycleStart,\n });\n }\n\n // Find current monthly cycle\n let currentMonthlyCycle = null;\n let daysInMonthlyCycle = 0;\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n const nextCycleStart =\n i < 6\n ? addDays(mostRecentStart, (i + 1) * cycleLength)\n : addDays(mostRecentStart, 366);\n if (today >= cycleStart && today < nextCycleStart) {\n currentMonthlyCycle = i + 1;\n daysInMonthlyCycle =\n Math.floor(\n (today.getTime() - cycleStart.getTime()) / (1000 * 60 * 60 * 24)\n ) + 1;\n monthlyCycles[i].isActive = true;\n break;\n }\n }\n\n const totalDays =\n Math.floor(\n (today.getTime() - mostRecentStart.getTime()) / (1000 * 60 * 60 * 24)\n ) + 1;\n\n return {\n yearlyCycles,\n ageCycles,\n monthlyCycles,\n currentYearlyCycle,\n currentAgeCycle,\n currentMonthlyCycle,\n daysInMonthlyCycle,\n totalDays,\n };\n}\n\nfunction calculateAge(birthDate: Date, today: Date = new Date()): number {\n return today.getFullYear() - birthDate.getFullYear();\n}\n\nexport type FibonacciCycle = {\n currentAge: number;\n cycle1: ReducedValueWithSteps;\n cycle2: ReducedValueWithSteps;\n cycle3: ReducedValueWithSteps;\n cycle4: ReducedValueWithSteps;\n cycle5: ReducedValueWithSteps;\n cycle6: ReducedValueWithSteps;\n cycle7: ReducedValueWithSteps;\n};\n\nexport function calculateFibonacciCycle(\n birthDate: Date,\n today: Date\n): FibonacciCycle {\n const currentAge = calculateAge(birthDate, today);\n\n const cycle1 = reduceToSingleWithSteps(currentAge);\n const cycle2 = reduceToSingleWithSteps(cycle1.reducedValue + 2);\n const cycle3 = reduceToSingleWithSteps(\n cycle1.reducedValue + cycle2.reductionSteps[0]\n );\n const cycle4 = reduceToSingleWithSteps(\n cycle2.reductionSteps[0] + cycle3.reductionSteps[0]\n );\n const cycle5 = reduceToSingleWithSteps(\n cycle3.reductionSteps[0] + cycle4.reductionSteps[0]\n );\n const cycle6 = reduceToSingleWithSteps(\n cycle4.reductionSteps[0] + cycle5.reductionSteps[0]\n );\n const cycle7 = reduceToSingleWithSteps(\n cycle5.reductionSteps[0] + cycle6.reductionSteps[0]\n );\n\n return {\n currentAge,\n cycle1,\n cycle2,\n cycle3,\n cycle4,\n cycle5,\n cycle6,\n cycle7,\n };\n}\n\nexport type PersonalPeriod = {\n startMonth: number;\n endMonth: number;\n value: ReducedValueWithSteps;\n};\n\nexport type PersonalMonth = {\n month: number;\n value: ReducedValueWithSteps;\n};\n\nexport type PersonalCycles = {\n personalYear: ReducedValueWithSteps;\n personalPeriods: [PersonalPeriod, PersonalPeriod, PersonalPeriod];\n personalMonths: [\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth\n ];\n currentPersonalPeriod: number;\n currentPersonalMonth: number;\n currentAge: number;\n lifePath: number;\n soulNumber?: ReducedValueWithSteps;\n yearUsedOnCalculations: number;\n};\n\nfunction calculateSoulNumber(firstName: string): ReducedValueWithSteps {\n const vowels = calculateGematria(firstName).vowels;\n\n return {\n reducedValue: vowels.finalValue,\n reductionSteps: vowels.reductionSteps,\n }\n}\n\n/**\n * This function wraps the month number to a 1-12 range.\n */\nfunction wrapMonth(month: number): number {\n const wrappedMonth = (((month - 1) % 12) + 12) % 12;\n\n return wrappedMonth + 1;\n}\n\n/**\n * Returns the year of the most recent birthday relative to today.\n */\nfunction getLastBirthdayYear(birthDate: Date, today: Date): number {\n const thisYearsBirthday = new Date(\n today.getFullYear(),\n birthDate.getMonth(),\n birthDate.getDate()\n );\n\n return today >= thisYearsBirthday\n ? today.getFullYear()\n : today.getFullYear() - 1;\n}\n\nexport function calculatePersonalYear(\n birthDate: Date,\n today: Date = new Date()\n): ReducedValueWithSteps {\n const { day, month } = parseDate(birthDate);\n const yearToUse = getLastBirthdayYear(birthDate, today);\n\n return reduceToSingleWithSteps(\n parseInt(day, 10) + parseInt(month, 10) + yearToUse,\n { preserveMasters: true }\n );\n}\n\nexport function calculatePersonalPeriods(\n birthDate: Date,\n yearToUse: number,\n lifePath: number,\n soulNumber: number,\n currentAge: number\n): [PersonalPeriod, PersonalPeriod, PersonalPeriod] {\n const { month } = parseDate(birthDate);\n const birthMonth = parseInt(month, 10);\n\n const periods: [PersonalPeriod, PersonalPeriod, PersonalPeriod] = [\n {\n startMonth: wrapMonth(birthMonth + 0),\n endMonth: wrapMonth(birthMonth + 3),\n value: reduceToSingleWithSteps(yearToUse + currentAge, {\n preserveMasters: true,\n }),\n },\n {\n startMonth: wrapMonth(birthMonth + 4),\n endMonth: wrapMonth(birthMonth + 7),\n value: reduceToSingleWithSteps(yearToUse + lifePath, {\n preserveMasters: true,\n }),\n },\n {\n startMonth: wrapMonth(birthMonth + 8),\n endMonth: wrapMonth(birthMonth + 11),\n value: reduceToSingleWithSteps(yearToUse + soulNumber, {\n preserveMasters: true,\n }),\n },\n ];\n\n return periods;\n}\n\nfunction diffInPersonalMonths(birthDate: Date, today: Date): number {\n const lastYear = getLastBirthdayYear(birthDate, today);\n const base = new Date(lastYear, birthDate.getMonth(), birthDate.getDate());\n\n let k =\n (today.getFullYear() - base.getFullYear()) * 12 +\n (today.getMonth() - base.getMonth());\n\n // Only advance to the next personal month on the birth *day* each month\n if (today.getDate() < birthDate.getDate()) {\n k -= 1;\n }\n\n if (k < 0) k = 0;\n if (k > 12) k = 12; \n\n return k;\n}\n\nexport function calculatePersonalMonths(\n birthDate: Date,\n personalYear: ReducedValueWithSteps,\n today: Date\n): {\n personalMonths: PersonalCycles[\"personalMonths\"];\n currentPersonalMonthIndex: number;\n} {\n const { month } = parseDate(birthDate);\n const firstPersonalMonth = parseInt(month, 10);\n\n const personalMonths: PersonalMonth[] = [];\n for (let i = 0; i < 12; i++) {\n const m = wrapMonth(firstPersonalMonth + i);\n const value = reduceToSingleWithSteps(personalYear.reducedValue + m, {\n preserveMasters: true,\n });\n personalMonths.push({ month: m, value });\n }\n\n const currentPersonalMonthIndex = diffInPersonalMonths(birthDate, today);\n\n return {\n personalMonths: personalMonths as PersonalCycles[\"personalMonths\"],\n currentPersonalMonthIndex,\n };\n}\n\nexport function calculatePersonalCycles(\n birthDate: Date,\n today: Date = new Date(),\n firstName: string\n): PersonalCycles {\n const yearToUse = getLastBirthdayYear(birthDate, today);\n\n const personalYear = calculatePersonalYear(birthDate, today);\n\n const currentAge = calculateAge(\n birthDate,\n new Date(yearToUse, today.getMonth(), today.getDate())\n );\n const { lifePath } = calculateKaabalisticLifePath(birthDate);\n const soulNumber = calculateSoulNumber(firstName);\n\n const personalPeriods =\n calculatePersonalPeriods(birthDate, yearToUse, lifePath, soulNumber.reducedValue, currentAge);\n\n const {\n personalMonths,\n currentPersonalMonthIndex: currentPersonalMonth,\n } = calculatePersonalMonths(birthDate, personalYear, today);\n \n // Derive the period from the month index (0–12). Clamp 12 to last period.\n const currentPersonalPeriod = Math.floor(Math.min(currentPersonalMonth, 11) / 4);\n\n return {\n currentAge,\n lifePath,\n soulNumber,\n personalYear,\n personalPeriods,\n personalMonths,\n currentPersonalPeriod,\n currentPersonalMonth,\n yearUsedOnCalculations: yearToUse,\n };\n}\n"]}
|
|
@@ -107,9 +107,11 @@ function calculateKaabalisticLifePath(birthDate) {
|
|
|
107
107
|
const isMasterLifePath = isMasterNumber(lifePath);
|
|
108
108
|
const personalMythologyNumbers = [
|
|
109
109
|
parseInt(`${dayMonthSynthesis}${yearSynthesis}`, 10),
|
|
110
|
-
finalSynthesis
|
|
111
|
-
lifePath
|
|
110
|
+
finalSynthesis
|
|
112
111
|
];
|
|
112
|
+
if (finalSynthesis !== lifePath) {
|
|
113
|
+
personalMythologyNumbers.push(lifePath);
|
|
114
|
+
}
|
|
113
115
|
const reducedLifePath = reduceToSingle(lifePath);
|
|
114
116
|
if (isMasterLifePath) {
|
|
115
117
|
personalMythologyNumbers.push(reducedLifePath);
|
|
@@ -362,7 +364,11 @@ function calculateFibonacciCycle(birthDate, today) {
|
|
|
362
364
|
};
|
|
363
365
|
}
|
|
364
366
|
function calculateSoulNumber(firstName) {
|
|
365
|
-
|
|
367
|
+
const vowels = calculateGematria(firstName).vowels;
|
|
368
|
+
return {
|
|
369
|
+
reducedValue: vowels.finalValue,
|
|
370
|
+
reductionSteps: vowels.reductionSteps
|
|
371
|
+
};
|
|
366
372
|
}
|
|
367
373
|
function wrapMonth(month) {
|
|
368
374
|
const wrappedMonth = ((month - 1) % 12 + 12) % 12;
|
|
@@ -427,7 +433,7 @@ function calculatePersonalMonths(birthDate, personalYear, today) {
|
|
|
427
433
|
const { month } = parseDate(birthDate);
|
|
428
434
|
const firstPersonalMonth = parseInt(month, 10);
|
|
429
435
|
const personalMonths = [];
|
|
430
|
-
for (let i = 0; i <
|
|
436
|
+
for (let i = 0; i < 12; i++) {
|
|
431
437
|
const m = wrapMonth(firstPersonalMonth + i);
|
|
432
438
|
const value = reduceToSingleWithSteps(personalYear.reducedValue + m, {
|
|
433
439
|
preserveMasters: true
|
|
@@ -449,7 +455,7 @@ function calculatePersonalCycles(birthDate, today = /* @__PURE__ */ new Date(),
|
|
|
449
455
|
);
|
|
450
456
|
const { lifePath } = calculateKaabalisticLifePath(birthDate);
|
|
451
457
|
const soulNumber = calculateSoulNumber(firstName);
|
|
452
|
-
const personalPeriods = calculatePersonalPeriods(birthDate, yearToUse, lifePath, soulNumber, currentAge);
|
|
458
|
+
const personalPeriods = calculatePersonalPeriods(birthDate, yearToUse, lifePath, soulNumber.reducedValue, currentAge);
|
|
453
459
|
const {
|
|
454
460
|
personalMonths,
|
|
455
461
|
currentPersonalMonthIndex: currentPersonalMonth
|
|
@@ -463,10 +469,11 @@ function calculatePersonalCycles(birthDate, today = /* @__PURE__ */ new Date(),
|
|
|
463
469
|
personalPeriods,
|
|
464
470
|
personalMonths,
|
|
465
471
|
currentPersonalPeriod,
|
|
466
|
-
currentPersonalMonth
|
|
472
|
+
currentPersonalMonth,
|
|
473
|
+
yearUsedOnCalculations: yearToUse
|
|
467
474
|
};
|
|
468
475
|
}
|
|
469
476
|
|
|
470
477
|
export { CYCLE_MEANINGS, MASTER_NUMBERS, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps };
|
|
471
|
-
//# sourceMappingURL=chunk-
|
|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AAA,IACA,QAAA;AAAA,IACA,UAAA;AAAA,IACA,YAAA;AAAA,IACA,eAAA;AAAA,IACA,cAAA;AAAA,IACA,qBAAA;AAAA,IACA,oBAAA;AAAA,IACA,sBAAwB,EAAA;AAAA,GAC1B;AACF","file":"chunk-6DHXZLYH.mjs","sourcesContent":["/**\n * Numerology calculations\n */\n\nimport { calculateGematria } from \"../gematria\";\n\nexport type ReducedValueWithSteps = {\n reducedValue: number;\n reductionSteps: number[];\n};\n\nfunction parseDate(date: Date): { day: string; month: string; year: string } {\n if (!date) {\n throw new Error(\"Date is required\");\n }\n\n if (!(date instanceof Date)) {\n throw new Error(\"Date must be a Date object\");\n }\n\n const formattedDate = date.toISOString().split(\"T\")[0];\n\n if (formattedDate.length !== 10) {\n throw new Error(\"Date must be in the format YYYY-MM-DD or DD-MM-YYYY\");\n }\n\n const parts = formattedDate.split(/[-/]/).map((p) => p.trim());\n\n const isYYYYMMDD = parts[0].length === 4;\n\n if (isYYYYMMDD) {\n return { day: parts[2], month: parts[1], year: parts[0] };\n } else {\n return { day: parts[0], month: parts[1], year: parts[2] };\n }\n}\n\nfunction mapDatePartsToBlocksOfTwo({\n day,\n month,\n year,\n}: {\n day: string;\n month: string;\n year: string;\n}): { day: string; month: string; year1: string; year2: string } {\n return {\n day: day.padStart(2, \"0\"),\n month: month.padStart(2, \"0\"),\n year1: year.slice(0, 2),\n year2: year.slice(2),\n };\n}\n\nfunction digitSum(n: number): number {\n let s = 0;\n\n for (const ch of String(Math.abs(n))) {\n s += ch.charCodeAt(0) - 48;\n }\n\n return s;\n}\n\nexport const MASTER_NUMBERS = [11, 22, 33, 44];\n\nexport function isMasterNumber(n: number): boolean {\n return MASTER_NUMBERS.includes(n);\n}\n\nexport function reduceToSingle(\n n: number,\n options: { preserveMasters?: boolean } = { preserveMasters: false }\n): number {\n // standard digital root with 0 allowed; never preserve masters here\n if (n === 0) {\n return 0;\n }\n\n let reduced = n;\n while (reduced > 9) {\n if (options?.preserveMasters && isMasterNumber(reduced)) {\n break;\n }\n\n reduced = digitSum(reduced);\n }\n\n // optional tweak for exact \"00\" cases will be applied by caller, not here\n return reduced;\n}\n\nexport function reduceToSingleWithSteps(\n n: number,\n options: { preserveMasters?: boolean } = { preserveMasters: false }\n): ReducedValueWithSteps {\n const steps = [n];\n\n if (n === 0) {\n return {\n reducedValue: 0,\n reductionSteps: steps,\n };\n }\n\n let reduced = n;\n\n while (reduced > 9) {\n if (options?.preserveMasters && isMasterNumber(reduced)) {\n break;\n }\n\n reduced = digitSum(reduced);\n steps.push(reduced);\n }\n\n return {\n reducedValue: reduced,\n reductionSteps: steps,\n };\n}\n\nfunction reduceBlock(block: string): number {\n const n = [...block].reduce(\n (acc, curr) => acc + (curr.charCodeAt(0) - 48),\n 0\n );\n\n if (n === 0) {\n return 0;\n }\n\n return reduceToSingle(n);\n}\n\nexport type KaabalisticLifePathResult = {\n parts: {\n day: string;\n month: string;\n year1: string;\n year2: string;\n };\n reducedParts: {\n reducedDay: number;\n reducedMonth: number;\n reducedYear1: number;\n reducedYear2: number;\n };\n syntheses: {\n dayMonthSynthesis: number;\n yearSynthesis: number;\n reducedDayMonthSynthesis: number;\n reducedYearSynthesis: number;\n finalSynthesis: number;\n };\n lifePath: number;\n /**\n * Last three syntheses\n */\n personalMythologyNumbers: number[];\n};\n\n/**\n * Calculate the Kaabalistic life path number based on a birth date.\n * Note: This method produces more master numbers and never produces life path 2s (or any life path that ends with 0 like 10, 20, 30, etc.)\n */\nexport function calculateKaabalisticLifePath(\n birthDate: Date\n): KaabalisticLifePathResult {\n const { day, month, year1, year2 } = mapDatePartsToBlocksOfTwo(\n parseDate(birthDate)\n );\n\n const reducedDay = reduceBlock(day);\n const reducedMonth = reduceBlock(month);\n const reducedYear1 = reduceBlock(year1);\n const reducedYear2 = reduceBlock(year2);\n\n const dayMonthSynthesis = parseInt(`${reducedDay}${reducedMonth}`, 10);\n const yearSynthesis = parseInt(`${reducedYear1}${reducedYear2}`, 10);\n\n const reducedDayMonthSynthesis = reduceToSingle(dayMonthSynthesis);\n const reducedYearSynthesis = reduceToSingle(yearSynthesis);\n\n const finalSynthesis = parseInt(\n `${reducedDayMonthSynthesis}${reducedYearSynthesis}`,\n 10\n );\n\n const lifePath = reduceToSingle(finalSynthesis, { preserveMasters: true });\n const isMasterLifePath = isMasterNumber(lifePath);\n\n const personalMythologyNumbers = [\n parseInt(`${dayMonthSynthesis}${yearSynthesis}`, 10),\n finalSynthesis,\n ];\n\n if (finalSynthesis !== lifePath) {\n personalMythologyNumbers.push(lifePath);\n }\n\n const reducedLifePath = reduceToSingle(lifePath);\n if (isMasterLifePath) {\n personalMythologyNumbers.push(reducedLifePath);\n }\n\n return {\n parts: { day, month, year1, year2 },\n reducedParts: { reducedDay, reducedMonth, reducedYear1, reducedYear2 },\n syntheses: {\n dayMonthSynthesis,\n yearSynthesis,\n reducedDayMonthSynthesis,\n reducedYearSynthesis,\n finalSynthesis,\n },\n lifePath,\n personalMythologyNumbers,\n };\n}\n\nexport type StraightAcrossReductionLifePathResult = {\n lifePath: number;\n reductionSteps: number[];\n};\n\n/**\n * Calculate the traditional straight across reduction life path number based on a birth date.\n */\nexport function calculateStraightAcrossReductionLifePath(\n birthDate: Date\n): StraightAcrossReductionLifePathResult {\n const { day, month, year } = parseDate(birthDate);\n\n const result = reduceToSingleWithSteps(\n parseInt(`${day}${month}${year}`, 10),\n { preserveMasters: true }\n );\n\n return {\n lifePath: result.reducedValue,\n reductionSteps: result.reductionSteps,\n };\n}\n\nexport type DateEnergies = {\n dayEnergy: ReducedValueWithSteps;\n monthEnergy: ReducedValueWithSteps;\n yearEnergy: ReducedValueWithSteps;\n};\n\nexport function getDateEnergies(birthDate: Date): DateEnergies {\n const { day, month, year1, year2 } = mapDatePartsToBlocksOfTwo(\n parseDate(birthDate)\n );\n\n const dayEnergy = reduceToSingleWithSteps(parseInt(day, 10), {\n preserveMasters: true,\n });\n const monthEnergy = reduceToSingleWithSteps(parseInt(month, 10), {\n preserveMasters: true,\n });\n const yearEnergy = reduceToSingleWithSteps(parseInt(year1 + year2, 10), {\n preserveMasters: true,\n });\n\n return {\n dayEnergy,\n monthEnergy,\n yearEnergy,\n };\n}\n\nexport type Challenges = {\n day: number;\n month: number;\n year: number;\n mainChallenge: number;\n subChallenge1: number;\n subChallenge2: number;\n};\n\nexport function calculateChallenges(birthDate: Date): Challenges {\n const { day, month, year } = parseDate(birthDate);\n\n const reducedDay = reduceToSingle(parseInt(day, 10));\n const reducedMonth = reduceToSingle(parseInt(month, 10));\n const reducedYear = reduceToSingle(parseInt(year, 10));\n\n const subChallenge1 = Math.abs(reducedMonth - reducedDay);\n const subChallenge2 = Math.abs(reducedDay - reducedYear);\n const mainChallenge = Math.abs(subChallenge1 - subChallenge2);\n\n return {\n day: reducedDay,\n month: reducedMonth,\n year: reducedYear,\n mainChallenge,\n subChallenge1,\n subChallenge2,\n };\n}\n\nexport const CYCLE_MEANINGS = [\n {\n title: \"Learning\",\n shortDescription:\n \"A period for assertive action and learning through direct experience.\",\n personalDescription:\n \"This period emphasizes assertive action and learning through direct experience. Utilize personal influence to seek favors, loans, or recognition from influential individuals such as government officials or community leaders. Ideal for enhancing personal reputation and prestige, keeping in mind that all actions carry consequences.\",\n businessDescription:\n \"Ideal for promotional activities aimed at building goodwill, public recognition, and securing endorsements from prominent individuals. Prioritize the company's image and reputation over immediate profits.\",\n astrologySign: \"Aries (Actions Have Consequences)\",\n },\n {\n title: \"Hard Work\",\n shortDescription:\n \"A time for diligent effort and adaptability to temporary changes.\",\n personalDescription:\n \"A period where diligent effort and adaptability are crucial. Suitable for temporary changes such as moving homes, short trips, or career shifts. Avoid long-term commitments or significant investments unless carefully formalized.\",\n businessDescription:\n \"Ideal for short-term experiments, temporary staffing adjustments, and forming beneficial business connections. Steer clear of verbal agreements or long-term commitments unless formally documented. Flexibility leads to progress.\",\n astrologySign: \"Taurus (Stop Being Stubborn)\",\n },\n {\n title: \"Friendship\",\n shortDescription:\n \"A dynamic phase for ambitious projects and strengthening relationships.\",\n personalDescription:\n \"A dynamic and energetic phase ideal for initiating ambitious projects requiring persistence and physical strength. Effective communication strengthens relationships, but impulsiveness should be avoided to prevent conflicts.\",\n businessDescription:\n \"Ideal for expansion, energetic ventures, and assertive promotional activities. Excellent for debt collection but avoid legal conflicts. Maintain vigilance against accidents and disputes while leveraging strong communication.\",\n astrologySign: \"Gemini (Communication is Power)\",\n },\n {\n title: \"Opportunities\",\n shortDescription:\n \"An intellectually fertile time for creativity and quick decision-making.\",\n personalDescription:\n \"An intellectually fertile phase ideal for creative projects, innovation, and quick decision-making. Beware of deception, especially concerning documents or agreements. Foster mental growth and create valuable connections, but remain cautious.\",\n businessDescription:\n \"Perfect for launching impactful marketing campaigns and securing new agreements. Excellent for promotional activities and intellectual creativity, but carefully scrutinize documents to avoid fraud.\",\n astrologySign: \"Cancer (Nurture Mental Growth)\",\n },\n {\n title: \"Tears/Decision\",\n shortDescription:\n \"The most prosperous phase for financial resolution and spiritual advancement.\",\n personalDescription:\n \"The most prosperous phase of the year, suitable for resolving financial issues, starting long journeys, and advancing spiritually. Interact with influential figures, manage debts, and engage in expansive social activities. Keep ego and selfishness balanced for optimal outcomes.\",\n businessDescription:\n \"A prime time for investments, financial growth, global promotion, debt collection, and favorable legal outcomes. Emphasize fairness and generosity to enhance business success.\",\n astrologySign: \"Leo (Balance Ego and Generosity)\",\n },\n {\n title: \"Triple Blessing\",\n shortDescription:\n \"Perfect for pleasures, social activities, and creative pursuits.\",\n personalDescription:\n \"Ideal for enjoying pleasures, social activities, artistic endeavors, and short travels. Favorable for romantic interactions, relaxation, and creative pursuits. Organize personal life to balance enjoyment and refinement effectively.\",\n businessDescription:\n \"Excellent time for promoting luxury products, arts, entertainment, and speculative investments. Ideal for forming friendly business alliances and strategic partnerships.\",\n astrologySign: \"Virgo (Organize Your Pleasures)\",\n },\n {\n title: \"Rest\",\n shortDescription:\n \"A period of rest, introspection, and preparation for renewal.\",\n personalDescription:\n \"A critical period of rest, introspection, and cautious preparation for renewal. Avoid initiating new ventures and instead focus on completing pending matters, managing legal affairs carefully, and protecting existing resources. Balance and patience are essential.\",\n businessDescription:\n \"Period to conserve resources, avoid major expansions, and carefully manage internal restructuring. Postpone significant new ventures until the next cycle. Act diplomatically and cautiously to ensure stability.\",\n astrologySign: \"Libra (Seek Balance and Reconstruction)\",\n },\n];\n\nexport interface Cycle {\n number: number;\n description: {\n title: string;\n shortDescription: string;\n personalDescription: string;\n businessDescription: string;\n astrologySign: string;\n };\n isActive?: boolean;\n cycleStart?: Date;\n}\n\nexport interface CycleInfo {\n yearlyCycles: Cycle[];\n ageCycles: Cycle[];\n monthlyCycles: Cycle[];\n currentYearlyCycle: number | null;\n currentAgeCycle: number | null;\n currentMonthlyCycle: number | null;\n daysInMonthlyCycle: number;\n totalDays: number;\n}\n\n// Add days to a date\nfunction addDays(date: Date, days: number): Date {\n const result = new Date(date);\n result.setDate(result.getDate() + days);\n return result;\n}\n\n// Find the most recent anniversary of the start date\nfunction getMostRecentStartDate(startDate: Date, today: Date): Date {\n const startMonth = startDate.getMonth();\n const startDay = startDate.getDate();\n let recentStart = new Date(today.getFullYear(), startMonth, startDay);\n if (recentStart > today) {\n recentStart = new Date(today.getFullYear() - 1, startMonth, startDay);\n }\n return recentStart;\n}\n\n// Calculate cycles (annual and monthly)\nexport function calculateCycles(startDate: Date, today: Date): CycleInfo {\n const mostRecentStart = getMostRecentStartDate(startDate, today);\n const cycleLength = 52; // Fixed cycle length for monthly cycles\n\n // Skip annual cycle calculation if start date is in the future\n const isFutureDate = startDate > today;\n let currentYearlyCycle = null;\n let currentAgeCycle = null;\n const ageCycles: Cycle[] = [];\n const yearlyCycles: Cycle[] = [];\n if (!isFutureDate) {\n const birthYear = startDate.getFullYear();\n const currentYear = today.getFullYear();\n const ageInYears = currentYear - birthYear;\n currentAgeCycle = (Math.floor(ageInYears / 7) % 7) + 1;\n for (let i = 0; i < 7; i++) {\n // cycle start for year is which year it started\n const cycleStart = new Date(\n birthYear + i * 7,\n startDate.getMonth(),\n startDate.getDate()\n );\n\n const cycle = i + 1;\n const isCurrentCycle = cycle === currentAgeCycle;\n\n if (isCurrentCycle) {\n // Calculate yearly cycles within the current age cycle\n // The yearly cycle is based on the person's exact age in years\n // For example, if someone is 6 years old, they're in the 1st age cycle (0-7 years) and the 6th yearly cycle\n const yearsSinceBirth = ageInYears;\n const yearWithinAgeCycle = yearsSinceBirth % 7; // 0-6 representing which year within the current age cycle\n currentYearlyCycle = yearWithinAgeCycle + 1; // Convert to 1-7 range\n\n for (let j = 0; j < 7; j++) {\n // Calculate the start date for each yearly cycle within the current age cycle\n const ageCycleStartYear = birthYear + Math.floor(ageInYears / 7) * 7; // Start year of current age cycle\n const yearlyCycleStart = new Date(\n ageCycleStartYear + j,\n startDate.getMonth(),\n startDate.getDate()\n );\n const yearlyCycle = j + 1;\n\n const isCurrentYearlyCycle = yearlyCycle === currentYearlyCycle;\n\n yearlyCycles.push({\n number: yearlyCycle,\n description: CYCLE_MEANINGS[j],\n isActive: isCurrentYearlyCycle,\n cycleStart: yearlyCycleStart,\n });\n }\n }\n\n ageCycles.push({\n number: cycle,\n description: CYCLE_MEANINGS[i],\n isActive: isCurrentCycle,\n cycleStart,\n });\n }\n }\n\n // Monthly cycles (relative to start date)\n const monthlyCycles: Cycle[] = [];\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n\n monthlyCycles.push({\n number: i + 1,\n description: CYCLE_MEANINGS[i],\n isActive: false,\n cycleStart: cycleStart,\n });\n }\n\n // Find current monthly cycle\n let currentMonthlyCycle = null;\n let daysInMonthlyCycle = 0;\n for (let i = 0; i < 7; i++) {\n const cycleStart = addDays(mostRecentStart, i * cycleLength);\n const nextCycleStart =\n i < 6\n ? addDays(mostRecentStart, (i + 1) * cycleLength)\n : addDays(mostRecentStart, 366);\n if (today >= cycleStart && today < nextCycleStart) {\n currentMonthlyCycle = i + 1;\n daysInMonthlyCycle =\n Math.floor(\n (today.getTime() - cycleStart.getTime()) / (1000 * 60 * 60 * 24)\n ) + 1;\n monthlyCycles[i].isActive = true;\n break;\n }\n }\n\n const totalDays =\n Math.floor(\n (today.getTime() - mostRecentStart.getTime()) / (1000 * 60 * 60 * 24)\n ) + 1;\n\n return {\n yearlyCycles,\n ageCycles,\n monthlyCycles,\n currentYearlyCycle,\n currentAgeCycle,\n currentMonthlyCycle,\n daysInMonthlyCycle,\n totalDays,\n };\n}\n\nfunction calculateAge(birthDate: Date, today: Date = new Date()): number {\n return today.getFullYear() - birthDate.getFullYear();\n}\n\nexport type FibonacciCycle = {\n currentAge: number;\n cycle1: ReducedValueWithSteps;\n cycle2: ReducedValueWithSteps;\n cycle3: ReducedValueWithSteps;\n cycle4: ReducedValueWithSteps;\n cycle5: ReducedValueWithSteps;\n cycle6: ReducedValueWithSteps;\n cycle7: ReducedValueWithSteps;\n};\n\nexport function calculateFibonacciCycle(\n birthDate: Date,\n today: Date\n): FibonacciCycle {\n const currentAge = calculateAge(birthDate, today);\n\n const cycle1 = reduceToSingleWithSteps(currentAge);\n const cycle2 = reduceToSingleWithSteps(cycle1.reducedValue + 2);\n const cycle3 = reduceToSingleWithSteps(\n cycle1.reducedValue + cycle2.reductionSteps[0]\n );\n const cycle4 = reduceToSingleWithSteps(\n cycle2.reductionSteps[0] + cycle3.reductionSteps[0]\n );\n const cycle5 = reduceToSingleWithSteps(\n cycle3.reductionSteps[0] + cycle4.reductionSteps[0]\n );\n const cycle6 = reduceToSingleWithSteps(\n cycle4.reductionSteps[0] + cycle5.reductionSteps[0]\n );\n const cycle7 = reduceToSingleWithSteps(\n cycle5.reductionSteps[0] + cycle6.reductionSteps[0]\n );\n\n return {\n currentAge,\n cycle1,\n cycle2,\n cycle3,\n cycle4,\n cycle5,\n cycle6,\n cycle7,\n };\n}\n\nexport type PersonalPeriod = {\n startMonth: number;\n endMonth: number;\n value: ReducedValueWithSteps;\n};\n\nexport type PersonalMonth = {\n month: number;\n value: ReducedValueWithSteps;\n};\n\nexport type PersonalCycles = {\n personalYear: ReducedValueWithSteps;\n personalPeriods: [PersonalPeriod, PersonalPeriod, PersonalPeriod];\n personalMonths: [\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth,\n PersonalMonth\n ];\n currentPersonalPeriod: number;\n currentPersonalMonth: number;\n currentAge: number;\n lifePath: number;\n soulNumber?: ReducedValueWithSteps;\n yearUsedOnCalculations: number;\n};\n\nfunction calculateSoulNumber(firstName: string): ReducedValueWithSteps {\n const vowels = calculateGematria(firstName).vowels;\n\n return {\n reducedValue: vowels.finalValue,\n reductionSteps: vowels.reductionSteps,\n }\n}\n\n/**\n * This function wraps the month number to a 1-12 range.\n */\nfunction wrapMonth(month: number): number {\n const wrappedMonth = (((month - 1) % 12) + 12) % 12;\n\n return wrappedMonth + 1;\n}\n\n/**\n * Returns the year of the most recent birthday relative to today.\n */\nfunction getLastBirthdayYear(birthDate: Date, today: Date): number {\n const thisYearsBirthday = new Date(\n today.getFullYear(),\n birthDate.getMonth(),\n birthDate.getDate()\n );\n\n return today >= thisYearsBirthday\n ? today.getFullYear()\n : today.getFullYear() - 1;\n}\n\nexport function calculatePersonalYear(\n birthDate: Date,\n today: Date = new Date()\n): ReducedValueWithSteps {\n const { day, month } = parseDate(birthDate);\n const yearToUse = getLastBirthdayYear(birthDate, today);\n\n return reduceToSingleWithSteps(\n parseInt(day, 10) + parseInt(month, 10) + yearToUse,\n { preserveMasters: true }\n );\n}\n\nexport function calculatePersonalPeriods(\n birthDate: Date,\n yearToUse: number,\n lifePath: number,\n soulNumber: number,\n currentAge: number\n): [PersonalPeriod, PersonalPeriod, PersonalPeriod] {\n const { month } = parseDate(birthDate);\n const birthMonth = parseInt(month, 10);\n\n const periods: [PersonalPeriod, PersonalPeriod, PersonalPeriod] = [\n {\n startMonth: wrapMonth(birthMonth + 0),\n endMonth: wrapMonth(birthMonth + 3),\n value: reduceToSingleWithSteps(yearToUse + currentAge, {\n preserveMasters: true,\n }),\n },\n {\n startMonth: wrapMonth(birthMonth + 4),\n endMonth: wrapMonth(birthMonth + 7),\n value: reduceToSingleWithSteps(yearToUse + lifePath, {\n preserveMasters: true,\n }),\n },\n {\n startMonth: wrapMonth(birthMonth + 8),\n endMonth: wrapMonth(birthMonth + 11),\n value: reduceToSingleWithSteps(yearToUse + soulNumber, {\n preserveMasters: true,\n }),\n },\n ];\n\n return periods;\n}\n\nfunction diffInPersonalMonths(birthDate: Date, today: Date): number {\n const lastYear = getLastBirthdayYear(birthDate, today);\n const base = new Date(lastYear, birthDate.getMonth(), birthDate.getDate());\n\n let k =\n (today.getFullYear() - base.getFullYear()) * 12 +\n (today.getMonth() - base.getMonth());\n\n // Only advance to the next personal month on the birth *day* each month\n if (today.getDate() < birthDate.getDate()) {\n k -= 1;\n }\n\n if (k < 0) k = 0;\n if (k > 12) k = 12; \n\n return k;\n}\n\nexport function calculatePersonalMonths(\n birthDate: Date,\n personalYear: ReducedValueWithSteps,\n today: Date\n): {\n personalMonths: PersonalCycles[\"personalMonths\"];\n currentPersonalMonthIndex: number;\n} {\n const { month } = parseDate(birthDate);\n const firstPersonalMonth = parseInt(month, 10);\n\n const personalMonths: PersonalMonth[] = [];\n for (let i = 0; i < 12; i++) {\n const m = wrapMonth(firstPersonalMonth + i);\n const value = reduceToSingleWithSteps(personalYear.reducedValue + m, {\n preserveMasters: true,\n });\n personalMonths.push({ month: m, value });\n }\n\n const currentPersonalMonthIndex = diffInPersonalMonths(birthDate, today);\n\n return {\n personalMonths: personalMonths as PersonalCycles[\"personalMonths\"],\n currentPersonalMonthIndex,\n };\n}\n\nexport function calculatePersonalCycles(\n birthDate: Date,\n today: Date = new Date(),\n firstName: string\n): PersonalCycles {\n const yearToUse = getLastBirthdayYear(birthDate, today);\n\n const personalYear = calculatePersonalYear(birthDate, today);\n\n const currentAge = calculateAge(\n birthDate,\n new Date(yearToUse, today.getMonth(), today.getDate())\n );\n const { lifePath } = calculateKaabalisticLifePath(birthDate);\n const soulNumber = calculateSoulNumber(firstName);\n\n const personalPeriods =\n calculatePersonalPeriods(birthDate, yearToUse, lifePath, soulNumber.reducedValue, currentAge);\n\n const {\n personalMonths,\n currentPersonalMonthIndex: currentPersonalMonth,\n } = calculatePersonalMonths(birthDate, personalYear, today);\n \n // Derive the period from the month index (0–12). Clamp 12 to last period.\n const currentPersonalPeriod = Math.floor(Math.min(currentPersonalMonth, 11) / 4);\n\n return {\n currentAge,\n lifePath,\n soulNumber,\n personalYear,\n personalPeriods,\n personalMonths,\n currentPersonalPeriod,\n currentPersonalMonth,\n yearUsedOnCalculations: yearToUse,\n };\n}\n"]}
|
|
@@ -3048,6 +3048,8 @@ var Planet = /* @__PURE__ */ ((Planet2) => {
|
|
|
3048
3048
|
Planet2[Planet2["PLUTO"] = 9] = "PLUTO";
|
|
3049
3049
|
Planet2[Planet2["MEAN_NODE"] = 10] = "MEAN_NODE";
|
|
3050
3050
|
Planet2[Planet2["TRUE_NODE"] = 11] = "TRUE_NODE";
|
|
3051
|
+
Planet2[Planet2["LILITH_MEAN"] = 12] = "LILITH_MEAN";
|
|
3052
|
+
Planet2[Planet2["LILITH_TRUE"] = 13] = "LILITH_TRUE";
|
|
3051
3053
|
Planet2[Planet2["CHIRON"] = 15] = "CHIRON";
|
|
3052
3054
|
return Planet2;
|
|
3053
3055
|
})(Planet || {});
|
|
@@ -3066,13 +3068,25 @@ var HouseSystem = /* @__PURE__ */ ((HouseSystem2) => {
|
|
|
3066
3068
|
return HouseSystem2;
|
|
3067
3069
|
})(HouseSystem || {});
|
|
3068
3070
|
var CalcFlag = /* @__PURE__ */ ((CalcFlag2) => {
|
|
3071
|
+
CalcFlag2[CalcFlag2["JPL_EPH"] = 1] = "JPL_EPH";
|
|
3069
3072
|
CalcFlag2[CalcFlag2["SWISS_EPH"] = 2] = "SWISS_EPH";
|
|
3070
3073
|
CalcFlag2[CalcFlag2["MOSHIER"] = 4] = "MOSHIER";
|
|
3071
3074
|
CalcFlag2[CalcFlag2["HELIOCENTRIC"] = 8] = "HELIOCENTRIC";
|
|
3072
3075
|
CalcFlag2[CalcFlag2["TRUE_POS"] = 16] = "TRUE_POS";
|
|
3073
|
-
CalcFlag2[CalcFlag2["
|
|
3076
|
+
CalcFlag2[CalcFlag2["J2000"] = 32] = "J2000";
|
|
3077
|
+
CalcFlag2[CalcFlag2["NONUT"] = 64] = "NONUT";
|
|
3078
|
+
CalcFlag2[CalcFlag2["SPEED3"] = 128] = "SPEED3";
|
|
3079
|
+
CalcFlag2[CalcFlag2["SPEED"] = 256] = "SPEED";
|
|
3080
|
+
CalcFlag2[CalcFlag2["EQUATORIAL"] = 2048] = "EQUATORIAL";
|
|
3081
|
+
CalcFlag2[CalcFlag2["TOPOCTR"] = 32768] = "TOPOCTR";
|
|
3082
|
+
CalcFlag2[CalcFlag2["SIDEREAL"] = 65536] = "SIDEREAL";
|
|
3074
3083
|
return CalcFlag2;
|
|
3075
3084
|
})(CalcFlag || {});
|
|
3085
|
+
var SE_AST_OFFSET = 1e4;
|
|
3086
|
+
var BODY = {
|
|
3087
|
+
MEAN_APOGEE: 12,
|
|
3088
|
+
// Lilith mean
|
|
3089
|
+
OSC_APOGEE: 13};
|
|
3076
3090
|
var SwissEph = class {
|
|
3077
3091
|
/**
|
|
3078
3092
|
* Constructor that accepts a pre-initialized Swiss Ephemeris module
|
|
@@ -3084,13 +3098,17 @@ var SwissEph = class {
|
|
|
3084
3098
|
this.swe_house_pos = null;
|
|
3085
3099
|
this.swe_set_ephe_path = null;
|
|
3086
3100
|
this.swe_close = null;
|
|
3101
|
+
this.swe_set_topo = null;
|
|
3102
|
+
this.swe_set_sid_mode = null;
|
|
3087
3103
|
this.module = module;
|
|
3088
3104
|
this.swe_julday = this.module.cwrap("swe_julday", "number", ["number", "number", "number", "number", "number"]);
|
|
3089
3105
|
this.swe_calc_ut = this.module.cwrap("swe_calc_ut", "number", ["number", "number", "number", "number"]);
|
|
3090
|
-
this.swe_houses = this.module.cwrap("swe_houses", "number", ["number", "number", "number", "
|
|
3106
|
+
this.swe_houses = this.module.cwrap("swe_houses", "number", ["number", "number", "number", "number", "number", "number"]);
|
|
3091
3107
|
this.swe_house_pos = this.module.cwrap("swe_house_pos", "number", ["number", "number", "number", "string", "number", "number"]);
|
|
3092
3108
|
this.swe_set_ephe_path = this.module.cwrap("swe_set_ephe_path", null, ["number"]);
|
|
3093
3109
|
this.swe_close = this.module.cwrap("swe_close", null, []);
|
|
3110
|
+
this.swe_set_topo = this.module.cwrap("swe_set_topo", null, ["number", "number", "number"]);
|
|
3111
|
+
this.swe_set_sid_mode = this.module.cwrap("swe_set_sid_mode", null, ["number", "number", "number"]);
|
|
3094
3112
|
}
|
|
3095
3113
|
checkInitialized() {
|
|
3096
3114
|
if (!this.module) {
|
|
@@ -3149,7 +3167,7 @@ var SwissEph = class {
|
|
|
3149
3167
|
latitude: this.module.getValue(resultPtr + 8, "double"),
|
|
3150
3168
|
distance: this.module.getValue(resultPtr + 16, "double")
|
|
3151
3169
|
};
|
|
3152
|
-
if (flags &
|
|
3170
|
+
if (flags & 256 /* SPEED */) {
|
|
3153
3171
|
position.longitudeSpeed = this.module.getValue(resultPtr + 24, "double");
|
|
3154
3172
|
position.latitudeSpeed = this.module.getValue(resultPtr + 32, "double");
|
|
3155
3173
|
position.distanceSpeed = this.module.getValue(resultPtr + 40, "double");
|
|
@@ -3181,7 +3199,8 @@ var SwissEph = class {
|
|
|
3181
3199
|
const housesPtr = memoryPtr;
|
|
3182
3200
|
const ascmcPtr = memoryPtr + 12 * 8;
|
|
3183
3201
|
try {
|
|
3184
|
-
const
|
|
3202
|
+
const hsysCode = hsys.charCodeAt(0);
|
|
3203
|
+
const ret = this.swe_houses(julday, latitude, longitude, hsysCode, housesPtr, ascmcPtr);
|
|
3185
3204
|
if (ret < 0) {
|
|
3186
3205
|
throw new Error(`Houses calculation failed with error code ${ret}`);
|
|
3187
3206
|
}
|
|
@@ -3190,9 +3209,27 @@ var SwissEph = class {
|
|
|
3190
3209
|
const value = this.module.getValue(housesPtr + i * 8, "double");
|
|
3191
3210
|
houses.push(value);
|
|
3192
3211
|
}
|
|
3193
|
-
const ascendant = this.module.getValue(ascmcPtr, "double");
|
|
3212
|
+
const ascendant = this.module.getValue(ascmcPtr + 0, "double");
|
|
3194
3213
|
const mc = this.module.getValue(ascmcPtr + 8, "double");
|
|
3195
|
-
|
|
3214
|
+
const armc = this.module.getValue(ascmcPtr + 16, "double");
|
|
3215
|
+
const vertex = this.module.getValue(ascmcPtr + 24, "double");
|
|
3216
|
+
const equasc = this.module.getValue(ascmcPtr + 32, "double");
|
|
3217
|
+
const coasc1 = this.module.getValue(ascmcPtr + 40, "double");
|
|
3218
|
+
const coasc2 = this.module.getValue(ascmcPtr + 48, "double");
|
|
3219
|
+
const polasc = this.module.getValue(ascmcPtr + 56, "double");
|
|
3220
|
+
return {
|
|
3221
|
+
ascendant,
|
|
3222
|
+
mc,
|
|
3223
|
+
houses,
|
|
3224
|
+
ascmc: {
|
|
3225
|
+
armc,
|
|
3226
|
+
vertex,
|
|
3227
|
+
equasc,
|
|
3228
|
+
coasc1,
|
|
3229
|
+
coasc2,
|
|
3230
|
+
polasc
|
|
3231
|
+
}
|
|
3232
|
+
};
|
|
3196
3233
|
} finally {
|
|
3197
3234
|
this.module._free(memoryPtr);
|
|
3198
3235
|
}
|
|
@@ -3206,10 +3243,42 @@ var SwissEph = class {
|
|
|
3206
3243
|
this.swe_close();
|
|
3207
3244
|
}
|
|
3208
3245
|
}
|
|
3246
|
+
/**
|
|
3247
|
+
* Set topocentric observer
|
|
3248
|
+
*/
|
|
3249
|
+
setTopocentric(longitude, latitude, altitudeMeters = 0) {
|
|
3250
|
+
this.checkInitialized();
|
|
3251
|
+
if (!this.swe_set_topo) {
|
|
3252
|
+
throw new Error("Topocentric calculation function not available");
|
|
3253
|
+
}
|
|
3254
|
+
this.swe_set_topo(longitude, latitude, altitudeMeters);
|
|
3255
|
+
}
|
|
3256
|
+
/**
|
|
3257
|
+
* Set sidereal mode
|
|
3258
|
+
* Ex.: mode=1 (Lahiri). See Swiss Ephemeris mode table.
|
|
3259
|
+
*/
|
|
3260
|
+
setSiderealMode(mode, t0 = 0, ayan_t0 = 0) {
|
|
3261
|
+
this.checkInitialized();
|
|
3262
|
+
this.swe_set_sid_mode?.(mode, t0, ayan_t0);
|
|
3263
|
+
}
|
|
3264
|
+
/**
|
|
3265
|
+
* Asteroid by MPC number
|
|
3266
|
+
*/
|
|
3267
|
+
calculateAsteroidPosition(julday, mpcNumber, flags = 2 /* SWISS_EPH */) {
|
|
3268
|
+
return this.calculatePlanetPosition(julday, SE_AST_OFFSET + mpcNumber, flags);
|
|
3269
|
+
}
|
|
3270
|
+
/**
|
|
3271
|
+
* Lilith mean (12) and true (13)
|
|
3272
|
+
*/
|
|
3273
|
+
calculateLilith(julday, kind = "mean", flags = 2 /* SWISS_EPH */) {
|
|
3274
|
+
const id = kind === "mean" ? BODY.MEAN_APOGEE : BODY.OSC_APOGEE;
|
|
3275
|
+
return this.calculatePlanetPosition(julday, id, flags);
|
|
3276
|
+
}
|
|
3209
3277
|
};
|
|
3210
3278
|
|
|
3211
3279
|
// src/astrology/swisseph.ts
|
|
3212
3280
|
var swissEph = null;
|
|
3281
|
+
var DEFAULT_FLAGS = 2 /* SWISS_EPH */ | 256 /* SPEED */;
|
|
3213
3282
|
async function getSwissEph(options = {}) {
|
|
3214
3283
|
if (swissEph) {
|
|
3215
3284
|
return;
|
|
@@ -3234,6 +3303,7 @@ async function calculatePlanetaryPositions(date) {
|
|
|
3234
3303
|
try {
|
|
3235
3304
|
checkInitialization();
|
|
3236
3305
|
const julday = swissEph.getJulianDay(date);
|
|
3306
|
+
const flags = DEFAULT_FLAGS;
|
|
3237
3307
|
const planets = {
|
|
3238
3308
|
sun: 0 /* SUN */,
|
|
3239
3309
|
moon: 1 /* MOON */,
|
|
@@ -3241,12 +3311,21 @@ async function calculatePlanetaryPositions(date) {
|
|
|
3241
3311
|
venus: 3 /* VENUS */,
|
|
3242
3312
|
mars: 4 /* MARS */,
|
|
3243
3313
|
jupiter: 5 /* JUPITER */,
|
|
3244
|
-
saturn: 6 /* SATURN
|
|
3314
|
+
saturn: 6 /* SATURN */,
|
|
3315
|
+
uranus: 7 /* URANUS */,
|
|
3316
|
+
neptune: 8 /* NEPTUNE */,
|
|
3317
|
+
pluto: 9 /* PLUTO */,
|
|
3318
|
+
meanNode: 10 /* MEAN_NODE */,
|
|
3319
|
+
trueNode: 11 /* TRUE_NODE */,
|
|
3320
|
+
// TODO: add chiron through seas_18.se1, seas_18.se2 and seasnam.txt files
|
|
3321
|
+
// chiron: Planet.CHIRON,
|
|
3322
|
+
lilithMean: 12 /* LILITH_MEAN */,
|
|
3323
|
+
lilithTrue: 13 /* LILITH_TRUE */
|
|
3245
3324
|
};
|
|
3246
3325
|
const positions = {};
|
|
3247
3326
|
for (const [name, id] of Object.entries(planets)) {
|
|
3248
3327
|
try {
|
|
3249
|
-
positions[name] = swissEph.calculatePlanetPosition(julday, id);
|
|
3328
|
+
positions[name] = swissEph.calculatePlanetPosition(julday, id, flags);
|
|
3250
3329
|
} catch (error) {
|
|
3251
3330
|
throw new Error(`Failed to calculate position for ${name}: ${error}`);
|
|
3252
3331
|
}
|
|
@@ -3358,5 +3437,5 @@ function getZodiacPosition(longitude) {
|
|
|
3358
3437
|
}
|
|
3359
3438
|
|
|
3360
3439
|
export { CalcFlag, HouseSystem, Planet, closeSwissEph, formatDegreeMinutes, getBirthChart, getSwissEph, getZodiacPosition };
|
|
3361
|
-
//# sourceMappingURL=chunk-
|
|
3362
|
-
//# sourceMappingURL=chunk-
|
|
3440
|
+
//# sourceMappingURL=chunk-O2LE2NXP.mjs.map
|
|
3441
|
+
//# sourceMappingURL=chunk-O2LE2NXP.mjs.map
|