@keeper-security/keeperapi 16.0.1 → 16.0.4

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 (148) hide show
  1. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/07113f92cc3a9f5dc57b92f54542a63463f1fa9a +1 -0
  2. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/1ba6467ba06d4bfc0c8581f4ee12c2c0f687214e +1 -0
  3. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/1de1e40928c5c58c4f677d93986cdff01b3d0417 +1 -0
  4. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/47382883a57ad5790d3fd6abd39f33f773726b3b +1 -0
  5. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/4939a895ecf4daac58b0d73bccd49876515d41b8 +1 -0
  6. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/592d89407340c5ec6ad006df327e588b3f442eca +1 -0
  7. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/59783c8cc0cc9d984f5407c218d213bca4c98503 +1 -0
  8. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/61fa6cf725249a1cae9b94b74a8c23aa3efd2ca1 +1 -0
  9. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/77aced5528ce05fe900fdf7634042ec3c0f18255 +1 -0
  10. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/b32ea8d6d3de0c6d8e178eff069fea4e11fa92b1 +1 -0
  11. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/c05be8364ff56aba0298689783666ddb97a31285 +1 -0
  12. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/e23bf49223ba8b7ec926e46c40b27b0353cfc50e +1 -0
  13. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/code/cache/eec92c105b2694c31bff21903ddc3ef81af8f056 +1 -0
  14. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/07113f92cc3a9f5dc57b92f54542a63463f1fa9a +1 -0
  15. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/1ba6467ba06d4bfc0c8581f4ee12c2c0f687214e +1 -0
  16. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/1de1e40928c5c58c4f677d93986cdff01b3d0417 +1 -0
  17. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/47382883a57ad5790d3fd6abd39f33f773726b3b +1 -0
  18. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/4939a895ecf4daac58b0d73bccd49876515d41b8 +1 -0
  19. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/592d89407340c5ec6ad006df327e588b3f442eca +1 -0
  20. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/59783c8cc0cc9d984f5407c218d213bca4c98503 +1 -0
  21. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/61fa6cf725249a1cae9b94b74a8c23aa3efd2ca1 +1 -0
  22. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/77aced5528ce05fe900fdf7634042ec3c0f18255 +1 -0
  23. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/b32ea8d6d3de0c6d8e178eff069fea4e11fa92b1 +1 -0
  24. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/c05be8364ff56aba0298689783666ddb97a31285 +1 -0
  25. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/e23bf49223ba8b7ec926e46c40b27b0353cfc50e +1 -0
  26. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/semanticDiagnostics/cache/eec92c105b2694c31bff21903ddc3ef81af8f056 +1 -0
  27. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/07113f92cc3a9f5dc57b92f54542a63463f1fa9a +1 -0
  28. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/1ba6467ba06d4bfc0c8581f4ee12c2c0f687214e +1 -0
  29. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/1de1e40928c5c58c4f677d93986cdff01b3d0417 +1 -0
  30. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/47382883a57ad5790d3fd6abd39f33f773726b3b +1 -0
  31. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/4939a895ecf4daac58b0d73bccd49876515d41b8 +1 -0
  32. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/592d89407340c5ec6ad006df327e588b3f442eca +1 -0
  33. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/59783c8cc0cc9d984f5407c218d213bca4c98503 +1 -0
  34. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/61fa6cf725249a1cae9b94b74a8c23aa3efd2ca1 +1 -0
  35. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/77aced5528ce05fe900fdf7634042ec3c0f18255 +1 -0
  36. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/b32ea8d6d3de0c6d8e178eff069fea4e11fa92b1 +1 -0
  37. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/c05be8364ff56aba0298689783666ddb97a31285 +1 -0
  38. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/e23bf49223ba8b7ec926e46c40b27b0353cfc50e +1 -0
  39. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/syntacticDiagnostics/cache/eec92c105b2694c31bff21903ddc3ef81af8f056 +1 -0
  40. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/20b49cde4def23063b280689e4ff4d5a3803712b +0 -0
  41. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/3809196a67de680945038f2b4846e2e3b4af35aa +0 -0
  42. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/4ad5d47b1ce7bf45cc7d9ff8c970e1fc57f446f3 +0 -0
  43. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/5a0816a3c916ff0e4961dc0ec2da48646f2ac5aa +0 -0
  44. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/6182f5491d41e8f10acfbcf46ee875587904f5a3 +0 -0
  45. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/7ca2e31bcece668dfa5de5e1349ba34a757b5140 +0 -0
  46. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/86a4b0102f5568ac0a5b946d05c55f42c30b472d +0 -0
  47. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/87fae47dd5b05377c04cfe377699d748414dc1c9 +0 -0
  48. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/a7c23ecebcaf23c9346007731c5796b96c580738 +0 -0
  49. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/ac4d101c3489192db3e0ec98430a2336cba9a741 +0 -0
  50. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/b1eb441c5b806d06ba6bb36fcfd0cc4746c23a8a +0 -0
  51. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/b7942903000069a51e317fef1595a8ea1d8b828d +0 -0
  52. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/cee91236390168fd38b01aaae7bed3099bb4555a +0 -0
  53. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/d7c87ce194d923e6f02c7e570008e88ade1cbabf +0 -0
  54. package/.rpt2_cache/rpt2_73ef004c41e5fb714e8076cf96455df4f040d49c/types/cache/fba70878178c036fb4e9e1f19bdb465a1270d258 +0 -0
  55. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/05d17f791979143cbce20e3e3e811aa19ed8b492 +1 -0
  56. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/07113f92cc3a9f5dc57b92f54542a63463f1fa9a +1 -0
  57. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/1ba6467ba06d4bfc0c8581f4ee12c2c0f687214e +1 -0
  58. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/1de1e40928c5c58c4f677d93986cdff01b3d0417 +1 -0
  59. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/47382883a57ad5790d3fd6abd39f33f773726b3b +1 -0
  60. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/4d58c1113d07816b1909aaef4395fd8b4d0ee13c +1 -0
  61. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/4ee978699d6de2a60214b16c42d87f8e9309636b +1 -0
  62. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/50f4a014d14ada987c125e6ea55d4e6e75605313 +1 -0
  63. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/58aa8c228c99b690d3ca1f3b464585c41d1cd4bb +1 -0
  64. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/592d89407340c5ec6ad006df327e588b3f442eca +1 -0
  65. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/59783c8cc0cc9d984f5407c218d213bca4c98503 +1 -0
  66. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/61fa6cf725249a1cae9b94b74a8c23aa3efd2ca1 +1 -0
  67. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/89f8a81d9d078b69f9fa7fa95251b38ccc394a3b +1 -0
  68. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/b32ea8d6d3de0c6d8e178eff069fea4e11fa92b1 +1 -0
  69. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/c05be8364ff56aba0298689783666ddb97a31285 +1 -0
  70. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/e23bf49223ba8b7ec926e46c40b27b0353cfc50e +1 -0
  71. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/code/cache/eec92c105b2694c31bff21903ddc3ef81af8f056 +1 -0
  72. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/05d17f791979143cbce20e3e3e811aa19ed8b492 +1 -0
  73. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/07113f92cc3a9f5dc57b92f54542a63463f1fa9a +1 -0
  74. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/1ba6467ba06d4bfc0c8581f4ee12c2c0f687214e +1 -0
  75. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/1de1e40928c5c58c4f677d93986cdff01b3d0417 +1 -0
  76. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/47382883a57ad5790d3fd6abd39f33f773726b3b +1 -0
  77. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/4d58c1113d07816b1909aaef4395fd8b4d0ee13c +1 -0
  78. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/4ee978699d6de2a60214b16c42d87f8e9309636b +1 -0
  79. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/50f4a014d14ada987c125e6ea55d4e6e75605313 +1 -0
  80. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/58aa8c228c99b690d3ca1f3b464585c41d1cd4bb +1 -0
  81. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/592d89407340c5ec6ad006df327e588b3f442eca +1 -0
  82. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/59783c8cc0cc9d984f5407c218d213bca4c98503 +1 -0
  83. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/61fa6cf725249a1cae9b94b74a8c23aa3efd2ca1 +1 -0
  84. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/89f8a81d9d078b69f9fa7fa95251b38ccc394a3b +1 -0
  85. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/b32ea8d6d3de0c6d8e178eff069fea4e11fa92b1 +1 -0
  86. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/c05be8364ff56aba0298689783666ddb97a31285 +1 -0
  87. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/e23bf49223ba8b7ec926e46c40b27b0353cfc50e +1 -0
  88. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/semanticDiagnostics/cache/eec92c105b2694c31bff21903ddc3ef81af8f056 +1 -0
  89. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/05d17f791979143cbce20e3e3e811aa19ed8b492 +1 -0
  90. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/07113f92cc3a9f5dc57b92f54542a63463f1fa9a +1 -0
  91. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/1ba6467ba06d4bfc0c8581f4ee12c2c0f687214e +1 -0
  92. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/1de1e40928c5c58c4f677d93986cdff01b3d0417 +1 -0
  93. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/47382883a57ad5790d3fd6abd39f33f773726b3b +1 -0
  94. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/4d58c1113d07816b1909aaef4395fd8b4d0ee13c +1 -0
  95. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/4ee978699d6de2a60214b16c42d87f8e9309636b +1 -0
  96. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/50f4a014d14ada987c125e6ea55d4e6e75605313 +1 -0
  97. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/58aa8c228c99b690d3ca1f3b464585c41d1cd4bb +1 -0
  98. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/592d89407340c5ec6ad006df327e588b3f442eca +1 -0
  99. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/59783c8cc0cc9d984f5407c218d213bca4c98503 +1 -0
  100. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/61fa6cf725249a1cae9b94b74a8c23aa3efd2ca1 +1 -0
  101. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/89f8a81d9d078b69f9fa7fa95251b38ccc394a3b +1 -0
  102. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/b32ea8d6d3de0c6d8e178eff069fea4e11fa92b1 +1 -0
  103. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/c05be8364ff56aba0298689783666ddb97a31285 +1 -0
  104. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/e23bf49223ba8b7ec926e46c40b27b0353cfc50e +1 -0
  105. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/syntacticDiagnostics/cache/eec92c105b2694c31bff21903ddc3ef81af8f056 +1 -0
  106. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/20b49cde4def23063b280689e4ff4d5a3803712b +0 -0
  107. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/3809196a67de680945038f2b4846e2e3b4af35aa +0 -0
  108. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/4ad5d47b1ce7bf45cc7d9ff8c970e1fc57f446f3 +0 -0
  109. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/5a0816a3c916ff0e4961dc0ec2da48646f2ac5aa +0 -0
  110. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/6182f5491d41e8f10acfbcf46ee875587904f5a3 +0 -0
  111. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/7ca2e31bcece668dfa5de5e1349ba34a757b5140 +0 -0
  112. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/86a4b0102f5568ac0a5b946d05c55f42c30b472d +0 -0
  113. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/87fae47dd5b05377c04cfe377699d748414dc1c9 +0 -0
  114. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/a7c23ecebcaf23c9346007731c5796b96c580738 +0 -0
  115. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/ac4d101c3489192db3e0ec98430a2336cba9a741 +0 -0
  116. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/b1eb441c5b806d06ba6bb36fcfd0cc4746c23a8a +0 -0
  117. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/b7942903000069a51e317fef1595a8ea1d8b828d +0 -0
  118. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/cee91236390168fd38b01aaae7bed3099bb4555a +0 -0
  119. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/d7c87ce194d923e6f02c7e570008e88ade1cbabf +0 -0
  120. package/.rpt2_cache/rpt2_e52dc086a65136b8064433446ffcd05307935b95/types/cache/fba70878178c036fb4e9e1f19bdb465a1270d258 +0 -0
  121. package/babel.config.js +6 -0
  122. package/package.json +7 -10
  123. package/rollup.config.js +50 -0
  124. package/scripts/cleanDistFolder.js +9 -0
  125. package/src/__tests__/utils.test.js +13 -0
  126. package/src/auth.ts +1514 -0
  127. package/src/browser/asn1hex.ts +296 -0
  128. package/src/browser/index.ts +17 -0
  129. package/src/browser/jsbn.ts +1213 -0
  130. package/src/browser/platform.ts +434 -0
  131. package/src/browser/rng.ts +15 -0
  132. package/src/browser/rsa.ts +262 -0
  133. package/src/commands.ts +1378 -0
  134. package/src/company.ts +244 -0
  135. package/src/configuration.ts +125 -0
  136. package/src/endpoint.ts +350 -0
  137. package/src/node/index.ts +17 -0
  138. package/src/node/platform.ts +283 -0
  139. package/src/platform.ts +76 -0
  140. package/{dist → src}/proto.d.ts +0 -0
  141. package/src/proto.js +136564 -0
  142. package/src/restMessages.ts +311 -0
  143. package/src/utils.ts +169 -0
  144. package/src/vault.ts +844 -0
  145. package/src/vendorContext.ts +69 -0
  146. package/src/vendorModel.ts +36 -0
  147. package/tsconfig.json +14 -0
  148. package/tsconfig.rollup.json +14 -0
@@ -0,0 +1,1213 @@
1
+ // Copyright (c) 2005 Tom Wu
2
+ // All Rights Reserved.
3
+ // See "LICENSE" for details.
4
+
5
+ // Basic JavaScript BN library - subset useful for RSA encryption.
6
+
7
+ // Bits per digit
8
+ var dbits;
9
+
10
+ // JavaScript engine analysis
11
+ var canary = 0xdeadbeefcafe;
12
+ var j_lm = ((canary&0xffffff)==0xefcafe);
13
+
14
+ // (public) Constructor
15
+ export function BigInteger(a?,b?,c?) {
16
+ if(a != null)
17
+ if("number" == typeof a) this.fromNumber(a,b,c);
18
+ else if(b == null && "string" != typeof a) this.fromString(a,256);
19
+ else this.fromString(a,b);
20
+ }
21
+
22
+ // convert a (hex) string to a bignum object
23
+ export function parseBigInt(str,r) {
24
+ return new BigInteger(str,r);
25
+ }
26
+
27
+ // return new, unset BigInteger
28
+ function nbi() { return new BigInteger(); }
29
+
30
+ // am: Compute w_j += (x*this_i), propagate carries,
31
+ // c is initial carry, returns final carry.
32
+ // c < 3*dvalue, x < 2*dvalue, this_i < dvalue
33
+ // We need to select the fastest one that works in this environment.
34
+
35
+ // am1: use a single mult and divide to get the high bits,
36
+ // max digit bits should be 26 because
37
+ // max internal value = 2*dvalue^2-2*dvalue (< 2^53)
38
+ function am1(i,x,w,j,c,n) {
39
+ while(--n >= 0) {
40
+ var v = x*this[i++]+w[j]+c;
41
+ c = Math.floor(v/0x4000000);
42
+ w[j++] = v&0x3ffffff;
43
+ }
44
+ return c;
45
+ }
46
+ // am2 avoids a big mult-and-extract completely.
47
+ // Max digit bits should be <= 30 because we do bitwise ops
48
+ // on values up to 2*hdvalue^2-hdvalue-1 (< 2^31)
49
+ function am2(i,x,w,j,c,n) {
50
+ var xl = x&0x7fff, xh = x>>15;
51
+ while(--n >= 0) {
52
+ var l = this[i]&0x7fff;
53
+ var h = this[i++]>>15;
54
+ var m = xh*l+h*xl;
55
+ l = xl*l+((m&0x7fff)<<15)+w[j]+(c&0x3fffffff);
56
+ c = (l>>>30)+(m>>>15)+xh*h+(c>>>30);
57
+ w[j++] = l&0x3fffffff;
58
+ }
59
+ return c;
60
+ }
61
+ // Alternately, set max digit bits to 28 since some
62
+ // browsers slow down when dealing with 32-bit numbers.
63
+ function am3(i,x,w,j,c,n) {
64
+ var xl = x&0x3fff, xh = x>>14;
65
+ while(--n >= 0) {
66
+ var l = this[i]&0x3fff;
67
+ var h = this[i++]>>14;
68
+ var m = xh*l+h*xl;
69
+ l = xl*l+((m&0x3fff)<<14)+w[j]+c;
70
+ c = (l>>28)+(m>>14)+xh*h;
71
+ w[j++] = l&0xfffffff;
72
+ }
73
+ return c;
74
+ }
75
+ if(j_lm && (typeof(navigator) !== 'undefined') && (navigator.appName == "Microsoft Internet Explorer")) {
76
+ BigInteger.prototype.am = am2;
77
+ dbits = 30;
78
+ }
79
+ else if(j_lm && (typeof(navigator) !== 'undefined') && (navigator.appName != "Netscape")) {
80
+ BigInteger.prototype.am = am1;
81
+ dbits = 26;
82
+ }
83
+ else { // Mozilla/Netscape seems to prefer am3
84
+ BigInteger.prototype.am = am3;
85
+ dbits = 28;
86
+ }
87
+
88
+ BigInteger.prototype.DB = dbits;
89
+ BigInteger.prototype.DM = ((1<<dbits)-1);
90
+ BigInteger.prototype.DV = (1<<dbits);
91
+
92
+ var BI_FP = 52;
93
+ BigInteger.prototype.FV = Math.pow(2,BI_FP);
94
+ BigInteger.prototype.F1 = BI_FP-dbits;
95
+ BigInteger.prototype.F2 = 2*dbits-BI_FP;
96
+
97
+ // Digit conversions
98
+ var BI_RM = "0123456789abcdefghijklmnopqrstuvwxyz";
99
+ var BI_RC = new Array();
100
+ var rr,vv;
101
+ rr = "0".charCodeAt(0);
102
+ for(vv = 0; vv <= 9; ++vv) BI_RC[rr++] = vv;
103
+ rr = "a".charCodeAt(0);
104
+ for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
105
+ rr = "A".charCodeAt(0);
106
+ for(vv = 10; vv < 36; ++vv) BI_RC[rr++] = vv;
107
+
108
+ function int2char(n) { return BI_RM.charAt(n); }
109
+ function intAt(s,i) {
110
+ var c = BI_RC[s.charCodeAt(i)];
111
+ return (c==null)?-1:c;
112
+ }
113
+
114
+ // (protected) copy this to r
115
+ function bnpCopyTo(r) {
116
+ for(var i = this.t-1; i >= 0; --i) r[i] = this[i];
117
+ r.t = this.t;
118
+ r.s = this.s;
119
+ }
120
+
121
+ // (protected) set from integer value x, -DV <= x < DV
122
+ function bnpFromInt(x) {
123
+ this.t = 1;
124
+ this.s = (x<0)?-1:0;
125
+ if(x > 0) this[0] = x;
126
+ else if(x < -1) this[0] = x+this.DV;
127
+ else this.t = 0;
128
+ }
129
+
130
+ // return bigint initialized to value
131
+ function nbv(i) { var r = nbi(); r.fromInt(i); return r; }
132
+
133
+ // (protected) set from string and radix
134
+ function bnpFromString(s,b) {
135
+ var k;
136
+ if(b == 16) k = 4;
137
+ else if(b == 8) k = 3;
138
+ else if(b == 256) k = 8; // byte array
139
+ else if(b == 2) k = 1;
140
+ else if(b == 32) k = 5;
141
+ else if(b == 4) k = 2;
142
+ else { this.fromRadix(s,b); return; }
143
+ this.t = 0;
144
+ this.s = 0;
145
+ var i = s.length, mi = false, sh = 0;
146
+ while(--i >= 0) {
147
+ var x = (k==8)?s[i]&0xff:intAt(s,i);
148
+ if(x < 0) {
149
+ if(s.charAt(i) == "-") mi = true;
150
+ continue;
151
+ }
152
+ mi = false;
153
+ if(sh == 0)
154
+ this[this.t++] = x;
155
+ else if(sh+k > this.DB) {
156
+ this[this.t-1] |= (x&((1<<(this.DB-sh))-1))<<sh;
157
+ this[this.t++] = (x>>(this.DB-sh));
158
+ }
159
+ else
160
+ this[this.t-1] |= x<<sh;
161
+ sh += k;
162
+ if(sh >= this.DB) sh -= this.DB;
163
+ }
164
+ if(k == 8 && (s[0]&0x80) != 0) {
165
+ this.s = -1;
166
+ if(sh > 0) this[this.t-1] |= ((1<<(this.DB-sh))-1)<<sh;
167
+ }
168
+ this.clamp();
169
+ if(mi) ZERO.subTo(this,this);
170
+ }
171
+
172
+ // (protected) clamp off excess high words
173
+ function bnpClamp() {
174
+ var c = this.s&this.DM;
175
+ while(this.t > 0 && this[this.t-1] == c) --this.t;
176
+ }
177
+
178
+ // (public) return string representation in given radix
179
+ function bnToString(b) {
180
+ if(this.s < 0) return "-"+this.negate().toString(b);
181
+ var k;
182
+ if(b == 16) k = 4;
183
+ else if(b == 8) k = 3;
184
+ else if(b == 2) k = 1;
185
+ else if(b == 32) k = 5;
186
+ else if(b == 4) k = 2;
187
+ else return this.toRadix(b);
188
+ var km = (1<<k)-1, d, m = false, r = "", i = this.t;
189
+ var p = this.DB-(i*this.DB)%k;
190
+ if(i-- > 0) {
191
+ if(p < this.DB && (d = this[i]>>p) > 0) { m = true; r = int2char(d); }
192
+ while(i >= 0) {
193
+ if(p < k) {
194
+ d = (this[i]&((1<<p)-1))<<(k-p);
195
+ d |= this[--i]>>(p+=this.DB-k);
196
+ }
197
+ else {
198
+ d = (this[i]>>(p-=k))&km;
199
+ if(p <= 0) { p += this.DB; --i; }
200
+ }
201
+ if(d > 0) m = true;
202
+ if(m) r += int2char(d);
203
+ }
204
+ }
205
+ return m?r:"0";
206
+ }
207
+
208
+ // (public) -this
209
+ function bnNegate() { var r = nbi(); ZERO.subTo(this,r); return r; }
210
+
211
+ // (public) |this|
212
+ function bnAbs() { return (this.s<0)?this.negate():this; }
213
+
214
+ // (public) return + if this > a, - if this < a, 0 if equal
215
+ function bnCompareTo(a) {
216
+ var r = this.s-a.s;
217
+ if(r != 0) return r;
218
+ var i = this.t;
219
+ r = i-a.t;
220
+ if(r != 0) return (this.s<0)?-r:r;
221
+ while(--i >= 0) if((r=this[i]-a[i]) != 0) return r;
222
+ return 0;
223
+ }
224
+
225
+ // returns bit length of the integer x
226
+ function nbits(x) {
227
+ var r = 1, t;
228
+ if((t=x>>>16) != 0) { x = t; r += 16; }
229
+ if((t=x>>8) != 0) { x = t; r += 8; }
230
+ if((t=x>>4) != 0) { x = t; r += 4; }
231
+ if((t=x>>2) != 0) { x = t; r += 2; }
232
+ if((t=x>>1) != 0) { x = t; r += 1; }
233
+ return r;
234
+ }
235
+
236
+ // (public) return the number of bits in "this"
237
+ function bnBitLength() {
238
+ if(this.t <= 0) return 0;
239
+ return this.DB*(this.t-1)+nbits(this[this.t-1]^(this.s&this.DM));
240
+ }
241
+
242
+ // (protected) r = this << n*DB
243
+ function bnpDLShiftTo(n,r) {
244
+ var i;
245
+ for(i = this.t-1; i >= 0; --i) r[i+n] = this[i];
246
+ for(i = n-1; i >= 0; --i) r[i] = 0;
247
+ r.t = this.t+n;
248
+ r.s = this.s;
249
+ }
250
+
251
+ // (protected) r = this >> n*DB
252
+ function bnpDRShiftTo(n,r) {
253
+ for(var i = n; i < this.t; ++i) r[i-n] = this[i];
254
+ r.t = Math.max(this.t-n,0);
255
+ r.s = this.s;
256
+ }
257
+
258
+ // (protected) r = this << n
259
+ function bnpLShiftTo(n,r) {
260
+ var bs = n%this.DB;
261
+ var cbs = this.DB-bs;
262
+ var bm = (1<<cbs)-1;
263
+ var ds = Math.floor(n/this.DB), c = (this.s<<bs)&this.DM, i;
264
+ for(i = this.t-1; i >= 0; --i) {
265
+ r[i+ds+1] = (this[i]>>cbs)|c;
266
+ c = (this[i]&bm)<<bs;
267
+ }
268
+ for(i = ds-1; i >= 0; --i) r[i] = 0;
269
+ r[ds] = c;
270
+ r.t = this.t+ds+1;
271
+ r.s = this.s;
272
+ r.clamp();
273
+ }
274
+
275
+ // (protected) r = this >> n
276
+ function bnpRShiftTo(n,r) {
277
+ r.s = this.s;
278
+ var ds = Math.floor(n/this.DB);
279
+ if(ds >= this.t) { r.t = 0; return; }
280
+ var bs = n%this.DB;
281
+ var cbs = this.DB-bs;
282
+ var bm = (1<<bs)-1;
283
+ r[0] = this[ds]>>bs;
284
+ for(var i = ds+1; i < this.t; ++i) {
285
+ r[i-ds-1] |= (this[i]&bm)<<cbs;
286
+ r[i-ds] = this[i]>>bs;
287
+ }
288
+ if(bs > 0) r[this.t-ds-1] |= (this.s&bm)<<cbs;
289
+ r.t = this.t-ds;
290
+ r.clamp();
291
+ }
292
+
293
+ // (protected) r = this - a
294
+ function bnpSubTo(a,r) {
295
+ var i = 0, c = 0, m = Math.min(a.t,this.t);
296
+ while(i < m) {
297
+ c += this[i]-a[i];
298
+ r[i++] = c&this.DM;
299
+ c >>= this.DB;
300
+ }
301
+ if(a.t < this.t) {
302
+ c -= a.s;
303
+ while(i < this.t) {
304
+ c += this[i];
305
+ r[i++] = c&this.DM;
306
+ c >>= this.DB;
307
+ }
308
+ c += this.s;
309
+ }
310
+ else {
311
+ c += this.s;
312
+ while(i < a.t) {
313
+ c -= a[i];
314
+ r[i++] = c&this.DM;
315
+ c >>= this.DB;
316
+ }
317
+ c -= a.s;
318
+ }
319
+ r.s = (c<0)?-1:0;
320
+ if(c < -1) r[i++] = this.DV+c;
321
+ else if(c > 0) r[i++] = c;
322
+ r.t = i;
323
+ r.clamp();
324
+ }
325
+
326
+ // (protected) r = this * a, r != this,a (HAC 14.12)
327
+ // "this" should be the larger one if appropriate.
328
+ function bnpMultiplyTo(a,r) {
329
+ var x = this.abs(), y = a.abs();
330
+ var i = x.t;
331
+ r.t = i+y.t;
332
+ while(--i >= 0) r[i] = 0;
333
+ for(i = 0; i < y.t; ++i) r[i+x.t] = x.am(0,y[i],r,i,0,x.t);
334
+ r.s = 0;
335
+ r.clamp();
336
+ if(this.s != a.s) ZERO.subTo(r,r);
337
+ }
338
+
339
+ // (protected) r = this^2, r != this (HAC 14.16)
340
+ function bnpSquareTo(r) {
341
+ var x = this.abs();
342
+ var i = r.t = 2*x.t;
343
+ while(--i >= 0) r[i] = 0;
344
+ for(i = 0; i < x.t-1; ++i) {
345
+ var c = x.am(i,x[i],r,2*i,0,1);
346
+ if((r[i+x.t]+=x.am(i+1,2*x[i],r,2*i+1,c,x.t-i-1)) >= x.DV) {
347
+ r[i+x.t] -= x.DV;
348
+ r[i+x.t+1] = 1;
349
+ }
350
+ }
351
+ if(r.t > 0) r[r.t-1] += x.am(i,x[i],r,2*i,0,1);
352
+ r.s = 0;
353
+ r.clamp();
354
+ }
355
+
356
+ // (protected) divide this by m, quotient and remainder to q, r (HAC 14.20)
357
+ // r != q, this != m. q or r may be null.
358
+ function bnpDivRemTo(m,q,r) {
359
+ var pm = m.abs();
360
+ if(pm.t <= 0) return;
361
+ var pt = this.abs();
362
+ if(pt.t < pm.t) {
363
+ if(q != null) q.fromInt(0);
364
+ if(r != null) this.copyTo(r);
365
+ return;
366
+ }
367
+ if(r == null) r = nbi();
368
+ var y = nbi(), ts = this.s, ms = m.s;
369
+ var nsh = this.DB-nbits(pm[pm.t-1]); // normalize modulus
370
+ if(nsh > 0) { pm.lShiftTo(nsh,y); pt.lShiftTo(nsh,r); }
371
+ else { pm.copyTo(y); pt.copyTo(r); }
372
+ var ys = y.t;
373
+ var y0 = y[ys-1];
374
+ if(y0 == 0) return;
375
+ var yt = y0*(1<<this.F1)+((ys>1)?y[ys-2]>>this.F2:0);
376
+ var d1 = this.FV/yt, d2 = (1<<this.F1)/yt, e = 1<<this.F2;
377
+ var i = r.t, j = i-ys, t = (q==null)?nbi():q;
378
+ y.dlShiftTo(j,t);
379
+ if(r.compareTo(t) >= 0) {
380
+ r[r.t++] = 1;
381
+ r.subTo(t,r);
382
+ }
383
+ ONE.dlShiftTo(ys,t);
384
+ t.subTo(y,y); // "negative" y so we can replace sub with am later
385
+ while(y.t < ys) y[y.t++] = 0;
386
+ while(--j >= 0) {
387
+ // Estimate quotient digit
388
+ var qd = (r[--i]==y0)?this.DM:Math.floor(r[i]*d1+(r[i-1]+e)*d2);
389
+ if((r[i]+=y.am(0,qd,r,j,0,ys)) < qd) { // Try it out
390
+ y.dlShiftTo(j,t);
391
+ r.subTo(t,r);
392
+ while(r[i] < --qd) r.subTo(t,r);
393
+ }
394
+ }
395
+ if(q != null) {
396
+ r.drShiftTo(ys,q);
397
+ if(ts != ms) ZERO.subTo(q,q);
398
+ }
399
+ r.t = ys;
400
+ r.clamp();
401
+ if(nsh > 0) r.rShiftTo(nsh,r); // Denormalize remainder
402
+ if(ts < 0) ZERO.subTo(r,r);
403
+ }
404
+
405
+ // (public) this mod a
406
+ function bnMod(a) {
407
+ var r = nbi();
408
+ this.abs().divRemTo(a,null,r);
409
+ if(this.s < 0 && r.compareTo(ZERO) > 0) a.subTo(r,r);
410
+ return r;
411
+ }
412
+
413
+ // Modular reduction using "classic" algorithm
414
+ function Classic(m) { this.m = m; }
415
+ function cConvert(x) {
416
+ if(x.s < 0 || x.compareTo(this.m) >= 0) return x.mod(this.m);
417
+ else return x;
418
+ }
419
+ function cRevert(x) { return x; }
420
+ function cReduce(x) { x.divRemTo(this.m,null,x); }
421
+ function cMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
422
+ function cSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
423
+
424
+ Classic.prototype.convert = cConvert;
425
+ Classic.prototype.revert = cRevert;
426
+ Classic.prototype.reduce = cReduce;
427
+ Classic.prototype.mulTo = cMulTo;
428
+ Classic.prototype.sqrTo = cSqrTo;
429
+
430
+ // (protected) return "-1/this % 2^DB"; useful for Mont. reduction
431
+ // justification:
432
+ // xy == 1 (mod m)
433
+ // xy = 1+km
434
+ // xy(2-xy) = (1+km)(1-km)
435
+ // x[y(2-xy)] = 1-k^2m^2
436
+ // x[y(2-xy)] == 1 (mod m^2)
437
+ // if y is 1/x mod m, then y(2-xy) is 1/x mod m^2
438
+ // should reduce x and y(2-xy) by m^2 at each step to keep size bounded.
439
+ // JS multiply "overflows" differently from C/C++, so care is needed here.
440
+ function bnpInvDigit() {
441
+ if(this.t < 1) return 0;
442
+ var x = this[0];
443
+ if((x&1) == 0) return 0;
444
+ var y = x&3; // y == 1/x mod 2^2
445
+ y = (y*(2-(x&0xf)*y))&0xf; // y == 1/x mod 2^4
446
+ y = (y*(2-(x&0xff)*y))&0xff; // y == 1/x mod 2^8
447
+ y = (y*(2-(((x&0xffff)*y)&0xffff)))&0xffff; // y == 1/x mod 2^16
448
+ // last step - calculate inverse mod DV directly;
449
+ // assumes 16 < DB <= 32 and assumes ability to handle 48-bit ints
450
+ y = (y*(2-x*y%this.DV))%this.DV; // y == 1/x mod 2^dbits
451
+ // we really want the negative inverse, and -DV < y < DV
452
+ return (y>0)?this.DV-y:-y;
453
+ }
454
+
455
+ // Montgomery reduction
456
+ function Montgomery(m) {
457
+ this.m = m;
458
+ this.mp = m.invDigit();
459
+ this.mpl = this.mp&0x7fff;
460
+ this.mph = this.mp>>15;
461
+ this.um = (1<<(m.DB-15))-1;
462
+ this.mt2 = 2*m.t;
463
+ }
464
+
465
+ // xR mod m
466
+ function montConvert(x) {
467
+ var r = nbi();
468
+ x.abs().dlShiftTo(this.m.t,r);
469
+ r.divRemTo(this.m,null,r);
470
+ if(x.s < 0 && r.compareTo(ZERO) > 0) this.m.subTo(r,r);
471
+ return r;
472
+ }
473
+
474
+ // x/R mod m
475
+ function montRevert(x) {
476
+ var r = nbi();
477
+ x.copyTo(r);
478
+ this.reduce(r);
479
+ return r;
480
+ }
481
+
482
+ // x = x/R mod m (HAC 14.32)
483
+ function montReduce(x) {
484
+ while(x.t <= this.mt2) // pad x so am has enough room later
485
+ x[x.t++] = 0;
486
+ for(var i = 0; i < this.m.t; ++i) {
487
+ // faster way of calculating u0 = x[i]*mp mod DV
488
+ var j = x[i]&0x7fff;
489
+ var u0 = (j*this.mpl+(((j*this.mph+(x[i]>>15)*this.mpl)&this.um)<<15))&x.DM;
490
+ // use am to combine the multiply-shift-add into one call
491
+ j = i+this.m.t;
492
+ x[j] += this.m.am(0,u0,x,i,0,this.m.t);
493
+ // propagate carry
494
+ while(x[j] >= x.DV) { x[j] -= x.DV; x[++j]++; }
495
+ }
496
+ x.clamp();
497
+ x.drShiftTo(this.m.t,x);
498
+ if(x.compareTo(this.m) >= 0) x.subTo(this.m,x);
499
+ }
500
+
501
+ // r = "x^2/R mod m"; x != r
502
+ function montSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
503
+
504
+ // r = "xy/R mod m"; x,y != r
505
+ function montMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
506
+
507
+ Montgomery.prototype.convert = montConvert;
508
+ Montgomery.prototype.revert = montRevert;
509
+ Montgomery.prototype.reduce = montReduce;
510
+ Montgomery.prototype.mulTo = montMulTo;
511
+ Montgomery.prototype.sqrTo = montSqrTo;
512
+
513
+ // (protected) true iff this is even
514
+ function bnpIsEven() { return ((this.t>0)?(this[0]&1):this.s) == 0; }
515
+
516
+ // (protected) this^e, e < 2^32, doing sqr and mul with "r" (HAC 14.79)
517
+ function bnpExp(e,z) {
518
+ if(e > 0xffffffff || e < 1) return ONE;
519
+ var r = nbi(), r2 = nbi(), g = z.convert(this), i = nbits(e)-1;
520
+ g.copyTo(r);
521
+ while(--i >= 0) {
522
+ z.sqrTo(r,r2);
523
+ if((e&(1<<i)) > 0) z.mulTo(r2,g,r);
524
+ else { var t = r; r = r2; r2 = t; }
525
+ }
526
+ return z.revert(r);
527
+ }
528
+
529
+ // (public) this^e % m, 0 <= e < 2^32
530
+ function bnModPowInt(e,m) {
531
+ var z;
532
+ if(e < 256 || m.isEven()) z = new Classic(m); else z = new Montgomery(m);
533
+ return this.exp(e,z);
534
+ }
535
+
536
+
537
+ // jsbn2
538
+
539
+ // Extended JavaScript BN functions, required for RSA private ops.
540
+
541
+ // Version 1.1: new BigInteger("0", 10) returns "proper" zero
542
+ // Version 1.2: square() API, isProbablePrime fix
543
+
544
+ // (public)
545
+ function bnClone() { var r = nbi(); this.copyTo(r); return r; }
546
+
547
+ // (public) return value as integer
548
+ function bnIntValue() {
549
+ if(this.s < 0) {
550
+ if(this.t == 1) return this[0]-this.DV;
551
+ else if(this.t == 0) return -1;
552
+ }
553
+ else if(this.t == 1) return this[0];
554
+ else if(this.t == 0) return 0;
555
+ // assumes 16 < DB < 32
556
+ return ((this[1]&((1<<(32-this.DB))-1))<<this.DB)|this[0];
557
+ }
558
+
559
+ // (public) return value as byte
560
+ function bnByteValue() { return (this.t==0)?this.s:(this[0]<<24)>>24; }
561
+
562
+ // (public) return value as short (assumes DB>=16)
563
+ function bnShortValue() { return (this.t==0)?this.s:(this[0]<<16)>>16; }
564
+
565
+ // (protected) return x s.t. r^x < DV
566
+ function bnpChunkSize(r) { return Math.floor(Math.LN2*this.DB/Math.log(r)); }
567
+
568
+ // (public) 0 if this == 0, 1 if this > 0
569
+ function bnSigNum() {
570
+ if(this.s < 0) return -1;
571
+ else if(this.t <= 0 || (this.t == 1 && this[0] <= 0)) return 0;
572
+ else return 1;
573
+ }
574
+
575
+ // (protected) convert to radix string
576
+ function bnpToRadix(b) {
577
+ if(b == null) b = 10;
578
+ if(this.signum() == 0 || b < 2 || b > 36) return "0";
579
+ var cs = this.chunkSize(b);
580
+ var a = Math.pow(b,cs);
581
+ var d = nbv(a), y = nbi(), z = nbi(), r = "";
582
+ this.divRemTo(d,y,z);
583
+ while(y.signum() > 0) {
584
+ r = (a+z.intValue()).toString(b).substr(1) + r;
585
+ y.divRemTo(d,y,z);
586
+ }
587
+ return z.intValue().toString(b) + r;
588
+ }
589
+
590
+ // (protected) convert from radix string
591
+ function bnpFromRadix(s,b) {
592
+ this.fromInt(0);
593
+ if(b == null) b = 10;
594
+ var cs = this.chunkSize(b);
595
+ var d = Math.pow(b,cs), mi = false, j = 0, w = 0;
596
+ for(var i = 0; i < s.length; ++i) {
597
+ var x = intAt(s,i);
598
+ if(x < 0) {
599
+ if(s.charAt(i) == "-" && this.signum() == 0) mi = true;
600
+ continue;
601
+ }
602
+ w = b*w+x;
603
+ if(++j >= cs) {
604
+ this.dMultiply(d);
605
+ this.dAddOffset(w,0);
606
+ j = 0;
607
+ w = 0;
608
+ }
609
+ }
610
+ if(j > 0) {
611
+ this.dMultiply(Math.pow(b,j));
612
+ this.dAddOffset(w,0);
613
+ }
614
+ if(mi) ZERO.subTo(this,this);
615
+ }
616
+
617
+ // (protected) alternate constructor
618
+ function bnpFromNumber(a,b,c) {
619
+ if("number" == typeof b) {
620
+ // new BigInteger(int,int,RNG)
621
+ if(a < 2) this.fromInt(1);
622
+ else {
623
+ this.fromNumber(a,c);
624
+ if(!this.testBit(a-1)) // force MSB set
625
+ this.bitwiseTo(ONE.shiftLeft(a-1),op_or,this);
626
+ if(this.isEven()) this.dAddOffset(1,0); // force odd
627
+ while(!this.isProbablePrime(b)) {
628
+ this.dAddOffset(2,0);
629
+ if(this.bitLength() > a) this.subTo(ONE.shiftLeft(a-1),this);
630
+ }
631
+ }
632
+ }
633
+ else {
634
+ // new BigInteger(int,RNG)
635
+ var x = new Array(), t = a&7;
636
+ x.length = (a>>3)+1;
637
+ b.nextBytes(x);
638
+ if(t > 0) x[0] &= ((1<<t)-1); else x[0] = 0;
639
+ this.fromString(x,256);
640
+ }
641
+ }
642
+
643
+ // (public) convert to bigendian byte array
644
+ function bnToByteArray() {
645
+ var i = this.t, r = new Array();
646
+ r[0] = this.s;
647
+ var p = this.DB-(i*this.DB)%8, d, k = 0;
648
+ if(i-- > 0) {
649
+ if(p < this.DB && (d = this[i]>>p) != (this.s&this.DM)>>p)
650
+ r[k++] = d|(this.s<<(this.DB-p));
651
+ while(i >= 0) {
652
+ if(p < 8) {
653
+ d = (this[i]&((1<<p)-1))<<(8-p);
654
+ d |= this[--i]>>(p+=this.DB-8);
655
+ }
656
+ else {
657
+ d = (this[i]>>(p-=8))&0xff;
658
+ if(p <= 0) { p += this.DB; --i; }
659
+ }
660
+ if((d&0x80) != 0) d |= -256;
661
+ if(k == 0 && (this.s&0x80) != (d&0x80)) ++k;
662
+ if(k > 0 || d != this.s) r[k++] = d;
663
+ }
664
+ }
665
+ return r;
666
+ }
667
+
668
+ function bnEquals(a) { return(this.compareTo(a)==0); }
669
+ function bnMin(a) { return(this.compareTo(a)<0)?this:a; }
670
+ function bnMax(a) { return(this.compareTo(a)>0)?this:a; }
671
+
672
+ // (protected) r = this op a (bitwise)
673
+ function bnpBitwiseTo(a,op,r) {
674
+ var i, f, m = Math.min(a.t,this.t);
675
+ for(i = 0; i < m; ++i) r[i] = op(this[i],a[i]);
676
+ if(a.t < this.t) {
677
+ f = a.s&this.DM;
678
+ for(i = m; i < this.t; ++i) r[i] = op(this[i],f);
679
+ r.t = this.t;
680
+ }
681
+ else {
682
+ f = this.s&this.DM;
683
+ for(i = m; i < a.t; ++i) r[i] = op(f,a[i]);
684
+ r.t = a.t;
685
+ }
686
+ r.s = op(this.s,a.s);
687
+ r.clamp();
688
+ }
689
+
690
+ // (public) this & a
691
+ function op_and(x,y) { return x&y; }
692
+ function bnAnd(a) { var r = nbi(); this.bitwiseTo(a,op_and,r); return r; }
693
+
694
+ // (public) this | a
695
+ function op_or(x,y) { return x|y; }
696
+ function bnOr(a) { var r = nbi(); this.bitwiseTo(a,op_or,r); return r; }
697
+
698
+ // (public) this ^ a
699
+ function op_xor(x,y) { return x^y; }
700
+ function bnXor(a) { var r = nbi(); this.bitwiseTo(a,op_xor,r); return r; }
701
+
702
+ // (public) this & ~a
703
+ function op_andnot(x,y) { return x&~y; }
704
+ function bnAndNot(a) { var r = nbi(); this.bitwiseTo(a,op_andnot,r); return r; }
705
+
706
+ // (public) ~this
707
+ function bnNot() {
708
+ var r = nbi();
709
+ for(var i = 0; i < this.t; ++i) r[i] = this.DM&~this[i];
710
+ r.t = this.t;
711
+ r.s = ~this.s;
712
+ return r;
713
+ }
714
+
715
+ // (public) this << n
716
+ function bnShiftLeft(n) {
717
+ var r = nbi();
718
+ if(n < 0) this.rShiftTo(-n,r); else this.lShiftTo(n,r);
719
+ return r;
720
+ }
721
+
722
+ // (public) this >> n
723
+ function bnShiftRight(n) {
724
+ var r = nbi();
725
+ if(n < 0) this.lShiftTo(-n,r); else this.rShiftTo(n,r);
726
+ return r;
727
+ }
728
+
729
+ // return index of lowest 1-bit in x, x < 2^31
730
+ function lbit(x) {
731
+ if(x == 0) return -1;
732
+ var r = 0;
733
+ if((x&0xffff) == 0) { x >>= 16; r += 16; }
734
+ if((x&0xff) == 0) { x >>= 8; r += 8; }
735
+ if((x&0xf) == 0) { x >>= 4; r += 4; }
736
+ if((x&3) == 0) { x >>= 2; r += 2; }
737
+ if((x&1) == 0) ++r;
738
+ return r;
739
+ }
740
+
741
+ // (public) returns index of lowest 1-bit (or -1 if none)
742
+ function bnGetLowestSetBit() {
743
+ for(var i = 0; i < this.t; ++i)
744
+ if(this[i] != 0) return i*this.DB+lbit(this[i]);
745
+ if(this.s < 0) return this.t*this.DB;
746
+ return -1;
747
+ }
748
+
749
+ // return number of 1 bits in x
750
+ function cbit(x) {
751
+ var r = 0;
752
+ while(x != 0) { x &= x-1; ++r; }
753
+ return r;
754
+ }
755
+
756
+ // (public) return number of set bits
757
+ function bnBitCount() {
758
+ var r = 0, x = this.s&this.DM;
759
+ for(var i = 0; i < this.t; ++i) r += cbit(this[i]^x);
760
+ return r;
761
+ }
762
+
763
+ // (public) true iff nth bit is set
764
+ function bnTestBit(n) {
765
+ var j = Math.floor(n/this.DB);
766
+ if(j >= this.t) return(this.s!=0);
767
+ return((this[j]&(1<<(n%this.DB)))!=0);
768
+ }
769
+
770
+ // (protected) this op (1<<n)
771
+ function bnpChangeBit(n,op) {
772
+ var r = ONE.shiftLeft(n);
773
+ this.bitwiseTo(r,op,r);
774
+ return r;
775
+ }
776
+
777
+ // (public) this | (1<<n)
778
+ function bnSetBit(n) { return this.changeBit(n,op_or); }
779
+
780
+ // (public) this & ~(1<<n)
781
+ function bnClearBit(n) { return this.changeBit(n,op_andnot); }
782
+
783
+ // (public) this ^ (1<<n)
784
+ function bnFlipBit(n) { return this.changeBit(n,op_xor); }
785
+
786
+ // (protected) r = this + a
787
+ function bnpAddTo(a,r) {
788
+ var i = 0, c = 0, m = Math.min(a.t,this.t);
789
+ while(i < m) {
790
+ c += this[i]+a[i];
791
+ r[i++] = c&this.DM;
792
+ c >>= this.DB;
793
+ }
794
+ if(a.t < this.t) {
795
+ c += a.s;
796
+ while(i < this.t) {
797
+ c += this[i];
798
+ r[i++] = c&this.DM;
799
+ c >>= this.DB;
800
+ }
801
+ c += this.s;
802
+ }
803
+ else {
804
+ c += this.s;
805
+ while(i < a.t) {
806
+ c += a[i];
807
+ r[i++] = c&this.DM;
808
+ c >>= this.DB;
809
+ }
810
+ c += a.s;
811
+ }
812
+ r.s = (c<0)?-1:0;
813
+ if(c > 0) r[i++] = c;
814
+ else if(c < -1) r[i++] = this.DV+c;
815
+ r.t = i;
816
+ r.clamp();
817
+ }
818
+
819
+ // (public) this + a
820
+ function bnAdd(a) { var r = nbi(); this.addTo(a,r); return r; }
821
+
822
+ // (public) this - a
823
+ function bnSubtract(a) { var r = nbi(); this.subTo(a,r); return r; }
824
+
825
+ // (public) this * a
826
+ function bnMultiply(a) { var r = nbi(); this.multiplyTo(a,r); return r; }
827
+
828
+ // (public) this^2
829
+ function bnSquare() { var r = nbi(); this.squareTo(r); return r; }
830
+
831
+ // (public) this / a
832
+ function bnDivide(a) { var r = nbi(); this.divRemTo(a,r,null); return r; }
833
+
834
+ // (public) this % a
835
+ function bnRemainder(a) { var r = nbi(); this.divRemTo(a,null,r); return r; }
836
+
837
+ // (public) [this/a,this%a]
838
+ function bnDivideAndRemainder(a) {
839
+ var q = nbi(), r = nbi();
840
+ this.divRemTo(a,q,r);
841
+ return new Array(q,r);
842
+ }
843
+
844
+ // (protected) this *= n, this >= 0, 1 < n < DV
845
+ function bnpDMultiply(n) {
846
+ this[this.t] = this.am(0,n-1,this,0,0,this.t);
847
+ ++this.t;
848
+ this.clamp();
849
+ }
850
+
851
+ // (protected) this += n << w words, this >= 0
852
+ function bnpDAddOffset(n,w) {
853
+ if(n == 0) return;
854
+ while(this.t <= w) this[this.t++] = 0;
855
+ this[w] += n;
856
+ while(this[w] >= this.DV) {
857
+ this[w] -= this.DV;
858
+ if(++w >= this.t) this[this.t++] = 0;
859
+ ++this[w];
860
+ }
861
+ }
862
+
863
+ // A "null" reducer
864
+ function NullExp() {}
865
+ function nNop(x) { return x; }
866
+ function nMulTo(x,y,r) { x.multiplyTo(y,r); }
867
+ function nSqrTo(x,r) { x.squareTo(r); }
868
+
869
+ NullExp.prototype.convert = nNop;
870
+ NullExp.prototype.revert = nNop;
871
+ NullExp.prototype.mulTo = nMulTo;
872
+ NullExp.prototype.sqrTo = nSqrTo;
873
+
874
+ // (public) this^e
875
+ function bnPow(e) { return this.exp(e,new NullExp()); }
876
+
877
+ // (protected) r = lower n words of "this * a", a.t <= n
878
+ // "this" should be the larger one if appropriate.
879
+ function bnpMultiplyLowerTo(a,n,r) {
880
+ var i = Math.min(this.t+a.t,n);
881
+ r.s = 0; // assumes a,this >= 0
882
+ r.t = i;
883
+ while(i > 0) r[--i] = 0;
884
+ var j;
885
+ for(j = r.t-this.t; i < j; ++i) r[i+this.t] = this.am(0,a[i],r,i,0,this.t);
886
+ for(j = Math.min(a.t,n); i < j; ++i) this.am(0,a[i],r,i,0,n-i);
887
+ r.clamp();
888
+ }
889
+
890
+ // (protected) r = "this * a" without lower n words, n > 0
891
+ // "this" should be the larger one if appropriate.
892
+ function bnpMultiplyUpperTo(a,n,r) {
893
+ --n;
894
+ var i = r.t = this.t+a.t-n;
895
+ r.s = 0; // assumes a,this >= 0
896
+ while(--i >= 0) r[i] = 0;
897
+ for(i = Math.max(n-this.t,0); i < a.t; ++i)
898
+ r[this.t+i-n] = this.am(n-i,a[i],r,0,0,this.t+i-n);
899
+ r.clamp();
900
+ r.drShiftTo(1,r);
901
+ }
902
+
903
+ // Barrett modular reduction
904
+ function Barrett(m) {
905
+ // setup Barrett
906
+ this.r2 = nbi();
907
+ this.q3 = nbi();
908
+ ONE.dlShiftTo(2*m.t,this.r2);
909
+ this.mu = this.r2.divide(m);
910
+ this.m = m;
911
+ }
912
+
913
+ function barrettConvert(x) {
914
+ if(x.s < 0 || x.t > 2*this.m.t) return x.mod(this.m);
915
+ else if(x.compareTo(this.m) < 0) return x;
916
+ else { var r = nbi(); x.copyTo(r); this.reduce(r); return r; }
917
+ }
918
+
919
+ function barrettRevert(x) { return x; }
920
+
921
+ // x = x mod m (HAC 14.42)
922
+ function barrettReduce(x) {
923
+ x.drShiftTo(this.m.t-1,this.r2);
924
+ if(x.t > this.m.t+1) { x.t = this.m.t+1; x.clamp(); }
925
+ this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3);
926
+ this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);
927
+ while(x.compareTo(this.r2) < 0) x.dAddOffset(1,this.m.t+1);
928
+ x.subTo(this.r2,x);
929
+ while(x.compareTo(this.m) >= 0) x.subTo(this.m,x);
930
+ }
931
+
932
+ // r = x^2 mod m; x != r
933
+ function barrettSqrTo(x,r) { x.squareTo(r); this.reduce(r); }
934
+
935
+ // r = x*y mod m; x,y != r
936
+ function barrettMulTo(x,y,r) { x.multiplyTo(y,r); this.reduce(r); }
937
+
938
+ Barrett.prototype.convert = barrettConvert;
939
+ Barrett.prototype.revert = barrettRevert;
940
+ Barrett.prototype.reduce = barrettReduce;
941
+ Barrett.prototype.mulTo = barrettMulTo;
942
+ Barrett.prototype.sqrTo = barrettSqrTo;
943
+
944
+ // (public) this^e % m (HAC 14.85)
945
+ function bnModPow(e,m) {
946
+ var i = e.bitLength(), k, r = nbv(1), z;
947
+ if(i <= 0) return r;
948
+ else if(i < 18) k = 1;
949
+ else if(i < 48) k = 3;
950
+ else if(i < 144) k = 4;
951
+ else if(i < 768) k = 5;
952
+ else k = 6;
953
+ if(i < 8)
954
+ z = new Classic(m);
955
+ else if(m.isEven())
956
+ z = new Barrett(m);
957
+ else
958
+ z = new Montgomery(m);
959
+
960
+ // precomputation
961
+ var g = new Array(), n = 3, k1 = k-1, km = (1<<k)-1;
962
+ g[1] = z.convert(this);
963
+ if(k > 1) {
964
+ var g2 = nbi();
965
+ z.sqrTo(g[1],g2);
966
+ while(n <= km) {
967
+ g[n] = nbi();
968
+ z.mulTo(g2,g[n-2],g[n]);
969
+ n += 2;
970
+ }
971
+ }
972
+
973
+ var j = e.t-1, w, is1 = true, r2 = nbi(), t;
974
+ i = nbits(e[j])-1;
975
+ while(j >= 0) {
976
+ if(i >= k1) w = (e[j]>>(i-k1))&km;
977
+ else {
978
+ w = (e[j]&((1<<(i+1))-1))<<(k1-i);
979
+ if(j > 0) w |= e[j-1]>>(this.DB+i-k1);
980
+ }
981
+
982
+ n = k;
983
+ while((w&1) == 0) { w >>= 1; --n; }
984
+ if((i -= n) < 0) { i += this.DB; --j; }
985
+ if(is1) { // ret == 1, don't bother squaring or multiplying it
986
+ g[w].copyTo(r);
987
+ is1 = false;
988
+ }
989
+ else {
990
+ while(n > 1) { z.sqrTo(r,r2); z.sqrTo(r2,r); n -= 2; }
991
+ if(n > 0) z.sqrTo(r,r2); else { t = r; r = r2; r2 = t; }
992
+ z.mulTo(r2,g[w],r);
993
+ }
994
+
995
+ while(j >= 0 && (e[j]&(1<<i)) == 0) {
996
+ z.sqrTo(r,r2); t = r; r = r2; r2 = t;
997
+ if(--i < 0) { i = this.DB-1; --j; }
998
+ }
999
+ }
1000
+ return z.revert(r);
1001
+ }
1002
+
1003
+ // (public) gcd(this,a) (HAC 14.54)
1004
+ function bnGCD(a) {
1005
+ var x = (this.s<0)?this.negate():this.clone();
1006
+ var y = (a.s<0)?a.negate():a.clone();
1007
+ if(x.compareTo(y) < 0) { var t = x; x = y; y = t; }
1008
+ var i = x.getLowestSetBit(), g = y.getLowestSetBit();
1009
+ if(g < 0) return x;
1010
+ if(i < g) g = i;
1011
+ if(g > 0) {
1012
+ x.rShiftTo(g,x);
1013
+ y.rShiftTo(g,y);
1014
+ }
1015
+ while(x.signum() > 0) {
1016
+ if((i = x.getLowestSetBit()) > 0) x.rShiftTo(i,x);
1017
+ if((i = y.getLowestSetBit()) > 0) y.rShiftTo(i,y);
1018
+ if(x.compareTo(y) >= 0) {
1019
+ x.subTo(y,x);
1020
+ x.rShiftTo(1,x);
1021
+ }
1022
+ else {
1023
+ y.subTo(x,y);
1024
+ y.rShiftTo(1,y);
1025
+ }
1026
+ }
1027
+ if(g > 0) y.lShiftTo(g,y);
1028
+ return y;
1029
+ }
1030
+
1031
+ // (protected) this % n, n < 2^26
1032
+ function bnpModInt(n) {
1033
+ if(n <= 0) return 0;
1034
+ var d = this.DV%n, r = (this.s<0)?n-1:0;
1035
+ if(this.t > 0)
1036
+ if(d == 0) r = this[0]%n;
1037
+ else for(var i = this.t-1; i >= 0; --i) r = (d*r+this[i])%n;
1038
+ return r;
1039
+ }
1040
+
1041
+ // (public) 1/this % m (HAC 14.61)
1042
+ function bnModInverse(m) {
1043
+ var ac = m.isEven();
1044
+ if((this.isEven() && ac) || m.signum() == 0) return ZERO;
1045
+ var u = m.clone(), v = this.clone();
1046
+ var a = nbv(1), b = nbv(0), c = nbv(0), d = nbv(1);
1047
+ while(u.signum() != 0) {
1048
+ while(u.isEven()) {
1049
+ u.rShiftTo(1,u);
1050
+ if(ac) {
1051
+ if(!a.isEven() || !b.isEven()) { a.addTo(this,a); b.subTo(m,b); }
1052
+ a.rShiftTo(1,a);
1053
+ }
1054
+ else if(!b.isEven()) b.subTo(m,b);
1055
+ b.rShiftTo(1,b);
1056
+ }
1057
+ while(v.isEven()) {
1058
+ v.rShiftTo(1,v);
1059
+ if(ac) {
1060
+ if(!c.isEven() || !d.isEven()) { c.addTo(this,c); d.subTo(m,d); }
1061
+ c.rShiftTo(1,c);
1062
+ }
1063
+ else if(!d.isEven()) d.subTo(m,d);
1064
+ d.rShiftTo(1,d);
1065
+ }
1066
+ if(u.compareTo(v) >= 0) {
1067
+ u.subTo(v,u);
1068
+ if(ac) a.subTo(c,a);
1069
+ b.subTo(d,b);
1070
+ }
1071
+ else {
1072
+ v.subTo(u,v);
1073
+ if(ac) c.subTo(a,c);
1074
+ d.subTo(b,d);
1075
+ }
1076
+ }
1077
+ if(v.compareTo(ONE) != 0) return ZERO;
1078
+ if(d.compareTo(m) >= 0) return d.subtract(m);
1079
+ if(d.signum() < 0) d.addTo(m,d); else return d;
1080
+ if(d.signum() < 0) return d.add(m); else return d;
1081
+ }
1082
+
1083
+ var lowprimes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997];
1084
+ var lplim = (1<<26)/lowprimes[lowprimes.length-1];
1085
+
1086
+ // (public) test primality with certainty >= 1-.5^t
1087
+ function bnIsProbablePrime(t) {
1088
+ var i, x = this.abs();
1089
+ if(x.t == 1 && x[0] <= lowprimes[lowprimes.length-1]) {
1090
+ for(i = 0; i < lowprimes.length; ++i)
1091
+ if(x[0] == lowprimes[i]) return true;
1092
+ return false;
1093
+ }
1094
+ if(x.isEven()) return false;
1095
+ i = 1;
1096
+ while(i < lowprimes.length) {
1097
+ var m = lowprimes[i], j = i+1;
1098
+ while(j < lowprimes.length && m < lplim) m *= lowprimes[j++];
1099
+ m = x.modInt(m);
1100
+ while(i < j) if(m%lowprimes[i++] == 0) return false;
1101
+ }
1102
+ return x.millerRabin(t);
1103
+ }
1104
+
1105
+ // (protected) true if probably prime (HAC 4.24, Miller-Rabin)
1106
+ function bnpMillerRabin(t) {
1107
+ var n1 = this.subtract(ONE);
1108
+ var k = n1.getLowestSetBit();
1109
+ if(k <= 0) return false;
1110
+ var r = n1.shiftRight(k);
1111
+ t = (t+1)>>1;
1112
+ if(t > lowprimes.length) t = lowprimes.length;
1113
+ var a = nbi();
1114
+ for(var i = 0; i < t; ++i) {
1115
+ //Pick bases at random, instead of starting at 2
1116
+ a.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);
1117
+ var y = a.modPow(r,this);
1118
+ if(y.compareTo(ONE) != 0 && y.compareTo(n1) != 0) {
1119
+ var j = 1;
1120
+ while(j++ < k && y.compareTo(n1) != 0) {
1121
+ y = y.modPowInt(2,this);
1122
+ if(y.compareTo(ONE) == 0) return false;
1123
+ }
1124
+ if(y.compareTo(n1) != 0) return false;
1125
+ }
1126
+ }
1127
+ return true;
1128
+ }
1129
+
1130
+
1131
+ // protected
1132
+ BigInteger.prototype.copyTo = bnpCopyTo;
1133
+ BigInteger.prototype.fromInt = bnpFromInt;
1134
+ BigInteger.prototype.fromString = bnpFromString;
1135
+ BigInteger.prototype.clamp = bnpClamp;
1136
+ BigInteger.prototype.dlShiftTo = bnpDLShiftTo;
1137
+ BigInteger.prototype.drShiftTo = bnpDRShiftTo;
1138
+ BigInteger.prototype.lShiftTo = bnpLShiftTo;
1139
+ BigInteger.prototype.rShiftTo = bnpRShiftTo;
1140
+ BigInteger.prototype.subTo = bnpSubTo;
1141
+ BigInteger.prototype.multiplyTo = bnpMultiplyTo;
1142
+ BigInteger.prototype.squareTo = bnpSquareTo;
1143
+ BigInteger.prototype.divRemTo = bnpDivRemTo;
1144
+ BigInteger.prototype.invDigit = bnpInvDigit;
1145
+ BigInteger.prototype.isEven = bnpIsEven;
1146
+ BigInteger.prototype.exp = bnpExp;
1147
+
1148
+ // public
1149
+ BigInteger.prototype.toString = bnToString;
1150
+ BigInteger.prototype.negate = bnNegate;
1151
+ BigInteger.prototype.abs = bnAbs;
1152
+ BigInteger.prototype.compareTo = bnCompareTo;
1153
+ BigInteger.prototype.bitLength = bnBitLength;
1154
+ BigInteger.prototype.mod = bnMod;
1155
+ BigInteger.prototype.modPowInt = bnModPowInt;
1156
+
1157
+ const ZERO = nbv(0);
1158
+ const ONE = nbv(1);
1159
+
1160
+ // jsbn2
1161
+
1162
+ // protected
1163
+ BigInteger.prototype.chunkSize = bnpChunkSize;
1164
+ BigInteger.prototype.toRadix = bnpToRadix;
1165
+ BigInteger.prototype.fromRadix = bnpFromRadix;
1166
+ BigInteger.prototype.fromNumber = bnpFromNumber;
1167
+ BigInteger.prototype.bitwiseTo = bnpBitwiseTo;
1168
+ BigInteger.prototype.changeBit = bnpChangeBit;
1169
+ BigInteger.prototype.addTo = bnpAddTo;
1170
+ BigInteger.prototype.dMultiply = bnpDMultiply;
1171
+ BigInteger.prototype.dAddOffset = bnpDAddOffset;
1172
+ BigInteger.prototype.multiplyLowerTo = bnpMultiplyLowerTo;
1173
+ BigInteger.prototype.multiplyUpperTo = bnpMultiplyUpperTo;
1174
+ BigInteger.prototype.modInt = bnpModInt;
1175
+ BigInteger.prototype.millerRabin = bnpMillerRabin;
1176
+
1177
+ // public
1178
+ BigInteger.prototype.clone = bnClone;
1179
+ BigInteger.prototype.intValue = bnIntValue;
1180
+ BigInteger.prototype.byteValue = bnByteValue;
1181
+ BigInteger.prototype.shortValue = bnShortValue;
1182
+ BigInteger.prototype.signum = bnSigNum;
1183
+ BigInteger.prototype.toByteArray = bnToByteArray;
1184
+ BigInteger.prototype.equals = bnEquals;
1185
+ BigInteger.prototype.min = bnMin;
1186
+ BigInteger.prototype.max = bnMax;
1187
+ BigInteger.prototype.and = bnAnd;
1188
+ BigInteger.prototype.or = bnOr;
1189
+ BigInteger.prototype.xor = bnXor;
1190
+ BigInteger.prototype.andNot = bnAndNot;
1191
+ BigInteger.prototype.not = bnNot;
1192
+ BigInteger.prototype.shiftLeft = bnShiftLeft;
1193
+ BigInteger.prototype.shiftRight = bnShiftRight;
1194
+ BigInteger.prototype.getLowestSetBit = bnGetLowestSetBit;
1195
+ BigInteger.prototype.bitCount = bnBitCount;
1196
+ BigInteger.prototype.testBit = bnTestBit;
1197
+ BigInteger.prototype.setBit = bnSetBit;
1198
+ BigInteger.prototype.clearBit = bnClearBit;
1199
+ BigInteger.prototype.flipBit = bnFlipBit;
1200
+ BigInteger.prototype.add = bnAdd;
1201
+ BigInteger.prototype.subtract = bnSubtract;
1202
+ BigInteger.prototype.multiply = bnMultiply;
1203
+ BigInteger.prototype.divide = bnDivide;
1204
+ BigInteger.prototype.remainder = bnRemainder;
1205
+ BigInteger.prototype.divideAndRemainder = bnDivideAndRemainder;
1206
+ BigInteger.prototype.modPow = bnModPow;
1207
+ BigInteger.prototype.modInverse = bnModInverse;
1208
+ BigInteger.prototype.pow = bnPow;
1209
+ BigInteger.prototype.gcd = bnGCD;
1210
+ BigInteger.prototype.isProbablePrime = bnIsProbablePrime;
1211
+
1212
+ // JSBN-specific extension
1213
+ BigInteger.prototype.square = bnSquare;