nolo-cli 0.102.0-alpha.1 → 0.102.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/README.md +1 -1
  2. package/{_executeModel-LUNEV235.js → _executeModel-WLFACVFR.js} +74 -67
  3. package/action-PNPQLJHG.js +20 -0
  4. package/{addContentAction-O7R66HEX.js → addContentAction-RBOUD7SJ.js} +12 -11
  5. package/{addDialogAgentAction-74OA7KYP.js → addDialogAgentAction-IODCR6TB.js} +18 -19
  6. package/{agentDeleteCommand-2YAHAZFJ.js → agentDeleteCommand-XHHDYJ3U.js} +117 -42
  7. package/{agentEmailCommands-G6A7IRPQ.js → agentEmailCommands-GJ2TE3CV.js} +97 -87
  8. package/agentListCommands-B3YHJQNM.js +742 -0
  9. package/{agentMachineCommands-W2SMNSQ3.js → agentMachineCommands-KQLRJF5O.js} +48 -43
  10. package/{agentProviderCommands-GNPTL5XR.js → agentProviderCommands-XPJYZSCE.js} +97 -2
  11. package/{agentPullCommand-O5MPVJ5E.js → agentPullCommand-B4T2DJ5H.js} +1 -1
  12. package/agentRecordCommands-LXDIXYQM.js +138 -0
  13. package/agentRunCommand-P2KLVSYL.js +167 -0
  14. package/{agentRunControl-AVJR4JW4.js → agentRunControl-3HWA2LLQ.js} +2 -2
  15. package/{agentRuntimeLocal-VXZSDIGT.js → agentRuntimeLocal-SXYAKX3A.js} +48 -39
  16. package/{agentSlice-5YJHUO47.js → agentSlice-WBSSBKBB.js} +14 -13
  17. package/{appDeleteCommands-32MHLR4L.js → appDeleteCommands-4EX37I4K.js} +46 -41
  18. package/{appDeployCommands-WCQOUSOB.js → appDeployCommands-SDBR3J75.js} +46 -41
  19. package/{appDeployStatusCommands-6QKB7DYN.js → appDeployStatusCommands-764PQNYN.js} +46 -41
  20. package/{appGetCommands-SFAPP5PB.js → appGetCommands-BBCN3XJC.js} +46 -41
  21. package/{appListCommands-EKUBDRUO.js → appListCommands-OGTABCS3.js} +46 -41
  22. package/{authCommand-F4EFRRX6.js → authCommand-NHDLY3IB.js} +118 -24
  23. package/{authCommands-RGOGCPP6.js → authCommands-UDBJVSZU.js} +7 -5
  24. package/{builtinSkillRegistry-FUAVTRVZ.js → builtinSkillRegistry-MAR5LPAC.js} +10 -8
  25. package/{chromeCommands-FZYAU75D.js → chromeCommands-K27J4OVZ.js} +124 -28
  26. package/{chromeOpsCommands-62P2Q2YB.js → chromeOpsCommands-IXRLN57H.js} +4 -3
  27. package/{chunk-6OZ36FXI.js → chunk-27ONFIEY.js} +22 -4
  28. package/{chunk-JEDZAO7L.js → chunk-2SYTUTLI.js} +257 -37
  29. package/{chunk-53HEEOTT.js → chunk-2WJ57RJA.js} +83 -16
  30. package/{chunk-OIVSQH2O.js → chunk-3BXNTXYI.js} +299 -5
  31. package/{chunk-ABQYVJBJ.js → chunk-46Y5D2BZ.js} +5 -5
  32. package/{chunk-EYAQT56M.js → chunk-4DPP773Q.js} +2 -2
  33. package/{chunk-H62HCIUP.js → chunk-4FFUDT6D.js} +24 -21
  34. package/chunk-4LCOCOR5.js +50 -0
  35. package/{chunk-2GRGFCF6.js → chunk-4VJAC32I.js} +2 -1
  36. package/{chunk-IIVGDG4I.js → chunk-4YSOUKUR.js} +13 -7
  37. package/{chunk-MC4XLIJ7.js → chunk-523DITKR.js} +1 -1
  38. package/{chunk-E4MARS3Q.js → chunk-5GVBDNTO.js} +1 -1
  39. package/chunk-5J3PYNUP.js +255 -0
  40. package/{chunk-DRGSDQBL.js → chunk-5LTAPGPV.js} +10 -10
  41. package/chunk-5MMAK75Q.js +15 -0
  42. package/{chunk-JPGCXHNM.js → chunk-5OA5HMTL.js} +1 -1
  43. package/{chunk-42V6BK2E.js → chunk-62IL3KQV.js} +4 -34
  44. package/{chunk-3BMYXEUW.js → chunk-6O4IK4V2.js} +1 -1
  45. package/{chunk-AEOE4Z6Q.js → chunk-7EPXUZOX.js} +39 -15
  46. package/{chunk-GQBOR3G6.js → chunk-7KVZ5LDQ.js} +2 -2
  47. package/{chunk-DNCEALKX.js → chunk-7MMSLEPA.js} +22 -29
  48. package/{chunk-L5UXH3B2.js → chunk-7TKWCTSY.js} +22 -6
  49. package/chunk-A4SQRTZ6.js +15 -0
  50. package/{chunk-7S4YWN7P.js → chunk-ADBZWMFB.js} +4 -4
  51. package/chunk-AGIM7IMJ.js +147 -0
  52. package/{chunk-SSDAAEC2.js → chunk-AOJB5QYD.js} +873 -227
  53. package/{chunk-5UTFL4QJ.js → chunk-AOTBKDRK.js} +7 -0
  54. package/{chunk-Q554LLSI.js → chunk-AUDNYVRC.js} +1 -1
  55. package/chunk-BMQ2MJUK.js +153 -0
  56. package/{chunk-6YTOJY35.js → chunk-BZ7NPA6G.js} +35 -2
  57. package/{chunk-4S5QUMJP.js → chunk-CHNCM7EF.js} +11 -9
  58. package/chunk-CHOZJMJS.js +78 -0
  59. package/chunk-CJN5OERD.js +13545 -0
  60. package/{chunk-ACTMNVHM.js → chunk-CYSYR67N.js} +1 -1
  61. package/{chunk-GBRG75BQ.js → chunk-D2MDMY2M.js} +1 -0
  62. package/{chunk-RFCKMYDK.js → chunk-DNHENQ3T.js} +23 -28
  63. package/chunk-DZ7R5V3Y.js +164 -0
  64. package/{chunk-3VNWWVKB.js → chunk-E3YWHWCR.js} +50 -18
  65. package/{chunk-V4MJDUSR.js → chunk-E73ON47R.js} +2 -2
  66. package/{chunk-ETI2NYVF.js → chunk-EHER73LN.js} +4 -4
  67. package/{chunk-KQ4ONNQD.js → chunk-EKPKW6RM.js} +155 -8
  68. package/{chunk-TRV2MIDW.js → chunk-EXAJ6DCR.js} +1 -0
  69. package/{chunk-HJUYAD4A.js → chunk-FJ5BGMNM.js} +5 -5
  70. package/{chunk-2F7RJC6L.js → chunk-FOXQ7BAB.js} +1 -1
  71. package/{chunk-6VFARHZW.js → chunk-G53AA7RW.js} +934 -1091
  72. package/{chunk-J4MOO56S.js → chunk-GARACBQB.js} +10 -2
  73. package/chunk-GMZLP5DV.js +82 -0
  74. package/{chunk-5FBTLSFG.js → chunk-GUYEMTRK.js} +551 -516
  75. package/{chunk-FDTR4QJ6.js → chunk-H6A6X4EK.js} +32 -1
  76. package/{chunk-DVINR3PL.js → chunk-HDLLCBRF.js} +1 -1
  77. package/{chunk-QOKAKDPE.js → chunk-HIM3FCLF.js} +0 -1
  78. package/{chunk-ONXOABJR.js → chunk-HNGRBWYF.js} +3 -0
  79. package/{chunk-VLTIYV3X.js → chunk-HP57OUJO.js} +4 -4
  80. package/{chunk-6IG4XSS6.js → chunk-HRYFI64G.js} +88 -17
  81. package/{chunk-GPCZ7UXG.js → chunk-K6U4NKFJ.js} +1 -1
  82. package/{chunk-6Q33GUCC.js → chunk-KLUBZL6X.js} +1 -1
  83. package/{chunk-4OEFYTWL.js → chunk-LKERWYPX.js} +67 -48
  84. package/{chunk-LS2ZANRJ.js → chunk-LOCNXNOU.js} +1 -1
  85. package/{chunk-PUOC4YRO.js → chunk-M7VLQGQP.js} +11 -0
  86. package/{chunk-NA35QHCF.js → chunk-N4QIAW6W.js} +1 -1
  87. package/{chunk-BFU6C242.js → chunk-NMFV26UG.js} +1 -1
  88. package/{chunk-OEVAY4J6.js → chunk-NTDEBTK5.js} +18 -20
  89. package/{chunk-FZGV4FGK.js → chunk-NUHHBEJC.js} +378 -187
  90. package/chunk-NWENLDMM.js +42 -0
  91. package/chunk-OCZKATRC.js +129 -0
  92. package/{chunk-G2O6V3HJ.js → chunk-ODTDLPBV.js} +20 -11
  93. package/chunk-OW4APERY.js +870 -0
  94. package/{chunk-KQHGZWSV.js → chunk-OXME3PEE.js} +1 -1
  95. package/{chunk-Q2XN3EOZ.js → chunk-OYPMWCIQ.js} +67 -45
  96. package/{chunk-TOP2VXOR.js → chunk-PCF3QU5Q.js} +5 -5
  97. package/chunk-PH275YDS.js +7881 -0
  98. package/{chunk-WV42OMV7.js → chunk-PTDYOADJ.js} +8 -8
  99. package/{chunk-GEPUP7OO.js → chunk-SEA64CDY.js} +3 -3
  100. package/{chunk-5H7KJX7J.js → chunk-SEB5HAUU.js} +5 -5
  101. package/{chunk-6D6VBVEW.js → chunk-SNMQMOD2.js} +80 -14
  102. package/{chunk-BYMV6QZG.js → chunk-TNIX77YM.js} +4 -0
  103. package/{chunk-Z77CRGTW.js → chunk-TVCAR26G.js} +1 -1
  104. package/chunk-TY3TIUJK.js +89 -0
  105. package/{chunk-I3TQJXQ7.js → chunk-U3C3IA32.js} +9 -2
  106. package/{chunk-ORYWEJO4.js → chunk-U6IGAJT4.js} +47 -67
  107. package/{chunk-RG6JBBX5.js → chunk-U7XXEI5R.js} +166 -13
  108. package/{chunk-UZGQNTVW.js → chunk-UA324D4O.js} +8 -6
  109. package/chunk-UJXNKP5V.js +760 -0
  110. package/{chunk-UKZDAFYT.js → chunk-UM4PH574.js} +6 -10
  111. package/{chunk-ZCYXJSTU.js → chunk-V5OWQOJZ.js} +19 -88
  112. package/{chunk-3DII57IT.js → chunk-VCAQFMVN.js} +1 -1
  113. package/{chunk-JRQFUXY7.js → chunk-VEYL5MO5.js} +99 -22
  114. package/chunk-VIWDGTDA.js +8 -0
  115. package/chunk-VJVNU77E.js +83 -0
  116. package/{chunk-UKWGR5SS.js → chunk-VY6VFGKR.js} +194 -1144
  117. package/{chunk-BP4XNZRM.js → chunk-W72ISAKC.js} +4 -4
  118. package/{chunk-DHDMC6FO.js → chunk-WCGC6S77.js} +14 -9
  119. package/{chunk-QDSINZM3.js → chunk-WJ3B6FX6.js} +1 -14
  120. package/{chunk-HVURBGF3.js → chunk-XFUBXRVI.js} +6 -6
  121. package/{chunk-45C5ER5U.js → chunk-XIRXOUBV.js} +19 -17
  122. package/{chunk-O6OSWFZQ.js → chunk-XUWRURDF.js} +6 -0
  123. package/{chunk-Q67DOFOO.js → chunk-Y3PMXGLH.js} +2 -0
  124. package/{chunk-SH43IESU.js → chunk-YUNJN43V.js} +44 -9
  125. package/chunk-YV25TM3R.js +780 -0
  126. package/{chunk-X6DN5HBD.js → chunk-YXZYNMYK.js} +29 -9
  127. package/{chunk-BTI7PJDX.js → chunk-Z56IK6UT.js} +29 -78
  128. package/chunk-ZRAU6T47.js +56 -0
  129. package/commandRegistry-TDXN5OP7.js +833 -0
  130. package/{contentThunks-GJV22WVZ.js → contentThunks-F2BNWOZV.js} +36 -34
  131. package/{cooldownCommands-REAWYVTY.js → cooldownCommands-ZLEPIB4A.js} +2 -2
  132. package/{createAgentAutomationAction-6V25TZEO.js → createAgentAutomationAction-5N2NRNR7.js} +38 -36
  133. package/createDialogAction-DSEG4L5Y.js +69 -0
  134. package/{createPageAction-IR4BGJSI.js → createPageAction-K32FYQPE.js} +45 -42
  135. package/{chunk-YFE4A4O7.js → cursorProvider-YGGNMVWX.js} +2496 -9897
  136. package/{dbSlice-XVWBAGYN.js → dbSlice-Q25STFGJ.js} +11 -10
  137. package/{deleteFile-YG6QMJLU.js → deleteFile-AJ2EZMHT.js} +7 -6
  138. package/{dialogCommands-5J56DFWN.js → dialogCommands-ODG2OKLO.js} +49 -45
  139. package/{dialogSlice-UNX2FAPZ.js → dialogSlice-4GBOUTGL.js} +40 -33
  140. package/{dist-VODFSGNG.js → dist-NJC2W7I4.js} +61 -54
  141. package/{docCreateCommands-KYI2DC2U.js → docCreateCommands-Q6FQUHUF.js} +48 -43
  142. package/{docDeleteCommands-67REUSRY.js → docDeleteCommands-N224CFZL.js} +49 -44
  143. package/{docReadCommands-HOSVSBDJ.js → docReadCommands-CJWAEAB4.js} +47 -42
  144. package/{docStore-JWVG5NDO.js → docStore-ZTYSP3YE.js} +16 -12
  145. package/{docUpdateCommands-EMGCSMXY.js → docUpdateCommands-OPG6ZY4H.js} +48 -43
  146. package/{fetchMessages-EIU7UFFK.js → fetchMessages-I5ICDDHM.js} +5 -5
  147. package/{getPricing-LUSEABA6.js → getPricing-NMMFT3YI.js} +4 -4
  148. package/{handleSendMessageAction-B75UOJKF.js → handleSendMessageAction-XFZH2TQS.js} +110 -86
  149. package/index.js +87 -884
  150. package/{lib-FRRS27KN.js → lib-PU2G2MSO.js} +523 -191
  151. package/{localDialogRead-BTFJ4V2I.js → localDialogRead-ZHZ3KXDM.js} +2 -2
  152. package/{localRuntimeAuthority-6IR6BBXE.js → localRuntimeAuthority-TU6OBC76.js} +9 -6
  153. package/{localRuntimeDb-SYQGUF4U.js → localRuntimeDb-VKWVOPPI.js} +1 -1
  154. package/{machineCommands-GFPTOY6L.js → machineCommands-KMU3D5I5.js} +91 -81
  155. package/machineWsRunDispatch-6GJ5YOSW.js +154 -0
  156. package/{memberThunks-QGFLFVCI.js → memberThunks-R75S3RWP.js} +20 -18
  157. package/{models-T3SG6MJ5.js → models-ZPU5EDF4.js} +2 -2
  158. package/oauthTokenStore-ITEB663N.js +23 -0
  159. package/package.json +1 -1
  160. package/pdf-U6KSUEZZ.js +26435 -0
  161. package/processSpawn-SOAV3FEV.js +11 -0
  162. package/profileConfig-ZGOFORWV.js +43 -0
  163. package/{providerPresetApply-FG6NZ57W.js → providerPresetApply-TEBH7FDX.js} +7 -7
  164. package/{providerRegistry-757OWH3O.js → providerRegistry-CBJLNCET.js} +11 -7
  165. package/{read-COE3ZYR6.js → read-SRQMNO26.js} +7 -6
  166. package/{readDocTool-5USN4A6V.js → readDocTool-RC3JUNJ2.js} +5 -3
  167. package/{readlineWorkspace-UFSWHFKD.js → readlineWorkspace-EXCG3IFX.js} +2704 -2060
  168. package/{removeDialogAgentAction-IX3MN2ZO.js → removeDialogAgentAction-46XQV5Q7.js} +21 -25
  169. package/{runAgentClientLoop-25LJ4XGV.js → runAgentClientLoop-URRDZ5WG.js} +75 -69
  170. package/{runtimeDoctorCommands-X6WDBEQX.js → runtimeDoctorCommands-PIVSBZRZ.js} +4 -4
  171. package/runtimeModeArgs-2Y7BALTO.js +31 -0
  172. package/{setDialogExtraReferencesAction-X4HCPNZL.js → setDialogExtraReferencesAction-J4V5ADQF.js} +15 -13
  173. package/{setPrimaryDialogAgentAction-4GMIQLOD.js → setPrimaryDialogAgentAction-UHHV2QZW.js} +22 -26
  174. package/{chunk-AFUORTY4.js → settingThunks-PPZZZOWN.js} +226 -940
  175. package/{skillDiscovery-CYUCJMAG.js → skillDiscovery-ZBU76COE.js} +3 -3
  176. package/{slateUtils-RIZES3PV.js → slateUtils-NGV2NMKM.js} +1 -1
  177. package/{spaceCommands-NKJVJCQQ.js → spaceCommands-7CLUNI2I.js} +51 -46
  178. package/{streamAgentChatTurn-A46QFV4O.js → streamAgentChatTurn-YPUYKXDX.js} +206 -105
  179. package/{switchDialogAgentAction-N52LRPA3.js → switchDialogAgentAction-A2TMVGAE.js} +18 -19
  180. package/{tableCommands-O6NWHFKV.js → tableCommands-6U4BMLRR.js} +10 -10
  181. package/{toolApiClient-QVJ6HDNN.js → toolApiClient-EJT6TMFG.js} +3 -3
  182. package/tools-M5ENXZRJ.js +116 -0
  183. package/{tuiSummaryLlmCaller-WFRWERGK.js → tuiSummaryLlmCaller-Q65IBDGO.js} +24 -21
  184. package/{updateCommands-2M74UL7P.js → updateCommands-4EHDLF5J.js} +3 -3
  185. package/{updateDialogTitleAction-QJPZGF52.js → updateDialogTitleAction-7PNUE23W.js} +82 -44
  186. package/action-YVYQEAAV.js +0 -31
  187. package/agentListCommands-KMS675GZ.js +0 -406
  188. package/agentRecordCommands-D7BRMFNI.js +0 -128
  189. package/agentRunCommand-VL6MMEUB.js +0 -155
  190. package/browser-image-compression-MFDTD7K6.js +0 -1763
  191. package/chatQueueReduxAdapter-PQMRR2PK.js +0 -186
  192. package/chunk-M76ECQRD.js +0 -13658
  193. package/chunk-MEYIRKDN.js +0 -8967
  194. package/chunk-Q5FJJ6XI.js +0 -103
  195. package/chunk-QVKRR2SS.js +0 -20782
  196. package/chunk-S7Z2HMCN.js +0 -25
  197. package/chunk-Y5GCAMGP.js +0 -9
  198. package/chunk-YPREESF4.js +0 -225
  199. package/createDialogAction-SX36BGSX.js +0 -65
  200. package/machineWsRunDispatch-46PSZ3DJ.js +0 -144
  201. package/settingSlice-ZQZVUPKK.js +0 -204
  202. package/syncMapping-N6RGXGBW.js +0 -437
  203. package/tools-TTDGRNY6.js +0 -110
  204. package/{chunk-VMFTFOWF.js → chunk-3AH7LNUB.js} +7 -7
  205. package/{chunk-X7HHHIOZ.js → chunk-Y6ROFCZO.js} +0 -0
  206. package/{db-WK5MDZVN.js → db-VQSAOWAO.js} +1 -1
@@ -15313,6 +15313,8 @@ var require_zh_TW = __commonJS({
15313
15313
  var require_common3 = __commonJS({
15314
15314
  "node_modules/iztro/lib/i18n/locales/ko-KR/common.json"(exports, module) {
15315
15315
  module.exports = {
15316
+ lunarDate: "\uC74C\uB825 {{year}}\uB144 {{leapMonth}}{{month}}\uC6D4 {{day}}\uC77C",
15317
+ leapMonth: "\uC724",
15316
15318
  decadal: "\uB300\uD55C",
15317
15319
  childhood: "\uC5B4\uB9B0",
15318
15320
  yearly: "\uC720\uB144",
@@ -15693,6 +15695,8 @@ var require_ko_KR = __commonJS({
15693
15695
  var require_common4 = __commonJS({
15694
15696
  "node_modules/iztro/lib/i18n/locales/ja-JP/common.json"(exports, module) {
15695
15697
  module.exports = {
15698
+ lunarDate: "\u65E7\u66A6{{year}}\u5E74{{leapMonth}}{{month}}\u6708{{day}}\u65E5",
15699
+ leapMonth: "\u958F",
15696
15700
  decadal: "\u5927\u9650",
15697
15701
  childhood: "\u5B50\u4F9B",
15698
15702
  yearly: "\u6D41\u5E74",
@@ -16073,6 +16077,8 @@ var require_ja_JP = __commonJS({
16073
16077
  var require_common5 = __commonJS({
16074
16078
  "node_modules/iztro/lib/i18n/locales/en-US/common.json"(exports, module) {
16075
16079
  module.exports = {
16080
+ lunarDate: "Lunar {{year}}-{{leapMonth}}{{month}}-{{day}}",
16081
+ leapMonth: "leap-",
16076
16082
  decadal: "decadal",
16077
16083
  yearly: "yearly",
16078
16084
  monthly: "monthly",
@@ -16452,6 +16458,8 @@ var require_en_US = __commonJS({
16452
16458
  var require_common6 = __commonJS({
16453
16459
  "node_modules/iztro/lib/i18n/locales/vi-VN/common.json"(exports, module) {
16454
16460
  module.exports = {
16461
+ lunarDate: "\xC2m l\u1ECBch ng\xE0y {{day}} th\xE1ng {{leapMonth}}{{month}} n\u0103m {{year}}",
16462
+ leapMonth: "nhu\u1EADn ",
16455
16463
  decadal: "\u0110\u1EA1i H\u1EA1n",
16456
16464
  childhood: "\u0111\u1EE9a tr\u1EBB H\u1EA1n",
16457
16465
  yearly: "L\u01B0u Ni\xEAn",
@@ -16955,6 +16963,17 @@ var require_types = __commonJS({
16955
16963
  var require_i18n = __commonJS({
16956
16964
  "node_modules/iztro/lib/i18n/index.js"(exports) {
16957
16965
  "use strict";
16966
+ var __assign = exports && exports.__assign || function() {
16967
+ __assign = Object.assign || function(t2) {
16968
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
16969
+ s = arguments[i];
16970
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
16971
+ t2[p] = s[p];
16972
+ }
16973
+ return t2;
16974
+ };
16975
+ return __assign.apply(this, arguments);
16976
+ };
16958
16977
  var __createBinding = exports && exports.__createBinding || (Object.create ? function(o, m, k, k2) {
16959
16978
  if (k2 === void 0) k2 = k;
16960
16979
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -16975,7 +16994,7 @@ var require_i18n = __commonJS({
16975
16994
  return mod && mod.__esModule ? mod : { "default": mod };
16976
16995
  };
16977
16996
  Object.defineProperty(exports, "__esModule", { value: true });
16978
- exports.kot = exports.t = exports.setLanguage = void 0;
16997
+ exports.kot = exports.t = exports.withLanguage = exports.getLanguage = exports.setLanguage = void 0;
16979
16998
  var i18next_1 = __importDefault(require_i18next());
16980
16999
  var zh_CN_1 = __importDefault(require_zh_CN());
16981
17000
  var zh_TW_1 = __importDefault(require_zh_TW());
@@ -16984,6 +17003,7 @@ var require_i18n = __commonJS({
16984
17003
  var en_US_1 = __importDefault(require_en_US());
16985
17004
  var vi_VN_1 = __importDefault(require_vi_VN());
16986
17005
  var starAliases_1 = require_starAliases();
17006
+ var constants_1 = require_constants();
16987
17007
  var resources = {
16988
17008
  "en-US": {
16989
17009
  translation: en_US_1.default
@@ -17006,14 +17026,33 @@ var require_i18n = __commonJS({
17006
17026
  };
17007
17027
  i18next_1.default.init({ lng: "zh-CN", resources });
17008
17028
  var setLanguage = function(language) {
17029
+ if (!constants_1.LANGUAGES.includes(language))
17030
+ throw new Error("invalid language.");
17009
17031
  i18next_1.default.changeLanguage(language);
17010
17032
  };
17011
17033
  exports.setLanguage = setLanguage;
17012
- var t = function(str) {
17034
+ var activeLanguage;
17035
+ var getLanguage = function() {
17036
+ return activeLanguage !== null && activeLanguage !== void 0 ? activeLanguage : i18next_1.default.language;
17037
+ };
17038
+ exports.getLanguage = getLanguage;
17039
+ var withLanguage = function(language, calculate) {
17040
+ if (!constants_1.LANGUAGES.includes(language))
17041
+ throw new Error("invalid language.");
17042
+ var previous = activeLanguage;
17043
+ activeLanguage = language;
17044
+ try {
17045
+ return calculate();
17046
+ } finally {
17047
+ activeLanguage = previous;
17048
+ }
17049
+ };
17050
+ exports.withLanguage = withLanguage;
17051
+ var t = function(str, options) {
17013
17052
  if (!str) {
17014
17053
  return "";
17015
17054
  }
17016
- return i18next_1.default.t(str);
17055
+ return i18next_1.default.t(str, __assign(__assign({}, options), { lng: (0, exports.getLanguage)() }));
17017
17056
  };
17018
17057
  exports.t = t;
17019
17058
  var kot = function(value, k) {
@@ -17198,6 +17237,205 @@ var require_utils2 = __commonJS({
17198
17237
  }
17199
17238
  });
17200
17239
 
17240
+ // node_modules/iztro/lib/astro/config.js
17241
+ var require_config = __commonJS({
17242
+ "node_modules/iztro/lib/astro/config.js"(exports) {
17243
+ "use strict";
17244
+ var __assign = exports && exports.__assign || function() {
17245
+ __assign = Object.assign || function(t) {
17246
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
17247
+ s = arguments[i];
17248
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
17249
+ t[p] = s[p];
17250
+ }
17251
+ return t;
17252
+ };
17253
+ return __assign.apply(this, arguments);
17254
+ };
17255
+ var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
17256
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
17257
+ if (ar || !(i in from)) {
17258
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
17259
+ ar[i] = from[i];
17260
+ }
17261
+ }
17262
+ return to.concat(ar || Array.prototype.slice.call(from));
17263
+ };
17264
+ Object.defineProperty(exports, "__esModule", { value: true });
17265
+ exports.withConfig = exports.config = exports.resolveConfig = exports.resetConfig = exports.getConfig = void 0;
17266
+ var i18n_1 = require_i18n();
17267
+ var defaults = function() {
17268
+ return {
17269
+ mutagens: {},
17270
+ brightness: {},
17271
+ yearDivide: "normal",
17272
+ horoscopeDivide: "normal",
17273
+ ageDivide: "normal",
17274
+ dayDivide: "forward",
17275
+ algorithm: "default"
17276
+ };
17277
+ };
17278
+ var cloneTable = function(table) {
17279
+ var result = {};
17280
+ Object.entries(table).forEach(function(_a) {
17281
+ var key = _a[0], values = _a[1];
17282
+ if (values)
17283
+ result[key] = __spreadArray([], values, true);
17284
+ });
17285
+ return result;
17286
+ };
17287
+ var clone = function(value) {
17288
+ return __assign(__assign({}, value), { mutagens: cloneTable(value.mutagens), brightness: cloneTable(value.brightness) });
17289
+ };
17290
+ var globalConfig = defaults();
17291
+ var activeConfig;
17292
+ var getConfig = function() {
17293
+ return clone(activeConfig !== null && activeConfig !== void 0 ? activeConfig : globalConfig);
17294
+ };
17295
+ exports.getConfig = getConfig;
17296
+ var resetConfig = function() {
17297
+ globalConfig = defaults();
17298
+ };
17299
+ exports.resetConfig = resetConfig;
17300
+ var resolveConfig = function(options, base) {
17301
+ if (options === void 0) {
17302
+ options = {};
17303
+ }
17304
+ if (base === void 0) {
17305
+ base = activeConfig !== null && activeConfig !== void 0 ? activeConfig : globalConfig;
17306
+ }
17307
+ var result = clone(base);
17308
+ var choices = {
17309
+ yearDivide: ["normal", "exact"],
17310
+ horoscopeDivide: ["normal", "exact"],
17311
+ ageDivide: ["normal", "birthday"],
17312
+ dayDivide: ["current", "forward"],
17313
+ algorithm: ["default", "zhongzhou"]
17314
+ };
17315
+ Object.keys(choices).forEach(function(key) {
17316
+ var _a;
17317
+ var value = options[key];
17318
+ if (value !== void 0) {
17319
+ if (!choices[key].includes(value))
17320
+ throw new Error("invalid ".concat(key, "."));
17321
+ Object.assign(result, (_a = {}, _a[key] = value, _a));
17322
+ }
17323
+ });
17324
+ if (options.mutagens) {
17325
+ Object.entries(options.mutagens).forEach(function(_a) {
17326
+ var key = _a[0], stars = _a[1];
17327
+ result.mutagens[(0, i18n_1.kot)(key)] = stars.map(function(star) {
17328
+ return (0, i18n_1.kot)(star);
17329
+ });
17330
+ });
17331
+ }
17332
+ if (options.brightness) {
17333
+ Object.entries(options.brightness).forEach(function(_a) {
17334
+ var key = _a[0], levels = _a[1];
17335
+ result.brightness[(0, i18n_1.kot)(key)] = levels.map(function(level) {
17336
+ return (0, i18n_1.kot)(level);
17337
+ });
17338
+ });
17339
+ }
17340
+ return result;
17341
+ };
17342
+ exports.resolveConfig = resolveConfig;
17343
+ var config = function(options) {
17344
+ globalConfig = (0, exports.resolveConfig)(options, globalConfig);
17345
+ };
17346
+ exports.config = config;
17347
+ var withConfig = function(snapshot, calculate) {
17348
+ var previous = activeConfig;
17349
+ activeConfig = snapshot;
17350
+ try {
17351
+ return calculate();
17352
+ } finally {
17353
+ activeConfig = previous;
17354
+ }
17355
+ };
17356
+ exports.withConfig = withConfig;
17357
+ }
17358
+ });
17359
+
17360
+ // node_modules/iztro/lib/astro/context.js
17361
+ var require_context = __commonJS({
17362
+ "node_modules/iztro/lib/astro/context.js"(exports) {
17363
+ "use strict";
17364
+ var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
17365
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
17366
+ if (ar || !(i in from)) {
17367
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
17368
+ ar[i] = from[i];
17369
+ }
17370
+ }
17371
+ return to.concat(ar || Array.prototype.slice.call(from));
17372
+ };
17373
+ Object.defineProperty(exports, "__esModule", { value: true });
17374
+ exports.bindContext = exports.registerContextClass = void 0;
17375
+ var i18n_1 = require_i18n();
17376
+ var config_1 = require_config();
17377
+ var functionalPrototypes = /* @__PURE__ */ new WeakSet();
17378
+ var registerContextClass = function(prototype) {
17379
+ functionalPrototypes.add(prototype);
17380
+ };
17381
+ exports.registerContextClass = registerContextClass;
17382
+ var bindContext = function(root) {
17383
+ var config = (0, config_1.getConfig)();
17384
+ var language = (0, i18n_1.getLanguage)();
17385
+ var bound = /* @__PURE__ */ new WeakSet();
17386
+ var wrapped = /* @__PURE__ */ new WeakSet();
17387
+ var bind = function(value) {
17388
+ if (!value || typeof value !== "object" || bound.has(value))
17389
+ return;
17390
+ if (Array.isArray(value)) {
17391
+ bound.add(value);
17392
+ value.forEach(bind);
17393
+ return;
17394
+ }
17395
+ var prototype = Object.getPrototypeOf(value);
17396
+ while (prototype && !functionalPrototypes.has(prototype))
17397
+ prototype = Object.getPrototypeOf(prototype);
17398
+ if (!prototype)
17399
+ return;
17400
+ bound.add(value);
17401
+ var object = value;
17402
+ var keys = new Set(__spreadArray(__spreadArray([], Object.keys(object), true), Object.getOwnPropertyNames(prototype), true));
17403
+ keys.forEach(function(key) {
17404
+ if (key === "constructor" || key.startsWith("_") || key === "plugins")
17405
+ return;
17406
+ var member = object[key];
17407
+ if (typeof member === "function") {
17408
+ if (wrapped.has(member))
17409
+ return;
17410
+ var method = function() {
17411
+ var args = [];
17412
+ for (var _i = 0; _i < arguments.length; _i++) {
17413
+ args[_i] = arguments[_i];
17414
+ }
17415
+ return (0, config_1.withConfig)(config, function() {
17416
+ return (0, i18n_1.withLanguage)(language, function() {
17417
+ var result = member.apply(value, args);
17418
+ bind(result);
17419
+ bound.delete(value);
17420
+ bind(value);
17421
+ return result;
17422
+ });
17423
+ });
17424
+ };
17425
+ wrapped.add(method);
17426
+ object[key] = method;
17427
+ } else {
17428
+ bind(member);
17429
+ }
17430
+ });
17431
+ };
17432
+ bind(root);
17433
+ return root;
17434
+ };
17435
+ exports.bindContext = bindContext;
17436
+ }
17437
+ });
17438
+
17201
17439
  // node_modules/dayjs/dayjs.min.js
17202
17440
  var require_dayjs_min = __commonJS({
17203
17441
  "node_modules/dayjs/dayjs.min.js"(exports, module) {
@@ -17535,6 +17773,7 @@ var require_FunctionalSurpalaces = __commonJS({
17535
17773
  "use strict";
17536
17774
  Object.defineProperty(exports, "__esModule", { value: true });
17537
17775
  exports.FunctionalSurpalaces = void 0;
17776
+ var context_1 = require_context();
17538
17777
  var analyzer_1 = require_analyzer();
17539
17778
  var toJSON_1 = require_toJSON();
17540
17779
  var FunctionalSurpalaces = (
@@ -17570,6 +17809,7 @@ var require_FunctionalSurpalaces = __commonJS({
17570
17809
  }()
17571
17810
  );
17572
17811
  exports.FunctionalSurpalaces = FunctionalSurpalaces;
17812
+ (0, context_1.registerContextClass)(FunctionalSurpalaces.prototype);
17573
17813
  }
17574
17814
  });
17575
17815
 
@@ -17579,6 +17819,7 @@ var require_FunctionalFlankingPalaces = __commonJS({
17579
17819
  "use strict";
17580
17820
  Object.defineProperty(exports, "__esModule", { value: true });
17581
17821
  exports.FunctionalFlankingPalaces = void 0;
17822
+ var context_1 = require_context();
17582
17823
  var toJSON_1 = require_toJSON();
17583
17824
  var analyzer_1 = require_analyzer();
17584
17825
  var FunctionalFlankingPalaces = (
@@ -17612,6 +17853,7 @@ var require_FunctionalFlankingPalaces = __commonJS({
17612
17853
  }()
17613
17854
  );
17614
17855
  exports.FunctionalFlankingPalaces = FunctionalFlankingPalaces;
17856
+ (0, context_1.registerContextClass)(FunctionalFlankingPalaces.prototype);
17615
17857
  }
17616
17858
  });
17617
17859
 
@@ -17814,6 +18056,7 @@ var require_FunctionalHoroscope = __commonJS({
17814
18056
  "node_modules/iztro/lib/astro/FunctionalHoroscope.js"(exports) {
17815
18057
  "use strict";
17816
18058
  Object.defineProperty(exports, "__esModule", { value: true });
18059
+ var context_1 = require_context();
17817
18060
  var i18n_1 = require_i18n();
17818
18061
  var utils_1 = require_utils2();
17819
18062
  var data_1 = require_data();
@@ -17936,6 +18179,76 @@ var require_FunctionalHoroscope = __commonJS({
17936
18179
  }()
17937
18180
  );
17938
18181
  exports.default = FunctionalHoroscope;
18182
+ (0, context_1.registerContextClass)(FunctionalHoroscope.prototype);
18183
+ }
18184
+ });
18185
+
18186
+ // node_modules/iztro/lib/utils/validation.js
18187
+ var require_validation = __commonJS({
18188
+ "node_modules/iztro/lib/utils/validation.js"(exports) {
18189
+ "use strict";
18190
+ Object.defineProperty(exports, "__esModule", { value: true });
18191
+ exports.validateBoolean = exports.validateGender = exports.validateTimeIndex = exports.validateDate = void 0;
18192
+ var lunar_typescript_1 = require_dist();
18193
+ var i18n_1 = require_i18n();
18194
+ var validateDate = function(date, type, isLeapMonth) {
18195
+ if (type === void 0) {
18196
+ type = "solar";
18197
+ }
18198
+ if (isLeapMonth === void 0) {
18199
+ isLeapMonth = false;
18200
+ }
18201
+ var parts;
18202
+ if (date instanceof Date) {
18203
+ if (!Number.isFinite(date.getTime()))
18204
+ throw new Error("invalid date.");
18205
+ parts = [date.getFullYear(), date.getMonth() + 1, date.getDate()];
18206
+ } else {
18207
+ if (typeof date !== "string" || !/^\d{1,4}([-/.])\d{1,2}\1\d{1,2}(?: \d{1,2}:\d{1,2}(?::\d{1,2})?)?$/.test(date)) {
18208
+ throw new Error("invalid date.");
18209
+ }
18210
+ var _a = date.split(" "), day_1 = _a[0], time = _a[1];
18211
+ parts = day_1.split(/[-/.]/).map(Number);
18212
+ if (time) {
18213
+ var _b = time.split(":").map(Number), hour = _b[0], minute = _b[1], _c = _b[2], second = _c === void 0 ? 0 : _c;
18214
+ if (hour > 23 || minute > 59 || second > 59)
18215
+ throw new Error("invalid time.");
18216
+ }
18217
+ }
18218
+ var year = parts[0], month = parts[1], day = parts[2];
18219
+ if (year < 1 || year > 9999 || month < 1 || month > 12 || day < 1)
18220
+ throw new Error("invalid date.");
18221
+ if (type === "lunar") {
18222
+ var lunarYear = lunar_typescript_1.LunarYear.fromYear(year);
18223
+ var leap = isLeapMonth && lunarYear.getLeapMonth() === month;
18224
+ var lunarMonth = lunarYear.getMonth(leap ? -month : month);
18225
+ if (!lunarMonth || day > lunarMonth.getDayCount())
18226
+ throw new Error("invalid lunar date.");
18227
+ } else {
18228
+ if (year === 1582 && month === 10 && day >= 5 && day <= 14)
18229
+ throw new Error("invalid solar date.");
18230
+ var leap = lunar_typescript_1.SolarUtil.isLeapYear(year);
18231
+ var days = [31, leap ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
18232
+ if (day > days[month - 1])
18233
+ throw new Error("invalid solar date.");
18234
+ }
18235
+ };
18236
+ exports.validateDate = validateDate;
18237
+ var validateTimeIndex = function(index) {
18238
+ if (!Number.isInteger(index) || index < 0 || index > 12)
18239
+ throw new Error("invalid timeIndex: expected an integer from 0 to 12.");
18240
+ };
18241
+ exports.validateTimeIndex = validateTimeIndex;
18242
+ var validateGender = function(gender) {
18243
+ if (typeof gender !== "string" || !["male", "female"].includes((0, i18n_1.kot)(gender)))
18244
+ throw new Error("invalid gender.");
18245
+ };
18246
+ exports.validateGender = validateGender;
18247
+ var validateBoolean = function(value, name) {
18248
+ if (typeof value !== "boolean")
18249
+ throw new Error("invalid ".concat(name, ": expected a boolean."));
18250
+ };
18251
+ exports.validateBoolean = validateBoolean;
17939
18252
  }
17940
18253
  });
17941
18254
 
@@ -17956,6 +18269,7 @@ var require_FunctionalAstrolabe = __commonJS({
17956
18269
  return mod && mod.__esModule ? mod : { "default": mod };
17957
18270
  };
17958
18271
  Object.defineProperty(exports, "__esModule", { value: true });
18272
+ var context_1 = require_context();
17959
18273
  var dayjs_1 = __importDefault(require_dayjs_min());
17960
18274
  var lunar_lite_1 = require_lib();
17961
18275
  var lunar_typescript_1 = require_dist();
@@ -17966,25 +18280,29 @@ var require_FunctionalAstrolabe = __commonJS({
17966
18280
  var analyzer_1 = require_analyzer();
17967
18281
  var palace_1 = require_palace7();
17968
18282
  var FunctionalHoroscope_1 = __importDefault(require_FunctionalHoroscope());
17969
- var astro_1 = require_astro();
18283
+ var config_1 = require_config();
18284
+ var validation_1 = require_validation();
17970
18285
  var toJSON_1 = require_toJSON();
17971
18286
  var _getHoroscopeBySolarDate = function($, targetDate, timeIndex) {
17972
18287
  if (targetDate === void 0) {
17973
18288
  targetDate = /* @__PURE__ */ new Date();
17974
18289
  }
18290
+ (0, validation_1.validateDate)(targetDate);
18291
+ if (timeIndex !== void 0)
18292
+ (0, validation_1.validateTimeIndex)(timeIndex);
17975
18293
  var _birthday = (0, lunar_lite_1.solar2lunar)($.solarDate);
17976
18294
  var _date = (0, lunar_lite_1.solar2lunar)(targetDate);
17977
18295
  var convertTimeIndex = (0, utils_1.timeToIndex)((0, dayjs_1.default)(targetDate).hour());
17978
18296
  var targetTimeIndex = timeIndex !== null && timeIndex !== void 0 ? timeIndex : convertTimeIndex;
17979
- var adjustedTargetTimeIndex = (0, astro_1.getConfig)().dayDivide === "current" && targetTimeIndex >= 12 ? 0 : targetTimeIndex;
18297
+ var adjustedTargetTimeIndex = (0, config_1.getConfig)().dayDivide === "current" && targetTimeIndex >= 12 ? 0 : targetTimeIndex;
17980
18298
  var _a = (0, lunar_lite_1.getHeavenlyStemAndEarthlyBranchBySolarDate)(targetDate, adjustedTargetTimeIndex, {
17981
18299
  // 允许配置运限分割点
17982
- year: (0, astro_1.getConfig)().horoscopeDivide,
17983
- month: (0, astro_1.getConfig)().horoscopeDivide
18300
+ year: (0, config_1.getConfig)().horoscopeDivide,
18301
+ month: (0, config_1.getConfig)().horoscopeDivide
17984
18302
  }), yearly = _a.yearly, monthly = _a.monthly, daily = _a.daily, hourly = _a.hourly;
17985
18303
  var nominalAge = _date.lunarYear - _birthday.lunarYear;
17986
18304
  var isChildhood = false;
17987
- if ((0, astro_1.getConfig)().ageDivide === "birthday") {
18305
+ if ((0, config_1.getConfig)().ageDivide === "birthday") {
17988
18306
  if (_date.lunarMonth > _birthday.lunarMonth || _date.lunarMonth === _birthday.lunarMonth && _date.lunarDay > _birthday.lunarDay) {
17989
18307
  nominalAge += 1;
17990
18308
  }
@@ -18180,7 +18498,7 @@ var require_FunctionalAstrolabe = __commonJS({
18180
18498
  if (fixLeap === void 0) {
18181
18499
  fixLeap = true;
18182
18500
  }
18183
- if (!Number.isInteger(year)) {
18501
+ if (!Number.isInteger(year) || year < 1 || year > 9999) {
18184
18502
  throw new Error("invalid year.");
18185
18503
  }
18186
18504
  var age = year - _this.rawDates.lunarDate.lunarYear + 1;
@@ -18264,6 +18582,7 @@ var require_FunctionalAstrolabe = __commonJS({
18264
18582
  }()
18265
18583
  );
18266
18584
  exports.default = FunctionalAstrolabe;
18585
+ (0, context_1.registerContextClass)(FunctionalAstrolabe.prototype);
18267
18586
  }
18268
18587
  });
18269
18588
 
@@ -18272,6 +18591,7 @@ var require_FunctionalPalace = __commonJS({
18272
18591
  "node_modules/iztro/lib/astro/FunctionalPalace.js"(exports) {
18273
18592
  "use strict";
18274
18593
  Object.defineProperty(exports, "__esModule", { value: true });
18594
+ var context_1 = require_context();
18275
18595
  var analyzer_1 = require_analyzer();
18276
18596
  var toJSON_1 = require_toJSON();
18277
18597
  var FunctionalPalace = (
@@ -18413,6 +18733,7 @@ var require_FunctionalPalace = __commonJS({
18413
18733
  }()
18414
18734
  );
18415
18735
  exports.default = FunctionalPalace;
18736
+ (0, context_1.registerContextClass)(FunctionalPalace.prototype);
18416
18737
  }
18417
18738
  });
18418
18739
 
@@ -18421,6 +18742,7 @@ var require_FunctionalStar = __commonJS({
18421
18742
  "node_modules/iztro/lib/star/FunctionalStar.js"(exports) {
18422
18743
  "use strict";
18423
18744
  Object.defineProperty(exports, "__esModule", { value: true });
18745
+ var context_1 = require_context();
18424
18746
  var i18n_1 = require_i18n();
18425
18747
  var toJSON_1 = require_toJSON();
18426
18748
  var FunctionalStar = (
@@ -18480,6 +18802,7 @@ var require_FunctionalStar = __commonJS({
18480
18802
  }()
18481
18803
  );
18482
18804
  exports.default = FunctionalStar;
18805
+ (0, context_1.registerContextClass)(FunctionalStar.prototype);
18483
18806
  }
18484
18807
  });
18485
18808
 
@@ -18491,7 +18814,7 @@ var require_astro = __commonJS({
18491
18814
  return mod && mod.__esModule ? mod : { "default": mod };
18492
18815
  };
18493
18816
  Object.defineProperty(exports, "__esModule", { value: true });
18494
- exports.getMajorStarByLunarDate = exports.getMajorStarBySolarDate = exports.getSignByLunarDate = exports.getSignBySolarDate = exports.getZodiacBySolarDate = exports.withOptions = exports.rearrangeAstrolable = exports.byLunar = exports.astrolabeByLunarDate = exports.bySolar = exports.astrolabeBySolarDate = exports.getConfig = exports.config = exports.loadPlugin = exports.loadPlugins = void 0;
18817
+ exports.getMajorStarByLunarDate = exports.getMajorStarBySolarDate = exports.getSignByLunarDate = exports.getSignBySolarDate = exports.getZodiacBySolarDate = exports.withOptions = exports.rearrangeAstrolable = exports.byLunar = exports.astrolabeByLunarDate = exports.bySolar = exports.astrolabeBySolarDate = exports.resetConfig = exports.getConfig = exports.config = exports.loadPlugin = exports.loadPlugins = void 0;
18495
18818
  var lunar_lite_1 = require_lib();
18496
18819
  var data_1 = require_data();
18497
18820
  var i18n_1 = require_i18n();
@@ -18501,14 +18824,22 @@ var require_astro = __commonJS({
18501
18824
  var FunctionalPalace_1 = __importDefault(require_FunctionalPalace());
18502
18825
  var palace_1 = require_palace7();
18503
18826
  var FunctionalStar_1 = __importDefault(require_FunctionalStar());
18827
+ var config_1 = require_config();
18828
+ var context_1 = require_context();
18829
+ var validation_1 = require_validation();
18504
18830
  var _plugins = [];
18505
- var _mutagens = {};
18506
- var _brightness = {};
18507
- var _yearDivide = "normal";
18508
- var _horoscopeDivide = "normal";
18509
- var _ageDivide = "normal";
18510
- var _dayDivide = "forward";
18511
- var _algorithm = "default";
18831
+ var formatLunarDate = function(lunarDate) {
18832
+ var language = (0, i18n_1.getLanguage)();
18833
+ if (language === "zh-CN" || language === "zh-TW") {
18834
+ return lunarDate.toString(true);
18835
+ }
18836
+ return (0, i18n_1.t)("lunarDate", {
18837
+ year: lunarDate.lunarYear,
18838
+ month: lunarDate.lunarMonth,
18839
+ day: lunarDate.lunarDay,
18840
+ leapMonth: lunarDate.isLeap ? (0, i18n_1.t)("leapMonth") : ""
18841
+ });
18842
+ };
18512
18843
  var loadPlugins = function(plugins) {
18513
18844
  Array.prototype.push.apply(_plugins, plugins);
18514
18845
  };
@@ -18517,45 +18848,16 @@ var require_astro = __commonJS({
18517
18848
  _plugins.push(plugin);
18518
18849
  };
18519
18850
  exports.loadPlugin = loadPlugin;
18520
- var config = function(_a) {
18521
- var mutagens = _a.mutagens, brightness = _a.brightness, _b = _a.yearDivide, yearDivide = _b === void 0 ? _yearDivide : _b, _c = _a.ageDivide, ageDivide = _c === void 0 ? _ageDivide : _c, _d = _a.horoscopeDivide, horoscopeDivide = _d === void 0 ? _horoscopeDivide : _d, _e = _a.dayDivide, dayDivide = _e === void 0 ? _dayDivide : _e, _f = _a.algorithm, algorithm = _f === void 0 ? _algorithm : _f;
18522
- if (mutagens) {
18523
- Object.entries(mutagens).forEach(function(_a2) {
18524
- var _b2;
18525
- var key = _a2[0], value = _a2[1];
18526
- _mutagens[(0, i18n_1.kot)(key)] = (_b2 = value.map(function(item) {
18527
- return (0, i18n_1.kot)(item);
18528
- })) !== null && _b2 !== void 0 ? _b2 : [];
18529
- });
18530
- }
18531
- if (brightness) {
18532
- Object.entries(brightness).forEach(function(_a2) {
18533
- var _b2;
18534
- var key = _a2[0], value = _a2[1];
18535
- _brightness[(0, i18n_1.kot)(key)] = (_b2 = value.map(function(item) {
18536
- return (0, i18n_1.kot)(item);
18537
- })) !== null && _b2 !== void 0 ? _b2 : [];
18538
- });
18539
- }
18540
- _yearDivide = yearDivide;
18541
- _horoscopeDivide = horoscopeDivide;
18542
- _ageDivide = ageDivide;
18543
- _algorithm = algorithm;
18544
- _dayDivide = dayDivide;
18545
- };
18546
- exports.config = config;
18547
- var getConfig = function() {
18548
- return {
18549
- mutagens: _mutagens,
18550
- brightness: _brightness,
18551
- yearDivide: _yearDivide,
18552
- ageDivide: _ageDivide,
18553
- dayDivide: _dayDivide,
18554
- horoscopeDivide: _horoscopeDivide,
18555
- algorithm: _algorithm
18556
- };
18557
- };
18558
- exports.getConfig = getConfig;
18851
+ var config_2 = require_config();
18852
+ Object.defineProperty(exports, "config", { enumerable: true, get: function() {
18853
+ return config_2.config;
18854
+ } });
18855
+ Object.defineProperty(exports, "getConfig", { enumerable: true, get: function() {
18856
+ return config_2.getConfig;
18857
+ } });
18858
+ Object.defineProperty(exports, "resetConfig", { enumerable: true, get: function() {
18859
+ return config_2.resetConfig;
18860
+ } });
18559
18861
  function astrolabeBySolarDate(solarDateStr, timeIndex, gender, fixLeap, language) {
18560
18862
  if (fixLeap === void 0) {
18561
18863
  fixLeap = true;
@@ -18567,93 +18869,99 @@ var require_astro = __commonJS({
18567
18869
  if (fixLeap === void 0) {
18568
18870
  fixLeap = true;
18569
18871
  }
18570
- language && (0, i18n_1.setLanguage)(language);
18571
- var palaces = [];
18572
- var dayDivide = (0, exports.getConfig)().dayDivide;
18573
- var tIndex = timeIndex;
18574
- if (dayDivide === "current" && tIndex >= 12) {
18575
- tIndex = 0;
18576
- }
18577
- var yearly = (0, lunar_lite_1.getHeavenlyStemAndEarthlyBranchBySolarDate)(solarDate, tIndex, {
18578
- year: (0, exports.getConfig)().yearDivide,
18579
- month: (0, exports.getConfig)().horoscopeDivide
18580
- }).yearly;
18581
- var earthlyBranchOfYear = (0, i18n_1.kot)(yearly[1], "Earthly");
18582
- var heavenlyStemOfYear = (0, i18n_1.kot)(yearly[0], "Heavenly");
18583
- var _a = (0, palace_1.getSoulAndBody)({
18584
- solarDate,
18585
- timeIndex: tIndex,
18586
- fixLeap
18587
- }), bodyIndex = _a.bodyIndex, soulIndex = _a.soulIndex, heavenlyStemOfSoul = _a.heavenlyStemOfSoul, earthlyBranchOfSoul = _a.earthlyBranchOfSoul;
18588
- var palaceNames = (0, palace_1.getPalaceNames)(soulIndex);
18589
- var majorStars = (0, star_1.getMajorStar)({ solarDate, timeIndex: tIndex, fixLeap });
18590
- var minorStars = (0, star_1.getMinorStar)(solarDate, tIndex, fixLeap);
18591
- var adjectiveStars = (0, star_1.getAdjectiveStar)({
18592
- solarDate,
18593
- timeIndex: tIndex,
18594
- gender,
18595
- fixLeap
18596
- });
18597
- var changsheng12 = (0, star_1.getchangsheng12)({
18598
- solarDate,
18599
- timeIndex: tIndex,
18600
- gender,
18601
- fixLeap
18602
- });
18603
- var boshi12 = (0, star_1.getBoShi12)(solarDate, gender);
18604
- var _b = (0, star_1.getYearly12)(solarDate), jiangqian12 = _b.jiangqian12, suiqian12 = _b.suiqian12;
18605
- var _c = (0, palace_1.getHoroscope)({ solarDate, timeIndex: tIndex, gender, fixLeap }), decadals = _c.decadals, ages = _c.ages;
18606
- for (var i = 0; i < 12; i++) {
18607
- var heavenlyStemOfPalace = data_1.HEAVENLY_STEMS[(0, utils_1.fixIndex)(data_1.HEAVENLY_STEMS.indexOf((0, i18n_1.kot)(heavenlyStemOfSoul, "Heavenly")) - soulIndex + i, 10)];
18608
- var earthlyBranchOfPalace = data_1.EARTHLY_BRANCHES[(0, utils_1.fixIndex)(2 + i)];
18609
- palaces.push(new FunctionalPalace_1.default({
18610
- index: i,
18611
- name: palaceNames[i],
18612
- isBodyPalace: bodyIndex === i,
18613
- isOriginalPalace: !["ziEarthly", "chouEarthly"].includes(earthlyBranchOfPalace) && heavenlyStemOfPalace === heavenlyStemOfYear,
18614
- heavenlyStem: (0, i18n_1.t)(heavenlyStemOfPalace),
18615
- earthlyBranch: (0, i18n_1.t)(earthlyBranchOfPalace),
18616
- majorStars: majorStars[i],
18617
- minorStars: minorStars[i],
18618
- adjectiveStars: adjectiveStars[i],
18619
- changsheng12: changsheng12[i],
18620
- boshi12: boshi12[i],
18621
- jiangqian12: jiangqian12[i],
18622
- suiqian12: suiqian12[i],
18623
- decadal: decadals[i],
18624
- ages: ages[i]
18625
- }));
18626
- }
18627
- var earthlyBranchOfSoulPalace = data_1.EARTHLY_BRANCHES[(0, utils_1.fixIndex)(soulIndex + 2)];
18628
- var earthlyBranchOfBodyPalace = (0, i18n_1.t)(data_1.EARTHLY_BRANCHES[(0, utils_1.fixIndex)(bodyIndex + 2)]);
18629
- var chineseDate = (0, lunar_lite_1.getHeavenlyStemAndEarthlyBranchBySolarDate)(solarDate, tIndex, {
18630
- year: (0, exports.getConfig)().yearDivide,
18631
- month: (0, exports.getConfig)().horoscopeDivide
18632
- });
18633
- var lunarDate = (0, lunar_lite_1.solar2lunar)(solarDate);
18634
- var soul = (0, i18n_1.t)(data_1.earthlyBranches[(0, exports.getConfig)().algorithm === "zhongzhou" ? earthlyBranchOfYear : earthlyBranchOfSoulPalace].soul);
18635
- var result = new FunctionalAstrolabe_1.default({
18636
- gender: (0, i18n_1.t)((0, i18n_1.kot)(gender)),
18637
- solarDate,
18638
- lunarDate: lunarDate.toString(true),
18639
- chineseDate: (0, utils_1.translateChineseDate)(chineseDate),
18640
- rawDates: { lunarDate, chineseDate },
18641
- time: (0, i18n_1.t)(data_1.CHINESE_TIME[timeIndex]),
18642
- timeRange: data_1.TIME_RANGE[timeIndex],
18643
- sign: (0, exports.getSignBySolarDate)(solarDate, language),
18644
- zodiac: (0, exports.getZodiacBySolarDate)(solarDate, language),
18645
- earthlyBranchOfSoulPalace: (0, i18n_1.t)(earthlyBranchOfSoulPalace),
18646
- earthlyBranchOfBodyPalace,
18647
- soul,
18648
- body: (0, i18n_1.t)(data_1.earthlyBranches[earthlyBranchOfYear].body),
18649
- fiveElementsClass: (0, palace_1.getFiveElementsClass)(heavenlyStemOfSoul, earthlyBranchOfSoul),
18650
- palaces,
18651
- copyright: "copyright \xA9 2023-".concat((/* @__PURE__ */ new Date()).getFullYear(), " iztro (https://github.com/SylarLong/iztro)")
18652
- });
18653
- _plugins.map(function(plugin) {
18654
- return result.use(plugin);
18872
+ (0, validation_1.validateDate)(solarDate);
18873
+ (0, validation_1.validateTimeIndex)(timeIndex);
18874
+ (0, validation_1.validateGender)(gender);
18875
+ (0, validation_1.validateBoolean)(fixLeap, "fixLeap");
18876
+ return (0, i18n_1.withLanguage)(language !== null && language !== void 0 ? language : "zh-CN", function() {
18877
+ var palaces = [];
18878
+ var dayDivide = (0, config_1.getConfig)().dayDivide;
18879
+ var tIndex = timeIndex;
18880
+ if (dayDivide === "current" && tIndex >= 12) {
18881
+ tIndex = 0;
18882
+ }
18883
+ var yearly = (0, lunar_lite_1.getHeavenlyStemAndEarthlyBranchBySolarDate)(solarDate, tIndex, {
18884
+ year: (0, config_1.getConfig)().yearDivide,
18885
+ month: (0, config_1.getConfig)().horoscopeDivide
18886
+ }).yearly;
18887
+ var earthlyBranchOfYear = (0, i18n_1.kot)(yearly[1], "Earthly");
18888
+ var heavenlyStemOfYear = (0, i18n_1.kot)(yearly[0], "Heavenly");
18889
+ var _a = (0, palace_1.getSoulAndBody)({
18890
+ solarDate,
18891
+ timeIndex: tIndex,
18892
+ fixLeap
18893
+ }), bodyIndex = _a.bodyIndex, soulIndex = _a.soulIndex, heavenlyStemOfSoul = _a.heavenlyStemOfSoul, earthlyBranchOfSoul = _a.earthlyBranchOfSoul;
18894
+ var palaceNames = (0, palace_1.getPalaceNames)(soulIndex);
18895
+ var majorStars = (0, star_1.getMajorStar)({ solarDate, timeIndex: tIndex, fixLeap });
18896
+ var minorStars = (0, star_1.getMinorStar)(solarDate, tIndex, fixLeap);
18897
+ var adjectiveStars = (0, star_1.getAdjectiveStar)({
18898
+ solarDate,
18899
+ timeIndex: tIndex,
18900
+ gender,
18901
+ fixLeap
18902
+ });
18903
+ var changsheng12 = (0, star_1.getchangsheng12)({
18904
+ solarDate,
18905
+ timeIndex: tIndex,
18906
+ gender,
18907
+ fixLeap
18908
+ });
18909
+ var boshi12 = (0, star_1.getBoShi12)(solarDate, gender);
18910
+ var _b = (0, star_1.getYearly12)(solarDate), jiangqian12 = _b.jiangqian12, suiqian12 = _b.suiqian12;
18911
+ var _c = (0, palace_1.getHoroscope)({ solarDate, timeIndex: tIndex, gender, fixLeap }), decadals = _c.decadals, ages = _c.ages;
18912
+ for (var i = 0; i < 12; i++) {
18913
+ var heavenlyStemOfPalace = data_1.HEAVENLY_STEMS[(0, utils_1.fixIndex)(data_1.HEAVENLY_STEMS.indexOf((0, i18n_1.kot)(heavenlyStemOfSoul, "Heavenly")) - soulIndex + i, 10)];
18914
+ var earthlyBranchOfPalace = data_1.EARTHLY_BRANCHES[(0, utils_1.fixIndex)(2 + i)];
18915
+ palaces.push(new FunctionalPalace_1.default({
18916
+ index: i,
18917
+ name: palaceNames[i],
18918
+ isBodyPalace: bodyIndex === i,
18919
+ isOriginalPalace: !["ziEarthly", "chouEarthly"].includes(earthlyBranchOfPalace) && heavenlyStemOfPalace === heavenlyStemOfYear,
18920
+ heavenlyStem: (0, i18n_1.t)(heavenlyStemOfPalace),
18921
+ earthlyBranch: (0, i18n_1.t)(earthlyBranchOfPalace),
18922
+ majorStars: majorStars[i],
18923
+ minorStars: minorStars[i],
18924
+ adjectiveStars: adjectiveStars[i],
18925
+ changsheng12: changsheng12[i],
18926
+ boshi12: boshi12[i],
18927
+ jiangqian12: jiangqian12[i],
18928
+ suiqian12: suiqian12[i],
18929
+ decadal: decadals[i],
18930
+ ages: ages[i]
18931
+ }));
18932
+ }
18933
+ var earthlyBranchOfSoulPalace = data_1.EARTHLY_BRANCHES[(0, utils_1.fixIndex)(soulIndex + 2)];
18934
+ var earthlyBranchOfBodyPalace = (0, i18n_1.t)(data_1.EARTHLY_BRANCHES[(0, utils_1.fixIndex)(bodyIndex + 2)]);
18935
+ var chineseDate = (0, lunar_lite_1.getHeavenlyStemAndEarthlyBranchBySolarDate)(solarDate, tIndex, {
18936
+ year: (0, config_1.getConfig)().yearDivide,
18937
+ month: (0, config_1.getConfig)().horoscopeDivide
18938
+ });
18939
+ var lunarDate = (0, lunar_lite_1.solar2lunar)(solarDate);
18940
+ var soul = (0, i18n_1.t)(data_1.earthlyBranches[(0, config_1.getConfig)().algorithm === "zhongzhou" ? earthlyBranchOfYear : earthlyBranchOfSoulPalace].soul);
18941
+ var result = new FunctionalAstrolabe_1.default({
18942
+ gender: (0, i18n_1.t)((0, i18n_1.kot)(gender)),
18943
+ solarDate,
18944
+ lunarDate: formatLunarDate(lunarDate),
18945
+ chineseDate: (0, utils_1.translateChineseDate)(chineseDate),
18946
+ rawDates: { lunarDate, chineseDate },
18947
+ time: (0, i18n_1.t)(data_1.CHINESE_TIME[timeIndex]),
18948
+ timeRange: data_1.TIME_RANGE[timeIndex],
18949
+ sign: (0, exports.getSignBySolarDate)(solarDate, language),
18950
+ zodiac: (0, exports.getZodiacBySolarDate)(solarDate, language),
18951
+ earthlyBranchOfSoulPalace: (0, i18n_1.t)(earthlyBranchOfSoulPalace),
18952
+ earthlyBranchOfBodyPalace,
18953
+ soul,
18954
+ body: (0, i18n_1.t)(data_1.earthlyBranches[earthlyBranchOfYear].body),
18955
+ fiveElementsClass: (0, palace_1.getFiveElementsClass)(heavenlyStemOfSoul, earthlyBranchOfSoul),
18956
+ palaces,
18957
+ copyright: "copyright \xA9 2023-".concat((/* @__PURE__ */ new Date()).getFullYear(), " iztro (https://github.com/SylarLong/iztro)")
18958
+ });
18959
+ (0, context_1.bindContext)(result);
18960
+ _plugins.map(function(plugin) {
18961
+ return result.use(plugin);
18962
+ });
18963
+ return result;
18655
18964
  });
18656
- return result;
18657
18965
  }
18658
18966
  exports.bySolar = bySolar;
18659
18967
  function astrolabeByLunarDate(lunarDateStr, timeIndex, gender, isLeapMonth, fixLeap, language) {
@@ -18673,6 +18981,11 @@ var require_astro = __commonJS({
18673
18981
  if (fixLeap === void 0) {
18674
18982
  fixLeap = true;
18675
18983
  }
18984
+ (0, validation_1.validateDate)(lunarDateStr, "lunar", isLeapMonth);
18985
+ (0, validation_1.validateTimeIndex)(timeIndex);
18986
+ (0, validation_1.validateGender)(gender);
18987
+ (0, validation_1.validateBoolean)(isLeapMonth, "isLeapMonth");
18988
+ (0, validation_1.validateBoolean)(fixLeap, "fixLeap");
18676
18989
  var solarDate = (0, lunar_lite_1.lunar2solar)(lunarDateStr, isLeapMonth);
18677
18990
  return bySolar(solarDate.toString(), timeIndex, gender, fixLeap, language);
18678
18991
  }
@@ -18680,7 +18993,7 @@ var require_astro = __commonJS({
18680
18993
  function rearrangeAstrolable(_a) {
18681
18994
  var from = _a.from, astrolable = _a.astrolable, option = _a.option;
18682
18995
  var timeIndex = option.timeIndex, fixLeap = option.fixLeap;
18683
- var dayDivide = (0, exports.getConfig)().dayDivide;
18996
+ var dayDivide = (0, config_1.getConfig)().dayDivide;
18684
18997
  var tIndex = timeIndex;
18685
18998
  if (dayDivide === "current" && tIndex >= 12) {
18686
18999
  tIndex = 0;
@@ -18752,71 +19065,88 @@ var require_astro = __commonJS({
18752
19065
  exports.rearrangeAstrolable = rearrangeAstrolable;
18753
19066
  function withOptions(option) {
18754
19067
  var _a = option.type, type = _a === void 0 ? "solar" : _a, dateStr = option.dateStr, timeIndex = option.timeIndex, gender = option.gender, isLeapMonth = option.isLeapMonth, fixLeap = option.fixLeap, language = option.language, astroType = option.astroType, cfg = option.config;
18755
- if (cfg) {
18756
- (0, exports.config)(cfg);
18757
- }
18758
- var result;
18759
- if (type === "solar") {
18760
- result = bySolar(dateStr, timeIndex, gender, fixLeap, language);
18761
- } else {
18762
- result = byLunar(dateStr, timeIndex, gender, isLeapMonth, fixLeap, language);
18763
- }
18764
- switch (astroType) {
18765
- case "earth": {
18766
- var bodyPalace = result.palace("\u8EAB\u5BAB");
18767
- var _b = bodyPalace, heavenlyStem = _b.heavenlyStem, earthlyBranch = _b.earthlyBranch;
18768
- return rearrangeAstrolable({ from: { heavenlyStem, earthlyBranch }, astrolable: result, option });
18769
- }
18770
- case "human": {
18771
- var bodyPalace = result.palace("\u798F\u5FB7");
18772
- var _c = bodyPalace, heavenlyStem = _c.heavenlyStem, earthlyBranch = _c.earthlyBranch;
18773
- return rearrangeAstrolable({ from: { heavenlyStem, earthlyBranch }, astrolable: result, option });
18774
- }
18775
- default: {
18776
- return result;
18777
- }
18778
- }
19068
+ if (!["solar", "lunar"].includes(type))
19069
+ throw new Error("invalid date type.");
19070
+ if (astroType !== void 0 && !["heaven", "earth", "human"].includes(astroType))
19071
+ throw new Error("invalid astroType.");
19072
+ return (0, config_1.withConfig)((0, config_1.resolveConfig)(cfg), function() {
19073
+ return (0, i18n_1.withLanguage)(language !== null && language !== void 0 ? language : "zh-CN", function() {
19074
+ var result;
19075
+ if (type === "solar") {
19076
+ result = bySolar(dateStr, timeIndex, gender, fixLeap, language);
19077
+ } else {
19078
+ result = byLunar(dateStr, timeIndex, gender, isLeapMonth, fixLeap, language);
19079
+ }
19080
+ switch (astroType) {
19081
+ case "earth": {
19082
+ var bodyPalace = result.palace("\u8EAB\u5BAB");
19083
+ var _a2 = bodyPalace, heavenlyStem = _a2.heavenlyStem, earthlyBranch = _a2.earthlyBranch;
19084
+ return rearrangeAstrolable({ from: { heavenlyStem, earthlyBranch }, astrolable: result, option });
19085
+ }
19086
+ case "human": {
19087
+ var bodyPalace = result.palace("\u798F\u5FB7");
19088
+ var _b = bodyPalace, heavenlyStem = _b.heavenlyStem, earthlyBranch = _b.earthlyBranch;
19089
+ return rearrangeAstrolable({ from: { heavenlyStem, earthlyBranch }, astrolable: result, option });
19090
+ }
19091
+ default: {
19092
+ return result;
19093
+ }
19094
+ }
19095
+ });
19096
+ });
18779
19097
  }
18780
19098
  exports.withOptions = withOptions;
18781
19099
  var getZodiacBySolarDate = function(solarDateStr, language) {
18782
- language && (0, i18n_1.setLanguage)(language);
18783
- var yearly = (0, lunar_lite_1.getHeavenlyStemAndEarthlyBranchBySolarDate)(solarDateStr, 0, {
18784
- year: (0, exports.getConfig)().yearDivide
18785
- }).yearly;
18786
- return (0, i18n_1.t)((0, i18n_1.kot)((0, lunar_lite_1.getZodiac)(yearly[1])));
19100
+ (0, validation_1.validateDate)(solarDateStr);
19101
+ return (0, i18n_1.withLanguage)(language !== null && language !== void 0 ? language : "zh-CN", function() {
19102
+ var yearly = (0, lunar_lite_1.getHeavenlyStemAndEarthlyBranchBySolarDate)(solarDateStr, 0, {
19103
+ year: (0, config_1.getConfig)().yearDivide
19104
+ }).yearly;
19105
+ return (0, i18n_1.t)((0, i18n_1.kot)((0, lunar_lite_1.getZodiac)(yearly[1])));
19106
+ });
18787
19107
  };
18788
19108
  exports.getZodiacBySolarDate = getZodiacBySolarDate;
18789
19109
  var getSignBySolarDate = function(solarDateStr, language) {
18790
- language && (0, i18n_1.setLanguage)(language);
18791
- return (0, i18n_1.t)((0, i18n_1.kot)((0, lunar_lite_1.getSign)(solarDateStr)));
19110
+ (0, validation_1.validateDate)(solarDateStr);
19111
+ return (0, i18n_1.withLanguage)(language !== null && language !== void 0 ? language : "zh-CN", function() {
19112
+ return (0, i18n_1.t)((0, i18n_1.kot)((0, lunar_lite_1.getSign)(solarDateStr)));
19113
+ });
18792
19114
  };
18793
19115
  exports.getSignBySolarDate = getSignBySolarDate;
18794
19116
  var getSignByLunarDate = function(lunarDateStr, isLeapMonth, language) {
18795
- language && (0, i18n_1.setLanguage)(language);
18796
- var solarDate = (0, lunar_lite_1.lunar2solar)(lunarDateStr, isLeapMonth);
18797
- return (0, exports.getSignBySolarDate)(solarDate.toString(), language);
19117
+ (0, validation_1.validateDate)(lunarDateStr, "lunar", isLeapMonth);
19118
+ if (isLeapMonth !== void 0)
19119
+ (0, validation_1.validateBoolean)(isLeapMonth, "isLeapMonth");
19120
+ return (0, i18n_1.withLanguage)(language !== null && language !== void 0 ? language : "zh-CN", function() {
19121
+ var solarDate = (0, lunar_lite_1.lunar2solar)(lunarDateStr, isLeapMonth);
19122
+ return (0, exports.getSignBySolarDate)(solarDate.toString(), language);
19123
+ });
18798
19124
  };
18799
19125
  exports.getSignByLunarDate = getSignByLunarDate;
18800
19126
  var getMajorStarBySolarDate = function(solarDateStr, timeIndex, fixLeap, language) {
18801
19127
  if (fixLeap === void 0) {
18802
19128
  fixLeap = true;
18803
19129
  }
18804
- language && (0, i18n_1.setLanguage)(language);
18805
- var soulIndex = (0, palace_1.getSoulAndBody)({ solarDate: solarDateStr, timeIndex, fixLeap }).soulIndex;
18806
- var majorStars = (0, star_1.getMajorStar)({ solarDate: solarDateStr, timeIndex, fixLeap });
18807
- var stars = majorStars[soulIndex].filter(function(star) {
18808
- return star.type === "major";
18809
- });
18810
- if (stars.length) {
18811
- return stars.map(function(star) {
19130
+ (0, validation_1.validateDate)(solarDateStr);
19131
+ (0, validation_1.validateTimeIndex)(timeIndex);
19132
+ (0, validation_1.validateBoolean)(fixLeap, "fixLeap");
19133
+ return (0, i18n_1.withLanguage)(language !== null && language !== void 0 ? language : "zh-CN", function() {
19134
+ var soulIndex = (0, palace_1.getSoulAndBody)({ solarDate: solarDateStr, timeIndex, fixLeap }).soulIndex;
19135
+ var majorStars = (0, star_1.getMajorStar)({ solarDate: solarDateStr, timeIndex, fixLeap });
19136
+ var stars = majorStars[soulIndex].filter(function(star) {
19137
+ return star.type === "major";
19138
+ });
19139
+ if (stars.length) {
19140
+ return stars.map(function(star) {
19141
+ return (0, i18n_1.t)(star.name);
19142
+ }).join(",");
19143
+ }
19144
+ return majorStars[(0, utils_1.fixIndex)(soulIndex + 6)].filter(function(star) {
19145
+ return star.type === "major";
19146
+ }).map(function(star) {
18812
19147
  return (0, i18n_1.t)(star.name);
18813
19148
  }).join(",");
18814
- }
18815
- return majorStars[(0, utils_1.fixIndex)(soulIndex + 6)].filter(function(star) {
18816
- return star.type === "major";
18817
- }).map(function(star) {
18818
- return (0, i18n_1.t)(star.name);
18819
- }).join(",");
19149
+ });
18820
19150
  };
18821
19151
  exports.getMajorStarBySolarDate = getMajorStarBySolarDate;
18822
19152
  var getMajorStarByLunarDate = function(lunarDateStr, timeIndex, isLeapMonth, fixLeap, language) {
@@ -18826,6 +19156,8 @@ var require_astro = __commonJS({
18826
19156
  if (fixLeap === void 0) {
18827
19157
  fixLeap = true;
18828
19158
  }
19159
+ (0, validation_1.validateDate)(lunarDateStr, "lunar", isLeapMonth);
19160
+ (0, validation_1.validateBoolean)(isLeapMonth, "isLeapMonth");
18829
19161
  var solarDate = (0, lunar_lite_1.lunar2solar)(lunarDateStr, isLeapMonth);
18830
19162
  return (0, exports.getMajorStarBySolarDate)(solarDate.toString(), timeIndex, fixLeap, language);
18831
19163
  };