thoth-cli 0.2.23 → 0.2.27

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.
@@ -534,6 +534,170 @@ async function tarotSpreads() {
534
534
  return execute("tarot-spreads", []);
535
535
  }
536
536
 
537
+ // src/lib/numerology.ts
538
+ var MASTER_NUMBERS = [11, 22, 33];
539
+ var LETTER_VALUES = {
540
+ A: 1,
541
+ B: 2,
542
+ C: 3,
543
+ D: 4,
544
+ E: 5,
545
+ F: 6,
546
+ G: 7,
547
+ H: 8,
548
+ I: 9,
549
+ J: 1,
550
+ K: 2,
551
+ L: 3,
552
+ M: 4,
553
+ N: 5,
554
+ O: 6,
555
+ P: 7,
556
+ Q: 8,
557
+ R: 9,
558
+ S: 1,
559
+ T: 2,
560
+ U: 3,
561
+ V: 4,
562
+ W: 5,
563
+ X: 6,
564
+ Y: 7,
565
+ Z: 8
566
+ };
567
+ var VOWELS = /* @__PURE__ */ new Set(["A", "E", "I", "O", "U"]);
568
+ function reduceToSingleDigit(n, keepMasters = true) {
569
+ while (n > 9) {
570
+ if (keepMasters && MASTER_NUMBERS.includes(n)) break;
571
+ n = String(n).split("").reduce((sum, d) => sum + Number(d), 0);
572
+ }
573
+ return n;
574
+ }
575
+ function sumDigits(n) {
576
+ return String(n).split("").reduce((sum, d) => sum + Number(d), 0);
577
+ }
578
+ function analyzeLetters(name) {
579
+ const breakdown = [];
580
+ const upper = name.toUpperCase();
581
+ for (const ch of upper) {
582
+ const val = LETTER_VALUES[ch];
583
+ if (val !== void 0) {
584
+ breakdown.push({
585
+ letter: ch,
586
+ value: val,
587
+ type: VOWELS.has(ch) ? "vowel" : "consonant"
588
+ });
589
+ }
590
+ }
591
+ return breakdown;
592
+ }
593
+ function formatSteps(letters, filter) {
594
+ const filtered = filter ? letters.filter((l) => l.type === filter) : letters;
595
+ const parts = filtered.map((l) => `${l.letter}=${l.value}`);
596
+ const sum = filtered.reduce((s, l) => s + l.value, 0);
597
+ const reduced = reduceToSingleDigit(sum);
598
+ if (sum === reduced) {
599
+ return `${parts.join(" + ")} = ${sum}`;
600
+ }
601
+ return `${parts.join(" + ")} = ${sum} \u2192 ${reduced}`;
602
+ }
603
+ function calculateNameNumerology(name) {
604
+ const letters = analyzeLetters(name);
605
+ const vowels = letters.filter((l) => l.type === "vowel");
606
+ const consonants = letters.filter((l) => l.type === "consonant");
607
+ const expressionSum = letters.reduce((s, l) => s + l.value, 0);
608
+ const soulSum = vowels.reduce((s, l) => s + l.value, 0);
609
+ const personalitySum = consonants.reduce((s, l) => s + l.value, 0);
610
+ return {
611
+ name,
612
+ letters,
613
+ expression: {
614
+ sum: expressionSum,
615
+ reduced: reduceToSingleDigit(expressionSum),
616
+ steps: formatSteps(letters)
617
+ },
618
+ soul_urge: {
619
+ sum: soulSum,
620
+ reduced: reduceToSingleDigit(soulSum),
621
+ steps: formatSteps(letters, "vowel")
622
+ },
623
+ personality: {
624
+ sum: personalitySum,
625
+ reduced: reduceToSingleDigit(personalitySum),
626
+ steps: formatSteps(letters, "consonant")
627
+ }
628
+ };
629
+ }
630
+ function calculateLifePath(year, month, day) {
631
+ const mReduced = reduceToSingleDigit(month);
632
+ const dReduced = reduceToSingleDigit(day);
633
+ const yReduced = reduceToSingleDigit(sumDigits(year));
634
+ const total = mReduced + dReduced + yReduced;
635
+ const lifePath = reduceToSingleDigit(total);
636
+ const steps = `Month: ${month} \u2192 ${mReduced}, Day: ${day} \u2192 ${dReduced}, Year: ${year} \u2192 ${yReduced} | ${mReduced} + ${dReduced} + ${yReduced} = ${total}` + (total !== lifePath ? ` \u2192 ${lifePath}` : "");
637
+ return {
638
+ date: `${year}-${String(month).padStart(2, "0")}-${String(day).padStart(2, "0")}`,
639
+ month: { value: month, reduced: mReduced },
640
+ day: { value: day, reduced: dReduced },
641
+ year: { value: year, reduced: yReduced },
642
+ life_path: lifePath,
643
+ steps
644
+ };
645
+ }
646
+ function calculateNumerology(options) {
647
+ const result = {};
648
+ if (options.name) {
649
+ result.name_analysis = calculateNameNumerology(options.name);
650
+ }
651
+ if (options.date) {
652
+ const [year, month, day] = options.date.split("-").map(Number);
653
+ if (year && month && day) {
654
+ result.life_path = calculateLifePath(year, month, day);
655
+ }
656
+ }
657
+ return result;
658
+ }
659
+ function calculatePersonalCycle(birthDate, targetDate) {
660
+ const [bYear, bMonth, bDay] = birthDate.split("-").map(Number);
661
+ const now = targetDate ? targetDate.split("-").map(Number) : (() => {
662
+ const d = /* @__PURE__ */ new Date();
663
+ return [d.getFullYear(), d.getMonth() + 1, d.getDate()];
664
+ })();
665
+ const [tYear, tMonth, tDay] = now;
666
+ const pySum = reduceToSingleDigit(bMonth) + reduceToSingleDigit(bDay) + reduceToSingleDigit(sumDigits(tYear));
667
+ const personalYear = reduceToSingleDigit(pySum);
668
+ const pySteps = `Birth Month (${bMonth}) + Birth Day (${bDay}) + Year (${tYear}) \u2192 ${reduceToSingleDigit(bMonth)} + ${reduceToSingleDigit(bDay)} + ${reduceToSingleDigit(sumDigits(tYear))} = ${pySum}` + (pySum !== personalYear ? ` \u2192 ${personalYear}` : "");
669
+ const pmSum = personalYear + reduceToSingleDigit(tMonth);
670
+ const personalMonth = reduceToSingleDigit(pmSum);
671
+ const pmSteps = `Personal Year (${personalYear}) + Month (${tMonth}) \u2192 ${personalYear} + ${reduceToSingleDigit(tMonth)} = ${pmSum}` + (pmSum !== personalMonth ? ` \u2192 ${personalMonth}` : "");
672
+ const pdSum = personalMonth + reduceToSingleDigit(tDay);
673
+ const personalDay = reduceToSingleDigit(pdSum);
674
+ const pdSteps = `Personal Month (${personalMonth}) + Day (${tDay}) \u2192 ${personalMonth} + ${reduceToSingleDigit(tDay)} = ${pdSum}` + (pdSum !== personalDay ? ` \u2192 ${personalDay}` : "");
675
+ return {
676
+ birth_date: birthDate,
677
+ target_date: `${tYear}-${String(tMonth).padStart(2, "0")}-${String(tDay).padStart(2, "0")}`,
678
+ personal_year: { value: personalYear, steps: pySteps },
679
+ personal_month: { value: personalMonth, steps: pmSteps },
680
+ personal_day: { value: personalDay, steps: pdSteps }
681
+ };
682
+ }
683
+ function getNumberMeaning(n) {
684
+ const meanings = {
685
+ 1: "The Leader \u2014 Independence, originality, ambition, drive",
686
+ 2: "The Mediator \u2014 Cooperation, sensitivity, balance, diplomacy",
687
+ 3: "The Communicator \u2014 Expression, creativity, joy, inspiration",
688
+ 4: "The Builder \u2014 Stability, discipline, hard work, foundation",
689
+ 5: "The Adventurer \u2014 Freedom, change, versatility, experience",
690
+ 6: "The Nurturer \u2014 Responsibility, love, harmony, service",
691
+ 7: "The Seeker \u2014 Spirituality, analysis, wisdom, introspection",
692
+ 8: "The Powerhouse \u2014 Authority, abundance, karma, manifestation",
693
+ 9: "The Humanitarian \u2014 Compassion, completion, universal love",
694
+ 11: "Master Illuminator \u2014 Intuition, spiritual insight, visionary",
695
+ 22: "Master Builder \u2014 Practical idealism, large-scale creation",
696
+ 33: "Master Teacher \u2014 Selfless service, spiritual upliftment"
697
+ };
698
+ return meanings[n] || "";
699
+ }
700
+
537
701
  // src/lib/format.ts
538
702
  import chalk from "chalk";
539
703
  var COLORS = {
@@ -1606,6 +1770,578 @@ function formatTarotSpreads(result) {
1606
1770
  }
1607
1771
  return lines.join("\n");
1608
1772
  }
1773
+ var GEMATRIA_COLORS = {
1774
+ hebrew: chalk.hex("#4169E1"),
1775
+ // Blue - Chesed
1776
+ greek: chalk.hex("#00FF7F"),
1777
+ // Green
1778
+ english: chalk.hex("#FFD700"),
1779
+ // Gold
1780
+ value: chalk.bold.white,
1781
+ dim: chalk.dim,
1782
+ header: chalk.bold.hex("#9932CC")
1783
+ };
1784
+ function formatGematria(result) {
1785
+ const lines = [];
1786
+ lines.push("");
1787
+ lines.push(GEMATRIA_COLORS.header(" GEMATRIA"));
1788
+ lines.push(` ${chalk.dim("Text:")} ${chalk.white(result.text)}`);
1789
+ if (result.transliteration) {
1790
+ lines.push(` ${chalk.dim("Hebrew:")} ${GEMATRIA_COLORS.hebrew(result.transliteration)} ${chalk.dim("(transliterated)")}`);
1791
+ }
1792
+ lines.push("");
1793
+ lines.push(chalk.bold.cyan("\u2500\u2500 VALUES \u2500\u2500"));
1794
+ const hebrew = result.systems.filter((s) => s.key.startsWith("hebrew"));
1795
+ const greek = result.systems.filter((s) => s.key.startsWith("greek"));
1796
+ const english = result.systems.filter((s) => s.key.startsWith("english"));
1797
+ if (hebrew.length > 0) {
1798
+ lines.push(` ${GEMATRIA_COLORS.hebrew("Hebrew")}`);
1799
+ for (const sys of hebrew) {
1800
+ const label = sys.name.replace("Hebrew ", "");
1801
+ lines.push(` ${chalk.dim(label.padEnd(12))} ${GEMATRIA_COLORS.value(String(sys.value))}`);
1802
+ }
1803
+ }
1804
+ if (greek.length > 0) {
1805
+ lines.push(` ${GEMATRIA_COLORS.greek("Greek")}`);
1806
+ for (const sys of greek) {
1807
+ const label = sys.name.replace("Greek ", "");
1808
+ lines.push(` ${chalk.dim(label.padEnd(12))} ${GEMATRIA_COLORS.value(String(sys.value))}`);
1809
+ }
1810
+ }
1811
+ if (english.length > 0) {
1812
+ lines.push(` ${GEMATRIA_COLORS.english("English")}`);
1813
+ for (const sys of english) {
1814
+ const label = sys.name.replace("English ", "");
1815
+ lines.push(` ${chalk.dim(label.padEnd(12))} ${GEMATRIA_COLORS.value(String(sys.value))}`);
1816
+ }
1817
+ }
1818
+ if (result.notable.length > 0) {
1819
+ lines.push("");
1820
+ lines.push(chalk.bold.cyan("\u2500\u2500 NOTABLE MATCHES \u2500\u2500"));
1821
+ for (const n of result.notable) {
1822
+ lines.push(` ${chalk.bold.white(String(n.value))}`);
1823
+ for (const m of n.matches) {
1824
+ lines.push(` ${chalk.dim(m.word)} ${m.transliteration} \u2014 ${chalk.italic(m.meaning)}`);
1825
+ }
1826
+ }
1827
+ }
1828
+ lines.push("");
1829
+ return lines.join("\n");
1830
+ }
1831
+ function formatGematriaCompare(result) {
1832
+ const lines = [];
1833
+ lines.push("");
1834
+ lines.push(GEMATRIA_COLORS.header(" GEMATRIA \u2014 COMPARISON"));
1835
+ lines.push("");
1836
+ lines.push(chalk.bold.cyan("\u2500\u2500 VALUES \u2500\u2500"));
1837
+ const maxWidth = 14;
1838
+ lines.push(` ${"System".padEnd(18)} ${chalk.white(result.text1.text.padEnd(maxWidth))} ${chalk.white(result.text2.text.padEnd(maxWidth))} ${"Match"}`);
1839
+ lines.push(chalk.dim(" " + "\u2500".repeat(18 + maxWidth * 2 + 10)));
1840
+ const t2Map = /* @__PURE__ */ new Map();
1841
+ for (const s of result.text2.systems) {
1842
+ t2Map.set(s.key, s.value);
1843
+ }
1844
+ for (const s1 of result.text1.systems) {
1845
+ const v2 = t2Map.get(s1.key);
1846
+ const match = v2 !== void 0 && v2 === s1.value && s1.value > 0 ? chalk.green(" =") : "";
1847
+ const v2Str = v2 !== void 0 ? String(v2) : "-";
1848
+ lines.push(` ${chalk.dim(s1.name.padEnd(18))} ${String(s1.value).padEnd(maxWidth)} ${v2Str.padEnd(maxWidth)} ${match}`);
1849
+ }
1850
+ if (result.shared_values.length > 0) {
1851
+ lines.push("");
1852
+ lines.push(chalk.bold.cyan("\u2500\u2500 SHARED VALUES \u2500\u2500"));
1853
+ for (const sv of result.shared_values) {
1854
+ lines.push(` ${chalk.green("=")} ${sv.system}: ${chalk.bold.white(String(sv.value))}`);
1855
+ }
1856
+ }
1857
+ const allNotable = [...result.text1.notable, ...result.text2.notable];
1858
+ const seen = /* @__PURE__ */ new Set();
1859
+ const unique = allNotable.filter((n) => {
1860
+ if (seen.has(n.value)) return false;
1861
+ seen.add(n.value);
1862
+ return true;
1863
+ });
1864
+ if (unique.length > 0) {
1865
+ lines.push("");
1866
+ lines.push(chalk.bold.cyan("\u2500\u2500 NOTABLE MATCHES \u2500\u2500"));
1867
+ for (const n of unique) {
1868
+ lines.push(` ${chalk.bold.white(String(n.value))}`);
1869
+ for (const m of n.matches) {
1870
+ lines.push(` ${chalk.dim(m.word)} ${m.transliteration} \u2014 ${chalk.italic(m.meaning)}`);
1871
+ }
1872
+ }
1873
+ }
1874
+ lines.push("");
1875
+ return lines.join("\n");
1876
+ }
1877
+ function formatGematriaLookup(result) {
1878
+ const lines = [];
1879
+ lines.push("");
1880
+ lines.push(GEMATRIA_COLORS.header(` GEMATRIA LOOKUP: ${result.number}`));
1881
+ if (result.system) {
1882
+ lines.push(` ${chalk.dim("System:")} ${result.system}`);
1883
+ }
1884
+ lines.push("");
1885
+ if (result.matches.length === 0) {
1886
+ lines.push(chalk.dim(" No known correspondences found for this number."));
1887
+ } else {
1888
+ lines.push(chalk.bold.cyan("\u2500\u2500 CORRESPONDENCES \u2500\u2500"));
1889
+ for (const m of result.matches) {
1890
+ const sysColor = m.system === "hebrew" ? GEMATRIA_COLORS.hebrew : m.system === "greek" ? GEMATRIA_COLORS.greek : GEMATRIA_COLORS.english;
1891
+ lines.push(` ${sysColor(m.word)} ${chalk.white(m.transliteration)}`);
1892
+ lines.push(` ${chalk.italic(m.meaning)} ${chalk.dim(`[${m.system}]`)}`);
1893
+ }
1894
+ }
1895
+ lines.push("");
1896
+ return lines.join("\n");
1897
+ }
1898
+ var NUMEROLOGY_COLORS = {
1899
+ number: chalk.bold.hex("#FFD700"),
1900
+ label: chalk.bold.cyan,
1901
+ steps: chalk.dim,
1902
+ meaning: chalk.italic.hex("#C0C0C0"),
1903
+ header: chalk.bold.hex("#9932CC")
1904
+ };
1905
+ function formatNumerology(result) {
1906
+ const lines = [];
1907
+ lines.push("");
1908
+ lines.push(NUMEROLOGY_COLORS.header(" NUMEROLOGY"));
1909
+ lines.push("");
1910
+ if (result.life_path) {
1911
+ const lp = result.life_path;
1912
+ lines.push(chalk.bold.cyan("\u2500\u2500 LIFE PATH \u2500\u2500"));
1913
+ lines.push(` ${chalk.dim("Date:")} ${lp.date}`);
1914
+ lines.push(` ${NUMEROLOGY_COLORS.number(String(lp.life_path))} ${NUMEROLOGY_COLORS.meaning(getNumberMeaning(lp.life_path))}`);
1915
+ lines.push(` ${NUMEROLOGY_COLORS.steps(lp.steps)}`);
1916
+ lines.push("");
1917
+ }
1918
+ if (result.name_analysis) {
1919
+ const na = result.name_analysis;
1920
+ lines.push(chalk.bold.cyan("\u2500\u2500 NAME ANALYSIS \u2500\u2500"));
1921
+ lines.push(` ${chalk.dim("Name:")} ${na.name}`);
1922
+ lines.push("");
1923
+ lines.push(` ${chalk.dim("Letters:")}`);
1924
+ const vowelLetters = na.letters.filter((l) => l.type === "vowel").map((l) => `${l.letter}=${l.value}`).join(" ");
1925
+ const consLetters = na.letters.filter((l) => l.type === "consonant").map((l) => `${l.letter}=${l.value}`).join(" ");
1926
+ lines.push(` ${chalk.hex("#FF8C00")("Vowels:")} ${vowelLetters}`);
1927
+ lines.push(` ${chalk.hex("#4169E1")("Consonants:")} ${consLetters}`);
1928
+ lines.push("");
1929
+ lines.push(` ${NUMEROLOGY_COLORS.label("Expression/Destiny")} (all letters)`);
1930
+ lines.push(` ${NUMEROLOGY_COLORS.number(String(na.expression.reduced))} ${NUMEROLOGY_COLORS.meaning(getNumberMeaning(na.expression.reduced))}`);
1931
+ lines.push(` ${NUMEROLOGY_COLORS.steps(na.expression.steps)}`);
1932
+ lines.push("");
1933
+ lines.push(` ${NUMEROLOGY_COLORS.label("Soul Urge/Heart's Desire")} (vowels)`);
1934
+ lines.push(` ${NUMEROLOGY_COLORS.number(String(na.soul_urge.reduced))} ${NUMEROLOGY_COLORS.meaning(getNumberMeaning(na.soul_urge.reduced))}`);
1935
+ lines.push(` ${NUMEROLOGY_COLORS.steps(na.soul_urge.steps)}`);
1936
+ lines.push("");
1937
+ lines.push(` ${NUMEROLOGY_COLORS.label("Personality")} (consonants)`);
1938
+ lines.push(` ${NUMEROLOGY_COLORS.number(String(na.personality.reduced))} ${NUMEROLOGY_COLORS.meaning(getNumberMeaning(na.personality.reduced))}`);
1939
+ lines.push(` ${NUMEROLOGY_COLORS.steps(na.personality.steps)}`);
1940
+ lines.push("");
1941
+ }
1942
+ return lines.join("\n");
1943
+ }
1944
+ function formatNumerologyYear(result) {
1945
+ const lines = [];
1946
+ lines.push("");
1947
+ lines.push(NUMEROLOGY_COLORS.header(" PERSONAL CYCLES"));
1948
+ lines.push(` ${chalk.dim("Birth Date:")} ${result.birth_date}`);
1949
+ lines.push(` ${chalk.dim("Target Date:")} ${result.target_date}`);
1950
+ lines.push("");
1951
+ lines.push(chalk.bold.cyan("\u2500\u2500 PERSONAL YEAR \u2500\u2500"));
1952
+ lines.push(` ${NUMEROLOGY_COLORS.number(String(result.personal_year.value))} ${NUMEROLOGY_COLORS.meaning(getNumberMeaning(result.personal_year.value))}`);
1953
+ lines.push(` ${NUMEROLOGY_COLORS.steps(result.personal_year.steps)}`);
1954
+ lines.push("");
1955
+ lines.push(chalk.bold.cyan("\u2500\u2500 PERSONAL MONTH \u2500\u2500"));
1956
+ lines.push(` ${NUMEROLOGY_COLORS.number(String(result.personal_month.value))} ${NUMEROLOGY_COLORS.meaning(getNumberMeaning(result.personal_month.value))}`);
1957
+ lines.push(` ${NUMEROLOGY_COLORS.steps(result.personal_month.steps)}`);
1958
+ lines.push("");
1959
+ lines.push(chalk.bold.cyan("\u2500\u2500 PERSONAL DAY \u2500\u2500"));
1960
+ lines.push(` ${NUMEROLOGY_COLORS.number(String(result.personal_day.value))} ${NUMEROLOGY_COLORS.meaning(getNumberMeaning(result.personal_day.value))}`);
1961
+ lines.push(` ${NUMEROLOGY_COLORS.steps(result.personal_day.steps)}`);
1962
+ lines.push("");
1963
+ return lines.join("\n");
1964
+ }
1965
+
1966
+ // src/lib/gematria.ts
1967
+ var HEBREW_STANDARD = {
1968
+ "\u05D0": 1,
1969
+ "\u05D1": 2,
1970
+ "\u05D2": 3,
1971
+ "\u05D3": 4,
1972
+ "\u05D4": 5,
1973
+ "\u05D5": 6,
1974
+ "\u05D6": 7,
1975
+ "\u05D7": 8,
1976
+ "\u05D8": 9,
1977
+ "\u05D9": 10,
1978
+ "\u05DB": 20,
1979
+ "\u05DC": 30,
1980
+ "\u05DE": 40,
1981
+ "\u05E0": 50,
1982
+ "\u05E1": 60,
1983
+ "\u05E2": 70,
1984
+ "\u05E4": 80,
1985
+ "\u05E6": 90,
1986
+ "\u05E7": 100,
1987
+ "\u05E8": 200,
1988
+ "\u05E9": 300,
1989
+ "\u05EA": 400,
1990
+ // Final forms (sofit) — same values
1991
+ "\u05DA": 20,
1992
+ "\u05DD": 40,
1993
+ "\u05DF": 50,
1994
+ "\u05E3": 80,
1995
+ "\u05E5": 90
1996
+ };
1997
+ var HEBREW_ORDINAL = {
1998
+ "\u05D0": 1,
1999
+ "\u05D1": 2,
2000
+ "\u05D2": 3,
2001
+ "\u05D3": 4,
2002
+ "\u05D4": 5,
2003
+ "\u05D5": 6,
2004
+ "\u05D6": 7,
2005
+ "\u05D7": 8,
2006
+ "\u05D8": 9,
2007
+ "\u05D9": 10,
2008
+ "\u05DB": 11,
2009
+ "\u05DC": 12,
2010
+ "\u05DE": 13,
2011
+ "\u05E0": 14,
2012
+ "\u05E1": 15,
2013
+ "\u05E2": 16,
2014
+ "\u05E4": 17,
2015
+ "\u05E6": 18,
2016
+ "\u05E7": 19,
2017
+ "\u05E8": 20,
2018
+ "\u05E9": 21,
2019
+ "\u05EA": 22,
2020
+ "\u05DA": 11,
2021
+ "\u05DD": 13,
2022
+ "\u05DF": 14,
2023
+ "\u05E3": 17,
2024
+ "\u05E5": 18
2025
+ };
2026
+ var GREEK_ISOPSEPHY = {
2027
+ "\u03B1": 1,
2028
+ "\u03B2": 2,
2029
+ "\u03B3": 3,
2030
+ "\u03B4": 4,
2031
+ "\u03B5": 5,
2032
+ "\u03B6": 7,
2033
+ "\u03B7": 8,
2034
+ "\u03B8": 9,
2035
+ "\u03B9": 10,
2036
+ "\u03BA": 20,
2037
+ "\u03BB": 30,
2038
+ "\u03BC": 40,
2039
+ "\u03BD": 50,
2040
+ "\u03BE": 60,
2041
+ "\u03BF": 70,
2042
+ "\u03C0": 80,
2043
+ "\u03C1": 100,
2044
+ "\u03C3": 200,
2045
+ "\u03C2": 200,
2046
+ "\u03C4": 300,
2047
+ "\u03C5": 400,
2048
+ "\u03C6": 500,
2049
+ "\u03C7": 600,
2050
+ "\u03C8": 700,
2051
+ "\u03C9": 800
2052
+ };
2053
+ var TRANSLITERATION_DIGRAPHS = [
2054
+ ["sh", "\u05E9"],
2055
+ ["th", "\u05EA"],
2056
+ ["ch", "\u05D7"],
2057
+ ["tz", "\u05E6"],
2058
+ ["ts", "\u05E6"],
2059
+ ["ph", "\u05E4"]
2060
+ ];
2061
+ var TRANSLITERATION_SINGLES = {
2062
+ "a": "\u05D0",
2063
+ "b": "\u05D1",
2064
+ "c": "\u05DB",
2065
+ "d": "\u05D3",
2066
+ "e": "\u05D4",
2067
+ "f": "\u05E4",
2068
+ "g": "\u05D2",
2069
+ "h": "\u05D4",
2070
+ "i": "\u05D9",
2071
+ "j": "\u05D2",
2072
+ "k": "\u05DB",
2073
+ "l": "\u05DC",
2074
+ "m": "\u05DE",
2075
+ "n": "\u05E0",
2076
+ "o": "\u05E2",
2077
+ "p": "\u05E4",
2078
+ "q": "\u05E7",
2079
+ "r": "\u05E8",
2080
+ "s": "\u05E1",
2081
+ "t": "\u05D8",
2082
+ "u": "\u05D5",
2083
+ "v": "\u05D5",
2084
+ "w": "\u05D5",
2085
+ "x": "\u05E6",
2086
+ "y": "\u05D9",
2087
+ "z": "\u05D6"
2088
+ };
2089
+ var NOTABLE_WORDS = {
2090
+ 1: [{ word: "\u05D0", transliteration: "Aleph", meaning: "Ox, Breath, Spirit", system: "hebrew" }],
2091
+ 5: [{ word: "\u05D4", transliteration: "He", meaning: "Window, Breath", system: "hebrew" }],
2092
+ 10: [{ word: "\u05D9", transliteration: "Yod", meaning: "Hand, Foundation", system: "hebrew" }],
2093
+ 13: [
2094
+ { word: "\u05D0\u05D7\u05D3", transliteration: "Echad", meaning: "Unity, One", system: "hebrew" },
2095
+ { word: "\u05D0\u05D4\u05D1\u05D4", transliteration: "Ahavah", meaning: "Love", system: "hebrew" }
2096
+ ],
2097
+ 17: [{ word: "\u05D8\u05D5\u05D1", transliteration: "Tov", meaning: "Good", system: "hebrew" }],
2098
+ 21: [{ word: "\u05D0\u05D4\u05D9\u05D4", transliteration: "Eheieh", meaning: "I Am (Divine Name of Kether)", system: "hebrew" }],
2099
+ 26: [{ word: "\u05D9\u05D4\u05D5\u05D4", transliteration: "YHVH", meaning: "Tetragrammaton", system: "hebrew" }],
2100
+ 31: [
2101
+ { word: "\u05D0\u05DC", transliteration: "El", meaning: "God (Divine Name of Chesed)", system: "hebrew" },
2102
+ { word: "\u05DC\u05D0", transliteration: "LA", meaning: "Not, Naught", system: "hebrew" }
2103
+ ],
2104
+ 32: [{ word: "\u05DC\u05D1", transliteration: "Lev", meaning: "Heart; 32 Paths of Wisdom", system: "hebrew" }],
2105
+ 42: [{ word: "\u05D0\u05DC\u05D5\u05D4", transliteration: "Eloah", meaning: "God (singular)", system: "hebrew" }],
2106
+ 45: [
2107
+ { word: "\u05D0\u05D3\u05DD", transliteration: "Adam", meaning: "Humanity, Red Earth", system: "hebrew" },
2108
+ { word: "\u05DE\u05D4", transliteration: "Mah", meaning: "What (secret of Tiphareth)", system: "hebrew" }
2109
+ ],
2110
+ 50: [{ word: "\u05DB\u05DC", transliteration: "Kol", meaning: "All, Everything", system: "hebrew" }],
2111
+ 58: [{ word: "\u05D7\u05DF", transliteration: "Chen", meaning: "Grace, Favor", system: "hebrew" }],
2112
+ 65: [
2113
+ { word: "\u05D0\u05D3\u05E0\u05D9", transliteration: "Adonai", meaning: "Lord (Divine Name of Malkuth)", system: "hebrew" },
2114
+ { word: "\u05D4\u05DC\u05DC", transliteration: "Hallel", meaning: "Praise", system: "hebrew" }
2115
+ ],
2116
+ 67: [{ word: "\u05D1\u05D9\u05E0\u05D4", transliteration: "Binah", meaning: "Understanding (3rd Sephirah)", system: "hebrew" }],
2117
+ 68: [{ word: "\u05D7\u05D9\u05D9\u05DD", transliteration: "Chayyim", meaning: "Life", system: "hebrew" }],
2118
+ 73: [{ word: "\u05D7\u05DB\u05DE\u05D4", transliteration: "Chokmah", meaning: "Wisdom (2nd Sephirah)", system: "hebrew" }],
2119
+ 78: [{ word: "\u05DE\u05D6\u05DC\u05D0", transliteration: "Mezla", meaning: "Influence (from above)", system: "hebrew" }],
2120
+ 80: [{ word: "\u05D9\u05E1\u05D5\u05D3", transliteration: "Yesod", meaning: "Foundation (9th Sephirah)", system: "hebrew" }],
2121
+ 86: [{ word: "\u05D0\u05DC\u05D4\u05D9\u05DD", transliteration: "Elohim", meaning: "God/s (Divine Name of Binah)", system: "hebrew" }],
2122
+ 91: [{ word: "\u05D0\u05DE\u05DF", transliteration: "Amen", meaning: "So be it; Truth", system: "hebrew" }],
2123
+ 93: [
2124
+ { word: "\u03B8\u03B5\u03BB\u03B7\u03BC\u03B1", transliteration: "Thelema", meaning: "Will", system: "greek" },
2125
+ { word: "\u03B1\u03B3\u03B1\u03C0\u03B7", transliteration: "Agape", meaning: "Love", system: "greek" }
2126
+ ],
2127
+ 111: [{ word: "\u05D0\u05DC\u05E3", transliteration: "Aleph (spelled)", meaning: "Aleph in full: Ox", system: "hebrew" }],
2128
+ 120: [{ word: "\u05E1\u05DE\u05DA", transliteration: "Samekh (spelled)", meaning: "Prop, Support", system: "hebrew" }],
2129
+ 131: [{ word: "\u05E1\u05DE\u05D0\u05DC", transliteration: "Samael", meaning: "Poison of God, Archangel of Geburah", system: "hebrew" }],
2130
+ 148: [{ word: "\u05E0\u05E6\u05D7", transliteration: "Netzach", meaning: "Victory (7th Sephirah)", system: "hebrew" }],
2131
+ 156: [{ word: "\u05E6\u05D9\u05D5\u05DF", transliteration: "Tzion", meaning: "Zion; 6 x YHVH", system: "hebrew" }],
2132
+ 207: [
2133
+ { word: "\u05D0\u05D9\u05DF \u05E1\u05D5\u05E3", transliteration: "Ain Soph", meaning: "The Limitless", system: "hebrew" },
2134
+ { word: "\u05D0\u05D5\u05E8", transliteration: "Aur", meaning: "Light", system: "hebrew" }
2135
+ ],
2136
+ 280: [{ word: "\u05DA \u05DD \u05DF \u05E3 \u05E5", transliteration: "Five Finals", meaning: "Severity, the 5 judgments", system: "hebrew" }],
2137
+ 300: [{ word: "\u05E8\u05D5\u05D7 \u05D0\u05DC\u05D4\u05D9\u05DD", transliteration: "Ruach Elohim", meaning: "Spirit of God", system: "hebrew" }],
2138
+ 314: [{ word: "\u05E9\u05D3\u05D9", transliteration: "Shaddai", meaning: "Almighty (= pi)", system: "hebrew" }],
2139
+ 345: [
2140
+ { word: "\u05DE\u05E9\u05D4", transliteration: "Moshe", meaning: "Moses", system: "hebrew" },
2141
+ { word: "\u05D0\u05DC \u05E9\u05D3\u05D9", transliteration: "El Shaddai", meaning: "God Almighty", system: "hebrew" }
2142
+ ],
2143
+ 358: [
2144
+ { word: "\u05DE\u05E9\u05D9\u05D7", transliteration: "Mashiach", meaning: "Messiah, Anointed One", system: "hebrew" },
2145
+ { word: "\u05E0\u05D7\u05E9", transliteration: "Nachash", meaning: "Serpent (= Messiah!)", system: "hebrew" }
2146
+ ],
2147
+ 400: [{ word: "\u05EA", transliteration: "Tav", meaning: "Cross, Mark, Completion", system: "hebrew" }],
2148
+ 418: [
2149
+ { word: "\u05D7\u05D9\u05EA", transliteration: "Cheth (spelled)", meaning: "Fence, Field; Abrahadabra", system: "hebrew" }
2150
+ ],
2151
+ 434: [{ word: "\u05D3\u05DC\u05EA", transliteration: "Daleth (spelled)", meaning: "Door", system: "hebrew" }],
2152
+ 666: [{ word: "\u05E1\u05D5\u05E8\u05EA", transliteration: "Sorath", meaning: "Spirit of the Sun", system: "hebrew" }],
2153
+ 777: [{ word: "\u05E2\u05D5\u05DC\u05DD \u05D4\u05E7\u05DC\u05D9\u05E4\u05D5\u05EA", transliteration: "Olam Ha-Qliphoth", meaning: "World of Shells", system: "hebrew" }],
2154
+ 888: [{ word: "\u0399\u03B7\u03C3\u03BF\u03C5\u03C2", transliteration: "Iesous", meaning: "Jesus (Greek)", system: "greek" }]
2155
+ };
2156
+ function hasHebrew(text) {
2157
+ return /[\u0590-\u05FF]/.test(text);
2158
+ }
2159
+ function hasGreek(text) {
2160
+ return /[\u0370-\u03FF\u1F00-\u1FFF]/.test(text);
2161
+ }
2162
+ function hasLatin(text) {
2163
+ return /[a-zA-Z]/.test(text);
2164
+ }
2165
+ function digitalRoot(n) {
2166
+ while (n > 9) {
2167
+ n = String(n).split("").reduce((sum, d) => sum + Number(d), 0);
2168
+ }
2169
+ return n;
2170
+ }
2171
+ function transliterateToHebrew(text) {
2172
+ const lower = text.toLowerCase();
2173
+ let result = "";
2174
+ let i = 0;
2175
+ while (i < lower.length) {
2176
+ if (!/[a-z]/.test(lower[i])) {
2177
+ if (lower[i] === " ") result += " ";
2178
+ i++;
2179
+ continue;
2180
+ }
2181
+ let matched = false;
2182
+ if (i + 1 < lower.length) {
2183
+ const pair = lower.slice(i, i + 2);
2184
+ for (const [digraph, hebrew] of TRANSLITERATION_DIGRAPHS) {
2185
+ if (pair === digraph) {
2186
+ result += hebrew;
2187
+ i += 2;
2188
+ matched = true;
2189
+ break;
2190
+ }
2191
+ }
2192
+ }
2193
+ if (!matched) {
2194
+ result += TRANSLITERATION_SINGLES[lower[i]] || "";
2195
+ i++;
2196
+ }
2197
+ }
2198
+ return result;
2199
+ }
2200
+ function computeHebrewStandard(text) {
2201
+ let sum = 0;
2202
+ for (const ch of text) {
2203
+ sum += HEBREW_STANDARD[ch] || 0;
2204
+ }
2205
+ return sum;
2206
+ }
2207
+ function computeHebrewOrdinal(text) {
2208
+ let sum = 0;
2209
+ for (const ch of text) {
2210
+ sum += HEBREW_ORDINAL[ch] || 0;
2211
+ }
2212
+ return sum;
2213
+ }
2214
+ function computeHebrewReduced(text) {
2215
+ let sum = 0;
2216
+ for (const ch of text) {
2217
+ const val = HEBREW_STANDARD[ch];
2218
+ if (val) sum += digitalRoot(val);
2219
+ }
2220
+ return digitalRoot(sum);
2221
+ }
2222
+ function computeGreekIsopsephy(text) {
2223
+ let sum = 0;
2224
+ const lower = text.toLowerCase();
2225
+ for (const ch of lower) {
2226
+ sum += GREEK_ISOPSEPHY[ch] || 0;
2227
+ }
2228
+ return sum;
2229
+ }
2230
+ function computeEnglishOrdinal(text) {
2231
+ let sum = 0;
2232
+ const upper = text.toUpperCase();
2233
+ for (const ch of upper) {
2234
+ const code = ch.charCodeAt(0);
2235
+ if (code >= 65 && code <= 90) {
2236
+ sum += code - 64;
2237
+ }
2238
+ }
2239
+ return sum;
2240
+ }
2241
+ function computeEnglishReduced(text) {
2242
+ let sum = 0;
2243
+ const upper = text.toUpperCase();
2244
+ for (const ch of upper) {
2245
+ const code = ch.charCodeAt(0);
2246
+ if (code >= 65 && code <= 90) {
2247
+ sum += digitalRoot(code - 64);
2248
+ }
2249
+ }
2250
+ return digitalRoot(sum);
2251
+ }
2252
+ function computeEnglishSumerian(text) {
2253
+ let sum = 0;
2254
+ const upper = text.toUpperCase();
2255
+ for (const ch of upper) {
2256
+ const code = ch.charCodeAt(0);
2257
+ if (code >= 65 && code <= 90) {
2258
+ sum += (code - 64) * 6;
2259
+ }
2260
+ }
2261
+ return sum;
2262
+ }
2263
+ function computeEnglishReverse(text) {
2264
+ let sum = 0;
2265
+ const upper = text.toUpperCase();
2266
+ for (const ch of upper) {
2267
+ const code = ch.charCodeAt(0);
2268
+ if (code >= 65 && code <= 90) {
2269
+ sum += 27 - (code - 64);
2270
+ }
2271
+ }
2272
+ return sum;
2273
+ }
2274
+ function calculateGematria(text, systemFilter) {
2275
+ const systems = [];
2276
+ let transliteration;
2277
+ const isHebrew = hasHebrew(text);
2278
+ const isGreek = hasGreek(text);
2279
+ const isLatin = hasLatin(text);
2280
+ if (isHebrew) {
2281
+ const std = computeHebrewStandard(text);
2282
+ const ord = computeHebrewOrdinal(text);
2283
+ const red = computeHebrewReduced(text);
2284
+ if (!systemFilter || systemFilter === "hebrew-standard") systems.push({ name: "Hebrew Standard", value: std, key: "hebrew-standard" });
2285
+ if (!systemFilter || systemFilter === "hebrew-ordinal") systems.push({ name: "Hebrew Ordinal", value: ord, key: "hebrew-ordinal" });
2286
+ if (!systemFilter || systemFilter === "hebrew-reduced") systems.push({ name: "Hebrew Reduced", value: red, key: "hebrew-reduced" });
2287
+ } else if (isLatin) {
2288
+ transliteration = transliterateToHebrew(text);
2289
+ if (transliteration.replace(/\s/g, "").length > 0) {
2290
+ const std = computeHebrewStandard(transliteration);
2291
+ const ord = computeHebrewOrdinal(transliteration);
2292
+ const red = computeHebrewReduced(transliteration);
2293
+ if (!systemFilter || systemFilter === "hebrew-standard") systems.push({ name: "Hebrew Standard", value: std, key: "hebrew-standard" });
2294
+ if (!systemFilter || systemFilter === "hebrew-ordinal") systems.push({ name: "Hebrew Ordinal", value: ord, key: "hebrew-ordinal" });
2295
+ if (!systemFilter || systemFilter === "hebrew-reduced") systems.push({ name: "Hebrew Reduced", value: red, key: "hebrew-reduced" });
2296
+ }
2297
+ }
2298
+ if (isGreek) {
2299
+ const val = computeGreekIsopsephy(text);
2300
+ if (!systemFilter || systemFilter === "greek") systems.push({ name: "Greek Isopsephy", value: val, key: "greek" });
2301
+ }
2302
+ if (isLatin) {
2303
+ const ord = computeEnglishOrdinal(text);
2304
+ const red = computeEnglishReduced(text);
2305
+ const sum = computeEnglishSumerian(text);
2306
+ const rev = computeEnglishReverse(text);
2307
+ if (!systemFilter || systemFilter === "english-ordinal") systems.push({ name: "English Ordinal", value: ord, key: "english-ordinal" });
2308
+ if (!systemFilter || systemFilter === "english-reduced") systems.push({ name: "English Reduced", value: red, key: "english-reduced" });
2309
+ if (!systemFilter || systemFilter === "english-sumerian") systems.push({ name: "English Sumerian", value: sum, key: "english-sumerian" });
2310
+ if (!systemFilter || systemFilter === "english-reverse") systems.push({ name: "English Reverse", value: rev, key: "english-reverse" });
2311
+ }
2312
+ const notable = [];
2313
+ const seenValues = /* @__PURE__ */ new Set();
2314
+ for (const sys of systems) {
2315
+ if (sys.value > 0 && !seenValues.has(sys.value) && NOTABLE_WORDS[sys.value]) {
2316
+ notable.push({ value: sys.value, matches: NOTABLE_WORDS[sys.value] });
2317
+ seenValues.add(sys.value);
2318
+ }
2319
+ }
2320
+ return { text, systems, transliteration, notable };
2321
+ }
2322
+ function compareGematria(text1, text2, systemFilter) {
2323
+ const r1 = calculateGematria(text1, systemFilter);
2324
+ const r2 = calculateGematria(text2, systemFilter);
2325
+ const shared = [];
2326
+ for (const s1 of r1.systems) {
2327
+ for (const s2 of r2.systems) {
2328
+ if (s1.key === s2.key && s1.value === s2.value && s1.value > 0) {
2329
+ shared.push({ system: s1.name, value: s1.value });
2330
+ }
2331
+ }
2332
+ }
2333
+ return { text1: r1, text2: r2, shared_values: shared };
2334
+ }
2335
+ function lookupGematria(number, systemFilter, limit) {
2336
+ let matches = NOTABLE_WORDS[number] || [];
2337
+ if (systemFilter) {
2338
+ matches = matches.filter((m) => m.system === systemFilter);
2339
+ }
2340
+ if (limit && matches.length > limit) {
2341
+ matches = matches.slice(0, limit);
2342
+ }
2343
+ return { number, system: systemFilter, matches };
2344
+ }
1609
2345
 
1610
2346
  // src/types.ts
1611
2347
  function isError(result) {
@@ -1634,6 +2370,11 @@ export {
1634
2370
  tarotCard,
1635
2371
  tarotDeck,
1636
2372
  tarotSpreads,
2373
+ calculateNameNumerology,
2374
+ calculateLifePath,
2375
+ calculateNumerology,
2376
+ calculatePersonalCycle,
2377
+ getNumberMeaning,
1637
2378
  getZodiacSymbol,
1638
2379
  getPlanetSymbol,
1639
2380
  getAspectSymbol,
@@ -1658,5 +2399,14 @@ export {
1658
2399
  formatTarotCard,
1659
2400
  formatTarotDeck,
1660
2401
  formatTarotSpreads,
2402
+ formatGematria,
2403
+ formatGematriaCompare,
2404
+ formatGematriaLookup,
2405
+ formatNumerology,
2406
+ formatNumerologyYear,
2407
+ transliterateToHebrew,
2408
+ calculateGematria,
2409
+ compareGematria,
2410
+ lookupGematria,
1661
2411
  isError
1662
2412
  };