@dmsi/wedgekit-react 1.0.1 → 2.0.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 (282) hide show
  1. package/dist/classNames.d.ts +1 -0
  2. package/dist/classNames.d.ts.map +1 -1
  3. package/dist/classNames.js +150 -0
  4. package/dist/components/AccessCard.js +63 -0
  5. package/dist/components/AccessCardGroup.js +73 -0
  6. package/dist/components/AccessChangerTabItem.js +51 -0
  7. package/dist/components/Accordion.js +99 -0
  8. package/dist/components/Alert.d.ts.map +1 -1
  9. package/dist/components/Alert.js +78 -0
  10. package/dist/components/Breadcrumbs.js +111 -0
  11. package/dist/components/Button.js +137 -0
  12. package/dist/components/CalendarRange.js +405 -0
  13. package/dist/components/Caption.js +99 -0
  14. package/dist/components/Card.js +50 -0
  15. package/dist/components/Checkbox.js +108 -0
  16. package/dist/components/CompactImagesPreview.d.ts.map +1 -1
  17. package/dist/components/CompactImagesPreview.js +120 -0
  18. package/dist/components/ContentTab.js +68 -0
  19. package/dist/components/ContentTabs.js +96 -0
  20. package/dist/components/DMSiLogo.js +54 -0
  21. package/dist/components/DataGrid/ColumnSelectorHeaderCell/ColumnSelectorMenuOption.js +27 -0
  22. package/dist/components/DataGrid/ColumnSelectorHeaderCell/index.js +79 -0
  23. package/dist/components/DataGrid/PinnedColumns.d.ts +9 -2
  24. package/dist/components/DataGrid/PinnedColumns.d.ts.map +1 -1
  25. package/dist/components/DataGrid/PinnedColumns.js +165 -0
  26. package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts +18 -0
  27. package/dist/components/DataGrid/SummaryRow/SummaryCell.d.ts.map +1 -0
  28. package/dist/components/DataGrid/SummaryRow/SummaryCell.js +51 -0
  29. package/dist/components/DataGrid/SummaryRow/aggregations.d.ts +39 -0
  30. package/dist/components/DataGrid/SummaryRow/aggregations.d.ts.map +1 -0
  31. package/dist/components/DataGrid/SummaryRow/aggregations.js +55 -0
  32. package/dist/components/DataGrid/SummaryRow/index.d.ts +18 -0
  33. package/dist/components/DataGrid/SummaryRow/index.d.ts.map +1 -0
  34. package/dist/components/DataGrid/SummaryRow/index.js +86 -0
  35. package/dist/components/DataGrid/TableBody/GroupRow.d.ts +18 -0
  36. package/dist/components/DataGrid/TableBody/GroupRow.d.ts.map +1 -0
  37. package/dist/components/DataGrid/TableBody/GroupRow.js +243 -0
  38. package/dist/components/DataGrid/TableBody/LoadingCell.js +33 -0
  39. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts +3 -2
  40. package/dist/components/DataGrid/TableBody/TableBodyRow.d.ts.map +1 -1
  41. package/dist/components/DataGrid/TableBody/TableBodyRow.js +136 -0
  42. package/dist/components/DataGrid/TableBody/index.d.ts +3 -1
  43. package/dist/components/DataGrid/TableBody/index.d.ts.map +1 -1
  44. package/dist/components/DataGrid/TableBody/index.js +161 -0
  45. package/dist/components/DataGrid/index.d.ts +1 -1
  46. package/dist/components/DataGrid/index.d.ts.map +1 -1
  47. package/dist/components/DataGrid/index.js +696 -0
  48. package/dist/components/DataGrid/types.d.ts +141 -1
  49. package/dist/components/DataGrid/types.d.ts.map +1 -1
  50. package/dist/components/DataGrid/utils.d.ts +2 -0
  51. package/dist/components/DataGrid/utils.d.ts.map +1 -1
  52. package/dist/components/DataGrid/utils.js +20 -0
  53. package/dist/components/DataGridCell.d.ts +5 -2
  54. package/dist/components/DataGridCell.d.ts.map +1 -1
  55. package/dist/components/DataGridCell.js +412 -0
  56. package/dist/components/DataTable.js +700 -0
  57. package/dist/components/DateInput.js +193 -0
  58. package/dist/components/DateRangeInput.js +368 -0
  59. package/dist/components/DebugJson.js +28 -0
  60. package/dist/components/Display.js +46 -0
  61. package/dist/components/EditingContext.js +34 -0
  62. package/dist/components/EmblaCarousel/ArrowButtons.js +83 -0
  63. package/dist/components/EmblaCarousel/SelectedSnapDisplay.js +12 -0
  64. package/dist/components/EmblaCarousel/index.js +153 -0
  65. package/dist/components/EmblaCarousel/usePrevNextButtons.js +21 -0
  66. package/dist/components/EmblaCarousel/useSelectedSnapDisplay.js +15 -0
  67. package/dist/components/EmptyCartIcon.js +25 -0
  68. package/dist/components/FilterGroup.d.ts +5 -3
  69. package/dist/components/FilterGroup.d.ts.map +1 -1
  70. package/dist/components/FilterGroup.js +198 -0
  71. package/dist/components/FullViewportBox.js +19 -0
  72. package/dist/components/Grid.js +54 -0
  73. package/dist/components/Heading.js +50 -0
  74. package/dist/components/HorizontalDivider.js +20 -0
  75. package/dist/components/Icon.d.ts +5 -2
  76. package/dist/components/Icon.d.ts.map +1 -1
  77. package/dist/components/Icon.js +73 -0
  78. package/dist/components/ImagePlaceholder.js +22 -0
  79. package/dist/components/Input.d.ts +11 -9
  80. package/dist/components/Input.d.ts.map +1 -1
  81. package/dist/components/Input.js +469 -0
  82. package/dist/components/InputGroup.js +45 -0
  83. package/dist/components/Label.js +37 -0
  84. package/dist/components/Link.js +69 -0
  85. package/dist/components/List.js +12 -0
  86. package/dist/components/ListGroup.d.ts.map +1 -1
  87. package/dist/components/ListGroup.js +54 -0
  88. package/dist/components/LiveChatComponent.js +25 -0
  89. package/dist/components/LoadingScrim.js +22 -0
  90. package/dist/components/LogoAgilityTopBar.js +90 -0
  91. package/dist/components/LogoDMSiTopBar.js +54 -0
  92. package/dist/components/LogoMillworkTopBar.js +196 -0
  93. package/dist/components/MainBar.js +58 -0
  94. package/dist/components/MaxViewportBox.js +19 -0
  95. package/dist/components/Menu.d.ts.map +1 -1
  96. package/dist/components/Menu.js +202 -0
  97. package/dist/components/MenuOption.js +161 -0
  98. package/dist/components/MobileDataGrid/ColumnList.js +85 -0
  99. package/dist/components/MobileDataGrid/ColumnSelector/index.js +100 -0
  100. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.d.ts.map +1 -1
  101. package/dist/components/MobileDataGrid/GridContextProvider/GridContext.js +6 -0
  102. package/dist/components/MobileDataGrid/GridContextProvider/index.js +80 -0
  103. package/dist/components/MobileDataGrid/GridContextProvider/useGridContext.js +11 -0
  104. package/dist/components/MobileDataGrid/MobileDataGridCard/MobileDataGridColumn.js +18 -0
  105. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts +2 -1
  106. package/dist/components/MobileDataGrid/MobileDataGridCard/index.d.ts.map +1 -1
  107. package/dist/components/MobileDataGrid/MobileDataGridCard/index.js +130 -0
  108. package/dist/components/MobileDataGrid/MobileDataGridHeader.d.ts.map +1 -1
  109. package/dist/components/MobileDataGrid/MobileDataGridHeader.js +67 -0
  110. package/dist/components/MobileDataGrid/RowDetailModalProvider/ModalContent.js +42 -0
  111. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.d.ts.map +1 -1
  112. package/dist/components/MobileDataGrid/RowDetailModalProvider/index.js +58 -0
  113. package/dist/components/MobileDataGrid/dataGridReducer.js +28 -0
  114. package/dist/components/MobileDataGrid/index.d.ts +1 -1
  115. package/dist/components/MobileDataGrid/index.d.ts.map +1 -1
  116. package/dist/components/MobileDataGrid/index.js +78 -0
  117. package/dist/components/MobileNavMenu.d.ts.map +1 -1
  118. package/dist/components/MobileNavMenu.js +173 -0
  119. package/dist/components/Modal.d.ts +1 -2
  120. package/dist/components/Modal.d.ts.map +1 -1
  121. package/dist/components/Modal.js +201 -0
  122. package/dist/components/ModalButtons.d.ts.map +1 -1
  123. package/dist/components/ModalButtons.js +57 -0
  124. package/dist/components/ModalContent.d.ts +1 -2
  125. package/dist/components/ModalContent.d.ts.map +1 -1
  126. package/dist/components/ModalContent.js +24 -0
  127. package/dist/components/ModalHeader.js +74 -0
  128. package/dist/components/ModalScrim.js +32 -0
  129. package/dist/components/NavigationTab.js +72 -0
  130. package/dist/components/NavigationTabs.js +45 -0
  131. package/dist/components/NestedMenu.d.ts.map +1 -1
  132. package/dist/components/NestedMenu.js +119 -0
  133. package/dist/components/Notification.js +91 -0
  134. package/dist/components/OptionPill.d.ts +2 -1
  135. package/dist/components/OptionPill.d.ts.map +1 -1
  136. package/dist/components/OptionPill.js +103 -0
  137. package/dist/components/OrderCheckIcon.js +28 -0
  138. package/dist/components/PDFViewer/DownloadIcon.js +25 -0
  139. package/dist/components/PDFViewer/PDFElement.js +77 -0
  140. package/dist/components/PDFViewer/PDFNavigation.js +64 -0
  141. package/dist/components/PDFViewer/PDFPage.js +28 -0
  142. package/dist/components/PDFViewer/index.d.ts.map +1 -1
  143. package/dist/components/PDFViewer/index.js +124 -0
  144. package/dist/components/Pagination.d.ts.map +1 -1
  145. package/dist/components/Pagination.js +117 -0
  146. package/dist/components/Paragraph.js +43 -0
  147. package/dist/components/Password.js +47 -0
  148. package/dist/components/ProductImagePreview/CarouselPagination.js +48 -0
  149. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts +2 -1
  150. package/dist/components/ProductImagePreview/MobileImageCarousel.d.ts.map +1 -1
  151. package/dist/components/ProductImagePreview/MobileImageCarousel.js +146 -0
  152. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts +2 -1
  153. package/dist/components/ProductImagePreview/ProductPrimaryImage.d.ts.map +1 -1
  154. package/dist/components/ProductImagePreview/ProductPrimaryImage.js +138 -0
  155. package/dist/components/ProductImagePreview/Thumbnail.d.ts +2 -1
  156. package/dist/components/ProductImagePreview/Thumbnail.d.ts.map +1 -1
  157. package/dist/components/ProductImagePreview/Thumbnail.js +46 -0
  158. package/dist/components/ProductImagePreview/ZoomWindow.js +74 -0
  159. package/dist/components/ProductImagePreview/index.d.ts.map +1 -1
  160. package/dist/components/ProductImagePreview/index.js +189 -0
  161. package/dist/components/ProductImagePreview/useProductImagePreview.js +85 -0
  162. package/dist/components/ProjectBar.d.ts +1 -1
  163. package/dist/components/ProjectBar.js +54 -0
  164. package/dist/components/Radio.js +113 -0
  165. package/dist/components/Search.js +89 -0
  166. package/dist/components/SearchResultImage/index.js +26 -0
  167. package/dist/components/Select.js +122 -0
  168. package/dist/components/SideMenu.js +24 -0
  169. package/dist/components/SideMenuGroup.js +80 -0
  170. package/dist/components/SideMenuItem.js +79 -0
  171. package/dist/components/SimpleTable.js +60 -0
  172. package/dist/components/SkeletonParagraph.js +24 -0
  173. package/dist/components/Spinner.d.ts +1 -1
  174. package/dist/components/Spinner.d.ts.map +1 -1
  175. package/dist/components/Spinner.js +30 -0
  176. package/dist/components/Stack.js +174 -0
  177. package/dist/components/StatusPill.js +44 -0
  178. package/dist/components/Stepper.js +138 -0
  179. package/dist/components/Subheader.d.ts +2 -1
  180. package/dist/components/Subheader.d.ts.map +1 -1
  181. package/dist/components/Subheader.js +41 -0
  182. package/dist/components/Surface.js +30 -0
  183. package/dist/components/Swatch.js +1498 -0
  184. package/dist/components/Textarea.js +106 -0
  185. package/dist/components/Theme.d.ts +1 -1
  186. package/dist/components/Theme.d.ts.map +1 -1
  187. package/dist/components/Theme.js +25 -0
  188. package/dist/components/Time.d.ts +2 -1
  189. package/dist/components/Time.d.ts.map +1 -1
  190. package/dist/components/Time.js +225 -0
  191. package/dist/components/Toast.d.ts +4 -3
  192. package/dist/components/Toast.d.ts.map +1 -1
  193. package/dist/components/Toast.js +170 -0
  194. package/dist/components/Tooltip.js +102 -0
  195. package/dist/components/TopBar.d.ts.map +1 -1
  196. package/dist/components/TopBar.js +119 -0
  197. package/dist/components/Upload.js +107 -0
  198. package/dist/components/WorldpayIframe.d.ts.map +1 -1
  199. package/dist/components/WorldpayIframe.js +19 -0
  200. package/dist/hooks/useEditCell.js +23 -0
  201. package/dist/hooks/useInfiniteScroll.js +25 -0
  202. package/dist/hooks/useKeydown.js +20 -0
  203. package/dist/hooks/useMatchesMedia.js +15 -0
  204. package/dist/hooks/useMenuSystem.js +186 -0
  205. package/dist/hooks/useMounted.js +9 -0
  206. package/dist/hooks/useTableLayout/computeColumns.js +59 -0
  207. package/dist/hooks/useTableLayout/storage.js +64 -0
  208. package/dist/hooks/useTableLayout/useTableLayout.js +163 -0
  209. package/dist/index.js +249 -52864
  210. package/dist/lib/loadFonts.js +11 -0
  211. package/dist/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +56 -0
  212. package/dist/node_modules/@dnd-kit/core/dist/core.esm.js +2299 -0
  213. package/dist/node_modules/@dnd-kit/modifiers/dist/modifiers.esm.js +13 -0
  214. package/dist/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +367 -0
  215. package/dist/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +235 -0
  216. package/dist/node_modules/@headlessui/react/dist/components/description/description.js +45 -0
  217. package/dist/node_modules/@headlessui/react/dist/components/keyboard.js +4 -0
  218. package/dist/node_modules/@headlessui/react/dist/components/label/label.js +62 -0
  219. package/dist/node_modules/@headlessui/react/dist/components/switch/switch.js +56 -0
  220. package/dist/node_modules/@headlessui/react/dist/hooks/use-active-press.js +33 -0
  221. package/dist/node_modules/@headlessui/react/dist/hooks/use-controllable.js +10 -0
  222. package/dist/node_modules/@headlessui/react/dist/hooks/use-default-value.js +8 -0
  223. package/dist/node_modules/@headlessui/react/dist/hooks/use-disposables.js +9 -0
  224. package/dist/node_modules/@headlessui/react/dist/hooks/use-event.js +9 -0
  225. package/dist/node_modules/@headlessui/react/dist/hooks/use-iso-morphic-effect.js +8 -0
  226. package/dist/node_modules/@headlessui/react/dist/hooks/use-latest-value.js +11 -0
  227. package/dist/node_modules/@headlessui/react/dist/hooks/use-resolve-button-type.js +12 -0
  228. package/dist/node_modules/@headlessui/react/dist/hooks/use-slot.js +7 -0
  229. package/dist/node_modules/@headlessui/react/dist/hooks/use-sync-refs.js +16 -0
  230. package/dist/node_modules/@headlessui/react/dist/internal/disabled.js +8 -0
  231. package/dist/node_modules/@headlessui/react/dist/internal/form-fields.js +35 -0
  232. package/dist/node_modules/@headlessui/react/dist/internal/hidden.js +13 -0
  233. package/dist/node_modules/@headlessui/react/dist/internal/id.js +8 -0
  234. package/dist/node_modules/@headlessui/react/dist/utils/bugs.js +19 -0
  235. package/dist/node_modules/@headlessui/react/dist/utils/class-names.js +6 -0
  236. package/dist/node_modules/@headlessui/react/dist/utils/disposables.js +40 -0
  237. package/dist/node_modules/@headlessui/react/dist/utils/dom.js +34 -0
  238. package/dist/node_modules/@headlessui/react/dist/utils/env.js +34 -0
  239. package/dist/node_modules/@headlessui/react/dist/utils/form.js +32 -0
  240. package/dist/node_modules/@headlessui/react/dist/utils/match.js +11 -0
  241. package/dist/node_modules/@headlessui/react/dist/utils/micro-task.js +8 -0
  242. package/dist/node_modules/@headlessui/react/dist/utils/owner.js +8 -0
  243. package/dist/node_modules/@headlessui/react/dist/utils/render.js +126 -0
  244. package/dist/node_modules/@js-temporal/polyfill/dist/index.esm.js +3913 -0
  245. package/dist/node_modules/@mikecousins/react-pdf/dist/index.js +83 -0
  246. package/dist/node_modules/@react-aria/focus/dist/useFocusRing.js +38 -0
  247. package/dist/node_modules/@react-aria/interactions/dist/useFocus.js +31 -0
  248. package/dist/node_modules/@react-aria/interactions/dist/useFocusVisible.js +99 -0
  249. package/dist/node_modules/@react-aria/interactions/dist/useFocusWithin.js +59 -0
  250. package/dist/node_modules/@react-aria/interactions/dist/useHover.js +86 -0
  251. package/dist/node_modules/@react-aria/interactions/dist/utils.js +68 -0
  252. package/dist/node_modules/@react-aria/utils/dist/DOMFunctions.js +32 -0
  253. package/dist/node_modules/@react-aria/utils/dist/domHelpers.js +15 -0
  254. package/dist/node_modules/@react-aria/utils/dist/focusWithoutScrolling.js +45 -0
  255. package/dist/node_modules/@react-aria/utils/dist/isVirtualEvent.js +7 -0
  256. package/dist/node_modules/@react-aria/utils/dist/openLink.js +28 -0
  257. package/dist/node_modules/@react-aria/utils/dist/platform.js +47 -0
  258. package/dist/node_modules/@react-aria/utils/dist/useGlobalListeners.js +34 -0
  259. package/dist/node_modules/@react-aria/utils/dist/useLayoutEffect.js +6 -0
  260. package/dist/node_modules/@react-stately/flags/dist/import.js +7 -0
  261. package/dist/node_modules/@tanstack/react-table/build/lib/index.js +94 -0
  262. package/dist/node_modules/@tanstack/react-virtual/dist/esm/index.js +38 -0
  263. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1954 -0
  264. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +575 -0
  265. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
  266. package/dist/node_modules/clsx/dist/clsx.js +17 -0
  267. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1204 -0
  268. package/dist/node_modules/embla-carousel-autoplay/esm/embla-carousel-autoplay.esm.js +126 -0
  269. package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +24 -0
  270. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +35 -0
  271. package/dist/node_modules/jsbi/dist/jsbi.js +1040 -0
  272. package/dist/node_modules/react-use/esm/usePrevious.js +10 -0
  273. package/dist/static/no-results-image.png.js +4 -0
  274. package/dist/styles.css +1 -1
  275. package/dist/utils/date-patch-dashes.js +28 -0
  276. package/dist/utils/date.js +95 -0
  277. package/dist/utils/formatting.js +22 -0
  278. package/dist/utils/index.js +4 -0
  279. package/dist/utils/mergeObjectArrays.js +18 -0
  280. package/dist/utils.js +20 -0
  281. package/package.json +1 -1
  282. /package/dist/{pdf-l6QfMa5e.js → node_modules/pdfjs-dist/build/pdf.js} +0 -0
@@ -0,0 +1,1040 @@
1
+ class i extends Array {
2
+ constructor(t, e) {
3
+ if (super(t), this.sign = e, Object.setPrototypeOf(this, i.prototype), t > i.__kMaxLength) throw new RangeError("Maximum BigInt size exceeded");
4
+ }
5
+ static BigInt(t) {
6
+ var e = Math.floor, r = Number.isFinite;
7
+ if (typeof t == "number") {
8
+ if (t === 0) return i.__zero();
9
+ if (i.__isOneDigitInt(t)) return 0 > t ? i.__oneDigit(-t, !0) : i.__oneDigit(t, !1);
10
+ if (!r(t) || e(t) !== t) throw new RangeError("The number " + t + " cannot be converted to BigInt because it is not an integer");
11
+ return i.__fromDouble(t);
12
+ }
13
+ if (typeof t == "string") {
14
+ const o = i.__fromString(t);
15
+ if (o === null) throw new SyntaxError("Cannot convert " + t + " to a BigInt");
16
+ return o;
17
+ }
18
+ if (typeof t == "boolean") return t === !0 ? i.__oneDigit(1, !1) : i.__zero();
19
+ if (typeof t == "object") {
20
+ if (t.constructor === i) return t;
21
+ const o = i.__toPrimitive(t);
22
+ return i.BigInt(o);
23
+ }
24
+ throw new TypeError("Cannot convert " + t + " to a BigInt");
25
+ }
26
+ toDebugString() {
27
+ const t = ["BigInt["];
28
+ for (const e of this) t.push((e && (e >>> 0).toString(16)) + ", ");
29
+ return t.push("]"), t.join("");
30
+ }
31
+ toString(t = 10) {
32
+ if (2 > t || 36 < t) throw new RangeError("toString() radix argument must be between 2 and 36");
33
+ return this.length === 0 ? "0" : (t & t - 1) == 0 ? i.__toStringBasePowerOfTwo(this, t) : i.__toStringGeneric(this, t, !1);
34
+ }
35
+ valueOf() {
36
+ throw new Error("Convert JSBI instances to native numbers using `toNumber`.");
37
+ }
38
+ static toNumber(t) {
39
+ const e = t.length;
40
+ if (e === 0) return 0;
41
+ if (e === 1) {
42
+ const b = t.__unsignedDigit(0);
43
+ return t.sign ? -b : b;
44
+ }
45
+ const r = t.__digit(e - 1), o = i.__clz30(r), n = 30 * e - o;
46
+ if (1024 < n) return t.sign ? -1 / 0 : 1 / 0;
47
+ let s = n - 1, l = r, g = e - 1;
48
+ const a = o + 3;
49
+ let _ = a === 32 ? 0 : l << a;
50
+ _ >>>= 12;
51
+ const u = a - 12;
52
+ let f = 12 <= a ? 0 : l << 20 + a, h = 20 + a;
53
+ for (0 < u && 0 < g && (g--, l = t.__digit(g), _ |= l >>> 30 - u, f = l << u + 2, h = u + 2); 0 < h && 0 < g; ) g--, l = t.__digit(g), f |= 30 <= h ? l << h - 30 : l >>> 30 - h, h -= 30;
54
+ const d = i.__decideRounding(t, h, g, l);
55
+ if ((d === 1 || d === 0 && (1 & f) == 1) && (f = f + 1 >>> 0, f === 0 && (_++, _ >>> 20 != 0 && (_ = 0, s++, 1023 < s)))) return t.sign ? -1 / 0 : 1 / 0;
56
+ const c = t.sign ? -2147483648 : 0;
57
+ return s = s + 1023 << 20, i.__kBitConversionInts[i.__kBitConversionIntHigh] = c | s | _, i.__kBitConversionInts[i.__kBitConversionIntLow] = f, i.__kBitConversionDouble[0];
58
+ }
59
+ static unaryMinus(t) {
60
+ if (t.length === 0) return t;
61
+ const e = t.__copy();
62
+ return e.sign = !t.sign, e;
63
+ }
64
+ static bitwiseNot(t) {
65
+ return t.sign ? i.__absoluteSubOne(t).__trim() : i.__absoluteAddOne(t, !0);
66
+ }
67
+ static exponentiate(t, e) {
68
+ if (e.sign) throw new RangeError("Exponent must be positive");
69
+ if (e.length === 0) return i.__oneDigit(1, !1);
70
+ if (t.length === 0) return t;
71
+ if (t.length === 1 && t.__digit(0) === 1) return t.sign && (1 & e.__digit(0)) == 0 ? i.unaryMinus(t) : t;
72
+ if (1 < e.length) throw new RangeError("BigInt too big");
73
+ let r = e.__unsignedDigit(0);
74
+ if (r === 1) return t;
75
+ if (r >= i.__kMaxLengthBits) throw new RangeError("BigInt too big");
76
+ if (t.length === 1 && t.__digit(0) === 2) {
77
+ const s = 1 + (0 | r / 30), l = t.sign && (1 & r) != 0, g = new i(s, l);
78
+ g.__initializeDigits();
79
+ const a = 1 << r % 30;
80
+ return g.__setDigit(s - 1, a), g;
81
+ }
82
+ let o = null, n = t;
83
+ for ((1 & r) != 0 && (o = t), r >>= 1; r !== 0; r >>= 1) n = i.multiply(n, n), (1 & r) != 0 && (o === null ? o = n : o = i.multiply(o, n));
84
+ return o;
85
+ }
86
+ static multiply(t, e) {
87
+ if (t.length === 0) return t;
88
+ if (e.length === 0) return e;
89
+ let r = t.length + e.length;
90
+ 30 <= t.__clzmsd() + e.__clzmsd() && r--;
91
+ const o = new i(r, t.sign !== e.sign);
92
+ o.__initializeDigits();
93
+ for (let n = 0; n < t.length; n++) i.__multiplyAccumulate(e, t.__digit(n), o, n);
94
+ return o.__trim();
95
+ }
96
+ static divide(t, e) {
97
+ if (e.length === 0) throw new RangeError("Division by zero");
98
+ if (0 > i.__absoluteCompare(t, e)) return i.__zero();
99
+ const r = t.sign !== e.sign, o = e.__unsignedDigit(0);
100
+ let n;
101
+ if (e.length === 1 && 32767 >= o) {
102
+ if (o === 1) return r === t.sign ? t : i.unaryMinus(t);
103
+ n = i.__absoluteDivSmall(t, o, null);
104
+ } else n = i.__absoluteDivLarge(t, e, !0, !1);
105
+ return n.sign = r, n.__trim();
106
+ }
107
+ static remainder(t, e) {
108
+ if (e.length === 0) throw new RangeError("Division by zero");
109
+ if (0 > i.__absoluteCompare(t, e)) return t;
110
+ const r = e.__unsignedDigit(0);
111
+ if (e.length === 1 && 32767 >= r) {
112
+ if (r === 1) return i.__zero();
113
+ const n = i.__absoluteModSmall(t, r);
114
+ return n === 0 ? i.__zero() : i.__oneDigit(n, t.sign);
115
+ }
116
+ const o = i.__absoluteDivLarge(t, e, !1, !0);
117
+ return o.sign = t.sign, o.__trim();
118
+ }
119
+ static add(t, e) {
120
+ const r = t.sign;
121
+ return r === e.sign ? i.__absoluteAdd(t, e, r) : 0 <= i.__absoluteCompare(t, e) ? i.__absoluteSub(t, e, r) : i.__absoluteSub(e, t, !r);
122
+ }
123
+ static subtract(t, e) {
124
+ const r = t.sign;
125
+ return r === e.sign ? 0 <= i.__absoluteCompare(t, e) ? i.__absoluteSub(t, e, r) : i.__absoluteSub(e, t, !r) : i.__absoluteAdd(t, e, r);
126
+ }
127
+ static leftShift(t, e) {
128
+ return e.length === 0 || t.length === 0 ? t : e.sign ? i.__rightShiftByAbsolute(t, e) : i.__leftShiftByAbsolute(t, e);
129
+ }
130
+ static signedRightShift(t, e) {
131
+ return e.length === 0 || t.length === 0 ? t : e.sign ? i.__leftShiftByAbsolute(t, e) : i.__rightShiftByAbsolute(t, e);
132
+ }
133
+ static unsignedRightShift() {
134
+ throw new TypeError("BigInts have no unsigned right shift; use >> instead");
135
+ }
136
+ static lessThan(t, e) {
137
+ return 0 > i.__compareToBigInt(t, e);
138
+ }
139
+ static lessThanOrEqual(t, e) {
140
+ return 0 >= i.__compareToBigInt(t, e);
141
+ }
142
+ static greaterThan(t, e) {
143
+ return 0 < i.__compareToBigInt(t, e);
144
+ }
145
+ static greaterThanOrEqual(t, e) {
146
+ return 0 <= i.__compareToBigInt(t, e);
147
+ }
148
+ static equal(t, e) {
149
+ if (t.sign !== e.sign || t.length !== e.length) return !1;
150
+ for (let r = 0; r < t.length; r++) if (t.__digit(r) !== e.__digit(r)) return !1;
151
+ return !0;
152
+ }
153
+ static notEqual(t, e) {
154
+ return !i.equal(t, e);
155
+ }
156
+ static bitwiseAnd(t, e) {
157
+ var r = Math.max;
158
+ if (!t.sign && !e.sign) return i.__absoluteAnd(t, e).__trim();
159
+ if (t.sign && e.sign) {
160
+ const o = r(t.length, e.length) + 1;
161
+ let n = i.__absoluteSubOne(t, o);
162
+ const s = i.__absoluteSubOne(e);
163
+ return n = i.__absoluteOr(n, s, n), i.__absoluteAddOne(n, !0, n).__trim();
164
+ }
165
+ return t.sign && ([t, e] = [e, t]), i.__absoluteAndNot(t, i.__absoluteSubOne(e)).__trim();
166
+ }
167
+ static bitwiseXor(t, e) {
168
+ var r = Math.max;
169
+ if (!t.sign && !e.sign) return i.__absoluteXor(t, e).__trim();
170
+ if (t.sign && e.sign) {
171
+ const s = r(t.length, e.length), l = i.__absoluteSubOne(t, s), g = i.__absoluteSubOne(e);
172
+ return i.__absoluteXor(l, g, l).__trim();
173
+ }
174
+ const o = r(t.length, e.length) + 1;
175
+ t.sign && ([t, e] = [e, t]);
176
+ let n = i.__absoluteSubOne(e, o);
177
+ return n = i.__absoluteXor(n, t, n), i.__absoluteAddOne(n, !0, n).__trim();
178
+ }
179
+ static bitwiseOr(t, e) {
180
+ var r = Math.max;
181
+ const o = r(t.length, e.length);
182
+ if (!t.sign && !e.sign) return i.__absoluteOr(t, e).__trim();
183
+ if (t.sign && e.sign) {
184
+ let s = i.__absoluteSubOne(t, o);
185
+ const l = i.__absoluteSubOne(e);
186
+ return s = i.__absoluteAnd(s, l, s), i.__absoluteAddOne(s, !0, s).__trim();
187
+ }
188
+ t.sign && ([t, e] = [e, t]);
189
+ let n = i.__absoluteSubOne(e, o);
190
+ return n = i.__absoluteAndNot(n, t, n), i.__absoluteAddOne(n, !0, n).__trim();
191
+ }
192
+ static asIntN(t, e) {
193
+ var r = Math.floor;
194
+ if (e.length === 0) return e;
195
+ if (t = r(t), 0 > t) throw new RangeError("Invalid value: not (convertible to) a safe integer");
196
+ if (t === 0) return i.__zero();
197
+ if (t >= i.__kMaxLengthBits) return e;
198
+ const o = 0 | (t + 29) / 30;
199
+ if (e.length < o) return e;
200
+ const n = e.__unsignedDigit(o - 1), s = 1 << (t - 1) % 30;
201
+ if (e.length === o && n < s) return e;
202
+ if ((n & s) !== s) return i.__truncateToNBits(t, e);
203
+ if (!e.sign) return i.__truncateAndSubFromPowerOfTwo(t, e, !0);
204
+ if ((n & s - 1) == 0) {
205
+ for (let l = o - 2; 0 <= l; l--) if (e.__digit(l) !== 0) return i.__truncateAndSubFromPowerOfTwo(t, e, !1);
206
+ return e.length === o && n === s ? e : i.__truncateToNBits(t, e);
207
+ }
208
+ return i.__truncateAndSubFromPowerOfTwo(t, e, !1);
209
+ }
210
+ static asUintN(t, e) {
211
+ var r = Math.floor;
212
+ if (e.length === 0) return e;
213
+ if (t = r(t), 0 > t) throw new RangeError("Invalid value: not (convertible to) a safe integer");
214
+ if (t === 0) return i.__zero();
215
+ if (e.sign) {
216
+ if (t > i.__kMaxLengthBits) throw new RangeError("BigInt too big");
217
+ return i.__truncateAndSubFromPowerOfTwo(t, e, !1);
218
+ }
219
+ if (t >= i.__kMaxLengthBits) return e;
220
+ const o = 0 | (t + 29) / 30;
221
+ if (e.length < o) return e;
222
+ const n = t % 30;
223
+ return e.length == o && (n === 0 || !(e.__digit(o - 1) >>> n)) ? e : i.__truncateToNBits(t, e);
224
+ }
225
+ static ADD(t, e) {
226
+ if (t = i.__toPrimitive(t), e = i.__toPrimitive(e), typeof t == "string") return typeof e != "string" && (e = e.toString()), t + e;
227
+ if (typeof e == "string") return t.toString() + e;
228
+ if (t = i.__toNumeric(t), e = i.__toNumeric(e), i.__isBigInt(t) && i.__isBigInt(e)) return i.add(t, e);
229
+ if (typeof t == "number" && typeof e == "number") return t + e;
230
+ throw new TypeError("Cannot mix BigInt and other types, use explicit conversions");
231
+ }
232
+ static LT(t, e) {
233
+ return i.__compare(t, e, 0);
234
+ }
235
+ static LE(t, e) {
236
+ return i.__compare(t, e, 1);
237
+ }
238
+ static GT(t, e) {
239
+ return i.__compare(t, e, 2);
240
+ }
241
+ static GE(t, e) {
242
+ return i.__compare(t, e, 3);
243
+ }
244
+ static EQ(t, e) {
245
+ for (; ; ) {
246
+ if (i.__isBigInt(t)) return i.__isBigInt(e) ? i.equal(t, e) : i.EQ(e, t);
247
+ if (typeof t == "number") {
248
+ if (i.__isBigInt(e)) return i.__equalToNumber(e, t);
249
+ if (typeof e != "object") return t == e;
250
+ e = i.__toPrimitive(e);
251
+ } else if (typeof t == "string") {
252
+ if (i.__isBigInt(e)) return t = i.__fromString(t), t !== null && i.equal(t, e);
253
+ if (typeof e != "object") return t == e;
254
+ e = i.__toPrimitive(e);
255
+ } else if (typeof t == "boolean") {
256
+ if (i.__isBigInt(e)) return i.__equalToNumber(e, +t);
257
+ if (typeof e != "object") return t == e;
258
+ e = i.__toPrimitive(e);
259
+ } else if (typeof t == "symbol") {
260
+ if (i.__isBigInt(e)) return !1;
261
+ if (typeof e != "object") return t == e;
262
+ e = i.__toPrimitive(e);
263
+ } else if (typeof t == "object") {
264
+ if (typeof e == "object" && e.constructor !== i) return t == e;
265
+ t = i.__toPrimitive(t);
266
+ } else return t == e;
267
+ }
268
+ }
269
+ static NE(t, e) {
270
+ return !i.EQ(t, e);
271
+ }
272
+ static DataViewGetBigInt64(t, e, r = !1) {
273
+ return i.asIntN(64, i.DataViewGetBigUint64(t, e, r));
274
+ }
275
+ static DataViewGetBigUint64(t, e, r = !1) {
276
+ const [o, n] = r ? [4, 0] : [0, 4], s = t.getUint32(e + o, r), l = t.getUint32(e + n, r), g = new i(3, !1);
277
+ return g.__setDigit(0, 1073741823 & l), g.__setDigit(1, (268435455 & s) << 2 | l >>> 30), g.__setDigit(2, s >>> 28), g.__trim();
278
+ }
279
+ static DataViewSetBigInt64(t, e, r, o = !1) {
280
+ i.DataViewSetBigUint64(t, e, r, o);
281
+ }
282
+ static DataViewSetBigUint64(t, e, r, o = !1) {
283
+ r = i.asUintN(64, r);
284
+ let n = 0, s = 0;
285
+ if (0 < r.length && (s = r.__digit(0), 1 < r.length)) {
286
+ const a = r.__digit(1);
287
+ s |= a << 30, n = a >>> 2, 2 < r.length && (n |= r.__digit(2) << 28);
288
+ }
289
+ const [l, g] = o ? [4, 0] : [0, 4];
290
+ t.setUint32(e + l, n, o), t.setUint32(e + g, s, o);
291
+ }
292
+ static __zero() {
293
+ return new i(0, !1);
294
+ }
295
+ static __oneDigit(t, e) {
296
+ const r = new i(1, e);
297
+ return r.__setDigit(0, t), r;
298
+ }
299
+ __copy() {
300
+ const t = new i(this.length, this.sign);
301
+ for (let e = 0; e < this.length; e++) t[e] = this[e];
302
+ return t;
303
+ }
304
+ __trim() {
305
+ let t = this.length, e = this[t - 1];
306
+ for (; e === 0; ) t--, e = this[t - 1], this.pop();
307
+ return t === 0 && (this.sign = !1), this;
308
+ }
309
+ __initializeDigits() {
310
+ for (let t = 0; t < this.length; t++) this[t] = 0;
311
+ }
312
+ static __decideRounding(t, e, r, o) {
313
+ if (0 < e) return -1;
314
+ let n;
315
+ if (0 > e) n = -e - 1;
316
+ else {
317
+ if (r === 0) return -1;
318
+ r--, o = t.__digit(r), n = 29;
319
+ }
320
+ let s = 1 << n;
321
+ if ((o & s) == 0) return -1;
322
+ if (s -= 1, (o & s) != 0) return 1;
323
+ for (; 0 < r; ) if (r--, t.__digit(r) !== 0) return 1;
324
+ return 0;
325
+ }
326
+ static __fromDouble(t) {
327
+ i.__kBitConversionDouble[0] = t;
328
+ const e = 2047 & i.__kBitConversionInts[i.__kBitConversionIntHigh] >>> 20, r = e - 1023, o = (0 | r / 30) + 1, n = new i(o, 0 > t);
329
+ let s = 1048575 & i.__kBitConversionInts[i.__kBitConversionIntHigh] | 1048576, l = i.__kBitConversionInts[i.__kBitConversionIntLow];
330
+ const g = 20, a = r % 30;
331
+ let _, u = 0;
332
+ if (a < 20) {
333
+ const f = g - a;
334
+ u = f + 32, _ = s >>> f, s = s << 32 - f | l >>> f, l <<= 32 - f;
335
+ } else if (a === 20) u = 32, _ = s, s = l, l = 0;
336
+ else {
337
+ const f = a - g;
338
+ u = 32 - f, _ = s << f | l >>> 32 - f, s = l << f, l = 0;
339
+ }
340
+ n.__setDigit(o - 1, _);
341
+ for (let f = o - 2; 0 <= f; f--) 0 < u ? (u -= 30, _ = s >>> 2, s = s << 30 | l >>> 2, l <<= 30) : _ = 0, n.__setDigit(f, _);
342
+ return n.__trim();
343
+ }
344
+ static __isWhitespace(t) {
345
+ return 13 >= t && 9 <= t || (159 >= t ? t == 32 : 131071 >= t ? t == 160 || t == 5760 : 196607 >= t ? (t &= 131071, 10 >= t || t == 40 || t == 41 || t == 47 || t == 95 || t == 4096) : t == 65279);
346
+ }
347
+ static __fromString(t, e = 0) {
348
+ let r = 0;
349
+ const o = t.length;
350
+ let n = 0;
351
+ if (n === o) return i.__zero();
352
+ let s = t.charCodeAt(n);
353
+ for (; i.__isWhitespace(s); ) {
354
+ if (++n === o) return i.__zero();
355
+ s = t.charCodeAt(n);
356
+ }
357
+ if (s === 43) {
358
+ if (++n === o) return null;
359
+ s = t.charCodeAt(n), r = 1;
360
+ } else if (s === 45) {
361
+ if (++n === o) return null;
362
+ s = t.charCodeAt(n), r = -1;
363
+ }
364
+ if (e === 0) {
365
+ if (e = 10, s === 48) {
366
+ if (++n === o) return i.__zero();
367
+ if (s = t.charCodeAt(n), s === 88 || s === 120) {
368
+ if (e = 16, ++n === o) return null;
369
+ s = t.charCodeAt(n);
370
+ } else if (s === 79 || s === 111) {
371
+ if (e = 8, ++n === o) return null;
372
+ s = t.charCodeAt(n);
373
+ } else if (s === 66 || s === 98) {
374
+ if (e = 2, ++n === o) return null;
375
+ s = t.charCodeAt(n);
376
+ }
377
+ }
378
+ } else if (e === 16 && s === 48) {
379
+ if (++n === o) return i.__zero();
380
+ if (s = t.charCodeAt(n), s === 88 || s === 120) {
381
+ if (++n === o) return null;
382
+ s = t.charCodeAt(n);
383
+ }
384
+ }
385
+ if (r != 0 && e !== 10) return null;
386
+ for (; s === 48; ) {
387
+ if (++n === o) return i.__zero();
388
+ s = t.charCodeAt(n);
389
+ }
390
+ const l = o - n;
391
+ let g = i.__kMaxBitsPerChar[e], a = i.__kBitsPerCharTableMultiplier - 1;
392
+ if (l > 1073741824 / g) return null;
393
+ const _ = g * l + a >>> i.__kBitsPerCharTableShift, u = new i(0 | (_ + 29) / 30, !1), f = 10 > e ? e : 10, h = 10 < e ? e - 10 : 0;
394
+ if ((e & e - 1) == 0) {
395
+ g >>= i.__kBitsPerCharTableShift;
396
+ const d = [], c = [];
397
+ let b = !1;
398
+ do {
399
+ let m = 0, D = 0;
400
+ for (; ; ) {
401
+ let w;
402
+ if (s - 48 >>> 0 < f) w = s - 48;
403
+ else if ((32 | s) - 97 >>> 0 < h) w = (32 | s) - 87;
404
+ else {
405
+ b = !0;
406
+ break;
407
+ }
408
+ if (D += g, m = m << g | w, ++n === o) {
409
+ b = !0;
410
+ break;
411
+ }
412
+ if (s = t.charCodeAt(n), 30 < D + g) break;
413
+ }
414
+ d.push(m), c.push(D);
415
+ } while (!b);
416
+ i.__fillFromParts(u, d, c);
417
+ } else {
418
+ u.__initializeDigits();
419
+ let d = !1, c = 0;
420
+ do {
421
+ let b = 0, m = 1;
422
+ for (; ; ) {
423
+ let w;
424
+ if (s - 48 >>> 0 < f) w = s - 48;
425
+ else if ((32 | s) - 97 >>> 0 < h) w = (32 | s) - 87;
426
+ else {
427
+ d = !0;
428
+ break;
429
+ }
430
+ const v = m * e;
431
+ if (1073741823 < v) break;
432
+ if (m = v, b = b * e + w, c++, ++n === o) {
433
+ d = !0;
434
+ break;
435
+ }
436
+ s = t.charCodeAt(n);
437
+ }
438
+ a = 30 * i.__kBitsPerCharTableMultiplier - 1;
439
+ const D = 0 | (g * c + a >>> i.__kBitsPerCharTableShift) / 30;
440
+ u.__inplaceMultiplyAdd(m, b, D);
441
+ } while (!d);
442
+ }
443
+ if (n !== o) {
444
+ if (!i.__isWhitespace(s)) return null;
445
+ for (n++; n < o; n++) if (s = t.charCodeAt(n), !i.__isWhitespace(s)) return null;
446
+ }
447
+ return u.sign = r == -1, u.__trim();
448
+ }
449
+ static __fillFromParts(t, e, r) {
450
+ let o = 0, n = 0, s = 0;
451
+ for (let l = e.length - 1; 0 <= l; l--) {
452
+ const g = e[l], a = r[l];
453
+ n |= g << s, s += a, s === 30 ? (t.__setDigit(o++, n), s = 0, n = 0) : 30 < s && (t.__setDigit(o++, 1073741823 & n), s -= 30, n = g >>> a - s);
454
+ }
455
+ if (n !== 0) {
456
+ if (o >= t.length) throw new Error("implementation bug");
457
+ t.__setDigit(o++, n);
458
+ }
459
+ for (; o < t.length; o++) t.__setDigit(o, 0);
460
+ }
461
+ static __toStringBasePowerOfTwo(t, e) {
462
+ const r = t.length;
463
+ let o = e - 1;
464
+ o = (85 & o >>> 1) + (85 & o), o = (51 & o >>> 2) + (51 & o), o = (15 & o >>> 4) + (15 & o);
465
+ const n = o, s = e - 1, l = t.__digit(r - 1), g = i.__clz30(l);
466
+ let a = 0 | (30 * r - g + n - 1) / n;
467
+ if (t.sign && a++, 268435456 < a) throw new Error("string too long");
468
+ const _ = Array(a);
469
+ let u = a - 1, f = 0, h = 0;
470
+ for (let c = 0; c < r - 1; c++) {
471
+ const b = t.__digit(c), m = (f | b << h) & s;
472
+ _[u--] = i.__kConversionChars[m];
473
+ const D = n - h;
474
+ for (f = b >>> D, h = 30 - D; h >= n; ) _[u--] = i.__kConversionChars[f & s], f >>>= n, h -= n;
475
+ }
476
+ const d = (f | l << h) & s;
477
+ for (_[u--] = i.__kConversionChars[d], f = l >>> n - h; f !== 0; ) _[u--] = i.__kConversionChars[f & s], f >>>= n;
478
+ if (t.sign && (_[u--] = "-"), u != -1) throw new Error("implementation bug");
479
+ return _.join("");
480
+ }
481
+ static __toStringGeneric(t, e, r) {
482
+ const o = t.length;
483
+ if (o === 0) return "";
484
+ if (o === 1) {
485
+ let c = t.__unsignedDigit(0).toString(e);
486
+ return r === !1 && t.sign && (c = "-" + c), c;
487
+ }
488
+ const n = 30 * o - i.__clz30(t.__digit(o - 1)), s = i.__kMaxBitsPerChar[e], l = s - 1;
489
+ let g = n * i.__kBitsPerCharTableMultiplier;
490
+ g += l - 1, g = 0 | g / l;
491
+ const a = g + 1 >> 1, _ = i.exponentiate(i.__oneDigit(e, !1), i.__oneDigit(a, !1));
492
+ let u, f;
493
+ const h = _.__unsignedDigit(0);
494
+ if (_.length === 1 && 32767 >= h) {
495
+ u = new i(t.length, !1), u.__initializeDigits();
496
+ let c = 0;
497
+ for (let b = 2 * t.length - 1; 0 <= b; b--) {
498
+ const m = c << 15 | t.__halfDigit(b);
499
+ u.__setHalfDigit(b, 0 | m / h), c = 0 | m % h;
500
+ }
501
+ f = c.toString(e);
502
+ } else {
503
+ const c = i.__absoluteDivLarge(t, _, !0, !0);
504
+ u = c.quotient;
505
+ const b = c.remainder.__trim();
506
+ f = i.__toStringGeneric(b, e, !0);
507
+ }
508
+ u.__trim();
509
+ let d = i.__toStringGeneric(u, e, !0);
510
+ for (; f.length < a; ) f = "0" + f;
511
+ return r === !1 && t.sign && (d = "-" + d), d + f;
512
+ }
513
+ static __unequalSign(t) {
514
+ return t ? -1 : 1;
515
+ }
516
+ static __absoluteGreater(t) {
517
+ return t ? -1 : 1;
518
+ }
519
+ static __absoluteLess(t) {
520
+ return t ? 1 : -1;
521
+ }
522
+ static __compareToBigInt(t, e) {
523
+ const r = t.sign;
524
+ if (r !== e.sign) return i.__unequalSign(r);
525
+ const o = i.__absoluteCompare(t, e);
526
+ return 0 < o ? i.__absoluteGreater(r) : 0 > o ? i.__absoluteLess(r) : 0;
527
+ }
528
+ static __compareToNumber(t, e) {
529
+ if (i.__isOneDigitInt(e)) {
530
+ const r = t.sign, o = 0 > e;
531
+ if (r !== o) return i.__unequalSign(r);
532
+ if (t.length === 0) {
533
+ if (o) throw new Error("implementation bug");
534
+ return e === 0 ? 0 : -1;
535
+ }
536
+ if (1 < t.length) return i.__absoluteGreater(r);
537
+ const n = Math.abs(e), s = t.__unsignedDigit(0);
538
+ return s > n ? i.__absoluteGreater(r) : s < n ? i.__absoluteLess(r) : 0;
539
+ }
540
+ return i.__compareToDouble(t, e);
541
+ }
542
+ static __compareToDouble(t, e) {
543
+ if (e !== e) return e;
544
+ if (e === 1 / 0) return -1;
545
+ if (e === -1 / 0) return 1;
546
+ const r = t.sign;
547
+ if (r !== 0 > e) return i.__unequalSign(r);
548
+ if (e === 0) throw new Error("implementation bug: should be handled elsewhere");
549
+ if (t.length === 0) return -1;
550
+ i.__kBitConversionDouble[0] = e;
551
+ const o = 2047 & i.__kBitConversionInts[i.__kBitConversionIntHigh] >>> 20;
552
+ if (o == 2047) throw new Error("implementation bug: handled elsewhere");
553
+ const n = o - 1023;
554
+ if (0 > n) return i.__absoluteGreater(r);
555
+ const s = t.length;
556
+ let l = t.__digit(s - 1);
557
+ const g = i.__clz30(l), a = 30 * s - g, _ = n + 1;
558
+ if (a < _) return i.__absoluteLess(r);
559
+ if (a > _) return i.__absoluteGreater(r);
560
+ let u = 1048576 | 1048575 & i.__kBitConversionInts[i.__kBitConversionIntHigh], f = i.__kBitConversionInts[i.__kBitConversionIntLow];
561
+ const h = 20, d = 29 - g;
562
+ if (d !== (0 | (a - 1) % 30)) throw new Error("implementation bug");
563
+ let c, b = 0;
564
+ if (20 > d) {
565
+ const m = h - d;
566
+ b = m + 32, c = u >>> m, u = u << 32 - m | f >>> m, f <<= 32 - m;
567
+ } else if (d === 20) b = 32, c = u, u = f, f = 0;
568
+ else {
569
+ const m = d - h;
570
+ b = 32 - m, c = u << m | f >>> 32 - m, u = f << m, f = 0;
571
+ }
572
+ if (l >>>= 0, c >>>= 0, l > c) return i.__absoluteGreater(r);
573
+ if (l < c) return i.__absoluteLess(r);
574
+ for (let m = s - 2; 0 <= m; m--) {
575
+ 0 < b ? (b -= 30, c = u >>> 2, u = u << 30 | f >>> 2, f <<= 30) : c = 0;
576
+ const D = t.__unsignedDigit(m);
577
+ if (D > c) return i.__absoluteGreater(r);
578
+ if (D < c) return i.__absoluteLess(r);
579
+ }
580
+ if (u !== 0 || f !== 0) {
581
+ if (b === 0) throw new Error("implementation bug");
582
+ return i.__absoluteLess(r);
583
+ }
584
+ return 0;
585
+ }
586
+ static __equalToNumber(t, e) {
587
+ var r = Math.abs;
588
+ return i.__isOneDigitInt(e) ? e === 0 ? t.length === 0 : t.length === 1 && t.sign === 0 > e && t.__unsignedDigit(0) === r(e) : i.__compareToDouble(t, e) === 0;
589
+ }
590
+ static __comparisonResultToBool(t, e) {
591
+ return e === 0 ? 0 > t : e === 1 ? 0 >= t : e === 2 ? 0 < t : e === 3 ? 0 <= t : void 0;
592
+ }
593
+ static __compare(t, e, r) {
594
+ if (t = i.__toPrimitive(t), e = i.__toPrimitive(e), typeof t == "string" && typeof e == "string") switch (r) {
595
+ case 0:
596
+ return t < e;
597
+ case 1:
598
+ return t <= e;
599
+ case 2:
600
+ return t > e;
601
+ case 3:
602
+ return t >= e;
603
+ }
604
+ if (i.__isBigInt(t) && typeof e == "string") return e = i.__fromString(e), e !== null && i.__comparisonResultToBool(i.__compareToBigInt(t, e), r);
605
+ if (typeof t == "string" && i.__isBigInt(e)) return t = i.__fromString(t), t !== null && i.__comparisonResultToBool(i.__compareToBigInt(t, e), r);
606
+ if (t = i.__toNumeric(t), e = i.__toNumeric(e), i.__isBigInt(t)) {
607
+ if (i.__isBigInt(e)) return i.__comparisonResultToBool(i.__compareToBigInt(t, e), r);
608
+ if (typeof e != "number") throw new Error("implementation bug");
609
+ return i.__comparisonResultToBool(i.__compareToNumber(t, e), r);
610
+ }
611
+ if (typeof t != "number") throw new Error("implementation bug");
612
+ if (i.__isBigInt(e)) return i.__comparisonResultToBool(i.__compareToNumber(e, t), 2 ^ r);
613
+ if (typeof e != "number") throw new Error("implementation bug");
614
+ return r === 0 ? t < e : r === 1 ? t <= e : r === 2 ? t > e : r === 3 ? t >= e : void 0;
615
+ }
616
+ __clzmsd() {
617
+ return i.__clz30(this.__digit(this.length - 1));
618
+ }
619
+ static __absoluteAdd(t, e, r) {
620
+ if (t.length < e.length) return i.__absoluteAdd(e, t, r);
621
+ if (t.length === 0) return t;
622
+ if (e.length === 0) return t.sign === r ? t : i.unaryMinus(t);
623
+ let o = t.length;
624
+ (t.__clzmsd() === 0 || e.length === t.length && e.__clzmsd() === 0) && o++;
625
+ const n = new i(o, r);
626
+ let s = 0, l = 0;
627
+ for (; l < e.length; l++) {
628
+ const g = t.__digit(l) + e.__digit(l) + s;
629
+ s = g >>> 30, n.__setDigit(l, 1073741823 & g);
630
+ }
631
+ for (; l < t.length; l++) {
632
+ const g = t.__digit(l) + s;
633
+ s = g >>> 30, n.__setDigit(l, 1073741823 & g);
634
+ }
635
+ return l < n.length && n.__setDigit(l, s), n.__trim();
636
+ }
637
+ static __absoluteSub(t, e, r) {
638
+ if (t.length === 0) return t;
639
+ if (e.length === 0) return t.sign === r ? t : i.unaryMinus(t);
640
+ const o = new i(t.length, r);
641
+ let n = 0, s = 0;
642
+ for (; s < e.length; s++) {
643
+ const l = t.__digit(s) - e.__digit(s) - n;
644
+ n = 1 & l >>> 30, o.__setDigit(s, 1073741823 & l);
645
+ }
646
+ for (; s < t.length; s++) {
647
+ const l = t.__digit(s) - n;
648
+ n = 1 & l >>> 30, o.__setDigit(s, 1073741823 & l);
649
+ }
650
+ return o.__trim();
651
+ }
652
+ static __absoluteAddOne(t, e, r = null) {
653
+ const o = t.length;
654
+ r === null ? r = new i(o, e) : r.sign = e;
655
+ let n = 1;
656
+ for (let s = 0; s < o; s++) {
657
+ const l = t.__digit(s) + n;
658
+ n = l >>> 30, r.__setDigit(s, 1073741823 & l);
659
+ }
660
+ return n != 0 && r.__setDigitGrow(o, 1), r;
661
+ }
662
+ static __absoluteSubOne(t, e) {
663
+ const r = t.length;
664
+ e = e || r;
665
+ const o = new i(e, !1);
666
+ let n = 1;
667
+ for (let s = 0; s < r; s++) {
668
+ const l = t.__digit(s) - n;
669
+ n = 1 & l >>> 30, o.__setDigit(s, 1073741823 & l);
670
+ }
671
+ if (n != 0) throw new Error("implementation bug");
672
+ for (let s = r; s < e; s++) o.__setDigit(s, 0);
673
+ return o;
674
+ }
675
+ static __absoluteAnd(t, e, r = null) {
676
+ let o = t.length, n = e.length, s = n;
677
+ if (o < n) {
678
+ s = o;
679
+ const a = t, _ = o;
680
+ t = e, o = n, e = a, n = _;
681
+ }
682
+ let l = s;
683
+ r === null ? r = new i(l, !1) : l = r.length;
684
+ let g = 0;
685
+ for (; g < s; g++) r.__setDigit(g, t.__digit(g) & e.__digit(g));
686
+ for (; g < l; g++) r.__setDigit(g, 0);
687
+ return r;
688
+ }
689
+ static __absoluteAndNot(t, e, r = null) {
690
+ const o = t.length, n = e.length;
691
+ let s = n;
692
+ o < n && (s = o);
693
+ let l = o;
694
+ r === null ? r = new i(l, !1) : l = r.length;
695
+ let g = 0;
696
+ for (; g < s; g++) r.__setDigit(g, t.__digit(g) & ~e.__digit(g));
697
+ for (; g < o; g++) r.__setDigit(g, t.__digit(g));
698
+ for (; g < l; g++) r.__setDigit(g, 0);
699
+ return r;
700
+ }
701
+ static __absoluteOr(t, e, r = null) {
702
+ let o = t.length, n = e.length, s = n;
703
+ if (o < n) {
704
+ s = o;
705
+ const a = t, _ = o;
706
+ t = e, o = n, e = a, n = _;
707
+ }
708
+ let l = o;
709
+ r === null ? r = new i(l, !1) : l = r.length;
710
+ let g = 0;
711
+ for (; g < s; g++) r.__setDigit(g, t.__digit(g) | e.__digit(g));
712
+ for (; g < o; g++) r.__setDigit(g, t.__digit(g));
713
+ for (; g < l; g++) r.__setDigit(g, 0);
714
+ return r;
715
+ }
716
+ static __absoluteXor(t, e, r = null) {
717
+ let o = t.length, n = e.length, s = n;
718
+ if (o < n) {
719
+ s = o;
720
+ const a = t, _ = o;
721
+ t = e, o = n, e = a, n = _;
722
+ }
723
+ let l = o;
724
+ r === null ? r = new i(l, !1) : l = r.length;
725
+ let g = 0;
726
+ for (; g < s; g++) r.__setDigit(g, t.__digit(g) ^ e.__digit(g));
727
+ for (; g < o; g++) r.__setDigit(g, t.__digit(g));
728
+ for (; g < l; g++) r.__setDigit(g, 0);
729
+ return r;
730
+ }
731
+ static __absoluteCompare(t, e) {
732
+ const r = t.length - e.length;
733
+ if (r != 0) return r;
734
+ let o = t.length - 1;
735
+ for (; 0 <= o && t.__digit(o) === e.__digit(o); ) o--;
736
+ return 0 > o ? 0 : t.__unsignedDigit(o) > e.__unsignedDigit(o) ? 1 : -1;
737
+ }
738
+ static __multiplyAccumulate(t, e, r, o) {
739
+ if (e === 0) return;
740
+ const n = 32767 & e, s = e >>> 15;
741
+ let l = 0, g = 0;
742
+ for (let a, _ = 0; _ < t.length; _++, o++) {
743
+ a = r.__digit(o);
744
+ const u = t.__digit(_), f = 32767 & u, h = u >>> 15, d = i.__imul(f, n), c = i.__imul(f, s), b = i.__imul(h, n), m = i.__imul(h, s);
745
+ a += g + d + l, l = a >>> 30, a &= 1073741823, a += ((32767 & c) << 15) + ((32767 & b) << 15), l += a >>> 30, g = m + (c >>> 15) + (b >>> 15), r.__setDigit(o, 1073741823 & a);
746
+ }
747
+ for (; l != 0 || g !== 0; o++) {
748
+ let a = r.__digit(o);
749
+ a += l + g, g = 0, l = a >>> 30, r.__setDigit(o, 1073741823 & a);
750
+ }
751
+ }
752
+ static __internalMultiplyAdd(t, e, r, o, n) {
753
+ let s = r, l = 0;
754
+ for (let g = 0; g < o; g++) {
755
+ const a = t.__digit(g), _ = i.__imul(32767 & a, e), u = i.__imul(a >>> 15, e), f = _ + ((32767 & u) << 15) + l + s;
756
+ s = f >>> 30, l = u >>> 15, n.__setDigit(g, 1073741823 & f);
757
+ }
758
+ if (n.length > o) for (n.__setDigit(o++, s + l); o < n.length; ) n.__setDigit(o++, 0);
759
+ else if (s + l !== 0) throw new Error("implementation bug");
760
+ }
761
+ __inplaceMultiplyAdd(t, e, r) {
762
+ r > this.length && (r = this.length);
763
+ const o = 32767 & t, n = t >>> 15;
764
+ let s = 0, l = e;
765
+ for (let g = 0; g < r; g++) {
766
+ const a = this.__digit(g), _ = 32767 & a, u = a >>> 15, f = i.__imul(_, o), h = i.__imul(_, n), d = i.__imul(u, o), c = i.__imul(u, n);
767
+ let b = l + f + s;
768
+ s = b >>> 30, b &= 1073741823, b += ((32767 & h) << 15) + ((32767 & d) << 15), s += b >>> 30, l = c + (h >>> 15) + (d >>> 15), this.__setDigit(g, 1073741823 & b);
769
+ }
770
+ if (s != 0 || l !== 0) throw new Error("implementation bug");
771
+ }
772
+ static __absoluteDivSmall(t, e, r = null) {
773
+ r === null && (r = new i(t.length, !1));
774
+ let o = 0;
775
+ for (let n, s = 2 * t.length - 1; 0 <= s; s -= 2) {
776
+ n = (o << 15 | t.__halfDigit(s)) >>> 0;
777
+ const l = 0 | n / e;
778
+ o = 0 | n % e, n = (o << 15 | t.__halfDigit(s - 1)) >>> 0;
779
+ const g = 0 | n / e;
780
+ o = 0 | n % e, r.__setDigit(s >>> 1, l << 15 | g);
781
+ }
782
+ return r;
783
+ }
784
+ static __absoluteModSmall(t, e) {
785
+ let r = 0;
786
+ for (let o = 2 * t.length - 1; 0 <= o; o--)
787
+ r = 0 | ((r << 15 | t.__halfDigit(o)) >>> 0) % e;
788
+ return r;
789
+ }
790
+ static __absoluteDivLarge(t, e, r, o) {
791
+ const n = e.__halfDigitLength(), s = e.length, l = t.__halfDigitLength() - n;
792
+ let g = null;
793
+ r && (g = new i(l + 2 >>> 1, !1), g.__initializeDigits());
794
+ const a = new i(n + 2 >>> 1, !1);
795
+ a.__initializeDigits();
796
+ const _ = i.__clz15(e.__halfDigit(n - 1));
797
+ 0 < _ && (e = i.__specialLeftShift(e, _, 0));
798
+ const u = i.__specialLeftShift(t, _, 1), f = e.__halfDigit(n - 1);
799
+ let h = 0;
800
+ for (let d, c = l; 0 <= c; c--) {
801
+ d = 32767;
802
+ const b = u.__halfDigit(c + n);
803
+ if (b !== f) {
804
+ const D = (b << 15 | u.__halfDigit(c + n - 1)) >>> 0;
805
+ d = 0 | D / f;
806
+ let w = 0 | D % f;
807
+ const v = e.__halfDigit(n - 2), y = u.__halfDigit(c + n - 2);
808
+ for (; i.__imul(d, v) >>> 0 > (w << 16 | y) >>> 0 && (d--, w += f, !(32767 < w)); ) ;
809
+ }
810
+ i.__internalMultiplyAdd(e, d, 0, s, a);
811
+ let m = u.__inplaceSub(a, c, n + 1);
812
+ m !== 0 && (m = u.__inplaceAdd(e, c, n), u.__setHalfDigit(c + n, 32767 & u.__halfDigit(c + n) + m), d--), r && (1 & c ? h = d << 15 : g.__setDigit(c >>> 1, h | d));
813
+ }
814
+ if (o) return u.__inplaceRightShift(_), r ? { quotient: g, remainder: u } : u;
815
+ if (r) return g;
816
+ throw new Error("unreachable");
817
+ }
818
+ static __clz15(t) {
819
+ return i.__clz30(t) - 15;
820
+ }
821
+ __inplaceAdd(t, e, r) {
822
+ let o = 0;
823
+ for (let n = 0; n < r; n++) {
824
+ const s = this.__halfDigit(e + n) + t.__halfDigit(n) + o;
825
+ o = s >>> 15, this.__setHalfDigit(e + n, 32767 & s);
826
+ }
827
+ return o;
828
+ }
829
+ __inplaceSub(t, e, r) {
830
+ let o = 0;
831
+ if (1 & e) {
832
+ e >>= 1;
833
+ let n = this.__digit(e), s = 32767 & n, l = 0;
834
+ for (; l < r - 1 >>> 1; l++) {
835
+ const _ = t.__digit(l), u = (n >>> 15) - (32767 & _) - o;
836
+ o = 1 & u >>> 15, this.__setDigit(e + l, (32767 & u) << 15 | 32767 & s), n = this.__digit(e + l + 1), s = (32767 & n) - (_ >>> 15) - o, o = 1 & s >>> 15;
837
+ }
838
+ const g = t.__digit(l), a = (n >>> 15) - (32767 & g) - o;
839
+ if (o = 1 & a >>> 15, this.__setDigit(e + l, (32767 & a) << 15 | 32767 & s), e + l + 1 >= this.length) throw new RangeError("out of bounds");
840
+ (1 & r) == 0 && (n = this.__digit(e + l + 1), s = (32767 & n) - (g >>> 15) - o, o = 1 & s >>> 15, this.__setDigit(e + t.length, 1073709056 & n | 32767 & s));
841
+ } else {
842
+ e >>= 1;
843
+ let n = 0;
844
+ for (; n < t.length - 1; n++) {
845
+ const _ = this.__digit(e + n), u = t.__digit(n), f = (32767 & _) - (32767 & u) - o;
846
+ o = 1 & f >>> 15;
847
+ const h = (_ >>> 15) - (u >>> 15) - o;
848
+ o = 1 & h >>> 15, this.__setDigit(e + n, (32767 & h) << 15 | 32767 & f);
849
+ }
850
+ const s = this.__digit(e + n), l = t.__digit(n), g = (32767 & s) - (32767 & l) - o;
851
+ o = 1 & g >>> 15;
852
+ let a = 0;
853
+ (1 & r) == 0 && (a = (s >>> 15) - (l >>> 15) - o, o = 1 & a >>> 15), this.__setDigit(e + n, (32767 & a) << 15 | 32767 & g);
854
+ }
855
+ return o;
856
+ }
857
+ __inplaceRightShift(t) {
858
+ if (t === 0) return;
859
+ let e = this.__digit(0) >>> t;
860
+ const r = this.length - 1;
861
+ for (let o = 0; o < r; o++) {
862
+ const n = this.__digit(o + 1);
863
+ this.__setDigit(o, 1073741823 & n << 30 - t | e), e = n >>> t;
864
+ }
865
+ this.__setDigit(r, e);
866
+ }
867
+ static __specialLeftShift(t, e, r) {
868
+ const o = t.length, n = new i(o + r, !1);
869
+ if (e === 0) {
870
+ for (let l = 0; l < o; l++) n.__setDigit(l, t.__digit(l));
871
+ return 0 < r && n.__setDigit(o, 0), n;
872
+ }
873
+ let s = 0;
874
+ for (let l = 0; l < o; l++) {
875
+ const g = t.__digit(l);
876
+ n.__setDigit(l, 1073741823 & g << e | s), s = g >>> 30 - e;
877
+ }
878
+ return 0 < r && n.__setDigit(o, s), n;
879
+ }
880
+ static __leftShiftByAbsolute(t, e) {
881
+ const r = i.__toShiftAmount(e);
882
+ if (0 > r) throw new RangeError("BigInt too big");
883
+ const o = 0 | r / 30, n = r % 30, s = t.length, l = n !== 0 && t.__digit(s - 1) >>> 30 - n != 0, g = s + o + (l ? 1 : 0), a = new i(g, t.sign);
884
+ if (n === 0) {
885
+ let _ = 0;
886
+ for (; _ < o; _++) a.__setDigit(_, 0);
887
+ for (; _ < g; _++) a.__setDigit(_, t.__digit(_ - o));
888
+ } else {
889
+ let _ = 0;
890
+ for (let u = 0; u < o; u++) a.__setDigit(u, 0);
891
+ for (let u = 0; u < s; u++) {
892
+ const f = t.__digit(u);
893
+ a.__setDigit(u + o, 1073741823 & f << n | _), _ = f >>> 30 - n;
894
+ }
895
+ if (l) a.__setDigit(s + o, _);
896
+ else if (_ !== 0) throw new Error("implementation bug");
897
+ }
898
+ return a.__trim();
899
+ }
900
+ static __rightShiftByAbsolute(t, e) {
901
+ const r = t.length, o = t.sign, n = i.__toShiftAmount(e);
902
+ if (0 > n) return i.__rightShiftByMaximum(o);
903
+ const s = 0 | n / 30, l = n % 30;
904
+ let g = r - s;
905
+ if (0 >= g) return i.__rightShiftByMaximum(o);
906
+ let a = !1;
907
+ if (o) {
908
+ if ((t.__digit(s) & (1 << l) - 1) != 0) a = !0;
909
+ else for (let u = 0; u < s; u++) if (t.__digit(u) !== 0) {
910
+ a = !0;
911
+ break;
912
+ }
913
+ }
914
+ a && l === 0 && ~t.__digit(r - 1) == 0 && g++;
915
+ let _ = new i(g, o);
916
+ if (l === 0) {
917
+ _.__setDigit(g - 1, 0);
918
+ for (let u = s; u < r; u++) _.__setDigit(u - s, t.__digit(u));
919
+ } else {
920
+ let u = t.__digit(s) >>> l;
921
+ const f = r - s - 1;
922
+ for (let h = 0; h < f; h++) {
923
+ const d = t.__digit(h + s + 1);
924
+ _.__setDigit(h, 1073741823 & d << 30 - l | u), u = d >>> l;
925
+ }
926
+ _.__setDigit(f, u);
927
+ }
928
+ return a && (_ = i.__absoluteAddOne(_, !0, _)), _.__trim();
929
+ }
930
+ static __rightShiftByMaximum(t) {
931
+ return t ? i.__oneDigit(1, !0) : i.__zero();
932
+ }
933
+ static __toShiftAmount(t) {
934
+ if (1 < t.length) return -1;
935
+ const e = t.__unsignedDigit(0);
936
+ return e > i.__kMaxLengthBits ? -1 : e;
937
+ }
938
+ static __toPrimitive(t, e = "default") {
939
+ if (typeof t != "object" || t.constructor === i) return t;
940
+ if (typeof Symbol < "u" && typeof Symbol.toPrimitive == "symbol" && t[Symbol.toPrimitive]) {
941
+ const n = t[Symbol.toPrimitive](e);
942
+ if (typeof n != "object") return n;
943
+ throw new TypeError("Cannot convert object to primitive value");
944
+ }
945
+ const r = t.valueOf;
946
+ if (r) {
947
+ const n = r.call(t);
948
+ if (typeof n != "object") return n;
949
+ }
950
+ const o = t.toString;
951
+ if (o) {
952
+ const n = o.call(t);
953
+ if (typeof n != "object") return n;
954
+ }
955
+ throw new TypeError("Cannot convert object to primitive value");
956
+ }
957
+ static __toNumeric(t) {
958
+ return i.__isBigInt(t) ? t : +t;
959
+ }
960
+ static __isBigInt(t) {
961
+ return typeof t == "object" && t !== null && t.constructor === i;
962
+ }
963
+ static __truncateToNBits(t, e) {
964
+ const r = 0 | (t + 29) / 30, o = new i(r, e.sign), n = r - 1;
965
+ for (let l = 0; l < n; l++) o.__setDigit(l, e.__digit(l));
966
+ let s = e.__digit(n);
967
+ if (t % 30 != 0) {
968
+ const l = 32 - t % 30;
969
+ s = s << l >>> l;
970
+ }
971
+ return o.__setDigit(n, s), o.__trim();
972
+ }
973
+ static __truncateAndSubFromPowerOfTwo(t, e, r) {
974
+ var o = Math.min;
975
+ const n = 0 | (t + 29) / 30, s = new i(n, r);
976
+ let l = 0;
977
+ const g = n - 1;
978
+ let a = 0;
979
+ for (const h = o(g, e.length); l < h; l++) {
980
+ const d = 0 - e.__digit(l) - a;
981
+ a = 1 & d >>> 30, s.__setDigit(l, 1073741823 & d);
982
+ }
983
+ for (; l < g; l++) s.__setDigit(l, 0 | 1073741823 & -a);
984
+ let _ = g < e.length ? e.__digit(g) : 0;
985
+ const u = t % 30;
986
+ let f;
987
+ if (u == 0) f = 0 - _ - a, f &= 1073741823;
988
+ else {
989
+ const h = 32 - u;
990
+ _ = _ << h >>> h;
991
+ const d = 1 << 32 - h;
992
+ f = d - _ - a, f &= d - 1;
993
+ }
994
+ return s.__setDigit(g, f), s.__trim();
995
+ }
996
+ __digit(t) {
997
+ return this[t];
998
+ }
999
+ __unsignedDigit(t) {
1000
+ return this[t] >>> 0;
1001
+ }
1002
+ __setDigit(t, e) {
1003
+ this[t] = 0 | e;
1004
+ }
1005
+ __setDigitGrow(t, e) {
1006
+ this[t] = 0 | e;
1007
+ }
1008
+ __halfDigitLength() {
1009
+ const t = this.length;
1010
+ return 32767 >= this.__unsignedDigit(t - 1) ? 2 * t - 1 : 2 * t;
1011
+ }
1012
+ __halfDigit(t) {
1013
+ return 32767 & this[t >>> 1] >>> 15 * (1 & t);
1014
+ }
1015
+ __setHalfDigit(t, e) {
1016
+ const r = t >>> 1, o = this.__digit(r), n = 1 & t ? 32767 & o | e << 15 : 1073709056 & o | 32767 & e;
1017
+ this.__setDigit(r, n);
1018
+ }
1019
+ static __digitPow(t, e) {
1020
+ let r = 1;
1021
+ for (; 0 < e; ) 1 & e && (r *= t), e >>>= 1, t *= t;
1022
+ return r;
1023
+ }
1024
+ static __detectBigEndian() {
1025
+ return i.__kBitConversionDouble[0] = -0, i.__kBitConversionInts[0] !== 0;
1026
+ }
1027
+ static __isOneDigitInt(t) {
1028
+ return (1073741823 & t) === t;
1029
+ }
1030
+ }
1031
+ i.__kMaxLength = 33554432, i.__kMaxLengthBits = i.__kMaxLength << 5, i.__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], i.__kBitsPerCharTableShift = 5, i.__kBitsPerCharTableMultiplier = 1 << i.__kBitsPerCharTableShift, i.__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"], i.__kBitConversionBuffer = new ArrayBuffer(8), i.__kBitConversionDouble = new Float64Array(i.__kBitConversionBuffer), i.__kBitConversionInts = new Int32Array(i.__kBitConversionBuffer), i.__kBitConversionIntHigh = i.__detectBigEndian() ? 0 : 1, i.__kBitConversionIntLow = i.__detectBigEndian() ? 1 : 0, i.__clz30 = Math.clz32 ? function(p) {
1032
+ return Math.clz32(p) - 2;
1033
+ } : function(p) {
1034
+ return p === 0 ? 30 : 0 | 29 - (0 | Math.log(p >>> 0) / Math.LN2);
1035
+ }, i.__imul = Math.imul || function(p, t) {
1036
+ return 0 | p * t;
1037
+ };
1038
+ export {
1039
+ i as default
1040
+ };