@nubjs/nub-linux-x64 0.0.5 → 0.0.8

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 (375) hide show
  1. package/bin/nub +0 -0
  2. package/package.json +1 -1
  3. package/runtime/addons/nub-native.node +0 -0
  4. package/runtime/cache-evict.mjs +69 -0
  5. package/runtime/node_modules/@js-temporal/polyfill/CHANGELOG.md +453 -0
  6. package/runtime/node_modules/@js-temporal/polyfill/LICENSE +13 -0
  7. package/runtime/node_modules/@js-temporal/polyfill/README.md +90 -0
  8. package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs +2 -0
  9. package/runtime/node_modules/@js-temporal/polyfill/dist/index.cjs.map +1 -0
  10. package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js +2 -0
  11. package/runtime/node_modules/@js-temporal/polyfill/dist/index.esm.js.map +1 -0
  12. package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js +2 -0
  13. package/runtime/node_modules/@js-temporal/polyfill/dist/index.umd.js.map +1 -0
  14. package/runtime/node_modules/@js-temporal/polyfill/index.d.cts +1215 -0
  15. package/runtime/node_modules/@js-temporal/polyfill/index.d.ts +1215 -0
  16. package/runtime/node_modules/@js-temporal/polyfill/lib/assert.ts +8 -0
  17. package/runtime/node_modules/@js-temporal/polyfill/lib/bigintmath.ts +39 -0
  18. package/runtime/node_modules/@js-temporal/polyfill/lib/calendar.ts +2424 -0
  19. package/runtime/node_modules/@js-temporal/polyfill/lib/debug.ts +7 -0
  20. package/runtime/node_modules/@js-temporal/polyfill/lib/duration.ts +438 -0
  21. package/runtime/node_modules/@js-temporal/polyfill/lib/durationformat.d.ts +93 -0
  22. package/runtime/node_modules/@js-temporal/polyfill/lib/ecmascript.ts +4973 -0
  23. package/runtime/node_modules/@js-temporal/polyfill/lib/index.ts +34 -0
  24. package/runtime/node_modules/@js-temporal/polyfill/lib/init.ts +43 -0
  25. package/runtime/node_modules/@js-temporal/polyfill/lib/instant.ts +138 -0
  26. package/runtime/node_modules/@js-temporal/polyfill/lib/internaltypes.d.ts +242 -0
  27. package/runtime/node_modules/@js-temporal/polyfill/lib/intl.ts +758 -0
  28. package/runtime/node_modules/@js-temporal/polyfill/lib/intrinsicclass.ts +162 -0
  29. package/runtime/node_modules/@js-temporal/polyfill/lib/legacydate.ts +17 -0
  30. package/runtime/node_modules/@js-temporal/polyfill/lib/math.ts +96 -0
  31. package/runtime/node_modules/@js-temporal/polyfill/lib/now.ts +48 -0
  32. package/runtime/node_modules/@js-temporal/polyfill/lib/plaindate.ts +212 -0
  33. package/runtime/node_modules/@js-temporal/polyfill/lib/plaindatetime.ts +274 -0
  34. package/runtime/node_modules/@js-temporal/polyfill/lib/plainmonthday.ts +110 -0
  35. package/runtime/node_modules/@js-temporal/polyfill/lib/plaintime.ts +154 -0
  36. package/runtime/node_modules/@js-temporal/polyfill/lib/plainyearmonth.ts +157 -0
  37. package/runtime/node_modules/@js-temporal/polyfill/lib/regex.ts +59 -0
  38. package/runtime/node_modules/@js-temporal/polyfill/lib/slots.ts +341 -0
  39. package/runtime/node_modules/@js-temporal/polyfill/lib/temporal.ts +10 -0
  40. package/runtime/node_modules/@js-temporal/polyfill/lib/timeduration.ts +149 -0
  41. package/runtime/node_modules/@js-temporal/polyfill/lib/zoneddatetime.ts +492 -0
  42. package/runtime/node_modules/@js-temporal/polyfill/package.json +143 -0
  43. package/runtime/node_modules/@oxc-parser/binding-linux-x64-gnu/README.md +3 -0
  44. package/runtime/node_modules/@oxc-parser/binding-linux-x64-gnu/package.json +42 -0
  45. package/runtime/node_modules/@oxc-parser/binding-linux-x64-gnu/parser.linux-x64-gnu.node +0 -0
  46. package/runtime/node_modules/@oxc-project/runtime/CHANGELOG.md +88 -0
  47. package/runtime/node_modules/@oxc-project/runtime/LICENSE +22 -0
  48. package/runtime/node_modules/@oxc-project/runtime/README.md +5 -0
  49. package/runtime/node_modules/@oxc-project/runtime/package.json +1066 -0
  50. package/runtime/node_modules/@oxc-project/runtime/src/helpers/AwaitValue.js +4 -0
  51. package/runtime/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js +4 -0
  52. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecoratedDescriptor.js +9 -0
  53. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs.js +236 -0
  54. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203.js +184 -0
  55. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2203R.js +191 -0
  56. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2301.js +222 -0
  57. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2305.js +133 -0
  58. package/runtime/node_modules/@oxc-project/runtime/src/helpers/applyDecs2311.js +124 -0
  59. package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayLikeToArray.js +6 -0
  60. package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithHoles.js +4 -0
  61. package/runtime/node_modules/@oxc-project/runtime/src/helpers/arrayWithoutHoles.js +5 -0
  62. package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertClassBrand.js +5 -0
  63. package/runtime/node_modules/@oxc-project/runtime/src/helpers/assertThisInitialized.js +5 -0
  64. package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncGeneratorDelegate.js +24 -0
  65. package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js +45 -0
  66. package/runtime/node_modules/@oxc-project/runtime/src/helpers/asyncToGenerator.js +26 -0
  67. package/runtime/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js +5 -0
  68. package/runtime/node_modules/@oxc-project/runtime/src/helpers/callSuper.js +7 -0
  69. package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkInRHS.js +6 -0
  70. package/runtime/node_modules/@oxc-project/runtime/src/helpers/checkPrivateRedeclaration.js +4 -0
  71. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorDestructureSet.js +10 -0
  72. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorGet.js +4 -0
  73. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classApplyDescriptorSet.js +7 -0
  74. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCallCheck.js +4 -0
  75. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticAccess.js +5 -0
  76. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classCheckPrivateStaticFieldDescriptor.js +4 -0
  77. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classExtractFieldDescriptor.js +5 -0
  78. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classNameTDZError.js +4 -0
  79. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldDestructureSet.js +7 -0
  80. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet.js +7 -0
  81. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldGet2.js +5 -0
  82. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldInitSpec.js +5 -0
  83. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseBase.js +5 -0
  84. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldLooseKey.js +5 -0
  85. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet.js +7 -0
  86. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateFieldSet2.js +5 -0
  87. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateGetter.js +5 -0
  88. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodGet.js +5 -0
  89. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodInitSpec.js +5 -0
  90. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateMethodSet.js +4 -0
  91. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classPrivateSetter.js +5 -0
  92. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldDestructureSet.js +7 -0
  93. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecGet.js +7 -0
  94. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateFieldSpecSet.js +7 -0
  95. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodGet.js +5 -0
  96. package/runtime/node_modules/@oxc-project/runtime/src/helpers/classStaticPrivateMethodSet.js +4 -0
  97. package/runtime/node_modules/@oxc-project/runtime/src/helpers/construct.js +10 -0
  98. package/runtime/node_modules/@oxc-project/runtime/src/helpers/createClass.js +13 -0
  99. package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelper.js +50 -0
  100. package/runtime/node_modules/@oxc-project/runtime/src/helpers/createForOfIteratorHelperLoose.js +19 -0
  101. package/runtime/node_modules/@oxc-project/runtime/src/helpers/createSuper.js +16 -0
  102. package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorate.js +23 -0
  103. package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateMetadata.js +9 -0
  104. package/runtime/node_modules/@oxc-project/runtime/src/helpers/decorateParam.js +11 -0
  105. package/runtime/node_modules/@oxc-project/runtime/src/helpers/defaults.js +9 -0
  106. package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineAccessor.js +8 -0
  107. package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineEnumerableProperties.js +12 -0
  108. package/runtime/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js +10 -0
  109. package/runtime/node_modules/@oxc-project/runtime/src/helpers/dispose.js +28 -0
  110. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/AwaitValue.js +4 -0
  111. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/OverloadYield.js +4 -0
  112. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecoratedDescriptor.js +9 -0
  113. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs.js +236 -0
  114. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203.js +184 -0
  115. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2203R.js +191 -0
  116. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2301.js +222 -0
  117. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2305.js +133 -0
  118. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/applyDecs2311.js +124 -0
  119. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayLikeToArray.js +6 -0
  120. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithHoles.js +4 -0
  121. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/arrayWithoutHoles.js +5 -0
  122. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertClassBrand.js +5 -0
  123. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/assertThisInitialized.js +5 -0
  124. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncGeneratorDelegate.js +24 -0
  125. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncIterator.js +45 -0
  126. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/asyncToGenerator.js +26 -0
  127. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/awaitAsyncGenerator.js +5 -0
  128. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/callSuper.js +7 -0
  129. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkInRHS.js +6 -0
  130. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/checkPrivateRedeclaration.js +4 -0
  131. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorDestructureSet.js +10 -0
  132. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorGet.js +4 -0
  133. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classApplyDescriptorSet.js +7 -0
  134. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCallCheck.js +4 -0
  135. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticAccess.js +5 -0
  136. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classCheckPrivateStaticFieldDescriptor.js +4 -0
  137. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classExtractFieldDescriptor.js +5 -0
  138. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classNameTDZError.js +4 -0
  139. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldDestructureSet.js +7 -0
  140. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet.js +7 -0
  141. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldGet2.js +5 -0
  142. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldInitSpec.js +5 -0
  143. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseBase.js +5 -0
  144. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldLooseKey.js +5 -0
  145. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet.js +7 -0
  146. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateFieldSet2.js +5 -0
  147. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateGetter.js +5 -0
  148. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodGet.js +5 -0
  149. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodInitSpec.js +5 -0
  150. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateMethodSet.js +4 -0
  151. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classPrivateSetter.js +5 -0
  152. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldDestructureSet.js +7 -0
  153. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecGet.js +7 -0
  154. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateFieldSpecSet.js +7 -0
  155. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodGet.js +5 -0
  156. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/classStaticPrivateMethodSet.js +4 -0
  157. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/construct.js +10 -0
  158. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createClass.js +13 -0
  159. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelper.js +50 -0
  160. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createForOfIteratorHelperLoose.js +19 -0
  161. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/createSuper.js +16 -0
  162. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorate.js +21 -0
  163. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateMetadata.js +7 -0
  164. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/decorateParam.js +9 -0
  165. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defaults.js +9 -0
  166. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineAccessor.js +8 -0
  167. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineEnumerableProperties.js +12 -0
  168. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/defineProperty.js +10 -0
  169. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/dispose.js +28 -0
  170. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/extends.js +10 -0
  171. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/get.js +11 -0
  172. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/getPrototypeOf.js +6 -0
  173. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/identity.js +4 -0
  174. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/importDeferProxy.js +27 -0
  175. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inherits.js +14 -0
  176. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/inheritsLoose.js +5 -0
  177. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerDefineProperty.js +9 -0
  178. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/initializerWarningHelper.js +4 -0
  179. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/instanceof.js +4 -0
  180. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireDefault.js +6 -0
  181. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/interopRequireWildcard.js +27 -0
  182. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeFunction.js +8 -0
  183. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/isNativeReflectConstruct.js +9 -0
  184. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArray.js +4 -0
  185. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/iterableToArrayLimit.js +28 -0
  186. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/jsx.js +22 -0
  187. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/maybeArrayLike.js +9 -0
  188. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/newArrowCheck.js +4 -0
  189. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableRest.js +4 -0
  190. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nonIterableSpread.js +4 -0
  191. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/nullishReceiverError.js +4 -0
  192. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectDestructuringEmpty.js +4 -0
  193. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread.js +14 -0
  194. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectSpread2.js +23 -0
  195. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutProperties.js +13 -0
  196. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/objectWithoutPropertiesLoose.js +10 -0
  197. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/package.json +3 -0
  198. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/possibleConstructorReturn.js +8 -0
  199. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/readOnlyError.js +4 -0
  200. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/regeneratorRuntime.js +304 -0
  201. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/set.js +22 -0
  202. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setFunctionName.js +12 -0
  203. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/setPrototypeOf.js +6 -0
  204. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/skipFirstGeneratorNext.js +7 -0
  205. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/slicedToArray.js +8 -0
  206. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropBase.js +6 -0
  207. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropGet.js +9 -0
  208. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/superPropSet.js +6 -0
  209. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteral.js +8 -0
  210. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/taggedTemplateLiteralLoose.js +4 -0
  211. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/tdz.js +4 -0
  212. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalRef.js +6 -0
  213. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/temporalUndefined.js +2 -0
  214. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toArray.js +8 -0
  215. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toConsumableArray.js +8 -0
  216. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPrimitive.js +12 -0
  217. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toPropertyKey.js +7 -0
  218. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/toSetter.js +10 -0
  219. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/typeof.js +10 -0
  220. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/unsupportedIterableToArray.js +9 -0
  221. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/using.js +12 -0
  222. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/usingCtx.js +59 -0
  223. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapAsyncGenerator.js +69 -0
  224. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapNativeSuper.js +27 -0
  225. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/wrapRegExp.js +51 -0
  226. package/runtime/node_modules/@oxc-project/runtime/src/helpers/esm/writeOnlyError.js +4 -0
  227. package/runtime/node_modules/@oxc-project/runtime/src/helpers/extends.js +10 -0
  228. package/runtime/node_modules/@oxc-project/runtime/src/helpers/get.js +11 -0
  229. package/runtime/node_modules/@oxc-project/runtime/src/helpers/getPrototypeOf.js +6 -0
  230. package/runtime/node_modules/@oxc-project/runtime/src/helpers/identity.js +4 -0
  231. package/runtime/node_modules/@oxc-project/runtime/src/helpers/importDeferProxy.js +27 -0
  232. package/runtime/node_modules/@oxc-project/runtime/src/helpers/inherits.js +14 -0
  233. package/runtime/node_modules/@oxc-project/runtime/src/helpers/inheritsLoose.js +5 -0
  234. package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerDefineProperty.js +9 -0
  235. package/runtime/node_modules/@oxc-project/runtime/src/helpers/initializerWarningHelper.js +4 -0
  236. package/runtime/node_modules/@oxc-project/runtime/src/helpers/instanceof.js +4 -0
  237. package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireDefault.js +6 -0
  238. package/runtime/node_modules/@oxc-project/runtime/src/helpers/interopRequireWildcard.js +27 -0
  239. package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeFunction.js +8 -0
  240. package/runtime/node_modules/@oxc-project/runtime/src/helpers/isNativeReflectConstruct.js +9 -0
  241. package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArray.js +4 -0
  242. package/runtime/node_modules/@oxc-project/runtime/src/helpers/iterableToArrayLimit.js +28 -0
  243. package/runtime/node_modules/@oxc-project/runtime/src/helpers/jsx.js +22 -0
  244. package/runtime/node_modules/@oxc-project/runtime/src/helpers/maybeArrayLike.js +9 -0
  245. package/runtime/node_modules/@oxc-project/runtime/src/helpers/newArrowCheck.js +4 -0
  246. package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableRest.js +4 -0
  247. package/runtime/node_modules/@oxc-project/runtime/src/helpers/nonIterableSpread.js +4 -0
  248. package/runtime/node_modules/@oxc-project/runtime/src/helpers/nullishReceiverError.js +4 -0
  249. package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectDestructuringEmpty.js +4 -0
  250. package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread.js +14 -0
  251. package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js +23 -0
  252. package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js +13 -0
  253. package/runtime/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js +10 -0
  254. package/runtime/node_modules/@oxc-project/runtime/src/helpers/possibleConstructorReturn.js +8 -0
  255. package/runtime/node_modules/@oxc-project/runtime/src/helpers/readOnlyError.js +4 -0
  256. package/runtime/node_modules/@oxc-project/runtime/src/helpers/regeneratorRuntime.js +304 -0
  257. package/runtime/node_modules/@oxc-project/runtime/src/helpers/set.js +22 -0
  258. package/runtime/node_modules/@oxc-project/runtime/src/helpers/setFunctionName.js +12 -0
  259. package/runtime/node_modules/@oxc-project/runtime/src/helpers/setPrototypeOf.js +6 -0
  260. package/runtime/node_modules/@oxc-project/runtime/src/helpers/skipFirstGeneratorNext.js +7 -0
  261. package/runtime/node_modules/@oxc-project/runtime/src/helpers/slicedToArray.js +8 -0
  262. package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropBase.js +6 -0
  263. package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropGet.js +9 -0
  264. package/runtime/node_modules/@oxc-project/runtime/src/helpers/superPropSet.js +6 -0
  265. package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteral.js +8 -0
  266. package/runtime/node_modules/@oxc-project/runtime/src/helpers/taggedTemplateLiteralLoose.js +4 -0
  267. package/runtime/node_modules/@oxc-project/runtime/src/helpers/tdz.js +4 -0
  268. package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalRef.js +6 -0
  269. package/runtime/node_modules/@oxc-project/runtime/src/helpers/temporalUndefined.js +2 -0
  270. package/runtime/node_modules/@oxc-project/runtime/src/helpers/toArray.js +8 -0
  271. package/runtime/node_modules/@oxc-project/runtime/src/helpers/toConsumableArray.js +8 -0
  272. package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js +12 -0
  273. package/runtime/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js +7 -0
  274. package/runtime/node_modules/@oxc-project/runtime/src/helpers/toSetter.js +10 -0
  275. package/runtime/node_modules/@oxc-project/runtime/src/helpers/typeof.js +10 -0
  276. package/runtime/node_modules/@oxc-project/runtime/src/helpers/unsupportedIterableToArray.js +9 -0
  277. package/runtime/node_modules/@oxc-project/runtime/src/helpers/using.js +12 -0
  278. package/runtime/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js +59 -0
  279. package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js +69 -0
  280. package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapNativeSuper.js +27 -0
  281. package/runtime/node_modules/@oxc-project/runtime/src/helpers/wrapRegExp.js +51 -0
  282. package/runtime/node_modules/@oxc-project/runtime/src/helpers/writeOnlyError.js +4 -0
  283. package/runtime/node_modules/@oxc-project/types/LICENSE +22 -0
  284. package/runtime/node_modules/@oxc-project/types/README.md +3 -0
  285. package/runtime/node_modules/@oxc-project/types/package.json +26 -0
  286. package/runtime/node_modules/@oxc-project/types/types.d.ts +1912 -0
  287. package/runtime/node_modules/@petamoriken/float16/LICENSE +21 -0
  288. package/runtime/node_modules/@petamoriken/float16/README.md +413 -0
  289. package/runtime/node_modules/@petamoriken/float16/browser/float16.js +1340 -0
  290. package/runtime/node_modules/@petamoriken/float16/browser/float16.mjs +1325 -0
  291. package/runtime/node_modules/@petamoriken/float16/index.d.ts +546 -0
  292. package/runtime/node_modules/@petamoriken/float16/index.v5.6.d.ts +546 -0
  293. package/runtime/node_modules/@petamoriken/float16/index.v5.7.d.ts +555 -0
  294. package/runtime/node_modules/@petamoriken/float16/inspect/node.cjs +25 -0
  295. package/runtime/node_modules/@petamoriken/float16/inspect/node.mjs +23 -0
  296. package/runtime/node_modules/@petamoriken/float16/lib/DataView.cjs +16 -0
  297. package/runtime/node_modules/@petamoriken/float16/lib/Float16Array.cjs +690 -0
  298. package/runtime/node_modules/@petamoriken/float16/lib/_util/arrayIterator.cjs +52 -0
  299. package/runtime/node_modules/@petamoriken/float16/lib/_util/brand.cjs +27 -0
  300. package/runtime/node_modules/@petamoriken/float16/lib/_util/converter.cjs +111 -0
  301. package/runtime/node_modules/@petamoriken/float16/lib/_util/is.cjs +78 -0
  302. package/runtime/node_modules/@petamoriken/float16/lib/_util/messages.cjs +18 -0
  303. package/runtime/node_modules/@petamoriken/float16/lib/_util/primordials.cjs +150 -0
  304. package/runtime/node_modules/@petamoriken/float16/lib/_util/spec.cjs +84 -0
  305. package/runtime/node_modules/@petamoriken/float16/lib/f16round.cjs +10 -0
  306. package/runtime/node_modules/@petamoriken/float16/lib/index.cjs +16 -0
  307. package/runtime/node_modules/@petamoriken/float16/lib/isTypedArray.cjs +11 -0
  308. package/runtime/node_modules/@petamoriken/float16/package.json +115 -0
  309. package/runtime/node_modules/@petamoriken/float16/src/DataView.mjs +35 -0
  310. package/runtime/node_modules/@petamoriken/float16/src/Float16Array.mjs +1194 -0
  311. package/runtime/node_modules/@petamoriken/float16/src/_util/arrayIterator.mjs +86 -0
  312. package/runtime/node_modules/@petamoriken/float16/src/_util/brand.mjs +31 -0
  313. package/runtime/node_modules/@petamoriken/float16/src/_util/converter.mjs +173 -0
  314. package/runtime/node_modules/@petamoriken/float16/src/_util/is.mjs +151 -0
  315. package/runtime/node_modules/@petamoriken/float16/src/_util/messages.mjs +22 -0
  316. package/runtime/node_modules/@petamoriken/float16/src/_util/primordials.mjs +254 -0
  317. package/runtime/node_modules/@petamoriken/float16/src/_util/spec.mjs +137 -0
  318. package/runtime/node_modules/@petamoriken/float16/src/f16round.mjs +10 -0
  319. package/runtime/node_modules/@petamoriken/float16/src/index.mjs +7 -0
  320. package/runtime/node_modules/@petamoriken/float16/src/isTypedArray.mjs +10 -0
  321. package/runtime/node_modules/jsbi/LICENSE +176 -0
  322. package/runtime/node_modules/jsbi/README.md +173 -0
  323. package/runtime/node_modules/jsbi/dist/jsbi-cjs.js +2 -0
  324. package/runtime/node_modules/jsbi/dist/jsbi-cjs.js.map +1 -0
  325. package/runtime/node_modules/jsbi/dist/jsbi-umd.js +2 -0
  326. package/runtime/node_modules/jsbi/dist/jsbi-umd.js.map +1 -0
  327. package/runtime/node_modules/jsbi/dist/jsbi.mjs +2 -0
  328. package/runtime/node_modules/jsbi/dist/jsbi.mjs.map +1 -0
  329. package/runtime/node_modules/jsbi/jsbi.d.ts +43 -0
  330. package/runtime/node_modules/jsbi/package.json +35 -0
  331. package/runtime/node_modules/oxc-parser/LICENSE +22 -0
  332. package/runtime/node_modules/oxc-parser/README.md +167 -0
  333. package/runtime/node_modules/oxc-parser/package.json +153 -0
  334. package/runtime/node_modules/oxc-parser/src-js/bindings.js +601 -0
  335. package/runtime/node_modules/oxc-parser/src-js/generated/constants.js +105 -0
  336. package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/js.js +5862 -0
  337. package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/js_range.js +6403 -0
  338. package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/ts.js +6154 -0
  339. package/runtime/node_modules/oxc-parser/src-js/generated/deserialize/ts_range.js +6723 -0
  340. package/runtime/node_modules/oxc-parser/src-js/generated/lazy/constructors.js +13875 -0
  341. package/runtime/node_modules/oxc-parser/src-js/generated/lazy/type_ids.js +191 -0
  342. package/runtime/node_modules/oxc-parser/src-js/generated/lazy/walk.js +5810 -0
  343. package/runtime/node_modules/oxc-parser/src-js/generated/visit/keys.js +220 -0
  344. package/runtime/node_modules/oxc-parser/src-js/generated/visit/type_ids.js +177 -0
  345. package/runtime/node_modules/oxc-parser/src-js/generated/visit/visitor.d.ts +387 -0
  346. package/runtime/node_modules/oxc-parser/src-js/generated/visit/walk.js +2455 -0
  347. package/runtime/node_modules/oxc-parser/src-js/index.d.ts +312 -0
  348. package/runtime/node_modules/oxc-parser/src-js/index.js +108 -0
  349. package/runtime/node_modules/oxc-parser/src-js/raw-transfer/common.js +301 -0
  350. package/runtime/node_modules/oxc-parser/src-js/raw-transfer/eager.js +255 -0
  351. package/runtime/node_modules/oxc-parser/src-js/raw-transfer/lazy-common.js +11 -0
  352. package/runtime/node_modules/oxc-parser/src-js/raw-transfer/lazy.js +162 -0
  353. package/runtime/node_modules/oxc-parser/src-js/raw-transfer/node-array.js +365 -0
  354. package/runtime/node_modules/oxc-parser/src-js/raw-transfer/supported.js +52 -0
  355. package/runtime/node_modules/oxc-parser/src-js/raw-transfer/visitor.js +127 -0
  356. package/runtime/node_modules/oxc-parser/src-js/visit/index.js +41 -0
  357. package/runtime/node_modules/oxc-parser/src-js/visit/visitor.js +405 -0
  358. package/runtime/node_modules/oxc-parser/src-js/wasm.js +13 -0
  359. package/runtime/node_modules/oxc-parser/src-js/webcontainer-fallback.cjs +21 -0
  360. package/runtime/node_modules/oxc-parser/src-js/wrap.js +57 -0
  361. package/runtime/node_modules/urlpattern-polyfill/LICENSE +19 -0
  362. package/runtime/node_modules/urlpattern-polyfill/README.md +242 -0
  363. package/runtime/node_modules/urlpattern-polyfill/dist/index.d.ts +9 -0
  364. package/runtime/node_modules/urlpattern-polyfill/dist/types.d.ts +49 -0
  365. package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.cjs +1 -0
  366. package/runtime/node_modules/urlpattern-polyfill/dist/urlpattern.js +1 -0
  367. package/runtime/node_modules/urlpattern-polyfill/index.cjs +7 -0
  368. package/runtime/node_modules/urlpattern-polyfill/index.js +7 -0
  369. package/runtime/node_modules/urlpattern-polyfill/package.json +149 -0
  370. package/runtime/polyfills.mjs +73 -97
  371. package/runtime/preload-async-hooks.mjs +50 -0
  372. package/runtime/preload.mjs +274 -320
  373. package/runtime/transform-core.mjs +762 -0
  374. package/runtime/version.mjs +12 -0
  375. package/runtime/worker-polyfill.mjs +147 -9
@@ -0,0 +1,173 @@
1
+ # JSBI — pure-JavaScript BigInts [![Build status](https://github.com/GoogleChromeLabs/jsbi/actions/workflows/main.yml/badge.svg)](https://github.com/GoogleChromeLabs/jsbi/actions/workflows/main.yml) [![jsbi on npm](https://img.shields.io/npm/v/jsbi)](https://www.npmjs.com/package/jsbi)
2
+
3
+ JSBI is a pure-JavaScript implementation of [the ECMAScript BigInt proposal](https://tc39.es/proposal-bigint/), which officially became a part of the JavaScript language in ES2020.
4
+
5
+ ## Installation
6
+
7
+ ```sh
8
+ npm install jsbi --save
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```js
14
+ import JSBI from './jsbi.mjs';
15
+
16
+ const max = JSBI.BigInt(Number.MAX_SAFE_INTEGER);
17
+ console.log(String(max));
18
+ // → '9007199254740991'
19
+ const other = JSBI.BigInt('2');
20
+ const result = JSBI.add(max, other);
21
+ console.log(String(result));
22
+ // → '9007199254740993'
23
+ ```
24
+
25
+ Note: explicitly call `toString` on any `JSBI` instances when `console.log()`ing them to see their numeric representation (e.g. `String(max)` or `max.toString()`). Without it (e.g. `console.log(max)`), you’ll instead see the object that represents the value.
26
+
27
+ Use [babel-plugin-transform-jsbi-to-bigint](https://github.com/GoogleChromeLabs/babel-plugin-transform-jsbi-to-bigint) to transpile JSBI code into native BigInt code.
28
+
29
+ Refer to the detailed instructions below for more information.
30
+
31
+ ## Why?
32
+
33
+ [Native BigInts are already shipping](https://v8.dev/features/bigint) in modern browsers (at the time of this writing, Google Chrome 67+, Opera 54+, Firefox 68+, Edge 79+, Safari 14+) and Node.js (v10.4+), but some users are still running older browsers — which means you can't use them yet if you want your code to run everywhere.
34
+
35
+ To use BigInts in code that you want to run *everywhere*, you need a library. But there’s a difficulty: the BigInt proposal changes the behavior of operators (like `+`, `>=`, etc.) to work on BigInts. These changes are impossible to polyfill directly; and they are also making it infeasible (in most cases) to transpile BigInt code to fallback code using Babel or similar tools. The reason is that such a transpilation would have to replace every single operator in the program with a call to some function that performs type checks on its inputs, which would incur an unacceptable performance penalty.
36
+
37
+ The solution is to do it the other way round: write code using a library’s syntax, and [transpile it to native BigInt code](https://github.com/GoogleChromeLabs/babel-plugin-transform-jsbi-to-bigint) when available. JSBI is designed for exactly this purpose: it provides a BigInt “polyfill” implementation that behaves exactly like the upcoming native BigInts, but with a syntax that you can ship on all browsers, today.
38
+
39
+ Its advantages over other, existing big-integer libraries are:
40
+
41
+ - it behaves exactly like native BigInts do where they are available, so to eventually migrate to those, you can [mechanically](https://github.com/GoogleChromeLabs/babel-plugin-transform-jsbi-to-bigint) update your code’s syntax; no re-thinking of its logic will be required.
42
+ - strong focus on performance. On average, JSBI is performance-competitive with the native implementation that Google Chrome is currently shipping. (Note: we expect this statement to gradually become outdated as browsers invest in additional optimizations.)
43
+
44
+ ## How?
45
+
46
+ Except for mechanical differences in syntax, you use JSBI-BigInts just [like you would use native BigInts](https://developers.google.com/web/updates/2018/05/bigint). Some things even look the same, after you replace `BigInt` with `JSBI.BigInt`:
47
+
48
+ | Operation | native BigInts | JSBI |
49
+ | -------------------- | ----------------------- | ------------------------ |
50
+ | Creation from String | `a = BigInt('456')` | `a = JSBI.BigInt('456')` |
51
+ | Creation from Number | `a = BigInt(789)` | `a = JSBI.BigInt(789)` |
52
+ | Conversion to String | `a.toString(radix)` | `a.toString(radix)` |
53
+ | Conversion to Number | `Number(a)` | `JSBI.toNumber(a)` |
54
+ | Truncation | `BigInt.asIntN(64, a)` | `JSBI.asIntN(64, a)` |
55
+ | | `BigInt.asUintN(64, a)` | `JSBI.asUintN(64, a)` |
56
+ | Type check | `typeof a === 'bigint'` | `a instanceof JSBI` |
57
+
58
+ Most operators are replaced by static functions:
59
+
60
+ | Operation | native BigInts | JSBI |
61
+ | --------------------------- | -------------- | --------------------------------- |
62
+ | Addition | `c = a + b` | `c = JSBI.add(a, b)` |
63
+ | Subtraction | `c = a - b` | `c = JSBI.subtract(a, b)` |
64
+ | Multiplication | `c = a * b` | `c = JSBI.multiply(a, b)` |
65
+ | Division | `c = a / b` | `c = JSBI.divide(a, b)` |
66
+ | Remainder | `c = a % b` | `c = JSBI.remainder(a, b)` |
67
+ | Exponentiation | `c = a ** b` | `c = JSBI.exponentiate(a, b)` |
68
+ | Negation | `b = -a` | `b = JSBI.unaryMinus(a)` |
69
+ | Bitwise negation | `b = ~a` | `b = JSBI.bitwiseNot(a)` |
70
+ | Left shifting | `c = a << b` | `c = JSBI.leftShift(a, b)` |
71
+ | Right shifting | `c = a >> b` | `c = JSBI.signedRightShift(a, b)` |
72
+ | Bitwise “and” | `c = a & b` | `c = JSBI.bitwiseAnd(a, b)` |
73
+ | Bitwise “or” | `c = a \| b` | `c = JSBI.bitwiseOr(a, b)` |
74
+ | Bitwise “xor” | `c = a ^ b` | `c = JSBI.bitwiseXor(a, b)` |
75
+ | Comparison to other BigInts | `a === b` | `JSBI.equal(a, b)` |
76
+ | | `a !== b` | `JSBI.notEqual(a, b)` |
77
+ | | `a < b` | `JSBI.lessThan(a, b)` |
78
+ | | `a <= b` | `JSBI.lessThanOrEqual(a, b)` |
79
+ | | `a > b` | `JSBI.greaterThan(a, b)` |
80
+ | | `a >= b` | `JSBI.greaterThanOrEqual(a, b)` |
81
+
82
+ The functions above operate only on BigInts. (They don’t perform type checks in the current implementation, because such checks are a waste of time when we assume that you know what you’re doing. Don’t try to call them with other inputs, or you’ll get “interesting” failures!)
83
+
84
+ Some operations are particularly interesting when you give them inputs of mixed types, e.g. comparing a BigInt to a Number, or concatenating a string with a BigInt. They are implemented as static functions named after the respective native operators:
85
+
86
+ | Operation | native BigInts | JSBI |
87
+ | ------------------------------- | -------------- | ---------------- |
88
+ | Abstract equality comparison | `x == y` | `JSBI.EQ(x, y)` |
89
+ | Generic “not equal” | `x != y` | `JSBI.NE(x, y)` |
90
+ | Generic “less than” | `x < y` | `JSBI.LT(x, y)` |
91
+ | Generic “less than or equal” | `x <= y` | `JSBI.LE(x, y)` |
92
+ | Generic “greater than” | `x > y` | `JSBI.GT(x, y)` |
93
+ | Generic “greater than or equal” | `x >= y` | `JSBI.GE(x, y)` |
94
+ | Generic addition | `x + y` | `JSBI.ADD(x, y)` |
95
+
96
+ The variable names `x` and `y` here indicate that the variables can refer to anything, for example: `JSBI.GT(101.5, BigInt('100'))` or `str = JSBI.ADD('result: ', BigInt('0x2A'))`.
97
+
98
+ Unfortunately, there are also a few things that are not supported at all:
99
+
100
+ | Unsupported operation | native BigInts | JSBI |
101
+ | --------------------- | -------------- | ------------------------------------ |
102
+ | literals | `a = 123n;` | N/A ☹ |
103
+ | increment | `a++` | N/A ☹ |
104
+ | | `a + 1n` | `JSBI.add(a, JSBI.BigInt('1'))` |
105
+ | decrement | `a--` | N/A ☹ |
106
+ | | `a - 1n` | `JSBI.subtract(a, JSBI.BigInt('1'))` |
107
+
108
+ It is impossible to replicate the exact behavior of the native `++` and `--` operators in a polyfill/library. Since JSBI is intended to be transpiled away eventually, it doesn’t provide a similar-but-different alternative. You can use `JSBI.add()` and `JSBI.subtract()` instead.
109
+
110
+ Since version 4.2.0, polyfills for `DataView` operations are included (where `dv` is a `DataView`, `i` is an index, `le` is an optional boolean indicating little endian mode, and `x` is a `BigInt` or a `JSBI` instance, respectively):
111
+
112
+ | native BigInts/DataViews | JSBI |
113
+ |-----------------------------|-------------------------------------------|
114
+ | `dv.getBigInt64(i, le)` | `JSBI.DataViewGetBigInt64(dv, i, le)` |
115
+ | `dv.setBigInt64(i, x, le)` | `JSBI.DataViewSetBigInt64(dv, i, x, le)` |
116
+ | `dv.getBigUint64(i, le)` | `JSBI.DataViewGetBigUint64(dv, i, le)` |
117
+ | `dv.setBigUint64(i, x, le)` | `JSBI.DataViewSetBigUint64(dv, i, x, le)` |
118
+
119
+ ## When?
120
+
121
+ Now! The JSBI library is ready for use today.
122
+
123
+ Once BigInts are natively supported everywhere, use [babel-plugin-transform-jsbi-to-bigint](https://github.com/GoogleChromeLabs/babel-plugin-transform-jsbi-to-bigint) to transpile your JSBI code into native BigInt code once and for all.
124
+
125
+ View [our issue tracker](https://github.com/GoogleChromeLabs/jsbi/issues) to learn more about out our future plans for JSBI, and please join the discussion!
126
+
127
+ A more vague future plan is to use the JSBI library (or an extension to it) as a staging ground for additional BigInt-related functionality. The official proposal is intentionally somewhat minimal, and leaves further “library functions” for follow-up proposals. Examples are a combined `exp`+`mod` function, and bit manipulation functions.
128
+
129
+ ## Development
130
+
131
+ 1. Clone this repository and `cd` into the local directory.
132
+
133
+ 1. Use the Node.js version specified in `.nvmrc`:
134
+
135
+ ```sh
136
+ nvm use
137
+ ```
138
+
139
+ 1. Install development dependencies:
140
+
141
+ ```sh
142
+ npm install
143
+ ```
144
+
145
+ 1. Run the tests:
146
+
147
+ ```sh
148
+ npm test
149
+ ```
150
+
151
+ See `npm run` for the list of commands.
152
+
153
+ ## For maintainers
154
+
155
+ ### How to publish a new release
156
+
157
+ 1. On the `main` branch, bump the version number in `package.json`:
158
+
159
+ ```sh
160
+ npm version patch -m 'Release v%s'
161
+ ```
162
+
163
+ Instead of `patch`, use `minor` or `major` [as needed](https://semver.org/).
164
+
165
+ Note that this produces a Git commit + tag.
166
+
167
+ 1. Push the release commit and tag:
168
+
169
+ ```sh
170
+ git push && git push --tags
171
+ ```
172
+
173
+ Our CI then automatically publishes the new release to npm.
@@ -0,0 +1,2 @@
1
+ "use strict";class JSBI extends Array{constructor(i,_){if(super(i),this.sign=_,Object.setPrototypeOf(this,JSBI.prototype),i>JSBI.__kMaxLength)throw new RangeError("Maximum BigInt size exceeded")}static BigInt(i){var _=Math.floor,t=Number.isFinite;if("number"==typeof i){if(0===i)return JSBI.__zero();if(JSBI.__isOneDigitInt(i))return 0>i?JSBI.__oneDigit(-i,!0):JSBI.__oneDigit(i,!1);if(!t(i)||_(i)!==i)throw new RangeError("The number "+i+" cannot be converted to BigInt because it is not an integer");return JSBI.__fromDouble(i)}if("string"==typeof i){const _=JSBI.__fromString(i);if(null===_)throw new SyntaxError("Cannot convert "+i+" to a BigInt");return _}if("boolean"==typeof i)return!0===i?JSBI.__oneDigit(1,!1):JSBI.__zero();if("object"==typeof i){if(i.constructor===JSBI)return i;const _=JSBI.__toPrimitive(i);return JSBI.BigInt(_)}throw new TypeError("Cannot convert "+i+" to a BigInt")}toDebugString(){const i=["BigInt["];for(const _ of this)i.push((_?(_>>>0).toString(16):_)+", ");return i.push("]"),i.join("")}toString(i=10){if(2>i||36<i)throw new RangeError("toString() radix argument must be between 2 and 36");return 0===this.length?"0":0==(i&i-1)?JSBI.__toStringBasePowerOfTwo(this,i):JSBI.__toStringGeneric(this,i,!1)}valueOf(){throw new Error("Convert JSBI instances to native numbers using `toNumber`.")}static toNumber(i){const _=i.length;if(0===_)return 0;if(1===_){const _=i.__unsignedDigit(0);return i.sign?-_:_}const t=i.__digit(_-1),e=JSBI.__clz30(t),n=30*_-e;if(1024<n)return i.sign?-Infinity:1/0;let g=n-1,o=t,s=_-1;const l=e+3;let r=32===l?0:o<<l;r>>>=12;const a=l-12;let u=12<=l?0:o<<20+l,d=20+l;for(0<a&&0<s&&(s--,o=i.__digit(s),r|=o>>>30-a,u=o<<a+2,d=a+2);0<d&&0<s;)s--,o=i.__digit(s),u|=30<=d?o<<d-30:o>>>30-d,d-=30;const h=JSBI.__decideRounding(i,d,s,o);if((1===h||0===h&&1==(1&u))&&(u=u+1>>>0,0===u&&(r++,0!=r>>>20&&(r=0,g++,1023<g))))return i.sign?-Infinity:1/0;const m=i.sign?-2147483648:0;return g=g+1023<<20,JSBI.__kBitConversionInts[JSBI.__kBitConversionIntHigh]=m|g|r,JSBI.__kBitConversionInts[JSBI.__kBitConversionIntLow]=u,JSBI.__kBitConversionDouble[0]}static unaryMinus(i){if(0===i.length)return i;const _=i.__copy();return _.sign=!i.sign,_}static bitwiseNot(i){return i.sign?JSBI.__absoluteSubOne(i).__trim():JSBI.__absoluteAddOne(i,!0)}static exponentiate(i,_){if(_.sign)throw new RangeError("Exponent must be positive");if(0===_.length)return JSBI.__oneDigit(1,!1);if(0===i.length)return i;if(1===i.length&&1===i.__digit(0))return i.sign&&0==(1&_.__digit(0))?JSBI.unaryMinus(i):i;if(1<_.length)throw new RangeError("BigInt too big");let t=_.__unsignedDigit(0);if(1===t)return i;if(t>=JSBI.__kMaxLengthBits)throw new RangeError("BigInt too big");if(1===i.length&&2===i.__digit(0)){const _=1+(0|t/30),e=i.sign&&0!=(1&t),n=new JSBI(_,e);n.__initializeDigits();const g=1<<t%30;return n.__setDigit(_-1,g),n}let e=null,n=i;for(0!=(1&t)&&(e=i),t>>=1;0!==t;t>>=1)n=JSBI.multiply(n,n),0!=(1&t)&&(null===e?e=n:e=JSBI.multiply(e,n));return e}static multiply(_,t){if(0===_.length)return _;if(0===t.length)return t;let i=_.length+t.length;30<=_.__clzmsd()+t.__clzmsd()&&i--;const e=new JSBI(i,_.sign!==t.sign);e.__initializeDigits();for(let n=0;n<_.length;n++)JSBI.__multiplyAccumulate(t,_.__digit(n),e,n);return e.__trim()}static divide(i,_){if(0===_.length)throw new RangeError("Division by zero");if(0>JSBI.__absoluteCompare(i,_))return JSBI.__zero();const t=i.sign!==_.sign,e=_.__unsignedDigit(0);let n;if(1===_.length&&32767>=e){if(1===e)return t===i.sign?i:JSBI.unaryMinus(i);n=JSBI.__absoluteDivSmall(i,e,null)}else n=JSBI.__absoluteDivLarge(i,_,!0,!1);return n.sign=t,n.__trim()}static remainder(i,_){if(0===_.length)throw new RangeError("Division by zero");if(0>JSBI.__absoluteCompare(i,_))return i;const t=_.__unsignedDigit(0);if(1===_.length&&32767>=t){if(1===t)return JSBI.__zero();const _=JSBI.__absoluteModSmall(i,t);return 0===_?JSBI.__zero():JSBI.__oneDigit(_,i.sign)}const e=JSBI.__absoluteDivLarge(i,_,!1,!0);return e.sign=i.sign,e.__trim()}static add(i,_){const t=i.sign;return t===_.sign?JSBI.__absoluteAdd(i,_,t):0<=JSBI.__absoluteCompare(i,_)?JSBI.__absoluteSub(i,_,t):JSBI.__absoluteSub(_,i,!t)}static subtract(i,_){const t=i.sign;return t===_.sign?0<=JSBI.__absoluteCompare(i,_)?JSBI.__absoluteSub(i,_,t):JSBI.__absoluteSub(_,i,!t):JSBI.__absoluteAdd(i,_,t)}static leftShift(i,_){return 0===_.length||0===i.length?i:_.sign?JSBI.__rightShiftByAbsolute(i,_):JSBI.__leftShiftByAbsolute(i,_)}static signedRightShift(i,_){return 0===_.length||0===i.length?i:_.sign?JSBI.__leftShiftByAbsolute(i,_):JSBI.__rightShiftByAbsolute(i,_)}static unsignedRightShift(){throw new TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(i,_){return 0>JSBI.__compareToBigInt(i,_)}static lessThanOrEqual(i,_){return 0>=JSBI.__compareToBigInt(i,_)}static greaterThan(i,_){return 0<JSBI.__compareToBigInt(i,_)}static greaterThanOrEqual(i,_){return 0<=JSBI.__compareToBigInt(i,_)}static equal(_,t){if(_.sign!==t.sign)return!1;if(_.length!==t.length)return!1;for(let e=0;e<_.length;e++)if(_.__digit(e)!==t.__digit(e))return!1;return!0}static notEqual(i,_){return!JSBI.equal(i,_)}static bitwiseAnd(i,_){var t=Math.max;if(!i.sign&&!_.sign)return JSBI.__absoluteAnd(i,_).__trim();if(i.sign&&_.sign){const e=t(i.length,_.length)+1;let n=JSBI.__absoluteSubOne(i,e);const g=JSBI.__absoluteSubOne(_);return n=JSBI.__absoluteOr(n,g,n),JSBI.__absoluteAddOne(n,!0,n).__trim()}return i.sign&&([i,_]=[_,i]),JSBI.__absoluteAndNot(i,JSBI.__absoluteSubOne(_)).__trim()}static bitwiseXor(i,_){var t=Math.max;if(!i.sign&&!_.sign)return JSBI.__absoluteXor(i,_).__trim();if(i.sign&&_.sign){const e=t(i.length,_.length),n=JSBI.__absoluteSubOne(i,e),g=JSBI.__absoluteSubOne(_);return JSBI.__absoluteXor(n,g,n).__trim()}const e=t(i.length,_.length)+1;i.sign&&([i,_]=[_,i]);let n=JSBI.__absoluteSubOne(_,e);return n=JSBI.__absoluteXor(n,i,n),JSBI.__absoluteAddOne(n,!0,n).__trim()}static bitwiseOr(i,_){var t=Math.max;const e=t(i.length,_.length);if(!i.sign&&!_.sign)return JSBI.__absoluteOr(i,_).__trim();if(i.sign&&_.sign){let t=JSBI.__absoluteSubOne(i,e);const n=JSBI.__absoluteSubOne(_);return t=JSBI.__absoluteAnd(t,n,t),JSBI.__absoluteAddOne(t,!0,t).__trim()}i.sign&&([i,_]=[_,i]);let n=JSBI.__absoluteSubOne(_,e);return n=JSBI.__absoluteAndNot(n,i,n),JSBI.__absoluteAddOne(n,!0,n).__trim()}static asIntN(_,t){var i=Math.floor;if(0===t.length)return t;if(_=i(_),0>_)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===_)return JSBI.__zero();if(_>=JSBI.__kMaxLengthBits)return t;const e=0|(_+29)/30;if(t.length<e)return t;const g=t.__unsignedDigit(e-1),o=1<<(_-1)%30;if(t.length===e&&g<o)return t;if(!((g&o)===o))return JSBI.__truncateToNBits(_,t);if(!t.sign)return JSBI.__truncateAndSubFromPowerOfTwo(_,t,!0);if(0==(g&o-1)){for(let n=e-2;0<=n;n--)if(0!==t.__digit(n))return JSBI.__truncateAndSubFromPowerOfTwo(_,t,!1);return t.length===e&&g===o?t:JSBI.__truncateToNBits(_,t)}return JSBI.__truncateAndSubFromPowerOfTwo(_,t,!1)}static asUintN(i,_){var t=Math.floor;if(0===_.length)return _;if(i=t(i),0>i)throw new RangeError("Invalid value: not (convertible to) a safe integer");if(0===i)return JSBI.__zero();if(_.sign){if(i>JSBI.__kMaxLengthBits)throw new RangeError("BigInt too big");return JSBI.__truncateAndSubFromPowerOfTwo(i,_,!1)}if(i>=JSBI.__kMaxLengthBits)return _;const e=0|(i+29)/30;if(_.length<e)return _;const g=i%30;if(_.length==e){if(0===g)return _;const i=_.__digit(e-1);if(0==i>>>g)return _}return JSBI.__truncateToNBits(i,_)}static ADD(i,_){if(i=JSBI.__toPrimitive(i),_=JSBI.__toPrimitive(_),"string"==typeof i)return"string"!=typeof _&&(_=_.toString()),i+_;if("string"==typeof _)return i.toString()+_;if(i=JSBI.__toNumeric(i),_=JSBI.__toNumeric(_),JSBI.__isBigInt(i)&&JSBI.__isBigInt(_))return JSBI.add(i,_);if("number"==typeof i&&"number"==typeof _)return i+_;throw new TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(i,_){return JSBI.__compare(i,_,0)}static LE(i,_){return JSBI.__compare(i,_,1)}static GT(i,_){return JSBI.__compare(i,_,2)}static GE(i,_){return JSBI.__compare(i,_,3)}static EQ(i,_){for(;;){if(JSBI.__isBigInt(i))return JSBI.__isBigInt(_)?JSBI.equal(i,_):JSBI.EQ(_,i);if("number"==typeof i){if(JSBI.__isBigInt(_))return JSBI.__equalToNumber(_,i);if("object"!=typeof _)return i==_;_=JSBI.__toPrimitive(_)}else if("string"==typeof i){if(JSBI.__isBigInt(_))return i=JSBI.__fromString(i),null!==i&&JSBI.equal(i,_);if("object"!=typeof _)return i==_;_=JSBI.__toPrimitive(_)}else if("boolean"==typeof i){if(JSBI.__isBigInt(_))return JSBI.__equalToNumber(_,+i);if("object"!=typeof _)return i==_;_=JSBI.__toPrimitive(_)}else if("symbol"==typeof i){if(JSBI.__isBigInt(_))return!1;if("object"!=typeof _)return i==_;_=JSBI.__toPrimitive(_)}else if("object"==typeof i){if("object"==typeof _&&_.constructor!==JSBI)return i==_;i=JSBI.__toPrimitive(i)}else return i==_}}static NE(i,_){return!JSBI.EQ(i,_)}static DataViewGetBigInt64(i,_,t=!1){return JSBI.asIntN(64,JSBI.DataViewGetBigUint64(i,_,t))}static DataViewGetBigUint64(i,_,t=!1){const[e,n]=t?[4,0]:[0,4],g=i.getUint32(_+e,t),o=i.getUint32(_+n,t),s=new JSBI(3,!1);return s.__setDigit(0,1073741823&o),s.__setDigit(1,(268435455&g)<<2|o>>>30),s.__setDigit(2,g>>>28),s.__trim()}static DataViewSetBigInt64(i,_,t,e=!1){JSBI.DataViewSetBigUint64(i,_,t,e)}static DataViewSetBigUint64(i,_,t,e=!1){t=JSBI.asUintN(64,t);let n=0,g=0;if(0<t.length&&(g=t.__digit(0),1<t.length)){const i=t.__digit(1);g|=i<<30,n=i>>>2,2<t.length&&(n|=t.__digit(2)<<28)}const[o,s]=e?[4,0]:[0,4];i.setUint32(_+o,n,e),i.setUint32(_+s,g,e)}static __zero(){return new JSBI(0,!1)}static __oneDigit(i,_){const t=new JSBI(1,_);return t.__setDigit(0,i),t}__copy(){const _=new JSBI(this.length,this.sign);for(let t=0;t<this.length;t++)_[t]=this[t];return _}__trim(){let i=this.length,_=this[i-1];for(;0===_;)i--,_=this[i-1],this.pop();return 0===i&&(this.sign=!1),this}__initializeDigits(){for(let _=0;_<this.length;_++)this[_]=0}static __decideRounding(i,_,t,e){if(0<_)return-1;let n;if(0>_)n=-_-1;else{if(0===t)return-1;t--,e=i.__digit(t),n=29}let g=1<<n;if(0==(e&g))return-1;if(g-=1,0!=(e&g))return 1;for(;0<t;)if(t--,0!==i.__digit(t))return 1;return 0}static __fromDouble(i){JSBI.__kBitConversionDouble[0]=i;const _=2047&JSBI.__kBitConversionInts[JSBI.__kBitConversionIntHigh]>>>20,t=_-1023,e=(0|t/30)+1,n=new JSBI(e,0>i);let g=1048575&JSBI.__kBitConversionInts[JSBI.__kBitConversionIntHigh]|1048576,o=JSBI.__kBitConversionInts[JSBI.__kBitConversionIntLow];const s=20,l=t%30;let r,a=0;if(l<20){const i=s-l;a=i+32,r=g>>>i,g=g<<32-i|o>>>i,o<<=32-i}else if(l===20)a=32,r=g,g=o,o=0;else{const i=l-s;a=32-i,r=g<<i|o>>>32-i,g=o<<i,o=0}n.__setDigit(e-1,r);for(let _=e-2;0<=_;_--)0<a?(a-=30,r=g>>>2,g=g<<30|o>>>2,o<<=30):r=0,n.__setDigit(_,r);return n.__trim()}static __isWhitespace(i){return!!(13>=i&&9<=i)||(159>=i?32==i:131071>=i?160==i||5760==i:196607>=i?(i&=131071,10>=i||40==i||41==i||47==i||95==i||4096==i):65279==i)}static __fromString(i,_=0){let t=0;const e=i.length;let n=0;if(n===e)return JSBI.__zero();let g=i.charCodeAt(n);for(;JSBI.__isWhitespace(g);){if(++n===e)return JSBI.__zero();g=i.charCodeAt(n)}if(43===g){if(++n===e)return null;g=i.charCodeAt(n),t=1}else if(45===g){if(++n===e)return null;g=i.charCodeAt(n),t=-1}if(0===_){if(_=10,48===g){if(++n===e)return JSBI.__zero();if(g=i.charCodeAt(n),88===g||120===g){if(_=16,++n===e)return null;g=i.charCodeAt(n)}else if(79===g||111===g){if(_=8,++n===e)return null;g=i.charCodeAt(n)}else if(66===g||98===g){if(_=2,++n===e)return null;g=i.charCodeAt(n)}}}else if(16===_&&48===g){if(++n===e)return JSBI.__zero();if(g=i.charCodeAt(n),88===g||120===g){if(++n===e)return null;g=i.charCodeAt(n)}}if(0!=t&&10!==_)return null;for(;48===g;){if(++n===e)return JSBI.__zero();g=i.charCodeAt(n)}const o=e-n;let s=JSBI.__kMaxBitsPerChar[_],l=JSBI.__kBitsPerCharTableMultiplier-1;if(o>1073741824/s)return null;const r=s*o+l>>>JSBI.__kBitsPerCharTableShift,a=new JSBI(0|(r+29)/30,!1),u=10>_?_:10,h=10<_?_-10:0;if(0==(_&_-1)){s>>=JSBI.__kBitsPerCharTableShift;const _=[],t=[];let o=!1;do{let l=0,r=0;for(;;){let _;if(g-48>>>0<u)_=g-48;else if((32|g)-97>>>0<h)_=(32|g)-87;else{o=!0;break}if(r+=s,l=l<<s|_,++n===e){o=!0;break}if(g=i.charCodeAt(n),30<r+s)break}_.push(l),t.push(r)}while(!o);JSBI.__fillFromParts(a,_,t)}else{a.__initializeDigits();let t=!1,o=0;do{let r=0,b=1;for(;;){let s;if(g-48>>>0<u)s=g-48;else if((32|g)-97>>>0<h)s=(32|g)-87;else{t=!0;break}const l=b*_;if(1073741823<l)break;if(b=l,r=r*_+s,o++,++n===e){t=!0;break}g=i.charCodeAt(n)}l=30*JSBI.__kBitsPerCharTableMultiplier-1;const D=0|(s*o+l>>>JSBI.__kBitsPerCharTableShift)/30;a.__inplaceMultiplyAdd(b,r,D)}while(!t)}if(n!==e){if(!JSBI.__isWhitespace(g))return null;for(n++;n<e;n++)if(g=i.charCodeAt(n),!JSBI.__isWhitespace(g))return null}return a.sign=-1==t,a.__trim()}static __fillFromParts(_,t,e){let n=0,g=0,o=0;for(let s=t.length-1;0<=s;s--){const i=t[s],l=e[s];g|=i<<o,o+=l,30===o?(_.__setDigit(n++,g),o=0,g=0):30<o&&(_.__setDigit(n++,1073741823&g),o-=30,g=i>>>l-o)}if(0!==g){if(n>=_.length)throw new Error("implementation bug");_.__setDigit(n++,g)}for(;n<_.length;n++)_.__setDigit(n,0)}static __toStringBasePowerOfTwo(_,i){const t=_.length;let e=i-1;e=(85&e>>>1)+(85&e),e=(51&e>>>2)+(51&e),e=(15&e>>>4)+(15&e);const n=e,g=i-1,o=_.__digit(t-1),s=JSBI.__clz30(o);let l=0|(30*t-s+n-1)/n;if(_.sign&&l++,268435456<l)throw new Error("string too long");const r=Array(l);let a=l-1,u=0,d=0;for(let e=0;e<t-1;e++){const i=_.__digit(e),t=(u|i<<d)&g;r[a--]=JSBI.__kConversionChars[t];const o=n-d;for(u=i>>>o,d=30-o;d>=n;)r[a--]=JSBI.__kConversionChars[u&g],u>>>=n,d-=n}const h=(u|o<<d)&g;for(r[a--]=JSBI.__kConversionChars[h],u=o>>>n-d;0!==u;)r[a--]=JSBI.__kConversionChars[u&g],u>>>=n;if(_.sign&&(r[a--]="-"),-1!=a)throw new Error("implementation bug");return r.join("")}static __toStringGeneric(_,i,t){const e=_.length;if(0===e)return"";if(1===e){let e=_.__unsignedDigit(0).toString(i);return!1===t&&_.sign&&(e="-"+e),e}const n=30*e-JSBI.__clz30(_.__digit(e-1)),g=JSBI.__kMaxBitsPerChar[i],o=g-1;let s=n*JSBI.__kBitsPerCharTableMultiplier;s+=o-1,s=0|s/o;const l=s+1>>1,r=JSBI.exponentiate(JSBI.__oneDigit(i,!1),JSBI.__oneDigit(l,!1));let a,u;const d=r.__unsignedDigit(0);if(1===r.length&&32767>=d){a=new JSBI(_.length,!1),a.__initializeDigits();let t=0;for(let e=2*_.length-1;0<=e;e--){const i=t<<15|_.__halfDigit(e);a.__setHalfDigit(e,0|i/d),t=0|i%d}u=t.toString(i)}else{const t=JSBI.__absoluteDivLarge(_,r,!0,!0);a=t.quotient;const e=t.remainder.__trim();u=JSBI.__toStringGeneric(e,i,!0)}a.__trim();let h=JSBI.__toStringGeneric(a,i,!0);for(;u.length<l;)u="0"+u;return!1===t&&_.sign&&(h="-"+h),h+u}static __unequalSign(i){return i?-1:1}static __absoluteGreater(i){return i?-1:1}static __absoluteLess(i){return i?1:-1}static __compareToBigInt(i,_){const t=i.sign;if(t!==_.sign)return JSBI.__unequalSign(t);const e=JSBI.__absoluteCompare(i,_);return 0<e?JSBI.__absoluteGreater(t):0>e?JSBI.__absoluteLess(t):0}static __compareToNumber(i,_){if(JSBI.__isOneDigitInt(_)){const t=i.sign,e=0>_;if(t!==e)return JSBI.__unequalSign(t);if(0===i.length){if(e)throw new Error("implementation bug");return 0===_?0:-1}if(1<i.length)return JSBI.__absoluteGreater(t);const n=Math.abs(_),g=i.__unsignedDigit(0);return g>n?JSBI.__absoluteGreater(t):g<n?JSBI.__absoluteLess(t):0}return JSBI.__compareToDouble(i,_)}static __compareToDouble(i,_){if(_!==_)return _;if(_===1/0)return-1;if(_===-Infinity)return 1;const t=i.sign;if(t!==0>_)return JSBI.__unequalSign(t);if(0===_)throw new Error("implementation bug: should be handled elsewhere");if(0===i.length)return-1;JSBI.__kBitConversionDouble[0]=_;const e=2047&JSBI.__kBitConversionInts[JSBI.__kBitConversionIntHigh]>>>20;if(2047==e)throw new Error("implementation bug: handled elsewhere");const n=e-1023;if(0>n)return JSBI.__absoluteGreater(t);const g=i.length;let o=i.__digit(g-1);const s=JSBI.__clz30(o),l=30*g-s,r=n+1;if(l<r)return JSBI.__absoluteLess(t);if(l>r)return JSBI.__absoluteGreater(t);let a=1048576|1048575&JSBI.__kBitConversionInts[JSBI.__kBitConversionIntHigh],u=JSBI.__kBitConversionInts[JSBI.__kBitConversionIntLow];const d=20,h=29-s;if(h!==(0|(l-1)%30))throw new Error("implementation bug");let m,b=0;if(20>h){const i=d-h;b=i+32,m=a>>>i,a=a<<32-i|u>>>i,u<<=32-i}else if(20===h)b=32,m=a,a=u,u=0;else{const i=h-d;b=32-i,m=a<<i|u>>>32-i,a=u<<i,u=0}if(o>>>=0,m>>>=0,o>m)return JSBI.__absoluteGreater(t);if(o<m)return JSBI.__absoluteLess(t);for(let e=g-2;0<=e;e--){0<b?(b-=30,m=a>>>2,a=a<<30|u>>>2,u<<=30):m=0;const _=i.__unsignedDigit(e);if(_>m)return JSBI.__absoluteGreater(t);if(_<m)return JSBI.__absoluteLess(t)}if(0!==a||0!==u){if(0===b)throw new Error("implementation bug");return JSBI.__absoluteLess(t)}return 0}static __equalToNumber(i,_){var t=Math.abs;return JSBI.__isOneDigitInt(_)?0===_?0===i.length:1===i.length&&i.sign===0>_&&i.__unsignedDigit(0)===t(_):0===JSBI.__compareToDouble(i,_)}static __comparisonResultToBool(i,_){return 0===_?0>i:1===_?0>=i:2===_?0<i:3===_?0<=i:void 0}static __compare(i,_,t){if(i=JSBI.__toPrimitive(i),_=JSBI.__toPrimitive(_),"string"==typeof i&&"string"==typeof _)switch(t){case 0:return i<_;case 1:return i<=_;case 2:return i>_;case 3:return i>=_}if(JSBI.__isBigInt(i)&&"string"==typeof _)return _=JSBI.__fromString(_),null!==_&&JSBI.__comparisonResultToBool(JSBI.__compareToBigInt(i,_),t);if("string"==typeof i&&JSBI.__isBigInt(_))return i=JSBI.__fromString(i),null!==i&&JSBI.__comparisonResultToBool(JSBI.__compareToBigInt(i,_),t);if(i=JSBI.__toNumeric(i),_=JSBI.__toNumeric(_),JSBI.__isBigInt(i)){if(JSBI.__isBigInt(_))return JSBI.__comparisonResultToBool(JSBI.__compareToBigInt(i,_),t);if("number"!=typeof _)throw new Error("implementation bug");return JSBI.__comparisonResultToBool(JSBI.__compareToNumber(i,_),t)}if("number"!=typeof i)throw new Error("implementation bug");if(JSBI.__isBigInt(_))return JSBI.__comparisonResultToBool(JSBI.__compareToNumber(_,i),2^t);if("number"!=typeof _)throw new Error("implementation bug");return 0===t?i<_:1===t?i<=_:2===t?i>_:3===t?i>=_:void 0}__clzmsd(){return JSBI.__clz30(this.__digit(this.length-1))}static __absoluteAdd(_,t,e){if(_.length<t.length)return JSBI.__absoluteAdd(t,_,e);if(0===_.length)return _;if(0===t.length)return _.sign===e?_:JSBI.unaryMinus(_);let n=_.length;(0===_.__clzmsd()||t.length===_.length&&0===t.__clzmsd())&&n++;const g=new JSBI(n,e);let o=0,s=0;for(;s<t.length;s++){const i=_.__digit(s)+t.__digit(s)+o;o=i>>>30,g.__setDigit(s,1073741823&i)}for(;s<_.length;s++){const i=_.__digit(s)+o;o=i>>>30,g.__setDigit(s,1073741823&i)}return s<g.length&&g.__setDigit(s,o),g.__trim()}static __absoluteSub(_,t,e){if(0===_.length)return _;if(0===t.length)return _.sign===e?_:JSBI.unaryMinus(_);const n=new JSBI(_.length,e);let g=0,o=0;for(;o<t.length;o++){const i=_.__digit(o)-t.__digit(o)-g;g=1&i>>>30,n.__setDigit(o,1073741823&i)}for(;o<_.length;o++){const i=_.__digit(o)-g;g=1&i>>>30,n.__setDigit(o,1073741823&i)}return n.__trim()}static __absoluteAddOne(_,i,t=null){const e=_.length;null===t?t=new JSBI(e,i):t.sign=i;let n=1;for(let g=0;g<e;g++){const i=_.__digit(g)+n;n=i>>>30,t.__setDigit(g,1073741823&i)}return 0!=n&&t.__setDigitGrow(e,1),t}static __absoluteSubOne(_,t){const e=_.length;t=t||e;const n=new JSBI(t,!1);let g=1;for(let o=0;o<e;o++){const i=_.__digit(o)-g;g=1&i>>>30,n.__setDigit(o,1073741823&i)}if(0!=g)throw new Error("implementation bug");for(let g=e;g<t;g++)n.__setDigit(g,0);return n}static __absoluteAnd(_,t,e=null){let n=_.length,g=t.length,o=g;if(n<g){o=n;const i=_,e=n;_=t,n=g,t=i,g=e}let s=o;null===e?e=new JSBI(s,!1):s=e.length;let l=0;for(;l<o;l++)e.__setDigit(l,_.__digit(l)&t.__digit(l));for(;l<s;l++)e.__setDigit(l,0);return e}static __absoluteAndNot(_,t,e=null){const n=_.length,g=t.length;let o=g;n<g&&(o=n);let s=n;null===e?e=new JSBI(s,!1):s=e.length;let l=0;for(;l<o;l++)e.__setDigit(l,_.__digit(l)&~t.__digit(l));for(;l<n;l++)e.__setDigit(l,_.__digit(l));for(;l<s;l++)e.__setDigit(l,0);return e}static __absoluteOr(_,t,e=null){let n=_.length,g=t.length,o=g;if(n<g){o=n;const i=_,e=n;_=t,n=g,t=i,g=e}let s=n;null===e?e=new JSBI(s,!1):s=e.length;let l=0;for(;l<o;l++)e.__setDigit(l,_.__digit(l)|t.__digit(l));for(;l<n;l++)e.__setDigit(l,_.__digit(l));for(;l<s;l++)e.__setDigit(l,0);return e}static __absoluteXor(_,t,e=null){let n=_.length,g=t.length,o=g;if(n<g){o=n;const i=_,e=n;_=t,n=g,t=i,g=e}let s=n;null===e?e=new JSBI(s,!1):s=e.length;let l=0;for(;l<o;l++)e.__setDigit(l,_.__digit(l)^t.__digit(l));for(;l<n;l++)e.__setDigit(l,_.__digit(l));for(;l<s;l++)e.__setDigit(l,0);return e}static __absoluteCompare(_,t){const e=_.length-t.length;if(0!=e)return e;let n=_.length-1;for(;0<=n&&_.__digit(n)===t.__digit(n);)n--;return 0>n?0:_.__unsignedDigit(n)>t.__unsignedDigit(n)?1:-1}static __multiplyAccumulate(_,t,e,n){if(0===t)return;const g=32767&t,o=t>>>15;let s=0,l=0;for(let r,a=0;a<_.length;a++,n++){r=e.__digit(n);const i=_.__digit(a),t=32767&i,u=i>>>15,d=JSBI.__imul(t,g),h=JSBI.__imul(t,o),m=JSBI.__imul(u,g),b=JSBI.__imul(u,o);r+=l+d+s,s=r>>>30,r&=1073741823,r+=((32767&h)<<15)+((32767&m)<<15),s+=r>>>30,l=b+(h>>>15)+(m>>>15),e.__setDigit(n,1073741823&r)}for(;0!=s||0!==l;n++){let i=e.__digit(n);i+=s+l,l=0,s=i>>>30,e.__setDigit(n,1073741823&i)}}static __internalMultiplyAdd(_,t,e,g,o){let s=e,l=0;for(let n=0;n<g;n++){const i=_.__digit(n),e=JSBI.__imul(32767&i,t),g=JSBI.__imul(i>>>15,t),a=e+((32767&g)<<15)+l+s;s=a>>>30,l=g>>>15,o.__setDigit(n,1073741823&a)}if(o.length>g)for(o.__setDigit(g++,s+l);g<o.length;)o.__setDigit(g++,0);else if(0!==s+l)throw new Error("implementation bug")}__inplaceMultiplyAdd(i,_,t){t>this.length&&(t=this.length);const e=32767&i,n=i>>>15;let g=0,o=_;for(let s=0;s<t;s++){const i=this.__digit(s),_=32767&i,t=i>>>15,l=JSBI.__imul(_,e),r=JSBI.__imul(_,n),a=JSBI.__imul(t,e),u=JSBI.__imul(t,n);let d=o+l+g;g=d>>>30,d&=1073741823,d+=((32767&r)<<15)+((32767&a)<<15),g+=d>>>30,o=u+(r>>>15)+(a>>>15),this.__setDigit(s,1073741823&d)}if(0!=g||0!==o)throw new Error("implementation bug")}static __absoluteDivSmall(_,t,e=null){null===e&&(e=new JSBI(_.length,!1));let n=0;for(let g,o=2*_.length-1;0<=o;o-=2){g=(n<<15|_.__halfDigit(o))>>>0;const i=0|g/t;n=0|g%t,g=(n<<15|_.__halfDigit(o-1))>>>0;const s=0|g/t;n=0|g%t,e.__setDigit(o>>>1,i<<15|s)}return e}static __absoluteModSmall(_,t){let e=0;for(let n=2*_.length-1;0<=n;n--){const i=(e<<15|_.__halfDigit(n))>>>0;e=0|i%t}return e}static __absoluteDivLarge(i,_,t,e){const g=_.__halfDigitLength(),n=_.length,o=i.__halfDigitLength()-g;let s=null;t&&(s=new JSBI(o+2>>>1,!1),s.__initializeDigits());const l=new JSBI(g+2>>>1,!1);l.__initializeDigits();const r=JSBI.__clz15(_.__halfDigit(g-1));0<r&&(_=JSBI.__specialLeftShift(_,r,0));const a=JSBI.__specialLeftShift(i,r,1),u=_.__halfDigit(g-1);let d=0;for(let r,h=o;0<=h;h--){r=32767;const i=a.__halfDigit(h+g);if(i!==u){const t=(i<<15|a.__halfDigit(h+g-1))>>>0;r=0|t/u;let e=0|t%u;const n=_.__halfDigit(g-2),o=a.__halfDigit(h+g-2);for(;JSBI.__imul(r,n)>>>0>(e<<16|o)>>>0&&(r--,e+=u,!(32767<e)););}JSBI.__internalMultiplyAdd(_,r,0,n,l);let e=a.__inplaceSub(l,h,g+1);0!==e&&(e=a.__inplaceAdd(_,h,g),a.__setHalfDigit(h+g,32767&a.__halfDigit(h+g)+e),r--),t&&(1&h?d=r<<15:s.__setDigit(h>>>1,d|r))}if(e)return a.__inplaceRightShift(r),t?{quotient:s,remainder:a}:a;if(t)return s;throw new Error("unreachable")}static __clz15(i){return JSBI.__clz30(i)-15}__inplaceAdd(_,t,e){let n=0;for(let g=0;g<e;g++){const i=this.__halfDigit(t+g)+_.__halfDigit(g)+n;n=i>>>15,this.__setHalfDigit(t+g,32767&i)}return n}__inplaceSub(_,t,e){let n=0;if(1&t){t>>=1;let g=this.__digit(t),o=32767&g,s=0;for(;s<e-1>>>1;s++){const i=_.__digit(s),e=(g>>>15)-(32767&i)-n;n=1&e>>>15,this.__setDigit(t+s,(32767&e)<<15|32767&o),g=this.__digit(t+s+1),o=(32767&g)-(i>>>15)-n,n=1&o>>>15}const i=_.__digit(s),l=(g>>>15)-(32767&i)-n;n=1&l>>>15,this.__setDigit(t+s,(32767&l)<<15|32767&o);if(t+s+1>=this.length)throw new RangeError("out of bounds");0==(1&e)&&(g=this.__digit(t+s+1),o=(32767&g)-(i>>>15)-n,n=1&o>>>15,this.__setDigit(t+_.length,1073709056&g|32767&o))}else{t>>=1;let g=0;for(;g<_.length-1;g++){const i=this.__digit(t+g),e=_.__digit(g),o=(32767&i)-(32767&e)-n;n=1&o>>>15;const s=(i>>>15)-(e>>>15)-n;n=1&s>>>15,this.__setDigit(t+g,(32767&s)<<15|32767&o)}const i=this.__digit(t+g),o=_.__digit(g),s=(32767&i)-(32767&o)-n;n=1&s>>>15;let l=0;0==(1&e)&&(l=(i>>>15)-(o>>>15)-n,n=1&l>>>15),this.__setDigit(t+g,(32767&l)<<15|32767&s)}return n}__inplaceRightShift(_){if(0===_)return;let t=this.__digit(0)>>>_;const e=this.length-1;for(let n=0;n<e;n++){const i=this.__digit(n+1);this.__setDigit(n,1073741823&i<<30-_|t),t=i>>>_}this.__setDigit(e,t)}static __specialLeftShift(_,t,e){const g=_.length,n=new JSBI(g+e,!1);if(0===t){for(let t=0;t<g;t++)n.__setDigit(t,_.__digit(t));return 0<e&&n.__setDigit(g,0),n}let o=0;for(let s=0;s<g;s++){const i=_.__digit(s);n.__setDigit(s,1073741823&i<<t|o),o=i>>>30-t}return 0<e&&n.__setDigit(g,o),n}static __leftShiftByAbsolute(_,i){const t=JSBI.__toShiftAmount(i);if(0>t)throw new RangeError("BigInt too big");const e=0|t/30,n=t%30,g=_.length,o=0!==n&&0!=_.__digit(g-1)>>>30-n,s=g+e+(o?1:0),l=new JSBI(s,_.sign);if(0===n){let t=0;for(;t<e;t++)l.__setDigit(t,0);for(;t<s;t++)l.__setDigit(t,_.__digit(t-e))}else{let t=0;for(let _=0;_<e;_++)l.__setDigit(_,0);for(let o=0;o<g;o++){const i=_.__digit(o);l.__setDigit(o+e,1073741823&i<<n|t),t=i>>>30-n}if(o)l.__setDigit(g+e,t);else if(0!==t)throw new Error("implementation bug")}return l.__trim()}static __rightShiftByAbsolute(_,i){const t=_.length,e=_.sign,n=JSBI.__toShiftAmount(i);if(0>n)return JSBI.__rightShiftByMaximum(e);const g=0|n/30,o=n%30;let s=t-g;if(0>=s)return JSBI.__rightShiftByMaximum(e);let l=!1;if(e){if(0!=(_.__digit(g)&(1<<o)-1))l=!0;else for(let t=0;t<g;t++)if(0!==_.__digit(t)){l=!0;break}}if(l&&0===o){const i=_.__digit(t-1);0==~i&&s++}let r=new JSBI(s,e);if(0===o){r.__setDigit(s-1,0);for(let e=g;e<t;e++)r.__setDigit(e-g,_.__digit(e))}else{let e=_.__digit(g)>>>o;const n=t-g-1;for(let t=0;t<n;t++){const i=_.__digit(t+g+1);r.__setDigit(t,1073741823&i<<30-o|e),e=i>>>o}r.__setDigit(n,e)}return l&&(r=JSBI.__absoluteAddOne(r,!0,r)),r.__trim()}static __rightShiftByMaximum(i){return i?JSBI.__oneDigit(1,!0):JSBI.__zero()}static __toShiftAmount(i){if(1<i.length)return-1;const _=i.__unsignedDigit(0);return _>JSBI.__kMaxLengthBits?-1:_}static __toPrimitive(i,_="default"){if("object"!=typeof i)return i;if(i.constructor===JSBI)return i;if("undefined"!=typeof Symbol&&"symbol"==typeof Symbol.toPrimitive&&i[Symbol.toPrimitive]){const t=i[Symbol.toPrimitive](_);if("object"!=typeof t)return t;throw new TypeError("Cannot convert object to primitive value")}const t=i.valueOf;if(t){const _=t.call(i);if("object"!=typeof _)return _}const e=i.toString;if(e){const _=e.call(i);if("object"!=typeof _)return _}throw new TypeError("Cannot convert object to primitive value")}static __toNumeric(i){return JSBI.__isBigInt(i)?i:+i}static __isBigInt(i){return"object"==typeof i&&null!==i&&i.constructor===JSBI}static __truncateToNBits(i,_){const t=0|(i+29)/30,e=new JSBI(t,_.sign),n=t-1;for(let t=0;t<n;t++)e.__setDigit(t,_.__digit(t));let g=_.__digit(n);if(0!=i%30){const _=32-i%30;g=g<<_>>>_}return e.__setDigit(n,g),e.__trim()}static __truncateAndSubFromPowerOfTwo(_,t,e){var n=Math.min;const g=0|(_+29)/30,o=new JSBI(g,e);let s=0;const l=g-1;let a=0;for(const i=n(l,t.length);s<i;s++){const i=0-t.__digit(s)-a;a=1&i>>>30,o.__setDigit(s,1073741823&i)}for(;s<l;s++)o.__setDigit(s,0|1073741823&-a);let u=l<t.length?t.__digit(l):0;const d=_%30;let h;if(0==d)h=0-u-a,h&=1073741823;else{const i=32-d;u=u<<i>>>i;const _=1<<32-i;h=_-u-a,h&=_-1}return o.__setDigit(l,h),o.__trim()}__digit(_){return this[_]}__unsignedDigit(_){return this[_]>>>0}__setDigit(_,i){this[_]=0|i}__setDigitGrow(_,i){this[_]=0|i}__halfDigitLength(){const i=this.length;return 32767>=this.__unsignedDigit(i-1)?2*i-1:2*i}__halfDigit(_){return 32767&this[_>>>1]>>>15*(1&_)}__setHalfDigit(_,i){const t=_>>>1,e=this.__digit(t),n=1&_?32767&e|i<<15:1073709056&e|32767&i;this.__setDigit(t,n)}static __digitPow(i,_){let t=1;for(;0<_;)1&_&&(t*=i),_>>>=1,i*=i;return t}static __detectBigEndian(){return JSBI.__kBitConversionDouble[0]=-0,0!==JSBI.__kBitConversionInts[0]}static __isOneDigitInt(i){return(1073741823&i)===i}}JSBI.__kMaxLength=33554432,JSBI.__kMaxLengthBits=JSBI.__kMaxLength<<5,JSBI.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],JSBI.__kBitsPerCharTableShift=5,JSBI.__kBitsPerCharTableMultiplier=1<<JSBI.__kBitsPerCharTableShift,JSBI.__kConversionChars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],JSBI.__kBitConversionBuffer=new ArrayBuffer(8),JSBI.__kBitConversionDouble=new Float64Array(JSBI.__kBitConversionBuffer),JSBI.__kBitConversionInts=new Int32Array(JSBI.__kBitConversionBuffer),JSBI.__kBitConversionIntHigh=JSBI.__detectBigEndian()?0:1,JSBI.__kBitConversionIntLow=JSBI.__detectBigEndian()?1:0,JSBI.__clz30=Math.clz32?function(i){return Math.clz32(i)-2}:function(i){return 0===i?30:0|29-(0|Math.log(i>>>0)/Math.LN2)},JSBI.__imul=Math.imul||function(i,_){return 0|i*_},module.exports=JSBI;
2
+ //# sourceMappingURL=jsbi-cjs.js.map