@synnaxlabs/pluto 0.49.0 → 0.50.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 (503) hide show
  1. package/dist/{Animated-Bp6IK3ct.js → Animated-BbeJdao0.js} +3 -3
  2. package/dist/{Animated-38tdmPR0.js → Animated-C4xrEVd-.js} +50 -50
  3. package/dist/Animated-Dvm2k_z_.cjs +1 -0
  4. package/dist/{Animated-Dsn1pmhz.cjs → Animated-umWjgTzy.cjs} +1 -1
  5. package/dist/{Box-4l6DWG-3.cjs → Box-D27bV7QJ.cjs} +1 -1
  6. package/dist/{Box-BVyAHr2f.js → Box-DLO7l9hM.js} +9 -9
  7. package/dist/Button-BSek5HG5.cjs +1 -0
  8. package/dist/{Button-CoOYEk1J.js → Button-DLtxKGH5.js} +98 -98
  9. package/dist/{Dialog-JwJQD3xZ.cjs → Dialog-BpjxXSmw.cjs} +1 -1
  10. package/dist/{Dialog-puVY-0Mt.js → Dialog-BspO7uo8.js} +3 -3
  11. package/dist/{Editable-DI0-D1K5.cjs → Editable-C-z-stcD.cjs} +1 -1
  12. package/dist/{Editable-DEbVpi5i.js → Editable-DjQORuR1.js} +3 -3
  13. package/dist/{Haul-Db9j45Fu.js → Haul-DBy-2ds_.js} +24 -24
  14. package/dist/Haul-WgPKptr9.cjs +1 -0
  15. package/dist/{Items-BCG7kyaR.cjs → Items-07R286kW.cjs} +2 -2
  16. package/dist/{Items-BVKW0udb.js → Items-CX11yLMf.js} +25 -23
  17. package/dist/Menu-58O-OOPJ.cjs +1 -0
  18. package/dist/Menu-GBo3ayoP.js +135 -0
  19. package/dist/Provider-BA3zQVbv.cjs +1 -0
  20. package/dist/{Provider-DQM7IBoi.js → Provider-BkxUzTWS.js} +399 -320
  21. package/dist/Tags-DWsEZD9t.cjs +1 -0
  22. package/dist/{Tags-B8l5Dvw-.js → Tags-V7sNuGZv.js} +187 -182
  23. package/dist/{Text-DeWvfrdF.cjs → Text-DW5FpCk9.cjs} +1 -1
  24. package/dist/{Text-90J6p5Uj.js → Text-XeD58Fq8.js} +625 -600
  25. package/dist/{Video-CLpcYcKf.js → Video-C56z7qvH.js} +1 -1
  26. package/dist/{Video-Bmg4gwom.cjs → Video-CBPTBLTB.cjs} +1 -1
  27. package/dist/button.cjs +1 -1
  28. package/dist/button.js +1 -1
  29. package/dist/color.cjs +1 -1
  30. package/dist/color.js +1 -1
  31. package/dist/{css-bahPRiQI.js → css-BkBrZtKZ.js} +562 -569
  32. package/dist/{css-BVgFAmaj.cjs → css-D3NdC2sx.cjs} +4 -4
  33. package/dist/css.cjs +1 -1
  34. package/dist/css.js +2 -2
  35. package/dist/dialog.cjs +1 -1
  36. package/dist/dialog.js +1 -1
  37. package/dist/{dimensions-SDA3fM2T.cjs → dimensions-C7b02rFi.cjs} +1 -1
  38. package/dist/{dimensions-qcyzaTKI.js → dimensions-qj2CkPTy.js} +6 -6
  39. package/dist/{eraser-Cbfc1frM.cjs → eraser-Bocga8Eb.cjs} +3 -3
  40. package/dist/{eraser-Dz6nZuPp.js → eraser-DuAfpO0P.js} +38 -38
  41. package/dist/ether.cjs +1 -1
  42. package/dist/ether.js +54 -55
  43. package/dist/{external-CMs_BCc5.cjs → external-5_uHky7w.cjs} +2 -2
  44. package/dist/{external-m-0q-0os.js → external-B-JsNciM.js} +5 -5
  45. package/dist/{external-CwYoEhB2.cjs → external-B3o5P8Yw.cjs} +1 -1
  46. package/dist/{external-Bixqkw5N.cjs → external-B9omdiDK.cjs} +1 -1
  47. package/dist/{external-kwuGKgyL.cjs → external-BIbdeWQE.cjs} +1 -1
  48. package/dist/external-BRA_zA83.cjs +1 -0
  49. package/dist/{external-PA6ulZR9.cjs → external-Bjh6lsVm.cjs} +1 -1
  50. package/dist/external-BwRkgEyo.cjs +1 -0
  51. package/dist/{external-TI-6Umwm.js → external-CLQdSLv0.js} +6 -6
  52. package/dist/{external-DJWZ43k0.js → external-CdHyPhLI.js} +1 -1
  53. package/dist/{external-CB3VxPJp.js → external-Ct1k30Nd.js} +24 -24
  54. package/dist/external-Ct2A_YCT.cjs +1 -0
  55. package/dist/{external-04ve_X21.js → external-DNbIzfVy.js} +45 -44
  56. package/dist/{external-B3b7kdID.cjs → external-DT82RBon.cjs} +1 -1
  57. package/dist/{external-Cxojc4yT.js → external-DXWEyk9d.js} +11 -11
  58. package/dist/{external-D2tzyCDs.cjs → external-DojNoICL.cjs} +1 -1
  59. package/dist/{external-CnWQzZlQ.js → external-Dp5OkGYV.js} +69 -68
  60. package/dist/{external-xJ67ivgR.js → external-DxmgAHkn.js} +3 -3
  61. package/dist/{external-DUVDOJfj.cjs → external-DyTk_hS7.cjs} +1 -1
  62. package/dist/{external-DP9FiRHq.js → external-MvcifV4O.js} +3 -3
  63. package/dist/external-PXU0gc_j.cjs +84 -0
  64. package/dist/{external-CrXS1qj_.js → external-g_vt4Lku.js} +13386 -12955
  65. package/dist/{external-D2deiHyL.js → external-sYHm9OG8.js} +10 -9
  66. package/dist/{external-Hhx8JoAS.js → external-xfkS0zGI.js} +12 -12
  67. package/dist/flex.cjs +1 -1
  68. package/dist/flex.js +1 -1
  69. package/dist/{fontString-qfWSw62X.js → fontString-CSWLcJcC.js} +3 -3
  70. package/dist/{fontString-62eEvw4b.cjs → fontString-TocVNWmy.cjs} +1 -1
  71. package/dist/header.cjs +1 -1
  72. package/dist/header.js +1 -1
  73. package/dist/{hooks-Dh0v1QWQ.js → hooks-BeSuo_di.js} +25 -25
  74. package/dist/hooks-Eb94kuDd.cjs +1 -0
  75. package/dist/index.cjs +23 -15
  76. package/dist/index.js +11147 -10778
  77. package/dist/input.cjs +1 -1
  78. package/dist/input.js +1 -1
  79. package/dist/list.cjs +1 -1
  80. package/dist/list.js +1 -1
  81. package/dist/menu.cjs +1 -1
  82. package/dist/menu.js +1 -1
  83. package/dist/pluto.css +1 -1
  84. package/dist/{provider-ClhgBr_F.js → provider-D0K9E52u.js} +4030 -3699
  85. package/dist/provider-DksyuJua.cjs +78 -0
  86. package/dist/src/access/policy/Select.d.ts.map +1 -1
  87. package/dist/src/access/policy/aether/queries.d.ts.map +1 -1
  88. package/dist/src/access/policy/queries.d.ts +8 -6
  89. package/dist/src/access/policy/queries.d.ts.map +1 -1
  90. package/dist/src/access/role/Select.d.ts +2 -2
  91. package/dist/src/access/role/Select.d.ts.map +1 -1
  92. package/dist/src/access/role/queries.d.ts +2 -2
  93. package/dist/src/access/role/queries.d.ts.map +1 -1
  94. package/dist/src/aether/aether/aether.d.ts +86 -10
  95. package/dist/src/aether/aether/aether.d.ts.map +1 -1
  96. package/dist/src/aether/aether/aether.spec.d.ts.map +1 -1
  97. package/dist/src/aether/main.d.ts +34 -11
  98. package/dist/src/aether/main.d.ts.map +1 -1
  99. package/dist/src/aether/message.d.ts +31 -6
  100. package/dist/src/aether/message.d.ts.map +1 -1
  101. package/dist/src/aether/test/index.d.ts +2 -0
  102. package/dist/src/aether/test/index.d.ts.map +1 -0
  103. package/dist/src/aether/test/provider.d.ts +4 -0
  104. package/dist/src/aether/test/provider.d.ts.map +1 -0
  105. package/dist/src/aether/test/provider.spec.d.ts +2 -0
  106. package/dist/src/aether/test/provider.spec.d.ts.map +1 -0
  107. package/dist/src/arc/handle/Base.d.ts +8 -0
  108. package/dist/src/arc/handle/{Core.d.ts.map → Base.d.ts.map} +1 -1
  109. package/dist/src/arc/handle/Sink.d.ts +2 -2
  110. package/dist/src/arc/handle/Source.d.ts +2 -2
  111. package/dist/src/arc/queries.d.ts +33 -10
  112. package/dist/src/arc/queries.d.ts.map +1 -1
  113. package/dist/src/button/Button.d.ts +2 -2
  114. package/dist/src/button/Button.d.ts.map +1 -1
  115. package/dist/src/button/Toggle.d.ts.map +1 -1
  116. package/dist/src/channel/LinePlot.d.ts +7 -6
  117. package/dist/src/channel/LinePlot.d.ts.map +1 -1
  118. package/dist/src/channel/Select.d.ts.map +1 -1
  119. package/dist/src/channel/queries.d.ts +6 -5
  120. package/dist/src/channel/queries.d.ts.map +1 -1
  121. package/dist/src/color/BaseSwatch.d.ts.map +1 -1
  122. package/dist/src/color/Picker.d.ts.map +1 -1
  123. package/dist/src/color/Swatch.d.ts.map +1 -1
  124. package/dist/src/component/SelectSize.d.ts.map +1 -1
  125. package/dist/src/css/bem.d.ts +2 -2
  126. package/dist/src/css/css.d.ts +1 -1
  127. package/dist/src/device/Select.d.ts.map +1 -1
  128. package/dist/src/device/queries.d.ts +8 -8
  129. package/dist/src/device/queries.d.ts.map +1 -1
  130. package/dist/src/dialog/Frame.d.ts.map +1 -1
  131. package/dist/src/direction/Select.d.ts +2 -2
  132. package/dist/src/direction/Select.d.ts.map +1 -1
  133. package/dist/src/errors/Boundary.d.ts +29 -0
  134. package/dist/src/errors/Boundary.d.ts.map +1 -0
  135. package/dist/src/errors/Fallback.d.ts +32 -0
  136. package/dist/src/errors/Fallback.d.ts.map +1 -0
  137. package/dist/src/errors/errors.spec.d.ts +2 -0
  138. package/dist/src/errors/errors.spec.d.ts.map +1 -0
  139. package/dist/src/errors/external.d.ts +3 -0
  140. package/dist/src/errors/external.d.ts.map +1 -0
  141. package/dist/src/errors/index.d.ts +2 -0
  142. package/dist/src/errors/index.d.ts.map +1 -0
  143. package/dist/src/flux/Provider.d.ts +2 -2
  144. package/dist/src/flux/aether/external.d.ts +4 -4
  145. package/dist/src/flux/aether/provider.d.ts +7 -7
  146. package/dist/src/flux/{core → base}/client.d.ts.map +1 -1
  147. package/dist/src/flux/{core → base}/external.d.ts.map +1 -1
  148. package/dist/src/flux/base/index.d.ts +2 -0
  149. package/dist/src/flux/base/index.d.ts.map +1 -0
  150. package/dist/src/flux/{core → base}/store.d.ts.map +1 -1
  151. package/dist/src/flux/base/store.spec.d.ts.map +1 -0
  152. package/dist/src/flux/{core → base}/streamer.d.ts +1 -1
  153. package/dist/src/flux/{core → base}/streamer.d.ts.map +1 -1
  154. package/dist/src/flux/base/streamer.spec.d.ts.map +1 -0
  155. package/dist/src/flux/{core → base}/types.d.ts.map +1 -1
  156. package/dist/src/flux/external.d.ts +3 -3
  157. package/dist/src/flux/form.d.ts +13 -13
  158. package/dist/src/flux/form.d.ts.map +1 -1
  159. package/dist/src/flux/list.d.ts +11 -11
  160. package/dist/src/flux/list.d.ts.map +1 -1
  161. package/dist/src/flux/retrieve.d.ts +20 -20
  162. package/dist/src/flux/retrieve.d.ts.map +1 -1
  163. package/dist/src/flux/update.d.ts +23 -22
  164. package/dist/src/flux/update.d.ts.map +1 -1
  165. package/dist/src/form/Field.d.ts.map +1 -1
  166. package/dist/src/form/external.d.ts +0 -1
  167. package/dist/src/form/external.d.ts.map +1 -1
  168. package/dist/src/form/useField.d.ts.map +1 -1
  169. package/dist/src/group/queries.d.ts +5 -5
  170. package/dist/src/group/queries.d.ts.map +1 -1
  171. package/dist/src/haul/Haul.d.ts +3 -3
  172. package/dist/src/haul/Haul.d.ts.map +1 -1
  173. package/dist/src/header/ButtonTitle.d.ts.map +1 -1
  174. package/dist/src/icon/Icon.d.ts +1 -1
  175. package/dist/src/icon/Icon.d.ts.map +1 -1
  176. package/dist/src/icon/registry.d.ts +5 -0
  177. package/dist/src/icon/registry.d.ts.map +1 -1
  178. package/dist/src/index.d.ts +2 -1
  179. package/dist/src/index.d.ts.map +1 -1
  180. package/dist/src/input/Boolean.d.ts.map +1 -1
  181. package/dist/src/input/Date.d.ts.map +1 -1
  182. package/dist/src/input/DateTime.d.ts.map +1 -1
  183. package/dist/src/input/DragButton.d.ts.map +1 -1
  184. package/dist/src/input/HelpText.d.ts.map +1 -1
  185. package/dist/src/input/Label.d.ts.map +1 -1
  186. package/dist/src/input/Numeric.d.ts.map +1 -1
  187. package/dist/src/input/Text.d.ts.map +1 -1
  188. package/dist/src/input/Time.d.ts.map +1 -1
  189. package/dist/src/label/Select.d.ts.map +1 -1
  190. package/dist/src/label/queries.d.ts +3 -3
  191. package/dist/src/label/queries.d.ts.map +1 -1
  192. package/dist/src/lineplot/Axis.d.ts.map +1 -1
  193. package/dist/src/lineplot/Legend.d.ts +2 -2
  194. package/dist/src/lineplot/Line.d.ts +2 -2
  195. package/dist/src/lineplot/LinePlot.d.ts +9 -3
  196. package/dist/src/lineplot/LinePlot.d.ts.map +1 -1
  197. package/dist/src/lineplot/Viewport.d.ts +2 -2
  198. package/dist/src/lineplot/aether/LinePlot.d.ts +17 -5
  199. package/dist/src/lineplot/aether/LinePlot.d.ts.map +1 -1
  200. package/dist/src/lineplot/aether/XAxis.d.ts +2 -2
  201. package/dist/src/lineplot/aether/YAxis.d.ts +2 -2
  202. package/dist/src/lineplot/aether/axis.d.ts +4 -4
  203. package/dist/src/lineplot/aether/external.d.ts +0 -1
  204. package/dist/src/lineplot/aether/external.d.ts.map +1 -1
  205. package/dist/src/lineplot/external.d.ts +0 -1
  206. package/dist/src/lineplot/external.d.ts.map +1 -1
  207. package/dist/src/lineplot/queries.d.ts +3 -3
  208. package/dist/src/lineplot/queries.d.ts.map +1 -1
  209. package/dist/src/lineplot/range/Annotation.d.ts.map +1 -1
  210. package/dist/src/lineplot/tooltip/Tooltip.d.ts.map +1 -1
  211. package/dist/src/list/Frame.d.ts +2 -2
  212. package/dist/src/list/Frame.d.ts.map +1 -1
  213. package/dist/src/list/Items.d.ts.map +1 -1
  214. package/dist/src/list/useKeysData.d.ts.map +1 -1
  215. package/dist/src/log/Log.d.ts.map +1 -1
  216. package/dist/src/log/queries.d.ts +3 -3
  217. package/dist/src/log/queries.d.ts.map +1 -1
  218. package/dist/src/menu/ContextMenu.d.ts +3 -2
  219. package/dist/src/menu/ContextMenu.d.ts.map +1 -1
  220. package/dist/src/menu/Menu.d.ts.map +1 -1
  221. package/dist/src/mosaic/Mosaic.d.ts.map +1 -1
  222. package/dist/src/nav/Bar.d.ts +3 -3
  223. package/dist/src/nav/Drawer.d.ts.map +1 -1
  224. package/dist/src/notation/Select.d.ts +2 -2
  225. package/dist/src/notation/Select.d.ts.map +1 -1
  226. package/dist/src/ontology/aether/queries.d.ts.map +1 -1
  227. package/dist/src/ontology/queries.d.ts +3 -3
  228. package/dist/src/ontology/queries.d.ts.map +1 -1
  229. package/dist/src/pluto/Pluto.d.ts +2 -0
  230. package/dist/src/pluto/Pluto.d.ts.map +1 -1
  231. package/dist/src/rack/Select.d.ts.map +1 -1
  232. package/dist/src/rack/queries.d.ts +2 -2
  233. package/dist/src/rack/queries.d.ts.map +1 -1
  234. package/dist/src/ranger/Breadcrumb.d.ts +2 -2
  235. package/dist/src/ranger/Select.d.ts +2 -2
  236. package/dist/src/ranger/Select.d.ts.map +1 -1
  237. package/dist/src/ranger/SelectStage.d.ts.map +1 -1
  238. package/dist/src/ranger/queries.d.ts +5 -5
  239. package/dist/src/ranger/queries.d.ts.map +1 -1
  240. package/dist/src/resize/{Core.d.ts → Base.d.ts} +3 -3
  241. package/dist/src/resize/{Core.d.ts.map → Base.d.ts.map} +1 -1
  242. package/dist/src/resize/Single.d.ts +2 -2
  243. package/dist/src/resize/Single.d.ts.map +1 -1
  244. package/dist/src/resize/external.d.ts +1 -1
  245. package/dist/src/schematic/Schematic.d.ts.map +1 -1
  246. package/dist/src/schematic/edge/paths.d.ts.map +1 -1
  247. package/dist/src/schematic/queries.d.ts +5 -5
  248. package/dist/src/schematic/queries.d.ts.map +1 -1
  249. package/dist/src/schematic/symbol/Primitives.d.ts +5 -5
  250. package/dist/src/schematic/symbol/Primitives.d.ts.map +1 -1
  251. package/dist/src/schematic/symbol/SelectOrientation.d.ts +2 -2
  252. package/dist/src/schematic/symbol/SelectOrientation.d.ts.map +1 -1
  253. package/dist/src/schematic/symbol/Symbols.d.ts +13 -13
  254. package/dist/src/schematic/symbol/Symbols.d.ts.map +1 -1
  255. package/dist/src/schematic/symbol/external.d.ts +1 -0
  256. package/dist/src/schematic/symbol/external.d.ts.map +1 -1
  257. package/dist/src/schematic/symbol/queries.d.ts +8 -6
  258. package/dist/src/schematic/symbol/queries.d.ts.map +1 -1
  259. package/dist/src/schematic/symbol/registry.d.ts +1 -1
  260. package/dist/src/select/Button.d.ts +3 -3
  261. package/dist/src/select/Button.d.ts.map +1 -1
  262. package/dist/src/select/Dialog.d.ts +3 -3
  263. package/dist/src/select/Dialog.d.ts.map +1 -1
  264. package/dist/src/select/Frame.d.ts +1 -1
  265. package/dist/src/select/Frame.d.ts.map +1 -1
  266. package/dist/src/select/Multiple.d.ts +3 -3
  267. package/dist/src/select/Multiple.d.ts.map +1 -1
  268. package/dist/src/select/MultipleTrigger.d.ts.map +1 -1
  269. package/dist/src/select/Single.d.ts.map +1 -1
  270. package/dist/src/select/Static.d.ts.map +1 -1
  271. package/dist/src/select/flex/Alignment.d.ts.map +1 -1
  272. package/dist/src/select/text/Level.d.ts +1 -1
  273. package/dist/src/select/text/Weight.d.ts +1 -1
  274. package/dist/src/select/use.d.ts.map +1 -1
  275. package/dist/src/showcase/InputShowcase.d.ts.map +1 -1
  276. package/dist/src/state/state.d.ts.map +1 -1
  277. package/dist/src/status/Select.d.ts +2 -2
  278. package/dist/src/status/Select.d.ts.map +1 -1
  279. package/dist/src/status/SelectVariant.d.ts +2 -2
  280. package/dist/src/status/SelectVariant.d.ts.map +1 -1
  281. package/dist/src/status/aether/aggregator.d.ts +1 -1
  282. package/dist/src/status/{core → base}/Aggregator.d.ts.map +1 -1
  283. package/dist/src/status/base/Aggregator.spec.d.ts.map +1 -0
  284. package/dist/src/status/{core → base}/CreateIcon.d.ts.map +1 -1
  285. package/dist/src/status/{core → base}/Indicator.d.ts.map +1 -1
  286. package/dist/src/status/{core → base}/Notification.d.ts.map +1 -1
  287. package/dist/src/status/base/Notification.spec.d.ts.map +1 -0
  288. package/dist/src/status/{core → base}/Summary.d.ts.map +1 -1
  289. package/dist/src/status/{core → base}/colors.d.ts.map +1 -1
  290. package/dist/src/status/{core → base}/external.d.ts.map +1 -1
  291. package/dist/src/status/base/index.d.ts.map +1 -0
  292. package/dist/src/status/external.d.ts +1 -1
  293. package/dist/src/status/queries.d.ts +3 -3
  294. package/dist/src/status/queries.d.ts.map +1 -1
  295. package/dist/src/steps/Steps.d.ts.map +1 -1
  296. package/dist/src/table/Table.d.ts.map +1 -1
  297. package/dist/src/table/cells/Forms.d.ts.map +1 -1
  298. package/dist/src/table/queries.d.ts +3 -3
  299. package/dist/src/table/queries.d.ts.map +1 -1
  300. package/dist/src/tabs/Selector.d.ts.map +1 -1
  301. package/dist/src/tabs/Tabs.d.ts.map +1 -1
  302. package/dist/src/tag/Tag.d.ts.map +1 -1
  303. package/dist/src/task/queries.d.ts +7 -6
  304. package/dist/src/task/queries.d.ts.map +1 -1
  305. package/dist/src/telem/SelectDataType.d.ts.map +1 -1
  306. package/dist/src/telem/aether/context.d.ts +2 -2
  307. package/dist/src/telem/aether/context.d.ts.map +1 -1
  308. package/dist/src/telem/aether/factory.d.ts +2 -2
  309. package/dist/src/telem/aether/factory.d.ts.map +1 -1
  310. package/dist/src/telem/aether/provider.d.ts +4 -14
  311. package/dist/src/telem/aether/provider.d.ts.map +1 -1
  312. package/dist/src/telem/aether/remote.d.ts.map +1 -1
  313. package/dist/src/telem/aether/test/external.d.ts +4 -0
  314. package/dist/src/telem/aether/test/external.d.ts.map +1 -0
  315. package/dist/src/telem/aether/test/factory.d.ts +11 -0
  316. package/dist/src/telem/aether/test/factory.d.ts.map +1 -0
  317. package/dist/src/telem/aether/test/factory.spec.d.ts +2 -0
  318. package/dist/src/telem/aether/test/factory.spec.d.ts.map +1 -0
  319. package/dist/src/telem/aether/test/index.d.ts +2 -0
  320. package/dist/src/telem/aether/test/index.d.ts.map +1 -0
  321. package/dist/src/telem/aether/test/sink.d.ts +18 -0
  322. package/dist/src/telem/aether/test/sink.d.ts.map +1 -0
  323. package/dist/src/telem/aether/test/sink.spec.d.ts +2 -0
  324. package/dist/src/telem/aether/test/sink.spec.d.ts.map +1 -0
  325. package/dist/src/telem/aether/test/source.d.ts +17 -0
  326. package/dist/src/telem/aether/test/source.d.ts.map +1 -0
  327. package/dist/src/telem/aether/test/source.spec.d.ts +2 -0
  328. package/dist/src/telem/aether/test/source.spec.d.ts.map +1 -0
  329. package/dist/src/telem/client/cache/cache.d.ts.map +1 -1
  330. package/dist/src/telem/control/Chip.d.ts.map +1 -1
  331. package/dist/src/telem/control/Controller.d.ts +2 -0
  332. package/dist/src/telem/control/Controller.d.ts.map +1 -1
  333. package/dist/src/telem/control/Indicator.d.ts.map +1 -1
  334. package/dist/src/telem/control/Legend.d.ts +2 -2
  335. package/dist/src/telem/control/aether/controller.d.ts +17 -6
  336. package/dist/src/telem/control/aether/controller.d.ts.map +1 -1
  337. package/dist/src/telem/test/external.d.ts +2 -0
  338. package/dist/src/telem/test/external.d.ts.map +1 -0
  339. package/dist/src/telem/test/index.d.ts +2 -0
  340. package/dist/src/telem/test/index.d.ts.map +1 -0
  341. package/dist/src/telem/test/wrapper.d.ts +9 -0
  342. package/dist/src/telem/test/wrapper.d.ts.map +1 -0
  343. package/dist/src/telem/text/TimeRange.d.ts.map +1 -1
  344. package/dist/src/text/Text.d.ts +1 -1
  345. package/dist/src/text/Text.d.ts.map +1 -1
  346. package/dist/src/text/{core → base}/dimensions.d.ts +5 -5
  347. package/dist/src/text/{core → base}/dimensions.d.ts.map +1 -1
  348. package/dist/src/text/base/dimensions.spec.d.ts.map +1 -0
  349. package/dist/src/text/base/external.d.ts.map +1 -0
  350. package/dist/src/text/base/index.d.ts.map +1 -0
  351. package/dist/src/text/{core → base}/types.d.ts.map +1 -1
  352. package/dist/src/text/external.d.ts +2 -2
  353. package/dist/src/theming/aether/external.d.ts +2 -2
  354. package/dist/src/theming/aether/provider.d.ts +64 -1
  355. package/dist/src/theming/aether/provider.d.ts.map +1 -1
  356. package/dist/src/theming/{core → base}/fontString.d.ts +1 -1
  357. package/dist/src/theming/{core → base}/fontString.d.ts.map +1 -1
  358. package/dist/src/theming/{core → base}/theme.d.ts +39 -0
  359. package/dist/src/theming/{core → base}/theme.d.ts.map +1 -1
  360. package/dist/src/theming/css.d.ts +1 -1
  361. package/dist/src/theming/css.d.ts.map +1 -1
  362. package/dist/src/theming/external.d.ts +1 -1
  363. package/dist/src/tooltip/Config.d.ts.map +1 -1
  364. package/dist/src/tree/Context.d.ts +1 -1
  365. package/dist/src/tree/Tree.d.ts +1 -1
  366. package/dist/src/tree/Tree.d.ts.map +1 -1
  367. package/dist/src/tree/{core.d.ts → base.d.ts} +1 -1
  368. package/dist/src/tree/{core.d.ts.map → base.d.ts.map} +1 -1
  369. package/dist/src/tree/base.spec.d.ts +2 -0
  370. package/dist/src/tree/base.spec.d.ts.map +1 -0
  371. package/dist/src/tree/external.d.ts +2 -1
  372. package/dist/src/tree/external.d.ts.map +1 -1
  373. package/dist/src/triggers/Text.d.ts +2 -2
  374. package/dist/src/user/queries.d.ts +4 -4
  375. package/dist/src/user/queries.d.ts.map +1 -1
  376. package/dist/src/view/index.d.ts +2 -0
  377. package/dist/src/view/index.d.ts.map +1 -0
  378. package/dist/src/view/queries.d.ts +35 -0
  379. package/dist/src/view/queries.d.ts.map +1 -0
  380. package/dist/src/view/queries.spec.d.ts +2 -0
  381. package/dist/src/view/queries.spec.d.ts.map +1 -0
  382. package/dist/src/viewport/Mask.d.ts.map +1 -1
  383. package/dist/src/viewport/SelectMode.d.ts.map +1 -1
  384. package/dist/src/vis/button/aether/button.d.ts +15 -6
  385. package/dist/src/vis/button/aether/button.d.ts.map +1 -1
  386. package/dist/src/vis/button/aether/button.spec.d.ts +2 -0
  387. package/dist/src/vis/button/aether/button.spec.d.ts.map +1 -0
  388. package/dist/src/vis/button/use.d.ts +1 -1
  389. package/dist/src/vis/button/use.d.ts.map +1 -1
  390. package/dist/src/vis/diagram/Diagram.d.ts +6 -6
  391. package/dist/src/vis/diagram/Diagram.d.ts.map +1 -1
  392. package/dist/src/vis/diagram/aether/types.d.ts +2 -2
  393. package/dist/src/vis/diagram/align.d.ts.map +1 -1
  394. package/dist/src/vis/draw2d/canvas.d.ts.map +1 -1
  395. package/dist/src/vis/draw2d/index.d.ts +1 -1
  396. package/dist/src/vis/draw2d/index.d.ts.map +1 -1
  397. package/dist/src/vis/gauge/aether/gauge.d.ts +1 -1
  398. package/dist/src/vis/gauge/use.d.ts +2 -2
  399. package/dist/src/vis/input/aether/input.d.ts +11 -6
  400. package/dist/src/vis/input/aether/input.d.ts.map +1 -1
  401. package/dist/src/vis/input/use.d.ts.map +1 -1
  402. package/dist/src/vis/legend/Container.d.ts.map +1 -1
  403. package/dist/src/vis/legend/Grouped.d.ts.map +1 -1
  404. package/dist/src/vis/legend/Simple.d.ts.map +1 -1
  405. package/dist/src/vis/line/Line.d.ts.map +1 -1
  406. package/dist/src/vis/measure/aether/measure.d.ts +1 -1
  407. package/dist/src/vis/render/loop.d.ts +1 -1
  408. package/dist/src/vis/rule/Rule.d.ts.map +1 -1
  409. package/dist/src/vis/setpoint/aether/setpoint.d.ts +11 -6
  410. package/dist/src/vis/setpoint/aether/setpoint.d.ts.map +1 -1
  411. package/dist/src/vis/setpoint/use.d.ts.map +1 -1
  412. package/dist/src/vis/text/atlas.d.ts.map +1 -1
  413. package/dist/src/vis/toggle/aether/toggle.d.ts +12 -3
  414. package/dist/src/vis/toggle/aether/toggle.d.ts.map +1 -1
  415. package/dist/src/vis/toggle/aether/toggle.spec.d.ts +2 -0
  416. package/dist/src/vis/toggle/aether/toggle.spec.d.ts.map +1 -0
  417. package/dist/src/vis/toggle/use.d.ts +1 -1
  418. package/dist/src/vis/toggle/use.d.ts.map +1 -1
  419. package/dist/src/vis/value/use.d.ts +2 -2
  420. package/dist/src/workspace/queries.d.ts +7 -7
  421. package/dist/src/workspace/queries.d.ts.map +1 -1
  422. package/dist/tabs.cjs +1 -1
  423. package/dist/tabs.js +1 -1
  424. package/dist/text.cjs +1 -1
  425. package/dist/text.js +2 -2
  426. package/dist/theme.css +136 -124
  427. package/dist/theming.cjs +1 -1
  428. package/dist/theming.js +2 -2
  429. package/dist/tree.cjs +1 -1
  430. package/dist/tree.js +1 -1
  431. package/dist/triggers.cjs +1 -1
  432. package/dist/triggers.js +1 -1
  433. package/dist/types-B5-Tni3G.js +82 -0
  434. package/dist/types-C0tUDfsz.cjs +1 -0
  435. package/dist/units-Bd_mf9Ye.cjs +1 -0
  436. package/dist/{units-CgMHbHoA.js → units-CEfK1L7C.js} +1 -1
  437. package/dist/{value-CzFrd9p6.js → value-BmuhX6zs.js} +2278 -2285
  438. package/dist/value-CZfzRi_x.cjs +53 -0
  439. package/dist/video.cjs +1 -1
  440. package/dist/video.js +1 -1
  441. package/package.json +25 -23
  442. package/dist/Animated-D-pQ3CYh.cjs +0 -1
  443. package/dist/Button-D5aoG3sV.cjs +0 -1
  444. package/dist/Haul-9RVCn3cI.cjs +0 -1
  445. package/dist/Menu-BYca9tGe.cjs +0 -1
  446. package/dist/Menu-CQsrN_mP.js +0 -134
  447. package/dist/Provider-DBg-Li_7.cjs +0 -5
  448. package/dist/Tags-CQFa3kY-.cjs +0 -1
  449. package/dist/external-DDHknds-.cjs +0 -1
  450. package/dist/external-DcMOF1Je.cjs +0 -1
  451. package/dist/external-JpvbclD8.cjs +0 -79
  452. package/dist/external-RkrrZXG5.cjs +0 -1
  453. package/dist/hooks-CRSphXSb.cjs +0 -1
  454. package/dist/provider-DHDqgF1B.cjs +0 -76
  455. package/dist/src/arc/handle/Core.d.ts +0 -8
  456. package/dist/src/flux/core/index.d.ts +0 -2
  457. package/dist/src/flux/core/index.d.ts.map +0 -1
  458. package/dist/src/flux/core/store.spec.d.ts.map +0 -1
  459. package/dist/src/flux/core/streamer.spec.d.ts.map +0 -1
  460. package/dist/src/form/synced.d.ts +0 -26
  461. package/dist/src/form/synced.d.ts.map +0 -1
  462. package/dist/src/lineplot/aether/BoundQuerier.d.ts +0 -35
  463. package/dist/src/lineplot/aether/BoundQuerier.d.ts.map +0 -1
  464. package/dist/src/lineplot/useBoundQuerier.d.ts +0 -11
  465. package/dist/src/lineplot/useBoundQuerier.d.ts.map +0 -1
  466. package/dist/src/observe/index.d.ts +0 -2
  467. package/dist/src/observe/index.d.ts.map +0 -1
  468. package/dist/src/observe/use.d.ts +0 -8
  469. package/dist/src/observe/use.d.ts.map +0 -1
  470. package/dist/src/status/core/Aggregator.spec.d.ts.map +0 -1
  471. package/dist/src/status/core/Notification.spec.d.ts.map +0 -1
  472. package/dist/src/status/core/index.d.ts.map +0 -1
  473. package/dist/src/testutil/Aether.d.ts +0 -4
  474. package/dist/src/testutil/Aether.d.ts.map +0 -1
  475. package/dist/src/text/core/dimensions.spec.d.ts.map +0 -1
  476. package/dist/src/text/core/external.d.ts.map +0 -1
  477. package/dist/src/text/core/index.d.ts.map +0 -1
  478. package/dist/src/tree/core.spec.d.ts +0 -2
  479. package/dist/src/tree/core.spec.d.ts.map +0 -1
  480. package/dist/types-8-Mr79SF.cjs +0 -1
  481. package/dist/types-DGaZ_JZb.js +0 -82
  482. package/dist/units-InoNiVrK.cjs +0 -1
  483. package/dist/value-QHhF9WPA.cjs +0 -53
  484. /package/dist/src/flux/{core → base}/client.d.ts +0 -0
  485. /package/dist/src/flux/{core → base}/external.d.ts +0 -0
  486. /package/dist/src/flux/{core → base}/store.d.ts +0 -0
  487. /package/dist/src/flux/{core → base}/store.spec.d.ts +0 -0
  488. /package/dist/src/flux/{core → base}/streamer.spec.d.ts +0 -0
  489. /package/dist/src/flux/{core → base}/types.d.ts +0 -0
  490. /package/dist/src/status/{core → base}/Aggregator.d.ts +0 -0
  491. /package/dist/src/status/{core → base}/Aggregator.spec.d.ts +0 -0
  492. /package/dist/src/status/{core → base}/CreateIcon.d.ts +0 -0
  493. /package/dist/src/status/{core → base}/Indicator.d.ts +0 -0
  494. /package/dist/src/status/{core → base}/Notification.d.ts +0 -0
  495. /package/dist/src/status/{core → base}/Notification.spec.d.ts +0 -0
  496. /package/dist/src/status/{core → base}/Summary.d.ts +0 -0
  497. /package/dist/src/status/{core → base}/colors.d.ts +0 -0
  498. /package/dist/src/status/{core → base}/external.d.ts +0 -0
  499. /package/dist/src/status/{core → base}/index.d.ts +0 -0
  500. /package/dist/src/text/{core → base}/dimensions.spec.d.ts +0 -0
  501. /package/dist/src/text/{core → base}/external.d.ts +0 -0
  502. /package/dist/src/text/{core → base}/index.d.ts +0 -0
  503. /package/dist/src/text/{core → base}/types.d.ts +0 -0
@@ -0,0 +1,84 @@
1
+ "use strict";const Ne=require("./jsx-runtime-nZSsnGb7.cjs"),Pn=require("./Button-BSek5HG5.cjs"),ve=require("./css-D3NdC2sx.cjs"),cr=require("react"),LN=require("./Provider-BA3zQVbv.cjs"),ka=require("./Text-DW5FpCk9.cjs"),Ys=require("./event-BxvV3arE.cjs"),ja=require("./Tags-DWsEZD9t.cjs"),HN=require("./Dialog-BpjxXSmw.cjs"),Ub=require("./Animated-Dvm2k_z_.cjs"),ir=require("./Box-D27bV7QJ.cjs"),on=require("./Editable-C-z-stcD.cjs");require("./types-C0tUDfsz.cjs");const Il=require("./Items-07R286kW.cjs"),GN=require("./useStaticData-BTwIe0Il.cjs");;/* empty css */require("./eraser-Bocga8Eb.cjs");require("./Haul-WgPKptr9.cjs");require("./provider-DksyuJua.cjs");const Wb=({format:e="dateTime",suppliedTZ:t="UTC",displayTZ:r="local",children:n,...a})=>Ne.jsxRuntimeExports.jsx(on.Text,{...a,children:new ve.d(n,t).toString(e,r)}),VN=(e,t,r)=>e==="preview"&&r===!0?"var(--pluto-primary-z)":t,Jb=({ref:e,className:t,value:r,ghost:n,disabled:a,onChange:i,inputType:o,size:s,variant:u="text",style:l,color:c,borderColor:f,borderWidth:m,bordered:d,rounded:h,background:p,textColor:y,onClick:w,...D})=>Ne.jsxRuntimeExports.jsx(Pn.Button,{el:"label",variant:u,className:ve.CSS(ve.CSS.BE("input",o),t),ghost:n,disabled:a,size:s,preventClick:!0,style:l,color:c,borderColor:f,borderWidth:m,bordered:d,rounded:h,background:p,textColor:VN(u,y,r),onClick:w,children:u!=="preview"?Ne.jsxRuntimeExports.jsxs(Ne.jsxRuntimeExports.Fragment,{children:[Ne.jsxRuntimeExports.jsx("input",{className:ve.CSS.BE("input",o,"input"),type:"checkbox",ref:e,checked:r,onChange:v=>{v.stopPropagation(),i?.(v.target.checked)},value:"",disabled:a,onClick:w,...D}),Ne.jsxRuntimeExports.jsx("span",{className:ve.CSS.BE("input",o,"indicator"),onClick:w})]}):r?"True":"False"}),UN=e=>Ne.jsxRuntimeExports.jsx(Jb,{...e,inputType:"checkbox"}),Kb="cursor-style",mh=(e,t=document.head)=>{Yb();const r=document.createElement("style");r.innerHTML=`*{cursor: ${e} !important;}`,r.id=Kb,t.appendChild(r)},Yb=()=>{const e=document.getElementById(Kb);e?.remove()},dh=(e,t,r,n,a)=>{const{x:i,y:o}=n??ve.Au.construct(ve.Eu.dims(a));if(ve.Eu.width(t)>i&&ve.Eu.width(t)>ve.Eu.height(t)){const s=ve.Eu.signedWidth(t)<0?i:-i;e+=(ve.Eu.signedWidth(t)+s)*r.x,mh("ew-resize")}if(ve.Eu.height(t)>o&&ve.Eu.height(t)>ve.Eu.width(t)){const s=ve.Eu.signedHeight(t)<0?o:-o;e+=(ve.Eu.signedHeight(t)+s)*r.y,mh("ns-resize")}return e},vc=({direction:e,className:t,dragScale:r={x:10,y:1},dragThreshold:n=15,dragDirection:a,onChange:i,value:o,resetValue:s,onDragEnd:u,...l})=>{const c=cr.useRef({dragging:!1,curr:o,prev:o}),f=cr.useRef(null);c.current.dragging||(c.current.prev=o);const m=cr.useMemo(()=>{const p=ve.Au.construct(r);return a==="x"?ve.Au.construct(p.x,0):a==="y"?ve.Au.construct(0,p.y):p},[r,a]),d=cr.useMemo(()=>n!=null?ve.Au.construct(n):null,[n]);LN.useVirtualCursorDragWebKit({ref:f,onMove:cr.useCallback(p=>{if(f.current==null)return;let y=c.current.prev;c.current.dragging=!0,y=dh(y,p,m,d,ve.Eu.construct(f.current)),c.current.curr=y,i(y)},[i,m,d]),onEnd:cr.useCallback((p,y)=>{if(f.current==null)return;let w=c.current.prev;w=dh(w,p,m,d,ve.Eu.construct(f.current)),c.current.prev=w,c.current.dragging=!1,Yb(),u?.(w),l.onBlur?.()},[l.onBlur,u,m,d])});const h=cr.useCallback(()=>{i(s??c.current.prev)},[i,s]);return Ne.jsxRuntimeExports.jsx(Pn.Button,{ref:f,variant:"outlined",className:ve.CSS(ve.CSS.BE("input","drag-btn"),e!=null&&ve.CSS.BEM("input","drag-btn","direction",e),t),tabIndex:-1,onDoubleClick:h,onClick:Ys.preventDefault,contrast:0,textColor:9,...l,children:Ne.jsxRuntimeExports.jsx(ka.Drag,{})})},WN={x:Number(ve.d.HOUR.valueOf()),y:Number(ve.d.days(.75).valueOf())},Zb=({value:e,onChange:t})=>{const r=new ve.d(e,"UTC");cr.useLayoutEffect(()=>{const i=r.sub(ve.d.utcOffset);if(i.remainder(ve.d.DAY).isZero)return;const o=i.sub(i.remainder(ve.d.DAY));t(Number(new ve.d(o,"local").valueOf()))},[e]);const n=i=>{let o;if(typeof i=="number")o=new ve.d(i,"UTC");else{if(i.length===0)return;o=new ve.d(i,"local")}t(Number(o.valueOf()))};return{value:r.toString("ISODate","local"),onChange:n}},JN=({ref:e,onChange:t,value:r,className:n,showDragHandle:a=!0,children:i,...o})=>{const{value:s,onChange:u}=Zb({value:r,onChange:t});return Ne.jsxRuntimeExports.jsxs(ja.Text,{ref:e,value:s,className:ve.CSS(ve.CSS.B("input-date"),n),onChange:u,type:"date",...o,children:[a&&Ne.jsxRuntimeExports.jsx(vc,{value:r,onChange:u,dragScale:WN}),i]})},KN={one:{},two:{},three:{},four:{}},YN={one:{},two:{},three:{}},ZN={},QN=[],Yf={methods:KN,model:YN,compute:ZN,hooks:QN},XN=e=>Object.prototype.toString.call(e)==="[object Array]",eA={compute:function(e){const{world:t}=this,r=t.compute;return typeof e=="string"&&r.hasOwnProperty(e)?r[e](this):XN(e)?e.forEach(n=>{t.compute.hasOwnProperty(n)?r[n](this):console.warn("no compute:",e)}):typeof e=="function"?e(this):console.warn("no compute:",e),this}},tA=function(e){return this.fullPointer.forEach((r,n)=>{const a=this.update([r]);e(a,n)}),this},rA=function(e,t){const n=this.fullPointer.map((i,o)=>{const s=this.update([i]),u=e(s,o);return u===void 0?this.none():u});if(n.length===0)return t||this.update([]);if(n[0]!==void 0&&(typeof n[0]=="string"||typeof n[0]=="object"&&(n[0]===null||!n[0].isView)))return n;let a=[];return n.forEach(i=>{a=a.concat(i.fullPointer)}),this.toView(a)},nA=function(e){let t=this.fullPointer;return t=t.filter((n,a)=>{const i=this.update([n]);return e(i,a)}),this.update(t)},aA=function(e){const r=this.fullPointer.find((n,a)=>{const i=this.update([n]);return e(i,a)});return this.update([r])},iA=function(e){return this.fullPointer.some((r,n)=>{const a=this.update([r]);return e(a,n)})},oA=function(e=1){let t=this.fullPointer,r=Math.floor(Math.random()*t.length);return r+e>this.length&&(r=this.length-e,r=r<0?0:r),t=t.slice(r,r+e),this.update(t)},sA={forEach:tA,map:rA,filter:nA,find:aA,some:iA,random:oA},Zn={termList:function(){return this.methods.one.termList(this.docs)},terms:function(e){const t=this.match(".");return typeof e=="number"?t.eq(e):t},groups:function(e){if(e||e===0)return this.update(this._groups[e]||[]);const t={};return Object.keys(this._groups).forEach(r=>{t[r]=this.update(this._groups[r])}),t},eq:function(e){let t=this.pointer;return t||(t=this.docs.map((r,n)=>[n])),t[e]?this.update([t[e]]):this.none()},first:function(){return this.eq(0)},last:function(){const e=this.fullPointer.length-1;return this.eq(e)},firstTerms:function(){return this.match("^.")},lastTerms:function(){return this.match(".$")},slice:function(e,t){let r=this.pointer||this.docs.map((n,a)=>[a]);return r=r.slice(e,t),this.update(r)},all:function(){return this.update().toView()},fullSentences:function(){const e=this.fullPointer.map(t=>[t[0]]);return this.update(e).toView()},none:function(){return this.update([])},isDoc:function(e){if(!e||!e.isView)return!1;const t=this.fullPointer,r=e.fullPointer;return!t.length===r.length?!1:t.every((n,a)=>r[a]?n[0]===r[a][0]&&n[1]===r[a][1]&&n[2]===r[a][2]:!1)},wordCount:function(){return this.docs.reduce((e,t)=>(e+=t.filter(r=>r.text!=="").length,e),0)},isFull:function(){const e=this.pointer;if(!e)return!0;if(e.length===0||e[0][0]!==0)return!1;let t=0,r=0;return this.document.forEach(n=>t+=n.length),this.docs.forEach(n=>r+=n.length),t===r},getNth:function(e){return typeof e=="number"?this.eq(e):typeof e=="string"?this.if(e):this}};Zn.group=Zn.groups;Zn.fullSentence=Zn.fullSentences;Zn.sentence=Zn.fullSentences;Zn.lastTerm=Zn.lastTerms;Zn.firstTerm=Zn.firstTerms;const Zf=Object.assign({},Zn,eA,sA);Zf.get=Zf.eq;class si{constructor(t,r,n={}){[["document",t],["world",Yf],["_groups",n],["_cache",null],["viewType","View"]].forEach(i=>{Object.defineProperty(this,i[0],{value:i[1],writable:!0})}),this.ptrs=r}get docs(){let t=this.document;return this.ptrs&&(t=Yf.methods.one.getDoc(this.ptrs,this.document)),t}get pointer(){return this.ptrs}get methods(){return this.world.methods}get model(){return this.world.model}get hooks(){return this.world.hooks}get isView(){return!0}get found(){return this.docs.length>0}get length(){return this.docs.length}get fullPointer(){const{docs:t,ptrs:r,document:n}=this;return(r||t.map((i,o)=>[o])).map(i=>{let[o,s,u,l,c]=i;return s=s||0,u=u||(n[o]||[]).length,n[o]&&n[o][s]&&(l=l||n[o][s].id,n[o][u-1]&&(c=c||n[o][u-1].id)),[o,s,u,l,c]})}update(t){const r=new si(this.document,t);if(this._cache&&t&&t.length>0){const n=[];t.forEach((a,i)=>{const[o,s,u]=a;a.length===1?n[i]=this._cache[o]:s===0&&this.document[o].length===u&&(n[i]=this._cache[o])}),n.length>0&&(r._cache=n)}return r.world=this.world,r}toView(t){return new si(this.document,t||this.pointer)}fromText(t){const{methods:r}=this,n=r.one.tokenize.fromString(t,this.world),a=new si(n);return a.world=this.world,a.compute(["normal","freeze","lexicon"]),this.world.compute.preTagger&&a.compute("preTagger"),a.compute("unfreeze"),a}clone(){let t=this.document.slice(0);t=t.map(n=>n.map(a=>(a=Object.assign({},a),a.tags=new Set(a.tags),a)));const r=this.update(this.pointer);return r.document=t,r._cache=this._cache,r}}Object.assign(si.prototype,Zf);const uA="14.14.5",hh=function(e){return e&&typeof e=="object"&&!Array.isArray(e)},lA=function(e){return Object.prototype.toString.call(e)==="[object Array]"};function Qb(e,t){if(hh(t))for(const r in t)hh(t[r])?(e[r]||Object.assign(e,{[r]:{}}),Qb(e[r],t[r])):Object.assign(e,{[r]:t[r]});return e}function cA(e,t){for(const r in t)e[r]=e[r]||{},Object.assign(e[r],t[r]);return e}const fA=function(e,t){const r=e.two.models||{};Object.keys(t).forEach(n=>{t[n].pastTense&&(r.toPast&&(r.toPast.ex[n]=t[n].pastTense),r.fromPast&&(r.fromPast.ex[t[n].pastTense]=n)),t[n].presentTense&&(r.toPresent&&(r.toPresent.ex[n]=t[n].presentTense),r.fromPresent&&(r.fromPresent.ex[t[n].presentTense]=n)),t[n].gerund&&(r.toGerund&&(r.toGerund.ex[n]=t[n].gerund),r.fromGerund&&(r.fromGerund.ex[t[n].gerund]=n)),t[n].comparative&&(r.toComparative&&(r.toComparative.ex[n]=t[n].comparative),r.fromComparative&&(r.fromComparative.ex[t[n].comparative]=n)),t[n].superlative&&(r.toSuperlative&&(r.toSuperlative.ex[n]=t[n].superlative),r.fromSuperlative&&(r.fromSuperlative.ex[t[n].superlative]=n))})},Xb=function(e,t,r,n){if(lA(e)){e.forEach(u=>Xb(u,t,r,n));return}const{methods:a,model:i,compute:o,hooks:s}=t;e.methods&&cA(a,e.methods),e.model&&Qb(i,e.model),e.irregulars&&fA(i,e.irregulars),e.compute&&Object.assign(o,e.compute),s&&(t.hooks=s.concat(e.hooks||[])),e.api&&e.api(r),e.lib&&Object.keys(e.lib).forEach(u=>n[u]=e.lib[u]),e.tags&&n.addTags(e.tags),e.words&&n.addWords(e.words),e.frozen&&n.addWords(e.frozen,!0),e.mutate&&e.mutate(t,n)},mA=function(e){const t=typeof process>"u"||!process.env?self.env||{}:process.env;return t.DEBUG_TAGS=e==="tagger"||e===!0?!0:"",t.DEBUG_MATCH=e==="match"||e===!0?!0:"",t.DEBUG_CHUNKS=e==="chunker"||e===!0?!0:"",this},dA=e=>Object.prototype.toString.call(e)==="[object Object]",Qf=function(e){return Object.prototype.toString.call(e)==="[object Array]"},hA=function(e){return e.map(t=>t.terms.map(r=>(Qf(r.tags)&&(r.tags=new Set(r.tags)),r)))},pA=function(e){return e.map(t=>t.map(r=>({text:r,normal:r,pre:"",post:" ",tags:new Set})))},ew=function(e,t,r){const{methods:n}=r,a=new t([]);if(a.world=r,typeof e=="number"&&(e=String(e)),!e)return a;if(typeof e=="string"){const i=n.one.tokenize.fromString(e,r);return new t(i)}if(dA(e)&&e.isView)return new t(e.document,e.ptrs);if(Qf(e)){if(Qf(e[0])){const o=pA(e);return new t(o)}const i=hA(e);return new t(i)}return a},zl=Object.assign({},Yf),tt=function(e,t){t&&tt.addWords(t);const r=ew(e,si,zl);return e&&r.compute(zl.hooks),r};Object.defineProperty(tt,"_world",{value:zl,writable:!0});tt.tokenize=function(e,t){const{compute:r}=this._world;t&&tt.addWords(t);const n=ew(e,si,zl);return r.contractions&&n.compute(["alias","normal","machine","contractions"]),n};tt.plugin=function(e){return Xb(e,this._world,si,this),this};tt.extend=tt.plugin;tt.world=function(){return this._world};tt.model=function(){return this._world.model};tt.methods=function(){return this._world.methods};tt.hooks=function(){return this._world.hooks};tt.verbose=mA;tt.version=uA;const gA=function(e){return e.map(r=>{const n=new Set;return r.forEach(a=>{a.normal!==""&&n.add(a.normal),a.switch&&n.add(`%${a.switch}%`),a.implicit&&n.add(a.implicit),a.machine&&n.add(a.machine),a.root&&n.add(a.root),a.alias&&a.alias.forEach(o=>n.add(o));const i=Array.from(a.tags);for(let o=0;o<i.length;o+=1)n.add("#"+i[o])}),n})},vA={one:{cacheDoc:gA}},yA={cache:function(){return this._cache=this.methods.one.cacheDoc(this.document),this},uncache:function(){return this._cache=null,this}},bA=function(e){Object.assign(e.prototype,yA)},wA={cache:function(e){e._cache=e.methods.one.cacheDoc(e.document)}},xA={api:bA,compute:wA,methods:vA},DA={toLowerCase:function(){return this.termList().forEach(e=>{e.text=e.text.toLowerCase()}),this},toUpperCase:function(){return this.termList().forEach(e=>{e.text=e.text.toUpperCase()}),this},toTitleCase:function(){return this.termList().forEach(e=>{e.text=e.text.replace(/^ *[a-z\u00C0-\u00FF]/,t=>t.toUpperCase())}),this},toCamelCase:function(){return this.docs.forEach(e=>{e.forEach((t,r)=>{r!==0&&(t.text=t.text.replace(/^ *[a-z\u00C0-\u00FF]/,n=>n.toUpperCase())),r!==e.length-1&&(t.post="")})}),this}},ph=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),NA=e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),AA=e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),tw=(e,t,r)=>{if(r.forEach(n=>n.dirty=!0),e){const n=[t,0].concat(r);Array.prototype.splice.apply(e,n)}return e},$o=function(e){const t=/ $/,r=/[-–—]/,n=e[e.length-1];n&&!t.test(n.post)&&!r.test(n.post)&&(n.post+=" ")},gh=(e,t,r)=>{const n=/[-.?!,;:)–—'"]/g,a=e[t-1];if(!a)return;const i=a.post;if(n.test(i)){const o=i.match(n).join(""),s=r[r.length-1];s.post=o+s.post,a.post=a.post.replace(n,"")}},CA=function(e,t,r){const n=e[t];if(t!==0||!ph(n.text))return;r[0].text=NA(r[0].text);const a=e[t];a.tags.has("ProperNoun")||a.tags.has("Acronym")||ph(a.text)&&a.text.length>1&&(a.text=AA(a.text))},EA=function(e,t,r,n){const[a,i,o]=t;i===0||o===n[a].length?$o(r):($o(r),$o([e[t[1]]])),CA(e,i,r),tw(e,i,r)},SA=function(e,t,r,n){const[a,,i]=t,o=(n[a]||[]).length;i<o?(gh(e,i,r),$o(r)):o===i&&($o(e),gh(e,i,r),n[a+1]&&(r[r.length-1].post+=" ")),tw(e,t[2],r),t[4]=r[r.length-1].id};let gs=0;const vh=e=>(e=e.length<3?"0"+e:e,e.length<3?"0"+e:e),rw=function(e){let[t,r]=e.index||[0,0];gs+=1,gs=gs>46655?0:gs,t=t>46655?0:t,r=r>1294?0:r;let n=vh(gs.toString(36));n+=vh(t.toString(36));let a=r.toString(36);a=a.length<2?"0"+a:a,n+=a;const i=parseInt(Math.random()*36,10);return n+=i.toString(36),e.normal+"|"+n.toUpperCase()},yh=function(e){e.has("@hasContraction")&&typeof e.contractions=="function"&&e.grow("@hasContraction").contractions().expand()},bh=e=>Object.prototype.toString.call(e)==="[object Array]",MA=function(e){return e=e.map(t=>(t.id=rw(t),t)),e},TA=function(e,t){const{methods:r}=t;return typeof e=="string"?r.one.tokenize.fromString(e,t)[0]:typeof e=="object"&&e.isView?e.clone().docs[0]||[]:bh(e)?bh(e[0])?e[0]:e:[]},wh=function(e,t,r){const{document:n,world:a}=t;t.uncache();const i=t.fullPointer,o=t.fullPointer;t.forEach((u,l)=>{const c=u.fullPointer[0],[f]=c,m=n[f];let d=TA(e,a);d.length!==0&&(d=MA(d),r?(yh(t.update([c]).firstTerm()),EA(m,c,d,n)):(yh(t.update([c]).lastTerm()),SA(m,c,d,n)),n[f]&&n[f][c[1]]&&(c[3]=n[f][c[1]].id),o[l]=c,c[2]+=d.length,i[l]=c)});const s=t.toView(i);return t.ptrs=o,s.compute(["id","index","freeze","lexicon"]),s.world.compute.preTagger&&s.compute("preTagger"),s.compute("unfreeze"),s},Yi={insertAfter:function(e){return wh(e,this,!1)},insertBefore:function(e){return wh(e,this,!0)}};Yi.append=Yi.insertAfter;Yi.prepend=Yi.insertBefore;Yi.insert=Yi.insertAfter;const FA=/\$[0-9a-z]+/g,od={},PA=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e)||new RegExp("^\\p{Lu}$","u").test(e),kA=e=>e.replace(new RegExp("^\\p{Ll}","u"),t=>t.toUpperCase()),OA=e=>e.replace(new RegExp("^\\p{Lu}","u"),t=>t.toLowerCase()),$A=function(e,t,r){return e.forEach(n=>{const a=t(n);n.replaceWith(a,r)}),e},BA=function(e,t){if(typeof e!="string")return e;const r=t.groups();return e=e.replace(FA,n=>{const a=n.replace(/\$/,"");return r.hasOwnProperty(a)?r[a].text():n}),e};od.replaceWith=function(e,t={}){let r=this.fullPointer;const n=this;if(this.uncache(),typeof e=="function")return $A(n,e,t);const a=n.docs[0];if(!a)return n;const i=t.possessives&&a[a.length-1].tags.has("Possessive"),o=t.case&&PA(a[0].text);e=BA(e,n);const s=this.update(r);r=r.map(m=>m.slice(0,3));const u=(s.docs[0]||[]).map(m=>Array.from(m.tags)),l=s.docs[0][0].pre,c=s.docs[0][s.docs[0].length-1].post;if(typeof e=="string"&&(e=this.fromText(e).compute("id")),n.insertAfter(e),s.has("@hasContraction")&&n.contractions&&n.grow("@hasContraction+").contractions().expand(),n.delete(s),i){const m=n.docs[0],d=m[m.length-1];d.tags.has("Possessive")||(d.text+="'s",d.normal+="'s",d.tags.add("Possessive"))}if(l&&n.docs[0]&&(n.docs[0][0].pre=l),c&&n.docs[0]){const m=n.docs[0][n.docs[0].length-1];m.post.trim()||(m.post=c)}const f=n.toView(r).compute(["index","freeze","lexicon"]);if(f.world.compute.preTagger&&f.compute("preTagger"),f.compute("unfreeze"),t.tags&&f.terms().forEach((m,d)=>{m.tagSafe(u[d])}),!f.docs[0]||!f.docs[0][0])return f;if(t.case){const m=o?kA:OA;f.docs[0][0].text=m(f.docs[0][0].text)}return f};od.replace=function(e,t,r){if(e&&!t)return this.replaceWith(e,r);const n=this.match(e);return n.found?(this.soften(),n.replaceWith(t,r)):this};const _A=function(e,t){const r=e.length-1,n=e[r],a=e[r-t];a&&n&&(a.post+=n.post,a.post=a.post.replace(/ +([.?!,;:])/,"$1"),a.post=a.post.replace(/[,;:]+([.?!])/,"$1"))},IA=function(e,t){t.forEach(r=>{const[n,a,i]=r,o=i-a;e[n]&&(i===e[n].length&&i>1&&_A(e[n],o),e[n].splice(a,o))});for(let r=e.length-1;r>=0;r-=1)if(e[r].length===0&&(e.splice(r,1),r===e.length&&e[r-1])){const n=e[r-1],a=n[n.length-1];a&&(a.post=a.post.trimEnd())}return e},zA=function(e,t){return e=e.map(r=>{const[n]=r;return t[n]&&t[n].forEach(a=>{const i=a[2]-a[1];r[1]<=a[1]&&r[2]>=a[2]&&(r[2]-=i)}),r}),e.forEach((r,n)=>{if(r[1]===0&&r[2]==0)for(let a=n+1;a<e.length;a+=1)e[a][0]-=1,e[a][0]<0&&(e[a][0]=0)}),e=e.filter(r=>r[2]-r[1]>0),e=e.map(r=>(r[3]=null,r[4]=null,r)),e},Xf={remove:function(e){const{indexN:t}=this.methods.one.pointer;this.uncache();let r=this.all(),n=this;e&&(r=this,n=this.match(e));const a=!r.ptrs;n.has("@hasContraction")&&n.contractions&&n.grow("@hasContraction").contractions().expand();let i=r.fullPointer;const o=n.fullPointer.reverse(),s=IA(this.document,o),u=t(o);return i=zA(i,u),r.ptrs=i,r.document=s,r.compute("index"),a&&(r.ptrs=void 0),e?r.toView(i):(this.ptrs=[],r.none())}};Xf.delete=Xf.remove;const Is={pre:function(e,t){return e===void 0&&this.found?this.docs[0][0].pre:(this.docs.forEach(r=>{const n=r[0];t===!0?n.pre+=e:n.pre=e}),this)},post:function(e,t){if(e===void 0){const r=this.docs[this.docs.length-1];return r[r.length-1].post}return this.docs.forEach(r=>{const n=r[r.length-1];t===!0?n.post+=e:n.post=e}),this},trim:function(){if(!this.found)return this;const e=this.docs,t=e[0][0];t.pre=t.pre.trimStart();const r=e[e.length-1],n=r[r.length-1];return n.post=n.post.trimEnd(),this},hyphenate:function(){return this.docs.forEach(e=>{e.forEach((t,r)=>{r!==0&&(t.pre=""),e[r+1]&&(t.post="-")})}),this},dehyphenate:function(){const e=/[-–—]/;return this.docs.forEach(t=>{t.forEach(r=>{e.test(r.post)&&(r.post=" ")})}),this},toQuotations:function(e,t){return e=e||'"',t=t||'"',this.docs.forEach(r=>{r[0].pre=e+r[0].pre;const n=r[r.length-1];n.post=t+n.post}),this},toParentheses:function(e,t){return e=e||"(",t=t||")",this.docs.forEach(r=>{r[0].pre=e+r[0].pre;const n=r[r.length-1];n.post=t+n.post}),this}};Is.deHyphenate=Is.dehyphenate;Is.toQuotation=Is.toQuotations;const jA=(e,t)=>e.normal<t.normal?-1:e.normal>t.normal?1:0,qA=(e,t)=>{const r=e.normal.trim().length,n=t.normal.trim().length;return r<n?1:r>n?-1:0},RA=(e,t)=>e.words<t.words?1:e.words>t.words?-1:0,LA=(e,t)=>e[0]<t[0]?1:e[0]>t[0]?-1:e[1]>t[1]?1:-1,HA=function(e){const t={};return e.forEach(r=>{t[r.normal]=t[r.normal]||0,t[r.normal]+=1}),e.sort((r,n)=>{const a=t[r.normal],i=t[n.normal];return a<i?1:a>i?-1:0}),e},Uc={alpha:jA,length:qA,wordCount:RA,sequential:LA,byFreq:HA},GA=new Set(["index","sequence","seq","sequential","chron","chronological"]),VA=new Set(["freq","frequency","topk","repeats"]),UA=new Set(["alpha","alphabetical"]),WA=function(e,t){let r=e.fullPointer;return r=r.sort((n,a)=>(n=e.update([n]),a=e.update([a]),t(n,a))),e.ptrs=r,e},JA=function(e){const{docs:t,pointer:r}=this;if(this.uncache(),typeof e=="function")return WA(this,e);e=e||"alpha";const n=r||t.map((i,o)=>[o]);let a=t.map((i,o)=>({index:o,words:i.length,normal:i.map(s=>s.machine||s.normal||"").join(" "),pointer:n[o]}));return GA.has(e)&&(e="sequential"),UA.has(e)&&(e="alpha"),VA.has(e)?(a=Uc.byFreq(a),this.update(a.map(i=>i.pointer))):typeof Uc[e]=="function"?(a=a.sort(Uc[e]),this.update(a.map(i=>i.pointer))):this},KA=function(){let e=this.pointer||this.docs.map((t,r)=>[r]);return e=[].concat(e),e=e.reverse(),this._cache&&(this._cache=this._cache.reverse()),this.update(e)},YA=function(){const e=new Set;return this.filter(r=>{const n=r.text("machine");return e.has(n)?!1:(e.add(n),!0)})},ZA={unique:YA,reverse:KA,sort:JA},QA=e=>Object.prototype.toString.call(e)==="[object Array]",nw=function(e,t){if(e.length>0){const r=e[e.length-1],n=r[r.length-1];/ /.test(n.post)===!1&&(n.post+=" ")}return e=e.concat(t),e},XA=function(e,t){if(e.document===t.document){const n=e.fullPointer.concat(t.fullPointer);return e.toView(n).compute("index")}return t.fullPointer.forEach(n=>{n[0]+=e.document.length}),e.document=nw(e.document,t.docs),e.all()},e3={concat:function(e){if(typeof e=="string"){const t=this.fromText(e);if(!this.found||!this.ptrs)this.document=this.document.concat(t.document);else{const r=this.fullPointer,n=r[r.length-1][0];this.document.splice(n,0,...t.document)}return this.all().compute("index")}if(typeof e=="object"&&e.isView)return XA(this,e);if(QA(e)){const t=nw(this.document,e);return this.document=t,this.all()}return this}},t3=function(){return this.ptrs=this.fullPointer,this},r3=function(){let e=this.ptrs;return!e||e.length<1?this:(e=e.map(t=>t.slice(0,3)),this.ptrs=e,this)},n3={harden:t3,soften:r3},a3=Object.assign({},DA,Yi,od,Xf,Is,ZA,e3,n3),i3=function(e){Object.assign(e.prototype,a3)},o3={id:function(e){const t=e.docs;for(let r=0;r<t.length;r+=1)for(let n=0;n<t[r].length;n+=1){const a=t[r][n];a.id=a.id||rw(a)}}},s3={api:i3,compute:o3},u3=[{word:"@",out:["at"]},{word:"arent",out:["are","not"]},{word:"alot",out:["a","lot"]},{word:"brb",out:["be","right","back"]},{word:"cannot",out:["can","not"]},{word:"dun",out:["do","not"]},{word:"can't",out:["can","not"]},{word:"shan't",out:["should","not"]},{word:"won't",out:["will","not"]},{word:"that's",out:["that","is"]},{word:"what's",out:["what","is"]},{word:"let's",out:["let","us"]},{word:"dunno",out:["do","not","know"]},{word:"gonna",out:["going","to"]},{word:"gotta",out:["have","got","to"]},{word:"gimme",out:["give","me"]},{word:"outta",out:["out","of"]},{word:"tryna",out:["trying","to"]},{word:"gtg",out:["got","to","go"]},{word:"im",out:["i","am"]},{word:"imma",out:["I","will"]},{word:"imo",out:["in","my","opinion"]},{word:"irl",out:["in","real","life"]},{word:"ive",out:["i","have"]},{word:"rn",out:["right","now"]},{word:"tbh",out:["to","be","honest"]},{word:"wanna",out:["want","to"]},{word:"c'mere",out:["come","here"]},{word:"c'mon",out:["come","on"]},{word:"shoulda",out:["should","have"]},{word:"coulda",out:["coulda","have"]},{word:"woulda",out:["woulda","have"]},{word:"musta",out:["must","have"]},{word:"tis",out:["it","is"]},{word:"twas",out:["it","was"]},{word:"y'know",out:["you","know"]},{word:"ne'er",out:["never"]},{word:"o'er",out:["over"]},{after:"ll",out:["will"]},{after:"ve",out:["have"]},{after:"re",out:["are"]},{after:"m",out:["am"]},{before:"c",out:["ce"]},{before:"m",out:["me"]},{before:"n",out:["ne"]},{before:"qu",out:["que"]},{before:"s",out:["se"]},{before:"t",out:["tu"]},{word:"shouldnt",out:["should","not"]},{word:"couldnt",out:["could","not"]},{word:"wouldnt",out:["would","not"]},{word:"hasnt",out:["has","not"]},{word:"wasnt",out:["was","not"]},{word:"isnt",out:["is","not"]},{word:"cant",out:["can","not"]},{word:"dont",out:["do","not"]},{word:"wont",out:["will","not"]},{word:"howd",out:["how","did"]},{word:"whatd",out:["what","did"]},{word:"whend",out:["when","did"]},{word:"whered",out:["where","did"]}],ln=!0,l3={st:ln,nd:ln,rd:ln,th:ln,am:ln,pm:ln,max:ln,"°":ln,s:ln,e:ln,er:ln,ère:ln,ème:ln},c3={one:{contractions:u3,numberSuffixes:l3}},Wc=function(e,t,r){const[n,a]=t;!r||r.length===0||(r=r.map((i,o)=>(i.implicit=i.text,i.machine=i.text,i.pre="",i.post="",i.text="",i.normal="",i.index=[n,a+o],i)),r[0]&&(r[0].pre=e[n][a].pre,r[r.length-1].post=e[n][a].post,r[0].text=e[n][a].text,r[0].normal=e[n][a].normal),e[n].splice(a,1,...r))},f3=/'/,m3=new Set(["what","how","when","where","why"]),d3=new Set(["be","go","start","think","need"]),h3=new Set(["been","gone"]),p3=function(e,t){const r=e[t].normal.split(f3)[0];if(m3.has(r))return[r,"did"];if(e[t+1]){if(h3.has(e[t+1].normal))return[r,"had"];if(d3.has(e[t+1].normal))return[r,"would"]}return null},g3=function(e,t){return e[t].normal==="ain't"||e[t].normal==="aint"?null:[e[t].normal.replace(/n't/,""),"not"]},sd=/'/,v3=/(e|é|aison|sion|tion)$/,y3=/(age|isme|acle|ege|oire)$/,b3=(e,t)=>{const r=e[t].normal.split(sd)[1];return r&&r.endsWith("e")?["la",r]:["le",r]},w3=(e,t)=>{const r=e[t].normal.split(sd)[1];return r&&v3.test(r)&&!y3.test(r)?["du",r]:r&&r.endsWith("s")?["des",r]:["de",r]},x3=(e,t)=>["je",e[t].normal.split(sd)[1]],Jc={preJ:x3,preL:b3,preD:w3},D3=/^([0-9.]{1,4}[a-z]{0,2}) ?[-–—] ?([0-9]{1,4}[a-z]{0,2})$/i,N3=/^([0-9]{1,2}(:[0-9][0-9])?(am|pm)?) ?[-–—] ?([0-9]{1,2}(:[0-9][0-9])?(am|pm)?)$/i,A3=/^[0-9]{3}-[0-9]{4}$/,C3=function(e,t){const r=e[t];let n=r.text.match(D3);return n!==null?r.tags.has("PhoneNumber")===!0||A3.test(r.text)?null:[n[1],"to",n[2]]:(n=r.text.match(N3),n!==null?[n[1],"to",n[4]]:null)},E3=/^([+-]?[0-9][.,0-9]*)([a-z°²³µ/]+)$/,S3=function(e,t,r){const n=r.model.one.numberSuffixes||{},i=e[t].text.match(E3);if(i!==null){const o=i[2].toLowerCase().trim();return n.hasOwnProperty(o)?null:[i[1],o]}return null},xh=/'/,M3=/^[0-9][^-–—]*[-–—].*?[0-9]/,Dh=function(e,t,r,n){const a=t.update();a.document=[e];let i=r+n;r>0&&(r-=1),e[i]&&(i+=1),a.ptrs=[[0,r,i]]},Nh={t:(e,t)=>g3(e,t),d:(e,t)=>p3(e,t)},Ah={j:(e,t)=>Jc.preJ(e,t),l:(e,t)=>Jc.preL(e,t),d:(e,t)=>Jc.preD(e,t)},T3=function(e,t,r,n){for(let a=0;a<e.length;a+=1){const i=e[a];if(i.word===t.normal)return i.out;if(n!==null&&n===i.after)return[r].concat(i.out);if(r!==null&&r===i.before&&n&&n.length>2)return i.out.concat(n)}return null},Kc=function(e,t){const r=t.fromText(e.join(" "));return r.compute(["id","alias"]),r.docs[0]},F3=function(e,t){for(let r=t+1;r<5&&e[r];r+=1)if(e[r].normal==="been")return["there","has"];return["there","is"]},P3=e=>{const{world:t,document:r}=e,{model:n,methods:a}=t,i=n.one.contractions||[];r.forEach((o,s)=>{for(let u=o.length-1;u>=0;u-=1){let l=null,c=null;if(xh.test(o[u].normal)===!0){const m=o[u].normal.split(xh);l=m[0],c=m[1]}let f=T3(i,o[u],l,c);if(!f&&Nh.hasOwnProperty(c)&&(f=Nh[c](o,u,t)),!f&&Ah.hasOwnProperty(l)&&(f=Ah[l](o,u)),l==="there"&&c==="s"&&(f=F3(o,u)),f){f=Kc(f,e),Wc(r,[s,u],f),Dh(r[s],e,u,f.length);continue}if(M3.test(o[u].normal)){f=C3(o,u),f&&(f=Kc(f,e),Wc(r,[s,u],f),a.one.setTag(f,"NumberRange",t),f[2]&&f[2].tags.has("Time")&&a.one.setTag([f[0]],"Time",t,null,"time-range"),Dh(r[s],e,u,f.length));continue}f=S3(o,u,t),f&&(f=Kc(f,e),Wc(r,[s,u],f),a.one.setTag([f[1]],"Unit",t,null,"contraction-unit"))}})},k3={contractions:P3},O3={model:c3,compute:k3,hooks:["contractions"]},Ch=function(e){const t=e.world,{model:r,methods:n}=e.world,a=n.one.setTag,{frozenLex:i}=r.one,o=r.one._multiCache||{};e.docs.forEach(s=>{for(let u=0;u<s.length;u+=1){const l=s[u],c=l.machine||l.normal;if(o[c]!==void 0&&s[u+1]){const f=u+o[c]-1;for(let m=f;m>u;m-=1){const d=s.slice(u,m+1),h=d.map(p=>p.machine||p.normal).join(" ");if(i.hasOwnProperty(h)===!0){a(d,i[h],t,!1,"1-frozen-multi-lexicon"),d.forEach(p=>p.frozen=!0);continue}}}if(i[c]!==void 0&&i.hasOwnProperty(c)){a([l],i[c],t,!1,"1-freeze-lexicon"),l.frozen=!0;continue}}})},$3=function(e){return e.docs.forEach(t=>{t.forEach(r=>{delete r.frozen})}),e},B3={frozen:Ch,freeze:Ch,unfreeze:$3},Eh=e=>"\x1B[34m"+e+"\x1B[0m",Sh=e=>"\x1B[3m\x1B[2m"+e+"\x1B[0m",Mh=function(e){e.docs.forEach(t=>{console.log(Eh(`
2
+ ┌─────────`)),t.forEach(r=>{let n=` ${Sh("│")} `;const a=r.implicit||r.text||"-";r.frozen===!0?n+=`${Eh(a)} ❄️`:n+=Sh(a),console.log(n)})})},_3={compute:B3,mutate:e=>{const t=e.methods.one;t.termMethods.isFrozen=r=>r.frozen===!0,t.debug.freeze=Mh,t.debug.frozen=Mh},api:function(e){e.prototype.freeze=function(){return this.docs.forEach(t=>{t.forEach(r=>{r.frozen=!0})}),this},e.prototype.unfreeze=function(){this.compute("unfreeze")},e.prototype.isFrozen=function(){return this.match("@isFrozen+")}},hooks:["freeze"]},I3=function(e,t,r){const{model:n,methods:a}=r,i=a.one.setTag,o=n.one._multiCache||{},{lexicon:s}=n.one||{},u=e[t],l=u.machine||u.normal;if(o[l]!==void 0&&e[t+1]){const c=t+o[l]-1;for(let f=c;f>t;f-=1){const m=e.slice(t,f+1);if(m.length<=1)return!1;const d=m.map(h=>h.machine||h.normal).join(" ");if(s.hasOwnProperty(d)===!0){const h=s[d];return i(m,h,r,!1,"1-multi-lexicon"),h&&h.length===2&&(h[0]==="PhrasalVerb"||h[1]==="PhrasalVerb")&&i([m[1]],"Particle",r,!1,"1-phrasal-particle"),!0}}return!1}return null},Th=/^(under|over|mis|re|un|dis|semi|pre|post)-?/,z3=new Set(["Verb","Infinitive","PastTense","Gerund","PresentTense","Adjective","Participle"]),j3=function(e,t,r){const{model:n,methods:a}=r,i=a.one.setTag,{lexicon:o}=n.one,s=e[t],u=s.machine||s.normal;if(o[u]!==void 0&&o.hasOwnProperty(u))return i([s],o[u],r,!1,"1-lexicon"),!0;if(s.alias){const l=s.alias.find(c=>o.hasOwnProperty(c));if(l)return i([s],o[l],r,!1,"1-lexicon-alias"),!0}if(Th.test(u)===!0){const l=u.replace(Th,"");if(o.hasOwnProperty(l)&&l.length>3&&z3.has(o[l]))return i([s],o[l],r,!1,"1-lexicon-prefix"),!0}return null},q3=function(e){const t=e.world;e.docs.forEach(r=>{for(let n=0;n<r.length;n+=1)if(r[n].tags.size===0){let a=null;a=a||I3(r,n,t),a=a||j3(r,n,t)}})},R3={lexicon:q3},L3=function(e){const t={},r={};return Object.keys(e).forEach(n=>{const a=e[n];n=n.toLowerCase().trim(),n=n.replace(/'s\b/,"");const i=n.split(/ /);i.length>1&&(r[i[0]]===void 0||i.length>r[i[0]])&&(r[i[0]]=i.length),t[n]=t[n]||a}),delete t[""],delete t[null],delete t[" "],{lex:t,_multi:r}},H3={one:{expandLexicon:L3}},G3=function(e,t=!1){const r=this.world(),{methods:n,model:a}=r;if(!e)return;if(Object.keys(e).forEach(s=>{typeof e[s]=="string"&&e[s].startsWith("#")&&(e[s]=e[s].replace(/^#/,""))}),t===!0){const{lex:s,_multi:u}=n.one.expandLexicon(e,r);Object.assign(a.one._multiCache,u),Object.assign(a.one.frozenLex,s);return}if(n.two.expandLexicon){const{lex:s,_multi:u}=n.two.expandLexicon(e,r);Object.assign(a.one.lexicon,s),Object.assign(a.one._multiCache,u)}const{lex:i,_multi:o}=n.one.expandLexicon(e,r);Object.assign(a.one.lexicon,i),Object.assign(a.one._multiCache,o)},V3={addWords:G3},U3={one:{lexicon:{},_multiCache:{},frozenLex:{}}},W3={model:U3,methods:H3,compute:R3,lib:V3,hooks:["lexicon"]},J3=function(e,t){const{methods:r,model:n}=t;return r.one.tokenize.splitTerms(e,n).map(i=>r.one.tokenize.splitWhitespace(i,n)).map(i=>i.text.toLowerCase())},aw=function(e,t){const r=[{}],n=[null],a=[0],i=[];let o=0;e.forEach(function(s){let u=0;const l=J3(s,t);for(let c=0;c<l.length;c++){const f=l[c];r[u]&&r[u].hasOwnProperty(f)?u=r[u][f]:(o++,r[u][f]=o,r[o]={},u=o,n[o]=null)}n[u]=[l.length]});for(const s in r[0])o=r[0][s],a[o]=0,i.push(o);for(;i.length;){const s=i.shift(),u=Object.keys(r[s]);for(let l=0;l<u.length;l+=1){const c=u[l],f=r[s][c];for(i.push(f),o=a[s];o>0&&!r[o].hasOwnProperty(c);)o=a[o];if(r.hasOwnProperty(o)){const m=r[o][c];a[f]=m,n[m]&&(n[f]=n[f]||[],n[f]=n[f].concat(n[m]))}else a[f]=0}}return{goNext:r,endAs:n,failTo:a}},K3=function(e,t,r){let n=0;const a=[];for(let i=0;i<e.length;i++){const o=e[i][r.form]||e[i].normal;for(;n>0&&(t.goNext[n]===void 0||!t.goNext[n].hasOwnProperty(o));)n=t.failTo[n]||0;if(t.goNext[n].hasOwnProperty(o)&&(n=t.goNext[n][o],t.endAs[n])){const s=t.endAs[n];for(let u=0;u<s.length;u++){const l=s[u],c=e[i-l+1],[f,m]=c.index;a.push([f,m,m+l,c.id])}}}return a},Y3=function(e,t){for(let r=0;r<e.length;r+=1)if(t.has(e[r])===!0)return!1;return!0},Z3=function(e,t,r){let n=[];r.form=r.form||"normal";const a=e.docs;if(!t.goNext||!t.goNext[0])return console.error("Compromise invalid lookup trie"),e.none();const i=Object.keys(t.goNext[0]);for(let o=0;o<a.length;o++){if(e._cache&&e._cache[o]&&Y3(i,e._cache[o])===!0)continue;const s=a[o],u=K3(s,t,r);u.length>0&&(n=n.concat(u))}return e.update(n)},Q3=e=>Object.prototype.toString.call(e)==="[object Object]";function X3(e){e.prototype.lookup=function(t,r={}){if(!t)return this.none();typeof t=="string"&&(t=[t]);const n=Q3(t)?t:aw(t,this.world);let a=Z3(this,n,r);return a=a.settle(),a}}const Yc=(e,t)=>{for(let r=e.length-1;r>=0;r-=1)if(e[r]!==t)return e=e.slice(0,r+1),e;return e},eC=function(e){return e.goNext=e.goNext.map(t=>{if(Object.keys(t).length!==0)return t}),e.goNext=Yc(e.goNext,void 0),e.failTo=Yc(e.failTo,0),e.endAs=Yc(e.endAs,null),e},em={buildTrie:function(e){const t=aw(e,this.world());return eC(t)}};em.compile=em.buildTrie;const tC={api:X3,lib:em},Fh=function(e,t){return t&&e.forEach(r=>{const n=r[0];t[n]&&(r[0]=t[n][0],r[1]+=t[n][1],r[2]+=t[n][1])}),e},iw=function(e,t){let{ptrs:r}=e;const{byGroup:n}=e;return r=Fh(r,t),Object.keys(n).forEach(a=>{n[a]=Fh(n[a],t)}),{ptrs:r,byGroup:n}},Zs=function(e,t,r){const n=r.methods.one;return typeof e=="number"&&(e=String(e)),typeof e=="string"&&(e=n.killUnicode(e,r),e=n.parseMatch(e,t,r)),e},ow=e=>Object.prototype.toString.call(e)==="[object Object]",Qs=e=>e&&ow(e)&&e.isView===!0,Xs=e=>e&&ow(e)&&e.isNet===!0,rC=function(e,t,r){const n=this.methods.one;if(Qs(e))return this.intersection(e);if(Xs(e))return this.sweep(e,{tagger:!1}).view.settle();e=Zs(e,r,this.world);const a={regs:e,group:t},i=n.match(this.docs,a,this._cache),{ptrs:o,byGroup:s}=iw(i,this.fullPointer),u=this.toView(o);return u._groups=s,u},nC=function(e,t,r){const n=this.methods.one;if(Qs(e))return this.intersection(e).eq(0);if(Xs(e))return this.sweep(e,{tagger:!1,matchOne:!0}).view;e=Zs(e,r,this.world);const a={regs:e,group:t,justOne:!0},i=n.match(this.docs,a,this._cache),{ptrs:o,byGroup:s}=iw(i,this.fullPointer),u=this.toView(o);return u._groups=s,u},aC=function(e,t,r){const n=this.methods.one;if(Qs(e))return this.intersection(e).fullPointer.length>0;if(Xs(e))return this.sweep(e,{tagger:!1}).view.found;e=Zs(e,r,this.world);const a={regs:e,group:t,justOne:!0};return n.match(this.docs,a,this._cache).ptrs.length>0},iC=function(e,t,r){const n=this.methods.one;if(Qs(e))return this.filter(u=>u.intersection(e).found);if(Xs(e)){const u=this.sweep(e,{tagger:!1}).view.settle();return this.if(u)}e=Zs(e,r,this.world);const a={regs:e,group:t,justOne:!0};let i=this.fullPointer;const o=this._cache||[];i=i.filter((u,l)=>{const c=this.update([u]);return n.match(c.docs,a,o[l]).ptrs.length>0});const s=this.update(i);return this._cache&&(s._cache=i.map(u=>o[u[0]])),s},oC=function(e,t,r){const{methods:n}=this,a=n.one;if(Qs(e))return this.filter(s=>!s.intersection(e).found);if(Xs(e)){const s=this.sweep(e,{tagger:!1}).view.settle();return this.ifNo(s)}e=Zs(e,r,this.world);const i=this._cache||[],o=this.filter((s,u)=>{const l={regs:e,group:t,justOne:!0};return a.match(s.docs,l,i[u]).ptrs.length===0});return this._cache&&(o._cache=o.ptrs.map(s=>i[s[0]])),o},sC={matchOne:nC,match:rC,has:aC,if:iC,ifNo:oC},uC=function(e,t,r){const{indexN:n}=this.methods.one.pointer,a=[],i=n(this.fullPointer);Object.keys(i).forEach(s=>{const u=i[s].sort((l,c)=>l[1]>c[1]?1:-1)[0];u[1]>0&&a.push([u[0],0,u[1]])});const o=this.toView(a);return e?o.match(e,t,r):o},lC=function(e,t,r){const{indexN:n}=this.methods.one.pointer,a=[],i=n(this.fullPointer),o=this.document;Object.keys(i).forEach(u=>{const l=i[u].sort((m,d)=>m[1]>d[1]?-1:1)[0],[c,,f]=l;f<o[c].length&&a.push([c,f,o[c].length])});const s=this.toView(a);return e?s.match(e,t,r):s},cC=function(e,t,r){typeof e=="string"&&(e=this.world.methods.one.parseMatch(e,r,this.world)),e[e.length-1].end=!0;const n=this.fullPointer;return this.forEach((a,i)=>{const o=a.before(e,t);if(o.found){const s=o.terms();n[i][1]-=s.length,n[i][3]=s.docs[0][0].id}}),this.update(n)},fC=function(e,t,r){typeof e=="string"&&(e=this.world.methods.one.parseMatch(e,r,this.world)),e[0].start=!0;const n=this.fullPointer;return this.forEach((a,i)=>{const o=a.after(e,t);if(o.found){const s=o.terms();n[i][2]+=s.length,n[i][4]=null}}),this.update(n)},mC=function(e,t,r){return this.growRight(e,t,r).growLeft(e,t,r)},dC={before:uC,after:lC,growLeft:cC,growRight:fC,grow:mC},sw=function(e,t){return[e[0],e[1],t[2]]},hC=function(e){return Object.prototype.toString.call(e)==="[object Array]"},ud=(e,t,r)=>typeof e=="string"||hC(e)?t.match(e,r):e||t.none(),ld=function(e,t){const[r,n,a]=e;return t.document[r]&&t.document[r][n]&&(e[3]=e[3]||t.document[r][n].id,t.document[r][a-1]&&(e[4]=e[4]||t.document[r][a-1].id)),e},Go={};Go.splitOn=function(e,t){const{splitAll:r}=this.methods.one.pointer,n=ud(e,this,t).fullPointer,a=r(this.fullPointer,n);let i=[];return a.forEach(o=>{i.push(o.passthrough),i.push(o.before),i.push(o.match),i.push(o.after)}),i=i.filter(o=>o),i=i.map(o=>ld(o,this)),this.update(i)};Go.splitBefore=function(e,t){const{splitAll:r}=this.methods.one.pointer,n=ud(e,this,t).fullPointer,a=r(this.fullPointer,n);for(let o=0;o<a.length;o+=1)!a[o].after&&a[o+1]&&a[o+1].before&&a[o].match&&a[o].match[0]===a[o+1].before[0]&&(a[o].after=a[o+1].before,delete a[o+1].before);let i=[];return a.forEach(o=>{i.push(o.passthrough),i.push(o.before),o.match&&o.after?i.push(sw(o.match,o.after)):i.push(o.match)}),i=i.filter(o=>o),i=i.map(o=>ld(o,this)),this.update(i)};Go.splitAfter=function(e,t){const{splitAll:r}=this.methods.one.pointer,n=ud(e,this,t).fullPointer,a=r(this.fullPointer,n);let i=[];return a.forEach(o=>{i.push(o.passthrough),o.before&&o.match?i.push(sw(o.before,o.match)):(i.push(o.before),i.push(o.match)),i.push(o.after)}),i=i.filter(o=>o),i=i.map(o=>ld(o,this)),this.update(i)};Go.split=Go.splitAfter;const pC=function(e,t){return!e||!t||e[0]!==t[0]?!1:e[2]===t[1]},Ph=function(e,t,r){const n=e.world,a=n.methods.one.parseMatch;t=t||".$",r=r||"^.";const i=a(t,{},n),o=a(r,{},n);i[i.length-1].end=!0,o[0].start=!0;const s=e.fullPointer,u=[s[0]];for(let l=1;l<s.length;l+=1){const c=u[u.length-1],f=s[l],m=e.update([c]),d=e.update([f]);pC(c,f)&&m.has(i)&&d.has(o)?u[u.length-1]=[c[0],c[1],f[2],c[3],f[4]]:u.push(f)}return e.update(u)},gC={joinIf:function(e,t){return Ph(this,e,t)},join:function(){return Ph(this)}},Qn=Object.assign({},sC,dC,Go,gC);Qn.lookBehind=Qn.before;Qn.lookBefore=Qn.before;Qn.lookAhead=Qn.after;Qn.lookAfter=Qn.after;Qn.notIf=Qn.ifNo;const vC=function(e){Object.assign(e.prototype,Qn)},yC=/(?:^|\s)([![^]*(?:<[^<]*>)?\/.*?[^\\/]\/[?\]+*$~]*)(?:\s|$)/,bC=/([!~[^]*(?:<[^<]*>)?\([^)]+[^\\)]\)[?\]+*$~]*)(?:\s|$)/,wC=/ /g,xC=e=>/^[![^]*(<[^<]*>)?\(/.test(e)&&/\)[?\]+*$~]*$/.test(e),kh=e=>/^[![^]*(<[^<]*>)?\//.test(e)&&/\/[?\]+*$~]*$/.test(e),Oh=function(e){return e=e.map(t=>t.trim()),e=e.filter(t=>t),e},DC=function(e){const t=e.split(yC);let r=[];t.forEach(a=>{if(kh(a)){r.push(a);return}r=r.concat(a.split(bC))}),r=Oh(r);let n=[];return r.forEach(a=>{xC(a)||kh(a)?n.push(a):n=n.concat(a.split(wC))}),n=Oh(n),n},$h=/\{([0-9]+)?(, *[0-9]*)?\}/,Bh=/&&/,NC=new RegExp(/^<\s*(\S+)\s*>/),_h=e=>e.charAt(0).toUpperCase()+e.substring(1),xn=e=>e.charAt(e.length-1),cn=e=>e.charAt(0),Po=e=>e.substring(1),ko=e=>e.substring(0,e.length-1),vs=function(e){return e=Po(e),e=ko(e),e},uw=function(e,t){const r={};for(let n=0;n<2;n+=1){if(xn(e)==="$"&&(r.end=!0,e=ko(e)),cn(e)==="^"&&(r.start=!0,e=Po(e)),xn(e)==="?"&&(r.optional=!0,e=ko(e)),(cn(e)==="["||xn(e)==="]")&&(r.group=null,cn(e)==="["&&(r.groupStart=!0),xn(e)==="]"&&(r.groupEnd=!0),e=e.replace(/^\[/,""),e=e.replace(/\]$/,""),cn(e)==="<")){const a=NC.exec(e);a.length>=2&&(r.group=a[1],e=e.replace(a[0],""))}if(xn(e)==="+"&&(r.greedy=!0,e=ko(e)),e!=="*"&&xn(e)==="*"&&e!=="\\*"&&(r.greedy=!0,e=ko(e)),cn(e)==="!"&&(r.negative=!0,e=Po(e)),cn(e)==="~"&&xn(e)==="~"&&e.length>2&&(e=vs(e),r.fuzzy=!0,r.min=t.fuzzy||.85,/\(/.test(e)===!1))return r.word=e,r;if(cn(e)==="/"&&xn(e)==="/")return e=vs(e),t.caseSensitive&&(r.use="text"),r.regex=new RegExp(e),r;if($h.test(e)===!0&&(e=e.replace($h,(a,i,o)=>(o===void 0?(r.min=Number(i),r.max=Number(i)):(o=o.replace(/, */,""),i===void 0?(r.min=0,r.max=Number(o)):(r.min=Number(i),r.max=Number(o||999))),r.greedy=!0,r.min||(r.optional=!0),""))),cn(e)==="("&&xn(e)===")"){Bh.test(e)?(r.choices=e.split(Bh),r.operator="and"):(r.choices=e.split("|"),r.operator="or"),r.choices[0]=Po(r.choices[0]);const a=r.choices.length-1;r.choices[a]=ko(r.choices[a]),r.choices=r.choices.map(i=>i.trim()),r.choices=r.choices.filter(i=>i),r.choices=r.choices.map(i=>i.split(/ /g).map(o=>uw(o,t))),e=""}if(cn(e)==="{"&&xn(e)==="}"){if(e=vs(e),r.root=e,/\//.test(e)){const a=r.root.split(/\//);r.root=a[0],r.pos=a[1],r.pos==="adj"&&(r.pos="Adjective"),r.pos=r.pos.charAt(0).toUpperCase()+r.pos.substr(1).toLowerCase(),a[2]!==void 0&&(r.sense=a[2])}return r}if(cn(e)==="<"&&xn(e)===">")return e=vs(e),r.chunk=_h(e),r.greedy=!0,r;if(cn(e)==="%"&&xn(e)==="%")return e=vs(e),r.switch=e,r}return cn(e)==="#"?(r.tag=Po(e),r.tag=_h(r.tag),r):cn(e)==="@"?(r.method=Po(e),r):e==="."?(r.anything=!0,r):e==="*"?(r.anything=!0,r.greedy=!0,r.optional=!0,r):(e&&(e=e.replace("\\*","*"),e=e.replace("\\.","."),t.caseSensitive?r.use="text":e=e.toLowerCase(),r.word=e),r)},AC=/[a-z0-9][-–—][a-z]/i,CC=function(e,t){const r=t.model.one.prefixes;for(let n=e.length-1;n>=0;n-=1){const a=e[n];if(a.word&&AC.test(a.word)){let i=a.word.split(/[-–—]/g);if(r.hasOwnProperty(i[0]))continue;i=i.filter(o=>o).reverse(),e.splice(n,1),i.forEach(o=>{const s=Object.assign({},a);s.word=o,e.splice(n,0,s)})}}return e},Ih=function(e,t){const{all:r}=t.methods.two.transform.verb||{},n=e.root;return r?r(n,t.model):[]},zh=function(e,t){const{all:r}=t.methods.two.transform.noun||{};return r?r(e.root,t.model):[e.root]},jh=function(e,t){const{all:r}=t.methods.two.transform.adjective||{};return r?r(e.root,t.model):[e.root]},EC=function(e,t){return e=e.map(r=>{if(r.root)if(t.methods.two&&t.methods.two.transform){let n=[];r.pos?r.pos==="Verb"?n=n.concat(Ih(r,t)):r.pos==="Noun"?n=n.concat(zh(r,t)):r.pos==="Adjective"&&(n=n.concat(jh(r,t))):(n=n.concat(Ih(r,t)),n=n.concat(zh(r,t)),n=n.concat(jh(r,t))),n=n.filter(a=>a),n.length>0&&(r.operator="or",r.fastOr=new Set(n))}else r.machine=r.root,delete r.id,delete r.root;return r}),e},SC=function(e){let t=0,r=null;for(let n=0;n<e.length;n++){const a=e[n];a.groupStart===!0&&(r=a.group,r===null&&(r=String(t),t+=1)),r!==null&&(a.group=r),a.groupEnd===!0&&(r=null)}return e},MC=function(e){return e.map(t=>{if(t.choices!==void 0){if(t.operator!=="or"||t.fuzzy===!0)return t;t.choices.every(n=>{if(n.length!==1)return!1;const a=n[0];return a.fuzzy===!0||a.start||a.end?!1:a.word!==void 0&&a.negative!==!0&&a.optional!==!0&&a.method!==!0})===!0&&(t.fastOr=new Set,t.choices.forEach(n=>{t.fastOr.add(n[0].word)}),delete t.choices)}return t})},TC=function(e){return e.map(t=>(t.fuzzy&&t.choices&&t.choices.forEach(r=>{r.length===1&&r[0].word&&(r[0].fuzzy=!0,r[0].min=t.min)}),t))},FC=function(e){return e=SC(e),e=MC(e),e=TC(e),e},PC=function(e,t,r){if(e==null||e==="")return[];t=t||{},typeof e=="number"&&(e=String(e));let n=DC(e);return n=n.map(a=>uw(a,t)),n=CC(n,r),n=EC(n,r),n=FC(n),n},kC=function(e,t){for(const r of t)if(e.has(r))return!0;return!1},OC=function(e,t){for(let r=0;r<e.length;r+=1){const n=e[r];if(!(n.optional===!0||n.negative===!0||n.fuzzy===!0)){if(n.word!==void 0&&t.has(n.word)===!1||n.tag!==void 0&&t.has("#"+n.tag)===!1)return!0;if(n.fastOr&&kC(n.fastOr,t)===!1)return!1}}return!1},$C=function(e,t){const r=e.length,n=t.length;if(r===0)return n;if(n===0)return r;const a=(n>r?n:r)+1;if(Math.abs(r-n)>(a||100))return a||100;const i=[];for(let m=0;m<a;m++)i[m]=[m],i[m].length=a;for(let m=0;m<a;m++)i[0][m]=m;let o,s,u,l,c,f;for(let m=1;m<=r;++m)for(s=e[m-1],o=1;o<=n;++o){if(m===o&&i[m][o]>4)return r;u=t[o-1],l=s===u?0:1,c=i[m-1][o]+1,(f=i[m][o-1]+1)<c&&(c=f),(f=i[m-1][o-1]+l)<c&&(c=f),m>1&&o>1&&s===t[o-2]&&e[m-2]===u&&(f=i[m-2][o-2]+l)<c?i[m][o]=f:i[m][o]=c}return i[r][n]},BC=function(e,t,r=3){if(e===t)return 1;if(e.length<r||t.length<r)return 0;const n=$C(e,t),a=Math.max(e.length,t.length);return 1-(a===0?0:n/a)},_C=/([\u0022\uFF02\u0027\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F])/,IC=/([\u0022\uFF02\u0027\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4])/,qh=/^[-–—]$/,Rh=/ [-–—]{1,3} /,ia=(e,t)=>e.post.indexOf(t)!==-1,zs={hasQuote:e=>_C.test(e.pre)||IC.test(e.post),hasComma:e=>ia(e,","),hasPeriod:e=>ia(e,".")===!0&&ia(e,"...")===!1,hasExclamation:e=>ia(e,"!"),hasQuestionMark:e=>ia(e,"?")||ia(e,"¿"),hasEllipses:e=>ia(e,"..")||ia(e,"…"),hasSemicolon:e=>ia(e,";"),hasColon:e=>ia(e,":"),hasSlash:e=>/\//.test(e.text),hasHyphen:e=>qh.test(e.post)||qh.test(e.pre),hasDash:e=>Rh.test(e.post)||Rh.test(e.pre),hasContraction:e=>!!e.implicit,isAcronym:e=>e.tags.has("Acronym"),isKnown:e=>e.tags.size>0,isTitleCase:e=>new RegExp("^\\p{Lu}[a-z'\\u00C0-\\u00FF]","u").test(e.text),isUpperCase:e=>new RegExp("^\\p{Lu}+$","u").test(e.text)};zs.hasQuotation=zs.hasQuote;let Nr=function(){};const zC=function(e,t,r,n){if(t.anything===!0)return!0;if(t.start===!0&&r!==0||t.end===!0&&r!==n-1)return!1;if(t.id!==void 0&&t.id===e.id)return!0;if(t.word!==void 0)return t.use?t.word===e[t.use]:e.machine!==null&&e.machine===t.word||e.alias!==void 0&&e.alias.hasOwnProperty(t.word)||t.fuzzy===!0&&(t.word===e.root||BC(t.word,e.normal)>=t.min)||e.alias&&e.alias.some(a=>a===t.word)?!0:t.word===e.text||t.word===e.normal;if(t.tag!==void 0)return e.tags.has(t.tag)===!0;if(t.method!==void 0)return typeof zs[t.method]=="function"&&zs[t.method](e)===!0;if(t.pre!==void 0)return e.pre&&e.pre.includes(t.pre);if(t.post!==void 0)return e.post&&e.post.includes(t.post);if(t.regex!==void 0){let a=e.normal;return t.use&&(a=e[t.use]),t.regex.test(a)}if(t.chunk!==void 0)return e.chunk===t.chunk;if(t.switch!==void 0)return e.switch===t.switch;if(t.machine!==void 0)return e.normal===t.machine||e.machine===t.machine||e.root===t.machine;if(t.sense!==void 0)return e.sense===t.sense;if(t.fastOr!==void 0){if(t.pos&&!e.tags.has(t.pos))return null;const a=e.root||e.implicit||e.machine||e.normal;return t.fastOr.has(a)||t.fastOr.has(e.text)}return t.choices!==void 0?t.operator==="and"?t.choices.every(a=>Nr(e,a,r,n)):t.choices.some(a=>Nr(e,a,r,n)):!1};Nr=function(e,t,r,n){const a=zC(e,t,r,n);return t.negative===!0?!a:a};const jC=function(e,t){const r=Object.assign({},e.regs[e.r],{start:!1,end:!1}),n=e.t;for(;e.t<e.terms.length;e.t+=1){if(t&&Nr(e.terms[e.t],t,e.start_i+e.t,e.phrase_length))return e.t;const a=e.t-n+1;if(r.max!==void 0&&a===r.max)return e.t;if(Nr(e.terms[e.t],r,e.start_i+e.t,e.phrase_length)===!1)return r.min!==void 0&&a<r.min?null:e.t}return e.t},qC=function(e,t){let r=e.t;if(!t)return e.terms.length;for(;r<e.terms.length;r+=1)if(Nr(e.terms[r],t,e.start_i+r,e.phrase_length)===!0)return r;return null},RC=function(e,t){if(e.end===!0&&e.greedy===!0&&t.start_i+t.t<t.phrase_length-1){const r=Object.assign({},e,{end:!1});if(Nr(t.terms[t.t],r,t.start_i+t.t,t.phrase_length)===!0)return!0}return!1},yc=function(e,t){return e.groups[e.inGroup]||(e.groups[e.inGroup]={start:t,length:0}),e.groups[e.inGroup]},LC=function(e){const{regs:t}=e,r=t[e.r],n=qC(e,t[e.r+1]);if(n===null||n===0||r.min!==void 0&&n-e.t<r.min)return null;if(r.max!==void 0&&n-e.t>r.max)return e.t=e.t+r.max,!0;if(e.hasGroup===!0){const a=yc(e,e.t);a.length=n-e.t}return e.t=n,!0},HC=function(e){return Object.prototype.toString.call(e)==="[object Array]"},lw=function(e,t=0){const r=e.regs[e.r];let n=!1;for(let a=0;a<r.choices.length;a+=1){const i=r.choices[a];if(!HC(i))return!1;if(n=i.every((o,s)=>{let u=0;const l=e.t+s+t+u;if(e.terms[l]===void 0)return!1;const c=Nr(e.terms[l],o,l+e.start_i,e.phrase_length);if(c===!0&&o.greedy===!0)for(let f=1;f<e.terms.length;f+=1){const m=e.terms[l+f];if(m)if(Nr(m,o,e.start_i+f,e.phrase_length)===!0)u+=1;else break}return t+=u,c}),n){t+=i.length;break}}return n&&r.greedy===!0?lw(e,t):t},GC=function(e){let t=0;return e.regs[e.r].choices.every(a=>{const i=a.every((o,s)=>{const u=e.t+s;return e.terms[u]===void 0?!1:Nr(e.terms[u],o,u,e.phrase_length)});return i===!0&&a.length>t&&(t=a.length),i})===!0?t:!1},VC=function(e){const{regs:t}=e,r=t[e.r],n=lw(e);if(n){if(r.negative===!0)return null;if(e.hasGroup===!0){const a=yc(e,e.t);a.length+=n}if(r.end===!0){const a=e.phrase_length;if(e.t+e.start_i+n!==a)return null}return e.t+=n,!0}else if(!r.optional)return null;return!0},UC=function(e){const{regs:t}=e,r=t[e.r],n=GC(e);if(n){if(r.negative===!0)return null;if(e.hasGroup===!0){const a=yc(e,e.t);a.length+=n}if(r.end===!0){const a=e.phrase_length-1;if(e.t+e.start_i!==a)return null}return e.t+=n,!0}else if(!r.optional)return null;return!0},WC=function(e,t,r){let n=0;for(let a=e.t;a<e.terms.length;a+=1){let i=Nr(e.terms[a],t,e.start_i+e.t,e.phrase_length);if(i||r&&(i=Nr(e.terms[a],r,e.start_i+e.t,e.phrase_length),i)||(n+=1,t.max!==void 0&&n===t.max))break}return n===0||t.min&&t.min>n?!1:(e.t+=n,!0)},JC=function(e){const{regs:t}=e,r=t[e.r],n=Object.assign({},r);if(n.negative=!1,Nr(e.terms[e.t],n,e.start_i+e.t,e.phrase_length))return!1;if(r.optional){const i=t[e.r+1];i&&(Nr(e.terms[e.t],i,e.start_i+e.t,e.phrase_length)?e.r+=1:i.optional&&t[e.r+2]&&Nr(e.terms[e.t],t[e.r+2],e.start_i+e.t,e.phrase_length)&&(e.r+=2))}return r.greedy?WC(e,n,t[e.r+1]):(e.t+=1,!0)},KC=function(e){const{regs:t}=e,r=t[e.r],n=e.terms[e.t],a=Nr(n,t[e.r+1],e.start_i+e.t,e.phrase_length);if(r.negative||a){const i=e.terms[e.t+1];(!i||!Nr(i,t[e.r+1],e.start_i+e.t,e.phrase_length))&&(e.r+=1)}},YC=function(e){const{regs:t,phrase_length:r}=e,n=t[e.r];return e.t=jC(e,t[e.r+1]),e.t===null||n.min&&n.min>e.t||n.end===!0&&e.start_i+e.t!==r?null:!0},ZC=function(e){const t=e.terms[e.t],r=e.regs[e.r];if(t.implicit&&e.terms[e.t+1]){if(!e.terms[e.t+1].implicit)return;r.word===t.normal&&(e.t+=1),r.method==="hasContraction"&&(e.t+=1)}},QC=function(e,t){const r=e.regs[e.r],n=yc(e,t);e.t>1&&r.greedy?n.length+=e.t-t:n.length++},Zc=function(e){const{regs:t}=e,r=t[e.r],n=e.terms[e.t],a=e.t;return r.optional&&t[e.r+1]&&r.negative?!0:(r.optional&&t[e.r+1]&&KC(e),n.implicit&&e.terms[e.t+1]&&ZC(e),e.t+=1,r.end===!0&&e.t!==e.terms.length&&r.greedy!==!0||r.greedy===!0&&!YC(e)?null:(e.hasGroup===!0&&QC(e,a),!0))},cd=function(e,t,r,n){if(e.length===0||t.length===0)return null;const a={t:0,terms:e,r:0,regs:t,groups:{},start_i:r,phrase_length:n,inGroup:null};for(;a.r<t.length;a.r+=1){const s=t[a.r];if(a.hasGroup=!!s.group,a.hasGroup===!0?a.inGroup=s.group:a.inGroup=null,!a.terms[a.t]){if(t.slice(a.r).some(c=>!c.optional)===!1)break;return null}if(s.anything===!0&&s.greedy===!0){if(!LC(a))return null;continue}if(s.choices!==void 0&&s.operator==="or"){if(!VC(a))return null;continue}if(s.choices!==void 0&&s.operator==="and"){if(!UC(a))return null;continue}if(s.anything===!0){if(s.negative&&s.anything||!Zc(a))return null;continue}if(RC(s,a)===!0){if(!Zc(a))return null;continue}if(s.negative){if(!JC(a))return null;continue}if(Nr(a.terms[a.t],s,a.start_i+a.t,a.phrase_length)===!0){if(!Zc(a))return null;continue}if(s.optional!==!0)return null}const i=[null,r,a.t+r];if(i[1]===i[2])return null;const o={};return Object.keys(a.groups).forEach(s=>{const u=a.groups[s],l=r+u.start;o[s]=[null,l,l+u.length]}),{pointer:i,groups:o}},XC=function(e,t){const r=[],n={};return e.length===0?{ptrs:r,byGroup:n}:(typeof t=="number"&&(t=String(t)),t?e.forEach(a=>{a.groups[t]&&r.push(a.groups[t])}):e.forEach(a=>{r.push(a.pointer),Object.keys(a.groups).forEach(i=>{n[i]=n[i]||[],n[i].push(a.groups[i])})}),{ptrs:r,byGroup:n})},eE=function(e,t,r){return e=e.filter(n=>{const[a,i,o]=n.pointer,s=r[a].slice(i,o);for(let u=0;u<s.length;u+=1){const l=s.slice(u);if(cd(l,t,u,s.length)!==null)return!1}return!0}),e},cw=function(e,t){return e.pointer[0]=t,Object.keys(e.groups).forEach(r=>{e.groups[r][0]=t}),e},tE=function(e,t,r){let n=cd(e,t,0,e.length);return n?(n=cw(n,r),n):null},rE=function(e,t,r){r=r||[];const{regs:n,group:a,justOne:i}=t;let o=[];if(!n||n.length===0)return{ptrs:[],byGroup:{}};const s=n.filter(u=>u.optional!==!0&&u.negative!==!0).length;e:for(let u=0;u<e.length;u+=1){const l=e[u];if(!(r[u]&&OC(n,r[u]))){if(n[0].start===!0){const c=tE(l,n,u);c&&o.push(c);continue}for(let c=0;c<l.length;c+=1){const f=l.slice(c);if(f.length<s)break;let m=cd(f,n,c,l.length);if(m){if(m=cw(m,u),o.push(m),i===!0)break e;const d=m.pointer[2];Math.abs(d-1)>c&&(c=Math.abs(d-1))}}}}return n[n.length-1].end===!0&&(o=o.filter(u=>{const l=u.pointer[0];return e[l].length===u.pointer[2]})),t.notIf&&(o=eE(o,t.notIf,e)),o=XC(o,a),o.ptrs.forEach(u=>{const[l,c,f]=u;u[3]=e[l][c].id,u[4]=e[l][f-1].id}),o},nE={one:{termMethods:zs,parseMatch:PC,match:rE}},aE={parseMatch:function(e,t){const r=this.world(),n=r.methods.one.killUnicode;return n&&(e=n(e,r)),r.methods.one.parseMatch(e,t,r)}},iE={api:vC,methods:nE,lib:aE},oE=/^\../,sE=/^#./,uE=e=>(e=e.replace(/&/g,"&amp;"),e=e.replace(/</g,"&lt;"),e=e.replace(/>/g,"&gt;"),e=e.replace(/"/g,"&quot;"),e=e.replace(/'/g,"&apos;"),e),lE=function(e){let t="",r="</span>";return e=uE(e),oE.test(e)?t=`<span class="${e.replace(/^\./,"")}"`:sE.test(e)?t=`<span id="${e.replace(/^#/,"")}"`:(t=`<${e}`,r=`</${e}>`),t+=">",{start:t,end:r}},cE=function(e,t){const r={},n={};return Object.keys(t).forEach(a=>{let i=t[a];const o=lE(a);typeof i=="string"&&(i=e.match(i)),i.docs.forEach(s=>{if(s.every(c=>c.implicit))return;const u=s[0].id;r[u]=r[u]||[],r[u].push(o.start);const l=s[s.length-1].id;n[l]=n[l]||[],n[l].push(o.end)})}),{starts:r,ends:n}},fE=function(e){const{starts:t,ends:r}=cE(this,e);let n="";return this.docs.forEach(a=>{for(let i=0;i<a.length;i+=1){const o=a[i];t.hasOwnProperty(o.id)&&(n+=t[o.id].join("")),n+=o.pre||"",n+=o.text||"",r.hasOwnProperty(o.id)&&(n+=r[o.id].join("")),n+=o.post||""}}),n},mE={html:fE},fw=/[,:;)\]*.?~!\u0022\uFF02\u201D\u2019\u00BB\u203A\u2032\u2033\u2034\u301E\u00B4—-]+$/,tm=/^[(['"*~\uFF02\u201C\u2018\u201F\u201B\u201E\u2E42\u201A\u00AB\u2039\u2035\u2036\u2037\u301D\u0060\u301F]+/,dE=/[,:;)('"\u201D\]]/,hE=/^[-–—]$/,pE=/ /,_i=function(e,t,r=!0){let n="";return e.forEach(a=>{let i=a.pre||"",o=a.post||"";t.punctuation==="some"&&(i=i.replace(tm,""),hE.test(o)&&(o=" "),o=o.replace(dE,""),o=o.replace(/\?!+/,"?"),o=o.replace(/!+/,"!"),o=o.replace(/\?+/,"?"),o=o.replace(/\.{2,}/,""),a.tags.has("Abbreviation")&&(o=o.replace(/\./,""))),t.whitespace==="some"&&(i=i.replace(/\s/,""),o=o.replace(/\s+/," ")),t.keepPunct||(i=i.replace(tm,""),o==="-"?o=" ":o=o.replace(fw,""));let s=a[t.form||"text"]||a.normal||"";t.form==="implicit"&&(s=a.implicit||a.text),t.form==="root"&&a.implicit&&(s=a.root||a.implicit||a.normal),(t.form==="machine"||t.form==="implicit"||t.form==="root")&&a.implicit&&(!o||!pE.test(o))&&(o+=" "),n+=i+s+o}),r===!1&&(n=n.trim()),t.lowerCase===!0&&(n=n.toLowerCase()),n},gE=function(e,t){let r="";if(!e||!e[0]||!e[0][0])return r;for(let n=0;n<e.length;n+=1)r+=_i(e[n],t,!0);if(t.keepSpace||(r=r.trim()),t.keepEndPunct===!1){e[0][0].tags.has("Emoticon")||(r=r.replace(tm,""));const n=e[e.length-1];n[n.length-1].tags.has("Emoticon")||(r=r.replace(fw,"")),r.endsWith("'")&&!r.endsWith("s'")&&(r=r.replace(/'/,""))}return t.cleanWhitespace===!0&&(r=r.trim()),r},ci={text:{form:"text"},normal:{whitespace:"some",punctuation:"some",case:"some",unicode:"some",form:"normal"},machine:{keepSpace:!1,whitespace:"some",punctuation:"some",case:"none",unicode:"some",form:"machine"},root:{keepSpace:!1,whitespace:"some",punctuation:"some",case:"some",unicode:"some",form:"root"},implicit:{form:"implicit"}};ci.clean=ci.normal;ci.reduced=ci.root;const mw=[];let Ri=0;for(;Ri<64;)mw[Ri]=0|Math.sin(++Ri%Math.PI)*4294967296;const fd=function(e){let t,r,n,a=decodeURI(encodeURI(e))+"€",i=a.length;const o=[t=1732584193,r=4023233417,~t,~r],s=[];for(e=--i/4+2|15,s[--e]=i*8;~i;)s[i>>2]|=a.charCodeAt(i)<<8*i--;for(Ri=a=0;Ri<e;Ri+=16){for(i=o;a<64;i=[n=i[3],t+((n=i[0]+[t&r|~t&n,n&t|~n&r,t^r^n,r^(t|~n)][i=a>>4]+mw[a]+~~s[Ri|[a,5*a+1,3*a+5,7*a][i]&15])<<(i=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*i+a++%4])|n>>>-i),t,r])t=i[1]|0,r=i[2];for(a=4;a;)o[--a]+=i[a]}for(e="";a<32;)e+=(o[a>>3]>>(1^a++)*4&15).toString(16);return e},vE={text:!0,terms:!0},Lh={case:"none",unicode:"some",form:"machine",punctuation:"some"},Qc=function(e,t){return Object.assign({},e,t)},qa={text:e=>_i(e,{keepPunct:!0},!1),normal:e=>_i(e,Qc(ci.normal,{keepPunct:!0}),!1),implicit:e=>_i(e,Qc(ci.implicit,{keepPunct:!0}),!1),machine:e=>_i(e,Lh,!1),root:e=>_i(e,Qc(Lh,{form:"root"}),!1),hash:e=>fd(_i(e,{keepPunct:!0},!1)),offset:e=>{const t=qa.text(e).length;return{index:e[0].offset.index,start:e[0].offset.start,length:t}},terms:e=>e.map(t=>{const r=Object.assign({},t);return r.tags=Array.from(t.tags),r}),confidence:(e,t,r)=>t.eq(r).confidence(),syllables:(e,t,r)=>t.eq(r).syllables(),sentence:(e,t,r)=>t.eq(r).fullSentence().text(),dirty:e=>e.some(t=>t.dirty===!0)};qa.sentences=qa.sentence;qa.clean=qa.normal;qa.reduced=qa.root;const yE=function(e,t){return t=t||{},typeof t=="string"&&(t={}),t=Object.assign({},vE,t),t.offset&&e.compute("offset"),e.docs.map((r,n)=>{const a={};return Object.keys(t).forEach(i=>{t[i]&&qa[i]&&(a[i]=qa[i](r,e,n))}),a})},rm={json:function(e){const t=yE(this,e);return typeof e=="number"?t[e]:t}};rm.data=rm.json;const bE=()=>typeof window<"u"&&window.document,wE=function(e){const t=this.methods.one.debug||{};return e&&t.hasOwnProperty(e)?(t[e](this),this):bE()?(t.clientSide(this),this):(t.tags(this),this)},xE=function(e){const t=e.pre||"",r=e.post||"";return t+e.text+r},DE=function(e,t){const r={};return Object.keys(t).forEach(n=>{e.match(n).fullPointer.forEach(i=>{r[i[3]]={fn:t[n],end:i[2]}})}),r},dw=function(e,t){const r=DE(e,t);let n="";return e.docs.forEach((a,i)=>{for(let o=0;o<a.length;o+=1){const s=a[o];if(r.hasOwnProperty(s.id)){const{fn:u,end:l}=r[s.id],c=e.update([[i,o,l]]);n+=a[o].pre||"",n+=u(c),o=l-1,n+=a[o].post||""}else n+=xE(s)}}),n},NE=e=>Object.prototype.toString.call(e)==="[object Object]",AE=function(e){const t={};return e.forEach(n=>{t[n]=t[n]||0,t[n]+=1}),Object.keys(t).map(n=>({normal:n,count:t[n]})).sort((n,a)=>n.count>a.count?-1:0)},CE=function(e){if(NE(e))return dw(this,e);if(e==="text")return this.text();if(e==="normal")return this.text("normal");if(e==="root")return this.text("root");if(e==="machine"||e==="reduced")return this.text("machine");if(e==="hash"||e==="md5")return fd(this.text());if(e==="json")return this.json();if(e==="offset"||e==="offsets")return this.compute("offset"),this.json({offset:!0});if(e==="array")return this.docs.map(r=>r.reduce((n,a)=>n+a.pre+a.text+a.post,"").trim()).filter(r=>r);if(e==="freq"||e==="frequency"||e==="topk")return AE(this.json({normal:!0}).map(t=>t.normal));if(e==="terms"){let t=[];return this.docs.forEach(r=>{let n=r.map(a=>a.text);n=n.filter(a=>a),t=t.concat(n)}),t}return e==="tags"?this.docs.map(t=>t.reduce((r,n)=>(r[n.implicit||n.normal]=Array.from(n.tags),r),{})):e==="debug"?this.debug():this.text()},EE={debug:wE,out:CE,wrap:function(e){return dw(this,e)}},SE=e=>Object.prototype.toString.call(e)==="[object Object]",ME={text:function(e){let t={};if(e&&typeof e=="string"&&ci.hasOwnProperty(e)?t=Object.assign({},ci[e]):e&&SE(e)&&(t=Object.assign({},e)),t.keepSpace===void 0&&!this.isFull()&&(t.keepSpace=!1),t.keepEndPunct===void 0&&this.pointer){const r=this.pointer[0];r&&r[1]?t.keepEndPunct=!1:t.keepEndPunct=!0}return t.keepPunct===void 0&&(t.keepPunct=!0),t.keepSpace===void 0&&(t.keepSpace=!0),gE(this.docs,t)}},TE=Object.assign({},EE,ME,rm,mE),FE=function(e){Object.assign(e.prototype,TE)},PE=function(e){console.log("%c -=-=- ","background-color:#6699cc;"),e.forEach(t=>{console.groupCollapsed(t.text());const n=t.docs[0].map(a=>{let i=a.text||"-";a.implicit&&(i="["+a.implicit+"]");const o="["+Array.from(a.tags).join(", ")+"]";return{text:i,tags:o}});console.table(n,["text","tags"]),console.groupEnd()})},va="\x1B[0m",dn={green:e=>"\x1B[32m"+e+va,red:e=>"\x1B[31m"+e+va,blue:e=>"\x1B[34m"+e+va,magenta:e=>"\x1B[35m"+e+va,cyan:e=>"\x1B[36m"+e+va,yellow:e=>"\x1B[33m"+e+va,black:e=>"\x1B[30m"+e+va,dim:e=>"\x1B[2m"+e+va,i:e=>"\x1B[3m"+e+va},kE=function(e,t){return t.one.tagSet&&(e=e.map(r=>{if(!t.one.tagSet.hasOwnProperty(r))return r;const n=t.one.tagSet[r].color||"blue";return dn[n](r)})),e.join(", ")},OE=function(e){const{docs:t,model:r}=e;t.length===0&&console.log(dn.blue(`
3
+ ──────`)),t.forEach(n=>{console.log(dn.blue(`
4
+ ┌─────────`)),n.forEach(a=>{const i=[...a.tags||[]];let o=a.text||"-";a.sense&&(o=`{${a.normal}/${a.sense}}`),a.implicit&&(o="["+a.implicit+"]"),o=dn.yellow(o);let s="'"+o+"'";if(a.reference){const l=e.update([a.reference]).text("normal");s+=` - ${dn.dim(dn.i("["+l+"]"))}`}s=s.padEnd(18);const u=dn.blue(" │ ")+dn.i(s)+" - "+kE(i,r);console.log(u)})}),console.log(`
5
+ `)},$E=function(e){const{docs:t}=e;console.log(""),t.forEach(r=>{const n=[];r.forEach(a=>{a.chunk==="Noun"?n.push(dn.blue(a.implicit||a.normal)):a.chunk==="Verb"?n.push(dn.green(a.implicit||a.normal)):a.chunk==="Adjective"?n.push(dn.yellow(a.implicit||a.normal)):a.chunk==="Pivot"?n.push(dn.red(a.implicit||a.normal)):n.push(a.implicit||a.normal)}),console.log(n.join(" "),`
6
+ `)}),console.log(`
7
+ `)},BE=(e,t,r)=>{const n=r*9,a=t.start+n,i=a+t.length,o=e.substring(0,a),s=e.substring(a,i),u=e.substring(i,e.length);return[o,s,u]},_E=function(e,t,r){const n=BE(e,t,r);return`${n[0]}${dn.blue(n[1])}${n[2]}`},IE=function(e){if(!e.found)return;const t={};e.fullPointer.forEach(r=>{t[r[0]]=t[r[0]]||[],t[r[0]].push(r)}),Object.keys(t).forEach(r=>{let a=e.update([[Number(r)]]).text();e.update(t[r]).json({offset:!0}).forEach((s,u)=>{a=_E(a,s.offset,u)}),console.log(a)}),console.log(`
8
+ `)},zE={tags:OE,clientSide:PE,chunks:$E,highlight:IE},jE={api:FE,methods:{one:{hash:fd,debug:zE}}},hw=function(e,t){if(e[0]!==t[0])return!1;const[,r,n]=e,[,a,i]=t;return r<=a&&n>a||a<=r&&i>r},qE=function(e){let t=e[0][1],r=e[0][2];return e.forEach(n=>{n[1]<t&&(t=n[1]),n[2]>r&&(r=n[2])}),[e[0][0],t,r]},bc=function(e){const t={};return e.forEach(r=>{t[r[0]]=t[r[0]]||[],t[r[0]].push(r)}),t},RE=function(e){const t={};for(let r=0;r<e.length;r+=1)t[e[r].join(",")]=e[r];return Object.values(t)},LE=function(e,t){const[r,n]=e,a=t[1],i=t[2],o={};if(n<a){const s=a<e[2]?a:e[2];o.before=[r,n,s]}return o.match=t,e[2]>i&&(o.after=[r,i,e[2]]),o},HE=function(e,t){return e[1]<=t[1]&&t[2]<=e[2]},pw=function(e,t){const r=bc(t),n=[];return e.forEach(a=>{const[i]=a;let o=r[i]||[];if(o=o.filter(u=>HE(a,u)),o.length===0){n.push({passthrough:a});return}o=o.sort((u,l)=>u[1]-l[1]);let s=a;o.forEach((u,l)=>{const c=LE(s,u);o[l+1]?(n.push({before:c.before,match:c.match}),c.after&&(s=c.after)):n.push(c)})}),n},GE=20,VE=function(e,t,r){for(let n=0;n<GE;n+=1){if(t[r-n]){const a=t[r-n].findIndex(i=>i.id===e);if(a!==-1)return[r-n,a]}if(t[r+n]){const a=t[r+n].findIndex(i=>i.id===e);if(a!==-1)return[r+n,a]}}return null},UE=function(e,t){const[r,n,,,a]=e,i=t[r],o=i.findIndex(s=>s.id===a);return o===-1?(e[2]=t[r].length,e[4]=i.length?i[i.length-1].id:null):e[2]=o,t[r].slice(n,e[2]+1)},WE=function(e,t){let r=[];return e.forEach((n,a)=>{if(!n)return;let[i,o,s,u,l]=n,c=t[i]||[];if(o===void 0&&(o=0),s===void 0&&(s=c.length),u&&(!c[o]||c[o].id!==u)){const f=VE(u,t,i);if(f!==null){const m=s-o;c=t[f[0]].slice(f[1],f[1]+m);const d=c[0]?c[0].id:null;e[a]=[f[0],f[1],f[1]+m,d]}}else c=c.slice(o,s);c.length!==0&&o!==s&&(l&&c[c.length-1].id!==l&&(c=UE(n,t)),r.push(c))}),r=r.filter(n=>n.length>0),r},JE=function(e){const t=[];for(let r=0;r<e.length;r+=1)for(let n=0;n<e[r].length;n+=1)t.push(e[r][n]);return t},KE={one:{termList:JE,getDoc:WE,pointer:{indexN:bc,splitAll:pw}}},gw=function(e,t){const r=e.concat(t),n=bc(r);let a=[];return r.forEach(i=>{const[o]=i;if(n[o].length===1){a.push(i);return}const s=n[o].filter(l=>hw(i,l));s.push(i);const u=qE(s);a.push(u)}),a=RE(a),a},vw=function(e,t){const r=[];return pw(e,t).forEach(a=>{a.passthrough&&r.push(a.passthrough),a.before&&r.push(a.before),a.after&&r.push(a.after)}),r},YE=function(e,t){const r=e[1]<t[1]?t[1]:e[1],n=e[2]>t[2]?t[2]:e[2];return r<n?[e[0],r,n]:null},ZE=function(e,t){const r=bc(t),n=[];return e.forEach(a=>{let i=r[a[0]]||[];i=i.filter(o=>hw(a,o)),i.length!==0&&i.forEach(o=>{const s=YE(a,o);s&&n.push(s)})}),n},QE=function(e){return Object.prototype.toString.call(e)==="[object Array]"},md=(e,t)=>typeof e=="string"||QE(e)?t.match(e):e||t.none(),eu=function(e,t){return e.map(r=>{const[n,a]=r;return t[n]&&t[n][a]&&(r[3]=t[n][a].id),r})},fa={};fa.union=function(e){e=md(e,this);let t=gw(this.fullPointer,e.fullPointer);return t=eu(t,this.document),this.toView(t)};fa.and=fa.union;fa.intersection=function(e){e=md(e,this);let t=ZE(this.fullPointer,e.fullPointer);return t=eu(t,this.document),this.toView(t)};fa.not=function(e){e=md(e,this);let t=vw(this.fullPointer,e.fullPointer);return t=eu(t,this.document),this.toView(t)};fa.difference=fa.not;fa.complement=function(){const e=this.all();let t=vw(e.fullPointer,this.fullPointer);return t=eu(t,this.document),this.toView(t)};fa.settle=function(){let e=this.fullPointer;return e.forEach(t=>{e=gw(e,[t])}),e=eu(e,this.document),this.update(e)};const XE=function(e){Object.assign(e.prototype,fa)},eS={methods:KE,api:XE},tS={buildNet:function(e){const r=this.methods().one.buildNet(e,this.world());return r.isNet=!0,r}},rS=function(e){e.prototype.sweep=function(t,r={}){const{world:n,docs:a}=this,{methods:i}=n;let o=i.one.bulkMatch(a,t,this.methods,r);r.tagger!==!1&&i.one.bulkTagger(o,a,this.world),o=o.map(u=>{const l=u.pointer,c=a[l[0]][l[1]],f=l[2]-l[1];return c.index&&(u.pointer=[c.index[0],c.index[1],l[1]+f]),u});const s=o.map(u=>u.pointer);return o=o.map(u=>(u.view=this.update([u.pointer]),delete u.regs,delete u.needs,delete u.pointer,delete u._expanded,u)),{view:this.update(s),found:o}}},nm=function(e){return e.optional===!0||e.negative===!0?null:e.tag?"#"+e.tag:e.word?e.word:e.switch?`%${e.switch}%`:null},nS=function(e){const t=[];return e.forEach(r=>{t.push(nm(r)),r.operator==="and"&&r.choices&&r.choices.forEach(n=>{n.forEach(a=>{t.push(nm(a))})})}),t.filter(r=>r)},aS=function(e){const t=[];let r=0;return e.forEach(n=>{n.operator==="or"&&!n.optional&&!n.negative&&(n.fastOr&&Array.from(n.fastOr).forEach(a=>{t.push(a)}),n.choices&&n.choices.forEach(a=>{a.forEach(i=>{const o=nm(i);o&&t.push(o)})}),r+=1)}),{wants:t,count:r}},iS=function(e,t){const r=t.methods.one.parseMatch;return e.forEach(n=>{n.regs=r(n.match,{},t),typeof n.ifNo=="string"&&(n.ifNo=[n.ifNo]),n.notIf&&(n.notIf=r(n.notIf,{},t)),n.needs=nS(n.regs);const{wants:a,count:i}=aS(n.regs);n.wants=a,n.minWant=i,n.minWords=n.regs.filter(o=>!o.optional).length}),e},oS=function(e,t){e=iS(e,t);const r={};e.forEach(a=>{a.needs.forEach(i=>{r[i]=Array.isArray(r[i])?r[i]:[],r[i].push(a)}),a.wants.forEach(i=>{r[i]=Array.isArray(r[i])?r[i]:[],r[i].push(a)})}),Object.keys(r).forEach(a=>{const i={};r[a]=r[a].filter(o=>typeof i[o.match]=="boolean"?!1:(i[o.match]=!0,!0))});const n=e.filter(a=>a.needs.length===0&&a.wants.length===0);return{hooks:r,always:n}},sS=function(e,t){return e.map((r,n)=>{let a=[];Object.keys(t).forEach(o=>{e[n].has(o)&&(a=a.concat(t[o]))});const i={};return a=a.filter(o=>typeof i[o.match]=="boolean"?!1:(i[o.match]=!0,!0)),a})},uS=function(e,t){return e.map((r,n)=>{const a=t[n];return r=r.filter(i=>i.needs.every(o=>a.has(o))),r=r.filter(i=>!(i.ifNo!==void 0&&i.ifNo.some(o=>a.has(o))===!0)),r=r.filter(i=>i.wants.length===0?!0:i.wants.filter(s=>a.has(s)).length>=i.minWant),r})},lS=function(e,t,r,n,a){const i=[];for(let o=0;o<e.length;o+=1)for(let s=0;s<e[o].length;s+=1){const u=e[o][s],l=n.one.match([t[o]],u);if(l.ptrs.length>0&&(l.ptrs.forEach(c=>{c[0]=o;const f=Object.assign({},u,{pointer:c});u.unTag!==void 0&&(f.unTag=u.unTag),i.push(f)}),a.matchOne===!0))return[i[0]]}return i},cS=function(e,t){return e.map((r,n)=>{const a=t[n].length;return r=r.filter(i=>a>=i.minWords),r})},fS=function(e,t,r,n={}){const a=r.one.cacheDoc(e);let i=sS(a,t.hooks);return i=uS(i,a),t.always.length>0&&(i=i.map(s=>s.concat(t.always))),i=cS(i,e),lS(i,e,a,r,n)},mS=function(e,t,r){const n=r.one.tagSet;if(!n.hasOwnProperty(t))return!0;const a=n[t].not||[];for(let i=0;i<e.length;i+=1){const o=e[i];for(let s=0;s<a.length;s+=1)if(o.tags.has(a[s])===!0)return!1}return!0},dS=function(e,t,r){const{model:n,methods:a}=r,{getDoc:i,setTag:o,unTag:s}=a.one,u=a.two.looksPlural;return e.length===0?e:((typeof process>"u"||!process.env?self.env||{}:process.env).DEBUG_TAGS&&console.log(`
9
+
10
+ \x1B[32m→ ${e.length} post-tagger:\x1B[0m`),e.map(c=>{if(!c.tag&&!c.chunk&&!c.unTag)return;const f=c.reason||c.match,m=i([c.pointer],t)[0];if(!(c.safe===!0&&(mS(m,c.tag,n)===!1||m[m.length-1].post==="-"))){if(c.tag!==void 0){if(o(m,c.tag,r,c.safe,`[post] '${f}'`),c.tag==="Noun"&&u){const d=m[m.length-1];u(d.text)?o([d],"Plural",r,c.safe,"quick-plural"):o([d],"Singular",r,c.safe,"quick-singular")}c.freeze===!0&&m.forEach(d=>d.frozen=!0)}c.unTag!==void 0&&s(m,c.unTag,r,c.safe,f),c.chunk&&m.forEach(d=>d.chunk=c.chunk)}}))},hS={buildNet:oS,bulkMatch:fS,bulkTagger:dS},pS={lib:tS,api:rS,methods:{one:hS}},yw=/ /,Hh=function(e,t){t==="Noun"&&(e.chunk=t),t==="Verb"&&(e.chunk=t)},bw=function(e,t,r,n){if(e.tags.has(t)===!0||t===".")return null;e.frozen===!0&&(n=!0);const a=r[t];if(a){if(a.not&&a.not.length>0)for(let i=0;i<a.not.length;i+=1){if(n===!0&&e.tags.has(a.not[i]))return null;e.tags.delete(a.not[i])}if(a.parents&&a.parents.length>0)for(let i=0;i<a.parents.length;i+=1)e.tags.add(a.parents[i]),Hh(e,a.parents[i])}return e.tags.add(t),e.dirty=!0,Hh(e,t),!0},gS=function(e,t,r,n){const a=t.split(yw);e.forEach((i,o)=>{let s=a[o];s&&(s=s.replace(/^#/,""),bw(i,s,r,n))})},vS=function(e){return Object.prototype.toString.call(e)==="[object Array]"},yS=(e,t,r="")=>{const n=o=>"\x1B[33m\x1B[3m"+o+"\x1B[0m",a=o=>"\x1B[3m"+o+"\x1B[0m",i=e.map(o=>o.text||"["+o.implicit+"]").join(" ");typeof t!="string"&&t.length>2&&(t=t.slice(0,2).join(", #")+" +"),t=typeof t!="string"?t.join(", #"):t,console.log(` ${n(i).padEnd(24)} \x1B[32m→\x1B[0m #${t.padEnd(22)} ${a(r)}`)},ww=function(e,t,r={},n,a){const i=r.model.one.tagSet||{};if(!t)return;const o=typeof process>"u"||!process.env?self.env||{}:process.env;if(o&&o.DEBUG_TAGS&&yS(e,t,a),vS(t)===!0){t.forEach(s=>ww(e,s,r,n));return}if(typeof t!="string"){console.warn(`compromise: Invalid tag '${t}'`);return}if(t=t.trim(),yw.test(t)){gS(e,t,i,n);return}t=t.replace(/^#/,"");for(let s=0;s<e.length;s+=1)bw(e[s],t,i,n)},bS=function(e,t,r){t=t.trim().replace(/^#/,"");for(let n=0;n<e.length;n+=1){const a=e[n];if(a.frozen===!0)continue;if(t==="*"){a.tags.clear();continue}const i=r[t];if(i&&i.children.length>0)for(let o=0;o<i.children.length;o+=1)a.tags.delete(i.children[o]);a.tags.delete(t)}},wS=function(e,t,r){if(!r.hasOwnProperty(t))return!0;const n=r[t].not||[];for(let a=0;a<n.length;a+=1)if(e.tags.has(n[a]))return!1;return!0},ri=function(e){return e.children=e.children||[],e._cache=e._cache||{},e.props=e.props||{},e._cache.parents=e._cache.parents||[],e._cache.children=e._cache.children||[],e},xS=/^ *(#|\/\/)/,DS=function(e){let t=e.trim().split(/->/),r=[];t.forEach((a=>{r=r.concat((function(i){if(!(i=i.trim()))return null;if(/^\[/.test(i)&&/\]$/.test(i)){let o=(i=(i=i.replace(/^\[/,"")).replace(/\]$/,"")).split(/,/);return o=o.map((s=>s.trim())).filter((s=>s)),o=o.map((s=>ri({id:s}))),o}return[ri({id:i})]})(a))})),r=r.filter((a=>a));let n=r[0];for(let a=1;a<r.length;a+=1)n.children.push(r[a]),n=r[a];return r[0]},Pa=(e,t)=>{let r=[],n=[e];for(;n.length>0;){let a=n.pop();r.push(a),a.children&&a.children.forEach((i=>{t&&t(a,i),n.push(i)}))}return r},dd=e=>Object.prototype.toString.call(e)==="[object Array]",bu=e=>(e=e||"").trim(),NS=function(e=[]){return typeof e=="string"?(function(r){let n=r.split(/\r?\n/),a=[];n.forEach((o=>{if(!o.trim()||xS.test(o))return;let s=(u=>{const l=/^( {2}|\t)/;let c=0;for(;l.test(u);)u=u.replace(l,""),c+=1;return c})(o);a.push({indent:s,node:DS(o)})}));let i=(function(o){let s={children:[]};return o.forEach(((u,l)=>{u.indent===0?s.children=s.children.concat(u.node):o[l-1]&&(function(c,f){let m=c[f].indent;for(;f>=0;f-=1)if(c[f].indent<m)return c[f];return c[0]})(o,l).node.children.push(u.node)})),s})(a);return i=ri(i),i})(e):dd(e)?(function(r){let n={};r.forEach((i=>{n[i.id]=i}));let a=ri({});return r.forEach((i=>{if((i=ri(i)).parent)if(n.hasOwnProperty(i.parent)){let o=n[i.parent];delete i.parent,o.children.push(i)}else console.warn(`[Grad] - missing node '${i.parent}'`);else a.children.push(i)})),a})(e):(Pa(t=e).forEach(ri),t);var t},AS=e=>"\x1B[31m"+e+"\x1B[0m",CS=e=>"\x1B[2m"+e+"\x1B[0m",am=function(e,t){let r="-> ";t&&(r=CS("→ "));let n="";return Pa(e).forEach(((a,i)=>{let o=a.id||"";if(t&&(o=AS(o)),i===0&&!a.id)return;let s=a._cache.parents.length;n+=" ".repeat(s)+r+o+`
11
+ `})),n},Gh=function(e){let t=Pa(e);t.forEach((n=>{delete(n=Object.assign({},n)).children}));let r=t[0];return r&&!r.id&&Object.keys(r.props).length===0&&t.shift(),t},Vh={text:am,txt:am,array:Gh,flat:Gh},Uh=function(e,t){return t==="nested"||t==="json"?e:t==="debug"?(console.log(am(e,!0)),null):Vh.hasOwnProperty(t)?Vh[t](e):e},Xc=e=>{Pa(e,((t,r)=>{t.id&&(t._cache.parents=t._cache.parents||[],r._cache.parents=t._cache.parents.concat([t.id]))}))},ES=(e,t)=>(Object.keys(t).forEach((r=>{if(t[r]instanceof Set){let n=e[r]||new Set;e[r]=new Set([...n,...t[r]])}else if((n=>n&&typeof n=="object"&&!Array.isArray(n))(t[r])){let n=e[r]||{};e[r]=Object.assign({},t[r],n)}else dd(t[r])?e[r]=t[r].concat(e[r]||[]):e[r]===void 0&&(e[r]=t[r])})),e),SS=/\//;let MS=class Nl{constructor(t={}){Object.defineProperty(this,"json",{enumerable:!1,value:t,writable:!0})}get children(){return this.json.children}get id(){return this.json.id}get found(){return this.json.id||this.json.children.length>0}props(t={}){let r=this.json.props||{};return typeof t=="string"&&(r[t]=!0),this.json.props=Object.assign(r,t),this}get(t){if(t=bu(t),!SS.test(t)){let n=this.json.children.find((a=>a.id===t));return new Nl(n)}let r=((n,a)=>{let i=(o=>typeof o!="string"?o:(o=o.replace(/^\//,"")).split(/\//))(a=a||"");for(let o=0;o<i.length;o+=1){let s=n.children.find((u=>u.id===i[o]));if(!s)return null;n=s}return n})(this.json,t)||ri({});return new Nl(r)}add(t,r={}){if(dd(t))return t.forEach((a=>this.add(bu(a),r))),this;t=bu(t);let n=ri({id:t,props:r});return this.json.children.push(n),new Nl(n)}remove(t){return t=bu(t),this.json.children=this.json.children.filter((r=>r.id!==t)),this}nodes(){return Pa(this.json).map((t=>(delete(t=Object.assign({},t)).children,t)))}cache(){return(t=>{let r=Pa(t,((a,i)=>{a.id&&(a._cache.parents=a._cache.parents||[],a._cache.children=a._cache.children||[],i._cache.parents=a._cache.parents.concat([a.id]))})),n={};r.forEach((a=>{a.id&&(n[a.id]=a)})),r.forEach((a=>{a._cache.parents.forEach((i=>{n.hasOwnProperty(i)&&n[i]._cache.children.push(a.id)}))})),t._cache.children=Object.keys(n)})(this.json),this}list(){return Pa(this.json)}fillDown(){var t;return t=this.json,Pa(t,((r,n)=>{n.props=ES(n.props,r.props)})),this}depth(){Xc(this.json);let t=Pa(this.json),r=t.length>1?1:0;return t.forEach((n=>{if(n._cache.parents.length===0)return;let a=n._cache.parents.length+1;a>r&&(r=a)})),r}out(t){return Xc(this.json),Uh(this.json,t)}debug(){return Xc(this.json),Uh(this.json,"debug"),this}};const xw=function(e){let t=NS(e);return new MS(t)};xw.prototype.plugin=function(e){e(this)};const po={Noun:"blue",Verb:"green",Negative:"green",Date:"red",Value:"red",Adjective:"magenta",Preposition:"cyan",Conjunction:"cyan",Determiner:"cyan",Hyphenated:"cyan",Adverb:"cyan"},TS=function(e){if(po.hasOwnProperty(e.id))return po[e.id];if(po.hasOwnProperty(e.is))return po[e.is];const t=e._cache.parents.find(r=>po[r]);return po[t]},FS=function(e){const t={};return e.forEach(r=>{const{not:n,also:a,is:i,novel:o}=r.props;let s=r._cache.parents;a&&(s=s.concat(a)),t[r.id]={is:i,not:n,novel:o,also:a,parents:s,children:r._cache.children,color:TS(r)}}),Object.keys(t).forEach(r=>{const n=new Set(t[r].not);t[r].not.forEach(a=>{t[a]&&t[a].children.forEach(i=>n.add(i))}),t[r].not=Array.from(n)}),t},Wh=function(e){return e?typeof e=="string"?[e]:e:[]},PS=function(e,t){return Object.keys(e).forEach(r=>{e[r].isA&&(e[r].is=e[r].isA),e[r].notA&&(e[r].not=e[r].notA),e[r].is&&typeof e[r].is=="string"&&!t.hasOwnProperty(e[r].is)&&!e.hasOwnProperty(e[r].is)&&(e[e[r].is]={}),e[r].not&&typeof e[r].not=="string"&&!e.hasOwnProperty(e[r].not)&&!t.hasOwnProperty(e[r].not)&&!e.hasOwnProperty(e[r].not)&&(e[e[r].not]={})}),e},kS=function(e,t){return e=PS(e,t),Object.keys(e).forEach(r=>{e[r].children=Wh(e[r].children),e[r].not=Wh(e[r].not)}),Object.keys(e).forEach(r=>{(e[r].not||[]).forEach(a=>{e[a]&&e[a].not&&e[a].not.push(r)})}),e},OS=function(e){const t=Object.keys(e).map(n=>{const a=e[n],i={not:new Set(a.not),also:a.also,is:a.is,novel:a.novel};return{id:n,parent:a.is,props:i,children:[]}});return xw(t).cache().fillDown().out("array")},$S=function(e){return Object.keys(e).forEach(t=>{e[t]=Object.assign({},e[t]),e[t].novel=!0}),e},BS=function(e,t){Object.keys(t).length>0&&(e=$S(e)),e=kS(e,t);const r=Object.assign({},t,e),n=OS(r);return FS(n)},_S={one:{setTag:ww,unTag:bS,addTags:BS,canBe:wS}},Jh=function(e){return Object.prototype.toString.call(e)==="[object Array]"},IS={tag:function(e,t="",r){if(!this.found||!e)return this;const n=this.termList();if(n.length===0)return this;const{methods:a,verbose:i,world:o}=this;return i===!0&&console.log(" + ",e,t||""),Jh(e)?e.forEach(s=>a.one.setTag(n,s,o,r,t)):a.one.setTag(n,e,o,r,t),this.uncache(),this},tagSafe:function(e,t=""){return this.tag(e,t,!0)},unTag:function(e,t){if(!this.found||!e)return this;const r=this.termList();if(r.length===0)return this;const{methods:n,verbose:a,model:i}=this;a===!0&&console.log(" - ",e,t||"");const o=i.one.tagSet;return Jh(e)?e.forEach(s=>n.one.unTag(r,s,o)):n.one.unTag(r,e,o),this.uncache(),this},canBe:function(e){e=e.replace(/^#/,"");const t=this.model.one.tagSet,r=this.methods.one.canBe,n=[];this.document.forEach((i,o)=>{i.forEach((s,u)=>{r(s,e,t)||n.push([o,u,u+1])})});const a=this.update(n);return this.difference(a)}},zS=function(e){Object.assign(e.prototype,IS)},jS=function(e){const{model:t,methods:r}=this.world(),n=t.one.tagSet,a=r.one.addTags,i=a(e,n);return t.one.tagSet=i,this},qS={addTags:jS},Kh=new Set(["Auxiliary","Possessive"]),RS=function(e,t){return e=e.sort((r,n)=>{if(Kh.has(r)||!t.hasOwnProperty(n))return 1;if(Kh.has(n)||!t.hasOwnProperty(r))return-1;let a=t[r].children||[];const i=a.length;a=t[n].children||[];const o=a.length;return i-o}),e},LS=function(e){const{document:t,world:r}=e,n=r.model.one.tagSet;t.forEach(a=>{a.forEach(i=>{const o=Array.from(i.tags);i.tagRank=RS(o,n)})})},HS={model:{one:{tagSet:{}}},compute:{tagRank:LS},methods:_S,api:zS,lib:qS},GS=/([.!?\u203D\u2E18\u203C\u2047-\u2049\u3002]+\s)/g,VS=/^[.!?\u203D\u2E18\u203C\u2047-\u2049\u3002]+\s$/,US=/((?:\r?\n|\r)+)/,WS=function(e){const t=[],r=e.split(US);for(let n=0;n<r.length;n++){const a=r[n].split(GS);for(let i=0;i<a.length;i++)a[i+1]&&VS.test(a[i+1])===!0&&(a[i]+=a[i+1],a[i+1]=""),a[i]!==""&&t.push(a[i])}return t},JS=/[a-z0-9\u00C0-\u00FF\u00a9\u00ae\u2000-\u3300\ud000-\udfff]/i,KS=/\S/,YS=function(e){const t=[];for(let r=0;r<e.length;r++){const n=e[r];if(!(n===void 0||n==="")){if(KS.test(n)===!1||JS.test(n)===!1){if(t[t.length-1]){t[t.length-1]+=n;continue}else if(e[r+1]){e[r+1]=n+e[r+1];continue}}t.push(n)}}return t},ZS=function(e){return!!e.match(/\n$/)},QS=function(e,t){const r=t.methods.one.tokenize.isSentence,n=t.model.one.abbreviations||new Set,a=[];for(let i=0;i<e.length;i++){const o=e[i];e[i+1]&&!r(o,n)&&!ZS(o)?e[i+1]=o+(e[i+1]||""):o&&o.length>0&&(a.push(o),e[i]="")}return a},Yh=280,Dw={'"':'"',""":""","“":"”","‟":"”","„":"”","⹂":"”","‚":"’","«":"»","‹":"›","‵":"′","‶":"″","‷":"‴","〝":"〞","〟":"〞"},XS=RegExp("["+Object.keys(Dw).join("")+"]","g"),e4=RegExp("["+Object.values(Dw).join("")+"]","g"),Zh=function(e){if(!e)return!1;const t=e.match(e4);return t!==null&&t.length===1},t4=function(e){const t=[];for(let r=0;r<e.length;r+=1){const a=e[r].match(XS);if(a!==null&&a.length===1){if(Zh(e[r+1])&&e[r+1].length<Yh){e[r]+=e[r+1],t.push(e[r]),e[r+1]="",r+=1;continue}if(Zh(e[r+2])){const i=e[r+1]+e[r+2];if(i.length<Yh){e[r]+=i,t.push(e[r]),e[r+1]="",e[r+2]="",r+=2;continue}}}t.push(e[r])}return t},r4=250,Qh=/\(/g,n4=/\)/g,a4=function(e){const t=[];for(let r=0;r<e.length;r+=1){const a=e[r].match(Qh);if(a!==null&&a.length===1&&e[r+1]&&e[r+1].length<r4&&e[r+1].match(n4)!==null&&a.length===1&&!Qh.test(e[r+1])){e[r]+=e[r+1],t.push(e[r]),e[r+1]="",r+=1;continue}t.push(e[r])}return t},i4=/\S/,Xh=/^\s+/,o4=function(e,t){if(e=e||"",e=String(e),!e||typeof e!="string"||i4.test(e)===!1)return[];e=e.replace(" "," ");const r=WS(e);let n=YS(r);if(n=QS(n,t),n=t4(n),n=a4(n),n.length===0)return[e];for(let a=1;a<n.length;a+=1){const i=n[a].match(Xh);i!==null&&(n[a-1]+=i[0],n[a]=n[a].replace(Xh,""))}return n},s4=function(e,t){const r=e.split(/[-–—]/);if(r.length<=1)return!1;const{prefixes:n,suffixes:a}=t.one;return r[0].length===1&&/[a-z]/i.test(r[0])||n.hasOwnProperty(r[0])||(r[1]=r[1].trim().replace(/[.?!]$/,""),a.hasOwnProperty(r[1]))?!1:/^([a-z\u00C0-\u00FF`"'/]+)[-–—]([a-z0-9\u00C0-\u00FF].*)/i.test(e)===!0||/^[('"]?([0-9]{1,4})[-–—]([a-z\u00C0-\u00FF`"'/-]+[)'"]?$)/i.test(e)===!0},u4=function(e){const t=[],r=e.split(/[-–—]/);let n="-";const a=e.match(/[-–—]/);a&&a[0]&&(n=a);for(let i=0;i<r.length;i++)i===r.length-1?t.push(r[i]):t.push(r[i]+n);return t},l4=function(e){const t=/^[0-9]{1,4}(:[0-9][0-9])?([a-z]{1,2})? ?[-–—] ?$/,r=/^[0-9]{1,4}([a-z]{1,2})? ?$/;for(let n=0;n<e.length-1;n+=1)e[n+1]&&t.test(e[n])&&r.test(e[n+1])&&(e[n]=e[n]+e[n+1],e[n+1]=null);return e},c4=new RegExp("\\p{L} ?\\/ ?\\p{L}+$","u"),f4=function(e){for(let t=1;t<e.length-1;t++)c4.test(e[t])&&(e[t-1]+=e[t]+e[t+1],e[t]=null,e[t+1]=null);return e},m4=/\S/,d4=/^[!?.]+$/,h4=/(\S+)/;let im=[".","?","!",":",";","-","–","—","--","...","(",")","[","]",'"',"'","`","«","»","*","•"];im=im.reduce((e,t)=>(e[t]=!0,e),{});const p4=function(e){return Object.prototype.toString.call(e)==="[object Array]"},g4=function(e,t){let r=[],n=[];if(e=e||"",typeof e=="number"&&(e=String(e)),p4(e))return e;const a=e.split(h4);for(let o=0;o<a.length;o++){if(s4(a[o],t)===!0){n=n.concat(u4(a[o]));continue}n.push(a[o])}let i="";for(let o=0;o<n.length;o++){const s=n[o];m4.test(s)===!0&&im.hasOwnProperty(s)===!1&&d4.test(s)===!1?(r.length>0?(r[r.length-1]+=i,r.push(s)):r.push(i+s),i=""):i+=s}return i&&(r.length===0&&(r[0]=""),r[r.length-1]+=i),r=f4(r),r=l4(r),r=r.filter(o=>o),r},ep=new RegExp("\\p{Letter}","u"),wu=/[\p{Number}\p{Currency_Symbol}]/u,v4=/^[a-z]\.([a-z]\.)+/i,y4=/[sn]['’]$/,b4=function(e,t){const{prePunctuation:r,postPunctuation:n,emoticons:a}=t.one;let i=e,o="",s="";const u=Array.from(e);if(a.hasOwnProperty(e.trim()))return{str:e.trim(),pre:o,post:" "};let l=u.length;for(let c=0;c<l;c+=1){const f=u[0];if(r[f]!==!0){if((f==="+"||f==="-")&&wu.test(u[1])||f==="'"&&f.length===3&&wu.test(u[1])||ep.test(f)||wu.test(f))break;o+=u.shift()}}l=u.length;for(let c=0;c<l;c+=1){const f=u[u.length-1];if(n[f]!==!0){if(ep.test(f)||wu.test(f))break;f==="."&&v4.test(i)===!0||f==="'"&&y4.test(i)===!0||(s=u.pop()+s)}}return e=u.join(""),e===""&&(i=i.replace(/ *$/,c=>(s=c||"","")),e=i,o=""),{str:e,pre:o,post:s}},w4=(e,t)=>{const{str:r,pre:n,post:a}=b4(e,t);return{text:r,pre:n,post:a,tags:new Set}},x4=function(e,t){const r=t.model.one.unicode||{};e=e||"";const n=e.split("");return n.forEach((a,i)=>{r[a]&&(n[i]=r[a])}),n.join("")},D4=function(e){e=e||"",e=e.toLowerCase(),e=e.trim();const t=e;return e=e.replace(/[,;.!?]+$/,""),e=e.replace(/\u2026/g,"..."),e=e.replace(/\u2013/g,"-"),/^[:;]/.test(e)===!1&&(e=e.replace(/\.{3,}$/g,""),e=e.replace(/[",.!:;?)]+$/g,""),e=e.replace(/^['"(]+/g,"")),e=e.replace(/[\u200B-\u200D\uFEFF]/g,""),e=e.trim(),e===""&&(e=t),e=e.replace(/([0-9]),([0-9])/g,"$1$2"),e},N4=/([A-Z]\.)+[A-Z]?,?$/,A4=/^[A-Z]\.,?$/,C4=/[A-Z]{2,}('s|,)?$/,E4=/([a-z]\.)+[a-z]\.?$/,S4=function(e){return N4.test(e)===!0||E4.test(e)===!0||A4.test(e)===!0||C4.test(e)===!0},M4=function(e){return S4(e)&&(e=e.replace(/\./g,"")),e},Nw=function(e,t){const r=t.methods.one.killUnicode;let n=e.text||"";n=D4(n),n=r(n,t),n=M4(n),e.normal=n},T4=function(e,t){const{methods:r,model:n}=t,{splitSentences:a,splitTerms:i,splitWhitespace:o}=r.one.tokenize;return e=e||"",e=a(e,t).map(u=>{let l=i(u,n);return l=l.map(c=>o(c,n)),l.forEach(c=>{Nw(c,t)}),l}),e},F4=/[ .][A-Z]\.? *$/i,P4=/(?:\u2026|\.{2,}) *$/,k4=new RegExp("\\p{L}","u"),O4=/\. *$/,$4=/^[A-Z]\. $/,B4=function(e,t){if(k4.test(e)===!1||F4.test(e)===!0||e.length===3&&$4.test(e)||P4.test(e)===!0)return!1;const n=e.replace(/[.!?\u203D\u2E18\u203C\u2047-\u2049] *$/,"").split(" "),a=n[n.length-1].toLowerCase();return!(t.hasOwnProperty(a)===!0&&O4.test(e)===!0)},_4={one:{killUnicode:x4,tokenize:{splitSentences:o4,isSentence:B4,splitTerms:g4,splitWhitespace:w4,fromString:T4}}},I4={"&":"and","@":"at","%":"percent",plz:"please",bein:"being"},z4=["approx","apt","bc","cyn","eg","esp","est","etc","ex","exp","prob","pron","gal","min","pseud","fig","jd","lat","lng","vol","fm","def","misc","plz","ea","ps","sec","pt","pref","pl","pp","qt","fr","sq","nee","ss","tel","temp","vet","ver","fem","masc","eng","adj","vb","rb","inf","situ","vivo","vitro","wr"],j4=["adj","adm","adv","asst","atty","bldg","brig","capt","cmdr","comdr","cpl","det","dr","esq","gen","gov","hon","jr","llb","lt","maj","messrs","mlle","mme","mr","mrs","ms","mstr","phd","prof","pvt","rep","reps","res","rev","sen","sens","sfc","sgt","sir","sr","supt","surg"],q4=["jan","feb","mar","apr","jun","jul","aug","sep","sept","oct","nov","dec"],R4=["ad","al","arc","ba","bl","ca","cca","col","corp","ft","fy","ie","lit","ma","md","pd","tce"],L4=["dept","univ","assn","bros","inc","ltd","co"],H4=["rd","st","dist","mt","ave","blvd","cl","cres","hwy","ariz","cal","calif","colo","conn","fla","fl","ga","ida","ia","kan","kans","minn","neb","nebr","okla","penna","penn","pa","dak","tenn","tex","ut","vt","va","wis","wisc","wy","wyo","usafa","alta","ont","que","sask"],G4=["dl","ml","gal","qt","pt","tbl","tsp","tbsp","km","dm","cm","mm","mi","td","hr","hrs","kg","hg","dg","cg","mg","µg","lb","oz","sq ft","hz","mps","mph","kmph","kb","mb","tb","lx","lm","fl oz","yb"],V4=[[z4],[G4,"Unit"],[R4,"Noun"],[j4,"Honorific"],[q4,"Month"],[L4,"Organization"],[H4,"Place"]],Aw={},Al={};V4.forEach(e=>{e[0].forEach(t=>{Aw[t]=!0,Al[t]="Abbreviation",e[1]!==void 0&&(Al[t]=[Al[t],e[1]])})});const U4=["anti","bi","co","contra","de","extra","infra","inter","intra","macro","micro","mis","mono","multi","peri","pre","pro","proto","pseudo","re","sub","supra","trans","tri","un","out","ex"].reduce((e,t)=>(e[t]=!0,e),{}),W4={like:!0,ish:!0,less:!0,able:!0,elect:!0,type:!0,designate:!0},tp={"!":"¡","?":"¿Ɂ",'"':'“”"❝❞',"'":"‘‛❛❜’","-":"—–",a:"ªÀÁÂÃÄÅàáâãäåĀāĂ㥹ǍǎǞǟǠǡǺǻȀȁȂȃȦȧȺΆΑΔΛάαλАаѦѧӐӑӒӓƛæ",b:"ßþƀƁƂƃƄƅɃΒβϐϦБВЪЬвъьѢѣҌҍ",c:"¢©ÇçĆćĈĉĊċČčƆƇƈȻȼͻͼϲϹϽϾСсєҀҁҪҫ",d:"ÐĎďĐđƉƊȡƋƌ",e:"ÈÉÊËèéêëĒēĔĕĖėĘęĚěƐȄȅȆȇȨȩɆɇΈΕΞΣέεξϵЀЁЕеѐёҼҽҾҿӖӗễ",f:"ƑƒϜϝӺӻҒғſ",g:"ĜĝĞğĠġĢģƓǤǥǦǧǴǵ",h:"ĤĥĦħƕǶȞȟΉΗЂЊЋНнђћҢңҤҥҺһӉӊ",I:"ÌÍÎÏ",i:"ìíîïĨĩĪīĬĭĮįİıƖƗȈȉȊȋΊΐΪίιϊІЇіїi̇",j:"ĴĵǰȷɈɉϳЈј",k:"ĶķĸƘƙǨǩΚκЌЖКжкќҚқҜҝҞҟҠҡ",l:"ĹĺĻļĽľĿŀŁłƚƪǀǏǐȴȽΙӀӏ",m:"ΜϺϻМмӍӎ",n:"ÑñŃńŅņŇňʼnŊŋƝƞǸǹȠȵΝΠήηϞЍИЙЛПийлпѝҊҋӅӆӢӣӤӥπ",o:"ÒÓÔÕÖØðòóôõöøŌōŎŏŐőƟƠơǑǒǪǫǬǭǾǿȌȍȎȏȪȫȬȭȮȯȰȱΌΘΟθοσόϕϘϙϬϴОФоѲѳӦӧӨөӪӫ",p:"ƤΡρϷϸϼРрҎҏÞ",q:"Ɋɋ",r:"ŔŕŖŗŘřƦȐȑȒȓɌɍЃГЯгяѓҐґ",s:"ŚśŜŝŞşŠšƧƨȘșȿЅѕ",t:"ŢţŤťŦŧƫƬƭƮȚțȶȾΓΤτϮТт",u:"ÙÚÛÜùúûüŨũŪūŬŭŮůŰűŲųƯưƱƲǓǔǕǖǗǘǙǚǛǜȔȕȖȗɄΰυϋύ",v:"νѴѵѶѷ",w:"ŴŵƜωώϖϢϣШЩшщѡѿ",x:"×ΧχϗϰХхҲҳӼӽӾӿ",y:"ÝýÿŶŷŸƳƴȲȳɎɏΎΥΫγψϒϓϔЎУучўѰѱҮүҰұӮӯӰӱӲӳ",z:"ŹźŻżŽžƵƶȤȥɀΖ"},Cw={};Object.keys(tp).forEach(function(e){tp[e].split("").forEach(function(t){Cw[t]=e})});const J4={"#":!0,"@":!0,_:!0,"°":!0,"​":!0,"‌":!0,"‍":!0,"\uFEFF":!0},K4={"%":!0,_:!0,"°":!0,"​":!0,"‌":!0,"‍":!0,"\uFEFF":!0},Y4={"<3":!0,"</3":!0,"<\\3":!0,":^P":!0,":^p":!0,":^O":!0,":^3":!0},Z4={one:{aliases:I4,abbreviations:Aw,prefixes:U4,suffixes:W4,prePunctuation:J4,postPunctuation:K4,lexicon:Al,unicode:Cw,emoticons:Y4}},rp=/\//,Q4=/[a-z]\.[a-z]/i,X4=/[0-9]/,eM=function(e,t){const r=e.normal||e.text||e.machine,n=t.model.one.aliases;if(n.hasOwnProperty(r)&&(e.alias=e.alias||[],e.alias.push(n[r])),rp.test(r)&&!Q4.test(r)&&!X4.test(r)){const a=r.split(rp);a.length<=3&&a.forEach(i=>{i=i.trim(),i!==""&&(e.alias=e.alias||[],e.alias.push(i))})}return e},tM=new RegExp("^\\p{Letter}+-\\p{Letter}+$","u"),rM=function(e){let t=e.implicit||e.normal||e.text;t=t.replace(/['’]s$/,""),t=t.replace(/s['’]$/,"s"),t=t.replace(/([aeiou][ktrp])in'$/,"$1ing"),tM.test(t)&&(t=t.replace(/-/g,"")),t=t.replace(/^[#@]/,""),t!==e.normal&&(e.machine=t)},nM=function(e){const t=e.docs,r={};for(let n=0;n<t.length;n+=1)for(let a=0;a<t[n].length;a+=1){const i=t[n][a],o=i.machine||i.normal;r[o]=r[o]||0,r[o]+=1}for(let n=0;n<t.length;n+=1)for(let a=0;a<t[n].length;a+=1){const i=t[n][a],o=i.machine||i.normal;i.freq=r[o]}},aM=function(e){let t=0,r=0;const n=e.document;for(let a=0;a<n.length;a+=1)for(let i=0;i<n[a].length;i+=1){const o=n[a][i];o.offset={index:r,start:t+o.pre.length,length:o.text.length},t+=o.pre.length+o.text.length+o.post.length,r+=1}},iM=function(e){const t=e.document;for(let r=0;r<t.length;r+=1)for(let n=0;n<t[r].length;n+=1)t[r][n].index=[r,n]},oM=function(e){let t=0;const r=e.docs;for(let n=0;n<r.length;n+=1)for(let a=0;a<r[n].length;a+=1)r[n][a].normal!==""&&(t+=1,r[n][a].wordCount=t)},ef=function(e,t){const r=e.docs;for(let n=0;n<r.length;n+=1)for(let a=0;a<r[n].length;a+=1)t(r[n][a],e.world)},sM={alias:e=>ef(e,eM),machine:e=>ef(e,rM),normal:e=>ef(e,Nw),freq:nM,offset:aM,index:iM,wordCount:oM},uM={compute:sM,methods:_4,model:Z4,hooks:["alias","machine","index","id"]},lM=function(e){const t=e.model.one.typeahead,r=e.docs;if(r.length===0||Object.keys(t).length===0)return;const n=r[r.length-1]||[],a=n[n.length-1];if(!a.post&&t.hasOwnProperty(a.normal)){const i=t[a.normal];a.implicit=i,a.machine=i,a.typeahead=!0,e.compute.preTagger&&e.last().unTag("*").compute(["lexicon","preTagger"])}},cM={typeahead:lM},fM=function(){const e=this.docs;if(e.length===0)return this;const t=e[e.length-1]||[],r=t[t.length-1];return r.typeahead===!0&&r.machine&&(r.text=r.machine,r.normal=r.machine),this},mM=function(e){e.prototype.autoFill=fM},dM=function(e,t,r){let n={};const a=[],i=r.prefixes||{};return e.forEach(o=>{o=o.toLowerCase().trim();let s=o.length;t.max&&s>t.max&&(s=t.max);for(let u=t.min;u<s;u+=1){const l=o.substring(0,u);if(!(t.safe&&r.model.one.lexicon.hasOwnProperty(l))){if(i.hasOwnProperty(l)===!0){a.push(l);continue}if(n.hasOwnProperty(l)===!0){a.push(l);continue}n[l]=o}}}),n=Object.assign({},i,n),a.forEach(o=>{delete n[o]}),n},hM=e=>Object.prototype.toString.call(e)==="[object Object]",pM={safe:!0,min:3},gM=function(e=[],t={}){const r=this.model();t=Object.assign({},pM,t),hM(e)&&(Object.assign(r.one.lexicon,e),e=Object.keys(e));const n=dM(e,t,this.world());return Object.keys(n).forEach(a=>{if(r.one.typeahead.hasOwnProperty(a)){delete r.one.typeahead[a];return}r.one.typeahead[a]=n[a]}),this},vM={typeahead:gM},yM={one:{typeahead:{}}},bM={model:yM,api:mM,lib:vM,compute:cM,hooks:["typeahead"]};tt.extend(s3);tt.extend(jE);tt.extend(iE);tt.extend(eS);tt.extend(HS);tt.plugin(O3);tt.extend(uM);tt.extend(_3);tt.plugin(xA);tt.extend(tC);tt.extend(bM);tt.extend(W3);tt.extend(pS);const Ew={addendum:"addenda",corpus:"corpora",criterion:"criteria",curriculum:"curricula",genus:"genera",memorandum:"memoranda",opus:"opera",ovum:"ova",phenomenon:"phenomena",referendum:"referenda",alga:"algae",alumna:"alumnae",antenna:"antennae",formula:"formulae",larva:"larvae",nebula:"nebulae",vertebra:"vertebrae",analysis:"analyses",axis:"axes",diagnosis:"diagnoses",parenthesis:"parentheses",prognosis:"prognoses",synopsis:"synopses",thesis:"theses",neurosis:"neuroses",appendix:"appendices",index:"indices",matrix:"matrices",ox:"oxen",sex:"sexes",alumnus:"alumni",bacillus:"bacilli",cactus:"cacti",fungus:"fungi",hippopotamus:"hippopotami",libretto:"libretti",modulus:"moduli",nucleus:"nuclei",octopus:"octopi",radius:"radii",stimulus:"stimuli",syllabus:"syllabi",cookie:"cookies",calorie:"calories",auntie:"aunties",movie:"movies",pie:"pies",rookie:"rookies",tie:"ties",zombie:"zombies",leaf:"leaves",loaf:"loaves",thief:"thieves",foot:"feet",goose:"geese",tooth:"teeth",beau:"beaux",chateau:"chateaux",tableau:"tableaux",bus:"buses",gas:"gases",circus:"circuses",crisis:"crises",virus:"viruses",database:"databases",excuse:"excuses",abuse:"abuses",avocado:"avocados",barracks:"barracks",child:"children",clothes:"clothes",echo:"echoes",embargo:"embargoes",epoch:"epochs",deer:"deer",halo:"halos",man:"men",woman:"women",mosquito:"mosquitoes",mouse:"mice",person:"people",quiz:"quizzes",rodeo:"rodeos",shoe:"shoes",sombrero:"sombreros",stomach:"stomachs",tornado:"tornados",tuxedo:"tuxedos",volcano:"volcanoes"},np={Comparative:"true¦bett1f0;arth0ew0in0;er",Superlative:"true¦earlier",PresentTense:"true¦bests,sounds",Condition:"true¦lest,unless",PastTense:"true¦began,came,d4had,kneel3l2m0sa4we1;ea0sg2;nt;eap0i0;ed;id",Participle:"true¦0:09;a06b01cZdXeat0fSgQhPoJprov0rHs7t6u4w1;ak0ithdra02o2r1;i02uY;k0v0;nd1pr04;ergoJoJ;ak0hHo3;e9h7lain,o6p5t4un3w1;o1um;rn;g,k;ol0reS;iQok0;ught,wn;ak0o1runk;ne,wn;en,wn;ewriNi1uJ;dd0s0;ut3ver1;do4se0t1;ak0h2;do2g1;roG;ne;ast0i7;iv0o1;ne,tt0;all0loBor1;bi3g2s1;ak0e0;iv0o9;dd0;ove,r1;a5eamt,iv0;hos0lu1;ng;e4i3lo2ui1;lt;wn;tt0;at0en,gun;r2w1;ak0ok0;is0;en",Gerund:"true¦accord0be0doin,go0result0stain0;ing",Expression:"true¦a0Yb0Uc0Sd0Oe0Mfarew0Lg0FhZjeez,lWmVnToOpLsJtIuFvEw7y0;a5e3i1u0;ck,p;k04p0;ee,pee;a0p,s;!h;!a,h,y;a5h2o1t0;af,f;rd up,w;atsoever,e1o0;a,ops;e,w;hoo,t;ery w06oi0L;gh,h0;! 0h,m;huh,oh;here nPsk,ut tut;h0ic;eesh,hh,it,oo;ff,h1l0ow,sst;ease,s,z;ew,ooey;h1i,mg,o0uch,w,y;h,o,ps;! 0h;hTmy go0wT;d,sh;a7evertheless,o0;!pe;eh,mm;ah,eh,m1ol0;!s;ao,fao;aCeBi9o2u0;h,mph,rra0zzC;h,y;l1o0;r6y9;la,y0;! 0;c1moCsmok0;es;ow;!p hip hoor0;ay;ck,e,llo,y;ha1i,lleluj0;ah;!ha;ah,ee4o1r0;eat scott,r;l1od0sh; grief,bye;ly;! whiz;ell;e0h,t cetera,ureka,ww,xcuse me;k,p;'oh,a0rat,uh;m0ng;mit,n0;!it;mon,o0;ngratulations,wabunga;a2oo1r0tw,ye;avo,r;!ya;h,m; 1h0ka,las,men,rgh,ye;!a,em,h,oy;la",Negative:"true¦n0;ever,o0;n,t",QuestionWord:"true¦how3wh0;at,e1ich,o0y;!m,se;n,re; come,'s",Reflexive:"true¦h4it5my5o1the0your2;ir1m1;ne3ur0;sel0;f,ves;er0im0;self",Plural:"true¦dick0gre0ones,records;ens","Unit|Noun":"true¦cEfDgChBinchAk9lb,m6newt5oz,p4qt,t1y0;ardEd;able1b0ea1sp;!l,sp;spo1;a,t,x;on9;!b,g,i1l,m,p0;h,s;!les;!b,elvin,g,m;!es;g,z;al,b;eet,oot,t;m,up0;!s",Value:"true¦a few",Imperative:"true¦bewa0come he0;re","Plural|Verb":"true¦leaves",Demonym:"true¦0:15;1:12;a0Vb0Oc0Dd0Ce08f07g04h02iYjVkTlPmLnIomHpEqatari,rCs7t5u4v3welAz2;am0Gimbabwe0;enezuel0ietnam0I;gAkrai1;aiwTex0hai,rinida0Ju2;ni0Prkmen;a5cotti4e3ingapoOlovak,oma0Spaniard,udRw2y0W;ede,iss;negal0Cr09;sh;mo0uT;o5us0Jw2;and0;a2eru0Fhilippi0Nortugu07uerto r0S;kist3lesti1na2raguay0;ma1;ani;ami00i2orweP;caragu0geri2;an,en;a3ex0Lo2;ngo0Drocc0;cedo1la2;gasy,y07;a4eb9i2;b2thua1;e0Cy0;o,t01;azakh,eny0o2uwaiI;re0;a2orda1;ma0Ap2;anO;celandic,nd4r2sraeli,ta01vo05;a2iB;ni0qi;i0oneU;aiAin2ondur0unO;di;amEe2hanai0reek,uatemal0;or2rm0;gi0;ilipino,ren8;cuadoVgyp4mira3ngli2sto1thiopi0urope0;shm0;ti;ti0;aPominUut3;a9h6o4roat3ub0ze2;ch;!i0;lom2ngol5;bi0;a6i2;le0n2;ese;lifor1m2na3;bo2eroo1;di0;angladeshi,el6o4r3ul2;gaE;azi9it;li2s1;vi0;aru2gi0;si0;fAl7merBngol0r5si0us2;sie,tr2;a2i0;li0;genti2me1;ne;ba1ge2;ri0;ni0;gh0r2;ic0;an",Organization:"true¦0:4Q;a3Tb3Bc2Od2He2Df27g1Zh1Ti1Pj1Nk1Ll1Gm12n0Po0Mp0Cqu0Br02sTtHuCv9w3xiaomi,y1;amaha,m1Bou1w1B;gov,tu3C;a4e2iki1orld trade organizati33;leaRped0O;lls fargo,st1;fie2Hinghou2R;l1rner br3U;gree3Jl street journ2Im1E;an halOeriz2Xisa,o1;dafo2Yl1;kswagMvo;b4kip,n2ps,s1;a tod3Aps;es3Mi1;lev3Fted natio3C;er,s; mobi32aco beRd bOe9gi frida3Lh3im horto3Amz,o1witt3D;shi49y1;ota,s r 05;e 1in lizzy;b3carpen3Jdaily ma3Dguess w2holli0s1w2;mashing pumpki35uprem0;ho;ea1lack eyed pe3Xyr0Q;ch bo3Dtl0;l2n3Qs1xas instrumen1U;co,la m1F;efoni0Kus;a8cientology,e5ieme2Ymirnoff,np,o3pice gir6quare0Ata1ubaru;rbuc1to34;ks;ny,undgard1;en;a2x pisto1;ls;g1Wrs;few2Minsbur31lesfor03msu2E;adiohead,b8e4o1yana3C;man empi1Xyal 1;b1dutch she4;ank;a3d 1max,vl20;bu1c2Ahot chili peppe2Ylobst2N;ll;ders dige1Ll madrid;c,s;ant3Aizn2Q;a8bs,e5fiz2Ihilip4i3r1;emier 1udenti1D;leagTo2K;nk floyd,zza hut; morrBs;psi2tro1uge0E;br33chi0Tn33;!co;lant2Un1yp16; 2ason27da2P;ld navy,pec,range juli2xf1;am;us;aAb9e6fl,h5i4o1sa,vid3wa;k2tre dame,vart1;is;ia;ke,ntendo,ss0QvZ;l,s;c,st1Otflix,w1; 1sweek;kids on the block,york0D;a,c;nd22s2t1;ional aca2Po,we0U;a,c02d0S;aDcdonalCe9i6lb,o3tv,y1;spa1;ce;b1Tnsanto,ody blu0t1;ley cr1or0T;ue;c2t1;as,subisO;helin,rosoft;dica2rcedes benz,talli1;ca;id,re;ds;cs milk,tt19z24;a3e1g,ittle caesa1P; ore09novo,x1;is,mark,us; 1bour party;pres0Dz boy;atv,fc,kk,lm,m1od1O;art;iffy lu0Roy divisi0Jpmorgan1sa;! cha09;bm,hop,k3n1tv;g,te1;l,rpol;ea;a5ewlett pack1Vi3o1sbc,yundai;me dep1n1P;ot;tac1zbollah;hi;lliburt08sbro;eneral 6hq,ithub,l5mb,o2reen d0Ou1;cci,ns n ros0;ldman sachs,o1;dye1g0H;ar;axo smith kli04encoW;electr0Nm1;oto0Z;a5bi,c barcelo4da,edex,i2leetwood m03o1rito l0G;rd,xcY;at,fa,nancial1restoZ; tim0;na;cebook,nnie mae;b0Asa,u3xxon1; m1m1;ob0J;!rosceptics;aiml0De5isney,o4u1;nkin donu2po0Zran dur1;an;ts;j,w jon0;a,f lepp12ll,peche mode,r spieg02stiny's chi1;ld;aJbc,hFiDloudflaCnn,o3r1;aigsli5eedence clearwater reviv1ossra09;al;c7inba6l4m1o0Est09;ca2p1;aq;st;dplSg1;ate;se;a c1o chanQ;ola;re;a,sco1tigroup;! systems;ev2i1;ck fil a,na daily;r1y;on;d2pital o1rls jr;ne;bury,ill1;ac;aEbc,eBf9l5mw,ni,o1p,rexiteeU;ei3mbardiIston 1;glo1pizza;be;ng;o2ue c1;roV;ckbuster video,omingda1;le; g1g1;oodriL;cht2e ge0rkshire hathaw1;ay;el;cardi,idu,nana republ3s1xt5y5;f,kin robbi1;ns;ic;bYcTdidSerosmith,iRlKmEnheuser busDol,ppleAr6s4u3v2y1;er;is,on;di,todesk;hland o1sociated E;il;b3g2m1;co;os;ys; compu1be0;te1;rs;ch;c,d,erican3t1;!r1;ak; ex1;pre1;ss; 5catel2ta1;ir;! lu1;ce1;nt;jazeera,qae1;da;g,rbnb;as;/dc,a3er,tivision1;! blizz1;ard;demy of scienc0;es;ba",Possessive:"true¦its,my,our0thy;!s","Noun|Verb":"true¦0:9W;1:AA;2:96;3:A3;4:9R;5:A2;6:9K;7:8N;8:7L;9:A8;A:93;B:8D;C:8X;a9Ob8Qc7Id6Re6Gf5Sg5Hh55i4Xj4Uk4Rl4Em40n3Vo3Sp2Squ2Rr21s0Jt02u00vVwGyFzD;ip,oD;ne,om;awn,e6Fie68;aOeMhJiHoErD;ap,e9Oink2;nd0rDuC;kDry,sh5Hth;!shop;ck,nDpe,re,sh;!d,g;e86iD;p,sD;k,p0t2;aDed,lco8W;r,th0;it,lk,rEsDt4ve,x;h,te;!ehou1ra9;aGen5FiFoD;iDmAte,w;ce,d;be,ew,sA;cuum,l4B;pDr7;da5gra6Elo6A;aReQhrPiOoMrGuEwiDy5Z;n,st;nDrn;e,n7O;aGeFiEoDu6;t,ub2;bu5ck4Jgg0m,p;at,k,nd;ck,de,in,nsDp,v7J;f0i8R;ll,ne,p,r4Yss,t94uD;ch,r;ck,de,e,le,me,p,re;e5Wow,u6;ar,e,ll,mp0st,xt;g,lDng2rg7Ps5x;k,ly;a0Sc0Ne0Kh0Fi0Dk0Cl0Am08n06o05pXquaBtKuFwD;ea88iD;ng,pe,t4;bGit,m,ppErD;fa3ge,pri1v2U;lDo6S;e6Py;!je8;aMeLiKoHrEuDy2;dy,ff,mb2;a85eEiDo5Pugg2;ke,ng;am,ss,t4;ckEop,p,rD;e,m;ing,pi2;ck,nk,t4;er,m,p;ck,ff,ge,in,ke,lEmp,nd,p2rDte,y;!e,t;k,l;aJeIiHlGoFrDur,y;ay,e56inDu3;g,k2;ns8Bt;a5Qit;ll,n,r87te;ed,ll;m,n,rk;b,uC;aDee1Tow;ke,p;a5Je4FiDo53;le,rk;eep,iDou4;ce,p,t;ateboa7Ii;de,gnDl2Vnk,p,ze;!al;aGeFiEoDuff2;ck,p,re,w;ft,p,v0;d,i3Ylt0;ck,de,pe,re,ve;aEed,nDrv1It;se,t2N;l,r4t;aGhedu2oBrD;aEeDibb2o3Z;en,w;pe,t4;le,n,r2M;cDfegua72il,mp2;k,rifi3;aZeHhy6LiGoEuD;b,in,le,n,s5X;a6ck,ll,oDpe,u5;f,t;de,ng,ot,p,s1W;aTcSdo,el,fQgPje8lOmMnLo17pJque6sFturn,vDwa6V;eDi27;al,r1;er74oFpe8tEuD;lt,me;!a55;l71rt;air,eaDly,o53;l,t;dezvo2Zt;aDedy;ke,rk;ea1i4G;a6Iist0r5N;act6Yer1Vo71uD;nd,se;a38o6F;ch,s6G;c1Dge,iEke,lly,nDp1Wt1W;ge,k,t;n,se;es6Biv0;a04e00hYiXlToNrEsy4uD;mp,n4rcha1sh;aKeIiHoDu4O;be,ceFdu3fi2grDje8mi1p,te6;amDe6W;!me;ed,ss;ce,de,nt;sDy;er6Cs;cti3i1;iHlFoEp,re,sDuCw0;e,i5Yt;l,p;iDl;ce,sh;nt,s5V;aEce,e32uD;g,mp,n7;ce,nDy;!t;ck,le,n17pe,tNvot;a1oD;ne,tograph;ak,eFnErDt;fu55mA;!c32;!l,r;ckJiInHrFsEtDu1y;ch,e9;s,te;k,tD;!y;!ic;nt,r,se;!a7;bje8ff0il,oErDutli3Qver4B;bAd0ie9;ze;a4ReFoDur1;d,tD;e,i3;ed,gle8tD;!work;aMeKiIoEuD;rd0;ck,d3Rld,nEp,uDve;nt,th;it5EkD;ey;lk,n4Brr5CsDx;s,ta2B;asuBn4UrDss;ge,it;il,nFp,rk3WsEtD;ch,t0;h,k,t0;da5n0oeuvB;aLeJiHoEuD;mp,st;aEbby,ck,g,oDve;k,t;d,n;cDe,ft,mAnIst;en1k;aDc0Pe4vK;ch,d,k,p,se;bFcEnd,p,t4uD;gh,n4;e,k;el,o2U;eEiDno4E;ck,d,ll,ss;el,y;aEo1OuD;i3mp;m,zz;mpJnEr46ssD;ue;c1Rdex,fluGha2k,se2HteDvoi3;nt,rD;e6fa3viD;ew;en3;a8le2A;aJeHiGoEuD;g,nt;l3Ano2Dok,pDr1u1;!e;ghli1Fke,nt,re,t;aDd7lp;d,t;ck,mGndFrEsh,tDu9;ch,e;bo3Xm,ne4Eve6;!le;!m0;aMear,ift,lKossJrFuD;arDe4Alp,n;antee,d;aFiEoDumb2;uCwth;ll,nd,p;de,sp;ip;aBoDue;ss,w;g,in,me,ng,s,te,ze;aZeWiRlNoJrFuD;ck,el,nDss,zz;c38d;aEoDy;st,wn;cDgme,me,nchi1;tuB;cFg,il,ld,rD;ce,e29mDwa31;!at;us;aFe0Vip,oDy;at,ck,od,wD;!er;g,ke,me,re,sh,vo1E;eGgFlEnDre,sh,t,x;an3i0Q;e,m,t0;ht,uB;ld;aEeDn3;d,l;r,tuB;ce,il,ll,rm,vo2W;cho,d7ffe8nMsKxFyeD;!baD;ll;cGerci1hFpDtra8;eriDo0W;en3me9;au6ibA;el,han7u1;caDtima5;pe;count0d,vy;a01eSiMoJrEuDye;b,el,mp,pli2X;aGeFiEoD;ne,p;ft,ll,nk,p,ve;am,ss;ft,g,in;cEd7ubt,wnloD;ad;k,u0E;ge6p,sFt4vD;e,iDor3;de;char7gui1h,liEpD;at4lay,u5;ke;al,bKcJfeIlGmaCposAsEtaD;il;e07iD;gn,re;ay,ega5iD;ght;at,ct;li04rea1;a5ut;b,ma7n3rDte;e,t;a0Eent0Dh06irc2l03oKrFuD;be,e,rDt;b,e,l,ve;aGeFoEuDy;sh;p,ss,wd;dAep;ck,ft,sh;at,de,in,lTmMnFordina5py,re,st,uDv0;gh,nDp2rt;s01t;ceHdu8fli8glomeIsFtDveN;a8rD;a6ol;e9tru8;ct;ntDrn;ra5;bHfoGmFpD;leDouCromi1;me9;aCe9it,u5;rt;at,iD;ne;lap1oD;r,ur;aEiDoud,ub;ck,p;im,w;aEeDip;at,ck,er;iGllen7nErD;ge,m,t;ge,nD;el;n,r;er,re;ke,ll,mp,noe,pGrXsFtEuDve;se,ti0I;alog,ch;h,t;!tuB;re;a03eZiXlToPrHuEyD;pa11;bb2ck2dgEff0mp,rDst,zz;den,n;et;anJeHiFoadEuD;i1sh;ca6;be,d7;ge;aDed;ch,k;ch,d;aFg,mb,nEoDrd0tt2x,ycott;k,st,t;d,e;rd,st;aFeCiDoYur;nk,tz;nd;me;as,d,ke,nd,opsy,tD;!ch,e;aFef,lt,nDt;d,efA;it;r,t;ck,il,lan3nIrFsEtt2;le;e,h;!gDk;aDe;in;!d,g,k;bu1c05dZge,iYlVnTppQrLsIttGucEwaD;rd;tiD;on;aDempt;ck;k,sD;i6ocia5;st;chFmD;!oD;ur;!iD;ve;eEroa4;ch;al;chDg0sw0;or;aEt0;er;rm;d,m,r;dreHvD;an3oD;ca5;te;ce;ss;cDe,he,t;eFoD;rd,u9;nt;nt,ss;se",Actor:"true¦0:7B;1:7G;2:6A;3:7F;4:7O;5:7K;a6Nb62c4Ud4Be41f3Sg3Bh30i2Uj2Qkin2Pl2Km26n1Zo1Sp0Vqu0Tr0JsQtJuHvEw8yo6;gi,ut6;h,ub0;aAe9i8o7r6;estl0it0;m2rk0;fe,nn0t2Bza2H;atherm2ld0;ge earn0it0nder0rri1;eter7i6oyF;ll5Qp,s3Z;an,ina2U;n6s0;c6Uder03;aoisea23e9herapi5iktok0o8r6ut1yco6S;a6endseLo43;d0mp,nscri0Bvel0;ddl0u1G;a0Qchn7en6na4st0;ag0;i3Oo0D;aiXcUeRhPiMki0mu26oJpGquaFtBu7wee6;p0theart;lt2per7r6;f0ge6Iviv1;h6inten0Ist5Ivis1;ero,um2;a8ep7r6;ang0eam0;bro2Nc2Ofa2Nmo2Nsi20;ff0tesm2;tt0;ec7ir2Do6;kesp59u0M;ia5Jt3;l7me6An,rcere6ul;r,ss;di0oi5;n7s6;sy,t0;g0n0;am2ephe1Iow6;girl,m2r2Q;cretInior cit3Fr6;gea4v6;a4it1;hol4Xi7reen6ulpt1;wr2C;e01on;l1nt;aEe9o8u6;l0nn6;er up,ingE;g40le mod3Zof0;a4Zc8fug2Ppo32searQv6;ere4Uolution6;ary;e6luYru22;ptio3T;bbi,dic5Vpp0;arter6e2Z;back;aYeWhSiRlOoKr8sycho7u6;nk,p31;logi5;aGeDiBo6;d9fess1g7ph47s6;pe2Ktitu51;en6ramm0;it1y;igy,uc0;est4Nme mini0Unce6s3E;!ss;a7si6;de4;ch0;ctiti39nk0P;dca0Oet,li6pula50rnst42;c2Itic6;al scie6i2;nti5;a6umb0;nn0y6;er,ma4Lwright;lgrim,one0;a8iloso7otogra7ra6ysi1V;se;ph0;ntom,rmaci5;r6ssi1T;form0s4O;i3El,nel3Yr8st1tr6wn;i6on;arWot;ent4Wi42tn0;ccupa4ffBp8r7ut6;ca5l0B;ac4Iganiz0ig2Fph2;er3t6;i1Jomet6;ri5;ic0spring;aBe9ie4Xo7u6;n,rser3J;b6mad,vi4V;le2Vo4D;i6mesis,phew;ce,ghb1;nny,rr3t1X;aEeDiAo7u6yst1Y;m8si16;der3gul,m7n6th0;arDk;!my;ni7s6;f02s0Jt0;on,st0;chan1Qnt1rcha4;gi9k0n8rtyr,t6y1;e,riar6;ch;ag0iac;ci2stra3I;a7e2Aieutena4o6;rd,s0v0;bor0d7ndlo6ss,urea3Fwy0ym2;rd;!y;!s28;e8o7u6;ggl0;gg0urna2U;st0;c3Hdol,llu3Ummigra4n6; l9c1Qfa4habi42nov3s7ve6;nt1stig3;pe0Nt6;a1Fig3ru0M;aw;airFeBistoAo8u6ygie1K;man6sba2H;!ita8;bo,st6usekN;age,e3P;ri2;ir,r6;m7o6;!ine;it;dress0sty2C;aLeIhostGirl26ladi3oCrand7u6;e5ru;c9daug0Jfa8m7pa6s2Y;!re4;a,o6;th0;hi1B;al7d6lf0;!de3A;ie,k6te26;eep0;!wr6;it0;isha,n6;i6tl04;us;mbl0rden0;aDella,iAo7r6;eela2Nie1P;e,re6ster pare4;be1Hm2r6st0;unn0;an2ZgZlmm17nanci0r6tt0;e6st la2H; marsh2OfigXm2;rm0th0;conoEdDlectriCm8n7x6;amin0cellency,i2A;emy,trepreneur,vironmenta1J;c8p6;er1loye6;e,r;ee;ci2;it1;mi5;aKeBi8ork,ri7u6we02;de,tche2H;ft0v0;ct3eti7plom2Hre6va;ct1;ci2ti2;aDcor3fencCi0InAput9s7tectLvel6;op0;ce1Ge6ign0;rt0;ee,y;iz6;en;em2;c1Ml0;d8nc0redev7ug6;ht0;il;!dy;a06e04fo,hXitizenWlToBr9u6;r3stomer6;! representat6;ive;e3it6;ic;lJmGnAord9rpor1Nu7w6;boy,ork0;n6ri0;ciTte1Q;in3;fidantAgressSs9t6;e0Kr6;ibut1o6;ll0;tab13ul1O;!e;edi2m6pos0rade;a0EeQissi6;on0;leag8on7um6;ni5;el;ue;e6own;an0r6;ic,k;!s;a9e7i6um;ld;erle6f;ad0;ir7nce6plFract0;ll1;m2wI;lebri6o;ty;dBptAr6shi0;e7pe6;nt0;r,t6;ak0;ain;et;aMeLiJlogg0oErBu6;dd0Fild0rgl9siness6;m2p7w6;om2;ers05;ar;i7o6;!k0th0;cklay0de,gadi0;hemi2oge8y6;!frie6;nd;ym2;an;cyc6sR;li5;atbox0ings;by,nk0r6;b0on7te6;nd0;!e07;c04dWge4nQpLrHsFtAu7yatull6;ah;nt7t6;h1oG;!ie;h8t6;e6orney;nda4;ie5le6;te;sis00tron6;aut,om0;chbis8isto7tis6;an,t;crU;hop;ost9p6;ari6rentiS;ti6;on;le;a9cest1im3nou8y6;bo6;dy;nc0;ly5rc6;hi5;mi8v6;entur0is1;er;ni7r6;al;str3;at1;or;counBquaintanArob9t6;ivi5or,re6;ss;st;at;ce;ta4;nt","Adj|Noun":"true¦0:16;a1Db17c0Ud0Re0Mf0Dg0Ah08i06ju05l02mWnUoSpNrIsBt7u4v1watershed;a1ision0Z;gabo4nilla,ria1;b0Vnt;ndergr1pstairs;adua14ou1;nd;a3e1oken,ri0;en,r1;min0rori13;boo,n;age,e5ilv0Flack,o3quat,ta2u1well;bordina0Xper5;b0Lndard;ciali0Yl1vereign;e,ve16;cret,n1ri0;ior;a4e2ou1ubbiL;nd,tiY;ar,bBl0Wnt0p1side11;resent0Vublican;ci0Qsh;a4eriodic0last0Zotenti0r1;emi2incip0o1;!fession0;er,um;rall4st,tie0U;ff1pposi0Hv0;ens0Oi0C;agg01ov1uts;el;a5e3iniatJo1;bi01der07r1;al,t0;di1tr0N;an,um;le,riG;attOi2u1;sh;ber0ght,qC;stice,veniT;de0mpressioYn1;cumbe0Edividu0no0Dsta0Eterim;alf,o1umdrum;bby,melF;en2old,ra1;ph0Bve;er0ious;a7e5i4l3u1;git03t1;ure;uid;ne;llow,m1;aFiL;ir,t,vo1;riOuriO;l3p00x1;c1ecutUpeV;ess;d1iK;er;ar2e1;mographUrivO;k,l2;hiGlassSo2rude,unn1;ing;m5n1operK;creCstitueOte2vertab1;le;mpor1nt;ary;ic,m2p1;anion,lex;er2u1;ni8;ci0;al;e5lank,o4r1;i2u1;te;ef;ttom,urgeois;st;cadem9d6l2ntarct9r1;ab,ct8;e3tern1;at1;ive;rt;oles1ult;ce1;nt;ic","Adj|Past":"true¦0:4Q;1:4C;2:4H;3:4E;a44b3Tc36d2Je29f20g1Wh1Si1Jj1Gkno1Fl1Am15n12o0Xp0Mqu0Kr08sLtEuAv9w4yellow0;a7ea6o4rinkl0;r4u3Y;n,ri0;k31th3;rp0sh0tZ;ari0e1O;n5p4s0;d1li1Rset;cov3derstood,i4;fi0t0;a8e3Rhr7i6ouTr4urn0wi4C;a4imm0ou2G;ck0in0pp0;ed,r0;eat2Qi37;m0nn0r4;get0ni2T;aOcKeIhGimFm0Hoak0pDt7u4;bsid3Ogge44s4;pe4ta2Y;ct0nd0;a8e7i2Eok0r5u4;ff0mp0nn0;ength2Hip4;ed,p0;am0reotyp0;in0t0;eci4ik0oH;al3Efi0;pRul1;a4ock0ut;d0r0;a4c1Jle2t31;l0s3Ut0;a6or5r4;at4e25;ch0;r0tt3;t4ut0;is2Mur1;aEe5o4;tt0;cAdJf2Bg9je2l8m0Knew0p7qu6s4;eTpe2t4;or0ri2;e3Dir0;e1lac0;at0e2Q;i0Rul1;eiv0o4ycl0;mme2Lrd0v3;in0lli0ti2A;a4ot0;li28;aCer30iBlAo9r5u4;mp0zzl0;e6i2Oo4;ce2Fd4lo1Anou30pos0te2v0;uc0;fe1CocCp0Iss0;i2Kli1L;ann0e2CuS;ck0erc0ss0;ck0i2Hr4st0;allLk0;bse7c6pp13rgan2Dver4;lo4whelm0;ok0;cupi0;rv0;aJe5o4;t0uri1A;ed0gle2;a6e5ix0o4ut0ys1N;di1Nt15u26;as0Clt0;n4rk0;ag0ufact0A;e6i5o4;ad0ck0st,v0;cens0m04st0;ft,v4;el0;tt0wn;a5o15u4;dg0s1B;gg0;llumSmpAn4sol1;br0cre1Ldebt0f8jZspir0t5v4;it0olv0;e4ox0Y;gr1n4re23;d0si15;e2l1o1Wuri1;li0o01r4;ov0;a6e1o4um03;ok0r4;ri0Z;mm3rm0;i6r5u4;a1Bid0;a0Ui0Rown;ft0;aAe9i8l6oc0Ir4;a4i0oz0Y;ctHg19m0;avo0Ju4;st3;ni08tt0x0;ar0;d0il0sc4;in1;dCl1mBn9quipp0s8x4;agger1c6p4te0T;a0Se4os0;ct0rie1D;it0;cap0tabliZ;cha0XgFha1As4;ur0;a0Zbarra0N;i0Buc1;aMeDi5r4;a01i0;gni08miniSre2s4;a9c6grun0Ft4;o4re0Hu17;rt0;iplWou4;nt0r4;ag0;bl0;cBdRf9l8p7ra6t5v4;elop0ot0;ail0ermQ;ng0;re07;ay0ight0;e4in0o0M;rr0;ay0enTor1;m5t0z4;ed,zl0;ag0p4;en0;aPeLhIlHo9r6u4;lt4r0stom03;iv1;a5owd0u4;sh0;ck0mp0;d0loAm7n4ok0v3;centr1f5s4troC;id3olid1;us0;b5pl4;ic1;in0;r0ur0;assi9os0utt3;ar5i4;ll0;g0m0;lebr1n6r4;ti4;fi0;tralJ;g0lcul1;aDewild3iCl9o7r5urn4;ed,t;ok4uis0;en;il0r0t4und;tl0;e5i4;nd0;ss0;as0;ffl0k0laMs0tt3;bPcNdKfIg0lFmaz0nDppBrm0ss9u5wa4;rd0;g5thor4;iz0;me4;nt0;o6u4;m0r0;li0re4;ci1;im1ticip1;at0;a5leg0t3;er0;rm0;fe2;ct0;ju5o7va4;nc0;st0;ce4knowledg0;pt0;and5so4;rb0;on0;ed",Singular:"true¦0:5J;1:5H;2:4W;3:4S;4:52;5:57;6:5L;7:56;8:5B;a52b4Lc3Nd35e2Xf2Og2Jh28in24j23k22l1Um1Ln1Ho1Bp0Rqu0Qr0FsZtMuHvCw9x r58yo yo;a9ha3Po3Q;f3i4Rt0Gy9;! arou39;arCeAideo ga2Qo9;cabu4Jl5C;gOr9t;di4Zt1Y;iety,ni4P;nBp30rAs 9;do43s5E;bani1in0;coordinat3Ader9;estima1to24we41; rex,aKeJhHiFoErBuAv9;! show;m2On2rntLto1D;agedy,ib9o4E;e,u9;n0ta46;ni1p2rq3L;c,er,m9;etF;ing9ree26;!y;am,mp3F;ct2le6x return;aNcMeKhor4QiJkHoGpin off,tDuBy9;ll9ner7st4T;ab2X;b9i1n28per bowl,rro1X;st3Ltot0;atAipe2Go1Lrate7udent9;! lo0I;i39u1;ft ser4Lmeo1I;elet5i9;ll,r3V;b38gn2Tte;ab2Jc9min3B;t,urity gua2N;e6ho2Y;bbatic0la3Jndwi0Qpi5;av5eDhetor2iAo9;de6om,w;tAv9;erb2C;e,u0;bDcBf9publ2r10spi1;er9orm3;e6r0;i9ord label;p2Ht0;a1u46;estion mark,ot2F;aPeMhoLiIlGoErAu9yram1F;ddi3HpErpo1Js3J;eBo9;bl3Zs9;pe3Jta1;dic1Rmi1Fp1Qroga8ss relea1F;p9rt0;py;a9ebisci1;q2Dte;cn2eAg9;!gy;!r;ne call,tocoK;anut,dAr9t0yo1;cen3Jsp3K;al,est0;nop4rAt9;e,hog5;adi11i2V;atme0bj3FcBpia1rde0thers,utspok5ve9wn3;n,r9;ti0Pview;cuAe9;an;pi3;arBitAot9umb3;a2Fhi2R;e,ra1;cot2ra8;aFeCiAo9ur0;nopo4p18rni2Nsq1Rti36uld;c,li11n0As9tt5;chief,si34;dAnu,t9;al,i3;al,ic;gna1mm0nd15rsupi0te9yf4;ri0;aDegCiBu9;ddi1n9;ch;me,p09; Be0M;bor14y9; 9er;up;eyno1itt5;el4ourn0;cBdices,itia8ni25sAtel0Lvert9;eb1J;e28titu1;en8i2T;aIeEighDoAu9;man right,s22;me9rmoFsp1Ftb0K;! r9;un; scho0YriY;a9i1N;d9v5; start,pho9;ne;ndful,sh brown,v5ze;aBelat0Ilaci3r9ul4yp1S;an9enadi3id;a1Cd slam,ny;df4r9;l2ni1I;aGeti1HiFlu1oCrAun9;er0;ee market,i9onti3;ga1;l4ur9;so9;me;ePref4;br2mi4;conoFffi7gg,lecto0Rmbas1EnCpidem2s1Zth2venBxAyel9;id;ampZempl0Nte6;i19t;er7terp9;ri9;se;my;eLiEoBr9ump tru0U;agonf4i9;er,ve thru;cAg7i4or,ssi3wn9;side;to0EumenE;aEgniDnn3sAvide9;nd;conte6incen8p9tri11;osi9;ti0C;ta0H;le0X;athBcAf9ni0terre6;ault 05err0;al,im0;!b9;ed;aWeThMiLlJoDr9;edit caBuc9;ib9;le;rd;efficDke,lCmmuniqLnsApi3rr0t0Xus9yo1;in;erv9uI;ato02;ic,lQ;ie6;er7i9oth;e6n2;ty,vil wM;aDeqCick5ocoBr9;istmas car9ysanthemum;ol;la1;ue;ndeli3racteri9;st2;iAllEr9;e0tifica1;liZ;hi3nFpErCt9ucus;erpi9hedr0;ll9;ar;!bohyd9ri3;ra1;it0;aAe,nib0t9;on;l,ry;aMeLiop2leJoHrDu9;nny,r9tterf4;g9i0;la9;ry;eakAi9;ck;fa9throB;st;dy,ro9wl;ugh;mi9;sh;an,l4;nkiArri3;er;ng;cSdMlInFppeti1rDsBtt2utop9;sy;ic;ce6pe9;ct;r9sen0;ay;ecAoma4tiA;ly;do1;i5l9;er7y;gy;en; hominDjAvan9;tage;ec8;ti9;ve;em;cCeAqui9;tt0;ta1;te;iAru0;al;de6;nt","Person|Noun":"true¦a0Eb07c03dWeUfQgOhLjHkiGlFmCnBolive,p7r4s3trini06v1wa0;ng,rd,tts;an,enus,iol0;a,et;ky,onPumm09;ay,e1o0uby;bin,d,se;ed,x;a2e1o0;l,tt04;aLnJ;dYge,tR;at,orm;a0eloW;t0x,ya;!s;a9eo,iH;ng,tP;a2e1o0;lGy;an,w3;de,smi4y;a0erb,iOolBuntR;ll,z0;el;ail,e0iLuy;ne;a1ern,i0lo;elds,nn;ith,n0;ny;a0dEmir,ula,ve;rl;a4e3i1j,ol0;ly;ck,x0;ie;an,ja;i0wn;sy;am,h0liff,rystal;a0in,ristian;mbers,ri0;ty;a4e3i2o,r0ud;an0ook;dy;ll;nedict,rg;k0nks;er;l0rt;fredo,ma","Actor|Verb":"true¦aCb8c5doctor,engineAfool,g3host,judge,m2nerd,p1recruit,scout,ushAvolunteAwi0;mp,tneA;arent,ilot;an,ime;eek,oof,r0uide;adu8oom;ha1o0;ach,nscript,ok;mpion,uffeur;o2u0;lly,tch0;er;ss;ddi1ffili0rchite1;ate;ct",MaleName:"true¦0:H6;1:FZ;2:DS;3:GQ;4:CZ;5:FV;6:GM;7:FP;8:GW;9:ET;A:C2;B:GD;aF8bE1cCQdBMeASfA1g8Yh88i7Uj6Sk6Bl5Mm48n3So3Ip33qu31r26s1Et0Ru0Ov0CwTxSyHzC;aCor0;cChC1karia,nAT;!hDkC;!aF6;!ar7CeF5;aJevgenBSoEuC;en,rFVsCu3FvEF;if,uf;nDs6OusC;ouf,s6N;aCg;s,tC;an,h0;hli,nCrosE1ss09;is,nC;!iBU;avi2ho5;aPeNiDoCyaEL;jcieBJlfgang,odrFutR;lFnC;f8TsC;lCt1;ow;bGey,frEhe4QlC;aE5iCy;am,e,s;ed8iC;d,ed;eAur;i,ndeD2rn2sC;!l9t1;lDyC;l1ne;lDtC;!er;aCHy;aKernDAiFladDoC;jteB0lodymyr;!iC;mFQsDB;cFha0ktBZnceDrgCOvC;a0ek;!nC;t,zo;!e4StBV;lCnC7sily;!entC;in9J;ghE2lCm70nax,ri,sm0;riCyss87;ch,k;aWeRhNiLoGrEuDyC;!l2roEDs1;n6r6E;avD0eCist0oy,um0;ntCRvBKy;bFdAWmCny;!asDmCoharu;aFFie,y;!z;iA6y;mCt4;!my,othy;adEeoDia0SomC;!as;!dor91;!de4;dFrC;enBKrC;anBJeCy;ll,nBI;!dy;dgh,ha,iCnn2req,tsu5V;cDAka;aYcotWeThPiMlobod0oKpenc2tEurDvenAEyCzym1;ed,lvest2;aj,e9V;anFeDuC;!aA;fan17phEQvCwaA;e77ie;!islaCl9;v,w;lom1rBuC;leymaDHta;dDgmu9UlCm1yabonga;as,v8B;!dhart8Yn9;aEeClo75;lCrm0;d1t1;h9Jne,qu1Jun,wn,yne;aDbastiEDk2Yl5Mpp,rgCth,ymoCU;e1Dio;m4n;!tC;!ie,y;eDPlFmEnCq67tosCMul;dCj2UtiA5;e01ro;!iATkeB6mC4u5;!ik,vato9K;aZeUheC8iRoGuDyC;an,ou;b99dDf4peAssC;!elEG;ol00y;an,bLc7MdJel,geIh0lHmGnEry,sDyC;!ce;ar7Ocoe,s;!aCnBU;ld,n;an,eo;a7Ef;l7Jr;e3Eg2n9olfo,riC;go;bBNeDH;cCl9;ar87c86h54kCo;!ey,ie,y;cFeA3gDid,ubByCza;an8Ln06;g85iC;naC6s;ep;ch8Kfa5hHin2je8HlGmFndEoHpha5sDul,wi36yC;an,mo8O;h9Im4;alDSol3O;iD0on;f,ph;ul;e9CinC;cy,t1;aOeLhilJiFrCyoG;aDeC;m,st1;ka85v2O;eDoC;tr;r8GtC;er,ro;!ipCl6H;!p6U;dCLrcy,tC;ar,e9JrC;!o7;b9Udra8So9UscAHtri62ulCv8I;!ie,o7;ctav6Ji2lImHndrBRrGsDtCum6wB;is,to;aDc6k6m0vCwaBE;al79;ma;i,vR;ar,er;aDeksandr,ivC;er,i2;f,v;aNeLguyBiFoCu3O;aDel,j4l0ma0rC;beAm0;h,m;cFels,g5i9EkDlC;es,s;!au,h96l78olaC;!i,y;hCkCol76;ol75;al,d,il,ls1vC;ilAF;hom,tC;e,hC;anCy;!a5i5;aYeViLoGuDyC;l4Nr1;hamDr84staC;fa,p6E;ed,mG;di10e,hamEis4JntDritz,sCussa;es,he;e,y;ad,ed,mC;ad,ed;cGgu5hai,kFlEnDtchC;!e8O;a9Pik;house,o7t1;ae73eC3ha8Iolaj;ah,hDkC;!ey,y;aDeC;al,l;el,l;hDlv3rC;le,ri8Ev4T;di,met;ay0c00gn4hWjd,ks2NlTmadZnSrKsXtDuric7VxC;imilBKwe8B;eHhEi69tCus,y69;!eo,hCia7;ew,i67;eDiC;as,eu,s;us,w;j,o;cHiGkFlEqu8Qsha83tCv3;iCy;!m,n;in,on;el,o7us;a6Yo7us;!elCin,o7us;!l8o;frAEi5Zny,u5;achDcoCik;lm;ai,y;amDdi,e5VmC;oud;adCm6W;ou;aulCi9P;ay;aWeOiMloyd,oJuDyC;le,nd1;cFdEiDkCth2uk;a7e;gi,s,z;ov7Cv6Hw6H;!as,iC;a6Een;g0nn52renDuCvA4we7D;!iS;!zo;am,n4oC;n5r;a9Yevi,la5KnHoFst2thaEvC;eCi;nte;bo;nCpo8V;!a82el,id;!nC;aAy;mEnd1rDsz73urenCwr6K;ce,t;ry,s;ar,beAont;aOeIhalHiFla4onr63rDu5SylC;e,s;istCzysztof;i0oph2;er0ngsl9p,rC;ilA9k,ollos;ed,id;en0iGnDrmCv4Z;it;!dDnCt1;e2Ny;ri4Z;r,th;cp2j4mEna8BrDsp6them,uC;ri;im,l;al,il;a03eXiVoFuC;an,lCst3;en,iC;an,en,o,us;aQeOhKkub4AnIrGsDzC;ef;eDhCi9Wue;!ua;!f,ph;dCge;i,on;!aCny;h,s,th6J;anDnC;!ath6Hie,n72;!nC;!es;!l,sCy;ph;o,qu3;an,mC;!i,m6V;d,ffFns,rCs4;a7JemDmai7QoCry;me,ni1H;i9Dy;!e73rC;ey,y;cKdBkImHrEsDvi2yC;dBs1;on,p2;ed,oDrCv67;e6Qod;d,s61;al,es5Wis1;a,e,oCub;b,v;ob,qu13;aTbNchiMgLke53lija,nuKonut,rIsEtCv0;ai,suC;ki;aDha0i8XmaCsac;el,il;ac,iaC;h,s;a,vinCw3;!g;k,nngu6X;nac1Xor;ka;ai,rahC;im;aReLoIuCyd6;beAgGmFsC;eyDsC;a3e3;in,n;ber5W;h,o;m2raDsse3wC;a5Pie;c49t1K;a0Qct3XiGnDrC;beAman08;dr7VrC;iCy2N;!k,q1R;n0Tt3S;bKlJmza,nIo,rEsDyC;a5KdB;an,s0;lEo67r2IuCv9;hi5Hki,tC;a,o;an,ey;k,s;!im;ib;a08e00iUlenToQrMuCyorgy;iHnFsC;!taC;f,vC;!e,o;n6tC;er,h2;do,lC;herDlC;auCerQ;me;aEegCov2;!g,orC;!io,y;dy,h7C;dfr9nza3XrDttfC;ri6C;an,d47;!n;acoGlEno,oCuseppe;rgiCvan6O;!o,s;be6Ies,lC;es;mo;oFrC;aDha4HrCt;it,y;ld,rd8;ffErgC;!e7iCy;!os;!r9;bElBrCv3;eCla1Nr4Hth,y;th;e,rC;e3YielC;!i4;aXeSiQlOorrest,rCyod2E;aHedFiC;edDtC;s,z;ri18;!d42eri11riC;ck,k;nCs2;cEkC;ie,lC;in,yn;esLisC;!co,z3M;etch2oC;ri0yd;d5lConn;ip;deriFliEng,rC;dinaCg4nan0B;nd8;pe,x;co;bCdi,hd;iEriC;ce,zC;io;an,en,o;benez2dZfrYit0lTmMnJo3rFsteb0th0ugenEvCymBzra;an,eCge4D;ns,re3K;!e;gi,iDnCrol,v3w3;est8ie,st;cCk;!h,k;o0DriCzo;co,qC;ue;aHerGiDmC;aGe3A;lCrh0;!iC;a10o,s;s1y;nu5;beAd1iEliDm2t1viCwood;n,s;ot28s;!as,j5Hot,sC;ha;a3en;!dGg6mFoDua2QwC;a2Pin;arC;do;oZuZ;ie;a04eTiOmitrNoFrag0uEwDylC;an,l0;ay3Hig4D;a3Gdl9nc0st3;minFnDri0ugCvydGy2S;!lF;!a36nCov0;e1Eie,y;go,iDykC;as;cCk;!k;i,y;armuFetDll1mitri7neCon,rk;sh;er,m6riC;ch;id;andLepak,j0lbeAmetri4nIon,rGsEvDwCxt2;ay30ey;en,in;hawn,moC;nd;ek,riC;ck;is,nC;is,y;rt;re;an,le,mKnIrEvC;e,iC;!d;en,iEne0PrCyl;eCin,yl;l45n;n,o,us;!iCny;el,lo;iCon;an,en,on;a0Fe0Ch03iar0lRoJrFuDyrC;il,us;rtC;!is;aEistC;iaCob12;no;ig;dy,lInErC;ey,neliCy;s,us;nEor,rDstaC;nt3;ad;or;by,e,in,l3t1;aHeEiCyde;fCnt,ve;fo0Xt1;menDt4;us;s,t;rFuDyC;!t1;dCs;e,io;enC;ce;aHeGrisC;!toC;phCs;!eC;!r;st2t;d,rCs;b5leC;s,y;cDdrCs6;ic;il;lHmFrC;ey,lDroCy;ll;!o7t1;er1iC;lo;!eb,v3;a09eZiVjorn,laUoSrEuCyr1;ddy,rtKst2;er;aKeFiEuDyC;an,ce,on;ce,no;an,ce;nDtC;!t;dDtC;!on;an,on;dFnC;dDisC;lav;en,on;!foOl9y;bby,gd0rCyd;is;i0Lke;bElDshC;al;al,lL;ek;nIrCshoi;at,nEtC;!raC;m,nd;aDhaCie;rd;rd8;!iDjam3nCs1;ie,y;to;kaMlazs,nHrC;n9rDtC;!holomew;eCy;tt;ey;dCeD;ar,iC;le;ar1Nb1Dd16fon15gust3hm12i0Zja0Yl0Bm07nTputsiSrGsaFugustEveDyCziz;a0kh0;ry;o,us;hi;aMchiKiJjun,mHnEon,tCy0;em,hCie,ur8;ur;aDoC;!ld;ud,v;aCin;an,nd8;!el,ki;baCe;ld;ta;aq;aMdHgel8tCw6;hoFoC;iDnC;!i8y;ne;ny;er7rCy;eDzC;ej;!as,i,j,s,w;!s;s,tolC;iCy;!y;ar,iEmaCos;nu5r;el;ne,r,t;aVbSdBeJfHiGl01onFphonsEt1vC;aPin;on;e,o;so,zo;!sR;!onZrC;ed;c,jaHksFssaHxC;!andC;er,rC;e,os,u;andCei;ar,er,r;ndC;ro;en;eDrecC;ht;rt8;dd3in,n,sC;taC;ir;ni;dDm6;ar;an,en;ad,eC;d,t;in;so;aGi,olErDvC;ik;ian8;f8ph;!o;mCn;!a;dGeFraDuC;!bakr,lfazl;hCm;am;!l;allFel,oulaye,ulC;!lDrahm0;an;ah,o;ah;av,on",Uncountable:"true¦0:2E;1:2L;2:33;a2Ub2Lc29d22e1Rf1Ng1Eh16i11j0Yk0Wl0Rm0Hn0Do0Cp03rZsLt9uran2Jv7w3you gu0E;a5his17i4oo3;d,l;ldlife,ne;rm8t1;apor,ernacul29i3;neg28ol1Otae;eDhBiAo8r4un3yranny;a,gst1B;aff2Oea1Ko4ue nor3;th;o08u3;bleshoot2Ose1Tt;night,othpas1Vwn3;foEsfoE;me off,n;er3und1;e,mod2S;a,nnis;aDcCeBhAi9ki8o7p6t4u3weepstak0;g1Unshi2Hshi;ati08e3;am,el;ace2Keci0;ap,cc1meth2C;n,ttl0;lk;eep,ingl0or1C;lf,na1Gri0;ene1Kisso1C;d0Wfe2l4nd,t3;i0Iurn;m1Ut;abi0e4ic3;e,ke15;c3i01laxa11search;ogni10rea10;a9e8hys7luto,o5re3ut2;amble,mis0s3ten20;en1Zs0L;l3rk;i28l0EyH; 16i28;a24tr0F;nt3ti0M;i0s;bstetri24vercrowd1Qxyg09;a5e4owada3utella;ys;ptu1Ows;il poliZtional securi2;aAe8o5u3;m3s1H;ps;n3o1K;ey,o3;gamy;a3cha0Elancholy,rchandi1Htallurgy;sl0t;chine3g1Aj1Hrs,thema1Q; learn1Cry;aught1e6i5ogi4u3;ck,g12;c,s1M;ce,ghtn18nguis1LteratWv1;ath1isVss;ara0EindergartPn3;icke0Aowled0Y;e3upit1;a3llyfiGwel0G;ns;ce,gnor6mp5n3;forma00ter3;net,sta07;atiSort3rov;an18;a7e6isto09o3ung1;ckey,mework,ne4o3rseradi8spitali2use arrest;ky;s2y;adquarteXre;ir,libut,ppiHs3;hi3te;sh;ene8l6o5r3um,ymnas11;a3eZ;niUss;lf,re;ut3yce0F;en; 3ti0W;edit0Hpo3;ol;aNicFlour,o4urnit3;ure;od,rgive3uri1wl;ness;arCcono0LducaBlectr9n7quip8thi0Pvery6x3;ist4per3;ti0B;en0J;body,o08th07;joy3tertain3;ment;ici2o3;ni0H;tiS;nings,th;emi02i6o4raugh3ynas2;ts;pe,wnstai3;rs;abet0ce,s3;honZrepu3;te;aDelciChAivi07l8o3urrency;al,ld w6mmenta5n3ral,ttIuscoB;fusiHt 3;ed;ry;ar;assi01oth0;es;aos,e3;eMwK;us;d,rO;a8i6lood,owlHread5u3;ntGtt1;er;!th;lliarJs3;on;g3ss;ga3;ge;cKdviJeroGirFmBn6ppeal court,r4spi3thleL;rin;ithmet3sen3;ic;i6y3;o4th3;ing;ne;se;en5n3;es2;ty;ds;craft;bi8d3nau7;yna3;mi6;ce;id,ous3;ti3;cs",Infinitive:"true¦0:9G;1:9T;2:AD;3:90;4:9Z;5:84;6:AH;7:A9;8:92;9:A0;A:AG;B:AI;C:9V;D:8R;E:8O;F:97;G:6H;H:7D;a94b8Hc7Jd68e4Zf4Mg4Gh4Ai3Qj3Nk3Kl3Bm34nou48o2Vp2Equ2Dr1Es0CtZuTvRwI;aOeNiLors5rI;eJiI;ng,te;ak,st3;d5e8TthI;draw,er;a2d,ep;i2ke,nIrn;d1t;aIie;liADniAry;nJpI;ho8Llift;cov1dJear8Hfound8DlIplug,rav82tie,ve94;eaAo3X;erIo;cut,go,staAFvalA3w2G;aSeQhNoMrIu73;aIe72;ffi3Smp3nsI;aBfo7CpI;i8oD;pp3ugh5;aJiJrIwaD;eat5i2;nk;aImA0;ch,se;ck3ilor,keImp1r8L;! paD;a0Ic0He0Fh0Bi0Al08mugg3n07o05p02qu01tUuLwI;aJeeIim;p,t5;ll7Wy;bNccMffLggeCmmKppJrI;mouFpa6Zvi2;o0re6Y;ari0on;er,i4;e7Numb;li9KmJsiIveD;de,st;er9it;aMe8MiKrI;ang3eIi2;ng27w;fIng;f5le;b,gg1rI;t3ve;a4AiA;a4UeJit,l7DoI;il,of;ak,nd;lIot7Kw;icEve;atGeak,i0O;aIi6;m,y;ft,ng,t;aKi6CoJriIun;nk,v6Q;ot,rt5;ke,rp5tt1;eIll,nd,que8Gv1w;!k,m;aven9ul8W;dd5tis1Iy;a0FeKiJoI;am,t,ut;d,p5;a0Ab08c06d05f01group,hea00iZjoi4lXmWnVpTq3MsOtMup,vI;amp,eJiIo3B;sEve;l,rI;e,t;i8rI;ie2ofE;eLiKpo8PtIurfa4;o24rI;aHiBuctu8;de,gn,st;mb3nt;el,hra0lIreseF;a4e71;d1ew,o07;aHe3Fo2;a7eFiIo6Jy;e2nq41ve;mbur0nf38;r0t;inKleBocus,rJuI;el,rbiA;aBeA;an4e;aBu4;ei2k8Bla43oIyc3;gni39nci3up,v1;oot,uI;ff;ct,d,liIp;se,ze;tt3viA;aAenGit,o7;aWerUinpoiFlumm1LoTrLuI;b47ke,niArIt;poDsuI;aFe;eMoI;cKd,fe4XhibEmo7noJpo0sp1tru6vI;e,i6o5L;un4;la3Nu8;aGclu6dJf1occupy,sup0JvI;a6BeF;etermi4TiB;aGllu7rtr5Ksse4Q;cei2fo4NiAmea7plex,sIva6;eve8iCua6;mp1rItrol,ve;a6It6E;bOccuNmEpMutLverIwe;l07sJtu6Yu0wI;helm;ee,h1F;gr5Cnu2Cpa4;era7i4Ipo0;py,r;ey,seItaH;r2ss;aMe0ViJoIultiply;leCu6Pw;micJnIspla4;ce,g3us;!k;iIke,na9;m,ntaH;aPeLiIo0u3N;ke,ng1quIv5;eIi6S;fy;aKnIss5;d,gI;th5;rn,ve;ng2Gu1N;eep,idnJnI;e4Cow;ap;oHuI;gg3xtaI;po0;gno8mVnIrk;cTdRfQgeChPitia7ju8q1CsNtKun6EvI;a6eIo11;nt,rt,st;erJimi6BoxiPrI;odu4u6;aBn,pr03ru6C;iCpi8tIu8;all,il,ruB;abEibE;eCo3Eu0;iIul9;ca7;i7lu6;b5Xmer0pI;aLer4Uin9ly,oJrI;e3Ais6Bo2;rt,se,veI;riA;le,rt;aLeKiIoiCuD;de,jaInd1;ck;ar,iT;mp1ng,pp5raIve;ng5Mss;ath1et,iMle27oLrI;aJeIow;et;b,pp3ze;!ve5A;gg3ve;aTer45i5RlSorMrJuI;lf4Cndrai0r48;eJiIolic;ght5;e0Qsh5;b3XeLfeEgJsI;a3Dee;eIi2;!t;clo0go,shIwa4Z;ad3F;att1ee,i36;lt1st5;a0OdEl0Mm0FnXquip,rWsVtGvTxI;aRcPeDhOiNpJtIu6;ing0Yol;eKi8lIo0un9;aHoI;it,re;ct,di7l;st,t;a3oDu3B;e30lI;a10u6;lt,mi28;alua7oI;ke,l2;chew,pou0tab19;a0u4U;aYcVdTfSgQhan4joy,lPqOrNsuMtKvI;e0YisI;a9i50;er,i4rI;aHenGuC;e,re;iGol0F;ui8;ar9iC;a9eIra2ulf;nd1;or4;ang1oIu8;r0w;irc3lo0ou0ErJuI;mb1;oaGy4D;b3ct;bKer9pI;hasiIow1;ze;aKody,rI;a4oiI;d1l;lm,rk;ap0eBuI;ci40de;rIt;ma0Rn;a0Re04iKo,rIwind3;aw,ed9oI;wn;agno0e,ff1g,mi2Kne,sLvI;eIul9;rIst;ge,t;aWbVcQlod9mant3pNru3TsMtI;iIoDu37;lJngI;uiA;!l;ol2ua6;eJlIo0ro2;a4ea0;n0r0;a2Xe36lKoIu0S;uIv1;ra9;aIo0;im;a3Kur0;b3rm;af5b01cVduBep5fUliTmQnOpMrLsiCtaGvI;eIol2;lop;ch;a20i2;aDiBloIoD;re,y;oIy;te,un4;eJoI;liA;an;mEv1;a4i0Ao06raud,y;ei2iMla8oKrI;ee,yI;!pt;de,mIup3;missi34po0;de,ma7ph1;aJrief,uI;g,nk;rk;mp5rk5uF;a0Dea0h0Ai09l08oKrIurta1G;a2ea7ipp3uI;mb3;ales4e04habEinci6ll03m00nIrro6;cXdUfQju8no7qu1sLtKvI;eIin4;ne,r9y;aHin2Bribu7;er2iLoli2Epi8tJuI;lt,me;itu7raH;in;d1st;eKiJoIroFu0;rm;de,gu8rm;ss;eJoI;ne;mn,n0;eIlu6ur;al,i2;buCe,men4pI;eIi3ly;l,te;eBi6u6;r4xiC;ean0iT;rcumveFte;eJirp,oI;o0p;riAw;ncIre5t1ulk;el;a02eSi6lQoPrKuI;iXrIy;st,y;aLeaKiJoad5;en;ng;stfeLtX;ke;il,l11mba0WrrMth1;eIow;ed;!coQfrie1LgPhMliLqueaKstJtrIwild1;ay;ow;th;e2tt3;a2eJoI;ld;ad;!in,ui3;me;bysEckfi8ff3tI;he;b15c0Rd0Iff0Ggree,l0Cm09n03ppZrXsQttOuMvJwaE;it;eDoI;id;rt;gIto0X;meF;aIeCraB;ch,in;pi8sJtoI;niA;aKeIi04u8;mb3rt,ss;le;il;re;g0Hi0ou0rI;an9i2;eaKly,oiFrI;ai0o2;nt;r,se;aMi0GnJtI;icipa7;eJoIul;un4y;al;ly0;aJu0;se;lga08ze;iKlI;e9oIu6;t,w;gn;ix,oI;rd;a03jNmiKoJsoI;rb;pt,rn;niIt;st1;er;ouJuC;st;rn;cLhie2knowled9quiItiva7;es4re;ce;ge;eQliOoKrJusI;e,tom;ue;mIst;moJpI;any,liA;da7;ma7;te;pt;andPduBet,i6oKsI;coKol2;ve;liArt,uI;nd;sh;de;ct;on",Person:"true¦0:1Q;a29b1Zc1Md1Ee18f15g13h0Ri0Qj0Nk0Jl0Gm09n06o05p00rPsItCusain bolt,v9w4xzibit,y1;anni,oko on2uji,v1;an,es;en,o;a3ednesday adams,i2o1;lfram,o0Q;ll ferrell,z khalifa;lt disn1Qr1;hol,r0G;a2i1oltai06;n dies0Zrginia wo17;lentino rossi,n goG;a4h3i2ripp,u1yra banks;lZpac shakur;ger woods,mba07;eresa may,or;kashi,t1ylor;um,ya1B;a5carlett johanss0h4i3lobodan milosevic,no2ocr1Lpider1uperm0Fwami; m0Em0E;op dogg,w whi1H;egfried,nbad;akespeaTerlock holm1Sia labeouf;ddam hussa16nt1;a cla11ig9;aAe6i5o3u1za;mi,n dmc,paul,sh limbau1;gh;bin hood,d stew16nald1thko;in0Mo;han0Yngo starr,valdo;ese witherspo0i1mbrandt;ll2nh1;old;ey,y;chmaninoff,ffi,iJshid,y roma1H;a4e3i2la16o1uff daddy;cahont0Ie;lar,p19;le,rZ;lm17ris hilt0;leg,prah winfr0Sra;a2e1iles cra1Bostradam0J; yo,l5tt06wmQ;pole0s;a5e4i2o1ubar03;by,lie5net,rriss0N;randa ju1tt romn0M;ly;rl0GssiaB;cklemo1rkov,s0ta hari,ya angelou;re;ady gaga,e1ibera0Pu;bron jam0Xch wale1e;sa;anye west,e3i1obe bryant;d cudi,efer suther1;la0P;ats,sha;a2effers0fk,k rowling,rr tolki1;en;ck the ripp0Mwaharlal nehru,y z;liTnez,ron m7;a7e5i3u1;lk hog5mphrey1sa01;! bog05;l1tl0H;de; m1dwig,nry 4;an;ile selassFlle ber4m3rrison1;! 1;ford;id,mo09;ry;ast0iannis,o1;odwPtye;ergus0lorence nightinga08r1;an1ederic chopN;s,z;ff5m2nya,ustaXzeki1;el;eril lagasse,i1;le zatop1nem;ek;ie;a6e4i2octor w1rake;ho;ck w1ego maradoC;olf;g1mi lovaOnzel washingt0;as;l1nHrth vadR;ai lNt0;a8h5lint0o1thulhu;n1olio;an,fuci1;us;on;aucKop2ristian baMy1;na;in;millo,ptain beefhe4r1;dinal wols2son1;! palmF;ey;art;a8e5hatt,i3oHro1;ck,n1;te;ll g1ng crosby;atB;ck,nazir bhut2rtil,yon1;ce;to;nksy,rack ob1;ama;l 6r3shton kutch2vril lavig8yn ra1;nd;er;chimed2istot1;le;es;capo2paci1;no;ne",Adjective:"true¦0:AI;1:BS;2:BI;3:BA;4:A8;5:84;6:AV;7:AN;8:AF;9:7H;A:BQ;B:AY;C:BC;D:BH;E:9Y;aA2b9Ec8Fd7We79f6Ng6Eh61i4Xj4Wk4Tl4Im41n3Po36p2Oquart7Pr2Ds1Dt14uSvOwFye29;aMeKhIiHoF;man5oFrth7G;dADzy;despreB1n w97s86;acked1UoleF;!sa6;ather1PeFll o70ste1D;!k5;nt1Ist6Ate4;aHeGiFola5T;bBUce versa,gi3Lle;ng67rsa5R;ca1gBSluAV;lt0PnLpHrGsFttermoBL;ef9Ku3;b96ge1; Hb32pGsFtiAH;ca6ide d4R;er,i85;f52to da2;a0Fbeco0Hc0Bd04e02f01gu1XheaBGiXkn4OmUnTopp06pRrNsJtHus0wF;aFiel3K;nt0rra0P;app0eXoF;ld,uS;eHi37o5ApGuF;perv06spec39;e1ok9O;en,ttl0;eFu5;cogn06gul2RlGqu84sF;erv0olv0;at0en33;aFrecede0E;id,rallel0;am0otic0;aFet;rri0tF;ch0;nFq26vers3;sur0terFv7U;eFrupt0;st0;air,inish0orese98;mploy0n7Ov97xpF;ect0lain0;eHisFocume01ue;clFput0;os0;cid0rF;!a8Scov9ha8Jlyi8nea8Gprivileg0sMwF;aFei9I;t9y;hGircumcFonvin2U;is0;aFeck0;lleng0rt0;b20ppea85ssuGttend0uthorF;iz0;mi8;i4Ara;aLeIhoHip 25oGrF;anspare1encha1i2;geth9leADp notch,rpB;rny,ugh6H;ena8DmpGrFs6U;r49tia4;eCo8P;leFst4M;nt0;a0Dc09e07h06i04ki03l01mug,nobbi4XoVpRqueami4XtKuFymb94;bHccinAi generis,pFr5;erFre7N;! dup9b,vi70;du0li7Lp6IsFurb7J;eq9Atanda9X;aKeJi16o2QrGubboFy4Q;rn;aightFin5GungS; fFfF;or7V;adfa9Pri6;lwa6Ftu82;arHeGir6NlendBot Fry;on;c3Qe1S;k5se; call0lImb9phistic16rHuFviV;ndFth1B;proof;dBry;dFub6; o2A;e60ipF;pe4shod;ll0n d7R;g2HnF;ceEg6ist9;am3Se9;co1Zem5lfFn6Are7; suf4Xi43;aGholFient3A;ar5;rlFt4A;et;cr0me,tisfac7F;aOeIheumatoBiGoF;bu8Ztt7Gy3;ghtFv3; 1Sf6X;cJdu8PlInown0pro69sGtF;ard0;is47oF;lu2na1;e1Suc45;alcit8Xe1ondi2;bBci3mpa1;aSePicayu7laOoNrGuF;bl7Tnjabi;eKiIoF;b7VfGmi49pFxi2M;er,ort81;a7uD;maFor,sti7va2;!ry;ciDexis0Ima2CpaB;in55puli8G;cBid;ac2Ynt 3IrFti2;ma40tFv7W;!i3Z;i2YrFss7R;anoBtF; 5XiF;al,s5V;bSffQkPld OnMrLth9utKverF;!aIbMdHhGni75seas,t,wF;ei74rou74;a63e7A;ue;ll;do1Ger,si6A;d3Qg2Aotu5Z; bFbFe on o7g3Uli7;oa80;fashion0school;!ay; gua7XbFha5Uli7;eat;eHligGsF;ce7er0So1C;at0;diFse;a1e1;aOeNiMoGuF;anc0de; moEnHrthFt6V;!eFwe7L;a7Krn;chaGdescri7Iprof30sF;top;la1;ght5;arby,cessa4ighbor5wlyw0xt;k0usiaFv3;ti8;aQeNiLoHuF;dIltiF;facet0p6;deHlGnFot,rbBst;ochro4Xth5;dy;rn,st;ddle ag0nF;dbloZi,or;ag9diocEga,naGrFtropolit4Q;e,ry;ci8;cIgenta,inHj0Fkeshift,mmGnFri4Oscu61ver18;da5Dy;ali4Lo4U;!stream;abEho;aOeLiIoFumberi8;ngFuti1R;stan3RtF;erm,i4H;ghtGteraF;l,ry,te;heart0wei5O;ft JgFss9th3;al,eFi0M;nda4;nguBps0te5;apGind5noF;wi8;ut;ad0itte4uniW;ce co0Hgno6Mll0Cm04nHpso 2UrF;a2releF;va1; ZaYcoWdReQfOgrNhibi4Ri05nMoLsHtFvalu5M;aAeF;nDrdepe2K;a7iGolFuboI;ub6ve1;de,gF;nifica1;rdi5N;a2er;own;eriIiLluenVrF;ar0eq5H;pt,rt;eHiGoFul1O;or;e,reA;fiFpe26termi5E;ni2;mpFnsideCrreA;le2;ccuCdeq5Ene,ppr4J;fFsitu,vitro;ro1;mJpF;arHeGl15oFrop9;li2r11;n2LrfeA;ti3;aGeFi18;d4BnD;tuE;egGiF;c0YteC;al,iF;tiF;ma2;ld;aOelNiLoFuma7;a4meInHrrGsFur5;ti6;if4E;e58o3U; ma3GsF;ick;ghfalut2HspF;an49;li00pf33;i4llow0ndGrdFtM; 05coEworki8;sy,y;aLener44iga3Blob3oKrGuF;il1Nng ho;aFea1Fizzl0;cGtF;ef2Vis;ef2U;ld3Aod;iFuc2D;nf2R;aVeSiQlOoJrF;aGeFil5ug3;q43tf2O;gFnt3S;i6ra1;lk13oHrF; keeps,eFge0Vm9tu41;g0Ei2Ds3R;liF;sh;ag4Mowe4uF;e1or45;e4nF;al,i2;d Gmini7rF;ti6ve1;up;bl0lDmIr Fst pac0ux;oGreacF;hi8;ff;ed,ili0R;aXfVlTmQnOqu3rMthere3veryday,xF;aApIquisi2traHuF;be48lF;ta1;!va2L;edRlF;icF;it;eAstF;whi6; Famor0ough,tiE;rou2sui2;erGiF;ne1;ge1;dFe2Aoq34;er5;ficF;ie1;g9sF;t,ygF;oi8;er;aWeMiHoGrFue;ea4owY;ci6mina1ne,r31ti8ubQ;dact2Jfficult,m,sGverF;ge1se;creGePjoi1paCtF;a1inA;et,te; Nadp0WceMfiLgeneCliJmuEpeIreliAsGvoF;id,ut;pFtitu2ul1L;eCoF;nde1;ca2ghF;tf13;a1ni2;as0;facto;i5ngero0I;ar0Ce09h07i06l05oOrIuF;rmudgeon5stoma4teF;sy;ly;aIeHu1EystalF; cleFli7;ar;epy;fFv17z0;ty;erUgTloSmPnGrpoCunterclVveFy;rt;cLdJgr21jIsHtrF;aFi2;dic0Yry;eq1Yta1;oi1ug3;escenFuN;di8;a1QeFiD;it0;atoDmensuCpF;ass1SulF;so4;ni3ss3;e1niza1;ci1J;ockwiD;rcumspeAvil;eFintzy;e4wy;leGrtaF;in;ba2;diac,ef00;a00ePiLliJoGrFuck nak0;and new,isk,on22;gGldface,naF; fi05fi05;us;nd,tF;he;gGpartisFzarE;an;tiF;me;autifOhiNlLnHsFyoN;iWtselF;li8;eGiFt;gn;aFfi03;th;at0oF;v0w;nd;ul;ckwards,rF;e,rT; priori,b13c0Zd0Tf0Ng0Ihe0Hl09mp6nt06pZrTsQttracti0MuLvIwF;aGkF;wa1B;ke,re;ant garGeraF;ge;de;diIsteEtF;heFoimmu7;nt07;re;to4;hGlFtu2;eep;en;bitIchiv3roHtF;ifiFsy;ci3;ga1;ra4;ry;pFt;aHetizi8rF;oprF;ia2;llFre1;ed,i8;ng;iquFsy;at0e;ed;cohKiJkaHl,oGriFterX;ght;ne,of;li7;ne;ke,ve;olF;ic;ad;ain07gressiIi6rF;eeF;ab6;le;ve;fGraB;id;ectGlF;ue1;ioF;na2; JaIeGvF;erD;pt,qF;ua2;ma1;hoc,infinitum;cuCquiGtu3u2;al;esce1;ra2;erSjeAlPoNrKsGuF;nda1;e1olu2trF;aAuD;se;te;eaGuF;pt;st;aFve;rd;aFe;ze;ct;ra1;nt",Pronoun:"true¦elle,h3i2me,she,th0us,we,you;e0ou;e,m,y;!l,t;e,im",Preposition:"true¦aPbMcLdKexcept,fIinGmid,notwithstandiWoDpXqua,sCt7u4v2w0;/o,hereSith0;! whHin,oW;ersus,i0;a,s a vis;n1p0;!on;like,til;h1ill,oward0;!s;an,ereby,r0;ough0u;!oM;ans,ince,o that,uch G;f1n0ut;!to;!f;! 0to;effect,part;or,r0;om;espite,own,u3;hez,irca;ar1e0oBy;sides,tween;ri7;bo8cross,ft7lo6m4propos,round,s1t0;!op;! 0;a whole,long 0;as;id0ong0;!st;ng;er;ut",SportsTeam:"true¦0:18;1:1E;2:1D;3:14;a1Db15c0Sd0Kfc dallas,g0Ihouston 0Hindiana0Gjacksonville jagua0k0El0Am01new UoRpKqueens parkJreal salt lake,sBt6utah jazz,vancouver whitecaps,w4yW;ashington 4h10;natio1Mredski2wizar0W;ampa bay 7e6o4;ronto 4ttenham hotspur;blue ja0Mrapto0;nnessee tita2xasD;buccanee0ra0K;a8eattle 6porting kansas0Wt4; louis 4oke0V;c1Drams;marine0s4;eah13ounH;cramento Rn 4;antonio spu0diego 4francisco gJjose earthquak1;char08paB; ran07;a9h6ittsburgh 5ortland t4;imbe0rail blaze0;pirat1steele0;il4oenix su2;adelphia 4li1;eagl1philNunE;dr1;akland 4klahoma city thunder,rlando magic;athle0Lrai4;de0;england 8orleans 7york 4;g5je3knYme3red bul0Xy4;anke1;ian3;pelica2sain3;patrio3revolut4;ion;anchEeAi4ontreal impact;ami 8lwaukee b7nnesota 4;t5vi4;kings;imberwolv1wi2;rewe0uc0J;dolphi2heat,marli2;mphis grizz4ts;li1;a6eic5os angeles 4;clippe0dodFlaB;esterV; galaxy,ke0;ansas city 4nF;chiefs,roya0D; pace0polis col3;astr05dynamo,rocke3texa2;olden state warrio0reen bay pac4;ke0;allas 8e4i04od6;nver 6troit 4;lio2pisto2ti4;ge0;broncYnugge3;cowbo5maver4;icZ;ys;arEelLhAincinnati 8leveland 6ol4;orado r4umbus crew sc;api7ocki1;brow2cavalie0guar4in4;dia2;bengaVre4;ds;arlotte horAicago 4;b5cubs,fire,wh4;iteB;ea0ulQ;diff4olina panthe0; city;altimore Alackburn rove0oston 6rooklyn 4uffalo bilN;ne3;ts;cel5red4; sox;tics;rs;oriol1rave2;rizona Ast8tlanta 4;brav1falco2h4;awA;ns;es;on villa,r4;os;c6di4;amondbac4;ks;ardi4;na4;ls",Unit:"true¦a07b04cXdWexVfTgRhePinYjoule0BkMlJmDnan08oCp9quart0Bsq ft,t7volts,w6y2ze3°1µ0;g,s;c,f,n;dVear1o0;ttR; 0s 0;old;att,b;erNon0;!ne02;ascals,e1i0;cXnt00;rcent,tJ;hms,unceY;/s,e4i0m²,²,³;/h,cro2l0;e0liK;!²;grLsR;gCtJ;it1u0;menQx;erPreP;b5elvins,ilo1m0notO;/h,ph,²;!byGgrEmCs;ct0rtzL;aJogrC;allonJb0ig3rB;ps;a0emtEl oz,t4;hrenheit,radG;aby9;eci3m1;aratDe1m0oulombD;²,³;lsius,nti0;gr2lit1m0;et0;er8;am7;b1y0;te5;l,ps;c2tt0;os0;econd1;re0;!s","Noun|Gerund":"true¦0:3O;1:3M;2:3N;3:3D;4:32;5:2V;6:3E;7:3K;8:36;9:3J;A:3B;a3Pb37c2Jd27e23f1Vg1Sh1Mi1Ij1Gk1Dl18m13n11o0Wp0Pques0Sr0EsTtNunderMvKwFyDzB;eroi0oB;ni0o3P;aw2eB;ar2l3;aEed4hispe5i5oCrB;ap8est3i1;n0ErB;ki0r31;i1r2s9tc9;isualizi0oB;lunt1Vti0;stan4ta6;aFeDhin6iCraBy8;c6di0i2vel1M;mi0p8;aBs1;c9si0;l6n2s1;aUcReQhOiMkatKl2Wmo6nowJpeItFuCwB;ea5im37;b35f0FrB;fi0vB;e2Mi2J;aAoryt1KrCuB;d2KfS;etc9ugg3;l3n4;bCi0;ebBi0;oar4;gnBnAt1;a3i0;ip8oB;p8rte2u1;a1r27t1;hCo5reBulp1;a2Qe2;edu3oo3;i3yi0;aKeEi4oCuB;li0n2;oBwi0;fi0;aFcEhear7laxi0nDpor1sB;pon4tructB;r2Iu5;de5;or4yc3;di0so2;p8ti0;aFeacek20laEoCrBublis9;a1Teten4in1oces7;iso2siB;tio2;n2yi0;ckaAin1rB;ki0t1O;fEpeDrganiCvB;erco24ula1;si0zi0;ni0ra1;fe5;avi0QeBur7;gotia1twor6;aDeCi2oB;de3nito5;a2dita1e1ssaA;int0XnBrke1;ifUufactu5;aEeaDiBodAyi0;cen7f1mi1stB;e2i0;r2si0;n4ug9;iCnB;ea4it1;c6l3;ogAuB;dAgg3stif12;ci0llust0VmDnBro2;nova1sp0NterBven1;ac1vie02;agi2plo4;aDea1iCoBun1;l4w3;ki0ri0;nd3rB;roWvB;es1;aCene0Lli4rBui4;ee1ie0N;rde2the5;aHeGiDlCorBros1un4;e0Pmat1;ir1oo4;gh1lCnBs9;anZdi0;i0li0;e3nX;r0Zscina1;a1du01nCxB;erci7plo5;chan1di0ginB;ee5;aLeHiGoub1rCum8wB;el3;aDeCiB;bb3n6vi0;a0Qs7;wi0;rTscoDvi0;ba1coZlBvelo8;eCiB;ve5;ga1;nGti0;aVelebUhSlPoDrBur3yc3;aBos7yi0;f1w3;aLdi0lJmFnBo6pi0ve5;dDsCvinB;ci0;trBul1;uc1;muniDpB;lBo7;ai2;ca1;lBo5;ec1;c9ti0;ap8eaCimToBubT;ni0t9;ni0ri0;aBee5;n1t1;ra1;m8rCs1te5;ri0;vi0;aPeNitMlLoGrDuB;dge1il4llBr8;yi0;an4eat9oadB;cas1;di0;a1mEokB;i0kB;ee8;pi0;bi0;es7oa1;c9i0;gin2lonAt1;gi0;bysit1c6ki0tt3;li0;ki0;bando2cGdverti7gi0pproac9rgDssuCtB;trac1;mi0;ui0;hi0;si0;coun1ti0;ti0;ni0;ng",PhrasalVerb:"true¦0:92;1:96;2:8H;3:8V;4:8A;5:83;6:85;7:98;8:90;9:8G;A:8X;B:8R;C:8U;D:8S;E:70;F:97;G:8Y;H:81;I:7H;J:79;a9Fb7Uc6Rd6Le6Jf5Ig50h4Biron0j47k40l3Em31n2Yo2Wp2Cquiet Hr1Xs0KtZuXvacuu6QwNyammerBzK;ero Dip LonK;e0k0;by,ov9up;aQeMhLiKor0Mrit19;mp0n3Fpe0r5s5;ackAeel Di0S;aLiKn33;gh 3Wrd0;n Dr K;do1in,oJ;it 79k5lk Lrm 69sh Kt83v60;aw3do1o7up;aw3in,oC;rgeBsK;e 2herE;a00eYhViRoQrMuKypP;ckErn K;do1in,oJup;aLiKot0y 30;ckl7Zp F;ck HdK;e 5Y;n7Wp 3Es5K;ck MdLe Kghten 6me0p o0Rre0;aw3ba4do1in,up;e Iy 2;by,oG;ink Lrow K;aw3ba4in,up;ba4ov9up;aKe 77ll62;m 2r 5M;ckBke Llk K;ov9shit,u47;aKba4do1in,leave,o4Dup;ba4ft9pa69w3;a0Vc0Te0Mh0Ii0Fl09m08n07o06p01quar5GtQuOwK;earMiK;ngLtch K;aw3ba4o8K; by;cKi6Bm 2ss0;k 64;aReQiPoNrKud35;aigh2Det75iK;ke 7Sng K;al6Yup;p Krm2F;by,in,oG;c3Ln3Lr 2tc4O;p F;c3Jmp0nd LrKveAy 2O;e Ht 2L;ba4do1up;ar3GeNiMlLrKurB;ead0ingBuc5;a49it 6H;c5ll o3Cn 2;ak Fe1Xll0;a3Bber 2rt0und like;ap 5Vow Duggl5;ash 6Noke0;eep NiKow 6;cLp K;o6Dup;e 68;in,oK;ff,v9;de19gn 4NnKt 6Gz5;gKkE; al6Ale0;aMoKu5W;ot Kut0w 7M;aw3ba4f48oC;c2WdeEk6EveA;e Pll1Nnd Orv5tK; Ktl5J;do1foLin,o7upK;!on;ot,r5Z;aw3ba4do1in,o33up;oCto;al66out0rK;ap65ew 6J;ilAv5;aXeUiSoOuK;b 5Yle0n Kstl5;aLba4do1inKo2Ith4Nu5P;!to;c2Xr8w3;ll Mot LpeAuK;g3Ind17;a2Wf3Po7;ar8in,o7up;ng 68p oKs5;ff,p18;aKelAinEnt0;c6Hd K;o4Dup;c27t0;aZeYiWlToQrOsyc35uK;ll Mn5Kt K;aKba4do1in,oJto47up;pa4Dw3;a3Jdo1in,o21to45up;attleBess KiNop 2;ah2Fon;iLp Kr4Zu1Gwer 6N;do1in,o6Nup;nt0;aLuK;gEmp 6;ce u20y 6D;ck Kg0le 4An 6p5B;oJup;el 5NncilE;c53ir 39n0ss MtLy K;ba4oG; Hc2R;aw3ba4in,oJ;pKw4Y;e4Xt D;aLerd0oK;dAt53;il Hrrow H;aTeQiPoLuK;ddl5ll I;c1FnkeyMp 6uthAve K;aKdo1in,o4Lup;l4Nw3; wi4K;ss0x 2;asur5e3SlLss K;a21up;t 6;ke Ln 6rKs2Ax0;k 6ryA;do,fun,oCsure,up;a02eViQoLuK;ck0st I;aNc4Fg MoKse0;k Kse4D;aft9ba4do1forw37in56o0Zu46;in,oJ;d 6;e NghtMnLsKve 00;ten F;e 2k 2; 2e46;ar8do1in;aMt LvelK; oC;do1go,in,o7up;nEve K;in,oK;pKut;en;c5p 2sh LtchBughAy K;do1o59;in4Po7;eMick Lnock K;do1oCup;oCup;eLy K;in,up;l Ip K;aw3ba4do1f04in,oJto,up;aMoLuK;ic5mpE;ke3St H;c43zz 2;a01eWiToPuK;nLrrKsh 6;y 2;keLt K;ar8do1;r H;lKneErse3K;d Ke 2;ba4dKfast,o0Cup;ear,o1;de Lt K;ba4on,up;aw3o7;aKlp0;d Ml Ir Kt 2;fKof;rom;f11in,o03uW;cPm 2nLsh0ve Kz2P;at,it,to;d Lg KkerP;do1in,o2Tup;do1in,oK;ut,v9;k 2;aZeTive Rloss IoMrLunK; f0S;ab hold,in43ow 2U; Kof 2I;aMb1Mit,oLr8th1IuK;nd9;ff,n,v9;bo7ft9hQw3;aw3bKdo1in,oJrise,up,w3;a4ir2H;ar 6ek0t K;aLb1Fdo1in,oKr8up;ff,n,ut,v9;cLhKl2Fr8t,w3;ead;ross;d aKng 2;bo7;a0Ee07iYlUoQrMuK;ck Ke2N;ar8up;eLighten KownBy 2;aw3oG;eKshe27; 2z5;g 2lMol Krk I;aKwi20;bo7r8;d 6low 2;aLeKip0;sh0;g 6ke0mKrKtten H;e F;gRlPnNrLsKzzle0;h F;e Km 2;aw3ba4up;d0isK;h 2;e Kl 1T;aw3fPin,o7;ht ba4ure0;ePnLsK;s 2;cMd K;fKoG;or;e D;d04l 2;cNll Krm0t1G;aLbKdo1in,o09sho0Eth08victim;a4ehi2O;pa0C;e K;do1oGup;at Kdge0nd 12y5;in,o7up;aOi1HoNrK;aLess 6op KuN;aw3b03in,oC;gBwB; Ile0ubl1B;m 2;a0Ah05l02oOrLut K;aw3ba4do1oCup;ackBeep LoKy0;ss Dwd0;by,do1in,o0Uup;me NoLuntK; o2A;k 6l K;do1oG;aRbQforOin,oNtKu0O;hLoKrue;geth9;rough;ff,ut,v9;th,wK;ard;a4y;paKr8w3;rt;eaLose K;in,oCup;n 6r F;aNeLiK;ll0pE;ck Der Kw F;on,up;t 2;lRncel0rOsMtch LveE; in;o1Nup;h Dt K;doubt,oG;ry LvK;e 08;aw3oJ;l Km H;aLba4do1oJup;ff,n,ut;r8w3;a0Ve0MiteAl0Fo04rQuK;bblNckl05il0Dlk 6ndl05rLsKtMy FzzA;t 00;n 0HsK;t D;e I;ov9;anWeaUiLush K;oGup;ghQng K;aNba4do1forMin,oLuK;nd9p;n,ut;th;bo7lKr8w3;ong;teK;n 2;k K;do1in,o7up;ch0;arTg 6iRn5oPrNssMttlLunce Kx D;aw3ba4;e 6; ar8;e H;do1;k Dt 2;e 2;l 6;do1up;d 2;aPeed0oKurt0;cMw K;aw3ba4do1o7up;ck;k K;in,oC;ck0nk0stA; oQaNef 2lt0nd K;do1ov9up;er;up;r Lt K;do1in,oCup;do1o7;ff,nK;to;ck Pil0nMrgLsK;h D;ainBe D;g DkB; on;in,o7;aw3do1in,oCup;ff,ut;ay;ct FdQir0sk MuctionA; oG;ff;ar8o7;ouK;nd; o7;d K;do1oKup;ff,n;wn;o7up;ut",ProperNoun:"true¦aIbDc8dalhousHe7f5gosford,h4iron maiden,kirby,landsdowne,m2nis,r1s0wembF;herwood,paldiB;iel,othwe1;cgi0ercedes,issy;ll;intBudsB;airview,lorence,ra0;mpt9nco;lmo,uro;a1h0;arlt6es5risti;rl0talina;et4i0;ng;arb3e0;et1nt0rke0;ley;on;ie;bid,jax","Person|Place":"true¦a8d6h4jordan,k3orlando,s1vi0;ctor9rgin9;a0ydney;lvador,mara,ntia4;ent,obe;amil0ous0;ton;arw2ie0;go;lexandr1ust0;in;ia",LastName:"true¦0:BR;1:BF;2:B5;3:BH;4:AX;5:9Y;6:B6;7:BK;8:B0;9:AV;A:AL;B:8Q;C:8G;D:7K;E:BM;F:AH;aBDb9Zc8Wd88e81f7Kg6Wh64i60j5Lk4Vl4Dm39n2Wo2Op25quispe,r1Ls0Pt0Ev03wTxSyKzG;aIhGimmerm6A;aGou,u;ng,o;khar5ytsE;aKeun9BiHoGun;koya32shiBU;!lG;diGmaz;rim,z;maGng;da,g52mo83sGzaC;aChiBV;iao,u;aLeJiHoGright,u;jcA5lff,ng;lGmm0nkl0sniewsC;kiB1liams33s3;bGiss,lt0;b,er,st0;a6Vgn0lHtG;anabe,s3;k0sh,tG;e2Non;aLeKiHoGukD;gt,lk5roby5;dHllalGnogr3Kr1Css0val3S;ba,ob1W;al,ov4;lasHsel8W;lJn dIrgBEsHzG;qu7;ilyEqu7siljE;en b6Aijk,yk;enzueAIverde;aPeix1VhKi2j8ka43oJrIsui,uG;om5UrG;c2n0un1;an,emblA7ynisC;dorAMlst3Km4rrAth;atch0i8UoG;mHrG;are84laci79;ps3sG;en,on;hirDkah9Mnaka,te,varA;a06ch01eYhUiRmOoMtIuHvGzabo;en9Jobod3N;ar7bot4lliv2zuC;aIeHoG;i7Bj4AyanAB;ele,in2FpheBvens25;l8rm0;kol5lovy5re7Tsa,to,uG;ng,sa;iGy72;rn5tG;!h;l71mHnGrbu;at9cla9Egh;moBo7M;aIeGimizu;hu,vchG;en8Luk;la,r1G;gu9infe5YmGoh,pulveA7rra5P;jGyG;on5;evi6iltz,miHneid0roed0uGwarz;be3Elz;dHtG;!t,z;!t;ar4Th8ito,ka4OlJnGr4saCto,unde19v4;ch7dHtGz;a5Le,os;b53e16;as,ihDm4Po0Y;aVeSiPoJuHyG;a6oo,u;bio,iz,sG;so,u;bKc8Fdrigue67ge10j9YmJosevelt,sItHux,wG;e,li6;a9Ch;enb4Usi;a54e4L;erts15i93;bei4JcHes,vGzzo;as,e9;ci,hards12;ag2es,iHut0yG;es,nol5N;s,t0;dImHnGsmu97v6C;tan1;ir7os;ic,u;aUeOhMiJoHrGut8;asad,if6Zochazk27;lishc2GpGrti72u10we76;e3Aov51;cHe45nG;as,to;as70hl0;aGillips;k,m,n6I;a3Hde3Wete0Bna,rJtG;ersHrovGters54;!a,ic;!en,on;eGic,kiBss3;i9ra,tz,z;h86k,padopoulIrk0tHvG;ic,l4N;el,te39;os;bMconn2Ag2TlJnei6PrHsbor6XweBzG;dem7Rturk;ella4DtGwe6N;ega,iz;iGof7Hs8I;vGyn1R;ei9;aSri1;aPeNiJoGune50ym2;rHvGwak;ak4Qik5otn66;odahl,r4S;cholsZeHkolGls4Jx3;ic,ov84;ls1miG;!n1;ils3mG;co4Xec;gy,kaGray2sh,var38;jiGmu9shiG;ma;a07c04eZiWoMuHyeG;rs;lJnIrGssoli6S;atGp03r7C;i,ov4;oz,te58;d0l0;h2lOnNo0RrHsGza1A;er,s;aKeJiIoz5risHtG;e56on;!on;!n7K;au,i9no,t5J;!lA;r1Btgome59;i3El0;cracFhhail5kkeHlG;l0os64;ls1;hmeJiIj30lHn3Krci0ssiGyer2N;!er;n0Po;er,j0;dDti;cartHlG;aughl8e2;hy;dQe7Egnu68i0jer3TkPmNnMrItHyG;er,r;ei,ic,su21thews;iHkDquAroqu8tinG;ez,s;a5Xc,nG;!o;ci5Vn;a5UmG;ad5;ar5e6Kin1;rig77s1;aVeOiLoJuHyG;!nch;k4nGo;d,gu;mbarGpe3Fvr4we;di;!nGu,yana2B;coln,dG;b21holm,strom;bedEfeKhIitn0kaHn8rGw35;oy;!j;m11tG;in1on1;bvGvG;re;iGmmy,ng,rs2Qu,voie,ws3;ne,t1F;aZeYh2iWlUnez50oNrJuHvar2woG;k,n;cerGmar68znets5;a,o34;aHem0isGyeziu;h23t3O;m0sni4Fus3KvG;ch4O;bay57ch,rh0Usk16vaIwalGzl5;czGsC;yk;cIlG;!cGen4K;huk;!ev4ic,s;e8uiveG;rt;eff0kGl4mu9nnun1;ucF;ll0nnedy;hn,llKminsCne,pIrHstra3Qto,ur,yGzl5;a,s0;j0Rls22;l2oG;or;oe;aPenOha6im14oHuG;ng,r4;e32hInHrge32u6vG;anD;es,ss3;anHnsG;en,on,t3;nesGs1R;en,s1;kiBnings,s1;cJkob4EnGrv0E;kDsG;en,sG;en0Ion;ks3obs2A;brahimDglesi5Nke5Fl0Qno07oneIshikHto,vanoG;u,v54;awa;scu;aVeOiNjaltal8oIrist50uG;!aGb0ghAynh;m2ng;a6dz4fIjgaa3Hk,lHpUrGwe,x3X;ak1Gvat;mAt;er,fm3WmG;ann;ggiBtchcock;iJmingw4BnHrGss;nand7re9;deGriks1;rs3;kkiHnG;on1;la,n1;dz4g1lvoQmOns0ZqNrMsJuIwHyG;asFes;kiB;g1ng;anHhiG;mo14;i,ov0J;di6p0r10t;ue;alaG;in1;rs1;aVeorgUheorghe,iSjonRoLrJuGw3;errGnnar3Co,staf3Ctierr7zm2;a,eG;ro;ayli6ee2Lg4iffithGub0;!s;lIme0UnHodGrbachE;e,m2;calvAzale0S;dGubE;bGs0E;erg;aj,i;bs3l,mGordaO;en7;iev3U;gnMlJmaIndFo,rGsFuthi0;cGdn0za;ia;ge;eaHlG;agh0i,o;no;e,on;aVerQiLjeldsted,lKoIrHuG;chs,entAji41ll0;eem2iedm2;ntaGrt8urni0wl0;na;emi6orA;lipIsHtzgeraG;ld;ch0h0;ovG;!ic;hatDnanIrG;arGei9;a,i;deY;ov4;b0rre1D;dKinsJriksIsGvaB;cob3GpGtra3D;inoza,osiQ;en,s3;te8;er,is3warG;ds;aXePiNjurhuMoKrisco15uHvorakG;!oT;arte,boHmitru,nn,rGt3C;and,ic;is;g2he0Omingu7nErd1ItG;to;us;aGcki2Hmitr2Ossanayake,x3;s,z; JbnaIlHmirGrvisFvi,w2;!ov4;gado,ic;th;bo0groot,jo6lHsilGvriA;va;a cruz,e3uG;ca;hl,mcevsCnIt2WviG;dGes,s;ov,s3;ielsGku22;!en;ki;a0Be06hRiobQlarkPoIrGunningh1H;awfo0RivGuz;elli;h1lKntJoIrGs2Nx;byn,reG;a,ia;ke,p0;i,rer2K;em2liB;ns;!e;anu;aOeMiu,oIristGu6we;eGiaG;ns1;i,ng,p9uHwGy;!dH;dGng;huJ;!n,onGu6;!g;kJnIpm2ttHudhGv7;ry;erjee,o14;!d,g;ma,raboG;rty;bJl0Cng4rG;eghetHnG;a,y;ti;an,ota1C;cerAlder3mpbeLrIstGvadi0B;iGro;llo;doHl0Er,t0uGvalho;so;so,zo;ll;a0Fe01hYiXlUoNrKuIyG;rLtyG;qi;chan2rG;ke,ns;ank5iem,oGyant;oks,wG;ne;gdan5nIruya,su,uchaHyKziG;c,n5;rd;darGik;enG;ko;ov;aGond15;nco,zG;ev4;ancFshw16;a08oGuiy2;umGwmG;ik;ckRethov1gu,ktPnNrG;gJisInG;ascoGds1;ni;ha;er,mG;anG;!n;gtGit7nP;ss3;asF;hi;er,hG;am;b4ch,ez,hRiley,kk0ldw8nMrIshHtAu0;es;ir;bInHtlGua;ett;es,i0;ieYosa;dGik;a9yoG;padhyG;ay;ra;k,ng;ic;bb0Acos09d07g04kht05lZnPrLsl2tJyG;aHd8;in;la;chis3kiG;ns3;aImstro6sl2;an;ng;ujo,ya;dJgelHsaG;ri;ovG;!a;ersJov,reG;aGjEws;ss1;en;en,on,s3;on;eksejEiyEmeiIvG;ar7es;ez;da;ev;arwHuilG;ar;al;ams,l0;er;ta;as",Ordinal:"true¦eBf7nin5s3t0zeroE;enDhir1we0;lfCn7;d,t3;e0ixt8;cond,vent7;et0th;e6ie7;i2o0;r0urt3;tie4;ft1rst;ight0lev1;e0h,ie1;en0;th",Cardinal:"true¦bEeBf5mEnine7one,s4t0zero;en,h2rDw0;e0o;lve,n5;irt6ousands,ree;even2ix2;i3o0;r1ur0;!t2;ty;ft0ve;e2y;ight0lev1;!e0y;en;illions",Multiple:"true¦b3hundred,m3qu2se1t0;housand,r2;pt1xt1;adr0int0;illion",City:"true¦0:74;1:61;2:6G;3:6J;4:5S;a68b53c4Id48e44f3Wg3Hh39i31j2Wk2Fl23m1Mn1Co19p0Wq0Ur0Os05tRuQvLwDxiBy9z5;a7h5i4Muri4O;a5e5ongsh0;ng3H;greb,nzib5G;ang2e5okoha3Sunfu;katerin3Hrev0;a5n0Q;m5Hn;arsBeAi6roclBu5;h0xi,zh5P;c7n5;d5nipeg,terth4;hoek,s1L;hi5Zkl3A;l63xford;aw;a8e6i5ladivost5Molgogr6L;en3lni6S;ni22r5;o3saill4N;lenc4Wncouv3Sr3ughn;lan bat1Crumqi,trecht;aFbilisi,eEheDiBo9r7u5;l21n63r5;in,ku;i5ondh62;es51poli;kyo,m2Zron1Pulo5;n,uS;an5jua3l2Tmisoa6Bra3;j4Tshui; hag62ssaloni2H;gucigal26hr0l av1U;briz,i6llinn,mpe56ng5rtu,shk2R;i3Esh0;an,chu1n0p2Eyu0;aEeDh8kopje,owe1Gt7u5;ra5zh4X;ba0Ht;aten is55ockholm,rasbou67uttga2V;an8e6i5;jiazhua1llo1m5Xy0;f50n5;ya1zh4H;gh3Kt4Q;att45o1Vv44;cramen16int ClBn5o paulo,ppo3Rrajevo; 7aa,t5;a 5o domin3E;a3fe,m1M;antonio,die3Cfrancisco,j5ped3Nsalvad0J;o5u0;se;em,t lake ci5Fz25;lou58peters24;a9e8i6o5;me,t59;ga,o5yadh;! de janei3F;cife,ims,nn3Jykjavik;b4Sip4lei2Inc2Pwalpindi;ingdao,u5;ez2i0Q;aFeEhDiCo9r7u6yong5;ya1;eb59ya1;a5etor3M;g52to;rt5zn0; 5la4Co;au prin0Melizabe24sa03;ls3Prae5Atts26;iladelph3Gnom pe1Aoenix;ki1tah tik3E;dua,lerYnaji,r4Ot5;na,r32;ak44des0Km1Mr6s5ttawa;a3Vlo;an,d06;a7ew5ing2Fovosibir1Jyc; 5cast36;del24orlea44taip14;g8iro4Wn5pl2Wshv33v0;ch6ji1t5;es,o1;a1o1;a6o5p4;ya;no,sa0W;aEeCi9o6u5;mb2Ani26sc3Y;gadishu,nt6s5;c13ul;evideo,pelli1Rre2Z;ami,l6n14s5;kolc,sissauga;an,waukee;cca,d5lbour2Mmph41ndo1Cssi3;an,ell2Xi3;cau,drAkass2Sl9n8r5shh4A;aca6ib5rakesh,se2L;or;i1Sy;a4EchFdal0Zi47;mo;id;aDeAi8o6u5vSy2;anMckn0Odhia3;n5s angel26;d2g bea1N;brev2Be3Lma5nz,sb2verpo28;!ss27; ma39i5;c5pzig;est16; p6g5ho2Wn0Cusan24;os;az,la33;aHharFiClaipeBo9rak0Du7y5;iv,o5;to;ala lump4n5;mi1sh0;hi0Hlka2Xpavog4si5wlo2;ce;da;ev,n5rkuk;gst2sha5;sa;k5toum;iv;bHdu3llakuric0Qmpa3Fn6ohsiu1ra5un1Iwaguc0Q;c0Pj;d5o,p4;ah1Ty;a7e6i5ohannesV;l1Vn0;dd36rusalem;ip4k5;ar2H;bad0mph1OnArkutUs7taXz5;mir,tapala5;pa;fah0l6tanb5;ul;am2Zi2H;che2d5;ianap2Mo20;aAe7o5yder2W; chi mi5ms,nolulu;nh;f6lsin5rakli2;ki;ei;ifa,lifax,mCn5rb1Dva3;g8nov01oi;aFdanEenDhCiPlasgBo9raz,u5;a5jr23;dal6ng5yaquil;zh1J;aja2Oupe;ld coa1Bthen5;bu2S;ow;ent;e0Uoa;sk;lw7n5za;dhi5gt1E;nag0U;ay;aisal29es,o8r6ukuya5;ma;ankfu5esno;rt;rt5sh0; wor6ale5;za;th;d5indhov0Pl paso;in5mont2;bur5;gh;aBe8ha0Xisp4o7resd0Lu5;b5esseldorf,nkirk,rb0shanbe;ai,l0I;ha,nggu0rtmu13;hradSl6nv5troit;er;hi;donghIe6k09l5masc1Zr es sala1KugavpiY;i0lU;gu,je2;aJebu,hAleve0Vo5raio02uriti1Q;lo7n6penhag0Ar5;do1Ok;akKst0V;gUm5;bo;aBen8i6ongqi1ristchur5;ch;ang m7ca5ttago1;go;g6n5;ai;du,zho1;ng5ttogr14;ch8sha,zh07;gliari,i9lga8mayenJn6pe town,r5tanO;acCdiff;ber1Ac5;un;ry;ro;aWeNhKirmingh0WoJr9u5;chareTdapeTenos air7r5s0tu0;g5sa;as;es;a9is6usse5;ls;ba6t5;ol;ne;sil8tisla7zzav5;il5;le;va;ia;goZst2;op6ubaneshw5;ar;al;iCl9ng8r5;g6l5n;in;en;aluru,hazi;fa6grade,o horizon5;te;st;ji1rut;ghd0BkFn9ot8r7s6yan n4;ur;el,r07;celo3i,ranquil09;ou;du1g6ja lu5;ka;alo6k5;ok;re;ng;ers5u;field;a05b02cc01ddis aba00gartaZhmedXizawl,lSmPnHqa00rEsBt7uck5;la5;nd;he7l5;an5;ta;ns;h5unci2;dod,gab5;at;li5;ngt2;on;a8c5kaOtwerp;hora6o3;na;ge;h7p5;ol5;is;eim;aravati,m0s5;terd5;am; 7buquerq6eppo,giers,ma5;ty;ue;basrah al qadim5mawsil al jadid5;ah;ab5;ad;la;ba;ra;idj0u dha5;bi;an;lbo6rh5;us;rg",Region:"true¦0:2O;1:2L;2:2U;3:2F;a2Sb2Fc21d1Wes1Vf1Tg1Oh1Ki1Fj1Bk16l13m0Sn09o07pYqVrSsJtEuBverAw6y4zacatec2W;akut0o0Fu4;cat1k09;a5est 4isconsin,yomi1O;bengal,virgin0;rwick3shington4;! dc;acruz,mont;dmurt0t4;ah,tar4; 2Pa12;a6e5laxca1Vripu21u4;scaEva;langa2nnessee,x2J;bas10m4smQtar29;aulip2Hil nadu;a9elang07i7o5taf16u4ylh1J;ff02rr09s1E;me1Gno1Uuth 4;cZdY;ber0c4kkim,naloa;hu1ily;n5rawak,skatchew1xo4;ny; luis potosi,ta catari2;a4hodeA;j4ngp0C;asth1shahi;ingh29u4;e4intana roo;bec,en6retaro;aAe6rince edward4unjab; i4;sl0G;i,n5r4;ak,nambu0F;a0Rnsylv4;an0;ha0Pra4;!na;axa0Zdisha,h4klaho21ntar4reg7ss0Dx0I;io;aLeEo6u4;evo le4nav0X;on;r4tt18va scot0;f9mandy,th4; 4ampton3;c6d5yo4;rk3;ako1O;aroli2;olk;bras1Nva0Dw4; 6foundland4;! and labrad4;or;brunswick,hamp3jers5mexiTyork4;! state;ey;galPyarit;aAeghala0Mi6o4;nta2r4;dov0elos;ch6dlanDn5ss4zor11;issippi,ouri;as geraPneso18;ig1oac1;dhy12harasht0Gine,lac07ni5r4ssachusetts;anhao,i el,ylG;p4toba;ur;anca3e4incoln3ouisI;e4iR;ds;a6e5h4omi;aka06ul2;dah,lant1ntucky,ra01;bardino,lmyk0ns0Qr4;achay,el0nata0X;alis6har4iangxi;kh4;and;co;daho,llino7n4owa;d5gush4;et0;ia2;is;a6ert5i4un1;dalFm0D;ford3;mp3rya2waii;ansu,eorg0lou7oa,u4;an4izhou,jarat;ajuato,gdo4;ng;cester3;lori4uji1;da;sex;ageUe7o5uran4;go;rs4;et;lawaMrby3;aFeaEh9o4rim08umbr0;ahui7l6nnectic5rsi4ventry;ca;ut;i03orado;la;e5hattisgarh,i4uvash0;apRhuahua;chn5rke4;ss0;ya;ra;lGm4;bridge3peche;a9ihar,r8u4;ck4ryat0;ingham3;shi4;re;emen,itish columb0;h0ja cal8lk7s4v7;hkorto4que;st1;an;ar0;iforn0;ia;dygHguascalientes,lBndhr9r5ss4;am;izo2kans5un4;achal 7;as;na;a 4;pradesh;a6ber5t4;ai;ta;ba5s4;ka;ma;ea",Place:"true¦0:4T;1:4V;2:44;3:4B;4:3I;a4Eb3Gc2Td2Ge26f25g1Vh1Ji1Fk1Cl14m0Vn0No0Jp08r04sTtNuLvJw7y5;a5o0Syz;kut1Bngtze;aDeChitBi9o5upatki,ycom2P;ki26o5;d5l1B;b3Ps5;i4to3Y;c0SllowbroCn5;c2Qgh2;by,chur1P;ed0ntw3Gs22;ke6r3St5;erf1f1; is0Gf3V;auxha3Mirgin is0Jost5;ok;laanbaatar,pto5xb3E;n,wn;a9eotihuac43h7ive49o6ru2Nsarskoe selo,u5;l2Dzigo47;nto,rquay,tt2J;am3e 5orn3E;bronx,hamptons;hiti,j mah0Iu1N;aEcotts bluff,eCfo,herbroQoApring9t7u5yd2F;dbu1Wn5;der03set3B;aff1ock2Nr5;atf1oud;hi37w24;ho,uth5; 1Iam1Zwo3E;a5i2O;f2Tt0;int lawrence riv3Pkhal2D;ayleigh,ed7i5oc1Z;chmo1Eo gran4ver5;be1Dfr09si4; s39cliffe,hi2Y;aCe9h8i5ompeii,utn2;c6ne5tcai2T; 2Pc0G;keri13t0;l,x;k,lh2mbr6n5r2J;n1Hzance;oke;cif38pahanaumokuak30r5;k5then0;si4w1K;ak7r6x5;f1l2X;ange county,d,f1inoco;mTw1G;e8i1Uo5;r5tt2N;th5wi0E; 0Sam19;uschwanste1Pw5; eng6a5h2market,po36;rk;la0P;a8co,e6i5uc;dt1Yll0Z;adow5ko0H;lands;chu picchu,gad2Ridsto1Ql8n7ple6r5;kh2; g1Cw11;hatt2Osf2B;ibu,t0ve1Z;a8e7gw,hr,in5owlOynd02;coln memori5dl2C;al;asi4w3;kefr7mbe1On5s,x;ca2Ig5si05;f1l27t0;ont;azan kreml14e6itchen2Gosrae,rasnoyar5ul;sk;ns0Hs1U;ax,cn,lf1n6ps5st;wiN;d5glew0Lverness;ian27ochina;aDeBi6kg,nd,ov5unti2H;d,enweep;gh6llc5;reL;bu03l5;and5;!s;r5yw0C;ef1tf1;libu24mp6r5stings;f1lem,row;stead,t0;aDodavari,r5uelph;avenAe5imsS;at 8en5; 6f1Fwi5;ch;acr3vall1H;brita0Flak3;hur5;st;ng3y villa0W;airhavHco,ra;aAgli9nf17ppi8u7ver6x5;et1Lf1;glad3t0;rope,st0;ng;nt0;rls1Ls5;t 5;e5si4;nd;aCe9fw,ig8o7ryd6u5xb;mfri3nstab00rh2tt0;en;nca18rcKv19wnt0B;by;n6r5vonpo1D;ry;!h2;nu8r5;l6t5;f1moor;ingt0;be;aLdg,eIgk,hClBo5royd0;l6m5rnwa0B;pt0;c7lingw6osse5;um;ood;he0S;earwat0St;a8el6i5uuk;chen itza,mney ro07natSricahua;m0Zt5;enh2;mor5rlottetPth2;ro;dar 5ntervilA;breaks,faZg5;rove;ld9m8r5versh2;lis6rizo pla5;in;le;bLpbellf1;weQ;aZcn,eNingl01kk,lackLolt0r5uckV;aGiAo5;ckt0ok5wns cany0;lyn,s5;i4to5;ne;de;dge6gh5;am,t0;n6t5;own;or5;th;ceb6m5;lNpt0;rid5;ge;bu5pool,wa8;rn;aconsfEdf1lBr9verly7x5;hi5;ll; hi5;lls;wi5;ck; air,l5;ingh2;am;ie5;ld;ltimore,rnsl6tters5;ea;ey;bLct0driadic,frica,ginJlGmFn9rc8s7tl6yleOzor3;es;!ant8;hcroft,ia; de triomphe,t6;adyr,ca8dov9tarct5;ic5; oce5;an;st5;er;ericas,s;be6dersh5hambra,list0;ot;rt0;cou5;rt;bot7i5;ngd0;on;sf1;ord",Country:"true¦0:38;1:2L;2:3B;a2Xb2Ec22d1Ye1Sf1Mg1Ch1Ai14j12k0Zl0Um0Gn05om2pZqat1KrXsKtCu7v5wal4yemTz3;a25imbabwe;es,lis and futu2Y;a3enezue32ietnam;nuatu,tican city;gTk6nited 4ruXs3zbeE; 2Ca,sr;arab emirat0Kkingdom,states3;! of am2Y;!raiV;a8haCimor les0Co7rinidad 5u3;nis0rk3valu;ey,me2Zs and caic1V;and t3t3;oba1L;go,kel10nga;iw2ji3nz2T;ki2V;aDcotl1eCi9lov8o6pa2Dri lanka,u5w3yr0;az3edAitzerl1;il1;d2riname;lomon1Xmal0uth 3;afr2KkMsud2;ak0en0;erra leoFn3;gapo1Yt maart3;en;negLrb0ychellZ;int 3moa,n marino,udi arab0;hele26luc0mart21;epublic of ir0Eom2Euss0w3;an27;a4eIhilippinUitcairn1Mo3uerto riN;l1rtugF;ki2Dl4nama,pua new0Vra3;gu7;au,esti3;ne;aBe9i7or3;folk1Ith4w3;ay; k3ern mariana1D;or0O;caragua,ger3ue;!ia;p3ther1Aw zeal1;al;mib0u3;ru;a7exi6icro0Bo3yanm06;ldova,n3roc5zambA;a4gol0t3;enegro,serrat;co;cAdagasc01l7r5urit4yot3;te;an0i16;shall0Xtin3;ique;a4div3i,ta;es;wi,ys0;ao,ed02;a6e5i3uxembourg;b3echtenste12thu1G;er0ya;ban0Isotho;os,tv0;azakh1Fe4iriba04o3uwait,yrgyz1F;rXsovo;eling0Knya;a3erG;ma16p2;c7nd6r4s3taly,vory coast;le of m2rael;a3el1;n,q;ia,oJ;el1;aiTon3ungary;dur0Ng kong;aBermany,ha0QibraltAre8u3;a6ern5inea3ya0P;! biss3;au;sey;deloupe,m,tema0Q;e3na0N;ce,nl1;ar;bUmb0;a7i6r3;ance,ench 3;guia0Epoly3;nes0;ji,nl1;lklandUroeU;ast tim7cu6gypt,l salv6ngl1quatorial4ritr5st3thiop0;on0; guin3;ea;ad3;or;enmark,jibou5ominica4r con3;go;!n C;ti;aBentral african Ah8o5roat0u4yprRzech3; 9ia;ba,racao;c4lo3morQngo brazzaville,okGsta r04te de ivoiL;mb0;osE;i3ristmasG;le,na;republic;m3naUpe verde,ymanA;bod0ero3;on;aGeDhut2o9r5u3;lgar0r3;kina faso,ma,undi;azil,itish 3unei;virgin3; is3;lands;liv0nai5snia and herzegoviHtswaHuvet3; isl1;and;re;l3n8rmuG;ar3gium,ize;us;h4ngladesh,rbad3;os;am4ra3;in;as;fghaGlDmBn6r4ustr3zerbaij2;al0ia;genti3men0uba;na;dorra,g5t3;arct7igua and barbu3;da;o3uil3;la;er3;ica;b3ger0;an0;ia;ni3;st2;an",FirstName:"true¦aTblair,cQdOfrancoZgabMhinaLilya,jHkClBm6ni4quinn,re3s0;h0umit,yd;ay,e0iloh;a,lby;g9ne;co,ko0;!s;a1el0ina,org6;!okuhF;ds,naia,r1tt0xiB;i,y;ion,lo;ashawn,eif,uca;a3e1ir0rM;an;lsFn0rry;dall,yat5;i,sD;a0essIie,ude;i1m0;ie,mG;me;ta;rie0y;le;arcy,ev0;an,on;as1h0;arl8eyenne;ey,sidy;drien,kira,l4nd1ubr0vi;ey;i,r0;a,e0;a,y;ex2f1o0;is;ie;ei,is",WeekDay:"true¦fri2mon2s1t0wednesd3;hurs1ues1;aturd1und1;!d0;ay0;!s",Month:"true¦dec0february,july,nov0octo1sept0;em0;ber",Date:"true¦ago,on4som4t1week0yesterd5; end,ends;mr1o0;d2morrow;!w;ed0;ay",Duration:"true¦centurAd8h7m5q4se3w1y0;ear8r8;eek0k7;!end,s;ason,c5;tr,uarter;i0onth3;llisecond2nute2;our1r1;ay0ecade0;!s;ies,y",FemaleName:"true¦0:J7;1:JB;2:IJ;3:IK;4:J1;5:IO;6:JS;7:JO;8:HB;9:JK;A:H4;B:I2;C:IT;D:JH;E:IX;F:BA;G:I4;aGTbFLcDRdD0eBMfB4gADh9Ti9Gj8Dk7Cl5Wm48n3Lo3Hp33qu32r29s15t0Eu0Cv02wVxiTyOzH;aLeIineb,oHsof3;e3Sf3la,ra;h2iKlIna,ynH;ab,ep;da,ma;da,h2iHra;nab;aKeJi0FolB7uIvH;et8onDP;i0na;le0sen3;el,gm3Hn,rGLs8W;aoHme0nyi;m5XyAD;aMendDZhiDGiH;dele9lJnH;if48niHo0;e,f47;a,helmi0lHma;a,ow;ka0nB;aNeKiHusa5;ck84kIl8oleAviH;anFenJ4;ky,toriBK;da,lA8rHs0;a,nHoniH9;a,iFR;leHnesH9;nILrH;i1y;g9rHs6xHA;su5te;aYeUhRiNoLrIuHy2;i,la;acJ3iHu0J;c3na,sH;hFta;nHr0F;iFya;aJffaEOnHs6;a,gtiH;ng;!nFSra;aIeHomasi0;a,l9Oo8Ares1;l3ndolwethu;g9Fo88rIssH;!a,ie;eHi,ri7;sa,za;bOlMmKnIrHs6tia0wa0;a60yn;iHya;a,ka,s6;arFe2iHm77ra;!ka;a,iH;a,t6;at6it6;a0Ecarlett,e0AhWiSkye,neza0oQri,tNuIyH;bIGlvi1;ha,mayIJniAsIzH;an3Net8ie,y;anHi7;!a,e,nH;aCe;aIeH;fan4l5Dphan6E;cI5r5;b3fiAAm0LnHphi1;d2ia,ja,ya;er2lJmon1nIobh8QtH;a,i;dy;lETv3;aMeIirHo0risFDy5;a,lDM;ba,e0i5lJrH;iHr6Jyl;!d8Ifa;ia,lDZ;hd,iMki2nJrIu0w0yH;la,ma,na;i,le9on,ron,yn;aIda,ia,nHon;a,on;!ya;k6mH;!aa;lJrItaye82vH;da,inj;e0ife;en1i0ma;anA9bLd5Oh1SiBkKlJmInd2rHs6vannaC;aCi0;ant6i2;lDOma,ome;ee0in8Tu2;in1ri0;a05eZhXiUoHuthDM;bScRghQl8LnPsJwIxH;anB3ie,y;an,e0;aIeHie,lD;ann7ll1marDGtA;!lHnn1;iHyn;e,nH;a,dF;da,i,na;ayy8G;hel67io;bDRerAyn;a,cIkHmas,nFta,ya;ki,o;h8Xki;ea,iannGMoH;da,n1P;an0bJemFgi0iInHta,y0;a8Bee;han86na;a,eH;cHkaC;a,ca;bi0chIe,i0mo0nHquETy0;di,ia;aERelHiB;!e,le;een4ia0;aPeOhMiLoJrHute6A;iHudenCV;scil3LyamvaB;lHrt3;i0ly;a,paluk;ilome0oebe,ylH;is,lis;ggy,nelope,r5t2;ige,m0VnKo5rvaDMtIulH;a,et8in1;ricHt4T;a,e,ia;do2i07;ctav3dIfD3is6ksa0lHphD3umC5yunbileg;a,ga,iv3;eHvAF;l3t8;aWeUiMoIurHy5;!ay,ul;a,eJor,rIuH;f,r;aCeEma;ll1mi;aNcLhariBQkKlaJna,sHta,vi;anHha;ur;!y;a,iDZki;hoGk9YolH;a,e4P;!mh;hir,lHna,risDEsreE;!a,iDDlBV;asuMdLh3i6Dl5nKomi7rgEVtH;aHhal4;lHs6;i1ya;cy,et8;e9iF0ya;nngu2X;a0Ackenz4e02iMoJrignayani,uriDJyH;a,rH;a,iOlNna,tG;bi0i2llBJnH;a,iH;ca,ka,qD9;a,cUdo4ZkaTlOmi,nMrItzi,yH;ar;aJiIlH;anET;am;!l,nB;dy,eHh,n4;nhGrva;aKdJe0iCUlH;iHy;cent,e;red;!gros;!e5;ae5hH;ae5el3Z;ag5DgNi,lKrH;edi7AiIjem,on,yH;em,l;em,sCG;an4iHliCF;nHsCJ;a,da;!an,han;b09cASd07e,g05ha,i04ja,l02n00rLsoum5YtKuIv84xBKyHz4;bell,ra,soBB;d7rH;a,eE;h8Gild1t4;a,cUgQiKjor4l7Un4s6tJwa,yH;!aHbe6Xja9lAE;m,nBL;a,ha,in1;!aJbCGeIja,lDna,sHt63;!a,ol,sa;!l1D;!h,mInH;!a,e,n1;!awit,i;arJeIie,oHr48ueri8;!t;!ry;et46i3B;el4Xi7Cy;dHon,ue5;akranAy;ak,en,iHlo3S;a,ka,nB;a,re,s4te;daHg4;!l3E;alDd4elHge,isDJon0;ei9in1yn;el,le;a0Ne0CiXoQuLyH;d3la,nH;!a,dIe2OnHsCT;!a,e2N;a,sCR;aD4cJel0Pis1lIna,pHz;e,iA;a,u,wa;iHy;a0Se,ja,l2NnB;is,l1UrItt1LuHvel4;el5is1;aKeIi7na,rH;aADi7;lHn1tA;ei;!in1;aTbb9HdSepa,lNnKsJvIzH;!a,be5Ret8z4;!ia;a,et8;!a,dH;a,sHy;ay,ey,i,y;a,iJja,lH;iHy;aA8e;!aH;!nF;ia,ya;!nH;!a,ne;aPda,e0iNjYla,nMoKsJtHx93y5;iHt4;c3t3;e2PlCO;la,nHra;a,ie,o2;a,or1;a,gh,laH;!ni;!h,nH;a,d2e,n5V;cOdon9DiNkes6mi9Gna,rMtJurIvHxmi,y5;ern1in3;a,e5Aie,yn;as6iIoH;nya,ya;fa,s6;a,isA9;a,la;ey,ie,y;a04eZhXiOlASoNrJyH;lHra;a,ee,ie;istHy6I;a,en,iIyH;!na;!e,n5F;nul,ri,urtnB8;aOerNlB7mJrHzzy;a,stH;en,in;!berlImernH;aq;eHi,y;e,y;a,stE;!na,ra;aHei2ongordzol;dij1w5;el7UiKjsi,lJnIrH;a,i,ri;d2na,za;ey,i,lBLs4y;ra,s6;biAcARdiat7MeBAiSlQmPnyakuma1DrNss6NtKviAyH;!e,lH;a,eH;e,i8T;!a6HeIhHi4TlDri0y;ar8Her8Hie,leErBAy;!lyn8Ori0;a,en,iHl5Xoli0yn;!ma,nFs95;a5il1;ei8Mi,lH;e,ie;a,tl6O;a0AeZiWoOuH;anMdLlHst88;es,iH;a8NeHs8X;!n9tH;!a,te;e5Mi3My;a,iA;!anNcelDdMelGhan7VleLni,sIva0yH;a,ce;eHie;fHlDph7Y;a,in1;en,n1;i7y;!a,e,n45;lHng;!i1DlH;!i1C;anNle0nKrJsH;i8JsH;!e,i8I;i,ri;!a,elGif2CnH;a,et8iHy;!e,f2A;a,eJiInH;a,eIiH;e,n1;!t8;cMda,mi,nIque4YsminFvie2y9zH;min7;a7eIiH;ce,e,n1s;!lHs82t0F;e,le;inIk6HlDquelH;in1yn;da,ta;da,lRmPnOo0rNsIvaHwo0zaro;!a0lu,na;aJiIlaHob89;!n9R;do2;belHdo2;!a,e,l3B;a7Ben1i0ma;di2es,gr72ji;a9elBogH;en1;a,e9iHo0se;a0na;aSeOiJoHus7Kyacin2C;da,ll4rten24snH;a,i9U;lImaH;ri;aIdHlaI;a,egard;ry;ath1BiJlInrietArmi9sH;sa,t1A;en2Uga,mi;di;bi2Fil8MlNnMrJsItHwa,yl8M;i5Tt4;n60ti;iHmo51ri53;etH;!te;aCnaC;a,ey,l4;a02eWiRlPoNrKunJwH;enHyne1R;!dolD;ay,el;acieIetHiselB;a,chE;!la;ld1CogooH;sh;adys,enHor3yn2K;a,da,na;aKgi,lIna,ov8EselHta;a,e,le;da,liH;an;!n0;mLnJorgIrH;ald5Si,m3Etrud7;et8i4X;a,eHna;s29vieve;ma;bIle,mHrnet,yG;al5Si5;iIrielH;a,l1;!ja;aTeQiPlorOoz3rH;anJeIiH;da,eB;da,ja;!cH;esIiHoi0P;n1s66;!ca;a,enc3;en,o0;lIn0rnH;anB;ec3ic3;jr,nArKtHy7;emIiHma,oumaA;ha,ma,n;eh;ah,iBrah,za0;cr4Rd0Re0Qi0Pk0Ol07mXn54rUsOtNuMvHwa;aKelIiH;!e,ta;inFyn;!a;!ngel4V;geni1ni47;h5Yien9ta;mLperanKtH;eIhHrel5;er;l31r7;za;a,eralB;iHma,ne4Lyn;cHka,n;a,ka;aPeNiKmH;aHe21ie,y;!li9nuH;elG;lHn1;e7iHy;a,e,ja;lHrald;da,y;!nue5;aWeUiNlMma,no2oKsJvH;a,iH;na,ra;a,ie;iHuiH;se;a,en,ie,y;a0c3da,e,f,nMsJzaH;!betHveA;e,h;aHe,ka;!beH;th;!a,or;anor,nH;!a,i;!in1na;ate1Rta;leEs6;vi;eIiHna,wi0;e,th;l,n;aYeMh3iLjeneKoH;lor5Vminiq4Ln3FrHtt4;a,eEis,la,othHthy;ea,y;ba;an09naCon9ya;anQbPde,eOiMlJmetr3nHsir5M;a,iH;ce,se;a,iIla,orHphi9;es,is;a,l6F;dHrdH;re;!d5Ena;!b2ForaCraC;a,d2nH;!a,e;hl3i0l0GmNnLphn1rIvi1WyH;le,na;a,by,cIia,lH;a,en1;ey,ie;a,et8iH;!ca,el1Aka,z;arHia;is;a0Re0Nh04i02lUoJristIynH;di,th3;al,i0;lPnMrIurH;tn1D;aJd2OiHn2Ori9;!nH;a,e,n1;!l4;cepci5Cn4sH;tanHuelo;ce,za;eHleE;en,t8;aJeoIotH;il54;!pat2;ir7rJudH;et8iH;a,ne;a,e,iH;ce,sZ;a2er2ndH;i,y;aReNloe,rH;isJyH;stH;al;sy,tH;a1Sen,iHy;an1e,n1;deJlseIrH;!i7yl;a,y;li9;nMrH;isKlImH;ai9;a,eHot8;n1t8;!sa;d2elGtH;al,elG;cIlH;es8i47;el3ilH;e,ia,y;itlYlXmilWndVrMsKtHy5;aIeIhHri0;er1IleErDy;ri0;a38sH;a37ie;a,iOlLmeJolIrH;ie,ol;!e,in1yn;lHn;!a,la;a,eIie,otHy;a,ta;ne,y;na,s1X;a0Ii0I;a,e,l1;isAl4;in,yn;a0Ke02iZlXoUrH;andi7eRiJoIyH;an0nn;nwDoke;an3HdgMgiLtH;n31tH;!aInH;ey,i,y;ny;d,t8;etH;!t7;an0e,nH;da,na;bbi7glarIlo07nH;iAn4;ka;ancHythe;a,he;an1Clja0nHsm3M;iAtH;ou;aWcVlinUniArPssOtJulaCvH;!erlH;ey,y;hJsy,tH;e,iHy7;e,na;!anH;ie,y;!ie;nItHyl;ha,ie;adIiH;ce;et8i9;ay,da;ca,ky;!triH;ce,z;rbJyaH;rmH;aa;a2o2ra;a2Ub2Od25g21i1Sj5l18m0Zn0Boi,r06sWtVuPvOwa,yIzH;ra,u0;aKes6gJlIn,seH;!l;in;un;!nH;a,na;a,i2K;drLguJrIsteH;ja;el3;stH;in1;a,ey,i,y;aahua,he0;hIi2Gja,miAs2DtrH;id;aMlIraqHt21;at;eIi7yH;!n;e,iHy;gh;!nH;ti;iJleIo6piA;ta;en,n1t8;aHelG;!n1J;a01dje5eZgViTjRnKohito,toHya;inet8nH;el5ia;te;!aKeIiHmJ;e,ka;!mHtt7;ar4;!belIliHmU;sa;!l1;a,eliH;ca;ka,sHta;a,sa;elHie;a,iH;a,ca,n1qH;ue;!tH;a,te;!bImHstasiMya;ar3;el;aLberKeliJiHy;e,l3naH;!ta;a,ja;!ly;hGiIl3nB;da;a,ra;le;aWba,ePiMlKthJyH;a,c3sH;a,on,sa;ea;iHys0N;e,s0M;a,cIn1sHza;a,e,ha,on,sa;e,ia,ja;c3is6jaKksaKna,sJxH;aHia;!nd2;ia,saH;nd2;ra;ia;i0nIyH;ah,na;a,is,naCoud;la;c6da,leEmNnLsH;haClH;inHyY;g,n;!h;a,o,slH;ey;ee;en;at6g4nIusH;ti0;es;ie;aWdiTelMrH;eJiH;anMenH;a,e,ne;an0;na;!aLeKiIyH;nn;a,n1;a,e;!ne;!iH;de;e,lDsH;on;yn;!lH;i9yn;ne;aKbIiHrL;!e,gaK;ey,i7y;!e;gaH;il;dKliyJradhIs6;ha;ya;ah;a,ya",Honorific:"true¦director1field marsh2lieutenant1rear0sergeant major,vice0; admir1; gener0;al","Adj|Gerund":"true¦0:3F;1:3H;2:31;3:2X;4:35;5:33;6:3C;7:2Z;8:36;9:29;a33b2Tc2Bd1Te1If19g12h0Zi0Rl0Nm0Gnu0Fo0Ap04rYsKtEuBvAw1Ayiel3;ar6e08;nBpA;l1Rs0B;fol3n1Zsett2;aEeDhrBi4ouc7rAwis0;e0Bif2oub2us0yi1;ea1SiA;l2vi1;l2mp0rr1J;nt1Vxi1;aMcreec7enten2NhLkyrocke0lo0Vmi2oJpHtDuBweA;e0Ul2;pp2ArA;gi1pri5roun3;aBea8iAri2Hun9;mula0r4;gge4rA;t2vi1;ark2eAraw2;e3llb2F;aAot7;ki1ri1;i9oc29;dYtisf6;aEeBive0oAus7;a4l2;assu4defi9fres7ig9juve07mai9s0vAwar3;ea2italiAol1G;si1zi1;gi1ll6mb2vi1;a6eDier23lun1VrAun2C;eBoA;mi5vo1Z;ce3s5vai2;n3rpleA;xi1;ffCpWutBverAwi1;arc7lap04p0Pri3whel8;goi1l6st1J;en3sA;et0;m2Jrtu4;aEeDiCoBuAyst0L;mb2;t1Jvi1;s5tiga0;an1Rl0n3smeri26;dAtu4;de9;aCeaBiAo0U;fesa0Tvi1;di1ni1;c1Fg19s0;llumiGmFnArri0R;cDfurHsCtBviA;go23ti1;e1Oimi21oxica0rig0V;pi4ul0;orpo20r0K;po5;na0;eaBorr02umilA;ia0;li1rtwar8;lFrA;atiDipCoBuelA;i1li1;undbrea10wi1;pi1;f6ng;a4ea8;a3etc7it0lEoCrBulfA;il2;ee1FighXust1L;rAun3;ebo3thco8;aCoA;a0wA;e4i1;mi1tte4;lectrJmHnExA;aCci0hBis0pA;an3lo3;aOila1B;c0spe1A;ab2coura0CdBergi13ga0Clive9ric7s02tA;hral2i0J;ea4u4;barras5er09pA;owe4;if6;aQeIiBrA;if0;sAzz6;aEgDhearCsen0tA;rAur11;ac0es5;te9;us0;ppoin0r8;biliGcDfi9gra3ligh0mBpres5sAvasG;erE;an3ea9orA;ali0L;a6eiBli9rA;ea5;vi1;ta0;maPri1s7un0zz2;aPhMlo5oAripp2ut0;mGnArrespon3;cer9fDspi4tA;inBrA;as0ibu0ol2;ui1;lic0u5;ni1;fDmCpA;eAromi5;l2ti1;an3;or0;aAil2;llenAnAr8;gi1;l8ptAri1;iva0;aff2eGin3lFoDrBuA;d3st2;eathtaAui5;ki1;gg2i2o8ri1unA;ci1;in3;co8wiA;lAtc7;de4;bsorVcOgonMlJmHnno6ppea2rFsA;pi4su4toA;nBun3;di1;is7;hi1;res0;li1;aFu5;si1;ar8lu4;ri1;mi1;iAzi1;zi1;cAhi1;eleDomA;moBpan6;yi1;da0;ra0;ti1;bi1;ng",Comparable:"true¦0:3C;1:3Q;2:3F;a3Tb3Cc33d2Te2Mf2Ag1Wh1Li1Fj1Ek1Bl13m0Xn0So0Rp0Iqu0Gr07sHtCug0vAw4y3za0Q;el10ouN;ary,e6hi5i3ry;ck0Cde,l3n1ry,se;d,y;ny,te;a3i3R;k,ry;a3erda2ulgar;gue,in,st;a6en2Xhi5i4ouZr3;anqu2Cen1ue;dy,g36me0ny;ck,rs28;ll,me,rt,wd3I;aRcaPeOhMiLkin0BlImGoEpDt6u4w3;eet,ift;b3dd0Wperfi21rre28;sta26t21;a8e7iff,r4u3;pUr1;a4ict,o3;ng;ig2Vn0N;a1ep,rn;le,rk,te0;e1Si2Vright0;ci1Yft,l3on,re;emn,id;a3el0;ll,rt;e4i3y;g2Mm0Z;ek,nd2T;ck24l0mp1L;a3iRrill,y;dy,l01rp;ve0Jxy;n1Jr3;ce,y;d,fe,int0l1Hv0V;a8e6i5o3ude;mantic,o19sy,u3;gh;pe,t1P;a3d,mo0A;dy,l;gg4iFndom,p3re,w;id;ed;ai2i3;ck,et;hoAi1Fl9o8r5u3;ny,r3;e,p11;egna2ic4o3;fouSud;ey,k0;liXor;ain,easa2;ny;dd,i0ld,ranL;aive,e5i4o3u14;b0Sisy,rm0Ysy;bb0ce,mb0R;a3r1w;r,t;ad,e5ild,o4u3;nda12te;ist,o1;a4ek,l3;low;s0ty;a8e7i6o3ucky;f0Jn4o15u3ve0w10y0N;d,sy;e0g;ke0l,mp,tt0Eve0;e1Qwd;me,r3te;ge;e4i3;nd;en;ol0ui19;cy,ll,n3;secu6t3;e3ima4;llege2rmedia3;te;re;aAe7i6o5u3;ge,m3ng1C;bYid;me0t;gh,l0;a3fXsita2;dy,rWv3;en0y;nd13ppy,r3;d3sh;!y;aFenEhCiBlAoofy,r3;a8e6i5o3ue0Z;o3ss;vy;m,s0;at,e3y;dy,n;nd,y;ad,ib,ooD;a2d1;a3o3;st0;tDuiS;u1y;aCeebBi9l8o6r5u3;ll,n3r0N;!ny;aCesh,iend0;a3nd,rmD;my;at,ir7;erce,nan3;ci9;le;r,ul3;ty;a6erie,sse4v3xtre0B;il;nti3;al;r4s3;tern,y;ly,th0;appZe9i5ru4u3;mb;nk;r5vi4z3;zy;ne;e,ty;a3ep,n9;d3f,r;!ly;agey,h8l7o5r4u3;dd0r0te;isp,uel;ar3ld,mmon,st0ward0zy;se;evKou1;e3il0;ap,e3;sy;aHiFlCoAr5u3;ff,r0sy;ly;a6i3oad;g4llia2;nt;ht;sh,ve;ld,un3;cy;a4o3ue;nd,o1;ck,nd;g,tt3;er;d,ld,w1;dy;bsu6ng5we3;so3;me;ry;rd",Adverb:"true¦a08b05d00eYfSheQinPjustOkinda,likewiZmMnJoEpCquite,r9s5t2u0very,well;ltima01p0; to,wards5;h1iny bit,o0wiO;o,t6;en,us;eldom,o0uch;!me1rt0; of;how,times,w0C;a1e0;alS;ndomRth05;ar excellenEer0oint blank; Lhaps;f3n0utright;ce0ly;! 0;ag05moX; courGten;ewJo0; longWt 0;onHwithstand9;aybe,eanwhiNore0;!ovT;! aboX;deed,steY;lla,n0;ce;or3u0;ck1l9rther0;!moK;ing; 0evK;exampCgood,suH;n mas0vI;se;e0irect2; 2fini0;te0;ly;juAtrop;ackward,y 0;far,no0; means,w; GbroFd nauseam,gEl7ny5part,s4t 2w0;ay,hi0;le;be7l0mo7wor7;arge,ea6; soon,i4;mo0way;re;l 3mo2ongsi1ready,so,togeth0ways;er;de;st;b1t0;hat;ut;ain;ad;lot,posteriori",Conjunction:"true¦aXbTcReNhowMiEjust00noBo9p8supposing,t5wh0yet;e1il0o3;e,st;n1re0thN; if,by,vM;evL;h0il,o;erefOo0;!uU;lus,rovided th9;r0therwiM;! not; mattEr,w0;! 0;since,th4w7;f4n0; 0asmuch;as mIcaForder t0;h0o;at;! 0;only,t0w0;hen;!ev3;ith2ven0;! 0;if,tB;er;o0uz;s,z;e0ut,y the time;cau1f0;ore;se;lt3nd,s 0;far1if,m0soon1t2;uch0; as;hou0;gh",Currency:"true¦$,aud,bQcOdJeurIfHgbp,hkd,iGjpy,kElDp8r7s3usd,x2y1z0¢,£,¥,ден,лв,руб,฿,₡,₨,€,₭,﷼;lotyQł;en,uanP;af,of;h0t5;e0il5;k0q0;elK;oubleJp,upeeJ;e2ound st0;er0;lingG;n0soF;ceEnies;empi7i7;n,r0wanzaCyatC;!onaBw;ls,nr;ori7ranc9;!os;en3i2kk,o0;b0ll2;ra5;me4n0rham4;ar3;e0ny;nt1;aht,itcoin0;!s",Determiner:"true¦aBboth,d9e6few,le5mu8neiDplenty,s4th2various,wh0;at0ich0;evC;a0e4is,ose;!t;everal,ome;!ast,s;a1l0very;!se;ch;e0u;!s;!n0;!o0y;th0;er","Adj|Present":"true¦a07b04cVdQeNfJhollIidRlEmCnarrIoBp9qua8r7s3t2uttFw0;aKet,ro0;ng,u08;endChin;e2hort,l1mooth,our,pa9tray,u0;re,speU;i2ow;cu6da02leSpaN;eplica01i02;ck;aHerfePr0;eseUime,omV;bscu1pen,wn;atu0e3odeH;re;a2e1ive,ow0;er;an;st,y;ow;a2i1oul,r0;ee,inge;rm;iIke,ncy,st;l1mpty,x0;emHpress;abo4ic7;amp,e2i1oub0ry,ull;le;ffu9re6;fu8libe0;raE;alm,l5o0;mpleCn3ol,rr1unterfe0;it;e0u7;ct;juga8sum7;ea1o0;se;n,r;ankru1lu0;nt;pt;li2pproxi0rticula1;ma0;te;ght","Person|Adj":"true¦b3du2earnest,frank,mi2r0san1woo1;an0ich,u1;dy;sty;ella,rown",Modal:"true¦c5lets,m4ought3sh1w0;ill,o5;a0o4;ll,nt;! to,a;ight,ust;an,o0;uld",Verb:"true¦born,cannot,gonna,has,keep tabs,msg","Person|Verb":"true¦b8ch7dr6foster,gra5ja9lan4ma2ni9ollie,p1rob,s0wade;kip,pike,t5ue;at,eg,ier2;ck,r0;k,shal;ce;ce,nt;ew;ase,u1;iff,l1ob,u0;ck;aze,ossom","Person|Date":"true¦a2j0sep;an0une;!uary;p0ugust,v0;ril"},Li=36,om="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ",ap=om.split("").reduce(function(e,t,r){return e[t]=r,e},{}),wM=function(e){if(om[e]!==void 0)return om[e];let t=1,r=Li,n="";for(;e>=r;e-=r,t++,r*=Li);for(;t--;){const a=e%Li;n=String.fromCharCode((a<10?48:55)+a)+n,e=(e-a)/Li}return n},xM=function(e){if(ap[e]!==void 0)return ap[e];let t=0,r=1,n=Li,a=1;for(;r<e.length;t+=n,r++,n*=Li);for(let i=e.length-1;i>=0;i--,a*=Li){let o=e.charCodeAt(i)-48;o>10&&(o-=7),t+=o*a}return t},sm={toAlphaCode:wM,fromAlphaCode:xM},DM=function(e){const t=new RegExp("([0-9A-Z]+):([0-9A-Z]+)");for(let r=0;r<e.nodes.length;r++){const n=t.exec(e.nodes[r]);if(!n){e.symCount=r;break}e.syms[sm.fromAlphaCode(n[1])]=sm.fromAlphaCode(n[2])}e.nodes=e.nodes.slice(e.symCount,e.nodes.length)},NM=function(e,t,r){const n=sm.fromAlphaCode(t);return n<e.symCount?e.syms[n]:r+n+1-e.symCount},AM=function(e){const t=[],r=(n,a)=>{let i=e.nodes[n];i[0]==="!"&&(t.push(a),i=i.slice(1));const o=i.split(/([A-Z0-9,]+)/g);for(let s=0;s<o.length;s+=2){const u=o[s],l=o[s+1];if(!u)continue;const c=a+u;if(l===","||l===void 0){t.push(c);continue}const f=NM(e,l,n);r(f,c)}};return r(0,""),t},CM=function(e){const t={nodes:e.split(";"),syms:[],symCount:0};return e.match(":")&&DM(t),AM(t)},EM=function(e){if(!e)return{};const t=e.split("|").reduce((n,a)=>{const i=a.split("¦");return n[i[0]]=i[1],n},{}),r={};return Object.keys(t).forEach(function(n){const a=CM(t[n]);n==="true"&&(n=!0);for(let i=0;i<a.length;i++){const o=a[i];r.hasOwnProperty(o)===!0?Array.isArray(r[o])===!1?r[o]=[r[o],n]:r[o].push(n):r[o]=n}}),r},jn=["Possessive","Pronoun"],SM={"20th century fox":"Organization","7 eleven":"Organization","motel 6":"Organization",g8:"Organization",vh1:"Organization","76ers":"SportsTeam","49ers":"SportsTeam",q1:"Date",q2:"Date",q3:"Date",q4:"Date",km2:"Unit",m2:"Unit",dm2:"Unit",cm2:"Unit",mm2:"Unit",mile2:"Unit",in2:"Unit",yd2:"Unit",ft2:"Unit",m3:"Unit",dm3:"Unit",cm3:"Unit",in3:"Unit",ft3:"Unit",yd3:"Unit","at&t":"Organization","black & decker":"Organization","h & m":"Organization","johnson & johnson":"Organization","procter & gamble":"Organization","ben & jerry's":"Organization","&":"Conjunction",i:["Pronoun","Singular"],he:["Pronoun","Singular"],she:["Pronoun","Singular"],it:["Pronoun","Singular"],they:["Pronoun","Plural"],we:["Pronoun","Plural"],was:["Copula","PastTense"],is:["Copula","PresentTense"],are:["Copula","PresentTense"],am:["Copula","PresentTense"],were:["Copula","PastTense"],her:jn,his:jn,hers:jn,their:jn,theirs:jn,themselves:jn,your:jn,our:jn,ours:jn,my:jn,its:jn,vs:["Conjunction","Abbreviation"],if:["Condition","Preposition"],closer:"Comparative",closest:"Superlative",much:"Adverb",may:"Modal",babysat:"PastTense",blew:"PastTense",drank:"PastTense",drove:"PastTense",forgave:"PastTense",skiied:"PastTense",spilt:"PastTense",stung:"PastTense",swam:"PastTense",swung:"PastTense",guaranteed:"PastTense",shrunk:"PastTense",nears:"PresentTense",nearing:"Gerund",neared:"PastTense",no:["Negative","Expression"]},MM={"20th century fox":"Organization","7 eleven":"Organization","motel 6":"Organization","excuse me":"Expression","financial times":"Organization","guns n roses":"Organization","la z boy":"Organization","labour party":"Organization","new kids on the block":"Organization","new york times":"Organization","the guess who":"Organization","thin lizzy":"Organization","prime minister":"Actor","free market":"Singular","lay up":"Singular","living room":"Singular","living rooms":"Plural","spin off":"Singular","appeal court":"Uncountable","cold war":"Uncountable","gene pool":"Uncountable","machine learning":"Uncountable","nail polish":"Uncountable","time off":"Uncountable","take part":"Infinitive","bill gates":"Person","doctor who":"Person","dr who":"Person","he man":"Person","iron man":"Person","kid cudi":"Person","run dmc":"Person","rush limbaugh":"Person","snow white":"Person","tiger woods":"Person","brand new":"Adjective","en route":"Adjective","left wing":"Adjective","off guard":"Adjective","on board":"Adjective","part time":"Adjective","right wing":"Adjective","so called":"Adjective","spot on":"Adjective","straight forward":"Adjective","super duper":"Adjective","tip top":"Adjective","top notch":"Adjective","up to date":"Adjective","win win":"Adjective","brooklyn nets":"SportsTeam","chicago bears":"SportsTeam","houston astros":"SportsTeam","houston dynamo":"SportsTeam","houston rockets":"SportsTeam","houston texans":"SportsTeam","minnesota twins":"SportsTeam","orlando magic":"SportsTeam","san antonio spurs":"SportsTeam","san diego chargers":"SportsTeam","san diego padres":"SportsTeam","iron maiden":"ProperNoun","isle of man":"Country","united states":"Country","united states of america":"Country","prince edward island":"Region","cedar breaks":"Place","cedar falls":"Place","point blank":"Adverb","tiny bit":"Adverb","by the time":"Conjunction","no matter":"Conjunction","civil wars":"Plural","credit cards":"Plural","default rates":"Plural","free markets":"Plural","head starts":"Plural","home runs":"Plural","lay ups":"Plural","phone calls":"Plural","press releases":"Plural","record labels":"Plural","soft serves":"Plural","student loans":"Plural","tax returns":"Plural","tv shows":"Plural","video games":"Plural","took part":"PastTense","takes part":"PresentTense","taking part":"Gerund","taken part":"Participle","light bulb":"Noun","rush hour":"Noun","fluid ounce":"Unit","the rolling stones":"Organization"},TM=[":(",":)",":P",":p",":O",";(",";)",";P",";p",";O",":3",":|",":/",":\\",":$",":*",":@",":-(",":-)",":-P",":-p",":-O",":-3",":-|",":-/",":-\\",":-$",":-*",":-@",":^(",":^)",":^P",":^p",":^O",":^3",":^|",":^/",":^\\",":^$",":^*",":^@","):","(:","$:","*:",")-:","(-:","$-:","*-:",")^:","(^:","$^:","*^:","<3","</3","<\\3","=("],xu={a:[[/(antenn|formul|nebul|vertebr|vit)a$/i,"$1ae"],[/ia$/i,"ia"]],e:[[/(kn|l|w)ife$/i,"$1ives"],[/(hive)$/i,"$1s"],[/([m|l])ouse$/i,"$1ice"],[/([m|l])ice$/i,"$1ice"]],f:[[/^(dwar|handkerchie|hoo|scar|whar)f$/i,"$1ves"],[/^((?:ca|e|ha|(?:our|them|your)?se|she|wo)l|lea|loa|shea|thie)f$/i,"$1ves"]],i:[[/(octop|vir)i$/i,"$1i"]],m:[[/([ti])um$/i,"$1a"]],n:[[/^(oxen)$/i,"$1"]],o:[[/(al|ad|at|er|et|ed)o$/i,"$1oes"]],s:[[/(ax|test)is$/i,"$1es"],[/(alias|status)$/i,"$1es"],[/sis$/i,"ses"],[/(bu)s$/i,"$1ses"],[/(sis)$/i,"ses"],[/^(?!talis|.*hu)(.*)man$/i,"$1men"],[/(octop|vir|radi|nucle|fung|cact|stimul)us$/i,"$1i"]],x:[[/(matr|vert|ind|cort)(ix|ex)$/i,"$1ices"],[/^(ox)$/i,"$1en"]],y:[[/([^aeiouy]|qu)y$/i,"$1ies"]],z:[[/(quiz)$/i,"$1zes"]]},FM=/([xsz]|ch|sh)$/,PM=function(e){const t=e[e.length-1];if(xu.hasOwnProperty(t)===!0)for(let r=0;r<xu[t].length;r+=1){const n=xu[t][r][0];if(n.test(e)===!0)return e.replace(n,xu[t][r][1])}return null},wc=function(e="",t){const{irregularPlurals:r,uncountable:n}=t.two;if(n.hasOwnProperty(e))return e;if(r.hasOwnProperty(e))return r[e];const a=PM(e);return a!==null?a:FM.test(e)?e+"es":e+"s"},kM=/\|/,es=SM,um={},OM={two:{irregularPlurals:Ew,uncountable:{}}};Object.keys(np).forEach(e=>{const t=EM(np[e]);if(!kM.test(e)){Object.keys(t).forEach(r=>{es[r]=e});return}Object.keys(t).forEach(r=>{if(um[r]=e,e==="Noun|Verb"){const n=wc(r,OM);um[n]="Plural|Verb"}})});TM.forEach(e=>es[e]="Emoticon");delete es[""];delete es[null];delete es[" "];const he="Singular",Ut={beforeTags:{Determiner:he,Possessive:he,Acronym:he,Noun:he,Adjective:he,PresentTense:he,Gerund:he,PastTense:he,Infinitive:he,Date:he,Ordinal:he,Demonym:he},afterTags:{Value:he,Modal:he,Copula:he,PresentTense:he,PastTense:he,Demonym:he,Actor:he},beforeWords:{the:he,with:he,without:he,of:he,for:he,any:he,all:he,on:he,cut:he,cuts:he,increase:he,decrease:he,raise:he,drop:he,save:he,saved:he,saves:he,make:he,makes:he,made:he,minus:he,plus:he,than:he,another:he,versus:he,neither:he,about:he,favorite:he,best:he,daily:he,weekly:he,linear:he,binary:he,mobile:he,lexical:he,technical:he,computer:he,scientific:he,security:he,government:he,popular:he,formal:he,no:he,more:he,one:he,let:he,her:he,his:he,their:he,our:he,us:he,sheer:he,monthly:he,yearly:he,current:he,previous:he,upcoming:he,last:he,next:he,main:he,initial:he,final:he,beginning:he,end:he,top:he,bottom:he,future:he,past:he,major:he,minor:he,side:he,central:he,peripheral:he,public:he,private:he},afterWords:{of:he,system:he,aid:he,method:he,utility:he,tool:he,reform:he,therapy:he,philosophy:he,room:he,authority:he,says:he,said:he,wants:he,wanted:he,is:he,did:he,do:he,can:he,wise:he}},De="Infinitive",_r={beforeTags:{Modal:De,Adverb:De,Negative:De,Plural:De},afterTags:{Determiner:De,Adverb:De,Possessive:De,Reflexive:De,Preposition:De,Cardinal:De,Comparative:De,Superlative:De},beforeWords:{i:De,we:De,you:De,they:De,to:De,please:De,will:De,have:De,had:De,would:De,could:De,should:De,do:De,did:De,does:De,can:De,must:De,us:De,me:De,let:De,even:De,when:De,help:De,he:De,she:De,it:De,being:De,bi:De,co:De,contra:De,de:De,inter:De,intra:De,mis:De,pre:De,out:De,counter:De,nobody:De,somebody:De,anybody:De,everybody:De},afterWords:{the:De,me:De,you:De,him:De,us:De,her:De,his:De,them:De,they:De,it:De,himself:De,herself:De,itself:De,myself:De,ourselves:De,themselves:De,something:De,anything:De,a:De,an:De,up:De,down:De,by:De,out:De,off:De,under:De,what:De,all:De,to:De,because:De,although:De,how:De,otherwise:De,together:De,though:De,into:De,yet:De,more:De,here:De,there:De,away:De}},$M={beforeTags:Object.assign({},_r.beforeTags,Ut.beforeTags,{}),afterTags:Object.assign({},_r.afterTags,Ut.afterTags,{}),beforeWords:Object.assign({},_r.beforeWords,Ut.beforeWords,{}),afterWords:Object.assign({},_r.afterWords,Ut.afterWords,{})},Ce="Adjective",or={beforeTags:{Determiner:Ce,Possessive:Ce,Hyphenated:Ce},afterTags:{Adjective:Ce},beforeWords:{seem:Ce,seemed:Ce,seems:Ce,feel:Ce,feels:Ce,felt:Ce,stay:Ce,appear:Ce,appears:Ce,appeared:Ce,also:Ce,over:Ce,under:Ce,too:Ce,it:Ce,but:Ce,still:Ce,really:Ce,quite:Ce,well:Ce,very:Ce,truly:Ce,how:Ce,deeply:Ce,hella:Ce,profoundly:Ce,extremely:Ce,so:Ce,badly:Ce,mostly:Ce,totally:Ce,awfully:Ce,rather:Ce,nothing:Ce,something:Ce,anything:Ce,not:Ce,me:Ce,is:Ce,face:Ce,faces:Ce,faced:Ce,look:Ce,looks:Ce,looked:Ce,reveal:Ce,reveals:Ce,revealed:Ce,sound:Ce,sounded:Ce,sounds:Ce,remains:Ce,remained:Ce,prove:Ce,proves:Ce,proved:Ce,becomes:Ce,stays:Ce,tastes:Ce,taste:Ce,smells:Ce,smell:Ce,gets:Ce,grows:Ce,as:Ce,rings:Ce,radiates:Ce,conveys:Ce,convey:Ce,conveyed:Ce,of:Ce},afterWords:{too:Ce,also:Ce,or:Ce,enough:Ce,as:Ce}},Ve="Gerund",ni={beforeTags:{Adverb:Ve,Preposition:Ve,Conjunction:Ve},afterTags:{Adverb:Ve,Possessive:Ve,Person:Ve,Pronoun:Ve,Determiner:Ve,Copula:Ve,Preposition:Ve,Conjunction:Ve,Comparative:Ve},beforeWords:{been:Ve,keep:Ve,continue:Ve,stop:Ve,am:Ve,be:Ve,me:Ve,began:Ve,start:Ve,starts:Ve,started:Ve,stops:Ve,stopped:Ve,help:Ve,helps:Ve,avoid:Ve,avoids:Ve,love:Ve,loves:Ve,loved:Ve,hate:Ve,hates:Ve,hated:Ve},afterWords:{you:Ve,me:Ve,her:Ve,him:Ve,his:Ve,them:Ve,their:Ve,it:Ve,this:Ve,there:Ve,on:Ve,about:Ve,for:Ve,up:Ve,down:Ve}},wt="Gerund",Wa="Adjective",BM={beforeTags:Object.assign({},or.beforeTags,ni.beforeTags,{Imperative:wt,Infinitive:Wa,Plural:wt}),afterTags:Object.assign({},or.afterTags,ni.afterTags,{Noun:Wa}),beforeWords:Object.assign({},or.beforeWords,ni.beforeWords,{is:Wa,are:wt,was:Wa,of:Wa,suggest:wt,suggests:wt,suggested:wt,recommend:wt,recommends:wt,recommended:wt,imagine:wt,imagines:wt,imagined:wt,consider:wt,considered:wt,considering:wt,resist:wt,resists:wt,resisted:wt,avoid:wt,avoided:wt,avoiding:wt,except:Wa,accept:Wa,assess:wt,explore:wt,fear:wt,fears:wt,appreciate:wt,question:wt,help:wt,embrace:wt,with:Wa}),afterWords:Object.assign({},or.afterWords,ni.afterWords,{to:wt,not:wt,the:wt})},ip={beforeTags:{Determiner:void 0,Cardinal:"Noun",PhrasalVerb:"Adjective"},afterTags:{}},_M={beforeTags:Object.assign({},or.beforeTags,Ut.beforeTags,ip.beforeTags),afterTags:Object.assign({},or.afterTags,Ut.afterTags,ip.afterTags),beforeWords:Object.assign({},or.beforeWords,Ut.beforeWords,{are:"Adjective",is:"Adjective",was:"Adjective",be:"Adjective",off:"Adjective",out:"Adjective"}),afterWords:Object.assign({},or.afterWords,Ut.afterWords)},et="PastTense",ys="Adjective",Du={beforeTags:{Adverb:et,Pronoun:et,ProperNoun:et,Auxiliary:et,Noun:et},afterTags:{Possessive:et,Pronoun:et,Determiner:et,Adverb:et,Comparative:et,Date:et,Gerund:et},beforeWords:{be:et,who:et,get:ys,had:et,has:et,have:et,been:et,it:et,as:et,for:ys,more:ys,always:ys},afterWords:{by:et,back:et,out:et,in:et,up:et,down:et,before:et,after:et,for:et,the:et,with:et,as:et,on:et,at:et,between:et,to:et,into:et,us:et,them:et,his:et,her:et,their:et,our:et,me:et,about:ys}},IM={beforeTags:Object.assign({},or.beforeTags,Du.beforeTags),afterTags:Object.assign({},or.afterTags,Du.afterTags),beforeWords:Object.assign({},or.beforeWords,Du.beforeWords),afterWords:Object.assign({},or.afterWords,Du.afterWords)},zM={afterTags:{Noun:"Adjective",Conjunction:void 0}},jM={beforeTags:Object.assign({},or.beforeTags,_r.beforeTags,{Adverb:void 0,Negative:void 0}),afterTags:Object.assign({},or.afterTags,_r.afterTags,zM.afterTags),beforeWords:Object.assign({},or.beforeWords,_r.beforeWords,{have:void 0,had:void 0,not:void 0,went:"Adjective",goes:"Adjective",got:"Adjective",be:"Adjective"}),afterWords:Object.assign({},or.afterWords,_r.afterWords,{to:void 0,as:"Adjective"})},Nu={beforeTags:{Copula:"Gerund",PastTense:"Gerund",PresentTense:"Gerund",Infinitive:"Gerund"},afterTags:{Value:"Gerund"},beforeWords:{are:"Gerund",were:"Gerund",be:"Gerund",no:"Gerund",without:"Gerund",you:"Gerund",we:"Gerund",they:"Gerund",he:"Gerund",she:"Gerund",us:"Gerund",them:"Gerund"},afterWords:{the:"Gerund",this:"Gerund",that:"Gerund",me:"Gerund",us:"Gerund",them:"Gerund"}},qM={beforeTags:Object.assign({},ni.beforeTags,Ut.beforeTags,Nu.beforeTags),afterTags:Object.assign({},ni.afterTags,Ut.afterTags,Nu.afterTags),beforeWords:Object.assign({},ni.beforeWords,Ut.beforeWords,Nu.beforeWords),afterWords:Object.assign({},ni.afterWords,Ut.afterWords,Nu.afterWords)},go="Singular",Ti="Infinitive",RM={beforeTags:Object.assign({},_r.beforeTags,Ut.beforeTags,{Adjective:go,Particle:go}),afterTags:Object.assign({},_r.afterTags,Ut.afterTags,{ProperNoun:Ti,Gerund:Ti,Adjective:Ti,Copula:go}),beforeWords:Object.assign({},_r.beforeWords,Ut.beforeWords,{is:go,was:go,of:go,have:null}),afterWords:Object.assign({},_r.afterWords,Ut.afterWords,{instead:Ti,about:Ti,his:Ti,her:Ti,to:null,by:null,in:null})},Mt="Person",sr={beforeTags:{Honorific:Mt,Person:Mt},afterTags:{Person:Mt,ProperNoun:Mt,Verb:Mt},beforeWords:{hi:Mt,hey:Mt,yo:Mt,dear:Mt,hello:Mt},afterWords:{said:Mt,says:Mt,told:Mt,tells:Mt,feels:Mt,felt:Mt,seems:Mt,thinks:Mt,thought:Mt,spends:Mt,spendt:Mt,plays:Mt,played:Mt,sing:Mt,sang:Mt,learn:Mt,learned:Mt,wants:Mt,wanted:Mt}},Ht="Month",LM="Person",Au={beforeTags:{Date:Ht,Value:Ht},afterTags:{Date:Ht,Value:Ht},beforeWords:{by:Ht,in:Ht,on:Ht,during:Ht,after:Ht,before:Ht,between:Ht,until:Ht,til:Ht,sometime:Ht,of:Ht,this:Ht,next:Ht,last:Ht,previous:Ht,following:Ht,with:LM},afterWords:{sometime:Ht,in:Ht,of:Ht,until:Ht,the:Ht}},HM={beforeTags:Object.assign({},sr.beforeTags,Au.beforeTags),afterTags:Object.assign({},sr.afterTags,Au.afterTags),beforeWords:Object.assign({},sr.beforeWords,Au.beforeWords),afterWords:Object.assign({},sr.afterWords,Au.afterWords)},GM={beforeTags:Object.assign({},Ut.beforeTags,sr.beforeTags),afterTags:Object.assign({},Ut.afterTags,sr.afterTags),beforeWords:Object.assign({},Ut.beforeWords,sr.beforeWords,{i:"Infinitive",we:"Infinitive"}),afterWords:Object.assign({},Ut.afterWords,sr.afterWords)},VM={beforeTags:Object.assign({},Ut.beforeTags,sr.beforeTags,_r.beforeTags),afterTags:Object.assign({},Ut.afterTags,sr.afterTags,_r.afterTags),beforeWords:Object.assign({},Ut.beforeWords,sr.beforeWords,_r.beforeWords),afterWords:Object.assign({},Ut.afterWords,sr.afterWords,_r.afterWords)},Er="Place",Cu={beforeTags:{Place:Er},afterTags:{Place:Er,Abbreviation:Er},beforeWords:{in:Er,by:Er,near:Er,from:Er,to:Er},afterWords:{in:Er,by:Er,near:Er,from:Er,to:Er,government:Er,council:Er,region:Er,city:Er}},UM={beforeTags:Object.assign({},Cu.beforeTags,sr.beforeTags),afterTags:Object.assign({},Cu.afterTags,sr.afterTags),beforeWords:Object.assign({},Cu.beforeWords,sr.beforeWords),afterWords:Object.assign({},Cu.afterWords,sr.afterWords)},WM={beforeTags:Object.assign({},sr.beforeTags,or.beforeTags),afterTags:Object.assign({},sr.afterTags,or.afterTags),beforeWords:Object.assign({},sr.beforeWords,or.beforeWords),afterWords:Object.assign({},sr.afterWords,or.afterWords)},Dn="Unit",JM={beforeTags:{Value:Dn},afterTags:{},beforeWords:{per:Dn,every:Dn,each:Dn,square:Dn,cubic:Dn,sq:Dn,metric:Dn},afterWords:{per:Dn,squared:Dn,cubed:Dn,long:Dn}},Oo={"Actor|Verb":$M,"Adj|Gerund":BM,"Adj|Noun":_M,"Adj|Past":IM,"Adj|Present":jM,"Noun|Verb":RM,"Noun|Gerund":qM,"Person|Noun":GM,"Person|Date":HM,"Person|Verb":VM,"Person|Place":UM,"Person|Adj":WM,"Unit|Noun":JM},Eu=(e,t)=>{const r=Object.keys(e).reduce((n,a)=>(n[a]=e[a]==="Infinitive"?"PresentTense":"Plural",n),{});return Object.assign(r,t)};Oo["Plural|Verb"]={beforeWords:Eu(Oo["Noun|Verb"].beforeWords,{had:"Plural",have:"Plural"}),afterWords:Eu(Oo["Noun|Verb"].afterWords,{his:"PresentTense",her:"PresentTense",its:"PresentTense",in:null,to:null,is:"PresentTense",by:"PresentTense"}),beforeTags:Eu(Oo["Noun|Verb"].beforeTags,{Conjunction:"PresentTense",Noun:void 0,ProperNoun:"PresentTense"}),afterTags:Eu(Oo["Noun|Verb"].afterTags,{Gerund:"Plural",Noun:"PresentTense",Value:"PresentTense"})};const Nt="Adjective",pr="Infinitive",Fi="PresentTense",st="Singular",gr="PastTense",vo="Adverb",fn="Plural",Jt="Actor",Su="Verb",kr="Noun",KM="ProperNoun",qn="LastName",op="Modal",Ot="Place",tf="Participle",YM=[null,null,{ea:st,ia:kr,ic:Nt,ly:vo,"'n":Su,"'t":Su},{oed:gr,ued:gr,xed:gr," so":vo,"'ll":op,"'re":"Copula",azy:Nt,eer:kr,end:Su,ped:gr,ffy:Nt,ify:pr,ing:"Gerund",ize:pr,ibe:pr,lar:Nt,mum:Nt,nes:Fi,nny:Nt,ous:Nt,que:Nt,ger:kr,ber:kr,rol:st,sis:st,ogy:st,oid:st,ian:st,zes:Fi,eld:gr,ken:tf,ven:tf,ten:tf,ect:pr,ict:pr,ign:pr,oze:pr,ful:Nt,bal:Nt,ton:kr,pur:Ot},{amed:gr,aped:gr,ched:gr,lked:gr,rked:gr,reed:gr,nded:gr,mned:Nt,cted:gr,dged:gr,ield:st,akis:qn,cede:pr,chuk:qn,czyk:qn,ects:Fi,iend:st,ends:Su,enko:qn,ette:st,iary:st,wner:st,fies:Fi,fore:vo,gate:pr,gone:Nt,ices:fn,ints:fn,ruct:pr,ines:fn,ions:fn,ners:fn,pers:fn,lers:fn,less:Nt,llen:Nt,made:Nt,nsen:qn,oses:Fi,ould:op,some:Nt,sson:qn,ians:fn,tion:st,tage:kr,ique:st,tive:Nt,tors:kr,vice:st,lier:st,fier:st,wned:gr,gent:st,tist:Jt,pist:Jt,rist:Jt,mist:Jt,yist:Jt,vist:Jt,ists:Jt,lite:st,site:st,rite:st,mite:st,bite:st,mate:st,date:st,ndal:st,vent:st,uist:Jt,gist:Jt,note:st,cide:st,ence:st,wide:Nt,vide:pr,ract:pr,duce:pr,pose:pr,eive:pr,lyze:pr,lyse:pr,iant:Nt,nary:Nt,ghty:Nt,uent:Nt,erer:Jt,bury:Ot,dorf:kr,esty:kr,wych:Ot,dale:Ot,folk:Ot,vale:Ot,abad:Ot,sham:Ot,wick:Ot,view:Ot},{elist:Jt,holic:st,phite:st,tized:gr,urned:gr,eased:gr,ances:fn,bound:Nt,ettes:fn,fully:vo,ishes:Fi,ities:fn,marek:qn,nssen:qn,ology:kr,osome:st,tment:st,ports:fn,rough:Nt,tches:Fi,tieth:"Ordinal",tures:fn,wards:vo,where:vo,archy:kr,pathy:kr,opoly:kr,embly:kr,phate:kr,ndent:st,scent:st,onist:Jt,anist:Jt,alist:Jt,olist:Jt,icist:Jt,ounce:pr,iable:Nt,borne:Nt,gnant:Nt,inant:Nt,igent:Nt,atory:Nt,rient:st,dient:st,maker:Jt,burgh:Ot,mouth:Ot,ceter:Ot,ville:Ot,hurst:Ot,stead:Ot,endon:Ot,brook:Ot,shire:Ot,worth:kr,field:KM,ridge:Ot},{auskas:qn,parent:st,cedent:st,ionary:st,cklist:st,brooke:Ot,keeper:Jt,logist:Jt,teenth:"Value",worker:Jt,master:Jt,writer:Jt,brough:Ot,cester:Ot,ington:Ot,cliffe:Ot,ingham:Ot},{chester:Ot,logists:Jt,opoulos:qn,borough:Ot,sdottir:qn}],mn="Adjective",$t="Noun",bs="Verb",ZM=[null,null,{},{neo:$t,bio:$t,"de-":bs,"re-":bs,"un-":bs,"ex-":$t},{anti:$t,auto:$t,faux:mn,hexa:$t,kilo:$t,mono:$t,nano:$t,octa:$t,poly:$t,semi:mn,tele:$t,"pro-":mn,"mis-":bs,"dis-":bs,"pre-":mn},{anglo:$t,centi:$t,ethno:$t,ferro:$t,grand:$t,hepta:$t,hydro:$t,intro:$t,macro:$t,micro:$t,milli:$t,nitro:$t,penta:$t,quasi:mn,radio:$t,tetra:$t,"omni-":mn,"post-":mn},{pseudo:mn,"extra-":mn,"hyper-":mn,"inter-":mn,"intra-":mn,"deca-":mn},{electro:$t}],Gt="Adjective",Mu="Infinitive",Tu="PresentTense",ya="Singular",Hr="PastTense",sp="Adverb",ba="Expression",up="Actor",lp="Verb",cp="Noun",Fu="LastName",QM={a:[[/.[aeiou]na$/,cp,"tuna"],[/.[oau][wvl]ska$/,Fu],[/.[^aeiou]ica$/,ya,"harmonica"],[/^([hyj]a+)+$/,ba,"haha"]],c:[[/.[^aeiou]ic$/,Gt]],d:[[/[aeiou](pp|ll|ss|ff|gg|tt|rr|bb|nn|mm)ed$/,Hr,"popped"],[/.[aeo]{2}[bdgmnprvz]ed$/,Hr,"rammed"],[/.[aeiou][sg]hed$/,Hr,"gushed"],[/.[aeiou]red$/,Hr,"hired"],[/.[aeiou]r?ried$/,Hr,"hurried"],[/[^aeiou]ard$/,ya,"steward"],[/[aeiou][^aeiou]id$/,Gt,""],[/.[vrl]id$/,Gt,"livid"],[/..led$/,Hr,"hurled"],[/.[iao]sed$/,Hr,""],[/[aeiou]n?[cs]ed$/,Hr,""],[/[aeiou][rl]?[mnf]ed$/,Hr,""],[/[aeiou][ns]?c?ked$/,Hr,"bunked"],[/[aeiou]gned$/,Hr],[/[aeiou][nl]?ged$/,Hr],[/.[tdbwxyz]ed$/,Hr],[/[^aeiou][aeiou][tvx]ed$/,Hr],[/.[cdflmnprstv]ied$/,Hr,"emptied"]],e:[[/.[lnr]ize$/,Mu,"antagonize"],[/.[^aeiou]ise$/,Mu,"antagonise"],[/.[aeiou]te$/,Mu,"bite"],[/.[^aeiou][ai]ble$/,Gt,"fixable"],[/.[^aeiou]eable$/,Gt,"maleable"],[/.[ts]ive$/,Gt,"festive"],[/[a-z]-like$/,Gt,"woman-like"]],h:[[/.[^aeiouf]ish$/,Gt,"cornish"],[/.v[iy]ch$/,Fu,"..ovich"],[/^ug?h+$/,ba,"ughh"],[/^uh[ -]?oh$/,ba,"uhoh"],[/[a-z]-ish$/,Gt,"cartoon-ish"]],i:[[/.[oau][wvl]ski$/,Fu,"polish-male"]],k:[[/^(k){2}$/,ba,"kkkk"]],l:[[/.[gl]ial$/,Gt,"familial"],[/.[^aeiou]ful$/,Gt,"fitful"],[/.[nrtumcd]al$/,Gt,"natal"],[/.[^aeiou][ei]al$/,Gt,"familial"]],m:[[/.[^aeiou]ium$/,ya,"magnesium"],[/[^aeiou]ism$/,ya,"schism"],[/^[hu]m+$/,ba,"hmm"],[/^\d+ ?[ap]m$/,"Date","3am"]],n:[[/.[lsrnpb]ian$/,Gt,"republican"],[/[^aeiou]ician$/,up,"musician"],[/[aeiou][ktrp]in'$/,"Gerund","cookin'"]],o:[[/^no+$/,ba,"noooo"],[/^(yo)+$/,ba,"yoo"],[/^wo{2,}[pt]?$/,ba,"woop"]],r:[[/.[bdfklmst]ler$/,"Noun"],[/[aeiou][pns]er$/,ya],[/[^i]fer$/,Mu],[/.[^aeiou][ao]pher$/,up],[/.[lk]er$/,"Noun"],[/.ier$/,"Comparative"]],t:[[/.[di]est$/,"Superlative"],[/.[icldtgrv]ent$/,Gt],[/[aeiou].*ist$/,Gt],[/^[a-z]et$/,lp]],s:[[/.[^aeiou]ises$/,Tu],[/.[rln]ates$/,Tu],[/.[^z]ens$/,lp],[/.[lstrn]us$/,ya],[/.[aeiou]sks$/,Tu],[/.[aeiou]kes$/,Tu],[/[aeiou][^aeiou]is$/,ya],[/[a-z]'s$/,cp],[/^yes+$/,ba]],v:[[/.[^aeiou][ai][kln]ov$/,Fu]],y:[[/.[cts]hy$/,Gt],[/.[st]ty$/,Gt],[/.[tnl]ary$/,Gt],[/.[oe]ry$/,ya],[/[rdntkbhs]ly$/,sp],[/.(gg|bb|zz)ly$/,Gt],[/...lly$/,sp],[/.[gk]y$/,Gt],[/[bszmp]{2}y$/,Gt],[/.[ai]my$/,Gt],[/[ea]{2}zy$/,Gt],[/.[^aeiou]ity$/,ya]]},Or="Verb",jt="Noun",XM={leftTags:[["Adjective",jt],["Possessive",jt],["Determiner",jt],["Adverb",Or],["Pronoun",Or],["Value",jt],["Ordinal",jt],["Modal",Or],["Superlative",jt],["Demonym",jt],["Honorific","Person"]],leftWords:[["i",Or],["first",jt],["it",Or],["there",Or],["not",Or],["because",jt],["if",jt],["but",jt],["who",Or],["this",jt],["his",jt],["when",jt],["you",Or],["very","Adjective"],["old",jt],["never",Or],["before",jt],["a",jt],["the",jt],["been",Or]],rightTags:[["Copula",jt],["PastTense",jt],["Conjunction",jt],["Modal",jt]],rightWords:[["there",Or],["me",Or],["man","Adjective"],["him",Or],["it",Or],["were",jt],["took",jt],["himself",Or],["went",jt],["who",jt],["jr","Person"]]},to={Comparative:{fwd:"3:ser,ier¦1er:h,t,f,l,n¦1r:e¦2er:ss,or,om",both:"3er:ver,ear,alm¦3ner:hin¦3ter:lat¦2mer:im¦2er:ng,rm,mb¦2ber:ib¦2ger:ig¦1er:w,p,k,d¦ier:y",rev:"1:tter,yer¦2:uer,ver,ffer,oner,eler,ller,iler,ster,cer,uler,sher,ener,gher,aner,adder,nter,eter,rter,hter,rner,fter¦3:oser,ooler,eafer,user,airer,bler,maler,tler,eater,uger,rger,ainer,urer,ealer,icher,pler,emner,icter,nser,iser¦4:arser,viner,ucher,rosser,somer,ndomer,moter,oother,uarer,hiter¦5:nuiner,esser,emier¦ar:urther",ex:"worse:bad¦better:good¦4er:fair,gray,poor¦1urther:far¦3ter:fat,hot,wet¦3der:mad,sad¦3er:shy,fun¦4der:glad¦:¦4r:cute,dire,fake,fine,free,lame,late,pale,rare,ripe,rude,safe,sore,tame,wide¦5r:eerie,stale"},Gerund:{fwd:"1:nning,tting,rring,pping,eing,mming,gging,dding,bbing,kking¦2:eking,oling,eling,eming¦3:velling,siting,uiting,fiting,loting,geting,ialing,celling¦4:graming",both:"1:aing,iing,fing,xing,ying,oing,hing,wing¦2:tzing,rping,izzing,bting,mning,sping,wling,rling,wding,rbing,uping,lming,wning,mping,oning,lting,mbing,lking,fting,hting,sking,gning,pting,cking,ening,nking,iling,eping,ering,rting,rming,cting,lping,ssing,nting,nding,lding,sting,rning,rding,rking¦3:belling,siping,toming,yaking,uaking,oaning,auling,ooping,aiding,naping,euring,tolling,uzzing,ganing,haning,ualing,halling,iasing,auding,ieting,ceting,ouling,voring,ralling,garing,joring,oaming,oaking,roring,nelling,ooring,uelling,eaming,ooding,eaping,eeting,ooting,ooming,xiting,keting,ooking,ulling,airing,oaring,biting,outing,oiting,earing,naling,oading,eeding,ouring,eaking,aiming,illing,oining,eaning,onging,ealing,aining,eading¦4:thoming,melling,aboring,ivoting,weating,dfilling,onoring,eriting,imiting,tialling,rgining,otoring,linging,winging,lleting,louding,spelling,mpelling,heating,feating,opelling,choring,welling,ymaking,ctoring,calling,peating,iloring,laiting,utoring,uditing,mmaking,loating,iciting,waiting,mbating,voiding,otalling,nsoring,nselling,ocusing,itoring,eloping¦5:rselling,umpeting,atrolling,treating,tselling,rpreting,pringing,ummeting,ossoming,elmaking,eselling,rediting,totyping,onmaking,rfeiting,ntrolling¦5e:chmaking,dkeeping,severing,erouting,ecreting,ephoning,uthoring,ravening,reathing,pediting,erfering,eotyping,fringing,entoring,ombining,ompeting¦4e:emaking,eething,twining,rruling,chuting,xciting,rseding,scoping,edoring,pinging,lunging,agining,craping,pleting,eleting,nciting,nfining,ncoding,tponing,ecoding,writing,esaling,nvening,gnoring,evoting,mpeding,rvening,dhering,mpiling,storing,nviting,ploring¦3e:tining,nuring,saking,miring,haling,ceding,xuding,rining,nuting,laring,caring,miling,riding,hoking,piring,lading,curing,uading,noting,taping,futing,paring,hading,loding,siring,guring,vading,voking,during,niting,laning,caping,luting,muting,ruding,ciding,juring,laming,caling,hining,uoting,liding,ciling,duling,tuting,puting,cuting,coring,uiding,tiring,turing,siding,rading,enging,haping,buting,lining,taking,anging,haring,uiring,coming,mining,moting,suring,viding,luding¦2e:tring,zling,uging,oging,gling,iging,vring,fling,lging,obing,psing,pling,ubing,cling,dling,wsing,iking,rsing,dging,kling,ysing,tling,rging,eging,nsing,uning,osing,uming,using,ibing,bling,aging,ising,asing,ating¦2ie:rlying¦1e:zing,uing,cing,ving",rev:"ying:ie¦1ing:se,ke,te,we,ne,re,de,pe,me,le,c,he¦2ing:ll,ng,dd,ee,ye,oe,rg,us¦2ning:un¦2ging:og,ag,ug,ig,eg¦2ming:um¦2bing:ub,ab,eb,ob¦3ning:lan,can,hin,pin,win¦3ring:cur,lur,tir,tar,pur,car¦3ing:ait,del,eel,fin,eat,oat,eem,lel,ool,ein,uin¦3ping:rop,rap,top,uip,wap,hip,hop,lap,rip,cap¦3ming:tem,wim,rim,kim,lim¦3ting:mat,cut,pot,lit,lot,hat,set,pit,put¦3ding:hed,bed,bid¦3king:rek¦3ling:cil,pel¦3bing:rib¦4ning:egin¦4ing:isit,ruit,ilot,nsit,dget,rkel,ival,rcel¦4ring:efer,nfer¦4ting:rmit,mmit,ysit,dmit,emit,bmit,tfit,gret¦4ling:evel,xcel,ivel¦4ding:hred¦5ing:arget,posit,rofit¦5ring:nsfer¦5ting:nsmit,orget,cquit¦5ling:ancel,istil",ex:"3:adding,eating,aiming,aiding,airing,outing,gassing,setting,getting,putting,cutting,winning,sitting,betting,mapping,tapping,letting,bidding,hitting,tanning,netting,popping,fitting,capping,lapping,barring,banning,vetting,topping,rotting,tipping,potting,wetting,pitting,dipping,budding,hemming,pinning,jetting,kidding,padding,podding,sipping,wedding,bedding,donning,warring,penning,gutting,cueing,wadding,petting,ripping,napping,matting,tinning,binning,dimming,hopping,mopping,nodding,panning,rapping,ridding,sinning¦4:selling,falling,calling,waiting,editing,telling,rolling,heating,boating,hanging,beating,coating,singing,tolling,felling,polling,discing,seating,voiding,gelling,yelling,baiting,reining,ruining,seeking,spanning,stepping,knitting,emitting,slipping,quitting,dialing,omitting,clipping,shutting,skinning,abutting,flipping,trotting,cramming,fretting,suiting¦5:bringing,treating,spelling,stalling,trolling,expelling,rivaling,wringing,deterring,singeing,befitting,refitting¦6:enrolling,distilling,scrolling,strolling,caucusing,travelling¦7:installing,redefining,stencilling,recharging,overeating,benefiting,unraveling,programing¦9:reprogramming¦is:being¦2e:using,aging,owing¦3e:making,taking,coming,noting,hiring,filing,coding,citing,doping,baking,coping,hoping,lading,caring,naming,voting,riding,mining,curing,lining,ruling,typing,boring,dining,firing,hiding,piling,taping,waning,baling,boning,faring,honing,wiping,luring,timing,wading,piping,fading,biting,zoning,daring,waking,gaming,raking,ceding,tiring,coking,wining,joking,paring,gaping,poking,pining,coring,liming,toting,roping,wiring,aching¦4e:writing,storing,eroding,framing,smoking,tasting,wasting,phoning,shaking,abiding,braking,flaking,pasting,priming,shoring,sloping,withing,hinging¦5e:defining,refining,renaming,swathing,fringing,reciting¦1ie:dying,tying,lying,vying¦7e:sunbathing"},Participle:{fwd:"1:mt¦2:llen¦3:iven,aken¦:ne¦y:in",both:"1:wn¦2:me,aten¦3:seen,bidden,isen¦4:roven,asten¦3l:pilt¦3d:uilt¦2e:itten¦1im:wum¦1eak:poken¦1ine:hone¦1ose:osen¦1in:gun¦1ake:woken¦ear:orn¦eal:olen¦eeze:ozen¦et:otten¦ink:unk¦ing:ung",rev:"2:un¦oken:eak¦ought:eek¦oven:eave¦1ne:o¦1own:ly¦1den:de¦1in:ay¦2t:am¦2n:ee¦3en:all¦4n:rive,sake,take¦5n:rgive",ex:"2:been¦3:seen,run¦4:given,taken¦5:shaken¦2eak:broken¦1ive:dove¦2y:flown¦3e:hidden,ridden¦1eek:sought¦1ake:woken¦1eave:woven"},PastTense:{fwd:"1:tted,wed,gged,nned,een,rred,pped,yed,bbed,oed,dded,rd,wn,mmed¦2:eed,nded,et,hted,st,oled,ut,emed,eled,lded,ken,rt,nked,apt,ant,eped,eked¦3:eared,eat,eaded,nelled,ealt,eeded,ooted,eaked,eaned,eeted,mited,bid,uit,ead,uited,ealed,geted,velled,ialed,belled¦4:ebuted,hined,comed¦y:ied¦ome:ame¦ear:ore¦ind:ound¦ing:ung,ang¦ep:pt¦ink:ank,unk¦ig:ug¦all:ell¦ee:aw¦ive:ave¦eeze:oze¦old:eld¦ave:ft¦ake:ook¦ell:old¦ite:ote¦ide:ode¦ine:one¦in:un,on¦eal:ole¦im:am¦ie:ay¦and:ood¦1ise:rose¦1eak:roke¦1ing:rought¦1ive:rove¦1el:elt¦1id:bade¦1et:got¦1y:aid¦1it:sat¦3e:lid¦3d:pent",both:"1:aed,fed,xed,hed¦2:sged,xted,wled,rped,lked,kied,lmed,lped,uped,bted,rbed,rked,wned,rled,mped,fted,mned,mbed,zzed,omed,ened,cked,gned,lted,sked,ued,zed,nted,ered,rted,rmed,ced,sted,rned,ssed,rded,pted,ved,cted¦3:cled,eined,siped,ooned,uked,ymed,jored,ouded,ioted,oaned,lged,asped,iged,mured,oided,eiled,yped,taled,moned,yled,lit,kled,oaked,gled,naled,fled,uined,oared,valled,koned,soned,aided,obed,ibed,meted,nicked,rored,micked,keted,vred,ooped,oaded,rited,aired,auled,filled,ouled,ooded,ceted,tolled,oited,bited,aped,tled,vored,dled,eamed,nsed,rsed,sited,owded,pled,sored,rged,osed,pelled,oured,psed,oated,loned,aimed,illed,eured,tred,ioned,celled,bled,wsed,ooked,oiled,itzed,iked,iased,onged,ased,ailed,uned,umed,ained,auded,nulled,ysed,eged,ised,aged,oined,ated,used,dged,doned¦4:ntied,efited,uaked,caded,fired,roped,halled,roked,himed,culed,tared,lared,tuted,uared,routed,pited,naked,miled,houted,helled,hared,cored,caled,tired,peated,futed,ciled,called,tined,moted,filed,sided,poned,iloted,honed,lleted,huted,ruled,cured,named,preted,vaded,sured,talled,haled,peded,gined,nited,uided,ramed,feited,laked,gured,ctored,unged,pired,cuted,voked,eloped,ralled,rined,coded,icited,vided,uaded,voted,mined,sired,noted,lined,nselled,luted,jured,fided,puted,piled,pared,olored,cided,hoked,enged,tured,geoned,cotted,lamed,uiled,waited,udited,anged,luded,mired,uired,raded¦5:modelled,izzled,eleted,umpeted,ailored,rseded,treated,eduled,ecited,rammed,eceded,atrolled,nitored,basted,twined,itialled,ncited,gnored,ploded,xcited,nrolled,namelled,plored,efeated,redited,ntrolled,nfined,pleted,llided,lcined,eathed,ibuted,lloted,dhered,cceded¦3ad:sled¦2aw:drew¦2ot:hot¦2ke:made¦2ow:hrew,grew¦2ose:hose¦2d:ilt¦2in:egan¦1un:ran¦1ink:hought¦1ick:tuck¦1ike:ruck¦1eak:poke,nuck¦1it:pat¦1o:did¦1ow:new¦1ake:woke¦go:went",rev:"3:rst,hed,hut,cut,set¦4:tbid¦5:dcast,eread,pread,erbid¦ought:uy,eek¦1ied:ny,ly,dy,ry,fy,py,vy,by,ty,cy¦1ung:ling,ting,wing¦1pt:eep¦1ank:rink¦1ore:bear,wear¦1ave:give¦1oze:reeze¦1ound:rind,wind¦1ook:take,hake¦1aw:see¦1old:sell¦1ote:rite¦1ole:teal¦1unk:tink¦1am:wim¦1ay:lie¦1ood:tand¦1eld:hold¦2d:he,ge,re,le,leed,ne,reed,be,ye,lee,pe,we¦2ed:dd,oy,or,ey,gg,rr,us,ew,to¦2ame:ecome,rcome¦2ped:ap¦2ged:ag,og,ug,eg¦2bed:ub,ab,ib,ob¦2lt:neel¦2id:pay¦2ang:pring¦2ove:trive¦2med:um¦2ode:rride¦2at:ysit¦3ted:mit,hat,mat,lat,pot,rot,bat¦3ed:low,end,tow,und,ond,eem,lay,cho,dow,xit,eld,ald,uld,law,lel,eat,oll,ray,ank,fin,oam,out,how,iek,tay,haw,ait,vet,say,cay,bow¦3d:ste,ede,ode,ete,ree,ude,ame,oke,ote,ime,ute,ade¦3red:lur,cur,pur,car¦3ped:hop,rop,uip,rip,lip,tep,top¦3ded:bed,rod,kid¦3ade:orbid¦3led:uel¦3ned:lan,can,kin,pan,tun¦3med:rim,lim¦4ted:quit,llot¦4ed:pear,rrow,rand,lean,mand,anel,pand,reet,link,abel,evel,imit,ceed,ruit,mind,peal,veal,hool,head,pell,well,mell,uell,band,hear,weak¦4led:nnel,qual,ebel,ivel¦4red:nfer,efer,sfer¦4n:sake,trew¦4d:ntee¦4ded:hred¦4ned:rpin¦5ed:light,nceal,right,ndear,arget,hread,eight,rtial,eboot¦5d:edite,nvite¦5ted:egret¦5led:ravel",ex:"2:been,upped¦3:added,aged,aided,aimed,aired,bid,died,dyed,egged,erred,eyed,fit,gassed,hit,lied,owed,pent,pied,tied,used,vied,oiled,outed,banned,barred,bet,canned,cut,dipped,donned,ended,feed,inked,jarred,let,manned,mowed,netted,padded,panned,pitted,popped,potted,put,set,sewn,sowed,tanned,tipped,topped,vowed,weed,bowed,jammed,binned,dimmed,hopped,mopped,nodded,pinned,rigged,sinned,towed,vetted¦4:ached,baked,baled,boned,bored,called,caned,cared,ceded,cited,coded,cored,cubed,cured,dared,dined,edited,exited,faked,fared,filed,fined,fired,fuelled,gamed,gelled,hired,hoped,joked,lined,mined,named,noted,piled,poked,polled,pored,pulled,reaped,roamed,rolled,ruled,seated,shed,sided,timed,tolled,toned,voted,waited,walled,waned,winged,wiped,wired,zoned,yelled,tamed,lubed,roped,faded,mired,caked,honed,banged,culled,heated,raked,welled,banded,beat,cast,cooled,cost,dealt,feared,folded,footed,handed,headed,heard,hurt,knitted,landed,leaked,leapt,linked,meant,minded,molded,neared,needed,peaked,plodded,plotted,pooled,quit,read,rooted,sealed,seeded,seeped,shipped,shunned,skimmed,slammed,sparred,stemmed,stirred,suited,thinned,twinned,swayed,winked,dialed,abutted,blotted,fretted,healed,heeded,peeled,reeled¦5:basted,cheated,equalled,eroded,exiled,focused,opined,pleated,primed,quoted,scouted,shored,sloped,smoked,sniped,spelled,spouted,routed,staked,stored,swelled,tasted,treated,wasted,smelled,dwelled,honored,prided,quelled,eloped,scared,coveted,sweated,breaded,cleared,debuted,deterred,freaked,modeled,pleaded,rebutted,speeded¦6:anchored,defined,endured,impaled,invited,refined,revered,strolled,cringed,recast,thrust,unfolded¦7:authored,combined,competed,conceded,convened,excreted,extruded,redefined,restored,secreted,rescinded,welcomed¦8:expedited,infringed¦9:interfered,intervened,persevered¦10:contravened¦eat:ate¦is:was¦go:went¦are:were¦3d:bent,lent,rent,sent¦3e:bit,fled,hid,lost¦3ed:bled,bred¦2ow:blew,grew¦1uy:bought¦2tch:caught¦1o:did¦1ive:dove,gave¦2aw:drew¦2ed:fed¦2y:flew,laid,paid,said¦1ight:fought¦1et:got¦2ve:had¦1ang:hung¦2ad:led¦2ght:lit¦2ke:made¦2et:met¦1un:ran¦1ise:rose¦1it:sat¦1eek:sought¦1each:taught¦1ake:woke,took¦1eave:wove¦2ise:arose¦1ear:bore,tore,wore¦1ind:bound,found,wound¦2eak:broke¦2ing:brought,wrung¦1ome:came¦2ive:drove¦1ig:dug¦1all:fell¦2el:felt¦4et:forgot¦1old:held¦2ave:left¦1ing:rang,sang¦1ide:rode¦1ink:sank¦1ee:saw¦2ine:shone¦4e:slid¦1ell:sold,told¦4d:spent¦2in:spun¦1in:won"},PresentTense:{fwd:"1:oes¦1ve:as",both:"1:xes¦2:zzes,ches,shes,sses¦3:iases¦2y:llies,plies¦1y:cies,bies,ties,vies,nies,pies,dies,ries,fies¦:s",rev:"1ies:ly¦2es:us,go,do¦3es:cho,eto",ex:"2:does,goes¦3:gasses¦5:focuses¦is:are¦3y:relies¦2y:flies¦2ve:has"},Superlative:{fwd:"1st:e¦1est:l,m,f,s¦1iest:cey¦2est:or,ir¦3est:ver",both:"4:east¦5:hwest¦5lest:erful¦4est:weet,lgar,tter,oung¦4most:uter¦3est:ger,der,rey,iet,ong,ear¦3test:lat¦3most:ner¦2est:pt,ft,nt,ct,rt,ht¦2test:it¦2gest:ig¦1est:b,k,n,p,h,d,w¦iest:y",rev:"1:ttest,nnest,yest¦2:sest,stest,rmest,cest,vest,lmest,olest,ilest,ulest,ssest,imest,uest¦3:rgest,eatest,oorest,plest,allest,urest,iefest,uelest,blest,ugest,amest,yalest,ealest,illest,tlest,itest¦4:cerest,eriest,somest,rmalest,ndomest,motest,uarest,tiffest¦5:leverest,rangest¦ar:urthest¦3ey:riciest",ex:"best:good¦worst:bad¦5est:great¦4est:fast,full,fair,dull¦3test:hot,wet,fat¦4nest:thin¦1urthest:far¦3est:gay,shy,ill¦4test:neat¦4st:late,wide,fine,safe,cute,fake,pale,rare,rude,sore,ripe,dire¦6st:severe"},AdjToNoun:{fwd:"1:tistic,eable,lful,sful,ting,tty¦2:onate,rtable,geous,ced,seful,ctful¦3:ortive,ented¦arity:ear¦y:etic¦fulness:begone¦1ity:re¦1y:tiful,gic¦2ity:ile,imous,ilous,ime¦2ion:ated¦2eness:iving¦2y:trious¦2ation:iring¦2tion:vant¦3ion:ect¦3ce:mant,mantic¦3tion:irable¦3y:est,estic¦3m:mistic,listic¦3ess:ning¦4n:utious¦4on:rative,native,vative,ective¦4ce:erant",both:"1:king,wing¦2:alous,ltuous,oyful,rdous¦3:gorous,ectable,werful,amatic¦4:oised,usical,agical,raceful,ocused,lined,ightful¦5ness:stful,lding,itous,nuous,ulous,otous,nable,gious,ayful,rvous,ntous,lsive,peful,entle,ciful,osive,leful,isive,ncise,reful,mious¦5ty:ivacious¦5ties:ubtle¦5ce:ilient,adiant,atient¦5cy:icient¦5sm:gmatic¦5on:sessive,dictive¦5ity:pular,sonal,eative,entic¦5sity:uminous¦5ism:conic¦5nce:mperate¦5ility:mitable¦5ment:xcited¦5n:bitious¦4cy:brant,etent,curate¦4ility:erable,acable,icable,ptable¦4ty:nacious,aive,oyal,dacious¦4n:icious¦4ce:vient,erent,stent,ndent,dient,quent,ident¦4ness:adic,ound,hing,pant,sant,oing,oist,tute¦4icity:imple¦4ment:fined,mused¦4ism:otic¦4ry:dantic¦4ity:tund,eral¦4edness:hand¦4on:uitive¦4lity:pitable¦4sm:eroic,namic¦4sity:nerous¦3th:arm¦3ility:pable,bable,dable,iable¦3cy:hant,nant,icate¦3ness:red,hin,nse,ict,iet,ite,oud,ind,ied,rce¦3ion:lute¦3ity:ual,gal,volous,ial¦3ce:sent,fensive,lant,gant,gent,lent,dant¦3on:asive¦3m:fist,sistic,iastic¦3y:terious,xurious,ronic,tastic¦3ur:amorous¦3e:tunate¦3ation:mined¦3sy:rteous¦3ty:ain¦3ry:ave¦3ment:azed¦2ness:de,on,ue,rn,ur,ft,rp,pe,om,ge,rd,od,ay,ss,er,ll,oy,ap,ht,ld,ad,rt¦2inousness:umous¦2ity:neous,ene,id,ane¦2cy:bate,late¦2ation:ized¦2ility:oble,ible¦2y:odic¦2e:oving,aring¦2s:ost¦2itude:pt¦2dom:ee¦2ance:uring¦2tion:reet¦2ion:oted¦2sion:ending¦2liness:an¦2or:rdent¦1th:ung¦1e:uable¦1ness:w,h,k,f¦1ility:mble¦1or:vent¦1ement:ging¦1tiquity:ncient¦1ment:hed¦verty:or¦ength:ong¦eat:ot¦pth:ep¦iness:y",rev:"",ex:"5:forceful,humorous¦8:charismatic¦13:understanding¦5ity:active¦11ness:adventurous,inquisitive,resourceful¦8on:aggressive,automatic,perceptive¦7ness:amorous,fatuous,furtive,ominous,serious¦5ness:ample,sweet¦12ness:apprehensive,cantankerous,contemptuous,ostentatious¦13ness:argumentative,conscientious¦9ness:assertive,facetious,imperious,inventive,oblivious,rapacious,receptive,seditious,whimsical¦10ness:attractive,expressive,impressive,loquacious,salubrious,thoughtful¦3edom:boring¦4ness:calm,fast,keen,tame¦8ness:cheerful,gracious,specious,spurious,timorous,unctuous¦5sity:curious¦9ion:deliberate¦8ion:desperate¦6e:expensive¦7ce:fragrant¦3y:furious¦9ility:ineluctable¦6ism:mystical¦8ity:physical,proactive,sensitive,vertical¦5cy:pliant¦7ity:positive¦9ity:practical¦12ism:professional¦6ce:prudent¦3ness:red¦6cy:vagrant¦3dom:wise"}},eT=function(e,t={}){return t.hasOwnProperty(e)?t[e]:null},tT=function(e,t=[]){for(let r=0;r<t.length;r+=1)if(e.endsWith(t[r]))return e;return null},rT=function(e,t,r={}){t=t||{};let n=e.length-1;for(let a=n;a>=1;a-=1){let i=e.length-a,o=e.substring(i,e.length);if(t.hasOwnProperty(o)===!0)return e.slice(0,i)+t[o];if(r.hasOwnProperty(o)===!0)return e.slice(0,i)+r[o]}return t.hasOwnProperty("")?e+=t[""]:r.hasOwnProperty("")?e+=r[""]:null},pn=function(e="",t={}){let r=eT(e,t.ex);return r=r||tT(e,t.same),r=r||rT(e,t.fwd,t.both),r=r||e,r},fp=function(e){return Object.entries(e).reduce((t,r)=>(t[r[1]]=r[0],t),{})},ts=function(e={}){return{reversed:!0,both:fp(e.both),ex:fp(e.ex),fwd:e.rev||{}}},mp=/^([0-9]+)/,nT=function(e){let t={};return e.split("¦").forEach(r=>{let[n,a]=r.split(":");a=(a||"").split(","),a.forEach(i=>{t[i]=n})}),t},aT=function(e="",t=""){t=String(t);let r=t.match(mp);if(r===null)return t;let n=Number(r[1])||0;return e.substring(0,n)+t.replace(mp,"")},Pu=function(e){let t=nT(e);return Object.keys(t).reduce((r,n)=>(r[n]=aT(n,t[n]),r),{})},ro=function(e={}){return typeof e=="string"&&(e=JSON.parse(e)),e.fwd=Pu(e.fwd||""),e.both=Pu(e.both||""),e.rev=Pu(e.rev||""),e.ex=Pu(e.ex||""),e},Sw=ro(to.PastTense),Mw=ro(to.PresentTense),Tw=ro(to.Gerund),Fw=ro(to.Participle),iT=ts(Sw),oT=ts(Mw),sT=ts(Tw),uT=ts(Fw),Pw=ro(to.Comparative),kw=ro(to.Superlative),lT=ts(Pw),cT=ts(kw),fT=ro(to.AdjToNoun),Ow={fromPast:Sw,fromPresent:Mw,fromGerund:Tw,fromParticiple:Fw,toPast:iT,toPresent:oT,toGerund:sT,toParticiple:uT,toComparative:Pw,toSuperlative:kw,fromComparative:lT,fromSuperlative:cT,adjToNoun:fT},mT=[[/^[\w.]+@[\w.]+\.[a-z]{2,3}$/,"Email"],[/^(https?:\/\/|www\.)+\w+\.[a-z]{2,3}/,"Url","http.."],[/^[a-z0-9./].+\.(com|net|gov|org|ly|edu|info|biz|dev|ru|jp|de|in|uk|br|io|ai)/,"Url",".com"],[/^[PMCE]ST$/,"Timezone","EST"],[/^ma?c'[a-z]{3}/,"LastName","mc'neil"],[/^o'[a-z]{3}/,"LastName","o'connor"],[/^ma?cd[aeiou][a-z]{3}/,"LastName","mcdonald"],[/^(lol)+[sz]$/,"Expression","lol"],[/^wo{2,}a*h?$/,"Expression","wooah"],[/^(hee?){2,}h?$/,"Expression","hehe"],[/^(un|de|re)\\-[a-z\u00C0-\u00FF]{2}/,"Verb","un-vite"],[/^(m|k|cm|km)\/(s|h|hr)$/,"Unit","5 k/m"],[/^(ug|ng|mg)\/(l|m3|ft3)$/,"Unit","ug/L"],[new RegExp("[^:/]\\/\\p{Letter}","u"),"SlashedTerm","love/hate"]],dT=[[new RegExp("^#[\\p{Number}_]*\\p{Letter}","u"),"HashTag"],[/^@\w{2,}$/,"AtMention"],[/^([A-Z]\.){2}[A-Z]?/i,["Acronym","Noun"],"F.B.I"],[/.{3}[lkmnp]in['‘’‛‵′`´]$/,"Gerund","chillin'"],[/.{4}s['‘’‛‵′`´]$/,"Possessive","flanders'"],[/^[\p{Emoji_Presentation}\p{Extended_Pictographic}]/u,"Emoji","emoji-class"]],hT=[[/^@1?[0-9](am|pm)$/i,"Time","3pm"],[/^@1?[0-9]:[0-9]{2}(am|pm)?$/i,"Time","3:30pm"],[/^'[0-9]{2}$/,"Year"],[/^[012]?[0-9](:[0-5][0-9])(:[0-5][0-9])$/,"Time","3:12:31"],[/^[012]?[0-9](:[0-5][0-9])?(:[0-5][0-9])? ?(am|pm)$/i,"Time","1:12pm"],[/^[012]?[0-9](:[0-5][0-9])(:[0-5][0-9])? ?(am|pm)?$/i,"Time","1:12:31pm"],[/^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}/i,"Date","iso-date"],[/^[0-9]{1,4}-[0-9]{1,2}-[0-9]{1,4}$/,"Date","iso-dash"],[/^[0-9]{1,4}\/[0-9]{1,2}\/([0-9]{4}|[0-9]{2})$/,"Date","iso-slash"],[/^[0-9]{1,4}\.[0-9]{1,2}\.[0-9]{1,4}$/,"Date","iso-dot"],[/^[0-9]{1,4}-[a-z]{2,9}-[0-9]{1,4}$/i,"Date","12-dec-2019"],[/^utc ?[+-]?[0-9]+$/,"Timezone","utc-9"],[/^(gmt|utc)[+-][0-9]{1,2}$/i,"Timezone","gmt-3"],[/^[0-9]{3}-[0-9]{4}$/,"PhoneNumber","421-0029"],[/^(\+?[0-9][ -])?[0-9]{3}[ -]?[0-9]{3}-[0-9]{4}$/,"PhoneNumber","1-800-"],[new RegExp("^[-+]?\\p{Currency_Symbol}[-+]?[0-9]+(,[0-9]{3})*(\\.[0-9]+)?([kmb]|bn)?\\+?$","u"),["Money","Value"],"$5.30"],[new RegExp("^[-+]?[0-9]+(,[0-9]{3})*(\\.[0-9]+)?\\p{Currency_Symbol}\\+?$","u"),["Money","Value"],"5.30£"],[/^[-+]?[$£]?[0-9]([0-9,.])+(usd|eur|jpy|gbp|cad|aud|chf|cny|hkd|nzd|kr|rub)$/i,["Money","Value"],"$400usd"],[/^[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?\+?$/,["Cardinal","NumericValue"],"5,999"],[/^[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?(st|nd|rd|r?th)$/,["Ordinal","NumericValue"],"53rd"],[/^\.[0-9]+\+?$/,["Cardinal","NumericValue"],".73th"],[/^[-+]?[0-9]+(,[0-9]{3})*(\.[0-9]+)?%\+?$/,["Percent","Cardinal","NumericValue"],"-4%"],[/^\.[0-9]+%$/,["Percent","Cardinal","NumericValue"],".3%"],[/^[0-9]{1,4}\/[0-9]{1,4}(st|nd|rd|th)?s?$/,["Fraction","NumericValue"],"2/3rds"],[/^[0-9.]{1,3}[a-z]{0,2}[-–—][0-9]{1,3}[a-z]{0,2}$/,["Value","NumberRange"],"3-4"],[/^[0-9]{1,2}(:[0-9][0-9])?(am|pm)? ?[-–—] ?[0-9]{1,2}(:[0-9][0-9])?(am|pm)$/,["Time","NumberRange"],"3-4pm"],[/^[0-9.]+([a-z°]{1,4})$/,"NumericValue","9km"]],pT=["academy","administration","agence","agences","agencies","agency","airlines","airways","army","assoc","associates","association","assurance","authority","autorite","aviation","bank","banque","board","boys","brands","brewery","brotherhood","brothers","bureau","cafe","co","caisse","capital","care","cathedral","center","centre","chemicals","choir","chronicle","church","circus","clinic","clinique","club","co","coalition","coffee","collective","college","commission","committee","communications","community","company","comprehensive","computers","confederation","conference","conseil","consulting","containers","corporation","corps","corp","council","crew","data","departement","department","departments","design","development","directorate","division","drilling","education","eglise","electric","electricity","energy","ensemble","enterprise","enterprises","entertainment","estate","etat","faculty","faction","federation","financial","fm","foundation","fund","gas","gazette","girls","government","group","guild","herald","holdings","hospital","hotel","hotels","inc","industries","institut","institute","institutes","insurance","international","interstate","investment","investments","investors","journal","laboratory","labs","llc","ltd","limited","machines","magazine","management","marine","marketing","markets","media","memorial","ministere","ministry","military","mobile","motor","motors","musee","museum","news","observatory","office","oil","optical","orchestra","organization","partners","partnership","petrol","petroleum","pharmacare","pharmaceutical","pharmaceuticals","pizza","plc","police","politburo","polytechnic","post","power","press","productions","quartet","radio","reserve","resources","restaurant","restaurants","savings","school","securities","service","services","societe","subsidiary","society","sons","subcommittee","syndicat","systems","telecommunications","telegraph","television","times","tribunal","tv","union","university","utilities","workers"].reduce((e,t)=>(e[t]=!0,e),{}),gT=["atoll","basin","bay","beach","bluff","bog","camp","canyon","canyons","cape","cave","caves","cliffs","coast","cove","coves","crater","crossing","creek","desert","dune","dunes","downs","estates","escarpment","estuary","falls","fjord","fjords","forest","forests","glacier","gorge","gorges","grove","gulf","gully","highland","heights","hollow","hill","hills","inlet","island","islands","isthmus","junction","knoll","lagoon","lake","lakeshore","marsh","marshes","mount","mountain","mountains","narrows","peninsula","plains","plateau","pond","rapids","ravine","reef","reefs","ridge","river","rivers","sandhill","shoal","shore","shoreline","shores","strait","straits","springs","stream","swamp","tombolo","trail","trails","trench","valley","vallies","village","volcano","waterfall","watershed","wetland","woods","acres","burough","county","district","municipality","prefecture","province","region","reservation","state","territory","borough","metropolis","downtown","uptown","midtown","city","town","township","hamlet","country","kingdom","enclave","neighbourhood","neighborhood","kingdom","ward","zone","airport","amphitheater","arch","arena","auditorium","bar","barn","basilica","battlefield","bridge","building","castle","centre","coliseum","cineplex","complex","dam","farm","field","fort","garden","gardens","gymnasium","hall","house","levee","library","manor","memorial","monument","museum","gallery","palace","pillar","pits","plantation","playhouse","quarry","sportsfield","sportsplex","stadium","terrace","terraces","theater","tower","park","parks","site","ranch","raceway","sportsplex","ave","st","street","rd","road","lane","landing","crescent","cr","way","tr","terrace","avenue"].reduce((e,t)=>(e[t]=!0,e),{}),ku=[[/([^v])ies$/i,"$1y"],[/(ise)s$/i,"$1"],[/(kn|[^o]l|w)ives$/i,"$1ife"],[/^((?:ca|e|ha|(?:our|them|your)?se|she|wo)l|lea|loa|shea|thie)ves$/i,"$1f"],[/^(dwar|handkerchie|hoo|scar|whar)ves$/i,"$1f"],[/(antenn|formul|nebul|vertebr|vit)ae$/i,"$1a"],[/(octop|vir|radi|nucle|fung|cact|stimul)(i)$/i,"$1us"],[/(buffal|tomat|tornad)(oes)$/i,"$1o"],[/(ause)s$/i,"$1"],[/(ease)s$/i,"$1"],[/(ious)es$/i,"$1"],[/(ouse)s$/i,"$1"],[/(ose)s$/i,"$1"],[/(..ase)s$/i,"$1"],[/(..[aeiu]s)es$/i,"$1"],[/(vert|ind|cort)(ices)$/i,"$1ex"],[/(matr|append)(ices)$/i,"$1ix"],[/([xo]|ch|ss|sh)es$/i,"$1"],[/men$/i,"man"],[/(n)ews$/i,"$1ews"],[/([ti])a$/i,"$1um"],[/([^aeiouy]|qu)ies$/i,"$1y"],[/(s)eries$/i,"$1eries"],[/(m)ovies$/i,"$1ovie"],[/(cris|ax|test)es$/i,"$1is"],[/(alias|status)es$/i,"$1"],[/(ss)$/i,"$1"],[/(ic)s$/i,"$1"],[/s$/i,""]],vT=function(e){return Object.keys(e).reduce((t,r)=>(t[e[r]]=r,t),{})},$w=function(e,t){const{irregularPlurals:r}=t.two,n=vT(r);if(n.hasOwnProperty(e))return n[e];for(let a=0;a<ku.length;a++)if(ku[a][0].test(e)===!0)return e=e.replace(ku[a][0],ku[a][1]),e;return e},yT=function(e,t){const r=[e],n=wc(e,t);n!==e&&r.push(n);const a=$w(e,t);return a!==e&&r.push(a),r},bT={toPlural:wc,toSingular:$w,all:yT};let Hi={Gerund:["ing"],Actor:["erer"],Infinitive:["ate","ize","tion","rify","then","ress","ify","age","nce","ect","ise","ine","ish","ace","ash","ure","tch","end","ack","and","ute","ade","ock","ite","ase","ose","use","ive","int","nge","lay","est","ain","ant","ent","eed","er","le","unk","ung","upt","en"],PastTense:["ept","ed","lt","nt","ew","ld"],PresentTense:["rks","cks","nks","ngs","mps","tes","zes","ers","les","acks","ends","ands","ocks","lays","eads","lls","els","ils","ows","nds","ays","ams","ars","ops","ffs","als","urs","lds","ews","ips","es","ts","ns"],Participle:["ken","wn"]};Hi=Object.keys(Hi).reduce((e,t)=>(Hi[t].forEach(r=>e[r]=t),e),{});const Bw=function(e){const t=e.substring(e.length-3);if(Hi.hasOwnProperty(t)===!0)return Hi[t];const r=e.substring(e.length-2);return Hi.hasOwnProperty(r)===!0?Hi[r]:e.substring(e.length-1)==="s"?"PresentTense":null},wT=function(e,t){let r="",n={};t.one&&t.one.prefixes&&(n=t.one.prefixes);let[a,i]=e.split(/ /);return i&&n[a]===!0&&(r=a,a=i,i=""),{prefix:r,verb:a,particle:i}},dp={are:"be",were:"be",been:"be",is:"be",am:"be",was:"be",be:"be",being:"be"},lm=function(e,t,r){const{fromPast:n,fromPresent:a,fromGerund:i,fromParticiple:o}=t.two.models,{prefix:s,verb:u,particle:l}=wT(e,t);let c="";if(r||(r=Bw(e)),dp.hasOwnProperty(e))c=dp[e];else if(r==="Participle")c=pn(u,o);else if(r==="PastTense")c=pn(u,n);else if(r==="PresentTense")c=pn(u,a);else if(r==="Gerund")c=pn(u,i);else return e;return l&&(c+=" "+l),s&&(c=s+" "+c),c},xT=e=>/ /.test(e)?e.split(/ /):[e,""],hd=function(e,t){const{toPast:r,toPresent:n,toGerund:a,toParticiple:i}=t.two.models;if(e==="be")return{Infinitive:e,Gerund:"being",PastTense:"was",PresentTense:"is"};const[o,s]=xT(e),u={Infinitive:o,PastTense:pn(o,r),PresentTense:pn(o,n),Gerund:pn(o,a),FutureTense:"will "+o};let l=pn(o,i);if(l!==e&&l!==u.PastTense){const c=t.one.lexicon||{};(c[l]==="Participle"||c[l]==="Adjective")&&(e==="play"&&(l="played"),u.Participle=l)}return s&&Object.keys(u).forEach(c=>{u[c]+=" "+s}),u},DT=function(e,t){const r=hd(e,t);return delete r.FutureTense,Object.values(r).filter(n=>n)},NT={toInfinitive:lm,conjugate:hd,all:DT},pd=function(e,t){const r=t.two.models.toSuperlative;return pn(e,r)},gd=function(e,t){const r=t.two.models.toComparative;return pn(e,r)},AT=function(e,t){const r=t.two.models.fromComparative;return pn(e,r)},CT=function(e,t){const r=t.two.models.fromSuperlative;return pn(e,r)},ET=function(e,t){const r=t.two.models.adjToNoun;return pn(e,r)},_w=function(e="",t=[]){const r=e.length,n=r<=6?r-1:6;for(let a=n;a>=1;a-=1){const i=e.substring(r-a,e.length);if(t[i.length].hasOwnProperty(i)===!0){const o=e.slice(0,r-a),s=t[i.length][i];return o+s}}return null},vt="ically",ST=new Set(["analyt"+vt,"chem"+vt,"class"+vt,"clin"+vt,"crit"+vt,"ecolog"+vt,"electr"+vt,"empir"+vt,"frant"+vt,"grammat"+vt,"ident"+vt,"ideolog"+vt,"log"+vt,"mag"+vt,"mathemat"+vt,"mechan"+vt,"med"+vt,"method"+vt,"method"+vt,"mus"+vt,"phys"+vt,"phys"+vt,"polit"+vt,"pract"+vt,"rad"+vt,"satir"+vt,"statist"+vt,"techn"+vt,"technolog"+vt,"theoret"+vt,"typ"+vt,"vert"+vt,"whims"+vt]),MT=[null,{},{ly:""},{ily:"y",bly:"ble",ply:"ple"},{ally:"al",rply:"rp"},{ually:"ual",ially:"ial",cally:"cal",eally:"eal",rally:"ral",nally:"nal",mally:"mal",eeply:"eep",eaply:"eap"},{ically:"ic"}],TT=new Set(["early","only","hourly","daily","weekly","monthly","yearly","mostly","duly","unduly","especially","undoubtedly","conversely","namely","exceedingly","presumably","accordingly","overly","best","latter","little","long","low"]),hp={wholly:"whole",fully:"full",truly:"true",gently:"gentle",singly:"single",customarily:"customary",idly:"idle",publically:"public",quickly:"quick",superbly:"superb",cynically:"cynical",well:"good"},FT=function(e){return e.endsWith("ly")?ST.has(e)?e.replace(/ically/,"ical"):TT.has(e)?null:hp.hasOwnProperty(e)?hp[e]:_w(e,MT)||e:null},PT=[null,{y:"ily"},{ly:"ly",ic:"ically"},{ial:"ially",ual:"ually",tle:"tly",ble:"bly",ple:"ply",ary:"arily"},{},{},{}],pp={cool:"cooly",whole:"wholly",full:"fully",good:"well",idle:"idly",public:"publicly",single:"singly",special:"especially"},Iw=function(e){if(pp.hasOwnProperty(e))return pp[e];let t=_w(e,PT);return t||(t=e+"ly"),t},kT=function(e,t){let r=[e];return r.push(pd(e,t)),r.push(gd(e,t)),r.push(Iw(e)),r=r.filter(n=>n),r=new Set(r),Array.from(r)},OT={toSuperlative:pd,toComparative:gd,toAdverb:Iw,toNoun:ET,fromAdverb:FT,fromSuperlative:CT,fromComparative:AT,all:kT},$T={noun:bT,verb:NT,adjective:OT},gp={Singular:(e,t,r,n)=>{const a=n.one.lexicon,i=r.two.transform.noun.toPlural(e,n);a[i]||(t[i]=t[i]||"Plural")},Actor:(e,t,r,n)=>{const a=n.one.lexicon,i=r.two.transform.noun.toPlural(e,n);a[i]||(t[i]=t[i]||["Plural","Actor"])},Comparable:(e,t,r,n)=>{const a=n.one.lexicon,{toSuperlative:i,toComparative:o}=r.two.transform.adjective,s=i(e,n);a[s]||(t[s]=t[s]||"Superlative");const u=o(e,n);a[u]||(t[u]=t[u]||"Comparative"),t[e]="Adjective"},Demonym:(e,t,r,n)=>{const a=r.two.transform.noun.toPlural(e,n);t[a]=t[a]||["Demonym","Plural"]},Infinitive:(e,t,r,n)=>{const a=n.one.lexicon,i=r.two.transform.verb.conjugate(e,n);Object.entries(i).forEach(o=>{!a[o[1]]&&!t[o[1]]&&o[0]!=="FutureTense"&&(t[o[1]]=o[0])})},PhrasalVerb:(e,t,r,n)=>{const a=n.one.lexicon;t[e]=["PhrasalVerb","Infinitive"];const i=n.one._multiCache,[o,s]=e.split(" ");a[o]||(t[o]=t[o]||"Infinitive");const u=r.two.transform.verb.conjugate(o,n);delete u.FutureTense,Object.entries(u).forEach(l=>{if(l[0]==="Actor"||l[1]==="")return;!t[l[1]]&&!a[l[1]]&&(t[l[1]]=l[0]),i[l[1]]=2;const c=l[1]+" "+s;t[c]=t[c]||[l[0],"PhrasalVerb"]})},Multiple:(e,t)=>{t[e]=["Multiple","Cardinal"],t[e+"th"]=["Multiple","Ordinal"],t[e+"ths"]=["Multiple","Fraction"]},Cardinal:(e,t)=>{t[e]=["TextValue","Cardinal"]},Ordinal:(e,t)=>{t[e]=["TextValue","Ordinal"],t[e+"s"]=["TextValue","Fraction"]},Place:(e,t)=>{t[e]=["Place","ProperNoun"]},Region:(e,t)=>{t[e]=["Region","ProperNoun"]}},BT=function(e,t){const{methods:r,model:n}=t,a={},i={};return Object.keys(e).forEach(o=>{const s=e[o];o=o.toLowerCase().trim(),o=o.replace(/'s\b/,"");const u=o.split(/ /);u.length>1&&(i[u[0]]===void 0||u.length>i[u[0]])&&(i[u[0]]=u.length),gp.hasOwnProperty(s)===!0&&gp[s](o,a,r,n),a[o]=a[o]||s}),delete a[""],delete a[null],delete a[" "],{lex:a,_multi:i}},_T=function(e,t){const r=/^[0-9]+$/,n=e[t];if(!n)return!1;const a=new Set(["may","april","august","jan"]);if(n.normal==="like"||a.has(n.normal)||n.tags.has("Place")||n.tags.has("Date"))return!1;if(e[t-1]){const o=e[t-1];if(o.tags.has("Date")||a.has(o.normal)||o.tags.has("Adjective")||n.tags.has("Adjective"))return!1}const i=n.normal;return!((i.length===1||i.length===2||i.length===4)&&r.test(i))},IT=function(e){const t=/[,:;]/,r=[];return e.forEach(n=>{let a=0;n.forEach((i,o)=>{t.test(i.post)&&_T(n,o+1)&&(r.push(n.slice(a,o+1)),a=o+1)}),a<n.length&&r.push(n.slice(a,n.length))}),r},vp={e:["mice","louse","antennae","formulae","nebulae","vertebrae","vitae"],i:["tia","octopi","viri","radii","nuclei","fungi","cacti","stimuli"],n:["men"],t:["feet"]},zT=new Set(["israelis","menus","logos"]),jT=["bus","mas","was","ias","xas","vas","cis","lis","nis","ois","ris","sis","tis","xis","aus","cus","eus","fus","gus","ius","lus","nus","das","ous","pus","rus","sus","tus","xus","aos","igos","ados","ogos","'s","ss"],zw=function(e){if(!e||e.length<=3)return!1;if(zT.has(e))return!0;const t=e[e.length-1];return vp.hasOwnProperty(t)?vp[t].find(r=>e.endsWith(r)):!(t!=="s"||jT.find(r=>e.endsWith(r)))},cm={two:{quickSplit:IT,expandLexicon:BT,transform:$T,looksPlural:zw}},qT=function(e){const{irregularPlurals:t}=e.two,{lexicon:r}=e.one;return Object.entries(t).forEach(n=>{r[n[0]]=r[n[0]]||"Singular",r[n[1]]=r[n[1]]||"Plural"}),e},fm={one:{lexicon:{}},two:{models:Ow}},RT={"Actor|Verb":"Actor","Adj|Gerund":"Adjective","Adj|Noun":"Adjective","Adj|Past":"Adjective","Adj|Present":"Adjective","Noun|Verb":"Singular","Noun|Gerund":"Gerund","Person|Noun":"Noun","Person|Date":"Month","Person|Verb":"FirstName","Person|Place":"Person","Person|Adj":"Comparative","Plural|Verb":"Plural","Unit|Noun":"Noun"},jw=function(e,t){const r={model:t,methods:cm},{lex:n,_multi:a}=cm.two.expandLexicon(e,r);return Object.assign(t.one.lexicon,n),Object.assign(t.one._multiCache,a),t},LT=function(e,t){return Object.keys(e).forEach(r=>{e[r]==="Uncountable"&&(t.two.uncountable[r]=!0,e[r]="Uncountable")}),t},yp=function(e,t,r){const n=hd(e,fm);t[n.PastTense]=t[n.PastTense]||"PastTense",t[n.Gerund]=t[n.Gerund]||"Gerund",r===!0&&(t[n.PresentTense]=t[n.PresentTense]||"PresentTense")},bp=function(e,t,r){const n=pd(e,r);t[n]=t[n]||"Superlative";const a=gd(e,r);t[a]=t[a]||"Comparative"},HT=function(e,t,r){const n=wc(e,r);t[n]=t[n]||"Plural"},GT=function(e,t){const r={},n=t.one.lexicon;return Object.keys(e).forEach(a=>{const i=e[a];if(r[a]=RT[i],(i==="Noun|Verb"||i==="Person|Verb"||i==="Actor|Verb")&&yp(a,n,!1),i==="Adj|Present"&&(yp(a,n,!0),bp(a,n,t)),i==="Person|Adj"&&bp(a,n,t),i==="Adj|Gerund"||i==="Noun|Gerund"){const o=lm(a,fm,"Gerund");n[o]||(r[o]="Infinitive")}if((i==="Noun|Gerund"||i==="Adj|Noun"||i==="Person|Noun")&&HT(a,n,t),i==="Adj|Past"){const o=lm(a,fm,"PastTense");n[o]||(r[o]="Infinitive")}}),t=jw(r,t),t},VT=function(e){return e=jw(e.one.lexicon,e),e=LT(e.one.lexicon,e),e=GT(e.two.switches,e),e=qT(e),e};let mm={one:{_multiCache:{},lexicon:es,frozenLex:MM},two:{irregularPlurals:Ew,models:Ow,suffixPatterns:YM,prefixPatterns:ZM,endsWith:QM,neighbours:XM,regexNormal:mT,regexText:dT,regexNumbers:hT,switches:um,clues:Oo,uncountable:{},orgWords:pT,placeWords:gT}};mm=VT(mm);const UT=function(e,t,r,n){const a=n.methods.one.setTag;if(e.length>=3){const i=/:/;if(e[0].post.match(i)){const s=e[1];if(s.tags.has("Value")||s.tags.has("Email")||s.tags.has("PhoneNumber"))return;a([e[0]],"Expression",n,null,"2-punct-colon''")}}},WT=function(e,t,r,n){const a=n.methods.one.setTag;e[t].post==="-"&&e[t+1]&&a([e[t],e[t+1]],"Hyphenated",n,null,"1-punct-hyphen''")},wp=/^(under|over|mis|re|un|dis|semi)-?/,JT=function(e,t,r){const n=r.two.switches,a=e[t];if(n.hasOwnProperty(a.normal)){a.switch=n[a.normal];return}if(wp.test(a.normal)){const i=a.normal.replace(wp,"");i.length>3&&n.hasOwnProperty(i)&&(a.switch=n[i])}},KT=(e,t,r="")=>{const n=o=>"\x1B[33m\x1B[3m"+o+"\x1B[0m",a=o=>"\x1B[3m"+o+"\x1B[0m",i=e.text||"["+e.implicit+"]";typeof t!="string"&&t.length>2&&(t=t.slice(0,2).join(", #")+" +"),t=typeof t!="string"?t.join(", #"):t,console.log(` ${n(i).padEnd(24)} \x1B[32m→\x1B[0m #${t.padEnd(22)} ${a(r)}`)},rr=function(e,t,r){if(!t||t.length===0||e.frozen===!0)return;const n=typeof process>"u"||!process.env?self.env||{}:process.env;n&&n.DEBUG_TAGS&&KT(e,t,r),e.tags=e.tags||new Set,typeof t=="string"?e.tags.add(t):t.forEach(a=>e.tags.add(a))},YT=["Acronym","Abbreviation","ProperNoun","Uncountable","Possessive","Pronoun","Activity","Honorific","Month"],ZT=function(e){!e.tags.has("Noun")||e.tags.has("Plural")||e.tags.has("Singular")||YT.find(t=>e.tags.has(t))||(zw(e.normal)?rr(e,"Plural","3-plural-guess"):rr(e,"Singular","3-singular-guess"))},QT=function(e){const t=e.tags;if(t.has("Verb")&&t.size===1){const r=Bw(e.normal);r&&rr(e,r,"3-verb-tense-guess")}},tu=function(e,t,r){const n=e[t],a=Array.from(n.tags);for(let i=0;i<a.length;i+=1)if(r.one.tagSet[a[i]]){const o=r.one.tagSet[a[i]].parents;rr(n,o,` -inferred by #${a[i]}`)}ZT(n),QT(n)},XT=new RegExp("^\\p{Lu}[\\p{Ll}'’]","u"),e5=/[0-9]/,t5=["Date","Month","WeekDay","Unit","Expression"],r5=/[IVX]/,n5=/^[IVXLCDM]{2,}$/,a5=/^M{0,4}(CM|CD|D?C{0,3})(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})$/,i5={li:!0,dc:!0,md:!0,dm:!0,ml:!0},o5=function(e,t,r){const n=e[t];n.index=n.index||[0,0];const a=n.index[1],i=n.text||"";return a!==0&&XT.test(i)===!0&&e5.test(i)===!1?t5.find(o=>n.tags.has(o))||n.pre.match(/["']$/)||n.normal==="the"?null:(tu(e,t,r),!n.tags.has("Noun")&&!n.frozen&&n.tags.clear(),rr(n,"ProperNoun","2-titlecase"),!0):i.length>=2&&n5.test(i)&&r5.test(i)&&a5.test(i)&&!i5[n.normal]?(rr(n,"RomanNumeral","2-xvii"),!0):null},xp=function(e="",t=[]){const r=e.length;let n=7;r<=n&&(n=r-1);for(let a=n;a>1;a-=1){const i=e.substring(r-a,r);if(t[i.length].hasOwnProperty(i)===!0)return t[i.length][i]}return null},s5=function(e,t,r){const n=e[t];if(n.tags.size===0){let a=xp(n.normal,r.two.suffixPatterns);if(a!==null)return rr(n,a,"2-suffix"),n.confidence=.7,!0;if(n.implicit&&(a=xp(n.implicit,r.two.suffixPatterns),a!==null))return rr(n,a,"2-implicit-suffix"),n.confidence=.7,!0}return null},Dp=/['‘’‛‵′`´]/,rf=function(e,t){for(let r=0;r<t.length;r+=1)if(t[r][0].test(e)===!0)return t[r];return null},u5=function(e="",t){const r=e[e.length-1];if(t.hasOwnProperty(r)===!0){const n=t[r]||[];for(let a=0;a<n.length;a+=1)if(n[a][0].test(e)===!0)return n[a]}return null},l5=function(e,t,r,n){const a=n.methods.one.setTag,{regexText:i,regexNormal:o,regexNumbers:s,endsWith:u}=r.two,l=e[t],c=l.machine||l.normal;let f=l.text;Dp.test(l.post)&&!Dp.test(l.pre)&&(f+=l.post.trim());let m=rf(f,i)||rf(c,o);return!m&&/[0-9]/.test(c)&&(m=rf(c,s)),!m&&l.tags.size===0&&(m=u5(c,u)),m?(a([l],m[1],n,null,`2-regex-'${m[2]||m[0]}'`),l.confidence=.6,!0):null},c5=function(e="",t=[]){const r=e.length;let n=7;n>r-3&&(n=r-3);for(let a=n;a>2;a-=1){const i=e.substring(0,a);if(t[i.length].hasOwnProperty(i)===!0)return t[i.length][i]}return null},f5=function(e,t,r){const n=e[t];if(n.tags.size===0){const a=c5(n.normal,r.two.prefixPatterns);if(a!==null)return rr(n,a,"2-prefix"),n.confidence=.5,!0}return null},m5=1400,d5=2100,h5=new Set(["in","on","by","until","for","to","during","throughout","through","within","before","after","of","this","next","last","circa","around","post","pre","budget","classic","plan","may"]),Np=function(e){if(!e)return!1;const t=e.normal||e.implicit;return!!(h5.has(t)||e.tags.has("Date")||e.tags.has("Month")||e.tags.has("WeekDay")||e.tags.has("Year")||e.tags.has("ProperNoun"))},Ap=function(e){return e?!!(e.tags.has("Ordinal")||e.tags.has("Cardinal")&&e.normal.length<3||e.normal==="is"||e.normal==="was"):!1},Cp=function(e){return e&&(e.tags.has("Date")||e.tags.has("Month")||e.tags.has("WeekDay")||e.tags.has("Year"))},p5=function(e,t){const r=e[t];if(r.tags.has("NumericValue")&&r.tags.has("Cardinal")&&r.normal.length===4){const n=Number(r.normal);if(n&&!isNaN(n)&&n>m5&&n<d5){const a=e[t-1],i=e[t+1];if(Np(a)||Np(i))return rr(r,"Year","2-tagYear");if(n>=1920&&n<2025){if(Ap(a)||Ap(i))return rr(r,"Year","2-tagYear-close");if(Cp(e[t-2])||Cp(e[t+2]))return rr(r,"Year","2-tagYear-far");if(a&&(a.tags.has("Determiner")||a.tags.has("Possessive"))&&i&&i.tags.has("Noun")&&!i.tags.has("Plural"))return rr(r,"Year","2-tagYear-noun")}}}return null},g5=function(e,t,r,n){const a=n.methods.one.setTag,i=e[t],o=["PastTense","PresentTense","Auxiliary","Modal","Particle"];i.tags.has("Verb")&&(o.find(u=>i.tags.has(u))||a([i],"Infinitive",n,null,"2-verb-type''"))},qw=/^[A-Z]('s|,)?$/,Rw=/^[A-Z-]+$/,Lw=/^[A-Z]+s$/,v5=/([A-Z]\.)+[A-Z]?,?$/,y5=/[A-Z]{2,}('s|,)?$/,b5=/([a-z]\.)+[a-z]\.?$/,Hw={I:!0,A:!0},w5={la:!0,ny:!0,us:!0,dc:!0,gb:!0},x5=function(e,t){let r=e.text;if(Rw.test(r)===!1)if(r.length>3&&Lw.test(r)===!0)r=r.replace(/s$/,"");else return!1;return r.length>5||Hw.hasOwnProperty(r)||t.one.lexicon.hasOwnProperty(e.normal)?!1:v5.test(r)===!0||b5.test(r)===!0||qw.test(r)===!0||y5.test(r)===!0},D5=function(e,t,r){const n=e[t];return n.tags.has("RomanNumeral")||n.tags.has("Acronym")||n.frozen?null:x5(n,r)?(n.tags.clear(),rr(n,["Acronym","Noun"],"3-no-period-acronym"),w5[n.normal]===!0&&rr(n,"Place","3-place-acronym"),Lw.test(n.text)===!0&&rr(n,"Plural","3-plural-acronym"),!0):!Hw.hasOwnProperty(n.text)&&qw.test(n.text)?(n.tags.clear(),rr(n,["Acronym","Noun"],"3-one-letter-acronym"),!0):n.tags.has("Organization")&&n.text.length<=3?(rr(n,"Acronym","3-org-acronym"),!0):n.tags.has("Organization")&&Rw.test(n.text)&&n.text.length<=6?(rr(n,"Acronym","3-titlecase-acronym"),!0):null},Ep=function(e,t){if(!e)return null;const r=t.find(n=>e.normal===n[0]);return r?r[1]:null},Sp=function(e,t){if(!e)return null;const r=t.find(n=>e.tags.has(n[0]));return r?r[1]:null},N5=function(e,t,r){const{leftTags:n,leftWords:a,rightWords:i,rightTags:o}=r.two.neighbours,s=e[t];if(s.tags.size===0){let u=null;if(u=u||Ep(e[t-1],a),u=u||Ep(e[t+1],i),u=u||Sp(e[t-1],n),u=u||Sp(e[t+1],o),u)return rr(s,u,"3-[neighbour]"),tu(e,t,r),e[t].confidence=.2,!0}return null},A5=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e),Mp=function(e,t,r){return!e||e.tags.has("FirstName")||e.tags.has("Place")?!1:e.tags.has("ProperNoun")||e.tags.has("Organization")||e.tags.has("Acronym")?!0:!r&&A5(e.text)?t===0?e.tags.has("Singular"):!0:!1},C5=function(e,t,r,n){const a=r.model.two.orgWords,i=r.methods.one.setTag,o=e[t],s=o.machine||o.normal;if(a[s]===!0&&Mp(e[t-1],t-1,n)){i([e[t]],"Organization",r,null,"3-[org-word]");for(let u=t;u>=0&&Mp(e[u],u,n);u-=1)i([e[u]],"Organization",r,null,"3-[org-word]")}return null},E5=e=>new RegExp("^\\p{Lu}[\\p{Ll}'’]","u").test(e),S5=/'s$/,Tp=new Set(["athletic","city","community","eastern","federal","financial","great","historic","historical","local","memorial","municipal","national","northern","provincial","southern","state","western","spring","pine","sunset","view","oak","maple","spruce","cedar","willow"]),M5=new Set(["center","centre","way","range","bar","bridge","field","pit"]),Fp=function(e,t,r){if(!e)return!1;const n=e.tags;return n.has("Organization")||n.has("Possessive")||S5.test(e.normal)?!1:n.has("ProperNoun")||n.has("Place")?!0:!r&&E5(e.text)?t===0?n.has("Singular"):!0:!1},T5=function(e,t,r,n){const a=r.model.two.placeWords,i=r.methods.one.setTag,o=e[t],s=o.machine||o.normal;if(a[s]===!0){for(let u=t-1;u>=0;u-=1)if(!Tp.has(e[u].normal)){if(Fp(e[u],u,n)){i(e.slice(u,t+1),"Place",r,null,"3-[place-of-foo]");continue}break}if(M5.has(s))return!1;for(let u=t+1;u<e.length;u+=1){if(Fp(e[u],u,n))return i(e.slice(t,u+1),"Place",r,null,"3-[foo-place]"),!0;if(!(e[u].normal==="of"||Tp.has(e[u].normal)))break}}return null},F5=function(e,t,r){let n=!1;const a=e[t].tags;(a.size===0||a.size===1&&(a.has("Hyphenated")||a.has("HashTag")||a.has("Prefix")||a.has("SlashedTerm")))&&(n=!0),n&&(rr(e[t],"Noun","3-[fallback]"),tu(e,t,r),e[t].confidence=.1)},P5=/^[A-Z][a-z]/,Rn=(e,t)=>e[t].tags.has("ProperNoun")&&P5.test(e[t].text)?"Noun":null,Pp=(e,t,r)=>t===0&&!e[1]?r:null,k5=function(e,t){return!e[t+1]&&e[t-1]&&e[t-1].tags.has("Determiner")?"Noun":null},O5=function(e,t,r){return t===0&&e.length>3?r:null},kp={"Adj|Gerund":(e,t)=>Rn(e,t),"Adj|Noun":(e,t)=>Rn(e,t)||k5(e,t),"Actor|Verb":(e,t)=>Rn(e,t),"Adj|Past":(e,t)=>Rn(e,t),"Adj|Present":(e,t)=>Rn(e,t),"Noun|Gerund":(e,t)=>Rn(e,t),"Noun|Verb":(e,t)=>t>0&&Rn(e,t)||Pp(e,t,"Infinitive"),"Plural|Verb":(e,t)=>Rn(e,t)||Pp(e,t,"PresentTense")||O5(e,t,"Plural"),"Person|Noun":(e,t)=>Rn(e,t),"Person|Verb":(e,t)=>t!==0?Rn(e,t):null,"Person|Adj":(e,t)=>t===0&&e.length>1||Rn(e,t)?"Person":null},vd=typeof process>"u"||!process.env?self.env||{}:process.env,Op=/^(under|over|mis|re|un|dis|semi)-?/,$p=(e,t)=>{if(!e||!t)return null;const r=e.normal||e.implicit;let n=null;return t.hasOwnProperty(r)&&(n=t[r]),n&&vd.DEBUG_TAGS&&console.log(`
12
+ \x1B[2m\x1B[3m ↓ - '${r}' \x1B[0m`),n},Bp=(e,t={},r)=>{if(!e||!t)return null;let a=Array.from(e.tags).sort((i,o)=>{const s=r[i]?r[i].parents.length:0,u=r[o]?r[o].parents.length:0;return s>u?-1:1}).find(i=>t[i]);return a&&vd.DEBUG_TAGS&&console.log(` \x1B[2m\x1B[3m ↓ - '${e.normal||e.implicit}' (#${a}) \x1B[0m`),a=t[a],a},$5=function(e,t,r,n){if(!r)return null;const a=e[t-1]?.text!=="also"?t-1:Math.max(0,t-2),i=n.one.tagSet;let o=$p(e[t+1],r.afterWords);return o=o||$p(e[a],r.beforeWords),o=o||Bp(e[a],r.beforeTags,i),o=o||Bp(e[t+1],r.afterTags,i),o},B5=function(e,t,r){const n=r.model,a=r.methods.one.setTag,{switches:i,clues:o}=n.two,s=e[t];let u=s.normal||s.implicit||"";if(Op.test(u)&&!i[u]&&(u=u.replace(Op,"")),s.switch){const l=s.switch;if(s.tags.has("Acronym")||s.tags.has("PhrasalVerb"))return;let c=$5(e,t,o[l],n);kp[l]&&(c=kp[l](e,t)||c),c?(a([s],c,r,null,`3-[switch] (${l})`),tu(e,t,n)):vd.DEBUG_TAGS&&console.log(`
13
+ -> X - '${u}' : (${l}) `)}},_5={there:!0,this:!0,it:!0,him:!0,her:!0,us:!0},I5=function(e,t){const r=t.methods.one.setTag,n=t.model.one._multiCache||{},a=e[0];if((a.switch==="Noun|Verb"||a.tags.has("Infinitive"))&&e.length>=2){if(e.length<4&&!_5[e[1].normal]||!a.tags.has("PhrasalVerb")&&n.hasOwnProperty(a.normal))return;(e[1].tags.has("Noun")||e[1].tags.has("Determiner"))&&(!e.slice(1,3).some(u=>u.tags.has("Verb"))||a.tags.has("#PhrasalVerb"))&&r([a],"Imperative",t,null,"3-[imperative]")}},z5=function(e){if(e.filter(r=>!r.tags.has("ProperNoun")).length<=3)return!1;const t=/^[a-z]/;return e.every(r=>!t.test(r.text))},j5=function(e,t,r){e.forEach(n=>{UT(n,0,t,r)})},q5=function(e,t,r,n){for(let a=0;a<e.length;a+=1)e[a].frozen!==!0&&(JT(e,a,t),n===!1&&o5(e,a,t),s5(e,a,t),l5(e,a,t,r),f5(e,a,t),p5(e,a))},R5=function(e,t,r,n){for(let a=0;a<e.length;a+=1){let i=D5(e,a,t);tu(e,a,t),i=i||N5(e,a,t),i=i||F5(e,a,t)}for(let a=0;a<e.length;a+=1)e[a].frozen!==!0&&(C5(e,a,r,n),T5(e,a,r,n),B5(e,a,r),g5(e,a,t,r),WT(e,a,t,r));I5(e,r)},L5=function(e){const{methods:t,model:r,world:n}=e,a=e.docs;j5(a,r,n);const i=t.two.quickSplit(a);for(let o=0;o<i.length;o+=1){const s=i[o],u=z5(s);q5(s,r,n,u),R5(s,r,n,u)}return i},_p={Possessive:e=>{let t=e.machine||e.normal||e.text;return t=t.replace(/'s$/,""),t},Plural:(e,t)=>{const r=e.machine||e.normal||e.text;return t.methods.two.transform.noun.toSingular(r,t.model)},Copula:()=>"is",PastTense:(e,t)=>{const r=e.machine||e.normal||e.text;return t.methods.two.transform.verb.toInfinitive(r,t.model,"PastTense")},Gerund:(e,t)=>{const r=e.machine||e.normal||e.text;return t.methods.two.transform.verb.toInfinitive(r,t.model,"Gerund")},PresentTense:(e,t)=>{const r=e.machine||e.normal||e.text;return e.tags.has("Infinitive")?r:t.methods.two.transform.verb.toInfinitive(r,t.model,"PresentTense")},Comparative:(e,t)=>{const r=e.machine||e.normal||e.text;return t.methods.two.transform.adjective.fromComparative(r,t.model)},Superlative:(e,t)=>{const r=e.machine||e.normal||e.text;return t.methods.two.transform.adjective.fromSuperlative(r,t.model)},Adverb:(e,t)=>{const{fromAdverb:r}=t.methods.two.transform.adjective,n=e.machine||e.normal||e.text;return r(n)}},H5=function(e){const t=e.world,r=Object.keys(_p);e.docs.forEach(n=>{for(let a=0;a<n.length;a+=1){const i=n[a];for(let o=0;o<r.length;o+=1)if(i.tags.has(r[o])){const s=_p[r[o]],u=s(i,t);i.normal!==u&&(i.root=u);break}}})},Ip={Adverb:"RB",Comparative:"JJR",Superlative:"JJS",Adjective:"JJ",TO:"Conjunction",Modal:"MD",Auxiliary:"MD",Gerund:"VBG",PastTense:"VBD",Participle:"VBN",PresentTense:"VBZ",Infinitive:"VB",Particle:"RP",Verb:"VB",Pronoun:"PRP",Cardinal:"CD",Conjunction:"CC",Determiner:"DT",Preposition:"IN",QuestionWord:"WP",Expression:"UH",Possessive:"POS",ProperNoun:"NNP",Person:"NNP",Place:"NNP",Organization:"NNP",Singular:"NN",Plural:"NNS",Noun:"NN",There:"EX"},G5=function(e){if(e.tags.has("ProperNoun")&&e.tags.has("Plural"))return"NNPS";if(e.tags.has("Possessive")&&e.tags.has("Pronoun"))return"PRP$";if(e.normal==="there")return"EX";if(e.normal==="to")return"TO";const t=e.tagRank||[];for(let r=0;r<t.length;r+=1)if(Ip.hasOwnProperty(t[r]))return Ip[t[r]];return null},V5=function(e){e.compute("tagRank"),e.docs.forEach(t=>{t.forEach(r=>{r.penn=G5(r)})})},U5={preTagger:L5,root:H5,penn:V5},nf=["Person","Place","Organization"],W5={Noun:{not:["Verb","Adjective","Adverb","Value","Determiner"]},Singular:{is:"Noun",not:["Plural","Uncountable"]},ProperNoun:{is:"Noun"},Person:{is:"Singular",also:["ProperNoun"],not:["Place","Organization","Date"]},FirstName:{is:"Person"},MaleName:{is:"FirstName",not:["FemaleName","LastName"]},FemaleName:{is:"FirstName",not:["MaleName","LastName"]},LastName:{is:"Person",not:["FirstName"]},Honorific:{is:"Person",not:["FirstName","LastName","Value"]},Place:{is:"Singular",not:["Person","Organization"]},Country:{is:"Place",also:["ProperNoun"],not:["City"]},City:{is:"Place",also:["ProperNoun"],not:["Country"]},Region:{is:"Place",also:["ProperNoun"]},Address:{},Organization:{is:"ProperNoun",not:["Person","Place"]},SportsTeam:{is:"Organization"},School:{is:"Organization"},Company:{is:"Organization"},Plural:{is:"Noun",not:["Singular","Uncountable"]},Uncountable:{is:"Noun"},Pronoun:{is:"Noun",not:nf},Actor:{is:"Noun",not:["Place","Organization"]},Activity:{is:"Noun",not:["Person","Place"]},Unit:{is:"Noun",not:nf},Demonym:{is:"Noun",also:["ProperNoun"],not:nf},Possessive:{is:"Noun"},Reflexive:{is:"Pronoun"}},J5={Verb:{not:["Noun","Adjective","Adverb","Value","Expression"]},PresentTense:{is:"Verb",not:["PastTense","FutureTense"]},Infinitive:{is:"PresentTense",not:["Gerund"]},Imperative:{is:"Verb",not:["PastTense","Gerund","Copula"]},Gerund:{is:"PresentTense",not:["Copula"]},PastTense:{is:"Verb",not:["PresentTense","Gerund","FutureTense"]},FutureTense:{is:"Verb",not:["PresentTense","PastTense"]},Copula:{is:"Verb"},Modal:{is:"Verb",not:["Infinitive"]},Participle:{is:"PastTense"},Auxiliary:{is:"Verb",not:["PastTense","PresentTense","Gerund","Conjunction"]},PhrasalVerb:{is:"Verb"},Particle:{is:"PhrasalVerb",not:["PastTense","PresentTense","Copula","Gerund"]},Passive:{is:"Verb"}},K5={Value:{not:["Verb","Adjective","Adverb"]},Ordinal:{is:"Value",not:["Cardinal"]},Cardinal:{is:"Value",not:["Ordinal"]},Fraction:{is:"Value",not:["Noun"]},Multiple:{is:"TextValue"},RomanNumeral:{is:"Cardinal",not:["TextValue"]},TextValue:{is:"Value",not:["NumericValue"]},NumericValue:{is:"Value",not:["TextValue"]},Money:{is:"Cardinal"},Percent:{is:"Value"}},Y5={Date:{not:["Verb","Adverb","Adjective"]},Month:{is:"Date",also:["Noun"],not:["Year","WeekDay","Time"]},WeekDay:{is:"Date",also:["Noun"]},Year:{is:"Date",not:["RomanNumeral"]},FinancialQuarter:{is:"Date",not:"Fraction"},Holiday:{is:"Date",also:["Noun"]},Season:{is:"Date"},Timezone:{is:"Date",also:["Noun"],not:["ProperNoun"]},Time:{is:"Date",not:["AtMention"]},Duration:{is:"Date",also:["Noun"]}},Z5=["Noun","Verb","Adjective","Adverb","Value","QuestionWord"],Q5={Adjective:{not:["Noun","Verb","Adverb","Value"]},Comparable:{is:"Adjective"},Comparative:{is:"Adjective"},Superlative:{is:"Adjective",not:["Comparative"]},NumberRange:{},Adverb:{not:["Noun","Verb","Adjective","Value"]},Determiner:{not:["Noun","Verb","Adjective","Adverb","QuestionWord","Conjunction"]},Conjunction:{not:Z5},Preposition:{not:["Noun","Verb","Adjective","Adverb","QuestionWord","Determiner"]},QuestionWord:{not:["Determiner"]},Currency:{is:"Noun"},Expression:{not:["Noun","Adjective","Verb","Adverb"]},Abbreviation:{},Url:{not:["HashTag","PhoneNumber","Verb","Adjective","Value","AtMention","Email","SlashedTerm"]},PhoneNumber:{not:["HashTag","Verb","Adjective","Value","AtMention","Email"]},HashTag:{},AtMention:{is:"Noun",not:["HashTag","Email"]},Emoji:{not:["HashTag","Verb","Adjective","Value","AtMention"]},Emoticon:{not:["HashTag","Verb","Adjective","Value","AtMention","SlashedTerm"]},SlashedTerm:{not:["Emoticon","Url","Value"]},Email:{not:["HashTag","Verb","Adjective","Value","AtMention"]},Acronym:{not:["Plural","RomanNumeral","Pronoun","Date"]},Negative:{not:["Noun","Adjective","Value","Expression"]},Condition:{not:["Verb","Adjective","Noun","Value"]},There:{not:["Verb","Adjective","Noun","Value","Conjunction","Preposition"]},Prefix:{not:["Abbreviation","Acronym","ProperNoun"]},Hyphenated:{}},X5=Object.assign({},W5,J5,K5,Y5,Q5),eF={compute:U5,methods:cm,model:mm,tags:X5,hooks:["preTagger"]},tF=/[,)"';:\-–—.…]/,wa=function(e,t){if(!e.found)return;const r=e.termList();for(let n=0;n<r.length-1;n++){const a=r[n];if(tF.test(a.post))return}r[0].implicit=r[0].normal,r[0].text+=t,r[0].normal+=t,r.slice(1).forEach(n=>{n.implicit=n.normal,n.text="",n.normal=""});for(let n=0;n<r.length-1;n++)r[n].post=r[n].post.replace(/ /,"")},rF=function(){const e=this.not("@hasContraction");let t=e.match("(we|they|you) are");return wa(t,"'re"),t=e.match("(he|she|they|it|we|you) will"),wa(t,"'ll"),t=e.match("(he|she|they|it|we) is"),wa(t,"'s"),t=e.match("#Person is"),wa(t,"'s"),t=e.match("#Person would"),wa(t,"'d"),t=e.match("(is|was|had|would|should|could|do|does|have|has|can) not"),wa(t,"n't"),t=e.match("(i|we|they) have"),wa(t,"'ve"),t=e.match("(would|should|could) have"),wa(t,"'ve"),t=e.match("i am"),wa(t,"'m"),t=e.match("going to"),this},nF=new RegExp("^\\p{Lu}[\\p{Ll}'’]","u"),aF=function(e=""){return e=e.replace(/^ *[a-z\u00C0-\u00FF]/,t=>t.toUpperCase()),e},iF=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Contraction"}expand(){return this.docs.forEach(n=>{const a=nF.test(n[0].text);n.forEach((i,o)=>{i.text=i.implicit||"",delete i.implicit,o<n.length-1&&i.post===""&&(i.post+=" "),i.dirty=!0}),a&&(n[0].text=aF(n[0].text))}),this.compute("normal"),this}}e.prototype.contractions=function(){const r=this.match("@hasContraction+");return new t(this.document,r.pointer)},e.prototype.contract=rF},oF=function(e,t,r){const[n,a]=t;!r||r.length===0||(r=r.map((i,o)=>(i.implicit=i.text,i.machine=i.text,i.pre="",i.post="",i.text="",i.normal="",i.index=[n,a+o],i)),r[0]&&(r[0].pre=e[n][a].pre,r[r.length-1].post=e[n][a].post,r[0].text=e[n][a].text,r[0].normal=e[n][a].normal),e[n].splice(a,1,...r))},sF=/'/,uF=new Set(["been","become"]),lF=new Set(["what","how","when","if","too"]),cF=new Set(["too","also","enough"]),fF=(e,t)=>{for(let r=t+1;r<e.length;r+=1){const n=e[r];if(uF.has(n.normal))return"has";if(lF.has(n.normal)||n.tags.has("Gerund")||n.tags.has("Determiner")||n.tags.has("Adjective")||n.switch==="Adj|Past"&&e[r+1]&&(cF.has(e[r+1].normal)||e[r+1].tags.has("Preposition")))return"is";if(n.tags.has("PastTense"))return e[r+1]&&e[r+1].normal==="for"?"is":"has"}return"is"},mF=function(e,t){const r=e[t].normal.split(sF)[0];if(r==="let")return[r,"us"];if(r==="there"){const n=e[t+1];if(n&&n.tags.has("Plural"))return[r,"are"]}return fF(e,t)==="has"?[r,"has"]:[r,"is"]},dF=/'/,hF=new Set(["better","done","before","it","had"]),pF=new Set(["have","be"]),gF=(e,t)=>{for(let r=t+1;r<e.length;r+=1){const n=e[r];if(hF.has(n.normal))return"had";if(pF.has(n.normal))return"would";if(n.tags.has("PastTense")||n.switch==="Adj|Past")return"had";if(n.tags.has("PresentTense")||n.tags.has("Infinitive"))return"would";if(n.tags.has("#Determiner"))return"had";if(n.tags.has("Adjective"))return"would"}return!1},vF=function(e,t){const r=e[t].normal.split(dF)[0];return r==="how"||r==="what"?[r,"did"]:gF(e,t)==="had"?[r,"had"]:[r,"would"]},yF=function(e,t){for(let r=t-1;r>=0;r-=1)if(e[r].tags.has("Noun")||e[r].tags.has("Pronoun")||e[r].tags.has("Plural")||e[r].tags.has("Singular"))return e[r];return null},bF=function(e,t){if(e[t].normal==="ain't"||e[t].normal==="aint"){if(e[t+1]&&e[t+1].normal==="never")return["have"];const n=yF(e,t);if(n){if(n.normal==="we"||n.normal==="they")return["are","not"];if(n.normal==="i")return["am","not"];if(n.tags&&n.tags.has("Plural"))return["are","not"]}return["is","not"]}return[e[t].normal.replace(/n't/,""),"not"]},wF={that:!0,there:!0,let:!0,here:!0,everywhere:!0},xF={in:!0,by:!0,for:!0},DF=new Set(["too","also","enough","about"]),NF=new Set(["is","are","did","were","could","should","must","had","have"]),AF=(e,t)=>{const r=e[t];if(wF.hasOwnProperty(r.machine||r.normal))return!1;if(r.tags.has("Possessive"))return!0;if(r.tags.has("QuestionWord")||r.normal==="he's"||r.normal==="she's")return!1;const n=e[t+1];if(!n)return!0;if(r.normal==="it's")return!!n.tags.has("#Noun");if(n.switch=="Noun|Gerund"){const a=e[t+2];return a?a.tags.has("Copula")?!0:(a.normal==="on"||a.normal==="in",!1):!!(r.tags.has("Actor")||r.tags.has("ProperNoun"))}if(n.tags.has("Verb"))return n.tags.has("Infinitive")?!0:n.tags.has("Gerund")?!1:!!n.tags.has("PresentTense");if(n.switch==="Adj|Noun"){const a=e[t+2];if(!a)return!1;if(NF.has(a.normal))return!0;if(DF.has(a.normal))return!1}if(n.tags.has("Noun")){const a=n.machine||n.normal;return!(a==="here"||a==="there"||a==="everywhere"||n.tags.has("Possessive")||n.tags.has("ProperNoun")&&!r.tags.has("ProperNoun"))}if(e[t-1]&&xF[e[t-1].normal]===!0)return!0;if(n.tags.has("Adjective")){const a=e[t+2];if(!a)return!1;if(a.tags.has("Noun")&&!a.tags.has("Pronoun")){const i=n.normal;return!(i==="above"||i==="below"||i==="behind")}return a.switch==="Noun|Verb"}return!!n.tags.has("Value")},zp=/'/,CF=function(e){e.forEach((t,r)=>{t.index&&(t.index[1]=r)})},EF=function(e,t,r,n){const a=t.update();a.document=[e];let i=r+n;r>0&&(r-=1),e[i]&&(i+=1),a.ptrs=[[0,r,i]],a.compute(["freeze","lexicon","preTagger","unfreeze"]),CF(e)},jp={d:(e,t)=>vF(e,t),t:(e,t)=>bF(e,t),s:(e,t,r)=>AF(e,t)?r.methods.one.setTag([e[t]],"Possessive",r,null,"2-contraction"):mF(e,t)},SF=function(e,t){const r=t.fromText(e.join(" "));return r.compute("id"),r.docs[0]},MF=e=>{const{world:t,document:r}=e;r.forEach((n,a)=>{for(let i=n.length-1;i>=0;i-=1){if(n[i].implicit)continue;let o=null;zp.test(n[i].normal)===!0&&(o=n[i].normal.split(zp)[1]);let s=null;if(jp.hasOwnProperty(o)&&(s=jp[o](n,i,t)),s){s=SF(s,e),oF(r,[a,i],s),EF(r[a],e,i,s.length);continue}}})},TF={contractionTwo:MF},FF={compute:TF,api:iF,hooks:["contractionTwo"]},PF=[{match:"[(all|both)] #Determiner #Noun",group:0,tag:"Noun",reason:"all-noun"},{match:"#Copula [(just|alone)]$",group:0,tag:"Adjective",reason:"not-adverb"},{match:"#Singular is #Adverb? [#PastTense$]",group:0,tag:"Adjective",reason:"is-filled"},{match:"[#PastTense] #Singular is",group:0,tag:"Adjective",reason:"smoked-poutine"},{match:"[#PastTense] #Plural are",group:0,tag:"Adjective",reason:"baked-onions"},{match:"well [#PastTense]",group:0,tag:"Adjective",reason:"well-made"},{match:"#Copula [fucked up?]",group:0,tag:"Adjective",reason:"swears-adjective"},{match:"#Singular (seems|appears) #Adverb? [#PastTense$]",group:0,tag:"Adjective",reason:"seems-filled"},{match:"#Copula #Adjective? [(out|in|through)]$",group:0,tag:"Adjective",reason:"still-out"},{match:"^[#Adjective] (the|your) #Noun",group:0,notIf:"(all|even)",tag:"Infinitive",reason:"shut-the"},{match:"the [said] #Noun",group:0,tag:"Adjective",reason:"the-said-card"},{match:"[#Hyphenated (#Hyphenated && #PastTense)] (#Noun|#Conjunction)",group:0,tag:"Adjective",notIf:"#Adverb",reason:"faith-based"},{match:"[#Hyphenated (#Hyphenated && #Gerund)] (#Noun|#Conjunction)",group:0,tag:"Adjective",notIf:"#Adverb",reason:"self-driving"},{match:"[#PastTense (#Hyphenated && #PhrasalVerb)] (#Noun|#Conjunction)",group:0,tag:"Adjective",reason:"dammed-up"},{match:"(#Hyphenated && #Value) fold",tag:"Adjective",reason:"two-fold"},{match:"must (#Hyphenated && #Infinitive)",tag:"Adjective",reason:"must-win"},{match:"(#Hyphenated && #Infinitive) #Hyphenated",tag:"Adjective",notIf:"#PhrasalVerb",reason:"vacuum-sealed"},{match:"too much",tag:"Adverb Adjective",reason:"bit-4"},{match:"a bit much",tag:"Determiner Adverb Adjective",reason:"bit-3"},{match:"[(un|contra|extra|inter|intra|macro|micro|mid|mis|mono|multi|pre|sub|tri|ex)] #Adjective",group:0,tag:["Adjective","Prefix"],reason:"un-skilled"}],kF="(dark|bright|flat|light|soft|pale|dead|dim|faux|little|wee|sheer|most|near|good|extra|all)",qp="(hard|fast|late|early|high|right|deep|close|direct)",OF=[{match:"#Adverb [#Adverb] (and|or|then)",group:0,tag:"Adjective",reason:"kinda-sparkly-and"},{match:`[${kF}] #Adjective`,group:0,tag:"Adverb",reason:"dark-green"},{match:"#Copula [far too] #Adjective",group:0,tag:"Adverb",reason:"far-too"},{match:"#Copula [still] (in|#Gerund|#Adjective)",group:0,tag:"Adverb",reason:"was-still-walking"},{match:`#Plural ${qp}`,tag:"#PresentTense #Adverb",reason:"studies-hard"},{match:`#Verb [${qp}] !#Noun?`,group:0,notIf:"(#Copula|get|got|getting|become|became|becoming|feel|feels|feeling|#Determiner|#Preposition)",tag:"Adverb",reason:"shops-direct"},{match:"[#Plural] a lot",tag:"PresentTense",reason:"studies-a-lot"}],$F=[{match:"as [#Gerund] as",group:0,tag:"Adjective",reason:"as-gerund-as"},{match:"more [#Gerund] than",group:0,tag:"Adjective",reason:"more-gerund-than"},{match:"(so|very|extremely) [#Gerund]",group:0,tag:"Adjective",reason:"so-gerund"},{match:"(found|found) it #Adverb? [#Gerund]",group:0,tag:"Adjective",reason:"found-it-gerund"},{match:"a (little|bit|wee) bit? [#Gerund]",group:0,tag:"Adjective",reason:"a-bit-gerund"},{match:"#Gerund [#Gerund]",group:0,tag:"Adjective",notIf:"(impersonating|practicing|considering|assuming)",reason:"looking-annoying"},{match:"(looked|look|looks) #Adverb? [%Adj|Gerund%]",group:0,tag:"Adjective",notIf:"(impersonating|practicing|considering|assuming)",reason:"looked-amazing"},{match:"[%Adj|Gerund%] #Determiner",group:0,tag:"Gerund",reason:"developing-a"},{match:"#Possessive [%Adj|Gerund%] #Noun",group:0,tag:"Adjective",reason:"leading-manufacturer"},{match:"%Noun|Gerund% %Adj|Gerund%",tag:"Gerund #Adjective",reason:"meaning-alluring"},{match:"(face|embrace|reveal|stop|start|resume) %Adj|Gerund%",tag:"#PresentTense #Adjective",reason:"face-shocking"},{match:"(are|were) [%Adj|Gerund%] #Plural",group:0,tag:"Adjective",reason:"are-enduring-symbols"}],BF=[{match:"#Determiner [#Adjective] #Copula",group:0,tag:"Noun",reason:"the-adj-is"},{match:"#Adjective [#Adjective] #Copula",group:0,tag:"Noun",reason:"adj-adj-is"},{match:"(his|its) [%Adj|Noun%]",group:0,tag:"Noun",notIf:"#Hyphenated",reason:"his-fine"},{match:"#Copula #Adverb? [all]",group:0,tag:"Noun",reason:"is-all"},{match:"(have|had) [#Adjective] #Preposition .",group:0,tag:"Noun",reason:"have-fun"},{match:"#Gerund (giant|capital|center|zone|application)",tag:"Noun",reason:"brewing-giant"},{match:"#Preposition (a|an) [#Adjective]$",group:0,tag:"Noun",reason:"an-instant"},{match:"no [#Adjective] #Modal",group:0,tag:"Noun",reason:"no-golden"},{match:"[brand #Gerund?] new",group:0,tag:"Adverb",reason:"brand-new"},{match:"(#Determiner|#Comparative|new|different) [kind]",group:0,tag:"Noun",reason:"some-kind"},{match:"#Possessive [%Adj|Noun%] #Noun",group:0,tag:"Adjective",reason:"her-favourite"},{match:"must && #Hyphenated .",tag:"Adjective",reason:"must-win"},{match:"#Determiner [#Adjective]$",tag:"Noun",notIf:"(this|that|#Comparative|#Superlative)",reason:"the-south"},{match:"(#Noun && #Hyphenated) (#Adjective && #Hyphenated)",tag:"Adjective",notIf:"(this|that|#Comparative|#Superlative)",reason:"company-wide"},{match:"#Determiner [#Adjective] (#Copula|#Determiner)",notIf:"(#Comparative|#Superlative)",group:0,tag:"Noun",reason:"the-poor"},{match:"[%Adj|Noun%] #Noun",notIf:"(#Pronoun|#ProperNoun)",group:0,tag:"Adjective",reason:"stable-foundations"}],_F=[{match:"(slowly|quickly) [#Adjective]",group:0,tag:"Verb",reason:"slowly-adj"},{match:"does (#Adverb|not)? [#Adjective]",group:0,tag:"PresentTense",reason:"does-mean"},{match:"[(fine|okay|cool|ok)] by me",group:0,tag:"Adjective",reason:"okay-by-me"},{match:"i (#Adverb|do)? not? [mean]",group:0,tag:"PresentTense",reason:"i-mean"},{match:"will #Adjective",tag:"Auxiliary Infinitive",reason:"will-adj"},{match:"#Pronoun [#Adjective] #Determiner #Adjective? #Noun",group:0,tag:"Verb",reason:"he-adj-the"},{match:"#Copula [%Adj|Present%] to #Verb",group:0,tag:"Verb",reason:"adj-to"},{match:"#Copula [#Adjective] (well|badly|quickly|slowly)",group:0,tag:"Verb",reason:"done-well"},{match:"#Adjective and [#Gerund] !#Preposition?",group:0,tag:"Adjective",reason:"rude-and-x"},{match:"#Copula #Adverb? (over|under) [#PastTense]",group:0,tag:"Adjective",reason:"over-cooked"},{match:"#Copula #Adjective+ (and|or) [#PastTense]$",group:0,tag:"Adjective",reason:"bland-and-overcooked"},{match:"got #Adverb? [#PastTense] of",group:0,tag:"Adjective",reason:"got-tired-of"},{match:"(seem|seems|seemed|appear|appeared|appears|feel|feels|felt|sound|sounds|sounded) (#Adverb|#Adjective)? [#PastTense]",group:0,tag:"Adjective",reason:"felt-loved"},{match:"(seem|feel|seemed|felt) [#PastTense #Particle?]",group:0,tag:"Adjective",reason:"seem-confused"},{match:"a (bit|little|tad) [#PastTense #Particle?]",group:0,tag:"Adjective",reason:"a-bit-confused"},{match:"not be [%Adj|Past% #Particle?]",group:0,tag:"Adjective",reason:"do-not-be-confused"},{match:"#Copula just [%Adj|Past% #Particle?]",group:0,tag:"Adjective",reason:"is-just-right"},{match:"as [#Infinitive] as",group:0,tag:"Adjective",reason:"as-pale-as"},{match:"[%Adj|Past%] and #Adjective",group:0,tag:"Adjective",reason:"faled-and-oppressive"},{match:"or [#PastTense] #Noun",group:0,tag:"Adjective",notIf:"(#Copula|#Pronoun)",reason:"or-heightened-emotion"},{match:"(become|became|becoming|becomes) [#Verb]",group:0,tag:"Adjective",reason:"become-verb"},{match:"#Possessive [#PastTense] #Noun",group:0,tag:"Adjective",reason:"declared-intentions"},{match:"#Copula #Pronoun [%Adj|Present%]",group:0,tag:"Adjective",reason:"is-he-cool"},{match:"#Copula [%Adj|Past%] with",group:0,tag:"Adjective",notIf:"(associated|worn|baked|aged|armed|bound|fried|loaded|mixed|packed|pumped|filled|sealed)",reason:"is-crowded-with"},{match:"#Copula #Adverb? [%Adj|Present%]$",group:0,tag:"Adjective",reason:"was-empty$"}],IF=[{match:"[still] #Adjective",group:0,tag:"Adverb",reason:"still-advb"},{match:"[still] #Verb",group:0,tag:"Adverb",reason:"still-verb"},{match:"[so] #Adjective",group:0,tag:"Adverb",reason:"so-adv"},{match:"[way] #Comparative",group:0,tag:"Adverb",reason:"way-adj"},{match:"[way] #Adverb #Adjective",group:0,tag:"Adverb",reason:"way-too-adj"},{match:"[all] #Verb",group:0,tag:"Adverb",reason:"all-verb"},{match:"#Verb [like]",group:0,notIf:"(#Modal|#PhrasalVerb)",tag:"Adverb",reason:"verb-like"},{match:"(barely|hardly) even",tag:"Adverb",reason:"barely-even"},{match:"[even] #Verb",group:0,tag:"Adverb",reason:"even-walk"},{match:"[even] #Comparative",group:0,tag:"Adverb",reason:"even-worse"},{match:"[even] (#Determiner|#Possessive)",group:0,tag:"#Adverb",reason:"even-the"},{match:"even left",tag:"#Adverb #Verb",reason:"even-left"},{match:"[way] #Adjective",group:0,tag:"#Adverb",reason:"way-over"},{match:"#PresentTense [(hard|quick|bright|slow|fast|backwards|forwards)]",notIf:"#Copula",group:0,tag:"Adverb",reason:"lazy-ly"},{match:"[much] #Adjective",group:0,tag:"Adverb",reason:"bit-1"},{match:"#Copula [#Adverb]$",group:0,tag:"Adjective",reason:"is-well"},{match:"a [(little|bit|wee) bit?] #Adjective",group:0,tag:"Adverb",reason:"a-bit-cold"},{match:"[(super|pretty)] #Adjective",group:0,tag:"Adverb",reason:"super-strong"},{match:"(become|fall|grow) #Adverb? [#PastTense]",group:0,tag:"Adjective",reason:"overly-weakened"},{match:"(a|an) #Adverb [#Participle] #Noun",group:0,tag:"Adjective",reason:"completely-beaten"},{match:"#Determiner #Adverb? [close]",group:0,tag:"Adjective",reason:"a-close"},{match:"#Gerund #Adverb? [close]",group:0,tag:"Adverb",notIf:"(getting|becoming|feeling)",reason:"being-close"},{match:"(the|those|these|a|an) [#Participle] #Noun",group:0,tag:"Adjective",reason:"blown-motor"},{match:"(#PresentTense|#PastTense) [back]",group:0,tag:"Adverb",notIf:"(#PhrasalVerb|#Copula)",reason:"charge-back"},{match:"#Verb [around]",group:0,tag:"Adverb",notIf:"#PhrasalVerb",reason:"send-around"},{match:"[later] #PresentTense",group:0,tag:"Adverb",reason:"later-say"},{match:"#Determiner [well] !#PastTense?",group:0,tag:"Noun",reason:"the-well"},{match:"#Adjective [enough]",group:0,tag:"Adverb",reason:"high-enough"}],zF=[{match:"#Holiday (day|eve)",tag:"Holiday",reason:"holiday-day"},{match:"#Value of #Month",tag:"Date",reason:"value-of-month"},{match:"#Cardinal #Month",tag:"Date",reason:"cardinal-month"},{match:"#Month #Value to #Value",tag:"Date",reason:"value-to-value"},{match:"#Month the #Value",tag:"Date",reason:"month-the-value"},{match:"(#WeekDay|#Month) #Value",tag:"Date",reason:"date-value"},{match:"#Value (#WeekDay|#Month)",tag:"Date",reason:"value-date"},{match:"(#TextValue && #Date) #TextValue",tag:"Date",reason:"textvalue-date"},{match:"#Month #NumberRange",tag:"Date",reason:"aug 20-21"},{match:"#WeekDay #Month #Ordinal",tag:"Date",reason:"week mm-dd"},{match:"#Month #Ordinal #Cardinal",tag:"Date",reason:"mm-dd-yyy"},{match:"(#Place|#Demonmym|#Time) (standard|daylight|central|mountain)? time",tag:"Timezone",reason:"std-time"},{match:"(eastern|mountain|pacific|central|atlantic) (standard|daylight|summer)? time",tag:"Timezone",reason:"eastern-time"},{match:"#Time [(eastern|mountain|pacific|central|est|pst|gmt)]",group:0,tag:"Timezone",reason:"5pm-central"},{match:"(central|western|eastern) european time",tag:"Timezone",reason:"cet"}],jF=[{match:"[sun] the #Ordinal",tag:"WeekDay",reason:"sun-the-5th"},{match:"[sun] #Date",group:0,tag:"WeekDay",reason:"sun-feb"},{match:"#Date (on|this|next|last|during)? [sun]",group:0,tag:"WeekDay",reason:"1pm-sun"},{match:"(in|by|before|during|on|until|after|of|within|all) [sat]",group:0,tag:"WeekDay",reason:"sat"},{match:"(in|by|before|during|on|until|after|of|within|all) [wed]",group:0,tag:"WeekDay",reason:"wed"},{match:"(in|by|before|during|on|until|after|of|within|all) [march]",group:0,tag:"Month",reason:"march"},{match:"[sat] #Date",group:0,tag:"WeekDay",reason:"sat-feb"},{match:"#Preposition [(march|may)]",group:0,tag:"Month",reason:"in-month"},{match:"(this|next|last) (march|may) !#Infinitive?",tag:"#Date #Month",reason:"this-month"},{match:"(march|may) the? #Value",tag:"#Month #Date #Date",reason:"march-5th"},{match:"#Value of? (march|may)",tag:"#Date #Date #Month",reason:"5th-of-march"},{match:"[(march|may)] .? #Date",group:0,tag:"Month",reason:"march-and-feb"},{match:"#Date .? [(march|may)]",group:0,tag:"Month",reason:"feb-and-march"},{match:"#Adverb [(march|may)]",group:0,tag:"Verb",reason:"quickly-march"},{match:"[(march|may)] #Adverb",group:0,tag:"Verb",reason:"march-quickly"},{match:"#Value (am|pm)",tag:"Time",reason:"2-am"}],qF="(feel|sense|process|rush|side|bomb|bully|challenge|cover|crush|dump|exchange|flow|function|issue|lecture|limit|march|process)",RF=[{match:"(the|any) [more]",group:0,tag:"Singular",reason:"more-noun"},{match:"[more] #Noun",group:0,tag:"Adjective",reason:"more-noun"},{match:"(right|rights) of .",tag:"Noun",reason:"right-of"},{match:"a [bit]",group:0,tag:"Singular",reason:"bit-2"},{match:"a [must]",group:0,tag:"Singular",reason:"must-2"},{match:"(we|us) [all]",group:0,tag:"Noun",reason:"we all"},{match:"due to [#Verb]",group:0,tag:"Noun",reason:"due-to"},{match:"some [#Verb] #Plural",group:0,tag:"Noun",reason:"determiner6"},{match:"#Possessive #Ordinal [#PastTense]",group:0,tag:"Noun",reason:"first-thought"},{match:"(the|this|those|these) #Adjective [%Verb|Noun%]",group:0,tag:"Noun",notIf:"#Copula",reason:"the-adj-verb"},{match:"(the|this|those|these) #Adverb #Adjective [#Verb]",group:0,tag:"Noun",reason:"determiner4"},{match:"the [#Verb] #Preposition .",group:0,tag:"Noun",reason:"determiner1"},{match:"(a|an|the) [#Verb] of",group:0,tag:"Noun",reason:"the-verb-of"},{match:"#Determiner #Noun of [#Verb]",group:0,tag:"Noun",notIf:"#Gerund",reason:"noun-of-noun"},{match:"#PastTense #Preposition [#PresentTense]",group:0,notIf:"#Gerund",tag:"Noun",reason:"ended-in-ruins"},{match:"#Conjunction [u]",group:0,tag:"Pronoun",reason:"u-pronoun-2"},{match:"[u] #Verb",group:0,tag:"Pronoun",reason:"u-pronoun-1"},{match:"#Determiner [(western|eastern|northern|southern|central)] #Noun",group:0,tag:"Noun",reason:"western-line"},{match:"(#Singular && @hasHyphen) #PresentTense",tag:"Noun",reason:"hyphen-verb"},{match:"is no [#Verb]",group:0,tag:"Noun",reason:"is-no-verb"},{match:"do [so]",group:0,tag:"Noun",reason:"so-noun"},{match:"#Determiner [(shit|damn|hell)]",group:0,tag:"Noun",reason:"swears-noun"},{match:"to [(shit|hell)]",group:0,tag:"Noun",reason:"to-swears"},{match:"(the|these) [#Singular] (were|are)",group:0,tag:"Plural",reason:"singular-were"},{match:"a #Noun+ or #Adverb+? [#Verb]",group:0,tag:"Noun",reason:"noun-or-noun"},{match:"(the|those|these|a|an) #Adjective? [#PresentTense #Particle?]",group:0,tag:"Noun",notIf:"(seem|appear|include|#Gerund|#Copula)",reason:"det-inf"},{match:"#Noun #Actor",tag:"Actor",notIf:"(#Person|#Pronoun)",reason:"thing-doer"},{match:"#Gerund #Actor",tag:"Actor",reason:"gerund-doer"},{match:"co #Singular",tag:"Actor",reason:"co-noun"},{match:"[#Noun+] #Actor",group:0,tag:"Actor",notIf:"(#Honorific|#Pronoun|#Possessive)",reason:"air-traffic-controller"},{match:"(urban|cardiac|cardiovascular|respiratory|medical|clinical|visual|graphic|creative|dental|exotic|fine|certified|registered|technical|virtual|professional|amateur|junior|senior|special|pharmaceutical|theoretical)+ #Noun? #Actor",tag:"Actor",reason:"fine-artist"},{match:"#Noun+ (coach|chef|king|engineer|fellow|personality|boy|girl|man|woman|master)",tag:"Actor",reason:"dance-coach"},{match:"chief . officer",tag:"Actor",reason:"chief-x-officer"},{match:"chief of #Noun+",tag:"Actor",reason:"chief-of-police"},{match:"senior? vice? president of #Noun+",tag:"Actor",reason:"president-of"},{match:"#Determiner [sun]",group:0,tag:"Singular",reason:"the-sun"},{match:"#Verb (a|an) [#Value]$",group:0,tag:"Singular",reason:"did-a-value"},{match:"the [(can|will|may)]",group:0,tag:"Singular",reason:"the can"},{match:"#FirstName #Acronym? (#Possessive && #LastName)",tag:"Possessive",reason:"name-poss"},{match:"#Organization+ #Possessive",tag:"Possessive",reason:"org-possessive"},{match:"#Place+ #Possessive",tag:"Possessive",reason:"place-possessive"},{match:"#Possessive #PresentTense #Particle?",notIf:"(#Gerund|her)",tag:"Noun",reason:"possessive-verb"},{match:"(my|our|their|her|his|its) [(#Plural && #Actor)] #Noun",tag:"Possessive",reason:"my-dads"},{match:"#Value of a [second]",group:0,unTag:"Value",tag:"Singular",reason:"10th-of-a-second"},{match:"#Value [seconds]",group:0,unTag:"Value",tag:"Plural",reason:"10-seconds"},{match:"in [#Infinitive]",group:0,tag:"Singular",reason:"in-age"},{match:"a [#Adjective] #Preposition",group:0,tag:"Noun",reason:"a-minor-in"},{match:"#Determiner [#Singular] said",group:0,tag:"Actor",reason:"the-actor-said"},{match:`#Determiner #Noun [${qF}] !(#Preposition|to|#Adverb)?`,group:0,tag:"Noun",reason:"the-noun-sense"},{match:"[#PresentTense] (of|by|for) (a|an|the) #Noun #Copula",group:0,tag:"Plural",reason:"photographs-of"},{match:"#Infinitive and [%Noun|Verb%]",group:0,tag:"Infinitive",reason:"fight and win"},{match:"#Noun and [#Verb] and #Noun",group:0,tag:"Noun",reason:"peace-and-flowers"},{match:"the #Cardinal [%Adj|Noun%]",group:0,tag:"Noun",reason:"the-1992-classic"},{match:"#Copula the [%Adj|Noun%] #Noun",group:0,tag:"Adjective",reason:"the-premier-university"},{match:"i #Verb [me] #Noun",group:0,tag:"Possessive",reason:"scottish-me"},{match:"[#PresentTense] (music|class|lesson|night|party|festival|league|ceremony)",group:0,tag:"Noun",reason:"dance-music"},{match:"[wit] (me|it)",group:0,tag:"Presposition",reason:"wit-me"},{match:"#PastTense #Possessive [#Verb]",group:0,tag:"Noun",notIf:"(saw|made)",reason:"left-her-boots"},{match:"#Value [%Plural|Verb%]",group:0,tag:"Plural",notIf:"(one|1|a|an)",reason:"35-signs"},{match:"had [#PresentTense]",group:0,tag:"Noun",notIf:"(#Gerund|come|become)",reason:"had-time"},{match:"%Adj|Noun% %Noun|Verb%",tag:"#Adjective #Noun",notIf:"#ProperNoun #Noun",reason:"instant-access"},{match:"#Determiner [%Adj|Noun%] #Conjunction",group:0,tag:"Noun",reason:"a-rep-to"},{match:"#Adjective #Noun [%Plural|Verb%]$",group:0,tag:"Plural",notIf:"#Pronoun",reason:"near-death-experiences"},{match:"#Possessive #Noun [%Plural|Verb%]$",group:0,tag:"Plural",reason:"your-guild-colors"}],LF=[{match:"(this|that|the|a|an) [#Gerund #Infinitive]",group:0,tag:"Singular",reason:"the-planning-process"},{match:"(that|the) [#Gerund #PresentTense]",group:0,ifNo:"#Copula",tag:"Plural",reason:"the-paving-stones"},{match:"#Determiner [#Gerund] #Noun",group:0,tag:"Adjective",reason:"the-gerund-noun"},{match:"#Pronoun #Infinitive [#Gerund] #PresentTense",group:0,tag:"Noun",reason:"tipping-sucks"},{match:"#Adjective [#Gerund]",group:0,tag:"Noun",notIf:"(still|even|just)",reason:"early-warning"},{match:"[#Gerund] #Adverb? not? #Copula",group:0,tag:"Activity",reason:"gerund-copula"},{match:"#Copula [(#Gerund|#Activity)] #Copula",group:0,tag:"Gerund",reason:"are-doing-is"},{match:"[#Gerund] #Modal",group:0,tag:"Activity",reason:"gerund-modal"},{match:"#Singular for [%Noun|Gerund%]",group:0,tag:"Gerund",reason:"noun-for-gerund"},{match:"#Comparative (for|at) [%Noun|Gerund%]",group:0,tag:"Gerund",reason:"better-for-gerund"},{match:"#PresentTense the [#Gerund]",group:0,tag:"Noun",reason:"keep-the-touching"}],HF=[{match:"#Infinitive (this|that|the) [#Infinitive]",group:0,tag:"Noun",reason:"do-this-dance"},{match:"#Gerund #Determiner [#Infinitive]",group:0,tag:"Noun",reason:"running-a-show"},{match:"#Determiner (only|further|just|more|backward) [#Infinitive]",group:0,tag:"Noun",reason:"the-only-reason"},{match:"(the|this|a|an) [#Infinitive] #Adverb? #Verb",group:0,tag:"Noun",reason:"determiner5"},{match:"#Determiner #Adjective #Adjective? [#Infinitive]",group:0,tag:"Noun",reason:"a-nice-inf"},{match:"#Determiner #Demonym [#PresentTense]",group:0,tag:"Noun",reason:"mexican-train"},{match:"#Adjective #Noun+ [#Infinitive] #Copula",group:0,tag:"Noun",reason:"career-move"},{match:"at some [#Infinitive]",group:0,tag:"Noun",reason:"at-some-inf"},{match:"(go|goes|went) to [#Infinitive]",group:0,tag:"Noun",reason:"goes-to-verb"},{match:"(a|an) #Adjective? #Noun [#Infinitive] (#Preposition|#Noun)",group:0,notIf:"from",tag:"Noun",reason:"a-noun-inf"},{match:"(a|an) #Noun [#Infinitive]$",group:0,tag:"Noun",reason:"a-noun-inf2"},{match:"#Gerund #Adjective? for [#Infinitive]",group:0,tag:"Noun",reason:"running-for"},{match:"about [#Infinitive]",group:0,tag:"Singular",reason:"about-love"},{match:"#Plural on [#Infinitive]",group:0,tag:"Noun",reason:"on-stage"},{match:"any [#Infinitive]",group:0,tag:"Noun",reason:"any-charge"},{match:"no [#Infinitive]",group:0,tag:"Noun",reason:"no-doubt"},{match:"number of [#PresentTense]",group:0,tag:"Noun",reason:"number-of-x"},{match:"(taught|teaches|learns|learned) [#PresentTense]",group:0,tag:"Noun",reason:"teaches-x"},{match:"(try|use|attempt|build|make) [#Verb #Particle?]",notIf:"(#Copula|#Noun|sure|fun|up)",group:0,tag:"Noun",reason:"do-verb"},{match:"^[#Infinitive] (is|was)",group:0,tag:"Noun",reason:"checkmate-is"},{match:"#Infinitive much [#Infinitive]",group:0,tag:"Noun",reason:"get-much"},{match:"[cause] #Pronoun #Verb",group:0,tag:"Conjunction",reason:"cause-cuz"},{match:"the #Singular [#Infinitive] #Noun",group:0,tag:"Noun",notIf:"#Pronoun",reason:"cardio-dance"},{match:"#Determiner #Modal [#Noun]",group:0,tag:"PresentTense",reason:"should-smoke"},{match:"this [#Plural]",group:0,tag:"PresentTense",notIf:"(#Preposition|#Date)",reason:"this-verbs"},{match:"#Noun that [#Plural]",group:0,tag:"PresentTense",notIf:"(#Preposition|#Pronoun|way)",reason:"voice-that-rocks"},{match:"that [#Plural] to",group:0,tag:"PresentTense",notIf:"#Preposition",reason:"that-leads-to"},{match:"(let|make|made) (him|her|it|#Person|#Place|#Organization)+ [#Singular] (a|an|the|it)",group:0,tag:"Infinitive",reason:"let-him-glue"},{match:"#Verb (all|every|each|most|some|no) [#PresentTense]",notIf:"#Modal",group:0,tag:"Noun",reason:"all-presentTense"},{match:"(had|have|#PastTense) #Adjective [#PresentTense]",group:0,tag:"Noun",notIf:"better",reason:"adj-presentTense"},{match:"#Value #Adjective [#PresentTense]",group:0,tag:"Noun",notIf:"#Copula",reason:"one-big-reason"},{match:"#PastTense #Adjective+ [#PresentTense]",group:0,tag:"Noun",notIf:"(#Copula|better)",reason:"won-wide-support"},{match:"(many|few|several|couple) [#PresentTense]",group:0,tag:"Noun",notIf:"#Copula",reason:"many-poses"},{match:"#Determiner #Adverb #Adjective [%Noun|Verb%]",group:0,tag:"Noun",notIf:"#Copula",reason:"very-big-dream"},{match:"from #Noun to [%Noun|Verb%]",group:0,tag:"Noun",reason:"start-to-finish"},{match:"(for|with|of) #Noun (and|or|not) [%Noun|Verb%]",group:0,tag:"Noun",notIf:"#Pronoun",reason:"for-food-and-gas"},{match:"#Adjective #Adjective [#PresentTense]",group:0,tag:"Noun",notIf:"#Copula",reason:"adorable-little-store"},{match:"#Gerund #Adverb? #Comparative [#PresentTense]",group:0,tag:"Noun",notIf:"#Copula",reason:"higher-costs"},{match:"(#Noun && @hasComma) #Noun (and|or) [#PresentTense]",group:0,tag:"Noun",notIf:"#Copula",reason:"noun-list"},{match:"(many|any|some|several) [#PresentTense] for",group:0,tag:"Noun",reason:"any-verbs-for"},{match:"to #PresentTense #Noun [#PresentTense] #Preposition",group:0,tag:"Noun",reason:"gas-exchange"},{match:"#PastTense (until|as|through|without) [#PresentTense]",group:0,tag:"Noun",reason:"waited-until-release"},{match:"#Gerund like #Adjective? [#PresentTense]",group:0,tag:"Plural",reason:"like-hot-cakes"},{match:"some #Adjective [#PresentTense]",group:0,tag:"Noun",reason:"some-reason"},{match:"for some [#PresentTense]",group:0,tag:"Noun",reason:"for-some-reason"},{match:"(same|some|the|that|a) kind of [#PresentTense]",group:0,tag:"Noun",reason:"some-kind-of"},{match:"(same|some|the|that|a) type of [#PresentTense]",group:0,tag:"Noun",reason:"some-type-of"},{match:"#Gerund #Adjective #Preposition [#PresentTense]",group:0,tag:"Noun",reason:"doing-better-for-x"},{match:"(get|got|have) #Comparative [#PresentTense]",group:0,tag:"Noun",reason:"got-better-aim"},{match:"whose [#PresentTense] #Copula",group:0,tag:"Noun",reason:"whos-name-was"},{match:"#PhrasalVerb #Particle #Preposition [#PresentTense]",group:0,tag:"Noun",reason:"given-up-on-x"},{match:"there (are|were) #Adjective? [#PresentTense]",group:0,tag:"Plural",reason:"there-are"},{match:"#Value [#PresentTense] of",group:0,notIf:"(one|1|#Copula|#Infinitive)",tag:"Plural",reason:"2-trains"},{match:"[#PresentTense] (are|were) #Adjective",group:0,tag:"Plural",reason:"compromises-are-possible"},{match:"^[(hope|guess|thought|think)] #Pronoun #Verb",group:0,tag:"Infinitive",reason:"suppose-i"},{match:"#Possessive #Adjective [#Verb]",group:0,tag:"Noun",notIf:"#Copula",reason:"our-full-support"},{match:"[(tastes|smells)] #Adverb? #Adjective",group:0,tag:"PresentTense",reason:"tastes-good"},{match:"#Copula #Gerund [#PresentTense] !by?",group:0,tag:"Noun",notIf:"going",reason:"ignoring-commute"},{match:"#Determiner #Adjective? [(shed|thought|rose|bid|saw|spelt)]",group:0,tag:"Noun",reason:"noun-past"},{match:"how to [%Noun|Verb%]",group:0,tag:"Infinitive",reason:"how-to-noun"},{match:"which [%Noun|Verb%] #Noun",group:0,tag:"Infinitive",reason:"which-boost-it"},{match:"#Gerund [%Plural|Verb%]",group:0,tag:"Plural",reason:"asking-questions"},{match:"(ready|available|difficult|hard|easy|made|attempt|try) to [%Noun|Verb%]",group:0,tag:"Infinitive",reason:"ready-to-noun"},{match:"(bring|went|go|drive|run|bike) to [%Noun|Verb%]",group:0,tag:"Noun",reason:"bring-to-noun"},{match:"#Modal #Noun [%Noun|Verb%]",group:0,tag:"Infinitive",reason:"would-you-look"},{match:"#Copula just [#Infinitive]",group:0,tag:"Noun",reason:"is-just-spam"},{match:"^%Noun|Verb% %Plural|Verb%",tag:"Imperative #Plural",reason:"request-copies"},{match:"#Adjective #Plural and [%Plural|Verb%]",group:0,tag:"#Plural",reason:"pickles-and-drinks"},{match:"#Determiner #Year [#Verb]",group:0,tag:"Noun",reason:"the-1968-film"},{match:"#Determiner [#PhrasalVerb #Particle]",group:0,tag:"Noun",reason:"the-break-up"},{match:"#Determiner [%Adj|Noun%] #Noun",group:0,tag:"Adjective",notIf:"(#Pronoun|#Possessive|#ProperNoun)",reason:"the-individual-goals"},{match:"[%Noun|Verb%] or #Infinitive",group:0,tag:"Infinitive",reason:"work-or-prepare"},{match:"to #Infinitive [#PresentTense]",group:0,tag:"Noun",notIf:"(#Gerund|#Copula|help)",reason:"to-give-thanks"},{match:"[#Noun] me",group:0,tag:"Verb",reason:"kills-me"},{match:"%Plural|Verb% %Plural|Verb%",tag:"#PresentTense #Plural",reason:"removes-wrinkles"}],GF=[{match:"#Money and #Money #Currency?",tag:"Money",reason:"money-and-money"},{match:"#Value #Currency [and] #Value (cents|ore|centavos|sens)",group:0,tag:"money",reason:"and-5-cents"},{match:"#Value (mark|rand|won|rub|ore)",tag:"#Money #Currency",reason:"4-mark"},{match:"a pound",tag:"#Money #Unit",reason:"a-pound"},{match:"#Value (pound|pounds)",tag:"#Money #Unit",reason:"4-pounds"}],VF=[{match:"[(half|quarter)] of? (a|an)",group:0,tag:"Fraction",reason:"millionth"},{match:"#Adverb [half]",group:0,tag:"Fraction",reason:"nearly-half"},{match:"[half] the",group:0,tag:"Fraction",reason:"half-the"},{match:"#Cardinal and a half",tag:"Fraction",reason:"and-a-half"},{match:"#Value (halves|halfs|quarters)",tag:"Fraction",reason:"two-halves"},{match:"a #Ordinal",tag:"Fraction",reason:"a-quarter"},{match:"[#Cardinal+] (#Fraction && /s$/)",tag:"Fraction",reason:"seven-fifths"},{match:"[#Cardinal+ #Ordinal] of .",group:0,tag:"Fraction",reason:"ordinal-of"},{match:"[(#NumericValue && #Ordinal)] of .",group:0,tag:"Fraction",reason:"num-ordinal-of"},{match:"(a|one) #Cardinal?+ #Ordinal",tag:"Fraction",reason:"a-ordinal"},{match:"#Cardinal+ out? of every? #Cardinal",tag:"Fraction",reason:"out-of"}],UF=[{match:"#Cardinal [second]",tag:"Unit",reason:"one-second"},{match:"!once? [(a|an)] (#Duration|hundred|thousand|million|billion|trillion)",group:0,tag:"Value",reason:"a-is-one"},{match:"1 #Value #PhoneNumber",tag:"PhoneNumber",reason:"1-800-Value"},{match:"#NumericValue #PhoneNumber",tag:"PhoneNumber",reason:"(800) PhoneNumber"},{match:"#Demonym #Currency",tag:"Currency",reason:"demonym-currency"},{match:"#Value [(buck|bucks|grand)]",group:0,tag:"Currency",reason:"value-bucks"},{match:"[#Value+] #Currency",group:0,tag:"Money",reason:"15 usd"},{match:"[second] #Noun",group:0,tag:"Ordinal",reason:"second-noun"},{match:"#Value+ [#Currency]",group:0,tag:"Unit",reason:"5-yan"},{match:"#Value [(foot|feet)]",group:0,tag:"Unit",reason:"foot-unit"},{match:"#Value [#Abbreviation]",group:0,tag:"Unit",reason:"value-abbr"},{match:"#Value [k]",group:0,tag:"Unit",reason:"value-k"},{match:"#Unit an hour",tag:"Unit",reason:"unit-an-hour"},{match:"(minus|negative) #Value",tag:"Value",reason:"minus-value"},{match:"#Value (point|decimal) #Value",tag:"Value",reason:"value-point-value"},{match:"#Determiner [(half|quarter)] #Ordinal",group:0,tag:"Value",reason:"half-ordinal"},{match:"#Multiple+ and #Value",tag:"Value",reason:"magnitude-and-value"},{match:"#Value #Unit [(per|an) (hr|hour|sec|second|min|minute)]",group:0,tag:"Unit",reason:"12-miles-per-second"},{match:"#Value [(square|cubic)] #Unit",group:0,tag:"Unit",reason:"square-miles"}],WF=[{match:"#Copula [(#Noun|#PresentTense)] #LastName",group:0,tag:"FirstName",reason:"copula-noun-lastname"},{match:"(sister|pope|brother|father|aunt|uncle|grandpa|grandfather|grandma) #ProperNoun",tag:"Person",reason:"lady-titlecase",safe:!0},{match:"#FirstName [#Determiner #Noun] #LastName",group:0,tag:"Person",reason:"first-noun-last"},{match:"#ProperNoun (b|c|d|e|f|g|h|j|k|l|m|n|o|p|q|r|s|t|u|v|w|x|y|z) #ProperNoun",tag:"Person",reason:"titlecase-acronym-titlecase",safe:!0},{match:"#Acronym #LastName",tag:"Person",reason:"acronym-lastname",safe:!0},{match:"#Person (jr|sr|md)",tag:"Person",reason:"person-honorific"},{match:"#Honorific #Acronym",tag:"Person",reason:"Honorific-TitleCase"},{match:"#Person #Person the? #RomanNumeral",tag:"Person",reason:"roman-numeral"},{match:"#FirstName [/^[^aiurck]$/]",group:0,tag:["Acronym","Person"],reason:"john-e"},{match:"#Noun van der? #Noun",tag:"Person",reason:"van der noun",safe:!0},{match:"(king|queen|prince|saint|lady) of #Noun",tag:"Person",reason:"king-of-noun",safe:!0},{match:"(prince|lady) #Place",tag:"Person",reason:"lady-place"},{match:"(king|queen|prince|saint) #ProperNoun",tag:"Person",notIf:"#Place",reason:"saint-foo"},{match:"al (#Person|#ProperNoun)",tag:"Person",reason:"al-borlen",safe:!0},{match:"#FirstName de #Noun",tag:"Person",reason:"bill-de-noun"},{match:"#FirstName (bin|al) #Noun",tag:"Person",reason:"bill-al-noun"},{match:"#FirstName #Acronym #ProperNoun",tag:"Person",reason:"bill-acronym-title"},{match:"#FirstName #FirstName #ProperNoun",tag:"Person",reason:"bill-firstname-title"},{match:"#Honorific #FirstName? #ProperNoun",tag:"Person",reason:"dr-john-Title"},{match:"#FirstName the #Adjective",tag:"Person",reason:"name-the-great"},{match:"#ProperNoun (van|al|bin) #ProperNoun",tag:"Person",reason:"title-van-title",safe:!0},{match:"#ProperNoun (de|du) la? #ProperNoun",tag:"Person",notIf:"#Place",reason:"title-de-title"},{match:"#Singular #Acronym #LastName",tag:"#FirstName #Person .",reason:"title-acro-noun",safe:!0},{match:"[#ProperNoun] #Person",group:0,tag:"Person",reason:"proper-person",safe:!0},{match:"#Person [#ProperNoun #ProperNoun]",group:0,tag:"Person",notIf:"#Possessive",reason:"three-name-person",safe:!0},{match:"#FirstName #Acronym? [#ProperNoun]",group:0,tag:"LastName",notIf:"#Possessive",reason:"firstname-titlecase"},{match:"#FirstName [#FirstName]",group:0,tag:"LastName",reason:"firstname-firstname"},{match:"#FirstName #Acronym #Noun",tag:"Person",reason:"n-acro-noun",safe:!0},{match:"#FirstName [(de|di|du|van|von)] #Person",group:0,tag:"LastName",reason:"de-firstname"},{match:"[(lieutenant|corporal|sergeant|captain|qeen|king|admiral|major|colonel|marshal|president|queen|king)+] #ProperNoun",group:0,tag:"Honorific",reason:"seargeant-john"},{match:"[(private|general|major|rear|prime|field|count|miss)] #Honorific? #Person",group:0,tag:["Honorific","Person"],reason:"ambg-honorifics"},{match:"#Honorific #FirstName [#Singular]",group:0,tag:"LastName",notIf:"#Possessive",reason:"dr-john-foo",safe:!0},{match:"[(his|her) (majesty|honour|worship|excellency|honorable)] #Person",group:0,tag:"Honorific",reason:"his-excellency"},{match:"#Honorific #Actor",tag:"Honorific",reason:"Lieutenant colonel"},{match:"(first|second|third|1st|2nd|3rd) #Actor",tag:"Honorific",reason:"first lady"},{match:"#Person #RomanNumeral",tag:"Person",reason:"louis-IV"}],JF=[{match:"#FirstName #Noun$",tag:". #LastName",notIf:"(#Possessive|#Organization|#Place|#Pronoun|@hasTitleCase)",reason:"firstname-noun"},{match:"%Person|Date% #Acronym? #ProperNoun",tag:"Person",reason:"jan-thierson"},{match:"%Person|Noun% #Acronym? #ProperNoun",tag:"Person",reason:"switch-person",safe:!0},{match:"%Person|Noun% #Organization",tag:"Organization",reason:"olive-garden"},{match:"%Person|Verb% #Acronym? #ProperNoun",tag:"Person",reason:"verb-propernoun",ifNo:"#Actor"},{match:"[%Person|Verb%] (will|had|has|said|says|told|did|learned|wants|wanted)",group:0,tag:"Person",reason:"person-said"},{match:"[%Person|Place%] (harbor|harbour|pier|town|city|place|dump|landfill)",group:0,tag:"Place",reason:"sydney-harbour"},{match:"(west|east|north|south) [%Person|Place%]",group:0,tag:"Place",reason:"east-sydney"},{match:"#Modal [%Person|Verb%]",group:0,tag:"Verb",reason:"would-mark"},{match:"#Adverb [%Person|Verb%]",group:0,tag:"Verb",reason:"really-mark"},{match:"[%Person|Verb%] (#Adverb|#Comparative)",group:0,tag:"Verb",reason:"drew-closer"},{match:"%Person|Verb% #Person",tag:"Person",reason:"rob-smith"},{match:"%Person|Verb% #Acronym #ProperNoun",tag:"Person",reason:"rob-a-smith"},{match:"[will] #Verb",group:0,tag:"Modal",reason:"will-verb"},{match:"(will && @isTitleCase) #ProperNoun",tag:"Person",reason:"will-name"},{match:"(#FirstName && !#Possessive) [#Singular] #Verb",group:0,safe:!0,tag:"LastName",reason:"jack-layton"},{match:"^[#Singular] #Person #Verb",group:0,safe:!0,tag:"Person",reason:"sherwood-anderson"},{match:"(a|an) [#Person]$",group:0,unTag:"Person",reason:"a-warhol"}],KF=[{match:"#Copula (pretty|dead|full|well|sure) (#Adjective|#Noun)",tag:"#Copula #Adverb #Adjective",reason:"sometimes-adverb"},{match:"(#Pronoun|#Person) (had|#Adverb)? [better] #PresentTense",group:0,tag:"Modal",reason:"i-better"},{match:"(#Modal|i|they|we|do) not? [like]",group:0,tag:"PresentTense",reason:"modal-like"},{match:"#Noun #Adverb? [left]",group:0,tag:"PastTense",reason:"left-verb"},{match:"will #Adverb? not? #Adverb? [be] #Gerund",group:0,tag:"Copula",reason:"will-be-copula"},{match:"will #Adverb? not? #Adverb? [be] #Adjective",group:0,tag:"Copula",reason:"be-copula"},{match:"[march] (up|down|back|toward)",notIf:"#Date",group:0,tag:"Infinitive",reason:"march-to"},{match:"#Modal [march]",group:0,tag:"Infinitive",reason:"must-march"},{match:"[may] be",group:0,tag:"Verb",reason:"may-be"},{match:"[(subject|subjects|subjected)] to",group:0,tag:"Verb",reason:"subject to"},{match:"[home] to",group:0,tag:"PresentTense",reason:"home to"},{match:"[open] #Determiner",group:0,tag:"Infinitive",reason:"open-the"},{match:"(were|was) being [#PresentTense]",group:0,tag:"PastTense",reason:"was-being"},{match:"(had|has|have) [been /en$/]",group:0,tag:"Auxiliary Participle",reason:"had-been-broken"},{match:"(had|has|have) [been /ed$/]",group:0,tag:"Auxiliary PastTense",reason:"had-been-smoked"},{match:"(had|has) #Adverb? [been] #Adverb? #PastTense",group:0,tag:"Auxiliary",reason:"had-been-adj"},{match:"(had|has) to [#Noun] (#Determiner|#Possessive)",group:0,tag:"Infinitive",reason:"had-to-noun"},{match:"have [#PresentTense]",group:0,tag:"PastTense",notIf:"(come|gotten)",reason:"have-read"},{match:"(does|will|#Modal) that [work]",group:0,tag:"PastTense",reason:"does-that-work"},{match:"[(sound|sounds)] #Adjective",group:0,tag:"PresentTense",reason:"sounds-fun"},{match:"[(look|looks)] #Adjective",group:0,tag:"PresentTense",reason:"looks-good"},{match:"[(start|starts|stop|stops|begin|begins)] #Gerund",group:0,tag:"Verb",reason:"starts-thinking"},{match:"(have|had) read",tag:"Modal #PastTense",reason:"read-read"},{match:"(is|was|were) [(under|over) #PastTense]",group:0,tag:"Adverb Adjective",reason:"was-under-cooked"},{match:"[shit] (#Determiner|#Possessive|them)",group:0,tag:"Verb",reason:"swear1-verb"},{match:"[damn] (#Determiner|#Possessive|them)",group:0,tag:"Verb",reason:"swear2-verb"},{match:"[fuck] (#Determiner|#Possessive|them)",group:0,tag:"Verb",reason:"swear3-verb"},{match:"#Plural that %Noun|Verb%",tag:". #Preposition #Infinitive",reason:"jobs-that-work"},{match:"[works] for me",group:0,tag:"PresentTense",reason:"works-for-me"},{match:"as #Pronoun [please]",group:0,tag:"Infinitive",reason:"as-we-please"},{match:"[(co|mis|de|inter|intra|pre|re|un|out|under|over|counter)] #Verb",group:0,tag:["Verb","Prefix"],notIf:"(#Copula|#PhrasalVerb)",reason:"co-write"},{match:"#PastTense and [%Adj|Past%]",group:0,tag:"PastTense",reason:"dressed-and-left"},{match:"[%Adj|Past%] and #PastTense",group:0,tag:"PastTense",reason:"dressed-and-left"},{match:"#Copula #Pronoun [%Adj|Past%]",group:0,tag:"Adjective",reason:"is-he-stoked"},{match:"to [%Noun|Verb%] #Preposition",group:0,tag:"Infinitive",reason:"to-dream-of"}],YF=[{match:"will (#Adverb|not)+? [have] (#Adverb|not)+? #Verb",group:0,tag:"Auxiliary",reason:"will-have-vb"},{match:"[#Copula] (#Adverb|not)+? (#Gerund|#PastTense)",group:0,tag:"Auxiliary",reason:"copula-walking"},{match:"[(#Modal|did)+] (#Adverb|not)+? #Verb",group:0,tag:"Auxiliary",reason:"modal-verb"},{match:"#Modal (#Adverb|not)+? [have] (#Adverb|not)+? [had] (#Adverb|not)+? #Verb",group:0,tag:"Auxiliary",reason:"would-have"},{match:"[(has|had)] (#Adverb|not)+? #PastTense",group:0,tag:"Auxiliary",reason:"had-walked"},{match:"[(do|does|did|will|have|had|has|got)] (not|#Adverb)+? #Verb",group:0,tag:"Auxiliary",reason:"have-had"},{match:"[about to] #Adverb? #Verb",group:0,tag:["Auxiliary","Verb"],reason:"about-to"},{match:"#Modal (#Adverb|not)+? [be] (#Adverb|not)+? #Verb",group:0,tag:"Auxiliary",reason:"would-be"},{match:"[(#Modal|had|has)] (#Adverb|not)+? [been] (#Adverb|not)+? #Verb",group:0,tag:"Auxiliary",reason:"had-been"},{match:"[(be|being|been)] #Participle",group:0,tag:"Auxiliary",reason:"being-driven"},{match:"[may] #Adverb? #Infinitive",group:0,tag:"Auxiliary",reason:"may-want"},{match:"#Copula (#Adverb|not)+? [(be|being|been)] #Adverb+? #PastTense",group:0,tag:"Auxiliary",reason:"being-walked"},{match:"will [be] #PastTense",group:0,tag:"Auxiliary",reason:"will-be-x"},{match:"[(be|been)] (#Adverb|not)+? #Gerund",group:0,tag:"Auxiliary",reason:"been-walking"},{match:"[used to] #PresentTense",group:0,tag:"Auxiliary",reason:"used-to-walk"},{match:"#Copula (#Adverb|not)+? [going to] #Adverb+? #PresentTense",group:0,tag:"Auxiliary",reason:"going-to-walk"},{match:"#Imperative [(me|him|her)]",group:0,tag:"Reflexive",reason:"tell-him"},{match:"(is|was) #Adverb? [no]",group:0,tag:"Negative",reason:"is-no"},{match:"[(been|had|became|came)] #PastTense",group:0,notIf:"#PhrasalVerb",tag:"Auxiliary",reason:"been-told"},{match:"[(being|having|getting)] #Verb",group:0,tag:"Auxiliary",reason:"being-born"},{match:"[be] #Gerund",group:0,tag:"Auxiliary",reason:"be-walking"},{match:"[better] #PresentTense",group:0,tag:"Modal",notIf:"(#Copula|#Gerund)",reason:"better-go"},{match:"even better",tag:"Adverb #Comparative",reason:"even-better"}],ZF=[{match:"(#Verb && @hasHyphen) up",tag:"PhrasalVerb",reason:"foo-up"},{match:"(#Verb && @hasHyphen) off",tag:"PhrasalVerb",reason:"foo-off"},{match:"(#Verb && @hasHyphen) over",tag:"PhrasalVerb",reason:"foo-over"},{match:"(#Verb && @hasHyphen) out",tag:"PhrasalVerb",reason:"foo-out"},{match:"[#Verb (in|out|up|down|off|back)] (on|in)",notIf:"#Copula",tag:"PhrasalVerb Particle",reason:"walk-in-on"},{match:"(lived|went|crept|go) [on] for",group:0,tag:"PhrasalVerb",reason:"went-on"},{match:"#Verb (up|down|in|on|for)$",tag:"PhrasalVerb #Particle",notIf:"#PhrasalVerb",reason:"come-down$"},{match:"help [(stop|end|make|start)]",group:0,tag:"Infinitive",reason:"help-stop"},{match:"#PhrasalVerb (in && #Particle) #Determiner",tag:"#Verb #Preposition #Determiner",unTag:"PhrasalVerb",reason:"work-in-the"},{match:"[(stop|start|finish|help)] #Gerund",group:0,tag:"Infinitive",reason:"start-listening"},{match:"#Verb (him|her|it|us|himself|herself|itself|everything|something) [(up|down)]",group:0,tag:"Adverb",reason:"phrasal-pronoun-advb"}],af="(i|we|they)",QF=[{match:"^do not? [#Infinitive #Particle?]",notIf:af,group:0,tag:"Imperative",reason:"do-eat"},{match:"^please do? not? [#Infinitive #Particle?]",group:0,tag:"Imperative",reason:"please-go"},{match:"^just do? not? [#Infinitive #Particle?]",group:0,tag:"Imperative",reason:"just-go"},{match:"^[#Infinitive] it #Comparative",notIf:af,group:0,tag:"Imperative",reason:"do-it-better"},{match:"^[#Infinitive] it (please|now|again|plz)",notIf:af,group:0,tag:"Imperative",reason:"do-it-please"},{match:"^[#Infinitive] (#Adjective|#Adverb)$",group:0,tag:"Imperative",notIf:"(so|such|rather|enough)",reason:"go-quickly"},{match:"^[#Infinitive] (up|down|over) #Determiner",group:0,tag:"Imperative",reason:"turn-down"},{match:"^[#Infinitive] (your|my|the|a|an|any|each|every|some|more|with|on)",group:0,notIf:"like",tag:"Imperative",reason:"eat-my-shorts"},{match:"^[#Infinitive] (him|her|it|us|me|there)",group:0,tag:"Imperative",reason:"tell-him"},{match:"^[#Infinitive] #Adjective #Noun$",group:0,tag:"Imperative",reason:"avoid-loud-noises"},{match:"^[#Infinitive] (#Adjective|#Adverb)? and #Infinitive",group:0,tag:"Imperative",reason:"call-and-reserve"},{match:"^(go|stop|wait|hurry) please?$",tag:"Imperative",reason:"go"},{match:"^(somebody|everybody) [#Infinitive]",group:0,tag:"Imperative",reason:"somebody-call"},{match:"^let (us|me) [#Infinitive]",group:0,tag:"Imperative",reason:"lets-leave"},{match:"^[(shut|close|open|start|stop|end|keep)] #Determiner #Noun",group:0,tag:"Imperative",reason:"shut-the-door"},{match:"^[#PhrasalVerb #Particle] #Determiner #Noun",group:0,tag:"Imperative",reason:"turn-off-the-light"},{match:"^[go] to .",group:0,tag:"Imperative",reason:"go-to-toronto"},{match:"^#Modal you [#Infinitive]",group:0,tag:"Imperative",reason:"would-you-"},{match:"^never [#Infinitive]",group:0,tag:"Imperative",reason:"never-stop"},{match:"^come #Infinitive",tag:"Imperative",notIf:"on",reason:"come-have"},{match:"^come and? #Infinitive",tag:"Imperative . Imperative",notIf:"#PhrasalVerb",reason:"come-and-have"},{match:"^stay (out|away|back)",tag:"Imperative",reason:"stay-away"},{match:"^[(stay|be|keep)] #Adjective",group:0,tag:"Imperative",reason:"stay-cool"},{match:"^[keep it] #Adjective",group:0,tag:"Imperative",reason:"keep-it-cool"},{match:"^do not [#Infinitive]",group:0,tag:"Imperative",reason:"do-not-be"},{match:"[#Infinitive] (yourself|yourselves)",group:0,tag:"Imperative",reason:"allow-yourself"},{match:"[#Infinitive] what .",group:0,tag:"Imperative",reason:"look-what"},{match:"^[#Infinitive] #Gerund",group:0,tag:"Imperative",reason:"keep-playing"},{match:"^[#Infinitive] (to|for|into|toward|here|there)",group:0,tag:"Imperative",reason:"go-to"},{match:"^[#Infinitive] (and|or) #Infinitive",group:0,tag:"Imperative",reason:"inf-and-inf"},{match:"^[%Noun|Verb%] to",group:0,tag:"Imperative",reason:"commit-to"},{match:"^[#Infinitive] #Adjective? #Singular #Singular",group:0,tag:"Imperative",reason:"maintain-eye-contact"},{match:"do not (forget|omit|neglect) to [#Infinitive]",group:0,tag:"Imperative",reason:"do-not-forget"},{match:"^[(ask|wear|pay|look|help|show|watch|act|fix|kill|stop|start|turn|try|win)] #Noun",group:0,tag:"Imperative",reason:"pay-attention"}],XF=[{match:"(that|which) were [%Adj|Gerund%]",group:0,tag:"Gerund",reason:"that-were-growing"},{match:"#Gerund [#Gerund] #Plural",group:0,tag:"Adjective",reason:"hard-working-fam"}],eP=[{match:"(got|were|was|is|are|am) (#PastTense|#Participle)",tag:"Passive",reason:"got-walked"},{match:"(was|were|is|are|am) being (#PastTense|#Participle)",tag:"Passive",reason:"was-being"},{match:"(had|have|has) been (#PastTense|#Participle)",tag:"Passive",reason:"had-been"},{match:"will be being? (#PastTense|#Participle)",tag:"Passive",reason:"will-be-cleaned"},{match:"#Noun [(#PastTense|#Participle)] by (the|a) #Noun",group:0,tag:"Passive",reason:"suffered-by"}],tP=[{match:"u r",tag:"#Pronoun #Copula",reason:"u r"},{match:"#Noun [(who|whom)]",group:0,tag:"Determiner",reason:"captain-who"},{match:"[had] #Noun+ #PastTense",group:0,tag:"Condition",reason:"had-he"},{match:"[were] #Noun+ to #Infinitive",group:0,tag:"Condition",reason:"were-he"},{match:"some sort of",tag:"Adjective Noun Conjunction",reason:"some-sort-of"},{match:"of some sort",tag:"Conjunction Adjective Noun",reason:"of-some-sort"},{match:"[such] (a|an|is)? #Noun",group:0,tag:"Determiner",reason:"such-skill"},{match:"[right] (before|after|in|into|to|toward)",group:0,tag:"#Adverb",reason:"right-into"},{match:"#Preposition [about]",group:0,tag:"Adjective",reason:"at-about"},{match:"(are|#Modal|see|do|for) [ya]",group:0,tag:"Pronoun",reason:"are-ya"},{match:"[long live] .",group:0,tag:"#Adjective #Infinitive",reason:"long-live"},{match:"[plenty] of",group:0,tag:"#Uncountable",reason:"plenty-of"},{match:"(always|nearly|barely|practically) [there]",group:0,tag:"Adjective",reason:"always-there"},{match:"[there] (#Adverb|#Pronoun)? #Copula",group:0,tag:"There",reason:"there-is"},{match:"#Copula [there] .",group:0,tag:"There",reason:"is-there"},{match:"#Modal #Adverb? [there]",group:0,tag:"There",reason:"should-there"},{match:"^[do] (you|we|they)",group:0,tag:"QuestionWord",reason:"do-you"},{match:"^[does] (he|she|it|#ProperNoun)",group:0,tag:"QuestionWord",reason:"does-he"},{match:"#Determiner #Noun+ [who] #Verb",group:0,tag:"Preposition",reason:"the-x-who"},{match:"#Determiner #Noun+ [which] #Verb",group:0,tag:"Preposition",reason:"the-x-which"},{match:"a [while]",group:0,tag:"Noun",reason:"a-while"},{match:"guess who",tag:"#Infinitive #QuestionWord",reason:"guess-who"},{match:"[fucking] !#Verb",group:0,tag:"#Gerund",reason:"f-as-gerund"}],rP=[{match:"university of #Place",tag:"Organization",reason:"university-of-Foo"},{match:"#Noun (&|n) #Noun",tag:"Organization",reason:"Noun-&-Noun"},{match:"#Organization of the? #ProperNoun",tag:"Organization",reason:"org-of-place",safe:!0},{match:"#Organization #Country",tag:"Organization",reason:"org-country"},{match:"#ProperNoun #Organization",tag:"Organization",notIf:"#FirstName",reason:"titlecase-org"},{match:"#ProperNoun (ltd|co|inc|dept|assn|bros)",tag:"Organization",reason:"org-abbrv"},{match:"the [#Acronym]",group:0,tag:"Organization",reason:"the-acronym",safe:!0},{match:"government of the? [#Place+]",tag:"Organization",reason:"government-of-x"},{match:"(health|school|commerce) board",tag:"Organization",reason:"school-board"},{match:"(nominating|special|conference|executive|steering|central|congressional) committee",tag:"Organization",reason:"special-comittee"},{match:"(world|global|international|national|#Demonym) #Organization",tag:"Organization",reason:"global-org"},{match:"#Noun+ (public|private) school",tag:"School",reason:"noun-public-school"},{match:"#Place+ #SportsTeam",tag:"SportsTeam",reason:"place-sportsteam"},{match:"(dc|atlanta|minnesota|manchester|newcastle|sheffield) united",tag:"SportsTeam",reason:"united-sportsteam"},{match:"#Place+ fc",tag:"SportsTeam",reason:"fc-sportsteam"},{match:"#Place+ #Noun{0,2} (club|society|group|team|committee|commission|association|guild|crew)",tag:"Organization",reason:"place-noun-society"}],nP=[{match:"(west|north|south|east|western|northern|southern|eastern)+ #Place",tag:"Region",reason:"west-norfolk"},{match:"#City [(al|ak|az|ar|ca|ct|dc|fl|ga|id|il|nv|nh|nj|ny|oh|pa|sc|tn|tx|ut|vt|pr)]",group:0,tag:"Region",reason:"us-state"},{match:"portland [or]",group:0,tag:"Region",reason:"portland-or"},{match:"#ProperNoun+ (cliff|place|range|pit|place|point|room|grounds|ruins)",tag:"Place",reason:"foo-point"},{match:"in [#ProperNoun] #Place",group:0,tag:"Place",reason:"propernoun-place"},{match:"#Value #Noun (st|street|rd|road|crescent|cr|way|tr|terrace|avenue|ave)",tag:"Address",reason:"address-st"},{match:"(port|mount|mt) #ProperName",tag:"Place",reason:"port-name"}],aP=[{match:"[so] #Noun",group:0,tag:"Conjunction",reason:"so-conj"},{match:"[(who|what|where|why|how|when)] #Noun #Copula #Adverb? (#Verb|#Adjective)",group:0,tag:"Conjunction",reason:"how-he-is-x"},{match:"#Copula [(who|what|where|why|how|when)] #Noun",group:0,tag:"Conjunction",reason:"when-he"},{match:"#Verb [that] #Pronoun",group:0,tag:"Conjunction",reason:"said-that-he"},{match:"#Noun [that] #Copula",group:0,tag:"Conjunction",reason:"that-are"},{match:"#Noun [that] #Verb #Adjective",group:0,tag:"Conjunction",reason:"that-seem"},{match:"#Noun #Copula not? [that] #Adjective",group:0,tag:"Adverb",reason:"that-adj"},{match:"#Verb #Adverb? #Noun [(that|which)]",group:0,tag:"Preposition",reason:"that-prep"},{match:"@hasComma [which] (#Pronoun|#Verb)",group:0,tag:"Preposition",reason:"which-copula"},{match:"#Noun [like] #Noun",group:0,tag:"Preposition",reason:"noun-like"},{match:"^[like] #Determiner",group:0,tag:"Preposition",reason:"like-the"},{match:"a #Noun [like] (#Noun|#Determiner)",group:0,tag:"Preposition",reason:"a-noun-like"},{match:"#Adverb [like]",group:0,tag:"Verb",reason:"really-like"},{match:"(not|nothing|never) [like]",group:0,tag:"Preposition",reason:"nothing-like"},{match:"#Infinitive #Pronoun [like]",group:0,tag:"Preposition",reason:"treat-them-like"},{match:"[#QuestionWord] (#Pronoun|#Determiner)",group:0,tag:"Preposition",reason:"how-he"},{match:"[#QuestionWord] #Participle",group:0,tag:"Preposition",reason:"when-stolen"},{match:"[how] (#Determiner|#Copula|#Modal|#PastTense)",group:0,tag:"QuestionWord",reason:"how-is"},{match:"#Plural [(who|which|when)] .",group:0,tag:"Preposition",reason:"people-who"}],iP=[{match:"holy (shit|fuck|hell)",tag:"Expression",reason:"swears-expression"},{match:"^[(well|so|okay|now)] !#Adjective?",group:0,tag:"Expression",reason:"well-"},{match:"^come on",tag:"Expression",reason:"come-on"},{match:"(say|says|said) [sorry]",group:0,tag:"Expression",reason:"say-sorry"},{match:"^(ok|alright|shoot|hell|anyways)",tag:"Expression",reason:"ok-"},{match:"^(say && @hasComma)",tag:"Expression",reason:"say-"},{match:"^(like && @hasComma)",tag:"Expression",reason:"like-"},{match:"^[(dude|man|girl)] #Pronoun",group:0,tag:"Expression",reason:"dude-i"}],oP=[].concat(eP,PF,OF,$F,BF,IF,jF,zF,RF,LF,HF,GF,VF,UF,WF,JF,KF,_F,YF,ZF,QF,XF,tP,rP,nP,aP,iP),sP={two:{matches:oP}};let of=null;const uP=function(e){const{world:t}=e,{model:r,methods:n}=t;of=of||n.one.buildNet(r.two.matches,t);const i=n.two.quickSplit(e.document).map(s=>{const u=s[0];return[u.index[0],u.index[1],u.index[1]+s.length]}),o=e.update(i);return o.cache(),o.sweep(of),e.uncache(),e.unfreeze(),e},lP=e=>e.compute(["freeze","lexicon","preTagger","postTagger","unfreeze"]),cP={postTagger:uP,tagger:lP},fP=e=>Math.round(e*100)/100;function mP(e){e.prototype.confidence=function(){let t=0,r=0;return this.docs.forEach(n=>{n.forEach(a=>{r+=1,t+=a.confidence||1})}),r===0?1:fP(t/r)},e.prototype.tagger=function(){return this.compute(["tagger"])}}const dP={api:mP,compute:cP,model:sP,hooks:["postTagger"]},hP=function(e){return Object.keys(e.hooks).filter(t=>!t.startsWith("#")&&!t.startsWith("%"))},pP=function(e,t){const r=hP(t);if(r.length===0)return e;e._cache||e.cache();const n=e._cache;return e.filter((a,i)=>r.some(o=>n[i].has(o)))},gP=function(e,t){let r=t;typeof t=="string"&&(r=this.buildNet([{match:t}]));const n=this.tokenize(e),a=pP(n,r);return a.found?(a.compute(["index","tagger"]),a.match(t)):n.none()},vP={lib:{lazy:gP}},yP=function(e,t){const r=e.methods.two.transform.verb.conjugate,n=r(t,e.model);return e.has("#Gerund")?n.Gerund:e.has("#PastTense")?n.PastTense:e.has("#PresentTense")?n.PresentTense:e.has("#Gerund")?n.Gerund:t},bP=function(e,t){let r=t;return e.forEach(n=>{n.has("#Infinitive")||(r=yP(n,t)),n.replaceWith(r)}),e},wP=function(e,t){let r=t;if(e.has("#Plural")){const n=e.methods.two.transform.noun.toPlural;r=n(t,e.model)}e.replaceWith(r,{possessives:!0})},xP=function(e,t){const{toAdverb:r}=e.methods.two.transform.adjective,a=r(t);a&&e.replaceWith(a)},DP=function(e,t){const{toComparative:r,toSuperlative:n}=e.methods.two.transform.adjective;let a=t;e.has("#Comparative")?a=r(a,e.model):e.has("#Superlative")&&(a=n(a,e.model)),a&&e.replaceWith(a)},NP=function(e,t,r){let n=e.split(/ /g).map(i=>i.toLowerCase().trim());n=n.filter(i=>i),n=n.map(i=>`{${i}}`).join(" ");let a=this.match(n);return r&&(a=a.if(r)),a.has("#Verb")?bP(a,t):a.has("#Noun")?wP(a,t):a.has("#Adverb")?xP(a,t):a.has("#Adjective")?DP(a,t):this},AP=function(e){e.prototype.swap=NP},CP={api:AP};tt.plugin(eF);tt.plugin(FF);tt.plugin(dP);tt.plugin(vP);tt.plugin(CP);const yo=function(e){const{fromComparative:t,fromSuperlative:r}=e.methods.two.transform.adjective,n=e.text("normal");return e.has("#Comparative")?t(n,e.model):e.has("#Superlative")?r(n,e.model):n},EP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Adjectives"}json(n={}){const{toAdverb:a,toNoun:i,toSuperlative:o,toComparative:s}=this.methods.two.transform.adjective;return n.normal=!0,this.map(u=>{const l=u.toView().json(n)[0]||{},c=yo(u);return l.adjective={adverb:a(c,this.model),noun:i(c,this.model),superlative:o(c,this.model),comparative:s(c,this.model)},l},[])}adverbs(){return this.before("#Adverb+$").concat(this.after("^#Adverb+"))}conjugate(n){const{toComparative:a,toSuperlative:i,toNoun:o,toAdverb:s}=this.methods.two.transform.adjective;return this.getNth(n).map(u=>{const l=yo(u);return{Adjective:l,Comparative:a(l,this.model),Superlative:i(l,this.model),Noun:o(l,this.model),Adverb:s(l,this.model)}},[])}toComparative(n){const{toComparative:a}=this.methods.two.transform.adjective;return this.getNth(n).map(i=>{const o=yo(i),s=a(o,this.model);return i.replaceWith(s)})}toSuperlative(n){const{toSuperlative:a}=this.methods.two.transform.adjective;return this.getNth(n).map(i=>{const o=yo(i),s=a(o,this.model);return i.replaceWith(s)})}toAdverb(n){const{toAdverb:a}=this.methods.two.transform.adjective;return this.getNth(n).map(i=>{const o=yo(i),s=a(o,this.model);return i.replaceWith(s)})}toNoun(n){const{toNoun:a}=this.methods.two.transform.adjective;return this.getNth(n).map(i=>{const o=yo(i),s=a(o,this.model);return i.replaceWith(s)})}}e.prototype.adjectives=function(r){let n=this.match("#Adjective");return n=n.getNth(r),new t(n.document,n.pointer)},e.prototype.superlatives=function(r){let n=this.match("#Superlative");return n=n.getNth(r),new t(n.document,n.pointer)},e.prototype.comparatives=function(r){let n=this.match("#Comparative");return n=n.getNth(r),new t(n.document,n.pointer)}},SP={api:EP},MP=function(e){return e.compute("root").text("root")},TP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Adverbs"}conjugate(n){return this.getNth(n).map(a=>{const i=MP(a);return{Adverb:a.text("normal"),Adjective:i}},[])}json(n={}){const a=this.methods.two.transform.adjective.fromAdverb;return n.normal=!0,this.map(i=>{const o=i.toView().json(n)[0]||{};return o.adverb={adjective:a(o.normal)},o},[])}}e.prototype.adverbs=function(r){let n=this.match("#Adverb");return n=n.getNth(r),new t(n.document,n.pointer)}},FP={api:TP},PP=function(e){let t=e.match("@hasComma");return t=t.filter(r=>{if(r.growLeft(".").wordCount()===1||r.growRight(". .").wordCount()===1)return!1;let n=r.grow(".");return n=n.ifNo("@hasComma @hasComma"),n=n.ifNo("@hasComma (and|or) ."),n=n.ifNo("(#City && @hasComma) #Country"),n=n.ifNo("(#WeekDay && @hasComma) #Date"),n=n.ifNo("(#Date+ && @hasComma) #Value"),n=n.ifNo("(#Adjective && @hasComma) #Adjective"),n.found}),e.splitAfter(t)},kP=function(e){let t=e.parentheses();return t=t.filter(r=>r.wordCount()>=3&&r.has("#Verb")&&r.has("#Noun")),e.splitOn(t)},OP=function(e){let t=e.quotations();return t=t.filter(r=>r.wordCount()>=3&&r.has("#Verb")&&r.has("#Noun")),e.splitOn(t)},$P=function(e){let t=this;t=kP(t),t=OP(t),t=PP(t),t=t.splitAfter("(@hasEllipses|@hasSemicolon|@hasDash|@hasColon)"),t=t.splitAfter("^#Pronoun (said|says)"),t=t.splitBefore("(said|says) #ProperNoun$"),t=t.splitBefore(". . if .{4}"),t=t.splitBefore("and while"),t=t.splitBefore("now that"),t=t.splitBefore("ever since"),t=t.splitBefore("(supposing|although)"),t=t.splitBefore("even (while|if|though)"),t=t.splitBefore("(whereas|whose)"),t=t.splitBefore("as (though|if)"),t=t.splitBefore("(til|until)");const r=t.match("#Verb .* [but] .* #Verb",0);r.found&&(t=t.splitBefore(r));const n=t.if("if .{2,9} then .").match("then");return t=t.splitBefore(n),typeof e=="number"&&(t=t.get(e)),t},BP=function(e){const t=[];let r=null;return e.clauses().docs.forEach(i=>{i.forEach(o=>{!o.chunk||o.chunk!==r?(r=o.chunk,t.push([o.index[0],o.index[1],o.index[1]+1])):t[t.length-1][2]=o.index[1]+1}),r=null}),e.update(t)},_P=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Chunks"}isVerb(){return this.filter(n=>n.has("<Verb>"))}isNoun(){return this.filter(n=>n.has("<Noun>"))}isAdjective(){return this.filter(n=>n.has("<Adjective>"))}isPivot(){return this.filter(n=>n.has("<Pivot>"))}debug(){return this.toView().debug("chunks"),this}update(n){const a=new t(this.document,n);return a._cache=this._cache,a}}e.prototype.chunks=function(r){let n=BP(this);return n=n.getNth(r),new t(this.document,n.pointer)},e.prototype.clauses=$P},Rp={this:"Noun",then:"Pivot"},IP=function(e){for(let t=0;t<e.length;t+=1)for(let r=0;r<e[t].length;r+=1){const n=e[t][r];if(Rp.hasOwnProperty(n.normal)===!0){n.chunk=Rp[n.normal];continue}if(n.tags.has("Verb")){n.chunk="Verb";continue}if(n.tags.has("Noun")||n.tags.has("Determiner")){n.chunk="Noun";continue}if(n.tags.has("Value")){n.chunk="Noun";continue}if(n.tags.has("QuestionWord")){n.chunk="Pivot";continue}}},zP=function(e){for(let t=0;t<e.length;t+=1)for(let r=0;r<e[t].length;r+=1){const n=e[t][r];if(n.chunk)continue;const a=e[t][r+1],i=e[t][r-1];if(n.tags.has("Adjective")){if(i&&i.tags.has("Copula")){n.chunk="Adjective";continue}if(i&&i.tags.has("Determiner")){n.chunk="Noun";continue}if(a&&a.tags.has("Noun")){n.chunk="Noun";continue}continue}if(n.tags.has("Adverb")||n.tags.has("Negative")){if(i&&i.tags.has("Adjective")){n.chunk="Adjective";continue}if(i&&i.tags.has("Verb")){n.chunk="Verb";continue}if(a&&a.tags.has("Adjective")){n.chunk="Adjective";continue}if(a&&a.tags.has("Verb")){n.chunk="Verb";continue}}}},jP=[{match:"[that] #Determiner #Noun",group:0,chunk:"Pivot"},{match:"#PastTense [that]",group:0,chunk:"Pivot"},{match:"[so] #Determiner",group:0,chunk:"Pivot"},{match:"#Copula #Adverb+? [#Adjective]",group:0,chunk:"Adjective"},{match:"#Adjective and #Adjective",chunk:"Adjective"},{match:"#Adverb+ and #Adverb #Verb",chunk:"Verb"},{match:"#Gerund #Adjective$",chunk:"Verb"},{match:"#Gerund to #Verb",chunk:"Verb"},{match:"#PresentTense and #PresentTense",chunk:"Verb"},{match:"#Adverb #Negative",chunk:"Verb"},{match:"(want|wants|wanted) to #Infinitive",chunk:"Verb"},{match:"#Verb #Reflexive",chunk:"Verb"},{match:"#Verb [to] #Adverb? #Infinitive",group:0,chunk:"Verb"},{match:"[#Preposition] #Gerund",group:0,chunk:"Verb"},{match:"#Infinitive [that] <Noun>",group:0,chunk:"Verb"},{match:"#Noun of #Determiner? #Noun",chunk:"Noun"},{match:"#Value+ #Adverb? #Adjective",chunk:"Noun"},{match:"the [#Adjective] #Noun",chunk:"Noun"},{match:"#Singular in #Determiner? #Singular",chunk:"Noun"},{match:"#Plural [in] #Determiner? #Noun",group:0,chunk:"Pivot"},{match:"#Noun and #Determiner? #Noun",notIf:"(#Possessive|#Pronoun)",chunk:"Noun"}];let sf=null;const qP=function(e,t,r){const{methods:n}=r;sf=sf||n.one.buildNet(jP,r),e.sweep(sf)},uf=function(e,t){if((typeof process>"u"||!process.env?self.env||{}:process.env).DEBUG_CHUNKS){const n=(e.normal+"'").padEnd(8);console.log(` | '${n} → \x1B[34m${t.padEnd(12)}\x1B[0m \x1B[2m -fallback- \x1B[0m`)}e.chunk=t},RP=function(e){for(let t=0;t<e.length;t+=1)for(let r=0;r<e[t].length;r+=1){const n=e[t][r];n.chunk===void 0&&(n.tags.has("Conjunction")||n.tags.has("Preposition")?uf(n,"Pivot"):n.tags.has("Adverb")?uf(n,"Verb"):n.chunk="Noun")}},LP=function(e){const t=[];let r=null;e.forEach(n=>{for(let a=0;a<n.length;a+=1){const i=n[a];r&&i.chunk===r?t[t.length-1].terms.push(i):(t.push({chunk:i.chunk,terms:[i]}),r=i.chunk)}}),t.forEach(n=>{n.chunk==="Verb"&&(n.terms.find(i=>i.tags.has("Verb"))||n.terms.forEach(i=>i.chunk=null))})},HP=function(e){const{document:t,world:r}=e;IP(t),zP(t),qP(e,t,r),RP(t),LP(t)},GP={chunks:HP},VP={compute:GP,api:_P,hooks:["chunks"]},Ou=/\./g,UP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Acronyms"}strip(){return this.docs.forEach(n=>{n.forEach(a=>{a.text=a.text.replace(Ou,""),a.normal=a.normal.replace(Ou,"")})}),this}addPeriods(){return this.docs.forEach(n=>{n.forEach(a=>{a.text=a.text.replace(Ou,""),a.normal=a.normal.replace(Ou,""),a.text=a.text.split("").join(".")+".",a.normal=a.normal.split("").join(".")+"."})}),this}}e.prototype.acronyms=function(r){let n=this.match("#Acronym");return n=n.getNth(r),new t(n.document,n.pointer)}},Gw=/\(/,Vw=/\)/,WP=function(e,t){for(;t<e.length;t+=1)if(e[t].post&&Vw.test(e[t].post)){let[,r]=e[t].index;return r=r||0,r}return null},JP=function(e){const t=[];return e.docs.forEach(r=>{for(let n=0;n<r.length;n+=1){const a=r[n];if(a.pre&&Gw.test(a.pre)){const i=WP(r,n);if(i!==null){const[o,s]=r[n].index;t.push([o,s,i+1,r[n].id]),n=i}}}}),e.update(t)},KP=function(e){return e.docs.forEach(t=>{t[0].pre=t[0].pre.replace(Gw,"");const r=t[t.length-1];r.post=r.post.replace(Vw,"")}),e},YP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Possessives"}strip(){return KP(this)}}e.prototype.parentheses=function(r){let n=JP(this);return n=n.getNth(r),new t(n.document,n.pointer)}},Lp=/'s$/,ZP=function(e){let t=e.match("#Possessive+");return t.has("#Person")&&(t=t.growLeft("#Person+")),t.has("#Place")&&(t=t.growLeft("#Place+")),t.has("#Organization")&&(t=t.growLeft("#Organization+")),t},QP=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Possessives"}strip(){return this.docs.forEach(n=>{n.forEach(a=>{a.text=a.text.replace(Lp,""),a.normal=a.normal.replace(Lp,"")})}),this}}e.prototype.possessives=function(r){let n=ZP(this);return n=n.getNth(r),new t(n.document,n.pointer)}},jl={'"':'"',""":""","'":"'","“":"”","‘":"’","‟":"”","‛":"’","„":"”","⹂":"”","‚":"’","«":"»","‹":"›","‵":"′","‶":"″","‷":"‴","〝":"〞","`":"´","〟":"〞"},yd=RegExp("["+Object.keys(jl).join("")+"]"),XP=RegExp("["+Object.values(jl).join("")+"]"),ek=function(e,t){const r=e[t].pre.match(yd)[0]||"";if(!r||!jl[r])return null;const n=jl[r];for(;t<e.length;t+=1)if(e[t].post&&e[t].post.match(n))return t;return null},tk=function(e){const t=[];return e.docs.forEach(r=>{for(let n=0;n<r.length;n+=1){const a=r[n];if(a.pre&&yd.test(a.pre)){const i=ek(r,n);if(i!==null){const[o,s]=r[n].index;t.push([o,s,i+1,r[n].id]),n=i}}}}),e.update(t)},rk=function(e){e.docs.forEach(t=>{t[0].pre=t[0].pre.replace(yd,"");const r=t[t.length-1];r.post=r.post.replace(XP,"")})},nk=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Possessives"}strip(){return rk(this)}}e.prototype.quotations=function(r){let n=tk(this);return n=n.getNth(r),new t(n.document,n.pointer)}},ak=function(e){let t=this.splitAfter("@hasComma");return t=t.match("#PhoneNumber+"),t=t.getNth(e),t},ik=[["hyphenated","@hasHyphen ."],["hashTags","#HashTag"],["emails","#Email"],["emoji","#Emoji"],["emoticons","#Emoticon"],["atMentions","#AtMention"],["urls","#Url"],["conjunctions","#Conjunction"],["prepositions","#Preposition"],["abbreviations","#Abbreviation"],["honorifics","#Honorific"]],ok=[["emojis","emoji"],["atmentions","atMentions"]],sk=function(e){ik.forEach(t=>{e.prototype[t[0]]=function(r){const n=this.match(t[1]);return typeof r=="number"?n.get(r):n}}),e.prototype.phoneNumbers=ak,ok.forEach(t=>{e.prototype[t[0]]=e.prototype[t[1]]})},uk=/\//,lk=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Slashes"}split(){return this.map(n=>{const i=n.text().split(uk);return n=n.replaceWith(i.join(" ")),n.growRight("("+i.join("|")+")+")})}}e.prototype.slashes=function(r){let n=this.match("#SlashedTerm");return n=n.getNth(r),new t(n.document,n.pointer)}},ck={api:function(e){UP(e),YP(e),QP(e),nk(e),sk(e),lk(e)}},$u=function(e,t){e.docs.forEach(r=>{r.forEach(t)})},Hp={case:e=>{$u(e,t=>{t.text=t.text.toLowerCase()})},unicode:e=>{const t=e.world,r=t.methods.one.killUnicode;$u(e,n=>n.text=r(n.text,t))},whitespace:e=>{$u(e,t=>{t.post=t.post.replace(/\s+/g," "),t.post=t.post.replace(/\s([.,?!:;])/g,"$1"),t.pre=t.pre.replace(/\s+/g,"")})},punctuation:e=>{$u(e,n=>{n.post=n.post.replace(/[–—-]/g," "),n.post=n.post.replace(/[,:;]/g,""),n.post=n.post.replace(/\.{2,}/g,""),n.post=n.post.replace(/\?{2,}/g,"?"),n.post=n.post.replace(/!{2,}/g,"!"),n.post=n.post.replace(/\?!+/g,"?")});const t=e.docs,r=t[t.length-1];if(r&&r.length>0){const n=r[r.length-1];n.post=n.post.replace(/ /g,"")}},contractions:e=>{e.contractions().expand()},acronyms:e=>{e.acronyms().strip()},parentheses:e=>{e.parentheses().strip()},possessives:e=>{e.possessives().strip()},quotations:e=>{e.quotations().strip()},emoji:e=>{e.emojis().remove()},honorifics:e=>{e.match("#Honorific+ #Person").honorifics().remove()},adverbs:e=>{e.adverbs().remove()},nouns:e=>{e.nouns().toSingular()},verbs:e=>{e.verbs().toInfinitive()},numbers:e=>{e.numbers().toNumber()},debullet:e=>{const t=/^\s*([-–—*•])\s*$/;return e.docs.forEach(r=>{t.test(r[0].pre)&&(r[0].pre=r[0].pre.replace(t,""))}),e}},lf=e=>e.split("|").reduce((t,r)=>(t[r]=!0,t),{}),cf="unicode|punctuation|whitespace|acronyms",Gp="|case|contractions|parentheses|quotations|emoji|honorifics|debullet",fk="|possessives|adverbs|nouns|verbs",mk={light:lf(cf),medium:lf(cf+Gp),heavy:lf(cf+Gp+fk)};function dk(e){e.prototype.normalize=function(t="light"){return typeof t=="string"&&(t=mk[t]),Object.keys(t).forEach(r=>{Hp.hasOwnProperty(r)&&Hp[r](this,t[r])}),this}}const hk={api:dk},pk=function(e){let t=e.clauses().match("<Noun>"),r=t.match("@hasComma");return r=r.not("#Place"),r.found&&(t=t.splitAfter(r)),t=t.splitOn("#Expression"),t=t.splitOn("(he|she|we|you|they|i)"),t=t.splitOn("(#Noun|#Adjective) [(he|him|she|it)]",0),t=t.splitOn("[(he|him|she|it)] (#Determiner|#Value)",0),t=t.splitBefore("#Noun [(the|a|an)] #Adjective? #Noun",0),t=t.splitOn("[(here|there)] #Noun",0),t=t.splitOn("[#Noun] (here|there)",0),t=t.splitBefore("(our|my|their|your)"),t=t.splitOn("#Noun [#Determiner]",0),t=t.if("#Noun"),t},Vp=["after","although","as if","as long as","as","because","before","even if","even though","ever since","if","in order that","provided that","since","so that","than","that","though","unless","until","what","whatever","when","whenever","where","whereas","wherever","whether","which","whichever","who","whoever","whom","whomever","whose"],gk=function(e){if(e.before("#Preposition$").found)return!0;if(!e.before().found)return!1;for(let r=0;r<Vp.length;r+=1)if(e.has(Vp[r]))return!0;return!1},vk="(#Pronoun|#Place|#Value|#Person|#Uncountable|#Month|#WeekDay|#Holiday|#Possessive)",yk=function(e,t){if(e.has("#Plural")||e.has("#Noun and #Noun")||e.has("(we|they)"))return!0;if(t.has(vk)===!0||e.has("#Singular"))return!1;const r=t.text("normal");return r.length>3&&r.endsWith("s")&&!r.endsWith("ss")},bk=function(e){let t=e.clone();return t=t.match("#Noun+"),t=t.remove("(#Adjective|#Preposition|#Determiner|#Value)"),t=t.not("#Possessive"),t=t.first(),t.found?t:e},Za=function(e){const t=bk(e);return{determiner:e.match("#Determiner").eq(0),adjectives:e.match("#Adjective"),number:e.values(),isPlural:yk(e,t),isSubordinate:gk(e),root:t}},Up=e=>e.text(),wk=e=>e.json({terms:!1,normal:!0}).map(t=>t.normal),xk=function(e){if(!e.found)return null;const r=e.values(0);return r.found?(r.parse()[0]||{}).num:null},Dk=function(e){const t=Za(e);return{root:Up(t.root),number:xk(t.number),determiner:Up(t.determiner),adjectives:wk(t.adjectives),isPlural:t.isPlural,isSubordinate:t.isSubordinate}},Uw=function(e){return!e.has("^(#Uncountable|#ProperNoun|#Place|#Pronoun|#Acronym)+$")},Nk={tags:!0},Ak=function(e,t){if(t.isPlural===!0||(t.root.has("#Possessive")&&(t.root=t.root.possessives().strip()),!Uw(t.root)))return e;const{methods:r,model:n}=e.world,{toPlural:a}=r.two.transform.noun,i=t.root.text({keepPunct:!1}),o=a(i,n);e.match(t.root).replaceWith(o,Nk).tag("Plural","toPlural"),t.determiner.has("(a|an)")&&e.remove(t.determiner);const s=t.root.after("not? #Adverb+? [#Copula]",0);return s.found&&(s.has("is")?e.replace(s,"are"):s.has("was")&&e.replace(s,"were")),e},Ck={tags:!0},Ek=function(e,t){if(t.isPlural===!1)return e;const{methods:r,model:n}=e.world,{toSingular:a}=r.two.transform.noun,i=t.root.text("normal"),o=a(i,n);return e.replace(t.root,o,Ck).tag("Singular","toPlural"),e},Sk=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Nouns"}parse(n){return this.getNth(n).map(Za)}json(n){const a=typeof n=="object"?n:{};return this.getNth(n).map(i=>{const o=i.toView().json(a)[0]||{};return a&&a.noun!==!1&&(o.noun=Dk(i)),o},[])}conjugate(n){const a=this.world.methods.two.transform.noun;return this.getNth(n).map(i=>{const o=Za(i),s=o.root.compute("root").text("root"),u={Singular:s};return Uw(o.root)&&(u.Plural=a.toPlural(s,this.model)),u.Singular===u.Plural&&delete u.Plural,u},[])}isPlural(n){return this.filter(i=>Za(i).isPlural).getNth(n)}isSingular(n){return this.filter(i=>!Za(i).isPlural).getNth(n)}adjectives(n){let a=this.update([]);return this.forEach(i=>{const o=Za(i).adjectives;o.found&&(a=a.concat(o))}),a.getNth(n)}toPlural(n){return this.getNth(n).map(a=>Ak(a,Za(a)))}toSingular(n){return this.getNth(n).map(a=>{const i=Za(a);return Ek(a,i)})}update(n){const a=new t(this.document,n);return a._cache=this._cache,a}}e.prototype.nouns=function(r){let n=pk(this);return n=n.getNth(r),new t(this.document,n.pointer)}},Mk={api:Sk},Tk=function(e,t){let r=e.match("#Fraction+");return r=r.filter(n=>!n.lookBehind("#Value and$").found),r=r.notIf("#Value seconds"),r},Fk=e=>{const t=[{reg:/^(minus|negative)[\s-]/i,mult:-1},{reg:/^(a\s)?half[\s-](of\s)?/i,mult:.5}];for(let r=0;r<t.length;r++)if(t[r].reg.test(e)===!0)return{amount:t[r].mult,str:e.replace(t[r].reg,"")};return{amount:1,str:e}},ar={ones:{zeroth:0,first:1,second:2,third:3,fourth:4,fifth:5,sixth:6,seventh:7,eighth:8,ninth:9,zero:0,one:1,two:2,three:3,four:4,five:5,six:6,seven:7,eight:8,nine:9},teens:{tenth:10,eleventh:11,twelfth:12,thirteenth:13,fourteenth:14,fifteenth:15,sixteenth:16,seventeenth:17,eighteenth:18,nineteenth:19,ten:10,eleven:11,twelve:12,thirteen:13,fourteen:14,fifteen:15,sixteen:16,seventeen:17,eighteen:18,nineteen:19},tens:{twentieth:20,thirtieth:30,fortieth:40,fourtieth:40,fiftieth:50,sixtieth:60,seventieth:70,eightieth:80,ninetieth:90,twenty:20,thirty:30,forty:40,fourty:40,fifty:50,sixty:60,seventy:70,eighty:80,ninety:90},multiples:{hundredth:100,thousandth:1e3,millionth:1e6,billionth:1e9,trillionth:1e12,quadrillionth:1e15,quintillionth:1e18,sextillionth:1e21,septillionth:1e24,hundred:100,thousand:1e3,million:1e6,billion:1e9,trillion:1e12,quadrillion:1e15,quintillion:1e18,sextillion:1e21,septillion:1e24,grand:1e3}},Pk=(e,t)=>{if(ar.ones.hasOwnProperty(e)){if(t.ones||t.teens)return!1}else if(ar.teens.hasOwnProperty(e)){if(t.ones||t.teens||t.tens)return!1}else if(ar.tens.hasOwnProperty(e)&&(t.ones||t.teens||t.tens))return!1;return!0},kk=function(e){let t="0.";for(let r=0;r<e.length;r++){const n=e[r];if(ar.ones.hasOwnProperty(n)===!0)t+=ar.ones[n];else if(ar.teens.hasOwnProperty(n)===!0)t+=ar.teens[n];else if(ar.tens.hasOwnProperty(n)===!0)t+=ar.tens[n];else if(/^[0-9]$/.test(n)===!0)t+=n;else return 0}return parseFloat(t)},Ok=e=>(e=e.replace(/1st$/,"1"),e=e.replace(/2nd$/,"2"),e=e.replace(/3rd$/,"3"),e=e.replace(/([4567890])r?th$/,"$1"),e=e.replace(/^[$€¥£¢]/,""),e=e.replace(/[%$€¥£¢]$/,""),e=e.replace(/,/g,""),e=e.replace(/([0-9])([a-z\u00C0-\u00FF]{1,2})$/,"$1"),e),$k=/^([0-9,. ]+)\/([0-9,. ]+)$/,Wp={"a few":3,"a couple":2,"a dozen":12,"two dozen":24,zero:0},Bu=e=>Object.keys(e).reduce((t,r)=>(t+=e[r],t),0),dm=function(e){if(Wp.hasOwnProperty(e)===!0)return Wp[e];if(e==="a"||e==="an")return 1;const t=Fk(e);e=t.str;let r=null,n={},a=0,i=!1;const o=e.split(/[ -]/);for(let s=0;s<o.length;s++){let u=o[s];if(u=Ok(u),!u||u==="and")continue;if(u==="-"||u==="negative"){i=!0;continue}if(u.charAt(0)==="-"&&(i=!0,u=u.substring(1)),u==="point")return a+=Bu(n),a+=kk(o.slice(s+1,o.length)),a*=t.amount,a;const l=u.match($k);if(l){const c=parseFloat(l[1].replace(/[, ]/g,"")),f=parseFloat(l[2].replace(/[, ]/g,""));f&&(a+=c/f||0);continue}if(ar.tens.hasOwnProperty(u)&&n.ones&&Object.keys(n).length===1&&(a=n.ones*100,n={}),Pk(u,n)===!1)return null;if(/^[0-9.]+$/.test(u))n.ones=parseFloat(u);else if(ar.ones.hasOwnProperty(u)===!0)n.ones=ar.ones[u];else if(ar.teens.hasOwnProperty(u)===!0)n.teens=ar.teens[u];else if(ar.tens.hasOwnProperty(u)===!0)n.tens=ar.tens[u];else if(ar.multiples.hasOwnProperty(u)===!0){let c=ar.multiples[u];if(c===r)return null;if(c===100&&o[s+1]!==void 0){const f=o[s+1];ar.multiples[f]&&(c*=ar.multiples[f],s+=1)}r===null||c<r?(a+=(Bu(n)||1)*c,r=c,n={}):(a+=Bu(n),r=c,a=(a||1)*c,n={})}}return a+=Bu(n),a*=t.amount,a*=i?-1:1,a===0&&Object.keys(n).length===0?null:a},Jp=/s$/,js=function(e){const t=e.text("reduced");return dm(t)},ql={half:2,halve:2,quarter:4},Bk=function(e){const r=e.text("reduced").match(/^([-+]?[0-9]+)\/([-+]?[0-9]+)(st|nd|rd|th)?s?$/);return r&&r[1]&&r[0]?{numerator:Number(r[1]),denominator:Number(r[2])}:null},_k=function(e){const t=e.match("[<num>#Value+] out of every? [<den>#Value+]");if(t.found!==!0)return null;let{num:r,den:n}=t.groups();return!r||!n||(r=js(r),n=js(n),!r||!n)?null:typeof r=="number"&&typeof n=="number"?{numerator:r,denominator:n}:null},Ik=function(e){const t=e.match("[<num>(#Cardinal|a)+] [<den>#Fraction+]");if(t.found!==!0)return null;let{num:r,den:n}=t.groups();r.has("a")?r=1:r=js(r);let a=n.text("reduced");return Jp.test(a)&&(a=a.replace(Jp,""),n=n.replaceWith(a)),ql.hasOwnProperty(a)?n=ql[a]:n=js(n),typeof r=="number"&&typeof n=="number"?{numerator:r,denominator:n}:null},zk=function(e){const t=e.match("^#Ordinal$");return t.found!==!0?null:e.lookAhead("^of .")?{numerator:1,denominator:js(t)}:null},jk=function(e){const t=e.text("reduced");return ql.hasOwnProperty(t)?{numerator:1,denominator:ql[t]}:null},qk=e=>{const t=Math.round(e*1e3)/1e3;return t===0&&e!==0?e:t},Ea=function(e){e=e.clone();const t=jk(e)||Bk(e)||_k(e)||Ik(e)||zk(e)||null;return t!==null&&t.numerator&&t.denominator&&(t.decimal=t.numerator/t.denominator,t.decimal=qk(t.decimal)),t},bd=function(e){if(e<1e6)return String(e);let t;return typeof e=="number"?t=e.toFixed(0):t=e,t.indexOf("e+")===-1?t:t.replace(".","").split("e+").reduce(function(r,n){return r+Array(n-r.length+2).join(0)})},_u=[["ninety",90],["eighty",80],["seventy",70],["sixty",60],["fifty",50],["forty",40],["thirty",30],["twenty",20]],Kp=["","one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"],Rk=[[1e24,"septillion"],[1e20,"hundred sextillion"],[1e21,"sextillion"],[1e20,"hundred quintillion"],[1e18,"quintillion"],[1e17,"hundred quadrillion"],[1e15,"quadrillion"],[1e14,"hundred trillion"],[1e12,"trillion"],[1e11,"hundred billion"],[1e9,"billion"],[1e8,"hundred million"],[1e6,"million"],[1e5,"hundred thousand"],[1e3,"thousand"],[100,"hundred"],[1,"one"]],Lk=function(e){let t=e;const r=[];return Rk.forEach(n=>{if(e>=n[0]){const a=Math.floor(t/n[0]);t-=a*n[0],a&&r.push({unit:n[1],count:a})}}),r},Hk=function(e){const t=[];if(e>100)return t;for(let r=0;r<_u.length;r++)e>=_u[r][1]&&(e-=_u[r][1],t.push(_u[r][0]));return Kp[e]&&t.push(Kp[e]),t},Gk=e=>{const t=["zero","one","two","three","four","five","six","seven","eight","nine"],r=[],a=bd(e).match(/\.([0-9]+)/);if(!a||!a[0])return r;r.push("point");const i=a[0].split("");for(let o=0;o<i.length;o++)r.push(t[i[o]]);return r},qs=function(e){let t=e.num;if(t===0||t==="0")return"zero";t>1e21&&(t=bd(t));let r=[];t<0&&(r.push("minus"),t=Math.abs(t));const n=Lk(t);for(let a=0;a<n.length;a++){let i=n[a].unit;i==="one"&&(i="",r.length>1&&r.push("and")),r=r.concat(Hk(n[a].count)),r.push(i)}return r=r.concat(Gk(t)),r=r.filter(a=>a),r.length===0&&(r[0]=""),r.join(" ")},Vk=function(e){if(!e.numerator||!e.denominator)return"";const t=qs({num:e.numerator}),r=qs({num:e.denominator});return`${t} out of ${r}`},Yp={one:"first",two:"second",three:"third",five:"fifth",eight:"eighth",nine:"ninth",twelve:"twelfth",twenty:"twentieth",thirty:"thirtieth",forty:"fortieth",fourty:"fourtieth",fifty:"fiftieth",sixty:"sixtieth",seventy:"seventieth",eighty:"eightieth",ninety:"ninetieth"},Ww=e=>{const t=qs(e).split(" "),r=t[t.length-1];return Yp.hasOwnProperty(r)?t[t.length-1]=Yp[r]:t[t.length-1]=r.replace(/y$/,"i")+"th",t.join(" ")},Uk=function(e){if(!e.numerator||!e.denominator)return"";const t=qs({num:e.numerator});let r=Ww({num:e.denominator});return e.denominator===2&&(r="half"),t&&r?(e.numerator!==1&&(r+="s"),`${t} ${r}`):""},Wk=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Fractions"}parse(n){return this.getNth(n).map(Ea)}get(n){return this.getNth(n).map(Ea)}json(n){return this.getNth(n).map(a=>{const i=a.toView().json(n)[0],o=Ea(a);return i.fraction=o,i},[])}toDecimal(n){return this.getNth(n).forEach(a=>{const{decimal:i}=Ea(a);a=a.replaceWith(String(i),!0),a.tag("NumericValue"),a.unTag("Fraction")}),this}toFraction(n){return this.getNth(n).forEach(a=>{const i=Ea(a);if(i&&typeof i.numerator=="number"&&typeof i.denominator=="number"){const o=`${i.numerator}/${i.denominator}`;this.replace(a,o)}}),this}toOrdinal(n){return this.getNth(n).forEach(a=>{const i=Ea(a);let o=Uk(i);a.after("^#Noun").found&&(o+=" of"),a.replaceWith(o)}),this}toCardinal(n){return this.getNth(n).forEach(a=>{const i=Ea(a),o=Vk(i);a.replaceWith(o)}),this}toPercentage(n){return this.getNth(n).forEach(a=>{const{decimal:i}=Ea(a);let o=i*100;o=Math.round(o*100)/100,a.replaceWith(`${o}%`)}),this}}e.prototype.fractions=function(r){let n=Tk(this);return n=n.getNth(r),new t(this.document,n.pointer)}},Jk="one|two|three|four|five|six|seven|eight|nine",Ja="twenty|thirty|forty|fifty|sixty|seventy|eighty|ninety|fourty",Kk="eleven|twelve|thirteen|fourteen|fifteen|sixteen|seventeen|eighteen|nineteen",ff=function(e){let t=e.match("#Value+");if(t.has("#NumericValue #NumericValue")&&(t.has("#Value @hasComma #Value")?t.splitAfter("@hasComma"):t.has("#NumericValue #Fraction")?t.splitAfter("#NumericValue #Fraction"):t=t.splitAfter("#NumericValue")),t.has("#Value #Value #Value")&&!t.has("#Multiple")&&t.has("("+Ja+") #Cardinal #Cardinal")&&(t=t.splitAfter("("+Ja+") #Cardinal")),t.has("#Value #Value")){t.has("#NumericValue #NumericValue")&&(t=t.splitOn("#Year")),t.has("("+Ja+") ("+Kk+")")&&(t=t.splitAfter("("+Ja+")"));const r=t.match("#Cardinal #Cardinal");if(r.found&&!t.has("(point|decimal|#Fraction)")&&!r.has("#Cardinal (#Multiple|point|decimal)")){const n=t.has(`(${Jk}) (${Ja})`),a=r.has("("+Ja+") #Cardinal"),i=r.has("#Multiple #Value");!n&&!a&&!i&&r.terms().forEach(o=>{t=t.splitOn(o)})}t.match("#Ordinal #Ordinal").match("#TextValue").found&&!t.has("#Multiple")&&(t.has("("+Ja+") #Ordinal")||(t=t.splitAfter("#Ordinal"))),t=t.splitBefore("#Ordinal [#Cardinal]",0),t.has("#TextValue #NumericValue")&&!t.has("("+Ja+"|#Multiple)")&&(t=t.splitBefore("#TextValue #NumericValue"))}return t=t.splitAfter("#NumberRange"),t=t.splitBefore("#Year"),t},Yk=function(e,t){e=e.replace(/,/g,"");const r=e.split(/([0-9.,]*)/);let[n,a]=r,i=r.slice(2).join("");return a!==""&&t.length<2?(a=Number(a||e),typeof a!="number"&&(a=null),i=i||"",(i==="st"||i==="nd"||i==="rd"||i==="th")&&(i=""),{prefix:n||"",num:a,suffix:i}):null},Sr=function(e){if(typeof e=="string")return{num:dm(e)};let t=e.text("reduced");const r=e.growRight("#Unit").match("#Unit$").text("machine"),n=/[0-9],[0-9]/.test(e.text("text"));if(e.terms().length===1&&!e.has("#Multiple")){const s=Yk(t,e);if(s!==null)return s.hasComma=n,s.unit=r,s}let a=e.match("#Fraction{2,}$");a=a.found===!1?e.match("^#Fraction$"):a;let i=null;a.found&&(a.has("#Value and #Value #Fraction")&&(a=a.match("and #Value #Fraction")),i=Ea(a),e=e.not(a),e=e.not("and$"),t=e.text("reduced"));let o=0;return t&&(o=dm(t)||0),i&&i.decimal&&(o+=i.decimal),{hasComma:n,prefix:"",num:o,suffix:"",isOrdinal:e.has("#Ordinal"),isText:e.has("#TextValue"),isFraction:e.has("#Fraction"),isMoney:e.has("#Money"),unit:r}},Zk=function(e){const t=e.num;if(!t&&t!==0)return null;const r=t%100;if(r>10&&r<20)return String(t)+"th";const n={0:"th",1:"st",2:"nd",3:"rd"};let a=bd(t);const i=a.slice(a.length-1,a.length);return n[i]?a+=n[i]:a+="th",a},Zp={"¢":"cents",$:"dollars","£":"pounds","¥":"yen","€":"euros","₡":"colón","฿":"baht","₭":"kip","₩":"won","₹":"rupees","₽":"ruble","₺":"liras"},Qp={"%":"percent","°":"degrees"},Xp=function(e){const t={suffix:"",prefix:e.prefix};return Zp.hasOwnProperty(e.prefix)&&(t.suffix+=" "+Zp[e.prefix],t.prefix=""),Qp.hasOwnProperty(e.suffix)&&(t.suffix+=" "+Qp[e.suffix]),t.suffix&&e.num===1&&(t.suffix=t.suffix.replace(/s$/,"")),!t.suffix&&e.suffix&&(t.suffix+=" "+e.suffix),t},Pi=function(e,t){if(t==="TextOrdinal"){const{prefix:n,suffix:a}=Xp(e);return n+Ww(e)+a}if(t==="Ordinal")return e.prefix+Zk(e)+e.suffix;if(t==="TextCardinal"){const{prefix:n,suffix:a}=Xp(e);return n+qs(e)+a}let r=e.num;return e.hasComma&&(r=r.toLocaleString()),e.prefix+String(r)+e.suffix},Qk=e=>Object.prototype.toString.call(e)==="[object Array]",Xk=function(e){if(typeof e=="string"||typeof e=="number"){const t={};return t[e]=!0,t}return Qk(e)?e.reduce((t,r)=>(t[r]=!0,t),{}):e||{}},eO=function(e,t={}){return t=Xk(t),e.filter(r=>{const{unit:n}=Sr(r);return!!(n&&t[n]===!0)})},tO=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Numbers"}parse(n){return this.getNth(n).map(Sr)}get(n){return this.getNth(n).map(Sr).map(a=>a.num)}json(n){const a=typeof n=="object"?n:{};return this.getNth(n).map(i=>{const o=i.toView().json(a)[0],s=Sr(i);return o.number={prefix:s.prefix,num:s.num,suffix:s.suffix,hasComma:s.hasComma,unit:s.unit},o},[])}units(){return this.growRight("#Unit").match("#Unit$")}isUnit(n){return eO(this,n)}isOrdinal(){return this.if("#Ordinal")}isCardinal(){return this.if("#Cardinal")}toNumber(){const n=this.map(a=>{if(!this.has("#TextValue"))return a;const i=Sr(a);if(i.num===null)return a;const o=a.has("#Ordinal")?"Ordinal":"Cardinal",s=Pi(i,o);return a.replaceWith(s,{tags:!0}),a.tag("NumericValue")});return new t(n.document,n.pointer)}toLocaleString(){return this.forEach(a=>{const i=Sr(a);if(i.num===null)return;let o=i.num.toLocaleString();if(a.has("#Ordinal")){const u=Pi(i,"Ordinal").match(/[a-z]+$/);u&&(o+=u[0]||"")}a.replaceWith(o,{tags:!0})}),this}toText(){const a=this.map(i=>{if(i.has("#TextValue"))return i;const o=Sr(i);if(o.num===null)return i;const s=i.has("#Ordinal")?"TextOrdinal":"TextCardinal",u=Pi(o,s);return i.replaceWith(u,{tags:!0}),i.tag("TextValue"),i});return new t(a.document,a.pointer)}toCardinal(){const a=this.map(i=>{if(!i.has("#Ordinal"))return i;const o=Sr(i);if(o.num===null)return i;const s=i.has("#TextValue")?"TextCardinal":"Cardinal",u=Pi(o,s);return i.replaceWith(u,{tags:!0}),i.tag("Cardinal"),i});return new t(a.document,a.pointer)}toOrdinal(){const a=this.map(i=>{if(i.has("#Ordinal"))return i;const o=Sr(i);if(o.num===null)return i;const s=i.has("#TextValue")?"TextOrdinal":"Ordinal",u=Pi(o,s);return i.replaceWith(u,{tags:!0}),i.tag("Ordinal"),i});return new t(a.document,a.pointer)}isEqual(n){return this.filter(a=>Sr(a).num===n)}greaterThan(n){return this.filter(a=>Sr(a).num>n)}lessThan(n){return this.filter(a=>Sr(a).num<n)}between(n,a){return this.filter(i=>{const o=Sr(i).num;return o>n&&o<a})}set(n){if(n===void 0)return this;typeof n=="string"&&(n=Sr(n).num);const i=this.map(o=>{const s=Sr(o);if(s.num=n,s.num===null)return o;let u=o.has("#Ordinal")?"Ordinal":"Cardinal";o.has("#TextValue")&&(u=o.has("#Ordinal")?"TextOrdinal":"TextCardinal");let l=Pi(s,u);return s.hasComma&&u==="Cardinal"&&(l=Number(l).toLocaleString()),o=o.not("#Currency"),o.replaceWith(l,{tags:!0}),o});return new t(i.document,i.pointer)}add(n){if(!n)return this;typeof n=="string"&&(n=Sr(n).num);const i=this.map(o=>{const s=Sr(o);if(s.num===null)return o;s.num+=n;let u=o.has("#Ordinal")?"Ordinal":"Cardinal";s.isText&&(u=o.has("#Ordinal")?"TextOrdinal":"TextCardinal");const l=Pi(s,u);return o.replaceWith(l,{tags:!0}),o});return new t(i.document,i.pointer)}subtract(n,a){return this.add(n*-1,a)}increment(n){return this.add(1,n)}decrement(n){return this.add(-1,n)}update(n){const a=new t(this.document,n);return a._cache=this._cache,a}}t.prototype.toNice=t.prototype.toLocaleString,t.prototype.isBetween=t.prototype.between,t.prototype.minus=t.prototype.subtract,t.prototype.plus=t.prototype.add,t.prototype.equals=t.prototype.isEqual,e.prototype.numbers=function(r){let n=ff(this);return n=n.getNth(r),new t(this.document,n.pointer)},e.prototype.percentages=function(r){let n=ff(this);return n=n.filter(a=>a.has("#Percent")||a.after("^percent")),n=n.getNth(r),new t(this.document,n.pointer)},e.prototype.money=function(r){let n=ff(this);return n=n.filter(a=>a.has("#Money")||a.after("^#Currency")),n=n.getNth(r),new t(this.document,n.pointer)},e.prototype.values=e.prototype.numbers},rO=function(e){Wk(e),tO(e)},nO={api:rO},aO={people:!0,emails:!0,phoneNumbers:!0,places:!0},iO=function(e={}){return e=Object.assign({},aO,e),e.people!==!1&&this.people().replaceWith("██████████"),e.emails!==!1&&this.emails().replaceWith("██████████"),e.places!==!1&&this.places().replaceWith("██████████"),e.phoneNumbers!==!1&&this.phoneNumbers().replaceWith("███████"),this},oO={api:function(e){e.prototype.redact=iO}},sO=function(e){const t=e.clauses();return/\.\.$/.test(e.out("text"))||e.has("^#QuestionWord")&&e.has("@hasComma")?!1:!!(e.has("or not$")||e.has("^#QuestionWord")||e.has("^(do|does|did|is|was|can|could|will|would|may) #Noun")||e.has("^(have|must) you")||t.has("(do|does|is|was) #Noun+ #Adverb? (#Adjective|#Infinitive)$"))},uO=function(e){const t=/\?/,{document:r}=e;return e.filter(n=>{const a=n.docs[0]||[],i=a[a.length-1];return!i||r[i.index[0]].length!==a.length?!1:t.test(i.post)?!0:sO(n)})},lO="(after|although|as|because|before|if|since|than|that|though|when|whenever|where|whereas|wherever|whether|while|why|unless|until|once)",cO="(that|which|whichever|who|whoever|whom|whose|whomever)",fO=function(e){let t=e;return t.length===1||(t=t.if("#Verb"),t.length===1)||(t=t.ifNo(lO),t=t.ifNo("^even (if|though)"),t=t.ifNo("^so that"),t=t.ifNo("^rather than"),t=t.ifNo("^provided that"),t.length===1)||(t=t.ifNo(cO),t.length===1)||(t=t.ifNo("(^despite|^during|^before|^through|^throughout)"),t.length===1)||(t=t.ifNo("^#Gerund"),t.length===1)?t:(t.length===0&&(t=e),t.eq(0))},mO=function(e){let t=null;return e.has("#PastTense")?t="PastTense":e.has("#FutureTense")?t="FutureTense":e.has("#PresentTense")&&(t="PresentTense"),{tense:t}},ki=function(e){const t=e.clauses(),n=fO(t).chunks();let a=e.none(),i=e.none(),o=e.none();return n.forEach((s,u)=>{if(u===0&&!s.has("<Verb>")){a=s;return}if(!i.found&&s.has("<Verb>")){i=s;return}i.found&&(o=o.concat(s))}),i.found&&!a.found&&(a=i.before("<Noun>+").first()),{subj:a,verb:i,pred:o,grammar:mO(i)}},dO=function(e){let t=e.verbs();const r=t.eq(0);if(r.has("#PastTense"))return e;if(r.toPastTense(),t.length>1){t=t.slice(1),t=t.filter(a=>!a.lookBehind("to$").found),t=t.if("#PresentTense"),t=t.notIf("#Gerund");const n=e.match("to #Verb+ #Conjunction #Verb").terms();t=t.not(n),t.found&&t.verbs().toPastTense()}return e},hO=function(e){let t=e.verbs();return t.eq(0).toPresentTense(),t.length>1&&(t=t.slice(1),t=t.filter(n=>!n.lookBehind("to$").found),t=t.notIf("#Gerund"),t.found&&t.verbs().toPresentTense()),e},pO=function(e){let t=e.verbs();if(t.eq(0).toFutureTense(),e=e.fullSentence(),t=e.verbs(),t.length>1){t=t.slice(1);const n=t.filter(a=>a.lookBehind("to$").found?!1:a.has("#Copula #Gerund")?!0:a.has("#Gerund")?!1:a.has("#Copula")?!0:!(a.has("#PresentTense")&&!a.has("#Infinitive")&&a.lookBefore("(he|she|it|that|which)$").found));n.found&&n.forEach(a=>{if(a.has("#Copula")){a.match("was").replaceWith("is"),a.match("is").replaceWith("will be");return}a.toInfinitive()})}return e},gO=function(e){return e.verbs().first().toNegative().compute("chunks"),e},vO=function(e){return e.verbs().first().toPositive().compute("chunks"),e},yO=function(e){return e.verbs().toInfinitive(),e},bO=function(e){class t extends e{constructor(a,i,o){super(a,i,o),this.viewType="Sentences"}json(a={}){return this.map(i=>{const o=i.toView().json(a)[0]||{},{subj:s,verb:u,pred:l,grammar:c}=ki(i);return o.sentence={subject:s.text("normal"),verb:u.text("normal"),predicate:l.text("normal"),grammar:c},o},[])}toPastTense(a){return this.getNth(a).map(i=>(ki(i),dO(i)))}toPresentTense(a){return this.getNth(a).map(i=>(ki(i),hO(i)))}toFutureTense(a){return this.getNth(a).map(i=>(ki(i),i=pO(i),i))}toInfinitive(a){return this.getNth(a).map(i=>(ki(i),yO(i)))}toNegative(a){return this.getNth(a).map(i=>(ki(i),gO(i)))}toPositive(a){return this.getNth(a).map(i=>(ki(i),vO(i)))}isQuestion(a){return this.questions(a)}isExclamation(a){return this.filter(o=>o.lastTerm().has("@hasExclamation")).getNth(a)}isStatement(a){return this.filter(o=>!o.isExclamation().found&&!o.isQuestion().found).getNth(a)}update(a){const i=new t(this.document,a);return i._cache=this._cache,i}}t.prototype.toPresent=t.prototype.toPresentTense,t.prototype.toPast=t.prototype.toPastTense,t.prototype.toFuture=t.prototype.toFutureTense;const r={sentences:function(n){let a=this.map(i=>i.fullSentence());return a=a.getNth(n),new t(this.document,a.pointer)},questions:function(n){return uO(this).getNth(n)}};Object.assign(e.prototype,r)},wO={api:bO},xO=function(e){let t=e.splitAfter("@hasComma");t=t.match("#Honorific+? #Person+");const r=t.match("#Possessive").notIf("(his|her)");return t=t.splitAfter(r),t},eg=function(e){const t={};t.firstName=e.match("#FirstName+"),t.lastName=e.match("#LastName+"),t.honorific=e.match("#Honorific+");const r=t.lastName,n=t.firstName;return(!n.found||!r.found)&&!n.found&&!r.found&&e.has("^#Honorific .$")&&(t.lastName=e.match(".$")),t},Mn="male",Gr="female",tg={mr:Mn,mrs:Gr,miss:Gr,madam:Gr,king:Mn,queen:Gr,duke:Mn,duchess:Gr,baron:Mn,baroness:Gr,count:Mn,countess:Gr,prince:Mn,princess:Gr,sire:Mn,dame:Gr,lady:Gr,ayatullah:Mn,congressman:Mn,congresswoman:Gr,"first lady":Gr,mx:null},DO=function(e,t){const{firstName:r,honorific:n}=e;if(r.has("#FemaleName"))return Gr;if(r.has("#MaleName"))return Mn;if(n.found){let i=n.text("normal");if(i=i.replace(/\./g,""),tg.hasOwnProperty(i))return tg[i];if(/^her /.test(i))return Gr;if(/^his /.test(i))return Mn}const a=t.after();if(!a.has("#Person")&&a.has("#Pronoun")){const i=a.match("#Pronoun");if(i.has("(they|their)"))return null;const o=i.has("(he|his)"),s=i.has("(she|her|hers)");if(o&&!s)return Mn;if(s&&!o)return Gr}return null},NO=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="People"}parse(n){return this.getNth(n).map(eg)}json(n){const a=typeof n=="object"?n:{};return this.getNth(n).map(i=>{const o=i.toView().json(a)[0],s=eg(i);return o.person={firstName:s.firstName.text("normal"),lastName:s.lastName.text("normal"),honorific:s.honorific.text("normal"),presumed_gender:DO(s,i)},o},[])}presumedMale(){return this.filter(n=>n.has("(#MaleName|mr|mister|sr|jr|king|pope|prince|sir)"))}presumedFemale(){return this.filter(n=>n.has("(#FemaleName|mrs|miss|queen|princess|madam)"))}update(n){const a=new t(this.document,n);return a._cache=this._cache,a}}e.prototype.people=function(r){let n=xO(this);return n=n.getNth(r),new t(this.document,n.pointer)}},AO=function(e){let t=e.match("(#Place|#Address)+"),r=t.match("@hasComma");return r=r.filter(n=>n.has("(asia|africa|europe|america)$")?!0:!(n.has("(#City|#Region|#ProperNoun)$")&&n.after("^(#Country|#Region)").found)),t=t.splitAfter(r),t},CO=function(e){e.prototype.places=function(t){let r=AO(this);return r=r.getNth(t),new e(this.document,r.pointer)}},EO=function(e){e.prototype.organizations=function(t){return this.match("#Organization+").getNth(t)}},SO=function(e){const t=this.clauses();let r=t.people();return r=r.concat(t.places()),r=r.concat(t.organizations()),r=r.not("(someone|man|woman|mother|brother|sister|father)"),r=r.sort("seq"),r=r.getNth(e),r},MO=function(e){e.prototype.topics=SO},TO=function(e){NO(e),CO(e),EO(e),MO(e)},FO={api:TO},PO=function(e){let t=e.match("<Verb>");return t=t.not("#Conjunction"),t=t.not("#Preposition"),t=t.splitAfter("@hasComma"),t=t.splitAfter("[(do|did|am|was|is|will)] (is|was)",0),t=t.splitBefore("(#Verb && !#Copula) [being] #Verb",0),t=t.splitBefore("#Verb [to be] #Verb",0),t=t.splitAfter("[help] #PresentTense",0),t=t.splitBefore("(#PresentTense|#PastTense) [#Copula]$",0),t=t.splitBefore("(#PresentTense|#PastTense) [will be]$",0),t=t.splitBefore("(#PresentTense|#PastTense) [(had|has)]",0),t=t.not("#Reflexive$"),t=t.not("#Adjective"),t=t.splitAfter("[#PastTense] #PastTense",0),t=t.splitAfter("[#PastTense] #Auxiliary+ #PastTense",0),t=t.splitAfter("#Copula [#Gerund] #PastTense",0),t=t.if("#Verb"),t.has("(#Verb && !#Auxiliary) #Adverb+? #Copula")&&(t=t.splitBefore("#Copula")),t},kO=function(e){let t=e;return e.wordCount()>1&&(t=e.not("(#Negative|#Auxiliary|#Modal|#Adverb|#Prefix)")),t.length>1&&!t.has("#Phrasal #Particle")&&(t=t.last()),t=t.not("(want|wants|wanted) to"),t.found||(t=e.not("#Negative")),t},OO=function(e,t){const r={pre:e.none(),post:e.none()};if(!e.has("#Adverb"))return r;const n=e.splitOn(t);return n.length===3?{pre:n.eq(0).adverbs(),post:n.eq(2).adverbs()}:n.eq(0).isDoc(t)?(r.post=n.eq(1).adverbs(),r):(r.pre=n.eq(0).adverbs(),r)},$O=function(e,t){const r=e.splitBefore(t);if(r.length<=1)return e.none();let n=r.eq(0);return n=n.not("(#Adverb|#Negative|#Prefix)"),n},BO=function(e){return e.match("#Negative")},_O=function(e){if(!e.has("(#Particle|#PhrasalVerb)"))return{verb:e.none(),particle:e.none()};const t=e.match("#Particle$");return{verb:e.not(t),particle:t}},Vn=function(e){const t=e.clone();t.contractions().expand();const r=kO(t);return{root:r,prefix:t.match("#Prefix"),adverbs:OO(t,r),auxiliary:$O(t,r),negative:BO(t),phrasal:_O(r)}},Ln={tense:"PresentTense"},Iu={conditional:!0},xa={tense:"FutureTense"},bo={progressive:!0},vr={tense:"PastTense"},wo={complete:!0,progressive:!1},Ka={passive:!0},IO={plural:!0},zO={plural:!1},jO=function(e){const t={};return e.forEach(r=>{Object.assign(t,r)}),t},rg={imperative:[["#Imperative",[]]],"want-infinitive":[["^(want|wants|wanted) to #Infinitive$",[Ln]],["^wanted to #Infinitive$",[vr]],["^will want to #Infinitive$",[xa]]],"gerund-phrase":[["^#PastTense #Gerund$",[vr]],["^#PresentTense #Gerund$",[Ln]],["^#Infinitive #Gerund$",[Ln]],["^will #Infinitive #Gerund$",[xa]],["^have #PastTense #Gerund$",[vr]],["^will have #PastTense #Gerund$",[vr]]],"simple-present":[["^#PresentTense$",[Ln]],["^#Infinitive$",[Ln]]],"simple-past":[["^#PastTense$",[vr]]],"simple-future":[["^will #Adverb? #Infinitive",[xa]]],"present-progressive":[["^(is|are|am) #Gerund$",[Ln,bo]]],"past-progressive":[["^(was|were) #Gerund$",[vr,bo]]],"future-progressive":[["^will be #Gerund$",[xa,bo]]],"present-perfect":[["^(has|have) #PastTense$",[vr,wo]]],"past-perfect":[["^had #PastTense$",[vr,wo]],["^had #PastTense to #Infinitive",[vr,wo]]],"future-perfect":[["^will have #PastTense$",[xa,wo]]],"present-perfect-progressive":[["^(has|have) been #Gerund$",[vr,bo]]],"past-perfect-progressive":[["^had been #Gerund$",[vr,bo]]],"future-perfect-progressive":[["^will have been #Gerund$",[xa,bo]]],"passive-past":[["(got|were|was) #Passive",[vr,Ka]],["^(was|were) being #Passive",[vr,Ka]],["^(had|have) been #Passive",[vr,Ka]]],"passive-present":[["^(is|are|am) #Passive",[Ln,Ka]],["^(is|are|am) being #Passive",[Ln,Ka]],["^has been #Passive",[Ln,Ka]]],"passive-future":[["will have been #Passive",[xa,Ka,Iu]],["will be being? #Passive",[xa,Ka,Iu]]],"present-conditional":[["would be #PastTense",[Ln,Iu]]],"past-conditional":[["would have been #PastTense",[vr,Iu]]],"auxiliary-future":[["(is|are|am|was) going to (#Infinitive|#PresentTense)",[xa]]],"auxiliary-past":[["^did #Infinitive$",[vr,zO]],["^used to #Infinitive$",[vr,wo]]],"auxiliary-present":[["^(does|do) #Infinitive$",[Ln,wo,IO]]],"modal-past":[["^(could|must|should|shall) have #PastTense$",[vr]]],"modal-infinitive":[["^#Modal #Infinitive$",[]]],infinitive:[["^#Infinitive$",[]]]},hm=[];Object.keys(rg).map(e=>{rg[e].forEach(t=>{hm.push({name:e,match:t[0],data:jO(t[1])})})});const qO=function(e,t){return e=e.clone(),t.adverbs.post&&t.adverbs.post.found&&e.remove(t.adverbs.post),t.adverbs.pre&&t.adverbs.pre.found&&e.remove(t.adverbs.pre),e.has("#Negative")&&(e=e.remove("#Negative")),e.has("#Prefix")&&(e=e.remove("#Prefix")),t.root.has("#PhrasalVerb #Particle")&&e.remove("#Particle$"),e=e.not("#Adverb"),e},RO=function(e){return!!(e.has("#Infinitive")&&e.growLeft("to").has("^to #Infinitive"))},Sa=function(e,t){const r={};e=qO(e,t);for(let n=0;n<hm.length;n+=1){const a=hm[n];if(e.has(a.match)===!0){r.form=a.name,Object.assign(r,a.data);break}}return r.form||e.has("^#Verb$")&&(r.form="infinitive"),r.tense||(r.tense=t.root.has("#PastTense")?"PastTense":"PresentTense"),r.copula=t.root.has("#Copula"),r.isInfinitive=RO(e),r},ng=function(e){return e.length<=1?!1:(e.parse()[0]||{}).isSubordinate},LO=function(e){let t=e.clauses();return t=t.filter((r,n)=>!(r.has("^(if|unless|while|but|for|per|at|by|that|which|who|from)")||n>0&&r.has("^#Verb . #Noun+$")||n>0&&r.has("^#Adverb"))),t.length===0?e:t},HO=function(e){let t=e.before();t=LO(t);const r=t.nouns();let n=r.last();const a=n.match("(i|he|she|we|you|they)");if(a.found)return a.nouns();let i=r.if("^(that|this|those)");return i.found||r.found===!1&&(i=t.match("^(that|this|those)"),i.found)?i:(n=r.last(),ng(n)&&(r.remove(n),n=r.last()),ng(n)&&(r.remove(n),n=r.last()),n)},GO=function(e,t){return t.has("(are|were|does)")||e.has("(those|they|we)")?!0:e.found&&e.isPlural?e.isPlural().found:!1},ca=function(e){const t=HO(e);return{subject:t,plural:GO(t,e)}},Rt=e=>e,Ps=(e,t)=>{const r=ca(e),n=r.subject;return n.has("i")||n.has("we")?!0:r.plural},VO=(e,t)=>{const{subject:r,plural:n}=ca(e);return n||r.has("we")?"were":"was"},ks=function(e,t){if(e.has("were"))return"are";const{subject:r,plural:n}=ca(e);return r.has("i")?"am":r.has("we")||n?"are":"is"},wd=function(e,t){const r=ca(e),n=r.subject;return n.has("i")||n.has("we")||r.plural?"do":"does"},gn=function(e){if(e.has("#Infinitive"))return"Infinitive";if(e.has("#Participle"))return"Participle";if(e.has("#PastTense"))return"PastTense";if(e.has("#Gerund"))return"Gerund";if(e.has("#PresentTense"))return"PresentTense"},pm=function(e,t){const{toInfinitive:r}=e.methods.two.transform.verb;let n=t.root.text({keepPunct:!1});return n=r(n,e.model,gn(e)),n&&e.replace(t.root,n),e},ag=e=>e.has("will not")?e.replace("will not","have not"):e.remove("will"),ig=function(e){if(!e||!e.isView)return[];const t={normal:!0,terms:!1,text:!1};return e.json(t).map(r=>r.normal)},og=function(e){return!e||!e.isView?"":e.text("normal")},UO=function(e){const{toInfinitive:t}=e.methods.two.transform.verb,r=e.text("normal");return t(r,e.model,gn(e))},WO=function(e){const t=Vn(e);e=e.clone().toView();const r=Sa(e,t);return{root:t.root.text(),preAdverbs:ig(t.adverbs.pre),postAdverbs:ig(t.adverbs.post),auxiliary:og(t.auxiliary),negative:t.negative.found,prefix:og(t.prefix),infinitive:UO(t.root),grammar:r}},JO={tags:!0},KO=function(e,t){const{toInfinitive:r}=e.methods.two.transform.verb,{root:n,auxiliary:a}=t,i=a.terms().harden();let o=n.text("normal");if(o=r(o,e.model,gn(n)),o&&e.replace(n,o,JO).tag("Verb").firstTerm().tag("Infinitive"),i.found&&e.remove(i),t.negative.found){e.has("not")||e.prepend("not");const s=wd(e);e.prepend(s)}return e.fullSentence().compute(["freeze","lexicon","preTagger","postTagger","unfreeze","chunks"]),e},Sn={tags:!0},Ma={noAux:(e,t)=>(t.auxiliary.found&&(e=e.remove(t.auxiliary)),e),simple:(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,a=t.root;if(a.has("#Modal"))return e;let i=a.text({keepPunct:!1});return i=n(i,e.model,gn(a)),i=r(i,e.model).PastTense,i=i==="been"?"was":i,i==="was"&&(i=VO(e)),i&&e.replace(a,i,Sn),e},both:function(e,t){return t.negative.found?(e.replace("will","did"),e):(e=Ma.simple(e,t),e=Ma.noAux(e,t),e)},hasHad:e=>(e.replace("has","had",Sn),e),hasParticiple:(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,a=t.root;let i=a.text("normal");return i=n(i,e.model,gn(a)),r(i,e.model).Participle}},sg={infinitive:Ma.simple,"simple-present":Ma.simple,"simple-past":Rt,"simple-future":Ma.both,"present-progressive":e=>(e.replace("are","were",Sn),e.replace("(is|are|am)","was",Sn),e),"past-progressive":Rt,"future-progressive":(e,t)=>(e.match(t.root).insertBefore("was"),e.remove("(will|be)"),e),"present-perfect":Ma.hasHad,"past-perfect":Rt,"future-perfect":(e,t)=>(e.match(t.root).insertBefore("had"),e.has("will")&&(e=ag(e)),e.remove("have"),e),"present-perfect-progressive":Ma.hasHad,"past-perfect-progressive":Rt,"future-perfect-progressive":e=>(e.remove("will"),e.replace("have","had",Sn),e),"passive-past":e=>(e.replace("have","had",Sn),e),"passive-present":e=>(e.replace("(is|are)","was",Sn),e),"passive-future":(e,t)=>(t.auxiliary.has("will be")&&(e.match(t.root).insertBefore("had been"),e.remove("(will|be)")),t.auxiliary.has("will have been")&&(e.replace("have","had",Sn),e.remove("will")),e),"present-conditional":e=>(e.replace("be","have been"),e),"past-conditional":Rt,"auxiliary-future":e=>(e.replace("(is|are|am)","was",Sn),e),"auxiliary-past":Rt,"auxiliary-present":e=>(e.replace("(do|does)","did",Sn),e),"modal-infinitive":(e,t)=>(e.has("can")?e.replace("can","could",Sn):(Ma.simple(e,t),e.match("#Modal").insertAfter("have").tag("Auxiliary")),e),"modal-past":Rt,"want-infinitive":e=>(e.replace("(want|wants)","wanted",Sn),e.remove("will"),e),"gerund-phrase":(e,t)=>(t.root=t.root.not("#Gerund$"),Ma.simple(e,t),ag(e),e)},YO=function(e,t,r){return sg.hasOwnProperty(r)&&(e=sg[r](e,t),e.fullSentence().compute(["tagger","chunks"])),e},gm=function(e,t){const r=ca(e),n=r.subject;return n.has("(i|we|you)")?"have":r.plural===!1||n.has("he")||n.has("she")||n.has("#Person")?"has":"have"},vm=(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,{root:a,auxiliary:i}=t;if(a.has("#Modal"))return e;let o=a.text({keepPunct:!1});o=n(o,e.model,gn(a));const s=r(o,e.model);if(o=s.Participle||s.PastTense,o){e=e.replace(a,o);const u=gm(e);e.prepend(u).match(u).tag("Auxiliary"),e.remove(i)}return e},ug={infinitive:vm,"simple-present":vm,"simple-future":(e,t)=>e.replace("will",gm(e)),"present-perfect":Rt,"past-perfect":Rt,"future-perfect":(e,t)=>e.replace("will have",gm(e)),"present-perfect-progressive":Rt,"past-perfect-progressive":Rt,"future-perfect-progressive":Rt},ZO=function(e,t,r){return ug.hasOwnProperty(r)?(e=ug[r](e,t),e.fullSentence().compute(["tagger","chunks"]),e):(e=vm(e,t),e.fullSentence().compute(["tagger","chunks"]),e)},Fa={tags:!0},xo=(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,a=t.root;let i=a.text("normal");return i=n(i,e.model,gn(a)),Ps(e)===!1&&(i=r(i,e.model).PresentTense),a.has("#Copula")&&(i=ks(e)),i&&(e=e.replace(a,i,Fa),e.not("#Particle").tag("PresentTense")),e},lg=(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,a=t.root;let i=a.text("normal");return i=n(i,e.model,gn(a)),Ps(e)===!1&&(i=r(i,e.model).Gerund),i&&(e=e.replace(a,i,Fa),e.not("#Particle").tag("Gerund")),e},QO=(e,t)=>{const{toInfinitive:r}=e.methods.two.transform.verb,n=t.root;let a=t.root.text("normal");return a=r(a,e.model,gn(n)),a&&(e=e.replace(t.root,a,Fa)),e},cg={infinitive:xo,"simple-present":(e,t)=>{const{conjugate:r}=e.methods.two.transform.verb,{root:n}=t;if(n.has("#Infinitive")){const i=ca(e).subject;if(Ps(e)||i.has("i"))return e;const o=n.text("normal"),s=r(o,e.model).PresentTense;o!==s&&e.replace(n,s,Fa)}else return xo(e,t);return e},"simple-past":xo,"simple-future":(e,t)=>{const{root:r,auxiliary:n}=t;if(n.has("will")&&r.has("be")){const a=ks(e);e.replace(r,a),e=e.remove("will"),e.replace("not "+a,a+" not")}else xo(e,t),e=e.remove("will");return e},"present-progressive":Rt,"past-progressive":(e,t)=>{const r=ks(e);return e.replace("(were|was)",r,Fa)},"future-progressive":e=>(e.match("will").insertBefore("is"),e.remove("be"),e.remove("will")),"present-perfect":(e,t)=>(xo(e,t),e=e.remove("(have|had|has)"),e),"past-perfect":(e,t)=>{const n=ca(e).subject;return Ps(e)||n.has("i")?(e=pm(e,t),e.remove("had"),e):(e.replace("had","has",Fa),e)},"future-perfect":e=>(e.match("will").insertBefore("has"),e.remove("have").remove("will")),"present-perfect-progressive":Rt,"past-perfect-progressive":e=>e.replace("had","has",Fa),"future-perfect-progressive":e=>(e.match("will").insertBefore("has"),e.remove("have").remove("will")),"passive-past":(e,t)=>{const r=ks(e);return e.has("(had|have|has)")&&e.has("been")?(e.replace("(had|have|has)",r,Fa),e.replace("been","being"),e):e.replace("(got|was|were)",r)},"passive-present":Rt,"passive-future":e=>(e.replace("will","is"),e.replace("be","being")),"present-conditional":Rt,"past-conditional":e=>(e.replace("been","be"),e.remove("have")),"auxiliary-future":(e,t)=>(lg(e,t),e.remove("(going|to)"),e),"auxiliary-past":(e,t)=>{if(t.auxiliary.has("did")){const r=wd(e);return e.replace(t.auxiliary,r),e}return lg(e,t),e.replace(t.auxiliary,"is"),e},"auxiliary-present":Rt,"modal-infinitive":Rt,"modal-past":(e,t)=>(QO(e,t),e.remove("have")),"gerund-phrase":(e,t)=>(t.root=t.root.not("#Gerund$"),xo(e,t),e.remove("(will|have)")),"want-infinitive":(e,t)=>{let r="wants";return Ps(e)&&(r="want"),e.replace("(want|wanted|wants)",r,Fa),e.remove("will"),e}},XO=function(e,t,r){return cg.hasOwnProperty(r)&&(e=cg[r](e,t),e.fullSentence().compute(["tagger","chunks"])),e},Jw={tags:!0},zu=(e,t)=>{const{toInfinitive:r}=e.methods.two.transform.verb,{root:n,auxiliary:a}=t;if(n.has("#Modal"))return e;let i=n.text("normal");return i=r(i,e.model,gn(n)),i&&(e=e.replace(n,i,Jw),e.not("#Particle").tag("Verb")),e.prepend("will").match("will").tag("Auxiliary"),e.remove(a),e},fg=(e,t)=>{const{conjugate:r,toInfinitive:n}=e.methods.two.transform.verb,{root:a,auxiliary:i}=t;let o=a.text("normal");return o=n(o,e.model,gn(a)),o&&(o=r(o,e.model).Gerund,e.replace(a,o,Jw),e.not("#Particle").tag("PresentTense")),e.remove(i),e.prepend("will be").match("will be").tag("Auxiliary"),e},mg={infinitive:zu,"simple-present":zu,"simple-past":zu,"simple-future":Rt,"present-progressive":fg,"past-progressive":fg,"future-progressive":Rt,"present-perfect":e=>(e.match("(have|has)").replaceWith("will have"),e),"past-perfect":e=>e.replace("(had|has)","will have"),"future-perfect":Rt,"present-perfect-progressive":e=>e.replace("has","will have"),"past-perfect-progressive":e=>e.replace("had","will have"),"future-perfect-progressive":Rt,"passive-past":e=>e.has("got")?e.replace("got","will get"):e.has("(was|were)")?(e.replace("(was|were)","will be"),e.remove("being")):e.has("(have|has|had) been")?e.replace("(have|has|had) been","will be"):e,"passive-present":e=>(e.replace("being","will be"),e.remove("(is|are|am)"),e),"passive-future":Rt,"present-conditional":e=>e.replace("would","will"),"past-conditional":e=>e.replace("would","will"),"auxiliary-future":Rt,"auxiliary-past":e=>e.has("used")&&e.has("to")?(e.replace("used","will"),e.remove("to")):(e.replace("did","will"),e),"auxiliary-present":e=>e.replace("(do|does)","will"),"modal-infinitive":Rt,"modal-past":Rt,"gerund-phrase":(e,t)=>(t.root=t.root.not("#Gerund$"),zu(e,t),e.remove("(had|have)")),"want-infinitive":e=>(e.replace("(want|wants|wanted)","will want"),e)},e$=function(e,t,r){return e.has("will")||e.has("going to")||mg.hasOwnProperty(r)&&(e=mg[r](e,t),e.fullSentence().compute(["tagger","chunks"])),e},t$={tags:!0},r$=function(e,t){const{toInfinitive:r,conjugate:n}=e.methods.two.transform.verb,{root:a,auxiliary:i}=t;if(e.has("#Gerund"))return e;let o=a.text("normal");o=r(o,e.model,gn(a));const s=n(o,e.model).Gerund;if(s){const u=ks(e);e.replace(a,s,t$),e.remove(i),e.prepend(u)}return e.replace("not is","is not"),e.replace("not are","are not"),e.fullSentence().compute(["tagger","chunks"]),e},dg={tags:!0},mf=function(e,t){const r=wd(e);return e.prepend(r+" not"),e},Cl=function(e){let t=e.match("be");return t.found?(t.prepend("not"),e):(t=e.match("(is|was|am|are|will|were)"),t.found&&t.append("not"),e)},El=e=>e.has("(is|was|am|are|will|were|be)"),hg={"simple-present":(e,t)=>El(e)===!0?Cl(e):(e=pm(e,t),e=mf(e),e),"simple-past":(e,t)=>El(e)===!0?Cl(e):(e=pm(e,t),e.prepend("did not"),e),imperative:e=>(e.prepend("do not"),e),infinitive:(e,t)=>El(e)===!0?Cl(e):mf(e),"passive-past":e=>{if(e.has("got"))return e.replace("got","get",dg),e.prepend("did not"),e;const t=e.match("(was|were|had|have)");return t.found&&t.append("not"),e},"auxiliary-past":e=>{if(e.has("used"))return e.prepend("did not"),e;const t=e.match("(did|does|do)");return t.found&&t.append("not"),e},"want-infinitive":(e,t)=>(e=mf(e),e=e.replace("wants","want",dg),e)},n$=function(e,t,r){if(e.has("#Negative"))return e;if(hg.hasOwnProperty(r))return e=hg[r](e,t),e;let n=e.matchOne("be");return n.found?(n.prepend("not"),e):El(e)===!0?Cl(e):(n=e.matchOne("(will|had|have|has|did|does|do|#Modal)"),n.found&&n.append("not"),e)},a$=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Verbs"}parse(n){return this.getNth(n).map(Vn)}json(n,a){return this.getNth(a).map(s=>{const u=s.toView().json(n)[0]||{};return u.verb=WO(s),u},[])}subjects(n){return this.getNth(n).map(a=>(Vn(a),ca(a).subject))}adverbs(n){return this.getNth(n).map(a=>a.match("#Adverb"))}isSingular(n){return this.getNth(n).filter(a=>ca(a).plural!==!0)}isPlural(n){return this.getNth(n).filter(a=>ca(a).plural===!0)}isImperative(n){return this.getNth(n).filter(a=>a.has("#Imperative"))}toInfinitive(n){return this.getNth(n).map(a=>{const i=Vn(a),o=Sa(a,i);return KO(a,i,o.form)})}toPresentTense(n){return this.getNth(n).map(a=>{const i=Vn(a),o=Sa(a,i);return o.isInfinitive?a:XO(a,i,o.form)})}toPastTense(n){return this.getNth(n).map(a=>{const i=Vn(a),o=Sa(a,i);return o.isInfinitive?a:YO(a,i,o.form)})}toFutureTense(n){return this.getNth(n).map(a=>{const i=Vn(a),o=Sa(a,i);return o.isInfinitive?a:e$(a,i,o.form)})}toGerund(n){return this.getNth(n).map(a=>{const i=Vn(a),o=Sa(a,i);return o.isInfinitive?a:r$(a,i,o.form)})}toPastParticiple(n){return this.getNth(n).map(a=>{const i=Vn(a),o=Sa(a,i);return o.isInfinitive?a:ZO(a,i,o.form)})}conjugate(n){const{conjugate:a,toInfinitive:i}=this.world.methods.two.transform.verb;return this.getNth(n).map(o=>{const s=Vn(o),u=Sa(o,s);u.form==="imperative"&&(u.form="simple-present");let l=s.root.text("normal");if(!s.root.has("#Infinitive")){const c=gn(s.root);l=i(l,o.model,c)||l}return a(l,o.model)},[])}isNegative(){return this.if("#Negative")}isPositive(){return this.ifNo("#Negative")}toPositive(){const n=this.match("do not #Verb");return n.found&&n.remove("do not"),this.remove("#Negative")}toNegative(n){return this.getNth(n).map(a=>{const i=Vn(a),o=Sa(a,i);return n$(a,i,o.form)})}update(n){const a=new t(this.document,n);return a._cache=this._cache,a}}t.prototype.toPast=t.prototype.toPastTense,t.prototype.toPresent=t.prototype.toPresentTense,t.prototype.toFuture=t.prototype.toFutureTense,e.prototype.verbs=function(r){let n=PO(this);return n=n.getNth(r),new t(this.document,n.pointer)}},i$={api:a$},ym=function(e,t){const r=t.match(e);if(r.found){const n=r.pronouns().refersTo();if(n.found)return n}return t.none()},pg=function(e){if(!e.found)return e;const[t]=e.fullPointer[0];return t&&t>0?e.update([[t-1]]):e.none()},o$=function(e,t){return t==="m"?e.filter(r=>!r.presumedFemale().found):t==="f"?e.filter(r=>!r.presumedMale().found):e},gg=function(e,t){let r=e.people();return r=o$(r,t),r.found||(r=e.nouns("#Actor"),r.found)?r.last():t==="f"?ym("(she|her|hers)",e):t==="m"?ym("(he|him|his)",e):e.none()},s$=function(e){const t=e.nouns();let r=t.isPlural().notIf("#Pronoun");if(r.found)return r.last();const n=ym("(they|their|theirs)",e);return n.found?n:(r=t.match("(somebody|nobody|everybody|anybody|someone|noone|everyone|anyone)"),r.found?r.last():e.none())},u$=function(e,t){if(t&&t.found){const r=e.docs[0][0];r.reference=t.ptrs[0]}},df=function(e,t){let r=e.before(),n=t(r);return n.found||(r=pg(e),n=t(r),n.found)||(r=pg(r),n=t(r),n.found)?n:e.none()},l$=function(e){e.pronouns().if("(he|him|his|she|her|hers|they|their|theirs|it|its)").forEach(r=>{let n=null;r.has("(he|him|his)")?n=df(r,a=>gg(a,"m")):r.has("(she|her|hers)")?n=df(r,a=>gg(a,"f")):r.has("(they|their|theirs)")&&(n=df(r,s$)),n&&n.found&&u$(r,n)})},c$=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.viewType="Pronouns"}hasReference(){return this.compute("coreference"),this.filter(n=>n.docs[0][0].reference)}refersTo(){return this.compute("coreference"),this.map(n=>{if(!n.found)return n.none();const a=n.docs[0][0];return a.reference?n.update([a.reference]):n.none()})}update(n){const a=new t(this.document,n);return a._cache=this._cache,a}}e.prototype.pronouns=function(r){let n=this.match("#Pronoun");return n=n.getNth(r),new t(n.document,n.pointer)}},f$={compute:{coreference:l$},api:c$};tt.plugin(SP);tt.plugin(FP);tt.plugin(VP);tt.plugin(f$);tt.plugin(ck);tt.plugin(hk);tt.plugin(Mk);tt.plugin(nO);tt.plugin(oO);tt.plugin(wO);tt.plugin(FO);tt.plugin(i$);const m$=function(e){let t=null;return e.has("^(between|within) #Date")||(e.has("#Month")&&(t=e.match("[#Month #Value] and? #Month",0).ifNo("@hasDash$"),t.found&&(e=e.splitAfter(t)),t=e.match("[#Value #Month] and? #Value #Month",0),t.found&&(e=e.splitAfter(t)),t=e.match("^[#Month] and? #Month #Ordinal?$",0),t.found&&(e=e.splitAfter(t)),t=e.match("[#Month #Value] #Month",0).ifNo("@hasDash$"),t.found&&(e=e.splitAfter(t))),e.has("#WeekDay")&&(t=e.match("^[#WeekDay] and? #WeekDay$",0).ifNo("@hasDash$"),t.found&&(e=e.splitAfter(t)),t=e.match("#WeekDay #WeekDay and? #WeekDay"),t.found&&(e=e.splitOn("#WeekDay")),t=e.match("[#WeekDay] (and|or|this|next)? #WeekDay",0).ifNo("@hasDash$"),t.found&&(e=e.splitAfter("#WeekDay"))),t=e.match("(this|next) #Duration [(today|tomorrow|yesterday)]",0),t.found&&(e=e.splitBefore(t)),t=e.match("[(today|tomorrow|yesterday)] #Value #Month",0),t.found&&(e=e.splitAfter(t)),t=e.match("[(today|tomorrow|yesterday)] (today|tomorrow|yesterday|#WeekDay)",0).ifNo("@hasDash$"),t.found&&(e=e.splitAfter(t)),t=e.match("#Year [and] #Year",0),t.found&&(e=e.splitAfter(t)),e=e.not("^and"),e=e.not("and$")),e},d$=function(e){let t=e.match("#Date+");t=t.filter(n=>{let a=n.has("^#Duration+$")||n.has("^#Value #Duration+$");return a===!0&&n.has("(#FinancialQuarter|quarter)")?!0:a===!1});let r=t.match("[#Cardinal #Duration (in|on|this|next|during|for)] #Date",0);return r.found&&(t=t.not(r)),r=t.match("[#Cardinal #Duration] #WeekDay",0),r.found&&(t=t.not(r)),r=t.match("#Date [for #Value #Duration]$",0),r.found&&(t=t.not(r)),r=t.match("[#Cardinal #Duration] #Date",0),r.found&&!t.has("#Cardinal #Duration] (ago|from|before|after|back)")&&(t=t.not(r)),r=t.match("for #Cardinal #Duration"),r.found&&(t=t.not(r)),t=t.notIf("^one (#WeekDay|#Month)$"),t=m$(t),t=t.notIf("(#Money|#Percentage)"),t=t.notIf("^per #Duration"),t},h$={second:!0,minute:!0,hour:!0,day:!0,week:!0,weekend:!0,month:!0,season:!0,quarter:!0,year:!0},vg={wk:"week",min:"minute",sec:"second",weekend:"week"},hf=function(e){let t=e.match("#Duration").text("normal");return t=t.replace(/s$/,""),vg.hasOwnProperty(t)&&(t=vg[t]),t},p$=function(e){let t={},r=e.none(),n=e.match("#DateShift+");if(n.found===!1)return{res:t,m:r};if(n.match("#Cardinal #Duration").forEach(a=>{let i=a.match("#Cardinal").numbers().get()[0];if(i&&typeof i=="number"){let o=hf(a);h$[o]===!0&&(t[o]=i)}}),n.has("(before|ago|hence|back)$")===!0&&Object.keys(t).forEach(a=>t[a]*=-1),r=n.match("#Cardinal #Duration"),n=n.not(r),r=n.match("[<unit>#Duration] [<dir>(after|before)]"),r.found){let a=r.groups("unit").text("reduced"),i=r.groups("dir").text("reduced");i==="after"?t[a]=1:i==="before"&&(t[a]=-1)}if(r=n.match("half (a|an) [#Duration]",0),r.found){let a=hf(r);t[a]=.5}if(r=n.match("a (few|couple) [#Duration]",0),r.found){let a=hf(r);t[a]=r.has("few")?3:2}return r=e.match("#DateShift+"),{result:t,m:r}},g$={minute:!0},v$=function(e){let t=e.match("[<num>#Value] [<unit>#Duration+] (of|in)");if(t.found){let r=t.groups(),n=r.num.numbers().get()[0],a=r.unit.text("reduced"),i={unit:a,num:Number(n)||0};return g$[a]||(i.num-=1),{result:i,m:t}}if(t=e.match("[<dir>(first|initial|last|final)] [<unit>#Duration+] (of|in)"),t.found){let r=t.groups(),n=r.dir.text("reduced"),a=r.unit.text("reduced");return n==="initial"&&(n="first"),n==="final"&&(n="last"),{result:{unit:a,dir:n},m:t}}return{result:null,m:e.none()}},y$=3600*1e3,yg=(e,t,r)=>{const[n,a]=e.split("/"),[i,o]=a.split(":");return Date.UTC(r,n-1,i,o)-t*y$},Kw=(e,t,r,n,a)=>{const i=new Date(e).getUTCFullYear(),o=yg(t,a,i),s=yg(r,n,i);return e>=o&&e<s},b$=e=>{let r=e.timezones[e.tz];if(r===void 0)return console.warn("Warning: couldn't find timezone "+e.tz),0;if(r.dst===void 0)return r.offset;let n=r.offset,a=r.offset+1;r.hem==="n"&&(a=n-1);let i=r.dst.split("->");return Kw(e.epoch,i[0],i[1],n,a)===!0?n:a},bg={"9|s":"2/dili,2/jayapura","9|n":"2/chita,2/khandyga,2/pyongyang,2/seoul,2/tokyo,2/yakutsk,11/palau,japan,rok","9.5|s|04/06:03->10/05:04":"4/adelaide,4/broken_hill,4/south,4/yancowinna","9.5|s":"4/darwin,4/north","8|s|03/13:01->10/02:00":"12/casey","8|s":"2/kuala_lumpur,2/makassar,2/singapore,4/perth,2/ujung_pandang,4/west,singapore","8|n":"2/brunei,2/hong_kong,2/irkutsk,2/kuching,2/macau,2/manila,2/shanghai,2/taipei,2/ulaanbaatar,2/chongqing,2/chungking,2/harbin,2/macao,2/ulan_bator,2/choibalsan,hongkong,prc,roc","8.75|s":"4/eucla","7|s":"12/davis,2/jakarta,9/christmas","7|n":"2/bangkok,2/barnaul,2/hovd,2/krasnoyarsk,2/novokuznetsk,2/novosibirsk,2/phnom_penh,2/pontianak,2/ho_chi_minh,2/tomsk,2/vientiane,2/saigon","6|s":"12/vostok","6|n":"2/almaty,2/bishkek,2/dhaka,2/omsk,2/qyzylorda,2/qostanay,2/thimphu,2/urumqi,9/chagos,2/dacca,2/kashgar,2/thimbu","6.5|n":"2/yangon,9/cocos,2/rangoon","5|s":"12/mawson,9/kerguelen","5|n":"2/aqtau,2/aqtobe,2/ashgabat,2/atyrau,2/dushanbe,2/karachi,2/oral,2/samarkand,2/tashkent,2/yekaterinburg,9/maldives,2/ashkhabad","5.75|n":"2/kathmandu,2/katmandu","5.5|n":"2/kolkata,2/colombo,2/calcutta","4|s":"9/reunion","4|n":"2/baku,2/dubai,2/muscat,2/tbilisi,2/yerevan,8/astrakhan,8/samara,8/saratov,8/ulyanovsk,8/volgograd,9/mahe,9/mauritius,2/volgograd","4.5|n":"2/kabul","3|s":"12/syowa,9/antananarivo","3|n|04/25:02->10/30:24":"0/cairo,egypt","3|n|04/12:04->10/25:02":"2/gaza,2/hebron","3|n|03/30:05->10/26:04":"2/famagusta,2/nicosia,8/athens,8/bucharest,8/helsinki,8/kyiv,8/mariehamn,8/riga,8/sofia,8/tallinn,8/uzhgorod,8/vilnius,8/zaporozhye,8/nicosia,8/kiev,eet","3|n|03/30:04->10/26:03":"8/chisinau,8/tiraspol","3|n|03/30:02->10/25:24":"2/beirut","3|n|03/28:04->10/26:02":"2/jerusalem,2/tel_aviv,israel","3|n":"0/addis_ababa,0/asmara,0/asmera,0/dar_es_salaam,0/djibouti,0/juba,0/kampala,0/mogadishu,0/nairobi,2/aden,2/amman,2/baghdad,2/bahrain,2/damascus,2/kuwait,2/qatar,2/riyadh,8/istanbul,8/kirov,8/minsk,8/moscow,8/simferopol,9/comoro,9/mayotte,2/istanbul,turkey,w-su","3.5|n":"2/tehran,iran","2|s|03/30:04->10/26:02":"12/troll","2|s":"0/gaborone,0/harare,0/johannesburg,0/lubumbashi,0/lusaka,0/maputo,0/maseru,0/mbabane","2|n|03/30:04->10/26:03":"0/ceuta,arctic/longyearbyen,8/amsterdam,8/andorra,8/belgrade,8/berlin,8/bratislava,8/brussels,8/budapest,8/busingen,8/copenhagen,8/gibraltar,8/ljubljana,8/luxembourg,8/madrid,8/malta,8/monaco,8/oslo,8/paris,8/podgorica,8/prague,8/rome,8/san_marino,8/sarajevo,8/skopje,8/stockholm,8/tirane,8/vaduz,8/vatican,8/vienna,8/warsaw,8/zagreb,8/zurich,3/jan_mayen,poland,cet,met","2|n":"0/blantyre,0/bujumbura,0/khartoum,0/kigali,0/tripoli,8/kaliningrad,libya","1|s":"0/brazzaville,0/kinshasa,0/luanda,0/windhoek","1|n|03/30:03->10/26:02":"3/canary,3/faroe,3/madeira,8/dublin,8/guernsey,8/isle_of_man,8/jersey,8/lisbon,8/london,3/faeroe,eire,8/belfast,gb-eire,gb,portugal,wet","1|n":"0/algiers,0/bangui,0/douala,0/lagos,0/libreville,0/malabo,0/ndjamena,0/niamey,0/porto-novo,0/tunis","14|n":"11/kiritimati","13|s":"11/apia,11/tongatapu","13|n":"11/enderbury,11/kanton,11/fakaofo","12|s|04/06:03->09/28:04":"12/mcmurdo,11/auckland,12/south_pole,nz","12|s":"11/fiji","12|n":"2/anadyr,2/kamchatka,2/srednekolymsk,11/funafuti,11/kwajalein,11/majuro,11/nauru,11/tarawa,11/wake,11/wallis,kwajalein","12.75|s|04/06:03->04/06:02":"11/chatham,nz-chat","11|s|04/06:03->10/05:04":"12/macquarie","11|s":"11/bougainville","11|n":"2/magadan,2/sakhalin,11/efate,11/guadalcanal,11/kosrae,11/noumea,11/pohnpei,11/ponape","11.5|n|04/06:03->10/05:04":"11/norfolk","10|s|04/06:03->10/05:04":"4/currie,4/hobart,4/melbourne,4/sydney,4/act,4/canberra,4/nsw,4/tasmania,4/victoria","10|s":"12/dumontdurville,4/brisbane,4/lindeman,11/port_moresby,4/queensland","10|n":"2/ust-nera,2/vladivostok,11/guam,11/saipan,11/chuuk,11/truk,11/yap","10.5|s|04/06:01->10/05:02":"4/lord_howe,4/lhi","0|s|02/23:03->04/06:04":"0/casablanca,0/el_aaiun","0|n|03/30:02->10/26:01":"3/azores","0|n|03/30:01->10/25:24":"1/scoresbysund","0|n":"0/abidjan,0/accra,0/bamako,0/banjul,0/bissau,0/conakry,0/dakar,0/freetown,0/lome,0/monrovia,0/nouakchott,0/ouagadougou,0/sao_tome,1/danmarkshavn,3/reykjavik,3/st_helena,13/gmt,13/utc,0/timbuktu,13/greenwich,13/uct,13/universal,13/zulu,gmt-0,gmt+0,gmt0,greenwich,iceland,uct,universal,utc,zulu,13/unknown,factory","-9|n|03/09:04->11/02:02":"1/adak,1/atka,us/aleutian","-9|n":"11/gambier","-9.5|n":"11/marquesas","-8|n|03/09:04->11/02:02":"1/anchorage,1/juneau,1/metlakatla,1/nome,1/sitka,1/yakutat,us/alaska","-8|n":"11/pitcairn","-7|n|03/09:04->11/02:02":"1/los_angeles,1/santa_isabel,1/tijuana,1/vancouver,1/ensenada,6/pacific,10/bajanorte,us/pacific-new,us/pacific","-7|n":"1/creston,1/dawson,1/dawson_creek,1/fort_nelson,1/hermosillo,1/mazatlan,1/phoenix,1/whitehorse,6/yukon,10/bajasur,us/arizona,mst","-6|s|04/05:22->09/06:24":"11/easter,7/easterisland","-6|n|04/07:02->10/27:02":"1/merida","-6|n|03/09:04->11/02:02":"1/boise,1/cambridge_bay,1/denver,1/edmonton,1/inuvik,1/north_dakota,1/ojinaga,1/ciudad_juarez,1/yellowknife,1/shiprock,6/mountain,navajo,us/mountain","-6|n":"1/bahia_banderas,1/belize,1/chihuahua,1/costa_rica,1/el_salvador,1/guatemala,1/managua,1/mexico_city,1/monterrey,1/regina,1/swift_current,1/tegucigalpa,11/galapagos,6/east-saskatchewan,6/saskatchewan,10/general","-5|s":"1/lima,1/rio_branco,1/porto_acre,5/acre","-5|n|03/09:04->11/02:02":"1/chicago,1/matamoros,1/menominee,1/rainy_river,1/rankin_inlet,1/resolute,1/winnipeg,1/indiana/knox,1/indiana/tell_city,1/north_dakota/beulah,1/north_dakota/center,1/north_dakota/new_salem,1/knox_in,6/central,us/central,us/indiana-starke","-5|n":"1/bogota,1/cancun,1/cayman,1/coral_harbour,1/eirunepe,1/guayaquil,1/jamaica,1/panama,1/atikokan,jamaica,est","-4|s|04/05:24->09/07:02":"1/santiago,7/continental","-4|s|03/22:24->10/05:02":"1/asuncion","-4|s":"1/campo_grande,1/cuiaba,1/la_paz,1/manaus,5/west","-4|n|03/09:04->11/02:02":"1/detroit,1/grand_turk,1/indiana,1/indianapolis,1/iqaluit,1/kentucky,1/louisville,1/montreal,1/nassau,1/new_york,1/nipigon,1/pangnirtung,1/port-au-prince,1/thunder_bay,1/toronto,1/indiana/marengo,1/indiana/petersburg,1/indiana/vevay,1/indiana/vincennes,1/indiana/winamac,1/kentucky/monticello,1/fort_wayne,1/indiana/indianapolis,1/kentucky/louisville,6/eastern,us/east-indiana,us/eastern,us/michigan","-4|n|03/09:02->11/02:01":"1/havana,cuba","-4|n":"1/anguilla,1/antigua,1/aruba,1/barbados,1/blanc-sablon,1/boa_vista,1/caracas,1/curacao,1/dominica,1/grenada,1/guadeloupe,1/guyana,1/kralendijk,1/lower_princes,1/marigot,1/martinique,1/montserrat,1/port_of_spain,1/porto_velho,1/puerto_rico,1/santo_domingo,1/st_barthelemy,1/st_kitts,1/st_lucia,1/st_thomas,1/st_vincent,1/tortola,1/virgin","-3|s":"1/argentina,1/buenos_aires,1/catamarca,1/cordoba,1/fortaleza,1/jujuy,1/mendoza,1/montevideo,1/punta_arenas,1/sao_paulo,12/palmer,12/rothera,3/stanley,1/argentina/la_rioja,1/argentina/rio_gallegos,1/argentina/salta,1/argentina/san_juan,1/argentina/san_luis,1/argentina/tucuman,1/argentina/ushuaia,1/argentina/comodrivadavia,1/argentina/buenos_aires,1/argentina/catamarca,1/argentina/cordoba,1/argentina/jujuy,1/argentina/mendoza,1/argentina/rosario,1/rosario,5/east","-3|n|03/09:04->11/02:02":"1/glace_bay,1/goose_bay,1/halifax,1/moncton,1/thule,3/bermuda,6/atlantic","-3|n":"1/araguaina,1/bahia,1/belem,1/cayenne,1/maceio,1/paramaribo,1/recife,1/santarem","-2|n|03/09:04->11/02:02":"1/miquelon","-2|n":"1/noronha,3/south_georgia,5/denoronha","-2.5|n|03/09:04->11/02:02":"1/st_johns,6/newfoundland","-1|n|03/30:01->10/25:24":"1/nuuk,1/godthab","-1|n":"3/cape_verde","-11|n":"11/midway,11/niue,11/pago_pago,11/samoa,us/samoa","-10|n":"11/honolulu,11/johnston,11/rarotonga,11/tahiti,us/hawaii,hst"},w$=["africa","america","asia","atlantic","australia","brazil","canada","chile","europe","indian","mexico","pacific","antarctica","etc"];let Vo={};Object.keys(bg).forEach(e=>{let t=e.split("|"),r={offset:Number(t[0]),hem:t[1]};t[2]&&(r.dst=t[2]),bg[e].split(",").forEach(a=>{a=a.replace(/(^[0-9]+)\//,(i,o)=>(o=Number(o),w$[o]+"/")),Vo[a]=r})});Vo.utc={offset:0,hem:"n"};for(let e=-14;e<=14;e+=.5){let t=e;t>0&&(t="+"+t);let r="etc/gmt"+t;Vo[r]={offset:e*-1,hem:"n"},r="utc/gmt"+t,Vo[r]={offset:e*-1,hem:"n"}}const x$="utc",D$=()=>{if(typeof Intl>"u"||typeof Intl.DateTimeFormat>"u")return null;let e=Intl.DateTimeFormat();if(typeof e>"u"||typeof e.resolvedOptions>"u")return null;let t=e.resolvedOptions().timeZone;return t?t.toLowerCase():null},N$=()=>{let e=D$();return e===null?x$:e},A$=/(-?[0-9]+)h(rs)?/i,C$=/(-?[0-9]+)/,E$=/utc([\-+]?[0-9]+)/i,S$=/gmt([\-+]?[0-9]+)/i,ju=function(e){return e=Number(e),e>=-13&&e<=13?(e=e*-1,e=(e>0?"+":"")+e,"etc/gmt"+e):null},M$=function(e){let t=e.match(A$);if(t!==null||(t=e.match(E$),t!==null))return ju(t[1]);if(t=e.match(S$),t!==null){let r=Number(t[1])*-1;return ju(r)}return t=e.match(C$),t!==null?ju(t[1]):null};let qu=N$();const wg=Object.keys(Vo).reduce((e,t)=>{let r=t.split("/")[1]||"";return r=r.replace(/_/g," "),e[r]=t,e},{}),T$=e=>(e=e.replace(/ time/g,""),e=e.replace(/ (standard|daylight|summer)/g,""),e=e.replace(/\b(east|west|north|south)ern/g,"$1"),e=e.replace(/\b(africa|america|australia)n/g,"$1"),e=e.replace(/\beuropean/g,"europe"),e=e.replace(/islands/g,"island"),e),Rl=(e,t)=>{if(!e)return t.hasOwnProperty(qu)||(console.warn(`Unrecognized IANA id '${qu}'. Setting fallback tz to UTC.`),qu="utc"),qu;typeof e!="string"&&console.error("Timezone must be a string - recieved: '",e,`'
14
+ `);let r=e.trim();if(r=r.toLowerCase(),t.hasOwnProperty(r)===!0||(r=T$(r),t.hasOwnProperty(r)===!0))return r;if(wg.hasOwnProperty(r)===!0)return wg[r];if(/[0-9]/.test(r)===!0){let n=M$(r);if(n)return n}throw new Error("Spacetime: Cannot find timezone named: '"+e+"'. Please enter an IANA timezone id.")};function ru(e){return e%4===0&&e%100!==0||e%400===0}function Yw(e){return Object.prototype.toString.call(e)==="[object Date]"&&!isNaN(e.valueOf())}function F$(e){return Object.prototype.toString.call(e)==="[object Array]"}function ti(e){return Object.prototype.toString.call(e)==="[object Object]"}function P$(e){return Object.prototype.toString.call(e)==="[object Boolean]"}function Ye(e,t=2){let r="0";return e=e+"",e.length>=t?e:new Array(t-e.length+1).join(r)+e}function k$(e){return e?e[0].toUpperCase()+e.substr(1):""}function Da(e){let t=e%10,r=e%100;return t===1&&r!==11?e+"st":t===2&&r!==12?e+"nd":t===3&&r!==13?e+"rd":e+"th"}function qo(e){return e=String(e),e=e.replace(/([0-9])(st|nd|rd|th)$/i,"$1"),parseInt(e,10)}function no(e=""){return e=e.toLowerCase().trim(),e=e.replace(/ies$/,"y"),e=e.replace(/s$/,""),e=e.replace(/-/g,""),e==="day"||e==="days"?"date":e==="min"||e==="mins"?"minute":e}function ws(e){return typeof e=="number"?e:Yw(e)?e.getTime():e.epoch||e.epoch===0?e.epoch:null}function ji(e,t){return ti(e)===!1?t.clone().set(e):e}function Ms(e,t=""){const r=e>0?"+":"-",n=Math.abs(e),a=Ye(parseInt(""+n,10)),i=Ye(n%1*60);return`${r}${a}${t}${i}`}const bm={year:new Date().getFullYear(),month:0,date:1},O$=(e,t,r)=>{if(t.length===0)return e;let n=["year","month","date","hour","minute","second","millisecond"];for(let a=0;a<n.length;a++){let i=t[a]||r[n[a]]||bm[n[a]]||0;e=e[n[a]](i)}return e},$$=(e,t,r)=>{if(Object.keys(t).length===0)return e;t=Object.assign({},bm,r,t);let n=Object.keys(t);for(let a=0;a<n.length;a++){let i=n[a];if(e[i]===void 0||typeof e[i]!="function"||t[i]===null||t[i]===void 0||t[i]==="")continue;let o=t[i]||r[i]||bm[i]||0;e=e[i](o)}return e},B$=function(e,t){return t>0&&t<25e8&&e.silent===!1&&(console.warn(" - Warning: You are setting the date to January 1970."),console.warn(" - did input seconds instead of milliseconds?")),e.epoch=t,e},_$={parseArray:O$,parseObject:$$,parseNumber:B$},Oi=function(e){return e.epoch=Date.now(),Object.keys(e._today||{}).forEach(t=>{typeof e[t]=="function"&&(e=e[t](e._today[t]))}),e},Ll={now:e=>Oi(e),today:e=>Oi(e),tonight:e=>(e=Oi(e),e=e.hour(18),e),tomorrow:e=>(e=Oi(e),e=e.add(1,"day"),e=e.startOf("day"),e),yesterday:e=>(e=Oi(e),e=e.subtract(1,"day"),e=e.startOf("day"),e),christmas:e=>{let t=Oi(e).year();return e=e.set([t,11,25,18,0,0]),e},"new years":e=>{let t=Oi(e).year();return e=e.set([t,11,31,18,0,0]),e}};Ll["new years eve"]=Ll["new years"];const I$=function(e){return e=e.replace(/\b(mon|tues?|wed|wednes|thur?s?|fri|sat|satur|sun)(day)?\b/i,""),e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=e.replace(/,/g,""),e=e.replace(/ +/g," ").trim(),e};let Ct={millisecond:1};Ct.second=1e3;Ct.minute=6e4;Ct.hour=36e5;Ct.day=864e5;Ct.date=Ct.day;Ct.month=864e5*29.5;Ct.week=6048e5;Ct.year=3154e7;Object.keys(Ct).forEach(e=>{Ct[e+"s"]=Ct[e]});const Ru=(e,t,r,n,a)=>{let i=e.d[r]();if(i===t)return;let o=a===null?null:e.d[a](),s=e.epoch,u=t-i;e.epoch+=Ct[n]*u,n==="day"&&Math.abs(u)>28&&t<28&&(e.epoch+=Ct.hour),a!==null&&o!==e.d[a]()&&(e.epoch=s);const l=Ct[n]/2;for(;e.d[r]()<t;)e.epoch+=l;for(;e.d[r]()>t;)e.epoch-=l;a!==null&&o!==e.d[a]()&&(e.epoch=s)},pf={year:{valid:e=>e>-4e3&&e<4e3,walkTo:(e,t)=>Ru(e,t,"getFullYear","year",null)},month:{valid:e=>e>=0&&e<=11,walkTo:(e,t)=>{let r=e.d,n=r.getMonth(),a=e.epoch,i=r.getFullYear();if(n===t)return;let o=t-n;for(e.epoch+=Ct.day*(o*28),i!==e.d.getFullYear()&&(e.epoch=a);e.d.getMonth()<t;)e.epoch+=Ct.day;for(;e.d.getMonth()>t;)e.epoch-=Ct.day}},date:{valid:e=>e>0&&e<=31,walkTo:(e,t)=>Ru(e,t,"getDate","day","getMonth")},hour:{valid:e=>e>=0&&e<24,walkTo:(e,t)=>Ru(e,t,"getHours","hour","getDate")},minute:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>Ru(e,t,"getMinutes","minute","getHours")},second:{valid:e=>e>=0&&e<60,walkTo:(e,t)=>{e.epoch=e.seconds(t).epoch}},millisecond:{valid:e=>e>=0&&e<1e3,walkTo:(e,t)=>{e.epoch=e.milliseconds(t).epoch}}},xt=(e,t)=>{let r=Object.keys(pf),n=e.clone();for(let a=0;a<r.length;a++){let i=r[a],o=t[i];if(o===void 0&&(o=n[i]()),typeof o=="string"&&(o=parseInt(o,10)),!pf[i].valid(o)){e.epoch=null,e.silent===!1&&console.warn("invalid "+i+": "+o);return}pf[i].walkTo(e,o)}},Zi=[31,28,31,30,31,30,31,31,30,31,30,31];let Rs=["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"],Ls=["january","february","march","april","may","june","july","august","september","october","november","december"];function z$(){const e={sep:8};for(let t=0;t<Rs.length;t++)e[Rs[t]]=t;for(let t=0;t<Ls.length;t++)e[Ls[t]]=t;return e}function xs(){return Rs}function j$(){return Ls}function Zw(){return z$()}function q$(e){Rs=e.short||Rs,Ls=e.long||Ls}const Qw=(e,t)=>{if(!t)return e;t=t.trim().toLowerCase();let r=0;if(/^[+-]?[0-9]{2}:[0-9]{2}$/.test(t)&&(/:00/.test(t)===!0&&(t=t.replace(/:00/,"")),/:30/.test(t)===!0&&(t=t.replace(/:30/,".5"))),/^[+-]?[0-9]{4}$/.test(t)&&(t=t.replace(/30$/,".5")),r=parseFloat(t),Math.abs(r)>100&&(r=r/100),r===0||t==="Z"||t==="z")return e.tz="etc/gmt",e;r*=-1,r>=0&&(r="+"+r);let n="etc/gmt"+r;return e.timezones[n]&&(e.tz=n),e},R$=function(e=""){return e=String(e),e.length>3?e=e.substring(0,3):e.length===1?e=e+"00":e.length===2&&(e=e+"0"),Number(e)||0},Vr=(e,t="")=>{t=t.replace(/^\s+/,"").toLowerCase();let r=t.match(/([0-9]{1,2}):([0-9]{1,2}):?([0-9]{1,2})?[:.]?([0-9]{1,4})?/);if(r!==null){let[,n,a,i,o]=r;if(n=Number(n),n<0||n>24||(a=Number(a),r[2].length<2||a<0||a>59))return e.startOf("day");e=e.hour(n),e=e.minute(a),e=e.seconds(i||0),e=e.millisecond(R$(o));let s=t.match(/[0-9] ?(am|pm)\b/);return s!==null&&s[1]&&(e=e.ampm(s[1])),e}if(r=t.match(/([0-9]+) ?(am|pm)/),r!==null&&r[1]){let n=Number(r[1]);return n>12||n<1?e.startOf("day"):(e=e.hour(r[1]||0),e=e.ampm(r[2]),e=e.startOf("hour"),e)}return e=e.startOf("day"),e};let xg=Zw();const Ur=e=>{if(Zi.hasOwnProperty(e.month)!==!0)return!1;if(e.month===1)return ru(e.year)&&e.date<=29?!0:e.date<=28;let t=Zi[e.month]||0;return e.date<=t},Oa=(e="",t)=>{if(e=e.trim(),/^'[0-9][0-9]$/.test(e)===!0){let n=Number(e.replace(/'/,""));return n>50?1900+n:2e3+n}let r=parseInt(e,10);return!r&&t&&(r=t.year),r=r||new Date().getFullYear(),r},ui=function(e){return e=e.toLowerCase().trim(),e==="sept"?xg.sep:xg[e]},L$=[{reg:/^(-?0{0,2}[0-9]{3,4})-([0-9]{1,2})-([0-9]{1,2})[T| ]([0-9.:]+)(Z|[0-9-+:]+)?$/i,parse:(e,t)=>{let r={year:t[1],month:parseInt(t[2],10)-1,date:t[3]};return Ur(r)===!1?(e.epoch=null,e):(Qw(e,t[5]),xt(e,r),e=Vr(e,t[4]),e)}},{reg:/^([0-9]{4})[\-/. ]([0-9]{1,2})[\-/. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let r={year:t[1],month:parseInt(t[2],10)-1,date:parseInt(t[3],10)};return r.month>=12&&(r.date=parseInt(t[2],10),r.month=parseInt(t[3],10)-1),Ur(r)===!1?(e.epoch=null,e):(xt(e,r),e=Vr(e,t[4]),e)}},{reg:/^([0-9]{4})[\-/. ]([a-z]+)[\-/. ]([0-9]{1,2})( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let r={year:Oa(t[1],e._today),month:ui(t[2]),date:qo(t[3]||"")};return Ur(r)===!1?(e.epoch=null,e):(xt(e,r),e=Vr(e,t[4]),e)}}],H$=[{reg:/^([0-9]{1,2})[-/.]([0-9]{1,2})[\-/.]?([0-9]{4})?( [0-9]{1,2}:[0-9]{2}:?[0-9]{0,2} ?(am|pm|gmt))?$/i,parse:(e,t)=>{let r=parseInt(t[1],10)-1,n=parseInt(t[2],10);(e.british||r>=12)&&(n=parseInt(t[1],10),r=parseInt(t[2],10)-1);let a={date:n,month:r,year:Oa(t[3],e._today)||new Date().getFullYear()};return Ur(a)===!1?(e.epoch=null,e):(xt(e,a),e=Vr(e,t[4]),e)}},{reg:/^([a-z]+)[\-/. ]([0-9]{1,2})[\-/. ]?([0-9]{4}|'[0-9]{2})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let r={year:Oa(t[3],e._today),month:ui(t[1]),date:qo(t[2]||"")};return Ur(r)===!1?(e.epoch=null,e):(xt(e,r),e=Vr(e,t[4]),e)}},{reg:/^([a-z]+) ([0-9]{1,2})( [0-9]{4})?( ([0-9:]+( ?am| ?pm| ?gmt)?))?$/i,parse:(e,t)=>{let r={year:Oa(t[3],e._today),month:ui(t[1]),date:qo(t[2]||"")};return Ur(r)===!1?(e.epoch=null,e):(xt(e,r),e=Vr(e,t[4]),e)}},{reg:/^([a-z]+) ([0-9]{1,2}) ([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2})( \+[0-9]{4})?( [0-9]{4})?$/i,parse:(e,t)=>{let[,r,n,a,i,o]=t,s={year:Oa(o,e._today),month:ui(r),date:qo(n||"")};return Ur(s)===!1?(e.epoch=null,e):(xt(e,s),e=Qw(e,i),e=Vr(e,a),e)}}],G$=[{reg:/^([0-9]{1,2})[-/]([a-z]+)[\-/]?([0-9]{4})?$/i,parse:(e,t)=>{let r={year:Oa(t[3],e._today),month:ui(t[2]),date:qo(t[1]||"")};return Ur(r)===!1?(e.epoch=null,e):(xt(e,r),e=Vr(e,t[4]),e)}},{reg:/^([0-9]{1,2})( [a-z]+)( [0-9]{4}| '[0-9]{2})? ?([0-9]{1,2}:[0-9]{2}:?[0-9]{0,2} ?(am|pm|gmt))?$/i,parse:(e,t)=>{let r={year:Oa(t[3],e._today),month:ui(t[2]),date:qo(t[1])};return!r.month||Ur(r)===!1?(e.epoch=null,e):(xt(e,r),e=Vr(e,t[4]),e)}},{reg:/^([0-9]{1,2})[. \-/]([a-z]+)[. \-/]([0-9]{4})?( [0-9]{1,2}(:[0-9]{0,2})?(:[0-9]{0,3})? ?(am|pm)?)?$/i,parse:(e,t)=>{let r={date:Number(t[1]),month:ui(t[2]),year:Number(t[3])};return Ur(r)===!1?(e.epoch=null,e):(xt(e,r),e=e.startOf("day"),e=Vr(e,t[4]),e)}}],V$=[{reg:/^([0-9]{4})[\-/]([0-9]{2})$/,parse:(e,t)=>{let r={year:t[1],month:parseInt(t[2],10)-1,date:1};return Ur(r)===!1?(e.epoch=null,e):(xt(e,r),e=Vr(e,t[4]),e)}},{reg:/^([a-z]+) ([0-9]{4})$/i,parse:(e,t)=>{let r={year:Oa(t[2],e._today),month:ui(t[1]),date:e._today.date||1};return Ur(r)===!1?(e.epoch=null,e):(xt(e,r),e=Vr(e,t[4]),e)}},{reg:/^(q[0-9])( of)?( [0-9]{4})?/i,parse:(e,t)=>{let r=t[1]||"";e=e.quarter(r);let n=t[3]||"";return n&&(n=n.trim(),e=e.year(n)),e}},{reg:/^(spring|summer|winter|fall|autumn)( of)?( [0-9]{4})?/i,parse:(e,t)=>{let r=t[1]||"";e=e.season(r);let n=t[3]||"";return n&&(n=n.trim(),e=e.year(n)),e}},{reg:/^[0-9,]+ ?b\.?c\.?$/i,parse:(e,t)=>{let r=t[0]||"";r=r.replace(/^([0-9,]+) ?b\.?c\.?$/i,"-$1");let n=new Date,a={year:parseInt(r.trim(),10),month:n.getMonth(),date:n.getDate()};return Ur(a)===!1?(e.epoch=null,e):(xt(e,a),e=Vr(e),e)}},{reg:/^[0-9,]+ ?(a\.?d\.?|c\.?e\.?)$/i,parse:(e,t)=>{let r=t[0]||"";r=r.replace(/,/g,"");let n=new Date,a={year:parseInt(r.trim(),10),month:n.getMonth(),date:n.getDate()};return Ur(a)===!1?(e.epoch=null,e):(xt(e,a),e=Vr(e),e)}},{reg:/^[0-9]{4}( ?a\.?d\.?)?$/i,parse:(e,t)=>{let r=e._today;r.month&&!r.date&&(r.date=1);let n=new Date,a={year:Oa(t[0],r),month:r.month||n.getMonth(),date:r.date||n.getDate()};return Ur(a)===!1?(e.epoch=null,e):(xt(e,a),e=Vr(e),e)}}],gf=[].concat(L$,H$,G$,V$),U$=function(e,t,r){for(let n=0;n<gf.length;n++){let a=t.match(gf[n].reg);if(a){let i=gf[n].parse(e,a,r);if(i!==null&&i.isValid())return i}}return e.silent===!1&&console.warn("Warning: couldn't parse date-string: '"+t+"'"),e.epoch=null,e},{parseArray:W$,parseObject:Dg,parseNumber:J$}=_$,Ng={year:new Date().getFullYear(),month:0,date:1},Xw=(e,t)=>{let r=e._today||Ng;if(typeof t=="number")return J$(e,t);if(e.epoch=Date.now(),e._today&&ti(e._today)&&Object.keys(e._today).length>0){let n=Dg(e,r,Ng);n.isValid()&&(e.epoch=n.epoch)}return t==null||t===""?e:Yw(t)===!0?(e.epoch=t.getTime(),e):F$(t)===!0?(e=W$(e,t,r),e):ti(t)===!0?t.epoch?(e.epoch=t.epoch,e.tz=t.tz,e):(e=Dg(e,t,r),e):typeof t!="string"?e:(t=I$(t),Ll.hasOwnProperty(t)===!0?(e=Ll[t](e),e):U$(e,t))};let wm=["sun","mon","tue","wed","thu","fri","sat"],xm=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"];function Hs(){return wm}function Hl(){return xm}function K$(e){wm=e.short||wm,xm=e.long||xm}const Ag={mo:1,tu:2,we:3,th:4,fr:5,sa:6,su:7,tues:2,weds:3,wedn:3,thur:4,thurs:4};let ex=!0;function Y$(){return ex}function Z$(e){ex=e}const Cg=e=>{let t=e.timezone().current.offset;return t?Ms(t,":"):"Z"},Ta=e=>Y$()?k$(e):e,Q$=e=>e>=0?Ye(e,4):(e=Math.abs(e),"-"+Ye(e,4)),Bo={day:e=>Ta(e.dayName()),"day-short":e=>Ta(Hs()[e.day()]),"day-number":e=>e.day(),"day-ordinal":e=>Da(e.day()),"day-pad":e=>Ye(e.day()),date:e=>e.date(),"date-ordinal":e=>Da(e.date()),"date-pad":e=>Ye(e.date()),month:e=>Ta(e.monthName()),"month-short":e=>Ta(xs()[e.month()]),"month-number":e=>e.month(),"month-ordinal":e=>Da(e.month()),"month-pad":e=>Ye(e.month()),"iso-month":e=>Ye(e.month()+1),year:e=>{let t=e.year();return t>0?t:(t=Math.abs(t),t+" BC")},"year-short":e=>{let t=e.year();return t>0?`'${String(e.year()).substr(2,4)}`:(t=Math.abs(t),t+" BC")},"iso-year":e=>{let t=e.year(),r=t<0,n=Ye(Math.abs(t),4);return r&&(n=Ye(n,6),n="-"+n),n},time:e=>e.time(),"time-24":e=>`${e.hour24()}:${Ye(e.minute())}`,hour:e=>e.hour12(),"hour-pad":e=>Ye(e.hour12()),"hour-24":e=>e.hour24(),"hour-24-pad":e=>Ye(e.hour24()),minute:e=>e.minute(),"minute-pad":e=>Ye(e.minute()),second:e=>e.second(),"second-pad":e=>Ye(e.second()),millisecond:e=>e.millisecond(),"millisecond-pad":e=>Ye(e.millisecond(),3),ampm:e=>e.ampm(),AMPM:e=>e.ampm().toUpperCase(),quarter:e=>"Q"+e.quarter(),season:e=>e.season(),era:e=>e.era(),json:e=>e.json(),timezone:e=>e.timezone().name,offset:e=>Cg(e),numeric:e=>`${e.year()}/${Ye(e.month()+1)}/${Ye(e.date())}`,"numeric-us":e=>`${Ye(e.month()+1)}/${Ye(e.date())}/${e.year()}`,"numeric-uk":e=>`${Ye(e.date())}/${Ye(e.month()+1)}/${e.year()}`,"mm/dd":e=>`${Ye(e.month()+1)}/${Ye(e.date())}`,iso:e=>{let t=e.format("iso-year"),r=Ye(e.month()+1),n=Ye(e.date()),a=Ye(e.h24()),i=Ye(e.minute()),o=Ye(e.second()),s=Ye(e.millisecond(),3),u=Cg(e);return`${t}-${r}-${n}T${a}:${i}:${o}.${s}${u}`},"iso-short":e=>{let t=Ye(e.month()+1),r=Ye(e.date());return`${Q$(e.year())}-${t}-${r}`},"iso-utc":e=>new Date(e.epoch).toISOString(),nice:e=>`${xs()[e.month()]} ${Da(e.date())}, ${e.time()}`,"nice-24":e=>`${xs()[e.month()]} ${Da(e.date())}, ${e.hour24()}:${Ye(e.minute())}`,"nice-year":e=>`${xs()[e.month()]} ${Da(e.date())}, ${e.year()}`,"nice-day":e=>`${Hs()[e.day()]} ${Ta(xs()[e.month()])} ${Da(e.date())}`,"nice-full":e=>`${e.dayName()} ${Ta(e.monthName())} ${Da(e.date())}, ${e.time()}`,"nice-full-24":e=>`${e.dayName()} ${Ta(e.monthName())} ${Da(e.date())}, ${e.hour24()}:${Ye(e.minute())}`},Eg={"day-name":"day","month-name":"month","iso 8601":"iso","time-h24":"time-24","time-12":"time","time-h12":"time",tz:"timezone","day-num":"day-number","month-num":"month-number","month-iso":"iso-month","year-iso":"iso-year","nice-short":"nice","nice-short-24":"nice-24",mdy:"numeric-us",dmy:"numeric-uk",ymd:"numeric","yyyy/mm/dd":"numeric","mm/dd/yyyy":"numeric-us","dd/mm/yyyy":"numeric-us","little-endian":"numeric-uk","big-endian":"numeric","day-nice":"nice-day"};Object.keys(Eg).forEach(e=>Bo[e]=Bo[Eg[e]]);const vf=(e,t="")=>{if(e.isValid()!==!0)return"";if(Bo.hasOwnProperty(t)){let r=Bo[t](e)||"";return t!=="json"&&(r=String(r),t.toLowerCase()!=="ampm"&&(r=Ta(r))),r}if(t.indexOf("{")!==-1){let r=/\{(.+?)\}/g;return t=t.replace(r,(n,a)=>{if(a=a.trim(),a!=="AMPM"&&(a=a.toLowerCase()),Bo.hasOwnProperty(a)){let i=String(Bo[a](e));return a.toLowerCase()!=="ampm"?Ta(i):i}return""}),t}return e.format("iso-short")},Gl={G:e=>e.era(),GG:e=>e.era(),GGG:e=>e.era(),GGGG:e=>e.era()==="AD"?"Anno Domini":"Before Christ",y:e=>e.year(),yy:e=>Ye(Number(String(e.year()).substr(2,4))),yyy:e=>e.year(),yyyy:e=>e.year(),yyyyy:e=>"0"+e.year(),Q:e=>e.quarter(),QQ:e=>e.quarter(),QQQ:e=>e.quarter(),QQQQ:e=>e.quarter(),M:e=>e.month()+1,MM:e=>Ye(e.month()+1),MMM:e=>e.format("month-short"),MMMM:e=>e.format("month"),w:e=>e.week(),ww:e=>Ye(e.week()),d:e=>e.date(),dd:e=>Ye(e.date()),D:e=>e.dayOfYear(),DD:e=>Ye(e.dayOfYear()),DDD:e=>Ye(e.dayOfYear(),3),E:e=>e.format("day-short"),EE:e=>e.format("day-short"),EEE:e=>e.format("day-short"),EEEE:e=>e.format("day"),EEEEE:e=>e.format("day")[0],e:e=>e.day(),ee:e=>e.day(),eee:e=>e.format("day-short"),eeee:e=>e.format("day"),eeeee:e=>e.format("day")[0],a:e=>e.ampm().toUpperCase(),aa:e=>e.ampm().toUpperCase(),aaa:e=>e.ampm().toUpperCase(),aaaa:e=>e.ampm().toUpperCase(),h:e=>e.h12(),hh:e=>Ye(e.h12()),H:e=>e.hour(),HH:e=>Ye(e.hour()),m:e=>e.minute(),mm:e=>Ye(e.minute()),s:e=>e.second(),ss:e=>Ye(e.second()),SSS:e=>Ye(e.millisecond(),3),A:e=>e.epoch-e.startOf("day").epoch,z:e=>e.timezone().name,zz:e=>e.timezone().name,zzz:e=>e.timezone().name,zzzz:e=>e.timezone().name,Z:e=>Ms(e.timezone().current.offset),ZZ:e=>Ms(e.timezone().current.offset),ZZZ:e=>Ms(e.timezone().current.offset),ZZZZ:e=>Ms(e.timezone().current.offset,":")},Ga=(e,t,r)=>{let n=e,a=t;for(let i=0;i<r;i+=1)Gl[n]=Gl[a],n+=e,a+=t};Ga("q","Q",4);Ga("L","M",4);Ga("Y","y",4);Ga("c","e",4);Ga("k","H",2);Ga("K","h",2);Ga("S","s",2);Ga("v","z",4);Ga("V","Z",4);const X$=function(e){for(let t=0;t<e.length;t+=1)if(e[t]==="'")for(let r=t+1;r<e.length;r+=1){if(e[r]&&(e[t]+=e[r]),e[r]==="'"){e[r]=null;break}e[r]=null}return e.filter(t=>t)},eB=function(e){for(let t=0;t<e.length;t+=1){let r=e[t];for(let n=t+1;n<e.length&&e[n]===r;n+=1)e[t]+=e[n],e[n]=null}return e=e.filter(t=>t),e=e.map(t=>(t==="''"&&(t="'"),t)),e},tB=(e,t)=>{let r=t.split("");return r=X$(r),r=eB(r),r.reduce((n,a)=>(Gl[a]!==void 0?n+=Gl[a](e)||"":(/^'.+'$/.test(a)&&(a=a.replace(/'/g,"")),n+=a),n),"")},rB=["year","season","quarter","month","week","day","quarterHour","hour","minute"],Sg=function(e,t){let r=e.clone().startOf(t),a=e.clone().endOf(t).epoch-r.epoch,i=(e.epoch-r.epoch)/a;return parseFloat(i.toFixed(2))},nB=(e,t)=>{if(t)return t=no(t),Sg(e,t);let r={};return rB.forEach(n=>{r[n]=Sg(e,n)}),r},aB=(e,t)=>{let r=e.progress();return t=no(t),t==="quarterhour"&&(t="quarterHour"),r[t]!==void 0?(r[t]>.5&&(e=e.add(1,t)),e=e.startOf(t)):e.silent===!1&&console.warn("no known unit '"+t+"'"),e},Mg=(e,t,r)=>{let n=0;for(e=e.clone();e.isBefore(t);)e=e.add(1,r),n+=1;return e.isAfter(t,r)&&(n-=1),n},yf=(e,t,r)=>e.isBefore(t)?Mg(e,t,r):Mg(t,e,r)*-1,iB=(e,t)=>{let r=t.year()-e.year();return e=e.year(t.year()),e.isAfter(t)&&(r-=1),r},oB=function(e,t){let r=t.epoch-e.epoch,n={milliseconds:r,seconds:parseInt(r/1e3,10)};n.minutes=parseInt(n.seconds/60,10),n.hours=parseInt(n.minutes/60,10);let a=e.clone();return n.years=iB(a,t),a=e.add(n.years,"year"),n.months=n.years*12,a=e.add(n.months,"month"),n.months+=yf(a,t,"month"),n.quarters=n.years*4,n.quarters+=parseInt(n.months%12/3,10),n.weeks=n.years*52,a=e.add(n.weeks,"week"),n.weeks+=yf(a,t,"week"),n.days=n.weeks*7,a=e.add(n.days,"day"),n.days+=yf(a,t,"day"),n},sB=function(e){return Object.keys(e).forEach(t=>{e[t]*=-1}),e},uB=function(e,t,r){t=ji(t,e);let n=!1;if(e.isAfter(t)){let i=e;e=t,t=i,n=!0}let a=oB(e,t);return n&&(a=sB(a)),r?(r=no(r),/s$/.test(r)!==!0&&(r+="s"),r==="dates"&&(r="days"),a[r]):a},Do=e=>Math.abs(e)||0,lB=function(e){let t="P";return t+=Do(e.years)+"Y",t+=Do(e.months)+"M",t+=Do(e.days)+"DT",t+=Do(e.hours)+"H",t+=Do(e.minutes)+"M",t+=Do(e.seconds)+"S",t};function cB(e,t){const r=e.isBefore(t),n=r?t:e;let a=r?e:t;a=a.clone();const i={years:0,months:0,days:0,hours:0,minutes:0,seconds:0};return Object.keys(i).forEach(o=>{if(a.isSame(n,o))return;let s=a.diff(n,o);a=a.add(s,o),i[o]=s}),r&&Object.keys(i).forEach(o=>{i[o]!==0&&(i[o]*=-1)}),i}let nn={second:"second",seconds:"seconds",minute:"minute",minutes:"minutes",hour:"hour",hours:"hours",day:"day",days:"days",month:"month",months:"months",year:"year",years:"years"};function Tg(e){return nn[e]||""}function fB(e={}){nn={second:e.second||nn.second,seconds:e.seconds||nn.seconds,minute:e.minute||nn.minute,minutes:e.minutes||nn.minutes,hour:e.hour||nn.hour,hours:e.hours||nn.hours,day:e.day||nn.day,days:e.days||nn.days,month:e.month||nn.month,months:e.months||nn.months,year:e.year||nn.year,years:e.years||nn.years}}let Dm="past",Nm="future",Am="present",Cm="now",Em="almost",Sm="over",Mm=e=>`${e} ago`,Tm=e=>`in ${e}`;function bf(e){return Mm(e)}function wf(e){return Tm(e)}function mB(){return Dm}function dB(){return Nm}function hB(){return Am}function xf(){return Cm}function pB(){return Em}function gB(){return Sm}function vB(e){Mm=e.pastDistance||Mm,Tm=e.futureDistance||Tm,Dm=e.past||Dm,Nm=e.future||Nm,Am=e.present||Am,Cm=e.now||Cm,Em=e.almost||Em,Sm=e.over||Sm}const Fg={months:{almost:10,over:4},days:{almost:25,over:10},hours:{almost:20,over:8},minutes:{almost:50,over:20},seconds:{almost:50,over:20}};function Pg(e,t){return e===1?e+" "+Tg(t.slice(0,-1)):e+" "+Tg(t)}const yB=function(e){let t=null,r=null,n=[],a=[];return Object.keys(e).forEach((i,o,s)=>{const u=Math.abs(e[i]);if(u===0)return;n.push(u+i[0]);const l=Pg(u,i);if(a.push(l),!t){if(t=l,r=l,o>4)return;const c=s[o+1],f=Math.abs(e[c]);f>Fg[c].almost?(t=Pg(u+1,i),r=pB()+" "+t):f>Fg[c].over&&(r=gB()+" "+l)}}),{qualified:r,rounded:t,abbreviated:n,englishValues:a}},bB=(e,t)=>{t=ji(t,e);const r=cB(e,t);if(Object.keys(r).every(f=>!r[f])===!0)return{diff:r,rounded:xf(),qualified:xf(),precise:xf(),abbreviated:[],iso:"P0Y0M0DT0H0M0S",direction:hB()};let a,i=dB(),{rounded:o,qualified:s,englishValues:u,abbreviated:l}=yB(r);a=u.splice(0,2).join(", "),e.isAfter(t)===!0?(o=bf(o),s=bf(s),a=bf(a),i=mB()):(o=wf(o),s=wf(s),a=wf(a));let c=lB(r);return{diff:r,rounded:o,qualified:s,precise:a,abbreviated:l,iso:c,direction:i}},wB=[["spring",2,1],["summer",5,1],["fall",8,1],["autumn",8,1],["winter",11,1]],xB=[["fall",2,1],["autumn",2,1],["winter",5,1],["spring",8,1],["summer",11,1]],Un={north:wB,south:xB},Gi=[null,[0,1],[3,1],[6,1],[9,1]],Ji={second:e=>(xt(e,{millisecond:0}),e),minute:e=>(xt(e,{second:0,millisecond:0}),e),quarterhour:e=>{let t=e.minutes();return t>=45?e=e.minutes(45):t>=30?e=e.minutes(30):t>=15?e=e.minutes(15):e=e.minutes(0),xt(e,{second:0,millisecond:0}),e},hour:e=>(xt(e,{minute:0,second:0,millisecond:0}),e),day:e=>(xt(e,{hour:0,minute:0,second:0,millisecond:0}),e),week:e=>{let t=e.clone();return e=e.day(e._weekStart),e.isAfter(t)&&(e=e.subtract(1,"week")),xt(e,{hour:0,minute:0,second:0,millisecond:0}),e},month:e=>(xt(e,{date:1,hour:0,minute:0,second:0,millisecond:0}),e),quarter:e=>{let t=e.quarter();return Gi[t]&&xt(e,{month:Gi[t][0],date:Gi[t][1],hour:0,minute:0,second:0,millisecond:0}),e},season:e=>{let t=e.season(),r="north";e.hemisphere()==="South"&&(r="south");for(let n=0;n<Un[r].length;n++)if(Un[r][n][0]===t){let a=e.year();return t==="winter"&&e.month()<3&&(a-=1),xt(e,{year:a,month:Un[r][n][1],date:Un[r][n][2],hour:0,minute:0,second:0,millisecond:0}),e}return e},year:e=>(xt(e,{month:0,date:1,hour:0,minute:0,second:0,millisecond:0}),e),decade:e=>{e=e.startOf("year");let t=e.year(),r=parseInt(t/10,10)*10;return e=e.year(r),e},century:e=>{e=e.startOf("year");let t=e.year(),r=parseInt(t/100,10)*100;return e=e.year(r),e}};Ji.date=Ji.day;const DB=(e,t)=>{let r=e.clone();return t=no(t),Ji[t]?Ji[t](r):t==="summer"||t==="winter"?(r=r.season(t),Ji.season(r)):r},NB=(e,t)=>{let r=e.clone();return t=no(t),Ji[t]&&(r=Ji[t](r),r=r.add(1,t),r=r.subtract(1,"millisecond")),r},AB=function(e){return!!(Hs().find(t=>t===e)||Hl().find(t=>t===e))},CB=function(e,t,r,n=1){if(!t||!r)return[];if(t=no(t),r=e.clone().set(r),e.isAfter(r)){let o=e;e=r,r=o}if(e.diff(r,t)<n)return[];let a=e.clone();AB(t)?(a=a.next(t),t="week"):a.startOf(t).isBefore(e)&&(a=a.next(t));let i=[];for(;a.isBefore(r);)i.push(a),a=a.add(n,t);return i},EB=e=>e?e.split("->"):[],SB=e=>(e=e[0].toUpperCase()+e.substr(1),e=e.replace(/[/_-]([a-z])/gi,t=>t.toUpperCase()),e=e.replace(/_(of|es)_/i,t=>t.toLowerCase()),e=e.replace(/\/gmt/i,"/GMT"),e=e.replace(/\/Dumontdurville$/i,"/DumontDUrville"),e=e.replace(/\/Mcmurdo$/i,"/McMurdo"),e=e.replace(/\/Port-au-prince$/i,"/Port-au-Prince"),e),Ds=e=>{let t=e.timezones,r=e.tz;if(t.hasOwnProperty(r)===!1&&(r=Rl(e.tz,t)),r===null)return e.silent===!1&&console.warn("Warn: could not find given or local timezone - '"+e.tz+"'"),{current:{epochShift:0}};let n=t[r],a={name:SB(r),hasDst:!!n.dst,default_offset:n.offset,hemisphere:n.hem==="s"?"South":"North",current:{}};if(a.hasDst){let s=EB(n.dst);a.change={start:s[0],back:s[1]}}let i=n.offset,o=i;return a.hasDst===!0&&(a.hemisphere==="North"?o=i-1:o=n.offset+1),a.hasDst===!1?(a.current.offset=i,a.current.isDST=!1):Kw(e.epoch,a.change.start,a.change.back,i,o)===!0?(a.current.offset=i,a.current.isDST=a.hemisphere==="North"):(a.current.offset=o,a.current.isDST=a.hemisphere==="South"),a},MB=["century","decade","year","month","date","day","hour","minute","second","millisecond"],fi={set:function(e,t){let r=this.clone();return r=Xw(r,e),t&&(this.tz=Rl(t)),r},timezone:function(){return Ds(this)},isDST:function(){return Ds(this).current.isDST},hasDST:function(){return Ds(this).hasDst},offset:function(){return Ds(this).current.offset*60},hemisphere:function(){return Ds(this).hemisphere},format:function(e){return vf(this,e)},unixFmt:function(e){return tB(this,e)},startOf:function(e){return DB(this,e)},endOf:function(e){return NB(this,e)},leapYear:function(){let e=this.year();return ru(e)},progress:function(e){return nB(this,e)},nearest:function(e){return aB(this,e)},diff:function(e,t){return uB(this,e,t)},since:function(e){return e||(e=this.clone().set()),bB(this,e)},next:function(e){return this.add(1,e).startOf(e)},last:function(e){return this.subtract(1,e).startOf(e)},isValid:function(){return!this.epoch&&this.epoch!==0?!1:!isNaN(this.d.getTime())},goto:function(e){let t=this.clone();return t.tz=Rl(e,t.timezones),t},every:function(e,t,r){if(typeof e=="object"&&typeof t=="string"){let n=t;t=e,e=n}return CB(this,e,t,r)},isAwake:function(){let e=this.hour();return!(e<8||e>22)},isAsleep:function(){return!this.isAwake()},daysInMonth:function(){switch(this.month()){case 0:return 31;case 1:return this.leapYear()?29:28;case 2:return 31;case 3:return 30;case 4:return 31;case 5:return 30;case 6:return 31;case 7:return 31;case 8:return 30;case 9:return 31;case 10:return 30;case 11:return 31;default:throw new Error("Invalid Month state.")}},log:function(){return console.log(""),console.log(vf(this,"nice-short")),this},logYear:function(){return console.log(""),console.log(vf(this,"full-short")),this},json:function(){return MB.reduce((e,t)=>(e[t]=this[t](),e),{})},debug:function(){let e=this.timezone(),t=this.format("MM")+" "+this.format("date-ordinal")+" "+this.year();return t+=`
15
+ - `+this.format("time"),console.log(`
16
+
17
+ `,t+`
18
+ - `+e.name+" ("+e.current.offset+")"),this},from:function(e){return e=this.clone().set(e),e.since(this)},fromNow:function(){return this.clone().set(Date.now()).since(this)},weekStart:function(e){if(typeof e=="number")return this._weekStart=e,this;if(typeof e=="string"){e=e.toLowerCase().trim();let t=Hs().indexOf(e);t===-1&&(t=Hl().indexOf(e)),t===-1&&(t=1),this._weekStart=t}else console.warn("Spacetime Error: Cannot understand .weekStart() input:",e);return this}};fi.inDST=fi.isDST;fi.round=fi.nearest;fi.each=fi.every;const Va=e=>(typeof e=="string"&&(e=parseInt(e,10)),e),Df=["year","month","date","hour","minute","second","millisecond"],xd=(e,t,r)=>{let n=Df.indexOf(r),a=Df.slice(n,Df.length);for(let i=0;i<a.length;i++){let o=t[a[i]]();e[a[i]](o)}return e},vi=function(e,t,r,n){return r===!0&&e.isBefore(t)?e=e.add(1,n):r===!1&&e.isAfter(t)&&(e=e.minus(1,n)),e},TB=function(e,t){t=Va(t);let n=e.millisecond()-t;return e.epoch-n},FB=function(e,t,r){t=Va(t);let n=e.clone(),i=(e.second()-t)*Ct.second;return e.epoch=e.epoch-i,e=vi(e,n,r,"minute"),e.epoch},kg=function(e,t,r){t=Va(t);let n=e.clone(),i=(e.minute()-t)*Ct.minute;return e.epoch-=i,xd(e,n,"second"),e=vi(e,n,r,"hour"),e.epoch},Nf=function(e,t,r){t=Va(t),t>=24?t=24:t<0&&(t=0);let n=e.clone(),a=e.hour()-t,i=a*Ct.hour;return e.epoch-=i,e.date()!==n.date()&&(e=n.clone(),a>1&&(a-=1),a<1&&(a+=1),i=a*Ct.hour,e.epoch-=i),xt(e,{hour:t}),xd(e,n,"minute"),e=vi(e,n,r,"day"),e.epoch},PB=function(e,t,r){let n=t.match(/([0-9]{1,2})[:h]([0-9]{1,2})(:[0-9]{1,2})? ?(am|pm)?/);if(!n){if(n=t.match(/([0-9]{1,2}) ?(am|pm)/),!n)return e.epoch;n.splice(2,0,"0"),n.splice(3,0,"")}let a=!1,i=parseInt(n[1],10),o=parseInt(n[2],10);o>=60&&(o=59),i>12&&(a=!0),a===!1&&(n[4]==="am"&&i===12&&(i=0),n[4]==="pm"&&i<12&&(i+=12)),n[3]=n[3]||"",n[3]=n[3].replace(/:/,"");let s=parseInt(n[3],10)||0,u=e.clone();return e=e.hour(i),e=e.minute(o),e=e.second(s),e=e.millisecond(0),e=vi(e,u,r,"day"),e.epoch},kB=function(e,t,r){if(t=Va(t),t>28){let a=e.month(),i=Zi[a];a===1&&t===29&&ru(e.year())&&(i=29),t>i&&(t=i)}t<=0&&(t=1);let n=e.clone();return xt(e,{date:t}),e=vi(e,n,r,"month"),e.epoch},OB=function(e,t,r){typeof t=="string"&&(t==="sept"&&(t="sep"),t=Zw()[t.toLowerCase()]),t=Va(t),t>=12&&(t=11),t<=0&&(t=0);let n=e.date();n>Zi[t]&&(n=Zi[t]);let a=e.clone();return xt(e,{month:t,d:n}),e=vi(e,a,r,"year"),e.epoch},Af=function(e,t){return typeof t=="string"&&/^'[0-9]{2}$/.test(t)&&(t=t.replace(/'/,"").trim(),t=Number(t),t>30?t=1900+t:t=2e3+t),t=Va(t),xt(e,{year:t}),e.epoch},$B=function(e,t,r){let n=e.clone();return t=Va(t),e=e.month(0),e=e.date(1),e=e.day("monday"),e.monthName()==="december"&&e.date()>=28&&(e=e.add(1,"week")),t-=1,e=e.add(t,"weeks"),e=vi(e,n,r,"year"),e.epoch},BB=function(e,t,r){t=Va(t);let n=e.clone();return t-=1,t<=0?t=0:t>=365&&(ru(e.year())?t=365:t=364),e=e.startOf("year"),e=e.add(t,"day"),xd(e,n,"hour"),e=vi(e,n,r,"year"),e.epoch};let Fm="am",Pm="pm";function _B(){return Fm}function IB(){return Pm}function zB(e){Fm=e.am||Fm,Pm=e.pm||Pm}const jB={millisecond:function(e){if(e!==void 0){let t=this.clone();return t.epoch=TB(t,e),t}return this.d.getMilliseconds()},second:function(e,t){if(e!==void 0){let r=this.clone();return r.epoch=FB(r,e,t),r}return this.d.getSeconds()},minute:function(e,t){if(e!==void 0){let r=this.clone();return r.epoch=kg(r,e,t),r}return this.d.getMinutes()},hour:function(e,t){let r=this.d;if(e!==void 0){let n=this.clone();return n.epoch=Nf(n,e,t),n}return r.getHours()},hourFloat:function(e,t){if(e!==void 0){let i=this.clone(),o=e%1;o=o*60;let s=parseInt(e,10);return i.epoch=Nf(i,s,t),i.epoch=kg(i,o,t),i}let r=this.d,n=r.getHours(),a=r.getMinutes();return a=a/60,n+a},hour12:function(e,t){let r=this.d;if(e!==void 0){let a=this.clone();e=""+e;let i=e.match(/^([0-9]+)(am|pm)$/);if(i){let o=parseInt(i[1],10);i[2]==="pm"&&(o+=12),a.epoch=Nf(a,o,t)}return a}let n=r.getHours();return n>12&&(n=n-12),n===0&&(n=12),n},time:function(e,t){if(e!==void 0){let r=this.clone();return e=e.toLowerCase().trim(),r.epoch=PB(r,e,t),r}return`${this.h12()}:${Ye(this.minute())}${this.ampm()}`},ampm:function(e,t){let r=_B(),n=this.hour();if(n>=12&&(r=IB()),typeof e!="string")return r;let a=this.clone();return e=e.toLowerCase().trim(),n>=12&&e==="am"?(n-=12,a.hour(n,t)):n<12&&e==="pm"?(n+=12,a.hour(n,t)):a},dayTime:function(e,t){if(e!==void 0){const n={morning:"7:00",breakfast:"7:00",noon:"12:00",lunch:"12:00",afternoon:"14:00",evening:"18:00",dinner:"18:00",night:"23:00",midnight:"00:00"};let a=this.clone();return e=e||"",e=e.toLowerCase(),n.hasOwnProperty(e)===!0&&(a=a.time(n[e],t)),a}let r=this.hour();return r<6?"night":r<12?"morning":r<17?"afternoon":r<22?"evening":"night"},iso:function(e){return e!==void 0?this.set(e):this.format("iso")}},qB={date:function(e,t){if(e!==void 0){let r=this.clone();return e=parseInt(e,10),e&&(r.epoch=kB(r,e,t)),r}return this.d.getDate()},day:function(e,t){if(e===void 0)return this.d.getDay();let r=this.clone(),n=e;typeof e=="string"&&(e=e.toLowerCase(),Ag.hasOwnProperty(e)?n=Ag[e]:(n=Hs().indexOf(e),n===-1&&(n=Hl().indexOf(e))));let i=this.d.getDay()-n;t===!0&&i>0&&(i=i-7),t===!1&&i<0&&(i=i+7);let o=this.subtract(i,"days");return xt(o,{hour:r.hour(),minute:r.minute(),second:r.second()}),o},dayName:function(e,t){if(e===void 0)return Hl()[this.day()];let r=this.clone();return r=r.day(e,t),r}},Og=e=>(e=e.minute(0),e=e.second(0),e=e.millisecond(1),e),RB={dayOfYear:function(e,t){if(e!==void 0){let i=this.clone();return i.epoch=BB(i,e,t),i}let r=0,n=this.d.getMonth(),a;for(let i=1;i<=n;i++)a=new Date,a.setDate(1),a.setFullYear(this.d.getFullYear()),a.setHours(1),a.setMinutes(1),a.setMonth(i),a.setHours(-2),r+=a.getDate();return r+this.d.getDate()},week:function(e,t){if(e!==void 0){let s=this.clone();return s.epoch=$B(this,e,t),s=Og(s),s}let r=this.clone();r=r.month(0),r=r.date(1),r=Og(r),r=r.day("monday"),r.month()===11&&r.date()>=25&&(r=r.add(1,"week"));let n=1;r.date()===1&&(n=0),r=r.minus(2,"hours");const a=this.epoch;if(r.epoch>a)return 1;let i=0,o=this.month()*4;for(r.epoch+=Ct.week*o,i+=o;i<=52;i++){if(r.epoch>a)return i+n;r=r.add(1,"week")}return 52},month:function(e,t){if(e!==void 0){let r=this.clone();return r.epoch=OB(r,e,t),r}return this.d.getMonth()},monthName:function(e,t){if(e!==void 0){let r=this.clone();return r=r.month(e,t),r}return j$()[this.month()]},quarter:function(e,t){if(e!==void 0&&(typeof e=="string"&&(e=e.replace(/^q/i,""),e=parseInt(e,10)),Gi[e])){let n=this.clone(),a=Gi[e][0];return n=n.month(a,t),n=n.date(1,t),n=n.startOf("day"),n}let r=this.d.getMonth();for(let n=1;n<Gi.length;n++)if(r<Gi[n][0])return n-1;return 4},season:function(e,t){let r="north";if(this.hemisphere()==="South"&&(r="south"),e!==void 0){let a=this.clone();for(let i=0;i<Un[r].length;i++)e===Un[r][i][0]&&(a=a.month(Un[r][i][1],t),a=a.date(1),a=a.startOf("day"));return a}let n=this.d.getMonth();for(let a=0;a<Un[r].length-1;a++)if(n>=Un[r][a][1]&&n<Un[r][a+1][1])return Un[r][a][0];return r==="north"?"winter":"summer"},year:function(e){if(e!==void 0){let t=this.clone();return t.epoch=Af(t,e),t}return this.d.getFullYear()},era:function(e){if(e!==void 0){let t=this.clone();e=e.toLowerCase();let r=t.d.getFullYear();return e==="bc"&&r>0&&(t.epoch=Af(t,r*-1)),e==="ad"&&r<0&&(t.epoch=Af(t,r*-1)),t}return this.d.getFullYear()<0?"BC":"AD"},decade:function(e){if(e!==void 0){if(e=String(e),e=e.replace(/([0-9])'?s$/,"$1"),e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),!e)return console.warn("Spacetime: Invalid decade input"),this;e.length===2&&/[0-9][0-9]/.test(e)&&(e="19"+e);let t=Number(e);return isNaN(t)?this:(t=Math.floor(t/10)*10,this.year(t))}return this.startOf("decade").year()},century:function(e){if(e!==void 0){typeof e=="string"&&(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=e.replace(/([0-9]+) ?(b\.?c\.?|a\.?d\.?)/i,(n,a,i)=>(i.match(/b\.?c\.?/i)&&(a="-"+a),a)),e=e.replace(/c$/,""));let r=Number(e);return isNaN(e)?(console.warn("Spacetime: Invalid century input"),this):(r===0&&(r=1),r>=0?r=(r-1)*100:r=(r+1)*100,this.year(r))}let t=this.startOf("century").year();return t=Math.floor(t/100),t<0?t-1:t+1},millenium:function(e){if(e!==void 0){if(typeof e=="string"&&(e=e.replace(/([0-9])(th|rd|st|nd)/,"$1"),e=Number(e),isNaN(e)))return console.warn("Spacetime: Invalid millenium input"),this;e>0&&(e-=1);let r=e*1e3;return r===0&&(r=1),this.year(r)}let t=Math.floor(this.year()/1e3);return t>=0&&(t+=1),t}},Ar=Object.assign({},jB,qB,RB);Ar.milliseconds=Ar.millisecond;Ar.seconds=Ar.second;Ar.minutes=Ar.minute;Ar.hours=Ar.hour;Ar.hour24=Ar.hour;Ar.h12=Ar.hour12;Ar.h24=Ar.hour24;Ar.days=Ar.day;const LB=e=>{Object.keys(Ar).forEach(t=>{e.prototype[t]=Ar[t]})},km=function(e,t){return e===1&&ru(t)?29:Zi[e]},HB=(e,t)=>{if(e.month>0){let r=parseInt(e.month/12,10);e.year=t.year()+r,e.month=e.month%12}else if(e.month<0){let r=Math.abs(e.month),n=parseInt(r/12,10);r%12!==0&&(n+=1),e.year=t.year()-n,e.month=e.month%12,e.month=e.month+12,e.month===12&&(e.month=0)}return e},GB=(e,t,r)=>{e.year=t.year(),e.month=t.month();let n=t.date();for(e.date=n-Math.abs(r);e.date<1;){e.month-=1,e.month<0&&(e.month=11,e.year-=1);let a=km(e.month,e.year);e.date+=a}return e},VB=(e,t,r)=>{let n=t.year(),a=t.month(),i=km(a,n);for(;r>i;)r-=i,a+=1,a>=12&&(a-=12,n+=1),i=km(a,n);return e.month=a,e.date=r,e},UB=HB,WB=VB,JB=GB,Hn=["millisecond","second","minute","hour","date","month"];let mi={second:Hn.slice(0,1),minute:Hn.slice(0,2),quarterhour:Hn.slice(0,2),hour:Hn.slice(0,3),date:Hn.slice(0,4),month:Hn.slice(0,4),quarter:Hn.slice(0,4),season:Hn.slice(0,4),year:Hn,decade:Hn,century:Hn};mi.week=mi.hour;mi.season=mi.date;mi.quarter=mi.date;const KB={year:!0,quarter:!0,season:!0,month:!0,week:!0,date:!0},YB={month:!0,quarter:!0,season:!0,year:!0},ZB=e=>{e.prototype.add=function(t,r){let n=this.clone();if(!r||t===0)return n;let a=this.clone();if(r=no(r),r==="millisecond")return n.epoch+=t,n;r==="fortnight"&&(t*=2,r="week"),Ct[r]?n.epoch+=Ct[r]*t:r==="week"||r==="weekend"?n.epoch+=Ct.day*(t*7):r==="quarter"||r==="season"?n.epoch+=Ct.month*(t*3):r==="quarterhour"&&(n.epoch+=Ct.minute*15*t);let i={};if(mi[r]&&mi[r].forEach(o=>{i[o]=a[o]()}),KB[r]){const o=a.timezone().current.offset-n.timezone().current.offset;n.epoch+=o*3600*1e3}if(r==="month"&&(i.month=a.month()+t,i=UB(i,a)),r==="week"){let o=a.date()+t*7;o<=28&&o>1&&(i.date=o)}if(r==="weekend"&&n.dayName()!=="saturday")n=n.day("saturday",!0);else if(r==="date"){if(t<0)i=JB(i,a,t);else{let o=a.date()+t;i=WB(i,a,o)}t!==0&&a.isSame(n,"day")&&(i.date=a.date()+t)}else if(r==="quarter"){if(i.month=a.month()+t*3,i.year=a.year(),i.month<0){let o=Math.floor(i.month/12),s=i.month+Math.abs(o)*12;i.month=s,i.year+=o}else if(i.month>=12){let o=Math.floor(i.month/12);i.month=i.month%12,i.year+=o}i.date=a.date()}else if(r==="year"){let o=a.year()+t,s=n.year();if(s<o){let u=Math.floor(t/4)||1;n.epoch+=Math.abs(Ct.day*u)}else if(s>o){let u=Math.floor(t/4)||1;n.epoch+=Ct.day*u}}else r==="decade"?i.year=n.year()+10:r==="century"&&(i.year=n.year()+100);if(YB[r]){let o=Zi[i.month];i.date=a.date(),i.date>o&&(i.date=o)}return Object.keys(i).length>1&&xt(n,i),n},e.prototype.subtract=function(t,r){return this.clone().add(t*-1,r)},e.prototype.minus=e.prototype.subtract,e.prototype.plus=e.prototype.add},Os={millisecond:e=>e.epoch,second:e=>[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second()].join("-"),minute:e=>[e.year(),e.month(),e.date(),e.hour(),e.minute()].join("-"),hour:e=>[e.year(),e.month(),e.date(),e.hour()].join("-"),day:e=>[e.year(),e.month(),e.date()].join("-"),week:e=>[e.year(),e.week()].join("-"),month:e=>[e.year(),e.month()].join("-"),quarter:e=>[e.year(),e.quarter()].join("-"),year:e=>e.year()};Os.date=Os.day;const QB=e=>{e.prototype.isSame=function(t,r,n=!0){let a=this;if(!r)return null;if(typeof t=="string"&&typeof r=="object"){let i=t;t=r,r=i}return(typeof t=="string"||typeof t=="number")&&(t=new e(t,this.timezone.name)),r=r.replace(/s$/,""),n===!0&&a.tz!==t.tz&&(t=t.clone(),t.tz=a.tz),Os[r]?Os[r](a)===Os[r](t):null}},XB=e=>{const t={isAfter:function(r){r=ji(r,this);let n=ws(r);return n===null?null:this.epoch>n},isBefore:function(r){r=ji(r,this);let n=ws(r);return n===null?null:this.epoch<n},isEqual:function(r){r=ji(r,this);let n=ws(r);return n===null?null:this.epoch===n},isBetween:function(r,n,a=!1){r=ji(r,this),n=ji(n,this);let i=ws(r);if(i===null)return null;let o=ws(n);return o===null?null:a?this.isBetween(r,n)||this.isEqual(r)||this.isEqual(n):i<this.epoch&&this.epoch<o}};Object.keys(t).forEach(r=>{e.prototype[r]=t[r]})},e_=e=>{const t={i18n:function(r){return ti(r.days)&&K$(r.days),ti(r.months)&&q$(r.months),P$(r.useTitleCase)&&Z$(r.useTitleCase),ti(r.ampm)&&zB(r.ampm),ti(r.distance)&&vB(r.distance),ti(r.units)&&fB(r.units),this}};Object.keys(t).forEach(r=>{e.prototype[r]=t[r]})};let Cf=Vo;const Qt=function(e,t,r={}){this.epoch=null,this.tz=Rl(t,Cf),this.silent=typeof r.silent<"u"?r.silent:!0,this.british=r.dmy||r.british,this._weekStart=1,r.weekStart!==void 0&&(this._weekStart=r.weekStart),this._today={},r.today!==void 0&&(this._today=r.today),Object.defineProperty(this,"d",{get:function(){let a=b$(this),o=(new Date(this.epoch).getTimezoneOffset()||0)+a*60;o=o*60*1e3;let s=this.epoch+o;return new Date(s)}}),Object.defineProperty(this,"timezones",{get:()=>Cf,set:a=>(Cf=a,a)});let n=Xw(this,e);this.epoch=n.epoch,n.tz&&(this.tz=n.tz)};Object.keys(fi).forEach(e=>{Qt.prototype[e]=fi[e]});Qt.prototype.clone=function(){return new Qt(this.epoch,this.tz,{silent:this.silent,weekStart:this._weekStart,today:this._today,parsers:this.parsers})};Qt.prototype.toLocalDate=function(){return this.toNativeDate()};Qt.prototype.toNativeDate=function(){return new Date(this.epoch)};LB(Qt);ZB(Qt);QB(Qt);XB(Qt);e_(Qt);const t_=(e,t)=>{let r=new Qt(null),n=new Qt(null);r=r.time(e),t?n=n.time(t):n=r.add(59,"minutes");let a=r.hour(),i=n.hour();return Object.keys(r.timezones).filter(s=>{if(s.indexOf("/")===-1)return!1;let u=new Qt(null,s),l=u.hour();return l>=a&&l<=i?!(l===a&&u.minute()<r.minute()||l===i&&u.minute()>n.minute()):!1})},r_="7.7.0",gt=(e,t,r)=>new Qt(e,t,r),xc=function(e){let t=e._today||{};return Object.keys(t).forEach(r=>{e=e[r](t[r])}),e};gt.now=(e,t)=>{let r=new Qt(new Date().getTime(),e,t);return r=xc(r),r};gt.today=(e,t)=>{let r=new Qt(new Date().getTime(),e,t);return r=xc(r),r.startOf("day")};gt.tomorrow=(e,t)=>{let r=new Qt(new Date().getTime(),e,t);return r=xc(r),r.add(1,"day").startOf("day")};gt.yesterday=(e,t)=>{let r=new Qt(new Date().getTime(),e,t);return r=xc(r),r.subtract(1,"day").startOf("day")};gt.extend=function(e={}){return Object.keys(e).forEach(t=>{Qt.prototype[t]=e[t]}),this};gt.timezones=function(){return new Qt().timezones};gt.max=function(e,t){let r=new Qt(null,e,t);return r.epoch=864e13,r};gt.min=function(e,t){let r=new Qt(null,e,t);return r.epoch=-864e13,r};gt.whereIts=t_;gt.version=r_;gt.plugin=gt.extend;const $g={daybreak:"7:00am",breakfast:"8:00am",morning:"9:00am",noon:"12:00pm",midday:"12:00pm",afternoon:"2:00pm",lunchtime:"12:00pm",evening:"6:00pm",dinnertime:"6:00pm",night:"8:00pm",eod:"10:00pm",midnight:"12:00am",am:"9:00am",pm:"5:00pm","early day":"8:00am","late at night":"11:00pm"},_o={quarter:15,half:30},Lu=function(e){let t=e.time("6:00am");return e.isBefore(t)?e.ampm("pm"):e},n_=function(e,t){let r=e.match("#Cardinal$"),n=e.not(r).match("(half|quarter|25|20|15|10|5)");r=r.text("reduced");let a=n.text("reduced");_o.hasOwnProperty(a)&&(a=_o[a]);let i=e.has("to");return t=t.hour(r),t=t.startOf("hour"),r<6&&(t=t.ampm("pm")),i?t=t.subtract(a,"minutes"):t=t.add(a,"minutes"),t},Dd=function(e,t){let r=e.match("(at|by|for|before|this|after)? #Time+");r=r.not("^(at|by|for|before|this|after)"),r=r.not("sharp"),r=r.not("on the dot");let n=gt.now(t.timezone),a=n.clone(),i=r.not("in? the").text("reduced");if(i=i.replace(/^@/,""),$g.hasOwnProperty(i))return{result:$g[i],m:r};let o=r.match("^#Cardinal oclock (am|pm)?");if(o.found&&(n=n.hour(o.text("reduced")),n=n.startOf("hour"),n.isValid()&&!n.isEqual(a))){let u=o.match("(am|pm)");return u.found?n=n.ampm(u.text("reduced")):n=Lu(n),{result:n.time(),m:o}}if(o=r.match("(half|quarter|25|20|15|10|5) (past|after|to) #Cardinal"),o.found&&(n=n_(o,n),n.isValid()&&!n.isEqual(a)))return n=Lu(n),{result:n.time(),m:o};if(o=r.match("[<min>(half|quarter|25|20|15|10|5)] (past|after)"),o.found){let u=o.groups("min").text("reduced"),l=gt(t.today);if(_o.hasOwnProperty(u)&&(u=_o[u]),l=l.next("hour").startOf("hour").minute(u),l.isValid()&&!l.isEqual(a))return{result:l.time(),m:o}}if(o=r.match("[<min>(half|quarter|25|20|15|10|5)] to"),o.found){let u=o.groups("min").text("reduced"),l=gt(t.today);if(_o.hasOwnProperty(u)&&(u=_o[u]),l=l.next("hour").startOf("hour").minus(u,"minutes"),l.isValid()&&!l.isEqual(a))return{result:l.time(),m:o}}if(o=r.match("[<time>#Time] (in|at) the? [<desc>(morning|evening|night|nighttime)]"),o.found){let u=o.groups("time").text("normal");if(/^[0-9]{1,2}$/.test(u)?(n=n.hour(u),n=n.startOf("hour")):n=n.time(u),n.isValid()&&!n.isEqual(a)){let l=o.groups("desc").text("reduced");return(l==="evening"||l==="night")&&(n=n.ampm("pm")),{result:n.time(),m:o}}}if(o=r.match("this? [<desc>(morning|evening|tonight)] at [<time>(#Cardinal|#Time)]"),o.found){let u=o.groups(),l=u.time.text("reduced");if(/^[0-9]{1,2}$/.test(l)?(n=n.hour(l),n=n.startOf("hour")):n=n.time(l),n.isValid()&&!n.isEqual(a)){let c=u.desc.text("reduced");return c==="morning"&&(n=n.ampm("am")),(c==="evening"||c==="tonight")&&(n=n.ampm("pm")),{result:n.time(),m:o}}}if(o=r.match("^#Cardinal$"),o.found){let u=o.text("reduced");if(n=n.hour(u),n=n.startOf("hour"),n.isValid()&&!n.isEqual(a))return/(am|pm)/i.test(u)===!1&&(n=Lu(n)),{result:n.time(),m:o}}let s=r.text("reduced");return n=n.time(s),n.isValid()&&!n.isEqual(a)?(/(am|pm)/i.test(s)===!1&&(n=Lu(n)),{result:n.time(),m:r}):t.dayStart?{result:t.dayStart,m:e.none()}:{result:null,m:e.none()}},a_=function(e){if(e.has("(next|last|this)$"))return{result:null,m:e.none()};let t=e.match("^this? (next|upcoming|coming)");return t.found?{result:"next",m:t}:(t=e.match("^this? (past)"),t.found?{result:"this-past",m:t}:(t=e.match("^this? (last|previous)"),t.found?{result:"last",m:t}:(t=e.match("^(this|current)"),t.found?{result:"this",m:t}:{result:null,m:e.none()})))},i_=function(e){let t=e.match("[(start|beginning) of] .",0);return t.found?{result:"start",m:t}:(t=e.match("[end of] .",0),t.found?{result:"end",m:t}:(t=e.match("[(middle|midpoint|center) of] .",0),t.found?{result:"middle",m:t}:{result:null,m:t}))},Te="America/",ze="Asia/",qt="Europe/",$r="Africa/",Kt="Australia/",rn="Pacific/",o_={"british summer time":qt+"London",bst:qt+"London","british time":qt+"London","britain time":qt+"London","irish summer time":qt+"Dublin","irish time":qt+"Dublin",ireland:qt+"Dublin","central european time":qt+"Berlin",cet:qt+"Berlin","central european summer time":qt+"Berlin",cest:qt+"Berlin","central europe":qt+"Berlin","eastern european time":qt+"Riga",eet:qt+"Riga","eastern european summer time":qt+"Riga",eest:qt+"Riga","eastern europe time":qt+"Riga","western european time":qt+"Lisbon","western european summer time":qt+"Lisbon","western europe":qt+"Lisbon","turkey standard time":qt+"Istanbul",trt:qt+"Istanbul","turkish time":qt+"Istanbul",etc:$r+"Freetown",utc:$r+"Freetown","greenwich standard time":$r+"Freetown",gmt:$r+"Freetown","east africa time":$r+"Nairobi","east african time":$r+"Nairobi","eastern africa time":$r+"Nairobi","central africa time":$r+"Khartoum","central african time":$r+"Khartoum","south africa standard time":$r+"Johannesburg",sast:$r+"Johannesburg","southern africa":$r+"Johannesburg","south african":$r+"Johannesburg","west africa standard time":$r+"Lagos","western africa time":$r+"Lagos","west african time":$r+"Lagos","australian central standard time":Kt+"Adelaide",acst:Kt+"Adelaide","australian central daylight time":Kt+"Adelaide",acdt:Kt+"Adelaide","australia central":Kt+"Adelaide","australian eastern standard time":Kt+"Brisbane",aest:Kt+"Brisbane","australian eastern daylight time":Kt+"Brisbane",aedt:Kt+"Brisbane","australia east":Kt+"Brisbane","australian western standard time":Kt+"Perth",awst:Kt+"Perth","australian western daylight time":Kt+"Perth",awdt:Kt+"Perth","australia west":Kt+"Perth","australian central western standard time":Kt+"Eucla",acwst:Kt+"Eucla","australia central west":Kt+"Eucla","lord howe standard time":Kt+"Lord_Howe",lhst:Kt+"Lord_Howe","lord howe daylight time":Kt+"Lord_Howe",lhdt:Kt+"Lord_Howe","russian standard time":qt+"Moscow",msk:qt+"Moscow",russian:qt+"Moscow","central standard time":Te+"Chicago","central time":Te+"Chicago",cst:Te+"Havana","central daylight time":Te+"Chicago",cdt:Te+"Havana","mountain standard time":Te+"Denver","mountain time":Te+"Denver",mst:Te+"Denver","mountain daylight time":Te+"Denver",mdt:Te+"Denver","atlantic standard time":Te+"Halifax","atlantic time":Te+"Halifax",ast:ze+"Baghdad","atlantic daylight time":Te+"Halifax",adt:Te+"Halifax","eastern standard time":Te+"New_York",eastern:Te+"New_York","eastern time":Te+"New_York",est:Te+"New_York","eastern daylight time":Te+"New_York",edt:Te+"New_York","pacific time":Te+"Los_Angeles","pacific standard time":Te+"Los_Angeles",pst:Te+"Los_Angeles","pacific daylight time":Te+"Los_Angeles",pdt:Te+"Los_Angeles","alaskan standard time":Te+"Anchorage","alaskan time":Te+"Anchorage",ahst:Te+"Anchorage","alaskan daylight time":Te+"Anchorage",ahdt:Te+"Anchorage","hawaiian standard time":rn+"Honolulu","hawaiian time":rn+"Honolulu",hst:rn+"Honolulu","aleutian time":rn+"Honolulu","hawaii time":rn+"Honolulu","newfoundland standard time":Te+"St_Johns","newfoundland time":Te+"St_Johns",nst:Te+"St_Johns","newfoundland daylight time":Te+"St_Johns",ndt:Te+"St_Johns","brazil time":Te+"Sao_Paulo",brt:Te+"Sao_Paulo",brasília:Te+"Sao_Paulo",brasilia:Te+"Sao_Paulo","brazilian time":Te+"Sao_Paulo","argentina time":Te+"Buenos_Aires","argentinian time":Te+"Buenos_Aires","amazon time":Te+"Manaus",amt:Te+"Manaus","amazonian time":Te+"Manaus","easter island standard time":"Chile/Easterisland",east:"Chile/Easterisland","easter island summer time":"Chile/Easterisland",easst:"Chile/Easterisland","venezuelan standard time":Te+"Caracas","venezuelan time":Te+"Caracas",vet:Te+"Caracas","venezuela time":Te+"Caracas","paraguay time":Te+"Asuncion",pyt:Te+"Asuncion","paraguay summer time":Te+"Asuncion",pyst:Te+"Asuncion","cuba standard time":Te+"Havana","cuba time":Te+"Havana","cuba daylight time":Te+"Havana","cuban time":Te+"Havana","bolivia time":Te+"La_Paz","bolivian time":Te+"La_Paz","colombia time":Te+"Bogota",cot:Te+"Bogota","colombian time":Te+"Bogota","acre time":Te+"Eirunepe","peru time":Te+"Lima","chile standard time":Te+"Punta_Arenas","chile time":Te+"Punta_Arenas",clst:Te+"Punta_Arenas","chile summer time":Te+"Punta_Arenas",cldt:Te+"Punta_Arenas","uruguay time":Te+"Montevideo",uyt:Te+"Montevideo",ist:ze+"Jerusalem","arabic standard time":ze+"Baghdad","arabic time":ze+"Baghdad","arab time":ze+"Baghdad","iran standard time":ze+"Tehran","iran time":ze+"Tehran",irst:ze+"Tehran","iran daylight time":ze+"Tehran",irdt:ze+"Tehran",iranian:ze+"Tehran","pakistan standard time":ze+"Karachi","pakistan time":ze+"Karachi",pkt:ze+"Karachi","india standard time":ze+"Kolkata","indian time":ze+"Kolkata","indochina time":ze+"Bangkok",ict:ze+"Bangkok","south east asia":ze+"Bangkok","china standard time":ze+"Shanghai",ct:ze+"Shanghai","chinese time":ze+"Shanghai","alma-ata time":ze+"Almaty",almt:ze+"Almaty","oral time":ze+"Oral","orat time":ze+"Oral","yakutsk time":ze+"Yakutsk",yakt:ze+"Yakutsk","gulf standard time":ze+"Dubai","gulf time":ze+"Dubai",gst:ze+"Dubai",uae:ze+"Dubai","hong kong time":ze+"Hong_Kong",hkt:ze+"Hong_Kong","western indonesian time":ze+"Jakarta",wib:ze+"Jakarta","indonesia time":ze+"Jakarta","central indonesian time":ze+"Makassar",wita:ze+"Makassar","israel daylight time":ze+"Jerusalem",idt:ze+"Jerusalem","israel standard time":ze+"Jerusalem","israel time":ze+"Jerusalem",israeli:ze+"Jerusalem","krasnoyarsk time":ze+"Krasnoyarsk",krat:ze+"Krasnoyarsk","malaysia time":ze+"Kuala_Lumpur",myt:ze+"Kuala_Lumpur","singapore time":ze+"Singapore",sgt:ze+"Singapore","korea standard time":ze+"Seoul","korea time":ze+"Seoul",kst:ze+"Seoul","korean time":ze+"Seoul","uzbekistan time":ze+"Samarkand",uzt:ze+"Samarkand","vladivostok time":ze+"Vladivostok",vlat:ze+"Vladivostok","maldives time":"Indian/Maldives",mvt:"Indian/Maldives","mauritius time":"Indian/Mauritius",mut:"Indian/Mauritius","marshall islands time":rn+"Kwajalein",mht:rn+"Kwajalein","samoa standard time":rn+"Midway",sst:rn+"Midway","somoan time":rn+"Midway","chamorro standard time":rn+"Guam",chst:rn+"Guam","papua new guinea time":rn+"Bougainville",pgt:rn+"Bougainville"};let s_=gt().timezones,u_=Object.keys(s_).reduce((e,t)=>(e[t]=t,e),{});const Bg=Object.assign({},o_,u_),l_=/(-?[0-9]+)h(rs)?/i,c_=/(-?[0-9]+)/,f_=/utc([-+]?[0-9]+)/i,m_=/gmt([-+]?[0-9]+)/i,Hu=function(e){return e=Number(e),e>-13&&e<13?(e=e*-1,e=(e>0?"+":"")+e,"Etc/GMT"+e):null},d_=function(e){let t=e.match(l_);if(t!==null||(t=e.match(f_),t!==null))return Hu(t[1]);if(t=e.match(m_),t!==null){let r=Number(t[1])*-1;return Hu(r)}return t=e.match(c_),t!==null?Hu(t[1]):null},h_=function(e){let t=e.match("#Timezone+");t=t.not("(in|for|by|near|at)");let r=t.text("reduced");if(Bg.hasOwnProperty(r))return{result:Bg[r],m:t};let n=d_(r);return n?{result:n,m:t}:{result:null,m:e.none()}},p_=function(e){let t=e.match("#WeekDay");return t.found&&!e.has("^#WeekDay$")?e.has("(this|next|last) (next|upcoming|coming|past)? #WeekDay")?{result:null,m:e.none()}:{result:t.text("reduced"),m:t}:{result:null,m:e.none()}},g_=function(e){return e=e.not("[^the] !#Value",0),e=e.not("#Preposition$"),e=e.not("#Conjunction$"),e=e.not("sharp"),e=e.not("on the dot"),e=e.not("^(on|of)"),e=e.not("(next|last|this)$"),e},v_=function(e,t){let r=p$(e),n=r.result;e=e.not(r.m),r=v$(e);let a=r.result;e=e.not(r.m),r=h_(e);let i=r.result;e=e.not(r.m),r=Dd(e,t);let o=r.result;e=e.not(r.m),r=p_(e);let s=r.result;e=e.not(r.m),r=i_(e);let u=r.result;e=e.not(r.m),r=a_(e);let l=r.result;return e=e.not(r.m),e=g_(e),{shift:n,counter:a,tz:i,time:o,weekDay:s,section:u,rel:l,doc:e}};let yn=class tx{constructor(t,r,n){this.unit=r||"day",this.setTime=!1,n=n||{};let a={};n.today&&(a={date:n.today.date(),month:n.today.month(),year:n.today.year()}),t&&t.month==="sept"&&(t.month="sep");let i=gt(t,n.timezone,{today:a,dmy:n.dmy});Object.defineProperty(this,"d",{enumerable:!1,writable:!0,value:i}),Object.defineProperty(this,"context",{enumerable:!1,writable:!0,value:n})}clone(){let t=new tx(this.d,this.unit,this.context);return t.setTime=this.setTime,t}log(){return console.log("--"),this.d.log(),console.log(`
19
+ `),this}applyShift(t={}){return Object.keys(t).forEach(r=>{this.d=this.d.add(t[r],r),(r==="hour"||r==="minute")&&(this.setTime=!0)}),this}applyTime(t){if(t){if(/^[0-9]{1,2}$/.test(t)?this.d=this.d.hour(t):this.d=this.d.time(t),!/[ap]m/.test(t)){let a=this.d.time("6:00am");this.d.isBefore(a)&&(this.d=this.d.ampm("pm"));let i=this.d.time("10:00pm");this.d.isAfter(i)&&(this.d=this.d.ampm("am"))}}else this.d=this.d.startOf("day");return this.setTime=!0,this}applyWeekDay(t){if(t){let r=this.d.epoch;this.d=this.d.day(t),this.d.epoch<r&&(this.d=this.d.add(1,"week"))}return this}applyRel(t){return t==="next"?this.next():t==="last"||t==="this-past"?this.last():this}applySection(t){return t==="start"?this.start():t==="end"?this.end():t==="middle"?this.middle():this}format(t){return this.d.format(t)}start(){return this.d=this.d.startOf(this.unit),this.context.dayStart&&(this.d=this.d.time(this.context.dayStart)),this}end(){if(this.d=this.d.endOf(this.unit),this.context.dayEnd){this.d=this.d.startOf("day");let t=this.d.time(this.context.dayEnd);if(t.isAfter(this.d))return this.d=t,this}return this}middle(){let t=this.d.diff(this.d.endOf(this.unit)),r=Math.round(t.minutes/2);return this.d=this.d.add(r,"minutes"),this}beforeEnd(){let t=this.d.startOf(this.unit).diff(this.d.endOf(this.unit)),r=Math.round(t.minutes/4);return this.d=this.d.endOf(this.unit),this.d=this.d.minus(r,"minutes"),this.context.dayStart&&(this.d=this.d.time(this.context.dayStart)),this}before(){return this.d=this.d.minus(1,this.unit),this.d=this.d.endOf(this.unit),this.context.dayEnd&&(this.d=this.d.time(this.context.dayEnd)),this}after(){return this.d=this.d.add(1,this.unit),this.d=this.d.startOf(this.unit),this}next(){return this.d=this.d.add(1,this.unit),this.d=this.d.startOf(this.unit),this}last(){return this.d=this.d.minus(1,this.unit),this.d=this.d.startOf(this.unit),this}};class kn extends yn{constructor(t,r,n){super(t,r,n),this.unit="day",this.d.isValid()&&(this.d=this.d.startOf("day"))}middle(){return this.d=this.d.time("10am"),this}beforeEnd(){return this.d=this.d.time("2pm"),this}}class Wn extends kn{constructor(t,r,n){super(t,r,n),this.unit="day",this.d.isValid()&&(this.d=this.d.startOf("day"))}next(){return this.d=this.d.add(1,"year"),this}last(){return this.d=this.d.minus(1,"year"),this}}class Om extends kn{constructor(t,r,n){super(t,r,n),this.unit="day",this.isWeekDay=!0,typeof t=="string"?(this.d=gt(n.today,n.timezone),this.d=this.d.day(t),this.d.isBefore(n.today)&&(this.d=this.d.add(7,"days"))):this.d=t,this.weekDay=this.d.dayName(),this.d.isValid()&&(this.d=this.d.startOf("day"))}next(){return this.d=this.d.add(7,"days"),this.d=this.d.day(this.weekDay),this}last(){return this.d=this.d.minus(7,"days"),this.d=this.d.day(this.weekDay),this}before(){return this.d=this.d.minus(1,"day"),this.d=this.d.endOf("day"),this.context.dayEnd&&(this.d=this.d.time(this.context.dayEnd)),this}applyRel(t){if(t==="next"){let r=this.context.today.endOf("week").add(1,"week");return this.next(),this.d.isAfter(r)&&this.last(),this}if(t==="this-past")return this.last();if(t==="last"){let r=this.context.today.startOf("week");return this.last(),this.d.isBefore(r)===!1&&this.last(),this}return this}}class y_ extends Wn{constructor(t,r,n){super(t,r,n),this.unit="day",this.d.isValid()&&(this.d=this.d.startOf("day"))}}class Sl extends yn{constructor(t,r,n){super(t,r,n,!0),this.unit="hour",this.d.isValid()&&(this.d=this.d.startOf("hour"))}}class rx extends yn{constructor(t,r,n){super(t,r,n,!0),this.unit="minute",this.d.isValid()&&(this.d=this.d.startOf("minute"))}}class ua extends yn{constructor(t,r,n){super(t,r,n,!0),this.unit="millisecond"}}class b_ extends yn{constructor(t,r,n){super(t,r,n),this.unit="month",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}}class ai extends yn{constructor(t,r,n){super(t,r,n),this.unit="month",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}next(){return this.d=this.d.add(1,"year"),this.d=this.d.startOf("month"),this}last(){return this.d=this.d.minus(1,"year"),this.d=this.d.startOf("month"),this}middle(){return this.d=this.d.add(15,"days"),this.d=this.d.startOf("day"),this}}class _g extends yn{constructor(t,r,n){super(t,r,n),this.unit="quarter",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}last(){return this.d=this.d.minus(1,"quarter"),this.d=this.d.startOf(this.unit),this}}class $m extends yn{constructor(t,r,n){super(t,r,n),this.unit="quarter",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}next(){return this.d=this.d.add(1,"year"),this.d=this.d.startOf(this.unit),this}last(){return this.d=this.d.minus(1,"year"),this.d=this.d.startOf(this.unit),this}}class Nd extends yn{constructor(t,r,n){super(t,r,n),this.unit="season",this.d.isValid()&&(this.d=this.d.startOf(this.unit))}next(){return this.d=this.d.add(1,"year"),this.d=this.d.startOf(this.unit),this}last(){return this.d=this.d.minus(1,"year"),this.d=this.d.startOf(this.unit),this}}class Bm extends yn{constructor(t,r,n){super(t,r,n),this.unit="year",this.d.isValid()&&(this.d=this.d.startOf("year"))}}class Gs extends yn{constructor(t,r,n){super(t,r,n),this.unit="week",this.d.isValid()&&(this.d=this.d.startOf("week"))}clone(){return new Gs(this.d,this.unit,this.context)}middle(){return this.d=this.d.add(2,"days"),this}beforeEnd(){return this.d=this.d.day("friday"),this}}class nx extends yn{constructor(t,r,n){super(t,r,n),this.unit="week",this.d.isValid()&&(this.d=this.d.day("saturday"),this.d=this.d.startOf("day"))}start(){return this.d=this.d.day("saturday").startOf("day"),this}next(){return this.d=this.d.add(1,this.unit),this.d=this.d.startOf("weekend"),this}last(){return this.d=this.d.minus(1,this.unit),this.d=this.d.startOf("weekend"),this}}const Kn={today:e=>new kn(e.today,null,e),yesterday:e=>new kn(e.today.minus(1,"day"),null,e),tomorrow:e=>new kn(e.today.plus(1,"day"),null,e),eom:e=>{let t=e.today.endOf("month");return t=t.startOf("day"),new kn(t,null,e)},eoy:e=>{let t=e.today.endOf("year");return t=t.startOf("day"),new kn(t,null,e)},now:e=>new ua(e.today,null,e)};Kn.tommorrow=Kn.tomorrow;Kn.tmrw=Kn.tomorrow;Kn.anytime=Kn.today;Kn.sometime=Kn.today;const w_=function(e,t,r){let n=null;e.found===!1&&(r.time!==null&&(n=new ua(t.today,null,t)),r.shift&&Object.keys(r.shift).length>0&&(r.shift.hour||r.shift.minute?n=new ua(t.today,null,t):n=new kn(t.today,null,t)));let a=e.text("reduced");return Kn.hasOwnProperty(a)===!0?Kn[a](t):a==="next"&&r.shift&&Object.keys(r.shift).length>0?Kn.tomorrow(t):n},$i="january",Bi="february",Ig="march",Gu="april",No="may",x_="june",Vu="july",Uu="august",Ef="september",Ns="october",Ya="november",oa="december";var Wu={"new years eve":[oa,31],"new years":[$i,1],"new years day":[$i,1],"inauguration day":[$i,20],"australia day":[$i,26],"national freedom day":[Bi,1],"groundhog day":[Bi,2],"rosa parks day":[Bi,4],"valentines day":[Bi,14],"saint valentines day":[Bi,14],"st valentines day ":[Bi,14],"saint patricks day":[Ig,17],"st patricks day":[Ig,17],"april fools":[Gu,1],"april fools day":[Gu,1],"emancipation day":[Gu,16],"tax day":[Gu,15],"labour day":[No,1],"cinco de mayo":[No,5],"national nurses day":[No,6],"harvey milk day":[No,22],"victoria day":[No,24],juneteenth:[x_,19],"canada day":[Vu,1],"independence day":[Vu,4],"independents day":[Vu,4],"bastille day":[Vu,14],"purple heart day":[Uu,7],"womens equality day":[Uu,26],"16 de septiembre":[Ef,16],"dieciseis de septiembre":[Ef,16],"grito de dolores":[Ef,16],halloween:[Ns,31],"all hallows eve":[Ns,31],"day of the dead":[Ns,31],"dia de muertos":[Ns,31],"veterans day":[Ya,11],"st andrews day":[Ya,30],"saint andrews day":[Ya,30],"all saints day":[Ya,1],"all sts day":[Ya,1],"armistice day":[Ya,11],"rememberance day":[Ya,11],"christmas eve":[oa,24],christmas:[oa,25],xmas:[oa,25],"boxing day":[oa,26],"st stephens day":[oa,26],"saint stephens day":[oa,26],epiphany:[$i,6],"orthodox christmas day":[$i,7],"orthodox new year":[$i,14],"assumption of mary":[Uu,15],"all souls day":[Ya,2],"feast of the immaculate conception":[oa,8],"feast of our lady of guadalupe":[oa,12],kwanzaa:[oa,26],imbolc:[Bi,2],beltaine:[No,1],lughnassadh:[Uu,1],samhain:[Ns,31]};const D_=function(e,t,r,n){if(Wu.hasOwnProperty(e)||Wu.hasOwnProperty(t)){let a=Wu[e]||Wu[t]||[],i=gt.now(n);if(i=i.year(r),i=i.startOf("year"),i=i.month(a[0]),i=i.date(a[1]),i.isValid())return i}return null};var N_=D_;const A_="january",C_="february",E_="march",S_="may",M_="june",T_="september",zg="october",jg="november",Ao="monday",F_="thursday",P_="friday",qg="sunday";let Qi={"martin luther king day":[3,Ao,A_],"presidents day":[3,Ao,C_],"commonwealth day":[2,Ao,E_],"mothers day":[2,qg,S_],"fathers day":[3,qg,M_],"labor day":[1,Ao,T_],"columbus day":[2,Ao,zg],"canadian thanksgiving":[2,Ao,zg],thanksgiving:[4,F_,jg],"black friday":[4,P_,jg]};Qi["turday day"]=Qi.thanksgiving;Qi["indigenous peoples day"]=Qi["columbus day"];Qi["mlk day"]=Qi["martin luther king day"];var Ju=Qi;const k_=function(e,t,r,n){if(Ju.hasOwnProperty(e)||Ju.hasOwnProperty(t)){let a=Ju[e]||Ju[t]||[],i=gt.now(n);i=i.year(r),i=i.month(a[2]),i=i.startOf("month");let o=i.month();if(i=i.day(a[1]),i.month()!==o&&(i=i.add(1,"week")),a[0]>1&&(i=i.add(a[0]-1,"week")),i.isValid())return i}return null};var O_=k_;let Xi={easter:0,"ash wednesday":-46,"palm sunday":7,"maundy thursday":-3,"good friday":-2,"holy saturday":-1,"easter saturday":-1,"easter monday":1,"ascension day":39,"whit sunday":49,"whit monday":50,"trinity sunday":65,"corpus christi":60,"mardi gras":-47};Xi["easter sunday"]=Xi.easter;Xi.pentecost=Xi["whit sunday"];Xi.whitsun=Xi["whit sunday"];var Ku=Xi;const $_=function(e){let t=Math.floor,r=e%19,n=t(e/100),a=(n-t(n/4)-t((8*n+13)/25)+19*r+15)%30,i=a-t(a/28)*(1-t(29/(a+1))*t((21-r)/11)),o=(e+t(e/4)+i+2-n+t(n/4))%7,s=i-o,u=3+t((s+40)/44),l=s+28-31*t(u/4);return u=u===4?"April":"March",u+" "+l};var B_=$_;const __=function(e,t,r,n){if(Ku.hasOwnProperty(e)||Ku.hasOwnProperty(t)){let a=Ku[e]||Ku[t]||[],i=B_(r);if(!i)return null;let o=gt(i,n);o=o.year(r);let s=o.add(a,"day");if(s.isValid())return s}return null};var I_=__;const Yu={spring:[2003,2007,2044,2048,2052,2056,2060,2064,2068,2072,2076,2077,2080,2081,2084,2085,2088,2089,2092,2093,2096,2097],summer:[2021,2016,2020,2024,2028,2032,2036,2040,2041,2044,2045,2048,2049,2052,2053,2056,2057,2060,2061,2064,2065,2068,2069,2070,2072,2073,2074,2076,2077,2078,2080,2081,2082,2084,2085,2086,2088,2089,2090,2092,2093,2094,2096,2097,2098,2099],fall:[2002,2003,2004,2006,2007,2010,2011,2014,2015,2018,2019,2022,2023,2026,2027,2031,2035,2039,2043,2047,2051,2055,2059,2092,2096],winter:[2002,2003,2006,2007,2011,2015,2019,2023,2027,2031,2035,2039,2043,2080,2084,2088,2092,2096]},z_=[2080,2084,2088,2092,2096],j_=function(e){let t={spring:"March 20 "+e,summer:"June 21 "+e,fall:"Sept 22 "+e,winter:"Dec 21 "+e};return Yu.spring.indexOf(e)!==-1&&(t.spring="March 19 "+e),Yu.summer.indexOf(e)!==-1&&(t.summer="June 20 "+e),Yu.fall.indexOf(e)!==-1&&(t.fall="Sept 21 "+e),Yu.winter.indexOf(e)!==-1&&(t.winter="Dec 22 "+e),z_.indexOf(e)!==-1&&(t.winter="Dec 20 "+e),t};var q_=j_;let zt={"spring equinox":"spring","summer solistice":"summer","fall equinox":"fall","winter solstice":"winter"};zt["march equinox"]=zt["spring equinox"];zt["vernal equinox"]=zt["spring equinox"];zt.ostara=zt["spring equinox"];zt["june solstice"]=zt["summer solistice"];zt.litha=zt["summer solistice"];zt["autumn equinox"]=zt["fall equinox"];zt["autumnal equinox"]=zt["fall equinox"];zt["september equinox"]=zt["fall equinox"];zt["sept equinox"]=zt["fall equinox"];zt.mabon=zt["fall equinox"];zt["december solstice"]=zt["winter solistice"];zt["dec solstice"]=zt["winter solistice"];zt.yule=zt["winter solistice"];var Zu=zt;const R_=function(e,t,r,n){if(Zu.hasOwnProperty(e)||Zu.hasOwnProperty(t)){let a=Zu[e]||Zu[t],i=q_(r);if(!a||!i||!i[a])return null;let o=gt(i[a],n);if(o.isValid())return o}return null};var L_=R_;let H_={"isra and miraj":"april 13","lailat al-qadr":"june 10","eid al-fitr":"june 15","id al-Fitr":"june 15","eid ul-Fitr":"june 15",ramadan:"may 16","eid al-adha":"sep 22",muharram:"sep 12","prophets birthday":"nov 21"};var Qu=H_;const G_=-10.64,V_=function(e,t,r,n){if(Qu.hasOwnProperty(e)||Qu.hasOwnProperty(t)){let a=Qu[e]||Qu[t]||[];if(!a)return null;let i=gt(a+" 2018",n),s=(r-2018)*G_;if(i=i.add(s,"day"),i=i.startOf("day"),i=i.year(r),i.isValid())return i}return null};var U_=V_;const W_=gt.now().year(),Rg=function(e,t,r){t=t||W_,e=e||"",e=String(e),e=e.trim().toLowerCase(),e=e.replace(/'s/,"s");let n=e.replace(/ day$/,"");n=n.replace(/^the /,""),n=n.replace(/^orthodox /,"");let a=N_(e,n,t,r);return a!==null||(a=O_(e,n,t,r),a!==null)||(a=I_(e,n,t,r),a!==null)||(a=L_(e,n,t,r),a!==null)||(a=U_(e,n,t,r),a!==null)?a:null},J_=function(e,t){let r=null,n=e.match("[<holiday>#Holiday+] [<year>#Year?]"),a=t.today.year();n.groups("year").found&&(a=Number(n.groups("year").text("reduced"))||a);let i=n.groups("holiday").text("reduced"),o=Rg(i,a,t.timezone);return o!==null&&(o.isBefore(t.today)&&a===t.today.year()&&(o=Rg(i,a+1,t.timezone)),r=new y_(o,null,t)),r},_m={day:kn,hour:Sl,evening:Sl,second:ua,milliscond:ua,instant:ua,minute:rx,week:Gs,weekend:nx,month:b_,quarter:_g,year:Bm,season:Nd,yr:Bm,qtr:_g,wk:Gs,sec:ua,hr:Sl};let K_=`^(${Object.keys(_m).join("|")})$`;const Y_=function(e,t){let r=e.match(K_);if(r.found===!0){let n=r.text("reduced");if(_m.hasOwnProperty(n)){let a=_m[n];return a?new a(null,n,t):null}}if(r=e.match("^#WeekDay$"),r.found===!0){let n=r.text("reduced");return new Om(n,null,t)}return null},Xu=function(e){return{date:e.today.date(),month:e.today.month(),year:e.today.year()}},Z_=function(e,t){let r=e.match("(spring|summer|winter|fall|autumn) [<year>#Year?]");if(r.found){let n=e.text("reduced"),a=gt(n,t.timezone,{today:Xu(t)}),i=new Nd(a,null,t);if(i.d.isValid()===!0)return i}if(r=e.match("[<q>#FinancialQuarter] [<year>#Year?]"),r.found){let n=r.groups("q").text("reduced"),a=gt(n,t.timezone,{today:Xu(t)});if(r.groups("year")){let o=Number(r.groups("year").text())||t.today.year();a=a.year(o)}let i=new $m(a,null,t);if(i.d.isValid()===!0)return i}if(r=e.match("[<q>#Value] quarter (of|in)? [<year>#Year?]"),r.found){let n=r.groups("q").text("reduced"),a=gt(`q${n}`,t.timezone,{today:Xu(t)});if(r.groups("year")){let o=Number(r.groups("year").text())||t.today.year();a=a.year(o)}let i=new $m(a,null,t);if(i.d.isValid()===!0)return i}if(r=e.match("^#Year$"),r.found){let n=e.text("reduced"),a=gt(null,t.timezone,{today:Xu(t)});a=a.year(n);let i=new Bm(a,null,t);if(i.d.isValid()===!0)return i}return null},Q_=function(e,t){let r=t.today.year(),n=e.match("[<date>#Value] of? [<month>#Month] [<year>#Year]");if(n.found||(n=e.match("[<month>#Month] the? [<date>#Value] [<year>#Year]")),n.found){let o={month:n.groups("month").text("reduced"),date:n.groups("date").text("reduced"),year:n.groups("year").text()||r},s=new Wn(o,null,t);if(s.d.isValid()===!0)return s}if(n=e.match("[<month>#Month] of? [<year>#Year]"),n.found){let o={month:n.groups("month").text("reduced"),year:n.groups("year").text("reduced")||r},s=new ai(o,null,t);if(s.d.isValid()===!0)return s}if(n=e.match("[<month>#Month] [<date>#Value+]? of? the? [<rel>(this|next|last|current)] year"),n.found){let o=n.groups("rel").text("reduced"),s=r;o==="next"?s+=1:o==="last"&&(s-=1);let u={month:n.groups("month").text("reduced"),date:n.groups("date").numbers(0).get()[0],year:s};if(u.date===void 0){u.date=1;let c=new ai(u,null,t);if(c.d.isValid()===!0)return c}let l=new Wn(u,null,t);if(l.d.isValid()===!0)return l}if(n=e.match("^the? [<date>#Value+]? of? [<rel>(this|next|last|current)] month"),n.found){let o=t.today.month(),s=n.groups("rel").text("reduced");s==="next"?o+=1:s==="last"&&(o-=1);let u={month:o,date:n.groups("date").numbers(0).get()[0]},l=new Wn(u,null,t);if(l.d.isValid()===!0)return l}if(n=e.match("[<date>#Value] of? [<month>#Month]"),n.found||(n=e.match("[<month>#Month] the? [<date>#Value]")),n.found){let o={month:n.groups("month").text("reduced"),date:n.groups("date").text("reduced"),year:t.today.year()},s=new Wn(o,null,t);if(s.d.month()<t.today.month()&&(o.year+=1,s=new Wn(o,null,t)),s.d.isValid()===!0)return s}if(e.has("#Month")){let o={month:e.match("#Month").text("reduced"),date:1,year:t.today.year()},s=new ai(o,null,t);if(s.d.month()<t.today.month()&&(o.year+=1,s=new ai(o,null,t)),s.d.isValid()===!0)return s}if(n=e.match("#WeekDay [<date>#Value]"),n.found){let o={month:t.today.month(),date:n.groups("date").text("reduced"),year:t.today.year()},s=new Wn(o,null,t);if(s.d.isValid()===!0)return s}if(n=e.match("the [<date>#Value]"),n.found){let o={month:t.today.month(),date:n.groups("date").text("reduced"),year:t.today.year()},s=new Wn(o,null,t);if(s.d.isValid()===!0)return s.d.isBefore(t.today)&&(s.d=s.d.add(1,"month")),s}if(n=e.match("/[0-9]{4}-[0-9]{2}-[0-9]{2}t[0-9]{2}:/"),n.found){let o=e.text("reduced"),s=new ua(o,null,t);if(s.d.isValid()===!0)return s}let a=e.text("reduced");if(!a)return new ua(t.today,null,t);let i=new kn(a,null,t);return i.d.isValid()===!1?null:i},X_=function(e,t,r){let n=null;return n=n||w_(e,t,r),n=n||J_(e,t),n=n||Y_(e,t),n=n||Z_(e,t),n=n||Q_(e,t),n},e6={day:kn,week:Gs,weekend:nx,month:ai,quarter:$m,season:Nd,hour:Sl,minute:rx},t6=function(e,t={}){let r=e6[t.unit];if(!r)return e;let n=e.d;t.dir==="first"||t.num===0?(n=e.start().d,n=n.startOf(t.unit)):t.dir==="last"?(n=n.endOf(e.unit),t.unit==="weekend"?n=n.day("saturday",!1):n=n.startOf(t.unit)):t.num&&(t.unit==="weekend"&&(n=n.day("saturday",!0).add(1,"day")),n=n.add(t.num,t.unit));let a=new r(n,null,e.context);return a.d.isValid()===!0?a:e},r6=function(e,t,r){if(!e&&r.weekDay&&(e=new Om(r.weekDay,null,t),r.weekDay=null),!e)return null;if(r.shift){let n=r.shift;e.applyShift(n),n.hour||n.minute?e=new ua(e.d,null,e.context):(n.week||n.day||n.month)&&(e=new kn(e.d,null,e.context))}return r.weekDay&&e.unit!=="day"&&(e.applyWeekDay(r.weekDay),e=new Om(e.d,null,e.context)),r.rel&&e.applyRel(r.rel),r.section&&e.applySection(r.section),r.time&&e.applyTime(r.time),r.counter&&r.counter.unit&&(e=t6(e,r.counter)),e},n6=typeof process>"u"||!process.env?self.env||{}:process.env,a6=e=>{n6.DEBUG_DATE&&(console.log(`
20
+ ==== '${e.doc.text()}' =====`),Object.keys(e).forEach(t=>{t!=="doc"&&e[t]&&console.log(t,e[t])}),e.doc.debug())},At=function(e,t){let r=v_(e,t);if(e=r.doc,a6(r),r.tz){t=Object.assign({},t,{timezone:r.tz});let a=t.today.format("iso-short");t.today=t.today.goto(t.timezone).set(a)}let n=X_(e,t,r);return n=r6(n,t,r),n},Lg={mon:"monday",tue:"tuesday",tues:"wednesday",wed:"wednesday",thu:"thursday",fri:"friday",sat:"saturday",sun:"sunday",monday:"monday",tuesday:"tuesday",wednesday:"wednesday",thursday:"thursday",friday:"friday",saturday:"saturday",sunday:"sunday"},el=function(e){return e.match("(every|each)").found?"AND":e.match("(any|a)").found?"OR":null},i6=function(e,t){let r=e.match("[<logic>(every|any|each)] [<skip>other?] [<unit>#Duration] (starting|beginning|commencing)?");if(r.found){let n={interval:{}},a=r.groups("unit").text("reduced");return n.interval[a]=1,n.choose=el(r),r.groups("skip").found&&(n.interval[a]=2),e=e.remove(r),{repeat:n}}if(r=e.match("[<logic>(every|any|each)] [<num>#Value] [<unit>#Duration] (starting|beginning|commencing)?"),r.found){let n={interval:{}},a=r.groups("unit");a.nouns().toSingular();let i=a.text("reduced");return n.interval[i]=r.groups("num").numbers().get()[0],n.choose=el(r),e=e.remove(r),{repeat:n}}if(r=e.match("[<logic>(every|any|each|a)] [<skip>other?] [<day>#WeekDay+] (starting|beginning|commencing)?"),r.found){let n={interval:{day:1},filter:{weekDays:{}}},a=r.groups("day").text("reduced");if(a=Lg[a],a)return n.filter.weekDays[a]=!0,n.choose=el(r),e=e.remove(r),{repeat:n}}if(r=e.match("[<logic>(every|any|each|a)] [<day>(weekday|week day|weekend|weekend day)] (starting|beginning|commencing)?"),r.found){let n={interval:{day:1},filter:{weekDays:{}}},a=r.groups("day");return a.has("(weekday|week day)")?n.filter.weekDays={monday:!0,tuesday:!0,wednesday:!0,thursday:!0,friday:!0}:a.has("(weekend|weekend day)")&&(n.filter.weekDays={saturday:!0,sunday:!0}),n.choose=el(r),e=e.remove(r),{repeat:n}}if(r=e.match("[<day>(mondays|tuesdays|wednesdays|thursdays|fridays|saturdays|sundays)] (at|near|after)? [<time>#Time+?]"),r.found){let n={interval:{day:1},filter:{weekDays:{}}},a=r.groups("day").text("reduced");if(a=a.replace(/s$/,""),a=Lg[a],a){n.filter.weekDays[a]=!0,n.choose="OR",e=e.remove(r);let i=r.groups("time");return i.found&&(n.time=Dd(i,t)),{repeat:n}}}return null},$s=function(e){let t=e.start,r=e.end;if(t.d.isAfter(r.d)){if(t.isWeekDay&&r.isWeekDay)return e.end.next(),e;let n=t;e.start=r,e.end=n}return e},Sf=function(e){let t=e.start,r=e.end;return t.d.isAfter(r.d)&&r.d.hour()<10&&(r.d=r.d.ampm("pm")),e},o6=[{match:"[<from>#Time+] (to|until|upto|through|thru|and) [<to>#Time+ #Date+]",desc:"3pm to 4pm january 5th",parse:(e,t)=>{let r=e.groups("from"),n=e.groups("to"),a=At(n,t);if(a){let i=a.clone();if(i.applyTime(r.text("implicit")),i){let o={start:i,end:a,unit:"time"};return/(am|pm)/.test(n)===!1&&(o=Sf(o)),o=$s(o),o}}return null}},{match:"[<main>#Date+] from [<a>#Time] (to|until|upto|through|thru|and) [<b>#Time+]",desc:"january from 3pm to 4pm",parse:(e,t)=>{let r=e.groups("main"),n=e.groups("a"),a=e.groups("b");if(r=At(r,t),r){r.applyTime(n.text("implicit"));let i=r.clone();if(i.applyTime(a.text("implicit")),i){let o={start:r,end:i,unit:"time"};return/(am|pm)/.test(a.text())===!1&&(o=Sf(o)),o=$s(o),o}}return null}},{match:"[<from>#Date+] (to|until|upto|through|thru|and) [<to>#Time+]",desc:"january from 3pm to 4pm",parse:(e,t)=>{let r=e.groups("from"),n=e.groups("to");if(r=At(r,t),r){let a=r.clone();if(a.applyTime(n.text("implicit")),a){let i={start:r,end:a,unit:"time"};return/(am|pm)/.test(n.text())===!1&&(i=Sf(i)),i=$s(i),i}}return null}}],s6=[{match:"^during? #Month+ (or|and) #Month [<year>#Year]?",desc:"march or june",parse:(e,t)=>{let r=e.match("^during? [#Month]",0);e=e.not("(or|and)");let n=At(r,t);if(n){let a=[{start:n,end:n.clone().end(),unit:n.unit}],i=e.not(r);i.found&&i.match("#Month").forEach(s=>{let u=At(s,t);a.push({start:u,end:u.clone().end(),unit:u.unit})});let o=e.match("#Year$");return o.found&&(o=o.text("reduced"),a.forEach(s=>{s.start.d=s.start.d.year(o),s.end.d=s.end.d.year(o)})),a}return null}},{match:"^#Month #Value+ (or|and)? #Value$",desc:"jan 5 or 8",parse:(e,t)=>{e=e.not("(or|and)");let r=e.match("^#Month #Value"),n=At(r,t);if(n){let a=[{start:n,end:n.clone().end(),unit:n.unit}],i=e.not(r);return i.found&&i.match("#Value").forEach(o=>{let s=n.clone();s.d=s.d.date(o.text("reduced")),a.push({start:s,end:s.clone().end(),unit:s.unit})}),a}return null}},{match:"^#Month+ #Value #Value+$",desc:"jan 5 8",parse:(e,t)=>{let r=e.match("#Month"),n=e.match("#Year");e=e.not("#Year");let a=[];return e.match("#Value").forEach(i=>{i=i.clone();let o=i.prepend(r.text());n.found&&o.append(n);let s=At(o,t);s&&a.push({start:s,end:s.clone().end(),unit:s.unit})}),a}},{match:"^#Value+ (or|and)? #Value of #Month #Year?$",desc:"5 or 8 of Jan",parse:(e,t)=>{let r=e.match("#Month"),n=e.match("#Year");e=e.not("#Year");let a=[];return e.match("#Value").forEach(i=>{let o=i.append(r);n.found&&o.append(n);let s=At(o,t);s&&a.push({start:s,end:s.clone().end(),unit:s.unit})}),a}},{match:"^!(between|from|during)? [<from>#Date+] (and|or) [<to>#Date+]$",desc:"A or B",parse:(e,t)=>{let r=e.groups("from"),n=e.groups("to"),a=At(r,t),i=At(n,t);return a&&i?[{start:a,end:a.clone().end()},{start:i,end:i.clone().end()}]:null}}],u6=[{match:"between [<start>#Month] and [<end>#Month] [<year>#Year?]",desc:"between march and jan",parse:(e,t)=>{let{start:r,end:n,year:a}=e.groups(),i=a&&a.found?Number(a.text("reduced")):t.today.year(),o={month:r.text("reduced"),year:i},s=new ai(o,null,t).start();o={month:n.text("reduced"),year:i};let u=new ai(o,null,t).start();return s.d.isAfter(u.d)?{start:u,end:s}:{start:s,end:u}}},{match:"between [<start>.+] and [<end>.+]",desc:"between friday and sunday",parse:(e,t)=>{let r=e.groups("start");r=At(r,t);let n=e.groups("end");return n=At(n,t),r&&n?(n=n.before(),{start:r,end:n}):null}},{match:"[<from>#Month #Value] (to|through|thru) [<to>#Month #Value] [<year>#Year?]",desc:"june 5 to june 7",parse:(e,t)=>{let r=e.groups(),n=r.from;if(r.year&&(n=n.append(r.year)),n=At(n,t),n){let a=r.to;if(r.year&&(a=a.append(r.year)),a=At(a,t),a)return n.d.isAfter(a.d)&&(a.d=a.d.add(1,"year")),{start:n,end:a.end()}}return null}},{match:"[<month>#Month] [<from>#Value] (to|through|thru) [<to>#Value] of? [<year>#Year]",desc:"january 5 to 7 1998",parse:(e,t)=>{let{month:r,from:n,to:a,year:i}=e.groups(),o=i.clone(),s=n.prepend(r).append(i);if(s=At(s,t),s){let u=a.prepend(r).append(o);return u=At(u,t),{start:s,end:u.end()}}return null}},{match:"[<from>#Value] (to|through|thru) [<to>#Value of? #Month #Date+?]",desc:"5 to 7 of january 1998",parse:(e,t)=>{let r=e.groups("to");if(r=At(r,t),r){let n=e.groups("from"),a=r.clone();return a.d=a.d.date(n.text("implicit")),{start:a,end:r.end()}}return null}},{match:"[<from>#Month #Value] (to|through|thru) [<to>#Value]",desc:"january 5 to 7",parse:(e,t)=>{let r=e.groups("from");if(r=At(r,t),r){let n=e.groups("to"),a=r.clone();return a.d=a.d.date(n.text("implicit")),{start:r,end:a.end()}}return null}},{match:"from? [<from>#Month] (to|until|upto|through|thru) [<to>#Month] [<year>#Year]",desc:"january to may 2020",parse:(e,t)=>{let r=e.groups("from"),n=e.groups("year").numbers().get()[0],a=e.groups("to");if(r=At(r,t),a=At(a,t),r.d=r.d.year(n),a.d=a.d.year(n),r&&a){let i={start:r,end:a.end()};return i=$s(i),i}return null}},{match:"^in [<min>#Value] to [<max>#Value] [<unit>(days|weeks|months|years)]",desc:"in 2 to 4 weeks",parse:(e,t)=>{const{min:r,max:n,unit:a}=e.groups();let i=new Wn(t.today,null,t),o=i.clone();const s=a.text("implicit");return i=i.applyShift({[s]:r.numbers().get()[0]}),o=o.applyShift({[s]:n.numbers().get()[0]}),{start:i,end:o.end()}}},{match:"[<min>#Value] to [<max>#Value] [<unit>(days|weeks|months|years)] (ago|before|earlier|prior)",desc:"2 to 4 weeks ago",parse:(e,t)=>{const{min:r,max:n,unit:a}=e.groups();let i=new Wn(t.today,null,t),o=i.clone();const s=a.text("implicit");return i=i.applyShift({[s]:-n.numbers().get()[0]}),o=o.applyShift({[s]:-r.numbers().get()[0]}),{start:i,end:o.end()}}},{match:"^until [<to>#Date+]",desc:"until christmas",parse:(e,t)=>{let r=e.groups("to");return r=At(r,t),r?{start:new Wn(t.today,null,t),end:r.start()}:null}},{match:"[<part>(1st|initial|2nd|latter)] half of [<month>#Month] [<year>#Year?]",desc:"second half of march",parse:(e,t)=>{const{part:r,month:n,year:a}=e.groups();let i={month:n.text("reduced"),date:1,year:a&&a.found?a.text("reduced"):t.today.year()},o=new ai(i,null,t);return r.has("(1st|initial)")?{start:o.start(),end:o.clone().middle()}:{start:o.middle(),end:o.clone().end()}}}],l6=function(e,t){return e=e.applyShift(t.punt),e},c6=[{match:"from? [<from>.+] (to|until|upto|through|thru) [<to>.+]",desc:"from A to B",parse:(e,t)=>{let r=e.groups("from"),n=e.groups("to");if(r=At(r,t),n=At(n,t),r&&n){let a={start:r,end:n.end()};return a=$s(a),a}return null}},{match:"^due? (by|before) [.+]",desc:"before june",parse:(e,t)=>{e=e.group(0);let r=At(e,t);if(r){let n=new yn(t.today,null,t);n.d.isAfter(r.d)&&(n=r.clone().applyShift({weeks:-2}));let a=r.clone().applyShift({day:-1});return{start:n,end:a.end()}}return null}},{match:"^(on|in|at|@|during) [.+]",desc:"in june",parse:(e,t)=>{e=e.group(0);let r=At(e,t);return r?{start:r,end:r.clone().end(),unit:r.unit}:null}},{match:"^(after|following) [.+]",desc:"after june",parse:(e,t)=>{e=e.group(0);let r=At(e,t);return r?(r=r.after(),{start:r.clone(),end:l6(r.clone(),t)}):null}},{match:"^(middle|center|midpoint) of [.+]",desc:"middle of",parse:(e,t)=>{e=e.group(0);let r=At(e,t),n=r.clone().middle(),a=r.beforeEnd();return r?{start:n,end:a}:null}},{match:".+ after #Time+$",desc:"tuesday after 5pm",parse:(e,t)=>{let r=At(e,t);if(r){let n=r.clone(),a=r.end();return{start:n,end:a,unit:"time"}}return null}},{match:".+ before #Time+$",desc:"tuesday before noon",parse:(e,t)=>{let r=At(e,t);if(r){let n=r.clone(),a=r.start();if(r)return{start:a,end:n,unit:"time"}}return null}}],Hg=[].concat(o6,s6,u6,c6),f6=typeof process>"u"||!process.env?self.env||{}:process.env,m6=e=>{f6.DEBUG_DATE&&console.log(`
21
+ \x1B[32m ${e} \x1B[0m`)},d6=function(e){return Object.prototype.toString.call(e)==="[object Array]"},h6=function(e,t){let r={start:null,end:null};if(!e.found)return r;let n=At(e,t);if(n){let a=n.clone().end();r={start:n,end:a,unit:n.setTime?"time":n.unit}}return r},p6=function(e,t){for(let r=0;r<Hg.length;r+=1){let n=Hg[r],a=e.match(n.match);if(a.found){m6(` ---[${n.desc}]---`);let i=n.parse(a,t);if(i!==null)return d6(i)||(i=[i]),i}}return null},g6=function(e,t){let r=i6(e,t)||{},n=p6(e,t);return n||(n=[h6(e,t)]),n=n.map(a=>Object.assign({},r,a)),n.forEach(a=>{a.start&&a.end&&a.start.d.epoch>a.end.d.epoch&&(a.start=a.start.start())}),n},v6=function(e){return e.numbers||console.warn(`
22
+ Compromise warning: compromise/three must be used with compromise-dates plugin
23
+ `),e=e.clone(),e.numbers().toNumber(),e.contractions().expand(),e.replace("week end","weekend",!0).tag("Date"),e.replace("up to","upto",!0).tag("Date"),e.has("once (a|an) #Duration")===!1&&e.match("[(a|an)] #Duration",0).replaceWith("1",{tags:!0}).compute("lexicon"),e.match("@hasDash").insertAfter("to").tag("Date"),e},Ii=function(e,t){return t=t||{},t.timezone===!1&&(t.timezone="UTC"),t.today=t.today||gt.now(t.timezone),t.today=gt(t.today,t.timezone),e=v6(e),g6(e,t)},y6=function(e){let r=e.end.d.add(1,"millisecond").since(e.start.d).diff;return delete r.milliseconds,delete r.seconds,r},Gg=function(e){if(!e.start)return{start:null,end:null,timezone:null,duration:{}};let t=e.end?y6(e):{};return{start:e.start.format("iso"),end:e.end?e.end.format("iso"):null,timezone:e.start.d.format("timezone"),duration:t}},Mf=function(e,t){let r=e.fromText(t),n=Ii(r,e.opts)[0];return!n||!n.start||!n.start.d?null:n.start.d},b6=function(e){class t extends e{constructor(n,a,i,o={}){super(n,a,i),this.viewType="Dates",this.opts=Object.assign({},o)}get(n){let a=[];return this.forEach(i=>{Ii(i,this.opts).forEach(o=>{let s=Gg(o);s.start&&a.push(s)})}),typeof n=="number"?a[n]:a}json(n={}){return this.map(a=>{let i=a.toView().json(n)[0]||{};if(n&&n.dates!==!1){let o=Ii(a,this.opts);o.length>0&&(i.dates=Gg(o[0]))}return i},[])}format(n){let i=this.map(o=>{let s=Ii(o,this.opts)[0]||{};if(s.start){let u=s.start.d,l=u.format(n);if(s.end){let c=s.end.d;u.isSame(c,"day")===!1&&(l+=" to "+c.format(n))}o.replaceWith(l)}return o});return new t(this.document,i.pointer,null,this.opts)}isBefore(n){let a=Mf(this,n);return this.filter(i=>{let o=Ii(i,this.opts)[0]||{};return o.start&&o.start.d&&o.start.d.isBefore(a)})}isAfter(n){let a=Mf(this,n);return this.filter(i=>{let o=Ii(i,this.opts)[0]||{};return o.start&&o.start.d&&o.start.d.isAfter(a)})}isSame(n,a){let i=Mf(this,a);return this.filter(o=>{let s=Ii(o,this.opts)[0]||{};return s.start&&s.start.d&&s.start.d.isSame(i,n)})}}e.prototype.dates=function(r){let n=d$(this);return new t(this.document,n.pointer,null,r)}},w6=function(e){e=e.clone();let t=e.match("#Time+").match("[<hour>#Cardinal] [<min>(thirty|fifteen)]");if(t.found){let r=t.groups("hour"),n=t.groups("min"),a=r.values().get()[0];if(a>0&&a<=12){let i=n.values().get()[0],o=`${a}:${i}`;t.replaceWith(o)}}if(!e.numbers)console.warn(`Warning: compromise .numbers() not loaded.
24
+ This plugin requires >= v14`);else{let r=e.numbers();r.toNumber(),r.toCardinal(!1)}return e.contractions&&e.contractions().expand(),e.adverbs().remove(),e.replace("week end","weekend",!0).tag("Date"),e.replace("up to","upto",!0).tag("Date"),e.has("once (a|an) #Duration")===!1&&e.match("[(a|an)] #Duration",0).replaceWith("1").compute("lexicon"),e.match("@hasDash").insertAfter("to").tag("Date"),e},x6=function(e){return e.match("#Time+ (am|pm)?")},Tf=function(e,t={}){e=w6(e);let r=Dd(e,t);if(!r.result)return{time:null,"24h":null};let n=gt.now().time(r.result);return{time:r.result,"24h":n.format("time-24"),hour:n.hour(),minute:n.minute()}},Vg=(e,t)=>typeof t=="number"?e.eq(t):e,D6=function(e){class t extends e{constructor(n,a,i,o){super(n,a,i),this.viewType="Times",this.opts=o||{}}format(n){let i=this.map(o=>{let s=Tf(o)||{};if(s.time){let u=gt.now().time(s.time),l=s.time;n==="24h"?l=u.format("time-24"):l=u.format(n),o=o.not("#Preposition"),o.replaceWith(l)}return o});return new t(this.document,i.pointer,null,this.opts)}get(n){return Vg(this,n).map(Tf)}json(n={}){return this.map(a=>{let i=a.toView().json(n)[0]||{};return n&&n.time!==!1&&(i.time=Tf(a)),i},[])}}e.prototype.times=function(r){let n=x6(this);return n=Vg(n,r),new t(this.document,n.pointer)}},Ug={century:!0,day:!0,decade:!0,hour:!0,millisecond:!0,minute:!0,month:!0,second:!0,weekend:!0,week:!0,year:!0,quarter:!0,season:!0};let Vi={m:"minute",h:"hour",hr:"hour",min:"minute",sec:"second","week end":"weekend",wk:"week",yr:"year",qtr:"quarter"};Object.keys(Vi).forEach(e=>{Vi[e+"s"]=Vi[e]});const Wg=function(e){let t={},r=e.match("#Value+ #Duration");if(r.found)r.forEach(n=>{let a=n.numbers().get()[0],i=n.terms().last().text("reduced");i=i.replace(/ies$/,"y"),i=i.replace(/s$/,""),Vi.hasOwnProperty(i)&&(i=Vi[i]),Ug.hasOwnProperty(i)&&a!==null&&(t[i]=a)});else if(e.match("(#Duration && /[0-9][a-z]+$/)").found){let a=e.text(),i=a.match(/([0-9]+)/),o=a.match(/([a-z]+)/);i&&o&&(i=i[0]||null,o=o[0]||null,Vi.hasOwnProperty(o)&&(o=Vi[o]),Ug.hasOwnProperty(o)&&i!==null&&(t[o]=Number(i)))}return t},N6=function(e){class t extends e{constructor(n,a,i){super(n,a,i),this.context={}}json(n={}){return this.map(a=>{let i=a.toView().json(n)[0]||{};return n&&n.duration!==!1&&(i.duration=Wg(a)),i},[])}get(n){let a=[];return this.forEach(i=>{let o=Wg(i);a.push(o)}),typeof n=="number"?a[n]:a}}e.prototype.durations=function(r){let n=this.match("#Value+ #Duration (and? #Value+ #Duration)?");return n=n.notIf("#DateShift"),typeof r=="number"&&(n=n.eq(r)),new t(this.document,n.pointer)}},A6=function(e){b6(e),D6(e),N6(e)},Jg="(start|end|middle|starting|ending|midpoint|beginning)",Na=(e,t)=>{e.found===!0&&e.forEach(r=>{let n=r.text("reduced"),a=parseInt(n,10);a&&a>1e3&&a<3e3&&r.tag("Year",t)})},tl=(e,t)=>{e.found===!0&&e.forEach(r=>{let n=r.text("reduced"),a=parseInt(n,10);a&&a>1900&&a<2030&&r.tag("Year",t)})},C6=function(e){e.match("(march|april|may) (and|to|or|through|until)? (march|april|may)").tag("Date").match("(march|april|may)").tag("Month","march|april|may");let t=e.if("#Cardinal");if(t.found===!0){let n=t.match("#Date #Value [#Cardinal]",0);Na(n,"date-value-year"),n=t.match("#Date [#Cardinal]",0),tl(n,"date-year"),n=t.match(`${Jg} of [#Cardinal]`),tl(n,"section-year"),n=t.match("#Month #Value [#Cardinal]",0),Na(n,"month-value-year"),n=t.match("#Month #Value to #Value [#Cardinal]",0),Na(n,"month-range-year"),n=t.match("(in|of|by|during|before|starting|ending|for|year|since) [#Cardinal]",0),Na(n,"in-year-1"),n=t.match("(q1|q2|q3|q4) [#Cardinal]",0),Na(n,"in-year-2"),n=t.match("#Ordinal quarter of? [#Cardinal]",0),Na(n,"in-year-3"),n=t.match("the year [#Cardinal]",0),Na(n,"in-year-4"),n=t.match("it (is|was) [#Cardinal]",0),tl(n,"in-year-5"),t.match(`${Jg} of #Year`).tag("Date");let a=t.match("between [#Cardinal] and [#Cardinal]");Na(a.groups("0"),"between-year-and-year-1"),Na(a.groups("1"),"between-year-and-year-2")}let r=e.match("^/^20[012][0-9]$/$");return tl(r,"2020-ish"),e},Nn=function(e,t){e.found&&(e.tag("Date",t),e.numbers().lessThan(31).ifNo("#Year").tag("#Time",t))},E6=function(e){let t=e.if("#Date");if(t.found){let r=t.if("#NumberRange");if(r.found){let a=r.match("[#NumberRange+] (on|by|at)? #WeekDay",0);Nn(a,"3-4-tuesday"),a=r.match("[#NumberRange+] (on|by|at)? #Month #Value",0),Nn(a,"3-4 mar 3"),a=r.match("[#NumberRange] to (#NumberRange && #Time)",0),Nn(a,"3-4pm"),a=r.match("(#NumberRange && #Time) to [#NumberRange]",0),Nn(a,"3pm-4")}let n=t.match("(from|between) #Cardinal and #Cardinal (in|on)? (#WeekDay|tomorrow|yesterday)");Nn(n,"from 9-5 tues"),n=e.match("#Cardinal to #Cardinal (#WeekDay|tomorrow|yesterday)"),Nn(n,"9-5 tues"),n=t.match("(from|between) [#NumericValue] (to|and) #Time",0).tag("Time","4-to-5pm"),Nn(n,"from 9-5pm"),n=t.match("(#WeekDay|tomorrow|yesterday) (from|between)? (#Cardinal|#Time) (and|to) (#Cardinal|#Time)"),Nn(n,"tues 3-5"),n=t.match("#Month #Value+ (from|between) [<time>(#Cardinal|#Time) (and|to) (#Cardinal|#Time)]").group("time"),Nn(n,"sep 4 from 9-5"),n=t.match("#Time to #Cardinal on? #Date"),Nn(n,"3pm-4 wed"),n=t.match("#Cardinal to #Time on? #Date"),Nn(n,"3-4pm wed"),n=t.match("#Cardinal to #Cardinal on? (#WeekDay|#Month #Value)"),Nn(n,"3-4 wed")}return e},S6=["act","aft","akst","anat","art","azot","azt","bnt","bot","bt","cast","cat","cct","chast","chut","ckt","cvt","cxt","davt","eat","ect","fjt","fkst","fnt","gamt","get","gft","gilt","gyt","hast","hncu","hneg","hnnomx","hnog","hnpm","hnpmx","hntn","hovt","iot","irkt","jst","kgt","kost","lint","magt","mart","mawt","mmt","nct","nft","novt","npt","nrt","nut","nzst","omst","pet","pett","phot","phst","pont","pwt","ret","sakt","samt","sbt","sct","sret","srt","syot","taht","tft","tjt","tkt","tlt","tmt","tot","tvt","ulat","vut","wakt","wat","wet","wft","wit","wst","yekt"].reduce((e,t)=>(e[t]=!0,e),{}),M6=function(e){let t=e.match("#Time [#Acronym]",0);if(t.found){let r=t.text("reduced");S6[r]===!0&&t.tag("Timezone","tz-abbr")}},T6="fix-tagger",F6=function(e){if(e.has("#Date")){let t=e.match("#Date+ by #Date+");t.found&&!t.has("^due")&&t.match("^#Date+").unTag("Date","by-monday");let r=e.match("#Date+");r.has("^between")&&!r.has("and .")&&r.unTag("Date",T6),r.has("(minutes|seconds|weeks|hours|days|months)")&&!r.has("#Value #Duration")&&r.match("(minutes|seconds|weeks|hours|days|months)").unTag("Date","log-hours"),r.has("about #Holiday")&&r.match("about").unTag("#Date","about-thanksgiving"),r.match("#Date+").match("^the").unTag("Date")}return e},Ff="(in|by|before|during|on|until|after|of|within|all)",Kg="(last|next|this|previous|current|upcoming|coming)",Pf="(start|end|middle|starting|ending|midpoint|beginning|mid)",kf="(spring|summer|winter|fall|autumn)",Yg="(yesterday|today|tomorrow)";let P6=[{match:"in the (night|evening|morning|afternoon|day|daytime)",tag:"Time",reason:"in-the-night"},{match:"(#Value|#Time) (am|pm)",tag:"Time",reason:"value-ampm"},{match:"(tue|thu)",tag:"WeekDay",reason:"misc-weekday"},{match:"#Month #Date+",tag:"Date",reason:"correction-numberRange"},{match:"#Value of #Month",tag:"Date",unTag:"Time",reason:"value-of-month"},{match:"#Cardinal #Month",tag:"Date",reason:"cardinal-month"},{match:"#Month #Value (and|or|to)? #Value+",tag:"Date",reason:"value-to-value"},{match:"#Month the #Value",tag:"Date",reason:"month-the-value"},{match:"[(march|may)] to? #Date",group:0,tag:"Month",reason:"march-to"},{match:"^(march|may)$",tag:"Month",reason:"single-march"},{match:"#Month or #Month",tag:"Date",reason:"month-or-month"},{match:"(#WeekDay|#Month) #Value",ifNo:"#Money",tag:"Date",reason:"date-value"},{match:"#Value (#WeekDay|#Month)",ifNo:"#Money",tag:"Date",reason:"value-date"},{match:"#Value (#WeekDay|#Duration) back",tag:"#Date",reason:"3-back"},{match:"for #Value #Duration",tag:"Date",reason:"for-x-duration"},{match:"#Value #Duration (before|ago|hence|back)",tag:"Date",reason:"val-duration-past"},{match:`${Ff}? #Value #Duration`,tag:"Date",reason:"value-duration"},{match:"in? #Value to #Value #Duration time?",tag:"Date",reason:"6-to-8-years"},{match:"#Value #Duration old",unTag:"Date",reason:"val-years-old"},{match:`${Ff}? ${Kg} ${kf}`,tag:"Date",reason:"thisNext-season"},{match:`the? ${Pf} of ${kf}`,tag:"Date",reason:"section-season"},{match:`${kf} ${Ff}? #Cardinal`,tag:"Date",reason:"season-year"},{match:"#Date the? #Ordinal",tag:"Date",reason:"correction"},{match:`${Kg} #Date`,tag:"Date",reason:"thisNext-date"},{match:"due? (by|before|after|until) #Date",tag:"Date",reason:"by"},{match:"(last|next|this|previous|current|upcoming|coming|the) #Date",tag:"Date",reason:"next-feb"},{match:`#Preposition? the? ${Pf} of #Date`,tag:"Date",reason:"section-of"},{match:"#Ordinal #Duration in #Date",tag:"Date",reason:"duration-in"},{match:"(early|late) (at|in)? the? #Date",tag:"Time",reason:"early-evening"},{match:"#Date [(by|before|after|at|@|about) #Cardinal]",group:0,tag:"Time",reason:"date-before-Cardinal"},{match:"#Date (#Preposition|to) #Date",ifNo:"#Duration",tag:"Date",reason:"date-prep-date"},{match:"(by|before|after|at|@|about) #Time",tag:"Time",reason:"preposition-time"},{match:"(in|after) /^[0-9]+(min|sec|wk)s?/",tag:"Date",reason:"shift-units"},{match:"#Date [(now|night|sometime)]",group:0,tag:"Time",reason:"date-now"},{match:"(from|starting|until|by) now",tag:"Date",reason:"for-now"},{match:"(each|every) night",tag:"Date",reason:"for-now"},{match:"#Date [(am|pm)]",group:0,tag:"Time",reason:"date-am"},{match:`[${Pf}] #Date`,group:0,tag:"Date",reason:"mid-sept"},{match:"#Month #Value to #Value of? #Year?",tag:"Date",reason:"june 5 to 7th"},{match:"#Value to #Value of? #Month #Year?",tag:"Date",reason:"5 to 7th june"},{match:"#Value #Duration of #Date",tag:"Date",reason:"third week of may"},{match:"#Value+ #Duration (after|before|into|later|afterwards|ago)?",tag:"Date",reason:"two days after"},{match:"#Value #Date",tag:"Date",reason:"two days"},{match:"#Date #Value",tag:"Date",reason:"june 5th"},{match:"#Date #Preposition #Value",tag:"Date",reason:"tuesday at 5"},{match:"#Date (after|before|during|on|in) #Value",tag:"Date",reason:"tomorrow before 3"},{match:"#Value (year|month|week|day) and a half",tag:"Date",reason:"a year and a half"},{match:"#Value and a half (years|months|weeks|days)",tag:"Date",reason:"5 and a half years"},{match:"on the #Ordinal",tag:"Date",reason:"on the fifth"},{match:"#Month #Value+ (and|or) #Value",tag:"Date",reason:"date-or-date"},{match:"#Value+ (and|or) #Value of #Month ",tag:"Date",reason:"date-and-date"},{match:"(spring|summer|winter|fall|autumn|springtime|wintertime|summertime)",tag:"Season",reason:"date-tag1"},{match:"(q1|q2|q3|q4)",tag:"FinancialQuarter",reason:"date-tag2"},{match:"(this|next|last|current) quarter",tag:"FinancialQuarter",reason:"date-tag3"},{match:"(this|next|last|current) season",tag:"Season",reason:"date-tag4"},{match:"#Date #Preposition #Date",tag:"Date",reason:"friday to sunday"},{match:"(once|twice) (a|an|each) #Date",tag:"Date",reason:"once a day"},{match:"a #Duration",tag:"Date",reason:"a year"},{match:"(between|from) #Date",tag:"Date",reason:"between x and y"},{match:"(to|until|upto) #Date",tag:"Date",reason:"between x and y2"},{match:"between #Date+ and #Date+",tag:"Date",reason:"between x and y3"},{match:"#Month and #Month #Year",tag:"Date",reason:"x and y4"},{match:"the? #Date after next one?",tag:"Date",reason:"day after next"},{match:"(about|approx|approximately|around) #Date",tag:"Date",reason:"approximately june"},{match:"(by|until|on|in|at|during|over|every|each|due) the? #Date",ifNo:"#PhrasalVerb",tag:"Date",reason:"until june"},{match:"(by|until|after|before|during|on|in|following|since) (next|this|last)? #Date",ifNo:"#PhrasalVerb",tag:"Date",reason:"until last june"},{match:"this? (last|next|past|this|previous|current|upcoming|coming|the) #Date",tag:"Date",reason:"next september"},{match:"(starting|beginning|ending) #Date",tag:"Date",reason:"starting this june"},{match:"the? (start|end|middle|beginning) of (last|next|this|the) #Date",tag:"Date",reason:"start of june"},{match:"(the|this) #Date",tag:"Date",reason:"this coming june"},{match:"#Date up to #Date",tag:"Date",reason:"january up to june"},{match:"#Cardinal oclock",tag:"Time",reason:"2 oclock"},{match:"#Value (in|at) the? (morning|evening|night|nighttime)",tag:"Time",reason:"3 in the morning"},{match:"(5|10|15|20|five|ten|fifteen|quarter|twenty|half) (after|past) #Cardinal",tag:"Time",reason:"ten to seven"},{match:"(at|by|before) (5|10|15|20|five|ten|fifteen|twenty|quarter|half) (after|past|to)",tag:"Time",reason:"at-20-past"},{match:"#Date [at #Cardinal]",group:0,ifNo:"#Year",tag:"Time",reason:" tuesday at 4"},{match:"half an (hour|minute|second)",tag:"Date",reason:"half an hour"},{match:"(in|for|by|near|at) #Timezone",tag:"Date",reason:"in eastern time"},{match:"#Time to #Time",tag:"Date",reason:"3pm to 4pm"},{match:"#Time [(sharp|on the dot)]",group:0,tag:"Time",reason:"4pm sharp"},{match:"(at|around|near|#Date) [#Cardinal (thirty|fifteen) (am|pm)?]",group:0,tag:"Time",reason:"around four thirty"},{match:"#Cardinal (thirty|fifteen) (am|pm)",tag:"Time",reason:"four thirty am"},{match:"[#Cardinal (thirty|fifteen)] #Date",group:0,tag:"Time",reason:"four thirty tomorrow"},{match:"(anytime|sometime) (before|after|near) [#Cardinal]",group:0,tag:"Time",reason:"antime-after-3"},{match:"(#Cardinal|a|an) #Duration (before|after|ago|from|hence|back)",tag:"DateShift",reason:"nine weeks frow now"},{match:"in (around|about|maybe|perhaps)? #Cardinal #Duration",tag:"DateShift",reason:"in two weeks"},{match:"in (a|an) #Duration",tag:"DateShift",reason:"in a week"},{match:"[(a|an) #Duration from] #Date",group:0,tag:"DateShift",reason:"an hour from now"},{match:"(a|an) #Duration ago",tag:"DateShift",reason:"a month ago"},{match:"in half (a|an) #Duration",tag:"DateShift",reason:"in half an hour"},{match:"in a (few|couple) of? #Duration",tag:"DateShift",reason:"in a few weeks"},{match:"[#Duration (after|before)] #Date",group:0,tag:"DateShift",reason:"day after tomorrow"},{match:"#Month #Ordinal and #Ordinal",tag:"Date",reason:"ord-and-ord"},{match:"every other #Duration",tag:"Date",reason:"every-other"},{match:"(every|any|each|a) (day|weekday|week day|weekend|weekend day)",tag:"Date",reason:"any-weekday"},{match:"(every|any|each|a) (#WeekDay)",tag:"Date",reason:"any-wednesday"},{match:"(every|any|each|a) (#Duration)",tag:"Date",reason:"any-week"},{match:"[(wed|sat)] (#Month|#Year|on|between|during|from)",group:0,tag:"WeekDay",reason:"wed"},{match:"^day$",unTag:"Date",reason:"spa-day"},{match:"(in|of|by|for)? (#Possessive && #Date)",unTag:"Date",reason:"tomorrows meeting"},{match:`${Yg} [#Value]$`,unTag:"Date",group:0,reason:"yesterday-7"},{match:`^[#Value] ${Yg}$`,group:0,unTag:"Date",reason:"7 yesterday"},{match:"on #Cardinal$",unTag:"Date",reason:"on 5"},{match:"[this] tomorrow",group:0,unTag:"Date",reason:"this-tomorrow"},{match:"(q1|q2|q3|q4) #Year",tag:"Date",reason:"q2 2016"},{match:"^[#Value] (this|next|last)",group:0,unTag:"Date",reason:"4 next"},{match:"(last|this|next) #Duration [#Value]",group:0,unTag:"Date",reason:"this month 7"},{match:"[!#Month] #Value (last|this|next) #Date",group:0,unTag:"Date",reason:"7 this month"},{match:"(in|over) the #Duration #Date+?",unTag:"Date",reason:"over-the-duration"},{match:"#Ordinal quarter of? #Year",unTag:"Fraction"},{match:"(from|by|before) now",unTag:"Time",tag:"Date"},{match:"#Value of? (this|next|last) #Date",tag:"Date"},{match:"(first|initial|second|latter) half of #Month",tag:"Date"}],Of=null;const Zg=function(e){let{world:t}=e;Of=Of||t.methods.one.buildNet(P6,t),e.sweep(Of)},k6=function(e){return e.cache(),Zg(e),Zg(e),C6(e),E6(e),M6(e),F6(e),e.uncache(),e.match("#Cardinal #Duration and? #DateShift").tag("DateShift","three days before"),e.match("#DateShift and #Cardinal #Duration").tag("DateShift","three days and two weeks"),e.match("#Time [(sharp|on the dot)]").tag("Time","4pm sharp"),e},O6={dates:k6},$6={FinancialQuarter:{is:"Date",not:["Fraction"]},Season:{is:"Date"},Year:{is:"Date",not:["RomanNumeral"]},Holiday:{is:"Date",also:"Noun"},DateShift:{is:"Date",not:["Timezone","Holiday"]}},Be="America/",pt="Asia/",Yt="Europe/",An="Africa/",yr="Australia/",sa="Pacific/",B6={"british summer time":Yt+"London",bst:Yt+"London","british time":Yt+"London","britain time":Yt+"London","irish summer time":Yt+"Dublin","irish time":Yt+"Dublin","central european time":Yt+"Berlin",cet:Yt+"Berlin","central european summer time":Yt+"Berlin",cest:Yt+"Berlin","central europe":Yt+"Berlin","eastern european time":Yt+"Riga",eet:Yt+"Riga","eastern european summer time":Yt+"Riga",eest:Yt+"Riga","eastern europe time":Yt+"Riga","western european time":Yt+"Lisbon","western european summer time":Yt+"Lisbon","turkey standard time":Yt+"Istanbul","turkish time":Yt+"Istanbul",utc:An+"Freetown","greenwich standard time":An+"Freetown",gmt:An+"Freetown","east africa time":An+"Nairobi","east african time":An+"Nairobi","eastern africa time":An+"Nairobi","central africa time":An+"Khartoum","central african time":An+"Khartoum","south africa standard time":An+"Johannesburg","west africa standard time":An+"Lagos","western africa time":An+"Lagos","west african time":An+"Lagos","australian central standard time":yr+"Adelaide",acst:yr+"Adelaide","australian central daylight time":yr+"Adelaide",acdt:yr+"Adelaide","australian eastern standard time":yr+"Brisbane",aest:yr+"Brisbane","australian eastern daylight time":yr+"Brisbane",aedt:yr+"Brisbane","australian western standard time":yr+"Perth",awst:yr+"Perth","australian western daylight time":yr+"Perth",awdt:yr+"Perth","australian central western standard time":yr+"Eucla",acwst:yr+"Eucla","lord howe standard time":yr+"Lord_Howe",lhst:yr+"Lord_Howe","lord howe daylight time":yr+"Lord_Howe",lhdt:yr+"Lord_Howe","russian standard time":Yt+"Moscow",msk:Yt+"Moscow","central standard time":Be+"Chicago","central time":Be+"Chicago",cst:Be+"Havana","central daylight time":Be+"Chicago",cdt:Be+"Havana","mountain standard time":Be+"Denver","mountain time":Be+"Denver",mst:Be+"Denver","mountain daylight time":Be+"Denver",mdt:Be+"Denver","atlantic standard time":Be+"Halifax","atlantic time":Be+"Halifax",ast:pt+"Baghdad","atlantic daylight time":Be+"Halifax",adt:Be+"Halifax","eastern standard time":Be+"New_York","eastern time":Be+"New_York",est:Be+"New_York","eastern daylight time":Be+"New_York",edt:Be+"New_York","pacific time":Be+"Los_Angeles","pacific standard time":Be+"Los_Angeles",pst:Be+"Los_Angeles","pacific daylight time":Be+"Los_Angeles",pdt:Be+"Los_Angeles","alaskan standard time":Be+"Anchorage","alaskan time":Be+"Anchorage",ahst:Be+"Anchorage","alaskan daylight time":Be+"Anchorage",ahdt:Be+"Anchorage","hawaiian standard time":sa+"Honolulu","hawaiian time":sa+"Honolulu",hst:sa+"Honolulu","aleutian time":sa+"Honolulu","hawaii time":sa+"Honolulu","newfoundland standard time":Be+"St_Johns","newfoundland time":Be+"St_Johns","newfoundland daylight time":Be+"St_Johns","brazil time":Be+"Sao_Paulo","brazilian time":Be+"Sao_Paulo","argentina time":Be+"Buenos_Aires","argentinian time":Be+"Buenos_Aires","amazon time":Be+"Manaus","amazonian time":Be+"Manaus","easter island standard time":"Chile/Easterisland","easter island summer time":"Chile/Easterisland",easst:"Chile/Easterisland","venezuelan standard time":Be+"Caracas","venezuelan time":Be+"Caracas","venezuela time":Be+"Caracas","paraguay time":Be+"Asuncion","paraguay summer time":Be+"Asuncion","cuba standard time":Be+"Havana","cuba time":Be+"Havana","cuba daylight time":Be+"Havana","cuban time":Be+"Havana","bolivia time":Be+"La_Paz","bolivian time":Be+"La_Paz","colombia time":Be+"Bogota","colombian time":Be+"Bogota","acre time":Be+"Eirunepe","peru time":Be+"Lima","chile standard time":Be+"Punta_Arenas","chile time":Be+"Punta_Arenas",clst:Be+"Punta_Arenas","chile summer time":Be+"Punta_Arenas",cldt:Be+"Punta_Arenas","uruguay time":Be+"Montevideo",uyt:Be+"Montevideo","arabic standard time":pt+"Baghdad","iran standard time":pt+"Tehran","iran time":pt+"Tehran","iran daylight time":pt+"Tehran","pakistan standard time":pt+"Karachi","pakistan time":pt+"Karachi","india standard time":pt+"Kolkata","indian time":pt+"Kolkata","indochina time":pt+"Bangkok","china standard time":pt+"Shanghai","alma-ata time":pt+"Almaty","oral time":pt+"Oral","orat time":pt+"Oral","yakutsk time":pt+"Yakutsk",yakt:pt+"Yakutsk","gulf standard time":pt+"Dubai","gulf time":pt+"Dubai","hong kong time":pt+"Hong_Kong","western indonesian time":pt+"Jakarta","indonesia time":pt+"Jakarta","central indonesian time":pt+"Makassar","israel daylight time":pt+"Jerusalem","israel standard time":pt+"Jerusalem","israel time":pt+"Jerusalem","krasnoyarsk time":pt+"Krasnoyarsk","malaysia time":pt+"Kuala_Lumpur","singapore time":pt+"Singapore","korea standard time":pt+"Seoul","korea time":pt+"Seoul",kst:pt+"Seoul","korean time":pt+"Seoul","uzbekistan time":pt+"Samarkand","vladivostok time":pt+"Vladivostok","maldives time":"Indian/Maldives","mauritius time":"Indian/Mauritius","marshall islands time":sa+"Kwajalein","samoa standard time":sa+"Midway","somoan time":sa+"Midway","chamorro standard time":sa+"Guam","papua new guinea time":sa+"Bougainville"};let _6=gt().timezones,I6=Object.keys(_6).reduce((e,t)=>(e[t]=t,e),{});const z6=Object.assign({},B6,I6),j6=["weekday","summer","winter","autumn","all day","eod","eom","eoy","standard time","daylight time","tommorrow"],q6=["centuries","century","day","days","decade","decades","hour","hours","hr","hrs","millisecond","milliseconds","minute","minutes","min","mins","month","months","seconds","sec","secs","week end","week ends","weekend","weekends","week","weeks","wk","wks","year","years","yr","yrs","quarter","qtr","qtrs","season","seasons"],R6=["all hallows eve","all saints day","all sts day","april fools","armistice day","australia day","bastille day","boxing day","canada day","christmas eve","christmas","cinco de mayo","day of the dead","dia de muertos","dieciseis de septiembre","emancipation day","grito de dolores","groundhog day","halloween","harvey milk day","inauguration day","independence day","independents day","juneteenth","labour day","national freedom day","national nurses day","new years eve","new years","purple heart day","rememberance day","rosa parks day","saint andrews day","saint patricks day","saint stephens day","saint valentines day","st andrews day","st patricks day","st stephens day","st valentines day ","valentines day","valentines","veterans day","victoria day","womens equality day","xmas","epiphany","orthodox christmas day","orthodox new year","assumption of mary","all souls day","feast of the immaculate conception","feast of our lady of guadalupe","kwanzaa","imbolc","beltaine","lughnassadh","samhain","martin luther king day","mlk day","presidents day","mardi gras","tax day","commonwealth day","mothers day","memorial day","fathers day","columbus day","indigenous peoples day","canadian thanksgiving","election day","thanksgiving","t-day","turkey day","black friday","cyber monday","ash wednesday","palm sunday","maundy thursday","good friday","holy saturday","easter","easter sunday","easter monday","orthodox good friday","orthodox holy saturday","orthodox easter","orthodox easter monday","ascension day","pentecost","whitsunday","whit sunday","whit monday","trinity sunday","corpus christi","advent","tu bishvat","tu bshevat","purim","passover","yom hashoah","lag baomer","shavuot","tisha bav","rosh hashana","yom kippur","sukkot","shmini atzeret","simchat torah","chanukah","hanukkah","isra and miraj","lailat al-qadr","eid al-fitr","id al-Fitr","eid ul-Fitr","ramadan","eid al-adha","muharram","the prophets birthday","ostara","march equinox","vernal equinox","litha","june solistice","summer solistice","mabon","september equinox","fall equinox","autumnal equinox","yule","december solstice","winter solstice","chinese new year","diwali"],L6=["noon","midnight","morning","tonight","evening","afternoon","breakfast time","lunchtime","dinnertime","midday","eod","oclock","oclock","at night"];let ax={"a couple":"Value",thur:"WeekDay",thurs:"WeekDay"};const nu=function(e,t){e.forEach(r=>{ax[r]=t})};nu(Object.keys(z6),"Timezone");nu(j6,"Date");nu(q6,"Duration");nu(R6,"Holiday");nu(L6,"Time");const H6=[[/^[0-9]+(min|sec|hr|d)s?$/i,"Duration","30min"],[/^[0-9]{4}-[0-9]{2}$/,"Date","2012-06"],[/^[0-9]{2}h[0-9]{2}$/i,"Time","13h30"],[/^@[0-9]+:[0-9]{2}$/,"Time","@5:30"],[/^@[1-9]+(am|pm)$/,"Time","@5pm"],[/^(?:0[1-9]|[12]\d|3[01])\/(?:0[1-9]|[12]\d|3[01])$/,"Date","03/02"]],G6="3.7.1",Qg=e=>e?gt(e).format("{nice-day} {year}"):"-",As="\x1B[0m",$f={magenta:e=>"\x1B[35m"+e+As,cyan:e=>"\x1B[36m"+e+As,yellow:e=>"\x1B[33m"+e+As,dim:e=>"\x1B[2m"+e+As,i:e=>"\x1B[3m"+e+As},V6=function(e){e.dates().forEach(t=>{let r=t.dates().get()[0];console.log(`
25
+ ────────`),t.debug("highlight");let n="";r&&r.start&&(n=" "+$f.magenta(Qg(r.start))),r&&r.end&&(n+=$f.dim(" → ")+$f.cyan(Qg(r.end))),console.log(n+`
26
+ `)})},U6={tags:$6,words:ax,compute:O6,api:A6,mutate:e=>{e.model.two.regexText=e.model.two.regexText||[],e.model.two.regexText=e.model.two.regexText.concat(H6),e.methods.one.debug=e.methods.one.debug||{},e.methods.one.debug.dates=V6},hooks:["dates"],version:G6};function tr(){return tr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tr.apply(null,arguments)}var ix={relTol:1e-12,absTol:1e-15,matrix:"Matrix",number:"number",numberFallback:"number",precision:64,predictable:!1,randomSeed:null,legacySubset:!1};function Wr(e,t){if(Vl(e,t))return e[t];throw typeof e[t]=="function"&&Ad(e,t)?new Error('Cannot access method "'+t+'" as a property'):new Error('No access to property "'+t+'"')}function Uo(e,t,r){if(Vl(e,t))return e[t]=r,r;throw new Error('No access to property "'+t+'"')}function Vl(e,t){return!J6(e)&&!Array.isArray(e)?!1:Fe(K6,t)?!0:!(t in Object.prototype||t in Function.prototype)}function W6(e,t){if(!Ad(e,t))throw new Error('No access to method "'+t+'"');return e[t]}function Ad(e,t){return e==null||typeof e[t]!="function"||Fe(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e)?!1:Fe(Y6,t)?!0:!(t in Object.prototype||t in Function.prototype)}function J6(e){return typeof e=="object"&&e&&e.constructor===Object}var K6={length:!0,name:!0},Y6={toString:!0,valueOf:!0,toLocaleString:!0};class Dc{constructor(t){this.wrappedObject=t,this[Symbol.iterator]=this.entries}keys(){return Object.keys(this.wrappedObject).filter(t=>this.has(t)).values()}get(t){return Wr(this.wrappedObject,t)}set(t,r){return Uo(this.wrappedObject,t,r),this}has(t){return Vl(this.wrappedObject,t)&&t in this.wrappedObject}entries(){return sx(this.keys(),t=>[t,this.get(t)])}forEach(t){for(var r of this.keys())t(this.get(r),r,this)}delete(t){Vl(this.wrappedObject,t)&&delete this.wrappedObject[t]}clear(){for(var t of this.keys())this.delete(t)}get size(){return Object.keys(this.wrappedObject).length}}class ox{constructor(t,r,n){this.a=t,this.b=r,this.bKeys=n,this[Symbol.iterator]=this.entries}get(t){return this.bKeys.has(t)?this.b.get(t):this.a.get(t)}set(t,r){return this.bKeys.has(t)?this.b.set(t,r):this.a.set(t,r),this}has(t){return this.b.has(t)||this.a.has(t)}keys(){return new Set([...this.a.keys(),...this.b.keys()])[Symbol.iterator]()}entries(){return sx(this.keys(),t=>[t,this.get(t)])}forEach(t){for(var r of this.keys())t(this.get(r),r,this)}delete(t){return this.bKeys.has(t)?this.b.delete(t):this.a.delete(t)}clear(){this.a.clear(),this.b.clear()}get size(){return[...this.keys()].length}}function sx(e,t){return{next:()=>{var r=e.next();return r.done?r:{value:t(r.value),done:!1}}}}function Vs(){return new Map}function Ro(e){if(!e)return Vs();if(cx(e))return e;if(Ac(e))return new Dc(e);throw new Error("createMap can create maps from objects or Maps")}function Z6(e){if(e instanceof Dc)return e.wrappedObject;var t={};for(var r of e.keys()){var n=e.get(r);Uo(t,r,n)}return t}function qe(e){return typeof e=="number"}function Qe(e){return!e||typeof e!="object"||typeof e.constructor!="function"?!1:e.isBigNumber===!0&&typeof e.constructor.prototype=="object"&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal=="function"&&e.constructor.isDecimal(e)===!0}function Bs(e){return typeof e=="bigint"}function _a(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function au(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function hn(e){return e&&e.constructor.prototype.isUnit===!0||!1}function Zt(e){return typeof e=="string"}var Tt=Array.isArray;function Le(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function vn(e){return Array.isArray(e)||Le(e)}function Ul(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function Ui(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function Cd(e){return e&&e.constructor.prototype.isRange===!0||!1}function Nc(e){return e&&e.constructor.prototype.isIndex===!0||!1}function Q6(e){return typeof e=="boolean"}function X6(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function ux(e){return e&&e.constructor.prototype.isHelp===!0||!1}function lx(e){return typeof e=="function"}function e8(e){return e instanceof Date}function t8(e){return e instanceof RegExp}function Ac(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!_a(e)&&!au(e))}function cx(e){return e?e instanceof Map||e instanceof Dc||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}function r8(e){return e===null}function n8(e){return e===void 0}function Ra(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Fn(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function a8(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function i8(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function o8(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function ft(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function Im(e){return ft(e)||er(e)&&e.args.length===1&&ft(e.args[0])&&"-+~".includes(e.op)}function iu(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function di(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function rs(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function Et(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function Cc(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function er(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function La(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function s8(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function u8(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Dr(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function fx(e){return e&&e.constructor.prototype.isChain===!0||!1}function Pt(e){var t=typeof e;return t==="object"?e===null?"null":Qe(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function We(e){var t=typeof e;if(t==="number"||t==="bigint"||t==="string"||t==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(r){return We(r)});if(e instanceof Date)return new Date(e.valueOf());if(Qe(e))return e;if(Ac(e))return l8(e,We);if(t==="function")return e;throw new TypeError("Cannot clone: unknown type of value (value: ".concat(e,")"))}function l8(e,t){var r={};for(var n in e)Fe(e,n)&&(r[n]=t(e[n]));return r}function mx(e,t){for(var r in t)Fe(t,r)&&(e[r]=t[r]);return e}function Ha(e,t){var r,n,a;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(n=0,a=e.length;n<a;n++)if(!Ha(e[n],t[n]))return!1;return!0}else{if(typeof e=="function")return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(r in e)if(!(r in t)||!Ha(e[r],t[r]))return!1;for(r in t)if(!(r in e))return!1;return!0}else return e===t}}function c8(e,t,r){var n=!0,a;Object.defineProperty(e,t,{get:function(){return n&&(a=r(),n=!1),a},set:function(o){a=o,n=!1},configurable:!0,enumerable:!0})}function Fe(e,t){return e&&Object.hasOwnProperty.call(e,t)}function f8(e,t){for(var r={},n=0;n<t.length;n++){var a=t[n],i=e[a];i!==void 0&&(r[a]=i)}return r}var m8=["Matrix","Array"],d8=["number","BigNumber","bigint","Fraction"],fe=function(t){if(t)throw new Error(`The global config is readonly.
27
+ Please create a mathjs instance if you want to change the default configuration.
28
+ Example:
29
+
30
+ import { create, all } from 'mathjs';
31
+ const mathjs = create(all);
32
+ mathjs.config({ number: 'BigNumber' });
33
+ `);return Object.freeze(ix)};tr(fe,ix,{MATRIX_OPTIONS:m8,NUMBER_OPTIONS:d8});function Xg(){return!0}function Cn(){return!1}function Co(){}const e0="Argument is not a typed-function.";function dx(){function e(O){return typeof O=="object"&&O!==null&&O.constructor===Object}const t=[{name:"number",test:function(O){return typeof O=="number"}},{name:"string",test:function(O){return typeof O=="string"}},{name:"boolean",test:function(O){return typeof O=="boolean"}},{name:"Function",test:function(O){return typeof O=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(O){return O instanceof Date}},{name:"RegExp",test:function(O){return O instanceof RegExp}},{name:"Object",test:e},{name:"null",test:function(O){return O===null}},{name:"undefined",test:function(O){return O===void 0}}],r={name:"any",test:Xg,isAny:!0};let n,a,i=0,o={createCount:0};function s(O){const q=n.get(O);if(q)return q;let K='Unknown type "'+O+'"';const te=O.toLowerCase();let ie;for(ie of a)if(ie.toLowerCase()===te){K+='. Did you mean "'+ie+'" ?';break}throw new TypeError(K)}function u(O){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any";const K=q?s(q).index:a.length,te=[];for(let re=0;re<O.length;++re){if(!O[re]||typeof O[re].name!="string"||typeof O[re].test!="function")throw new TypeError("Object with properties {name: string, test: function} expected");const pe=O[re].name;if(n.has(pe))throw new TypeError('Duplicate type name "'+pe+'"');te.push(pe),n.set(pe,{name:pe,test:O[re].test,isAny:O[re].isAny,index:K+re,conversionsTo:[]})}const ie=a.slice(K);a=a.slice(0,K).concat(te).concat(ie);for(let re=K+te.length;re<a.length;++re)n.get(a[re]).index=re}function l(){n=new Map,a=[],i=0,u([r],!1)}l(),u(t);function c(){let O;for(O of a)n.get(O).conversionsTo=[];i=0}function f(O){const q=a.filter(K=>{const te=n.get(K);return!te.isAny&&te.test(O)});return q.length?q:["any"]}function m(O){return O&&typeof O=="function"&&"_typedFunctionData"in O}function d(O,q,K){if(!m(O))throw new TypeError(e0);const te=K&&K.exact,ie=Array.isArray(q)?q.join(","):q,re=x(ie),pe=y(re);if(!te||pe in O.signatures){const Ie=O._typedFunctionData.signatureMap.get(pe);if(Ie)return Ie}const me=re.length;let Ae;if(te){Ae=[];let Ie;for(Ie in O.signatures)Ae.push(O._typedFunctionData.signatureMap.get(Ie))}else Ae=O._typedFunctionData.signatures;for(let Ie=0;Ie<me;++Ie){const lt=re[Ie],bt=[];let nt;for(nt of Ae){const Lt=N(nt.params,Ie);if(!(!Lt||lt.restParam&&!Lt.restParam)){if(!Lt.hasAny){const T=v(Lt);if(lt.types.some(Y=>!T.has(Y.name)))continue}bt.push(nt)}}if(Ae=bt,Ae.length===0)break}let de;for(de of Ae)if(de.params.length<=me)return de;throw new TypeError("Signature not found (signature: "+(O.name||"unnamed")+"("+y(re,", ")+"))")}function h(O,q,K){return d(O,q,K).implementation}function p(O,q){const K=s(q);if(K.test(O))return O;const te=K.conversionsTo;if(te.length===0)throw new Error("There are no conversions to "+q+" defined.");for(let ie=0;ie<te.length;ie++)if(s(te[ie].from).test(O))return te[ie].convert(O);throw new Error("Cannot convert "+O+" to "+q)}function y(O){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:",";return O.map(K=>K.name).join(q)}function w(O){const q=O.indexOf("...")===0,te=(q?O.length>3?O.slice(3):"any":O).split("|").map(me=>s(me.trim()));let ie=!1,re=q?"...":"";return{types:te.map(function(me){return ie=me.isAny||ie,re+=me.name+"|",{name:me.name,typeIndex:me.index,test:me.test,isAny:me.isAny,conversion:null,conversionIndex:-1}}),name:re.slice(0,-1),hasAny:ie,hasConversion:!1,restParam:q}}function D(O){const q=O.types.map(pe=>pe.name),K=B(q);let te=O.hasAny,ie=O.name;const re=K.map(function(pe){const me=s(pe.from);return te=me.isAny||te,ie+="|"+pe.from,{name:pe.from,typeIndex:me.index,test:me.test,isAny:me.isAny,conversion:pe,conversionIndex:pe.index}});return{types:O.types.concat(re),name:ie,hasAny:te,hasConversion:re.length>0,restParam:O.restParam}}function v(O){return O.typeSet||(O.typeSet=new Set,O.types.forEach(q=>O.typeSet.add(q.name))),O.typeSet}function x(O){const q=[];if(typeof O!="string")throw new TypeError("Signatures must be strings");const K=O.trim();if(K==="")return q;const te=K.split(",");for(let ie=0;ie<te.length;++ie){const re=w(te[ie].trim());if(re.restParam&&ie!==te.length-1)throw new SyntaxError('Unexpected rest parameter "'+te[ie]+'": only allowed for the last parameter');if(re.types.length===0)return null;q.push(re)}return q}function g(O){const q=_(O);return q?q.restParam:!1}function b(O){if(!O||O.types.length===0)return Xg;if(O.types.length===1)return s(O.types[0].name).test;if(O.types.length===2){const q=s(O.types[0].name).test,K=s(O.types[1].name).test;return function(ie){return q(ie)||K(ie)}}else{const q=O.types.map(function(K){return s(K.name).test});return function(te){for(let ie=0;ie<q.length;ie++)if(q[ie](te))return!0;return!1}}}function C(O){let q,K,te;if(g(O)){q=U(O).map(b);const ie=q.length,re=b(_(O)),pe=function(me){for(let Ae=ie;Ae<me.length;Ae++)if(!re(me[Ae]))return!1;return!0};return function(Ae){for(let de=0;de<q.length;de++)if(!q[de](Ae[de]))return!1;return pe(Ae)&&Ae.length>=ie+1}}else return O.length===0?function(re){return re.length===0}:O.length===1?(K=b(O[0]),function(re){return K(re[0])&&re.length===1}):O.length===2?(K=b(O[0]),te=b(O[1]),function(re){return K(re[0])&&te(re[1])&&re.length===2}):(q=O.map(b),function(re){for(let pe=0;pe<q.length;pe++)if(!q[pe](re[pe]))return!1;return re.length===q.length})}function N(O,q){return q<O.length?O[q]:g(O)?_(O):null}function A(O,q){const K=N(O,q);return K?v(K):new Set}function E(O){return O.conversion===null||O.conversion===void 0}function S(O,q){const K=new Set;return O.forEach(te=>{const ie=A(te.params,q);let re;for(re of ie)K.add(re)}),K.has("any")?["any"]:Array.from(K)}function F(O,q,K){let te,ie;const re=O||"unnamed";let pe=K,me;for(me=0;me<q.length;me++){const lt=[];if(pe.forEach(bt=>{const nt=N(bt.params,me),Lt=b(nt);(me<bt.params.length||g(bt.params))&&Lt(q[me])&&lt.push(bt)}),lt.length===0){if(ie=S(pe,me),ie.length>0){const bt=f(q[me]);return te=new TypeError("Unexpected type of argument in function "+re+" (expected: "+ie.join(" or ")+", actual: "+bt.join(" | ")+", index: "+me+")"),te.data={category:"wrongType",fn:re,index:me,actual:bt,expected:ie},te}}else pe=lt}const Ae=pe.map(function(lt){return g(lt.params)?1/0:lt.params.length});if(q.length<Math.min.apply(null,Ae))return ie=S(pe,me),te=new TypeError("Too few arguments in function "+re+" (expected: "+ie.join(" or ")+", index: "+q.length+")"),te.data={category:"tooFewArgs",fn:re,index:q.length,expected:ie},te;const de=Math.max.apply(null,Ae);if(q.length>de)return te=new TypeError("Too many arguments in function "+re+" (expected: "+de+", actual: "+q.length+")"),te.data={category:"tooManyArgs",fn:re,index:q.length,expectedLength:de},te;const Ie=[];for(let lt=0;lt<q.length;++lt)Ie.push(f(q[lt]).join("|"));return te=new TypeError('Arguments of type "'+Ie.join(", ")+'" do not match any of the defined signatures of function '+re+"."),te.data={category:"mismatch",actual:Ie},te}function k(O){let q=a.length+1;for(let K=0;K<O.types.length;K++)q=Math.min(q,O.types[K].typeIndex);return q}function $(O){let q=i+1;for(let K=0;K<O.types.length;K++)E(O.types[K])||(q=Math.min(q,O.types[K].conversionIndex));return q}function R(O,q){if(O.hasAny){if(!q.hasAny)return .1}else if(q.hasAny)return-.1;if(O.restParam){if(!q.restParam)return .01}else if(q.restParam)return-.01;const K=k(O)-k(q);if(K<0)return-.001;if(K>0)return .001;const te=$(O),ie=$(q);if(O.hasConversion){if(!q.hasConversion)return(1+te)*1e-6}else if(q.hasConversion)return-(1+ie)*1e-6;const re=te-ie;return re<0?-1e-7:re>0?1e-7:0}function M(O,q){const K=O.params,te=q.params,ie=_(K),re=_(te),pe=g(K),me=g(te);if(pe&&ie.hasAny){if(!me||!re.hasAny)return 1e7}else if(me&&re.hasAny)return-1e7;let Ae=0,de=0,Ie;for(Ie of K)Ie.hasAny&&++Ae,Ie.hasConversion&&++de;let lt=0,bt=0;for(Ie of te)Ie.hasAny&&++lt,Ie.hasConversion&&++bt;if(Ae!==lt)return(Ae-lt)*1e6;if(pe&&ie.hasConversion){if(!me||!re.hasConversion)return 1e5}else if(me&&re.hasConversion)return-1e5;if(de!==bt)return(de-bt)*1e4;if(pe){if(!me)return 1e3}else if(me)return-1e3;const nt=(K.length-te.length)*(pe?-100:100);if(nt!==0)return nt;const Lt=[];let T=0;for(let $e=0;$e<K.length;++$e){const Ue=R(K[$e],te[$e]);Lt.push(Ue),T+=Ue}if(T!==0)return(T<0?-10:10)+T;let Y,le=9;const ye=le/(Lt.length+1);for(Y of Lt){if(Y!==0)return(Y<0?-le:le)+Y;le-=ye}return 0}function B(O){if(O.length===0)return[];const q=O.map(s);if(O.length===1)return q[0].conversionsTo;const K=new Set(O),te=new Set;for(let re=0;re<q.length;++re)for(const pe of q[re].conversionsTo)K.has(pe.from)||te.add(pe.from);const ie=[];for(const re of te){let pe=i+1,me=null;for(let Ae=0;Ae<q.length;++Ae)for(const de of q[Ae].conversionsTo)de.from===re&&de.index<pe&&(pe=de.index,me=de);ie.push(me)}return ie}function L(O,q){let K=q,te="";if(O.some(re=>re.hasConversion)){const re=g(O),pe=O.map(j);te=pe.map(me=>me.name).join(";"),K=function(){const Ae=[],de=re?arguments.length-1:arguments.length;for(let Ie=0;Ie<de;Ie++)Ae[Ie]=pe[Ie](arguments[Ie]);return re&&(Ae[de]=arguments[de].map(pe[de])),q.apply(this,Ae)}}let ie=K;if(g(O)){const re=O.length-1;ie=function(){return K.apply(this,J(arguments,0,re).concat([J(arguments,re)]))}}return te&&Object.defineProperty(ie,"name",{value:te}),ie}function j(O){let q,K,te,ie;const re=[],pe=[];let me="";O.types.forEach(function(de){de.conversion&&(me+=de.conversion.from+"~>"+de.conversion.to+",",re.push(s(de.conversion.from).test),pe.push(de.conversion.convert))}),me?me=me.slice(0,-1):me="pass";let Ae=de=>de;switch(pe.length){case 0:break;case 1:q=re[0],te=pe[0],Ae=function(Ie){return q(Ie)?te(Ie):Ie};break;case 2:q=re[0],K=re[1],te=pe[0],ie=pe[1],Ae=function(Ie){return q(Ie)?te(Ie):K(Ie)?ie(Ie):Ie};break;default:Ae=function(Ie){for(let lt=0;lt<pe.length;lt++)if(re[lt](Ie))return pe[lt](Ie);return Ie}}return Object.defineProperty(Ae,"name",{value:me}),Ae}function Z(O){function q(K,te,ie){if(te<K.length){const re=K[te];let pe=[];if(re.restParam){const me=re.types.filter(E);me.length<re.types.length&&pe.push({types:me,name:"..."+me.map(Ae=>Ae.name).join("|"),hasAny:me.some(Ae=>Ae.isAny),hasConversion:!1,restParam:!0}),pe.push(re)}else pe=re.types.map(function(me){return{types:[me],name:me.name,hasAny:me.isAny,hasConversion:me.conversion,restParam:!1}});return ee(pe,function(me){return q(K,te+1,ie.concat([me]))})}else return[ie]}return q(O,0,[])}function G(O,q){const K=Math.max(O.length,q.length);for(let me=0;me<K;me++){const Ae=A(O,me),de=A(q,me);let Ie=!1,lt;for(lt of de)if(Ae.has(lt)){Ie=!0;break}if(!Ie)return!1}const te=O.length,ie=q.length,re=g(O),pe=g(q);return re?pe?te===ie:ie>=te:pe?te>=ie:te===ie}function V(O){return O.map(q=>Pe(q)?be(q.referToSelf.callback):Me(q)?se(q.referTo.references,q.referTo.callback):q)}function P(O,q,K){const te=[];let ie;for(ie of O){let re=K[ie];if(typeof re!="number")throw new TypeError('No definition for referenced signature "'+ie+'"');if(re=q[re],typeof re!="function")return!1;te.push(re)}return te}function Q(O,q,K){const te=V(O),ie=new Array(te.length).fill(!1);let re=!0;for(;re;){re=!1;let pe=!0;for(let me=0;me<te.length;++me){if(ie[me])continue;const Ae=te[me];if(Pe(Ae))te[me]=Ae.referToSelf.callback(K),te[me].referToSelf=Ae.referToSelf,ie[me]=!0,pe=!1;else if(Me(Ae)){const de=P(Ae.referTo.references,te,q);de?(te[me]=Ae.referTo.callback.apply(this,de),te[me].referTo=Ae.referTo,ie[me]=!0,pe=!1):re=!0}}if(pe&&re)throw new SyntaxError("Circular reference detected in resolving typed.referTo")}return te}function z(O){const q=/\bthis(\(|\.signatures\b)/;Object.keys(O).forEach(K=>{const te=O[K];if(q.test(te.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function oe(O,q){if(o.createCount++,Object.keys(q).length===0)throw new SyntaxError("No signatures provided");o.warnAgainstDeprecatedThis&&z(q);const K=[],te=[],ie={},re=[];let pe;for(pe in q){if(!Object.prototype.hasOwnProperty.call(q,pe))continue;const St=x(pe);if(!St)continue;K.forEach(function(ps){if(G(ps,St))throw new TypeError('Conflicting signatures "'+y(ps)+'" and "'+y(St)+'".')}),K.push(St);const tn=te.length;te.push(q[pe]);const qN=St.map(D);let yu;for(yu of Z(qN)){const ps=y(yu);re.push({params:yu,name:ps,fn:tn}),yu.every(RN=>!RN.hasConversion)&&(ie[ps]=tn)}}re.sort(M);const me=Q(te,ie,hs);let Ae;for(Ae in ie)Object.prototype.hasOwnProperty.call(ie,Ae)&&(ie[Ae]=me[ie[Ae]]);const de=[],Ie=new Map;for(Ae of re)Ie.has(Ae.name)||(Ae.fn=me[Ae.fn],de.push(Ae),Ie.set(Ae.name,Ae));const lt=de[0]&&de[0].params.length<=2&&!g(de[0].params),bt=de[1]&&de[1].params.length<=2&&!g(de[1].params),nt=de[2]&&de[2].params.length<=2&&!g(de[2].params),Lt=de[3]&&de[3].params.length<=2&&!g(de[3].params),T=de[4]&&de[4].params.length<=2&&!g(de[4].params),Y=de[5]&&de[5].params.length<=2&&!g(de[5].params),le=lt&&bt&&nt&&Lt&&T&&Y;for(let St=0;St<de.length;++St)de[St].test=C(de[St].params);const ye=lt?b(de[0].params[0]):Cn,$e=bt?b(de[1].params[0]):Cn,Ue=nt?b(de[2].params[0]):Cn,Lr=Lt?b(de[3].params[0]):Cn,ho=T?b(de[4].params[0]):Cn,Vc=Y?b(de[5].params[0]):Cn,vN=lt?b(de[0].params[1]):Cn,yN=bt?b(de[1].params[1]):Cn,bN=nt?b(de[2].params[1]):Cn,wN=Lt?b(de[3].params[1]):Cn,xN=T?b(de[4].params[1]):Cn,DN=Y?b(de[5].params[1]):Cn;for(let St=0;St<de.length;++St)de[St].implementation=L(de[St].params,de[St].fn);const NN=lt?de[0].implementation:Co,AN=bt?de[1].implementation:Co,CN=nt?de[2].implementation:Co,EN=Lt?de[3].implementation:Co,SN=T?de[4].implementation:Co,MN=Y?de[5].implementation:Co,TN=lt?de[0].params.length:-1,FN=bt?de[1].params.length:-1,PN=nt?de[2].params.length:-1,kN=Lt?de[3].params.length:-1,ON=T?de[4].params.length:-1,$N=Y?de[5].params.length:-1,BN=le?6:0,_N=de.length,IN=de.map(St=>St.test),zN=de.map(St=>St.implementation),jN=function(){for(let tn=BN;tn<_N;tn++)if(IN[tn](arguments))return zN[tn].apply(this,arguments);return o.onMismatch(O,arguments,de)};function hs(St,tn){return arguments.length===TN&&ye(St)&&vN(tn)?NN.apply(this,arguments):arguments.length===FN&&$e(St)&&yN(tn)?AN.apply(this,arguments):arguments.length===PN&&Ue(St)&&bN(tn)?CN.apply(this,arguments):arguments.length===kN&&Lr(St)&&wN(tn)?EN.apply(this,arguments):arguments.length===ON&&ho(St)&&xN(tn)?SN.apply(this,arguments):arguments.length===$N&&Vc(St)&&DN(tn)?MN.apply(this,arguments):jN.apply(this,arguments)}try{Object.defineProperty(hs,"name",{value:O})}catch{}return hs.signatures=ie,hs._typedFunctionData={signatures:de,signatureMap:Ie},hs}function ne(O,q,K){throw F(O,q,K)}function U(O){return J(O,0,O.length-1)}function _(O){return O[O.length-1]}function J(O,q,K){return Array.prototype.slice.call(O,q,K)}function ae(O,q){for(let K=0;K<O.length;K++)if(q(O[K]))return O[K]}function ee(O,q){return Array.prototype.concat.apply([],O.map(q))}function ue(){const O=U(arguments).map(K=>y(x(K))),q=_(arguments);if(typeof q!="function")throw new TypeError("Callback function expected as last argument");return se(O,q)}function se(O,q){return{referTo:{references:O,callback:q}}}function be(O){if(typeof O!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:O}}}function Me(O){return O&&typeof O.referTo=="object"&&Array.isArray(O.referTo.references)&&typeof O.referTo.callback=="function"}function Pe(O){return O&&typeof O.referToSelf=="object"&&typeof O.referToSelf.callback=="function"}function Ee(O,q){if(!O)return q;if(q&&q!==O){const K=new Error("Function names do not match (expected: "+O+", actual: "+q+")");throw K.data={actual:q,expected:O},K}return O}function Oe(O){let q;for(const K in O)Object.prototype.hasOwnProperty.call(O,K)&&(m(O[K])||typeof O[K].signature=="string")&&(q=Ee(q,O[K].name));return q}function je(O,q){let K;for(K in q)if(Object.prototype.hasOwnProperty.call(q,K)){if(K in O&&q[K]!==O[K]){const te=new Error('Signature "'+K+'" is defined twice');throw te.data={signature:K,sourceFunction:q[K],destFunction:O[K]},te}O[K]=q[K]}}const H=o;o=function(O){const q=typeof O=="string",K=q?1:0;let te=q?O:"";const ie={};for(let re=K;re<arguments.length;++re){const pe=arguments[re];let me={},Ae;if(typeof pe=="function"?(Ae=pe.name,typeof pe.signature=="string"?me[pe.signature]=pe:m(pe)&&(me=pe.signatures)):e(pe)&&(me=pe,q||(Ae=Oe(pe))),Object.keys(me).length===0){const de=new TypeError("Argument to 'typed' at index "+re+" is not a (typed) function, nor an object with signatures as keys and functions as values.");throw de.data={index:re,argument:pe},de}q||(te=Ee(te,Ae)),je(ie,me)}return oe(te||"",ie)},o.create=dx,o.createCount=H.createCount,o.onMismatch=ne,o.throwMismatchError=ne,o.createError=F,o.clear=l,o.clearConversions=c,o.addTypes=u,o._findType=s,o.referTo=ue,o.referToSelf=be,o.convert=p,o.findSignature=d,o.find=h,o.isTypedFunction=m,o.warnAgainstDeprecatedThis=!0,o.addType=function(O,q){let K="any";q!==!1&&n.has("Object")&&(K="Object"),o.addTypes([O],K)};function X(O){if(!O||typeof O.from!="string"||typeof O.to!="string"||typeof O.convert!="function")throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");if(O.to===O.from)throw new SyntaxError('Illegal to define conversion from "'+O.from+'" to itself.')}return o.addConversion=function(O){let q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{override:!1};X(O);const K=s(O.to),te=K.conversionsTo.find(ie=>ie.from===O.from);if(te)if(q&&q.override)o.removeConversion({from:te.from,to:O.to,convert:te.convert});else throw new Error('There is already a conversion from "'+O.from+'" to "'+K.name+'"');K.conversionsTo.push({from:O.from,to:K.name,convert:O.convert,index:i++})},o.addConversions=function(O,q){O.forEach(K=>o.addConversion(K,q))},o.removeConversion=function(O){X(O);const q=s(O.to),K=ae(q.conversionsTo,ie=>ie.from===O.from);if(!K)throw new Error("Attempt to remove nonexistent conversion from "+O.from+" to "+O.to);if(K.convert!==O.convert)throw new Error("Conversion to remove does not match existing conversion");const te=q.conversionsTo.indexOf(K);q.conversionsTo.splice(te,1)},o.resolve=function(O,q){if(!m(O))throw new TypeError(e0);const K=O._typedFunctionData.signatures;for(let te=0;te<K.length;++te)if(K[te].test(q))return K[te];return null},o}const Wl=dx();function I(e,t,r,n){function a(i){var o=f8(i,t.map(g8));return h8(e,t,i),r(o)}return a.isFactory=!0,a.fn=e,a.dependencies=t.slice().sort(),n&&(a.meta=n),a}function h8(e,t,r){var n=t.filter(i=>!p8(i)).every(i=>r[i]!==void 0);if(!n){var a=t.filter(i=>r[i]===void 0);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(a.map(i=>'"'.concat(i,'"')).join(", "),"."))}}function p8(e){return e&&e[0]==="?"}function g8(e){return e&&e[0]==="?"?e.slice(1):e}function ke(e){return typeof e=="boolean"?!0:Number.isFinite(e)?e===Math.round(e):!1}function yi(e,t){if(t.number==="bigint")try{BigInt(e)}catch{return t.numberFallback}return t.number}var ii=Math.sign||function(e){return e>0?1:e<0?-1:0},v8=Math.log2||function(t){return Math.log(t)/Math.LN2},y8=Math.log10||function(t){return Math.log(t)/Math.LN10},b8=Math.log1p||function(e){return Math.log(e+1)},w8=Math.cbrt||function(t){if(t===0)return t;var r=t<0,n;return r&&(t=-t),Number.isFinite(t)?(n=Math.exp(Math.log(t)/3),n=(t/(n*n)+2*n)/3):n=t,r?-n:n},x8=Math.expm1||function(t){return t>=2e-4||t<=-2e-4?Math.exp(t)-1:t+t*t/2+t*t*t/6};function Bf(e,t,r){var n={2:"0b",8:"0o",16:"0x"},a=n[t],i="";if(r){if(r<1)throw new Error("size must be in greater than 0");if(!ke(r))throw new Error("size must be an integer");if(e>2**(r-1)-1||e<-(2**(r-1)))throw new Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!ke(e))throw new Error("Value must be an integer");e<0&&(e=e+2**r),i="i".concat(r)}var o="";return e<0&&(e=-e,o="-"),"".concat(o).concat(a).concat(e.toString(t)).concat(i)}function Ki(e,t){if(typeof t=="function")return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var{notation:r,precision:n,wordSize:a}=hx(t);switch(r){case"fixed":return px(e,n);case"exponential":return gx(e,n);case"engineering":return D8(e,n);case"bin":return Bf(e,2,a);case"oct":return Bf(e,8,a);case"hex":return Bf(e,16,a);case"auto":return N8(e,n,t).replace(/((\.\d*?)(0+))($|e)/,function(){var i=arguments[2],o=arguments[4];return i!=="."?i+o:o});default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function hx(e){var t="auto",r,n;if(e!==void 0)if(qe(e))r=e;else if(Qe(e))r=e.toNumber();else if(Ac(e))e.precision!==void 0&&(r=t0(e.precision,()=>{throw new Error('Option "precision" must be a number or BigNumber')})),e.wordSize!==void 0&&(n=t0(e.wordSize,()=>{throw new Error('Option "wordSize" must be a number or BigNumber')})),e.notation&&(t=e.notation);else throw new Error("Unsupported type of options, number, BigNumber, or object expected");return{notation:t,precision:r,wordSize:n}}function ou(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var r=t[1],n=t[2],a=parseFloat(t[4]||"0"),i=n.indexOf(".");a+=i!==-1?i-1:n.length-1;var o=n.replace(".","").replace(/^0*/,function(s){return a-=s.length,""}).replace(/0*$/,"").split("").map(function(s){return parseInt(s)});return o.length===0&&(o.push(0),a++),{sign:r,coefficients:o,exponent:a}}function D8(e,t){if(isNaN(e)||!Number.isFinite(e))return String(e);var r=ou(e),n=Ec(r,t),a=n.exponent,i=n.coefficients,o=a%3===0?a:a<0?a-3-a%3:a-a%3;if(qe(t))for(;t>i.length||a-o+1>i.length;)i.push(0);else for(var s=Math.abs(a-o)-(i.length-1),u=0;u<s;u++)i.push(0);for(var l=Math.abs(a-o),c=1;l>0;)c++,l--;var f=i.slice(c).join(""),m=qe(t)&&f.length||f.match(/[1-9]/)?"."+f:"",d=i.slice(0,c).join("")+m+"e"+(a>=0?"+":"")+o.toString();return n.sign+d}function px(e,t){if(isNaN(e)||!Number.isFinite(e))return String(e);var r=ou(e),n=typeof t=="number"?Ec(r,r.exponent+1+t):r,a=n.coefficients,i=n.exponent+1,o=i+(t||0);return a.length<o&&(a=a.concat(Lo(o-a.length))),i<0&&(a=Lo(-i+1).concat(a),i=1),i<a.length&&a.splice(i,0,i===0?"0.":"."),n.sign+a.join("")}function gx(e,t){if(isNaN(e)||!Number.isFinite(Number(e)))return String(e);var r=ou(e),n=t?Ec(r,t):r,a=n.coefficients,i=n.exponent;a.length<t&&(a=a.concat(Lo(t-a.length)));var o=a.shift();return n.sign+o+(a.length>0?"."+a.join(""):"")+"e"+(i>=0?"+":"")+i}function N8(e,t,r){if(isNaN(e)||!Number.isFinite(e))return String(e);var n=r0(r?.lowerExp,-3),a=r0(r?.upperExp,5),i=ou(e),o=t?Ec(i,t):i;if(o.exponent<n||o.exponent>=a)return gx(e,t);var s=o.coefficients,u=o.exponent;s.length<t&&(s=s.concat(Lo(t-s.length))),s=s.concat(Lo(u-s.length+1+(s.length<t?t-s.length:0))),s=Lo(-u).concat(s);var l=u>0?u:0;return l<s.length-1&&s.splice(l+1,0,"."),o.sign+s.join("")}function Ec(e,t){for(var r={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},n=r.coefficients;t<=0;)n.unshift(0),r.exponent++,t++;if(n.length>t){var a=n.splice(t,n.length-t);if(a[0]>=5){var i=t-1;for(n[i]++;n[i]===10;)n.pop(),i===0&&(n.unshift(0),r.exponent++,i++),i--,n[i]++}}return r}function Lo(e){for(var t=[],r=0;r<e;r++)t.push(0);return t}function A8(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}function Cr(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e-8,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if(r<=0)throw new Error("Relative tolerance must be greater than 0");if(n<0)throw new Error("Absolute tolerance must be at least 0");return isNaN(e)||isNaN(t)?!1:!Number.isFinite(e)||!Number.isFinite(t)?e===t:e===t?!0:Math.abs(e-t)<=Math.max(r*Math.max(Math.abs(e),Math.abs(t)),n)}var C8=Math.acosh||function(e){return Math.log(Math.sqrt(e*e-1)+e)},E8=Math.asinh||function(e){return Math.log(Math.sqrt(e*e+1)+e)},S8=Math.atanh||function(e){return Math.log((1+e)/(1-e))/2},M8=Math.cosh||function(e){return(Math.exp(e)+Math.exp(-e))/2},T8=Math.sinh||function(e){return(Math.exp(e)-Math.exp(-e))/2},F8=Math.tanh||function(e){var t=Math.exp(2*e);return(t-1)/(t+1)};function P8(e,t){var r=!0,n=t>0?!0:t<0?!1:1/t===1/0;return r^n?-e:e}function t0(e,t){if(qe(e))return e;if(Qe(e))return e.toNumber();t()}function r0(e,t){return qe(e)?e:Qe(e)?e.toNumber():t}var vx=function(){return vx=Wl.create,Wl},k8=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],O8=I("typed",k8,function(t){var{BigNumber:r,Complex:n,DenseMatrix:a,Fraction:i}=t,o=vx();return o.clear(),o.addTypes([{name:"number",test:qe},{name:"Complex",test:_a},{name:"BigNumber",test:Qe},{name:"bigint",test:Bs},{name:"Fraction",test:au},{name:"Unit",test:hn},{name:"identifier",test:s=>Zt&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDD4A-\uDD65\uDD6F-\uDD85\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC4\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDDD0-\uDDED\uDDF0\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C8A\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CD\uA7D0\uA7D1\uA7D3\uA7D5-\uA7DC\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDDC0-\uDDF3\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDD4A-\uDD65\uDD6F-\uDD85\uDE80-\uDEA9\uDEB0\uDEB1\uDEC2-\uDEC4\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE3F\uDE40\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61\uDF80-\uDF89\uDF8B\uDF8E\uDF90-\uDFB5\uDFB7\uDFD1\uDFD3]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8\uDFC0-\uDFE0]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDF02\uDF04-\uDF10\uDF12-\uDF33\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD80E\uD80F\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD887][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2F\uDC41-\uDC46\uDC60-\uDFFF]|\uD810[\uDC00-\uDFFA]|\uD811[\uDC00-\uDE46]|\uD818[\uDD00-\uDD1D]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDD40-\uDD6C\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD32\uDD50-\uDD52\uDD55\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E\uDF25-\uDF2A]|\uD838[\uDC30-\uDC6D\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDCD0-\uDCEB\uDDD0-\uDDED\uDDF0\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF39\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD888[\uDC00-\uDFAF])*$/.test(s)},{name:"string",test:Zt},{name:"Chain",test:fx},{name:"Array",test:Tt},{name:"Matrix",test:Le},{name:"DenseMatrix",test:Ul},{name:"SparseMatrix",test:Ui},{name:"Range",test:Cd},{name:"Index",test:Nc},{name:"boolean",test:Q6},{name:"ResultSet",test:X6},{name:"Help",test:ux},{name:"function",test:lx},{name:"Date",test:e8},{name:"RegExp",test:t8},{name:"null",test:r8},{name:"undefined",test:n8},{name:"AccessorNode",test:Ra},{name:"ArrayNode",test:Fn},{name:"AssignmentNode",test:a8},{name:"BlockNode",test:i8},{name:"ConditionalNode",test:o8},{name:"ConstantNode",test:ft},{name:"FunctionNode",test:di},{name:"FunctionAssignmentNode",test:iu},{name:"IndexNode",test:rs},{name:"Node",test:Et},{name:"ObjectNode",test:Cc},{name:"OperatorNode",test:er},{name:"ParenthesisNode",test:La},{name:"RangeNode",test:s8},{name:"RelationalNode",test:u8},{name:"SymbolNode",test:Dr},{name:"Map",test:cx},{name:"Object",test:Ac}]),o.addConversions([{from:"number",to:"BigNumber",convert:function(u){if(r||rl(u),A8(u)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+u+"). Use function bignumber(x) to convert to BigNumber.");return new r(u)}},{from:"number",to:"Complex",convert:function(u){return n||nl(u),new n(u,0)}},{from:"BigNumber",to:"Complex",convert:function(u){return n||nl(u),new n(u.toNumber(),0)}},{from:"bigint",to:"number",convert:function(u){if(u>Number.MAX_SAFE_INTEGER)throw new TypeError("Cannot implicitly convert bigint to number: value exceeds the max safe integer value (value: "+u+")");return Number(u)}},{from:"bigint",to:"BigNumber",convert:function(u){return r||rl(u),new r(u.toString())}},{from:"bigint",to:"Fraction",convert:function(u){return i||al(u),new i(u)}},{from:"Fraction",to:"BigNumber",convert:function(u){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(u){return n||nl(u),new n(u.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(u){i||al(u);var l=new i(u);if(l.valueOf()!==u)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+u+"). Use function fraction(x) to convert to Fraction.");return l}},{from:"string",to:"number",convert:function(u){var l=Number(u);if(isNaN(l))throw new Error('Cannot convert "'+u+'" to a number');return l}},{from:"string",to:"BigNumber",convert:function(u){r||rl(u);try{return new r(u)}catch{throw new Error('Cannot convert "'+u+'" to BigNumber')}}},{from:"string",to:"bigint",convert:function(u){try{return BigInt(u)}catch{throw new Error('Cannot convert "'+u+'" to BigInt')}}},{from:"string",to:"Fraction",convert:function(u){i||al(u);try{return new i(u)}catch{throw new Error('Cannot convert "'+u+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(u){n||nl(u);try{return new n(u)}catch{throw new Error('Cannot convert "'+u+'" to Complex')}}},{from:"boolean",to:"number",convert:function(u){return+u}},{from:"boolean",to:"BigNumber",convert:function(u){return r||rl(u),new r(+u)}},{from:"boolean",to:"bigint",convert:function(u){return BigInt(+u)}},{from:"boolean",to:"Fraction",convert:function(u){return i||al(u),new i(+u)}},{from:"boolean",to:"string",convert:function(u){return String(u)}},{from:"Array",to:"Matrix",convert:function(u){return a||$8(),new a(u)}},{from:"Matrix",to:"Array",convert:function(u){return u.valueOf()}}]),o.onMismatch=(s,u,l)=>{var c=o.createError(s,u,l);if(["wrongType","mismatch"].includes(c.data.category)&&u.length===1&&vn(u[0])&&l.some(m=>!m.params.includes(","))){var f=new TypeError("Function '".concat(s,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(s,")'."));throw f.data=c.data,f}throw c},o.onMismatch=(s,u,l)=>{var c=o.createError(s,u,l);if(["wrongType","mismatch"].includes(c.data.category)&&u.length===1&&vn(u[0])&&l.some(m=>!m.params.includes(","))){var f=new TypeError("Function '".concat(s,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(s,")'."));throw f.data=c.data,f}throw c},o});function rl(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function nl(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function $8(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function al(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}var B8="ResultSet",_8=[],I8=I(B8,_8,()=>{function e(t){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");this.entries=t||[]}return e.prototype.type="ResultSet",e.prototype.isResultSet=!0,e.prototype.valueOf=function(){return this.entries},e.prototype.toString=function(){return"["+this.entries.map(String).join(", ")+"]"},e.prototype.toJSON=function(){return{mathjs:"ResultSet",entries:this.entries}},e.fromJSON=function(t){return new e(t.entries)},e},{isClass:!0});var Io=9e15,bi=1e9,zm="0123456789abcdef",Jl="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Kl="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",jm={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Io,maxE:Io,crypto:!1},yx,$a,Ze=!0,Sc="[DecimalError] ",hi=Sc+"Invalid argument: ",bx=Sc+"Precision limit exceeded",wx=Sc+"crypto unavailable",xx="[object Decimal]",zr=Math.floor,lr=Math.pow,z8=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,j8=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,q8=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Dx=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Yn=1e7,Ge=7,R8=9007199254740991,L8=Jl.length-1,qm=Kl.length-1,ge={toStringTag:xx};ge.absoluteValue=ge.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),Re(e)};ge.ceil=function(){return Re(new this.constructor(this),this.e+1,2)};ge.clampedTo=ge.clamp=function(e,t){var r,n=this,a=n.constructor;if(e=new a(e),t=new a(t),!e.s||!t.s)return new a(NaN);if(e.gt(t))throw Error(hi+t);return r=n.cmp(e),r<0?e:n.cmp(t)>0?t:new a(n)};ge.comparedTo=ge.cmp=function(e){var t,r,n,a,i=this,o=i.d,s=(e=new i.constructor(e)).d,u=i.s,l=e.s;if(!o||!s)return!u||!l?NaN:u!==l?u:o===s?0:!o^u<0?1:-1;if(!o[0]||!s[0])return o[0]?u:s[0]?-l:0;if(u!==l)return u;if(i.e!==e.e)return i.e>e.e^u<0?1:-1;for(n=o.length,a=s.length,t=0,r=n<a?n:a;t<r;++t)if(o[t]!==s[t])return o[t]>s[t]^u<0?1:-1;return n===a?0:n>a^u<0?1:-1};ge.cosine=ge.cos=function(){var e,t,r=this,n=r.constructor;return r.d?r.d[0]?(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+Ge,n.rounding=1,r=H8(n,Sx(n,r)),n.precision=e,n.rounding=t,Re($a==2||$a==3?r.neg():r,e,t,!0)):new n(1):new n(NaN)};ge.cubeRoot=ge.cbrt=function(){var e,t,r,n,a,i,o,s,u,l,c=this,f=c.constructor;if(!c.isFinite()||c.isZero())return new f(c);for(Ze=!1,i=c.s*lr(c.s*c,1/3),!i||Math.abs(i)==1/0?(r=Mr(c.d),e=c.e,(i=(e-r.length+1)%3)&&(r+=i==1||i==-2?"0":"00"),i=lr(r,1/3),e=zr((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?r="5e"+e:(r=i.toExponential(),r=r.slice(0,r.indexOf("e")+1)+e),n=new f(r),n.s=c.s):n=new f(i.toString()),o=(e=f.precision)+3;;)if(s=n,u=s.times(s).times(s),l=u.plus(c),n=It(l.plus(c).times(s),l.plus(u),o+2,1),Mr(s.d).slice(0,o)===(r=Mr(n.d)).slice(0,o))if(r=r.slice(o-3,o+1),r=="9999"||!a&&r=="4999"){if(!a&&(Re(s,e+1,0),s.times(s).times(s).eq(c))){n=s;break}o+=4,a=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(Re(n,e+1,1),t=!n.times(n).times(n).eq(c));break}return Ze=!0,Re(n,e,f.rounding,t)};ge.decimalPlaces=ge.dp=function(){var e,t=this.d,r=NaN;if(t){if(e=t.length-1,r=(e-zr(this.e/Ge))*Ge,e=t[e],e)for(;e%10==0;e/=10)r--;r<0&&(r=0)}return r};ge.dividedBy=ge.div=function(e){return It(this,new this.constructor(e))};ge.dividedToIntegerBy=ge.divToInt=function(e){var t=this,r=t.constructor;return Re(It(t,new r(e),0,1,1),r.precision,r.rounding)};ge.equals=ge.eq=function(e){return this.cmp(e)===0};ge.floor=function(){return Re(new this.constructor(this),this.e+1,3)};ge.greaterThan=ge.gt=function(e){return this.cmp(e)>0};ge.greaterThanOrEqualTo=ge.gte=function(e){var t=this.cmp(e);return t==1||t===0};ge.hyperbolicCosine=ge.cosh=function(){var e,t,r,n,a,i=this,o=i.constructor,s=new o(1);if(!i.isFinite())return new o(i.s?1/0:NaN);if(i.isZero())return s;r=o.precision,n=o.rounding,o.precision=r+Math.max(i.e,i.sd())+4,o.rounding=1,a=i.d.length,a<32?(e=Math.ceil(a/3),t=(1/Tc(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=Wo(o,1,i.times(t),new o(1),!0);for(var u,l=e,c=new o(8);l--;)u=i.times(i),i=s.minus(u.times(c.minus(u.times(c))));return Re(i,o.precision=r,o.rounding=n,!0)};ge.hyperbolicSine=ge.sinh=function(){var e,t,r,n,a=this,i=a.constructor;if(!a.isFinite()||a.isZero())return new i(a);if(t=i.precision,r=i.rounding,i.precision=t+Math.max(a.e,a.sd())+4,i.rounding=1,n=a.d.length,n<3)a=Wo(i,2,a,a,!0);else{e=1.4*Math.sqrt(n),e=e>16?16:e|0,a=a.times(1/Tc(5,e)),a=Wo(i,2,a,a,!0);for(var o,s=new i(5),u=new i(16),l=new i(20);e--;)o=a.times(a),a=a.times(s.plus(o.times(u.times(o).plus(l))))}return i.precision=t,i.rounding=r,Re(a,t,r,!0)};ge.hyperbolicTangent=ge.tanh=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+7,n.rounding=1,It(r.sinh(),r.cosh(),n.precision=e,n.rounding=t)):new n(r.s)};ge.inverseCosine=ge.acos=function(){var e=this,t=e.constructor,r=e.abs().cmp(1),n=t.precision,a=t.rounding;return r!==-1?r===0?e.isNeg()?la(t,n,a):new t(0):new t(NaN):e.isZero()?la(t,n+4,a).times(.5):(t.precision=n+6,t.rounding=1,e=new t(1).minus(e).div(e.plus(1)).sqrt().atan(),t.precision=n,t.rounding=a,e.times(2))};ge.inverseHyperbolicCosine=ge.acosh=function(){var e,t,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(e=n.precision,t=n.rounding,n.precision=e+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,Ze=!1,r=r.times(r).minus(1).sqrt().plus(r),Ze=!0,n.precision=e,n.rounding=t,r.ln()):new n(r)};ge.inverseHyperbolicSine=ge.asinh=function(){var e,t,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,Ze=!1,r=r.times(r).plus(1).sqrt().plus(r),Ze=!0,n.precision=e,n.rounding=t,r.ln())};ge.inverseHyperbolicTangent=ge.atanh=function(){var e,t,r,n,a=this,i=a.constructor;return a.isFinite()?a.e>=0?new i(a.abs().eq(1)?a.s/0:a.isZero()?a:NaN):(e=i.precision,t=i.rounding,n=a.sd(),Math.max(n,e)<2*-a.e-1?Re(new i(a),e,t,!0):(i.precision=r=n-a.e,a=It(a.plus(1),new i(1).minus(a),r+e,1),i.precision=e+4,i.rounding=1,a=a.ln(),i.precision=e,i.rounding=t,a.times(.5))):new i(NaN)};ge.inverseSine=ge.asin=function(){var e,t,r,n,a=this,i=a.constructor;return a.isZero()?new i(a):(t=a.abs().cmp(1),r=i.precision,n=i.rounding,t!==-1?t===0?(e=la(i,r+4,n).times(.5),e.s=a.s,e):new i(NaN):(i.precision=r+6,i.rounding=1,a=a.div(new i(1).minus(a.times(a)).sqrt().plus(1)).atan(),i.precision=r,i.rounding=n,a.times(2)))};ge.inverseTangent=ge.atan=function(){var e,t,r,n,a,i,o,s,u,l=this,c=l.constructor,f=c.precision,m=c.rounding;if(l.isFinite()){if(l.isZero())return new c(l);if(l.abs().eq(1)&&f+4<=qm)return o=la(c,f+4,m).times(.25),o.s=l.s,o}else{if(!l.s)return new c(NaN);if(f+4<=qm)return o=la(c,f+4,m).times(.5),o.s=l.s,o}for(c.precision=s=f+10,c.rounding=1,r=Math.min(28,s/Ge+2|0),e=r;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(Ze=!1,t=Math.ceil(s/Ge),n=1,u=l.times(l),o=new c(l),a=l;e!==-1;)if(a=a.times(u),i=o.minus(a.div(n+=2)),a=a.times(u),o=i.plus(a.div(n+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===i.d[e]&&e--;);return r&&(o=o.times(2<<r-1)),Ze=!0,Re(o,c.precision=f,c.rounding=m,!0)};ge.isFinite=function(){return!!this.d};ge.isInteger=ge.isInt=function(){return!!this.d&&zr(this.e/Ge)>this.d.length-2};ge.isNaN=function(){return!this.s};ge.isNegative=ge.isNeg=function(){return this.s<0};ge.isPositive=ge.isPos=function(){return this.s>0};ge.isZero=function(){return!!this.d&&this.d[0]===0};ge.lessThan=ge.lt=function(e){return this.cmp(e)<0};ge.lessThanOrEqualTo=ge.lte=function(e){return this.cmp(e)<1};ge.logarithm=ge.log=function(e){var t,r,n,a,i,o,s,u,l=this,c=l.constructor,f=c.precision,m=c.rounding,d=5;if(e==null)e=new c(10),t=!0;else{if(e=new c(e),r=e.d,e.s<0||!r||!r[0]||e.eq(1))return new c(NaN);t=e.eq(10)}if(r=l.d,l.s<0||!r||!r[0]||l.eq(1))return new c(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(t)if(r.length>1)i=!0;else{for(a=r[0];a%10===0;)a/=10;i=a!==1}if(Ze=!1,s=f+d,o=oi(l,s),n=t?Yl(c,s+10):oi(e,s),u=It(o,n,s,1),Us(u.d,a=f,m))do if(s+=10,o=oi(l,s),n=t?Yl(c,s+10):oi(e,s),u=It(o,n,s,1),!i){+Mr(u.d).slice(a+1,a+15)+1==1e14&&(u=Re(u,f+1,0));break}while(Us(u.d,a+=10,m));return Ze=!0,Re(u,f,m)};ge.minus=ge.sub=function(e){var t,r,n,a,i,o,s,u,l,c,f,m,d=this,h=d.constructor;if(e=new h(e),!d.d||!e.d)return!d.s||!e.s?e=new h(NaN):d.d?e.s=-e.s:e=new h(e.d||d.s!==e.s?d:NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(l=d.d,m=e.d,s=h.precision,u=h.rounding,!l[0]||!m[0]){if(m[0])e.s=-e.s;else if(l[0])e=new h(d);else return new h(u===3?-0:0);return Ze?Re(e,s,u):e}if(r=zr(e.e/Ge),c=zr(d.e/Ge),l=l.slice(),i=c-r,i){for(f=i<0,f?(t=l,i=-i,o=m.length):(t=m,r=c,o=l.length),n=Math.max(Math.ceil(s/Ge),o)+2,i>n&&(i=n,t.length=1),t.reverse(),n=i;n--;)t.push(0);t.reverse()}else{for(n=l.length,o=m.length,f=n<o,f&&(o=n),n=0;n<o;n++)if(l[n]!=m[n]){f=l[n]<m[n];break}i=0}for(f&&(t=l,l=m,m=t,e.s=-e.s),o=l.length,n=m.length-o;n>0;--n)l[o++]=0;for(n=m.length;n>i;){if(l[--n]<m[n]){for(a=n;a&&l[--a]===0;)l[a]=Yn-1;--l[a],l[n]+=Yn}l[n]-=m[n]}for(;l[--o]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(e.d=l,e.e=Mc(l,r),Ze?Re(e,s,u):e):new h(u===3?-0:0)};ge.modulo=ge.mod=function(e){var t,r=this,n=r.constructor;return e=new n(e),!r.d||!e.s||e.d&&!e.d[0]?new n(NaN):!e.d||r.d&&!r.d[0]?Re(new n(r),n.precision,n.rounding):(Ze=!1,n.modulo==9?(t=It(r,e.abs(),0,3,1),t.s*=e.s):t=It(r,e,0,n.modulo,1),t=t.times(e),Ze=!0,r.minus(t))};ge.naturalExponential=ge.exp=function(){return Rm(this)};ge.naturalLogarithm=ge.ln=function(){return oi(this)};ge.negated=ge.neg=function(){var e=new this.constructor(this);return e.s=-e.s,Re(e)};ge.plus=ge.add=function(e){var t,r,n,a,i,o,s,u,l,c,f=this,m=f.constructor;if(e=new m(e),!f.d||!e.d)return!f.s||!e.s?e=new m(NaN):f.d||(e=new m(e.d||f.s===e.s?f:NaN)),e;if(f.s!=e.s)return e.s=-e.s,f.minus(e);if(l=f.d,c=e.d,s=m.precision,u=m.rounding,!l[0]||!c[0])return c[0]||(e=new m(f)),Ze?Re(e,s,u):e;if(i=zr(f.e/Ge),n=zr(e.e/Ge),l=l.slice(),a=i-n,a){for(a<0?(r=l,a=-a,o=c.length):(r=c,n=i,o=l.length),i=Math.ceil(s/Ge),o=i>o?i+1:o+1,a>o&&(a=o,r.length=1),r.reverse();a--;)r.push(0);r.reverse()}for(o=l.length,a=c.length,o-a<0&&(a=o,r=c,c=l,l=r),t=0;a;)t=(l[--a]=l[a]+c[a]+t)/Yn|0,l[a]%=Yn;for(t&&(l.unshift(t),++n),o=l.length;l[--o]==0;)l.pop();return e.d=l,e.e=Mc(l,n),Ze?Re(e,s,u):e};ge.precision=ge.sd=function(e){var t,r=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(hi+e);return r.d?(t=Nx(r.d),e&&r.e+1>t&&(t=r.e+1)):t=NaN,t};ge.round=function(){var e=this,t=e.constructor;return Re(new t(e),e.e+1,t.rounding)};ge.sine=ge.sin=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+Math.max(r.e,r.sd())+Ge,n.rounding=1,r=V8(n,Sx(n,r)),n.precision=e,n.rounding=t,Re($a>2?r.neg():r,e,t,!0)):new n(NaN)};ge.squareRoot=ge.sqrt=function(){var e,t,r,n,a,i,o=this,s=o.d,u=o.e,l=o.s,c=o.constructor;if(l!==1||!s||!s[0])return new c(!l||l<0&&(!s||s[0])?NaN:s?o:1/0);for(Ze=!1,l=Math.sqrt(+o),l==0||l==1/0?(t=Mr(s),(t.length+u)%2==0&&(t+="0"),l=Math.sqrt(t),u=zr((u+1)/2)-(u<0||u%2),l==1/0?t="5e"+u:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+u),n=new c(t)):n=new c(l.toString()),r=(u=c.precision)+3;;)if(i=n,n=i.plus(It(o,i,r+2,1)).times(.5),Mr(i.d).slice(0,r)===(t=Mr(n.d)).slice(0,r))if(t=t.slice(r-3,r+1),t=="9999"||!a&&t=="4999"){if(!a&&(Re(i,u+1,0),i.times(i).eq(o))){n=i;break}r+=4,a=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(Re(n,u+1,1),e=!n.times(n).eq(o));break}return Ze=!0,Re(n,u,c.rounding,e)};ge.tangent=ge.tan=function(){var e,t,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(e=n.precision,t=n.rounding,n.precision=e+10,n.rounding=1,r=r.sin(),r.s=1,r=It(r,new n(1).minus(r.times(r)).sqrt(),e+10,0),n.precision=e,n.rounding=t,Re($a==2||$a==4?r.neg():r,e,t,!0)):new n(NaN)};ge.times=ge.mul=function(e){var t,r,n,a,i,o,s,u,l,c=this,f=c.constructor,m=c.d,d=(e=new f(e)).d;if(e.s*=c.s,!m||!m[0]||!d||!d[0])return new f(!e.s||m&&!m[0]&&!d||d&&!d[0]&&!m?NaN:!m||!d?e.s/0:e.s*0);for(r=zr(c.e/Ge)+zr(e.e/Ge),u=m.length,l=d.length,u<l&&(i=m,m=d,d=i,o=u,u=l,l=o),i=[],o=u+l,n=o;n--;)i.push(0);for(n=l;--n>=0;){for(t=0,a=u+n;a>n;)s=i[a]+d[n]*m[a-n-1]+t,i[a--]=s%Yn|0,t=s/Yn|0;i[a]=(i[a]+t)%Yn|0}for(;!i[--o];)i.pop();return t?++r:i.shift(),e.d=i,e.e=Mc(i,r),Ze?Re(e,f.precision,f.rounding):e};ge.toBinary=function(e,t){return Ed(this,2,e,t)};ge.toDecimalPlaces=ge.toDP=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(un(e,0,bi),t===void 0?t=n.rounding:un(t,0,8),Re(r,e+r.e+1,t))};ge.toExponential=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=ma(n,!0):(un(e,0,bi),t===void 0?t=a.rounding:un(t,0,8),n=Re(new a(n),e+1,t),r=ma(n,!0,e+1)),n.isNeg()&&!n.isZero()?"-"+r:r};ge.toFixed=function(e,t){var r,n,a=this,i=a.constructor;return e===void 0?r=ma(a):(un(e,0,bi),t===void 0?t=i.rounding:un(t,0,8),n=Re(new i(a),e+a.e+1,t),r=ma(n,!1,e+n.e+1)),a.isNeg()&&!a.isZero()?"-"+r:r};ge.toFraction=function(e){var t,r,n,a,i,o,s,u,l,c,f,m,d=this,h=d.d,p=d.constructor;if(!h)return new p(d);if(l=r=new p(1),n=u=new p(0),t=new p(n),i=t.e=Nx(h)-d.e-1,o=i%Ge,t.d[0]=lr(10,o<0?Ge+o:o),e==null)e=i>0?t:l;else{if(s=new p(e),!s.isInt()||s.lt(l))throw Error(hi+s);e=s.gt(t)?i>0?t:l:s}for(Ze=!1,s=new p(Mr(h)),c=p.precision,p.precision=i=h.length*Ge*2;f=It(s,t,0,1,1),a=r.plus(f.times(n)),a.cmp(e)!=1;)r=n,n=a,a=l,l=u.plus(f.times(a)),u=a,a=t,t=s.minus(f.times(a)),s=a;return a=It(e.minus(r),n,0,1,1),u=u.plus(a.times(l)),r=r.plus(a.times(n)),u.s=l.s=d.s,m=It(l,n,i,1).minus(d).abs().cmp(It(u,r,i,1).minus(d).abs())<1?[l,n]:[u,r],p.precision=c,Ze=!0,m};ge.toHexadecimal=ge.toHex=function(e,t){return Ed(this,16,e,t)};ge.toNearest=function(e,t){var r=this,n=r.constructor;if(r=new n(r),e==null){if(!r.d)return r;e=new n(1),t=n.rounding}else{if(e=new n(e),t===void 0?t=n.rounding:un(t,0,8),!r.d)return e.s?r:e;if(!e.d)return e.s&&(e.s=r.s),e}return e.d[0]?(Ze=!1,r=It(r,e,0,t,1).times(e),Ze=!0,Re(r)):(e.s=r.s,r=e),r};ge.toNumber=function(){return+this};ge.toOctal=function(e,t){return Ed(this,8,e,t)};ge.toPower=ge.pow=function(e){var t,r,n,a,i,o,s=this,u=s.constructor,l=+(e=new u(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new u(lr(+s,l));if(s=new u(s),s.eq(1))return s;if(n=u.precision,i=u.rounding,e.eq(1))return Re(s,n,i);if(t=zr(e.e/Ge),t>=e.d.length-1&&(r=l<0?-l:l)<=R8)return a=Ax(u,s,r,n),e.s<0?new u(1).div(a):Re(a,n,i);if(o=s.s,o<0){if(t<e.d.length-1)return new u(NaN);if((e.d[t]&1)==0&&(o=1),s.e==0&&s.d[0]==1&&s.d.length==1)return s.s=o,s}return r=lr(+s,l),t=r==0||!isFinite(r)?zr(l*(Math.log("0."+Mr(s.d))/Math.LN10+s.e+1)):new u(r+"").e,t>u.maxE+1||t<u.minE-1?new u(t>0?o/0:0):(Ze=!1,u.rounding=s.s=1,r=Math.min(12,(t+"").length),a=Rm(e.times(oi(s,n+r)),n),a.d&&(a=Re(a,n+5,1),Us(a.d,n,i)&&(t=n+10,a=Re(Rm(e.times(oi(s,t+r)),t),t+5,1),+Mr(a.d).slice(n+1,n+15)+1==1e14&&(a=Re(a,n+1,0)))),a.s=o,Ze=!0,u.rounding=i,Re(a,n,i))};ge.toPrecision=function(e,t){var r,n=this,a=n.constructor;return e===void 0?r=ma(n,n.e<=a.toExpNeg||n.e>=a.toExpPos):(un(e,1,bi),t===void 0?t=a.rounding:un(t,0,8),n=Re(new a(n),e,t),r=ma(n,e<=n.e||n.e<=a.toExpNeg,e)),n.isNeg()&&!n.isZero()?"-"+r:r};ge.toSignificantDigits=ge.toSD=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(un(e,1,bi),t===void 0?t=n.rounding:un(t,0,8)),Re(new n(r),e,t)};ge.toString=function(){var e=this,t=e.constructor,r=ma(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+r:r};ge.truncated=ge.trunc=function(){return Re(new this.constructor(this),this.e+1,1)};ge.valueOf=ge.toJSON=function(){var e=this,t=e.constructor,r=ma(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+r:r};function Mr(e){var t,r,n,a=e.length-1,i="",o=e[0];if(a>0){for(i+=o,t=1;t<a;t++)n=e[t]+"",r=Ge-n.length,r&&(i+=Xa(r)),i+=n;o=e[t],n=o+"",r=Ge-n.length,r&&(i+=Xa(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}function un(e,t,r){if(e!==~~e||e<t||e>r)throw Error(hi+e)}function Us(e,t,r,n){var a,i,o,s;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=Ge,a=0):(a=Math.ceil((t+1)/Ge),t%=Ge),i=lr(10,Ge-t),s=e[a]%i|0,n==null?t<3?(t==0?s=s/100|0:t==1&&(s=s/10|0),o=r<4&&s==99999||r>3&&s==49999||s==5e4||s==0):o=(r<4&&s+1==i||r>3&&s+1==i/2)&&(e[a+1]/i/100|0)==lr(10,t-2)-1||(s==i/2||s==0)&&(e[a+1]/i/100|0)==0:t<4?(t==0?s=s/1e3|0:t==1?s=s/100|0:t==2&&(s=s/10|0),o=(n||r<4)&&s==9999||!n&&r>3&&s==4999):o=((n||r<4)&&s+1==i||!n&&r>3&&s+1==i/2)&&(e[a+1]/i/1e3|0)==lr(10,t-3)-1,o}function Ml(e,t,r){for(var n,a=[0],i,o=0,s=e.length;o<s;){for(i=a.length;i--;)a[i]*=t;for(a[0]+=zm.indexOf(e.charAt(o++)),n=0;n<a.length;n++)a[n]>r-1&&(a[n+1]===void 0&&(a[n+1]=0),a[n+1]+=a[n]/r|0,a[n]%=r)}return a.reverse()}function H8(e,t){var r,n,a;if(t.isZero())return t;n=t.d.length,n<32?(r=Math.ceil(n/3),a=(1/Tc(4,r)).toString()):(r=16,a="2.3283064365386962890625e-10"),e.precision+=r,t=Wo(e,1,t.times(a),new e(1));for(var i=r;i--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=r,t}var It=(function(){function e(n,a,i){var o,s=0,u=n.length;for(n=n.slice();u--;)o=n[u]*a+s,n[u]=o%i|0,s=o/i|0;return s&&n.unshift(s),n}function t(n,a,i,o){var s,u;if(i!=o)u=i>o?1:-1;else for(s=u=0;s<i;s++)if(n[s]!=a[s]){u=n[s]>a[s]?1:-1;break}return u}function r(n,a,i,o){for(var s=0;i--;)n[i]-=s,s=n[i]<a[i]?1:0,n[i]=s*o+n[i]-a[i];for(;!n[0]&&n.length>1;)n.shift()}return function(n,a,i,o,s,u){var l,c,f,m,d,h,p,y,w,D,v,x,g,b,C,N,A,E,S,F,k=n.constructor,$=n.s==a.s?1:-1,R=n.d,M=a.d;if(!R||!R[0]||!M||!M[0])return new k(!n.s||!a.s||(R?M&&R[0]==M[0]:!M)?NaN:R&&R[0]==0||!M?$*0:$/0);for(u?(d=1,c=n.e-a.e):(u=Yn,d=Ge,c=zr(n.e/d)-zr(a.e/d)),S=M.length,A=R.length,w=new k($),D=w.d=[],f=0;M[f]==(R[f]||0);f++);if(M[f]>(R[f]||0)&&c--,i==null?(b=i=k.precision,o=k.rounding):s?b=i+(n.e-a.e)+1:b=i,b<0)D.push(1),h=!0;else{if(b=b/d+2|0,f=0,S==1){for(m=0,M=M[0],b++;(f<A||m)&&b--;f++)C=m*u+(R[f]||0),D[f]=C/M|0,m=C%M|0;h=m||f<A}else{for(m=u/(M[0]+1)|0,m>1&&(M=e(M,m,u),R=e(R,m,u),S=M.length,A=R.length),N=S,v=R.slice(0,S),x=v.length;x<S;)v[x++]=0;F=M.slice(),F.unshift(0),E=M[0],M[1]>=u/2&&++E;do m=0,l=t(M,v,S,x),l<0?(g=v[0],S!=x&&(g=g*u+(v[1]||0)),m=g/E|0,m>1?(m>=u&&(m=u-1),p=e(M,m,u),y=p.length,x=v.length,l=t(p,v,y,x),l==1&&(m--,r(p,S<y?F:M,y,u))):(m==0&&(l=m=1),p=M.slice()),y=p.length,y<x&&p.unshift(0),r(v,p,x,u),l==-1&&(x=v.length,l=t(M,v,S,x),l<1&&(m++,r(v,S<x?F:M,x,u))),x=v.length):l===0&&(m++,v=[0]),D[f++]=m,l&&v[0]?v[x++]=R[N]||0:(v=[R[N]],x=1);while((N++<A||v[0]!==void 0)&&b--);h=v[0]!==void 0}D[0]||D.shift()}if(d==1)w.e=c,yx=h;else{for(f=1,m=D[0];m>=10;m/=10)f++;w.e=f+c*d-1,Re(w,s?i+w.e+1:i,o,h)}return w}})();function Re(e,t,r,n){var a,i,o,s,u,l,c,f,m,d=e.constructor;e:if(t!=null){if(f=e.d,!f)return e;for(a=1,s=f[0];s>=10;s/=10)a++;if(i=t-a,i<0)i+=Ge,o=t,c=f[m=0],u=c/lr(10,a-o-1)%10|0;else if(m=Math.ceil((i+1)/Ge),s=f.length,m>=s)if(n){for(;s++<=m;)f.push(0);c=u=0,a=1,i%=Ge,o=i-Ge+1}else break e;else{for(c=s=f[m],a=1;s>=10;s/=10)a++;i%=Ge,o=i-Ge+a,u=o<0?0:c/lr(10,a-o-1)%10|0}if(n=n||t<0||f[m+1]!==void 0||(o<0?c:c%lr(10,a-o-1)),l=r<4?(u||n)&&(r==0||r==(e.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(i>0?o>0?c/lr(10,a-o):0:f[m-1])%10&1||r==(e.s<0?8:7)),t<1||!f[0])return f.length=0,l?(t-=e.e+1,f[0]=lr(10,(Ge-t%Ge)%Ge),e.e=-t||0):f[0]=e.e=0,e;if(i==0?(f.length=m,s=1,m--):(f.length=m+1,s=lr(10,Ge-i),f[m]=o>0?(c/lr(10,a-o)%lr(10,o)|0)*s:0),l)for(;;)if(m==0){for(i=1,o=f[0];o>=10;o/=10)i++;for(o=f[0]+=s,s=1;o>=10;o/=10)s++;i!=s&&(e.e++,f[0]==Yn&&(f[0]=1));break}else{if(f[m]+=s,f[m]!=Yn)break;f[m--]=0,s=1}for(i=f.length;f[--i]===0;)f.pop()}return Ze&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function ma(e,t,r){if(!e.isFinite())return Ex(e);var n,a=e.e,i=Mr(e.d),o=i.length;return t?(r&&(n=r-o)>0?i=i.charAt(0)+"."+i.slice(1)+Xa(n):o>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):a<0?(i="0."+Xa(-a-1)+i,r&&(n=r-o)>0&&(i+=Xa(n))):a>=o?(i+=Xa(a+1-o),r&&(n=r-a-1)>0&&(i=i+"."+Xa(n))):((n=a+1)<o&&(i=i.slice(0,n)+"."+i.slice(n)),r&&(n=r-o)>0&&(a+1===o&&(i+="."),i+=Xa(n))),i}function Mc(e,t){var r=e[0];for(t*=Ge;r>=10;r/=10)t++;return t}function Yl(e,t,r){if(t>L8)throw Ze=!0,r&&(e.precision=r),Error(bx);return Re(new e(Jl),t,1,!0)}function la(e,t,r){if(t>qm)throw Error(bx);return Re(new e(Kl),t,r,!0)}function Nx(e){var t=e.length-1,r=t*Ge+1;if(t=e[t],t){for(;t%10==0;t/=10)r--;for(t=e[0];t>=10;t/=10)r++}return r}function Xa(e){for(var t="";e--;)t+="0";return t}function Ax(e,t,r,n){var a,i=new e(1),o=Math.ceil(n/Ge+4);for(Ze=!1;;){if(r%2&&(i=i.times(t),a0(i.d,o)&&(a=!0)),r=zr(r/2),r===0){r=i.d.length-1,a&&i.d[r]===0&&++i.d[r];break}t=t.times(t),a0(t.d,o)}return Ze=!0,i}function n0(e){return e.d[e.d.length-1]&1}function Cx(e,t,r){for(var n,a,i=new e(t[0]),o=0;++o<t.length;){if(a=new e(t[o]),!a.s){i=a;break}n=i.cmp(a),(n===r||n===0&&i.s===r)&&(i=a)}return i}function Rm(e,t){var r,n,a,i,o,s,u,l=0,c=0,f=0,m=e.constructor,d=m.rounding,h=m.precision;if(!e.d||!e.d[0]||e.e>17)return new m(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:NaN);for(t==null?(Ze=!1,u=h):u=t,s=new m(.03125);e.e>-2;)e=e.times(s),f+=5;for(n=Math.log(lr(2,f))/Math.LN10*2+5|0,u+=n,r=i=o=new m(1),m.precision=u;;){if(i=Re(i.times(e),u,1),r=r.times(++c),s=o.plus(It(i,r,u,1)),Mr(s.d).slice(0,u)===Mr(o.d).slice(0,u)){for(a=f;a--;)o=Re(o.times(o),u,1);if(t==null)if(l<3&&Us(o.d,u-n,d,l))m.precision=u+=10,r=i=s=new m(1),c=0,l++;else return Re(o,m.precision=h,d,Ze=!0);else return m.precision=h,o}o=s}}function oi(e,t){var r,n,a,i,o,s,u,l,c,f,m,d=1,h=10,p=e,y=p.d,w=p.constructor,D=w.rounding,v=w.precision;if(p.s<0||!y||!y[0]||!p.e&&y[0]==1&&y.length==1)return new w(y&&!y[0]?-1/0:p.s!=1?NaN:y?0:p);if(t==null?(Ze=!1,c=v):c=t,w.precision=c+=h,r=Mr(y),n=r.charAt(0),Math.abs(i=p.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)p=p.times(e),r=Mr(p.d),n=r.charAt(0),d++;i=p.e,n>1?(p=new w("0."+r),i++):p=new w(n+"."+r.slice(1))}else return l=Yl(w,c+2,v).times(i+""),p=oi(new w(n+"."+r.slice(1)),c-h).plus(l),w.precision=v,t==null?Re(p,v,D,Ze=!0):p;for(f=p,u=o=p=It(p.minus(1),p.plus(1),c,1),m=Re(p.times(p),c,1),a=3;;){if(o=Re(o.times(m),c,1),l=u.plus(It(o,new w(a),c,1)),Mr(l.d).slice(0,c)===Mr(u.d).slice(0,c))if(u=u.times(2),i!==0&&(u=u.plus(Yl(w,c+2,v).times(i+""))),u=It(u,new w(d),c,1),t==null)if(Us(u.d,c-h,D,s))w.precision=c+=h,l=o=p=It(f.minus(1),f.plus(1),c,1),m=Re(p.times(p),c,1),a=s=1;else return Re(u,w.precision=v,D,Ze=!0);else return w.precision=v,u;u=l,a+=2}}function Ex(e){return String(e.s*e.s/0)}function Tl(e,t){var r,n,a;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;n++);for(a=t.length;t.charCodeAt(a-1)===48;--a);if(t=t.slice(n,a),t){if(a-=n,e.e=r=r-n-1,e.d=[],n=(r+1)%Ge,r<0&&(n+=Ge),n<a){for(n&&e.d.push(+t.slice(0,n)),a-=Ge;n<a;)e.d.push(+t.slice(n,n+=Ge));t=t.slice(n),n=Ge-t.length}else n-=a;for(;n--;)t+="0";e.d.push(+t),Ze&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function G8(e,t){var r,n,a,i,o,s,u,l,c;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Dx.test(t))return Tl(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(j8.test(t))r=16,t=t.toLowerCase();else if(z8.test(t))r=2;else if(q8.test(t))r=8;else throw Error(hi+t);for(i=t.search(/p/i),i>0?(u=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),o=i>=0,n=e.constructor,o&&(t=t.replace(".",""),s=t.length,i=s-i,a=Ax(n,new n(r),i,i*2)),l=Ml(t,r,Yn),c=l.length-1,i=c;l[i]===0;--i)l.pop();return i<0?new n(e.s*0):(e.e=Mc(l,c),e.d=l,Ze=!1,o&&(e=It(e,a,s*4)),u&&(e=e.times(Math.abs(u)<54?lr(2,u):pi.pow(2,u))),Ze=!0,e)}function V8(e,t){var r,n=t.d.length;if(n<3)return t.isZero()?t:Wo(e,2,t,t);r=1.4*Math.sqrt(n),r=r>16?16:r|0,t=t.times(1/Tc(5,r)),t=Wo(e,2,t,t);for(var a,i=new e(5),o=new e(16),s=new e(20);r--;)a=t.times(t),t=t.times(i.plus(a.times(o.times(a).minus(s))));return t}function Wo(e,t,r,n,a){var i,o,s,u,l=e.precision,c=Math.ceil(l/Ge);for(Ze=!1,u=r.times(r),s=new e(n);;){if(o=It(s.times(u),new e(t++*t++),l,1),s=a?n.plus(o):n.minus(o),n=It(o.times(u),new e(t++*t++),l,1),o=s.plus(n),o.d[c]!==void 0){for(i=c;o.d[i]===s.d[i]&&i--;);if(i==-1)break}i=s,s=n,n=o,o=i}return Ze=!0,o.d.length=c+1,o}function Tc(e,t){for(var r=e;--t;)r*=e;return r}function Sx(e,t){var r,n=t.s<0,a=la(e,e.precision,1),i=a.times(.5);if(t=t.abs(),t.lte(i))return $a=n?4:1,t;if(r=t.divToInt(a),r.isZero())$a=n?3:2;else{if(t=t.minus(r.times(a)),t.lte(i))return $a=n0(r)?n?2:3:n?4:1,t;$a=n0(r)?n?1:4:n?3:2}return t.minus(a).abs()}function Ed(e,t,r,n){var a,i,o,s,u,l,c,f,m,d=e.constructor,h=r!==void 0;if(h?(un(r,1,bi),n===void 0?n=d.rounding:un(n,0,8)):(r=d.precision,n=d.rounding),!e.isFinite())c=Ex(e);else{for(c=ma(e),o=c.indexOf("."),h?(a=2,t==16?r=r*4-3:t==8&&(r=r*3-2)):a=t,o>=0&&(c=c.replace(".",""),m=new d(1),m.e=c.length-o,m.d=Ml(ma(m),10,a),m.e=m.d.length),f=Ml(c,10,a),i=u=f.length;f[--u]==0;)f.pop();if(!f[0])c=h?"0p+0":"0";else{if(o<0?i--:(e=new d(e),e.d=f,e.e=i,e=It(e,m,r,n,0,a),f=e.d,i=e.e,l=yx),o=f[r],s=a/2,l=l||f[r+1]!==void 0,l=n<4?(o!==void 0||l)&&(n===0||n===(e.s<0?3:2)):o>s||o===s&&(n===4||l||n===6&&f[r-1]&1||n===(e.s<0?8:7)),f.length=r,l)for(;++f[--r]>a-1;)f[r]=0,r||(++i,f.unshift(1));for(u=f.length;!f[u-1];--u);for(o=0,c="";o<u;o++)c+=zm.charAt(f[o]);if(h){if(u>1)if(t==16||t==8){for(o=t==16?4:3,--u;u%o;u++)c+="0";for(f=Ml(c,a,t),u=f.length;!f[u-1];--u);for(o=1,c="1.";o<u;o++)c+=zm.charAt(f[o])}else c=c.charAt(0)+"."+c.slice(1);c=c+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)c="0"+c;c="0."+c}else if(++i>u)for(i-=u;i--;)c+="0";else i<u&&(c=c.slice(0,i)+"."+c.slice(i))}c=(t==16?"0x":t==2?"0b":t==8?"0o":"")+c}return e.s<0?"-"+c:c}function a0(e,t){if(e.length>t)return e.length=t,!0}function U8(e){return new this(e).abs()}function W8(e){return new this(e).acos()}function J8(e){return new this(e).acosh()}function K8(e,t){return new this(e).plus(t)}function Y8(e){return new this(e).asin()}function Z8(e){return new this(e).asinh()}function Q8(e){return new this(e).atan()}function X8(e){return new this(e).atanh()}function e9(e,t){e=new this(e),t=new this(t);var r,n=this.precision,a=this.rounding,i=n+4;return!e.s||!t.s?r=new this(NaN):!e.d&&!t.d?(r=la(this,i,1).times(t.s>0?.25:.75),r.s=e.s):!t.d||e.isZero()?(r=t.s<0?la(this,n,a):new this(0),r.s=e.s):!e.d||t.isZero()?(r=la(this,i,1).times(.5),r.s=e.s):t.s<0?(this.precision=i,this.rounding=1,r=this.atan(It(e,t,i,1)),t=la(this,i,1),this.precision=n,this.rounding=a,r=e.s<0?r.minus(t):r.plus(t)):r=this.atan(It(e,t,i,1)),r}function t9(e){return new this(e).cbrt()}function r9(e){return Re(e=new this(e),e.e+1,2)}function n9(e,t,r){return new this(e).clamp(t,r)}function a9(e){if(!e||typeof e!="object")throw Error(Sc+"Object expected");var t,r,n,a=e.defaults===!0,i=["precision",1,bi,"rounding",0,8,"toExpNeg",-Io,0,"toExpPos",0,Io,"maxE",0,Io,"minE",-Io,0,"modulo",0,9];for(t=0;t<i.length;t+=3)if(r=i[t],a&&(this[r]=jm[r]),(n=e[r])!==void 0)if(zr(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(hi+r+": "+n);if(r="crypto",a&&(this[r]=jm[r]),(n=e[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(wx);else this[r]=!1;else throw Error(hi+r+": "+n);return this}function i9(e){return new this(e).cos()}function o9(e){return new this(e).cosh()}function Mx(e){var t,r,n;function a(i){var o,s,u,l=this;if(!(l instanceof a))return new a(i);if(l.constructor=a,i0(i)){l.s=i.s,Ze?!i.d||i.e>a.maxE?(l.e=NaN,l.d=null):i.e<a.minE?(l.e=0,l.d=[0]):(l.e=i.e,l.d=i.d.slice()):(l.e=i.e,l.d=i.d?i.d.slice():i.d);return}if(u=typeof i,u==="number"){if(i===0){l.s=1/i<0?-1:1,l.e=0,l.d=[0];return}if(i<0?(i=-i,l.s=-1):l.s=1,i===~~i&&i<1e7){for(o=0,s=i;s>=10;s/=10)o++;Ze?o>a.maxE?(l.e=NaN,l.d=null):o<a.minE?(l.e=0,l.d=[0]):(l.e=o,l.d=[i]):(l.e=o,l.d=[i]);return}if(i*0!==0){i||(l.s=NaN),l.e=NaN,l.d=null;return}return Tl(l,i.toString())}if(u==="string")return(s=i.charCodeAt(0))===45?(i=i.slice(1),l.s=-1):(s===43&&(i=i.slice(1)),l.s=1),Dx.test(i)?Tl(l,i):G8(l,i);if(u==="bigint")return i<0?(i=-i,l.s=-1):l.s=1,Tl(l,i.toString());throw Error(hi+i)}if(a.prototype=ge,a.ROUND_UP=0,a.ROUND_DOWN=1,a.ROUND_CEIL=2,a.ROUND_FLOOR=3,a.ROUND_HALF_UP=4,a.ROUND_HALF_DOWN=5,a.ROUND_HALF_EVEN=6,a.ROUND_HALF_CEIL=7,a.ROUND_HALF_FLOOR=8,a.EUCLID=9,a.config=a.set=a9,a.clone=Mx,a.isDecimal=i0,a.abs=U8,a.acos=W8,a.acosh=J8,a.add=K8,a.asin=Y8,a.asinh=Z8,a.atan=Q8,a.atanh=X8,a.atan2=e9,a.cbrt=t9,a.ceil=r9,a.clamp=n9,a.cos=i9,a.cosh=o9,a.div=s9,a.exp=u9,a.floor=l9,a.hypot=c9,a.ln=f9,a.log=m9,a.log10=h9,a.log2=d9,a.max=p9,a.min=g9,a.mod=v9,a.mul=y9,a.pow=b9,a.random=w9,a.round=x9,a.sign=D9,a.sin=N9,a.sinh=A9,a.sqrt=C9,a.sub=E9,a.sum=S9,a.tan=M9,a.tanh=T9,a.trunc=F9,e===void 0&&(e={}),e&&e.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return a.config(e),a}function s9(e,t){return new this(e).div(t)}function u9(e){return new this(e).exp()}function l9(e){return Re(e=new this(e),e.e+1,3)}function c9(){var e,t,r=new this(0);for(Ze=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)r.d&&(r=r.plus(t.times(t)));else{if(t.s)return Ze=!0,new this(1/0);r=t}return Ze=!0,r.sqrt()}function i0(e){return e instanceof pi||e&&e.toStringTag===xx||!1}function f9(e){return new this(e).ln()}function m9(e,t){return new this(e).log(t)}function d9(e){return new this(e).log(2)}function h9(e){return new this(e).log(10)}function p9(){return Cx(this,arguments,-1)}function g9(){return Cx(this,arguments,1)}function v9(e,t){return new this(e).mod(t)}function y9(e,t){return new this(e).mul(t)}function b9(e,t){return new this(e).pow(t)}function w9(e){var t,r,n,a,i=0,o=new this(1),s=[];if(e===void 0?e=this.precision:un(e,1,bi),n=Math.ceil(e/Ge),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(n));i<n;)a=t[i],a>=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:s[i++]=a%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(n*=4);i<n;)a=t[i]+(t[i+1]<<8)+(t[i+2]<<16)+((t[i+3]&127)<<24),a>=214e7?crypto.randomBytes(4).copy(t,i):(s.push(a%1e7),i+=4);i=n/4}else throw Error(wx);else for(;i<n;)s[i++]=Math.random()*1e7|0;for(n=s[--i],e%=Ge,n&&e&&(a=lr(10,Ge-e),s[i]=(n/a|0)*a);s[i]===0;i--)s.pop();if(i<0)r=0,s=[0];else{for(r=-1;s[0]===0;r-=Ge)s.shift();for(n=1,a=s[0];a>=10;a/=10)n++;n<Ge&&(r-=Ge-n)}return o.e=r,o.d=s,o}function x9(e){return Re(e=new this(e),e.e+1,this.rounding)}function D9(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function N9(e){return new this(e).sin()}function A9(e){return new this(e).sinh()}function C9(e){return new this(e).sqrt()}function E9(e,t){return new this(e).sub(t)}function S9(){var e=0,t=arguments,r=new this(t[e]);for(Ze=!1;r.s&&++e<t.length;)r=r.plus(t[e]);return Ze=!0,Re(r,this.precision,this.rounding)}function M9(e){return new this(e).tan()}function T9(e){return new this(e).tanh()}function F9(e){return Re(e=new this(e),e.e+1,1)}ge[Symbol.for("nodejs.util.inspect.custom")]=ge.toString;ge[Symbol.toStringTag]="Decimal";var pi=ge.constructor=Mx(jm);Jl=new pi(Jl);Kl=new pi(Kl);var P9="BigNumber",k9=["?on","config"],O9=I(P9,k9,e=>{var{on:t,config:r}=e,n=pi.clone({precision:r.precision,modulo:pi.EUCLID});return n.prototype=Object.create(n.prototype),n.prototype.type="BigNumber",n.prototype.isBigNumber=!0,n.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},n.fromJSON=function(a){return new n(a.value)},t&&t("config",function(a,i){a.precision!==i.precision&&n.config({precision:a.precision})}),n},{isClass:!0});const Br=Math.cosh||function(e){return Math.abs(e)<1e-9?1-e:(Math.exp(e)+Math.exp(-e))*.5},En=Math.sinh||function(e){return Math.abs(e)<1e-9?e:(Math.exp(e)-Math.exp(-e))*.5},$9=e=>{const t=Math.sin(.5*e);return-2*t*t},_f=function(e,t){return e=Math.abs(e),t=Math.abs(t),e<t&&([e,t]=[t,e]),e<1e8?Math.sqrt(e*e+t*t):(t/=e,e*Math.sqrt(1+t*t))},Eo=function(){throw SyntaxError("Invalid Param")};function If(e,t){const r=Math.abs(e),n=Math.abs(t);return e===0?Math.log(n):t===0?Math.log(r):r<3e3&&n<3e3?Math.log(e*e+t*t)*.5:(e=e*.5,t=t*.5,.5*Math.log(e*e+t*t)+Math.LN2)}const B9={re:0,im:0},zi=function(e,t){const r=B9;if(e==null)r.re=r.im=0;else if(t!==void 0)r.re=e,r.im=t;else switch(typeof e){case"object":if("im"in e&&"re"in e)r.re=e.re,r.im=e.im;else if("abs"in e&&"arg"in e){if(!isFinite(e.abs)&&isFinite(e.arg))return ce.INFINITY;r.re=e.abs*Math.cos(e.arg),r.im=e.abs*Math.sin(e.arg)}else if("r"in e&&"phi"in e){if(!isFinite(e.r)&&isFinite(e.phi))return ce.INFINITY;r.re=e.r*Math.cos(e.phi),r.im=e.r*Math.sin(e.phi)}else e.length===2?(r.re=e[0],r.im=e[1]):Eo();break;case"string":r.im=r.re=0;const n=e.replace(/_/g,"").match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g);let a=1,i=0;n===null&&Eo();for(let o=0;o<n.length;o++){const s=n[o];s===" "||s===" "||s===`
34
+ `||(s==="+"?a++:s==="-"?i++:s==="i"||s==="I"?(a+i===0&&Eo(),n[o+1]!==" "&&!isNaN(n[o+1])?(r.im+=parseFloat((i%2?"-":"")+n[o+1]),o++):r.im+=parseFloat((i%2?"-":"")+"1"),a=i=0):((a+i===0||isNaN(s))&&Eo(),n[o+1]==="i"||n[o+1]==="I"?(r.im+=parseFloat((i%2?"-":"")+s),o++):r.re+=parseFloat((i%2?"-":"")+s),a=i=0))}a+i>0&&Eo();break;case"number":r.im=0,r.re=e;break;default:Eo()}return isNaN(r.re)||isNaN(r.im),r};function ce(e,t){if(!(this instanceof ce))return new ce(e,t);const r=zi(e,t);this.re=r.re,this.im=r.im}ce.prototype={re:0,im:0,sign:function(){const e=_f(this.re,this.im);return new ce(this.re/e,this.im/e)},add:function(e,t){const r=zi(e,t),n=this.isInfinite(),a=!(isFinite(r.re)&&isFinite(r.im));return n||a?n&&a?ce.NAN:ce.INFINITY:new ce(this.re+r.re,this.im+r.im)},sub:function(e,t){const r=zi(e,t),n=this.isInfinite(),a=!(isFinite(r.re)&&isFinite(r.im));return n||a?n&&a?ce.NAN:ce.INFINITY:new ce(this.re-r.re,this.im-r.im)},mul:function(e,t){const r=zi(e,t),n=this.isInfinite(),a=!(isFinite(r.re)&&isFinite(r.im)),i=this.re===0&&this.im===0,o=r.re===0&&r.im===0;return n&&o||a&&i?ce.NAN:n||a?ce.INFINITY:r.im===0&&this.im===0?new ce(this.re*r.re,0):new ce(this.re*r.re-this.im*r.im,this.re*r.im+this.im*r.re)},div:function(e,t){const r=zi(e,t),n=this.isInfinite(),a=!(isFinite(r.re)&&isFinite(r.im)),i=this.re===0&&this.im===0,o=r.re===0&&r.im===0;if(i&&o||n&&a)return ce.NAN;if(o||n)return ce.INFINITY;if(i||a)return ce.ZERO;if(r.im===0)return new ce(this.re/r.re,this.im/r.re);if(Math.abs(r.re)<Math.abs(r.im)){const s=r.re/r.im,u=r.re*s+r.im;return new ce((this.re*s+this.im)/u,(this.im*s-this.re)/u)}else{const s=r.im/r.re,u=r.im*s+r.re;return new ce((this.re+this.im*s)/u,(this.im-this.re*s)/u)}},pow:function(e,t){const r=zi(e,t),n=this.re===0&&this.im===0;if(r.re===0&&r.im===0)return ce.ONE;if(r.im===0){if(this.im===0&&this.re>0)return new ce(Math.pow(this.re,r.re),0);if(this.re===0)switch((r.re%4+4)%4){case 0:return new ce(Math.pow(this.im,r.re),0);case 1:return new ce(0,Math.pow(this.im,r.re));case 2:return new ce(-Math.pow(this.im,r.re),0);case 3:return new ce(0,-Math.pow(this.im,r.re))}}if(n&&r.re>0)return ce.ZERO;const i=Math.atan2(this.im,this.re),o=If(this.re,this.im);let s=Math.exp(r.re*o-r.im*i),u=r.im*o+r.re*i;return new ce(s*Math.cos(u),s*Math.sin(u))},sqrt:function(){const e=this.re,t=this.im;if(t===0)return e>=0?new ce(Math.sqrt(e),0):new ce(0,Math.sqrt(-e));const r=_f(e,t);let n=Math.sqrt(.5*(r+Math.abs(e))),a=Math.abs(t)/(2*n);return e>=0?new ce(n,t<0?-a:a):new ce(a,t<0?-n:n)},exp:function(){const e=Math.exp(this.re);return this.im===0?new ce(e,0):new ce(e*Math.cos(this.im),e*Math.sin(this.im))},expm1:function(){const e=this.re,t=this.im;return new ce(Math.expm1(e)*Math.cos(t)+$9(t),Math.exp(e)*Math.sin(t))},log:function(){const e=this.re,t=this.im;return t===0&&e>0?new ce(Math.log(e),0):new ce(If(e,t),Math.atan2(t,e))},abs:function(){return _f(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){const e=this.re,t=this.im;return new ce(Math.sin(e)*Br(t),Math.cos(e)*En(t))},cos:function(){const e=this.re,t=this.im;return new ce(Math.cos(e)*Br(t),-Math.sin(e)*En(t))},tan:function(){const e=2*this.re,t=2*this.im,r=Math.cos(e)+Br(t);return new ce(Math.sin(e)/r,En(t)/r)},cot:function(){const e=2*this.re,t=2*this.im,r=Math.cos(e)-Br(t);return new ce(-Math.sin(e)/r,En(t)/r)},sec:function(){const e=this.re,t=this.im,r=.5*Br(2*t)+.5*Math.cos(2*e);return new ce(Math.cos(e)*Br(t)/r,Math.sin(e)*En(t)/r)},csc:function(){const e=this.re,t=this.im,r=.5*Br(2*t)-.5*Math.cos(2*e);return new ce(Math.sin(e)*Br(t)/r,-Math.cos(e)*En(t)/r)},asin:function(){const e=this.re,t=this.im,r=new ce(t*t-e*e+1,-2*e*t).sqrt(),n=new ce(r.re-t,r.im+e).log();return new ce(n.im,-n.re)},acos:function(){const e=this.re,t=this.im,r=new ce(t*t-e*e+1,-2*e*t).sqrt(),n=new ce(r.re-t,r.im+e).log();return new ce(Math.PI/2-n.im,n.re)},atan:function(){const e=this.re,t=this.im;if(e===0){if(t===1)return new ce(0,1/0);if(t===-1)return new ce(0,-1/0)}const r=e*e+(1-t)*(1-t),n=new ce((1-t*t-e*e)/r,-2*e/r).log();return new ce(-.5*n.im,.5*n.re)},acot:function(){const e=this.re,t=this.im;if(t===0)return new ce(Math.atan2(1,e),0);const r=e*e+t*t;return r!==0?new ce(e/r,-t/r).atan():new ce(e!==0?e/0:0,t!==0?-t/0:0).atan()},asec:function(){const e=this.re,t=this.im;if(e===0&&t===0)return new ce(0,1/0);const r=e*e+t*t;return r!==0?new ce(e/r,-t/r).acos():new ce(e!==0?e/0:0,t!==0?-t/0:0).acos()},acsc:function(){const e=this.re,t=this.im;if(e===0&&t===0)return new ce(Math.PI/2,1/0);const r=e*e+t*t;return r!==0?new ce(e/r,-t/r).asin():new ce(e!==0?e/0:0,t!==0?-t/0:0).asin()},sinh:function(){const e=this.re,t=this.im;return new ce(En(e)*Math.cos(t),Br(e)*Math.sin(t))},cosh:function(){const e=this.re,t=this.im;return new ce(Br(e)*Math.cos(t),En(e)*Math.sin(t))},tanh:function(){const e=2*this.re,t=2*this.im,r=Br(e)+Math.cos(t);return new ce(En(e)/r,Math.sin(t)/r)},coth:function(){const e=2*this.re,t=2*this.im,r=Br(e)-Math.cos(t);return new ce(En(e)/r,-Math.sin(t)/r)},csch:function(){const e=this.re,t=this.im,r=Math.cos(2*t)-Br(2*e);return new ce(-2*En(e)*Math.cos(t)/r,2*Br(e)*Math.sin(t)/r)},sech:function(){const e=this.re,t=this.im,r=Math.cos(2*t)+Br(2*e);return new ce(2*Br(e)*Math.cos(t)/r,-2*En(e)*Math.sin(t)/r)},asinh:function(){const e=this.re,t=this.im;if(t===0){if(e===0)return new ce(0,0);const i=Math.abs(e),o=Math.log(i+Math.sqrt(i*i+1));return new ce(e<0?-o:o,0)}const r=e*e-t*t+1,n=2*e*t,a=new ce(r,n).sqrt();return new ce(e+a.re,t+a.im).log()},acosh:function(){const e=this.re,t=this.im;if(t===0){if(e>1)return new ce(Math.log(e+Math.sqrt(e-1)*Math.sqrt(e+1)),0);if(e<-1){const a=Math.sqrt(e*e-1);return new ce(Math.log(-e+a),Math.PI)}return new ce(0,Math.acos(e))}const r=new ce(e-1,t).sqrt(),n=new ce(e+1,t).sqrt();return new ce(e+r.re*n.re-r.im*n.im,t+r.re*n.im+r.im*n.re).log()},atanh:function(){const e=this.re,t=this.im;if(t===0){if(e===0)return new ce(0,0);if(e===1)return new ce(1/0,0);if(e===-1)return new ce(-1/0,0);if(-1<e&&e<1)return new ce(.5*Math.log((1+e)/(1-e)),0);if(e>1){const u=(e+1)/(e-1);return new ce(.5*Math.log(u),-Math.PI/2)}const s=(1+e)/(1-e);return new ce(.5*Math.log(-s),Math.PI/2)}const r=1-e,n=1+e,a=r*r+t*t;if(a===0)return new ce(e!==-1?e/0:0,t!==0?t/0:0);const i=(n*r-t*t)/a,o=(t*r+n*t)/a;return new ce(If(i,o)/2,Math.atan2(o,i)/2)},acoth:function(){const e=this.re,t=this.im;if(e===0&&t===0)return new ce(0,Math.PI/2);const r=e*e+t*t;return r!==0?new ce(e/r,-t/r).atanh():new ce(e!==0?e/0:0,t!==0?-t/0:0).atanh()},acsch:function(){const e=this.re,t=this.im;if(t===0){if(e===0)return new ce(1/0,0);const n=1/e;return new ce(Math.log(n+Math.sqrt(n*n+1)),0)}const r=e*e+t*t;return r!==0?new ce(e/r,-t/r).asinh():new ce(e!==0?e/0:0,t!==0?-t/0:0).asinh()},asech:function(){const e=this.re,t=this.im;if(this.isZero())return ce.INFINITY;const r=e*e+t*t;return r!==0?new ce(e/r,-t/r).acosh():new ce(e!==0?e/0:0,t!==0?-t/0:0).acosh()},inverse:function(){if(this.isZero())return ce.INFINITY;if(this.isInfinite())return ce.ZERO;const e=this.re,t=this.im,r=e*e+t*t;return new ce(e/r,-t/r)},conjugate:function(){return new ce(this.re,-this.im)},neg:function(){return new ce(-this.re,-this.im)},ceil:function(e){return e=Math.pow(10,e||0),new ce(Math.ceil(this.re*e)/e,Math.ceil(this.im*e)/e)},floor:function(e){return e=Math.pow(10,e||0),new ce(Math.floor(this.re*e)/e,Math.floor(this.im*e)/e)},round:function(e){return e=Math.pow(10,e||0),new ce(Math.round(this.re*e)/e,Math.round(this.im*e)/e)},equals:function(e,t){const r=zi(e,t);return Math.abs(r.re-this.re)<=ce.EPSILON&&Math.abs(r.im-this.im)<=ce.EPSILON},clone:function(){return new ce(this.re,this.im)},toString:function(){let e=this.re,t=this.im,r="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(e)<ce.EPSILON&&(e=0),Math.abs(t)<ce.EPSILON&&(t=0),t===0?r+e:(e!==0?(r+=e,r+=" ",t<0?(t=-t,r+="-"):r+="+",r+=" "):t<0&&(t=-t,r+="-"),t!==1&&(r+=t),r+"i"))},toVector:function(){return[this.re,this.im]},valueOf:function(){return this.im===0?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return this.im===0&&this.re===0},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!this.isFinite()}};ce.ZERO=new ce(0,0);ce.ONE=new ce(1,0);ce.I=new ce(0,1);ce.PI=new ce(Math.PI,0);ce.E=new ce(Math.E,0);ce.INFINITY=new ce(1/0,1/0);ce.NAN=new ce(NaN,NaN);ce.EPSILON=1e-15;var _9="Complex",I9=[],z9=I(_9,I9,()=>(Object.defineProperty(ce,"name",{value:"Complex"}),ce.prototype.constructor=ce,ce.prototype.type="Complex",ce.prototype.isComplex=!0,ce.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},ce.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},ce.prototype.format=function(e){var t="",r=this.im,n=this.re,a=Ki(this.re,e),i=Ki(this.im,e),o=qe(e)?e:e?e.precision:null;if(o!==null){var s=Math.pow(10,-o);Math.abs(n/r)<s&&(n=0),Math.abs(r/n)<s&&(r=0)}return r===0?t=a:n===0?r===1?t="i":r===-1?t="-i":t=i+"i":r<0?r===-1?t=a+" - i":t=a+" - "+i.substring(1)+"i":r===1?t=a+" + i":t=a+" + "+i+"i",t},ce.fromPolar=function(e){switch(arguments.length){case 1:{var t=arguments[0];if(typeof t=="object")return ce(t);throw new TypeError("Input has to be an object with r and phi keys.")}case 2:{var r=arguments[0],n=arguments[1];if(qe(r)){if(hn(n)&&n.hasBase("ANGLE")&&(n=n.toNumber("rad")),qe(n))return new ce({r,phi:n});throw new TypeError("Phi is not a number nor an angle unit.")}else throw new TypeError("Radius r is not a number.")}default:throw new SyntaxError("Wrong number of arguments in function fromPolar")}},ce.prototype.valueOf=ce.prototype.toString,ce.fromJSON=function(e){return new ce(e)},ce.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0},ce),{isClass:!0});typeof BigInt>"u"&&(BigInt=function(e){if(isNaN(e))throw new Error("");return e});const _e=BigInt(0),ut=BigInt(1),xr=BigInt(2),_s=BigInt(3),zo=BigInt(5),an=BigInt(10);BigInt(Number.MAX_SAFE_INTEGER);const j9=2e3,Se={s:ut,n:_e,d:ut};function Aa(e,t){try{e=BigInt(e)}catch{throw Qa()}return e*t}function Gn(e){return typeof e=="bigint"?e:Math.floor(e)}function Vt(e,t){if(t===_e)throw Sd();const r=Object.create(Tn.prototype);r.s=e<_e?-ut:ut,e=e<_e?-e:e;const n=qi(e,t);return r.n=e/n,r.d=t/n,r}const q9=[xr*xr,xr,xr*xr,xr,xr*xr,xr*_s,xr,xr*_s];function So(e){const t=Object.create(null);if(e<=ut)return t[e]=ut,t;const r=n=>{t[n]=(t[n]||_e)+ut};for(;e%xr===_e;)r(xr),e/=xr;for(;e%_s===_e;)r(_s),e/=_s;for(;e%zo===_e;)r(zo),e/=zo;for(let n=0,a=xr+zo;a*a<=e;){for(;e%a===_e;)r(a),e/=a;a+=q9[n],n=n+1&7}return e>ut&&r(e),t}const wr=function(e,t){let r=_e,n=ut,a=ut;if(e!=null)if(t!==void 0){if(typeof e=="bigint")r=e;else{if(isNaN(e))throw Qa();if(e%1!==0)throw o0();r=BigInt(e)}if(typeof t=="bigint")n=t;else{if(isNaN(t))throw Qa();if(t%1!==0)throw o0();n=BigInt(t)}a=r*n}else if(typeof e=="object"){if("d"in e&&"n"in e)r=BigInt(e.n),n=BigInt(e.d),"s"in e&&(r*=BigInt(e.s));else if(0 in e)r=BigInt(e[0]),1 in e&&(n=BigInt(e[1]));else if(typeof e=="bigint")r=e;else throw Qa();a=r*n}else if(typeof e=="number"){if(isNaN(e))throw Qa();if(e<0&&(a=-ut,e=-e),e%1===0)r=BigInt(e);else{let i=1,o=0,s=1,u=1,l=1,c=1e7;for(e>=1&&(i=10**Math.floor(1+Math.log10(e)),e/=i);s<=c&&l<=c;){let f=(o+u)/(s+l);if(e===f){s+l<=c?(r=o+u,n=s+l):l>s?(r=u,n=l):(r=o,n=s);break}else e>f?(o+=u,s+=l):(u+=o,l+=s),s>c?(r=u,n=l):(r=o,n=s)}r=BigInt(r)*BigInt(i),n=BigInt(n)}}else if(typeof e=="string"){let i=0,o=_e,s=_e,u=_e,l=ut,c=ut,f=e.replace(/_/g,"").match(/\d+|./g);if(f===null)throw Qa();if(f[i]==="-"?(a=-ut,i++):f[i]==="+"&&i++,f.length===i+1?s=Aa(f[i++],a):f[i+1]==="."||f[i]==="."?(f[i]!=="."&&(o=Aa(f[i++],a)),i++,(i+1===f.length||f[i+1]==="("&&f[i+3]===")"||f[i+1]==="'"&&f[i+3]==="'")&&(s=Aa(f[i],a),l=an**BigInt(f[i].length),i++),(f[i]==="("&&f[i+2]===")"||f[i]==="'"&&f[i+2]==="'")&&(u=Aa(f[i+1],a),c=an**BigInt(f[i+1].length)-ut,i+=3)):f[i+1]==="/"||f[i+1]===":"?(s=Aa(f[i],a),l=Aa(f[i+2],ut),i+=3):f[i+3]==="/"&&f[i+1]===" "&&(o=Aa(f[i],a),s=Aa(f[i+2],a),l=Aa(f[i+4],ut),i+=5),f.length<=i)n=l*c,a=r=u+n*o+c*s;else throw Qa()}else if(typeof e=="bigint")r=e,a=e,n=ut;else throw Qa();if(n===_e)throw Sd();Se.s=a<_e?-ut:ut,Se.n=r<_e?-r:r,Se.d=n<_e?-n:n};function R9(e,t,r){let n=ut;for(;t>_e;e=e*e%r,t>>=ut)t&ut&&(n=n*e%r);return n}function L9(e,t){for(;t%xr===_e;t/=xr);for(;t%zo===_e;t/=zo);if(t===ut)return _e;let r=an%t,n=1;for(;r!==ut;n++)if(r=r*an%t,n>j9)return _e;return BigInt(n)}function H9(e,t,r){let n=ut,a=R9(an,r,t);for(let i=0;i<300;i++){if(n===a)return BigInt(i);n=n*an%t,a=a*an%t}return 0}function qi(e,t){if(!e)return t;if(!t)return e;for(;;){if(e%=t,!e)return t;if(t%=e,!t)return e}}function Tn(e,t){if(wr(e,t),this instanceof Tn)e=qi(Se.d,Se.n),this.s=Se.s,this.n=Se.n/e,this.d=Se.d/e;else return Vt(Se.s*Se.n,Se.d)}const Sd=function(){return new Error("Division by Zero")},Qa=function(){return new Error("Invalid argument")},o0=function(){return new Error("Parameters must be integer")};Tn.prototype={s:ut,n:_e,d:ut,abs:function(){return Vt(this.n,this.d)},neg:function(){return Vt(-this.s*this.n,this.d)},add:function(e,t){return wr(e,t),Vt(this.s*this.n*Se.d+Se.s*this.d*Se.n,this.d*Se.d)},sub:function(e,t){return wr(e,t),Vt(this.s*this.n*Se.d-Se.s*this.d*Se.n,this.d*Se.d)},mul:function(e,t){return wr(e,t),Vt(this.s*Se.s*this.n*Se.n,this.d*Se.d)},div:function(e,t){return wr(e,t),Vt(this.s*Se.s*this.n*Se.d,this.d*Se.n)},clone:function(){return Vt(this.s*this.n,this.d)},mod:function(e,t){if(e===void 0)return Vt(this.s*this.n%this.d,ut);if(wr(e,t),_e===Se.n*this.d)throw Sd();return Vt(this.s*(Se.d*this.n)%(Se.n*this.d),Se.d*this.d)},gcd:function(e,t){return wr(e,t),Vt(qi(Se.n,this.n)*qi(Se.d,this.d),Se.d*this.d)},lcm:function(e,t){return wr(e,t),Se.n===_e&&this.n===_e?Vt(_e,ut):Vt(Se.n*this.n,qi(Se.n,this.n)*qi(Se.d,this.d))},inverse:function(){return Vt(this.s*this.d,this.n)},pow:function(e,t){if(wr(e,t),Se.d===ut)return Se.s<_e?Vt((this.s*this.d)**Se.n,this.n**Se.n):Vt((this.s*this.n)**Se.n,this.d**Se.n);if(this.s<_e)return null;let r=So(this.n),n=So(this.d),a=ut,i=ut;for(let o in r)if(o!=="1"){if(o==="0"){a=_e;break}if(r[o]*=Se.n,r[o]%Se.d===_e)r[o]/=Se.d;else return null;a*=BigInt(o)**r[o]}for(let o in n)if(o!=="1"){if(n[o]*=Se.n,n[o]%Se.d===_e)n[o]/=Se.d;else return null;i*=BigInt(o)**n[o]}return Se.s<_e?Vt(i,a):Vt(a,i)},log:function(e,t){if(wr(e,t),this.s<=_e||Se.s<=_e)return null;const r=Object.create(null),n=So(Se.n),a=So(Se.d),i=So(this.n),o=So(this.d);for(const l in a)n[l]=(n[l]||_e)-a[l];for(const l in o)i[l]=(i[l]||_e)-o[l];for(const l in n)l!=="1"&&(r[l]=!0);for(const l in i)l!=="1"&&(r[l]=!0);let s=null,u=null;for(const l in r){const c=n[l]||_e,f=i[l]||_e;if(c===_e){if(f!==_e)return null;continue}let m=f,d=c;const h=qi(m,d);if(m/=h,d/=h,s===null&&u===null)s=m,u=d;else if(m*u!==s*d)return null}return s!==null&&u!==null?Vt(s,u):null},equals:function(e,t){return wr(e,t),this.s*this.n*Se.d===Se.s*Se.n*this.d},lt:function(e,t){return wr(e,t),this.s*this.n*Se.d<Se.s*Se.n*this.d},lte:function(e,t){return wr(e,t),this.s*this.n*Se.d<=Se.s*Se.n*this.d},gt:function(e,t){return wr(e,t),this.s*this.n*Se.d>Se.s*Se.n*this.d},gte:function(e,t){return wr(e,t),this.s*this.n*Se.d>=Se.s*Se.n*this.d},compare:function(e,t){wr(e,t);let r=this.s*this.n*Se.d-Se.s*Se.n*this.d;return(_e<r)-(r<_e)},ceil:function(e){return e=an**BigInt(e||0),Vt(Gn(this.s*e*this.n/this.d)+(e*this.n%this.d>_e&&this.s>=_e?ut:_e),e)},floor:function(e){return e=an**BigInt(e||0),Vt(Gn(this.s*e*this.n/this.d)-(e*this.n%this.d>_e&&this.s<_e?ut:_e),e)},round:function(e){return e=an**BigInt(e||0),Vt(Gn(this.s*e*this.n/this.d)+this.s*((this.s>=_e?ut:_e)+xr*(e*this.n%this.d)>this.d?ut:_e),e)},roundTo:function(e,t){wr(e,t);const r=this.n*Se.d,n=this.d*Se.n,a=r%n;let i=Gn(r/n);return a+a>=n&&i++,Vt(this.s*i*Se.n,Se.d)},divisible:function(e,t){return wr(e,t),Se.n===_e?!1:this.n*Se.d%(Se.n*this.d)===_e},valueOf:function(){return Number(this.s*this.n)/Number(this.d)},toString:function(e=15){let t=this.n,r=this.d,n=L9(t,r),a=H9(t,r,n),i=this.s<_e?"-":"";if(i+=Gn(t/r),t%=r,t*=an,t&&(i+="."),n){for(let o=a;o--;)i+=Gn(t/r),t%=r,t*=an;i+="(";for(let o=n;o--;)i+=Gn(t/r),t%=r,t*=an;i+=")"}else for(let o=e;t&&o--;)i+=Gn(t/r),t%=r,t*=an;return i},toFraction:function(e=!1){let t=this.n,r=this.d,n=this.s<_e?"-":"";if(r===ut)n+=t;else{const a=Gn(t/r);e&&a>_e&&(n+=a,n+=" ",t%=r),n+=t,n+="/",n+=r}return n},toLatex:function(e=!1){let t=this.n,r=this.d,n=this.s<_e?"-":"";if(r===ut)n+=t;else{const a=Gn(t/r);e&&a>_e&&(n+=a,t%=r),n+="\\frac{",n+=t,n+="}{",n+=r,n+="}"}return n},toContinued:function(){let e=this.n,t=this.d;const r=[];for(;t;){r.push(Gn(e/t));const n=e%t;e=t,t=n}return r},simplify:function(e=.001){const t=BigInt(Math.ceil(1/e)),r=this.abs(),n=r.toContinued();for(let a=1;a<n.length;a++){let i=Vt(n[a-1],ut);for(let s=a-2;s>=0;s--)i=i.inverse().add(n[s]);let o=i.sub(r);if(o.n*t<o.d)return i.mul(this.s)}return this}};var G9="Fraction",V9=[],U9=I(G9,V9,()=>(Object.defineProperty(Tn,"name",{value:"Fraction"}),Tn.prototype.constructor=Tn,Tn.prototype.type="Fraction",Tn.prototype.isFraction=!0,Tn.prototype.toJSON=function(){return{mathjs:"Fraction",n:String(this.s*this.n),d:String(this.d)}},Tn.fromJSON=function(e){return new Tn(e)},Tn),{isClass:!0}),W9="Range",J9=[],K9=I(W9,J9,()=>{function e(t,r,n){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator");var a=t!=null,i=r!=null,o=n!=null;if(a){if(Qe(t))t=t.toNumber();else if(typeof t!="number"&&!Bs(t))throw new TypeError("Parameter start must be a number or bigint")}if(i){if(Qe(r))r=r.toNumber();else if(typeof r!="number"&&!Bs(r))throw new TypeError("Parameter end must be a number or bigint")}if(o){if(Qe(n))n=n.toNumber();else if(typeof n!="number"&&!Bs(n))throw new TypeError("Parameter step must be a number or bigint")}if(this.start=a?parseFloat(t):0,this.end=i?parseFloat(r):0,this.step=o?parseFloat(n):1,o&&Cr(this.step,0))throw new Error("Step must not be zero")}return e.prototype.type="Range",e.prototype.isRange=!0,e.parse=function(t){if(typeof t!="string")return null;var r=t.split(":"),n=r.map(function(i){return parseFloat(i)}),a=n.some(function(i){return isNaN(i)});if(a)return null;switch(n.length){case 2:return new e(n[0],n[1]);case 3:return new e(n[0],n[2],n[1]);default:return null}},e.prototype.clone=function(){return new e(this.start,this.end,this.step)},e.prototype.size=function(){var t=0,r=this.start,n=this.step,a=this.end,i=a-r;return ii(n)===ii(i)?t=Math.ceil(i/n):i===0&&(t=0),isNaN(t)&&(t=0),[t]},e.prototype.min=function(){var t=this.size()[0];if(t>0)return this.step>0?this.start:this.start+(t-1)*this.step},e.prototype.max=function(){var t=this.size()[0];if(t>0)return this.step>0?this.start+(t-1)*this.step:this.start},e.prototype.forEach=function(t){var r=this.start,n=this.step,a=this.end,i=0;if(n>0)for(;r<a;)t(r,[i],this),r+=n,i++;else if(n<0)for(;r>a;)t(r,[i],this),r+=n,i++},e.prototype.map=function(t){var r=[];return this.forEach(function(n,a,i){r[a[0]]=t(n,a,i)}),r},e.prototype.toArray=function(){var t=[];return this.forEach(function(r,n){t[n[0]]=r}),t},e.prototype.valueOf=function(){return this.toArray()},e.prototype.format=function(t){var r=Ki(this.start,t);return this.step!==1&&(r+=":"+Ki(this.step,t)),r+=":"+Ki(this.end,t),r},e.prototype.toString=function(){return this.format()},e.prototype.toJSON=function(){return{mathjs:"Range",start:this.start,end:this.end,step:this.step}},e.fromJSON=function(t){return new e(t.start,t.end,t.step)},e},{isClass:!0}),Y9="Matrix",Z9=[],Q9=I(Y9,Z9,()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(t,r){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(t,r,n){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(t){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(t,r,n){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(t,r){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(t,r){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(t,r){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(t){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(t){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0});function zf(e,t,r){var n=e.constructor,a=new n(2),i="";if(r){if(r<1)throw new Error("size must be in greater than 0");if(!ke(r))throw new Error("size must be an integer");if(e.greaterThan(a.pow(r-1).sub(1))||e.lessThan(a.pow(r-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(r-1,", 2^").concat(r-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(a.pow(r))),i="i".concat(r)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw new Error("Base ".concat(t," not supported "))}}function X9(e,t){if(typeof t=="function")return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var{notation:r,precision:n,wordSize:a}=hx(t);switch(r){case"fixed":return tI(e,n);case"exponential":return s0(e,n);case"engineering":return eI(e,n);case"bin":return zf(e,2,a);case"oct":return zf(e,8,a);case"hex":return zf(e,16,a);case"auto":{var i=u0(t?.lowerExp,-3),o=u0(t?.upperExp,5);if(e.isZero())return"0";var s,u=e.toSignificantDigits(n),l=u.e;return l>=i&&l<o?s=u.toFixed():s=s0(e,n),s.replace(/((\.\d*?)(0+))($|e)/,function(){var c=arguments[2],f=arguments[4];return c!=="."?c+f:f})}default:throw new Error('Unknown notation "'+r+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function eI(e,t){var r=e.e,n=r%3===0?r:r<0?r-3-r%3:r-r%3,a=e.mul(Math.pow(10,-n)),i=a.toPrecision(t);if(i.includes("e")){var o=e.constructor;i=new o(i).toFixed()}return i+"e"+(r>=0?"+":"")+n.toString()}function s0(e,t){return t!==void 0?e.toExponential(t-1):e.toExponential()}function tI(e,t){return e.toFixed(t)}function u0(e,t){return qe(e)?e:Qe(e)?e.toNumber():t}function rI(e,t){var r=e.length-t.length,n=e.length;return e.substring(r,n)===t}function it(e,t){var r=nI(e,t);return t&&typeof t=="object"&&"truncate"in t&&r.length>t.truncate?r.substring(0,t.truncate-3)+"...":r}function nI(e,t){if(typeof e=="number")return Ki(e,t);if(Qe(e))return X9(e,t);if(aI(e))return!t||t.fraction!=="decimal"?"".concat(e.s*e.n,"/").concat(e.d):e.toString();if(Array.isArray(e))return Tx(e,t);if(Zt(e))return jo(e);if(typeof e=="function")return e.syntax?String(e.syntax):"function";if(e&&typeof e=="object"){if(typeof e.format=="function")return e.format(t);if(e&&e.toString(t)!=={}.toString())return e.toString(t);var r=Object.keys(e).map(n=>jo(n)+": "+it(e[n],t));return"{"+r.join(", ")+"}"}return String(e)}function jo(e){for(var t=String(e),r="",n=0;n<t.length;){var a=t.charAt(n);r+=a in l0?l0[a]:a,n++}return'"'+r+'"'}var l0={'"':'\\"',"\\":"\\\\","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r"," ":"\\t"};function On(e){var t=String(e);return t=t.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),t}function Tx(e,t){if(Array.isArray(e)){for(var r="[",n=e.length,a=0;a<n;a++)a!==0&&(r+=", "),r+=Tx(e[a],t);return r+="]",r}else return it(e,t)}function aI(e){return e&&typeof e=="object"&&typeof e.s=="bigint"&&typeof e.n=="bigint"&&typeof e.d=="bigint"||!1}function Lm(e,t){if(!Zt(e))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+Pt(e)+", index: 0)");if(!Zt(t))throw new TypeError("Unexpected type of argument in function compareText (expected: string or Array or Matrix, actual: "+Pt(t)+", index: 1)");return e===t?0:e>t?1:-1}function at(e,t,r){if(!(this instanceof at))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=r,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=new Error().stack}at.prototype=new RangeError;at.prototype.constructor=RangeError;at.prototype.name="DimensionError";at.prototype.isDimensionError=!0;function Xn(e,t,r){if(!(this instanceof Xn))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=r),this.min!==void 0&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":this.max!==void 0&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}Xn.prototype=new RangeError;Xn.prototype.constructor=RangeError;Xn.prototype.name="IndexError";Xn.prototype.isIndexError=!0;function Je(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function Fx(e,t,r){var n,a=e.length;if(a!==t[r])throw new at(a,t[r]);if(r<t.length-1){var i=r+1;for(n=0;n<a;n++){var o=e[n];if(!Array.isArray(o))throw new at(t.length-1,t.length,"<");Fx(e[n],t,i)}}else for(n=0;n<a;n++)if(Array.isArray(e[n]))throw new at(t.length+1,t.length,">")}function c0(e,t){var r=t.length===0;if(r){if(Array.isArray(e))throw new at(e.length,0)}else Fx(e,t,0)}function Zl(e,t){var r=e.isMatrix?e._size:Je(e),n=t._sourceSize;n.forEach((a,i)=>{if(a!==null&&a!==r[i])throw new at(a,r[i])})}function Bt(e,t){if(e!==void 0){if(!qe(e)||!ke(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof t=="number"&&e>=t)throw new Xn(e,t)}}function Jo(e){for(var t=0;t<e._dimensions.length;++t){var r=e._dimensions[t];if(r._data&&Tt(r._data)){if(r._size[0]===0)return!0}else if(r.isRange){if(r.start===r.end)return!0}else if(Zt(r)&&r.length===0)return!0}return!1}function Ko(e,t,r){if(!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new Error("Resizing to scalar is not supported");t.forEach(function(a){if(!qe(a)||!ke(a)||a<0)throw new TypeError("Invalid size, must contain positive integers (size: "+it(t)+")")}),(qe(e)||Qe(e))&&(e=[e]);var n=r!==void 0?r:0;return Hm(e,t,0,n),e}function Hm(e,t,r,n){var a,i,o=e.length,s=t[r],u=Math.min(o,s);if(e.length=s,r<t.length-1){var l=r+1;for(a=0;a<u;a++)i=e[a],Array.isArray(i)||(i=[i],e[a]=i),Hm(i,t,l,n);for(a=u;a<s;a++)i=[],e[a]=i,Hm(i,t,l,n)}else{for(a=0;a<u;a++)for(;Array.isArray(e[a]);)e[a]=e[a][0];for(a=u;a<s;a++)e[a]=n}}function Md(e,t){var r=dt(e,!0),n=r.length;if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new at(0,n,"!=");t=Td(t,n);var a=Px(t);if(n!==a)throw new at(a,n,"!=");try{return iI(r,t)}catch(i){throw i instanceof at?new at(a,n,"!="):i}}function Td(e,t){var r=Px(e),n=e.slice(),a=-1,i=e.indexOf(a),o=e.indexOf(a,i+1)>=0;if(o)throw new Error("More than one wildcard in sizes");var s=i>=0,u=t%r===0;if(s)if(u)n[i]=-t/r;else throw new Error("Could not replace wildcard, since "+t+" is no multiple of "+-r);return n}function Px(e){return e.reduce((t,r)=>t*r,1)}function iI(e,t){for(var r=e,n,a=t.length-1;a>0;a--){var i=t[a];n=[];for(var o=r.length/i,s=0;s<o;s++)n.push(r.slice(s*i,(s+1)*i));r=n}return r}function Ql(e,t){for(var r=Je(e);Array.isArray(e)&&e.length===1;)e=e[0],r.shift();for(var n=r.length;r[n-1]===1;)n--;return n<r.length&&(e=kx(e,n,0),r.length=n),e}function kx(e,t,r){var n,a;if(r<t){var i=r+1;for(n=0,a=e.length;n<a;n++)e[n]=kx(e[n],t,i)}else for(;Array.isArray(e);)e=e[0];return e}function Ox(e,t,r,n){var a=n||Je(e);if(r)for(var i=0;i<r;i++)e=[e],a.unshift(1);for(e=$x(e,t,0);a.length<t;)a.push(1);return e}function $x(e,t,r){var n,a;if(Array.isArray(e)){var i=r+1;for(n=0,a=e.length;n<a;n++)e[n]=$x(e[n],t,i)}else for(var o=r;o<t;o++)e=[e];return e}function dt(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!Array.isArray(e))return e;if(typeof t!="boolean")throw new TypeError("Boolean expected for second argument of flatten");var r=[];return t?a(e):n(e),r;function n(i){for(var o=0;o<i.length;o++){var s=i[o];Array.isArray(s)?n(s):r.push(s)}}function a(i){if(Array.isArray(i[0]))for(var o=0;o<i.length;o++)a(i[o]);else for(var s=0;s<i.length;s++)r.push(i[s])}}function li(e,t){return Array.prototype.map.call(e,t)}function Bx(e,t){Array.prototype.forEach.call(e,t)}function f0(e,t){if(Je(e).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,t)}function m0(e,t){if(Je(e).length!==1)throw new Error("Only one dimensional matrices supported");return Array.prototype.filter.call(e,r=>t.test(r))}function d0(e,t){return Array.prototype.join.call(e,t)}function Yo(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(e.length===0)return e;var t=[],r=0;t[0]={value:e[0],identifier:0};for(var n=1;n<e.length;n++)e[n]===e[n-1]?r++:r=0,t.push({value:e[n],identifier:r});return t}function Xl(e){if(!Array.isArray(e))throw new TypeError("Array input expected");if(e.length===0)return e;for(var t=[],r=0;r<e.length;r++)t.push(e[r].value);return t}function Fc(e,t){for(var r,n=0,a=0;a<e.length;a++){var i=e[a],o=Array.isArray(i);if(a===0&&o&&(n=i.length),o&&i.length!==n)return;var s=o?Fc(i,t):t(i);if(r===void 0)r=s;else if(r!==s)return"mixed"}return r}function _x(e,t,r,n){if(n<r){if(e.length!==t.length)throw new at(e.length,t.length);for(var a=[],i=0;i<e.length;i++)a[i]=_x(e[i],t[i],r,n+1);return a}else return e.concat(t)}function Ix(){var e=Array.prototype.slice.call(arguments,0,-1),t=Array.prototype.slice.call(arguments,-1);if(e.length===1)return e[0];if(e.length>1)return e.slice(1).reduce(function(r,n){return _x(r,n,t,0)},e[0]);throw new Error("Wrong number of arguments in function concat")}function ec(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];for(var n=t.map(m=>m.length),a=Math.max(...n),i=new Array(a).fill(null),o=0;o<t.length;o++)for(var s=t[o],u=n[o],l=0;l<u;l++){var c=a-u+l;s[l]>i[c]&&(i[c]=s[l])}for(var f=0;f<t.length;f++)zx(t[f],i);return i}function zx(e,t){for(var r=t.length,n=e.length,a=0;a<n;a++){var i=r-n+a;if(e[a]<t[i]&&e[a]>1||e[a]>t[i])throw new Error("shape mismatch: mismatch is found in arg with shape (".concat(e,") not possible to broadcast dimension ").concat(n," with size ").concat(e[a]," to size ").concat(t[i]))}}function Wi(e,t){var r=Je(e);if(Ha(r,t))return e;zx(r,t);var n=ec(r,t),a=n.length,i=[...Array(a-r.length).fill(1),...r],o=sI(e);r.length<a&&(o=Md(o,i),r=Je(o));for(var s=0;s<a;s++)r[s]<n[s]&&(o=oI(o,n[s],s),r=Je(o));return o}function oI(e,t,r){return Ix(...Array(t).fill(e),r)}function tc(e,t){if(!Array.isArray(e))throw new Error("Array expected");var r=Je(e);if(t.length!==r.length)throw new at(t.length,r.length);for(var n=0;n<t.length;n++)Bt(t[n],r[n]);return t.reduce((a,i)=>a[i],e)}function Gm(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(e.length===0)return[];if(r)return i(e);var n=[];return a(e,0);function a(o,s){if(Array.isArray(o)){for(var u=o.length,l=Array(u),c=0;c<u;c++)n[s]=c,l[c]=a(o[c],s+1);return l}else return t(o,n.slice(0,s),e)}function i(o){if(Array.isArray(o)){for(var s=o.length,u=Array(s),l=0;l<s;l++)u[l]=i(o[l]);return u}else return t(o)}}function jx(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(e.length===0)return;if(r){i(e);return}var n=[];a(e,0);function a(o,s){if(Array.isArray(o))for(var u=o.length,l=0;l<u;l++)n[s]=l,a(o[l],s+1);else t(o,n.slice(0,s),e)}function i(o){if(Array.isArray(o))for(var s=o.length,u=0;u<s;u++)i(o[u]);else t(o)}}function sI(e){return tr([],e)}function eo(e,t,r,n){if(Wl.isTypedFunction(e)){var a;if(n)a=1;else{var i=t.isMatrix?t.size():Je(t),o=i.length?i[i.length-1]===0:!0;if(o)return{isUnary:n,fn:e};var s=i.map(()=>0),u=t.isMatrix?t.get(s):tc(t,s);a=cI(e,u,s,t)}var l;if(t.isMatrix&&t.dataType!=="mixed"&&t.dataType!==void 0){var c=uI(e,a);l=c!==void 0?c:e}else l=e;return a>=1&&a<=3?{isUnary:a===1,fn:function(){for(var m=arguments.length,d=new Array(m),h=0;h<m;h++)d[h]=arguments[h];return h0(l,d.slice(0,a),r,e.name)}}:{isUnary:!1,fn:function(){for(var m=arguments.length,d=new Array(m),h=0;h<m;h++)d[h]=arguments[h];return h0(l,d,r,e.name)}}}return n===void 0?{isUnary:lI(e),fn:e}:{isUnary:n,fn:e}}function uI(e,t){var r=[];if(Object.entries(e.signatures).forEach(n=>{var[a,i]=n;a.split(",").length===t&&r.push(i)}),r.length===1)return r[0]}function lI(e){if(e.length!==1)return!1;var t=e.toString();if(/arguments/.test(t))return!1;var r=t.match(/\(.*?\)/);return!/\.\.\./.test(r)}function cI(e,t,r,n){for(var a=[t,r,n],i=3;i>0;i--){var o=a.slice(0,i);if(Wl.resolve(e,o)!==null)return i}}function h0(e,t,r,n){try{return e(...t)}catch(a){fI(a,t,r,n)}}function fI(e,t,r,n){var a;if(e instanceof TypeError&&((a=e.data)===null||a===void 0?void 0:a.category)==="wrongType"){var i=[];throw i.push("value: ".concat(Pt(t[0]))),t.length>=2&&i.push("index: ".concat(Pt(t[1]))),t.length>=3&&i.push("array: ".concat(Pt(t[2]))),new TypeError("Function ".concat(r," cannot apply callback arguments ")+"".concat(n,"(").concat(i.join(", "),") at index ").concat(JSON.stringify(t[1])))}else throw new TypeError("Function ".concat(r," cannot apply callback arguments ")+"to function ".concat(n,": ").concat(e.message))}var mI="DenseMatrix",dI=["Matrix","config"],hI=I(mI,dI,e=>{var{Matrix:t,config:r}=e;function n(f,m){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(m&&!Zt(m))throw new Error("Invalid datatype: "+m);if(Le(f))f.type==="DenseMatrix"?(this._data=We(f._data),this._size=We(f._size),this._datatype=m||f._datatype):(this._data=f.toArray(),this._size=f.size(),this._datatype=m||f._datatype);else if(f&&Tt(f.data)&&Tt(f.size))this._data=f.data,this._size=f.size,c0(this._data,this._size),this._datatype=m||f.datatype;else if(Tt(f))this._data=c(f),this._size=Je(this._data),c0(this._data,this._size),this._datatype=m;else{if(f)throw new TypeError("Unsupported type of data ("+Pt(f)+")");this._data=[],this._size=[0],this._datatype=m}}n.prototype=new t,n.prototype.createDenseMatrix=function(f,m){return new n(f,m)},Object.defineProperty(n,"name",{value:"DenseMatrix"}),n.prototype.constructor=n,n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return Fc(this._data,Pt)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(f,m){return new n(f,m)},n.prototype.subset=function(f,m,d){switch(arguments.length){case 1:return a(this,f);case 2:case 3:return o(this,f,m,d);default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.get=function(f){return tc(this._data,f)},n.prototype.set=function(f,m,d){if(!Tt(f))throw new TypeError("Array expected");if(f.length<this._size.length)throw new at(f.length,this._size.length,"<");var h,p,y,w=f.map(function(v){return v+1});l(this,w,d);var D=this._data;for(h=0,p=f.length-1;h<p;h++)y=f[h],Bt(y,D.length),D=D[y];return y=f[f.length-1],Bt(y,D.length),D[y]=m,this};function a(f,m){if(!Nc(m))throw new TypeError("Invalid index");var d=r.legacySubset?m.size().every(g=>g===1):m.isScalar();if(d)return f.get(m.min());var h=m.size();if(h.length!==f._size.length)throw new at(h.length,f._size.length);for(var p=m.min(),y=m.max(),w=0,D=f._size.length;w<D;w++)Bt(p[w],f._size[w]),Bt(y[w],f._size[w]);var v=new n,x=i(f._data,m);return v._size=x.size,v._datatype=f._datatype,v._data=x.data,r.legacySubset?v.reshape(m.size()):v}function i(f,m){var d=m.size().length-1,h=Array(d);return{data:p(f),size:h.filter(y=>y!==null)};function p(y){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=m.dimension(w);function v(x,g){return qe(x)?g(x):x.map(g).valueOf()}return qe(D)?h[w]=null:h[w]=D.size()[0],w<d?v(D,x=>(Bt(x,y.length),p(y[x],w+1))):v(D,x=>(Bt(x,y.length),y[x]))}}function o(f,m,d,h){if(!m||m.isIndex!==!0)throw new TypeError("Invalid index");var p=m.size(),y=m.isScalar(),w;if(Le(d)?(w=d.size(),d=d.valueOf()):w=Je(d),y){if(w.length!==0)throw new TypeError("Scalar expected");f.set(m.min(),d,h)}else{if(!Ha(w,p)){if(w.length===0)d=Wi([d],p);else try{d=Wi(d,p)}catch{}w=Je(d)}if(p.length<f._size.length)throw new at(p.length,f._size.length,"<");if(w.length<p.length){for(var D=0,v=0;p[D]===1&&w[D]===1;)D++;for(;p[D]===1;)v++,D++;d=Ox(d,p.length,v,w)}if(!Ha(p,w))throw new at(p,w,">");var x=m.max().map(function(g){return g+1});l(f,x,h),s(f._data,m,d)}return f}function s(f,m,d){var h=m.size().length-1;p(f,d);function p(y,w){var D=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,v=m.dimension(D),x=(b,C)=>{Bt(b,y.length),p(y[b],w[C[0]],D+1)},g=(b,C)=>{Bt(b,y.length),y[b]=w[C[0]]};D<h?qe(v)?x(v,[0]):v.forEach(x):qe(v)?g(v,[0]):v.forEach(g)}}n.prototype.resize=function(f,m,d){if(!vn(f))throw new TypeError("Array or Matrix expected");var h=f.valueOf().map(y=>Array.isArray(y)&&y.length===1?y[0]:y),p=d?this.clone():this;return u(p,h,m)};function u(f,m,d){if(m.length===0){for(var h=f._data;Tt(h);)h=h[0];return h}return f._size=m.slice(0),f._data=Ko(f._data,f._size,d),f}n.prototype.reshape=function(f,m){var d=m?this.clone():this;d._data=Md(d._data,f);var h=d._size.reduce((p,y)=>p*y);return d._size=Td(f,h),d};function l(f,m,d){for(var h=f._size.slice(0),p=!1;h.length<m.length;)h.push(0),p=!0;for(var y=0,w=m.length;y<w;y++)m[y]>h[y]&&(h[y]=m[y],p=!0);p&&u(f,h,d)}n.prototype.clone=function(){var f=new n({data:We(this._data),size:We(this._size),datatype:this._datatype});return f},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(f){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=this,h=d._size.length-1;if(h<0)return d.clone();var p=eo(f,d,"map",m),y=p.fn,w=d.create(void 0,d._datatype);if(w._size=d._size,m||p.isUnary)return w._data=C(d._data),w;if(h===0){for(var D=d.valueOf(),v=Array(D.length),x=0;x<D.length;x++)v[x]=y(D[x],[x],d);return w._data=v,w}var g=[];return w._data=b(d._data),w;function b(N){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,E=Array(N.length);if(A<h)for(var S=0;S<N.length;S++)g[A]=S,E[S]=b(N[S],A+1);else for(var F=0;F<N.length;F++)g[A]=F,E[F]=y(N[F],g.slice(),d);return E}function C(N){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,E=Array(N.length);if(A<h)for(var S=0;S<N.length;S++)E[S]=C(N[S],A+1);else for(var F=0;F<N.length;F++)E[F]=y(N[F]);return E}},n.prototype.forEach=function(f){var m=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=this,h=d._size.length-1;if(h<0)return;var p=eo(f,d,"map",m),y=p.fn;if(m||p.isUnary){x(d._data);return}if(h===0){for(var w=0;w<d._data.length;w++)y(d._data[w],[w],d);return}var D=[];v(d._data);function v(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(b<h)for(var C=0;C<g.length;C++)D[b]=C,v(g[C],b+1);else for(var N=0;N<g.length;N++)D[b]=N,y(g[N],D.slice(),d)}function x(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(b<h)for(var C=0;C<g.length;C++)x(g[C],b+1);else for(var N=0;N<g.length;N++)y(g[N])}},n.prototype[Symbol.iterator]=function*(){var f=this._size.length-1;if(!(f<0)){if(f===0){for(var m=0;m<this._data.length;m++)yield{value:this._data[m],index:[m]};return}for(var d=Array(f+1).fill(0),h=this._size.reduce((v,x)=>v*x,1),p=0;p<h;p++){for(var y=this._data,w=0;w<f;w++)y=y[d[w]];yield{value:y[d[f]],index:d.slice()};for(var D=f;D>=0&&(d[D]++,!(d[D]<this._size[D]));D--)d[D]=0}}},n.prototype.rows=function(){var f=[],m=this.size();if(m.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");var d=this._data;for(var h of d)f.push(new n([h],this._datatype));return f},n.prototype.columns=function(){var f=this,m=[],d=this.size();if(d.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");for(var h=this._data,p=function(D){var v=h.map(x=>[x[D]]);m.push(new n(v,f._datatype))},y=0;y<d[1];y++)p(y);return m},n.prototype.toArray=function(){return We(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(f){return it(this._data,f)},n.prototype.toString=function(){return it(this._data)},n.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.prototype.diagonal=function(f){if(f){if(Qe(f)&&(f=f.toNumber()),!qe(f)||!ke(f))throw new TypeError("The parameter k must be an integer number")}else f=0;for(var m=f>0?f:0,d=f<0?-f:0,h=this._size[0],p=this._size[1],y=Math.min(h-d,p-m),w=[],D=0;D<y;D++)w[D]=this._data[D+d][D+m];return new n({data:w,size:[y],datatype:this._datatype})},n.diagonal=function(f,m,d,h){if(!Tt(f))throw new TypeError("Array expected, size parameter");if(f.length!==2)throw new Error("Only two dimensions matrix are supported");if(f=f.map(function(N){if(Qe(N)&&(N=N.toNumber()),!qe(N)||!ke(N)||N<1)throw new Error("Size values must be positive integers");return N}),d){if(Qe(d)&&(d=d.toNumber()),!qe(d)||!ke(d))throw new TypeError("The parameter k must be an integer number")}else d=0;var p=d>0?d:0,y=d<0?-d:0,w=f[0],D=f[1],v=Math.min(w-y,D-p),x;if(Tt(m)){if(m.length!==v)throw new Error("Invalid value array length");x=function(A){return m[A]}}else if(Le(m)){var g=m.size();if(g.length!==1||g[0]!==v)throw new Error("Invalid matrix length");x=function(A){return m.get([A])}}else x=function(){return m};h||(h=Qe(x(0))?x(0).mul(0):0);var b=[];if(f.length>0){b=Ko(b,f,h);for(var C=0;C<v;C++)b[C+y][C+p]=x(C)}return new n({data:b,size:[w,D]})},n.fromJSON=function(f){return new n(f)},n.prototype.swapRows=function(f,m){if(!qe(f)||!ke(f)||!qe(m)||!ke(m))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return Bt(f,this._size[0]),Bt(m,this._size[0]),n._swapRows(f,m,this._data),this},n._swapRows=function(f,m,d){var h=d[f];d[f]=d[m],d[m]=h};function c(f){return Le(f)?c(f.valueOf()):Tt(f)?f.map(c):f}return n},{isClass:!0}),p0="clone",pI=["typed"],gI=I(p0,pI,e=>{var{typed:t}=e;return t(p0,{any:We})});function qx(e){var t=e.length,r=e[0].length,n,a,i=[];for(a=0;a<r;a++){var o=[];for(n=0;n<t;n++)o.push(e[n][a]);i.push(o)}return i}function ns(e){for(var t=0;t<e.length;t++)if(vn(e[t]))return!0;return!1}function gi(e,t){Le(e)?e.forEach(r=>t(r),!1,!0):jx(e,t,!0)}function Xe(e,t,r){if(!r)return Le(e)?e.map(a=>t(a),!1,!0):Gm(e,t,!0);var n=a=>a===0?a:t(a);return Le(e)?e.map(a=>n(a),!1,!0):Gm(e,n,!0)}function Pc(e,t,r){var n=Array.isArray(e)?Je(e):e.size();if(t<0||t>=n.length)throw new Xn(t,n.length);return Le(e)?e.create(rc(e.valueOf(),t,r),e.datatype()):rc(e,t,r)}function rc(e,t,r){var n,a,i,o;if(t<=0)if(Array.isArray(e[0])){for(o=qx(e),a=[],n=0;n<o.length;n++)a[n]=rc(o[n],t-1,r);return a}else{for(i=e[0],n=1;n<e.length;n++)i=r(i,e[n]);return i}else{for(a=[],n=0;n<e.length;n++)a[n]=rc(e[n],t-1,r);return a}}function g0(e,t,r,n,a,i,o,s,u,l,c){var f=e._values,m=e._index,d=e._ptr,h,p,y,w;if(n)for(p=d[t],y=d[t+1],h=p;h<y;h++)w=m[h],r[w]!==i?(r[w]=i,o.push(w),n[w]=f[h]):(n[w]=s(n[w],f[h]),a[w]=i);else for(p=d[t],y=d[t+1],h=p;h<y;h++)w=m[h],r[w]!==i?(r[w]=i,o.push(w)):a[w]=i}var v0="isInteger",vI=["typed","equal"],yI=I(v0,vI,e=>{var{typed:t,equal:r}=e;return t(v0,{number:n=>Number.isFinite(n)?r(n,Math.round(n)):!1,BigNumber:n=>n.isFinite()?r(n.round(),n):!1,bigint:n=>!0,Fraction:n=>n.d===1n,"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),ea="number",as="number, number";function Rx(e){return Math.abs(e)}Rx.signature=ea;function Lx(e,t){return e+t}Lx.signature=as;function Hx(e,t){return e-t}Hx.signature=as;function Gx(e,t){return e*t}Gx.signature=as;function Vx(e){return-e}Vx.signature=ea;function Ux(e){return e}Ux.signature=ea;function Ts(e){return w8(e)}Ts.signature=ea;function Wx(e){return e*e*e}Wx.signature=ea;function Jx(e){return Math.exp(e)}Jx.signature=ea;function Kx(e){return x8(e)}Kx.signature=ea;function Yx(e,t){if(!ke(e)||!ke(t))throw new Error("Parameters in function lcm must be integer numbers");if(e===0||t===0)return 0;for(var r,n=e*t;t!==0;)r=t,t=e%r,e=r;return Math.abs(n/e)}Yx.signature=as;function y0(e,t){return t?Math.log(e)/Math.log(t):Math.log(e)}function nc(e){return y8(e)}nc.signature=ea;function Vm(e){return v8(e)}Vm.signature=ea;function b0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2,r=t<0;if(r&&(t=-t),t===0)throw new Error("Root must be non-zero");if(e<0&&Math.abs(t)%2!==1)throw new Error("Root must be odd when a is negative.");if(e===0)return r?1/0:0;if(!isFinite(e))return r?0:e;var n=Math.pow(Math.abs(e),1/t);return n=e<0?-n:n,r?1/n:n}function Um(e){return ii(e)}Um.signature=ea;function Zx(e){return e*e}Zx.signature=ea;function Qx(e,t){var r,n,a,i=0,o=1,s=1,u=0;if(!ke(e)||!ke(t))throw new Error("Parameters in function xgcd must be integer numbers");for(;t;)n=Math.floor(e/t),a=e-n*t,r=i,i=o-n*i,o=r,r=s,s=u-n*s,u=r,e=t,t=a;var l;return e<0?l=[-e,-o,-u]:l=[e,e?o:0,u],l}Qx.signature=as;function Xx(e,t){return e*e<1&&t===1/0||e*e>1&&t===-1/0?0:Math.pow(e,t)}Xx.signature=as;function Cs(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(!ke(t)||t<0||t>15)throw new Error("Number of decimals in function round must be an integer from 0 to 15 inclusive");return parseFloat(px(e,t))}var bI="number",is="number, number";function e2(e,t){if(!ke(e)||!ke(t))throw new Error("Integers expected in function bitAnd");return e&t}e2.signature=is;function t2(e){if(!ke(e))throw new Error("Integer expected in function bitNot");return~e}t2.signature=bI;function r2(e,t){if(!ke(e)||!ke(t))throw new Error("Integers expected in function bitOr");return e|t}r2.signature=is;function n2(e,t){if(!ke(e)||!ke(t))throw new Error("Integers expected in function bitXor");return e^t}n2.signature=is;function a2(e,t){if(!ke(e)||!ke(t))throw new Error("Integers expected in function leftShift");return e<<t}a2.signature=is;function i2(e,t){if(!ke(e)||!ke(t))throw new Error("Integers expected in function rightArithShift");return e>>t}i2.signature=is;function o2(e,t){if(!ke(e)||!ke(t))throw new Error("Integers expected in function rightLogShift");return e>>>t}o2.signature=is;function Ba(e,t){if(t<e)return 1;if(t===e)return t;var r=t+e>>1;return Ba(e,r)*Ba(r+1,t)}function s2(e,t){if(!ke(e)||e<0)throw new TypeError("Positive integer value expected in function combinations");if(!ke(t)||t<0)throw new TypeError("Positive integer value expected in function combinations");if(t>e)throw new TypeError("k must be less than or equal to n");for(var r=e-t,n=1,a=t<r?r+1:t+1,i=2,o=t<r?t:r,s=a;s<=e;++s)for(n*=s;i<=o&&n%i===0;)n/=i,++i;return i<=o&&(n/=Ba(i,o)),n}s2.signature="number, number";var wI=Math.PI,xI=2*Math.PI,DI=Math.E,NI=1.618033988749895,AI="number",Fd="number, number";function u2(e){return!e}u2.signature=AI;function Wm(e,t){return!!(e||t)}Wm.signature=Fd;function Jm(e,t){return!!e!=!!t}Jm.signature=Fd;function Km(e,t){return!!(e&&t)}Km.signature=Fd;function ac(e){var t;if(ke(e))return e<=0?Number.isFinite(e)?1/0:NaN:e>171?1/0:Ba(1,e-1);if(e<.5)return Math.PI/(Math.sin(Math.PI*e)*ac(1-e));if(e>=171.35)return 1/0;if(e>85){var r=e*e,n=r*e,a=n*e,i=a*e;return Math.sqrt(2*Math.PI/e)*Math.pow(e/Math.E,e)*(1+1/(12*e)+1/(288*r)-139/(51840*n)-571/(2488320*a)+163879/(209018880*i)+5246819/(75246796800*i*e))}--e,t=Ho[0];for(var o=1;o<Ho.length;++o)t+=Ho[o]/(e+o);var s=e+l2+.5;return Math.sqrt(2*Math.PI)*Math.pow(s,e+.5)*Math.exp(-s)*t}ac.signature="number";var l2=4.7421875,Ho=[.9999999999999971,57.15623566586292,-59.59796035547549,14.136097974741746,-.4919138160976202,3399464998481189e-20,4652362892704858e-20,-9837447530487956e-20,.0001580887032249125,-.00021026444172410488,.00021743961811521265,-.0001643181065367639,8441822398385275e-20,-26190838401581408e-21,36899182659531625e-22],c2=.9189385332046728,CI=5,EI=7,w0=[1.000000000190015,76.18009172947146,-86.50532032941678,24.01409824083091,-1.231739572450155,.001208650973866179,-5395239384953e-18];function ic(e){if(e<0)return NaN;if(e===0)return 1/0;if(!Number.isFinite(e))return e;if(e<.5)return Math.log(Math.PI/Math.sin(Math.PI*e))-ic(1-e);e=e-1;for(var t=e+CI+.5,r=w0[0],n=EI-1;n>=1;n--)r+=w0[n]/(e+n);return c2+(e+.5)*Math.log(t)-t+Math.log(r)}ic.signature="number";var jr="number";function f2(e){return C8(e)}f2.signature=jr;function m2(e){return Math.atan(1/e)}m2.signature=jr;function d2(e){return Number.isFinite(e)?(Math.log((e+1)/e)+Math.log(e/(e-1)))/2:0}d2.signature=jr;function h2(e){return Math.asin(1/e)}h2.signature=jr;function p2(e){var t=1/e;return Math.log(t+Math.sqrt(t*t+1))}p2.signature=jr;function g2(e){return Math.acos(1/e)}g2.signature=jr;function v2(e){var t=1/e,r=Math.sqrt(t*t-1);return Math.log(r+t)}v2.signature=jr;function y2(e){return E8(e)}y2.signature=jr;function b2(e){return S8(e)}b2.signature=jr;function w2(e){return 1/Math.tan(e)}w2.signature=jr;function x2(e){var t=Math.exp(2*e);return(t+1)/(t-1)}x2.signature=jr;function D2(e){return 1/Math.sin(e)}D2.signature=jr;function N2(e){return e===0?Number.POSITIVE_INFINITY:Math.abs(2/(Math.exp(e)-Math.exp(-e)))*ii(e)}N2.signature=jr;function A2(e){return 1/Math.cos(e)}A2.signature=jr;function C2(e){return 2/(Math.exp(e)+Math.exp(-e))}C2.signature=jr;function E2(e){return T8(e)}E2.signature=jr;var Pd="number";function S2(e){return e<0}S2.signature=Pd;function M2(e){return e>0}M2.signature=Pd;function T2(e){return Number.isNaN(e)}T2.signature=Pd;function Bn(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e-9,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;if(r<=0)throw new Error("Relative tolerance must be greater than 0");if(n<0)throw new Error("Absolute tolerance must be at least 0");return e.isNaN()||t.isNaN()?!1:!e.isFinite()||!t.isFinite()?e.eq(t):e.eq(t)?!0:e.minus(t).abs().lte(e.constructor.max(e.constructor.max(e.abs(),t.abs()).mul(r),n))}var x0="isNegative",SI=["typed","config"],MI=I(x0,SI,e=>{var{typed:t,config:r}=e;return t(x0,{number:n=>Cr(n,0,r.relTol,r.absTol)?!1:S2(n),BigNumber:n=>Bn(n,new n.constructor(0),r.relTol,r.absTol)?!1:n.isNeg()&&!n.isZero()&&!n.isNaN(),bigint:n=>n<0n,Fraction:n=>n.s<0n,Unit:t.referToSelf(n=>a=>t.find(n,a.valueType())(a.value)),"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),D0="isNumeric",TI=["typed"],FI=I(D0,TI,e=>{var{typed:t}=e;return t(D0,{"number | BigNumber | bigint | Fraction | boolean":()=>!0,"Complex | Unit | string | null | undefined | Node":()=>!1,"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),N0="hasNumericValue",PI=["typed","isNumeric"],kI=I(N0,PI,e=>{var{typed:t,isNumeric:r}=e;return t(N0,{boolean:()=>!0,string:function(a){return a.trim().length>0&&!isNaN(Number(a))},any:function(a){return r(a)}})}),A0="isPositive",OI=["typed","config"],$I=I(A0,OI,e=>{var{typed:t,config:r}=e;return t(A0,{number:n=>Cr(n,0,r.relTol,r.absTol)?!1:M2(n),BigNumber:n=>Bn(n,new n.constructor(0),r.relTol,r.absTol)?!1:!n.isNeg()&&!n.isZero()&&!n.isNaN(),bigint:n=>n>0n,Fraction:n=>n.s>0n&&n.n>0n,Unit:t.referToSelf(n=>a=>t.find(n,a.valueType())(a.value)),"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),C0="isZero",BI=["typed","equalScalar"],_I=I(C0,BI,e=>{var{typed:t,equalScalar:r}=e;return t(C0,{"number | BigNumber | Complex | Fraction":n=>r(n,0),bigint:n=>n===0n,Unit:t.referToSelf(n=>a=>t.find(n,a.valueType())(a.value)),"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),E0="isNaN",II=["typed"],zI=I(E0,II,e=>{var{typed:t}=e;return t(E0,{number:T2,BigNumber:function(n){return n.isNaN()},bigint:function(n){return!1},Fraction:function(n){return!1},Complex:function(n){return n.isNaN()},Unit:function(n){return Number.isNaN(n.value)},"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),S0="isBounded",jI=["typed"],qI=I(S0,jI,e=>{var{typed:t}=e;return t(S0,{number:r=>Number.isFinite(r),"BigNumber | Complex":r=>r.isFinite(),"bigint | Fraction":()=>!0,"null | undefined":()=>!1,Unit:t.referToSelf(r=>n=>r(n.value)),"Array | Matrix":t.referToSelf(r=>n=>(Array.isArray(n)||(n=n.valueOf()),n.every(a=>r(a))))})}),M0="isFinite",RI=["typed","isBounded","map"],LI=I(M0,RI,e=>{var{typed:t,isBounded:r,map:n}=e;return t(M0,{"Array | Matrix":a=>n(a,r),any:a=>r(a)})}),T0="typeOf",HI=["typed"],GI=I(T0,HI,e=>{var{typed:t}=e;return t(T0,{any:Pt})});function VI(e,t,r,n){return Cr(e.re,t.re,r,n)&&Cr(e.im,t.im,r,n)}var os=I("compareUnits",["typed"],e=>{var{typed:t}=e;return{"Unit, Unit":t.referToSelf(r=>(n,a)=>{if(!n.equalBase(a))throw new Error("Cannot compare units with different base");return t.find(r,[n.valueType(),a.valueType()])(n.value,a.value)})}}),oc="equalScalar",UI=["typed","config"],WI=I(oc,UI,e=>{var{typed:t,config:r}=e,n=os({typed:t});return t(oc,{"boolean, boolean":function(i,o){return i===o},"number, number":function(i,o){return Cr(i,o,r.relTol,r.absTol)},"BigNumber, BigNumber":function(i,o){return i.eq(o)||Bn(i,o,r.relTol,r.absTol)},"bigint, bigint":function(i,o){return i===o},"Fraction, Fraction":function(i,o){return i.equals(o)},"Complex, Complex":function(i,o){return VI(i,o,r.relTol,r.absTol)}},n)});I(oc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(oc,{"number, number":function(a,i){return Cr(a,i,r.relTol,r.absTol)}})});var JI="SparseMatrix",KI=["typed","equalScalar","Matrix"],YI=I(JI,KI,e=>{var{typed:t,equalScalar:r,Matrix:n}=e;function a(p,y){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");if(y&&!Zt(y))throw new Error("Invalid datatype: "+y);if(Le(p))i(this,p,y);else if(p&&Tt(p.index)&&Tt(p.ptr)&&Tt(p.size))this._values=p.values,this._index=p.index,this._ptr=p.ptr,this._size=p.size,this._datatype=y||p.datatype;else if(Tt(p))o(this,p,y);else{if(p)throw new TypeError("Unsupported type of data ("+Pt(p)+")");this._values=[],this._index=[],this._ptr=[0],this._size=[0,0],this._datatype=y}}function i(p,y,w){y.type==="SparseMatrix"?(p._values=y._values?We(y._values):void 0,p._index=We(y._index),p._ptr=We(y._ptr),p._size=We(y._size),p._datatype=w||y._datatype):o(p,y.valueOf(),w||y._datatype)}function o(p,y,w){p._values=[],p._index=[],p._ptr=[],p._datatype=w;var D=y.length,v=0,x=r,g=0;if(Zt(w)&&(x=t.find(r,[w,w])||r,g=t.convert(0,w)),D>0){var b=0;do{p._ptr.push(p._index.length);for(var C=0;C<D;C++){var N=y[C];if(Tt(N)){if(b===0&&v<N.length&&(v=N.length),b<N.length){var A=N[b];x(A,g)||(p._values.push(A),p._index.push(C))}}else b===0&&v<1&&(v=1),x(N,g)||(p._values.push(N),p._index.push(C))}b++}while(b<v)}for(;p._ptr.length<=v;)p._ptr.push(p._index.length);p._size=[D,v]}a.prototype=new n,a.prototype.createSparseMatrix=function(p,y){return new a(p,y)},Object.defineProperty(a,"name",{value:"SparseMatrix"}),a.prototype.constructor=a,a.prototype.type="SparseMatrix",a.prototype.isSparseMatrix=!0,a.prototype.getDataType=function(){return Fc(this._values,Pt)},a.prototype.storage=function(){return"sparse"},a.prototype.datatype=function(){return this._datatype},a.prototype.create=function(p,y){return new a(p,y)},a.prototype.density=function(){var p=this._size[0],y=this._size[1];return p!==0&&y!==0?this._index.length/(p*y):0},a.prototype.subset=function(p,y,w){if(!this._values)throw new Error("Cannot invoke subset on a Pattern only matrix");switch(arguments.length){case 1:return s(this,p);case 2:case 3:return u(this,p,y,w);default:throw new SyntaxError("Wrong number of arguments")}};function s(p,y){if(!Nc(y))throw new TypeError("Invalid index");var w=y.isScalar();if(w)return p.get(y.min());var D=y.size();if(D.length!==p._size.length)throw new at(D.length,p._size.length);var v,x,g,b,C=y.min(),N=y.max();for(v=0,x=p._size.length;v<x;v++)Bt(C[v],p._size[v]),Bt(N[v],p._size[v]);var A=p._values,E=p._index,S=p._ptr,F=y.dimension(0),k=y.dimension(1),$=[],R=[];function M(G,V){R[G]=V[0],$[G]=!0}Number.isInteger(F)?M(F,[0]):F.forEach(M);var B=A?[]:void 0,L=[],j=[];function Z(G){for(j.push(L.length),g=S[G],b=S[G+1];g<b;g++)v=E[g],$[v]===!0&&(L.push(R[v]),B&&B.push(A[g]))}return Number.isInteger(k)?Z(k):k.forEach(Z),j.push(L.length),new a({values:B,index:L,ptr:j,size:D,datatype:p._datatype})}function u(p,y,w,D){if(!y||y.isIndex!==!0)throw new TypeError("Invalid index");var v=y.size(),x=y.isScalar(),g;if(Le(w)?(g=w.size(),w=w.toArray()):g=Je(w),x){if(g.length!==0)throw new TypeError("Scalar expected");p.set(y.min(),w,D)}else{if(v.length!==1&&v.length!==2)throw new at(v.length,p._size.length,"<");if(g.length<v.length){for(var b=0,C=0;v[b]===1&&g[b]===1;)b++;for(;v[b]===1;)C++,b++;w=Ox(w,v.length,C,g)}if(!Ha(v,g))throw new at(v,g,">");if(v.length===1){var N=y.dimension(0);S(N,(F,k)=>{Bt(F),p.set([F,0],w[k[0]],D)})}else{var A=y.dimension(0),E=y.dimension(1);S(A,(F,k)=>{Bt(F),S(E,($,R)=>{Bt($),p.set([F,$],w[k[0]][R[0]],D)})})}}return p;function S(F,k){qe(F)?k(F,[0]):F.forEach(k)}}a.prototype.get=function(p){if(!Tt(p))throw new TypeError("Array expected");if(p.length!==this._size.length)throw new at(p.length,this._size.length);if(!this._values)throw new Error("Cannot invoke get on a Pattern only matrix");var y=p[0],w=p[1];Bt(y,this._size[0]),Bt(w,this._size[1]);var D=l(y,this._ptr[w],this._ptr[w+1],this._index);return D<this._ptr[w+1]&&this._index[D]===y?this._values[D]:0},a.prototype.set=function(p,y,w){if(!Tt(p))throw new TypeError("Array expected");if(p.length!==this._size.length)throw new at(p.length,this._size.length);if(!this._values)throw new Error("Cannot invoke set on a Pattern only matrix");var D=p[0],v=p[1],x=this._size[0],g=this._size[1],b=r,C=0;Zt(this._datatype)&&(b=t.find(r,[this._datatype,this._datatype])||r,C=t.convert(0,this._datatype)),(D>x-1||v>g-1)&&(m(this,Math.max(D+1,x),Math.max(v+1,g),w),x=this._size[0],g=this._size[1]),Bt(D,x),Bt(v,g);var N=l(D,this._ptr[v],this._ptr[v+1],this._index);return N<this._ptr[v+1]&&this._index[N]===D?b(y,C)?c(N,v,this._values,this._index,this._ptr):this._values[N]=y:b(y,C)||f(N,D,v,y,this._values,this._index,this._ptr),this};function l(p,y,w,D){if(w-y===0)return w;for(var v=y;v<w;v++)if(D[v]===p)return v;return y}function c(p,y,w,D,v){w.splice(p,1),D.splice(p,1);for(var x=y+1;x<v.length;x++)v[x]--}function f(p,y,w,D,v,x,g){v.splice(p,0,D),x.splice(p,0,y);for(var b=w+1;b<g.length;b++)g[b]++}a.prototype.resize=function(p,y,w){if(!vn(p))throw new TypeError("Array or Matrix expected");var D=p.valueOf().map(x=>Array.isArray(x)&&x.length===1?x[0]:x);if(D.length!==2)throw new Error("Only two dimensions matrix are supported");D.forEach(function(x){if(!qe(x)||!ke(x)||x<0)throw new TypeError("Invalid size, must contain positive integers (size: "+it(D)+")")});var v=w?this.clone():this;return m(v,D[0],D[1],y)};function m(p,y,w,D){var v=D||0,x=r,g=0;Zt(p._datatype)&&(x=t.find(r,[p._datatype,p._datatype])||r,g=t.convert(0,p._datatype),v=t.convert(v,p._datatype));var b=!x(v,g),C=p._size[0],N=p._size[1],A,E,S;if(w>N){for(E=N;E<w;E++)if(p._ptr[E]=p._values.length,b)for(A=0;A<C;A++)p._values.push(v),p._index.push(A);p._ptr[w]=p._values.length}else w<N&&(p._ptr.splice(w+1,N-w),p._values.splice(p._ptr[w],p._values.length),p._index.splice(p._ptr[w],p._index.length));if(N=w,y>C){if(b){var F=0;for(E=0;E<N;E++){p._ptr[E]=p._ptr[E]+F,S=p._ptr[E+1]+F;var k=0;for(A=C;A<y;A++,k++)p._values.splice(S+k,0,v),p._index.splice(S+k,0,A),F++}p._ptr[N]=p._values.length}}else if(y<C){var $=0;for(E=0;E<N;E++){p._ptr[E]=p._ptr[E]-$;var R=p._ptr[E],M=p._ptr[E+1]-$;for(S=R;S<M;S++)A=p._index[S],A>y-1&&(p._values.splice(S,1),p._index.splice(S,1),$++)}p._ptr[E]=p._values.length}return p._size[0]=y,p._size[1]=w,p}a.prototype.reshape=function(p,y){if(!Tt(p))throw new TypeError("Array expected");if(p.length!==2)throw new Error("Sparse matrices can only be reshaped in two dimensions");p.forEach(function(j){if(!qe(j)||!ke(j)||j<=-2||j===0)throw new TypeError("Invalid size, must contain positive integers or -1 (size: "+it(p)+")")});var w=this._size[0]*this._size[1];p=Td(p,w);var D=p[0]*p[1];if(w!==D)throw new Error("Reshaping sparse matrix will result in the wrong number of elements");var v=y?this.clone():this;if(this._size[0]===p[0]&&this._size[1]===p[1])return v;for(var x=[],g=0;g<v._ptr.length;g++)for(var b=0;b<v._ptr[g+1]-v._ptr[g];b++)x.push(g);for(var C=v._values.slice(),N=v._index.slice(),A=0;A<v._index.length;A++){var E=N[A],S=x[A],F=E*v._size[1]+S;x[A]=F%p[1],N[A]=Math.floor(F/p[1])}v._values.length=0,v._index.length=0,v._ptr.length=p[1]+1,v._size=p.slice();for(var k=0;k<v._ptr.length;k++)v._ptr[k]=0;for(var $=0;$<C.length;$++){var R=N[$],M=x[$],B=C[$],L=l(R,v._ptr[M],v._ptr[M+1],v._index);f(L,R,M,B,v._values,v._index,v._ptr)}return v},a.prototype.clone=function(){var p=new a({values:this._values?We(this._values):void 0,index:We(this._index),ptr:We(this._ptr),size:We(this._size),datatype:this._datatype});return p},a.prototype.size=function(){return this._size.slice(0)},a.prototype.map=function(p,y){if(!this._values)throw new Error("Cannot invoke map on a Pattern only matrix");var w=this,D=this._size[0],v=this._size[1],x=eo(p,w,"map"),g=function(C,N,A){return x.fn(C,[N,A],w)};return d(this,0,D-1,0,v-1,g,y)};function d(p,y,w,D,v,x,g){var b=[],C=[],N=[],A=r,E=0;Zt(p._datatype)&&(A=t.find(r,[p._datatype,p._datatype])||r,E=t.convert(0,p._datatype));for(var S=function(P,Q,z){var oe=x(P,Q,z);A(oe,E)||(b.push(oe),C.push(Q))},F=D;F<=v;F++){N.push(b.length);var k=p._ptr[F],$=p._ptr[F+1];if(g)for(var R=k;R<$;R++){var M=p._index[R];M>=y&&M<=w&&S(p._values[R],M-y,F-D)}else{for(var B={},L=k;L<$;L++){var j=p._index[L];B[j]=p._values[L]}for(var Z=y;Z<=w;Z++){var G=Z in B?B[Z]:0;S(G,Z-y,F-D)}}}return N.push(b.length),new a({values:b,index:C,ptr:N,size:[w-y+1,v-D+1]})}a.prototype.forEach=function(p,y){if(!this._values)throw new Error("Cannot invoke forEach on a Pattern only matrix");for(var w=this,D=this._size[0],v=this._size[1],x=eo(p,w,"forEach"),g=0;g<v;g++){var b=this._ptr[g],C=this._ptr[g+1];if(y)for(var N=b;N<C;N++){var A=this._index[N];x.fn(this._values[N],[A,g],w)}else{for(var E={},S=b;S<C;S++){var F=this._index[S];E[F]=this._values[S]}for(var k=0;k<D;k++){var $=k in E?E[k]:0;x.fn($,[k,g],w)}}}},a.prototype[Symbol.iterator]=function*(){if(!this._values)throw new Error("Cannot iterate a Pattern only matrix");for(var p=this._size[1],y=0;y<p;y++)for(var w=this._ptr[y],D=this._ptr[y+1],v=w;v<D;v++){var x=this._index[v];yield{value:this._values[v],index:[x,y]}}},a.prototype.toArray=function(){return h(this._values,this._index,this._ptr,this._size,!0)},a.prototype.valueOf=function(){return h(this._values,this._index,this._ptr,this._size,!1)};function h(p,y,w,D,v){var x=D[0],g=D[1],b=[],C,N;for(C=0;C<x;C++)for(b[C]=[],N=0;N<g;N++)b[C][N]=0;for(N=0;N<g;N++)for(var A=w[N],E=w[N+1],S=A;S<E;S++)C=y[S],b[C][N]=p?v?We(p[S]):p[S]:1;return b}return a.prototype.format=function(p){for(var y=this._size[0],w=this._size[1],D=this.density(),v="Sparse Matrix ["+it(y,p)+" x "+it(w,p)+"] density: "+it(D,p)+`
35
+ `,x=0;x<w;x++)for(var g=this._ptr[x],b=this._ptr[x+1],C=g;C<b;C++){var N=this._index[C];v+=`
36
+ (`+it(N,p)+", "+it(x,p)+") ==> "+(this._values?it(this._values[C],p):"X")}return v},a.prototype.toString=function(){return it(this.toArray())},a.prototype.toJSON=function(){return{mathjs:"SparseMatrix",values:this._values,index:this._index,ptr:this._ptr,size:this._size,datatype:this._datatype}},a.prototype.diagonal=function(p){if(p){if(Qe(p)&&(p=p.toNumber()),!qe(p)||!ke(p))throw new TypeError("The parameter k must be an integer number")}else p=0;var y=p>0?p:0,w=p<0?-p:0,D=this._size[0],v=this._size[1],x=Math.min(D-w,v-y),g=[],b=[],C=[];C[0]=0;for(var N=y;N<v&&g.length<x;N++)for(var A=this._ptr[N],E=this._ptr[N+1],S=A;S<E;S++){var F=this._index[S];if(F===N-y+w){g.push(this._values[S]),b[g.length-1]=F-w;break}}return C.push(g.length),new a({values:g,index:b,ptr:C,size:[x,1]})},a.fromJSON=function(p){return new a(p)},a.diagonal=function(p,y,w,D,v){if(!Tt(p))throw new TypeError("Array expected, size parameter");if(p.length!==2)throw new Error("Only two dimensions matrix are supported");if(p=p.map(function(j){if(Qe(j)&&(j=j.toNumber()),!qe(j)||!ke(j)||j<1)throw new Error("Size values must be positive integers");return j}),w){if(Qe(w)&&(w=w.toNumber()),!qe(w)||!ke(w))throw new TypeError("The parameter k must be an integer number")}else w=0;var x=r,g=0;Zt(v)&&(x=t.find(r,[v,v])||r,g=t.convert(0,v));var b=w>0?w:0,C=w<0?-w:0,N=p[0],A=p[1],E=Math.min(N-C,A-b),S;if(Tt(y)){if(y.length!==E)throw new Error("Invalid value array length");S=function(Z){return y[Z]}}else if(Le(y)){var F=y.size();if(F.length!==1||F[0]!==E)throw new Error("Invalid matrix length");S=function(Z){return y.get([Z])}}else S=function(){return y};for(var k=[],$=[],R=[],M=0;M<A;M++){R.push(k.length);var B=M-b;if(B>=0&&B<E){var L=S(B);x(L,g)||($.push(B+C),k.push(L))}}return R.push(k.length),new a({values:k,index:$,ptr:R,size:[N,A]})},a.prototype.swapRows=function(p,y){if(!qe(p)||!ke(p)||!qe(y)||!ke(y))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return Bt(p,this._size[0]),Bt(y,this._size[0]),a._swapRows(p,y,this._size[1],this._values,this._index,this._ptr),this},a._forEachRow=function(p,y,w,D,v){for(var x=D[p],g=D[p+1],b=x;b<g;b++)v(w[b],y[b])},a._swapRows=function(p,y,w,D,v,x){for(var g=0;g<w;g++){var b=x[g],C=x[g+1],N=l(p,b,C,v),A=l(y,b,C,v);if(N<C&&A<C&&v[N]===p&&v[A]===y){if(D){var E=D[N];D[N]=D[A],D[A]=E}continue}if(N<C&&v[N]===p&&(A>=C||v[A]!==y)){var S=D?D[N]:void 0;v.splice(A,0,y),D&&D.splice(A,0,S),v.splice(A<=N?N+1:N,1),D&&D.splice(A<=N?N+1:N,1);continue}if(A<C&&v[A]===y&&(N>=C||v[N]!==p)){var F=D?D[A]:void 0;v.splice(N,0,p),D&&D.splice(N,0,F),v.splice(N<=A?A+1:A,1),D&&D.splice(N<=A?A+1:A,1)}}},a},{isClass:!0}),ZI="number",QI=["typed"];function XI(e){var t=e.match(/(0[box])([0-9a-fA-F]*)\.([0-9a-fA-F]*)/);if(t){var r={"0b":2,"0o":8,"0x":16}[t[1]],n=t[2],a=t[3];return{input:e,radix:r,integerPart:n,fractionalPart:a}}else return null}function e7(e){for(var t=parseInt(e.integerPart,e.radix),r=0,n=0;n<e.fractionalPart.length;n++){var a=parseInt(e.fractionalPart[n],e.radix);r+=a/Math.pow(e.radix,n+1)}var i=t+r;if(isNaN(i))throw new SyntaxError('String "'+e.input+'" is not a valid number');return i}var t7=I(ZI,QI,e=>{var{typed:t}=e,r=t("number",{"":function(){return 0},number:function(a){return a},string:function(a){if(a==="NaN")return NaN;var i=XI(a);if(i)return e7(i);var o=0,s=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);s&&(o=Number(s[2]),a=s[1]);var u=Number(a);if(isNaN(u))throw new SyntaxError('String "'+a+'" is not a valid number');if(s){if(u>2**o-1)throw new SyntaxError('String "'.concat(a,'" is out of range'));u>=2**(o-1)&&(u=u-2**o)}return u},BigNumber:function(a){return a.toNumber()},bigint:function(a){return Number(a)},Fraction:function(a){return a.valueOf()},Unit:t.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),null:function(a){return 0},"Unit, string | Unit":function(a,i){return a.toNumber(i)},"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))});return r.fromJSON=function(n){return parseFloat(n.value)},r}),r7="bigint",n7=["typed"],a7=I(r7,n7,e=>{var{typed:t}=e,r=t("bigint",{"":function(){return 0n},bigint:function(a){return a},number:function(a){return BigInt(a.toFixed())},BigNumber:function(a){return BigInt(a.round().toString())},Fraction:function(a){return BigInt(a.valueOf().toFixed())},"string | boolean":function(a){return BigInt(a)},null:function(a){return 0n},"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))});return r.fromJSON=function(n){return BigInt(n.value)},r}),F0="string",i7=["typed"],o7=I(F0,i7,e=>{var{typed:t}=e;return t(F0,{"":function(){return""},number:Ki,null:function(n){return"null"},boolean:function(n){return n+""},string:function(n){return n},"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r)),any:function(n){return String(n)}})}),P0="boolean",s7=["typed"],u7=I(P0,s7,e=>{var{typed:t}=e;return t(P0,{"":function(){return!1},boolean:function(n){return n},number:function(n){return!!n},null:function(n){return!1},BigNumber:function(n){return!n.isZero()},string:function(n){var a=n.toLowerCase();if(a==="true")return!0;if(a==="false")return!1;var i=Number(n);if(n!==""&&!isNaN(i))return!!i;throw new Error('Cannot convert "'+n+'" to a boolean')},"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),l7="bignumber",c7=["typed","BigNumber"],f7=I(l7,c7,e=>{var{typed:t,BigNumber:r}=e;return t("bignumber",{"":function(){return new r(0)},number:function(a){return new r(a+"")},string:function(a){var i=a.match(/(0[box][0-9a-fA-F]*)i([0-9]*)/);if(i){var o=i[2],s=r(i[1]),u=new r(2).pow(Number(o));if(s.gt(u.sub(1)))throw new SyntaxError('String "'.concat(a,'" is out of range'));var l=new r(2).pow(Number(o)-1);return s.gte(l)?s.sub(u):s}return new r(a)},BigNumber:function(a){return a},bigint:function(a){return new r(a.toString())},Unit:t.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),Fraction:function(a){return new r(String(a.n)).div(String(a.d)).times(String(a.s))},null:function(a){return new r(0)},"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),m7="complex",d7=["typed","Complex"],h7=I(m7,d7,e=>{var{typed:t,Complex:r}=e;return t("complex",{"":function(){return r.ZERO},number:function(a){return new r(a,0)},"number, number":function(a,i){return new r(a,i)},"BigNumber, BigNumber":function(a,i){return new r(a.toNumber(),i.toNumber())},Fraction:function(a){return new r(a.valueOf(),0)},Complex:function(a){return a.clone()},string:function(a){return r(a)},null:function(a){return r(0)},Object:function(a){if("re"in a&&"im"in a)return new r(a.re,a.im);if("r"in a&&"phi"in a||"abs"in a&&"arg"in a)return new r(a);throw new Error("Expected object with properties (re and im) or (r and phi) or (abs and arg)")},"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),p7="fraction",g7=["typed","Fraction"],v7=I(p7,g7,e=>{var{typed:t,Fraction:r}=e;return t("fraction",{number:function(a){if(!Number.isFinite(a)||isNaN(a))throw new Error(a+" cannot be represented as a fraction");return new r(a)},string:function(a){return new r(a)},"number, number":function(a,i){return new r(a,i)},"bigint, bigint":function(a,i){return new r(a,i)},null:function(a){return new r(0)},BigNumber:function(a){return new r(a.toString())},bigint:function(a){return new r(a.toString())},Fraction:function(a){return a},Unit:t.referToSelf(n=>a=>{var i=a.clone();return i.value=n(a.value),i}),Object:function(a){return new r(a)},"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),k0="matrix",y7=["typed","Matrix","DenseMatrix","SparseMatrix"],b7=I(k0,y7,e=>{var{typed:t,Matrix:r,DenseMatrix:n,SparseMatrix:a}=e;return t(k0,{"":function(){return i([])},string:function(s){return i([],s)},"string, string":function(s,u){return i([],s,u)},Array:function(s){return i(s)},Matrix:function(s){return i(s,s.storage())},"Array | Matrix, string":i,"Array | Matrix, string, string":i});function i(o,s,u){if(s==="dense"||s==="default"||s===void 0)return new n(o,u);if(s==="sparse")return new a(o,u);throw new TypeError("Unknown matrix type "+JSON.stringify(s)+".")}}),O0="matrixFromFunction",w7=["typed","matrix","isZero"],x7=I(O0,w7,e=>{var{typed:t,matrix:r,isZero:n}=e;return t(O0,{"Array | Matrix, function, string, string":function(o,s,u,l){return a(o,s,u,l)},"Array | Matrix, function, string":function(o,s,u){return a(o,s,u)},"Matrix, function":function(o,s){return a(o,s,"dense")},"Array, function":function(o,s){return a(o,s,"dense").toArray()},"Array | Matrix, string, function":function(o,s,u){return a(o,u,s)},"Array | Matrix, string, string, function":function(o,s,u,l){return a(o,l,s,u)}});function a(i,o,s,u){var l;return u!==void 0?l=r(s,u):l=r(s),l.resize(i),l.forEach(function(c,f){var m=o(f);n(m)||l.set(f,m)}),l}}),$0="matrixFromRows",D7=["typed","matrix","flatten","size"],N7=I($0,D7,e=>{var{typed:t,matrix:r,flatten:n,size:a}=e;return t($0,{"...Array":function(u){return i(u)},"...Matrix":function(u){return r(i(u.map(l=>l.toArray())))}});function i(s){if(s.length===0)throw new TypeError("At least one row is needed to construct a matrix.");var u=o(s[0]),l=[];for(var c of s){var f=o(c);if(f!==u)throw new TypeError("The vectors had different length: "+(u|0)+" ≠ "+(f|0));l.push(n(c))}return l}function o(s){var u=a(s);if(u.length===1)return u[0];if(u.length===2){if(u[0]===1)return u[1];if(u[1]===1)return u[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}}),B0="matrixFromColumns",A7=["typed","matrix","flatten","size"],C7=I(B0,A7,e=>{var{typed:t,matrix:r,flatten:n,size:a}=e;return t(B0,{"...Array":function(u){return i(u)},"...Matrix":function(u){return r(i(u.map(l=>l.toArray())))}});function i(s){if(s.length===0)throw new TypeError("At least one column is needed to construct a matrix.");for(var u=o(s[0]),l=[],c=0;c<u;c++)l[c]=[];for(var f of s){var m=o(f);if(m!==u)throw new TypeError("The vectors had different length: "+(u|0)+" ≠ "+(m|0));for(var d=n(f),h=0;h<u;h++)l[h].push(d[h])}return l}function o(s){var u=a(s);if(u.length===1)return u[0];if(u.length===2){if(u[0]===1)return u[1];if(u[1]===1)return u[0];throw new TypeError("At least one of the arguments is not a vector.")}else throw new TypeError("Only one- or two-dimensional vectors are supported.")}}),_0="splitUnit",E7=["typed"],S7=I(_0,E7,e=>{var{typed:t}=e;return t(_0,{"Unit, Array":function(n,a){return n.splitUnit(a)}})}),I0="unaryMinus",M7=["typed"],T7=I(I0,M7,e=>{var{typed:t}=e;return t(I0,{number:Vx,"Complex | BigNumber | Fraction":r=>r.neg(),bigint:r=>-r,Unit:t.referToSelf(r=>n=>{var a=n.clone();return a.value=t.find(r,a.valueType())(n.value),a}),"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r,!0))})}),z0="unaryPlus",F7=["typed","config","numeric"],P7=I(z0,F7,e=>{var{typed:t,config:r,numeric:n}=e;return t(z0,{number:Ux,Complex:function(i){return i},BigNumber:function(i){return i},bigint:function(i){return i},Fraction:function(i){return i},Unit:function(i){return i.clone()},"Array | Matrix":t.referToSelf(a=>i=>Xe(i,a,!0)),boolean:function(i){return n(i?1:0,r.number)},string:function(i){return n(i,yi(i,r))}})}),j0="abs",k7=["typed"],O7=I(j0,k7,e=>{var{typed:t}=e;return t(j0,{number:Rx,"Complex | BigNumber | Fraction | Unit":r=>r.abs(),bigint:r=>r<0n?-r:r,"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r,!0))})}),q0="mapSlices",$7=["typed","isInteger"],Ym=I(q0,$7,e=>{var{typed:t,isInteger:r}=e;return t(q0,{"Array | Matrix, number | BigNumber, function":function(a,i,o){if(!r(i))throw new TypeError("Integer number expected for dimension");var s=Array.isArray(a)?Je(a):a.size();if(i<0||i>=s.length)throw new Xn(i,s.length);return Le(a)?a.create(sc(a.valueOf(),i,o),a.datatype()):sc(a,i,o)}})},{formerly:"apply"});function sc(e,t,r){var n,a,i;if(t<=0)if(Array.isArray(e[0])){for(i=B7(e),a=[],n=0;n<i.length;n++)a[n]=sc(i[n],t-1,r);return a}else return r(e);else{for(a=[],n=0;n<e.length;n++)a[n]=sc(e[n],t-1,r);return a}}function B7(e){var t=e.length,r=e[0].length,n,a,i=[];for(a=0;a<r;a++){var o=[];for(n=0;n<t;n++)o.push(e[n][a]);i.push(o)}return i}var R0="addScalar",_7=["typed"],I7=I(R0,_7,e=>{var{typed:t}=e;return t(R0,{"number, number":Lx,"Complex, Complex":function(n,a){return n.add(a)},"BigNumber, BigNumber":function(n,a){return n.plus(a)},"bigint, bigint":function(n,a){return n+a},"Fraction, Fraction":function(n,a){return n.add(a)},"Unit, Unit":t.referToSelf(r=>(n,a)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(a.value===null||a.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(a))throw new Error("Units do not match");var i=n.clone();return i.value=t.find(r,[i.valueType(),a.valueType()])(i.value,a.value),i.fixPrefix=!1,i})})}),L0="subtractScalar",z7=["typed"],j7=I(L0,z7,e=>{var{typed:t}=e;return t(L0,{"number, number":Hx,"Complex, Complex":function(n,a){return n.sub(a)},"BigNumber, BigNumber":function(n,a){return n.minus(a)},"bigint, bigint":function(n,a){return n-a},"Fraction, Fraction":function(n,a){return n.sub(a)},"Unit, Unit":t.referToSelf(r=>(n,a)=>{if(n.value===null||n.value===void 0)throw new Error("Parameter x contains a unit with undefined value");if(a.value===null||a.value===void 0)throw new Error("Parameter y contains a unit with undefined value");if(!n.equalBase(a))throw new Error("Units do not match");var i=n.clone();return i.value=t.find(r,[i.valueType(),a.valueType()])(i.value,a.value),i.fixPrefix=!1,i})})}),H0="cbrt",q7=["config","typed","isNegative","unaryMinus","matrix","Complex","BigNumber","Fraction"],R7=I(H0,q7,e=>{var{config:t,typed:r,isNegative:n,unaryMinus:a,matrix:i,Complex:o,BigNumber:s,Fraction:u}=e;return r(H0,{number:Ts,Complex:l,"Complex, boolean":l,BigNumber:function(m){return m.cbrt()},Unit:c});function l(f,m){var d=f.arg()/3,h=f.abs(),p=new o(Ts(h),0).mul(new o(0,d).exp());if(m){var y=[p,new o(Ts(h),0).mul(new o(0,d+Math.PI*2/3).exp()),new o(Ts(h),0).mul(new o(0,d-Math.PI*2/3).exp())];return t.matrix==="Array"?y:i(y)}else return p}function c(f){if(f.value&&_a(f.value)){var m=f.clone();return m.value=1,m=m.pow(1/3),m.value=l(f.value),m}else{var d=n(f.value);d&&(f.value=a(f.value));var h;Qe(f.value)?h=new s(1).div(3):au(f.value)?h=new u(1,3):h=1/3;var p=f.pow(h);return d&&(p.value=a(p.value)),p}}}),L7="matAlgo11xS0s",H7=["typed","equalScalar"],Pr=I(L7,H7,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o,s){var u=a._values,l=a._index,c=a._ptr,f=a._size,m=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=f[0],h=f[1],p,y=r,w=0,D=o;typeof m=="string"&&(p=m,y=t.find(r,[p,p]),w=t.convert(0,p),i=t.convert(i,p),D=t.find(o,[p,p]));for(var v=[],x=[],g=[],b=0;b<h;b++){g[b]=x.length;for(var C=c[b],N=c[b+1],A=C;A<N;A++){var E=l[A],S=s?D(i,u[A]):D(u[A],i);y(S,w)||(x.push(E),v.push(S))}}return g[h]=x.length,a.createSparseMatrix({values:v,index:x,ptr:g,size:[d,h],datatype:p})}}),G7="matAlgo12xSfs",V7=["typed","DenseMatrix"],fr=I(G7,V7,e=>{var{typed:t,DenseMatrix:r}=e;return function(a,i,o,s){var u=a._values,l=a._index,c=a._ptr,f=a._size,m=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=f[0],h=f[1],p,y=o;typeof m=="string"&&(p=m,i=t.convert(i,p),y=t.find(o,[p,p]));for(var w=[],D=[],v=[],x=0;x<h;x++){for(var g=x+1,b=c[x],C=c[x+1],N=b;N<C;N++){var A=l[N];D[A]=u[N],v[A]=g}for(var E=0;E<d;E++)x===0&&(w[E]=[]),v[E]===g?w[E][x]=s?y(i,D[E]):y(D[E],i):w[E][x]=s?y(i,0):y(0,i)}return new r({data:w,size:[d,h],datatype:p})}}),U7="matAlgo14xDs",W7=["typed"],_n=I(U7,W7,e=>{var{typed:t}=e;return function(a,i,o,s){var u=a._data,l=a._size,c=a._datatype,f,m=o;typeof c=="string"&&(f=c,i=t.convert(i,f),m=t.find(o,[f,f]));var d=l.length>0?r(m,0,l,l[0],u,i,s):[];return a.createDenseMatrix({data:d,size:We(l),datatype:f})};function r(n,a,i,o,s,u,l){var c=[];if(a===i.length-1)for(var f=0;f<o;f++)c[f]=l?n(u,s[f]):n(s[f],u);else for(var m=0;m<o;m++)c[m]=r(n,a+1,i,i[a+1],s[m],u,l);return c}}),Zm="ceil",J7=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],K7=new pi(10),Y7=I(Zm,["typed","config","round"],e=>{var{typed:t,config:r,round:n}=e;function a(i){var o=Math.ceil(i),s=n(i);return o===s?o:Cr(i,s,r.relTol,r.absTol)&&!Cr(i,o,r.relTol,r.absTol)?s:o}return t(Zm,{number:a,"number, number":function(o,s){if(!ke(s))throw new RangeError("number of decimals in function ceil must be an integer");if(s<0||s>15)throw new RangeError("number of decimals in ceil number must be in range 0-15");var u=10**s;return a(o*u)/u}})}),Z7=I(Zm,J7,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s}=e,u=Pr({typed:t,equalScalar:i}),l=fr({typed:t,DenseMatrix:s}),c=_n({typed:t}),f=Y7({typed:t,config:r,round:n});function m(d){var h=(w,D)=>Bn(w,D,r.relTol,r.absTol),p=d.ceil(),y=n(d);return p.eq(y)?p:h(d,y)&&!h(d,p)?y:p}return t("ceil",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(h){return h.ceil()},"Complex, number":function(h,p){return h.ceil(p)},"Complex, BigNumber":function(h,p){return h.ceil(p.toNumber())},BigNumber:m,"BigNumber, BigNumber":function(h,p){var y=K7.pow(p);return m(h.mul(y)).div(y)},bigint:d=>d,"bigint, number":(d,h)=>d,"bigint, BigNumber":(d,h)=>d,Fraction:function(h){return h.ceil()},"Fraction, number":function(h,p){return h.ceil(p)},"Fraction, BigNumber":function(h,p){return h.ceil(p.toNumber())},"Unit, number, Unit":t.referToSelf(d=>function(h,p,y){var w=h.toNumeric(y);return y.multiply(d(w,p))}),"Unit, BigNumber, Unit":t.referToSelf(d=>(h,p,y)=>d(h,p.toNumber(),y)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(d=>(h,p,y)=>Xe(h,w=>d(w,p,y),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(d=>(h,p)=>d(h,0,p)),"Array | Matrix":t.referToSelf(d=>h=>Xe(h,d,!0)),"Array, number | BigNumber":t.referToSelf(d=>(h,p)=>Xe(h,y=>d(y,p),!0)),"SparseMatrix, number | BigNumber":t.referToSelf(d=>(h,p)=>u(h,p,d,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(d=>(h,p)=>c(h,p,d,!1)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(d=>(h,p)=>c(a(p),h,d,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(d=>(h,p)=>i(h,0)?o(p.size(),p.storage()):p.storage()==="dense"?c(p,h,d,!0):l(p,h,d,!0))})}),G0="cube",Q7=["typed"],X7=I(G0,Q7,e=>{var{typed:t}=e;return t(G0,{number:Wx,Complex:function(n){return n.mul(n).mul(n)},BigNumber:function(n){return n.times(n).times(n)},bigint:function(n){return n*n*n},Fraction:function(n){return n.pow(3)},Unit:function(n){return n.pow(3)}})}),V0="exp",ez=["typed"],tz=I(V0,ez,e=>{var{typed:t}=e;return t(V0,{number:Jx,Complex:function(n){return n.exp()},BigNumber:function(n){return n.exp()}})}),U0="expm1",rz=["typed","Complex"],nz=I(U0,rz,e=>{var{typed:t,Complex:r}=e;return t(U0,{number:Kx,Complex:function(a){var i=Math.exp(a.re);return new r(i*Math.cos(a.im)-1,i*Math.sin(a.im))},BigNumber:function(a){return a.exp().minus(1)}})}),Qm="fix",az=["typed","Complex","matrix","ceil","floor","equalScalar","zeros","DenseMatrix"],iz=I(Qm,["typed","ceil","floor"],e=>{var{typed:t,ceil:r,floor:n}=e;return t(Qm,{number:function(i){return i>0?n(i):r(i)},"number, number":function(i,o){return i>0?n(i,o):r(i,o)}})}),oz=I(Qm,az,e=>{var{typed:t,Complex:r,matrix:n,ceil:a,floor:i,equalScalar:o,zeros:s,DenseMatrix:u}=e,l=fr({typed:t,DenseMatrix:u}),c=_n({typed:t}),f=iz({typed:t,ceil:a,floor:i});return t("fix",{number:f.signatures.number,"number, number | BigNumber":f.signatures["number,number"],Complex:function(d){return new r(d.re>0?Math.floor(d.re):Math.ceil(d.re),d.im>0?Math.floor(d.im):Math.ceil(d.im))},"Complex, number":function(d,h){return new r(d.re>0?i(d.re,h):a(d.re,h),d.im>0?i(d.im,h):a(d.im,h))},"Complex, BigNumber":function(d,h){var p=h.toNumber();return new r(d.re>0?i(d.re,p):a(d.re,p),d.im>0?i(d.im,p):a(d.im,p))},BigNumber:function(d){return d.isNegative()?a(d):i(d)},"BigNumber, number | BigNumber":function(d,h){return d.isNegative()?a(d,h):i(d,h)},bigint:m=>m,"bigint, number":(m,d)=>m,"bigint, BigNumber":(m,d)=>m,Fraction:function(d){return d.s<0n?d.ceil():d.floor()},"Fraction, number | BigNumber":function(d,h){return d.s<0n?a(d,h):i(d,h)},"Unit, number, Unit":t.referToSelf(m=>function(d,h,p){var y=d.toNumeric(p);return p.multiply(m(y,h))}),"Unit, BigNumber, Unit":t.referToSelf(m=>(d,h,p)=>m(d,h.toNumber(),p)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(m=>(d,h,p)=>Xe(d,y=>m(y,h,p),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(m=>(d,h)=>m(d,0,h)),"Array | Matrix":t.referToSelf(m=>d=>Xe(d,m,!0)),"Array | Matrix, number | BigNumber":t.referToSelf(m=>(d,h)=>Xe(d,p=>m(p,h),!0)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(m=>(d,h)=>c(n(h),d,m,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(m=>(d,h)=>o(d,0)?s(h.size(),h.storage()):h.storage()==="dense"?c(h,d,m,!0):l(h,d,m,!0))})}),Xm="floor",sz=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix"],uz=new pi(10),lz=I(Xm,["typed","config","round"],e=>{var{typed:t,config:r,round:n}=e;function a(i){var o=Math.floor(i),s=n(i);return o===s?o:Cr(i,s,r.relTol,r.absTol)&&!Cr(i,o,r.relTol,r.absTol)?s:o}return t(Xm,{number:a,"number, number":function(o,s){if(!ke(s))throw new RangeError("number of decimals in function floor must be an integer");if(s<0||s>15)throw new RangeError("number of decimals in floor number must be in range 0 - 15");var u=10**s;return a(o*u)/u}})}),F2=I(Xm,sz,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s}=e,u=Pr({typed:t,equalScalar:i}),l=fr({typed:t,DenseMatrix:s}),c=_n({typed:t}),f=lz({typed:t,config:r,round:n});function m(d){var h=(w,D)=>Bn(w,D,r.relTol,r.absTol),p=d.floor(),y=n(d);return p.eq(y)?p:h(d,y)&&!h(d,p)?y:p}return t("floor",{number:f.signatures.number,"number,number":f.signatures["number,number"],Complex:function(h){return h.floor()},"Complex, number":function(h,p){return h.floor(p)},"Complex, BigNumber":function(h,p){return h.floor(p.toNumber())},BigNumber:m,"BigNumber, BigNumber":function(h,p){var y=uz.pow(p);return m(h.mul(y)).div(y)},bigint:d=>d,"bigint, number":(d,h)=>d,"bigint, BigNumber":(d,h)=>d,Fraction:function(h){return h.floor()},"Fraction, number":function(h,p){return h.floor(p)},"Fraction, BigNumber":function(h,p){return h.floor(p.toNumber())},"Unit, number, Unit":t.referToSelf(d=>function(h,p,y){var w=h.toNumeric(y);return y.multiply(d(w,p))}),"Unit, BigNumber, Unit":t.referToSelf(d=>(h,p,y)=>d(h,p.toNumber(),y)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(d=>(h,p,y)=>Xe(h,w=>d(w,p,y),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(d=>(h,p)=>d(h,0,p)),"Array | Matrix":t.referToSelf(d=>h=>Xe(h,d,!0)),"Array, number | BigNumber":t.referToSelf(d=>(h,p)=>Xe(h,y=>d(y,p),!0)),"SparseMatrix, number | BigNumber":t.referToSelf(d=>(h,p)=>u(h,p,d,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(d=>(h,p)=>c(h,p,d,!1)),"number | Complex | Fraction | BigNumber, Array":t.referToSelf(d=>(h,p)=>c(a(p),h,d,!0).valueOf()),"number | Complex | Fraction | BigNumber, Matrix":t.referToSelf(d=>(h,p)=>i(h,0)?o(p.size(),p.storage()):p.storage()==="dense"?c(p,h,d,!0):l(p,h,d,!0))})}),cz="matAlgo02xDS0",fz=["typed","equalScalar"],ta=I(cz,fz,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o,s){var u=a._data,l=a._size,c=a._datatype||a.getDataType(),f=i._values,m=i._index,d=i._ptr,h=i._size,p=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(l.length!==h.length)throw new at(l.length,h.length);if(l[0]!==h[0]||l[1]!==h[1])throw new RangeError("Dimension mismatch. Matrix A ("+l+") must match Matrix B ("+h+")");if(!f)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var y=l[0],w=l[1],D,v=r,x=0,g=o;typeof c=="string"&&c===p&&c!=="mixed"&&(D=c,v=t.find(r,[D,D]),x=t.convert(0,D),g=t.find(o,[D,D]));for(var b=[],C=[],N=[],A=0;A<w;A++){N[A]=C.length;for(var E=d[A],S=d[A+1],F=E;F<S;F++){var k=m[F],$=s?g(f[F],u[k][A]):g(u[k][A],f[F]);v($,x)||(C.push(k),b.push($))}}return N[w]=C.length,i.createSparseMatrix({values:b,index:C,ptr:N,size:[y,w],datatype:c===a._datatype&&p===i._datatype?D:void 0})}}),mz="matAlgo03xDSf",dz=["typed"],qr=I(mz,dz,e=>{var{typed:t}=e;return function(n,a,i,o){var s=n._data,u=n._size,l=n._datatype||n.getDataType(),c=a._values,f=a._index,m=a._ptr,d=a._size,h=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==d.length)throw new at(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var p=u[0],y=u[1],w,D=0,v=i;typeof l=="string"&&l===h&&l!=="mixed"&&(w=l,D=t.convert(0,w),v=t.find(i,[w,w]));for(var x=[],g=0;g<p;g++)x[g]=[];for(var b=[],C=[],N=0;N<y;N++){for(var A=N+1,E=m[N],S=m[N+1],F=E;F<S;F++){var k=f[F];b[k]=o?v(c[F],s[k][N]):v(s[k][N],c[F]),C[k]=A}for(var $=0;$<p;$++)C[$]===A?x[$][N]=b[$]:x[$][N]=o?v(D,s[$][N]):v(s[$][N],D)}return n.createDenseMatrix({data:x,size:[p,y],datatype:l===n._datatype&&h===a._datatype?w:void 0})}}),hz="matAlgo05xSfSf",pz=["typed","equalScalar"],kc=I(hz,pz,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),m=i._values,d=i._index,h=i._ptr,p=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==p.length)throw new at(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+p+")");var w=c[0],D=c[1],v,x=r,g=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(v=f,x=t.find(r,[v,v]),g=t.convert(0,v),b=t.find(o,[v,v]));var C=s&&m?[]:void 0,N=[],A=[],E=C?[]:void 0,S=C?[]:void 0,F=[],k=[],$,R,M,B;for(R=0;R<D;R++){A[R]=N.length;var L=R+1;for(M=l[R],B=l[R+1];M<B;M++)$=u[M],N.push($),F[$]=L,E&&(E[$]=s[M]);for(M=h[R],B=h[R+1];M<B;M++)$=d[M],F[$]!==L&&N.push($),k[$]=L,S&&(S[$]=m[M]);if(C)for(M=A[R];M<N.length;){$=N[M];var j=F[$],Z=k[$];if(j===L||Z===L){var G=j===L?E[$]:g,V=Z===L?S[$]:g,P=b(G,V);x(P,g)?N.splice(M,1):(C.push(P),M++)}}}return A[D]=N.length,a.createSparseMatrix({values:C,index:N,ptr:A,size:[w,D],datatype:f===a._datatype&&y===i._datatype?v:void 0})}}),gz="matAlgo13xDD",vz=["typed"],P2=I(gz,vz,e=>{var{typed:t}=e;return function(a,i,o){var s=a._data,u=a._size,l=a._datatype,c=i._data,f=i._size,m=i._datatype,d=[];if(u.length!==f.length)throw new at(u.length,f.length);for(var h=0;h<u.length;h++){if(u[h]!==f[h])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+f+")");d[h]=u[h]}var p,y=o;typeof l=="string"&&l===m&&(p=l,y=t.find(o,[p,p]));var w=d.length>0?r(y,0,d,d[0],s,c):[];return a.createDenseMatrix({data:w,size:d,datatype:p})};function r(n,a,i,o,s,u){var l=[];if(a===i.length-1)for(var c=0;c<o;c++)l[c]=n(s[c],u[c]);else for(var f=0;f<o;f++)l[f]=r(n,a+1,i,i[a+1],s[f],u[f]);return l}});function br(e,t){if(Ha(e.size(),t.size()))return[e,t];var r=ec(e.size(),t.size());return[e,t].map(n=>yz(n,r))}function yz(e,t){return Ha(e.size(),t)?e:e.create(Wi(e.valueOf(),t),e.datatype())}var bz="matrixAlgorithmSuite",wz=["typed","matrix"],_t=I(bz,wz,e=>{var{typed:t,matrix:r}=e,n=P2({typed:t}),a=_n({typed:t});return function(o){var s=o.elop,u=o.SD||o.DS,l;s?(l={"DenseMatrix, DenseMatrix":(d,h)=>n(...br(d,h),s),"Array, Array":(d,h)=>n(...br(r(d),r(h)),s).valueOf(),"Array, DenseMatrix":(d,h)=>n(...br(r(d),h),s),"DenseMatrix, Array":(d,h)=>n(...br(d,r(h)),s)},o.SS&&(l["SparseMatrix, SparseMatrix"]=(d,h)=>o.SS(...br(d,h),s,!1)),o.DS&&(l["DenseMatrix, SparseMatrix"]=(d,h)=>o.DS(...br(d,h),s,!1),l["Array, SparseMatrix"]=(d,h)=>o.DS(...br(r(d),h),s,!1)),u&&(l["SparseMatrix, DenseMatrix"]=(d,h)=>u(...br(h,d),s,!0),l["SparseMatrix, Array"]=(d,h)=>u(...br(r(h),d),s,!0))):(l={"DenseMatrix, DenseMatrix":t.referToSelf(d=>(h,p)=>n(...br(h,p),d)),"Array, Array":t.referToSelf(d=>(h,p)=>n(...br(r(h),r(p)),d).valueOf()),"Array, DenseMatrix":t.referToSelf(d=>(h,p)=>n(...br(r(h),p),d)),"DenseMatrix, Array":t.referToSelf(d=>(h,p)=>n(...br(h,r(p)),d))},o.SS&&(l["SparseMatrix, SparseMatrix"]=t.referToSelf(d=>(h,p)=>o.SS(...br(h,p),d,!1))),o.DS&&(l["DenseMatrix, SparseMatrix"]=t.referToSelf(d=>(h,p)=>o.DS(...br(h,p),d,!1)),l["Array, SparseMatrix"]=t.referToSelf(d=>(h,p)=>o.DS(...br(r(h),p),d,!1))),u&&(l["SparseMatrix, DenseMatrix"]=t.referToSelf(d=>(h,p)=>u(...br(p,h),d,!0)),l["SparseMatrix, Array"]=t.referToSelf(d=>(h,p)=>u(...br(r(p),h),d,!0))));var c=o.scalar||"any",f=o.Ds||o.Ss;f&&(s?(l["DenseMatrix,"+c]=(d,h)=>a(d,h,s,!1),l[c+", DenseMatrix"]=(d,h)=>a(h,d,s,!0),l["Array,"+c]=(d,h)=>a(r(d),h,s,!1).valueOf(),l[c+", Array"]=(d,h)=>a(r(h),d,s,!0).valueOf()):(l["DenseMatrix,"+c]=t.referToSelf(d=>(h,p)=>a(h,p,d,!1)),l[c+", DenseMatrix"]=t.referToSelf(d=>(h,p)=>a(p,h,d,!0)),l["Array,"+c]=t.referToSelf(d=>(h,p)=>a(r(h),p,d,!1).valueOf()),l[c+", Array"]=t.referToSelf(d=>(h,p)=>a(r(p),h,d,!0).valueOf())));var m=o.sS!==void 0?o.sS:o.Ss;return s?(o.Ss&&(l["SparseMatrix,"+c]=(d,h)=>o.Ss(d,h,s,!1)),m&&(l[c+", SparseMatrix"]=(d,h)=>m(h,d,s,!0))):(o.Ss&&(l["SparseMatrix,"+c]=t.referToSelf(d=>(h,p)=>o.Ss(h,p,d,!1))),m&&(l[c+", SparseMatrix"]=t.referToSelf(d=>(h,p)=>m(p,h,d,!0)))),s&&s.signatures&&mx(l,s.signatures),l}}),W0="mod",xz=["typed","config","round","matrix","equalScalar","zeros","DenseMatrix","concat"],k2=I(W0,xz,e=>{var{typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s,concat:u}=e,l=F2({typed:t,config:r,round:n,matrix:a,equalScalar:i,zeros:o,DenseMatrix:s}),c=ta({typed:t,equalScalar:i}),f=qr({typed:t}),m=kc({typed:t,equalScalar:i}),d=Pr({typed:t,equalScalar:i}),h=fr({typed:t,DenseMatrix:s}),p=_t({typed:t,matrix:a,concat:u});return t(W0,{"number, number":y,"BigNumber, BigNumber":function(D,v){return v.isZero()?D:D.sub(v.mul(l(D.div(v))))},"bigint, bigint":function(D,v){if(v===0n)return D;if(D<0){var x=D%v;return x===0n?x:x+v}return D%v},"Fraction, Fraction":function(D,v){return v.equals(0)?D:D.sub(v.mul(l(D.div(v))))}},p({SS:m,DS:f,SD:c,Ss:d,sS:h}));function y(w,D){return D===0?w:w-D*l(w/D)}}),Dz="matAlgo01xDSid",Nz=["typed"],wi=I(Dz,Nz,e=>{var{typed:t}=e;return function(n,a,i,o){var s=n._data,u=n._size,l=n._datatype||n.getDataType(),c=a._values,f=a._index,m=a._ptr,d=a._size,h=a._datatype||a._data===void 0?a._datatype:a.getDataType();if(u.length!==d.length)throw new at(u.length,d.length);if(u[0]!==d[0]||u[1]!==d[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+d+")");if(!c)throw new Error("Cannot perform operation on Dense Matrix and Pattern Sparse Matrix");var p=u[0],y=u[1],w=typeof l=="string"&&l!=="mixed"&&l===h?l:void 0,D=w?t.find(i,[w,w]):i,v,x,g=[];for(v=0;v<p;v++)g[v]=[];var b=[],C=[];for(x=0;x<y;x++){for(var N=x+1,A=m[x],E=m[x+1],S=A;S<E;S++)v=f[S],b[v]=o?D(c[S],s[v][x]):D(s[v][x],c[S]),C[v]=N;for(v=0;v<p;v++)C[v]===N?g[v][x]=b[v]:g[v][x]=s[v][x]}return n.createDenseMatrix({data:g,size:[p,y],datatype:l===n._datatype&&h===a._datatype?w:void 0})}}),Az="matAlgo04xSidSid",Cz=["typed","equalScalar"],kd=I(Az,Cz,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),m=i._values,d=i._index,h=i._ptr,p=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==p.length)throw new at(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+p+")");var w=c[0],D=c[1],v,x=r,g=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(v=f,x=t.find(r,[v,v]),g=t.convert(0,v),b=t.find(o,[v,v]));var C=s&&m?[]:void 0,N=[],A=[],E=s&&m?[]:void 0,S=s&&m?[]:void 0,F=[],k=[],$,R,M,B,L;for(R=0;R<D;R++){A[R]=N.length;var j=R+1;for(B=l[R],L=l[R+1],M=B;M<L;M++)$=u[M],N.push($),F[$]=j,E&&(E[$]=s[M]);for(B=h[R],L=h[R+1],M=B;M<L;M++)if($=d[M],F[$]===j){if(E){var Z=b(E[$],m[M]);x(Z,g)?F[$]=null:E[$]=Z}}else N.push($),k[$]=j,S&&(S[$]=m[M]);if(E&&S)for(M=A[R];M<N.length;)$=N[M],F[$]===j?(C[M]=E[$],M++):k[$]===j?(C[M]=S[$],M++):N.splice(M,1)}return A[D]=N.length,a.createSparseMatrix({values:C,index:N,ptr:A,size:[w,D],datatype:f===a._datatype&&y===i._datatype?v:void 0})}}),Ez="matAlgo10xSids",Sz=["typed","DenseMatrix"],ao=I(Ez,Sz,e=>{var{typed:t,DenseMatrix:r}=e;return function(a,i,o,s){var u=a._values,l=a._index,c=a._ptr,f=a._size,m=a._datatype;if(!u)throw new Error("Cannot perform operation on Pattern Sparse Matrix and Scalar value");var d=f[0],h=f[1],p,y=o;typeof m=="string"&&(p=m,i=t.convert(i,p),y=t.find(o,[p,p]));for(var w=[],D=[],v=[],x=0;x<h;x++){for(var g=x+1,b=c[x],C=c[x+1],N=b;N<C;N++){var A=l[N];D[A]=u[N],v[A]=g}for(var E=0;E<d;E++)x===0&&(w[E]=[]),v[E]===g?w[E][x]=s?y(i,D[E]):y(D[E],i):w[E][x]=i}return new r({data:w,size:[d,h],datatype:p})}});function io(e,t,r,n){if(!(this instanceof io))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=r,this.max=n,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+r+(n!=null?"-"+n:"")+" expected)",this.stack=new Error().stack}io.prototype=new Error;io.prototype.constructor=Error;io.prototype.name="ArgumentsError";io.prototype.isArgumentsError=!0;var J0="gcd",Mz=["typed","config","round","matrix","equalScalar","zeros","BigNumber","DenseMatrix","concat"],jf="number | BigNumber | Fraction | Matrix | Array",Tz="".concat(jf,", ").concat(jf,", ...").concat(jf);function K0(e){return!e.some(t=>Array.isArray(t))}var Fz=I(J0,Mz,e=>{var{typed:t,matrix:r,config:n,round:a,equalScalar:i,zeros:o,BigNumber:s,DenseMatrix:u,concat:l}=e,c=k2({typed:t,config:n,round:a,matrix:r,equalScalar:i,zeros:o,DenseMatrix:u,concat:l}),f=wi({typed:t}),m=kd({typed:t,equalScalar:i}),d=ao({typed:t,DenseMatrix:u}),h=_t({typed:t,matrix:r,concat:l});return t(J0,{"number, number":p,"BigNumber, BigNumber":y,"Fraction, Fraction":(w,D)=>w.gcd(D)},h({SS:m,DS:f,Ss:d}),{[Tz]:t.referToSelf(w=>(D,v,x)=>{for(var g=w(D,v),b=0;b<x.length;b++)g=w(g,x[b]);return g}),Array:t.referToSelf(w=>D=>{if(D.length===1&&Array.isArray(D[0])&&K0(D[0]))return w(...D[0]);if(K0(D))return w(...D);throw new io("gcd() supports only 1d matrices!")}),Matrix:t.referToSelf(w=>D=>w(D.toArray()))});function p(w,D){if(!ke(w)||!ke(D))throw new Error("Parameters in function gcd must be integer numbers");for(var v;D!==0;)v=c(w,D),w=D,D=v;return w<0?-w:w}function y(w,D){if(!w.isInt()||!D.isInt())throw new Error("Parameters in function gcd must be integer numbers");for(var v=new s(0);!D.isZero();){var x=c(w,D);w=D,D=x}return w.lt(v)?w.neg():w}}),Pz="matAlgo06xS0S0",kz=["typed","equalScalar"],Oc=I(Pz,kz,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var s=a._values,u=a._size,l=a._datatype||a._data===void 0?a._datatype:a.getDataType(),c=i._values,f=i._size,m=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(u.length!==f.length)throw new at(u.length,f.length);if(u[0]!==f[0]||u[1]!==f[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+f+")");var d=u[0],h=u[1],p,y=r,w=0,D=o;typeof l=="string"&&l===m&&l!=="mixed"&&(p=l,y=t.find(r,[p,p]),w=t.convert(0,p),D=t.find(o,[p,p]));for(var v=s&&c?[]:void 0,x=[],g=[],b=v?[]:void 0,C=[],N=[],A=0;A<h;A++){g[A]=x.length;var E=A+1;if(g0(a,A,C,b,N,E,x,D),g0(i,A,C,b,N,E,x,D),b)for(var S=g[A];S<x.length;){var F=x[S];if(N[F]===E){var k=b[F];y(k,w)?x.splice(S,1):(v.push(k),S++)}else x.splice(S,1)}else for(var $=g[A];$<x.length;){var R=x[$];N[R]!==E?x.splice($,1):$++}}return g[h]=x.length,a.createSparseMatrix({values:v,index:x,ptr:g,size:[d,h],datatype:l===a._datatype&&m===i._datatype?p:void 0})}}),Y0="lcm",Oz=["typed","matrix","equalScalar","concat"],$z=I(Y0,Oz,e=>{var{typed:t,matrix:r,equalScalar:n,concat:a}=e,i=ta({typed:t,equalScalar:n}),o=Oc({typed:t,equalScalar:n}),s=Pr({typed:t,equalScalar:n}),u=_t({typed:t,matrix:r,concat:a}),l="number | BigNumber | Fraction | Matrix | Array",c={};return c["".concat(l,", ").concat(l,", ...").concat(l)]=t.referToSelf(m=>(d,h,p)=>{for(var y=m(d,h),w=0;w<p.length;w++)y=m(y,p[w]);return y}),t(Y0,{"number, number":Yx,"BigNumber, BigNumber":f,"Fraction, Fraction":(m,d)=>m.lcm(d)},u({SS:o,DS:i,Ss:s}),c);function f(m,d){if(!m.isInt()||!d.isInt())throw new Error("Parameters in function lcm must be integer numbers");if(m.isZero())return m;if(d.isZero())return d;for(var h=m.times(d);!d.isZero();){var p=d;d=m.mod(p),m=p}return h.div(m).abs()}});function Od(e,t,r,n){return function(a){if(a>0||r.predictable){if(a<=0)return NaN;var i=a.toString(16),o=i.substring(0,15);return e*(i.length-o.length)+t(+("0x"+o))}return n(a.toNumber())}}var Z0="log10",Bz=["typed","config","Complex"],_z=nc(16),Iz=I(Z0,Bz,e=>{var{typed:t,config:r,Complex:n}=e;function a(o){return o.log().div(Math.LN10)}function i(o){return a(new n(o,0))}return t(Z0,{number:function(s){return s>=0||r.predictable?nc(s):i(s)},bigint:Od(_z,nc,r,i),Complex:a,BigNumber:function(s){return!s.isNegative()||r.predictable?s.log():i(s.toNumber())},"Array | Matrix":t.referToSelf(o=>s=>Xe(s,o))})}),Q0="log2",zz=["typed","config","Complex"],jz=I(Q0,zz,e=>{var{typed:t,config:r,Complex:n}=e;function a(o){return i(new n(o,0))}return t(Q0,{number:function(s){return s>=0||r.predictable?Vm(s):a(s)},bigint:Od(4,Vm,r,a),Complex:i,BigNumber:function(s){return!s.isNegative()||r.predictable?s.log(2):a(s.toNumber())},"Array | Matrix":t.referToSelf(o=>s=>Xe(s,o))});function i(o){var s=Math.sqrt(o.re*o.re+o.im*o.im);return new n(Math.log2?Math.log2(s):Math.log(s)/Math.LN2,Math.atan2(o.im,o.re)/Math.LN2)}}),qz="multiplyScalar",Rz=["typed"],Lz=I(qz,Rz,e=>{var{typed:t}=e;return t("multiplyScalar",{"number, number":Gx,"Complex, Complex":function(n,a){return n.mul(a)},"BigNumber, BigNumber":function(n,a){return n.times(a)},"bigint, bigint":function(n,a){return n*a},"Fraction, Fraction":function(n,a){return n.mul(a)},"number | Fraction | BigNumber | Complex, Unit":(r,n)=>n.multiply(r),"Unit, number | Fraction | BigNumber | Complex | Unit":(r,n)=>r.multiply(n)})}),X0="multiply",Hz=["typed","matrix","addScalar","multiplyScalar","equalScalar","dot"],Gz=I(X0,Hz,e=>{var{typed:t,matrix:r,addScalar:n,multiplyScalar:a,equalScalar:i,dot:o}=e,s=Pr({typed:t,equalScalar:i}),u=_n({typed:t});function l(g,b){switch(g.length){case 1:switch(b.length){case 1:if(g[0]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Vectors must have the same length");break;case 2:if(g[0]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Vector length ("+g[0]+") must match Matrix rows ("+b[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+b.length+" dimensions)")}break;case 2:switch(b.length){case 1:if(g[1]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Matrix columns ("+g[1]+") must match Vector length ("+b[0]+")");break;case 2:if(g[1]!==b[0])throw new RangeError("Dimension mismatch in multiplication. Matrix A columns ("+g[1]+") must match Matrix B rows ("+b[0]+")");break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix B has "+b.length+" dimensions)")}break;default:throw new Error("Can only multiply a 1 or 2 dimensional matrix (Matrix A has "+g.length+" dimensions)")}}function c(g,b,C){if(C===0)throw new Error("Cannot multiply two empty vectors");return o(g,b)}function f(g,b){if(b.storage()!=="dense")throw new Error("Support for SparseMatrix not implemented");return m(g,b)}function m(g,b){var C=g._data,N=g._size,A=g._datatype||g.getDataType(),E=b._data,S=b._size,F=b._datatype||b.getDataType(),k=N[0],$=S[1],R,M=n,B=a;A&&F&&A===F&&typeof A=="string"&&A!=="mixed"&&(R=A,M=t.find(n,[R,R]),B=t.find(a,[R,R]));for(var L=[],j=0;j<$;j++){for(var Z=B(C[0],E[0][j]),G=1;G<k;G++)Z=M(Z,B(C[G],E[G][j]));L[j]=Z}return g.createDenseMatrix({data:L,size:[$],datatype:A===g._datatype&&F===b._datatype?R:void 0})}var d=t("_multiplyMatrixVector",{"DenseMatrix, any":p,"SparseMatrix, any":D}),h=t("_multiplyMatrixMatrix",{"DenseMatrix, DenseMatrix":y,"DenseMatrix, SparseMatrix":w,"SparseMatrix, DenseMatrix":v,"SparseMatrix, SparseMatrix":x});function p(g,b){var C=g._data,N=g._size,A=g._datatype||g.getDataType(),E=b._data,S=b._datatype||b.getDataType(),F=N[0],k=N[1],$,R=n,M=a;A&&S&&A===S&&typeof A=="string"&&A!=="mixed"&&($=A,R=t.find(n,[$,$]),M=t.find(a,[$,$]));for(var B=[],L=0;L<F;L++){for(var j=C[L],Z=M(j[0],E[0]),G=1;G<k;G++)Z=R(Z,M(j[G],E[G]));B[L]=Z}return g.createDenseMatrix({data:B,size:[F],datatype:A===g._datatype&&S===b._datatype?$:void 0})}function y(g,b){var C=g._data,N=g._size,A=g._datatype||g.getDataType(),E=b._data,S=b._size,F=b._datatype||b.getDataType(),k=N[0],$=N[1],R=S[1],M,B=n,L=a;A&&F&&A===F&&typeof A=="string"&&A!=="mixed"&&A!=="mixed"&&(M=A,B=t.find(n,[M,M]),L=t.find(a,[M,M]));for(var j=[],Z=0;Z<k;Z++){var G=C[Z];j[Z]=[];for(var V=0;V<R;V++){for(var P=L(G[0],E[0][V]),Q=1;Q<$;Q++)P=B(P,L(G[Q],E[Q][V]));j[Z][V]=P}}return g.createDenseMatrix({data:j,size:[k,R],datatype:A===g._datatype&&F===b._datatype?M:void 0})}function w(g,b){var C=g._data,N=g._size,A=g._datatype||g.getDataType(),E=b._values,S=b._index,F=b._ptr,k=b._size,$=b._datatype||b._data===void 0?b._datatype:b.getDataType();if(!E)throw new Error("Cannot multiply Dense Matrix times Pattern only Matrix");var R=N[0],M=k[1],B,L=n,j=a,Z=i,G=0;A&&$&&A===$&&typeof A=="string"&&A!=="mixed"&&(B=A,L=t.find(n,[B,B]),j=t.find(a,[B,B]),Z=t.find(i,[B,B]),G=t.convert(0,B));for(var V=[],P=[],Q=[],z=b.createSparseMatrix({values:V,index:P,ptr:Q,size:[R,M],datatype:A===g._datatype&&$===b._datatype?B:void 0}),oe=0;oe<M;oe++){Q[oe]=P.length;var ne=F[oe],U=F[oe+1];if(U>ne)for(var _=0,J=0;J<R;J++){for(var ae=J+1,ee=void 0,ue=ne;ue<U;ue++){var se=S[ue];_!==ae?(ee=j(C[J][se],E[ue]),_=ae):ee=L(ee,j(C[J][se],E[ue]))}_===ae&&!Z(ee,G)&&(P.push(J),V.push(ee))}}return Q[M]=P.length,z}function D(g,b){var C=g._values,N=g._index,A=g._ptr,E=g._datatype||g._data===void 0?g._datatype:g.getDataType();if(!C)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var S=b._data,F=b._datatype||b.getDataType(),k=g._size[0],$=b._size[0],R=[],M=[],B=[],L,j=n,Z=a,G=i,V=0;E&&F&&E===F&&typeof E=="string"&&E!=="mixed"&&(L=E,j=t.find(n,[L,L]),Z=t.find(a,[L,L]),G=t.find(i,[L,L]),V=t.convert(0,L));var P=[],Q=[];B[0]=0;for(var z=0;z<$;z++){var oe=S[z];if(!G(oe,V))for(var ne=A[z],U=A[z+1],_=ne;_<U;_++){var J=N[_];Q[J]?P[J]=j(P[J],Z(oe,C[_])):(Q[J]=!0,M.push(J),P[J]=Z(oe,C[_]))}}for(var ae=M.length,ee=0;ee<ae;ee++){var ue=M[ee];R[ee]=P[ue]}return B[1]=M.length,g.createSparseMatrix({values:R,index:M,ptr:B,size:[k,1],datatype:E===g._datatype&&F===b._datatype?L:void 0})}function v(g,b){var C=g._values,N=g._index,A=g._ptr,E=g._datatype||g._data===void 0?g._datatype:g.getDataType();if(!C)throw new Error("Cannot multiply Pattern only Matrix times Dense Matrix");var S=b._data,F=b._datatype||b.getDataType(),k=g._size[0],$=b._size[0],R=b._size[1],M,B=n,L=a,j=i,Z=0;E&&F&&E===F&&typeof E=="string"&&E!=="mixed"&&(M=E,B=t.find(n,[M,M]),L=t.find(a,[M,M]),j=t.find(i,[M,M]),Z=t.convert(0,M));for(var G=[],V=[],P=[],Q=g.createSparseMatrix({values:G,index:V,ptr:P,size:[k,R],datatype:E===g._datatype&&F===b._datatype?M:void 0}),z=[],oe=[],ne=0;ne<R;ne++){P[ne]=V.length;for(var U=ne+1,_=0;_<$;_++){var J=S[_][ne];if(!j(J,Z))for(var ae=A[_],ee=A[_+1],ue=ae;ue<ee;ue++){var se=N[ue];oe[se]!==U?(oe[se]=U,V.push(se),z[se]=L(J,C[ue])):z[se]=B(z[se],L(J,C[ue]))}}for(var be=P[ne],Me=V.length,Pe=be;Pe<Me;Pe++){var Ee=V[Pe];G[Pe]=z[Ee]}}return P[R]=V.length,Q}function x(g,b){var C=g._values,N=g._index,A=g._ptr,E=g._datatype||g._data===void 0?g._datatype:g.getDataType(),S=b._values,F=b._index,k=b._ptr,$=b._datatype||b._data===void 0?b._datatype:b.getDataType(),R=g._size[0],M=b._size[1],B=C&&S,L,j=n,Z=a;E&&$&&E===$&&typeof E=="string"&&E!=="mixed"&&(L=E,j=t.find(n,[L,L]),Z=t.find(a,[L,L]));for(var G=B?[]:void 0,V=[],P=[],Q=g.createSparseMatrix({values:G,index:V,ptr:P,size:[R,M],datatype:E===g._datatype&&$===b._datatype?L:void 0}),z=B?[]:void 0,oe=[],ne,U,_,J,ae,ee,ue,se,be=0;be<M;be++){P[be]=V.length;var Me=be+1;for(ae=k[be],ee=k[be+1],J=ae;J<ee;J++)if(se=F[J],B)for(U=A[se],_=A[se+1],ne=U;ne<_;ne++)ue=N[ne],oe[ue]!==Me?(oe[ue]=Me,V.push(ue),z[ue]=Z(S[J],C[ne])):z[ue]=j(z[ue],Z(S[J],C[ne]));else for(U=A[se],_=A[se+1],ne=U;ne<_;ne++)ue=N[ne],oe[ue]!==Me&&(oe[ue]=Me,V.push(ue));if(B)for(var Pe=P[be],Ee=V.length,Oe=Pe;Oe<Ee;Oe++){var je=V[Oe];G[Oe]=z[je]}}return P[M]=V.length,Q}return t(X0,a,{"Array, Array":t.referTo("Matrix, Matrix",g=>(b,C)=>{l(Je(b),Je(C));var N=g(r(b),r(C));return Le(N)?N.valueOf():N}),"Matrix, Matrix":function(b,C){var N=b.size(),A=C.size();return l(N,A),N.length===1?A.length===1?c(b,C,N[0]):f(b,C):A.length===1?d(b,C):h(b,C)},"Matrix, Array":t.referTo("Matrix,Matrix",g=>(b,C)=>g(b,r(C))),"Array, Matrix":t.referToSelf(g=>(b,C)=>g(r(b,C.storage()),C)),"SparseMatrix, any":function(b,C){return s(b,C,a,!1)},"DenseMatrix, any":function(b,C){return u(b,C,a,!1)},"any, SparseMatrix":function(b,C){return s(C,b,a,!0)},"any, DenseMatrix":function(b,C){return u(C,b,a,!0)},"Array, any":function(b,C){return u(r(b),C,a,!1).valueOf()},"any, Array":function(b,C){return u(r(C),b,a,!0).valueOf()},"any, any":a,"any, any, ...any":t.referToSelf(g=>(b,C,N)=>{for(var A=g(b,C),E=0;E<N.length;E++)A=g(A,N[E]);return A})})}),ev="nthRoot",Vz=["typed","matrix","equalScalar","BigNumber","concat"],Uz=I(ev,Vz,e=>{var{typed:t,matrix:r,equalScalar:n,BigNumber:a,concat:i}=e,o=wi({typed:t}),s=ta({typed:t,equalScalar:n}),u=Oc({typed:t,equalScalar:n}),l=Pr({typed:t,equalScalar:n}),c=_t({typed:t,matrix:r,concat:i});function f(){throw new Error("Complex number not supported in function nthRoot. Use nthRoots instead.")}return t(ev,{number:b0,"number, number":b0,BigNumber:d=>m(d,new a(2)),"BigNumber, BigNumber":m,Complex:f,"Complex, number":f,Array:t.referTo("DenseMatrix,number",d=>h=>d(r(h),2).valueOf()),DenseMatrix:t.referTo("DenseMatrix,number",d=>h=>d(h,2)),SparseMatrix:t.referTo("SparseMatrix,number",d=>h=>d(h,2)),"SparseMatrix, SparseMatrix":t.referToSelf(d=>(h,p)=>{if(p.density()===1)return u(h,p,d);throw new Error("Root must be non-zero")}),"DenseMatrix, SparseMatrix":t.referToSelf(d=>(h,p)=>{if(p.density()===1)return o(h,p,d,!1);throw new Error("Root must be non-zero")}),"Array, SparseMatrix":t.referTo("DenseMatrix,SparseMatrix",d=>(h,p)=>d(r(h),p)),"number | BigNumber, SparseMatrix":t.referToSelf(d=>(h,p)=>{if(p.density()===1)return l(p,h,d,!0);throw new Error("Root must be non-zero")})},c({scalar:"number | BigNumber",SD:s,Ss:l,sS:!1}));function m(d,h){var p=a.precision,y=a.clone({precision:p+2}),w=new a(0),D=new y(1),v=h.isNegative();if(v&&(h=h.neg()),h.isZero())throw new Error("Root must be non-zero");if(d.isNegative()&&!h.abs().mod(2).equals(1))throw new Error("Root must be odd when a is negative.");if(d.isZero())return v?new y(1/0):0;if(!d.isFinite())return v?w:d;var x=d.abs().pow(D.div(h));return x=d.isNeg()?x.neg():x,new a((v?D.div(x):x).toPrecision(p))}}),tv="sign",Wz=["typed","BigNumber","Fraction","complex"],Jz=I(tv,Wz,e=>{var{typed:t,BigNumber:r,complex:n,Fraction:a}=e;return t(tv,{number:Um,Complex:function(o){return o.im===0?n(Um(o.re)):o.sign()},BigNumber:function(o){return new r(o.cmp(0))},bigint:function(o){return o>0n?1n:o<0n?-1n:0n},Fraction:function(o){return o.n===0n?new a(0):new a(o.s)},"Array | Matrix":t.referToSelf(i=>o=>Xe(o,i,!0)),Unit:t.referToSelf(i=>o=>{if(!o._isDerived()&&o.units[0].unit.offset!==0)throw new TypeError("sign is ambiguous for units with offset");return t.find(i,o.valueType())(o.value)})})}),Kz="sqrt",Yz=["config","typed","Complex"],Zz=I(Kz,Yz,e=>{var{config:t,typed:r,Complex:n}=e;return r("sqrt",{number:a,Complex:function(o){return o.sqrt()},BigNumber:function(o){return!o.isNegative()||t.predictable?o.sqrt():a(o.toNumber())},Unit:function(o){return o.pow(.5)}});function a(i){return isNaN(i)?NaN:i>=0||t.predictable?Math.sqrt(i):new n(i,0).sqrt()}}),rv="square",Qz=["typed"],Xz=I(rv,Qz,e=>{var{typed:t}=e;return t(rv,{number:Zx,Complex:function(n){return n.mul(n)},BigNumber:function(n){return n.times(n)},bigint:function(n){return n*n},Fraction:function(n){return n.mul(n)},Unit:function(n){return n.pow(2)}})}),nv="subtract",ej=["typed","matrix","equalScalar","subtractScalar","unaryMinus","DenseMatrix","concat"],tj=I(nv,ej,e=>{var{typed:t,matrix:r,equalScalar:n,subtractScalar:a,unaryMinus:i,DenseMatrix:o,concat:s}=e,u=wi({typed:t}),l=qr({typed:t}),c=kc({typed:t,equalScalar:n}),f=ao({typed:t,DenseMatrix:o}),m=fr({typed:t,DenseMatrix:o}),d=_t({typed:t,matrix:r,concat:s});return t(nv,{"any, any":a},d({elop:a,SS:c,DS:u,SD:l,Ss:m,sS:f}))}),av="xgcd",rj=["typed","config","matrix","BigNumber"],nj=I(av,rj,e=>{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t(av,{"number, number":function(s,u){var l=Qx(s,u);return r.matrix==="Array"?l:n(l)},"BigNumber, BigNumber":i});function i(o,s){var u,l,c,f=new a(0),m=new a(1),d=f,h=m,p=m,y=f;if(!o.isInt()||!s.isInt())throw new Error("Parameters in function xgcd must be integer numbers");for(;!s.isZero();)l=o.div(s).floor(),c=o.mod(s),u=d,d=h.minus(l.times(d)),h=u,u=p,p=y.minus(l.times(p)),y=u,o=s,s=c;var w;return o.lt(f)?w=[o.neg(),h.neg(),y.neg()]:w=[o,o.isZero()?0:h,y],r.matrix==="Array"?w:n(w)}}),iv="invmod",aj=["typed","config","BigNumber","xgcd","equal","smaller","mod","add","isInteger"],ij=I(iv,aj,e=>{var{typed:t,config:r,BigNumber:n,xgcd:a,equal:i,smaller:o,mod:s,add:u,isInteger:l}=e;return t(iv,{"number, number":c,"BigNumber, BigNumber":c});function c(f,m){if(!l(f)||!l(m))throw new Error("Parameters in function invmod must be integer numbers");if(f=s(f,m),i(m,0))throw new Error("Divisor must be non zero");var d=a(f,m);d=d.valueOf();var[h,p]=d;return i(h,n(1))?(p=s(p,m),o(p,n(0))&&(p=u(p,m)),p):NaN}}),oj="matAlgo09xS0Sf",sj=["typed","equalScalar"],O2=I(oj,sj,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),m=i._values,d=i._index,h=i._ptr,p=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==p.length)throw new at(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+p+")");var w=c[0],D=c[1],v,x=r,g=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(v=f,x=t.find(r,[v,v]),g=t.convert(0,v),b=t.find(o,[v,v]));var C=s&&m?[]:void 0,N=[],A=[],E=C?[]:void 0,S=[],F,k,$,R,M;for(k=0;k<D;k++){A[k]=N.length;var B=k+1;if(E)for(R=h[k],M=h[k+1],$=R;$<M;$++)F=d[$],S[F]=B,E[F]=m[$];for(R=l[k],M=l[k+1],$=R;$<M;$++)if(F=u[$],E){var L=S[F]===B?E[F]:g,j=b(s[$],L);x(j,g)||(N.push(F),C.push(j))}else N.push(F)}return A[D]=N.length,a.createSparseMatrix({values:C,index:N,ptr:A,size:[w,D],datatype:f===a._datatype&&y===i._datatype?v:void 0})}}),ov="dotMultiply",uj=["typed","matrix","equalScalar","multiplyScalar","concat"],lj=I(ov,uj,e=>{var{typed:t,matrix:r,equalScalar:n,multiplyScalar:a,concat:i}=e,o=ta({typed:t,equalScalar:n}),s=O2({typed:t,equalScalar:n}),u=Pr({typed:t,equalScalar:n}),l=_t({typed:t,matrix:r,concat:i});return t(ov,l({elop:a,SS:s,DS:o,Ss:u}))});function cj(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitAnd");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);if(e.isZero()||t.eq(-1)||e.eq(t))return e;if(t.isZero()||e.eq(-1))return t;if(!e.isFinite()||!t.isFinite()){if(!e.isFinite()&&!t.isFinite())return e.isNegative()===t.isNegative()?e:new r(0);if(!e.isFinite())return t.isNegative()?e:e.isNegative()?new r(0):t;if(!t.isFinite())return e.isNegative()?t:t.isNegative()?new r(0):e}return $d(e,t,function(n,a){return n&a})}function Ws(e){if(e.isFinite()&&!e.isInteger())throw new Error("Integer expected in function bitNot");var t=e.constructor,r=t.precision;t.config({precision:1e9});var n=e.plus(new t(1));return n.s=-n.s||null,t.config({precision:r}),n}function fj(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitOr");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);var n=new r(-1);return e.isZero()||t.eq(n)||e.eq(t)?t:t.isZero()||e.eq(n)?e:!e.isFinite()||!t.isFinite()?!e.isFinite()&&!e.isNegative()&&t.isNegative()||e.isNegative()&&!t.isNegative()&&!t.isFinite()?n:e.isNegative()&&t.isNegative()?e.isFinite()?e:t:e.isFinite()?t:e:$d(e,t,function(a,i){return a|i})}function $d(e,t,r){var n=e.constructor,a,i,o=+(e.s<0),s=+(t.s<0);if(o){a=il(Ws(e));for(var u=0;u<a.length;++u)a[u]^=1}else a=il(e);if(s){i=il(Ws(t));for(var l=0;l<i.length;++l)i[l]^=1}else i=il(t);var c,f,m;a.length<=i.length?(c=a,f=i,m=o):(c=i,f=a,m=s);var d=c.length,h=f.length,p=r(o,s)^1,y=new n(p^1),w=new n(1),D=new n(2),v=n.precision;for(n.config({precision:1e9});d>0;)r(c[--d],f[--h])===p&&(y=y.plus(w)),w=w.times(D);for(;h>0;)r(m,f[--h])===p&&(y=y.plus(w)),w=w.times(D);return n.config({precision:v}),p===0&&(y.s=-y.s),y}function il(e){for(var t=e.d,r=t[0]+"",n=1;n<t.length;++n){for(var a=t[n]+"",i=7-a.length;i--;)a="0"+a;r+=a}for(var o=r.length;r.charAt(o)==="0";)o--;var s=e.e,u=r.slice(0,o+1||1),l=u.length;if(s>0)if(++s>l)for(s-=l;s--;)u+="0";else s<l&&(u=u.slice(0,s)+"."+u.slice(s));for(var c=[0],f=0;f<u.length;){for(var m=c.length;m--;)c[m]*=10;c[0]+=parseInt(u.charAt(f++));for(var d=0;d<c.length;++d)c[d]>1&&((c[d+1]===null||c[d+1]===void 0)&&(c[d+1]=0),c[d+1]+=c[d]>>1,c[d]&=1)}return c.reverse()}function mj(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function bitXor");var r=e.constructor;if(e.isNaN()||t.isNaN())return new r(NaN);if(e.isZero())return t;if(t.isZero())return e;if(e.eq(t))return new r(0);var n=new r(-1);return e.eq(n)?Ws(t):t.eq(n)?Ws(e):!e.isFinite()||!t.isFinite()?!e.isFinite()&&!t.isFinite()?n:new r(e.isNegative()===t.isNegative()?1/0:-1/0):$d(e,t,function(a,i){return a^i})}function dj(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function leftShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:!e.isFinite()&&!t.isFinite()?new r(NaN):t.lt(55)?e.times(Math.pow(2,t.toNumber())+""):e.times(new r(2).pow(t))}function hj(e,t){if(e.isFinite()&&!e.isInteger()||t.isFinite()&&!t.isInteger())throw new Error("Integers expected in function rightArithShift");var r=e.constructor;return e.isNaN()||t.isNaN()||t.isNegative()&&!t.isZero()?new r(NaN):e.isZero()||t.isZero()?e:t.isFinite()?t.lt(55)?e.div(Math.pow(2,t.toNumber())+"").floor():e.div(new r(2).pow(t)).floor():e.isNegative()?new r(-1):e.isFinite()?new r(0):new r(NaN)}var sv="bitAnd",pj=["typed","matrix","equalScalar","concat"],$2=I(sv,pj,e=>{var{typed:t,matrix:r,equalScalar:n,concat:a}=e,i=ta({typed:t,equalScalar:n}),o=Oc({typed:t,equalScalar:n}),s=Pr({typed:t,equalScalar:n}),u=_t({typed:t,matrix:r,concat:a});return t(sv,{"number, number":e2,"BigNumber, BigNumber":cj,"bigint, bigint":(l,c)=>l&c},u({SS:o,DS:i,Ss:s}))}),uv="bitNot",gj=["typed"],vj=I(uv,gj,e=>{var{typed:t}=e;return t(uv,{number:t2,BigNumber:Ws,bigint:r=>~r,"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),lv="bitOr",yj=["typed","matrix","equalScalar","DenseMatrix","concat"],B2=I(lv,yj,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=wi({typed:t}),s=kd({typed:t,equalScalar:n}),u=ao({typed:t,DenseMatrix:a}),l=_t({typed:t,matrix:r,concat:i});return t(lv,{"number, number":r2,"BigNumber, BigNumber":fj,"bigint, bigint":(c,f)=>c|f},l({SS:s,DS:o,Ss:u}))}),bj="matAlgo07xSSf",wj=["typed","SparseMatrix"],da=I(bj,wj,e=>{var{typed:t,SparseMatrix:r}=e;return function(i,o,s){var u=i._size,l=i._datatype||i._data===void 0?i._datatype:i.getDataType(),c=o._size,f=o._datatype||o._data===void 0?o._datatype:o.getDataType();if(u.length!==c.length)throw new at(u.length,c.length);if(u[0]!==c[0]||u[1]!==c[1])throw new RangeError("Dimension mismatch. Matrix A ("+u+") must match Matrix B ("+c+")");var m=u[0],d=u[1],h,p=0,y=s;typeof l=="string"&&l===f&&l!=="mixed"&&(h=l,p=t.convert(0,h),y=t.find(s,[h,h]));for(var w=[],D=[],v=new Array(d+1).fill(0),x=[],g=[],b=[],C=[],N=0;N<d;N++){var A=N+1,E=0;n(i,N,b,x,A),n(o,N,C,g,A);for(var S=0;S<m;S++){var F=b[S]===A?x[S]:p,k=C[S]===A?g[S]:p,$=y(F,k);$!==0&&$!==!1&&(D.push(S),w.push($),E++)}v[N+1]=v[N]+E}return new r({values:w,index:D,ptr:v,size:[m,d],datatype:l===i._datatype&&f===o._datatype?h:void 0})};function n(a,i,o,s,u){for(var l=a._values,c=a._index,f=a._ptr,m=f[i],d=f[i+1];m<d;m++){var h=c[m];o[h]=u,s[h]=l[m]}}}),cv="bitXor",xj=["typed","matrix","DenseMatrix","concat","SparseMatrix"],Dj=I(cv,xj,e=>{var{typed:t,matrix:r,DenseMatrix:n,concat:a,SparseMatrix:i}=e,o=qr({typed:t}),s=da({typed:t,SparseMatrix:i}),u=fr({typed:t,DenseMatrix:n}),l=_t({typed:t,matrix:r,concat:a});return t(cv,{"number, number":n2,"BigNumber, BigNumber":mj,"bigint, bigint":(c,f)=>c^f},l({SS:s,DS:o,Ss:u}))}),fv="arg",Nj=["typed"],Aj=I(fv,Nj,e=>{var{typed:t}=e;return t(fv,{number:function(n){return Math.atan2(0,n)},BigNumber:function(n){return n.constructor.atan2(0,n)},Complex:function(n){return n.arg()},"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),mv="conj",Cj=["typed"],Ej=I(mv,Cj,e=>{var{typed:t}=e;return t(mv,{"number | BigNumber | Fraction":r=>r,Complex:r=>r.conjugate(),Unit:t.referToSelf(r=>n=>new n.constructor(r(n.toNumeric()),n.formatUnits())),"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),dv="im",Sj=["typed"],Mj=I(dv,Sj,e=>{var{typed:t}=e;return t(dv,{number:()=>0,"BigNumber | Fraction":r=>r.mul(0),Complex:r=>r.im,"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),hv="re",Tj=["typed"],Fj=I(hv,Tj,e=>{var{typed:t}=e;return t(hv,{"number | BigNumber | Fraction":r=>r,Complex:r=>r.re,"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),pv="not",Pj=["typed"],kj=I(pv,Pj,e=>{var{typed:t}=e;return t(pv,{"null | undefined":()=>!0,number:u2,Complex:function(n){return n.re===0&&n.im===0},BigNumber:function(n){return n.isZero()||n.isNaN()},bigint:r=>!r,Unit:t.referToSelf(r=>n=>t.find(r,n.valueType())(n.value)),"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),gv="nullish",Oj=["typed","matrix","size","flatten","deepEqual"],_2=I(gv,Oj,e=>{var{typed:t,matrix:r,size:n,flatten:a,deepEqual:i}=e,o=qr({typed:t}),s=_n({typed:t}),u=P2({typed:t});return t(gv,{"number|bigint|Complex|BigNumber|Fraction|Unit|string|boolean|SparseMatrix, any":(l,c)=>l,"null, any":(l,c)=>c,"undefined, any":(l,c)=>c,"SparseMatrix, Array | Matrix":(l,c)=>{var f=n(l),m=n(c);if(i(f,m))return l;throw new at(f,m)},"DenseMatrix, DenseMatrix":t.referToSelf(l=>(c,f)=>u(c,f,l)),"DenseMatrix, SparseMatrix":t.referToSelf(l=>(c,f)=>o(c,f,l,!1)),"DenseMatrix, Array":t.referToSelf(l=>(c,f)=>u(c,r(f),l)),"DenseMatrix, any":t.referToSelf(l=>(c,f)=>s(c,f,l,!1)),"Array, Array":t.referToSelf(l=>(c,f)=>u(r(c),r(f),l).valueOf()),"Array, DenseMatrix":t.referToSelf(l=>(c,f)=>u(r(c),f,l)),"Array, SparseMatrix":t.referToSelf(l=>(c,f)=>o(r(c),f,l,!1)),"Array, any":t.referToSelf(l=>(c,f)=>s(r(c),f,l,!1).valueOf())})}),vv="or",$j=["typed","matrix","equalScalar","DenseMatrix","concat"],I2=I(vv,$j,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=qr({typed:t}),s=kc({typed:t,equalScalar:n}),u=fr({typed:t,DenseMatrix:a}),l=_t({typed:t,matrix:r,concat:i});return t(vv,{"number, number":Wm,"Complex, Complex":function(f,m){return f.re!==0||f.im!==0||m.re!==0||m.im!==0},"BigNumber, BigNumber":function(f,m){return!f.isZero()&&!f.isNaN()||!m.isZero()&&!m.isNaN()},"bigint, bigint":Wm,"Unit, Unit":t.referToSelf(c=>(f,m)=>c(f.value||0,m.value||0))},l({SS:s,DS:o,Ss:u}))}),yv="xor",Bj=["typed","matrix","DenseMatrix","concat","SparseMatrix"],_j=I(yv,Bj,e=>{var{typed:t,matrix:r,DenseMatrix:n,concat:a,SparseMatrix:i}=e,o=qr({typed:t}),s=da({typed:t,SparseMatrix:i}),u=fr({typed:t,DenseMatrix:n}),l=_t({typed:t,matrix:r,concat:a});return t(yv,{"number, number":Jm,"Complex, Complex":function(f,m){return(f.re!==0||f.im!==0)!=(m.re!==0||m.im!==0)},"bigint, bigint":Jm,"BigNumber, BigNumber":function(f,m){return(!f.isZero()&&!f.isNaN())!=(!m.isZero()&&!m.isNaN())},"Unit, Unit":t.referToSelf(c=>(f,m)=>c(f.value||0,m.value||0))},l({SS:s,DS:o,Ss:u}))}),bv="concat",Ij=["typed","matrix","isInteger"],z2=I(bv,Ij,e=>{var{typed:t,matrix:r,isInteger:n}=e;return t(bv,{"...Array | Matrix | number | BigNumber":function(i){var o,s=i.length,u=-1,l,c=!1,f=[];for(o=0;o<s;o++){var m=i[o];if(Le(m)&&(c=!0),qe(m)||Qe(m)){if(o!==s-1)throw new Error("Dimension must be specified as last argument");if(l=u,u=m.valueOf(),!n(u))throw new TypeError("Integer number expected for dimension");if(u<0||o>0&&u>l)throw new Xn(u,l+1)}else{var d=We(m).valueOf(),h=Je(d);if(f[o]=d,l=u,u=h.length-1,o>0&&u!==l)throw new at(l+1,u+1)}}if(f.length===0)throw new SyntaxError("At least one matrix expected");for(var p=f.shift();f.length;)p=Ix(p,f.shift(),u);return c?r(p):p},"...string":function(i){return i.join("")}})}),wv="column",zj=["typed","Index","matrix","range"],j2=I(wv,zj,e=>{var{typed:t,Index:r,matrix:n,range:a}=e;return t(wv,{"Matrix, number":i,"Array, number":function(s,u){return i(n(We(s)),u).valueOf()}});function i(o,s){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");Bt(s,o.size()[1]);var u=a(0,o.size()[0]),l=new r(u,[s]),c=o.subset(l);return Le(c)?c:n([[c]])}}),xv="count",jj=["typed","size","prod"],qj=I(xv,jj,e=>{var{typed:t,size:r,prod:n}=e;return t(xv,{string:function(i){return i.length},"Matrix | Array":function(i){return n(r(i))}})}),Dv="cross",Rj=["typed","matrix","subtract","multiply"],Lj=I(Dv,Rj,e=>{var{typed:t,matrix:r,subtract:n,multiply:a}=e;return t(Dv,{"Matrix, Matrix":function(s,u){return r(i(s.toArray(),u.toArray()))},"Matrix, Array":function(s,u){return r(i(s.toArray(),u))},"Array, Matrix":function(s,u){return r(i(s,u.toArray()))},"Array, Array":i});function i(o,s){var u=Math.max(Je(o).length,Je(s).length);o=Ql(o),s=Ql(s);var l=Je(o),c=Je(s);if(l.length!==1||c.length!==1||l[0]!==3||c[0]!==3)throw new RangeError("Vectors with length 3 expected (Size A = ["+l.join(", ")+"], B = ["+c.join(", ")+"])");var f=[n(a(o[1],s[2]),a(o[2],s[1])),n(a(o[2],s[0]),a(o[0],s[2])),n(a(o[0],s[1]),a(o[1],s[0]))];return u>1?[f]:f}}),Nv="diag",Hj=["typed","matrix","DenseMatrix","SparseMatrix"],Gj=I(Nv,Hj,e=>{var{typed:t,matrix:r,DenseMatrix:n,SparseMatrix:a}=e;return t(Nv,{Array:function(l){return i(l,0,Je(l),null)},"Array, number":function(l,c){return i(l,c,Je(l),null)},"Array, BigNumber":function(l,c){return i(l,c.toNumber(),Je(l),null)},"Array, string":function(l,c){return i(l,0,Je(l),c)},"Array, number, string":function(l,c,f){return i(l,c,Je(l),f)},"Array, BigNumber, string":function(l,c,f){return i(l,c.toNumber(),Je(l),f)},Matrix:function(l){return i(l,0,l.size(),l.storage())},"Matrix, number":function(l,c){return i(l,c,l.size(),l.storage())},"Matrix, BigNumber":function(l,c){return i(l,c.toNumber(),l.size(),l.storage())},"Matrix, string":function(l,c){return i(l,0,l.size(),c)},"Matrix, number, string":function(l,c,f){return i(l,c,l.size(),f)},"Matrix, BigNumber, string":function(l,c,f){return i(l,c.toNumber(),l.size(),f)}});function i(u,l,c,f){if(!ke(l))throw new TypeError("Second parameter in function diag must be an integer");var m=l>0?l:0,d=l<0?-l:0;switch(c.length){case 1:return o(u,l,f,c[0],d,m);case 2:return s(u,l,f,c,d,m)}throw new RangeError("Matrix for function diag must be 2 dimensional")}function o(u,l,c,f,m,d){var h=[f+m,f+d];if(c&&c!=="sparse"&&c!=="dense")throw new TypeError("Unknown matrix type ".concat(c,'"'));var p=c==="sparse"?a.diagonal(h,u,l):n.diagonal(h,u,l);return c!==null?p:p.valueOf()}function s(u,l,c,f,m,d){if(Le(u)){var h=u.diagonal(l);return c!==null?c!==h.storage()?r(h,c):h:h.valueOf()}for(var p=Math.min(f[0]-m,f[1]-d),y=[],w=0;w<p;w++)y[w]=u[w+m][w+d];return c!==null?r(y):y}}),Vj="filter",Uj=["typed"],q2=I(Vj,Uj,e=>{var{typed:t}=e;return t("filter",{"Array, function":Av,"Matrix, function":function(n,a){return n.create(Av(n.valueOf(),a),n.datatype())},"Array, RegExp":m0,"Matrix, RegExp":function(n,a){return n.create(m0(n.valueOf(),a),n.datatype())}})});function Av(e,t){var r=eo(t,e,"filter");return r.isUnary?f0(e,r.fn):f0(e,function(n,a,i){return r.fn(n,[a],i)})}var Cv="flatten",Wj=["typed"],Jj=I(Cv,Wj,e=>{var{typed:t}=e;return t(Cv,{Array:function(n){return dt(n)},DenseMatrix:function(n){return n.create(dt(n.valueOf(),!0),n.datatype())},SparseMatrix:function(n){throw new TypeError("SparseMatrix is not supported by function flatten because it does not support 1D vectors. Convert to a DenseMatrix or Array first. Example: flatten(x.toArray())")}})}),ed="forEach",Kj=["typed"],R2=I(ed,Kj,e=>{var{typed:t}=e;return t(ed,{"Array, function":Yj,"Matrix, function":function(n,a){n.forEach(a)}})});function Yj(e,t){var r=eo(t,e,ed);jx(e,r.fn,r.isUnary)}var Ev="getMatrixDataType",Zj=["typed"],Qj=I(Ev,Zj,e=>{var{typed:t}=e;return t(Ev,{Array:function(n){return Fc(n,Pt)},Matrix:function(n){return n.getDataType()}})}),Sv="identity",Xj=["typed","config","matrix","BigNumber","DenseMatrix","SparseMatrix"],eq=I(Sv,Xj,e=>{var{typed:t,config:r,matrix:n,BigNumber:a,DenseMatrix:i,SparseMatrix:o}=e;return t(Sv,{"":function(){return r.matrix==="Matrix"?n([]):[]},string:function(c){return n(c)},"number | BigNumber":function(c){return u(c,c,r.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, string":function(c,f){return u(c,c,f)},"number | BigNumber, number | BigNumber":function(c,f){return u(c,f,r.matrix==="Matrix"?"dense":void 0)},"number | BigNumber, number | BigNumber, string":function(c,f,m){return u(c,f,m)},Array:function(c){return s(c)},"Array, string":function(c,f){return s(c,f)},Matrix:function(c){return s(c.valueOf(),c.storage())},"Matrix, string":function(c,f){return s(c.valueOf(),f)}});function s(l,c){switch(l.length){case 0:return c?n(c):[];case 1:return u(l[0],l[0],c);case 2:return u(l[0],l[1],c);default:throw new Error("Vector containing two values expected")}}function u(l,c,f){var m=Qe(l)||Qe(c)?a:null;if(Qe(l)&&(l=l.toNumber()),Qe(c)&&(c=c.toNumber()),!ke(l)||l<1)throw new Error("Parameters in function identity must be positive integers");if(!ke(c)||c<1)throw new Error("Parameters in function identity must be positive integers");var d=m?new a(1):1,h=m?new m(0):0,p=[l,c];if(f){if(f==="sparse")return o.diagonal(p,d,0,h);if(f==="dense")return i.diagonal(p,d,0,h);throw new TypeError('Unknown matrix type "'.concat(f,'"'))}for(var y=Ko([],p,h),w=l<c?l:c,D=0;D<w;D++)y[D][D]=d;return y}}),Mv="kron",tq=["typed","matrix","multiplyScalar"],rq=I(Mv,tq,e=>{var{typed:t,matrix:r,multiplyScalar:n}=e;return t(Mv,{"Matrix, Matrix":function(s,u){return r(i(s.toArray(),u.toArray()))},"Matrix, Array":function(s,u){return r(i(s.toArray(),u))},"Array, Matrix":function(s,u){return r(i(s,u.toArray()))},"Array, Array":i});function a(o,s){return o.flatMap(u=>s.map(l=>n(u,l)))}function i(o,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:-1;if(u<0){var l=Je(o).length,c=Je(s).length;for(u=Math.max(l,c);l++<u;)o=[o];for(;c++<u;)s=[s]}return u===1?a(o,s):o.flatMap(f=>s.map(m=>i(f,m,u-1)))}}),qf="map",nq=["typed"],L2=I(qf,nq,e=>{var{typed:t}=e;return t(qf,{"Array, function":s,"Matrix, function":function(l,c){return l.map(c)},"Array|Matrix, Array|Matrix, ...Array|Matrix|function":(u,l,c)=>r([u,l,...c.slice(0,c.length-1)],c[c.length-1])});function r(u,l){if(typeof l!="function")throw new Error("Last argument must be a callback function");var c=u[0].isMatrix,f=u.map(g=>g.isMatrix?g.size():Je(g)),m=ec(...f),d=u.length,h=c?(g,b)=>g.get(b):tc,p=u.map((g,b)=>{var C=f[b].map(()=>0);return g.isMatrix?g.get(C):tc(g,C)}),y=t.isTypedFunction(l)?o(l,p,m.map(()=>0),u):i(l,d);if(y<2){var w=a(y,l,null);return n(u,w)}var D=c?u.map(g=>g.isMatrix?g.create(Wi(g.toArray(),m),g.datatype()):u[0].create(Wi(g.valueOf(),m))):u.map(g=>g.isMatrix?Wi(g.toArray(),m):Wi(g,m)),v=a(y,l,D),x=(g,b)=>v([g,...D.slice(1).map(C=>h(C,b))],b);return c?D[0].map(x):s(D[0],x)}function n(u,l){var c=u[0],f=u.map(g=>g.isMatrix?g.valueOf():g),m=u.map(g=>g.isMatrix?g.size():Je(g)),d=ec(...m),h=m.map(g=>d.length-g.length),p=d.length-1,y=l.length>1,w=y?[]:null,D=x(f,0);if(c.isMatrix){var v=c.create();return v._data=D,v._size=d,v}else return D;function x(g){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,C=d[b],N=Array(C);if(b<p)for(var A=function($){w&&(w[b]=$),N[$]=x(g.map((R,M)=>h[M]>b?R:R.length===1?R[0]:R[$]),b+1)},E=0;E<C;E++)A(E);else for(var S=function($){w&&(w[b]=$),N[$]=l(g.map(R=>R.length===1?R[0]:R[$]),w?w.slice():void 0)},F=0;F<C;F++)S(F);return N}}function a(u,l,c){switch(u){case 0:return f=>l(...f);case 1:return(f,m)=>l(...f,m);case 2:return(f,m)=>l(...f,m,...c)}}function i(u,l){var c=u.toString();if(/arguments/.test(c))return 2;var f=c.match(/\(.*?\)/);return/\.\.\./.test(f)||u.length>l+1?2:u.length===l+1?1:0}function o(u,l,c,f){return t.resolve(u,[...l,c,...f])!==null?2:t.resolve(u,[...l,c])!==null?1:(t.resolve(u,l)!==null,0)}function s(u,l){var c=eo(l,u,qf);return Gm(u,c.fn,c.isUnary)}}),Tv="diff",aq=["typed","matrix","subtract","number"],H2=I(Tv,aq,e=>{var{typed:t,matrix:r,subtract:n,number:a}=e;return t(Tv,{"Array | Matrix":function(c){return Le(c)?r(o(c.toArray())):o(c)},"Array | Matrix, number":function(c,f){if(!ke(f))throw new RangeError("Dimension must be a whole number");return Le(c)?r(i(c.toArray(),f)):i(c,f)},"Array, BigNumber":t.referTo("Array,number",l=>(c,f)=>l(c,a(f))),"Matrix, BigNumber":t.referTo("Matrix,number",l=>(c,f)=>l(c,a(f)))});function i(l,c){if(Le(l)&&(l=l.toArray()),!Array.isArray(l))throw RangeError("Array/Matrix does not have that many dimensions");if(c>0){var f=[];return l.forEach(m=>{f.push(i(m,c-1))}),f}else{if(c===0)return o(l);throw RangeError("Cannot have negative dimension")}}function o(l){for(var c=[],f=l.length,m=1;m<f;m++)c.push(s(l[m-1],l[m]));return c}function s(l,c){Le(l)&&(l=l.toArray()),Le(c)&&(c=c.toArray());var f=Array.isArray(l),m=Array.isArray(c);if(f&&m)return u(l,c);if(!f&&!m)return n(c,l);throw TypeError("Cannot calculate difference between 1 array and 1 non-array")}function u(l,c){if(l.length!==c.length)throw RangeError("Not all sub-arrays have the same length");for(var f=[],m=l.length,d=0;d<m;d++)f.push(s(l[d],c[d]));return f}}),iq="ones",oq=["typed","config","matrix","BigNumber"],sq=I(iq,oq,e=>{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t("ones",{"":function(){return r.matrix==="Array"?i([]):i([],"default")},"...number | BigNumber | string":function(l){var c=l[l.length-1];if(typeof c=="string"){var f=l.pop();return i(l,f)}else return r.matrix==="Array"?i(l):i(l,"default")},Array:i,Matrix:function(l){var c=l.storage();return i(l.valueOf(),c)},"Array | Matrix, string":function(l,c){return i(l.valueOf(),c)}});function i(u,l){var c=o(u),f=c?new a(1):1;if(s(u),l){var m=n(l);return u.length>0?m.resize(u,f):m}else{var d=[];return u.length>0?Ko(d,u,f):d}}function o(u){var l=!1;return u.forEach(function(c,f,m){Qe(c)&&(l=!0,m[f]=c.toNumber())}),l}function s(u){u.forEach(function(l){if(typeof l!="number"||!ke(l)||l<0)throw new Error("Parameters in function ones must be positive integers")})}});function Bd(){throw new Error('No "bignumber" implementation available')}function G2(){throw new Error('No "fraction" implementation available')}function uq(){throw new Error('No "matrix" implementation available')}var Fv="range",lq=["typed","config","?matrix","?bignumber","equal","smaller","smallerEq","larger","largerEq","add","isZero","isPositive"],V2=I(Fv,lq,e=>{var{typed:t,config:r,matrix:n,bignumber:a,smaller:i,smallerEq:o,larger:s,largerEq:u,add:l,isZero:c,isPositive:f}=e;return t(Fv,{string:d,"string, boolean":d,number:function(w){throw new TypeError("Too few arguments to function range(): ".concat(w))},boolean:function(w){throw new TypeError("Unexpected type of argument 1 to function range(): ".concat(w,", number|bigint|BigNumber|Fraction"))},"number, number":function(w,D){return m(h(w,D,1,!1))},"number, number, number":function(w,D,v){return m(h(w,D,v,!1))},"number, number, boolean":function(w,D,v){return m(h(w,D,1,v))},"number, number, number, boolean":function(w,D,v,x){return m(h(w,D,v,x))},"bigint, bigint|number":function(w,D){return m(h(w,D,1n,!1))},"number, bigint":function(w,D){return m(h(BigInt(w),D,1n,!1))},"bigint, bigint|number, bigint|number":function(w,D,v){return m(h(w,D,BigInt(v),!1))},"number, bigint, bigint|number":function(w,D,v){return m(h(BigInt(w),D,BigInt(v),!1))},"bigint, bigint|number, boolean":function(w,D,v){return m(h(w,D,1n,v))},"number, bigint, boolean":function(w,D,v){return m(h(BigInt(w),D,1n,v))},"bigint, bigint|number, bigint|number, boolean":function(w,D,v,x){return m(h(w,D,BigInt(v),x))},"number, bigint, bigint|number, boolean":function(w,D,v,x){return m(h(BigInt(w),D,BigInt(v),x))},"BigNumber, BigNumber":function(w,D){var v=w.constructor;return m(h(w,D,new v(1),!1))},"BigNumber, BigNumber, BigNumber":function(w,D,v){return m(h(w,D,v,!1))},"BigNumber, BigNumber, boolean":function(w,D,v){var x=w.constructor;return m(h(w,D,new x(1),v))},"BigNumber, BigNumber, BigNumber, boolean":function(w,D,v,x){return m(h(w,D,v,x))},"Fraction, Fraction":function(w,D){return m(h(w,D,1,!1))},"Fraction, Fraction, Fraction":function(w,D,v){return m(h(w,D,v,!1))},"Fraction, Fraction, boolean":function(w,D,v){return m(h(w,D,1,v))},"Fraction, Fraction, Fraction, boolean":function(w,D,v,x){return m(h(w,D,v,x))},"Unit, Unit, Unit":function(w,D,v){return m(h(w,D,v,!1))},"Unit, Unit, Unit, boolean":function(w,D,v,x){return m(h(w,D,v,x))}});function m(y){return r.matrix==="Matrix"?n?n(y):uq():y}function d(y,w){var D=p(y);if(!D)throw new SyntaxError('String "'+y+'" is no valid range');return r.number==="BigNumber"?(a===void 0&&Bd(),m(h(a(D.start),a(D.end),a(D.step)))):m(h(D.start,D.end,D.step,w))}function h(y,w,D,v){var x=[];if(c(D))throw new Error("Step must be non-zero");for(var g=f(D)?v?o:i:v?u:s,b=y;g(b,w);)x.push(b),b=l(b,D);return x}function p(y){var w=y.split(":"),D=w.map(function(x){return Number(x)}),v=D.some(function(x){return isNaN(x)});if(v)return null;switch(D.length){case 2:return{start:D[0],end:D[1],step:1};case 3:return{start:D[0],end:D[2],step:D[1]};default:return null}}}),Pv="reshape",cq=["typed","isInteger","matrix"],fq=I(Pv,cq,e=>{var{typed:t,isInteger:r}=e;return t(Pv,{"Matrix, Array":function(a,i){return a.reshape(i,!0)},"Array, Array":function(a,i){return i.forEach(function(o){if(!r(o))throw new TypeError("Invalid size for dimension: "+o)}),Md(a,i)}})}),mq="resize",dq=["config","matrix"],hq=I(mq,dq,e=>{var{config:t,matrix:r}=e;return function(i,o,s){if(arguments.length!==2&&arguments.length!==3)throw new io("resize",arguments.length,2,3);if(Le(o)&&(o=o.valueOf()),Qe(o[0])&&(o=o.map(function(c){return Qe(c)?c.toNumber():c})),Le(i))return i.resize(o,s,!0);if(typeof i=="string")return n(i,o,s);var u=Array.isArray(i)?!1:t.matrix!=="Array";if(o.length===0){for(;Array.isArray(i);)i=i[0];return We(i)}else{Array.isArray(i)||(i=[i]),i=We(i);var l=Ko(i,o,s);return u?r(l):l}};function n(a,i,o){if(o!==void 0){if(typeof o!="string"||o.length!==1)throw new TypeError("Single character expected as defaultValue")}else o=" ";if(i.length!==1)throw new at(i.length,1);var s=i[0];if(typeof s!="number"||!ke(s))throw new TypeError("Invalid size, must contain positive integers (size: "+it(i)+")");if(a.length>s)return a.substring(0,s);if(a.length<s){for(var u=a,l=0,c=s-a.length;l<c;l++)u+=o;return u}else return a}}),kv="rotate",pq=["typed","multiply","rotationMatrix"],gq=I(kv,pq,e=>{var{typed:t,multiply:r,rotationMatrix:n}=e;return t(kv,{"Array , number | BigNumber | Complex | Unit":function(o,s){a(o,2);var u=r(n(s),o);return u.toArray()},"Matrix , number | BigNumber | Complex | Unit":function(o,s){return a(o,2),r(n(s),o)},"Array, number | BigNumber | Complex | Unit, Array | Matrix":function(o,s,u){a(o,3);var l=r(n(s,u),o);return l},"Matrix, number | BigNumber | Complex | Unit, Array | Matrix":function(o,s,u){return a(o,3),r(n(s,u),o)}});function a(i,o){var s=Array.isArray(i)?Je(i):i.size();if(s.length>2)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(s.length===2&&s[1]!==1)throw new RangeError("Vector must be of dimensions 1x".concat(o));if(s[0]!==o)throw new RangeError("Vector must be of dimensions 1x".concat(o))}}),Ov="rotationMatrix",vq=["typed","config","multiplyScalar","addScalar","unaryMinus","norm","matrix","BigNumber","DenseMatrix","SparseMatrix","cos","sin"],yq=I(Ov,vq,e=>{var{typed:t,config:r,multiplyScalar:n,addScalar:a,unaryMinus:i,norm:o,BigNumber:s,matrix:u,DenseMatrix:l,SparseMatrix:c,cos:f,sin:m}=e;return t(Ov,{"":function(){return r.matrix==="Matrix"?u([]):[]},string:function(v){return u(v)},"number | BigNumber | Complex | Unit":function(v){return d(v,r.matrix==="Matrix"?"dense":void 0)},"number | BigNumber | Complex | Unit, string":function(v,x){return d(v,x)},"number | BigNumber | Complex | Unit, Array":function(v,x){var g=u(x);return h(g),w(v,g,void 0)},"number | BigNumber | Complex | Unit, Matrix":function(v,x){h(x);var g=x.storage()||(r.matrix==="Matrix"?"dense":void 0);return w(v,x,g)},"number | BigNumber | Complex | Unit, Array, string":function(v,x,g){var b=u(x);return h(b),w(v,b,g)},"number | BigNumber | Complex | Unit, Matrix, string":function(v,x,g){return h(x),w(v,x,g)}});function d(D,v){var x=Qe(D),g=x?new s(-1):-1,b=f(D),C=m(D),N=[[b,n(g,C)],[C,b]];return y(N,v)}function h(D){var v=D.size();if(v.length<1||v[0]!==3)throw new RangeError("Vector must be of dimensions 1x3")}function p(D){return D.reduce((v,x)=>n(v,x))}function y(D,v){if(v){if(v==="sparse")return new c(D);if(v==="dense")return new l(D);throw new TypeError('Unknown matrix type "'.concat(v,'"'))}return D}function w(D,v,x){var g=o(v);if(g===0)throw new RangeError("Rotation around zero vector");var b=Qe(D)?s:null,C=b?new b(1):1,N=b?new b(-1):-1,A=b?new b(v.get([0])/g):v.get([0])/g,E=b?new b(v.get([1])/g):v.get([1])/g,S=b?new b(v.get([2])/g):v.get([2])/g,F=f(D),k=a(C,i(F)),$=m(D),R=a(F,p([A,A,k])),M=a(p([A,E,k]),p([N,S,$])),B=a(p([A,S,k]),p([E,$])),L=a(p([A,E,k]),p([S,$])),j=a(F,p([E,E,k])),Z=a(p([E,S,k]),p([N,A,$])),G=a(p([A,S,k]),p([N,E,$])),V=a(p([E,S,k]),p([A,$])),P=a(F,p([S,S,k])),Q=[[R,M,B],[L,j,Z],[G,V,P]];return y(Q,x)}}),$v="row",bq=["typed","Index","matrix","range"],U2=I($v,bq,e=>{var{typed:t,Index:r,matrix:n,range:a}=e;return t($v,{"Matrix, number":i,"Array, number":function(s,u){return i(n(We(s)),u).valueOf()}});function i(o,s){if(o.size().length!==2)throw new Error("Only two dimensional matrix is supported");Bt(s,o.size()[0]);var u=a(0,o.size()[1]),l=new r([s],u),c=o.subset(l);return Le(c)?c:n([[c]])}}),Bv="size",wq=["typed"],xq=I(Bv,wq,e=>{var{typed:t}=e;return t(Bv,{Matrix:r=>r.size(),Array:Je,string:r=>[r.length],"number | Complex | BigNumber | Unit | boolean | null":r=>[]})}),_v="squeeze",Dq=["typed"],Nq=I(_v,Dq,e=>{var{typed:t}=e;return t(_v,{Array:function(n){return Ql(We(n))},Matrix:function(n){var a=Ql(n.toArray());return Array.isArray(a)?n.create(a,n.datatype()):a},any:function(n){return We(n)}})}),Iv="subset",Aq=["typed","matrix","zeros","add"],W2=I(Iv,Aq,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e;return t(Iv,{"Matrix, Index":function(s,u){return Jo(u)?r():(Zl(s,u),s.subset(u))},"Array, Index":t.referTo("Matrix, Index",function(o){return function(s,u){var l=o(r(s),u);return u.isScalar()?l:l.valueOf()}}),"Object, Index":Eq,"string, Index":Cq,"Matrix, Index, any, any":function(s,u,l,c){return Jo(u)?s:(Zl(s,u),s.clone().subset(u,i(l,u),c))},"Array, Index, any, any":t.referTo("Matrix, Index, any, any",function(o){return function(s,u,l,c){var f=o(r(s),u,l,c);return f.isMatrix?f.valueOf():f}}),"Array, Index, any":t.referTo("Matrix, Index, any, any",function(o){return function(s,u,l){return o(r(s),u,l,void 0).valueOf()}}),"Matrix, Index, any":t.referTo("Matrix, Index, any, any",function(o){return function(s,u,l){return o(s,u,l,void 0)}}),"string, Index, string":zv,"string, Index, string, string":zv,"Object, Index, any":Sq});function i(o,s){if(typeof o=="string")throw new Error("can't boradcast a string");if(s.isScalar())return o;var u=s.size();if(u.every(l=>l>0))try{return a(o,n(u))}catch{return o}else return o}});function Cq(e,t){if(!Nc(t))throw new TypeError("Index expected");if(Jo(t))return"";if(Zl(Array.from(e),t),t.size().length!==1)throw new at(t.size().length,1);var r=e.length;Bt(t.min()[0],r),Bt(t.max()[0],r);var n=t.dimension(0),a="";function i(o){a+=e.charAt(o)}return Number.isInteger(n)?i(n):n.forEach(i),a}function zv(e,t,r,n){if(!t||t.isIndex!==!0)throw new TypeError("Index expected");if(Jo(t))return e;if(Zl(Array.from(e),t),t.size().length!==1)throw new at(t.size().length,1);if(n!==void 0){if(typeof n!="string"||n.length!==1)throw new TypeError("Single character expected as defaultValue")}else n=" ";var a=t.dimension(0),i=Number.isInteger(a)?1:a.size()[0];if(i!==r.length)throw new at(a.size()[0],r.length);var o=e.length;Bt(t.min()[0]),Bt(t.max()[0]);for(var s=[],u=0;u<o;u++)s[u]=e.charAt(u);function l(m,d){s[m]=r.charAt(d[0])}if(Number.isInteger(a)?l(a,[0]):a.forEach(l),s.length>o)for(var c=o-1,f=s.length;c<f;c++)s[c]||(s[c]=n);return s.join("")}function Eq(e,t){if(!Jo(t)){if(t.size().length!==1)throw new at(t.size(),1);var r=t.dimension(0);if(typeof r!="string")throw new TypeError("String expected as index to retrieve an object property");return Wr(e,r)}}function Sq(e,t,r){if(Jo(t))return e;if(t.size().length!==1)throw new at(t.size(),1);var n=t.dimension(0);if(typeof n!="string")throw new TypeError("String expected as index to retrieve an object property");var a=We(e);return Uo(a,n,r),a}var jv="transpose",Mq=["typed","matrix"],Tq=I(jv,Mq,e=>{var{typed:t,matrix:r}=e;return t(jv,{Array:o=>n(r(o)).valueOf(),Matrix:n,any:We});function n(o){var s=o.size(),u;switch(s.length){case 1:u=o.clone();break;case 2:{var l=s[0],c=s[1];if(c===0)throw new RangeError("Cannot transpose a 2D matrix with no columns (size: "+it(s)+")");switch(o.storage()){case"dense":u=a(o,l,c);break;case"sparse":u=i(o,l,c);break}}break;default:throw new RangeError("Matrix must be a vector or two dimensional (size: "+it(s)+")")}return u}function a(o,s,u){for(var l=o._data,c=[],f,m=0;m<u;m++){f=c[m]=[];for(var d=0;d<s;d++)f[d]=We(l[d][m])}return o.createDenseMatrix({data:c,size:[u,s],datatype:o._datatype})}function i(o,s,u){for(var l=o._values,c=o._index,f=o._ptr,m=l?[]:void 0,d=[],h=[],p=[],y=0;y<s;y++)p[y]=0;var w,D,v;for(w=0,D=c.length;w<D;w++)p[c[w]]++;for(var x=0,g=0;g<s;g++)h.push(x),x+=p[g],p[g]=h[g];for(h.push(x),v=0;v<u;v++)for(var b=f[v],C=f[v+1],N=b;N<C;N++){var A=p[c[N]]++;d[A]=v,l&&(m[A]=We(l[N]))}return o.createSparseMatrix({values:m,index:d,ptr:h,size:[u,s],datatype:o._datatype})}}),qv="ctranspose",Fq=["typed","transpose","conj"],Pq=I(qv,Fq,e=>{var{typed:t,transpose:r,conj:n}=e;return t(qv,{any:function(i){return n(r(i))}})}),Rv="zeros",kq=["typed","config","matrix","BigNumber"],Oq=I(Rv,kq,e=>{var{typed:t,config:r,matrix:n,BigNumber:a}=e;return t(Rv,{"":function(){return r.matrix==="Array"?i([]):i([],"default")},"...number | BigNumber | string":function(l){var c=l[l.length-1];if(typeof c=="string"){var f=l.pop();return i(l,f)}else return r.matrix==="Array"?i(l):i(l,"default")},Array:i,Matrix:function(l){var c=l.storage();return i(l.valueOf(),c)},"Array | Matrix, string":function(l,c){return i(l.valueOf(),c)}});function i(u,l){var c=o(u),f=c?new a(0):0;if(s(u),l){var m=n(l);return u.length>0?m.resize(u,f):m}else{var d=[];return u.length>0?Ko(d,u,f):d}}function o(u){var l=!1;return u.forEach(function(c,f,m){Qe(c)&&(l=!0,m[f]=c.toNumber())}),l}function s(u){u.forEach(function(l){if(typeof l!="number"||!ke(l)||l<0)throw new Error("Parameters in function zeros must be positive integers")})}}),Lv="fft",$q=["typed","matrix","addScalar","multiplyScalar","divideScalar","exp","tau","i","dotDivide","conj","pow","ceil","log2"],Bq=I(Lv,$q,e=>{var{typed:t,matrix:r,addScalar:n,multiplyScalar:a,divideScalar:i,exp:o,tau:s,i:u,dotDivide:l,conj:c,pow:f,ceil:m,log2:d}=e;return t(Lv,{Array:h,Matrix:function(v){return v.create(h(v.valueOf()),v.datatype())}});function h(D){var v=Je(D);return v.length===1?w(D,v[0]):p(D.map(x=>h(x,v.slice(1))),0)}function p(D,v){var x=Je(D);if(v!==0)return new Array(x[0]).fill(0).map((b,C)=>p(D[C],v-1));if(x.length===1)return w(D);function g(b){var C=Je(b);return new Array(C[1]).fill(0).map((N,A)=>new Array(C[0]).fill(0).map((E,S)=>b[S][A]))}return g(p(g(D),1))}function y(D){for(var v=D.length,x=o(i(a(-1,a(u,s)),v)),g=[],b=1-v;b<v;b++)g.push(f(x,i(f(b,2),2)));for(var C=f(2,m(d(v+v-1))),N=[...new Array(v).fill(0).map((M,B)=>a(D[B],g[v-1+B])),...new Array(C-v).fill(0)],A=[...new Array(v+v-1).fill(0).map((M,B)=>i(1,g[B])),...new Array(C-(v+v-1)).fill(0)],E=w(N),S=w(A),F=new Array(C).fill(0).map((M,B)=>a(E[B],S[B])),k=l(c(h(c(F))),C),$=[],R=v-1;R<v+v-1;R++)$.push(a(k[R],g[R]));return $}function w(D){var v=D.length;if(v===1)return[D[0]];if(v%2===0){for(var x=[...w(D.filter((N,A)=>A%2===0)),...w(D.filter((N,A)=>A%2===1))],g=0;g<v/2;g++){var b=x[g],C=a(x[g+v/2],o(a(a(s,u),i(-g,v))));x[g]=n(b,C),x[g+v/2]=n(b,a(-1,C))}return x}else return y(D)}}),Hv="ifft",_q=["typed","fft","dotDivide","conj"],Iq=I(Hv,_q,e=>{var{typed:t,fft:r,dotDivide:n,conj:a}=e;return t(Hv,{"Array | Matrix":function(o){var s=Le(o)?o.size():Je(o);return n(a(r(a(o))),s.reduce((u,l)=>u*l,1))}})});function Js(e){"@babel/helpers - typeof";return Js=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Js(e)}function zq(e,t){if(Js(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(Js(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function jq(e){var t=zq(e,"string");return Js(t)=="symbol"?t:t+""}function ur(e,t,r){return(t=jq(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function qq(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Gv(Object(r),!0).forEach(function(n){ur(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Gv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Rq="solveODE",Lq=["typed","add","subtract","multiply","divide","max","map","abs","isPositive","isNegative","larger","smaller","matrix","bignumber","unaryMinus"],Hq=I(Rq,Lq,e=>{var{typed:t,add:r,subtract:n,multiply:a,divide:i,max:o,map:s,abs:u,isPositive:l,isNegative:c,larger:f,smaller:m,matrix:d,bignumber:h,unaryMinus:p}=e;function y(N){return function(A,E,S,F){var k=!(E.length===2&&(E.every(b)||E.every(hn)));if(k)throw new Error('"tspan" must be an Array of two numeric values or two units [tStart, tEnd]');var $=E[0],R=E[1],M=f(R,$),B=F.firstStep;if(B!==void 0&&!l(B))throw new Error('"firstStep" must be positive');var L=F.maxStep;if(L!==void 0&&!l(L))throw new Error('"maxStep" must be positive');var j=F.minStep;if(j&&c(j))throw new Error('"minStep" must be positive or zero');var Z=[$,R,B,j,L].filter(O=>O!==void 0);if(!(Z.every(b)||Z.every(hn)))throw new Error('Inconsistent type of "t" dependant variables');for(var G=1,V=F.tol?F.tol:1e-4,P=F.minDelta?F.minDelta:.2,Q=F.maxDelta?F.maxDelta:5,z=F.maxIter?F.maxIter:1e4,oe=[$,R,...S,L,j].some(Qe),[ne,U,_,J]=oe?[h(N.a),h(N.c),h(N.b),h(N.bp)]:[N.a,N.c,N.b,N.bp],ae=B?M?B:p(B):i(n(R,$),G),ee=[$],ue=[S],se=n(_,J),be=0,Me=0,Pe=x(M),Ee=g(M);Pe(ee[be],R);){var Oe=[];ae=Ee(ee[be],R,ae),Oe.push(A(ee[be],ue[be]));for(var je=1;je<U.length;++je)Oe.push(A(r(ee[be],a(U[je],ae)),r(ue[be],a(ae,ne[je],Oe))));var H=o(u(s(a(se,Oe),O=>hn(O)?O.value:O)));H<V&&V/H>1/4&&(ee.push(r(ee[be],ae)),ue.push(r(ue[be],a(ae,_,Oe))),be++);var X=.84*(V/H)**(1/5);if(m(X,P)?X=P:f(X,Q)&&(X=Q),X=oe?h(X):X,ae=a(ae,X),L&&f(u(ae),L)?ae=M?L:p(L):j&&m(u(ae),j)&&(ae=M?j:p(j)),Me++,Me>z)throw new Error("Maximum number of iterations reached, try changing options")}return{t:ee,y:ue}}}function w(N,A,E,S){var F=[[],[.5],[0,.75],[.2222222222222222,.3333333333333333,.4444444444444444]],k=[null,1/2,3/4,1],$=[2/9,1/3,4/9,0],R=[7/24,1/4,1/3,1/8],M={a:F,c:k,b:$,bp:R};return y(M)(N,A,E,S)}function D(N,A,E,S){var F=[[],[.2],[.075,.225],[.9777777777777777,-3.7333333333333334,3.5555555555555554],[2.9525986892242035,-11.595793324188385,9.822892851699436,-.2908093278463649],[2.8462752525252526,-10.757575757575758,8.906422717743473,.2784090909090909,-.2735313036020583],[.09114583333333333,0,.44923629829290207,.6510416666666666,-.322376179245283,.13095238095238096]],k=[null,1/5,3/10,4/5,8/9,1,1],$=[35/384,0,500/1113,125/192,-2187/6784,11/84,0],R=[5179/57600,0,7571/16695,393/640,-92097/339200,187/2100,1/40],M={a:F,c:k,b:$,bp:R};return y(M)(N,A,E,S)}function v(N,A,E,S){var F=S.method?S.method:"RK45",k={RK23:w,RK45:D};if(F.toUpperCase()in k){var $=qq({},S);return delete $.method,k[F.toUpperCase()](N,A,E,$)}else{var R=Object.keys(k).map(B=>'"'.concat(B,'"')),M="".concat(R.slice(0,-1).join(", ")," and ").concat(R.slice(-1));throw new Error('Unavailable method "'.concat(F,'". Available methods are ').concat(M))}}function x(N){return N?m:f}function g(N){var A=N?f:m;return function(E,S,F){var k=r(E,F);return A(k,S)?n(S,E):F}}function b(N){return Qe(N)||qe(N)}function C(N,A,E,S){var F=v(N,A.toArray(),E.toArray(),S);return{t:d(F.t),y:d(F.y)}}return t("solveODE",{"function, Array, Array, Object":v,"function, Matrix, Matrix, Object":C,"function, Array, Array":(N,A,E)=>v(N,A,E,{}),"function, Matrix, Matrix":(N,A,E)=>C(N,A,E,{}),"function, Array, number | BigNumber | Unit":(N,A,E)=>{var S=v(N,A,[E],{});return{t:S.t,y:S.y.map(F=>F[0])}},"function, Matrix, number | BigNumber | Unit":(N,A,E)=>{var S=v(N,A.toArray(),[E],{});return{t:d(S.t),y:d(S.y.map(F=>F[0]))}},"function, Array, number | BigNumber | Unit, Object":(N,A,E,S)=>{var F=v(N,A,[E],S);return{t:F.t,y:F.y.map(k=>k[0])}},"function, Matrix, number | BigNumber | Unit, Object":(N,A,E,S)=>{var F=v(N,A.toArray(),[E],S);return{t:d(F.t),y:d(F.y.map(k=>k[0]))}}})}),Gq="erf",Vq=["typed"],Uq=I(Gq,Vq,e=>{var{typed:t}=e;return t("name",{number:function(o){var s=Math.abs(o);return s>=Kq?ii(o):s<=Wq?ii(o)*r(s):s<=4?ii(o)*(1-n(s)):ii(o)*(1-a(s))},"Array | Matrix":t.referToSelf(i=>o=>Xe(o,i))});function r(i){var o=i*i,s=Ca[0][4]*o,u=o,l;for(l=0;l<3;l+=1)s=(s+Ca[0][l])*o,u=(u+Mo[0][l])*o;return i*(s+Ca[0][3])/(u+Mo[0][3])}function n(i){var o=Ca[1][8]*i,s=i,u;for(u=0;u<7;u+=1)o=(o+Ca[1][u])*i,s=(s+Mo[1][u])*i;var l=(o+Ca[1][7])/(s+Mo[1][7]),c=parseInt(i*16)/16,f=(i-c)*(i+c);return Math.exp(-c*c)*Math.exp(-f)*l}function a(i){var o=1/(i*i),s=Ca[2][5]*o,u=o,l;for(l=0;l<4;l+=1)s=(s+Ca[2][l])*o,u=(u+Mo[2][l])*o;var c=o*(s+Ca[2][4])/(u+Mo[2][4]);c=(Jq-c)/i,o=parseInt(i*16)/16;var f=(i-o)*(i+o);return Math.exp(-o*o)*Math.exp(-f)*c}}),Wq=.46875,Jq=.5641895835477563,Ca=[[3.1611237438705655,113.86415415105016,377.485237685302,3209.3775891384694,.18577770618460315],[.5641884969886701,8.883149794388377,66.11919063714163,298.6351381974001,881.952221241769,1712.0476126340707,2051.0783778260716,1230.3393547979972,21531153547440383e-24],[.30532663496123236,.36034489994980445,.12578172611122926,.016083785148742275,.0006587491615298378,.016315387137302097]],Mo=[[23.601290952344122,244.02463793444417,1282.6165260773723,2844.236833439171],[15.744926110709835,117.6939508913125,537.1811018620099,1621.3895745666903,3290.7992357334597,4362.619090143247,3439.3676741437216,1230.3393548037495],[2.568520192289822,1.8729528499234604,.5279051029514285,.06051834131244132,.0023352049762686918]],Kq=Math.pow(2,53),Vv="zeta",Yq=["typed","config","multiply","pow","divide","factorial","equal","smallerEq","isBounded","isNegative","gamma","sin","subtract","add","?Complex","?BigNumber","pi"],Zq=I(Vv,Yq,e=>{var{typed:t,config:r,multiply:n,pow:a,divide:i,factorial:o,equal:s,smallerEq:u,isBounded:l,isNegative:c,gamma:f,sin:m,subtract:d,add:h,Complex:p,BigNumber:y,pi:w}=e;return t(Vv,{number:C=>D(C,N=>N,()=>20),BigNumber:C=>D(C,N=>new y(N),()=>Math.abs(Math.log10(r.relTol))),Complex:v});function D(C,N,A){return s(C,0)?N(-.5):s(C,1)?N(NaN):l(C)?x(C,N,A,E=>E):c(C)?N(NaN):N(1)}function v(C){return C.re===0&&C.im===0?new p(-.5):C.re===1?new p(NaN,NaN):C.re===1/0&&C.im===0?new p(1):C.im===1/0||C.re===-1/0?new p(NaN,NaN):x(C,N=>N,N=>Math.round(1.3*15+.9*Math.abs(N.im)),N=>N.re)}function x(C,N,A,E){var S=A(C);if(E(C)>-(S-1)/2)return b(C,N(S),N);var F=n(a(2,C),a(N(w),d(C,1)));return F=n(F,m(n(i(N(w),2),C))),F=n(F,f(d(1,C))),n(F,x(d(1,C),N,A,E))}function g(C,N){for(var A=C,E=C;u(E,N);E=h(E,1)){var S=i(n(o(h(N,d(E,1))),a(4,E)),n(o(d(N,E)),o(n(2,E))));A=h(A,S)}return n(N,A)}function b(C,N,A){for(var E=i(1,n(g(A(0),N),d(1,a(2,d(1,C))))),S=A(0),F=A(1);u(F,N);F=h(F,1))S=h(S,i(n((-1)**(F-1),g(F,N)),a(F,C)));return n(E,S)}}),Uv="mode",Qq=["typed","isNaN","isNumeric"],Xq=I(Uv,Qq,e=>{var{typed:t,isNaN:r,isNumeric:n}=e;return t(Uv,{"Array | Matrix":a,"...":function(o){return a(o)}});function a(i){i=dt(i.valueOf());var o=i.length;if(o===0)throw new Error("Cannot calculate mode of an empty array");for(var s={},u=[],l=0,c=0;c<i.length;c++){var f=i[c];if(n(f)&&r(f))throw new Error("Cannot calculate mode of an array containing NaN values");f in s||(s[f]=0),s[f]++,s[f]===l?u.push(f):s[f]>l&&(l=s[f],u=[f])}return u}});function Zr(e,t,r){var n;return String(e).includes("Unexpected type")?(n=arguments.length>2?" (type: "+Pt(r)+", value: "+JSON.stringify(r)+")":" (type: "+e.data.actual+")",new TypeError("Cannot calculate "+t+", unexpected type of argument"+n)):String(e).includes("complex numbers")?(n=arguments.length>2?" (type: "+Pt(r)+", value: "+JSON.stringify(r)+")":"",new TypeError("Cannot calculate "+t+", no ordering relation is defined for complex numbers"+n)):e}var Wv="prod",eR=["typed","config","multiplyScalar","numeric"],tR=I(Wv,eR,e=>{var{typed:t,config:r,multiplyScalar:n,numeric:a}=e;return t(Wv,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":function(s,u){throw new Error("prod(A, dim) is not yet supported")},"...":function(s){return i(s)}});function i(o){var s;if(gi(o,function(u){try{s=s===void 0?u:n(s,u)}catch(l){throw Zr(l,"prod",u)}}),typeof s=="string"&&(s=a(s,yi(s,r))),s===void 0)throw new Error("Cannot calculate prod of an empty array");return s}}),Jv="format",rR=["typed"],nR=I(Jv,rR,e=>{var{typed:t}=e;return t(Jv,{any:it,"any, Object | function | number | BigNumber":it})}),Kv="bin",aR=["typed","format"],iR=I(Kv,aR,e=>{var{typed:t,format:r}=e;return t(Kv,{"number | BigNumber":function(a){return r(a,{notation:"bin"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"bin",wordSize:i})}})}),Yv="oct",oR=["typed","format"],sR=I(Yv,oR,e=>{var{typed:t,format:r}=e;return t(Yv,{"number | BigNumber":function(a){return r(a,{notation:"oct"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"oct",wordSize:i})}})}),Zv="hex",uR=["typed","format"],lR=I(Zv,uR,e=>{var{typed:t,format:r}=e;return t(Zv,{"number | BigNumber":function(a){return r(a,{notation:"hex"})},"number | BigNumber, number | BigNumber":function(a,i){return r(a,{notation:"hex",wordSize:i})}})}),J2=/\$([\w.]+)/g,Qv="print",cR=["typed"],K2=I(Qv,cR,e=>{var{typed:t}=e;return t(Qv,{"string, Object | Array":Xv,"string, Object | Array, number | Object":Xv})});function Xv(e,t,r){return e.replace(J2,function(n,a){var i=a.split("."),o=t[i.shift()];for(o!==void 0&&o.isMatrix&&(o=o.toArray());i.length&&o!==void 0;){var s=i.shift();o=s?o[s]:o+"."}return o!==void 0?Zt(o)?o:it(o,r):n})}var e1="to",fR=["typed","matrix","concat"],mR=I(e1,fR,e=>{var{typed:t,matrix:r,concat:n}=e,a=_t({typed:t,matrix:r,concat:n});return t(e1,{"Unit, Unit | string":(i,o)=>i.to(o)},a({Ds:!0}))}),t1="toBest",dR=["typed"],hR=I(t1,dR,e=>{var{typed:t}=e;return t(t1,{Unit:r=>r.toBest(),"Unit, string":(r,n)=>r.toBest(n.split(",")),"Unit, string, Object":(r,n,a)=>r.toBest(n.split(","),a),"Unit, Array":(r,n)=>r.toBest(n),"Unit, Array, Object":(r,n,a)=>r.toBest(n,a)})}),r1="isPrime",pR=["typed"],gR=I(r1,pR,e=>{var{typed:t}=e;return t(r1,{number:function(n){if(n<=3)return n>1;if(n%2===0||n%3===0)return!1;for(var a=5;a*a<=n;a+=6)if(n%a===0||n%(a+2)===0)return!1;return!0},bigint:function(n){if(n<=3n)return n>1n;if(n%2n===0n||n%3n===0n)return!1;for(var a=5n;a*a<=n;a+=6n)if(n%a===0n||n%(a+2n)===0n)return!1;return!0},BigNumber:function(n){if(n.lte(3))return n.gt(1);if(n.mod(2).eq(0)||n.mod(3).eq(0))return!1;if(n.lt(Math.pow(2,32))){for(var a=n.toNumber(),i=5;i*i<=a;i+=6)if(a%i===0||a%(i+2)===0)return!1;return!0}function o(D,v,x){for(var g=1;!v.eq(0);)v.mod(2).eq(0)?(v=v.div(2),D=D.mul(D).mod(x)):(v=v.sub(1),g=D.mul(g).mod(x));return g}var s=n.constructor.clone({precision:n.toFixed(0).length*2});n=new s(n);for(var u=0,l=n.sub(1);l.mod(2).eq(0);)l=l.div(2),u+=1;var c=null;if(n.lt("3317044064679887385961981"))c=[2,3,5,7,11,13,17,19,23,29,31,37,41].filter(D=>D<n);else{var f=Math.min(n.toNumber()-2,Math.floor(2*Math.pow(n.toFixed(0).length*Math.log(10),2)));c=[];for(var m=2;m<=f;m+=1)c.push(f)}for(var d=0;d<c.length;d+=1){var h=c[d],p=o(n.sub(n).add(h),l,n);if(!p.eq(1)){for(var y=0,w=p;!w.eq(n.sub(1));y+=1,w=w.mul(w).mod(n))if(y===u-1)return!1}}return!0},"Array | Matrix":t.referToSelf(r=>n=>Xe(n,r))})}),vR="numeric",yR=["number","?bignumber","?fraction"],bR=I(vR,yR,e=>{var{number:t,bignumber:r,fraction:n}=e,a={string:!0,number:!0,BigNumber:!0,Fraction:!0},i={number:o=>t(o),BigNumber:r?o=>r(o):Bd,bigint:o=>BigInt(o),Fraction:n?o=>n(o):G2};return function(s){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"number",l=arguments.length>2?arguments[2]:void 0;if(l!==void 0)throw new SyntaxError("numeric() takes one or two arguments");var c=Pt(s);if(!(c in a))throw new TypeError("Cannot convert "+s+' of type "'+c+'"; valid input types are '+Object.keys(a).join(", "));if(!(u in i))throw new TypeError("Cannot convert "+s+' to type "'+u+'"; valid output types are '+Object.keys(i).join(", "));return u===c?s:i[u](s)}}),n1="divideScalar",wR=["typed","numeric"],xR=I(n1,wR,e=>{var{typed:t,numeric:r}=e;return t(n1,{"number, number":function(a,i){return a/i},"Complex, Complex":function(a,i){return a.div(i)},"BigNumber, BigNumber":function(a,i){return a.div(i)},"bigint, bigint":function(a,i){return a/i},"Fraction, Fraction":function(a,i){return a.div(i)},"Unit, number | Complex | Fraction | BigNumber | Unit":(n,a)=>n.divide(a),"number | Fraction | Complex | BigNumber, Unit":(n,a)=>a.divideInto(n)})}),a1="pow",DR=["typed","config","identity","multiply","matrix","inv","fraction","number","Complex"],NR=I(a1,DR,e=>{var{typed:t,config:r,identity:n,multiply:a,matrix:i,inv:o,number:s,fraction:u,Complex:l}=e;return t(a1,{"number, number":c,"Complex, Complex":function(h,p){return h.pow(p)},"BigNumber, BigNumber":function(h,p){return p.isInteger()||h>=0||r.predictable?h.pow(p):new l(h.toNumber(),0).pow(p.toNumber(),0)},"bigint, bigint":(d,h)=>d**h,"Fraction, Fraction":function(h,p){var y=h.pow(p);if(y!=null)return y;if(r.predictable)throw new Error("Result of pow is non-rational and cannot be expressed as a fraction");return c(h.valueOf(),p.valueOf())},"Array, number":f,"Array, BigNumber":function(h,p){return f(h,p.toNumber())},"Matrix, number":m,"Matrix, BigNumber":function(h,p){return m(h,p.toNumber())},"Unit, number | BigNumber":function(h,p){return h.pow(p)}});function c(d,h){if(r.predictable&&!ke(h)&&d<0)try{var p=u(h),y=s(p);if((h===y||Math.abs((h-y)/h)<1e-14)&&p.d%2n===1n)return(p.n%2n===0n?1:-1)*Math.pow(-d,h)}catch{}return r.predictable&&(d<-1&&h===1/0||d>-1&&d<0&&h===-1/0)?NaN:ke(h)||d>=0||r.predictable?Xx(d,h):d*d<1&&h===1/0||d*d>1&&h===-1/0?0:new l(d,0).pow(h,0)}function f(d,h){if(!ke(h))throw new TypeError("For A^b, b must be an integer (value is "+h+")");var p=Je(d);if(p.length!==2)throw new Error("For A^b, A must be 2 dimensional (A has "+p.length+" dimensions)");if(p[0]!==p[1])throw new Error("For A^b, A must be square (size is "+p[0]+"x"+p[1]+")");if(h<0)try{return f(o(d),-h)}catch(D){throw D.message==="Cannot calculate inverse, determinant is zero"?new TypeError("For A^b, when A is not invertible, b must be a positive integer (value is "+h+")"):D}for(var y=n(p[0]).valueOf(),w=d;h>=1;)(h&1)===1&&(y=a(w,y)),h>>=1,w=a(w,w);return y}function m(d,h){return i(f(d.valueOf(),h))}}),To="Number of decimals in function round must be an integer",i1="round",AR=["typed","config","matrix","equalScalar","zeros","BigNumber","DenseMatrix"],CR=I(i1,AR,e=>{var{typed:t,config:r,matrix:n,equalScalar:a,zeros:i,BigNumber:o,DenseMatrix:s}=e,u=Pr({typed:t,equalScalar:a}),l=fr({typed:t,DenseMatrix:s}),c=_n({typed:t});function f(m){return Math.abs(ou(m).exponent)}return t(i1,{number:function(d){var h=Cs(d,f(r.relTol)),p=Cr(d,h,r.relTol,r.absTol)?h:d;return Cs(p)},"number, number":function(d,h){var p=f(r.relTol);if(h>=p)return Cs(d,h);var y=Cs(d,p),w=Cr(d,y,r.relTol,r.absTol)?y:d;return Cs(w,h)},"number, BigNumber":function(d,h){if(!h.isInteger())throw new TypeError(To);return new o(d).toDecimalPlaces(h.toNumber())},Complex:function(d){return d.round()},"Complex, number":function(d,h){if(h%1)throw new TypeError(To);return d.round(h)},"Complex, BigNumber":function(d,h){if(!h.isInteger())throw new TypeError(To);var p=h.toNumber();return d.round(p)},BigNumber:function(d){var h=new o(d).toDecimalPlaces(f(r.relTol)),p=Bn(d,h,r.relTol,r.absTol)?h:d;return p.toDecimalPlaces(0)},"BigNumber, BigNumber":function(d,h){if(!h.isInteger())throw new TypeError(To);var p=f(r.relTol);if(h>=p)return d.toDecimalPlaces(h.toNumber());var y=d.toDecimalPlaces(p),w=Bn(d,y,r.relTol,r.absTol)?y:d;return w.toDecimalPlaces(h.toNumber())},bigint:m=>m,"bigint, number":(m,d)=>m,"bigint, BigNumber":(m,d)=>m,Fraction:function(d){return d.round()},"Fraction, number":function(d,h){if(h%1)throw new TypeError(To);return d.round(h)},"Fraction, BigNumber":function(d,h){if(!h.isInteger())throw new TypeError(To);return d.round(h.toNumber())},"Unit, number, Unit":t.referToSelf(m=>function(d,h,p){var y=d.toNumeric(p);return p.multiply(m(y,h))}),"Unit, BigNumber, Unit":t.referToSelf(m=>(d,h,p)=>m(d,h.toNumber(),p)),"Array | Matrix, number | BigNumber, Unit":t.referToSelf(m=>(d,h,p)=>Xe(d,y=>m(y,h,p),!0)),"Array | Matrix | Unit, Unit":t.referToSelf(m=>(d,h)=>m(d,0,h)),"Array | Matrix":t.referToSelf(m=>d=>Xe(d,m,!0)),"SparseMatrix, number | BigNumber":t.referToSelf(m=>(d,h)=>u(d,h,m,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(m=>(d,h)=>c(d,h,m,!1)),"Array, number | BigNumber":t.referToSelf(m=>(d,h)=>c(n(d),h,m,!1).valueOf()),"number | Complex | BigNumber | Fraction, SparseMatrix":t.referToSelf(m=>(d,h)=>a(d,0)?i(h.size(),h.storage()):l(h,d,m,!0)),"number | Complex | BigNumber | Fraction, DenseMatrix":t.referToSelf(m=>(d,h)=>a(d,0)?i(h.size(),h.storage()):c(h,d,m,!0)),"number | Complex | BigNumber | Fraction, Array":t.referToSelf(m=>(d,h)=>c(n(h),d,m,!0).valueOf())})}),o1="log",ER=["config","typed","typeOf","divideScalar","Complex"],SR=Math.log(16),MR=I(o1,ER,e=>{var{typed:t,typeOf:r,config:n,divideScalar:a,Complex:i}=e;function o(u){return u.log()}function s(u){return o(new i(u,0))}return t(o1,{number:function(l){return l>=0||n.predictable?y0(l):s(l)},bigint:Od(SR,y0,n,s),Complex:o,BigNumber:function(l){return!l.isNegative()||n.predictable?l.ln():s(l.toNumber())},"any, any":t.referToSelf(u=>(l,c)=>{if(r(l)==="Fraction"&&r(c)==="Fraction"){var f=l.log(c);if(f!==null)return f}return a(u(l),u(c))})})}),s1="log1p",TR=["typed","config","divideScalar","log","Complex"],FR=I(s1,TR,e=>{var{typed:t,config:r,divideScalar:n,log:a,Complex:i}=e;return t(s1,{number:function(u){return u>=-1||r.predictable?b8(u):o(new i(u,0))},Complex:o,BigNumber:function(u){var l=u.plus(1);return!l.isNegative()||r.predictable?l.ln():o(new i(u.toNumber(),0))},"Array | Matrix":t.referToSelf(s=>u=>Xe(u,s)),"any, any":t.referToSelf(s=>(u,l)=>n(s(u),a(l)))});function o(s){var u=s.re+1;return new i(Math.log(Math.sqrt(u*u+s.im*s.im)),Math.atan2(s.im,u))}}),u1="nthRoots",PR=["config","typed","divideScalar","Complex"],kR=I(u1,PR,e=>{var{typed:t,config:r,divideScalar:n,Complex:a}=e,i=[function(u){return new a(u,0)},function(u){return new a(0,u)},function(u){return new a(-u,0)},function(u){return new a(0,-u)}];function o(s,u){if(u<0)throw new Error("Root must be greater than zero");if(u===0)throw new Error("Root must be non-zero");if(u%1!==0)throw new Error("Root must be an integer");if(s===0||s.abs()===0)return[new a(0,0)];var l=typeof s=="number",c;(l||s.re===0||s.im===0)&&(l?c=2*+(s<0):s.im===0?c=2*+(s.re<0):c=2*+(s.im<0)+1);for(var f=s.arg(),m=s.abs(),d=[],h=Math.pow(m,1/u),p=0;p<u;p++){var y=(c+4*p)/u;if(y===Math.round(y)){d.push(i[y%4](h));continue}d.push(new a({r:h,phi:(f+2*Math.PI*p)/u}))}return d}return t(u1,{Complex:function(u){return o(u,2)},"Complex, number":o})}),l1="dotPow",OR=["typed","equalScalar","matrix","pow","DenseMatrix","concat","SparseMatrix"],$R=I(l1,OR,e=>{var{typed:t,equalScalar:r,matrix:n,pow:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=qr({typed:t}),l=da({typed:t,SparseMatrix:s}),c=Pr({typed:t,equalScalar:r}),f=fr({typed:t,DenseMatrix:i}),m=_t({typed:t,matrix:n,concat:o}),d={};for(var h in a.signatures)Object.prototype.hasOwnProperty.call(a.signatures,h)&&!h.includes("Matrix")&&!h.includes("Array")&&(d[h]=a.signatures[h]);var p=t(d);return t(l1,m({elop:p,SS:l,DS:u,Ss:c,sS:f}))}),c1="dotDivide",BR=["typed","matrix","equalScalar","divideScalar","DenseMatrix","concat","SparseMatrix"],_R=I(c1,BR,e=>{var{typed:t,matrix:r,equalScalar:n,divideScalar:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=ta({typed:t,equalScalar:n}),l=qr({typed:t}),c=da({typed:t,SparseMatrix:s}),f=Pr({typed:t,equalScalar:n}),m=fr({typed:t,DenseMatrix:i}),d=_t({typed:t,matrix:r,concat:o});return t(c1,d({elop:a,SS:c,DS:l,SD:u,Ss:f,sS:m}))});function su(e){var{DenseMatrix:t}=e;return function(n,a,i){var o=n.size();if(o.length!==2)throw new RangeError("Matrix must be two dimensional (size: "+it(o)+")");var s=o[0],u=o[1];if(s!==u)throw new RangeError("Matrix must be square (size: "+it(o)+")");var l=[];if(Le(a)){var c=a.size(),f=a._data;if(c.length===1){if(c[0]!==s)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var m=0;m<s;m++)l[m]=[f[m]];return new t({data:l,size:[s,1],datatype:a._datatype})}if(c.length===2){if(c[0]!==s||c[1]!==1)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");if(Ul(a)){if(i){l=[];for(var d=0;d<s;d++)l[d]=[f[d][0]];return new t({data:l,size:[s,1],datatype:a._datatype})}return a}if(Ui(a)){for(var h=0;h<s;h++)l[h]=[0];for(var p=a._values,y=a._index,w=a._ptr,D=w[1],v=w[0];v<D;v++){var x=y[v];l[x][0]=p[v]}return new t({data:l,size:[s,1],datatype:a._datatype})}}throw new RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}if(Tt(a)){var g=Je(a);if(g.length===1){if(g[0]!==s)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var b=0;b<s;b++)l[b]=[a[b]];return new t({data:l,size:[s,1]})}if(g.length===2){if(g[0]!==s||g[1]!==1)throw new RangeError("Dimension mismatch. Matrix columns must match vector length.");for(var C=0;C<s;C++)l[C]=[a[C][0]];return new t({data:l,size:[s,1]})}throw new RangeError("Dimension mismatch. The right side has to be either 1- or 2-dimensional vector.")}}}var f1="lsolve",IR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],zR=I(f1,IR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=su({DenseMatrix:s});return t(f1,{"SparseMatrix, Array | Matrix":function(m,d){return c(m,d)},"DenseMatrix, Array | Matrix":function(m,d){return l(m,d)},"Array, Array | Matrix":function(m,d){var h=r(m),p=l(h,d);return p.valueOf()}});function l(f,m){m=u(f,m,!0);for(var d=m._data,h=f._size[0],p=f._size[1],y=[],w=f._data,D=0;D<p;D++){var v=d[D][0]||0,x=void 0;if(o(v,0))x=0;else{var g=w[D][D];if(o(g,0))throw new Error("Linear system cannot be solved since matrix is singular");x=n(v,g);for(var b=D+1;b<h;b++)d[b]=[i(d[b][0]||0,a(x,w[b][D]))]}y[D]=[x]}return new s({data:y,size:[h,1]})}function c(f,m){m=u(f,m,!0);for(var d=m._data,h=f._size[0],p=f._size[1],y=f._values,w=f._index,D=f._ptr,v=[],x=0;x<p;x++){var g=d[x][0]||0;if(o(g,0))v[x]=[0];else{for(var b=0,C=[],N=[],A=D[x],E=D[x+1],S=A;S<E;S++){var F=w[S];F===x?b=y[S]:F>x&&(C.push(y[S]),N.push(F))}if(o(b,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var k=n(g,b),$=0,R=N.length;$<R;$++){var M=N[$];d[M]=[i(d[M][0]||0,a(k,C[$]))]}v[x]=[k]}}return new s({data:v,size:[h,1]})}}),m1="usolve",jR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],qR=I(m1,jR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=su({DenseMatrix:s});return t(m1,{"SparseMatrix, Array | Matrix":function(m,d){return c(m,d)},"DenseMatrix, Array | Matrix":function(m,d){return l(m,d)},"Array, Array | Matrix":function(m,d){var h=r(m),p=l(h,d);return p.valueOf()}});function l(f,m){m=u(f,m,!0);for(var d=m._data,h=f._size[0],p=f._size[1],y=[],w=f._data,D=p-1;D>=0;D--){var v=d[D][0]||0,x=void 0;if(o(v,0))x=0;else{var g=w[D][D];if(o(g,0))throw new Error("Linear system cannot be solved since matrix is singular");x=n(v,g);for(var b=D-1;b>=0;b--)d[b]=[i(d[b][0]||0,a(x,w[b][D]))]}y[D]=[x]}return new s({data:y,size:[h,1]})}function c(f,m){m=u(f,m,!0);for(var d=m._data,h=f._size[0],p=f._size[1],y=f._values,w=f._index,D=f._ptr,v=[],x=p-1;x>=0;x--){var g=d[x][0]||0;if(o(g,0))v[x]=[0];else{for(var b=0,C=[],N=[],A=D[x],E=D[x+1],S=E-1;S>=A;S--){var F=w[S];F===x?b=y[S]:F<x&&(C.push(y[S]),N.push(F))}if(o(b,0))throw new Error("Linear system cannot be solved since matrix is singular");for(var k=n(g,b),$=0,R=N.length;$<R;$++){var M=N[$];d[M]=[i(d[M][0],a(k,C[$]))]}v[x]=[k]}}return new s({data:v,size:[h,1]})}}),d1="lsolveAll",RR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],LR=I(d1,RR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=su({DenseMatrix:s});return t(d1,{"SparseMatrix, Array | Matrix":function(m,d){return c(m,d)},"DenseMatrix, Array | Matrix":function(m,d){return l(m,d)},"Array, Array | Matrix":function(m,d){var h=r(m),p=l(h,d);return p.map(y=>y.valueOf())}});function l(f,m){for(var d=[u(f,m,!0)._data.map(N=>N[0])],h=f._data,p=f._size[0],y=f._size[1],w=0;w<y;w++)for(var D=d.length,v=0;v<D;v++){var x=d[v];if(o(h[w][w],0))if(o(x[w],0)){if(v===0){var b=[...x];b[w]=1;for(var C=w+1;C<y;C++)b[C]=i(b[C],h[C][w]);d.push(b)}}else{if(v===0)return[];d.splice(v,1),v-=1,D-=1}else{x[w]=n(x[w],h[w][w]);for(var g=w+1;g<y;g++)x[g]=i(x[g],a(x[w],h[g][w]))}}return d.map(N=>new s({data:N.map(A=>[A]),size:[p,1]}))}function c(f,m){for(var d=[u(f,m,!0)._data.map(G=>G[0])],h=f._size[0],p=f._size[1],y=f._values,w=f._index,D=f._ptr,v=0;v<p;v++)for(var x=d.length,g=0;g<x;g++){for(var b=d[g],C=[],N=[],A=D[v],E=D[v+1],S=0,F=A;F<E;F++){var k=w[F];k===v?S=y[F]:k>v&&(C.push(y[F]),N.push(k))}if(o(S,0))if(o(b[v],0)){if(g===0){var B=[...b];B[v]=1;for(var L=0,j=N.length;L<j;L++){var Z=N[L];B[Z]=i(B[Z],C[L])}d.push(B)}}else{if(g===0)return[];d.splice(g,1),g-=1,x-=1}else{b[v]=n(b[v],S);for(var $=0,R=N.length;$<R;$++){var M=N[$];b[M]=i(b[M],a(b[v],C[$]))}}}return d.map(G=>new s({data:G.map(V=>[V]),size:[h,1]}))}}),h1="usolveAll",HR=["typed","matrix","divideScalar","multiplyScalar","subtractScalar","equalScalar","DenseMatrix"],GR=I(h1,HR,e=>{var{typed:t,matrix:r,divideScalar:n,multiplyScalar:a,subtractScalar:i,equalScalar:o,DenseMatrix:s}=e,u=su({DenseMatrix:s});return t(h1,{"SparseMatrix, Array | Matrix":function(m,d){return c(m,d)},"DenseMatrix, Array | Matrix":function(m,d){return l(m,d)},"Array, Array | Matrix":function(m,d){var h=r(m),p=l(h,d);return p.map(y=>y.valueOf())}});function l(f,m){for(var d=[u(f,m,!0)._data.map(N=>N[0])],h=f._data,p=f._size[0],y=f._size[1],w=y-1;w>=0;w--)for(var D=d.length,v=0;v<D;v++){var x=d[v];if(o(h[w][w],0))if(o(x[w],0)){if(v===0){var b=[...x];b[w]=1;for(var C=w-1;C>=0;C--)b[C]=i(b[C],h[C][w]);d.push(b)}}else{if(v===0)return[];d.splice(v,1),v-=1,D-=1}else{x[w]=n(x[w],h[w][w]);for(var g=w-1;g>=0;g--)x[g]=i(x[g],a(x[w],h[g][w]))}}return d.map(N=>new s({data:N.map(A=>[A]),size:[p,1]}))}function c(f,m){for(var d=[u(f,m,!0)._data.map(G=>G[0])],h=f._size[0],p=f._size[1],y=f._values,w=f._index,D=f._ptr,v=p-1;v>=0;v--)for(var x=d.length,g=0;g<x;g++){for(var b=d[g],C=[],N=[],A=D[v],E=D[v+1],S=0,F=E-1;F>=A;F--){var k=w[F];k===v?S=y[F]:k<v&&(C.push(y[F]),N.push(k))}if(o(S,0))if(o(b[v],0)){if(g===0){var B=[...b];B[v]=1;for(var L=0,j=N.length;L<j;L++){var Z=N[L];B[Z]=i(B[Z],C[L])}d.push(B)}}else{if(g===0)return[];d.splice(g,1),g-=1,x-=1}else{b[v]=n(b[v],S);for(var $=0,R=N.length;$<R;$++){var M=N[$];b[M]=i(b[M],a(b[v],C[$]))}}}return d.map(G=>new s({data:G.map(V=>[V]),size:[h,1]}))}}),VR="matAlgo08xS0Sid",UR=["typed","equalScalar"],_d=I(VR,UR,e=>{var{typed:t,equalScalar:r}=e;return function(a,i,o){var s=a._values,u=a._index,l=a._ptr,c=a._size,f=a._datatype||a._data===void 0?a._datatype:a.getDataType(),m=i._values,d=i._index,h=i._ptr,p=i._size,y=i._datatype||i._data===void 0?i._datatype:i.getDataType();if(c.length!==p.length)throw new at(c.length,p.length);if(c[0]!==p[0]||c[1]!==p[1])throw new RangeError("Dimension mismatch. Matrix A ("+c+") must match Matrix B ("+p+")");if(!s||!m)throw new Error("Cannot perform operation on Pattern Sparse Matrices");var w=c[0],D=c[1],v,x=r,g=0,b=o;typeof f=="string"&&f===y&&f!=="mixed"&&(v=f,x=t.find(r,[v,v]),g=t.convert(0,v),b=t.find(o,[v,v]));for(var C=[],N=[],A=[],E=[],S=[],F,k,$,R,M=0;M<D;M++){A[M]=N.length;var B=M+1;for(k=l[M],$=l[M+1],F=k;F<$;F++)R=u[F],S[R]=B,E[R]=s[F],N.push(R);for(k=h[M],$=h[M+1],F=k;F<$;F++)R=d[F],S[R]===B&&(E[R]=b(E[R],m[F]));for(F=A[M];F<N.length;){R=N[F];var L=E[R];x(L,g)?N.splice(F,1):(C.push(L),F++)}}return A[D]=N.length,a.createSparseMatrix({values:C,index:N,ptr:A,size:[w,D],datatype:f===a._datatype&&y===i._datatype?v:void 0})}}),Id=I("useMatrixForArrayScalar",["typed","matrix"],e=>{var{typed:t,matrix:r}=e;return{"Array, number":t.referTo("DenseMatrix, number",n=>(a,i)=>n(r(a),i).valueOf()),"Array, BigNumber":t.referTo("DenseMatrix, BigNumber",n=>(a,i)=>n(r(a),i).valueOf()),"number, Array":t.referTo("number, DenseMatrix",n=>(a,i)=>n(a,r(i)).valueOf()),"BigNumber, Array":t.referTo("BigNumber, DenseMatrix",n=>(a,i)=>n(a,r(i)).valueOf())}}),p1="leftShift",WR=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],JR=I(p1,WR,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,s=wi({typed:t}),u=ta({typed:t,equalScalar:n}),l=_d({typed:t,equalScalar:n}),c=ao({typed:t,DenseMatrix:i}),f=Pr({typed:t,equalScalar:n}),m=_n({typed:t}),d=_t({typed:t,matrix:r,concat:o}),h=Id({typed:t,matrix:r});return t(p1,{"number, number":a2,"BigNumber, BigNumber":dj,"bigint, bigint":(p,y)=>p<<y,"SparseMatrix, number | BigNumber":t.referToSelf(p=>(y,w)=>n(w,0)?y.clone():f(y,w,p,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(p=>(y,w)=>n(w,0)?y.clone():m(y,w,p,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(p=>(y,w)=>n(y,0)?a(w.size(),w.storage()):c(w,y,p,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(p=>(y,w)=>n(y,0)?a(w.size(),w.storage()):m(w,y,p,!0))},h,d({SS:l,DS:s,SD:u}))}),g1="rightArithShift",KR=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],YR=I(g1,KR,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,s=wi({typed:t}),u=ta({typed:t,equalScalar:n}),l=_d({typed:t,equalScalar:n}),c=ao({typed:t,DenseMatrix:i}),f=Pr({typed:t,equalScalar:n}),m=_n({typed:t}),d=_t({typed:t,matrix:r,concat:o}),h=Id({typed:t,matrix:r});return t(g1,{"number, number":i2,"BigNumber, BigNumber":hj,"bigint, bigint":(p,y)=>p>>y,"SparseMatrix, number | BigNumber":t.referToSelf(p=>(y,w)=>n(w,0)?y.clone():f(y,w,p,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(p=>(y,w)=>n(w,0)?y.clone():m(y,w,p,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(p=>(y,w)=>n(y,0)?a(w.size(),w.storage()):c(w,y,p,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(p=>(y,w)=>n(y,0)?a(w.size(),w.storage()):m(w,y,p,!0))},h,d({SS:l,DS:s,SD:u}))}),v1="rightLogShift",ZR=["typed","matrix","equalScalar","zeros","DenseMatrix","concat"],QR=I(v1,ZR,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,DenseMatrix:i,concat:o}=e,s=wi({typed:t}),u=ta({typed:t,equalScalar:n}),l=_d({typed:t,equalScalar:n}),c=ao({typed:t,DenseMatrix:i}),f=Pr({typed:t,equalScalar:n}),m=_n({typed:t}),d=_t({typed:t,matrix:r,concat:o}),h=Id({typed:t,matrix:r});return t(v1,{"number, number":o2,"SparseMatrix, number | BigNumber":t.referToSelf(p=>(y,w)=>n(w,0)?y.clone():f(y,w,p,!1)),"DenseMatrix, number | BigNumber":t.referToSelf(p=>(y,w)=>n(w,0)?y.clone():m(y,w,p,!1)),"number | BigNumber, SparseMatrix":t.referToSelf(p=>(y,w)=>n(y,0)?a(w.size(),w.storage()):c(w,y,p,!0)),"number | BigNumber, DenseMatrix":t.referToSelf(p=>(y,w)=>n(y,0)?a(w.size(),w.storage()):m(w,y,p,!0))},h,d({SS:l,DS:s,SD:u}))}),y1="and",XR=["typed","matrix","equalScalar","zeros","not","concat"],Y2=I(y1,XR,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,s=ta({typed:t,equalScalar:n}),u=Oc({typed:t,equalScalar:n}),l=Pr({typed:t,equalScalar:n}),c=_n({typed:t}),f=_t({typed:t,matrix:r,concat:o});return t(y1,{"number, number":Km,"Complex, Complex":function(d,h){return(d.re!==0||d.im!==0)&&(h.re!==0||h.im!==0)},"BigNumber, BigNumber":function(d,h){return!d.isZero()&&!h.isZero()&&!d.isNaN()&&!h.isNaN()},"bigint, bigint":Km,"Unit, Unit":t.referToSelf(m=>(d,h)=>m(d.value||0,h.value||0)),"SparseMatrix, any":t.referToSelf(m=>(d,h)=>i(h)?a(d.size(),d.storage()):l(d,h,m,!1)),"DenseMatrix, any":t.referToSelf(m=>(d,h)=>i(h)?a(d.size(),d.storage()):c(d,h,m,!1)),"any, SparseMatrix":t.referToSelf(m=>(d,h)=>i(d)?a(d.size(),d.storage()):l(h,d,m,!0)),"any, DenseMatrix":t.referToSelf(m=>(d,h)=>i(d)?a(d.size(),d.storage()):c(h,d,m,!0)),"Array, any":t.referToSelf(m=>(d,h)=>m(r(d),h).valueOf()),"any, Array":t.referToSelf(m=>(d,h)=>m(d,r(h)).valueOf())},f({SS:u,DS:s}))}),uc="compare",eL=["typed","config","matrix","equalScalar","BigNumber","Fraction","DenseMatrix","concat"],tL=I(uc,eL,e=>{var{typed:t,config:r,equalScalar:n,matrix:a,BigNumber:i,Fraction:o,DenseMatrix:s,concat:u}=e,l=qr({typed:t}),c=kc({typed:t,equalScalar:n}),f=fr({typed:t,DenseMatrix:s}),m=_t({typed:t,matrix:a,concat:u}),d=os({typed:t});return t(uc,rL({typed:t,config:r}),{"boolean, boolean":function(p,y){return p===y?0:p>y?1:-1},"BigNumber, BigNumber":function(p,y){return Bn(p,y,r.relTol,r.absTol)?new i(0):new i(p.cmp(y))},"bigint, bigint":function(p,y){return p===y?0n:p>y?1n:-1n},"Fraction, Fraction":function(p,y){return new o(p.compare(y))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},d,m({SS:c,DS:l,Ss:f}))}),rL=I(uc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(uc,{"number, number":function(a,i){return Cr(a,i,r.relTol,r.absTol)?0:a>i?1:-1}})}),Rf,b1;function nL(){return b1||(b1=1,Rf=function e(t,r){var n=/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,a=/(^[ ]*|[ ]*$)/g,i=/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,o=/^0x[0-9a-f]+$/i,s=/^0/,u=function(v){return e.insensitive&&(""+v).toLowerCase()||""+v},l=u(t).replace(a,"")||"",c=u(r).replace(a,"")||"",f=l.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),m=c.replace(n,"\0$1\0").replace(/\0$/,"").replace(/^\0/,"").split("\0"),d=parseInt(l.match(o),16)||f.length!==1&&l.match(i)&&Date.parse(l),h=parseInt(c.match(o),16)||d&&c.match(i)&&Date.parse(c)||null,p,y;if(h){if(d<h)return-1;if(d>h)return 1}for(var w=0,D=Math.max(f.length,m.length);w<D;w++){if(p=!(f[w]||"").match(s)&&parseFloat(f[w])||f[w]||0,y=!(m[w]||"").match(s)&&parseFloat(m[w])||m[w]||0,isNaN(p)!==isNaN(y))return isNaN(p)?1:-1;if(typeof p!=typeof y&&(p+="",y+=""),p<y)return-1;if(p>y)return 1}return 0}),Rf}var aL=nL();const Fo=Ys.getDefaultExportFromCjs(aL);var w1="compareNatural",iL=["typed","compare"],oL=I(w1,iL,e=>{var{typed:t,compare:r}=e,n=r.signatures["boolean,boolean"];return t(w1,{"any, any":a});function a(u,l){var c=Pt(u),f=Pt(l),m;if((c==="number"||c==="BigNumber"||c==="Fraction")&&(f==="number"||f==="BigNumber"||f==="Fraction"))return m=r(u,l),m.toString()!=="0"?m>0?1:-1:Fo(c,f);var d=["Array","DenseMatrix","SparseMatrix"];if(d.includes(c)||d.includes(f))return m=i(a,u,l),m!==0?m:Fo(c,f);if(c!==f)return Fo(c,f);if(c==="Complex")return sL(u,l);if(c==="Unit")return u.equalBase(l)?a(u.value,l.value):o(a,u.formatUnits(),l.formatUnits());if(c==="boolean")return n(u,l);if(c==="string")return Fo(u,l);if(c==="Object")return s(a,u,l);if(c==="null"||c==="undefined")return 0;throw new TypeError('Unsupported type of value "'+c+'"')}function i(u,l,c){return Ui(l)&&Ui(c)?o(u,l.toJSON().values,c.toJSON().values):Ui(l)?i(u,l.toArray(),c):Ui(c)?i(u,l,c.toArray()):Ul(l)?i(u,l.toJSON().data,c):Ul(c)?i(u,l,c.toJSON().data):Array.isArray(l)?Array.isArray(c)?o(u,l,c):i(u,l,[c]):i(u,[l],c)}function o(u,l,c){for(var f=0,m=Math.min(l.length,c.length);f<m;f++){var d=u(l[f],c[f]);if(d!==0)return d}return l.length>c.length?1:l.length<c.length?-1:0}function s(u,l,c){var f=Object.keys(l),m=Object.keys(c);f.sort(Fo),m.sort(Fo);var d=o(u,f,m);if(d!==0)return d;for(var h=0;h<f.length;h++){var p=u(l[f[h]],c[m[h]]);if(p!==0)return p}return 0}});function sL(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0}var x1="compareText",uL=["typed","matrix","concat"];Lm.signature="any, any";var lL=I(x1,uL,e=>{var{typed:t,matrix:r,concat:n}=e,a=_t({typed:t,matrix:r,concat:n});return t(x1,Lm,a({elop:Lm,Ds:!0}))}),lc="equal",cL=["typed","matrix","equalScalar","DenseMatrix","SparseMatrix"],fL=I(lc,cL,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i,SparseMatrix:o}=e,s=qr({typed:t}),u=da({typed:t,SparseMatrix:o}),l=fr({typed:t,DenseMatrix:a}),c=_t({typed:t,matrix:r});return t(lc,mL({typed:t,equalScalar:n}),c({elop:n,SS:u,DS:s,Ss:l}))}),mL=I(lc,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(lc,{"any, any":function(a,i){return a===null?i===null:i===null?a===null:a===void 0?i===void 0:i===void 0?a===void 0:r(a,i)}})}),D1="equalText",dL=["typed","compareText","isZero"],hL=I(D1,dL,e=>{var{typed:t,compareText:r,isZero:n}=e;return t(D1,{"any, any":function(i,o){return n(r(i,o))}})}),cc="smaller",pL=["typed","config","bignumber","matrix","DenseMatrix","concat","SparseMatrix"],gL=I(cc,pL,e=>{var{typed:t,config:r,bignumber:n,matrix:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=qr({typed:t}),l=da({typed:t,SparseMatrix:s}),c=fr({typed:t,DenseMatrix:i}),f=_t({typed:t,matrix:a,concat:o}),m=os({typed:t});function d(h,p){return h.lt(p)&&!Bn(h,p,r.relTol,r.absTol)}return t(cc,vL({typed:t,config:r}),{"boolean, boolean":(h,p)=>h<p,"BigNumber, BigNumber":d,"bigint, bigint":(h,p)=>h<p,"Fraction, Fraction":(h,p)=>h.compare(p)===-1,"Fraction, BigNumber":function(p,y){return d(n(p),y)},"BigNumber, Fraction":function(p,y){return d(p,n(y))},"Complex, Complex":function(p,y){throw new TypeError("No ordering relation is defined for complex numbers")}},m,f({SS:l,DS:u,Ss:c}))}),vL=I(cc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(cc,{"number, number":function(a,i){return a<i&&!Cr(a,i,r.relTol,r.absTol)}})}),fc="smallerEq",yL=["typed","config","matrix","DenseMatrix","concat","SparseMatrix"],bL=I(fc,yL,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i,SparseMatrix:o}=e,s=qr({typed:t}),u=da({typed:t,SparseMatrix:o}),l=fr({typed:t,DenseMatrix:a}),c=_t({typed:t,matrix:n,concat:i}),f=os({typed:t});return t(fc,wL({typed:t,config:r}),{"boolean, boolean":(m,d)=>m<=d,"BigNumber, BigNumber":function(d,h){return d.lte(h)||Bn(d,h,r.relTol,r.absTol)},"bigint, bigint":(m,d)=>m<=d,"Fraction, Fraction":(m,d)=>m.compare(d)!==1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},f,c({SS:u,DS:s,Ss:l}))}),wL=I(fc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(fc,{"number, number":function(a,i){return a<=i||Cr(a,i,r.relTol,r.absTol)}})}),mc="larger",xL=["typed","config","bignumber","matrix","DenseMatrix","concat","SparseMatrix"],DL=I(mc,xL,e=>{var{typed:t,config:r,bignumber:n,matrix:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=qr({typed:t}),l=da({typed:t,SparseMatrix:s}),c=fr({typed:t,DenseMatrix:i}),f=_t({typed:t,matrix:a,concat:o}),m=os({typed:t});function d(h,p){return h.gt(p)&&!Bn(h,p,r.relTol,r.absTol)}return t(mc,NL({typed:t,config:r}),{"boolean, boolean":(h,p)=>h>p,"BigNumber, BigNumber":d,"bigint, bigint":(h,p)=>h>p,"Fraction, Fraction":(h,p)=>h.compare(p)===1,"Fraction, BigNumber":function(p,y){return d(n(p),y)},"BigNumber, Fraction":function(p,y){return d(p,n(y))},"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},m,f({SS:l,DS:u,Ss:c}))}),NL=I(mc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(mc,{"number, number":function(a,i){return a>i&&!Cr(a,i,r.relTol,r.absTol)}})}),dc="largerEq",AL=["typed","config","matrix","DenseMatrix","concat","SparseMatrix"],CL=I(dc,AL,e=>{var{typed:t,config:r,matrix:n,DenseMatrix:a,concat:i,SparseMatrix:o}=e,s=qr({typed:t}),u=da({typed:t,SparseMatrix:o}),l=fr({typed:t,DenseMatrix:a}),c=_t({typed:t,matrix:n,concat:i}),f=os({typed:t});return t(dc,EL({typed:t,config:r}),{"boolean, boolean":(m,d)=>m>=d,"BigNumber, BigNumber":function(d,h){return d.gte(h)||Bn(d,h,r.relTol,r.absTol)},"bigint, bigint":function(d,h){return d>=h},"Fraction, Fraction":(m,d)=>m.compare(d)!==-1,"Complex, Complex":function(){throw new TypeError("No ordering relation is defined for complex numbers")}},f,c({SS:u,DS:s,Ss:l}))}),EL=I(dc,["typed","config"],e=>{var{typed:t,config:r}=e;return t(dc,{"number, number":function(a,i){return a>=i||Cr(a,i,r.relTol,r.absTol)}})}),N1="deepEqual",SL=["typed","equal"],ML=I(N1,SL,e=>{var{typed:t,equal:r}=e;return t(N1,{"any, any":function(i,o){return n(i.valueOf(),o.valueOf())}});function n(a,i){if(Array.isArray(a))if(Array.isArray(i)){var o=a.length;if(o!==i.length)return!1;for(var s=0;s<o;s++)if(!n(a[s],i[s]))return!1;return!0}else return!1;else return Array.isArray(i)?!1:r(a,i)}}),hc="unequal",TL=["typed","config","equalScalar","matrix","DenseMatrix","concat","SparseMatrix"],FL=I(hc,TL,e=>{var{typed:t,config:r,equalScalar:n,matrix:a,DenseMatrix:i,concat:o,SparseMatrix:s}=e,u=qr({typed:t}),l=da({typed:t,SparseMatrix:s}),c=fr({typed:t,DenseMatrix:i}),f=_t({typed:t,matrix:a,concat:o});return t(hc,PL({typed:t,equalScalar:n}),f({elop:m,SS:l,DS:u,Ss:c}));function m(d,h){return!n(d,h)}}),PL=I(hc,["typed","equalScalar"],e=>{var{typed:t,equalScalar:r}=e;return t(hc,{"any, any":function(a,i){return a===null?i!==null:i===null?a!==null:a===void 0?i!==void 0:i===void 0?a!==void 0:!r(a,i)}})}),A1="partitionSelect",kL=["typed","isNumeric","isNaN","compare"],OL=I(A1,kL,e=>{var{typed:t,isNumeric:r,isNaN:n,compare:a}=e,i=a,o=(l,c)=>-a(l,c);return t(A1,{"Array | Matrix, number":function(c,f){return s(c,f,i)},"Array | Matrix, number, string":function(c,f,m){if(m==="asc")return s(c,f,i);if(m==="desc")return s(c,f,o);throw new Error('Compare string must be "asc" or "desc"')},"Array | Matrix, number, function":s});function s(l,c,f){if(!ke(c)||c<0)throw new Error("k must be a non-negative integer");if(Le(l)){var m=l.size();if(m.length>1)throw new Error("Only one dimensional matrices supported");return u(l.valueOf(),c,f)}if(Array.isArray(l))return u(l,c,f)}function u(l,c,f){if(c>=l.length)throw new Error("k out of bounds");for(var m=0;m<l.length;m++)if(r(l[m])&&n(l[m]))return l[m];for(var d=0,h=l.length-1;d<h;){for(var p=d,y=h,w=l[Math.floor(Math.random()*(h-d+1))+d];p<y;)if(f(l[p],w)>=0){var D=l[y];l[y]=l[p],l[p]=D,--y}else++p;f(l[p],w)>0&&--p,c<=p?h=p:d=p+1}return l[c]}}),C1="sort",$L=["typed","matrix","compare","compareNatural"],BL=I(C1,$L,e=>{var{typed:t,matrix:r,compare:n,compareNatural:a}=e,i=n,o=(c,f)=>-n(c,f);return t(C1,{Array:function(f){return u(f),f.sort(i)},Matrix:function(f){return l(f),r(f.toArray().sort(i),f.storage())},"Array, function":function(f,m){return u(f),f.sort(m)},"Matrix, function":function(f,m){return l(f),r(f.toArray().sort(m),f.storage())},"Array, string":function(f,m){return u(f),f.sort(s(m))},"Matrix, string":function(f,m){return l(f),r(f.toArray().sort(s(m)),f.storage())}});function s(c){if(c==="asc")return i;if(c==="desc")return o;if(c==="natural")return a;throw new Error('String "asc", "desc", or "natural" expected')}function u(c){if(Je(c).length!==1)throw new Error("One dimensional array expected")}function l(c){if(c.size().length!==1)throw new Error("One dimensional matrix expected")}}),E1="max",_L=["typed","config","numeric","larger","isNaN"],Z2=I(E1,_L,e=>{var{typed:t,config:r,numeric:n,larger:a,isNaN:i}=e;return t(E1,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(l,c){return Pc(l,c.valueOf(),o)},"...":function(l){if(ns(l))throw new TypeError("Scalar values expected in function max");return s(l)}});function o(u,l){try{return a(u,l)?u:l}catch(c){throw Zr(c,"max",l)}}function s(u){var l;if(gi(u,function(c){try{(i(c)||l===void 0||a(c,l))&&(l=c)}catch(f){throw Zr(f,"max",c)}}),l===void 0)throw new Error("Cannot calculate max of an empty array");return typeof l=="string"&&(l=n(l,yi(l,r))),l}}),S1="min",IL=["typed","config","numeric","smaller","isNaN"],Q2=I(S1,IL,e=>{var{typed:t,config:r,numeric:n,smaller:a,isNaN:i}=e;return t(S1,{"Array | Matrix":s,"Array | Matrix, number | BigNumber":function(l,c){return Pc(l,c.valueOf(),o)},"...":function(l){if(ns(l))throw new TypeError("Scalar values expected in function min");return s(l)}});function o(u,l){try{return a(u,l)?u:l}catch(c){throw Zr(c,"min",l)}}function s(u){var l;if(gi(u,function(c){try{(i(c)||l===void 0||a(c,l))&&(l=c)}catch(f){throw Zr(f,"min",c)}}),l===void 0)throw new Error("Cannot calculate min of an empty array");return typeof l=="string"&&(l=n(l,yi(l,r))),l}}),zL="ImmutableDenseMatrix",jL=["smaller","DenseMatrix"],qL=I(zL,jL,e=>{var{smaller:t,DenseMatrix:r}=e;function n(a,i){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(i&&!Zt(i))throw new Error("Invalid datatype: "+i);if(Le(a)||Tt(a)){var o=new r(a,i);this._data=o._data,this._size=o._size,this._datatype=o._datatype,this._min=null,this._max=null}else if(a&&Tt(a.data)&&Tt(a.size))this._data=a.data,this._size=a.size,this._datatype=a.datatype,this._min=typeof a.min<"u"?a.min:null,this._max=typeof a.max<"u"?a.max:null;else{if(a)throw new TypeError("Unsupported type of data ("+Pt(a)+")");this._data=[],this._size=[0],this._datatype=i,this._min=null,this._max=null}}return n.prototype=new r,n.prototype.type="ImmutableDenseMatrix",n.prototype.isImmutableDenseMatrix=!0,n.prototype.subset=function(a){switch(arguments.length){case 1:{var i=r.prototype.subset.call(this,a);return Le(i)?new n({data:i._data,size:i._size,datatype:i._datatype}):i}case 2:case 3:throw new Error("Cannot invoke set subset on an Immutable Matrix instance");default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.set=function(){throw new Error("Cannot invoke set on an Immutable Matrix instance")},n.prototype.resize=function(){throw new Error("Cannot invoke resize on an Immutable Matrix instance")},n.prototype.reshape=function(){throw new Error("Cannot invoke reshape on an Immutable Matrix instance")},n.prototype.clone=function(){return new n({data:We(this._data),size:We(this._size),datatype:this._datatype})},n.prototype.toJSON=function(){return{mathjs:"ImmutableDenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.fromJSON=function(a){return new n(a)},n.prototype.swapRows=function(){throw new Error("Cannot invoke swapRows on an Immutable Matrix instance")},n.prototype.min=function(){if(this._min===null){var a=null;this.forEach(function(i){(a===null||t(i,a))&&(a=i)}),this._min=a!==null?a:void 0}return this._min},n.prototype.max=function(){if(this._max===null){var a=null;this.forEach(function(i){(a===null||t(a,i))&&(a=i)}),this._max=a!==null?a:void 0}return this._max},n},{isClass:!0}),RL="Index",LL=["ImmutableDenseMatrix","getMatrixDataType"],HL=I(RL,LL,e=>{var{ImmutableDenseMatrix:t,getMatrixDataType:r}=e;function n(){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");this._dimensions=[],this._sourceSize=[],this._isScalar=!0;for(var i=0,o=arguments.length;i<o;i++){var s=i<0||arguments.length<=i?void 0:arguments[i],u=Tt(s),l=Le(s),c=typeof s,f=null;if(Cd(s))this._dimensions.push(s),this._isScalar=!1;else if(u||l){var m=void 0;this._isScalar=!1,r(s)==="boolean"?(u&&(m=a(M1(s).valueOf())),l&&(m=a(M1(s._data).valueOf())),f=s.valueOf().length):m=a(s.valueOf()),this._dimensions.push(m)}else if(c==="number")this._dimensions.push(s);else if(c==="bigint")this._dimensions.push(Number(s));else if(c==="string")this._dimensions.push(s);else throw new TypeError("Dimension must be an Array, Matrix, number, bigint, string, or Range");this._sourceSize.push(f)}}n.prototype.type="Index",n.prototype.isIndex=!0;function a(i){for(var o=0,s=i.length;o<s;o++)if(!qe(i[o])||!ke(i[o]))throw new TypeError("Index parameters must be positive integer numbers");var u=new t;return u._data=i,u._size=[i.length],u}return n.prototype.clone=function(){var i=new n;return i._dimensions=We(this._dimensions),i._isScalar=this._isScalar,i._sourceSize=this._sourceSize,i},n.create=function(i){var o=new n;return n.apply(o,i),o},n.prototype.size=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i[o]=Zt(u)||qe(u)?1:u.size()[0]}return i},n.prototype.max=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i[o]=Zt(u)||qe(u)?u:u.max()}return i},n.prototype.min=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i[o]=Zt(u)||qe(u)?u:u.min()}return i},n.prototype.forEach=function(i){for(var o=0,s=this._dimensions.length;o<s;o++)i(this._dimensions[o],o,this)},n.prototype.dimension=function(i){var o;return qe(i)&&(o=this._dimensions[i])!==null&&o!==void 0?o:null},n.prototype.isObjectProperty=function(){return this._dimensions.length===1&&Zt(this._dimensions[0])},n.prototype.getObjectProperty=function(){return this.isObjectProperty()?this._dimensions[0]:null},n.prototype.isScalar=function(){return this._isScalar},n.prototype.toArray=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];i.push(Zt(u)||qe(u)?u:u.toArray())}return i},n.prototype.valueOf=n.prototype.toArray,n.prototype.toString=function(){for(var i=[],o=0,s=this._dimensions.length;o<s;o++){var u=this._dimensions[o];Zt(u)?i.push(JSON.stringify(u)):i.push(u.toString())}return"["+i.join(", ")+"]"},n.prototype.toJSON=function(){return{mathjs:"Index",dimensions:this._dimensions}},n.fromJSON=function(i){return n.create(i.dimensions)},n},{isClass:!0});function M1(e){var t=[];return e.forEach((r,n)=>{r&&t.push(n)}),t}var GL="FibonacciHeap",VL=["smaller","larger"],UL=I(GL,VL,e=>{var{smaller:t,larger:r}=e,n=1/Math.log((1+Math.sqrt(5))/2);function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._minimum=null,this._size=0}a.prototype.type="FibonacciHeap",a.prototype.isFibonacciHeap=!0,a.prototype.insert=function(c,f){var m={key:c,value:f,degree:0};if(this._minimum){var d=this._minimum;m.left=d,m.right=d.right,d.right=m,m.right.left=m,t(c,d.key)&&(this._minimum=m)}else m.left=m,m.right=m,this._minimum=m;return this._size++,m},a.prototype.size=function(){return this._size},a.prototype.clear=function(){this._minimum=null,this._size=0},a.prototype.isEmpty=function(){return this._size===0},a.prototype.extractMinimum=function(){var c=this._minimum;if(c===null)return c;for(var f=this._minimum,m=c.degree,d=c.child;m>0;){var h=d.right;d.left.right=d.right,d.right.left=d.left,d.left=f,d.right=f.right,f.right=d,d.right.left=d,d.parent=null,d=h,m--}return c.left.right=c.right,c.right.left=c.left,c===c.right?f=null:(f=c.right,f=l(f,this._size)),this._size--,this._minimum=f,c},a.prototype.remove=function(c){this._minimum=i(this._minimum,c,-1),this.extractMinimum()};function i(c,f,m){f.key=m;var d=f.parent;return d&&t(f.key,d.key)&&(o(c,f,d),s(c,d)),t(f.key,c.key)&&(c=f),c}function o(c,f,m){f.left.right=f.right,f.right.left=f.left,m.degree--,m.child===f&&(m.child=f.right),m.degree===0&&(m.child=null),f.left=c,f.right=c.right,c.right=f,f.right.left=f,f.parent=null,f.mark=!1}function s(c,f){var m=f.parent;m&&(f.mark?(o(c,f,m),s(m)):f.mark=!0)}var u=function(f,m){f.left.right=f.right,f.right.left=f.left,f.parent=m,m.child?(f.left=m.child,f.right=m.child.right,m.child.right=f,f.right.left=f):(m.child=f,f.right=f,f.left=f),m.degree++,f.mark=!1};function l(c,f){var m=Math.floor(Math.log(f)*n)+1,d=new Array(m),h=0,p=c;if(p)for(h++,p=p.right;p!==c;)h++,p=p.right;for(var y;h>0;){for(var w=p.degree,D=p.right;y=d[w],!!y;){if(r(p.key,y.key)){var v=y;y=p,p=v}u(y,p),d[w]=null,w++}d[w]=p,p=D,h--}c=null;for(var x=0;x<m;x++)y=d[x],y&&(c?(y.left.right=y.right,y.right.left=y.left,y.left=c,y.right=c.right,c.right=y,y.right.left=y,t(y.key,c.key)&&(c=y)):c=y);return c}return a},{isClass:!0}),WL="Spa",JL=["addScalar","equalScalar","FibonacciHeap"],KL=I(WL,JL,e=>{var{addScalar:t,equalScalar:r,FibonacciHeap:n}=e;function a(){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");this._values=[],this._heap=new n}return a.prototype.type="Spa",a.prototype.isSpa=!0,a.prototype.set=function(i,o){if(this._values[i])this._values[i].value=o;else{var s=this._heap.insert(i,o);this._values[i]=s}},a.prototype.get=function(i){var o=this._values[i];return o?o.value:0},a.prototype.accumulate=function(i,o){var s=this._values[i];s?s.value=t(s.value,o):(s=this._heap.insert(i,o),this._values[i]=s)},a.prototype.forEach=function(i,o,s){var u=this._heap,l=this._values,c=[],f=u.extractMinimum();for(f&&c.push(f);f&&f.key<=o;)f.key>=i&&(r(f.value,0)||s(f.key,f.value,this)),f=u.extractMinimum(),f&&c.push(f);for(var m=0;m<c.length;m++){var d=c[m];f=u.insert(d.key,d.value),l[f.key]=f}},a.prototype.swap=function(i,o){var s=this._values[i],u=this._values[o];if(!s&&u)s=this._heap.insert(i,u.value),this._heap.remove(u),this._values[i]=s,this._values[o]=void 0;else if(s&&!u)u=this._heap.insert(o,s.value),this._heap.remove(s),this._values[o]=u,this._values[i]=void 0;else if(s&&u){var l=s.value;s.value=u.value,u.value=l}},a},{isClass:!0});function YL(e){var t=0,r=1,n=Object.create(null),a=Object.create(null),i=0,o=function(u){var l=a[u];if(l&&(delete n[l],delete a[u],--t,r===l)){if(!t){i=0,r=1;return}for(;!Object.prototype.hasOwnProperty.call(n,++r););}};return e=Math.abs(e),{hit:function(u){var l=a[u],c=++i;if(n[c]=u,a[u]=c,!l)return++t,t<=e?void 0:(u=n[r],o(u),u);if(delete n[l],r===l)for(;!Object.prototype.hasOwnProperty.call(n,++r););},delete:o,clear:function(){t=i=0,r=1,n=Object.create(null),a=Object.create(null)}}}function uu(e){var{hasher:t,limit:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return r=r??Number.POSITIVE_INFINITY,t=t??JSON.stringify,function n(){typeof n.cache!="object"&&(n.cache={values:new Map,lru:YL(r||Number.POSITIVE_INFINITY)});for(var a=[],i=0;i<arguments.length;i++)a[i]=arguments[i];var o=t(a);if(n.cache.values.has(o))return n.cache.lru.hit(o),n.cache.values.get(o);var s=e.apply(e,a);return n.cache.values.set(o,s),n.cache.values.delete(n.cache.lru.hit(o)),s}}var ZL=uu(function(e){return new e(1).exp()},{hasher:$c}),QL=uu(function(e){return new e(1).plus(new e(5).sqrt()).div(2)},{hasher:$c}),zd=uu(function(e){return e.acos(-1)},{hasher:$c}),XL=uu(function(e){return zd(e).times(2)},{hasher:$c});function $c(e){return e[0].precision}function T1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Lf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?T1(Object(r),!0).forEach(function(n){ur(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):T1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var eH="Unit",tH=["?on","config","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","abs","fix","round","equal","isNumeric","format","number","Complex","BigNumber","Fraction"],rH=I(eH,tH,e=>{var{on:t,config:r,addScalar:n,subtractScalar:a,multiplyScalar:i,divideScalar:o,pow:s,abs:u,fix:l,round:c,equal:f,isNumeric:m,format:d,number:h,Complex:p,BigNumber:y,Fraction:w}=e,D=h,v=!1,x=!0;function g(H,X){if(!(this instanceof g))throw new Error("Constructor must be called with the new operator");if(!(H==null||m(H)||_a(H)))throw new TypeError("First parameter in Unit constructor must be number, BigNumber, Fraction, Complex, or undefined");if(this.fixPrefix=v,this.skipAutomaticSimplification=x,X===void 0)this.units=[],this.dimensions=Q.map(q=>0);else if(typeof X=="string"){var O=g.parse(X);this.units=O.units,this.dimensions=O.dimensions}else if(hn(X)&&X.value===null)this.fixPrefix=X.fixPrefix,this.skipAutomaticSimplification=X.skipAutomaticSimplification,this.dimensions=X.dimensions.slice(0),this.units=X.units.map(q=>tr({},q));else throw new TypeError("Second parameter in Unit constructor must be a string or valueless Unit");this.value=this._normalize(H)}Object.defineProperty(g,"name",{value:"Unit"}),g.prototype.constructor=g,g.prototype.type="Unit",g.prototype.isUnit=!0;var b,C,N;function A(){for(;N===" "||N===" ";)F()}function E(H){return H>="0"&&H<="9"||H==="."}function S(H){return H>="0"&&H<="9"}function F(){C++,N=b.charAt(C)}function k(H){C=H,N=b.charAt(C)}function $(){var H="",X=C;if(N==="+"?F():N==="-"&&(H+=N,F()),!E(N))return k(X),null;if(N==="."){if(H+=N,F(),!S(N))return k(X),null}else{for(;S(N);)H+=N,F();N==="."&&(H+=N,F())}for(;S(N);)H+=N,F();if(N==="E"||N==="e"){var O="",q=C;if(O+=N,F(),(N==="+"||N==="-")&&(O+=N,F()),!S(N))return k(q),H;for(H=H+O;S(N);)H+=N,F()}return H}function R(){for(var H="";S(N)||g.isValidAlpha(N);)H+=N,F();var X=H.charAt(0);return g.isValidAlpha(X)?H:null}function M(H){return N===H?(F(),H):null}g.parse=function(H,X){if(X=X||{},b=H,C=-1,N="",typeof b!="string")throw new TypeError("Invalid argument in Unit.parse, string expected");var O=new g;O.units=[];var q=1,K=!1;F(),A();var te=$(),ie=null;if(te){if(r.number==="BigNumber")ie=new y(te);else if(r.number==="Fraction")try{ie=new w(te)}catch{ie=parseFloat(te)}else ie=parseFloat(te);A(),M("*")?(q=1,K=!0):M("/")&&(q=-1,K=!0)}for(var re=[],pe=1;;){for(A();N==="(";)re.push(q),pe*=q,q=1,F(),A();var me=void 0;if(N){var Ae=N;if(me=R(),me===null)throw new SyntaxError('Unexpected "'+Ae+'" in "'+b+'" at index '+C.toString())}else break;var de=B(me);if(de===null)throw new SyntaxError('Unit "'+me+'" not found.');var Ie=q*pe;if(A(),M("^")){A();var lt=$();if(lt===null)throw new SyntaxError('In "'+H+'", "^" must be followed by a floating-point number');Ie*=lt}O.units.push({unit:de.unit,prefix:de.prefix,power:Ie});for(var bt=0;bt<Q.length;bt++)O.dimensions[bt]+=(de.unit.dimensions[bt]||0)*Ie;for(A();N===")";){if(re.length===0)throw new SyntaxError('Unmatched ")" in "'+b+'" at index '+C.toString());pe/=re.pop(),F(),A()}if(K=!1,M("*")?(q=1,K=!0):M("/")?(q=-1,K=!0):q=1,de.unit.base){var nt=de.unit.base.key;ee.auto[nt]={unit:de.unit,prefix:de.prefix}}}if(A(),N)throw new SyntaxError('Could not parse: "'+H+'"');if(K)throw new SyntaxError('Trailing characters: "'+H+'"');if(re.length!==0)throw new SyntaxError('Unmatched "(" in "'+b+'"');if(O.units.length===0&&!X.allowNoUnits)throw new SyntaxError('"'+H+'" contains no units');return O.value=ie!==void 0?O._normalize(ie):null,O},g.prototype.clone=function(){var H=new g;H.fixPrefix=this.fixPrefix,H.skipAutomaticSimplification=this.skipAutomaticSimplification,H.value=We(this.value),H.dimensions=this.dimensions.slice(0),H.units=[];for(var X=0;X<this.units.length;X++){H.units[X]={};for(var O in this.units[X])Fe(this.units[X],O)&&(H.units[X][O]=this.units[X][O])}return H},g.prototype.valueType=function(){return Pt(this.value)},g.prototype._isDerived=function(){return this.units.length===0?!1:this.units.length>1||Math.abs(this.units[0].power-1)>1e-15},g.prototype._normalize=function(H){if(H==null||this.units.length===0)return H;for(var X=H,O=g._getNumberConverter(Pt(H)),q=0;q<this.units.length;q++){var K=O(this.units[q].unit.value),te=O(this.units[q].prefix.value),ie=O(this.units[q].power);X=i(X,s(i(K,te),ie))}return X},g.prototype._denormalize=function(H,X){if(H==null||this.units.length===0)return H;for(var O=H,q=g._getNumberConverter(Pt(H)),K=0;K<this.units.length;K++){var te=q(this.units[K].unit.value),ie=q(this.units[K].prefix.value),re=q(this.units[K].power);O=o(O,s(i(te,ie),re))}return O};var B=uu(H=>{if(Fe(_,H)){var X=_[H],O=X.prefixes[""];return{unit:X,prefix:O}}for(var q in _)if(Fe(_,q)&&rI(H,q)){var K=_[q],te=H.length-q.length,ie=H.substring(0,te),re=Fe(K.prefixes,ie)?K.prefixes[ie]:void 0;if(re!==void 0)return{unit:K,prefix:re}}return null},{hasher:H=>H[0],limit:100});g.isValuelessUnit=function(H){return B(H)!==null},g.prototype.hasBase=function(H){if(typeof H=="string"&&(H=z[H]),!H)return!1;for(var X=0;X<Q.length;X++)if(Math.abs((this.dimensions[X]||0)-(H.dimensions[X]||0))>1e-12)return!1;return!0},g.prototype.equalBase=function(H){for(var X=0;X<Q.length;X++)if(Math.abs((this.dimensions[X]||0)-(H.dimensions[X]||0))>1e-12)return!1;return!0},g.prototype.equals=function(H){return this.equalBase(H)&&f(this.value,H.value)},g.prototype.multiply=function(H){for(var X=this.clone(),O=hn(H)?H:new g(H),q=0;q<Q.length;q++)X.dimensions[q]=(this.dimensions[q]||0)+(O.dimensions[q]||0);for(var K=0;K<O.units.length;K++){var te=Lf({},O.units[K]);X.units.push(te)}if(this.value!==null||O.value!==null){var ie=this.value===null?this._normalize(j(O.value)):this.value,re=O.value===null?O._normalize(j(this.value)):O.value;X.value=i(ie,re)}else X.value=null;return hn(H)&&(X.skipAutomaticSimplification=!1),L(X)},g.prototype.divideInto=function(H){return new g(H).divide(this)},g.prototype.divide=function(H){for(var X=this.clone(),O=hn(H)?H:new g(H),q=0;q<Q.length;q++)X.dimensions[q]=(this.dimensions[q]||0)-(O.dimensions[q]||0);for(var K=0;K<O.units.length;K++){var te=Lf(Lf({},O.units[K]),{},{power:-O.units[K].power});X.units.push(te)}if(this.value!==null||O.value!==null){var ie=this.value===null?this._normalize(j(O.value)):this.value,re=O.value===null?O._normalize(j(this.value)):O.value;X.value=o(ie,re)}else X.value=null;return hn(H)&&(X.skipAutomaticSimplification=!1),L(X)},g.prototype.pow=function(H){for(var X=this.clone(),O=0;O<Q.length;O++)X.dimensions[O]=(this.dimensions[O]||0)*H;for(var q=0;q<X.units.length;q++)X.units[q].power*=H;return X.value!==null?X.value=s(X.value,H):X.value=null,X.skipAutomaticSimplification=!1,L(X)};function L(H){return H.equalBase(z.NONE)&&H.value!==null&&!r.predictable?H.value:H}function j(H){var X=g._getNumberConverter(Pt(H));return X(1)}g.prototype.abs=function(){var H=this.clone();if(H.value!==null)if(H._isDerived()||H.units.length===0||H.units[0].unit.offset===0)H.value=u(H.value);else{var X=H._numberConverter(),O=X(H.units[0].unit.value),q=X(H.units[0].unit.offset),K=i(O,q);H.value=a(u(n(H.value,K)),K)}for(var te in H.units)(H.units[te].unit.name==="VA"||H.units[te].unit.name==="VAR")&&(H.units[te].unit=_.W);return H},g.prototype.to=function(H){var X=this.value===null?this._normalize(1):this.value,O;if(typeof H=="string")O=g.parse(H);else if(hn(H))O=H.clone();else throw new Error("String or Unit expected as parameter");if(!this.equalBase(O))throw new Error("Units do not match ('".concat(O.toString(),"' != '").concat(this.toString(),"')"));if(O.value!==null)throw new Error("Cannot convert to a unit with a value");if(this.value===null||this._isDerived()||this.units.length===0||O.units.length===0||this.units[0].unit.offset===O.units[0].unit.offset)O.value=We(X);else{var q=g._getNumberConverter(Pt(X)),K=this.units[0].unit.value,te=this.units[0].unit.offset,ie=i(K,te),re=O.units[0].unit.value,pe=O.units[0].unit.offset,me=i(re,pe);O.value=n(X,q(a(ie,me)))}return O.fixPrefix=!0,O.skipAutomaticSimplification=!0,O},g.prototype.toNumber=function(H){return D(this.toNumeric(H))},g.prototype.toNumeric=function(H){var X;return H?X=this.to(H):X=this.clone(),X._isDerived()||X.units.length===0?X._denormalize(X.value):X._denormalize(X.value,X.units[0].prefix.value)},g.prototype.toString=function(){return this.format()},g.prototype.toJSON=function(){return{mathjs:"Unit",value:this._denormalize(this.value),unit:this.units.length>0?this.formatUnits():null,fixPrefix:this.fixPrefix,skipSimp:this.skipAutomaticSimplification}},g.fromJSON=function(H){var X,O,q,K=new g(H.value,(X=H.unit)!==null&&X!==void 0?X:void 0);return K.fixPrefix=(O=H.fixPrefix)!==null&&O!==void 0?O:v,K.skipAutomaticSimplification=(q=H.skipSimp)!==null&&q!==void 0?q:x,K},g.prototype.valueOf=g.prototype.toString,g.prototype.simplify=function(){var H=this.clone(),X=[],O;for(var q in ue)if(Fe(ue,q)&&H.hasBase(z[q])){O=q;break}if(O==="NONE")H.units=[];else{var K;if(O&&Fe(ue,O)&&(K=ue[O]),K)H.units=[{unit:K.unit,prefix:K.prefix,power:1}];else{for(var te=!1,ie=0;ie<Q.length;ie++){var re=Q[ie];Math.abs(H.dimensions[ie]||0)>1e-12&&(Fe(ue,re)?X.push({unit:ue[re].unit,prefix:ue[re].prefix,power:H.dimensions[ie]||0}):te=!0)}X.length<H.units.length&&!te&&(H.units=X)}}return H},g.prototype.toSI=function(){for(var H=this.clone(),X=[],O=0;O<Q.length;O++){var q=Q[O];if(Math.abs(H.dimensions[O]||0)>1e-12)if(Fe(ee.si,q))X.push({unit:ee.si[q].unit,prefix:ee.si[q].prefix,power:H.dimensions[O]||0});else throw new Error("Cannot express custom unit "+q+" in SI units")}return H.units=X,H.fixPrefix=!0,H.skipAutomaticSimplification=!0,this.value!==null?(H.value=null,this.to(H)):H},g.prototype.formatUnits=function(){for(var H="",X="",O=0,q=0,K=0;K<this.units.length;K++)this.units[K].power>0?(O++,H+=" "+this.units[K].prefix.name+this.units[K].unit.name,Math.abs(this.units[K].power-1)>1e-15&&(H+="^"+this.units[K].power)):this.units[K].power<0&&q++;if(q>0)for(var te=0;te<this.units.length;te++)this.units[te].power<0&&(O>0?(X+=" "+this.units[te].prefix.name+this.units[te].unit.name,Math.abs(this.units[te].power+1)>1e-15&&(X+="^"+-this.units[te].power)):(X+=" "+this.units[te].prefix.name+this.units[te].unit.name,X+="^"+this.units[te].power));H=H.substr(1),X=X.substr(1),O>1&&q>0&&(H="("+H+")"),q>1&&O>0&&(X="("+X+")");var ie=H;return O>0&&q>0&&(ie+=" / "),ie+=X,ie},g.prototype.toBest=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(H&&!Array.isArray(H))throw new Error("Invalid unit type. Expected string or Unit.");var O=this.units[0].unit.prefixes;if(H&&H.length>0){var q=H.map(ie=>{var re=null;if(typeof ie=="string"){if(re=g.parse(ie),!re)throw new Error("Invalid unit type. Expected compatible string or Unit.")}else if(!hn(ie))throw new Error("Invalid unit type. Expected compatible string or Unit.");re===null&&(re=ie.clone());try{return this.to(re.formatUnits()),re}catch{throw new Error("Invalid unit type. Expected compatible string or Unit.")}}),K=q.map(ie=>ie.units[0].prefix);this.units[0].unit.prefixes=K.reduce((ie,re)=>(ie[re.name]=re,ie),{}),this.units[0].prefix=K[0]}var te=Z(this,X).simp;return this.units[0].unit.prefixes=O,te.fixPrefix=!0,te},g.prototype.format=function(H){var{simp:X,valueStr:O,unitStr:q}=Z(this,H),K=O;return X.value&&_a(X.value)&&(K="("+K+")"),q.length>0&&K.length>0&&(K+=" "),K+=q,K};function Z(H){var X=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=H.skipAutomaticSimplification||H.value===null?H.clone():H.simplify();G(O),V(O,X.offset);var q=O._denormalize(O.value),K=O.value!==null?d(q,X||{}):"",te=O.formatUnits();return{simp:O,valueStr:K,unitStr:te}}function G(H){var X=!1;typeof H.value<"u"&&H.value!==null&&_a(H.value)&&(X=Math.abs(H.value.re)<1e-14);for(var O in H.units)Fe(H.units,O)&&H.units[O].unit&&(H.units[O].unit.name==="VA"&&X?H.units[O].unit=_.VAR:H.units[O].unit.name==="VAR"&&!X&&(H.units[O].unit=_.VA))}function V(H,X){H.units.length===1&&!H.fixPrefix&&Math.abs(H.units[0].power-Math.round(H.units[0].power))<1e-14&&(H.units[0].prefix=H._bestPrefix(X))}g.prototype._bestPrefix=function(){var H=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1.2;if(this.units.length!==1)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");if(Math.abs(this.units[0].power-Math.round(this.units[0].power))>=1e-14)throw new Error("Can only compute the best prefix for single units with integer powers, like kg, s^2, N^-1, and so forth!");var X=this.value!==null?u(this.value):0,O=u(this.units[0].unit.value),q=this.units[0].prefix;if(X===0)return q;var K=this.units[0].power,te=Math.log(X/Math.pow(q.value*O,K))/Math.LN10-H;if(te>-2.200001&&te<1.800001)return q;te=Math.abs(te);var ie=this.units[0].unit.prefixes;for(var re in ie)if(Fe(ie,re)){var pe=ie[re];if(pe.scientific){var me=Math.abs(Math.log(X/Math.pow(pe.value*O,K))/Math.LN10-H);(me<te||me===te&&pe.name.length<q.name.length)&&(q=pe,te=me)}}return q},g.prototype.splitUnit=function(H){for(var X=this.clone(),O=[],q=0;q<H.length&&(X=X.to(H[q]),q!==H.length-1);q++){var K=X.toNumeric(),te=c(K),ie=void 0,re=f(te,K);re?ie=te:ie=l(X.toNumeric());var pe=new g(ie,H[q].toString());O.push(pe),X=a(X,pe)}for(var me=0,Ae=0;Ae<O.length;Ae++)me=n(me,O[Ae].value);return f(me,this.value)&&(X.value=0),O.push(X),O};var P={NONE:{"":{name:"",value:1,scientific:!0}},SHORT:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:10,scientific:!1},h:{name:"h",value:100,scientific:!1},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0},R:{name:"R",value:1e27,scientific:!0},Q:{name:"Q",value:1e30,scientific:!0},d:{name:"d",value:.1,scientific:!1},c:{name:"c",value:.01,scientific:!1},m:{name:"m",value:.001,scientific:!0},u:{name:"u",value:1e-6,scientific:!0},n:{name:"n",value:1e-9,scientific:!0},p:{name:"p",value:1e-12,scientific:!0},f:{name:"f",value:1e-15,scientific:!0},a:{name:"a",value:1e-18,scientific:!0},z:{name:"z",value:1e-21,scientific:!0},y:{name:"y",value:1e-24,scientific:!0},r:{name:"r",value:1e-27,scientific:!0},q:{name:"q",value:1e-30,scientific:!0}},LONG:{"":{name:"",value:1,scientific:!0},deca:{name:"deca",value:10,scientific:!1},hecto:{name:"hecto",value:100,scientific:!1},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0},ronna:{name:"ronna",value:1e27,scientific:!0},quetta:{name:"quetta",value:1e30,scientific:!0},deci:{name:"deci",value:.1,scientific:!1},centi:{name:"centi",value:.01,scientific:!1},milli:{name:"milli",value:.001,scientific:!0},micro:{name:"micro",value:1e-6,scientific:!0},nano:{name:"nano",value:1e-9,scientific:!0},pico:{name:"pico",value:1e-12,scientific:!0},femto:{name:"femto",value:1e-15,scientific:!0},atto:{name:"atto",value:1e-18,scientific:!0},zepto:{name:"zepto",value:1e-21,scientific:!0},yocto:{name:"yocto",value:1e-24,scientific:!0},ronto:{name:"ronto",value:1e-27,scientific:!0},quecto:{name:"quecto",value:1e-30,scientific:!0}},SQUARED:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:100,scientific:!1},h:{name:"h",value:1e4,scientific:!1},k:{name:"k",value:1e6,scientific:!0},M:{name:"M",value:1e12,scientific:!0},G:{name:"G",value:1e18,scientific:!0},T:{name:"T",value:1e24,scientific:!0},P:{name:"P",value:1e30,scientific:!0},E:{name:"E",value:1e36,scientific:!0},Z:{name:"Z",value:1e42,scientific:!0},Y:{name:"Y",value:1e48,scientific:!0},R:{name:"R",value:1e54,scientific:!0},Q:{name:"Q",value:1e60,scientific:!0},d:{name:"d",value:.01,scientific:!1},c:{name:"c",value:1e-4,scientific:!1},m:{name:"m",value:1e-6,scientific:!0},u:{name:"u",value:1e-12,scientific:!0},n:{name:"n",value:1e-18,scientific:!0},p:{name:"p",value:1e-24,scientific:!0},f:{name:"f",value:1e-30,scientific:!0},a:{name:"a",value:1e-36,scientific:!0},z:{name:"z",value:1e-42,scientific:!0},y:{name:"y",value:1e-48,scientific:!0},r:{name:"r",value:1e-54,scientific:!0},q:{name:"q",value:1e-60,scientific:!0}},CUBIC:{"":{name:"",value:1,scientific:!0},da:{name:"da",value:1e3,scientific:!1},h:{name:"h",value:1e6,scientific:!1},k:{name:"k",value:1e9,scientific:!0},M:{name:"M",value:1e18,scientific:!0},G:{name:"G",value:1e27,scientific:!0},T:{name:"T",value:1e36,scientific:!0},P:{name:"P",value:1e45,scientific:!0},E:{name:"E",value:1e54,scientific:!0},Z:{name:"Z",value:1e63,scientific:!0},Y:{name:"Y",value:1e72,scientific:!0},R:{name:"R",value:1e81,scientific:!0},Q:{name:"Q",value:1e90,scientific:!0},d:{name:"d",value:.001,scientific:!1},c:{name:"c",value:1e-6,scientific:!1},m:{name:"m",value:1e-9,scientific:!0},u:{name:"u",value:1e-18,scientific:!0},n:{name:"n",value:1e-27,scientific:!0},p:{name:"p",value:1e-36,scientific:!0},f:{name:"f",value:1e-45,scientific:!0},a:{name:"a",value:1e-54,scientific:!0},z:{name:"z",value:1e-63,scientific:!0},y:{name:"y",value:1e-72,scientific:!0},r:{name:"r",value:1e-81,scientific:!0},q:{name:"q",value:1e-90,scientific:!0}},BINARY_SHORT_SI:{"":{name:"",value:1,scientific:!0},k:{name:"k",value:1e3,scientific:!0},M:{name:"M",value:1e6,scientific:!0},G:{name:"G",value:1e9,scientific:!0},T:{name:"T",value:1e12,scientific:!0},P:{name:"P",value:1e15,scientific:!0},E:{name:"E",value:1e18,scientific:!0},Z:{name:"Z",value:1e21,scientific:!0},Y:{name:"Y",value:1e24,scientific:!0}},BINARY_SHORT_IEC:{"":{name:"",value:1,scientific:!0},Ki:{name:"Ki",value:1024,scientific:!0},Mi:{name:"Mi",value:Math.pow(1024,2),scientific:!0},Gi:{name:"Gi",value:Math.pow(1024,3),scientific:!0},Ti:{name:"Ti",value:Math.pow(1024,4),scientific:!0},Pi:{name:"Pi",value:Math.pow(1024,5),scientific:!0},Ei:{name:"Ei",value:Math.pow(1024,6),scientific:!0},Zi:{name:"Zi",value:Math.pow(1024,7),scientific:!0},Yi:{name:"Yi",value:Math.pow(1024,8),scientific:!0}},BINARY_LONG_SI:{"":{name:"",value:1,scientific:!0},kilo:{name:"kilo",value:1e3,scientific:!0},mega:{name:"mega",value:1e6,scientific:!0},giga:{name:"giga",value:1e9,scientific:!0},tera:{name:"tera",value:1e12,scientific:!0},peta:{name:"peta",value:1e15,scientific:!0},exa:{name:"exa",value:1e18,scientific:!0},zetta:{name:"zetta",value:1e21,scientific:!0},yotta:{name:"yotta",value:1e24,scientific:!0}},BINARY_LONG_IEC:{"":{name:"",value:1,scientific:!0},kibi:{name:"kibi",value:1024,scientific:!0},mebi:{name:"mebi",value:Math.pow(1024,2),scientific:!0},gibi:{name:"gibi",value:Math.pow(1024,3),scientific:!0},tebi:{name:"tebi",value:Math.pow(1024,4),scientific:!0},pebi:{name:"pebi",value:Math.pow(1024,5),scientific:!0},exi:{name:"exi",value:Math.pow(1024,6),scientific:!0},zebi:{name:"zebi",value:Math.pow(1024,7),scientific:!0},yobi:{name:"yobi",value:Math.pow(1024,8),scientific:!0}},BTU:{"":{name:"",value:1,scientific:!0},MM:{name:"MM",value:1e6,scientific:!0}}};P.SHORTLONG=tr({},P.SHORT,P.LONG),P.BINARY_SHORT=tr({},P.BINARY_SHORT_SI,P.BINARY_SHORT_IEC),P.BINARY_LONG=tr({},P.BINARY_LONG_SI,P.BINARY_LONG_IEC);var Q=["MASS","LENGTH","TIME","CURRENT","TEMPERATURE","LUMINOUS_INTENSITY","AMOUNT_OF_SUBSTANCE","ANGLE","BIT"],z={NONE:{dimensions:[0,0,0,0,0,0,0,0,0]},MASS:{dimensions:[1,0,0,0,0,0,0,0,0]},LENGTH:{dimensions:[0,1,0,0,0,0,0,0,0]},TIME:{dimensions:[0,0,1,0,0,0,0,0,0]},CURRENT:{dimensions:[0,0,0,1,0,0,0,0,0]},TEMPERATURE:{dimensions:[0,0,0,0,1,0,0,0,0]},LUMINOUS_INTENSITY:{dimensions:[0,0,0,0,0,1,0,0,0]},AMOUNT_OF_SUBSTANCE:{dimensions:[0,0,0,0,0,0,1,0,0]},FORCE:{dimensions:[1,1,-2,0,0,0,0,0,0]},SURFACE:{dimensions:[0,2,0,0,0,0,0,0,0]},VOLUME:{dimensions:[0,3,0,0,0,0,0,0,0]},ENERGY:{dimensions:[1,2,-2,0,0,0,0,0,0]},POWER:{dimensions:[1,2,-3,0,0,0,0,0,0]},PRESSURE:{dimensions:[1,-1,-2,0,0,0,0,0,0]},ELECTRIC_CHARGE:{dimensions:[0,0,1,1,0,0,0,0,0]},ELECTRIC_CAPACITANCE:{dimensions:[-1,-2,4,2,0,0,0,0,0]},ELECTRIC_POTENTIAL:{dimensions:[1,2,-3,-1,0,0,0,0,0]},ELECTRIC_RESISTANCE:{dimensions:[1,2,-3,-2,0,0,0,0,0]},ELECTRIC_INDUCTANCE:{dimensions:[1,2,-2,-2,0,0,0,0,0]},ELECTRIC_CONDUCTANCE:{dimensions:[-1,-2,3,2,0,0,0,0,0]},MAGNETIC_FLUX:{dimensions:[1,2,-2,-1,0,0,0,0,0]},MAGNETIC_FLUX_DENSITY:{dimensions:[1,0,-2,-1,0,0,0,0,0]},FREQUENCY:{dimensions:[0,0,-1,0,0,0,0,0,0]},ANGLE:{dimensions:[0,0,0,0,0,0,0,1,0]},BIT:{dimensions:[0,0,0,0,0,0,0,0,1]}};for(var oe in z)Fe(z,oe)&&(z[oe].key=oe);var ne={},U={name:"",base:ne,value:1,offset:0,dimensions:Q.map(H=>0)},_={meter:{name:"meter",base:z.LENGTH,prefixes:P.LONG,value:1,offset:0},inch:{name:"inch",base:z.LENGTH,prefixes:P.NONE,value:.0254,offset:0},foot:{name:"foot",base:z.LENGTH,prefixes:P.NONE,value:.3048,offset:0},yard:{name:"yard",base:z.LENGTH,prefixes:P.NONE,value:.9144,offset:0},mile:{name:"mile",base:z.LENGTH,prefixes:P.NONE,value:1609.344,offset:0},link:{name:"link",base:z.LENGTH,prefixes:P.NONE,value:.201168,offset:0},rod:{name:"rod",base:z.LENGTH,prefixes:P.NONE,value:5.0292,offset:0},chain:{name:"chain",base:z.LENGTH,prefixes:P.NONE,value:20.1168,offset:0},angstrom:{name:"angstrom",base:z.LENGTH,prefixes:P.NONE,value:1e-10,offset:0},m:{name:"m",base:z.LENGTH,prefixes:P.SHORT,value:1,offset:0},in:{name:"in",base:z.LENGTH,prefixes:P.NONE,value:.0254,offset:0},ft:{name:"ft",base:z.LENGTH,prefixes:P.NONE,value:.3048,offset:0},yd:{name:"yd",base:z.LENGTH,prefixes:P.NONE,value:.9144,offset:0},mi:{name:"mi",base:z.LENGTH,prefixes:P.NONE,value:1609.344,offset:0},li:{name:"li",base:z.LENGTH,prefixes:P.NONE,value:.201168,offset:0},rd:{name:"rd",base:z.LENGTH,prefixes:P.NONE,value:5.02921,offset:0},ch:{name:"ch",base:z.LENGTH,prefixes:P.NONE,value:20.1168,offset:0},mil:{name:"mil",base:z.LENGTH,prefixes:P.NONE,value:254e-7,offset:0},m2:{name:"m2",base:z.SURFACE,prefixes:P.SQUARED,value:1,offset:0},sqin:{name:"sqin",base:z.SURFACE,prefixes:P.NONE,value:64516e-8,offset:0},sqft:{name:"sqft",base:z.SURFACE,prefixes:P.NONE,value:.09290304,offset:0},sqyd:{name:"sqyd",base:z.SURFACE,prefixes:P.NONE,value:.83612736,offset:0},sqmi:{name:"sqmi",base:z.SURFACE,prefixes:P.NONE,value:2589988110336e-6,offset:0},sqrd:{name:"sqrd",base:z.SURFACE,prefixes:P.NONE,value:25.29295,offset:0},sqch:{name:"sqch",base:z.SURFACE,prefixes:P.NONE,value:404.6873,offset:0},sqmil:{name:"sqmil",base:z.SURFACE,prefixes:P.NONE,value:64516e-14,offset:0},acre:{name:"acre",base:z.SURFACE,prefixes:P.NONE,value:4046.86,offset:0},hectare:{name:"hectare",base:z.SURFACE,prefixes:P.NONE,value:1e4,offset:0},m3:{name:"m3",base:z.VOLUME,prefixes:P.CUBIC,value:1,offset:0},L:{name:"L",base:z.VOLUME,prefixes:P.SHORT,value:.001,offset:0},l:{name:"l",base:z.VOLUME,prefixes:P.SHORT,value:.001,offset:0},litre:{name:"litre",base:z.VOLUME,prefixes:P.LONG,value:.001,offset:0},cuin:{name:"cuin",base:z.VOLUME,prefixes:P.NONE,value:16387064e-12,offset:0},cuft:{name:"cuft",base:z.VOLUME,prefixes:P.NONE,value:.028316846592,offset:0},cuyd:{name:"cuyd",base:z.VOLUME,prefixes:P.NONE,value:.764554857984,offset:0},teaspoon:{name:"teaspoon",base:z.VOLUME,prefixes:P.NONE,value:5e-6,offset:0},tablespoon:{name:"tablespoon",base:z.VOLUME,prefixes:P.NONE,value:15e-6,offset:0},drop:{name:"drop",base:z.VOLUME,prefixes:P.NONE,value:5e-8,offset:0},gtt:{name:"gtt",base:z.VOLUME,prefixes:P.NONE,value:5e-8,offset:0},minim:{name:"minim",base:z.VOLUME,prefixes:P.NONE,value:61611519921875e-21,offset:0},fluiddram:{name:"fluiddram",base:z.VOLUME,prefixes:P.NONE,value:36966911953125e-19,offset:0},fluidounce:{name:"fluidounce",base:z.VOLUME,prefixes:P.NONE,value:295735295625e-16,offset:0},gill:{name:"gill",base:z.VOLUME,prefixes:P.NONE,value:.00011829411825,offset:0},cc:{name:"cc",base:z.VOLUME,prefixes:P.NONE,value:1e-6,offset:0},cup:{name:"cup",base:z.VOLUME,prefixes:P.NONE,value:.0002365882365,offset:0},pint:{name:"pint",base:z.VOLUME,prefixes:P.NONE,value:.000473176473,offset:0},quart:{name:"quart",base:z.VOLUME,prefixes:P.NONE,value:.000946352946,offset:0},gallon:{name:"gallon",base:z.VOLUME,prefixes:P.NONE,value:.003785411784,offset:0},beerbarrel:{name:"beerbarrel",base:z.VOLUME,prefixes:P.NONE,value:.117347765304,offset:0},oilbarrel:{name:"oilbarrel",base:z.VOLUME,prefixes:P.NONE,value:.158987294928,offset:0},hogshead:{name:"hogshead",base:z.VOLUME,prefixes:P.NONE,value:.238480942392,offset:0},g:{name:"g",base:z.MASS,prefixes:P.SHORT,value:.001,offset:0},gram:{name:"gram",base:z.MASS,prefixes:P.LONG,value:.001,offset:0},ton:{name:"ton",base:z.MASS,prefixes:P.SHORT,value:907.18474,offset:0},t:{name:"t",base:z.MASS,prefixes:P.SHORT,value:1e3,offset:0},tonne:{name:"tonne",base:z.MASS,prefixes:P.LONG,value:1e3,offset:0},grain:{name:"grain",base:z.MASS,prefixes:P.NONE,value:6479891e-11,offset:0},dram:{name:"dram",base:z.MASS,prefixes:P.NONE,value:.0017718451953125,offset:0},ounce:{name:"ounce",base:z.MASS,prefixes:P.NONE,value:.028349523125,offset:0},poundmass:{name:"poundmass",base:z.MASS,prefixes:P.NONE,value:.45359237,offset:0},hundredweight:{name:"hundredweight",base:z.MASS,prefixes:P.NONE,value:45.359237,offset:0},stick:{name:"stick",base:z.MASS,prefixes:P.NONE,value:.115,offset:0},stone:{name:"stone",base:z.MASS,prefixes:P.NONE,value:6.35029318,offset:0},gr:{name:"gr",base:z.MASS,prefixes:P.NONE,value:6479891e-11,offset:0},dr:{name:"dr",base:z.MASS,prefixes:P.NONE,value:.0017718451953125,offset:0},oz:{name:"oz",base:z.MASS,prefixes:P.NONE,value:.028349523125,offset:0},lbm:{name:"lbm",base:z.MASS,prefixes:P.NONE,value:.45359237,offset:0},cwt:{name:"cwt",base:z.MASS,prefixes:P.NONE,value:45.359237,offset:0},s:{name:"s",base:z.TIME,prefixes:P.SHORT,value:1,offset:0},min:{name:"min",base:z.TIME,prefixes:P.NONE,value:60,offset:0},h:{name:"h",base:z.TIME,prefixes:P.NONE,value:3600,offset:0},second:{name:"second",base:z.TIME,prefixes:P.LONG,value:1,offset:0},sec:{name:"sec",base:z.TIME,prefixes:P.LONG,value:1,offset:0},minute:{name:"minute",base:z.TIME,prefixes:P.NONE,value:60,offset:0},hour:{name:"hour",base:z.TIME,prefixes:P.NONE,value:3600,offset:0},day:{name:"day",base:z.TIME,prefixes:P.NONE,value:86400,offset:0},week:{name:"week",base:z.TIME,prefixes:P.NONE,value:7*86400,offset:0},month:{name:"month",base:z.TIME,prefixes:P.NONE,value:2629800,offset:0},year:{name:"year",base:z.TIME,prefixes:P.NONE,value:31557600,offset:0},decade:{name:"decade",base:z.TIME,prefixes:P.NONE,value:315576e3,offset:0},century:{name:"century",base:z.TIME,prefixes:P.NONE,value:315576e4,offset:0},millennium:{name:"millennium",base:z.TIME,prefixes:P.NONE,value:315576e5,offset:0},hertz:{name:"Hertz",base:z.FREQUENCY,prefixes:P.LONG,value:1,offset:0,reciprocal:!0},Hz:{name:"Hz",base:z.FREQUENCY,prefixes:P.SHORT,value:1,offset:0,reciprocal:!0},rad:{name:"rad",base:z.ANGLE,prefixes:P.SHORT,value:1,offset:0},radian:{name:"radian",base:z.ANGLE,prefixes:P.LONG,value:1,offset:0},deg:{name:"deg",base:z.ANGLE,prefixes:P.SHORT,value:null,offset:0},degree:{name:"degree",base:z.ANGLE,prefixes:P.LONG,value:null,offset:0},grad:{name:"grad",base:z.ANGLE,prefixes:P.SHORT,value:null,offset:0},gradian:{name:"gradian",base:z.ANGLE,prefixes:P.LONG,value:null,offset:0},cycle:{name:"cycle",base:z.ANGLE,prefixes:P.NONE,value:null,offset:0},arcsec:{name:"arcsec",base:z.ANGLE,prefixes:P.NONE,value:null,offset:0},arcmin:{name:"arcmin",base:z.ANGLE,prefixes:P.NONE,value:null,offset:0},A:{name:"A",base:z.CURRENT,prefixes:P.SHORT,value:1,offset:0},ampere:{name:"ampere",base:z.CURRENT,prefixes:P.LONG,value:1,offset:0},K:{name:"K",base:z.TEMPERATURE,prefixes:P.SHORT,value:1,offset:0},degC:{name:"degC",base:z.TEMPERATURE,prefixes:P.SHORT,value:1,offset:273.15},degF:{name:"degF",base:z.TEMPERATURE,prefixes:P.SHORT,value:new w(5,9),offset:459.67},degR:{name:"degR",base:z.TEMPERATURE,prefixes:P.SHORT,value:new w(5,9),offset:0},kelvin:{name:"kelvin",base:z.TEMPERATURE,prefixes:P.LONG,value:1,offset:0},celsius:{name:"celsius",base:z.TEMPERATURE,prefixes:P.LONG,value:1,offset:273.15},fahrenheit:{name:"fahrenheit",base:z.TEMPERATURE,prefixes:P.LONG,value:new w(5,9),offset:459.67},rankine:{name:"rankine",base:z.TEMPERATURE,prefixes:P.LONG,value:new w(5,9),offset:0},mol:{name:"mol",base:z.AMOUNT_OF_SUBSTANCE,prefixes:P.SHORT,value:1,offset:0},mole:{name:"mole",base:z.AMOUNT_OF_SUBSTANCE,prefixes:P.LONG,value:1,offset:0},cd:{name:"cd",base:z.LUMINOUS_INTENSITY,prefixes:P.SHORT,value:1,offset:0},candela:{name:"candela",base:z.LUMINOUS_INTENSITY,prefixes:P.LONG,value:1,offset:0},N:{name:"N",base:z.FORCE,prefixes:P.SHORT,value:1,offset:0},newton:{name:"newton",base:z.FORCE,prefixes:P.LONG,value:1,offset:0},dyn:{name:"dyn",base:z.FORCE,prefixes:P.SHORT,value:1e-5,offset:0},dyne:{name:"dyne",base:z.FORCE,prefixes:P.LONG,value:1e-5,offset:0},lbf:{name:"lbf",base:z.FORCE,prefixes:P.NONE,value:4.4482216152605,offset:0},poundforce:{name:"poundforce",base:z.FORCE,prefixes:P.NONE,value:4.4482216152605,offset:0},kip:{name:"kip",base:z.FORCE,prefixes:P.LONG,value:4448.2216,offset:0},kilogramforce:{name:"kilogramforce",base:z.FORCE,prefixes:P.NONE,value:9.80665,offset:0},J:{name:"J",base:z.ENERGY,prefixes:P.SHORT,value:1,offset:0},joule:{name:"joule",base:z.ENERGY,prefixes:P.LONG,value:1,offset:0},erg:{name:"erg",base:z.ENERGY,prefixes:P.SHORTLONG,value:1e-7,offset:0},Wh:{name:"Wh",base:z.ENERGY,prefixes:P.SHORT,value:3600,offset:0},BTU:{name:"BTU",base:z.ENERGY,prefixes:P.BTU,value:1055.05585262,offset:0},eV:{name:"eV",base:z.ENERGY,prefixes:P.SHORT,value:1602176565e-28,offset:0},electronvolt:{name:"electronvolt",base:z.ENERGY,prefixes:P.LONG,value:1602176565e-28,offset:0},W:{name:"W",base:z.POWER,prefixes:P.SHORT,value:1,offset:0},watt:{name:"watt",base:z.POWER,prefixes:P.LONG,value:1,offset:0},hp:{name:"hp",base:z.POWER,prefixes:P.NONE,value:745.6998715386,offset:0},VAR:{name:"VAR",base:z.POWER,prefixes:P.SHORT,value:p.I,offset:0},VA:{name:"VA",base:z.POWER,prefixes:P.SHORT,value:1,offset:0},Pa:{name:"Pa",base:z.PRESSURE,prefixes:P.SHORT,value:1,offset:0},psi:{name:"psi",base:z.PRESSURE,prefixes:P.NONE,value:6894.75729276459,offset:0},atm:{name:"atm",base:z.PRESSURE,prefixes:P.NONE,value:101325,offset:0},bar:{name:"bar",base:z.PRESSURE,prefixes:P.SHORTLONG,value:1e5,offset:0},torr:{name:"torr",base:z.PRESSURE,prefixes:P.NONE,value:133.322,offset:0},mmHg:{name:"mmHg",base:z.PRESSURE,prefixes:P.NONE,value:133.322,offset:0},mmH2O:{name:"mmH2O",base:z.PRESSURE,prefixes:P.NONE,value:9.80665,offset:0},cmH2O:{name:"cmH2O",base:z.PRESSURE,prefixes:P.NONE,value:98.0665,offset:0},coulomb:{name:"coulomb",base:z.ELECTRIC_CHARGE,prefixes:P.LONG,value:1,offset:0},C:{name:"C",base:z.ELECTRIC_CHARGE,prefixes:P.SHORT,value:1,offset:0},farad:{name:"farad",base:z.ELECTRIC_CAPACITANCE,prefixes:P.LONG,value:1,offset:0},F:{name:"F",base:z.ELECTRIC_CAPACITANCE,prefixes:P.SHORT,value:1,offset:0},volt:{name:"volt",base:z.ELECTRIC_POTENTIAL,prefixes:P.LONG,value:1,offset:0},V:{name:"V",base:z.ELECTRIC_POTENTIAL,prefixes:P.SHORT,value:1,offset:0},ohm:{name:"ohm",base:z.ELECTRIC_RESISTANCE,prefixes:P.SHORTLONG,value:1,offset:0},henry:{name:"henry",base:z.ELECTRIC_INDUCTANCE,prefixes:P.LONG,value:1,offset:0},H:{name:"H",base:z.ELECTRIC_INDUCTANCE,prefixes:P.SHORT,value:1,offset:0},siemens:{name:"siemens",base:z.ELECTRIC_CONDUCTANCE,prefixes:P.LONG,value:1,offset:0},S:{name:"S",base:z.ELECTRIC_CONDUCTANCE,prefixes:P.SHORT,value:1,offset:0},weber:{name:"weber",base:z.MAGNETIC_FLUX,prefixes:P.LONG,value:1,offset:0},Wb:{name:"Wb",base:z.MAGNETIC_FLUX,prefixes:P.SHORT,value:1,offset:0},tesla:{name:"tesla",base:z.MAGNETIC_FLUX_DENSITY,prefixes:P.LONG,value:1,offset:0},T:{name:"T",base:z.MAGNETIC_FLUX_DENSITY,prefixes:P.SHORT,value:1,offset:0},b:{name:"b",base:z.BIT,prefixes:P.BINARY_SHORT,value:1,offset:0},bits:{name:"bits",base:z.BIT,prefixes:P.BINARY_LONG,value:1,offset:0},B:{name:"B",base:z.BIT,prefixes:P.BINARY_SHORT,value:8,offset:0},bytes:{name:"bytes",base:z.BIT,prefixes:P.BINARY_LONG,value:8,offset:0}},J={meters:"meter",inches:"inch",feet:"foot",yards:"yard",miles:"mile",links:"link",rods:"rod",chains:"chain",angstroms:"angstrom",lt:"l",litres:"litre",liter:"litre",liters:"litre",teaspoons:"teaspoon",tablespoons:"tablespoon",minims:"minim",fldr:"fluiddram",fluiddrams:"fluiddram",floz:"fluidounce",fluidounces:"fluidounce",gi:"gill",gills:"gill",cp:"cup",cups:"cup",pt:"pint",pints:"pint",qt:"quart",quarts:"quart",gal:"gallon",gallons:"gallon",bbl:"beerbarrel",beerbarrels:"beerbarrel",obl:"oilbarrel",oilbarrels:"oilbarrel",hogsheads:"hogshead",gtts:"gtt",grams:"gram",tons:"ton",tonnes:"tonne",grains:"grain",drams:"dram",ounces:"ounce",poundmasses:"poundmass",hundredweights:"hundredweight",sticks:"stick",lb:"lbm",lbs:"lbm",kips:"kip",kgf:"kilogramforce",acres:"acre",hectares:"hectare",sqfeet:"sqft",sqyard:"sqyd",sqmile:"sqmi",sqmiles:"sqmi",mmhg:"mmHg",mmh2o:"mmH2O",cmh2o:"cmH2O",seconds:"second",secs:"second",minutes:"minute",mins:"minute",hours:"hour",hr:"hour",hrs:"hour",days:"day",weeks:"week",months:"month",years:"year",decades:"decade",centuries:"century",millennia:"millennium",hertz:"hertz",radians:"radian",degrees:"degree",gradians:"gradian",cycles:"cycle",arcsecond:"arcsec",arcseconds:"arcsec",arcminute:"arcmin",arcminutes:"arcmin",BTUs:"BTU",watts:"watt",joules:"joule",amperes:"ampere",amps:"ampere",amp:"ampere",coulombs:"coulomb",volts:"volt",ohms:"ohm",farads:"farad",webers:"weber",teslas:"tesla",electronvolts:"electronvolt",moles:"mole",bit:"bits",byte:"bytes"};function ae(H){if(H.number==="BigNumber"){var X=zd(y);_.rad.value=new y(1),_.deg.value=X.div(180),_.grad.value=X.div(200),_.cycle.value=X.times(2),_.arcsec.value=X.div(648e3),_.arcmin.value=X.div(10800)}else _.rad.value=1,_.deg.value=Math.PI/180,_.grad.value=Math.PI/200,_.cycle.value=Math.PI*2,_.arcsec.value=Math.PI/648e3,_.arcmin.value=Math.PI/10800;_.radian.value=_.rad.value,_.degree.value=_.deg.value,_.gradian.value=_.grad.value}ae(r),t&&t("config",function(H,X){H.number!==X.number&&ae(H)});var ee={si:{NONE:{unit:U,prefix:P.NONE[""]},LENGTH:{unit:_.m,prefix:P.SHORT[""]},MASS:{unit:_.g,prefix:P.SHORT.k},TIME:{unit:_.s,prefix:P.SHORT[""]},CURRENT:{unit:_.A,prefix:P.SHORT[""]},TEMPERATURE:{unit:_.K,prefix:P.SHORT[""]},LUMINOUS_INTENSITY:{unit:_.cd,prefix:P.SHORT[""]},AMOUNT_OF_SUBSTANCE:{unit:_.mol,prefix:P.SHORT[""]},ANGLE:{unit:_.rad,prefix:P.SHORT[""]},BIT:{unit:_.bits,prefix:P.SHORT[""]},FORCE:{unit:_.N,prefix:P.SHORT[""]},ENERGY:{unit:_.J,prefix:P.SHORT[""]},POWER:{unit:_.W,prefix:P.SHORT[""]},PRESSURE:{unit:_.Pa,prefix:P.SHORT[""]},ELECTRIC_CHARGE:{unit:_.C,prefix:P.SHORT[""]},ELECTRIC_CAPACITANCE:{unit:_.F,prefix:P.SHORT[""]},ELECTRIC_POTENTIAL:{unit:_.V,prefix:P.SHORT[""]},ELECTRIC_RESISTANCE:{unit:_.ohm,prefix:P.SHORT[""]},ELECTRIC_INDUCTANCE:{unit:_.H,prefix:P.SHORT[""]},ELECTRIC_CONDUCTANCE:{unit:_.S,prefix:P.SHORT[""]},MAGNETIC_FLUX:{unit:_.Wb,prefix:P.SHORT[""]},MAGNETIC_FLUX_DENSITY:{unit:_.T,prefix:P.SHORT[""]},FREQUENCY:{unit:_.Hz,prefix:P.SHORT[""]}}};ee.cgs=JSON.parse(JSON.stringify(ee.si)),ee.cgs.LENGTH={unit:_.m,prefix:P.SHORT.c},ee.cgs.MASS={unit:_.g,prefix:P.SHORT[""]},ee.cgs.FORCE={unit:_.dyn,prefix:P.SHORT[""]},ee.cgs.ENERGY={unit:_.erg,prefix:P.NONE[""]},ee.us=JSON.parse(JSON.stringify(ee.si)),ee.us.LENGTH={unit:_.ft,prefix:P.NONE[""]},ee.us.MASS={unit:_.lbm,prefix:P.NONE[""]},ee.us.TEMPERATURE={unit:_.degF,prefix:P.NONE[""]},ee.us.FORCE={unit:_.lbf,prefix:P.NONE[""]},ee.us.ENERGY={unit:_.BTU,prefix:P.BTU[""]},ee.us.POWER={unit:_.hp,prefix:P.NONE[""]},ee.us.PRESSURE={unit:_.psi,prefix:P.NONE[""]},ee.auto=JSON.parse(JSON.stringify(ee.si));var ue=ee.auto;g.setUnitSystem=function(H){if(Fe(ee,H))ue=ee[H];else throw new Error("Unit system "+H+" does not exist. Choices are: "+Object.keys(ee).join(", "))},g.getUnitSystem=function(){for(var H in ee)if(Fe(ee,H)&&ee[H]===ue)return H},g.typeConverters={BigNumber:function(X){return X!=null&&X.isFraction?new y(String(X.n)).div(String(X.d)).times(String(X.s)):new y(X+"")},Fraction:function(X){return new w(X)},Complex:function(X){return X},number:function(X){return X!=null&&X.isFraction?h(X):X}},g.prototype._numberConverter=function(){var H=g.typeConverters[this.valueType()];if(H)return H;throw new TypeError('Unsupported Unit value type "'+this.valueType()+'"')},g._getNumberConverter=function(H){if(!g.typeConverters[H])throw new TypeError('Unsupported type "'+H+'"');return g.typeConverters[H]};for(var se in _)if(Fe(_,se)){var be=_[se];be.dimensions=be.base.dimensions}for(var Me in J)if(Fe(J,Me)){var Pe=_[J[Me]],Ee={};for(var Oe in Pe)Fe(Pe,Oe)&&(Ee[Oe]=Pe[Oe]);Ee.name=Me,_[Me]=Ee}g.isValidAlpha=function(X){return/^[a-zA-Z]$/.test(X)};function je(H){for(var X=0;X<H.length;X++){if(N=H.charAt(X),X===0&&!g.isValidAlpha(N))throw new Error('Invalid unit name (must begin with alpha character): "'+H+'"');if(X>0&&!(g.isValidAlpha(N)||S(N)))throw new Error('Invalid unit name (only alphanumeric characters are allowed): "'+H+'"')}}return g.createUnit=function(H,X){if(typeof H!="object")throw new TypeError("createUnit expects first parameter to be of type 'Object'");if(X&&X.override){for(var O in H)if(Fe(H,O)&&g.deleteUnit(O),H[O].aliases)for(var q=0;q<H[O].aliases.length;q++)g.deleteUnit(H[O].aliases[q])}var K;for(var te in H)Fe(H,te)&&(K=g.createUnitSingle(te,H[te]));return K},g.createUnitSingle=function(H,X){if((typeof X>"u"||X===null)&&(X={}),typeof H!="string")throw new TypeError("createUnitSingle expects first parameter to be of type 'string'");if(Fe(_,H))throw new Error('Cannot create unit "'+H+'": a unit with that name already exists');je(H);var O=null,q=[],K=0,te,ie,re;if(X&&X.type==="Unit")O=X.clone();else if(typeof X=="string")X!==""&&(te=X);else if(typeof X=="object")te=X.definition,ie=X.prefixes,K=X.offset,re=X.baseName,X.aliases&&(q=X.aliases.valueOf());else throw new TypeError('Cannot create unit "'+H+'" from "'+X.toString()+'": expecting "string" or "Unit" or "Object"');if(q){for(var pe=0;pe<q.length;pe++)if(Fe(_,q[pe]))throw new Error('Cannot create alias "'+q[pe]+'": a unit with that name already exists')}if(te&&typeof te=="string"&&!O)try{O=g.parse(te,{allowNoUnits:!0})}catch(Ue){throw Ue.message='Could not create unit "'+H+'" from "'+te+'": '+Ue.message,Ue}else te&&te.type==="Unit"&&(O=te.clone());q=q||[],K=K||0,ie&&ie.toUpperCase?ie=P[ie.toUpperCase()]||P.NONE:ie=P.NONE;var me={};if(O){me={name:H,value:O.value,dimensions:O.dimensions.slice(0),prefixes:ie,offset:K};var lt=!1;for(var bt in z)if(Fe(z,bt)){for(var nt=!0,Lt=0;Lt<Q.length;Lt++)if(Math.abs((me.dimensions[Lt]||0)-(z[bt].dimensions[Lt]||0))>1e-12){nt=!1;break}if(nt){lt=!0,me.base=z[bt];break}}if(!lt){re=re||H+"_STUFF";var T={dimensions:O.dimensions.slice(0)};T.key=re,z[re]=T,ue[re]={unit:me,prefix:P.NONE[""]},me.base=z[re]}}else{if(re=re||H+"_STUFF",Q.indexOf(re)>=0)throw new Error('Cannot create new base unit "'+H+'": a base unit with that name already exists (and cannot be overridden)');Q.push(re);for(var Ae in z)Fe(z,Ae)&&(z[Ae].dimensions[Q.length-1]=0);for(var de={dimensions:[]},Ie=0;Ie<Q.length;Ie++)de.dimensions[Ie]=0;de.dimensions[Q.length-1]=1,de.key=re,z[re]=de,me={name:H,value:1,dimensions:z[re].dimensions.slice(0),prefixes:ie,offset:K,base:z[re]},ue[re]={unit:me,prefix:P.NONE[""]}}g.UNITS[H]=me;for(var Y=0;Y<q.length;Y++){var le=q[Y],ye={};for(var $e in me)Fe(me,$e)&&(ye[$e]=me[$e]);ye.name=le,g.UNITS[le]=ye}return delete B.cache,new g(null,H)},g.deleteUnit=function(H){delete g.UNITS[H],delete B.cache},g.PREFIXES=P,g.BASE_DIMENSIONS=Q,g.BASE_UNITS=z,g.UNIT_SYSTEMS=ee,g.UNITS=_,g},{isClass:!0}),F1="unit",nH=["typed","Unit"],aH=I(F1,nH,e=>{var{typed:t,Unit:r}=e;return t(F1,{Unit:function(a){return a.clone()},string:function(a){return r.isValuelessUnit(a)?new r(null,a):r.parse(a,{allowNoUnits:!0})},"number | BigNumber | Fraction | Complex, string | Unit":function(a,i){return new r(a,i)},"number | BigNumber | Fraction":function(a){return new r(a)},"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),P1="sparse",iH=["typed","SparseMatrix"],oH=I(P1,iH,e=>{var{typed:t,SparseMatrix:r}=e;return t(P1,{"":function(){return new r([])},string:function(a){return new r([],a)},"Array | Matrix":function(a){return new r(a)},"Array | Matrix, string":function(a,i){return new r(a,i)}})}),k1="createUnit",sH=["typed","Unit"],uH=I(k1,sH,e=>{var{typed:t,Unit:r}=e;return t(k1,{"Object, Object":function(a,i){return r.createUnit(a,i)},Object:function(a){return r.createUnit(a,{})},"string, Unit | string | Object, Object":function(a,i,o){var s={};return s[a]=i,r.createUnit(s,o)},"string, Unit | string | Object":function(a,i){var o={};return o[a]=i,r.createUnit(o,{})},string:function(a){var i={};return i[a]={},r.createUnit(i,{})}})}),O1="acos",lH=["typed","config","Complex"],cH=I(O1,lH,e=>{var{typed:t,config:r,Complex:n}=e;return t(O1,{number:function(i){return i>=-1&&i<=1||r.predictable?Math.acos(i):new n(i,0).acos()},Complex:function(i){return i.acos()},BigNumber:function(i){return i.acos()}})}),$1="acosh",fH=["typed","config","Complex"],mH=I($1,fH,e=>{var{typed:t,config:r,Complex:n}=e;return t($1,{number:function(i){return i>=1||r.predictable?f2(i):i<=-1?new n(Math.log(Math.sqrt(i*i-1)-i),Math.PI):new n(i,0).acosh()},Complex:function(i){return i.acosh()},BigNumber:function(i){return i.acosh()}})}),B1="acot",dH=["typed","BigNumber"],hH=I(B1,dH,e=>{var{typed:t,BigNumber:r}=e;return t(B1,{number:m2,Complex:function(a){return a.acot()},BigNumber:function(a){return new r(1).div(a).atan()}})}),_1="acoth",pH=["typed","config","Complex","BigNumber"],gH=I(_1,pH,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(_1,{number:function(o){return o>=1||o<=-1||r.predictable?d2(o):new n(o,0).acoth()},Complex:function(o){return o.acoth()},BigNumber:function(o){return new a(1).div(o).atanh()}})}),I1="acsc",vH=["typed","config","Complex","BigNumber"],yH=I(I1,vH,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(I1,{number:function(o){return o<=-1||o>=1||r.predictable?h2(o):new n(o,0).acsc()},Complex:function(o){return o.acsc()},BigNumber:function(o){return new a(1).div(o).asin()}})}),z1="acsch",bH=["typed","BigNumber"],wH=I(z1,bH,e=>{var{typed:t,BigNumber:r}=e;return t(z1,{number:p2,Complex:function(a){return a.acsch()},BigNumber:function(a){return new r(1).div(a).asinh()}})}),j1="asec",xH=["typed","config","Complex","BigNumber"],DH=I(j1,xH,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(j1,{number:function(o){return o<=-1||o>=1||r.predictable?g2(o):new n(o,0).asec()},Complex:function(o){return o.asec()},BigNumber:function(o){return new a(1).div(o).acos()}})}),q1="asech",NH=["typed","config","Complex","BigNumber"],AH=I(q1,NH,e=>{var{typed:t,config:r,Complex:n,BigNumber:a}=e;return t(q1,{number:function(o){if(o<=1&&o>=-1||r.predictable){var s=1/o;if(s>0||r.predictable)return v2(o);var u=Math.sqrt(s*s-1);return new n(Math.log(u-s),Math.PI)}return new n(o,0).asech()},Complex:function(o){return o.asech()},BigNumber:function(o){return new a(1).div(o).acosh()}})}),R1="asin",CH=["typed","config","Complex"],EH=I(R1,CH,e=>{var{typed:t,config:r,Complex:n}=e;return t(R1,{number:function(i){return i>=-1&&i<=1||r.predictable?Math.asin(i):new n(i,0).asin()},Complex:function(i){return i.asin()},BigNumber:function(i){return i.asin()}})}),SH="asinh",MH=["typed"],TH=I(SH,MH,e=>{var{typed:t}=e;return t("asinh",{number:y2,Complex:function(n){return n.asinh()},BigNumber:function(n){return n.asinh()}})}),FH="atan",PH=["typed"],kH=I(FH,PH,e=>{var{typed:t}=e;return t("atan",{number:function(n){return Math.atan(n)},Complex:function(n){return n.atan()},BigNumber:function(n){return n.atan()}})}),L1="atan2",OH=["typed","matrix","equalScalar","BigNumber","DenseMatrix","concat"],$H=I(L1,OH,e=>{var{typed:t,matrix:r,equalScalar:n,BigNumber:a,DenseMatrix:i,concat:o}=e,s=ta({typed:t,equalScalar:n}),u=qr({typed:t}),l=O2({typed:t,equalScalar:n}),c=Pr({typed:t,equalScalar:n}),f=fr({typed:t,DenseMatrix:i}),m=_t({typed:t,matrix:r,concat:o});return t(L1,{"number, number":Math.atan2,"BigNumber, BigNumber":(d,h)=>a.atan2(d,h)},m({scalar:"number | BigNumber",SS:l,DS:u,SD:s,Ss:c,sS:f}))}),H1="atanh",BH=["typed","config","Complex"],_H=I(H1,BH,e=>{var{typed:t,config:r,Complex:n}=e;return t(H1,{number:function(i){return i<=1&&i>=-1||r.predictable?b2(i):new n(i,0).atanh()},Complex:function(i){return i.atanh()},BigNumber:function(i){return i.atanh()}})}),ss=I("trigUnit",["typed"],e=>{var{typed:t}=e;return{Unit:t.referToSelf(r=>n=>{if(!n.hasBase(n.constructor.BASE_UNITS.ANGLE))throw new TypeError("Unit in function cot is no angle");return t.find(r,n.valueType())(n.value)})}}),G1="cos",IH=["typed"],zH=I(G1,IH,e=>{var{typed:t}=e,r=ss({typed:t});return t(G1,{number:Math.cos,"Complex | BigNumber":n=>n.cos()},r)}),V1="cosh",jH=["typed"],qH=I(V1,jH,e=>{var{typed:t}=e;return t(V1,{number:M8,"Complex | BigNumber":r=>r.cosh()})}),U1="cot",RH=["typed","BigNumber"],LH=I(U1,RH,e=>{var{typed:t,BigNumber:r}=e,n=ss({typed:t});return t(U1,{number:w2,Complex:a=>a.cot(),BigNumber:a=>new r(1).div(a.tan())},n)}),W1="coth",HH=["typed","BigNumber"],GH=I(W1,HH,e=>{var{typed:t,BigNumber:r}=e;return t(W1,{number:x2,Complex:n=>n.coth(),BigNumber:n=>new r(1).div(n.tanh())})}),J1="csc",VH=["typed","BigNumber"],UH=I(J1,VH,e=>{var{typed:t,BigNumber:r}=e,n=ss({typed:t});return t(J1,{number:D2,Complex:a=>a.csc(),BigNumber:a=>new r(1).div(a.sin())},n)}),K1="csch",WH=["typed","BigNumber"],JH=I(K1,WH,e=>{var{typed:t,BigNumber:r}=e;return t(K1,{number:N2,Complex:n=>n.csch(),BigNumber:n=>new r(1).div(n.sinh())})}),Y1="sec",KH=["typed","BigNumber"],YH=I(Y1,KH,e=>{var{typed:t,BigNumber:r}=e,n=ss({typed:t});return t(Y1,{number:A2,Complex:a=>a.sec(),BigNumber:a=>new r(1).div(a.cos())},n)}),Z1="sech",ZH=["typed","BigNumber"],QH=I(Z1,ZH,e=>{var{typed:t,BigNumber:r}=e;return t(Z1,{number:C2,Complex:n=>n.sech(),BigNumber:n=>new r(1).div(n.cosh())})}),Q1="sin",XH=["typed"],eG=I(Q1,XH,e=>{var{typed:t}=e,r=ss({typed:t});return t(Q1,{number:Math.sin,"Complex | BigNumber":n=>n.sin()},r)}),X1="sinh",tG=["typed"],rG=I(X1,tG,e=>{var{typed:t}=e;return t(X1,{number:E2,"Complex | BigNumber":r=>r.sinh()})}),ey="tan",nG=["typed"],aG=I(ey,nG,e=>{var{typed:t}=e,r=ss({typed:t});return t(ey,{number:Math.tan,"Complex | BigNumber":n=>n.tan()},r)}),iG="tanh",oG=["typed"],sG=I(iG,oG,e=>{var{typed:t}=e;return t("tanh",{number:F8,"Complex | BigNumber":r=>r.tanh()})}),ty="setCartesian",uG=["typed","size","subset","compareNatural","Index","DenseMatrix"],lG=I(ty,uG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(ty,{"Array | Matrix, Array | Matrix":function(u,l){var c=[];if(n(r(u),new i(0))!==0&&n(r(l),new i(0))!==0){var f=dt(Array.isArray(u)?u:u.toArray()).sort(a),m=dt(Array.isArray(l)?l:l.toArray()).sort(a);c=[];for(var d=0;d<f.length;d++)for(var h=0;h<m.length;h++)c.push([f[d],m[h]])}return Array.isArray(u)&&Array.isArray(l)?c:new o(c)}})}),ry="setDifference",cG=["typed","size","subset","compareNatural","Index","DenseMatrix"],fG=I(ry,cG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(ry,{"Array | Matrix, Array | Matrix":function(u,l){var c;if(n(r(u),new i(0))===0)c=[];else{if(n(r(l),new i(0))===0)return dt(u.toArray());var f=Yo(dt(Array.isArray(u)?u:u.toArray()).sort(a)),m=Yo(dt(Array.isArray(l)?l:l.toArray()).sort(a));c=[];for(var d,h=0;h<f.length;h++){d=!1;for(var p=0;p<m.length;p++)if(a(f[h].value,m[p].value)===0&&f[h].identifier===m[p].identifier){d=!0;break}d||c.push(f[h])}}return Array.isArray(u)&&Array.isArray(l)?Xl(c):new o(Xl(c))}})}),ny="setDistinct",mG=["typed","size","subset","compareNatural","Index","DenseMatrix"],dG=I(ny,mG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(ny,{"Array | Matrix":function(u){var l;if(n(r(u),new i(0))===0)l=[];else{var c=dt(Array.isArray(u)?u:u.toArray()).sort(a);l=[],l.push(c[0]);for(var f=1;f<c.length;f++)a(c[f],c[f-1])!==0&&l.push(c[f])}return Array.isArray(u)?l:new o(l)}})}),ay="setIntersect",hG=["typed","size","subset","compareNatural","Index","DenseMatrix"],pG=I(ay,hG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i,DenseMatrix:o}=e;return t(ay,{"Array | Matrix, Array | Matrix":function(u,l){var c;if(n(r(u),new i(0))===0||n(r(l),new i(0))===0)c=[];else{var f=Yo(dt(Array.isArray(u)?u:u.toArray()).sort(a)),m=Yo(dt(Array.isArray(l)?l:l.toArray()).sort(a));c=[];for(var d=0;d<f.length;d++)for(var h=0;h<m.length;h++)if(a(f[d].value,m[h].value)===0&&f[d].identifier===m[h].identifier){c.push(f[d]);break}}return Array.isArray(u)&&Array.isArray(l)?Xl(c):new o(Xl(c))}})}),iy="setIsSubset",gG=["typed","size","subset","compareNatural","Index"],vG=I(iy,gG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(iy,{"Array | Matrix, Array | Matrix":function(s,u){if(n(r(s),new i(0))===0)return!0;if(n(r(u),new i(0))===0)return!1;for(var l=Yo(dt(Array.isArray(s)?s:s.toArray()).sort(a)),c=Yo(dt(Array.isArray(u)?u:u.toArray()).sort(a)),f,m=0;m<l.length;m++){f=!1;for(var d=0;d<c.length;d++)if(a(l[m].value,c[d].value)===0&&l[m].identifier===c[d].identifier){f=!0;break}if(f===!1)return!1}return!0}})}),oy="setMultiplicity",yG=["typed","size","subset","compareNatural","Index"],bG=I(oy,yG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(oy,{"number | BigNumber | Fraction | Complex, Array | Matrix":function(s,u){if(n(r(u),new i(0))===0)return 0;for(var l=dt(Array.isArray(u)?u:u.toArray()),c=0,f=0;f<l.length;f++)a(l[f],s)===0&&c++;return c}})}),sy="setPowerset",wG=["typed","size","subset","compareNatural","Index"],xG=I(sy,wG,e=>{var{typed:t,size:r,subset:n,compareNatural:a,Index:i}=e;return t(sy,{"Array | Matrix":function(l){if(n(r(l),new i(0))===0)return[];for(var c=dt(Array.isArray(l)?l:l.toArray()).sort(a),f=[],m=0;m.toString(2).length<=c.length;)f.push(o(c,m.toString(2).split("").reverse())),m++;return s(f)}});function o(u,l){for(var c=[],f=0;f<l.length;f++)l[f]==="1"&&c.push(u[f]);return c}function s(u){for(var l=[],c=u.length-1;c>0;c--)for(var f=0;f<c;f++)u[f].length>u[f+1].length&&(l=u[f],u[f]=u[f+1],u[f+1]=l);return u}}),uy="setSize",DG=["typed","compareNatural"],NG=I(uy,DG,e=>{var{typed:t,compareNatural:r}=e;return t(uy,{"Array | Matrix":function(a){return Array.isArray(a)?dt(a).length:dt(a.toArray()).length},"Array | Matrix, boolean":function(a,i){if(i===!1||a.length===0)return Array.isArray(a)?dt(a).length:dt(a.toArray()).length;for(var o=dt(Array.isArray(a)?a:a.toArray()).sort(r),s=1,u=1;u<o.length;u++)r(o[u],o[u-1])!==0&&s++;return s}})}),ly="setSymDifference",AG=["typed","size","concat","subset","setDifference","Index"],CG=I(ly,AG,e=>{var{typed:t,size:r,concat:n,subset:a,setDifference:i,Index:o}=e;return t(ly,{"Array | Matrix, Array | Matrix":function(u,l){if(a(r(u),new o(0))===0)return dt(l);if(a(r(l),new o(0))===0)return dt(u);var c=dt(u),f=dt(l);return n(i(c,f),i(f,c))}})}),cy="setUnion",EG=["typed","size","concat","subset","setIntersect","setSymDifference","Index"],SG=I(cy,EG,e=>{var{typed:t,size:r,concat:n,subset:a,setIntersect:i,setSymDifference:o,Index:s}=e;return t(cy,{"Array | Matrix, Array | Matrix":function(l,c){if(a(r(l),new s(0))===0)return dt(c);if(a(r(c),new s(0))===0)return dt(l);var f=dt(l),m=dt(c);return n(o(f,m),i(f,m))}})}),fy="add",MG=["typed","matrix","addScalar","equalScalar","DenseMatrix","SparseMatrix","concat"],TG=I(fy,MG,e=>{var{typed:t,matrix:r,addScalar:n,equalScalar:a,DenseMatrix:i,SparseMatrix:o,concat:s}=e,u=wi({typed:t}),l=kd({typed:t,equalScalar:a}),c=ao({typed:t,DenseMatrix:i}),f=_t({typed:t,matrix:r,concat:s});return t(fy,{"any, any":n,"any, any, ...any":t.referToSelf(m=>(d,h,p)=>{for(var y=m(d,h),w=0;w<p.length;w++)y=m(y,p[w]);return y})},f({elop:n,DS:u,SS:l,Ss:c}))}),my="hypot",FG=["typed","abs","addScalar","divideScalar","multiplyScalar","sqrt","smaller","isPositive"],PG=I(my,FG,e=>{var{typed:t,abs:r,addScalar:n,divideScalar:a,multiplyScalar:i,sqrt:o,smaller:s,isPositive:u}=e;return t(my,{"... number | BigNumber":l,Array:l,Matrix:c=>l(dt(c.toArray(),!0))});function l(c){for(var f=0,m=0,d=0;d<c.length;d++){if(_a(c[d]))throw new TypeError("Unexpected type of argument to hypot");var h=r(c[d]);s(m,h)?(f=i(f,i(a(m,h),a(m,h))),f=n(f,1),m=h):f=n(f,u(h)?i(a(h,m),a(h,m)):h)}return i(m,o(f))}}),dy="norm",kG=["typed","abs","add","pow","conj","sqrt","multiply","equalScalar","larger","smaller","matrix","ctranspose","eigs"],OG=I(dy,kG,e=>{var{typed:t,abs:r,add:n,pow:a,conj:i,sqrt:o,multiply:s,equalScalar:u,larger:l,smaller:c,matrix:f,ctranspose:m,eigs:d}=e;return t(dy,{number:Math.abs,Complex:function(N){return N.abs()},BigNumber:function(N){return N.abs()},boolean:function(N){return Math.abs(N)},Array:function(N){return b(f(N),2)},Matrix:function(N){return b(N,2)},"Array, number | BigNumber | string":function(N,A){return b(f(N),A)},"Matrix, number | BigNumber | string":function(N,A){return b(N,A)}});function h(C){var N=0;return C.forEach(function(A){var E=r(A);l(E,N)&&(N=E)},!0),N}function p(C){var N;return C.forEach(function(A){var E=r(A);(!N||c(E,N))&&(N=E)},!0),N||0}function y(C,N){if(N===Number.POSITIVE_INFINITY||N==="inf")return h(C);if(N===Number.NEGATIVE_INFINITY||N==="-inf")return p(C);if(N==="fro")return b(C,2);if(typeof N=="number"&&!isNaN(N)){if(!u(N,0)){var A=0;return C.forEach(function(E){A=n(a(r(E),N),A)},!0),a(A,1/N)}return Number.POSITIVE_INFINITY}throw new Error("Unsupported parameter value")}function w(C){var N=0;return C.forEach(function(A,E){N=n(N,s(A,i(A)))}),r(o(N))}function D(C){var N=[],A=0;return C.forEach(function(E,S){var F=S[1],k=n(N[F]||0,r(E));l(k,A)&&(A=k),N[F]=k},!0),A}function v(C){var N=C.size();if(N[0]!==N[1])throw new RangeError("Invalid matrix dimensions");var A=m(C),E=s(A,C),S=d(E).values.toArray(),F=S[S.length-1];return r(o(F))}function x(C){var N=[],A=0;return C.forEach(function(E,S){var F=S[0],k=n(N[F]||0,r(E));l(k,A)&&(A=k),N[F]=k},!0),A}function g(C,N){if(N===1)return D(C);if(N===Number.POSITIVE_INFINITY||N==="inf")return x(C);if(N==="fro")return w(C);if(N===2)return v(C);throw new Error("Unsupported parameter value "+N)}function b(C,N){var A=C.size();if(A.length===1)return y(C,N);if(A.length===2){if(A[0]&&A[1])return g(C,N);throw new RangeError("Invalid matrix dimensions")}}}),hy="dot",$G=["typed","addScalar","multiplyScalar","conj","size"],BG=I(hy,$G,e=>{var{typed:t,addScalar:r,multiplyScalar:n,conj:a,size:i}=e;return t(hy,{"Array | DenseMatrix, Array | DenseMatrix":s,"SparseMatrix, SparseMatrix":u});function o(l,c){var f=i(l),m=i(c),d,h;if(f.length===1)d=f[0];else if(f.length===2&&f[1]===1)d=f[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+f.join(", ")+")");if(m.length===1)h=m[0];else if(m.length===2&&m[1]===1)h=m[0];else throw new RangeError("Expected a column vector, instead got a matrix of size ("+m.join(", ")+")");if(d!==h)throw new RangeError("Vectors must have equal length ("+d+" != "+h+")");if(d===0)throw new RangeError("Cannot calculate the dot product of empty vectors");return d}function s(l,c){var f=o(l,c),m=Le(l)?l._data:l,d=Le(l)?l._datatype||l.getDataType():void 0,h=Le(c)?c._data:c,p=Le(c)?c._datatype||c.getDataType():void 0,y=i(l).length===2,w=i(c).length===2,D=r,v=n;if(d&&p&&d===p&&typeof d=="string"&&d!=="mixed"){var x=d;D=t.find(r,[x,x]),v=t.find(n,[x,x])}if(!y&&!w){for(var g=v(a(m[0]),h[0]),b=1;b<f;b++)g=D(g,v(a(m[b]),h[b]));return g}if(!y&&w){for(var C=v(a(m[0]),h[0][0]),N=1;N<f;N++)C=D(C,v(a(m[N]),h[N][0]));return C}if(y&&!w){for(var A=v(a(m[0][0]),h[0]),E=1;E<f;E++)A=D(A,v(a(m[E][0]),h[E]));return A}if(y&&w){for(var S=v(a(m[0][0]),h[0][0]),F=1;F<f;F++)S=D(S,v(a(m[F][0]),h[F][0]));return S}}function u(l,c){o(l,c);for(var f=l._index,m=l._values,d=c._index,h=c._values,p=0,y=r,w=n,D=0,v=0;D<f.length&&v<d.length;){var x=f[D],g=d[v];if(x<g){D++;continue}if(x>g){v++;continue}x===g&&(p=y(p,w(m[D],h[v])),D++,v++)}return p}}),_G="trace",IG=["typed","matrix","add"],zG=I(_G,IG,e=>{var{typed:t,matrix:r,add:n}=e;return t("trace",{Array:function(s){return a(r(s))},SparseMatrix:i,DenseMatrix:a,any:We});function a(o){var s=o._size,u=o._data;switch(s.length){case 1:if(s[0]===1)return We(u[0]);throw new RangeError("Matrix must be square (size: "+it(s)+")");case 2:{var l=s[0],c=s[1];if(l===c){for(var f=0,m=0;m<l;m++)f=n(f,u[m][m]);return f}else throw new RangeError("Matrix must be square (size: "+it(s)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+it(s)+")")}}function i(o){var s=o._values,u=o._index,l=o._ptr,c=o._size,f=c[0],m=c[1];if(f===m){var d=0;if(s.length>0)for(var h=0;h<m;h++)for(var p=l[h],y=l[h+1],w=p;w<y;w++){var D=u[w];if(D===h){d=n(d,s[w]);break}if(D>h)break}return d}throw new RangeError("Matrix must be square (size: "+it(c)+")")}}),py="index",jG=["typed","Index"],qG=I(py,jG,e=>{var{typed:t,Index:r}=e;return t(py,{"...number | string | BigNumber | Range | Array | Matrix":function(a){var i=a.map(function(s){return Qe(s)?s.toNumber():Tt(s)||Le(s)?s.map(function(u){return Qe(u)?u.toNumber():u}):s}),o=new r;return r.apply(o,i),o}})}),X2=new Set(["end"]),RG="Node",LG=["mathWithTransform"],HG=I(RG,LG,e=>{var{mathWithTransform:t}=e;function r(a){for(var i of[...X2])if(a.has(i))throw new Error('Scope contains an illegal symbol, "'+i+'" is a reserved keyword')}class n{get type(){return"Node"}get isNode(){return!0}evaluate(i){return this.compile().evaluate(i)}compile(){var i=this._compile(t,{}),o={},s=null;function u(l){var c=Ro(l);return r(c),i(c,o,s)}return{evaluate:u}}_compile(i,o){throw new Error("Method _compile must be implemented by type "+this.type)}forEach(i){throw new Error("Cannot run forEach on a Node interface")}map(i){throw new Error("Cannot run map on a Node interface")}_ifNode(i){if(!Et(i))throw new TypeError("Callback function must return a Node");return i}traverse(i){i(this,null,null);function o(s,u){s.forEach(function(l,c,f){u(l,c,f),o(l,u)})}o(this,i)}transform(i){function o(s,u,l){var c=i(s,u,l);return c!==s?c:s.map(o)}return o(this,null,null)}filter(i){var o=[];return this.traverse(function(s,u,l){i(s,u,l)&&o.push(s)}),o}clone(){throw new Error("Cannot clone a Node interface")}cloneDeep(){return this.map(function(i){return i.cloneDeep()})}equals(i){return i?this.type===i.type&&Ha(this,i):!1}toString(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toString(i)}_toString(){throw new Error("_toString not implemented for "+this.type)}toJSON(){throw new Error("Cannot serialize object: toJSON not implemented by "+this.type)}toHTML(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toHTML(i)}_toHTML(){throw new Error("_toHTML not implemented for "+this.type)}toTex(i){var o=this._getCustomString(i);return typeof o<"u"?o:this._toTex(i)}_toTex(i){throw new Error("_toTex not implemented for "+this.type)}_getCustomString(i){if(i&&typeof i=="object")switch(typeof i.handler){case"object":case"undefined":return;case"function":return i.handler(this,i);default:throw new TypeError("Object or function expected as callback")}}getIdentifier(){return this.type}getContent(){return this}}return n},{isClass:!0,isNode:!0});function Qr(e){return e&&e.isIndexError?new Xn(e.index+1,e.min+1,e.max!==void 0?e.max+1:void 0):e}function eD(e){var{subset:t}=e;return function(n,a){try{if(Array.isArray(n))return t(n,a);if(n&&typeof n.subset=="function")return n.subset(a);if(typeof n=="string")return t(n,a);if(typeof n=="object"){if(!a.isObjectProperty())throw new TypeError("Cannot apply a numeric index as object property");return Wr(n,a.getObjectProperty())}else throw new TypeError("Cannot apply index: unsupported type of object")}catch(i){throw Qr(i)}}}var ol="AccessorNode",GG=["subset","Node"],VG=I(ol,GG,e=>{var{subset:t,Node:r}=e,n=eD({subset:t});function a(o){return!(Ra(o)||Fn(o)||ft(o)||di(o)||Cc(o)||La(o)||Dr(o))}class i extends r{constructor(s,u){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(super(),!Et(s))throw new TypeError('Node expected for parameter "object"');if(!rs(u))throw new TypeError('IndexNode expected for parameter "index"');this.object=s,this.index=u,this.optionalChaining=l}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return ol}get isAccessorNode(){return!0}_compile(s,u){var l=this.object._compile(s,u),c=this.index._compile(s,u),f=this.optionalChaining,m=Ra(this.object)&&this.object.optionalChaining;if(this.index.isObjectProperty()){var d=this.index.getObjectProperty();return function(p,y,w){var D=w||{},v=l(p,y,D);if(f&&v==null){D.optionalShortCircuit=!0;return}if(!(m&&D!==null&&D!==void 0&&D.optionalShortCircuit))return Wr(v,d)}}else return function(p,y,w){var D=w||{},v=l(p,y,D);if(f&&v==null){D.optionalShortCircuit=!0;return}if(!(m&&D!==null&&D!==void 0&&D.optionalShortCircuit)){var x=c(p,y,v);return n(v,x)}}}forEach(s){s(this.object,"object",this),s(this.index,"index",this)}map(s){return new i(this._ifNode(s(this.object,"object",this)),this._ifNode(s(this.index,"index",this)),this.optionalChaining)}clone(){return new i(this.object,this.index,this.optionalChaining)}_toString(s){var u=this.object.toString(s);a(this.object)&&(u="("+u+")");var l=this.optionalChaining?this.index.dotNotation?"?":"?.":"";return u+l+this.index.toString(s)}_toHTML(s){var u=this.object.toHTML(s);return a(this.object)&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+this.index.toHTML(s)}_toTex(s){var u=this.object.toTex(s);return a(this.object)&&(u="\\left(' + object + '\\right)"),u+this.index.toTex(s)}toJSON(){return{mathjs:ol,object:this.object,index:this.index,optionalChaining:this.optionalChaining}}static fromJSON(s){return new i(s.object,s.index,s.optionalChaining)}}return ur(i,"name",ol),i},{isClass:!0,isNode:!0}),sl="ArrayNode",UG=["Node"],WG=I(sl,UG,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),this.items=a||[],!Array.isArray(this.items)||!this.items.every(Et))throw new TypeError("Array containing Nodes expected")}get type(){return sl}get isArrayNode(){return!0}_compile(a,i){var o=li(this.items,function(l){return l._compile(a,i)}),s=a.config.matrix!=="Array";if(s){var u=a.matrix;return function(c,f,m){return u(li(o,function(d){return d(c,f,m)}))}}else return function(c,f,m){return li(o,function(d){return d(c,f,m)})}}forEach(a){for(var i=0;i<this.items.length;i++){var o=this.items[i];a(o,"items["+i+"]",this)}}map(a){for(var i=[],o=0;o<this.items.length;o++)i[o]=this._ifNode(a(this.items[o],"items["+o+"]",this));return new r(i)}clone(){return new r(this.items.slice(0))}_toString(a){var i=this.items.map(function(o){return o.toString(a)});return"["+i.join(", ")+"]"}toJSON(){return{mathjs:sl,items:this.items}}static fromJSON(a){return new r(a.items)}_toHTML(a){var i=this.items.map(function(o){return o.toHTML(a)});return'<span class="math-parenthesis math-square-parenthesis">[</span>'+i.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'}_toTex(a){function i(o,s){var u=o.some(Fn)&&!o.every(Fn),l=s||u,c=l?"&":"\\\\",f=o.map(function(m){return m.items?i(m.items,!s):m.toTex(a)}).join(c);return u||!l||l&&!s?"\\begin{bmatrix}"+f+"\\end{bmatrix}":f}return i(this.items,!1)}}return ur(r,"name",sl),r},{isClass:!0,isNode:!0});function JG(e){var{subset:t,matrix:r}=e;return function(a,i,o){try{if(Array.isArray(a)){var s=r(a).subset(i,o).valueOf();return s.forEach((u,l)=>{a[l]=u}),a}else{if(a&&typeof a.subset=="function")return a.subset(i,o);if(typeof a=="string")return t(a,i,o);if(typeof a=="object"){if(!i.isObjectProperty())throw TypeError("Cannot apply a numeric index as object property");return Uo(a,i.getObjectProperty(),o),a}else throw new TypeError("Cannot apply index: unsupported type of object")}}catch(u){throw Qr(u)}}}var Jn=[{AssignmentNode:{},FunctionAssignmentNode:{}},{ConditionalNode:{latexLeftParens:!1,latexRightParens:!1,latexParens:!1}},{"OperatorNode:or":{op:"or",associativity:"left",associativeWith:[]}},{"OperatorNode:xor":{op:"xor",associativity:"left",associativeWith:[]}},{"OperatorNode:and":{op:"and",associativity:"left",associativeWith:[]}},{"OperatorNode:bitOr":{op:"|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitXor":{op:"^|",associativity:"left",associativeWith:[]}},{"OperatorNode:bitAnd":{op:"&",associativity:"left",associativeWith:[]}},{"OperatorNode:equal":{op:"==",associativity:"left",associativeWith:[]},"OperatorNode:unequal":{op:"!=",associativity:"left",associativeWith:[]},"OperatorNode:smaller":{op:"<",associativity:"left",associativeWith:[]},"OperatorNode:larger":{op:">",associativity:"left",associativeWith:[]},"OperatorNode:smallerEq":{op:"<=",associativity:"left",associativeWith:[]},"OperatorNode:largerEq":{op:">=",associativity:"left",associativeWith:[]},RelationalNode:{associativity:"left",associativeWith:[]}},{"OperatorNode:leftShift":{op:"<<",associativity:"left",associativeWith:[]},"OperatorNode:rightArithShift":{op:">>",associativity:"left",associativeWith:[]},"OperatorNode:rightLogShift":{op:">>>",associativity:"left",associativeWith:[]}},{"OperatorNode:to":{op:"to",associativity:"left",associativeWith:[]}},{RangeNode:{}},{"OperatorNode:add":{op:"+",associativity:"left",associativeWith:["OperatorNode:add","OperatorNode:subtract"]},"OperatorNode:subtract":{op:"-",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{op:"*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]},"OperatorNode:divide":{op:"/",associativity:"left",associativeWith:[],latexLeftParens:!1,latexRightParens:!1,latexParens:!1},"OperatorNode:dotMultiply":{op:".*",associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","OperatorNode:dotMultiply","OperatorNode:doDivide"]},"OperatorNode:dotDivide":{op:"./",associativity:"left",associativeWith:[]},"OperatorNode:mod":{op:"mod",associativity:"left",associativeWith:[]}},{"OperatorNode:multiply":{associativity:"left",associativeWith:["OperatorNode:multiply","OperatorNode:divide","Operator:dotMultiply","Operator:dotDivide"]}},{"OperatorNode:unaryPlus":{op:"+",associativity:"right"},"OperatorNode:unaryMinus":{op:"-",associativity:"right"},"OperatorNode:bitNot":{op:"~",associativity:"right"},"OperatorNode:not":{op:"not",associativity:"right"}},{"OperatorNode:pow":{op:"^",associativity:"right",associativeWith:[],latexRightParens:!1},"OperatorNode:dotPow":{op:".^",associativity:"right",associativeWith:[]}},{"OperatorNode:nullish":{op:"??",associativity:"left",associativeWith:[]}},{"OperatorNode:factorial":{op:"!",associativity:"left"}},{"OperatorNode:ctranspose":{op:"'",associativity:"left"}}];function ul(e,t){if(!t||t!=="auto")return e;for(var r=e;La(r);)r=r.content;return r}function Ft(e,t,r,n){var a=e;t!=="keep"&&(a=e.getContent());for(var i=a.getIdentifier(),o=null,s=0;s<Jn.length;s++)if(i in Jn[s]){o=s;break}if(i==="OperatorNode:multiply"&&a.implicit&&r!=="show"){var u=ul(a.args[0],t);!(ft(u)&&n&&n.getIdentifier()==="OperatorNode:divide"&&Im(ul(n.args[0],t)))&&!(u.getIdentifier()==="OperatorNode:divide"&&Im(ul(u.args[0],t))&&ft(ul(u.args[1])))&&(o+=1)}return o}function Es(e,t){var r=e;t!=="keep"&&(r=e.getContent());var n=r.getIdentifier(),a=Ft(r,t);if(a===null)return null;var i=Jn[a][n];if(Fe(i,"associativity")){if(i.associativity==="left")return"left";if(i.associativity==="right")return"right";throw Error("'"+n+"' has the invalid associativity '"+i.associativity+"'.")}return null}function Hf(e,t,r){var n=r!=="keep"?e.getContent():e,a=r!=="keep"?e.getContent():t,i=n.getIdentifier(),o=a.getIdentifier(),s=Ft(n,r);if(s===null)return null;var u=Jn[s][i];if(Fe(u,"associativeWith")&&u.associativeWith instanceof Array){for(var l=0;l<u.associativeWith.length;l++)if(u.associativeWith[l]===o)return!0;return!1}return null}function KG(e){var t="OperatorNode:"+e;for(var r of Jn)if(t in r)return r[t].op;return null}var ll="AssignmentNode",YG=["subset","?matrix","Node"],ZG=I(ll,YG,e=>{var{subset:t,matrix:r,Node:n}=e,a=eD({subset:t}),i=JG({subset:t,matrix:r});function o(u,l,c){l||(l="keep");var f=Ft(u,l,c),m=Ft(u.value,l,c);return l==="all"||m!==null&&m<=f}class s extends n{constructor(l,c,f){if(super(),this.object=l,this.index=f?c:null,this.value=f||c,!Dr(l)&&!Ra(l))throw new TypeError('SymbolNode or AccessorNode expected as "object"');if(Dr(l)&&l.name==="end")throw new Error('Cannot assign to symbol "end"');if(this.index&&!rs(this.index))throw new TypeError('IndexNode expected as "index"');if(!Et(this.value))throw new TypeError('Node expected as "value"')}get name(){return this.index?this.index.isObjectProperty()?this.index.getObjectProperty():"":this.object.name||""}get type(){return ll}get isAssignmentNode(){return!0}_compile(l,c){var f=this.object._compile(l,c),m=this.index?this.index._compile(l,c):null,d=this.value._compile(l,c),h=this.object.name;if(this.index)if(this.index.isObjectProperty()){var p=this.index.getObjectProperty();return function(x,g,b){var C=f(x,g,b),N=d(x,g,b);return Uo(C,p,N),N}}else{if(Dr(this.object))return function(x,g,b){var C=f(x,g,b),N=d(x,g,b),A=m(x,g,C);return x.set(h,i(C,A,N)),N};var y=this.object.object._compile(l,c);if(this.object.index.isObjectProperty()){var w=this.object.index.getObjectProperty();return function(x,g,b){var C=y(x,g,b),N=Wr(C,w),A=m(x,g,N),E=d(x,g,b);return Uo(C,w,i(N,A,E)),E}}else{var D=this.object.index._compile(l,c);return function(x,g,b){var C=y(x,g,b),N=D(x,g,C),A=a(C,N),E=m(x,g,A),S=d(x,g,b);return i(C,N,i(A,E,S)),S}}}else{if(!Dr(this.object))throw new TypeError("SymbolNode expected as object");return function(x,g,b){var C=d(x,g,b);return x.set(h,C),C}}}forEach(l){l(this.object,"object",this),this.index&&l(this.index,"index",this),l(this.value,"value",this)}map(l){var c=this._ifNode(l(this.object,"object",this)),f=this.index?this._ifNode(l(this.index,"index",this)):null,m=this._ifNode(l(this.value,"value",this));return new s(c,f,m)}clone(){return new s(this.object,this.index,this.value)}_toString(l){var c=this.object.toString(l),f=this.index?this.index.toString(l):"",m=this.value.toString(l);return o(this,l&&l.parenthesis,l&&l.implicit)&&(m="("+m+")"),c+f+" = "+m}toJSON(){return{mathjs:ll,object:this.object,index:this.index,value:this.value}}static fromJSON(l){return new s(l.object,l.index,l.value)}_toHTML(l){var c=this.object.toHTML(l),f=this.index?this.index.toHTML(l):"",m=this.value.toHTML(l);return o(this,l&&l.parenthesis,l&&l.implicit)&&(m='<span class="math-paranthesis math-round-parenthesis">(</span>'+m+'<span class="math-paranthesis math-round-parenthesis">)</span>'),c+f+'<span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+m}_toTex(l){var c=this.object.toTex(l),f=this.index?this.index.toTex(l):"",m=this.value.toTex(l);return o(this,l&&l.parenthesis,l&&l.implicit)&&(m="\\left(".concat(m,"\\right)")),c+f+"="+m}}return ur(s,"name",ll),s},{isClass:!0,isNode:!0}),cl="BlockNode",QG=["ResultSet","Node"],XG=I(cl,QG,e=>{var{ResultSet:t,Node:r}=e;class n extends r{constructor(i){if(super(),!Array.isArray(i))throw new Error("Array expected");this.blocks=i.map(function(o){var s=o&&o.node,u=o&&o.visible!==void 0?o.visible:!0;if(!Et(s))throw new TypeError('Property "node" must be a Node');if(typeof u!="boolean")throw new TypeError('Property "visible" must be a boolean');return{node:s,visible:u}})}get type(){return cl}get isBlockNode(){return!0}_compile(i,o){var s=li(this.blocks,function(u){return{evaluate:u.node._compile(i,o),visible:u.visible}});return function(l,c,f){var m=[];return Bx(s,function(h){var p=h.evaluate(l,c,f);h.visible&&m.push(p)}),new t(m)}}forEach(i){for(var o=0;o<this.blocks.length;o++)i(this.blocks[o].node,"blocks["+o+"].node",this)}map(i){for(var o=[],s=0;s<this.blocks.length;s++){var u=this.blocks[s],l=this._ifNode(i(u.node,"blocks["+s+"].node",this));o[s]={node:l,visible:u.visible}}return new n(o)}clone(){var i=this.blocks.map(function(o){return{node:o.node,visible:o.visible}});return new n(i)}_toString(i){return this.blocks.map(function(o){return o.node.toString(i)+(o.visible?"":";")}).join(`
37
+ `)}toJSON(){return{mathjs:cl,blocks:this.blocks}}static fromJSON(i){return new n(i.blocks)}_toHTML(i){return this.blocks.map(function(o){return o.node.toHTML(i)+(o.visible?"":'<span class="math-separator">;</span>')}).join('<span class="math-separator"><br /></span>')}_toTex(i){return this.blocks.map(function(o){return o.node.toTex(i)+(o.visible?"":";")}).join(`\\;\\;
38
+ `)}}return ur(n,"name",cl),n},{isClass:!0,isNode:!0}),fl="ConditionalNode",eV=["Node"],tV=I(fl,eV,e=>{var{Node:t}=e;function r(a){if(typeof a=="number"||typeof a=="boolean"||typeof a=="string")return!!a;if(a){if(Qe(a))return!a.isZero();if(_a(a))return!!(a.re||a.im);if(hn(a))return!!a.value}if(a==null)return!1;throw new TypeError('Unsupported type of condition "'+Pt(a)+'"')}class n extends t{constructor(i,o,s){if(super(),!Et(i))throw new TypeError("Parameter condition must be a Node");if(!Et(o))throw new TypeError("Parameter trueExpr must be a Node");if(!Et(s))throw new TypeError("Parameter falseExpr must be a Node");this.condition=i,this.trueExpr=o,this.falseExpr=s}get type(){return fl}get isConditionalNode(){return!0}_compile(i,o){var s=this.condition._compile(i,o),u=this.trueExpr._compile(i,o),l=this.falseExpr._compile(i,o);return function(f,m,d){return r(s(f,m,d))?u(f,m,d):l(f,m,d)}}forEach(i){i(this.condition,"condition",this),i(this.trueExpr,"trueExpr",this),i(this.falseExpr,"falseExpr",this)}map(i){return new n(this._ifNode(i(this.condition,"condition",this)),this._ifNode(i(this.trueExpr,"trueExpr",this)),this._ifNode(i(this.falseExpr,"falseExpr",this)))}clone(){return new n(this.condition,this.trueExpr,this.falseExpr)}_toString(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=Ft(this,o,i&&i.implicit),u=this.condition.toString(i),l=Ft(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||l!==null&&l<=s)&&(u="("+u+")");var c=this.trueExpr.toString(i),f=Ft(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=s)&&(c="("+c+")");var m=this.falseExpr.toString(i),d=Ft(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||d!==null&&d<=s)&&(m="("+m+")"),u+" ? "+c+" : "+m}toJSON(){return{mathjs:fl,condition:this.condition,trueExpr:this.trueExpr,falseExpr:this.falseExpr}}static fromJSON(i){return new n(i.condition,i.trueExpr,i.falseExpr)}_toHTML(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=Ft(this,o,i&&i.implicit),u=this.condition.toHTML(i),l=Ft(this.condition,o,i&&i.implicit);(o==="all"||this.condition.type==="OperatorNode"||l!==null&&l<=s)&&(u='<span class="math-parenthesis math-round-parenthesis">(</span>'+u+'<span class="math-parenthesis math-round-parenthesis">)</span>');var c=this.trueExpr.toHTML(i),f=Ft(this.trueExpr,o,i&&i.implicit);(o==="all"||this.trueExpr.type==="OperatorNode"||f!==null&&f<=s)&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>');var m=this.falseExpr.toHTML(i),d=Ft(this.falseExpr,o,i&&i.implicit);return(o==="all"||this.falseExpr.type==="OperatorNode"||d!==null&&d<=s)&&(m='<span class="math-parenthesis math-round-parenthesis">(</span>'+m+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+'<span class="math-operator math-conditional-operator">?</span>'+c+'<span class="math-operator math-conditional-operator">:</span>'+m}_toTex(i){return"\\begin{cases} {"+this.trueExpr.toTex(i)+"}, &\\quad{\\text{if }\\;"+this.condition.toTex(i)+"}\\\\{"+this.falseExpr.toTex(i)+"}, &\\quad{\\text{otherwise}}\\end{cases}"}}return ur(n,"name",fl),n},{isClass:!0,isNode:!0}),Gf,gy;function rV(){if(gy)return Gf;gy=1;var e=Object.assign||function(a){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(a[s]=o[s])}return a},t={"{":"\\{","}":"\\}","\\":"\\textbackslash{}","#":"\\#",$:"\\$","%":"\\%","&":"\\&","^":"\\textasciicircum{}",_:"\\_","~":"\\textasciitilde{}"},r={"–":"\\--","—":"\\---"," ":"~"," ":"\\qquad{}","\r\n":"\\newline{}","\n":"\\newline{}"},n=function(i,o){return e({},i,o)};return Gf=function(a){for(var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=i.preserveFormatting,s=o===void 0?!1:o,u=i.escapeMapFn,l=u===void 0?n:u,c=String(a),f="",m=l(e({},t),s?e({},r):{}),d=Object.keys(m),h=function(){var y=!1;d.forEach(function(w,D){y||c.length>=w.length&&c.slice(0,w.length)===w&&(f+=m[d[D]],c=c.slice(w.length,c.length),y=!0)}),y||(f+=c.slice(0,1),c=c.slice(1,c.length))};c;)h();return f},Gf}var nV=rV();const aV=Ys.getDefaultExportFromCjs(nV);var td={Alpha:"A",alpha:"\\alpha",Beta:"B",beta:"\\beta",Gamma:"\\Gamma",gamma:"\\gamma",Delta:"\\Delta",delta:"\\delta",Epsilon:"E",epsilon:"\\epsilon",varepsilon:"\\varepsilon",Zeta:"Z",zeta:"\\zeta",Eta:"H",eta:"\\eta",Theta:"\\Theta",theta:"\\theta",vartheta:"\\vartheta",Iota:"I",iota:"\\iota",Kappa:"K",kappa:"\\kappa",varkappa:"\\varkappa",Lambda:"\\Lambda",lambda:"\\lambda",Mu:"M",mu:"\\mu",Nu:"N",nu:"\\nu",Xi:"\\Xi",xi:"\\xi",Omicron:"O",omicron:"o",Pi:"\\Pi",pi:"\\pi",varpi:"\\varpi",Rho:"P",rho:"\\rho",varrho:"\\varrho",Sigma:"\\Sigma",sigma:"\\sigma",varsigma:"\\varsigma",Tau:"T",tau:"\\tau",Upsilon:"\\Upsilon",upsilon:"\\upsilon",Phi:"\\Phi",phi:"\\phi",varphi:"\\varphi",Chi:"X",chi:"\\chi",Psi:"\\Psi",psi:"\\psi",Omega:"\\Omega",omega:"\\omega",true:"\\mathrm{True}",false:"\\mathrm{False}",i:"i",inf:"\\infty",Inf:"\\infty",infinity:"\\infty",Infinity:"\\infty",oo:"\\infty",lim:"\\lim",undefined:"\\mathbf{?}"},mt={transpose:"^\\top",ctranspose:"^H",factorial:"!",pow:"^",dotPow:".^\\wedge",unaryPlus:"+",unaryMinus:"-",bitNot:"\\~",not:"\\neg",multiply:"\\cdot",divide:"\\frac",dotMultiply:".\\cdot",dotDivide:".:",mod:"\\mod",add:"+",subtract:"-",to:"\\rightarrow",leftShift:"<<",rightArithShift:">>",rightLogShift:">>>",equal:"=",unequal:"\\neq",smaller:"<",larger:">",smallerEq:"\\leq",largerEq:"\\geq",bitAnd:"\\&",bitXor:"\\underline{|}",bitOr:"|",and:"\\wedge",xor:"\\veebar",or:"\\vee"},vy={abs:{1:"\\left|${args[0]}\\right|"},add:{2:"\\left(${args[0]}".concat(mt.add,"${args[1]}\\right)")},cbrt:{1:"\\sqrt[3]{${args[0]}}"},ceil:{1:"\\left\\lceil${args[0]}\\right\\rceil"},cube:{1:"\\left(${args[0]}\\right)^3"},divide:{2:"\\frac{${args[0]}}{${args[1]}}"},dotDivide:{2:"\\left(${args[0]}".concat(mt.dotDivide,"${args[1]}\\right)")},dotMultiply:{2:"\\left(${args[0]}".concat(mt.dotMultiply,"${args[1]}\\right)")},dotPow:{2:"\\left(${args[0]}".concat(mt.dotPow,"${args[1]}\\right)")},exp:{1:"\\exp\\left(${args[0]}\\right)"},expm1:"\\left(e".concat(mt.pow,"{${args[0]}}-1\\right)"),fix:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},floor:{1:"\\left\\lfloor${args[0]}\\right\\rfloor"},fraction:{2:"\\frac{${args[0]}}{${args[1]}}"},gcd:"\\gcd\\left(${args}\\right)",hypot:"\\hypot\\left(${args}\\right)",log:{1:"\\ln\\left(${args[0]}\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}\\right)"},log10:{1:"\\log_{10}\\left(${args[0]}\\right)"},log1p:{1:"\\ln\\left(${args[0]}+1\\right)",2:"\\log_{${args[1]}}\\left(${args[0]}+1\\right)"},log2:"\\log_{2}\\left(${args[0]}\\right)",mod:{2:"\\left(${args[0]}".concat(mt.mod,"${args[1]}\\right)")},multiply:{2:"\\left(${args[0]}".concat(mt.multiply,"${args[1]}\\right)")},norm:{1:"\\left\\|${args[0]}\\right\\|",2:void 0},nthRoot:{2:"\\sqrt[${args[1]}]{${args[0]}}"},nthRoots:{2:"\\{y : y^${args[1]} = {${args[0]}}\\}"},pow:{2:"\\left(${args[0]}\\right)".concat(mt.pow,"{${args[1]}}")},round:{1:"\\left\\lfloor${args[0]}\\right\\rceil",2:void 0},sign:{1:"\\mathrm{${name}}\\left(${args[0]}\\right)"},sqrt:{1:"\\sqrt{${args[0]}}"},square:{1:"\\left(${args[0]}\\right)^2"},subtract:{2:"\\left(${args[0]}".concat(mt.subtract,"${args[1]}\\right)")},unaryMinus:{1:"".concat(mt.unaryMinus,"\\left(${args[0]}\\right)")},unaryPlus:{1:"".concat(mt.unaryPlus,"\\left(${args[0]}\\right)")},bitAnd:{2:"\\left(${args[0]}".concat(mt.bitAnd,"${args[1]}\\right)")},bitNot:{1:mt.bitNot+"\\left(${args[0]}\\right)"},bitOr:{2:"\\left(${args[0]}".concat(mt.bitOr,"${args[1]}\\right)")},bitXor:{2:"\\left(${args[0]}".concat(mt.bitXor,"${args[1]}\\right)")},leftShift:{2:"\\left(${args[0]}".concat(mt.leftShift,"${args[1]}\\right)")},rightArithShift:{2:"\\left(${args[0]}".concat(mt.rightArithShift,"${args[1]}\\right)")},rightLogShift:{2:"\\left(${args[0]}".concat(mt.rightLogShift,"${args[1]}\\right)")},bellNumbers:{1:"\\mathrm{B}_{${args[0]}}"},catalan:{1:"\\mathrm{C}_{${args[0]}}"},stirlingS2:{2:"\\mathrm{S}\\left(${args}\\right)"},arg:{1:"\\arg\\left(${args[0]}\\right)"},conj:{1:"\\left(${args[0]}\\right)^*"},im:{1:"\\Im\\left\\lbrace${args[0]}\\right\\rbrace"},re:{1:"\\Re\\left\\lbrace${args[0]}\\right\\rbrace"},and:{2:"\\left(${args[0]}".concat(mt.and,"${args[1]}\\right)")},not:{1:mt.not+"\\left(${args[0]}\\right)"},or:{2:"\\left(${args[0]}".concat(mt.or,"${args[1]}\\right)")},xor:{2:"\\left(${args[0]}".concat(mt.xor,"${args[1]}\\right)")},cross:{2:"\\left(${args[0]}\\right)\\times\\left(${args[1]}\\right)"},ctranspose:{1:"\\left(${args[0]}\\right)".concat(mt.ctranspose)},det:{1:"\\det\\left(${args[0]}\\right)"},dot:{2:"\\left(${args[0]}\\cdot${args[1]}\\right)"},expm:{1:"\\exp\\left(${args[0]}\\right)"},inv:{1:"\\left(${args[0]}\\right)^{-1}"},pinv:{1:"\\left(${args[0]}\\right)^{+}"},sqrtm:{1:"{${args[0]}}".concat(mt.pow,"{\\frac{1}{2}}")},trace:{1:"\\mathrm{tr}\\left(${args[0]}\\right)"},transpose:{1:"\\left(${args[0]}\\right)".concat(mt.transpose)},combinations:{2:"\\binom{${args[0]}}{${args[1]}}"},combinationsWithRep:{2:"\\left(\\!\\!{\\binom{${args[0]}}{${args[1]}}}\\!\\!\\right)"},factorial:{1:"\\left(${args[0]}\\right)".concat(mt.factorial)},gamma:{1:"\\Gamma\\left(${args[0]}\\right)"},lgamma:{1:"\\ln\\Gamma\\left(${args[0]}\\right)"},equal:{2:"\\left(${args[0]}".concat(mt.equal,"${args[1]}\\right)")},larger:{2:"\\left(${args[0]}".concat(mt.larger,"${args[1]}\\right)")},largerEq:{2:"\\left(${args[0]}".concat(mt.largerEq,"${args[1]}\\right)")},smaller:{2:"\\left(${args[0]}".concat(mt.smaller,"${args[1]}\\right)")},smallerEq:{2:"\\left(${args[0]}".concat(mt.smallerEq,"${args[1]}\\right)")},unequal:{2:"\\left(${args[0]}".concat(mt.unequal,"${args[1]}\\right)")},erf:{1:"erf\\left(${args[0]}\\right)"},max:"\\max\\left(${args}\\right)",min:"\\min\\left(${args}\\right)",variance:"\\mathrm{Var}\\left(${args}\\right)",acos:{1:"\\cos^{-1}\\left(${args[0]}\\right)"},acosh:{1:"\\cosh^{-1}\\left(${args[0]}\\right)"},acot:{1:"\\cot^{-1}\\left(${args[0]}\\right)"},acoth:{1:"\\coth^{-1}\\left(${args[0]}\\right)"},acsc:{1:"\\csc^{-1}\\left(${args[0]}\\right)"},acsch:{1:"\\mathrm{csch}^{-1}\\left(${args[0]}\\right)"},asec:{1:"\\sec^{-1}\\left(${args[0]}\\right)"},asech:{1:"\\mathrm{sech}^{-1}\\left(${args[0]}\\right)"},asin:{1:"\\sin^{-1}\\left(${args[0]}\\right)"},asinh:{1:"\\sinh^{-1}\\left(${args[0]}\\right)"},atan:{1:"\\tan^{-1}\\left(${args[0]}\\right)"},atan2:{2:"\\mathrm{atan2}\\left(${args}\\right)"},atanh:{1:"\\tanh^{-1}\\left(${args[0]}\\right)"},cos:{1:"\\cos\\left(${args[0]}\\right)"},cosh:{1:"\\cosh\\left(${args[0]}\\right)"},cot:{1:"\\cot\\left(${args[0]}\\right)"},coth:{1:"\\coth\\left(${args[0]}\\right)"},csc:{1:"\\csc\\left(${args[0]}\\right)"},csch:{1:"\\mathrm{csch}\\left(${args[0]}\\right)"},sec:{1:"\\sec\\left(${args[0]}\\right)"},sech:{1:"\\mathrm{sech}\\left(${args[0]}\\right)"},sin:{1:"\\sin\\left(${args[0]}\\right)"},sinh:{1:"\\sinh\\left(${args[0]}\\right)"},tan:{1:"\\tan\\left(${args[0]}\\right)"},tanh:{1:"\\tanh\\left(${args[0]}\\right)"},to:{2:"\\left(${args[0]}".concat(mt.to,"${args[1]}\\right)")},numeric:function(t,r){return t.args[0].toTex()},number:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"},string:{0:'\\mathtt{""}',1:"\\mathrm{string}\\left(${args[0]}\\right)"},bignumber:{0:"0",1:"\\left(${args[0]}\\right)"},bigint:{0:"0",1:"\\left(${args[0]}\\right)"},complex:{0:"0",1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)+".concat(td.i,"\\cdot\\left(${args[1]}\\right)\\right)")},matrix:{0:"\\begin{bmatrix}\\end{bmatrix}",1:"\\left(${args[0]}\\right)",2:"\\left(${args[0]}\\right)"},sparse:{0:"\\begin{bsparse}\\end{bsparse}",1:"\\left(${args[0]}\\right)"},unit:{1:"\\left(${args[0]}\\right)",2:"\\left(\\left(${args[0]}\\right)${args[1]}\\right)"}},iV="\\mathrm{${name}}\\left(${args}\\right)",yy={deg:"^\\circ"};function rd(e){return aV(e,{preserveFormatting:!0})}function tD(e,t){return t=typeof t>"u"?!1:t,t?Fe(yy,e)?yy[e]:"\\mathrm{"+rd(e)+"}":Fe(td,e)?td[e]:rd(e)}var ml="ConstantNode",oV=["Node","isBounded"],sV=I(ml,oV,e=>{var{Node:t,isBounded:r}=e;class n extends t{constructor(i){super(),this.value=i}get type(){return ml}get isConstantNode(){return!0}_compile(i,o){var s=this.value;return function(){return s}}forEach(i){}map(i){return this.clone()}clone(){return new n(this.value)}_toString(i){return it(this.value,i)}_toHTML(i){var o=this._toString(i);switch(Pt(this.value)){case"number":case"bigint":case"BigNumber":case"Fraction":return'<span class="math-number">'+o+"</span>";case"string":return'<span class="math-string">'+o+"</span>";case"boolean":return'<span class="math-boolean">'+o+"</span>";case"null":return'<span class="math-null-symbol">'+o+"</span>";case"undefined":return'<span class="math-undefined">'+o+"</span>";default:return'<span class="math-symbol">'+o+"</span>"}}toJSON(){return{mathjs:ml,value:this.value}}static fromJSON(i){return new n(i.value)}_toTex(i){var o=this._toString(i),s=Pt(this.value);switch(s){case"string":return"\\mathtt{"+rd(o)+"}";case"number":case"BigNumber":{if(!r(this.value))return this.value.valueOf()<0?"-\\infty":"\\infty";var u=o.toLowerCase().indexOf("e");return u!==-1?o.substring(0,u)+"\\cdot10^{"+o.substring(u+1)+"}":o}case"bigint":return o.toString();case"Fraction":return this.value.toLatex();default:return o}}}return ur(n,"name",ml),n},{isClass:!0,isNode:!0}),dl="FunctionAssignmentNode",uV=["typed","Node"],lV=I(dl,uV,e=>{var{typed:t,Node:r}=e;function n(i,o,s){var u=Ft(i,o,s),l=Ft(i.expr,o,s);return o==="all"||l!==null&&l<=u}class a extends r{constructor(o,s,u){if(super(),typeof o!="string")throw new TypeError('String expected for parameter "name"');if(!Array.isArray(s))throw new TypeError('Array containing strings or objects expected for parameter "params"');if(!Et(u))throw new TypeError('Node expected for parameter "expr"');if(X2.has(o))throw new Error('Illegal function name, "'+o+'" is a reserved keyword');var l=new Set;for(var c of s){var f=typeof c=="string"?c:c.name;if(l.has(f))throw new Error('Duplicate parameter name "'.concat(f,'"'));l.add(f)}this.name=o,this.params=s.map(function(m){return m&&m.name||m}),this.types=s.map(function(m){return m&&m.type||"any"}),this.expr=u}get type(){return dl}get isFunctionAssignmentNode(){return!0}_compile(o,s){var u=Object.create(s);Bx(this.params,function(p){u[p]=!0});var l=this.expr,c=l._compile(o,u),f=this.name,m=this.params,d=d0(this.types,","),h=f+"("+d0(this.params,", ")+")";return function(y,w,D){var v={};v[d]=function(){for(var g=Object.create(w),b=0;b<m.length;b++)g[m[b]]=arguments[b];return c(y,g,D)};var x=t(f,v);return x.syntax=h,x.expr=l.toString(),y.set(f,x),x}}forEach(o){o(this.expr,"expr",this)}map(o){var s=this._ifNode(o(this.expr,"expr",this));return new a(this.name,this.params.slice(0),s)}clone(){return new a(this.name,this.params.slice(0),this.expr)}_toString(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=this.expr.toString(o);return n(this,s,o&&o.implicit)&&(u="("+u+")"),this.name+"("+this.params.join(", ")+") = "+u}toJSON(){var o=this.types;return{mathjs:dl,name:this.name,params:this.params.map(function(s,u){return{name:s,type:o[u]}}),expr:this.expr}}static fromJSON(o){return new a(o.name,o.params,o.expr)}_toHTML(o){for(var s=o&&o.parenthesis?o.parenthesis:"keep",u=[],l=0;l<this.params.length;l++)u.push('<span class="math-symbol math-parameter">'+On(this.params[l])+"</span>");var c=this.expr.toHTML(o);return n(this,s,o&&o.implicit)&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>'),'<span class="math-function">'+On(this.name)+'</span><span class="math-parenthesis math-round-parenthesis">(</span>'+u.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-round-parenthesis">)</span><span class="math-operator math-assignment-operator math-variable-assignment-operator math-binary-operator">=</span>'+c}_toTex(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=this.expr.toTex(o);return n(this,s,o&&o.implicit)&&(u="\\left(".concat(u,"\\right)")),"\\mathrm{"+this.name+"}\\left("+this.params.map(tD).join(",")+"\\right)="+u}}return ur(a,"name",dl),a},{isClass:!0,isNode:!0}),hl="IndexNode",cV=["Node","size"],fV=I(hl,cV,e=>{var{Node:t,size:r}=e;class n extends t{constructor(i,o){if(super(),this.dimensions=i,this.dotNotation=o||!1,!Array.isArray(i)||!i.every(Et))throw new TypeError('Array containing Nodes expected for parameter "dimensions"');if(this.dotNotation&&!this.isObjectProperty())throw new Error("dotNotation only applicable for object properties")}get type(){return hl}get isIndexNode(){return!0}_compile(i,o){var s=li(this.dimensions,function(l,c){var f=l.filter(h=>h.isSymbolNode&&h.name==="end").length>0;if(f){var m=Object.create(o);m.end=!0;var d=l._compile(i,m);return function(p,y,w){if(!Le(w)&&!Tt(w)&&!Zt(w))throw new TypeError('Cannot resolve "end": context must be a Matrix, Array, or string but is '+Pt(w));var D=r(w),v=Object.create(y);return v.end=D[c],d(p,v,w)}}else return l._compile(i,o)}),u=Wr(i,"index");return function(c,f,m){var d=li(s,function(h){return h(c,f,m)});return u(...d)}}forEach(i){for(var o=0;o<this.dimensions.length;o++)i(this.dimensions[o],"dimensions["+o+"]",this)}map(i){for(var o=[],s=0;s<this.dimensions.length;s++)o[s]=this._ifNode(i(this.dimensions[s],"dimensions["+s+"]",this));return new n(o,this.dotNotation)}clone(){return new n(this.dimensions.slice(0),this.dotNotation)}isObjectProperty(){return this.dimensions.length===1&&ft(this.dimensions[0])&&typeof this.dimensions[0].value=="string"}getObjectProperty(){return this.isObjectProperty()?this.dimensions[0].value:null}_toString(i){return this.dotNotation?"."+this.getObjectProperty():"["+this.dimensions.join(", ")+"]"}toJSON(){return{mathjs:hl,dimensions:this.dimensions,dotNotation:this.dotNotation}}static fromJSON(i){return new n(i.dimensions,i.dotNotation)}_toHTML(i){for(var o=[],s=0;s<this.dimensions.length;s++)o[s]=this.dimensions[s].toHTML();return this.dotNotation?'<span class="math-operator math-accessor-operator">.</span><span class="math-symbol math-property">'+On(this.getObjectProperty())+"</span>":'<span class="math-parenthesis math-square-parenthesis">[</span>'+o.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-square-parenthesis">]</span>'}_toTex(i){var o=this.dimensions.map(function(s){return s.toTex(i)});return this.dotNotation?"."+this.getObjectProperty():"_{"+o.join(",")+"}"}}return ur(n,"name",hl),n},{isClass:!0,isNode:!0}),pl="ObjectNode",mV=["Node"],dV=I(pl,mV,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),this.properties=a||{},a&&(typeof a!="object"||!Object.keys(a).every(function(i){return Et(a[i])})))throw new TypeError("Object containing Nodes expected")}get type(){return pl}get isObjectNode(){return!0}_compile(a,i){var o={};for(var s in this.properties)if(Fe(this.properties,s)){var u=jo(s),l=JSON.parse(u),c=Wr(this.properties,s);o[l]=c._compile(a,i)}return function(m,d,h){var p={};for(var y in o)Fe(o,y)&&(p[y]=o[y](m,d,h));return p}}forEach(a){for(var i in this.properties)Fe(this.properties,i)&&a(this.properties[i],"properties["+jo(i)+"]",this)}map(a){var i={};for(var o in this.properties)Fe(this.properties,o)&&(i[o]=this._ifNode(a(this.properties[o],"properties["+jo(o)+"]",this)));return new r(i)}clone(){var a={};for(var i in this.properties)Fe(this.properties,i)&&(a[i]=this.properties[i]);return new r(a)}_toString(a){var i=[];for(var o in this.properties)Fe(this.properties,o)&&i.push(jo(o)+": "+this.properties[o].toString(a));return"{"+i.join(", ")+"}"}toJSON(){return{mathjs:pl,properties:this.properties}}static fromJSON(a){return new r(a.properties)}_toHTML(a){var i=[];for(var o in this.properties)Fe(this.properties,o)&&i.push('<span class="math-symbol math-property">'+On(o)+'</span><span class="math-operator math-assignment-operator math-property-assignment-operator math-binary-operator">:</span>'+this.properties[o].toHTML(a));return'<span class="math-parenthesis math-curly-parenthesis">{</span>'+i.join('<span class="math-separator">,</span>')+'<span class="math-parenthesis math-curly-parenthesis">}</span>'}_toTex(a){var i=[];for(var o in this.properties)Fe(this.properties,o)&&i.push("\\mathbf{"+o+":} & "+this.properties[o].toTex(a)+"\\\\");var s="\\left\\{\\begin{array}{ll}"+i.join(`
39
+ `)+"\\end{array}\\right\\}";return s}}return ur(r,"name",pl),r},{isClass:!0,isNode:!0});function Fs(e,t){return new ox(e,new Dc(t),new Set(Object.keys(t)))}var gl="OperatorNode",hV=["Node"],pV=I(gl,hV,e=>{var{Node:t}=e;function r(i,o){var s=i;if(o==="auto")for(;La(s);)s=s.content;return ft(s)?!0:er(s)?r(s.args[0],o):!1}function n(i,o,s,u,l){var c=Ft(i,o,s),f=Es(i,o);if(o==="all"||u.length>2&&i.getIdentifier()!=="OperatorNode:add"&&i.getIdentifier()!=="OperatorNode:multiply")return u.map(function(E){switch(E.getContent().type){case"ArrayNode":case"ConstantNode":case"SymbolNode":case"ParenthesisNode":return!1;default:return!0}});var m;switch(u.length){case 0:m=[];break;case 1:{var d=Ft(u[0],o,s,i);if(l&&d!==null){var h,p;if(o==="keep"?(h=u[0].getIdentifier(),p=i.getIdentifier()):(h=u[0].getContent().getIdentifier(),p=i.getContent().getIdentifier()),Jn[c][p].latexLeftParens===!1){m=[!1];break}if(Jn[d][h].latexParens===!1){m=[!1];break}}if(d===null){m=[!1];break}if(d<=c){m=[!0];break}m=[!1]}break;case 2:{var y,w=Ft(u[0],o,s,i),D=Hf(i,u[0],o);w===null?y=!1:w===c&&f==="right"&&!D||w<c?y=!0:y=!1;var v,x=Ft(u[1],o,s,i),g=Hf(i,u[1],o);if(x===null?v=!1:x===c&&f==="left"&&!g||x<c?v=!0:v=!1,l){var b,C,N;o==="keep"?(b=i.getIdentifier(),C=i.args[0].getIdentifier(),N=i.args[1].getIdentifier()):(b=i.getContent().getIdentifier(),C=i.args[0].getContent().getIdentifier(),N=i.args[1].getContent().getIdentifier()),w!==null&&(Jn[c][b].latexLeftParens===!1&&(y=!1),Jn[w][C].latexParens===!1&&(y=!1)),x!==null&&(Jn[c][b].latexRightParens===!1&&(v=!1),Jn[x][N].latexParens===!1&&(v=!1))}m=[y,v]}break;default:(i.getIdentifier()==="OperatorNode:add"||i.getIdentifier()==="OperatorNode:multiply")&&(m=u.map(function(E){var S=Ft(E,o,s,i),F=Hf(i,E,o),k=Es(E,o);return S===null?!1:c===S&&f===k&&!F?!0:S<c}));break}if(u.length>=2&&i.getIdentifier()==="OperatorNode:multiply"&&i.implicit&&o!=="all"&&s==="hide")for(var A=1;A<m.length;++A)r(u[A],o)&&!m[A-1]&&(o!=="keep"||!La(u[A-1]))&&(m[A]=!0);return m}class a extends t{constructor(o,s,u,l,c){if(super(),typeof o!="string")throw new TypeError('string expected for parameter "op"');if(typeof s!="string")throw new TypeError('string expected for parameter "fn"');if(!Array.isArray(u)||!u.every(Et))throw new TypeError('Array containing Nodes expected for parameter "args"');this.implicit=l===!0,this.isPercentage=c===!0,this.op=o,this.fn=s,this.args=u||[]}get type(){return gl}get isOperatorNode(){return!0}_compile(o,s){if(typeof this.fn!="string"||!Ad(o,this.fn))throw o[this.fn]?new Error('No access to function "'+this.fn+'"'):new Error("Function "+this.fn+' missing in provided namespace "math"');var u=Wr(o,this.fn),l=li(this.args,function(h){return h._compile(o,s)});if(typeof u=="function"&&u.rawArgs===!0){var c=this.args;return function(p,y,w){return u(c,o,Fs(p,y))}}else if(l.length===1){var f=l[0];return function(p,y,w){return u(f(p,y,w))}}else if(l.length===2){var m=l[0],d=l[1];return function(p,y,w){return u(m(p,y,w),d(p,y,w))}}else return function(p,y,w){return u.apply(null,li(l,function(D){return D(p,y,w)}))}}forEach(o){for(var s=0;s<this.args.length;s++)o(this.args[s],"args["+s+"]",this)}map(o){for(var s=[],u=0;u<this.args.length;u++)s[u]=this._ifNode(o(this.args[u],"args["+u+"]",this));return new a(this.op,this.fn,s,this.implicit,this.isPercentage)}clone(){return new a(this.op,this.fn,this.args.slice(0),this.implicit,this.isPercentage)}isUnary(){return this.args.length===1}isBinary(){return this.args.length===2}_toString(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",l=this.args,c=n(this,s,u,l,!1);if(l.length===1){var f=Es(this,s),m=l[0].toString(o);c[0]&&(m="("+m+")");var d=/[a-zA-Z]+/.test(this.op);return f==="right"?this.op+(d?" ":"")+m:f==="left"?m+(d?" ":"")+this.op:m+this.op}else if(l.length===2){var h=l[0].toString(o),p=l[1].toString(o);return c[0]&&(h="("+h+")"),c[1]&&(p="("+p+")"),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?h+" "+p:h+" "+this.op+" "+p}else if(l.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var y=l.map(function(w,D){return w=w.toString(o),c[D]&&(w="("+w+")"),w});return this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?y.join(" "):y.join(" "+this.op+" ")}else return this.fn+"("+this.args.join(", ")+")"}toJSON(){return{mathjs:gl,op:this.op,fn:this.fn,args:this.args,implicit:this.implicit,isPercentage:this.isPercentage}}static fromJSON(o){return new a(o.op,o.fn,o.args,o.implicit,o.isPercentage)}_toHTML(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",l=this.args,c=n(this,s,u,l,!1);if(l.length===1){var f=Es(this,s),m=l[0].toHTML(o);return c[0]&&(m='<span class="math-parenthesis math-round-parenthesis">(</span>'+m+'<span class="math-parenthesis math-round-parenthesis">)</span>'),f==="right"?'<span class="math-operator math-unary-operator math-lefthand-unary-operator">'+On(this.op)+"</span>"+m:m+'<span class="math-operator math-unary-operator math-righthand-unary-operator">'+On(this.op)+"</span>"}else if(l.length===2){var d=l[0].toHTML(o),h=l[1].toHTML(o);return c[0]&&(d='<span class="math-parenthesis math-round-parenthesis">(</span>'+d+'<span class="math-parenthesis math-round-parenthesis">)</span>'),c[1]&&(h='<span class="math-parenthesis math-round-parenthesis">(</span>'+h+'<span class="math-parenthesis math-round-parenthesis">)</span>'),this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?d+'<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'+h:d+'<span class="math-operator math-binary-operator math-explicit-binary-operator">'+On(this.op)+"</span>"+h}else{var p=l.map(function(y,w){return y=y.toHTML(o),c[w]&&(y='<span class="math-parenthesis math-round-parenthesis">(</span>'+y+'<span class="math-parenthesis math-round-parenthesis">)</span>'),y});return l.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")?this.implicit&&this.getIdentifier()==="OperatorNode:multiply"&&u==="hide"?p.join('<span class="math-operator math-binary-operator math-implicit-binary-operator"></span>'):p.join('<span class="math-operator math-binary-operator math-explicit-binary-operator">'+On(this.op)+"</span>"):'<span class="math-function">'+On(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+p.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}}_toTex(o){var s=o&&o.parenthesis?o.parenthesis:"keep",u=o&&o.implicit?o.implicit:"hide",l=this.args,c=n(this,s,u,l,!0),f=mt[this.fn];if(f=typeof f>"u"?this.op:f,l.length===1){var m=Es(this,s),d=l[0].toTex(o);return c[0]&&(d="\\left(".concat(d,"\\right)")),m==="right"?f+d:d+f}else if(l.length===2){var h=l[0],p=h.toTex(o);c[0]&&(p="\\left(".concat(p,"\\right)"));var y=l[1],w=y.toTex(o);c[1]&&(w="\\left(".concat(w,"\\right)"));var D;switch(s==="keep"?D=h.getIdentifier():D=h.getContent().getIdentifier(),this.getIdentifier()){case"OperatorNode:divide":return f+"{"+p+"}{"+w+"}";case"OperatorNode:pow":switch(p="{"+p+"}",w="{"+w+"}",D){case"ConditionalNode":case"OperatorNode:divide":p="\\left(".concat(p,"\\right)")}break;case"OperatorNode:multiply":if(this.implicit&&u==="hide")return p+"~"+w}return p+f+w}else if(l.length>2&&(this.getIdentifier()==="OperatorNode:add"||this.getIdentifier()==="OperatorNode:multiply")){var v=l.map(function(x,g){return x=x.toTex(o),c[g]&&(x="\\left(".concat(x,"\\right)")),x});return this.getIdentifier()==="OperatorNode:multiply"&&this.implicit&&u==="hide"?v.join("~"):v.join(f)}else return"\\mathrm{"+this.fn+"}\\left("+l.map(function(x){return x.toTex(o)}).join(",")+"\\right)"}getIdentifier(){return this.type+":"+this.fn}}return ur(a,"name",gl),a},{isClass:!0,isNode:!0}),vl="ParenthesisNode",gV=["Node"],vV=I(vl,gV,e=>{var{Node:t}=e;class r extends t{constructor(a){if(super(),!Et(a))throw new TypeError('Node expected for parameter "content"');this.content=a}get type(){return vl}get isParenthesisNode(){return!0}_compile(a,i){return this.content._compile(a,i)}getContent(){return this.content.getContent()}forEach(a){a(this.content,"content",this)}map(a){var i=a(this.content,"content",this);return new r(i)}clone(){return new r(this.content)}_toString(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?"("+this.content.toString(a)+")":this.content.toString(a)}toJSON(){return{mathjs:vl,content:this.content}}static fromJSON(a){return new r(a.content)}_toHTML(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?'<span class="math-parenthesis math-round-parenthesis">(</span>'+this.content.toHTML(a)+'<span class="math-parenthesis math-round-parenthesis">)</span>':this.content.toHTML(a)}_toTex(a){return!a||a&&!a.parenthesis||a&&a.parenthesis==="keep"?"\\left(".concat(this.content.toTex(a),"\\right)"):this.content.toTex(a)}}return ur(r,"name",vl),r},{isClass:!0,isNode:!0}),yl="RangeNode",yV=["Node"],bV=I(yl,yV,e=>{var{Node:t}=e;function r(a,i,o){var s=Ft(a,i,o),u={},l=Ft(a.start,i,o);if(u.start=l!==null&&l<=s||i==="all",a.step){var c=Ft(a.step,i,o);u.step=c!==null&&c<=s||i==="all"}var f=Ft(a.end,i,o);return u.end=f!==null&&f<=s||i==="all",u}class n extends t{constructor(i,o,s){if(super(),!Et(i))throw new TypeError("Node expected");if(!Et(o))throw new TypeError("Node expected");if(s&&!Et(s))throw new TypeError("Node expected");if(arguments.length>3)throw new Error("Too many arguments");this.start=i,this.end=o,this.step=s||null}get type(){return yl}get isRangeNode(){return!0}needsEnd(){var i=this.filter(function(o){return Dr(o)&&o.name==="end"});return i.length>0}_compile(i,o){var s=i.range,u=this.start._compile(i,o),l=this.end._compile(i,o);if(this.step){var c=this.step._compile(i,o);return function(m,d,h){return s(u(m,d,h),l(m,d,h),c(m,d,h))}}else return function(m,d,h){return s(u(m,d,h),l(m,d,h))}}forEach(i){i(this.start,"start",this),i(this.end,"end",this),this.step&&i(this.step,"step",this)}map(i){return new n(this._ifNode(i(this.start,"start",this)),this._ifNode(i(this.end,"end",this)),this.step&&this._ifNode(i(this.step,"step",this)))}clone(){return new n(this.start,this.end,this.step&&this.step)}_toString(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=r(this,o,i&&i.implicit),u,l=this.start.toString(i);if(s.start&&(l="("+l+")"),u=l,this.step){var c=this.step.toString(i);s.step&&(c="("+c+")"),u+=":"+c}var f=this.end.toString(i);return s.end&&(f="("+f+")"),u+=":"+f,u}toJSON(){return{mathjs:yl,start:this.start,end:this.end,step:this.step}}static fromJSON(i){return new n(i.start,i.end,i.step)}_toHTML(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=r(this,o,i&&i.implicit),u,l=this.start.toHTML(i);if(s.start&&(l='<span class="math-parenthesis math-round-parenthesis">(</span>'+l+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u=l,this.step){var c=this.step.toHTML(i);s.step&&(c='<span class="math-parenthesis math-round-parenthesis">(</span>'+c+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+='<span class="math-operator math-range-operator">:</span>'+c}var f=this.end.toHTML(i);return s.end&&(f='<span class="math-parenthesis math-round-parenthesis">(</span>'+f+'<span class="math-parenthesis math-round-parenthesis">)</span>'),u+='<span class="math-operator math-range-operator">:</span>'+f,u}_toTex(i){var o=i&&i.parenthesis?i.parenthesis:"keep",s=r(this,o,i&&i.implicit),u=this.start.toTex(i);if(s.start&&(u="\\left(".concat(u,"\\right)")),this.step){var l=this.step.toTex(i);s.step&&(l="\\left(".concat(l,"\\right)")),u+=":"+l}var c=this.end.toTex(i);return s.end&&(c="\\left(".concat(c,"\\right)")),u+=":"+c,u}}return ur(n,"name",yl),n},{isClass:!0,isNode:!0}),bl="RelationalNode",wV=["Node"],xV=I(bl,wV,e=>{var{Node:t}=e,r={equal:"==",unequal:"!=",smaller:"<",larger:">",smallerEq:"<=",largerEq:">="};class n extends t{constructor(i,o){if(super(),!Array.isArray(i))throw new TypeError("Parameter conditionals must be an array");if(!Array.isArray(o))throw new TypeError("Parameter params must be an array");if(i.length!==o.length-1)throw new TypeError("Parameter params must contain exactly one more element than parameter conditionals");this.conditionals=i,this.params=o}get type(){return bl}get isRelationalNode(){return!0}_compile(i,o){var s=this,u=this.params.map(l=>l._compile(i,o));return function(c,f,m){for(var d,h=u[0](c,f,m),p=0;p<s.conditionals.length;p++){d=h,h=u[p+1](c,f,m);var y=Wr(i,s.conditionals[p]);if(!y(d,h))return!1}return!0}}forEach(i){this.params.forEach((o,s)=>i(o,"params["+s+"]",this),this)}map(i){return new n(this.conditionals.slice(),this.params.map((o,s)=>this._ifNode(i(o,"params["+s+"]",this)),this))}clone(){return new n(this.conditionals,this.params)}_toString(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",s=Ft(this,o,i&&i.implicit),u=this.params.map(function(f,m){var d=Ft(f,o,i&&i.implicit);return o==="all"||d!==null&&d<=s?"("+f.toString(i)+")":f.toString(i)}),l=u[0],c=0;c<this.conditionals.length;c++)l+=" "+r[this.conditionals[c]],l+=" "+u[c+1];return l}toJSON(){return{mathjs:bl,conditionals:this.conditionals,params:this.params}}static fromJSON(i){return new n(i.conditionals,i.params)}_toHTML(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",s=Ft(this,o,i&&i.implicit),u=this.params.map(function(f,m){var d=Ft(f,o,i&&i.implicit);return o==="all"||d!==null&&d<=s?'<span class="math-parenthesis math-round-parenthesis">(</span>'+f.toHTML(i)+'<span class="math-parenthesis math-round-parenthesis">)</span>':f.toHTML(i)}),l=u[0],c=0;c<this.conditionals.length;c++)l+='<span class="math-operator math-binary-operator math-explicit-binary-operator">'+On(r[this.conditionals[c]])+"</span>"+u[c+1];return l}_toTex(i){for(var o=i&&i.parenthesis?i.parenthesis:"keep",s=Ft(this,o,i&&i.implicit),u=this.params.map(function(f,m){var d=Ft(f,o,i&&i.implicit);return o==="all"||d!==null&&d<=s?"\\left("+f.toTex(i)+"\right)":f.toTex(i)}),l=u[0],c=0;c<this.conditionals.length;c++)l+=mt[this.conditionals[c]]+u[c+1];return l}}return ur(n,"name",bl),n},{isClass:!0,isNode:!0}),DV="SymbolNode",NV=["math","?Unit","Node"],AV=I(DV,NV,e=>{var{math:t,Unit:r,Node:n}=e;function a(o){return r?r.isValuelessUnit(o):!1}class i extends n{constructor(s){if(super(),typeof s!="string")throw new TypeError('String expected for parameter "name"');this.name=s}get type(){return"SymbolNode"}get isSymbolNode(){return!0}_compile(s,u){var l=this.name;if(u[l]===!0)return function(f,m,d){return Wr(m,l)};if(l in s)return function(f,m,d){return f.has(l)?f.get(l):Wr(s,l)};var c=a(l);return function(f,m,d){return f.has(l)?f.get(l):c?new r(null,l):i.onUndefinedSymbol(l)}}forEach(s){}map(s){return this.clone()}static onUndefinedSymbol(s){throw new Error("Undefined symbol "+s)}clone(){return new i(this.name)}_toString(s){return this.name}_toHTML(s){var u=On(this.name);return u==="true"||u==="false"?'<span class="math-symbol math-boolean">'+u+"</span>":u==="i"?'<span class="math-symbol math-imaginary-symbol">'+u+"</span>":u==="Infinity"?'<span class="math-symbol math-infinity-symbol">'+u+"</span>":u==="NaN"?'<span class="math-symbol math-nan-symbol">'+u+"</span>":u==="null"?'<span class="math-symbol math-null-symbol">'+u+"</span>":u==="undefined"?'<span class="math-symbol math-undefined-symbol">'+u+"</span>":'<span class="math-symbol">'+u+"</span>"}toJSON(){return{mathjs:"SymbolNode",name:this.name}}static fromJSON(s){return new i(s.name)}_toTex(s){var u=!1;typeof t[this.name]>"u"&&a(this.name)&&(u=!0);var l=tD(this.name,u);return l[0]==="\\"?l:" "+l}}return i},{isClass:!0,isNode:!0}),wl="FunctionNode",CV=["math","Node","SymbolNode"],EV=I(wl,CV,e=>{var t,{math:r,Node:n,SymbolNode:a}=e,i=u=>it(u,{truncate:78});function o(u,l,c){for(var f="",m=/\$(?:\{([a-z_][a-z_0-9]*)(?:\[([0-9]+)\])?\}|\$)/gi,d=0,h;(h=m.exec(u))!==null;)if(f+=u.substring(d,h.index),d=h.index,h[0]==="$$")f+="$",d++;else{d+=h[0].length;var p=l[h[1]];if(!p)throw new ReferenceError("Template: Property "+h[1]+" does not exist.");if(h[2]===void 0)switch(typeof p){case"string":f+=p;break;case"object":if(Et(p))f+=p.toTex(c);else if(Array.isArray(p))f+=p.map(function(y,w){if(Et(y))return y.toTex(c);throw new TypeError("Template: "+h[1]+"["+w+"] is not a Node.")}).join(",");else throw new TypeError("Template: "+h[1]+" has to be a Node, String or array of Nodes");break;default:throw new TypeError("Template: "+h[1]+" has to be a Node, String or array of Nodes")}else if(Et(p[h[2]]&&p[h[2]]))f+=p[h[2]].toTex(c);else throw new TypeError("Template: "+h[1]+"["+h[2]+"] is not a Node.")}return f+=u.slice(d),f}class s extends n{constructor(l,c,f){if(super(),typeof l=="string"&&(l=new a(l)),!Et(l))throw new TypeError('Node expected as parameter "fn"');if(!Array.isArray(c)||!c.every(Et))throw new TypeError('Array containing Nodes expected for parameter "args"');var m=typeof f;if(!(m==="undefined"||m==="boolean"))throw new TypeError("optional flag, if specified, must be boolean");this.fn=l,this.args=c||[],this.optional=!!f}get name(){return this.fn.name||""}get type(){return wl}get isFunctionNode(){return!0}_compile(l,c){var f=this.args.map(A=>A._compile(l,c)),m=this.optional||Ra(this.fn)&&this.fn.optionalChaining;if(Dr(this.fn)){var d=this.fn.name;if(c[d]){var D=this.args;return function(E,S,F){var k=Wr(S,d);if(!(m&&k===void 0)){if(typeof k!="function")throw new TypeError("Argument '".concat(d,"' was not a function; received: ").concat(i(k)));if(k.rawArgs)return k(D,l,Fs(E,S));var $=f.map(R=>R(E,S,F));return k.apply(k,$)}}}else{var h=d in l?Wr(l,d):void 0,p=typeof h=="function"&&h.rawArgs===!0,y=A=>{var E;if(A.has(d))E=A.get(d);else if(d in l)E=Wr(l,d);else if(m)E=void 0;else return s.onUndefinedFunction(d);if(typeof E=="function"||m&&E===void 0)return E;throw new TypeError("'".concat(d,`' is not a function; its value is:
40
+ `).concat(i(E)))};if(p){var w=this.args;return function(E,S,F){var k=y(E);if(k.rawArgs===!0)return k(w,l,Fs(E,S));var $=f.map(R=>R(E,S,F));return k(...$)}}else switch(f.length){case 0:return function(E,S,F){var k=y(E);if(!(m&&k===void 0))return k()};case 1:return function(E,S,F){var k=y(E);if(!(m&&k===void 0)){var $=f[0];return k($(E,S,F))}};case 2:return function(E,S,F){var k=y(E);if(!(m&&k===void 0)){var $=f[0],R=f[1];return k($(E,S,F),R(E,S,F))}};default:return function(E,S,F){var k=y(E);if(!(m&&k===void 0)){var $=f.map(R=>R(E,S,F));return k(...$)}}}}}else if(Ra(this.fn)&&rs(this.fn.index)&&this.fn.index.isObjectProperty()){var v=this.fn.object._compile(l,c),x=this.fn.index.getObjectProperty(),g=this.args;return function(E,S,F){var k=v(E,S,F);if(!(m&&(k==null||k[x]===void 0))){var $=W6(k,x);if($!=null&&$.rawArgs)return $(g,l,Fs(E,S));var R=f.map(M=>M(E,S,F));return $.apply(k,R)}}}else{var b=this.fn.toString(),C=this.fn._compile(l,c),N=this.args;return function(E,S,F){var k=C(E,S,F);if(!(m&&k===void 0)){if(typeof k!="function")throw new TypeError("Expression '".concat(b,"' did not evaluate to a function; value is:")+`
41
+ `.concat(i(k)));if(k.rawArgs)return k(N,l,Fs(E,S));var $=f.map(R=>R(E,S,F));return k.apply(k,$)}}}}forEach(l){l(this.fn,"fn",this);for(var c=0;c<this.args.length;c++)l(this.args[c],"args["+c+"]",this)}map(l){for(var c=this._ifNode(l(this.fn,"fn",this)),f=[],m=0;m<this.args.length;m++)f[m]=this._ifNode(l(this.args[m],"args["+m+"]",this));return new s(c,f)}clone(){return new s(this.fn,this.args.slice(0))}toString(l){var c,f=this.fn.toString(l);return l&&typeof l.handler=="object"&&Fe(l.handler,f)&&(c=l.handler[f](this,l)),typeof c<"u"?c:super.toString(l)}_toString(l){var c=this.args.map(function(m){return m.toString(l)}),f=iu(this.fn)?"("+this.fn.toString(l)+")":this.fn.toString(l);return f+"("+c.join(", ")+")"}toJSON(){return{mathjs:wl,fn:this.fn,args:this.args}}_toHTML(l){var c=this.args.map(function(f){return f.toHTML(l)});return'<span class="math-function">'+On(this.fn)+'</span><span class="math-paranthesis math-round-parenthesis">(</span>'+c.join('<span class="math-separator">,</span>')+'<span class="math-paranthesis math-round-parenthesis">)</span>'}toTex(l){var c;return l&&typeof l.handler=="object"&&Fe(l.handler,this.name)&&(c=l.handler[this.name](this,l)),typeof c<"u"?c:super.toTex(l)}_toTex(l){var c=this.args.map(function(d){return d.toTex(l)}),f;vy[this.name]&&(f=vy[this.name]),r[this.name]&&(typeof r[this.name].toTex=="function"||typeof r[this.name].toTex=="object"||typeof r[this.name].toTex=="string")&&(f=r[this.name].toTex);var m;switch(typeof f){case"function":m=f(this,l);break;case"string":m=o(f,this,l);break;case"object":switch(typeof f[c.length]){case"function":m=f[c.length](this,l);break;case"string":m=o(f[c.length],this,l);break}}return typeof m<"u"?m:o(iV,this,l)}getIdentifier(){return this.type+":"+this.name}}return t=s,ur(s,"name",wl),ur(s,"onUndefinedFunction",function(u){throw new Error("Undefined function "+u)}),ur(s,"fromJSON",function(u){return new t(u.fn,u.args)}),s},{isClass:!0,isNode:!0}),by="parse",SV=["typed","numeric","config","AccessorNode","ArrayNode","AssignmentNode","BlockNode","ConditionalNode","ConstantNode","FunctionAssignmentNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","RangeNode","RelationalNode","SymbolNode"],MV=I(by,SV,e=>{var{typed:t,numeric:r,config:n,AccessorNode:a,ArrayNode:i,AssignmentNode:o,BlockNode:s,ConditionalNode:u,ConstantNode:l,FunctionAssignmentNode:c,FunctionNode:f,IndexNode:m,ObjectNode:d,OperatorNode:h,ParenthesisNode:p,RangeNode:y,RelationalNode:w,SymbolNode:D}=e,v=t(by,{string:function(Y){return G(Y,{})},"Array | Matrix":function(Y){return x(Y,{})},"string, Object":function(Y,le){var ye=le.nodes!==void 0?le.nodes:{};return G(Y,ye)},"Array | Matrix, Object":x});function x(T){var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},le=Y.nodes!==void 0?Y.nodes:{};return Xe(T,function(ye){if(typeof ye!="string")throw new TypeError("String expected");return G(ye,le)})}var g={NULL:0,DELIMITER:1,NUMBER:2,SYMBOL:3,UNKNOWN:4},b={",":!0,"(":!0,")":!0,"[":!0,"]":!0,"{":!0,"}":!0,'"':!0,"'":!0,";":!0,"+":!0,"-":!0,"*":!0,".*":!0,"/":!0,"./":!0,"%":!0,"^":!0,".^":!0,"~":!0,"!":!0,"&":!0,"|":!0,"^|":!0,"=":!0,":":!0,"?":!0,"?.":!0,"??":!0,"==":!0,"!=":!0,"<":!0,">":!0,"<=":!0,">=":!0,"<<":!0,">>":!0,">>>":!0},C={mod:!0,to:!0,in:!0,and:!0,xor:!0,or:!0,not:!0},N={true:!0,false:!1,null:null,undefined:void 0},A=["NaN","Infinity"],E={'"':'"',"'":"'","\\":"\\","/":"/",b:"\b",f:"\f",n:`
42
+ `,r:"\r",t:" "};function S(){return{extraNodes:{},expression:"",comment:"",index:0,token:"",tokenType:g.NULL,nestingLevel:0,conditionalLevel:null}}function F(T,Y){return T.expression.substr(T.index,Y)}function k(T){return F(T,1)}function $(T){T.index++}function R(T){return T.expression.charAt(T.index-1)}function M(T){return T.expression.charAt(T.index+1)}function B(T){for(T.tokenType=g.NULL,T.token="",T.comment="";;){if(k(T)==="#")for(;k(T)!==`
43
+ `&&k(T)!=="";)T.comment+=k(T),$(T);if(v.isWhitespace(k(T),T.nestingLevel))$(T);else break}if(k(T)===""){T.tokenType=g.DELIMITER;return}if(k(T)===`
44
+ `&&!T.nestingLevel){T.tokenType=g.DELIMITER,T.token=k(T),$(T);return}var Y=k(T),le=F(T,2),ye=F(T,3);if(ye.length===3&&b[ye]){T.tokenType=g.DELIMITER,T.token=ye,$(T),$(T),$(T);return}if(le.length===2&&b[le]&&(le!=="?."||!v.isDigit(T.expression.charAt(T.index+2)))){T.tokenType=g.DELIMITER,T.token=le,$(T),$(T);return}if(b[Y]){T.tokenType=g.DELIMITER,T.token=Y,$(T);return}if(v.isDigitDot(Y)){T.tokenType=g.NUMBER;var $e=F(T,2);if($e==="0b"||$e==="0o"||$e==="0x"){for(T.token+=k(T),$(T),T.token+=k(T),$(T);v.isAlpha(k(T),R(T),M(T))||v.isDigit(k(T));)T.token+=k(T),$(T);if(k(T)===".")for(T.token+=".",$(T);v.isAlpha(k(T),R(T),M(T))||v.isDigit(k(T));)T.token+=k(T),$(T);else if(k(T)==="i")for(T.token+="i",$(T);v.isDigit(k(T));)T.token+=k(T),$(T);return}if(k(T)==="."){if(T.token+=k(T),$(T),!v.isDigit(k(T))){T.tokenType=g.DELIMITER;return}}else{for(;v.isDigit(k(T));)T.token+=k(T),$(T);v.isDecimalMark(k(T),M(T))&&(T.token+=k(T),$(T))}for(;v.isDigit(k(T));)T.token+=k(T),$(T);if(k(T)==="E"||k(T)==="e"){if(v.isDigit(M(T))||M(T)==="-"||M(T)==="+"){if(T.token+=k(T),$(T),(k(T)==="+"||k(T)==="-")&&(T.token+=k(T),$(T)),!v.isDigit(k(T)))throw nt(T,'Digit expected, got "'+k(T)+'"');for(;v.isDigit(k(T));)T.token+=k(T),$(T);if(v.isDecimalMark(k(T),M(T)))throw nt(T,'Digit expected, got "'+k(T)+'"')}else if(v.isDecimalMark(M(T),T.expression.charAt(T.index+2)))throw $(T),nt(T,'Digit expected, got "'+k(T)+'"')}return}if(v.isAlpha(k(T),R(T),M(T))){for(;v.isAlpha(k(T),R(T),M(T))||v.isDigit(k(T));)T.token+=k(T),$(T);Fe(C,T.token)?T.tokenType=g.DELIMITER:T.tokenType=g.SYMBOL;return}for(T.tokenType=g.UNKNOWN;k(T)!=="";)T.token+=k(T),$(T);throw nt(T,'Syntax error in part "'+T.token+'"')}function L(T){do B(T);while(T.token===`
45
+ `)}function j(T){T.nestingLevel++}function Z(T){T.nestingLevel--}v.isAlpha=function(Y,le,ye){return v.isValidLatinOrGreek(Y)||v.isValidMathSymbol(Y,ye)||v.isValidMathSymbol(le,Y)},v.isValidLatinOrGreek=function(Y){return/^[a-zA-Z_$\u00C0-\u02AF\u0370-\u03FF\u2100-\u214F]$/.test(Y)},v.isValidMathSymbol=function(Y,le){return/^[\uD835]$/.test(Y)&&/^[\uDC00-\uDFFF]$/.test(le)&&/^[^\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]$/.test(le)},v.isWhitespace=function(Y,le){return Y===" "||Y===" "||Y===" "||Y===`
46
+ `&&le>0},v.isDecimalMark=function(Y,le){return Y==="."&&le!=="/"&&le!=="*"&&le!=="^"},v.isDigitDot=function(Y){return Y>="0"&&Y<="9"||Y==="."},v.isDigit=function(Y){return Y>="0"&&Y<="9"};function G(T,Y){var le=S();tr(le,{expression:T,extraNodes:Y}),B(le);var ye=V(le);if(le.token!=="")throw le.tokenType===g.DELIMITER?Lt(le,"Unexpected operator "+le.token):nt(le,'Unexpected part "'+le.token+'"');return ye}function V(T){var Y,le=[],ye;for(T.token!==""&&T.token!==`
47
+ `&&T.token!==";"&&(Y=P(T),T.comment&&(Y.comment=T.comment));T.token===`
48
+ `||T.token===";";)le.length===0&&Y&&(ye=T.token!==";",le.push({node:Y,visible:ye})),B(T),T.token!==`
49
+ `&&T.token!==";"&&T.token!==""&&(Y=P(T),T.comment&&(Y.comment=T.comment),ye=T.token!==";",le.push({node:Y,visible:ye}));return le.length>0?new s(le):(Y||(Y=new l(void 0),T.comment&&(Y.comment=T.comment)),Y)}function P(T){var Y,le,ye,$e,Ue=Q(T);if(T.token==="="){if(Dr(Ue))return Y=Ue.name,L(T),ye=P(T),new o(new D(Y),ye);if(Ra(Ue)){if(Ue.optionalChaining)throw nt(T,"Cannot assign to optional chain");return L(T),ye=P(T),new o(Ue.object,Ue.index,ye)}else if(di(Ue)&&Dr(Ue.fn)&&($e=!0,le=[],Y=Ue.name,Ue.args.forEach(function(Lr,ho){Dr(Lr)?le[ho]=Lr.name:$e=!1}),$e))return L(T),ye=P(T),new c(Y,le,ye);throw nt(T,"Invalid left hand side of assignment operator =")}return Ue}function Q(T){for(var Y=z(T);T.token==="?";){var le=T.conditionalLevel;T.conditionalLevel=T.nestingLevel,L(T);var ye=Y,$e=P(T);if(T.token!==":")throw nt(T,"False part of conditional expression expected");T.conditionalLevel=null,L(T);var Ue=P(T);Y=new u(ye,$e,Ue),T.conditionalLevel=le}return Y}function z(T){for(var Y=oe(T);T.token==="or";)L(T),Y=new h("or","or",[Y,oe(T)]);return Y}function oe(T){for(var Y=ne(T);T.token==="xor";)L(T),Y=new h("xor","xor",[Y,ne(T)]);return Y}function ne(T){for(var Y=U(T);T.token==="and";)L(T),Y=new h("and","and",[Y,U(T)]);return Y}function U(T){for(var Y=_(T);T.token==="|";)L(T),Y=new h("|","bitOr",[Y,_(T)]);return Y}function _(T){for(var Y=J(T);T.token==="^|";)L(T),Y=new h("^|","bitXor",[Y,J(T)]);return Y}function J(T){for(var Y=ae(T);T.token==="&";)L(T),Y=new h("&","bitAnd",[Y,ae(T)]);return Y}function ae(T){for(var Y=[ee(T)],le=[],ye={"==":"equal","!=":"unequal","<":"smaller",">":"larger","<=":"smallerEq",">=":"largerEq"};Fe(ye,T.token);){var $e={name:T.token,fn:ye[T.token]};le.push($e),L(T),Y.push(ee(T))}return Y.length===1?Y[0]:Y.length===2?new h(le[0].name,le[0].fn,Y):new w(le.map(Ue=>Ue.fn),Y)}function ee(T){var Y,le,ye,$e;Y=ue(T);for(var Ue={"<<":"leftShift",">>":"rightArithShift",">>>":"rightLogShift"};Fe(Ue,T.token);)le=T.token,ye=Ue[le],L(T),$e=[Y,ue(T)],Y=new h(le,ye,$e);return Y}function ue(T){var Y,le,ye,$e;Y=se(T);for(var Ue={to:"to",in:"to"};Fe(Ue,T.token);)le=T.token,ye=Ue[le],L(T),le==="in"&&"])},;".includes(T.token)?Y=new h("*","multiply",[Y,new D("in")],!0):($e=[Y,se(T)],Y=new h(le,ye,$e));return Y}function se(T){var Y,le=[];if(T.token===":"?Y=new l(1):Y=be(T),T.token===":"&&T.conditionalLevel!==T.nestingLevel){for(le.push(Y);T.token===":"&&le.length<3;)L(T),T.token===")"||T.token==="]"||T.token===","||T.token===""?le.push(new D("end")):le.push(be(T));le.length===3?Y=new y(le[0],le[2],le[1]):Y=new y(le[0],le[1])}return Y}function be(T){var Y,le,ye,$e;Y=Me(T);for(var Ue={"+":"add","-":"subtract"};Fe(Ue,T.token);){le=T.token,ye=Ue[le],L(T);var Lr=Me(T);Lr.isPercentage?$e=[Y,new h("*","multiply",[Y,Lr])]:$e=[Y,Lr],Y=new h(le,ye,$e)}return Y}function Me(T){var Y,le,ye,$e;Y=Pe(T),le=Y;for(var Ue={"*":"multiply",".*":"dotMultiply","/":"divide","./":"dotDivide","%":"mod",mod:"mod"};Fe(Ue,T.token);)ye=T.token,$e=Ue[ye],L(T),le=Pe(T),Y=new h(ye,$e,[Y,le]);return Y}function Pe(T){var Y,le;for(Y=Ee(T),le=Y;T.tokenType===g.SYMBOL||T.token==="in"&&ft(Y)||T.token==="in"&&er(Y)&&Y.fn==="unaryMinus"&&ft(Y.args[0])||T.tokenType===g.NUMBER&&!ft(le)&&(!er(le)||le.op==="!")||T.token==="(";)le=Ee(T),Y=new h("*","multiply",[Y,le],!0);return Y}function Ee(T){for(var Y=Oe(T),le=Y,ye=[];T.token==="/"&&Im(le);)if(ye.push(tr({},T)),L(T),T.tokenType===g.NUMBER)if(ye.push(tr({},T)),L(T),T.tokenType===g.SYMBOL||T.token==="("||T.token==="in")tr(T,ye.pop()),ye.pop(),le=Oe(T),Y=new h("/","divide",[Y,le]);else{ye.pop(),tr(T,ye.pop());break}else{tr(T,ye.pop());break}return Y}function Oe(T){var Y=je(T);if(T.token==="%"){var le=tr({},T);L(T);try{je(T),tr(T,le)}catch{Y=new h("/","divide",[Y,new l(100)],!1,!0)}}return Y}function je(T){var Y,le,ye,$e={"-":"unaryMinus","+":"unaryPlus","~":"bitNot",not:"not"};return Fe($e,T.token)?(ye=$e[T.token],Y=T.token,L(T),le=[je(T)],new h(Y,ye,le)):H(T)}function H(T){var Y,le,ye,$e;return Y=X(T),(T.token==="^"||T.token===".^")&&(le=T.token,ye=le==="^"?"pow":"dotPow",L(T),$e=[Y,je(T)],Y=new h(le,ye,$e)),Y}function X(T){for(var Y=O(T);T.token==="??";)L(T),Y=new h("??","nullish",[Y,O(T)]);return Y}function O(T){var Y,le,ye,$e;Y=q(T);for(var Ue={"!":"factorial","'":"ctranspose"};Fe(Ue,T.token);)le=T.token,ye=Ue[le],B(T),$e=[Y],Y=new h(le,ye,$e),Y=te(T,Y);return Y}function q(T){var Y=[];if(T.tokenType===g.SYMBOL&&Fe(T.extraNodes,T.token)){var le=T.extraNodes[T.token];if(B(T),T.token==="("){if(Y=[],j(T),B(T),T.token!==")")for(Y.push(P(T));T.token===",";)B(T),Y.push(P(T));if(T.token!==")")throw nt(T,"Parenthesis ) expected");Z(T),B(T)}return new le(Y)}return K(T)}function K(T){var Y,le;return T.tokenType===g.SYMBOL||T.tokenType===g.DELIMITER&&T.token in C?(le=T.token,B(T),Fe(N,le)?Y=new l(N[le]):A.includes(le)?Y=new l(r(le,"number")):Y=new D(le),Y=te(T,Y),Y):ie(T)}function te(T,Y,le){for(var ye;;){var $e=!1;T.token==="?."&&($e=!0,B(T));var Ue=(T.token==="("||T.token==="["||T.token===".")&&!0;if(!($e||Ue))break;if(ye=[],T.token==="(")if($e||Dr(Y)||Ra(Y)){if(j(T),B(T),T.token!==")")for(ye.push(P(T));T.token===",";)B(T),ye.push(P(T));if(T.token!==")")throw nt(T,"Parenthesis ) expected");Z(T),B(T),Y=new f(Y,ye,$e)}else return Y;else if(T.token==="["){if(j(T),B(T),T.token!=="]")for(ye.push(P(T));T.token===",";)B(T),ye.push(P(T));if(T.token!=="]")throw nt(T,"Parenthesis ] expected");Z(T),B(T),Y=new a(Y,new m(ye),$e)}else{$e||B(T);var Lr=T.tokenType===g.SYMBOL||T.tokenType===g.DELIMITER&&T.token in C;if(!Lr){var ho="Property name expected after ";throw ho+=$e?"optional chain":"dot",nt(T,ho)}ye.push(new l(T.token)),B(T);var Vc=!0;Y=new a(Y,new m(ye,Vc),$e)}}return Y}function ie(T){var Y,le;return T.token==='"'||T.token==="'"?(le=re(T,T.token),Y=new l(le),Y=te(T,Y),Y):pe(T)}function re(T,Y){for(var le="";k(T)!==""&&k(T)!==Y;)if(k(T)==="\\"){$(T);var ye=k(T),$e=E[ye];if($e!==void 0)le+=$e,T.index+=1;else if(ye==="u"){var Ue=T.expression.slice(T.index+1,T.index+5);if(/^[0-9A-Fa-f]{4}$/.test(Ue))le+=String.fromCharCode(parseInt(Ue,16)),T.index+=5;else throw nt(T,"Invalid unicode character \\u".concat(Ue))}else throw nt(T,"Bad escape character \\".concat(ye))}else le+=k(T),$(T);if(B(T),T.token!==Y)throw nt(T,"End of string ".concat(Y," expected"));return B(T),le}function pe(T){var Y,le,ye,$e;if(T.token==="["){if(j(T),B(T),T.token!=="]"){var Ue=me(T);if(T.token===";"){for(ye=1,le=[Ue];T.token===";";)B(T),T.token!=="]"&&(le[ye]=me(T),ye++);if(T.token!=="]")throw nt(T,"End of matrix ] expected");Z(T),B(T),$e=le[0].items.length;for(var Lr=1;Lr<ye;Lr++)if(le[Lr].items.length!==$e)throw Lt(T,"Column dimensions mismatch ("+le[Lr].items.length+" !== "+$e+")");Y=new i(le)}else{if(T.token!=="]")throw nt(T,"End of matrix ] expected");Z(T),B(T),Y=Ue}}else Z(T),B(T),Y=new i([]);return te(T,Y)}return Ae(T)}function me(T){for(var Y=[P(T)],le=1;T.token===",";)B(T),T.token!=="]"&&T.token!==";"&&(Y[le]=P(T),le++);return new i(Y)}function Ae(T){if(T.token==="{"){j(T);var Y,le={};do if(B(T),T.token!=="}"){if(T.token==='"'||T.token==="'")Y=re(T,T.token);else if(T.tokenType===g.SYMBOL||T.tokenType===g.DELIMITER&&T.token in C)Y=T.token,B(T);else throw nt(T,"Symbol or string expected as object key");if(T.token!==":")throw nt(T,"Colon : expected after object key");B(T),le[Y]=P(T)}while(T.token===",");if(T.token!=="}")throw nt(T,"Comma , or bracket } expected after object value");Z(T),B(T);var ye=new d(le);return ye=te(T,ye),ye}return de(T)}function de(T){var Y;if(T.tokenType===g.NUMBER){Y=T.token,B(T);var le=yi(Y,n),ye=r(Y,le);return new l(ye)}return Ie(T)}function Ie(T){var Y;if(T.token==="("){if(j(T),B(T),Y=P(T),T.token!==")")throw nt(T,"Parenthesis ) expected");return Z(T),B(T),Y=new p(Y),Y=te(T,Y),Y}return lt(T)}function lt(T){throw T.token===""?nt(T,"Unexpected end of expression"):nt(T,"Value expected")}function bt(T){return T.index-T.token.length+1}function nt(T,Y){var le=bt(T),ye=new SyntaxError(Y+" (char "+le+")");return ye.char=le,ye}function Lt(T,Y){var le=bt(T),ye=new SyntaxError(Y+" (char "+le+")");return ye.char=le,ye}return t.addConversion({from:"string",to:"Node",convert:v}),v}),wy="compile",TV=["typed","parse"],FV=I(wy,TV,e=>{var{typed:t,parse:r}=e;return t(wy,{string:function(a){return r(a).compile()},"Array | Matrix":function(a){return Xe(a,function(i){return r(i).compile()})}})}),xy="evaluate",PV=["typed","parse"],kV=I(xy,PV,e=>{var{typed:t,parse:r}=e;return t(xy,{string:function(a){var i=Vs();return r(a).compile().evaluate(i)},"string, Map | Object":function(a,i){return r(a).compile().evaluate(i)},"Array | Matrix":function(a){var i=Vs();return Xe(a,function(o){return r(o).compile().evaluate(i)})},"Array | Matrix, Map | Object":function(a,i){return Xe(a,function(o){return r(o).compile().evaluate(i)})}})}),OV="Parser",$V=["evaluate","parse"],BV=I(OV,$V,e=>{var{evaluate:t,parse:r}=e;function n(){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");Object.defineProperty(this,"scope",{value:Vs(),writable:!1})}n.prototype.type="Parser",n.prototype.isParser=!0,n.prototype.evaluate=function(i){return t(i,this.scope)},n.prototype.get=function(i){if(this.scope.has(i))return this.scope.get(i)},n.prototype.getAll=function(){return Z6(this.scope)},n.prototype.getAllAsMap=function(){return this.scope};function a(i){if(i.length===0)return!1;for(var o=0;o<i.length;o++){var s=i.charAt(o-1),u=i.charAt(o),l=i.charAt(o+1),c=r.isAlpha(u,s,l)||o>0&&r.isDigit(u);if(!c)return!1}return!0}return n.prototype.set=function(i,o){if(!a(i))throw new Error("Invalid variable name: '".concat(i,"'. Variable names must follow the specified rules."));return this.scope.set(i,o),o},n.prototype.remove=function(i){this.scope.delete(i)},n.prototype.clear=function(){this.scope.clear()},n.prototype.toJSON=function(){var i={mathjs:"Parser",variables:{},functions:{}};for(var[o,s]of this.scope)if(lx(s)){if(!_V(s))throw new Error("Cannot serialize external function ".concat(o));i.functions[o]="".concat(s.syntax," = ").concat(s.expr)}else i.variables[o]=s;return i},n.fromJSON=function(i){var o=new n;return Object.entries(i.variables).forEach(s=>{var[u,l]=s;return o.set(u,l)}),Object.entries(i.functions).forEach(s=>{var[u,l]=s;return o.evaluate(l)}),o},n},{isClass:!0});function _V(e){return typeof e=="function"&&typeof e.syntax=="string"&&typeof e.expr=="string"}var Dy="parser",IV=["typed","Parser"],zV=I(Dy,IV,e=>{var{typed:t,Parser:r}=e;return t(Dy,{"":function(){return new r}})}),Ny="lup",jV=["typed","matrix","abs","addScalar","divideScalar","multiplyScalar","subtractScalar","larger","equalScalar","unaryMinus","DenseMatrix","SparseMatrix","Spa"],qV=I(Ny,jV,e=>{var{typed:t,matrix:r,abs:n,addScalar:a,divideScalar:i,multiplyScalar:o,subtractScalar:s,larger:u,equalScalar:l,unaryMinus:c,DenseMatrix:f,SparseMatrix:m,Spa:d}=e;return t(Ny,{DenseMatrix:function(w){return h(w)},SparseMatrix:function(w){return p(w)},Array:function(w){var D=r(w),v=h(D);return{L:v.L.valueOf(),U:v.U.valueOf(),p:v.p}}});function h(y){var w=y._size[0],D=y._size[1],v=Math.min(w,D),x=We(y._data),g=[],b=[w,v],C=[],N=[v,D],A,E,S,F=[];for(A=0;A<w;A++)F[A]=A;for(E=0;E<D;E++){if(E>0)for(A=0;A<w;A++){var k=Math.min(A,E),$=0;for(S=0;S<k;S++)$=a($,o(x[A][S],x[S][E]));x[A][E]=s(x[A][E],$)}var R=E,M=0,B=0;for(A=E;A<w;A++){var L=x[A][E],j=n(L);u(j,M)&&(R=A,M=j,B=L)}if(E!==R&&(F[E]=[F[R],F[R]=F[E]][0],f._swapRows(E,R,x)),E<w)for(A=E+1;A<w;A++){var Z=x[A][E];l(Z,0)||(x[A][E]=i(x[A][E],B))}}for(E=0;E<D;E++)for(A=0;A<w;A++){if(E===0&&(A<D&&(C[A]=[]),g[A]=[]),A<E){A<D&&(C[A][E]=x[A][E]),E<w&&(g[A][E]=0);continue}if(A===E){A<D&&(C[A][E]=x[A][E]),E<w&&(g[A][E]=1);continue}A<D&&(C[A][E]=0),E<w&&(g[A][E]=x[A][E])}var G=new f({data:g,size:b}),V=new f({data:C,size:N}),P=[];for(A=0,v=F.length;A<v;A++)P[F[A]]=A;return{L:G,U:V,p:P,toString:function(){return"L: "+this.L.toString()+`
50
+ U: `+this.U.toString()+`
51
+ P: `+this.p}}}function p(y){var w=y._size[0],D=y._size[1],v=Math.min(w,D),x=y._values,g=y._index,b=y._ptr,C=[],N=[],A=[],E=[w,v],S=[],F=[],k=[],$=[v,D],R,M,B,L=[],j=[];for(R=0;R<w;R++)L[R]=R,j[R]=R;var Z=function(P,Q){var z=j[P],oe=j[Q];L[z]=Q,L[oe]=P,j[P]=oe,j[Q]=z},G=function(){var P=new d;M<w&&(A.push(C.length),C.push(1),N.push(M)),k.push(S.length);var Q=b[M],z=b[M+1];for(B=Q;B<z;B++)R=g[B],P.set(L[R],x[B]);M>0&&P.forEach(0,M-1,function(_,J){m._forEachRow(_,C,N,A,function(ae,ee){ae>_&&P.accumulate(ae,c(o(ee,J)))})});var oe=M,ne=P.get(M),U=n(ne);P.forEach(M+1,w-1,function(_,J){var ae=n(J);u(ae,U)&&(oe=_,U=ae,ne=J)}),M!==oe&&(m._swapRows(M,oe,E[1],C,N,A),m._swapRows(M,oe,$[1],S,F,k),P.swap(M,oe),Z(M,oe)),P.forEach(0,w-1,function(_,J){_<=M?(S.push(J),F.push(_)):(J=i(J,ne),l(J,0)||(C.push(J),N.push(_)))})};for(M=0;M<D;M++)G();return k.push(S.length),A.push(C.length),{L:new m({values:C,index:N,ptr:A,size:E}),U:new m({values:S,index:F,ptr:k,size:$}),p:L,toString:function(){return"L: "+this.L.toString()+`
52
+ U: `+this.U.toString()+`
53
+ P: `+this.p}}}}),Ay="qr",RV=["typed","matrix","zeros","identity","isZero","equal","sign","sqrt","conj","unaryMinus","addScalar","divideScalar","multiplyScalar","subtractScalar","complex"],LV=I(Ay,RV,e=>{var{typed:t,matrix:r,zeros:n,identity:a,isZero:i,equal:o,sign:s,sqrt:u,conj:l,unaryMinus:c,addScalar:f,divideScalar:m,multiplyScalar:d,subtractScalar:h,complex:p}=e;return tr(t(Ay,{DenseMatrix:function(x){return w(x)},SparseMatrix:function(x){return D()},Array:function(x){var g=r(x),b=w(g);return{Q:b.Q.valueOf(),R:b.R.valueOf()}}}),{_denseQRimpl:y});function y(v){var x=v._size[0],g=v._size[1],b=a([x],"dense"),C=b._data,N=v.clone(),A=N._data,E,S,F,k=n([x],"");for(F=0;F<Math.min(g,x);++F){var $=A[F][F],R=c(o($,0)?1:s($)),M=l(R),B=0;for(E=F;E<x;E++)B=f(B,d(A[E][F],l(A[E][F])));var L=d(R,u(B));if(!i(L)){var j=h($,L);for(k[F]=1,E=F+1;E<x;E++)k[E]=m(A[E][F],j);var Z=c(l(m(j,L))),G=void 0;for(S=F;S<g;S++){for(G=0,E=F;E<x;E++)G=f(G,d(l(k[E]),A[E][S]));for(G=d(G,Z),E=F;E<x;E++)A[E][S]=d(h(A[E][S],d(k[E],G)),M)}for(E=0;E<x;E++){for(G=0,S=F;S<x;S++)G=f(G,d(C[E][S],k[S]));for(G=d(G,Z),S=F;S<x;++S)C[E][S]=m(h(C[E][S],d(G,l(k[S]))),M)}}}return{Q:b,R:N,toString:function(){return"Q: "+this.Q.toString()+`
54
+ R: `+this.R.toString()}}}function w(v){var x=y(v),g=x.R._data;if(v._data.length>0)for(var b=g[0][0].type==="Complex"?p(0):0,C=0;C<g.length;++C)for(var N=0;N<C&&N<(g[0]||[]).length;++N)g[C][N]=b;return x}function D(v){throw new Error("qr not implemented for sparse matrices yet")}});function HV(e,t,r,n){e._values;for(var a=e._index,i=e._ptr,o=e._size,s=e._datatype,u=o[0],l=o[1],c=null,f=[],m=[],d=0,h=0;h<l;h++){m[h]=d;for(var p=r?r[h]:h,y=i[p],w=i[p+1],D=y;D<w;D++){var v=a[D];f[d]=v,d++}}return m[l]=d,e.createSparseMatrix({values:c,index:f,ptr:m,size:[u,l],datatype:s})}function rD(e,t,r,n,a,i,o){var s=0;for(r[o]=e;s>=0;){var u=r[o+s],l=r[n+u];l===-1?(s--,i[t++]=u):(r[n+u]=r[a+l],++s,r[o+s]=l)}return t}function GV(e,t){if(!e)return null;var r=0,n,a=[],i=[],o=0,s=t,u=2*t;for(n=0;n<t;n++)i[o+n]=-1;for(n=t-1;n>=0;n--)e[n]!==-1&&(i[s+n]=i[o+e[n]],i[o+e[n]]=n);for(n=0;n<t;n++)e[n]===-1&&(r=rD(n,r,i,o,s,a,u));return a}function VV(e,t){if(!e)return null;var r=e._index,n=e._ptr,a=e._size,i=a[0],o=a[1],s=[],u=[],l=0,c=o,f,m;for(f=0;f<i;f++)u[c+f]=-1;for(var d=0;d<o;d++){s[d]=-1,u[l+d]=-1;for(var h=n[d],p=n[d+1],y=h;y<p;y++){var w=r[y];for(f=u[c+w];f!==-1&&f<d;f=m)m=u[l+f],u[l+f]=d,m===-1&&(s[f]=d);u[c+w]=d}}return s}function UV(e,t,r){for(var n=e._values,a=e._index,i=e._ptr,o=e._size,s=o[1],u=0,l=0;l<s;l++){var c=i[l];for(i[l]=u;c<i[l+1];c++)t(a[c],l,n?n[c]:1,r)&&(a[u]=a[c],n&&(n[u]=n[c]),u++)}return i[s]=u,a.splice(u,a.length-u),n&&n.splice(u,n.length-u),u}function ei(e){return-e-2}var WV="csAmd",JV=["add","multiply","transpose"],KV=I(WV,JV,e=>{var{add:t,multiply:r,transpose:n}=e;return function(c,f){if(!f||c<=0||c>3)return null;var m=f._size,d=m[0],h=m[1],p=0,y=Math.max(16,10*Math.sqrt(h));y=Math.min(h-2,y);var w=a(c,f,d,h,y);UV(w,u,null);for(var D=w._index,v=w._ptr,x=v[h],g=[],b=[],C=0,N=h+1,A=2*(h+1),E=3*(h+1),S=4*(h+1),F=5*(h+1),k=6*(h+1),$=7*(h+1),R=g,M=i(h,v,b,C,E,R,A,$,N,k,S,F),B=o(h,v,b,F,S,k,y,N,E,R,A),L=0,j,Z,G,V,P,Q,z,oe,ne,U,_,J,ae,ee,ue,se;B<h;){for(G=-1;L<h&&(G=b[E+L])===-1;L++);b[A+G]!==-1&&(R[b[A+G]]=-1),b[E+L]=b[A+G];var be=b[S+G],Me=b[N+G];B+=Me;var Pe=0;b[N+G]=-Me;var Ee=v[G],Oe=be===0?Ee:x,je=Oe;for(V=1;V<=be+1;V++){for(V>be?(Q=G,z=Ee,oe=b[C+G]-be):(Q=D[Ee++],z=v[Q],oe=b[C+Q]),P=1;P<=oe;P++)j=D[z++],!((ne=b[N+j])<=0)&&(Pe+=ne,b[N+j]=-ne,D[je++]=j,b[A+j]!==-1&&(R[b[A+j]]=R[j]),R[j]!==-1?b[A+R[j]]=b[A+j]:b[E+b[F+j]]=b[A+j]);Q!==G&&(v[Q]=ei(G),b[k+Q]=0)}for(be!==0&&(x=je),b[F+G]=Pe,v[G]=Oe,b[C+G]=je-Oe,b[S+G]=-2,M=s(M,p,b,k,h),U=Oe;U<je;U++)if(j=D[U],!((_=b[S+j])<=0)){ne=-b[N+j];var H=M-ne;for(Ee=v[j],J=v[j]+_-1;Ee<=J;Ee++)Q=D[Ee],b[k+Q]>=M?b[k+Q]-=ne:b[k+Q]!==0&&(b[k+Q]=b[F+Q]+H)}for(U=Oe;U<je;U++){for(j=D[U],J=v[j],ae=J+b[S+j]-1,ee=J,ue=0,se=0,Ee=J;Ee<=ae;Ee++)if(Q=D[Ee],b[k+Q]!==0){var X=b[k+Q]-M;X>0?(se+=X,D[ee++]=Q,ue+=Q):(v[Q]=ei(G),b[k+Q]=0)}b[S+j]=ee-J+1;var O=ee,q=J+b[C+j];for(Ee=ae+1;Ee<q;Ee++){Z=D[Ee];var K=b[N+Z];K<=0||(se+=K,D[ee++]=Z,ue+=Z)}se===0?(v[j]=ei(G),ne=-b[N+j],Pe-=ne,Me+=ne,B+=ne,b[N+j]=0,b[S+j]=-1):(b[F+j]=Math.min(b[F+j],se),D[ee]=D[O],D[O]=D[J],D[J]=G,b[C+j]=ee-J+1,ue=(ue<0?-ue:ue)%h,b[A+j]=b[$+ue],b[$+ue]=j,R[j]=ue)}for(b[F+G]=Pe,p=Math.max(p,Pe),M=s(M+p,p,b,k,h),U=Oe;U<je;U++)if(j=D[U],!(b[N+j]>=0))for(ue=R[j],j=b[$+ue],b[$+ue]=-1;j!==-1&&b[A+j]!==-1;j=b[A+j],M++){for(oe=b[C+j],_=b[S+j],Ee=v[j]+1;Ee<=v[j]+oe-1;Ee++)b[k+D[Ee]]=M;var te=j;for(Z=b[A+j];Z!==-1;){var ie=b[C+Z]===oe&&b[S+Z]===_;for(Ee=v[Z]+1;ie&&Ee<=v[Z]+oe-1;Ee++)b[k+D[Ee]]!==M&&(ie=0);ie?(v[Z]=ei(j),b[N+j]+=b[N+Z],b[N+Z]=0,b[S+Z]=-1,Z=b[A+Z],b[A+te]=Z):(te=Z,Z=b[A+Z])}}for(Ee=Oe,U=Oe;U<je;U++)j=D[U],!((ne=-b[N+j])<=0)&&(b[N+j]=ne,se=b[F+j]+Pe-ne,se=Math.min(se,h-B-ne),b[E+se]!==-1&&(R[b[E+se]]=j),b[A+j]=b[E+se],R[j]=-1,b[E+se]=j,L=Math.min(L,se),b[F+j]=se,D[Ee++]=j);b[N+G]=Me,(b[C+G]=Ee-Oe)===0&&(v[G]=-1,b[k+G]=0),be!==0&&(x=Ee)}for(j=0;j<h;j++)v[j]=ei(v[j]);for(Z=0;Z<=h;Z++)b[E+Z]=-1;for(Z=h;Z>=0;Z--)b[N+Z]>0||(b[A+Z]=b[E+v[Z]],b[E+v[Z]]=Z);for(Q=h;Q>=0;Q--)b[N+Q]<=0||v[Q]!==-1&&(b[A+Q]=b[E+v[Q]],b[E+v[Q]]=Q);for(G=0,j=0;j<=h;j++)v[j]===-1&&(G=rD(j,G,b,E,A,g,k));return g.splice(g.length-1,1),g};function a(l,c,f,m,d){var h=n(c);if(l===1&&m===f)return t(c,h);if(l===2){for(var p=h._index,y=h._ptr,w=0,D=0;D<f;D++){var v=y[D];if(y[D]=w,!(y[D+1]-v>d))for(var x=y[D+1];v<x;v++)p[w++]=p[v]}return y[f]=w,c=n(h),r(h,c)}return r(h,c)}function i(l,c,f,m,d,h,p,y,w,D,v,x){for(var g=0;g<l;g++)f[m+g]=c[g+1]-c[g];f[m+l]=0;for(var b=0;b<=l;b++)f[d+b]=-1,h[b]=-1,f[p+b]=-1,f[y+b]=-1,f[w+b]=1,f[D+b]=1,f[v+b]=0,f[x+b]=f[m+b];var C=s(0,0,f,D,l);return f[v+l]=-2,c[l]=-1,f[D+l]=0,C}function o(l,c,f,m,d,h,p,y,w,D,v){for(var x=0,g=0;g<l;g++){var b=f[m+g];if(b===0)f[d+g]=-2,x++,c[g]=-1,f[h+g]=0;else if(b>p)f[y+g]=0,f[d+g]=-1,x++,c[g]=ei(l),f[y+l]++;else{var C=f[w+b];C!==-1&&(D[C]=g),f[v+g]=f[w+b],f[w+b]=g}}return x}function s(l,c,f,m,d){if(l<2||l+c<0){for(var h=0;h<d;h++)f[m+h]!==0&&(f[m+h]=1);l=2}return l}function u(l,c){return l!==c}});function YV(e,t,r,n,a,i,o){var s,u,l=0,c;if(e<=t||r[n+t]<=r[a+e])return-1;r[a+e]=r[n+t];var f=r[i+e];if(r[i+e]=t,f===-1)l=1,c=e;else{for(l=2,c=f;c!==r[o+c];c=r[o+c]);for(s=f;s!==c;s=u)u=r[o+s],r[o+s]=c}return{jleaf:l,q:c}}var ZV="csCounts",QV=["transpose"],XV=I(ZV,QV,e=>{var{transpose:t}=e;return function(r,n,a,i){if(!r||!n||!a)return null;var o=r._size,s=o[0],u=o[1],l,c,f,m,d,h,p,y=4*u+(i?u+s+1:0),w=[],D=0,v=u,x=2*u,g=3*u,b=4*u,C=5*u+1;for(f=0;f<y;f++)w[f]=-1;var N=[],A=t(r),E=A._index,S=A._ptr;for(f=0;f<u;f++)for(c=a[f],N[c]=w[g+c]===-1?1:0;c!==-1&&w[g+c]===-1;c=n[c])w[g+c]=f;if(i){for(f=0;f<u;f++)w[a[f]]=f;for(l=0;l<s;l++){for(f=u,h=S[l],p=S[l+1],d=h;d<p;d++)f=Math.min(f,w[E[d]]);w[C+l]=w[b+f],w[b+f]=l}}for(l=0;l<u;l++)w[D+l]=l;for(f=0;f<u;f++){for(c=a[f],n[c]!==-1&&N[n[c]]--,m=i?w[b+f]:c;m!==-1;m=i?w[C+m]:-1)for(d=S[m];d<S[m+1];d++){l=E[d];var F=YV(l,c,w,g,v,x,D);F.jleaf>=1&&N[c]++,F.jleaf===2&&N[F.q]--}n[c]!==-1&&(w[D+c]=n[c])}for(c=0;c<u;c++)n[c]!==-1&&(N[n[c]]+=N[c]);return N}}),eU="csSqr",tU=["add","multiply","transpose"],rU=I(eU,tU,e=>{var{add:t,multiply:r,transpose:n}=e,a=KV({add:t,multiply:r,transpose:n}),i=XV({transpose:n});return function(u,l,c){var f=l._ptr,m=l._size,d=m[1],h,p={};if(p.q=a(u,l),u&&!p.q)return null;if(c){var y=u?HV(l,null,p.q):l;p.parent=VV(y);var w=GV(p.parent,d);if(p.cp=i(y,p.parent,w,1),y&&p.parent&&p.cp&&o(y,p))for(p.unz=0,h=0;h<d;h++)p.unz+=p.cp[h]}else p.unz=4*f[d]+d,p.lnz=p.unz;return p};function o(s,u){var l=s._ptr,c=s._index,f=s._size,m=f[0],d=f[1];u.pinv=[],u.leftmost=[];var h=u.parent,p=u.pinv,y=u.leftmost,w=[],D=0,v=m,x=m+d,g=m+2*d,b,C,N,A,E;for(C=0;C<d;C++)w[v+C]=-1,w[x+C]=-1,w[g+C]=0;for(b=0;b<m;b++)y[b]=-1;for(C=d-1;C>=0;C--)for(A=l[C],E=l[C+1],N=A;N<E;N++)y[c[N]]=C;for(b=m-1;b>=0;b--)p[b]=-1,C=y[b],C!==-1&&(w[g+C]++===0&&(w[x+C]=b),w[D+b]=w[v+C],w[v+C]=b);for(u.lnz=0,u.m2=m,C=0;C<d;C++)if(b=w[v+C],u.lnz++,b<0&&(b=u.m2++),p[b]=C,!(--g[C]<=0)){u.lnz+=w[g+C];var S=h[C];S!==-1&&(w[g+S]===0&&(w[x+S]=w[x+C]),w[D+w[x+C]]=w[v+S],w[v+S]=w[D+b],w[g+S]+=w[g+C])}for(b=0;b<m;b++)p[b]<0&&(p[b]=C++);return!0}});function nd(e,t){return e[t]<0}function nD(e,t){e[t]=ei(e[t])}function Cy(e){return e<0?ei(e):e}function nU(e,t,r,n,a){var i=t._index,o=t._ptr,s=t._size,u=s[1],l,c,f,m=0;for(n[0]=e;m>=0;){e=n[m];var d=a?a[e]:e;nd(o,e)||(nD(o,e),n[u+m]=d<0?0:Cy(o[d]));var h=1;for(c=n[u+m],f=d<0?0:Cy(o[d+1]);c<f;c++)if(l=i[c],!nd(o,l)){n[u+m]=c,n[++m]=l,h=0;break}h&&(m--,n[--r]=e)}return r}function aU(e,t,r,n,a){var i=e._ptr,o=e._size,s=t._index,u=t._ptr,l=o[1],c,f,m,d=l;for(f=u[r],m=u[r+1],c=f;c<m;c++){var h=s[c];nd(i,h)||(d=nU(h,e,d,n,a))}for(c=d;c<l;c++)nD(i,n[c]);return d}var iU="csSpsolve",oU=["divideScalar","multiply","subtract"],sU=I(iU,oU,e=>{var{divideScalar:t,multiply:r,subtract:n}=e;return function(i,o,s,u,l,c,f){var m=i._values,d=i._index,h=i._ptr,p=i._size,y=p[1],w=o._values,D=o._index,v=o._ptr,x,g,b,C,N=aU(i,o,s,u,c);for(x=N;x<y;x++)l[u[x]]=0;for(g=v[s],b=v[s+1],x=g;x<b;x++)l[D[x]]=w[x];for(var A=N;A<y;A++){var E=u[A],S=c?c[E]:E;if(!(S<0))for(g=h[S],b=h[S+1],l[E]=t(l[E],m[f?g:b-1]),x=f?g+1:g,C=f?b:b-1;x<C;x++){var F=d[x];l[F]=n(l[F],r(m[x],l[E]))}}return N}}),uU="csLu",lU=["abs","divideScalar","multiply","subtract","larger","largerEq","SparseMatrix"],cU=I(uU,lU,e=>{var{abs:t,divideScalar:r,multiply:n,subtract:a,larger:i,largerEq:o,SparseMatrix:s}=e,u=sU({divideScalar:r,multiply:n,subtract:a});return function(c,f,m){if(!c)return null;var d=c._size,h=d[1],p,y=100,w=100;f&&(p=f.q,y=f.lnz||y,w=f.unz||w);var D=[],v=[],x=[],g=new s({values:D,index:v,ptr:x,size:[h,h]}),b=[],C=[],N=[],A=new s({values:b,index:C,ptr:N,size:[h,h]}),E=[],S,F,k=[],$=[];for(S=0;S<h;S++)k[S]=0,E[S]=-1,x[S+1]=0;y=0,w=0;for(var R=0;R<h;R++){x[R]=y,N[R]=w;var M=p?p[R]:R,B=u(g,c,M,$,k,E,1),L=-1,j=-1;for(F=B;F<h;F++)if(S=$[F],E[S]<0){var Z=t(k[S]);i(Z,j)&&(j=Z,L=S)}else C[w]=E[S],b[w++]=k[S];if(L===-1||j<=0)return null;E[M]<0&&o(t(k[M]),n(j,m))&&(L=M);var G=k[L];for(C[w]=R,b[w++]=G,E[L]=R,v[y]=L,D[y++]=1,F=B;F<h;F++)S=$[F],E[S]<0&&(v[y]=S,D[y++]=r(k[S],G)),k[S]=0}for(x[h]=y,N[h]=w,F=0;F<y;F++)v[F]=E[v[F]];return D.splice(y,D.length-y),v.splice(y,v.length-y),b.splice(w,b.length-w),C.splice(w,C.length-w),{L:g,U:A,pinv:E}}}),Ey="slu",fU=["typed","abs","add","multiply","transpose","divideScalar","subtract","larger","largerEq","SparseMatrix"],mU=I(Ey,fU,e=>{var{typed:t,abs:r,add:n,multiply:a,transpose:i,divideScalar:o,subtract:s,larger:u,largerEq:l,SparseMatrix:c}=e,f=rU({add:n,multiply:a,transpose:i}),m=cU({abs:r,divideScalar:o,multiply:a,subtract:s,larger:u,largerEq:l,SparseMatrix:c});return t(Ey,{"SparseMatrix, number, number":function(h,p,y){if(!ke(p)||p<0||p>3)throw new Error("Symbolic Ordering and Analysis order must be an integer number in the interval [0, 3]");if(y<0||y>1)throw new Error("Partial pivoting threshold must be a number from 0 to 1");var w=f(p,h,!1),D=m(h,w,y);return{L:D.L,U:D.U,p:D.pinv,q:w.q,toString:function(){return"L: "+this.L.toString()+`
55
+ U: `+this.U.toString()+`
56
+ p: `+this.p.toString()+(this.q?`
57
+ q: `+this.q.toString():"")+`
58
+ `}}}})});function Sy(e,t){var r,n=t.length,a=[];if(e)for(r=0;r<n;r++)a[e[r]]=t[r];else for(r=0;r<n;r++)a[r]=t[r];return a}var My="lusolve",dU=["typed","matrix","lup","slu","usolve","lsolve","DenseMatrix"],hU=I(My,dU,e=>{var{typed:t,matrix:r,lup:n,slu:a,usolve:i,lsolve:o,DenseMatrix:s}=e,u=su({DenseMatrix:s});return t(My,{"Array, Array | Matrix":function(m,d){m=r(m);var h=n(m),p=c(h.L,h.U,h.p,null,d);return p.valueOf()},"DenseMatrix, Array | Matrix":function(m,d){var h=n(m);return c(h.L,h.U,h.p,null,d)},"SparseMatrix, Array | Matrix":function(m,d){var h=n(m);return c(h.L,h.U,h.p,null,d)},"SparseMatrix, Array | Matrix, number, number":function(m,d,h,p){var y=a(m,h,p);return c(y.L,y.U,y.p,y.q,d)},"Object, Array | Matrix":function(m,d){return c(m.L,m.U,m.p,m.q,d)}});function l(f){if(Le(f))return f;if(Tt(f))return r(f);throw new TypeError("Invalid Matrix LU decomposition")}function c(f,m,d,h,p){f=l(f),m=l(m),d&&(p=u(f,p,!0),p._data=Sy(d,p._data));var y=o(f,p),w=i(m,y);return h&&(w._data=Sy(h,w._data)),w}}),Ty="polynomialRoot",pU=["typed","isZero","equalScalar","add","subtract","multiply","divide","sqrt","unaryMinus","cbrt","typeOf","im","re"],gU=I(Ty,pU,e=>{var{typed:t,isZero:r,equalScalar:n,add:a,subtract:i,multiply:o,divide:s,sqrt:u,unaryMinus:l,cbrt:c,typeOf:f,im:m,re:d}=e;return t(Ty,{"number|Complex, ...number|Complex":(h,p)=>{for(var y=[h,...p];y.length>0&&r(y[y.length-1]);)y.pop();if(y.length<2)throw new RangeError("Polynomial [".concat(h,", ").concat(p,"] must have a non-zero non-constant coefficient"));switch(y.length){case 2:return[l(s(y[0],y[1]))];case 3:{var[w,D,v]=y,x=o(2,v),g=o(D,D),b=o(4,v,w);if(n(g,b))return[s(l(D),x)];var C=u(i(g,b));return[s(i(C,D),x),s(i(l(C),D),x)]}case 4:{var[N,A,E,S]=y,F=l(o(3,S)),k=o(E,E),$=o(3,S,A),R=a(o(2,E,E,E),o(27,S,S,N)),M=o(9,S,E,A);if(n(k,$)&&n(R,M))return[s(E,F)];var B=i(k,$),L=i(R,M),j=a(o(18,S,E,A,N),o(E,E,A,A)),Z=a(o(4,E,E,E,N),o(4,S,A,A,A),o(27,S,S,N,N));if(n(j,Z))return[s(i(o(4,S,E,A),a(o(9,S,S,N),o(E,E,E))),o(S,B)),s(i(o(9,S,N),o(E,A)),o(2,B))];var G;n(k,$)?G=L:G=s(a(L,u(i(o(L,L),o(4,B,B,B)))),2);var V=!0,P=c(G,V).toArray().map(Q=>s(a(E,Q,s(B,Q)),F));return P.map(Q=>f(Q)==="Complex"&&n(d(Q),d(Q)+m(Q))?d(Q):Q)}default:throw new RangeError("only implemented for cubic or lower-order polynomials, not ".concat(y))}}})}),vU="Help",yU=["evaluate"],bU=I(vU,yU,e=>{var{evaluate:t}=e;function r(n){if(!(this instanceof r))throw new SyntaxError("Constructor must be called with the new operator");if(!n)throw new Error('Argument "doc" missing');this.doc=n}return r.prototype.type="Help",r.prototype.isHelp=!0,r.prototype.toString=function(){var n=this.doc||{},a=`
59
+ `;if(n.name&&(a+="Name: "+n.name+`
60
+
61
+ `),n.category&&(a+="Category: "+n.category+`
62
+
63
+ `),n.description&&(a+=`Description:
64
+ `+n.description+`
65
+
66
+ `),n.syntax&&(a+=`Syntax:
67
+ `+n.syntax.join(`
68
+ `)+`
69
+
70
+ `),n.examples){a+=`Examples:
71
+ `;for(var i=!1,o=t("config()"),s={config:f=>(i=!0,t("config(newConfig)",{newConfig:f}))},u=0;u<n.examples.length;u++){var l=n.examples[u];a+=" "+l+`
72
+ `;var c=void 0;try{c=t(l,s)}catch(f){c=f}c!==void 0&&!ux(c)&&(a+=" "+it(c,{precision:14})+`
73
+ `)}a+=`
74
+ `,i&&t("config(originalConfig)",{originalConfig:o})}return n.mayThrow&&n.mayThrow.length&&(a+="Throws: "+n.mayThrow.join(", ")+`
75
+
76
+ `),n.seealso&&n.seealso.length&&(a+="See also: "+n.seealso.join(", ")+`
77
+ `),a},r.prototype.toJSON=function(){var n=We(this.doc);return n.mathjs="Help",n},r.fromJSON=function(n){var a={};return Object.keys(n).filter(i=>i!=="mathjs").forEach(i=>{a[i]=n[i]}),new r(a)},r.prototype.valueOf=r.prototype.toString,r},{isClass:!0}),wU="Chain",xU=["?on","math","typed"],DU=I(wU,xU,e=>{var{on:t,math:r,typed:n}=e;function a(l){if(!(this instanceof a))throw new SyntaxError("Constructor must be called with the new operator");fx(l)?this.value=l.value:this.value=l}a.prototype.type="Chain",a.prototype.isChain=!0,a.prototype.done=function(){return this.value},a.prototype.valueOf=function(){return this.value},a.prototype.toString=function(){return it(this.value)},a.prototype.toJSON=function(){return{mathjs:"Chain",value:this.value}},a.fromJSON=function(l){return new a(l.value)};function i(l,c){typeof c=="function"&&(a.prototype[l]=s(c))}function o(l,c){c8(a.prototype,l,function(){var m=c();if(typeof m=="function")return s(m)})}function s(l){return function(){if(arguments.length===0)return new a(l(this.value));for(var c=[this.value],f=0;f<arguments.length;f++)c[f+1]=arguments[f];if(n.isTypedFunction(l)){var m=n.resolve(l,c);if(m.params.length===1)throw new Error("chain function "+l.name+" cannot match rest parameter between chain value and additional arguments.");return new a(m.implementation.apply(l,c))}return new a(l.apply(l,c))}}a.createProxy=function(l,c){if(typeof l=="string")i(l,c);else{var f=function(h){Fe(l,h)&&u[h]===void 0&&o(h,()=>l[h])};for(var m in l)f(m)}};var u={expression:!0,docs:!0,type:!0,classes:!0,json:!0,error:!0,isChain:!0};return a.createProxy(r),t&&t("import",function(l,c,f){f||o(l,c)}),a},{isClass:!0}),Fy={name:"e",category:"Constants",syntax:["e"],description:"Euler's number, the base of the natural logarithm. Approximately equal to 2.71828",examples:["e","e ^ 2","exp(2)","log(e)"],seealso:["exp"]},NU={name:"false",category:"Constants",syntax:["false"],description:"Boolean value false",examples:["false"],seealso:["true"]},AU={name:"i",category:"Constants",syntax:["i"],description:"Imaginary unit, defined as i*i=-1. A complex number is described as a + b*i, where a is the real part, and b is the imaginary part.",examples:["i","i * i","sqrt(-1)"],seealso:[]},CU={name:"Infinity",category:"Constants",syntax:["Infinity"],description:"Infinity, a number which is larger than the maximum number that can be handled by a floating point number.",examples:["Infinity","1 / 0"],seealso:[]},EU={name:"LN10",category:"Constants",syntax:["LN10"],description:"Returns the natural logarithm of 10, approximately equal to 2.302",examples:["LN10","log(10)"],seealso:[]},SU={name:"LN2",category:"Constants",syntax:["LN2"],description:"Returns the natural logarithm of 2, approximately equal to 0.693",examples:["LN2","log(2)"],seealso:[]},MU={name:"LOG10E",category:"Constants",syntax:["LOG10E"],description:"Returns the base-10 logarithm of E, approximately equal to 0.434",examples:["LOG10E","log(e, 10)"],seealso:[]},TU={name:"LOG2E",category:"Constants",syntax:["LOG2E"],description:"Returns the base-2 logarithm of E, approximately equal to 1.442",examples:["LOG2E","log(e, 2)"],seealso:[]},FU={name:"NaN",category:"Constants",syntax:["NaN"],description:"Not a number",examples:["NaN","0 / 0"],seealso:[]},PU={name:"null",category:"Constants",syntax:["null"],description:"Value null",examples:["null"],seealso:["true","false"]},kU={name:"phi",category:"Constants",syntax:["phi"],description:"Phi is the golden ratio. Two quantities are in the golden ratio if their ratio is the same as the ratio of their sum to the larger of the two quantities. Phi is defined as `(1 + sqrt(5)) / 2` and is approximately 1.618034...",examples:["phi"],seealso:[]},Py={name:"pi",category:"Constants",syntax:["pi"],description:"The number pi is a mathematical constant that is the ratio of a circle's circumference to its diameter, and is approximately equal to 3.14159",examples:["pi","sin(pi/2)"],seealso:["tau"]},OU={name:"SQRT1_2",category:"Constants",syntax:["SQRT1_2"],description:"Returns the square root of 1/2, approximately equal to 0.707",examples:["SQRT1_2","sqrt(1/2)"],seealso:[]},$U={name:"SQRT2",category:"Constants",syntax:["SQRT2"],description:"Returns the square root of 2, approximately equal to 1.414",examples:["SQRT2","sqrt(2)"],seealso:[]},BU={name:"tau",category:"Constants",syntax:["tau"],description:"Tau is the ratio constant of a circle's circumference to radius, equal to 2 * pi, approximately 6.2832.",examples:["tau","2 * pi"],seealso:["pi"]},_U={name:"true",category:"Constants",syntax:["true"],description:"Boolean value true",examples:["true"],seealso:["false"]},IU={name:"version",category:"Constants",syntax:["version"],description:"A string with the version number of math.js",examples:["version"],seealso:[]},zU={name:"bignumber",category:"Construction",syntax:["bignumber(x)"],description:"Create a big number from a number or string.",examples:["0.1 + 0.2","bignumber(0.1) + bignumber(0.2)",'bignumber("7.2")','bignumber("7.2e500")',"bignumber([0.1, 0.2, 0.3])"],seealso:["boolean","bigint","complex","fraction","index","matrix","string","unit"]},jU={name:"bigint",category:"Construction",syntax:["bigint(x)"],description:"Create a bigint, an integer with an arbitrary number of digits, from a number or string.",examples:["123123123123123123 # a large number will lose digits",'bigint("123123123123123123")','bignumber(["1", "3", "5"])'],seealso:["boolean","bignumber","number","complex","fraction","index","matrix","string","unit"]},qU={name:"boolean",category:"Construction",syntax:["x","boolean(x)"],description:"Convert a string or number into a boolean.",examples:["boolean(0)","boolean(1)","boolean(3)",'boolean("true")','boolean("false")',"boolean([1, 0, 1, 1])"],seealso:["bignumber","complex","index","matrix","number","string","unit"]},RU={name:"complex",category:"Construction",syntax:["complex()","complex(re, im)","complex(string)"],description:"Create a complex number.",examples:["complex()","complex(2, 3)",'complex("7 - 2i")'],seealso:["bignumber","boolean","index","matrix","number","string","unit"]},LU={name:"createUnit",category:"Construction",syntax:["createUnit(definitions)","createUnit(name, definition)"],description:"Create a user-defined unit and register it with the Unit type.",examples:['createUnit("foo")','createUnit("knot", {definition: "0.514444444 m/s", aliases: ["knots", "kt", "kts"]})','createUnit("mph", "1 mile/hour")'],seealso:["unit","splitUnit"]},HU={name:"fraction",category:"Construction",syntax:["fraction(num)","fraction(matrix)","fraction(num,den)","fraction({n: num, d: den})"],description:"Create a fraction from a number or from integer numerator and denominator.",examples:["fraction(0.125)","fraction(1, 3) + fraction(2, 5)","fraction({n: 333, d: 53})","fraction([sqrt(9), sqrt(10), sqrt(11)])"],seealso:["bignumber","boolean","complex","index","matrix","string","unit"]},GU={name:"index",category:"Construction",syntax:["[start]","[start:end]","[start:step:end]","[start1, start 2, ...]","[start1:end1, start2:end2, ...]","[start1:step1:end1, start2:step2:end2, ...]"],description:"Create an index to get or replace a subset of a matrix",examples:["A = [1, 2, 3; 4, 5, 6]","A[1, :]","A[1, 2] = 50","A[1:2, 1:2] = 1","B = [1, 2, 3]","B[B>1 and B<3]"],seealso:["bignumber","boolean","complex","matrix","number","range","string","unit"]},VU={name:"matrix",category:"Construction",syntax:["[]","[a1, b1, ...; a2, b2, ...]","matrix()",'matrix("dense")',"matrix([...])"],description:"Create a matrix.",examples:["[]","[1, 2, 3]","[1, 2, 3; 4, 5, 6]","matrix()","matrix([3, 4])",'matrix([3, 4; 5, 6], "sparse")','matrix([3, 4; 5, 6], "sparse", "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","sparse"]},UU={name:"number",category:"Construction",syntax:["x","number(x)","number(unit, valuelessUnit)"],description:"Create a number or convert a string or boolean into a number.",examples:["2","2e3","4.05","number(2)",'number("7.2")',"number(true)","number([true, false, true, true])",'number(unit("52cm"), "m")'],seealso:["bignumber","bigint","boolean","complex","fraction","index","matrix","string","unit"]},WU={name:"sparse",category:"Construction",syntax:["sparse()","sparse([a1, b1, ...; a1, b2, ...])",'sparse([a1, b1, ...; a1, b2, ...], "number")'],description:"Create a sparse matrix.",examples:["sparse()","sparse([3, 4; 5, 6])",'sparse([3, 0; 5, 0], "number")'],seealso:["bignumber","boolean","complex","index","number","string","unit","matrix"]},JU={name:"splitUnit",category:"Construction",syntax:["splitUnit(unit: Unit, parts: Unit[])"],description:"Split a unit in an array of units whose sum is equal to the original unit.",examples:['splitUnit(1 m, ["feet", "inch"])'],seealso:["unit","createUnit"]},KU={name:"string",category:"Construction",syntax:['"text"',"string(x)"],description:"Create a string or convert a value to a string",examples:['"Hello World!"',"string(4.2)","string(3 + 2i)"],seealso:["bignumber","boolean","complex","index","matrix","number","unit"]},YU={name:"unit",category:"Construction",syntax:["value unit","unit(value, unit)","unit(string)"],description:"Create a unit.",examples:["5.5 mm","3 inch",'unit(7.1, "kilogram")','unit("23 deg")'],seealso:["bignumber","boolean","complex","index","matrix","number","string"]},ZU={name:"config",category:"Core",syntax:["config()","config(options)"],description:"Get configuration or change configuration.",examples:["config()","1/3 + 1/4",'config({number: "Fraction"})',"1/3 + 1/4"],seealso:[]},QU={name:"import",category:"Core",syntax:["import(functions)","import(functions, options)"],description:"Import functions or constants from an object.",examples:["import({myFn: f(x)=x^2, myConstant: 32 })","myFn(2)","myConstant"],seealso:[]},XU={name:"typed",category:"Core",syntax:["typed(signatures)","typed(name, signatures)"],description:"Create a typed function.",examples:['double = typed({ "number": f(x)=x+x, "string": f(x)=concat(x,x) })',"double(2)",'double("hello")'],seealso:[]},eW={name:"derivative",category:"Algebra",syntax:["derivative(expr, variable)","derivative(expr, variable, {simplify: boolean})"],description:"Takes the derivative of an expression expressed in parser Nodes. The derivative will be taken over the supplied variable in the second parameter. If there are multiple variables in the expression, it will return a partial derivative.",examples:['derivative("2x^3", "x")','derivative("2x^3", "x", {simplify: false})','derivative("2x^2 + 3x + 4", "x")','derivative("sin(2x)", "x")','f = parse("x^2 + x")','x = parse("x")',"df = derivative(f, x)","df.evaluate({x: 3})"],seealso:["simplify","parse","evaluate"]},tW={name:"leafCount",category:"Algebra",syntax:["leafCount(expr)"],description:"Computes the number of leaves in the parse tree of the given expression",examples:['leafCount("e^(i*pi)-1")','leafCount(parse("{a: 22/7, b: 10^(1/2)}"))'],seealso:["simplify"]},rW={name:"lsolve",category:"Algebra",syntax:["x=lsolve(L, b)"],description:"Finds one solution of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolveAll","lup","lusolve","usolve","matrix","sparse"]},nW={name:"lsolveAll",category:"Algebra",syntax:["x=lsolveAll(L, b)"],description:"Finds all solutions of the linear system L * x = b where L is an [n x n] lower triangular matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lsolve(a, b)"],seealso:["lsolve","lup","lusolve","usolve","matrix","sparse"]},aW={name:"lup",category:"Algebra",syntax:["lup(m)"],description:"Calculate the Matrix LU decomposition with partial pivoting. Matrix A is decomposed in three matrices (L, U, P) where P * A = L * U",examples:["lup([[2, 1], [1, 4]])","lup(matrix([[2, 1], [1, 4]]))","lup(sparse([[2, 1], [1, 4]]))"],seealso:["lusolve","lsolve","usolve","matrix","sparse","slu","qr"]},iW={name:"lusolve",category:"Algebra",syntax:["x=lusolve(A, b)","x=lusolve(lu, b)"],description:"Solves the linear system A * x = b where A is an [n x n] matrix and b is a [n] column vector.",examples:["a = [-2, 3; 2, 1]","b = [11, 9]","x = lusolve(a, b)"],seealso:["lup","slu","lsolve","usolve","matrix","sparse"]},oW={name:"polynomialRoot",category:"Algebra",syntax:["x=polynomialRoot(-6, 3)","x=polynomialRoot(4, -4, 1)","x=polynomialRoot(-8, 12, -6, 1)"],description:"Finds the roots of a univariate polynomial given by its coefficients starting from constant, linear, and so on, increasing in degree.",examples:["a = polynomialRoot(-6, 11, -6, 1)"],seealso:["cbrt","sqrt"]},sW={name:"qr",category:"Algebra",syntax:["qr(A)"],description:"Calculates the Matrix QR decomposition. Matrix `A` is decomposed in two matrices (`Q`, `R`) where `Q` is an orthogonal matrix and `R` is an upper triangular matrix.",examples:["qr([[1, -1, 4], [1, 4, -2], [1, 4, 2], [1, -1, 0]])"],seealso:["lup","slu","matrix"]},uW={name:"rationalize",category:"Algebra",syntax:["rationalize(expr)","rationalize(expr, scope)","rationalize(expr, scope, detailed)"],description:"Transform a rationalizable expression in a rational fraction. If rational fraction is one variable polynomial then converts the numerator and denominator in canonical form, with decreasing exponents, returning the coefficients of numerator.",examples:['rationalize("2x/y - y/(x+1)")','rationalize("2x/y - y/(x+1)", true)'],seealso:["simplify"]},lW={name:"resolve",category:"Algebra",syntax:["resolve(node, scope)"],description:"Recursively substitute variables in an expression tree.",examples:['resolve(parse("1 + x"), { x: 7 })','resolve(parse("size(text)"), { text: "Hello World" })','resolve(parse("x + y"), { x: parse("3z") })','resolve(parse("3x"), { x: parse("y+z"), z: parse("w^y") })'],seealso:["simplify","evaluate"],mayThrow:["ReferenceError"]},cW={name:"simplify",category:"Algebra",syntax:["simplify(expr)","simplify(expr, rules)"],description:"Simplify an expression tree.",examples:['simplify("3 + 2 / 4")','simplify("2x + x")','f = parse("x * (x + 2 + x)")',"simplified = simplify(f)","simplified.evaluate({x: 2})"],seealso:["simplifyCore","derivative","evaluate","parse","rationalize","resolve"]},fW={name:"simplifyConstant",category:"Algebra",syntax:["simplifyConstant(expr)","simplifyConstant(expr, options)"],description:"Replace constant subexpressions of node with their values.",examples:['simplifyConstant("(3-3)*x")','simplifyConstant(parse("z-cos(tau/8)"))'],seealso:["simplify","simplifyCore","evaluate"]},mW={name:"simplifyCore",category:"Algebra",syntax:["simplifyCore(node)"],description:"Perform simple one-pass simplifications on an expression tree.",examples:['simplifyCore(parse("0*x"))','simplifyCore(parse("(x+0)*2"))'],seealso:["simplify","simplifyConstant","evaluate"]},dW={name:"slu",category:"Algebra",syntax:["slu(A, order, threshold)"],description:"Calculate the Matrix LU decomposition with full pivoting. Matrix A is decomposed in two matrices (L, U) and two permutation vectors (pinv, q) where P * A * Q = L * U",examples:["slu(sparse([4.5, 0, 3.2, 0; 3.1, 2.9, 0, 0.9; 0, 1.7, 3, 0; 3.5, 0.4, 0, 1]), 1, 0.001)"],seealso:["lusolve","lsolve","usolve","matrix","sparse","lup","qr"]},hW={name:"symbolicEqual",category:"Algebra",syntax:["symbolicEqual(expr1, expr2)","symbolicEqual(expr1, expr2, options)"],description:"Returns true if the difference of the expressions simplifies to 0",examples:['symbolicEqual("x*y","y*x")','symbolicEqual("abs(x^2)", "x^2")','symbolicEqual("abs(x)", "x", {context: {abs: {trivial: true}}})'],seealso:["simplify","evaluate"]},pW={name:"usolve",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds one solution of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolveAll","lup","lusolve","lsolve","matrix","sparse"]},gW={name:"usolveAll",category:"Algebra",syntax:["x=usolve(U, b)"],description:"Finds all solutions of the linear system U * x = b where U is an [n x n] upper triangular matrix and b is a [n] column vector.",examples:["x=usolve(sparse([1, 1, 1, 1; 0, 1, 1, 1; 0, 0, 1, 1; 0, 0, 0, 1]), [1; 2; 3; 4])"],seealso:["usolve","lup","lusolve","lsolve","matrix","sparse"]},vW={name:"abs",category:"Arithmetic",syntax:["abs(x)"],description:"Compute the absolute value.",examples:["abs(3.5)","abs(-4.2)"],seealso:["sign"]},yW={name:"add",category:"Operators",syntax:["x + y","add(x, y)"],description:"Add two values.",examples:["a = 2.1 + 3.6","a - 3.6","3 + 2i","3 cm + 2 inch",'"2.3" + "4"'],seealso:["subtract"]},bW={name:"cbrt",category:"Arithmetic",syntax:["cbrt(x)","cbrt(x, allRoots)"],description:"Compute the cubic root value. If x = y * y * y, then y is the cubic root of x. When `x` is a number or complex number, an optional second argument `allRoots` can be provided to return all three cubic roots. If not provided, the principal root is returned",examples:["cbrt(64)","cube(4)","cbrt(-8)","cbrt(2 + 3i)","cbrt(8i)","cbrt(8i, true)","cbrt(27 m^3)"],seealso:["square","sqrt","cube","multiply"]},wW={name:"ceil",category:"Arithmetic",syntax:["ceil(x)","ceil(x, n)","ceil(unit, valuelessUnit)","ceil(unit, n, valuelessUnit)"],description:"Round a value towards plus infinity. If x is complex, both real and imaginary part are rounded towards plus infinity.",examples:["ceil(3.2)","ceil(3.8)","ceil(-4.2)","ceil(3.241cm, cm)","ceil(3.241cm, 2, cm)"],seealso:["floor","fix","round"]},xW={name:"cube",category:"Arithmetic",syntax:["cube(x)"],description:"Compute the cube of a value. The cube of x is x * x * x.",examples:["cube(2)","2^3","2 * 2 * 2"],seealso:["multiply","square","pow"]},DW={name:"divide",category:"Operators",syntax:["x / y","divide(x, y)"],description:"Divide two values.",examples:["a = 2 / 3","a * 3","4.5 / 2","3 + 4 / 2","(3 + 4) / 2","18 km / 4.5"],seealso:["multiply"]},NW={name:"dotDivide",category:"Operators",syntax:["x ./ y","dotDivide(x, y)"],description:"Divide two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a ./ b"],seealso:["multiply","dotMultiply","divide"]},AW={name:"dotMultiply",category:"Operators",syntax:["x .* y","dotMultiply(x, y)"],description:"Multiply two values element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","b = [2, 1, 1; 3, 2, 5]","a .* b"],seealso:["multiply","divide","dotDivide"]},CW={name:"dotPow",category:"Operators",syntax:["x .^ y","dotPow(x, y)"],description:"Calculates the power of x to y element wise.",examples:["a = [1, 2, 3; 4, 5, 6]","a .^ 2"],seealso:["pow"]},EW={name:"exp",category:"Arithmetic",syntax:["exp(x)"],description:"Calculate the exponent of a value.",examples:["exp(1.3)","e ^ 1.3","log(exp(1.3))","x = 2.4","(exp(i*x) == cos(x) + i*sin(x)) # Euler's formula"],seealso:["expm","expm1","pow","log"]},SW={name:"expm",category:"Arithmetic",syntax:["exp(x)"],description:"Compute the matrix exponential, expm(A) = e^A. The matrix must be square. Not to be confused with exp(a), which performs element-wise exponentiation.",examples:["expm([[0,2],[0,0]])"],seealso:["exp"]},MW={name:"expm1",category:"Arithmetic",syntax:["expm1(x)"],description:"Calculate the value of subtracting 1 from the exponential value.",examples:["expm1(2)","pow(e, 2) - 1","log(expm1(2) + 1)"],seealso:["exp","pow","log"]},TW={name:"fix",category:"Arithmetic",syntax:["fix(x)","fix(x, n)","fix(unit, valuelessUnit)","fix(unit, n, valuelessUnit)"],description:"Round a value towards zero. If x is complex, both real and imaginary part are rounded towards zero.",examples:["fix(3.2)","fix(3.8)","fix(-4.2)","fix(-4.8)","fix(3.241cm, cm)","fix(3.241cm, 2, cm)"],seealso:["ceil","floor","round"]},FW={name:"floor",category:"Arithmetic",syntax:["floor(x)","floor(x, n)","floor(unit, valuelessUnit)","floor(unit, n, valuelessUnit)"],description:"Round a value towards minus infinity.If x is complex, both real and imaginary part are rounded towards minus infinity.",examples:["floor(3.2)","floor(3.8)","floor(-4.2)","floor(3.241cm, cm)","floor(3.241cm, 2, cm)"],seealso:["ceil","fix","round"]},PW={name:"gcd",category:"Arithmetic",syntax:["gcd(a, b)","gcd(a, b, c, ...)"],description:"Compute the greatest common divisor.",examples:["gcd(8, 12)","gcd(-4, 6)","gcd(25, 15, -10)"],seealso:["lcm","xgcd"]},kW={name:"hypot",category:"Arithmetic",syntax:["hypot(a, b, c, ...)","hypot([a, b, c, ...])"],description:"Calculate the hypotenuse of a list with values.",examples:["hypot(3, 4)","sqrt(3^2 + 4^2)","hypot(-2)","hypot([3, 4, 5])"],seealso:["abs","norm"]},OW={name:"invmod",category:"Arithmetic",syntax:["invmod(a, b)"],description:"Calculate the (modular) multiplicative inverse of a modulo b. Solution to the equation ax ≣ 1 (mod b)",examples:["invmod(8, 12)","invmod(7, 13)","invmod(15151, 15122)"],seealso:["gcd","xgcd"]},$W={name:"lcm",category:"Arithmetic",syntax:["lcm(x, y)"],description:"Compute the least common multiple.",examples:["lcm(4, 6)","lcm(6, 21)","lcm(6, 21, 5)"],seealso:["gcd"]},BW={name:"log",category:"Arithmetic",syntax:["log(x)","log(x, base)"],description:"Compute the logarithm of a value. If no base is provided, the natural logarithm of x is calculated. If base if provided, the logarithm is calculated for the specified base. log(x, base) is defined as log(x) / log(base).",examples:["log(3.5)","a = log(2.4)","exp(a)","10 ^ 4","log(10000, 10)","log(10000) / log(10)","b = log(1024, 2)","2 ^ b"],seealso:["exp","log1p","log2","log10"]},_W={name:"log10",category:"Arithmetic",syntax:["log10(x)"],description:"Compute the 10-base logarithm of a value.",examples:["log10(0.00001)","log10(10000)","10 ^ 4","log(10000) / log(10)","log(10000, 10)"],seealso:["exp","log"]},IW={name:"log1p",category:"Arithmetic",syntax:["log1p(x)","log1p(x, base)"],description:"Calculate the logarithm of a `value+1`",examples:["log1p(2.5)","exp(log1p(1.4))","pow(10, 4)","log1p(9999, 10)","log1p(9999) / log(10)"],seealso:["exp","log","log2","log10"]},zW={name:"log2",category:"Arithmetic",syntax:["log2(x)"],description:"Calculate the 2-base of a value. This is the same as calculating `log(x, 2)`.",examples:["log2(0.03125)","log2(16)","log2(16) / log2(2)","pow(2, 4)"],seealso:["exp","log1p","log","log10"]},jW={name:"mod",category:"Operators",syntax:["x % y","x mod y","mod(x, y)"],description:"Calculates the modulus, the remainder of an integer division.",examples:["7 % 3","11 % 2","10 mod 4","isOdd(x) = x % 2","isOdd(2)","isOdd(3)"],seealso:["divide"]},qW={name:"multiply",category:"Operators",syntax:["x * y","multiply(x, y)"],description:"multiply two values.",examples:["a = 2.1 * 3.4","a / 3.4","2 * 3 + 4","2 * (3 + 4)","3 * 2.1 km"],seealso:["divide"]},RW={name:"norm",category:"Arithmetic",syntax:["norm(x)","norm(x, p)"],description:"Calculate the norm of a number, vector or matrix.",examples:["abs(-3.5)","norm(-3.5)","norm(3 - 4i)","norm([1, 2, -3], Infinity)","norm([1, 2, -3], -Infinity)","norm([3, 4], 2)","norm([[1, 2], [3, 4]], 1)",'norm([[1, 2], [3, 4]], "inf")','norm([[1, 2], [3, 4]], "fro")']},LW={name:"nthRoot",category:"Arithmetic",syntax:["nthRoot(a)","nthRoot(a, root)"],description:'Calculate the nth root of a value. The principal nth root of a positive real number A, is the positive real solution of the equation "x^root = A".',examples:["4 ^ 3","nthRoot(64, 3)","nthRoot(9, 2)","sqrt(9)"],seealso:["nthRoots","pow","sqrt"]},HW={name:"nthRoots",category:"Arithmetic",syntax:["nthRoots(A)","nthRoots(A, root)"],description:'Calculate the nth roots of a value. An nth root of a positive real number A, is a positive real solution of the equation "x^root = A". This function returns an array of complex values.',examples:["nthRoots(1)","nthRoots(1, 3)"],seealso:["sqrt","pow","nthRoot"]},GW={name:"pow",category:"Operators",syntax:["x ^ y","pow(x, y)"],description:"Calculates the power of x to y, x^y.",examples:["2^3","2*2*2","1 + e ^ (pi * i)","pow([[1, 2], [4, 3]], 2)","pow([[1, 2], [4, 3]], -1)"],seealso:["multiply","nthRoot","nthRoots","sqrt"]},VW={name:"round",category:"Arithmetic",syntax:["round(x)","round(x, n)","round(unit, valuelessUnit)","round(unit, n, valuelessUnit)"],description:"round a value towards the nearest integer.If x is complex, both real and imaginary part are rounded towards the nearest integer. When n is specified, the value is rounded to n decimals.",examples:["round(3.2)","round(3.8)","round(-4.2)","round(-4.8)","round(pi, 3)","round(123.45678, 2)","round(3.241cm, 2, cm)","round([3.2, 3.8, -4.7])"],seealso:["ceil","floor","fix"]},UW={name:"sign",category:"Arithmetic",syntax:["sign(x)"],description:"Compute the sign of a value. The sign of a value x is 1 when x>0, -1 when x<0, and 0 when x=0.",examples:["sign(3.5)","sign(-4.2)","sign(0)"],seealso:["abs"]},WW={name:"sqrt",category:"Arithmetic",syntax:["sqrt(x)"],description:"Compute the square root value. If x = y * y, then y is the square root of x.",examples:["sqrt(25)","5 * 5","sqrt(-1)"],seealso:["square","sqrtm","multiply","nthRoot","nthRoots","pow"]},JW={name:"sqrtm",category:"Arithmetic",syntax:["sqrtm(x)"],description:"Calculate the principal square root of a square matrix. The principal square root matrix `X` of another matrix `A` is such that `X * X = A`.",examples:["sqrtm([[33, 24], [48, 57]])"],seealso:["sqrt","abs","square","multiply"]},KW={name:"sylvester",category:"Algebra",syntax:["sylvester(A,B,C)"],description:"Solves the real-valued Sylvester equation AX+XB=C for X",examples:["sylvester([[-1, -2], [1, 1]], [[-2, 1], [-1, 2]], [[-3, 2], [3, 0]])","A = [[-1, -2], [1, 1]]; B = [[2, -1], [1, -2]]; C = [[-3, 2], [3, 0]]","sylvester(A, B, C)"],seealso:["schur","lyap"]},YW={name:"schur",category:"Algebra",syntax:["schur(A)"],description:"Performs a real Schur decomposition of the real matrix A = UTU'",examples:["schur([[1, 0], [-4, 3]])","A = [[1, 0], [-4, 3]]","schur(A)"],seealso:["lyap","sylvester"]},ZW={name:"lyap",category:"Algebra",syntax:["lyap(A,Q)"],description:"Solves the Continuous-time Lyapunov equation AP+PA'+Q=0 for P",examples:["lyap([[-2, 0], [1, -4]], [[3, 1], [1, 3]])","A = [[-2, 0], [1, -4]]","Q = [[3, 1], [1, 3]]","lyap(A,Q)"],seealso:["schur","sylvester"]},QW={name:"square",category:"Arithmetic",syntax:["square(x)"],description:"Compute the square of a value. The square of x is x * x.",examples:["square(3)","sqrt(9)","3^2","3 * 3"],seealso:["multiply","pow","sqrt","cube"]},XW={name:"subtract",category:"Operators",syntax:["x - y","subtract(x, y)"],description:"subtract two values.",examples:["a = 5.3 - 2","a + 2","2/3 - 1/6","2 * 3 - 3","2.1 km - 500m"],seealso:["add"]},eJ={name:"unaryMinus",category:"Operators",syntax:["-x","unaryMinus(x)"],description:"Inverse the sign of a value. Converts booleans and strings to numbers.",examples:["-4.5","-(-5.6)",'-"22"'],seealso:["add","subtract","unaryPlus"]},tJ={name:"unaryPlus",category:"Operators",syntax:["+x","unaryPlus(x)"],description:"Converts booleans and strings to numbers.",examples:["+true",'+"2"'],seealso:["add","subtract","unaryMinus"]},rJ={name:"xgcd",category:"Arithmetic",syntax:["xgcd(a, b)"],description:"Calculate the extended greatest common divisor for two values. The result is an array [d, x, y] with 3 entries, where d is the greatest common divisor, and d = x * a + y * b.",examples:["xgcd(8, 12)","gcd(8, 12)","xgcd(36163, 21199)"],seealso:["gcd","lcm"]},nJ={name:"bitAnd",category:"Bitwise",syntax:["x & y","bitAnd(x, y)"],description:"Bitwise AND operation. Performs the logical AND operation on each pair of the corresponding bits of the two given values by multiplying them. If both bits in the compared position are 1, the bit in the resulting binary representation is 1, otherwise, the result is 0",examples:["5 & 3","bitAnd(53, 131)","[1, 12, 31] & 42"],seealso:["bitNot","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},aJ={name:"bitNot",category:"Bitwise",syntax:["~x","bitNot(x)"],description:"Bitwise NOT operation. Performs a logical negation on each bit of the given value. Bits that are 0 become 1, and those that are 1 become 0.",examples:["~1","~2","bitNot([2, -3, 4])"],seealso:["bitAnd","bitOr","bitXor","leftShift","rightArithShift","rightLogShift"]},iJ={name:"bitOr",category:"Bitwise",syntax:["x | y","bitOr(x, y)"],description:"Bitwise OR operation. Performs the logical inclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if the first bit is 1 or the second bit is 1 or both bits are 1, otherwise, the result is 0.",examples:["5 | 3","bitOr([1, 2, 3], 4)"],seealso:["bitAnd","bitNot","bitXor","leftShift","rightArithShift","rightLogShift"]},oJ={name:"bitXor",category:"Bitwise",syntax:["bitXor(x, y)"],description:"Bitwise XOR operation, exclusive OR. Performs the logical exclusive OR operation on each pair of corresponding bits of the two given values. The result in each position is 1 if only the first bit is 1 or only the second bit is 1, but will be 0 if both are 0 or both are 1.",examples:["bitOr(1, 2)","bitXor([2, 3, 4], 4)"],seealso:["bitAnd","bitNot","bitOr","leftShift","rightArithShift","rightLogShift"]},sJ={name:"leftShift",category:"Bitwise",syntax:["x << y","leftShift(x, y)"],description:"Bitwise left logical shift of a value x by y number of bits.",examples:["4 << 1","8 >> 1"],seealso:["bitAnd","bitNot","bitOr","bitXor","rightArithShift","rightLogShift"]},uJ={name:"rightArithShift",category:"Bitwise",syntax:["x >> y","rightArithShift(x, y)"],description:"Bitwise right arithmetic shift of a value x by y number of bits.",examples:["8 >> 1","4 << 1","-12 >> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightLogShift"]},lJ={name:"rightLogShift",category:"Bitwise",syntax:["x >>> y","rightLogShift(x, y)"],description:"Bitwise right logical shift of a value x by y number of bits.",examples:["8 >>> 1","4 << 1","-12 >>> 2"],seealso:["bitAnd","bitNot","bitOr","bitXor","leftShift","rightArithShift"]},cJ={name:"bellNumbers",category:"Combinatorics",syntax:["bellNumbers(n)"],description:"The Bell Numbers count the number of partitions of a set. A partition is a pairwise disjoint subset of S whose union is S. `bellNumbers` only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["bellNumbers(3)","bellNumbers(8)"],seealso:["stirlingS2"]},fJ={name:"catalan",category:"Combinatorics",syntax:["catalan(n)"],description:"The Catalan Numbers enumerate combinatorial structures of many different types. catalan only takes integer arguments. The following condition must be enforced: n >= 0.",examples:["catalan(3)","catalan(8)"],seealso:["bellNumbers"]},mJ={name:"composition",category:"Combinatorics",syntax:["composition(n, k)"],description:"The composition counts of n into k parts. composition only takes integer arguments. The following condition must be enforced: k <= n.",examples:["composition(5, 3)"],seealso:["combinations"]},dJ={name:"stirlingS2",category:"Combinatorics",syntax:["stirlingS2(n, k)"],description:"The Stirling numbers of the second kind, counts the number of ways to partition a set of n labelled objects into k nonempty unlabelled subsets. `stirlingS2` only takes integer arguments. The following condition must be enforced: k <= n. If n = k or k = 1, then s(n,k) = 1.",examples:["stirlingS2(5, 3)"],seealso:["bellNumbers","bernoulli"]},hJ={name:"arg",category:"Complex",syntax:["arg(x)"],description:"Compute the argument of a complex value. If x = a+bi, the argument is computed as atan2(b, a).",examples:["arg(2 + 2i)","atan2(3, 2)","arg(2 + 3i)"],seealso:["re","im","conj","abs"]},pJ={name:"conj",category:"Complex",syntax:["conj(x)"],description:"Compute the complex conjugate of a complex value. If x = a+bi, the complex conjugate is a-bi.",examples:["conj(2 + 3i)","conj(2 - 3i)","conj(-5.2i)"],seealso:["re","im","abs","arg"]},gJ={name:"im",category:"Complex",syntax:["im(x)"],description:"Get the imaginary part of a complex number.",examples:["im(2 + 3i)","re(2 + 3i)","im(-5.2i)","im(2.4)"],seealso:["re","conj","abs","arg"]},vJ={name:"re",category:"Complex",syntax:["re(x)"],description:"Get the real part of a complex number.",examples:["re(2 + 3i)","im(2 + 3i)","re(-5.2i)","re(2.4)"],seealso:["im","conj","abs","arg"]},yJ={name:"evaluate",category:"Expression",syntax:["evaluate(expression)","evaluate(expression, scope)","evaluate([expr1, expr2, expr3, ...])","evaluate([expr1, expr2, expr3, ...], scope)"],description:"Evaluate an expression or an array with expressions.",examples:['evaluate("2 + 3")','evaluate("sqrt(16)")','evaluate("2 inch to cm")','evaluate("sin(x * pi)", { "x": 1/2 })','evaluate(["width=2", "height=4","width*height"])'],seealso:["parser","parse","compile"]},bJ={name:"parser",category:"Expression",syntax:["parser()"],description:"Create a parser object that keeps a context of variables and their values, allowing the evaluation of expressions in that context.",examples:["myParser = parser()",'myParser.evaluate("sqrt(3^2 + 4^2)")','myParser.set("x", 3)','myParser.evaluate("y = x + 3")','myParser.evaluate(["y = x + 3", "y = y + 1"])','myParser.get("y")'],seealso:["evaluate","parse","compile"]},wJ={name:"parse",category:"Expression",syntax:["parse(expr)","parse(expr, options)","parse([expr1, expr2, expr3, ...])","parse([expr1, expr2, expr3, ...], options)"],description:"Parse an expression. Returns a node tree, which can be evaluated by invoking node.evaluate() or transformed into a functional object via node.compile().",examples:['node1 = parse("sqrt(3^2 + 4^2)")',"node1.evaluate()","code1 = node1.compile()","code1.evaluate()","scope = {a: 3, b: 4}",'node2 = parse("a * b")',"node2.evaluate(scope)","code2 = node2.compile()","code2.evaluate(scope)"],seealso:["parser","evaluate","compile"]},xJ={name:"compile",category:"Expression",syntax:["compile(expr) ","compile([expr1, expr2, expr3, ...])"],description:"Parse and compile an expression. Returns a an object with a function evaluate([scope]) to evaluate the compiled expression.",examples:['code1 = compile("sqrt(3^2 + 4^2)")',"code1.evaluate() ",'code2 = compile("a * b")',"code2.evaluate({a: 3, b: 4})"],seealso:["parser","parse","evaluate"]},DJ={name:"help",category:"Expression",syntax:["help(object)","help(string)"],description:"Display documentation on a function or data type.",examples:["help(sqrt)",'help("complex")'],seealso:[]},NJ={name:"distance",category:"Geometry",syntax:["distance([x1, y1], [x2, y2])","distance([[x1, y1], [x2, y2]])"],description:"Calculates the Euclidean distance between two points.",examples:["distance([0,0], [4,4])","distance([[0,0], [4,4]])"],seealso:[]},AJ={name:"intersect",category:"Geometry",syntax:["intersect(expr1, expr2, expr3, expr4)","intersect(expr1, expr2, expr3)"],description:"Computes the intersection point of lines and/or planes.",examples:["intersect([0, 0], [10, 10], [10, 0], [0, 10])","intersect([1, 0, 1], [4, -2, 2], [1, 1, 1, 6])"],seealso:[]},CJ={name:"and",category:"Logical",syntax:["x and y","and(x, y)"],description:"Logical and. Test whether two values are both defined with a nonzero/nonempty value.",examples:["true and false","true and true","2 and 4"],seealso:["not","or","xor"]},EJ={name:"not",category:"Logical",syntax:["not x","not(x)"],description:"Logical not. Flips the boolean value of given argument.",examples:["not true","not false","not 2","not 0"],seealso:["and","or","xor"]},SJ={name:"nullish",category:"Logical",syntax:["x ?? y","nullish(x, y)"],description:"Nullish coalescing operator. Returns the right-hand operand when the left-hand operand is null or undefined, and otherwise returns the left-hand operand.",examples:["null ?? 42","undefined ?? 42","0 ?? 42","false ?? 42","null ?? undefined ?? 42"],seealso:["and","or","not"]},MJ={name:"or",category:"Logical",syntax:["x or y","or(x, y)"],description:"Logical or. Test if at least one value is defined with a nonzero/nonempty value.",examples:["true or false","false or false","0 or 4"],seealso:["not","and","xor"]},TJ={name:"xor",category:"Logical",syntax:["x xor y","xor(x, y)"],description:"Logical exclusive or, xor. Test whether one and only one value is defined with a nonzero/nonempty value.",examples:["true xor false","false xor false","true xor true","0 xor 4"],seealso:["not","and","or"]},FJ={name:"mapSlices",category:"Matrix",syntax:["mapSlices(A, dim, callback)"],description:"Generate a matrix one dimension less than A by applying callback to each slice of A along dimension dim.",examples:["A = [[1, 2], [3, 4]]","mapSlices(A, 1, sum)","mapSlices(A, 2, prod)"],seealso:["map","forEach"]},PJ={name:"column",category:"Matrix",syntax:["column(x, index)"],description:"Return a column from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","column(A, 1)","column(A, 2)"],seealso:["row","matrixFromColumns"]},kJ={name:"concat",category:"Matrix",syntax:["concat(A, B, C, ...)","concat(A, B, C, ..., dim)"],description:"Concatenate matrices. By default, the matrices are concatenated by the last dimension. The dimension on which to concatenate can be provided as last argument.",examples:["A = [1, 2; 5, 6]","B = [3, 4; 7, 8]","concat(A, B)","concat(A, B, 1)","concat(A, B, 2)"],seealso:["det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},OJ={name:"count",category:"Matrix",syntax:["count(x)"],description:"Count the number of elements of a matrix, array or string.",examples:["a = [1, 2; 3, 4; 5, 6]","count(a)","size(a)",'count("hello world")'],seealso:["size"]},$J={name:"cross",category:"Matrix",syntax:["cross(A, B)"],description:"Calculate the cross product for two vectors in three dimensional space.",examples:["cross([1, 1, 0], [0, 1, 1])","cross([3, -3, 1], [4, 9, 2])","cross([2, 3, 4], [5, 6, 7])"],seealso:["multiply","dot"]},BJ={name:"ctranspose",category:"Matrix",syntax:["x'","ctranspose(x)"],description:"Complex Conjugate and Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","ctranspose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},_J={name:"det",category:"Matrix",syntax:["det(x)"],description:"Calculate the determinant of a matrix",examples:["det([1, 2; 3, 4])","det([-2, 2, 3; -1, 1, 3; 2, 0, -1])"],seealso:["concat","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},IJ={name:"diag",category:"Matrix",syntax:["diag(x)","diag(x, k)"],description:"Create a diagonal matrix or retrieve the diagonal of a matrix. When x is a vector, a matrix with the vector values on the diagonal will be returned. When x is a matrix, a vector with the diagonal values of the matrix is returned. When k is provided, the k-th diagonal will be filled in or retrieved, if k is positive, the values are placed on the super diagonal. When k is negative, the values are placed on the sub diagonal.",examples:["diag(1:3)","diag(1:3, 1)","a = [1, 2, 3; 4, 5, 6; 7, 8, 9]","diag(a)"],seealso:["concat","det","identity","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},zJ={name:"diff",category:"Matrix",syntax:["diff(arr)","diff(arr, dim)"],description:["Create a new matrix or array with the difference of the passed matrix or array.","Dim parameter is optional and used to indicate the dimension of the array/matrix to apply the difference","If no dimension parameter is passed it is assumed as dimension 0","Dimension is zero-based in javascript and one-based in the parser","Arrays must be 'rectangular' meaning arrays like [1, 2]","If something is passed as a matrix it will be returned as a matrix but other than that all matrices are converted to arrays"],examples:["A = [1, 2, 4, 7, 0]","diff(A)","diff(A, 1)","B = [[1, 2], [3, 4]]","diff(B)","diff(B, 1)","diff(B, 2)","diff(B, bignumber(2))","diff([[1, 2], matrix([3, 4])], 2)"],seealso:["subtract","partitionSelect"]},jJ={name:"dot",category:"Matrix",syntax:["dot(A, B)","A * B"],description:"Calculate the dot product of two vectors. The dot product of A = [a1, a2, a3, ..., an] and B = [b1, b2, b3, ..., bn] is defined as dot(A, B) = a1 * b1 + a2 * b2 + a3 * b3 + ... + an * bn",examples:["dot([2, 4, 1], [2, 2, 3])","[2, 4, 1] * [2, 2, 3]"],seealso:["multiply","cross"]},qJ={name:"eigs",category:"Matrix",syntax:["eigs(x)"],description:"Calculate the eigenvalues and optionally eigenvectors of a square matrix",examples:["eigs([[5, 2.3], [2.3, 1]])","eigs([[1, 2, 3], [4, 5, 6], [7, 8, 9]], { precision: 1e-6, eigenvectors: false })"],seealso:["inv"]},RJ={name:"filter",category:"Matrix",syntax:["filter(x, test)"],description:"Filter items in a matrix.",examples:["isPositive(x) = x > 0","filter([6, -2, -1, 4, 3], isPositive)","filter([6, -2, 0, 1, 0], x != 0)"],seealso:["sort","map","forEach"]},LJ={name:"flatten",category:"Matrix",syntax:["flatten(x)"],description:"Flatten a multi dimensional matrix into a single dimensional matrix.",examples:["a = [1, 2, 3; 4, 5, 6]","size(a)","b = flatten(a)","size(b)"],seealso:["concat","resize","size","squeeze"]},HJ={name:"forEach",category:"Matrix",syntax:["forEach(x, callback)"],description:"Iterates over all elements of a matrix/array, and executes the given callback function.",examples:["numberOfPets = {}","addPet(n) = numberOfPets[n] = (numberOfPets[n] ? numberOfPets[n]:0 ) + 1;",'forEach(["Dog","Cat","Cat"], addPet)',"numberOfPets"],seealso:["map","sort","filter"]},GJ={name:"getMatrixDataType",category:"Matrix",syntax:["getMatrixDataType(x)"],description:'Find the data type of all elements in a matrix or array, for example "number" if all items are a number and "Complex" if all values are complex numbers. If a matrix contains more than one data type, it will return "mixed".',examples:["getMatrixDataType([1, 2, 3])","getMatrixDataType([[5 cm], [2 inch]])",'getMatrixDataType([1, "text"])',"getMatrixDataType([1, bignumber(4)])"],seealso:["matrix","sparse","typeOf"]},VJ={name:"identity",category:"Matrix",syntax:["identity(n)","identity(m, n)","identity([m, n])"],description:"Returns the identity matrix with size m-by-n. The matrix has ones on the diagonal and zeros elsewhere.",examples:["identity(3)","identity(3, 5)","a = [1, 2, 3; 4, 5, 6]","identity(size(a))"],seealso:["concat","det","diag","inv","ones","range","size","squeeze","subset","trace","transpose","zeros"]},UJ={name:"inv",category:"Matrix",syntax:["inv(x)"],description:"Calculate the inverse of a matrix",examples:["inv([1, 2; 3, 4])","inv(4)","1 / 4"],seealso:["concat","det","diag","identity","ones","range","size","squeeze","subset","trace","transpose","zeros"]},WJ={name:"pinv",category:"Matrix",syntax:["pinv(x)"],description:"Calculate the Moore–Penrose inverse of a matrix",examples:["pinv([1, 2; 3, 4])","pinv([[1, 0], [0, 1], [0, 1]])","pinv(4)"],seealso:["inv"]},JJ={name:"kron",category:"Matrix",syntax:["kron(x, y)"],description:"Calculates the Kronecker product of 2 matrices or vectors.",examples:["kron([[1, 0], [0, 1]], [[1, 2], [3, 4]])","kron([1,1], [2,3,4])"],seealso:["multiply","dot","cross"]},KJ={name:"map",category:"Matrix",syntax:["map(x, callback)","map(x, y, ..., callback)"],description:"Create a new matrix or array with the results of the callback function executed on each entry of the matrix/array or the matrices/arrays.",examples:["map([1, 2, 3], square)","map([1, 2], [3, 4], f(a,b) = a + b)"],seealso:["filter","forEach"]},YJ={name:"matrixFromColumns",category:"Matrix",syntax:["matrixFromColumns(...arr)","matrixFromColumns(row1, row2)","matrixFromColumns(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual columns.",examples:["matrixFromColumns([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromRows","matrixFromFunction","zeros"]},ZJ={name:"matrixFromFunction",category:"Matrix",syntax:["matrixFromFunction(size, fn)","matrixFromFunction(size, fn, format)","matrixFromFunction(size, fn, format, datatype)","matrixFromFunction(size, format, fn)","matrixFromFunction(size, format, datatype, fn)"],description:"Create a matrix by evaluating a generating function at each index.",examples:["f(I) = I[1] - I[2]","matrixFromFunction([3,3], f)","g(I) = I[1] - I[2] == 1 ? 4 : 0",'matrixFromFunction([100, 100], "sparse", g)',"matrixFromFunction([5], random)"],seealso:["matrix","matrixFromRows","matrixFromColumns","zeros"]},QJ={name:"matrixFromRows",category:"Matrix",syntax:["matrixFromRows(...arr)","matrixFromRows(row1, row2)","matrixFromRows(row1, row2, row3)"],description:"Create a dense matrix from vectors as individual rows.",examples:["matrixFromRows([1, 2, 3], [[4],[5],[6]])"],seealso:["matrix","matrixFromColumns","matrixFromFunction","zeros"]},XJ={name:"ones",category:"Matrix",syntax:["ones(m)","ones(m, n)","ones(m, n, p, ...)","ones([m])","ones([m, n])","ones([m, n, p, ...])"],description:"Create a matrix containing ones.",examples:["ones(3)","ones(3, 5)","ones([2,3]) * 4.5","a = [1, 2, 3; 4, 5, 6]","ones(size(a))"],seealso:["concat","det","diag","identity","inv","range","size","squeeze","subset","trace","transpose","zeros"]},eK={name:"partitionSelect",category:"Matrix",syntax:["partitionSelect(x, k)","partitionSelect(x, k, compare)"],description:"Partition-based selection of an array or 1D matrix. Will find the kth smallest value, and mutates the input array. Uses Quickselect.",examples:["partitionSelect([5, 10, 1], 2)",'partitionSelect(["C", "B", "A", "D"], 1, compareText)',"arr = [5, 2, 1]","partitionSelect(arr, 0) # returns 1, arr is now: [1, 2, 5]","arr","partitionSelect(arr, 1, 'desc') # returns 2, arr is now: [5, 2, 1]","arr"],seealso:["sort"]},tK={name:"range",category:"Type",syntax:["start:end","start:step:end","range(start, end)","range(start, end, step)","range(string)"],description:"Create a range. Lower bound of the range is included, upper bound is excluded.",examples:["1:5","3:-1:-3","range(3, 7)","range(0, 12, 2)",'range("4:10")',"range(1m, 1m, 3m)","a = [1, 2, 3, 4; 5, 6, 7, 8]","a[1:2, 1:2]"],seealso:["concat","det","diag","identity","inv","ones","size","squeeze","subset","trace","transpose","zeros"]},rK={name:"reshape",category:"Matrix",syntax:["reshape(x, sizes)"],description:"Reshape a multi dimensional array to fit the specified dimensions.",examples:["reshape([1, 2, 3, 4, 5, 6], [2, 3])","reshape([[1, 2], [3, 4]], [1, 4])","reshape([[1, 2], [3, 4]], [4])","reshape([1, 2, 3, 4], [-1, 2])"],seealso:["size","squeeze","resize"]},nK={name:"resize",category:"Matrix",syntax:["resize(x, size)","resize(x, size, defaultValue)"],description:"Resize a matrix.",examples:["resize([1,2,3,4,5], [3])","resize([1,2,3], [5])","resize([1,2,3], [5], -1)","resize(2, [2, 3])",'resize("hello", [8], "!")'],seealso:["size","subset","squeeze","reshape"]},aK={name:"rotate",category:"Matrix",syntax:["rotate(w, theta)","rotate(w, theta, v)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotate([1, 0], pi / 2)",'rotate(matrix([1, 0]), unit("35deg"))','rotate([1, 0, 0], unit("90deg"), [0, 0, 1])','rotate(matrix([1, 0, 0]), unit("90deg"), matrix([0, 0, 1]))'],seealso:["matrix","rotationMatrix"]},iK={name:"rotationMatrix",category:"Matrix",syntax:["rotationMatrix(theta)","rotationMatrix(theta, v)","rotationMatrix(theta, v, format)"],description:"Returns a 2-D rotation matrix (2x2) for a given angle (in radians). Returns a 2-D rotation matrix (3x3) of a given angle (in radians) around given axis.",examples:["rotationMatrix(pi / 2)",'rotationMatrix(unit("45deg"), [0, 0, 1])','rotationMatrix(1, matrix([0, 0, 1]), "sparse")'],seealso:["cos","sin"]},oK={name:"row",category:"Matrix",syntax:["row(x, index)"],description:"Return a row from a matrix or array.",examples:["A = [[1, 2], [3, 4]]","row(A, 1)","row(A, 2)"],seealso:["column","matrixFromRows"]},sK={name:"size",category:"Matrix",syntax:["size(x)"],description:"Calculate the size of a matrix.",examples:["size(2.3)",'size("hello world")',"a = [1, 2; 3, 4; 5, 6]","size(a)","size(1:6)"],seealso:["concat","count","det","diag","identity","inv","ones","range","squeeze","subset","trace","transpose","zeros"]},uK={name:"sort",category:"Matrix",syntax:["sort(x)","sort(x, compare)"],description:'Sort the items in a matrix. Compare can be a string "asc", "desc", "natural", or a custom sort function.',examples:["sort([5, 10, 1])",'sort(["C", "B", "A", "D"], "natural")',"sortByLength(a, b) = size(a)[1] - size(b)[1]",'sort(["Langdon", "Tom", "Sara"], sortByLength)','sort(["10", "1", "2"], "natural")'],seealso:["map","filter","forEach"]},lK={name:"squeeze",category:"Matrix",syntax:["squeeze(x)"],description:"Remove inner and outer singleton dimensions from a matrix.",examples:["a = zeros(3,2,1)","size(squeeze(a))","b = zeros(1,1,3)","size(squeeze(b))"],seealso:["concat","det","diag","identity","inv","ones","range","size","subset","trace","transpose","zeros"]},cK={name:"subset",category:"Matrix",syntax:["value(index)","value(index) = replacement","subset(value, [index])","subset(value, [index], replacement)"],description:"Get or set a subset of the entries of a matrix or characters of a string. Indexes are one-based. There should be one index specification for each dimension of the target. Each specification can be a single index, a list of indices, or a range in colon notation `l:u`. In a range, both the lower bound l and upper bound u are included; and if a bound is omitted it defaults to the most extreme valid value. The cartesian product of the indices specified in each dimension determines the target of the operation.",examples:["d = [1, 2; 3, 4]","e = []","e[1, 1:2] = [5, 6]","e[2, :] = [7, 8]","f = d * e","f[2, 1]","f[:, 1]","f[[1,2], [1,3]] = [9, 10; 11, 12]","f"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","trace","transpose","zeros"]},fK={name:"trace",category:"Matrix",syntax:["trace(A)"],description:"Calculate the trace of a matrix: the sum of the elements on the main diagonal of a square matrix.",examples:["A = [1, 2, 3; -1, 2, 3; 2, 0, 3]","trace(A)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","transpose","zeros"]},mK={name:"transpose",category:"Matrix",syntax:["x'","transpose(x)"],description:"Transpose a matrix",examples:["a = [1, 2, 3; 4, 5, 6]","a'","transpose(a)"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","zeros"]},dK={name:"zeros",category:"Matrix",syntax:["zeros(m)","zeros(m, n)","zeros(m, n, p, ...)","zeros([m])","zeros([m, n])","zeros([m, n, p, ...])"],description:"Create a matrix containing zeros.",examples:["zeros(3)","zeros(3, 5)","a = [1, 2, 3; 4, 5, 6]","zeros(size(a))"],seealso:["concat","det","diag","identity","inv","ones","range","size","squeeze","subset","trace","transpose"]},hK={name:"fft",category:"Matrix",syntax:["fft(x)"],description:"Calculate N-dimensional Fourier transform",examples:["fft([[1, 0], [1, 0]])"],seealso:["ifft"]},pK={name:"ifft",category:"Matrix",syntax:["ifft(x)"],description:"Calculate N-dimensional inverse Fourier transform",examples:["ifft([[2, 2], [0, 0]])"],seealso:["fft"]},gK={name:"bernoulli",category:"Probability",syntax:["bernoulli(n)"],description:"The nth Bernoulli number",examples:["bernoulli(4)","bernoulli(fraction(12))"],seealso:["combinations","gamma","stirlingS2"]},vK={name:"combinations",category:"Probability",syntax:["combinations(n, k)"],description:"Compute the number of combinations of n items taken k at a time",examples:["combinations(7, 5)"],seealso:["combinationsWithRep","permutations","factorial"]},yK={name:"combinationsWithRep",category:"Probability",syntax:["combinationsWithRep(n, k)"],description:"Compute the number of combinations of n items taken k at a time with replacements.",examples:["combinationsWithRep(7, 5)"],seealso:["combinations","permutations","factorial"]},bK={name:"factorial",category:"Probability",syntax:["n!","factorial(n)"],description:"Compute the factorial of a value",examples:["5!","5 * 4 * 3 * 2 * 1","3!"],seealso:["combinations","combinationsWithRep","permutations","gamma"]},wK={name:"gamma",category:"Probability",syntax:["gamma(n)"],description:"Compute the gamma function. For small values, the Lanczos approximation is used, and for large values the extended Stirling approximation.",examples:["gamma(4)","3!","gamma(1/2)","sqrt(pi)"],seealso:["factorial"]},xK={name:"lgamma",category:"Probability",syntax:["lgamma(n)"],description:"Logarithm of the gamma function for real, positive numbers and complex numbers, using Lanczos approximation for numbers and Stirling series for complex numbers.",examples:["lgamma(4)","lgamma(1/2)","lgamma(i)","lgamma(complex(1.1, 2))"],seealso:["gamma"]},DK={name:"kldivergence",category:"Probability",syntax:["kldivergence(x, y)"],description:"Calculate the Kullback-Leibler (KL) divergence between two distributions.",examples:["kldivergence([0.7,0.5,0.4], [0.2,0.9,0.5])"],seealso:[]},NK={name:"multinomial",category:"Probability",syntax:["multinomial(A)"],description:"Multinomial Coefficients compute the number of ways of picking a1, a2, ..., ai unordered outcomes from `n` possibilities. multinomial takes one array of integers as an argument. The following condition must be enforced: every ai > 0.",examples:["multinomial([1, 2, 1])"],seealso:["combinations","factorial"]},AK={name:"permutations",category:"Probability",syntax:["permutations(n)","permutations(n, k)"],description:"Compute the number of permutations of n items taken k at a time",examples:["permutations(5)","permutations(5, 3)"],seealso:["combinations","combinationsWithRep","factorial"]},CK={name:"pickRandom",category:"Probability",syntax:["pickRandom(array)","pickRandom(array, number)","pickRandom(array, weights)","pickRandom(array, number, weights)","pickRandom(array, weights, number)"],description:"Pick a random entry from a given array.",examples:["pickRandom(0:10)","pickRandom([1, 3, 1, 6])","pickRandom([1, 3, 1, 6], 2)","pickRandom([1, 3, 1, 6], [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], 2, [2, 3, 2, 1])","pickRandom([1, 3, 1, 6], [2, 3, 2, 1], 2)"],seealso:["random","randomInt"]},EK={name:"random",category:"Probability",syntax:["random()","random(max)","random(min, max)","random(size)","random(size, max)","random(size, min, max)"],description:"Return a random number.",examples:["random()","random(10, 20)","random([2, 3])"],seealso:["pickRandom","randomInt"]},SK={name:"randomInt",category:"Probability",syntax:["randomInt(max)","randomInt(min, max)","randomInt(size)","randomInt(size, max)","randomInt(size, min, max)"],description:"Return a random integer number",examples:["randomInt(10, 20)","randomInt([2, 3], 10)"],seealso:["pickRandom","random"]},MK={name:"compare",category:"Relational",syntax:["compare(x, y)"],description:"Compare two values. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compare(2, 3)","compare(3, 2)","compare(2, 2)","compare(5cm, 40mm)","compare(2, [1, 2, 3])"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compareNatural","compareText"]},TK={name:"compareNatural",category:"Relational",syntax:["compareNatural(x, y)"],description:"Compare two values of any type in a deterministic, natural way. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:["compareNatural(2, 3)","compareNatural(3, 2)","compareNatural(2, 2)","compareNatural(5cm, 40mm)",'compareNatural("2", "10")',"compareNatural(2 + 3i, 2 + 4i)","compareNatural([1, 2, 4], [1, 2, 3])","compareNatural([1, 5], [1, 2, 3])","compareNatural([1, 2], [1, 2])","compareNatural({a: 2}, {a: 4})"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare","compareText"]},FK={name:"compareText",category:"Relational",syntax:["compareText(x, y)"],description:"Compare two strings lexically. Comparison is case sensitive. Returns 1 when x > y, -1 when x < y, and 0 when x == y.",examples:['compareText("B", "A")','compareText("A", "B")','compareText("A", "A")','compareText("2", "10")','compare("2", "10")',"compare(2, 10)",'compareNatural("2", "10")','compareText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural"]},PK={name:"deepEqual",category:"Relational",syntax:["deepEqual(x, y)"],description:"Check equality of two matrices element wise. Returns true if the size of both matrices is equal and when and each of the elements are equal.",examples:["deepEqual([1,3,4], [1,3,4])","deepEqual([1,3,4], [1,3])"],seealso:["equal","unequal","smaller","larger","smallerEq","largerEq","compare"]},kK={name:"equal",category:"Relational",syntax:["x == y","equal(x, y)"],description:"Check equality of two values. Returns true if the values are equal, and false if not.",examples:["2+2 == 3","2+2 == 4","a = 3.2","b = 6-2.8","a == b","50cm == 0.5m"],seealso:["unequal","smaller","larger","smallerEq","largerEq","compare","deepEqual","equalText"]},OK={name:"equalText",category:"Relational",syntax:["equalText(x, y)"],description:"Check equality of two strings. Comparison is case sensitive. Returns true if the values are equal, and false if not.",examples:['equalText("Hello", "Hello")','equalText("a", "A")','equal("2e3", "2000")','equalText("2e3", "2000")','equalText("B", ["A", "B", "C"])'],seealso:["compare","compareNatural","compareText","equal"]},$K={name:"larger",category:"Relational",syntax:["x > y","larger(x, y)"],description:"Check if value x is larger than y. Returns true if x is larger than y, and false if not. Comparing a value with NaN returns false.",examples:["2 > 3","5 > 2*2","a = 3.3","b = 6-2.8","(a > b)","(b < a)","5 cm > 2 inch"],seealso:["equal","unequal","smaller","smallerEq","largerEq","compare"]},BK={name:"largerEq",category:"Relational",syntax:["x >= y","largerEq(x, y)"],description:"Check if value x is larger or equal to y. Returns true if x is larger or equal to y, and false if not.",examples:["2 >= 1+1","2 > 1+1","a = 3.2","b = 6-2.8","(a >= b)"],seealso:["equal","unequal","smallerEq","smaller","compare"]},_K={name:"smaller",category:"Relational",syntax:["x < y","smaller(x, y)"],description:"Check if value x is smaller than value y. Returns true if x is smaller than y, and false if not. Comparing a value with NaN returns false.",examples:["2 < 3","5 < 2*2","a = 3.3","b = 6-2.8","(a < b)","5 cm < 2 inch"],seealso:["equal","unequal","larger","smallerEq","largerEq","compare"]},IK={name:"smallerEq",category:"Relational",syntax:["x <= y","smallerEq(x, y)"],description:"Check if value x is smaller or equal to value y. Returns true if x is smaller than y, and false if not.",examples:["2 <= 1+1","2 < 1+1","a = 3.2","b = 6-2.8","(a <= b)"],seealso:["equal","unequal","larger","smaller","largerEq","compare"]},zK={name:"unequal",category:"Relational",syntax:["x != y","unequal(x, y)"],description:"Check unequality of two values. Returns true if the values are unequal, and false if they are equal.",examples:["2+2 != 3","2+2 != 4","a = 3.2","b = 6-2.8","a != b","50cm != 0.5m","5 cm != 2 inch"],seealso:["equal","smaller","larger","smallerEq","largerEq","compare","deepEqual"]},jK={name:"setCartesian",category:"Set",syntax:["setCartesian(set1, set2)"],description:"Create the cartesian product of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays and the values will be sorted in ascending order before the operation.",examples:["setCartesian([1, 2], [3, 4])"],seealso:["setUnion","setIntersect","setDifference","setPowerset"]},qK={name:"setDifference",category:"Set",syntax:["setDifference(set1, set2)"],description:"Create the difference of two (multi)sets: every element of set1, that is not the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setDifference([1, 2, 3, 4], [3, 4, 5, 6])","setDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setSymDifference"]},RK={name:"setDistinct",category:"Set",syntax:["setDistinct(set)"],description:"Collect the distinct elements of a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setDistinct([1, 1, 1, 2, 2, 3])"],seealso:["setMultiplicity"]},LK={name:"setIntersect",category:"Set",syntax:["setIntersect(set1, set2)"],description:"Create the intersection of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIntersect([1, 2, 3, 4], [3, 4, 5, 6])","setIntersect([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setDifference"]},HK={name:"setIsSubset",category:"Set",syntax:["setIsSubset(set1, set2)"],description:"Check whether a (multi)set is a subset of another (multi)set: every element of set1 is the element of set2. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setIsSubset([1, 2], [3, 4, 5, 6])","setIsSubset([3, 4], [3, 4, 5, 6])"],seealso:["setUnion","setIntersect","setDifference"]},GK={name:"setMultiplicity",category:"Set",syntax:["setMultiplicity(element, set)"],description:"Count the multiplicity of an element in a multiset. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setMultiplicity(1, [1, 2, 2, 4])","setMultiplicity(2, [1, 2, 2, 4])"],seealso:["setDistinct","setSize"]},VK={name:"setPowerset",category:"Set",syntax:["setPowerset(set)"],description:"Create the powerset of a (multi)set: the powerset contains very possible subsets of a (multi)set. A multi-dimension array will be converted to a single-dimension array before the operation.",examples:["setPowerset([1, 2, 3])"],seealso:["setCartesian"]},UK={name:"setSize",category:"Set",syntax:["setSize(set)","setSize(set, unique)"],description:'Count the number of elements of a (multi)set. When the second parameter "unique" is true, count only the unique values. A multi-dimension array will be converted to a single-dimension array before the operation.',examples:["setSize([1, 2, 2, 4])","setSize([1, 2, 2, 4], true)"],seealso:["setUnion","setIntersect","setDifference"]},WK={name:"setSymDifference",category:"Set",syntax:["setSymDifference(set1, set2)"],description:"Create the symmetric difference of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setSymDifference([1, 2, 3, 4], [3, 4, 5, 6])","setSymDifference([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setUnion","setIntersect","setDifference"]},JK={name:"setUnion",category:"Set",syntax:["setUnion(set1, set2)"],description:"Create the union of two (multi)sets. Multi-dimension arrays will be converted to single-dimension arrays before the operation.",examples:["setUnion([1, 2, 3, 4], [3, 4, 5, 6])","setUnion([[1, 2], [3, 4]], [[3, 4], [5, 6]])"],seealso:["setIntersect","setDifference"]},KK={name:"zpk2tf",category:"Signal",syntax:["zpk2tf(z, p, k)"],description:"Compute the transfer function of a zero-pole-gain model.",examples:["zpk2tf([1, 2], [-1, -2], 1)","zpk2tf([1, 2], [-1, -2])","zpk2tf([1 - 3i, 2 + 2i], [-1, -2])"],seealso:[]},YK={name:"freqz",category:"Signal",syntax:["freqz(b, a)","freqz(b, a, w)"],description:"Calculates the frequency response of a filter given its numerator and denominator coefficients.",examples:["freqz([1, 2], [1, 2, 3])","freqz([1, 2], [1, 2, 3], [0, 1])","freqz([1, 2], [1, 2, 3], 512)"],seealso:[]},ZK={name:"erf",category:"Special",syntax:["erf(x)"],description:"Compute the erf function of a value using a rational Chebyshev approximations for different intervals of x",examples:["erf(0.2)","erf(-0.5)","erf(4)"],seealso:[]},QK={name:"zeta",category:"Special",syntax:["zeta(s)"],description:"Compute the Riemann Zeta Function using an infinite series and Riemann's Functional Equation for the entire complex plane",examples:["zeta(0.2)","zeta(-0.5)","zeta(4)"],seealso:[]},XK={name:"mad",category:"Statistics",syntax:["mad(a, b, c, ...)","mad(A)"],description:"Compute the median absolute deviation of a matrix or a list with values. The median absolute deviation is defined as the median of the absolute deviations from the median.",examples:["mad(10, 20, 30)","mad([1, 2, 3])"],seealso:["mean","median","std","abs"]},eY={name:"max",category:"Statistics",syntax:["max(a, b, c, ...)","max(A)","max(A, dimension)"],description:"Compute the maximum value of a list of values. If any NaN values are found, the function yields the last NaN in the input.",examples:["max(2, 3, 4, 1)","max([2, 3, 4, 1])","max([2, 5; 4, 3])","max([2, 5; 4, 3], 1)","max([2, 5; 4, 3], 2)","max(2.7, 7.1, -4.5, 2.0, 4.1)","min(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["mean","median","min","prod","std","sum","variance"]},tY={name:"mean",category:"Statistics",syntax:["mean(a, b, c, ...)","mean(A)","mean(A, dimension)"],description:"Compute the arithmetic mean of a list of values.",examples:["mean(2, 3, 4, 1)","mean([2, 3, 4, 1])","mean([2, 5; 4, 3])","mean([2, 5; 4, 3], 1)","mean([2, 5; 4, 3], 2)","mean([1.0, 2.7, 3.2, 4.0])"],seealso:["max","median","min","prod","std","sum","variance"]},rY={name:"median",category:"Statistics",syntax:["median(a, b, c, ...)","median(A)"],description:"Compute the median of all values. The values are sorted and the middle value is returned. In case of an even number of values, the average of the two middle values is returned.",examples:["median(5, 2, 7)","median([3, -1, 5, 7])"],seealso:["max","mean","min","prod","std","sum","variance","quantileSeq"]},nY={name:"min",category:"Statistics",syntax:["min(a, b, c, ...)","min(A)","min(A, dimension)"],description:"Compute the minimum value of a list of values. If any NaN values are found, the function yields the last NaN in the input.",examples:["min(2, 3, 4, 1)","min([2, 3, 4, 1])","min([2, 5; 4, 3])","min([2, 5; 4, 3], 1)","min([2, 5; 4, 3], 2)","min(2.7, 7.1, -4.5, 2.0, 4.1)","max(2.7, 7.1, -4.5, 2.0, 4.1)"],seealso:["max","mean","median","prod","std","sum","variance"]},aY={name:"mode",category:"Statistics",syntax:["mode(a, b, c, ...)","mode(A)","mode(A, a, b, B, c, ...)"],description:"Computes the mode of all values as an array. In case mode being more than one, multiple values are returned in an array.",examples:["mode(2, 1, 4, 3, 1)","mode([1, 2.7, 3.2, 4, 2.7])","mode(1, 4, 6, 1, 6)"],seealso:["max","mean","min","median","prod","std","sum","variance"]},iY={name:"prod",category:"Statistics",syntax:["prod(a, b, c, ...)","prod(A)"],description:"Compute the product of all values.",examples:["prod(2, 3, 4)","prod([2, 3, 4])","prod([2, 5; 4, 3])"],seealso:["max","mean","min","median","min","std","sum","variance"]},oY={name:"quantileSeq",category:"Statistics",syntax:["quantileSeq(A, prob[, sorted])","quantileSeq(A, [prob1, prob2, ...][, sorted])","quantileSeq(A, N[, sorted])"],description:`Compute the prob order quantile of a matrix or a list with values. The sequence is sorted and the middle value is returned. Supported types of sequence values are: Number, BigNumber, Unit Supported types of probability are: Number, BigNumber.
78
+
79
+ In case of a (multi dimensional) array or matrix, the prob order quantile of all elements will be calculated.`,examples:["quantileSeq([3, -1, 5, 7], 0.5)","quantileSeq([3, -1, 5, 7], [1/3, 2/3])","quantileSeq([3, -1, 5, 7], 2)","quantileSeq([-1, 3, 5, 7], 0.5, true)"],seealso:["mean","median","min","max","prod","std","sum","variance"]},sY={name:"std",category:"Statistics",syntax:["std(a, b, c, ...)","std(A)","std(A, dimension)","std(A, normalization)","std(A, dimension, normalization)"],description:'Compute the standard deviation of all values, defined as std(A) = sqrt(variance(A)). Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["std(2, 4, 6)","std([2, 4, 6, 8])",'std([2, 4, 6, 8], "uncorrected")','std([2, 4, 6, 8], "biased")',"std([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","prod","sum","variance"]},uY={name:"cumsum",category:"Statistics",syntax:["cumsum(a, b, c, ...)","cumsum(A)"],description:"Compute the cumulative sum of all values.",examples:["cumsum(2, 3, 4, 1)","cumsum([2, 3, 4, 1])","cumsum([1, 2; 3, 4])","cumsum([1, 2; 3, 4], 1)","cumsum([1, 2; 3, 4], 2)"],seealso:["max","mean","median","min","prod","std","sum","variance"]},lY={name:"sum",category:"Statistics",syntax:["sum(a, b, c, ...)","sum(A)","sum(A, dimension)"],description:"Compute the sum of all values.",examples:["sum(2, 3, 4, 1)","sum([2, 3, 4, 1])","sum([2, 5; 4, 3])"],seealso:["max","mean","median","min","prod","std","variance"]},cY={name:"variance",category:"Statistics",syntax:["variance(a, b, c, ...)","variance(A)","variance(A, dimension)","variance(A, normalization)","variance(A, dimension, normalization)"],description:'Compute the variance of all values. Optional parameter normalization can be "unbiased" (default), "uncorrected", or "biased".',examples:["variance(2, 4, 6)","variance([2, 4, 6, 8])",'variance([2, 4, 6, 8], "uncorrected")','variance([2, 4, 6, 8], "biased")',"variance([1, 2, 3; 4, 5, 6])"],seealso:["max","mean","min","median","min","prod","std","sum"]},fY={name:"corr",category:"Statistics",syntax:["corr(A,B)"],description:"Compute the correlation coefficient of a two list with values, For matrices, the matrix correlation coefficient is calculated.",examples:["corr([2, 4, 6, 8],[1, 2, 3, 6])","corr(matrix([[1, 2.2, 3, 4.8, 5], [1, 2, 3, 4, 5]]), matrix([[4, 5.3, 6.6, 7, 8], [1, 2, 3, 4, 5]]))"],seealso:["max","mean","min","median","min","prod","std","sum"]},mY={name:"acos",category:"Trigonometry",syntax:["acos(x)"],description:"Compute the inverse cosine of a value in radians.",examples:["acos(0.5)","acos(cos(2.3))"],seealso:["cos","atan","asin"]},dY={name:"acosh",category:"Trigonometry",syntax:["acosh(x)"],description:"Calculate the hyperbolic arccos of a value, defined as `acosh(x) = ln(sqrt(x^2 - 1) + x)`.",examples:["acosh(1.5)"],seealso:["cosh","asinh","atanh"]},hY={name:"acot",category:"Trigonometry",syntax:["acot(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acot(0.5)","acot(cot(0.5))","acot(2)"],seealso:["cot","atan"]},pY={name:"acoth",category:"Trigonometry",syntax:["acoth(x)"],description:"Calculate the inverse hyperbolic tangent of a value, defined as `acoth(x) = (ln((x+1)/x) + ln(x/(x-1))) / 2`.",examples:["acoth(2)","acoth(0.5)"],seealso:["acsch","asech"]},gY={name:"acsc",category:"Trigonometry",syntax:["acsc(x)"],description:"Calculate the inverse cotangent of a value.",examples:["acsc(2)","acsc(csc(0.5))","acsc(0.5)"],seealso:["csc","asin","asec"]},vY={name:"acsch",category:"Trigonometry",syntax:["acsch(x)"],description:"Calculate the inverse hyperbolic cosecant of a value, defined as `acsch(x) = ln(1/x + sqrt(1/x^2 + 1))`.",examples:["acsch(0.5)"],seealso:["asech","acoth"]},yY={name:"asec",category:"Trigonometry",syntax:["asec(x)"],description:"Calculate the inverse secant of a value.",examples:["asec(0.5)","asec(sec(0.5))","asec(2)"],seealso:["acos","acot","acsc"]},bY={name:"asech",category:"Trigonometry",syntax:["asech(x)"],description:"Calculate the inverse secant of a value.",examples:["asech(0.5)"],seealso:["acsch","acoth"]},wY={name:"asin",category:"Trigonometry",syntax:["asin(x)"],description:"Compute the inverse sine of a value in radians.",examples:["asin(0.5)","asin(sin(0.5))"],seealso:["sin","acos","atan"]},xY={name:"asinh",category:"Trigonometry",syntax:["asinh(x)"],description:"Calculate the hyperbolic arcsine of a value, defined as `asinh(x) = ln(x + sqrt(x^2 + 1))`.",examples:["asinh(0.5)"],seealso:["acosh","atanh"]},DY={name:"atan",category:"Trigonometry",syntax:["atan(x)"],description:"Compute the inverse tangent of a value in radians.",examples:["atan(0.5)","atan(tan(0.5))"],seealso:["tan","acos","asin"]},NY={name:"atan2",category:"Trigonometry",syntax:["atan2(y, x)"],description:"Computes the principal value of the arc tangent of y/x in radians.",examples:["atan2(2, 2) / pi","angle = 60 deg in rad","x = cos(angle)","y = sin(angle)","atan2(y, x)"],seealso:["sin","cos","tan"]},AY={name:"atanh",category:"Trigonometry",syntax:["atanh(x)"],description:"Calculate the hyperbolic arctangent of a value, defined as `atanh(x) = ln((1 + x)/(1 - x)) / 2`.",examples:["atanh(0.5)"],seealso:["acosh","asinh"]},CY={name:"cos",category:"Trigonometry",syntax:["cos(x)"],description:"Compute the cosine of x in radians.",examples:["cos(2)","cos(pi / 4) ^ 2","cos(180 deg)","cos(60 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["acos","sin","tan"]},EY={name:"cosh",category:"Trigonometry",syntax:["cosh(x)"],description:"Compute the hyperbolic cosine of x in radians.",examples:["cosh(0.5)"],seealso:["sinh","tanh","coth"]},SY={name:"cot",category:"Trigonometry",syntax:["cot(x)"],description:"Compute the cotangent of x in radians. Defined as 1/tan(x)",examples:["cot(2)","1 / tan(2)"],seealso:["sec","csc","tan"]},MY={name:"coth",category:"Trigonometry",syntax:["coth(x)"],description:"Compute the hyperbolic cotangent of x in radians.",examples:["coth(2)","1 / tanh(2)"],seealso:["sech","csch","tanh"]},TY={name:"csc",category:"Trigonometry",syntax:["csc(x)"],description:"Compute the cosecant of x in radians. Defined as 1/sin(x)",examples:["csc(2)","1 / sin(2)"],seealso:["sec","cot","sin"]},FY={name:"csch",category:"Trigonometry",syntax:["csch(x)"],description:"Compute the hyperbolic cosecant of x in radians. Defined as 1/sinh(x)",examples:["csch(2)","1 / sinh(2)"],seealso:["sech","coth","sinh"]},PY={name:"sec",category:"Trigonometry",syntax:["sec(x)"],description:"Compute the secant of x in radians. Defined as 1/cos(x)",examples:["sec(2)","1 / cos(2)"],seealso:["cot","csc","cos"]},kY={name:"sech",category:"Trigonometry",syntax:["sech(x)"],description:"Compute the hyperbolic secant of x in radians. Defined as 1/cosh(x)",examples:["sech(2)","1 / cosh(2)"],seealso:["coth","csch","cosh"]},OY={name:"sin",category:"Trigonometry",syntax:["sin(x)"],description:"Compute the sine of x in radians.",examples:["sin(2)","sin(pi / 4) ^ 2","sin(90 deg)","sin(30 deg)","sin(0.2)^2 + cos(0.2)^2"],seealso:["asin","cos","tan"]},$Y={name:"sinh",category:"Trigonometry",syntax:["sinh(x)"],description:"Compute the hyperbolic sine of x in radians.",examples:["sinh(0.5)"],seealso:["cosh","tanh"]},BY={name:"tan",category:"Trigonometry",syntax:["tan(x)"],description:"Compute the tangent of x in radians.",examples:["tan(0.5)","sin(0.5) / cos(0.5)","tan(pi / 4)","tan(45 deg)"],seealso:["atan","sin","cos"]},_Y={name:"tanh",category:"Trigonometry",syntax:["tanh(x)"],description:"Compute the hyperbolic tangent of x in radians.",examples:["tanh(0.5)","sinh(0.5) / cosh(0.5)"],seealso:["sinh","cosh"]},IY={name:"to",category:"Units",syntax:["x to unit","to(x, unit)"],description:"Change the unit of a value.",examples:["5 inch to cm","3.2kg to g","16 bytes in bits"],seealso:[]},zY={name:"toBest",category:"Units",syntax:["toBest(x)","toBest(x, unitList)","toBest(x, unitList, options)"],description:"Converts to the most appropriate display unit.",examples:['toBest(unit(5000, "m"))','toBest(unit(3500000, "W"))','toBest(unit(0.000000123, "A"))','toBest(unit(10, "m"), "cm")','toBest(unit(10, "m"), "mm,km", {offset: 1.5})'],seealso:[]},jY={name:"bin",category:"Utils",syntax:["bin(value)"],description:"Format a number as binary",examples:["bin(2)"],seealso:["oct","hex"]},qY={name:"clone",category:"Utils",syntax:["clone(x)"],description:"Clone a variable. Creates a copy of primitive variables, and a deep copy of matrices",examples:["clone(3.5)","clone(2 - 4i)","clone(45 deg)","clone([1, 2; 3, 4])",'clone("hello world")'],seealso:[]},RY={name:"format",category:"Utils",syntax:["format(value)","format(value, precision)"],description:"Format a value of any type as string.",examples:["format(2.3)","format(3 - 4i)","format([])","format(pi, 3)"],seealso:["print"]},LY={name:"hasNumericValue",category:"Utils",syntax:["hasNumericValue(x)"],description:"Test whether a value is an numeric value. In case of a string, true is returned if the string contains a numeric value.",examples:["hasNumericValue(2)",'hasNumericValue("2")','isNumeric("2")',"hasNumericValue(0)","hasNumericValue(bignumber(500))","hasNumericValue(fraction(0.125))","hasNumericValue(2 + 3i)",'hasNumericValue([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","isNumeric"]},HY={name:"hex",category:"Utils",syntax:["hex(value)"],description:"Format a number as hexadecimal",examples:["hex(240)"],seealso:["bin","oct"]},GY={name:"isInteger",category:"Utils",syntax:["isInteger(x)"],description:"Test whether a value is an integer number.",examples:["isInteger(2)","isInteger(3.5)","isInteger([3, 0.5, -2])"],seealso:["isNegative","isNumeric","isPositive","isZero"]},VY={name:"isNaN",category:"Utils",syntax:["isNaN(x)"],description:"Test whether a value is NaN (not a number)",examples:["isNaN(2)","isNaN(0 / 0)","isNaN(NaN)","isNaN(Infinity)"],seealso:["isNegative","isNumeric","isPositive","isZero","isFinite","isBounded"]},UY={name:"isBounded",category:"Utils",syntax:["isBounded(x)"],description:"Test whether a value or its entries are bounded.",examples:["isBounded(Infinity)","isBounded(bigint(3))","isBounded([3, -Infinity, -3])"],seealso:["isFinite","isNumeric","isNaN","isNegative","isPositive"]},WY={name:"isFinite",category:"Utils",syntax:["isFinite(x)"],description:"Test whether a value is finite, elementwise on collections.",examples:["isFinite(Infinity)","isFinite(bigint(3))","isFinite([3, -Infinity, -3])"],seealso:["isBounded","isNumeric","isNaN","isNegative","isPositive"]},JY={name:"isNegative",category:"Utils",syntax:["isNegative(x)"],description:"Test whether a value is negative: smaller than zero.",examples:["isNegative(2)","isNegative(0)","isNegative(-4)","isNegative([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isPositive","isZero"]},KY={name:"isNumeric",category:"Utils",syntax:["isNumeric(x)"],description:"Test whether a value is a numeric value. Returns true when the input is a number, BigNumber, Fraction, or boolean.",examples:["isNumeric(2)",'isNumeric("2")','hasNumericValue("2")',"isNumeric(0)","isNumeric(bignumber(500))","isNumeric(fraction(0.125))","isNumeric(2 + 3i)",'isNumeric([2.3, "foo", false])'],seealso:["isInteger","isZero","isNegative","isPositive","isNaN","hasNumericValue","isFinite","isBounded"]},YY={name:"isPositive",category:"Utils",syntax:["isPositive(x)"],description:"Test whether a value is positive: larger than zero.",examples:["isPositive(2)","isPositive(0)","isPositive(-4)","isPositive([3, 0.5, -2])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},ZY={name:"isPrime",category:"Utils",syntax:["isPrime(x)"],description:"Test whether a value is prime: has no divisors other than itself and one.",examples:["isPrime(3)","isPrime(-2)","isPrime([2, 17, 100])"],seealso:["isInteger","isNumeric","isNegative","isZero"]},QY={name:"isZero",category:"Utils",syntax:["isZero(x)"],description:"Test whether a value is zero.",examples:["isZero(2)","isZero(0)","isZero(-4)","isZero([3, 0, -2, 0])"],seealso:["isInteger","isNumeric","isNegative","isPositive"]},XY={name:"numeric",category:"Utils",syntax:["numeric(x)"],description:"Convert a numeric input to a specific numeric type: number, BigNumber, bigint, or Fraction.",examples:['numeric("4")','numeric("4", "number")','numeric("4", "bigint")','numeric("4", "BigNumber")','numeric("4", "Fraction")','numeric(4, "Fraction")','numeric(fraction(2, 5), "number")'],seealso:["number","bigint","fraction","bignumber","string","format"]},eZ={name:"oct",category:"Utils",syntax:["oct(value)"],description:"Format a number as octal",examples:["oct(56)"],seealso:["bin","hex"]},tZ={name:"print",category:"Utils",syntax:["print(template, values)","print(template, values, precision)"],description:"Interpolate values into a string template.",examples:['print("Lucy is $age years old", {age: 5})','print("The value of pi is $pi", {pi: pi}, 3)','print("Hello, $user.name!", {user: {name: "John"}})','print("Values: $1, $2, $3", [6, 9, 4])'],seealso:["format"]},rZ={name:"typeOf",category:"Utils",syntax:["typeOf(x)"],description:"Get the type of a variable.",examples:["typeOf(3.5)","typeOf(2 - 4i)","typeOf(45 deg)",'typeOf("hello world")'],seealso:["getMatrixDataType"]},nZ={name:"solveODE",category:"Numeric",syntax:["solveODE(func, tspan, y0)","solveODE(func, tspan, y0, options)"],description:"Numerical Integration of Ordinary Differential Equations.",examples:["f(t,y) = y","tspan = [0, 4]","solveODE(f, tspan, 1)","solveODE(f, tspan, [1, 2])",'solveODE(f, tspan, 1, { method:"RK23", maxStep:0.1 })'],seealso:["derivative","simplifyCore"]},aZ={bignumber:zU,bigint:jU,boolean:qU,complex:RU,createUnit:LU,fraction:HU,index:GU,matrix:VU,number:UU,sparse:WU,splitUnit:JU,string:KU,unit:YU,e:Fy,E:Fy,false:NU,i:AU,Infinity:CU,LN2:SU,LN10:EU,LOG2E:TU,LOG10E:MU,NaN:FU,null:PU,pi:Py,PI:Py,phi:kU,SQRT1_2:OU,SQRT2:$U,tau:BU,true:_U,version:IU,speedOfLight:{description:"Speed of light in vacuum",examples:["speedOfLight"]},gravitationConstant:{description:"Newtonian constant of gravitation",examples:["gravitationConstant"]},planckConstant:{description:"Planck constant",examples:["planckConstant"]},reducedPlanckConstant:{description:"Reduced Planck constant",examples:["reducedPlanckConstant"]},magneticConstant:{description:"Magnetic constant (vacuum permeability)",examples:["magneticConstant"]},electricConstant:{description:"Electric constant (vacuum permeability)",examples:["electricConstant"]},vacuumImpedance:{description:"Characteristic impedance of vacuum",examples:["vacuumImpedance"]},coulomb:{description:"Coulomb's constant. Deprecated in favor of coulombConstant",examples:["coulombConstant"]},coulombConstant:{description:"Coulomb's constant",examples:["coulombConstant"]},elementaryCharge:{description:"Elementary charge",examples:["elementaryCharge"]},bohrMagneton:{description:"Bohr magneton",examples:["bohrMagneton"]},conductanceQuantum:{description:"Conductance quantum",examples:["conductanceQuantum"]},inverseConductanceQuantum:{description:"Inverse conductance quantum",examples:["inverseConductanceQuantum"]},magneticFluxQuantum:{description:"Magnetic flux quantum",examples:["magneticFluxQuantum"]},nuclearMagneton:{description:"Nuclear magneton",examples:["nuclearMagneton"]},klitzing:{description:"Von Klitzing constant",examples:["klitzing"]},bohrRadius:{description:"Bohr radius",examples:["bohrRadius"]},classicalElectronRadius:{description:"Classical electron radius",examples:["classicalElectronRadius"]},electronMass:{description:"Electron mass",examples:["electronMass"]},fermiCoupling:{description:"Fermi coupling constant",examples:["fermiCoupling"]},fineStructure:{description:"Fine-structure constant",examples:["fineStructure"]},hartreeEnergy:{description:"Hartree energy",examples:["hartreeEnergy"]},protonMass:{description:"Proton mass",examples:["protonMass"]},deuteronMass:{description:"Deuteron Mass",examples:["deuteronMass"]},neutronMass:{description:"Neutron mass",examples:["neutronMass"]},quantumOfCirculation:{description:"Quantum of circulation",examples:["quantumOfCirculation"]},rydberg:{description:"Rydberg constant",examples:["rydberg"]},thomsonCrossSection:{description:"Thomson cross section",examples:["thomsonCrossSection"]},weakMixingAngle:{description:"Weak mixing angle",examples:["weakMixingAngle"]},efimovFactor:{description:"Efimov factor",examples:["efimovFactor"]},atomicMass:{description:"Atomic mass constant",examples:["atomicMass"]},avogadro:{description:"Avogadro's number",examples:["avogadro"]},boltzmann:{description:"Boltzmann constant",examples:["boltzmann"]},faraday:{description:"Faraday constant",examples:["faraday"]},firstRadiation:{description:"First radiation constant",examples:["firstRadiation"]},loschmidt:{description:"Loschmidt constant at T=273.15 K and p=101.325 kPa",examples:["loschmidt"]},gasConstant:{description:"Gas constant",examples:["gasConstant"]},molarPlanckConstant:{description:"Molar Planck constant",examples:["molarPlanckConstant"]},molarVolume:{description:"Molar volume of an ideal gas at T=273.15 K and p=101.325 kPa",examples:["molarVolume"]},sackurTetrode:{description:"Sackur-Tetrode constant at T=1 K and p=101.325 kPa",examples:["sackurTetrode"]},secondRadiation:{description:"Second radiation constant",examples:["secondRadiation"]},stefanBoltzmann:{description:"Stefan-Boltzmann constant",examples:["stefanBoltzmann"]},wienDisplacement:{description:"Wien displacement law constant",examples:["wienDisplacement"]},molarMass:{description:"Molar mass constant",examples:["molarMass"]},molarMassC12:{description:"Molar mass constant of carbon-12",examples:["molarMassC12"]},gravity:{description:"Standard acceleration of gravity (standard acceleration of free-fall on Earth)",examples:["gravity"]},planckLength:{description:"Planck length",examples:["planckLength"]},planckMass:{description:"Planck mass",examples:["planckMass"]},planckTime:{description:"Planck time",examples:["planckTime"]},planckCharge:{description:"Planck charge",examples:["planckCharge"]},planckTemperature:{description:"Planck temperature",examples:["planckTemperature"]},derivative:eW,lsolve:rW,lsolveAll:nW,lup:aW,lusolve:iW,leafCount:tW,polynomialRoot:oW,resolve:lW,simplify:cW,simplifyConstant:fW,simplifyCore:mW,symbolicEqual:hW,rationalize:uW,slu:dW,usolve:pW,usolveAll:gW,qr:sW,abs:vW,add:yW,cbrt:bW,ceil:wW,cube:xW,divide:DW,dotDivide:NW,dotMultiply:AW,dotPow:CW,exp:EW,expm:SW,expm1:MW,fix:TW,floor:FW,gcd:PW,hypot:kW,lcm:$W,log:BW,log2:zW,log1p:IW,log10:_W,mod:jW,multiply:qW,norm:RW,nthRoot:LW,nthRoots:HW,pow:GW,round:VW,sign:UW,sqrt:WW,sqrtm:JW,square:QW,subtract:XW,unaryMinus:eJ,unaryPlus:tJ,xgcd:rJ,invmod:OW,bitAnd:nJ,bitNot:aJ,bitOr:iJ,bitXor:oJ,leftShift:sJ,rightArithShift:uJ,rightLogShift:lJ,bellNumbers:cJ,catalan:fJ,composition:mJ,stirlingS2:dJ,config:ZU,import:QU,typed:XU,arg:hJ,conj:pJ,re:vJ,im:gJ,evaluate:yJ,help:DJ,parse:wJ,parser:bJ,compile:xJ,distance:NJ,intersect:AJ,and:CJ,not:EJ,nullish:SJ,or:MJ,xor:TJ,mapSlices:FJ,concat:kJ,count:OJ,cross:$J,column:PJ,ctranspose:BJ,det:_J,diag:IJ,diff:zJ,dot:jJ,getMatrixDataType:GJ,identity:VJ,filter:RJ,flatten:LJ,forEach:HJ,inv:UJ,pinv:WJ,eigs:qJ,kron:JJ,matrixFromFunction:ZJ,matrixFromRows:QJ,matrixFromColumns:YJ,map:KJ,ones:XJ,partitionSelect:eK,range:tK,resize:nK,reshape:rK,rotate:aK,rotationMatrix:iK,row:oK,size:sK,sort:uK,squeeze:lK,subset:cK,trace:fK,transpose:mK,zeros:dK,fft:hK,ifft:pK,sylvester:KW,schur:YW,lyap:ZW,solveODE:nZ,bernoulli:gK,combinations:vK,combinationsWithRep:yK,factorial:bK,gamma:wK,kldivergence:DK,lgamma:xK,multinomial:NK,permutations:AK,pickRandom:CK,random:EK,randomInt:SK,compare:MK,compareNatural:TK,compareText:FK,deepEqual:PK,equal:kK,equalText:OK,larger:$K,largerEq:BK,smaller:_K,smallerEq:IK,unequal:zK,setCartesian:jK,setDifference:qK,setDistinct:RK,setIntersect:LK,setIsSubset:HK,setMultiplicity:GK,setPowerset:VK,setSize:UK,setSymDifference:WK,setUnion:JK,zpk2tf:KK,freqz:YK,erf:ZK,zeta:QK,cumsum:uY,mad:XK,max:eY,mean:tY,median:rY,min:nY,mode:aY,prod:iY,quantileSeq:oY,std:sY,sum:lY,variance:cY,corr:fY,acos:mY,acosh:dY,acot:hY,acoth:pY,acsc:gY,acsch:vY,asec:yY,asech:bY,asin:wY,asinh:xY,atan:DY,atanh:AY,atan2:NY,cos:CY,cosh:EY,cot:SY,coth:MY,csc:TY,csch:FY,sec:PY,sech:kY,sin:OY,sinh:$Y,tan:BY,tanh:_Y,to:IY,toBest:zY,clone:qY,format:RY,bin:jY,oct:eZ,hex:HY,isNaN:VY,isBounded:UY,isFinite:WY,isInteger:GY,isNegative:JY,isNumeric:KY,hasNumericValue:LY,isPositive:YY,isPrime:ZY,isZero:QY,print:tZ,typeOf:rZ,numeric:XY},ky="help",iZ=["typed","mathWithTransform","Help"],oZ=I(ky,iZ,e=>{var{typed:t,mathWithTransform:r,Help:n}=e;return t(ky,{any:function(i){var o,s=i;if(typeof i!="string"){for(o in r)if(Fe(r,o)&&i===r[o]){s=o;break}}var u=Wr(aZ,s);if(!u){var l=typeof s=="function"?s.name:s;throw new Error('No documentation found on "'+l+'"')}return new n(u)}})}),Oy="chain",sZ=["typed","Chain"],uZ=I(Oy,sZ,e=>{var{typed:t,Chain:r}=e;return t(Oy,{"":function(){return new r},any:function(a){return new r(a)}})}),$y="det",lZ=["typed","matrix","subtractScalar","multiply","divideScalar","isZero","unaryMinus"],cZ=I($y,lZ,e=>{var{typed:t,matrix:r,subtractScalar:n,multiply:a,divideScalar:i,isZero:o,unaryMinus:s}=e;return t($y,{any:function(c){return We(c)},"Array | Matrix":function(c){var f;switch(Le(c)?f=c.size():Array.isArray(c)?(c=r(c),f=c.size()):f=[],f.length){case 0:return We(c);case 1:if(f[0]===1)return We(c.valueOf()[0]);if(f[0]===0)return 1;throw new RangeError("Matrix must be square (size: "+it(f)+")");case 2:{var m=f[0],d=f[1];if(m===d)return u(c.clone().valueOf(),m);if(d===0)return 1;throw new RangeError("Matrix must be square (size: "+it(f)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+it(f)+")")}}});function u(l,c,f){if(c===1)return We(l[0][0]);if(c===2)return n(a(l[0][0],l[1][1]),a(l[1][0],l[0][1]));for(var m=!1,d=new Array(c).fill(0).map((C,N)=>N),h=0;h<c;h++){var p=d[h];if(o(l[p][h])){var y=void 0;for(y=h+1;y<c;y++)if(!o(l[d[y]][h])){p=d[y],d[y]=d[h],d[h]=p,m=!m;break}if(y===c)return l[p][h]}for(var w=l[p][h],D=h===0?1:l[d[h-1]][h-1],v=h+1;v<c;v++)for(var x=d[v],g=h+1;g<c;g++)l[x][g]=i(n(a(l[x][g],w),a(l[x][h],l[p][g])),D)}var b=l[d[c-1]][c-1];return m?s(b):b}}),By="inv",fZ=["typed","matrix","divideScalar","addScalar","multiply","unaryMinus","det","identity","abs"],mZ=I(By,fZ,e=>{var{typed:t,matrix:r,divideScalar:n,addScalar:a,multiply:i,unaryMinus:o,det:s,identity:u,abs:l}=e;return t(By,{"Array | Matrix":function(m){var d=Le(m)?m.size():Je(m);switch(d.length){case 1:if(d[0]===1)return Le(m)?r([n(1,m.valueOf()[0])]):[n(1,m[0])];throw new RangeError("Matrix must be square (size: "+it(d)+")");case 2:{var h=d[0],p=d[1];if(h===p)return Le(m)?r(c(m.valueOf(),h,p),m.storage()):c(m,h,p);throw new RangeError("Matrix must be square (size: "+it(d)+")")}default:throw new RangeError("Matrix must be two dimensional (size: "+it(d)+")")}},any:function(m){return n(1,m)}});function c(f,m,d){var h,p,y,w,D;if(m===1){if(w=f[0][0],w===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(1,w)]]}else if(m===2){var v=s(f);if(v===0)throw Error("Cannot calculate inverse, determinant is zero");return[[n(f[1][1],v),n(o(f[0][1]),v)],[n(o(f[1][0]),v),n(f[0][0],v)]]}else{var x=f.concat();for(h=0;h<m;h++)x[h]=x[h].concat();for(var g=u(m).valueOf(),b=0;b<d;b++){var C=l(x[b][b]),N=b;for(h=b+1;h<m;)l(x[h][b])>C&&(C=l(x[h][b]),N=h),h++;if(C===0)throw Error("Cannot calculate inverse, determinant is zero");h=N,h!==b&&(D=x[b],x[b]=x[h],x[h]=D,D=g[b],g[b]=g[h],g[h]=D);var A=x[b],E=g[b];for(h=0;h<m;h++){var S=x[h],F=g[h];if(h!==b){if(S[b]!==0){for(y=n(o(S[b]),A[b]),p=b;p<d;p++)S[p]=a(S[p],i(y,A[p]));for(p=0;p<d;p++)F[p]=a(F[p],i(y,E[p]))}}else{for(y=A[b],p=b;p<d;p++)S[p]=n(S[p],y);for(p=0;p<d;p++)F[p]=n(F[p],y)}}}return g}}}),_y="pinv",dZ=["typed","matrix","inv","deepEqual","equal","dotDivide","dot","ctranspose","divideScalar","multiply","add","Complex"],hZ=I(_y,dZ,e=>{var{typed:t,matrix:r,inv:n,deepEqual:a,equal:i,dotDivide:o,dot:s,ctranspose:u,divideScalar:l,multiply:c,add:f,Complex:m}=e;return t(_y,{"Array | Matrix":function(v){var x=Le(v)?v.size():Je(v);switch(x.length){case 1:return w(v)?u(v):x[0]===1?n(v):o(u(v),s(v,v));case 2:{if(w(v))return u(v);var g=x[0],b=x[1];if(g===b)try{return n(v)}catch(C){if(!(C instanceof Error&&C.message.match(/Cannot calculate inverse, determinant is zero/)))throw C}return Le(v)?r(d(v.valueOf(),g,b),v.storage()):d(v,g,b)}default:throw new RangeError("Matrix must be two dimensional (size: "+it(x)+")")}},any:function(v){return i(v,0)?We(v):l(1,v)}});function d(D,v,x){var{C:g,F:b}=p(D,v,x),C=c(n(c(u(g),g)),u(g)),N=c(u(b),n(c(b,u(b))));return c(N,C)}function h(D,v,x){for(var g=We(D),b=0,C=0;C<v;C++){if(x<=b)return g;for(var N=C;y(g[N][b]);)if(N++,v===N&&(N=C,b++,x===b))return g;[g[N],g[C]]=[g[C],g[N]];for(var A=g[C][b],E=0;E<x;E++)g[C][E]=o(g[C][E],A);for(var S=0;S<v;S++)if(S!==C){A=g[S][b];for(var F=0;F<x;F++)g[S][F]=f(g[S][F],c(-1,c(A,g[C][F])))}b++}return g}function p(D,v,x){var g=h(D,v,x),b=D.map((N,A)=>N.filter((E,S)=>S<v&&!y(s(g[S],g[S])))),C=g.filter((N,A)=>!y(s(g[A],g[A])));return{C:b,F:C}}function y(D){return i(f(D,m(1,1)),f(0,m(1,1)))}function w(D){return a(f(D,m(1,1)),f(c(D,0),m(1,1)))}});function pZ(e){var{addScalar:t,subtract:r,flatten:n,multiply:a,multiplyScalar:i,divideScalar:o,sqrt:s,abs:u,bignumber:l,diag:c,size:f,reshape:m,inv:d,qr:h,usolve:p,usolveAll:y,equal:w,complex:D,larger:v,smaller:x,matrixFromColumns:g,dot:b}=e;function C(V,P,Q,z){var oe=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,ne=N(V,P,Q,z,oe);A(V,P,Q,z,oe,ne);var{values:U,C:_}=E(V,P,Q,z,oe);if(oe){var J=S(V,P,_,ne,U,Q,z);return{values:U,eigenvectors:J}}return{values:U}}function N(V,P,Q,z,oe){var ne=z==="BigNumber",U=z==="Complex",_=ne?l(0):0,J=ne?l(1):U?D(1):1,ae=ne?l(1):1,ee=ne?l(10):2,ue=i(ee,ee),se;oe&&(se=Array(P).fill(J));for(var be=!1;!be;){be=!0;for(var Me=0;Me<P;Me++){for(var Pe=_,Ee=_,Oe=0;Oe<P;Oe++)Me!==Oe&&(Pe=t(Pe,u(V[Oe][Me])),Ee=t(Ee,u(V[Me][Oe])));if(!w(Pe,0)&&!w(Ee,0)){for(var je=ae,H=Pe,X=o(Ee,ee),O=i(Ee,ee);x(H,X);)H=i(H,ue),je=i(je,ee);for(;v(H,O);)H=o(H,ue),je=o(je,ee);var q=x(o(t(H,Ee),je),i(t(Pe,Ee),.95));if(q){be=!1;for(var K=o(1,je),te=0;te<P;te++)Me!==te&&(V[Me][te]=i(V[Me][te],K),V[te][Me]=i(V[te][Me],je));oe&&(se[Me]=i(se[Me],K))}}}}return oe?c(se):null}function A(V,P,Q,z,oe,ne){var U=z==="BigNumber",_=z==="Complex",J=U?l(0):_?D(0):0;U&&(Q=l(Q));for(var ae=0;ae<P-2;ae++){for(var ee=0,ue=J,se=ae+1;se<P;se++){var be=V[se][ae];x(u(ue),u(be))&&(ue=be,ee=se)}if(!x(u(ue),Q)){if(ee!==ae+1){var Me=V[ee];V[ee]=V[ae+1],V[ae+1]=Me;for(var Pe=0;Pe<P;Pe++){var Ee=V[Pe][ee];V[Pe][ee]=V[Pe][ae+1],V[Pe][ae+1]=Ee}if(oe){var Oe=ne[ee];ne[ee]=ne[ae+1],ne[ae+1]=Oe}}for(var je=ae+2;je<P;je++){var H=o(V[je][ae],ue);if(H!==0){for(var X=0;X<P;X++)V[je][X]=r(V[je][X],i(H,V[ae+1][X]));for(var O=0;O<P;O++)V[O][ae+1]=t(V[O][ae+1],i(H,V[O][je]));if(oe)for(var q=0;q<P;q++)ne[je][q]=r(ne[je][q],i(H,ne[ae+1][q]))}}}}return ne}function E(V,P,Q,z,oe){var ne=z==="BigNumber",U=z==="Complex",_=ne?l(1):U?D(1):1;ne&&(Q=l(Q));for(var J=We(V),ae=[],ee=P,ue=[],se=oe?c(Array(P).fill(_)):void 0,be=oe?c(Array(ee).fill(_)):void 0,Me=0;Me<=100;){Me+=1;for(var Pe=J[ee-1][ee-1],Ee=0;Ee<ee;Ee++)J[Ee][Ee]=r(J[Ee][Ee],Pe);var{Q:Oe,R:je}=h(J);J=a(je,Oe);for(var H=0;H<ee;H++)J[H][H]=t(J[H][H],Pe);if(oe&&(be=a(be,Oe)),ee===1||x(u(J[ee-1][ee-2]),Q)){Me=0,ae.push(J[ee-1][ee-1]),oe&&(ue.unshift([[1]]),$(be,P),se=a(se,be),ee>1&&(be=c(Array(ee-1).fill(_)))),ee-=1,J.pop();for(var X=0;X<ee;X++)J[X].pop()}else if(ee===2||x(u(J[ee-2][ee-3]),Q)){Me=0;var O=F(J[ee-2][ee-2],J[ee-2][ee-1],J[ee-1][ee-2],J[ee-1][ee-1]);ae.push(...O),oe&&(ue.unshift(k(J[ee-2][ee-2],J[ee-2][ee-1],J[ee-1][ee-2],J[ee-1][ee-1],O[0],O[1],Q,z)),$(be,P),se=a(se,be),ee>2&&(be=c(Array(ee-2).fill(_)))),ee-=2,J.pop(),J.pop();for(var q=0;q<ee;q++)J[q].pop(),J[q].pop()}if(ee===0)break}if(ae.sort((ie,re)=>+r(u(ie),u(re))),Me>100){var K=Error("The eigenvalues failed to converge. Only found these eigenvalues: "+ae.join(", "));throw K.values=ae,K.vectors=[],K}var te=oe?a(se,R(ue,P)):void 0;return{values:ae,C:te}}function S(V,P,Q,z,oe,ne,U){var _=d(Q),J=a(_,V,Q),ae=U==="BigNumber",ee=U==="Complex",ue=ae?l(0):ee?D(0):0,se=ae?l(1):ee?D(1):1,be=[],Me=[];for(var Pe of oe){var Ee=M(be,Pe,w);Ee===-1?(be.push(Pe),Me.push(1)):Me[Ee]+=1}for(var Oe=[],je=be.length,H=Array(P).fill(ue),X=c(Array(P).fill(se)),O=function(){var te=be[q],ie=r(J,a(te,X)),re=y(ie,H);for(re.shift();re.length<Me[q];){var pe=B(ie,P,re,ne,U);if(pe===null)break;re.push(pe)}var me=a(d(z),Q);re=re.map(Ae=>a(me,Ae)),Oe.push(...re.map(Ae=>({value:te,vector:n(Ae)})))},q=0;q<je;q++)O();return Oe}function F(V,P,Q,z){var oe=t(V,z),ne=r(i(V,z),i(P,Q)),U=i(oe,.5),_=i(s(r(i(oe,oe),i(4,ne))),.5);return[t(U,_),r(U,_)]}function k(V,P,Q,z,oe,ne,U,_){var J=_==="BigNumber",ae=_==="Complex",ee=J?l(0):ae?D(0):0,ue=J?l(1):ae?D(1):1;if(x(u(Q),U))return[[ue,ee],[ee,ue]];if(v(u(r(oe,ne)),U))return[[r(oe,z),r(ne,z)],[Q,Q]];var se=r(V,oe),be=r(z,oe);return x(u(P),U)&&x(u(be),U)?[[se,ue],[Q,ee]]:[[P,ee],[be,ue]]}function $(V,P){for(var Q=0;Q<V.length;Q++)V[Q].push(...Array(P-V[Q].length).fill(0));for(var z=V.length;z<P;z++)V.push(Array(P).fill(0)),V[z][z]=1;return V}function R(V,P){for(var Q=[],z=0;z<P;z++)Q[z]=Array(P).fill(0);var oe=0;for(var ne of V){for(var U=ne.length,_=0;_<U;_++)for(var J=0;J<U;J++)Q[oe+_][oe+J]=ne[_][J];oe+=U}return Q}function M(V,P,Q){for(var z=0;z<V.length;z++)if(Q(V[z],P))return z;return-1}function B(V,P,Q,z,oe){for(var ne=oe==="BigNumber"?l(1e3):1e3,U,_=0;_<5;++_){U=L(P,Q,oe);try{U=p(V,U)}catch{continue}if(v(Z(U),ne))break}if(_>=5)return null;for(_=0;;){var J=p(V,U);if(x(Z(j(U,[J])),z))break;if(++_>=10)return null;U=G(J)}return U}function L(V,P,Q){var z=Q==="BigNumber",oe=Q==="Complex",ne=Array(V).fill(0).map(U=>2*Math.random()-1);return z&&(ne=ne.map(U=>l(U))),oe&&(ne=ne.map(U=>D(U))),ne=j(ne,P),G(ne,Q)}function j(V,P){var Q=f(V);for(var z of P)z=m(z,Q),V=r(V,a(o(b(z,V),b(z,z)),z));return V}function Z(V){return u(s(b(V,V)))}function G(V,P){var Q=P==="BigNumber",z=P==="Complex",oe=Q?l(1):z?D(1):1;return a(o(oe,Z(V)),V)}return C}function gZ(e){var{config:t,addScalar:r,subtract:n,abs:a,atan:i,cos:o,sin:s,multiplyScalar:u,inv:l,bignumber:c,multiply:f,add:m}=e;function d(A,E){var S=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.relTol,F=arguments.length>3?arguments[3]:void 0,k=arguments.length>4?arguments[4]:void 0;if(F==="number")return h(A,S,k);if(F==="BigNumber")return p(A,S,k);throw TypeError("Unsupported data type: "+F)}function h(A,E,S){var F=A.length,k=Math.abs(E/F),$,R;if(S){R=new Array(F);for(var M=0;M<F;M++)R[M]=Array(F).fill(0),R[M][M]=1}for(var B=b(A);Math.abs(B[1])>=Math.abs(k);){var L=B[0][0],j=B[0][1];$=y(A[L][L],A[j][j],A[L][j]),A=g(A,$,L,j),S&&(R=D(R,$,L,j)),B=b(A)}for(var Z=Array(F).fill(0),G=0;G<F;G++)Z[G]=A[G][G];return N(We(Z),R,S)}function p(A,E,S){var F=A.length,k=a(E/F),$,R;if(S){R=new Array(F);for(var M=0;M<F;M++)R[M]=Array(F).fill(0),R[M][M]=1}for(var B=C(A);a(B[1])>=a(k);){var L=B[0][0],j=B[0][1];$=w(A[L][L],A[j][j],A[L][j]),A=x(A,$,L,j),S&&(R=v(R,$,L,j)),B=C(A)}for(var Z=Array(F).fill(0),G=0;G<F;G++)Z[G]=A[G][G];return N(We(Z),R,S)}function y(A,E,S){var F=E-A;return Math.abs(F)<=t.relTol?Math.PI/4:.5*Math.atan(2*S/(E-A))}function w(A,E,S){var F=n(E,A);return a(F)<=t.relTol?c(-1).acos().div(4):u(.5,i(f(2,S,l(F))))}function D(A,E,S,F){for(var k=A.length,$=Math.cos(E),R=Math.sin(E),M=Array(k).fill(0),B=Array(k).fill(0),L=0;L<k;L++)M[L]=$*A[L][S]-R*A[L][F],B[L]=R*A[L][S]+$*A[L][F];for(var j=0;j<k;j++)A[j][S]=M[j],A[j][F]=B[j];return A}function v(A,E,S,F){for(var k=A.length,$=o(E),R=s(E),M=Array(k).fill(c(0)),B=Array(k).fill(c(0)),L=0;L<k;L++)M[L]=n(u($,A[L][S]),u(R,A[L][F])),B[L]=r(u(R,A[L][S]),u($,A[L][F]));for(var j=0;j<k;j++)A[j][S]=M[j],A[j][F]=B[j];return A}function x(A,E,S,F){for(var k=A.length,$=c(o(E)),R=c(s(E)),M=u($,$),B=u(R,R),L=Array(k).fill(c(0)),j=Array(k).fill(c(0)),Z=f(c(2),$,R,A[S][F]),G=r(n(u(M,A[S][S]),Z),u(B,A[F][F])),V=m(u(B,A[S][S]),Z,u(M,A[F][F])),P=0;P<k;P++)L[P]=n(u($,A[S][P]),u(R,A[F][P])),j[P]=r(u(R,A[S][P]),u($,A[F][P]));A[S][S]=G,A[F][F]=V,A[S][F]=c(0),A[F][S]=c(0);for(var Q=0;Q<k;Q++)Q!==S&&Q!==F&&(A[S][Q]=L[Q],A[Q][S]=L[Q],A[F][Q]=j[Q],A[Q][F]=j[Q]);return A}function g(A,E,S,F){for(var k=A.length,$=Math.cos(E),R=Math.sin(E),M=$*$,B=R*R,L=Array(k).fill(0),j=Array(k).fill(0),Z=M*A[S][S]-2*$*R*A[S][F]+B*A[F][F],G=B*A[S][S]+2*$*R*A[S][F]+M*A[F][F],V=0;V<k;V++)L[V]=$*A[S][V]-R*A[F][V],j[V]=R*A[S][V]+$*A[F][V];A[S][S]=Z,A[F][F]=G,A[S][F]=0,A[F][S]=0;for(var P=0;P<k;P++)P!==S&&P!==F&&(A[S][P]=L[P],A[P][S]=L[P],A[F][P]=j[P],A[P][F]=j[P]);return A}function b(A){for(var E=A.length,S=0,F=[0,1],k=0;k<E;k++)for(var $=k+1;$<E;$++)Math.abs(S)<Math.abs(A[k][$])&&(S=Math.abs(A[k][$]),F=[k,$]);return[F,S]}function C(A){for(var E=A.length,S=0,F=[0,1],k=0;k<E;k++)for(var $=k+1;$<E;$++)a(S)<a(A[k][$])&&(S=a(A[k][$]),F=[k,$]);return[F,S]}function N(A,E,S){var F=A.length,k=Array(F),$;if(S){$=Array(F);for(var R=0;R<F;R++)$[R]=Array(F)}for(var M=0;M<F;M++){for(var B=0,L=A[0],j=0;j<A.length;j++)a(A[j])<a(L)&&(B=j,L=A[B]);if(k[M]=A.splice(B,1)[0],S)for(var Z=0;Z<F;Z++)$[M][Z]=E[Z][B],E[Z].splice(B,1)}if(!S)return{values:k};var G=$.map((V,P)=>({value:k[P],vector:V}));return{values:k,eigenvectors:G}}return d}var vZ="eigs",yZ=["config","typed","matrix","addScalar","equal","subtract","abs","atan","cos","sin","multiplyScalar","divideScalar","inv","bignumber","multiply","add","larger","column","flatten","number","complex","sqrt","diag","size","reshape","qr","usolve","usolveAll","im","re","smaller","matrixFromColumns","dot"],bZ=I(vZ,yZ,e=>{var{config:t,typed:r,matrix:n,addScalar:a,subtract:i,equal:o,abs:s,atan:u,cos:l,sin:c,multiplyScalar:f,divideScalar:m,inv:d,bignumber:h,multiply:p,add:y,larger:w,column:D,flatten:v,number:x,complex:g,sqrt:b,diag:C,size:N,reshape:A,qr:E,usolve:S,usolveAll:F,im:k,re:$,smaller:R,matrixFromColumns:M,dot:B}=e,L=gZ({config:t,addScalar:a,subtract:i,abs:s,atan:u,cos:l,sin:c,multiplyScalar:f,inv:d,bignumber:h,multiply:p,add:y}),j=pZ({addScalar:a,subtract:i,multiply:p,multiplyScalar:f,flatten:v,divideScalar:m,sqrt:b,abs:s,bignumber:h,diag:C,size:N,reshape:A,qr:E,inv:d,usolve:S,usolveAll:F,equal:o,complex:g,larger:w,smaller:R,matrixFromColumns:M,dot:B});return r("eigs",{Array:function(ne){return Z(n(ne))},"Array, number|BigNumber":function(ne,U){return Z(n(ne),{precision:U})},"Array, Object"(oe,ne){return Z(n(oe),ne)},Matrix:function(ne){return Z(ne,{matricize:!0})},"Matrix, number|BigNumber":function(ne,U){return Z(ne,{precision:U,matricize:!0})},"Matrix, Object":function(ne,U){var _={matricize:!0};return tr(_,U),Z(ne,_)}});function Z(oe){var ne,U=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},_="eigenvectors"in U?U.eigenvectors:!0,J=(ne=U.precision)!==null&&ne!==void 0?ne:t.relTol,ae=G(oe,J,_);return U.matricize&&(ae.values=n(ae.values),_&&(ae.eigenvectors=ae.eigenvectors.map(ee=>{var{value:ue,vector:se}=ee;return{value:ue,vector:n(se)}}))),_&&Object.defineProperty(ae,"vectors",{enumerable:!1,get:()=>{throw new Error("eigs(M).vectors replaced with eigs(M).eigenvectors")}}),ae}function G(oe,ne,U){var _=oe.toArray(),J=oe.size();if(J.length!==2||J[0]!==J[1])throw new RangeError("Matrix must be square (size: ".concat(it(J),")"));var ae=J[0];if(P(_,ae,ne)&&(Q(_,ae),V(_,ae,ne))){var ee=z(oe,_,ae);return L(_,ae,ne,ee,U)}var ue=z(oe,_,ae);return j(_,ae,ne,ue,U)}function V(oe,ne,U){for(var _=0;_<ne;_++)for(var J=_;J<ne;J++)if(w(h(s(i(oe[_][J],oe[J][_]))),U))return!1;return!0}function P(oe,ne,U){for(var _=0;_<ne;_++)for(var J=0;J<ne;J++)if(w(h(s(k(oe[_][J]))),U))return!1;return!0}function Q(oe,ne){for(var U=0;U<ne;U++)for(var _=0;_<ne;_++)oe[U][_]=$(oe[U][_])}function z(oe,ne,U){var _=oe.datatype();if(_==="number"||_==="BigNumber"||_==="Complex")return _;for(var J=!1,ae=!1,ee=!1,ue=0;ue<U;ue++)for(var se=0;se<U;se++){var be=ne[ue][se];if(qe(be)||au(be))J=!0;else if(Qe(be))ae=!0;else if(_a(be))ee=!0;else throw TypeError("Unsupported type in Matrix: "+Pt(be))}if(ae&&ee&&console.warn("Complex BigNumbers not supported, this operation will lose precission."),ee){for(var Me=0;Me<U;Me++)for(var Pe=0;Pe<U;Pe++)ne[Me][Pe]=g(ne[Me][Pe]);return"Complex"}if(ae){for(var Ee=0;Ee<U;Ee++)for(var Oe=0;Oe<U;Oe++)ne[Ee][Oe]=h(ne[Ee][Oe]);return"BigNumber"}if(J){for(var je=0;je<U;je++)for(var H=0;H<U;H++)ne[je][H]=x(ne[je][H]);return"number"}else throw TypeError("Matrix contains unsupported types only.")}}),Iy="expm",wZ=["typed","abs","add","identity","inv","multiply"],xZ=I(Iy,wZ,e=>{var{typed:t,abs:r,add:n,identity:a,inv:i,multiply:o}=e;return t(Iy,{Matrix:function(f){var m=f.size();if(m.length!==2||m[0]!==m[1])throw new RangeError("Matrix must be square (size: "+it(m)+")");for(var d=m[0],h=1e-15,p=s(f),y=u(p,h),w=y.q,D=y.j,v=o(f,Math.pow(2,-D)),x=a(d),g=a(d),b=1,C=v,N=-1,A=1;A<=w;A++)A>1&&(C=o(C,v),N=-N),b=b*(w-A+1)/((2*w-A+1)*A),x=n(x,o(b,C)),g=n(g,o(b*N,C));for(var E=o(i(g),x),S=0;S<D;S++)E=o(E,E);return Ui(f)?f.createSparseMatrix(E):E}});function s(c){for(var f=c.size()[0],m=0,d=0;d<f;d++){for(var h=0,p=0;p<f;p++)h+=r(c.get([d,p]));m=Math.max(h,m)}return m}function u(c,f){for(var m=30,d=0;d<m;d++)for(var h=0;h<=d;h++){var p=d-h;if(l(c,h,p)<f)return{q:h,j:p}}throw new Error("Could not find acceptable parameters to compute the matrix exponential (try increasing maxSearchSize in expm.js)")}function l(c,f,m){for(var d=1,h=2;h<=f;h++)d*=h;for(var p=d,y=f+1;y<=2*f;y++)p*=y;var w=p*(2*f+1);return 8*Math.pow(c/Math.pow(2,m),2*f)*d*d/(p*w)}}),zy="sqrtm",DZ=["typed","abs","add","multiply","map","sqrt","subtract","inv","size","max","identity"],NZ=I(zy,DZ,e=>{var{typed:t,abs:r,add:n,multiply:a,map:i,sqrt:o,subtract:s,inv:u,size:l,max:c,identity:f}=e,m=1e3,d=1e-6;function h(p){var y,w=0,D=p,v=f(l(p));do{var x=D;if(D=a(.5,n(x,u(v))),v=a(.5,n(v,u(x))),y=c(r(s(D,x))),y>d&&++w>m)throw new Error("computing square root of matrix: iterative method could not converge")}while(y>d);return D}return t(zy,{"Array | Matrix":function(y){var w=Le(y)?y.size():Je(y);switch(w.length){case 1:if(w[0]===1)return i(y,o);throw new RangeError("Matrix must be square (size: "+it(w)+")");case 2:{var D=w[0],v=w[1];if(D===v)return h(y);throw new RangeError("Matrix must be square (size: "+it(w)+")")}default:throw new RangeError("Matrix must be at most two dimensional (size: "+it(w)+")")}}})}),jy="sylvester",AZ=["typed","schur","matrixFromColumns","matrix","multiply","range","concat","transpose","index","subset","add","subtract","identity","lusolve","abs"],CZ=I(jy,AZ,e=>{var{typed:t,schur:r,matrixFromColumns:n,matrix:a,multiply:i,range:o,concat:s,transpose:u,index:l,subset:c,add:f,subtract:m,identity:d,lusolve:h,abs:p,config:y}=e;return t(jy,{"Matrix, Matrix, Matrix":w,"Array, Matrix, Matrix":function(v,x,g){return w(a(v),x,g)},"Array, Array, Matrix":function(v,x,g){return w(a(v),a(x),g)},"Array, Matrix, Array":function(v,x,g){return w(a(v),x,a(g))},"Matrix, Array, Matrix":function(v,x,g){return w(v,a(x),g)},"Matrix, Array, Array":function(v,x,g){return w(v,a(x),a(g))},"Matrix, Matrix, Array":function(v,x,g){return w(v,x,a(g))},"Array, Array, Array":function(v,x,g){return w(a(v),a(x),a(g)).toArray()}});function w(D,v,x){for(var g=v.size()[0],b=D.size()[0],C=r(D),N=C.T,A=C.U,E=r(i(-1,v)),S=E.T,F=E.U,k=i(i(u(A),x),F),$=o(0,b),R=[],M=(ue,se)=>s(ue,se,1),B=(ue,se)=>s(ue,se,0),L=0;L<g;L++)if(L<g-1&&p(c(S,l(L+1,L)))>1e-5){for(var j=B(c(k,l($,[L])),c(k,l($,[L+1]))),Z=0;Z<L;Z++)j=f(j,B(i(R[Z],c(S,l(Z,L))),i(R[Z],c(S,l(Z,L+1)))));var G=i(d(b),i(-1,c(S,l(L,L)))),V=i(d(b),i(-1,c(S,l(L+1,L)))),P=i(d(b),i(-1,c(S,l(L,L+1)))),Q=i(d(b),i(-1,c(S,l(L+1,L+1)))),z=B(M(f(N,G),V),M(P,f(N,Q))),oe=h(z,j);R[L]=oe.subset(l(o(0,b),[0])),R[L+1]=oe.subset(l(o(b,2*b),[0])),L++}else{for(var ne=c(k,l($,[L])),U=0;U<L;U++)ne=f(ne,i(R[U],c(S,l(U,L))));var _=c(S,l(L,L)),J=m(N,i(_,d(b)));R[L]=h(J,ne)}var ae=a(n(...R)),ee=i(A,i(ae,u(F)));return ee}}),qy="schur",EZ=["typed","matrix","identity","multiply","qr","norm","subtract"],SZ=I(qy,EZ,e=>{var{typed:t,matrix:r,identity:n,multiply:a,qr:i,norm:o,subtract:s}=e;return t(qy,{Array:function(c){var f=u(r(c));return{U:f.U.valueOf(),T:f.T.valueOf()}},Matrix:function(c){return u(c)}});function u(l){var c=l.size()[0],f=l,m=n(c),d=0,h;do{h=f;var p=i(f),y=p.Q,w=p.R;if(f=a(w,y),m=a(m,y),d++>100)break}while(o(s(f,h))>1e-4);return{U:m,T:f}}}),Ry="lyap",MZ=["typed","matrix","sylvester","multiply","transpose"],TZ=I(Ry,MZ,e=>{var{typed:t,matrix:r,sylvester:n,multiply:a,transpose:i}=e;return t(Ry,{"Matrix, Matrix":function(s,u){return n(s,i(s),a(-1,u))},"Array, Matrix":function(s,u){return n(r(s),i(r(s)),a(-1,u))},"Matrix, Array":function(s,u){return n(s,i(r(s)),r(a(-1,u)))},"Array, Array":function(s,u){return n(r(s),i(r(s)),r(a(-1,u))).toArray()}})}),FZ="divide",PZ=["typed","matrix","multiply","equalScalar","divideScalar","inv"],kZ=I(FZ,PZ,e=>{var{typed:t,matrix:r,multiply:n,equalScalar:a,divideScalar:i,inv:o}=e,s=Pr({typed:t,equalScalar:a}),u=_n({typed:t});return t("divide",mx({"Array | Matrix, Array | Matrix":function(c,f){return n(c,o(f))},"DenseMatrix, any":function(c,f){return u(c,f,i,!1)},"SparseMatrix, any":function(c,f){return s(c,f,i,!1)},"Array, any":function(c,f){return u(r(c),f,i,!1).valueOf()},"any, Array | Matrix":function(c,f){return n(c,o(f))}},i.signatures))}),Ly="distance",OZ=["typed","addScalar","subtractScalar","divideScalar","multiplyScalar","deepEqual","sqrt","abs"],$Z=I(Ly,OZ,e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:a,divideScalar:i,deepEqual:o,sqrt:s,abs:u}=e;return t(Ly,{"Array, Array, Array":function(g,b,C){if(g.length===2&&b.length===2&&C.length===2){if(!c(g))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!c(b))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!c(C))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(o(b,C))throw new TypeError("LinePoint1 should not be same with LinePoint2");var N=n(C[1],b[1]),A=n(b[0],C[0]),E=n(a(C[0],b[1]),a(b[0],C[1]));return y(g[0],g[1],N,A,E)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object, Object":function(g,b,C){if(Object.keys(g).length===2&&Object.keys(b).length===2&&Object.keys(C).length===2){if(!c(g))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!c(b))throw new TypeError("Values of lineOnePtX and lineOnePtY should be numbers or BigNumbers");if(!c(C))throw new TypeError("Values of lineTwoPtX and lineTwoPtY should be numbers or BigNumbers");if(o(h(b),h(C)))throw new TypeError("LinePoint1 should not be same with LinePoint2");if("pointX"in g&&"pointY"in g&&"lineOnePtX"in b&&"lineOnePtY"in b&&"lineTwoPtX"in C&&"lineTwoPtY"in C){var N=n(C.lineTwoPtY,b.lineOnePtY),A=n(b.lineOnePtX,C.lineTwoPtX),E=n(a(C.lineTwoPtX,b.lineOnePtY),a(b.lineOnePtX,C.lineTwoPtY));return y(g.pointX,g.pointY,N,A,E)}else throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},"Array, Array":function(g,b){if(g.length===2&&b.length===3){if(!c(g))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!f(b))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");return y(g[0],g[1],b[0],b[1],b[2])}else if(g.length===3&&b.length===6){if(!f(g))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!d(b))throw new TypeError("Array with 6 numbers or BigNumbers expected for second argument");return w(g[0],g[1],g[2],b[0],b[1],b[2],b[3],b[4],b[5])}else if(g.length===b.length&&g.length>0){if(!m(g))throw new TypeError("All values of an array should be numbers or BigNumbers");if(!m(b))throw new TypeError("All values of an array should be numbers or BigNumbers");return D(g,b)}else throw new TypeError("Invalid Arguments: Try again")},"Object, Object":function(g,b){if(Object.keys(g).length===2&&Object.keys(b).length===3){if(!c(g))throw new TypeError("Values of pointX and pointY should be numbers or BigNumbers");if(!f(b))throw new TypeError("Values of xCoeffLine, yCoeffLine and constant should be numbers or BigNumbers");if("pointX"in g&&"pointY"in g&&"xCoeffLine"in b&&"yCoeffLine"in b&&"constant"in b)return y(g.pointX,g.pointY,b.xCoeffLine,b.yCoeffLine,b.constant);throw new TypeError("Key names do not match")}else if(Object.keys(g).length===3&&Object.keys(b).length===6){if(!f(g))throw new TypeError("Values of pointX, pointY and pointZ should be numbers or BigNumbers");if(!d(b))throw new TypeError("Values of x0, y0, z0, a, b and c should be numbers or BigNumbers");if("pointX"in g&&"pointY"in g&&"x0"in b&&"y0"in b&&"z0"in b&&"a"in b&&"b"in b&&"c"in b)return w(g.pointX,g.pointY,g.pointZ,b.x0,b.y0,b.z0,b.a,b.b,b.c);throw new TypeError("Key names do not match")}else if(Object.keys(g).length===2&&Object.keys(b).length===2){if(!c(g))throw new TypeError("Values of pointOneX and pointOneY should be numbers or BigNumbers");if(!c(b))throw new TypeError("Values of pointTwoX and pointTwoY should be numbers or BigNumbers");if("pointOneX"in g&&"pointOneY"in g&&"pointTwoX"in b&&"pointTwoY"in b)return D([g.pointOneX,g.pointOneY],[b.pointTwoX,b.pointTwoY]);throw new TypeError("Key names do not match")}else if(Object.keys(g).length===3&&Object.keys(b).length===3){if(!f(g))throw new TypeError("Values of pointOneX, pointOneY and pointOneZ should be numbers or BigNumbers");if(!f(b))throw new TypeError("Values of pointTwoX, pointTwoY and pointTwoZ should be numbers or BigNumbers");if("pointOneX"in g&&"pointOneY"in g&&"pointOneZ"in g&&"pointTwoX"in b&&"pointTwoY"in b&&"pointTwoZ"in b)return D([g.pointOneX,g.pointOneY,g.pointOneZ],[b.pointTwoX,b.pointTwoY,b.pointTwoZ]);throw new TypeError("Key names do not match")}else throw new TypeError("Invalid Arguments: Try again")},Array:function(g){if(!p(g))throw new TypeError("Incorrect array format entered for pairwise distance calculation");return v(g)}});function l(x){return typeof x=="number"||Qe(x)}function c(x){return x.constructor!==Array&&(x=h(x)),l(x[0])&&l(x[1])}function f(x){return x.constructor!==Array&&(x=h(x)),l(x[0])&&l(x[1])&&l(x[2])}function m(x){return Array.isArray(x)||(x=h(x)),x.every(l)}function d(x){return x.constructor!==Array&&(x=h(x)),l(x[0])&&l(x[1])&&l(x[2])&&l(x[3])&&l(x[4])&&l(x[5])}function h(x){for(var g=Object.keys(x),b=[],C=0;C<g.length;C++)b.push(x[g[C]]);return b}function p(x){if(x[0].length===2&&l(x[0][0])&&l(x[0][1])){if(x.some(g=>g.length!==2||!l(g[0])||!l(g[1])))return!1}else if(x[0].length===3&&l(x[0][0])&&l(x[0][1])&&l(x[0][2])){if(x.some(g=>g.length!==3||!l(g[0])||!l(g[1])||!l(g[2])))return!1}else return!1;return!0}function y(x,g,b,C,N){var A=u(r(r(a(b,x),a(C,g)),N)),E=s(r(a(b,b),a(C,C)));return i(A,E)}function w(x,g,b,C,N,A,E,S,F){var k=[n(a(n(N,g),F),a(n(A,b),S)),n(a(n(A,b),E),a(n(C,x),F)),n(a(n(C,x),S),a(n(N,g),E))];k=s(r(r(a(k[0],k[0]),a(k[1],k[1])),a(k[2],k[2])));var $=s(r(r(a(E,E),a(S,S)),a(F,F)));return i(k,$)}function D(x,g){for(var b=x.length,C=0,N=0,A=0;A<b;A++)N=n(x[A],g[A]),C=r(a(N,N),C);return s(C)}function v(x){for(var g=[],b=[],C=[],N=0;N<x.length-1;N++)for(var A=N+1;A<x.length;A++)x[0].length===2?(b=[x[N][0],x[N][1]],C=[x[A][0],x[A][1]]):x[0].length===3&&(b=[x[N][0],x[N][1],x[N][2]],C=[x[A][0],x[A][1],x[A][2]]),g.push(D(b,C));return g}}),BZ="intersect",_Z=["typed","config","abs","add","addScalar","matrix","multiply","multiplyScalar","divideScalar","subtract","smaller","equalScalar","flatten","isZero","isNumeric"],IZ=I(BZ,_Z,e=>{var{typed:t,config:r,abs:n,add:a,addScalar:i,matrix:o,multiply:s,multiplyScalar:u,divideScalar:l,subtract:c,smaller:f,equalScalar:m,flatten:d,isZero:h,isNumeric:p}=e;return t("intersect",{"Array, Array, Array":y,"Array, Array, Array, Array":w,"Matrix, Matrix, Matrix":function(S,F,k){var $=y(S.valueOf(),F.valueOf(),k.valueOf());return $===null?null:o($)},"Matrix, Matrix, Matrix, Matrix":function(S,F,k,$){var R=w(S.valueOf(),F.valueOf(),k.valueOf(),$.valueOf());return R===null?null:o(R)}});function y(E,S,F){if(E=D(E),S=D(S),F=D(F),!x(E))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!x(S))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!g(F))throw new TypeError("Array with 4 numbers expected as third argument");return A(E[0],E[1],E[2],S[0],S[1],S[2],F[0],F[1],F[2],F[3])}function w(E,S,F,k){if(E=D(E),S=D(S),F=D(F),k=D(k),E.length===2){if(!v(E))throw new TypeError("Array with 2 numbers or BigNumbers expected for first argument");if(!v(S))throw new TypeError("Array with 2 numbers or BigNumbers expected for second argument");if(!v(F))throw new TypeError("Array with 2 numbers or BigNumbers expected for third argument");if(!v(k))throw new TypeError("Array with 2 numbers or BigNumbers expected for fourth argument");return b(E,S,F,k)}else if(E.length===3){if(!x(E))throw new TypeError("Array with 3 numbers or BigNumbers expected for first argument");if(!x(S))throw new TypeError("Array with 3 numbers or BigNumbers expected for second argument");if(!x(F))throw new TypeError("Array with 3 numbers or BigNumbers expected for third argument");if(!x(k))throw new TypeError("Array with 3 numbers or BigNumbers expected for fourth argument");return N(E[0],E[1],E[2],S[0],S[1],S[2],F[0],F[1],F[2],k[0],k[1],k[2])}else throw new TypeError("Arrays with two or thee dimensional points expected")}function D(E){return E.length===1?E[0]:E.length>1&&Array.isArray(E[0])&&E.every(S=>Array.isArray(S)&&S.length===1)?d(E):E}function v(E){return E.length===2&&p(E[0])&&p(E[1])}function x(E){return E.length===3&&p(E[0])&&p(E[1])&&p(E[2])}function g(E){return E.length===4&&p(E[0])&&p(E[1])&&p(E[2])&&p(E[3])}function b(E,S,F,k){var $=E,R=F,M=c($,S),B=c(R,k),L=c(u(M[0],B[1]),u(B[0],M[1]));if(h(L)||f(n(L),r.relTol))return null;var j=u(B[0],$[1]),Z=u(B[1],$[0]),G=u(B[0],R[1]),V=u(B[1],R[0]),P=l(i(c(c(j,Z),G),V),L);return a(s(M,P),$)}function C(E,S,F,k,$,R,M,B,L,j,Z,G){var V=u(c(E,S),c(F,k)),P=u(c($,R),c(M,B)),Q=u(c(L,j),c(Z,G));return i(i(V,P),Q)}function N(E,S,F,k,$,R,M,B,L,j,Z,G){var V=C(E,M,j,M,S,B,Z,B,F,L,G,L),P=C(j,M,k,E,Z,B,$,S,G,L,R,F),Q=C(E,M,k,E,S,B,$,S,F,L,R,F),z=C(j,M,j,M,Z,B,Z,B,G,L,G,L),oe=C(k,E,k,E,$,S,$,S,R,F,R,F),ne=c(u(V,P),u(Q,z)),U=c(u(oe,z),u(P,P));if(h(U))return null;var _=l(ne,U),J=l(i(V,u(_,P)),z),ae=i(E,u(_,c(k,E))),ee=i(S,u(_,c($,S))),ue=i(F,u(_,c(R,F))),se=i(M,u(J,c(j,M))),be=i(B,u(J,c(Z,B))),Me=i(L,u(J,c(G,L)));return m(ae,se)&&m(ee,be)&&m(ue,Me)?[ae,ee,ue]:null}function A(E,S,F,k,$,R,M,B,L,j){var Z=u(E,M),G=u(k,M),V=u(S,B),P=u($,B),Q=u(F,L),z=u(R,L),oe=c(c(c(j,Z),V),Q),ne=c(c(c(i(i(G,P),z),Z),V),Q),U=l(oe,ne),_=i(E,u(U,c(k,E))),J=i(S,u(U,c($,S))),ae=i(F,u(U,c(R,F)));return[_,J,ae]}}),Hy="sum",zZ=["typed","config","add","numeric"],aD=I(Hy,zZ,e=>{var{typed:t,config:r,add:n,numeric:a}=e;return t(Hy,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":o,"...":function(u){if(ns(u))throw new TypeError("Scalar values expected in function sum");return i(u)}});function i(s){var u;return gi(s,function(l){try{u=u===void 0?l:n(u,l)}catch(c){throw Zr(c,"sum",l)}}),u===void 0&&(u=a(0,r.number)),typeof u=="string"&&(u=a(u,yi(u,r))),u}function o(s,u){try{var l=Pc(s,u,n);return l}catch(c){throw Zr(c,"sum")}}}),xl="cumsum",jZ=["typed","add","unaryPlus"],iD=I(xl,jZ,e=>{var{typed:t,add:r,unaryPlus:n}=e;return t(xl,{Array:a,Matrix:function(l){return l.create(a(l.valueOf(),l.datatype()))},"Array, number | BigNumber":o,"Matrix, number | BigNumber":function(l,c){return l.create(o(l.valueOf(),c),l.datatype())},"...":function(l){if(ns(l))throw new TypeError("All values expected to be scalar in function cumsum");return a(l)}});function a(u){try{return i(u)}catch(l){throw Zr(l,xl)}}function i(u){if(u.length===0)return[];for(var l=[n(u[0])],c=1;c<u.length;++c)l.push(r(l[c-1],u[c]));return l}function o(u,l){var c=Je(u);if(l<0||l>=c.length)throw new Xn(l,c.length);try{return s(u,l)}catch(f){throw Zr(f,xl)}}function s(u,l){var c,f,m;if(l<=0){var d=u[0][0];if(Array.isArray(d)){for(m=qx(u),f=[],c=0;c<m.length;c++)f[c]=s(m[c],l-1);return f}else return i(u)}else{for(f=[],c=0;c<u.length;c++)f[c]=s(u[c],l-1);return f}}}),Gy="mean",qZ=["typed","add","divide"],oD=I(Gy,qZ,e=>{var{typed:t,add:r,divide:n}=e;return t(Gy,{"Array | Matrix":i,"Array | Matrix, number | BigNumber":a,"...":function(s){if(ns(s))throw new TypeError("Scalar values expected in function mean");return i(s)}});function a(o,s){try{var u=Pc(o,s,r),l=Array.isArray(o)?Je(o):o.size();return n(u,l[s])}catch(c){throw Zr(c,"mean")}}function i(o){var s,u=0;if(gi(o,function(l){try{s=s===void 0?l:r(s,l),u++}catch(c){throw Zr(c,"mean",l)}}),u===0)throw new Error("Cannot calculate the mean of an empty array");return n(s,u)}}),Vy="median",RZ=["typed","add","divide","compare","partitionSelect"],LZ=I(Vy,RZ,e=>{var{typed:t,add:r,divide:n,compare:a,partitionSelect:i}=e;function o(l){try{l=dt(l.valueOf());var c=l.length;if(c===0)throw new Error("Cannot calculate median of an empty array");if(c%2===0){for(var f=c/2-1,m=i(l,f+1),d=l[f],h=0;h<f;++h)a(l[h],d)>0&&(d=l[h]);return u(d,m)}else{var p=i(l,(c-1)/2);return s(p)}}catch(y){throw Zr(y,"median")}}var s=t({"number | BigNumber | Complex | Unit":function(c){return c}}),u=t({"number | BigNumber | Complex | Unit, number | BigNumber | Complex | Unit":function(c,f){return n(r(c,f),2)}});return t(Vy,{"Array | Matrix":o,"Array | Matrix, number | BigNumber":function(c,f){throw new Error("median(A, dim) is not yet supported")},"...":function(c){if(ns(c))throw new TypeError("Scalar values expected in function median");return o(c)}})}),Uy="mad",HZ=["typed","abs","map","median","subtract"],GZ=I(Uy,HZ,e=>{var{typed:t,abs:r,map:n,median:a,subtract:i}=e;return t(Uy,{"Array | Matrix":o,"...":function(u){return o(u)}});function o(s){if(s=dt(s.valueOf()),s.length===0)throw new Error("Cannot calculate median absolute deviation (mad) of an empty array");try{var u=a(s);return a(n(s,function(l){return r(i(l,u))}))}catch(l){throw l instanceof TypeError&&l.message.includes("median")?new TypeError(l.message.replace("median","mad")):Zr(l,"mad")}}}),Vf="unbiased",Wy="variance",VZ=["typed","add","subtract","multiply","divide","mapSlices","isNaN"],sD=I(Wy,VZ,e=>{var{typed:t,add:r,subtract:n,multiply:a,divide:i,mapSlices:o,isNaN:s}=e;return t(Wy,{"Array | Matrix":function(f){return u(f,Vf)},"Array | Matrix, string":u,"Array | Matrix, number | BigNumber":function(f,m){return l(f,m,Vf)},"Array | Matrix, number | BigNumber, string":l,"...":function(f){return u(f,Vf)}});function u(c,f){var m,d=0;if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");if(gi(c,function(y){try{m=m===void 0?y:r(m,y),d++}catch(w){throw Zr(w,"variance",y)}}),d===0)throw new Error("Cannot calculate variance of an empty array");var h=i(m,d);if(m=void 0,gi(c,function(y){var w=n(y,h);m=m===void 0?a(w,w):r(m,a(w,w))}),s(m))return m;switch(f){case"uncorrected":return i(m,d);case"biased":return i(m,d+1);case"unbiased":{var p=Qe(m)?m.mul(0):0;return d===1?p:i(m,d-1)}default:throw new Error('Unknown normalization "'+f+'". Choose "unbiased" (default), "uncorrected", or "biased".')}}function l(c,f,m){try{if(c.length===0)throw new SyntaxError("Function variance requires one or more parameters (0 provided)");return o(c,f,d=>u(d,m))}catch(d){throw Zr(d,"variance")}}}),Jy="quantileSeq",UZ=["typed","?bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger","mapSlices"],uD=I(Jy,UZ,e=>{var{typed:t,bignumber:r,add:n,subtract:a,divide:i,multiply:o,partitionSelect:s,compare:u,isInteger:l,smaller:c,smallerEq:f,larger:m,mapSlices:d}=e;return t(Jy,{"Array | Matrix, number | BigNumber":(D,v)=>p(D,v,!1),"Array | Matrix, number | BigNumber, number":(D,v,x)=>h(D,v,!1,x,p),"Array | Matrix, number | BigNumber, boolean":p,"Array | Matrix, number | BigNumber, boolean, number":(D,v,x,g)=>h(D,v,x,g,p),"Array | Matrix, Array | Matrix":(D,v)=>y(D,v,!1),"Array | Matrix, Array | Matrix, number":(D,v,x)=>h(D,v,!1,x,y),"Array | Matrix, Array | Matrix, boolean":y,"Array | Matrix, Array | Matrix, boolean, number":(D,v,x,g)=>h(D,v,x,g,y)});function h(D,v,x,g,b){return d(D,g,C=>b(C,v,x))}function p(D,v,x){var g,b=D.valueOf();if(c(v,0))throw new Error("N/prob must be non-negative");if(f(v,1))return qe(v)?w(b,v,x):r(w(b,v,x));if(m(v,1)){if(!l(v))throw new Error("N must be a positive integer");if(m(v,4294967295))throw new Error("N must be less than or equal to 2^32-1, as that is the maximum length of an Array");var C=n(v,1);g=[];for(var N=0;c(N,v);N++){var A=i(N+1,C);g.push(w(b,A,x))}return qe(v)?g:r(g)}}function y(D,v,x){for(var g=D.valueOf(),b=v.valueOf(),C=[],N=0;N<b.length;++N)C.push(w(g,b[N],x));return C}function w(D,v,x){var g=dt(D),b=g.length;if(b===0)throw new Error("Cannot calculate quantile of an empty sequence");var C=qe(v)?v*(b-1):v.times(b-1),N=qe(v)?Math.floor(C):C.floor().toNumber(),A=qe(v)?C%1:C.minus(N);if(l(C))return x?g[C]:s(g,qe(v)?C:C.valueOf());var E,S;if(x)E=g[N],S=g[N+1];else{S=s(g,N+1),E=g[N];for(var F=0;F<N;++F)u(g[F],E)>0&&(E=g[F])}return n(o(E,a(1,A)),o(S,A))}}),Ky="std",WZ=["typed","map","sqrt","variance"],lD=I(Ky,WZ,e=>{var{typed:t,map:r,sqrt:n,variance:a}=e;return t(Ky,{"Array | Matrix":i,"Array | Matrix, string":i,"Array | Matrix, number | BigNumber":i,"Array | Matrix, number | BigNumber, string":i,"...":function(s){return i(s)}});function i(o,s){if(o.length===0)throw new SyntaxError("Function std requires one or more parameters (0 provided)");try{var u=a.apply(null,arguments);return vn(u)?r(u,n):n(u)}catch(l){throw l instanceof TypeError&&l.message.includes(" variance")?new TypeError(l.message.replace(" variance"," std")):l}}}),Yy="corr",JZ=["typed","matrix","mean","sqrt","sum","add","subtract","multiply","pow","divide"],KZ=I(Yy,JZ,e=>{var{typed:t,matrix:r,sqrt:n,sum:a,add:i,subtract:o,multiply:s,pow:u,divide:l}=e;return t(Yy,{"Array, Array":function(d,h){return c(d,h)},"Matrix, Matrix":function(d,h){var p=c(d.toArray(),h.toArray());return Array.isArray(p)?r(p):p}});function c(m,d){var h=[];if(Array.isArray(m[0])&&Array.isArray(d[0])){if(m.length!==d.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same length.");for(var p=0;p<m.length;p++){if(m[p].length!==d[p].length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same number of elements.");h.push(f(m[p],d[p]))}return h}else{if(m.length!==d.length)throw new SyntaxError("Dimension mismatch. Array A and B must have the same number of elements.");return f(m,d)}}function f(m,d){var h=m.length,p=a(m),y=a(d),w=m.reduce((b,C,N)=>i(b,s(C,d[N])),0),D=a(m.map(b=>u(b,2))),v=a(d.map(b=>u(b,2))),x=o(s(h,w),s(p,y)),g=n(s(o(s(h,D),u(p,2)),o(s(h,v),u(y,2))));return l(x,g)}}),Zy="bernoulli",YZ=["typed","config","isInteger","number","?BigNumber","?Fraction"],ZZ=I(Zy,YZ,e=>{var{typed:t,config:r,number:n,BigNumber:a,Fraction:i}=e,o=[void 0],s=[void 0],u=[void 0],l=50;return t(Zy,{number:c=>Uf(c,f=>f,o,(f,m)=>f+m,(f,m)=>f*m,(f,m)=>f/m),"bigint | Fraction":c=>Uf(n(c),f=>new i(f),s,(f,m)=>f.add(m),(f,m)=>f.mul(m),(f,m)=>f.div(m)),BigNumber:c=>(r.precision!==l&&(u=[void 0],l=r.precision),Uf(n(c),f=>new a(f),u,(f,m)=>f.add(m),(f,m)=>f.mul(m),(f,m)=>f.div(m)))})});function Uf(e,t,r,n,a,i){if(e<0||!ke(e))throw new RangeError("Bernoulli index must be nonnegative integer");if(e===0)return t(1);if(e===1)return i(t(-1),t(2));if(e%2===1)return t(0);var o=t(1);r.length===1&&r.push([i(o,t(-3)),i(o,t(-2)),i(o,t(6))]);for(var s=e/2,u=t(0),l=t(2);r.length<=s;){for(var c=r.length,f=Math.floor((c+1)/2),m=u,d=1;d<f;++d)m=n(m,a(r[d][0],r[c-d][0]));m=a(m,l),c%2===0&&(m=n(m,a(r[f][0],r[f][0]))),m=i(m,t(-(2*c+1)));var h=i(a(r[c-1][1],t(-c*(2*c-1))),l);r.push([m,h,a(h,m)])}return r[s][2]}var Qy="combinations",QZ=["typed"],XZ=I(Qy,QZ,e=>{var{typed:t}=e;return t(Qy,{"number, number":s2,"BigNumber, BigNumber":function(n,a){var i=n.constructor,o,s,u=n.minus(a),l=new i(1);if(!Xy(n)||!Xy(a))throw new TypeError("Positive integer value expected in function combinations");if(a.gt(n))throw new TypeError("k must be less than n in function combinations");if(o=l,a.lt(u))for(s=l;s.lte(u);s=s.plus(l))o=o.times(a.plus(s)).dividedBy(s);else for(s=l;s.lte(a);s=s.plus(l))o=o.times(u.plus(s)).dividedBy(s);return o}})});function Xy(e){return e.isInteger()&&e.gte(0)}var eb="combinationsWithRep",eQ=["typed"],tQ=I(eb,eQ,e=>{var{typed:t}=e;return t(eb,{"number, number":function(n,a){if(!ke(n)||n<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(!ke(a)||a<0)throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n<1)throw new TypeError("k must be less than or equal to n + k - 1");if(a<n-1){var i=Ba(n,n+a-1);return i/Ba(1,a)}var o=Ba(a+1,n+a-1);return o/Ba(1,n-1)},"BigNumber, BigNumber":function(n,a){var i=n.constructor,o,s,u=new i(1),l=n.minus(u);if(!tb(n)||!tb(a))throw new TypeError("Positive integer value expected in function combinationsWithRep");if(n.lt(u))throw new TypeError("k must be less than or equal to n + k - 1 in function combinationsWithRep");if(o=u,a.lt(l))for(s=u;s.lte(l);s=s.plus(u))o=o.times(a.plus(s)).dividedBy(s);else for(s=u;s.lte(a);s=s.plus(u))o=o.times(l.plus(s)).dividedBy(s);return o}})});function tb(e){return e.isInteger()&&e.gte(0)}var rb="gamma",rQ=["typed","config","multiplyScalar","pow","BigNumber","Complex"],nQ=I(rb,rQ,e=>{var{typed:t,config:r,multiplyScalar:n,pow:a,BigNumber:i,Complex:o}=e;function s(l){if(l.im===0)return ac(l.re);if(l.re<.5){var c=new o(1-l.re,-l.im),f=new o(Math.PI*l.re,Math.PI*l.im);return new o(Math.PI).div(f.sin()).div(s(c))}l=new o(l.re-1,l.im);for(var m=new o(Ho[0],0),d=1;d<Ho.length;++d){var h=new o(Ho[d],0);m=m.add(h.div(l.add(d)))}var p=new o(l.re+l2+.5,l.im),y=Math.sqrt(2*Math.PI),w=p.pow(l.add(.5)),D=p.neg().exp();return m.mul(y).mul(w).mul(D)}return t(rb,{number:ac,Complex:s,BigNumber:function(c){if(c.isInteger())return c.isNegative()||c.isZero()?new i(1/0):u(c.minus(1));if(!c.isFinite())return new i(c.isNegative()?NaN:1/0);throw new Error("Integer BigNumber expected")}});function u(l){if(l<8)return new i([1,1,2,6,24,120,720,5040][l]);var c=r.precision+(Math.log(l.toNumber())|0),f=i.clone({precision:c});if(l%2===1)return l.times(u(new i(l-1)));for(var m=l,d=new f(l),h=l.toNumber();m>2;)m-=2,h+=m,d=d.times(h);return new i(d.toPrecision(i.precision))}}),nb="lgamma",aQ=["Complex","typed"],iQ=I(nb,aQ,e=>{var{Complex:t,typed:r}=e,n=7,a=7,i=[-.029550653594771242,.00641025641025641,-.0019175269175269176,.0008417508417508417,-.0005952380952380953,.0007936507936507937,-.002777777777777778,.08333333333333333];return r(nb,{number:ic,Complex:o,BigNumber:function(){throw new Error("mathjs doesn't yet provide an implementation of the algorithm lgamma for BigNumber")}});function o(l){var c=6.283185307179586,f=1.1447298858494002,m=.1;if(l.isNaN())return new t(NaN,NaN);if(l.im===0)return new t(ic(l.re),0);if(l.re>=n||Math.abs(l.im)>=a)return s(l);if(l.re<=m){var d=P8(c,l.im)*Math.floor(.5*l.re+.25),h=l.mul(Math.PI).sin().log(),p=o(new t(1-l.re,-l.im));return new t(f,d).sub(h).sub(p)}else return l.im>=0?u(l):u(l.conjugate()).conjugate()}function s(l){for(var c=l.sub(.5).mul(l.log()).sub(l).add(c2),f=new t(1,0).div(l),m=f.div(l),d=i[0],h=i[1],p=2*m.re,y=m.re*m.re+m.im*m.im,w=2;w<8;w++){var D=h;h=-y*d+i[w],d=p*d+D}var v=f.mul(m.mul(d).add(h));return c.add(v)}function u(l){var c=0,f=0,m=l;for(l=l.add(1);l.re<=n;){m=m.mul(l);var d=m.im<0?1:0;d!==0&&f===0&&c++,f=d,l=l.add(1)}return s(l).sub(m.log()).sub(new t(0,c*2*Math.PI*1))}}),ab="factorial",oQ=["typed","gamma"],sQ=I(ab,oQ,e=>{var{typed:t,gamma:r}=e;return t(ab,{number:function(a){if(a<0)throw new Error("Value must be non-negative");return r(a+1)},BigNumber:function(a){if(a.isNegative())throw new Error("Value must be non-negative");return r(a.plus(1))},"Array | Matrix":t.referToSelf(n=>a=>Xe(a,n))})}),ib="kldivergence",uQ=["typed","matrix","divide","sum","multiply","map","dotDivide","log","isNumeric"],lQ=I(ib,uQ,e=>{var{typed:t,matrix:r,divide:n,sum:a,multiply:i,map:o,dotDivide:s,log:u,isNumeric:l}=e;return t(ib,{"Array, Array":function(m,d){return c(r(m),r(d))},"Matrix, Array":function(m,d){return c(m,r(d))},"Array, Matrix":function(m,d){return c(r(m),d)},"Matrix, Matrix":function(m,d){return c(m,d)}});function c(f,m){var d=m.size().length,h=f.size().length;if(d>1)throw new Error("first object must be one dimensional");if(h>1)throw new Error("second object must be one dimensional");if(d!==h)throw new Error("Length of two vectors must be equal");var p=a(f);if(p===0)throw new Error("Sum of elements in first object must be non zero");var y=a(m);if(y===0)throw new Error("Sum of elements in second object must be non zero");var w=n(f,a(f)),D=n(m,a(m)),v=a(i(w,o(s(w,D),x=>u(x))));return l(v)?v:Number.NaN}}),ob="multinomial",cQ=["typed","add","divide","multiply","factorial","isInteger","isPositive"],fQ=I(ob,cQ,e=>{var{typed:t,add:r,divide:n,multiply:a,factorial:i,isInteger:o,isPositive:s}=e;return t(ob,{"Array | Matrix":function(l){var c=0,f=1;return gi(l,function(m){if(!o(m)||!s(m))throw new TypeError("Positive integer value expected in function multinomial");c=r(c,m),f=a(f,i(m))}),n(i(c),f)}})}),sb="permutations",mQ=["typed","factorial"],dQ=I(sb,mQ,e=>{var{typed:t,factorial:r}=e;return t(sb,{"number | BigNumber":r,"number, number":function(a,i){if(!ke(a)||a<0)throw new TypeError("Positive integer value expected in function permutations");if(!ke(i)||i<0)throw new TypeError("Positive integer value expected in function permutations");if(i>a)throw new TypeError("second argument k must be less than or equal to first argument n");return Ba(a-i+1,a)},"BigNumber, BigNumber":function(a,i){var o,s;if(!ub(a)||!ub(i))throw new TypeError("Positive integer value expected in function permutations");if(i.gt(a))throw new TypeError("second argument k must be less than or equal to first argument n");var u=a.mul(0).add(1);for(o=u,s=a.minus(i).plus(1);s.lte(a);s=s.plus(1))o=o.times(s);return o}})});function ub(e){return e.isInteger()&&e.gte(0)}var Fl={exports:{}},hQ=Fl.exports,lb;function pQ(){return lb||(lb=1,(function(e){(function(t,r,n){function a(u){var l=this,c=s();l.next=function(){var f=2091639*l.s0+l.c*23283064365386963e-26;return l.s0=l.s1,l.s1=l.s2,l.s2=f-(l.c=f|0)},l.c=1,l.s0=c(" "),l.s1=c(" "),l.s2=c(" "),l.s0-=c(u),l.s0<0&&(l.s0+=1),l.s1-=c(u),l.s1<0&&(l.s1+=1),l.s2-=c(u),l.s2<0&&(l.s2+=1),c=null}function i(u,l){return l.c=u.c,l.s0=u.s0,l.s1=u.s1,l.s2=u.s2,l}function o(u,l){var c=new a(u),f=l&&l.state,m=c.next;return m.int32=function(){return c.next()*4294967296|0},m.double=function(){return m()+(m()*2097152|0)*11102230246251565e-32},m.quick=m,f&&(typeof f=="object"&&i(f,c),m.state=function(){return i(c,{})}),m}function s(){var u=4022871197,l=function(c){c=String(c);for(var f=0;f<c.length;f++){u+=c.charCodeAt(f);var m=.02519603282416938*u;u=m>>>0,m-=u,m*=u,u=m>>>0,m-=u,u+=m*4294967296}return(u>>>0)*23283064365386963e-26};return l}r&&r.exports?r.exports=o:this.alea=o})(hQ,e)})(Fl)),Fl.exports}var Pl={exports:{}},gQ=Pl.exports,cb;function vQ(){return cb||(cb=1,(function(e){(function(t,r,n){function a(s){var u=this,l="";u.x=0,u.y=0,u.z=0,u.w=0,u.next=function(){var f=u.x^u.x<<11;return u.x=u.y,u.y=u.z,u.z=u.w,u.w^=u.w>>>19^f^f>>>8},s===(s|0)?u.x=s:l+=s;for(var c=0;c<l.length+64;c++)u.x^=l.charCodeAt(c)|0,u.next()}function i(s,u){return u.x=s.x,u.y=s.y,u.z=s.z,u.w=s.w,u}function o(s,u){var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var m=l.next()>>>11,d=(l.next()>>>0)/4294967296,h=(m+d)/(1<<21);while(h===0);return h},f.int32=l.next,f.quick=f,c&&(typeof c=="object"&&i(c,l),f.state=function(){return i(l,{})}),f}r&&r.exports?r.exports=o:this.xor128=o})(gQ,e)})(Pl)),Pl.exports}var kl={exports:{}},yQ=kl.exports,fb;function bQ(){return fb||(fb=1,(function(e){(function(t,r,n){function a(s){var u=this,l="";u.next=function(){var f=u.x^u.x>>>2;return u.x=u.y,u.y=u.z,u.z=u.w,u.w=u.v,(u.d=u.d+362437|0)+(u.v=u.v^u.v<<4^(f^f<<1))|0},u.x=0,u.y=0,u.z=0,u.w=0,u.v=0,s===(s|0)?u.x=s:l+=s;for(var c=0;c<l.length+64;c++)u.x^=l.charCodeAt(c)|0,c==l.length&&(u.d=u.x<<10^u.x>>>4),u.next()}function i(s,u){return u.x=s.x,u.y=s.y,u.z=s.z,u.w=s.w,u.v=s.v,u.d=s.d,u}function o(s,u){var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var m=l.next()>>>11,d=(l.next()>>>0)/4294967296,h=(m+d)/(1<<21);while(h===0);return h},f.int32=l.next,f.quick=f,c&&(typeof c=="object"&&i(c,l),f.state=function(){return i(l,{})}),f}r&&r.exports?r.exports=o:this.xorwow=o})(yQ,e)})(kl)),kl.exports}var Ol={exports:{}},wQ=Ol.exports,mb;function xQ(){return mb||(mb=1,(function(e){(function(t,r,n){function a(s){var u=this;u.next=function(){var c=u.x,f=u.i,m,d;return m=c[f],m^=m>>>7,d=m^m<<24,m=c[f+1&7],d^=m^m>>>10,m=c[f+3&7],d^=m^m>>>3,m=c[f+4&7],d^=m^m<<7,m=c[f+7&7],m=m^m<<13,d^=m^m<<9,c[f]=d,u.i=f+1&7,d};function l(c,f){var m,d=[];if(f===(f|0))d[0]=f;else for(f=""+f,m=0;m<f.length;++m)d[m&7]=d[m&7]<<15^f.charCodeAt(m)+d[m+1&7]<<13;for(;d.length<8;)d.push(0);for(m=0;m<8&&d[m]===0;++m);for(m==8?d[7]=-1:d[m],c.x=d,c.i=0,m=256;m>0;--m)c.next()}l(u,s)}function i(s,u){return u.x=s.x.slice(),u.i=s.i,u}function o(s,u){s==null&&(s=+new Date);var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var m=l.next()>>>11,d=(l.next()>>>0)/4294967296,h=(m+d)/(1<<21);while(h===0);return h},f.int32=l.next,f.quick=f,c&&(c.x&&i(c,l),f.state=function(){return i(l,{})}),f}r&&r.exports?r.exports=o:this.xorshift7=o})(wQ,e)})(Ol)),Ol.exports}var $l={exports:{}},DQ=$l.exports,db;function NQ(){return db||(db=1,(function(e){(function(t,r,n){function a(s){var u=this;u.next=function(){var c=u.w,f=u.X,m=u.i,d,h;return u.w=c=c+1640531527|0,h=f[m+34&127],d=f[m=m+1&127],h^=h<<13,d^=d<<17,h^=h>>>15,d^=d>>>12,h=f[m]=h^d,u.i=m,h+(c^c>>>16)|0};function l(c,f){var m,d,h,p,y,w=[],D=128;for(f===(f|0)?(d=f,f=null):(f=f+"\0",d=0,D=Math.max(D,f.length)),h=0,p=-32;p<D;++p)f&&(d^=f.charCodeAt((p+32)%f.length)),p===0&&(y=d),d^=d<<10,d^=d>>>15,d^=d<<4,d^=d>>>13,p>=0&&(y=y+1640531527|0,m=w[p&127]^=d+y,h=m==0?h+1:0);for(h>=128&&(w[(f&&f.length||0)&127]=-1),h=127,p=512;p>0;--p)d=w[h+34&127],m=w[h=h+1&127],d^=d<<13,m^=m<<17,d^=d>>>15,m^=m>>>12,w[h]=d^m;c.w=y,c.X=w,c.i=h}l(u,s)}function i(s,u){return u.i=s.i,u.w=s.w,u.X=s.X.slice(),u}function o(s,u){s==null&&(s=+new Date);var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var m=l.next()>>>11,d=(l.next()>>>0)/4294967296,h=(m+d)/(1<<21);while(h===0);return h},f.int32=l.next,f.quick=f,c&&(c.X&&i(c,l),f.state=function(){return i(l,{})}),f}r&&r.exports?r.exports=o:this.xor4096=o})(DQ,e)})($l)),$l.exports}var Bl={exports:{}},AQ=Bl.exports,hb;function CQ(){return hb||(hb=1,(function(e){(function(t,r,n){function a(s){var u=this,l="";u.next=function(){var f=u.b,m=u.c,d=u.d,h=u.a;return f=f<<25^f>>>7^m,m=m-d|0,d=d<<24^d>>>8^h,h=h-f|0,u.b=f=f<<20^f>>>12^m,u.c=m=m-d|0,u.d=d<<16^m>>>16^h,u.a=h-f|0},u.a=0,u.b=0,u.c=-1640531527,u.d=1367130551,s===Math.floor(s)?(u.a=s/4294967296|0,u.b=s|0):l+=s;for(var c=0;c<l.length+20;c++)u.b^=l.charCodeAt(c)|0,u.next()}function i(s,u){return u.a=s.a,u.b=s.b,u.c=s.c,u.d=s.d,u}function o(s,u){var l=new a(s),c=u&&u.state,f=function(){return(l.next()>>>0)/4294967296};return f.double=function(){do var m=l.next()>>>11,d=(l.next()>>>0)/4294967296,h=(m+d)/(1<<21);while(h===0);return h},f.int32=l.next,f.quick=f,c&&(typeof c=="object"&&i(c,l),f.state=function(){return i(l,{})}),f}r&&r.exports?r.exports=o:this.tychei=o})(AQ,e)})(Bl)),Bl.exports}var _l={exports:{}};const EQ={},SQ=Object.freeze(Object.defineProperty({__proto__:null,default:EQ},Symbol.toStringTag,{value:"Module"})),MQ=Ys.getAugmentedNamespace(SQ);var TQ=_l.exports,pb;function FQ(){return pb||(pb=1,(function(e){(function(t,r,n){var a=256,i=6,o=52,s="random",u=n.pow(a,i),l=n.pow(2,o),c=l*2,f=a-1,m;function d(x,g,b){var C=[];g=g==!0?{entropy:!0}:g||{};var N=w(y(g.entropy?[x,v(r)]:x??D(),3),C),A=new h(C),E=function(){for(var S=A.g(i),F=u,k=0;S<l;)S=(S+k)*a,F*=a,k=A.g(1);for(;S>=c;)S/=2,F/=2,k>>>=1;return(S+k)/F};return E.int32=function(){return A.g(4)|0},E.quick=function(){return A.g(4)/4294967296},E.double=E,w(v(A.S),r),(g.pass||b||function(S,F,k,$){return $&&($.S&&p($,A),S.state=function(){return p(A,{})}),k?(n[s]=S,F):S})(E,N,"global"in g?g.global:this==n,g.state)}function h(x){var g,b=x.length,C=this,N=0,A=C.i=C.j=0,E=C.S=[];for(b||(x=[b++]);N<a;)E[N]=N++;for(N=0;N<a;N++)E[N]=E[A=f&A+x[N%b]+(g=E[N])],E[A]=g;(C.g=function(S){for(var F,k=0,$=C.i,R=C.j,M=C.S;S--;)F=M[$=f&$+1],k=k*a+M[f&(M[$]=M[R=f&R+F])+(M[R]=F)];return C.i=$,C.j=R,k})(a)}function p(x,g){return g.i=x.i,g.j=x.j,g.S=x.S.slice(),g}function y(x,g){var b=[],C=typeof x,N;if(g&&C=="object")for(N in x)try{b.push(y(x[N],g-1))}catch{}return b.length?b:C=="string"?x:x+"\0"}function w(x,g){for(var b=x+"",C,N=0;N<b.length;)g[f&N]=f&(C^=g[f&N]*19)+b.charCodeAt(N++);return v(g)}function D(){try{var x;return m&&(x=m.randomBytes)?x=x(a):(x=new Uint8Array(a),(t.crypto||t.msCrypto).getRandomValues(x)),v(x)}catch{var g=t.navigator,b=g&&g.plugins;return[+new Date,t,b,t.screen,v(r)]}}function v(x){return String.fromCharCode.apply(0,x)}if(w(n.random(),r),e.exports){e.exports=d;try{m=MQ}catch{}}else n["seed"+s]=d})(typeof self<"u"?self:TQ,[],Math)})(_l)),_l.exports}var Wf,gb;function PQ(){if(gb)return Wf;gb=1;var e=pQ(),t=vQ(),r=bQ(),n=xQ(),a=NQ(),i=CQ(),o=FQ();return o.alea=e,o.xor128=t,o.xorwow=r,o.xorshift7=n,o.xor4096=a,o.tychei=i,Wf=o,Wf}var kQ=PQ();const cD=Ys.getDefaultExportFromCjs(kQ);var OQ=cD(Date.now());function Zo(e){var t;function r(a){t=a===null?OQ:cD(String(a))}r(e);function n(){return t()}return n}var vb="pickRandom",$Q=["typed","config","?on"],BQ=I(vb,$Q,e=>{var{typed:t,config:r,on:n}=e,a=Zo(r.randomSeed);return n&&n("config",function(o,s){o.randomSeed!==s.randomSeed&&(a=Zo(o.randomSeed))}),t(vb,{"Array | Matrix":function(s){return i(s,{})},"Array | Matrix, Object":function(s,u){return i(s,u)},"Array | Matrix, number":function(s,u){return i(s,{number:u})},"Array | Matrix, Array | Matrix":function(s,u){return i(s,{weights:u})},"Array | Matrix, Array | Matrix, number":function(s,u,l){return i(s,{number:l,weights:u})},"Array | Matrix, number, Array | Matrix":function(s,u,l){return i(s,{number:u,weights:l})}});function i(o,s){var{number:u,weights:l,elementWise:c=!0}=s,f=typeof u>"u";f&&(u=1);var m=Le(o)?o.create:Le(l)?l.create:null;o=o.valueOf(),l&&(l=l.valueOf()),c===!0&&(o=dt(o),l=dt(l));var d=0;if(typeof l<"u"){if(l.length!==o.length)throw new Error("Weights must have the same length as possibles");for(var h=0,p=l.length;h<p;h++){if(!qe(l[h])||l[h]<0)throw new Error("Weights must be an array of positive numbers");d+=l[h]}}for(var y=o.length,w=[],D;w.length<u;){if(typeof l>"u")D=o[Math.floor(a()*y)];else for(var v=a()*d,x=0,g=o.length;x<g;x++)if(v-=l[x],v<0){D=o[x];break}w.push(D)}return f?w[0]:m?m(w):w}});function jd(e,t){var r=[];if(e=e.slice(0),e.length>1)for(var n=0,a=e.shift();n<a;n++)r.push(jd(e,t));else for(var i=0,o=e.shift();i<o;i++)r.push(t());return r}var yb="random",_Q=["typed","config","?on"],IQ=I(yb,_Q,e=>{var{typed:t,config:r,on:n}=e,a=Zo(r.randomSeed);return n&&n("config",function(s,u){s.randomSeed!==u.randomSeed&&(a=Zo(s.randomSeed))}),t(yb,{"":()=>o(0,1),number:s=>o(0,s),"number, number":(s,u)=>o(s,u),"Array | Matrix":s=>i(s,0,1),"Array | Matrix, number":(s,u)=>i(s,0,u),"Array | Matrix, number, number":(s,u,l)=>i(s,u,l)});function i(s,u,l){var c=jd(s.valueOf(),()=>o(u,l));return Le(s)?s.create(c,"number"):c}function o(s,u){return s+a()*(u-s)}}),bb="randomInt",zQ=["typed","config","log2","?on"],jQ=I(bb,zQ,e=>{var{typed:t,config:r,log2:n,on:a}=e,i=Zo(r.randomSeed);return a&&a("config",function(l,c){l.randomSeed!==c.randomSeed&&(i=Zo(l.randomSeed))}),t(bb,{"":()=>s(0,2),number:l=>s(0,l),"number, number":(l,c)=>s(l,c),bigint:l=>u(0n,l),"bigint, bigint":u,"Array | Matrix":l=>o(l,0,1),"Array | Matrix, number":(l,c)=>o(l,0,c),"Array | Matrix, number, number":(l,c,f)=>o(l,c,f)});function o(l,c,f){var m=jd(l.valueOf(),()=>s(c,f));return Le(l)?l.create(m,"number"):m}function s(l,c){return Math.floor(l+i()*(c-l))}function u(l,c){var f=2n**30n,m=c-l;if(m<=f)return l+BigInt(s(0,Number(m)));for(var d=n(m),h=m;h>=m;){h=0n;for(var p=0;p<d;++p)h=2n*h+(i()<.5?0n:1n)}return l+h}}),wb="stirlingS2",qQ=["typed","addScalar","subtractScalar","multiplyScalar","divideScalar","pow","factorial","combinations","isNegative","isInteger","number","?bignumber","larger"],RQ=I(wb,qQ,e=>{var{typed:t,addScalar:r,subtractScalar:n,multiplyScalar:a,divideScalar:i,pow:o,factorial:s,combinations:u,isNegative:l,isInteger:c,number:f,bignumber:m,larger:d}=e,h=[],p=[];return t(wb,{"number | BigNumber, number | BigNumber":function(w,D){if(!c(w)||l(w)||!c(D)||l(D))throw new TypeError("Non-negative integer value expected in function stirlingS2");if(d(D,w))throw new TypeError("k must be less than or equal to n in function stirlingS2");var v=!(qe(w)&&qe(D)),x=v?p:h,g=v?m:f,b=f(w),C=f(D);if(x[b]&&x[b].length>C)return x[b][C];for(var N=0;N<=b;++N)if(x[N]||(x[N]=[g(N===0?1:0)]),N!==0)for(var A=x[N],E=x[N-1],S=A.length;S<=N&&S<=C;++S)S===N?A[S]=1:A[S]=r(a(g(S),E[S]),E[S-1]);return x[b][C]}})}),xb="bellNumbers",LQ=["typed","addScalar","isNegative","isInteger","stirlingS2"],HQ=I(xb,LQ,e=>{var{typed:t,addScalar:r,isNegative:n,isInteger:a,stirlingS2:i}=e;return t(xb,{"number | BigNumber":function(s){if(!a(s)||n(s))throw new TypeError("Non-negative integer value expected in function bellNumbers");for(var u=0,l=0;l<=s;l++)u=r(u,i(s,l));return u}})}),Db="catalan",GQ=["typed","addScalar","divideScalar","multiplyScalar","combinations","isNegative","isInteger"],VQ=I(Db,GQ,e=>{var{typed:t,addScalar:r,divideScalar:n,multiplyScalar:a,combinations:i,isNegative:o,isInteger:s}=e;return t(Db,{"number | BigNumber":function(l){if(!s(l)||o(l))throw new TypeError("Non-negative integer value expected in function catalan");return n(i(a(l,2),l),r(l,1))}})}),Nb="composition",UQ=["typed","addScalar","combinations","isNegative","isPositive","isInteger","larger"],WQ=I(Nb,UQ,e=>{var{typed:t,addScalar:r,combinations:n,isPositive:a,isNegative:i,isInteger:o,larger:s}=e;return t(Nb,{"number | BigNumber, number | BigNumber":function(l,c){if(!o(l)||!a(l)||!o(c)||!a(c))throw new TypeError("Positive integer value expected in function composition");if(s(c,l))throw new TypeError("k must be less than or equal to n in function composition");return n(r(l,-1),r(c,-1))}})}),Ab="leafCount",JQ=["parse","typed"],KQ=I(Ab,JQ,e=>{var{parse:t,typed:r}=e;function n(a){var i=0;return a.forEach(o=>{i+=n(o)}),i||1}return r(Ab,{Node:function(i){return n(i)}})});function Cb(e){return ft(e)||er(e)&&e.isUnary()&&ft(e.args[0])}function pc(e){return!!(ft(e)||(di(e)||er(e))&&e.args.every(pc)||La(e)&&pc(e.content))}function Eb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function Jf(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Eb(Object(r),!0).forEach(function(n){ur(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var YQ="simplifyUtil",ZQ=["FunctionNode","OperatorNode","SymbolNode"],qd=I(YQ,ZQ,e=>{var{FunctionNode:t,OperatorNode:r,SymbolNode:n}=e,a=!0,i=!1,o="defaultF",s={add:{trivial:a,total:a,commutative:a,associative:a},unaryPlus:{trivial:a,total:a,commutative:a,associative:a},subtract:{trivial:i,total:a,commutative:i,associative:i},multiply:{trivial:a,total:a,commutative:a,associative:a},divide:{trivial:i,total:a,commutative:i,associative:i},paren:{trivial:a,total:a,commutative:a,associative:i},defaultF:{trivial:i,total:a,commutative:i,associative:i}},u={divide:{total:i},log:{total:i}},l={subtract:{total:i},abs:{trivial:a},log:{total:a}};function c(v,x){var g=arguments.length>2&&arguments[2]!==void 0?arguments[2]:s,b=o;if(typeof v=="string"?b=v:er(v)?b=v.fn.toString():di(v)?b=v.name:La(v)&&(b="paren"),Fe(g,b)){var C=g[b];if(Fe(C,x))return C[x];if(Fe(s,b))return s[b][x]}if(Fe(g,o)){var N=g[o];return Fe(N,x)?N[x]:s[o][x]}if(Fe(s,b)){var A=s[b];if(Fe(A,x))return A[x]}return s[o][x]}function f(v){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s;return c(v,"commutative",x)}function m(v){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s;return c(v,"associative",x)}function d(v,x){var g=Jf({},v);for(var b in x)Fe(v,b)?g[b]=Jf(Jf({},x[b]),v[b]):g[b]=x[b];return g}function h(v,x){if(!v.args||v.args.length===0)return v;v.args=p(v,x);for(var g=0;g<v.args.length;g++)h(v.args[g],x)}function p(v,x){var g,b=[],C=function(A){for(var E=0;E<A.args.length;E++){var S=A.args[E];er(S)&&g===S.op?C(S):b.push(S)}};return m(v,x)?(g=v.op,C(v),b):v.args}function y(v,x){if(!(!v.args||v.args.length===0)){for(var g=D(v),b=v.args.length,C=0;C<b;C++)y(v.args[C],x);if(b>2&&m(v,x)){for(var N=v.args.pop();v.args.length>0;)N=g([v.args.pop(),N]);v.args=N.args}}}function w(v,x){if(!(!v.args||v.args.length===0)){for(var g=D(v),b=v.args.length,C=0;C<b;C++)w(v.args[C],x);if(b>2&&m(v,x)){for(var N=v.args.shift();v.args.length>0;)N=g([N,v.args.shift()]);v.args=N.args}}}function D(v){return er(v)?function(x){try{return new r(v.op,v.fn,x,v.implicit)}catch(g){return console.error(g),[]}}:function(x){return new t(new n(v.name),x)}}return{createMakeNodeFunction:D,hasProperty:c,isCommutative:f,isAssociative:m,mergeContext:d,flatten:h,allChildren:p,unflattenr:y,unflattenl:w,defaultContext:s,realContext:u,positiveContext:l}}),QQ="simplify",XQ=["typed","parse","equal","resolve","simplifyConstant","simplifyCore","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode","replacer"],eX=I(QQ,XQ,e=>{var{typed:t,parse:r,equal:n,resolve:a,simplifyConstant:i,simplifyCore:o,AccessorNode:s,ArrayNode:u,ConstantNode:l,FunctionNode:c,IndexNode:f,ObjectNode:m,OperatorNode:d,ParenthesisNode:h,SymbolNode:p,replacer:y}=e,{hasProperty:w,isCommutative:D,isAssociative:v,mergeContext:x,flatten:g,unflattenr:b,unflattenl:C,createMakeNodeFunction:N,defaultContext:A,realContext:E,positiveContext:S}=qd({FunctionNode:c,OperatorNode:d,SymbolNode:p});t.addConversion({from:"Object",to:"Map",convert:Ro});var F=t("simplify",{Node:j,"Node, Map":(U,_)=>j(U,!1,_),"Node, Map, Object":(U,_,J)=>j(U,!1,_,J),"Node, Array":j,"Node, Array, Map":j,"Node, Array, Map, Object":j});t.removeConversion({from:"Object",to:"Map",convert:Ro}),F.defaultContext=A,F.realContext=E,F.positiveContext=S;function k(U){return U.transform(function(_){return La(_)?k(_.content):_})}var $={true:!0,false:!0,e:!0,i:!0,Infinity:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,NaN:!0,phi:!0,pi:!0,SQRT1_2:!0,SQRT2:!0,tau:!0};F.rules=[o,{l:"log(e)",r:"1"},{s:"n-n1 -> n+-n1",assuming:{subtract:{total:!0}}},{s:"n-n -> 0",assuming:{subtract:{total:!1}}},{s:"-(cl*v) -> v * (-cl)",assuming:{multiply:{commutative:!0},subtract:{total:!0}}},{s:"-(cl*v) -> (-cl) * v",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{s:"-(v*cl) -> v * (-cl)",assuming:{multiply:{commutative:!1},subtract:{total:!0}}},{l:"-(n1/n2)",r:"-n1/n2"},{l:"-v",r:"v * (-1)"},{l:"(n1 + n2)*(-1)",r:"n1*(-1) + n2*(-1)",repeat:!0},{l:"n/n1^n2",r:"n*n1^-n2"},{l:"n/n1",r:"n*n1^-1"},{s:"(n1*n2)^n3 -> n1^n3 * n2^n3",assuming:{multiply:{commutative:!0}}},{s:"(n1*n2)^(-1) -> n2^(-1) * n1^(-1)",assuming:{multiply:{commutative:!1}}},{s:"(n ^ n1) ^ n2 -> n ^ (n1 * n2)",assuming:{divide:{total:!0}}},{l:" vd * ( vd * n1 + n2)",r:"vd^2 * n1 + vd * n2"},{s:" vd * (vd^n4 * n1 + n2) -> vd^(1+n4) * n1 + vd * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * ( vd * n1 + n2) -> vd^(n3+1) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{s:"vd^n3 * (vd^n4 * n1 + n2) -> vd^(n3+n4) * n1 + vd^n3 * n2",assuming:{divide:{total:!0}}},{l:"n*n",r:"n^2"},{s:"n * n^n1 -> n^(n1+1)",assuming:{divide:{total:!0}}},{s:"n^n1 * n^n2 -> n^(n1+n2)",assuming:{divide:{total:!0}}},i,{s:"n+n -> 2*n",assuming:{add:{total:!0}}},{l:"n+-n",r:"0"},{l:"vd*n + vd",r:"vd*(n+1)"},{l:"n3*n1 + n3*n2",r:"n3*(n1+n2)"},{l:"n3^(-n4)*n1 + n3 * n2",r:"n3^(-n4)*(n1 + n3^(n4+1) *n2)"},{l:"n3^(-n4)*n1 + n3^n5 * n2",r:"n3^(-n4)*(n1 + n3^(n4+n5)*n2)"},{s:"n*vd + vd -> (n+1)*vd",assuming:{multiply:{commutative:!1}}},{s:"vd + n*vd -> (1+n)*vd",assuming:{multiply:{commutative:!1}}},{s:"n1*n3 + n2*n3 -> (n1+n2)*n3",assuming:{multiply:{commutative:!1}}},{s:"n^n1 * n -> n^(n1+1)",assuming:{divide:{total:!0},multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3 -> (n1 + n2*n3^(n4 + 1))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{s:"n1*n3^(-n4) + n2 * n3^n5 -> (n1 + n2*n3^(n4 + n5))*n3^(-n4)",assuming:{multiply:{commutative:!1}}},{l:"n*cd + cd",r:"(n+1)*cd"},{s:"cd*n + cd -> cd*(n+1)",assuming:{multiply:{commutative:!1}}},{s:"cd + cd*n -> cd*(1+n)",assuming:{multiply:{commutative:!1}}},i,{s:"(-n)*n1 -> -(n*n1)",assuming:{subtract:{total:!0}}},{s:"n1*(-n) -> -(n1*n)",assuming:{subtract:{total:!0},multiply:{commutative:!1}}},{s:"ce+ve -> ve+ce",assuming:{add:{commutative:!0}},imposeContext:{add:{commutative:!1}}},{s:"vd*cd -> cd*vd",assuming:{multiply:{commutative:!0}},imposeContext:{multiply:{commutative:!1}}},{l:"n+-n1",r:"n-n1"},{l:"n+-(n1)",r:"n-(n1)"},{s:"n*(n1^-1) -> n/n1",assuming:{multiply:{commutative:!0}}},{s:"n*n1^-n2 -> n/n1^n2",assuming:{multiply:{commutative:!0}}},{s:"n^-1 -> 1/n",assuming:{multiply:{commutative:!0}}},{l:"n^1",r:"n"},{s:"n*(n1/n2) -> (n*n1)/n2",assuming:{multiply:{associative:!0}}},{s:"n-(n1+n2) -> n-n1-n2",assuming:{addition:{associative:!0,commutative:!0}}},{l:"1*n",r:"n",imposeContext:{multiply:{commutative:!0}}},{s:"n1/(n2/n3) -> (n1*n3)/n2",assuming:{multiply:{associative:!0}}},{l:"n1/(-n2)",r:"-n1/n2"}];function R(U,_){var J={};if(U.s){var ae=U.s.split("->");if(ae.length===2)J.l=ae[0],J.r=ae[1];else throw SyntaxError("Could not parse rule: "+U.s)}else J.l=U.l,J.r=U.r;J.l=k(r(J.l)),J.r=k(r(J.r));for(var ee of["imposeContext","repeat","assuming"])ee in U&&(J[ee]=U[ee]);if(U.evaluate&&(J.evaluate=r(U.evaluate)),v(J.l,_)){var ue=!D(J.l,_),se;ue&&(se=L());var be=N(J.l),Me=L();J.expanded={},J.expanded.l=be([J.l,Me]),g(J.expanded.l,_),b(J.expanded.l,_),J.expanded.r=be([J.r,Me]),ue&&(J.expandedNC1={},J.expandedNC1.l=be([se,J.l]),J.expandedNC1.r=be([se,J.r]),J.expandedNC2={},J.expandedNC2.l=be([se,J.expanded.l]),J.expandedNC2.r=be([se,J.expanded.r]))}return J}function M(U,_){for(var J=[],ae=0;ae<U.length;ae++){var ee=U[ae],ue=void 0,se=typeof ee;switch(se){case"string":ee={s:ee};case"object":ue=R(ee,_);break;case"function":ue=ee;break;default:throw TypeError("Unsupported type of rule: "+se)}J.push(ue)}return J}var B=0;function L(){return new p("_p"+B++)}function j(U,_){var J=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Vs(),ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},ee=ae.consoleDebug;_=M(_||F.rules,ae.context);var ue=a(U,J);ue=k(ue);for(var se={},be=ue.toString({parenthesis:"all"});!se[be];){se[be]=!0,B=0;var Me=be;ee&&console.log("Working on: ",be);for(var Pe=0;Pe<_.length;Pe++){var Ee="";if(typeof _[Pe]=="function"?(ue=_[Pe](ue,ae),ee&&(Ee=_[Pe].name)):(g(ue,ae.context),ue=G(ue,_[Pe],ae.context),ee&&(Ee="".concat(_[Pe].l.toString()," -> ").concat(_[Pe].r.toString()))),ee){var Oe=ue.toString({parenthesis:"all"});Oe!==Me&&(console.log("Applying",Ee,"produced",Oe),Me=Oe)}C(ue,ae.context)}be=ue.toString({parenthesis:"all"})}return ue}function Z(U,_,J){var ae=U;if(U)for(var ee=0;ee<U.length;++ee){var ue=G(U[ee],_,J);ue!==U[ee]&&(ae===U&&(ae=U.slice()),ae[ee]=ue)}return ae}function G(U,_,J){if(_.assuming){for(var ae in _.assuming)for(var ee in _.assuming[ae])if(w(ae,ee,J)!==_.assuming[ae][ee])return U}var ue=x(_.imposeContext,J),se=U;if(se instanceof d||se instanceof c){var be=Z(se.args,_,J);be!==se.args&&(se=se.clone(),se.args=be)}else if(se instanceof h){if(se.content){var Me=G(se.content,_,J);Me!==se.content&&(se=new h(Me))}}else if(se instanceof u){var Pe=Z(se.items,_,J);Pe!==se.items&&(se=new u(Pe))}else if(se instanceof s){var Ee=se.object;se.object&&(Ee=G(se.object,_,J));var Oe=se.index;se.index&&(Oe=G(se.index,_,J)),(Ee!==se.object||Oe!==se.index)&&(se=new s(Ee,Oe))}else if(se instanceof f){var je=Z(se.dimensions,_,J);je!==se.dimensions&&(se=new f(je))}else if(se instanceof m){var H=!1,X={};for(var O in se.properties)X[O]=G(se.properties[O],_,J),X[O]!==se.properties[O]&&(H=!0);H&&(se=new m(X))}var q=_.r,K=oe(_.l,se,ue)[0];if(!K&&_.expanded&&(q=_.expanded.r,K=oe(_.expanded.l,se,ue)[0]),!K&&_.expandedNC1&&(q=_.expandedNC1.r,K=oe(_.expandedNC1.l,se,ue)[0],K||(q=_.expandedNC2.r,K=oe(_.expandedNC2.l,se,ue)[0])),K){var te=se.implicit;se=q.clone(),te&&"implicit"in q&&(se.implicit=!0),se=se.transform(function(ie){return ie.isSymbolNode&&Fe(K.placeholders,ie.name)?K.placeholders[ie.name].clone():ie})}return _.repeat&&se!==U&&(se=G(se,_,J)),se}function V(U,_){var J=[],ae,ee,ue=N(U);if(D(U,_))for(var se=0;se<U.args.length;se++)ee=U.args.slice(0),ee.splice(se,1),ae=ee.length===1?ee[0]:ue(ee),J.push(ue([U.args[se],ae]));else for(var be=1;be<U.args.length;be++){var Me=U.args[0];be>1&&(Me=ue(U.args.slice(0,be))),ee=U.args.slice(be),ae=ee.length===1?ee[0]:ue(ee),J.push(ue([Me,ae]))}return J}function P(U,_){var J={placeholders:{}};if(!U.placeholders&&!_.placeholders)return J;if(U.placeholders){if(!_.placeholders)return U}else return _;for(var ae in U.placeholders)if(Fe(U.placeholders,ae)&&(J.placeholders[ae]=U.placeholders[ae],Fe(_.placeholders,ae)&&!ne(U.placeholders[ae],_.placeholders[ae])))return null;for(var ee in _.placeholders)Fe(_.placeholders,ee)&&(J.placeholders[ee]=_.placeholders[ee]);return J}function Q(U,_){var J=[];if(U.length===0||_.length===0)return J;for(var ae,ee=0;ee<U.length;ee++)for(var ue=0;ue<_.length;ue++)ae=P(U[ee],_[ue]),ae&&J.push(ae);return J}function z(U){if(U.length===0)return U;for(var _=U.reduce(Q),J=[],ae={},ee=0;ee<_.length;ee++){var ue=JSON.stringify(_[ee],y);ae[ue]||(ae[ue]=!0,J.push(_[ee]))}return J}function oe(U,_,J,ae){var ee=[{placeholders:{}}];if(U instanceof d&&_ instanceof d||U instanceof c&&_ instanceof c){if(U instanceof d){if(U.op!==_.op||U.fn!==_.fn)return[]}else if(U instanceof c&&U.name!==_.name)return[];if(_.args.length===1&&U.args.length===1||!v(_,J)&&_.args.length===U.args.length||ae){for(var ue=[],se=0;se<U.args.length;se++){var be=oe(U.args[se],_.args[se],J);if(be.length===0)break;ue.push(be)}if(ue.length!==U.args.length){if(!D(_,J)||U.args.length===1)return[];if(U.args.length>2)throw new Error("permuting >2 commutative non-associative rule arguments not yet implemented");var Me=oe(U.args[0],_.args[1],J);if(Me.length===0)return[];var Pe=oe(U.args[1],_.args[0],J);if(Pe.length===0)return[];ue=[Me,Pe]}ee=z(ue)}else if(_.args.length>=2&&U.args.length===2){for(var Ee=V(_,J),Oe=[],je=0;je<Ee.length;je++){var H=oe(U,Ee[je],J,!0);Oe=Oe.concat(H)}return Oe}else{if(U.args.length>2)throw Error("Unexpected non-binary associative function: "+U.toString());return[]}}else if(U instanceof p){if(U.name.length===0)throw new Error("Symbol in rule has 0 length...!?");if($[U.name]){if(U.name!==_.name)return[]}else switch(U.name[1]>="a"&&U.name[1]<="z"?U.name.substring(0,2):U.name[0]){case"n":case"_p":ee[0].placeholders[U.name]=_;break;case"c":case"cl":if(ft(_))ee[0].placeholders[U.name]=_;else return[];break;case"v":if(!ft(_))ee[0].placeholders[U.name]=_;else return[];break;case"vl":if(Dr(_))ee[0].placeholders[U.name]=_;else return[];break;case"cd":if(Cb(_))ee[0].placeholders[U.name]=_;else return[];break;case"vd":if(!Cb(_))ee[0].placeholders[U.name]=_;else return[];break;case"ce":if(pc(_))ee[0].placeholders[U.name]=_;else return[];break;case"ve":if(!pc(_))ee[0].placeholders[U.name]=_;else return[];break;default:throw new Error("Invalid symbol in rule: "+U.name)}}else if(U instanceof l){if(!n(U.value,_.value))return[]}else return[];return ee}function ne(U,_){if(U instanceof l&&_ instanceof l){if(!n(U.value,_.value))return!1}else if(U instanceof p&&_ instanceof p){if(U.name!==_.name)return!1}else if(U instanceof d&&_ instanceof d||U instanceof c&&_ instanceof c){if(U instanceof d){if(U.op!==_.op||U.fn!==_.fn)return!1}else if(U instanceof c&&U.name!==_.name)return!1;if(U.args.length!==_.args.length)return!1;for(var J=0;J<U.args.length;J++)if(!ne(U.args[J],_.args[J]))return!1}else return!1;return!0}return F}),tX="simplifyConstant",rX=["typed","config","mathWithTransform","matrix","isBounded","?fraction","?bignumber","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode"],nX=I(tX,rX,e=>{var{typed:t,config:r,mathWithTransform:n,matrix:a,isBounded:i,fraction:o,bignumber:s,AccessorNode:u,ArrayNode:l,ConstantNode:c,FunctionNode:f,IndexNode:m,ObjectNode:d,OperatorNode:h,SymbolNode:p}=e,{isCommutative:y,isAssociative:w,allChildren:D,createMakeNodeFunction:v}=qd({FunctionNode:f,OperatorNode:h,SymbolNode:p}),x=t("simplifyConstant",{Node:M=>N(R(M,{})),"Node, Object":function(B,L){return N(R(B,L))}});function g(M){return au(M)?M.valueOf():M instanceof Array?M.map(g):Le(M)?a(g(M.valueOf())):M}function b(M,B,L){try{return n[M].apply(null,B)}catch{return B=B.map(g),E(n[M].apply(null,B),L)}}var C=t({Fraction:F,number:function(B){return B<0?S(new c(-B)):new c(B)},BigNumber:function(B){return B<0?S(new c(-B)):new c(B)},bigint:function(B){return B<0n?S(new c(-B)):new c(B)},Complex:function(B){throw new Error("Cannot convert Complex number to Node")},string:function(B){return new c(B)},Matrix:function(B){return new l(B.valueOf().map(L=>C(L)))}});function N(M){return Et(M)?M:C(M)}function A(M,B){var L=B&&B.exactFractions!==!1;if(L&&i(M)&&o){var j=o(M),Z=B&&typeof B.fractionsLimit=="number"?B.fractionsLimit:1/0;if(j.valueOf()===M&&j.n<Z&&j.d<Z)return j}return M}var E=t({"string, Object":function(B,L){var j=yi(B,r);if(j==="BigNumber")return s===void 0&&Bd(),s(B);if(j==="bigint")return BigInt(B);if(j==="Fraction")return o===void 0&&G2(),o(B);var Z=parseFloat(B);return A(Z,L)},"Fraction, Object":function(B,L){return B},"BigNumber, Object":function(B,L){return B},"number, Object":function(B,L){return A(B,L)},"bigint, Object":function(B,L){return B},"Complex, Object":function(B,L){return B.im!==0?B:A(B.re,L)},"Matrix, Object":function(B,L){return a(A(B.valueOf()))},"Array, Object":function(B,L){return B.map(A)}});function S(M){return new h("-","unaryMinus",[M])}function F(M){var B=Z=>r.number==="BigNumber"&&s?s(Z):Number(Z),L=M.s*M.n,j=L<0n?new h("-","unaryMinus",[new c(-B(L))]):new c(B(L));return M.d===1n?j:new h("/","divide",[j,new c(B(M.d))])}function k(M,B,L){if(!rs(B))return new u(N(M),N(B));if(Fn(M)||Le(M)){for(var j=Array.from(B.dimensions);j.length>0;)if(ft(j[0])&&typeof j[0].value!="string"){var Z=E(j.shift().value,L);Fn(M)?M=M.items[Z-1]:(M=M.valueOf()[Z-1],M instanceof Array&&(M=a(M)))}else if(j.length>1&&ft(j[1])&&typeof j[1].value!="string"){var G=E(j[1].value,L),V=[],P=Fn(M)?M.items:M.valueOf();for(var Q of P)if(Fn(Q))V.push(Q.items[G-1]);else if(Le(M))V.push(Q[G-1]);else break;if(V.length===P.length)Fn(M)?M=new l(V):M=a(V),j.splice(1,1);else break}else break;return j.length===B.dimensions.length?new u(N(M),B):j.length>0?(B=new m(j),new u(N(M),B)):M}if(Cc(M)&&B.dimensions.length===1&&ft(B.dimensions[0])){var z=B.dimensions[0].value;return z in M.properties?M.properties[z]:new c}return new u(N(M),B)}function $(M,B,L,j){var Z=B.shift(),G=B.reduce((V,P)=>{if(!Et(P)){var Q=V.pop();if(Et(Q))return[Q,P];try{return V.push(b(M,[Q,P],j)),V}catch{V.push(Q)}}V.push(N(V.pop()));var z=V.length===1?V[0]:L(V);return[L([z,N(P)])]},[Z]);return G.length===1?G[0]:L([G[0],C(G[1])])}function R(M,B){switch(M.type){case"SymbolNode":return M;case"ConstantNode":switch(typeof M.value){case"number":return E(M.value,B);case"bigint":return E(M.value,B);case"string":return M.value;default:if(!isNaN(M.value))return E(M.value,B)}return M;case"FunctionNode":if(n[M.name]&&n[M.name].rawArgs)return M;{var L=["add","multiply"];if(!L.includes(M.name)){var j=M.args.map(ee=>R(ee,B));if(!j.some(Et))try{return b(M.name,j,B)}catch{}if(M.name==="size"&&j.length===1&&Fn(j[0])){for(var Z=[],G=j[0];Fn(G);)Z.push(G.items.length),G=G.items[0];return a(Z)}return new f(M.name,j.map(N))}}case"OperatorNode":{var V=M.fn.toString(),P,Q,z=v(M);if(er(M)&&M.isUnary())P=[R(M.args[0],B)],Et(P[0])?Q=z(P):Q=b(V,P,B);else if(w(M,B.context))if(P=D(M,B.context),P=P.map(ee=>R(ee,B)),y(V,B.context)){for(var oe=[],ne=[],U=0;U<P.length;U++)Et(P[U])?ne.push(P[U]):oe.push(P[U]);oe.length>1?(Q=$(V,oe,z,B),ne.unshift(Q),Q=$(V,ne,z,B)):Q=$(V,P,z,B)}else Q=$(V,P,z,B);else P=M.args.map(ee=>R(ee,B)),Q=$(V,P,z,B);return Q}case"ParenthesisNode":return R(M.content,B);case"AccessorNode":return k(R(M.object,B),R(M.index,B),B);case"ArrayNode":{var _=M.items.map(ee=>R(ee,B));return _.some(Et)?new l(_.map(N)):a(_)}case"IndexNode":return new m(M.dimensions.map(ee=>x(ee,B)));case"ObjectNode":{var J={};for(var ae in M.properties)J[ae]=x(M.properties[ae],B);return new d(J)}case"AssignmentNode":case"BlockNode":case"FunctionAssignmentNode":case"RangeNode":case"ConditionalNode":default:throw new Error("Unimplemented node type in simplifyConstant: ".concat(M.type))}}return x}),Sb="simplifyCore",aX=["typed","parse","equal","isZero","add","subtract","multiply","divide","pow","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","ParenthesisNode","SymbolNode"],iX=I(Sb,aX,e=>{var{typed:t,parse:r,equal:n,isZero:a,add:i,subtract:o,multiply:s,divide:u,pow:l,AccessorNode:c,ArrayNode:f,ConstantNode:m,FunctionNode:d,IndexNode:h,ObjectNode:p,OperatorNode:y,ParenthesisNode:w,SymbolNode:D}=e,v=new m(0),x=new m(1),g=new m(!0),b=new m(!1);function C(S){return er(S)&&["and","not","or"].includes(S.op)}var{hasProperty:N,isCommutative:A}=qd({FunctionNode:d,OperatorNode:y,SymbolNode:D});function E(S){var F=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},k=F?F.context:void 0;if(N(S,"trivial",k)){if(di(S)&&S.args.length===1)return E(S.args[0],F);var $=!1,R=0;if(S.forEach(oe=>{++R,R===1&&($=E(oe,F))}),R===1)return $}var M=S;if(di(M)){var B=KG(M.name);if(B){if(M.args.length>2&&N(M,"associative",k))for(;M.args.length>2;){var L=M.args.pop(),j=M.args.pop();M.args.push(new y(B,M.name,[L,j]))}M=new y(B,M.name,M.args)}else return new d(E(M.fn),M.args.map(oe=>E(oe,F)))}if(er(M)&&M.isUnary()){var Z=E(M.args[0],F);if(M.op==="~"&&er(Z)&&Z.isUnary()&&Z.op==="~"||M.op==="not"&&er(Z)&&Z.isUnary()&&Z.op==="not"&&C(Z.args[0]))return Z.args[0];var G=!0;if(M.op==="-"&&er(Z)&&(Z.isBinary()&&Z.fn==="subtract"&&(M=new y("-","subtract",[Z.args[1],Z.args[0]]),G=!1),Z.isUnary()&&Z.op==="-"))return Z.args[0];if(G)return new y(M.op,M.fn,[Z])}if(er(M)&&M.isBinary()){var V=E(M.args[0],F),P=E(M.args[1],F);if(M.op==="+"){if(ft(V)&&a(V.value))return P;if(ft(P)&&a(P.value))return V;er(P)&&P.isUnary()&&P.op==="-"&&(P=P.args[0],M=new y("-","subtract",[V,P]))}if(M.op==="-")return er(P)&&P.isUnary()&&P.op==="-"?E(new y("+","add",[V,P.args[0]]),F):ft(V)&&a(V.value)?E(new y("-","unaryMinus",[P])):ft(P)&&a(P.value)?V:new y(M.op,M.fn,[V,P]);if(M.op==="*"){if(ft(V)){if(a(V.value))return v;if(n(V.value,1))return P}if(ft(P)){if(a(P.value))return v;if(n(P.value,1))return V;if(A(M,k))return new y(M.op,M.fn,[P,V],M.implicit)}return new y(M.op,M.fn,[V,P],M.implicit)}if(M.op==="/")return ft(V)&&a(V.value)?v:ft(P)&&n(P.value,1)?V:new y(M.op,M.fn,[V,P]);if(M.op==="^"&&ft(P)){if(a(P.value))return x;if(n(P.value,1))return V}if(M.op==="and"){if(ft(V))if(V.value){if(C(P))return P;if(ft(P))return P.value?g:b}else return b;if(ft(P))if(P.value){if(C(V))return V}else return b}if(M.op==="or"){if(ft(V)){if(V.value)return g;if(C(P))return P}if(ft(P)){if(P.value)return g;if(C(V))return V}}return new y(M.op,M.fn,[V,P])}if(er(M))return new y(M.op,M.fn,M.args.map(oe=>E(oe,F)));if(Fn(M))return new f(M.items.map(oe=>E(oe,F)));if(Ra(M))return new c(E(M.object,F),E(M.index,F));if(rs(M))return new h(M.dimensions.map(oe=>E(oe,F)));if(Cc(M)){var Q={};for(var z in M.properties)Q[z]=E(M.properties[z],F);return new p(Q)}return M}return t(Sb,{Node:E,"Node,Object":E})}),oX="resolve",sX=["typed","parse","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode"],uX=I(oX,sX,e=>{var{typed:t,parse:r,ConstantNode:n,FunctionNode:a,OperatorNode:i,ParenthesisNode:o}=e;function s(u,l){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Set;if(!l)return u;if(Dr(u)){if(c.has(u.name)){var f=Array.from(c).join(", ");throw new ReferenceError("recursive loop of variable definitions among {".concat(f,"}"))}var m=l.get(u.name);if(Et(m)){var d=new Set(c);return d.add(u.name),s(m,l,d)}else return typeof m=="number"?r(String(m)):m!==void 0?new n(m):u}else if(er(u)){var h=u.args.map(function(y){return s(y,l,c)});return new i(u.op,u.fn,h,u.implicit)}else{if(La(u))return new o(s(u.content,l,c));if(di(u)){var p=u.args.map(function(y){return s(y,l,c)});return new a(u.name,p)}}return u.map(y=>s(y,l,c))}return t("resolve",{Node:s,"Node, Map | null | undefined":s,"Node, Object":(u,l)=>s(u,Ro(l)),"Array | Matrix":t.referToSelf(u=>l=>l.map(c=>u(c))),"Array | Matrix, null | undefined":t.referToSelf(u=>l=>l.map(c=>u(c))),"Array, Object":t.referTo("Array,Map",u=>(l,c)=>u(l,Ro(c))),"Matrix, Object":t.referTo("Matrix,Map",u=>(l,c)=>u(l,Ro(c))),"Array | Matrix, Map":t.referToSelf(u=>(l,c)=>l.map(f=>u(f,c)))})}),Mb="symbolicEqual",lX=["parse","simplify","typed","OperatorNode"],cX=I(Mb,lX,e=>{var{parse:t,simplify:r,typed:n,OperatorNode:a}=e;function i(o,s){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=new a("-","subtract",[o,s]),c=r(l,{},u);return ft(c)&&!c.value}return n(Mb,{"Node, Node":i,"Node, Node, Object":i})}),Tb="derivative",fX=["typed","config","parse","simplify","equal","isZero","numeric","ConstantNode","FunctionNode","OperatorNode","ParenthesisNode","SymbolNode"],mX=I(Tb,fX,e=>{var{typed:t,config:r,parse:n,simplify:a,equal:i,isZero:o,numeric:s,ConstantNode:u,FunctionNode:l,OperatorNode:c,ParenthesisNode:f,SymbolNode:m}=e;function d(x,g){var b=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{simplify:!0},C=new Map,N=g.name;function A(S){var F=C.get(S);if(F!==void 0)return F;var k=w(A,S,N);return C.set(S,k),k}var E=D(x,A);return b.simplify?a(E):E}function h(x){var g=n(x);if(!g.isSymbolNode)throw new TypeError("Invalid variable. "+"Cannot parse ".concat(JSON.stringify(x)," into a variable in function derivative"));return g}var p=t(Tb,{"Node, SymbolNode":d,"Node, SymbolNode, Object":d,"Node, string":(x,g)=>d(x,h(g)),"Node, string, Object":(x,g,b)=>d(x,h(g),b)});p._simplify=!0,p.toTex=function(x){return y.apply(null,x.args)};var y=t("_derivTex",{"Node, SymbolNode":function(g,b){return ft(g)&&Pt(g.value)==="string"?y(n(g.value).toString(),b.toString(),1):y(g.toTex(),b.toString(),1)},"Node, ConstantNode":function(g,b){if(Pt(b.value)==="string")return y(g,n(b.value));throw new Error("The second parameter to 'derivative' is a non-string constant")},"Node, SymbolNode, ConstantNode":function(g,b,C){return y(g.toString(),b.name,C.value)},"string, string, number":function(g,b,C){var N;return C===1?N="{d\\over d"+b+"}":N="{d^{"+C+"}\\over d"+b+"^{"+C+"}}",N+"\\left[".concat(g,"\\right]")}}),w=t("_isConst",{"function, ConstantNode, string":function(){return!0},"function, SymbolNode, string":function(g,b,C){return b.name!==C},"function, ParenthesisNode, string":function(g,b,C){return g(b.content,C)},"function, FunctionAssignmentNode, string":function(g,b,C){return b.params.includes(C)?g(b.expr,C):!0},"function, FunctionNode | OperatorNode, string":function(g,b,C){return b.args.every(N=>g(N,C))}}),D=t("_derivative",{"ConstantNode, function":function(){return v(0)},"SymbolNode, function":function(g,b){return b(g)?v(0):v(1)},"ParenthesisNode, function":function(g,b){return new f(D(g.content,b))},"FunctionAssignmentNode, function":function(g,b){return b(g)?v(0):D(g.expr,b)},"FunctionNode, function":function(g,b){if(b(g))return v(0);var C=g.args[0],N,A=!1,E=!1,S;switch(g.name){case"cbrt":A=!0,S=new c("*","multiply",[v(3),new c("^","pow",[C,new c("/","divide",[v(2),v(3)])])]);break;case"sqrt":case"nthRoot":if(g.args.length===1)A=!0,S=new c("*","multiply",[v(2),new l("sqrt",[C])]);else if(g.args.length===2)return N=new c("/","divide",[v(1),g.args[1]]),D(new c("^","pow",[C,N]),b);break;case"log10":N=v(10);case"log":if(!N&&g.args.length===1)S=C.clone(),A=!0;else if(g.args.length===1&&N||g.args.length===2&&b(g.args[1]))S=new c("*","multiply",[C.clone(),new l("log",[N||g.args[1]])]),A=!0;else if(g.args.length===2)return D(new c("/","divide",[new l("log",[C]),new l("log",[g.args[1]])]),b);break;case"pow":if(g.args.length===2)return D(new c("^","pow",[C,g.args[1]]),b);break;case"exp":S=new l("exp",[C.clone()]);break;case"sin":S=new l("cos",[C.clone()]);break;case"cos":S=new c("-","unaryMinus",[new l("sin",[C.clone()])]);break;case"tan":S=new c("^","pow",[new l("sec",[C.clone()]),v(2)]);break;case"sec":S=new c("*","multiply",[g,new l("tan",[C.clone()])]);break;case"csc":E=!0,S=new c("*","multiply",[g,new l("cot",[C.clone()])]);break;case"cot":E=!0,S=new c("^","pow",[new l("csc",[C.clone()]),v(2)]);break;case"asin":A=!0,S=new l("sqrt",[new c("-","subtract",[v(1),new c("^","pow",[C.clone(),v(2)])])]);break;case"acos":A=!0,E=!0,S=new l("sqrt",[new c("-","subtract",[v(1),new c("^","pow",[C.clone(),v(2)])])]);break;case"atan":A=!0,S=new c("+","add",[new c("^","pow",[C.clone(),v(2)]),v(1)]);break;case"asec":A=!0,S=new c("*","multiply",[new l("abs",[C.clone()]),new l("sqrt",[new c("-","subtract",[new c("^","pow",[C.clone(),v(2)]),v(1)])])]);break;case"acsc":A=!0,E=!0,S=new c("*","multiply",[new l("abs",[C.clone()]),new l("sqrt",[new c("-","subtract",[new c("^","pow",[C.clone(),v(2)]),v(1)])])]);break;case"acot":A=!0,E=!0,S=new c("+","add",[new c("^","pow",[C.clone(),v(2)]),v(1)]);break;case"sinh":S=new l("cosh",[C.clone()]);break;case"cosh":S=new l("sinh",[C.clone()]);break;case"tanh":S=new c("^","pow",[new l("sech",[C.clone()]),v(2)]);break;case"sech":E=!0,S=new c("*","multiply",[g,new l("tanh",[C.clone()])]);break;case"csch":E=!0,S=new c("*","multiply",[g,new l("coth",[C.clone()])]);break;case"coth":E=!0,S=new c("^","pow",[new l("csch",[C.clone()]),v(2)]);break;case"asinh":A=!0,S=new l("sqrt",[new c("+","add",[new c("^","pow",[C.clone(),v(2)]),v(1)])]);break;case"acosh":A=!0,S=new l("sqrt",[new c("-","subtract",[new c("^","pow",[C.clone(),v(2)]),v(1)])]);break;case"atanh":A=!0,S=new c("-","subtract",[v(1),new c("^","pow",[C.clone(),v(2)])]);break;case"asech":A=!0,E=!0,S=new c("*","multiply",[C.clone(),new l("sqrt",[new c("-","subtract",[v(1),new c("^","pow",[C.clone(),v(2)])])])]);break;case"acsch":A=!0,E=!0,S=new c("*","multiply",[new l("abs",[C.clone()]),new l("sqrt",[new c("+","add",[new c("^","pow",[C.clone(),v(2)]),v(1)])])]);break;case"acoth":A=!0,E=!0,S=new c("-","subtract",[v(1),new c("^","pow",[C.clone(),v(2)])]);break;case"abs":S=new c("/","divide",[new l(new m("abs"),[C.clone()]),C.clone()]);break;case"gamma":default:throw new Error('Cannot process function "'+g.name+'" in derivative: the function is not supported, undefined, or the number of arguments passed to it are not supported')}var F,k;A?(F="/",k="divide"):(F="*",k="multiply");var $=D(C,b);return E&&($=new c("-","unaryMinus",[$])),new c(F,k,[$,S])},"OperatorNode, function":function(g,b){if(b(g))return v(0);if(g.op==="+")return new c(g.op,g.fn,g.args.map(function(M){return D(M,b)}));if(g.op==="-"){if(g.isUnary())return new c(g.op,g.fn,[D(g.args[0],b)]);if(g.isBinary())return new c(g.op,g.fn,[D(g.args[0],b),D(g.args[1],b)])}if(g.op==="*"){var C=g.args.filter(function(M){return b(M)});if(C.length>0){var N=g.args.filter(function(M){return!b(M)}),A=N.length===1?N[0]:new c("*","multiply",N),E=C.concat(D(A,b));return new c("*","multiply",E)}return new c("+","add",g.args.map(function(M){return new c("*","multiply",g.args.map(function(B){return B===M?D(B,b):B.clone()}))}))}if(g.op==="/"&&g.isBinary()){var S=g.args[0],F=g.args[1];return b(F)?new c("/","divide",[D(S,b),F]):b(S)?new c("*","multiply",[new c("-","unaryMinus",[S]),new c("/","divide",[D(F,b),new c("^","pow",[F.clone(),v(2)])])]):new c("/","divide",[new c("-","subtract",[new c("*","multiply",[D(S,b),F.clone()]),new c("*","multiply",[S.clone(),D(F,b)])]),new c("^","pow",[F.clone(),v(2)])])}if(g.op==="^"&&g.isBinary()){var k=g.args[0],$=g.args[1];if(b(k))return ft(k)&&(o(k.value)||i(k.value,1))?v(0):new c("*","multiply",[g,new c("*","multiply",[new l("log",[k.clone()]),D($.clone(),b)])]);if(b($)){if(ft($)){if(o($.value))return v(0);if(i($.value,1))return D(k,b)}var R=new c("^","pow",[k.clone(),new c("-","subtract",[$,v(1)])]);return new c("*","multiply",[$.clone(),new c("*","multiply",[D(k,b),R])])}return new c("*","multiply",[new c("^","pow",[k.clone(),$.clone()]),new c("+","add",[new c("*","multiply",[D(k,b),new c("/","divide",[$.clone(),k.clone()])]),new c("*","multiply",[D($,b),new l("log",[k.clone()])])])])}throw new Error('Cannot process operator "'+g.op+'" in derivative: the operator is not supported, undefined, or the number of arguments passed to it are not supported')}});function v(x,g){return new u(s(x,yi(String(x),r)))}return p}),Fb="rationalize",dX=["config","typed","equal","isZero","add","subtract","multiply","divide","pow","parse","simplifyConstant","simplifyCore","simplify","?bignumber","?fraction","mathWithTransform","matrix","AccessorNode","ArrayNode","ConstantNode","FunctionNode","IndexNode","ObjectNode","OperatorNode","SymbolNode","ParenthesisNode"],hX=I(Fb,dX,e=>{var{config:t,typed:r,equal:n,isZero:a,add:i,subtract:o,multiply:s,divide:u,pow:l,parse:c,simplifyConstant:f,simplifyCore:m,simplify:d,fraction:h,bignumber:p,mathWithTransform:y,matrix:w,AccessorNode:D,ArrayNode:v,ConstantNode:x,FunctionNode:g,IndexNode:b,ObjectNode:C,OperatorNode:N,SymbolNode:A,ParenthesisNode:E}=e;function S(M){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},L=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,j=k(),Z=F(M,B,!0,j.firstRules),G=Z.variables.length,V={exactFractions:!1},P={exactFractions:!0};if(M=Z.expression,G>=1){M=$(M);var Q,z,oe=!0,ne=!1;M=d(M,j.firstRules,{},V);for(var U;z=oe?j.distrDivRules:j.sucDivRules,M=d(M,z,{},P),oe=!oe,U=M.toString(),U!==Q;)ne=!0,Q=U;ne&&(M=d(M,j.firstRulesAgain,{},V)),M=d(M,j.finalRules,{},V)}var _=[],J={};return M.type==="OperatorNode"&&M.isBinary()&&M.op==="/"?(G===1&&(M.args[0]=R(M.args[0],_),M.args[1]=R(M.args[1])),L&&(J.numerator=M.args[0],J.denominator=M.args[1])):(G===1&&(M=R(M,_)),L&&(J.numerator=M,J.denominator=null)),L?(J.coefficients=_,J.variables=Z.variables,J.expression=M,J):M}return r(Fb,{Node:S,"Node, boolean":(M,B)=>S(M,{},B),"Node, Object":S,"Node, Object, boolean":S});function F(M,B,L,j){var Z=[],G=d(M,j,B,{exactFractions:!1});L=!!L;var V="+-*"+(L?"/":"");Q(G);var P={};return P.expression=G,P.variables=Z,P;function Q(z){var oe=z.type;if(oe==="FunctionNode")throw new Error("There is an unsolved function call");if(oe==="OperatorNode")if(z.op==="^"){if(z.args[1].type!=="ConstantNode"||!ke(parseFloat(z.args[1].value)))throw new Error("There is a non-integer exponent");Q(z.args[0])}else{if(!V.includes(z.op))throw new Error("Operator "+z.op+" invalid in polynomial expression");for(var ne=0;ne<z.args.length;ne++)Q(z.args[ne])}else if(oe==="SymbolNode"){var U=z.name,_=Z.indexOf(U);_===-1&&Z.push(U)}else if(oe==="ParenthesisNode")Q(z.content);else if(oe!=="ConstantNode")throw new Error("type "+oe+" is not allowed in polynomial expression")}}function k(){var M=[m,{l:"n+n",r:"2*n"},{l:"n+-n",r:"0"},f,{l:"n*(n1^-1)",r:"n/n1"},{l:"n*n1^-n2",r:"n/n1^n2"},{l:"n1^-1",r:"1/n1"},{l:"n*(n1/n2)",r:"(n*n1)/n2"},{l:"1*n",r:"n"}],B=[{l:"(-n1)/(-n2)",r:"n1/n2"},{l:"(-n1)*(-n2)",r:"n1*n2"},{l:"n1--n2",r:"n1+n2"},{l:"n1-n2",r:"n1+(-n2)"},{l:"(n1+n2)*n3",r:"(n1*n3 + n2*n3)"},{l:"n1*(n2+n3)",r:"(n1*n2+n1*n3)"},{l:"c1*n + c2*n",r:"(c1+c2)*n"},{l:"c1*n + n",r:"(c1+1)*n"},{l:"c1*n - c2*n",r:"(c1-c2)*n"},{l:"c1*n - n",r:"(c1-1)*n"},{l:"v/c",r:"(1/c)*v"},{l:"v/-c",r:"-(1/c)*v"},{l:"-v*-c",r:"c*v"},{l:"-v*c",r:"-c*v"},{l:"v*-c",r:"-c*v"},{l:"v*c",r:"c*v"},{l:"-(-n1*n2)",r:"(n1*n2)"},{l:"-(n1*n2)",r:"(-n1*n2)"},{l:"-(-n1+n2)",r:"(n1-n2)"},{l:"-(n1+n2)",r:"(-n1-n2)"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"},{l:"-(-n1/n2)",r:"(n1/n2)"},{l:"-(n1/n2)",r:"(-n1/n2)"}],L=[{l:"(n1/n2 + n3/n4)",r:"((n1*n4 + n3*n2)/(n2*n4))"},{l:"(n1/n2 + n3)",r:"((n1 + n3*n2)/n2)"},{l:"(n1 + n2/n3)",r:"((n1*n3 + n2)/n3)"}],j=[{l:"(n1/(n2/n3))",r:"((n1*n3)/n2)"},{l:"(n1/n2/n3)",r:"(n1/(n2*n3))"}],Z={};return Z.firstRules=M.concat(B,j),Z.distrDivRules=L,Z.sucDivRules=j,Z.firstRulesAgain=M.concat(B),Z.finalRules=[m,{l:"n*-n",r:"-n^2"},{l:"n*n",r:"n^2"},f,{l:"n*-n^n1",r:"-n^(n1+1)"},{l:"n*n^n1",r:"n^(n1+1)"},{l:"n^n1*-n^n2",r:"-n^(n1+n2)"},{l:"n^n1*n^n2",r:"n^(n1+n2)"},{l:"n^n1*-n",r:"-n^(n1+1)"},{l:"n^n1*n",r:"n^(n1+1)"},{l:"n^n1/-n",r:"-n^(n1-1)"},{l:"n^n1/n",r:"n^(n1-1)"},{l:"n/-n^n1",r:"-n^(1-n1)"},{l:"n/n^n1",r:"n^(1-n1)"},{l:"n^n1/-n^n2",r:"n^(n1-n2)"},{l:"n^n1/n^n2",r:"n^(n1-n2)"},{l:"n1+(-n2*n3)",r:"n1-n2*n3"},{l:"v*(-c)",r:"-c*v"},{l:"n1+-n2",r:"n1-n2"},{l:"v*c",r:"c*v"},{l:"(n1^n2)^n3",r:"(n1^(n2*n3))"}],Z}function $(M,B,L){var j=M.type,Z=arguments.length>1;if(j==="OperatorNode"&&M.isBinary()){var G=!1,V;if(M.op==="^"&&(M.args[0].type==="ParenthesisNode"||M.args[0].type==="OperatorNode")&&M.args[1].type==="ConstantNode"&&(V=parseFloat(M.args[1].value),G=V>=2&&ke(V)),G){if(V>2){var P=M.args[0],Q=new N("^","pow",[M.args[0].cloneDeep(),new x(V-1)]);M=new N("*","multiply",[P,Q])}else M=new N("*","multiply",[M.args[0],M.args[0].cloneDeep()]);Z&&(L==="content"?B.content=M:B.args[L]=M)}}if(j==="ParenthesisNode")$(M.content,M,"content");else if(j!=="ConstantNode"&&j!=="SymbolNode")for(var z=0;z<M.args.length;z++)$(M.args[z],M,z);if(!Z)return M}function R(M,B){B===void 0&&(B=[]),B[0]=0;var L={};L.cte=1,L.oper="+",L.fire="";var j=0,Z="";U(M,null,L),j=B.length-1;for(var G=!0,V,P=j;P>=0;P--)if(B[P]!==0){var Q=new x(G?B[P]:Math.abs(B[P])),z=B[P]<0?"-":"+";if(P>0){var oe=new A(Z);if(P>1){var ne=new x(P);oe=new N("^","pow",[oe,ne])}B[P]===-1&&G?Q=new N("-","unaryMinus",[oe]):Math.abs(B[P])===1?Q=oe:Q=new N("*","multiply",[Q,oe])}G?V=Q:z==="+"?V=new N("+","add",[V,Q]):V=new N("-","subtract",[V,Q]),G=!1}if(G)return new x(0);return V;function U(_,J,ae){var ee=_.type;if(ee==="FunctionNode")throw new Error("There is an unsolved function call");if(ee==="OperatorNode"){if(!"+-*^".includes(_.op))throw new Error("Operator "+_.op+" invalid");if(J!==null){if((_.fn==="unaryMinus"||_.fn==="pow")&&J.fn!=="add"&&J.fn!=="subtract"&&J.fn!=="multiply")throw new Error("Invalid "+_.op+" placing");if((_.fn==="subtract"||_.fn==="add"||_.fn==="multiply")&&J.fn!=="add"&&J.fn!=="subtract")throw new Error("Invalid "+_.op+" placing");if((_.fn==="subtract"||_.fn==="add"||_.fn==="unaryMinus")&&ae.noFil!==0)throw new Error("Invalid "+_.op+" placing")}(_.op==="^"||_.op==="*")&&(ae.fire=_.op);for(var ue=0;ue<_.args.length;ue++)_.fn==="unaryMinus"&&(ae.oper="-"),(_.op==="+"||_.fn==="subtract")&&(ae.fire="",ae.cte=1,ae.oper=ue===0?"+":_.op),ae.noFil=ue,U(_.args[ue],_,ae)}else if(ee==="SymbolNode"){if(_.name!==Z&&Z!=="")throw new Error("There is more than one variable");if(Z=_.name,J===null){B[1]=1;return}if(J.op==="^"&&ae.noFil!==0)throw new Error("In power the variable should be the first parameter");if(J.op==="*"&&ae.noFil!==1)throw new Error("In multiply the variable should be the second parameter");(ae.fire===""||ae.fire==="*")&&(j<1&&(B[1]=0),B[1]+=ae.cte*(ae.oper==="+"?1:-1),j=Math.max(1,j))}else if(ee==="ConstantNode"){var se=parseFloat(_.value);if(J===null){B[0]=se;return}if(J.op==="^"){if(ae.noFil!==1)throw new Error("Constant cannot be powered");if(!ke(se)||se<=0)throw new Error("Non-integer exponent is not allowed");for(var be=j+1;be<se;be++)B[be]=0;se>j&&(B[se]=0),B[se]+=ae.cte*(ae.oper==="+"?1:-1),j=Math.max(se,j);return}ae.cte=se,ae.fire===""&&(B[0]+=ae.cte*(ae.oper==="+"?1:-1))}else throw new Error("Type "+ee+" is not allowed")}}}),Pb="zpk2tf",pX=["typed","add","multiply","Complex","number"],gX=I(Pb,pX,e=>{var{typed:t,add:r,multiply:n,Complex:a,number:i}=e;return t(Pb,{"Array,Array,number":function(l,c,f){return o(l,c,f)},"Array,Array":function(l,c){return o(l,c,1)},"Matrix,Matrix,number":function(l,c,f){return o(l.valueOf(),c.valueOf(),f)},"Matrix,Matrix":function(l,c){return o(l.valueOf(),c.valueOf(),1)}});function o(u,l,c){u.some(D=>D.type==="BigNumber")&&(u=u.map(D=>i(D))),l.some(D=>D.type==="BigNumber")&&(l=l.map(D=>i(D)));for(var f=[a(1,0)],m=[a(1,0)],d=0;d<u.length;d++){var h=u[d];typeof h=="number"&&(h=a(h,0)),f=s(f,[a(1,0),a(-h.re,-h.im)])}for(var p=0;p<l.length;p++){var y=l[p];typeof y=="number"&&(y=a(y,0)),m=s(m,[a(1,0),a(-y.re,-y.im)])}for(var w=0;w<f.length;w++)f[w]=n(f[w],c);return[f,m]}function s(u,l){for(var c=[],f=0;f<u.length+l.length-1;f++){c[f]=a(0,0);for(var m=0;m<u.length;m++)f-m>=0&&f-m<l.length&&(c[f]=r(c[f],n(u[m],l[f-m])))}return c}}),kb="freqz",vX=["typed","add","multiply","Complex","divide","matrix"],yX=I(kb,vX,e=>{var{typed:t,add:r,multiply:n,Complex:a,divide:i,matrix:o}=e;return t(kb,{"Array, Array":function(c,f){var m=u(512);return s(c,f,m)},"Array, Array, Array":function(c,f,m){return s(c,f,m)},"Array, Array, number":function(c,f,m){if(m<0)throw new Error("w must be a positive number");var d=u(m);return s(c,f,d)},"Matrix, Matrix":function(c,f){var m=u(512),{w:d,h}=s(c.valueOf(),f.valueOf(),m);return{w:o(d),h:o(h)}},"Matrix, Matrix, Matrix":function(c,f,m){var{h:d}=s(c.valueOf(),f.valueOf(),m.valueOf());return{h:o(d),w:o(m)}},"Matrix, Matrix, number":function(c,f,m){if(m<0)throw new Error("w must be a positive number");var d=u(m),{h}=s(c.valueOf(),f.valueOf(),d);return{h:o(h),w:o(d)}}});function s(l,c,f){for(var m=[],d=[],h=0;h<f.length;h++){for(var p=a(0,0),y=a(0,0),w=0;w<l.length;w++)p=r(p,n(l[w],a(Math.cos(-w*f[h]),Math.sin(-w*f[h]))));for(var D=0;D<c.length;D++)y=r(y,n(c[D],a(Math.cos(-D*f[h]),Math.sin(-D*f[h]))));m.push(p),d.push(y)}for(var v=[],x=0;x<m.length;x++)v.push(i(m[x],d[x]));return{h:v,w:f}}function u(l){for(var c=[],f=0;f<l;f++)c.push(f/l*Math.PI);return c}}),bX="reviver",wX=["classes"],xX=I(bX,wX,e=>{var{classes:t}=e;return function(n,a){var i=t[a&&a.mathjs];return i&&typeof i.fromJSON=="function"?i.fromJSON(a):a}}),DX="replacer",NX=[],AX=I(DX,NX,()=>function(t,r){return typeof r=="number"&&(!Number.isFinite(r)||isNaN(r))?{mathjs:"number",value:String(r)}:typeof r=="bigint"?{mathjs:"bigint",value:String(r)}:r}),CX="15.1.0",EX=I("true",[],()=>!0),SX=I("false",[],()=>!1),MX=I("null",[],()=>null),TX=bn("Infinity",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1/0):1/0}),FX=bn("NaN",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(NaN):NaN}),PX=bn("pi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?zd(r):wI}),kX=bn("tau",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?XL(r):xI}),OX=bn("e",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?ZL(r):DI}),$X=bn("phi",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?QL(r):NI}),BX=bn("LN2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).ln():Math.LN2}),_X=bn("LN10",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(10).ln():Math.LN10}),IX=bn("LOG2E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(2).ln()):Math.LOG2E}),zX=bn("LOG10E",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(1).div(new r(10).ln()):Math.LOG10E}),jX=bn("SQRT1_2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r("0.5").sqrt():Math.SQRT1_2}),qX=bn("SQRT2",["config","?BigNumber"],e=>{var{config:t,BigNumber:r}=e;return t.number==="BigNumber"?new r(2).sqrt():Math.SQRT2}),RX=bn("i",["Complex"],e=>{var{Complex:t}=e;return t.I}),LX=I("version",[],()=>CX);function bn(e,t,r){return I(e,t,r,{recreateOnConfigChange:!0})}var HX=Ke("speedOfLight","299792458","m s^-1"),GX=Ke("gravitationConstant","6.67430e-11","m^3 kg^-1 s^-2"),VX=Ke("planckConstant","6.62607015e-34","J s"),UX=Ke("reducedPlanckConstant","1.0545718176461565e-34","J s"),WX=Ke("magneticConstant","1.25663706212e-6","N A^-2"),JX=Ke("electricConstant","8.8541878128e-12","F m^-1"),KX=Ke("vacuumImpedance","376.730313667","ohm"),YX=Ke("coulomb","8.987551792261171e9","N m^2 C^-2"),ZX=Ke("coulombConstant","8.987551792261171e9","N m^2 C^-2"),QX=Ke("elementaryCharge","1.602176634e-19","C"),XX=Ke("bohrMagneton","9.2740100783e-24","J T^-1"),eee=Ke("conductanceQuantum","7.748091729863649e-5","S"),tee=Ke("inverseConductanceQuantum","12906.403729652257","ohm"),ree=Ke("magneticFluxQuantum","2.0678338484619295e-15","Wb"),nee=Ke("nuclearMagneton","5.0507837461e-27","J T^-1"),aee=Ke("klitzing","25812.807459304513","ohm"),iee=Ke("bohrRadius","5.29177210903e-11","m"),oee=Ke("classicalElectronRadius","2.8179403262e-15","m"),see=Ke("electronMass","9.1093837015e-31","kg"),uee=Ke("fermiCoupling","1.1663787e-5","GeV^-2"),lee=Bc("fineStructure",.0072973525693),cee=Ke("hartreeEnergy","4.3597447222071e-18","J"),fee=Ke("protonMass","1.67262192369e-27","kg"),mee=Ke("deuteronMass","3.3435830926e-27","kg"),dee=Ke("neutronMass","1.6749271613e-27","kg"),hee=Ke("quantumOfCirculation","3.6369475516e-4","m^2 s^-1"),pee=Ke("rydberg","10973731.568160","m^-1"),gee=Ke("thomsonCrossSection","6.6524587321e-29","m^2"),vee=Bc("weakMixingAngle",.2229),yee=Bc("efimovFactor",22.7),bee=Ke("atomicMass","1.66053906660e-27","kg"),wee=Ke("avogadro","6.02214076e23","mol^-1"),xee=Ke("boltzmann","1.380649e-23","J K^-1"),Dee=Ke("faraday","96485.33212331001","C mol^-1"),Nee=Ke("firstRadiation","3.7417718521927573e-16","W m^2"),Aee=Ke("loschmidt","2.686780111798444e25","m^-3"),Cee=Ke("gasConstant","8.31446261815324","J K^-1 mol^-1"),Eee=Ke("molarPlanckConstant","3.990312712893431e-10","J s mol^-1"),See=Ke("molarVolume","0.022413969545014137","m^3 mol^-1"),Mee=Bc("sackurTetrode",-1.16487052358),Tee=Ke("secondRadiation","0.014387768775039337","m K"),Fee=Ke("stefanBoltzmann","5.67037441918443e-8","W m^-2 K^-4"),Pee=Ke("wienDisplacement","2.897771955e-3","m K"),kee=Ke("molarMass","0.99999999965e-3","kg mol^-1"),Oee=Ke("molarMassC12","11.9999999958e-3","kg mol^-1"),$ee=Ke("gravity","9.80665","m s^-2"),Bee=Ke("planckLength","1.616255e-35","m"),_ee=Ke("planckMass","2.176435e-8","kg"),Iee=Ke("planckTime","5.391245e-44","s"),zee=Ke("planckCharge","1.87554603778e-18","C"),jee=Ke("planckTemperature","1.416785e+32","K");function Ke(e,t,r){var n=["config","Unit","BigNumber"];return I(e,n,a=>{var{config:i,Unit:o,BigNumber:s}=a,u=i.number==="BigNumber"?new s(t):parseFloat(t),l=new o(u,r);return l.fixPrefix=!0,l})}function Bc(e,t){var r=["config","BigNumber"];return I(e,r,n=>{var{config:a,BigNumber:i}=n;return a.number==="BigNumber"?new i(t):t})}function Ob(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function qee(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ob(Object(r),!0).forEach(function(n){ur(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ob(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}var Ree="mapSlices",Lee=["typed","isInteger"],Hee=I(Ree,Lee,e=>{var{typed:t,isInteger:r}=e,n=Ym({typed:t,isInteger:r});return t("mapSlices",{"...any":function(i){var o=i[1];qe(o)?i[1]=o-1:Qe(o)&&(i[1]=o.minus(1));try{return n.apply(null,i)}catch(s){throw Qr(s)}}})},qee({isTransformFunction:!0},Ym.meta)),Gee="column",Vee=["typed","Index","matrix","range"],Uee=I(Gee,Vee,e=>{var{typed:t,Index:r,matrix:n,range:a}=e,i=j2({typed:t,Index:r,matrix:n,range:a});return t("column",{"...any":function(s){var u=s.length-1,l=s[u];qe(l)&&(s[u]=l-1);try{return i.apply(null,s)}catch(c){throw Qr(c)}}})},{isTransformFunction:!0});function Rd(e,t,r){var n=e.filter(function(u){return Dr(u)&&!(u.name in t)&&!r.has(u.name)})[0];if(!n)throw new Error('No undefined variable found in inline expression "'+e+'"');var a=n.name,i=new Map,o=new ox(r,i,new Set([a])),s=e.compile();return function(l){return i.set(a,l),s.evaluate(o)}}var Wee="transformCallback",Jee=["typed"],Ld=I(Wee,Jee,e=>{var{typed:t}=e;return function(n,a){return t.isTypedFunction(n)?r(n,a):$b(n,n.length,a)};function r(n,a){var i=Object.fromEntries(Object.entries(n.signatures).map(o=>{var[s,u]=o,l=s.split(",").length;return t.isTypedFunction(u)?[s,r(u,a)]:[s,$b(u,l,a)]}));return typeof n.name=="string"?t(n.name,i):t(i)}});function $b(e,t,r){return t===r?e:t===r+1?function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.slice(0,r),s=Bb(a[r]);return e(...o,s)}:t>r+1?function(){for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];var o=a.slice(0,r),s=Bb(a[r]),u=a.slice(r+1);return e(...o,s,...u)}:e}function Bb(e){return e.map(t=>t+1)}var Kee="filter",Yee=["typed"],Zee=I(Kee,Yee,e=>{var{typed:t}=e;function r(a,i,o){var s=q2({typed:t}),u=Ld({typed:t});if(a.length===0)return s();var l=a[0];if(a.length===1)return s(l);var c=a.length-1,f=a[c];return l&&(l=n(l,o)),f&&(Dr(f)||iu(f)?f=n(f,o):f=Rd(f,i,o)),s(l,u(f,c))}r.rawArgs=!0;function n(a,i){return a.compile().evaluate(i)}return r},{isTransformFunction:!0}),Qee="forEach",Xee=["typed"],ete=I(Qee,Xee,e=>{var{typed:t}=e,r=R2({typed:t}),n=Ld({typed:t});function a(o,s,u){if(o.length===0)return r();var l=o[0];if(o.length===1)return r(l);var c=o.length-1,f=o[c];return l&&(l=i(l,u)),f&&(Dr(f)||iu(f)?f=i(f,u):f=Rd(f,s,u)),r(l,n(f,c))}a.rawArgs=!0;function i(o,s){return o.compile().evaluate(s)}return a},{isTransformFunction:!0}),tte="index",rte=["Index","getMatrixDataType"],nte=I(tte,rte,e=>{var{Index:t,getMatrixDataType:r}=e;return function(){for(var a=[],i=0,o=arguments.length;i<o;i++){var s=arguments[i];if(Cd(s))s.start--,s.end-=s.step>0?0:2;else if(s&&s.isSet===!0)s=s.map(function(l){return l-1});else if(Tt(s)||Le(s))r(s)!=="boolean"&&(s=s.map(function(l){return l-1}));else if(qe(s)||Bs(s))s--;else if(Qe(s))s=s.toNumber()-1;else if(typeof s!="string")throw new TypeError("Dimension must be an Array, Matrix, number, bigint, string, or Range");a[i]=s}var u=new t;return t.apply(u,a),u}},{isTransformFunction:!0}),ate="map",ite=["typed"],ote=I(ate,ite,e=>{var{typed:t}=e,r=L2({typed:t}),n=Ld({typed:t});function a(i,o,s){if(i.length===0)return r();if(i.length===1)return r(i[0]);var u=i.length-1,l=i.slice(0,u),c=i[u];return l=l.map(m=>f(m,s)),c&&(Dr(c)||iu(c)?c=f(c,s):c=Rd(c,o,s)),r(...l,n(c,u));function f(m,d){return m.compile().evaluate(d)}}return a.rawArgs=!0,a},{isTransformFunction:!0});function ste(e){return qe(e)?e-1:Qe(e)?e.minus(1):e}function ute(e){return qe(e)||Qe(e)}function xi(e){if(e.length===2&&vn(e[0])){e=e.slice();var t=e[1];ute(t)&&(e[1]=ste(t))}return e}var lte="max",cte=["typed","config","numeric","larger","isNaN"],fte=I(lte,cte,e=>{var{typed:t,config:r,numeric:n,larger:a,isNaN:i}=e,o=Z2({typed:t,config:r,numeric:n,larger:a,isNaN:i});return t("max",{"...any":function(u){u=xi(u);try{return o.apply(null,u)}catch(l){throw Qr(l)}}})},{isTransformFunction:!0}),mte="mean",dte=["typed","add","divide"],hte=I(mte,dte,e=>{var{typed:t,add:r,divide:n}=e,a=oD({typed:t,add:r,divide:n});return t("mean",{"...any":function(o){o=xi(o);try{return a.apply(null,o)}catch(s){throw Qr(s)}}})},{isTransformFunction:!0}),pte="min",gte=["typed","config","numeric","smaller","isNaN"],vte=I(pte,gte,e=>{var{typed:t,config:r,numeric:n,smaller:a,isNaN:i}=e,o=Q2({typed:t,config:r,numeric:n,smaller:a,isNaN:i});return t("min",{"...any":function(u){u=xi(u);try{return o.apply(null,u)}catch(l){throw Qr(l)}}})},{isTransformFunction:!0}),yte="range",bte=["typed","config","?matrix","?bignumber","equal","smaller","smallerEq","larger","largerEq","add","isZero","isPositive"],wte=I(yte,bte,e=>{var{typed:t,config:r,matrix:n,bignumber:a,equal:i,smaller:o,smallerEq:s,larger:u,largerEq:l,add:c,isZero:f,isPositive:m}=e,d=V2({typed:t,config:r,matrix:n,bignumber:a,equal:i,smaller:o,smallerEq:s,larger:u,largerEq:l,add:c,isZero:f,isPositive:m});return t("range",{"...any":function(p){var y=p.length-1,w=p[y];return typeof w!="boolean"&&p.push(!0),d.apply(null,p)}})},{isTransformFunction:!0}),xte="row",Dte=["typed","Index","matrix","range"],Nte=I(xte,Dte,e=>{var{typed:t,Index:r,matrix:n,range:a}=e,i=U2({typed:t,Index:r,matrix:n,range:a});return t("row",{"...any":function(s){var u=s.length-1,l=s[u];qe(l)&&(s[u]=l-1);try{return i.apply(null,s)}catch(c){throw Qr(c)}}})},{isTransformFunction:!0}),Ate="subset",Cte=["typed","matrix","zeros","add"],Ete=I(Ate,Cte,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e,i=W2({typed:t,matrix:r,zeros:n,add:a});return t("subset",{"...any":function(s){try{return i.apply(null,s)}catch(u){throw Qr(u)}}})},{isTransformFunction:!0}),Ste="concat",Mte=["typed","matrix","isInteger"],Tte=I(Ste,Mte,e=>{var{typed:t,matrix:r,isInteger:n}=e,a=z2({typed:t,matrix:r,isInteger:n});return t("concat",{"...any":function(o){var s=o.length-1,u=o[s];qe(u)?o[s]=u-1:Qe(u)&&(o[s]=u.minus(1));try{return a.apply(null,o)}catch(l){throw Qr(l)}}})},{isTransformFunction:!0}),_b="diff",Fte=["typed","matrix","subtract","number","bignumber"],Pte=I(_b,Fte,e=>{var{typed:t,matrix:r,subtract:n,number:a,bignumber:i}=e,o=H2({typed:t,matrix:r,subtract:n,number:a,bignumber:i});return t(_b,{"...any":function(u){u=xi(u);try{return o.apply(null,u)}catch(l){throw Qr(l)}}})},{isTransformFunction:!0}),kte="std",Ote=["typed","map","sqrt","variance"],$te=I(kte,Ote,e=>{var{typed:t,map:r,sqrt:n,variance:a}=e,i=lD({typed:t,map:r,sqrt:n,variance:a});return t("std",{"...any":function(s){s=xi(s);try{return i.apply(null,s)}catch(u){throw Qr(u)}}})},{isTransformFunction:!0}),Ib="sum",Bte=["typed","config","add","numeric"],_te=I(Ib,Bte,e=>{var{typed:t,config:r,add:n,numeric:a}=e,i=aD({typed:t,config:r,add:n,numeric:a});return t(Ib,{"...any":function(s){s=xi(s);try{return i.apply(null,s)}catch(u){throw Qr(u)}}})},{isTransformFunction:!0}),Ite="quantileSeq",zte=["typed","bignumber","add","subtract","divide","multiply","partitionSelect","compare","isInteger","smaller","smallerEq","larger","mapSlices"],jte=I(Ite,zte,e=>{var{typed:t,bignumber:r,add:n,subtract:a,divide:i,multiply:o,partitionSelect:s,compare:u,isInteger:l,smaller:c,smallerEq:f,larger:m,mapSlices:d}=e,h=uD({typed:t,bignumber:r,add:n,subtract:a,divide:i,multiply:o,partitionSelect:s,compare:u,isInteger:l,smaller:c,smallerEq:f,larger:m,mapSlices:d});return t("quantileSeq",{"Array | Matrix, number | BigNumber":h,"Array | Matrix, number | BigNumber, number":(y,w,D)=>h(y,w,p(D)),"Array | Matrix, number | BigNumber, boolean":h,"Array | Matrix, number | BigNumber, boolean, number":(y,w,D,v)=>h(y,w,D,p(v)),"Array | Matrix, Array | Matrix":h,"Array | Matrix, Array | Matrix, number":(y,w,D)=>h(y,w,p(D)),"Array | Matrix, Array | Matrix, boolean":h,"Array | Matrix, Array | Matrix, boolean, number":(y,w,D,v)=>h(y,w,D,p(v))});function p(y){return xi([[],y])[1]}},{isTransformFunction:!0}),zb="cumsum",qte=["typed","add","unaryPlus"],Rte=I(zb,qte,e=>{var{typed:t,add:r,unaryPlus:n}=e,a=iD({typed:t,add:r,unaryPlus:n});return t(zb,{"...any":function(o){if(o.length===2&&vn(o[0])){var s=o[1];qe(s)?o[1]=s-1:Qe(s)&&(o[1]=s.minus(1))}try{return a.apply(null,o)}catch(u){throw Qr(u)}}})},{isTransformFunction:!0}),jb="variance",Lte=["typed","add","subtract","multiply","divide","mapSlices","isNaN"],Hte=I(jb,Lte,e=>{var{typed:t,add:r,subtract:n,multiply:a,divide:i,mapSlices:o,isNaN:s}=e,u=sD({typed:t,add:r,subtract:n,multiply:a,divide:i,mapSlices:o,isNaN:s});return t(jb,{"...any":function(c){c=xi(c);try{return u.apply(null,c)}catch(f){throw Qr(f)}}})},{isTransformFunction:!0}),qb="print",Gte=["typed","matrix","zeros","add"],Vte=I(qb,Gte,e=>{var{typed:t,matrix:r,zeros:n,add:a}=e,i=K2({typed:t,matrix:r,zeros:n,add:a});return t(qb,{"string, Object | Array":function(u,l){return i(o(u),l)},"string, Object | Array, number | Object":function(u,l,c){return i(o(u),l,c)}});function o(s){return s.replace(J2,u=>{var l=u.slice(1).split("."),c=l.map(function(f){return!isNaN(f)&&f.length>0?parseInt(f)-1:f});return"$"+c.join(".")})}},{isTransformFunction:!0}),Ute="and",Wte=["typed","matrix","zeros","add","equalScalar","not","concat"],Jte=I(Ute,Wte,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,s=Y2({typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o});function u(l,c,f){var m=l[0].compile().evaluate(f);if(!vn(m)&&!s(m,!0))return!1;var d=l[1].compile().evaluate(f);return s(m,d)}return u.rawArgs=!0,u},{isTransformFunction:!0}),Kte="or",Yte=["typed","matrix","equalScalar","DenseMatrix","concat"],Zte=I(Kte,Yte,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=I2({typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i});function s(u,l,c){var f=u[0].compile().evaluate(c);if(!vn(f)&&o(f,!1))return!0;var m=u[1].compile().evaluate(c);return o(f,m)}return s.rawArgs=!0,s},{isTransformFunction:!0}),Qte="nullish",Xte=["typed","matrix","size","flatten","deepEqual"],ere=I(Qte,Xte,e=>{var{typed:t,matrix:r,size:n,flatten:a,deepEqual:i}=e,o=_2({typed:t,matrix:r,size:n,flatten:a,deepEqual:i});function s(u,l,c){var f=u[0].compile().evaluate(c);if(!vn(f)&&f!=null&&f!==void 0)return f;var m=u[1].compile().evaluate(c);return o(f,m)}return s.rawArgs=!0,s},{isTransformFunction:!0}),tre="bitAnd",rre=["typed","matrix","zeros","add","equalScalar","not","concat"],nre=I(tre,rre,e=>{var{typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o}=e,s=$2({typed:t,matrix:r,equalScalar:n,zeros:a,not:i,concat:o});function u(l,c,f){var m=l[0].compile().evaluate(f);if(!vn(m)){if(isNaN(m))return NaN;if(m===0||m===!1)return 0}var d=l[1].compile().evaluate(f);return s(m,d)}return u.rawArgs=!0,u},{isTransformFunction:!0}),are="bitOr",ire=["typed","matrix","equalScalar","DenseMatrix","concat"],ore=I(are,ire,e=>{var{typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i}=e,o=B2({typed:t,matrix:r,equalScalar:n,DenseMatrix:a,concat:i});function s(u,l,c){var f=u[0].compile().evaluate(c);if(!vn(f)){if(isNaN(f))return NaN;if(f===-1)return-1;if(f===!0)return 1}var m=u[1].compile().evaluate(c);return o(f,m)}return s.rawArgs=!0,s},{isTransformFunction:!0}),xe=O9({config:fe}),kt=z9({}),Rb=OX({BigNumber:xe,config:fe}),sre=SX({}),ure=lee({BigNumber:xe,config:fe}),Di=U9({}),fD=RX({Complex:kt}),lre=TX({BigNumber:xe,config:fe}),cre=_X({BigNumber:xe,config:fe}),fre=zX({BigNumber:xe,config:fe}),_c=Q9({}),mre=FX({BigNumber:xe,config:fe}),dre=MX({}),hre=$X({BigNumber:xe,config:fe}),pre=K9({}),mD=I8({}),gre=jX({BigNumber:xe,config:fe}),vre=Mee({BigNumber:xe,config:fe}),dD=kX({BigNumber:xe,config:fe}),yre=EX({}),bre=LX({}),rt=hI({Matrix:_c,config:fe}),wre=yee({BigNumber:xe,config:fe}),xre=BX({BigNumber:xe,config:fe}),ad=PX({BigNumber:xe,config:fe}),hD=AX({}),Dre=qX({BigNumber:xe,config:fe}),W=O8({BigNumber:xe,Complex:kt,DenseMatrix:rt,Fraction:Di}),Nre=vee({BigNumber:xe,config:fe}),Xr=O7({typed:W}),Are=cH({Complex:kt,config:fe,typed:W}),Cre=hH({BigNumber:xe,typed:W}),Ere=yH({BigNumber:xe,Complex:kt,config:fe,typed:W}),mr=I7({typed:W}),Sre=Aj({typed:W}),Mre=AH({BigNumber:xe,Complex:kt,config:fe,typed:W}),Tre=TH({typed:W}),pD=kH({typed:W}),Fre=_H({Complex:kt,config:fe,typed:W}),Pre=a7({typed:W}),kre=vj({typed:W}),Ore=u7({typed:W}),$re=gI({typed:W}),Ic=XZ({typed:W}),zc=h7({Complex:kt,typed:W}),oo=Ej({typed:W}),Hd=zH({typed:W}),Bre=LH({BigNumber:xe,typed:W}),_re=UH({BigNumber:xe,typed:W}),Ire=X7({typed:W}),ot=WI({config:fe,typed:W}),zre=Uq({typed:W}),gD=tz({typed:W}),jre=nz({Complex:kt,typed:W}),qre=q2({typed:W}),so=Jj({typed:W}),Rre=R2({typed:W}),lu=nR({typed:W}),Gd=Qj({typed:W}),Lre=lR({format:lu,typed:W}),Vd=Mj({typed:W}),cu=qI({typed:W}),Ia=zI({typed:W}),uo=FI({typed:W}),Hre=gR({typed:W}),Gre=IX({BigNumber:xe,config:fe}),Vre=iQ({Complex:kt,typed:W}),Ure=Iz({Complex:kt,config:fe,typed:W}),Ud=jz({Complex:kt,config:fe,typed:W}),Ni=L2({typed:W}),Wre=Xq({isNaN:Ia,isNumeric:uo,typed:W}),Xt=Lz({typed:W}),gc=kj({typed:W}),ha=t7({typed:W}),Jre=sR({format:lu,typed:W}),Kre=BQ({config:fe,typed:W}),Yre=K2({typed:W}),Zre=IQ({config:fe,typed:W}),Wd=Fj({typed:W}),Qre=YH({BigNumber:xe,typed:W}),vD=Jz({BigNumber:xe,Fraction:Di,complex:zc,typed:W}),jc=eG({typed:W}),dr=xq({typed:W}),hr=YI({Matrix:_c,equalScalar:ot,typed:W}),Xre=S7({typed:W}),ene=Xz({typed:W}),tne=o7({typed:W}),In=j7({typed:W}),rne=aG({typed:W}),nne=hR({typed:W}),Jd=GI({typed:W}),ane=mH({Complex:kt,config:fe,typed:W}),ine=wH({BigNumber:xe,typed:W}),one=DH({BigNumber:xe,Complex:kt,config:fe,typed:W}),sn=f7({BigNumber:xe,typed:W}),sne=tQ({typed:W}),une=qH({typed:W}),lne=JH({BigNumber:xe,typed:W}),qc=BG({addScalar:mr,conj:oo,multiplyScalar:Xt,size:dr,typed:W}),cne=kI({isNumeric:uo,typed:W}),fne=LI({isBounded:cu,map:Ni,typed:W}),Ai=MI({config:fe,typed:W}),zn=_I({equalScalar:ot,typed:W}),we=b7({DenseMatrix:rt,Matrix:_c,SparseMatrix:hr,typed:W}),mne=x7({isZero:zn,matrix:we,typed:W}),Dt=Gz({addScalar:mr,dot:qc,equalScalar:ot,matrix:we,multiplyScalar:Xt,typed:W}),dne=sq({BigNumber:xe,config:fe,matrix:we,typed:W}),hne=jQ({config:fe,log2:Ud,typed:W}),pne=hq({config:fe,matrix:we}),gne=QH({BigNumber:xe,typed:W}),vne=rG({typed:W}),yne=oH({SparseMatrix:hr,typed:W}),ra=Zz({Complex:kt,config:fe,typed:W}),bne=Nq({typed:W}),wne=sG({typed:W}),fu=Tq({matrix:we,typed:W}),yD=nj({BigNumber:xe,config:fe,matrix:we,typed:W}),Tr=Oq({BigNumber:xe,config:fe,matrix:we,typed:W}),xne=gH({BigNumber:xe,Complex:kt,config:fe,typed:W}),Dne=EH({Complex:kt,config:fe,typed:W}),Nne=iR({format:lu,typed:W}),Ane=GH({BigNumber:xe,typed:W}),Kd=Pq({conj:oo,transpose:fu,typed:W}),bD=Gj({DenseMatrix:rt,SparseMatrix:hr,matrix:we,typed:W}),en=fL({DenseMatrix:rt,SparseMatrix:hr,equalScalar:ot,matrix:we,typed:W}),mu=v7({Fraction:Di,typed:W}),Ci=eq({BigNumber:xe,DenseMatrix:rt,SparseMatrix:hr,config:fe,matrix:we,typed:W}),Jr=yI({equal:en,typed:W}),Cne=rq({matrix:we,multiplyScalar:Xt,typed:W}),Ks=Ym({isInteger:Jr,typed:W}),Yd=C7({flatten:so,matrix:we,size:dr,typed:W}),$n=bR({bignumber:sn,fraction:mu,number:ha}),wD=tR({config:fe,multiplyScalar:Xt,numeric:$n,typed:W}),xD=fq({isInteger:Jr,matrix:we,typed:W}),us=CR({BigNumber:xe,DenseMatrix:rt,config:fe,equalScalar:ot,matrix:we,typed:W,zeros:Tr}),pa=T7({typed:W}),Ene=ZZ({BigNumber:xe,Fraction:Di,config:fe,isInteger:Jr,number:ha,typed:W}),DD=R7({BigNumber:xe,Complex:kt,Fraction:Di,config:fe,isNegative:Ai,matrix:we,typed:W,unaryMinus:pa}),ht=z2({isInteger:Jr,matrix:we,typed:W}),Sne=qj({prod:wD,size:dr,typed:W}),du=ML({equal:en,typed:W}),Wt=xR({numeric:$n,typed:W}),Mne=lj({concat:ht,equalScalar:ot,matrix:we,multiplyScalar:Xt,typed:W}),ND=F2({DenseMatrix:rt,config:fe,equalScalar:ot,matrix:we,round:us,typed:W,zeros:Tr}),Tne=Fz({BigNumber:xe,DenseMatrix:rt,concat:ht,config:fe,equalScalar:ot,matrix:we,round:us,typed:W,zeros:Tr}),lo=$I({config:fe,typed:W}),Kr=DL({DenseMatrix:rt,SparseMatrix:hr,bignumber:sn,concat:ht,config:fe,matrix:we,typed:W}),Fne=$z({concat:ht,equalScalar:ot,matrix:we,typed:W}),Pne=JR({DenseMatrix:rt,concat:ht,equalScalar:ot,matrix:we,typed:W,zeros:Tr}),AD=zR({DenseMatrix:rt,divideScalar:Wt,equalScalar:ot,matrix:we,multiplyScalar:Xt,subtractScalar:In,typed:W}),Zd=Z2({config:fe,isNaN:Ia,larger:Kr,numeric:$n,typed:W}),CD=k2({DenseMatrix:rt,concat:ht,config:fe,equalScalar:ot,matrix:we,round:us,typed:W,zeros:Tr}),kne=Uz({BigNumber:xe,concat:ht,equalScalar:ot,matrix:we,typed:W}),One=_2({deepEqual:du,flatten:so,matrix:we,size:dr,typed:W}),$ne=I2({DenseMatrix:rt,concat:ht,equalScalar:ot,matrix:we,typed:W}),Qd=LV({addScalar:mr,complex:zc,conj:oo,divideScalar:Wt,equal:en,identity:Ci,isZero:zn,matrix:we,multiplyScalar:Xt,sign:vD,sqrt:ra,subtractScalar:In,typed:W,unaryMinus:pa,zeros:Tr}),Bne=YR({DenseMatrix:rt,concat:ht,equalScalar:ot,matrix:we,typed:W,zeros:Tr}),Yr=gL({DenseMatrix:rt,SparseMatrix:hr,bignumber:sn,concat:ht,config:fe,matrix:we,typed:W}),nr=tj({DenseMatrix:rt,concat:ht,equalScalar:ot,matrix:we,subtractScalar:In,typed:W,unaryMinus:pa}),_ne=mR({concat:ht,matrix:we,typed:W}),Xd=P7({config:fe,numeric:$n,typed:W}),eh=qR({DenseMatrix:rt,divideScalar:Wt,equalScalar:ot,matrix:we,multiplyScalar:Xt,subtractScalar:In,typed:W}),Ine=_j({DenseMatrix:rt,SparseMatrix:hr,concat:ht,matrix:we,typed:W}),ct=TG({DenseMatrix:rt,SparseMatrix:hr,addScalar:mr,concat:ht,equalScalar:ot,matrix:we,typed:W}),zne=$H({BigNumber:xe,DenseMatrix:rt,concat:ht,equalScalar:ot,matrix:we,typed:W}),jne=$2({concat:ht,equalScalar:ot,matrix:we,typed:W}),qne=B2({DenseMatrix:rt,concat:ht,equalScalar:ot,matrix:we,typed:W}),Rne=Dj({DenseMatrix:rt,SparseMatrix:hr,concat:ht,matrix:we,typed:W}),Lne=VQ({addScalar:mr,combinations:Ic,divideScalar:Wt,isInteger:Jr,isNegative:Ai,multiplyScalar:Xt,typed:W}),co=tL({BigNumber:xe,DenseMatrix:rt,Fraction:Di,concat:ht,config:fe,equalScalar:ot,matrix:we,typed:W}),ED=lL({concat:ht,matrix:we,typed:W}),Hne=WQ({addScalar:mr,combinations:Ic,isInteger:Jr,isNegative:Ai,isPositive:lo,larger:Kr,typed:W}),Gne=Lj({matrix:we,multiply:Dt,subtract:nr,typed:W}),SD=cZ({divideScalar:Wt,isZero:zn,matrix:we,multiply:Dt,subtractScalar:In,typed:W,unaryMinus:pa}),Vne=H2({matrix:we,number:ha,subtract:nr,typed:W}),Une=$Z({abs:Xr,addScalar:mr,deepEqual:du,divideScalar:Wt,multiplyScalar:Xt,sqrt:ra,subtractScalar:In,typed:W}),hu=_R({DenseMatrix:rt,SparseMatrix:hr,concat:ht,divideScalar:Wt,equalScalar:ot,matrix:we,typed:W}),Wne=hL({compareText:ED,isZero:zn,typed:W}),MD=UL({larger:Kr,smaller:Yr}),Jne=PG({abs:Xr,addScalar:mr,divideScalar:Wt,isPositive:lo,multiplyScalar:Xt,smaller:Yr,sqrt:ra,typed:W}),TD=qL({DenseMatrix:rt,smaller:Yr}),Ir=HL({ImmutableDenseMatrix:TD,getMatrixDataType:Gd}),Kne=IZ({abs:Xr,add:ct,addScalar:mr,config:fe,divideScalar:Wt,equalScalar:ot,flatten:so,isNumeric:uo,isZero:zn,matrix:we,multiply:Dt,multiplyScalar:Xt,smaller:Yr,subtract:nr,typed:W}),Yne=ij({BigNumber:xe,add:ct,config:fe,equal:en,isInteger:Jr,mod:CD,smaller:Yr,typed:W,xgcd:yD}),Rc=CL({DenseMatrix:rt,SparseMatrix:hr,concat:ht,config:fe,matrix:we,typed:W}),th=MR({Complex:kt,config:fe,divideScalar:Wt,typeOf:Jd,typed:W}),Zne=LR({DenseMatrix:rt,divideScalar:Wt,equalScalar:ot,matrix:we,multiplyScalar:Xt,subtractScalar:In,typed:W}),Qne=N7({flatten:so,matrix:we,size:dr,typed:W}),Xne=Q2({config:fe,isNaN:Ia,numeric:$n,smaller:Yr,typed:W}),eae=kR({Complex:kt,config:fe,divideScalar:Wt,typed:W}),Lc=OL({compare:co,isNaN:Ia,isNumeric:uo,typed:W}),tae=QR({DenseMatrix:rt,concat:ht,equalScalar:ot,matrix:we,typed:W,zeros:Tr}),FD=mU({SparseMatrix:hr,abs:Xr,add:ct,divideScalar:Wt,larger:Kr,largerEq:Rc,multiply:Dt,subtract:nr,transpose:fu,typed:W}),PD=KL({FibonacciHeap:MD,addScalar:mr,equalScalar:ot}),wn=W2({add:ct,matrix:we,typed:W,zeros:Tr}),rh=aD({add:ct,config:fe,numeric:$n,typed:W}),rae=zG({add:ct,matrix:we,typed:W}),kD=GR({DenseMatrix:rt,divideScalar:Wt,equalScalar:ot,matrix:we,multiplyScalar:Xt,subtractScalar:In,typed:W}),nae=gX({Complex:kt,add:ct,multiply:Dt,number:ha,typed:W}),nh=Z7({DenseMatrix:rt,config:fe,equalScalar:ot,matrix:we,round:us,typed:W,zeros:Tr}),ga=oL({compare:co,typed:W}),aae=iD({add:ct,typed:W,unaryPlus:Xd}),OD=oz({Complex:kt,DenseMatrix:rt,ceil:nh,equalScalar:ot,floor:ND,matrix:we,typed:W,zeros:Tr}),$D=qG({Index:Ir,typed:W}),fo=mZ({abs:Xr,addScalar:mr,det:SD,divideScalar:Wt,identity:Ci,matrix:we,multiply:Dt,typed:W,unaryMinus:pa}),iae=FR({Complex:kt,config:fe,divideScalar:Wt,log:th,typed:W}),BD=qV({DenseMatrix:rt,Spa:PD,SparseMatrix:hr,abs:Xr,addScalar:mr,divideScalar:Wt,equalScalar:ot,larger:Kr,matrix:we,multiplyScalar:Xt,subtractScalar:In,typed:W,unaryMinus:pa}),oae=hZ({Complex:kt,add:ct,ctranspose:Kd,deepEqual:du,divideScalar:Wt,dot:qc,dotDivide:hu,equal:en,inv:fo,matrix:we,multiply:Dt,typed:W}),na=NR({Complex:kt,config:fe,fraction:mu,identity:Ci,inv:fo,matrix:we,multiply:Dt,number:ha,typed:W}),sae=lG({DenseMatrix:rt,Index:Ir,compareNatural:ga,size:dr,subset:wn,typed:W}),uae=dG({DenseMatrix:rt,Index:Ir,compareNatural:ga,size:dr,subset:wn,typed:W}),lae=vG({Index:Ir,compareNatural:ga,size:dr,subset:wn,typed:W}),cae=xG({Index:Ir,compareNatural:ga,size:dr,subset:wn,typed:W}),Qo=bL({DenseMatrix:rt,SparseMatrix:hr,concat:ht,config:fe,matrix:we,typed:W}),fae=BL({compare:co,compareNatural:ga,matrix:we,typed:W}),mae=NZ({abs:Xr,add:ct,identity:Ci,inv:fo,map:Ni,max:Zd,multiply:Dt,size:dr,sqrt:ra,subtract:nr,typed:W}),dae=FL({DenseMatrix:rt,SparseMatrix:hr,concat:ht,config:fe,equalScalar:ot,matrix:we,typed:W}),hae=Y2({concat:ht,equalScalar:ot,matrix:we,not:gc,typed:W,zeros:Tr}),Fr=kZ({divideScalar:Wt,equalScalar:ot,inv:fo,matrix:we,multiply:Dt,typed:W}),pae=xZ({abs:Xr,add:ct,identity:Ci,inv:fo,multiply:Dt,typed:W}),_D=Bq({addScalar:mr,ceil:nh,conj:oo,divideScalar:Wt,dotDivide:hu,exp:gD,i:fD,log2:Ud,matrix:we,multiplyScalar:Xt,pow:na,tau:dD,typed:W}),gae=yX({Complex:kt,add:ct,divide:Fr,matrix:we,multiply:Dt,typed:W}),ah=nQ({BigNumber:xe,Complex:kt,config:fe,multiplyScalar:Xt,pow:na,typed:W}),vae=Iq({conj:oo,dotDivide:hu,fft:_D,typed:W}),yae=lQ({divide:Fr,dotDivide:hu,isNumeric:uo,log:th,map:Ni,matrix:we,multiply:Dt,sum:rh,typed:W}),ID=hU({DenseMatrix:rt,lsolve:AD,lup:BD,matrix:we,slu:FD,typed:W,usolve:eh}),zD=oD({add:ct,divide:Fr,typed:W}),jD=LZ({add:ct,compare:co,divide:Fr,partitionSelect:Lc,typed:W}),bae=gU({add:ct,cbrt:DD,divide:Fr,equalScalar:ot,im:Vd,isZero:zn,multiply:Dt,re:Wd,sqrt:ra,subtract:nr,typeOf:Jd,typed:W,unaryMinus:pa}),wae=uD({bignumber:sn,add:ct,compare:co,divide:Fr,isInteger:Jr,larger:Kr,mapSlices:Ks,multiply:Dt,partitionSelect:Lc,smaller:Yr,smallerEq:Qo,subtract:nr,typed:W}),Xo=V2({bignumber:sn,matrix:we,add:ct,config:fe,equal:en,isPositive:lo,isZero:zn,larger:Kr,largerEq:Rc,smaller:Yr,smallerEq:Qo,typed:W}),xae=U2({Index:Ir,matrix:we,range:Xo,typed:W}),qD=fG({DenseMatrix:rt,Index:Ir,compareNatural:ga,size:dr,subset:wn,typed:W}),Dae=bG({Index:Ir,compareNatural:ga,size:dr,subset:wn,typed:W}),RD=CG({Index:Ir,concat:ht,setDifference:qD,size:dr,subset:wn,typed:W}),Nae=Hq({abs:Xr,add:ct,bignumber:sn,divide:Fr,isNegative:Ai,isPositive:lo,larger:Kr,map:Ni,matrix:we,max:Zd,multiply:Dt,smaller:Yr,subtract:nr,typed:W,unaryMinus:pa}),He=rH({BigNumber:xe,Complex:kt,Fraction:Di,abs:Xr,addScalar:mr,config:fe,divideScalar:Wt,equal:en,fix:OD,format:lu,isNumeric:uo,multiplyScalar:Xt,number:ha,pow:na,round:us,subtractScalar:In}),Aae=KX({BigNumber:xe,Unit:He,config:fe}),Cae=bee({BigNumber:xe,Unit:He,config:fe}),Eae=XX({BigNumber:xe,Unit:He,config:fe}),Sae=xee({BigNumber:xe,Unit:He,config:fe}),LD=j2({Index:Ir,matrix:we,range:Xo,typed:W}),Mae=eee({BigNumber:xe,Unit:He,config:fe}),Tae=YX({BigNumber:xe,Unit:He,config:fe}),Fae=uH({Unit:He,typed:W}),Pae=mee({BigNumber:xe,Unit:He,config:fe}),HD=bZ({abs:Xr,add:ct,addScalar:mr,atan:pD,bignumber:sn,column:LD,complex:zc,config:fe,cos:Hd,diag:bD,divideScalar:Wt,dot:qc,equal:en,flatten:so,im:Vd,inv:fo,larger:Kr,matrix:we,matrixFromColumns:Yd,multiply:Dt,multiplyScalar:Xt,number:ha,qr:Qd,re:Wd,reshape:xD,sin:jc,size:dr,smaller:Yr,sqrt:ra,subtract:nr,typed:W,usolve:eh,usolveAll:kD}),kae=see({BigNumber:xe,Unit:He,config:fe}),pu=sQ({gamma:ah,typed:W}),Oae=uee({BigNumber:xe,Unit:He,config:fe}),$ae=Cee({BigNumber:xe,Unit:He,config:fe}),Bae=$ee({BigNumber:xe,Unit:He,config:fe}),_ae=aee({BigNumber:xe,Unit:He,config:fe}),Iae=Aee({BigNumber:xe,Unit:He,config:fe}),zae=GZ({abs:Xr,map:Ni,median:jD,subtract:nr,typed:W}),jae=ree({BigNumber:xe,Unit:He,config:fe}),qae=kee({BigNumber:xe,Unit:He,config:fe}),Rae=Eee({BigNumber:xe,Unit:He,config:fe}),Lae=fQ({add:ct,divide:Fr,factorial:pu,isInteger:Jr,isPositive:lo,multiply:Dt,typed:W}),ih=OG({abs:Xr,add:ct,conj:oo,ctranspose:Kd,eigs:HD,equalScalar:ot,larger:Kr,matrix:we,multiply:Dt,pow:na,smaller:Yr,sqrt:ra,typed:W}),Hae=dQ({factorial:pu,typed:W}),Gae=VX({BigNumber:xe,Unit:He,config:fe}),Vae=_ee({BigNumber:xe,Unit:He,config:fe}),Uae=Iee({BigNumber:xe,Unit:He,config:fe}),Wae=UX({BigNumber:xe,Unit:He,config:fe}),GD=yq({BigNumber:xe,DenseMatrix:rt,SparseMatrix:hr,addScalar:mr,config:fe,cos:Hd,matrix:we,multiplyScalar:Xt,norm:ih,sin:jc,typed:W,unaryMinus:pa}),Jae=pee({BigNumber:xe,Unit:He,config:fe}),Kae=Tee({BigNumber:xe,Unit:He,config:fe}),Yae=NG({compareNatural:ga,typed:W}),Zae=HX({BigNumber:xe,Unit:He,config:fe}),Qae=Fee({BigNumber:xe,Unit:He,config:fe}),Xae=gee({BigNumber:xe,Unit:He,config:fe}),oh=sD({add:ct,divide:Fr,isNaN:Ia,mapSlices:Ks,multiply:Dt,subtract:nr,typed:W}),eie=Zq({BigNumber:xe,Complex:kt,add:ct,config:fe,divide:Fr,equal:en,factorial:pu,gamma:ah,isBounded:cu,isNegative:Ai,multiply:Dt,pi:ad,pow:na,sin:jc,smallerEq:Qo,subtract:nr,typed:W}),tie=wee({BigNumber:xe,Unit:He,config:fe}),rie=iee({BigNumber:xe,Unit:He,config:fe}),nie=KZ({add:ct,divide:Fr,matrix:we,mean:zD,multiply:Dt,pow:na,sqrt:ra,subtract:nr,sum:rh,typed:W}),aie=$R({DenseMatrix:rt,SparseMatrix:hr,concat:ht,equalScalar:ot,matrix:we,pow:na,typed:W}),iie=QX({BigNumber:xe,Unit:He,config:fe}),oie=Dee({BigNumber:xe,Unit:He,config:fe}),sie=cee({BigNumber:xe,Unit:He,config:fe}),uie=tee({BigNumber:xe,Unit:He,config:fe}),lie=WX({BigNumber:xe,Unit:He,config:fe}),cie=Oee({BigNumber:xe,Unit:He,config:fe}),fie=dee({BigNumber:xe,Unit:He,config:fe}),mie=zee({BigNumber:xe,Unit:He,config:fe}),die=jee({BigNumber:xe,Unit:He,config:fe}),hie=hee({BigNumber:xe,Unit:He,config:fe}),VD=pG({DenseMatrix:rt,Index:Ir,compareNatural:ga,size:dr,subset:wn,typed:W}),pie=lD({map:Ni,sqrt:ra,typed:W,variance:oh}),UD=RQ({bignumber:sn,addScalar:mr,combinations:Ic,divideScalar:Wt,factorial:pu,isInteger:Jr,isNegative:Ai,larger:Kr,multiplyScalar:Xt,number:ha,pow:na,subtractScalar:In,typed:W}),gie=aH({Unit:He,typed:W}),vie=HQ({addScalar:mr,isInteger:Jr,isNegative:Ai,stirlingS2:UD,typed:W}),yie=JX({BigNumber:xe,Unit:He,config:fe}),bie=Nee({BigNumber:xe,Unit:He,config:fe}),wie=nee({BigNumber:xe,Unit:He,config:fe}),xie=Bee({BigNumber:xe,Unit:He,config:fe}),Die=gq({multiply:Dt,rotationMatrix:GD,typed:W}),Nie=SG({Index:Ir,concat:ht,setIntersect:VD,setSymDifference:RD,size:dr,subset:wn,typed:W}),Aie=Pee({BigNumber:xe,Unit:He,config:fe}),Cie=oee({BigNumber:xe,Unit:He,config:fe}),Eie=See({BigNumber:xe,Unit:He,config:fe}),WD=SZ({identity:Ci,matrix:we,multiply:Dt,norm:ih,qr:Qd,subtract:nr,typed:W}),Sie=ZX({BigNumber:xe,Unit:He,config:fe}),Mie=GX({BigNumber:xe,Unit:He,config:fe}),Tie=fee({BigNumber:xe,Unit:He,config:fe}),JD=CZ({abs:Xr,add:ct,concat:ht,identity:Ci,index:$D,lusolve:ID,matrix:we,matrixFromColumns:Yd,multiply:Dt,range:Xo,schur:WD,subset:wn,subtract:nr,transpose:fu,typed:W}),Fie=TZ({matrix:we,multiply:Dt,sylvester:JD,transpose:fu,typed:W}),ls={},gu={},KD={},Rr=HG({mathWithTransform:gu}),cs=dV({Node:Rr}),Ua=pV({Node:Rr}),mo=vV({Node:Rr}),YD=xV({Node:Rr}),fs=WG({Node:Rr}),ZD=XG({Node:Rr,ResultSet:mD}),QD=tV({Node:Rr}),XD=bV({Node:Rr}),Pie=xX({classes:KD}),sh=DU({math:ls,typed:W}),eN=lV({Node:Rr,typed:W}),kie=uZ({Chain:sh,typed:W}),Ei=sV({Node:Rr,isBounded:cu}),ms=fV({Node:Rr,size:dr}),ds=VG({Node:Rr,subset:wn}),tN=ZG({matrix:we,Node:Rr,subset:wn}),Si=AV({Unit:He,Node:Rr,math:ls}),Mi=EV({Node:Rr,SymbolNode:Si,math:ls}),aa=MV({AccessorNode:ds,ArrayNode:fs,AssignmentNode:tN,BlockNode:ZD,ConditionalNode:QD,ConstantNode:Ei,FunctionAssignmentNode:eN,FunctionNode:Mi,IndexNode:ms,ObjectNode:cs,OperatorNode:Ua,ParenthesisNode:mo,RangeNode:XD,RelationalNode:YD,SymbolNode:Si,config:fe,numeric:$n,typed:W}),rN=uX({ConstantNode:Ei,FunctionNode:Mi,OperatorNode:Ua,ParenthesisNode:mo,parse:aa,typed:W}),uh=nX({bignumber:sn,fraction:mu,AccessorNode:ds,ArrayNode:fs,ConstantNode:Ei,FunctionNode:Mi,IndexNode:ms,ObjectNode:cs,OperatorNode:Ua,SymbolNode:Si,config:fe,isBounded:cu,mathWithTransform:gu,matrix:we,typed:W}),Oie=FV({parse:aa,typed:W}),$ie=KQ({parse:aa,typed:W}),lh=iX({AccessorNode:ds,ArrayNode:fs,ConstantNode:Ei,FunctionNode:Mi,IndexNode:ms,ObjectNode:cs,OperatorNode:Ua,ParenthesisNode:mo,SymbolNode:Si,add:ct,divide:Fr,equal:en,isZero:zn,multiply:Dt,parse:aa,pow:na,subtract:nr,typed:W}),Hc=kV({parse:aa,typed:W}),nN=bU({evaluate:Hc}),aN=BV({evaluate:Hc,parse:aa}),Bie=zV({Parser:aN,typed:W}),Gc=eX({AccessorNode:ds,ArrayNode:fs,ConstantNode:Ei,FunctionNode:Mi,IndexNode:ms,ObjectNode:cs,OperatorNode:Ua,ParenthesisNode:mo,SymbolNode:Si,equal:en,parse:aa,replacer:hD,resolve:rN,simplifyConstant:uh,simplifyCore:lh,typed:W}),_ie=cX({OperatorNode:Ua,parse:aa,simplify:Gc,typed:W}),Iie=mX({ConstantNode:Ei,FunctionNode:Mi,OperatorNode:Ua,ParenthesisNode:mo,SymbolNode:Si,config:fe,equal:en,isZero:zn,numeric:$n,parse:aa,simplify:Gc,typed:W}),zie=oZ({Help:nN,mathWithTransform:gu,typed:W}),jie=hX({bignumber:sn,fraction:mu,AccessorNode:ds,ArrayNode:fs,ConstantNode:Ei,FunctionNode:Mi,IndexNode:ms,ObjectNode:cs,OperatorNode:Ua,ParenthesisNode:mo,SymbolNode:Si,add:ct,config:fe,divide:Fr,equal:en,isZero:zn,mathWithTransform:gu,matrix:we,multiply:Dt,parse:aa,pow:na,simplify:Gc,simplifyConstant:uh,simplifyCore:lh,subtract:nr,typed:W});tr(ls,{e:Rb,false:sre,fineStructure:ure,i:fD,Infinity:lre,LN10:cre,LOG10E:fre,NaN:mre,null:dre,phi:hre,SQRT1_2:gre,sackurTetrode:vre,tau:dD,true:yre,E:Rb,version:bre,efimovFactor:wre,LN2:xre,pi:ad,replacer:hD,reviver:Pie,SQRT2:Dre,typed:W,PI:ad,weakMixingAngle:Nre,abs:Xr,acos:Are,acot:Cre,acsc:Ere,addScalar:mr,arg:Sre,asech:Mre,asinh:Tre,atan:pD,atanh:Fre,bigint:Pre,bitNot:kre,boolean:Ore,clone:$re,combinations:Ic,complex:zc,conj:oo,cos:Hd,cot:Bre,csc:_re,cube:Ire,equalScalar:ot,erf:zre,exp:gD,expm1:jre,filter:qre,flatten:so,forEach:Rre,format:lu,getMatrixDataType:Gd,hex:Lre,im:Vd,isBounded:cu,isNaN:Ia,isNumeric:uo,isPrime:Hre,LOG2E:Gre,lgamma:Vre,log10:Ure,log2:Ud,map:Ni,mode:Wre,multiplyScalar:Xt,not:gc,number:ha,oct:Jre,pickRandom:Kre,print:Yre,random:Zre,re:Wd,sec:Qre,sign:vD,sin:jc,size:dr,splitUnit:Xre,square:ene,string:tne,subtractScalar:In,tan:rne,toBest:nne,typeOf:Jd,acosh:ane,acsch:ine,asec:one,bignumber:sn,chain:kie,combinationsWithRep:sne,cosh:une,csch:lne,dot:qc,hasNumericValue:cne,isFinite:fne,isNegative:Ai,isZero:zn,matrix:we,matrixFromFunction:mne,multiply:Dt,ones:dne,randomInt:hne,resize:pne,sech:gne,sinh:vne,sparse:yne,sqrt:ra,squeeze:bne,tanh:wne,transpose:fu,xgcd:yD,zeros:Tr,acoth:xne,asin:Dne,bin:Nne,coth:Ane,ctranspose:Kd,diag:bD,equal:en,fraction:mu,identity:Ci,isInteger:Jr,kron:Cne,mapSlices:Ks,matrixFromColumns:Yd,numeric:$n,prod:wD,reshape:xD,round:us,unaryMinus:pa,bernoulli:Ene,cbrt:DD,concat:ht,count:Sne,deepEqual:du,divideScalar:Wt,dotMultiply:Mne,floor:ND,gcd:Tne,isPositive:lo,larger:Kr,lcm:Fne,leftShift:Pne,lsolve:AD,max:Zd,mod:CD,nthRoot:kne,nullish:One,or:$ne,qr:Qd,rightArithShift:Bne,smaller:Yr,subtract:nr,to:_ne,unaryPlus:Xd,usolve:eh,xor:Ine,add:ct,atan2:zne,bitAnd:jne,bitOr:qne,bitXor:Rne,catalan:Lne,compare:co,compareText:ED,composition:Hne,cross:Gne,det:SD,diff:Vne,distance:Une,dotDivide:hu,equalText:Wne,hypot:Jne,intersect:Kne,invmod:Yne,largerEq:Rc,log:th,lsolveAll:Zne,matrixFromRows:Qne,min:Xne,nthRoots:eae,partitionSelect:Lc,rightLogShift:tae,slu:FD,subset:wn,sum:rh,trace:rae,usolveAll:kD,zpk2tf:nae,ceil:nh,compareNatural:ga,cumsum:aae,fix:OD,index:$D,inv:fo,log1p:iae,lup:BD,pinv:oae,pow:na,setCartesian:sae,setDistinct:uae,setIsSubset:lae,setPowerset:cae,smallerEq:Qo,sort:fae,sqrtm:mae,unequal:dae,and:hae,divide:Fr,expm:pae,fft:_D,freqz:gae,gamma:ah,ifft:vae,kldivergence:yae,lusolve:ID,mean:zD,median:jD,polynomialRoot:bae,quantileSeq:wae,range:Xo,row:xae,setDifference:qD,setMultiplicity:Dae,setSymDifference:RD,solveODE:Nae,vacuumImpedance:Aae,atomicMass:Cae,bohrMagneton:Eae,boltzmann:Sae,column:LD,conductanceQuantum:Mae,coulomb:Tae,createUnit:Fae,deuteronMass:Pae,eigs:HD,electronMass:kae,factorial:pu,fermiCoupling:Oae,gasConstant:$ae,gravity:Bae,klitzing:_ae,loschmidt:Iae,mad:zae,magneticFluxQuantum:jae,molarMass:qae,molarPlanckConstant:Rae,multinomial:Lae,norm:ih,permutations:Hae,planckConstant:Gae,planckMass:Vae,planckTime:Uae,reducedPlanckConstant:Wae,rotationMatrix:GD,rydberg:Jae,secondRadiation:Kae,setSize:Yae,speedOfLight:Zae,stefanBoltzmann:Qae,thomsonCrossSection:Xae,variance:oh,zeta:eie,avogadro:tie,bohrRadius:rie,corr:nie,dotPow:aie,elementaryCharge:iie,faraday:oie,hartreeEnergy:sie,inverseConductanceQuantum:uie,magneticConstant:lie,molarMassC12:cie,neutronMass:fie,parse:aa,planckCharge:mie,planckTemperature:die,quantumOfCirculation:hie,resolve:rN,setIntersect:VD,simplifyConstant:uh,std:pie,stirlingS2:UD,unit:gie,bellNumbers:vie,compile:Oie,electricConstant:yie,firstRadiation:bie,leafCount:$ie,nuclearMagneton:wie,planckLength:xie,rotate:Die,setUnion:Nie,simplifyCore:lh,wienDisplacement:Aie,classicalElectronRadius:Cie,evaluate:Hc,molarVolume:Eie,schur:WD,coulombConstant:Sie,gravitationConstant:Mie,parser:Bie,simplify:Gc,symbolicEqual:_ie,derivative:Iie,protonMass:Tie,sylvester:JD,help:zie,rationalize:jie,lyap:Fie,config:fe});tr(gu,ls,{map:ote({typed:W}),filter:Zee({typed:W}),forEach:ete({typed:W}),mapSlices:Hee({isInteger:Jr,typed:W}),and:Jte({add:ct,concat:ht,equalScalar:ot,matrix:we,not:gc,typed:W,zeros:Tr}),cumsum:Rte({add:ct,typed:W,unaryPlus:Xd}),nullish:ere({deepEqual:du,flatten:so,matrix:we,size:dr,typed:W}),print:Vte({add:ct,matrix:we,typed:W,zeros:Tr}),bitAnd:nre({add:ct,concat:ht,equalScalar:ot,matrix:we,not:gc,typed:W,zeros:Tr}),concat:Tte({isInteger:Jr,matrix:we,typed:W}),diff:Pte({bignumber:sn,matrix:we,number:ha,subtract:nr,typed:W}),max:fte({config:fe,isNaN:Ia,larger:Kr,numeric:$n,typed:W}),min:vte({config:fe,isNaN:Ia,numeric:$n,smaller:Yr,typed:W}),or:Zte({DenseMatrix:rt,concat:ht,equalScalar:ot,matrix:we,typed:W}),subset:Ete({add:ct,matrix:we,typed:W,zeros:Tr}),bitOr:ore({DenseMatrix:rt,concat:ht,equalScalar:ot,matrix:we,typed:W}),sum:_te({add:ct,config:fe,numeric:$n,typed:W}),variance:Hte({add:ct,divide:Fr,isNaN:Ia,mapSlices:Ks,multiply:Dt,subtract:nr,typed:W}),index:nte({Index:Ir,getMatrixDataType:Gd}),quantileSeq:jte({add:ct,bignumber:sn,compare:co,divide:Fr,isInteger:Jr,larger:Kr,mapSlices:Ks,multiply:Dt,partitionSelect:Lc,smaller:Yr,smallerEq:Qo,subtract:nr,typed:W}),range:wte({bignumber:sn,matrix:we,add:ct,config:fe,equal:en,isPositive:lo,isZero:zn,larger:Kr,largerEq:Rc,smaller:Yr,smallerEq:Qo,typed:W}),column:Uee({Index:Ir,matrix:we,range:Xo,typed:W}),row:Nte({Index:Ir,matrix:we,range:Xo,typed:W}),mean:hte({add:ct,divide:Fr,typed:W}),std:$te({map:Ni,sqrt:ra,typed:W,variance:oh})});tr(KD,{BigNumber:xe,Complex:kt,Fraction:Di,Matrix:_c,Node:Rr,ObjectNode:cs,OperatorNode:Ua,ParenthesisNode:mo,Range:pre,RelationalNode:YD,ResultSet:mD,ArrayNode:fs,BlockNode:ZD,ConditionalNode:QD,DenseMatrix:rt,RangeNode:XD,Chain:sh,FunctionAssignmentNode:eN,SparseMatrix:hr,ConstantNode:Ei,IndexNode:ms,FibonacciHeap:MD,ImmutableDenseMatrix:TD,Index:Ir,Spa:PD,AccessorNode:ds,AssignmentNode:tN,Unit:He,SymbolNode:Si,FunctionNode:Mi,Help:nN,Parser:aN});sh.createProxy(ls);const ch=({ref:e,onChange:t,value:r,dragDirection:n,showDragHandle:a=!0,dragScale:i,selectOnFocus:o=!0,bounds:s=ve.Iu.INFINITE,resetValue:u,variant:l="outlined",className:c,children:f,disabled:m,onBlur:d,units:h,size:p,color:y,contrast:w,...D})=>{const[v,x,g]=on.useCombinedStateAndRef(r.toString()),[b,C,N]=on.useCombinedStateAndRef(!0),A=on.useSyncedRef(r),E=cr.useCallback(()=>{if(N.current)return;C(!0);let M=null;try{const B=Hc(g.current);B instanceof He?M=B.toNumber():typeof B=="number"&&!isNaN(B)&&(M=B)}catch{M=null}M!=null?t?.(ve.Iu.clamp(s,M)):x(A.current.toString())},[t,x]),S=on.useSyncedRef(E),F=cr.useCallback(()=>{d?.(),E()},[d,E]);cr.useEffect(()=>()=>S.current?.(),[]);const k=cr.useCallback(M=>{C(!1),x(M)},[x,C]),$=b?r:v,R=cr.useCallback(M=>{C(!0),t?.(ve.Iu.clamp(s,Math.round(M)))},[t,C]);return i==null&&ve.Iu.isFinite(s)&&(i={x:ve.Iu.span(s)*.01,y:ve.Iu.span(s)*.02}),(m||l==="preview")&&(a=!1),Ne.jsxRuntimeExports.jsxs(ja.Text,{ref:e,type:"text",variant:l,value:$.toString(),onChange:k,disabled:m,selectOnFocus:o,onKeyDown:M=>{ka.eventKey(M)==="Enter"&&(E(),d?.())},onBlur:F,size:p,color:y,contrast:w,...D,children:[a&&Ne.jsxRuntimeExports.jsx(vc,{direction:n,value:r,onChange:R,dragScale:i,resetValue:u,onBlur:F,size:p,color:y,contrast:w}),f]})},qie=({location:e="left",size:t="9rem",className:r,style:n,bordered:a=!1,...i})=>{const o=ve.Mu.construct(e),s=ve.Mu.direction(o),u=ve.vu.swap(s);return Ne.jsxRuntimeExports.jsx(ir.Box$1,{className:ve.CSS(ve.CSS.B("navbar"),a&&ve.CSS.bordered(ve.Mu.swap(o)),ve.CSS.dir(u),ve.CSS.loc(o),r),direction:u,style:{[ve.vu.dimension(s)]:t,...n},align:"center",empty:!0,...i})},vu=e=>(({bordered:t=!1,className:r,...n})=>Ne.jsxRuntimeExports.jsx(ir.Box$1,{className:ve.CSS(ve.CSS.BE("navbar","content"),e==="absolute-center"?ve.CSS.M(e):ve.CSS.align(e),e!==""&&t&&ve.CSS.bordered(e),r),align:"center",...n})),iN=vu("start");iN.displayName="NavbarStart";const oN=vu("end");oN.displayName="NavbarEnd";const sN=vu("center");sN.displayName="NavbarCenter";const uN=vu("");uN.displayName="NavbarContent";const lN=vu("absolute-center");lN.displayName="NavbarAbsoluteCenter";const za=qie;za.Start=iN;za.Center=sN;za.End=oN;za.AbsoluteCenter=lN;za.Content=uN;var Kf={exports:{}},Ss={},Lb;function Rie(){if(Lb)return Ss;Lb=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,i){var o=null;if(i!==void 0&&(o=""+i),a.key!==void 0&&(o=""+a.key),"key"in a){i={};for(var s in a)s!=="key"&&(i[s]=a[s])}else i=a;return a=i.ref,{$$typeof:e,type:n,key:o,ref:a!==void 0?a:null,props:i}}return Ss.Fragment=t,Ss.jsx=r,Ss.jsxs=r,Ss}var Dl={},Hb;function Lie(){return Hb||(Hb=1,process.env.NODE_ENV!=="production"&&(function(){function e(G){if(G==null)return null;if(typeof G=="function")return G.$$typeof===S?null:G.displayName||G.name||null;if(typeof G=="string")return G;switch(G){case y:return"Fragment";case D:return"Profiler";case w:return"StrictMode";case b:return"Suspense";case C:return"SuspenseList";case E:return"Activity"}if(typeof G=="object")switch(typeof G.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),G.$$typeof){case p:return"Portal";case x:return G.displayName||"Context";case v:return(G._context.displayName||"Context")+".Consumer";case g:var V=G.render;return G=G.displayName,G||(G=V.displayName||V.name||"",G=G!==""?"ForwardRef("+G+")":"ForwardRef"),G;case N:return V=G.displayName||null,V!==null?V:e(G.type)||"Memo";case A:V=G._payload,G=G._init;try{return e(G(V))}catch{}}return null}function t(G){return""+G}function r(G){try{t(G);var V=!1}catch{V=!0}if(V){V=console;var P=V.error,Q=typeof Symbol=="function"&&Symbol.toStringTag&&G[Symbol.toStringTag]||G.constructor.name||"Object";return P.call(V,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",Q),t(G)}}function n(G){if(G===y)return"<>";if(typeof G=="object"&&G!==null&&G.$$typeof===A)return"<...>";try{var V=e(G);return V?"<"+V+">":"<...>"}catch{return"<...>"}}function a(){var G=F.A;return G===null?null:G.getOwner()}function i(){return Error("react-stack-top-frame")}function o(G){if(k.call(G,"key")){var V=Object.getOwnPropertyDescriptor(G,"key").get;if(V&&V.isReactWarning)return!1}return G.key!==void 0}function s(G,V){function P(){M||(M=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",V))}P.isReactWarning=!0,Object.defineProperty(G,"key",{get:P,configurable:!0})}function u(){var G=e(this.type);return B[G]||(B[G]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),G=this.props.ref,G!==void 0?G:null}function l(G,V,P,Q,z,oe){var ne=P.ref;return G={$$typeof:h,type:G,key:V,props:P,_owner:Q},(ne!==void 0?ne:null)!==null?Object.defineProperty(G,"ref",{enumerable:!1,get:u}):Object.defineProperty(G,"ref",{enumerable:!1,value:null}),G._store={},Object.defineProperty(G._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(G,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(G,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:z}),Object.defineProperty(G,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:oe}),Object.freeze&&(Object.freeze(G.props),Object.freeze(G)),G}function c(G,V,P,Q,z,oe){var ne=V.children;if(ne!==void 0)if(Q)if($(ne)){for(Q=0;Q<ne.length;Q++)f(ne[Q]);Object.freeze&&Object.freeze(ne)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else f(ne);if(k.call(V,"key")){ne=e(G);var U=Object.keys(V).filter(function(J){return J!=="key"});Q=0<U.length?"{key: someKey, "+U.join(": ..., ")+": ...}":"{key: someKey}",Z[ne+Q]||(U=0<U.length?"{"+U.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
80
+ let props = %s;
81
+ <%s {...props} />
82
+ React keys must be passed directly to JSX without using spread:
83
+ let props = %s;
84
+ <%s key={someKey} {...props} />`,Q,ne,U,ne),Z[ne+Q]=!0)}if(ne=null,P!==void 0&&(r(P),ne=""+P),o(V)&&(r(V.key),ne=""+V.key),"key"in V){P={};for(var _ in V)_!=="key"&&(P[_]=V[_])}else P=V;return ne&&s(P,typeof G=="function"?G.displayName||G.name||"Unknown":G),l(G,ne,P,a(),z,oe)}function f(G){m(G)?G._store&&(G._store.validated=1):typeof G=="object"&&G!==null&&G.$$typeof===A&&(G._payload.status==="fulfilled"?m(G._payload.value)&&G._payload.value._store&&(G._payload.value._store.validated=1):G._store&&(G._store.validated=1))}function m(G){return typeof G=="object"&&G!==null&&G.$$typeof===h}var d=cr,h=Symbol.for("react.transitional.element"),p=Symbol.for("react.portal"),y=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),v=Symbol.for("react.consumer"),x=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),S=Symbol.for("react.client.reference"),F=d.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=Object.prototype.hasOwnProperty,$=Array.isArray,R=console.createTask?console.createTask:function(){return null};d={react_stack_bottom_frame:function(G){return G()}};var M,B={},L=d.react_stack_bottom_frame.bind(d,i)(),j=R(n(i)),Z={};Dl.Fragment=y,Dl.jsx=function(G,V,P){var Q=1e4>F.recentlyCreatedOwnerStacks++;return c(G,V,P,!1,Q?Error("react-stack-top-frame"):L,Q?R(n(G)):j)},Dl.jsxs=function(G,V,P){var Q=1e4>F.recentlyCreatedOwnerStacks++;return c(G,V,P,!0,Q?Error("react-stack-top-frame"):L,Q?R(n(G)):j)}})()),Dl}var Gb;function Hie(){return Gb||(Gb=1,process.env.NODE_ENV==="production"?Kf.exports=Rie():Kf.exports=Lie()),Kf.exports}var yt=Hie();function cN(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=cN(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Gie(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=cN(e))&&(n&&(n+=" "),n+=t);return n}const Vie=e=>yt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 189.34",...e,children:[yt.jsxs("defs",{children:[yt.jsxs("linearGradient",{id:"synnax-linear-gradient",x1:"-2.63",y1:"56.85",x2:"167.19",y2:"157.88",gradientUnits:"userSpaceOnUse",children:[yt.jsx("stop",{offset:"0",stopColor:"#10007f"}),yt.jsx("stop",{offset:"1",stopColor:"#0084e9"})]}),yt.jsxs("filter",{id:"fillpartial",primitiveUnits:"objectBoundingBox",x:"0%",y:"0%",width:"100%",height:"100%",children:[yt.jsx("feFlood",{x:"0%",y:"0%",width:"100%",height:"100%"}),yt.jsx("feOffset",{dy:"0.5",children:yt.jsx("animate",{attributeName:"dy",from:"1",to:"0",dur:"1s",repeatCount:"indefinite"})}),yt.jsx("feComposite",{operator:"in",in2:"SourceGraphic"}),yt.jsx("feComposite",{operator:"over",in2:"SourceGraphic"})]})]}),yt.jsx("g",{id:"Layer_2","data-name":"Layer 2",children:yt.jsx("g",{id:"Layer_1-2","data-name":"Layer 1",children:yt.jsx("path",{filter:"url(#fillpartial)",stroke:"black",strokeWidth:"1",className:"cls-1",d:"M52.61,168.82A14.81,14.81,0,0,1,39.78,146.6L94.22,52.33c5.7-9.88,20-9.88,25.9.42l51.77,89.67a6.88,6.88,0,0,0,2.48,2.49l15.42,8.9a6.78,6.78,0,0,0,9.26-9.27L119.87,7.41a14.8,14.8,0,0,0-25.65,0L2,167.12a14.81,14.81,0,0,0,12.83,22.22H170.39a6.79,6.79,0,0,0,3.39-12.66l-12.05-7a6.83,6.83,0,0,0-3.39-.91Z"})})})]}),Uie=e=>yt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 189.34",...e,children:[yt.jsx("defs",{children:yt.jsxs("linearGradient",{id:"synnax-linear-gradient",x1:"-2.63",y1:"56.85",x2:"167.19",y2:"157.88",gradientUnits:"userSpaceOnUse",children:[yt.jsx("stop",{offset:"0",stopColor:"#10007f"}),yt.jsx("stop",{offset:"1",stopColor:"#0084e9"})]})}),yt.jsx("g",{id:"Layer_2","data-name":"Layer 2",children:yt.jsx("g",{id:"Layer_1-2","data-name":"Layer 1",children:yt.jsx("path",{className:"cls-1",vectorEffect:"non-scaling-stroke",d:"M52.61,168.82A14.81,14.81,0,0,1,39.78,146.6L94.22,52.33c5.7-9.88,20-9.88,25.9.42l51.77,89.67a6.88,6.88,0,0,0,2.48,2.49l15.42,8.9a6.78,6.78,0,0,0,9.26-9.27L119.87,7.41a14.8,14.8,0,0,0-25.65,0L2,167.12a14.81,14.81,0,0,0,12.83,22.22H170.39a6.79,6.79,0,0,0,3.39-12.66l-12.05-7a6.83,6.83,0,0,0-3.39-.91Z"})})})]}),Wie=e=>yt.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1050 285",...e,children:[yt.jsx("defs",{children:yt.jsxs("linearGradient",{id:"synnax-linear-gradient",x1:"-2.64",y1:"16561.34",x2:"167.18",y2:"16460.3",gradientTransform:"matrix(1, 0, 0, -1, 0, 16643.76)",gradientUnits:"userSpaceOnUse",children:[yt.jsx("stop",{offset:"0",stopColor:"#10007f"}),yt.jsx("stop",{offset:"1",stopColor:"#0084e9"})]})}),yt.jsxs("g",{id:"Layer_2","data-name":"Layer 2",children:[yt.jsx("path",{d:"M52.6,194.4a14.81,14.81,0,0,1-12.83-22.22L94.21,77.91c5.7-9.88,20-9.88,25.9.42L171.88,168a6.78,6.78,0,0,0,2.48,2.48l15.42,8.91a6.78,6.78,0,0,0,9.26-9.27L119.86,33a14.8,14.8,0,0,0-25.65,0L2,192.69a14.81,14.81,0,0,0,12.83,22.22H170.38a6.78,6.78,0,0,0,3.39-12.65l-12.05-6.95a6.73,6.73,0,0,0-3.39-.91Z"}),yt.jsx("text",{transform:"translate(208.99 215.58)",children:"Synnax"})]})]}),Jie={icon:Uie,title:Wie,loader:Vie},fN=({variant:e="icon",color:t="auto",className:r,...n})=>{const a=Jie[e];return yt.jsx(a,{className:Gie("synnax-logo",`synnax-logo--${t}`,`synnax-logo--${e}`,r),...n})},Kie=({children:e,...t})=>yt.jsxs("div",{className:"synnax-logo-watermark__container",children:[yt.jsx(fN,{className:"synnax-logo-watermark",...t}),e]}),mN=fN;mN.Watermark=Kie;const Yie=({value:e,onChange:t,onBlur:r,onlyChangeOnBlur:n,variant:a,...i})=>{const[o,s]=cr.useState(null),u=(h,p=!1)=>{const y=h.toString();if(s(y),!(typeof h=="string")){t(Number(h)),s(null);return}const D=new ve.d(y,"local");(!n||p)&&(t(Number(D.valueOf())),s(null))},l=h=>{u(h.target.value,!0),s(null),r?.(h)},c=new ve.d(e,"UTC"),f=c.toString("ISO","local").slice(0,-1),[m,d]=cr.useState(!1);return Ne.jsxRuntimeExports.jsxs(Ub.Frame,{visible:m,variant:"modal",zIndex:500,onVisibleChange:d,children:[Ne.jsxRuntimeExports.jsx(ja.Text,{className:ve.CSS.BE("input","datetime"),variant:a,type:"datetime-local",onBlur:l,required:!1,value:o??f,onChange:u,step:1e-5,...i,children:Ne.jsxRuntimeExports.jsx(Pn.Button,{onClick:()=>d(!m),variant:a,children:Ne.jsxRuntimeExports.jsx(ka.Calendar,{})})}),Ne.jsxRuntimeExports.jsx(Xie,{value:c,onChange:h=>t(Number(h.valueOf()))})]})},Zie=tt.extend(U6),Qie=["Control","Enter"],Xie=({value:e,onChange:t})=>{const{close:r}=Ub.useContext();return Ne.jsxRuntimeExports.jsx(HN.Dialog,{children:Ne.jsxRuntimeExports.jsxs(ir.Box$1,{className:ve.CSS.B("datetime-modal"),empty:!0,children:[Ne.jsxRuntimeExports.jsxs(ir.Box$1,{className:ve.CSS.B("datetime-modal-container"),children:[Ne.jsxRuntimeExports.jsx(ir.Box$1,{x:!0,className:ve.CSS.B("header"),children:Ne.jsxRuntimeExports.jsx(Wb,{level:"h3",format:"preciseDate",children:e})}),Ne.jsxRuntimeExports.jsx(Pn.Button,{variant:"text",className:ve.CSS.B("close-btn"),onClick:r,children:Ne.jsxRuntimeExports.jsx(ka.Close,{})}),Ne.jsxRuntimeExports.jsxs(ir.Box$1,{x:!0,className:ve.CSS.B("content"),children:[Ne.jsxRuntimeExports.jsx(roe,{value:e,onChange:t,close:r}),Ne.jsxRuntimeExports.jsx(noe,{value:e,onChange:t})]})]}),Ne.jsxRuntimeExports.jsxs(za,{location:"bottom",size:"7rem",children:[Ne.jsxRuntimeExports.jsxs(za.Start,{gap:"small",children:[Ne.jsxRuntimeExports.jsx(ka.Text,{level:"small",trigger:Qie}),Ne.jsxRuntimeExports.jsx(on.Text,{level:"small",children:"To Finish"})]}),Ne.jsxRuntimeExports.jsx(za.End,{children:Ne.jsxRuntimeExports.jsx(Pn.Button,{onClick:r,variant:"outlined",children:"Done"})})]})]})})},eoe=e=>{const t=Il.useItem(e.key);return Ne.jsxRuntimeExports.jsx(Il.Item,{...e,children:Ne.jsxRuntimeExports.jsx(on.Text,{children:t?.name})})},toe=Pn.renderProp(eoe),roe=({value:e,onChange:t,close:r})=>{const[n,a]=cr.useState(""),[i,o]=cr.useState([]),{data:s,getItem:u}=GN.useStaticData({data:i}),l=f=>{const m=Zie(f),d=m.dates().get(),h=[];h.push(...d.map(y=>{const w=new ve.d(y.start);return{key:y.start,name:w.toString("preciseDate","local"),onSelect:()=>{t(w),r()}}})),o(h);const p=m.durations().get();h.push(...p.map(y=>{let w=new ve.g(0);y.hour!=null&&(w=w.add(ve.g.hours(y.hour))),y.minute!=null&&(w=w.add(ve.g.minutes(y.minute))),y.second!=null&&(w=w.add(ve.g.seconds(y.second))),y.millisecond!=null&&(w=w.add(ve.g.milliseconds(y.millisecond)));const D=e.add(w);return{key:D.valueOf().toString(),name:D.toString("preciseDate","local"),onSelect:()=>{t(D),r()}}})),a(f)},c=f=>{const m=i.find(d=>d.key===f);m&&m.onSelect(),a(""),o([])};return Ne.jsxRuntimeExports.jsxs(ir.Box$1,{pack:!0,y:!0,className:ve.CSS.B("ai-selector"),background:1,full:"y",children:[Ne.jsxRuntimeExports.jsx(ja.Text,{value:n,onChange:l,autoFocus:!0,placeholder:"AI Suggestion",full:"x"}),Ne.jsxRuntimeExports.jsx(ja.Frame,{data:s,allowNone:!0,onChange:c,getItem:u,children:Ne.jsxRuntimeExports.jsx(Il.Items,{className:ve.CSS.B("ai-list"),bordered:!0,borderColor:5,full:"y",emptyContent:Ne.jsxRuntimeExports.jsx(ir.Box$1,{empty:!0,grow:!0,align:"center",justify:"center",children:Ne.jsxRuntimeExports.jsxs(ir.Box$1,{y:!0,gap:"tiny",children:[Ne.jsxRuntimeExports.jsx(on.Text,{level:"small",color:"var(--pluto-gray-l7)",children:'"April 1 at 2PM"'}),Ne.jsxRuntimeExports.jsx(on.Text,{level:"small",color:"var(--pluto-gray-l7)",children:'"Add 2 two hours"'}),Ne.jsxRuntimeExports.jsx(on.Text,{level:"small",color:"var(--pluto-gray-l7)",children:'"Next Friday"'})]})}),children:toe})})]})},Vb=[{name:"January",days:31},{name:"February",days:28},{name:"March",days:31},{name:"April",days:30},{name:"May",days:31},{name:"June",days:30},{name:"July",days:31},{name:"August",days:31},{name:"September",days:30},{name:"October",days:31},{name:"November",days:30},{name:"December",days:31}],noe=({value:e,onChange:t})=>{const r=e.month,n=e.year,a=e.day,i=u=>t(e.setMonth(u)),o=u=>t(e.setYear(u)),s=u=>t(e.setDay(u));return Ne.jsxRuntimeExports.jsxs(ir.Box$1,{pack:!0,x:!0,className:ve.CSS.B("datetime-picker"),rounded:!0,children:[Ne.jsxRuntimeExports.jsxs(ir.Box$1,{pack:!0,y:!0,align:"stretch",className:ve.CSS.B("calendar"),children:[Ne.jsxRuntimeExports.jsxs(ir.Box$1,{pack:!0,x:!0,grow:!0,className:ve.CSS.B("calendar-header"),children:[Ne.jsxRuntimeExports.jsx(Pn.Button,{onClick:()=>i(r-1),variant:"outlined",children:Ne.jsxRuntimeExports.jsx(ka.Caret.Left,{})}),Ne.jsxRuntimeExports.jsx(on.Text,{level:"small",style:{flexGrow:1,paddingLeft:"1rem"},className:ve.CSS.BE("calendar-header","month"),children:Vb[r].name}),Ne.jsxRuntimeExports.jsx(Pn.Button,{onClick:()=>i(r+1),style:{borderTopRightRadius:0},variant:"outlined",children:Ne.jsxRuntimeExports.jsx(ka.Caret.Right,{})})]}),Ne.jsxRuntimeExports.jsxs(ir.Box$1,{pack:!0,x:!0,grow:!0,sharp:!0,children:[Ne.jsxRuntimeExports.jsx(Pn.Button,{onClick:()=>o(n-1),variant:"outlined",children:Ne.jsxRuntimeExports.jsx(ka.Caret.Left,{})}),Ne.jsxRuntimeExports.jsx(on.Text,{level:"small",style:{flexGrow:1,paddingLeft:"1rem"},children:n}),Ne.jsxRuntimeExports.jsx(Pn.Button,{onClick:()=>o(n+1),variant:"outlined",children:Ne.jsxRuntimeExports.jsx(ka.Caret.Right,{})})]}),Ne.jsxRuntimeExports.jsx(ir.Box$1,{x:!0,wrap:!0,gap:"tiny",style:{padding:"0.5rem",height:"100%"},children:Array.from({length:Vb[r].days}).map((u,l)=>Ne.jsxRuntimeExports.jsx(Pn.Button,{variant:l+1===a?"outlined":"text",onClick:()=>s(l+1),square:!0,children:Ne.jsxRuntimeExports.jsx(on.Text,{level:"small",children:l+1})},l))})]}),Ne.jsxRuntimeExports.jsx(coe,{value:e,onChange:t})]})},aoe={padding:"0rem",paddingLeft:"2rem",height:"4rem",minHeight:"4rem",maxHeight:"4rem"},ioe=e=>Ne.jsxRuntimeExports.jsx(ja.ListItem,{...e,style:aoe,children:e.index}),ooe=Pn.renderProp(ioe),fh=e=>{const t=Array.from({length:e},(n,a)=>a),r=({value:n,onChange:a})=>Ne.jsxRuntimeExports.jsx(ja.Frame,{data:t,value:n,onChange:a,children:Ne.jsxRuntimeExports.jsx(Il.Items,{className:ve.CSS.B("time-list"),children:ooe})});return r.displayName="TimeList",r},soe=fh(24),uoe=fh(60),loe=fh(60),coe=({value:e,onChange:t})=>Ne.jsxRuntimeExports.jsxs(ir.Box$1,{pack:!0,y:!0,className:ve.CSS.B("time-selector"),children:[Ne.jsxRuntimeExports.jsxs(ir.Box$1,{pack:!0,x:!0,grow:!0,className:ve.CSS.B("time-selector-list"),children:[Ne.jsxRuntimeExports.jsx(soe,{value:e.hour,onChange:r=>t(e.setHour(r))}),Ne.jsxRuntimeExports.jsx(uoe,{value:e.minute,onChange:r=>t(e.setMinute(r))}),Ne.jsxRuntimeExports.jsx(loe,{value:e.second,onChange:r=>t(e.setSecond(r))})]}),Ne.jsxRuntimeExports.jsx(ch,{size:"small",value:e.millisecond,onChange:r=>t(e.setMillisecond(r)),endContent:"ms",showDragHandle:!1,borderColor:5})]}),id=({className:e,variant:t,...r})=>Ne.jsxRuntimeExports.jsx(on.Text,{className:ve.CSS(ve.CSS.B("input-help-text"),e),color:8,status:ve.ol.removeVariants(t,"success"),level:"small",...r}),dN=({className:e,required:t=!1,children:r,...n})=>Ne.jsxRuntimeExports.jsxs("label",{className:ve.CSS(ve.CSS.B("input-label"),e),...n,children:[r," ",t&&Ne.jsxRuntimeExports.jsx("span",{className:ve.CSS.B("required-indicator"),children:"*"})]}),foe=(e,t="y")=>e??(ve.vu.construct(t)==="y"?"stretch":"center"),hN=({label:e,showLabel:t=!0,helpText:r,direction:n,x:a,y:i,className:o,children:s,required:u,align:l,gap:c="small",padHelpText:f=!1,status:m,showHelpText:d=!0,...h})=>{const p=ir.parseDirection(n,a,i,!1);let y;const w=d&&r!=null&&r.length>0,D=t&&e!=null&&e.length>0;return!w&&!D?s:(p==="x"?y=Ne.jsxRuntimeExports.jsxs(ir.Box$1,{y:!0,gap:"small",children:[s,d&&(f||r!=null&&r.length>0)&&Ne.jsxRuntimeExports.jsx(id,{variant:m,children:r})]}):y=Ne.jsxRuntimeExports.jsxs(ir.Box$1,{y:!0,gap:1/3,align:"stretch",children:[s,(f||r!=null&&r.length>0)&&Ne.jsxRuntimeExports.jsx(id,{variant:m,children:r})]}),Ne.jsxRuntimeExports.jsxs(ir.Box$1,{className:ve.CSS(ve.CSS.BE("input","item"),o),direction:p,gap:c,align:foe(l,p),...h,children:[D&&Ne.jsxRuntimeExports.jsx(dN,{required:u,children:e}),y]}))},pN=e=>Ne.jsxRuntimeExports.jsx(Jb,{...e,inputType:"switch"}),moe=(e,t)=>new ve.d(e).add(t).sub(ve.d.utcOffset),doe={x:Number(ve.g.SECOND.valueOf())*.5,y:Number(ve.g.MINUTE.valueOf())},gN=({value:e,onChange:t,tzInfo:r})=>{const n=new ve.d(e,"UTC"),a=n.sub(ve.d.utcOffset);if(a.after(ve.d.DAY)){const s=a.remainder(ve.d.DAY);t(Number(new ve.d(s,"local").valueOf()))}const i=cr.useCallback(s=>{let u;if(typeof s=="number")u=new ve.d(s,"UTC");else{if(s.length===0)return;u=new ve.d(s,"local")}t(Number(u.valueOf()))},[t,r]);return{inputValue:n.toString("time",r),ts:n,handleChange:i}},hoe=({ref:e,size:t,value:r,tzInfo:n="local",onChange:a,dragDirection:i,showDragHandle:o=!0,className:s,children:u,...l})=>{const{inputValue:c,ts:f,handleChange:m}=gN({value:r,onChange:a,tzInfo:n});return Ne.jsxRuntimeExports.jsxs(ja.Text,{ref:e,value:c,className:ve.CSS(ve.CSS.B("input-time"),s),type:"time",step:"1",onChange:m,...l,children:[o&&Ne.jsxRuntimeExports.jsx(vc,{direction:i,value:Number(f.valueOf()),onChange:m,dragScale:doe}),u]})},poe=Object.freeze(Object.defineProperty({__proto__:null,Checkbox:UN,Date:JN,DateTime:Yie,DragButton:vc,HelpText:id,Item:hN,Label:dN,Numeric:ch,Switch:pN,Text:ja.Text,Time:hoe,combineDateAndTimeValue:moe,useDate:Zb,useTime:gN},Symbol.toStringTag,{value:"Module"}));exports.Bar=za;exports.Item=hN;exports.Numeric=ch;exports.Switch=pN;exports.TimeStamp=Wb;exports.de=mN;exports.external=poe;