kaabalah 3.3.1 → 4.0.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.
Files changed (81) hide show
  1. package/dist/astrology/index.d.mts +47 -22
  2. package/dist/astrology/index.d.ts +47 -22
  3. package/dist/astrology/index.js +21 -17
  4. package/dist/astrology/index.mjs +2 -2
  5. package/dist/{chunk-6DHXZLYH.mjs → chunk-2Q6OWZV2.mjs} +3 -3
  6. package/dist/{chunk-6DHXZLYH.mjs.map → chunk-2Q6OWZV2.mjs.map} +1 -1
  7. package/dist/{chunk-JJ76YVMI.js → chunk-4GW52TEP.js} +18 -18
  8. package/dist/{chunk-JJ76YVMI.js.map → chunk-4GW52TEP.js.map} +1 -1
  9. package/dist/chunk-CGCEKFLD.js +685 -0
  10. package/dist/chunk-CGCEKFLD.js.map +1 -0
  11. package/dist/chunk-FM7WUVZV.js +26 -0
  12. package/dist/{chunk-2TUXWMP5.js.map → chunk-FM7WUVZV.js.map} +1 -1
  13. package/dist/{chunk-7CAIYKIO.js → chunk-LWX4YXES.js} +6 -6
  14. package/dist/{chunk-7CAIYKIO.js.map → chunk-LWX4YXES.js.map} +1 -1
  15. package/dist/{chunk-5ISXTWFX.mjs → chunk-MAK5YPPE.mjs} +3 -3
  16. package/dist/{chunk-5ISXTWFX.mjs.map → chunk-MAK5YPPE.mjs.map} +1 -1
  17. package/dist/{chunk-4IMODQPK.js → chunk-MFYKYKWX.js} +4 -4
  18. package/dist/{chunk-4IMODQPK.js.map → chunk-MFYKYKWX.js.map} +1 -1
  19. package/dist/chunk-P7VAKSJY.mjs +671 -0
  20. package/dist/chunk-P7VAKSJY.mjs.map +1 -0
  21. package/dist/chunk-WY6NIR2V.mjs +21 -0
  22. package/dist/{chunk-PY5SMMJB.mjs.map → chunk-WY6NIR2V.mjs.map} +1 -1
  23. package/dist/{chunk-3LUQXNH6.mjs → chunk-XQ6PO4OP.mjs} +3 -3
  24. package/dist/{chunk-3LUQXNH6.mjs.map → chunk-XQ6PO4OP.mjs.map} +1 -1
  25. package/dist/core/index.js +37 -37
  26. package/dist/core/index.mjs +2 -2
  27. package/dist/gematria/index.js +4 -4
  28. package/dist/gematria/index.mjs +3 -3
  29. package/dist/ifa/index.js +1 -1
  30. package/dist/ifa/index.mjs +1 -1
  31. package/dist/index.d.mts +1 -1
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.js +75 -71
  34. package/dist/index.mjs +5 -5
  35. package/dist/numerology/index.js +19 -19
  36. package/dist/numerology/index.mjs +4 -4
  37. package/dist/swisseph.js +1 -1
  38. package/dist/swisseph.node-2K5IHMKE.wasm +0 -0
  39. package/dist/swisseph.node-6H4ISR7M.mjs +3356 -0
  40. package/dist/swisseph.node-6H4ISR7M.mjs.map +1 -0
  41. package/dist/swisseph.node-UD2JYYLE.js +3358 -0
  42. package/dist/swisseph.node-UD2JYYLE.js.map +1 -0
  43. package/dist/swisseph.node.js +30 -0
  44. package/dist/swisseph.node.wasm +0 -0
  45. package/dist/swisseph.wasm +0 -0
  46. package/dist/swisseph.web-2K5IHMKE.wasm +0 -0
  47. package/dist/{chunk-T2JS2IJN.js → swisseph.web-MXYBWOOS.js} +43 -472
  48. package/dist/swisseph.web-MXYBWOOS.js.map +1 -0
  49. package/dist/{chunk-S6GM43CR.mjs → swisseph.web-TSFJI7DQ.mjs} +30 -448
  50. package/dist/swisseph.web-TSFJI7DQ.mjs.map +1 -0
  51. package/dist/swisseph.web.js +30 -0
  52. package/dist/swisseph.web.wasm +0 -0
  53. package/dist/tarot/index.js +1 -1
  54. package/dist/tarot/index.mjs +1 -1
  55. package/dist/wasm/build/swisseph.js +1 -1
  56. package/dist/wasm/build/swisseph.node-2K5IHMKE.wasm +0 -0
  57. package/dist/wasm/build/swisseph.node-6H4ISR7M.mjs +3356 -0
  58. package/dist/wasm/build/swisseph.node-6H4ISR7M.mjs.map +1 -0
  59. package/dist/wasm/build/swisseph.node-UD2JYYLE.js +3358 -0
  60. package/dist/wasm/build/swisseph.node-UD2JYYLE.js.map +1 -0
  61. package/dist/wasm/build/swisseph.node.js +30 -0
  62. package/dist/wasm/build/swisseph.node.wasm +0 -0
  63. package/dist/wasm/build/swisseph.wasm +0 -0
  64. package/dist/wasm/build/swisseph.web-2K5IHMKE.wasm +0 -0
  65. package/dist/wasm/build/swisseph.web-MXYBWOOS.js +3055 -0
  66. package/dist/wasm/build/swisseph.web-MXYBWOOS.js.map +1 -0
  67. package/dist/wasm/build/swisseph.web-TSFJI7DQ.mjs +3053 -0
  68. package/dist/wasm/build/swisseph.web-TSFJI7DQ.mjs.map +1 -0
  69. package/dist/wasm/build/swisseph.web.js +30 -0
  70. package/dist/wasm/build/swisseph.web.wasm +0 -0
  71. package/package.json +1 -1
  72. package/wasm/build/swisseph.js +1 -1
  73. package/wasm/build/swisseph.node.js +30 -0
  74. package/wasm/build/swisseph.node.wasm +0 -0
  75. package/wasm/build/swisseph.wasm +0 -0
  76. package/wasm/build/swisseph.web.js +30 -0
  77. package/wasm/build/swisseph.web.wasm +0 -0
  78. package/dist/chunk-2TUXWMP5.js +0 -47
  79. package/dist/chunk-PY5SMMJB.mjs +0 -41
  80. package/dist/chunk-S6GM43CR.mjs.map +0 -1
  81. package/dist/chunk-T2JS2IJN.js.map +0 -1
@@ -1,8 +1,8 @@
1
- import { __commonJS, __require, __toESM, __publicField } from './chunk-PY5SMMJB.mjs';
1
+ import { __commonJS, __require, __publicField } from './chunk-WY6NIR2V.mjs';
2
2
 
3
- // wasm/build/swisseph.js
4
- var require_swisseph = __commonJS({
5
- "wasm/build/swisseph.js"(exports, module) {
3
+ // wasm/build/swisseph.web.js
4
+ var require_swisseph_web = __commonJS({
5
+ "wasm/build/swisseph.web.js"(exports, module) {
6
6
  var SwissEphemerisModule = (() => {
7
7
  var _scriptName = typeof document != "undefined" ? document.currentScript?.src : void 0;
8
8
  if (typeof __filename != "undefined") _scriptName = _scriptName || __filename;
@@ -371,7 +371,7 @@ var require_swisseph = __commonJS({
371
371
  }
372
372
  var wasmBinaryFile;
373
373
  function findWasmBinary() {
374
- return locateFile("swisseph.wasm");
374
+ return locateFile("swisseph.web.wasm");
375
375
  }
376
376
  function getBinarySync(file) {
377
377
  if (file == wasmBinaryFile && wasmBinary) {
@@ -2912,8 +2912,18 @@ var require_swisseph = __commonJS({
2912
2912
  return ret;
2913
2913
  };
2914
2914
  var cwrap = (ident, returnType, argTypes, opts) => (...args) => ccall(ident, returnType, argTypes, args);
2915
+ var FS_createPath = FS.createPath;
2916
+ var FS_unlink = (path) => FS.unlink(path);
2917
+ var FS_createLazyFile = FS.createLazyFile;
2918
+ var FS_createDevice = FS.createDevice;
2915
2919
  FS.createPreloadedFile = FS_createPreloadedFile;
2916
2920
  FS.staticInit();
2921
+ Module["FS_createPath"] = FS.createPath;
2922
+ Module["FS_createDataFile"] = FS.createDataFile;
2923
+ Module["FS_createPreloadedFile"] = FS.createPreloadedFile;
2924
+ Module["FS_unlink"] = FS.unlink;
2925
+ Module["FS_createLazyFile"] = FS.createLazyFile;
2926
+ Module["FS_createDevice"] = FS.createDevice;
2917
2927
  function checkIncomingModuleAPI() {
2918
2928
  ignoredModuleProp("fetchSettings");
2919
2929
  }
@@ -2944,6 +2954,8 @@ var require_swisseph = __commonJS({
2944
2954
  var __emscripten_stack_restore = wasmExports["_emscripten_stack_restore"];
2945
2955
  var __emscripten_stack_alloc = wasmExports["_emscripten_stack_alloc"];
2946
2956
  var _emscripten_stack_get_current = wasmExports["emscripten_stack_get_current"];
2957
+ Module["addRunDependency"] = addRunDependency;
2958
+ Module["removeRunDependency"] = removeRunDependency;
2947
2959
  Module["ccall"] = ccall;
2948
2960
  Module["cwrap"] = cwrap;
2949
2961
  Module["setValue"] = setValue;
@@ -2951,9 +2963,16 @@ var require_swisseph = __commonJS({
2951
2963
  Module["UTF8ToString"] = UTF8ToString;
2952
2964
  Module["stringToUTF8"] = stringToUTF8;
2953
2965
  Module["lengthBytesUTF8"] = lengthBytesUTF8;
2954
- var missingLibrarySymbols = ["writeI53ToI64", "writeI53ToI64Clamped", "writeI53ToI64Signaling", "writeI53ToU64Clamped", "writeI53ToU64Signaling", "readI53FromI64", "readI53FromU64", "convertI32PairToI53", "convertI32PairToI53Checked", "convertU32PairToI53", "getTempRet0", "setTempRet0", "exitJS", "inetPton4", "inetNtop4", "inetPton6", "inetNtop6", "readSockaddr", "writeSockaddr", "emscriptenLog", "readEmAsmArgs", "jstoi_q", "listenOnce", "autoResumeAudioContext", "getDynCaller", "dynCall", "handleException", "keepRuntimeAlive", "runtimeKeepalivePush", "runtimeKeepalivePop", "callUserCallback", "maybeExit", "asmjsMangle", "HandleAllocator", "getNativeTypeSize", "addOnInit", "addOnPostCtor", "addOnPreMain", "addOnExit", "STACK_SIZE", "STACK_ALIGN", "POINTER_SIZE", "ASSERTIONS", "uleb128Encode", "sigToWasmTypes", "generateFuncType", "convertJsFunctionToWasm", "getEmptyTableSlot", "updateTableMap", "getFunctionAddress", "addFunction", "removeFunction", "reallyNegative", "strLen", "reSign", "formatString", "intArrayToString", "AsciiToString", "UTF16ToString", "stringToUTF16", "lengthBytesUTF16", "UTF32ToString", "stringToUTF32", "lengthBytesUTF32", "stringToNewUTF8", "registerKeyEventCallback", "maybeCStringToJsString", "findEventTarget", "getBoundingClientRect", "fillMouseEventData", "registerMouseEventCallback", "registerWheelEventCallback", "registerUiEventCallback", "registerFocusEventCallback", "fillDeviceOrientationEventData", "registerDeviceOrientationEventCallback", "fillDeviceMotionEventData", "registerDeviceMotionEventCallback", "screenOrientation", "fillOrientationChangeEventData", "registerOrientationChangeEventCallback", "fillFullscreenChangeEventData", "registerFullscreenChangeEventCallback", "JSEvents_requestFullscreen", "JSEvents_resizeCanvasForFullscreen", "registerRestoreOldStyle", "hideEverythingExceptGivenElement", "restoreHiddenElements", "setLetterbox", "softFullscreenResizeWebGLRenderTarget", "doRequestFullscreen", "fillPointerlockChangeEventData", "registerPointerlockChangeEventCallback", "registerPointerlockErrorEventCallback", "requestPointerLock", "fillVisibilityChangeEventData", "registerVisibilityChangeEventCallback", "registerTouchEventCallback", "fillGamepadEventData", "registerGamepadEventCallback", "registerBeforeUnloadEventCallback", "fillBatteryEventData", "battery", "registerBatteryEventCallback", "setCanvasElementSize", "getCanvasElementSize", "jsStackTrace", "getCallstack", "convertPCtoSourceLocation", "checkWasiClock", "wasiRightsToMuslOFlags", "wasiOFlagsToMuslOFlags", "safeSetTimeout", "setImmediateWrapped", "safeRequestAnimationFrame", "clearImmediateWrapped", "registerPostMainLoop", "registerPreMainLoop", "getPromise", "makePromise", "idsToPromises", "makePromiseCallback", "ExceptionInfo", "findMatchingCatch", "Browser_asyncPrepareDataCounter", "isLeapYear", "ydayFromDate", "arraySum", "addDays", "getSocketFromFD", "getSocketAddress", "FS_unlink", "FS_mkdirTree", "_setNetworkCallback", "heapObjectForWebGLType", "toTypedArrayIndex", "webgl_enable_ANGLE_instanced_arrays", "webgl_enable_OES_vertex_array_object", "webgl_enable_WEBGL_draw_buffers", "webgl_enable_WEBGL_multi_draw", "webgl_enable_EXT_polygon_offset_clamp", "webgl_enable_EXT_clip_control", "webgl_enable_WEBGL_polygon_mode", "emscriptenWebGLGet", "computeUnpackAlignedImageSize", "colorChannelsInGlTextureFormat", "emscriptenWebGLGetTexPixelData", "emscriptenWebGLGetUniform", "webglGetUniformLocation", "webglPrepareUniformLocationsBeforeFirstUse", "webglGetLeftBracePos", "emscriptenWebGLGetVertexAttrib", "__glGetActiveAttribOrUniform", "writeGLArray", "registerWebGlEventCallback", "runAndAbortIfError", "ALLOC_NORMAL", "ALLOC_STACK", "allocate", "writeStringToMemory", "writeAsciiToMemory", "setErrNo", "demangle", "stackTrace"];
2966
+ Module["FS_createPreloadedFile"] = FS_createPreloadedFile;
2967
+ Module["FS_unlink"] = FS_unlink;
2968
+ Module["FS_createPath"] = FS_createPath;
2969
+ Module["FS_createDevice"] = FS_createDevice;
2970
+ Module["FS"] = FS;
2971
+ Module["FS_createDataFile"] = FS_createDataFile;
2972
+ Module["FS_createLazyFile"] = FS_createLazyFile;
2973
+ var missingLibrarySymbols = ["writeI53ToI64", "writeI53ToI64Clamped", "writeI53ToI64Signaling", "writeI53ToU64Clamped", "writeI53ToU64Signaling", "readI53FromI64", "readI53FromU64", "convertI32PairToI53", "convertI32PairToI53Checked", "convertU32PairToI53", "getTempRet0", "setTempRet0", "exitJS", "inetPton4", "inetNtop4", "inetPton6", "inetNtop6", "readSockaddr", "writeSockaddr", "emscriptenLog", "readEmAsmArgs", "jstoi_q", "listenOnce", "autoResumeAudioContext", "getDynCaller", "dynCall", "handleException", "keepRuntimeAlive", "runtimeKeepalivePush", "runtimeKeepalivePop", "callUserCallback", "maybeExit", "asmjsMangle", "HandleAllocator", "getNativeTypeSize", "addOnInit", "addOnPostCtor", "addOnPreMain", "addOnExit", "STACK_SIZE", "STACK_ALIGN", "POINTER_SIZE", "ASSERTIONS", "uleb128Encode", "sigToWasmTypes", "generateFuncType", "convertJsFunctionToWasm", "getEmptyTableSlot", "updateTableMap", "getFunctionAddress", "addFunction", "removeFunction", "reallyNegative", "strLen", "reSign", "formatString", "intArrayToString", "AsciiToString", "UTF16ToString", "stringToUTF16", "lengthBytesUTF16", "UTF32ToString", "stringToUTF32", "lengthBytesUTF32", "stringToNewUTF8", "registerKeyEventCallback", "maybeCStringToJsString", "findEventTarget", "getBoundingClientRect", "fillMouseEventData", "registerMouseEventCallback", "registerWheelEventCallback", "registerUiEventCallback", "registerFocusEventCallback", "fillDeviceOrientationEventData", "registerDeviceOrientationEventCallback", "fillDeviceMotionEventData", "registerDeviceMotionEventCallback", "screenOrientation", "fillOrientationChangeEventData", "registerOrientationChangeEventCallback", "fillFullscreenChangeEventData", "registerFullscreenChangeEventCallback", "JSEvents_requestFullscreen", "JSEvents_resizeCanvasForFullscreen", "registerRestoreOldStyle", "hideEverythingExceptGivenElement", "restoreHiddenElements", "setLetterbox", "softFullscreenResizeWebGLRenderTarget", "doRequestFullscreen", "fillPointerlockChangeEventData", "registerPointerlockChangeEventCallback", "registerPointerlockErrorEventCallback", "requestPointerLock", "fillVisibilityChangeEventData", "registerVisibilityChangeEventCallback", "registerTouchEventCallback", "fillGamepadEventData", "registerGamepadEventCallback", "registerBeforeUnloadEventCallback", "fillBatteryEventData", "battery", "registerBatteryEventCallback", "setCanvasElementSize", "getCanvasElementSize", "jsStackTrace", "getCallstack", "convertPCtoSourceLocation", "checkWasiClock", "wasiRightsToMuslOFlags", "wasiOFlagsToMuslOFlags", "safeSetTimeout", "setImmediateWrapped", "safeRequestAnimationFrame", "clearImmediateWrapped", "registerPostMainLoop", "registerPreMainLoop", "getPromise", "makePromise", "idsToPromises", "makePromiseCallback", "ExceptionInfo", "findMatchingCatch", "Browser_asyncPrepareDataCounter", "isLeapYear", "ydayFromDate", "arraySum", "addDays", "getSocketFromFD", "getSocketAddress", "FS_mkdirTree", "_setNetworkCallback", "heapObjectForWebGLType", "toTypedArrayIndex", "webgl_enable_ANGLE_instanced_arrays", "webgl_enable_OES_vertex_array_object", "webgl_enable_WEBGL_draw_buffers", "webgl_enable_WEBGL_multi_draw", "webgl_enable_EXT_polygon_offset_clamp", "webgl_enable_EXT_clip_control", "webgl_enable_WEBGL_polygon_mode", "emscriptenWebGLGet", "computeUnpackAlignedImageSize", "colorChannelsInGlTextureFormat", "emscriptenWebGLGetTexPixelData", "emscriptenWebGLGetUniform", "webglGetUniformLocation", "webglPrepareUniformLocationsBeforeFirstUse", "webglGetLeftBracePos", "emscriptenWebGLGetVertexAttrib", "__glGetActiveAttribOrUniform", "writeGLArray", "registerWebGlEventCallback", "runAndAbortIfError", "ALLOC_NORMAL", "ALLOC_STACK", "allocate", "writeStringToMemory", "writeAsciiToMemory", "setErrNo", "demangle", "stackTrace"];
2955
2974
  missingLibrarySymbols.forEach(missingLibrarySymbol);
2956
- var unexportedSymbols = ["run", "addRunDependency", "removeRunDependency", "out", "err", "callMain", "abort", "wasmMemory", "wasmExports", "writeStackCookie", "checkStackCookie", "INT53_MAX", "INT53_MIN", "bigintToI53Checked", "stackSave", "stackRestore", "stackAlloc", "ptrToString", "zeroMemory", "getHeapMax", "growMemory", "ENV", "ERRNO_CODES", "strError", "DNS", "Protocols", "Sockets", "timers", "warnOnce", "readEmAsmArgsArray", "jstoi_s", "getExecutableName", "asyncLoad", "alignMemory", "mmapAlloc", "wasmTable", "noExitRuntime", "addOnPreRun", "addOnPostRun", "getCFunc", "freeTableIndexes", "functionsInTableMap", "unSign", "PATH", "PATH_FS", "UTF8Decoder", "UTF8ArrayToString", "stringToUTF8Array", "intArrayFromString", "stringToAscii", "UTF16Decoder", "stringToUTF8OnStack", "writeArrayToMemory", "JSEvents", "specialHTMLTargets", "findCanvasEventTarget", "currentFullscreenStrategy", "restoreOldWindowedStyle", "UNWIND_CACHE", "ExitStatus", "getEnvStrings", "doReadv", "doWritev", "initRandomFill", "randomFill", "emSetImmediate", "emClearImmediate_deps", "emClearImmediate", "promiseMap", "uncaughtExceptionCount", "exceptionLast", "exceptionCaught", "Browser", "getPreloadedImageData__data", "wget", "MONTH_DAYS_REGULAR", "MONTH_DAYS_LEAP", "MONTH_DAYS_REGULAR_CUMULATIVE", "MONTH_DAYS_LEAP_CUMULATIVE", "SYSCALLS", "preloadPlugins", "FS_createPreloadedFile", "FS_modeStringToFlags", "FS_getMode", "FS_stdin_getChar_buffer", "FS_stdin_getChar", "FS_createPath", "FS_createDevice", "FS_readFile", "FS", "FS_createDataFile", "FS_createLazyFile", "MEMFS", "TTY", "PIPEFS", "SOCKFS", "tempFixedLengthArray", "miniTempWebGLFloatBuffers", "miniTempWebGLIntBuffers", "GL", "AL", "GLUT", "EGL", "GLEW", "IDBStore", "SDL", "SDL_gfx", "allocateUTF8", "allocateUTF8OnStack", "print", "printErr"];
2975
+ var unexportedSymbols = ["run", "out", "err", "callMain", "abort", "wasmMemory", "wasmExports", "writeStackCookie", "checkStackCookie", "INT53_MAX", "INT53_MIN", "bigintToI53Checked", "stackSave", "stackRestore", "stackAlloc", "ptrToString", "zeroMemory", "getHeapMax", "growMemory", "ENV", "ERRNO_CODES", "strError", "DNS", "Protocols", "Sockets", "timers", "warnOnce", "readEmAsmArgsArray", "jstoi_s", "getExecutableName", "asyncLoad", "alignMemory", "mmapAlloc", "wasmTable", "noExitRuntime", "addOnPreRun", "addOnPostRun", "getCFunc", "freeTableIndexes", "functionsInTableMap", "unSign", "PATH", "PATH_FS", "UTF8Decoder", "UTF8ArrayToString", "stringToUTF8Array", "intArrayFromString", "stringToAscii", "UTF16Decoder", "stringToUTF8OnStack", "writeArrayToMemory", "JSEvents", "specialHTMLTargets", "findCanvasEventTarget", "currentFullscreenStrategy", "restoreOldWindowedStyle", "UNWIND_CACHE", "ExitStatus", "getEnvStrings", "doReadv", "doWritev", "initRandomFill", "randomFill", "emSetImmediate", "emClearImmediate_deps", "emClearImmediate", "promiseMap", "uncaughtExceptionCount", "exceptionLast", "exceptionCaught", "Browser", "getPreloadedImageData__data", "wget", "MONTH_DAYS_REGULAR", "MONTH_DAYS_LEAP", "MONTH_DAYS_REGULAR_CUMULATIVE", "MONTH_DAYS_LEAP_CUMULATIVE", "SYSCALLS", "preloadPlugins", "FS_modeStringToFlags", "FS_getMode", "FS_stdin_getChar_buffer", "FS_stdin_getChar", "FS_readFile", "MEMFS", "TTY", "PIPEFS", "SOCKFS", "tempFixedLengthArray", "miniTempWebGLFloatBuffers", "miniTempWebGLIntBuffers", "GL", "AL", "GLUT", "EGL", "GLEW", "IDBStore", "SDL", "SDL_gfx", "allocateUTF8", "allocateUTF8OnStack", "print", "printErr"];
2957
2976
  unexportedSymbols.forEach(unexportedRuntimeSymbol);
2958
2977
  var calledRun;
2959
2978
  function stackCheckInit() {
@@ -3027,445 +3046,8 @@ var require_swisseph = __commonJS({
3027
3046
  define([], () => SwissEphemerisModule);
3028
3047
  }
3029
3048
  });
3049
+ var swisseph_webTSFJI7DQ = require_swisseph_web();
3030
3050
 
3031
- // src/astrology/swisseph.ts
3032
- var import_swisseph = __toESM(require_swisseph());
3033
-
3034
- // wasm/build/swisseph.wasm?url
3035
- var swisseph_default = "./swisseph-YPVN5VCI.wasm?url";
3036
-
3037
- // wasm/src/swisseph.ts
3038
- var Planet = /* @__PURE__ */ ((Planet2) => {
3039
- Planet2[Planet2["SUN"] = 0] = "SUN";
3040
- Planet2[Planet2["MOON"] = 1] = "MOON";
3041
- Planet2[Planet2["MERCURY"] = 2] = "MERCURY";
3042
- Planet2[Planet2["VENUS"] = 3] = "VENUS";
3043
- Planet2[Planet2["MARS"] = 4] = "MARS";
3044
- Planet2[Planet2["JUPITER"] = 5] = "JUPITER";
3045
- Planet2[Planet2["SATURN"] = 6] = "SATURN";
3046
- Planet2[Planet2["URANUS"] = 7] = "URANUS";
3047
- Planet2[Planet2["NEPTUNE"] = 8] = "NEPTUNE";
3048
- Planet2[Planet2["PLUTO"] = 9] = "PLUTO";
3049
- Planet2[Planet2["MEAN_NODE"] = 10] = "MEAN_NODE";
3050
- Planet2[Planet2["TRUE_NODE"] = 11] = "TRUE_NODE";
3051
- Planet2[Planet2["LILITH_MEAN"] = 12] = "LILITH_MEAN";
3052
- Planet2[Planet2["LILITH_TRUE"] = 13] = "LILITH_TRUE";
3053
- Planet2[Planet2["CHIRON"] = 15] = "CHIRON";
3054
- return Planet2;
3055
- })(Planet || {});
3056
- var HouseSystem = /* @__PURE__ */ ((HouseSystem2) => {
3057
- HouseSystem2["PLACIDUS"] = "P";
3058
- HouseSystem2["KOCH"] = "K";
3059
- HouseSystem2["PORPHYRIUS"] = "O";
3060
- HouseSystem2["REGIOMONTANUS"] = "R";
3061
- HouseSystem2["CAMPANUS"] = "C";
3062
- HouseSystem2["EQUAL"] = "E";
3063
- HouseSystem2["WHOLE_SIGN"] = "W";
3064
- HouseSystem2["MERIDIAN"] = "X";
3065
- HouseSystem2["MORINUS"] = "M";
3066
- HouseSystem2["KRUSINSKI"] = "U";
3067
- HouseSystem2["ALCABITIUS"] = "B";
3068
- return HouseSystem2;
3069
- })(HouseSystem || {});
3070
- var CalcFlag = /* @__PURE__ */ ((CalcFlag2) => {
3071
- CalcFlag2[CalcFlag2["JPL_EPH"] = 1] = "JPL_EPH";
3072
- CalcFlag2[CalcFlag2["SWISS_EPH"] = 2] = "SWISS_EPH";
3073
- CalcFlag2[CalcFlag2["MOSHIER"] = 4] = "MOSHIER";
3074
- CalcFlag2[CalcFlag2["HELIOCENTRIC"] = 8] = "HELIOCENTRIC";
3075
- CalcFlag2[CalcFlag2["TRUE_POS"] = 16] = "TRUE_POS";
3076
- CalcFlag2[CalcFlag2["J2000"] = 32] = "J2000";
3077
- CalcFlag2[CalcFlag2["NONUT"] = 64] = "NONUT";
3078
- CalcFlag2[CalcFlag2["SPEED3"] = 128] = "SPEED3";
3079
- CalcFlag2[CalcFlag2["SPEED"] = 256] = "SPEED";
3080
- CalcFlag2[CalcFlag2["EQUATORIAL"] = 2048] = "EQUATORIAL";
3081
- CalcFlag2[CalcFlag2["TOPOCTR"] = 32768] = "TOPOCTR";
3082
- CalcFlag2[CalcFlag2["SIDEREAL"] = 65536] = "SIDEREAL";
3083
- return CalcFlag2;
3084
- })(CalcFlag || {});
3085
- var SE_AST_OFFSET = 1e4;
3086
- var BODY = {
3087
- MEAN_APOGEE: 12,
3088
- // Lilith mean
3089
- OSC_APOGEE: 13};
3090
- var normalizeAngle = (deg) => (deg % 360 + 360) % 360;
3091
- var SwissEph = class {
3092
- /**
3093
- * Constructor that accepts a pre-initialized Swiss Ephemeris module
3094
- */
3095
- constructor(module) {
3096
- this.swe_julday = null;
3097
- this.swe_calc_ut = null;
3098
- this.swe_houses = null;
3099
- this.swe_house_pos = null;
3100
- this.swe_set_ephe_path = null;
3101
- this.swe_close = null;
3102
- this.swe_set_topo = null;
3103
- this.swe_set_sid_mode = null;
3104
- this.module = module;
3105
- this.swe_julday = this.module.cwrap("swe_julday", "number", ["number", "number", "number", "number", "number"]);
3106
- this.swe_calc_ut = this.module.cwrap("swe_calc_ut", "number", ["number", "number", "number", "number"]);
3107
- this.swe_houses = this.module.cwrap("swe_houses", "number", ["number", "number", "number", "number", "number", "number"]);
3108
- this.swe_house_pos = this.module.cwrap("swe_house_pos", "number", ["number", "number", "number", "string", "number", "number"]);
3109
- this.swe_set_ephe_path = this.module.cwrap("swe_set_ephe_path", null, ["number"]);
3110
- this.swe_close = this.module.cwrap("swe_close", null, []);
3111
- this.swe_set_topo = this.module.cwrap("swe_set_topo", null, ["number", "number", "number"]);
3112
- this.swe_set_sid_mode = this.module.cwrap("swe_set_sid_mode", null, ["number", "number", "number"]);
3113
- }
3114
- checkInitialized() {
3115
- if (!this.module) {
3116
- throw new Error("Swiss Ephemeris module not available.");
3117
- }
3118
- }
3119
- /**
3120
- * Sets the path to the ephemeris data files.
3121
- * @param path - The path to the directory containing ephemeris files.
3122
- */
3123
- setEphemerisPath(path) {
3124
- this.checkInitialized();
3125
- if (path && this.swe_set_ephe_path) {
3126
- const pathPtr = this.module._malloc(path.length + 1);
3127
- if (!pathPtr) {
3128
- throw new Error("Failed to allocate memory for ephemeris path");
3129
- }
3130
- this.module.stringToUTF8(path, pathPtr, path.length + 1);
3131
- this.swe_set_ephe_path(pathPtr);
3132
- this.module._free(pathPtr);
3133
- }
3134
- }
3135
- /**
3136
- * Calculate Julian day number for a given date and time
3137
- */
3138
- getJulianDay(date) {
3139
- this.checkInitialized();
3140
- if (!this.swe_julday) {
3141
- throw new Error("Julian day calculation function not available");
3142
- }
3143
- const year = date.getUTCFullYear();
3144
- const month = date.getUTCMonth() + 1;
3145
- const day = date.getUTCDate();
3146
- const hour = date.getUTCHours() + date.getUTCMinutes() / 60 + date.getUTCSeconds() / 3600;
3147
- return this.swe_julday(year, month, day, hour, 1);
3148
- }
3149
- /**
3150
- * Calculate planet position at a given Julian day
3151
- */
3152
- calculatePlanetPosition(julday, planet, flags = 2 /* SWISS_EPH */) {
3153
- this.checkInitialized();
3154
- if (!this.swe_calc_ut || !this.module) {
3155
- throw new Error("Planet calculation function not available");
3156
- }
3157
- const resultPtr = this.module._malloc(6 * 8);
3158
- if (!resultPtr) {
3159
- throw new Error("Failed to allocate memory for planet position");
3160
- }
3161
- try {
3162
- const ret = this.swe_calc_ut(julday, planet, flags, resultPtr);
3163
- if (ret < 0) {
3164
- throw new Error(`Swiss Ephemeris calculation failed with error code ${ret}`);
3165
- }
3166
- const position = {
3167
- longitude: this.module.getValue(resultPtr, "double"),
3168
- latitude: this.module.getValue(resultPtr + 8, "double"),
3169
- distance: this.module.getValue(resultPtr + 16, "double")
3170
- };
3171
- if (flags & 256 /* SPEED */) {
3172
- position.longitudeSpeed = this.module.getValue(resultPtr + 24, "double");
3173
- position.latitudeSpeed = this.module.getValue(resultPtr + 32, "double");
3174
- position.distanceSpeed = this.module.getValue(resultPtr + 40, "double");
3175
- }
3176
- return position;
3177
- } finally {
3178
- this.module._free(resultPtr);
3179
- }
3180
- }
3181
- /**
3182
- * Calculate houses for a given date, location, and house system
3183
- */
3184
- calculateHouses(julday, latitude, longitude, hsys = "P" /* PLACIDUS */) {
3185
- this.checkInitialized();
3186
- if (!this.swe_houses || !this.module) {
3187
- throw new Error("Houses calculation function not available");
3188
- }
3189
- if (latitude < -90 || latitude > 90) {
3190
- throw new Error("Latitude must be between -90 and 90 degrees");
3191
- }
3192
- if (longitude < -180 || longitude > 180) {
3193
- throw new Error("Longitude must be between -180 and 180 degrees");
3194
- }
3195
- const HOUSES_DOUBLES = 13;
3196
- const ASCMC_DOUBLES = 10;
3197
- const BYTES_PER_F64 = 8;
3198
- const totalBytes = (HOUSES_DOUBLES + ASCMC_DOUBLES) * BYTES_PER_F64;
3199
- const memoryPtr = this.module._malloc(totalBytes);
3200
- if (!memoryPtr) throw new Error("Memory allocation failed");
3201
- const housesPtr = memoryPtr;
3202
- const ascmcPtr = memoryPtr + HOUSES_DOUBLES * BYTES_PER_F64;
3203
- try {
3204
- const hsysCode = hsys.charCodeAt(0);
3205
- const ret = this.swe_houses(julday, latitude, longitude, hsysCode, housesPtr, ascmcPtr);
3206
- if (ret < 0) {
3207
- throw new Error(`Houses calculation failed with error code ${ret}`);
3208
- }
3209
- const houses = new Array(HOUSES_DOUBLES);
3210
- for (let i = 0; i < HOUSES_DOUBLES; i++) {
3211
- houses[i] = this.module.getValue(housesPtr + i * BYTES_PER_F64, "double");
3212
- }
3213
- const ascendant = this.module.getValue(ascmcPtr + 0 * BYTES_PER_F64, "double");
3214
- const mc = this.module.getValue(ascmcPtr + 1 * BYTES_PER_F64, "double");
3215
- const armc = this.module.getValue(ascmcPtr + 2 * BYTES_PER_F64, "double");
3216
- const vertex = this.module.getValue(ascmcPtr + 3 * BYTES_PER_F64, "double");
3217
- const equasc = this.module.getValue(ascmcPtr + 4 * BYTES_PER_F64, "double");
3218
- const coasc1 = this.module.getValue(ascmcPtr + 5 * BYTES_PER_F64, "double");
3219
- const coasc2 = this.module.getValue(ascmcPtr + 6 * BYTES_PER_F64, "double");
3220
- const polasc = this.module.getValue(ascmcPtr + 7 * BYTES_PER_F64, "double");
3221
- return {
3222
- ascendant,
3223
- mc,
3224
- houses,
3225
- ascmc: {
3226
- armc,
3227
- vertex,
3228
- equasc,
3229
- coasc1,
3230
- coasc2,
3231
- polasc
3232
- }
3233
- };
3234
- } finally {
3235
- this.module._free(memoryPtr);
3236
- }
3237
- }
3238
- /**
3239
- * Clean up and close the Swiss Ephemeris
3240
- */
3241
- close() {
3242
- this.checkInitialized();
3243
- if (this.swe_close) {
3244
- this.swe_close();
3245
- }
3246
- }
3247
- /**
3248
- * Set topocentric observer
3249
- */
3250
- setTopocentric(longitude, latitude, altitudeMeters = 0) {
3251
- this.checkInitialized();
3252
- if (!this.swe_set_topo) {
3253
- throw new Error("Topocentric calculation function not available");
3254
- }
3255
- this.swe_set_topo(longitude, latitude, altitudeMeters);
3256
- }
3257
- /**
3258
- * Set sidereal mode
3259
- * Ex.: mode=1 (Lahiri). See Swiss Ephemeris mode table.
3260
- */
3261
- setSiderealMode(mode, t0 = 0, ayan_t0 = 0) {
3262
- this.checkInitialized();
3263
- this.swe_set_sid_mode?.(mode, t0, ayan_t0);
3264
- }
3265
- /**
3266
- * Asteroid by MPC number
3267
- */
3268
- calculateAsteroidPosition(julday, mpcNumber, flags = 2 /* SWISS_EPH */) {
3269
- return this.calculatePlanetPosition(julday, SE_AST_OFFSET + mpcNumber, flags);
3270
- }
3271
- /**
3272
- * Lilith mean (12) and true (13)
3273
- */
3274
- calculateLilith(julday, kind = "mean", flags = 2 /* SWISS_EPH */) {
3275
- const id = kind === "mean" ? BODY.MEAN_APOGEE : BODY.OSC_APOGEE;
3276
- return this.calculatePlanetPosition(julday, id, flags);
3277
- }
3278
- };
3279
-
3280
- // src/astrology/swisseph.ts
3281
- var swissEph = null;
3282
- var DEFAULT_FLAGS = 2 /* SWISS_EPH */ | 256 /* SPEED */;
3283
- async function getSwissEph(options = {}) {
3284
- if (swissEph) {
3285
- return;
3286
- }
3287
- try {
3288
- const isBrowser = typeof window !== "undefined";
3289
- const finalWasmPath = options.wasmPath || (isBrowser ? swisseph_default : __require("path").resolve(__dirname, swisseph_default));
3290
- const module = await (0, import_swisseph.default)({
3291
- locateFile: () => finalWasmPath
3292
- });
3293
- const instance = new SwissEph(module);
3294
- const defaultEphePath = isBrowser ? "../ephe" : __require("path").resolve(__dirname, "../ephe");
3295
- const finalEphePath = options.ephePath || defaultEphePath;
3296
- instance.setEphemerisPath(finalEphePath);
3297
- swissEph = instance;
3298
- } catch (error) {
3299
- console.error("Error initializing Swiss Ephemeris:", error);
3300
- throw error;
3301
- }
3302
- }
3303
- async function calculatePlanetaryPositions(date) {
3304
- try {
3305
- checkInitialization();
3306
- const julday = swissEph.getJulianDay(date);
3307
- const flags = DEFAULT_FLAGS;
3308
- const planets = {
3309
- sun: 0 /* SUN */,
3310
- moon: 1 /* MOON */,
3311
- mercury: 2 /* MERCURY */,
3312
- venus: 3 /* VENUS */,
3313
- mars: 4 /* MARS */,
3314
- jupiter: 5 /* JUPITER */,
3315
- saturn: 6 /* SATURN */,
3316
- uranus: 7 /* URANUS */,
3317
- neptune: 8 /* NEPTUNE */,
3318
- pluto: 9 /* PLUTO */,
3319
- meanNode: 10 /* MEAN_NODE */,
3320
- // trueNode: Planet.TRUE_NODE,
3321
- // TODO: add chiron through seas_18.se1, seas_18.se2 and seasnam.txt files
3322
- // chiron: Planet.CHIRON,
3323
- lilithMean: 12 /* LILITH_MEAN */
3324
- // lilithTrue: Planet.LILITH_TRUE,
3325
- };
3326
- const positions = {};
3327
- for (const [name, id] of Object.entries(planets)) {
3328
- try {
3329
- positions[name] = swissEph.calculatePlanetPosition(julday, id, flags);
3330
- } catch (error) {
3331
- throw new Error(`Failed to calculate position for ${name}: ${error}`);
3332
- }
3333
- }
3334
- return positions;
3335
- } catch (error) {
3336
- console.error("Error calculating planetary positions:", error);
3337
- throw error;
3338
- }
3339
- }
3340
- async function calculateHouses(date, latitude, longitude, houseSystem) {
3341
- try {
3342
- checkInitialization();
3343
- const julday = swissEph.getJulianDay(date);
3344
- return swissEph.calculateHouses(julday, latitude, longitude, houseSystem);
3345
- } catch (error) {
3346
- console.error("Error calculating houses:", error);
3347
- throw error;
3348
- }
3349
- }
3350
- function closeSwissEph() {
3351
- if (swissEph) {
3352
- try {
3353
- swissEph.close();
3354
- swissEph = null;
3355
- } catch (error) {
3356
- console.error("Error closing Swiss Ephemeris:", error);
3357
- throw error;
3358
- }
3359
- }
3360
- }
3361
- function checkInitialization() {
3362
- if (!swissEph) {
3363
- throw new Error("Swiss Ephemeris not initialized. Call getSwissEph() first.");
3364
- }
3365
- }
3366
-
3367
- // src/astrology/index.ts
3368
- function validateInputs(options) {
3369
- if (!(options.date instanceof Date) || isNaN(options.date.getTime())) {
3370
- throw new Error("Invalid date provided");
3371
- }
3372
- if (typeof options.latitude !== "number" || options.latitude < -90 || options.latitude > 90) {
3373
- throw new Error("Invalid latitude: must be between -90 and 90 degrees");
3374
- }
3375
- if (typeof options.longitude !== "number" || options.longitude < -180 || options.longitude > 180) {
3376
- throw new Error("Invalid longitude: must be between -180 and 180 degrees");
3377
- }
3378
- if (typeof options.timezone !== "number" || options.timezone < -12 || options.timezone > 14) {
3379
- throw new Error("Invalid timezone: must be between -12 and +14");
3380
- }
3381
- }
3382
- async function getBirthChart(options) {
3383
- try {
3384
- validateInputs(options);
3385
- const localDate = new Date(options.date);
3386
- const utcDate = new Date(localDate.getTime() - options.timezone * 60 * 60 * 1e3);
3387
- const planets = await calculatePlanetaryPositions(utcDate);
3388
- if (!planets) {
3389
- throw new Error("Failed to calculate planetary positions");
3390
- }
3391
- const houses = await calculateHouses(
3392
- utcDate,
3393
- options.latitude,
3394
- options.longitude,
3395
- options.houseSystem || "P" /* PLACIDUS */
3396
- );
3397
- if (!houses) {
3398
- throw new Error("Failed to calculate houses");
3399
- }
3400
- return {
3401
- dateUtc: utcDate,
3402
- planets,
3403
- houses
3404
- };
3405
- } catch (error) {
3406
- console.error("Error calculating birth chart:", error);
3407
- throw error;
3408
- }
3409
- }
3410
- var SIGNS = [
3411
- "Aries",
3412
- "Taurus",
3413
- "Gemini",
3414
- "Cancer",
3415
- "Leo",
3416
- "Virgo",
3417
- "Libra",
3418
- "Scorpio",
3419
- "Sagittarius",
3420
- "Capricorn",
3421
- "Aquarius",
3422
- "Pisces"
3423
- ];
3424
- function formatDegreeMinutes(decimalDegrees) {
3425
- let deg = Math.floor(decimalDegrees);
3426
- let min = Math.round((decimalDegrees - deg) * 60);
3427
- if (min === 60) {
3428
- min = 0;
3429
- deg += 1;
3430
- }
3431
- return `${deg}\xB0${String(min).padStart(2, "0")}'`;
3432
- }
3433
- function getZodiacPosition(longitude) {
3434
- const L = normalizeAngle(longitude);
3435
- const signIndex = Math.floor(L / 30) % 12;
3436
- const within = L - signIndex * 30;
3437
- return {
3438
- sign: SIGNS[signIndex],
3439
- decimalDegrees: within,
3440
- traditionalFormat: formatDegreeMinutes(within),
3441
- decimal: within.toFixed(2) + "\xB0"
3442
- };
3443
- }
3444
- function formatHouseCusps(houses360) {
3445
- return houses360.map((lon, i) => {
3446
- const z = getZodiacPosition(lon);
3447
- return {
3448
- house: i + 1,
3449
- sign: z.sign,
3450
- degree: z.traditionalFormat,
3451
- longitude: normalizeAngle(lon)
3452
- };
3453
- });
3454
- }
3455
- function findHouseOf(longitude, cusps360) {
3456
- const L = normalizeAngle(longitude);
3457
- const H = cusps360.map((c, i) => ({ i: i + 1, L: normalizeAngle(c) })).sort((a, b) => a.L - b.L);
3458
- for (let k = 0; k < H.length; k++) {
3459
- const cur = H[k], nxt = H[(k + 1) % H.length];
3460
- if (nxt.L < cur.L) {
3461
- if (L >= cur.L || L < nxt.L) return cur.i;
3462
- } else {
3463
- if (L >= cur.L && L < nxt.L) return cur.i;
3464
- }
3465
- }
3466
- return 1;
3467
- }
3468
-
3469
- export { CalcFlag, HouseSystem, Planet, SIGNS, closeSwissEph, findHouseOf, formatDegreeMinutes, formatHouseCusps, getBirthChart, getSwissEph, getZodiacPosition, normalizeAngle };
3470
- //# sourceMappingURL=chunk-S6GM43CR.mjs.map
3471
- //# sourceMappingURL=chunk-S6GM43CR.mjs.map
3051
+ export { swisseph_webTSFJI7DQ as default };
3052
+ //# sourceMappingURL=swisseph.web-TSFJI7DQ.mjs.map
3053
+ //# sourceMappingURL=swisseph.web-TSFJI7DQ.mjs.map