solve-engine 2.23.0 → 2.25.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 (226) hide show
  1. package/README.md +82 -32
  2. package/dist/{BytecodeBuilder-aqVa7Plx.d.cts → BytecodeBuilder-DSWKZi4f.d.cts} +11 -9
  3. package/dist/{BytecodeBuilder-aqVa7Plx.d.ts → BytecodeBuilder-DSWKZi4f.d.ts} +11 -9
  4. package/dist/{Configuration-BGQn-cJ8.d.cts → Configuration-DnzYPmoK.d.cts} +33 -0
  5. package/dist/{Configuration-BGQn-cJ8.d.ts → Configuration-DnzYPmoK.d.ts} +33 -0
  6. package/dist/{EngineError-DTk7I7hZ.d.cts → EngineError-fR1K1rvx.d.cts} +6 -0
  7. package/dist/{EngineError-DTk7I7hZ.d.ts → EngineError-fR1K1rvx.d.ts} +6 -0
  8. package/dist/{Lexer-CqagTewQ.d.ts → Lexer-Bmctxl0n.d.ts} +84 -35
  9. package/dist/{Lexer-CCHFDcgP.d.cts → Lexer-aB95pjoX.d.cts} +84 -35
  10. package/dist/{PackageCompatibility-BGXSFuL9.d.ts → PackageCompatibility-BludTs7v.d.ts} +1 -1
  11. package/dist/{PackageCompatibility-BZCqaTOO.d.cts → PackageCompatibility-CUVg8tmt.d.cts} +1 -1
  12. package/dist/{PackageRegistry-BRoVOYzg.d.ts → PackageRegistry-DT-x32OM.d.ts} +67 -14
  13. package/dist/{PackageRegistry-rMGnTh7W.d.cts → PackageRegistry-Dvn4i2QK.d.cts} +67 -14
  14. package/dist/{Parselet-Bkbp9CKD.d.cts → Parselet-BawfGuTF.d.cts} +8 -2
  15. package/dist/{Parselet-B-WyUtX4.d.ts → Parselet-DqTbbtWA.d.ts} +8 -2
  16. package/dist/{ScopeManager-gB9UengK.d.ts → ScopeManager-B636am7Y.d.ts} +39 -8
  17. package/dist/{ScopeManager-bCYewWVt.d.cts → ScopeManager-CdwX0VTw.d.cts} +39 -8
  18. package/dist/{TokenNormalizer-OTPS0Otq.d.ts → TokenNormalizer-CLBtiE8M.d.ts} +45 -26
  19. package/dist/{TokenNormalizer-MXaKLJ_m.d.cts → TokenNormalizer-CjTDmHgB.d.cts} +45 -26
  20. package/dist/{VMCheckpoints-DGar9Yg8.d.cts → VMCheckpoints-CYqeq8IV.d.cts} +3 -3
  21. package/dist/{VMCheckpoints-BDRY1Kx8.d.ts → VMCheckpoints-DDlxNssY.d.ts} +3 -3
  22. package/dist/{Value-DCTqTSeP.d.cts → Value-Ds3Gy07C.d.cts} +1 -1
  23. package/dist/{Value-DCTqTSeP.d.ts → Value-Ds3Gy07C.d.ts} +1 -1
  24. package/dist/{WorkerError-DGBNM3gA.d.cts → WorkerError-B1dF3VYT.d.cts} +1 -1
  25. package/dist/{WorkerError-DpZgKRks.d.ts → WorkerError-dneODN-u.d.ts} +1 -1
  26. package/dist/{chunk-YAONCEAW.cjs → chunk-4BAUQE6A.cjs} +3 -3
  27. package/dist/{chunk-YAONCEAW.cjs.map → chunk-4BAUQE6A.cjs.map} +1 -1
  28. package/dist/chunk-4BRTUFTH.js +2 -0
  29. package/dist/chunk-4BRTUFTH.js.map +1 -0
  30. package/dist/chunk-4NZXCHQL.cjs +2 -0
  31. package/dist/chunk-4NZXCHQL.cjs.map +1 -0
  32. package/dist/chunk-57PSJQQW.js +3 -0
  33. package/dist/chunk-57PSJQQW.js.map +1 -0
  34. package/dist/chunk-634ILVMP.cjs +2 -0
  35. package/dist/chunk-634ILVMP.cjs.map +1 -0
  36. package/dist/{chunk-HMC7FJO7.js → chunk-63ZOOUOL.js} +2 -2
  37. package/dist/{chunk-HMC7FJO7.js.map → chunk-63ZOOUOL.js.map} +1 -1
  38. package/dist/chunk-72PYPENZ.js +2 -0
  39. package/dist/chunk-72PYPENZ.js.map +1 -0
  40. package/dist/chunk-77KI7AKJ.cjs +2 -0
  41. package/dist/chunk-77KI7AKJ.cjs.map +1 -0
  42. package/dist/chunk-7DP57BA7.js +2 -0
  43. package/dist/chunk-7DP57BA7.js.map +1 -0
  44. package/dist/chunk-7N3IJSWF.js +5 -0
  45. package/dist/chunk-7N3IJSWF.js.map +1 -0
  46. package/dist/chunk-BMXYR5LI.cjs +2 -0
  47. package/dist/chunk-BMXYR5LI.cjs.map +1 -0
  48. package/dist/chunk-DUYTXLO2.js +2 -0
  49. package/dist/chunk-DUYTXLO2.js.map +1 -0
  50. package/dist/chunk-EL2XUOWX.js +2 -0
  51. package/dist/chunk-EL2XUOWX.js.map +1 -0
  52. package/dist/chunk-FYAMQFZZ.cjs +3 -0
  53. package/dist/chunk-FYAMQFZZ.cjs.map +1 -0
  54. package/dist/chunk-FYTB7SDP.cjs +2 -0
  55. package/dist/chunk-FYTB7SDP.cjs.map +1 -0
  56. package/dist/chunk-GBCN7FNV.cjs +2 -0
  57. package/dist/chunk-GBCN7FNV.cjs.map +1 -0
  58. package/dist/{chunk-7E7NXKQ5.js → chunk-IJHL3LMH.js} +2 -2
  59. package/dist/chunk-IJHL3LMH.js.map +1 -0
  60. package/dist/{chunk-4ETS224G.js → chunk-JFZ5SLF7.js} +2 -2
  61. package/dist/{chunk-4ETS224G.js.map → chunk-JFZ5SLF7.js.map} +1 -1
  62. package/dist/chunk-JSM3O7EM.cjs +2 -0
  63. package/dist/chunk-JSM3O7EM.cjs.map +1 -0
  64. package/dist/chunk-MZMA32NE.js +3 -0
  65. package/dist/chunk-MZMA32NE.js.map +1 -0
  66. package/dist/chunk-N4SSR7Q6.js +2 -0
  67. package/dist/chunk-N4SSR7Q6.js.map +1 -0
  68. package/dist/{chunk-TL545PXW.cjs → chunk-NEGZZB7F.cjs} +2 -2
  69. package/dist/{chunk-TL545PXW.cjs.map → chunk-NEGZZB7F.cjs.map} +1 -1
  70. package/dist/{chunk-3GR46UOX.js → chunk-NMU5E7W7.js} +2 -2
  71. package/dist/{chunk-3GR46UOX.js.map → chunk-NMU5E7W7.js.map} +1 -1
  72. package/dist/chunk-OB2VX4IL.js +2 -0
  73. package/dist/chunk-OB2VX4IL.js.map +1 -0
  74. package/dist/{chunk-MRRMIBHE.js → chunk-OONQ3V3I.js} +2 -2
  75. package/dist/{chunk-MRRMIBHE.js.map → chunk-OONQ3V3I.js.map} +1 -1
  76. package/dist/{chunk-N37PUZJR.cjs → chunk-RAPEZR5L.cjs} +2 -2
  77. package/dist/{chunk-N37PUZJR.cjs.map → chunk-RAPEZR5L.cjs.map} +1 -1
  78. package/dist/{chunk-KEA5HRL3.js → chunk-RDYXH7ML.js} +2 -2
  79. package/dist/{chunk-KEA5HRL3.js.map → chunk-RDYXH7ML.js.map} +1 -1
  80. package/dist/{chunk-3SSMOVWB.cjs → chunk-SAF3B3AX.cjs} +2 -2
  81. package/dist/{chunk-3SSMOVWB.cjs.map → chunk-SAF3B3AX.cjs.map} +1 -1
  82. package/dist/chunk-SPOVFRZO.cjs +5 -0
  83. package/dist/chunk-SPOVFRZO.cjs.map +1 -0
  84. package/dist/{chunk-75JLWK4L.cjs → chunk-SQHBOWES.cjs} +2 -2
  85. package/dist/{chunk-75JLWK4L.cjs.map → chunk-SQHBOWES.cjs.map} +1 -1
  86. package/dist/chunk-UF5XMZTT.js +2 -0
  87. package/dist/chunk-UF5XMZTT.js.map +1 -0
  88. package/dist/chunk-UV3EUIBT.cjs +3 -0
  89. package/dist/chunk-UV3EUIBT.cjs.map +1 -0
  90. package/dist/chunk-VMSCRVNX.cjs +2 -0
  91. package/dist/chunk-VMSCRVNX.cjs.map +1 -0
  92. package/dist/{chunk-J7ABVGZH.cjs → chunk-WGP4UUO5.cjs} +2 -2
  93. package/dist/{chunk-J7ABVGZH.cjs.map → chunk-WGP4UUO5.cjs.map} +1 -1
  94. package/dist/chunk-XBGK3TTU.cjs +3 -0
  95. package/dist/chunk-XBGK3TTU.cjs.map +1 -0
  96. package/dist/chunk-XHQYHXRE.js +3 -0
  97. package/dist/chunk-XHQYHXRE.js.map +1 -0
  98. package/dist/chunk-XX55RR4Q.js +3 -0
  99. package/dist/chunk-XX55RR4Q.js.map +1 -0
  100. package/dist/chunk-YBQPEWT7.cjs +3 -0
  101. package/dist/chunk-YBQPEWT7.cjs.map +1 -0
  102. package/dist/{chunk-CHSO3DCS.js → chunk-ZDCZ5IDD.js} +3 -3
  103. package/dist/{chunk-CHSO3DCS.js.map → chunk-ZDCZ5IDD.js.map} +1 -1
  104. package/dist/{chunk-LNZNJSRW.cjs → chunk-ZVPZQ66D.cjs} +2 -2
  105. package/dist/chunk-ZVPZQ66D.cjs.map +1 -0
  106. package/dist/constants.cjs +1 -1
  107. package/dist/constants.d.cts +1 -1
  108. package/dist/constants.d.ts +1 -1
  109. package/dist/constants.js +1 -1
  110. package/dist/engine.cjs +1 -1
  111. package/dist/engine.d.cts +12 -12
  112. package/dist/engine.d.ts +12 -12
  113. package/dist/engine.js +1 -1
  114. package/dist/errors.cjs +1 -1
  115. package/dist/errors.d.cts +3 -3
  116. package/dist/errors.d.ts +3 -3
  117. package/dist/errors.js +1 -1
  118. package/dist/format.cjs +1 -1
  119. package/dist/format.d.cts +1 -1
  120. package/dist/format.d.ts +1 -1
  121. package/dist/format.js +1 -1
  122. package/dist/index.cjs +1 -1
  123. package/dist/index.cjs.map +1 -1
  124. package/dist/index.d.cts +14 -12
  125. package/dist/index.d.ts +14 -12
  126. package/dist/index.js +1 -1
  127. package/dist/index.js.map +1 -1
  128. package/dist/language.d.cts +11 -11
  129. package/dist/language.d.ts +11 -11
  130. package/dist/lexer.cjs +1 -1
  131. package/dist/lexer.cjs.map +1 -1
  132. package/dist/lexer.d.cts +8 -7
  133. package/dist/lexer.d.ts +8 -7
  134. package/dist/lexer.js +1 -1
  135. package/dist/lexer.js.map +1 -1
  136. package/dist/normalizer.cjs +1 -1
  137. package/dist/normalizer.d.cts +16 -10
  138. package/dist/normalizer.d.ts +16 -10
  139. package/dist/normalizer.js +1 -1
  140. package/dist/packages.cjs +1 -1
  141. package/dist/packages.d.cts +10 -10
  142. package/dist/packages.d.ts +10 -10
  143. package/dist/packages.js +1 -1
  144. package/dist/parser.cjs +1 -1
  145. package/dist/parser.d.cts +4 -4
  146. package/dist/parser.d.ts +4 -4
  147. package/dist/parser.js +1 -1
  148. package/dist/{pipeline-B4wf3M1h.d.cts → pipeline-69q2tsLE.d.cts} +1 -1
  149. package/dist/{pipeline-QIT4iD8f.d.ts → pipeline-DTqGLPsV.d.ts} +1 -1
  150. package/dist/resolvers.cjs +1 -1
  151. package/dist/resolvers.d.cts +19 -3
  152. package/dist/resolvers.d.ts +19 -3
  153. package/dist/resolvers.js +1 -1
  154. package/dist/testing.cjs +2 -2
  155. package/dist/testing.d.cts +11 -11
  156. package/dist/testing.d.ts +11 -11
  157. package/dist/testing.js +1 -1
  158. package/dist/uom.cjs +1 -1
  159. package/dist/uom.d.cts +2 -2
  160. package/dist/uom.d.ts +2 -2
  161. package/dist/uom.js +1 -1
  162. package/dist/vm.cjs +1 -1
  163. package/dist/vm.d.cts +8 -8
  164. package/dist/vm.d.ts +8 -8
  165. package/dist/vm.js +1 -1
  166. package/dist/worker.cjs +2 -2
  167. package/dist/worker.cjs.map +1 -1
  168. package/dist/worker.d.cts +34 -25
  169. package/dist/worker.d.ts +34 -25
  170. package/dist/worker.js +1 -1
  171. package/dist/worker.js.map +1 -1
  172. package/package.json +5 -5
  173. package/dist/chunk-42JXN3BH.js +0 -5
  174. package/dist/chunk-42JXN3BH.js.map +0 -1
  175. package/dist/chunk-4DJJIUQF.js +0 -2
  176. package/dist/chunk-4DJJIUQF.js.map +0 -1
  177. package/dist/chunk-6YM67DWH.cjs +0 -3
  178. package/dist/chunk-6YM67DWH.cjs.map +0 -1
  179. package/dist/chunk-7E7NXKQ5.js.map +0 -1
  180. package/dist/chunk-7SZBEE5R.cjs +0 -2
  181. package/dist/chunk-7SZBEE5R.cjs.map +0 -1
  182. package/dist/chunk-A5M4QZIK.js +0 -2
  183. package/dist/chunk-A5M4QZIK.js.map +0 -1
  184. package/dist/chunk-AF7HQN6I.js +0 -2
  185. package/dist/chunk-AF7HQN6I.js.map +0 -1
  186. package/dist/chunk-ALY4ZMYO.js +0 -2
  187. package/dist/chunk-ALY4ZMYO.js.map +0 -1
  188. package/dist/chunk-BRJ4RT5U.js +0 -2
  189. package/dist/chunk-BRJ4RT5U.js.map +0 -1
  190. package/dist/chunk-CO2BI6WL.cjs +0 -3
  191. package/dist/chunk-CO2BI6WL.cjs.map +0 -1
  192. package/dist/chunk-EN3CDYOS.cjs +0 -2
  193. package/dist/chunk-EN3CDYOS.cjs.map +0 -1
  194. package/dist/chunk-EQDT42JG.js +0 -3
  195. package/dist/chunk-EQDT42JG.js.map +0 -1
  196. package/dist/chunk-FMMT5C5H.cjs +0 -3
  197. package/dist/chunk-FMMT5C5H.cjs.map +0 -1
  198. package/dist/chunk-FP6Z6PYR.js +0 -2
  199. package/dist/chunk-FP6Z6PYR.js.map +0 -1
  200. package/dist/chunk-H3JXNH7X.cjs +0 -3
  201. package/dist/chunk-H3JXNH7X.cjs.map +0 -1
  202. package/dist/chunk-HZOLIL5T.js +0 -3
  203. package/dist/chunk-HZOLIL5T.js.map +0 -1
  204. package/dist/chunk-JVMINMAB.js +0 -2
  205. package/dist/chunk-JVMINMAB.js.map +0 -1
  206. package/dist/chunk-JYLNQOPU.cjs +0 -2
  207. package/dist/chunk-JYLNQOPU.cjs.map +0 -1
  208. package/dist/chunk-KRXO3MOW.cjs +0 -2
  209. package/dist/chunk-KRXO3MOW.cjs.map +0 -1
  210. package/dist/chunk-KVLJDOZ7.cjs +0 -5
  211. package/dist/chunk-KVLJDOZ7.cjs.map +0 -1
  212. package/dist/chunk-LNZNJSRW.cjs.map +0 -1
  213. package/dist/chunk-O3BDXOQJ.js +0 -2
  214. package/dist/chunk-O3BDXOQJ.js.map +0 -1
  215. package/dist/chunk-PIZQIQVM.js +0 -3
  216. package/dist/chunk-PIZQIQVM.js.map +0 -1
  217. package/dist/chunk-QTSDIDAS.js +0 -3
  218. package/dist/chunk-QTSDIDAS.js.map +0 -1
  219. package/dist/chunk-SGIDBZ4T.cjs +0 -2
  220. package/dist/chunk-SGIDBZ4T.cjs.map +0 -1
  221. package/dist/chunk-UNKSCVIL.cjs +0 -2
  222. package/dist/chunk-UNKSCVIL.cjs.map +0 -1
  223. package/dist/chunk-USQ4KL6S.cjs +0 -2
  224. package/dist/chunk-USQ4KL6S.cjs.map +0 -1
  225. package/dist/chunk-XDXIPVZB.cjs +0 -2
  226. package/dist/chunk-XDXIPVZB.cjs.map +0 -1
@@ -0,0 +1,2 @@
1
+ 'use strict';var chunkFYAMQFZZ_cjs=require('./chunk-FYAMQFZZ.cjs'),chunkWGP4UUO5_cjs=require('./chunk-WGP4UUO5.cjs'),chunkSQHBOWES_cjs=require('./chunk-SQHBOWES.cjs'),chunkZKFCKAIX_cjs=require('./chunk-ZKFCKAIX.cjs'),chunkEZKR44MA_cjs=require('./chunk-EZKR44MA.cjs'),chunkYBQPEWT7_cjs=require('./chunk-YBQPEWT7.cjs');function jt(e,t){let n=t===2?chunkWGP4UUO5_cjs.L:chunkWGP4UUO5_cjs.M,o=n(e.n),r=n(e.d);return o===null||r===null?null:{n:o,d:r}}function Kt(e,t){let n=chunkWGP4UUO5_cjs.y(e),o=new Map;for(let[r,i]of n){if(i%t!==0)return null;o.set(r,i/t);}return chunkWGP4UUO5_cjs.x(o)}function Xn(e,t){let n=chunkWGP4UUO5_cjs.y(e);for(let[o,r]of chunkWGP4UUO5_cjs.y(t))n.set(o,(n.get(o)??0)+r);return chunkWGP4UUO5_cjs.x(n)}function Xt(e,t){let n=chunkWGP4UUO5_cjs.y(e);for(let[o,r]of chunkWGP4UUO5_cjs.y(t)){let i=(n.get(o)??0)-r;i<=0?n.delete(o):n.set(o,i);}return chunkWGP4UUO5_cjs.x(n)}function Zn(e,t){let n=chunkWGP4UUO5_cjs.y(e),o=new Map;for(let[r,i]of chunkWGP4UUO5_cjs.y(t)){let a=n.get(r);a!==void 0&&o.set(r,Math.min(a,i));}return chunkWGP4UUO5_cjs.x(o)}function Hn(e){let t=new Set;for(let n of e)for(let o of chunkWGP4UUO5_cjs.y(n).keys())t.add(o);return [...t].sort()}function Q(e){let t=new Map;for(let n of e)t.set(n.key,n.coefficient);return chunkWGP4UUO5_cjs.E({terms:t,vars:Hn(e.map(n=>n.key))})}function Ze(e){let t=e[0];for(let n=1;n<e.length;n++)t={kind:"mul",left:t,right:e[n]};return t}function Wn(e){return [...e.terms].map(([n,o])=>({key:n,coefficient:o})).sort((n,o)=>chunkWGP4UUO5_cjs.D(n.key,o.key,e.vars))}function Wt(e){if(e.vars.length<2)return null;let t=Wn(e);return t.length===2?Qn(t[0],t[1]):t.length===3?zn(t):t.length===4?Jn(t):null}function Qn(e,t){let n=e.coefficient.n>0n,o=t.coefficient.n>0n;if(!n)return null;let r=He(e,t,2);if(r!==null&&!o)return Ze([Q([r.a,Te(r.b)]),Q([r.a,r.b])]);let i=He(e,t,3);if(i===null)return null;let a=Q(o?[i.a,i.b]:[i.a,Te(i.b)]),u=o?Te(Oe(i.a,i.b)):Oe(i.a,i.b);return Ze([a,Q([Zt(i.a),u,Zt(i.b)])])}function He(e,t,n){let o=t.coefficient.n<0n?chunkWGP4UUO5_cjs.j(t.coefficient):t.coefficient,r=jt(e.coefficient,n),i=jt(o,n);if(r===null||i===null)return null;let a=Kt(e.key,n),u=Kt(t.key,n);return a===null||u===null?null:{a:{key:a,coefficient:r},b:{key:u,coefficient:i}}}function Te(e){return {key:e.key,coefficient:chunkWGP4UUO5_cjs.j(e.coefficient)}}function Oe(e,t){return {key:Xn(e.key,t.key),coefficient:chunkWGP4UUO5_cjs.h(e.coefficient,t.coefficient)}}function Zt(e){return Oe(e,e)}function zn(e){let[t,n,o]=e;if(t.coefficient.n<0n||o.coefficient.n<0n)return null;let r=He(t,o,2);if(r===null)return null;let i=Oe(r.a,r.b);if(i.key!==n.key)return null;let a=chunkWGP4UUO5_cjs.h(i.coefficient,{n:2n,d:1n}),u=n.coefficient.n<0n,l=u?chunkWGP4UUO5_cjs.j(n.coefficient):n.coefficient;return chunkWGP4UUO5_cjs.m(chunkWGP4UUO5_cjs.i(l,a))?{kind:"pow",base:Q([r.a,u?Te(r.b):r.b]),exponent:chunkWGP4UUO5_cjs.p(2)}:null}function Jn(e){let t=[[[0,1],[2,3]],[[0,2],[1,3]],[[0,3],[1,2]]];for(let n of t){let o=Ht(e[n[0][0]],e[n[0][1]]),r=Ht(e[n[1][0]],e[n[1][1]]);if(!(o===null||r===null)&&eo(o.cofactor,r.cofactor))return Ze([Q([o.common,r.common]),Q(o.cofactor)])}return null}function Ht(e,t){let n=Zn(e.key,t.key),o={key:n,coefficient:e.coefficient},r=[{key:Xt(e.key,n),coefficient:{n:1n,d:1n}},{key:Xt(t.key,n),coefficient:chunkWGP4UUO5_cjs.i(t.coefficient,e.coefficient)}];return r[0].key===r[1].key?null:{common:o,cofactor:r}}function eo(e,t){return e.length!==t.length?false:e.every((n,o)=>n.key===t[o].key&&n.coefficient.n===t[o].coefficient.n&&n.coefficient.d===t[o].coefficient.d)}var to=12,_e=4096;function we(e,t){let n=e<0n?-e:e,o=t<0n?-t:t;for(;o!==0n;){let r=n%o;n=o,o=r;}return n}function zt(e,t){return e===0n||t===0n?0n:e/we(e,t)*t}function Qt(e){let t=e<0n?-e:e;if(t===0n)return null;let n=[];for(let o=1n;o*o<=t;o++){if(t%o!==0n)continue;n.push(o);let r=t/o;if(r!==o&&n.push(r),n.length>_e)return null}return n}function Jt(e,t){let n=chunkWGP4UUO5_cjs.a;for(let o of e)n=chunkWGP4UUO5_cjs.f(chunkWGP4UUO5_cjs.h(n,t),o);return n}function no(e,t){let n=[e[0]];for(let o=1;o<e.length-1;o++)n.push(chunkWGP4UUO5_cjs.f(e[o],chunkWGP4UUO5_cjs.h(n[o-1],t)));return n}function ue(e){if(e.length<2)return [];let t=1n;for(let s of e)t=zt(t,s.d);let n=e.map(s=>s.n*t/s.d),o=n[0],r=n[n.length-1];if(r===0n)return [];let i=Qt(r),a=Qt(o);if(i===null||a===null)throw chunkYBQPEWT7_cjs.c.execution("SYMBOLIC_FACTOR_LIMIT_EXCEEDED","This polynomial's coefficients have too many divisors to search for rational roots.",{limit:_e});if(i.length*a.length>_e)throw chunkYBQPEWT7_cjs.c.execution("SYMBOLIC_FACTOR_LIMIT_EXCEEDED","This polynomial has too many candidate rational roots to test.",{limit:_e});let u=[],l=new Set;for(let s of i)for(let p of a)for(let h of [1n,-1n]){let v={n:h*s/we(s,p),d:p/we(s,p)},V=`${v.n}/${v.d}`;l.has(V)||(l.add(V),chunkWGP4UUO5_cjs.l(Jt(e,v))&&u.push(v));}return u}function oo(e,t){return chunkWGP4UUO5_cjs.l(t)?chunkWGP4UUO5_cjs.q(e):t.n>0n?{kind:"sub",left:chunkWGP4UUO5_cjs.q(e),right:chunkWGP4UUO5_cjs.p(t)}:{kind:"add",left:chunkWGP4UUO5_cjs.q(e),right:chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.j(t))}}function ro(e,t){let n=e.length-1,o=new Map;return e.forEach((r,i)=>{if(chunkWGP4UUO5_cjs.l(r))return;let a=n-i;o.set(a===0?"":a===1?t:`${t}^${a}`,r);}),chunkWGP4UUO5_cjs.E({terms:o,vars:o.size>0?[t]:[]})}function Qe(e,t){let n=[],o=[...e],r=ue(o);for(;r.length>0&&o.length>2;){for(let a of r){let u=0;for(;o.length>1&&chunkWGP4UUO5_cjs.l(Jt(o,a));)o=no(o,a),u++;u>0&&n.push({base:oo(t,a),power:u});}r=o.length>2?ue(o):[];}return o.length-1>=1?(n.push({base:ro(o,t),power:1}),{content:chunkWGP4UUO5_cjs.b,factors:n}):{content:o.length===1?o[0]:chunkWGP4UUO5_cjs.b,factors:n}}function io(e){let t=[];chunkWGP4UUO5_cjs.m(e.content)||t.push(chunkWGP4UUO5_cjs.p(e.content));for(let o of e.factors)t.push(o.power===1?o.base:chunkWGP4UUO5_cjs.r(o.base,chunkWGP4UUO5_cjs.p({n:BigInt(o.power),d:1n})));if(t.length===0)return chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.b);let n=t[0];for(let o=1;o<t.length;o++)n={kind:"mul",left:n,right:t[o]};return n}function ao(e){let t=0n,n=1n;for(let o of e.terms.values())t=we(t,o.n),n=zt(n,o.d);return t===0n?chunkWGP4UUO5_cjs.b:{n:t,d:n}}function uo(e){let t=new Map;for(let r of e.vars){let i=1/0;for(let a of e.terms.keys()){let u=lo(a,r);u<i&&(i=u);}i>0&&i!==1/0&&t.set(r,i);}if(t.size===0)return {monomial:t,reduced:e};let n=new Map;for(let[r,i]of e.terms){let a=We(r);for(let[u,l]of t)a.set(u,(a.get(u)??0)-l);n.set(so(a),i);}let o=new Set;for(let r of n.keys())for(let i of We(r).keys())o.add(i);return {monomial:t,reduced:{terms:n,vars:[...o].sort()}}}function lo(e,t){return We(e).get(t)??0}function We(e){let t=new Map;if(e==="")return t;for(let n of e.split("*")){let o=n.indexOf("^");o===-1?t.set(n,1):t.set(n.slice(0,o),Number(n.slice(o+1)));}return t}function so(e){return [...e.keys()].filter(n=>(e.get(n)??0)>0).sort().map(n=>e.get(n)===1?n:`${n}^${e.get(n)}`).join("*")}function co(e){let t=[...e.keys()].sort(),n=null;for(let o of t){let r=e.get(o),i=r===1?chunkWGP4UUO5_cjs.q(o):chunkWGP4UUO5_cjs.r(chunkWGP4UUO5_cjs.q(o),chunkWGP4UUO5_cjs.p({n:BigInt(r),d:1n}));n=n===null?i:{kind:"mul",left:n,right:i};}return n}function en(e){let t=chunkWGP4UUO5_cjs.C(e);if(t===null||t.terms.size===0||chunkWGP4UUO5_cjs.z(t)>to||t.vars.length===0)return e;let n=ao(t),o=chunkWGP4UUO5_cjs.m(n)?t:mo(t,chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.b,n)),{monomial:r,reduced:i}=uo(o),a=co(r),u=chunkWGP4UUO5_cjs.A(i);if(u===null){let te=Wt(i);return te!==null?fo(n,a,te):po(n,a,i)??e}let l=[...chunkWGP4UUO5_cjs.B(i,u)].reverse(),s=Qe(l,u),p=chunkWGP4UUO5_cjs.h(n,s.content);if(s.factors.length<=1&&(s.factors[0]?.power??1)===1&&a===null&&chunkWGP4UUO5_cjs.m(p))return e;let v=[];chunkWGP4UUO5_cjs.m(p)||v.push(chunkWGP4UUO5_cjs.p(p)),a!==null&&v.push(a),v.push(io({content:chunkWGP4UUO5_cjs.b,factors:s.factors}));let V=v[0];for(let te=1;te<v.length;te++)V={kind:"mul",left:V,right:v[te]};return V}function mo(e,t){let n=new Map;for(let[o,r]of e.terms)n.set(o,chunkWGP4UUO5_cjs.h(r,t));return {terms:n,vars:e.vars}}function fo(e,t,n){let o=[];chunkWGP4UUO5_cjs.m(e)||o.push(chunkWGP4UUO5_cjs.p(e)),t!==null&&o.push(t),o.push(n);let r=o[0];for(let i=1;i<o.length;i++)r={kind:"mul",left:r,right:o[i]};return r}function po(e,t,n){if(t===null&&chunkWGP4UUO5_cjs.m(e))return null;let o=[];chunkWGP4UUO5_cjs.m(e)||o.push(chunkWGP4UUO5_cjs.p(e)),t!==null&&o.push(t),o.push(chunkWGP4UUO5_cjs.E(n));let r=o[0];for(let i=1;i<o.length;i++)r={kind:"mul",left:r,right:o[i]};return r}var k={n:2n,d:1n},B={n:3n,d:1n},be={n:4n,d:1n};function bo(e,t,n,o){let r=chunkWGP4UUO5_cjs.j(chunkWGP4UUO5_cjs.i(t,chunkWGP4UUO5_cjs.h(B,e))),i=chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.g(chunkWGP4UUO5_cjs.h(B,chunkWGP4UUO5_cjs.h(e,n)),chunkWGP4UUO5_cjs.h(t,t)),chunkWGP4UUO5_cjs.h(B,chunkWGP4UUO5_cjs.h(e,e))),a=chunkWGP4UUO5_cjs.h(k,chunkWGP4UUO5_cjs.h(t,chunkWGP4UUO5_cjs.h(t,t))),u=chunkWGP4UUO5_cjs.h({n:9n,d:1n},chunkWGP4UUO5_cjs.h(e,chunkWGP4UUO5_cjs.h(t,n))),l=chunkWGP4UUO5_cjs.h({n:27n,d:1n},chunkWGP4UUO5_cjs.h(chunkWGP4UUO5_cjs.h(e,e),o)),s=chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.f(chunkWGP4UUO5_cjs.g(a,u),l),chunkWGP4UUO5_cjs.h({n:27n,d:1n},chunkWGP4UUO5_cjs.h(e,chunkWGP4UUO5_cjs.h(e,e))));return {p:i,q:s,shift:r}}function nn(e,t,n,o){let{p:r,q:i,shift:a}=bo(e,t,n,o),u=chunkWGP4UUO5_cjs.j(chunkWGP4UUO5_cjs.f(chunkWGP4UUO5_cjs.h(be,chunkWGP4UUO5_cjs.h(r,chunkWGP4UUO5_cjs.h(r,r))),chunkWGP4UUO5_cjs.h({n:27n,d:1n},chunkWGP4UUO5_cjs.h(i,i))));return chunkWGP4UUO5_cjs.k(u,chunkWGP4UUO5_cjs.a)>0?{exact:[],approximate:No(r,i,a)}:chunkWGP4UUO5_cjs.l(u)?{exact:yo(r,i,a),approximate:[]}:{exact:ho(r,i,a),approximate:[]}}function yo(e,t,n){if(chunkWGP4UUO5_cjs.l(e))return [chunkWGP4UUO5_cjs.p(n)];let o=chunkWGP4UUO5_cjs.f(chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.h(B,t),e),n),r=chunkWGP4UUO5_cjs.f(chunkWGP4UUO5_cjs.j(chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.h(B,t),chunkWGP4UUO5_cjs.h(k,e))),n);return [o,r].sort(chunkWGP4UUO5_cjs.k).map(chunkWGP4UUO5_cjs.p)}function ho(e,t,n){let o=chunkWGP4UUO5_cjs.j(chunkWGP4UUO5_cjs.i(t,k)),r=chunkWGP4UUO5_cjs.f(chunkWGP4UUO5_cjs.h(chunkWGP4UUO5_cjs.i(t,k),chunkWGP4UUO5_cjs.i(t,k)),chunkWGP4UUO5_cjs.h(chunkWGP4UUO5_cjs.i(e,B),chunkWGP4UUO5_cjs.h(chunkWGP4UUO5_cjs.i(e,B),chunkWGP4UUO5_cjs.i(e,B)))),i=chunkWGP4UUO5_cjs.O(r),a={kind:"call",name:"cbrt",args:[{kind:"add",left:chunkWGP4UUO5_cjs.p(o),right:i}]},u={kind:"call",name:"cbrt",args:[{kind:"sub",left:chunkWGP4UUO5_cjs.p(o),right:i}]},l={kind:"add",left:a,right:u},s={kind:"sub",left:a,right:u},p={kind:"add",left:chunkWGP4UUO5_cjs.p(n),right:{kind:"div",left:{kind:"neg",operand:l},right:chunkWGP4UUO5_cjs.p(k)}},h={kind:"mul",left:{kind:"div",left:{kind:"mul",left:s,right:chunkWGP4UUO5_cjs.O(B)},right:chunkWGP4UUO5_cjs.p(k)},right:chunkWGP4UUO5_cjs.w(chunkWGP4UUO5_cjs.n)};return [{kind:"add",left:chunkWGP4UUO5_cjs.p(n),right:l},{kind:"sub",left:p,right:h},{kind:"add",left:p,right:h}]}function No(e,t,n){let o=chunkWGP4UUO5_cjs.e(e),r=chunkWGP4UUO5_cjs.e(t),i=chunkWGP4UUO5_cjs.e(n),a=2*Math.sqrt(-o/3),u=3*r/(2*o)*Math.sqrt(-3/o),l=Math.acos(Math.min(1,Math.max(-1,u)))/3;return [0,1,2].map(s=>a*Math.cos(l-2*Math.PI*s/3)+i).sort((s,p)=>s-p)}function go(e,t,n,o){let r=chunkWGP4UUO5_cjs.j(chunkWGP4UUO5_cjs.i(e,be)),i=chunkWGP4UUO5_cjs.h(e,e),a=chunkWGP4UUO5_cjs.g(t,chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.h(B,i),{n:8n,d:1n})),u=chunkWGP4UUO5_cjs.f(chunkWGP4UUO5_cjs.g(n,chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.h(e,t),k)),chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.h(i,e),{n:8n,d:1n})),l=chunkWGP4UUO5_cjs.g(chunkWGP4UUO5_cjs.f(chunkWGP4UUO5_cjs.g(o,chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.h(e,n),be)),chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.h(i,t),{n:16n,d:1n})),chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.h(B,chunkWGP4UUO5_cjs.h(i,i)),{n:256n,d:1n}));return {p:a,q:u,r:l,shift:r}}function on(e,t,n,o,r,i){let a=V=>chunkWGP4UUO5_cjs.i(V,e),{p:u,q:l,r:s,shift:p}=go(a(t),a(n),a(o),a(r)),h=chunkWGP4UUO5_cjs.l(l)?xo(u,s):So(u,l,s,i);if(h===null)return null;let v=chunkWGP4UUO5_cjs.l(p)?h:h.map(V=>({kind:"add",left:chunkWGP4UUO5_cjs.p(p),right:V}));return {exact:Ro(v),approximate:[]}}function Ro(e){let t=new Set,n=[];for(let o of e){let r=chunkWGP4UUO5_cjs.t(chunkWGP4UUO5_cjs.Q(o));t.has(r)||(t.add(r),n.push(o));}return n}function xo(e,t){let n=chunkWGP4UUO5_cjs.g(chunkWGP4UUO5_cjs.h(e,e),chunkWGP4UUO5_cjs.h(be,t));if(chunkWGP4UUO5_cjs.k(n,chunkWGP4UUO5_cjs.a)<0)return Mo(e,t);let o=chunkWGP4UUO5_cjs.N(n);return o!==null?vo(chunkWGP4UUO5_cjs.j(e),o,chunkWGP4UUO5_cjs.l(n)):Io(e,t,n)}function vo(e,t,n){let o=n?[chunkWGP4UUO5_cjs.i(e,k)]:[chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.f(e,t),k),chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.g(e,t),k)],r=[];for(let i of o){if(chunkWGP4UUO5_cjs.l(i)){r.push(chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.a));continue}let a=chunkWGP4UUO5_cjs.P(i);r.push({kind:"neg",operand:a},a);}return r}function Io(e,t,n){let o=chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.j(e)),r=chunkWGP4UUO5_cjs.O(n),i=chunkWGP4UUO5_cjs.k(e,chunkWGP4UUO5_cjs.a)<=0,a=[{node:ze({kind:"add",left:o,right:r}),positive:i||chunkWGP4UUO5_cjs.k(t,chunkWGP4UUO5_cjs.a)<=0},{node:ze({kind:"sub",left:o,right:r}),positive:i&&chunkWGP4UUO5_cjs.k(t,chunkWGP4UUO5_cjs.a)>=0}],u=[];for(let{node:l,positive:s}of a){let h={kind:"call",name:"sqrt",args:[s?l:{kind:"neg",operand:l}]},v=s?h:{kind:"mul",left:h,right:chunkWGP4UUO5_cjs.w(chunkWGP4UUO5_cjs.n)};u.push({kind:"neg",operand:v},v);}return u}function ze(e){return {kind:"div",left:e,right:chunkWGP4UUO5_cjs.p(k)}}function Mo(e,t){let n=chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.j(e),k),o=chunkWGP4UUO5_cjs.N(t),r=o===null?tn(chunkWGP4UUO5_cjs.O(t),n):chunkWGP4UUO5_cjs.O(chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.f(o,n),k)),a={kind:"mul",left:o===null?tn(chunkWGP4UUO5_cjs.O(t),chunkWGP4UUO5_cjs.j(n)):chunkWGP4UUO5_cjs.O(chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.g(o,n),k)),right:chunkWGP4UUO5_cjs.w(chunkWGP4UUO5_cjs.n)},u={kind:"add",left:r,right:a},l={kind:"sub",left:r,right:a};return [{kind:"neg",operand:u},{kind:"neg",operand:l},l,u]}function tn(e,t){let n=t.n>=0n?{kind:"add",left:e,right:chunkWGP4UUO5_cjs.p(t)}:{kind:"sub",left:e,right:chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.j(t))};return {kind:"call",name:"sqrt",args:[ze(n)]}}function So(e,t,n,o){let r=[{n:1n,d:1n},chunkWGP4UUO5_cjs.h(k,e),chunkWGP4UUO5_cjs.g(chunkWGP4UUO5_cjs.h(e,e),chunkWGP4UUO5_cjs.h(be,n)),chunkWGP4UUO5_cjs.j(chunkWGP4UUO5_cjs.h(t,t))];for(let i of ue(r)){if(chunkWGP4UUO5_cjs.k(i,chunkWGP4UUO5_cjs.a)<=0)continue;let a=chunkWGP4UUO5_cjs.N(i);if(a===null)continue;let u=chunkWGP4UUO5_cjs.f(e,i),l=chunkWGP4UUO5_cjs.i(t,a),s=chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.g(u,l),k),p=chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.f(u,l),k),h={n:1n,d:1n};return [...o(h,a,s),...o(h,chunkWGP4UUO5_cjs.j(a),p)]}return null}var Eo=200,Ao=1e-14,ko=1e-10,Vo=1e-10,rn=1e-9,To=1e-8,Oo=4;function ye(e,t){return {re:e.re-t.re,im:e.im-t.im}}function _o(e,t){return {re:e.re*t.re-e.im*t.im,im:e.re*t.im+e.im*t.re}}function un(e,t){if(Math.abs(t.re)>=Math.abs(t.im)){let r=t.im/t.re,i=t.re+t.im*r;return {re:(e.re+e.im*r)/i,im:(e.im-e.re*r)/i}}let n=t.re/t.im,o=t.re*n+t.im;return {re:(e.re*n+e.im)/o,im:(e.im*n-e.re)/o}}function K(e){return Math.hypot(e.re,e.im)}function De(e,t){let n=0,o=0;for(let r of e){let i=n*t.re-o*t.im+r;o=n*t.im+o*t.re,n=i;}return {re:n,im:o}}function wo(e,t){let n=K(t),o=0;for(let r of e)o=o*n+Math.abs(r);return o}function Do(e){let t=e.length-1,n=[];for(let o=0;o<t;o++)n.push(e[o]*(t-o));return n}function Co(e){let t=[...e].reverse(),o=[...chunkWGP4UUO5_cjs.K(t)].reverse().map(chunkWGP4UUO5_cjs.e);return o.some(r=>!Number.isFinite(r))?null:o}function Po(e){let t=e.length-1,n=0;for(let a=1;a<e.length;a++)n=Math.max(n,Math.abs(e[a]));let o=1+n,r=-e[1]/t,i=[];for(let a=0;a<t;a++){let u=2*Math.PI*a/t+Math.PI/(2*t);i.push({re:r+o*Math.cos(u),im:o*Math.sin(u)});}return i}function Lo(e){let t=e.length-1,n=Po(e);for(let o=0;o<Eo;o++){let r=0,i=1;for(let a=0;a<t;a++){let u={re:1,im:0};for(let s=0;s<t;s++)a!==s&&(u=_o(u,ye(n[a],n[s])));if(u.re===0&&u.im===0){n[a]={re:n[a].re+1e-6*(a+1),im:n[a].im+1e-6};continue}let l=un(De(e,n[a]),u);if(!Number.isFinite(l.re)||!Number.isFinite(l.im))return null;n[a]=ye(n[a],l),r=Math.max(r,K(l)),i=Math.max(i,K(n[a]));}if(r<=Ao*i)return n}return null}function an(e,t,n){let o=n;for(let r=0;r<Oo;r++){let i=De(t,o);if(i.re===0&&i.im===0)break;let a=ye(o,un(De(e,o),i));if(!Number.isFinite(a.re)||!Number.isFinite(a.im))break;o=a;}return o}function Fo(e,t,n){let o=Math.max(1,K(n));if(n.im!==0&&Math.abs(n.im)<=rn*o){let r=an(e,t,{re:n.re,im:0});if(Je(e,r))return {re:r.re,im:0}}if(n.re!==0&&Math.abs(n.re)<=rn*o){let r=an(e,t,{re:0,im:n.im});if(Je(e,r))return {re:0,im:r.im}}return n}function Je(e,t){return !Number.isFinite(t.re)||!Number.isFinite(t.im)?false:K(De(e,t))<=ko*wo(e,t)}function Uo(e){let t=[...e],n=t.map(o=>o.im===0);for(let o=0;o<t.length;o++){if(n[o])continue;let r={re:t[o].re,im:-t[o].im},i=-1,a=Number.POSITIVE_INFINITY;for(let p=o+1;p<t.length;p++){if(n[p])continue;let h=K(ye(t[p],r));h<a&&(a=h,i=p);}if(i===-1||a>To*Math.max(1,K(t[o])))continue;let u=(t[o].re+t[i].re)/2,l=(Math.abs(t[o].im)+Math.abs(t[i].im))/2,s=t[o].im<0?-1:1;t[o]={re:u,im:s*l},t[i]={re:u,im:-s*l},n[o]=true,n[i]=true;}return t}function $o(e){for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++){let o=Math.max(1,K(e[t]),K(e[n]));if(K(ye(e[t],e[n]))<=Vo*o)return false}return true}function ln(e){let t=Co(e);if(t===null)return null;if(t.length<2)return [];let n=Lo(t);if(n===null)return null;let o=Do(t),r=Uo(n).map(i=>Fo(t,o,i));for(let i of r)if(!Je(t,i))return null;return $o(r)?[...r].sort((i,a)=>i.re-a.re||i.im-a.im):null}var sn=8;function Bo(e,t){let n=chunkWGP4UUO5_cjs.a;for(let o of e)n=chunkWGP4UUO5_cjs.f(chunkWGP4UUO5_cjs.h(n,t),o);return n}function qo(e,t){let n=[e[0]];for(let o=1;o<e.length-1;o++)n.push(chunkWGP4UUO5_cjs.f(e[o],chunkWGP4UUO5_cjs.h(n[o-1],t)));return n}function cn(e,t,n){let o=chunkWGP4UUO5_cjs.g(chunkWGP4UUO5_cjs.h(t,t),chunkWGP4UUO5_cjs.h(jo(),chunkWGP4UUO5_cjs.h(e,n))),r=chunkWGP4UUO5_cjs.h(Go(),e);if(chunkWGP4UUO5_cjs.k(o,chunkWGP4UUO5_cjs.a)<0)return Yo(chunkWGP4UUO5_cjs.j(t),o,r);if(chunkWGP4UUO5_cjs.l(o))return [chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.j(t),r))];let i=chunkWGP4UUO5_cjs.L(o.n),a=chunkWGP4UUO5_cjs.L(o.d);if(i!==null&&a!==null){let h={n:i,d:a},v=chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.f(chunkWGP4UUO5_cjs.j(t),h),r),V=chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.g(chunkWGP4UUO5_cjs.j(t),h),r);return chunkWGP4UUO5_cjs.k(V,v)<=0?[chunkWGP4UUO5_cjs.p(V),chunkWGP4UUO5_cjs.p(v)]:[chunkWGP4UUO5_cjs.p(v),chunkWGP4UUO5_cjs.p(V)]}let u=chunkWGP4UUO5_cjs.O(o),l=chunkWGP4UUO5_cjs.k(r,chunkWGP4UUO5_cjs.a)>0,s={kind:"div",left:{kind:"sub",left:chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.j(t)),right:u},right:chunkWGP4UUO5_cjs.p(r)},p={kind:"div",left:{kind:"add",left:chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.j(t)),right:u},right:chunkWGP4UUO5_cjs.p(r)};return l?[s,p]:[p,s]}function Yo(e,t,n){let o=chunkWGP4UUO5_cjs.j(t),r=chunkWGP4UUO5_cjs.L(o.n),i=chunkWGP4UUO5_cjs.L(o.d);if(r!==null&&i!==null){let s=chunkWGP4UUO5_cjs.i({n:r,d:i},n),p=chunkWGP4UUO5_cjs.i(e,n);return [chunkWGP4UUO5_cjs.w(chunkWGP4UUO5_cjs.o(p,chunkWGP4UUO5_cjs.j(s))),chunkWGP4UUO5_cjs.w(chunkWGP4UUO5_cjs.o(p,s))]}let a=chunkWGP4UUO5_cjs.i(e,n),u=chunkWGP4UUO5_cjs.i(o,chunkWGP4UUO5_cjs.h(n,n)),l={kind:"mul",left:chunkWGP4UUO5_cjs.O(u),right:chunkWGP4UUO5_cjs.w(chunkWGP4UUO5_cjs.n)};return chunkWGP4UUO5_cjs.l(a)?[{kind:"neg",operand:l},l]:[{kind:"sub",left:chunkWGP4UUO5_cjs.p(a),right:l},{kind:"add",left:chunkWGP4UUO5_cjs.p(a),right:l}]}function Go(){return {n:2n,d:1n}}function jo(){return {n:4n,d:1n}}function Ko(e){return {re:e,im:0}}function mn(e,t,n){let o=chunkWGP4UUO5_cjs.C({kind:"sub",left:e,right:t});if(o===null)return {kind:"unsupported",reason:"this is not a polynomial equation (it divides by an unknown, or calls a function of one)"};let r=o.vars.filter(u=>u!==n),i=chunkWGP4UUO5_cjs.z(o,n);if(r.length>0)return i!==1?{kind:"unsupported",reason:`solving for "${n}" needs the equation to be linear in it when other unknowns (${r.join(", ")}) are present`}:Xo(o,n);if(i===0)return o.terms.size===0?{kind:"identity"}:{kind:"contradiction"};if(i>sn)return {kind:"unsupported",reason:`degree ${i} is above the supported maximum of ${sn}`};let a=[...chunkWGP4UUO5_cjs.B(o,n)].reverse();return Wo(a)}function Xo(e,t){let n=new Map,o=new Map;for(let[u,l]of e.terms){let s=u.split("*").filter(h=>h.length>0),p=s.indexOf(t);p===-1?o.set(u,l):(s.splice(p,1),n.set(s.join("*"),l));}let r=u=>{let l=new Set;for(let s of u.keys())for(let p of s.split("*"))p.length>0&&l.add(p.split("^")[0]);return [...l].sort()},i=chunkWGP4UUO5_cjs.E({terms:n,vars:r(n)});return {kind:"roots",exact:[{kind:"div",left:{kind:"neg",operand:chunkWGP4UUO5_cjs.E({terms:o,vars:r(o)})},right:i}],approximate:[]}}function Zo(e){return e.length===4?nn(e[0],e[1],e[2],e[3]):e.length===5?on(e[0],e[1],e[2],e[3],e[4],cn):null}function Ho(e){let t=[],n=[...e],o=0;for(;n.length>1&&chunkWGP4UUO5_cjs.l(n[n.length-1]);)n=n.slice(0,-1),o++;for(o>0&&t.push(chunkWGP4UUO5_cjs.a);n.length>1;){let r=ue(n);if(r.length===0)break;for(let i of r){let a=0;for(;n.length>1&&chunkWGP4UUO5_cjs.l(Bo(n,i));)n=qo(n,i),a++;a>0&&t.push(i);}}return {roots:t.sort(chunkWGP4UUO5_cjs.k),remaining:n}}function Wo(e){let{roots:t,remaining:n}=Ho(e),o=t.map(chunkWGP4UUO5_cjs.p),r=[],i=n.length-1,a=e.length-n.length;if(i<=0)return le(o,r,a,0,"");if(i===1)return o.push(chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.i(chunkWGP4UUO5_cjs.j(n[1]),n[0]))),le(o,r,a+1,0,"");if(i===2)return o.push(...cn(n[0],n[1],n[2])),le(o,r,a+2,0,"");let u=Zo(n);if(u!==null)return o.push(...u.exact),r.push(...u.approximate.map(Ko)),le(o,r,a+i,0,"");let l=ln(n);return l!==null?(r.push(...l),le(o,r,a+i,0,"")):le(o,r,a,i,`a degree-${i} factor of it has no exact solution here and the numerical method did not converge on that factor`)}function le(e,t,n,o,r){let i=e.length+t.length,a=n>=1&&(i<1||i>n);return o>0||a?{kind:"incomplete",exact:e,approximate:t,missing:a?Math.max(1,n+o-i):o,reason:a?`${i} root${i===1?"":"s"} were produced for a degree-${n+o} equation, which does not add up`:r}:{kind:"roots",exact:e,approximate:t}}var fn={0:"sqrt",1:"abs",2:"sin",3:"cos",4:"tan",5:"log",6:"ceil",7:"floor",8:"round",11:"asin",12:"acos",13:"atan",14:"atan2",15:"sinh",16:"cosh",17:"tanh",18:"asinh",19:"acosh",20:"atanh",21:"cbrt",23:"expm1",24:"exp",26:"hypot",28:"log10",29:"log1p",30:"log2",33:"sign",34:"trunc",35:"degtorad",36:"radtodeg",61:"root",62:"fact"},Qo=31,Ri=new Set([67,68,69,70,71,72,73,74,75,76,77,78,79]);function O(e){if(e.type===9)return e.value;if(e.type===13||e.type===12)return null;let t=e.toNumber();return Number.isFinite(t)?chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.d(t)):null}function _(e){let t=chunkWGP4UUO5_cjs.Q(e);return t.kind==="const"?chunkSQHBOWES_cjs.n(chunkWGP4UUO5_cjs.e(t.value)):chunkSQHBOWES_cjs.K(t)}function Ce(e){return chunkSQHBOWES_cjs.P("SYMBOLIC_UNSUPPORTED_FUNCTION",`"${e}" cannot be applied to an expression that still contains an unknown.`)}function xi(e,t){let n=O(e),o=O(t);return n===null||o===null?Ce("^"):_(chunkWGP4UUO5_cjs.r(n,o))}function vi(e){let t=O(e);return t===null?Ce("-"):_({kind:"neg",operand:t})}function Ii(e,t){let n=[];for(let r of t){let i=chunkSQHBOWES_cjs.Q(r);if(i)return i;let a=O(r);if(a===null)return Ce(fn[e]??`builtin ${e}`);n.push(a);}if(e===Qo&&n.length===2)return _(chunkWGP4UUO5_cjs.r(n[0],n[1]));let o=fn[e];return o===void 0?Ce(`builtin ${e}`):_(chunkWGP4UUO5_cjs.s(o,n))}function zo(e){let t=_(e);return t.type===0&&!Number.isInteger(t.toNumber())?chunkSQHBOWES_cjs.K(e):t}function Jo(e){return e.im===0?chunkSQHBOWES_cjs.n(e.re):chunkSQHBOWES_cjs.K(chunkWGP4UUO5_cjs.w(chunkWGP4UUO5_cjs.o(chunkWGP4UUO5_cjs.d(e.re),chunkWGP4UUO5_cjs.d(e.im))))}function er(e){switch(e.kind){case "identity":return chunkSQHBOWES_cjs.t("true for every value");case "contradiction":return chunkSQHBOWES_cjs.t("no solution");case "unsupported":return chunkSQHBOWES_cjs.P("SYMBOLIC_SOLVE_UNSUPPORTED",`Cannot solve this equation: ${e.reason}.`);case "incomplete":{let t=e.exact.length+e.approximate.length;return chunkSQHBOWES_cjs.P("SYMBOLIC_SOLVE_INCOMPLETE",`Only ${t} of this equation's ${t+e.missing} roots could be found: ${e.reason}.`)}case "roots":{let t=e.exact.map(zo);for(let n of e.approximate)t.push(Jo(n));return t.length===0?chunkSQHBOWES_cjs.t("no solution"):t.length===1?t[0]:chunkSQHBOWES_cjs.C(1,t.length,t.map(n=>n.type===9?n.value:n.toNumber()))}}}function pn(e,t,n){let o=O(e),r=O(t);return o===null||r===null?chunkSQHBOWES_cjs.P("SYMBOLIC_NONFINITE_OPERAND","An equation side has no exact value to solve with."):er(mn(o,r,n))}function he(e,t){if(e.type===6&&t.type===6){if(e.unit===t.unit)return {lv:e.toNumber(),rv:t.toNumber(),unit:e.unit,sameMeasure:true};let n=chunkZKFCKAIX_cjs.c(e.unit),o=chunkZKFCKAIX_cjs.c(t.unit),r=chunkFYAMQFZZ_cjs.c.isCurrency(e.unit)&&chunkFYAMQFZZ_cjs.c.isCurrency(t.unit);if(n&&n===o){let i=chunkZKFCKAIX_cjs.e(t.toNumber(),t.unit,e.unit);return {lv:e.toNumber(),rv:i,unit:e.unit,sameMeasure:true}}if(r){let i=chunkFYAMQFZZ_cjs.c.convertSync(t.toNumber(),t.unit,e.unit);if(i!==null)return {lv:e.toNumber(),rv:i,unit:e.unit,sameMeasure:true}}return {lv:e.toNumber(),rv:t.toNumber(),unit:void 0,sameMeasure:false}}return e.type===6?{lv:e.toNumber(),rv:t.toNumber(),unit:e.unit,sameMeasure:true}:t.type===6?{lv:e.toNumber(),rv:t.toNumber(),unit:t.unit,sameMeasure:true}:{lv:e.toNumber(),rv:t.toNumber(),unit:void 0,sameMeasure:true}}var tr=1e-12;function nr(e,t,n){let o=0;return Number.isFinite(e)&&Math.abs(e)>o&&(o=Math.abs(e)),Number.isFinite(t)&&Math.abs(t)>o&&(o=Math.abs(t)),Number.isFinite(n)&&Math.abs(n)>o&&(o=Math.abs(n)),o}function Di(e,t){let{lv:n,rv:o,sameMeasure:r}=he(e,t);if(!r)return {lv:n,rv:o,equal:false,sameMeasure:false};if(e.type===6&&t.type===6&&e.unit!==void 0&&e.unit===t.unit&&e.exact!==void 0&&t.exact!==void 0&&chunkFYAMQFZZ_cjs.c.isCurrency(e.unit))return {lv:n,rv:o,equal:chunkWGP4UUO5_cjs.qa(e.exact,t.exact)===0,sameMeasure:true};if(n===o)return {lv:n,rv:o,equal:true,sameMeasure:true};if(!Number.isFinite(n)||!Number.isFinite(o))return {lv:n,rv:o,equal:false,sameMeasure:true};let i=nr(n,o,t.toNumber());return {lv:n,rv:o,equal:Math.abs(n-o)<=i*tr,sameMeasure:true}}var or={time:"duration",luminousIntensity:"luminous intensity"},rr=new Set(["money","data"]),ir={add:"added",sub:"subtracted",mul:"multiplied",div:"divided"};function Pe(e){if(chunkFYAMQFZZ_cjs.c.isCurrency(e))return "money";let t=chunkZKFCKAIX_cjs.c(e);if(t!==void 0)return or[t]??t}function bn(e){return rr.has(e)?e:/^[aeiou]/.test(e)?`an ${e}`:`a ${e}`}function Fe(e,t,n){let o=e===void 0?void 0:Pe(e),r=t===void 0?void 0:Pe(t);if(o!==void 0&&r!==void 0&&o!==r)return `${o} and ${r} cannot be ${n}`}function ar(e){return e!==void 0?ir[e]??"combined":"combined"}function Ci(e,t){let n=Pe(e),o=Pe(t);if(n!==void 0&&o!==void 0&&n!==o)return `${bn(n)} cannot be converted to ${bn(o)}`}function Pi(e,t){let n=e.type===6?e.unit:void 0,o=t.type===6?t.unit:void 0,r=Fe(n,o,"compared");return chunkSQHBOWES_cjs.P("INCOMPATIBLE_UNITS",r??`Cannot compare incompatible units: ${n??"?"} and ${o??"?"}`)}function yn(e){if(e.type===2)return e.value;let t=e.toNumber();if(!Number.isInteger(t)){let n=Number.isNaN(t)?"NaN":String(t);throw chunkYBQPEWT7_cjs.c.execution("BIGINT_INEXACT_OPERAND",`A whole-number (n) value can only be combined with another whole number, and ${n} is not one`,{operand:n})}return BigInt(t)}function Li(){return chunkYBQPEWT7_cjs.c.execution("BIGINT_DIVISION_BY_ZERO","Division by zero: a whole-number (n) division is exact integer division, which has no answer at zero, unlike 1 / 0 which is Infinity")}function Fi(e,t){let n=hn(e),o=hn(t);return n===null||o===null?null:n<o?-1:n>o?1:0}function hn(e){if(e.type===2)return e.value;let t=e.toNumber();return Number.isInteger(t)?BigInt(t):null}function et(e,t){return Number.isFinite(t)?Math.pow(e,t):e===1||e===-1&&!Number.isNaN(t)?1:Math.pow(e,t)}function Nn(e){return e.exact!==void 0?e.exact:chunkWGP4UUO5_cjs.ha(e.toNumber())}function ur(e,t,n){let o=e.type===6&&e.unit!==void 0&&e.exact!==void 0&&chunkFYAMQFZZ_cjs.c.isCurrency(e.unit),r=t.type===6&&t.unit!==void 0&&t.exact!==void 0&&chunkFYAMQFZZ_cjs.c.isCurrency(t.unit);if(!o&&!r)return null;let i,a,u;if(o&&r){if(e.unit!==t.unit||n==="div")return null;i=e.exact,a=t.exact,u=e.unit;}else if(o&&t.type!==6)i=e.exact,u=e.unit,a=Nn(t);else if(r&&e.type!==6)a=t.exact,u=t.unit,i=Nn(e);else return null;if(i===null||a===null)return null;let l;switch(n){case "add":l=chunkWGP4UUO5_cjs.ja(i,a);break;case "sub":l=chunkWGP4UUO5_cjs.ka(i,a);break;case "mul":l=chunkWGP4UUO5_cjs.la(i,a);break;case "div":if(chunkWGP4UUO5_cjs.na(a))return null;l=chunkWGP4UUO5_cjs.pa(i,a);break}return chunkSQHBOWES_cjs.v(chunkWGP4UUO5_cjs.ra(l),u,l)}function Le(e){return e.rational!==void 0?e.rational:(e.type===0||e.type===1)&&typeof e.value=="number"&&Number.isInteger(e.value)?chunkWGP4UUO5_cjs.c(BigInt(e.value)):null}function Ui(e,t,n){let o=Le(e);if(o===null)return null;let r=Le(t);if(r===null||n==="div"&&chunkWGP4UUO5_cjs.l(r))return null;let i;try{switch(n){case "add":i=chunkWGP4UUO5_cjs.f(o,r);break;case "sub":i=chunkWGP4UUO5_cjs.g(o,r);break;case "mul":i=chunkWGP4UUO5_cjs.h(o,r);break;case "div":i=chunkWGP4UUO5_cjs.i(o,r);break}}catch{return null}return chunkSQHBOWES_cjs.p(chunkWGP4UUO5_cjs.e(i),i)}function $i(e,t,n){if(e.type!==0||t.type!==0)return null;let o=e.value,r=t.value,i=e.uncertainty??0,a=t.uncertainty??0,u,l;switch(n){case "add":u=o+r,l=Math.hypot(i,a);break;case "sub":u=o-r,l=Math.hypot(i,a);break;case "mul":u=o*r,l=Math.hypot(r*i,o*a);break;case "div":u=o/r,l=Math.hypot(i/r,o*a/(r*r));break}return chunkSQHBOWES_cjs.q(u,l)}function Bi(e,t){let n=Le(e);if(n===null)return null;let o=Le(t);return o===null?null:chunkWGP4UUO5_cjs.k(n,o)}function qi(e,t,n,o,r){if(e.type===13)return e;if(t.type===13)return t;if(e.type===12)return e;if(t.type===12)return t;if(r&&(e.type===9||t.type===9)){let i=O(e),a=O(t);return i===null||a===null?chunkSQHBOWES_cjs.P("SYMBOLIC_NONFINITE_OPERAND","A symbolic expression cannot combine with a value that has no exact number (NaN or infinity)."):chunkSQHBOWES_cjs.K(chunkWGP4UUO5_cjs.Q({kind:r,left:i,right:a}))}if(e.type===0&&t.type===0)return chunkSQHBOWES_cjs.n(n(e.value,t.value));if(e.type===2||t.type===2){let i=yn(e),a=yn(t);return o?chunkSQHBOWES_cjs.s(o(i,a)):chunkSQHBOWES_cjs.s(i+a)}if(e.type===6||t.type===6){if(r){let s=ur(e,t,r);if(s)return s}let{lv:i,rv:a,unit:u,sameMeasure:l}=he(e,t);if(!l){let s=e.type===6?e.unit:void 0,p=t.type===6?t.unit:void 0,h=Fe(s,p,ar(r));return chunkSQHBOWES_cjs.P("INCOMPATIBLE_UNITS",h??`Cannot combine incompatible units: ${s??"?"} and ${p??"?"}`)}return chunkSQHBOWES_cjs.u(n(i,a),u)}if(e.type===7&&t.type===7){let i=e.value,a=t.value;if(!chunkWGP4UUO5_cjs.V(i,a))return chunkSQHBOWES_cjs.P("DIMENSION_MISMATCH",`Cannot combine matrices of different shapes: ${i.rows}x${i.cols} and ${a.rows}x${a.cols}`);let u=new Array(i.data.length);for(let l=0;l<i.data.length;l++)u[l]=n(i.data[l],a.data[l]);return chunkSQHBOWES_cjs.C(i.rows,i.cols,u)}if(e.type===7){let i=e.value,a=t.toNumber(),u=i.data.map(l=>n(l,a));return chunkSQHBOWES_cjs.C(i.rows,i.cols,u)}if(t.type===7){let i=t.value,a=e.toNumber(),u=i.data.map(l=>n(a,l));return chunkSQHBOWES_cjs.C(i.rows,i.cols,u)}return chunkSQHBOWES_cjs.n(n(e.toNumber(),t.toNumber()))}var gn=254,Rn=200,Ne=class{constructor(){this.handlers=new Map;this.nextOpcode=Rn+1;}register(t){this.handlers.set(t.opcode,t.handler);}unregister(t){this.handlers.delete(t);}get(t){return this.handlers.get(t)}has(t){return this.handlers.has(t)}allocateOpcode(){if(this.nextOpcode>gn)throw chunkYBQPEWT7_cjs.c.config("OPCODE_POOL_EXHAUSTED",`OpRegistry: dynamic opcode pool exhausted (max ${gn-Rn} allocations).`);return this.nextOpcode++}},ji=new Ne;var vn=chunkWGP4UUO5_cjs.ga(1);function ge(e,t){return chunkFYAMQFZZ_cjs.c.isCurrency(t)?e.exact??chunkWGP4UUO5_cjs.ha(e.toNumber()):null}function tt(e){if(!Number.isFinite(e))return null;if(Number.isInteger(e))return chunkWGP4UUO5_cjs.ga(BigInt(e));let t=String(e);return /^-?\d+\.\d+$/.test(t)?chunkWGP4UUO5_cjs.ia(t):null}function In(e,t,n){let o=ge(e,n),r=tt(t);if(o!==null&&r!==null){let i=chunkWGP4UUO5_cjs.la(o,r);return chunkSQHBOWES_cjs.v(chunkWGP4UUO5_cjs.ra(i),n,i)}return chunkSQHBOWES_cjs.u(e.toNumber()*t,n)}function Mn(e,t,n,o){let r=ge(e,t),i=tt(n);if(r!==null&&i!==null){let a=chunkWGP4UUO5_cjs.ja(vn,o===1?i:chunkWGP4UUO5_cjs.ma(i)),u=chunkWGP4UUO5_cjs.la(r,a);return chunkSQHBOWES_cjs.v(chunkWGP4UUO5_cjs.ra(u),t,u)}return chunkSQHBOWES_cjs.u(e.toNumber()*(1+o*n),t)}function Sn(e){let t=tt(e);return t===null?null:chunkWGP4UUO5_cjs.ja(vn,t)}function En(e,t,n){let o=ge(e,t),r=Sn(n);if(o===null||r===null||chunkWGP4UUO5_cjs.na(r))return null;let i=chunkWGP4UUO5_cjs.pa(o,r);return chunkSQHBOWES_cjs.v(chunkWGP4UUO5_cjs.ra(i),t,i)}function An(e,t,n){let o=ge(e,t),r=Sn(n);if(o===null||r===null||chunkWGP4UUO5_cjs.na(r))return null;let i=chunkWGP4UUO5_cjs.ka(o,chunkWGP4UUO5_cjs.pa(o,r));return chunkSQHBOWES_cjs.v(chunkWGP4UUO5_cjs.ra(i),t,i)}function kn(e,t){let n=e.unit,o=n!==void 0&&chunkFYAMQFZZ_cjs.c.isCurrency(n)?lr(e,n):null;if(o===null)return {unit:n,shares:[{value:e.toNumber()/t,count:t}]};let r=BigInt(t),i=o/r,a=o-i*r,u=Number(a<0n?-a:a),l=o<0n?-1n:1n,s=xn(i,t-u);return u===0?{unit:n,shares:[s]}:{unit:n,shares:[s,xn(i+l,u)]}}function xn(e,t){let n=chunkWGP4UUO5_cjs.fa(e,2);return {value:chunkWGP4UUO5_cjs.ra(n),exact:n,count:t}}function lr(e,t){let n=ge(e,t);return n===null?null:chunkWGP4UUO5_cjs.oa(n,2).coef}var sr=12;function Vn(e,t){if(e.length===0||t.length===0)return [];let n=new Array(e.length+t.length-1).fill(chunkWGP4UUO5_cjs.a);return e.forEach((o,r)=>{t.forEach((i,a)=>{n[r+a]=chunkWGP4UUO5_cjs.f(n[r+a],chunkWGP4UUO5_cjs.h(o,i));});}),n}function cr(e,t){let n=[chunkWGP4UUO5_cjs.b];for(let o=0;o<t;o++)n=Vn(n,e);return n}function nt(e,t){return e.map(n=>chunkWGP4UUO5_cjs.i(n,t))}function mr(e,t){let n=[],o=0;for(;o<e.length&&chunkWGP4UUO5_cjs.l(e[o]);)o++;o>0&&n.push({base:[chunkWGP4UUO5_cjs.a,chunkWGP4UUO5_cjs.b],power:o});let r=e.slice(o);if(r.length>1){let i=Qe([...r].reverse(),t);for(let a of i.factors){let u=chunkWGP4UUO5_cjs.C(a.base);if(u===null)return null;n.push({base:[...chunkWGP4UUO5_cjs.B(u,t)],power:a.power});}}return n.length>0?n:null}function fr(e){let t=[];return e.forEach((n,o)=>{let r=n.base.length-1;for(let i=1;i<=n.power;i++)for(let a=0;a<r;a++)t.push({factor:o,power:i,degree:a});}),t}function dr(e,t,n){let o=cr(t[e.factor].base,e.power),{quotient:r,remainder:i}=chunkWGP4UUO5_cjs.H(n,o);if(!chunkWGP4UUO5_cjs.G(i))return null;let a=new Array(e.degree).fill(chunkWGP4UUO5_cjs.a);return a.push(chunkWGP4UUO5_cjs.b),Vn(r,a)}function pr(e,t){let n=t.length;for(let o=0;o<n;o++){let r=-1;for(let i=o;i<n;i++)if(!chunkWGP4UUO5_cjs.l(e[i][o])){r=i;break}if(r===-1)return null;[e[o],e[r]]=[e[r],e[o]],[t[o],t[r]]=[t[r],t[o]];for(let i=0;i<n;i++){if(i===o||chunkWGP4UUO5_cjs.l(e[i][o]))continue;let a=chunkWGP4UUO5_cjs.i(e[i][o],e[o][o]);for(let u=o;u<n;u++)e[i][u]=chunkWGP4UUO5_cjs.g(e[i][u],chunkWGP4UUO5_cjs.h(a,e[o][u]));t[i]=chunkWGP4UUO5_cjs.g(t[i],chunkWGP4UUO5_cjs.h(a,t[o]));}}return t.map((o,r)=>chunkWGP4UUO5_cjs.i(o,e[r][r]))}function ot(e,t,n){if(t.length<2||t.length-1>sr)return null;let o=chunkWGP4UUO5_cjs.I(e,t),r=o.length>1?chunkWGP4UUO5_cjs.H(e,o).quotient:[...e],i=o.length>1?chunkWGP4UUO5_cjs.H(t,o).quotient:[...t];if(i.length===1)return {polynomial:nt(r,i[0]),terms:[]};if(i.length===0)return null;let a=i[i.length-1],u=nt(i,a),l=nt(r,a),{quotient:s,remainder:p}=chunkWGP4UUO5_cjs.H(l,u);if(chunkWGP4UUO5_cjs.G(p))return {polynomial:s,terms:[]};let h=mr(u,n);if(h===null)return null;let v=br(h,u,p);return v===null?null:{polynomial:s,terms:v}}function br(e,t,n){let o=fr(e),r=t.length-1;if(o.length!==r)return null;let i=[];for(let s of o){let p=dr(s,e,t);if(p===null)return null;i.push(p);}let a=[];for(let s=0;s<r;s++)a.push(i.map(p=>p[s]??chunkWGP4UUO5_cjs.a));let u=[];for(let s=0;s<r;s++)u.push(n[s]??chunkWGP4UUO5_cjs.a);let l=pr(a,u);return l===null?null:yr(o,l,e)}function yr(e,t,n){let o=new Map;e.forEach((i,a)=>{let u=`${i.factor}:${i.power}`,l=o.get(u)??[];l[i.degree]=t[a],o.set(u,l);});let r=[];for(let[i,a]of o){let[u,l]=i.split(":").map(Number),s=[...a].map(p=>p??chunkWGP4UUO5_cjs.a);s.every(chunkWGP4UUO5_cjs.l)||r.push({numerator:s,base:n[u].base,power:l});}return r}function Re(e,t){let n=new Map;return e.forEach((o,r)=>{chunkWGP4UUO5_cjs.l(o)||n.set(r===0?"":r===1?t:`${t}^${r}`,o);}),n.size===0?chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.a):chunkWGP4UUO5_cjs.E({terms:n,vars:e.length>1?[t]:[]})}function Tn(e){let t=rt(e);if(t===null)return e;let n=ot(t.numerator,t.denominator,t.variable);if(n===null||n.terms.length===0)return e;let o=n.polynomial.length>0?Re(n.polynomial,t.variable):null;for(let r of n.terms){let i=Re(r.base,t.variable),a=r.power===1?i:chunkWGP4UUO5_cjs.r(i,chunkWGP4UUO5_cjs.p({n:BigInt(r.power),d:1n})),u=hr(r.numerator),l=u?r.numerator.map(p=>chunkWGP4UUO5_cjs.j(p)):r.numerator,s={kind:"div",left:Re(l,t.variable),right:a};o===null?o=u?{kind:"neg",operand:s}:s:o={kind:u?"sub":"add",left:o,right:s};}return o===null?e:chunkWGP4UUO5_cjs.Q(o)}function hr(e){return e.some(t=>t.n<0n)&&e.every(t=>t.n<=0n)}function rt(e){if(e.kind!=="div")return null;let t=chunkWGP4UUO5_cjs.C(e.left),n=chunkWGP4UUO5_cjs.C(e.right);if(t===null||n===null)return null;let o=chunkWGP4UUO5_cjs.A(n);return o===null||t.vars.some(r=>r!==o)?null:{numerator:chunkWGP4UUO5_cjs.B(t,o),denominator:chunkWGP4UUO5_cjs.B(n,o),variable:o}}var it=16;function On(){return chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.a)}function X(){return chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.b)}function Nr(e,t){switch(e){case "sin":return chunkWGP4UUO5_cjs.s("cos",[t]);case "cos":return {kind:"neg",operand:chunkWGP4UUO5_cjs.s("sin",[t])};case "tan":return {kind:"div",left:X(),right:chunkWGP4UUO5_cjs.r(chunkWGP4UUO5_cjs.s("cos",[t]),chunkWGP4UUO5_cjs.p(2))};case "exp":return chunkWGP4UUO5_cjs.s("exp",[t]);case "log":return {kind:"div",left:X(),right:t};case "sqrt":return {kind:"div",left:X(),right:{kind:"mul",left:chunkWGP4UUO5_cjs.p(2),right:chunkWGP4UUO5_cjs.s("sqrt",[t])}};case "asin":return {kind:"div",left:X(),right:chunkWGP4UUO5_cjs.s("sqrt",[_n(t)])};case "acos":return {kind:"neg",operand:{kind:"div",left:X(),right:chunkWGP4UUO5_cjs.s("sqrt",[_n(t)])}};case "atan":return {kind:"div",left:X(),right:gr(t)};case "sinh":return chunkWGP4UUO5_cjs.s("cosh",[t]);case "cosh":return chunkWGP4UUO5_cjs.s("sinh",[t]);case "tanh":return {kind:"div",left:X(),right:chunkWGP4UUO5_cjs.r(chunkWGP4UUO5_cjs.s("cosh",[t]),chunkWGP4UUO5_cjs.p(2))};case "abs":return chunkWGP4UUO5_cjs.s("sign",[t]);default:return null}}function _n(e){return {kind:"sub",left:X(),right:chunkWGP4UUO5_cjs.r(e,chunkWGP4UUO5_cjs.p(2))}}function gr(e){return {kind:"add",left:X(),right:chunkWGP4UUO5_cjs.r(e,chunkWGP4UUO5_cjs.p(2))}}function xe(e,t,n=1){if(n<0||!Number.isInteger(n))throw chunkYBQPEWT7_cjs.c.execution("SYMBOLIC_DERIVATIVE_ORDER_LIMIT","A derivative order must be a whole number, at least zero.");if(n>it)throw chunkYBQPEWT7_cjs.c.execution("SYMBOLIC_DERIVATIVE_ORDER_LIMIT",`A derivative order above ${it} is not supported.`,{limit:it});let o=chunkWGP4UUO5_cjs.Q(e);for(let r=0;r<n;r++)o=chunkWGP4UUO5_cjs.Q(P(o,t));return o}function P(e,t){switch(e.kind){case "const":case "complex":return On();case "var":return e.name===t?X():On();case "add":return {kind:"add",left:P(e.left,t),right:P(e.right,t)};case "sub":return {kind:"sub",left:P(e.left,t),right:P(e.right,t)};case "neg":return {kind:"neg",operand:P(e.operand,t)};case "mul":return {kind:"add",left:{kind:"mul",left:P(e.left,t),right:e.right},right:{kind:"mul",left:e.left,right:P(e.right,t)}};case "div":return {kind:"div",left:{kind:"sub",left:{kind:"mul",left:P(e.left,t),right:e.right},right:{kind:"mul",left:e.left,right:P(e.right,t)}},right:chunkWGP4UUO5_cjs.r(e.right,chunkWGP4UUO5_cjs.p(2))};case "pow":return Rr(e,t);case "call":{if(e.args.length!==1)return at(e,t);let n=Nr(e.name,e.args[0]);return n===null?at(e,t):{kind:"mul",left:n,right:P(e.args[0],t)}}}}function Rr(e,t){if(e.exponent.kind==="const"){let n=chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.g(e.exponent.value,chunkWGP4UUO5_cjs.b));return {kind:"mul",left:{kind:"mul",left:e.exponent,right:chunkWGP4UUO5_cjs.r(e.base,n)},right:P(e.base,t)}}return e.base.kind==="const"&&e.base.value.n>0n?{kind:"mul",left:{kind:"mul",left:e,right:chunkWGP4UUO5_cjs.s("log",[e.base])},right:P(e.exponent,t)}:at(e,t)}function at(e,t){return chunkWGP4UUO5_cjs.s("der",[e,chunkWGP4UUO5_cjs.q(t)])}function wn(e,t){let n=chunkWGP4UUO5_cjs.C(e);if(n===null||n.vars.filter(u=>u!==t).length>0||chunkWGP4UUO5_cjs.z(n,t)>1)return null;let r=chunkWGP4UUO5_cjs.B(n,t),i=r[0]??{n:0n,d:1n},a=r[1]??{n:0n,d:1n};return chunkWGP4UUO5_cjs.l(a)?null:{slope:a,intercept:i}}function xr(e,t){let n=chunkWGP4UUO5_cjs.C(e);if(n===null)return null;let o=n.vars.filter(a=>a!==t);if(o.length>0)return {ok:false,reason:`it involves more than one unknown (${o.join(", ")})`};let r=chunkWGP4UUO5_cjs.B(n,t),i=chunkWGP4UUO5_cjs.p(0);return r.forEach((a,u)=>{if(chunkWGP4UUO5_cjs.l(a))return;let l=u+1,s=chunkWGP4UUO5_cjs.i(a,{n:BigInt(l),d:1n}),p={kind:"mul",left:chunkWGP4UUO5_cjs.p(s),right:l===1?chunkWGP4UUO5_cjs.q(t):chunkWGP4UUO5_cjs.r(chunkWGP4UUO5_cjs.q(t),chunkWGP4UUO5_cjs.p(l))};i={kind:"add",left:i,right:p};}),{ok:true,value:chunkWGP4UUO5_cjs.Q(i)}}function vr(e,t){if(e.kind!=="call"||e.args.length!==1)return null;let n=wn(e.args[0],t);if(n===null)return null;let o=e.args[0],r=i=>chunkWGP4UUO5_cjs.Q({kind:"div",left:i,right:chunkWGP4UUO5_cjs.p(n.slope)});switch(e.name){case "exp":return {ok:true,value:r(chunkWGP4UUO5_cjs.s("exp",[o]))};case "sin":return {ok:true,value:r({kind:"neg",operand:chunkWGP4UUO5_cjs.s("cos",[o])})};case "cos":return {ok:true,value:r(chunkWGP4UUO5_cjs.s("sin",[o]))};case "log":return {ok:true,value:r({kind:"sub",left:{kind:"mul",left:o,right:chunkWGP4UUO5_cjs.s("log",[o])},right:o})};default:return null}}function Ir(e,t){if(e.kind!=="div"||e.left.kind!=="const"||!ut(e.left.value))return null;let n=wn(e.right,t);if(n!==null)return {ok:true,value:chunkWGP4UUO5_cjs.Q({kind:"div",left:chunkWGP4UUO5_cjs.s("log",[e.right]),right:chunkWGP4UUO5_cjs.p(n.slope)})};let o=chunkWGP4UUO5_cjs.C(e.right);if(o!==null&&o.vars.length===1&&o.vars[0]===t){let r=chunkWGP4UUO5_cjs.B(o,t);if(r.length===3&&ut(r[0])&&chunkWGP4UUO5_cjs.l(r[1])&&ut(r[2]))return {ok:true,value:chunkWGP4UUO5_cjs.s("atan",[chunkWGP4UUO5_cjs.q(t)])}}return null}function ut(e){return e.n===1n&&e.d===1n}function Mr(e,t){let n=rt(e);if(n===null||n.variable!==t)return null;let o=ot(n.numerator,n.denominator,t);if(o===null)return null;let r=o.polynomial.length>0?Ar(o.polynomial,t):chunkWGP4UUO5_cjs.p(0);for(let i of o.terms){let a=Sr(i,t);if(a===null)return {ok:false,reason:"its denominator has a repeated irreducible quadratic factor, which needs a reduction formula this does not have"};r={kind:"add",left:r,right:a};}return {ok:true,value:chunkWGP4UUO5_cjs.Q(r)}}function Sr(e,t){let n=e.base.length-1,o=Re(e.base,t);if(n===1){let r=e.numerator[0]??chunkWGP4UUO5_cjs.a;if(e.power===1)return {kind:"mul",left:chunkWGP4UUO5_cjs.p(r),right:chunkWGP4UUO5_cjs.s("log",[o])};let i=e.power-1,a=chunkWGP4UUO5_cjs.i(r,{n:BigInt(-i),d:1n});return {kind:"div",left:chunkWGP4UUO5_cjs.p(a),right:chunkWGP4UUO5_cjs.r(o,chunkWGP4UUO5_cjs.p({n:BigInt(i),d:1n}))}}return n!==2||e.power!==1?null:Er(e,t,o)}function Er(e,t,n){let o=e.numerator[0]??chunkWGP4UUO5_cjs.a,r=e.numerator[1]??chunkWGP4UUO5_cjs.a,[i,a]=e.base,u={n:1n,d:2n},l=chunkWGP4UUO5_cjs.h(a,u),s={kind:"mul",left:chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.h(r,u)),right:chunkWGP4UUO5_cjs.s("log",[n])},p=chunkWGP4UUO5_cjs.g(o,chunkWGP4UUO5_cjs.h(r,l));if(chunkWGP4UUO5_cjs.l(p))return s;let h=chunkWGP4UUO5_cjs.O(chunkWGP4UUO5_cjs.g(i,chunkWGP4UUO5_cjs.h(l,l))),v={kind:"add",left:chunkWGP4UUO5_cjs.q(t),right:chunkWGP4UUO5_cjs.p(l)},V={kind:"mul",left:{kind:"div",left:chunkWGP4UUO5_cjs.p(p),right:h},right:chunkWGP4UUO5_cjs.s("atan",[{kind:"div",left:v,right:h}])};return chunkWGP4UUO5_cjs.l(r)?V:{kind:"add",left:s,right:V}}function Ar(e,t){let n=chunkWGP4UUO5_cjs.p(0);return e.forEach((o,r)=>{if(chunkWGP4UUO5_cjs.l(o))return;let i=r+1,a=chunkWGP4UUO5_cjs.i(o,{n:BigInt(i),d:1n}),u={kind:"mul",left:chunkWGP4UUO5_cjs.p(a),right:i===1?chunkWGP4UUO5_cjs.q(t):chunkWGP4UUO5_cjs.r(chunkWGP4UUO5_cjs.q(t),chunkWGP4UUO5_cjs.p(i))};n={kind:"add",left:n,right:u};}),n}function ve(e,t){let n=chunkWGP4UUO5_cjs.Q(e);if(!chunkWGP4UUO5_cjs.u(n).has(t))return {ok:true,value:chunkWGP4UUO5_cjs.Q({kind:"mul",left:n,right:chunkWGP4UUO5_cjs.q(t)})};let o=xr(n,t);if(o!==null)return o;let r=vr(n,t);if(r!==null)return r;let i=Ir(n,t);if(i!==null)return i;let a=Mr(n,t);if(a!==null)return a;if(n.kind==="add"||n.kind==="sub"){let u=ve(n.left,t);if(!u.ok)return u;let l=ve(n.right,t);return l.ok?{ok:true,value:chunkWGP4UUO5_cjs.Q({kind:n.kind,left:u.value,right:l.value})}:l}if(n.kind==="mul"&&n.left.kind==="const"){let u=ve(n.right,t);return u.ok?{ok:true,value:chunkWGP4UUO5_cjs.Q({kind:"mul",left:n.left,right:u.value})}:u}return {ok:false,reason:"no elementary antiderivative is known for this expression"}}var lt=16;function Dn(e,t,n,o){if(o<0||!Number.isInteger(o)||o>lt)throw chunkYBQPEWT7_cjs.c.execution("SYMBOLIC_TAYLOR_DEGREE_LIMIT",`A Taylor degree must be a whole number from 0 to ${lt}.`,{limit:lt});let r=chunkWGP4UUO5_cjs.p(n),i=1n,a=chunkWGP4UUO5_cjs.p(chunkWGP4UUO5_cjs.a);for(let u=0;u<=o;u++){u>0&&(i*=BigInt(u));let l=xe(e,t,u),s=chunkWGP4UUO5_cjs.Q(chunkWGP4UUO5_cjs.v(l,t,r));if(s.kind!=="const")throw chunkYBQPEWT7_cjs.c.execution("SYMBOLIC_TAYLOR_INEXACT",`The derivative of order ${u} does not reduce to an exact number at the expansion point, so this series cannot be computed exactly.`,{order:u});let p=chunkWGP4UUO5_cjs.i(s.value,{n:i,d:1n});if(chunkWGP4UUO5_cjs.l(p))continue;let h=chunkWGP4UUO5_cjs.l(n)?chunkWGP4UUO5_cjs.q(t):{kind:"sub",left:chunkWGP4UUO5_cjs.q(t),right:r},v=u===0?chunkWGP4UUO5_cjs.p(1):u===1?h:chunkWGP4UUO5_cjs.r(h,chunkWGP4UUO5_cjs.p(u));a={kind:"add",left:a,right:{kind:"mul",left:chunkWGP4UUO5_cjs.p(p),right:v}};}return chunkWGP4UUO5_cjs.Q(a)}function Cn(e,t){return e.map(n=>t.map(o=>xe(n,o)))}function kr(e={}){return {pluginFunctions:{},opRegistry:new Ne,pluginFunctionOwners:{},networkEnabled:e.networkEnabled??true}}var Pn=kr();var Vr={1970:38.8,1971:40.5,1972:41.8,1973:44.4,1974:49.3,1975:53.8,1976:56.9,1977:60.6,1978:65.2,1979:72.6,1980:82.4,1981:90.9,1982:96.5,1983:99.6,1984:103.9,1985:107.6,1986:109.6,1987:113.6,1988:118.3,1989:124,1990:130.7,1991:136.2,1992:140.3,1993:144.5,1994:148.2,1995:152.4,1996:156.9,1997:160.5,1998:163,1999:166.6,2e3:172.2,2001:177.1,2002:179.9,2003:184,2004:188.9,2005:195.3,2006:201.6,2007:207.3,2008:215.3,2009:214.5,2010:218.1,2011:224.9,2012:229.6,2013:233,2014:236.7,2015:237,2016:240,2017:245.1,2018:251.1,2019:255.7,2020:258.8,2021:271,2022:292.7,2023:304.7,2024:313.7,2025:322.2,2026:332.7},Fn=1970,Un=2026;function Ln(e){return Vr[Math.trunc(e)]}function st(e,t){let n=Ln(e),o=Ln(t);if(!(n===void 0||o===void 0||n===0))return o/n}function Sa(e,t,n){let o=st(t,n);if(o!==void 0)return e*o}function Tr(e){let t=Math.abs(e);return t<60?chunkSQHBOWES_cjs.u(e,"s"):t<3600?chunkSQHBOWES_cjs.u(e/60,"min"):t<86400?chunkSQHBOWES_cjs.u(e/3600,"h"):chunkSQHBOWES_cjs.u(e/86400,"d")}var Or=0;function ct(e){if(e.type===6&&e.unit!==void 0){let t=chunkEZKR44MA_cjs.a[e.unit.toLowerCase()];if(t!==void 0&&t[0]===Or)return e.toNumber()*t[1]}return e.toNumber()}function _r(e,t){if(t===1)return e;let n=`${e}s`;return chunkEZKR44MA_cjs.a[n.toLowerCase()]===void 0?e:n}function $n(e,t){let n,o=false;for(let r of e){if(Number.isNaN(r.toNumber())){o=true;continue}if(n===void 0){n=r;continue}let{lv:i,rv:a,sameMeasure:u}=he(n,r);if(!u){let l=n.type===6?n.unit:void 0,s=r.type===6?r.unit:void 0,p=Fe(l,s,"compared");return chunkSQHBOWES_cjs.P("INCOMPATIBLE_UNITS",p??`Cannot compare incompatible units: ${l??"?"} and ${s??"?"}`)}(t?a>i:a<i)&&(n=r);}return o?chunkSQHBOWES_cjs.n(NaN):n===void 0?chunkSQHBOWES_cjs.n(t?-1/0:1/0):n.type===6?n:chunkSQHBOWES_cjs.n(n.toNumber())}function Ue(e,t){return e.type===6&&e.unit!==void 0?chunkSQHBOWES_cjs.u(t,e.unit):chunkSQHBOWES_cjs.n(t)}function Bn(e,t){let n=Number.isFinite(t)?Math.min(100,Math.max(0,Math.trunc(t))):0;if(e.exact!==void 0){let a=chunkWGP4UUO5_cjs.oa(e.exact,n);return $e(e,chunkWGP4UUO5_cjs.ra(a),n,a)}let o=e.toNumber();if(!Number.isFinite(o))return $e(e,o,n);let r=Math.pow(10,n),i=o*r;return !Number.isFinite(i)||Math.abs(i)>Number.MAX_SAFE_INTEGER?$e(e,o,n):$e(e,Math.round(i)/r,n)}function $e(e,t,n,o){let r=e.type===6&&e.unit!==void 0?chunkSQHBOWES_cjs.u(t,e.unit):chunkSQHBOWES_cjs.n(t);return r.decimalPlaces=n,o!==void 0&&(r.exact=o),r}function qn(e,t,n){if(Number.isFinite(e)&&Number.isFinite(t))return null;let o=Number.isFinite(e)?t:e;return chunkSQHBOWES_cjs.P("INVALID_INTEGER_OPERAND",`${n} needs two whole numbers, and ${Number.isNaN(o)?"one of them has no value":"one of them is infinite"}`)}function Yn(e,t){let n=e,o=t;for(;o!==0;){let r=o;o=n%o,n=r;}return n}function wr(e){let t=e.length;if(t===0)return 0;let n=e.reduce((o,r)=>o+r,0)/t;return e.reduce((o,r)=>o+(r-n)*(r-n),0)}function Be(e,t){let n=e.length;if(n===0)return 0;let o=t?n-1:n;return o<=0?0:wr(e)/o}var Za={0:e=>{let t=e[0].toNumber();return t>=0?chunkSQHBOWES_cjs.n(Math.sqrt(t)):_(chunkWGP4UUO5_cjs.s("sqrt",[chunkWGP4UUO5_cjs.p(t)]))},1:e=>e[0].type===7?chunkWGP4UUO5_cjs.ca(e[0].value):Ue(e[0],Math.abs(e[0].toNumber())),2:e=>chunkSQHBOWES_cjs.n(Math.sin(ct(e[0]))),3:e=>chunkSQHBOWES_cjs.n(Math.cos(ct(e[0]))),4:e=>chunkSQHBOWES_cjs.n(Math.tan(ct(e[0]))),5:e=>chunkSQHBOWES_cjs.n(Math.log(e[0].toNumber())),6:e=>Ue(e[0],Math.ceil(e[0].toNumber())),7:e=>Ue(e[0],Math.floor(e[0].toNumber())),8:e=>e.length>=2?Bn(e[0],e[1].toNumber()):Ue(e[0],Math.round(e[0].toNumber())),9:e=>$n(e,false),10:e=>$n(e,true),11:e=>chunkSQHBOWES_cjs.n(Math.asin(e[0].toNumber())),12:e=>chunkSQHBOWES_cjs.n(Math.acos(e[0].toNumber())),13:e=>chunkSQHBOWES_cjs.n(Math.atan(e[0].toNumber())),14:e=>chunkSQHBOWES_cjs.n(Math.atan2(e[0].toNumber(),e[1].toNumber())),15:e=>chunkSQHBOWES_cjs.n(Math.sinh(e[0].toNumber())),16:e=>chunkSQHBOWES_cjs.n(Math.cosh(e[0].toNumber())),17:e=>chunkSQHBOWES_cjs.n(Math.tanh(e[0].toNumber())),18:e=>chunkSQHBOWES_cjs.n(Math.asinh(e[0].toNumber())),19:e=>chunkSQHBOWES_cjs.n(Math.acosh(e[0].toNumber())),20:e=>chunkSQHBOWES_cjs.n(Math.atanh(e[0].toNumber())),21:e=>chunkSQHBOWES_cjs.n(Math.cbrt(e[0].toNumber())),22:e=>chunkSQHBOWES_cjs.n(Math.clz32(e[0].toNumber())),23:e=>chunkSQHBOWES_cjs.n(Math.expm1(e[0].toNumber())),24:e=>chunkSQHBOWES_cjs.n(Math.exp(e[0].toNumber())),25:e=>chunkSQHBOWES_cjs.n(Math.fround(e[0].toNumber())),26:e=>chunkSQHBOWES_cjs.n(Math.hypot(...e.map(t=>t.toNumber()))),27:e=>chunkSQHBOWES_cjs.n(Math.imul(e[0].toNumber(),e[1].toNumber())),28:e=>chunkSQHBOWES_cjs.n(Math.log10(e[0].toNumber())),29:e=>chunkSQHBOWES_cjs.n(Math.log1p(e[0].toNumber())),30:e=>chunkSQHBOWES_cjs.n(Math.log2(e[0].toNumber())),31:e=>e[0].type===7?e[1].type!==0?chunkSQHBOWES_cjs.P("MATRIX_POWER_UNSUPPORTED",`pow: a matrix's exponent must be a whole number, as in "pow([1,2;3,4], 2)".`):chunkWGP4UUO5_cjs.$(e[0].value,e[1].value):e[1].type===7?chunkSQHBOWES_cjs.P("MATRIX_POWER_UNSUPPORTED",'pow: a matrix may only be the base, as in "pow([1,2;3,4], 2)".'):chunkSQHBOWES_cjs.n(et(e[0].toNumber(),e[1].toNumber())),32:()=>chunkSQHBOWES_cjs.n(Math.random()),33:e=>chunkSQHBOWES_cjs.n(Math.sign(e[0].toNumber())),34:e=>chunkSQHBOWES_cjs.n(Math.trunc(e[0].toNumber())),35:e=>chunkSQHBOWES_cjs.n(e[0].toNumber()*Math.PI/180),36:e=>chunkSQHBOWES_cjs.n(e[0].toNumber()*180/Math.PI),37:e=>{let t=e[0].toNumber(),n=e[1].toNumber();return t>n?chunkSQHBOWES_cjs.P("INVALID_RANGE",`roll: invalid range, ${t} is greater than ${n}`):chunkSQHBOWES_cjs.n(Math.floor(Math.random()*(n-t+1))+t)},38:e=>{let t=Math.trunc(Math.abs(e[0].toNumber())),n=Math.trunc(Math.abs(e[1].toNumber())),o=qn(t,n,"gcd");return o||chunkSQHBOWES_cjs.n(Yn(t,n))},39:e=>{let t=Math.trunc(Math.abs(e[0].toNumber())),n=Math.trunc(Math.abs(e[1].toNumber())),o=qn(t,n,"lcm");return o||(t===0||n===0?chunkSQHBOWES_cjs.n(0):chunkSQHBOWES_cjs.n(t/Yn(t,n)*n))},40:e=>{let t=Math.trunc(e[0].toNumber()),n=Math.trunc(e[1].toNumber());if(t<0||n<0||n>t)return chunkSQHBOWES_cjs.P("INVALID_RANGE",`permutation: invalid n=${t}, r=${n} (require 0 <= r <= n)`);let o=1;for(let r=0;r<n;r++)if(o*=t-r,!Number.isFinite(o))return chunkSQHBOWES_cjs.P("PERMUTATION_OVERFLOW",`permutation: P(${t}, ${n}) exceeds the maximum representable double (it passed it after ${r+1} of ${n} factors)`);return chunkSQHBOWES_cjs.n(o)},41:e=>{let t=Math.trunc(e[0].toNumber()),n=Math.trunc(e[1].toNumber());if(t<0||n<0||n>t)return chunkSQHBOWES_cjs.P("INVALID_RANGE",`combination: invalid n=${t}, r=${n} (require 0 <= r <= n)`);let o=Math.min(n,t-n),r=1;for(let i=0;i<o;i++)if(r=r*(t-i)/(i+1),!Number.isFinite(r))return chunkSQHBOWES_cjs.P("COMBINATION_OVERFLOW",`combination: C(${t}, ${n}) exceeds the maximum representable double (it passed it after ${i+1} of ${o} steps)`);return chunkSQHBOWES_cjs.n(Math.round(r))},42:e=>{if(e.length===0)return chunkSQHBOWES_cjs.n(0);let t=e.reduce((n,o)=>n+o.toNumber(),0);return chunkSQHBOWES_cjs.n(t/e.length)},43:e=>{if(e.length===0)return chunkSQHBOWES_cjs.n(0);let t=e.map(o=>o.toNumber()).sort((o,r)=>o-r),n=Math.floor(t.length/2);return chunkSQHBOWES_cjs.n(t.length%2===0?(t[n-1]+t[n])/2:t[n])},44:e=>chunkSQHBOWES_cjs.n(e.reduce((t,n)=>t+n.toNumber(),0)),45:e=>chunkSQHBOWES_cjs.n(e.length),46:e=>{let[t,n,o]=e,{lv:r,rv:i}=he(t,n);if(r===0)return chunkSQHBOWES_cjs.P("PROPORTION_DIVIDE_BY_ZERO",`Cannot compute proportion: "${t.value}" is zero`);let a=o.toNumber()*(i/r);return o.type===6?chunkSQHBOWES_cjs.u(a,o.unit):chunkSQHBOWES_cjs.n(a)},47:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),o=e[2].toNumber();return n>o?chunkSQHBOWES_cjs.P("INVALID_RANGE",`clamp: invalid range, ${n} is greater than ${o}`):chunkSQHBOWES_cjs.n(Math.min(Math.max(t,n),o))},48:e=>chunkSQHBOWES_cjs.r(e[0].toNumber()),49:e=>chunkSQHBOWES_cjs.r(e[0].toNumber(),"bin"),50:e=>chunkSQHBOWES_cjs.n(Math.trunc(e[0].toNumber())),51:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),o=e[2].toNumber();if(1+n<=0)return chunkSQHBOWES_cjs.P("INVALID_RATE",`compoundInterest: rate ${n} makes (1 + rate) non-positive`);let r=t*Math.pow(1+n,o);return e[0].type===6?chunkSQHBOWES_cjs.u(r,e[0].unit):chunkSQHBOWES_cjs.n(r)},52:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),o=e[2].toNumber();if(1+n<=0)return chunkSQHBOWES_cjs.P("INVALID_RATE",`interestEarned: rate ${n} makes (1 + rate) non-positive`);let r=t*(Math.pow(1+n,o)-1);return e[0].type===6?chunkSQHBOWES_cjs.u(r,e[0].unit):chunkSQHBOWES_cjs.n(r)},53:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),o=e[2].toNumber();return t<=0||n<=0?chunkSQHBOWES_cjs.P("INVALID_RANGE","compoundInterestRate: principal and futureValue must both be positive"):o<=0?chunkSQHBOWES_cjs.P("INVALID_RANGE","compoundInterestRate: years must be greater than 0"):chunkSQHBOWES_cjs.n(Math.pow(n/t,1/o)-1)},54:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),o=e[2].toNumber();return t<=0||n<=0?chunkSQHBOWES_cjs.P("INVALID_RANGE","compoundInterestYears: principal and futureValue must both be positive"):1+o<=0||o===0?chunkSQHBOWES_cjs.P("INVALID_RATE",`compoundInterestYears: rate ${o} is not usable (must be > -1 and not 0)`):chunkSQHBOWES_cjs.n(Math.log(n/t)/Math.log(1+o))},55:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),o=e[2].toNumber(),r=e[3].toNumber();if(t<=0)return chunkSQHBOWES_cjs.P("INVALID_RANGE","loanRepayment: principal must be positive");if(o<=0)return chunkSQHBOWES_cjs.P("INVALID_RANGE","loanRepayment: years must be positive");if(n<0)return chunkSQHBOWES_cjs.P("INVALID_RATE","loanRepayment: rate must not be negative");if(r<0)return chunkSQHBOWES_cjs.P("INVALID_RANGE","loanRepayment: periodsPerYear must not be negative");let{totalRepayment:i}=dt(t,n,o),a=r===0?i:i/(o*r);return e[0].type===6?chunkSQHBOWES_cjs.u(a,e[0].unit):chunkSQHBOWES_cjs.n(a)},56:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),o=e[2].toNumber(),r=e[3].toNumber();if(t<=0)return chunkSQHBOWES_cjs.P("INVALID_RANGE","loanInterest: principal must be positive");if(o<=0)return chunkSQHBOWES_cjs.P("INVALID_RANGE","loanInterest: years must be positive");if(n<0)return chunkSQHBOWES_cjs.P("INVALID_RATE","loanInterest: rate must not be negative");if(r<0)return chunkSQHBOWES_cjs.P("INVALID_RANGE","loanInterest: periodsPerYear must not be negative");let{totalInterest:i}=dt(t,n,o),a=r===0?i:i/(o*r);return e[0].type===6?chunkSQHBOWES_cjs.u(a,e[0].unit):chunkSQHBOWES_cjs.n(a)},57:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),o=e[2].toNumber();if(t<=0)return chunkSQHBOWES_cjs.P("INVALID_RANGE","monthlyPayment: principal must be positive");if(o<=0)return chunkSQHBOWES_cjs.P("INVALID_RANGE","monthlyPayment: years must be positive");if(n<0)return chunkSQHBOWES_cjs.P("INVALID_RATE","monthlyPayment: rate must not be negative");let{monthlyPayment:r}=dt(t,n,o);return e[0].type===6?chunkSQHBOWES_cjs.u(r,e[0].unit):chunkSQHBOWES_cjs.n(r)},58:e=>{let t=e[0].toNumber(),n=e[1].toNumber();return e[0].type===6?Mn(e[0],e[0].unit,n,1):chunkSQHBOWES_cjs.n(t*(1+n))},59:e=>{let t=e[0].toNumber(),n=e[1].toNumber();return 1+n<=0?chunkSQHBOWES_cjs.P("INVALID_RATE",`taxRemove: rate ${n} makes (1 + rate) non-positive`):e[0].type===6?En(e[0],e[0].unit,n)??chunkSQHBOWES_cjs.u(t/(1+n),e[0].unit):chunkSQHBOWES_cjs.n(t/(1+n))},60:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),o=e[2].toNumber(),r=st(n,o);if(r===void 0)return chunkSQHBOWES_cjs.P("INFLATION_YEAR_OUT_OF_RANGE",`inflationAdjust: fromYear ${n} or toYear ${o} is outside the bundled CPI table's range (${Fn}-${Un})`);let i=t*r;return e[0].type===6?chunkSQHBOWES_cjs.u(i,e[0].unit):chunkSQHBOWES_cjs.n(i)},61:e=>{let t=e[0].toNumber(),n=e[1].toNumber();return chunkSQHBOWES_cjs.n(et(n,1/t))},62:e=>{let t=e[0].toNumber();if(!Number.isInteger(t)||t<0)return chunkSQHBOWES_cjs.P("INVALID_FACTORIAL_INPUT",`fact: ${t} is not a non-negative integer`);if(t>170)return chunkSQHBOWES_cjs.P("FACTORIAL_OVERFLOW",`fact: ${t}! exceeds the maximum representable double (170! is the largest finite factorial)`);let n=1;for(let o=2;o<=t;o++)n*=o;return chunkSQHBOWES_cjs.n(n)},63:e=>e[0].type===7?chunkWGP4UUO5_cjs.ba(e[0].value):e[0],64:e=>e[0].type===7?chunkWGP4UUO5_cjs.ca(e[0].value):chunkSQHBOWES_cjs.n(e[0].toNumber()),65:e=>e[0].type===7?chunkWGP4UUO5_cjs.da(e[0].value):chunkSQHBOWES_cjs.n(1/e[0].toNumber()),66:e=>{let[t,n]=e;if(t.type===0&&n.type===0)return chunkSQHBOWES_cjs.n(t.toNumber()*n.toNumber());let o=r=>r.type===7?r.value:{rows:1,cols:1,data:[r.toNumber()],hasSymbolic:false};return chunkWGP4UUO5_cjs._(o(t),o(n))},67:e=>{let[t]=e;return t.type!==9?t:_(chunkWGP4UUO5_cjs.F(t.value))},68:e=>{let[t]=e;return t.type!==9?t:_(en(t.value))},69:e=>{let[t,n,o]=e;return o?.type!==3?chunkSQHBOWES_cjs.P("SOLVE_REQUIRES_VARIABLE_NAME","solve's second argument must be the name of the unknown."):pn(t,n,o.value)},70:e=>{let[t,n,o]=e,r=ft(n,"der");if(typeof r!="string")return r;let i=O(t);return i===null?chunkSQHBOWES_cjs.P("SYMBOLIC_NONFINITE_OPERAND","der needs an expression with an exact value."):_(xe(i,r,o?.toNumber()??1))},71:e=>{let[t,n]=e,o=ft(n,"integral");if(typeof o!="string")return o;let r=O(t);if(r===null)return chunkSQHBOWES_cjs.P("SYMBOLIC_NONFINITE_OPERAND","integral needs an expression with an exact value.");let i=ve(r,o);return i.ok?_(i.value):chunkSQHBOWES_cjs.P("SYMBOLIC_INTEGRAL_UNSUPPORTED",`Cannot integrate this: ${i.reason}.`)},72:e=>{let[t,n,o,r]=e,i=ft(n,"taylor");if(typeof i!="string")return i;let a=O(t),u=O(o);return a===null||u===null||u.kind!=="const"?chunkSQHBOWES_cjs.P("SYMBOLIC_NONFINITE_OPERAND","taylor needs an expression and an exact expansion point."):_(Dn(a,i,u.value,r.toNumber()))},73:e=>{let t=[];for(let a of e){let u=O(a);if(u===null)return chunkSQHBOWES_cjs.P("SYMBOLIC_NONFINITE_OPERAND","jacobian needs expressions with exact values.");t.push(u);}let n=new Set;for(let a of t)for(let u of chunkWGP4UUO5_cjs.u(a))n.add(u);let o=[...n].sort();if(o.length===0)return chunkSQHBOWES_cjs.P("SYMBOLIC_JACOBIAN_NO_VARIABLES","jacobian needs at least one unknown to differentiate against.");let r=Cn(t,o),i=[];for(let a of r)for(let u of a)i.push(chunkWGP4UUO5_cjs.W(u));return chunkSQHBOWES_cjs.C(r.length,o.length,chunkWGP4UUO5_cjs.Y(r.length,o.length,i))},74:e=>_(chunkWGP4UUO5_cjs.w(chunkWGP4UUO5_cjs.o(chunkWGP4UUO5_cjs.a,chunkWGP4UUO5_cjs.d(e[0].toNumber())))),75:e=>mt("conj",e[0]),76:e=>mt("re",e[0]),77:e=>mt("im",e[0]),78:e=>{let t=e[0];return t.type!==9?t:_(chunkWGP4UUO5_cjs.J(t.value))},79:e=>{let t=e[0];return t.type!==9?t:_(Tn(t.value))},85:e=>{let t=e[0].toNumber(),n=e[1].toNumber();if(1+n<=0)return chunkSQHBOWES_cjs.P("INVALID_RATE",`taxIn: rate ${n} makes (1 + rate) non-positive`);let o=t-t/(1+n);return e[0].type===6?An(e[0],e[0].unit,n)??chunkSQHBOWES_cjs.u(o,e[0].unit):chunkSQHBOWES_cjs.n(o)},86:e=>{let t=e[0].toNumber(),n=e[1].toNumber();return e[0].type===6?In(e[0],n,e[0].unit):chunkSQHBOWES_cjs.n(t*n)},87:e=>chunkSQHBOWES_cjs.n(Math.sin(e[0].toNumber()*Math.PI/180)),88:e=>chunkSQHBOWES_cjs.n(Math.cos(e[0].toNumber()*Math.PI/180)),89:e=>chunkSQHBOWES_cjs.n(Math.tan(e[0].toNumber()*Math.PI/180)),90:e=>chunkSQHBOWES_cjs.n(Math.asin(e[0].toNumber())*180/Math.PI),91:e=>chunkSQHBOWES_cjs.n(Math.acos(e[0].toNumber())*180/Math.PI),92:e=>chunkSQHBOWES_cjs.n(Math.atan(e[0].toNumber())*180/Math.PI),93:e=>chunkSQHBOWES_cjs.u(e[0].toNumber(),"days"),94:e=>{let t=typeof e[1]?.value=="string"?e[1].value:void 0,n=typeof e[2]?.value=="string"?e[2].value:void 0;if(t===void 0||n===void 0)return chunkSQHBOWES_cjs.P("UNKNOWN_UNIT",'both units have to be named, as in "12.5 minutes in minutes and seconds"');let o=chunkEZKR44MA_cjs.a[t.toLowerCase()],r=chunkEZKR44MA_cjs.a[n.toLowerCase()];if(o===void 0||r===void 0)return chunkSQHBOWES_cjs.P("UNKNOWN_UNIT",`${t} and ${n}: one of these is not a unit`);if(o[0]!==r[0])return chunkSQHBOWES_cjs.P("INCOMPATIBLE_UNITS",`${t} and ${n} measure different things`);if(r[1]>=o[1])return chunkSQHBOWES_cjs.P("INCOMPATIBLE_UNITS",`${t} and ${n}: name the larger unit first`);let i=e[0],a=i.type===6&&i.unit!==void 0?chunkEZKR44MA_cjs.a[i.unit.toLowerCase()]:void 0,u=i.toNumber()*(a?.[1]??o[1]),l=Math.floor(u/o[1]),s=Math.round((u-l*o[1])/r[1]*1e3)/1e3;return chunkSQHBOWES_cjs.t(`${l} ${t} ${s} ${n}`)},95:e=>{let t=e[0],n=String(e[1].value),o=t.type===6&&t.unit!==void 0?t.unit:"";return o.includes("/")?chunkSQHBOWES_cjs.P("INVALID_RATE_UNIT",`${o}/${n}: that is already a rate`):chunkSQHBOWES_cjs.u(t.toNumber(),`${o}/${n}`)},96:e=>{let t=e[0],n=e[1];if(n.type===6&&t.type===6&&chunkZKFCKAIX_cjs.i(n.unit)){let s=chunkZKFCKAIX_cjs.j(t.toNumber(),t.unit,n.toNumber(),n.unit);if(s!==null)return Tr(s)}if(n.type!==6||n.unit===void 0||!n.unit.includes("/"))return chunkSQHBOWES_cjs.P("INVALID_RATE",'at: the right-hand side has to be a rate, as in "$30/hour"');let o=n.unit.indexOf("/"),r=n.unit.slice(0,o),i=n.unit.slice(o+1),a=t.type===6?t.unit:void 0,u=chunkEZKR44MA_cjs.a[i.toLowerCase()],l=a===void 0?void 0:chunkEZKR44MA_cjs.a[a.toLowerCase()];if(l!==void 0&&u!==void 0&&l[0]===u[0]){let p=t.toNumber()*l[1]/u[1]*n.toNumber();return r===""?chunkSQHBOWES_cjs.n(p):chunkSQHBOWES_cjs.u(p,r)}if(a!==void 0&&a===r){let s=t.toNumber()/n.toNumber();return chunkSQHBOWES_cjs.u(s,_r(i,s))}if(a===void 0){let s=t.toNumber()*n.toNumber();return r===""?chunkSQHBOWES_cjs.n(s):chunkSQHBOWES_cjs.u(s,r)}return chunkSQHBOWES_cjs.P("INCOMPATIBLE_UNITS",`at: ${a} matches neither side of ${n.unit}`)},80:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),o=e[2].toNumber(),r=e[3].toNumber();if(r<=0)return chunkSQHBOWES_cjs.P("INVALID_RATE",`compounding: ${r} periods per year is not a period`);if(1+n/r<=0)return chunkSQHBOWES_cjs.P("INVALID_RATE",`compounding: rate ${n} makes each period non-positive`);let i=t*Math.pow(1+n/r,r*o);return e[0].type===6?chunkSQHBOWES_cjs.u(i,e[0].unit):chunkSQHBOWES_cjs.n(i)},81:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),o=e[2].toNumber(),r=e[3].toNumber();if(r<=0||1+n/r<=0)return chunkSQHBOWES_cjs.P("INVALID_RATE",`compounding: rate ${n} over ${r} periods per year is not usable`);let i=t*(Math.pow(1+n/r,r*o)-1);return e[0].type===6?chunkSQHBOWES_cjs.u(i,e[0].unit):chunkSQHBOWES_cjs.n(i)},82:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),o=e[2].toNumber();if(1+n<=0)return chunkSQHBOWES_cjs.P("INVALID_RATE",`presentValue: rate ${n} makes (1 + rate) non-positive`);let r=t/Math.pow(1+n,o);return e[0].type===6?chunkSQHBOWES_cjs.u(r,e[0].unit):chunkSQHBOWES_cjs.n(r)},83:e=>{let t=e[0].toNumber(),n=e[1].toNumber();return t===0?chunkSQHBOWES_cjs.P("INVALID_RATE","roi: nothing was invested, so there is no return on it"):chunkSQHBOWES_cjs.n((n-t)/t)},84:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),o=e[2].toNumber();return t<=0?chunkSQHBOWES_cjs.P("INVALID_RATE","annual return: the amount invested must be positive"):o<=0?chunkSQHBOWES_cjs.P("INVALID_RATE","annual return: the period must be longer than zero"):n<=0?chunkSQHBOWES_cjs.P("INVALID_RATE","annual return: nothing was returned, so there is no annual rate"):chunkSQHBOWES_cjs.N(Math.pow(n/t,1/o)-1)},97:e=>Bn(e[0],e[1].toNumber()),98:e=>{let t=e[1].toNumber();return !Number.isInteger(t)||t<1?chunkSQHBOWES_cjs.P("INVALID_RANGE",`split: the number of shares must be a whole number of at least 1, not ${e[1].toNumber()}.`):chunkSQHBOWES_cjs.H(kn(e[0],t))},99:e=>{let t=e[0].toNumber(),n=Dr(e[1]),o=e[2].toNumber();if(n===null)return chunkSQHBOWES_cjs.P("INVALID_RANGE",'savings goal: the duration must be in months or years, e.g. "in 2 years".');if(t<=0)return chunkSQHBOWES_cjs.P("INVALID_RANGE","savings goal: the target must be positive.");if(n<=0)return chunkSQHBOWES_cjs.P("INVALID_RANGE","savings goal: the duration must be positive.");if(o<0)return chunkSQHBOWES_cjs.P("INVALID_RATE","savings goal: the rate must not be negative.");let r=Cr(t,o/12,n);return e[0].type===6?chunkSQHBOWES_cjs.u(r,e[0].unit):chunkSQHBOWES_cjs.n(r)},100:e=>{let t=e[0].toNumber(),n=e[1].toNumber(),o=e[2].toNumber(),r=e[3].toNumber(),i=typeof e[4]?.value=="string"?e[4].value:"periods";if(t<=0)return chunkSQHBOWES_cjs.P("INVALID_RANGE","savings goal: the target must be positive.");if(n<=0)return chunkSQHBOWES_cjs.P("INVALID_RANGE","savings goal: the contribution must be positive.");if(r<0)return chunkSQHBOWES_cjs.P("INVALID_RATE","savings goal: the rate must not be negative.");let a=Pr(t,n,r/o);return chunkSQHBOWES_cjs.u(a,i)},101:e=>chunkSQHBOWES_cjs.n(Math.sqrt(Be(e.map(t=>t.toNumber()),false))),102:e=>chunkSQHBOWES_cjs.n(Math.sqrt(Be(e.map(t=>t.toNumber()),true))),103:e=>chunkSQHBOWES_cjs.n(Be(e.map(t=>t.toNumber()),false)),104:e=>chunkSQHBOWES_cjs.n(Be(e.map(t=>t.toNumber()),true)),105:e=>{if(e.length===0)return chunkSQHBOWES_cjs.n(0);let t=e.map(n=>n.toNumber());return chunkSQHBOWES_cjs.n(Math.max(...t)-Math.min(...t))},106:e=>{if(e.length===0)return chunkSQHBOWES_cjs.n(0);let t=new Map,n=e[0].toNumber(),o=0;for(let r of e){let i=r.toNumber(),a=(t.get(i)??0)+1;t.set(i,a),a>o&&(o=a,n=i);}return chunkSQHBOWES_cjs.n(n)},107:e=>{let t=0,n=0;for(let o=0;o+1<e.length;o+=2){let r=e[o].toNumber(),i=e[o+1].toNumber();t+=r*i,n+=i;}return n===0?chunkSQHBOWES_cjs.P("WEIGHTED_AVERAGE_ZERO_WEIGHT","weighted average: the weights sum to zero, so there is nothing to divide by"):chunkSQHBOWES_cjs.n(t/n)}};function Dr(e){if(e.type!==6)return null;let t=e.unit;return t==="months"||t==="month"?e.toNumber():t==="years"||t==="year"?e.toNumber()*12:null}function Cr(e,t,n){return t===0?e/n:e*t/(Math.pow(1+t,n)-1)}function Pr(e,t,n){let o=n===0?e/t:Math.log(1+e*n/t)/Math.log(1+n);return Math.ceil(o-1e-9)}function mt(e,t){let n=O(t);return n===null?chunkSQHBOWES_cjs.P("SYMBOLIC_NONFINITE_OPERAND",e+" needs a value with an exact number."):_(chunkWGP4UUO5_cjs.s(e,[n]))}function ft(e,t){return e?.type!==3?chunkSQHBOWES_cjs.P("SYMBOLIC_REQUIRES_VARIABLE_NAME",`${t} needs the name of an unknown.`):e.value}function dt(e,t,n){let o=n*12,r=t/12,i=r===0?e/o:e*r/(1-Math.pow(1+r,-o)),a=i*o,u=a-e;return {monthlyPayment:i,totalRepayment:a,totalInterest:u}}var Ha=Pn.pluginFunctions,Gn=65535,jn=0;function Lr(){if(jn>Gn)throw chunkYBQPEWT7_cjs.c.config("PLUGIN_FUNCTION_INDEX_POOL_EXHAUSTED",`allocatePluginFunctionIndex: pool exhausted (max ${Gn+1} allocations).`);return jn++}var Kn=new Map;function Wa(e){let t=Kn.get(e);return t===void 0&&(t=Lr(),Kn.set(e,t)),t}var pt=new Map;function Qa(e,t){let n=e.toLowerCase(),o=pt.get(n);o&&o!==t&&console.warn(`[asConverterRegistry] Converter name "${n}" is already registered \u2014 overwriting.`),pt.set(n,t);}function za(e){pt.delete(e.toLowerCase());}var qe=class qe{constructor(){this.values=new Map;this.listeners=new Set;this.notifyDepth=0;}get(t){return this.values.get(t)}has(t){return this.values.has(t)}set(t,n){let o=this.values.get(t);this.values.set(t,n),!(o!==void 0&&Fr(o,n))&&this.notify(t,n);}notify(t,n){if(!(this.notifyDepth>=qe.MAX_NOTIFY_DEPTH)){this.notifyDepth++;try{for(let o of this.listeners)o(t,n);}finally{this.notifyDepth--;}}}subscribe(t){return this.listeners.add(t),()=>{this.listeners.delete(t);}}clear(){this.values.clear(),this.listeners.clear(),this.notifyDepth=0;}};qe.MAX_NOTIFY_DEPTH=64;var bt=qe;function Fr(e,t){if(e.type!==t.type||e.unit!==t.unit||(e.timedOut??false)!==(t.timedOut??false))return false;let n=e.value,o=t.value;if(Array.isArray(n)||Array.isArray(o)){if(!Array.isArray(n)||!Array.isArray(o)||n.length!==o.length)return false;for(let r=0;r<n.length;r++)if(!Object.is(n[r],o[r]))return false;return true}return Object.is(n,o)}var eu=new bt;function tu(e){return `global:${e}`}function ou(e,t){return new Date(e,t+1,0).getDate()}exports.A=Un;exports.B=Sa;exports.C=Za;exports.D=Ha;exports.E=Lr;exports.F=Wa;exports.G=pt;exports.H=Qa;exports.I=za;exports.J=eu;exports.K=tu;exports.L=ou;exports.a=ge;exports.b=In;exports.c=Mn;exports.d=mn;exports.e=Ri;exports.f=xi;exports.g=vi;exports.h=Ii;exports.i=pn;exports.j=he;exports.k=Di;exports.l=Ci;exports.m=Pi;exports.n=yn;exports.o=Li;exports.p=Fi;exports.q=et;exports.r=Ui;exports.s=$i;exports.t=Bi;exports.u=qi;exports.v=Ne;exports.w=ji;exports.x=kr;exports.y=Pn;exports.z=Fn;//# sourceMappingURL=chunk-634ILVMP.cjs.map
2
+ //# sourceMappingURL=chunk-634ILVMP.cjs.map