kaabalah 6.7.0 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/astrology/index.js +54 -54
- package/dist/astrology/index.js.map +1 -1
- package/dist/astrology/index.mjs +3 -3
- package/dist/astrology/index.mjs.map +1 -1
- package/dist/chunk-2WCC2KCJ.js +1 -1
- package/dist/chunk-2WCC2KCJ.js.map +1 -1
- package/dist/{chunk-XTE5DSDO.js → chunk-36XZ5WR2.js} +23 -23
- package/dist/chunk-36XZ5WR2.js.map +1 -0
- package/dist/{chunk-6P2CJUTH.mjs → chunk-3UJPBUY4.mjs} +8 -6
- package/dist/chunk-3UJPBUY4.mjs.map +1 -0
- package/dist/{chunk-FM7WUVZV.js → chunk-4337NVKS.js} +8 -4
- package/dist/chunk-4337NVKS.js.map +1 -0
- package/dist/{chunk-SFUCT6I2.mjs → chunk-5HXSHALQ.mjs} +49 -43
- package/dist/chunk-5HXSHALQ.mjs.map +1 -0
- package/dist/{chunk-EFZUZI22.mjs → chunk-5K4OQ4UB.mjs} +5 -4
- package/dist/chunk-5K4OQ4UB.mjs.map +1 -0
- package/dist/{chunk-ZKIJAZ6B.mjs → chunk-6N5YC2WD.mjs} +338 -10
- package/dist/chunk-6N5YC2WD.mjs.map +1 -0
- package/dist/{chunk-PWYOHULD.mjs → chunk-7YU7TRCG.mjs} +80 -42
- package/dist/chunk-7YU7TRCG.mjs.map +1 -0
- package/dist/{chunk-6O7MTBZN.js → chunk-BEFGGHIJ.js} +84 -46
- package/dist/chunk-BEFGGHIJ.js.map +1 -0
- package/dist/{chunk-MTI2SOQ6.mjs → chunk-ITESL6GR.mjs} +4 -4
- package/dist/chunk-ITESL6GR.mjs.map +1 -0
- package/dist/{chunk-UG6HZK3Z.js → chunk-K33NFXSD.js} +109 -109
- package/dist/chunk-K33NFXSD.js.map +1 -0
- package/dist/{chunk-OKZUVGA3.js → chunk-LQX6PW35.js} +349 -15
- package/dist/chunk-LQX6PW35.js.map +1 -0
- package/dist/{chunk-WY6NIR2V.mjs → chunk-NPQZ2DOY.mjs} +8 -4
- package/dist/chunk-NPQZ2DOY.mjs.map +1 -0
- package/dist/{chunk-WIKUOEOB.mjs → chunk-QS5XAAAG.mjs} +31 -19
- package/dist/chunk-QS5XAAAG.mjs.map +1 -0
- package/dist/{chunk-UN7QMOMX.mjs → chunk-SHKAAZHT.mjs} +8 -8
- package/dist/chunk-SHKAAZHT.mjs.map +1 -0
- package/dist/{chunk-COPYH3O2.js → chunk-SYLFUBAB.js} +51 -39
- package/dist/chunk-SYLFUBAB.js.map +1 -0
- package/dist/chunk-URDMOQRN.mjs +1 -1
- package/dist/chunk-URDMOQRN.mjs.map +1 -1
- package/dist/{chunk-PAKYKIZH.js → chunk-UZ42PN5T.js} +10 -8
- package/dist/chunk-UZ42PN5T.js.map +1 -0
- package/dist/{chunk-S6KNERP7.js → chunk-VJ6RW5H4.js} +8 -7
- package/dist/chunk-VJ6RW5H4.js.map +1 -0
- package/dist/{chunk-WCOGJKT7.js → chunk-WLML6SVX.js} +53 -47
- package/dist/chunk-WLML6SVX.js.map +1 -0
- package/dist/cli.js +1175 -420
- package/dist/cli.js.map +1 -1
- package/dist/core/index.d.mts +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.js +69 -45
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.mjs +4 -4
- package/dist/core/index.mjs.map +1 -1
- package/dist/gematria/index.js +7 -7
- package/dist/gematria/index.js.map +1 -1
- package/dist/gematria/index.mjs +4 -4
- package/dist/gematria/index.mjs.map +1 -1
- package/dist/ifa/index.js +2 -2
- package/dist/ifa/index.js.map +1 -1
- package/dist/ifa/index.mjs +2 -2
- package/dist/ifa/index.mjs.map +1 -1
- package/dist/index.d.mts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +377 -353
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/dist/numerology/index.js +20 -20
- package/dist/numerology/index.js.map +1 -1
- package/dist/numerology/index.mjs +5 -5
- package/dist/numerology/index.mjs.map +1 -1
- package/dist/semantic/index.js +28 -28
- package/dist/semantic/index.js.map +1 -1
- package/dist/semantic/index.mjs +9 -9
- package/dist/semantic/index.mjs.map +1 -1
- package/dist/{swisseph.node-6H4ISR7M.mjs → swisseph.node-2PWBQLWG.mjs} +270 -156
- package/dist/swisseph.node-2PWBQLWG.mjs.map +1 -0
- package/dist/{wasm/build/swisseph.node-UD2JYYLE.js → swisseph.node-NWM75JF3.js} +283 -169
- package/dist/swisseph.node-NWM75JF3.js.map +1 -0
- package/dist/{swisseph.web-TSFJI7DQ.mjs → swisseph.web-CK57WSU3.mjs} +264 -153
- package/dist/swisseph.web-CK57WSU3.mjs.map +1 -0
- package/dist/{wasm/build/swisseph.web-MXYBWOOS.js → swisseph.web-GPTWPXKT.js} +277 -166
- package/dist/swisseph.web-GPTWPXKT.js.map +1 -0
- package/dist/tarot/index.js +25 -25
- package/dist/tarot/index.js.map +1 -1
- package/dist/tarot/index.mjs +5 -5
- package/dist/tarot/index.mjs.map +1 -1
- package/dist/topology-Bbgniegh.d.ts +102 -0
- package/dist/topology-CSSfYL2c.d.mts +102 -0
- package/dist/visual/index.d.mts +2 -1
- package/dist/visual/index.d.ts +2 -1
- package/dist/visual/index.js +46 -46
- package/dist/visual/index.js.map +1 -1
- package/dist/visual/index.mjs +5 -5
- package/dist/visual/index.mjs.map +1 -1
- package/dist/wasm/build/{swisseph.node-6H4ISR7M.mjs → swisseph.node-2PWBQLWG.mjs} +270 -156
- package/dist/wasm/build/swisseph.node-2PWBQLWG.mjs.map +1 -0
- package/dist/{swisseph.node-UD2JYYLE.js → wasm/build/swisseph.node-NWM75JF3.js} +283 -169
- package/dist/wasm/build/swisseph.node-NWM75JF3.js.map +1 -0
- package/dist/wasm/build/{swisseph.web-TSFJI7DQ.mjs → swisseph.web-CK57WSU3.mjs} +264 -153
- package/dist/wasm/build/swisseph.web-CK57WSU3.mjs.map +1 -0
- package/dist/{swisseph.web-MXYBWOOS.js → wasm/build/swisseph.web-GPTWPXKT.js} +277 -166
- package/dist/wasm/build/swisseph.web-GPTWPXKT.js.map +1 -0
- package/package.json +7 -7
- package/dist/chunk-6O7MTBZN.js.map +0 -1
- package/dist/chunk-6P2CJUTH.mjs.map +0 -1
- package/dist/chunk-COPYH3O2.js.map +0 -1
- package/dist/chunk-EFZUZI22.mjs.map +0 -1
- package/dist/chunk-FM7WUVZV.js.map +0 -1
- package/dist/chunk-MTI2SOQ6.mjs.map +0 -1
- package/dist/chunk-OKZUVGA3.js.map +0 -1
- package/dist/chunk-PAKYKIZH.js.map +0 -1
- package/dist/chunk-PWYOHULD.mjs.map +0 -1
- package/dist/chunk-S6KNERP7.js.map +0 -1
- package/dist/chunk-SFUCT6I2.mjs.map +0 -1
- package/dist/chunk-UG6HZK3Z.js.map +0 -1
- package/dist/chunk-UN7QMOMX.mjs.map +0 -1
- package/dist/chunk-WCOGJKT7.js.map +0 -1
- package/dist/chunk-WIKUOEOB.mjs.map +0 -1
- package/dist/chunk-WY6NIR2V.mjs.map +0 -1
- package/dist/chunk-XTE5DSDO.js.map +0 -1
- package/dist/chunk-ZKIJAZ6B.mjs.map +0 -1
- package/dist/swisseph.node-6H4ISR7M.mjs.map +0 -1
- package/dist/swisseph.node-UD2JYYLE.js.map +0 -1
- package/dist/swisseph.web-MXYBWOOS.js.map +0 -1
- package/dist/swisseph.web-TSFJI7DQ.mjs.map +0 -1
- package/dist/wasm/build/swisseph.node-6H4ISR7M.mjs.map +0 -1
- package/dist/wasm/build/swisseph.node-UD2JYYLE.js.map +0 -1
- package/dist/wasm/build/swisseph.web-MXYBWOOS.js.map +0 -1
- package/dist/wasm/build/swisseph.web-TSFJI7DQ.mjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/tarot/index.ts"],"names":["id"],"mappings":";;;;;;;;;AAsBO,IAAM,wBAAqC;AAE3C,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AAU,MAAM,OAAO,EAC5B,KAAK,GAAG,CAAC;AAAA,IACd;AAAA,EACF;AAEA,SAAO;AAAA,IACL,QAAQ,sBAAsB,MAAM;AAAA,IACpC,QAAQ,QAAQ,UAAU;AAAA,IAC1B,SAAS,QAAQ;AAAA,IACjB,OAAO,6BAA6B,UAAU;AAAA,EAChD;AACF","sourcesContent":["/**\n * Tarot interpretation functions\n */\n\nimport {\n getCanonicalTree,\n id,\n KaabalahTypes,\n LetterTypes,\n NumerologyTypes,\n parseId,\n type SystemKey,\n TarotTypes,\n type NodeId,\n type Node,\n WesternAstrologyTypes\n} from \"../core\";\n\nexport type Deck = \"papus_pt\" | \"papus\" | \"mythic\" | \"egyptian\" | \"rider-waite\"\nexport type TarotDeckId = Deck;\nexport type TarotTreeId = SystemKey;\n\nexport const DEFAULT_TAROT_TREE_ID: TarotTreeId = \"kaabalah\";\n\nexport const TAROT_TREE_IDS = [\n \"kaabalah\",\n \"hermetic-qabalah\",\n \"lurianic-kabbalah\"\n] as const satisfies readonly TarotTreeId[];\n\nexport type MajorArcana =\n | \"01_the_magician\"\n | \"02_the_high_priestess\"\n | \"03_the_empress\"\n | \"04_the_emperor\"\n | \"05_the_hierophant\"\n | \"06_the_lover\"\n | \"07_the_chariot\"\n | \"08_justice\"\n | \"09_the_hermit\"\n | \"10_the_wheel_of_fortune\"\n | \"11_strength\"\n | \"12_the_hanged_man\"\n | \"13_death\"\n | \"14_temperance\"\n | \"15_the_devil\"\n | \"16_the_house_of_god\"\n | \"17_the_star\"\n | \"18_the_moon\"\n | \"19_the_sun\"\n | \"20_judgement\"\n | \"21_the_fool\"\n | \"22_the_world\"\n\nexport type TarotCard = {\n number: number\n tarotCard: string\n tarotCardFilename: string\n egyptianCardName?: string\n meaning: string\n papusMeaning?: string\n type: \"major\" | \"minor\" | \"daat+royalship\"\n deck: Deck\n suit?: string\n isInverted?: boolean\n}\n\nexport const majorArcana: MajorArcana[] = [\n \"01_the_magician\",\n \"02_the_high_priestess\",\n \"03_the_empress\",\n \"04_the_emperor\",\n \"05_the_hierophant\",\n \"06_the_lover\",\n \"07_the_chariot\",\n \"08_justice\",\n \"09_the_hermit\",\n \"10_the_wheel_of_fortune\",\n \"11_strength\",\n \"12_the_hanged_man\",\n \"13_death\",\n \"14_temperance\",\n \"15_the_devil\",\n \"16_the_house_of_god\",\n \"17_the_star\",\n \"18_the_moon\",\n \"19_the_sun\",\n \"20_judgement\",\n \"21_the_fool\",\n \"22_the_world\"\n]\n\n// Base card catalog. The exported ARKANNUS list is normalized below so its\n// numbers always reflect the canonical kaabalah tree correspondences.\nconst RAW_ARKANNUS: TarotCard[] = [\n // Major Arcana (1-22)\n {\n number: 1,\n tarotCard: \"The Magician\",\n tarotCardFilename: \"01_the_magician\",\n meaning: \"Abracadabra, the power to create reality through voice\",\n papusMeaning: \"Male inquirer.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 2,\n tarotCard: \"The High Priestess\",\n tarotCardFilename: \"02_the_high_priestess\",\n meaning:\n \"Intuition, the power to rewrite your book of life improving your life every instant\",\n papusMeaning: \"Female inquirer.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 3,\n tarotCard: \"The Empress\",\n tarotCardFilename: \"03_the_empress\",\n meaning: \"Adaptation, the power to geometrize through emotions\",\n papusMeaning: \"Action. Initiative.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 4,\n tarotCard: \"The Emperor\",\n tarotCardFilename: \"04_the_emperor\",\n meaning: \"Authority, the power to mark your territory with the sacred fire\",\n papusMeaning: \"Will.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 5,\n tarotCard: \"The Hierophant\",\n tarotCardFilename: \"05_the_hierophant\",\n meaning:\n \"Magnetism, the power to ritualize life and circulate the quintessence\",\n papusMeaning: \"Inspiration.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 6,\n tarotCard: \"The Lover\",\n tarotCardFilename: \"06_the_lover\",\n meaning:\n \"Dichotomy, stay on the middle path by being neither a victim nor a villain\",\n papusMeaning: \"Love.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 7,\n tarotCard: \"The Chariot\",\n tarotCardFilename: \"07_the_chariot\",\n meaning: \"Merkaabah, take control and build your merkaabah (mind vehicle)\",\n papusMeaning: \"Triumph. Providential protection.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 8,\n tarotCard: \"Justice\",\n tarotCardFilename: \"08_justice\",\n meaning: \"Justice, be just with yourself to be just with others\",\n papusMeaning: \"Justice.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 9,\n tarotCard: \"The Hermit\",\n tarotCardFilename: \"09_the_hermit\",\n meaning: \"Introspection, seek within, retreat\",\n papusMeaning: \"Prudence.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 10,\n tarotCard: \"The Wheel of Fortune\",\n tarotCardFilename: \"10_the_wheel_of_fortune\",\n meaning:\n \"Loops, extroversion, break the great wheel and ascend, seek externally\",\n papusMeaning: \"Fortune. Destiny.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 11,\n tarotCard: \"Strength\",\n tarotCardFilename: \"11_strength\",\n meaning: \"The strength of your subconscious, unity brings strength\",\n papusMeaning: \"Strength. Fortitude.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 12,\n tarotCard: \"The Hanged Man\",\n tarotCardFilename: \"12_the_hanged_man\",\n meaning: \"Make valid sacrifices, adopt a new perspective\",\n papusMeaning: \"Trials. Sacrifice.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 13,\n tarotCard: \"Death\",\n tarotCardFilename: \"13_death\",\n meaning: \"Death, renovation, kill that which kills your soul\",\n papusMeaning: \"Death.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 14,\n tarotCard: \"Temperance\",\n tarotCardFilename: \"14_temperance\",\n meaning: \"Balance, harmonize differences\",\n papusMeaning: \"Temperance. Economy.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 15,\n tarotCard: \"The Devil\",\n tarotCardFilename: \"15_the_devil\",\n meaning:\n \"Indecision between vice and virtue, transmute weakness and passions into strengths\",\n papusMeaning: \"Immense force. Illness.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 16,\n tarotCard: \"The Tower\",\n tarotCardFilename: \"16_the_house_of_god\",\n meaning:\n \"Separation, destruction, separate from what's harmful and connect with what's helpful, make room for the new\",\n papusMeaning: \"Ruin. Deception.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 17,\n tarotCard: \"The Star\",\n tarotCardFilename: \"17_the_star\",\n meaning:\n \"Fecundation, ecology, ecstasy, hope, renew yourself to maintain health, act according to your spiritual purpose\",\n papusMeaning: \"Hope.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 18,\n tarotCard: \"The Moon\",\n tarotCardFilename: \"18_the_moon\",\n meaning:\n \"Hidden enemies, be vigilant, recognize where you're self sabotaging\",\n papusMeaning: \"Hidden enemies. Danger.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 19,\n tarotCard: \"The Sun\",\n tarotCardFilename: \"19_the_sun\",\n meaning:\n \"Be conscious of your alchemical band, transmute money into knowledge and vice versa\",\n papusMeaning: \"Material happiness. Lucky marriage.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 20,\n tarotCard: \"Judgment\",\n tarotCardFilename: \"20_judgement\",\n meaning: \"Make retrospectives and learn from mistakes and successes\",\n papusMeaning: \"Change of position.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 21,\n tarotCard: \"The Fool\",\n tarotCardFilename: \"21_the_fool\",\n meaning: \"Stop walking in circles, create connections of knowledge\",\n papusMeaning: \"Inconsiderate actions. Madness.\",\n type: \"major\",\n deck: \"mythic\"\n },\n {\n number: 22,\n tarotCard: \"The World\",\n tarotCardFilename: \"22_the_world\",\n meaning: \"Win the world, start acting on the world of causes\",\n papusMeaning: \"Assured success.\",\n type: \"major\",\n deck: \"mythic\"\n },\n\n // Da'at Royalship - Wands (23-26)\n {\n number: 23,\n tarotCard: \"King of Wands\",\n tarotCardFilename: \"king_wands\",\n egyptianCardName: \"The Laborer\",\n meaning: \"Get's the best out of every one, Idealism, Magnanimity\",\n papusMeaning:\n \"A dark man, a friend. He generally represents a married man, the father of a family.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"wands\"\n },\n {\n number: 24,\n tarotCard: \"Queen of Wands\",\n tarotCardFilename: \"queen_wands\",\n egyptianCardName: \"The Weaver\",\n meaning:\n \"Hold the line while the king goes to work, Preserve what was conquered\",\n papusMeaning:\n \"A dark woman, a friend. Represents a serious woman, a very good counsellor, often the mother of a family.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"wands\"\n },\n {\n number: 25,\n tarotCard: \"Knight of Wands\",\n tarotCardFilename: \"knight_wands\",\n egyptianCardName: \"The Argonaut\",\n meaning: \"Dreams that become reality\",\n papusMeaning: \"A dark young man, a friend.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"wands\"\n },\n {\n number: 26,\n tarotCard: \"Page of Wands\",\n tarotCardFilename: \"page_wands\",\n egyptianCardName: \"The Prodigy\",\n meaning: \"Don't rush, the precipitations are the doors to failure\",\n papusMeaning:\n \"A dark child, a friend. Also represents a message from a near relation.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"wands\"\n },\n\n // Minor Arcana - Wands (27-36)\n {\n number: 27,\n tarotCard: \"Ace of Wands\",\n tarotCardFilename: \"ace_wands\",\n egyptianCardName: \"Initiation\",\n meaning: \"Ignite the flames of ideals, Trust in your inner divinity\",\n papusMeaning: \"Commencement of an enterprise.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"wands\"\n },\n {\n number: 28,\n tarotCard: \"Two of Wands\",\n tarotCardFilename: \"2_wands\",\n egyptianCardName: \"Desolation\",\n meaning: \"Formulate a strategy to use your own talents\",\n papusMeaning:\n \"Opposition to the commencement of the enterprise. The enterprise is commenced when an unexpected obstacle suddenly prevents its execution.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"wands\"\n },\n {\n number: 29,\n tarotCard: \"Three of Wands\",\n tarotCardFilename: \"3_wands\",\n egyptianCardName: \"Innovation\",\n meaning: \"Keep going despite losing something apparently important\",\n papusMeaning:\n \"Realization of the commencement of the enterprise. The basis of the work is now definitely established, and the undertaking can be fearlessly continued.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"wands\"\n },\n {\n number: 30,\n tarotCard: \"Four of Wands\",\n tarotCardFilename: \"4_wands\",\n egyptianCardName: \"Alliance\",\n meaning: \"Work in teams\",\n papusMeaning:\n \"Obstacles to the enterprise.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"wands\"\n },\n {\n number: 31,\n tarotCard: \"Five of Wands\",\n tarotCardFilename: \"5_wands\",\n egyptianCardName: \"Magnificence\",\n meaning: \"Strengthen the root chakra, overcome internal fears\",\n papusMeaning: \"Opposition to the obstacles. Victory after surmounting them.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"wands\"\n },\n {\n number: 32,\n tarotCard: \"Six of Wands\",\n tarotCardFilename: \"6_wands\",\n egyptianCardName: \"Impediment\",\n meaning: \"External victory, internal lack of internal self realization\",\n papusMeaning:\n \"Realization of the opposition. At last the obstacles succeed. Failure of the enterprise in the midst of its execution.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"wands\"\n },\n {\n number: 33,\n tarotCard: \"Seven of Wands\",\n tarotCardFilename: \"7_wands\",\n egyptianCardName: \"Exchange\",\n meaning: \"Face competitors in an ethical and loyal way\",\n papusMeaning: \"Certain success to the enterprise.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"wands\"\n },\n {\n number: 34,\n tarotCard: \"Eight of Wands\",\n tarotCardFilename: \"8_wands\",\n egyptianCardName: \"Domesticity\",\n meaning: \"Travel to the center of peace and intelligence\",\n papusMeaning:\n \"Opposition to its success. The enterprise will only partially succeed.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"wands\"\n },\n {\n number: 35,\n tarotCard: \"Nine of Wands\",\n tarotCardFilename: \"9_wands\",\n egyptianCardName: \"Uncertainty\",\n meaning: \"Obstacle that precedes total victory, gather hidden forces\",\n papusMeaning: \"Realization of success. Success is continued.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"wands\"\n },\n {\n number: 36,\n tarotCard: \"Ten of Wands\",\n tarotCardFilename: \"10_wands\",\n egyptianCardName: \"The Unexpected\",\n meaning:\n \"Get out of apathy, create a new tree of life using the Lightning Path\",\n papusMeaning: \"Uncertainty in the management of the enterprise.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"wands\"\n },\n\n // Da'at Royalship - Cups (37-40)\n {\n number: 37,\n tarotCard: \"King of Cups\",\n tarotCardFilename: \"king_cups\",\n egyptianCardName: \"Art and Science\",\n meaning:\n \"Stop hurting yourself (related to The Lover), heals everyone and forgets about yourself, balm for your own wound\",\n papusMeaning:\n \"A fair man, a friend. This card also represents a barrister, judge, or ecclesiastic. It symbolizes a bachelor.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"cups\"\n },\n {\n number: 38,\n tarotCard: \"Queen of Cups\",\n tarotCardFilename: \"queen_cups\",\n egyptianCardName: \"Duplicity\",\n meaning: \"Work with subtlety, positive challenges\",\n papusMeaning:\n \"A fair woman, a friend. The woman loved. The mistress.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"cups\"\n },\n {\n number: 39,\n tarotCard: \"Knight of Cups\",\n tarotCardFilename: \"knight_cups\",\n egyptianCardName: \"Testimony\",\n meaning: \"Alternative healing\",\n papusMeaning:\n \"A young fair man, a friend. The young man loved. The lover.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"cups\"\n },\n {\n number: 40,\n tarotCard: \"Page of Cups\",\n tarotCardFilename: \"page_cups\",\n egyptianCardName: \"Premonition\",\n meaning: \"Increase of self-esteem, emotional courage\",\n papusMeaning: \"A fair child. A messenger. Birth.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"cups\"\n },\n\n // Minor Arcana - Cups (41-50)\n {\n number: 41,\n tarotCard: \"Ace of Cups\",\n tarotCardFilename: \"ace_cups\",\n egyptianCardName: \"Attraction\",\n meaning: \"Renewal or new affection, alternative treatment for health\",\n papusMeaning: \"Commencement of a love affair.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"cups\"\n },\n {\n number: 42,\n tarotCard: \"Two of Cups\",\n tarotCardFilename: \"2_cups\",\n egyptianCardName: \"Versatility\",\n meaning: \"Do not poison yourself or the other person\",\n papusMeaning:\n \"Opposition to this commencement. Unimportant obstacles raised by one of the lovers.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"cups\"\n },\n {\n number: 43,\n tarotCard: \"Three of Cups\",\n tarotCardFilename: \"3_cups\",\n egyptianCardName: \"Consummation\",\n meaning: \"Harmony between instinct and emotion, Be discreet\",\n papusMeaning:\n \"Realization of this commencement. The love is mutual.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"cups\"\n },\n {\n number: 44,\n tarotCard: \"Four of Cups\",\n tarotCardFilename: \"4_cups\",\n egyptianCardName: \"Conjecture\",\n meaning: \"Abundance in emotional life, do not listen to slander\",\n papusMeaning:\n \"Serious obstacles to the love. They arise from other persons, not from the lovers.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"cups\"\n },\n {\n number: 45,\n tarotCard: \"Five of Cups\",\n tarotCardFilename: \"5_cups\",\n egyptianCardName: \"Patrimony\",\n meaning: \"Do not break your spiritual commitment (your purpose)\",\n papusMeaning:\n \"Opposition to the obstacles. Victory over the obstacles after a struggle.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"cups\"\n },\n {\n number: 46,\n tarotCard: \"Six of Cups\",\n tarotCardFilename: \"6_cups\",\n egyptianCardName: \"Regeneration\",\n meaning: \"Do not have self-pity\",\n papusMeaning:\n \"The obstacles triumph. Love destroyed in the midst of happiness. Widowhood.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"cups\"\n },\n {\n number: 47,\n tarotCard: \"Seven of Cups\",\n tarotCardFilename: \"7_cups\",\n egyptianCardName: \"Expressiveness\",\n meaning: \"Gestations, related to The Star\",\n papusMeaning: \"Success assured to the lovers.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"cups\"\n },\n {\n number: 48,\n tarotCard: \"Eight of Cups\",\n tarotCardFilename: \"8_cups\",\n egyptianCardName: \"Delusion\",\n meaning: \"Reflect on your emotional life after 18 hours\",\n papusMeaning:\n \"Partial failure of love. Love only partially succeeds.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"cups\"\n },\n {\n number: 49,\n tarotCard: \"Nine of Cups\",\n tarotCardFilename: \"9_cups\",\n egyptianCardName: \"Preeminence\",\n meaning: \"Reconciliations and forgiveness\",\n papusMeaning: \"Motherhood.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"cups\"\n },\n {\n number: 50,\n tarotCard: \"Ten of Cups\",\n tarotCardFilename: \"10_cups\",\n egyptianCardName: \"Dissension\",\n meaning: \"Marriage of the spirit with the soul, Alchemical Weddings\",\n papusMeaning:\n \"Uncertainty in the management of the love affair.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"cups\"\n },\n\n // Da'at Royalship - Swords (51-54)\n {\n number: 51,\n tarotCard: \"King of Swords\",\n tarotCardFilename: \"king_swords\",\n egyptianCardName: \"Advice\",\n meaning: \"Actions of victorious strategies\",\n papusMeaning:\n \"A dark, bad man. He is a soldier, a powerful enemy, who must be distrusted.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"swords\"\n },\n {\n number: 52,\n tarotCard: \"Queen of Swords\",\n tarotCardFilename: \"queen_swords\",\n egyptianCardName: \"Premeditation\",\n meaning: \"Supremacy of the feminine, related to Justice\",\n papusMeaning:\n \"A dark wicked woman. The card also indicates her actions, gossip and calumnies.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"swords\"\n },\n {\n number: 53,\n tarotCard: \"Knight of Swords\",\n tarotCardFilename: \"knight_swords\",\n egyptianCardName: \"Hostility\",\n meaning: \"Joint victorious actions\",\n papusMeaning:\n \"A young, dark man, an enemy. He is also a spy.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"swords\"\n },\n {\n number: 54,\n tarotCard: \"Page of Swords\",\n tarotCardFilename: \"page_swords\",\n egyptianCardName: \"Examination\",\n meaning: \"Follow your intuition\",\n papusMeaning: \"A child, an enemy. Bad news. Delay.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"swords\"\n },\n\n // Minor Arcana - Swords (55-64)\n {\n number: 55,\n tarotCard: \"Ace of Swords\",\n tarotCardFilename: \"ace_swords\",\n egyptianCardName: \"Vehemence\",\n meaning: \"Conflicts before victory\",\n papusMeaning: \"Commencement of enmity.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"swords\"\n },\n {\n number: 56,\n tarotCard: \"Two of Swords\",\n tarotCardFilename: \"2_swords\",\n egyptianCardName: \"Communion\",\n meaning: \"Traumas and conflicts to be overcome\",\n papusMeaning:\n \"Opposition to this commencement. The enmity does not last.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"swords\"\n },\n {\n number: 57,\n tarotCard: \"Three of Swords\",\n tarotCardFilename: \"3_swords\",\n egyptianCardName: \"Proscription\",\n meaning: \"Death of yang, Fire, tendencies to depression\",\n papusMeaning: \"Realization of the enmity. Hatred.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"swords\"\n },\n {\n number: 58,\n tarotCard: \"Four of Swords\",\n tarotCardFilename: \"4_swords\",\n egyptianCardName: \"Solitude\",\n meaning: \"Reflection, related to The Hermit\",\n papusMeaning: \"Opposition to the hatred. Success against the enemy.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"swords\"\n },\n {\n number: 59,\n tarotCard: \"Five of Swords\",\n tarotCardFilename: \"5_swords\",\n egyptianCardName: \"Evolution\",\n meaning: \"Healthy self-challenge, Self-demands\",\n papusMeaning:\n \"Opposition to this opposition. The enemy triumphs at the moment one fancies the victory is secured.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"swords\"\n },\n {\n number: 60,\n tarotCard: \"Six of Swords\",\n tarotCardFilename: \"6_swords\",\n egyptianCardName: \"Revelation\",\n meaning: \"External daily strategies, Future perspectives\",\n papusMeaning:\n \"Equilibrium of the opposition. The enemy is rendered powerless at last.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"swords\"\n },\n {\n number: 61,\n tarotCard: \"Seven of Swords\",\n tarotCardFilename: \"7_swords\",\n egyptianCardName: \"Meditation\",\n meaning: \"Internal nocturnal strategies, related to The Hermit\",\n papusMeaning: \"Success assured to the enemy.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"swords\"\n },\n {\n number: 62,\n tarotCard: \"Eight of Swords\",\n tarotCardFilename: \"8_swords\",\n egyptianCardName: \"Rivalry\",\n meaning: \"Appeal to superior forces, Internal and external conflicts\",\n papusMeaning:\n \"Partial opposition to this success. The enemy only partially triumphs.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"swords\"\n },\n {\n number: 63,\n tarotCard: \"Nine of Swords\",\n tarotCardFilename: \"9_swords\",\n egyptianCardName: \"Pilgrimage\",\n meaning: \"The problems being imagined will never happen\",\n papusMeaning: \"Certain duration of the hatred.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"swords\"\n },\n {\n number: 64,\n tarotCard: \"Ten of Swords\",\n tarotCardFilename: \"10_swords\",\n egyptianCardName: \"Contrition\",\n meaning: \"Death and rebirth, related to Death and The Tower\",\n papusMeaning: \"Uncertainty in the enmity.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"swords\"\n },\n\n // Da'at Royalship - Pentacles (65-68)\n {\n number: 65,\n tarotCard: \"King of Pentacles\",\n tarotCardFilename: \"king_pentacles\",\n egyptianCardName: \"Apprenticeship\",\n meaning: \"Turns everything into gold\",\n papusMeaning: \"A fair man, inimical or indifferent.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"pentacles\"\n },\n {\n number: 66,\n tarotCard: \"Queen of Pentacles\",\n tarotCardFilename: \"queen_pentacles\",\n egyptianCardName: \"Perplexity\",\n meaning: \"Act with diplomacy\",\n papusMeaning: \"A fair woman, indifferent, or inimical.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"pentacles\"\n },\n {\n number: 67,\n tarotCard: \"Knight of Pentacles\",\n tarotCardFilename: \"knight_pentacles\",\n egyptianCardName: \"Veneration\",\n meaning: \"Invest into new things\",\n papusMeaning: \"A young, fair man. A stranger. An arrival.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"pentacles\"\n },\n {\n number: 68,\n tarotCard: \"Page of Pentacles\",\n tarotCardFilename: \"page_pentacles\",\n egyptianCardName: \"Speculation\",\n meaning: \"Prudence in the material life\",\n papusMeaning: \"A fair child. A messenger. A letter.\",\n type: \"daat+royalship\",\n deck: \"egyptian\",\n suit: \"pentacles\"\n },\n\n // Minor Arcana - Pentacles (69-78)\n {\n number: 69,\n tarotCard: \"Ace of Pentacles\",\n tarotCardFilename: \"ace_pentacles\",\n egyptianCardName: \"Rebirth\",\n meaning:\n \"Rebirth through a single material goal, Form clear material goals\",\n papusMeaning: \"Commencement of fortune. Inheritance. Gifts. Economy.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"pentacles\"\n },\n {\n number: 70,\n tarotCard: \"Two of Pentacles\",\n tarotCardFilename: \"2_pentacles\",\n egyptianCardName: \"Confusion\",\n meaning:\n \"Light forming shadows, Duality asking for synthesis in the trinity, Don't put all the eggs in the same basket\",\n papusMeaning:\n \"Opposition to this commencement. Difficulty in well establishing the first landmarks of good fortune.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"pentacles\"\n },\n {\n number: 71,\n tarotCard: \"Three of Pentacles\",\n tarotCardFilename: \"3_pentacles\",\n egyptianCardName: \"The Provider\",\n meaning:\n \"Light forming sound, Establish balance through the trinity becoming a great dispenser, Verbalize what should be done, Do not settle for the first results\",\n papusMeaning:\n \"Realization of this commencement of fortune. A small sum.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"pentacles\"\n },\n {\n number: 72,\n tarotCard: \"Four of Pentacles\",\n tarotCardFilename: \"4_pentacles\",\n egyptianCardName: \"Generosity\",\n meaning: \"Avoid avarice / greed\",\n papusMeaning: \"Opposition of fortune. Loss of money.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"pentacles\"\n },\n {\n number: 73,\n tarotCard: \"Five of Pentacles\",\n tarotCardFilename: \"5_pentacles\",\n egyptianCardName: \"Offering\",\n meaning:\n \"Only order will bring progress, Do not kick the barn without having something concrete in front of you\",\n papusMeaning:\n \"Opposition to this opposition. A success coming which will balance the low.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"pentacles\"\n },\n {\n number: 74,\n tarotCard: \"Six of Pentacles\",\n tarotCardFilename: \"6_pentacles\",\n egyptianCardName: \"Love and Desire\",\n meaning: \"Act with prudence\",\n papusMeaning: \"Realization of the opposition. Ruin.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"pentacles\"\n },\n {\n number: 75,\n tarotCard: \"Seven of Pentacles\",\n tarotCardFilename: \"7_pentacles\",\n egyptianCardName: \"Purification\",\n meaning: \"Don't boast about your proposal or project\",\n papusMeaning: \"Success assured. A large fortune.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"pentacles\"\n },\n {\n number: 76,\n tarotCard: \"Eight of Pentacles\",\n tarotCardFilename: \"8_pentacles\",\n egyptianCardName: \"Avarice\",\n meaning: \"Keep doing what you always did\",\n papusMeaning:\n \"Partial success. Great loss of money at the moment apparently of definitely securing the fortune.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"pentacles\"\n },\n {\n number: 77,\n tarotCard: \"Nine of Pentacles\",\n tarotCardFilename: \"9_pentacles\",\n egyptianCardName: \"Cooperation\",\n meaning: \"Work with what you like and earn something with it\",\n papusMeaning: \"Equilibrium of equilibrium. A durable fortune.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"pentacles\"\n },\n {\n number: 78,\n tarotCard: \"Ten of Pentacles\",\n tarotCardFilename: \"10_pentacles\",\n egyptianCardName: \"The Unforeseen\",\n meaning: \"Prosperity, Prosperous inheritance\",\n papusMeaning:\n \"Uncertainty in the fortune. Great success and great reverses.\",\n type: \"minor\",\n deck: \"egyptian\",\n suit: \"pentacles\"\n }\n]\n\n\nconst sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms))\n\nconst shuffleArray = <T,>(array: T[]): T[] => {\n const newArray = [...array]\n for (let i = newArray.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n\n [newArray[i], newArray[j]] = [newArray[j], newArray[i]];\n }\n return newArray\n}\n\n/**\n * Shuffles a deck of tarot cards and optionally includes inverted cards\n * @param cards - Array of tarot cards to shuffle\n * @param includeInvertedCards - Whether to include inverted cards in the shuffle\n * @param shuffleCount - Number of times to shuffle the deck (default: 6)\n * @param shuffleDelay - Delay between shuffles in milliseconds (default: 300)\n * @returns Promise that resolves to the shuffled deck\n */\nexport async function shuffleTarotDeck(\n cards: TarotCard[],\n includeInvertedCards: boolean = false,\n shuffleCount: number = 6,\n shuffleDelay: number = 300\n): Promise<TarotCard[]> {\n let shuffledCards = shuffleArray([...cards]);\n\n if (includeInvertedCards) {\n const halfIndex = Math.floor(shuffledCards.length / 2);\n shuffledCards = [\n ...shuffledCards\n .slice(0, halfIndex)\n .map(card => ({ ...card, isInverted: true })),\n ...shuffledCards.slice(halfIndex)\n ];\n }\n\n for (let i = 0; i < shuffleCount; i++) {\n shuffledCards = shuffleArray(shuffledCards);\n await sleep(shuffleDelay);\n }\n\n return shuffledCards;\n}\n\ntype TarotDescriptiveDeckKey =\n | \"PAPUS_KAABALISTIC\"\n | \"PAPUS_DIVINATORY\"\n | \"KIER_EGYPTIAN\";\n\nexport interface TarotDeckMetadata {\n id: TarotDeckId;\n label: string;\n}\n\nexport interface TarotDeckDescription {\n name?: string;\n meaning?: string;\n reversedMeaning?: string;\n keywords?: string[];\n}\n\nexport type TarotAstrologyCorrespondenceType =\n | WesternAstrologyTypes.PLANET\n | WesternAstrologyTypes.WESTERN_ZODIAC_SIGN\n | WesternAstrologyTypes.WESTERN_ELEMENT;\n\nexport interface TarotAstrologyCorrespondence {\n type: TarotAstrologyCorrespondenceType;\n id: NodeId<TarotAstrologyCorrespondenceType>;\n label: string;\n}\n\nexport interface TarotArchetype {\n canonicalId: NodeId<KaabalahTypes.PATH>;\n kind: \"major\";\n pathId: NodeId<KaabalahTypes.PATH>;\n pathNumber: number;\n pathSlug: string;\n hebrewLetterId: NodeId<LetterTypes.HEBREW_LETTER>;\n hebrewLetter: string;\n pathMeaning?: string;\n tarotArkAnnuId: NodeId<TarotTypes.TAROT_ARK_ANNU>;\n tarotCardNumber: number;\n tarotCardName: string;\n tarotCardFilename: MajorArcana;\n tarotMeaning?: string;\n astrology: TarotAstrologyCorrespondence[];\n availableDeckIds: TarotDeckId[];\n descriptionsByDeck: Partial<Record<TarotDeckId, TarotDeckDescription>>;\n}\n\nexport type TarotArchetypeLookup =\n | { pathSlug: string }\n | { pathId: NodeId<KaabalahTypes.PATH> }\n | { tarotCardFilename: MajorArcana | string }\n | { tarotCardNumber: number };\n\nexport type TarotCardKind = \"major\" | \"court\" | \"minor\";\nexport type TarotCourtRank = \"king\" | \"queen\" | \"knight\" | \"page\";\n\nexport type TarotAssetPathType = \"major\" | \"minor\" | \"daat+royalship\";\n\nexport interface TarotCardProfile {\n tarotArkAnnuId: NodeId<TarotTypes.TAROT_ARK_ANNU>;\n tarotCardNumber: number;\n tarotCardName: string;\n tarotCardFilename: string;\n tarotMeaning?: string;\n kind: TarotCardKind;\n assetPathType: TarotAssetPathType;\n suit?: string;\n courtRank?: TarotCourtRank;\n availableDeckIds: TarotDeckId[];\n descriptionsByDeck: Partial<Record<TarotDeckId, TarotDeckDescription>>;\n}\n\nexport type TarotImageLookup =\n | TarotArchetypeLookup\n | { tarotArkAnnuId: NodeId<TarotTypes.TAROT_ARK_ANNU> }\n | { tarotCardName: string };\n\nexport type TarotCorrespondenceNodeType =\n | KaabalahTypes.SPHERE\n | LetterTypes.HEBREW_LETTER\n | WesternAstrologyTypes.PLANET\n | WesternAstrologyTypes.WESTERN_ZODIAC_SIGN\n | WesternAstrologyTypes.WESTERN_ELEMENT;\n\nexport interface TarotCorrespondenceNode<T extends TarotCorrespondenceNodeType> {\n id: NodeId<T>;\n label: string;\n}\n\nexport interface TarotPathCorrespondence {\n pathId: NodeId<KaabalahTypes.PATH>;\n pathNumber: number;\n pathSlug: string;\n meaning?: string;\n hebrewLetter: TarotCorrespondenceNode<LetterTypes.HEBREW_LETTER>;\n fromSphere: TarotCorrespondenceNode<KaabalahTypes.SPHERE>;\n toSphere: TarotCorrespondenceNode<KaabalahTypes.SPHERE>;\n}\n\nexport interface TarotCorrespondenceProfileBase {\n tarotArkAnnuId: NodeId<TarotTypes.TAROT_ARK_ANNU>;\n tarotCardNumber: number;\n tarotCardName: string;\n tarotCardFilename: string;\n tarotMeaning?: string;\n suit?: string;\n}\n\nexport interface TarotMajorCorrespondenceProfile\n extends TarotCorrespondenceProfileBase {\n kind: \"major\";\n correspondences: {\n astrology: TarotAstrologyCorrespondence[];\n path: TarotPathCorrespondence;\n };\n}\n\nexport interface TarotPageCorrespondenceProfile\n extends TarotCorrespondenceProfileBase {\n kind: \"court\";\n courtRank: \"page\";\n correspondences: {\n element: TarotCorrespondenceNode<WesternAstrologyTypes.WESTERN_ELEMENT>;\n };\n}\n\nexport interface TarotCourtAstrologyCorrespondenceProfile\n extends TarotCorrespondenceProfileBase {\n kind: \"court\";\n courtRank: Exclude<TarotCourtRank, \"page\">;\n correspondences: {\n sign: TarotCorrespondenceNode<WesternAstrologyTypes.WESTERN_ZODIAC_SIGN>;\n planets: TarotCorrespondenceNode<WesternAstrologyTypes.PLANET>[];\n };\n}\n\nexport interface TarotMinorCorrespondenceProfile\n extends TarotCorrespondenceProfileBase {\n kind: \"minor\";\n correspondences: {\n sphere: TarotCorrespondenceNode<KaabalahTypes.SPHERE>;\n planets: TarotCorrespondenceNode<WesternAstrologyTypes.PLANET>[];\n };\n}\n\nexport type TarotCorrespondenceProfile =\n | TarotMajorCorrespondenceProfile\n | TarotPageCorrespondenceProfile\n | TarotCourtAstrologyCorrespondenceProfile\n | TarotMinorCorrespondenceProfile;\n\nexport interface TarotRepresentation {\n card: TarotCardProfile;\n archetype?: TarotArchetype;\n deck: TarotDeckMetadata;\n assetPath: string;\n imageUrl: string;\n label: string;\n altText: string;\n cardLabel: string;\n description?: TarotDeckDescription;\n}\n\nexport const TAROT_IMAGE_BASE_URL =\n \"https://kaabalah-app.s3.us-east-1.amazonaws.com/tarot\";\n\ntype TarotDeckConfig = TarotDeckMetadata & {\n descriptiveDataKey?: TarotDescriptiveDeckKey;\n};\n\nconst TAROT_DECK_METADATA: readonly TarotDeckConfig[] = [\n {\n id: \"papus_pt\",\n label: \"Papus Kaabalistic\",\n descriptiveDataKey: \"PAPUS_KAABALISTIC\"\n },\n {\n id: \"papus\",\n label: \"Papus Divinatory\",\n descriptiveDataKey: \"PAPUS_DIVINATORY\"\n },\n {\n id: \"mythic\",\n label: \"Mythic\"\n },\n {\n id: \"egyptian\",\n label: \"Egyptian\",\n descriptiveDataKey: \"KIER_EGYPTIAN\"\n },\n {\n id: \"rider-waite\",\n label: \"Rider Waite\"\n }\n] as const;\n\ntype TarotMajorCard = TarotCard & {\n type: \"major\";\n tarotCardFilename: MajorArcana;\n};\n\ntype TarotArchetypeCache = {\n archetypes: TarotArchetype[];\n byPathId: Map<string, TarotArchetype>;\n byPathSlug: Map<string, TarotArchetype>;\n byTarotCardFilename: Map<string, TarotArchetype>;\n byTarotCardNumber: Map<number, TarotArchetype>;\n};\n\ntype TarotCardProfileCache = {\n profiles: TarotCardProfile[];\n byTarotArkAnnuId: Map<string, TarotCardProfile>;\n byTarotCardName: Map<string, TarotCardProfile>;\n byTarotCardFilename: Map<string, TarotCardProfile>;\n byTarotCardNumber: Map<number, TarotCardProfile>;\n};\n\nlet tarotArchetypeCache: TarotArchetypeCache | undefined;\nlet tarotCardProfileCache: TarotCardProfileCache | undefined;\n\nfunction normalizePathSlug(pathSlug: string): string {\n return pathSlug\n .trim()\n .replace(/^\\/?path\\//i, \"\")\n .toLowerCase();\n}\n\nfunction normalizeTarotLookupKey(value: string): string {\n return value.trim().toLowerCase();\n}\n\nconst TAROT_TREE_PARTS: Partial<Record<TarotTreeId, readonly [\"tarot\"]>> = {\n kaabalah: [\"tarot\"]\n};\n\nconst TAROT_ARK_ANNU_ID_BY_NAME = new Map(\n RAW_ARKANNUS.map((card) => [\n normalizeTarotLookupKey(card.tarotCard),\n id(TarotTypes.TAROT_ARK_ANNU, card.tarotCard)\n ] as const)\n);\n\nconst TAROT_ARK_ANNU_ID_BY_FILENAME = new Map(\n RAW_ARKANNUS.map((card) => [\n normalizeTarotLookupKey(card.tarotCardFilename),\n id(TarotTypes.TAROT_ARK_ANNU, card.tarotCard)\n ] as const)\n);\n\nfunction getTarotTreeWorkspace(treeId: TarotTreeId = DEFAULT_TAROT_TREE_ID) {\n const parts = TAROT_TREE_PARTS[treeId];\n\n if (!parts) {\n return undefined;\n }\n\n return getCanonicalTree({\n system: treeId,\n parts: [...parts]\n });\n}\n\nfunction getDirectTarotCardNumber(\n tarotArkAnnuId: NodeId<TarotTypes.TAROT_ARK_ANNU>,\n treeId: TarotTreeId = DEFAULT_TAROT_TREE_ID\n): number | undefined {\n const tree = getTarotTreeWorkspace(treeId);\n\n if (!tree) {\n return undefined;\n }\n\n const match = tree.getCorrespondences(tarotArkAnnuId, {\n type: NumerologyTypes.NUMBER,\n depth: 1,\n limit: 1\n })[0];\n\n if (!match) {\n return undefined;\n }\n\n return Number.parseInt(parseId(match.node.id), 10);\n}\n\nfunction buildDefaultArkannus(cards: TarotCard[]): TarotCard[] {\n const tree = getTarotTreeWorkspace(DEFAULT_TAROT_TREE_ID);\n const resolveNumber = (tarotCardName: string) => {\n if (!tree) {\n return undefined;\n }\n\n const match = tree.getCorrespondences(\n id(TarotTypes.TAROT_ARK_ANNU, tarotCardName),\n {\n type: NumerologyTypes.NUMBER,\n depth: 1,\n limit: 1\n }\n )[0];\n\n if (!match) {\n return undefined;\n }\n\n return Number.parseInt(parseId(match.node.id), 10);\n };\n\n return [...cards]\n .map((card) => ({\n ...card,\n number: resolveNumber(card.tarotCard) ?? card.number\n }))\n .sort((left, right) => {\n if (left.number !== right.number) {\n return left.number - right.number;\n }\n\n return left.tarotCard.localeCompare(right.tarotCard);\n });\n}\n\nexport const ARKANNUS: TarotCard[] = buildDefaultArkannus(RAW_ARKANNUS);\n\nconst TAROT_COURT_RANKS = [\n \"king\",\n \"queen\",\n \"knight\",\n \"page\"\n] as const satisfies readonly TarotCourtRank[];\n\nconst MAJOR_ARCANA_CARDS = ARKANNUS.filter(\n (card): card is TarotMajorCard =>\n card.type === \"major\" &&\n majorArcana.includes(card.tarotCardFilename as MajorArcana)\n);\n\nfunction toTarotCardKind(card: TarotCard): TarotCardKind {\n if (card.type === \"major\") {\n return \"major\";\n }\n\n return card.type === \"minor\" ? \"minor\" : \"court\";\n}\n\nfunction toTarotCourtRank(card: TarotCard): TarotCourtRank | undefined {\n if (card.type !== \"daat+royalship\") {\n return undefined;\n }\n\n const [rank] = card.tarotCardFilename.split(\"_\");\n return TAROT_COURT_RANKS.includes(rank as TarotCourtRank)\n ? (rank as TarotCourtRank)\n : undefined;\n}\n\nfunction toTarotAssetPathType(card: TarotCard): TarotAssetPathType {\n return card.type;\n}\n\nfunction buildTarotAssetPath(card: TarotCardProfile): string {\n if (card.assetPathType === \"major\") {\n return `major/${card.tarotCardFilename}`;\n }\n\n if (!card.suit) {\n throw new Error(\n `Missing suit metadata required to resolve tarot image path for ${card.tarotCardName}.`\n );\n }\n\n return `${card.assetPathType}/${card.suit}/${card.tarotCardFilename}`;\n}\n\nfunction toAstrologyCorrespondence<T extends TarotAstrologyCorrespondenceType>(\n node: Node<T>\n): TarotAstrologyCorrespondence {\n return {\n type: node.type,\n id: node.id,\n label: parseId(node.id)\n };\n}\n\nfunction getTarotCorrespondenceTree(\n treeId: TarotTreeId = DEFAULT_TAROT_TREE_ID\n) {\n return getCanonicalTree({\n system: treeId,\n parts: [\"westernAstrology\", \"tarot\"]\n });\n}\n\ntype TarotCorrespondenceResolvedNodeType =\n | TarotCorrespondenceNodeType\n | KaabalahTypes.PATH\n | NumerologyTypes.NUMBER\n | TarotTypes.TAROT_SUIT;\n\ntype TarotCorrespondenceSourceId = NodeId<\n | TarotTypes.TAROT_ARK_ANNU\n | KaabalahTypes.PATH\n | KaabalahTypes.SPHERE\n | TarotTypes.TAROT_SUIT\n | WesternAstrologyTypes.WESTERN_ZODIAC_SIGN\n>;\n\nfunction getCorrespondenceNodes<T extends TarotCorrespondenceResolvedNodeType>(\n tree: ReturnType<typeof getCanonicalTree>,\n sourceId: TarotCorrespondenceSourceId,\n type: T | readonly T[],\n depth: number = 1,\n limit?: number\n): Node<T>[] {\n return tree.getCorrespondences(sourceId, {\n type,\n depth,\n limit\n }).map(({ node }) => node as Node<T>);\n}\n\nfunction getFirstCorrespondenceNode<\n T extends TarotCorrespondenceResolvedNodeType\n>(\n tree: ReturnType<typeof getCanonicalTree>,\n sourceId: TarotCorrespondenceSourceId,\n type: T,\n depth: number = 1\n): Node<T> | undefined {\n return getCorrespondenceNodes(tree, sourceId, type, depth, 1)[0];\n}\n\nfunction toCorrespondenceNode<T extends TarotCorrespondenceNodeType>(\n node: Node<T> | undefined\n): TarotCorrespondenceNode<T> | undefined {\n if (!node) {\n return undefined;\n }\n\n return {\n id: node.id,\n label: parseId(node.id)\n };\n}\n\nfunction toUniqueCorrespondenceNodes<T extends TarotCorrespondenceNodeType>(\n nodes: Node<T>[]\n): TarotCorrespondenceNode<T>[] {\n const seen = new Set<string>();\n\n return nodes.flatMap((node) => {\n const key = String(node.id);\n\n if (seen.has(key)) {\n return [];\n }\n\n seen.add(key);\n return [toCorrespondenceNode(node)!];\n });\n}\n\nfunction toTarotCorrespondenceProfileBase(\n card: TarotCardProfile\n): TarotCorrespondenceProfileBase {\n return {\n tarotArkAnnuId: card.tarotArkAnnuId,\n tarotCardNumber: card.tarotCardNumber,\n tarotCardName: card.tarotCardName,\n tarotCardFilename: card.tarotCardFilename,\n tarotMeaning: card.tarotMeaning,\n suit: card.suit\n };\n}\n\nfunction resolveTarotCardProfileForTree(\n lookup: TarotImageLookup,\n treeId: TarotTreeId = DEFAULT_TAROT_TREE_ID\n): TarotCardProfile | undefined {\n if (\"tarotCardNumber\" in lookup) {\n return getTarotCardByNumber(lookup.tarotCardNumber, treeId);\n }\n\n return getTarotCardProfile(lookup);\n}\n\nfunction buildMajorCorrespondenceProfile(\n card: TarotCardProfile,\n tree: ReturnType<typeof getCanonicalTree>\n): TarotMajorCorrespondenceProfile | undefined {\n const pathNode = getFirstCorrespondenceNode(\n tree,\n card.tarotArkAnnuId,\n KaabalahTypes.PATH\n );\n const hebrewLetterNode = pathNode\n ? getFirstCorrespondenceNode(\n tree,\n pathNode.id,\n LetterTypes.HEBREW_LETTER\n )\n : undefined;\n const pathNumberNode = pathNode\n ? getFirstCorrespondenceNode(tree, pathNode.id, NumerologyTypes.NUMBER)\n : undefined;\n const pathNumber = pathNumberNode\n ? Number.parseInt(parseId(pathNumberNode.id), 10)\n : Number.NaN;\n const fromSphereNode = pathNode?.data?.from\n ? tree.getNode(pathNode.data.from)\n : undefined;\n const toSphereNode = pathNode?.data?.to\n ? tree.getNode(pathNode.data.to)\n : undefined;\n\n if (\n !pathNode ||\n !hebrewLetterNode ||\n !fromSphereNode ||\n !toSphereNode ||\n !Number.isFinite(pathNumber)\n ) {\n return undefined;\n }\n\n return {\n ...toTarotCorrespondenceProfileBase(card),\n kind: \"major\",\n correspondences: {\n astrology: getCorrespondenceNodes(\n tree,\n pathNode.id,\n [\n WesternAstrologyTypes.WESTERN_ELEMENT,\n WesternAstrologyTypes.PLANET,\n WesternAstrologyTypes.WESTERN_ZODIAC_SIGN\n ]\n ).map((node) =>\n toAstrologyCorrespondence(\n node as Node<TarotAstrologyCorrespondenceType>\n )\n ),\n path: {\n pathId: pathNode.id,\n pathNumber,\n pathSlug: parseId(hebrewLetterNode.id).toLowerCase(),\n meaning: pathNode.data?.meaning,\n hebrewLetter: toCorrespondenceNode(hebrewLetterNode)!,\n fromSphere: toCorrespondenceNode(\n fromSphereNode as Node<KaabalahTypes.SPHERE>\n )!,\n toSphere: toCorrespondenceNode(\n toSphereNode as Node<KaabalahTypes.SPHERE>\n )!\n }\n }\n };\n}\n\nfunction buildCourtCorrespondenceProfile(\n card: TarotCardProfile,\n tree: ReturnType<typeof getCanonicalTree>\n):\n | TarotPageCorrespondenceProfile\n | TarotCourtAstrologyCorrespondenceProfile\n | undefined {\n const suitNode = getFirstCorrespondenceNode(\n tree,\n card.tarotArkAnnuId,\n TarotTypes.TAROT_SUIT\n );\n\n if (!card.courtRank) {\n return undefined;\n }\n\n if (card.courtRank === \"page\") {\n const elementNode = suitNode\n ? getFirstCorrespondenceNode(\n tree,\n suitNode.id,\n WesternAstrologyTypes.WESTERN_ELEMENT\n )\n : undefined;\n\n if (!elementNode) {\n return undefined;\n }\n\n return {\n ...toTarotCorrespondenceProfileBase(card),\n kind: \"court\",\n courtRank: \"page\",\n correspondences: {\n element: toCorrespondenceNode(elementNode)!\n }\n };\n }\n\n const signNode = getFirstCorrespondenceNode(\n tree,\n card.tarotArkAnnuId,\n WesternAstrologyTypes.WESTERN_ZODIAC_SIGN\n );\n\n if (!signNode) {\n return undefined;\n }\n\n return {\n ...toTarotCorrespondenceProfileBase(card),\n kind: \"court\",\n courtRank: card.courtRank,\n correspondences: {\n sign: toCorrespondenceNode(signNode)!,\n planets: toUniqueCorrespondenceNodes(\n getCorrespondenceNodes(\n tree,\n signNode.id,\n WesternAstrologyTypes.PLANET\n )\n )\n }\n };\n}\n\nfunction buildMinorCorrespondenceProfile(\n card: TarotCardProfile,\n tree: ReturnType<typeof getCanonicalTree>\n): TarotMinorCorrespondenceProfile | undefined {\n const sphereNode = getFirstCorrespondenceNode(\n tree,\n card.tarotArkAnnuId,\n KaabalahTypes.SPHERE\n );\n\n if (!sphereNode) {\n return undefined;\n }\n\n return {\n ...toTarotCorrespondenceProfileBase(card),\n kind: \"minor\",\n correspondences: {\n sphere: toCorrespondenceNode(sphereNode)!,\n planets: toUniqueCorrespondenceNodes(\n getCorrespondenceNodes(tree, sphereNode.id, WesternAstrologyTypes.PLANET)\n )\n }\n };\n}\n\nfunction buildDescriptionsByDeck(\n tarotArkAnnu: Node<TarotTypes.TAROT_ARK_ANNU>\n): Partial<Record<TarotDeckId, TarotDeckDescription>> {\n const descriptions: Partial<Record<TarotDeckId, TarotDeckDescription>> = {};\n\n for (const deck of TAROT_DECK_METADATA) {\n if (!deck.descriptiveDataKey) {\n continue;\n }\n\n const description =\n tarotArkAnnu.data?.descriptiveData?.[deck.descriptiveDataKey];\n\n if (!description) {\n continue;\n }\n\n descriptions[deck.id] = { ...description };\n }\n\n return descriptions;\n}\n\nfunction getTarotArchetypeCache(): TarotArchetypeCache {\n if (tarotArchetypeCache) {\n return tarotArchetypeCache;\n }\n\n const tree = getCanonicalTree({\n system: \"kaabalah\",\n parts: [\"westernAstrology\", \"tarot\"]\n });\n\n const archetypes = MAJOR_ARCANA_CARDS.map((card) => {\n const pathId = id(KaabalahTypes.PATH, card.number);\n const path = tree.getNode(pathId);\n const hebrewLetter = tree.getCorrespondences(pathId, {\n type: LetterTypes.HEBREW_LETTER,\n limit: 1\n })[0]?.node;\n const tarotArkAnnu = tree.getCorrespondences(pathId, {\n type: TarotTypes.TAROT_ARK_ANNU,\n limit: 1\n })[0]?.node;\n\n if (!path || !hebrewLetter || !tarotArkAnnu) {\n throw new Error(\n `Missing canonical tarot archetype metadata for ${pathId}.`\n );\n }\n\n const astrology = tree.getCorrespondences(pathId, {\n type: [\n WesternAstrologyTypes.WESTERN_ELEMENT,\n WesternAstrologyTypes.PLANET,\n WesternAstrologyTypes.WESTERN_ZODIAC_SIGN\n ]\n }).map(({ node }) =>\n toAstrologyCorrespondence(\n node as Node<TarotAstrologyCorrespondenceType>\n )\n );\n\n const descriptionsByDeck = buildDescriptionsByDeck(tarotArkAnnu);\n\n return {\n canonicalId: pathId,\n kind: \"major\" as const,\n pathId,\n pathNumber: card.number,\n pathSlug: parseId(hebrewLetter.id).toLowerCase(),\n hebrewLetterId: hebrewLetter.id,\n hebrewLetter: parseId(hebrewLetter.id),\n pathMeaning: path.data?.meaning,\n tarotArkAnnuId: tarotArkAnnu.id,\n tarotCardNumber: card.number,\n tarotCardName: parseId(tarotArkAnnu.id),\n tarotCardFilename: card.tarotCardFilename,\n tarotMeaning:\n descriptionsByDeck.papus_pt?.meaning ??\n card.meaning,\n astrology,\n availableDeckIds: TAROT_DECK_METADATA.map((deck) => deck.id),\n descriptionsByDeck\n };\n });\n\n tarotArchetypeCache = {\n archetypes,\n byPathId: new Map(archetypes.map((archetype) => [archetype.pathId, archetype])),\n byPathSlug: new Map(\n archetypes.map((archetype) => [archetype.pathSlug, archetype])\n ),\n byTarotCardFilename: new Map(\n archetypes.map((archetype) => [archetype.tarotCardFilename, archetype])\n ),\n byTarotCardNumber: new Map(\n archetypes.map((archetype) => [archetype.tarotCardNumber, archetype])\n )\n };\n\n return tarotArchetypeCache;\n}\n\nfunction getTarotCardProfileCache(): TarotCardProfileCache {\n if (tarotCardProfileCache) {\n return tarotCardProfileCache;\n }\n\n const tree = getCanonicalTree({\n system: \"kaabalah\",\n parts: [\"westernAstrology\", \"tarot\"]\n });\n const availableDeckIds = TAROT_DECK_METADATA.map((deck) => deck.id);\n\n const profiles = ARKANNUS.map((card) => {\n const tarotArkAnnuId = id(TarotTypes.TAROT_ARK_ANNU, card.tarotCard);\n const tarotArkAnnu = tree.getNode(tarotArkAnnuId);\n\n if (!tarotArkAnnu) {\n throw new Error(`Missing canonical tarot metadata for ${tarotArkAnnuId}.`);\n }\n\n const descriptionsByDeck = buildDescriptionsByDeck(tarotArkAnnu);\n\n return {\n tarotArkAnnuId,\n tarotCardNumber: card.number,\n tarotCardName: card.tarotCard,\n tarotCardFilename: card.tarotCardFilename,\n tarotMeaning:\n descriptionsByDeck.papus_pt?.meaning ??\n card.meaning,\n kind: toTarotCardKind(card),\n assetPathType: toTarotAssetPathType(card),\n suit: card.suit,\n courtRank: toTarotCourtRank(card),\n availableDeckIds,\n descriptionsByDeck\n };\n });\n\n tarotCardProfileCache = {\n profiles,\n byTarotArkAnnuId: new Map(\n profiles.map((profile) => [String(profile.tarotArkAnnuId), profile])\n ),\n byTarotCardName: new Map(\n profiles.map((profile) => [\n normalizeTarotLookupKey(profile.tarotCardName),\n profile\n ])\n ),\n byTarotCardFilename: new Map(\n profiles.map((profile) => [\n normalizeTarotLookupKey(profile.tarotCardFilename),\n profile\n ])\n ),\n byTarotCardNumber: new Map(\n profiles.map((profile) => [profile.tarotCardNumber, profile])\n )\n };\n\n return tarotCardProfileCache;\n}\n\nfunction buildTarotRepresentation(\n card: TarotCardProfile,\n deck: TarotDeckConfig\n): TarotRepresentation {\n const description = card.descriptionsByDeck[deck.id];\n const assetPath = buildTarotAssetPath(card);\n const imageUrl = `${TAROT_IMAGE_BASE_URL}/${deck.id}/${assetPath}.jpg`;\n\n return {\n card,\n archetype: card.kind === \"major\"\n ? getTarotArchetype({ tarotCardNumber: card.tarotCardNumber })\n : undefined,\n deck: { id: deck.id, label: deck.label },\n assetPath,\n imageUrl,\n label: `${card.tarotCardName} - ${deck.label}`,\n altText: `${card.tarotCardName} - ${deck.label}`,\n cardLabel: description?.name ?? card.tarotCardName,\n description\n };\n}\n\nfunction resolveTarotArkAnnuId(\n lookup: TarotImageLookup\n): NodeId<TarotTypes.TAROT_ARK_ANNU> | undefined {\n if (\"pathSlug\" in lookup || \"pathId\" in lookup) {\n return getTarotArchetype(lookup)?.tarotArkAnnuId;\n }\n\n if (\"tarotArkAnnuId\" in lookup) {\n return lookup.tarotArkAnnuId;\n }\n\n if (\"tarotCardName\" in lookup) {\n return TAROT_ARK_ANNU_ID_BY_NAME.get(\n normalizeTarotLookupKey(lookup.tarotCardName)\n );\n }\n\n if (\"tarotCardFilename\" in lookup) {\n return TAROT_ARK_ANNU_ID_BY_FILENAME.get(\n normalizeTarotLookupKey(lookup.tarotCardFilename)\n );\n }\n\n return undefined;\n}\n\nexport function getTarotCardProfile(\n lookup: TarotImageLookup\n): TarotCardProfile | undefined {\n const cache = getTarotCardProfileCache();\n\n if (\"pathSlug\" in lookup || \"pathId\" in lookup) {\n const archetype = getTarotArchetype(lookup);\n return archetype\n ? cache.byTarotCardNumber.get(archetype.tarotCardNumber)\n : undefined;\n }\n\n if (\"tarotArkAnnuId\" in lookup) {\n return cache.byTarotArkAnnuId.get(String(lookup.tarotArkAnnuId));\n }\n\n if (\"tarotCardName\" in lookup) {\n return cache.byTarotCardName.get(\n normalizeTarotLookupKey(lookup.tarotCardName)\n );\n }\n\n if (\"tarotCardFilename\" in lookup) {\n return cache.byTarotCardFilename.get(\n normalizeTarotLookupKey(lookup.tarotCardFilename)\n );\n }\n\n return getTarotCardByNumber(lookup.tarotCardNumber);\n}\n\nexport function listTarotDecks(): TarotDeckMetadata[] {\n return TAROT_DECK_METADATA.map(({ id, label }) => ({ id, label }));\n}\n\nexport function listTarotTrees(): TarotTreeId[] {\n return [...TAROT_TREE_IDS];\n}\n\nexport function getTarotCardNumber(\n lookup: TarotImageLookup,\n treeId: TarotTreeId = DEFAULT_TAROT_TREE_ID\n): number | undefined {\n if (\"tarotCardNumber\" in lookup) {\n return getTarotCardByNumber(lookup.tarotCardNumber, treeId)\n ?.tarotCardNumber;\n }\n\n const tarotArkAnnuId = resolveTarotArkAnnuId(lookup);\n\n if (!tarotArkAnnuId) {\n return undefined;\n }\n\n return getDirectTarotCardNumber(tarotArkAnnuId, treeId);\n}\n\nexport function getTarotCardByNumber(\n cardNumber: number,\n treeId: TarotTreeId = DEFAULT_TAROT_TREE_ID\n): TarotCardProfile | undefined {\n const tree = getTarotTreeWorkspace(treeId);\n\n if (!tree) {\n return undefined;\n }\n\n const match = tree.getCorrespondences(id(NumerologyTypes.NUMBER, cardNumber), {\n type: TarotTypes.TAROT_ARK_ANNU,\n depth: 1,\n limit: 1\n })[0];\n\n if (!match) {\n return undefined;\n }\n\n const profile = getTarotCardProfile({\n tarotArkAnnuId: match.node.id as NodeId<TarotTypes.TAROT_ARK_ANNU>\n });\n\n if (!profile || profile.tarotCardNumber === cardNumber) {\n return profile;\n }\n\n return {\n ...profile,\n tarotCardNumber: cardNumber\n };\n}\n\nexport function getTarotArchetype(\n lookup: TarotArchetypeLookup\n): TarotArchetype | undefined {\n const cache = getTarotArchetypeCache();\n\n if (\"pathSlug\" in lookup) {\n return cache.byPathSlug.get(normalizePathSlug(lookup.pathSlug));\n }\n\n if (\"pathId\" in lookup) {\n return cache.byPathId.get(String(lookup.pathId));\n }\n\n if (\"tarotCardFilename\" in lookup) {\n return cache.byTarotCardFilename.get(\n lookup.tarotCardFilename.toLowerCase()\n );\n }\n\n return cache.byTarotCardNumber.get(lookup.tarotCardNumber);\n}\n\nexport function getTarotCorrespondenceProfile(\n lookup: TarotImageLookup,\n treeId: TarotTreeId = DEFAULT_TAROT_TREE_ID\n): TarotCorrespondenceProfile | undefined {\n const card = resolveTarotCardProfileForTree(lookup, treeId);\n\n if (!card) {\n return undefined;\n }\n\n const tree = getTarotCorrespondenceTree(treeId);\n\n switch (card.kind) {\n case \"major\":\n return buildMajorCorrespondenceProfile(card, tree);\n case \"court\":\n return buildCourtCorrespondenceProfile(card, tree);\n case \"minor\":\n return buildMinorCorrespondenceProfile(card, tree);\n }\n}\n\nexport function getTarotRepresentations(\n lookup: TarotImageLookup\n): TarotRepresentation[] {\n const card = getTarotCardProfile(lookup);\n\n if (!card) {\n return [];\n }\n\n return TAROT_DECK_METADATA.map((deck) =>\n buildTarotRepresentation(card, deck)\n );\n}\n\nexport function getTarotRepresentation(\n lookup: TarotImageLookup,\n deckId: TarotDeckId\n): TarotRepresentation | undefined {\n const card = getTarotCardProfile(lookup);\n const deck = TAROT_DECK_METADATA.find((candidate) => candidate.id === deckId);\n\n if (!card || !deck) {\n return undefined;\n }\n\n return buildTarotRepresentation(card, deck);\n}\n\nexport function resolveTarotImageUrl(\n lookup: TarotImageLookup,\n deckId: TarotDeckId\n): string | undefined {\n return getTarotRepresentation(lookup, deckId)?.imageUrl;\n}\n\nexport type TarotSpreadId =\n | \"quick-insight\"\n | \"conscious-reading\"\n | \"time-reading\"\n | \"dialectic-reading\"\n | \"tree-of-life-reading\"\n | \"celtic-cross\"\n | \"event-reading\";\n\nexport type TarotSpreadContextKey = \"inquirerGender\";\nexport type TarotInquirerGender = \"man\" | \"woman\";\nexport type TarotSpreadCardType = TarotCard[\"type\"];\nexport type TarotSpreadMinorRank =\n | \"ace\"\n | \"2\"\n | \"3\"\n | \"4\"\n | \"5\"\n | \"6\"\n | \"7\"\n | \"8\"\n | \"9\"\n | \"10\";\n\nexport interface TarotSpreadCardConstraint {\n allowedTypes?: TarotSpreadCardType[];\n requiredRank?: TarotSpreadMinorRank;\n allowedCardFilenames?: string[];\n excludedCardFilenames?: string[];\n}\n\nexport interface TarotSpreadSlotMetadata {\n displayLabel?: string;\n groupKey?: string;\n note?: string;\n orientation?: \"upright\" | \"sideways\";\n temporalPhase?: \"past\" | \"present\" | \"future\";\n}\n\nexport interface TarotSpreadSlotDefinition {\n slotKey: string;\n label: string;\n order: number;\n minCards: number;\n maxCards: number;\n validationRules?: TarotSpreadCardConstraint;\n manualSelectionRules?: TarotSpreadCardConstraint;\n drawRules?: TarotSpreadCardConstraint;\n metadata?: TarotSpreadSlotMetadata;\n}\n\nexport interface TarotSpreadInquirerRule {\n slotKey: string;\n sourceSlotKeys: string[];\n cardNumbersByGender: Record<TarotInquirerGender, number>;\n}\n\nexport interface TarotSpreadDefinition {\n spreadId: TarotSpreadId;\n label: string;\n description?: string;\n contextRequirements?: TarotSpreadContextKey[];\n slots: TarotSpreadSlotDefinition[];\n specialRules?: {\n inquirerCard?: TarotSpreadInquirerRule;\n };\n}\n\nexport interface TarotSpreadSelectionContext {\n inquirerGender?: TarotInquirerGender;\n}\n\nexport interface TarotSpreadSelectionCard {\n slotKey: string;\n cardNumber: number;\n isInverted?: boolean;\n}\n\nexport interface TarotSpreadResolvedSelectionCard\n extends TarotSpreadSelectionCard {\n card: TarotCard;\n slot: TarotSpreadSlotDefinition;\n}\n\nexport type TarotSpreadValidationErrorCode =\n | \"UNKNOWN_SPREAD\"\n | \"UNKNOWN_SLOT\"\n | \"CARD_NOT_FOUND\"\n | \"DUPLICATE_CARD\"\n | \"MISSING_REQUIRED_CARDS\"\n | \"TOO_MANY_CARDS\"\n | \"INVALID_CARD_TYPE\"\n | \"INVALID_CARD_RANK\"\n | \"DISALLOWED_CARD\"\n | \"MISSING_CONTEXT\"\n | \"INVALID_INQUIRER_CARD\";\n\nexport interface TarotSpreadValidationIssue {\n code: TarotSpreadValidationErrorCode;\n message: string;\n slotKey?: string;\n cardNumber?: number;\n}\n\nexport interface TarotSpreadValidationResult {\n ok: boolean;\n isComplete: boolean;\n spread?: TarotSpreadDefinition;\n resolvedCards: TarotSpreadResolvedSelectionCard[];\n errors: TarotSpreadValidationIssue[];\n}\n\nexport interface TarotSpreadValidationInput {\n spreadId: TarotSpreadId;\n cards: TarotSpreadSelectionCard[];\n context?: TarotSpreadSelectionContext;\n allowPartial?: boolean;\n}\n\nexport interface DrawTarotSpreadOptions {\n spreadId: TarotSpreadId;\n deckId?: TarotDeckId;\n includeInverted?: boolean;\n rng?: () => number;\n context?: TarotSpreadSelectionContext;\n}\n\nexport interface TarotSpreadDrawResult {\n spread: TarotSpreadDefinition;\n deckId: TarotDeckId;\n context?: TarotSpreadSelectionContext;\n cards: TarotSpreadResolvedSelectionCard[];\n}\n\nconst TAROT_SPREAD_MINOR_RANKS: readonly TarotSpreadMinorRank[] = [\n \"ace\",\n \"2\",\n \"3\",\n \"4\",\n \"5\",\n \"6\",\n \"7\",\n \"8\",\n \"9\",\n \"10\"\n];\n\nconst EVENT_INNER_SLOT_KEYS = [\n \"inner-1\",\n \"inner-2\",\n \"inner-3\",\n \"inner-4\",\n \"inner-5\",\n \"inner-6\",\n \"inner-7\"\n] as const;\n\nconst TAROT_CARD_BY_NUMBER = new Map(\n ARKANNUS.map((card) => [card.number, card] as const)\n);\n\nfunction createEventOuterSlot(\n index: number,\n temporalPhase: TarotSpreadSlotMetadata[\"temporalPhase\"]\n): TarotSpreadSlotDefinition {\n return {\n slotKey: `outer-${index}`,\n label: String(index),\n order: index,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"minor\", \"daat+royalship\"]\n },\n manualSelectionRules: {\n allowedTypes: [\"minor\", \"daat+royalship\"]\n },\n drawRules: {\n allowedTypes: [\"minor\", \"daat+royalship\"]\n },\n metadata: {\n displayLabel: String(index),\n groupKey: \"outer\",\n temporalPhase\n }\n };\n}\n\nfunction createEventInnerSlot(\n index: number,\n label: string,\n note: string\n): TarotSpreadSlotDefinition {\n return {\n slotKey: `inner-${index}`,\n label,\n order: 100 + index,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"major\"]\n },\n manualSelectionRules: {\n allowedTypes: [\"major\"],\n excludedCardFilenames: [\n \"01_the_magician\",\n \"02_the_high_priestess\"\n ]\n },\n drawRules: {\n allowedTypes: [\"major\"]\n },\n metadata: {\n displayLabel: `${index}.`,\n groupKey: \"inner\",\n note\n }\n };\n}\n\nconst TAROT_SPREADS: readonly TarotSpreadDefinition[] = [\n {\n spreadId: \"quick-insight\",\n label: \"Quick Insight\",\n description: \"A single-card reading for immediate insight.\",\n slots: [\n {\n slotKey: \"quick-insight\",\n label: \"Quick Insight\",\n order: 1,\n minCards: 1,\n maxCards: 1\n }\n ]\n },\n {\n spreadId: \"conscious-reading\",\n label: \"Conscious Reading\",\n description:\n \"Three-card spread for conscious, unconscious, and subconscious layers.\",\n slots: [\n {\n slotKey: \"conscious\",\n label: \"Conscious\",\n order: 1,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"major\"]\n },\n manualSelectionRules: {\n allowedTypes: [\"major\"]\n },\n drawRules: {\n allowedTypes: [\"major\"]\n }\n },\n {\n slotKey: \"unconscious\",\n label: \"Unconscious\",\n order: 2,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"daat+royalship\"]\n },\n manualSelectionRules: {\n allowedTypes: [\"daat+royalship\"]\n },\n drawRules: {\n allowedTypes: [\"daat+royalship\"]\n }\n },\n {\n slotKey: \"subconscious\",\n label: \"Subconscious\",\n order: 3,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"minor\"]\n },\n manualSelectionRules: {\n allowedTypes: [\"minor\"]\n },\n drawRules: {\n allowedTypes: [\"minor\"]\n }\n }\n ]\n },\n {\n spreadId: \"time-reading\",\n label: \"Time Reading\",\n description: \"Three major arcana cards for past, present, and future.\",\n slots: [\n {\n slotKey: \"past\",\n label: \"Past\",\n order: 1,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"major\"]\n },\n manualSelectionRules: {\n allowedTypes: [\"major\"]\n },\n drawRules: {\n allowedTypes: [\"major\"]\n }\n },\n {\n slotKey: \"present\",\n label: \"Present\",\n order: 2,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"major\"]\n },\n manualSelectionRules: {\n allowedTypes: [\"major\"]\n },\n drawRules: {\n allowedTypes: [\"major\"]\n }\n },\n {\n slotKey: \"future\",\n label: \"Future\",\n order: 3,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"major\"]\n },\n manualSelectionRules: {\n allowedTypes: [\"major\"]\n },\n drawRules: {\n allowedTypes: [\"major\"]\n }\n }\n ]\n },\n {\n spreadId: \"dialectic-reading\",\n label: \"Dialectic Reading\",\n description: \"Three major arcana cards for thesis, antithesis, and synthesis.\",\n slots: [\n {\n slotKey: \"thesis\",\n label: \"Thesis\",\n order: 1,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"major\"]\n },\n manualSelectionRules: {\n allowedTypes: [\"major\"]\n },\n drawRules: {\n allowedTypes: [\"major\"]\n }\n },\n {\n slotKey: \"antithesis\",\n label: \"Antithesis\",\n order: 2,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"major\"]\n },\n manualSelectionRules: {\n allowedTypes: [\"major\"]\n },\n drawRules: {\n allowedTypes: [\"major\"]\n }\n },\n {\n slotKey: \"synthesis\",\n label: \"Synthesis\",\n order: 3,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"major\"]\n },\n manualSelectionRules: {\n allowedTypes: [\"major\"]\n },\n drawRules: {\n allowedTypes: [\"major\"]\n }\n }\n ]\n },\n {\n spreadId: \"tree-of-life-reading\",\n label: \"Tree of Life Reading\",\n description:\n \"Ten numbered minor arcana slots mapped to the spheres plus four Daath court cards.\",\n slots: [\n {\n slotKey: \"kether\",\n label: \"Kether\",\n order: 1,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"ace\"\n },\n manualSelectionRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"ace\"\n },\n drawRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"ace\"\n }\n },\n {\n slotKey: \"chokhmah\",\n label: \"Chokhmah\",\n order: 2,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"2\"\n },\n manualSelectionRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"2\"\n },\n drawRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"2\"\n }\n },\n {\n slotKey: \"binah\",\n label: \"Binah\",\n order: 3,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"3\"\n },\n manualSelectionRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"3\"\n },\n drawRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"3\"\n }\n },\n {\n slotKey: \"chesed\",\n label: \"Chesed\",\n order: 4,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"4\"\n },\n manualSelectionRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"4\"\n },\n drawRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"4\"\n }\n },\n {\n slotKey: \"geburah\",\n label: \"Geburah\",\n order: 5,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"5\"\n },\n manualSelectionRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"5\"\n },\n drawRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"5\"\n }\n },\n {\n slotKey: \"tiphareth\",\n label: \"Tiphareth\",\n order: 6,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"6\"\n },\n manualSelectionRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"6\"\n },\n drawRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"6\"\n }\n },\n {\n slotKey: \"netzach\",\n label: \"Netzach\",\n order: 7,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"7\"\n },\n manualSelectionRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"7\"\n },\n drawRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"7\"\n }\n },\n {\n slotKey: \"hod\",\n label: \"Hod\",\n order: 8,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"8\"\n },\n manualSelectionRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"8\"\n },\n drawRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"8\"\n }\n },\n {\n slotKey: \"yesod\",\n label: \"Yesod\",\n order: 9,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"9\"\n },\n manualSelectionRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"9\"\n },\n drawRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"9\"\n }\n },\n {\n slotKey: \"malkuth\",\n label: \"Malkuth\",\n order: 10,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"10\"\n },\n manualSelectionRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"10\"\n },\n drawRules: {\n allowedTypes: [\"minor\"],\n requiredRank: \"10\"\n }\n },\n {\n slotKey: \"daath\",\n label: \"Daath\",\n order: 11,\n minCards: 4,\n maxCards: 4,\n validationRules: {\n allowedTypes: [\"daat+royalship\"]\n },\n manualSelectionRules: {\n allowedTypes: [\"daat+royalship\"]\n },\n drawRules: {\n allowedTypes: [\"daat+royalship\"]\n }\n }\n ]\n },\n {\n spreadId: \"celtic-cross\",\n label: \"Celtic Cross\",\n description: \"Classic ten-card Celtic Cross spread.\",\n slots: [\n {\n slotKey: \"present\",\n label: \"The Present\",\n order: 1,\n minCards: 1,\n maxCards: 1,\n metadata: {\n displayLabel: \"1.\"\n }\n },\n {\n slotKey: \"challenge\",\n label: \"The Challenge\",\n order: 2,\n minCards: 1,\n maxCards: 1,\n metadata: {\n displayLabel: \"2.\",\n orientation: \"sideways\"\n }\n },\n {\n slotKey: \"above\",\n label: \"Above\",\n order: 3,\n minCards: 1,\n maxCards: 1,\n metadata: {\n displayLabel: \"3.\"\n }\n },\n {\n slotKey: \"below\",\n label: \"Below\",\n order: 4,\n minCards: 1,\n maxCards: 1,\n metadata: {\n displayLabel: \"4.\"\n }\n },\n {\n slotKey: \"behind\",\n label: \"Behind\",\n order: 5,\n minCards: 1,\n maxCards: 1,\n metadata: {\n displayLabel: \"5.\"\n }\n },\n {\n slotKey: \"before\",\n label: \"Before\",\n order: 6,\n minCards: 1,\n maxCards: 1,\n metadata: {\n displayLabel: \"6.\"\n }\n },\n {\n slotKey: \"self\",\n label: \"Self\",\n order: 7,\n minCards: 1,\n maxCards: 1,\n metadata: {\n displayLabel: \"7.\"\n }\n },\n {\n slotKey: \"environment\",\n label: \"Environment\",\n order: 8,\n minCards: 1,\n maxCards: 1,\n metadata: {\n displayLabel: \"8.\"\n }\n },\n {\n slotKey: \"hopes-fears\",\n label: \"Hopes/Fears\",\n order: 9,\n minCards: 1,\n maxCards: 1,\n metadata: {\n displayLabel: \"9.\"\n }\n },\n {\n slotKey: \"outcome\",\n label: \"Outcome\",\n order: 10,\n minCards: 1,\n maxCards: 1,\n metadata: {\n displayLabel: \"10.\"\n }\n }\n ]\n },\n {\n spreadId: \"event-reading\",\n label: \"Event Reading\",\n description:\n \"Papus-style event spread with outer minor/court cards, seven major cards, and an inquirer card.\",\n contextRequirements: [\"inquirerGender\"],\n slots: [\n createEventOuterSlot(1, \"past\"),\n createEventOuterSlot(2, \"past\"),\n createEventOuterSlot(3, \"past\"),\n createEventOuterSlot(4, \"past\"),\n createEventOuterSlot(5, \"present\"),\n createEventOuterSlot(6, \"present\"),\n createEventOuterSlot(7, \"present\"),\n createEventOuterSlot(8, \"present\"),\n createEventOuterSlot(9, \"future\"),\n createEventOuterSlot(10, \"future\"),\n createEventOuterSlot(11, \"future\"),\n createEventOuterSlot(12, \"future\"),\n createEventInnerSlot(\n 1,\n \"Commencement\",\n \"Character of the beginning phase.\"\n ),\n createEventInnerSlot(2, \"Apogee\", \"Peak or zenith of the event.\"),\n createEventInnerSlot(\n 3,\n \"Decline/Obstacle\",\n \"Challenges, obstacles, or decline.\"\n ),\n createEventInnerSlot(4, \"Fall\", \"Conclusion or end phase.\"),\n createEventInnerSlot(\n 5,\n \"The Past\",\n \"Special character or influence in the past.\"\n ),\n createEventInnerSlot(\n 6,\n \"The Present\",\n \"Special character or influence in the present.\"\n ),\n createEventInnerSlot(\n 7,\n \"The Future\",\n \"Special character or influence to come.\"\n ),\n {\n slotKey: \"inquirer\",\n label: \"Inquirer\",\n order: 200,\n minCards: 1,\n maxCards: 1,\n validationRules: {\n allowedTypes: [\"major\"]\n },\n manualSelectionRules: {\n allowedTypes: [\"major\"],\n allowedCardFilenames: [\n \"01_the_magician\",\n \"02_the_high_priestess\"\n ]\n },\n drawRules: {\n allowedTypes: [\"major\"]\n },\n metadata: {\n displayLabel: \"Inquirer\",\n groupKey: \"center\",\n note: \"The querent's energy in this reading.\"\n }\n }\n ],\n specialRules: {\n inquirerCard: {\n slotKey: \"inquirer\",\n sourceSlotKeys: [...EVENT_INNER_SLOT_KEYS],\n cardNumbersByGender: {\n man: 1,\n woman: 2\n }\n }\n }\n }\n] as const;\n\nconst TAROT_SPREAD_BY_ID = new Map(\n TAROT_SPREADS.map((spread) => [spread.spreadId, spread] as const)\n);\n\nfunction cloneCardConstraint(\n constraint?: TarotSpreadCardConstraint\n): TarotSpreadCardConstraint | undefined {\n if (!constraint) {\n return undefined;\n }\n\n return {\n allowedTypes: constraint.allowedTypes\n ? [...constraint.allowedTypes]\n : undefined,\n requiredRank: constraint.requiredRank,\n allowedCardFilenames: constraint.allowedCardFilenames\n ? [...constraint.allowedCardFilenames]\n : undefined,\n excludedCardFilenames: constraint.excludedCardFilenames\n ? [...constraint.excludedCardFilenames]\n : undefined\n };\n}\n\nfunction cloneSlotDefinition(\n slot: TarotSpreadSlotDefinition\n): TarotSpreadSlotDefinition {\n return {\n ...slot,\n validationRules: cloneCardConstraint(slot.validationRules),\n manualSelectionRules: cloneCardConstraint(slot.manualSelectionRules),\n drawRules: cloneCardConstraint(slot.drawRules),\n metadata: slot.metadata ? { ...slot.metadata } : undefined\n };\n}\n\nfunction cloneSpreadDefinition(\n spread: TarotSpreadDefinition\n): TarotSpreadDefinition {\n return {\n ...spread,\n contextRequirements: spread.contextRequirements\n ? [...spread.contextRequirements]\n : undefined,\n slots: spread.slots.map(cloneSlotDefinition),\n specialRules: spread.specialRules?.inquirerCard\n ? {\n inquirerCard: {\n slotKey: spread.specialRules.inquirerCard.slotKey,\n sourceSlotKeys: [...spread.specialRules.inquirerCard.sourceSlotKeys],\n cardNumbersByGender: {\n ...spread.specialRules.inquirerCard.cardNumbersByGender\n }\n }\n }\n : undefined\n };\n}\n\nfunction getTarotDeckCardByNumber(cardNumber: number): TarotCard | undefined {\n return TAROT_CARD_BY_NUMBER.get(cardNumber);\n}\n\nfunction getTarotSpreadRuleForValidation(\n slot: TarotSpreadSlotDefinition\n): TarotSpreadCardConstraint | undefined {\n return slot.validationRules ?? slot.drawRules ?? slot.manualSelectionRules;\n}\n\nfunction getTarotSpreadRuleForDraw(\n slot: TarotSpreadSlotDefinition\n): TarotSpreadCardConstraint | undefined {\n return slot.drawRules ?? slot.validationRules ?? slot.manualSelectionRules;\n}\n\nfunction getTarotMinorRank(\n card: TarotCard\n): TarotSpreadMinorRank | undefined {\n if (card.type !== \"minor\") {\n return undefined;\n }\n\n const rank = card.tarotCardFilename.split(\"_\")[0] as TarotSpreadMinorRank;\n return TAROT_SPREAD_MINOR_RANKS.includes(rank) ? rank : undefined;\n}\n\nfunction matchesTarotSpreadConstraint(\n card: TarotCard,\n constraint?: TarotSpreadCardConstraint\n): boolean {\n if (!constraint) {\n return true;\n }\n\n if (\n constraint.allowedTypes &&\n !constraint.allowedTypes.includes(card.type)\n ) {\n return false;\n }\n\n if (\n constraint.allowedCardFilenames &&\n !constraint.allowedCardFilenames.includes(card.tarotCardFilename)\n ) {\n return false;\n }\n\n if (\n constraint.excludedCardFilenames &&\n constraint.excludedCardFilenames.includes(card.tarotCardFilename)\n ) {\n return false;\n }\n\n if (constraint.requiredRank) {\n return getTarotMinorRank(card) === constraint.requiredRank;\n }\n\n return true;\n}\n\nfunction randomIndex(length: number, rng: () => number): number {\n if (length <= 0) {\n throw new Error(\"Cannot draw from an empty pool.\");\n }\n\n const raw = rng();\n if (!Number.isFinite(raw)) {\n throw new Error(\"Tarot spread RNG must return a finite number.\");\n }\n\n const normalized = Math.min(Math.max(raw, 0), 1 - Number.EPSILON);\n return Math.floor(normalized * length);\n}\n\nfunction withSpreadCardOrientation(\n card: TarotCard,\n includeInverted: boolean,\n rng: () => number\n): TarotCard {\n return {\n ...card,\n isInverted: includeInverted ? rng() < 0.5 : false\n };\n}\n\nfunction resolveTarotSpreadSelectionCard(\n card: TarotSpreadSelectionCard,\n slot: TarotSpreadSlotDefinition,\n tarotCard: TarotCard\n): TarotSpreadResolvedSelectionCard {\n return {\n ...card,\n slot,\n card: {\n ...tarotCard,\n isInverted: card.isInverted ?? false\n }\n };\n}\n\nfunction sortResolvedTarotSpreadCards(\n resolvedCards: TarotSpreadResolvedSelectionCard[]\n): TarotSpreadResolvedSelectionCard[] {\n return [...resolvedCards].sort((left, right) => {\n if (left.slot.order !== right.slot.order) {\n return left.slot.order - right.slot.order;\n }\n\n return left.card.number - right.card.number;\n });\n}\n\nfunction validateEventInquirerCard(\n spread: TarotSpreadDefinition,\n resolvedCards: TarotSpreadResolvedSelectionCard[],\n context: TarotSpreadSelectionContext | undefined,\n errors: TarotSpreadValidationIssue[]\n): void {\n const inquirerRule = spread.specialRules?.inquirerCard;\n\n if (!inquirerRule) {\n return;\n }\n\n if (!context?.inquirerGender) {\n return;\n }\n\n const inquirerCardNumber =\n inquirerRule.cardNumbersByGender[context.inquirerGender];\n const sourceCards = resolvedCards.filter((card) =>\n inquirerRule.sourceSlotKeys.includes(card.slotKey)\n );\n const inquirerCards = resolvedCards.filter(\n (card) => card.slotKey === inquirerRule.slotKey\n );\n\n if (inquirerCards.length !== 1) {\n return;\n }\n\n const sourceContainsGenderCard = sourceCards.some(\n (card) => card.card.number === inquirerCardNumber\n );\n const totalGenderCardCount = [...sourceCards, ...inquirerCards].filter(\n (card) => card.card.number === inquirerCardNumber\n ).length;\n\n if (totalGenderCardCount !== 1) {\n errors.push({\n code: \"INVALID_INQUIRER_CARD\",\n slotKey: inquirerRule.slotKey,\n cardNumber: inquirerCardNumber,\n message:\n \"Event Reading must contain the gendered inquirer card exactly once across the major arcana band and inquirer slot.\"\n });\n return;\n }\n\n if (\n !sourceContainsGenderCard &&\n inquirerCards[0].card.number !== inquirerCardNumber\n ) {\n errors.push({\n code: \"INVALID_INQUIRER_CARD\",\n slotKey: inquirerRule.slotKey,\n cardNumber: inquirerCards[0].card.number,\n message:\n \"When the inquirer card was not drawn in the seven major slots, it must occupy the Inquirer slot.\"\n });\n }\n}\n\nfunction pickTarotCardFromPool(\n pool: TarotCard[],\n constraint: TarotSpreadCardConstraint | undefined,\n rng: () => number\n): TarotCard {\n const candidateIndexes = pool.reduce<number[]>((indexes, card, index) => {\n if (matchesTarotSpreadConstraint(card, constraint)) {\n indexes.push(index);\n }\n\n return indexes;\n }, []);\n\n if (candidateIndexes.length === 0) {\n throw new Error(\"Unable to draw a tarot card that satisfies the spread rule.\");\n }\n\n const pickedIndex = candidateIndexes[randomIndex(candidateIndexes.length, rng)];\n const [pickedCard] = pool.splice(pickedIndex, 1);\n\n return pickedCard;\n}\n\nfunction buildResolvedDrawnCard(\n slot: TarotSpreadSlotDefinition,\n card: TarotCard,\n includeInverted: boolean,\n rng: () => number\n): TarotSpreadResolvedSelectionCard {\n const drawnCard = withSpreadCardOrientation(card, includeInverted, rng);\n\n return {\n slotKey: slot.slotKey,\n cardNumber: drawnCard.number,\n isInverted: drawnCard.isInverted ?? false,\n slot,\n card: drawnCard\n };\n}\n\nfunction drawDefaultTarotSpread(\n spread: TarotSpreadDefinition,\n includeInverted: boolean,\n rng: () => number\n): TarotSpreadResolvedSelectionCard[] {\n const deckPool = [...ARKANNUS];\n const drawnCards: TarotSpreadResolvedSelectionCard[] = [];\n\n for (const slot of spread.slots.slice().sort((left, right) => left.order - right.order)) {\n const drawRule = getTarotSpreadRuleForDraw(slot);\n\n for (let index = 0; index < slot.maxCards; index += 1) {\n const card = pickTarotCardFromPool(deckPool, drawRule, rng);\n drawnCards.push(\n buildResolvedDrawnCard(slot, card, includeInverted, rng)\n );\n }\n }\n\n return drawnCards;\n}\n\nfunction drawEventReadingSpread(\n spread: TarotSpreadDefinition,\n includeInverted: boolean,\n rng: () => number,\n context: TarotSpreadSelectionContext | undefined\n): TarotSpreadResolvedSelectionCard[] {\n const inquirerRule = spread.specialRules?.inquirerCard;\n\n if (!inquirerRule || !context?.inquirerGender) {\n throw new Error(\n \"Event Reading draw requires `context.inquirerGender`.\"\n );\n }\n\n const slotsByKey = new Map(\n spread.slots.map((slot) => [slot.slotKey, slot] as const)\n );\n const outerPool = ARKANNUS.filter(\n (card) => card.type === \"minor\" || card.type === \"daat+royalship\"\n );\n const majorPool = ARKANNUS.filter((card) => card.type === \"major\");\n const drawnCards: TarotSpreadResolvedSelectionCard[] = [];\n\n for (const slot of spread.slots\n .filter((candidate) => candidate.metadata?.groupKey === \"outer\")\n .sort((left, right) => left.order - right.order)) {\n const card = pickTarotCardFromPool(outerPool, getTarotSpreadRuleForDraw(slot), rng);\n drawnCards.push(buildResolvedDrawnCard(slot, card, includeInverted, rng));\n }\n\n for (const slotKey of inquirerRule.sourceSlotKeys) {\n const slot = slotsByKey.get(slotKey);\n\n if (!slot) {\n throw new Error(`Missing Event Reading slot definition for ${slotKey}.`);\n }\n\n const card = pickTarotCardFromPool(majorPool, getTarotSpreadRuleForDraw(slot), rng);\n drawnCards.push(buildResolvedDrawnCard(slot, card, includeInverted, rng));\n }\n\n const genderedInquirerCardNumber =\n inquirerRule.cardNumbersByGender[context.inquirerGender];\n const sourceContainsGenderedCard = drawnCards.some(\n (card) =>\n inquirerRule.sourceSlotKeys.includes(card.slotKey) &&\n card.card.number === genderedInquirerCardNumber\n );\n const inquirerSlot = slotsByKey.get(inquirerRule.slotKey);\n\n if (!inquirerSlot) {\n throw new Error(\n `Missing Event Reading slot definition for ${inquirerRule.slotKey}.`\n );\n }\n\n if (!sourceContainsGenderedCard) {\n const genderedCardIndex = majorPool.findIndex(\n (card) => card.number === genderedInquirerCardNumber\n );\n\n if (genderedCardIndex < 0) {\n throw new Error(\n \"Unable to assign the Event Reading inquirer card from the remaining major arcana.\"\n );\n }\n\n const [genderedCard] = majorPool.splice(genderedCardIndex, 1);\n drawnCards.push(\n buildResolvedDrawnCard(inquirerSlot, genderedCard, includeInverted, rng)\n );\n } else {\n const replacement = pickTarotCardFromPool(\n majorPool,\n getTarotSpreadRuleForDraw(inquirerSlot),\n rng\n );\n drawnCards.push(\n buildResolvedDrawnCard(inquirerSlot, replacement, includeInverted, rng)\n );\n }\n\n return drawnCards;\n}\n\nexport function listTarotSpreads(): TarotSpreadDefinition[] {\n return TAROT_SPREADS.map(cloneSpreadDefinition);\n}\n\nexport function getTarotSpread(\n spreadId: TarotSpreadId\n): TarotSpreadDefinition | undefined {\n const spread = TAROT_SPREAD_BY_ID.get(spreadId);\n return spread ? cloneSpreadDefinition(spread) : undefined;\n}\n\nexport function validateTarotSpreadSelection(\n input: TarotSpreadValidationInput\n): TarotSpreadValidationResult {\n const spread = TAROT_SPREAD_BY_ID.get(input.spreadId);\n const errors: TarotSpreadValidationIssue[] = [];\n\n if (!spread) {\n return {\n ok: false,\n isComplete: false,\n errors: [\n {\n code: \"UNKNOWN_SPREAD\",\n message: `Unknown tarot spread: ${input.spreadId}.`\n }\n ],\n resolvedCards: []\n };\n }\n\n const slotsByKey = new Map(\n spread.slots.map((slot) => [slot.slotKey, slot] as const)\n );\n const seenCardNumbers = new Set<number>();\n const resolvedCards: TarotSpreadResolvedSelectionCard[] = [];\n\n for (const selectedCard of input.cards) {\n const slot = slotsByKey.get(selectedCard.slotKey);\n\n if (!slot) {\n errors.push({\n code: \"UNKNOWN_SLOT\",\n slotKey: selectedCard.slotKey,\n message: `Unknown slot for ${spread.label}: ${selectedCard.slotKey}.`\n });\n continue;\n }\n\n const tarotCard = getTarotDeckCardByNumber(selectedCard.cardNumber);\n\n if (!tarotCard) {\n errors.push({\n code: \"CARD_NOT_FOUND\",\n slotKey: selectedCard.slotKey,\n cardNumber: selectedCard.cardNumber,\n message: `Unknown tarot card number: ${selectedCard.cardNumber}.`\n });\n continue;\n }\n\n if (seenCardNumbers.has(tarotCard.number)) {\n errors.push({\n code: \"DUPLICATE_CARD\",\n slotKey: selectedCard.slotKey,\n cardNumber: tarotCard.number,\n message: `Tarot card ${tarotCard.number} is duplicated across the spread.`\n });\n continue;\n }\n\n seenCardNumbers.add(tarotCard.number);\n resolvedCards.push(\n resolveTarotSpreadSelectionCard(selectedCard, slot, tarotCard)\n );\n }\n\n let isComplete = true;\n\n for (const slot of spread.slots) {\n const slotCards = resolvedCards.filter(\n (selectedCard) => selectedCard.slotKey === slot.slotKey\n );\n\n if (slotCards.length < slot.minCards) {\n isComplete = false;\n if (!input.allowPartial) {\n errors.push({\n code: \"MISSING_REQUIRED_CARDS\",\n slotKey: slot.slotKey,\n message: `${spread.label} requires ${slot.minCards} card(s) for ${slot.label}.`\n });\n }\n }\n\n if (slotCards.length > slot.maxCards) {\n isComplete = false;\n errors.push({\n code: \"TOO_MANY_CARDS\",\n slotKey: slot.slotKey,\n message: `${spread.label} allows at most ${slot.maxCards} card(s) for ${slot.label}.`\n });\n }\n\n const validationRule = getTarotSpreadRuleForValidation(slot);\n\n for (const slotCard of slotCards) {\n if (validationRule?.allowedTypes && !validationRule.allowedTypes.includes(slotCard.card.type)) {\n errors.push({\n code: \"INVALID_CARD_TYPE\",\n slotKey: slot.slotKey,\n cardNumber: slotCard.card.number,\n message: `${slot.label} does not accept ${slotCard.card.type} cards.`\n });\n }\n\n if (\n validationRule?.requiredRank &&\n getTarotMinorRank(slotCard.card) !== validationRule.requiredRank\n ) {\n errors.push({\n code: \"INVALID_CARD_RANK\",\n slotKey: slot.slotKey,\n cardNumber: slotCard.card.number,\n message: `${slot.label} requires a ${validationRule.requiredRank} minor arcana card.`\n });\n }\n\n if (\n validationRule?.allowedCardFilenames &&\n !validationRule.allowedCardFilenames.includes(slotCard.card.tarotCardFilename)\n ) {\n errors.push({\n code: \"DISALLOWED_CARD\",\n slotKey: slot.slotKey,\n cardNumber: slotCard.card.number,\n message: `${slotCard.card.tarotCard} is not allowed in ${slot.label}.`\n });\n }\n\n if (\n validationRule?.excludedCardFilenames &&\n validationRule.excludedCardFilenames.includes(slotCard.card.tarotCardFilename)\n ) {\n errors.push({\n code: \"DISALLOWED_CARD\",\n slotKey: slot.slotKey,\n cardNumber: slotCard.card.number,\n message: `${slotCard.card.tarotCard} is excluded from ${slot.label}.`\n });\n }\n }\n }\n\n if (\n spread.contextRequirements?.includes(\"inquirerGender\") &&\n !input.context?.inquirerGender\n ) {\n isComplete = false;\n errors.push({\n code: \"MISSING_CONTEXT\",\n message: `${spread.label} requires \\`context.inquirerGender\\`.`\n });\n }\n\n validateEventInquirerCard(spread, resolvedCards, input.context, errors);\n\n const sortedResolvedCards = sortResolvedTarotSpreadCards(resolvedCards);\n\n return {\n ok: errors.length === 0,\n isComplete,\n spread: cloneSpreadDefinition(spread),\n resolvedCards: sortedResolvedCards,\n errors\n };\n}\n\nexport function drawTarotSpread(\n options: DrawTarotSpreadOptions\n): TarotSpreadDrawResult {\n const spread = TAROT_SPREAD_BY_ID.get(options.spreadId);\n\n if (!spread) {\n throw new Error(`Unknown tarot spread: ${options.spreadId}.`);\n }\n\n const rng = options.rng ?? Math.random;\n const includeInverted = options.includeInverted ?? false;\n const drawnCards =\n spread.spreadId === \"event-reading\"\n ? drawEventReadingSpread(spread, includeInverted, rng, options.context)\n : drawDefaultTarotSpread(spread, includeInverted, rng);\n const validation = validateTarotSpreadSelection({\n spreadId: spread.spreadId,\n cards: drawnCards.map((card) => ({\n slotKey: card.slotKey,\n cardNumber: card.cardNumber,\n isInverted: card.isInverted\n })),\n context: options.context\n });\n\n if (!validation.ok) {\n throw new Error(\n `Generated an invalid tarot spread selection for ${spread.label}: ${validation.errors\n .map((error) => error.message)\n .join(\" \")}`\n );\n }\n\n return {\n spread: cloneSpreadDefinition(spread),\n deckId: options.deckId ?? \"rider-waite\",\n context: options.context,\n cards: sortResolvedTarotSpreadCards(drawnCards)\n };\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { calculateGematria } from './chunk-
|
|
2
|
-
import { __export } from './chunk-
|
|
1
|
+
import { calculateGematria } from './chunk-QS5XAAAG.mjs';
|
|
2
|
+
import { __export } from './chunk-NPQZ2DOY.mjs';
|
|
3
3
|
|
|
4
4
|
// src/numerology/data.ts
|
|
5
5
|
var data_exports = {};
|
|
@@ -763,8 +763,10 @@ function diffInPersonalMonths(birthDate, today) {
|
|
|
763
763
|
if (today.getDate() < birthDate.getDate()) {
|
|
764
764
|
k -= 1;
|
|
765
765
|
}
|
|
766
|
-
if (k < 0)
|
|
767
|
-
|
|
766
|
+
if (k < 0)
|
|
767
|
+
k = 0;
|
|
768
|
+
if (k > 12)
|
|
769
|
+
k = 12;
|
|
768
770
|
return k;
|
|
769
771
|
}
|
|
770
772
|
function calculatePersonalMonths(birthDate, personalYear, today) {
|
|
@@ -818,5 +820,5 @@ function calculatePersonalCycles(birthDate, today = /* @__PURE__ */ new Date(),
|
|
|
818
820
|
}
|
|
819
821
|
|
|
820
822
|
export { MASTER_NUMBERS, calculateChallenges, calculateCycles, calculateFibonacciCycle, calculateKaabalisticLifePath, calculatePersonalCycles, calculatePersonalMonths, calculatePersonalPeriods, calculatePersonalYear, calculateStraightAcrossReductionLifePath, data_exports, getDateEnergies, isMasterNumber, reduceToSingle, reduceToSingleWithSteps };
|
|
821
|
-
//# sourceMappingURL=
|
|
822
|
-
//# sourceMappingURL=chunk-
|
|
823
|
+
//# sourceMappingURL=out.js.map
|
|
824
|
+
//# sourceMappingURL=chunk-3UJPBUY4.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/numerology/data.ts","../src/numerology/index.ts"],"names":["HeptadCycles","NumerologyValues","DayOfBirth","ChallengeNumbers"],"mappings":";;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,IAAK,eAAL,kBAAKA,kBAAL;AACL,EAAAA,4BAAA,WAA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sB,EAAE,IAAI;AAAA,EACvC;AAEA,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,wBAAwB;AAAA,EAC1B;AACF","sourcesContent":["export enum HeptadCycles {\n First = 1,\n Second = 2,\n Third = 3,\n Fourth = 4,\n Fifth = 5,\n Sixth = 6,\n Seventh = 7,\n}\n\nexport type CycleMeaning = {\n title: string;\n shortDescription: string;\n personalDescription: string;\n businessDescription: string;\n}\n\nexport type Cycle = {\n number: number;\n description: CycleMeaning;\n isActive?: boolean;\n cycleStart?: Date;\n}\n\nexport type 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\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: ReducedValueWithSteps;\n /**\n * Last three syntheses\n */\n personalMythologyNumbers: number[];\n};\n\nexport type StraightAcrossReductionLifePathResult = {\n dayEnergy: ReducedValueWithSteps;\n monthEnergy: ReducedValueWithSteps;\n yearEnergy: ReducedValueWithSteps;\n lifePath: ReducedValueWithSteps;\n};\n\nexport type DateEnergies = {\n dayEnergy: ReducedValueWithSteps;\n monthEnergy: ReducedValueWithSteps;\n yearEnergy: ReducedValueWithSteps;\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 type ReducedValueWithSteps = {\n reducedValue: number;\n reductionSteps: number[];\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 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: ReducedValueWithSteps;\n soulNumber?: ReducedValueWithSteps;\n yearUsedOnCalculations: number;\n};\n\nexport const CYCLE_MEANINGS: Record<HeptadCycles, CycleMeaning> = {\n [HeptadCycles.First]: {\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 },\n [HeptadCycles.Second]: {\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 },\n [HeptadCycles.Third]: {\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 },\n [HeptadCycles.Fourth]: {\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 },\n [HeptadCycles.Fifth]: {\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 },\n [HeptadCycles.Sixth]: {\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 },\n [HeptadCycles.Seventh]: {\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 },\n};\n\nexport enum NumerologyValues {\n One = 1,\n Two = 2,\n Three = 3,\n Four = 4,\n Five = 5,\n Six = 6,\n Seven = 7,\n Eight = 8,\n Nine = 9,\n Eleven = 11,\n TwentyTwo = 22,\n ThirtyThree = 33,\n FortyFour = 44,\n}\n\n// todo: translate to english and improve keywords\nexport const NUMEROLOGY_KEYWORDS: Record<NumerologyValues, string[]> = {\n [NumerologyValues.One]: [\"Initiative\", \"Courage\", \"Leadership\"],\n [NumerologyValues.Two]: [\"Sensitivity\", \"Cooperation\", \"Diplomacy\"],\n [NumerologyValues.Three]: [\"Creativity\", \"Expression\", \"Joy\"],\n [NumerologyValues.Four]: [\"Stability\", \"Structure\", \"Reliability\"],\n [NumerologyValues.Five]: [\"Freedom\", \"Adaptability\", \"Adventure\"],\n [NumerologyValues.Six]: [\"Service\", \"Responsibility\", \"Harmony\"],\n [NumerologyValues.Seven]: [\"Intuition\", \"Introspection\", \"Wisdom\"],\n [NumerologyValues.Eight]: [\"Power\", \"Ambition\", \"Material Success\"],\n [NumerologyValues.Nine]: [\"Compassion\", \"Universal Vision\", \"Humanitarianism\"],\n [NumerologyValues.Eleven]: [\"Intuition\", \"Illumination\", \"Spiritual Messenger\"],\n [NumerologyValues.TwentyTwo]: [\"Vision\", \"Master Builder\", \"Manifestation\"],\n [NumerologyValues.ThirtyThree]: [\"Unconditional Love\", \"Master Teacher\", \"Healing Service\"],\n [NumerologyValues.FortyFour]: [\"Material Mastery\", \"Strategic Leadership\", \"Legacy Building\"],\n}\n\nexport enum DayOfBirth {\n First = 1,\n Second = 2,\n Third = 3,\n Fourth = 4,\n Fifth = 5,\n Sixth = 6,\n Seventh = 7,\n Eighth = 8,\n Ninth = 9,\n Tenth = 10,\n Eleventh = 11,\n Twelfth = 12,\n Thirteenth = 13,\n Fourteenth = 14,\n Fifteenth = 15,\n Sixteenth = 16,\n Seventeenth = 17,\n Eighteenth = 18,\n Nineteenth = 19,\n Twentieth = 20,\n TwentyFirst = 21,\n TwentySecond = 22,\n TwentyThird = 23,\n TwentyFourth = 24,\n TwentyFifth = 25,\n TwentySixth = 26,\n TwentySeventh = 27,\n TwentyEighth = 28,\n TwentyNinth = 29,\n Thirtieth = 30,\n ThirtyFirst = 31,\n};\n\nexport type DayOfBirthMeaning = {\n description: string;\n}\n\nexport const DAY_OF_BIRTH_MEANING: Record<DayOfBirth, DayOfBirthMeaning> = {\n [DayOfBirth.First]: {\n description: \"Independence, creativity and initiative. Tendency to put others in charge of finishing what they start. Stubbornness and inventiveness. Leadership. Ability to do things on their own. Once decided, capable of going to any extreme to win. Enjoys a good challenge.\",\n },\n [DayOfBirth.Second]: {\n description: \"Sensitivity, emotionality and adaptability. Does not need to be aggressive, as they are capable of conquering everything they need. Yearns for attention and affection, enjoying collecting friendships and objects. Must stay active and think positively to avoid depression. Finds pleasure through music.\",\n },\n [DayOfBirth.Third]: {\n description: \"Talent, sociability and imagination. Places great value on friendships, therefore needs to be kind. Being restless and optimistic, makes life a game in which they are the main player. Possesses great personality.\",\n },\n [DayOfBirth.Fourth]: {\n description: \"If they follow the rules, they profit. Practical, organized and loyal. Self-disciplined, stubbornly attached to their habits. Should not demand so much from themselves. Should reserve more time to enjoy nature and family.\",\n },\n [DayOfBirth.Fifth]: {\n description: \"Enjoys new experiences and learns from them. Versatile, insightful and bold, detests moments of boredom. For their happiness it is essential to have freedom to travel, good company and unusual things or events.\",\n },\n [DayOfBirth.Sixth]: {\n description: \"Great idealist, with professorial tendencies, inclined to impose their praiseworthy viewpoints on other people. Being the target of criticism makes them very irritated. Affectionate, adaptable to domestic life and responsible, feels the need for security and to put down roots. For their happiness they need intellectual harmony.\",\n },\n [DayOfBirth.Seventh]: {\n description: \"Be guided by your intuition. Being the intellectual, analytical and sensitive type, should not accept any advice that goes against their principles and judgment. Should guarantee themselves a good education, specializing, and learning to enjoy their own company. Things will come to them if they can be patient and not take risks.\",\n },\n [DayOfBirth.Eighth]: {\n description: \"Interests in managing finances, in progressing and accumulating material goods. An organizer who sets things in motion. Vision and imagination for business. Should be tolerant and fair with the less efficient and determined. Vocation for executive positions.\",\n },\n [DayOfBirth.Ninth]: {\n description: \"Tolerant, apt for the arts and resolute, likes general things. Not interested in details, but rather in world problems. If well educated, could become a public figure. Capable of giving the shirt off their back to someone in difficulties, but appears to have no awareness of the needs of those around them.\",\n },\n [DayOfBirth.Tenth]: {\n description: \"Being capable of managing several things at the same time, enjoys diversity. Their type is intellectual, possessive and not very domestic. Has aptitude for art and vocation for business. Enthusiasm and creativity when developing projects.\",\n },\n [DayOfBirth.Eleventh]: {\n description: \"Despite being insecure and somewhat inhibited, is brilliant and inspired for thought and action. Those who possess this Master number have the gift of visionary intuition. Will only find pleasure through financial gains if they are serving the needs of others.\",\n },\n [DayOfBirth.Twelfth]: {\n description: \"Ability to achieve promotions and can both lead and work in a team. Inclination for the arts, diplomacy and good verbal skills. Needs to stay active besides finishing everything they start.\",\n },\n [DayOfBirth.Thirteenth]: {\n description: \"Certain feeling that their creativity is limited by attachment to order. This tends to bring a certain emotional conflict. Considered temperamental, tends to be misinterpreted very frequently. Feels happy building, buying and selling things.\",\n },\n [DayOfBirth.Fourteenth]: {\n description: \"Needs variety in physical and intellectual activities. Active, insightful, emotional and likes to take risks. Perseverance is as important as the variety of life experiences they yearn for. Needs not to overdo it.\",\n },\n [DayOfBirth.Fifteenth]: {\n description: \"Generous, expansive, domestic and protective. Enjoys music and feels they need to help others. Despite their stubbornness, manages to attract people and opportunities.\",\n },\n [DayOfBirth.Sixteenth]: {\n description: \"Tendency to be constantly disappointed by yearning for affection and doing nothing to obtain it. Withdrawn, introspective, inventive and analytical. Their nervousness makes their life more difficult than it really is. You are a complicated person and family ties are very important.\",\n },\n [DayOfBirth.Seventeenth]: {\n description: \"Hesitation between the desire to organize and to analyze. Can do both things. Should be their own boss and carefully choose their partners (if they need to have them). Seeks knowledge, has a knack for business and talent for any technical or scientific activity.\",\n },\n [DayOfBirth.Eighteenth]: {\n description: \"Lives for love, not having been made to stay with just one person. Strong vibrations for writing, public speaking and theatrical arts. Can be organized and efficient, if they want to. Would feel happy if their attitudes were accepted without restrictions.\",\n },\n [DayOfBirth.Nineteenth]: {\n description: \"May have an excess of responsibility, since it is composed of all numbers, from 1 to 9. Averse to conventions, worries about their public image. Should be a leader, preparing to adapt to the needs of others and fly high.\",\n },\n [DayOfBirth.Twentieth]: {\n description: \"In a group gives stability to joint effort. Friendly, cooperative and sympathetic, is a natural diplomat. Needs protection, thus needs a strong partner. Someone they can count on at all times.\",\n },\n [DayOfBirth.TwentyFirst]: {\n description: \"Talented, sociable and owner of a unique personality, places great importance on their love. Fertile imagination. Should use it positively, avoiding feelings of jealousy and controlling their tendency to distrust others.\",\n },\n [DayOfBirth.TwentySecond]: {\n description: \"Their first impressions are highly reliable, trust them. Their personal ambition should be based on motivation for the common good. Using their integrity, should organize their activities. Has creativity and capacity for initiative. This is a Master number of unlimited potential. It is the vibration of the visionary with practical sense.\",\n },\n [DayOfBirth.TwentyThird]: {\n description: \"Self-sufficiency, taste for social contacts and adaptability. Sensitivity and capacity for understanding that make them help others. Willingness to take on many responsibilities due to their superior faculties and practical mental character.\",\n },\n [DayOfBirth.TwentyFourth]: {\n description: \"Without activity, wastes their energies making a storm in a teacup. Despite being quite individualistic, enjoys domestic life. Ability to learn through observation. Even when retired, needs to continue being active.\",\n },\n [DayOfBirth.TwentyFifth]: {\n description: \"Appearance of an eternal dreamer, with their head in the clouds. Tendency to be misunderstood. Artistic talent, naturally intuitive and idealistic. Obstacles in their life: laziness, melancholy and dispersion of their energies. Needs to pay attention to day-to-day matters, avoiding being criticized for being so intellectual.\",\n },\n [DayOfBirth.TwentySixth]: {\n description: \"Enjoys physical and domestic comfort. Generosity with third parties. Knows how to reconcile professional career, marriage, and artistic abilities with ease. Introspective, has a tendency to live in the past, failing to enjoy the present.\",\n },\n [DayOfBirth.TwentySeventh]: {\n description: \"Natural leader, despite being somewhat erratic, is subtly convincing. Their strength lies in abstract thinking and philosophy. Gets resentful if they feel watched, or with the need to account for every movement. Quite cautious with their family relationships.\",\n },\n [DayOfBirth.TwentyEighth]: {\n description: \"Unconventional, loves freedom and likes to do things their own way. Should not bend to accommodate the system. Tendency to create new trends. Careful not to be overly sensitive. Should combat the laziness that lies behind the habit of daydreaming. If they don't do this, their ambitions will be greatly harmed.\",\n },\n [DayOfBirth.TwentyNinth]: {\n description: \"Intellectual, always ready for action, capable of great achievements. Has the ability to identify and solve the problems of the masses. Should have Master number 11 as their guiding vibration since 2 + 9 = 11. Radical in everything they do, experiences intense emotions.\",\n },\n [DayOfBirth.Thirtieth]: {\n description: \"Endowed with hypnotic charm, enjoys the cheerful side of life, is a great optimist. Full of imagination, detests routine and has a knack for fashion and decoration. Very lucky! Knowing how to use their oratory skills well and with a little experience, will go far.\",\n },\n [DayOfBirth.ThirtyFirst]: {\n description: \"If they can organize themselves and define a direction for their life, they will be successful in their high dreams. Talented for business, will feel comfortable in artistic and literary fields. The routine of domestic life is not very bearable but needs responsibility and companionship.\",\n },\n};\n\nexport type LifePathMeaning = {\n description: string;\n goal: string;\n positiveTraits: string[];\n negativeTraits: string[];\n}\n\nexport const LIFEPATH_MEANING: Record<NumerologyValues, LifePathMeaning> = {\n [NumerologyValues.One]: {\n description: \"Must learn to be original, have more willpower, be more creative and innovative. Needs to have courage and use impulse to penetrate new fields of expression as a pioneer. Works better when alone despite being a good executive. Doesn't like limitations and can be stubborn and dominating. Organized and efficient, by nature not homely. Generally likes sports and athletics. Takes pleasure in victories. Sophisticated, not emotionally romantic, always appears prominently in social or commercial groups. If they learn the lessons, they will become intimately familiar with Divine Energy, the independent spark that probes, searches and moves all creation. Is creative on the physical plane because their pioneering spirit precedes everyone else's, expressing their unique individuality.\",\n goal: \"The mission of path 1 is to undertake. It characterizes people with visionary spirit, who are ahead of their time and who, even alone, can achieve great revolutions and build great accomplishments.\",\n positiveTraits: [\"independence\", \"leadership\", \"ease in opening their own path\"],\n negativeTraits: [\"arrogance\", \"pretension\", \"imposition\", \"authoritarianism\"],\n },\n [NumerologyValues.Two]: {\n description: \"If you support those in leadership, helping them find their life goals, staying behind the scenes, this will help you in business. Those who will benefit from your talents will help you make use of your abilities. Must have consideration for others, bringing people together around a common cause. Will find the lessons to be learned in this life in partnerships and groups. Persuasive. Various career options, with success practically assured.\",\n goal: \"Path 2 has intuition as its mission. They are creative and intuitive spirits who have great ability for reflection and perception of the material and spiritual world. They develop their interior easily and possess great critical sense, in addition to constantly receiving information from the spiritual universe, managing to anticipate situations and make better decisions.\",\n positiveTraits: [\"understanding\", \"collaboration\", \"sensitivity\", \"flexibility\"],\n negativeTraits: [\"inaction\", \"laziness\", \"cowardice\", \"excessive dependence\"],\n },\n [NumerologyValues.Three]: {\n description: \"Superiority in intellectual, artistic or creative occupations. Need for expression, manifestation and to see the result of their work. Needs to have ambition and pride, reaching a position of authority. Needs to be careful not to be dispersive, should specialize. Averse to restriction, cannot limit themselves to routine. To achieve good results needs to work alone. Partnerships are not recommended. Should always follow their inspiration and intuition using their creative talents.\",\n goal: \"The great mission of path 3 is communication. They are communicative and extroverted spirits who may have facility for leadership, teaching and sharing information and knowledge. They are usually great teachers, thinkers, religious leaders or writers. Or even any other profession built around communication.\",\n positiveTraits: [\"communicability\", \"creativity\", \"ease in making friends\"],\n negativeTraits: [\"uncontrolled and frivolous use of communication\", \"childishness\", \"lack of commitment\"],\n },\n [NumerologyValues.Four]: {\n description: \"Needs a solid foundation to base their life on, based on a well-organized system of conduct and morals, should become a diligent worker and achieve success with honesty. Should not take risks in financial areas. Always wanting things for yesterday, will need to strive with patience and perseverance. Must learn to see reality by striving to reason in a healthy and practical way.\",\n goal: \"The mission of this path, the 4, is leadership. People on this path have a great inclination to occupy leadership roles, both professionally and in family or even in social relationships. It's possible they have a tendency to care too much for others, sometimes suffering the impact when the negative faces of leadership appear.\",\n positiveTraits: [\"willpower\", \"discipline\", \"disposition for work\", \"organization\"],\n negativeTraits: [\"blockage\", \"repression\", \"prejudice\", \"limitation\"],\n },\n [NumerologyValues.Five]: {\n description: \"Needs freedom to produce. Facility to learn through travel and experiences. Needs to avoid monotony in their life. Is in this life to learn and experience the value of freedom, but should not become too attached. Innate talents for oratory and dealing with the public.\",\n goal: \"Path 5 brings the mission of religion. They are spirits who, not necessarily, have a religion, but who need spiritual construction to find comfort and give meaning to their existence.\",\n positiveTraits: [\"freedom\", \"adaptability\", \"joviality\", \"good humor\"],\n negativeTraits: [\"inconsequence\", \"irresponsibility\", \"frivolity\", \"hedonism\"],\n },\n [NumerologyValues.Six]: {\n description: \"Learning about the sense of responsibility towards family and community. Has a wide range of professional options ahead. Needs to acquire a refined sense of balance to be able to equalize injustices. Artistic abilities and judicial talents. In order to relieve the burden of those who are naturally attracted to you, must develop compassion and understanding.\",\n goal: \"Path 6 has family as its main mission. They create and need very strong loving bonds and generate great spiritual return when they constitute family and build a harmonious home. Any external problem can be neutralized by the strong vibration of unconditional family love and has inclination to find meaning in the concepts of marriage, fatherhood or motherhood.\",\n positiveTraits: [\"family bonds\", \"community balance\", \"compassion\", \"solicitude\"],\n negativeTraits: [\"invasion of privacy\", \"hypocrisy\", \"jealousy\", \"indecision\"],\n },\n [NumerologyValues.Seven]: {\n description: \"Needs to use and develop their mind. When speaking, their words should be wise. Will often need to rely on the strength of their spirit to solve difficult problems. Tendency towards mysterious and occult research. Must learn the value of solitude in order to get in touch with their HIGHER SELF and their deepest thoughts. Since their destiny is to use the mind.\",\n goal: \"The 7th path has conquest as its mission. It is a strong and powerful mission, as it requires the spirit to hold the reins of destiny in their hands. Nothing comes easy for these people, as the ability to conquer and build is the aspect they must work on. With effort, dedication and patience, they can move mountains and materialize miracles.\",\n positiveTraits: [\"intelligence\", \"introspection\", \"study\", \"common sense\", \"depth\"],\n negativeTraits: [\"isolation\", \"coldness\", \"mordacity\", \"melancholy\"],\n },\n [NumerologyValues.Eight]: {\n description: \"Number of power and ambition, of the executive, of the boss, who lives by brain and physical strength. Motivates people to be successful. Needs to lead by showing through examples how to profit in business. Needs to learn to deal with power, authority and money. To build a commercial empire (which is quite likely), needs to work towards this. Opportunities in the athletic and artistic fields.\",\n goal: \"Brings the mission of justice and makes this the permanent and constant value for spirits who have it as their mission. Any type of situation involving justice (or even injustice) requires the life experience of those born under the influence of path 8. They are spirits who seek balance in general, and can be great lawyers or judges.\",\n positiveTraits: [\"sense of justice\", \"material ability\", \"haughtiness\", \"ambition\"],\n negativeTraits: [\"greed\", \"cupidity\", \"tendency to own the truth\", \"materialism\"],\n },\n [NumerologyValues.Nine]: {\n description: \"Patience, kindness and understanding are attributes that need to be cultivated. You know that personal happiness is intimately linked with the capacity to give happiness to others. Material goods will come with some ease and despite adversities, the tendency is to always be successful. Areas linked to diplomacy will be favorable to you.\",\n goal: \"Path 9 refers to the mission of patience. They are spirits who want to improve the world and usually have facility in exercising faith and patience in the face of the most complicated situations. They possess an almost unalterable balance and great resilience. However, when they face much restlessness and a pattern of experiences that harm serenity, they should use the strength of patience for spiritual evolution and conflict resolution.\",\n positiveTraits: [\"democratic sense\", \"speed of thought\", \"openness to evolution\"],\n negativeTraits: [\"anxiety\", \"lack of control\", \"haste\", \"impulsiveness\"],\n },\n [NumerologyValues.Eleven]: {\n description: \"The key here is altruism and community. Must practice loving your neighbor as yourself. Must use their strong intuitions to achieve wisdom and inspiration. The patterns of 11 are very high and constant, therefore, it is one of the most difficult vibrations. Must learn to have patience and also to make quick decisions. Must seek balance between material and physical life, between the life of inspiration and the spiritual. May be successful in the field of sciences, new inventions, electronics. Possesses originality and creativity and can very well make use of inspired oratory. The number 11 is an esoteric master number, of spiritual importance. Gives courage, power and talent, with strong feelings for leadership. Will need to be careful that power doesn't go to their head. Fame and recognition are probable in their life, but should recognize that true mastery is service.\",\n goal: \"The 11th path has intelligence as its mission, favoring the entire intellectual side and presenting situations that require clear ideas to be resolved. They are questioning spirits, regarding life and the paths they want to follow and only convince themselves of something when they can rationalize the subject by themselves.\",\n positiveTraits: [\"far-reaching vision\", \"innate spirituality\", \"absence of prejudice\", \"pioneering\"],\n negativeTraits: [\"obsession\", \"feeling of displacement (doesn't fit into any group)\"],\n },\n [NumerologyValues.TwentyTwo]: {\n description: \"Need to express a basic desire for development, complete things in a full way and work with large groups or commercial organizations. Enjoying long trips, may do very well in import/export trade. This number promises success. Needs to be challenged in their power of achievement. Needs to learn to take care of large companies and corporations in addition to dealing efficiently and usefully with money, for the benefit of large groups of people.\",\n goal: \"Path 21 brings realization as its mission. It brings good results for those who are born under this influence. They are spirits who can build, create and materialize things and situations with ease, using their inner energy to reach their goals. They possess a high level of appreciation and are determined spirits.\",\n positiveTraits: [\"creativity\", \"development of ideas\", \"utilization of experiences\"],\n negativeTraits: [\"anxiety\", \"haste\", \"excessive agility\"],\n },\n [NumerologyValues.ThirtyThree]: {\n description: \"Needs to be firm and reliable, developing a strong desire to protect others. Taste for natural life, which leads them not to work in areas that are harmful to humanity. Tendency to need to sacrifice their own desires for the benefit of others' needs, in order to fulfill the vibration of their Life Lesson. The consciousness of this number almost surpasses that of humanity, being similar to that of Christ in expression.\",\n goal: \"The mission of path 33 is to embody unconditional love and act as a master-healer and master-teacher, elevating people's consciousness through example, care, inspiration and practical teachings. It is not a path focused on personal gains, but on alleviating suffering, nurturing, forgiving and organizing life around service to the collective, manifesting in daily life the energy of compassion and healing.\",\n positiveTraits: [\"unconditional love\", \"healing and welcoming\", \"master / spiritual guide\"],\n negativeTraits: [\"self-sacrifice\", \"emotional exhaustion\", \"savior complex\"],\n },\n [NumerologyValues.FortyFour]: {\n description: \"Represents strength and complete mastery of the mind over their life while on Earth. Asks for discipline in every sector of life, in order to collaborate for the promotion of the world's material advancement. Needs to train their mind to let superior forces act in it, keeping their body and environment in order, to be ready for any opportunity to achieve the same results for others. Must use their enormous evolutionary energy to help others put their lives in order. Needs to try to promote better ethics and justice in the business world. Will have to recognize reality, and then use what they learned to alleviate the physical burdens of other people. You can be the instrument and channel through which this change can happen. May serve as an example to others, demonstrating bravery, resourcefulness, courage and discipline.\",\n goal: \"The mission of path 44 is to be a \\\"master builder\\\" on the material plane: erecting structures, companies, systems and solid projects that unite efficiency, prosperity and service to the collective. It is the vibration that combines organizing power, discipline and long-term vision to manifest on a large scale, with ethics and responsibility, integrating spiritual wisdom and concrete results in the world.\",\n positiveTraits: [\"discipline and focus\", \"master material builder\", \"responsible leadership\"],\n negativeTraits: [\"workaholic and rigidity\", \"obsession with results\", \"coldness and internal pressure\"],\n },\n}\n\nexport enum ChallengeNumbers {\n Zero = 0,\n One = 1,\n Two = 2,\n Three = 3,\n Four = 4,\n Five = 5,\n Six = 6,\n Seven = 7,\n Eight = 8,\n}\n\nexport const CHALLENGE_MEANING: Record<ChallengeNumbers, string> = {\n [ChallengeNumbers.Zero]: \"Can be said to function as no challenge and all other challenges together. It is a difficult challenge, as it suffers the emotional reactions of all numbers, but the person knows what their problems are and must learn to face them, one at a time.\",\n [ChallengeNumbers.One]: \"Swings between maximum independence and lack of initiative. Can act both with arrogance and with weakness. Difficulty making decisions. Must learn not to waver. There may be a very strong connection with the father. Exaggerated reactions.\",\n [ChallengeNumbers.Two]: \"Tendency to get lost in minutiae or to ignore details. Must fight against the tendency toward excessive submission and being grumpy, complaining about everything and everyone, without justification. Oscillation between extreme sensitivity and a total refusal to be influenced by emotions. May not have received enough love from the mother or still have an excessively strong connection with her. Tendency to have problems with women. Should not always take things personally.\",\n [ChallengeNumbers.Three]: \"Excessive attention to external appearance and indifference toward social interaction rules. Ability to speak at the wrong time. Waste of energy. Must develop perceptive capacity. Avoid talking too much or staying silent when it's time to speak. Should measure words more carefully.\",\n [ChallengeNumbers.Four]: \"Can present either as a severe self-disciplinarian or with extreme lack of organization. Either does everything or does nothing. Always oscillates between extremes. Must develop perceptive capacity.\",\n [ChallengeNumbers.Five]: \"Periods of exhaustion and boredom. Can either jump from experience to experience or cling to the security of a pre-established routine. Sex and material pleasures should not be so important in their life. Needs to be more responsible, leaving impulsiveness aside as it will only bring suffering. Must learn to restrain themselves.\",\n [ChallengeNumbers.Six]: \"Desire to impose opinions on others and be enslaved by the people they love. Can either assume responsibilities that don't concern them or have no responsibility at all. Needs to learn not to meddle in what is not their business, in addition to knowing how to adapt to new situations. Must learn to accept and listen to others' opinions. Idealism that can transform into hypocrisy.\",\n [ChallengeNumbers.Seven]: \"Oscillation between naive behavior and total lack of trust in others. Arrogance or lack of self-love. Lacking faith, they fear being rejected, loneliness, poverty and life's realities. Should not be afraid to share their thoughts and emotions.\",\n [ChallengeNumbers.Eight]: \"Stinginess or dissipation. Can worry excessively about material life or show total carelessness. Has thirst for power, but lacks ambition. Needs to use common sense and play fair. Should not evaluate everything in terms of material value.\",\n}\n\nexport const CHALLENGE_HEALTH_MEANING: Record<ChallengeNumbers | NumerologyValues, string> = {\n [ChallengeNumbers.Zero]: \"There is no illness associated with the number zero.\",\n [ChallengeNumbers.One]: \"Prone to diseases in the head, headaches, sinusitis, allergies, injuries to the eyes, ears and head.\",\n [ChallengeNumbers.Two]: \"Tendency to retain fluids in the body. Delicate nervous system and kidneys.\",\n [ChallengeNumbers.Three]: \"May suffer from diseases that affect the throat, liver and glands.\",\n [ChallengeNumbers.Four]: \"Prone to chronic diseases and problems with teeth, bones, intestines, digestion and circulation.\",\n [ChallengeNumbers.Five]: \"Nervous or prone to accidents. May have problems with reproductive organs.\",\n [ChallengeNumbers.Six]: \"May suffer from chronic diseases or have circulatory and spinal problems.\",\n [ChallengeNumbers.Seven]: \"Propensity for congestion, infections and nervous problems.\",\n [ChallengeNumbers.Eight]: \"May have excess weight, high blood pressure, undergo surgical interventions. Propensity for problems with digestion, pancreas, stomach and nerves.\",\n [NumerologyValues.Nine]: \"Energy of deeply rooted attachment especially with diseases, can generate hypochondria.\",\n [NumerologyValues.Eleven]: \"Can bring much dispersion or lack of care with health, has difficulties doing preventive exams.\",\n [NumerologyValues.TwentyTwo]: \"Has tendencies to increase diseases and their impacts.\",\n [NumerologyValues.ThirtyThree]: \"Finds difficulties seeking help when necessary due to the master's energy.\",\n [NumerologyValues.FortyFour]: \"Has a tendency to be very efficient including in health treatments.\",\n}\n\nexport const PERSONAL_CYCLE_KEYWORDS: Record<NumerologyValues, string[]> = {\n [NumerologyValues.One]: [\"new beginnings\", \"action\", \"originality\", \"decision making\"],\n [NumerologyValues.Two]: [\"harmony\", \"cooperation\", \"mediation\", \"passivity\"],\n [NumerologyValues.Three]: [\"dispersion\", \"freedom\", \"entertainment\", \"self expression\"],\n [NumerologyValues.Four]: [\"practical nature\", \"work\", \"order\", \"foundation building\"],\n [NumerologyValues.Five]: [\"change\", \"freedom\", \"new intellectual interests\", \"travel\"],\n [NumerologyValues.Six]: [\"family\", \"health\", \"assistance\", \"attention to others' problems\"],\n [NumerologyValues.Seven]: [\"self-analysis\", \"achievement\", \"health problems\"],\n [NumerologyValues.Eight]: [\"business\", \"power\", \"responsibility\", \"money\"],\n [NumerologyValues.Nine]: [\"self-denial\", \"endings\", \"service\"],\n [NumerologyValues.Eleven]: [\"notoriety\", \"inspiration\", \"religion\"],\n [NumerologyValues.TwentyTwo]: [\"materialism\", \"great endeavors\"],\n [NumerologyValues.ThirtyThree]: [\"sacrifice\", \"compassion for others\"],\n [NumerologyValues.FortyFour]: [\"helping solve others' daily problems\", \"counseling\"],\n}\n\nexport const PERSONAL_YEAR_DESCRIPTIONS: Record<NumerologyValues, string> = {\n [NumerologyValues.One]: \"Put yourself into action. Use your initiative and set things in motion. The seeds planted now will have a greater chance of surviving throughout the entire cycle. Good time to start a new relationship, move to a new address, make a career change, and dedicate yourself to a new hobby. Develop your ideas, be positive, and don't hesitate to remain true to your decisions. Using your creative energy will allow you to achieve everything you desire.\",\n [NumerologyValues.Two]: \"This is a year of many emotions. You may fall in love and fall out of love. The seeds you plant now will germinate this year. Water them well. Pay attention to details, but be careful not to overdo it. Accumulate knowledge, meet new people, and acquire things. Assimilate, be receptive. Cooperate, be kind even when you feel like giving a sharp response. Patience, tact, and diplomacy will bring you everything you desire.\",\n [NumerologyValues.Three]: \"This is a year for you to have fun. Enjoy it! The seeds you planted in year 1 will bear fruit now. Expand your circle of friends, take good care of yourself, and make yourself noticed. Don't get involved in anything that could restrict your freedom. Develop the skills necessary to express your ideas and feelings. It will be worthwhile to speak in public or write. Social contacts will help you achieve everything you desire.\",\n [NumerologyValues.Four]: \"This is the year to build the foundations of your future and work hard. The vibration of 4 is about routine and organization. Systematize, be practical, and keep your feet on the ground. Cultivate solid relationships. It's a good time to organize your home. And since the body is the soul's shelter, exercise and diet are also important. By focusing on organization, you will obtain everything you want, this year and the next.\",\n [NumerologyValues.Five]: \"This is your year to renew yourself, travel, take on fewer responsibilities, and meet people. You will mature in a new way. Expect the unexpected. Let yourself be carried by your inner strength and the vibration of freedom. Be receptive to what is new. Free yourself from what is boring or limiting. Enjoy the pleasures of food, drink, and sex (without excess, of course). This is the year to reap the rewards for everything you accomplished in the previous year. The vibration of freedom will give you everything you desire.\",\n [NumerologyValues.Six]: \"This year you will be more settled than in the previous year, and your responsibilities will also be greater. Your commitments will be firmer; it's a good time to think about marriage as the vibration of 6 favors lasting relationships. Love and you will be loved, protect and you will be protected. You will have to adapt to others, you will have to act with more awareness regarding anything or anyone important in your life. Reconciliation will help you achieve what you want.\",\n [NumerologyValues.Seven]: \"Don't force decisions. Make only the unavoidable changes. If you start a romance now, you may be forced to share your new love with a third person. If the relationship doesn't change by the end of the year, it will most likely continue stable. It's a good year to write, study, and engage in deeper reflections. Rest, spend some hours alone every day, take vacations somewhere near water, and trust your intuition. You can achieve everything you want by letting things come to you: this year is for inner development; the following year for material gains.\",\n [NumerologyValues.Eight]: \"This is the best year to improve your business and the state of your finances. Money comes, money goes. Focus your attention on finances and material values. Get that raise, that promotion, and the greater power that comes with it. Organize your time. This year you will make a sensation. What remained hidden in year 7 will manifest now. Take care of your health by getting an annual check-up. Using common sense, everything will work out satisfactorily.\",\n [NumerologyValues.Nine]: \"This is your year to conclude things. Clean out the closets, finish your projects. Eliminate that blacklist of yours. What's done is done. Although changes that are coming in the next few years are already in the air, it's unlikely that anything you start this year will last very long. Either it will end before the year is over, or it will change again. The vibration of 9 will bring you nostalgia. You may have an exaggerated reaction and become temperamental. This year your family is the world. Keeping an open mind and broad perspective will help you achieve what you want.\",\n [NumerologyValues.Eleven]: \"Material matters occupy a secondary position this year. You may be absorbed by your own idealism and end up discovering that you don't always have your feet on the ground. Refine your tastes, expand your consciousness, and share your talents. This is an especially creative year for writers and artists. For people working in commercial activities, this is the year of diplomacy and gratitude. For spiritually oriented people, this is a year of illumination. Following this visionary vibration will help you obtain what you long for.\",\n [NumerologyValues.TwentyTwo]: \"This is your year to have an idea and make it concrete. Now you are a visionary who transforms an idea into reality. The highest master vibration is within you this year. Plan your activities, structure your dreams, serve others, and you will see that this will be a very successful year. Maintain balance and guard against radicalism and nervous tension. Working with this powerful practical vibration, you will achieve what you desire.\",\n [NumerologyValues.ThirtyThree]: \"This is a year that intensifies themes of love, family, and emotional responsibility. The energy calls for compassion, healing, and service: people may seek you out for support, guidance, or comfort, and your sensitivity tends to become more acute. Use your creative and spiritual talents to uplift and help others, but without taking on the role of savior or martyr. Take care of your boundaries, practice self-care, and let unconditional love manifest through concrete gestures. Living this vibration of service with balance, you can have deeply meaningful experiences and transform important bonds in your life.\",\n [NumerologyValues.FortyFour]: \"This is a year that enhances material achievements and the ability to build something great and lasting. The energy favors concrete accomplishments, professional expansion, and long-term structural projects, where your leadership and sense of responsibility become evident. Organization, discipline, and strategic vision will be essential to make the most of this cycle. Keep your feet on the ground, manage time and finances well, and don't sacrifice health or emotional life for success. Using this power ethically and in balance, you can consolidate very prosperous foundations and positively influence your surroundings.\",\n};","/**\n * Numerology calculations\n */\n\nimport { calculateGematria } from \"../gematria\";\nimport type * as NumerologyModuleTypes from \"./data\";\nimport * as NumerologyData from \"./data\";\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): NumerologyModuleTypes.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\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): NumerologyModuleTypes.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 = reduceToSingleWithSteps(finalSynthesis, { preserveMasters: true });\n const isMasterLifePath = isMasterNumber(lifePath.reducedValue);\n\n const personalMythologyNumbers = [\n parseInt(`${dayMonthSynthesis}${yearSynthesis}`, 10),\n finalSynthesis,\n ];\n\n if (finalSynthesis !== lifePath.reducedValue) {\n personalMythologyNumbers.push(lifePath.reducedValue);\n }\n\n const reducedLifePath = reduceToSingle(lifePath.reducedValue);\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\n/**\n * Calculate the traditional straight across reduction life path number based on a birth date.\n */\nexport function calculateStraightAcrossReductionLifePath(\n birthDate: Date\n): NumerologyModuleTypes.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 dayEnergy: reduceToSingleWithSteps(parseInt(day, 10), { preserveMasters: true }),\n monthEnergy: reduceToSingleWithSteps(parseInt(month, 10), { preserveMasters: true }),\n yearEnergy: reduceToSingleWithSteps(parseInt(year, 10), { preserveMasters: true }),\n lifePath: result,\n };\n}\n\nexport function getDateEnergies(birthDate: Date): NumerologyModuleTypes.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 function calculateChallenges(birthDate: Date): NumerologyModuleTypes.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\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\nfunction numberToHeptadCycle(number: number): NumerologyModuleTypes.HeptadCycles {\n if (number < 1 || number > 7) {\n throw new Error(\"Number must be between 1 and 7\");\n }\n\n return number as NumerologyModuleTypes.HeptadCycles;\n}\n\n// Calculate cycles (annual and monthly)\nexport function calculateCycles(startDate: Date, today: Date): NumerologyModuleTypes.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: NumerologyModuleTypes.CycleInfo[\"ageCycles\"] = [];\n const yearlyCycles: NumerologyModuleTypes.CycleInfo[\"yearlyCycles\"] = [];\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: NumerologyData.CYCLE_MEANINGS[numberToHeptadCycle(yearlyCycle)],\n isActive: isCurrentYearlyCycle,\n cycleStart: yearlyCycleStart,\n });\n }\n }\n\n ageCycles.push({\n number: cycle,\n description: NumerologyData.CYCLE_MEANINGS[numberToHeptadCycle(cycle)],\n isActive: isCurrentCycle,\n cycleStart,\n });\n }\n }\n\n // Monthly cycles (relative to start date)\n const monthlyCycles: NumerologyModuleTypes.CycleInfo[\"monthlyCycles\"] = [];\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: NumerologyData.CYCLE_MEANINGS[numberToHeptadCycle(i + 1)],\n isActive: false,\n cycleStart: cycleStart,\n });\n }\n\n // Find current monthly cycle\n let currentMonthlyCycle: NumerologyModuleTypes.CycleInfo[\"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 function calculateFibonacciCycle(\n birthDate: Date,\n today: Date\n): NumerologyModuleTypes.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\nfunction calculateSoulNumber(firstName: string): NumerologyModuleTypes.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): NumerologyModuleTypes.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): [NumerologyModuleTypes.PersonalPeriod, NumerologyModuleTypes.PersonalPeriod, NumerologyModuleTypes.PersonalPeriod] {\n const { month } = parseDate(birthDate);\n const birthMonth = parseInt(month, 10);\n\n const periods: [NumerologyModuleTypes.PersonalPeriod, NumerologyModuleTypes.PersonalPeriod, NumerologyModuleTypes.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: NumerologyModuleTypes.ReducedValueWithSteps,\n today: Date\n): {\n personalMonths: NumerologyModuleTypes.PersonalCycles[\"personalMonths\"];\n currentPersonalMonthIndex: number;\n} {\n const { month } = parseDate(birthDate);\n const firstPersonalMonth = parseInt(month, 10);\n\n const personalMonths: NumerologyModuleTypes.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 NumerologyModuleTypes.PersonalCycles[\"personalMonths\"],\n currentPersonalMonthIndex,\n };\n}\n\nexport function calculatePersonalCycles(\n birthDate: Date,\n today: Date = new Date(),\n firstName: string\n): NumerologyModuleTypes.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 = calculatePersonalPeriods(\n birthDate,\n yearToUse,\n lifePath.reducedValue,\n soulNumber.reducedValue,\n currentAge\n );\n\n const { personalMonths, 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(\n Math.min(currentPersonalMonth, 11) / 4\n );\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\nexport { NumerologyData };\nexport type { NumerologyModuleTypes };\n\n"]}
|