@bitgo/sdk-api 2.0.0-hotfix.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/package.json +33 -28
  2. package/dist/src/api.d.ts +9 -8
  3. package/dist/src/api.d.ts.map +1 -1
  4. package/dist/src/api.js +132 -72
  5. package/dist/src/bitgoAPI.d.ts +366 -22
  6. package/dist/src/bitgoAPI.d.ts.map +1 -1
  7. package/dist/src/bitgoAPI.js +1286 -212
  8. package/dist/src/encrypt.d.ts +16 -6
  9. package/dist/src/encrypt.d.ts.map +1 -1
  10. package/dist/src/encrypt.js +92 -14
  11. package/dist/src/encryptV2.d.ts +68 -0
  12. package/dist/src/encryptV2.d.ts.map +1 -0
  13. package/dist/src/encryptV2.js +202 -0
  14. package/dist/src/encryptionSession.d.ts +34 -0
  15. package/dist/src/encryptionSession.d.ts.map +1 -0
  16. package/dist/src/encryptionSession.js +95 -0
  17. package/dist/src/index.d.ts +2 -1
  18. package/dist/src/index.d.ts.map +1 -1
  19. package/dist/src/index.js +8 -3
  20. package/dist/src/types.d.ts +195 -65
  21. package/dist/src/types.d.ts.map +1 -1
  22. package/dist/src/types.js +5 -15
  23. package/dist/src/util.d.ts +12 -8
  24. package/dist/src/util.d.ts.map +1 -1
  25. package/dist/src/util.js +54 -20
  26. package/dist/src/v1/blockchain.d.ts +5 -0
  27. package/dist/src/v1/blockchain.d.ts.map +1 -0
  28. package/dist/src/v1/blockchain.js +127 -0
  29. package/dist/src/v1/keychains.d.ts +5 -0
  30. package/dist/src/v1/keychains.d.ts.map +1 -0
  31. package/dist/src/v1/keychains.js +328 -0
  32. package/dist/src/v1/markets.d.ts +5 -0
  33. package/dist/src/v1/markets.d.ts.map +1 -0
  34. package/dist/src/v1/markets.js +68 -0
  35. package/dist/src/v1/pendingapproval.d.ts +6 -0
  36. package/dist/src/v1/pendingapproval.d.ts.map +1 -0
  37. package/dist/src/v1/pendingapproval.js +361 -0
  38. package/dist/src/v1/pendingapprovals.d.ts +6 -0
  39. package/dist/src/v1/pendingapprovals.d.ts.map +1 -0
  40. package/dist/src/v1/pendingapprovals.js +102 -0
  41. package/dist/src/v1/signPsbt.d.ts +14 -0
  42. package/dist/src/v1/signPsbt.d.ts.map +1 -0
  43. package/dist/src/v1/signPsbt.js +69 -0
  44. package/dist/src/v1/transactionBuilder.d.ts +5 -0
  45. package/dist/src/v1/transactionBuilder.d.ts.map +1 -0
  46. package/dist/src/v1/transactionBuilder.js +1034 -0
  47. package/dist/src/v1/travelRule.d.ts +5 -0
  48. package/dist/src/v1/travelRule.d.ts.map +1 -0
  49. package/dist/src/v1/travelRule.js +316 -0
  50. package/dist/src/v1/verifyAddress.d.ts +6 -0
  51. package/dist/src/v1/verifyAddress.d.ts.map +1 -0
  52. package/dist/src/v1/verifyAddress.js +50 -0
  53. package/dist/src/v1/wallet.d.ts +6 -0
  54. package/dist/src/v1/wallet.d.ts.map +1 -0
  55. package/dist/src/v1/wallet.js +2366 -0
  56. package/dist/src/v1/wallets.d.ts +5 -0
  57. package/dist/src/v1/wallets.d.ts.map +1 -0
  58. package/dist/src/v1/wallets.js +537 -0
  59. package/dist/test/unit/api.d.ts +2 -0
  60. package/dist/test/unit/api.d.ts.map +1 -0
  61. package/dist/test/unit/api.js +307 -0
  62. package/dist/test/unit/bitgoAPI.d.ts +2 -0
  63. package/dist/test/unit/bitgoAPI.d.ts.map +1 -0
  64. package/dist/test/unit/bitgoAPI.js +1001 -0
  65. package/dist/test/unit/encrypt.d.ts +2 -0
  66. package/dist/test/unit/encrypt.d.ts.map +1 -0
  67. package/dist/test/unit/encrypt.js +377 -0
  68. package/dist/test/unit/hmacStrategy.d.ts +2 -0
  69. package/dist/test/unit/hmacStrategy.d.ts.map +1 -0
  70. package/dist/test/unit/hmacStrategy.js +136 -0
  71. package/dist/test/unit/utils.d.ts +2 -0
  72. package/dist/test/unit/utils.d.ts.map +1 -0
  73. package/dist/test/unit/utils.js +65 -0
  74. package/dist/test/unit/v1/fixtures/accelerate-tx.d.ts +4 -0
  75. package/dist/test/unit/v1/fixtures/accelerate-tx.d.ts.map +1 -0
  76. package/dist/test/unit/v1/fixtures/accelerate-tx.js +53 -0
  77. package/dist/test/unit/v1/fixtures/index.d.ts +3 -0
  78. package/dist/test/unit/v1/fixtures/index.d.ts.map +1 -0
  79. package/dist/test/unit/v1/fixtures/index.js +24 -0
  80. package/dist/test/unit/v1/signPsbt.d.ts +2 -0
  81. package/dist/test/unit/v1/signPsbt.d.ts.map +1 -0
  82. package/dist/test/unit/v1/signPsbt.js +53 -0
  83. package/dist/test/unit/v1/travelRule.d.ts +2 -0
  84. package/dist/test/unit/v1/travelRule.d.ts.map +1 -0
  85. package/dist/test/unit/v1/travelRule.js +125 -0
  86. package/dist/test/unit/v1/wallet.d.ts +2 -0
  87. package/dist/test/unit/v1/wallet.d.ts.map +1 -0
  88. package/dist/test/unit/v1/wallet.js +1658 -0
  89. package/dist/tsconfig.tsbuildinfo +1 -5259
  90. package/package.json +33 -28
  91. package/.eslintignore +0 -5
  92. package/CHANGELOG.md +0 -67
  93. package/dist/src/bip32path.d.ts +0 -24
  94. package/dist/src/bip32path.d.ts.map +0 -1
  95. package/dist/src/bip32path.js +0 -45
  96. package/dist/web/browser.html +0 -1
  97. package/dist/web/main.js +0 -2
  98. package/dist/web/main.js.LICENSE.txt +0 -30
package/dist/web/main.js DELETED
@@ -1,2 +0,0 @@
1
- /*! For license information please see main.js.LICENSE.txt */
2
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("superagent-proxy")):"function"==typeof define&&define.amd?define(["superagent-proxy"],e):"object"==typeof exports?exports.BitGoJS=e(require("superagent-proxy")):t.BitGoJS=e(t["superagent-proxy"])}(self,(function(t){return(()=>{var e={7438:(t,e,r)=>{function n(t){if(!n.supported)return null;var e,o=t&&t.imports,s=(e="AGFzbQEAAAABEANgAn9/AGADf39/AGABfwADBQQAAQICBQUBAQroBwdNBQZtZW1vcnkCAAxibGFrZTJiX2luaXQAAA5ibGFrZTJiX3VwZGF0ZQABDWJsYWtlMmJfZmluYWwAAhBibGFrZTJiX2NvbXByZXNzAAMKvz8EwAIAIABCADcDACAAQgA3AwggAEIANwMQIABCADcDGCAAQgA3AyAgAEIANwMoIABCADcDMCAAQgA3AzggAEIANwNAIABCADcDSCAAQgA3A1AgAEIANwNYIABCADcDYCAAQgA3A2ggAEIANwNwIABCADcDeCAAQoiS853/zPmE6gBBACkDAIU3A4ABIABCu86qptjQ67O7f0EIKQMAhTcDiAEgAEKr8NP0r+68tzxBECkDAIU3A5ABIABC8e30+KWn/aelf0EYKQMAhTcDmAEgAELRhZrv+s+Uh9EAQSApAwCFNwOgASAAQp/Y+dnCkdqCm39BKCkDAIU3A6gBIABC6/qG2r+19sEfQTApAwCFNwOwASAAQvnC+JuRo7Pw2wBBOCkDAIU3A7gBIABCADcDwAEgAEIANwPIASAAQgA3A9ABC20BA38gAEHAAWohAyAAQcgBaiEEIAQpAwCnIQUCQANAIAEgAkYNASAFQYABRgRAIAMgAykDACAFrXw3AwBBACEFIAAQAwsgACAFaiABLQAAOgAAIAVBAWohBSABQQFqIQEMAAsLIAQgBa03AwALYQEDfyAAQcABaiEBIABByAFqIQIgASABKQMAIAIpAwB8NwMAIABCfzcD0AEgAikDAKchAwJAA0AgA0GAAUYNASAAIANqQQA6AAAgA0EBaiEDDAALCyACIAOtNwMAIAAQAwuqOwIgfgl/IABBgAFqISEgAEGIAWohIiAAQZABaiEjIABBmAFqISQgAEGgAWohJSAAQagBaiEmIABBsAFqIScgAEG4AWohKCAhKQMAIQEgIikDACECICMpAwAhAyAkKQMAIQQgJSkDACEFICYpAwAhBiAnKQMAIQcgKCkDACEIQoiS853/zPmE6gAhCUK7zqqm2NDrs7t/IQpCq/DT9K/uvLc8IQtC8e30+KWn/aelfyEMQtGFmu/6z5SH0QAhDUKf2PnZwpHagpt/IQ5C6/qG2r+19sEfIQ9C+cL4m5Gjs/DbACEQIAApAwAhESAAKQMIIRIgACkDECETIAApAxghFCAAKQMgIRUgACkDKCEWIAApAzAhFyAAKQM4IRggACkDQCEZIAApA0ghGiAAKQNQIRsgACkDWCEcIAApA2AhHSAAKQNoIR4gACkDcCEfIAApA3ghICANIAApA8ABhSENIA8gACkD0AGFIQ8gASAFIBF8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSASfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgE3x8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBR8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAVfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgFnx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBd8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAYfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgGXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBp8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAbfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgHHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIB18fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAefHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgH3x8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFICB8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAffHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgG3x8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBV8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAZfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgGnx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHICB8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAefHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggF3x8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBJ8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAdfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgEXx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBN8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAcfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggGHx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBZ8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAUfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgHHx8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBl8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAdfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgEXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBZ8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByATfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggIHx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIB58fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAbfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgH3x8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBR8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAXfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggGHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBJ8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAafHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFXx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBh8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAafHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgFHx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBJ8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAefHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHXx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBx8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAffHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgE3x8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBd8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAWfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgG3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBV8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCARfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgIHx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBl8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAafHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEXx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBZ8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAYfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgE3x8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBV8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAbfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggIHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIB98fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiASfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgHHx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIB18fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAXfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggGXx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBR8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAefHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgE3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIB18fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAXfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgG3x8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBF8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAcfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggGXx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBR8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAVfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHnx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBh8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAWfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggIHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIB98fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSASfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgGnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIB18fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSAWfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgEnx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGICB8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAffHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgHnx8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBV8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAbfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgEXx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBh8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAXfHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgFHx8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBp8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCATfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgGXx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBx8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSAefHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgHHx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBh8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAffHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgHXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBJ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAUfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGnx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBZ8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiARfHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgIHx8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBV8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAZfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggF3x8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIBN8fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAbfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgF3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFICB8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAffHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGnx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBx8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAUfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggEXx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBl8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiAdfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgE3x8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIB58fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByAYfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggEnx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBV8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAbfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFnx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgASAFIBt8fCEBIA0gAYVCIIohDSAJIA18IQkgBSAJhUIYiiEFIAEgBSATfHwhASANIAGFQhCKIQ0gCSANfCEJIAUgCYVCP4ohBSACIAYgGXx8IQIgDiAChUIgiiEOIAogDnwhCiAGIAqFQhiKIQYgAiAGIBV8fCECIA4gAoVCEIohDiAKIA58IQogBiAKhUI/iiEGIAMgByAYfHwhAyAPIAOFQiCKIQ8gCyAPfCELIAcgC4VCGIohByADIAcgF3x8IQMgDyADhUIQiiEPIAsgD3whCyAHIAuFQj+KIQcgBCAIIBJ8fCEEIBAgBIVCIIohECAMIBB8IQwgCCAMhUIYiiEIIAQgCCAWfHwhBCAQIASFQhCKIRAgDCAQfCEMIAggDIVCP4ohCCABIAYgIHx8IQEgECABhUIgiiEQIAsgEHwhCyAGIAuFQhiKIQYgASAGIBx8fCEBIBAgAYVCEIohECALIBB8IQsgBiALhUI/iiEGIAIgByAafHwhAiANIAKFQiCKIQ0gDCANfCEMIAcgDIVCGIohByACIAcgH3x8IQIgDSAChUIQiiENIAwgDXwhDCAHIAyFQj+KIQcgAyAIIBR8fCEDIA4gA4VCIIohDiAJIA58IQkgCCAJhUIYiiEIIAMgCCAdfHwhAyAOIAOFQhCKIQ4gCSAOfCEJIAggCYVCP4ohCCAEIAUgHnx8IQQgDyAEhUIgiiEPIAogD3whCiAFIAqFQhiKIQUgBCAFIBF8fCEEIA8gBIVCEIohDyAKIA98IQogBSAKhUI/iiEFIAEgBSARfHwhASANIAGFQiCKIQ0gCSANfCEJIAUgCYVCGIohBSABIAUgEnx8IQEgDSABhUIQiiENIAkgDXwhCSAFIAmFQj+KIQUgAiAGIBN8fCECIA4gAoVCIIohDiAKIA58IQogBiAKhUIYiiEGIAIgBiAUfHwhAiAOIAKFQhCKIQ4gCiAOfCEKIAYgCoVCP4ohBiADIAcgFXx8IQMgDyADhUIgiiEPIAsgD3whCyAHIAuFQhiKIQcgAyAHIBZ8fCEDIA8gA4VCEIohDyALIA98IQsgByALhUI/iiEHIAQgCCAXfHwhBCAQIASFQiCKIRAgDCAQfCEMIAggDIVCGIohCCAEIAggGHx8IQQgECAEhUIQiiEQIAwgEHwhDCAIIAyFQj+KIQggASAGIBl8fCEBIBAgAYVCIIohECALIBB8IQsgBiALhUIYiiEGIAEgBiAafHwhASAQIAGFQhCKIRAgCyAQfCELIAYgC4VCP4ohBiACIAcgG3x8IQIgDSAChUIgiiENIAwgDXwhDCAHIAyFQhiKIQcgAiAHIBx8fCECIA0gAoVCEIohDSAMIA18IQwgByAMhUI/iiEHIAMgCCAdfHwhAyAOIAOFQiCKIQ4gCSAOfCEJIAggCYVCGIohCCADIAggHnx8IQMgDiADhUIQiiEOIAkgDnwhCSAIIAmFQj+KIQggBCAFIB98fCEEIA8gBIVCIIohDyAKIA98IQogBSAKhUIYiiEFIAQgBSAgfHwhBCAPIASFQhCKIQ8gCiAPfCEKIAUgCoVCP4ohBSABIAUgH3x8IQEgDSABhUIgiiENIAkgDXwhCSAFIAmFQhiKIQUgASAFIBt8fCEBIA0gAYVCEIohDSAJIA18IQkgBSAJhUI/iiEFIAIgBiAVfHwhAiAOIAKFQiCKIQ4gCiAOfCEKIAYgCoVCGIohBiACIAYgGXx8IQIgDiAChUIQiiEOIAogDnwhCiAGIAqFQj+KIQYgAyAHIBp8fCEDIA8gA4VCIIohDyALIA98IQsgByALhUIYiiEHIAMgByAgfHwhAyAPIAOFQhCKIQ8gCyAPfCELIAcgC4VCP4ohByAEIAggHnx8IQQgECAEhUIgiiEQIAwgEHwhDCAIIAyFQhiKIQggBCAIIBd8fCEEIBAgBIVCEIohECAMIBB8IQwgCCAMhUI/iiEIIAEgBiASfHwhASAQIAGFQiCKIRAgCyAQfCELIAYgC4VCGIohBiABIAYgHXx8IQEgECABhUIQiiEQIAsgEHwhCyAGIAuFQj+KIQYgAiAHIBF8fCECIA0gAoVCIIohDSAMIA18IQwgByAMhUIYiiEHIAIgByATfHwhAiANIAKFQhCKIQ0gDCANfCEMIAcgDIVCP4ohByADIAggHHx8IQMgDiADhUIgiiEOIAkgDnwhCSAIIAmFQhiKIQggAyAIIBh8fCEDIA4gA4VCEIohDiAJIA58IQkgCCAJhUI/iiEIIAQgBSAWfHwhBCAPIASFQiCKIQ8gCiAPfCEKIAUgCoVCGIohBSAEIAUgFHx8IQQgDyAEhUIQiiEPIAogD3whCiAFIAqFQj+KIQUgISAhKQMAIAEgCYWFNwMAICIgIikDACACIAqFhTcDACAjICMpAwAgAyALhYU3AwAgJCAkKQMAIAQgDIWFNwMAICUgJSkDACAFIA2FhTcDACAmICYpAwAgBiAOhYU3AwAgJyAnKQMAIAcgD4WFNwMAICggKCkDACAIIBCFhTcDAAs=","function"==typeof atob?new Uint8Array(atob(e).split("").map(i)):r(8834).Buffer.from(e,"base64")),a=null,u={buffer:s,memory:null,exports:null,realloc:function(t){u.exports.memory.grow(Math.max(0,Math.ceil(Math.abs(t-u.memory.length)/65536))),u.memory=new Uint8Array(u.exports.memory.buffer)},onload:c};return c((function(){})),u;function c(e){if(u.exports)return e();if(a)a.then(e.bind(null,null)).catch(e);else{try{if(t&&t.async)throw new Error("async");f({instance:new WebAssembly.Instance(new WebAssembly.Module(s),o)})}catch(t){a=WebAssembly.instantiate(s,o).then(f)}c(e)}}function f(t){u.exports=t.instance.exports,u.memory=u.exports.memory&&u.exports.memory.buffer&&new Uint8Array(u.exports.memory.buffer)}}function i(t){return t.charCodeAt(0)}t.exports=n,n.supported=!1},1332:(t,e,r)=>{var n=r(8546),i=r(7438)(),o=64,s=[];t.exports=p;var a=t.exports.BYTES_MIN=16,u=t.exports.BYTES_MAX=64,c=(t.exports.BYTES=32,t.exports.KEYBYTES_MIN=16),f=t.exports.KEYBYTES_MAX=64,h=(t.exports.KEYBYTES=32,t.exports.SALTBYTES=16),l=t.exports.PERSONALBYTES=16;function p(t,e,r,d,g){if(!(this instanceof p))return new p(t,e,r,d,g);if(!i||!i.exports)throw new Error("WASM not loaded. Wait for Blake2b.ready(cb)");t||(t=32),!0!==g&&(n(t>=a,"digestLength must be at least "+a+", was given "+t),n(t<=u,"digestLength must be at most "+u+", was given "+t),null!=e&&(n(e instanceof Uint8Array,"key must be Uint8Array or Buffer"),n(e.length>=c,"key must be at least "+c+", was given "+e.length),n(e.length<=f,"key must be at least "+f+", was given "+e.length)),null!=r&&(n(r instanceof Uint8Array,"salt must be Uint8Array or Buffer"),n(r.length===h,"salt must be exactly "+h+", was given "+r.length)),null!=d&&(n(d instanceof Uint8Array,"personal must be Uint8Array or Buffer"),n(d.length===l,"personal must be exactly "+l+", was given "+d.length))),s.length||(s.push(o),o+=216),this.digestLength=t,this.finalized=!1,this.pointer=s.pop(),i.memory.fill(0,0,64),i.memory[0]=this.digestLength,i.memory[1]=e?e.length:0,i.memory[2]=1,i.memory[3]=1,r&&i.memory.set(r,32),d&&i.memory.set(d,48),this.pointer+216>i.memory.length&&i.realloc(this.pointer+216),i.exports.blake2b_init(this.pointer,this.digestLength),e&&(this.update(e),i.memory.fill(0,o,o+e.length),i.memory[this.pointer+200]=128)}function d(){}p.prototype.update=function(t){return n(!1===this.finalized,"Hash instance finalized"),n(t instanceof Uint8Array,"input must be Uint8Array or Buffer"),o+t.length>i.memory.length&&i.realloc(o+t.length),i.memory.set(t,o),i.exports.blake2b_update(this.pointer,o,o+t.length),this},p.prototype.digest=function(t){if(n(!1===this.finalized,"Hash instance finalized"),this.finalized=!0,s.push(this.pointer),i.exports.blake2b_final(this.pointer),!t||"binary"===t)return i.memory.slice(this.pointer+128,this.pointer+128+this.digestLength);if("hex"===t)return function(t,e,r){for(var n="",i=0;i<r;i++)n+=(o=t[e+i])<16?"0"+o.toString(16):o.toString(16);var o;return n}(i.memory,this.pointer+128,this.digestLength);n(t instanceof Uint8Array&&t.length>=this.digestLength,"input must be Uint8Array or Buffer");for(var e=0;e<this.digestLength;e++)t[e]=i.memory[this.pointer+128+e];return t},p.prototype.final=p.prototype.digest,p.WASM=i&&i.buffer,p.SUPPORTED="undefined"!=typeof WebAssembly,p.ready=function(t){return t||(t=d),i?new Promise((function(e,r){i.onload((function(n){n?r():e(),t(n)}))})):t(new Error("WebAssembly not supported"))},p.prototype.ready=p.ready},1213:(t,e,r)=>{var n=r(1047),i=r(1332);function o(t,e,r){var n=t[e]+t[r],i=t[e+1]+t[r+1];n>=4294967296&&i++,t[e]=n,t[e+1]=i}function s(t,e,r,n){var i=t[e]+r;r<0&&(i+=4294967296);var o=t[e+1]+n;i>=4294967296&&o++,t[e]=i,t[e+1]=o}function a(t,e){return t[e]^t[e+1]<<8^t[e+2]<<16^t[e+3]<<24}function u(t,e,r,n,i,a){var u=l[i],c=l[i+1],f=l[a],p=l[a+1];o(h,t,e),s(h,t,u,c);var d=h[n]^h[t],g=h[n+1]^h[t+1];h[n]=g,h[n+1]=d,o(h,r,n),d=h[e]^h[r],g=h[e+1]^h[r+1],h[e]=d>>>24^g<<8,h[e+1]=g>>>24^d<<8,o(h,t,e),s(h,t,f,p),d=h[n]^h[t],g=h[n+1]^h[t+1],h[n]=d>>>16^g<<16,h[n+1]=g>>>16^d<<16,o(h,r,n),d=h[e]^h[r],g=h[e+1]^h[r+1],h[e]=g>>>31^d<<1,h[e+1]=d>>>31^g<<1}var c=new Uint32Array([4089235720,1779033703,2227873595,3144134277,4271175723,1013904242,1595750129,2773480762,2917565137,1359893119,725511199,2600822924,4215389547,528734635,327033209,1541459225]),f=new Uint8Array([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3].map((function(t){return 2*t}))),h=new Uint32Array(32),l=new Uint32Array(32);function p(t,e){var r=0;for(r=0;r<16;r++)h[r]=t.h[r],h[r+16]=c[r];for(h[24]=h[24]^t.t,h[25]=h[25]^t.t/4294967296,e&&(h[28]=~h[28],h[29]=~h[29]),r=0;r<32;r++)l[r]=a(t.b,4*r);for(r=0;r<12;r++)u(0,8,16,24,f[16*r+0],f[16*r+1]),u(2,10,18,26,f[16*r+2],f[16*r+3]),u(4,12,20,28,f[16*r+4],f[16*r+5]),u(6,14,22,30,f[16*r+6],f[16*r+7]),u(0,10,20,30,f[16*r+8],f[16*r+9]),u(2,12,22,24,f[16*r+10],f[16*r+11]),u(4,14,16,26,f[16*r+12],f[16*r+13]),u(6,8,18,28,f[16*r+14],f[16*r+15]);for(r=0;r<16;r++)t.h[r]=t.h[r]^h[r]^h[r+16]}var d=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function g(t,e,r,n){d.fill(0),this.b=new Uint8Array(128),this.h=new Uint32Array(16),this.t=0,this.c=0,this.outlen=t,d[0]=t,e&&(d[1]=e.length),d[2]=1,d[3]=1,r&&d.set(r,32),n&&d.set(n,48);for(var i=0;i<16;i++)this.h[i]=c[i]^a(d,4*i);e&&(y(this,e),this.c=128)}function y(t,e){for(var r=0;r<e.length;r++)128===t.c&&(t.t+=t.c,p(t,!1),t.c=0),t.b[t.c++]=e[r]}g.prototype.update=function(t){return n(t instanceof Uint8Array,"input must be Uint8Array or Buffer"),y(this,t),this},g.prototype.digest=function(t){var e=t&&"binary"!==t&&"hex"!==t?t:new Uint8Array(this.outlen);return n(e instanceof Uint8Array,'out must be "binary", "hex", Uint8Array, or Buffer'),n(e.length>=this.outlen,"out must have at least outlen bytes of space"),function(t,e){for(t.t+=t.c;t.c<128;)t.b[t.c++]=0;p(t,!0);for(var r=0;r<t.outlen;r++)e[r]=t.h[r>>2]>>8*(3&r)}(this,e),"hex"===t?function(t){for(var e="",r=0;r<t.length;r++)e+=(n=t[r])<16?"0"+n.toString(16):n.toString(16);var n;return e}(e):e},g.prototype.final=g.prototype.digest,g.ready=function(t){i.ready((function(){t()}))};var b=g;t.exports=function(t,e,r,i,o){return!0!==o&&(n(t>=m,"outlen must be at least "+m+", was given "+t),n(t<=v,"outlen must be at most "+v+", was given "+t),null!=e&&(n(e instanceof Uint8Array,"key must be Uint8Array or Buffer"),n(e.length>=w,"key must be at least "+w+", was given "+e.length),n(e.length<=_,"key must be at most "+_+", was given "+e.length)),null!=r&&(n(r instanceof Uint8Array,"salt must be Uint8Array or Buffer"),n(r.length===A,"salt must be exactly "+A+", was given "+r.length)),null!=i&&(n(i instanceof Uint8Array,"personal must be Uint8Array or Buffer"),n(i.length===E,"personal must be exactly "+E+", was given "+i.length))),new b(t,e,r,i)},t.exports.ready=function(t){i.ready((function(){t()}))},t.exports.WASM_SUPPORTED=i.SUPPORTED,t.exports.WASM_LOADED=!1;var m=t.exports.BYTES_MIN=16,v=t.exports.BYTES_MAX=64,w=(t.exports.BYTES=32,t.exports.KEYBYTES_MIN=16),_=t.exports.KEYBYTES_MAX=64,A=(t.exports.KEYBYTES=32,t.exports.SALTBYTES=16),E=t.exports.PERSONALBYTES=16;i.ready((function(e){e||(t.exports.WASM_LOADED=!0,t.exports=i)}))},1047:t=>{t.exports=function t(r,n){if(!r){var i=new e(n);throw Error.captureStackTrace&&Error.captureStackTrace(i,t),i}};class e extends Error{}e.prototype.name="AssertionError"},619:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifyResponse=e.setRequestQueryString=e.serializeRequestData=e.handleResponseError=e.handleResponseResult=e.toBitgoRequest=void 0;const n=r(1227),i=r(569),o=r(6635),s=r(7938),a=r(139),u=r(883),c=r(6642),f=r(7257),h=n.default("bitgo:api");function l(t){return function(e){if(o.isNumber(e.status)&&e.status>=200&&e.status<300)return t?e.body[t]:e.body;throw p(e)}}function p(t){const e=function(t){var e;let r=t.status.toString();if(null===(e=t.body)||void 0===e?void 0:e.error)r=t.body.error;else if(t.text)try{let e=s(t.text,{allowedTags:[]});e=e.trim(),e=i.lf(e),e=o.replace(e,/\n[ |\t]{1,}\n/g,"\n\n"),e=o.replace(e,/[\n]{3,}/g,"\n\n"),e=e.substring(0,5e3),r=r+"\n"+e}catch(e){h('got error with message "%s" while creating response error string from response: %s',e.message,t.text)}return r}(t),r=t.status,n=t.body,a=o.has(t.header,"x-auth-required")&&"true"===t.header["x-auth-required"],u=void 0!==t.body.needsOTP;return new f.ApiResponseError(e,r,n,a,u)}function d(t){if(t.response)throw p(t.response);throw t}e.toBitgoRequest=function(t){return Object.assign(t,{result:e=>t.then((t=>l(e)(t)),(t=>d(t)))})},e.handleResponseResult=l,e.handleResponseError=d,e.serializeRequestData=function(t){let e=t._data;if("string"!=typeof e){let r=t.get("Content-Type");r&&(r=r.split(";")[0]);let n=a.serialize[r];if(!n&&/[\/+]json\b/.test(r)&&(n=a.serialize["application/json"]),n)return e=n(e),t._data=e,e}},e.setRequestQueryString=function(t){const e=u.parse(t.url);let r;const n=t._query,i=t.qs;n&&n.length>0?(r=n.join("&"),t._query=[]):i&&(r=c.stringify(i),t.qs=null),r&&(e.search?e.search+="&"+r:e.search="?"+r,t.url=u.format(e))},e.verifyResponse=function(t,e,r,n,i){if(!n.isV2Authenticated||!n.authenticationToken)return i;const o=t.verifyResponse({url:n.url,hmac:i.header.hmac,statusCode:i.status,text:i.text,timestamp:i.header.timestamp,token:n.authenticationToken,method:r});if(!o.isValid){const t=i.header.hmac,r=o.expectedHmac,s=o.signatureSubject,a=e?e.substring(0,10):"",u={expectedHmac:r,receivedHmac:t,hmacInput:s,requestToken:n.authenticationToken,bitgoToken:a};throw h("Invalid response HMAC: %O",u),new f.ApiResponseError("invalid response HMAC, possible man-in-the-middle-attack",511,u)}if(3===t.getAuthVersion()&&!o.isInResponseValidityWindow){const t={timestamp:i.header.timestamp,verificationTime:o.verificationTime};throw h("Server response outside response validity time window: %O",t),new f.ApiResponseError("server response outside response validity time window, possible man-in-the-middle-attack",511,t)}return i}},8335:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeLegacyPath=void 0,e.sanitizeLegacyPath=function(t){const e=t.split("/").filter((t=>""!==t)).filter(((t,e)=>0!==e||"m"!==t)).map((t=>{const e="'"===t.slice(-1),r=parseInt(t.slice(0,e?-1:void 0),10);return Number.isNaN(r)?"0":String(r)+(e?"'":"")}));if(0===e.length)throw new Error("empty path");return e.join("/")}},6418:(t,e,r)=>{"use strict";var n=r(4406),i=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.BitGoAPI=void 0;const o=r(6635),s=r(4132),a=r(7637),u=r(4098),c=r(7334),f=r(619),h=r(1227),l=r(139),p=r(883),d=r(5634),g=r(6736),y=r(2330),b=r(8534),m=r(3462),v=r(881),w=r(9173),_=r(8335),A=h.default("bitgo:api");(null==n?void 0:n.browser)||(A("enabling superagent-proxy wrapper"),r(8145)(l));class E{constructor(t={}){if(this._authVersion=2,this._hmacVerification=!0,this._version=v.version,!y.common.validateParams(t,[],["accessToken","userAgent","customRootURI","customBitcoinNetwork","serverXpub","stellarFederationServerUrl"])||t.useProduction&&!o.isBoolean(t.useProduction))throw new Error("invalid argument");let e;if(t.useProduction){if(t.env&&"prod"!==t.env)throw new Error("cannot use useProduction when env="+t.env);e="prod"}else t.customRootURI||t.customBitcoinNetwork||t.customSigningAddress||t.serverXpub||n.env.BITGO_CUSTOM_ROOT_URI||n.env.BITGO_CUSTOM_BITCOIN_NETWORK?(e="branch"===t.env?"branch":"custom",t.customRootURI&&(y.common.Environments[e].uri=t.customRootURI),t.customBitcoinNetwork&&(y.common.Environments[e].network=t.customBitcoinNetwork),t.customSigningAddress&&(y.common.Environments[e].customSigningAddress=t.customSigningAddress),t.serverXpub&&(y.common.Environments[e].serverXpub=t.serverXpub),t.stellarFederationServerUrl&&(y.common.Environments[e].stellarFederationServerUrl=t.stellarFederationServerUrl)):e=t.env||n.env.BITGO_ENV;if(void 0!==t.authVersion&&(this._authVersion=t.authVersion),e in y.AliasEnvironments&&(e=y.AliasEnvironments[e]),"custom"===e&&o.isUndefined(y.common.Environments[e].uri))throw new Error("must use --customrooturi or set the BITGO_CUSTOM_ROOT_URI environment variable when using the custom environment");if(e){if(!y.common.Environments[e])throw new Error("invalid environment "+e+". Supported environments: prod, test, dev, latest");this._baseUrl=y.common.Environments[e].uri}else e="test",E._testnetWarningMessage||(E._testnetWarningMessage=!0,console.log("BitGo SDK env not set - defaulting to test at test.bitgo.com.")),this._baseUrl=y.common.Environments[e].uri;if(this._env=this.env=e,t.etherscanApiToken&&(y.common.Environments[e].etherscanApiToken=t.etherscanApiToken),y.common.setNetwork(y.common.Environments[e].network),this._baseApiUrl=this._baseUrl+"/api/v1",this._baseApiUrlV2=this._baseUrl+"/api/v2",this._token=t.accessToken,this._userAgent=t.userAgent||"BitGoJS/"+this.version(),this._reqId=void 0,this._refreshToken=t.refreshToken,this._clientId=t.clientId,this._clientSecret=t.clientSecret,this._validate=void 0===t.validate||t.validate,!t.hmacVerification&&void 0!==t.hmacVerification){if(y.common.Environments[e].hmacVerificationEnforced)throw new Error(`Cannot disable request HMAC verification in environment ${this.getEnv()}`);A("HMAC verification explicitly disabled by constructor option"),this._hmacVerification=t.hmacVerification}if(!t.proxy&&n.env.BITGO_USE_PROXY&&(t.proxy=n.env.BITGO_USE_PROXY),n.browser&&t.proxy)throw new Error("cannot use https proxy params while in browser");this._proxy=t.proxy;const r=new Error;this.fetchConstants().catch((t=>{t&&(console.error("failed to fetch initial client constants from BitGo"),A(r.stack))}))}getEnv(){return this._env}getAuthVersion(){return this._authVersion}requestPatch(t,e){let r=l[t](e);this._proxy&&(A("proxying request through %s",this._proxy),r=r.proxy(this._proxy));const i=r.then.bind(r);return r.then=(s,a)=>{var u,c;if(this._version&&r.set("BitGo-SDK-Version",this._version),o.isUndefined(this._reqId)||(r.set("Request-ID",this._reqId.toString()),this._reqId.inc(),delete this._reqId),r.set("If-Modified-Since","Mon, 26 Jul 1997 05:00:00 GMT"),!n.browser&&this._userAgent&&r.set("User-Agent",this._userAgent),r.timeout(1e3*n.env.BITGO_TIMEOUT||305e3),r.isV2Authenticated=!0,r.authenticationToken=this._token,this._token&&67!==this._token.length&&0!==this._token.indexOf("v2x")||r.forceV1Auth)return r.isV2Authenticated=!1,r.set("Authorization","Bearer "+this._token),A("sending v1 %s request to %s with token %s",t,e,null===(u=this._token)||void 0===u?void 0:u.substr(0,8)),i(s).catch(a);if(r.set("BitGo-Auth-Version",3===this._authVersion?"3.0":"2.0"),this._token){const n=f.serializeRequestData(r);f.setRequestQueryString(r);const i=this.calculateRequestHeaders({url:r.url,token:this._token,method:t,text:n||""});r.set("Auth-Timestamp",i.timestamp.toString()),r.set("Authorization","Bearer "+i.tokenHash),A("sending v2 %s request to %s with token %s",t,e,null===(c=this._token)||void 0===c?void 0:c.substr(0,8)),r.set("HMAC",i.hmac)}return i(s?e=>{if(!this._hmacVerification&&!y.common.Environments[this.getEnv()].hmacVerificationEnforced)return s(e);const n=f.verifyResponse(this,this._token,t,r,e);return s(n)}:null).catch(a)},f.toBitgoRequest(r)}get(t){return this.requestPatch("get",t)}post(t){return this.requestPatch("post",t)}put(t){return this.requestPatch("put",t)}del(t){return this.requestPatch("del",t)}patch(t){return this.requestPatch("patch",t)}calculateHMAC(t,e){return d.createHmac("sha256",t).update(e).digest("hex")}calculateHMACSubject({urlPath:t,text:e,timestamp:r,statusCode:n,method:i}){const s=p.parse(t),a=s.query&&s.query.length>0?s.path:s.pathname;return!o.isUndefined(n)&&o.isInteger(n)&&o.isFinite(n)?3===this._authVersion?[i.toUpperCase(),r,a,n,e].join("|"):[r,a,n,e].join("|"):3===this._authVersion?[i.toUpperCase(),r,"3.0",a,e].join("|"):[r,a,e].join("|")}calculateRequestHMAC({url:t,text:e,timestamp:r,token:n,method:i}){const o=this.calculateHMACSubject({urlPath:t,text:e,timestamp:r,method:i});return this.calculateHMAC(n,o)}calculateRequestHeaders({url:t,text:e,token:r,method:n}){const i=Date.now(),o=this.calculateRequestHMAC({url:t,text:e,timestamp:i,token:r,method:n}),s=m.hash.sha256.hash(r);return{hmac:o,timestamp:i,tokenHash:m.codec.hex.fromBits(s)}}verifyResponse({url:t,statusCode:e,text:r,timestamp:n,token:i,hmac:o,method:s}){const a=this.calculateHMACSubject({urlPath:t,text:r,timestamp:n,statusCode:e,method:s}),u=this.calculateHMAC(i,a),c=Date.now();return{isValid:u===o,expectedHmac:u,signatureSubject:a,isInResponseValidityWindow:n>=c-3e5&&n<=c,verificationTime:c}}async fetchConstants(){var t,e;const r=this.getEnv();if(E._constants||(E._constants={}),E._constantsExpire||(E._constantsExpire={}),E._constants[r]&&E._constantsExpire[r]&&new Date<E._constantsExpire[r])return E._constants[r];const n=l.get(this.url("/client/constants"));n.set("BitGo-SDK-Version",this._version);const i=await(this._proxy?n.proxy(this._proxy):n);return E._constants[r]=i.body.constants,(null===(t=i.body)||void 0===t?void 0:t.ttl)&&"number"==typeof(null===(e=i.body)||void 0===e?void 0:e.ttl)&&(E._constantsExpire[r]=new Date((new Date).getTime()+1e3*i.body.ttl)),E._constants[r]}url(t,e=1){return(2===e?this._baseApiUrlV2:this._baseApiUrl)+t}microservicesUrl(t){return this._baseUrl+t}version(){return this._version}ping({reqId:t}={}){return t&&(this._reqId=t),this.get(this.url("/ping")).result()}setRequestTracer(t){t&&(this._reqId=t)}encrypt(t){if(y.common.validateParams(t,["input","password"],[]),!t.password)throw new Error("cannot encrypt without password");return w.encrypt(t.password,t.input)}decrypt(t){if(t=t||{},y.common.validateParams(t,["input","password"],[]),!t.password)throw new Error("cannot decrypt without password");try{return w.decrypt(t.password,t.input)}catch(t){throw t.message.includes("ccm: tag doesn't match")&&(t.message="password error - "+t.message),t}}toJSON(){return{user:this._user,token:this._token,extensionKey:this._extensionKey?this._extensionKey.toWIF():void 0,ecdhXprv:this._ecdhXprv}}user(){return this._user}fromJSON(t){if(this._user=t.user,this._token=t.token,this._ecdhXprv=t.ecdhXprv,t.extensionKey){const e=y.common.Environments[this.getEnv()].network;this._extensionKey=g.ECPair.fromWIF(t.extensionKey,g.networks[e])}}preprocessAuthenticationParams({username:t,password:e,otp:r,forceSMS:n,extensible:i,trust:s}){if(!o.isString(t))throw new Error("expected string username");if(!o.isString(e))throw new Error("expected string password");const a=t.toLowerCase(),u={email:a,password:this.calculateHMAC(a,e),forceSMS:!!n};return r&&(u.otp=r,s&&(u.trust=1)),i&&(this._extensionKey=b.makeRandomKey(),u.extensible=!0,u.extensionAddress=b.getAddressP2PKH(this._extensionKey)),u}authenticateWithAccessToken({accessToken:t}){A("now authenticating with access token %s",t.substring(0,8)),this._token=t}async authenticate(t){try{if(!o.isObject(t))throw new Error("required object params");if(!o.isString(t.password))throw new Error("expected string password");const e=!!t.forceV1Auth,r=this.preprocessAuthenticationParams(t),n=t.password;if(this._token)return new Error("already logged in");const i=this.microservicesUrl("/api/auth/v1/session"),s=this.post(i);e&&(s.forceV1Auth=!0,r.forceV1Auth=!0,A("forcing v1 auth for call to authenticate"));const a=await s.send(r),u=a.body;if(this._user=u.user,u.access_token)this._token=u.access_token;else{if(!u.encryptedECDHXprv)throw new Error("Keychain needs encryptedXprv property");const t=this.handleTokenIssuance(a.body,n);this._token=t.token,this._ecdhXprv=t.ecdhXprv,f.verifyResponse(this,t.token,"post",s,a),a.body.access_token=this._token}return f.handleResponseResult()(a)}catch(t){f.handleResponseError(t)}}handleTokenIssuance(t,e){y.common.validateParams(t,["derivationPath"],["encryptedECDHXprv"]);const r=this._env,n=y.common.Environments[r].serverXpub;let o=this._ecdhXprv;if(!o){if(!e||!t.encryptedECDHXprv)throw new Error("ecdhXprv property must be set or password and encrypted encryptedECDHXprv must be provided");try{o=this.decrypt({input:t.encryptedECDHXprv,password:e})}catch(t){throw t.errorCode="ecdh_xprv_decryption_failure",console.error("Failed to decrypt encryptedECDHXprv."),t}}const u=s.fromBase58(o),c=s.fromBase58(n),f=_.sanitizeLegacyPath(t.derivationPath),h=u.derivePath(f),l=c.derivePath(f).publicKey,p=h.privateKey;if(!p)throw new Error("no client private Key");const d=i.from(a.publicKeyTweakMul(l,p)).toString("hex");let g;try{g={token:this.decrypt({input:t.encryptedToken,password:d})}}catch(t){throw t.errorCode="token_decryption_failure",console.error("Failed to decrypt token."),t}return this._ecdhXprv||(g.ecdhXprv=o),g}verifyPassword(t={}){if(!o.isString(t.password))throw new Error("missing required string password");if(!this._user||!this._user.username)throw new Error("no current user");const e=this.calculateHMAC(this._user.username,t.password);return this.post(this.url("/user/verifypassword")).send({password:e}).result("valid")}clear(){this._user=void 0,this._token=void 0,this._refreshToken=void 0,this._ecdhXprv=void 0}async refreshToken(t={}){y.common.validateParams(t,[],["refreshToken"]);const e=t.refreshToken||this._refreshToken;if(!e)throw new Error("Must provide refresh token or have authenticated with Oauth before");if(!this._clientId||!this._clientSecret)throw new Error("Need client id and secret set first to use this");const r=await this.post(this._baseUrl+"/oauth/token").send({grant_type:"refresh_token",refresh_token:e,client_id:this._clientId,client_secret:this._clientSecret}).result();return this._token=r.access_token,this._refreshToken=r.refresh_token,r}async listAccessTokens(){return this.get(this.url("/user/accesstoken")).send().result("accessTokens")}async addAccessToken(t){var e;try{if(!o.isString(t.label))throw new Error("required string label");if(t.duration&&(!o.isNumber(t.duration)||t.duration<0))throw new Error("duration must be a non-negative number");if(t.ipRestrict){if(!o.isArray(t.ipRestrict))throw new Error("ipRestrict must be an array");o.forEach(t.ipRestrict,(t=>{if(!o.isString(t))throw new Error("ipRestrict must be an array of IP address strings")}))}if(t.txValueLimit){if(!o.isNumber(t.txValueLimit))throw new Error("txValueLimit must be a number");if(t.txValueLimit<0)throw new Error("txValueLimit must be a non-negative number")}if(!(t.scope&&t.scope.length>0))throw new Error("must specify scope for token");if(!o.isArray(t.scope))throw new Error("scope must be an array");const r=this.microservicesUrl("/api/auth/v1/accesstoken"),n=this.post(r);this._ecdhXprv||(n.forceV1Auth=!0,A("forcing v1 auth for adding access token using token %s",null===(e=this._token)||void 0===e?void 0:e.substr(0,8)));const i=await n.send(t);if(n.forceV1Auth)return i.body.warning="A protocol downgrade has occurred because this is a legacy account.",f.handleResponseResult()(i);f.verifyResponse(this,this._token,"post",n,i);const s=this.handleTokenIssuance(i.body);return i.body.token=s.token,f.handleResponseResult()(i)}catch(t){f.handleResponseError(t)}}async removeAccessToken({id:t,label:e}){if(!t&&!e||t&&e)throw new Error("must provide exactly one of id or label");if(t)return this.del(this.url(`/user/accesstoken/${t}`)).send().result();const r=await this.listAccessTokens();if(!r)throw new Error("token with this label does not exist");const n=o.filter(r,{label:e});if(n.length>1)throw new Error("ambiguous call: multiple tokens matching this label");if(0===n.length)throw new Error("token with this label does not exist");return this.del(this.url(`/user/accesstoken/${n[0].id}`)).send().result()}generateRandomPassword(t=5){const e=m.codec.bytes.fromBits(m.random.randomWords(t));return u.encode(e)}async logout(){const t=await this.get(this.url("/user/logout")).result();return this.clear(),t}async getUser({id:t}){if(!o.isString(t))throw new Error("expected string id");return this.get(this.url(`/user/${t}`)).result("user")}async me(){return this.getUser({id:"me"})}async unlock({otp:t,duration:e}){if(t&&!o.isString(t))throw new Error("expected string or undefined otp");return this.post(this.url("/user/unlock")).send({otp:t,duration:e}).result()}async lock(){return this.post(this.url("/user/lock")).result()}async session(){return this.get(this.url("/user/session")).result("session")}async sendOTP(t={}){return this.post(this.url("/user/sendotp")).send(t).result()}async extendToken(t={}){if(!this._extensionKey)throw new Error("missing required property _extensionKey");const e=Date.now(),r=t.duration,n=e+"|"+this._token+"|"+r,i=this._extensionKey.privateKey;if(!i)throw new Error("no privateKey on extensionKey");const o=this._extensionKey.compressed,s=g.networks.bitcoin.messagePrefix,a=c.sign(n,i,o,s).toString("hex");return this.post(this.url("/user/extendtoken")).send(t).set("timestamp",e.toString()).set("signature",a).result()}async getSharingKey({email:t}){if(!o.isString(t))throw new Error("required string email");return this.post(this.url("/user/sharingkey")).send({email:t}).result()}getValidate(){return this._validate}setValidate(t){if(!o.isBoolean(t))throw new Error("invalid argument");this._validate=t}}e.BitGoAPI=E,E._testnetWarningMessage=!1},9173:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.decrypt=e.encrypt=e.bytesToWord=void 0;const n=r(3462),i=r(5634);function o(t){if(!(t instanceof Uint8Array)||4!==t.length)throw new Error("bytes must be a Uint8Array with length 4");return t.reduce(((t,e)=>256*t+e),0)}e.bytesToWord=o,e.encrypt=function(t,e,{salt:r=i.randomBytes(8),iv:s=i.randomBytes(16)}={}){if(8!==r.length)throw new Error("salt must be 8 bytes");if(16!==s.length)throw new Error("iv must be 16 bytes");const a={iter:1e4,ks:256,salt:[o(r.slice(0,4)),o(r.slice(4))],iv:[o(s.slice(0,4)),o(s.slice(4,8)),o(s.slice(8,12)),o(s.slice(12,16))]};return n.encrypt(t,e,a)},e.decrypt=function(t,e){return n.decrypt(t,e)}},5326:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(619),e),i(r(8335),e),i(r(6418),e),i(r(9173),e),i(r(8534),e),i(r(7257),e)},7257:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApiResponseError=e.supportedRequestMethods=void 0;const n=r(2330);e.supportedRequestMethods=["get","post","put","del","patch"];class i extends n.BitGoJsError{constructor(t,e,r,n,i){super(t),this.message=t,this.status=e,this.result=r,this.invalidToken=n,this.needsOTP=i}}e.ApiResponseError=i},8534:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getAddressP2PKH=e.makeRandomKey=e.getNetwork=void 0;const n=r(6736),i=r(2330);function o(t){return t=t||i.common.getNetwork(),n.networks[t]}e.getNetwork=o,e.makeRandomKey=function(){return n.ECPair.makeRandom({network:o()})},e.getAddressP2PKH=function(t){let e;e="getPublicKeyBuffer"in t?t.getPublicKeyBuffer():t.publicKey;const{address:r}=n.payments.p2pkh({pubkey:e,network:t.network});if(!r)throw new Error("could not compute address");return r}},4098:t=>{for(var e="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz",r={},n=0;n<e.length;n++)r[e.charAt(n)]=n;t.exports={encode:function(t){if(0===t.length)return"";var r,n=[0];for(s=0;s<t.length;s++){for(r=0;r<n.length;r++)n[r]<<=8;n[0]+=t[s];var i=0;for(r=0;r<n.length;++r)n[r]+=i,i=n[r]/58|0,n[r]%=58;for(;i;)n.push(i%58),i=i/58|0}for(s=0;0===t[s]&&s<t.length-1;s++)n.push(0);for(var o="",s=n.length-1;s>=0;s--)o+=e[n[s]];return o},decode:function(t){if(0===t.length)return[];var e,n,i=[0];for(e=0;e<t.length;e++){var o=t[e];if(!(o in r))throw new Error("Non-base58 character");for(n=0;n<i.length;n++)i[n]*=58;i[0]+=r[o];var s=0;for(n=0;n<i.length;++n)i[n]+=s,s=i[n]>>8,i[n]&=255;for(;s;)i.push(255&s),s>>=8}for(e=0;"1"===t[e]&&e<t.length-1;e++)i.push(0);return i.reverse()}}},1227:(t,e,r)=>{var n=r(4406);function i(){var t;try{t=e.storage.debug}catch(t){}return!t&&void 0!==n&&"env"in n&&(t=n.env.DEBUG),t}(e=t.exports=r(1658)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),r){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var i=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(i++,"%c"===t&&(o=i))})),t.splice(o,0,n)}},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch(t){}},e.load=i,e.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},e.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(t){}}(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}},e.enable(i())},1658:(t,e,r)=>{function n(t){var r;function n(){if(n.enabled){var t=n,i=+new Date,o=i-(r||i);t.diff=o,t.prev=r,t.curr=i,r=i;for(var s=new Array(arguments.length),a=0;a<s.length;a++)s[a]=arguments[a];s[0]=e.coerce(s[0]),"string"!=typeof s[0]&&s.unshift("%O");var u=0;s[0]=s[0].replace(/%([a-zA-Z%])/g,(function(r,n){if("%%"===r)return r;u++;var i=e.formatters[n];if("function"==typeof i){var o=s[u];r=i.call(t,o),s.splice(u,1),u--}return r})),e.formatArgs.call(t,s);var c=n.log||e.log||console.log.bind(console);c.apply(t,s)}}return n.namespace=t,n.enabled=e.enabled(t),n.useColors=e.useColors(),n.color=function(t){var r,n=0;for(r in t)n=(n<<5)-n+t.charCodeAt(r),n|=0;return e.colors[Math.abs(n)%e.colors.length]}(t),n.destroy=i,"function"==typeof e.init&&e.init(n),e.instances.push(n),n}function i(){var t=e.instances.indexOf(this);return-1!==t&&(e.instances.splice(t,1),!0)}(e=t.exports=n.debug=n.default=n).coerce=function(t){return t instanceof Error?t.stack||t.message:t},e.disable=function(){e.enable("")},e.enable=function(t){var r;e.save(t),e.names=[],e.skips=[];var n=("string"==typeof t?t:"").split(/[\s,]+/),i=n.length;for(r=0;r<i;r++)n[r]&&("-"===(t=n[r].replace(/\*/g,".*?"))[0]?e.skips.push(new RegExp("^"+t.substr(1)+"$")):e.names.push(new RegExp("^"+t+"$")));for(r=0;r<e.instances.length;r++){var o=e.instances[r];o.enabled=e.enabled(o.namespace)}},e.enabled=function(t){if("*"===t[t.length-1])return!0;var r,n;for(r=0,n=e.skips.length;r<n;r++)if(e.skips[r].test(t))return!1;for(r=0,n=e.names.length;r<n;r++)if(e.names[r].test(t))return!0;return!1},e.humanize=r(7824),e.instances=[],e.names=[],e.skips=[],e.formatters={}},7824:t=>{var e=1e3,r=60*e,n=60*r,i=24*n;function o(t,e,r){if(!(t<e))return t<1.5*e?Math.floor(t/e)+" "+r:Math.ceil(t/e)+" "+r+"s"}t.exports=function(t,s){s=s||{};var a,u=typeof t;if("string"===u&&t.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(o){var s=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*s;case"days":case"day":case"d":return s*i;case"hours":case"hour":case"hrs":case"hr":case"h":return s*n;case"minutes":case"minute":case"mins":case"min":case"m":return s*r;case"seconds":case"second":case"secs":case"sec":case"s":return s*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}(t);if("number"===u&&!1===isNaN(t))return s.long?o(a=t,i,"day")||o(a,n,"hour")||o(a,r,"minute")||o(a,e,"second")||a+" ms":function(t){return t>=i?Math.round(t/i)+"d":t>=n?Math.round(t/n)+"h":t>=r?Math.round(t/r)+"m":t>=e?Math.round(t/e)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},5881:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTransaction=void 0;const n=r(5833);e.BaseTransaction=class{constructor(t){this._coinConfig=t,this._inputs=[],this._outputs=[],this._signatures=[],this._id=void 0,this._type=void 0}get id(){return this._id}get type(){return this._type}get outputs(){return this._outputs}get inputs(){return this._inputs}get signature(){return this._signatures}get signablePayload(){throw new n.NotImplementedError("signablePayload not implemented")}explainTransaction(){}}},6904:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTransactionBuilder=void 0;const n=r(5833);e.BaseTransactionBuilder=class{constructor(t){this._coinConfig=t}from(t){this.validateRawTransaction(t),this.transaction=this.fromImplementation(t)}sign(t){if(this.validateKey(t),!this.transaction.canSign(t))throw new n.SigningError("Private key cannot sign the transaction");this.transaction=this.signImplementation(t)}addSignature(t,e){throw new n.SigningError(`${this.coinName()} does not support adding signatures directly.`)}async build(){return this.validateTransaction(this.transaction),this.buildImplementation()}displayName(){return this._coinConfig.fullName}coinName(){return this._coinConfig.name}getValidityWindow(t){if(!t.unit||"timestamp"!==t.unit&&"blockheight"!==t.unit)throw new Error("Unit parameter must be specified as blockheight or timestamp");const e=t.unit;let r,n,i,o;"timestamp"===e?(r=0,n=31536e6,i=Date.now(),o=i+n):(r=0,n=1e6,i=0,o=i+n);let s=t.firstValid||i,a=t.lastValid||o,u=t.minDuration||r,c=t.maxDuration||n;if(u>=c)throw new Error(`Expected maxDuration (${c}) to be grather than minDuration (${u})`);return s=s>=0?s:i,u=u>=0?u:r,c=c>u?c:n,a=a>=s+u&&a<=s+c?a:s+c,{firstValid:s,lastValid:a,minDuration:u,maxDuration:c,unit:e}}}},5099:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BaseTransactionBuilderFactory=void 0,e.BaseTransactionBuilderFactory=class{constructor(t){this._coinConfig=t}}},859:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e},s=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.BlsKeyPair=void 0;const a=s(r(1696)),u=o(r(5982)),c=r(5833),f=r(52),h=r(302);e.BlsKeyPair=class{constructor(t){if(t)if(f.isDkg(t))this.createShares(t.threshold,t.participants);else if(f.isBlsKey(t))a.default(t.secretShares.every(h.isValidBLSPrivateKey),"Invalid private keys"),a.default(h.isValidBLSPublicKey(t.publicShare),"Invalid public key"),this.keyPair=t;else{if(!f.isPrivateKey(t))throw new Error("Invalid key pair options");this.keyPair={prv:t.prv,publicShare:"",secretShares:[]}}else this.createShares(2,3)}createShares(t,e){if(e<t)throw new Error("Participants should be greater than threshold");const r=u.generatePolynomial(t),n=u.secretShares(r,e),i=u.publicShare(r);this.keyPair={secretShares:n.map((t=>h.bigIntToHex(t))),publicShare:h.bigIntToHex(i)}}recordKeysFromPrivateKey(t){throw new c.NotImplementedError("Private key derivation is not supported in bls")}recordKeysFromPublicKey(t){throw new c.NotImplementedError("Public key derivation is not supported in bls")}getAddress(t){throw new c.NotImplementedError("getAddress not implemented")}getKeys(){throw new c.NotImplementedError("getKeys not implemented")}async sign(t){var e;if(null===(e=this.keyPair)||void 0===e?void 0:e.prv){const e=await u.sign(t,BigInt(this.keyPair.prv));return h.bigIntToHex(e)}throw new Error("Missing private key")}static aggregatePrvkeys(t){a.default(t.every(h.isValidBLSPrivateKey),"Invalid private keys");try{const e=t.map((t=>BigInt(t))),r=u.mergeSecretShares(e);return h.bigIntToHex(r)}catch(t){throw new Error("Error aggregating prvkeys: "+t)}}static aggregatePubkeys(t){try{const e=t.map((t=>BigInt(t))),r=u.mergePublicShares(e);return h.bigIntToHex(r)}catch(t){throw new Error("Error aggregating pubkeys: "+t)}}static aggregateSignatures(t){try{const e=u.mergeSignatures(t);return h.bigIntToHex(e)}catch(t){throw new Error("Error aggregating signatures: "+t)}}static async verifySignature(t,e,r){return a.default(h.isValidBLSPublicKey(t),`Invalid public key: ${t}`),await u.verify(BigInt(r),e,BigInt(t))}}},2256:function(t,e,r){"use strict";var n=r(8834).Buffer,i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Ed25519KeyPair=void 0;const a=s(r(717)),u=r(302),c=r(2253),f=r(52);e.Ed25519KeyPair=class{constructor(t){let e;if(t)if(f.isSeed(t))e=a.sign.keyPair.fromSeed(t.seed),this.setKeyPair(e);else if(f.isPrivateKey(t))this.recordKeysFromPrivateKey(t.prv);else{if(!f.isPublicKey(t))throw new Error("Invalid key pair options");this.recordKeysFromPublicKey(t.pub)}else{const t=a.randomBytes(32);e=a.sign.keyPair.fromSeed(t),this.setKeyPair(e)}}getKeyPair(t){return{prv:u.toHex(t.secretKey.slice(0,32)),pub:u.toHex(t.publicKey)}}setKeyPair(t){this.keyPair=this.getKeyPair(t)}recordKeysFromPrivateKey(t){if(u.isValidEd25519Seed(t)){const e=u.toUint8Array(t),r=a.sign.keyPair.fromSeed(e);this.setKeyPair(r)}else if(u.isValidEd25519SecretKey(t)){const e=u.toUint8Array(t),r=a.sign.keyPair.fromSecretKey(e);this.setKeyPair(r)}else this.keyPair=this.recordKeysFromPrivateKeyInProtocolFormat(t)}recordKeysFromPublicKey(t){u.isValidEd25519PublicKey(t)?this.keyPair={pub:t}:this.keyPair=this.recordKeysFromPublicKeyInProtocolFormat(t)}signMessage(t){var e;const r=u.toUint8Array(n.from(t).toString("hex")),i=null===(e=this.keyPair)||void 0===e?void 0:e.prv;if(!i)throw new Error("Missing private key");return a.sign.detached(r,a.sign.keyPair.fromSeed(u.toUint8Array(i)).secretKey)}verifySignature(t,e){var r;let i;if(i="string"==typeof t?u.toUint8Array(n.from(t).toString("hex")):t,!(null===(r=this.keyPair)||void 0===r?void 0:r.pub))return!1;const o=u.toUint8Array(this.keyPair.pub);return a.sign.detached.verify(i,e,o)}deriveHardened(t){var e;if(!(null===(e=this.keyPair)||void 0===e?void 0:e.prv))throw new Error("need private key to derive hardened keypair");const r=c.Ed25519KeyDeriver.derivePath(t,this.keyPair.prv).key,n=a.sign.keyPair.fromSeed(r);return this.getKeyPair(n)}}},290:(t,e)=>{"use strict";var r,n,i;Object.defineProperty(e,"__esModule",{value:!0}),e.StakingOperationTypes=e.AddressFormat=e.TransactionType=void 0,(i=e.TransactionType||(e.TransactionType={}))[i.Send=0]="Send",i[i.SendERC721=1]="SendERC721",i[i.SendERC1155=2]="SendERC1155",i[i.WalletInitialization=3]="WalletInitialization",i[i.AddressInitialization=4]="AddressInitialization",i[i.AssociatedTokenAccountInitialization=5]="AssociatedTokenAccountInitialization",i[i.FlushTokens=6]="FlushTokens",i[i.FlushCoins=7]="FlushCoins",i[i.SingleSigSend=8]="SingleSigSend",i[i.AccountUpdate=9]="AccountUpdate",i[i.StakingLock=10]="StakingLock",i[i.StakingVote=11]="StakingVote",i[i.StakingUnvote=12]="StakingUnvote",i[i.StakingActivate=13]="StakingActivate",i[i.StakingUnlock=14]="StakingUnlock",i[i.StakingWithdraw=15]="StakingWithdraw",i[i.ContractCall=16]="ContractCall",i[i.StakingDeactivate=17]="StakingDeactivate",i[i.Batch=18]="Batch",i[i.StakingClaim=19]="StakingClaim",(n=e.AddressFormat||(e.AddressFormat={})).hex="hex",n.base58="base58",n.substrate="substrate",n.polkadot="polkadot",(r=e.StakingOperationTypes||(e.StakingOperationTypes={}))[r.LOCK=0]="LOCK",r[r.VOTE=1]="VOTE",r[r.UNVOTE=2]="UNVOTE",r[r.ACTIVATE=3]="ACTIVATE",r[r.UNLOCK=4]="UNLOCK",r[r.WITHDRAW=5]="WITHDRAW"},5833:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UnsupportedTokenError=e.InvalidKey=e.NotSupported=e.NotImplementedError=e.InvalidSignatureError=e.InvalidParameterValueError=e.InvalidTransactionError=e.ExtendTransactionError=e.UtilsError=e.BuildTransactionError=e.SigningError=e.ParseTransactionError=e.ExtendableError=void 0;class r extends Error{constructor(t){super(t),this.name=this.constructor.name,"function"==typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error(t).stack}}e.ExtendableError=r,e.ParseTransactionError=class extends r{constructor(t){super(t)}},e.SigningError=class extends r{constructor(t){super(t)}},e.BuildTransactionError=class extends r{constructor(t){super(t)}},e.UtilsError=class extends r{constructor(t){super(t)}},e.ExtendTransactionError=class extends r{constructor(t){super(t)}},e.InvalidTransactionError=class extends r{constructor(t){super(t)}},e.InvalidParameterValueError=class extends r{constructor(t){super(t)}},e.InvalidSignatureError=class extends r{constructor(t){super(t)}},e.NotImplementedError=class extends r{constructor(t){super(t)}},e.NotSupported=class extends r{constructor(t){super(t)}},e.InvalidKey=class extends r{constructor(t){super(t)}},e.UnsupportedTokenError=class extends r{constructor(t){super(t)}}},52:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isBlsKey=e.isDkg=e.isPublicKey=e.isPrivateKey=e.isSeed=void 0,e.isSeed=function(t){return void 0!==t.seed},e.isPrivateKey=function(t){return void 0!==t.prv},e.isPublicKey=function(t){return void 0!==t.pub},e.isDkg=function(t){const e=t;return void 0!==e.threshold&&void 0!==e.participants},e.isBlsKey=function(t){const e=t;return void 0!==e.publicShare&&void 0!==e.secretShares}},2596:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.BlsKeyPair=e.AddressFormat=e.StakingOperationTypes=e.TransactionType=e.Ed25519KeyPair=e.BaseTransactionBuilderFactory=e.BaseTransactionBuilder=e.BaseTransaction=void 0;var o=r(5881);Object.defineProperty(e,"BaseTransaction",{enumerable:!0,get:function(){return o.BaseTransaction}});var s=r(6904);Object.defineProperty(e,"BaseTransactionBuilder",{enumerable:!0,get:function(){return s.BaseTransactionBuilder}});var a=r(5099);Object.defineProperty(e,"BaseTransactionBuilderFactory",{enumerable:!0,get:function(){return a.BaseTransactionBuilderFactory}});var u=r(2256);Object.defineProperty(e,"Ed25519KeyPair",{enumerable:!0,get:function(){return u.Ed25519KeyPair}});var c=r(290);Object.defineProperty(e,"TransactionType",{enumerable:!0,get:function(){return c.TransactionType}}),Object.defineProperty(e,"StakingOperationTypes",{enumerable:!0,get:function(){return c.StakingOperationTypes}}),Object.defineProperty(e,"AddressFormat",{enumerable:!0,get:function(){return c.AddressFormat}});var f=r(859);Object.defineProperty(e,"BlsKeyPair",{enumerable:!0,get:function(){return f.BlsKeyPair}}),i(r(2011),e),i(r(5833),e),i(r(52),e)},2011:function(t,e,r){"use strict";var n=r(8834).Buffer,i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return o(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.Secp256k1ExtendedKeyPair=void 0;const a=s(r(4132)),u=r(6314),c=s(r(302)),f=r(5833);e.Secp256k1ExtendedKeyPair=class{constructor(t){this.source=t}static toKeyPair(t){return t.privateKey?u.ECPair.fromPrivateKey(t.privateKey):u.ECPair.fromPublicKey(t.publicKey)}getPublicKey({compressed:t}){var e;return u.ECPair.fromPublicKey(null===(e=this.keyPair)||void 0===e?void 0:e.publicKey,{compressed:t}).publicKey}getPrivateKey(){var t;return null===(t=this.keyPair)||void 0===t?void 0:t.privateKey}recordKeysFromPrivateKey(t){if(c.isValidXprv(t))this.hdNode=a.fromBase58(t);else{if(!c.isValidPrv(t))throw new Error("Unsupported private key");this.keyPair=u.ECPair.fromPrivateKey(n.from(t,"hex"))}}recordKeysFromPublicKey(t){if(c.isValidXpub(t))this.hdNode=a.fromBase58(t);else{if(!c.isValidPub(t))throw new Error("Unsupported public key: "+t);this.keyPair=u.ECPair.fromPublicKey(n.from(t,"hex"))}}getExtendedKeys(){if(!this.hdNode)throw new Error("Cannot get extended keys");const t={xpub:this.hdNode.neutered().toBase58()};return this.hdNode.isNeutered()||(t.xprv=this.hdNode.toBase58()),t}getAddress(t){throw new f.NotImplementedError("getAddress not implemented")}getKeys(){throw new f.NotImplementedError("getKeys not implemented")}}},9629:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(2596),e),i(r(302),e),i(r(2253),e)},302:function(t,e,r){"use strict";var n=r(8834).Buffer,i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return o(e,t),e},a=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.toUint8Array=e.isBase58=e.bigIntToHex=e.toHex=e.isValidBLSPublicKey=e.isValidBLSPrivateKey=e.isValidEd25519PublicKey=e.isValidEd25519SecretKey=e.isValidEd25519Seed=e.isValidPrv=e.isValidPub=e.isValidXprv=e.isValidXpub=e.rawPrvToExtendedKeys=e.xprvToRawPrv=e.xpubToUncompressedPub=void 0;const u=s(r(4132)),c=r(6314),f=s(r(717)),h=s(r(5459)),l=s(r(4365)),p=a(r(9826)),d=a(r(7022));function g(t){if("xpub"!==t.substr(0,4))return!1;try{u.fromBase58(t,c.networks.bitcoin)}catch(t){return!1}return!0}function y(t){if("xprv"!==t.substr(0,4))return!1;try{u.fromBase58(t,c.networks.bitcoin)}catch(t){return!1}return!0}function b(t){return h.decode(t)}e.xpubToUncompressedPub=function(t){if(!g(t))throw new Error("invalid xpub");return c.ECPair.fromPublicKey(u.fromBase58(t,c.networks.bitcoin).publicKey,{compressed:!1}).publicKey.toString("hex")},e.xprvToRawPrv=function(t){if(!y(t))throw new Error("invalid xprv");const{privateKey:e}=u.fromBase58(t,c.networks.bitcoin);if(!e)throw new Error("invalid xprv");return e.toString("hex")},e.rawPrvToExtendedKeys=function(t){const e=u.fromPrivateKey(n.from(t,"hex"),n.alloc(32));return{xprv:e.toBase58(),xpub:e.neutered().toBase58()}},e.isValidXpub=g,e.isValidXprv=y,e.isValidPub=function(t){try{c.ECPair.fromPublicKey(n.from(t,"hex"))}catch(t){return!1}return!0},e.isValidPrv=function(t){try{c.ECPair.fromPrivateKey(n.from(t,"hex"))}catch(t){return!1}return!0},e.isValidEd25519Seed=function(t){try{return b(t).length===f.sign.seedLength}catch(t){return!1}},e.isValidEd25519SecretKey=function(t){try{return b(t).length===f.sign.secretKeyLength}catch(t){return!1}},e.isValidEd25519PublicKey=function(t){try{return new Uint8Array(n.from(t,"hex")).length===f.sign.publicKeyLength}catch(t){return!1}},e.isValidBLSPrivateKey=function(t){try{return l.Fr.isValid(BigInt(t))}catch(t){return!1}},e.isValidBLSPublicKey=function(t){try{return l.PointG1.fromCompressedHex(p.default(t)).assertValidity(),!0}catch(t){return!1}},e.toHex=function(t){return h.encode(t,!0)},e.bigIntToHex=function(t){const e=t.toString(16);return"0x"+"0".slice(0,e.length%2)+e},e.isBase58=function(t,e){try{return!!t&&d.default.decode(t).length===e}catch(t){return!1}},e.toUint8Array=b},2253:function(t,e,r){"use strict";var n=r(8834).Buffer,i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0}),e.Ed25519KeyDeriver=void 0;const o=i(r(11));class s{static derivePath(t,e){if(!this.isValidPath(t))throw new Error("Invalid derivation path");const{key:r,chainCode:n}=this.getMasterKeyFromSeed(e);return t.split("/").slice(1).map(this.replaceDerive).reduce(((t,e)=>this.CKDPriv(t,e+s.HARDENED_OFFSET)),{key:r,chainCode:n})}static getMasterKeyFromSeed(t){const e=o.default("sha512",s.ED25519_CURVE).update(n.from(t,"hex")).digest();return{key:e.slice(0,32),chainCode:e.slice(32)}}static CKDPriv({key:t,chainCode:e},r){const i=n.allocUnsafe(4);i.writeUInt32BE(r,0);const s=n.concat([n.alloc(1,0),t,i]),a=o.default("sha512",e).update(s).digest();return{key:a.slice(0,32),chainCode:a.slice(32)}}static isValidPath(t){return!!s.PATH_REGEX.test(t)&&!t.split("/").slice(1).map(this.replaceDerive).some(isNaN)}}e.Ed25519KeyDeriver=s,s.ED25519_CURVE="ed25519 seed",s.HARDENED_OFFSET=2147483648,s.PATH_REGEX=new RegExp("^m(\\/[0-9]+')+$"),s.replaceDerive=t=>parseInt(t.replace("'",""),10)},6222:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.BitGoJsError=void 0;class r extends Error{constructor(t){super(t),this.name=this.constructor.name}}e.BitGoJsError=r},7517:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.validateParams=e.getNetwork=e.setNetwork=e.Environments=void 0;const s=o(r(6635)),a=r(1255);let u;Object.defineProperty(e,"Environments",{enumerable:!0,get:function(){return a.Environments}}),e.setNetwork=function(t){u="bitcoin"===t?"bitcoin":"testnet"},e.getNetwork=function(){return u},e.validateParams=function(t,e,r=[],n){if(!s.isObject(t))throw new Error("Must pass in parameters dictionary");if((e=e||[]).forEach((function(e){if(!t[e])throw new Error("Missing parameter: "+e);if(!s.isString(t[e]))throw new Error("Expecting parameter string: "+e+" but found "+typeof t[e])})),r.forEach((function(e){if(t[e]&&!s.isString(t[e]))throw new Error("Expecting parameter string: "+e+" but found "+typeof t[e])})),n&&!s.isFunction(n))throw new Error("illegal callback argument");return!0}},2330:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),o=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)},s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&n(e,t,r);return i(e,t),e};Object.defineProperty(e,"__esModule",{value:!0}),e.common=e.BitGoJsError=void 0,o(r(9629),e),o(r(1255),e);var a=r(6222);Object.defineProperty(e,"BitGoJsError",{enumerable:!0,get:function(){return a.BitGoJsError}});const u=s(r(7517));e.common=u},3597:(t,e,r)=>{"use strict";var n=r(4406);Object.defineProperty(e,"__esModule",{value:!0}),e.Environments=e.AliasEnvironments=e.hardcodedPublicKeys=void 0,e.hardcodedPublicKeys=Object.freeze({serverXpub:{prod:"xpub661MyMwAqRbcEtUgu9HF8ai4ipuVKKHBzUqks4jSFypW8dwwQL1zygLgQx99NmC7zJJznSiwKG6RQfVjAKMtCsx8VjR6kQW8x7HrkXFZdnQ",test:"xpub661MyMwAqRbcErFqVXGiUFv9YeoPbhN72UiNCUdj9nj3T6M8h7iKNmbCYpMVWVZP7LA2ma3HWcPngz1gRTm4FPdtm9mHfrNvU93MCoszsGL"},hsmXpub:{prod:"xpub661MyMwAqRbcGEtTFgMAoxMFoqsRdDaiaR63byNfZdV7cBZFvovQSNJ5bpyeoQtuKVgXBk6sFQ7TtvyWqadt41DnKwveYgM5KoU2EKYjdY2",test:"xpub661MyMwAqRbcGFKe4Bqvk4Sgric4gNFC8pUbw4tUkVjZxubjCA522gPzc1YaXb3bQVmDWc7CjG8AGNWRpcdAU38RETBh8n2bnqEU4kbV4oK",dev:"xpub661MyMwAqRbcFWzoz8qnYRDYEFQpPLYwxVFoG6WLy3ck5ZupRGJTG4ju6yGb7Dj3ey6GsC4kstLRER2nKzgjLtmxyPgC4zHy7kVhUt6yfGn"}}),e.AliasEnvironments={production:"prod",msProd:"prod",msTest:"test",msDev:"dev",msLatest:"latest"};const i={network:"bitcoin",signingAddress:"1BitGo3gxRZ6mQSEH52dvCKSUgVCAH4Rja",serverXpub:e.hardcodedPublicKeys.serverXpub.prod,hsmXpub:e.hardcodedPublicKeys.hsmXpub.prod,btcExplorerBaseUrl:"https://blockstream.info/api",etherscanBaseUrl:"https://api.etherscan.io",etherscanApiToken:n.env.ETHERSCAN_API_TOKEN,eth2ExplorerBaseUrl:"https://beaconscan.com/api",eosNodeUrls:["https://bp.cryptolions.io","https://api.eosnewyork.io","https://api.eosdetroit.io"],nearNodeUrls:["https://rpc.mainnet.near.org"],tronNodes:{full:"https://api.trongrid.io",solidity:"https://api.trongrid.io"},hmacVerificationEnforced:!0},o={network:"testnet",signingAddress:"msignBdFXteehDEgB6DNm7npRt7AcEZJP3",serverXpub:e.hardcodedPublicKeys.serverXpub.test,hsmXpub:e.hardcodedPublicKeys.hsmXpub.test,btcExplorerBaseUrl:"https://blockstream.info/testnet/api",etherscanBaseUrl:"https://api-goerli.etherscan.io",etherscanApiToken:n.env.ETHERSCAN_API_TOKEN,eth2ExplorerBaseUrl:"https://beaconscan.com/api",eosNodeUrls:["https://jungle3.cryptolions.io:443","https://jungle3.eosdac.io:443","https://jungleapi.nodeone.io:443"],nearNodeUrls:["https://rpc.testnet.near.org"],tronNodes:{full:"http://47.252.81.135:8090",solidity:"http://47.252.81.135:8091"},hmacVerificationEnforced:!0},s=Object.assign({},o,{hsmXpub:e.hardcodedPublicKeys.hsmXpub.dev,hmacVerificationEnforced:!1});e.Environments={prod:Object.assign({},i,{uri:"https://app.bitgo.com",stellarFederationServerUrl:"https://app.bitgo.com/api/v2/xlm/federation"}),test:Object.assign({},o,{uri:"https://app.bitgo-test.com",stellarFederationServerUrl:"https://app.bitgo-test.com/api/v2/txlm/federation"}),dev:Object.assign({},s,{uri:"https://app.bitgo-dev.com",stellarFederationServerUrl:"https://app.bitgo-dev.com/api/v2/txlm/federation"}),latest:Object.assign({},s,{uri:"https://app.bitgo-latest.com",stellarFederationServerUrl:"https://app.bitgo-latest.com/api/v2/xlm/federation"}),staging:Object.assign({},i,{uri:"https://staging.bitgo.com",stellarFederationServerUrl:"https://staging.bitgo.com/api/v2/xlm/federation"}),local:Object.assign({},s,{uri:"https://localhost:3000",stellarFederationServerUrl:"https://localhost:3000/api/v2/txlm/federation"}),localNonSecure:Object.assign({},s,{uri:"http://localhost:3000",stellarFederationServerUrl:"http://localhost:3000/api/v2/txlm/federation"}),mock:Object.assign({},s,{uri:"https://bitgo.fakeurl",stellarFederationServerUrl:"https://bitgo.fakeurl/api/v2/txlm/federation",etherscanBaseUrl:"https://api-goerli.etherscan.fakeurl",etherscanApiToken:n.env.ETHERSCAN_API_TOKEN,eth2ExplorerBaseUrl:"https://beaconscan.com/api"}),adminProd:Object.assign({},i,{uri:"https://admin.bitgo.com",stellarFederationServerUrl:"https://admin.bitgo.com/api/v2/xlm/federation"}),adminTest:Object.assign({},o,{uri:"https://admin.bitgo-test.com",stellarFederationServerUrl:"https://admin.bitgo-test.com/api/v2/txlm/federation"}),adminDev:Object.assign({},s,{uri:"https://admin.bitgo-dev.com",stellarFederationServerUrl:"https://admin.bitgo-dev.com/api/v2/txlm/federation"}),adminLatest:Object.assign({},s,{uri:"https://admin.bitgo-latest.com",stellarFederationServerUrl:"https://admin.bitgo-latest.com/api/v2/xlm/federation"}),custom:Object.assign({},i,{uri:n.env.BITGO_CUSTOM_ROOT_URI,network:n.env.BITGO_CUSTOM_BITCOIN_NETWORK,hsmXpub:e.hardcodedPublicKeys.hsmXpub.prod,btcExplorerBaseUrl:"bitcoin"!==n.env.BITGO_CUSTOM_BITCOIN_NETWORK?"https://blockstream.info/testnet/api":"https://blockstream.info/api",etherscanBaseUrl:"ethereum"!==n.env.BITGO_CUSTOM_ETHEREUM_NETWORK?"https://api-goerli.etherscan.io":"https://api.etherscan.io",stellarFederationServerUrl:"stellar"!==n.env.BITGO_CUSTOM_STELLAR_NETWORK?`https://${n.env.BITGO_CUSTOM_ROOT_URI}/api/v2/txlm/federation`:`https://${n.env.BITGO_CUSTOM_ROOT_URI}/api/v2/xlm/federation`,serverXpub:"bitcoin"!==n.env.BITGO_CUSTOM_BITCOIN_NETWORK?e.hardcodedPublicKeys.serverXpub.test:e.hardcodedPublicKeys.serverXpub.prod}),branch:Object.assign({},s,{uri:"https://app.bitgo-dev.com",stellarFederationServerUrl:"https://app.bitgo-dev.com/api/v2/txlm/federation"})}},1255:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(3597),e),i(r(8714),e)},8714:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0})},5982:(t,e,r)=>{"use strict";const n=r(4365),i=r(1824);function o(t){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}function s(t){return BigInt("0x"+function(t){return Array.from(t).map((function(t){const e=t.toString(16);return"0".slice(0,e.length%2)+e})).join("")}(t))}function a(t){return function(t){t.length%2&&(t="0"+t);const e=new Uint8Array(t.length>>>1);for(let r=0;r<t.length>>>1;r++){const n=t.slice(2*r,2*r+2);e[r]=parseInt(n,16)}return e}(t.toString(16))}function u(){const t=new Uint8Array(32);if("undefined"!=typeof crypto&&crypto.getRandomValues)crypto.getRandomValues(t);else for(let e=0;e<t.length;e++)t[e]=Math.floor(256*Math.random());return new i.Fr(s(t)).value}function c(t,e){let r=new i.Fr(0n),n=1n;for(let o=0;o<t.length;o++)r=r.add(new i.Fr(t[o]).multiply(n)),n*=e;return r.value}t.exports={generatePolynomial:function(t){const e=Array(t);for(let r=0;r<t;r++)for(e[r]=u();r==t-1&&0n===e[r].value;)e[r]=u();return e},secretShares:function(t,e){const r=Array(e);for(let n=0n;n<e;n++)r[n]=c(t,n+1n);return r},publicShare:function(t){return s(n.PointG1.BASE.multiply(t[0]).toCompressedHex())},mergeSecretShares:function(t){return t.reduce(((t,e)=>new i.Fr(t+e).value),0n)},mergePublicShares:function(t){return s(t.slice(1).reduce(((t,e)=>t.add(n.PointG1.fromCompressedHex(a(e)))),n.PointG1.fromCompressedHex(a(t[0]))).toCompressedHex())},mergeSignatures:function(t){const e=Object.keys(t),r=function(t){const e=Array(t.length),r=t.reduce(((t,e)=>t*e),1n);for(let n=0;n<t.length;n++){let o=t[n];for(let e=0;e<t.length;e++)e!=n&&(o*=t[e]-t[n]);e[n]=new i.Fr(o).invert().multiply(r).value}return e}(e.map((t=>BigInt(t))));let o=n.PointG2.ZERO;for(let i=0;i<e.length;i++)o=o.add(n.PointG2.fromSignature(a(t[e[i]])).multiply(r[i]));return s(o.toSignature())},sign:async function(t,e){return"string"==typeof t&&(t=o(t)),s((await n.PointG2.hashToCurve(t)).multiply(new i.Fq(e)).toSignature())},verify:async function(t,e,r){return t=n.PointG2.fromSignature(a(t)),"string"==typeof e&&(e=o(e)),r=n.PointG1.fromCompressedHex(a(r)),await n.verify(t,e,r)}}},3462:(t,e,r)=>{"use strict";function n(t){throw t}var i=void 0,o=!1,s={cipher:{},hash:{},keyexchange:{},mode:{},misc:{},codec:{},exception:{corrupt:function(t){this.toString=function(){return"CORRUPT: "+this.message},this.message=t},invalid:function(t){this.toString=function(){return"INVALID: "+this.message},this.message=t},bug:function(t){this.toString=function(){return"BUG: "+this.message},this.message=t},notReady:function(t){this.toString=function(){return"NOT READY: "+this.message},this.message=t}}};function a(t,e,r){4!==e.length&&n(new s.exception.invalid("invalid aes block size"));var i=t.b[r],o=e[0]^i[0],a=e[r?3:1]^i[1],u=e[2]^i[2];e=e[r?1:3]^i[3];var c,f,h,l,p=i.length/4-2,d=4,g=[0,0,0,0];t=(c=t.o[r])[0];var y=c[1],b=c[2],m=c[3],v=c[4];for(l=0;l<p;l++)c=t[o>>>24]^y[a>>16&255]^b[u>>8&255]^m[255&e]^i[d],f=t[a>>>24]^y[u>>16&255]^b[e>>8&255]^m[255&o]^i[d+1],h=t[u>>>24]^y[e>>16&255]^b[o>>8&255]^m[255&a]^i[d+2],e=t[e>>>24]^y[o>>16&255]^b[a>>8&255]^m[255&u]^i[d+3],d+=4,o=c,a=f,u=h;for(l=0;4>l;l++)g[r?3&-l:l]=v[o>>>24]<<24^v[a>>16&255]<<16^v[u>>8&255]<<8^v[255&e]^i[d++],c=o,o=a,a=u,u=e,e=c;return g}function u(t,e){var r,n=s.random.C[t],i=[];for(r in n)n.hasOwnProperty(r)&&i.push(n[r]);for(r=0;r<i.length;r++)i[r](e)}function c(t){window&&window.performance&&"function"==typeof window.performance.now?s.random.addEntropy(window.performance.now(),t,"loadtime"):s.random.addEntropy((new Date).valueOf(),t,"loadtime")}function f(t){t.b=h(t).concat(h(t)),t.D=new s.cipher.aes(t.b)}function h(t){for(var e=0;4>e&&(t.k[e]=t.k[e]+1|0,!t.k[e]);e++);return t.D.encrypt(t.k)}function l(t,e){return function(){e.apply(t,arguments)}}t.exports&&(t.exports=s),s.cipher.aes=function(t){this.o[0][0][0]||this.t();var e,r,i,o,a=this.o[0][4],u=this.o[1],c=1;for(4!==(e=t.length)&&6!==e&&8!==e&&n(new s.exception.invalid("invalid aes key size")),this.b=[i=t.slice(0),o=[]],t=e;t<4*e+28;t++)r=i[t-1],(0==t%e||8===e&&4==t%e)&&(r=a[r>>>24]<<24^a[r>>16&255]<<16^a[r>>8&255]<<8^a[255&r],0==t%e&&(r=r<<8^r>>>24^c<<24,c=c<<1^283*(c>>7))),i[t]=i[t-e]^r;for(e=0;t;e++,t--)r=i[3&e?t:t-4],o[e]=4>=t||4>e?r:u[0][a[r>>>24]]^u[1][a[r>>16&255]]^u[2][a[r>>8&255]]^u[3][a[255&r]]},s.cipher.aes.prototype={encrypt:function(t){return a(this,t,0)},decrypt:function(t){return a(this,t,1)},o:[[[],[],[],[],[]],[[],[],[],[],[]]],t:function(){var t,e,r,n,i,o,s,a=this.o[0],u=this.o[1],c=a[4],f=u[4],h=[],l=[];for(t=0;256>t;t++)l[(h[t]=t<<1^283*(t>>7))^t]=t;for(e=r=0;!c[e];e^=n||1,r=l[r]||1)for(o=(o=r^r<<1^r<<2^r<<3^r<<4)>>8^255&o^99,c[e]=o,f[o]=e,s=16843009*(i=h[t=h[n=h[e]]])^65537*t^257*n^16843008*e,i=257*h[o]^16843008*o,t=0;4>t;t++)a[t][e]=i=i<<24^i>>>8,u[t][o]=s=s<<24^s>>>8;for(t=0;5>t;t++)a[t]=a[t].slice(0),u[t]=u[t].slice(0)}},s.bitArray={bitSlice:function(t,e,r){return t=s.bitArray.Q(t.slice(e/32),32-(31&e)).slice(1),r===i?t:s.bitArray.clamp(t,r-e)},extract:function(t,e,r){var n=Math.floor(-e-r&31);return(-32&(e+r-1^e)?t[e/32|0]<<32-n^t[e/32+1|0]>>>n:t[e/32|0]>>>n)&(1<<r)-1},concat:function(t,e){if(0===t.length||0===e.length)return t.concat(e);var r=t[t.length-1],n=s.bitArray.getPartial(r);return 32===n?t.concat(e):s.bitArray.Q(e,n,0|r,t.slice(0,t.length-1))},bitLength:function(t){var e=t.length;return 0===e?0:32*(e-1)+s.bitArray.getPartial(t[e-1])},clamp:function(t,e){if(32*t.length<e)return t;var r=(t=t.slice(0,Math.ceil(e/32))).length;return e&=31,0<r&&e&&(t[r-1]=s.bitArray.partial(e,t[r-1]&2147483648>>e-1,1)),t},partial:function(t,e,r){return 32===t?e:(r?0|e:e<<32-t)+1099511627776*t},getPartial:function(t){return Math.round(t/1099511627776)||32},equal:function(t,e){if(s.bitArray.bitLength(t)!==s.bitArray.bitLength(e))return o;var r,n=0;for(r=0;r<t.length;r++)n|=t[r]^e[r];return 0===n},Q:function(t,e,r,n){var o;for(o=0,n===i&&(n=[]);32<=e;e-=32)n.push(r),r=0;if(0===e)return n.concat(t);for(o=0;o<t.length;o++)n.push(r|t[o]>>>e),r=t[o]<<32-e;return o=t.length?t[t.length-1]:0,t=s.bitArray.getPartial(o),n.push(s.bitArray.partial(e+t&31,32<e+t?r:n.pop(),1)),n},p:function(t,e){return[t[0]^e[0],t[1]^e[1],t[2]^e[2],t[3]^e[3]]}},s.codec.utf8String={fromBits:function(t){var e,r,n="",i=s.bitArray.bitLength(t);for(e=0;e<i/8;e++)0==(3&e)&&(r=t[e/4]),n+=String.fromCharCode(r>>>24),r<<=8;return decodeURIComponent(escape(n))},toBits:function(t){t=unescape(encodeURIComponent(t));var e,r=[],n=0;for(e=0;e<t.length;e++)n=n<<8|t.charCodeAt(e),3==(3&e)&&(r.push(n),n=0);return 3&e&&r.push(s.bitArray.partial(8*(3&e),n)),r}},s.codec.hex={fromBits:function(t){var e,r="";for(e=0;e<t.length;e++)r+=(0xf00000000000+(0|t[e])).toString(16).substr(4);return r.substr(0,s.bitArray.bitLength(t)/4)},toBits:function(t){var e,r,n=[];for(r=(t=t.replace(/\s|0x/g,"")).length,t+="00000000",e=0;e<t.length;e+=8)n.push(0^parseInt(t.substr(e,8),16));return s.bitArray.clamp(n,4*r)}},s.codec.base64={L:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",fromBits:function(t,e,r){var n="",i=0,o=s.codec.base64.L,a=0,u=s.bitArray.bitLength(t);for(r&&(o=o.substr(0,62)+"-_"),r=0;6*n.length<u;)n+=o.charAt((a^t[r]>>>i)>>>26),6>i?(a=t[r]<<6-i,i+=26,r++):(a<<=6,i-=6);for(;3&n.length&&!e;)n+="=";return n},toBits:function(t,e){t=t.replace(/\s|=/g,"");var r,i,o=[],a=0,u=s.codec.base64.L,c=0;for(e&&(u=u.substr(0,62)+"-_"),r=0;r<t.length;r++)0>(i=u.indexOf(t.charAt(r)))&&n(new s.exception.invalid("this isn't base64!")),26<a?(a-=26,o.push(c^i>>>a),c=i<<32-a):c^=i<<32-(a+=6);return 56&a&&o.push(s.bitArray.partial(56&a,c,1)),o}},s.codec.base64url={fromBits:function(t){return s.codec.base64.fromBits(t,1,1)},toBits:function(t){return s.codec.base64.toBits(t,1)}},s.codec.bytes={fromBits:function(t){var e,r,n=[],i=s.bitArray.bitLength(t);for(e=0;e<i/8;e++)0==(3&e)&&(r=t[e/4]),n.push(r>>>24),r<<=8;return n},toBits:function(t){var e,r=[],n=0;for(e=0;e<t.length;e++)n=n<<8|t[e],3==(3&e)&&(r.push(n),n=0);return 3&e&&r.push(s.bitArray.partial(8*(3&e),n)),r}},s.hash.sha256=function(t){this.b[0]||this.t(),t?(this.e=t.e.slice(0),this.c=t.c.slice(0),this.a=t.a):this.reset()},s.hash.sha256.hash=function(t){return(new s.hash.sha256).update(t).finalize()},s.hash.sha256.prototype={blockSize:512,reset:function(){return this.e=this.h.slice(0),this.c=[],this.a=0,this},update:function(t){"string"==typeof t&&(t=s.codec.utf8String.toBits(t));var e,r=this.c=s.bitArray.concat(this.c,t);for(e=this.a,t=this.a=e+s.bitArray.bitLength(t),e=512+e&-512;e<=t;e+=512)this.g(r.splice(0,16));return this},finalize:function(){var t,e=this.c,r=this.e;for(t=(e=s.bitArray.concat(e,[s.bitArray.partial(1,1)])).length+2;15&t;t++)e.push(0);for(e.push(Math.floor(this.a/4294967296)),e.push(0|this.a);e.length;)this.g(e.splice(0,16));return this.reset(),r},h:[],b:[],t:function(){function t(t){return 4294967296*(t-Math.floor(t))|0}var e,r=0,n=2;t:for(;64>r;n++){for(e=2;e*e<=n;e++)if(0==n%e)continue t;8>r&&(this.h[r]=t(Math.pow(n,.5))),this.b[r]=t(Math.pow(n,1/3)),r++}},g:function(t){var e,r,n=t.slice(0),i=this.e,o=this.b,s=i[0],a=i[1],u=i[2],c=i[3],f=i[4],h=i[5],l=i[6],p=i[7];for(t=0;64>t;t++)16>t?e=n[t]:(e=n[t+1&15],r=n[t+14&15],e=n[15&t]=(e>>>7^e>>>18^e>>>3^e<<25^e<<14)+(r>>>17^r>>>19^r>>>10^r<<15^r<<13)+n[15&t]+n[t+9&15]|0),e=e+p+(f>>>6^f>>>11^f>>>25^f<<26^f<<21^f<<7)+(l^f&(h^l))+o[t],p=l,l=h,h=f,f=c+e|0,c=u,u=a,s=e+((a=s)&u^c&(a^u))+(a>>>2^a>>>13^a>>>22^a<<30^a<<19^a<<10)|0;i[0]=i[0]+s|0,i[1]=i[1]+a|0,i[2]=i[2]+u|0,i[3]=i[3]+c|0,i[4]=i[4]+f|0,i[5]=i[5]+h|0,i[6]=i[6]+l|0,i[7]=i[7]+p|0}},s.hash.sha512=function(t){this.b[0]||this.t(),t?(this.e=t.e.slice(0),this.c=t.c.slice(0),this.a=t.a):this.reset()},s.hash.sha512.hash=function(t){return(new s.hash.sha512).update(t).finalize()},s.hash.sha512.prototype={blockSize:1024,reset:function(){return this.e=this.h.slice(0),this.c=[],this.a=0,this},update:function(t){"string"==typeof t&&(t=s.codec.utf8String.toBits(t));var e,r=this.c=s.bitArray.concat(this.c,t);for(e=this.a,t=this.a=e+s.bitArray.bitLength(t),e=1024+e&-1024;e<=t;e+=1024)this.g(r.splice(0,32));return this},finalize:function(){var t,e=this.c,r=this.e;for(t=(e=s.bitArray.concat(e,[s.bitArray.partial(1,1)])).length+4;31&t;t++)e.push(0);for(e.push(0),e.push(0),e.push(Math.floor(this.a/4294967296)),e.push(0|this.a);e.length;)this.g(e.splice(0,32));return this.reset(),r},h:[],aa:[12372232,13281083,9762859,1914609,15106769,4090911,4308331,8266105],b:[],ca:[2666018,15689165,5061423,9034684,4764984,380953,1658779,7176472,197186,7368638,14987916,16757986,8096111,1480369,13046325,6891156,15813330,5187043,9229749,11312229,2818677,10937475,4324308,1135541,6741931,11809296,16458047,15666916,11046850,698149,229999,945776,13774844,2541862,12856045,9810911,11494366,7844520,15576806,8533307,15795044,4337665,16291729,5553712,15684120,6662416,7413802,12308920,13816008,4303699,9366425,10176680,13195875,4295371,6546291,11712675,15708924,1519456,15772530,6568428,6495784,8568297,13007125,7492395,2515356,12632583,14740254,7262584,1535930,13146278,16321966,1853211,294276,13051027,13221564,1051980,4080310,6651434,14088940,4675607],t:function(){function t(t){return 4294967296*(t-Math.floor(t))|0}function e(t){return 1099511627776*(t-Math.floor(t))&255}var r,n=0,i=2;t:for(;80>n;i++){for(r=2;r*r<=i;r++)if(0==i%r)continue t;8>n&&(this.h[2*n]=t(Math.pow(i,.5)),this.h[2*n+1]=e(Math.pow(i,.5))<<24|this.aa[n]),this.b[2*n]=t(Math.pow(i,1/3)),this.b[2*n+1]=e(Math.pow(i,1/3))<<24|this.ca[n],n++}},g:function(t){var e,r,n=t.slice(0),i=this.e,o=this.b,s=i[0],a=i[1],u=i[2],c=i[3],f=i[4],h=i[5],l=i[6],p=i[7],d=i[8],g=i[9],y=i[10],b=i[11],m=i[12],v=i[13],w=i[14],_=i[15],A=s,E=a,S=u,I=c,k=f,x=h,M=l,C=p,T=d,O=g,P=y,B=b,R=m,N=v,U=w,j=_;for(t=0;80>t;t++){if(16>t)e=n[2*t],r=n[2*t+1];else{r=n[2*(t-15)],e=((D=n[2*(t-15)+1])<<31|r>>>1)^(D<<24|r>>>8)^r>>>7;var L=(r<<31|D>>>1)^(r<<24|D>>>8)^(r<<25|D>>>7);r=n[2*(t-2)];var D=((F=n[2*(t-2)+1])<<13|r>>>19)^(r<<3|F>>>29)^r>>>6,F=(r<<13|F>>>19)^(F<<3|r>>>29)^(r<<26|F>>>6),q=n[2*(t-7)],H=n[2*(t-16)],K=n[2*(t-16)+1];e=e+q+((r=L+n[2*(t-7)+1])>>>0<L>>>0?1:0),e+=D+((r+=F)>>>0<F>>>0?1:0),e+=H+((r+=K)>>>0<K>>>0?1:0)}n[2*t]=e|=0,n[2*t+1]=r|=0,q=T&P^~T&R;var V=O&B^~O&N,G=(F=A&S^A&k^S&k,E&I^E&x^I&x),z=(H=(E<<4|A>>>28)^(A<<30|E>>>2)^(A<<25|E>>>7),K=(A<<4|E>>>28)^(E<<30|A>>>2)^(E<<25|A>>>7),o[2*t]),W=o[2*t+1];L=U+((O<<18|T>>>14)^(O<<14|T>>>18)^(T<<23|O>>>9))+((D=j+((T<<18|O>>>14)^(T<<14|O>>>18)^(O<<23|T>>>9)))>>>0<j>>>0?1:0),U=R,j=N,R=P,N=B,P=T,B=O,T=M+(L=(L=(L+=q+((D+=V)>>>0<V>>>0?1:0))+(z+((D+=W)>>>0<W>>>0?1:0)))+(e+((D+=r)>>>0<r>>>0?1:0)))+((O=C+D|0)>>>0<C>>>0?1:0)|0,M=k,C=x,k=S,x=I,S=A,I=E,A=L+(e=H+F+((r=K+G)>>>0<K>>>0?1:0))+((E=D+r|0)>>>0<D>>>0?1:0)|0}a=i[1]=a+E|0,i[0]=s+A+(a>>>0<E>>>0?1:0)|0,c=i[3]=c+I|0,i[2]=u+S+(c>>>0<I>>>0?1:0)|0,h=i[5]=h+x|0,i[4]=f+k+(h>>>0<x>>>0?1:0)|0,p=i[7]=p+C|0,i[6]=l+M+(p>>>0<C>>>0?1:0)|0,g=i[9]=g+O|0,i[8]=d+T+(g>>>0<O>>>0?1:0)|0,b=i[11]=b+B|0,i[10]=y+P+(b>>>0<B>>>0?1:0)|0,v=i[13]=v+N|0,i[12]=m+R+(v>>>0<N>>>0?1:0)|0,_=i[15]=_+j|0,i[14]=w+U+(_>>>0<j>>>0?1:0)|0}},s.hash.sha1=function(t){t?(this.e=t.e.slice(0),this.c=t.c.slice(0),this.a=t.a):this.reset()},s.hash.sha1.hash=function(t){return(new s.hash.sha1).update(t).finalize()},s.hash.sha1.prototype={blockSize:512,reset:function(){return this.e=this.h.slice(0),this.c=[],this.a=0,this},update:function(t){"string"==typeof t&&(t=s.codec.utf8String.toBits(t));var e,r=this.c=s.bitArray.concat(this.c,t);for(e=this.a,t=this.a=e+s.bitArray.bitLength(t),e=this.blockSize+e&-this.blockSize;e<=t;e+=this.blockSize)this.g(r.splice(0,16));return this},finalize:function(){var t,e=this.c,r=this.e;for(t=(e=s.bitArray.concat(e,[s.bitArray.partial(1,1)])).length+2;15&t;t++)e.push(0);for(e.push(Math.floor(this.a/4294967296)),e.push(0|this.a);e.length;)this.g(e.splice(0,16));return this.reset(),r},h:[1732584193,4023233417,2562383102,271733878,3285377520],b:[1518500249,1859775393,2400959708,3395469782],g:function(t){var e,r,n,o,s,a,u=t.slice(0),c=this.e;for(r=c[0],n=c[1],o=c[2],s=c[3],a=c[4],t=0;79>=t;t++)16<=t&&(u[t]=(u[t-3]^u[t-8]^u[t-14]^u[t-16])<<1|(u[t-3]^u[t-8]^u[t-14]^u[t-16])>>>31),e=(r<<5|r>>>27)+(e=19>=t?n&o|~n&s:39>=t?n^o^s:59>=t?n&o|n&s|o&s:79>=t?n^o^s:i)+a+u[t]+this.b[Math.floor(t/20)]|0,a=s,s=o,o=n<<30|n>>>2,n=r,r=e;c[0]=c[0]+r|0,c[1]=c[1]+n|0,c[2]=c[2]+o|0,c[3]=c[3]+s|0,c[4]=c[4]+a|0}},s.mode.ccm={name:"ccm",encrypt:function(t,e,r,i,o){var a,u=e.slice(0),c=s.bitArray,f=c.bitLength(r)/8,h=c.bitLength(u)/8;for(o=o||64,i=i||[],7>f&&n(new s.exception.invalid("ccm: iv must be at least 7 bytes")),a=2;4>a&&h>>>8*a;a++);return a<15-f&&(a=15-f),r=c.clamp(r,8*(15-a)),e=s.mode.ccm.N(t,e,r,i,o,a),u=s.mode.ccm.s(t,u,r,e,o,a),c.concat(u.data,u.tag)},decrypt:function(t,e,r,i,o){o=o||64,i=i||[];var a=s.bitArray,u=a.bitLength(r)/8,c=a.bitLength(e),f=a.clamp(e,c-o),h=a.bitSlice(e,c-o);for(c=(c-o)/8,7>u&&n(new s.exception.invalid("ccm: iv must be at least 7 bytes")),e=2;4>e&&c>>>8*e;e++);return e<15-u&&(e=15-u),r=a.clamp(r,8*(15-e)),f=s.mode.ccm.s(t,f,r,h,o,e),t=s.mode.ccm.N(t,f.data,r,i,o,e),a.equal(f.tag,t)||n(new s.exception.corrupt("ccm: tag doesn't match")),f.data},N:function(t,e,r,i,o,a){var u=[],c=s.bitArray,f=c.p;if(((o/=8)%2||4>o||16<o)&&n(new s.exception.invalid("ccm: invalid tag length")),(4294967295<i.length||4294967295<e.length)&&n(new s.exception.bug("ccm: can't deal with 4GiB or more data")),a=[c.partial(8,(i.length?64:0)|o-2<<2|a-1)],(a=c.concat(a,r))[3]|=c.bitLength(e)/8,a=t.encrypt(a),i.length)for(65279>=(r=c.bitLength(i)/8)?u=[c.partial(16,r)]:4294967295>=r&&(u=c.concat([c.partial(16,65534)],[r])),u=c.concat(u,i),i=0;i<u.length;i+=4)a=t.encrypt(f(a,u.slice(i,i+4).concat([0,0,0])));for(i=0;i<e.length;i+=4)a=t.encrypt(f(a,e.slice(i,i+4).concat([0,0,0])));return c.clamp(a,8*o)},s:function(t,e,r,n,i,o){var a,u=s.bitArray;a=u.p;var c=e.length,f=u.bitLength(e);if(r=u.concat([u.partial(8,o-1)],r).concat([0,0,0]).slice(0,4),n=u.bitSlice(a(n,t.encrypt(r)),0,i),!c)return{tag:n,data:[]};for(a=0;a<c;a+=4)r[3]++,i=t.encrypt(r),e[a]^=i[0],e[a+1]^=i[1],e[a+2]^=i[2],e[a+3]^=i[3];return{tag:n,data:u.clamp(e,f)}}},s.mode.ocb2={name:"ocb2",encrypt:function(t,e,r,i,o,a){128!==s.bitArray.bitLength(r)&&n(new s.exception.invalid("ocb iv must be 128 bits"));var u,c=s.mode.ocb2.J,f=s.bitArray,h=f.p,l=[0,0,0,0];r=c(t.encrypt(r));var p,d=[];for(i=i||[],o=o||64,u=0;u+4<e.length;u+=4)l=h(l,p=e.slice(u,u+4)),d=d.concat(h(r,t.encrypt(h(r,p)))),r=c(r);return p=e.slice(u),e=f.bitLength(p),u=t.encrypt(h(r,[0,0,0,e])),p=f.clamp(h(p.concat([0,0,0]),u),e),l=h(l,h(p.concat([0,0,0]),u)),l=t.encrypt(h(l,h(r,c(r)))),i.length&&(l=h(l,a?i:s.mode.ocb2.pmac(t,i))),d.concat(f.concat(p,f.clamp(l,o)))},decrypt:function(t,e,r,i,o,a){128!==s.bitArray.bitLength(r)&&n(new s.exception.invalid("ocb iv must be 128 bits")),o=o||64;var u,c,f=s.mode.ocb2.J,h=s.bitArray,l=h.p,p=[0,0,0,0],d=f(t.encrypt(r)),g=s.bitArray.bitLength(e)-o,y=[];for(i=i||[],r=0;r+4<g/32;r+=4)u=l(d,t.decrypt(l(d,e.slice(r,r+4)))),p=l(p,u),y=y.concat(u),d=f(d);return c=g-32*r,u=t.encrypt(l(d,[0,0,0,c])),u=l(u,h.clamp(e.slice(r),c).concat([0,0,0])),p=l(p,u),p=t.encrypt(l(p,l(d,f(d)))),i.length&&(p=l(p,a?i:s.mode.ocb2.pmac(t,i))),h.equal(h.clamp(p,o),h.bitSlice(e,g))||n(new s.exception.corrupt("ocb: tag doesn't match")),y.concat(h.clamp(u,c))},pmac:function(t,e){var r,n=s.mode.ocb2.J,i=s.bitArray,o=i.p,a=[0,0,0,0],u=o(u=t.encrypt([0,0,0,0]),n(n(u)));for(r=0;r+4<e.length;r+=4)u=n(u),a=o(a,t.encrypt(o(u,e.slice(r,r+4))));return r=e.slice(r),128>i.bitLength(r)&&(u=o(u,n(u)),r=i.concat(r,[-2147483648,0,0,0])),a=o(a,r),t.encrypt(o(n(o(u,n(u))),a))},J:function(t){return[t[0]<<1^t[1]>>>31,t[1]<<1^t[2]>>>31,t[2]<<1^t[3]>>>31,t[3]<<1^135*(t[0]>>>31)]}},s.mode.gcm={name:"gcm",encrypt:function(t,e,r,n,i){var o=e.slice(0);return e=s.bitArray,n=n||[],t=s.mode.gcm.s(!0,t,o,n,r,i||128),e.concat(t.data,t.tag)},decrypt:function(t,e,r,i,a){var u=e.slice(0),c=s.bitArray,f=c.bitLength(u);return i=i||[],(a=a||128)<=f?(e=c.bitSlice(u,f-a),u=c.bitSlice(u,0,f-a)):(e=u,u=[]),t=s.mode.gcm.s(o,t,u,i,r,a),c.equal(t.tag,e)||n(new s.exception.corrupt("gcm: tag doesn't match")),t.data},$:function(t,e){var r,n,i,o,a,u=s.bitArray.p;for(i=[0,0,0,0],o=e.slice(0),r=0;128>r;r++){for((n=0!=(t[Math.floor(r/32)]&1<<31-r%32))&&(i=u(i,o)),a=0!=(1&o[3]),n=3;0<n;n--)o[n]=o[n]>>>1|(1&o[n-1])<<31;o[0]>>>=1,a&&(o[0]^=-520093696)}return i},l:function(t,e,r){var n,i=r.length;for(e=e.slice(0),n=0;n<i;n+=4)e[0]^=4294967295&r[n],e[1]^=4294967295&r[n+1],e[2]^=4294967295&r[n+2],e[3]^=4294967295&r[n+3],e=s.mode.gcm.$(e,t);return e},s:function(t,e,r,n,i,o){var a,u,c,f,h,l,p,d,g=s.bitArray;for(l=r.length,p=g.bitLength(r),d=g.bitLength(n),u=g.bitLength(i),a=e.encrypt([0,0,0,0]),96===u?(i=i.slice(0),i=g.concat(i,[1])):(i=s.mode.gcm.l(a,[0,0,0,0],i),i=s.mode.gcm.l(a,i,[0,0,Math.floor(u/4294967296),4294967295&u])),u=s.mode.gcm.l(a,[0,0,0,0],n),h=i.slice(0),n=u.slice(0),t||(n=s.mode.gcm.l(a,u,r)),f=0;f<l;f+=4)h[3]++,c=e.encrypt(h),r[f]^=c[0],r[f+1]^=c[1],r[f+2]^=c[2],r[f+3]^=c[3];return r=g.clamp(r,p),t&&(n=s.mode.gcm.l(a,u,r)),t=[Math.floor(d/4294967296),4294967295&d,Math.floor(p/4294967296),4294967295&p],n=s.mode.gcm.l(a,n,t),c=e.encrypt(i),n[0]^=c[0],n[1]^=c[1],n[2]^=c[2],n[3]^=c[3],{tag:g.bitSlice(n,0,o),data:r}}},s.misc.hmac=function(t,e){this.O=e=e||s.hash.sha256;var r,n=[[],[]],i=e.prototype.blockSize/32;for(this.r=[new e,new e],t.length>i&&(t=e.hash(t)),r=0;r<i;r++)n[0][r]=909522486^t[r],n[1][r]=1549556828^t[r];this.r[0].update(n[0]),this.r[1].update(n[1]),this.I=new e(this.r[0])},s.misc.hmac.prototype.encrypt=s.misc.hmac.prototype.mac=function(t){return this.R&&n(new s.exception.invalid("encrypt on already updated hmac called!")),this.update(t),this.digest(t)},s.misc.hmac.prototype.reset=function(){this.I=new this.O(this.r[0]),this.R=o},s.misc.hmac.prototype.update=function(t){this.R=!0,this.I.update(t)},s.misc.hmac.prototype.digest=function(){var t=this.I.finalize();return t=new this.O(this.r[1]).update(t).finalize(),this.reset(),t},s.misc.pbkdf2=function(t,e,r,i,o){r=r||1e3,(0>i||0>r)&&n(s.exception.invalid("invalid params to pbkdf2")),"string"==typeof t&&(t=s.codec.utf8String.toBits(t)),"string"==typeof e&&(e=s.codec.utf8String.toBits(e)),t=new(o=o||s.misc.hmac)(t);var a,u,c,f,h=[],l=s.bitArray;for(f=1;32*h.length<(i||1);f++){for(o=a=t.encrypt(l.concat(e,[f])),u=1;u<r;u++)for(a=t.encrypt(a),c=0;c<a.length;c++)o[c]^=a[c];h=h.concat(o)}return i&&(h=l.clamp(h,i)),h},s.prng=function(t){this.f=[new s.hash.sha256],this.m=[0],this.H=0,this.w={},this.G=0,this.M={},this.P=this.i=this.n=this.X=0,this.b=[0,0,0,0,0,0,0,0],this.k=[0,0,0,0],this.D=i,this.F=t,this.u=o,this.C={progress:{},seeded:{}},this.q=this.W=0,this.A=1,this.B=2,this.T=65536,this.K=[0,48,64,96,128,192,256,384,512,768,1024],this.U=3e4,this.S=80},s.prng.prototype={randomWords:function(t,e){var r,i,o=[];if((r=this.isReady(e))===this.q&&n(new s.exception.notReady("generator isn't seeded")),r&this.B){r=!(r&this.A),i=[];var a,u=0;for(this.P=i[0]=(new Date).valueOf()+this.U,a=0;16>a;a++)i.push(4294967296*Math.random()|0);for(a=0;a<this.f.length&&(i=i.concat(this.f[a].finalize()),u+=this.m[a],this.m[a]=0,r||!(this.H&1<<a));a++);for(this.H>=1<<this.f.length&&(this.f.push(new s.hash.sha256),this.m.push(0)),this.i-=u,u>this.n&&(this.n=u),this.H++,this.b=s.hash.sha256.hash(this.b.concat(i)),this.D=new s.cipher.aes(this.b),r=0;4>r&&(this.k[r]=this.k[r]+1|0,!this.k[r]);r++);}for(r=0;r<t;r+=4)0==(r+1)%this.T&&f(this),i=h(this),o.push(i[0],i[1],i[2],i[3]);return f(this),o.slice(0,t)},setDefaultParanoia:function(t,e){0===t&&"Setting paranoia=0 will ruin your security; use it only for testing"!==e&&n("Setting paranoia=0 will ruin your security; use it only for testing"),this.F=t},addEntropy:function(t,e,r){r=r||"user";var o,a,c=(new Date).valueOf(),f=this.w[r],h=this.isReady(),l=0;switch((o=this.M[r])===i&&(o=this.M[r]=this.X++),f===i&&(f=this.w[r]=0),this.w[r]=(this.w[r]+1)%this.f.length,typeof t){case"number":e===i&&(e=1),this.f[f].update([o,this.G++,1,e,c,1,0|t]);break;case"object":if("[object Uint32Array]"===(r=Object.prototype.toString.call(t))){for(a=[],r=0;r<t.length;r++)a.push(t[r]);t=a}else for("[object Array]"!==r&&(l=1),r=0;r<t.length&&!l;r++)"number"!=typeof t[r]&&(l=1);if(!l){if(e===i)for(r=e=0;r<t.length;r++)for(a=t[r];0<a;)e++,a>>>=1;this.f[f].update([o,this.G++,2,e,c,t.length].concat(t))}break;case"string":e===i&&(e=t.length),this.f[f].update([o,this.G++,3,e,c,t.length]),this.f[f].update(t);break;default:l=1}l&&n(new s.exception.bug("random: addEntropy only supports number, array of numbers or string")),this.m[f]+=e,this.i+=e,h===this.q&&(this.isReady()!==this.q&&u("seeded",Math.max(this.n,this.i)),u("progress",this.getProgress()))},isReady:function(t){return t=this.K[t!==i?t:this.F],this.n&&this.n>=t?this.m[0]>this.S&&(new Date).valueOf()>this.P?this.B|this.A:this.A:this.i>=t?this.B|this.q:this.q},getProgress:function(t){return t=this.K[t||this.F],this.n>=t||this.i>t?1:this.i/t},startCollectors:function(){this.u||(this.d={loadTimeCollector:l(this,this.da),mouseCollector:l(this,this.ea),keyboardCollector:l(this,this.ba),accelerometerCollector:l(this,this.V)},window.addEventListener?(window.addEventListener("load",this.d.loadTimeCollector,o),window.addEventListener("mousemove",this.d.mouseCollector,o),window.addEventListener("keypress",this.d.keyboardCollector,o),window.addEventListener("devicemotion",this.d.accelerometerCollector,o)):document.attachEvent?(document.attachEvent("onload",this.d.loadTimeCollector),document.attachEvent("onmousemove",this.d.mouseCollector),document.attachEvent("keypress",this.d.keyboardCollector)):n(new s.exception.bug("can't attach event")),this.u=!0)},stopCollectors:function(){this.u&&(window.removeEventListener?(window.removeEventListener("load",this.d.loadTimeCollector,o),window.removeEventListener("mousemove",this.d.mouseCollector,o),window.removeEventListener("keypress",this.d.keyboardCollector,o),window.removeEventListener("devicemotion",this.d.accelerometerCollector,o)):document.detachEvent&&(document.detachEvent("onload",this.d.loadTimeCollector),document.detachEvent("onmousemove",this.d.mouseCollector),document.detachEvent("keypress",this.d.keyboardCollector)),this.u=o)},addEventListener:function(t,e){this.C[t][this.W++]=e},removeEventListener:function(t,e){var r,n,i=this.C[t],o=[];for(n in i)i.hasOwnProperty(n)&&i[n]===e&&o.push(n);for(r=0;r<o.length;r++)delete i[n=o[r]]},ba:function(){c(1)},ea:function(t){s.random.addEntropy([t.x||t.clientX||t.offsetX||0,t.y||t.clientY||t.offsetY||0],2,"mouse"),c(0)},da:function(){c(2)},V:function(t){if(t=t.accelerationIncludingGravity.x||t.accelerationIncludingGravity.y||t.accelerationIncludingGravity.z,window.orientation){var e=window.orientation;"number"==typeof e&&s.random.addEntropy(e,1,"accelerometer")}t&&s.random.addEntropy(t,2,"accelerometer"),c(0)}},s.random=new s.prng(6);t:try{var p,d,g;if(t.exports&&(d=r(5634))&&d.randomBytes)p=d.randomBytes(128),p=new Uint32Array(new Uint8Array(p).buffer),s.random.addEntropy(p,1024,"crypto['randomBytes']");else if(window&&Uint32Array){if(g=new Uint32Array(32),window.crypto&&window.crypto.getRandomValues)window.crypto.getRandomValues(g);else{if(!window.msCrypto||!window.msCrypto.getRandomValues)break t;window.msCrypto.getRandomValues(g)}s.random.addEntropy(g,1024,"crypto['getRandomValues']")}}catch(t){console.log("There was an error collecting entropy from the browser:"),console.log(t)}s.json={defaults:{v:1,iter:1e3,ks:128,ts:64,mode:"ccm",adata:"",cipher:"aes"},Z:function(t,e,r,i){r=r||{},i=i||{};var o,a=s.json,u=a.j({iv:s.random.randomWords(4,0)},a.defaults);return a.j(u,r),r=u.adata,"string"==typeof u.salt&&(u.salt=s.codec.base64.toBits(u.salt)),"string"==typeof u.iv&&(u.iv=s.codec.base64.toBits(u.iv)),(!s.mode[u.mode]||!s.cipher[u.cipher]||"string"==typeof t&&100>=u.iter||64!==u.ts&&96!==u.ts&&128!==u.ts||128!==u.ks&&192!==u.ks&&256!==u.ks||2>u.iv.length||4<u.iv.length)&&n(new s.exception.invalid("json encrypt: invalid parameters")),"string"==typeof t?(t=(o=s.misc.cachedPbkdf2(t,u)).key.slice(0,u.ks/32),u.salt=o.salt):s.ecc&&t instanceof s.ecc.elGamal.publicKey&&(o=t.kem(),u.kemtag=o.tag,t=o.key.slice(0,u.ks/32)),"string"==typeof e&&(e=s.codec.utf8String.toBits(e)),"string"==typeof r&&(r=s.codec.utf8String.toBits(r)),o=new s.cipher[u.cipher](t),a.j(i,u),i.key=t,u.ct=s.mode[u.mode].encrypt(o,e,u.iv,r,u.ts),u},encrypt:function(t,e,r,n){var i=s.json,o=i.Z.apply(i,arguments);return i.encode(o)},Y:function(t,e,r,i){r=r||{},i=i||{};var o,a=s.json;return r=(e=a.j(a.j(a.j({},a.defaults),e),r,!0)).adata,"string"==typeof e.salt&&(e.salt=s.codec.base64.toBits(e.salt)),"string"==typeof e.iv&&(e.iv=s.codec.base64.toBits(e.iv)),(!s.mode[e.mode]||!s.cipher[e.cipher]||"string"==typeof t&&100>=e.iter||64!==e.ts&&96!==e.ts&&128!==e.ts||128!==e.ks&&192!==e.ks&&256!==e.ks||!e.iv||2>e.iv.length||4<e.iv.length)&&n(new s.exception.invalid("json decrypt: invalid parameters")),"string"==typeof t?(t=(o=s.misc.cachedPbkdf2(t,e)).key.slice(0,e.ks/32),e.salt=o.salt):s.ecc&&t instanceof s.ecc.elGamal.secretKey&&(t=t.unkem(s.codec.base64.toBits(e.kemtag)).slice(0,e.ks/32)),"string"==typeof r&&(r=s.codec.utf8String.toBits(r)),o=new s.cipher[e.cipher](t),r=s.mode[e.mode].decrypt(o,e.ct,e.iv,r,e.ts),a.j(i,e),i.key=t,s.codec.utf8String.fromBits(r)},decrypt:function(t,e,r,n){var i=s.json;return i.Y(t,i.decode(e),r,n)},encode:function(t){var e,r="{",i="";for(e in t)if(t.hasOwnProperty(e))switch(e.match(/^[a-z0-9]+$/i)||n(new s.exception.invalid("json encode: invalid property name")),r+=i+'"'+e+'":',i=",",typeof t[e]){case"number":case"boolean":r+=t[e];break;case"string":r+='"'+escape(t[e])+'"';break;case"object":r+='"'+s.codec.base64.fromBits(t[e],0)+'"';break;default:n(new s.exception.bug("json encode: unsupported type"))}return r+"}"},decode:function(t){(t=t.replace(/\s/g,"")).match(/^\{.*\}$/)||n(new s.exception.invalid("json decode: this isn't json!")),t=t.replace(/^\{|\}$/g,"").split(/,/);var e,r,i={};for(e=0;e<t.length;e++)(r=t[e].match(/^(?:(["']?)([a-z][a-z0-9]*)\1):(?:(\d+)|"([a-z0-9+\/%*_.@=\-]*)")$/i))||n(new s.exception.invalid("json decode: this isn't json!")),i[r[2]]=r[3]?parseInt(r[3],10):r[2].match(/^(ct|salt|iv)$/)?s.codec.base64.toBits(r[4]):unescape(r[4]);return i},j:function(t,e,r){if(t===i&&(t={}),e===i)return t;for(var o in e)e.hasOwnProperty(o)&&(r&&t[o]!==i&&t[o]!==e[o]&&n(new s.exception.invalid("required parameter overridden")),t[o]=e[o]);return t},ha:function(t,e){var r,n={};for(r in t)t.hasOwnProperty(r)&&t[r]!==e[r]&&(n[r]=t[r]);return n},ga:function(t,e){var r,n={};for(r=0;r<e.length;r++)t[e[r]]!==i&&(n[e[r]]=t[e[r]]);return n}},s.encrypt=s.json.encrypt,s.decrypt=s.json.decrypt,s.misc.fa={},s.misc.cachedPbkdf2=function(t,e){var r,n=s.misc.fa;return r=(e=e||{}).iter||1e3,(r=(n=n[t]=n[t]||{})[r]=n[r]||{firstSalt:e.salt&&e.salt.length?e.salt.slice(0):s.random.randomWords(2,0)})[n=e.salt===i?r.firstSalt:e.salt]=r[n]||s.misc.pbkdf2(t,n,e.iter),{key:r[n].slice(0),salt:n.slice(0)}}},880:(t,e,r)=>{"use strict";var n;Object.defineProperty(e,"__esModule",{value:!0}),e.toBech32=e.fromBech32=e.fromBase58Check=e.toBase58Check=e.toOutputScript=e.fromOutputScript=void 0;const i=r(6314),o=r(4658),s=r(1816);e.fromOutputScript=function(t,e){return s.isValidNetwork(e)&&s.isZcash(e)?o.fromOutputScript(t,e):i.address.fromOutputScript(t,e)},e.toOutputScript=function(t,e){return s.isValidNetwork(e)&&s.isZcash(e)?o.toOutputScript(t,e):i.address.toOutputScript(t,e)},e.toBase58Check=function(t,e,r){return s.isValidNetwork(r)&&s.isZcash(r)?o.toBase58Check(t,e):i.address.toBase58Check(t,e)},e.fromBase58Check=function(t,e){return s.isValidNetwork(e)&&s.isZcash(e)?o.fromBase58Check(t):i.address.fromBase58Check(t)},n=i.address,e.fromBech32=n.fromBech32,e.toBech32=n.toBech32},2371:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toCanonicalFormat=e.toOutputScriptTryFormats=e.toOutputScriptAndFormat=e.toOutputScriptWithFormat=e.fromOutputScriptWithFormat=e.isSupportedAddressFormat=e.addressFormats=void 0;const n=r(1816),i=r(880),o=r(4781);function s(t,e){switch(t){case"default":return!0;case"cashaddr":return n.getMainnet(e)===n.networks.bitcoincash}throw new Error(`unknown address format ${t}`)}function a(t,e,r){if(!s(e,r))throw new Error(`unsupported address format ${e} for network ${n.getNetworkName(r)}`);return n.getMainnet(r)===n.networks.bitcoincash?o.toOutputScriptWithFormat(t,e,r):i.toOutputScript(t,r)}function u(t,r,n){n||(n=e.addressFormats.filter((t=>s(t,r))));for(const e of n)try{return[e,a(t,e,r)]}catch(t){}throw new Error(`could not parse outputScript [formats=${n}]`)}function c(t,e,r){const[,n]=u(t,e,r);return n}e.addressFormats=["default","cashaddr"],e.isSupportedAddressFormat=s,e.fromOutputScriptWithFormat=function(t,e,r){if(!s(e,r))throw new Error(`unsupported address format ${e} for network ${n.getNetworkName(r)}`);return n.getMainnet(r)===n.networks.bitcoincash?o.fromOutputScriptWithFormat(t,e,r):i.fromOutputScript(t,r)},e.toOutputScriptWithFormat=a,e.toOutputScriptAndFormat=u,e.toOutputScriptTryFormats=c,e.toCanonicalFormat=function(t,e){return i.fromOutputScript(c(t,e),e)}},9996:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.unspentSum=e.addToTransactionBuilder=e.toPrevOutput=e.getOutputIdForInput=e.formatOutputId=e.parseOutputId=e.toOutput=void 0;const i=r(880);function o(t,e){return{script:i.toOutputScript(t.address,e),value:t.value}}function s(t){const e=t.split(":");if(2!==e.length)throw new Error("invalid outputId, must have format txid:vout");const[r,n]=e,i=Number(n);if(64!==r.length)throw new Error(`invalid txid ${r} ${r.length}`);if(Number.isNaN(i)||i<0||!Number.isSafeInteger(i))throw new Error("invalid vout: must be integer >= 0");return{txid:r,vout:i}}function a(t,e){return{...s(t.id),...o(t,e)}}e.toOutput=o,e.parseOutputId=s,e.formatOutputId=function({txid:t,vout:e}){return`${t}:${e}`},e.getOutputIdForInput=function(t){return{txid:n.from(t.hash).reverse().toString("hex"),vout:t.index}},e.toPrevOutput=a,e.addToTransactionBuilder=function(t,e,r){const{txid:n,vout:i,script:o,value:s}=a(e,t.network);t.addInput(n,i,r,o,s)},e.unspentSum=function(t){return t.reduce(((t,e)=>t+e.value),0)}},8277:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UtxoTransaction=e.varSliceSize=void 0;const n=r(6314),i=r(8595),o=r(1816);e.varSliceSize=function(t){const e=t.length;return i.encodingLength(e)+e};class s extends n.Transaction{constructor(t,e=new n.Transaction){super(),this.network=t,this.version=e.version,this.locktime=e.locktime,this.ins=e.ins.map((t=>({...t}))),this.outs=e.outs.map((t=>({...t})))}static fromBuffer(t,e,r,i){if(!r)throw new Error("must provide network");return new s(r,n.Transaction.fromBuffer(t,e))}addForkId(t){return t&s.SIGHASH_FORKID?(t|(o.isBitcoinGold(this.network)?79:0)<<8)>>>0:t}hashForWitnessV0(t,e,r,n){return super.hashForWitnessV0(t,e,r,this.addForkId(n))}hashForSignatureByNetwork(t,e,r,n){switch(o.getMainnet(this.network)){case o.networks.zcash:throw new Error("illegal state");case o.networks.bitcoincash:case o.networks.bitcoinsv:case o.networks.bitcoingold:if((n&s.SIGHASH_FORKID)>0){if(void 0===r)throw new Error("must provide value");return super.hashForWitnessV0(t,e,r,this.addForkId(n))}}return super.hashForSignature(t,e,n)}hashForSignature(t,e,r){return this.hashForSignatureByNetwork(t,e,this.ins[t].value,r)}clone(){return new s(this.network,super.clone())}}e.UtxoTransaction=s,s.SIGHASH_FORKID=64,s.SIGHASH_BITCOINCASHBIP143=s.SIGHASH_FORKID},740:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.UtxoTransactionBuilder=void 0;const n=r(6314),i=r(8277);class o extends n.TransactionBuilder{constructor(t,e,r){var n;if(super(),this.network=t,this.__TX=this.createInitialTransaction(t,null===(n=e)||void 0===n?void 0:n.__TX),e&&(this.__INPUTS=e.__INPUTS),r){const t=this.__INPUTS;if(r.length!==t.length)throw new Error("prevOuts must match txbInput length");r.forEach(((e,r)=>{t[r].value=e.value,t[r].prevOutScript=e.script}))}}createInitialTransaction(t,e){return new i.UtxoTransaction(t,e)}static fromTransaction(t,e,r){return new o(t.network,n.TransactionBuilder.fromTransaction(t),r)}get tx(){return this.__TX}build(){return super.build()}buildIncomplete(){return super.buildIncomplete()}sign(t,e,r,n,i,o){return"number"==typeof t?("number"==typeof i&&(this.tx.ins[t].value=i),super.sign(t,e,r,n,i,o)):(void 0!==t.witnessValue&&(this.tx.ins[t.vin].value=t.witnessValue),"p2sh-p2ms"===t.prevOutScriptType&&delete t.witnessValue,super.sign(t))}}e.UtxoTransactionBuilder=o},4781:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.toOutputScriptWithFormat=e.fromOutputScriptWithFormat=e.toOutputScriptFromCashAddress=e.fromOutputScriptToCashAddress=e.getPrefix=void 0;const n=r(8586),i=r(6314),o=r(1816);function s(t,e){const r=i.payments[t];if(!r)throw new Error(`no payment with name ${t}`);try{return r({output:e}).hash}catch(t){return}}function a(t){switch(t){case o.networks.bitcoincash:return"bitcoincash";case o.networks.bitcoincashTestnet:return"bchtest";default:throw new Error(`unsupported prefix for ${o.getNetworkName(t)}`)}}function u(t,e){if(!o.isBitcoinCash(e))throw new Error("invalid network");for(const[r,i]of[["p2pkh","pubkeyhash"],["p2sh","scripthash"]]){const o=s(r,t);if(o)return n.encode(a(e),i,o)}throw new Error("could not determine hash for outputScript")}function c(t,e){if(!o.isBitcoinCash(e))throw new Error("invalid network");if(t===t.toUpperCase()&&(t=t.toLowerCase()),t!==t.toLowerCase())throw new Error("mixed-case addresses not allowed");t.startsWith(a(e)+":")||(t=`${a(e)}:${t}`);const r=n.decode(t);let s;switch(r.version){case"scripthash":s=i.payments.p2sh({hash:r.hash}).output;break;case"pubkeyhash":s=i.payments.p2pkh({hash:r.hash}).output;break;default:throw new Error(`unknown version ${r.version}`)}if(!s)throw new Error("could not determine output script");return s}e.getPrefix=a,e.fromOutputScriptToCashAddress=u,e.toOutputScriptFromCashAddress=c,e.fromOutputScriptWithFormat=function(t,e,r){if(!o.isBitcoinCash(r))throw new Error("invalid network");if("cashaddr"===e)return u(t,r);if("default"===e)return i.address.fromOutputScript(t,r);throw new Error("invalid format")},e.toOutputScriptWithFormat=function(t,e,r){if(!o.isBitcoinCash(r))throw new Error("invalid network");if("cashaddr"===e)return c(t,r);if("default"===e)return i.address.toOutputScript(t,r);throw new Error("invalid format")}},1207:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.DashTransaction=void 0;const i=r(9359),o=r(6314),s=r(8277),a=r(1816);class u extends s.UtxoTransaction{constructor(t,e){if(super(t,e),this.type=0,!a.isDash(t))throw new Error("invalid network");e&&(this.version=e.version,e instanceof u&&(this.type=e.type,this.extraPayload=e.extraPayload)),this.__toBuffer=this.toBufferWithExtraPayload}static fromTransaction(t){return new u(t.network,t)}static fromBuffer(t,e,r){const n=s.UtxoTransaction.fromBuffer(t,!0,r),o=new u(r,n);if(o.version=65535&n.version,o.type=n.version>>16,n.byteLength()!==t.length){const e=new i.BufferReader(t,n.byteLength());o.extraPayload=e.readVarSlice()}return o}clone(){return new u(this.network,this)}byteLength(t){return super.byteLength(t)+(this.extraPayload?s.varSliceSize(this.extraPayload):0)}toBufferWithExtraPayload(t,e,r=!1){if(t||(t=n.allocUnsafe(this.byteLength(!1))),void 0!==e&&0!==e)throw new Error("not supported");o.Transaction.prototype.__toBuffer.call(this).copy(t);const s=new i.BufferWriter(t,0);return s.writeUInt32(65535&this.version|this.type<<16),this.extraPayload&&(s.offset=o.Transaction.prototype.byteLength.call(this),s.writeVarSlice(this.extraPayload)),t}getHash(t){if(t)throw new Error("invalid argument");return o.crypto.hash256(this.toBuffer())}getPrevoutHash(t){if(!(t&s.UtxoTransaction.SIGHASH_ANYONECANPAY)){const t=new i.BufferWriter(n.allocUnsafe(36*this.ins.length));return this.ins.forEach((function(e){t.writeSlice(e.hash),t.writeUInt32(e.index)})),o.crypto.hash256(t.buffer)}return n.alloc(32,0)}}e.DashTransaction=u,u.DASH_NORMAL=0,u.DASH_PROVIDER_REGISTER=1,u.DASH_PROVIDER_UPDATE_SERVICE=2,u.DASH_PROVIDER_UPDATE_REGISTRAR=3,u.DASH_PROVIDER_UPDATE_REVOKE=4,u.DASH_COINBASE=5,u.DASH_QUORUM_COMMITMENT=6},4284:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DashTransactionBuilder=void 0;const n=r(740),i=r(1207);class o extends n.UtxoTransactionBuilder{constructor(t,e){super(t,e)}createInitialTransaction(t,e){return new i.DashTransaction(t,e)}setType(t){this.tx.type=t}setExtraPayload(t){this.tx.extraPayload=t}static fromTransaction(t,e,r){const i=new o(t.network,n.UtxoTransactionBuilder.fromTransaction(t,e,r));return i.setType(t.type),i.setExtraPayload(t.extraPayload),i}}e.DashTransactionBuilder=o},8648:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(1207),e),i(r(4284),e)},2929:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.nonStandardHalfSigned=e.outputScripts=e.keyutil=void 0,e.keyutil=r(9372),e.outputScripts=r(177),e.nonStandardHalfSigned=r(4317),i(r(1783),e),i(r(757),e),i(r(8277),e),i(r(740),e),i(r(9996),e),i(r(3331),e),i(r(8648),e),i(r(3633),e),i(r(3437),e)},9372:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.privateKeyBufferFromECPair=e.privateKeyBufferToECPair=void 0;const i=r(6314);e.privateKeyBufferToECPair=function(t,e){if(!n.isBuffer(t)||32!==t.length)throw new Error("invalid private key buffer");return i.ECPair.fromPrivateKey(t)},e.privateKeyBufferFromECPair=function(t){if("ECPair"!==t.constructor.name)throw new TypeError("invalid argument ecpair");const e=t.privateKey;if(!n.isBuffer(e))throw new Error("unexpected privkey type");if(32!==e.length)throw new Error("unexpected privkey length");return e}},4317:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.padInputScript=void 0;const i=r(1696),o=r(196),s=r(6736);e.padInputScript=function(t,e){if(![0,1,2].includes(e))throw new Error("invalid signature index: must be one of [0, 1, 2]");let r;if(r=t.witness&&t.witness.length>0?t.witness:s.script.decompile(t.script),!r||3!==r.length)return;const[a,u,c]=r;if(a!==o.OP_0&&(!n.isBuffer(a)||0!==a.length))return;if(!n.isBuffer(c))return;if(s.classify.output(c)!==s.classify.types.P2MS)return;const f=[a,...[0,1,2].map((t=>t===e?u:n.from([]))),c];t.witness.length?(f.forEach((t=>i(n.isBuffer(t)))),t.witness=f):t.script=s.script.compile(f)}},177:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.createSpendScriptP2tr=e.createPaymentP2tr=e.createOutputScript2of3=e.createOutputScriptP2shP2pk=e.scriptType2Of3AsPrevOutType=e.isSupportedScriptType=e.isScriptType2Of3=e.scriptTypes2Of3=e.scriptTypeP2shP2pk=e.scriptTypeForChain=void 0;const i=r(1696),o=r(6314),s=r(6736),a=r(3633);var u=r(3116);function c(t,e){switch(e){case"p2sh":case"p2shP2pk":return!0;case"p2shP2wsh":case"p2wsh":return s.supportsSegwit(t);case"p2tr":return s.supportsTaproot(t)}throw new Error(`unexpected script type ${e}`)}function f(t){if(33===t.length)return t.slice(1);if(32===t.length)return t;throw new Error(`invalid key size ${t.length}`)}function h(t){const[e,r,n]=t.map((t=>f(t)));return[[e,n],[e,r],[r,n]]}function l(t,e){const r=h(t),n=r.map(((t,e)=>o.payments.p2tr_ns({pubkeys:t,weight:0===e?2:1})));return o.payments.p2tr({pubkeys:r[0],redeems:n,redeemIndex:e})}Object.defineProperty(e,"scriptTypeForChain",{enumerable:!0,get:function(){return u.scriptTypeForChain}}),e.scriptTypeP2shP2pk="p2shP2pk",e.scriptTypes2Of3=["p2sh","p2shP2wsh","p2wsh","p2tr"],e.isScriptType2Of3=function(t){return e.scriptTypes2Of3.includes(t)},e.isSupportedScriptType=c,e.scriptType2Of3AsPrevOutType=function(t){switch(t){case"p2sh":return"p2sh-p2ms";case"p2shP2wsh":return"p2sh-p2wsh-p2ms";case"p2wsh":return"p2wsh-p2ms";case"p2tr":return"p2tr-p2ns"}throw new Error(`unsupported script type ${t}`)},e.createOutputScriptP2shP2pk=function(t){const e=o.payments.p2pk({pubkey:t}),r=o.payments.p2sh({redeem:e});if(!r.output||!e.output)throw new Error("invalid state");return{scriptPubKey:r.output,redeemScript:e.output}},e.createOutputScript2of3=function(t,e,r){if(r&&!c(r,e))throw new Error(`unsupported script type ${e} for network`);if(!a.isTriple(t))throw new Error("must provide pubkey triple");if(t.forEach((t=>{if(33!==t.length)throw new Error(`Unexpected key length ${t.length}. Must use compressed keys.`)})),"p2tr"===e)return function(t){const{output:e}=l(t);return i(n.isBuffer(e)),{scriptPubKey:e}}(t);const s=o.payments.p2ms({m:2,pubkeys:t});let u,f,h;switch(i(s.output),e){case"p2sh":f=s,u=o.payments.p2sh({redeem:s});break;case"p2shP2wsh":h=s,f=o.payments.p2wsh({redeem:s}),u=o.payments.p2sh({redeem:f});break;case"p2wsh":h=s,u=o.payments.p2wsh({redeem:h});break;default:throw new Error(`unknown multisig script type ${e}`)}return i(u),i(u.output),{scriptPubKey:u.output,redeemScript:null==f?void 0:f.output,witnessScript:null==h?void 0:h.output}},e.createPaymentP2tr=l,e.createSpendScriptP2tr=function(t,e){const r=h(t),[o,s]=e.map((t=>f(t))),a=r.findIndex((([t,e])=>o.equals(t)&&s.equals(e)||o.equals(e)&&s.equals(t)));if(a<0)throw new Error("could not find redeemIndex for key combination");const u=l(t,a),{controlBlock:c}=u;i(n.isBuffer(c)),i(u.redeem);const p=u.redeem.output;return i(n.isBuffer(p)),{controlBlock:c,witnessScript:p}}},1783:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.signInput2Of3=e.signInputP2shP2pk=e.verifySignatureWithPublicKey=e.verifySignatureWithPublicKeys=e.verifySignature=e.getSignatureVerifications=e.parseSignatureScript2Of3=e.parseSignatureScript=e.getDefaultSigHash=e.isPlaceholderSignature=void 0;const i=r(196),o=r(701),s=r(6314),a=r(8277),u=r(177),c=r(3633),f=r(1816);function h(t,e){switch(f.getMainnet(t)){case f.networks.bitcoincash:case f.networks.bitcoinsv:case f.networks.bitcoingold:return s.Transaction.SIGHASH_ALL|a.UtxoTransaction.SIGHASH_FORKID;default:return"p2tr"===e?s.Transaction.SIGHASH_DEFAULT:s.Transaction.SIGHASH_ALL}}function l(t){const e=t.witness.length>0,r=0===t.script.length;let o,a;if(e?(o=t.witness,a=r?s.classify.witness(o,!0):s.classify.input(t.script,!0)):(a=s.classify.input(t.script,!0),o=s.script.decompile(t.script)),!o)return{scriptType:void 0,isSegwitInput:e,inputClassification:a};if("pubkeyhash"===a){if(!o||2!==o.length)throw new Error("unexpected signature for p2pkh");const[t,r]=o;if(!n.isBuffer(t)||!n.isBuffer(r))throw new Error("unexpected signature for p2pkh");return{scriptType:"p2pkh",isSegwitInput:e,inputClassification:a,signatures:[t],publicKeys:[r],pubScript:s.payments.p2pkh({pubkey:r}).output}}if("taproot"===a){if(4!==t.witness.length)throw new Error("unrecognized taproot input");const[r,i,o,u]=t.witness;if("taprootnofn"!==s.classify.output(o))throw new Error("tapscript must be n of n multisig");const c=s.payments.p2tr_ns({output:o}).pubkeys;if(!c||2!==c.length)throw new Error("expected 2 pubkeys");const f=[r,i].map((t=>{if(n.isBuffer(t))return t;throw new Error(`unexpected signature element ${t}`)})),h=65===u.length?1:97===u.length?2:void 0;if(void 0===h)throw new Error(`unexpected control block length ${u.length}`);return{scriptType:"p2tr",isSegwitInput:e,inputClassification:a,publicKeys:c,signatures:f,pubScript:o,controlBlock:u,scriptPathLevel:h}}if("scripthash"!==a&&"witnessscripthash"!==a)return{scriptType:void 0,isSegwitInput:e,inputClassification:a};const u=o[o.length-1];if(!n.isBuffer(u))throw new Error("invalid pubScript");const f=s.classify.output(u);if("scripthash"===a&&"pubkey"===f)return{scriptType:"p2shP2pk",isSegwitInput:e,inputClassification:a,p2shOutputClassification:f};if("multisig"!==f)return{scriptType:void 0,isSegwitInput:e,inputClassification:a,p2shOutputClassification:f};const h=s.script.decompile(u);if(null===h)throw new Error("could not decompile pubScript");if(4!==o.length&&5!==o.length)return{scriptType:void 0,isSegwitInput:e,inputClassification:a};if(e){if(!n.isBuffer(o[0]))throw new Error("expected decompiledSigScript[0] to be a buffer for segwit inputs");if(0!==o[0].length)throw new Error("witness stack expected to start with empty buffer")}else if(o[0]!==i.OP_0)throw new Error("sigScript expected to start with OP_0");const l=o.slice(1,-1);if(2!==l.length&&3!==l.length)throw new Error(`expected 2 or 3 signatures, got ${l.length}`);if(6!==h.length)throw new Error("unexpected decompiledPubScript length");const p=h.slice(1,-2);if(p.forEach((t=>{if(!n.isBuffer(t))throw new Error})),!c.isTriple(p))throw new Error(`expected 3 public keys, got ${p.length}`);const d=h.length,g=h[0]-80;if(2!==g)throw new Error(`expected signatureThreshold 2, got ${g}`);const y=h[d-2]-80;if(3!==y)throw new Error(`expected nPubKeys 3, got ${y}`);const b=h[d-1];if(b!==i.OP_CHECKMULTISIG)throw new Error(`expected opcode #${i.OP_CHECKMULTISIG}, got opcode #${b}`);const m=t.witness.length?t.script.length?"p2shP2wsh":"p2wsh":t.script.length?"p2sh":void 0;if(void 0===m)throw new Error("illegal state");return{scriptType:m,isSegwitInput:e,inputClassification:a,p2shOutputClassification:f,signatures:l.map((t=>{if(n.isBuffer(t)||0===t)return t;throw new Error(`unexpected signature element ${t}`)})),publicKeys:p,pubScript:u}}function p(t){const e=l(t);if(![s.classify.types.P2WSH,s.classify.types.P2SH,s.classify.types.P2PKH,s.classify.types.P2TR].includes(e.inputClassification))throw new Error(`unexpected inputClassification ${e.inputClassification}`);if(!e.signatures)throw new Error("missing signatures");if(3!==e.publicKeys.length&&(2!==e.publicKeys.length||e.inputClassification!==s.classify.types.P2TR))throw new Error("unexpected pubkey count");if(!e.pubScript||0===e.pubScript.length)throw new Error("pubScript missing or empty");return e}function d(t,e,r,i={},a){if(!t.ins)throw new Error("invalid transaction");const u=t.ins[e];if(!u)throw new Error(`no input at index ${e}`);if((!u.script||0===u.script.length)&&0===u.witness.length)return[];const c=p(u),f=c.signatures.filter((t=>t&&t.length)).filter(((t,e)=>void 0===i.signatureIndex||i.signatureIndex===e)),h=c.publicKeys.filter((t=>void 0===i.publicKey||i.publicKey.equals(t)||i.publicKey.slice(1).equals(t)));return f.map((u=>{if(0===u||0===u.length)return{signedBy:void 0};let f=s.Transaction.SIGHASH_DEFAULT;if(65===u.length&&(f=u[u.length-1],u=u.slice(0,-1)),c.inputClassification===s.classify.types.P2TR){if(void 0!==i.signatureIndex)throw new Error("signatureIndex parameter not supported for p2tr");if(!a)throw new Error("prevOutputs not set");if(a.length!==t.ins.length)throw new Error(`prevOutputs length ${a.length}, expected ${t.ins.length}`);const{controlBlock:r,pubScript:o}=c;if(!r)throw new Error("expected controlBlock");const l=s.taproot.getTapleafHash(r,o),p=t.hashForWitnessV1(e,a.map((({script:t})=>t)),a.map((({value:t})=>t)),f,l),d=h.filter((t=>n.isBuffer(u)&&s.schnorrBip340.verifySchnorr(p,t,u)));if(0===d.length)return{signedBy:void 0};if(1===d.length)return{signedBy:d[0]};throw new Error("illegal state: signed by multiple public keys")}{const{signature:n,hashType:i}=s.ScriptSignature.decode(u),a=c.isSegwitInput?t.hashForWitnessV0(e,c.pubScript,r,i):t.hashForSignatureByNetwork(e,c.pubScript,r,i),f=h.filter((t=>o.verify(a,t,n,!0)));if(0===f.length)return{signedBy:void 0};if(1===f.length)return{signedBy:f[0]};throw new Error("illegal state: signed by multiple public keys")}}))}function g(t,e){return!!t.signedBy&&(t.signedBy.equals(e)||33===e.length&&g(t,e.slice(1)))}function y(t,e,r,n){if(t.ins.length!==r.length)throw new Error("input length must match prevOutputs length");const i=d(t,e,r[e].value,{},r);return n.map((t=>!!i.find((e=>g(e,t)))))}e.isPlaceholderSignature=function(t){return n.isBuffer(t)?0===t.length:0===t},e.getDefaultSigHash=h,e.parseSignatureScript=l,e.parseSignatureScript2Of3=p,e.getSignatureVerifications=d,e.verifySignature=function(t,e,r,n={},i){const o=d(t,e,r,n,i).filter((t=>void 0===n.publicKey||void 0!==t.signedBy&&(n.publicKey.equals(t.signedBy)||n.publicKey.slice(1).equals(t.signedBy))));return o.length>0&&o.every((t=>void 0!==t.signedBy))},e.verifySignatureWithPublicKeys=y,e.verifySignatureWithPublicKey=function(t,e,r,n){return y(t,e,r,[n])[0]},e.signInputP2shP2pk=function(t,e,r){const{redeemScript:n,witnessScript:i}=u.createOutputScriptP2shP2pk(r.publicKey);r.network=t.network,t.sign({vin:e,prevOutScriptType:"p2sh-p2pk",keyPair:r,hashType:h(t.network),redeemScript:n,witnessScript:i,witnessValue:void 0})},e.signInput2Of3=function(t,e,r,n,i,o,s){let a,c,f;const l=u.scriptType2Of3AsPrevOutType(r);"p2tr"===r?({witnessScript:f,controlBlock:a}=u.createSpendScriptP2tr(n,[i.publicKey,o])):({redeemScript:c,witnessScript:f}=u.createOutputScript2of3(n,r)),i.network=t.network,t.sign({vin:e,prevOutScriptType:l,keyPair:i,hashType:h(t.network,r),redeemScript:c,witnessScript:f,witnessValue:s,controlBlock:a})}},757:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.createTransactionBuilderFromTransaction=e.createTransactionBuilderForNetwork=e.setTransactionBuilderDefaults=e.getDefaultTransactionVersion=e.createTransactionFromHex=e.createTransactionFromBuffer=void 0;const i=r(1816),o=r(8277),s=r(740),a=r(1207),u=r(4284),c=r(9454),f=r(8140);function h(t,e,{version:r}={}){switch(i.getMainnet(e)){case i.networks.bitcoin:case i.networks.bitcoincash:case i.networks.bitcoinsv:case i.networks.bitcoingold:case i.networks.litecoin:return o.UtxoTransaction.fromBuffer(t,!1,e);case i.networks.dash:return a.DashTransaction.fromBuffer(t,!1,e);case i.networks.zcash:return f.ZcashTransaction.fromBufferWithVersion(t,e,r)}throw new Error("invalid network")}function l(t){switch(i.getMainnet(t)){case i.networks.bitcoincash:case i.networks.bitcoinsv:case i.networks.bitcoingold:return 2;case i.networks.zcash:return f.ZcashTransaction.VERSION4_BRANCH_NU5;default:return 1}}function p(t,e,{version:r=l(e)}={}){switch(i.getMainnet(e)){case i.networks.bitcoincash:case i.networks.bitcoinsv:case i.networks.bitcoingold:if(2!==r)throw new Error("invalid version");t.setVersion(r);break;case i.networks.zcash:t.setDefaultsForVersion(e,r);break;default:if(1!==r)throw new Error("invalid version")}}e.createTransactionFromBuffer=h,e.createTransactionFromHex=function(t,e){return h(n.from(t,"hex"),e)},e.getDefaultTransactionVersion=l,e.setTransactionBuilderDefaults=p,e.createTransactionBuilderForNetwork=function(t,{version:e}={}){let r;switch(i.getMainnet(t)){case i.networks.bitcoin:case i.networks.bitcoincash:case i.networks.bitcoinsv:case i.networks.bitcoingold:case i.networks.litecoin:r=new s.UtxoTransactionBuilder(t);break;case i.networks.dash:r=new u.DashTransactionBuilder(t);break;case i.networks.zcash:r=new c.ZcashTransactionBuilder(t);break;default:throw new Error("unsupported network")}return p(r,t,{version:e}),r},e.createTransactionBuilderFromTransaction=function(t,e){switch(i.getMainnet(t.network)){case i.networks.bitcoin:case i.networks.bitcoincash:case i.networks.bitcoinsv:case i.networks.bitcoingold:case i.networks.litecoin:return s.UtxoTransactionBuilder.fromTransaction(t,void 0,e);case i.networks.dash:return u.DashTransactionBuilder.fromTransaction(t,void 0,e);case i.networks.zcash:return c.ZcashTransactionBuilder.fromTransaction(t,void 0,e)}throw new Error("invalid network")}},3633:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isTriple=e.isTuple=void 0,e.isTuple=function(t){return 2===t.length},e.isTriple=function(t){return 3===t.length}},3769:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.verifySignatureWithUnspent=e.signInputWithUnspent=e.isWalletUnspent=void 0;const n=r(177),i=r(880),o=r(1783),s=r(9996);function a(t){return void 0!==t.chain}e.isWalletUnspent=a,e.signInputWithUnspent=function(t,e,r,s){const{walletKeys:a,signer:u,cosigner:c}=s.deriveForChainAndIndex(r.chain,r.index),f=n.scriptTypeForChain(r.chain),h=n.createOutputScript2of3(a.publicKeys,f).scriptPubKey,l=i.toOutputScript(r.address,t.network);if(!h.equals(l))throw new Error(`pubscript mismatch: expected ${l.toString("hex")} got ${h.toString("hex")}`);o.signInput2Of3(t,e,f,a.publicKeys,u,c.publicKey,r.value)},e.verifySignatureWithUnspent=function(t,e,r,n){if(t.ins.length!==r.length)throw new Error("input length must match unspents length");const i=r[e];return a(i)?o.verifySignatureWithPublicKeys(t,e,r.map((e=>s.toOutput(e,t.network))),n.deriveForChainAndIndex(i.chain,i.index).publicKeys):[!1,!1,!1]}},8987:(t,e)=>{"use strict";function r(t,e){return t.publicKey.equals(e.publicKey)}Object.defineProperty(e,"__esModule",{value:!0}),e.RootWalletKeys=e.DerivedWalletKeys=e.WalletKeys=e.eqPublicKey=void 0,e.eqPublicKey=r;class n{constructor(t){this.triple=t,t.forEach(((e,n)=>{t.forEach(((t,i)=>{if(r(e,t)&&n!==i)throw new Error("wallet keys must be distinct")}))})),this.publicKeys=this.triple.map((t=>t.publicKey))}get user(){return this.triple[0]}get backup(){return this.triple[1]}get bitgo(){return this.triple[2]}}e.WalletKeys=n;class i extends n{constructor(t,e){super(t.triple.map(((t,r)=>t.derivePath(e[r])))),this.parent=t,this.paths=e}}e.DerivedWalletKeys=i;class o extends n{constructor(t,e=[o.defaultPrefix,o.defaultPrefix,o.defaultPrefix]){super(t),this.derivationPrefixes=e,e.forEach((t=>{if(t.startsWith("/")||t.endsWith("/"))throw new Error("derivation prefix must not start or end with a slash")}))}getDerivationPath(t,e,n){if(!this.derivationPrefixes)throw new Error("no derivation prefixes");const i=this.derivationPrefixes.find(((e,n)=>r(t,this.triple[n])));if(void 0===i)throw new Error("key not in walletKeys");return`${i}/${e}/${n}`}deriveForChainAndIndex(t,e){return new i(this,this.triple.map((r=>this.getDerivationPath(r,t,e))))}}e.RootWalletKeys=o,o.defaultPrefix="0/0"},8248:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getWalletAddress=e.getWalletOutputScripts=void 0;const n=r(6736),i=r(2929),o=r(177);function s(t,e,r){return i.outputScripts.createOutputScript2of3(t.deriveForChainAndIndex(e,r).publicKeys,o.scriptTypeForChain(e))}e.getWalletOutputScripts=s,e.getWalletAddress=function(t,e,r,i){return n.address.fromOutputScript(s(t,e,r).scriptPubKey,i)}},4610:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.WalletUnspentSigner=void 0;const n=r(8987);class i{constructor(t,e,r){if(this.signer=e,this.cosigner=r,Array.isArray(t)&&(t=new n.RootWalletKeys(t)),!t.triple.some((t=>n.eqPublicKey(t,e))))throw new Error("signer not part of walletKeys");if(!t.triple.some((t=>n.eqPublicKey(t,r))))throw new Error("cosigner not part of walletKeys");if(this.walletKeys=t,n.eqPublicKey(e,r))throw new Error("signer must not equal cosigner");if(e.isNeutered())throw new Error("signer must have private key")}static from(t,e,r){return new i(t,e,r)}deriveForChainAndIndex(t,e){if(this.walletKeys instanceof n.DerivedWalletKeys)throw new Error("cannot derive again from DerivedWalletKeys");if(this.walletKeys instanceof n.RootWalletKeys)return new i(this.walletKeys.deriveForChainAndIndex(t,e),this.signer.derivePath(this.walletKeys.getDerivationPath(this.signer,t,e)),this.cosigner.derivePath(this.walletKeys.getDerivationPath(this.cosigner,t,e)));throw new Error("invalid state")}}e.WalletUnspentSigner=i},3116:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isInternalChainCode=e.isExternalChainCode=e.getInternalChainCode=e.getExternalChainCode=e.scriptTypeForChain=e.toChainPair=e.isChainCode=e.chainCodes=e.chainCodesP2tr=e.chainCodesP2wsh=e.chainCodesP2shP2wsh=e.chainCodesP2sh=void 0,e.chainCodesP2sh=[0,1],e.chainCodesP2shP2wsh=[10,11],e.chainCodesP2wsh=[20,21],e.chainCodesP2tr=[30,31],e.chainCodes=[...e.chainCodesP2sh,...e.chainCodesP2shP2wsh,...e.chainCodesP2wsh,...e.chainCodesP2tr],e.isChainCode=function(t){return e.chainCodes.includes(t)};const r=new Map([["p2sh",e.chainCodesP2sh],["p2shP2wsh",e.chainCodesP2shP2wsh],["p2wsh",e.chainCodesP2wsh],["p2tr",e.chainCodesP2tr]].map((([t,e])=>[t,Object.freeze(e)]))),n=[...r.values()];function i(t){let e;if(Array.isArray(t)&&n.includes(t)&&(e=t),"string"==typeof t&&(e=r.get(t)),"number"==typeof t&&(e=n.find((e=>e.includes(t)))),!e)throw new Error(`no pair for input ${t}`);return e}e.toChainPair=i,e.scriptTypeForChain=function(t){for(const[e,n]of r.entries())if(n.includes(t))return e;throw new Error(`invalid chain ${t}`)},e.getExternalChainCode=function(t){return i(t)[0]},e.getInternalChainCode=function(t){return i(t)[1]},e.isExternalChainCode=function(t){return 0===i(t).indexOf(t)},e.isInternalChainCode=function(t){return 1===i(t).indexOf(t)}},3437:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(3116),e),i(r(3769),e),i(r(4610),e),i(r(8248),e),i(r(8987),e)},2167:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.toBufferV5=e.toBufferV4=e.writeOutputs=e.writeInputs=e.fromBufferV5=e.fromBufferV4=e.writeEmptySamplingBundle=e.readEmptySaplingBundle=e.writeEmptyOrchardBundle=e.readEmptyOrchardBundle=e.readEmptyVector=e.readOutputs=e.readInputs=e.VALUE_INT64_ZERO=void 0;const i=r(8140);function o(t){const e=t.readVarInt(),r=[];for(let n=0;n<e;++n)r.push({hash:t.readSlice(32),index:t.readUInt32(),script:t.readVarSlice(),sequence:t.readUInt32(),witness:[]});return r}function s(t){const e=t.readVarInt(),r=[];for(let n=0;n<e;++n)r.push({value:t.readUInt64(),script:t.readVarSlice()});return r}function a(t){if(0!==t.readVarInt())throw new i.UnsupportedTransactionError("expected empty vector")}function u(t){if(0!==t.readUInt8())throw new i.UnsupportedTransactionError("expected byte 0x00")}function c(t){t.writeUInt8(0)}function f(t){a(t),a(t)}function h(t){t.writeVarInt(0),t.writeVarInt(0)}function l(t,e){t.writeVarInt(e.length),e.forEach((function(e){t.writeSlice(e.hash),t.writeUInt32(e.index),t.writeVarSlice(e.script),t.writeUInt32(e.sequence)}))}function p(t,e){t.writeVarInt(e.length),e.forEach((function(e){e.valueBuffer?t.writeSlice(e.valueBuffer):t.writeUInt64(e.value),t.writeVarSlice(e.script)}))}e.VALUE_INT64_ZERO=n.from("0000000000000000","hex"),e.readInputs=o,e.readOutputs=s,e.readEmptyVector=a,e.readEmptyOrchardBundle=u,e.writeEmptyOrchardBundle=c,e.readEmptySaplingBundle=f,e.writeEmptySamplingBundle=h,e.fromBufferV4=function(t,r){if(r.ins=o(t),r.outs=s(t),r.locktime=t.readUInt32(),r.isOverwinterCompatible()&&(r.expiryHeight=t.readUInt32()),r.isSaplingCompatible()){if(!t.readSlice(8).equals(e.VALUE_INT64_ZERO))throw new i.UnsupportedTransactionError("valueBalance must be zero");f(t)}r.supportsJoinSplits()&&a(t)},e.fromBufferV5=function(t,e){e.consensusBranchId=t.readUInt32(),e.locktime=t.readUInt32(),e.expiryHeight=t.readUInt32(),e.ins=o(t),e.outs=s(t),f(t),u(t)},e.writeInputs=l,e.writeOutputs=p,e.toBufferV4=function(t,r){l(t,r.ins),p(t,r.outs),t.writeUInt32(r.locktime),r.isOverwinterCompatible()&&t.writeUInt32(r.expiryHeight),r.isSaplingCompatible()&&(t.writeSlice(e.VALUE_INT64_ZERO),t.writeVarInt(0),t.writeVarInt(0)),r.supportsJoinSplits()&&t.writeVarInt(0)},e.toBufferV5=function(t,e){t.writeUInt32(e.consensusBranchId),t.writeUInt32(e.locktime),t.writeUInt32(e.expiryHeight),l(t,e.ins),p(t,e.outs),h(t),c(t)}},8140:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.ZcashTransaction=e.getDefaultConsensusBranchIdForVersion=e.getDefaultVersionGroupIdForVersion=e.UnsupportedTransactionError=void 0;const i=r(6314),o=r(6168),s=r(9359),a=r(8595),u=r(9031),c=r(8277),f=r(2167),h=r(9772),l=n.from("0000000000000000000000000000000000000000000000000000000000000000","hex");class p extends Error{constructor(t){super(t)}}function d(t,e){switch(e){case 1:case 2:return 0;case 3:return 1537743641;case g.VERSION4_BRANCH_CANOPY:return 3925833126;case 4:case 5:case g.VERSION4_BRANCH_NU5:case g.VERSION5_BRANCH_NU5:return 3268858036}throw new Error(`no value for version ${e}`)}e.UnsupportedTransactionError=p,e.getDefaultVersionGroupIdForVersion=function(t){switch(t){case 400:case 450:return 2301567109;case 500:return 648488714}throw new Error(`no value for version ${t}`)},e.getDefaultConsensusBranchIdForVersion=d;class g extends c.UtxoTransaction{constructor(t,e){let r;super(t,e),this.network=t,this.overwintered=0,this.versionGroupId=0,this.expiryHeight=0,e&&(this.overwintered=e.overwintered,this.versionGroupId=e.versionGroupId,this.expiryHeight=e.expiryHeight,void 0!==e.consensusBranchId&&(r=e.consensusBranchId)),this.consensusBranchId=null!=r?r:d(0,this.version)}static fromBuffer(t,e,r){if(!r)throw new Error("must provide network");const n=new s.BufferReader(t),i=new g(r);if(i.version=n.readInt32(),i.overwintered=i.version>>>31,i.version=2147483647&i.version,i.consensusBranchId=d(0,i.version),i.isOverwinterCompatible()&&(i.versionGroupId=n.readUInt32()),5===i.version?f.fromBufferV5(n,i):f.fromBufferV4(n,i),e)return i;if(n.offset!==t.length){const e=t.slice(n.offset);throw new Error(`Unexpected trailing bytes: ${e.toString("hex")}`)}return i}static fromBufferWithVersion(t,e,r){const n=g.fromBuffer(t,!1,e);return r&&(n.consensusBranchId=d(0,r)),n}byteLength(){let t=super.byteLength();this.isOverwinterCompatible()&&(t+=4),this.isOverwinterCompatible()&&(t+=4);const e=a.encodingLength(0);return 5===this.version?(t+=4,t+=e,t+=e,t+=1):(this.isSaplingCompatible()&&(t+=8,t+=e,t+=e),this.supportsJoinSplits()&&(t+=e)),t}isSaplingCompatible(){return!!this.overwintered&&this.version>=g.VERSION_SAPLING}isOverwinterCompatible(){return!!this.overwintered&&this.version>=g.VERSION_OVERWINTER}supportsJoinSplits(){return!!this.overwintered&&this.version>=g.VERSION_JOINSPLITS_SUPPORT}getPrevoutHash(t){if(!(t&i.Transaction.SIGHASH_ANYONECANPAY)){const t=new s.BufferWriter(n.allocUnsafe(36*this.ins.length));return this.ins.forEach((function(e){t.writeSlice(e.hash),t.writeUInt32(e.index)})),h.getBlake2bHash(t.buffer,"ZcashPrevoutHash")}return l}getSequenceHash(t){if(!(t&i.Transaction.SIGHASH_ANYONECANPAY)&&(31&t)!==i.Transaction.SIGHASH_SINGLE&&(31&t)!==i.Transaction.SIGHASH_NONE){const t=new s.BufferWriter(n.allocUnsafe(4*this.ins.length));return this.ins.forEach((function(e){t.writeUInt32(e.sequence)})),h.getBlake2bHash(t.buffer,"ZcashSequencHash")}return l}getOutputsHash(t,e){if((31&t)!==i.Transaction.SIGHASH_SINGLE&&(31&t)!==i.Transaction.SIGHASH_NONE){const t=this.outs.reduce((function(t,e){return t+8+c.varSliceSize(e.script)}),0),e=new s.BufferWriter(n.allocUnsafe(t));return this.outs.forEach((function(t){e.writeUInt64(t.value),e.writeVarSlice(t.script)})),h.getBlake2bHash(e.buffer,"ZcashOutputsHash")}if((31&t)===i.Transaction.SIGHASH_SINGLE&&e<this.outs.length){const t=this.outs[e],r=new s.BufferWriter(n.allocUnsafe(8+c.varSliceSize(t.script)));return r.writeUInt64(t.value),r.writeVarSlice(t.script),h.getBlake2bHash(r.buffer,"ZcashOutputsHash")}return l}hashForSignatureByNetwork(t,e,r,i){if(5===this.version)return h.getSignatureDigest(this,t,e,r,i);if(u(o.tuple(o.UInt32,o.Buffer,o.Number),arguments),void 0===t)throw new Error("invalid inIndex");if(t>=this.ins.length)throw new Error("Input index is out of range");if(!this.isOverwinterCompatible())throw new Error(`unsupported version ${this.version}`);const a=this.getPrevoutHash(i),p=this.getSequenceHash(i),d=this.getOutputsHash(i,t),g=l,y=l,b=l;let m=0;m+=20,m+=128,m+=8,m+=8,m+=32,m+=c.varSliceSize(e),this.isSaplingCompatible()&&(m+=64,m+=8);const v=this.overwintered?1:0,w=this.version|v<<31,_=new s.BufferWriter(n.alloc(m));_.writeInt32(w),_.writeUInt32(this.versionGroupId),_.writeSlice(a),_.writeSlice(p),_.writeSlice(d),_.writeSlice(g),this.isSaplingCompatible()&&(_.writeSlice(y),_.writeSlice(b)),_.writeUInt32(this.locktime),_.writeUInt32(this.expiryHeight),this.isSaplingCompatible()&&_.writeSlice(f.VALUE_INT64_ZERO),_.writeInt32(i);const A=this.ins[t];_.writeSlice(A.hash),_.writeUInt32(A.index),_.writeVarSlice(e),_.writeUInt64(r),_.writeUInt32(A.sequence);const E=n.alloc(16),S="ZcashSigHash";return E.write(S),E.writeUInt32LE(this.consensusBranchId,S.length),h.getBlake2bHash(_.buffer,E)}toBuffer(t,e=0){t||(t=n.allocUnsafe(this.byteLength()));const r=new s.BufferWriter(t,e);if(this.isOverwinterCompatible()){const t=this.overwintered?1:0;r.writeInt32(this.version|t<<31),r.writeUInt32(this.versionGroupId)}else r.writeInt32(this.version);return 5===this.version?f.toBufferV5(r,this):f.toBufferV4(r,this),void 0!==e?t.slice(e,r.offset):t}getHash(t){if(t)throw new Error("invalid argument");return 5===this.version?h.getTxidDigest(this):i.crypto.hash256(this.toBuffer())}clone(){return new g(this.network,this)}}e.ZcashTransaction=g,g.VERSION_JOINSPLITS_SUPPORT=2,g.VERSION_OVERWINTER=3,g.VERSION_SAPLING=4,g.VERSION4_BRANCH_CANOPY=400,g.VERSION4_BRANCH_NU5=450,g.VERSION5_BRANCH_NU5=500},9454:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ZcashTransactionBuilder=void 0;const n=r(6168),i=r(9031),o=r(8140),s=r(740),a=r(4658);class u extends s.UtxoTransactionBuilder{constructor(t){super(t)}createInitialTransaction(t,e){return new o.ZcashTransaction(t,e)}static fromTransaction(t,e,r){const n=new u(t.network);return n.setVersion(t.version,!!t.overwintered),n.setLockTime(t.locktime),n.tx.isOverwinterCompatible()&&(n.setVersionGroupId(t.versionGroupId),n.setExpiryHeight(t.expiryHeight)),n.setConsensusBranchId(t.consensusBranchId),t.outs.forEach((function(t){n.addOutput(t.script,t.value)})),t.ins.forEach((function(t){n.__addInputUnsafe(t.hash,t.index,{sequence:t.sequence,script:t.script,witness:t.witness,value:t.value})})),n}setVersion(t,e=!0){i(n.UInt32,t),this.tx.overwintered=e?1:0,this.tx.version=t}setDefaultsForVersion(t,e){switch(e){case 4:case o.ZcashTransaction.VERSION4_BRANCH_CANOPY:case o.ZcashTransaction.VERSION4_BRANCH_NU5:this.setVersion(4);break;case 5:case o.ZcashTransaction.VERSION5_BRANCH_NU5:this.setVersion(5);break;default:throw new Error(`invalid version ${e}`)}this.tx.versionGroupId=o.getDefaultVersionGroupIdForVersion(e),this.tx.consensusBranchId=o.getDefaultConsensusBranchIdForVersion(t,e)}hasSignatures(){return this.__INPUTS.some((function(t){return void 0!==t.signatures}))}setPropertyCheckSignatures(t,e){if(this.tx[t]!==e){if(this.hasSignatures())throw new Error(`Changing property ${t} for a partially signed transaction would invalidate signatures`);this.tx[t]=e}}setConsensusBranchId(t){i(n.UInt32,t),this.setPropertyCheckSignatures("consensusBranchId",t)}setVersionGroupId(t){i(n.UInt32,t),this.setPropertyCheckSignatures("versionGroupId",t)}setExpiryHeight(t){i(n.UInt32,t),this.setPropertyCheckSignatures("expiryHeight",t)}build(){return super.build()}buildIncomplete(){return super.buildIncomplete()}addOutput(t,e){return"string"==typeof t&&(t=a.toOutputScript(t,this.network)),super.addOutput(t,e)}}e.ZcashTransactionBuilder=u},4658:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.toOutputScript=e.fromOutputScript=e.toBase58Check=e.fromBase58Check=void 0;const i=r(1696),o=r(6314),s=r(6168),a=r(1816),u=r(4075),c=r(9031);function f(t){const e=u.decode(t);return{version:e.readUInt16BE(0),hash:e.slice(2)}}function h(t,e){c(s.tuple(s.Hash160bit,s.Number),arguments);const r=n.allocUnsafe(22);return r.writeUInt16BE(e,0),t.copy(r,2),u.encode(r)}e.fromBase58Check=f,e.toBase58Check=h,e.fromOutputScript=function(t,e){let r,n;i(a.isZcash(e));try{r=o.payments.p2pkh({output:t}),n=e.pubKeyHash}catch(t){}try{r=o.payments.p2sh({output:t}),n=e.scriptHash}catch(t){}if(!r||!r.hash||void 0===n)throw new Error("unsupported outputScript");return h(r.hash,n)},e.toOutputScript=function(t,e){i(a.isZcash(e));const{version:r,hash:n}=f(t);if(r===e.pubKeyHash)return o.payments.p2pkh({hash:n}).output;if(r===e.scriptHash)return o.payments.p2sh({hash:n}).output;throw new Error(t+" has no matching Script")}},9772:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.getSignatureDigest=e.getTxidDigest=e.getOutputsDigest=e.getSequenceDigest=e.getPrevoutsDigest=e.getBlake2bHash=void 0;const i=r(6314),o=r(9359),s=r(1213),a=r(8277);function u(t,e){const r=n.allocUnsafe(32);return e=n.from(e),s(r.length,null,null,e).update(t).digest(r)}function c(t,e="ZTxIdPrevoutHash",r){if(r&&r.hashType&i.Transaction.SIGHASH_ANYONECANPAY)return c([]);const s=new o.BufferWriter(n.allocUnsafe(36*t.length));return t.forEach((function(t){s.writeSlice(t.hash),s.writeUInt32(t.index)})),u(s.end(),e)}function f(t,e="ZTxIdSequencHash",r){if(r){const{hashType:t}=r;if(t&i.Transaction.SIGHASH_ANYONECANPAY||(31&t)===i.Transaction.SIGHASH_SINGLE||(31&t)===i.Transaction.SIGHASH_NONE)return f([])}const s=new o.BufferWriter(n.allocUnsafe(4*t.length));return t.forEach((function(t){s.writeUInt32(t.sequence)})),u(s.end(),e)}function h(t,e="ZTxIdOutputsHash",r){if(r){let{hashType:n}=r;if(n&=31,n===i.Transaction.SIGHASH_SINGLE){if(void 0===r.inIndex)throw new Error;return void 0===t[r.inIndex]?h(t):h([t[r.inIndex]])}return n===i.Transaction.SIGHASH_NONE?h([]):h(t,e)}const s=t.reduce((function(t,e){return t+8+a.varSliceSize(e.script)}),0),c=new o.BufferWriter(n.allocUnsafe(s));return t.forEach((function(t){c.writeUInt64(t.value),c.writeVarSlice(t.script)})),u(c.end(),e)}function l(t,e){if(e&&void 0===e.inIndex)return l(t);let r;if(t.ins.length||t.outs.length){const n=o.BufferWriter.withCapacity(32*(e?4:3));if(n.writeSlice(c(t.ins,void 0,e)),n.writeSlice(f(t.ins,void 0,e)),n.writeSlice(h(t.outs,void 0,e)),e){if(void 0===e.inIndex)throw new Error;n.writeSlice(function(t,e){const r=o.BufferWriter.withCapacity(36+a.varSliceSize(e.prevOutScript)+8+4);return r.writeSlice(t.hash),r.writeUInt32(t.index),r.writeVarSlice(e.prevOutScript),r.writeUInt64(e.value),r.writeUInt32(t.sequence),u(r.end(),"Zcash___TxInHash")}(t.ins[e.inIndex],e))}r=n.end()}else r=n.of();return u(r,"ZTxIdTranspaHash")}function p(t,e){const r=o.BufferWriter.withCapacity(128);r.writeSlice(function(t){const e=t.overwintered?1:0,r=o.BufferWriter.withCapacity(20);return r.writeInt32(t.version|e<<31),r.writeUInt32(t.versionGroupId),r.writeUInt32(t.consensusBranchId),r.writeUInt32(t.locktime),r.writeUInt32(t.expiryHeight),u(r.end(),"ZTxIdHeadersHash")}(t)),r.writeSlice(l(t,e)),r.writeSlice(u(n.of(),"ZTxIdSaplingHash")),r.writeSlice(u(n.of(),"ZTxIdOrchardHash"));const i="ZcashTxHash_",s=o.BufferWriter.withCapacity(i.length+4);return s.writeSlice(n.from(i)),s.writeUInt32(t.consensusBranchId),u(r.end(),s.end())}e.getBlake2bHash=u,e.getPrevoutsDigest=c,e.getSequenceDigest=f,e.getOutputsDigest=h,e.getTxidDigest=function(t){return p(t)},e.getSignatureDigest=function(t,e,r,n,i){return p(t,{inIndex:e,prevOutScript:r,value:n,hashType:i})}},3331:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(8140),e),i(r(9454),e)},6736:function(t,e,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.supportsSegwit=e.supportsTaproot=e.isTestnet=e.isMainnet=e.getTestnet=e.getMainnet=e.getNetworkName=e.isValidNetwork=e.getNetworkList=e.networks=e.addressFormat=e.address=e.bitgo=void 0,i(r(6314),e),e.bitgo=r(2929),e.address=r(880),e.addressFormat=r(2371);var o=r(1816);Object.defineProperty(e,"networks",{enumerable:!0,get:function(){return o.networks}}),Object.defineProperty(e,"getNetworkList",{enumerable:!0,get:function(){return o.getNetworkList}}),Object.defineProperty(e,"isValidNetwork",{enumerable:!0,get:function(){return o.isValidNetwork}}),Object.defineProperty(e,"getNetworkName",{enumerable:!0,get:function(){return o.getNetworkName}}),Object.defineProperty(e,"getMainnet",{enumerable:!0,get:function(){return o.getMainnet}}),Object.defineProperty(e,"getTestnet",{enumerable:!0,get:function(){return o.getTestnet}}),Object.defineProperty(e,"isMainnet",{enumerable:!0,get:function(){return o.isMainnet}}),Object.defineProperty(e,"isTestnet",{enumerable:!0,get:function(){return o.isTestnet}}),Object.defineProperty(e,"supportsTaproot",{enumerable:!0,get:function(){return o.supportsTaproot}}),Object.defineProperty(e,"supportsSegwit",{enumerable:!0,get:function(){return o.supportsSegwit}})},1816:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.supportsTaproot=e.supportsSegwit=e.isValidNetwork=e.isZcash=e.isLitecoin=e.isDash=e.isBitcoinSV=e.isBitcoinGold=e.isBitcoinCash=e.isBitcoin=e.getTestnet=e.isSameCoin=e.isTestnet=e.isMainnet=e.getMainnet=e.getNetworkName=e.getNetworkList=e.networks=void 0;const r="dash";function n(){return Object.values(e.networks)}function i(t){return Object.keys(e.networks).find((r=>e.networks[r]===t))}function o(t){switch(t){case e.networks.bitcoin:case e.networks.testnet:return e.networks.bitcoin;case e.networks.bitcoincash:case e.networks.bitcoincashTestnet:return e.networks.bitcoincash;case e.networks.bitcoingold:case e.networks.bitcoingoldTestnet:return e.networks.bitcoingold;case e.networks.bitcoinsv:case e.networks.bitcoinsvTestnet:return e.networks.bitcoinsv;case e.networks.dash:case e.networks.dashTest:return e.networks.dash;case e.networks.litecoin:case e.networks.litecoinTest:return e.networks.litecoin;case e.networks.zcash:case e.networks.zcashTest:return e.networks.zcash}throw new TypeError("invalid network")}function s(t){return o(t)===t}function a(t){return o(t)!==t}e.networks={bitcoin:{messagePrefix:"Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128,coin:"btc"},testnet:{messagePrefix:"Bitcoin Signed Message:\n",bech32:"tb",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239,coin:"btc"},bitcoincash:{messagePrefix:"Bitcoin Signed Message:\n",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128,coin:"bch",forkId:0,cashAddr:{prefix:"bitcoincash",pubKeyHash:0,scriptHash:8}},bitcoincashTestnet:{messagePrefix:"Bitcoin Signed Message:\n",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239,coin:"bch",cashAddr:{prefix:"bchtest",pubKeyHash:0,scriptHash:8}},bitcoingold:{messagePrefix:"Bitcoin Gold Signed Message:\n",bech32:"btg",bip32:{public:76067358,private:76066276},pubKeyHash:38,scriptHash:23,wif:128,forkId:79,coin:"btg"},bitcoingoldTestnet:{messagePrefix:"Bitcoin Gold Signed Message:\n",bech32:"tbtg",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239,forkId:79,coin:"btg"},bitcoinsv:{messagePrefix:"Bitcoin Signed Message:\n",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128,coin:"bsv",forkId:0},bitcoinsvTestnet:{messagePrefix:"Bitcoin Signed Message:\n",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239,coin:"bsv",forkId:0},dash:{messagePrefix:"DarkCoin Signed Message:\n",bip32:{public:76067358,private:76066276},pubKeyHash:76,scriptHash:16,wif:204,coin:r},dashTest:{messagePrefix:"DarkCoin Signed Message:\n",bip32:{public:70617039,private:70615956},pubKeyHash:140,scriptHash:19,wif:239,coin:r},litecoin:{messagePrefix:"Litecoin Signed Message:\n",bech32:"ltc",bip32:{public:76067358,private:76066276},pubKeyHash:48,scriptHash:50,wif:176,coin:"ltc"},litecoinTest:{messagePrefix:"Litecoin Signed Message:\n",bech32:"tltc",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:58,wif:239,coin:"ltc"},zcash:{messagePrefix:"ZCash Signed Message:\n",bip32:{public:76067358,private:76066276},pubKeyHash:7352,scriptHash:7357,wif:128,coin:"zec"},zcashTest:{messagePrefix:"ZCash Signed Message:\n",bip32:{public:70617039,private:70615956},pubKeyHash:7461,scriptHash:7354,wif:239,coin:"zec"}},e.getNetworkList=n,e.getNetworkName=i,e.getMainnet=o,e.isMainnet=s,e.isTestnet=a,e.isSameCoin=function(t,e){return o(t)===o(e)};const u=n().filter(s),c=n().filter(a),f=new Map(u.map((t=>[t,c.filter((e=>o(e)===t))])));e.getTestnet=function(t){if(a(t))return t;const e=f.get(t);if(void 0===e)throw new Error("invalid argument");if(0!==e.length){if(1===e.length)return e[0];throw new Error(`more than one testnet for ${i(t)}`)}},e.isBitcoin=function(t){return o(t)===e.networks.bitcoin},e.isBitcoinCash=function(t){return o(t)===e.networks.bitcoincash},e.isBitcoinGold=function(t){return o(t)===e.networks.bitcoingold},e.isBitcoinSV=function(t){return o(t)===e.networks.bitcoinsv},e.isDash=function(t){return o(t)===e.networks.dash},e.isLitecoin=function(t){return o(t)===e.networks.litecoin},e.isZcash=function(t){return o(t)===e.networks.zcash},e.isValidNetwork=function(t){return n().includes(t)},e.supportsSegwit=function(t){return[e.networks.bitcoin,e.networks.litecoin,e.networks.bitcoingold].includes(o(t))},e.supportsTaproot=function(t){return o(t)===e.networks.bitcoin}},5459:(t,e)=>{"use strict";function r(t){var e=t+48;return e+=9-t>>>8&7,String.fromCharCode(e)}function n(t){var e=t+48;return e+=9-t>>>8&39,String.fromCharCode(e)}Object.defineProperty(e,"__esModule",{value:!0});function i(t){var e=256;return e+=(47-t&t-58)>>8&-256+t-48,(e+=(64-t&t-71)>>8&-256+t-65+10)+((96-t&t-103)>>8&-256+t-97+10)}e.encode=function(t,e){void 0===e&&(e=!1);for(var i=e?n:r,o="",s=0;s<t.length;s++)o+=i(t[s]>>>4),o+=i(15&t[s]);return o},e.decode=function(t){if(0===t.length)return new Uint8Array(0);if(t.length%2!=0)throw new Error("hex: input string must be divisible by two");for(var e=new Uint8Array(t.length/2),r=0,n=0;n<t.length;n+=2){var o=i(t.charCodeAt(n)),s=i(t.charCodeAt(n+1));e[n/2]=o<<4|s,r|=256&o,r|=256&s}if(0!==r)throw new Error("hex: incorrect characters for decoding");return e}},2812:(t,e,r)=>{"use strict";const n=e;n.bignum=r(2197),n.define=r(5192).define,n.base=r(4798),n.constants=r(6906),n.decoders=r(8211),n.encoders=r(9116)},5192:(t,e,r)=>{"use strict";const n=r(9116),i=r(8211),o=r(1285);function s(t,e){this.name=t,this.body=e,this.decoders={},this.encoders={}}e.define=function(t,e){return new s(t,e)},s.prototype._createNamed=function(t){const e=this.name;function r(t){this._initNamed(t,e)}return o(r,t),r.prototype._initNamed=function(e,r){t.call(this,e,r)},new r(this)},s.prototype._getDecoder=function(t){return t=t||"der",this.decoders.hasOwnProperty(t)||(this.decoders[t]=this._createNamed(i[t])),this.decoders[t]},s.prototype.decode=function(t,e,r){return this._getDecoder(e).decode(t,r)},s.prototype._getEncoder=function(t){return t=t||"der",this.encoders.hasOwnProperty(t)||(this.encoders[t]=this._createNamed(n[t])),this.encoders[t]},s.prototype.encode=function(t,e,r){return this._getEncoder(e).encode(t,r)}},7362:(t,e,r)=>{"use strict";const n=r(1285),i=r(126).b,o=r(7654).Buffer;function s(t,e){i.call(this,e),o.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function a(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return a.isEncoderBuffer(t)||(t=new a(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=o.byteLength(t);else{if(!o.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}n(s,i),e.C=s,s.isDecoderBuffer=function(t){return t instanceof s||"object"==typeof t&&o.isBuffer(t.base)&&"DecoderBuffer"===t.constructor.name&&"number"==typeof t.offset&&"number"==typeof t.length&&"function"==typeof t.save&&"function"==typeof t.restore&&"function"==typeof t.isEmpty&&"function"==typeof t.readUInt8&&"function"==typeof t.skip&&"function"==typeof t.raw},s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(t){const e=new s(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,i.prototype.restore.call(this,t.reporter),e},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},s.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");const r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},s.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},e.R=a,a.isEncoderBuffer=function(t){return t instanceof a||"object"==typeof t&&"EncoderBuffer"===t.constructor.name&&"number"==typeof t.length&&"function"==typeof t.join},a.prototype.join=function(t,e){return t||(t=o.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(t,e),e+=r.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):o.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t}},4798:(t,e,r)=>{"use strict";const n=e;n.Reporter=r(126).b,n.DecoderBuffer=r(7362).C,n.EncoderBuffer=r(7362).R,n.Node=r(847)},847:(t,e,r)=>{"use strict";const n=r(126).b,i=r(7362).R,o=r(7362).C,s=r(9561),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function c(t,e,r){const n={};this._baseState=n,n.name=r,n.enc=t,n.parent=e||null,n.children=null,n.tag=null,n.args=null,n.reverseArgs=null,n.choice=null,n.optional=!1,n.any=!1,n.obj=!1,n.use=null,n.useDecoder=null,n.key=null,n.default=null,n.explicit=null,n.implicit=null,n.contains=null,n.parent||(n.children=[],this._wrap())}t.exports=c;const f=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){const t=this._baseState,e={};f.forEach((function(r){e[r]=t[r]}));const r=new this.constructor(e.parent);return r._baseState=e,r},c.prototype._wrap=function(){const t=this._baseState;u.forEach((function(e){this[e]=function(){const r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},c.prototype._init=function(t){const e=this._baseState;s(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),s.equal(e.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(t){const e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(s(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(s(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;const e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);const n=t[r];e[n]=r})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){c.prototype[t]=function(){const e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),a.forEach((function(t){c.prototype[t]=function(){const e=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===e.tag),e.tag=t,this._useArgs(r),this}})),c.prototype.use=function(t){s(t);const e=this._baseState;return s(null===e.use),e.use=t,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(t){const e=this._baseState;return s(null===e.default),e.default=t,e.optional=!0,this},c.prototype.explicit=function(t){const e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.explicit=t,this},c.prototype.implicit=function(t){const e=this._baseState;return s(null===e.explicit&&null===e.implicit),e.implicit=t,this},c.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},c.prototype.key=function(t){const e=this._baseState;return s(null===e.key),e.key=t,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(t){const e=this._baseState;return s(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},c.prototype.contains=function(t){const e=this._baseState;return s(null===e.use),e.contains=t,this},c.prototype._decode=function(t,e){const r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));let n,i=r.default,s=!0,a=null;if(null!==r.key&&(a=t.enterKey(r.key)),r.optional){let n=null;if(null!==r.explicit?n=r.explicit:null!==r.implicit?n=r.implicit:null!==r.tag&&(n=r.tag),null!==n||r.any){if(s=this._peekTag(t,n,r.any),t.isError(s))return s}else{const n=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),s=!0}catch(t){s=!1}t.restore(n)}}if(r.obj&&s&&(n=t.enterObject()),s){if(null!==r.explicit){const e=this._decodeTag(t,r.explicit);if(t.isError(e))return e;t=e}const n=t.offset;if(null===r.use&&null===r.choice){let e;r.any&&(e=t.save());const n=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(n))return n;r.any?i=t.raw(e):t=n}if(e&&e.track&&null!==r.tag&&e.track(t.path(),n,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e)),t.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(t,e)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const n=new o(i);i=this._getUse(r.contains,t._reporterState.obj)._decode(n,e)}}return r.obj&&s&&(i=t.leaveObject(n)),null===r.key||null===i&&!0!==s?null!==a&&t.exitKey(a):t.leaveKey(a,r.key,i),i},c.prototype._decodeGeneric=function(t,e,r){const n=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,n.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&n.args?this._decodeObjid(e,n.args[0],n.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},c.prototype._getUse=function(t,e){const r=this._baseState;return r.useDecoder=this._use(t,e),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(t,e){const r=this._baseState;let n=null,i=!1;return Object.keys(r.choice).some((function(o){const s=t.save(),a=r.choice[o];try{const r=a._decode(t,e);if(t.isError(r))return!1;n={type:o,value:r},i=!0}catch(e){return t.restore(s),!1}return!0}),this),i?n:t.error("Choice not matched")},c.prototype._createEncoderBuffer=function(t){return new i(t,this.reporter)},c.prototype._encode=function(t,e,r){const n=this._baseState;if(null!==n.default&&n.default===t)return;const i=this._encodeValue(t,e,r);return void 0===i||this._skipDefault(i,e,r)?void 0:i},c.prototype._encodeValue=function(t,e,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new n);let o=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}let s=null,a=!1;if(i.any)o=this._createEncoderBuffer(t);else if(i.choice)o=this._encodeChoice(t,e);else if(i.contains)s=this._getUse(i.contains,r)._encode(t,e),a=!0;else if(i.children)s=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");const n=e.enterKey(r._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");const i=r._encode(t[r._baseState.key],e,t);return e.leaveKey(n),i}),this).filter((function(t){return t})),s=this._createEncoderBuffer(s);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,s=this._createEncoderBuffer(t.map((function(r){const n=this._baseState;return this._getUse(n.args[0],t)._encode(r,e)}),r))}else null!==i.use?o=this._getUse(i.use,r)._encode(t,e):(s=this._encodePrimitive(i.tag,t),a=!0);if(!i.any&&null===i.choice){const t=null!==i.implicit?i.implicit:i.tag,r=null===i.implicit?"universal":"context";null===t?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(t,a,r,s))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(t,e){const r=this._baseState,n=r.choice[t.type];return n||s(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(t.value,e)},c.prototype._encodePrimitive=function(t,e){const r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},c.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},c.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)}},126:(t,e,r)=>{"use strict";const n=r(1285);function i(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function o(t,e){this.path=t,this.rethrow(e)}e.b=i,i.prototype.isError=function(t){return t instanceof o},i.prototype.save=function(){const t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},i.prototype.restore=function(t){const e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},i.prototype.enterKey=function(t){return this._reporterState.path.push(t)},i.prototype.exitKey=function(t){const e=this._reporterState;e.path=e.path.slice(0,t-1)},i.prototype.leaveKey=function(t,e,r){const n=this._reporterState;this.exitKey(t),null!==n.obj&&(n.obj[e]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){const t=this._reporterState,e=t.obj;return t.obj={},e},i.prototype.leaveObject=function(t){const e=this._reporterState,r=e.obj;return e.obj=t,r},i.prototype.error=function(t){let e;const r=this._reporterState,n=t instanceof o;if(e=n?t:new o(r.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!r.options.partial)throw e;return n||r.errors.push(e),e},i.prototype.wrapResult=function(t){const e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},n(o,Error),o.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this}},4131:(t,e)=>{"use strict";function r(t){const e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);const n=t[r];e[n]=r})),e}e.tagClass={0:"universal",1:"application",2:"context",3:"private"},e.tagClassByName=r(e.tagClass),e.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},e.tagByName=r(e.tag)},6906:(t,e,r)=>{"use strict";const n=e;n._reverse=function(t){const e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);const n=t[r];e[n]=r})),e},n.der=r(4131)},1066:(t,e,r)=>{"use strict";const n=r(1285),i=r(2197),o=r(7362).C,s=r(847),a=r(4131);function u(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new c,this.tree._init(t.body)}function c(t){s.call(this,"der",t)}function f(t,e){let r=t.readUInt8(e);if(t.isError(r))return r;const n=a.tagClass[r>>6],i=0==(32&r);if(31==(31&r)){let n=r;for(r=0;128==(128&n);){if(n=t.readUInt8(e),t.isError(n))return n;r<<=7,r|=127&n}}else r&=31;return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function h(t,e,r){let n=t.readUInt8(r);if(t.isError(n))return n;if(!e&&128===n)return null;if(0==(128&n))return n;const i=127&n;if(i>4)return t.error("length octect is too long");n=0;for(let e=0;e<i;e++){n<<=8;const e=t.readUInt8(r);if(t.isError(e))return e;n|=e}return n}t.exports=u,u.prototype.decode=function(t,e){return o.isDecoderBuffer(t)||(t=new o(t,e)),this.tree._decode(t,e)},n(c,s),c.prototype._peekTag=function(t,e,r){if(t.isEmpty())return!1;const n=t.save(),i=f(t,'Failed to peek tag: "'+e+'"');return t.isError(i)?i:(t.restore(n),i.tag===e||i.tagStr===e||i.tagStr+"of"===e||r)},c.prototype._decodeTag=function(t,e,r){const n=f(t,'Failed to decode tag of "'+e+'"');if(t.isError(n))return n;let i=h(t,n.primitive,'Failed to get length of "'+e+'"');if(t.isError(i))return i;if(!r&&n.tag!==e&&n.tagStr!==e&&n.tagStr+"of"!==e)return t.error('Failed to match tag: "'+e+'"');if(n.primitive||null!==i)return t.skip(i,'Failed to match body of: "'+e+'"');const o=t.save(),s=this._skipUntilEnd(t,'Failed to skip indefinite length body: "'+this.tag+'"');return t.isError(s)?s:(i=t.offset-o.offset,t.restore(o),t.skip(i,'Failed to match body of: "'+e+'"'))},c.prototype._skipUntilEnd=function(t,e){for(;;){const r=f(t,e);if(t.isError(r))return r;const n=h(t,r.primitive,e);if(t.isError(n))return n;let i;if(i=r.primitive||null!==n?t.skip(n):this._skipUntilEnd(t,e),t.isError(i))return i;if("end"===r.tagStr)break}},c.prototype._decodeList=function(t,e,r,n){const i=[];for(;!t.isEmpty();){const e=this._peekTag(t,"end");if(t.isError(e))return e;const o=r.decode(t,"der",n);if(t.isError(o)&&e)break;i.push(o)}return i},c.prototype._decodeStr=function(t,e){if("bitstr"===e){const e=t.readUInt8();return t.isError(e)?e:{unused:e,data:t.raw()}}if("bmpstr"===e){const e=t.raw();if(e.length%2==1)return t.error("Decoding of string type: bmpstr length mismatch");let r="";for(let t=0;t<e.length/2;t++)r+=String.fromCharCode(e.readUInt16BE(2*t));return r}if("numstr"===e){const e=t.raw().toString("ascii");return this._isNumstr(e)?e:t.error("Decoding of string type: numstr unsupported characters")}if("octstr"===e)return t.raw();if("objDesc"===e)return t.raw();if("printstr"===e){const e=t.raw().toString("ascii");return this._isPrintstr(e)?e:t.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(e)?t.raw().toString():t.error("Decoding of string type: "+e+" unsupported")},c.prototype._decodeObjid=function(t,e,r){let n;const i=[];let o=0,s=0;for(;!t.isEmpty();)s=t.readUInt8(),o<<=7,o|=127&s,0==(128&s)&&(i.push(o),o=0);128&s&&i.push(o);const a=i[0]/40|0,u=i[0]%40;if(n=r?i:[a,u].concat(i.slice(1)),e){let t=e[n.join(" ")];void 0===t&&(t=e[n.join(".")]),void 0!==t&&(n=t)}return n},c.prototype._decodeTime=function(t,e){const r=t.raw().toString();let n,i,o,s,a,u;if("gentime"===e)n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),a=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==e)return t.error("Decoding "+e+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),s=0|r.slice(6,8),a=0|r.slice(8,10),u=0|r.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,s,a,u,0)},c.prototype._decodeNull=function(){return null},c.prototype._decodeBool=function(t){const e=t.readUInt8();return t.isError(e)?e:0!==e},c.prototype._decodeInt=function(t,e){const r=t.raw();let n=new i(r);return e&&(n=e[n.toString(10)]||n),n},c.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getDecoder("der").tree}},8211:(t,e,r)=>{"use strict";const n=e;n.der=r(1066),n.pem=r(3956)},3956:(t,e,r)=>{"use strict";const n=r(1285),i=r(7654).Buffer,o=r(1066);function s(t){o.call(this,t),this.enc="pem"}n(s,o),t.exports=s,s.prototype.decode=function(t,e){const r=t.toString().split(/[\r\n]+/g),n=e.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/;let a=-1,u=-1;for(let t=0;t<r.length;t++){const e=r[t].match(s);if(null!==e&&e[2]===n){if(-1!==a){if("END"!==e[1])break;u=t;break}if("BEGIN"!==e[1])break;a=t}}if(-1===a||-1===u)throw new Error("PEM section not found for: "+n);const c=r.slice(a+1,u).join("");c.replace(/[^a-z0-9+/=]+/gi,"");const f=i.from(c,"base64");return o.prototype.decode.call(this,f,e)}},5758:(t,e,r)=>{"use strict";const n=r(1285),i=r(7654).Buffer,o=r(847),s=r(4131);function a(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new u,this.tree._init(t.body)}function u(t){o.call(this,"der",t)}function c(t){return t<10?"0"+t:t}t.exports=a,a.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},n(u,o),u.prototype._encodeComposite=function(t,e,r,n){const o=function(t,e,r,n){let i;if("seqof"===t?t="seq":"setof"===t&&(t="set"),s.tagByName.hasOwnProperty(t))i=s.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return n.error("Unknown tag: "+t);i=t}return i>=31?n.error("Multi-octet tag encoding unsupported"):(e||(i|=32),i|=s.tagClassByName[r||"universal"]<<6,i)}(t,e,r,this.reporter);if(n.length<128){const t=i.alloc(2);return t[0]=o,t[1]=n.length,this._createEncoderBuffer([t,n])}let a=1;for(let t=n.length;t>=256;t>>=8)a++;const u=i.alloc(2+a);u[0]=o,u[1]=128|a;for(let t=1+a,e=n.length;e>0;t--,e>>=8)u[t]=255&e;return this._createEncoderBuffer([u,n])},u.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){const e=i.alloc(2*t.length);for(let r=0;r<t.length;r++)e.writeUInt16BE(t.charCodeAt(r),2*r);return this._createEncoderBuffer(e)}return"numstr"===e?this._isNumstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===e?this._isPrintstr(t)?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(e)||"objDesc"===e?this._createEncoderBuffer(t):this.reporter.error("Encoding of string type: "+e+" unsupported")},u.prototype._encodeObjid=function(t,e,r){if("string"==typeof t){if(!e)return this.reporter.error("string objid given, but no values map found");if(!e.hasOwnProperty(t))return this.reporter.error("objid not found in values map");t=e[t].split(/[\s.]+/g);for(let e=0;e<t.length;e++)t[e]|=0}else if(Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]|=0}if(!Array.isArray(t))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(t));if(!r){if(t[1]>=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let n=0;for(let e=0;e<t.length;e++){let r=t[e];for(n++;r>=128;r>>=7)n++}const o=i.alloc(n);let s=o.length-1;for(let e=t.length-1;e>=0;e--){let r=t[e];for(o[s--]=127&r;(r>>=7)>0;)o[s--]=128|127&r}return this._createEncoderBuffer(o)},u.prototype._encodeTime=function(t,e){let r;const n=new Date(t);return"gentime"===e?r=[c(n.getUTCFullYear()),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[c(n.getUTCFullYear()%100),c(n.getUTCMonth()+1),c(n.getUTCDate()),c(n.getUTCHours()),c(n.getUTCMinutes()),c(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},u.prototype._encodeNull=function(){return this._createEncoderBuffer("")},u.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!i.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=i.from(e)}if(i.isBuffer(t)){let e=t.length;0===t.length&&e++;const r=i.alloc(e);return t.copy(r),0===t.length&&(r[0]=0),this._createEncoderBuffer(r)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let r=1;for(let e=t;e>=256;e>>=8)r++;const n=new Array(r);for(let e=n.length-1;e>=0;e--)n[e]=255&t,t>>=8;return 128&n[0]&&n.unshift(0),this._createEncoderBuffer(i.from(n))},u.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},u.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},u.prototype._skipDefault=function(t,e,r){const n=this._baseState;let i;if(null===n.default)return!1;const o=t.join();if(void 0===n.defaultBuffer&&(n.defaultBuffer=this._encodeValue(n.default,e,r).join()),o.length!==n.defaultBuffer.length)return!1;for(i=0;i<o.length;i++)if(o[i]!==n.defaultBuffer[i])return!1;return!0}},9116:(t,e,r)=>{"use strict";const n=e;n.der=r(5758),n.pem=r(9245)},9245:(t,e,r)=>{"use strict";const n=r(1285),i=r(5758);function o(t){i.call(this,t),this.enc="pem"}n(o,i),t.exports=o,o.prototype.encode=function(t,e){const r=i.prototype.encode.call(this,t).toString("base64"),n=["-----BEGIN "+e.label+"-----"];for(let t=0;t<r.length;t+=64)n.push(r.slice(t,t+64));return n.push("-----END "+e.label+"-----"),n.join("\n")}},1696:(t,e,r)=>{"use strict";var n=r(4406);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var o,s,a=r(7515).codes,u=a.ERR_AMBIGUOUS_ARGUMENT,c=a.ERR_INVALID_ARG_TYPE,f=a.ERR_INVALID_ARG_VALUE,h=a.ERR_INVALID_RETURN_VALUE,l=a.ERR_MISSING_ARGS,p=r(4082),d=r(3335).inspect,g=r(3335).types,y=g.isPromise,b=g.isRegExp,m=Object.assign?Object.assign:r(4956).assign,v=Object.is?Object.is:r(4679);function w(){var t=r(6796);o=t.isDeepEqual,s=t.isDeepStrictEqual}new Map;var _=!1,A=t.exports=k,E={};function S(t){if(t.message instanceof Error)throw t.message;throw new p(t)}function I(t,e,r,n){if(!r){var i=!1;if(0===e)i=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var o=new p({actual:r,expected:!0,message:n,operator:"==",stackStartFn:t});throw o.generatedMessage=i,o}}function k(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];I.apply(void 0,[k,e.length].concat(e))}A.fail=function t(e,r,i,o,s){var a,u=arguments.length;if(0===u)a="Failed";else if(1===u)i=e,e=void 0;else{if(!1===_){_=!0;var c=n.emitWarning?n.emitWarning:console.warn.bind(console);c("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}2===u&&(o="!=")}if(i instanceof Error)throw i;var f={actual:e,expected:r,operator:void 0===o?"fail":o,stackStartFn:s||t};void 0!==i&&(f.message=i);var h=new p(f);throw a&&(h.message=a,h.generatedMessage=!0),h},A.AssertionError=p,A.ok=k,A.equal=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");e!=r&&S({actual:e,expected:r,message:n,operator:"==",stackStartFn:t})},A.notEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");e==r&&S({actual:e,expected:r,message:n,operator:"!=",stackStartFn:t})},A.deepEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===o&&w(),o(e,r)||S({actual:e,expected:r,message:n,operator:"deepEqual",stackStartFn:t})},A.notDeepEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===o&&w(),o(e,r)&&S({actual:e,expected:r,message:n,operator:"notDeepEqual",stackStartFn:t})},A.deepStrictEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===o&&w(),s(e,r)||S({actual:e,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:t})},A.notDeepStrictEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");void 0===o&&w(),s(e,r)&&S({actual:e,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:t})},A.strictEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");v(e,r)||S({actual:e,expected:r,message:n,operator:"strictEqual",stackStartFn:t})},A.notStrictEqual=function t(e,r,n){if(arguments.length<2)throw new l("actual","expected");v(e,r)&&S({actual:e,expected:r,message:n,operator:"notStrictEqual",stackStartFn:t})};var x=function t(e,r,n){var i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),r.forEach((function(t){t in e&&(void 0!==n&&"string"==typeof n[t]&&b(e[t])&&e[t].test(n[t])?i[t]=n[t]:i[t]=e[t])}))};function M(t,e,r,n,i,o){if(!(r in t)||!s(t[r],e[r])){if(!n){var a=new x(t,i),u=new x(e,i,t),c=new p({actual:a,expected:u,operator:"deepStrictEqual",stackStartFn:o});throw c.actual=t,c.expected=e,c.operator=o.name,c}S({actual:t,expected:e,message:n,operator:o.name,stackStartFn:o})}}function C(t,e,r,n){if("function"!=typeof e){if(b(e))return e.test(t);if(2===arguments.length)throw new c("expected",["Function","RegExp"],e);if("object"!==i(t)||null===t){var s=new p({actual:t,expected:e,message:r,operator:"deepStrictEqual",stackStartFn:n});throw s.operator=n.name,s}var a=Object.keys(e);if(e instanceof Error)a.push("name","message");else if(0===a.length)throw new f("error",e,"may not be an empty object");return void 0===o&&w(),a.forEach((function(i){"string"==typeof t[i]&&b(e[i])&&e[i].test(t[i])||M(t,e,i,r,a,n)})),!0}return void 0!==e.prototype&&t instanceof e||!Error.isPrototypeOf(e)&&!0===e.call({},t)}function T(t){if("function"!=typeof t)throw new c("fn","Function",t);try{t()}catch(t){return t}return E}function O(t){return y(t)||null!==t&&"object"===i(t)&&"function"==typeof t.then&&"function"==typeof t.catch}function P(t){return Promise.resolve().then((function(){var e;if("function"==typeof t){if(!O(e=t()))throw new h("instance of Promise","promiseFn",e)}else{if(!O(t))throw new c("promiseFn",["Function","Promise"],t);e=t}return Promise.resolve().then((function(){return e})).then((function(){return E})).catch((function(t){return t}))}))}function B(t,e,r,n){if("string"==typeof r){if(4===arguments.length)throw new c("error",["Object","Error","Function","RegExp"],r);if("object"===i(e)&&null!==e){if(e.message===r)throw new u("error/message",'The error message "'.concat(e.message,'" is identical to the message.'))}else if(e===r)throw new u("error/message",'The error "'.concat(e,'" is identical to the message.'));n=r,r=void 0}else if(null!=r&&"object"!==i(r)&&"function"!=typeof r)throw new c("error",["Object","Error","Function","RegExp"],r);if(e===E){var o="";r&&r.name&&(o+=" (".concat(r.name,")")),o+=n?": ".concat(n):".";var s="rejects"===t.name?"rejection":"exception";S({actual:void 0,expected:r,operator:t.name,message:"Missing expected ".concat(s).concat(o),stackStartFn:t})}if(r&&!C(e,r,n,t))throw e}function R(t,e,r,n){if(e!==E){if("string"==typeof r&&(n=r,r=void 0),!r||C(e,r)){var i=n?": ".concat(n):".",o="doesNotReject"===t.name?"rejection":"exception";S({actual:e,expected:r,operator:t.name,message:"Got unwanted ".concat(o).concat(i,"\n")+'Actual message: "'.concat(e&&e.message,'"'),stackStartFn:t})}throw e}}function N(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];I.apply(void 0,[N,e.length].concat(e))}A.throws=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];B.apply(void 0,[t,T(e)].concat(n))},A.rejects=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return P(e).then((function(e){return B.apply(void 0,[t,e].concat(n))}))},A.doesNotThrow=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];R.apply(void 0,[t,T(e)].concat(n))},A.doesNotReject=function t(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return P(e).then((function(e){return R.apply(void 0,[t,e].concat(n))}))},A.ifError=function t(e){if(null!=e){var r="ifError got unwanted exception: ";"object"===i(e)&&"string"==typeof e.message?0===e.message.length&&e.constructor?r+=e.constructor.name:r+=e.message:r+=d(e);var n=new p({actual:e,expected:null,operator:"ifError",message:r,stackStartFn:t}),o=e.stack;if("string"==typeof o){var s=o.split("\n");s.shift();for(var a=n.stack.split("\n"),u=0;u<s.length;u++){var c=a.indexOf(s[u]);if(-1!==c){a=a.slice(0,c);break}}n.stack="".concat(a.join("\n"),"\n").concat(s.join("\n"))}throw n}},A.strict=m(N,A,{equal:A.strictEqual,deepEqual:A.deepStrictEqual,notEqual:A.notStrictEqual,notDeepEqual:A.notDeepStrictEqual}),A.strict.strict=A.strict},4082:(t,e,r)=>{"use strict";var n=r(4406);function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return!e||"object"!==p(e)&&"function"!=typeof e?a(t):e}function a(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function u(t){var e="function"==typeof Map?new Map:void 0;return u=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return f(t,arguments,l(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),h(n,t)},u(t)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function f(t,e,r){return f=c()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&h(i,r.prototype),i},f.apply(null,arguments)}function h(t,e){return h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},h(t,e)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}var d=r(3335).inspect,g=r(7515).codes.ERR_INVALID_ARG_TYPE;function y(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}var b="",m="",v="",w="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function A(t){var e=Object.keys(t),r=Object.create(Object.getPrototypeOf(t));return e.forEach((function(e){r[e]=t[e]})),Object.defineProperty(r,"message",{value:t.message}),r}function E(t){return d(t,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var S=function(t){function e(t){var r;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),"object"!==p(t)||null===t)throw new g("options","Object",t);var i=t.message,o=t.operator,u=t.stackStartFn,c=t.actual,f=t.expected,h=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=i)r=s(this,l(e).call(this,String(i)));else if(n.stderr&&n.stderr.isTTY&&(n.stderr&&n.stderr.getColorDepth&&1!==n.stderr.getColorDepth()?(b="",m="",w="",v=""):(b="",m="",w="",v="")),"object"===p(c)&&null!==c&&"object"===p(f)&&null!==f&&"stack"in c&&c instanceof Error&&"stack"in f&&f instanceof Error&&(c=A(c),f=A(f)),"deepStrictEqual"===o||"strictEqual"===o)r=s(this,l(e).call(this,function(t,e,r){var i="",o="",s=0,a="",u=!1,c=E(t),f=c.split("\n"),h=E(e).split("\n"),l=0,d="";if("strictEqual"===r&&"object"===p(t)&&"object"===p(e)&&null!==t&&null!==e&&(r="strictEqualObject"),1===f.length&&1===h.length&&f[0]!==h[0]){var g=f[0].length+h[0].length;if(g<=10){if(!("object"===p(t)&&null!==t||"object"===p(e)&&null!==e||0===t&&0===e))return"".concat(_[r],"\n\n")+"".concat(f[0]," !== ").concat(h[0],"\n")}else if("strictEqualObject"!==r&&g<(n.stderr&&n.stderr.isTTY?n.stderr.columns:80)){for(;f[0][l]===h[0][l];)l++;l>2&&(d="\n ".concat(function(t,e){if(e=Math.floor(e),0==t.length||0==e)return"";var r=t.length*e;for(e=Math.floor(Math.log(e)/Math.log(2));e;)t+=t,e--;return t+t.substring(0,r-t.length)}(" ",l),"^"),l=0)}}for(var A=f[f.length-1],S=h[h.length-1];A===S&&(l++<2?a="\n ".concat(A).concat(a):i=A,f.pop(),h.pop(),0!==f.length&&0!==h.length);)A=f[f.length-1],S=h[h.length-1];var I=Math.max(f.length,h.length);if(0===I){var k=c.split("\n");if(k.length>30)for(k[26]="".concat(b,"...").concat(w);k.length>27;)k.pop();return"".concat(_.notIdentical,"\n\n").concat(k.join("\n"),"\n")}l>3&&(a="\n".concat(b,"...").concat(w).concat(a),u=!0),""!==i&&(a="\n ".concat(i).concat(a),i="");var x=0,M=_[r]+"\n".concat(m,"+ actual").concat(w," ").concat(v,"- expected").concat(w),C=" ".concat(b,"...").concat(w," Lines skipped");for(l=0;l<I;l++){var T=l-s;if(f.length<l+1)T>1&&l>2&&(T>4?(o+="\n".concat(b,"...").concat(w),u=!0):T>3&&(o+="\n ".concat(h[l-2]),x++),o+="\n ".concat(h[l-1]),x++),s=l,i+="\n".concat(v,"-").concat(w," ").concat(h[l]),x++;else if(h.length<l+1)T>1&&l>2&&(T>4?(o+="\n".concat(b,"...").concat(w),u=!0):T>3&&(o+="\n ".concat(f[l-2]),x++),o+="\n ".concat(f[l-1]),x++),s=l,o+="\n".concat(m,"+").concat(w," ").concat(f[l]),x++;else{var O=h[l],P=f[l],B=P!==O&&(!y(P,",")||P.slice(0,-1)!==O);B&&y(O,",")&&O.slice(0,-1)===P&&(B=!1,P+=","),B?(T>1&&l>2&&(T>4?(o+="\n".concat(b,"...").concat(w),u=!0):T>3&&(o+="\n ".concat(f[l-2]),x++),o+="\n ".concat(f[l-1]),x++),s=l,o+="\n".concat(m,"+").concat(w," ").concat(P),i+="\n".concat(v,"-").concat(w," ").concat(O),x+=2):(o+=i,i="",1!==T&&0!==l||(o+="\n ".concat(P),x++))}if(x>20&&l<I-2)return"".concat(M).concat(C,"\n").concat(o,"\n").concat(b,"...").concat(w).concat(i,"\n")+"".concat(b,"...").concat(w)}return"".concat(M).concat(u?C:"","\n").concat(o).concat(i).concat(a).concat(d)}(c,f,o)));else if("notDeepStrictEqual"===o||"notStrictEqual"===o){var d=_[o],S=E(c).split("\n");if("notStrictEqual"===o&&"object"===p(c)&&null!==c&&(d=_.notStrictEqualObject),S.length>30)for(S[26]="".concat(b,"...").concat(w);S.length>27;)S.pop();r=1===S.length?s(this,l(e).call(this,"".concat(d," ").concat(S[0]))):s(this,l(e).call(this,"".concat(d,"\n\n").concat(S.join("\n"),"\n")))}else{var I=E(c),k="",x=_[o];"notDeepEqual"===o||"notEqual"===o?(I="".concat(_[o],"\n\n").concat(I)).length>1024&&(I="".concat(I.slice(0,1021),"...")):(k="".concat(E(f)),I.length>512&&(I="".concat(I.slice(0,509),"...")),k.length>512&&(k="".concat(k.slice(0,509),"...")),"deepEqual"===o||"equal"===o?I="".concat(x,"\n\n").concat(I,"\n\nshould equal\n\n"):k=" ".concat(o," ").concat(k)),r=s(this,l(e).call(this,"".concat(I).concat(k)))}return Error.stackTraceLimit=h,r.generatedMessage=!i,Object.defineProperty(a(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=c,r.expected=f,r.operator=o,Error.captureStackTrace&&Error.captureStackTrace(a(r),u),r.stack,r.name="AssertionError",s(r)}var r,u;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&h(t,e)}(e,t),r=e,u=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:d.custom,value:function(t,e){return d(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){i(t,e,r[e])}))}return t}({},e,{customInspect:!1,depth:0}))}}],u&&o(r.prototype,u),e}(u(Error));t.exports=S},7515:(t,e,r)=>{"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function i(t){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},i(t)}function o(t,e){return o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},o(t,e)}var s,a,u={};function c(t,e,r){r||(r=Error);var s=function(r){function s(r,o,a){var u;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),u=function(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}(this,i(s).call(this,function(t,r,n){return"string"==typeof e?e:e(t,r,n)}(r,o,a))),u.code=t,u}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&o(t,e)}(s,r),s}(r);u[t]=s}function f(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}c("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),c("ERR_INVALID_ARG_TYPE",(function(t,e,i){var o,a,u,c,h;if(void 0===s&&(s=r(1696)),s("string"==typeof t,"'name' must be a string"),"string"==typeof e&&(a="not ",e.substr(0,a.length)===a)?(o="must not be",e=e.replace(/^not /,"")):o="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))u="The ".concat(t," ").concat(o," ").concat(f(e,"type"));else{var l=("number"!=typeof h&&(h=0),h+".".length>(c=t).length||-1===c.indexOf(".",h)?"argument":"property");u='The "'.concat(t,'" ').concat(l," ").concat(o," ").concat(f(e,"type"))}return u+". Received type ".concat(n(i))}),TypeError),c("ERR_INVALID_ARG_VALUE",(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===a&&(a=r(3335));var i=a.inspect(e);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(t,"' ").concat(n,". Received ").concat(i)}),TypeError,RangeError),c("ERR_INVALID_RETURN_VALUE",(function(t,e,r){var i;return i=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(t,' to be returned from the "').concat(e,'"')+" function but got ".concat(i,".")}),TypeError),c("ERR_MISSING_ARGS",(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];void 0===s&&(s=r(1696)),s(e.length>0,"At least one arg needs to be specified");var i="The ",o=e.length;switch(e=e.map((function(t){return'"'.concat(t,'"')})),o){case 1:i+="".concat(e[0]," argument");break;case 2:i+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:i+=e.slice(0,o-1).join(", "),i+=", and ".concat(e[o-1]," arguments")}return"".concat(i," must be specified")}),TypeError),t.exports.codes=u},6796:(t,e,r)=>{"use strict";function n(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==a.return||a.return()}finally{if(i)throw o}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}var o=void 0!==/a/g.flags,s=function(t){var e=[];return t.forEach((function(t){return e.push(t)})),e},a=function(t){var e=[];return t.forEach((function(t,r){return e.push([r,t])})),e},u=Object.is?Object.is:r(4679),c=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},f=Number.isNaN?Number.isNaN:r(4782);function h(t){return t.call.bind(t)}var l=h(Object.prototype.hasOwnProperty),p=h(Object.prototype.propertyIsEnumerable),d=h(Object.prototype.toString),g=r(3335).types,y=g.isAnyArrayBuffer,b=g.isArrayBufferView,m=g.isDate,v=g.isMap,w=g.isRegExp,_=g.isSet,A=g.isNativeError,E=g.isBoxedPrimitive,S=g.isNumberObject,I=g.isStringObject,k=g.isBooleanObject,x=g.isBigIntObject,M=g.isSymbolObject,C=g.isFloat32Array,T=g.isFloat64Array;function O(t){if(0===t.length||t.length>10)return!0;for(var e=0;e<t.length;e++){var r=t.charCodeAt(e);if(r<48||r>57)return!0}return 10===t.length&&t>=Math.pow(2,32)}function P(t){return Object.keys(t).filter(O).concat(c(t).filter(Object.prototype.propertyIsEnumerable.bind(t)))}function B(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0}function R(t,e,r,n){if(t===e)return 0!==t||!r||u(t,e);if(r){if("object"!==i(t))return"number"==typeof t&&f(t)&&f(e);if("object"!==i(e)||null===t||null===e)return!1;if(Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1}else{if(null===t||"object"!==i(t))return(null===e||"object"!==i(e))&&t==e;if(null===e||"object"!==i(e))return!1}var s,a,c,h,l=d(t);if(l!==d(e))return!1;if(Array.isArray(t)){if(t.length!==e.length)return!1;var p=P(t),g=P(e);return p.length===g.length&&U(t,e,r,n,1,p)}if("[object Object]"===l&&(!v(t)&&v(e)||!_(t)&&_(e)))return!1;if(m(t)){if(!m(e)||Date.prototype.getTime.call(t)!==Date.prototype.getTime.call(e))return!1}else if(w(t)){if(!w(e)||(c=t,h=e,!(o?c.source===h.source&&c.flags===h.flags:RegExp.prototype.toString.call(c)===RegExp.prototype.toString.call(h))))return!1}else if(A(t)||t instanceof Error){if(t.message!==e.message||t.name!==e.name)return!1}else{if(b(t)){if(r||!C(t)&&!T(t)){if(!function(t,e){return t.byteLength===e.byteLength&&0===B(new Uint8Array(t.buffer,t.byteOffset,t.byteLength),new Uint8Array(e.buffer,e.byteOffset,e.byteLength))}(t,e))return!1}else if(!function(t,e){if(t.byteLength!==e.byteLength)return!1;for(var r=0;r<t.byteLength;r++)if(t[r]!==e[r])return!1;return!0}(t,e))return!1;var O=P(t),R=P(e);return O.length===R.length&&U(t,e,r,n,0,O)}if(_(t))return!(!_(e)||t.size!==e.size)&&U(t,e,r,n,2);if(v(t))return!(!v(e)||t.size!==e.size)&&U(t,e,r,n,3);if(y(t)){if(a=e,(s=t).byteLength!==a.byteLength||0!==B(new Uint8Array(s),new Uint8Array(a)))return!1}else if(E(t)&&!function(t,e){return S(t)?S(e)&&u(Number.prototype.valueOf.call(t),Number.prototype.valueOf.call(e)):I(t)?I(e)&&String.prototype.valueOf.call(t)===String.prototype.valueOf.call(e):k(t)?k(e)&&Boolean.prototype.valueOf.call(t)===Boolean.prototype.valueOf.call(e):x(t)?x(e)&&BigInt.prototype.valueOf.call(t)===BigInt.prototype.valueOf.call(e):M(e)&&Symbol.prototype.valueOf.call(t)===Symbol.prototype.valueOf.call(e)}(t,e))return!1}return U(t,e,r,n,0)}function N(t,e){return e.filter((function(e){return p(t,e)}))}function U(t,e,r,n,i,o){if(5===arguments.length){o=Object.keys(t);var s=Object.keys(e);if(o.length!==s.length)return!1}for(var a=0;a<o.length;a++)if(!l(e,o[a]))return!1;if(r&&5===arguments.length){var u=c(t);if(0!==u.length){var f=0;for(a=0;a<u.length;a++){var h=u[a];if(p(t,h)){if(!p(e,h))return!1;o.push(h),f++}else if(p(e,h))return!1}var d=c(e);if(u.length!==d.length&&N(e,d).length!==f)return!1}else{var g=c(e);if(0!==g.length&&0!==N(e,g).length)return!1}}if(0===o.length&&(0===i||1===i&&0===t.length||0===t.size))return!0;if(void 0===n)n={val1:new Map,val2:new Map,position:0};else{var y=n.val1.get(t);if(void 0!==y){var b=n.val2.get(e);if(void 0!==b)return y===b}n.position++}n.val1.set(t,n.position),n.val2.set(e,n.position);var m=H(t,e,r,o,n,i);return n.val1.delete(t),n.val2.delete(e),m}function j(t,e,r,n){for(var i=s(t),o=0;o<i.length;o++){var a=i[o];if(R(e,a,r,n))return t.delete(a),!0}return!1}function L(t){switch(i(t)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":t=+t;case"number":if(f(t))return!1}return!0}function D(t,e,r){var n=L(r);return null!=n?n:e.has(n)&&!t.has(n)}function F(t,e,r,n,i){var o=L(r);if(null!=o)return o;var s=e.get(o);return!(void 0===s&&!e.has(o)||!R(n,s,!1,i))&&!t.has(o)&&R(n,s,!1,i)}function q(t,e,r,n,i,o){for(var a=s(t),u=0;u<a.length;u++){var c=a[u];if(R(r,c,i,o)&&R(n,e.get(c),i,o))return t.delete(c),!0}return!1}function H(t,e,r,o,u,c){var f=0;if(2===c){if(!function(t,e,r,n){for(var o=null,a=s(t),u=0;u<a.length;u++){var c=a[u];if("object"===i(c)&&null!==c)null===o&&(o=new Set),o.add(c);else if(!e.has(c)){if(r)return!1;if(!D(t,e,c))return!1;null===o&&(o=new Set),o.add(c)}}if(null!==o){for(var f=s(e),h=0;h<f.length;h++){var l=f[h];if("object"===i(l)&&null!==l){if(!j(o,l,r,n))return!1}else if(!r&&!t.has(l)&&!j(o,l,r,n))return!1}return 0===o.size}return!0}(t,e,r,u))return!1}else if(3===c){if(!function(t,e,r,o){for(var s=null,u=a(t),c=0;c<u.length;c++){var f=n(u[c],2),h=f[0],l=f[1];if("object"===i(h)&&null!==h)null===s&&(s=new Set),s.add(h);else{var p=e.get(h);if(void 0===p&&!e.has(h)||!R(l,p,r,o)){if(r)return!1;if(!F(t,e,h,l,o))return!1;null===s&&(s=new Set),s.add(h)}}}if(null!==s){for(var d=a(e),g=0;g<d.length;g++){var y=n(d[g],2),b=(h=y[0],y[1]);if("object"===i(h)&&null!==h){if(!q(s,t,h,b,r,o))return!1}else if(!(r||t.has(h)&&R(t.get(h),b,!1,o)||q(s,t,h,b,!1,o)))return!1}return 0===s.size}return!0}(t,e,r,u))return!1}else if(1===c)for(;f<t.length;f++){if(!l(t,f)){if(l(e,f))return!1;for(var h=Object.keys(t);f<h.length;f++){var p=h[f];if(!l(e,p)||!R(t[p],e[p],r,u))return!1}return h.length===Object.keys(e).length}if(!l(e,f)||!R(t[f],e[f],r,u))return!1}for(f=0;f<o.length;f++){var d=o[f];if(!R(t[d],e[d],r,u))return!1}return!0}t.exports={isDeepEqual:function(t,e){return R(t,e,!1)},isDeepStrictEqual:function(t,e){return R(t,e,!0)}}},8166:(t,e,r)=>{"use strict";var n=r(7834).Buffer;t.exports=function(t){if(t.length>=255)throw new TypeError("Alphabet too long");for(var e=new Uint8Array(256),r=0;r<e.length;r++)e[r]=255;for(var i=0;i<t.length;i++){var o=t.charAt(i),s=o.charCodeAt(0);if(255!==e[s])throw new TypeError(o+" is ambiguous");e[s]=i}var a=t.length,u=t.charAt(0),c=Math.log(a)/Math.log(256),f=Math.log(256)/Math.log(a);function h(t){if("string"!=typeof t)throw new TypeError("Expected String");if(0===t.length)return n.alloc(0);for(var r=0,i=0,o=0;t[r]===u;)i++,r++;for(var s=(t.length-r)*c+1>>>0,f=new Uint8Array(s);t[r];){var h=e[t.charCodeAt(r)];if(255===h)return;for(var l=0,p=s-1;(0!==h||l<o)&&-1!==p;p--,l++)h+=a*f[p]>>>0,f[p]=h%256>>>0,h=h/256>>>0;if(0!==h)throw new Error("Non-zero carry");o=l,r++}for(var d=s-o;d!==s&&0===f[d];)d++;var g=n.allocUnsafe(i+(s-d));g.fill(0,0,i);for(var y=i;d!==s;)g[y++]=f[d++];return g}return{encode:function(e){if((Array.isArray(e)||e instanceof Uint8Array)&&(e=n.from(e)),!n.isBuffer(e))throw new TypeError("Expected Buffer");if(0===e.length)return"";for(var r=0,i=0,o=0,s=e.length;o!==s&&0===e[o];)o++,r++;for(var c=(s-o)*f+1>>>0,h=new Uint8Array(c);o!==s;){for(var l=e[o],p=0,d=c-1;(0!==l||p<i)&&-1!==d;d--,p++)l+=256*h[d]>>>0,h[d]=l%a>>>0,l=l/a>>>0;if(0!==l)throw new Error("Non-zero carry");i=p,o++}for(var g=c-i;g!==c&&0===h[g];)g++;for(var y=u.repeat(r);g<c;++g)y+=t.charAt(h[g]);return y},decodeUnsafe:h,decode:function(t){var e=h(t);if(e)return e;throw new Error("Non-base"+a+" character")}}}},5766:(t,e)=>{"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,o=u(t),s=o[0],a=o[1],c=new i(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),f=0,h=a>0?s-4:s;for(r=0;r<h;r+=4)e=n[t.charCodeAt(r)]<<18|n[t.charCodeAt(r+1)]<<12|n[t.charCodeAt(r+2)]<<6|n[t.charCodeAt(r+3)],c[f++]=e>>16&255,c[f++]=e>>8&255,c[f++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[f++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e),c},e.fromByteArray=function(t){for(var e,n=t.length,i=n%3,o=[],s=16383,a=0,u=n-i;a<u;a+=s)o.push(c(t,a,a+s>u?u:a+s));return 1===i?(e=t[n-1],o.push(r[e>>2]+r[e<<4&63]+"==")):2===i&&(e=(t[n-2]<<8)+t[n-1],o.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=o.length;s<a;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function u(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,n){for(var i,o,s=[],a=e;a<n;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},4501:t=>{"use strict";for(var e="qpzry9x8gf2tvdw0s3jn54khce6mua7l",r={},n=0;n<e.length;n++){var i=e.charAt(n);if(void 0!==r[i])throw new TypeError(i+" is ambiguous");r[i]=n}function o(t){var e=t>>25;return(33554431&t)<<5^996825010&-(e>>0&1)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function s(t){for(var e=1,r=0;r<t.length;++r){var n=t.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+t+")";e=o(e)^n>>5}for(e=o(e),r=0;r<t.length;++r){var i=t.charCodeAt(r);e=o(e)^31&i}return e}function a(t,e){if(e=e||90,t.length<8)return t+" too short";if(t.length>e)return"Exceeds length limit";var n=t.toLowerCase(),i=t.toUpperCase();if(t!==n&&t!==i)return"Mixed-case string "+t;var a=(t=n).lastIndexOf("1");if(-1===a)return"No separator character for "+t;if(0===a)return"Missing prefix for "+t;var u=t.slice(0,a),c=t.slice(a+1);if(c.length<6)return"Data too short";var f=s(u);if("string"==typeof f)return f;for(var h=[],l=0;l<c.length;++l){var p=c.charAt(l),d=r[p];if(void 0===d)return"Unknown character "+p;f=o(f)^d,l+6>=c.length||h.push(d)}return 1!==f?"Invalid checksum for "+t:{prefix:u,words:h}}function u(t,e,r,n){for(var i=0,o=0,s=(1<<r)-1,a=[],u=0;u<t.length;++u)for(i=i<<e|t[u],o+=e;o>=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<<r-o&s);else{if(o>=e)return"Excess padding";if(i<<r-o&s)return"Non-zero padding"}return a}t.exports={decodeUnsafe:function(){var t=a.apply(null,arguments);if("object"==typeof t)return t},decode:function(t){var e=a.apply(null,arguments);if("object"==typeof e)return e;throw new Error(e)},encode:function(t,r,n){if(n=n||90,t.length+7+r.length>n)throw new TypeError("Exceeds length limit");var i=s(t=t.toLowerCase());if("string"==typeof i)throw new Error(i);for(var a=t+"1",u=0;u<r.length;++u){var c=r[u];if(c>>5!=0)throw new Error("Non 5-bit word");i=o(i)^c,a+=e.charAt(c)}for(u=0;u<6;++u)i=o(i);for(i^=1,u=0;u<6;++u)a+=e.charAt(i>>5*(5-u)&31);return a},toWordsUnsafe:function(t){var e=u(t,8,5,!0);if(Array.isArray(e))return e},toWords:function(t){var e=u(t,8,5,!0);if(Array.isArray(e))return e;throw new Error(e)},fromWordsUnsafe:function(t){var e=u(t,5,8,!1);if(Array.isArray(e))return e},fromWords:function(t){var e=u(t,5,8,!1);if(Array.isArray(e))return e;throw new Error(e)}}},4021:(t,e,r)=>{function n(t,e,r){if(!(this instanceof n))return new n(t,e,r);null!=t&&("number"==typeof t?this.fromNumber(t,e,r):null==e&&"string"!=typeof t?this.fromString(t,256):this.fromString(t,e))}var i=n.prototype;i.__bigi=r(9435).i8,n.isBigInteger=function(t,e){return t&&t.__bigi&&(!e||t.__bigi===i.__bigi)},n.prototype.am=function(t,e,r,n,i,o){for(;--o>=0;){var s=e*this[t++]+r[n]+i;i=Math.floor(s/67108864),r[n++]=67108863&s}return i},n.prototype.DB=26,n.prototype.DM=67108863;var o=n.prototype.DV=1<<26;n.prototype.FV=Math.pow(2,52),n.prototype.F1=26,n.prototype.F2=0;var s,a,u=new Array;for(s="0".charCodeAt(0),a=0;a<=9;++a)u[s++]=a;for(s="a".charCodeAt(0),a=10;a<36;++a)u[s++]=a;for(s="A".charCodeAt(0),a=10;a<36;++a)u[s++]=a;function c(t){return"0123456789abcdefghijklmnopqrstuvwxyz".charAt(t)}function f(t,e){var r=u[t.charCodeAt(e)];return null==r?-1:r}function h(t){var e=new n;return e.fromInt(t),e}function l(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function p(t){this.m=t}function d(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<<t.DB-15)-1,this.mt2=2*t.t}function g(t,e){return t&e}function y(t,e){return t|e}function b(t,e){return t^e}function m(t,e){return t&~e}function v(t){if(0==t)return-1;var e=0;return 0==(65535&t)&&(t>>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function w(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function _(){}function A(t){return t}function E(t){this.r2=new n,this.q3=new n,n.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}p.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},p.prototype.revert=function(t){return t},p.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},p.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},p.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},d.prototype.convert=function(t){var e=new n;return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(n.ZERO)>0&&this.m.subTo(e,e),e},d.prototype.revert=function(t){var e=new n;return t.copyTo(e),this.reduce(e),e},d.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e<this.m.t;++e){var r=32767&t[e],n=r*this.mpl+((r*this.mph+(t[e]>>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,n,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},d.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},d.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},i.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},i.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+o:this.t=0},i.fromString=function(t,e){var r,i=this;if(16==e)r=4;else if(8==e)r=3;else if(256==e)r=8;else if(2==e)r=1;else if(32==e)r=5;else{if(4!=e)return void i.fromRadix(t,e);r=2}i.t=0,i.s=0;for(var o=t.length,s=!1,a=0;--o>=0;){var u=8==r?255&t[o]:f(t,o);u<0?"-"==t.charAt(o)&&(s=!0):(s=!1,0==a?i[i.t++]=u:a+r>i.DB?(i[i.t-1]|=(u&(1<<i.DB-a)-1)<<a,i[i.t++]=u>>i.DB-a):i[i.t-1]|=u<<a,(a+=r)>=i.DB&&(a-=i.DB))}8==r&&0!=(128&t[0])&&(i.s=-1,a>0&&(i[i.t-1]|=(1<<i.DB-a)-1<<a)),i.clamp(),s&&n.ZERO.subTo(i,i)},i.clamp=function(){for(var t=this.s&this.DM;this.t>0&&this[this.t-1]==t;)--this.t},i.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},i.drShiftTo=function(t,e){for(var r=t;r<this.t;++r)e[r-t]=this[r];e.t=Math.max(this.t-t,0),e.s=this.s},i.lShiftTo=function(t,e){var r,n=this,i=t%n.DB,o=n.DB-i,s=(1<<o)-1,a=Math.floor(t/n.DB),u=n.s<<i&n.DM;for(r=n.t-1;r>=0;--r)e[r+a+1]=n[r]>>o|u,u=(n[r]&s)<<i;for(r=a-1;r>=0;--r)e[r]=0;e[a]=u,e.t=n.t+a+1,e.s=n.s,e.clamp()},i.rShiftTo=function(t,e){var r=this;e.s=r.s;var n=Math.floor(t/r.DB);if(n>=r.t)e.t=0;else{var i=t%r.DB,o=r.DB-i,s=(1<<i)-1;e[0]=r[n]>>i;for(var a=n+1;a<r.t;++a)e[a-n-1]|=(r[a]&s)<<o,e[a-n]=r[a]>>i;i>0&&(e[r.t-n-1]|=(r.s&s)<<o),e.t=r.t-n,e.clamp()}},i.subTo=function(t,e){for(var r=this,n=0,i=0,o=Math.min(t.t,r.t);n<o;)i+=r[n]-t[n],e[n++]=i&r.DM,i>>=r.DB;if(t.t<r.t){for(i-=t.s;n<r.t;)i+=r[n],e[n++]=i&r.DM,i>>=r.DB;i+=r.s}else{for(i+=r.s;n<t.t;)i-=t[n],e[n++]=i&r.DM,i>>=r.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[n++]=r.DV+i:i>0&&(e[n++]=i),e.t=n,e.clamp()},i.multiplyTo=function(t,e){var r=this.abs(),i=t.abs(),o=r.t;for(e.t=o+i.t;--o>=0;)e[o]=0;for(o=0;o<i.t;++o)e[o+r.t]=r.am(0,i[o],e,o,0,r.t);e.s=0,e.clamp(),this.s!=t.s&&n.ZERO.subTo(e,e)},i.squareTo=function(t){for(var e=this.abs(),r=t.t=2*e.t;--r>=0;)t[r]=0;for(r=0;r<e.t-1;++r){var n=e.am(r,e[r],t,2*r,0,1);(t[r+e.t]+=e.am(r+1,2*e[r],t,2*r+1,n,e.t-r-1))>=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},i.divRemTo=function(t,e,r){var i=this,o=t.abs();if(!(o.t<=0)){var s=i.abs();if(s.t<o.t)return null!=e&&e.fromInt(0),void(null!=r&&i.copyTo(r));null==r&&(r=new n);var a=new n,u=i.s,c=t.s,f=i.DB-l(o[o.t-1]);f>0?(o.lShiftTo(f,a),s.lShiftTo(f,r)):(o.copyTo(a),s.copyTo(r));var h=a.t,p=a[h-1];if(0!=p){var d=p*(1<<i.F1)+(h>1?a[h-2]>>i.F2:0),g=i.FV/d,y=(1<<i.F1)/d,b=1<<i.F2,m=r.t,v=m-h,w=null==e?new n:e;for(a.dlShiftTo(v,w),r.compareTo(w)>=0&&(r[r.t++]=1,r.subTo(w,r)),n.ONE.dlShiftTo(h,w),w.subTo(a,a);a.t<h;)a[a.t++]=0;for(;--v>=0;){var _=r[--m]==p?i.DM:Math.floor(r[m]*g+(r[m-1]+b)*y);if((r[m]+=a.am(0,_,r,v,0,h))<_)for(a.dlShiftTo(v,w),r.subTo(w,r);r[m]<--_;)r.subTo(w,r)}null!=e&&(r.drShiftTo(h,e),u!=c&&n.ZERO.subTo(e,e)),r.t=h,r.clamp(),f>0&&r.rShiftTo(f,r),u<0&&n.ZERO.subTo(r,r)}}},i.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},i.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},i.exp=function(t,e){if(t>4294967295||t<1)return n.ONE;var r=new n,i=new n,o=e.convert(this),s=l(t)-1;for(o.copyTo(r);--s>=0;)if(e.sqrTo(r,i),(t&1<<s)>0)e.mulTo(i,o,r);else{var a=r;r=i,i=a}return e.revert(r)},i.toString=function(t){var e,r=this;if(r.s<0)return"-"+r.negate().toString(t);if(16==t)e=4;else if(8==t)e=3;else if(2==t)e=1;else if(32==t)e=5;else{if(4!=t)return r.toRadix(t);e=2}var n,i=(1<<e)-1,o=!1,s="",a=r.t,u=r.DB-a*r.DB%e;if(a-- >0)for(u<r.DB&&(n=r[a]>>u)>0&&(o=!0,s=c(n));a>=0;)u<e?(n=(r[a]&(1<<u)-1)<<e-u,n|=r[--a]>>(u+=r.DB-e)):(n=r[a]>>(u-=e)&i,u<=0&&(u+=r.DB,--a)),n>0&&(o=!0),o&&(s+=c(n));return o?s:"0"},i.negate=function(){var t=new n;return n.ZERO.subTo(this,t),t},i.abs=function(){return this.s<0?this.negate():this},i.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},i.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+l(this[this.t-1]^this.s&this.DM)},i.byteLength=function(){return this.bitLength()>>3},i.mod=function(t){var e=new n;return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(n.ZERO)>0&&t.subTo(e,e),e},i.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new p(e):new d(e),this.exp(t,r)},_.prototype.convert=A,_.prototype.revert=A,_.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},_.prototype.sqrTo=function(t,e){t.squareTo(e)},E.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=new n;return t.copyTo(e),this.reduce(e),e},E.prototype.revert=function(t){return t},E.prototype.reduce=function(t){var e=this;for(t.drShiftTo(e.m.t-1,e.r2),t.t>e.m.t+1&&(t.t=e.m.t+1,t.clamp()),e.mu.multiplyUpperTo(e.r2,e.m.t+1,e.q3),e.m.multiplyLowerTo(e.q3,e.m.t+1,e.r2);t.compareTo(e.r2)<0;)t.dAddOffset(1,e.m.t+1);for(t.subTo(e.r2,t);t.compareTo(e.m)>=0;)t.subTo(e.m,t)},E.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},E.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var S=[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],I=(1<<26)/S[S.length-1];i.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},i.toRadix=function(t){if(null==t&&(t=10),0==this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=h(r),o=new n,s=new n,a="";for(this.divRemTo(i,o,s);o.signum()>0;)a=(r+s.intValue()).toString(t).substr(1)+a,o.divRemTo(i,o,s);return s.intValue().toString(t)+a},i.fromRadix=function(t,e){var r=this;r.fromInt(0),null==e&&(e=10);for(var i=r.chunkSize(e),o=Math.pow(e,i),s=!1,a=0,u=0,c=0;c<t.length;++c){var h=f(t,c);h<0?"-"==t.charAt(c)&&0==r.signum()&&(s=!0):(u=e*u+h,++a>=i&&(r.dMultiply(o),r.dAddOffset(u,0),a=0,u=0))}a>0&&(r.dMultiply(Math.pow(e,a)),r.dAddOffset(u,0)),s&&n.ZERO.subTo(r,r)},i.fromNumber=function(t,e,r){var i=this;if("number"==typeof e)if(t<2)i.fromInt(1);else for(i.fromNumber(t,r),i.testBit(t-1)||i.bitwiseTo(n.ONE.shiftLeft(t-1),y,i),i.isEven()&&i.dAddOffset(1,0);!i.isProbablePrime(e);)i.dAddOffset(2,0),i.bitLength()>t&&i.subTo(n.ONE.shiftLeft(t-1),i);else{var o=new Array,s=7&t;o.length=1+(t>>3),e.nextBytes(o),s>0?o[0]&=(1<<s)-1:o[0]=0,i.fromString(o,256)}},i.bitwiseTo=function(t,e,r){var n,i,o=this,s=Math.min(t.t,o.t);for(n=0;n<s;++n)r[n]=e(o[n],t[n]);if(t.t<o.t){for(i=t.s&o.DM,n=s;n<o.t;++n)r[n]=e(o[n],i);r.t=o.t}else{for(i=o.s&o.DM,n=s;n<t.t;++n)r[n]=e(i,t[n]);r.t=t.t}r.s=e(o.s,t.s),r.clamp()},i.changeBit=function(t,e){var r=n.ONE.shiftLeft(t);return this.bitwiseTo(r,e,r),r},i.addTo=function(t,e){for(var r=this,n=0,i=0,o=Math.min(t.t,r.t);n<o;)i+=r[n]+t[n],e[n++]=i&r.DM,i>>=r.DB;if(t.t<r.t){for(i+=t.s;n<r.t;)i+=r[n],e[n++]=i&r.DM,i>>=r.DB;i+=r.s}else{for(i+=r.s;n<t.t;)i+=t[n],e[n++]=i&r.DM,i>>=r.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[n++]=i:i<-1&&(e[n++]=r.DV+i),e.t=n,e.clamp()},i.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},i.dAddOffset=function(t,e){if(0!=t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},i.multiplyLowerTo=function(t,e,r){var n,i=Math.min(this.t+t.t,e);for(r.s=0,r.t=i;i>0;)r[--i]=0;for(n=r.t-this.t;i<n;++i)r[i+this.t]=this.am(0,t[i],r,i,0,this.t);for(n=Math.min(t.t,e);i<n;++i)this.am(0,t[i],r,i,0,e-i);r.clamp()},i.multiplyUpperTo=function(t,e,r){--e;var n=r.t=this.t+t.t-e;for(r.s=0;--n>=0;)r[n]=0;for(n=Math.max(e-this.t,0);n<t.t;++n)r[this.t+n-e]=this.am(e-n,t[n],r,0,0,this.t+n-e);r.clamp(),r.drShiftTo(1,r)},i.modInt=function(t){if(t<=0)return 0;var e=this.DV%t,r=this.s<0?t-1:0;if(this.t>0)if(0==e)r=this[0]%t;else for(var n=this.t-1;n>=0;--n)r=(e*r+this[n])%t;return r},i.millerRabin=function(t){var e=this.subtract(n.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var i=e.shiftRight(r);(t=t+1>>1)>S.length&&(t=S.length);for(var o=new n(null),s=[],a=0;a<t;++a){for(;c=S[Math.floor(Math.random()*S.length)],-1!=s.indexOf(c););s.push(c),o.fromInt(c);var u=o.modPow(i,this);if(0!=u.compareTo(n.ONE)&&0!=u.compareTo(e)){for(var c=1;c++<r&&0!=u.compareTo(e);)if(0==(u=u.modPowInt(2,this)).compareTo(n.ONE))return!1;if(0!=u.compareTo(e))return!1}}return!0},i.clone=function(){var t=new n;return this.copyTo(t),t},i.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0==this.t)return-1}else{if(1==this.t)return this[0];if(0==this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},i.byteValue=function(){return 0==this.t?this.s:this[0]<<24>>24},i.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},i.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},i.toByteArray=function(){var t=this,e=t.t,r=new Array;r[0]=t.s;var n,i=t.DB-e*t.DB%8,o=0;if(e-- >0)for(i<t.DB&&(n=t[e]>>i)!=(t.s&t.DM)>>i&&(r[o++]=n|t.s<<t.DB-i);e>=0;)i<8?(n=(t[e]&(1<<i)-1)<<8-i,n|=t[--e]>>(i+=t.DB-8)):(n=t[e]>>(i-=8)&255,i<=0&&(i+=t.DB,--e)),0!=(128&n)&&(n|=-256),0===o&&(128&t.s)!=(128&n)&&++o,(o>0||n!=t.s)&&(r[o++]=n);return r},i.equals=function(t){return 0==this.compareTo(t)},i.min=function(t){return this.compareTo(t)<0?this:t},i.max=function(t){return this.compareTo(t)>0?this:t},i.and=function(t){var e=new n;return this.bitwiseTo(t,g,e),e},i.or=function(t){var e=new n;return this.bitwiseTo(t,y,e),e},i.xor=function(t){var e=new n;return this.bitwiseTo(t,b,e),e},i.andNot=function(t){var e=new n;return this.bitwiseTo(t,m,e),e},i.not=function(){for(var t=new n,e=0;e<this.t;++e)t[e]=this.DM&~this[e];return t.t=this.t,t.s=~this.s,t},i.shiftLeft=function(t){var e=new n;return t<0?this.rShiftTo(-t,e):this.lShiftTo(t,e),e},i.shiftRight=function(t){var e=new n;return t<0?this.lShiftTo(-t,e):this.rShiftTo(t,e),e},i.getLowestSetBit=function(){for(var t=0;t<this.t;++t)if(0!=this[t])return t*this.DB+v(this[t]);return this.s<0?this.t*this.DB:-1},i.bitCount=function(){for(var t=0,e=this.s&this.DM,r=0;r<this.t;++r)t+=w(this[r]^e);return t},i.testBit=function(t){var e=Math.floor(t/this.DB);return e>=this.t?0!=this.s:0!=(this[e]&1<<t%this.DB)},i.setBit=function(t){return this.changeBit(t,y)},i.clearBit=function(t){return this.changeBit(t,m)},i.flipBit=function(t){return this.changeBit(t,b)},i.add=function(t){var e=new n;return this.addTo(t,e),e},i.subtract=function(t){var e=new n;return this.subTo(t,e),e},i.multiply=function(t){var e=new n;return this.multiplyTo(t,e),e},i.divide=function(t){var e=new n;return this.divRemTo(t,e,null),e},i.remainder=function(t){var e=new n;return this.divRemTo(t,null,e),e},i.divideAndRemainder=function(t){var e=new n,r=new n;return this.divRemTo(t,e,r),new Array(e,r)},i.modPow=function(t,e){var r,i,o=t.bitLength(),s=h(1);if(o<=0)return s;r=o<18?1:o<48?3:o<144?4:o<768?5:6,i=o<8?new p(e):e.isEven()?new E(e):new d(e);var a=new Array,u=3,c=r-1,f=(1<<r)-1;if(a[1]=i.convert(this),r>1){var g=new n;for(i.sqrTo(a[1],g);u<=f;)a[u]=new n,i.mulTo(g,a[u-2],a[u]),u+=2}var y,b,m=t.t-1,v=!0,w=new n;for(o=l(t[m])-1;m>=0;){for(o>=c?y=t[m]>>o-c&f:(y=(t[m]&(1<<o+1)-1)<<c-o,m>0&&(y|=t[m-1]>>this.DB+o-c)),u=r;0==(1&y);)y>>=1,--u;if((o-=u)<0&&(o+=this.DB,--m),v)a[y].copyTo(s),v=!1;else{for(;u>1;)i.sqrTo(s,w),i.sqrTo(w,s),u-=2;u>0?i.sqrTo(s,w):(b=s,s=w,w=b),i.mulTo(w,a[y],s)}for(;m>=0&&0==(t[m]&1<<o);)i.sqrTo(s,w),b=s,s=w,w=b,--o<0&&(o=this.DB-1,--m)}return i.revert(s)},i.modInverse=function(t){var e=t.isEven();if(0===this.signum())throw new Error("division by zero");if(this.isEven()&&e||0==t.signum())return n.ZERO;for(var r=t.clone(),i=this.clone(),o=h(1),s=h(0),a=h(0),u=h(1);0!=r.signum();){for(;r.isEven();)r.rShiftTo(1,r),e?(o.isEven()&&s.isEven()||(o.addTo(this,o),s.subTo(t,s)),o.rShiftTo(1,o)):s.isEven()||s.subTo(t,s),s.rShiftTo(1,s);for(;i.isEven();)i.rShiftTo(1,i),e?(a.isEven()&&u.isEven()||(a.addTo(this,a),u.subTo(t,u)),a.rShiftTo(1,a)):u.isEven()||u.subTo(t,u),u.rShiftTo(1,u);r.compareTo(i)>=0?(r.subTo(i,r),e&&o.subTo(a,o),s.subTo(u,s)):(i.subTo(r,i),e&&a.subTo(o,a),u.subTo(s,u))}if(0!=i.compareTo(n.ONE))return n.ZERO;for(;u.compareTo(t)>=0;)u.subTo(t,u);for(;u.signum()<0;)u.addTo(t,u);return u},i.pow=function(t){return this.exp(t,new _)},i.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var n=e;e=r,r=n}var i=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(i<o&&(o=i),o>0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(i=e.getLowestSetBit())>0&&e.rShiftTo(i,e),(i=r.getLowestSetBit())>0&&r.rShiftTo(i,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},i.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=S[S.length-1]){for(e=0;e<S.length;++e)if(r[0]==S[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<S.length;){for(var n=S[e],i=e+1;i<S.length&&n<I;)n*=S[i++];for(n=r.modInt(n);e<i;)if(n%S[e++]==0)return!1}return r.millerRabin(t)},i.square=function(){var t=new n;return this.squareTo(t),t},n.ZERO=h(0),n.ONE=h(1),n.valueOf=h,t.exports=n},438:(t,e,r)=>{var n=r(8834).Buffer,i=r(1696),o=r(4021);o.fromByteArrayUnsigned=function(t){return 128&t[0]?new o([0].concat(t)):new o(t)},o.prototype.toByteArrayUnsigned=function(){var t=this.toByteArray();return 0===t[0]?t.slice(1):t},o.fromDERInteger=function(t){return new o(t)},o.prototype.toDERInteger=o.prototype.toByteArray,o.fromBuffer=function(t){if(128&t[0]){var e=Array.prototype.slice.call(t);return new o([0].concat(e))}return new o(t)},o.fromHex=function(t){return""===t?o.ZERO:(i.equal(t,t.match(/^[A-Fa-f0-9]+/),"Invalid hex string"),i.equal(t.length%2,0,"Incomplete hex"),new o(t,16))},o.prototype.toBuffer=function(t){for(var e=this.toByteArrayUnsigned(),r=[],i=t-e.length;r.length<i;)r.push(0);return new n(r.concat(e))},o.prototype.toHex=function(t){return this.toBuffer(t).toString("hex")}},5948:(t,e,r)=>{var n=r(4021);r(438),t.exports=n},6989:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(1425);function i(t,e,r){return n=>{if(t.has(n))return;const i=r.filter((t=>t.key.toString("hex")===n))[0];e.push(i),t.add(n)}}function o(t){return t.globalMap.unsignedTx}function s(t){const e=new Set;return t.forEach((t=>{const r=t.key.toString("hex");if(e.has(r))throw new Error("Combine: KeyValue Map keys should be unique");e.add(r)})),e}e.combine=function(t){const e=t[0],r=n.psbtToKeyVals(e),a=t.slice(1);if(0===a.length)throw new Error("Combine: Nothing to combine");const u=o(e);if(void 0===u)throw new Error("Combine: Self missing transaction");const c=s(r.globalKeyVals),f=r.inputKeyVals.map(s),h=r.outputKeyVals.map(s);for(const t of a){const e=o(t);if(void 0===e||!e.toBuffer().equals(u.toBuffer()))throw new Error("Combine: One of the Psbts does not have the same transaction.");const a=n.psbtToKeyVals(t);s(a.globalKeyVals).forEach(i(c,r.globalKeyVals,a.globalKeyVals)),a.inputKeyVals.map(s).forEach(((t,e)=>t.forEach(i(f[e],r.inputKeyVals[e],a.inputKeyVals[e])))),a.outputKeyVals.map(s).forEach(((t,e)=>t.forEach(i(h[e],r.outputKeyVals[e],a.outputKeyVals[e]))))}return n.psbtFromKeyVals(u,{globalMapKeyVals:r.globalKeyVals,inputKeyVals:r.inputKeyVals,outputKeyVals:r.outputKeyVals})}},9207:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(5710);e.decode=function(t){if(t.key[0]!==i.GlobalTypes.GLOBAL_XPUB)throw new Error("Decode Error: could not decode globalXpub with key 0x"+t.key.toString("hex"));if(79!==t.key.length||![2,3].includes(t.key[46]))throw new Error("Decode Error: globalXpub has invalid extended pubkey in key 0x"+t.key.toString("hex"));if(t.value.length/4%1!=0)throw new Error("Decode Error: Global GLOBAL_XPUB value length should be multiple of 4");const e=t.key.slice(1),r={masterFingerprint:t.value.slice(0,4),extendedPubkey:e,path:"m"};for(const e of(n=t.value.length/4-1,[...Array(n).keys()])){const n=t.value.readUInt32LE(4*e+4),i=!!(2147483648&n),o=2147483647&n;r.path+="/"+o.toString(10)+(i?"'":"")}var n;return r},e.encode=function(t){const e=n.from([i.GlobalTypes.GLOBAL_XPUB]),r=n.concat([e,t.extendedPubkey]),o=t.path.split("/"),s=n.allocUnsafe(4*o.length);t.masterFingerprint.copy(s,0);let a=4;return o.slice(1).forEach((t=>{const e="'"===t.slice(-1);let r=2147483647&parseInt(e?t.slice(0,-1):t,10);e&&(r+=2147483648),s.writeUInt32LE(r,a),a+=4})),{key:r,value:s}},e.expected="{ masterFingerprint: Buffer; extendedPubkey: Buffer; path: string; }",e.check=function(t){const e=t.extendedPubkey,r=t.masterFingerprint,i=t.path;return n.isBuffer(e)&&78===e.length&&[2,3].indexOf(e[45])>-1&&n.isBuffer(r)&&4===r.length&&"string"==typeof i&&!!i.match(/^m(\/\d+'?)+$/)},e.canAddToArray=function(t,e,r){const n=e.extendedPubkey.toString("hex");return!r.has(n)&&(r.add(n),0===t.filter((t=>t.extendedPubkey.equals(e.extendedPubkey))).length)}},6441:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(5710);e.encode=function(t){return{key:n.from([i.GlobalTypes.UNSIGNED_TX]),value:t.toBuffer()}}},1661:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(5710),i=r(9207),o=r(6441),s=r(6043),a=r(192),u=r(404),c=r(5556),f=r(5477),h=r(2860),l=r(762),p=r(3678),d=r(5630),g=r(6981),y=r(6912),b={unsignedTx:o,globalXpub:i,checkPubkey:d.makeChecker([])};e.globals=b;const m={nonWitnessUtxo:u,partialSig:c,sighashType:h,finalScriptSig:s,finalScriptWitness:a,porCommitment:f,witnessUtxo:l,bip32Derivation:p.makeConverter(n.InputTypes.BIP32_DERIVATION),redeemScript:g.makeConverter(n.InputTypes.REDEEM_SCRIPT),witnessScript:y.makeConverter(n.InputTypes.WITNESS_SCRIPT),checkPubkey:d.makeChecker([n.InputTypes.PARTIAL_SIG,n.InputTypes.BIP32_DERIVATION])};e.inputs=m;const v={bip32Derivation:p.makeConverter(n.OutputTypes.BIP32_DERIVATION),redeemScript:g.makeConverter(n.OutputTypes.REDEEM_SCRIPT),witnessScript:y.makeConverter(n.OutputTypes.WITNESS_SCRIPT),checkPubkey:d.makeChecker([n.OutputTypes.BIP32_DERIVATION])};e.outputs=v},6043:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(5710);e.decode=function(t){if(t.key[0]!==i.InputTypes.FINAL_SCRIPTSIG)throw new Error("Decode Error: could not decode finalScriptSig with key 0x"+t.key.toString("hex"));return t.value},e.encode=function(t){return{key:n.from([i.InputTypes.FINAL_SCRIPTSIG]),value:t}},e.expected="Buffer",e.check=function(t){return n.isBuffer(t)},e.canAdd=function(t,e){return!!t&&!!e&&void 0===t.finalScriptSig}},192:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(5710);e.decode=function(t){if(t.key[0]!==i.InputTypes.FINAL_SCRIPTWITNESS)throw new Error("Decode Error: could not decode finalScriptWitness with key 0x"+t.key.toString("hex"));return t.value},e.encode=function(t){return{key:n.from([i.InputTypes.FINAL_SCRIPTWITNESS]),value:t}},e.expected="Buffer",e.check=function(t){return n.isBuffer(t)},e.canAdd=function(t,e){return!!t&&!!e&&void 0===t.finalScriptWitness}},404:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(5710);e.decode=function(t){if(t.key[0]!==i.InputTypes.NON_WITNESS_UTXO)throw new Error("Decode Error: could not decode nonWitnessUtxo with key 0x"+t.key.toString("hex"));return t.value},e.encode=function(t){return{key:n.from([i.InputTypes.NON_WITNESS_UTXO]),value:t}},e.expected="Buffer",e.check=function(t){return n.isBuffer(t)},e.canAdd=function(t,e){return!!t&&!!e&&void 0===t.nonWitnessUtxo}},5556:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(5710);e.decode=function(t){if(t.key[0]!==i.InputTypes.PARTIAL_SIG)throw new Error("Decode Error: could not decode partialSig with key 0x"+t.key.toString("hex"));if(34!==t.key.length&&66!==t.key.length||![2,3,4].includes(t.key[1]))throw new Error("Decode Error: partialSig has invalid pubkey in key 0x"+t.key.toString("hex"));return{pubkey:t.key.slice(1),signature:t.value}},e.encode=function(t){const e=n.from([i.InputTypes.PARTIAL_SIG]);return{key:n.concat([e,t.pubkey]),value:t.signature}},e.expected="{ pubkey: Buffer; signature: Buffer; }",e.check=function(t){return n.isBuffer(t.pubkey)&&n.isBuffer(t.signature)&&[33,65].includes(t.pubkey.length)&&[2,3,4].includes(t.pubkey[0])&&function(t){if(!n.isBuffer(t)||t.length<9)return!1;if(48!==t[0])return!1;if(t.length!==t[1]+3)return!1;if(2!==t[2])return!1;const e=t[3];if(e>33||e<1)return!1;if(2!==t[3+e+1])return!1;const r=t[3+e+2];return!(r>33||r<1)&&t.length===3+e+2+r+2}(t.signature)},e.canAddToArray=function(t,e,r){const n=e.pubkey.toString("hex");return!r.has(n)&&(r.add(n),0===t.filter((t=>t.pubkey.equals(e.pubkey))).length)}},5477:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(5710);e.decode=function(t){if(t.key[0]!==i.InputTypes.POR_COMMITMENT)throw new Error("Decode Error: could not decode porCommitment with key 0x"+t.key.toString("hex"));return t.value.toString("utf8")},e.encode=function(t){return{key:n.from([i.InputTypes.POR_COMMITMENT]),value:n.from(t,"utf8")}},e.expected="string",e.check=function(t){return"string"==typeof t},e.canAdd=function(t,e){return!!t&&!!e&&void 0===t.porCommitment}},2860:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(5710);e.decode=function(t){if(t.key[0]!==i.InputTypes.SIGHASH_TYPE)throw new Error("Decode Error: could not decode sighashType with key 0x"+t.key.toString("hex"));return t.value.readUInt32LE(0)},e.encode=function(t){const e=n.from([i.InputTypes.SIGHASH_TYPE]),r=n.allocUnsafe(4);return r.writeUInt32LE(t,0),{key:e,value:r}},e.expected="number",e.check=function(t){return"number"==typeof t},e.canAdd=function(t,e){return!!t&&!!e&&void 0===t.sighashType}},762:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(5710),o=r(275),s=r(9214);e.decode=function(t){if(t.key[0]!==i.InputTypes.WITNESS_UTXO)throw new Error("Decode Error: could not decode witnessUtxo with key 0x"+t.key.toString("hex"));const e=o.readUInt64LE(t.value,0);let r=8;const n=s.decode(t.value,r);r+=s.encodingLength(n);const a=t.value.slice(r);if(a.length!==n)throw new Error("Decode Error: WITNESS_UTXO script is not proper length");return{script:a,value:e}},e.encode=function(t){const{script:e,value:r}=t,a=s.encodingLength(e.length),u=n.allocUnsafe(8+a+e.length);return o.writeUInt64LE(u,r,0),s.encode(e.length,u,8),e.copy(u,8+a),{key:n.from([i.InputTypes.WITNESS_UTXO]),value:u}},e.expected="{ script: Buffer; value: number; }",e.check=function(t){return n.isBuffer(t.script)&&"number"==typeof t.value},e.canAdd=function(t,e){return!!t&&!!e&&void 0===t.witnessUtxo}},3678:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.makeConverter=function(t){return{decode:function(e){if(e.key[0]!==t)throw new Error("Decode Error: could not decode bip32Derivation with key 0x"+e.key.toString("hex"));if(34!==e.key.length&&66!==e.key.length||![2,3,4].includes(e.key[1]))throw new Error("Decode Error: bip32Derivation has invalid pubkey in key 0x"+e.key.toString("hex"));if(e.value.length/4%1!=0)throw new Error("Decode Error: Input BIP32_DERIVATION value length should be multiple of 4");const r=e.key.slice(1),n={masterFingerprint:e.value.slice(0,4),pubkey:r,path:"m"};for(const t of(i=e.value.length/4-1,[...Array(i).keys()])){const r=e.value.readUInt32LE(4*t+4),i=!!(2147483648&r),o=2147483647&r;n.path+="/"+o.toString(10)+(i?"'":"")}var i;return n},encode:function(e){const r=n.from([t]),i=n.concat([r,e.pubkey]),o=e.path.split("/"),s=n.allocUnsafe(4*o.length);e.masterFingerprint.copy(s,0);let a=4;return o.slice(1).forEach((t=>{const e="'"===t.slice(-1);let r=2147483647&parseInt(e?t.slice(0,-1):t,10);e&&(r+=2147483648),s.writeUInt32LE(r,a),a+=4})),{key:i,value:s}},check:function(t){return n.isBuffer(t.pubkey)&&n.isBuffer(t.masterFingerprint)&&"string"==typeof t.path&&[33,65].includes(t.pubkey.length)&&[2,3,4].includes(t.pubkey[0])&&4===t.masterFingerprint.length},expected:"{ masterFingerprint: Buffer; pubkey: Buffer; path: string; }",canAddToArray:function(t,e,r){const n=e.pubkey.toString("hex");return!r.has(n)&&(r.add(n),0===t.filter((t=>t.pubkey.equals(e.pubkey))).length)}}}},5630:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.makeChecker=function(t){return function(e){let r;if(t.includes(e.key[0])&&(r=e.key.slice(1),33!==r.length&&65!==r.length||![2,3,4].includes(r[0])))throw new Error("Format Error: invalid pubkey in key 0x"+e.key.toString("hex"));return r}}},6981:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.makeConverter=function(t){return{decode:function(e){if(e.key[0]!==t)throw new Error("Decode Error: could not decode redeemScript with key 0x"+e.key.toString("hex"));return e.value},encode:function(e){return{key:n.from([t]),value:e}},check:function(t){return n.isBuffer(t)},expected:"Buffer",canAdd:function(t,e){return!!t&&!!e&&void 0===t.redeemScript}}}},6912:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.makeConverter=function(t){return{decode:function(e){if(e.key[0]!==t)throw new Error("Decode Error: could not decode witnessScript with key 0x"+e.key.toString("hex"));return e.value},encode:function(e){return{key:n.from([t]),value:e}},check:function(t){return n.isBuffer(t)},expected:"Buffer",canAdd:function(t,e){return!!t&&!!e&&void 0===t.witnessScript}}}},275:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(9214);function o(t){const e=t.key.length,r=t.value.length,o=i.encodingLength(e),s=i.encodingLength(r),a=n.allocUnsafe(o+e+s+r);return i.encode(e,a,0),t.key.copy(a,o),i.encode(r,a,o+e),t.value.copy(a,o+e+s),a}function s(t,e){if("number"!=typeof t)throw new Error("cannot write a non-number as a number");if(t<0)throw new Error("specified a negative value for writing an unsigned value");if(t>e)throw new Error("RangeError: value out of range");if(Math.floor(t)!==t)throw new Error("value has a fractional component")}e.range=t=>[...Array(t).keys()],e.reverseBuffer=function(t){if(t.length<1)return t;let e=t.length-1,r=0;for(let n=0;n<t.length/2;n++)r=t[n],t[n]=t[e],t[e]=r,e--;return t},e.keyValsToBuffer=function(t){const e=t.map(o);return e.push(n.from([0])),n.concat(e)},e.keyValToBuffer=o,e.readUInt64LE=function(t,e){const r=t.readUInt32LE(e);let n=t.readUInt32LE(e+4);return n*=4294967296,s(n+r,9007199254740991),n+r},e.writeUInt64LE=function(t,e,r){return s(e,9007199254740991),t.writeInt32LE(-1&e,r),t.writeUInt32LE(Math.floor(e/4294967296),r+4),r+8}},9214:(t,e,r)=>{"use strict";var n=r(8834).Buffer;function i(t){if(t<0||t>9007199254740991||t%1!=0)throw new RangeError("value out of range")}function o(t){return i(t),t<253?1:t<=65535?3:t<=4294967295?5:9}Object.defineProperty(e,"__esModule",{value:!0}),e.encode=function t(e,r,s){if(i(e),r||(r=n.allocUnsafe(o(e))),!n.isBuffer(r))throw new TypeError("buffer must be a Buffer instance");return s||(s=0),e<253?(r.writeUInt8(e,s),Object.assign(t,{bytes:1})):e<=65535?(r.writeUInt8(253,s),r.writeUInt16LE(e,s+1),Object.assign(t,{bytes:3})):e<=4294967295?(r.writeUInt8(254,s),r.writeUInt32LE(e,s+1),Object.assign(t,{bytes:5})):(r.writeUInt8(255,s),r.writeUInt32LE(e>>>0,s+1),r.writeUInt32LE(e/4294967296|0,s+5),Object.assign(t,{bytes:9})),r},e.decode=function t(e,r){if(!n.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");r||(r=0);const o=e.readUInt8(r);if(o<253)return Object.assign(t,{bytes:1}),o;if(253===o)return Object.assign(t,{bytes:3}),e.readUInt16LE(r+1);if(254===o)return Object.assign(t,{bytes:5}),e.readUInt32LE(r+1);{Object.assign(t,{bytes:9});const n=e.readUInt32LE(r+1),o=4294967296*e.readUInt32LE(r+5)+n;return i(o),o}},e.encodingLength=o},9988:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(1661),o=r(275),s=r(9214),a=r(5710);function u(t,e,r){if(!e.equals(n.from([r])))throw new Error(`Format Error: Invalid ${t} key: ${e.toString("hex")}`)}function c(t,{globalMapKeyVals:e,inputKeyVals:r,outputKeyVals:n}){const s={unsignedTx:t};let c=0;for(const t of e)switch(t.key[0]){case a.GlobalTypes.UNSIGNED_TX:if(u("global",t.key,a.GlobalTypes.UNSIGNED_TX),c>0)throw new Error("Format Error: GlobalMap has multiple UNSIGNED_TX");c++;break;case a.GlobalTypes.GLOBAL_XPUB:void 0===s.globalXpub&&(s.globalXpub=[]),s.globalXpub.push(i.globals.globalXpub.decode(t));break;default:s.unknownKeyVals||(s.unknownKeyVals=[]),s.unknownKeyVals.push(t)}const f=r.length,h=n.length,l=[],p=[];for(const t of o.range(f)){const e={};for(const n of r[t])switch(i.inputs.checkPubkey(n),n.key[0]){case a.InputTypes.NON_WITNESS_UTXO:if(u("input",n.key,a.InputTypes.NON_WITNESS_UTXO),void 0!==e.nonWitnessUtxo)throw new Error("Format Error: Input has multiple NON_WITNESS_UTXO");e.nonWitnessUtxo=i.inputs.nonWitnessUtxo.decode(n);break;case a.InputTypes.WITNESS_UTXO:if(u("input",n.key,a.InputTypes.WITNESS_UTXO),void 0!==e.witnessUtxo)throw new Error("Format Error: Input has multiple WITNESS_UTXO");e.witnessUtxo=i.inputs.witnessUtxo.decode(n);break;case a.InputTypes.PARTIAL_SIG:void 0===e.partialSig&&(e.partialSig=[]),e.partialSig.push(i.inputs.partialSig.decode(n));break;case a.InputTypes.SIGHASH_TYPE:if(u("input",n.key,a.InputTypes.SIGHASH_TYPE),void 0!==e.sighashType)throw new Error("Format Error: Input has multiple SIGHASH_TYPE");e.sighashType=i.inputs.sighashType.decode(n);break;case a.InputTypes.REDEEM_SCRIPT:if(u("input",n.key,a.InputTypes.REDEEM_SCRIPT),void 0!==e.redeemScript)throw new Error("Format Error: Input has multiple REDEEM_SCRIPT");e.redeemScript=i.inputs.redeemScript.decode(n);break;case a.InputTypes.WITNESS_SCRIPT:if(u("input",n.key,a.InputTypes.WITNESS_SCRIPT),void 0!==e.witnessScript)throw new Error("Format Error: Input has multiple WITNESS_SCRIPT");e.witnessScript=i.inputs.witnessScript.decode(n);break;case a.InputTypes.BIP32_DERIVATION:void 0===e.bip32Derivation&&(e.bip32Derivation=[]),e.bip32Derivation.push(i.inputs.bip32Derivation.decode(n));break;case a.InputTypes.FINAL_SCRIPTSIG:u("input",n.key,a.InputTypes.FINAL_SCRIPTSIG),e.finalScriptSig=i.inputs.finalScriptSig.decode(n);break;case a.InputTypes.FINAL_SCRIPTWITNESS:u("input",n.key,a.InputTypes.FINAL_SCRIPTWITNESS),e.finalScriptWitness=i.inputs.finalScriptWitness.decode(n);break;case a.InputTypes.POR_COMMITMENT:u("input",n.key,a.InputTypes.POR_COMMITMENT),e.porCommitment=i.inputs.porCommitment.decode(n);break;default:e.unknownKeyVals||(e.unknownKeyVals=[]),e.unknownKeyVals.push(n)}l.push(e)}for(const t of o.range(h)){const e={};for(const r of n[t])switch(i.outputs.checkPubkey(r),r.key[0]){case a.OutputTypes.REDEEM_SCRIPT:if(u("output",r.key,a.OutputTypes.REDEEM_SCRIPT),void 0!==e.redeemScript)throw new Error("Format Error: Output has multiple REDEEM_SCRIPT");e.redeemScript=i.outputs.redeemScript.decode(r);break;case a.OutputTypes.WITNESS_SCRIPT:if(u("output",r.key,a.OutputTypes.WITNESS_SCRIPT),void 0!==e.witnessScript)throw new Error("Format Error: Output has multiple WITNESS_SCRIPT");e.witnessScript=i.outputs.witnessScript.decode(r);break;case a.OutputTypes.BIP32_DERIVATION:void 0===e.bip32Derivation&&(e.bip32Derivation=[]),e.bip32Derivation.push(i.outputs.bip32Derivation.decode(r));break;default:e.unknownKeyVals||(e.unknownKeyVals=[]),e.unknownKeyVals.push(r)}p.push(e)}return{globalMap:s,inputs:l,outputs:p}}e.psbtFromBuffer=function(t,e){let r=0;function n(){const e=s.decode(t,r);r+=s.encodingLength(e);const n=t.slice(r,r+e);return r+=e,n}function i(){return{key:n(),value:n()}}function u(){if(r>=t.length)throw new Error("Format Error: Unexpected End of PSBT");const e=0===t.readUInt8(r);return e&&r++,e}if(1886610036!==function(){const e=t.readUInt32BE(r);return r+=4,e}())throw new Error("Format Error: Invalid Magic Number");if(255!==function(){const e=t.readUInt8(r);return r+=1,e}())throw new Error("Format Error: Magic Number must be followed by 0xff separator");const f=[],h={};for(;!u();){const t=i(),e=t.key.toString("hex");if(h[e])throw new Error("Format Error: Keys must be unique for global keymap: key "+e);h[e]=1,f.push(t)}const l=f.filter((t=>t.key[0]===a.GlobalTypes.UNSIGNED_TX));if(1!==l.length)throw new Error("Format Error: Only one UNSIGNED_TX allowed");const p=e(l[0].value),{inputCount:d,outputCount:g}=p.getInputOutputCounts(),y=[],b=[];for(const t of o.range(d)){const e={},r=[];for(;!u();){const n=i(),o=n.key.toString("hex");if(e[o])throw new Error("Format Error: Keys must be unique for each input: input index "+t+" key "+o);e[o]=1,r.push(n)}y.push(r)}for(const t of o.range(g)){const e={},r=[];for(;!u();){const n=i(),o=n.key.toString("hex");if(e[o])throw new Error("Format Error: Keys must be unique for each output: output index "+t+" key "+o);e[o]=1,r.push(n)}b.push(r)}return c(p,{globalMapKeyVals:f,inputKeyVals:y,outputKeyVals:b})},e.checkKeyBuffer=u,e.psbtFromKeyVals=c},1425:(t,e,r)=>{"use strict";function n(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}Object.defineProperty(e,"__esModule",{value:!0}),n(r(9988)),n(r(268))},268:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(1661),o=r(275);e.psbtToBuffer=function({globalMap:t,inputs:e,outputs:r}){const{globalKeyVals:i,inputKeyVals:s,outputKeyVals:a}=u({globalMap:t,inputs:e,outputs:r}),c=o.keyValsToBuffer(i),f=t=>0===t.length?[n.from([0])]:t.map(o.keyValsToBuffer),h=f(s),l=f(a),p=n.allocUnsafe(5);return p.writeUIntBE(482972169471,0,5),n.concat([p,c].concat(h,l))};const s=(t,e)=>t.key.compare(e.key);function a(t,e){const r=new Set,n=Object.entries(t).reduce(((t,[n,i])=>{if("unknownKeyVals"===n)return t;const o=e[n];if(void 0===o)return t;const s=(Array.isArray(i)?i:[i]).map(o.encode);return s.map((t=>t.key.toString("hex"))).forEach((t=>{if(r.has(t))throw new Error("Serialize Error: Duplicate key: "+t);r.add(t)})),t.concat(s)}),[]),i=t.unknownKeyVals?t.unknownKeyVals.filter((t=>!r.has(t.key.toString("hex")))):[];return n.concat(i).sort(s)}function u({globalMap:t,inputs:e,outputs:r}){return{globalKeyVals:a(t,i.globals),inputKeyVals:e.map((t=>a(t,i.inputs))),outputKeyVals:r.map((t=>a(t,i.outputs)))}}e.psbtToKeyVals=u},8174:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(6989),o=r(1425),s=r(5710),a=r(5639);e.Psbt=class{constructor(t){this.inputs=[],this.outputs=[],this.globalMap={unsignedTx:t}}static fromBase64(t,e){const r=n.from(t,"base64");return this.fromBuffer(r,e)}static fromHex(t,e){const r=n.from(t,"hex");return this.fromBuffer(r,e)}static fromBuffer(t,e){const r=o.psbtFromBuffer(t,e),n=new this(r.globalMap.unsignedTx);return Object.assign(n,r),n}toBase64(){return this.toBuffer().toString("base64")}toHex(){return this.toBuffer().toString("hex")}toBuffer(){return o.psbtToBuffer(this)}updateGlobal(t){return a.updateGlobal(t,this.globalMap),this}updateInput(t,e){const r=a.checkForInput(this.inputs,t);return a.updateInput(e,r),this}updateOutput(t,e){const r=a.checkForOutput(this.outputs,t);return a.updateOutput(e,r),this}addUnknownKeyValToGlobal(t){return a.checkHasKey(t,this.globalMap.unknownKeyVals,a.getEnumLength(s.GlobalTypes)),this.globalMap.unknownKeyVals||(this.globalMap.unknownKeyVals=[]),this.globalMap.unknownKeyVals.push(t),this}addUnknownKeyValToInput(t,e){const r=a.checkForInput(this.inputs,t);return a.checkHasKey(e,r.unknownKeyVals,a.getEnumLength(s.InputTypes)),r.unknownKeyVals||(r.unknownKeyVals=[]),r.unknownKeyVals.push(e),this}addUnknownKeyValToOutput(t,e){const r=a.checkForOutput(this.outputs,t);return a.checkHasKey(e,r.unknownKeyVals,a.getEnumLength(s.OutputTypes)),r.unknownKeyVals||(r.unknownKeyVals=[]),r.unknownKeyVals.push(e),this}addInput(t){this.globalMap.unsignedTx.addInput(t),this.inputs.push({unknownKeyVals:[]});const e=t.unknownKeyVals||[],r=this.inputs.length-1;if(!Array.isArray(e))throw new Error("unknownKeyVals must be an Array");return e.forEach((t=>this.addUnknownKeyValToInput(r,t))),a.addInputAttributes(this.inputs,t),this}addOutput(t){this.globalMap.unsignedTx.addOutput(t),this.outputs.push({unknownKeyVals:[]});const e=t.unknownKeyVals||[],r=this.outputs.length-1;if(!Array.isArray(e))throw new Error("unknownKeyVals must be an Array");return e.forEach((t=>this.addUnknownKeyValToInput(r,t))),a.addOutputAttributes(this.outputs,t),this}clearFinalizedInput(t){const e=a.checkForInput(this.inputs,t);a.inputCheckUncleanFinalized(t,e);for(const t of Object.keys(e))["witnessUtxo","nonWitnessUtxo","finalScriptSig","finalScriptWitness","unknownKeyVals"].includes(t)||delete e[t];return this}combine(...t){const e=i.combine([this].concat(t));return Object.assign(this,e),this}getTransaction(){return this.globalMap.unsignedTx.toBuffer()}}},5710:(t,e)=>{"use strict";var r,n,i;Object.defineProperty(e,"__esModule",{value:!0}),(i=e.GlobalTypes||(e.GlobalTypes={}))[i.UNSIGNED_TX=0]="UNSIGNED_TX",i[i.GLOBAL_XPUB=1]="GLOBAL_XPUB",e.GLOBAL_TYPE_NAMES=["unsignedTx","globalXpub"],(n=e.InputTypes||(e.InputTypes={}))[n.NON_WITNESS_UTXO=0]="NON_WITNESS_UTXO",n[n.WITNESS_UTXO=1]="WITNESS_UTXO",n[n.PARTIAL_SIG=2]="PARTIAL_SIG",n[n.SIGHASH_TYPE=3]="SIGHASH_TYPE",n[n.REDEEM_SCRIPT=4]="REDEEM_SCRIPT",n[n.WITNESS_SCRIPT=5]="WITNESS_SCRIPT",n[n.BIP32_DERIVATION=6]="BIP32_DERIVATION",n[n.FINAL_SCRIPTSIG=7]="FINAL_SCRIPTSIG",n[n.FINAL_SCRIPTWITNESS=8]="FINAL_SCRIPTWITNESS",n[n.POR_COMMITMENT=9]="POR_COMMITMENT",e.INPUT_TYPE_NAMES=["nonWitnessUtxo","witnessUtxo","partialSig","sighashType","redeemScript","witnessScript","bip32Derivation","finalScriptSig","finalScriptWitness","porCommitment"],(r=e.OutputTypes||(e.OutputTypes={}))[r.REDEEM_SCRIPT=0]="REDEEM_SCRIPT",r[r.WITNESS_SCRIPT=1]="WITNESS_SCRIPT",r[r.BIP32_DERIVATION=2]="BIP32_DERIVATION",e.OUTPUT_TYPE_NAMES=["redeemScript","witnessScript","bip32Derivation"]},5639:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(1661);function o(t,e){const r=t[e];if(void 0===r)throw new Error(`No input #${e}`);return r}function s(t,e,r,n){throw new Error(`Data for ${t} key ${e} is incorrect: Expected ${r} and got ${JSON.stringify(n)}`)}function a(t){return(e,r)=>{for(const n of Object.keys(e)){const o=e[n],{canAdd:a,canAddToArray:u,check:c,expected:f}=i[t+"s"][n]||{},h=!!u;if(c)if(h){if(!Array.isArray(o)||r[n]&&!Array.isArray(r[n]))throw new Error(`Key type ${n} must be an array`);o.every(c)||s(t,n,f,o);const e=r[n]||[],i=new Set;if(!o.every((t=>u(e,t,i))))throw new Error("Can not add duplicate data to array");r[n]=e.concat(o)}else{if(c(o)||s(t,n,f,o),!a(r,o))throw new Error(`Can not add duplicate data to ${t}`);r[n]=o}}}}e.checkForInput=o,e.checkForOutput=function(t,e){const r=t[e];if(void 0===r)throw new Error(`No output #${e}`);return r},e.checkHasKey=function(t,e,r){if(t.key[0]<r)throw new Error("Use the method for your specific key instead of addUnknownKeyVal*");if(e&&0!==e.filter((e=>e.key.equals(t.key))).length)throw new Error(`Duplicate Key: ${t.key.toString("hex")}`)},e.getEnumLength=function(t){let e=0;return Object.keys(t).forEach((t=>{Number(isNaN(Number(t)))&&e++})),e},e.inputCheckUncleanFinalized=function(t,e){let r=!1;if(e.nonWitnessUtxo||e.witnessUtxo){const t=!!e.redeemScript,n=!!e.witnessScript,i=!t||!!e.finalScriptSig,o=!n||!!e.finalScriptWitness,s=!!e.finalScriptSig||!!e.finalScriptWitness;r=i&&o&&s}if(!1===r)throw new Error(`Input #${t} has too much or too little data to clean`)},e.updateGlobal=a("global"),e.updateInput=a("input"),e.updateOutput=a("output"),e.addInputAttributes=function(t,r){const n=o(t,t.length-1);e.updateInput(r,n)},e.addOutputAttributes=function(t,r){const n=o(t,t.length-1);e.updateOutput(r,n)},e.defaultVersionSetter=function(t,e){if(!n.isBuffer(e)||e.length<4)throw new Error("Set Version: Invalid Transaction");return e.writeUInt32LE(t,0),e},e.defaultLocktimeSetter=function(t,e){if(!n.isBuffer(e)||e.length<4)throw new Error("Set Locktime: Invalid Transaction");return e.writeUInt32LE(t,e.length-4),e}},6015:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0});const i=r(3527),o=r(4075),s=r(701),a=r(9031),u=r(1384),c=a.BufferN(32),f=a.compile({wif:a.UInt8,bip32:{public:a.UInt32,private:a.UInt32}}),h={messagePrefix:"Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},l=2147483648,p=Math.pow(2,31)-1;function d(t){return a.String(t)&&null!==t.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}function g(t){return a.UInt32(t)&&t<=p}class y{constructor(t,e,r,n,i=0,o=0,s=0){this.__D=t,this.__Q=e,this.chainCode=r,this.network=n,this.__DEPTH=i,this.__INDEX=o,this.__PARENT_FINGERPRINT=s,a(f,n),this.lowR=!1}get depth(){return this.__DEPTH}get index(){return this.__INDEX}get parentFingerprint(){return this.__PARENT_FINGERPRINT}get publicKey(){return void 0===this.__Q&&(this.__Q=s.pointFromScalar(this.__D,!0)),this.__Q}get privateKey(){return this.__D}get identifier(){return i.hash160(this.publicKey)}get fingerprint(){return this.identifier.slice(0,4)}get compressed(){return!0}isNeutered(){return void 0===this.__D}neutered(){return v(this.publicKey,this.chainCode,this.network,this.depth,this.index,this.parentFingerprint)}toBase58(){const t=this.network,e=this.isNeutered()?t.bip32.public:t.bip32.private,r=n.allocUnsafe(78);return r.writeUInt32BE(e,0),r.writeUInt8(this.depth,4),r.writeUInt32BE(this.parentFingerprint,5),r.writeUInt32BE(this.index,9),this.chainCode.copy(r,13),this.isNeutered()?this.publicKey.copy(r,45):(r.writeUInt8(0,45),this.privateKey.copy(r,46)),o.encode(r)}toWIF(){if(!this.privateKey)throw new TypeError("Missing private key");return u.encode(this.network.wif,this.privateKey,!0)}derive(t){a(a.UInt32,t);const e=t>=l,r=n.allocUnsafe(37);if(e){if(this.isNeutered())throw new TypeError("Missing private key for hardened child key");r[0]=0,this.privateKey.copy(r,1),r.writeUInt32BE(t,33)}else this.publicKey.copy(r,0),r.writeUInt32BE(t,33);const o=i.hmacSHA512(this.chainCode,r),u=o.slice(0,32),c=o.slice(32);if(!s.isPrivate(u))return this.derive(t+1);let f;if(this.isNeutered()){const e=s.pointAddScalar(this.publicKey,u,!0);if(null===e)return this.derive(t+1);f=v(e,c,this.network,this.depth+1,t,this.fingerprint.readUInt32BE(0))}else{const e=s.privateAdd(this.privateKey,u);if(null==e)return this.derive(t+1);f=m(e,c,this.network,this.depth+1,t,this.fingerprint.readUInt32BE(0))}return f}deriveHardened(t){return a(g,t),this.derive(t+l)}derivePath(t){a(d,t);let e=t.split("/");if("m"===e[0]){if(this.parentFingerprint)throw new TypeError("Expected master, got child");e=e.slice(1)}return e.reduce(((t,e)=>{let r;return"'"===e.slice(-1)?(r=parseInt(e.slice(0,-1),10),t.deriveHardened(r)):(r=parseInt(e,10),t.derive(r))}),this)}sign(t,e){if(!this.privateKey)throw new Error("Missing private key");if(void 0===e&&(e=this.lowR),!1===e)return s.sign(t,this.privateKey);{let e=s.sign(t,this.privateKey);const r=n.alloc(32,0);let i=0;for(;e[0]>127;)i++,r.writeUIntLE(i,0,6),e=s.signWithEntropy(t,this.privateKey,r);return e}}verify(t,e){return s.verify(t,this.publicKey,e)}}function b(t,e,r){return m(t,e,r)}function m(t,e,r,n,i,o){if(a({privateKey:c,chainCode:c},{privateKey:t,chainCode:e}),r=r||h,!s.isPrivate(t))throw new TypeError("Private key not in range [1, n)");return new y(t,void 0,e,r,n,i,o)}function v(t,e,r,n,i,o){if(a({publicKey:a.BufferN(33),chainCode:c},{publicKey:t,chainCode:e}),r=r||h,!s.isPoint(t))throw new TypeError("Point is not on the curve");return new y(void 0,t,e,r,n,i,o)}e.fromBase58=function(t,e){const r=o.decode(t);if(78!==r.length)throw new TypeError("Invalid buffer length");e=e||h;const n=r.readUInt32BE(0);if(n!==e.bip32.private&&n!==e.bip32.public)throw new TypeError("Invalid network version");const i=r[4],s=r.readUInt32BE(5);if(0===i&&0!==s)throw new TypeError("Invalid parent fingerprint");const a=r.readUInt32BE(9);if(0===i&&0!==a)throw new TypeError("Invalid index");const u=r.slice(13,45);let c;if(n===e.bip32.private){if(0!==r.readUInt8(45))throw new TypeError("Invalid private key");c=m(r.slice(46,78),u,e,i,a,s)}else c=v(r.slice(45,78),u,e,i,a,s);return c},e.fromPrivateKey=b,e.fromPublicKey=function(t,e,r){return v(t,e,r)},e.fromSeed=function(t,e){if(a(a.Buffer,t),t.length<16)throw new TypeError("Seed should be at least 128 bits");if(t.length>64)throw new TypeError("Seed should be at most 512 bits");e=e||h;const r=i.hmacSHA512(n.from("Bitcoin seed","utf8"),t);return b(r.slice(0,32),r.slice(32),e)}},3527:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});const n=r(6162),i=r(11);e.hash160=function(t){const e=n("sha256").update(t).digest();try{return n("rmd160").update(e).digest()}catch(t){return n("ripemd160").update(e).digest()}},e.hmacSHA512=function(t,e){return i("sha512",t).update(e).digest()}},4132:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(6015);e.fromSeed=n.fromSeed,e.fromBase58=n.fromBase58,e.fromPublicKey=n.fromPublicKey,e.fromPrivateKey=n.fromPrivateKey},9875:(t,e,r)=>{var n=r(7834).Buffer;t.exports={check:function(t){if(t.length<8)return!1;if(t.length>72)return!1;if(48!==t[0])return!1;if(t[1]!==t.length-2)return!1;if(2!==t[2])return!1;var e=t[3];if(0===e)return!1;if(5+e>=t.length)return!1;if(2!==t[4+e])return!1;var r=t[5+e];return!(0===r||6+e+r!==t.length||128&t[4]||e>1&&0===t[4]&&!(128&t[5])||128&t[e+6]||r>1&&0===t[e+6]&&!(128&t[e+7]))},decode:function(t){if(t.length<8)throw new Error("DER sequence length is too short");if(t.length>72)throw new Error("DER sequence length is too long");if(48!==t[0])throw new Error("Expected DER sequence");if(t[1]!==t.length-2)throw new Error("DER sequence length is invalid");if(2!==t[2])throw new Error("Expected DER integer");var e=t[3];if(0===e)throw new Error("R length is zero");if(5+e>=t.length)throw new Error("R length is too long");if(2!==t[4+e])throw new Error("Expected DER integer (2)");var r=t[5+e];if(0===r)throw new Error("S length is zero");if(6+e+r!==t.length)throw new Error("S length is invalid");if(128&t[4])throw new Error("R value is negative");if(e>1&&0===t[4]&&!(128&t[5]))throw new Error("R value excessively padded");if(128&t[e+6])throw new Error("S value is negative");if(r>1&&0===t[e+6]&&!(128&t[e+7]))throw new Error("S value excessively padded");return{r:t.slice(4,4+e),s:t.slice(6+e)}},encode:function(t,e){var r=t.length,i=e.length;if(0===r)throw new Error("R length is zero");if(0===i)throw new Error("S length is zero");if(r>33)throw new Error("R length is too long");if(i>33)throw new Error("S length is too long");if(128&t[0])throw new Error("R value is negative");if(128&e[0])throw new Error("S value is negative");if(r>1&&0===t[0]&&!(128&t[1]))throw new Error("R value excessively padded");if(i>1&&0===e[0]&&!(128&e[1]))throw new Error("S value excessively padded");var o=n.allocUnsafe(6+r+i);return o[0]=48,o[1]=o.length-2,o[2]=2,o[3]=t.length,t.copy(o,4),o[4+r]=2,o[5+r]=e.length,e.copy(o,6+r),o}}},7401:(t,e,r)=>{var n=r(196),i={};for(var o in n)i[n[o]]=o;t.exports=i},4362:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.bech32m=e.bech32=void 0;const r="qpzry9x8gf2tvdw0s3jn54khce6mua7l",n={};for(let t=0;t<r.length;t++){const e=r.charAt(t);n[e]=t}function i(t){const e=t>>25;return(33554431&t)<<5^996825010&-(e>>0&1)^642813549&-(e>>1&1)^513874426&-(e>>2&1)^1027748829&-(e>>3&1)^705979059&-(e>>4&1)}function o(t){let e=1;for(let r=0;r<t.length;++r){const n=t.charCodeAt(r);if(n<33||n>126)return"Invalid prefix ("+t+")";e=i(e)^n>>5}e=i(e);for(let r=0;r<t.length;++r){const n=t.charCodeAt(r);e=i(e)^31&n}return e}function s(t,e,r,n){let i=0,o=0;const s=(1<<r)-1,a=[];for(let n=0;n<t.length;++n)for(i=i<<e|t[n],o+=e;o>=r;)o-=r,a.push(i>>o&s);if(n)o>0&&a.push(i<<r-o&s);else{if(o>=e)return"Excess padding";if(i<<r-o&s)return"Non-zero padding"}return a}function a(t){return s(t,8,5,!0)}function u(t){const e=s(t,5,8,!1);if(Array.isArray(e))return e}function c(t){const e=s(t,5,8,!1);if(Array.isArray(e))return e;throw new Error(e)}function f(t){let e;function s(t,r){if(r=r||90,t.length<8)return t+" too short";if(t.length>r)return"Exceeds length limit";const s=t.toLowerCase(),a=t.toUpperCase();if(t!==s&&t!==a)return"Mixed-case string "+t;const u=(t=s).lastIndexOf("1");if(-1===u)return"No separator character for "+t;if(0===u)return"Missing prefix for "+t;const c=t.slice(0,u),f=t.slice(u+1);if(f.length<6)return"Data too short";let h=o(c);if("string"==typeof h)return h;const l=[];for(let t=0;t<f.length;++t){const e=f.charAt(t),r=n[e];if(void 0===r)return"Unknown character "+e;h=i(h)^r,t+6>=f.length||l.push(r)}return h!==e?"Invalid checksum for "+t:{prefix:c,words:l}}return e="bech32"===t?1:734539939,{decodeUnsafe:function(t,e){const r=s(t,e);if("object"==typeof r)return r},decode:function(t,e){const r=s(t,e);if("object"==typeof r)return r;throw new Error(r)},encode:function(t,n,s){if(s=s||90,t.length+7+n.length>s)throw new TypeError("Exceeds length limit");let a=o(t=t.toLowerCase());if("string"==typeof a)throw new Error(a);let u=t+"1";for(let t=0;t<n.length;++t){const e=n[t];if(e>>5!=0)throw new Error("Non 5-bit word");a=i(a)^e,u+=r.charAt(e)}for(let t=0;t<6;++t)a=i(a);a^=e;for(let t=0;t<6;++t)u+=r.charAt(a>>5*(5-t)&31);return u},toWords:a,fromWordsUnsafe:u,fromWords:c}}e.bech32=f("bech32"),e.bech32m=f("bech32m")},9168:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.toOutputScript=e.fromOutputScript=e.toBech32=e.toBase58Check=e.fromBech32=e.fromBase58Check=void 0;const i=r(419),o=r(6469),s=r(3016),a=r(6168),{bech32:u,bech32m:c}=r(4362),f=r(4075),h=r(9031);function l(t){const e=f.decode(t);if(e.length<21)throw new TypeError(t+" is too short");if(e.length>21)throw new TypeError(t+" is too long");return{version:e.readUInt8(0),hash:e.slice(1)}}function p(t){let e,r;try{e=u.decode(t)}catch(t){}if(e){if(r=e.words[0],0!==r)throw new TypeError(t+" uses wrong encoding")}else if(e=c.decode(t),r=e.words[0],0===r)throw new TypeError(t+" uses wrong encoding");const i=u.fromWords(e.words.slice(1));return{version:r,prefix:e.prefix,data:n.from(i)}}function d(t,e,r){const n=u.toWords(t);return n.unshift(e),0===e?u.encode(r,n):c.encode(r,n)}e.fromBase58Check=l,e.fromBech32=p,e.toBase58Check=function(t,e){h(a.tuple(a.Hash160bit,a.UInt8),arguments);const r=n.allocUnsafe(21);return r.writeUInt8(e,0),t.copy(r,1),f.encode(r)},e.toBech32=d,e.fromOutputScript=function(t,e){e=e||i.bitcoin;try{return o.p2pkh({output:t,network:e}).address}catch(t){}try{return o.p2sh({output:t,network:e}).address}catch(t){}try{return o.p2wpkh({output:t,network:e}).address}catch(t){}try{return o.p2wsh({output:t,network:e}).address}catch(t){}try{return o.p2tr({output:t,network:e}).address}catch(t){}try{return function(t,e){const r=t.slice(2);if(r.length<2||r.length>40)throw new TypeError("Invalid program length for segwit address");const n=t[0]-80;if(n<1||n>16)throw new TypeError("Invalid version for segwit address");if(t[1]!==r.length)throw new TypeError("Invalid script for segwit address");return d(r,n,e.bech32)}(t,e)}catch(t){}throw new Error(s.toASM(t)+" has no matching Address")},e.toOutputScript=function(t,e){let r,n;e=e||i.bitcoin;try{r=l(t)}catch(t){}if(r){if(r.version===e.pubKeyHash)return o.p2pkh({hash:r.hash}).output;if(r.version===e.scriptHash)return o.p2sh({hash:r.hash}).output}else{try{n=p(t)}catch(t){}if(n){if(n.prefix!==e.bech32)throw new Error(t+" has an invalid prefix");if(0===n.version){if(20===n.data.length)return o.p2wpkh({hash:n.data}).output;if(32===n.data.length)return o.p2wsh({hash:n.data}).output}else if(n.version>=1&&n.version<=16&&n.data.length>=2&&n.data.length<=40)return s.compile([n.version+80,n.data])}}throw new Error(t+" has no matching Script")}},485:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.Block=void 0;const i=r(9359),o=r(2572),s=r(4457),a=r(6168),u=r(7332),c=r(9031),f=r(8595),h=new TypeError("Cannot compute merkle root for zero transactions"),l=new TypeError("Cannot compute witness commit for non-segwit block");class p{constructor(){this.version=1,this.prevHash=void 0,this.merkleRoot=void 0,this.timestamp=0,this.witnessCommit=void 0,this.bits=0,this.nonce=0,this.transactions=void 0}static fromBuffer(t){if(t.length<80)throw new Error("Buffer too small (< 80 bytes)");const e=new i.BufferReader(t),r=new p;if(r.version=e.readInt32(),r.prevHash=e.readSlice(32),r.merkleRoot=e.readSlice(32),r.timestamp=e.readUInt32(),r.bits=e.readUInt32(),r.nonce=e.readUInt32(),80===t.length)return r;const n=()=>{const t=s.Transaction.fromBuffer(e.buffer.slice(e.offset),!0);return e.offset+=t.byteLength(),t},o=e.readVarInt();r.transactions=[];for(let t=0;t<o;++t){const t=n();r.transactions.push(t)}const a=r.getWitnessCommit();return a&&(r.witnessCommit=a),r}static fromHex(t){return p.fromBuffer(n.from(t,"hex"))}static calculateTarget(t){const e=((4278190080&t)>>24)-3,r=8388607&t,i=n.alloc(32,0);return i.writeUIntBE(r,29-e,3),i}static calculateMerkleRoot(t,e){if(c([{getHash:a.Function}],t),0===t.length)throw h;if(e&&!d(t))throw l;const r=t.map((t=>t.getHash(e))),i=u(r,o.hash256);return e?o.hash256(n.concat([i,t[0].ins[0].witness[0]])):i}getWitnessCommit(){if(!d(this.transactions))return null;const t=this.transactions[0].outs.filter((t=>t.script.slice(0,6).equals(n.from("6a24aa21a9ed","hex")))).map((t=>t.script.slice(6,38)));if(0===t.length)return null;const e=t[t.length-1];return e instanceof n&&32===e.length?e:null}hasWitnessCommit(){return this.witnessCommit instanceof n&&32===this.witnessCommit.length||null!==this.getWitnessCommit()}hasWitness(){return(t=this.transactions)instanceof Array&&t.some((t=>"object"==typeof t&&t.ins instanceof Array&&t.ins.some((t=>"object"==typeof t&&t.witness instanceof Array&&t.witness.length>0))));var t}weight(){return 3*this.byteLength(!1,!1)+this.byteLength(!1,!0)}byteLength(t,e=!0){return t||!this.transactions?80:80+f.encodingLength(this.transactions.length)+this.transactions.reduce(((t,r)=>t+r.byteLength(e)),0)}getHash(){return o.hash256(this.toBuffer(!0))}getId(){return(0,i.reverseBuffer)(this.getHash()).toString("hex")}getUTCDate(){const t=new Date(0);return t.setUTCSeconds(this.timestamp),t}toBuffer(t){const e=n.allocUnsafe(this.byteLength(t)),r=new i.BufferWriter(e);return r.writeInt32(this.version),r.writeSlice(this.prevHash),r.writeSlice(this.merkleRoot),r.writeUInt32(this.timestamp),r.writeUInt32(this.bits),r.writeUInt32(this.nonce),t||!this.transactions||(f.encode(this.transactions.length,e,r.offset),r.offset+=f.encode.bytes,this.transactions.forEach((t=>{const n=t.byteLength();t.toBuffer(e,r.offset),r.offset+=n}))),e}toHex(t){return this.toBuffer(t).toString("hex")}checkTxRoots(){const t=this.hasWitnessCommit();return!(!t&&this.hasWitness())&&this.__checkMerkleRoot()&&(!t||this.__checkWitnessCommit())}checkProofOfWork(){const t=(0,i.reverseBuffer)(this.getHash()),e=p.calculateTarget(this.bits);return t.compare(e)<=0}__checkMerkleRoot(){if(!this.transactions)throw h;const t=p.calculateMerkleRoot(this.transactions);return 0===this.merkleRoot.compare(t)}__checkWitnessCommit(){if(!this.transactions)throw h;if(!this.hasWitnessCommit())throw l;const t=p.calculateMerkleRoot(this.transactions,!0);return 0===this.witnessCommit.compare(t)}}function d(t){return t instanceof Array&&t[0]&&t[0].ins&&t[0].ins instanceof Array&&t[0].ins[0]&&t[0].ins[0].witness&&t[0].ins[0].witness instanceof Array&&t[0].ins[0].witness.length>0}e.Block=p},9359:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.BufferReader=e.BufferWriter=e.cloneBuffer=e.reverseBuffer=e.writeUInt64LE=e.readUInt64LE=void 0;const i=r(6168),o=r(9031),s=r(8595);function a(t,e){if("number"!=typeof t)throw new Error("cannot write a non-number as a number");if(t<0)throw new Error("specified a negative value for writing an unsigned value");if(t>e)throw new Error("RangeError: value out of range");if(Math.floor(t)!==t)throw new Error("value has a fractional component")}function u(t,e){const r=t.readUInt32LE(e);let n=t.readUInt32LE(e+4);return n*=4294967296,a(n+r,9007199254740991),n+r}function c(t,e,r){return a(e,9007199254740991),t.writeInt32LE(-1&e,r),t.writeUInt32LE(Math.floor(e/4294967296),r+4),r+8}e.readUInt64LE=u,e.writeUInt64LE=c,e.reverseBuffer=function(t){if(t.length<1)return t;let e=t.length-1,r=0;for(let n=0;n<t.length/2;n++)r=t[n],t[n]=t[e],t[e]=r,e--;return t},e.cloneBuffer=function(t){const e=n.allocUnsafe(t.length);return t.copy(e),e};class f{constructor(t,e=0){this.buffer=t,this.offset=e,o(i.tuple(i.Buffer,i.UInt32),[t,e])}static withCapacity(t){return new f(n.alloc(t))}writeUInt8(t){this.offset=this.buffer.writeUInt8(t,this.offset)}writeInt32(t){this.offset=this.buffer.writeInt32LE(t,this.offset)}writeUInt32(t){this.offset=this.buffer.writeUInt32LE(t,this.offset)}writeUInt64(t){this.offset=c(this.buffer,t,this.offset)}writeVarInt(t){s.encode(t,this.buffer,this.offset),this.offset+=s.encode.bytes}writeSlice(t){if(this.buffer.length<this.offset+t.length)throw new Error("Cannot write slice out of bounds");this.offset+=t.copy(this.buffer,this.offset)}writeVarSlice(t){this.writeVarInt(t.length),this.writeSlice(t)}writeVector(t){this.writeVarInt(t.length),t.forEach((t=>this.writeVarSlice(t)))}end(){if(this.buffer.length===this.offset)return this.buffer;throw new Error(`buffer size ${this.buffer.length}, offset ${this.offset}`)}}e.BufferWriter=f,e.BufferReader=class{constructor(t,e=0){this.buffer=t,this.offset=e,o(i.tuple(i.Buffer,i.UInt32),[t,e])}readUInt8(){const t=this.buffer.readUInt8(this.offset);return this.offset++,t}readInt32(){const t=this.buffer.readInt32LE(this.offset);return this.offset+=4,t}readUInt32(){const t=this.buffer.readUInt32LE(this.offset);return this.offset+=4,t}readUInt64(){const t=u(this.buffer,this.offset);return this.offset+=8,t}readVarInt(){const t=s.decode(this.buffer,this.offset);return this.offset+=s.decode.bytes,t}readSlice(t){if(this.buffer.length<this.offset+t)throw new Error("Cannot read slice out of bounds");const e=this.buffer.slice(this.offset,this.offset+t);return this.offset+=t,e}readVarSlice(){return this.readSlice(this.readVarInt())}readVector(){const t=this.readVarInt(),e=[];for(let r=0;r<t;r++)e.push(this.readVarSlice());return e}}},4654:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.types=e.witness=e.output=e.input=void 0;const n=r(3016),i=r(3155),o=r(9404),s=r(9177),a=r(6858),u=r(6696),c=r(2840),f=r(6540),h=r(2468),l=r(8387),p=r(9805),d={P2MS:"multisig",NONSTANDARD:"nonstandard",NULLDATA:"nulldata",P2PK:"pubkey",P2PKH:"pubkeyhash",P2SH:"scripthash",P2WPKH:"witnesspubkeyhash",P2WSH:"witnessscripthash",P2TR:"taproot",P2TR_NS:"taprootnofn",WITNESS_COMMITMENT:"witnesscommitment"};e.types=d,e.output=function(t){if(l.output.check(t))return d.P2WPKH;if(p.output.check(t))return d.P2WSH;if(c.output.check(t))return d.P2TR;if(a.output.check(t))return d.P2PKH;if(u.output.check(t))return d.P2SH;const e=(0,n.decompile)(t);if(!e)throw new TypeError("Invalid script");return f.output.check(e)?d.P2TR_NS:i.output.check(e)?d.P2MS:s.output.check(e)?d.P2PK:h.output.check(e)?d.WITNESS_COMMITMENT:o.output.check(e)?d.NULLDATA:d.NONSTANDARD},e.input=function(t,e){const r=(0,n.decompile)(t);if(!r)throw new TypeError("Invalid script");return a.input.check(r)?d.P2PKH:u.input.check(r,e)?d.P2SH:f.input.check(r,e)?d.P2TR_NS:i.input.check(r,e)?d.P2MS:s.input.check(r)?d.P2PK:d.NONSTANDARD},e.witness=function(t,e){const r=(0,n.decompile)(t);if(!r)throw new TypeError("Invalid script");return l.input.check(r)?d.P2WPKH:p.input.check(r,e)?d.P2WSH:c.input.check(r)?d.P2TR:d.NONSTANDARD}},2572:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.hash256=e.hash160=e.sha256=e.sha1=e.ripemd160=void 0;const n=r(6162);function i(t){try{return n("rmd160").update(t).digest()}catch(e){return n("ripemd160").update(t).digest()}}function o(t){return n("sha256").update(t).digest()}e.ripemd160=i,e.sha1=function(t){return n("sha1").update(t).digest()},e.sha256=o,e.hash160=function(t){return i(o(t))},e.hash256=function(t){return o(o(t))}},8893:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.fromWIF=e.fromPublicKey=e.fromPrivateKey=e.makeRandom=void 0;const i=r(419),o=r(6168),s=r(701),a=r(5003),u=r(9031),c=r(1384),f=u.maybe(u.compile({compressed:o.maybe(o.Boolean),network:o.maybe(o.Network)}));class h{constructor(t,e,r){this.__D=t,this.__Q=e,this.lowR=!1,void 0===r&&(r={}),this.compressed=void 0===r.compressed||r.compressed,this.network=r.network||i.bitcoin,void 0!==e&&(this.__Q=s.pointCompress(e,this.compressed))}get privateKey(){return this.__D}get publicKey(){return this.__Q||(this.__Q=s.pointFromScalar(this.__D,this.compressed)),this.__Q}toWIF(){if(!this.__D)throw new Error("Missing private key");return c.encode(this.network.wif,this.__D,this.compressed)}sign(t,e){if(!this.__D)throw new Error("Missing private key");if(void 0===e&&(e=this.lowR),!1===e)return s.sign(t,this.__D);{let e=s.sign(t,this.__D);const r=n.alloc(32,0);let i=0;for(;e[0]>127;)i++,r.writeUIntLE(i,0,6),e=s.signWithEntropy(t,this.__D,r);return e}}verify(t,e){return s.verify(t,this.publicKey,e)}}function l(t,e){if(u(o.Buffer256bit,t),!s.isPrivate(t))throw new TypeError("Private key not in range [1, n)");return u(f,e),new h(t,void 0,e)}e.fromPrivateKey=l,e.fromPublicKey=function(t,e){return u(s.isPoint,t),u(f,e),new h(void 0,t,e)},e.fromWIF=function(t,e){const r=c.decode(t),n=r.version;if(o.Array(e)){if(!(e=e.filter((t=>n===t.wif)).pop()))throw new Error("Unknown network version")}else if(e=e||i.bitcoin,n!==e.wif)throw new Error("Invalid network version");return l(r.privateKey,{compressed:r.compressed,network:e})},e.makeRandom=function(t){u(f,t),void 0===t&&(t={});const e=t.rng||a;let r;do{r=e(32),u(o.Buffer256bit,r)}while(!s.isPrivate(r));return l(r,t)}},6314:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TransactionBuilder=e.Transaction=e.opcodes=e.Psbt=e.Block=e.taproot=e.script=e.schnorrBip340=e.payments=e.networks=e.crypto=e.classify=e.bip32=e.address=e.ScriptSignature=e.ECPair=void 0;const n=r(4132);e.bip32=n;const i=r(9168);e.address=i;const o=r(4654);e.classify=o;const s=r(2572);e.crypto=s;const a=r(8893);e.ECPair=a;const u=r(419);e.networks=u;const c=r(6469);e.payments=c;const f=r(4732);e.schnorrBip340=f;const h=r(3016);e.script=h;const l=r(9394);e.ScriptSignature=l;const p=r(3529);e.taproot=p;var d=r(485);Object.defineProperty(e,"Block",{enumerable:!0,get:function(){return d.Block}});var g=r(9468);Object.defineProperty(e,"Psbt",{enumerable:!0,get:function(){return g.Psbt}});var y=r(3016);Object.defineProperty(e,"opcodes",{enumerable:!0,get:function(){return y.OPS}});var b=r(4457);Object.defineProperty(e,"Transaction",{enumerable:!0,get:function(){return b.Transaction}});var m=r(6459);Object.defineProperty(e,"TransactionBuilder",{enumerable:!0,get:function(){return m.TransactionBuilder}})},419:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.testnet=e.regtest=e.bitcoin=void 0,e.bitcoin={messagePrefix:"Bitcoin Signed Message:\n",bech32:"bc",bip32:{public:76067358,private:76066276},pubKeyHash:0,scriptHash:5,wif:128},e.regtest={messagePrefix:"Bitcoin Signed Message:\n",bech32:"bcrt",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239},e.testnet={messagePrefix:"Bitcoin Signed Message:\n",bech32:"tb",bip32:{public:70617039,private:70615956},pubKeyHash:111,scriptHash:196,wif:239}},2916:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.p2data=void 0;const n=r(419),i=r(3016),o=r(8535),s=r(9031),a=i.OPS;e.p2data=function(t,e){if(!t.data&&!t.output)throw new TypeError("Not enough data");e=Object.assign({validate:!0},e||{}),s({network:s.maybe(s.Object),output:s.maybe(s.Buffer),data:s.maybe(s.arrayOf(s.Buffer))},t);const r={name:"embed",network:t.network||n.bitcoin};if(o.prop(r,"output",(()=>{if(t.data)return i.compile([a.OP_RETURN].concat(t.data))})),o.prop(r,"data",(()=>{if(t.output)return i.decompile(t.output).slice(1)})),e.validate&&t.output){const e=i.decompile(t.output);if(e[0]!==a.OP_RETURN)throw new TypeError("Output is invalid");if(!e.slice(1).every(s.Buffer))throw new TypeError("Output is invalid");if(t.data&&!function(t,e){return t.length===e.length&&t.every(((t,r)=>t.equals(e[r])))}(t.data,r.data))throw new TypeError("Data mismatch")}return Object.assign(r,t)}},6469:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.p2wsh=e.p2wpkh=e.p2tr_ns=e.p2tr=e.p2sh=e.p2pkh=e.p2pk=e.p2ms=e.embed=void 0;const n=r(2916);Object.defineProperty(e,"embed",{enumerable:!0,get:function(){return n.p2data}});const i=r(1863);Object.defineProperty(e,"p2ms",{enumerable:!0,get:function(){return i.p2ms}});const o=r(8536);Object.defineProperty(e,"p2pk",{enumerable:!0,get:function(){return o.p2pk}});const s=r(4696);Object.defineProperty(e,"p2pkh",{enumerable:!0,get:function(){return s.p2pkh}});const a=r(743);Object.defineProperty(e,"p2sh",{enumerable:!0,get:function(){return a.p2sh}});const u=r(3358);Object.defineProperty(e,"p2tr",{enumerable:!0,get:function(){return u.p2tr}});const c=r(8707);Object.defineProperty(e,"p2tr_ns",{enumerable:!0,get:function(){return c.p2tr_ns}});const f=r(16);Object.defineProperty(e,"p2wpkh",{enumerable:!0,get:function(){return f.p2wpkh}});const h=r(5732);Object.defineProperty(e,"p2wsh",{enumerable:!0,get:function(){return h.p2wsh}})},8535:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.value=e.prop=void 0,e.prop=function(t,e,r){Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get(){const t=r.call(this);return this[e]=t,t},set(t){Object.defineProperty(this,e,{configurable:!0,enumerable:!0,value:t,writable:!0})}})},e.value=function(t){let e;return()=>(void 0!==e||(e=t()),e)}},1863:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.p2ms=void 0;const n=r(419),i=r(3016),o=r(8535),s=i.OPS,a=r(9031),u=r(701),c=s.OP_RESERVED;function f(t,e){return t.length===e.length&&t.every(((t,r)=>t.equals(e[r])))}e.p2ms=function(t,e){if(!(t.input||t.output||t.pubkeys&&void 0!==t.m||t.signatures))throw new TypeError("Not enough data");function r(t){return i.isCanonicalScriptSignature(t)||void 0!==(e.allowIncomplete&&t===s.OP_0)}e=Object.assign({validate:!0},e||{}),a({network:a.maybe(a.Object),m:a.maybe(a.Number),n:a.maybe(a.Number),output:a.maybe(a.Buffer),pubkeys:a.maybe(a.arrayOf(u.isPoint)),signatures:a.maybe(a.arrayOf(r)),input:a.maybe(a.Buffer)},t);const h={network:t.network||n.bitcoin};let l=[],p=!1;function d(t){p||(p=!0,l=i.decompile(t),h.m=l[0]-c,h.n=l[l.length-2]-c,h.pubkeys=l.slice(1,-2))}if(o.prop(h,"output",(()=>{if(t.m&&h.n&&t.pubkeys)return i.compile([].concat(c+t.m,t.pubkeys,c+h.n,s.OP_CHECKMULTISIG))})),o.prop(h,"m",(()=>{if(h.output)return d(h.output),h.m})),o.prop(h,"n",(()=>{if(h.pubkeys)return h.pubkeys.length})),o.prop(h,"pubkeys",(()=>{if(t.output)return d(t.output),h.pubkeys})),o.prop(h,"signatures",(()=>{if(t.input)return i.decompile(t.input).slice(1)})),o.prop(h,"input",(()=>{if(t.signatures)return i.compile([s.OP_0].concat(t.signatures))})),o.prop(h,"witness",(()=>{if(h.input)return[]})),o.prop(h,"name",(()=>{if(h.m&&h.n)return`p2ms(${h.m} of ${h.n})`})),e.validate){if(t.output){if(d(t.output),!a.Number(l[0]))throw new TypeError("Output is invalid");if(!a.Number(l[l.length-2]))throw new TypeError("Output is invalid");if(l[l.length-1]!==s.OP_CHECKMULTISIG)throw new TypeError("Output is invalid");if(h.m<=0||h.n>16||h.m>h.n||h.n!==l.length-3)throw new TypeError("Output is invalid");if(!h.pubkeys.every((t=>u.isPoint(t))))throw new TypeError("Output is invalid");if(void 0!==t.m&&t.m!==h.m)throw new TypeError("m mismatch");if(void 0!==t.n&&t.n!==h.n)throw new TypeError("n mismatch");if(t.pubkeys&&!f(t.pubkeys,h.pubkeys))throw new TypeError("Pubkeys mismatch")}if(t.pubkeys){if(void 0!==t.n&&t.n!==t.pubkeys.length)throw new TypeError("Pubkey count mismatch");if(h.n=t.pubkeys.length,h.n<h.m)throw new TypeError("Pubkey count cannot be less than m")}if(t.signatures){if(t.signatures.length<h.m)throw new TypeError("Not enough signatures provided");if(t.signatures.length>h.m)throw new TypeError("Too many signatures provided")}if(t.input){if(t.input[0]!==s.OP_0)throw new TypeError("Input is invalid");if(0===h.signatures.length||!h.signatures.every(r))throw new TypeError("Input has invalid signature(s)");if(t.signatures&&!f(t.signatures,h.signatures))throw new TypeError("Signature mismatch");if(void 0!==t.m&&t.m!==t.signatures.length)throw new TypeError("Signature count mismatch")}}return Object.assign(h,t)}},8536:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.p2pk=void 0;const n=r(419),i=r(3016),o=r(8535),s=r(9031),a=i.OPS,u=r(701);e.p2pk=function(t,e){if(!(t.input||t.output||t.pubkey||t.input||t.signature))throw new TypeError("Not enough data");e=Object.assign({validate:!0},e||{}),s({network:s.maybe(s.Object),output:s.maybe(s.Buffer),pubkey:s.maybe(u.isPoint),signature:s.maybe(i.isCanonicalScriptSignature),input:s.maybe(s.Buffer)},t);const r=o.value((()=>i.decompile(t.input))),c={name:"p2pk",network:t.network||n.bitcoin};if(o.prop(c,"output",(()=>{if(t.pubkey)return i.compile([t.pubkey,a.OP_CHECKSIG])})),o.prop(c,"pubkey",(()=>{if(t.output)return t.output.slice(1,-1)})),o.prop(c,"signature",(()=>{if(t.input)return r()[0]})),o.prop(c,"input",(()=>{if(t.signature)return i.compile([t.signature])})),o.prop(c,"witness",(()=>{if(c.input)return[]})),e.validate){if(t.output){if(t.output[t.output.length-1]!==a.OP_CHECKSIG)throw new TypeError("Output is invalid");if(!u.isPoint(c.pubkey))throw new TypeError("Output pubkey is invalid");if(t.pubkey&&!t.pubkey.equals(c.pubkey))throw new TypeError("Pubkey mismatch")}if(t.signature&&t.input&&!t.input.equals(c.input))throw new TypeError("Signature mismatch");if(t.input){if(1!==r().length)throw new TypeError("Input is invalid");if(!i.isCanonicalScriptSignature(c.signature))throw new TypeError("Input has invalid signature")}}return Object.assign(c,t)}},4696:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.p2pkh=void 0;const i=r(2572),o=r(419),s=r(3016),a=r(8535),u=r(9031),c=s.OPS,f=r(701),h=r(4075);e.p2pkh=function(t,e){if(!(t.address||t.hash||t.output||t.pubkey||t.input))throw new TypeError("Not enough data");e=Object.assign({validate:!0},e||{}),u({network:u.maybe(u.Object),address:u.maybe(u.String),hash:u.maybe(u.BufferN(20)),output:u.maybe(u.BufferN(25)),pubkey:u.maybe(f.isPoint),signature:u.maybe(s.isCanonicalScriptSignature),input:u.maybe(u.Buffer)},t);const r=a.value((()=>{const e=h.decode(t.address);return{version:e.readUInt8(0),hash:e.slice(1)}})),l=a.value((()=>s.decompile(t.input))),p=t.network||o.bitcoin,d={name:"p2pkh",network:p};if(a.prop(d,"address",(()=>{if(!d.hash)return;const t=n.allocUnsafe(21);return t.writeUInt8(p.pubKeyHash,0),d.hash.copy(t,1),h.encode(t)})),a.prop(d,"hash",(()=>t.output?t.output.slice(3,23):t.address?r().hash:t.pubkey||d.pubkey?i.hash160(t.pubkey||d.pubkey):void 0)),a.prop(d,"output",(()=>{if(d.hash)return s.compile([c.OP_DUP,c.OP_HASH160,d.hash,c.OP_EQUALVERIFY,c.OP_CHECKSIG])})),a.prop(d,"pubkey",(()=>{if(t.input)return l()[1]})),a.prop(d,"signature",(()=>{if(t.input)return l()[0]})),a.prop(d,"input",(()=>{if(t.pubkey&&t.signature)return s.compile([t.signature,t.pubkey])})),a.prop(d,"witness",(()=>{if(d.input)return[]})),e.validate){let e=n.from([]);if(t.address){if(r().version!==p.pubKeyHash)throw new TypeError("Invalid version or Network mismatch");if(20!==r().hash.length)throw new TypeError("Invalid address");e=r().hash}if(t.hash){if(e.length>0&&!e.equals(t.hash))throw new TypeError("Hash mismatch");e=t.hash}if(t.output){if(25!==t.output.length||t.output[0]!==c.OP_DUP||t.output[1]!==c.OP_HASH160||20!==t.output[2]||t.output[23]!==c.OP_EQUALVERIFY||t.output[24]!==c.OP_CHECKSIG)throw new TypeError("Output is invalid");const r=t.output.slice(3,23);if(e.length>0&&!e.equals(r))throw new TypeError("Hash mismatch");e=r}if(t.pubkey){const r=i.hash160(t.pubkey);if(e.length>0&&!e.equals(r))throw new TypeError("Hash mismatch");e=r}if(t.input){const r=l();if(2!==r.length)throw new TypeError("Input is invalid");if(!s.isCanonicalScriptSignature(r[0]))throw new TypeError("Input has invalid signature");if(!f.isPoint(r[1]))throw new TypeError("Input has invalid pubkey");if(t.signature&&!t.signature.equals(r[0]))throw new TypeError("Signature mismatch");if(t.pubkey&&!t.pubkey.equals(r[1]))throw new TypeError("Pubkey mismatch");const n=i.hash160(r[1]);if(e.length>0&&!e.equals(n))throw new TypeError("Hash mismatch")}}return Object.assign(d,t)}},743:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.p2sh=void 0;const i=r(2572),o=r(419),s=r(3016),a=r(8535),u=r(9031),c=s.OPS,f=r(4075);e.p2sh=function(t,e){if(!(t.address||t.hash||t.output||t.redeem||t.input))throw new TypeError("Not enough data");e=Object.assign({validate:!0},e||{}),u({network:u.maybe(u.Object),address:u.maybe(u.String),hash:u.maybe(u.BufferN(20)),output:u.maybe(u.BufferN(23)),redeem:u.maybe({network:u.maybe(u.Object),output:u.maybe(u.Buffer),input:u.maybe(u.Buffer),witness:u.maybe(u.arrayOf(u.Buffer))}),input:u.maybe(u.Buffer),witness:u.maybe(u.arrayOf(u.Buffer))},t);let r=t.network;r||(r=t.redeem&&t.redeem.network||o.bitcoin);const h={network:r},l=a.value((()=>{const e=f.decode(t.address);return{version:e.readUInt8(0),hash:e.slice(1)}})),p=a.value((()=>s.decompile(t.input))),d=a.value((()=>{const e=p();return{network:r,output:e[e.length-1],input:s.compile(e.slice(0,-1)),witness:t.witness||[]}}));if(a.prop(h,"address",(()=>{if(!h.hash)return;const t=n.allocUnsafe(21);return t.writeUInt8(h.network.scriptHash,0),h.hash.copy(t,1),f.encode(t)})),a.prop(h,"hash",(()=>t.output?t.output.slice(2,22):t.address?l().hash:h.redeem&&h.redeem.output?i.hash160(h.redeem.output):void 0)),a.prop(h,"output",(()=>{if(h.hash)return s.compile([c.OP_HASH160,h.hash,c.OP_EQUAL])})),a.prop(h,"redeem",(()=>{if(t.input)return d()})),a.prop(h,"input",(()=>{if(t.redeem&&t.redeem.input&&t.redeem.output)return s.compile([].concat(s.decompile(t.redeem.input),t.redeem.output))})),a.prop(h,"witness",(()=>h.redeem&&h.redeem.witness?h.redeem.witness:h.input?[]:void 0)),a.prop(h,"name",(()=>{const t=["p2sh"];return void 0!==h.redeem&&void 0!==h.redeem.name&&t.push(h.redeem.name),t.join("-")})),e.validate){let e=n.from([]);if(t.address){if(l().version!==r.scriptHash)throw new TypeError("Invalid version or Network mismatch");if(20!==l().hash.length)throw new TypeError("Invalid address");e=l().hash}if(t.hash){if(e.length>0&&!e.equals(t.hash))throw new TypeError("Hash mismatch");e=t.hash}if(t.output){if(23!==t.output.length||t.output[0]!==c.OP_HASH160||20!==t.output[1]||t.output[22]!==c.OP_EQUAL)throw new TypeError("Output is invalid");const r=t.output.slice(2,22);if(e.length>0&&!e.equals(r))throw new TypeError("Hash mismatch");e=r}const o=t=>{if(t.output){const r=s.decompile(t.output);if(!r||r.length<1)throw new TypeError("Redeem.output too short");const n=i.hash160(t.output);if(e.length>0&&!e.equals(n))throw new TypeError("Hash mismatch");e=n}if(t.input){const e=t.input.length>0,r=t.witness&&t.witness.length>0;if(!e&&!r)throw new TypeError("Empty input");if(e&&r)throw new TypeError("Input and witness provided");if(e){const e=s.decompile(t.input);if(!s.isPushOnly(e))throw new TypeError("Non push-only scriptSig")}}};if(t.input){const t=p();if(!t||t.length<1)throw new TypeError("Input too short");if(!n.isBuffer(d().output))throw new TypeError("Input is invalid");o(d())}if(t.redeem){if(t.redeem.network&&t.redeem.network!==r)throw new TypeError("Network mismatch");if(t.input){const e=d();if(t.redeem.output&&!t.redeem.output.equals(e.output))throw new TypeError("Redeem.output mismatch");if(t.redeem.input&&!t.redeem.input.equals(e.input))throw new TypeError("Redeem.input mismatch")}o(t.redeem)}if(t.witness&&t.redeem&&t.redeem.witness&&!function(t,e){return t.length===e.length&&t.every(((t,r)=>t.equals(e[r])))}(t.redeem.witness,t.witness))throw new TypeError("Witness and redeem.witness mismatch")}return Object.assign(h,t)}},3358:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.p2tr=void 0;const i=r(419),o=r(4732),s=r(3016),a=r(3529),u=r(8535),c=r(9031),f=s.OPS,{bech32m:h}=r(4362),l=n.from("50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0","hex"),p=n.alloc(0);e.p2tr=function(t,e){if(!(t.address||t.pubkey||t.pubkeys||t.redeems&&t.redeems.length||t.output||t.witness))throw new TypeError("Not enough data");e=Object.assign({validate:!0},e||{}),c({network:c.maybe(c.Object),address:c.maybe(c.String),output:c.maybe(c.BufferN(34)),pubkey:c.maybe(o.isXOnlyPoint),pubkeys:c.maybe(c.arrayOf(o.isXOnlyPoint)),redeems:c.maybe(c.arrayOf({network:c.maybe(c.Object),output:c.maybe(c.Buffer),weight:c.maybe(c.Number),witness:c.maybe(c.arrayOf(c.Buffer))})),redeemIndex:c.maybe(c.Number),signature:c.maybe(s.isCanonicalSchnorrSignature),controlBlock:c.maybe(c.Buffer),annex:c.maybe(c.Buffer)},t);const r=u.value((()=>{if(!t.address)return;const e=h.decode(t.address),r=e.words.shift(),i=h.fromWords(e.words);return{version:r,prefix:e.prefix,data:n.from(i)}})),d=u.value((()=>t.output&&t.output.slice(2))),g=u.value((()=>{if(!t.redeems)return;const e=t.redeems.map((({output:t})=>t));return e.every((t=>t))?a.getHuffmanTaptree(e,t.redeems.map((({weight:t})=>t))):void 0})),y=u.value((()=>{if(t.witness)return a.parseTaprootWitness(t.witness)})),b=u.value((()=>{if(t.controlBlock)return a.parseControlBlock(t.controlBlock);const e=y();return e&&"Script"===e.spendType?a.parseControlBlock(e.controlBlock):void 0})),m=u.value((()=>t.pubkey?t.pubkey:t.pubkeys&&1===t.pubkeys.length?t.pubkeys[0]:t.pubkeys&&t.pubkeys.length>1?a.aggregateMuSigPubkeys(t.pubkeys):b()?b().internalPubkey:l)),v=u.value((()=>{const e=b(),r=y();if(!(t.pubkey||t.pubkeys&&t.pubkeys.length||t.redeems||e))return;let n;if(e){let t;r&&"Script"===r.spendType?t=r.tapscript:_.redeem&&_.redeem.output&&(t=_.redeem.output),t&&(n=a.getTaptreeRoot(e,t))}return!n&&g()&&(n=g().root),a.tapTweakPubkey(m(),n)})),w=t.network||i.bitcoin,_={network:w};if(u.prop(_,"address",(()=>{const t=d()||v()&&v().pubkey,e=h.toWords(t);return e.unshift(1),h.encode(w.bech32,e)})),u.prop(_,"controlBlock",(()=>{const e=y();if(e&&"Script"===e.spendType)return e.controlBlock;const r=v(),n=g();return n&&r&&void 0!==t.redeemIndex?a.getControlBlock(r.parity,m(),n.paths[t.redeemIndex]):void 0})),u.prop(_,"signature",(()=>{const t=y();if(t&&"Key"===t.spendType)return t.signature})),u.prop(_,"annex",(()=>{if(y())return y().annex})),u.prop(_,"output",(()=>{if(t.address){const{data:t}=r();return s.compile([f.OP_1,t])}const e=v();if(e)return s.compile([f.OP_1,e.pubkey])})),u.prop(_,"witness",(()=>{if(!t.redeems)return t.signature?[t.signature]:void 0;if(!_.redeem)return;if(!_.controlBlock)return;let e;if(_.redeem.input&&_.redeem.input.length>0&&_.redeem.output&&_.redeem.output.length>0)e=s.toStack(s.decompile(_.redeem.input)),_.redeems[t.redeemIndex]=Object.assign({witness:e},_.redeem),_.redeem.input=p;else{if(!(_.redeem.output&&_.redeem.output.length>0&&_.redeem.witness&&_.redeem.witness.length>0))return;e=_.redeem.witness}const r=[...e,_.redeem.output,_.controlBlock];return t.annex&&r.push(t.annex),r})),u.prop(_,"name",(()=>["p2tr"].join("-"))),u.prop(_,"redeem",(()=>{if(t.redeems){if(void 0===t.redeemIndex)return;return t.redeems[t.redeemIndex]}const e=y();if(e&&"Script"===e.spendType)return{witness:e.scriptSig,output:e.tapscript}})),e.validate){const e=v();if(t.output){if(t.output[0]!==f.OP_1||32!==t.output[1])throw new TypeError("Output is invalid");if(t.address&&!d().equals(r().data))throw new TypeError("mismatch between address & output");if(e&&!d().equals(e.pubkey))throw new TypeError("mismatch between output and taproot pubkey")}if(t.address&&e&&!r().data.equals(e.pubkey))throw new TypeError("mismatch between address and taproot pubkey");const n=b();if(n){if(!n.internalPubkey.equals(m()))throw new TypeError("Internal pubkey mismatch");if(e&&n.parity!==e.parity)throw new TypeError("Parity mismatch")}if(t.redeems){if(!t.redeems.length)throw new TypeError("Empty redeems");if(void 0!==t.redeemIndex&&(t.redeemIndex<0||t.redeemIndex>=t.redeems.length))throw new TypeError("invalid redeem index");t.redeems.forEach((t=>{if(t.network&&t.network!==w)throw new TypeError("Network mismatch")}))}const i=t.redeems&&void 0!==t.redeemIndex&&t.redeems[t.redeemIndex],o=y();if(o&&"Key"===o.spendType){if(t.controlBlock)throw new TypeError("unexpected control block for key path");if(t.signature&&!t.signature.equals(o.signature))throw new TypeError("mismatch between witness & signature")}if(o&&"Script"===o.spendType){if(t.signature)throw new TypeError("unexpected signature with script path witness");if(t.controlBlock&&!t.controlBlock.equals(o.controlBlock))throw new TypeError("control block mismatch");if(t.annex&&o.annex&&!t.annex.equals(o.annex))throw new TypeError("annex mismatch");if(i&&i.output&&!i.output.equals(o.tapscript))throw new TypeError("tapscript mismatch")}}return Object.assign(_,t)}},8707:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.p2tr_ns=void 0;const i=r(419),o=r(4732),s=r(3016),a=r(8535),u=s.OPS,c=r(9031);function f(t,e){return t.length===e.length&&t.every(((t,r)=>t.equals(e[r])))}e.p2tr_ns=function(t,e){if(!(t.input||t.output||t.pubkeys&&t.pubkeys.length||t.signatures))throw new TypeError("Not enough data");function r(t){return n.isBuffer(t)?e&&e.allowIncomplete&&0===t.length||s.isCanonicalSchnorrSignature(t):!(!e||!e.allowIncomplete||t!==u.OP_0)}e=Object.assign({validate:!0},e||{}),c({network:c.maybe(c.Object),output:c.maybe(c.Buffer),pubkeys:c.maybe(c.arrayOf(o.isXOnlyPoint)),signatures:c.maybe(c.arrayOf(r)),input:c.maybe(c.Buffer)},t);const h={network:t.network||i.bitcoin},l=a.value((()=>{if(t.output)return s.decompile(t.output)}));if(a.prop(h,"output",(()=>{if(t.pubkeys)return s.compile([].concat(...t.pubkeys.map(((t,e,r)=>[t,e===r.length-1?u.OP_CHECKSIG:u.OP_CHECKSIGVERIFY]))))})),a.prop(h,"n",(()=>{if(h.pubkeys)return h.pubkeys.length})),a.prop(h,"pubkeys",(()=>{const t=l();if(t)return t.filter(((t,e)=>e%2==0))})),a.prop(h,"signatures",(()=>{if(t.input)return s.decompile(t.input).reverse()})),a.prop(h,"input",(()=>{if(t.signatures)return s.compile([...t.signatures].reverse())})),a.prop(h,"witness",(()=>{if(h.input)return[]})),a.prop(h,"name",(()=>{if(h.n)return`p2tr_ns(${h.n})`})),e.validate){const e=l();if(e){if(e[e.length-1]!==u.OP_CHECKSIG)throw new TypeError("Output ends with unexpected opcode");if(e.filter(((t,e)=>e%2==1)).slice(0,-1).some((t=>t!==u.OP_CHECKSIGVERIFY)))throw new TypeError("Output contains unexpected opcode");if(h.n>16||h.n!==e.length/2)throw new TypeError("Output contains too many pubkeys");if(h.pubkeys.some((t=>!(0,o.isXOnlyPoint)(t))))throw new TypeError("Output contains invalid pubkey(s)");if(t.pubkeys&&!f(t.pubkeys,h.pubkeys))throw new TypeError("Pubkeys mismatch")}if(t.pubkeys&&t.pubkeys.length&&(h.n=t.pubkeys.length),t.signatures){if(t.signatures.length<h.n)throw new TypeError("Not enough signatures provided");if(t.signatures.length>h.n)throw new TypeError("Too many signatures provided")}if(t.input){if(!h.signatures.every(r))throw new TypeError("Input has invalid signature(s)");if(t.signatures&&!f(t.signatures,h.signatures))throw new TypeError("Signature mismatch");if(h.n!==h.signatures.length)throw new TypeError(`Signature count mismatch (n: ${h.n}, signatures.length: ${h.signatures.length}`)}}return Object.assign(h,t)}},16:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.p2wpkh=void 0;const i=r(2572),o=r(419),s=r(3016),a=r(8535),u=r(9031),c=s.OPS,f=r(701),{bech32:h}=r(4362),l=n.alloc(0);e.p2wpkh=function(t,e){if(!(t.address||t.hash||t.output||t.pubkey||t.witness))throw new TypeError("Not enough data");e=Object.assign({validate:!0},e||{}),u({address:u.maybe(u.String),hash:u.maybe(u.BufferN(20)),input:u.maybe(u.BufferN(0)),network:u.maybe(u.Object),output:u.maybe(u.BufferN(22)),pubkey:u.maybe(f.isPoint),signature:u.maybe(s.isCanonicalScriptSignature),witness:u.maybe(u.arrayOf(u.Buffer))},t);const r=a.value((()=>{const e=h.decode(t.address),r=e.words.shift(),i=h.fromWords(e.words);return{version:r,prefix:e.prefix,data:n.from(i)}})),p=t.network||o.bitcoin,d={name:"p2wpkh",network:p};if(a.prop(d,"address",(()=>{if(!d.hash)return;const t=h.toWords(d.hash);return t.unshift(0),h.encode(p.bech32,t)})),a.prop(d,"hash",(()=>t.output?t.output.slice(2,22):t.address?r().data:t.pubkey||d.pubkey?i.hash160(t.pubkey||d.pubkey):void 0)),a.prop(d,"output",(()=>{if(d.hash)return s.compile([c.OP_0,d.hash])})),a.prop(d,"pubkey",(()=>t.pubkey?t.pubkey:t.witness?t.witness[1]:void 0)),a.prop(d,"signature",(()=>{if(t.witness)return t.witness[0]})),a.prop(d,"input",(()=>{if(d.witness)return l})),a.prop(d,"witness",(()=>{if(t.pubkey&&t.signature)return[t.signature,t.pubkey]})),e.validate){let e=n.from([]);if(t.address){if(p&&p.bech32!==r().prefix)throw new TypeError("Invalid prefix or Network mismatch");if(0!==r().version)throw new TypeError("Invalid address version");if(20!==r().data.length)throw new TypeError("Invalid address data");e=r().data}if(t.hash){if(e.length>0&&!e.equals(t.hash))throw new TypeError("Hash mismatch");e=t.hash}if(t.output){if(22!==t.output.length||t.output[0]!==c.OP_0||20!==t.output[1])throw new TypeError("Output is invalid");if(e.length>0&&!e.equals(t.output.slice(2)))throw new TypeError("Hash mismatch");e=t.output.slice(2)}if(t.pubkey){const r=i.hash160(t.pubkey);if(e.length>0&&!e.equals(r))throw new TypeError("Hash mismatch");if(e=r,!f.isPoint(t.pubkey)||33!==t.pubkey.length)throw new TypeError("Invalid pubkey for p2wpkh")}if(t.witness){if(2!==t.witness.length)throw new TypeError("Witness is invalid");if(!s.isCanonicalScriptSignature(t.witness[0]))throw new TypeError("Witness has invalid signature");if(!f.isPoint(t.witness[1])||33!==t.witness[1].length)throw new TypeError("Witness has invalid pubkey");if(t.signature&&!t.signature.equals(t.witness[0]))throw new TypeError("Signature mismatch");if(t.pubkey&&!t.pubkey.equals(t.witness[1]))throw new TypeError("Pubkey mismatch");const r=i.hash160(t.witness[1]);if(e.length>0&&!e.equals(r))throw new TypeError("Hash mismatch")}}return Object.assign(d,t)}},5732:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.p2wsh=void 0;const i=r(2572),o=r(419),s=r(3016),a=r(8535),u=r(9031),c=s.OPS,f=r(701),{bech32:h}=r(4362),l=n.alloc(0);function p(t){return!(!n.isBuffer(t)||65!==t.length||4!==t[0]||!f.isPoint(t))}e.p2wsh=function(t,e){if(!(t.address||t.hash||t.output||t.redeem||t.witness))throw new TypeError("Not enough data");e=Object.assign({validate:!0},e||{}),u({network:u.maybe(u.Object),address:u.maybe(u.String),hash:u.maybe(u.BufferN(32)),output:u.maybe(u.BufferN(34)),redeem:u.maybe({input:u.maybe(u.Buffer),network:u.maybe(u.Object),output:u.maybe(u.Buffer),witness:u.maybe(u.arrayOf(u.Buffer))}),input:u.maybe(u.BufferN(0)),witness:u.maybe(u.arrayOf(u.Buffer))},t);const r=a.value((()=>{const e=h.decode(t.address),r=e.words.shift(),i=h.fromWords(e.words);return{version:r,prefix:e.prefix,data:n.from(i)}})),f=a.value((()=>s.decompile(t.redeem.input)));let d=t.network;d||(d=t.redeem&&t.redeem.network||o.bitcoin);const g={network:d};if(a.prop(g,"address",(()=>{if(!g.hash)return;const t=h.toWords(g.hash);return t.unshift(0),h.encode(d.bech32,t)})),a.prop(g,"hash",(()=>t.output?t.output.slice(2):t.address?r().data:g.redeem&&g.redeem.output?i.sha256(g.redeem.output):void 0)),a.prop(g,"output",(()=>{if(g.hash)return s.compile([c.OP_0,g.hash])})),a.prop(g,"redeem",(()=>{if(t.witness)return{output:t.witness[t.witness.length-1],input:l,witness:t.witness.slice(0,-1)}})),a.prop(g,"input",(()=>{if(g.witness)return l})),a.prop(g,"witness",(()=>{if(t.redeem&&t.redeem.input&&t.redeem.input.length>0&&t.redeem.output&&t.redeem.output.length>0){const e=s.toStack(f());return g.redeem=Object.assign({witness:e},t.redeem),g.redeem.input=l,[].concat(e,t.redeem.output)}if(t.redeem&&t.redeem.output&&t.redeem.witness)return[].concat(t.redeem.witness,t.redeem.output)})),a.prop(g,"name",(()=>{const t=["p2wsh"];return void 0!==g.redeem&&void 0!==g.redeem.name&&t.push(g.redeem.name),t.join("-")})),e.validate){let e=n.from([]);if(t.address){if(r().prefix!==d.bech32)throw new TypeError("Invalid prefix or Network mismatch");if(0!==r().version)throw new TypeError("Invalid address version");if(32!==r().data.length)throw new TypeError("Invalid address data");e=r().data}if(t.hash){if(e.length>0&&!e.equals(t.hash))throw new TypeError("Hash mismatch");e=t.hash}if(t.output){if(34!==t.output.length||t.output[0]!==c.OP_0||32!==t.output[1])throw new TypeError("Output is invalid");const r=t.output.slice(2);if(e.length>0&&!e.equals(r))throw new TypeError("Hash mismatch");e=r}if(t.redeem){if(t.redeem.network&&t.redeem.network!==d)throw new TypeError("Network mismatch");if(t.redeem.input&&t.redeem.input.length>0&&t.redeem.witness&&t.redeem.witness.length>0)throw new TypeError("Ambiguous witness source");if(t.redeem.output){if(0===s.decompile(t.redeem.output).length)throw new TypeError("Redeem.output is invalid");const r=i.sha256(t.redeem.output);if(e.length>0&&!e.equals(r))throw new TypeError("Hash mismatch");e=r}if(t.redeem.input&&!s.isPushOnly(f()))throw new TypeError("Non push-only scriptSig");if(t.witness&&t.redeem.witness&&!function(t,e){return t.length===e.length&&t.every(((t,r)=>t.equals(e[r])))}(t.witness,t.redeem.witness))throw new TypeError("Witness and redeem.witness mismatch");if(t.redeem.input&&f().some(p)||t.redeem.output&&(s.decompile(t.redeem.output)||[]).some(p))throw new TypeError("redeem.input or redeem.output contains uncompressed pubkey")}if(t.witness&&t.witness.length>0){const e=t.witness[t.witness.length-1];if(t.redeem&&t.redeem.output&&!t.redeem.output.equals(e))throw new TypeError("Witness and redeem.output mismatch");if(t.witness.some(p)||(s.decompile(e)||[]).some(p))throw new TypeError("Witness contains uncompressed pubkey")}}return Object.assign(g,t)}},9468:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.Psbt=void 0;const i=r(8174),o=r(9214),s=r(5639),a=r(9168),u=r(9359),c=r(2572),f=r(8893),h=r(419),l=r(6469),p=r(3016),d=r(4457),g={network:h.bitcoin,maximumFeeRate:5e3};class y{constructor(t={},e=new i.Psbt(new m)){this.data=e,this.opts=Object.assign({},g,t),this.__CACHE={__NON_WITNESS_UTXO_TX_CACHE:[],__NON_WITNESS_UTXO_BUF_CACHE:[],__TX_IN_CACHE:{},__TX:this.data.globalMap.unsignedTx.tx,__UNSAFE_SIGN_NONSEGWIT:!1},0===this.data.inputs.length&&this.setVersion(2);const r=(t,e,r,n)=>Object.defineProperty(t,e,{enumerable:r,writable:n});r(this,"__CACHE",!1,!0),r(this,"opts",!1,!0)}static fromBase64(t,e={}){const r=n.from(t,"base64");return this.fromBuffer(r,e)}static fromHex(t,e={}){const r=n.from(t,"hex");return this.fromBuffer(r,e)}static fromBuffer(t,e={}){const r=i.Psbt.fromBuffer(t,b),n=new y(e,r);var o,s;return o=n.__CACHE.__TX,s=n.__CACHE,o.ins.forEach((t=>{B(s,t)})),n}get inputCount(){return this.data.inputs.length}get version(){return this.__CACHE.__TX.version}set version(t){this.setVersion(t)}get locktime(){return this.__CACHE.__TX.locktime}set locktime(t){this.setLocktime(t)}get txInputs(){return this.__CACHE.__TX.ins.map((t=>({hash:(0,u.cloneBuffer)(t.hash),index:t.index,sequence:t.sequence})))}get txOutputs(){return this.__CACHE.__TX.outs.map((t=>{let e;try{e=(0,a.fromOutputScript)(t.script,this.opts.network)}catch(t){}return{script:(0,u.cloneBuffer)(t.script),value:t.value,address:e}}))}combine(...t){return this.data.combine(...t.map((t=>t.data))),this}clone(){const t=y.fromBuffer(this.data.toBuffer());return t.opts=JSON.parse(JSON.stringify(this.opts)),t}setMaximumFeeRate(t){T(t),this.opts.maximumFeeRate=t}setVersion(t){T(t),O(this.data.inputs,"setVersion");const e=this.__CACHE;return e.__TX.version=t,e.__EXTRACTED_TX=void 0,this}setLocktime(t){T(t),O(this.data.inputs,"setLocktime");const e=this.__CACHE;return e.__TX.locktime=t,e.__EXTRACTED_TX=void 0,this}setInputSequence(t,e){T(e),O(this.data.inputs,"setInputSequence");const r=this.__CACHE;if(r.__TX.ins.length<=t)throw new Error("Input index too high");return r.__TX.ins[t].sequence=e,r.__EXTRACTED_TX=void 0,this}addInputs(t){return t.forEach((t=>this.addInput(t))),this}addInput(t){if(arguments.length>1||!t||void 0===t.hash||void 0===t.index)throw new Error("Invalid arguments for Psbt.addInput. Requires single object with at least [hash] and [index]");O(this.data.inputs,"addInput"),t.witnessScript&&Y(t.witnessScript);const e=this.__CACHE;this.data.addInput(t),B(e,e.__TX.ins[e.__TX.ins.length-1]);const r=this.data.inputs.length-1,n=this.data.inputs[r];return n.nonWitnessUtxo&&K(this.__CACHE,n,r),e.__FEE=void 0,e.__FEE_RATE=void 0,e.__EXTRACTED_TX=void 0,this}addOutputs(t){return t.forEach((t=>this.addOutput(t))),this}addOutput(t){if(arguments.length>1||!t||void 0===t.value||void 0===t.address&&void 0===t.script)throw new Error("Invalid arguments for Psbt.addOutput. Requires single object with at least [script or address] and [value]");O(this.data.inputs,"addOutput");const{address:e}=t;if("string"==typeof e){const{network:r}=this.opts,n=(0,a.toOutputScript)(e,r);t=Object.assign(t,{script:n})}const r=this.__CACHE;return this.data.addOutput(t),r.__FEE=void 0,r.__FEE_RATE=void 0,r.__EXTRACTED_TX=void 0,this}extractTransaction(t){if(!this.data.inputs.every(_))throw new Error("Not finalized");const e=this.__CACHE;if(t||function(t,e,r){const n=e.__FEE_RATE||t.getFeeRate(),i=e.__EXTRACTED_TX.virtualSize(),o=n*i;if(n>=r.maximumFeeRate)throw new Error(`Warning: You are paying around ${(o/1e8).toFixed(8)} in fees, which is ${n} satoshi per byte for a transaction with a VSize of ${i} bytes (segwit counted as 0.25 byte per byte). Use setMaximumFeeRate method to raise your threshold, or pass true to the first arg of extractTransaction.`)}(this,e,this.opts),e.__EXTRACTED_TX)return e.__EXTRACTED_TX;const r=e.__TX.clone();return V(this.data.inputs,r,e,!0),r}getFeeRate(){return j("__FEE_RATE","fee rate",this.data.inputs,this.__CACHE)}getFee(){return j("__FEE","fee",this.data.inputs,this.__CACHE)}finalizeAllInputs(){return(0,s.checkForInput)(this.data.inputs,0),Z(this.data.inputs.length).forEach((t=>this.finalizeInput(t))),this}finalizeInput(t,e=L){const r=(0,s.checkForInput)(this.data.inputs,t),{script:n,isP2SH:i,isP2WSH:o,isSegwit:a}=function(t,e,r){const n=r.__TX,i={script:null,isSegwit:!1,isP2SH:!1,isP2WSH:!1};if(i.isP2SH=!!e.redeemScript,i.isP2WSH=!!e.witnessScript,e.witnessScript)i.script=e.witnessScript;else if(e.redeemScript)i.script=e.redeemScript;else if(e.nonWitnessUtxo){const o=G(r,e,t),s=n.ins[t].index;i.script=o.outs[s].script}else e.witnessUtxo&&(i.script=e.witnessUtxo.script);return(e.witnessScript||k(i.script))&&(i.isSegwit=!0),i}(t,r,this.__CACHE);if(!n)throw new Error(`No script found for input #${t}`);!function(t){if(!t.sighashType||!t.partialSig)return;const{partialSig:e,sighashType:r}=t;e.forEach((t=>{const{hashType:e}=p.signature.decode(t.signature);if(r!==e)throw new Error("Signature sighash does not match input sighash type")}))}(r);const{finalScriptSig:u,finalScriptWitness:c}=e(t,r,n,a,i,o);if(u&&this.data.updateInput(t,{finalScriptSig:u}),c&&this.data.updateInput(t,{finalScriptWitness:c}),!u&&!c)throw new Error(`Unknown error finalizing input #${t}`);return this.data.clearFinalizedInput(t),this}getInputType(t){const e=(0,s.checkForInput)(this.data.inputs,t),r=Q(z(t,e,this.__CACHE),t,"input",e.redeemScript||function(t){if(!t)return;const e=p.decompile(t);if(!e)return;const r=e[e.length-1];var i;if(n.isBuffer(r)&&!W(r)&&(i=r,!p.isCanonicalScriptSignature(i))&&p.decompile(r))return r}(e.finalScriptSig),e.witnessScript||function(t){if(!t)return;const e=H(t),r=e[e.length-1];return!W(r)&&p.decompile(r)?r:void 0}(e.finalScriptWitness));return("raw"===r.type?"":r.type+"-")+$(r.meaningfulScript)}inputHasPubkey(t,e){return function(t,e,r,n){const i=z(r,e,n),{meaningfulScript:o}=Q(i,r,"input",e.redeemScript,e.witnessScript);return X(t,o)}(e,(0,s.checkForInput)(this.data.inputs,t),t,this.__CACHE)}inputHasHDKey(t,e){const r=(0,s.checkForInput)(this.data.inputs,t),n=C(e);return!!r.bip32Derivation&&r.bip32Derivation.some(n)}outputHasPubkey(t,e){return function(t,e,r,n){const i=n.__TX.outs[r].script,{meaningfulScript:o}=Q(i,r,"output",e.redeemScript,e.witnessScript);return X(t,o)}(e,(0,s.checkForOutput)(this.data.outputs,t),t,this.__CACHE)}outputHasHDKey(t,e){const r=(0,s.checkForOutput)(this.data.outputs,t),n=C(e);return!!r.bip32Derivation&&r.bip32Derivation.some(n)}validateSignaturesOfAllInputs(){return(0,s.checkForInput)(this.data.inputs,0),Z(this.data.inputs.length).map((t=>this.validateSignaturesOfInput(t))).reduce(((t,e)=>!0===e&&t),!0)}validateSignaturesOfInput(t,e){const r=this.data.inputs[t],n=(r||{}).partialSig;if(!r||!n||n.length<1)throw new Error("No signatures to validate");const i=e?n.filter((t=>t.pubkey.equals(e))):n;if(i.length<1)throw new Error("No signatures for this pubkey");const o=[];let s,a,u;for(const e of i){const n=p.signature.decode(e.signature),{hash:i,script:c}=u!==n.hashType?F(t,Object.assign({},r,{sighashType:n.hashType}),this.__CACHE,!0):{hash:s,script:a};u=n.hashType,s=i,a=c,P(e.pubkey,c,"verify");const h=(0,f.fromPublicKey)(e.pubkey);o.push(h.verify(i,n.signature))}return o.every((t=>!0===t))}signAllInputsHD(t,e=[d.Transaction.SIGHASH_ALL]){if(!t||!t.publicKey||!t.fingerprint)throw new Error("Need HDSigner to sign input");const r=[];for(const n of Z(this.data.inputs.length))try{this.signInputHD(n,t,e),r.push(!0)}catch(t){r.push(!1)}if(r.every((t=>!1===t)))throw new Error("No inputs were signed");return this}signAllInputsHDAsync(t,e=[d.Transaction.SIGHASH_ALL]){return new Promise(((r,n)=>{if(!t||!t.publicKey||!t.fingerprint)return n(new Error("Need HDSigner to sign input"));const i=[],o=[];for(const r of Z(this.data.inputs.length))o.push(this.signInputHDAsync(r,t,e).then((()=>{i.push(!0)}),(()=>{i.push(!1)})));return Promise.all(o).then((()=>{if(i.every((t=>!1===t)))return n(new Error("No inputs were signed"));r()}))}))}signInputHD(t,e,r=[d.Transaction.SIGHASH_ALL]){if(!e||!e.publicKey||!e.fingerprint)throw new Error("Need HDSigner to sign input");return q(t,this.data.inputs,e).forEach((e=>this.signInput(t,e,r))),this}signInputHDAsync(t,e,r=[d.Transaction.SIGHASH_ALL]){return new Promise(((n,i)=>{if(!e||!e.publicKey||!e.fingerprint)return i(new Error("Need HDSigner to sign input"));const o=q(t,this.data.inputs,e).map((e=>this.signInputAsync(t,e,r)));return Promise.all(o).then((()=>{n()})).catch(i)}))}signAllInputs(t,e=[d.Transaction.SIGHASH_ALL]){if(!t||!t.publicKey)throw new Error("Need Signer to sign input");const r=[];for(const n of Z(this.data.inputs.length))try{this.signInput(n,t,e),r.push(!0)}catch(t){r.push(!1)}if(r.every((t=>!1===t)))throw new Error("No inputs were signed");return this}signAllInputsAsync(t,e=[d.Transaction.SIGHASH_ALL]){return new Promise(((r,n)=>{if(!t||!t.publicKey)return n(new Error("Need Signer to sign input"));const i=[],o=[];for(const[r]of this.data.inputs.entries())o.push(this.signInputAsync(r,t,e).then((()=>{i.push(!0)}),(()=>{i.push(!1)})));return Promise.all(o).then((()=>{if(i.every((t=>!1===t)))return n(new Error("No inputs were signed"));r()}))}))}signInput(t,e,r=[d.Transaction.SIGHASH_ALL]){if(!e||!e.publicKey)throw new Error("Need Signer to sign input");const{hash:n,sighashType:i}=D(this.data.inputs,t,e.publicKey,this.__CACHE,r),o=[{pubkey:e.publicKey,signature:p.signature.encode(e.sign(n),i)}];return this.data.updateInput(t,{partialSig:o}),this}signInputAsync(t,e,r=[d.Transaction.SIGHASH_ALL]){return Promise.resolve().then((()=>{if(!e||!e.publicKey)throw new Error("Need Signer to sign input");const{hash:n,sighashType:i}=D(this.data.inputs,t,e.publicKey,this.__CACHE,r);return Promise.resolve(e.sign(n)).then((r=>{const n=[{pubkey:e.publicKey,signature:p.signature.encode(r,i)}];this.data.updateInput(t,{partialSig:n})}))}))}toBuffer(){return v(this.__CACHE),this.data.toBuffer()}toHex(){return v(this.__CACHE),this.data.toHex()}toBase64(){return v(this.__CACHE),this.data.toBase64()}updateGlobal(t){return this.data.updateGlobal(t),this}updateInput(t,e){return e.witnessScript&&Y(e.witnessScript),this.data.updateInput(t,e),e.nonWitnessUtxo&&K(this.__CACHE,this.data.inputs[t],t),this}updateOutput(t,e){return this.data.updateOutput(t,e),this}addUnknownKeyValToGlobal(t){return this.data.addUnknownKeyValToGlobal(t),this}addUnknownKeyValToInput(t,e){return this.data.addUnknownKeyValToInput(t,e),this}addUnknownKeyValToOutput(t,e){return this.data.addUnknownKeyValToOutput(t,e),this}clearFinalizedInput(t){return this.data.clearFinalizedInput(t),this}}e.Psbt=y;const b=t=>new m(t);class m{constructor(t=n.from([2,0,0,0,0,0,0,0,0,0])){this.tx=d.Transaction.fromBuffer(t),function(t){if(!t.ins.every((t=>t.script&&0===t.script.length&&t.witness&&0===t.witness.length)))throw new Error("Format Error: Transaction ScriptSigs are not empty")}(this.tx),Object.defineProperty(this,"tx",{enumerable:!1,writable:!0})}getInputOutputCounts(){return{inputCount:this.tx.ins.length,outputCount:this.tx.outs.length}}addInput(t){if(void 0===t.hash||void 0===t.index||!n.isBuffer(t.hash)&&"string"!=typeof t.hash||"number"!=typeof t.index)throw new Error("Error adding input.");const e="string"==typeof t.hash?(0,u.reverseBuffer)(n.from(t.hash,"hex")):t.hash;this.tx.addInput(e,t.index,t.sequence)}addOutput(t){if(void 0===t.script||void 0===t.value||!n.isBuffer(t.script)||"number"!=typeof t.value)throw new Error("Error adding output.");this.tx.addOutput(t.script,t.value)}toBuffer(){return this.tx.toBuffer()}}function v(t){if(!1!==t.__UNSAFE_SIGN_NONSEGWIT)throw new Error("Not BIP174 compliant, can not export")}function w(t,e,r){if(!e)return!1;let n;if(n=r?r.map((t=>{const r=(0,f.fromPublicKey)(t,{compressed:!0}).publicKey;return e.find((t=>t.pubkey.equals(r)))})).filter((t=>!!t)):e,n.length>t)throw new Error("Too many signatures");return n.length===t}function _(t){return!!t.finalScriptSig||!!t.finalScriptWitness}function A(t){return e=>{try{return t({output:e}),!0}catch(t){return!1}}}const E=A(l.p2ms),S=A(l.p2pk),I=A(l.p2pkh),k=A(l.p2wpkh),x=A(l.p2wsh),M=A(l.p2sh);function C(t){return e=>!!e.masterFingerprint.equals(t.fingerprint)&&!!t.derivePath(e.path).publicKey.equals(e.pubkey)}function T(t){if("number"!=typeof t||t!==Math.floor(t)||t>4294967295||t<0)throw new Error("Invalid 32 bit integer")}function O(t,e){t.forEach((t=>{let r=!1,i=[];if(0===(t.partialSig||[]).length){if(!t.finalScriptSig&&!t.finalScriptWitness)return;i=function(t){const e=t.finalScriptSig&&p.decompile(t.finalScriptSig)||[],r=t.finalScriptWitness&&p.decompile(t.finalScriptWitness)||[];return e.concat(r).filter((t=>n.isBuffer(t)&&p.isCanonicalScriptSignature(t))).map((t=>({signature:t})))}(t)}else i=t.partialSig;if(i.forEach((t=>{const{hashType:n}=p.signature.decode(t.signature),i=[];switch(n&d.Transaction.SIGHASH_ANYONECANPAY&&i.push("addInput"),31&n){case d.Transaction.SIGHASH_ALL:break;case d.Transaction.SIGHASH_SINGLE:case d.Transaction.SIGHASH_NONE:i.push("addOutput"),i.push("setInputSequence")}-1===i.indexOf(e)&&(r=!0)})),r)throw new Error("Can not modify transaction, signatures exist.")}))}function P(t,e,r){if(!X(t,e))throw new Error(`Can not ${r} for this input with the key ${t.toString("hex")}`)}function B(t,e){const r=(0,u.reverseBuffer)(n.from(e.hash)).toString("hex")+":"+e.index;if(t.__TX_IN_CACHE[r])throw new Error("Duplicate input detected.");t.__TX_IN_CACHE[r]=1}function R(t,e){return(r,n,i,o)=>{const s=t({redeem:{output:i}}).output;if(!n.equals(s))throw new Error(`${e} for ${o} #${r} doesn't match the scriptPubKey in the prevout`)}}const N=R(l.p2sh,"Redeem script"),U=R(l.p2wsh,"Witness script");function j(t,e,r,n){if(!r.every(_))throw new Error(`PSBT must be finalized to calculate ${e}`);if("__FEE_RATE"===t&&n.__FEE_RATE)return n.__FEE_RATE;if("__FEE"===t&&n.__FEE)return n.__FEE;let i,o=!0;return n.__EXTRACTED_TX?(i=n.__EXTRACTED_TX,o=!1):i=n.__TX.clone(),V(r,i,n,o),"__FEE_RATE"===t?n.__FEE_RATE:"__FEE"===t?n.__FEE:void 0}function L(t,e,r,i,s,a){const u=$(r);if(!function(t,e,r){switch(r){case"pubkey":case"pubkeyhash":case"witnesspubkeyhash":return w(1,t.partialSig);case"multisig":const r=l.p2ms({output:e});return w(r.m,t.partialSig,r.pubkeys);default:return!1}}(e,r,u))throw new Error(`Can not finalize input #${t}`);return function(t,e,r,i,s,a){let u,c;const f=function(t,e,r){let n;switch(e){case"multisig":const e=function(t,e){return l.p2ms({output:t}).pubkeys.map((t=>(e.filter((e=>e.pubkey.equals(t)))[0]||{}).signature)).filter((t=>!!t))}(t,r);n=l.p2ms({output:t,signatures:e});break;case"pubkey":n=l.p2pk({output:t,signature:r[0].signature});break;case"pubkeyhash":n=l.p2pkh({output:t,pubkey:r[0].pubkey,signature:r[0].signature});break;case"witnesspubkeyhash":n=l.p2wpkh({output:t,pubkey:r[0].pubkey,signature:r[0].signature})}return n}(t,e,r),h=a?l.p2wsh({redeem:f}):null,p=s?l.p2sh({redeem:h||f}):null;return i?(c=function(t){let e=n.allocUnsafe(0);function r(t){const r=e.length,i=o.encodingLength(t);e=n.concat([e,n.allocUnsafe(i)]),o.encode(t,e,r)}function i(t){r(t.length),function(t){e=n.concat([e,n.from(t)])}(t)}var s;return r((s=t).length),s.forEach(i),e}(h?h.witness:f.witness),p&&(u=p.input)):u=p?p.input:f.input,{finalScriptSig:u,finalScriptWitness:c}}(r,u,e.partialSig,i,s,a)}function D(t,e,r,n,i){const o=(0,s.checkForInput)(t,e),{hash:a,sighashType:u,script:c}=F(e,o,n,!1,i);return P(r,c,"sign"),{hash:a,sighashType:u}}function F(t,e,r,n,i){const o=r.__TX,s=e.sighashType||d.Transaction.SIGHASH_ALL;if(i&&i.indexOf(s)<0){const t=function(t){let e=t&d.Transaction.SIGHASH_ANYONECANPAY?"SIGHASH_ANYONECANPAY | ":"";switch(31&t){case d.Transaction.SIGHASH_ALL:e+="SIGHASH_ALL";break;case d.Transaction.SIGHASH_SINGLE:e+="SIGHASH_SINGLE";break;case d.Transaction.SIGHASH_NONE:e+="SIGHASH_NONE"}return e}(s);throw new Error(`Sighash type is not allowed. Retry the sign method passing the sighashTypes array of whitelisted types. Sighash type: ${t}`)}let a,u;if(e.nonWitnessUtxo){const n=G(r,e,t),i=o.ins[t].hash,s=n.getHash();if(!i.equals(s))throw new Error(`Non-witness UTXO hash for input #${t} doesn't match the hash specified in the prevout`);const a=o.ins[t].index;u=n.outs[a]}else{if(!e.witnessUtxo)throw new Error("Need a Utxo input item for signing");u=e.witnessUtxo}const{meaningfulScript:c,type:f}=Q(u.script,t,"input",e.redeemScript,e.witnessScript);if(["p2sh-p2wsh","p2wsh"].indexOf(f)>=0)a=o.hashForWitnessV0(t,c,u.value,s);else if(k(c)){const e=l.p2pkh({hash:c.slice(2)}).output;a=o.hashForWitnessV0(t,e,u.value,s)}else{if(void 0===e.nonWitnessUtxo&&!1===r.__UNSAFE_SIGN_NONSEGWIT)throw new Error(`Input #${t} has witnessUtxo but non-segwit script: ${c.toString("hex")}`);n||!1===r.__UNSAFE_SIGN_NONSEGWIT||console.warn("Warning: Signing non-segwit inputs without the full parent transaction means there is a chance that a miner could feed you incorrect information to trick you into paying large fees. This behavior is the same as the old TransactionBuilder class when signing non-segwit scripts. You are not able to export this Psbt with toBuffer|toBase64|toHex since it is not BIP174 compliant.\n*********************\nPROCEED WITH CAUTION!\n*********************"),a=o.hashForSignature(t,c,s)}return{script:c,sighashType:s,hash:a}}function q(t,e,r){const n=(0,s.checkForInput)(e,t);if(!n.bip32Derivation||0===n.bip32Derivation.length)throw new Error("Need bip32Derivation to sign with HD");const i=n.bip32Derivation.map((t=>t.masterFingerprint.equals(r.fingerprint)?t:void 0)).filter((t=>!!t));if(0===i.length)throw new Error("Need one bip32Derivation masterFingerprint to match the HDSigner fingerprint");return i.map((t=>{const e=r.derivePath(t.path);if(!t.pubkey.equals(e.publicKey))throw new Error("pubkey did not match bip32Derivation");return e}))}function H(t){let e=0;function r(){const r=o.decode(t,e);return e+=o.decode.bytes,r}return function(){const n=r(),i=[];for(let s=0;s<n;s++)i.push((o=void 0,o=r(),e+=o,t.slice(e-o,e)));var o;return i}()}function K(t,e,r){t.__NON_WITNESS_UTXO_BUF_CACHE[r]=e.nonWitnessUtxo;const n=d.Transaction.fromBuffer(e.nonWitnessUtxo);t.__NON_WITNESS_UTXO_TX_CACHE[r]=n;const i=t,o=r;delete e.nonWitnessUtxo,Object.defineProperty(e,"nonWitnessUtxo",{enumerable:!0,get(){const t=i.__NON_WITNESS_UTXO_BUF_CACHE[o],e=i.__NON_WITNESS_UTXO_TX_CACHE[o];if(void 0!==t)return t;{const t=e.toBuffer();return i.__NON_WITNESS_UTXO_BUF_CACHE[o]=t,t}},set(t){i.__NON_WITNESS_UTXO_BUF_CACHE[o]=t}})}function V(t,e,r,n){let i=0;t.forEach(((t,o)=>{if(n&&t.finalScriptSig&&(e.ins[o].script=t.finalScriptSig),n&&t.finalScriptWitness&&(e.ins[o].witness=H(t.finalScriptWitness)),t.witnessUtxo)i+=t.witnessUtxo.value;else if(t.nonWitnessUtxo){const n=G(r,t,o),s=e.ins[o].index,a=n.outs[s];i+=a.value}}));const o=e.outs.reduce(((t,e)=>t+e.value),0),s=i-o;if(s<0)throw new Error("Outputs are spending more than Inputs");const a=e.virtualSize();r.__FEE=s,r.__EXTRACTED_TX=e,r.__FEE_RATE=Math.floor(s/a)}function G(t,e,r){const n=t.__NON_WITNESS_UTXO_TX_CACHE;return n[r]||K(t,e,r),n[r]}function z(t,e,r){if(void 0!==e.witnessUtxo)return e.witnessUtxo.script;if(void 0!==e.nonWitnessUtxo)return G(r,e,t).outs[r.__TX.ins[t].index].script;throw new Error("Can't find pubkey in input without Utxo data")}function W(t){return 33===t.length&&p.isCanonicalPubKey(t)}function Q(t,e,r,n,i){const o=M(t),s=o&&n&&x(n),a=x(t);if(o&&void 0===n)throw new Error("scriptPubkey is P2SH but redeemScript missing");if((a||s)&&void 0===i)throw new Error("scriptPubkey or redeemScript is P2WSH but witnessScript missing");let u;return s?(u=i,N(e,t,n,r),U(e,n,i,r),Y(u)):a?(u=i,U(e,t,i,r),Y(u)):o?(u=n,N(e,t,n,r)):u=t,{meaningfulScript:u,type:s?"p2sh-p2wsh":o?"p2sh":a?"p2wsh":"raw"}}function Y(t){if(k(t)||M(t))throw new Error("P2WPKH or P2SH can not be contained within P2WSH")}function X(t,e){const r=(0,c.hash160)(t),n=p.decompile(e);if(null===n)throw new Error("Unknown script error");return n.some((e=>"number"!=typeof e&&(e.equals(t)||e.equals(r))))}function $(t){return k(t)?"witnesspubkeyhash":I(t)?"pubkeyhash":E(t)?"multisig":S(t)?"pubkey":"nonstandard"}function Z(t){return[...Array(t).keys()]}},4732:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.signSchnorrWithoutExtraData=e.signSchnorr=e.verifySchnorr=e.isXOnlyPoint=e.forceEvenYPrivKey=void 0;const i=r(2197),o=r(7554),{createHash:s}=r(5634),a=new o.ec("secp256k1"),u=n.alloc(32,0),c=n.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),f=n.from("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f","hex"),h="Expected Hash",l="Expected Signature";function p(t){return new i(t)}function d(t){return t.toArrayLike(n,"be",32)}const g=a.curve.n,y=a.curve.g,b=new i(2);function m(t){return s("sha256").update(t).digest()}function v(t,e){if("string"!=typeof t)throw new TypeError("invalid argument");if(!n.isBuffer(e))throw new TypeError("invalid argument");const r=m(n.from(t,"utf8"));return m(n.concat([r,r,e]))}function w(t){if(!n.isBuffer(t)||32!==t.length)throw new Error("invalid pubkey");if(t.compare(f)>=0)throw new Error("invalid pubkey");return a.curve.pointFromX(p(t),!1)}function _(t){return d(t.getX())}function A(t){return!t.isInfinity()&&t.getY().umod(b).isZero()}function E(t){const e=p(t),r=y.mul(e);return A(r)?{dd:e,P:_(r)}:{dd:g.sub(e),P:_(r)}}function S(t){try{return w(t),!0}catch(t){return!1}}function I(t,e,r){if(!n.isBuffer(t)||32!==t.length)throw new TypeError(h);if(!S(e))throw new TypeError("Expected Point");const i=w(e);if(!n.isBuffer(r)||64!==r.length)throw new TypeError(l);const o=r.slice(0,32),s=r.slice(32,64);if(o.compare(f)>=0||s.compare(c)>=0)throw new TypeError(l);const a=p(o),u=p(s),d=p(v("BIP0340/challenge",n.concat([o,e,t]))).mod(g),b=y.mul(u).add(i.mul(d).neg());return!b.isInfinity()&&A(b)&&b.getX().eq(a)}function k(t,e,r){if(!n.isBuffer(t)||32!==t.length)throw new TypeError(h);if(i=e,!(n.isBuffer(i)&&32===i.length&&i.compare(u)>0&&i.compare(c)<0))throw new TypeError("Expected Private");var i;if(void 0!==r&&(!n.isBuffer(r)||32!==r.length))throw new TypeError("Expected Extra Data (32 bytes)");const{dd:o,P:s}=E(e),a=r?o.xor(p(v("BIP0340/aux",r))):o,f=p(v("BIP0340/nonce",n.concat([d(a),s,t])));if(f.isZero())throw new Error("Failure (k0===0). This happens only with negligible probability.");const l=y.mul(f);if(l.isInfinity())throw new Error("R at Infinity");const b=A(l)?f:g.sub(f),m=p(v("BIP0340/challenge",n.concat([_(l),s,t]))).mod(g),w=n.concat([_(l),d(b.add(m.mul(o)).mod(g))]);if(!I(t,s,w))throw new Error("The created signature does not pass verification.");return w}e.forceEvenYPrivKey=function(t){return d(E(t).dd)},e.isXOnlyPoint=S,e.verifySchnorr=I,e.signSchnorr=function(t,e,r){return k(t,e,r)},e.signSchnorrWithoutExtraData=function(t,e){return k(t,e)}},3016:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.signature=e.number=e.isCanonicalSchnorrSignature=e.isCanonicalScriptSignature=e.isDefinedHashType=e.isCanonicalPubKey=e.toStack=e.fromASM=e.toASM=e.decompile=e.compile=e.isPushOnly=e.OPS=void 0;const i=r(7262),o=r(9394),s=r(4457),a=r(6168),u=r(9875),c=r(701),f=r(7131),h=r(9031);e.OPS=r(196);const l=r(7401),p=e.OPS.OP_RESERVED;function d(t){return a.Buffer(t)||function(t){return a.Number(t)&&(t===e.OPS.OP_0||t>=e.OPS.OP_1&&t<=e.OPS.OP_16||t===e.OPS.OP_1NEGATE)}(t)}function g(t){return a.Array(t)&&t.every(d)}function y(t){return 0===t.length?e.OPS.OP_0:1===t.length?t[0]>=1&&t[0]<=16?p+t[0]:129===t[0]?e.OPS.OP_1NEGATE:void 0:void 0}function b(t){return n.isBuffer(t)}function m(t){return n.isBuffer(t)}function v(t){if(b(t))return t;h(a.Array,t);const e=t.reduce(((t,e)=>m(e)?1===e.length&&void 0!==y(e)?t+1:t+f.encodingLength(e.length)+e.length:t+1),0),r=n.allocUnsafe(e);let i=0;if(t.forEach((t=>{if(m(t)){const e=y(t);if(void 0!==e)return r.writeUInt8(e,i),void(i+=1);i+=f.encode(r,t.length,i),t.copy(r,i),i+=t.length}else r.writeUInt8(t,i),i+=1})),i!==r.length)throw new Error("Could not decode chunks");return r}function w(t){if(r=t,a.Array(r))return t;var r;h(a.Buffer,t);const n=[];let i=0;for(;i<t.length;){const r=t[i];if(r>e.OPS.OP_0&&r<=e.OPS.OP_PUSHDATA4){const e=f.decode(t,i);if(null===e)return null;if(i+=e.size,i+e.number>t.length)return null;const r=t.slice(i,i+e.number);i+=e.number;const o=y(r);void 0!==o?n.push(o):n.push(r)}else n.push(r),i+=1}return n}function _(t){const e=-193&t;return e>0&&e<4}e.isPushOnly=g,e.compile=v,e.decompile=w,e.toASM=function(t){return b(t)&&(t=w(t)),t.map((t=>{if(m(t)){const e=y(t);if(void 0===e)return t.toString("hex");t=e}return l[t]})).join(" ")},e.fromASM=function(t){return h(a.String,t),v(t.split(" ").map((t=>void 0!==e.OPS[t]?e.OPS[t]:(h(a.Hex,t),n.from(t,"hex")))))},e.toStack=function(t){return t=w(t),h(g,t),t.map((t=>m(t)?t:t===e.OPS.OP_0?n.allocUnsafe(0):i.encode(t-p)))},e.isCanonicalPubKey=function(t){return c.isPoint(t)},e.isDefinedHashType=_,e.isCanonicalScriptSignature=function(t){return!!n.isBuffer(t)&&!!_(t[t.length-1])&&u.check(t.slice(0,-1))},e.isCanonicalSchnorrSignature=function(t){return!(!n.isBuffer(t)||64!==t.length&&(65!==t.length||![s.Transaction.SIGHASH_ALL,s.Transaction.SIGHASH_NONE,s.Transaction.SIGHASH_SINGLE,s.Transaction.SIGHASH_ALL|s.Transaction.SIGHASH_ANYONECANPAY,s.Transaction.SIGHASH_NONE|s.Transaction.SIGHASH_ANYONECANPAY,s.Transaction.SIGHASH_SINGLE|s.Transaction.SIGHASH_ANYONECANPAY].includes(t[64])))},e.number=i,e.signature=o},7262:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.encode=e.decode=void 0,e.decode=function(t,e,r){e=e||4,r=void 0===r||r;const n=t.length;if(0===n)return 0;if(n>e)throw new TypeError("Script number overflow");if(r&&0==(127&t[n-1])&&(n<=1||0==(128&t[n-2])))throw new Error("Non-minimally encoded script number");if(5===n){const e=t.readUInt32LE(0),r=t.readUInt8(4);return 128&r?-(4294967296*(-129&r)+e):4294967296*r+e}let i=0;for(let e=0;e<n;++e)i|=t[e]<<8*e;return 128&t[n-1]?-(i&~(128<<8*(n-1))):i},e.encode=function(t){let e=Math.abs(t);const r=(i=e)>2147483647?5:i>8388607?4:i>32767?3:i>127?2:i>0?1:0;var i;const o=n.allocUnsafe(r),s=t<0;for(let t=0;t<r;++t)o.writeUInt8(255&e,t),e>>=8;return 128&o[r-1]?o.writeUInt8(s?128:0,r-1):s&&(o[r-1]|=128),o}},9394:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.encode=e.decode=void 0;const i=r(6168),o=r(9875),s=r(9031),a=n.alloc(1,0);function u(t){let e=0;for(;0===t[e];)++e;return e===t.length?a:128&(t=t.slice(e))[0]?n.concat([a,t],1+t.length):t}function c(t){0===t[0]&&(t=t.slice(1));const e=n.alloc(32,0),r=Math.max(0,32-t.length);return t.copy(e,r),e}e.decode=function(t){const e=t.readUInt8(t.length-1),r=-193&e;if(r<=0||r>=4)throw new Error("Invalid hashType "+e);const i=o.decode(t.slice(0,-1)),s=c(i.r),a=c(i.s);return{signature:n.concat([s,a],64),hashType:e}},e.encode=function(t,e){s({signature:i.BufferN(64),hashType:i.UInt8},{signature:t,hashType:e});const r=-193&e;if(r<=0||r>=4)throw new Error("Invalid hashType "+e);const a=n.allocUnsafe(1);a.writeUInt8(e,0);const c=u(t.slice(0,32)),f=u(t.slice(32,64));return n.concat([o.encode(c,f),a])}},3529:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.getTaptreeRoot=e.getTapleafHash=e.parseControlBlock=e.parseTaprootWitness=e.getControlBlock=e.getHuffmanTaptree=e.tapTweakPubkey=e.tapTweakPrivkey=e.hashTapBranch=e.hashTapLeaf=e.serializeScriptSize=e.aggregateMuSigPubkeys=e.taggedHash=e.EVEN_Y_COORD_PREFIX=void 0;const i=r(1696),o=r(2486),s=r(2572),a=r(4732),u=r(3016),c=r(8595),f=r(701);e.EVEN_Y_COORD_PREFIX=n.of(2);const h=n.of(192),l=Object.fromEntries(["TapLeaf","TapBranch","TapTweak","KeyAgg list","KeyAgg coefficient","TapSighash"].map((t=>{const e=s.sha256(n.from(t));return[t,n.concat([e,e])]})));function p(t,e){return s.sha256(n.concat([l[t],e]))}function d(t){return c.encode(t.length)}function g(t){const e=d(t);return p("TapLeaf",n.concat([h,e,t]))}function y(t,e){const r=[t,e].sort(n.compare);return p("TapBranch",n.concat(r))}function b(t,e){return p("TapTweak",e?n.concat([t,e]):t)}function m(t){if((t.length-1)%32!=0)throw new TypeError("Invalid control block length");const r=1&t[0],i=t.slice(1,33);if(!f.isPoint(n.concat([e.EVEN_Y_COORD_PREFIX,i])))throw new Error("internal pubkey is not an EC point");const o=254&t[0];if(80===o)throw new Error("invalid leaf version");const s=[];for(let e=33;e<t.length;e+=32)s.push(t.slice(e,e+32));return{parity:r,internalPubkey:i,leafVersion:o,path:s}}function v(t,e){n.isBuffer(t)&&(t=m(t));const{leafVersion:r}=t;return p("TapLeaf",n.concat([n.of(r),d(e),e]))}e.taggedHash=p,e.aggregateMuSigPubkeys=function(t){i(t.length>1,"at least two pubkeys are required for musig key aggregation"),t.sort(n.compare);const r=p("KeyAgg list",n.concat(t));return t.map(((t,i)=>{const o=n.concat([e.EVEN_Y_COORD_PREFIX,t]);if(1===i)return o;const s=p("KeyAgg coefficient",n.concat([r,t]));return f.pointMultiply(o,s)})).reduce(((t,e)=>f.pointAdd(t,e))).slice(1)},e.serializeScriptSize=d,e.hashTapLeaf=g,e.hashTapBranch=y,e.tapTweakPrivkey=function(t,e,r){const n=b(t,r);return f.privateAdd(a.forceEvenYPrivKey(e),n)},e.tapTweakPubkey=function(t,r){const i=b(t,r),o=f.pointAddScalar(n.concat([e.EVEN_Y_COORD_PREFIX,t]),i);return{parity:o[0]===e.EVEN_Y_COORD_PREFIX[0]?0:1,pubkey:o.slice(1)}},e.getHuffmanTaptree=function(t,e){i(t.length>0,"at least one script is required to construct a tap tree");const r=new o(((t,e)=>t.weight<e.weight));for(t.forEach(((t,n)=>{const o=e[n]||1;i(o>0,"script weight must be a positive value"),r.add({weight:o,taggedHash:g(t),paths:{[n]:[]}})}));r.size>1;){const t=r.poll(),e=r.poll();Object.values(t.paths).forEach((t=>t.push(e.taggedHash))),Object.values(e.paths).forEach((e=>e.push(t.taggedHash))),r.add({taggedHash:y(t.taggedHash,e.taggedHash),weight:t.weight+e.weight,paths:Object.assign(Object.assign({},t.paths),e.paths)})}const n=r.poll(),s=Object.entries(n.paths).reduce(((t,[e,r])=>(t[Number(e)]=r,t)),Array(t.length));return{root:n.taggedHash,paths:s}},e.getControlBlock=function(t,e,r){const i=h[0]+t;return n.concat([n.of(i),e,...r])},e.parseTaprootWitness=function(t){let e;if(t.length>=2&&80===t[t.length-1][0]&&(e=t[t.length-1],t=t.slice(0,-1)),t.length<1)throw new Error("witness stack must have at least one element");if(1===t.length){const r=t[0];if(!u.isCanonicalSchnorrSignature(r))throw new Error("invalid signature");return{spendType:"Key",signature:r,annex:e}}const r=t[t.length-2],n=u.decompile(r);if(!n||0===n.length)throw new Error("tapscript is not a valid script");const i=t[t.length-1];if(i.length<33||i.length>4129||i.length%32!=1)throw new Error("invalid control block length");return{spendType:"Script",scriptSig:t.slice(0,-2),tapscript:r,controlBlock:i,annex:e}},e.parseControlBlock=m,e.getTapleafHash=v,e.getTaptreeRoot=function(t,e,r){n.isBuffer(t)&&(t=m(t));const{path:i}=t;let o=r=r||v(t,e);for(const t of i)o=-1===n.compare(o,t)?p("TapBranch",n.concat([o,t])):p("TapBranch",n.concat([t,o]));return o}},3155:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.output=e.input=void 0;const n=r(5253);e.input=n;const i=r(8731);e.output=i},5253:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const n=r(3016),i=r(3016);function o(t){return t===i.OPS.OP_0||n.isCanonicalScriptSignature(t)}function s(t,e){const r=n.decompile(t);return!(r.length<2)&&r[0]===i.OPS.OP_0&&(e?r.slice(1).every(o):r.slice(1).every(n.isCanonicalScriptSignature))}e.check=s,s.toJSON=()=>"multisig input"},8731:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const n=r(3016),i=r(3016),o=r(6168),s=i.OPS.OP_RESERVED;function a(t,e){const r=n.decompile(t);if(r.length<4)return!1;if(r[r.length-1]!==i.OPS.OP_CHECKMULTISIG)return!1;if(!o.Number(r[0]))return!1;if(!o.Number(r[r.length-2]))return!1;const a=r[0]-s,u=r[r.length-2]-s;return!(a<=0)&&(!(u>16)&&(!(a>u)&&(u===r.length-3&&(!!e||r.slice(1,-2).every(n.isCanonicalPubKey)))))}e.check=a,a.toJSON=()=>"multi-sig output"},9404:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.output=e.check=void 0;const n=r(3016),i=n.OPS;function o(t){const e=n.compile(t);return e.length>1&&e[0]===i.OP_RETURN}e.check=o,o.toJSON=()=>"null data output";const s={check:o};e.output=s},9177:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.output=e.input=void 0;const n=r(435);e.input=n;const i=r(9047);e.output=i},435:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const n=r(3016);function i(t){const e=n.decompile(t);return 1===e.length&&n.isCanonicalScriptSignature(e[0])}e.check=i,i.toJSON=()=>"pubKey input"},9047:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const n=r(3016),i=r(3016);function o(t){const e=n.decompile(t);return 2===e.length&&n.isCanonicalPubKey(e[0])&&e[1]===i.OPS.OP_CHECKSIG}e.check=o,o.toJSON=()=>"pubKey output"},6858:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.output=e.input=void 0;const n=r(1142);e.input=n;const i=r(5448);e.output=i},1142:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const n=r(3016);function i(t){const e=n.decompile(t);return 2===e.length&&n.isCanonicalScriptSignature(e[0])&&n.isCanonicalPubKey(e[1])}e.check=i,i.toJSON=()=>"pubKeyHash input"},5448:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const n=r(3016),i=r(3016);function o(t){const e=n.compile(t);return 25===e.length&&e[0]===i.OPS.OP_DUP&&e[1]===i.OPS.OP_HASH160&&20===e[2]&&e[23]===i.OPS.OP_EQUALVERIFY&&e[24]===i.OPS.OP_CHECKSIG}e.check=o,o.toJSON=()=>"pubKeyHash output"},6696:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.output=e.input=void 0;const n=r(8462);e.input=n;const i=r(9387);e.output=i},8462:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const i=r(3016),o=r(3155),s=r(9177),a=r(6858),u=r(3805),c=r(6226);function f(t,e){const r=i.decompile(t);if(r.length<1)return!1;const f=r[r.length-1];if(!n.isBuffer(f))return!1;const h=i.decompile(i.compile(r.slice(0,-1))),l=i.decompile(f);return!!l&&!!i.isPushOnly(h)&&(1===r.length?c.check(l)||u.check(l):!(!a.input.check(h)||!a.output.check(l))||!(!o.input.check(h,e)||!o.output.check(l))||!(!s.input.check(h)||!s.output.check(l)))}e.check=f,f.toJSON=()=>"scriptHash input"},9387:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const n=r(3016),i=r(3016);function o(t){const e=n.compile(t);return 23===e.length&&e[0]===i.OPS.OP_HASH160&&20===e[1]&&e[22]===i.OPS.OP_EQUAL}e.check=o,o.toJSON=()=>"scriptHash output"},2840:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.output=e.input=void 0;const n=r(8576);e.input=n;const i=r(1628);e.output=i},8576:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const n=r(3529);function i(t){try{return n.parseTaprootWitness(t),!0}catch(t){return!1}}e.check=i,i.toJSON=()=>"taproot input"},1628:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const n=r(3016),i=r(3016);function o(t){const e=n.compile(t);return 34===e.length&&e[0]===i.OPS.OP_1&&32===e[1]}e.check=o,o.toJSON=()=>"Taproot output"},6540:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.output=e.input=void 0;const n=r(3843);e.input=n;const i=r(4901);e.output=i},3843:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const n=r(3016),i=r(3016);function o(t){return t===i.OPS.OP_0||n.isCanonicalSchnorrSignature(t)}function s(t,e){const r=n.decompile(t);return!(r.length<1)&&(e?r.every(o)&&r.some((t=>t!==i.OPS.OP_0)):r.every(n.isCanonicalSchnorrSignature))}e.check=s,s.toJSON=()=>"taproot n-of-n input"},4901:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const n=r(4732),i=r(3016),o=r(3016);function s(t,e){const r=i.decompile(t);if(r.length<3)return!1;const s=r.filter(((t,e)=>e%2==1));return s[s.length-1]===o.OPS.OP_CHECKSIG&&(!!s.slice(0,-1).every((t=>t===o.OPS.OP_CHECKSIGVERIFY))&&(!(r.length/2>16)&&(!!e||r.filter(((t,e)=>e%2==0)).every(n.isXOnlyPoint))))}e.check=s,s.toJSON=()=>"taproot n-of-n output"},2468:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.output=void 0;const n=r(2562);e.output=n},2562:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.decode=e.encode=e.check=void 0;const i=r(3016),o=r(3016),s=r(6168),a=r(9031),u=n.from("aa21a9ed","hex");function c(t){const e=i.compile(t);return e.length>37&&e[0]===o.OPS.OP_RETURN&&36===e[1]&&e.slice(2,6).equals(u)}e.check=c,c.toJSON=()=>"Witness commitment output",e.encode=function(t){a(s.Hash256bit,t);const e=n.allocUnsafe(36);return u.copy(e,0),t.copy(e,4),i.compile([o.OPS.OP_RETURN,e])},e.decode=function(t){return a(c,t),i.decompile(t)[1].slice(4,36)}},8387:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.output=e.input=void 0;const n=r(1120);e.input=n;const i=r(3805);e.output=i},1120:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const n=r(3016);function i(t){const e=n.decompile(t);return 2===e.length&&n.isCanonicalScriptSignature(e[0])&&(r=e[1],n.isCanonicalPubKey(r)&&33===r.length);var r}e.check=i,i.toJSON=()=>"witnessPubKeyHash input"},3805:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const n=r(3016),i=r(3016);function o(t){const e=n.compile(t);return 22===e.length&&e[0]===i.OPS.OP_0&&20===e[1]}e.check=o,o.toJSON=()=>"Witness pubKeyHash output"},9805:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.output=e.input=void 0;const n=r(3412);e.input=n;const i=r(6226);e.output=i},3412:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const i=r(3016),o=r(9031),s=r(3155),a=r(9177),u=r(6858);function c(t,e){if(o(o.Array,t),t.length<1)return!1;const r=t[t.length-1];if(!n.isBuffer(r))return!1;const c=i.decompile(r);if(!c||0===c.length)return!1;const f=i.compile(t.slice(0,-1));return!(!u.input.check(f)||!u.output.check(c))||!(!s.input.check(f,e)||!s.output.check(c))||!(!a.input.check(f)||!a.output.check(c))}e.check=c,c.toJSON=()=>"witnessScriptHash input"},6226:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.check=void 0;const n=r(3016),i=r(3016);function o(t){const e=n.compile(t);return 34===e.length&&e[0]===i.OPS.OP_0&&32===e[1]}e.check=o,o.toJSON=()=>"Witness scriptHash output"},4457:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.Transaction=void 0;const i=r(9359),o=r(2572),s=r(3016),a=r(3016),u=r(3529),c=r(6168),f=r(9031),h=r(8595);function l(t){const e=t.length;return h.encodingLength(e)+e}const p=n.allocUnsafe(0),d=[],g=n.from("0000000000000000000000000000000000000000000000000000000000000000","hex"),y=n.from("0000000000000000000000000000000000000000000000000000000000000001","hex"),b=n.from("ffffffffffffffff","hex"),m={script:p,valueBuffer:b};class v{constructor(){this.version=1,this.locktime=0,this.ins=[],this.outs=[]}static fromBuffer(t,e){const r=new i.BufferReader(t),n=new v;n.version=r.readInt32();const o=r.readUInt8(),s=r.readUInt8();let a=!1;o===v.ADVANCED_TRANSACTION_MARKER&&s===v.ADVANCED_TRANSACTION_FLAG?a=!0:r.offset-=2;const u=r.readVarInt();for(let t=0;t<u;++t)n.ins.push({hash:r.readSlice(32),index:r.readUInt32(),script:r.readVarSlice(),sequence:r.readUInt32(),witness:d});const c=r.readVarInt();for(let t=0;t<c;++t)n.outs.push({value:r.readUInt64(),script:r.readVarSlice()});if(a){for(let t=0;t<u;++t)n.ins[t].witness=r.readVector();if(!n.hasWitnesses())throw new Error("Transaction has superfluous witness data")}if(n.locktime=r.readUInt32(),e)return n;if(r.offset!==t.length)throw new Error("Transaction has unexpected data");return n}static fromHex(t){return v.fromBuffer(n.from(t,"hex"),!1)}static isCoinbaseHash(t){f(c.Hash256bit,t);for(let e=0;e<32;++e)if(0!==t[e])return!1;return!0}isCoinbase(){return 1===this.ins.length&&v.isCoinbaseHash(this.ins[0].hash)}addInput(t,e,r,n){return f(c.tuple(c.Hash256bit,c.UInt32,c.maybe(c.UInt32),c.maybe(c.Buffer)),arguments),c.Null(r)&&(r=v.DEFAULT_SEQUENCE),this.ins.push({hash:t,index:e,script:n||p,sequence:r,witness:d})-1}addOutput(t,e){return f(c.tuple(c.Buffer,c.Satoshi),arguments),this.outs.push({script:t,value:e})-1}hasWitnesses(){return this.ins.some((t=>0!==t.witness.length))}weight(){return 3*this.byteLength(!1)+this.byteLength(!0)}virtualSize(){return Math.ceil(this.weight()/4)}byteLength(t=!0){const e=t&&this.hasWitnesses();return(e?10:8)+h.encodingLength(this.ins.length)+h.encodingLength(this.outs.length)+this.ins.reduce(((t,e)=>t+40+l(e.script)),0)+this.outs.reduce(((t,e)=>t+8+l(e.script)),0)+(e?this.ins.reduce(((t,e)=>t+function(t){const e=t.length;return h.encodingLength(e)+t.reduce(((t,e)=>t+l(e)),0)}(e.witness)),0):0)}clone(){const t=new v;return t.version=this.version,t.locktime=this.locktime,t.ins=this.ins.map((t=>({hash:t.hash,index:t.index,script:t.script,sequence:t.sequence,witness:t.witness}))),t.outs=this.outs.map((t=>({script:t.script,value:t.value}))),t}hashForSignature(t,e,r){if(f(c.tuple(c.UInt32,c.Buffer,c.Number),arguments),t>=this.ins.length)return y;const i=s.compile(s.decompile(e).filter((t=>t!==a.OPS.OP_CODESEPARATOR))),u=this.clone();if((31&r)===v.SIGHASH_NONE)u.outs=[],u.ins.forEach(((e,r)=>{r!==t&&(e.sequence=0)}));else if((31&r)===v.SIGHASH_SINGLE){if(t>=this.outs.length)return y;u.outs.length=t+1;for(let e=0;e<t;e++)u.outs[e]=m;u.ins.forEach(((e,r)=>{r!==t&&(e.sequence=0)}))}r&v.SIGHASH_ANYONECANPAY?(u.ins=[u.ins[t]],u.ins[0].script=i):(u.ins.forEach((t=>{t.script=p})),u.ins[t].script=i);const h=n.allocUnsafe(u.byteLength(!1)+4);return h.writeInt32LE(r,h.length-4),u.__toBuffer(h,0,!1),o.hash256(h)}hashForWitnessV1(t,e,r,s,a,h){if(f(c.tuple(c.UInt32,f.arrayOf(c.Buffer),f.arrayOf(c.Satoshi),c.UInt32),arguments),r.length!==this.ins.length||e.length!==this.ins.length)throw new Error("Must supply prevout script and value for all inputs");const d=s===v.SIGHASH_DEFAULT?v.SIGHASH_ALL:s&v.SIGHASH_OUTPUT_MASK,g=(s&v.SIGHASH_INPUT_MASK)===v.SIGHASH_ANYONECANPAY,y=d===v.SIGHASH_NONE,b=d===v.SIGHASH_SINGLE;let m=p,w=p,_=p,A=p,E=p;if(!g){let t=i.BufferWriter.withCapacity(36*this.ins.length);this.ins.forEach((e=>{t.writeSlice(e.hash),t.writeUInt32(e.index)})),m=o.sha256(t.end()),t=i.BufferWriter.withCapacity(8*this.ins.length),r.forEach((e=>t.writeUInt64(e))),w=o.sha256(t.end()),t=i.BufferWriter.withCapacity(e.map(l).reduce(((t,e)=>t+e))),e.forEach((e=>t.writeVarSlice(e))),_=o.sha256(t.end()),t=i.BufferWriter.withCapacity(4*this.ins.length),this.ins.forEach((e=>t.writeUInt32(e.sequence))),A=o.sha256(t.end())}if(y||b){if(b&&t<this.outs.length){const e=this.outs[t],r=i.BufferWriter.withCapacity(8+l(e.script));r.writeUInt64(e.value),r.writeVarSlice(e.script),E=o.sha256(r.end())}}else{const t=this.outs.map((t=>8+l(t.script))).reduce(((t,e)=>t+e)),e=i.BufferWriter.withCapacity(t);this.outs.forEach((t=>{e.writeUInt64(t.value),e.writeVarSlice(t.script)})),E=o.sha256(e.end())}const S=(a?2:0)+(h?1:0),I=174-(g?49:0)-(y?32:0)+(h?32:0)+(a?37:0),k=i.BufferWriter.withCapacity(I);if(k.writeUInt8(s),k.writeInt32(this.version),k.writeUInt32(this.locktime),k.writeSlice(m),k.writeSlice(w),k.writeSlice(_),k.writeSlice(A),y||b||k.writeSlice(E),k.writeUInt8(S),g){const n=this.ins[t];k.writeSlice(n.hash),k.writeUInt32(n.index),k.writeUInt64(r[t]),k.writeVarSlice(e[t]),k.writeUInt32(n.sequence)}else k.writeUInt32(t);if(h){const t=i.BufferWriter.withCapacity(l(h));t.writeVarSlice(h),k.writeSlice(o.sha256(t.end()))}return b&&k.writeSlice(E),a&&(k.writeSlice(a),k.writeUInt8(0),k.writeUInt32(4294967295)),(0,u.taggedHash)("TapSighash",n.concat([n.of(0),k.end()]))}hashForWitnessV0(t,e,r,s){f(c.tuple(c.UInt32,c.Buffer,c.Satoshi,c.UInt32),arguments);let a,u=n.from([]),h=g,p=g,d=g;if(s&v.SIGHASH_ANYONECANPAY||(u=n.allocUnsafe(36*this.ins.length),a=new i.BufferWriter(u,0),this.ins.forEach((t=>{a.writeSlice(t.hash),a.writeUInt32(t.index)})),p=o.hash256(u)),s&v.SIGHASH_ANYONECANPAY||(31&s)===v.SIGHASH_SINGLE||(31&s)===v.SIGHASH_NONE||(u=n.allocUnsafe(4*this.ins.length),a=new i.BufferWriter(u,0),this.ins.forEach((t=>{a.writeUInt32(t.sequence)})),d=o.hash256(u)),(31&s)!==v.SIGHASH_SINGLE&&(31&s)!==v.SIGHASH_NONE){const t=this.outs.reduce(((t,e)=>t+8+l(e.script)),0);u=n.allocUnsafe(t),a=new i.BufferWriter(u,0),this.outs.forEach((t=>{a.writeUInt64(t.value),a.writeVarSlice(t.script)})),h=o.hash256(u)}else if((31&s)===v.SIGHASH_SINGLE&&t<this.outs.length){const e=this.outs[t];u=n.allocUnsafe(8+l(e.script)),a=new i.BufferWriter(u,0),a.writeUInt64(e.value),a.writeVarSlice(e.script),h=o.hash256(u)}u=n.allocUnsafe(156+l(e)),a=new i.BufferWriter(u,0);const y=this.ins[t];return a.writeInt32(this.version),a.writeSlice(p),a.writeSlice(d),a.writeSlice(y.hash),a.writeUInt32(y.index),a.writeVarSlice(e),a.writeUInt64(r),a.writeUInt32(y.sequence),a.writeSlice(h),a.writeUInt32(this.locktime),a.writeUInt32(s),o.hash256(u)}getHash(t){return t&&this.isCoinbase()?n.alloc(32,0):o.hash256(this.__toBuffer(void 0,void 0,t))}getId(){return(0,i.reverseBuffer)(this.getHash(!1)).toString("hex")}toBuffer(t,e){return this.__toBuffer(t,e,!0)}toHex(){return this.toBuffer(void 0,void 0).toString("hex")}setInputScript(t,e){f(c.tuple(c.Number,c.Buffer),arguments),this.ins[t].script=e}setWitness(t,e){f(c.tuple(c.Number,[c.Buffer]),arguments),this.ins[t].witness=e}__toBuffer(t,e,r=!1){t||(t=n.allocUnsafe(this.byteLength(r)));const o=new i.BufferWriter(t,e||0);o.writeInt32(this.version);const s=r&&this.hasWitnesses();return s&&(o.writeUInt8(v.ADVANCED_TRANSACTION_MARKER),o.writeUInt8(v.ADVANCED_TRANSACTION_FLAG)),o.writeVarInt(this.ins.length),this.ins.forEach((t=>{o.writeSlice(t.hash),o.writeUInt32(t.index),o.writeVarSlice(t.script),o.writeUInt32(t.sequence)})),o.writeVarInt(this.outs.length),this.outs.forEach((t=>{void 0!==t.value?o.writeUInt64(t.value):o.writeSlice(t.valueBuffer),o.writeVarSlice(t.script)})),s&&this.ins.forEach((t=>{o.writeVector(t.witness)})),o.writeUInt32(this.locktime),void 0!==e?t.slice(e,o.offset):t}}e.Transaction=v,v.DEFAULT_SEQUENCE=4294967295,v.SIGHASH_DEFAULT=0,v.SIGHASH_ALL=1,v.SIGHASH_NONE=2,v.SIGHASH_SINGLE=3,v.SIGHASH_ANYONECANPAY=128,v.SIGHASH_OUTPUT_MASK=3,v.SIGHASH_INPUT_MASK=128,v.ADVANCED_TRANSACTION_MARKER=0,v.ADVANCED_TRANSACTION_FLAG=1},6459:(t,e,r)=>{"use strict";var n=r(8834).Buffer;Object.defineProperty(e,"__esModule",{value:!0}),e.TransactionBuilder=void 0;const i=r(9168),o=r(9359),s=r(4654),a=r(2572),u=r(8893),c=r(419),f=r(6469),h=r(4732),l=r(3016),p=r(3016),d=r(3529),g=r(4457),y=r(6168),b=r(9031),m=s.types,v=new Set(["p2pkh","p2pk","p2wpkh","p2ms","p2sh-p2pkh","p2sh-p2pk","p2sh-p2wpkh","p2sh-p2ms","p2wsh-p2pkh","p2wsh-p2pk","p2wsh-p2ms","p2sh-p2wsh-p2pkh","p2sh-p2wsh-p2pk","p2sh-p2wsh-p2ms","p2tr","p2tr-p2ns"]);function w(t,e,r){try{b(t,e)}catch(t){throw new Error(r)}}class _{constructor(t=c.bitcoin,e=2500){this.network=t,this.maximumFeeRate=e,this.__PREV_TX_SET={},this.__INPUTS=[],this.__TX=new g.Transaction,this.__TX.version=2,this.__USE_LOW_R=!1,console.warn("Deprecation Warning: TransactionBuilder will be removed in the future. (v6.x.x or later) Please use the Psbt class instead. Examples of usage are available in the transactions-psbt.js integration test file on our Github. A high level explanation is available in the psbt.ts and psbt.js files as well.")}static fromTransaction(t,e){const r=new _(e);return r.setVersion(t.version),r.setLockTime(t.locktime),t.outs.forEach((t=>{r.addOutput(t.script,t.value)})),t.ins.forEach((t=>{r.__addInputUnsafe(t.hash,t.index,{sequence:t.sequence,script:t.script,witness:t.witness})})),r.__INPUTS.forEach(((e,r)=>{!function(t,e,r){if(t.redeemScriptType!==m.P2MS||!t.redeemScript)return;if(t.pubkeys.length===t.signatures.length)return;const n=t.signatures.concat();t.signatures=t.pubkeys.map((i=>{const o=u.fromPublicKey(i);let s;return n.some(((i,a)=>{if(!i)return!1;const u=l.signature.decode(i),c=e.hashForSignature(r,t.redeemScript,u.hashType);return!!o.verify(c,u.signature)&&(n[a]=void 0,s=i,!0)})),s}))}(e,t,r)})),r}setLowR(t){return b(b.maybe(b.Boolean),t),void 0===t&&(t=!0),this.__USE_LOW_R=t,t}setLockTime(t){if(b(y.UInt32,t),this.__INPUTS.some((t=>!!t.signatures&&t.signatures.some((t=>void 0!==t)))))throw new Error("No, this would invalidate signatures");this.__TX.locktime=t}setVersion(t){b(y.UInt32,t),this.__TX.version=t}addInput(t,e,r,i,s){if(!this.__canModifyInputs())throw new Error("No, this would invalidate signatures");if("string"==typeof(a=t)||a instanceof String)t=(0,o.reverseBuffer)(n.from(t,"hex"));else if(function(t){return t instanceof g.Transaction}(t)){const r=t.outs[e];i=r.script,s=r.value,t=t.getHash(!1)}var a;return this.__addInputUnsafe(t,e,{sequence:r,prevOutScript:i,value:s})}addOutput(t,e){if(!this.__canModifyOutputs())throw new Error("No, this would invalidate signatures");return"string"==typeof t&&(t=i.toOutputScript(t,this.network)),this.__TX.addOutput(t,e)}build(){return this.__build(!1)}buildIncomplete(){return this.__build(!0)}sign(t,e,r,i,o,s,a,u){!function({input:t,ourPubKey:e,keyPair:r,signatureHash:i,hashType:o,useLowR:s,taptreeRoot:a}){1===t.witnessVersion&&33===e.length&&(e=e.slice(1));let u=!1;for(const[c,f]of t.pubkeys.entries())if(e.equals(f)){if(t.signatures[c]&&t.signatures[c].length>0)throw new Error("Signature already exists");if(33!==e.length&&0===t.witnessVersion)throw new Error("BIP143 (Witness v0) inputs require compressed pubkeys");if(32!==e.length&&1===t.witnessVersion)throw new Error("BIP341 (Witness v1) inputs require x-only pubkeys");if(1===t.witnessVersion){let{privateKey:s}=r;if(!s)throw new Error("unexpected keypair");t.witnessScript||(s=d.tapTweakPrivkey(e,s,a));const u=(0,h.signSchnorrWithoutExtraData)(i,s);o===g.Transaction.SIGHASH_DEFAULT?t.signatures[c]=u:t.signatures[c]=n.concat([u,n.of(o)])}else{const e=r.sign(i,s);t.signatures[c]=l.signature.encode(e,o)}u=!0}if(!u)throw new Error("Key pair cannot sign for this input")}(function(t,e,r,n,i,o,s,a,u,c,h,p,_){let A;if("number"==typeof i)console.warn("DEPRECATED: TransactionBuilder sign method arguments will change in v6, please use the TxbSignArg interface"),A=i;else{if("object"!=typeof i)throw new TypeError("TransactionBuilder sign first arg must be TxbSignArg or number");!function(t,e){if(!v.has(e.prevOutScriptType))throw new TypeError(`Unknown prevOutScriptType "${e.prevOutScriptType}"`);w(b.Number,e.vin,"sign must include vin parameter as Number (input index)"),w(y.Signer,e.keyPair,"sign must include keyPair parameter as Signer interface"),w(b.maybe(b.Number),e.hashType,"sign hashType parameter must be a number");const r=(t[e.vin]||[]).prevOutType,n=e.prevOutScriptType;switch(n){case"p2pkh":if(r&&"pubkeyhash"!==r)throw new TypeError(`input #${e.vin} is not of type p2pkh: ${r}`);w(b.value(void 0),e.witnessScript,`${n} requires NO witnessScript`),w(b.value(void 0),e.redeemScript,`${n} requires NO redeemScript`),w(b.value(void 0),e.witnessValue,`${n} requires NO witnessValue`);break;case"p2pk":if(r&&"pubkey"!==r)throw new TypeError(`input #${e.vin} is not of type p2pk: ${r}`);w(b.value(void 0),e.witnessScript,`${n} requires NO witnessScript`),w(b.value(void 0),e.redeemScript,`${n} requires NO redeemScript`),w(b.value(void 0),e.witnessValue,`${n} requires NO witnessValue`);break;case"p2wpkh":if(r&&"witnesspubkeyhash"!==r)throw new TypeError(`input #${e.vin} is not of type p2wpkh: ${r}`);w(b.value(void 0),e.witnessScript,`${n} requires NO witnessScript`),w(b.value(void 0),e.redeemScript,`${n} requires NO redeemScript`),w(y.Satoshi,e.witnessValue,`${n} requires witnessValue`);break;case"p2ms":if(r&&"multisig"!==r)throw new TypeError(`input #${e.vin} is not of type p2ms: ${r}`);w(b.value(void 0),e.witnessScript,`${n} requires NO witnessScript`),w(b.value(void 0),e.redeemScript,`${n} requires NO redeemScript`),w(b.value(void 0),e.witnessValue,`${n} requires NO witnessValue`);break;case"p2sh-p2wpkh":if(r&&"scripthash"!==r)throw new TypeError(`input #${e.vin} is not of type p2sh-p2wpkh: ${r}`);w(b.value(void 0),e.witnessScript,`${n} requires NO witnessScript`),w(b.Buffer,e.redeemScript,`${n} requires redeemScript`),w(y.Satoshi,e.witnessValue,`${n} requires witnessValue`);break;case"p2sh-p2ms":case"p2sh-p2pk":case"p2sh-p2pkh":if(r&&"scripthash"!==r)throw new TypeError(`input #${e.vin} is not of type ${n}: ${r}`);w(b.value(void 0),e.witnessScript,`${n} requires NO witnessScript`),w(b.Buffer,e.redeemScript,`${n} requires redeemScript`),w(b.value(void 0),e.witnessValue,`${n} requires NO witnessValue`);break;case"p2wsh-p2ms":case"p2wsh-p2pk":case"p2wsh-p2pkh":if(r&&"witnessscripthash"!==r)throw new TypeError(`input #${e.vin} is not of type ${n}: ${r}`);w(b.Buffer,e.witnessScript,`${n} requires witnessScript`),w(b.value(void 0),e.redeemScript,`${n} requires NO redeemScript`),w(y.Satoshi,e.witnessValue,`${n} requires witnessValue`);break;case"p2sh-p2wsh-p2ms":case"p2sh-p2wsh-p2pk":case"p2sh-p2wsh-p2pkh":if(r&&"scripthash"!==r)throw new TypeError(`input #${e.vin} is not of type ${n}: ${r}`);w(b.Buffer,e.witnessScript,`${n} requires witnessScript`),w(b.Buffer,e.redeemScript,`${n} requires witnessScript`),w(y.Satoshi,e.witnessValue,`${n} requires witnessScript`);break;case"p2tr":if(r&&"taproot"!==r)throw new TypeError(`input #${e.vin} is not of type ${n}: ${r}`);w(b.value(void 0),e.witnessScript,`${n} requires NO witnessScript`),w(b.value(void 0),e.redeemScript,`${n} requires NO redeemScript`),w(b.value(void 0),e.witnessValue,`${n} requires NO witnessValue`);break;case"p2tr-p2ns":if(r&&"taproot"!==r)throw new TypeError(`input #${e.vin} is not of type ${n}: ${r}`);t[e.vin].prevOutType=t[e.vin].prevOutType||"taproot",w(b.Buffer,e.witnessScript,`${n} requires witnessScript`),w(b.Buffer,e.controlBlock,`${n} requires controlBlock`),w(b.value(void 0),e.redeemScript,`${n} requires NO redeemScript`)}}(e,i),({vin:A,keyPair:o,redeemScript:s,hashType:a,witnessValue:u,witnessScript:c,controlBlock:h,annex:p}=i)}if(void 0===o)throw new Error("sign requires keypair");if(o.network&&o.network!==t)throw new TypeError("Inconsistent network");if(!e[A])throw new Error("No input at index: "+A);const S=e[A];if(void 0!==S.redeemScript&&s&&!S.redeemScript.equals(s))throw new Error("Inconsistent redeemScript");const k=o.publicKey||o.getPublicKey&&o.getPublicKey();if(!I(S)){if(void 0!==u){if(void 0!==S.value&&S.value!==u)throw new Error("Input did not match witnessValue");b(y.Satoshi,u),S.value=u}if(!I(S)){const t=function(t,e,r,n,i,o){if(r&&n){const i=f.p2wsh({redeem:{output:n}}),o=f.p2wsh({output:r}),s=f.p2sh({redeem:{output:r}}),a=f.p2sh({redeem:i});if(!i.hash.equals(o.hash))throw new Error("Witness script inconsistent with prevOutScript");if(!s.hash.equals(a.hash))throw new Error("Redeem script inconsistent with prevOutScript");const u=E(i.redeem.output,e);if(!u.pubkeys)throw new Error(u.type+" not supported as witnessScript ("+l.toASM(n)+")");t.signatures&&t.signatures.some((t=>void 0!==t))&&(u.signatures=t.signatures);const c=n;if(u.type===m.P2WPKH)throw new Error("P2SH(P2WSH(P2WPKH)) is a consensus failure");return{redeemScript:r,redeemScriptType:m.P2WSH,witnessScript:n,witnessScriptType:u.type,prevOutType:m.P2SH,prevOutScript:s.output,witnessVersion:0,signScript:c,signType:u.type,pubkeys:u.pubkeys,signatures:u.signatures,maxSignatures:u.maxSignatures}}if(r){const n=f.p2sh({redeem:{output:r}});if(t.prevOutScript){let e;try{e=f.p2sh({output:t.prevOutScript})}catch(t){throw new Error("PrevOutScript must be P2SH")}if(!n.hash.equals(e.hash))throw new Error("Redeem script inconsistent with prevOutScript")}const i=E(n.redeem.output,e);if(!i.pubkeys)throw new Error(i.type+" not supported as redeemScript ("+l.toASM(r)+")");t.signatures&&t.signatures.some((t=>void 0!==t))&&(i.signatures=t.signatures);let o=r;return i.type===m.P2WPKH&&(o=f.p2pkh({pubkey:i.pubkeys[0]}).output),{redeemScript:r,redeemScriptType:i.type,prevOutType:m.P2SH,prevOutScript:n.output,witnessVersion:i.type===m.P2WPKH?0:void 0,signScript:o,signType:i.type,pubkeys:i.pubkeys,signatures:i.signatures,maxSignatures:i.maxSignatures}}if(n&&i){let r=t.prevOutScript;r||(r=f.p2tr({redeems:[{output:n}],redeemIndex:0,controlBlock:i,annex:o}).output);const s=E(n,e);if(!s.pubkeys)throw new Error(s.type+" not supported as witnessScript ("+l.toASM(n)+")");return t.signatures&&t.signatures.some((t=>void 0!==t))&&(s.signatures=t.signatures),{witnessScript:n,witnessScriptType:s.type,prevOutType:m.P2TR,prevOutScript:r,witnessVersion:1,signScript:n,signType:s.type,pubkeys:s.pubkeys,signatures:s.signatures,maxSignatures:s.maxSignatures,controlBlock:i,annex:o}}if(n){const r=f.p2wsh({redeem:{output:n}});if(t.prevOutScript){const e=f.p2wsh({output:t.prevOutScript});if(!r.hash.equals(e.hash))throw new Error("Witness script inconsistent with prevOutScript")}const i=E(r.redeem.output,e);if(!i.pubkeys)throw new Error(i.type+" not supported as witnessScript ("+l.toASM(n)+")");t.signatures&&t.signatures.some((t=>void 0!==t))&&(i.signatures=t.signatures);const o=n;if(i.type===m.P2WPKH)throw new Error("P2WSH(P2WPKH) is a consensus failure");return{witnessScript:n,witnessScriptType:i.type,prevOutType:m.P2WSH,prevOutScript:r.output,witnessVersion:0,signScript:o,signType:i.type,pubkeys:i.pubkeys,signatures:i.signatures,maxSignatures:i.maxSignatures}}if(t.prevOutType&&t.prevOutScript){if(t.prevOutType===m.P2SH)throw new Error("PrevOutScript is "+t.prevOutType+", requires redeemScript");if(t.prevOutType===m.P2WSH)throw new Error("PrevOutScript is "+t.prevOutType+", requires witnessScript");const r=E(t.prevOutScript,e);if(!r.pubkeys)throw new Error(r.type+" not supported ("+l.toASM(t.prevOutScript)+")");t.signatures&&t.signatures.some((t=>void 0!==t))&&(r.signatures=t.signatures);let n,i=t.prevOutScript;return r.type===m.P2WPKH&&(i=f.p2pkh({pubkey:r.pubkeys[0]}).output),r.type===m.P2WPKH?n=0:r.type===m.P2TR&&(n=1),{prevOutType:r.type,prevOutScript:t.prevOutScript,witnessVersion:n,signScript:i,signType:r.type,pubkeys:r.pubkeys,signatures:r.signatures,maxSignatures:r.maxSignatures}}const s=f.p2pkh({pubkey:e}).output;return{prevOutType:m.P2PKH,prevOutScript:s,signScript:s,signType:m.P2PKH,pubkeys:[e],signatures:[void 0]}}(S,k,s,c,h,p);Object.assign(S,t)}if(!I(S))throw Error(S.prevOutType+" not supported")}if(r(a=1===S.witnessVersion?void 0===a?g.Transaction.SIGHASH_DEFAULT:a:a||g.Transaction.SIGHASH_ALL))throw new Error("Transaction needs outputs");let x,M,C;switch(h&&c&&(x=d.getTapleafHash(h,c),M=d.getTaptreeRoot(h,c,x)),S.witnessVersion){case void 0:C=n.hashForSignature(A,S.signScript,a);break;case 0:C=n.hashForWitnessV0(A,S.signScript,S.value,a);break;case 1:C=n.hashForWitnessV1(A,e.map((({prevOutScript:t})=>t)),e.map((({value:t})=>t)),a,x);break;default:throw new TypeError("Unsupported witness version")}return{input:S,ourPubKey:k,keyPair:o,signatureHash:C,hashType:a,useLowR:!!_,taptreeRoot:M}}(this.network,this.__INPUTS,this.__needsOutputs.bind(this),this.__TX,t,e,r,i,o,s,a,u,this.__USE_LOW_R))}__addInputUnsafe(t,e,r){if(g.Transaction.isCoinbaseHash(t))throw new Error("coinbase inputs not supported");const n=t.toString("hex")+":"+e;if(void 0!==this.__PREV_TX_SET[n])throw new Error("Duplicate TxOut: "+n);let i={};if(void 0===r.script&&void 0===r.witness||(i=A(r.script,r.witness)),void 0!==r.value&&(i.value=r.value),!i.prevOutScript&&r.prevOutScript){let t;if(!i.pubkeys&&!i.signatures){const e=E(r.prevOutScript);e.pubkeys&&(i.pubkeys=e.pubkeys,i.signatures=e.signatures),t=e.type}i.prevOutScript=r.prevOutScript,i.prevOutType=t||s.output(r.prevOutScript)}const o=this.__TX.addInput(t,e,r.sequence,r.scriptSig);return this.__INPUTS[o]=i,this.__PREV_TX_SET[n]=!0,o}__build(t){if(!t){if(!this.__TX.ins.length)throw new Error("Transaction has no inputs");if(!this.__TX.outs.length)throw new Error("Transaction has no outputs")}const e=this.__TX.clone();if(this.__INPUTS.forEach(((r,n)=>{if(!r.prevOutType&&!t)throw new Error("Transaction is not complete");const i=S(r.prevOutType,r,t);if(i)i.input&&e.setInputScript(n,i.input),e.setWitness(n,i.witness);else{if(!t&&r.prevOutType===m.NONSTANDARD)throw new Error("Unknown input type");if(!t)throw new Error("Not enough information")}})),!t&&this.__overMaximumFees(e.virtualSize()))throw new Error("Transaction has absurd fees");return e}__canModifyInputs(){return this.__INPUTS.every((t=>!t.signatures||t.signatures.every((t=>!t||0!=(k(t)&g.Transaction.SIGHASH_ANYONECANPAY)))))}__needsOutputs(t){return t===g.Transaction.SIGHASH_ALL||t===g.Transaction.SIGHASH_DEFAULT?0===this.__TX.outs.length:0===this.__TX.outs.length&&this.__INPUTS.some((t=>!!t.signatures&&t.signatures.some((t=>!!t&&!(k(t)&g.Transaction.SIGHASH_NONE)))))}__canModifyOutputs(){const t=this.__TX.ins.length,e=this.__TX.outs.length;return this.__INPUTS.every((r=>void 0===r.signatures||r.signatures.every((r=>{if(!r)return!0;const n=31&k(r);return n===g.Transaction.SIGHASH_NONE||n===g.Transaction.SIGHASH_SINGLE&&t<=e}))))}__overMaximumFees(t){return(this.__INPUTS.reduce(((t,e)=>t+(e.value>>>0)),0)-this.__TX.outs.reduce(((t,e)=>t+e.value),0))/t>this.maximumFeeRate}}function A(t,e=[],r,n){if(t&&0===t.length&&0===e.length)return{};if(!r){let n=t?s.input(t,!0):void 0,i=s.witness(e,!0);n===m.NONSTANDARD&&(n=void 0),i===m.NONSTANDARD&&(i=void 0),r=n||i}switch(r){case m.P2WPKH:{const{output:t,pubkey:r,signature:n}=f.p2wpkh({witness:e});return{prevOutScript:t,prevOutType:m.P2WPKH,pubkeys:[r],signatures:[n]}}case m.P2PKH:{const{output:e,pubkey:r,signature:n}=f.p2pkh({input:t});return{prevOutScript:e,prevOutType:m.P2PKH,pubkeys:[r],signatures:[n]}}case m.P2PK:{const{signature:e}=f.p2pk({input:t});return{prevOutType:m.P2PK,pubkeys:[void 0],signatures:[e]}}case m.P2MS:{const{m:e,pubkeys:r,signatures:i}=f.p2ms({input:t,output:n},{allowIncomplete:!0});return{prevOutType:m.P2MS,pubkeys:r,signatures:i,maxSignatures:e}}case m.P2TR_NS:{const{n:t,pubkeys:r,signatures:i}=f.p2tr_ns({signatures:e.length?e.reverse():void 0,output:n},{allowIncomplete:!0});return{prevOutType:m.P2TR_NS,pubkeys:r,signatures:i,maxSignatures:t}}}if(r===m.P2SH){const{output:r,redeem:n}=f.p2sh({input:t,witness:e}),i=s.output(n.output),o=A(n.input,n.witness,i,n.output);return o.prevOutType?{prevOutScript:r,prevOutType:m.P2SH,redeemScript:n.output,redeemScriptType:o.prevOutType,witnessScript:o.witnessScript,witnessScriptType:o.witnessScriptType,pubkeys:o.pubkeys,signatures:o.signatures}:{}}if(r===m.P2WSH){const{output:r,redeem:n}=f.p2wsh({input:t,witness:e}),i=s.output(n.output);let o;return o=i===m.P2WPKH?A(n.input,n.witness,i):A(l.compile(n.witness),[],i,n.output),o.prevOutType?{prevOutScript:r,prevOutType:m.P2WSH,witnessScript:n.output,witnessScriptType:o.prevOutType,pubkeys:o.pubkeys,signatures:o.signatures}:{}}if(r===m.P2TR){const t=d.parseTaprootWitness(e);if("Key"===t.spendType){const{signature:e,annex:r}=t;return{prevOutType:m.P2TR,signatures:[e],annex:r}}{const{tapscript:e,controlBlock:r,annex:n}=t,i=f.p2tr({redeems:[{output:e}],redeemIndex:0,controlBlock:r,annex:n}).output,o=s.output(e),{pubkeys:a,signatures:u}=A(void 0,t.scriptSig,o,e);return{prevOutScript:i,prevOutType:m.P2TR,witnessScript:e,witnessScriptType:o,controlBlock:r,annex:n,pubkeys:a,signatures:u}}}return{prevOutType:m.NONSTANDARD,prevOutScript:t}}function E(t,e,r){b(y.Buffer,t);const n=s.output(t);switch(n){case m.P2PKH:{if(!e)return{type:n};const r=f.p2pkh({output:t}).hash,i=a.hash160(e);return r.equals(i)?{type:n,pubkeys:[e],signatures:[void 0]}:{type:n}}case m.P2WPKH:{if(!e)return{type:n};const r=f.p2wpkh({output:t}).hash,i=a.hash160(e);return r.equals(i)?{type:n,pubkeys:[e],signatures:[void 0]}:{type:n}}case m.P2TR:{if(!e)return{type:n};33===e.length&&(e=e.slice(1));const i=f.p2tr({pubkey:e,controlBlock:r});return t.equals(i.output)?{type:n,pubkeys:[e],signatures:[void 0]}:{type:n}}case m.P2TR_NS:{const e=f.p2tr_ns({output:t});return{type:n,pubkeys:e.pubkeys,signatures:e.pubkeys.map((()=>{})),maxSignatures:e.pubkeys.length}}case m.P2PK:return{type:n,pubkeys:[f.p2pk({output:t}).pubkey],signatures:[void 0]};case m.P2MS:{const e=f.p2ms({output:t});return{type:n,pubkeys:e.pubkeys,signatures:e.pubkeys.map((()=>{})),maxSignatures:e.m}}}return{type:n}}function S(t,e,r){const n=e.pubkeys||[];let i=e.signatures||[];switch(t){case m.P2PKH:if(0===n.length)break;if(0===i.length)break;return f.p2pkh({pubkey:n[0],signature:i[0]});case m.P2WPKH:if(0===n.length)break;if(0===i.length)break;return f.p2wpkh({pubkey:n[0],signature:i[0]});case m.P2PK:if(0===n.length)break;if(0===i.length)break;return f.p2pk({signature:i[0]});case m.P2MS:{const t=e.maxSignatures;i=r?i.map((t=>t||p.OPS.OP_0)):i.filter((t=>t));const o=!r||t===i.length;return f.p2ms({m:t,pubkeys:n,signatures:i},{allowIncomplete:r,validate:o})}case m.P2SH:{const t=S(e.redeemScriptType,e,r);if(!t)return;return f.p2sh({redeem:{output:t.output||e.redeemScript,input:t.input,witness:t.witness}})}case m.P2WSH:{const t=S(e.witnessScriptType,e,r);if(!t)return;return f.p2wsh({redeem:{output:e.witnessScript,input:t.input,witness:t.witness}})}case m.P2TR:if(e.witnessScriptType===m.P2TR_NS){const t=S(e.witnessScriptType,e,r);return f.p2tr({output:e.prevOutScript,controlBlock:e.controlBlock,annex:e.annex,redeems:[t],redeemIndex:0})}if(0===i.length)break;return f.p2tr({pubkeys:n,signature:i[0]});case m.P2TR_NS:{const t=e.maxSignatures;i=r?i.map((t=>t||p.OPS.OP_0)):i.filter((t=>t));const o=!r||t===i.length;return f.p2tr_ns({pubkeys:n,signatures:i},{allowIncomplete:r,validate:o})}}}function I(t){return void 0!==t.signScript&&void 0!==t.signType&&void 0!==t.pubkeys&&void 0!==t.signatures&&t.signatures.length===t.pubkeys.length&&t.pubkeys.length>0&&(void 0===t.witnessVersion||void 0!==t.value)}function k(t){return l.isCanonicalSchnorrSignature(t)&&64===t.length?g.Transaction.SIGHASH_DEFAULT:t.readUInt8(t.length-1)}e.TransactionBuilder=_},6168:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.oneOf=e.Null=e.BufferN=e.Function=e.UInt32=e.UInt8=e.tuple=e.maybe=e.Hex=e.Buffer=e.String=e.Boolean=e.Array=e.Number=e.Hash256bit=e.Hash160bit=e.Buffer256bit=e.Network=e.ECPoint=e.Satoshi=e.Signer=e.BIP32Path=e.UInt31=void 0;const n=r(9031),i=Math.pow(2,31)-1;function o(t){return n.String(t)&&!!t.match(/^(m\/)?(\d+'?\/)*\d+'?$/)}e.UInt31=function(t){return n.UInt32(t)&&t<=i},e.BIP32Path=o,o.toJSON=()=>"BIP32 derivation path",e.Signer=function(t){return(n.Buffer(t.publicKey)||"function"==typeof t.getPublicKey)&&"function"==typeof t.sign},e.Satoshi=function(t){return n.UInt53(t)&&t<=21e14},e.ECPoint=n.quacksLike("Point"),e.Network=n.compile({messagePrefix:n.oneOf(n.Buffer,n.String),bip32:{public:n.UInt32,private:n.UInt32},pubKeyHash:n.UInt8,scriptHash:n.UInt8,wif:n.UInt8}),e.Buffer256bit=n.BufferN(32),e.Hash160bit=n.BufferN(20),e.Hash256bit=n.BufferN(32),e.Number=n.Number,e.Array=n.Array,e.Boolean=n.Boolean,e.String=n.String,e.Buffer=n.Buffer,e.Hex=n.Hex,e.maybe=n.maybe,e.tuple=n.tuple,e.UInt8=n.UInt8,e.UInt32=n.UInt32,e.Function=n.Function,e.BufferN=n.BufferN,e.Null=n.Null,e.oneOf=n.oneOf},7334:(t,e,r)=>{var n=r(8834).Buffer;const i=r(4075),o=r(4501),s=r(2833),a=r(6162),u=r(5505),c=r(8595),f="p2wpkh",h="p2sh(p2wpkh)";function l(t){return a("sha256").update(t).digest()}function p(t){return a("ripemd160").update(l(t)).digest()}function d(t,e,r,i){return void 0!==i?(e+=8,i===f&&(e+=4)):r&&(e+=4),n.concat([n.alloc(1,e+27),t])}function g(t,e){e=e||"Bitcoin Signed Message:\n",n.isBuffer(e)||(e=n.from(e,"utf8")),n.isBuffer(t)||(t=n.from(t,"utf8"));const r=c.encodingLength(t.length),i=n.allocUnsafe(e.length+r+t.length);return e.copy(i,0),c.encode(t.length,i,e.length),t.copy(i,e.length+r),function(t){return l(l(t))}(i)}function y(t,e){"object"==typeof t&&void 0===e&&(e=t,t=void 0);let{segwitType:r,extraEntropy:n}=e||{};if(r&&("string"==typeof r||r instanceof String)&&(r=r.toLowerCase()),r&&r!==h&&r!==f)throw new Error('Unrecognized segwitType: use "p2sh(p2wpkh)" or "p2wpkh"');return{messagePrefixArg:t,segwitType:r,extraEntropy:n}}function b(t){return t&&"function"==typeof t.sign}function m(t){return p(n.concat([n.from("0014","hex"),t]))}function v(t){const e=o.decode(t),r=o.fromWords(e.words.slice(1));return n.from(r)}t.exports={magicHash:g,sign:function(t,e,r,n,i){const{messagePrefixArg:o,segwitType:s,extraEntropy:a}=y(n,i),c=g(t,o),f=b(e)?e.sign(c,a):u.sign(c,e,{data:a});return d(f.signature,f.recovery,r,s)},signAsync:function(t,e,r,n,i){let o,s,a;return Promise.resolve().then((()=>{({messagePrefixArg:o,segwitType:s,extraEntropy:a}=y(n,i));const r=g(t,o);return b(e)?e.sign(r,a):u.sign(r,e,{data:a})})).then((t=>d(t.signature,t.recovery,r,s)))},verify:function(t,e,r,o,a){n.isBuffer(r)||(r=n.from(r,"base64"));const c=function(t){if(65!==t.length)throw new Error("Invalid signature length");const e=t.readUInt8(0)-27;if(e>15||e<0)throw new Error("Invalid signature parameter");return{compressed:!!(12&e),segwitType:8&e?4&e?f:h:null,recovery:3&e,signature:t.slice(1)}}(r);if(a&&!c.compressed)throw new Error("checkSegwitAlways can only be used with a compressed pubkey signature flagbyte");const l=g(t,o),d=p(u.recover(l,c.signature,c.recovery,c.compressed));let y,b;if(c.segwitType)c.segwitType===h?(y=m(d),b=i.decode(e).slice(1)):(y=d,b=v(e));else if(a)try{return b=v(e),s(d,b)}catch(t){const r=m(d);return b=i.decode(e).slice(1),s(d,b)||s(r,b)}else y=d,b=i.decode(e).slice(1);return s(y,b)}}},5505:(t,e,r)=>{"use strict";t.exports=r(560)(r(3064))},4096:(t,e,r)=>{"use strict";var n=r(8834).Buffer,i=Object.prototype.toString;e.isArray=function(t,e){if(!Array.isArray(t))throw TypeError(e)},e.isBoolean=function(t,e){if("[object Boolean]"!==i.call(t))throw TypeError(e)},e.isBuffer=function(t,e){if(!n.isBuffer(t))throw TypeError(e)},e.isFunction=function(t,e){if("[object Function]"!==i.call(t))throw TypeError(e)},e.isNumber=function(t,e){if("[object Number]"!==i.call(t))throw TypeError(e)},e.isObject=function(t,e){if("[object Object]"!==i.call(t))throw TypeError(e)},e.isBufferLength=function(t,e,r){if(t.length!==e)throw RangeError(r)},e.isBufferLength2=function(t,e,r,n){if(t.length!==e&&t.length!==r)throw RangeError(n)},e.isLengthGTZero=function(t,e){if(0===t.length)throw RangeError(e)},e.isNumberInInterval=function(t,e,r,n){if(t<=e||t>=r)throw RangeError(n)}},5325:(t,e,r)=>{"use strict";var n=r(7834).Buffer,i=r(9875),o=n.from([48,129,211,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,133,48,129,130,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,33,2,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,36,3,34,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),s=n.from([48,130,1,19,2,1,1,4,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,129,165,48,129,162,2,1,1,48,44,6,7,42,134,72,206,61,1,1,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,255,255,252,47,48,6,4,1,0,4,1,7,4,65,4,121,190,102,126,249,220,187,172,85,160,98,149,206,135,11,7,2,155,252,219,45,206,40,217,89,242,129,91,22,248,23,152,72,58,218,119,38,163,196,101,93,164,251,252,14,17,8,168,253,23,180,72,166,133,84,25,156,71,208,143,251,16,212,184,2,33,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,254,186,174,220,230,175,72,160,59,191,210,94,140,208,54,65,65,2,1,1,161,68,3,66,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);e.privateKeyExport=function(t,e,r){var i=n.from(r?o:s);return t.copy(i,r?8:9),e.copy(i,r?181:214),i},e.privateKeyImport=function(t){var e=t.length,r=0;if(!(e<r+1||48!==t[r])&&!(e<(r+=1)+1)&&128&t[r]){var n=127&t[r];if(r+=1,!(n<1||n>2||e<r+n)){var i=t[r+n-1]|(n>1?t[r+n-2]<<8:0);if(!(e<(r+=n)+i||e<r+3||2!==t[r]||1!==t[r+1]||1!==t[r+2]||e<(r+=3)+2||4!==t[r]||t[r+1]>32||e<r+2+t[r+1]))return t.slice(r+2,r+2+t[r+1])}}},e.signatureExport=function(t){for(var e=n.concat([n.from([0]),t.r]),r=33,o=0;r>1&&0===e[o]&&!(128&e[o+1]);--r,++o);for(var s=n.concat([n.from([0]),t.s]),a=33,u=0;a>1&&0===s[u]&&!(128&s[u+1]);--a,++u);return i.encode(e.slice(o),s.slice(u))},e.signatureImport=function(t){var e=n.alloc(32,0),r=n.alloc(32,0);try{var o=i.decode(t);if(33===o.r.length&&0===o.r[0]&&(o.r=o.r.slice(1)),o.r.length>32)throw new Error("R length is too long");if(33===o.s.length&&0===o.s[0]&&(o.s=o.s.slice(1)),o.s.length>32)throw new Error("S length is too long")}catch(t){return}return o.r.copy(e,32-o.r.length),o.s.copy(r,32-o.s.length),{r:e,s:r}},e.signatureImportLax=function(t){var e=n.alloc(32,0),r=n.alloc(32,0),i=t.length,o=0;if(48===t[o++]){var s=t[o++];if(!(128&s&&(o+=s-128)>i)&&2===t[o++]){var a=t[o++];if(128&a){if(o+(s=a-128)>i)return;for(;s>0&&0===t[o];o+=1,s-=1);for(a=0;s>0;o+=1,s-=1)a=(a<<8)+t[o]}if(!(a>i-o)){var u=o;if(o+=a,2===t[o++]){var c=t[o++];if(128&c){if(o+(s=c-128)>i)return;for(;s>0&&0===t[o];o+=1,s-=1);for(c=0;s>0;o+=1,s-=1)c=(c<<8)+t[o]}if(!(c>i-o)){var f=o;for(o+=c;a>0&&0===t[u];a-=1,u+=1);if(!(a>32)){var h=t.slice(u,u+a);for(h.copy(e,32-h.length);c>0&&0===t[f];c-=1,f+=1);if(!(c>32)){var l=t.slice(f,f+c);return l.copy(r,32-l.length),{r:e,s:r}}}}}}}}}},3064:(t,e,r)=>{"use strict";var n=r(7834).Buffer,i=r(6162),o=r(2197),s=r(7554).ec,a=r(3892),u=new s("secp256k1"),c=u.curve;function f(t){var e=t[0];switch(e){case 2:case 3:return 33!==t.length?null:function(t,e){var r=new o(e);if(r.cmp(c.p)>=0)return null;var n=(r=r.toRed(c.red)).redSqr().redIMul(r).redIAdd(c.b).redSqrt();return 3===t!==n.isOdd()&&(n=n.redNeg()),u.keyPair({pub:{x:r,y:n}})}(e,t.slice(1,33));case 4:case 6:case 7:return 65!==t.length?null:function(t,e,r){var n=new o(e),i=new o(r);if(n.cmp(c.p)>=0||i.cmp(c.p)>=0)return null;if(n=n.toRed(c.red),i=i.toRed(c.red),(6===t||7===t)&&i.isOdd()!==(7===t))return null;var s=n.redSqr().redIMul(n);return i.redSqr().redISub(s.redIAdd(c.b)).isZero()?u.keyPair({pub:{x:n,y:i}}):null}(e,t.slice(1,33),t.slice(33,65));default:return null}}e.privateKeyVerify=function(t){var e=new o(t);return e.cmp(c.n)<0&&!e.isZero()},e.privateKeyExport=function(t,e){var r=new o(t);if(r.cmp(c.n)>=0||r.isZero())throw new Error(a.EC_PRIVATE_KEY_EXPORT_DER_FAIL);return n.from(u.keyFromPrivate(t).getPublic(e,!0))},e.privateKeyNegate=function(t){var e=new o(t);return e.isZero()?n.alloc(32):c.n.sub(e).umod(c.n).toArrayLike(n,"be",32)},e.privateKeyModInverse=function(t){var e=new o(t);if(e.cmp(c.n)>=0||e.isZero())throw new Error(a.EC_PRIVATE_KEY_RANGE_INVALID);return e.invm(c.n).toArrayLike(n,"be",32)},e.privateKeyTweakAdd=function(t,e){var r=new o(e);if(r.cmp(c.n)>=0)throw new Error(a.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);if(r.iadd(new o(t)),r.cmp(c.n)>=0&&r.isub(c.n),r.isZero())throw new Error(a.EC_PRIVATE_KEY_TWEAK_ADD_FAIL);return r.toArrayLike(n,"be",32)},e.privateKeyTweakMul=function(t,e){var r=new o(e);if(r.cmp(c.n)>=0||r.isZero())throw new Error(a.EC_PRIVATE_KEY_TWEAK_MUL_FAIL);return r.imul(new o(t)),r.cmp(c.n)&&(r=r.umod(c.n)),r.toArrayLike(n,"be",32)},e.publicKeyCreate=function(t,e){var r=new o(t);if(r.cmp(c.n)>=0||r.isZero())throw new Error(a.EC_PUBLIC_KEY_CREATE_FAIL);return n.from(u.keyFromPrivate(t).getPublic(e,!0))},e.publicKeyConvert=function(t,e){var r=f(t);if(null===r)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);return n.from(r.getPublic(e,!0))},e.publicKeyVerify=function(t){return null!==f(t)},e.publicKeyTweakAdd=function(t,e,r){var i=f(t);if(null===i)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);if((e=new o(e)).cmp(c.n)>=0)throw new Error(a.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);var s=c.g.mul(e).add(i.pub);if(s.isInfinity())throw new Error(a.EC_PUBLIC_KEY_TWEAK_ADD_FAIL);return n.from(s.encode(!0,r))},e.publicKeyTweakMul=function(t,e,r){var i=f(t);if(null===i)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);if((e=new o(e)).cmp(c.n)>=0||e.isZero())throw new Error(a.EC_PUBLIC_KEY_TWEAK_MUL_FAIL);return n.from(i.pub.mul(e).encode(!0,r))},e.publicKeyCombine=function(t,e){for(var r=new Array(t.length),i=0;i<t.length;++i)if(r[i]=f(t[i]),null===r[i])throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);for(var o=r[0].pub,s=1;s<r.length;++s)o=o.add(r[s].pub);if(o.isInfinity())throw new Error(a.EC_PUBLIC_KEY_COMBINE_FAIL);return n.from(o.encode(!0,e))},e.signatureNormalize=function(t){var e=new o(t.slice(0,32)),r=new o(t.slice(32,64));if(e.cmp(c.n)>=0||r.cmp(c.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);var i=n.from(t);return 1===r.cmp(u.nh)&&c.n.sub(r).toArrayLike(n,"be",32).copy(i,32),i},e.signatureExport=function(t){var e=t.slice(0,32),r=t.slice(32,64);if(new o(e).cmp(c.n)>=0||new o(r).cmp(c.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);return{r:e,s:r}},e.signatureImport=function(t){var e=new o(t.r);e.cmp(c.n)>=0&&(e=new o(0));var r=new o(t.s);return r.cmp(c.n)>=0&&(r=new o(0)),n.concat([e.toArrayLike(n,"be",32),r.toArrayLike(n,"be",32)])},e.sign=function(t,e,r,i){if("function"==typeof r){var s=r;r=function(r){var u=s(t,e,null,i,r);if(!n.isBuffer(u)||32!==u.length)throw new Error(a.ECDSA_SIGN_FAIL);return new o(u)}}var f=new o(e);if(f.cmp(c.n)>=0||f.isZero())throw new Error(a.ECDSA_SIGN_FAIL);var h=u.sign(t,e,{canonical:!0,k:r,pers:i});return{signature:n.concat([h.r.toArrayLike(n,"be",32),h.s.toArrayLike(n,"be",32)]),recovery:h.recoveryParam}},e.verify=function(t,e,r){var n={r:e.slice(0,32),s:e.slice(32,64)},i=new o(n.r),s=new o(n.s);if(i.cmp(c.n)>=0||s.cmp(c.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);if(1===s.cmp(u.nh)||i.isZero()||s.isZero())return!1;var h=f(r);if(null===h)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);return u.verify(t,n,{x:h.pub.x,y:h.pub.y})},e.recover=function(t,e,r,i){var s={r:e.slice(0,32),s:e.slice(32,64)},f=new o(s.r),h=new o(s.s);if(f.cmp(c.n)>=0||h.cmp(c.n)>=0)throw new Error(a.ECDSA_SIGNATURE_PARSE_FAIL);try{if(f.isZero()||h.isZero())throw new Error;var l=u.recoverPubKey(t,s,r);return n.from(l.encode(!0,i))}catch(t){throw new Error(a.ECDSA_RECOVER_FAIL)}},e.ecdh=function(t,r){var n=e.ecdhUnsafe(t,r,!0);return i("sha256").update(n).digest()},e.ecdhUnsafe=function(t,e,r){var i=f(t);if(null===i)throw new Error(a.EC_PUBLIC_KEY_PARSE_FAIL);var s=new o(e);if(s.cmp(c.n)>=0||s.isZero())throw new Error(a.ECDH_FAIL);return n.from(i.pub.mul(s).encode(!0,r))}},560:(t,e,r)=>{"use strict";var n=r(4096),i=r(5325),o=r(3892);function s(t,e){return void 0===t?e:(n.isBoolean(t,o.COMPRESSED_TYPE_INVALID),t)}t.exports=function(t){return{privateKeyVerify:function(e){return n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),32===e.length&&t.privateKeyVerify(e)},privateKeyExport:function(e,r){n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(e,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=s(r,!0);var a=t.privateKeyExport(e,r);return i.privateKeyExport(e,a,r)},privateKeyImport:function(e){if(n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),(e=i.privateKeyImport(e))&&32===e.length&&t.privateKeyVerify(e))return e;throw new Error(o.EC_PRIVATE_KEY_IMPORT_DER_FAIL)},privateKeyNegate:function(e){return n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(e,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),t.privateKeyNegate(e)},privateKeyModInverse:function(e){return n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(e,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),t.privateKeyModInverse(e)},privateKeyTweakAdd:function(e,r){return n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(e,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),t.privateKeyTweakAdd(e,r)},privateKeyTweakMul:function(e,r){return n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(e,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),t.privateKeyTweakMul(e,r)},publicKeyCreate:function(e,r){return n.isBuffer(e,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(e,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),r=s(r,!0),t.publicKeyCreate(e,r)},publicKeyConvert:function(e,r){return n.isBuffer(e,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(e,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),r=s(r,!0),t.publicKeyConvert(e,r)},publicKeyVerify:function(e){return n.isBuffer(e,o.EC_PUBLIC_KEY_TYPE_INVALID),t.publicKeyVerify(e)},publicKeyTweakAdd:function(e,r,i){return n.isBuffer(e,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(e,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=s(i,!0),t.publicKeyTweakAdd(e,r,i)},publicKeyTweakMul:function(e,r,i){return n.isBuffer(e,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(e,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.TWEAK_TYPE_INVALID),n.isBufferLength(r,32,o.TWEAK_LENGTH_INVALID),i=s(i,!0),t.publicKeyTweakMul(e,r,i)},publicKeyCombine:function(e,r){n.isArray(e,o.EC_PUBLIC_KEYS_TYPE_INVALID),n.isLengthGTZero(e,o.EC_PUBLIC_KEYS_LENGTH_INVALID);for(var i=0;i<e.length;++i)n.isBuffer(e[i],o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(e[i],33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID);return r=s(r,!0),t.publicKeyCombine(e,r)},signatureNormalize:function(e){return n.isBuffer(e,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(e,64,o.ECDSA_SIGNATURE_LENGTH_INVALID),t.signatureNormalize(e)},signatureExport:function(e){n.isBuffer(e,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(e,64,o.ECDSA_SIGNATURE_LENGTH_INVALID);var r=t.signatureExport(e);return i.signatureExport(r)},signatureImport:function(e){n.isBuffer(e,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isLengthGTZero(e,o.ECDSA_SIGNATURE_LENGTH_INVALID);var r=i.signatureImport(e);if(r)return t.signatureImport(r);throw new Error(o.ECDSA_SIGNATURE_PARSE_DER_FAIL)},signatureImportLax:function(e){n.isBuffer(e,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isLengthGTZero(e,o.ECDSA_SIGNATURE_LENGTH_INVALID);var r=i.signatureImportLax(e);if(r)return t.signatureImport(r);throw new Error(o.ECDSA_SIGNATURE_PARSE_DER_FAIL)},sign:function(e,r,i){n.isBuffer(e,o.MSG32_TYPE_INVALID),n.isBufferLength(e,32,o.MSG32_LENGTH_INVALID),n.isBuffer(r,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(r,32,o.EC_PRIVATE_KEY_LENGTH_INVALID);var s=null,a=null;return void 0!==i&&(n.isObject(i,o.OPTIONS_TYPE_INVALID),void 0!==i.data&&(n.isBuffer(i.data,o.OPTIONS_DATA_TYPE_INVALID),n.isBufferLength(i.data,32,o.OPTIONS_DATA_LENGTH_INVALID),s=i.data),void 0!==i.noncefn&&(n.isFunction(i.noncefn,o.OPTIONS_NONCEFN_TYPE_INVALID),a=i.noncefn)),t.sign(e,r,a,s)},verify:function(e,r,i){return n.isBuffer(e,o.MSG32_TYPE_INVALID),n.isBufferLength(e,32,o.MSG32_LENGTH_INVALID),n.isBuffer(r,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(r,64,o.ECDSA_SIGNATURE_LENGTH_INVALID),n.isBuffer(i,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(i,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),t.verify(e,r,i)},recover:function(e,r,i,a){return n.isBuffer(e,o.MSG32_TYPE_INVALID),n.isBufferLength(e,32,o.MSG32_LENGTH_INVALID),n.isBuffer(r,o.ECDSA_SIGNATURE_TYPE_INVALID),n.isBufferLength(r,64,o.ECDSA_SIGNATURE_LENGTH_INVALID),n.isNumber(i,o.RECOVERY_ID_TYPE_INVALID),n.isNumberInInterval(i,-1,4,o.RECOVERY_ID_VALUE_INVALID),a=s(a,!0),t.recover(e,r,i,a)},ecdh:function(e,r){return n.isBuffer(e,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(e,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(r,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),t.ecdh(e,r)},ecdhUnsafe:function(e,r,i){return n.isBuffer(e,o.EC_PUBLIC_KEY_TYPE_INVALID),n.isBufferLength2(e,33,65,o.EC_PUBLIC_KEY_LENGTH_INVALID),n.isBuffer(r,o.EC_PRIVATE_KEY_TYPE_INVALID),n.isBufferLength(r,32,o.EC_PRIVATE_KEY_LENGTH_INVALID),i=s(i,!0),t.ecdhUnsafe(e,r,i)}}}},2197:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(3196).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function c(t,e,r,n){for(var i=0,o=Math.min(t.length,r),s=e;s<o;s++){var a=t.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,f=r;f<a;f+=n)u=c(t,f,f+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=c(t,f,t.length,e),f=0;f<s;f++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var f=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=l;p++){var d=c-p|0;f+=(s=(i=0|t.words[d])*(o=0|e.words[p])+h)/67108864|0,h=67108863&s}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?f[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=h[t],p=l[t];r="";var d=this.clone();for(d.negative=0;!d.isZero();){var g=d.modn(p).toString(t);r=(d=d.idivn(p)).isZero()?g+r:f[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(t,e){return n(void 0!==s),this.toArrayLike(s,t,e)},o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===e,c=new t(o),f=this.clone();if(u){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-i;a++)c[a]=0;for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this.strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this.strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this.strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var d=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,c=0,f=0|s[0],h=8191&f,l=f>>>13,p=0|s[1],d=8191&p,g=p>>>13,y=0|s[2],b=8191&y,m=y>>>13,v=0|s[3],w=8191&v,_=v>>>13,A=0|s[4],E=8191&A,S=A>>>13,I=0|s[5],k=8191&I,x=I>>>13,M=0|s[6],C=8191&M,T=M>>>13,O=0|s[7],P=8191&O,B=O>>>13,R=0|s[8],N=8191&R,U=R>>>13,j=0|s[9],L=8191&j,D=j>>>13,F=0|a[0],q=8191&F,H=F>>>13,K=0|a[1],V=8191&K,G=K>>>13,z=0|a[2],W=8191&z,Q=z>>>13,Y=0|a[3],X=8191&Y,$=Y>>>13,Z=0|a[4],J=8191&Z,tt=Z>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,ft=0|a[8],ht=8191&ft,lt=ft>>>13,pt=0|a[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(c+(n=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,H))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,H))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,q),i=(i=Math.imul(d,H))+Math.imul(g,q)|0,o=Math.imul(g,H);var bt=(c+(n=n+Math.imul(h,V)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(l,V)|0))<<13)|0;c=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(b,q),i=(i=Math.imul(b,H))+Math.imul(m,q)|0,o=Math.imul(m,H),n=n+Math.imul(d,V)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,G)|0;var mt=(c+(n=n+Math.imul(h,W)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(l,W)|0))<<13)|0;c=((o=o+Math.imul(l,Q)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,H))+Math.imul(_,q)|0,o=Math.imul(_,H),n=n+Math.imul(b,V)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,Q)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,Q)|0;var vt=(c+(n=n+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,$)|0)+Math.imul(l,X)|0))<<13)|0;c=((o=o+Math.imul(l,$)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,H))+Math.imul(S,q)|0,o=Math.imul(S,H),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Q)|0,n=n+Math.imul(d,X)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,$)|0;var wt=(c+(n=n+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,J)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,H))+Math.imul(x,q)|0,o=Math.imul(x,H),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(b,X)|0,i=(i=i+Math.imul(b,$)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,$)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(l,rt)|0))<<13)|0;c=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,H))+Math.imul(T,q)|0,o=Math.imul(T,H),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,Q)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var At=(c+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,H))+Math.imul(B,q)|0,o=Math.imul(B,H),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Q)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var Et=(c+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,H))+Math.imul(U,q)|0,o=Math.imul(U,H),n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(C,W)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,Q)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var St=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,H))+Math.imul(D,q)|0,o=Math.imul(D,H),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(U,V)|0,o=o+Math.imul(U,G)|0,n=n+Math.imul(P,W)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(C,X)|0,i=(i=i+Math.imul(C,$)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,$)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0,n=n+Math.imul(d,ht)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(g,ht)|0,o=o+Math.imul(g,lt)|0;var It=(c+(n=n+Math.imul(h,dt)|0)|0)+((8191&(i=(i=i+Math.imul(h,gt)|0)+Math.imul(l,dt)|0))<<13)|0;c=((o=o+Math.imul(l,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,G))+Math.imul(D,V)|0,o=Math.imul(D,G),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,Q)|0,n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,$)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(b,ht)|0,i=(i=i+Math.imul(b,lt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,lt)|0;var kt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,Q))+Math.imul(D,W)|0,o=Math.imul(D,Q),n=n+Math.imul(N,X)|0,i=(i=i+Math.imul(N,$)|0)+Math.imul(U,X)|0,o=o+Math.imul(U,$)|0,n=n+Math.imul(P,J)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,lt)|0;var xt=(c+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(m,dt)|0))<<13)|0;c=((o=o+Math.imul(m,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,X),i=(i=Math.imul(L,$))+Math.imul(D,X)|0,o=Math.imul(D,$),n=n+Math.imul(N,J)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(U,J)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ct)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,lt)|0;var Mt=(c+(n=n+Math.imul(w,dt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,J),i=(i=Math.imul(L,tt))+Math.imul(D,J)|0,o=Math.imul(D,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ct)|0,n=n+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,lt)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,lt)|0;var Ct=(c+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(S,dt)|0))<<13)|0;c=((o=o+Math.imul(S,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,st)|0)+Math.imul(U,ot)|0,o=o+Math.imul(U,st)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(T,ht)|0,o=o+Math.imul(T,lt)|0;var Tt=(c+(n=n+Math.imul(k,dt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(x,dt)|0))<<13)|0;c=((o=o+Math.imul(x,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(U,ut)|0,o=o+Math.imul(U,ct)|0,n=n+Math.imul(P,ht)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(B,ht)|0,o=o+Math.imul(B,lt)|0;var Ot=(c+(n=n+Math.imul(C,dt)|0)|0)+((8191&(i=(i=i+Math.imul(C,gt)|0)+Math.imul(T,dt)|0))<<13)|0;c=((o=o+Math.imul(T,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),n=n+Math.imul(N,ht)|0,i=(i=i+Math.imul(N,lt)|0)+Math.imul(U,ht)|0,o=o+Math.imul(U,lt)|0;var Pt=(c+(n=n+Math.imul(P,dt)|0)|0)+((8191&(i=(i=i+Math.imul(P,gt)|0)+Math.imul(B,dt)|0))<<13)|0;c=((o=o+Math.imul(B,gt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ht),i=(i=Math.imul(L,lt))+Math.imul(D,ht)|0,o=Math.imul(D,lt);var Bt=(c+(n=n+Math.imul(N,dt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(U,dt)|0))<<13)|0;c=((o=o+Math.imul(U,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863;var Rt=(c+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(D,dt)|0))<<13)|0;return c=((o=Math.imul(D,gt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=yt,u[1]=bt,u[2]=mt,u[3]=vt,u[4]=wt,u[5]=_t,u[6]=At,u[7]=Et,u[8]=St,u[9]=It,u[10]=kt,u[11]=xt,u[12]=Mt,u[13]=Ct,u[14]=Tt,u[15]=Ot,u[16]=Pt,u[17]=Bt,u[18]=Rt,0!==c&&(u[19]=c,r.length++),r};function g(t,e,r){return(new y).mulp(t,e,r)}function y(t,e){this.x=t,this.y=e}Math.imul||(d=p),o.prototype.mulTo=function(t,e){var r,n=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):n<63?p(this,t,e):n<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var f=o-c,h=(0|t.words[f])*(0|e.words[c]),l=67108863&h;a=67108863&(l=l+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,t,e):g(this,t,e),r},y.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},y.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},y.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},y.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),f=0;f<i;f+=a)for(var h=u,l=c,p=0;p<s;p++){var d=r[f+p],g=n[f+p],y=r[f+p+s],b=n[f+p+s],m=h*y-l*b;b=h*b+l*y,y=m,r[f+p]=d+y,n[f+p]=g+b,r[f+p+s]=d-y,n[f+p+s]=g-b,p!==a&&(m=u*h-c*l,l=u*l+c*h,h=m)}},y.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},y.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},y.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},y.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},y.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},y.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,f,h,n,i);for(var p=0;p<n;p++){var d=a[p]*f[p]-u[p]*h[p];u[p]=a[p]*h[p]+u[p]*f[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r.strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),g(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){n("number"==typeof t),n(t<67108864);for(var e=0,r=0;r<this.length;r++){var i=(0|this.words[r])*t,o=(67108863&i)+(67108863&e);e>>=26,e+=i/67108864|0,e+=o>>>26,this.words[r]=67108863&o}return 0!==e&&(this.words[r]=e,this.length++),this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=(t.words[n]&1<<i)>>>i}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this.strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=l)}return a&&a.strip(),n.strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modn=function(t){n(t<=67108863);for(var e=(1<<26)%t,r=0,i=this.length-1;i>=0;i--)r=(e*r+(0|this.words[i]))%t;return r},o.prototype.idivn=function(t){n(t<=67108863);for(var e=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*e;this.words[r]=i/t|0,e=i%t}return this.strip()},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),h=e.clone();!e.isZero();){for(var l=0,p=1;0==(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new E(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function m(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},m.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},m.prototype.split=function(t,e){t.iushrn(this.n,0,e)},m.prototype.imulK=function(t){return t.imul(this.k)},i(v,m),v.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},v.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(w,m),i(_,m),i(A,m),A.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new v;else if("p224"===t)e=new w;else if("p192"===t)e=new _;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new A}return b[t]=e,e},E.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var g=p,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y<d);var b=this.pow(h,new o(1).iushln(d-y-1));l=l.redMul(b),h=b.redSqr(),p=p.redMul(h),d=y}return l},E.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},E.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],f=u-1;f>=0;f--){var h=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new S(t)},i(S,E),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},2745:(t,e,r)=>{var n;function i(t){this.rand=t}if(t.exports=function(t){return n||(n=new i(null)),n.generate(t)},t.exports.Rand=i,i.prototype.generate=function(t){return this._rand(t)},i.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r<e.length;r++)e[r]=this.rand.getByte();return e},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.crypto.getRandomValues(e),e}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(t){var e=new Uint8Array(t);return self.msCrypto.getRandomValues(e),e}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(8087);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(t){return o.randomBytes(t)}}catch(t){}},2970:(t,e,r)=>{var n=r(7834).Buffer;function i(t){n.isBuffer(t)||(t=n.from(t));for(var e=t.length/4|0,r=new Array(e),i=0;i<e;i++)r[i]=t.readUInt32BE(4*i);return r}function o(t){for(;0<t.length;t++)t[0]=0}function s(t,e,r,n,i){for(var o,s,a,u,c=r[0],f=r[1],h=r[2],l=r[3],p=t[0]^e[0],d=t[1]^e[1],g=t[2]^e[2],y=t[3]^e[3],b=4,m=1;m<i;m++)o=c[p>>>24]^f[d>>>16&255]^h[g>>>8&255]^l[255&y]^e[b++],s=c[d>>>24]^f[g>>>16&255]^h[y>>>8&255]^l[255&p]^e[b++],a=c[g>>>24]^f[y>>>16&255]^h[p>>>8&255]^l[255&d]^e[b++],u=c[y>>>24]^f[p>>>16&255]^h[d>>>8&255]^l[255&g]^e[b++],p=o,d=s,g=a,y=u;return o=(n[p>>>24]<<24|n[d>>>16&255]<<16|n[g>>>8&255]<<8|n[255&y])^e[b++],s=(n[d>>>24]<<24|n[g>>>16&255]<<16|n[y>>>8&255]<<8|n[255&p])^e[b++],a=(n[g>>>24]<<24|n[y>>>16&255]<<16|n[p>>>8&255]<<8|n[255&d])^e[b++],u=(n[y>>>24]<<24|n[p>>>16&255]<<16|n[d>>>8&255]<<8|n[255&g])^e[b++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,r[s]=c,n[c]=s;var f=t[s],h=t[f],l=t[h],p=257*t[c]^16843008*c;i[0][s]=p<<24|p>>>8,i[1][s]=p<<16|p>>>16,i[2][s]=p<<8|p>>>24,i[3][s]=p,p=16843009*l^65537*h^257*f^16843008*s,o[0][c]=p<<24|p>>>8,o[1][c]=p<<16|p>>>16,o[2][c]=p<<8|p>>>24,o[3][c]=p,0===s?s=a=1:(s=f^t[t[t[l^f]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(t){this._key=i(t),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,n=4*(r+1),i=[],o=0;o<e;o++)i[o]=t[o];for(o=e;o<n;o++){var s=i[o-1];o%e==0?(s=s<<8|s>>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[o/e|0]<<24):e>6&&o%e==4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[o]=i[o-e]^s}for(var c=[],f=0;f<n;f++){var h=n-f,l=i[h-(f%4?0:4)];c[f]=f<4||h<=4?l:u.INV_SUB_MIX[0][u.SBOX[l>>>24]]^u.INV_SUB_MIX[1][u.SBOX[l>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[l>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&l]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(t){return s(t=i(t),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=n.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},c.prototype.decryptBlock=function(t){var e=(t=i(t))[1];t[1]=t[3],t[3]=e;var r=s(t,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},t.exports.AES=c},3313:(t,e,r)=>{var n=r(2970),i=r(7834).Buffer,o=r(3973),s=r(1285),a=r(2895),u=r(1313),c=r(4182);function f(t,e,r,s){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(e);var f=this._cipher.encryptBlock(u);this._ghash=new a(f),r=function(t,e,r){if(12===e.length)return t._finID=i.concat([e,i.from([0,0,0,1])]),i.concat([e,i.from([0,0,0,2])]);var n=new a(r),o=e.length,s=o%16;n.update(e),s&&(s=16-s,n.update(i.alloc(s,0))),n.update(i.alloc(8,0));var u=8*o,f=i.alloc(8);f.writeUIntBE(u,0,8),n.update(f),t._finID=n.state;var h=i.from(t._finID);return c(h),h}(this,r,f),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}s(f,o),f.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=i.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},f.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var n=Math.min(t.length,e.length),i=0;i<n;++i)r+=t[i]^e[i];return r}(t,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=t,this._cipher.scrub()},f.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},f.prototype.setAuthTag=function(t){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=t},f.prototype.setAAD=function(t){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(t),this._alen+=t.length},t.exports=f},10:(t,e,r)=>{var n=r(9309),i=r(7612),o=r(9234);e.createCipher=e.Cipher=n.createCipher,e.createCipheriv=e.Cipheriv=n.createCipheriv,e.createDecipher=e.Decipher=i.createDecipher,e.createDecipheriv=e.Decipheriv=i.createDecipheriv,e.listCiphers=e.getCiphers=function(){return Object.keys(o)}},7612:(t,e,r)=>{var n=r(3313),i=r(7834).Buffer,o=r(8702),s=r(7041),a=r(3973),u=r(2970),c=r(9341);function f(t,e,r){a.call(this),this._cache=new h,this._last=void 0,this._cipher=new u.AES(e),this._prev=i.from(r),this._mode=t,this._autopadding=!0}function h(){this.cache=i.allocUnsafe(0)}function l(t,e,r){var a=o[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof e&&(e=i.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);return"stream"===a.type?new s(a.module,e,r,!0):"auth"===a.type?new n(a.module,e,r,!0):new f(a.module,e,r)}r(1285)(f,a),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,e),n.push(r);return i.concat(n)},f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return function(t){var e=t[15];if(e<1||e>16)throw new Error("unable to decrypt data");for(var r=-1;++r<e;)if(t[r+(16-e)]!==e)throw new Error("unable to decrypt data");if(16!==e)return t.slice(0,16-e)}(this._mode.decrypt(this,t));if(t)throw new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},h.prototype.add=function(t){this.cache=i.concat([this.cache,t])},h.prototype.get=function(t){var e;if(t){if(this.cache.length>16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},h.prototype.flush=function(){if(this.cache.length)return this.cache},e.createDecipher=function(t,e){var r=o[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(e,!1,r.key,r.iv);return l(t,n.key,n.iv)},e.createDecipheriv=l},9309:(t,e,r)=>{var n=r(8702),i=r(3313),o=r(7834).Buffer,s=r(7041),a=r(3973),u=r(2970),c=r(9341);function f(t,e,r){a.call(this),this._cache=new l,this._cipher=new u.AES(e),this._prev=o.from(r),this._mode=t,this._autopadding=!0}r(1285)(f,a),f.prototype._update=function(t){var e,r;this._cache.add(t);for(var n=[];e=this._cache.get();)r=this._mode.encrypt(this,e),n.push(r);return o.concat(n)};var h=o.alloc(16,16);function l(){this.cache=o.allocUnsafe(0)}function p(t,e,r){var a=n[t.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=o.from(e)),e.length!==a.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new s(a.module,e,r):"auth"===a.type?new i(a.module,e,r):new f(a.module,e,r)}f.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(h))throw this._cipher.scrub(),new Error("data not multiple of block length")},f.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},l.prototype.add=function(t){this.cache=o.concat([this.cache,t])},l.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},l.prototype.flush=function(){for(var t=16-this.cache.length,e=o.allocUnsafe(t),r=-1;++r<t;)e.writeUInt8(t,r);return o.concat([this.cache,e])},e.createCipheriv=p,e.createCipher=function(t,e){var r=n[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=c(e,!1,r.key,r.iv);return p(t,i.key,i.iv)}},2895:(t,e,r)=>{var n=r(7834).Buffer,i=n.alloc(16,0);function o(t){var e=n.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function s(t){this.h=t,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(t){for(var e=-1;++e<t.length;)this.state[e]^=t[e];this._multiply()},s.prototype._multiply=function(){for(var t,e,r,n=[(t=this.h).readUInt32BE(0),t.readUInt32BE(4),t.readUInt32BE(8),t.readUInt32BE(12)],i=[0,0,0,0],s=-1;++s<128;){for(0!=(this.state[~~(s/8)]&1<<7-s%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=0!=(1&n[3]),e=3;e>0;e--)n[e]=n[e]>>>1|(1&n[e-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.prototype.update=function(t){var e;for(this.cache=n.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},s.prototype.final=function(t,e){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,t,0,e])),this.state},t.exports=s},4182:t=>{t.exports=function(t){for(var e,r=t.length;r--;){if(255!==(e=t.readUInt8(r))){e++,t.writeUInt8(e,r);break}t.writeUInt8(0,r)}}},8796:(t,e,r)=>{var n=r(1313);e.encrypt=function(t,e){var r=n(e,t._prev);return t._prev=t._cipher.encryptBlock(r),t._prev},e.decrypt=function(t,e){var r=t._prev;t._prev=e;var i=t._cipher.decryptBlock(e);return n(i,r)}},6528:(t,e,r)=>{var n=r(7834).Buffer,i=r(1313);function o(t,e,r){var o=e.length,s=i(e,t._cache);return t._cache=t._cache.slice(o),t._prev=n.concat([t._prev,r?e:s]),s}e.encrypt=function(t,e,r){for(var i,s=n.allocUnsafe(0);e.length;){if(0===t._cache.length&&(t._cache=t._cipher.encryptBlock(t._prev),t._prev=n.allocUnsafe(0)),!(t._cache.length<=e.length)){s=n.concat([s,o(t,e,r)]);break}i=t._cache.length,s=n.concat([s,o(t,e.slice(0,i),r)]),e=e.slice(i)}return s}},918:(t,e,r)=>{var n=r(7834).Buffer;function i(t,e,r){for(var n,i,s=-1,a=0;++s<8;)n=e&1<<7-s?128:0,a+=(128&(i=t._cipher.encryptBlock(t._prev)[0]^n))>>s%8,t._prev=o(t._prev,r?n:i);return a}function o(t,e){var r=t.length,i=-1,o=n.allocUnsafe(t.length);for(t=n.concat([t,n.from([e])]);++i<r;)o[i]=t[i]<<1|t[i+1]>>7;return o}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],r);return s}},7263:(t,e,r)=>{var n=r(7834).Buffer;function i(t,e,r){var i=t._cipher.encryptBlock(t._prev)[0]^e;return t._prev=n.concat([t._prev.slice(1),n.from([r?e:i])]),i}e.encrypt=function(t,e,r){for(var o=e.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(t,e[a],r);return s}},8219:(t,e,r)=>{var n=r(1313),i=r(7834).Buffer,o=r(4182);function s(t){var e=t._cipher.encryptBlockRaw(t._prev);return o(t._prev),e}e.encrypt=function(t,e){var r=Math.ceil(e.length/16),o=t._cache.length;t._cache=i.concat([t._cache,i.allocUnsafe(16*r)]);for(var a=0;a<r;a++){var u=s(t),c=o+16*a;t._cache.writeUInt32BE(u[0],c+0),t._cache.writeUInt32BE(u[1],c+4),t._cache.writeUInt32BE(u[2],c+8),t._cache.writeUInt32BE(u[3],c+12)}var f=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),n(e,f)}},7028:(t,e)=>{e.encrypt=function(t,e){return t._cipher.encryptBlock(e)},e.decrypt=function(t,e){return t._cipher.decryptBlock(e)}},8702:(t,e,r)=>{var n={ECB:r(7028),CBC:r(8796),CFB:r(6528),CFB8:r(7263),CFB1:r(918),OFB:r(4256),CTR:r(8219),GCM:r(8219)},i=r(9234);for(var o in i)i[o].module=n[i[o].mode];t.exports=i},4256:(t,e,r)=>{var n=r(8834).Buffer,i=r(1313);function o(t){return t._prev=t._cipher.encryptBlock(t._prev),t._prev}e.encrypt=function(t,e){for(;t._cache.length<e.length;)t._cache=n.concat([t._cache,o(t)]);var r=t._cache.slice(0,e.length);return t._cache=t._cache.slice(e.length),i(e,r)}},7041:(t,e,r)=>{var n=r(2970),i=r(7834).Buffer,o=r(3973);function s(t,e,r,s){o.call(this),this._cipher=new n.AES(e),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=t}r(1285)(s,o),s.prototype._update=function(t){return this._mode.encrypt(this,t,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},t.exports=s},3667:(t,e,r)=>{var n=r(7214),i=r(10),o=r(8702),s=r(2820),a=r(9341);function u(t,e,r){if(t=t.toLowerCase(),o[t])return i.createCipheriv(t,e,r);if(s[t])return new n({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function c(t,e,r){if(t=t.toLowerCase(),o[t])return i.createDecipheriv(t,e,r);if(s[t])return new n({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}e.createCipher=e.Cipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");r=8*s[t].key,n=s[t].iv}var i=a(e,!1,r,n);return u(t,i.key,i.iv)},e.createCipheriv=e.Cipheriv=u,e.createDecipher=e.Decipher=function(t,e){var r,n;if(t=t.toLowerCase(),o[t])r=o[t].key,n=o[t].iv;else{if(!s[t])throw new TypeError("invalid suite type");r=8*s[t].key,n=s[t].iv}var i=a(e,!1,r,n);return c(t,i.key,i.iv)},e.createDecipheriv=e.Decipheriv=c,e.listCiphers=e.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},7214:(t,e,r)=>{var n=r(3973),i=r(4387),o=r(1285),s=r(7834).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function u(t){n.call(this);var e,r=t.mode.toLowerCase(),i=a[r];e=t.decrypt?"decrypt":"encrypt";var o=t.key;s.isBuffer(o)||(o=s.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=s.concat([o,o.slice(0,8)]));var u=t.iv;s.isBuffer(u)||(u=s.from(u)),this._des=i.create({key:o,iv:u,type:e})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],t.exports=u,o(u,n),u.prototype._update=function(t){return s.from(this._des.update(t))},u.prototype._final=function(){return s.from(this._des.final())}},2820:(t,e)=>{e["des-ecb"]={key:8,iv:0},e["des-cbc"]=e.des={key:8,iv:8},e["des-ede3-cbc"]=e.des3={key:24,iv:8},e["des-ede3"]={key:24,iv:0},e["des-ede-cbc"]={key:16,iv:8},e["des-ede"]={key:16,iv:0}},1857:(t,e,r)=>{var n=r(8834).Buffer,i=r(7123),o=r(5003);function s(t){var e,r=t.modulus.byteLength();do{e=new i(o(r))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function a(t,e){var r=function(t){var e=s(t);return{blinder:e.toRed(i.mont(t.modulus)).redPow(new i(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),o=e.modulus.byteLength(),a=new i(t).mul(r.blinder).umod(e.modulus),u=a.toRed(i.mont(e.prime1)),c=a.toRed(i.mont(e.prime2)),f=e.coefficient,h=e.prime1,l=e.prime2,p=u.redPow(e.exponent1).fromRed(),d=c.redPow(e.exponent2).fromRed(),g=p.isub(d).imul(f).umod(h).imul(l);return d.iadd(g).imul(r.unblinder).umod(e.modulus).toArrayLike(n,"be",o)}a.getr=s,t.exports=a},7123:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(8092).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u<a;u++){var c=t.charCodeAt(u)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<i,"Invalid character"),o+=s}return o}function f(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,f=r;f<a;f+=n)u=c(t,f,f+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=c(t,f,t.length,e),f=0;f<s;f++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){f(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(t){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=l;p++){var d=c-p|0;f+=(s=(i=0|t.words[d])*(o=0|e.words[p])+h)/67108864|0,h=67108863&s}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=p[t],f=d[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var g=h.modrn(f).toString(t);r=(h=h.idivn(f)).isZero()?g+r:l[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var y=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,c=0,f=0|s[0],h=8191&f,l=f>>>13,p=0|s[1],d=8191&p,g=p>>>13,y=0|s[2],b=8191&y,m=y>>>13,v=0|s[3],w=8191&v,_=v>>>13,A=0|s[4],E=8191&A,S=A>>>13,I=0|s[5],k=8191&I,x=I>>>13,M=0|s[6],C=8191&M,T=M>>>13,O=0|s[7],P=8191&O,B=O>>>13,R=0|s[8],N=8191&R,U=R>>>13,j=0|s[9],L=8191&j,D=j>>>13,F=0|a[0],q=8191&F,H=F>>>13,K=0|a[1],V=8191&K,G=K>>>13,z=0|a[2],W=8191&z,Q=z>>>13,Y=0|a[3],X=8191&Y,$=Y>>>13,Z=0|a[4],J=8191&Z,tt=Z>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,ft=0|a[8],ht=8191&ft,lt=ft>>>13,pt=0|a[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(c+(n=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,H))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,H))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,q),i=(i=Math.imul(d,H))+Math.imul(g,q)|0,o=Math.imul(g,H);var bt=(c+(n=n+Math.imul(h,V)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(l,V)|0))<<13)|0;c=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(b,q),i=(i=Math.imul(b,H))+Math.imul(m,q)|0,o=Math.imul(m,H),n=n+Math.imul(d,V)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,G)|0;var mt=(c+(n=n+Math.imul(h,W)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(l,W)|0))<<13)|0;c=((o=o+Math.imul(l,Q)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,H))+Math.imul(_,q)|0,o=Math.imul(_,H),n=n+Math.imul(b,V)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,Q)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,Q)|0;var vt=(c+(n=n+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,$)|0)+Math.imul(l,X)|0))<<13)|0;c=((o=o+Math.imul(l,$)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,H))+Math.imul(S,q)|0,o=Math.imul(S,H),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Q)|0,n=n+Math.imul(d,X)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,$)|0;var wt=(c+(n=n+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,J)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,H))+Math.imul(x,q)|0,o=Math.imul(x,H),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(b,X)|0,i=(i=i+Math.imul(b,$)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,$)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(l,rt)|0))<<13)|0;c=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,H))+Math.imul(T,q)|0,o=Math.imul(T,H),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,Q)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var At=(c+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,H))+Math.imul(B,q)|0,o=Math.imul(B,H),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Q)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var Et=(c+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,H))+Math.imul(U,q)|0,o=Math.imul(U,H),n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(C,W)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,Q)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var St=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,H))+Math.imul(D,q)|0,o=Math.imul(D,H),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(U,V)|0,o=o+Math.imul(U,G)|0,n=n+Math.imul(P,W)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(C,X)|0,i=(i=i+Math.imul(C,$)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,$)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0,n=n+Math.imul(d,ht)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(g,ht)|0,o=o+Math.imul(g,lt)|0;var It=(c+(n=n+Math.imul(h,dt)|0)|0)+((8191&(i=(i=i+Math.imul(h,gt)|0)+Math.imul(l,dt)|0))<<13)|0;c=((o=o+Math.imul(l,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,G))+Math.imul(D,V)|0,o=Math.imul(D,G),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,Q)|0,n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,$)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(b,ht)|0,i=(i=i+Math.imul(b,lt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,lt)|0;var kt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,Q))+Math.imul(D,W)|0,o=Math.imul(D,Q),n=n+Math.imul(N,X)|0,i=(i=i+Math.imul(N,$)|0)+Math.imul(U,X)|0,o=o+Math.imul(U,$)|0,n=n+Math.imul(P,J)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,lt)|0;var xt=(c+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(m,dt)|0))<<13)|0;c=((o=o+Math.imul(m,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,X),i=(i=Math.imul(L,$))+Math.imul(D,X)|0,o=Math.imul(D,$),n=n+Math.imul(N,J)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(U,J)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ct)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,lt)|0;var Mt=(c+(n=n+Math.imul(w,dt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,J),i=(i=Math.imul(L,tt))+Math.imul(D,J)|0,o=Math.imul(D,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ct)|0,n=n+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,lt)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,lt)|0;var Ct=(c+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(S,dt)|0))<<13)|0;c=((o=o+Math.imul(S,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,st)|0)+Math.imul(U,ot)|0,o=o+Math.imul(U,st)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(T,ht)|0,o=o+Math.imul(T,lt)|0;var Tt=(c+(n=n+Math.imul(k,dt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(x,dt)|0))<<13)|0;c=((o=o+Math.imul(x,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(U,ut)|0,o=o+Math.imul(U,ct)|0,n=n+Math.imul(P,ht)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(B,ht)|0,o=o+Math.imul(B,lt)|0;var Ot=(c+(n=n+Math.imul(C,dt)|0)|0)+((8191&(i=(i=i+Math.imul(C,gt)|0)+Math.imul(T,dt)|0))<<13)|0;c=((o=o+Math.imul(T,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),n=n+Math.imul(N,ht)|0,i=(i=i+Math.imul(N,lt)|0)+Math.imul(U,ht)|0,o=o+Math.imul(U,lt)|0;var Pt=(c+(n=n+Math.imul(P,dt)|0)|0)+((8191&(i=(i=i+Math.imul(P,gt)|0)+Math.imul(B,dt)|0))<<13)|0;c=((o=o+Math.imul(B,gt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ht),i=(i=Math.imul(L,lt))+Math.imul(D,ht)|0,o=Math.imul(D,lt);var Bt=(c+(n=n+Math.imul(N,dt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(U,dt)|0))<<13)|0;c=((o=o+Math.imul(U,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863;var Rt=(c+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(D,dt)|0))<<13)|0;return c=((o=Math.imul(D,gt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=yt,u[1]=bt,u[2]=mt,u[3]=vt,u[4]=wt,u[5]=_t,u[6]=At,u[7]=Et,u[8]=St,u[9]=It,u[10]=kt,u[11]=xt,u[12]=Mt,u[13]=Ct,u[14]=Tt,u[15]=Ot,u[16]=Pt,u[17]=Bt,u[18]=Rt,0!==c&&(u[19]=c,r.length++),r};function b(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var f=o-c,h=(0|t.words[f])*(0|e.words[c]),l=67108863&h;a=67108863&(l=l+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function m(t,e,r){return b(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(y=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?y(this,t,e):r<63?g(this,t,e):r<1024?b(this,t,e):m(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},v.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},v.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),f=0;f<i;f+=a)for(var h=u,l=c,p=0;p<s;p++){var d=r[f+p],g=n[f+p],y=r[f+p+s],b=n[f+p+s],m=h*y-l*b;b=h*b+l*y,y=m,r[f+p]=d+y,n[f+p]=g+b,r[f+p+s]=d-y,n[f+p+s]=g-b,p!==a&&(m=u*h-c*l,l=u*l+c*h,h=m)}},v.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},v.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},v.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},v.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},v.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,f,h,n,i);for(var p=0;p<n;p++){var d=a[p]*f[p]-u[p]*h[p];u[p]=a[p]*h[p]+u[p]*f[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=l)}return a&&a._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),h=e.clone();!e.isZero();){for(var l=0,p=1;0==(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(A,_),A.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},A.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(E,_),i(S,_),i(I,_),I.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new A;else if("p224"===t)e=new E;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new I}return w[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var g=p,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y<d);var b=this.pow(h,new o(1).iushln(d-y-1));l=l.redMul(b),h=b.redSqr(),p=p.redMul(h),d=y}return l},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],f=u-1;f>=0;f--){var h=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,k),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},4778:(t,e,r)=>{t.exports=r(26)},5263:(t,e,r)=>{var n=r(7834).Buffer,i=r(6162),o=r(5543),s=r(1285),a=r(262),u=r(5643),c=r(26);function f(t){o.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hashType=e.hash,this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function h(t){o.Writable.call(this);var e=c[t];if(!e)throw new Error("Unknown message digest");this._hash=i(e.hash),this._tag=e.id,this._signType=e.sign}function l(t){return new f(t)}function p(t){return new h(t)}Object.keys(c).forEach((function(t){c[t].id=n.from(c[t].id,"hex"),c[t.toLowerCase()]=c[t]})),s(f,o.Writable),f.prototype._write=function(t,e,r){this._hash.update(t),r()},f.prototype.update=function(t,e){return"string"==typeof t&&(t=n.from(t,e)),this._hash.update(t),this},f.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),n=a(r,t,this._hashType,this._signType,this._tag);return e?n.toString(e):n},s(h,o.Writable),h.prototype._write=function(t,e,r){this._hash.update(t),r()},h.prototype.update=function(t,e){return"string"==typeof t&&(t=n.from(t,e)),this._hash.update(t),this},h.prototype.verify=function(t,e,r){"string"==typeof e&&(e=n.from(e,r)),this.end();var i=this._hash.digest();return u(e,i,t,this._signType,this._tag)},t.exports={Sign:l,Verify:p,createSign:l,createVerify:p}},262:(t,e,r)=>{var n=r(7834).Buffer,i=r(11),o=r(1857),s=r(7554).ec,a=r(5456),u=r(8016),c=r(9167);function f(t,e,r,o){if((t=n.from(t.toArray())).length<e.byteLength()){var s=n.alloc(e.byteLength()-t.length);t=n.concat([s,t])}var a=r.length,u=function(t,e){t=(t=h(t,e)).mod(e);var r=n.from(t.toArray());if(r.length<e.byteLength()){var i=n.alloc(e.byteLength()-r.length);r=n.concat([i,r])}return r}(r,e),c=n.alloc(a);c.fill(1);var f=n.alloc(a);return f=i(o,f).update(c).update(n.from([0])).update(t).update(u).digest(),c=i(o,f).update(c).digest(),{k:f=i(o,f).update(c).update(n.from([1])).update(t).update(u).digest(),v:c=i(o,f).update(c).digest()}}function h(t,e){var r=new a(t),n=(t.length<<3)-e.bitLength();return n>0&&r.ishrn(n),r}function l(t,e,r){var o,s;do{for(o=n.alloc(0);8*o.length<t.bitLength();)e.v=i(r,e.k).update(e.v).digest(),o=n.concat([o,e.v]);s=h(o,t),e.k=i(r,e.k).update(e.v).update(n.from([0])).digest(),e.v=i(r,e.k).update(e.v).digest()}while(-1!==s.cmp(t));return s}function p(t,e,r,n){return t.toRed(a.mont(r)).redPow(e).fromRed().mod(n)}t.exports=function(t,e,r,i,d){var g=u(e);if(g.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(t,e){var r=c[e.curve.join(".")];if(!r)throw new Error("unknown curve "+e.curve.join("."));var i=new s(r).keyFromPrivate(e.privateKey).sign(t);return n.from(i.toDER())}(t,g)}if("dsa"===g.type){if("dsa"!==i)throw new Error("wrong private key type");return function(t,e,r){for(var i,o=e.params.priv_key,s=e.params.p,u=e.params.q,c=e.params.g,d=new a(0),g=h(t,u).mod(u),y=!1,b=f(o,u,t,r);!1===y;)d=p(c,i=l(u,b,r),s,u),0===(y=i.invm(u).imul(g.add(o.mul(d))).mod(u)).cmpn(0)&&(y=!1,d=new a(0));return function(t,e){t=t.toArray(),e=e.toArray(),128&t[0]&&(t=[0].concat(t)),128&e[0]&&(e=[0].concat(e));var r=[48,t.length+e.length+4,2,t.length];return r=r.concat(t,[2,e.length],e),n.from(r)}(d,y)}(t,g,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");t=n.concat([d,t]);for(var y=g.modulus.byteLength(),b=[0,1];t.length+b.length+1<y;)b.push(255);b.push(0);for(var m=-1;++m<t.length;)b.push(t[m]);return o(b,g)},t.exports.getKey=f,t.exports.makeKey=l},5643:(t,e,r)=>{var n=r(7834).Buffer,i=r(5456),o=r(7554).ec,s=r(8016),a=r(9167);function u(t,e){if(t.cmpn(0)<=0)throw new Error("invalid sig");if(t.cmp(e)>=e)throw new Error("invalid sig")}t.exports=function(t,e,r,c,f){var h=s(r);if("ec"===h.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(t,e,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),s=r.data.subjectPrivateKey.data;return i.verify(e,t,s)}(t,e,h)}if("dsa"===h.type){if("dsa"!==c)throw new Error("wrong public key type");return function(t,e,r){var n=r.data.p,o=r.data.q,a=r.data.g,c=r.data.pub_key,f=s.signature.decode(t,"der"),h=f.s,l=f.r;u(h,o),u(l,o);var p=i.mont(n),d=h.invm(o);return 0===a.toRed(p).redPow(new i(e).mul(d).mod(o)).fromRed().mul(c.toRed(p).redPow(l.mul(d).mod(o)).fromRed()).mod(n).mod(o).cmp(l)}(t,e,h)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");e=n.concat([f,e]);for(var l=h.modulus.byteLength(),p=[1],d=0;e.length+p.length+2<l;)p.push(255),d++;p.push(0);for(var g=-1;++g<e.length;)p.push(e[g]);p=n.from(p);var y=i.mont(h.modulus);t=(t=new i(t).toRed(y)).redPow(new i(h.publicExponent)),t=n.from(t.fromRed().toArray());var b=d<8?1:0;for(l=Math.min(t.length,p.length),t.length!==p.length&&(b=1),g=-1;++g<l;)b|=t[g]^p[g];return 0===b}},5456:function(t,e,r){!function(t,e){"use strict";function n(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function o(t,e,r){if(o.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var s;"object"==typeof t?t.exports=o:e.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(936).Buffer}catch(t){}function a(t,e){var r=t.charCodeAt(e);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+t)}function u(t,e,r){var n=a(t,r);return r-1>=e&&(n|=a(t,r-1)<<4),n}function c(t,e,r,i){for(var o=0,s=0,a=Math.min(t.length,r),u=e;u<a;u++){var c=t.charCodeAt(u)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<i,"Invalid character"),o+=s}return o}function f(t,e){t.words=e.words,t.length=e.length,t.negative=e.negative,t.red=e.red}if(o.isBN=function(t){return t instanceof o||null!==t&&"object"==typeof t&&t.constructor.wordSize===o.wordSize&&Array.isArray(t.words)},o.max=function(t,e){return t.cmp(e)>0?t:e},o.min=function(t,e){return t.cmp(e)<0?t:e},o.prototype._init=function(t,e,r){if("number"==typeof t)return this._initNumber(t,e,r);if("object"==typeof t)return this._initArray(t,e,r);"hex"===e&&(e=16),n(e===(0|e)&&e>=2&&e<=36);var i=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<t.length&&(16===e?this._parseHex(t,i,r):(this._parseBase(t,e,i),"le"===r&&this._initArray(this.toArray(),e,r)))},o.prototype._initNumber=function(t,e,r){t<0&&(this.negative=1,t=-t),t<67108864?(this.words=[67108863&t],this.length=1):t<4503599627370496?(this.words=[67108863&t,t/67108864&67108863],this.length=2):(n(t<9007199254740992),this.words=[67108863&t,t/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),e,r)},o.prototype._initArray=function(t,e,r){if(n("number"==typeof t.length),t.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(t.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=t.length-1,o=0;i>=0;i-=3)s=t[i]|t[i-1]<<8|t[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<t.length;i+=3)s=t[i]|t[i+1]<<8|t[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=t.length-1;n>=e;n-=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(t.length-e)%2==0?e+1:e;n<t.length;n+=2)i=u(t,e,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=e)n++;n--,i=i/e|0;for(var o=t.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,f=r;f<a;f+=n)u=c(t,f,f+n,e),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var h=1;for(u=c(t,f,t.length,e),f=0;f<s;f++)h*=e;this.imuln(h),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(t){t.words=new Array(this.length);for(var e=0;e<this.length;e++)t.words[e]=this.words[e];t.length=this.length,t.negative=this.negative,t.red=this.red},o.prototype._move=function(t){f(t,this)},o.prototype.clone=function(){var t=new o(null);return this.copy(t),t},o.prototype._expand=function(t){for(;this.length<t;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=h}catch(t){o.prototype.inspect=h}else o.prototype.inspect=h;function h(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],p=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function g(t,e,r){r.negative=e.negative^t.negative;var n=t.length+e.length|0;r.length=n,n=n-1|0;var i=0|t.words[0],o=0|e.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var f=u>>>26,h=67108863&u,l=Math.min(c,e.length-1),p=Math.max(0,c-t.length+1);p<=l;p++){var d=c-p|0;f+=(s=(i=0|t.words[d])*(o=0|e.words[p])+h)/67108864|0,h=67108863&s}r.words[c]=0|h,u=0|f}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toString=function(t,e){var r;if(e=0|e||1,16===(t=t||10)||"hex"===t){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);r=0!=(o=a>>>24-i&16777215)||s!==this.length-1?l[6-u.length]+u+r:u+r,(i+=2)>=26&&(i-=26,s--)}for(0!==o&&(r=o.toString(16)+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(t===(0|t)&&t>=2&&t<=36){var c=p[t],f=d[t];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var g=h.modrn(f).toString(t);r=(h=h.idivn(f)).isZero()?g+r:l[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%e!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(t,e){return this.toArrayLike(s,t,e)}),o.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},o.prototype.toArrayLike=function(t,e,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(t,e){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r++]=255&s,r<t.length&&(t[r++]=s>>8&255),r<t.length&&(t[r++]=s>>16&255),6===o?(r<t.length&&(t[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<t.length)for(t[r++]=n;r<t.length;)t[r++]=0},o.prototype._toArrayLikeBE=function(t,e){for(var r=t.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;t[r--]=255&s,r>=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(t[r--]=n;r>=0;)t[r--]=0},Math.clz32?o.prototype._countBits=function(t){return 32-Math.clz32(t)}:o.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},o.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},o.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;e<this.length;e++){var r=this._zeroBits(this.words[e]);if(t+=r,26!==r)break}return t},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(t){return 0!==this.negative?this.abs().inotn(t).iaddn(1):this.clone()},o.prototype.fromTwos=function(t){return this.testn(t-1)?this.notn(t).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(t){for(;this.length<t.length;)this.words[this.length++]=0;for(var e=0;e<t.length;e++)this.words[e]=this.words[e]|t.words[e];return this._strip()},o.prototype.ior=function(t){return n(0==(this.negative|t.negative)),this.iuor(t)},o.prototype.or=function(t){return this.length>t.length?this.clone().ior(t):t.clone().ior(this)},o.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},o.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;r<e.length;r++)this.words[r]=this.words[r]&t.words[r];return this.length=e.length,this._strip()},o.prototype.iand=function(t){return n(0==(this.negative|t.negative)),this.iuand(t)},o.prototype.and=function(t){return this.length>t.length?this.clone().iand(t):t.clone().iand(this)},o.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},o.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var n=0;n<r.length;n++)this.words[n]=e.words[n]^r.words[n];if(this!==e)for(;n<e.length;n++)this.words[n]=e.words[n];return this.length=e.length,this._strip()},o.prototype.ixor=function(t){return n(0==(this.negative|t.negative)),this.iuxor(t)},o.prototype.xor=function(t){return this.length>t.length?this.clone().ixor(t):t.clone().ixor(this)},o.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},o.prototype.inotn=function(t){n("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),r=t%26;this._expand(e),r>0&&e--;for(var i=0;i<e;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(t){return this.clone().inotn(t)},o.prototype.setn=function(t,e){n("number"==typeof t&&t>=0);var r=t/26|0,i=t%26;return this._expand(r+1),this.words[r]=e?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(t){var e,r,n;if(0!==this.negative&&0===t.negative)return this.negative=0,e=this.isub(t),this.negative^=1,this._normSign();if(0===this.negative&&0!==t.negative)return t.negative=0,e=this.isub(t),t.negative=1,e._normSign();this.length>t.length?(r=this,n=t):(r=t,n=this);for(var i=0,o=0;o<n.length;o++)e=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&e,i=e>>>26;for(;0!==i&&o<r.length;o++)e=(0|r.words[o])+i,this.words[o]=67108863&e,i=e>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(t){var e;return 0!==t.negative&&0===this.negative?(t.negative=0,e=this.sub(t),t.negative^=1,e):0===t.negative&&0!==this.negative?(this.negative=0,e=t.sub(this),this.negative=1,e):this.length>t.length?this.clone().iadd(t):t.clone().iadd(this)},o.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,n,i=this.cmp(t);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=t):(r=t,n=this);for(var o=0,s=0;s<n.length;s++)o=(e=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&e;for(;0!==o&&s<r.length;s++)o=(e=(0|r.words[s])+o)>>26,this.words[s]=67108863&e;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(t){return this.clone().isub(t)};var y=function(t,e,r){var n,i,o,s=t.words,a=e.words,u=r.words,c=0,f=0|s[0],h=8191&f,l=f>>>13,p=0|s[1],d=8191&p,g=p>>>13,y=0|s[2],b=8191&y,m=y>>>13,v=0|s[3],w=8191&v,_=v>>>13,A=0|s[4],E=8191&A,S=A>>>13,I=0|s[5],k=8191&I,x=I>>>13,M=0|s[6],C=8191&M,T=M>>>13,O=0|s[7],P=8191&O,B=O>>>13,R=0|s[8],N=8191&R,U=R>>>13,j=0|s[9],L=8191&j,D=j>>>13,F=0|a[0],q=8191&F,H=F>>>13,K=0|a[1],V=8191&K,G=K>>>13,z=0|a[2],W=8191&z,Q=z>>>13,Y=0|a[3],X=8191&Y,$=Y>>>13,Z=0|a[4],J=8191&Z,tt=Z>>>13,et=0|a[5],rt=8191&et,nt=et>>>13,it=0|a[6],ot=8191&it,st=it>>>13,at=0|a[7],ut=8191&at,ct=at>>>13,ft=0|a[8],ht=8191&ft,lt=ft>>>13,pt=0|a[9],dt=8191&pt,gt=pt>>>13;r.negative=t.negative^e.negative,r.length=19;var yt=(c+(n=Math.imul(h,q))|0)+((8191&(i=(i=Math.imul(h,H))+Math.imul(l,q)|0))<<13)|0;c=((o=Math.imul(l,H))+(i>>>13)|0)+(yt>>>26)|0,yt&=67108863,n=Math.imul(d,q),i=(i=Math.imul(d,H))+Math.imul(g,q)|0,o=Math.imul(g,H);var bt=(c+(n=n+Math.imul(h,V)|0)|0)+((8191&(i=(i=i+Math.imul(h,G)|0)+Math.imul(l,V)|0))<<13)|0;c=((o=o+Math.imul(l,G)|0)+(i>>>13)|0)+(bt>>>26)|0,bt&=67108863,n=Math.imul(b,q),i=(i=Math.imul(b,H))+Math.imul(m,q)|0,o=Math.imul(m,H),n=n+Math.imul(d,V)|0,i=(i=i+Math.imul(d,G)|0)+Math.imul(g,V)|0,o=o+Math.imul(g,G)|0;var mt=(c+(n=n+Math.imul(h,W)|0)|0)+((8191&(i=(i=i+Math.imul(h,Q)|0)+Math.imul(l,W)|0))<<13)|0;c=((o=o+Math.imul(l,Q)|0)+(i>>>13)|0)+(mt>>>26)|0,mt&=67108863,n=Math.imul(w,q),i=(i=Math.imul(w,H))+Math.imul(_,q)|0,o=Math.imul(_,H),n=n+Math.imul(b,V)|0,i=(i=i+Math.imul(b,G)|0)+Math.imul(m,V)|0,o=o+Math.imul(m,G)|0,n=n+Math.imul(d,W)|0,i=(i=i+Math.imul(d,Q)|0)+Math.imul(g,W)|0,o=o+Math.imul(g,Q)|0;var vt=(c+(n=n+Math.imul(h,X)|0)|0)+((8191&(i=(i=i+Math.imul(h,$)|0)+Math.imul(l,X)|0))<<13)|0;c=((o=o+Math.imul(l,$)|0)+(i>>>13)|0)+(vt>>>26)|0,vt&=67108863,n=Math.imul(E,q),i=(i=Math.imul(E,H))+Math.imul(S,q)|0,o=Math.imul(S,H),n=n+Math.imul(w,V)|0,i=(i=i+Math.imul(w,G)|0)+Math.imul(_,V)|0,o=o+Math.imul(_,G)|0,n=n+Math.imul(b,W)|0,i=(i=i+Math.imul(b,Q)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Q)|0,n=n+Math.imul(d,X)|0,i=(i=i+Math.imul(d,$)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,$)|0;var wt=(c+(n=n+Math.imul(h,J)|0)|0)+((8191&(i=(i=i+Math.imul(h,tt)|0)+Math.imul(l,J)|0))<<13)|0;c=((o=o+Math.imul(l,tt)|0)+(i>>>13)|0)+(wt>>>26)|0,wt&=67108863,n=Math.imul(k,q),i=(i=Math.imul(k,H))+Math.imul(x,q)|0,o=Math.imul(x,H),n=n+Math.imul(E,V)|0,i=(i=i+Math.imul(E,G)|0)+Math.imul(S,V)|0,o=o+Math.imul(S,G)|0,n=n+Math.imul(w,W)|0,i=(i=i+Math.imul(w,Q)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Q)|0,n=n+Math.imul(b,X)|0,i=(i=i+Math.imul(b,$)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,$)|0,n=n+Math.imul(d,J)|0,i=(i=i+Math.imul(d,tt)|0)+Math.imul(g,J)|0,o=o+Math.imul(g,tt)|0;var _t=(c+(n=n+Math.imul(h,rt)|0)|0)+((8191&(i=(i=i+Math.imul(h,nt)|0)+Math.imul(l,rt)|0))<<13)|0;c=((o=o+Math.imul(l,nt)|0)+(i>>>13)|0)+(_t>>>26)|0,_t&=67108863,n=Math.imul(C,q),i=(i=Math.imul(C,H))+Math.imul(T,q)|0,o=Math.imul(T,H),n=n+Math.imul(k,V)|0,i=(i=i+Math.imul(k,G)|0)+Math.imul(x,V)|0,o=o+Math.imul(x,G)|0,n=n+Math.imul(E,W)|0,i=(i=i+Math.imul(E,Q)|0)+Math.imul(S,W)|0,o=o+Math.imul(S,Q)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,$)|0,n=n+Math.imul(b,J)|0,i=(i=i+Math.imul(b,tt)|0)+Math.imul(m,J)|0,o=o+Math.imul(m,tt)|0,n=n+Math.imul(d,rt)|0,i=(i=i+Math.imul(d,nt)|0)+Math.imul(g,rt)|0,o=o+Math.imul(g,nt)|0;var At=(c+(n=n+Math.imul(h,ot)|0)|0)+((8191&(i=(i=i+Math.imul(h,st)|0)+Math.imul(l,ot)|0))<<13)|0;c=((o=o+Math.imul(l,st)|0)+(i>>>13)|0)+(At>>>26)|0,At&=67108863,n=Math.imul(P,q),i=(i=Math.imul(P,H))+Math.imul(B,q)|0,o=Math.imul(B,H),n=n+Math.imul(C,V)|0,i=(i=i+Math.imul(C,G)|0)+Math.imul(T,V)|0,o=o+Math.imul(T,G)|0,n=n+Math.imul(k,W)|0,i=(i=i+Math.imul(k,Q)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Q)|0,n=n+Math.imul(E,X)|0,i=(i=i+Math.imul(E,$)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,J)|0,i=(i=i+Math.imul(w,tt)|0)+Math.imul(_,J)|0,o=o+Math.imul(_,tt)|0,n=n+Math.imul(b,rt)|0,i=(i=i+Math.imul(b,nt)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,nt)|0,n=n+Math.imul(d,ot)|0,i=(i=i+Math.imul(d,st)|0)+Math.imul(g,ot)|0,o=o+Math.imul(g,st)|0;var Et=(c+(n=n+Math.imul(h,ut)|0)|0)+((8191&(i=(i=i+Math.imul(h,ct)|0)+Math.imul(l,ut)|0))<<13)|0;c=((o=o+Math.imul(l,ct)|0)+(i>>>13)|0)+(Et>>>26)|0,Et&=67108863,n=Math.imul(N,q),i=(i=Math.imul(N,H))+Math.imul(U,q)|0,o=Math.imul(U,H),n=n+Math.imul(P,V)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(B,V)|0,o=o+Math.imul(B,G)|0,n=n+Math.imul(C,W)|0,i=(i=i+Math.imul(C,Q)|0)+Math.imul(T,W)|0,o=o+Math.imul(T,Q)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,$)|0,n=n+Math.imul(E,J)|0,i=(i=i+Math.imul(E,tt)|0)+Math.imul(S,J)|0,o=o+Math.imul(S,tt)|0,n=n+Math.imul(w,rt)|0,i=(i=i+Math.imul(w,nt)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,nt)|0,n=n+Math.imul(b,ot)|0,i=(i=i+Math.imul(b,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0,n=n+Math.imul(d,ut)|0,i=(i=i+Math.imul(d,ct)|0)+Math.imul(g,ut)|0,o=o+Math.imul(g,ct)|0;var St=(c+(n=n+Math.imul(h,ht)|0)|0)+((8191&(i=(i=i+Math.imul(h,lt)|0)+Math.imul(l,ht)|0))<<13)|0;c=((o=o+Math.imul(l,lt)|0)+(i>>>13)|0)+(St>>>26)|0,St&=67108863,n=Math.imul(L,q),i=(i=Math.imul(L,H))+Math.imul(D,q)|0,o=Math.imul(D,H),n=n+Math.imul(N,V)|0,i=(i=i+Math.imul(N,G)|0)+Math.imul(U,V)|0,o=o+Math.imul(U,G)|0,n=n+Math.imul(P,W)|0,i=(i=i+Math.imul(P,Q)|0)+Math.imul(B,W)|0,o=o+Math.imul(B,Q)|0,n=n+Math.imul(C,X)|0,i=(i=i+Math.imul(C,$)|0)+Math.imul(T,X)|0,o=o+Math.imul(T,$)|0,n=n+Math.imul(k,J)|0,i=(i=i+Math.imul(k,tt)|0)+Math.imul(x,J)|0,o=o+Math.imul(x,tt)|0,n=n+Math.imul(E,rt)|0,i=(i=i+Math.imul(E,nt)|0)+Math.imul(S,rt)|0,o=o+Math.imul(S,nt)|0,n=n+Math.imul(w,ot)|0,i=(i=i+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,n=n+Math.imul(b,ut)|0,i=(i=i+Math.imul(b,ct)|0)+Math.imul(m,ut)|0,o=o+Math.imul(m,ct)|0,n=n+Math.imul(d,ht)|0,i=(i=i+Math.imul(d,lt)|0)+Math.imul(g,ht)|0,o=o+Math.imul(g,lt)|0;var It=(c+(n=n+Math.imul(h,dt)|0)|0)+((8191&(i=(i=i+Math.imul(h,gt)|0)+Math.imul(l,dt)|0))<<13)|0;c=((o=o+Math.imul(l,gt)|0)+(i>>>13)|0)+(It>>>26)|0,It&=67108863,n=Math.imul(L,V),i=(i=Math.imul(L,G))+Math.imul(D,V)|0,o=Math.imul(D,G),n=n+Math.imul(N,W)|0,i=(i=i+Math.imul(N,Q)|0)+Math.imul(U,W)|0,o=o+Math.imul(U,Q)|0,n=n+Math.imul(P,X)|0,i=(i=i+Math.imul(P,$)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(C,J)|0,i=(i=i+Math.imul(C,tt)|0)+Math.imul(T,J)|0,o=o+Math.imul(T,tt)|0,n=n+Math.imul(k,rt)|0,i=(i=i+Math.imul(k,nt)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,nt)|0,n=n+Math.imul(E,ot)|0,i=(i=i+Math.imul(E,st)|0)+Math.imul(S,ot)|0,o=o+Math.imul(S,st)|0,n=n+Math.imul(w,ut)|0,i=(i=i+Math.imul(w,ct)|0)+Math.imul(_,ut)|0,o=o+Math.imul(_,ct)|0,n=n+Math.imul(b,ht)|0,i=(i=i+Math.imul(b,lt)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,lt)|0;var kt=(c+(n=n+Math.imul(d,dt)|0)|0)+((8191&(i=(i=i+Math.imul(d,gt)|0)+Math.imul(g,dt)|0))<<13)|0;c=((o=o+Math.imul(g,gt)|0)+(i>>>13)|0)+(kt>>>26)|0,kt&=67108863,n=Math.imul(L,W),i=(i=Math.imul(L,Q))+Math.imul(D,W)|0,o=Math.imul(D,Q),n=n+Math.imul(N,X)|0,i=(i=i+Math.imul(N,$)|0)+Math.imul(U,X)|0,o=o+Math.imul(U,$)|0,n=n+Math.imul(P,J)|0,i=(i=i+Math.imul(P,tt)|0)+Math.imul(B,J)|0,o=o+Math.imul(B,tt)|0,n=n+Math.imul(C,rt)|0,i=(i=i+Math.imul(C,nt)|0)+Math.imul(T,rt)|0,o=o+Math.imul(T,nt)|0,n=n+Math.imul(k,ot)|0,i=(i=i+Math.imul(k,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,n=n+Math.imul(E,ut)|0,i=(i=i+Math.imul(E,ct)|0)+Math.imul(S,ut)|0,o=o+Math.imul(S,ct)|0,n=n+Math.imul(w,ht)|0,i=(i=i+Math.imul(w,lt)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,lt)|0;var xt=(c+(n=n+Math.imul(b,dt)|0)|0)+((8191&(i=(i=i+Math.imul(b,gt)|0)+Math.imul(m,dt)|0))<<13)|0;c=((o=o+Math.imul(m,gt)|0)+(i>>>13)|0)+(xt>>>26)|0,xt&=67108863,n=Math.imul(L,X),i=(i=Math.imul(L,$))+Math.imul(D,X)|0,o=Math.imul(D,$),n=n+Math.imul(N,J)|0,i=(i=i+Math.imul(N,tt)|0)+Math.imul(U,J)|0,o=o+Math.imul(U,tt)|0,n=n+Math.imul(P,rt)|0,i=(i=i+Math.imul(P,nt)|0)+Math.imul(B,rt)|0,o=o+Math.imul(B,nt)|0,n=n+Math.imul(C,ot)|0,i=(i=i+Math.imul(C,st)|0)+Math.imul(T,ot)|0,o=o+Math.imul(T,st)|0,n=n+Math.imul(k,ut)|0,i=(i=i+Math.imul(k,ct)|0)+Math.imul(x,ut)|0,o=o+Math.imul(x,ct)|0,n=n+Math.imul(E,ht)|0,i=(i=i+Math.imul(E,lt)|0)+Math.imul(S,ht)|0,o=o+Math.imul(S,lt)|0;var Mt=(c+(n=n+Math.imul(w,dt)|0)|0)+((8191&(i=(i=i+Math.imul(w,gt)|0)+Math.imul(_,dt)|0))<<13)|0;c=((o=o+Math.imul(_,gt)|0)+(i>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,n=Math.imul(L,J),i=(i=Math.imul(L,tt))+Math.imul(D,J)|0,o=Math.imul(D,tt),n=n+Math.imul(N,rt)|0,i=(i=i+Math.imul(N,nt)|0)+Math.imul(U,rt)|0,o=o+Math.imul(U,nt)|0,n=n+Math.imul(P,ot)|0,i=(i=i+Math.imul(P,st)|0)+Math.imul(B,ot)|0,o=o+Math.imul(B,st)|0,n=n+Math.imul(C,ut)|0,i=(i=i+Math.imul(C,ct)|0)+Math.imul(T,ut)|0,o=o+Math.imul(T,ct)|0,n=n+Math.imul(k,ht)|0,i=(i=i+Math.imul(k,lt)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,lt)|0;var Ct=(c+(n=n+Math.imul(E,dt)|0)|0)+((8191&(i=(i=i+Math.imul(E,gt)|0)+Math.imul(S,dt)|0))<<13)|0;c=((o=o+Math.imul(S,gt)|0)+(i>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,n=Math.imul(L,rt),i=(i=Math.imul(L,nt))+Math.imul(D,rt)|0,o=Math.imul(D,nt),n=n+Math.imul(N,ot)|0,i=(i=i+Math.imul(N,st)|0)+Math.imul(U,ot)|0,o=o+Math.imul(U,st)|0,n=n+Math.imul(P,ut)|0,i=(i=i+Math.imul(P,ct)|0)+Math.imul(B,ut)|0,o=o+Math.imul(B,ct)|0,n=n+Math.imul(C,ht)|0,i=(i=i+Math.imul(C,lt)|0)+Math.imul(T,ht)|0,o=o+Math.imul(T,lt)|0;var Tt=(c+(n=n+Math.imul(k,dt)|0)|0)+((8191&(i=(i=i+Math.imul(k,gt)|0)+Math.imul(x,dt)|0))<<13)|0;c=((o=o+Math.imul(x,gt)|0)+(i>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,n=Math.imul(L,ot),i=(i=Math.imul(L,st))+Math.imul(D,ot)|0,o=Math.imul(D,st),n=n+Math.imul(N,ut)|0,i=(i=i+Math.imul(N,ct)|0)+Math.imul(U,ut)|0,o=o+Math.imul(U,ct)|0,n=n+Math.imul(P,ht)|0,i=(i=i+Math.imul(P,lt)|0)+Math.imul(B,ht)|0,o=o+Math.imul(B,lt)|0;var Ot=(c+(n=n+Math.imul(C,dt)|0)|0)+((8191&(i=(i=i+Math.imul(C,gt)|0)+Math.imul(T,dt)|0))<<13)|0;c=((o=o+Math.imul(T,gt)|0)+(i>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,n=Math.imul(L,ut),i=(i=Math.imul(L,ct))+Math.imul(D,ut)|0,o=Math.imul(D,ct),n=n+Math.imul(N,ht)|0,i=(i=i+Math.imul(N,lt)|0)+Math.imul(U,ht)|0,o=o+Math.imul(U,lt)|0;var Pt=(c+(n=n+Math.imul(P,dt)|0)|0)+((8191&(i=(i=i+Math.imul(P,gt)|0)+Math.imul(B,dt)|0))<<13)|0;c=((o=o+Math.imul(B,gt)|0)+(i>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,n=Math.imul(L,ht),i=(i=Math.imul(L,lt))+Math.imul(D,ht)|0,o=Math.imul(D,lt);var Bt=(c+(n=n+Math.imul(N,dt)|0)|0)+((8191&(i=(i=i+Math.imul(N,gt)|0)+Math.imul(U,dt)|0))<<13)|0;c=((o=o+Math.imul(U,gt)|0)+(i>>>13)|0)+(Bt>>>26)|0,Bt&=67108863;var Rt=(c+(n=Math.imul(L,dt))|0)+((8191&(i=(i=Math.imul(L,gt))+Math.imul(D,dt)|0))<<13)|0;return c=((o=Math.imul(D,gt))+(i>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,u[0]=yt,u[1]=bt,u[2]=mt,u[3]=vt,u[4]=wt,u[5]=_t,u[6]=At,u[7]=Et,u[8]=St,u[9]=It,u[10]=kt,u[11]=xt,u[12]=Mt,u[13]=Ct,u[14]=Tt,u[15]=Ot,u[16]=Pt,u[17]=Bt,u[18]=Rt,0!==c&&(u[19]=c,r.length++),r};function b(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,e.length-1),c=Math.max(0,o-t.length+1);c<=u;c++){var f=o-c,h=(0|t.words[f])*(0|e.words[c]),l=67108863&h;a=67108863&(l=l+a|0),i+=(s=(s=s+(h/67108864|0)|0)+(l>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function m(t,e,r){return b(t,e,r)}function v(t,e){this.x=t,this.y=e}Math.imul||(y=g),o.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?y(this,t,e):r<63?g(this,t,e):r<1024?b(this,t,e):m(this,t,e)},v.prototype.makeRBT=function(t){for(var e=new Array(t),r=o.prototype._countBits(t)-1,n=0;n<t;n++)e[n]=this.revBin(n,r,t);return e},v.prototype.revBin=function(t,e,r){if(0===t||t===r-1)return t;for(var n=0,i=0;i<e;i++)n|=(1&t)<<e-i-1,t>>=1;return n},v.prototype.permute=function(t,e,r,n,i,o){for(var s=0;s<o;s++)n[s]=e[t[s]],i[s]=r[t[s]]},v.prototype.transform=function(t,e,r,n,i,o){this.permute(o,t,e,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),f=0;f<i;f+=a)for(var h=u,l=c,p=0;p<s;p++){var d=r[f+p],g=n[f+p],y=r[f+p+s],b=n[f+p+s],m=h*y-l*b;b=h*b+l*y,y=m,r[f+p]=d+y,n[f+p]=g+b,r[f+p+s]=d-y,n[f+p+s]=g-b,p!==a&&(m=u*h-c*l,l=u*l+c*h,h=m)}},v.prototype.guessLen13b=function(t,e){var r=1|Math.max(e,t),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(t,e,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=t[n];t[n]=t[r-n-1],t[r-n-1]=i,i=e[n],e[n]=-e[r-n-1],e[r-n-1]=-i}},v.prototype.normalize13b=function(t,e){for(var r=0,n=0;n<e/2;n++){var i=8192*Math.round(t[2*n+1]/e)+Math.round(t[2*n]/e)+r;t[n]=67108863&i,r=i<67108864?0:i/67108864|0}return t},v.prototype.convert13b=function(t,e,r,i){for(var o=0,s=0;s<e;s++)o+=0|t[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*e;s<i;++s)r[s]=0;n(0===o),n(0==(-8192&o))},v.prototype.stub=function(t){for(var e=new Array(t),r=0;r<t;r++)e[r]=0;return e},v.prototype.mulp=function(t,e,r){var n=2*this.guessLen13b(t.length,e.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),f=new Array(n),h=new Array(n),l=r.words;l.length=n,this.convert13b(t.words,t.length,s,n),this.convert13b(e.words,e.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,f,h,n,i);for(var p=0;p<n;p++){var d=a[p]*f[p]-u[p]*h[p];u[p]=a[p]*h[p]+u[p]*f[p],a[p]=d}return this.conjugate(a,u,n),this.transform(a,u,l,o,n,i),this.conjugate(l,o,n),this.normalize13b(l,n),r.negative=t.negative^e.negative,r.length=t.length+e.length,r._strip()},o.prototype.mul=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},o.prototype.mulf=function(t){var e=new o(null);return e.words=new Array(this.length+t.length),m(this,t,e)},o.prototype.imul=function(t){return this.clone().mulTo(t,this)},o.prototype.imuln=function(t){var e=t<0;e&&(t=-t),n("number"==typeof t),n(t<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*t,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),e?this.ineg():this},o.prototype.muln=function(t){return this.clone().imuln(t)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r<e.length;r++){var n=r/26|0,i=r%26;e[r]=t.words[n]>>>i&1}return e}(t);if(0===e.length)return new o(1);for(var r=this,n=0;n<e.length&&0===e[n];n++,r=r.sqr());if(++n<e.length)for(var i=r.sqr();n<e.length;n++,i=i.sqr())0!==e[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(t){n("number"==typeof t&&t>=0);var e,r=t%26,i=(t-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(e=0;e<this.length;e++){var a=this.words[e]&o,u=(0|this.words[e])-a<<r;this.words[e]=u|s,s=a>>>26-r}s&&(this.words[e]=s,this.length++)}if(0!==i){for(e=this.length-1;e>=0;e--)this.words[e+i]=this.words[e];for(e=0;e<i;e++)this.words[e]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(t){return n(0===this.negative),this.iushln(t)},o.prototype.iushrn=function(t,e,r){var i;n("number"==typeof t&&t>=0),i=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var f=0;for(c=this.length-1;c>=0&&(0!==f||c>=i);c--){var h=0|this.words[c];this.words[c]=f<<26-o|h>>>o,f=h&a}return u&&0!==f&&(u.words[u.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(t,e,r){return n(0===this.negative),this.iushrn(t,e,r)},o.prototype.shln=function(t){return this.clone().ishln(t)},o.prototype.ushln=function(t){return this.clone().iushln(t)},o.prototype.shrn=function(t){return this.clone().ishrn(t)},o.prototype.ushrn=function(t){return this.clone().iushrn(t)},o.prototype.testn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26,i=1<<e;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(t){n("number"==typeof t&&t>=0);var e=t%26,r=(t-e)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==e&&r++,this.length=Math.min(r,this.length),0!==e){var i=67108863^67108863>>>e<<e;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(t){return this.clone().imaskn(t)},o.prototype.iaddn=function(t){return n("number"==typeof t),n(t<67108864),t<0?this.isubn(-t):0!==this.negative?1===this.length&&(0|this.words[0])<=t?(this.words[0]=t-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(t),this.negative=1,this):this._iaddn(t)},o.prototype._iaddn=function(t){this.words[0]+=t;for(var e=0;e<this.length&&this.words[e]>=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},o.prototype.isubn=function(t){if(n("number"==typeof t),n(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e<this.length&&this.words[e]<0;e++)this.words[e]+=67108864,this.words[e+1]-=1;return this._strip()},o.prototype.addn=function(t){return this.clone().iaddn(t)},o.prototype.subn=function(t){return this.clone().isubn(t)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(t,e,r){var i,o,s=t.length+r;this._expand(s);var a=0;for(i=0;i<t.length;i++){o=(0|this.words[i+r])+a;var u=(0|t.words[i])*e;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(t,e){var r=(this.length,t.length),n=this.clone(),i=t,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==e){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var f=n.clone()._ishlnsubmul(i,1,u);0===f.negative&&(n=f,a&&(a.words[u]=1));for(var h=u-1;h>=0;h--){var l=67108864*(0|n.words[i.length+h])+(0|n.words[i.length+h-1]);for(l=Math.min(l/s|0,67108863),n._ishlnsubmul(i,l,h);0!==n.negative;)l--,n.negative=0,n._ishlnsubmul(i,1,h),n.isZero()||(n.negative^=1);a&&(a.words[h]=l)}return a&&a._strip(),n._strip(),"div"!==e&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(t,e,r){return n(!t.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(i=a.div.neg()),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(t)),{div:i,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(i=a.div.neg()),{div:i,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new o(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new o(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new o(this.modrn(t.words[0]))}:this._wordDiv(t,e);var i,s,a},o.prototype.div=function(t){return this.divmod(t,"div",!1).div},o.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},o.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},o.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,n=t.ushrn(1),i=t.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},o.prototype.modrn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=(1<<26)%t,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%t;return e?-i:i},o.prototype.modn=function(t){return this.modrn(t)},o.prototype.idivn=function(t){var e=t<0;e&&(t=-t),n(t<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/t|0,r=o%t}return this._strip(),e?this.ineg():this},o.prototype.divn=function(t){return this.clone().idivn(t)},o.prototype.egcd=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;e.isEven()&&r.isEven();)e.iushrn(1),r.iushrn(1),++c;for(var f=r.clone(),h=e.clone();!e.isZero();){for(var l=0,p=1;0==(e.words[0]&p)&&l<26;++l,p<<=1);if(l>0)for(e.iushrn(l);l-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(f),s.isub(h)),i.iushrn(1),s.iushrn(1);for(var d=0,g=1;0==(r.words[0]&g)&&d<26;++d,g<<=1);if(d>0)for(r.iushrn(d);d-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(f),u.isub(h)),a.iushrn(1),u.iushrn(1);e.cmp(r)>=0?(e.isub(r),i.isub(a),s.isub(u)):(r.isub(e),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(t){n(0===t.negative),n(!t.isZero());var e=this,r=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();e.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,f=1;0==(e.words[0]&f)&&c<26;++c,f<<=1);if(c>0)for(e.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var h=0,l=1;0==(r.words[0]&l)&&h<26;++h,l<<=1);if(h>0)for(r.iushrn(h);h-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);e.cmp(r)>=0?(e.isub(r),s.isub(a)):(r.isub(e),a.isub(s))}return(i=0===e.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(t),i},o.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var n=0;e.isEven()&&r.isEven();n++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=e.cmp(r);if(i<0){var o=e;e=r,r=o}else if(0===i||0===r.cmpn(1))break;e.isub(r)}return r.iushln(n)},o.prototype.invm=function(t){return this.egcd(t).a.umod(t)},o.prototype.isEven=function(){return 0==(1&this.words[0])},o.prototype.isOdd=function(){return 1==(1&this.words[0])},o.prototype.andln=function(t){return this.words[0]&t},o.prototype.bincn=function(t){n("number"==typeof t);var e=t%26,r=(t-e)/26,i=1<<e;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(t){var e,r=t<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)e=1;else{r&&(t=-t),n(t<=67108863,"Number is too big");var i=0|this.words[0];e=i===t?0:i<t?-1:1}return 0!==this.negative?0|-e:e},o.prototype.cmp=function(t){if(0!==this.negative&&0===t.negative)return-1;if(0===this.negative&&0!==t.negative)return 1;var e=this.ucmp(t);return 0!==this.negative?0|-e:e},o.prototype.ucmp=function(t){if(this.length>t.length)return 1;if(this.length<t.length)return-1;for(var e=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|t.words[r];if(n!==i){n<i?e=-1:n>i&&(e=1);break}}return e},o.prototype.gtn=function(t){return 1===this.cmpn(t)},o.prototype.gt=function(t){return 1===this.cmp(t)},o.prototype.gten=function(t){return this.cmpn(t)>=0},o.prototype.gte=function(t){return this.cmp(t)>=0},o.prototype.ltn=function(t){return-1===this.cmpn(t)},o.prototype.lt=function(t){return-1===this.cmp(t)},o.prototype.lten=function(t){return this.cmpn(t)<=0},o.prototype.lte=function(t){return this.cmp(t)<=0},o.prototype.eqn=function(t){return 0===this.cmpn(t)},o.prototype.eq=function(t){return 0===this.cmp(t)},o.red=function(t){return new k(t)},o.prototype.toRed=function(t){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(t){return this.red=t,this},o.prototype.forceRed=function(t){return n(!this.red,"Already a number in reduction context"),this._forceRed(t)},o.prototype.redAdd=function(t){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},o.prototype.redIAdd=function(t){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},o.prototype.redSub=function(t){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},o.prototype.redISub=function(t){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},o.prototype.redShl=function(t){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},o.prototype.redMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},o.prototype.redIMul=function(t){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(t){return n(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var w={k256:null,p224:null,p192:null,p25519:null};function _(t,e){this.name=t,this.p=new o(e,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function E(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(t){if("string"==typeof t){var e=o._prime(t);this.m=e.p,this.prime=e}else n(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function x(t){k.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}_.prototype._tmp=function(){var t=new o(null);return t.words=new Array(Math.ceil(this.n/13)),t},_.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var n=e<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},_.prototype.split=function(t,e){t.iushrn(this.n,0,e)},_.prototype.imulK=function(t){return t.imul(this.k)},i(A,_),A.prototype.split=function(t,e){for(var r=4194303,n=Math.min(t.length,9),i=0;i<n;i++)e.words[i]=t.words[i];if(e.length=n,t.length<=9)return t.words[0]=0,void(t.length=1);var o=t.words[9];for(e.words[e.length++]=o&r,i=10;i<t.length;i++){var s=0|t.words[i];t.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,t.words[i-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},A.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r<t.length;r++){var n=0|t.words[r];e+=977*n,t.words[r]=67108863&e,e=64*n+(e/67108864|0)}return 0===t.words[t.length-1]&&(t.length--,0===t.words[t.length-1]&&t.length--),t},i(E,_),i(S,_),i(I,_),I.prototype.imulK=function(t){for(var e=0,r=0;r<t.length;r++){var n=19*(0|t.words[r])+e,i=67108863&n;n>>>=26,t.words[r]=i,e=n}return 0!==e&&(t.words[t.length++]=e),t},o._prime=function(t){if(w[t])return w[t];var e;if("k256"===t)e=new A;else if("p224"===t)e=new E;else if("p192"===t)e=new S;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new I}return w[t]=e,e},k.prototype._verify1=function(t){n(0===t.negative,"red works only with positives"),n(t.red,"red works only with red numbers")},k.prototype._verify2=function(t,e){n(0==(t.negative|e.negative),"red works only with positives"),n(t.red&&t.red===e.red,"red works only with red numbers")},k.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(f(t,t.umod(this.m)._forceRed(this)),t)},k.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},k.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},k.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},k.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},k.prototype.isqr=function(t){return this.imul(t,t.clone())},k.prototype.sqr=function(t){return this.mul(t,t)},k.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(n(e%2==1),3===e){var r=this.m.add(new o(1)).iushrn(2);return this.pow(t,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new o(2*f*f).toRed(this);0!==this.pow(f,c).cmp(u);)f.redIAdd(u);for(var h=this.pow(f,i),l=this.pow(t,i.addn(1).iushrn(1)),p=this.pow(t,i),d=s;0!==p.cmp(a);){for(var g=p,y=0;0!==g.cmp(a);y++)g=g.redSqr();n(y<d);var b=this.pow(h,new o(1).iushln(d-y-1));l=l.redMul(b),h=b.redSqr(),p=p.redMul(h),d=y}return l},k.prototype.invm=function(t){var e=t._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(t,e){if(e.isZero())return new o(1).toRed(this);if(0===e.cmpn(1))return t.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=t;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],t);var i=r[0],s=0,a=0,u=e.bitLength()%26;for(0===u&&(u=26),n=e.length-1;n>=0;n--){for(var c=e.words[n],f=u-1;f>=0;f--){var h=c>>f&1;i!==r[0]&&(i=this.sqr(i)),0!==h||0!==s?(s<<=1,s|=h,(4==++a||0===n&&0===f)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},k.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},o.mont=function(t){return new x(t)},i(x,k),x.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},x.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},x.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},x.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new o(0)._forceRed(this);var r=t.mul(e),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},x.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(t=r.nmd(t),this)},4859:t=>{"use strict";var e={};function r(t,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return"string"==typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function n(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o,s,a,u;if("string"==typeof e&&(o="not ",e.substr(0,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var c=("number"!=typeof u&&(u=0),u+".".length>(a=t).length||-1===a.indexOf(".",u)?"argument":"property");s='The "'.concat(t,'" ').concat(c," ").concat(i," ").concat(n(e,"type"))}return s+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},4791:(t,e,r)=>{"use strict";var n=r(4406),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=r(5799),s=r(4909);r(1285)(f,o);for(var a=i(s.prototype),u=0;u<a.length;u++){var c=a[u];f.prototype[c]||(f.prototype[c]=s.prototype[c])}function f(t){if(!(this instanceof f))return new f(t);o.call(this,t),s.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||n.nextTick(l,this)}function l(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},2622:(t,e,r)=>{"use strict";t.exports=i;var n=r(2607);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(1285)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},5799:(t,e,r)=>{"use strict";var n,i=r(4406);t.exports=I,I.ReadableState=S,r(2699).EventEmitter;var o,s=function(t,e){return t.listeners(e).length},a=r(711),u=r(8834).Buffer,c=r.g.Uint8Array||function(){},f=r(9415);o=f&&f.debuglog?f.debuglog("stream"):function(){};var h,l,p,d=r(872),g=r(119),y=r(6358).getHighWaterMark,b=r(4859).q,m=b.ERR_INVALID_ARG_TYPE,v=b.ERR_STREAM_PUSH_AFTER_EOF,w=b.ERR_METHOD_NOT_IMPLEMENTED,_=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(1285)(I,a);var A=g.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(t,e,i){n=n||r(4791),t=t||{},"boolean"!=typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=y(this,t,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(7563).s),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function I(t){if(n=n||r(4791),!(this instanceof I))return new I(t);var e=this instanceof n;this._readableState=new S(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function k(t,e,r,n,i){o("readableAddChunk",e);var s,a=t._readableState;if(null===e)a.reading=!1,function(t,e){if(o("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?T(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,O(t)))}}(t,a);else if(i||(s=function(t,e){var r,n;return n=e,u.isBuffer(n)||n instanceof c||"string"==typeof e||void 0===e||t.objectMode||(r=new m("chunk",["string","Buffer","Uint8Array"],e)),r}(a,e)),s)A(t,s);else if(a.objectMode||e&&e.length>0)if("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),n)a.endEmitted?A(t,new _):x(t,a,e,!0);else if(a.ended)A(t,new v);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?x(t,a,e,!1):P(t,a)):x(t,a,e,!1)}else n||(a.reading=!1,P(t,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function x(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&T(t)),P(t,e)}Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),I.prototype.destroy=g.destroy,I.prototype._undestroy=g.undestroy,I.prototype._destroy=function(t,e){e(t)},I.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=u.from(t,e),e=""),r=!0),k(this,t,e,!1,r)},I.prototype.unshift=function(t){return k(this,t,null,!0,!1)},I.prototype.isPaused=function(){return!1===this._readableState.flowing},I.prototype.setEncoding=function(t){h||(h=r(7563).s);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var M=1073741824;function C(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=M?t=M:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(t){var e=t._readableState;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(O,t))}function O(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,j(t)}function P(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(B,t,e))}function B(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(o("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function R(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function N(t){o("readable nexttick read 0"),t.read(0)}function U(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),j(t),e.flowing&&!e.reading&&t.read(0)}function j(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function L(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function D(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(F,e,t))}function F(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function q(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}I.prototype.read=function(t){o("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?D(this):T(this),null;if(0===(t=C(t,e))&&e.ended)return 0===e.length&&D(this),null;var n,i=e.needReadable;return o("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&o("length less than watermark",i=!0),e.ended||e.reading?o("reading or ended",i=!1):i&&(o("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=C(r,e))),null===(n=t>0?L(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&D(this)),null!==n&&this.emit("data",n),n},I.prototype._read=function(t){A(this,new w("_read()"))},I.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,e);var a=e&&!1===e.end||t===i.stdout||t===i.stderr?g:u;function u(){o("onend"),t.end()}n.endEmitted?i.nextTick(a):r.once("end",a),t.on("unpipe",(function e(i,s){o("onunpipe"),i===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,o("cleanup"),t.removeListener("close",p),t.removeListener("finish",d),t.removeListener("drain",c),t.removeListener("error",l),t.removeListener("unpipe",e),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",h),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}));var c=function(t){return function(){var e=t._readableState;o("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,j(t))}}(r);t.on("drain",c);var f=!1;function h(e){o("ondata");var i=t.write(e);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==q(n.pipes,t))&&!f&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function l(e){o("onerror",e),g(),t.removeListener("error",l),0===s(t,"error")&&A(t,e)}function p(){t.removeListener("finish",d),g()}function d(){o("onfinish"),t.removeListener("close",p),g()}function g(){o("unpipe"),r.unpipe(t)}return r.on("data",h),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events.error?Array.isArray(t._events.error)?t._events.error.unshift(r):t._events.error=[r,t._events.error]:t.on(e,r)}(t,"error",l),t.once("close",p),t.once("finish",d),t.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),t},I.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=q(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},I.prototype.on=function(t,e){var r=a.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?T(this):n.reading||i.nextTick(N,this))),r},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(t,e){var r=a.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(R,this),r},I.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(R,this),e},I.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(U,t,e))}(this,t)),t.paused=!1,this},I.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var s=0;s<E.length;s++)t.on(E[s],this.emit.bind(this,E[s]));return this._read=function(e){o("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(I.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=r(8061)),l(this)}),Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(I.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(I.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),I._fromList=L,Object.defineProperty(I.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(I.from=function(t,e){return void 0===p&&(p=r(7991)),p(I,t,e)})},2607:(t,e,r)=>{"use strict";t.exports=f;var n=r(4859).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(4791);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function f(t){if(!(this instanceof f))return new f(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(e,r){l(t,e,r)}))}function l(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(1285)(f,u),f.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},f.prototype._transform=function(t,e,r){r(new i("_transform()"))},f.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},f.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},f.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},4909:(t,e,r)=>{"use strict";var n,i=r(4406);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(undefined),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=I,I.WritableState=S;var s,a={deprecate:r(5803)},u=r(711),c=r(8834).Buffer,f=r.g.Uint8Array||function(){},h=r(119),l=r(6358).getHighWaterMark,p=r(4859).q,d=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,b=p.ERR_STREAM_CANNOT_PIPE,m=p.ERR_STREAM_DESTROYED,v=p.ERR_STREAM_NULL_VALUES,w=p.ERR_STREAM_WRITE_AFTER_END,_=p.ERR_UNKNOWN_ENCODING,A=h.errorOrDestroy;function E(){}function S(t,e,s){n=n||r(4791),t=t||{},"boolean"!=typeof s&&(s=e instanceof n),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=l(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new y;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,o){--e.pendingcb,r?(i.nextTick(o,n),i.nextTick(O,t,e),t._writableState.errorEmitted=!0,A(t,n)):(o(n),t._writableState.errorEmitted=!0,A(t,n),O(t,e))}(t,r,n,e,o);else{var s=C(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||M(t,r),n?i.nextTick(x,t,r,s,o):x(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function I(t){var e=this instanceof(n=n||r(4791));if(!e&&!s.call(I,this))return new I(t);this._writableState=new S(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),u.call(this)}function k(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new m("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function x(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),O(t,e)}function M(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,k(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,h=r.callback;if(k(t,e,!1,e.objectMode?1:c.length,c,f,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function C(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function T(t,e){t._final((function(r){e.pendingcb--,r&&A(t,r),e.prefinished=!0,t.emit("prefinish"),O(t,e)}))}function O(t,e){var r=C(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,i.nextTick(T,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}r(1285)(I,u),S.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(S.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(I,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===I&&t&&t._writableState instanceof S}})):s=function(t){return t instanceof this},I.prototype.pipe=function(){A(this,new b)},I.prototype.write=function(t,e,r){var n,o=this._writableState,s=!1,a=!o.objectMode&&(n=t,c.isBuffer(n)||n instanceof f);return a&&!c.isBuffer(t)&&(t=function(t){return c.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=E),o.ending?function(t,e){var r=new w;A(t,r),i.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var o;return null===r?o=new v:"string"==typeof r||e.objectMode||(o=new d("chunk",["string","Buffer"],r)),!o||(A(t,o),i.nextTick(n,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=c.from(e,r)),e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else k(t,e,!1,a,n,i,o);return u}(this,o,a,t,e,r)),s},I.prototype.cork=function(){this._writableState.corked++},I.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||M(this,t))},I.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),I.prototype._write=function(t,e,r){r(new g("_write()"))},I.prototype._writev=null,I.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,O(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),I.prototype.destroy=h.destroy,I.prototype._undestroy=h.undestroy,I.prototype._destroy=function(t,e){e(t)}},8061:(t,e,r)=>{"use strict";var n,i=r(4406);function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(68),a=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),f=Symbol("ended"),h=Symbol("lastPromise"),l=Symbol("handlePromise"),p=Symbol("stream");function d(t,e){return{value:t,done:e}}function g(t){var e=t[a];if(null!==e){var r=t[p].read();null!==r&&(t[h]=null,t[a]=null,t[u]=null,e(d(r,!1)))}}function y(t){i.nextTick(g,t)}var b=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((o(n={get stream(){return this[p]},next:function(){var t=this,e=this[c];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(d(void 0,!0));if(this[p].destroyed)return new Promise((function(e,r){i.nextTick((function(){t[c]?r(t[c]):e(d(void 0,!0))}))}));var r,n=this[h];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[f]?r(d(void 0,!0)):e[l](r,n)}),n)}}(n,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(d(o,!1));r=new Promise(this[l])}return this[h]=r,r}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var t=this;return new Promise((function(e,r){t[p].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),b);t.exports=function(t){var e,r=Object.create(m,(o(e={},p,{value:t,writable:!0}),o(e,a,{value:null,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,c,{value:null,writable:!0}),o(e,f,{value:t._readableState.endEmitted,writable:!0}),o(e,l,{value:function(t,e){var n=r[p].read();n?(r[h]=null,r[a]=null,r[u]=null,t(d(n,!1))):(r[a]=t,r[u]=e)},writable:!0}),e));return r[h]=null,s(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[u];return null!==e&&(r[h]=null,r[a]=null,r[u]=null,e(t)),void(r[c]=t)}var n=r[a];null!==n&&(r[h]=null,r[a]=null,r[u]=null,n(d(void 0,!0))),r[f]=!0})),t.on("readable",y.bind(null,r)),r}},872:(t,e,r)=>{"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(8834).Buffer,a=r(7464).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r;return e=t,r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}],r&&o(e.prototype,r),t}()},119:(t,e,r)=>{"use strict";var n=r(4406);function i(t,e){s(t,e),o(t)}function o(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function s(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(s,this,t)):n.nextTick(s,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e?(n.nextTick(o,r),e(t)):n.nextTick(o,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}},68:(t,e,r)=>{"use strict";var n=r(4859).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||f()},c=e._writableState&&e._writableState.finished,f=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,l=function(){s=!1,h=!0,a||o.call(e)},p=function(t){o.call(e,t)},d=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",f)};return function(t){return t.setHeader&&"function"==typeof t.abort}(e)?(e.on("complete",f),e.on("abort",d),e.req?g():e.on("request",g)):a&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",l),e.on("finish",f),!1!==r.error&&e.on("error",p),e.on("close",d),function(){e.removeListener("complete",f),e.removeListener("abort",d),e.removeListener("request",g),e.req&&e.req.removeListener("finish",f),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",f),e.removeListener("end",l),e.removeListener("error",p),e.removeListener("close",d)}}},7991:t=>{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},4467:(t,e,r)=>{"use strict";var n,i=r(4859).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(68)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function f(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(f)}},6358:(t,e,r)=>{"use strict";var n=r(4859).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},711:(t,e,r)=>{t.exports=r(2699).EventEmitter},5543:(t,e,r)=>{(e=t.exports=r(5799)).Stream=e,e.Readable=e,e.Writable=r(4909),e.Duplex=r(4791),e.Transform=r(2607),e.PassThrough=r(2622),e.finished=r(68),e.pipeline=r(4467)},7563:(t,e,r)=>{"use strict";var n=r(7834).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=f,this.end=h,e=3;break;default:return this.write=l,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(e[n]))>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(e[n]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},7022:(t,e,r)=>{var n=r(8166);t.exports=n("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz")},8616:(t,e,r)=>{"use strict";var n=r(7022),i=r(7834).Buffer;t.exports=function(t){function e(e){var r=e.slice(0,-4),n=e.slice(-4),i=t(r);if(!(n[0]^i[0]|n[1]^i[1]|n[2]^i[2]|n[3]^i[3]))return r}return{encode:function(e){var r=t(e);return n.encode(i.concat([e,r],e.length+4))},decode:function(t){var r=e(n.decode(t));if(!r)throw new Error("Invalid checksum");return r},decodeUnsafe:function(t){var r=n.decodeUnsafe(t);if(r)return e(r)}}}},4075:(t,e,r)=>{"use strict";var n=r(6162),i=r(8616);t.exports=i((function(t){var e=n("sha256").update(t).digest();return n("sha256").update(e).digest()}))},2833:(t,e,r)=>{"use strict";var n=r(8834).Buffer;t.exports=function(t,e){if(!n.isBuffer(t)||!n.isBuffer(e))throw new TypeError("Arguments must be Buffers");if(t===e)return!0;if("function"==typeof t.equals)return t.equals(e);if(t.length!==e.length)return!1;for(var r=0;r<t.length;r++)if(t[r]!==e[r])return!1;return!0}},1313:(t,e,r)=>{var n=r(8834).Buffer;t.exports=function(t,e){for(var r=Math.min(t.length,e.length),i=new n(r),o=0;o<r;++o)i[o]=t[o]^e[o];return i}},8834:(t,e,r)=>{"use strict";var n=r(5766),i=r(2333),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=u,e.SlowBuffer=function(t){return+t!=t&&(t=0),u.alloc(+t)},e.INSPECT_MAX_BYTES=50;var s=2147483647;function a(t){if(t>s)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return Object.setPrototypeOf(e,u.prototype),e}function u(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return h(t)}return c(t,e,r)}function c(t,e,r){if("string"==typeof t)return function(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!u.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|g(t,e),n=a(r),i=n.write(t,e);return i!==r&&(n=n.slice(0,i)),n}(t,e);if(ArrayBuffer.isView(t))return function(t){if(q(t,Uint8Array)){var e=new Uint8Array(t);return p(e.buffer,e.byteOffset,e.byteLength)}return l(t)}(t);if(null==t)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(q(t,ArrayBuffer)||t&&q(t.buffer,ArrayBuffer))return p(t,e,r);if("undefined"!=typeof SharedArrayBuffer&&(q(t,SharedArrayBuffer)||t&&q(t.buffer,SharedArrayBuffer)))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var n=t.valueOf&&t.valueOf();if(null!=n&&n!==t)return u.from(n,e,r);var i=function(t){if(u.isBuffer(t)){var e=0|d(t.length),r=a(e);return 0===r.length||t.copy(r,0,0,e),r}return void 0!==t.length?"number"!=typeof t.length||H(t.length)?a(0):l(t):"Buffer"===t.type&&Array.isArray(t.data)?l(t.data):void 0}(t);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return u.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function h(t){return f(t),a(t<0?0:0|d(t))}function l(t){for(var e=t.length<0?0:0|d(t.length),r=a(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function p(t,e,r){if(e<0||t.byteLength<e)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<e+(r||0))throw new RangeError('"length" is outside of buffer bounds');var n;return n=void 0===e&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,e):new Uint8Array(t,e,r),Object.setPrototypeOf(n,u.prototype),n}function d(t){if(t>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|t}function g(t,e){if(u.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||q(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return L(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return D(t).length;default:if(i)return n?-1:L(t).length;e=(""+e).toLowerCase(),i=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return k(this,e,r);case"ascii":return M(this,e,r);case"latin1":case"binary":return C(this,e,r);case"base64":return I(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return O(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function b(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function m(t,e,r,n,i){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),H(r=+r)&&(r=i?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(i)return-1;r=t.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:v(t,e,r,n,i);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):v(t,[e],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var h=!0,l=0;l<u;l++)if(c(t,o+l)!==c(e,l)){h=!1;break}if(h)return o}return-1}function w(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(H(a))return s;t[r+s]=a}return s}function _(t,e,r,n){return F(L(e,t.length-r),t,r,n)}function A(t,e,r,n){return F(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function E(t,e,r,n){return F(D(e),t,r,n)}function S(t,e,r,n){return F(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=(r=t.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function I(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function k(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,c=t[i],f=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,h=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=h}return function(t){var e=t.length;if(e<=x)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=x));return r}(n)}e.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1),e={foo:function(){return 42}};return Object.setPrototypeOf(e,Uint8Array.prototype),Object.setPrototypeOf(t,e),42===t.foo()}catch(t){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(t,e,r){return c(t,e,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(t,e,r){return function(t,e,r){return f(t),t<=0?a(t):void 0!==e?"string"==typeof r?a(t).fill(e,r):a(t).fill(e):a(t)}(t,e,r)},u.allocUnsafe=function(t){return h(t)},u.allocUnsafeSlow=function(t){return h(t)},u.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==u.prototype},u.compare=function(t,e){if(q(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),q(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(t)||!u.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,n=e.length,i=0,o=Math.min(r,n);i<o;++i)if(t[i]!==e[i]){r=t[i],n=e[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(t,e){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return u.alloc(0);var r;if(void 0===e)for(e=0,r=0;r<t.length;++r)e+=t[r].length;var n=u.allocUnsafe(e),i=0;for(r=0;r<t.length;++r){var o=t[r];if(q(o,Uint8Array))i+o.length>n.length?u.from(o).copy(n,i):Uint8Array.prototype.set.call(n,o,i);else{if(!u.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,i)}i+=o.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)b(this,e,e+1);return this},u.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)b(this,e,e+3),b(this,e+1,e+2);return this},u.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)b(this,e,e+7),b(this,e+1,e+6),b(this,e+2,e+5),b(this,e+3,e+4);return this},u.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?k(this,0,t):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(t){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===u.compare(this,t)},u.prototype.inspect=function(){var t="",r=e.INSPECT_MAX_BYTES;return t=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(t+=" ... "),"<Buffer "+t+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(t,e,r,n,i){if(q(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),e<0||r>t.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&e>=r)return 0;if(n>=i)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),c=this.slice(n,i),f=t.slice(e,r),h=0;h<a;++h)if(c[h]!==f[h]){o=c[h],s=f[h];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},u.prototype.indexOf=function(t,e,r){return m(this,t,e,r,!0)},u.prototype.lastIndexOf=function(t,e,r){return m(this,t,e,r,!1)},u.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return w(this,t,e,r);case"utf8":case"utf-8":return _(this,t,e,r);case"ascii":case"latin1":case"binary":return A(this,t,e,r);case"base64":return E(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function M(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function C(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function T(t,e,r){var n=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=e;o<r;++o)i+=K[t[o]];return i}function O(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length-1;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function P(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function B(t,e,r,n,i,o){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>i||e<o)throw new RangeError('"value" argument is out of bounds');if(r+n>t.length)throw new RangeError("Index out of range")}function R(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function N(t,e,r,n,o){return e=+e,r>>>=0,o||R(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function U(t,e,r,n,o){return e=+e,r>>>=0,o||R(t,0,r,8),i.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e<t&&(e=t);var n=this.subarray(t,e);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),this[t]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(t,e){return t>>>=0,e||P(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||P(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},u.prototype.readInt8=function(t,e){return t>>>=0,e||P(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){t>>>=0,e||P(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){t>>>=0,e||P(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return t>>>=0,e||P(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return t>>>=0,e||P(t,4,this.length),i.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return t>>>=0,e||P(t,4,this.length),i.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return t>>>=0,e||P(t,8,this.length),i.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return t>>>=0,e||P(t,8,this.length),i.read(this,t,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||B(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||B(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,1,255,0),this[e]=255&t,e+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);B(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||B(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},u.prototype.writeFloatLE=function(t,e,r){return N(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return N(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return U(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return U(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(!u.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===t.length||0===this.length)return 0;if(e<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e<n-r&&(n=t.length-e+r);var i=n-r;return this===t&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(e,r,n):Uint8Array.prototype.set.call(t,this.subarray(r,n),e),i},u.prototype.fill=function(t,e,r,n){if("string"==typeof t){if("string"==typeof e?(n=e,e=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===t.length){var i=t.charCodeAt(0);("utf8"===n&&i<128||"latin1"===n)&&(t=i)}}else"number"==typeof t?t&=255:"boolean"==typeof t&&(t=Number(t));if(e<0||this.length<e||this.length<r)throw new RangeError("Out of range index");if(r<=e)return this;var o;if(e>>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o<r;++o)this[o]=t;else{var s=u.isBuffer(t)?t:u.from(t,n),a=s.length;if(0===a)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(o=0;o<r-e;++o)this[o+e]=s[o%a]}return this};var j=/[^+/0-9A-Za-z-_]/g;function L(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function D(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(j,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function F(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function q(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function H(t){return t!=t}var K=function(){for(var t="0123456789abcdef",e=new Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)e[n+i]=t[r]+t[i];return e}()},2680:(t,e,r)=>{"use strict";var n=r(7286),i=r(9429),o=i(n("String.prototype.indexOf"));t.exports=function(t,e){var r=n(t,!!e);return"function"==typeof r&&o(t,".prototype.")>-1?i(r):r}},9429:(t,e,r)=>{"use strict";var n=r(4090),i=r(7286),o=i("%Function.prototype.apply%"),s=i("%Function.prototype.call%"),a=i("%Reflect.apply%",!0)||n.call(s,o),u=i("%Object.getOwnPropertyDescriptor%",!0),c=i("%Object.defineProperty%",!0),f=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){var e=a(n,s,arguments);if(u&&c){var r=u(e,"length");r.configurable&&c(e,"length",{value:1+f(0,t.length-(arguments.length-1))})}return e};var h=function(){return a(n,o,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},2214:(t,e,r)=>{"use strict";for(var n=r(5948),i="qpzry9x8gf2tvdw0s3jn54khce6mua7l",o={},s=0;s<i.length;s++){var a=i.charAt(s);if(void 0!==o[a])throw new TypeError(a+" is ambiguous");o[a]=s}function u(t){var e=t.shiftRight(35),r=n.fromHex("07ffffffff"),i=t.and(r).shiftLeft(new n("5"));return e.and(new n("1")).intValue()>0&&(i=i.xor(n.fromHex("98f2bc8e61"))),e.and(new n("2")).intValue()&&(i=i.xor(n.fromHex("79b76d99e2"))),e.and(new n("4")).intValue()&&(i=i.xor(n.fromHex("f33e5fb3c4"))),e.and(new n("8")).intValue()&&(i=i.xor(n.fromHex("ae2eabe2a8"))),e.and(new n("16")).intValue()&&(i=i.xor(n.fromHex("1e4f43e470"))),i}function c(t){for(var e=new n("1"),r=0;r<t.length;++r){var i=t.charCodeAt(r),o=new n(""+(31&i));e=u(e).xor(o)}return u(e)}function f(t,e,r,n){for(var i=0,o=0,s=(1<<r)-1,a=[],u=0;u<t.length;++u)for(i=i<<e|t[u],o+=e;o>=r;)o-=r,a.push(i>>>o&s);if(n)o>0&&a.push(i<<r-o&s);else{if(o>=e)throw new Error("Excess padding");if(i<<r-o&s)throw new Error("Non-zero padding")}return a}t.exports={decode:function(t){if(t.length<8)throw new TypeError(t+" too short");if(t.length>90)throw new TypeError(t+" too long");var e=t.toLowerCase(),r=t.toUpperCase();if(t!==e&&t!==r)throw new Error("Mixed-case string "+t);var i=(t=e).lastIndexOf(":");if(-1===i)throw new Error("No separator character for "+t);if(0===i)throw new Error("Missing prefix for "+t);var s=t.slice(0,i),a=t.slice(i+1);if(a.length<6)throw new Error("Data too short");for(var f=c(s),h=[],l=0;l<a.length;++l){var p=a.charAt(l),d=o[p];if(void 0===d)throw new Error("Unknown character "+p);f=u(f).xor(new n(""+d)),l+8>=a.length||h.push(d)}if("1"!==f.toString(10))throw new Error("Invalid checksum for "+t);return{prefix:s,words:h}},encode:function(t,e){if(t.length+8+1+e.length>90)throw new TypeError("Exceeds Base32 maximum length");for(var r=c(t=t.toLowerCase()),o=t+":",s=0;s<e.length;++s){var a=e[s];if(a>>>5!=0)throw new Error("Non 5-bit word");r=u(r).xor(new n(""+a)),o+=i.charAt(a)}for(var f=0;f<8;++f)r=u(r);r=r.xor(new n("1"));for(var h=0;h<8;++h){var l=5*(7-h),p=r.shiftRight(new n(""+l)).and(n.fromHex("1f"));o+=i.charAt(p.toString(10))}return o},toWords:function(t){return f(t,8,5,!0)},fromWords:function(t){return f(t,5,8,!1)}}},8586:(t,e,r)=>{"use strict";var n=r(8834).Buffer,i=r(2214),o="scripthash",s="pubkeyhash",a={160:0,192:1,224:2,256:3,320:4,384:5,448:6,512:7},u={};function c(t,e){for(var r=Object.keys(t),n=0;n<r.length;n++)if(t[r[n]]===e)return r[n];return null}u[s]=0,u[o]=1,t.exports={decode:function(t){var e=i.decode(t),r=i.fromWords(e.words);if(r.length<1)throw new Error("Empty payload in address");var f=function(t){var e=t>>>7;if(1&e||e>0)throw new Error("Invalid version, most significant bit is reserved");var r=c(u,t>>3&15);if(null===r)throw new Error("Invalid script type");var n=parseInt(c(a,7&t),10);if((r===s||r===o)&&160!==n)throw new Error("Mismatch between script type and hash length");return{scriptType:r,hashSize:n}}(r[0]);if(1+f.hashSize/8!==r.length)throw new Error("Hash length does not match version");return{version:f.scriptType,prefix:e.prefix,hash:n.from(r.slice(1))}},encode:function(t,e,r){if(!(r instanceof n))throw new Error("Hash should be passed as a Buffer");if(!(e in u))throw new Error("Unsupported script type");return i.encode(t,i.toWords(function(t,e){var r=function(t,e){if((t===s||t===o)&&160!==e)throw new Error("Invalid hash length for scriptType");return u[t]<<3|a[e]}(t,8*e.length),i=n.allocUnsafe(1+e.length);return i.writeUInt8(r,0),e.copy(i,1),i}(e,r)))}}},3973:(t,e,r)=>{var n=r(7834).Buffer,i=r(4851).Transform,o=r(3974).s;function s(t){i.call(this),this.hashMode="string"==typeof t,this.hashMode?this[t]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(1285)(s,i),s.prototype.update=function(t,e,r){"string"==typeof t&&(t=n.from(t,e));var i=this._update(t);return this.hashMode?this:(r&&(i=this._toString(i,r)),i)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(t,e,r){var n;try{this.hashMode?this._update(t):this.push(this._update(t))}catch(t){n=t}finally{r(n)}},s.prototype._flush=function(t){var e;try{this.push(this.__final())}catch(t){e=t}t(e)},s.prototype._finalOrDigest=function(t){var e=this.__final()||n.alloc(0);return t&&(e=this._toString(e,t,!0)),e},s.prototype._toString=function(t,e,r){if(this._decoder||(this._decoder=new o(e),this._encoding=e),this._encoding!==e)throw new Error("can't switch encodings");var n=this._decoder.write(t);return r&&(n+=this._decoder.end()),n},t.exports=s},7582:t=>{function e(t){if(t)return function(t){for(var r in e.prototype)t[r]=e.prototype[r];return t}(t)}t.exports=e,e.prototype.on=e.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},e.prototype.once=function(t,e){function r(){this.off(t,r),e.apply(this,arguments)}return r.fn=e,this.on(t,r),this},e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=e.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var r,n=this._callbacks["$"+t];if(!n)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var i=0;i<n.length;i++)if((r=n[i])===e||r.fn===e){n.splice(i,1);break}return 0===n.length&&delete this._callbacks["$"+t],this},e.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),r=this._callbacks["$"+t],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(r){n=0;for(var i=(r=r.slice(0)).length;n<i;++n)r[n].apply(this,e)}return this},e.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},e.prototype.hasListeners=function(t){return!!this.listeners(t).length}},7646:(t,e,r)=>{function n(t){return Object.prototype.toString.call(t)}e.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"===n(t)},e.isBoolean=function(t){return"boolean"==typeof t},e.isNull=function(t){return null===t},e.isNullOrUndefined=function(t){return null==t},e.isNumber=function(t){return"number"==typeof t},e.isString=function(t){return"string"==typeof t},e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=function(t){return void 0===t},e.isRegExp=function(t){return"[object RegExp]"===n(t)},e.isObject=function(t){return"object"==typeof t&&null!==t},e.isDate=function(t){return"[object Date]"===n(t)},e.isError=function(t){return"[object Error]"===n(t)||t instanceof Error},e.isFunction=function(t){return"function"==typeof t},e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(8834).Buffer.isBuffer},5363:(t,e,r)=>{var n=r(8834).Buffer,i=r(7554),o=r(2197);t.exports=function(t){return new a(t)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(t){this.curveType=s[t],this.curveType||(this.curveType={name:t}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function u(t,e,r){Array.isArray(t)||(t=t.toArray());var i=new n(t);if(r&&i.length<r){var o=new n(r-i.length);o.fill(0),i=n.concat([o,i])}return e?i.toString(e):i}s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,a.prototype.generateKeys=function(t,e){return this.keys=this.curve.genKeyPair(),this.getPublicKey(t,e)},a.prototype.computeSecret=function(t,e,r){return e=e||"utf8",n.isBuffer(t)||(t=new n(t,e)),u(this.curve.keyFromPublic(t).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},a.prototype.getPublicKey=function(t,e){var r=this.keys.getPublic("compressed"===e,!0);return"hybrid"===e&&(r[r.length-1]%2?r[0]=7:r[0]=6),u(r,t)},a.prototype.getPrivateKey=function(t){return u(this.keys.getPrivate(),t)},a.prototype.setPublicKey=function(t,e){return e=e||"utf8",n.isBuffer(t)||(t=new n(t,e)),this.keys._importPublic(t),this},a.prototype.setPrivateKey=function(t,e){e=e||"utf8",n.isBuffer(t)||(t=new n(t,e));var r=new o(t);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}},6162:(t,e,r)=>{"use strict";var n=r(1285),i=r(7993),o=r(1445),s=r(9065),a=r(3973);function u(t){a.call(this,"digest"),this._hash=t}n(u,a),u.prototype._update=function(t){this._hash.update(t)},u.prototype._final=function(){return this._hash.digest()},t.exports=function(t){return"md5"===(t=t.toLowerCase())?new i:"rmd160"===t||"ripemd160"===t?new o:new u(s(t))}},2511:(t,e,r)=>{var n=r(7993);t.exports=function(t){return(new n).update(t).digest()}},11:(t,e,r)=>{"use strict";var n=r(1285),i=r(6456),o=r(3973),s=r(7834).Buffer,a=r(2511),u=r(1445),c=r(9065),f=s.alloc(128);function h(t,e){o.call(this,"digest"),"string"==typeof e&&(e=s.from(e));var r="sha512"===t||"sha384"===t?128:64;this._alg=t,this._key=e,e.length>r?e=("rmd160"===t?new u:c(t)).update(e).digest():e.length<r&&(e=s.concat([e,f],r));for(var n=this._ipad=s.allocUnsafe(r),i=this._opad=s.allocUnsafe(r),a=0;a<r;a++)n[a]=54^e[a],i[a]=92^e[a];this._hash="rmd160"===t?new u:c(t),this._hash.update(n)}n(h,o),h.prototype._update=function(t){this._hash.update(t)},h.prototype._final=function(){var t=this._hash.digest();return("rmd160"===this._alg?new u:c(this._alg)).update(this._opad).update(t).digest()},t.exports=function(t,e){return"rmd160"===(t=t.toLowerCase())||"ripemd160"===t?new h("rmd160",e):"md5"===t?new i(a,e):new h(t,e)}},6456:(t,e,r)=>{"use strict";var n=r(1285),i=r(7834).Buffer,o=r(3973),s=i.alloc(128),a=64;function u(t,e){o.call(this,"digest"),"string"==typeof e&&(e=i.from(e)),this._alg=t,this._key=e,e.length>a?e=t(e):e.length<a&&(e=i.concat([e,s],a));for(var r=this._ipad=i.allocUnsafe(a),n=this._opad=i.allocUnsafe(a),u=0;u<a;u++)r[u]=54^e[u],n[u]=92^e[u];this._hash=[r]}n(u,o),u.prototype._update=function(t){this._hash.push(t)},u.prototype._final=function(){var t=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,t]))},t.exports=u},5634:(t,e,r)=>{"use strict";e.randomBytes=e.rng=e.pseudoRandomBytes=e.prng=r(5003),e.createHash=e.Hash=r(6162),e.createHmac=e.Hmac=r(11);var n=r(4778),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);e.getHashes=function(){return o};var s=r(499);e.pbkdf2=s.pbkdf2,e.pbkdf2Sync=s.pbkdf2Sync;var a=r(3667);e.Cipher=a.Cipher,e.createCipher=a.createCipher,e.Cipheriv=a.Cipheriv,e.createCipheriv=a.createCipheriv,e.Decipher=a.Decipher,e.createDecipher=a.createDecipher,e.Decipheriv=a.Decipheriv,e.createDecipheriv=a.createDecipheriv,e.getCiphers=a.getCiphers,e.listCiphers=a.listCiphers;var u=r(7602);e.DiffieHellmanGroup=u.DiffieHellmanGroup,e.createDiffieHellmanGroup=u.createDiffieHellmanGroup,e.getDiffieHellman=u.getDiffieHellman,e.createDiffieHellman=u.createDiffieHellman,e.DiffieHellman=u.DiffieHellman;var c=r(5263);e.createSign=c.createSign,e.Sign=c.Sign,e.createVerify=c.createVerify,e.Verify=c.Verify,e.createECDH=r(5363);var f=r(8493);e.publicEncrypt=f.publicEncrypt,e.privateEncrypt=f.privateEncrypt,e.publicDecrypt=f.publicDecrypt,e.privateDecrypt=f.privateDecrypt;var h=r(9631);e.randomFill=h.randomFill,e.randomFillSync=h.randomFillSync,e.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},e.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},4926:(t,e,r)=>{"use strict";var n=r(3464),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=Object.defineProperty,u=a&&function(){var t={};try{for(var e in a(t,"x",{enumerable:!1,value:t}),t)return!1;return t.x===t}catch(t){return!1}}(),c=function(t,e,r,n){var i;(!(e in t)||"function"==typeof(i=n)&&"[object Function]"===o.call(i)&&n())&&(u?a(t,e,{configurable:!0,enumerable:!1,value:r,writable:!0}):t[e]=r)},f=function(t,e){var r=arguments.length>2?arguments[2]:{},o=n(e);i&&(o=s.call(o,Object.getOwnPropertySymbols(e)));for(var a=0;a<o.length;a+=1)c(t,o[a],e[o[a]],r[o[a]])};f.supportsDescriptors=!!u,t.exports=f},4387:(t,e,r)=>{"use strict";e.utils=r(4112),e.Cipher=r(3639),e.DES=r(4225),e.CBC=r(9692),e.EDE=r(4335)},9692:(t,e,r)=>{"use strict";var n=r(9561),i=r(1285),o={};function s(t){n.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e<this.iv.length;e++)this.iv[e]=t[e]}e.instantiate=function(t){function e(e){t.call(this,e),this._cbcInit()}i(e,t);for(var r=Object.keys(o),n=0;n<r.length;n++){var s=r[n];e.prototype[s]=o[s]}return e.create=function(t){return new e(t)},e},o._cbcInit=function(){var t=new s(this.options.iv);this._cbcState=t},o._update=function(t,e,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,s=i.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)s[a]^=t[e+a];for(o._update.call(this,s,0,r,n),a=0;a<this.blockSize;a++)s[a]=r[n+a]}else{for(o._update.call(this,t,e,r,n),a=0;a<this.blockSize;a++)r[n+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=t[e+a]}}},3639:(t,e,r)=>{"use strict";var n=r(9561);function i(t){this.options=t,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}t.exports=i,i.prototype._init=function(){},i.prototype.update=function(t){return 0===t.length?[]:"decrypt"===this.type?this._updateDecrypt(t):this._updateEncrypt(t)},i.prototype._buffer=function(t,e){for(var r=Math.min(this.buffer.length-this.bufferOff,t.length-e),n=0;n<r;n++)this.buffer[this.bufferOff+n]=t[e+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(t,e){return this._update(this.buffer,0,t,e),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(t){var e=0,r=0,n=(this.bufferOff+t.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(t,e),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=t.length-(t.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(t,e,i,r),r+=this.blockSize;for(;e<t.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=t[e];return i},i.prototype._updateDecrypt=function(t){for(var e=0,r=0,n=Math.ceil((this.bufferOff+t.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)e+=this._buffer(t,e),r+=this._flushBuffer(i,r);return e+=this._buffer(t,e),i},i.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},i.prototype._pad=function(t,e){if(0===e)return!1;for(;e<t.length;)t[e++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var t=new Array(this.blockSize);return this._update(this.buffer,0,t,0),t},i.prototype._unpad=function(t){return t},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var t=new Array(this.blockSize);return this._flushBuffer(t,0),this._unpad(t)}},4225:(t,e,r)=>{"use strict";var n=r(9561),i=r(1285),o=r(4112),s=r(3639);function a(){this.tmp=new Array(2),this.keys=null}function u(t){s.call(this,t);var e=new a;this._desState=e,this.deriveKeys(e,t.key)}i(u,s),t.exports=u,u.create=function(t){return new u(t)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(t,e){t.keys=new Array(32),n.equal(e.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(e,0),i=o.readUInt32BE(e,4);o.pc1(r,i,t.tmp,0),r=t.tmp[0],i=t.tmp[1];for(var s=0;s<t.keys.length;s+=2){var a=c[s>>>1];r=o.r28shl(r,a),i=o.r28shl(i,a),o.pc2(r,i,t.keys,s)}},u.prototype._update=function(t,e,r,n){var i=this._desState,s=o.readUInt32BE(t,e),a=o.readUInt32BE(t,e+4);o.ip(s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,s,a,i.tmp,0):this._decrypt(i,s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],o.writeUInt32BE(r,s,n),o.writeUInt32BE(r,a,n+4)},u.prototype._pad=function(t,e){for(var r=t.length-e,n=e;n<t.length;n++)t[n]=r;return!0},u.prototype._unpad=function(t){for(var e=t[t.length-1],r=t.length-e;r<t.length;r++)n.equal(t[r],e);return t.slice(0,t.length-e)},u.prototype._encrypt=function(t,e,r,n,i){for(var s=e,a=r,u=0;u<t.keys.length;u+=2){var c=t.keys[u],f=t.keys[u+1];o.expand(a,t.tmp,0),c^=t.tmp[0],f^=t.tmp[1];var h=o.substitute(c,f),l=a;a=(s^o.permute(h))>>>0,s=l}o.rip(a,s,n,i)},u.prototype._decrypt=function(t,e,r,n,i){for(var s=r,a=e,u=t.keys.length-2;u>=0;u-=2){var c=t.keys[u],f=t.keys[u+1];o.expand(s,t.tmp,0),c^=t.tmp[0],f^=t.tmp[1];var h=o.substitute(c,f),l=s;s=(a^o.permute(h))>>>0,a=l}o.rip(s,a,n,i)}},4335:(t,e,r)=>{"use strict";var n=r(9561),i=r(1285),o=r(3639),s=r(4225);function a(t,e){n.equal(e.length,24,"Invalid key length");var r=e.slice(0,8),i=e.slice(8,16),o=e.slice(16,24);this.ciphers="encrypt"===t?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}function u(t){o.call(this,t);var e=new a(this.type,this.options.key);this._edeState=e}i(u,o),t.exports=u,u.create=function(t){return new u(t)},u.prototype._update=function(t,e,r,n){var i=this._edeState;i.ciphers[0]._update(t,e,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},4112:(t,e)=>{"use strict";e.readUInt32BE=function(t,e){return(t[0+e]<<24|t[1+e]<<16|t[2+e]<<8|t[3+e])>>>0},e.writeUInt32BE=function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},e.ip=function(t,e,r,n){for(var i=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1}r[n+0]=i>>>0,r[n+1]=o>>>0},e.rip=function(t,e,r,n){for(var i=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)i<<=1,i|=e>>>a+s&1,i<<=1,i|=t>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=e>>>a+s&1,o<<=1,o|=t>>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.pc1=function(t,e,r,n){for(var i=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1}for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},e.r28shl=function(t,e){return t<<e&268435455|t>>>28-e};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];e.pc2=function(t,e,n,i){for(var o=0,s=0,a=r.length>>>1,u=0;u<a;u++)o<<=1,o|=t>>>r[u]&1;for(u=a;u<r.length;u++)s<<=1,s|=e>>>r[u]&1;n[i+0]=o>>>0,n[i+1]=s>>>0},e.expand=function(t,e,r){var n=0,i=0;n=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=t>>>o&63;for(o=11;o>=3;o-=4)i|=t>>>o&63,i<<=6;i|=(31&t)<<1|t>>>31,e[r+0]=n>>>0,e[r+1]=i>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];e.substitute=function(t,e){for(var r=0,i=0;i<4;i++)r<<=4,r|=n[64*i+(t>>>18-6*i&63)];for(i=0;i<4;i++)r<<=4,r|=n[256+64*i+(e>>>18-6*i&63)];return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];e.permute=function(t){for(var e=0,r=0;r<i.length;r++)e<<=1,e|=t>>>i[r]&1;return e>>>0},e.padSplit=function(t,e,r){for(var n=t.toString(2);n.length<e;)n="0"+n;for(var i=[],o=0;o<e;o+=r)i.push(n.slice(o,o+r));return i.join(" ")}},7602:(t,e,r)=>{var n=r(8834).Buffer,i=r(5329),o=r(3418),s=r(767),a={binary:!0,hex:!0,base64:!0};e.DiffieHellmanGroup=e.createDiffieHellmanGroup=e.getDiffieHellman=function(t){var e=new n(o[t].prime,"hex"),r=new n(o[t].gen,"hex");return new s(e,r)},e.createDiffieHellman=e.DiffieHellman=function t(e,r,o,u){return n.isBuffer(r)||void 0===a[r]?t(e,"binary",r,o):(r=r||"binary",u=u||"binary",o=o||new n([2]),n.isBuffer(o)||(o=new n(o,u)),"number"==typeof e?new s(i(e,o),o,!0):(n.isBuffer(e)||(e=new n(e,r)),new s(e,o,!0)))}},767:(t,e,r)=>{var n=r(8834).Buffer,i=r(2197),o=new(r(6676)),s=new i(24),a=new i(11),u=new i(10),c=new i(3),f=new i(7),h=r(5329),l=r(5003);function p(t,e){return e=e||"utf8",n.isBuffer(t)||(t=new n(t,e)),this._pub=new i(t),this}function d(t,e){return e=e||"utf8",n.isBuffer(t)||(t=new n(t,e)),this._priv=new i(t),this}t.exports=y;var g={};function y(t,e,r){this.setGenerator(e),this.__prime=new i(t),this._prime=i.mont(this.__prime),this._primeLen=t.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=p,this.setPrivateKey=d):this._primeCode=8}function b(t,e){var r=new n(t.toArray());return e?r.toString(e):r}Object.defineProperty(y.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,e){var r=e.toString("hex"),n=[r,t.toString(16)].join("_");if(n in g)return g[n];var i,l=0;if(t.isEven()||!h.simpleSieve||!h.fermatTest(t)||!o.test(t))return l+=1,l+="02"===r||"05"===r?8:4,g[n]=l,l;switch(o.test(t.shrn(1))||(l+=2),r){case"02":t.mod(s).cmp(a)&&(l+=8);break;case"05":(i=t.mod(u)).cmp(c)&&i.cmp(f)&&(l+=8);break;default:l+=4}return g[n]=l,l}(this.__prime,this.__gen)),this._primeCode}}),y.prototype.generateKeys=function(){return this._priv||(this._priv=new i(l(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},y.prototype.computeSecret=function(t){var e=(t=(t=new i(t)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new n(e.toArray()),o=this.getPrime();if(r.length<o.length){var s=new n(o.length-r.length);s.fill(0),r=n.concat([s,r])}return r},y.prototype.getPublicKey=function(t){return b(this._pub,t)},y.prototype.getPrivateKey=function(t){return b(this._priv,t)},y.prototype.getPrime=function(t){return b(this.__prime,t)},y.prototype.getGenerator=function(t){return b(this._gen,t)},y.prototype.setGenerator=function(t,e){return e=e||"utf8",n.isBuffer(t)||(t=new n(t,e)),this.__gen=t,this._gen=new i(t),this}},5329:(t,e,r)=>{var n=r(5003);t.exports=m,m.simpleSieve=y,m.fermatTest=b;var i=r(2197),o=new i(24),s=new(r(6676)),a=new i(1),u=new i(2),c=new i(5),f=(new i(16),new i(8),new i(10)),h=new i(3),l=(new i(7),new i(11)),p=new i(4),d=(new i(12),null);function g(){if(null!==d)return d;var t=[];t[0]=2;for(var e=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<e&&t[i]<=n&&r%t[i]!=0;i++);e!==i&&t[i]<=n||(t[e++]=r)}return d=t,t}function y(t){for(var e=g(),r=0;r<e.length;r++)if(0===t.modn(e[r]))return 0===t.cmpn(e[r]);return!0}function b(t){var e=i.mont(t);return 0===u.toRed(e).redPow(t.subn(1)).fromRed().cmpn(1)}function m(t,e){if(t<16)return new i(2===e||5===e?[140,123]:[140,39]);var r,d;for(e=new i(e);;){for(r=new i(n(Math.ceil(t/8)));r.bitLength()>t;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(u),e.cmp(u)){if(!e.cmp(c))for(;r.mod(f).cmp(h);)r.iadd(p)}else for(;r.mod(o).cmp(l);)r.iadd(p);if(y(d=r.shrn(1))&&y(r)&&b(d)&&b(r)&&s.test(d)&&s.test(r))return r}}},7554:(t,e,r)=>{"use strict";var n=e;n.version=r(763).i8,n.utils=r(8288),n.rand=r(2745),n.curve=r(8610),n.curves=r(1479),n.ec=r(8596),n.eddsa=r(9208)},8919:(t,e,r)=>{"use strict";var n=r(2197),i=r(8288),o=i.getNAF,s=i.getJSF,a=i.assert;function u(t,e){this.type=t,this.p=new n(e.p,16),this.red=e.prime?n.red(e.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=e.n&&new n(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(t,e){this.curve=t,this.type=e,this.precomputed=null}t.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(t,e){a(t.precomputed);var r=t._getDoubles(),n=o(e,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var s,u,c=[];for(s=0;s<n.length;s+=r.step){u=0;for(var f=s+r.step-1;f>=s;f--)u=(u<<1)+n[f];c.push(u)}for(var h=this.jpoint(null,null,null),l=this.jpoint(null,null,null),p=i;p>0;p--){for(s=0;s<c.length;s++)(u=c[s])===p?l=l.mixedAdd(r.points[s]):u===-p&&(l=l.mixedAdd(r.points[s].neg()));h=h.add(l)}return h.toP()},u.prototype._wnafMul=function(t,e){var r=4,n=t._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=o(e,r,this._bitLength),u=this.jpoint(null,null,null),c=s.length-1;c>=0;c--){for(var f=0;c>=0&&0===s[c];c--)f++;if(c>=0&&f++,u=u.dblp(f),c<0)break;var h=s[c];a(0!==h),u="affine"===t.type?h>0?u.mixedAdd(i[h-1>>1]):u.mixedAdd(i[-h-1>>1].neg()):h>0?u.add(i[h-1>>1]):u.add(i[-h-1>>1].neg())}return"affine"===t.type?u.toP():u},u.prototype._wnafMulAdd=function(t,e,r,n,i){var a,u,c,f=this._wnafT1,h=this._wnafT2,l=this._wnafT3,p=0;for(a=0;a<n;a++){var d=(c=e[a])._getNAFPoints(t);f[a]=d.wnd,h[a]=d.points}for(a=n-1;a>=1;a-=2){var g=a-1,y=a;if(1===f[g]&&1===f[y]){var b=[e[g],null,null,e[y]];0===e[g].y.cmp(e[y].y)?(b[1]=e[g].add(e[y]),b[2]=e[g].toJ().mixedAdd(e[y].neg())):0===e[g].y.cmp(e[y].y.redNeg())?(b[1]=e[g].toJ().mixedAdd(e[y]),b[2]=e[g].add(e[y].neg())):(b[1]=e[g].toJ().mixedAdd(e[y]),b[2]=e[g].toJ().mixedAdd(e[y].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],v=s(r[g],r[y]);for(p=Math.max(v[0].length,p),l[g]=new Array(p),l[y]=new Array(p),u=0;u<p;u++){var w=0|v[0][u],_=0|v[1][u];l[g][u]=m[3*(w+1)+(_+1)],l[y][u]=0,h[g]=b}}else l[g]=o(r[g],f[g],this._bitLength),l[y]=o(r[y],f[y],this._bitLength),p=Math.max(l[g].length,p),p=Math.max(l[y].length,p)}var A=this.jpoint(null,null,null),E=this._wnafT4;for(a=p;a>=0;a--){for(var S=0;a>=0;){var I=!0;for(u=0;u<n;u++)E[u]=0|l[u][a],0!==E[u]&&(I=!1);if(!I)break;S++,a--}if(a>=0&&S++,A=A.dblp(S),a<0)break;for(u=0;u<n;u++){var k=E[u];0!==k&&(k>0?c=h[u][k-1>>1]:k<0&&(c=h[u][-k-1>>1].neg()),A="affine"===c.type?A.mixedAdd(c):A.add(c))}}for(a=0;a<n;a++)h[a]=null;return i?A:A.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(t,e){t=i.toArray(t,e);var r=this.p.byteLength();if((4===t[0]||6===t[0]||7===t[0])&&t.length-1==2*r)return 6===t[0]?a(t[t.length-1]%2==0):7===t[0]&&a(t[t.length-1]%2==1),this.point(t.slice(1,1+r),t.slice(1+r,1+2*r));if((2===t[0]||3===t[0])&&t.length-1===r)return this.pointFromX(t.slice(1,1+r),3===t[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(t){return this.encode(t,!0)},c.prototype._encode=function(t){var e=this.curve.p.byteLength(),r=this.getX().toArray("be",e);return t?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",e))},c.prototype.encode=function(t,e){return i.encode(this._encode(e),t)},c.prototype.precompute=function(t){if(this.precomputed)return this;var e={doubles:null,naf:null,beta:null};return e.naf=this._getNAFPoints(8),e.doubles=this._getDoubles(4,t),e.beta=this._getBeta(),this.precomputed=e,this},c.prototype._hasDoubles=function(t){if(!this.precomputed)return!1;var e=this.precomputed.doubles;return!!e&&e.points.length>=Math.ceil((t.bitLength()+1)/e.step)},c.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<e;i+=t){for(var o=0;o<t;o++)n=n.dbl();r.push(n)}return{step:t,points:r}},c.prototype._getNAFPoints=function(t){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var e=[this],r=(1<<t)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)e[i]=e[i-1].add(n);return{wnd:t,points:e}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(t){for(var e=this,r=0;r<t;r++)e=e.dbl();return e}},7105:(t,e,r)=>{"use strict";var n=r(8288),i=r(2197),o=r(1285),s=r(8919),a=n.assert;function u(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,s.call(this,"edwards",t),this.a=new i(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}function c(t,e,r,n,o){s.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(e,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,s),t.exports=u,u.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},u.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},u.prototype.jpoint=function(t,e,r,n){return this.point(t,e,r,n)},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=a.fromRed().isOdd();return(e&&!u||!e&&u)&&(a=a.redNeg()),this.point(t,a)},u.prototype.pointFromY=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==e&&(a=a.redNeg()),this.point(a,t)},u.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),n=e.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===n.cmp(i)},o(c,s.BasePoint),u.prototype.pointFromJSON=function(t){return c.fromJSON(this,t)},u.prototype.point=function(t,e,r,n){return new c(this,t,e,r,n)},c.fromJSON=function(t,e){return new c(t,e[0],e[1],e[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(t),i=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=n.redAdd(e),s=o.redSub(r),a=n.redSub(e),u=i.redMul(s),c=o.redMul(a),f=i.redMul(a),h=s.redMul(o);return this.curve.point(u,c,h,f)},c.prototype._projDbl=function(){var t,e,r,n,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(a)).redAdd(u);this.zOne?(t=s.redSub(a).redSub(u).redMul(c.redSub(this.curve.two)),e=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),t=s.redSub(a).redISub(u).redMul(o),e=c.redMul(n.redSub(u)),r=c.redMul(o))}else n=a.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),t=this.curve._mulC(s.redISub(n)).redMul(o),e=this.curve._mulC(n).redMul(a.redISub(u)),r=n.redMul(o);return this.curve.point(t,e,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),n=this.t.redMul(this.curve.dd).redMul(t.t),i=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),s=i.redSub(n),a=i.redAdd(n),u=r.redAdd(e),c=o.redMul(s),f=a.redMul(u),h=o.redMul(u),l=s.redMul(a);return this.curve.point(c,f,l,h)},c.prototype._projAdd=function(t){var e,r,n=this.z.redMul(t.z),i=n.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(s),u=i.redSub(a),c=i.redAdd(a),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),h=n.redMul(u).redMul(f);return this.curve.twisted?(e=n.redMul(c).redMul(s.redSub(this.curve._mulA(o))),r=u.redMul(c)):(e=n.redMul(c).redMul(s.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(h,e,r)},c.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},c.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},c.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},c.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(n),0===this.x.cmp(e))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},8610:(t,e,r)=>{"use strict";var n=e;n.base=r(8919),n.short=r(7715),n.mont=r(5125),n.edwards=r(7105)},5125:(t,e,r)=>{"use strict";var n=r(2197),i=r(1285),o=r(8919),s=r(8288);function a(t){o.call(this,"mont",t),this.a=new n(t.a,16).toRed(this.red),this.b=new n(t.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(t,e,r){o.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(e,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),t.exports=a,a.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),n=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),a.prototype.decodePoint=function(t,e){return this.point(s.toArray(t,e),1)},a.prototype.point=function(t,e){return new u(this,t,e)},a.prototype.pointFromJSON=function(t){return u.fromJSON(this,t)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(t,e){return new u(t,e[0],e[1]||t.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),n=t.redMul(e),i=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),s=i.redMul(n),a=e.z.redMul(o.redAdd(s).redSqr()),u=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,u)},u.prototype.mul=function(t){for(var e=t.clone(),r=this,n=this.curve.point(null,null),i=[];0!==e.cmpn(0);e.iushrn(1))i.push(e.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},7715:(t,e,r)=>{"use strict";var n=r(8288),i=r(2197),o=r(1285),s=r(8919),a=n.assert;function u(t){s.call(this,"short",t),this.a=new i(t.a,16).toRed(this.red),this.b=new i(t.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(t),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(t,e,r,n){s.BasePoint.call(this,t,"affine"),null===e&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(e,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function f(t,e,r,n){s.BasePoint.call(this,t,"jacobian"),null===e&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(e,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),t.exports=u,u.prototype._getEndomorphism=function(t){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var e,r;if(t.beta)e=new i(t.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);e=(e=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(t.lambda)r=new i(t.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(e))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(e))))}return{beta:e,lambda:r,basis:t.basis?t.basis.map((function(t){return{a:new i(t.a,16),b:new i(t.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(t){var e=t===this.p?this.red:i.mont(t),r=new i(2).toRed(e).redInvm(),n=r.redNeg(),o=new i(3).toRed(e).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(t){for(var e,r,n,o,s,a,u,c,f,h=this.n.ushrn(Math.floor(this.n.bitLength()/2)),l=t,p=this.n.clone(),d=new i(1),g=new i(0),y=new i(0),b=new i(1),m=0;0!==l.cmpn(0);){var v=p.div(l);c=p.sub(v.mul(l)),f=y.sub(v.mul(d));var w=b.sub(v.mul(g));if(!n&&c.cmp(h)<0)e=u.neg(),r=d,n=c.neg(),o=f;else if(n&&2==++m)break;u=c,p=l,l=c,y=d,d=f,b=g,g=w}s=c.neg(),a=f;var _=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(_)>=0&&(s=e,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},u.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],n=e[1],i=n.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:t.sub(s).sub(a),k2:u.add(c).neg()}},u.prototype.pointFromX=function(t,e){(t=new i(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(e&&!o||!e&&o)&&(n=n.redNeg()),this.point(t,n)},u.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,n=this.a.redMul(e),i=e.redSqr().redMul(e).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(t,e,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<t.length;o++){var s=this._endoSplit(e[o]),a=t[o],u=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),n[2*o]=a,n[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),f=0;f<2*o;f++)n[f]=null,i[f]=null;return c},o(c,s.BasePoint),u.prototype.point=function(t,e,r){return new c(this,t,e,r)},u.prototype.pointFromJSON=function(t,e){return c.fromJSON(this,t,e)},c.prototype._getBeta=function(){if(this.curve.endo){var t=this.precomputed;if(t&&t.beta)return t.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(t){var r=this.curve,n=function(t){return r.point(t.x.redMul(r.endo.beta),t.y)};t.beta=e,e.precomputed={beta:null,naf:t.naf&&{wnd:t.naf.wnd,points:t.naf.points.map(n)},doubles:t.doubles&&{step:t.doubles.step,points:t.doubles.points.map(n)}}}return e}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(t,e,r){"string"==typeof e&&(e=JSON.parse(e));var n=t.point(e[0],e[1],r);if(!e[2])return n;function i(e){return t.point(e[0],e[1],r)}var o=e[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),n=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),n=t.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(t){return t=new i(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},c.prototype.mulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(t,e,r){var n=[this,e],i=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},c.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,n=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return e},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(f,s.BasePoint),u.prototype.jpoint=function(t,e,r){return new f(this,t,e,r)},f.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),n=this.y.redMul(e).redMul(t);return this.curve.point(r,n)},f.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},f.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(e),i=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),f=c.redMul(a),h=n.redMul(c),l=u.redSqr().redIAdd(f).redISub(h).redISub(h),p=u.redMul(h.redISub(l)).redISub(o.redMul(f)),d=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(l,p,d)},f.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,n=t.x.redMul(e),i=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),f=r.redMul(u),h=a.redSqr().redIAdd(c).redISub(f).redISub(f),l=a.redMul(f.redISub(h)).redISub(i.redMul(c)),p=this.z.redMul(s);return this.curve.jpoint(h,l,p)},f.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e<t;e++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,u=a.redSqr().redSqr(),c=s.redAdd(s);for(e=0;e<t;e++){var f=o.redSqr(),h=c.redSqr(),l=h.redSqr(),p=f.redAdd(f).redIAdd(f).redIAdd(n.redMul(u)),d=o.redMul(h),g=p.redSqr().redISub(d.redAdd(d)),y=d.redISub(g),b=p.redMul(y);b=b.redIAdd(b).redISub(l);var m=c.redMul(a);e+1<t&&(u=u.redMul(l)),o=g,a=m,c=b}return this.curve.jpoint(o,c.redMul(i),a)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},f.prototype._zeroDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),u=a.redSqr().redISub(s).redISub(s),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=u,e=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.x.redSqr(),h=this.y.redSqr(),l=h.redSqr(),p=this.x.redAdd(h).redSqr().redISub(f).redISub(l);p=p.redIAdd(p);var d=f.redAdd(f).redIAdd(f),g=d.redSqr(),y=l.redIAdd(l);y=(y=y.redIAdd(y)).redIAdd(y),t=g.redISub(p).redISub(p),e=d.redMul(p.redISub(t)).redISub(y),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(t,e,r)},f.prototype._threeDbl=function(){var t,e,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=a.redSqr().redISub(s).redISub(s);t=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),h=this.y.redSqr(),l=this.x.redMul(h),p=this.x.redSub(f).redMul(this.x.redAdd(f));p=p.redAdd(p).redIAdd(p);var d=l.redIAdd(l),g=(d=d.redIAdd(d)).redAdd(d);t=p.redSqr().redISub(g),r=this.y.redAdd(this.z).redSqr().redISub(h).redISub(f);var y=h.redSqr();y=(y=(y=y.redIAdd(y)).redIAdd(y)).redIAdd(y),e=p.redMul(d.redISub(t)).redISub(y)}return this.curve.jpoint(t,e,r)},f.prototype._dbl=function(){var t=this.curve.a,e=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=e.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(t.redMul(i)),u=e.redAdd(e),c=(u=u.redIAdd(u)).redMul(s),f=a.redSqr().redISub(c.redAdd(c)),h=c.redISub(f),l=s.redSqr();l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var p=a.redMul(h).redISub(l),d=r.redAdd(r).redMul(n);return this.curve.jpoint(f,p,d)},f.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr(),n=e.redSqr(),i=t.redAdd(t).redIAdd(t),o=i.redSqr(),s=this.x.redAdd(e).redSqr().redISub(t).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),f=e.redMul(c);f=(f=f.redIAdd(f)).redIAdd(f);var h=this.x.redMul(a).redISub(f);h=(h=h.redIAdd(h)).redIAdd(h);var l=this.y.redMul(c.redMul(u.redISub(c)).redISub(s.redMul(a)));l=(l=(l=l.redIAdd(l)).redIAdd(l)).redIAdd(l);var p=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(h,l,p)},f.prototype.mul=function(t,e){return t=new i(t,e),this.curve._wnafMul(this,t)},f.prototype.eq=function(t){if("affine"===t.type)return this.eq(t.toJ());if(this===t)return!0;var e=this.z.redSqr(),r=t.z.redSqr();if(0!==this.x.redMul(r).redISub(t.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),i=r.redMul(t.z);return 0===this.y.redMul(i).redISub(t.y.redMul(n)).cmpn(0)},f.prototype.eqXToP=function(t){var e=this.z.redSqr(),r=t.toRed(this.curve.red).redMul(e);if(0===this.x.cmp(r))return!0;for(var n=t.clone(),i=this.curve.redN.redMul(e);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},f.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},1479:(t,e,r)=>{"use strict";var n,i=e,o=r(3506),s=r(8610),a=r(8288).assert;function u(t){"short"===t.type?this.curve=new s.short(t):"edwards"===t.type?this.curve=new s.edwards(t):this.curve=new s.mont(t),this.g=this.curve.g,this.n=this.curve.n,this.hash=t.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(t,e){Object.defineProperty(i,t,{configurable:!0,enumerable:!0,get:function(){var r=new u(e);return Object.defineProperty(i,t,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(7983)}catch(t){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},8596:(t,e,r)=>{"use strict";var n=r(2197),i=r(8873),o=r(8288),s=r(1479),a=r(2745),u=o.assert,c=r(2307),f=r(1798);function h(t){if(!(this instanceof h))return new h(t);"string"==typeof t&&(u(Object.prototype.hasOwnProperty.call(s,t),"Unknown curve "+t),t=s[t]),t instanceof s.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}t.exports=h,h.prototype.keyPair=function(t){return new c(this,t)},h.prototype.keyFromPrivate=function(t,e){return c.fromPrivate(this,t,e)},h.prototype.keyFromPublic=function(t,e){return c.fromPublic(this,t,e)},h.prototype.genKeyPair=function(t){t||(t={});for(var e=new i({hash:this.hash,pers:t.pers,persEnc:t.persEnc||"utf8",entropy:t.entropy||a(this.hash.hmacStrength),entropyEnc:t.entropy&&t.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(e.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},h.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},h.prototype.sign=function(t,e,r,o){"object"==typeof r&&(o=r,r=null),o||(o={}),e=this.keyFromPrivate(e,r),t=this._truncateToN(new n(t,16));for(var s=this.n.byteLength(),a=e.getPrivate().toArray("be",s),u=t.toArray("be",s),c=new i({hash:this.hash,entropy:a,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),h=this.n.sub(new n(1)),l=0;;l++){var p=o.k?o.k(l):new n(c.generate(this.n.byteLength()));if(!((p=this._truncateToN(p,!0)).cmpn(1)<=0||p.cmp(h)>=0)){var d=this.g.mul(p);if(!d.isInfinity()){var g=d.getX(),y=g.umod(this.n);if(0!==y.cmpn(0)){var b=p.invm(this.n).mul(y.mul(e.getPrivate()).iadd(t));if(0!==(b=b.umod(this.n)).cmpn(0)){var m=(d.getY().isOdd()?1:0)|(0!==g.cmp(y)?2:0);return o.canonical&&b.cmp(this.nh)>0&&(b=this.n.sub(b),m^=1),new f({r:y,s:b,recoveryParam:m})}}}}}},h.prototype.verify=function(t,e,r,i){t=this._truncateToN(new n(t,16)),r=this.keyFromPublic(r,i);var o=(e=new f(e,"hex")).r,s=e.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),c=u.mul(t).umod(this.n),h=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),h)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(c,r.getPublic(),h)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},h.prototype.recoverPubKey=function(t,e,r,i){u((3&r)===r,"The recovery param is more than two bits"),e=new f(e,i);var o=this.n,s=new n(t),a=e.r,c=e.s,h=1&r,l=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&l)throw new Error("Unable to find sencond key candinate");a=l?this.curve.pointFromX(a.add(this.curve.n),h):this.curve.pointFromX(a,h);var p=e.r.invm(o),d=o.sub(s).mul(p).umod(o),g=c.mul(p).umod(o);return this.g.mulAdd(d,a,g)},h.prototype.getKeyRecoveryParam=function(t,e,r,n){if(null!==(e=new f(e,n)).recoveryParam)return e.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(t,e,i)}catch(t){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},2307:(t,e,r)=>{"use strict";var n=r(2197),i=r(8288).assert;function o(t,e){this.ec=t,this.priv=null,this.pub=null,e.priv&&this._importPrivate(e.priv,e.privEnc),e.pub&&this._importPublic(e.pub,e.pubEnc)}t.exports=o,o.fromPublic=function(t,e,r){return e instanceof o?e:new o(t,{pub:e,pubEnc:r})},o.fromPrivate=function(t,e,r){return e instanceof o?e:new o(t,{priv:e,privEnc:r})},o.prototype.validate=function(){var t=this.getPublic();return t.isInfinity()?{result:!1,reason:"Invalid public key"}:t.validate()?t.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(t,e){return"string"==typeof t&&(e=t,t=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),e?this.pub.encode(e,t):this.pub},o.prototype.getPrivate=function(t){return"hex"===t?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(t,e){this.priv=new n(t,e||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(t,e){if(t.x||t.y)return"mont"===this.ec.curve.type?i(t.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(t.x&&t.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(t.x,t.y));this.pub=this.ec.curve.decodePoint(t,e)},o.prototype.derive=function(t){return t.validate()||i(t.validate(),"public point not validated"),t.mul(this.priv).getX()},o.prototype.sign=function(t,e,r){return this.ec.sign(t,this,e,r)},o.prototype.verify=function(t,e){return this.ec.verify(t,e,this)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},1798:(t,e,r)=>{"use strict";var n=r(2197),i=r(8288),o=i.assert;function s(t,e){if(t instanceof s)return t;this._importDER(t,e)||(o(t.r&&t.s,"Signature without r or s"),this.r=new n(t.r,16),this.s=new n(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}function a(){this.place=0}function u(t,e){var r=t[e.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var i=0,o=0,s=e.place;o<n;o++,s++)i<<=8,i|=t[s],i>>>=0;return!(i<=127)&&(e.place=s,i)}function c(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e<r;)e++;return 0===e?t:t.slice(e)}function f(t,e){if(e<128)t.push(e);else{var r=1+(Math.log(e)/Math.LN2>>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}t.exports=s,s.prototype._importDER=function(t,e){t=i.toArray(t,e);var r=new a;if(48!==t[r.place++])return!1;var o=u(t,r);if(!1===o)return!1;if(o+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var s=u(t,r);if(!1===s)return!1;var c=t.slice(r.place,s+r.place);if(r.place+=s,2!==t[r.place++])return!1;var f=u(t,r);if(!1===f)return!1;if(t.length!==f+r.place)return!1;var h=t.slice(r.place,f+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===h[0]){if(!(128&h[1]))return!1;h=h.slice(1)}return this.r=new n(c),this.s=new n(h),this.recoveryParam=null,!0},s.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=c(e),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];f(n,e.length),(n=n.concat(e)).push(2),f(n,r.length);var o=n.concat(r),s=[48];return f(s,o.length),s=s.concat(o),i.encode(s,t)}},9208:(t,e,r)=>{"use strict";var n=r(3506),i=r(1479),o=r(8288),s=o.assert,a=o.parseBytes,u=r(851),c=r(6117);function f(t){if(s("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof f))return new f(t);t=i[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=n.sha512}t.exports=f,f.prototype.sign=function(t,e){t=a(t);var r=this.keyFromSecret(e),n=this.hashInt(r.messagePrefix(),t),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),u=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},f.prototype.verify=function(t,e,r){t=a(t),e=this.makeSignature(e);var n=this.keyFromPublic(r),i=this.hashInt(e.Rencoded(),n.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(n.pub().mul(i)).eq(o)},f.prototype.hashInt=function(){for(var t=this.hash(),e=0;e<arguments.length;e++)t.update(arguments[e]);return o.intFromLE(t.digest()).umod(this.curve.n)},f.prototype.keyFromPublic=function(t){return u.fromPublic(this,t)},f.prototype.keyFromSecret=function(t){return u.fromSecret(this,t)},f.prototype.makeSignature=function(t){return t instanceof c?t:new c(this,t)},f.prototype.encodePoint=function(t){var e=t.getY().toArray("le",this.encodingLength);return e[this.encodingLength-1]|=t.getX().isOdd()?128:0,e},f.prototype.decodePoint=function(t){var e=(t=o.parseBytes(t)).length-1,r=t.slice(0,e).concat(-129&t[e]),n=0!=(128&t[e]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},f.prototype.encodeInt=function(t){return t.toArray("le",this.encodingLength)},f.prototype.decodeInt=function(t){return o.intFromLE(t)},f.prototype.isPoint=function(t){return t instanceof this.pointClass}},851:(t,e,r)=>{"use strict";var n=r(8288),i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(t,e){this.eddsa=t,this._secret=o(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=o(e.pub)}a.fromPublic=function(t,e){return e instanceof a?e:new a(t,{pub:e})},a.fromSecret=function(t,e){return e instanceof a?e:new a(t,{secret:e})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,n=e.slice(0,t.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(t){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},a.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},a.prototype.getSecret=function(t){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),t)},a.prototype.getPublic=function(t){return n.encode(this.pubBytes(),t)},t.exports=a},6117:(t,e,r)=>{"use strict";var n=r(2197),i=r(8288),o=i.assert,s=i.cachedProperty,a=i.parseBytes;function u(t,e){this.eddsa=t,"object"!=typeof e&&(e=a(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),o(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof n&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}s(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},t.exports=u},7983:t=>{t.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},8288:(t,e,r)=>{"use strict";var n=e,i=r(2197),o=r(9561),s=r(3022);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(t,e,r){var n=new Array(Math.max(t.bitLength(),r)+1);n.fill(0);for(var i=1<<e+1,o=t.clone(),s=0;s<n.length;s++){var a,u=o.andln(i-1);o.isOdd()?(a=u>(i>>1)-1?(i>>1)-u:u,o.isubn(a)):a=0,n[s]=a,o.iushrn(1)}return n},n.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var n,i=0,o=0;t.cmpn(-i)>0||e.cmpn(-o)>0;){var s,a,u=t.andln(3)+i&3,c=e.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),s=0==(1&u)?0:3!=(n=t.andln(7)+i&7)&&5!==n||2!==c?u:-u,r[0].push(s),a=0==(1&c)?0:3!=(n=e.andln(7)+o&7)&&5!==n||2!==u?c:-c,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},n.cachedProperty=function(t,e,r){var n="_"+e;t.prototype[e]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(t){return"string"==typeof t?n.toArray(t,"hex"):t},n.intFromLE=function(t){return new i(t,"hex","le")}},569:function(t,e,r){var n,i=r(4406);n=function(){var t={},e=void 0!==i&&"win32"===i.platform?"\r\n":"\n",r=/\r\n|\r|\n/g;function n(t){return function(e){return e.replace(r,t)}}return t.lf=n("\n"),t.cr=n("\r"),t.crlf=n("\r\n"),t.auto=n(e),t.before=function(t){return e+t},t.after=function(t){return t+e},t},t.exports?t.exports=n():this.eol=n()},4956:t=>{"use strict";function e(t,e){if(null==t)throw new TypeError("Cannot convert first argument to object");for(var r=Object(t),n=1;n<arguments.length;n++){var i=arguments[n];if(null!=i)for(var o=Object.keys(Object(i)),s=0,a=o.length;s<a;s++){var u=o[s],c=Object.getOwnPropertyDescriptor(i,u);void 0!==c&&c.enumerable&&(r[u]=i[u])}}return r}t.exports={assign:e,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:e})}}},2699:t=>{"use strict";var e,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(t,e,r){return Function.prototype.apply.call(t,e,r)};e=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var i=Number.isNaN||function(t){return t!=t};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(t,e){return new Promise((function(r,n){function i(r){t.removeListener(e,o),n(r)}function o(){"function"==typeof t.removeListener&&t.removeListener("error",i),r([].slice.call(arguments))}g(t,e,o,{once:!0}),"error"!==e&&function(t,e,r){"function"==typeof t.on&&g(t,"error",e,{once:!0})}(t,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function u(t){return void 0===t._maxListeners?o.defaultMaxListeners:t._maxListeners}function c(t,e,r,n){var i,o,s,c;if(a(r),void 0===(o=t._events)?(o=t._events=Object.create(null),t._eventsCount=0):(void 0!==o.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),o=t._events),s=o[e]),void 0===s)s=o[e]=r,++t._eventsCount;else if("function"==typeof s?s=o[e]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(t))>0&&s.length>i&&!s.warned){s.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(e)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=t,f.type=e,f.count=s.length,c=f,console&&console.warn&&console.warn(c)}return t}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function l(t,e,r){var n=t._events;if(void 0===n)return[];var i=n[e];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):d(i,i.length)}function p(t){var e=this._events;if(void 0!==e){var r=e[t];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function d(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}function g(t,e,r,n){if("function"==typeof t.on)n.once?t.once(e,r):t.on(e,r);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(e,(function i(o){n.once&&t.removeEventListener(e,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");s=t}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||i(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(t){for(var e=[],r=1;r<arguments.length;r++)e.push(arguments[r]);var i="error"===t,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(e.length>0&&(s=e[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[t];if(void 0===u)return!1;if("function"==typeof u)n(u,this,e);else{var c=u.length,f=d(u,c);for(r=0;r<c;++r)n(f[r],this,e)}return!0},o.prototype.addListener=function(t,e){return c(this,t,e,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(t,e){return c(this,t,e,!0)},o.prototype.once=function(t,e){return a(e),this.on(t,h(this,t,e)),this},o.prototype.prependOnceListener=function(t,e){return a(e),this.prependListener(t,h(this,t,e)),this},o.prototype.removeListener=function(t,e){var r,n,i,o,s;if(a(e),void 0===(n=this._events))return this;if(void 0===(r=n[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=Object.create(null):(delete n[t],n.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===e||r[o].listener===e){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(t,e){for(;e+1<t.length;e++)t[e]=t[e+1];t.pop()}(r,i),1===r.length&&(n[t]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",t,s||e)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(t){var e,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[t]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[t]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(void 0!==e)for(n=e.length-1;n>=0;n--)this.removeListener(t,e[n]);return this},o.prototype.listeners=function(t){return l(this,t,!0)},o.prototype.rawListeners=function(t){return l(this,t,!1)},o.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):p.call(t,e)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]}},9341:(t,e,r)=>{var n=r(7834).Buffer,i=r(7993);t.exports=function(t,e,r,o){if(n.isBuffer(t)||(t=n.from(t,"binary")),e&&(n.isBuffer(e)||(e=n.from(e,"binary")),8!==e.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,a=n.alloc(s),u=n.alloc(o||0),c=n.alloc(0);s>0||o>0;){var f=new i;f.update(c),f.update(t),e&&f.update(e),c=f.digest();var h=0;if(s>0){var l=a.length-s;h=Math.min(s,c.length),c.copy(a,l,0,h),s-=h}if(h<c.length&&o>0){var p=u.length-o,d=Math.min(o,c.length-h);c.copy(u,p,h,h+d),o-=d}}return c.fill(0),{key:a,iv:u}}},2486:t=>{"use strict";var e=function(t,e){return t<e};function r(t){if(!(this instanceof r))return new r(t);this.array=[],this.size=0,this.compare=t||e}r.prototype.clone=function(){var t=new r(this.compare);return t.size=this.size,t.array=this.array.slice(0,this.size),t},r.prototype.add=function(t){var e,r,n=this.size;for(this.array[this.size]=t,this.size+=1;n>0&&(e=n-1>>1,r=this.array[e],this.compare(t,r));)this.array[n]=r,n=e;this.array[n]=t},r.prototype.heapify=function(t){var e;for(this.array=t,this.size=t.length,e=this.size>>1;e>=0;e--)this._percolateDown(e)},r.prototype._percolateUp=function(t,e){for(var r,n,i=this.array[t];t>0&&(r=t-1>>1,n=this.array[r],e||this.compare(i,n));)this.array[t]=n,t=r;this.array[t]=i},r.prototype._percolateDown=function(t){for(var e,r,n,i=this.size,o=this.size>>>1,s=this.array[t];t<o&&(r=1+(e=1+(t<<1)),n=this.array[e],r<i&&this.compare(this.array[r],n)&&(e=r,n=this.array[r]),this.compare(n,s));)this.array[t]=n,t=e;this.array[t]=s},r.prototype._removeAt=function(t){if(!(t>this.size-1||t<0))return this._percolateUp(t,!0),this.poll()},r.prototype.remove=function(t){for(var e=0;e<this.size;e++)if(!this.compare(this.array[e],t)&&!this.compare(t,this.array[e]))return this._removeAt(e),!0;return!1},r.prototype.removeOne=function(t){if("function"==typeof t)for(var e=0;e<this.size;e++)if(t(this.array[e]))return this._removeAt(e)},r.prototype.removeMany=function(t,e){if("function"!=typeof t||this.size<1)return[];e=e?Math.min(e,this.size):this.size;for(var r=0,n=new Array(e),i=0,o=new Array(this.size);r<e&&!this.isEmpty();){var s=this.poll();t(s)?n[r++]=s:o[i++]=s}n.length=r;for(var a=0;a<i;)this.add(o[a++]);return n},r.prototype.peek=function(){if(0!=this.size)return this.array[0]},r.prototype.poll=function(){if(0!=this.size){var t=this.array[0];return this.size>1?(this.array[0]=this.array[--this.size],this._percolateDown(0)):this.size-=1,t}},r.prototype.replaceTop=function(t){if(0!=this.size){var e=this.array[0];return this.array[0]=t,this._percolateDown(0),e}},r.prototype.trim=function(){this.array=this.array.slice(0,this.size)},r.prototype.isEmpty=function(){return 0===this.size},r.prototype.forEach=function(t){if(!this.isEmpty()&&"function"==typeof t)for(var e=0,r=this.clone();!r.isEmpty();)t(r.poll(),e++)},r.prototype.kSmallest=function(t){if(0==this.size)return[];t=Math.min(this.size,t);var e=new r(this.compare);const n=Math.min((t>0?Math.pow(2,t-1):0)+1,this.size);e.size=n,e.array=this.array.slice(0,n);for(var i=new Array(t),o=0;o<t;o++)i[o]=e.poll();return i},t.exports=r},6388:t=>{var e=Object.prototype.hasOwnProperty,r=Object.prototype.toString;t.exports=function(t,n,i){if("[object Function]"!==r.call(n))throw new TypeError("iterator must be a function");var o=t.length;if(o===+o)for(var s=0;s<o;s++)n.call(i,t[s],s,t);else for(var a in t)e.call(t,a)&&n.call(i,t[a],a,t)}},7795:t=>{"use strict";var e="Function.prototype.bind called on incompatible ",r=Array.prototype.slice,n=Object.prototype.toString,i="[object Function]";t.exports=function(t){var o=this;if("function"!=typeof o||n.call(o)!==i)throw new TypeError(e+o);for(var s,a=r.call(arguments,1),u=function(){if(this instanceof s){var e=o.apply(this,a.concat(r.call(arguments)));return Object(e)===e?e:this}return o.apply(t,a.concat(r.call(arguments)))},c=Math.max(0,o.length-a.length),f=[],h=0;h<c;h++)f.push("$"+h);if(s=Function("binder","return function ("+f.join(",")+"){ return binder.apply(this,arguments); }")(u),o.prototype){var l=function(){};l.prototype=o.prototype,s.prototype=new l,l.prototype=null}return s}},4090:(t,e,r)=>{"use strict";var n=r(7795);t.exports=Function.prototype.bind||n},7286:(t,e,r)=>{"use strict";var n,i=SyntaxError,o=Function,s=TypeError,a=function(t){try{return o('"use strict"; return ('+t+").constructor;")()}catch(t){}},u=Object.getOwnPropertyDescriptor;if(u)try{u({},"")}catch(t){u=null}var c=function(){throw new s},f=u?function(){try{return c}catch(t){try{return u(arguments,"callee").get}catch(t){return c}}}():c,h=r(2636)(),l=Object.getPrototypeOf||function(t){return t.__proto__},p={},d="undefined"==typeof Uint8Array?n:l(Uint8Array),g={"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":h?l([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":h?l(l([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&h?l((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&h?l((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":h?l(""[Symbol.iterator]()):n,"%Symbol%":h?Symbol:n,"%SyntaxError%":i,"%ThrowTypeError%":f,"%TypedArray%":d,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet},y=function t(e){var r;if("%AsyncFunction%"===e)r=a("async function () {}");else if("%GeneratorFunction%"===e)r=a("function* () {}");else if("%AsyncGeneratorFunction%"===e)r=a("async function* () {}");else if("%AsyncGenerator%"===e){var n=t("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&(r=l(i.prototype))}return g[e]=r,r},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},m=r(4090),v=r(3198),w=m.call(Function.call,Array.prototype.concat),_=m.call(Function.apply,Array.prototype.splice),A=m.call(Function.call,String.prototype.replace),E=m.call(Function.call,String.prototype.slice),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,I=/\\(\\)?/g,k=function(t){var e=E(t,0,1),r=E(t,-1);if("%"===e&&"%"!==r)throw new i("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==e)throw new i("invalid intrinsic syntax, expected opening `%`");var n=[];return A(t,S,(function(t,e,r,i){n[n.length]=r?A(i,I,"$1"):e||t})),n},x=function(t,e){var r,n=t;if(v(b,n)&&(n="%"+(r=b[n])[0]+"%"),v(g,n)){var o=g[n];if(o===p&&(o=y(n)),void 0===o&&!e)throw new s("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new i("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new s('"allowMissing" argument must be a boolean');var r=k(t),n=r.length>0?r[0]:"",o=x("%"+n+"%",e),a=o.name,c=o.value,f=!1,h=o.alias;h&&(n=h[0],_(r,w([0,1],h)));for(var l=1,p=!0;l<r.length;l+=1){var d=r[l],y=E(d,0,1),b=E(d,-1);if(('"'===y||"'"===y||"`"===y||'"'===b||"'"===b||"`"===b)&&y!==b)throw new i("property names with quotes must have matching quotes");if("constructor"!==d&&p||(f=!0),v(g,a="%"+(n+="."+d)+"%"))c=g[a];else if(null!=c){if(!(d in c)){if(!e)throw new s("base intrinsic for "+t+" exists, but the property is not available.");return}if(u&&l+1>=r.length){var m=u(c,d);c=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:c[d]}else p=v(c,d),c=c[d];p&&!f&&(g[a]=c)}}return c}},2636:(t,e,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,i=r(6679);t.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&i()}},6679:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),r=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var n=Object.getOwnPropertySymbols(t);if(1!==n.length||n[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},7226:(t,e,r)=>{"use strict";var n=r(6679);t.exports=function(){return n()&&!!Symbol.toStringTag}},3198:(t,e,r)=>{"use strict";var n=r(4090);t.exports=n.call(Function.call,Object.prototype.hasOwnProperty)},4485:(t,e,r)=>{"use strict";var n=r(7834).Buffer,i=r(5429).Transform;function o(t){i.call(this),this._block=n.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(1285)(o,i),o.prototype._transform=function(t,e,r){var n=null;try{this.update(t,e)}catch(t){n=t}r(n)},o.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},o.prototype.update=function(t,e){if(function(t,e){if(!n.isBuffer(t)&&"string"!=typeof t)throw new TypeError("Data must be a string or a buffer")}(t),this._finalized)throw new Error("Digest already called");n.isBuffer(t)||(t=n.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=t[i++];this._update(),this._blockOffset=0}for(;i<t.length;)r[this._blockOffset++]=t[i++];for(var s=0,a=8*t.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},o.prototype._digest=function(){throw new Error("_digest is not implemented")},t.exports=o},2173:t=>{"use strict";var e={};function r(t,r,n){n||(n=Error);var i=function(t){var e,n;function i(e,n,i){return t.call(this,function(t,e,n){return"string"==typeof r?r:r(t,e,n)}(e,n,i))||this}return n=t,(e=i).prototype=Object.create(n.prototype),e.prototype.constructor=e,e.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=t,e[t]=i}function n(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}r("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,o,s,a,u;if("string"==typeof e&&(o="not ",e.substr(0,o.length)===o)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat(n(e,"type"));else{var c=("number"!=typeof u&&(u=0),u+".".length>(a=t).length||-1===a.indexOf(".",u)?"argument":"property");s='The "'.concat(t,'" ').concat(c," ").concat(i," ").concat(n(e,"type"))}return s+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.q=e},2803:(t,e,r)=>{"use strict";var n=r(4406),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=f;var o=r(8582),s=r(764);r(1285)(f,o);for(var a=i(s.prototype),u=0;u<a.length;u++){var c=a[u];f.prototype[c]||(f.prototype[c]=s.prototype[c])}function f(t){if(!(this instanceof f))return new f(t);o.call(this,t),s.call(this,t),this.allowHalfOpen=!0,t&&(!1===t.readable&&(this.readable=!1),!1===t.writable&&(this.writable=!1),!1===t.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",h)))}function h(){this._writableState.ended||n.nextTick(l,this)}function l(t){t.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}})},8413:(t,e,r)=>{"use strict";t.exports=i;var n=r(2497);function i(t){if(!(this instanceof i))return new i(t);n.call(this,t)}r(1285)(i,n),i.prototype._transform=function(t,e,r){r(null,t)}},8582:(t,e,r)=>{"use strict";var n,i=r(4406);t.exports=I,I.ReadableState=S,r(2699).EventEmitter;var o,s=function(t,e){return t.listeners(e).length},a=r(1755),u=r(8834).Buffer,c=r.g.Uint8Array||function(){},f=r(9285);o=f&&f.debuglog?f.debuglog("stream"):function(){};var h,l,p,d=r(1756),g=r(7481),y=r(207).getHighWaterMark,b=r(2173).q,m=b.ERR_INVALID_ARG_TYPE,v=b.ERR_STREAM_PUSH_AFTER_EOF,w=b.ERR_METHOD_NOT_IMPLEMENTED,_=b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(1285)(I,a);var A=g.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(t,e,i){n=n||r(2803),t=t||{},"boolean"!=typeof i&&(i=e instanceof n),this.objectMode=!!t.objectMode,i&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=y(this,t,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(h||(h=r(6023).s),this.decoder=new h(t.encoding),this.encoding=t.encoding)}function I(t){if(n=n||r(2803),!(this instanceof I))return new I(t);var e=this instanceof n;this._readableState=new S(t,this,e),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),a.call(this)}function k(t,e,r,n,i){o("readableAddChunk",e);var s,a=t._readableState;if(null===e)a.reading=!1,function(t,e){if(o("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?T(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,O(t)))}}(t,a);else if(i||(s=function(t,e){var r,n;return n=e,u.isBuffer(n)||n instanceof c||"string"==typeof e||void 0===e||t.objectMode||(r=new m("chunk",["string","Buffer","Uint8Array"],e)),r}(a,e)),s)A(t,s);else if(a.objectMode||e&&e.length>0)if("string"==typeof e||a.objectMode||Object.getPrototypeOf(e)===u.prototype||(e=function(t){return u.from(t)}(e)),n)a.endEmitted?A(t,new _):x(t,a,e,!0);else if(a.ended)A(t,new v);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(e=a.decoder.write(e),a.objectMode||0!==e.length?x(t,a,e,!1):P(t,a)):x(t,a,e,!1)}else n||(a.reading=!1,P(t,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function x(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&T(t)),P(t,e)}Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),I.prototype.destroy=g.destroy,I.prototype._undestroy=g.undestroy,I.prototype._destroy=function(t,e){e(t)},I.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=u.from(t,e),e=""),r=!0),k(this,t,e,!1,r)},I.prototype.unshift=function(t){return k(this,t,null,!0,!1)},I.prototype.isPaused=function(){return!1===this._readableState.flowing},I.prototype.setEncoding=function(t){h||(h=r(6023).s);var e=new h(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=e.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var M=1073741824;function C(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=M?t=M:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function T(t){var e=t._readableState;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,i.nextTick(O,t))}function O(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,j(t)}function P(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(B,t,e))}function B(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&0===e.length);){var r=e.length;if(o("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1}function R(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function N(t){o("readable nexttick read 0"),t.read(0)}function U(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),j(t),e.flowing&&!e.reading&&t.read(0)}function j(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function L(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function D(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,i.nextTick(F,e,t))}function F(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function q(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}I.prototype.read=function(t){o("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&((0!==e.highWaterMark?e.length>=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?D(this):T(this),null;if(0===(t=C(t,e))&&e.ended)return 0===e.length&&D(this),null;var n,i=e.needReadable;return o("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&o("length less than watermark",i=!0),e.ended||e.reading?o("reading or ended",i=!1):i&&(o("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=C(r,e))),null===(n=t>0?L(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&D(this)),null!==n&&this.emit("data",n),n},I.prototype._read=function(t){A(this,new w("_read()"))},I.prototype.pipe=function(t,e){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,e);var a=e&&!1===e.end||t===i.stdout||t===i.stderr?g:u;function u(){o("onend"),t.end()}n.endEmitted?i.nextTick(a):r.once("end",a),t.on("unpipe",(function e(i,s){o("onunpipe"),i===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,o("cleanup"),t.removeListener("close",p),t.removeListener("finish",d),t.removeListener("drain",c),t.removeListener("error",l),t.removeListener("unpipe",e),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",h),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||c())}));var c=function(t){return function(){var e=t._readableState;o("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&s(t,"data")&&(e.flowing=!0,j(t))}}(r);t.on("drain",c);var f=!1;function h(e){o("ondata");var i=t.write(e);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==q(n.pipes,t))&&!f&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function l(e){o("onerror",e),g(),t.removeListener("error",l),0===s(t,"error")&&A(t,e)}function p(){t.removeListener("finish",d),g()}function d(){o("onfinish"),t.removeListener("close",p),g()}function g(){o("unpipe"),r.unpipe(t)}return r.on("data",h),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events.error?Array.isArray(t._events.error)?t._events.error.unshift(r):t._events.error=[r,t._events.error]:t.on(e,r)}(t,"error",l),t.once("close",p),t.once("finish",d),t.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),t},I.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=q(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},I.prototype.on=function(t,e){var r=a.prototype.on.call(this,t,e),n=this._readableState;return"data"===t?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?T(this):n.reading||i.nextTick(N,this))),r},I.prototype.addListener=I.prototype.on,I.prototype.removeListener=function(t,e){var r=a.prototype.removeListener.call(this,t,e);return"readable"===t&&i.nextTick(R,this),r},I.prototype.removeAllListeners=function(t){var e=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||i.nextTick(R,this),e},I.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(U,t,e))}(this,t)),t.paused=!1,this},I.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},I.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var s=0;s<E.length;s++)t.on(E[s],this.emit.bind(this,E[s]));return this._read=function(e){o("wrapped _read",e),n&&(n=!1,t.resume())},this},"function"==typeof Symbol&&(I.prototype[Symbol.asyncIterator]=function(){return void 0===l&&(l=r(554)),l(this)}),Object.defineProperty(I.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(I.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(I.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(t){this._readableState&&(this._readableState.flowing=t)}}),I._fromList=L,Object.defineProperty(I.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(I.from=function(t,e){return void 0===p&&(p=r(3044)),p(I,t,e)})},2497:(t,e,r)=>{"use strict";t.exports=f;var n=r(2173).q,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(2803);function c(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function f(t){if(!(this instanceof f))return new f(t);u.call(this,t),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",h)}function h(){var t=this;"function"!=typeof this._flush||this._readableState.destroyed?l(this,null,null):this._flush((function(e,r){l(t,e,r)}))}function l(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new a;if(t._transformState.transforming)throw new s;return t.push(null)}r(1285)(f,u),f.prototype.push=function(t,e){return this._transformState.needTransform=!1,u.prototype.push.call(this,t,e)},f.prototype._transform=function(t,e,r){r(new i("_transform()"))},f.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},f.prototype._read=function(t){var e=this._transformState;null===e.writechunk||e.transforming?e.needTransform=!0:(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform))},f.prototype._destroy=function(t,e){u.prototype._destroy.call(this,t,(function(t){e(t)}))}},764:(t,e,r)=>{"use strict";var n,i=r(4406);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(undefined),n=n.next}e.corkedRequestsFree.next=t}(e,t)}}t.exports=I,I.WritableState=S;var s,a={deprecate:r(5803)},u=r(1755),c=r(8834).Buffer,f=r.g.Uint8Array||function(){},h=r(7481),l=r(207).getHighWaterMark,p=r(2173).q,d=p.ERR_INVALID_ARG_TYPE,g=p.ERR_METHOD_NOT_IMPLEMENTED,y=p.ERR_MULTIPLE_CALLBACK,b=p.ERR_STREAM_CANNOT_PIPE,m=p.ERR_STREAM_DESTROYED,v=p.ERR_STREAM_NULL_VALUES,w=p.ERR_STREAM_WRITE_AFTER_END,_=p.ERR_UNKNOWN_ENCODING,A=h.errorOrDestroy;function E(){}function S(t,e,s){n=n||r(2803),t=t||{},"boolean"!=typeof s&&(s=e instanceof n),this.objectMode=!!t.objectMode,s&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=l(this,t,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===t.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new y;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,o){--e.pendingcb,r?(i.nextTick(o,n),i.nextTick(O,t,e),t._writableState.errorEmitted=!0,A(t,n)):(o(n),t._writableState.errorEmitted=!0,A(t,n),O(t,e))}(t,r,n,e,o);else{var s=C(r)||t.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||M(t,r),n?i.nextTick(x,t,r,s,o):x(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==t.emitClose,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function I(t){var e=this instanceof(n=n||r(2803));if(!e&&!s.call(I,this))return new I(t);this._writableState=new S(t,this,e),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),u.call(this)}function k(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new m("write")):r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function x(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),O(t,e)}function M(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,k(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,h=r.callback;if(k(t,e,!1,e.objectMode?1:c.length,c,f,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function C(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function T(t,e){t._final((function(r){e.pendingcb--,r&&A(t,r),e.prefinished=!0,t.emit("prefinish"),O(t,e)}))}function O(t,e){var r=C(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,i.nextTick(T,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var n=t._readableState;(!n||n.autoDestroy&&n.endEmitted)&&t.destroy()}return r}r(1285)(I,u),S.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(S.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(I,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===I&&t&&t._writableState instanceof S}})):s=function(t){return t instanceof this},I.prototype.pipe=function(){A(this,new b)},I.prototype.write=function(t,e,r){var n,o=this._writableState,s=!1,a=!o.objectMode&&(n=t,c.isBuffer(n)||n instanceof f);return a&&!c.isBuffer(t)&&(t=function(t){return c.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=E),o.ending?function(t,e){var r=new w;A(t,r),i.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var o;return null===r?o=new v:"string"==typeof r||e.objectMode||(o=new d("chunk",["string","Buffer"],r)),!o||(A(t,o),i.nextTick(n,o),!1)}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=c.from(e,r)),e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var f=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else k(t,e,!1,a,n,i,o);return u}(this,o,a,t,e,r)),s},I.prototype.cork=function(){this._writableState.corked++},I.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.bufferProcessing||!t.bufferedRequest||M(this,t))},I.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new _(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(I.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(I.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),I.prototype._write=function(t,e,r){r(new g("_write()"))},I.prototype._writev=null,I.prototype.end=function(t,e,r){var n=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||function(t,e,r){e.ending=!0,O(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,n,r),this},Object.defineProperty(I.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(I.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),I.prototype.destroy=h.destroy,I.prototype._undestroy=h.undestroy,I.prototype._destroy=function(t,e){e(t)}},554:(t,e,r)=>{"use strict";var n,i=r(4406);function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var s=r(8771),a=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),f=Symbol("ended"),h=Symbol("lastPromise"),l=Symbol("handlePromise"),p=Symbol("stream");function d(t,e){return{value:t,done:e}}function g(t){var e=t[a];if(null!==e){var r=t[p].read();null!==r&&(t[h]=null,t[a]=null,t[u]=null,e(d(r,!1)))}}function y(t){i.nextTick(g,t)}var b=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((o(n={get stream(){return this[p]},next:function(){var t=this,e=this[c];if(null!==e)return Promise.reject(e);if(this[f])return Promise.resolve(d(void 0,!0));if(this[p].destroyed)return new Promise((function(e,r){i.nextTick((function(){t[c]?r(t[c]):e(d(void 0,!0))}))}));var r,n=this[h];if(n)r=new Promise(function(t,e){return function(r,n){t.then((function(){e[f]?r(d(void 0,!0)):e[l](r,n)}),n)}}(n,this));else{var o=this[p].read();if(null!==o)return Promise.resolve(d(o,!1));r=new Promise(this[l])}return this[h]=r,r}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var t=this;return new Promise((function(e,r){t[p].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),n),b);t.exports=function(t){var e,r=Object.create(m,(o(e={},p,{value:t,writable:!0}),o(e,a,{value:null,writable:!0}),o(e,u,{value:null,writable:!0}),o(e,c,{value:null,writable:!0}),o(e,f,{value:t._readableState.endEmitted,writable:!0}),o(e,l,{value:function(t,e){var n=r[p].read();n?(r[h]=null,r[a]=null,r[u]=null,t(d(n,!1))):(r[a]=t,r[u]=e)},writable:!0}),e));return r[h]=null,s(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[u];return null!==e&&(r[h]=null,r[a]=null,r[u]=null,e(t)),void(r[c]=t)}var n=r[a];null!==n&&(r[h]=null,r[a]=null,r[u]=null,n(d(void 0,!0))),r[f]=!0})),t.on("readable",y.bind(null,r)),r}},1756:(t,e,r)=>{"use strict";function n(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function i(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=r(8834).Buffer,a=r(7374).inspect,u=a&&a.custom||"inspect";t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}var e,r;return e=t,r=[{key:"push",value:function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return s.alloc(0);for(var e,r,n,i=s.allocUnsafe(t>>>0),o=this.head,a=0;o;)e=o.data,r=i,n=a,s.prototype.copy.call(e,r,n),a+=o.data.length,o=o.next;return i}},{key:"consume",value:function(t,e){var r;return t<this.head.data.length?(r=this.head.data.slice(0,t),this.head.data=this.head.data.slice(t)):r=t===this.head.data.length?this.shift():e?this._getString(t):this._getBuffer(t),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(t){var e=this.head,r=1,n=e.data;for(t-=n.length;e=e.next;){var i=e.data,o=t>i.length?i.length:t;if(o===i.length?n+=i:n+=i.slice(0,t),0==(t-=o)){o===i.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(t){var e=s.allocUnsafe(t),r=this.head,n=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var i=r.data,o=t>i.length?i.length:t;if(i.copy(e,e.length-t,0,o),0==(t-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,e}},{key:u,value:function(t,e){return a(this,function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?n(Object(r),!0).forEach((function(e){i(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}({},e,{depth:0,customInspect:!1}))}}],r&&o(e.prototype,r),t}()},7481:(t,e,r)=>{"use strict";var n=r(4406);function i(t,e){s(t,e),o(t)}function o(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function s(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(s,this,t)):n.nextTick(s,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,t)):n.nextTick(i,r,t):e?(n.nextTick(o,r),e(t)):n.nextTick(o,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(e):t.emit("error",e)}}},8771:(t,e,r)=>{"use strict";var n=r(2173).q.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function t(e,r,o){if("function"==typeof r)return t(e,null,r);r||(r={}),o=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];t.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&e.readable,a=r.writable||!1!==r.writable&&e.writable,u=function(){e.writable||f()},c=e._writableState&&e._writableState.finished,f=function(){a=!1,c=!0,s||o.call(e)},h=e._readableState&&e._readableState.endEmitted,l=function(){s=!1,h=!0,a||o.call(e)},p=function(t){o.call(e,t)},d=function(){var t;return s&&!h?(e._readableState&&e._readableState.ended||(t=new n),o.call(e,t)):a&&!c?(e._writableState&&e._writableState.ended||(t=new n),o.call(e,t)):void 0},g=function(){e.req.on("finish",f)};return function(t){return t.setHeader&&"function"==typeof t.abort}(e)?(e.on("complete",f),e.on("abort",d),e.req?g():e.on("request",g)):a&&!e._writableState&&(e.on("end",u),e.on("close",u)),e.on("end",l),e.on("finish",f),!1!==r.error&&e.on("error",p),e.on("close",d),function(){e.removeListener("complete",f),e.removeListener("abort",d),e.removeListener("request",g),e.req&&e.req.removeListener("finish",f),e.removeListener("end",u),e.removeListener("close",u),e.removeListener("finish",f),e.removeListener("end",l),e.removeListener("error",p),e.removeListener("close",d)}}},3044:t=>{t.exports=function(){throw new Error("Readable.from is not available in the browser")}},2353:(t,e,r)=>{"use strict";var n,i=r(2173).q,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(t){if(t)throw t}function u(t,e,i,o){o=function(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}(o);var a=!1;t.on("close",(function(){a=!0})),void 0===n&&(n=r(8771)),n(t,{readable:e,writable:i},(function(t){if(t)return o(t);a=!0,o()}));var u=!1;return function(e){if(!a&&!u)return u=!0,function(t){return t.setHeader&&"function"==typeof t.abort}(t)?t.abort():"function"==typeof t.destroy?t.destroy():void o(e||new s("pipe"))}}function c(t){t()}function f(t,e){return t.pipe(e)}function h(t){return t.length?"function"!=typeof t[t.length-1]?a:t.pop():a}t.exports=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=h(e);if(Array.isArray(e[0])&&(e=e[0]),e.length<2)throw new o("streams");var s=e.map((function(t,r){var o=r<e.length-1;return u(t,o,r>0,(function(t){n||(n=t),t&&s.forEach(c),o||(s.forEach(c),i(n))}))}));return e.reduce(f)}},207:(t,e,r)=>{"use strict";var n=r(2173).q.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(t,e,r,i){var o=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return t.objectMode?16:16384}}},1755:(t,e,r)=>{t.exports=r(2699).EventEmitter},5429:(t,e,r)=>{(e=t.exports=r(8582)).Stream=e,e.Readable=e,e.Writable=r(764),e.Duplex=r(2803),e.Transform=r(2497),e.PassThrough=r(8413),e.finished=r(8771),e.pipeline=r(2353)},6023:(t,e,r)=>{"use strict";var n=r(7834).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=f,this.end=h,e=3;break;default:return this.write=l,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(e[n]))>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(e[n]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},3506:(t,e,r)=>{var n=e;n.utils=r(212),n.common=r(4495),n.sha=r(5530),n.ripemd=r(1396),n.hmac=r(5047),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},4495:(t,e,r)=>{"use strict";var n=r(212),i=r(9561);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}e.BlockHash=o,o.prototype.update=function(t,e){if(t=n.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=n.join32(t,0,t.length-r,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,e=this._delta8,r=e-(t+this.padLength)%e,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=t>>>24&255,n[i++]=t>>>16&255,n[i++]=t>>>8&255,n[i++]=255&t}else for(n[i++]=255&t,n[i++]=t>>>8&255,n[i++]=t>>>16&255,n[i++]=t>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},5047:(t,e,r)=>{"use strict";var n=r(212),i=r(9561);function o(t,e,r){if(!(this instanceof o))return new o(t,e,r);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(e,r))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var e=t.length;e<this.blockSize;e++)t.push(0);for(e=0;e<t.length;e++)t[e]^=54;for(this.inner=(new this.Hash).update(t),e=0;e<t.length;e++)t[e]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,e){return this.inner.update(t,e),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},1396:(t,e,r)=>{"use strict";var n=r(212),i=r(4495),o=n.rotl32,s=n.sum32,a=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function f(){if(!(this instanceof f))return new f;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function h(t,e,r,n){return t<=15?e^r^n:t<=31?e&r|~e&n:t<=47?(e|~r)^n:t<=63?e&n|r&~n:e^(r|~n)}function l(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function p(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}n.inherits(f,c),e.ripemd160=f,f.blockSize=512,f.outSize=160,f.hmacStrength=192,f.padLength=64,f.prototype._update=function(t,e){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],f=this.h[4],m=r,v=n,w=i,_=c,A=f,E=0;E<80;E++){var S=s(o(u(r,h(E,n,i,c),t[d[E]+e],l(E)),y[E]),f);r=f,f=c,c=o(i,10),i=n,n=S,S=s(o(u(m,h(79-E,v,w,_),t[g[E]+e],p(E)),b[E]),A),m=A,A=_,_=o(w,10),w=v,v=S}S=a(this.h[1],i,_),this.h[1]=a(this.h[2],c,A),this.h[2]=a(this.h[3],f,m),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,w),this.h[0]=S},f.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],g=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],y=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],b=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},5530:(t,e,r)=>{"use strict";e.sha1=r(5079),e.sha224=r(3823),e.sha256=r(8032),e.sha384=r(5328),e.sha512=r(168)},5079:(t,e,r)=>{"use strict";var n=r(212),i=r(4495),o=r(713),s=n.rotl32,a=n.sum32,u=n.sum32_5,c=o.ft_1,f=i.BlockHash,h=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(l,f),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],f=this.h[2],l=this.h[3],p=this.h[4];for(n=0;n<r.length;n++){var d=~~(n/20),g=u(s(i,5),c(d,o,f,l),p,r[n],h[d]);p=l,l=f,f=s(o,30),o=i,i=g}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],f),this.h[3]=a(this.h[3],l),this.h[4]=a(this.h[4],p)},l.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},3823:(t,e,r)=>{"use strict";var n=r(212),i=r(8032);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},8032:(t,e,r)=>{"use strict";var n=r(212),i=r(4495),o=r(713),s=r(9561),a=n.sum32,u=n.sum32_4,c=n.sum32_5,f=o.ch32,h=o.maj32,l=o.s0_256,p=o.s1_256,d=o.g0_256,g=o.g1_256,y=i.BlockHash,b=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function m(){if(!(this instanceof m))return new m;y.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=b,this.W=new Array(64)}n.inherits(m,y),t.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(t,e){for(var r=this.W,n=0;n<16;n++)r[n]=t[e+n];for(;n<r.length;n++)r[n]=u(g(r[n-2]),r[n-7],d(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],y=this.h[2],b=this.h[3],m=this.h[4],v=this.h[5],w=this.h[6],_=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var A=c(_,p(m),f(m,v,w),this.k[n],r[n]),E=a(l(i),h(i,o,y));_=w,w=v,v=m,m=a(b,A),b=y,y=o,o=i,i=a(A,E)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],y),this.h[3]=a(this.h[3],b),this.h[4]=a(this.h[4],m),this.h[5]=a(this.h[5],v),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],_)},m.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},5328:(t,e,r)=>{"use strict";var n=r(212),i=r(168);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},168:(t,e,r)=>{"use strict";var n=r(212),i=r(4495),o=r(9561),s=n.rotr64_hi,a=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,f=n.sum64,h=n.sum64_hi,l=n.sum64_lo,p=n.sum64_4_hi,d=n.sum64_4_lo,g=n.sum64_5_hi,y=n.sum64_5_lo,b=i.BlockHash,m=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;b.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}function w(t,e,r,n,i){var o=t&r^~t&i;return o<0&&(o+=4294967296),o}function _(t,e,r,n,i,o){var s=e&n^~e&o;return s<0&&(s+=4294967296),s}function A(t,e,r,n,i){var o=t&r^t&i^r&i;return o<0&&(o+=4294967296),o}function E(t,e,r,n,i,o){var s=e&n^e&o^n&o;return s<0&&(s+=4294967296),s}function S(t,e){var r=s(t,e,28)^s(e,t,2)^s(e,t,7);return r<0&&(r+=4294967296),r}function I(t,e){var r=a(t,e,28)^a(e,t,2)^a(e,t,7);return r<0&&(r+=4294967296),r}function k(t,e){var r=a(t,e,14)^a(t,e,18)^a(e,t,9);return r<0&&(r+=4294967296),r}function x(t,e){var r=s(t,e,1)^s(t,e,8)^u(t,e,7);return r<0&&(r+=4294967296),r}function M(t,e){var r=a(t,e,1)^a(t,e,8)^c(t,e,7);return r<0&&(r+=4294967296),r}function C(t,e){var r=a(t,e,19)^a(e,t,29)^c(t,e,6);return r<0&&(r+=4294967296),r}n.inherits(v,b),t.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(t,e){for(var r=this.W,n=0;n<32;n++)r[n]=t[e+n];for(;n<r.length;n+=2){var i=(y=r[n-4],b=r[n-3],m=void 0,(m=s(y,b,19)^s(b,y,29)^u(y,b,6))<0&&(m+=4294967296),m),o=C(r[n-4],r[n-3]),a=r[n-14],c=r[n-13],f=x(r[n-30],r[n-29]),h=M(r[n-30],r[n-29]),l=r[n-32],g=r[n-31];r[n]=p(i,o,a,c,f,h,l,g),r[n+1]=d(i,o,a,c,f,h,l,g)}var y,b,m},v.prototype._update=function(t,e){this._prepareBlock(t,e);var r,n,i,a=this.W,u=this.h[0],c=this.h[1],p=this.h[2],d=this.h[3],b=this.h[4],m=this.h[5],v=this.h[6],x=this.h[7],M=this.h[8],C=this.h[9],T=this.h[10],O=this.h[11],P=this.h[12],B=this.h[13],R=this.h[14],N=this.h[15];o(this.k.length===a.length);for(var U=0;U<a.length;U+=2){var j=R,L=N,D=(i=void 0,(i=s(r=M,n=C,14)^s(r,n,18)^s(n,r,9))<0&&(i+=4294967296),i),F=k(M,C),q=w(M,0,T,0,P),H=_(0,C,0,O,0,B),K=this.k[U],V=this.k[U+1],G=a[U],z=a[U+1],W=g(j,L,D,F,q,H,K,V,G,z),Q=y(j,L,D,F,q,H,K,V,G,z);j=S(u,c),L=I(u,c),D=A(u,0,p,0,b),F=E(0,c,0,d,0,m);var Y=h(j,L,D,F),X=l(j,L,D,F);R=P,N=B,P=T,B=O,T=M,O=C,M=h(v,x,W,Q),C=l(x,x,W,Q),v=b,x=m,b=p,m=d,p=u,d=c,u=h(W,Q,Y,X),c=l(W,Q,Y,X)}f(this.h,0,u,c),f(this.h,2,p,d),f(this.h,4,b,m),f(this.h,6,v,x),f(this.h,8,M,C),f(this.h,10,T,O),f(this.h,12,P,B),f(this.h,14,R,N)},v.prototype._digest=function(t){return"hex"===t?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},713:(t,e,r)=>{"use strict";var n=r(212).rotr32;function i(t,e,r){return t&e^~t&r}function o(t,e,r){return t&e^t&r^e&r}function s(t,e,r){return t^e^r}e.ft_1=function(t,e,r,n){return 0===t?i(e,r,n):1===t||3===t?s(e,r,n):2===t?o(e,r,n):void 0},e.ch32=i,e.maj32=o,e.p32=s,e.s0_256=function(t){return n(t,2)^n(t,13)^n(t,22)},e.s1_256=function(t){return n(t,6)^n(t,11)^n(t,25)},e.g0_256=function(t){return n(t,7)^n(t,18)^t>>>3},e.g1_256=function(t){return n(t,17)^n(t,19)^t>>>10}},212:(t,e,r)=>{"use strict";var n=r(9561),i=r(1285);function o(t,e){return 55296==(64512&t.charCodeAt(e))&&!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1))}function s(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function a(t){return 1===t.length?"0"+t:t}function u(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}e.inherits=i,e.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)r.push(parseInt(t[i]+t[i+1],16))}else for(var n=0,i=0;i<t.length;i++){var s=t.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(t,i)?(s=65536+((1023&s)<<10)+(1023&t.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<t.length;i++)r[i]=0|t[i];return r},e.toHex=function(t){for(var e="",r=0;r<t.length;r++)e+=a(t[r].toString(16));return e},e.htonl=s,e.toHex32=function(t,e){for(var r="",n=0;n<t.length;n++){var i=t[n];"little"===e&&(i=s(i)),r+=u(i.toString(16))}return r},e.zero2=a,e.zero8=u,e.join32=function(t,e,r,i){var o=r-e;n(o%4==0);for(var s=new Array(o/4),a=0,u=e;a<s.length;a++,u+=4){var c;c="big"===i?t[u]<<24|t[u+1]<<16|t[u+2]<<8|t[u+3]:t[u+3]<<24|t[u+2]<<16|t[u+1]<<8|t[u],s[a]=c>>>0}return s},e.split32=function(t,e){for(var r=new Array(4*t.length),n=0,i=0;n<t.length;n++,i+=4){var o=t[n];"big"===e?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},e.rotr32=function(t,e){return t>>>e|t<<32-e},e.rotl32=function(t,e){return t<<e|t>>>32-e},e.sum32=function(t,e){return t+e>>>0},e.sum32_3=function(t,e,r){return t+e+r>>>0},e.sum32_4=function(t,e,r,n){return t+e+r+n>>>0},e.sum32_5=function(t,e,r,n,i){return t+e+r+n+i>>>0},e.sum64=function(t,e,r,n){var i=t[e],o=n+t[e+1]>>>0,s=(o<n?1:0)+r+i;t[e]=s>>>0,t[e+1]=o},e.sum64_hi=function(t,e,r,n){return(e+n>>>0<e?1:0)+t+r>>>0},e.sum64_lo=function(t,e,r,n){return e+n>>>0},e.sum64_4_hi=function(t,e,r,n,i,o,s,a){var u=0,c=e;return u+=(c=c+n>>>0)<e?1:0,u+=(c=c+o>>>0)<o?1:0,t+r+i+s+(u+=(c=c+a>>>0)<a?1:0)>>>0},e.sum64_4_lo=function(t,e,r,n,i,o,s,a){return e+n+o+a>>>0},e.sum64_5_hi=function(t,e,r,n,i,o,s,a,u,c){var f=0,h=e;return f+=(h=h+n>>>0)<e?1:0,f+=(h=h+o>>>0)<o?1:0,f+=(h=h+a>>>0)<a?1:0,t+r+i+s+u+(f+=(h=h+c>>>0)<c?1:0)>>>0},e.sum64_5_lo=function(t,e,r,n,i,o,s,a,u,c){return e+n+o+a+c>>>0},e.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},e.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},e.shr64_hi=function(t,e,r){return t>>>r},e.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0}},8873:(t,e,r)=>{"use strict";var n=r(3506),i=r(3022),o=r(9561);function s(t){if(!(this instanceof s))return new s(t);this.hash=t.hash,this.predResist=!!t.predResist,this.outLen=this.hash.outSize,this.minEntropy=t.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var e=i.toArray(t.entropy,t.entropyEnc||"hex"),r=i.toArray(t.nonce,t.nonceEnc||"hex"),n=i.toArray(t.pers,t.persEnc||"hex");o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,n)}t.exports=s,s.prototype._init=function(t,e,r){var n=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(t){var e=this._hmac().update(this.V).update([0]);t&&(e=e.update(t)),this.K=e.digest(),this.V=this._hmac().update(this.V).digest(),t&&(this.K=this._hmac().update(this.V).update([1]).update(t).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(t,e,r,n){"string"!=typeof e&&(n=r,r=e,e=null),t=i.toArray(t,e),r=i.toArray(r,n),o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},s.prototype.generate=function(t,e,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(n=r,r=e,e=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<t;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,t);return this._update(r),this._reseed++,i.encode(s,e)}},2333:(t,e)=>{e.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,f=-7,h=r?i-1:0,l=r?-1:1,p=t[e+h];for(h+=l,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+t[e+h],h+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+h],h+=l,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},e.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,h=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=f?(a=0,s=f):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*g}},1285:t=>{"function"==typeof Object.create?t.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},2635:(t,e,r)=>{"use strict";var n=r(7226)(),i=r(2680)("Object.prototype.toString"),o=function(t){return!(n&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===i(t)},s=function(t){return!!o(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==i(t)&&"[object Function]"===i(t.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,t.exports=a?o:s},3138:(t,e,r)=>{"use strict";var n,i=Object.prototype.toString,o=Function.prototype.toString,s=/^\s*(?:function)?\*/,a=r(7226)(),u=Object.getPrototypeOf;t.exports=function(t){if("function"!=typeof t)return!1;if(s.test(o.call(t)))return!0;if(!a)return"[object GeneratorFunction]"===i.call(t);if(!u)return!1;if(void 0===n){var e=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(t){}}();n=!!e&&u(e)}return u(t)===n}},8320:t=>{t.exports=function(t){if("string"!=typeof t)throw new Error("[is-hex-prefixed] value must be type 'string', is currently type "+typeof t+", while checking isHexPrefixed.");return"0x"===t.slice(0,2)}},7053:t=>{"use strict";t.exports=function(t){return t!=t}},4782:(t,e,r)=>{"use strict";var n=r(9429),i=r(4926),o=r(7053),s=r(755),a=r(5346),u=n(s(),Number);i(u,{getPolyfill:s,implementation:o,shim:a}),t.exports=u},755:(t,e,r)=>{"use strict";var n=r(7053);t.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},5346:(t,e,r)=>{"use strict";var n=r(4926),i=r(755);t.exports=function(){var t=i();return n(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}},198:(t,e,r)=>{"use strict";var n=r(6388),i=r(2191),o=r(2680),s=o("Object.prototype.toString"),a=r(7226)(),u="undefined"==typeof globalThis?r.g:globalThis,c=i(),f=o("Array.prototype.indexOf",!0)||function(t,e){for(var r=0;r<t.length;r+=1)if(t[r]===e)return r;return-1},h=o("String.prototype.slice"),l={},p=r(9765),d=Object.getPrototypeOf;a&&p&&d&&n(c,(function(t){var e=new u[t];if(Symbol.toStringTag in e){var r=d(e),n=p(r,Symbol.toStringTag);if(!n){var i=d(r);n=p(i,Symbol.toStringTag)}l[t]=n.get}})),t.exports=function(t){if(!t||"object"!=typeof t)return!1;if(!a||!(Symbol.toStringTag in t)){var e=h(s(t),8,-1);return f(c,e)>-1}return!!p&&function(t){var e=!1;return n(l,(function(r,n){if(!e)try{e=r.call(t)===n}catch(t){}})),e}(t)}},7906:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},6635:function(t,e,r){var n;t=r.nmd(t),function(){var i,o="Expected a function",s="__lodash_hash_undefined__",a="__lodash_placeholder__",u=32,c=128,f=1/0,h=9007199254740991,l=NaN,p=4294967295,d=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",u],["partialRight",64],["rearg",256]],g="[object Arguments]",y="[object Array]",b="[object Boolean]",m="[object Date]",v="[object Error]",w="[object Function]",_="[object GeneratorFunction]",A="[object Map]",E="[object Number]",S="[object Object]",I="[object Promise]",k="[object RegExp]",x="[object Set]",M="[object String]",C="[object Symbol]",T="[object WeakMap]",O="[object ArrayBuffer]",P="[object DataView]",B="[object Float32Array]",R="[object Float64Array]",N="[object Int8Array]",U="[object Int16Array]",j="[object Int32Array]",L="[object Uint8Array]",D="[object Uint8ClampedArray]",F="[object Uint16Array]",q="[object Uint32Array]",H=/\b__p \+= '';/g,K=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,G=/&(?:amp|lt|gt|quot|#39);/g,z=/[&<>"']/g,W=RegExp(G.source),Q=RegExp(z.source),Y=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,$=/<%=([\s\S]+?)%>/g,Z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,tt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,et=/[\\^$.*+?()[\]{}|]/g,rt=RegExp(et.source),nt=/^\s+/,it=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,st=/\{\n\/\* \[wrapped with (.+)\] \*/,at=/,? & /,ut=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ct=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,lt=/\w*$/,pt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,yt=/^0o[0-7]+$/i,bt=/^(?:0|[1-9]\d*)$/,mt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,vt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,_t="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",At="a-z\\xdf-\\xf6\\xf8-\\xff",Et="A-Z\\xc0-\\xd6\\xd8-\\xde",St="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",It="["+St+"]",kt="["+_t+"]",xt="\\d+",Mt="["+At+"]",Ct="[^\\ud800-\\udfff"+St+xt+"\\u2700-\\u27bf"+At+Et+"]",Tt="\\ud83c[\\udffb-\\udfff]",Ot="[^\\ud800-\\udfff]",Pt="(?:\\ud83c[\\udde6-\\uddff]){2}",Bt="[\\ud800-\\udbff][\\udc00-\\udfff]",Rt="["+Et+"]",Nt="(?:"+Mt+"|"+Ct+")",Ut="(?:"+Rt+"|"+Ct+")",jt="(?:['’](?:d|ll|m|re|s|t|ve))?",Lt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Dt="(?:"+kt+"|"+Tt+")?",Ft="[\\ufe0e\\ufe0f]?",qt=Ft+Dt+"(?:\\u200d(?:"+[Ot,Pt,Bt].join("|")+")"+Ft+Dt+")*",Ht="(?:"+["[\\u2700-\\u27bf]",Pt,Bt].join("|")+")"+qt,Kt="(?:"+[Ot+kt+"?",kt,Pt,Bt,"[\\ud800-\\udfff]"].join("|")+")",Vt=RegExp("['’]","g"),Gt=RegExp(kt,"g"),zt=RegExp(Tt+"(?="+Tt+")|"+Kt+qt,"g"),Wt=RegExp([Rt+"?"+Mt+"+"+jt+"(?="+[It,Rt,"$"].join("|")+")",Ut+"+"+Lt+"(?="+[It,Rt+Nt,"$"].join("|")+")",Rt+"?"+Nt+"+"+jt,Rt+"+"+Lt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",xt,Ht].join("|"),"g"),Qt=RegExp("[\\u200d\\ud800-\\udfff"+_t+"\\ufe0e\\ufe0f]"),Yt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xt=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],$t=-1,Zt={};Zt[B]=Zt[R]=Zt[N]=Zt[U]=Zt[j]=Zt[L]=Zt[D]=Zt[F]=Zt[q]=!0,Zt[g]=Zt[y]=Zt[O]=Zt[b]=Zt[P]=Zt[m]=Zt[v]=Zt[w]=Zt[A]=Zt[E]=Zt[S]=Zt[k]=Zt[x]=Zt[M]=Zt[T]=!1;var Jt={};Jt[g]=Jt[y]=Jt[O]=Jt[P]=Jt[b]=Jt[m]=Jt[B]=Jt[R]=Jt[N]=Jt[U]=Jt[j]=Jt[A]=Jt[E]=Jt[S]=Jt[k]=Jt[x]=Jt[M]=Jt[C]=Jt[L]=Jt[D]=Jt[F]=Jt[q]=!0,Jt[v]=Jt[w]=Jt[T]=!1;var te={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ee=parseFloat,re=parseInt,ne="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g,ie="object"==typeof self&&self&&self.Object===Object&&self,oe=ne||ie||Function("return this")(),se=e&&!e.nodeType&&e,ae=se&&t&&!t.nodeType&&t,ue=ae&&ae.exports===se,ce=ue&&ne.process,fe=function(){try{return ae&&ae.require&&ae.require("util").types||ce&&ce.binding&&ce.binding("util")}catch(t){}}(),he=fe&&fe.isArrayBuffer,le=fe&&fe.isDate,pe=fe&&fe.isMap,de=fe&&fe.isRegExp,ge=fe&&fe.isSet,ye=fe&&fe.isTypedArray;function be(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function me(t,e,r,n){for(var i=-1,o=null==t?0:t.length;++i<o;){var s=t[i];e(n,s,r(s),t)}return n}function ve(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}function we(t,e){for(var r=null==t?0:t.length;r--&&!1!==e(t[r],r,t););return t}function _e(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(!e(t[r],r,t))return!1;return!0}function Ae(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}function Ee(t,e){return!(null==t||!t.length)&&Be(t,e,0)>-1}function Se(t,e,r){for(var n=-1,i=null==t?0:t.length;++n<i;)if(r(e,t[n]))return!0;return!1}function Ie(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}function ke(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}function xe(t,e,r,n){var i=-1,o=null==t?0:t.length;for(n&&o&&(r=t[++i]);++i<o;)r=e(r,t[i],i,t);return r}function Me(t,e,r,n){var i=null==t?0:t.length;for(n&&i&&(r=t[--i]);i--;)r=e(r,t[i],i,t);return r}function Ce(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}var Te=je("length");function Oe(t,e,r){var n;return r(t,(function(t,r,i){if(e(t,r,i))return n=r,!1})),n}function Pe(t,e,r,n){for(var i=t.length,o=r+(n?1:-1);n?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function Be(t,e,r){return e==e?function(t,e,r){for(var n=r-1,i=t.length;++n<i;)if(t[n]===e)return n;return-1}(t,e,r):Pe(t,Ne,r)}function Re(t,e,r,n){for(var i=r-1,o=t.length;++i<o;)if(n(t[i],e))return i;return-1}function Ne(t){return t!=t}function Ue(t,e){var r=null==t?0:t.length;return r?Fe(t,e)/r:l}function je(t){return function(e){return null==e?i:e[t]}}function Le(t){return function(e){return null==t?i:t[e]}}function De(t,e,r,n,i){return i(t,(function(t,i,o){r=n?(n=!1,t):e(r,t,i,o)})),r}function Fe(t,e){for(var r,n=-1,o=t.length;++n<o;){var s=e(t[n]);s!==i&&(r=r===i?s:r+s)}return r}function qe(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function He(t){return t?t.slice(0,sr(t)+1).replace(nt,""):t}function Ke(t){return function(e){return t(e)}}function Ve(t,e){return Ie(e,(function(e){return t[e]}))}function Ge(t,e){return t.has(e)}function ze(t,e){for(var r=-1,n=t.length;++r<n&&Be(e,t[r],0)>-1;);return r}function We(t,e){for(var r=t.length;r--&&Be(e,t[r],0)>-1;);return r}function Qe(t,e){for(var r=t.length,n=0;r--;)t[r]===e&&++n;return n}var Ye=Le({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Xe=Le({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function $e(t){return"\\"+te[t]}function Ze(t){return Qt.test(t)}function Je(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function tr(t,e){return function(r){return t(e(r))}}function er(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var s=t[r];s!==e&&s!==a||(t[r]=a,o[i++]=r)}return o}function rr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}function nr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=[t,t]})),r}function ir(t){return Ze(t)?function(t){for(var e=zt.lastIndex=0;zt.test(t);)++e;return e}(t):Te(t)}function or(t){return Ze(t)?function(t){return t.match(zt)||[]}(t):function(t){return t.split("")}(t)}function sr(t){for(var e=t.length;e--&&it.test(t.charAt(e)););return e}var ar=Le({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),ur=function t(e){var r,n=(e=null==e?oe:ur.defaults(oe.Object(),e,ur.pick(oe,Xt))).Array,it=e.Date,_t=e.Error,At=e.Function,Et=e.Math,St=e.Object,It=e.RegExp,kt=e.String,xt=e.TypeError,Mt=n.prototype,Ct=At.prototype,Tt=St.prototype,Ot=e["__core-js_shared__"],Pt=Ct.toString,Bt=Tt.hasOwnProperty,Rt=0,Nt=(r=/[^.]+$/.exec(Ot&&Ot.keys&&Ot.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",Ut=Tt.toString,jt=Pt.call(St),Lt=oe._,Dt=It("^"+Pt.call(Bt).replace(et,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ft=ue?e.Buffer:i,qt=e.Symbol,Ht=e.Uint8Array,Kt=Ft?Ft.allocUnsafe:i,zt=tr(St.getPrototypeOf,St),Qt=St.create,te=Tt.propertyIsEnumerable,ne=Mt.splice,ie=qt?qt.isConcatSpreadable:i,se=qt?qt.iterator:i,ae=qt?qt.toStringTag:i,ce=function(){try{var t=co(St,"defineProperty");return t({},"",{}),t}catch(t){}}(),fe=e.clearTimeout!==oe.clearTimeout&&e.clearTimeout,Te=it&&it.now!==oe.Date.now&&it.now,Le=e.setTimeout!==oe.setTimeout&&e.setTimeout,cr=Et.ceil,fr=Et.floor,hr=St.getOwnPropertySymbols,lr=Ft?Ft.isBuffer:i,pr=e.isFinite,dr=Mt.join,gr=tr(St.keys,St),yr=Et.max,br=Et.min,mr=it.now,vr=e.parseInt,wr=Et.random,_r=Mt.reverse,Ar=co(e,"DataView"),Er=co(e,"Map"),Sr=co(e,"Promise"),Ir=co(e,"Set"),kr=co(e,"WeakMap"),xr=co(St,"create"),Mr=kr&&new kr,Cr={},Tr=Do(Ar),Or=Do(Er),Pr=Do(Sr),Br=Do(Ir),Rr=Do(kr),Nr=qt?qt.prototype:i,Ur=Nr?Nr.valueOf:i,jr=Nr?Nr.toString:i;function Lr(t){if(ra(t)&&!Gs(t)&&!(t instanceof Hr)){if(t instanceof qr)return t;if(Bt.call(t,"__wrapped__"))return Fo(t)}return new qr(t)}var Dr=function(){function t(){}return function(e){if(!ea(e))return{};if(Qt)return Qt(e);t.prototype=e;var r=new t;return t.prototype=i,r}}();function Fr(){}function qr(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=i}function Hr(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=p,this.__views__=[]}function Kr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Vr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function Gr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function zr(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new Gr;++e<r;)this.add(t[e])}function Wr(t){var e=this.__data__=new Vr(t);this.size=e.size}function Qr(t,e){var r=Gs(t),n=!r&&Vs(t),i=!r&&!n&&Ys(t),o=!r&&!n&&!i&&fa(t),s=r||n||i||o,a=s?qe(t.length,kt):[],u=a.length;for(var c in t)!e&&!Bt.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||bo(c,u))||a.push(c);return a}function Yr(t){var e=t.length;return e?t[zn(0,e-1)]:i}function Xr(t,e){return Ro(xi(t),sn(e,0,t.length))}function $r(t){return Ro(xi(t))}function Zr(t,e,r){(r!==i&&!qs(t[e],r)||r===i&&!(e in t))&&nn(t,e,r)}function Jr(t,e,r){var n=t[e];Bt.call(t,e)&&qs(n,r)&&(r!==i||e in t)||nn(t,e,r)}function tn(t,e){for(var r=t.length;r--;)if(qs(t[r][0],e))return r;return-1}function en(t,e,r,n){return hn(t,(function(t,i,o){e(n,t,r(t),o)})),n}function rn(t,e){return t&&Mi(e,Pa(e),t)}function nn(t,e,r){"__proto__"==e&&ce?ce(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function on(t,e){for(var r=-1,o=e.length,s=n(o),a=null==t;++r<o;)s[r]=a?i:xa(t,e[r]);return s}function sn(t,e,r){return t==t&&(r!==i&&(t=t<=r?t:r),e!==i&&(t=t>=e?t:e)),t}function an(t,e,r,n,o,s){var a,u=1&e,c=2&e,f=4&e;if(r&&(a=o?r(t,n,o,s):r(t)),a!==i)return a;if(!ea(t))return t;var h=Gs(t);if(h){if(a=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Bt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!u)return xi(t,a)}else{var l=lo(t),p=l==w||l==_;if(Ys(t))return _i(t,u);if(l==S||l==g||p&&!o){if(a=c||p?{}:go(t),!u)return c?function(t,e){return Mi(t,ho(t),e)}(t,function(t,e){return t&&Mi(e,Ba(e),t)}(a,t)):function(t,e){return Mi(t,fo(t),e)}(t,rn(a,t))}else{if(!Jt[l])return o?t:{};a=function(t,e,r){var n,i=t.constructor;switch(e){case O:return Ai(t);case b:case m:return new i(+t);case P:return function(t,e){var r=e?Ai(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case B:case R:case N:case U:case j:case L:case D:case F:case q:return Ei(t,r);case A:return new i;case E:case M:return new i(t);case k:return function(t){var e=new t.constructor(t.source,lt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case x:return new i;case C:return n=t,Ur?St(Ur.call(n)):{}}}(t,l,u)}}s||(s=new Wr);var d=s.get(t);if(d)return d;s.set(t,a),aa(t)?t.forEach((function(n){a.add(an(n,e,r,n,t,s))})):na(t)&&t.forEach((function(n,i){a.set(i,an(n,e,r,i,t,s))}));var y=h?i:(f?c?ro:eo:c?Ba:Pa)(t);return ve(y||t,(function(n,i){y&&(n=t[i=n]),Jr(a,i,an(n,e,r,i,t,s))})),a}function un(t,e,r){var n=r.length;if(null==t)return!n;for(t=St(t);n--;){var o=r[n],s=e[o],a=t[o];if(a===i&&!(o in t)||!s(a))return!1}return!0}function cn(t,e,r){if("function"!=typeof t)throw new xt(o);return To((function(){t.apply(i,r)}),e)}function fn(t,e,r,n){var i=-1,o=Ee,s=!0,a=t.length,u=[],c=e.length;if(!a)return u;r&&(e=Ie(e,Ke(r))),n?(o=Se,s=!1):e.length>=200&&(o=Ge,s=!1,e=new zr(e));t:for(;++i<a;){var f=t[i],h=null==r?f:r(f);if(f=n||0!==f?f:0,s&&h==h){for(var l=c;l--;)if(e[l]===h)continue t;u.push(f)}else o(e,h,n)||u.push(f)}return u}Lr.templateSettings={escape:Y,evaluate:X,interpolate:$,variable:"",imports:{_:Lr}},Lr.prototype=Fr.prototype,Lr.prototype.constructor=Lr,qr.prototype=Dr(Fr.prototype),qr.prototype.constructor=qr,Hr.prototype=Dr(Fr.prototype),Hr.prototype.constructor=Hr,Kr.prototype.clear=function(){this.__data__=xr?xr(null):{},this.size=0},Kr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Kr.prototype.get=function(t){var e=this.__data__;if(xr){var r=e[t];return r===s?i:r}return Bt.call(e,t)?e[t]:i},Kr.prototype.has=function(t){var e=this.__data__;return xr?e[t]!==i:Bt.call(e,t)},Kr.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=xr&&e===i?s:e,this},Vr.prototype.clear=function(){this.__data__=[],this.size=0},Vr.prototype.delete=function(t){var e=this.__data__,r=tn(e,t);return!(r<0||(r==e.length-1?e.pop():ne.call(e,r,1),--this.size,0))},Vr.prototype.get=function(t){var e=this.__data__,r=tn(e,t);return r<0?i:e[r][1]},Vr.prototype.has=function(t){return tn(this.__data__,t)>-1},Vr.prototype.set=function(t,e){var r=this.__data__,n=tn(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},Gr.prototype.clear=function(){this.size=0,this.__data__={hash:new Kr,map:new(Er||Vr),string:new Kr}},Gr.prototype.delete=function(t){var e=ao(this,t).delete(t);return this.size-=e?1:0,e},Gr.prototype.get=function(t){return ao(this,t).get(t)},Gr.prototype.has=function(t){return ao(this,t).has(t)},Gr.prototype.set=function(t,e){var r=ao(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this},zr.prototype.add=zr.prototype.push=function(t){return this.__data__.set(t,s),this},zr.prototype.has=function(t){return this.__data__.has(t)},Wr.prototype.clear=function(){this.__data__=new Vr,this.size=0},Wr.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},Wr.prototype.get=function(t){return this.__data__.get(t)},Wr.prototype.has=function(t){return this.__data__.has(t)},Wr.prototype.set=function(t,e){var r=this.__data__;if(r instanceof Vr){var n=r.__data__;if(!Er||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Gr(n)}return r.set(t,e),this.size=r.size,this};var hn=Oi(vn),ln=Oi(wn,!0);function pn(t,e){var r=!0;return hn(t,(function(t,n,i){return r=!!e(t,n,i)})),r}function dn(t,e,r){for(var n=-1,o=t.length;++n<o;){var s=t[n],a=e(s);if(null!=a&&(u===i?a==a&&!ca(a):r(a,u)))var u=a,c=s}return c}function gn(t,e){var r=[];return hn(t,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}function yn(t,e,r,n,i){var o=-1,s=t.length;for(r||(r=yo),i||(i=[]);++o<s;){var a=t[o];e>0&&r(a)?e>1?yn(a,e-1,r,n,i):ke(i,a):n||(i[i.length]=a)}return i}var bn=Pi(),mn=Pi(!0);function vn(t,e){return t&&bn(t,e,Pa)}function wn(t,e){return t&&mn(t,e,Pa)}function _n(t,e){return Ae(e,(function(e){return Zs(t[e])}))}function An(t,e){for(var r=0,n=(e=bi(e,t)).length;null!=t&&r<n;)t=t[Lo(e[r++])];return r&&r==n?t:i}function En(t,e,r){var n=e(t);return Gs(t)?n:ke(n,r(t))}function Sn(t){return null==t?t===i?"[object Undefined]":"[object Null]":ae&&ae in St(t)?function(t){var e=Bt.call(t,ae),r=t[ae];try{t[ae]=i;var n=!0}catch(t){}var o=Ut.call(t);return n&&(e?t[ae]=r:delete t[ae]),o}(t):function(t){return Ut.call(t)}(t)}function In(t,e){return t>e}function kn(t,e){return null!=t&&Bt.call(t,e)}function xn(t,e){return null!=t&&e in St(t)}function Mn(t,e,r){for(var o=r?Se:Ee,s=t[0].length,a=t.length,u=a,c=n(a),f=1/0,h=[];u--;){var l=t[u];u&&e&&(l=Ie(l,Ke(e))),f=br(l.length,f),c[u]=!r&&(e||s>=120&&l.length>=120)?new zr(u&&l):i}l=t[0];var p=-1,d=c[0];t:for(;++p<s&&h.length<f;){var g=l[p],y=e?e(g):g;if(g=r||0!==g?g:0,!(d?Ge(d,y):o(h,y,r))){for(u=a;--u;){var b=c[u];if(!(b?Ge(b,y):o(t[u],y,r)))continue t}d&&d.push(y),h.push(g)}}return h}function Cn(t,e,r){var n=null==(t=ko(t,e=bi(e,t)))?t:t[Lo($o(e))];return null==n?i:be(n,t,r)}function Tn(t){return ra(t)&&Sn(t)==g}function On(t,e,r,n,o){return t===e||(null==t||null==e||!ra(t)&&!ra(e)?t!=t&&e!=e:function(t,e,r,n,o,s){var a=Gs(t),u=Gs(e),c=a?y:lo(t),f=u?y:lo(e),h=(c=c==g?S:c)==S,l=(f=f==g?S:f)==S,p=c==f;if(p&&Ys(t)){if(!Ys(e))return!1;a=!0,h=!1}if(p&&!h)return s||(s=new Wr),a||fa(t)?Ji(t,e,r,n,o,s):function(t,e,r,n,i,o,s){switch(r){case P:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case O:return!(t.byteLength!=e.byteLength||!o(new Ht(t),new Ht(e)));case b:case m:case E:return qs(+t,+e);case v:return t.name==e.name&&t.message==e.message;case k:case M:return t==e+"";case A:var a=Je;case x:var u=1&n;if(a||(a=rr),t.size!=e.size&&!u)return!1;var c=s.get(t);if(c)return c==e;n|=2,s.set(t,e);var f=Ji(a(t),a(e),n,i,o,s);return s.delete(t),f;case C:if(Ur)return Ur.call(t)==Ur.call(e)}return!1}(t,e,c,r,n,o,s);if(!(1&r)){var d=h&&Bt.call(t,"__wrapped__"),w=l&&Bt.call(e,"__wrapped__");if(d||w){var _=d?t.value():t,I=w?e.value():e;return s||(s=new Wr),o(_,I,r,n,s)}}return!!p&&(s||(s=new Wr),function(t,e,r,n,o,s){var a=1&r,u=eo(t),c=u.length;if(c!=eo(e).length&&!a)return!1;for(var f=c;f--;){var h=u[f];if(!(a?h in e:Bt.call(e,h)))return!1}var l=s.get(t),p=s.get(e);if(l&&p)return l==e&&p==t;var d=!0;s.set(t,e),s.set(e,t);for(var g=a;++f<c;){var y=t[h=u[f]],b=e[h];if(n)var m=a?n(b,y,h,e,t,s):n(y,b,h,t,e,s);if(!(m===i?y===b||o(y,b,r,n,s):m)){d=!1;break}g||(g="constructor"==h)}if(d&&!g){var v=t.constructor,w=e.constructor;v==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof v&&v instanceof v&&"function"==typeof w&&w instanceof w||(d=!1)}return s.delete(t),s.delete(e),d}(t,e,r,n,o,s))}(t,e,r,n,On,o))}function Pn(t,e,r,n){var o=r.length,s=o,a=!n;if(null==t)return!s;for(t=St(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var c=(u=r[o])[0],f=t[c],h=u[1];if(a&&u[2]){if(f===i&&!(c in t))return!1}else{var l=new Wr;if(n)var p=n(f,h,c,t,e,l);if(!(p===i?On(h,f,3,n,l):p))return!1}}return!0}function Bn(t){return!(!ea(t)||(e=t,Nt&&Nt in e))&&(Zs(t)?Dt:gt).test(Do(t));var e}function Rn(t){return"function"==typeof t?t:null==t?iu:"object"==typeof t?Gs(t)?Dn(t[0],t[1]):Ln(t):pu(t)}function Nn(t){if(!Ao(t))return gr(t);var e=[];for(var r in St(t))Bt.call(t,r)&&"constructor"!=r&&e.push(r);return e}function Un(t,e){return t<e}function jn(t,e){var r=-1,i=Ws(t)?n(t.length):[];return hn(t,(function(t,n,o){i[++r]=e(t,n,o)})),i}function Ln(t){var e=uo(t);return 1==e.length&&e[0][2]?So(e[0][0],e[0][1]):function(r){return r===t||Pn(r,t,e)}}function Dn(t,e){return vo(t)&&Eo(e)?So(Lo(t),e):function(r){var n=xa(r,t);return n===i&&n===e?Ma(r,t):On(e,n,3)}}function Fn(t,e,r,n,o){t!==e&&bn(e,(function(s,a){if(o||(o=new Wr),ea(s))!function(t,e,r,n,o,s,a){var u=Mo(t,r),c=Mo(e,r),f=a.get(c);if(f)Zr(t,r,f);else{var h=s?s(u,c,r+"",t,e,a):i,l=h===i;if(l){var p=Gs(c),d=!p&&Ys(c),g=!p&&!d&&fa(c);h=c,p||d||g?Gs(u)?h=u:Qs(u)?h=xi(u):d?(l=!1,h=_i(c,!0)):g?(l=!1,h=Ei(c,!0)):h=[]:oa(c)||Vs(c)?(h=u,Vs(u)?h=ma(u):ea(u)&&!Zs(u)||(h=go(c))):l=!1}l&&(a.set(c,h),o(h,c,n,s,a),a.delete(c)),Zr(t,r,h)}}(t,e,a,r,Fn,n,o);else{var u=n?n(Mo(t,a),s,a+"",t,e,o):i;u===i&&(u=s),Zr(t,a,u)}}),Ba)}function qn(t,e){var r=t.length;if(r)return bo(e+=e<0?r:0,r)?t[e]:i}function Hn(t,e,r){e=e.length?Ie(e,(function(t){return Gs(t)?function(e){return An(e,1===t.length?t[0]:t)}:t})):[iu];var n=-1;e=Ie(e,Ke(so()));var i=jn(t,(function(t,r,i){var o=Ie(e,(function(e){return e(t)}));return{criteria:o,index:++n,value:t}}));return function(t,e){var n=t.length;for(t.sort((function(t,e){return function(t,e,r){for(var n=-1,i=t.criteria,o=e.criteria,s=i.length,a=r.length;++n<s;){var u=Si(i[n],o[n]);if(u)return n>=a?u:u*("desc"==r[n]?-1:1)}return t.index-e.index}(t,e,r)}));n--;)t[n]=t[n].value;return t}(i)}function Kn(t,e,r){for(var n=-1,i=e.length,o={};++n<i;){var s=e[n],a=An(t,s);r(a,s)&&$n(o,bi(s,t),a)}return o}function Vn(t,e,r,n){var i=n?Re:Be,o=-1,s=e.length,a=t;for(t===e&&(e=xi(e)),r&&(a=Ie(t,Ke(r)));++o<s;)for(var u=0,c=e[o],f=r?r(c):c;(u=i(a,f,u,n))>-1;)a!==t&&ne.call(a,u,1),ne.call(t,u,1);return t}function Gn(t,e){for(var r=t?e.length:0,n=r-1;r--;){var i=e[r];if(r==n||i!==o){var o=i;bo(i)?ne.call(t,i,1):ci(t,i)}}return t}function zn(t,e){return t+fr(wr()*(e-t+1))}function Wn(t,e){var r="";if(!t||e<1||e>h)return r;do{e%2&&(r+=t),(e=fr(e/2))&&(t+=t)}while(e);return r}function Qn(t,e){return Oo(Io(t,e,iu),t+"")}function Yn(t){return Yr(qa(t))}function Xn(t,e){var r=qa(t);return Ro(r,sn(e,0,r.length))}function $n(t,e,r,n){if(!ea(t))return t;for(var o=-1,s=(e=bi(e,t)).length,a=s-1,u=t;null!=u&&++o<s;){var c=Lo(e[o]),f=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=a){var h=u[c];(f=n?n(h,c,u):i)===i&&(f=ea(h)?h:bo(e[o+1])?[]:{})}Jr(u,c,f),u=u[c]}return t}var Zn=Mr?function(t,e){return Mr.set(t,e),t}:iu,Jn=ce?function(t,e){return ce(t,"toString",{configurable:!0,enumerable:!1,value:eu(e),writable:!0})}:iu;function ti(t){return Ro(qa(t))}function ei(t,e,r){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var s=n(o);++i<o;)s[i]=t[i+e];return s}function ri(t,e){var r;return hn(t,(function(t,n,i){return!(r=e(t,n,i))})),!!r}function ni(t,e,r){var n=0,i=null==t?n:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;n<i;){var o=n+i>>>1,s=t[o];null!==s&&!ca(s)&&(r?s<=e:s<e)?n=o+1:i=o}return i}return ii(t,e,iu,r)}function ii(t,e,r,n){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var a=(e=r(e))!=e,u=null===e,c=ca(e),f=e===i;o<s;){var h=fr((o+s)/2),l=r(t[h]),p=l!==i,d=null===l,g=l==l,y=ca(l);if(a)var b=n||g;else b=f?g&&(n||p):u?g&&p&&(n||!d):c?g&&p&&!d&&(n||!y):!d&&!y&&(n?l<=e:l<e);b?o=h+1:s=h}return br(s,4294967294)}function oi(t,e){for(var r=-1,n=t.length,i=0,o=[];++r<n;){var s=t[r],a=e?e(s):s;if(!r||!qs(a,u)){var u=a;o[i++]=0===s?0:s}}return o}function si(t){return"number"==typeof t?t:ca(t)?l:+t}function ai(t){if("string"==typeof t)return t;if(Gs(t))return Ie(t,ai)+"";if(ca(t))return jr?jr.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ui(t,e,r){var n=-1,i=Ee,o=t.length,s=!0,a=[],u=a;if(r)s=!1,i=Se;else if(o>=200){var c=e?null:Wi(t);if(c)return rr(c);s=!1,i=Ge,u=new zr}else u=e?[]:a;t:for(;++n<o;){var f=t[n],h=e?e(f):f;if(f=r||0!==f?f:0,s&&h==h){for(var l=u.length;l--;)if(u[l]===h)continue t;e&&u.push(h),a.push(f)}else i(u,h,r)||(u!==a&&u.push(h),a.push(f))}return a}function ci(t,e){return null==(t=ko(t,e=bi(e,t)))||delete t[Lo($o(e))]}function fi(t,e,r,n){return $n(t,e,r(An(t,e)),n)}function hi(t,e,r,n){for(var i=t.length,o=n?i:-1;(n?o--:++o<i)&&e(t[o],o,t););return r?ei(t,n?0:o,n?o+1:i):ei(t,n?o+1:0,n?i:o)}function li(t,e){var r=t;return r instanceof Hr&&(r=r.value()),xe(e,(function(t,e){return e.func.apply(e.thisArg,ke([t],e.args))}),r)}function pi(t,e,r){var i=t.length;if(i<2)return i?ui(t[0]):[];for(var o=-1,s=n(i);++o<i;)for(var a=t[o],u=-1;++u<i;)u!=o&&(s[o]=fn(s[o]||a,t[u],e,r));return ui(yn(s,1),e,r)}function di(t,e,r){for(var n=-1,o=t.length,s=e.length,a={};++n<o;){var u=n<s?e[n]:i;r(a,t[n],u)}return a}function gi(t){return Qs(t)?t:[]}function yi(t){return"function"==typeof t?t:iu}function bi(t,e){return Gs(t)?t:vo(t,e)?[t]:jo(va(t))}var mi=Qn;function vi(t,e,r){var n=t.length;return r=r===i?n:r,!e&&r>=n?t:ei(t,e,r)}var wi=fe||function(t){return oe.clearTimeout(t)};function _i(t,e){if(e)return t.slice();var r=t.length,n=Kt?Kt(r):new t.constructor(r);return t.copy(n),n}function Ai(t){var e=new t.constructor(t.byteLength);return new Ht(e).set(new Ht(t)),e}function Ei(t,e){var r=e?Ai(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Si(t,e){if(t!==e){var r=t!==i,n=null===t,o=t==t,s=ca(t),a=e!==i,u=null===e,c=e==e,f=ca(e);if(!u&&!f&&!s&&t>e||s&&a&&c&&!u&&!f||n&&a&&c||!r&&c||!o)return 1;if(!n&&!s&&!f&&t<e||f&&r&&o&&!n&&!s||u&&r&&o||!a&&o||!c)return-1}return 0}function Ii(t,e,r,i){for(var o=-1,s=t.length,a=r.length,u=-1,c=e.length,f=yr(s-a,0),h=n(c+f),l=!i;++u<c;)h[u]=e[u];for(;++o<a;)(l||o<s)&&(h[r[o]]=t[o]);for(;f--;)h[u++]=t[o++];return h}function ki(t,e,r,i){for(var o=-1,s=t.length,a=-1,u=r.length,c=-1,f=e.length,h=yr(s-u,0),l=n(h+f),p=!i;++o<h;)l[o]=t[o];for(var d=o;++c<f;)l[d+c]=e[c];for(;++a<u;)(p||o<s)&&(l[d+r[a]]=t[o++]);return l}function xi(t,e){var r=-1,i=t.length;for(e||(e=n(i));++r<i;)e[r]=t[r];return e}function Mi(t,e,r,n){var o=!r;r||(r={});for(var s=-1,a=e.length;++s<a;){var u=e[s],c=n?n(r[u],t[u],u,r,t):i;c===i&&(c=t[u]),o?nn(r,u,c):Jr(r,u,c)}return r}function Ci(t,e){return function(r,n){var i=Gs(r)?me:en,o=e?e():{};return i(r,t,so(n,2),o)}}function Ti(t){return Qn((function(e,r){var n=-1,o=r.length,s=o>1?r[o-1]:i,a=o>2?r[2]:i;for(s=t.length>3&&"function"==typeof s?(o--,s):i,a&&mo(r[0],r[1],a)&&(s=o<3?i:s,o=1),e=St(e);++n<o;){var u=r[n];u&&t(e,u,n,s)}return e}))}function Oi(t,e){return function(r,n){if(null==r)return r;if(!Ws(r))return t(r,n);for(var i=r.length,o=e?i:-1,s=St(r);(e?o--:++o<i)&&!1!==n(s[o],o,s););return r}}function Pi(t){return function(e,r,n){for(var i=-1,o=St(e),s=n(e),a=s.length;a--;){var u=s[t?a:++i];if(!1===r(o[u],u,o))break}return e}}function Bi(t){return function(e){var r=Ze(e=va(e))?or(e):i,n=r?r[0]:e.charAt(0),o=r?vi(r,1).join(""):e.slice(1);return n[t]()+o}}function Ri(t){return function(e){return xe(Za(Va(e).replace(Vt,"")),t,"")}}function Ni(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var r=Dr(t.prototype),n=t.apply(r,e);return ea(n)?n:r}}function Ui(t){return function(e,r,n){var o=St(e);if(!Ws(e)){var s=so(r,3);e=Pa(e),r=function(t){return s(o[t],t,o)}}var a=t(e,r,n);return a>-1?o[s?e[a]:a]:i}}function ji(t){return to((function(e){var r=e.length,n=r,s=qr.prototype.thru;for(t&&e.reverse();n--;){var a=e[n];if("function"!=typeof a)throw new xt(o);if(s&&!u&&"wrapper"==io(a))var u=new qr([],!0)}for(n=u?n:r;++n<r;){var c=io(a=e[n]),f="wrapper"==c?no(a):i;u=f&&wo(f[0])&&424==f[1]&&!f[4].length&&1==f[9]?u[io(f[0])].apply(u,f[3]):1==a.length&&wo(a)?u[c]():u.thru(a)}return function(){var t=arguments,n=t[0];if(u&&1==t.length&&Gs(n))return u.plant(n).value();for(var i=0,o=r?e[i].apply(this,t):n;++i<r;)o=e[i].call(this,o);return o}}))}function Li(t,e,r,o,s,a,u,f,h,l){var p=e&c,d=1&e,g=2&e,y=24&e,b=512&e,m=g?i:Ni(t);return function i(){for(var c=arguments.length,v=n(c),w=c;w--;)v[w]=arguments[w];if(y)var _=oo(i),A=Qe(v,_);if(o&&(v=Ii(v,o,s,y)),a&&(v=ki(v,a,u,y)),c-=A,y&&c<l){var E=er(v,_);return Gi(t,e,Li,i.placeholder,r,v,E,f,h,l-c)}var S=d?r:this,I=g?S[t]:t;return c=v.length,f?v=xo(v,f):b&&c>1&&v.reverse(),p&&h<c&&(v.length=h),this&&this!==oe&&this instanceof i&&(I=m||Ni(I)),I.apply(S,v)}}function Di(t,e){return function(r,n){return function(t,e,r,n){return vn(t,(function(t,i,o){e(n,r(t),i,o)})),n}(r,t,e(n),{})}}function Fi(t,e){return function(r,n){var o;if(r===i&&n===i)return e;if(r!==i&&(o=r),n!==i){if(o===i)return n;"string"==typeof r||"string"==typeof n?(r=ai(r),n=ai(n)):(r=si(r),n=si(n)),o=t(r,n)}return o}}function qi(t){return to((function(e){return e=Ie(e,Ke(so())),Qn((function(r){var n=this;return t(e,(function(t){return be(t,n,r)}))}))}))}function Hi(t,e){var r=(e=e===i?" ":ai(e)).length;if(r<2)return r?Wn(e,t):e;var n=Wn(e,cr(t/ir(e)));return Ze(e)?vi(or(n),0,t).join(""):n.slice(0,t)}function Ki(t){return function(e,r,o){return o&&"number"!=typeof o&&mo(e,r,o)&&(r=o=i),e=da(e),r===i?(r=e,e=0):r=da(r),function(t,e,r,i){for(var o=-1,s=yr(cr((e-t)/(r||1)),0),a=n(s);s--;)a[i?s:++o]=t,t+=r;return a}(e,r,o=o===i?e<r?1:-1:da(o),t)}}function Vi(t){return function(e,r){return"string"==typeof e&&"string"==typeof r||(e=ba(e),r=ba(r)),t(e,r)}}function Gi(t,e,r,n,o,s,a,c,f,h){var l=8&e;e|=l?u:64,4&(e&=~(l?64:u))||(e&=-4);var p=[t,e,o,l?s:i,l?a:i,l?i:s,l?i:a,c,f,h],d=r.apply(i,p);return wo(t)&&Co(d,p),d.placeholder=n,Po(d,t,e)}function zi(t){var e=Et[t];return function(t,r){if(t=ba(t),(r=null==r?0:br(ga(r),292))&&pr(t)){var n=(va(t)+"e").split("e");return+((n=(va(e(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return e(t)}}var Wi=Ir&&1/rr(new Ir([,-0]))[1]==f?function(t){return new Ir(t)}:cu;function Qi(t){return function(e){var r=lo(e);return r==A?Je(e):r==x?nr(e):function(t,e){return Ie(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Yi(t,e,r,s,f,h,l,p){var d=2&e;if(!d&&"function"!=typeof t)throw new xt(o);var g=s?s.length:0;if(g||(e&=-97,s=f=i),l=l===i?l:yr(ga(l),0),p=p===i?p:ga(p),g-=f?f.length:0,64&e){var y=s,b=f;s=f=i}var m=d?i:no(t),v=[t,e,r,s,f,y,b,h,l,p];if(m&&function(t,e){var r=t[1],n=e[1],i=r|n,o=i<131,s=n==c&&8==r||n==c&&256==r&&t[7].length<=e[8]||384==n&&e[7].length<=e[8]&&8==r;if(!o&&!s)return t;1&n&&(t[2]=e[2],i|=1&r?0:4);var u=e[3];if(u){var f=t[3];t[3]=f?Ii(f,u,e[4]):u,t[4]=f?er(t[3],a):e[4]}(u=e[5])&&(f=t[5],t[5]=f?ki(f,u,e[6]):u,t[6]=f?er(t[5],a):e[6]),(u=e[7])&&(t[7]=u),n&c&&(t[8]=null==t[8]?e[8]:br(t[8],e[8])),null==t[9]&&(t[9]=e[9]),t[0]=e[0],t[1]=i}(v,m),t=v[0],e=v[1],r=v[2],s=v[3],f=v[4],!(p=v[9]=v[9]===i?d?0:t.length:yr(v[9]-g,0))&&24&e&&(e&=-25),e&&1!=e)w=8==e||16==e?function(t,e,r){var o=Ni(t);return function s(){for(var a=arguments.length,u=n(a),c=a,f=oo(s);c--;)u[c]=arguments[c];var h=a<3&&u[0]!==f&&u[a-1]!==f?[]:er(u,f);return(a-=h.length)<r?Gi(t,e,Li,s.placeholder,i,u,h,i,i,r-a):be(this&&this!==oe&&this instanceof s?o:t,this,u)}}(t,e,p):e!=u&&33!=e||f.length?Li.apply(i,v):function(t,e,r,i){var o=1&e,s=Ni(t);return function e(){for(var a=-1,u=arguments.length,c=-1,f=i.length,h=n(f+u),l=this&&this!==oe&&this instanceof e?s:t;++c<f;)h[c]=i[c];for(;u--;)h[c++]=arguments[++a];return be(l,o?r:this,h)}}(t,e,r,s);else var w=function(t,e,r){var n=1&e,i=Ni(t);return function e(){return(this&&this!==oe&&this instanceof e?i:t).apply(n?r:this,arguments)}}(t,e,r);return Po((m?Zn:Co)(w,v),t,e)}function Xi(t,e,r,n){return t===i||qs(t,Tt[r])&&!Bt.call(n,r)?e:t}function $i(t,e,r,n,o,s){return ea(t)&&ea(e)&&(s.set(e,t),Fn(t,e,i,$i,s),s.delete(e)),t}function Zi(t){return oa(t)?i:t}function Ji(t,e,r,n,o,s){var a=1&r,u=t.length,c=e.length;if(u!=c&&!(a&&c>u))return!1;var f=s.get(t),h=s.get(e);if(f&&h)return f==e&&h==t;var l=-1,p=!0,d=2&r?new zr:i;for(s.set(t,e),s.set(e,t);++l<u;){var g=t[l],y=e[l];if(n)var b=a?n(y,g,l,e,t,s):n(g,y,l,t,e,s);if(b!==i){if(b)continue;p=!1;break}if(d){if(!Ce(e,(function(t,e){if(!Ge(d,e)&&(g===t||o(g,t,r,n,s)))return d.push(e)}))){p=!1;break}}else if(g!==y&&!o(g,y,r,n,s)){p=!1;break}}return s.delete(t),s.delete(e),p}function to(t){return Oo(Io(t,i,zo),t+"")}function eo(t){return En(t,Pa,fo)}function ro(t){return En(t,Ba,ho)}var no=Mr?function(t){return Mr.get(t)}:cu;function io(t){for(var e=t.name+"",r=Cr[e],n=Bt.call(Cr,e)?r.length:0;n--;){var i=r[n],o=i.func;if(null==o||o==t)return i.name}return e}function oo(t){return(Bt.call(Lr,"placeholder")?Lr:t).placeholder}function so(){var t=Lr.iteratee||ou;return t=t===ou?Rn:t,arguments.length?t(arguments[0],arguments[1]):t}function ao(t,e){var r,n,i=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?i["string"==typeof e?"string":"hash"]:i.map}function uo(t){for(var e=Pa(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,Eo(i)]}return e}function co(t,e){var r=function(t,e){return null==t?i:t[e]}(t,e);return Bn(r)?r:i}var fo=hr?function(t){return null==t?[]:(t=St(t),Ae(hr(t),(function(e){return te.call(t,e)})))}:yu,ho=hr?function(t){for(var e=[];t;)ke(e,fo(t)),t=zt(t);return e}:yu,lo=Sn;function po(t,e,r){for(var n=-1,i=(e=bi(e,t)).length,o=!1;++n<i;){var s=Lo(e[n]);if(!(o=null!=t&&r(t,s)))break;t=t[s]}return o||++n!=i?o:!!(i=null==t?0:t.length)&&ta(i)&&bo(s,i)&&(Gs(t)||Vs(t))}function go(t){return"function"!=typeof t.constructor||Ao(t)?{}:Dr(zt(t))}function yo(t){return Gs(t)||Vs(t)||!!(ie&&t&&t[ie])}function bo(t,e){var r=typeof t;return!!(e=null==e?h:e)&&("number"==r||"symbol"!=r&&bt.test(t))&&t>-1&&t%1==0&&t<e}function mo(t,e,r){if(!ea(r))return!1;var n=typeof e;return!!("number"==n?Ws(r)&&bo(e,r.length):"string"==n&&e in r)&&qs(r[e],t)}function vo(t,e){if(Gs(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!ca(t))||J.test(t)||!Z.test(t)||null!=e&&t in St(e)}function wo(t){var e=io(t),r=Lr[e];if("function"!=typeof r||!(e in Hr.prototype))return!1;if(t===r)return!0;var n=no(r);return!!n&&t===n[0]}(Ar&&lo(new Ar(new ArrayBuffer(1)))!=P||Er&&lo(new Er)!=A||Sr&&lo(Sr.resolve())!=I||Ir&&lo(new Ir)!=x||kr&&lo(new kr)!=T)&&(lo=function(t){var e=Sn(t),r=e==S?t.constructor:i,n=r?Do(r):"";if(n)switch(n){case Tr:return P;case Or:return A;case Pr:return I;case Br:return x;case Rr:return T}return e});var _o=Ot?Zs:bu;function Ao(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Tt)}function Eo(t){return t==t&&!ea(t)}function So(t,e){return function(r){return null!=r&&r[t]===e&&(e!==i||t in St(r))}}function Io(t,e,r){return e=yr(e===i?t.length-1:e,0),function(){for(var i=arguments,o=-1,s=yr(i.length-e,0),a=n(s);++o<s;)a[o]=i[e+o];o=-1;for(var u=n(e+1);++o<e;)u[o]=i[o];return u[e]=r(a),be(t,this,u)}}function ko(t,e){return e.length<2?t:An(t,ei(e,0,-1))}function xo(t,e){for(var r=t.length,n=br(e.length,r),o=xi(t);n--;){var s=e[n];t[n]=bo(s,r)?o[s]:i}return t}function Mo(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var Co=Bo(Zn),To=Le||function(t,e){return oe.setTimeout(t,e)},Oo=Bo(Jn);function Po(t,e,r){var n=e+"";return Oo(t,function(t,e){var r=e.length;if(!r)return t;var n=r-1;return e[n]=(r>1?"& ":"")+e[n],e=e.join(r>2?", ":" "),t.replace(ot,"{\n/* [wrapped with "+e+"] */\n")}(n,function(t,e){return ve(d,(function(r){var n="_."+r[0];e&r[1]&&!Ee(t,n)&&t.push(n)})),t.sort()}(function(t){var e=t.match(st);return e?e[1].split(at):[]}(n),r)))}function Bo(t){var e=0,r=0;return function(){var n=mr(),o=16-(n-r);if(r=n,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(i,arguments)}}function Ro(t,e){var r=-1,n=t.length,o=n-1;for(e=e===i?n:e;++r<e;){var s=zn(r,o),a=t[s];t[s]=t[r],t[r]=a}return t.length=e,t}var No,Uo,jo=(No=Ns((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(tt,(function(t,r,n,i){e.push(n?i.replace(ft,"$1"):r||t)})),e}),(function(t){return 500===Uo.size&&Uo.clear(),t})),Uo=No.cache,No);function Lo(t){if("string"==typeof t||ca(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Do(t){if(null!=t){try{return Pt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Fo(t){if(t instanceof Hr)return t.clone();var e=new qr(t.__wrapped__,t.__chain__);return e.__actions__=xi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var qo=Qn((function(t,e){return Qs(t)?fn(t,yn(e,1,Qs,!0)):[]})),Ho=Qn((function(t,e){var r=$o(e);return Qs(r)&&(r=i),Qs(t)?fn(t,yn(e,1,Qs,!0),so(r,2)):[]})),Ko=Qn((function(t,e){var r=$o(e);return Qs(r)&&(r=i),Qs(t)?fn(t,yn(e,1,Qs,!0),i,r):[]}));function Vo(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:ga(r);return i<0&&(i=yr(n+i,0)),Pe(t,so(e,3),i)}function Go(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n-1;return r!==i&&(o=ga(r),o=r<0?yr(n+o,0):br(o,n-1)),Pe(t,so(e,3),o,!0)}function zo(t){return null!=t&&t.length?yn(t,1):[]}function Wo(t){return t&&t.length?t[0]:i}var Qo=Qn((function(t){var e=Ie(t,gi);return e.length&&e[0]===t[0]?Mn(e):[]})),Yo=Qn((function(t){var e=$o(t),r=Ie(t,gi);return e===$o(r)?e=i:r.pop(),r.length&&r[0]===t[0]?Mn(r,so(e,2)):[]})),Xo=Qn((function(t){var e=$o(t),r=Ie(t,gi);return(e="function"==typeof e?e:i)&&r.pop(),r.length&&r[0]===t[0]?Mn(r,i,e):[]}));function $o(t){var e=null==t?0:t.length;return e?t[e-1]:i}var Zo=Qn(Jo);function Jo(t,e){return t&&t.length&&e&&e.length?Vn(t,e):t}var ts=to((function(t,e){var r=null==t?0:t.length,n=on(t,e);return Gn(t,Ie(e,(function(t){return bo(t,r)?+t:t})).sort(Si)),n}));function es(t){return null==t?t:_r.call(t)}var rs=Qn((function(t){return ui(yn(t,1,Qs,!0))})),ns=Qn((function(t){var e=$o(t);return Qs(e)&&(e=i),ui(yn(t,1,Qs,!0),so(e,2))})),is=Qn((function(t){var e=$o(t);return e="function"==typeof e?e:i,ui(yn(t,1,Qs,!0),i,e)}));function os(t){if(!t||!t.length)return[];var e=0;return t=Ae(t,(function(t){if(Qs(t))return e=yr(t.length,e),!0})),qe(e,(function(e){return Ie(t,je(e))}))}function ss(t,e){if(!t||!t.length)return[];var r=os(t);return null==e?r:Ie(r,(function(t){return be(e,i,t)}))}var as=Qn((function(t,e){return Qs(t)?fn(t,e):[]})),us=Qn((function(t){return pi(Ae(t,Qs))})),cs=Qn((function(t){var e=$o(t);return Qs(e)&&(e=i),pi(Ae(t,Qs),so(e,2))})),fs=Qn((function(t){var e=$o(t);return e="function"==typeof e?e:i,pi(Ae(t,Qs),i,e)})),hs=Qn(os),ls=Qn((function(t){var e=t.length,r=e>1?t[e-1]:i;return r="function"==typeof r?(t.pop(),r):i,ss(t,r)}));function ps(t){var e=Lr(t);return e.__chain__=!0,e}function ds(t,e){return e(t)}var gs=to((function(t){var e=t.length,r=e?t[0]:0,n=this.__wrapped__,o=function(e){return on(e,t)};return!(e>1||this.__actions__.length)&&n instanceof Hr&&bo(r)?((n=n.slice(r,+r+(e?1:0))).__actions__.push({func:ds,args:[o],thisArg:i}),new qr(n,this.__chain__).thru((function(t){return e&&!t.length&&t.push(i),t}))):this.thru(o)})),ys=Ci((function(t,e,r){Bt.call(t,r)?++t[r]:nn(t,r,1)})),bs=Ui(Vo),ms=Ui(Go);function vs(t,e){return(Gs(t)?ve:hn)(t,so(e,3))}function ws(t,e){return(Gs(t)?we:ln)(t,so(e,3))}var _s=Ci((function(t,e,r){Bt.call(t,r)?t[r].push(e):nn(t,r,[e])})),As=Qn((function(t,e,r){var i=-1,o="function"==typeof e,s=Ws(t)?n(t.length):[];return hn(t,(function(t){s[++i]=o?be(e,t,r):Cn(t,e,r)})),s})),Es=Ci((function(t,e,r){nn(t,r,e)}));function Ss(t,e){return(Gs(t)?Ie:jn)(t,so(e,3))}var Is=Ci((function(t,e,r){t[r?0:1].push(e)}),(function(){return[[],[]]})),ks=Qn((function(t,e){if(null==t)return[];var r=e.length;return r>1&&mo(t,e[0],e[1])?e=[]:r>2&&mo(e[0],e[1],e[2])&&(e=[e[0]]),Hn(t,yn(e,1),[])})),xs=Te||function(){return oe.Date.now()};function Ms(t,e,r){return e=r?i:e,e=t&&null==e?t.length:e,Yi(t,c,i,i,i,i,e)}function Cs(t,e){var r;if("function"!=typeof e)throw new xt(o);return t=ga(t),function(){return--t>0&&(r=e.apply(this,arguments)),t<=1&&(e=i),r}}var Ts=Qn((function(t,e,r){var n=1;if(r.length){var i=er(r,oo(Ts));n|=u}return Yi(t,n,e,r,i)})),Os=Qn((function(t,e,r){var n=3;if(r.length){var i=er(r,oo(Os));n|=u}return Yi(e,n,t,r,i)}));function Ps(t,e,r){var n,s,a,u,c,f,h=0,l=!1,p=!1,d=!0;if("function"!=typeof t)throw new xt(o);function g(e){var r=n,o=s;return n=s=i,h=e,u=t.apply(o,r)}function y(t){return h=t,c=To(m,e),l?g(t):u}function b(t){var r=t-f;return f===i||r>=e||r<0||p&&t-h>=a}function m(){var t=xs();if(b(t))return v(t);c=To(m,function(t){var r=e-(t-f);return p?br(r,a-(t-h)):r}(t))}function v(t){return c=i,d&&n?g(t):(n=s=i,u)}function w(){var t=xs(),r=b(t);if(n=arguments,s=this,f=t,r){if(c===i)return y(f);if(p)return wi(c),c=To(m,e),g(f)}return c===i&&(c=To(m,e)),u}return e=ba(e)||0,ea(r)&&(l=!!r.leading,a=(p="maxWait"in r)?yr(ba(r.maxWait)||0,e):a,d="trailing"in r?!!r.trailing:d),w.cancel=function(){c!==i&&wi(c),h=0,n=f=s=c=i},w.flush=function(){return c===i?u:v(xs())},w}var Bs=Qn((function(t,e){return cn(t,1,e)})),Rs=Qn((function(t,e,r){return cn(t,ba(e)||0,r)}));function Ns(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new xt(o);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,n);return r.cache=o.set(i,s)||o,s};return r.cache=new(Ns.Cache||Gr),r}function Us(t){if("function"!=typeof t)throw new xt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ns.Cache=Gr;var js=mi((function(t,e){var r=(e=1==e.length&&Gs(e[0])?Ie(e[0],Ke(so())):Ie(yn(e,1),Ke(so()))).length;return Qn((function(n){for(var i=-1,o=br(n.length,r);++i<o;)n[i]=e[i].call(this,n[i]);return be(t,this,n)}))})),Ls=Qn((function(t,e){var r=er(e,oo(Ls));return Yi(t,u,i,e,r)})),Ds=Qn((function(t,e){var r=er(e,oo(Ds));return Yi(t,64,i,e,r)})),Fs=to((function(t,e){return Yi(t,256,i,i,i,e)}));function qs(t,e){return t===e||t!=t&&e!=e}var Hs=Vi(In),Ks=Vi((function(t,e){return t>=e})),Vs=Tn(function(){return arguments}())?Tn:function(t){return ra(t)&&Bt.call(t,"callee")&&!te.call(t,"callee")},Gs=n.isArray,zs=he?Ke(he):function(t){return ra(t)&&Sn(t)==O};function Ws(t){return null!=t&&ta(t.length)&&!Zs(t)}function Qs(t){return ra(t)&&Ws(t)}var Ys=lr||bu,Xs=le?Ke(le):function(t){return ra(t)&&Sn(t)==m};function $s(t){if(!ra(t))return!1;var e=Sn(t);return e==v||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!oa(t)}function Zs(t){if(!ea(t))return!1;var e=Sn(t);return e==w||e==_||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Js(t){return"number"==typeof t&&t==ga(t)}function ta(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function ea(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function ra(t){return null!=t&&"object"==typeof t}var na=pe?Ke(pe):function(t){return ra(t)&&lo(t)==A};function ia(t){return"number"==typeof t||ra(t)&&Sn(t)==E}function oa(t){if(!ra(t)||Sn(t)!=S)return!1;var e=zt(t);if(null===e)return!0;var r=Bt.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&Pt.call(r)==jt}var sa=de?Ke(de):function(t){return ra(t)&&Sn(t)==k},aa=ge?Ke(ge):function(t){return ra(t)&&lo(t)==x};function ua(t){return"string"==typeof t||!Gs(t)&&ra(t)&&Sn(t)==M}function ca(t){return"symbol"==typeof t||ra(t)&&Sn(t)==C}var fa=ye?Ke(ye):function(t){return ra(t)&&ta(t.length)&&!!Zt[Sn(t)]},ha=Vi(Un),la=Vi((function(t,e){return t<=e}));function pa(t){if(!t)return[];if(Ws(t))return ua(t)?or(t):xi(t);if(se&&t[se])return function(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}(t[se]());var e=lo(t);return(e==A?Je:e==x?rr:qa)(t)}function da(t){return t?(t=ba(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ga(t){var e=da(t),r=e%1;return e==e?r?e-r:e:0}function ya(t){return t?sn(ga(t),0,p):0}function ba(t){if("number"==typeof t)return t;if(ca(t))return l;if(ea(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ea(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=He(t);var r=dt.test(t);return r||yt.test(t)?re(t.slice(2),r?2:8):pt.test(t)?l:+t}function ma(t){return Mi(t,Ba(t))}function va(t){return null==t?"":ai(t)}var wa=Ti((function(t,e){if(Ao(e)||Ws(e))Mi(e,Pa(e),t);else for(var r in e)Bt.call(e,r)&&Jr(t,r,e[r])})),_a=Ti((function(t,e){Mi(e,Ba(e),t)})),Aa=Ti((function(t,e,r,n){Mi(e,Ba(e),t,n)})),Ea=Ti((function(t,e,r,n){Mi(e,Pa(e),t,n)})),Sa=to(on),Ia=Qn((function(t,e){t=St(t);var r=-1,n=e.length,o=n>2?e[2]:i;for(o&&mo(e[0],e[1],o)&&(n=1);++r<n;)for(var s=e[r],a=Ba(s),u=-1,c=a.length;++u<c;){var f=a[u],h=t[f];(h===i||qs(h,Tt[f])&&!Bt.call(t,f))&&(t[f]=s[f])}return t})),ka=Qn((function(t){return t.push(i,$i),be(Na,i,t)}));function xa(t,e,r){var n=null==t?i:An(t,e);return n===i?r:n}function Ma(t,e){return null!=t&&po(t,e,xn)}var Ca=Di((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Ut.call(e)),t[e]=r}),eu(iu)),Ta=Di((function(t,e,r){null!=e&&"function"!=typeof e.toString&&(e=Ut.call(e)),Bt.call(t,e)?t[e].push(r):t[e]=[r]}),so),Oa=Qn(Cn);function Pa(t){return Ws(t)?Qr(t):Nn(t)}function Ba(t){return Ws(t)?Qr(t,!0):function(t){if(!ea(t))return function(t){var e=[];if(null!=t)for(var r in St(t))e.push(r);return e}(t);var e=Ao(t),r=[];for(var n in t)("constructor"!=n||!e&&Bt.call(t,n))&&r.push(n);return r}(t)}var Ra=Ti((function(t,e,r){Fn(t,e,r)})),Na=Ti((function(t,e,r,n){Fn(t,e,r,n)})),Ua=to((function(t,e){var r={};if(null==t)return r;var n=!1;e=Ie(e,(function(e){return e=bi(e,t),n||(n=e.length>1),e})),Mi(t,ro(t),r),n&&(r=an(r,7,Zi));for(var i=e.length;i--;)ci(r,e[i]);return r})),ja=to((function(t,e){return null==t?{}:function(t,e){return Kn(t,e,(function(e,r){return Ma(t,r)}))}(t,e)}));function La(t,e){if(null==t)return{};var r=Ie(ro(t),(function(t){return[t]}));return e=so(e),Kn(t,r,(function(t,r){return e(t,r[0])}))}var Da=Qi(Pa),Fa=Qi(Ba);function qa(t){return null==t?[]:Ve(t,Pa(t))}var Ha=Ri((function(t,e,r){return e=e.toLowerCase(),t+(r?Ka(e):e)}));function Ka(t){return $a(va(t).toLowerCase())}function Va(t){return(t=va(t))&&t.replace(mt,Ye).replace(Gt,"")}var Ga=Ri((function(t,e,r){return t+(r?"-":"")+e.toLowerCase()})),za=Ri((function(t,e,r){return t+(r?" ":"")+e.toLowerCase()})),Wa=Bi("toLowerCase"),Qa=Ri((function(t,e,r){return t+(r?"_":"")+e.toLowerCase()})),Ya=Ri((function(t,e,r){return t+(r?" ":"")+$a(e)})),Xa=Ri((function(t,e,r){return t+(r?" ":"")+e.toUpperCase()})),$a=Bi("toUpperCase");function Za(t,e,r){return t=va(t),(e=r?i:e)===i?function(t){return Yt.test(t)}(t)?function(t){return t.match(Wt)||[]}(t):function(t){return t.match(ut)||[]}(t):t.match(e)||[]}var Ja=Qn((function(t,e){try{return be(t,i,e)}catch(t){return $s(t)?t:new _t(t)}})),tu=to((function(t,e){return ve(e,(function(e){e=Lo(e),nn(t,e,Ts(t[e],t))})),t}));function eu(t){return function(){return t}}var ru=ji(),nu=ji(!0);function iu(t){return t}function ou(t){return Rn("function"==typeof t?t:an(t,1))}var su=Qn((function(t,e){return function(r){return Cn(r,t,e)}})),au=Qn((function(t,e){return function(r){return Cn(t,r,e)}}));function uu(t,e,r){var n=Pa(e),i=_n(e,n);null!=r||ea(e)&&(i.length||!n.length)||(r=e,e=t,t=this,i=_n(e,Pa(e)));var o=!(ea(r)&&"chain"in r&&!r.chain),s=Zs(t);return ve(i,(function(r){var n=e[r];t[r]=n,s&&(t.prototype[r]=function(){var e=this.__chain__;if(o||e){var r=t(this.__wrapped__),i=r.__actions__=xi(this.__actions__);return i.push({func:n,args:arguments,thisArg:t}),r.__chain__=e,r}return n.apply(t,ke([this.value()],arguments))})})),t}function cu(){}var fu=qi(Ie),hu=qi(_e),lu=qi(Ce);function pu(t){return vo(t)?je(Lo(t)):function(t){return function(e){return An(e,t)}}(t)}var du=Ki(),gu=Ki(!0);function yu(){return[]}function bu(){return!1}var mu,vu=Fi((function(t,e){return t+e}),0),wu=zi("ceil"),_u=Fi((function(t,e){return t/e}),1),Au=zi("floor"),Eu=Fi((function(t,e){return t*e}),1),Su=zi("round"),Iu=Fi((function(t,e){return t-e}),0);return Lr.after=function(t,e){if("function"!=typeof e)throw new xt(o);return t=ga(t),function(){if(--t<1)return e.apply(this,arguments)}},Lr.ary=Ms,Lr.assign=wa,Lr.assignIn=_a,Lr.assignInWith=Aa,Lr.assignWith=Ea,Lr.at=Sa,Lr.before=Cs,Lr.bind=Ts,Lr.bindAll=tu,Lr.bindKey=Os,Lr.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Gs(t)?t:[t]},Lr.chain=ps,Lr.chunk=function(t,e,r){e=(r?mo(t,e,r):e===i)?1:yr(ga(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var s=0,a=0,u=n(cr(o/e));s<o;)u[a++]=ei(t,s,s+=e);return u},Lr.compact=function(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e<r;){var o=t[e];o&&(i[n++]=o)}return i},Lr.concat=function(){var t=arguments.length;if(!t)return[];for(var e=n(t-1),r=arguments[0],i=t;i--;)e[i-1]=arguments[i];return ke(Gs(r)?xi(r):[r],yn(e,1))},Lr.cond=function(t){var e=null==t?0:t.length,r=so();return t=e?Ie(t,(function(t){if("function"!=typeof t[1])throw new xt(o);return[r(t[0]),t[1]]})):[],Qn((function(r){for(var n=-1;++n<e;){var i=t[n];if(be(i[0],this,r))return be(i[1],this,r)}}))},Lr.conforms=function(t){return function(t){var e=Pa(t);return function(r){return un(r,t,e)}}(an(t,1))},Lr.constant=eu,Lr.countBy=ys,Lr.create=function(t,e){var r=Dr(t);return null==e?r:rn(r,e)},Lr.curry=function t(e,r,n){var o=Yi(e,8,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Lr.curryRight=function t(e,r,n){var o=Yi(e,16,i,i,i,i,i,r=n?i:r);return o.placeholder=t.placeholder,o},Lr.debounce=Ps,Lr.defaults=Ia,Lr.defaultsDeep=ka,Lr.defer=Bs,Lr.delay=Rs,Lr.difference=qo,Lr.differenceBy=Ho,Lr.differenceWith=Ko,Lr.drop=function(t,e,r){var n=null==t?0:t.length;return n?ei(t,(e=r||e===i?1:ga(e))<0?0:e,n):[]},Lr.dropRight=function(t,e,r){var n=null==t?0:t.length;return n?ei(t,0,(e=n-(e=r||e===i?1:ga(e)))<0?0:e):[]},Lr.dropRightWhile=function(t,e){return t&&t.length?hi(t,so(e,3),!0,!0):[]},Lr.dropWhile=function(t,e){return t&&t.length?hi(t,so(e,3),!0):[]},Lr.fill=function(t,e,r,n){var o=null==t?0:t.length;return o?(r&&"number"!=typeof r&&mo(t,e,r)&&(r=0,n=o),function(t,e,r,n){var o=t.length;for((r=ga(r))<0&&(r=-r>o?0:o+r),(n=n===i||n>o?o:ga(n))<0&&(n+=o),n=r>n?0:ya(n);r<n;)t[r++]=e;return t}(t,e,r,n)):[]},Lr.filter=function(t,e){return(Gs(t)?Ae:gn)(t,so(e,3))},Lr.flatMap=function(t,e){return yn(Ss(t,e),1)},Lr.flatMapDeep=function(t,e){return yn(Ss(t,e),f)},Lr.flatMapDepth=function(t,e,r){return r=r===i?1:ga(r),yn(Ss(t,e),r)},Lr.flatten=zo,Lr.flattenDeep=function(t){return null!=t&&t.length?yn(t,f):[]},Lr.flattenDepth=function(t,e){return null!=t&&t.length?yn(t,e=e===i?1:ga(e)):[]},Lr.flip=function(t){return Yi(t,512)},Lr.flow=ru,Lr.flowRight=nu,Lr.fromPairs=function(t){for(var e=-1,r=null==t?0:t.length,n={};++e<r;){var i=t[e];n[i[0]]=i[1]}return n},Lr.functions=function(t){return null==t?[]:_n(t,Pa(t))},Lr.functionsIn=function(t){return null==t?[]:_n(t,Ba(t))},Lr.groupBy=_s,Lr.initial=function(t){return null!=t&&t.length?ei(t,0,-1):[]},Lr.intersection=Qo,Lr.intersectionBy=Yo,Lr.intersectionWith=Xo,Lr.invert=Ca,Lr.invertBy=Ta,Lr.invokeMap=As,Lr.iteratee=ou,Lr.keyBy=Es,Lr.keys=Pa,Lr.keysIn=Ba,Lr.map=Ss,Lr.mapKeys=function(t,e){var r={};return e=so(e,3),vn(t,(function(t,n,i){nn(r,e(t,n,i),t)})),r},Lr.mapValues=function(t,e){var r={};return e=so(e,3),vn(t,(function(t,n,i){nn(r,n,e(t,n,i))})),r},Lr.matches=function(t){return Ln(an(t,1))},Lr.matchesProperty=function(t,e){return Dn(t,an(e,1))},Lr.memoize=Ns,Lr.merge=Ra,Lr.mergeWith=Na,Lr.method=su,Lr.methodOf=au,Lr.mixin=uu,Lr.negate=Us,Lr.nthArg=function(t){return t=ga(t),Qn((function(e){return qn(e,t)}))},Lr.omit=Ua,Lr.omitBy=function(t,e){return La(t,Us(so(e)))},Lr.once=function(t){return Cs(2,t)},Lr.orderBy=function(t,e,r,n){return null==t?[]:(Gs(e)||(e=null==e?[]:[e]),Gs(r=n?i:r)||(r=null==r?[]:[r]),Hn(t,e,r))},Lr.over=fu,Lr.overArgs=js,Lr.overEvery=hu,Lr.overSome=lu,Lr.partial=Ls,Lr.partialRight=Ds,Lr.partition=Is,Lr.pick=ja,Lr.pickBy=La,Lr.property=pu,Lr.propertyOf=function(t){return function(e){return null==t?i:An(t,e)}},Lr.pull=Zo,Lr.pullAll=Jo,Lr.pullAllBy=function(t,e,r){return t&&t.length&&e&&e.length?Vn(t,e,so(r,2)):t},Lr.pullAllWith=function(t,e,r){return t&&t.length&&e&&e.length?Vn(t,e,i,r):t},Lr.pullAt=ts,Lr.range=du,Lr.rangeRight=gu,Lr.rearg=Fs,Lr.reject=function(t,e){return(Gs(t)?Ae:gn)(t,Us(so(e,3)))},Lr.remove=function(t,e){var r=[];if(!t||!t.length)return r;var n=-1,i=[],o=t.length;for(e=so(e,3);++n<o;){var s=t[n];e(s,n,t)&&(r.push(s),i.push(n))}return Gn(t,i),r},Lr.rest=function(t,e){if("function"!=typeof t)throw new xt(o);return Qn(t,e=e===i?e:ga(e))},Lr.reverse=es,Lr.sampleSize=function(t,e,r){return e=(r?mo(t,e,r):e===i)?1:ga(e),(Gs(t)?Xr:Xn)(t,e)},Lr.set=function(t,e,r){return null==t?t:$n(t,e,r)},Lr.setWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:$n(t,e,r,n)},Lr.shuffle=function(t){return(Gs(t)?$r:ti)(t)},Lr.slice=function(t,e,r){var n=null==t?0:t.length;return n?(r&&"number"!=typeof r&&mo(t,e,r)?(e=0,r=n):(e=null==e?0:ga(e),r=r===i?n:ga(r)),ei(t,e,r)):[]},Lr.sortBy=ks,Lr.sortedUniq=function(t){return t&&t.length?oi(t):[]},Lr.sortedUniqBy=function(t,e){return t&&t.length?oi(t,so(e,2)):[]},Lr.split=function(t,e,r){return r&&"number"!=typeof r&&mo(t,e,r)&&(e=r=i),(r=r===i?p:r>>>0)?(t=va(t))&&("string"==typeof e||null!=e&&!sa(e))&&!(e=ai(e))&&Ze(t)?vi(or(t),0,r):t.split(e,r):[]},Lr.spread=function(t,e){if("function"!=typeof t)throw new xt(o);return e=null==e?0:yr(ga(e),0),Qn((function(r){var n=r[e],i=vi(r,0,e);return n&&ke(i,n),be(t,this,i)}))},Lr.tail=function(t){var e=null==t?0:t.length;return e?ei(t,1,e):[]},Lr.take=function(t,e,r){return t&&t.length?ei(t,0,(e=r||e===i?1:ga(e))<0?0:e):[]},Lr.takeRight=function(t,e,r){var n=null==t?0:t.length;return n?ei(t,(e=n-(e=r||e===i?1:ga(e)))<0?0:e,n):[]},Lr.takeRightWhile=function(t,e){return t&&t.length?hi(t,so(e,3),!1,!0):[]},Lr.takeWhile=function(t,e){return t&&t.length?hi(t,so(e,3)):[]},Lr.tap=function(t,e){return e(t),t},Lr.throttle=function(t,e,r){var n=!0,i=!0;if("function"!=typeof t)throw new xt(o);return ea(r)&&(n="leading"in r?!!r.leading:n,i="trailing"in r?!!r.trailing:i),Ps(t,e,{leading:n,maxWait:e,trailing:i})},Lr.thru=ds,Lr.toArray=pa,Lr.toPairs=Da,Lr.toPairsIn=Fa,Lr.toPath=function(t){return Gs(t)?Ie(t,Lo):ca(t)?[t]:xi(jo(va(t)))},Lr.toPlainObject=ma,Lr.transform=function(t,e,r){var n=Gs(t),i=n||Ys(t)||fa(t);if(e=so(e,4),null==r){var o=t&&t.constructor;r=i?n?new o:[]:ea(t)&&Zs(o)?Dr(zt(t)):{}}return(i?ve:vn)(t,(function(t,n,i){return e(r,t,n,i)})),r},Lr.unary=function(t){return Ms(t,1)},Lr.union=rs,Lr.unionBy=ns,Lr.unionWith=is,Lr.uniq=function(t){return t&&t.length?ui(t):[]},Lr.uniqBy=function(t,e){return t&&t.length?ui(t,so(e,2)):[]},Lr.uniqWith=function(t,e){return e="function"==typeof e?e:i,t&&t.length?ui(t,i,e):[]},Lr.unset=function(t,e){return null==t||ci(t,e)},Lr.unzip=os,Lr.unzipWith=ss,Lr.update=function(t,e,r){return null==t?t:fi(t,e,yi(r))},Lr.updateWith=function(t,e,r,n){return n="function"==typeof n?n:i,null==t?t:fi(t,e,yi(r),n)},Lr.values=qa,Lr.valuesIn=function(t){return null==t?[]:Ve(t,Ba(t))},Lr.without=as,Lr.words=Za,Lr.wrap=function(t,e){return Ls(yi(e),t)},Lr.xor=us,Lr.xorBy=cs,Lr.xorWith=fs,Lr.zip=hs,Lr.zipObject=function(t,e){return di(t||[],e||[],Jr)},Lr.zipObjectDeep=function(t,e){return di(t||[],e||[],$n)},Lr.zipWith=ls,Lr.entries=Da,Lr.entriesIn=Fa,Lr.extend=_a,Lr.extendWith=Aa,uu(Lr,Lr),Lr.add=vu,Lr.attempt=Ja,Lr.camelCase=Ha,Lr.capitalize=Ka,Lr.ceil=wu,Lr.clamp=function(t,e,r){return r===i&&(r=e,e=i),r!==i&&(r=(r=ba(r))==r?r:0),e!==i&&(e=(e=ba(e))==e?e:0),sn(ba(t),e,r)},Lr.clone=function(t){return an(t,4)},Lr.cloneDeep=function(t){return an(t,5)},Lr.cloneDeepWith=function(t,e){return an(t,5,e="function"==typeof e?e:i)},Lr.cloneWith=function(t,e){return an(t,4,e="function"==typeof e?e:i)},Lr.conformsTo=function(t,e){return null==e||un(t,e,Pa(e))},Lr.deburr=Va,Lr.defaultTo=function(t,e){return null==t||t!=t?e:t},Lr.divide=_u,Lr.endsWith=function(t,e,r){t=va(t),e=ai(e);var n=t.length,o=r=r===i?n:sn(ga(r),0,n);return(r-=e.length)>=0&&t.slice(r,o)==e},Lr.eq=qs,Lr.escape=function(t){return(t=va(t))&&Q.test(t)?t.replace(z,Xe):t},Lr.escapeRegExp=function(t){return(t=va(t))&&rt.test(t)?t.replace(et,"\\$&"):t},Lr.every=function(t,e,r){var n=Gs(t)?_e:pn;return r&&mo(t,e,r)&&(e=i),n(t,so(e,3))},Lr.find=bs,Lr.findIndex=Vo,Lr.findKey=function(t,e){return Oe(t,so(e,3),vn)},Lr.findLast=ms,Lr.findLastIndex=Go,Lr.findLastKey=function(t,e){return Oe(t,so(e,3),wn)},Lr.floor=Au,Lr.forEach=vs,Lr.forEachRight=ws,Lr.forIn=function(t,e){return null==t?t:bn(t,so(e,3),Ba)},Lr.forInRight=function(t,e){return null==t?t:mn(t,so(e,3),Ba)},Lr.forOwn=function(t,e){return t&&vn(t,so(e,3))},Lr.forOwnRight=function(t,e){return t&&wn(t,so(e,3))},Lr.get=xa,Lr.gt=Hs,Lr.gte=Ks,Lr.has=function(t,e){return null!=t&&po(t,e,kn)},Lr.hasIn=Ma,Lr.head=Wo,Lr.identity=iu,Lr.includes=function(t,e,r,n){t=Ws(t)?t:qa(t),r=r&&!n?ga(r):0;var i=t.length;return r<0&&(r=yr(i+r,0)),ua(t)?r<=i&&t.indexOf(e,r)>-1:!!i&&Be(t,e,r)>-1},Lr.indexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var i=null==r?0:ga(r);return i<0&&(i=yr(n+i,0)),Be(t,e,i)},Lr.inRange=function(t,e,r){return e=da(e),r===i?(r=e,e=0):r=da(r),function(t,e,r){return t>=br(e,r)&&t<yr(e,r)}(t=ba(t),e,r)},Lr.invoke=Oa,Lr.isArguments=Vs,Lr.isArray=Gs,Lr.isArrayBuffer=zs,Lr.isArrayLike=Ws,Lr.isArrayLikeObject=Qs,Lr.isBoolean=function(t){return!0===t||!1===t||ra(t)&&Sn(t)==b},Lr.isBuffer=Ys,Lr.isDate=Xs,Lr.isElement=function(t){return ra(t)&&1===t.nodeType&&!oa(t)},Lr.isEmpty=function(t){if(null==t)return!0;if(Ws(t)&&(Gs(t)||"string"==typeof t||"function"==typeof t.splice||Ys(t)||fa(t)||Vs(t)))return!t.length;var e=lo(t);if(e==A||e==x)return!t.size;if(Ao(t))return!Nn(t).length;for(var r in t)if(Bt.call(t,r))return!1;return!0},Lr.isEqual=function(t,e){return On(t,e)},Lr.isEqualWith=function(t,e,r){var n=(r="function"==typeof r?r:i)?r(t,e):i;return n===i?On(t,e,i,r):!!n},Lr.isError=$s,Lr.isFinite=function(t){return"number"==typeof t&&pr(t)},Lr.isFunction=Zs,Lr.isInteger=Js,Lr.isLength=ta,Lr.isMap=na,Lr.isMatch=function(t,e){return t===e||Pn(t,e,uo(e))},Lr.isMatchWith=function(t,e,r){return r="function"==typeof r?r:i,Pn(t,e,uo(e),r)},Lr.isNaN=function(t){return ia(t)&&t!=+t},Lr.isNative=function(t){if(_o(t))throw new _t("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Bn(t)},Lr.isNil=function(t){return null==t},Lr.isNull=function(t){return null===t},Lr.isNumber=ia,Lr.isObject=ea,Lr.isObjectLike=ra,Lr.isPlainObject=oa,Lr.isRegExp=sa,Lr.isSafeInteger=function(t){return Js(t)&&t>=-9007199254740991&&t<=h},Lr.isSet=aa,Lr.isString=ua,Lr.isSymbol=ca,Lr.isTypedArray=fa,Lr.isUndefined=function(t){return t===i},Lr.isWeakMap=function(t){return ra(t)&&lo(t)==T},Lr.isWeakSet=function(t){return ra(t)&&"[object WeakSet]"==Sn(t)},Lr.join=function(t,e){return null==t?"":dr.call(t,e)},Lr.kebabCase=Ga,Lr.last=$o,Lr.lastIndexOf=function(t,e,r){var n=null==t?0:t.length;if(!n)return-1;var o=n;return r!==i&&(o=(o=ga(r))<0?yr(n+o,0):br(o,n-1)),e==e?function(t,e,r){for(var n=r+1;n--;)if(t[n]===e)return n;return n}(t,e,o):Pe(t,Ne,o,!0)},Lr.lowerCase=za,Lr.lowerFirst=Wa,Lr.lt=ha,Lr.lte=la,Lr.max=function(t){return t&&t.length?dn(t,iu,In):i},Lr.maxBy=function(t,e){return t&&t.length?dn(t,so(e,2),In):i},Lr.mean=function(t){return Ue(t,iu)},Lr.meanBy=function(t,e){return Ue(t,so(e,2))},Lr.min=function(t){return t&&t.length?dn(t,iu,Un):i},Lr.minBy=function(t,e){return t&&t.length?dn(t,so(e,2),Un):i},Lr.stubArray=yu,Lr.stubFalse=bu,Lr.stubObject=function(){return{}},Lr.stubString=function(){return""},Lr.stubTrue=function(){return!0},Lr.multiply=Eu,Lr.nth=function(t,e){return t&&t.length?qn(t,ga(e)):i},Lr.noConflict=function(){return oe._===this&&(oe._=Lt),this},Lr.noop=cu,Lr.now=xs,Lr.pad=function(t,e,r){t=va(t);var n=(e=ga(e))?ir(t):0;if(!e||n>=e)return t;var i=(e-n)/2;return Hi(fr(i),r)+t+Hi(cr(i),r)},Lr.padEnd=function(t,e,r){t=va(t);var n=(e=ga(e))?ir(t):0;return e&&n<e?t+Hi(e-n,r):t},Lr.padStart=function(t,e,r){t=va(t);var n=(e=ga(e))?ir(t):0;return e&&n<e?Hi(e-n,r)+t:t},Lr.parseInt=function(t,e,r){return r||null==e?e=0:e&&(e=+e),vr(va(t).replace(nt,""),e||0)},Lr.random=function(t,e,r){if(r&&"boolean"!=typeof r&&mo(t,e,r)&&(e=r=i),r===i&&("boolean"==typeof e?(r=e,e=i):"boolean"==typeof t&&(r=t,t=i)),t===i&&e===i?(t=0,e=1):(t=da(t),e===i?(e=t,t=0):e=da(e)),t>e){var n=t;t=e,e=n}if(r||t%1||e%1){var o=wr();return br(t+o*(e-t+ee("1e-"+((o+"").length-1))),e)}return zn(t,e)},Lr.reduce=function(t,e,r){var n=Gs(t)?xe:De,i=arguments.length<3;return n(t,so(e,4),r,i,hn)},Lr.reduceRight=function(t,e,r){var n=Gs(t)?Me:De,i=arguments.length<3;return n(t,so(e,4),r,i,ln)},Lr.repeat=function(t,e,r){return e=(r?mo(t,e,r):e===i)?1:ga(e),Wn(va(t),e)},Lr.replace=function(){var t=arguments,e=va(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Lr.result=function(t,e,r){var n=-1,o=(e=bi(e,t)).length;for(o||(o=1,t=i);++n<o;){var s=null==t?i:t[Lo(e[n])];s===i&&(n=o,s=r),t=Zs(s)?s.call(t):s}return t},Lr.round=Su,Lr.runInContext=t,Lr.sample=function(t){return(Gs(t)?Yr:Yn)(t)},Lr.size=function(t){if(null==t)return 0;if(Ws(t))return ua(t)?ir(t):t.length;var e=lo(t);return e==A||e==x?t.size:Nn(t).length},Lr.snakeCase=Qa,Lr.some=function(t,e,r){var n=Gs(t)?Ce:ri;return r&&mo(t,e,r)&&(e=i),n(t,so(e,3))},Lr.sortedIndex=function(t,e){return ni(t,e)},Lr.sortedIndexBy=function(t,e,r){return ii(t,e,so(r,2))},Lr.sortedIndexOf=function(t,e){var r=null==t?0:t.length;if(r){var n=ni(t,e);if(n<r&&qs(t[n],e))return n}return-1},Lr.sortedLastIndex=function(t,e){return ni(t,e,!0)},Lr.sortedLastIndexBy=function(t,e,r){return ii(t,e,so(r,2),!0)},Lr.sortedLastIndexOf=function(t,e){if(null!=t&&t.length){var r=ni(t,e,!0)-1;if(qs(t[r],e))return r}return-1},Lr.startCase=Ya,Lr.startsWith=function(t,e,r){return t=va(t),r=null==r?0:sn(ga(r),0,t.length),e=ai(e),t.slice(r,r+e.length)==e},Lr.subtract=Iu,Lr.sum=function(t){return t&&t.length?Fe(t,iu):0},Lr.sumBy=function(t,e){return t&&t.length?Fe(t,so(e,2)):0},Lr.template=function(t,e,r){var n=Lr.templateSettings;r&&mo(t,e,r)&&(e=i),t=va(t),e=Aa({},e,n,Xi);var o,s,a=Aa({},e.imports,n.imports,Xi),u=Pa(a),c=Ve(a,u),f=0,h=e.interpolate||vt,l="__p += '",p=It((e.escape||vt).source+"|"+h.source+"|"+(h===$?ht:vt).source+"|"+(e.evaluate||vt).source+"|$","g"),d="//# sourceURL="+(Bt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++$t+"]")+"\n";t.replace(p,(function(e,r,n,i,a,u){return n||(n=i),l+=t.slice(f,u).replace(wt,$e),r&&(o=!0,l+="' +\n__e("+r+") +\n'"),a&&(s=!0,l+="';\n"+a+";\n__p += '"),n&&(l+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),f=u+e.length,e})),l+="';\n";var g=Bt.call(e,"variable")&&e.variable;if(g){if(ct.test(g))throw new _t("Invalid `variable` option passed into `_.template`")}else l="with (obj) {\n"+l+"\n}\n";l=(s?l.replace(H,""):l).replace(K,"$1").replace(V,"$1;"),l="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var y=Ja((function(){return At(u,d+"return "+l).apply(i,c)}));if(y.source=l,$s(y))throw y;return y},Lr.times=function(t,e){if((t=ga(t))<1||t>h)return[];var r=p,n=br(t,p);e=so(e),t-=p;for(var i=qe(n,e);++r<t;)e(r);return i},Lr.toFinite=da,Lr.toInteger=ga,Lr.toLength=ya,Lr.toLower=function(t){return va(t).toLowerCase()},Lr.toNumber=ba,Lr.toSafeInteger=function(t){return t?sn(ga(t),-9007199254740991,h):0===t?t:0},Lr.toString=va,Lr.toUpper=function(t){return va(t).toUpperCase()},Lr.trim=function(t,e,r){if((t=va(t))&&(r||e===i))return He(t);if(!t||!(e=ai(e)))return t;var n=or(t),o=or(e);return vi(n,ze(n,o),We(n,o)+1).join("")},Lr.trimEnd=function(t,e,r){if((t=va(t))&&(r||e===i))return t.slice(0,sr(t)+1);if(!t||!(e=ai(e)))return t;var n=or(t);return vi(n,0,We(n,or(e))+1).join("")},Lr.trimStart=function(t,e,r){if((t=va(t))&&(r||e===i))return t.replace(nt,"");if(!t||!(e=ai(e)))return t;var n=or(t);return vi(n,ze(n,or(e))).join("")},Lr.truncate=function(t,e){var r=30,n="...";if(ea(e)){var o="separator"in e?e.separator:o;r="length"in e?ga(e.length):r,n="omission"in e?ai(e.omission):n}var s=(t=va(t)).length;if(Ze(t)){var a=or(t);s=a.length}if(r>=s)return t;var u=r-ir(n);if(u<1)return n;var c=a?vi(a,0,u).join(""):t.slice(0,u);if(o===i)return c+n;if(a&&(u+=c.length-u),sa(o)){if(t.slice(u).search(o)){var f,h=c;for(o.global||(o=It(o.source,va(lt.exec(o))+"g")),o.lastIndex=0;f=o.exec(h);)var l=f.index;c=c.slice(0,l===i?u:l)}}else if(t.indexOf(ai(o),u)!=u){var p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+n},Lr.unescape=function(t){return(t=va(t))&&W.test(t)?t.replace(G,ar):t},Lr.uniqueId=function(t){var e=++Rt;return va(t)+e},Lr.upperCase=Xa,Lr.upperFirst=$a,Lr.each=vs,Lr.eachRight=ws,Lr.first=Wo,uu(Lr,(mu={},vn(Lr,(function(t,e){Bt.call(Lr.prototype,e)||(mu[e]=t)})),mu),{chain:!1}),Lr.VERSION="4.17.21",ve(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Lr[t].placeholder=Lr})),ve(["drop","take"],(function(t,e){Hr.prototype[t]=function(r){r=r===i?1:yr(ga(r),0);var n=this.__filtered__&&!e?new Hr(this):this.clone();return n.__filtered__?n.__takeCount__=br(r,n.__takeCount__):n.__views__.push({size:br(r,p),type:t+(n.__dir__<0?"Right":"")}),n},Hr.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),ve(["filter","map","takeWhile"],(function(t,e){var r=e+1,n=1==r||3==r;Hr.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:so(t,3),type:r}),e.__filtered__=e.__filtered__||n,e}})),ve(["head","last"],(function(t,e){var r="take"+(e?"Right":"");Hr.prototype[t]=function(){return this[r](1).value()[0]}})),ve(["initial","tail"],(function(t,e){var r="drop"+(e?"":"Right");Hr.prototype[t]=function(){return this.__filtered__?new Hr(this):this[r](1)}})),Hr.prototype.compact=function(){return this.filter(iu)},Hr.prototype.find=function(t){return this.filter(t).head()},Hr.prototype.findLast=function(t){return this.reverse().find(t)},Hr.prototype.invokeMap=Qn((function(t,e){return"function"==typeof t?new Hr(this):this.map((function(r){return Cn(r,t,e)}))})),Hr.prototype.reject=function(t){return this.filter(Us(so(t)))},Hr.prototype.slice=function(t,e){t=ga(t);var r=this;return r.__filtered__&&(t>0||e<0)?new Hr(r):(t<0?r=r.takeRight(-t):t&&(r=r.drop(t)),e!==i&&(r=(e=ga(e))<0?r.dropRight(-e):r.take(e-t)),r)},Hr.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Hr.prototype.toArray=function(){return this.take(p)},vn(Hr.prototype,(function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),n=/^(?:head|last)$/.test(e),o=Lr[n?"take"+("last"==e?"Right":""):e],s=n||/^find/.test(e);o&&(Lr.prototype[e]=function(){var e=this.__wrapped__,a=n?[1]:arguments,u=e instanceof Hr,c=a[0],f=u||Gs(e),h=function(t){var e=o.apply(Lr,ke([t],a));return n&&l?e[0]:e};f&&r&&"function"==typeof c&&1!=c.length&&(u=f=!1);var l=this.__chain__,p=!!this.__actions__.length,d=s&&!l,g=u&&!p;if(!s&&f){e=g?e:new Hr(this);var y=t.apply(e,a);return y.__actions__.push({func:ds,args:[h],thisArg:i}),new qr(y,l)}return d&&g?t.apply(this,a):(y=this.thru(h),d?n?y.value()[0]:y.value():y)})})),ve(["pop","push","shift","sort","splice","unshift"],(function(t){var e=Mt[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",n=/^(?:pop|shift)$/.test(t);Lr.prototype[t]=function(){var t=arguments;if(n&&!this.__chain__){var i=this.value();return e.apply(Gs(i)?i:[],t)}return this[r]((function(r){return e.apply(Gs(r)?r:[],t)}))}})),vn(Hr.prototype,(function(t,e){var r=Lr[e];if(r){var n=r.name+"";Bt.call(Cr,n)||(Cr[n]=[]),Cr[n].push({name:e,func:r})}})),Cr[Li(i,2).name]=[{name:"wrapper",func:i}],Hr.prototype.clone=function(){var t=new Hr(this.__wrapped__);return t.__actions__=xi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=xi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=xi(this.__views__),t},Hr.prototype.reverse=function(){if(this.__filtered__){var t=new Hr(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Hr.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,r=Gs(t),n=e<0,i=r?t.length:0,o=function(t,e,r){for(var n=-1,i=r.length;++n<i;){var o=r[n],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=br(e,t+s);break;case"takeRight":t=yr(t,e-s)}}return{start:t,end:e}}(0,i,this.__views__),s=o.start,a=o.end,u=a-s,c=n?a:s-1,f=this.__iteratees__,h=f.length,l=0,p=br(u,this.__takeCount__);if(!r||!n&&i==u&&p==u)return li(t,this.__actions__);var d=[];t:for(;u--&&l<p;){for(var g=-1,y=t[c+=e];++g<h;){var b=f[g],m=b.iteratee,v=b.type,w=m(y);if(2==v)y=w;else if(!w){if(1==v)continue t;break t}}d[l++]=y}return d},Lr.prototype.at=gs,Lr.prototype.chain=function(){return ps(this)},Lr.prototype.commit=function(){return new qr(this.value(),this.__chain__)},Lr.prototype.next=function(){this.__values__===i&&(this.__values__=pa(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?i:this.__values__[this.__index__++]}},Lr.prototype.plant=function(t){for(var e,r=this;r instanceof Fr;){var n=Fo(r);n.__index__=0,n.__values__=i,e?o.__wrapped__=n:e=n;var o=n;r=r.__wrapped__}return o.__wrapped__=t,e},Lr.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Hr){var e=t;return this.__actions__.length&&(e=new Hr(this)),(e=e.reverse()).__actions__.push({func:ds,args:[es],thisArg:i}),new qr(e,this.__chain__)}return this.thru(es)},Lr.prototype.toJSON=Lr.prototype.valueOf=Lr.prototype.value=function(){return li(this.__wrapped__,this.__actions__)},Lr.prototype.first=Lr.prototype.head,se&&(Lr.prototype[se]=function(){return this}),Lr}();oe._=ur,(n=function(){return ur}.call(e,r,e,t))===i||(t.exports=n)}.call(this)},7993:(t,e,r)=>{"use strict";var n=r(1285),i=r(4485),o=r(7834).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(t,e){return t<<e|t>>>32-e}function c(t,e,r,n,i,o,s){return u(t+(e&r|~e&n)+i+o|0,s)+e|0}function f(t,e,r,n,i,o,s){return u(t+(e&n|r&~n)+i+o|0,s)+e|0}function h(t,e,r,n,i,o,s){return u(t+(e^r^n)+i+o|0,s)+e|0}function l(t,e,r,n,i,o,s){return u(t+(r^(e|~n))+i+o|0,s)+e|0}n(a,i),a.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,t[0],3614090360,7),o=c(o,r,n,i,t[1],3905402710,12),i=c(i,o,r,n,t[2],606105819,17),n=c(n,i,o,r,t[3],3250441966,22),r=c(r,n,i,o,t[4],4118548399,7),o=c(o,r,n,i,t[5],1200080426,12),i=c(i,o,r,n,t[6],2821735955,17),n=c(n,i,o,r,t[7],4249261313,22),r=c(r,n,i,o,t[8],1770035416,7),o=c(o,r,n,i,t[9],2336552879,12),i=c(i,o,r,n,t[10],4294925233,17),n=c(n,i,o,r,t[11],2304563134,22),r=c(r,n,i,o,t[12],1804603682,7),o=c(o,r,n,i,t[13],4254626195,12),i=c(i,o,r,n,t[14],2792965006,17),r=f(r,n=c(n,i,o,r,t[15],1236535329,22),i,o,t[1],4129170786,5),o=f(o,r,n,i,t[6],3225465664,9),i=f(i,o,r,n,t[11],643717713,14),n=f(n,i,o,r,t[0],3921069994,20),r=f(r,n,i,o,t[5],3593408605,5),o=f(o,r,n,i,t[10],38016083,9),i=f(i,o,r,n,t[15],3634488961,14),n=f(n,i,o,r,t[4],3889429448,20),r=f(r,n,i,o,t[9],568446438,5),o=f(o,r,n,i,t[14],3275163606,9),i=f(i,o,r,n,t[3],4107603335,14),n=f(n,i,o,r,t[8],1163531501,20),r=f(r,n,i,o,t[13],2850285829,5),o=f(o,r,n,i,t[2],4243563512,9),i=f(i,o,r,n,t[7],1735328473,14),r=h(r,n=f(n,i,o,r,t[12],2368359562,20),i,o,t[5],4294588738,4),o=h(o,r,n,i,t[8],2272392833,11),i=h(i,o,r,n,t[11],1839030562,16),n=h(n,i,o,r,t[14],4259657740,23),r=h(r,n,i,o,t[1],2763975236,4),o=h(o,r,n,i,t[4],1272893353,11),i=h(i,o,r,n,t[7],4139469664,16),n=h(n,i,o,r,t[10],3200236656,23),r=h(r,n,i,o,t[13],681279174,4),o=h(o,r,n,i,t[0],3936430074,11),i=h(i,o,r,n,t[3],3572445317,16),n=h(n,i,o,r,t[6],76029189,23),r=h(r,n,i,o,t[9],3654602809,4),o=h(o,r,n,i,t[12],3873151461,11),i=h(i,o,r,n,t[15],530742520,16),r=l(r,n=h(n,i,o,r,t[2],3299628645,23),i,o,t[0],4096336452,6),o=l(o,r,n,i,t[7],1126891415,10),i=l(i,o,r,n,t[14],2878612391,15),n=l(n,i,o,r,t[5],4237533241,21),r=l(r,n,i,o,t[12],1700485571,6),o=l(o,r,n,i,t[3],2399980690,10),i=l(i,o,r,n,t[10],4293915773,15),n=l(n,i,o,r,t[1],2240044497,21),r=l(r,n,i,o,t[8],1873313359,6),o=l(o,r,n,i,t[15],4264355552,10),i=l(i,o,r,n,t[6],2734768916,15),n=l(n,i,o,r,t[13],1309151649,21),r=l(r,n,i,o,t[4],4149444226,6),o=l(o,r,n,i,t[11],3174756917,10),i=l(i,o,r,n,t[2],718787259,15),n=l(n,i,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=o.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t},t.exports=a},7332:(t,e,r)=>{var n=r(8834).Buffer;t.exports=function(t,e){if(!Array.isArray(t))throw TypeError("Expected values Array");if("function"!=typeof e)throw TypeError("Expected digest Function");for(var r=t.length,i=t.concat();r>1;){for(var o=0,s=0;s<r;s+=2,++o){var a=i[s],u=s+1===r?a:i[s+1],c=n.concat([a,u]);i[o]=e(c)}r=o}return i[0]}},6676:(t,e,r)=>{var n=r(2197),i=r(2745);function o(t){this.rand=t||new i.Rand}t.exports=o,o.create=function(t){return new o(t)},o.prototype._randbelow=function(t){var e=t.bitLength(),r=Math.ceil(e/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(t)>=0);return i},o.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},o.prototype.test=function(t,e,r){var i=t.bitLength(),o=n.mont(t),s=new n(1).toRed(o);e||(e=Math.max(1,i/48|0));for(var a=t.subn(1),u=0;!a.testn(u);u++);for(var c=t.shrn(u),f=a.toRed(o);e>0;e--){var h=this._randrange(new n(2),a);r&&r(h);var l=h.toRed(o).redPow(c);if(0!==l.cmp(s)&&0!==l.cmp(f)){for(var p=1;p<u;p++){if(0===(l=l.redSqr()).cmp(s))return!1;if(0===l.cmp(f))break}if(p===u)return!1}}return!0},o.prototype.getDivisor=function(t,e){var r=t.bitLength(),i=n.mont(t),o=new n(1).toRed(i);e||(e=Math.max(1,r/48|0));for(var s=t.subn(1),a=0;!s.testn(a);a++);for(var u=t.shrn(a),c=s.toRed(i);e>0;e--){var f=this._randrange(new n(2),s),h=t.gcd(f);if(0!==h.cmpn(1))return h;var l=f.toRed(i).redPow(u);if(0!==l.cmp(o)&&0!==l.cmp(c)){for(var p=1;p<a;p++){if(0===(l=l.redSqr()).cmp(o))return l.fromRed().subn(1).gcd(t);if(0===l.cmp(c))break}if(p===a)return(l=l.redSqr()).fromRed().subn(1).gcd(t)}}return!1}},9561:t=>{function e(t,e){if(!t)throw new Error(e||"Assertion failed")}t.exports=e,e.equal=function(t,e,r){if(t!=e)throw new Error(r||"Assertion failed: "+t+" != "+e)}},3022:(t,e)=>{"use strict";var r=e;function n(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",r=0;r<t.length;r++)e+=n(t[r].toString(16));return e}r.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"!=typeof t){for(var n=0;n<t.length;n++)r[n]=0|t[n];return r}if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n<t.length;n+=2)r.push(parseInt(t[n]+t[n+1],16));else for(n=0;n<t.length;n++){var i=t.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(t,e){return"hex"===e?i(t):t}},8546:t=>{function e(t,e){if(!t)throw new Error(e||"AssertionError")}e.notEqual=function(t,r,n){e(t!=r,n)},e.notOk=function(t,r){e(!t,r)},e.equal=function(t,r,n){e(t==r,n)},e.ok=e,t.exports=e},4365:(t,e,r)=>{"use strict";var n=r(4406);Object.defineProperty(e,"__esModule",{value:!0}),e.verifyBatch=e.aggregateSignatures=e.aggregatePublicKeys=e.verify=e.sign=e.getPublicKey=e.pairing=e.PointG2=e.clearCofactorG2=e.PointG1=e.hash_to_field=e.utils=e.CURVE=e.Fq12=e.Fq2=e.Fr=e.Fq=e.DST_LABEL=void 0;const i=r(1824);Object.defineProperty(e,"Fq",{enumerable:!0,get:function(){return i.Fq}}),Object.defineProperty(e,"Fr",{enumerable:!0,get:function(){return i.Fr}}),Object.defineProperty(e,"Fq2",{enumerable:!0,get:function(){return i.Fq2}}),Object.defineProperty(e,"Fq12",{enumerable:!0,get:function(){return i.Fq12}}),Object.defineProperty(e,"CURVE",{enumerable:!0,get:function(){return i.CURVE}});const o=i.CURVE.P;e.DST_LABEL="BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_";const s=2n**381n,a=2n*s,u=2n*a,c=32n;function f(t){return BigInt(`0x${t}`)}function h(t){if("string"==typeof t)return f(t);let e=0n;for(let r=t.length-1,n=0;r>=0;r--,n++)e+=(255n&BigInt(t[r]))<<8n*BigInt(n);return e}e.utils={async sha256(t){if("object"==typeof window&&"crypto"in window){const e=await window.crypto.subtle.digest("SHA-256",t.buffer);return new Uint8Array(e)}if("object"==typeof n&&"node"in n.versions){const{createHash:e}=r(5634),n=e("sha256");return n.update(t),Uint8Array.from(n.digest())}throw new Error("The environment doesn't have sha256 function")},mod:i.mod};const l={};for(let t=0;t<256;t++)l[t.toString(16).padStart(2,"0")]=t;function p(t,e=0){let r="string"==typeof t?t.toLowerCase():t.toString(16);if(!r.length&&!e)return new Uint8Array([]);1&r.length&&(r=`0${r}`);const n=r.length,i=new Uint8Array(n/2);for(let t=0,e=0;t<n-1;t+=2,e++){const n=r[t]+r[t+1],o=l[n];if(null==o)throw new Error(`Expected hex string or Uint8Array, got ${r}`);i[e]=o}return function(t,e,r){if(t.length>=e)return t;const n=e-t.length,i=Array(n).fill(0).map((t=>t));return d(new Uint8Array(i),t)}(i,e)}function d(...t){return new Uint8Array(t.reduce(((t,e)=>(e=e instanceof Uint8Array?e:p(e),[...t,...e])),[]))}function g(t){let e=0n;for(let r=0;r<t.length;r++)e<<=8n,e+=BigInt(t[r]);return e}function y(t,e){if(t<0||t>=1<<8*e)throw new Error(`bad I2OSP call: value=${t} length=${e}`);const r=Array.from({length:e}).fill(0);for(let n=e-1;n>=0;n--)r[n]=255&t,t>>>=8;return new Uint8Array(r)}function b(t,e){const r=new Uint8Array(t.length);for(let n=0;n<t.length;n++)r[n]=t[n]^e[n];return r}async function m(t,r,n=!0){const o=n?2:1,s=r,a=o*s*64,u=function(t){const e=new Uint8Array(t.length);for(let r=0;r<t.length;r++)e[r]=t.charCodeAt(r);return e}(e.DST_LABEL),f=await async function(t,r,n){const i=e.utils.sha256,o=Number(c),s=2*o,a=Math.ceil(n/o);if(a>255)throw new Error("Invalid xmd length");const u=d(r,y(r.length,1)),f=y(0,s),h=y(n,2),l=new Array(a),p=await i(d(f,t,h,y(0,1),u));l[0]=await i(d(p,y(1,1),u));for(let t=1;t<=a;t++){const e=[b(p,l[t-1]),y(t+1,1),u];l[t]=await i(d(...e))}return d(...l).slice(0,n)}(t,u,a),h=new Array(o);for(let t=0;t<o;t++){const e=new Array(s);for(let r=0;r<s;r++){const n=64*(r+t*s),o=f.slice(n,n+64);e[r]=i.mod(g(o),i.CURVE.P)}h[t]=e}return h}function v(t){const e=new i.Fq("string"==typeof(r=t)?f(r):"number"==typeof r?BigInt(r):r instanceof Uint8Array?h(r):r);var r;if(e.isZero())throw new Error("Private key cannot be 0");return e}e.hash_to_field=m;class w extends i.ProjectivePoint{constructor(t,e,r){super(t,e,r,i.Fq)}static fromCompressedHex(t){const e=h(t);if(1n===i.mod(e,u)/a)return this.ZERO;const r=i.mod(e,s),n=i.mod(r**3n+new i.Fq(i.CURVE.b).value,o);let c=i.powMod(n,(o+1n)/4n,o);if(i.powMod(c,2n,o)-n!==0n)throw new Error("The given point is not on G1: y**2 = x**3 + b");const f=i.mod(e,a)/s;return 2n*c/o!==f&&(c=o-c),new w(new i.Fq(r),new i.Fq(c),new i.Fq(1n))}static fromPrivateKey(t){return this.BASE.multiply(v(t))}toCompressedHex(){let t;if(this.equals(w.ZERO))t=u+a;else{const[e,r]=this.toAffine(),n=2n*r.value/o;t=e.value+n*s+u}return p(t,48)}assertValidity(){const t=new i.Fq(i.CURVE.b);if(this.isZero())return;const{x:e,y:r,z:n}=this,o=r.pow(2n).multiply(n).subtract(e.pow(3n)),s=t.multiply(n.pow(3n));if(!o.equals(s))throw new Error("Invalid point: not on curve over Fq")}millerLoop(t){return i.millerLoop(t.pairingPrecomputes(),this.toAffine())}}function _(t){const e=t.multiplyUnsafe(i.CURVE.x).negate(),r=t.fromAffineTuple(i.psi(...t.toAffine()));return t.fromAffineTuple(i.psi2(...t.double().toAffine())).subtract(r).add(e.add(r).multiplyUnsafe(i.CURVE.x).negate()).subtract(e).subtract(t)}e.PointG1=w,w.BASE=new w(new i.Fq(i.CURVE.Gx),new i.Fq(i.CURVE.Gy),i.Fq.ONE),w.ZERO=new w(i.Fq.ONE,i.Fq.ONE,i.Fq.ZERO),e.clearCofactorG2=_;class A extends i.ProjectivePoint{constructor(t,e,r){super(t,e,r,i.Fq2)}static async hashToCurve(t){"string"==typeof t&&(t=p(t));const e=await m(t,2),r=new A(...i.isogenyMapG2(i.map_to_curve_SSWU_G2(e[0]))),n=new A(...i.isogenyMapG2(i.map_to_curve_SSWU_G2(e[1])));return _(r.add(n))}static fromSignature(t){const e=t.length/2;if(48!==e&&96!==e)throw new Error("Invalid compressed signature length, must be 48/96");const r=h(t.slice(0,e)),n=h(t.slice(e));if(1n===i.mod(r,u)/a)return this.ZERO;const c=r%s,f=n,l=new i.Fq2([f,c]);let p=l.pow(3n).add(new i.Fq2(i.CURVE.b2)).sqrt();if(!p)throw new Error("Failed to find a square root");const[d,g]=p.values,y=r%a/s;(g>0n&&2n*g/o!==y||0n===g&&2n*d/o!==y)&&(p=p.multiply(-1n));const b=new A(l,p,i.Fq2.ONE);return b.assertValidity(),b}static fromPrivateKey(t){return this.BASE.multiply(v(t))}toSignature(){if(this.equals(A.ZERO))return d(p(u+a,48),p(0n,48));this.assertValidity();const[[t,e],[r,n]]=this.toAffine().map((t=>t.values)),o=t;return d(p(e+(n>0n?2n*n:2n*r)/i.CURVE.P*s+u,48),p(o,48))}assertValidity(){const t=new i.Fq2(i.CURVE.b2);if(this.isZero())return;const{x:e,y:r,z:n}=this,o=r.pow(2n).multiply(n).subtract(e.pow(3n)),s=t.multiply(n.pow(3n));if(!o.equals(s))throw new Error("Invalid point: not on curve over Fq2")}clearPairingPrecomputes(){this._PPRECOMPUTES=void 0}pairingPrecomputes(){return this._PPRECOMPUTES||(this._PPRECOMPUTES=i.calcPairingPrecomputes(...this.toAffine())),this._PPRECOMPUTES}}function E(t,e,r=!0){if(t.isZero()||e.isZero())throw new Error("No pairings at point of Infinity");t.assertValidity(),e.assertValidity();let n=t.millerLoop(e);return r?n.finalExponentiate():n}function S(t){return t instanceof w?t:w.fromCompressedHex(t)}function I(t){return t instanceof A?t:A.fromSignature(t)}async function k(t){return t instanceof A?t:await A.hashToCurve(t)}e.PointG2=A,A.BASE=new A(new i.Fq2(i.CURVE.G2x),new i.Fq2(i.CURVE.G2y),i.Fq2.ONE),A.ZERO=new A(i.Fq2.ONE,i.Fq2.ONE,i.Fq2.ZERO),e.pairing=E,e.getPublicKey=function(t){return w.fromPrivateKey(t).toCompressedHex()},e.sign=async function(t,e){const r=(await k(t)).multiply(v(e));return t instanceof A?r:r.toSignature()},e.verify=async function(t,e,r){const n=S(r),o=await k(e),s=w.BASE,a=I(t),u=E(n.negate(),o,!1);return E(s,a,!1).multiply(u).finalExponentiate().equals(i.Fq12.ONE)},e.aggregatePublicKeys=function(t){if(!t.length)throw new Error("Expected non-empty array");const e=t.map(S).reduce(((t,e)=>t.add(e)),w.ZERO);return t[0]instanceof w?e:e.toCompressedHex()},e.aggregateSignatures=function(t){if(!t.length)throw new Error("Expected non-empty array");const e=t.map(I).reduce(((t,e)=>t.add(e)),A.ZERO);return t[0]instanceof A?e:e.toSignature()},e.verifyBatch=async function(t,e,r){if(!t.length)throw new Error("Expected non-empty messages array");if(e.length!==t.length)throw new Error("Pubkey count should equal msg count");const n=await Promise.all(t.map(k)),o=e.map((t=>t instanceof w?t:w.fromCompressedHex(t)));try{const t=[];for(const e of new Set(n)){const r=n.reduce(((t,r,n)=>r===e?t.add(o[n]):t),w.ZERO);t.push(E(r,e,!1))}const e=I(r);t.push(E(w.BASE.negate(),e,!1));return t.reduce(((t,e)=>t.multiply(e)),i.Fq12.ONE).finalExponentiate().equals(i.Fq12.ONE)}catch{return!1}},w.BASE.calcMultiplyPrecomputes(4)},1824:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.isogenyCoefficients=e.psi2=e.psi=e.millerLoop=e.calcPairingPrecomputes=e.isogenyMapG2=e.map_to_curve_SSWU_G2=e.ProjectivePoint=e.Fq12=e.Fq6=e.Fq2=e.Fr=e.Fq=e.powMod=e.mod=e.DST_LABEL=e.CURVE=void 0,e.CURVE={P:0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn,r:0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001n,h:0x396c8c005555e1568c00aaab0000aaabn,Gx:0x17f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bbn,Gy:0x08b3f481e3aaa0f1a09e30ed741d8ae4fcf5e095d5d00af600db18cb2c04b3edd03cc744a2888ae40caa232946c5e7e1n,b:4n,P2:0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn**2n-1n,h2:0x5d543a95414e7f1091d50792876a202cd91de4547085abaa68a205b2e5a7ddfa628f1cb4d9e82ef21537e293a6691ae1616ec6e786f0c70cf1c38e31c7238e5n,G2x:[0x024aa2b2f08f0a91260805272dc51051c6e47ad4fa403b02b4510b647ae3d1770bac0326a805bbefd48056c8c121bdb8n,0x13e02b6052719f607dacd3a088274f65596bd0d09920b61ab5da61bbdc7f5049334cf11213945d57e5ac7d055d042b7en],G2y:[0x0ce5d527727d6e118cc9cdc6da2e351aadfd9baa8cbdd3a76d429a695160d12c923ac9cc3baca289e193548608b82801n,0x0606c4a02ea734cc32acd2b02bc28b99cb3e287e85a763af267492ab572e99ab3f370d275cec1da1aaa9075ff05f79ben],b2:[4n,4n],x:0xd201000000010000n,h_eff:0xbc69f08f2ee75b3584c6a0ea91b352888e2a8e9145ad7689986ff031508ffe1329c2f178731db956d82bf015d1212b02ec0ec69d7477c1ae954cbc06689f6a359894c0adebbf6b4e8020005aaa95551n},e.DST_LABEL="BLS_SIG_BLS12381G2_XMD:SHA-256_SSWU_RO_NUL_";const r=o(e.CURVE.x);function n(t,e){const r=t%e;return r>=0n?r:e+r}function i(t,e,r){let i=1n;for(;e>0n;)1n&e&&(i=n(i*t,r)),e>>=1n,t=n(t*t,r);return i}function o(t){let e;for(e=0;t>0n;t>>=1n,e+=1);return e}function s(t,e){return t>>BigInt(e)&1n}e.mod=n,e.powMod=i;class a{constructor(t){this.value=n(t,a.ORDER)}isZero(){return 0n===this.value}equals(t){return this.value===t.value}negate(){return new a(-this.value)}invert(){let t,[e,r,n,i]=[1n,0n,0n,1n],o=a.ORDER,s=this.value;for(;0n!==o;)[t,s,o]=[s/o,o,s%o],[e,r]=[r,e-t*r],[n,i]=[i,n-t*i];return new a(e)}add(t){return new a(this.value+t.value)}square(){return new a(this.value*this.value)}pow(t){return new a(i(this.value,t,a.ORDER))}subtract(t){return new a(this.value-t.value)}multiply(t){return t instanceof a&&(t=t.value),new a(this.value*t)}div(t){const e="bigint"==typeof t?new a(t).invert().value:t.invert();return this.multiply(e)}toString(){const t=this.value.toString(16).padStart(96,"0");return t.slice(0,2)+"."+t.slice(-2)}}e.Fq=a,a.ORDER=e.CURVE.P,a.MAX_BITS=o(e.CURVE.P),a.ZERO=new a(0n),a.ONE=new a(1n);class u{constructor(t){this.value=n(t,u.ORDER)}static isValid(t){return t<=u.ORDER}isZero(){return 0n===this.value}equals(t){return this.value===t.value}negate(){return new u(-this.value)}invert(){let t,[e,r,n,i]=[1n,0n,0n,1n],o=u.ORDER,s=this.value;for(;0n!==o;)[t,s,o]=[s/o,o,s%o],[e,r]=[r,e-t*r],[n,i]=[i,n-t*i];return new u(e)}add(t){return new u(this.value+t.value)}square(){return new u(this.value*this.value)}pow(t){return new u(i(this.value,t,u.ORDER))}subtract(t){return new u(this.value-t.value)}multiply(t){return t instanceof u&&(t=t.value),new u(this.value*t)}div(t){const e="bigint"==typeof t?new u(t).invert().value:t.invert();return this.multiply(e)}legendre(){return this.pow((u.ORDER-1n)/2n)}sqrt(){if(!this.legendre().equals(u.ONE))return;const t=u.ORDER;let e,r,o;for(e=t-1n,r=0;e%2n==0n;e/=2n,r++);if(1==r)return this.pow((t+1n)/4n);for(o=2n;o<t&&new u(o).legendre().value!=t-1n;o++);let s=i(o,e,t),a=i(this.value,(e+1n)/2n,t),c=i(this.value,e,t),f=0n;for(;0n!=n(c-1n,t);){let e;for(f=n(c*c,t),e=1;e<r&&0n!=n(f-1n,t);e++)f=n(f*f,t);let o=i(s,BigInt(1<<r-e-1),t);a=n(a*o,t),s=n(o*o,t),c=n(c*s,t),r=e}return new u(a)}toString(){return"0x"+this.value.toString(16).padStart(64,"0")}}e.Fr=u,u.ORDER=e.CURVE.r,u.ZERO=new u(0n),u.ONE=new u(1n);class c{zip(t,e){const r=this.c,n=t.c,i=[];for(let t=0;t<r.length;t++)i.push(e(r[t],n[t]));return i}map(t){return this.c.map(t)}isZero(){return this.c.every((t=>t.isZero()))}equals(t){return this.zip(t,((t,e)=>t.equals(e))).every((t=>t))}negate(){return this.init(this.map((t=>t.negate())))}add(t){return this.init(this.zip(t,((t,e)=>t.add(e))))}subtract(t){return this.init(this.zip(t,((t,e)=>t.subtract(e))))}conjugate(){return this.init([this.c[0],this.c[1].negate()])}one(){const t=this;let e;return t instanceof g&&(e=g.ONE),t instanceof y&&(e=y.ONE),t instanceof b&&(e=b.ONE),e}pow(t){const e=this.one();if(0n===t)return e;if(1n===t)return this;let r=e,n=this;for(;t>0n;)1n&t&&(r=r.multiply(n)),t>>=1n,n=n.square();return r}div(t){const e="bigint"==typeof t?new a(t).invert().value:t.invert();return this.multiply(e)}}const f=0x6af0e0437ff400b6831e36d6bd17ffe48395dabc2d3435e77f76e17009241c5ee67992f72ec05f4c81084fbede3cc09n,h=0x699be3b8c6870965e5bf892ad5d2cc7b0e85a117402dfd83b7f4a947e02d978498255a2aaec0ac627b5afbdf1bf1c90n,l=0x8157cd83046453f5dd0972b6e3949e4288020b5b8a9cc99ca07e27089a2ce2436d965026adad3ef7baba37f2183e9b5n,p=0xab1c2ffdd6c253ca155231eb3e71ba044fd562f6f72bc5bad5ec46a0b7a3b0247cf08ce6c6317f40edbc653a72dee17n,d=0xaa404866706722864480885d68ad0ccac1967c7544b447873cc37e0181271e006df72162a3d3e0287bf597fbf7f8fc1n;class g extends c{constructor(t){if(super(),2!==t.length)throw new Error("Expected array with 2 elements");t.forEach(((e,r)=>{"bigint"==typeof e&&(t[r]=new a(e))})),this.c=t}init(t){return new g(t)}toString(){return`Fq2(${this.c[0]} + ${this.c[1]}×i)`}get values(){return this.c.map((t=>t.value))}multiply(t){if("bigint"==typeof t)return new g(this.map((e=>e.multiply(t))));const[e,r]=this.c,[n,i]=t.c;let o=e.multiply(n),s=r.multiply(i);return new g([o.subtract(s),e.add(r).multiply(n.add(i)).subtract(o.add(s))])}mulByNonresidue(){const t=this.c[0],e=this.c[1];return new g([t.subtract(e),t.add(e)])}square(){const t=this.c[0],e=this.c[1],r=t.add(e),n=t.subtract(e),i=t.add(t);return new g([r.multiply(n),i.multiply(e)])}sqrt(){const t=this.pow((g.ORDER+8n)/16n),e=t.square().div(this),r=g.ROOTS_OF_UNITY,n=[r[0],r[2],r[4],r[6]].find((t=>t.equals(e)));if(!n)return;const i=r.indexOf(n),o=r[i/2];if(!o)throw new Error("Invalid root");const s=t.div(o),a=s.negate(),[u,c]=s.values,[f,h]=a.values;return c>h||c==h&&u>f?s:a}invert(){const[t,e]=this.values,r=new a(t*t+e*e).invert();return new g([r.multiply(new a(t)),r.multiply(new a(-e))])}frobeniusMap(t){return new g([this.c[0],this.c[1].multiply(g.FROBENIUS_COEFFICIENTS[t%2])])}multiplyByB(){let[t,e]=this.c,r=t.multiply(4n),n=e.multiply(4n);return new g([r.subtract(n),r.add(n)])}}e.Fq2=g,g.ORDER=e.CURVE.P2,g.MAX_BITS=o(e.CURVE.P2),g.ROOT=new a(-1n),g.ZERO=new g([0n,0n]),g.ONE=new g([1n,0n]),g.COFACTOR=e.CURVE.h2,g.ROOTS_OF_UNITY=[new g([1n,0n]),new g([f,-f]),new g([0n,1n]),new g([f,f]),new g([-1n,0n]),new g([-f,f]),new g([0n,-1n]),new g([-f,-f])],g.ETAs=[new g([h,l]),new g([-l,h]),new g([p,d]),new g([-d,p])],g.FROBENIUS_COEFFICIENTS=[new a(0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n),new a(0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaaan)];class y extends c{constructor(t){if(super(),this.c=t,3!==t.length)throw new Error("Expected array with 2 elements")}static fromTuple(t){return new y([new g(t.slice(0,2)),new g(t.slice(2,4)),new g(t.slice(4,6))])}init(t){return new y(t)}toString(){return`Fq6(${this.c[0]} + ${this.c[1]} * v, ${this.c[2]} * v^2)`}conjugate(){throw new TypeError("No conjugate on Fq6")}multiply(t){if("bigint"==typeof t)return new y([this.c[0].multiply(t),this.c[1].multiply(t),this.c[2].multiply(t)]);let[e,r,n]=this.c;const[i,o,s]=t.c;let a=e.multiply(i),u=r.multiply(o),c=n.multiply(s);return new y([a.add(r.add(n).multiply(o.add(s)).subtract(u.add(c)).mulByNonresidue()),e.add(r).multiply(i.add(o)).subtract(a.add(u)).add(c.mulByNonresidue()),u.add(e.add(n).multiply(i.add(s)).subtract(a.add(c)))])}mulByNonresidue(){return new y([this.c[2].mulByNonresidue(),this.c[0],this.c[1]])}multiplyBy1(t){return new y([this.c[2].multiply(t).mulByNonresidue(),this.c[0].multiply(t),this.c[1].multiply(t)])}multiplyBy01(t,e){let[r,n,i]=this.c,o=r.multiply(t),s=n.multiply(e);return new y([n.add(i).multiply(e).subtract(s).mulByNonresidue().add(o),t.add(e).multiply(r.add(n)).subtract(o).subtract(s),r.add(i).multiply(t).subtract(o).add(s)])}multiplyByFq2(t){return new y(this.map((e=>e.multiply(t))))}square(){let[t,e,r]=this.c,n=t.square(),i=t.multiply(e).multiply(2n),o=e.multiply(r).multiply(2n),s=r.square();return new y([o.mulByNonresidue().add(n),s.mulByNonresidue().add(i),i.add(t.subtract(e).add(r).square()).add(o).subtract(n).subtract(s)])}invert(){let[t,e,r]=this.c,n=t.square().subtract(r.multiply(e).mulByNonresidue()),i=r.square().mulByNonresidue().subtract(t.multiply(e)),o=e.square().subtract(t.multiply(r)),s=r.multiply(i).add(e.multiply(o)).mulByNonresidue().add(t.multiply(n)).invert();return new y([s.multiply(n),s.multiply(i),s.multiply(o)])}frobeniusMap(t){return new y([this.c[0].frobeniusMap(t),this.c[1].frobeniusMap(t).multiply(y.FROBENIUS_COEFFICIENTS_1[t%6]),this.c[2].frobeniusMap(t).multiply(y.FROBENIUS_COEFFICIENTS_2[t%6])])}}e.Fq6=y,y.ZERO=new y([g.ZERO,g.ZERO,g.ZERO]),y.ONE=new y([g.ONE,g.ZERO,g.ZERO]),y.FROBENIUS_COEFFICIENTS_1=[new g([0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n]),new g([0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n,0x1a0111ea397fe699ec02408663d4de85aa0d857d89759ad4897d29650fb85f9b409427eb4f49fffd8bfd00000000aaacn]),new g([0x00000000000000005f19672fdf76ce51ba69c6076a0f77eaddb3a93be6f89688de17d813620a00022e01fffffffefffen,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n]),new g([0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n]),new g([0x1a0111ea397fe699ec02408663d4de85aa0d857d89759ad4897d29650fb85f9b409427eb4f49fffd8bfd00000000aaacn,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n]),new g([0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n,0x00000000000000005f19672fdf76ce51ba69c6076a0f77eaddb3a93be6f89688de17d813620a00022e01fffffffefffen])],y.FROBENIUS_COEFFICIENTS_2=[new g([0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n]),new g([0x1a0111ea397fe699ec02408663d4de85aa0d857d89759ad4897d29650fb85f9b409427eb4f49fffd8bfd00000000aaadn,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n]),new g([0x1a0111ea397fe699ec02408663d4de85aa0d857d89759ad4897d29650fb85f9b409427eb4f49fffd8bfd00000000aaacn,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n]),new g([0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaaan,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n]),new g([0x00000000000000005f19672fdf76ce51ba69c6076a0f77eaddb3a93be6f89688de17d813620a00022e01fffffffefffen,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n]),new g([0x00000000000000005f19672fdf76ce51ba69c6076a0f77eaddb3a93be6f89688de17d813620a00022e01fffffffeffffn,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n])];class b extends c{constructor(t){if(super(),this.c=t,2!==t.length)throw new Error("Expected array with 2 elements")}static fromTuple(t){return new b([y.fromTuple(t.slice(0,6)),y.fromTuple(t.slice(6,12))])}init(t){return new b(t)}toString(){return`Fq12(${this.c[0]} + ${this.c[1]} * w)`}multiply(t){if("bigint"==typeof t)return new b([this.c[0].multiply(t),this.c[1].multiply(t)]);let[e,r]=this.c;const[n,i]=t.c;let o=e.multiply(n),s=r.multiply(i);return new b([o.add(s.mulByNonresidue()),e.add(r).multiply(n.add(i)).subtract(o.add(s))])}multiplyBy014(t,e,r){let[n,i]=this.c,[o,s]=[n.multiplyBy01(t,e),i.multiplyBy1(r)];return new b([s.mulByNonresidue().add(o),i.add(n).multiplyBy01(t,e.add(r)).subtract(o).subtract(s)])}multiplyByFq2(t){return this.init(this.map((e=>e.multiplyByFq2(t))))}square(){let[t,e]=this.c,r=t.multiply(e);return new b([e.mulByNonresidue().add(t).multiply(t.add(e)).subtract(r).subtract(r.mulByNonresidue()),r.add(r)])}invert(){let[t,e]=this.c,r=t.square().subtract(e.square().mulByNonresidue()).invert();return new b([t.multiply(r),e.multiply(r).negate()])}frobeniusMap(t){const[e,r]=this.c;let n=e.frobeniusMap(t),[i,o,s]=r.frobeniusMap(t).c;return new b([n,new y([i.multiply(b.FROBENIUS_COEFFICIENTS[t%12]),o.multiply(b.FROBENIUS_COEFFICIENTS[t%12]),s.multiply(b.FROBENIUS_COEFFICIENTS[t%12])])])}Fq4Square(t,e){const r=t.square(),n=e.square();return[n.mulByNonresidue().add(r),t.add(e).square().subtract(r).subtract(n)]}cyclotomicSquare(){const[t,e]=this.c,[r,n,i]=t.c,[o,s,a]=e.c;let[u,c]=this.Fq4Square(r,s),[f,h]=this.Fq4Square(o,i),[l,p]=this.Fq4Square(n,a),d=p.mulByNonresidue();return new b([new y([u.subtract(r).multiply(2n).add(u),f.subtract(n).multiply(2n).add(f),l.subtract(i).multiply(2n).add(l)]),new y([d.add(o).multiply(2n).add(d),c.add(s).multiply(2n).add(c),h.add(a).multiply(2n).add(h)])])}cyclotomicExp(t){let e=b.ONE;for(let n=r-1;n>=0;n--)e=e.cyclotomicSquare(),s(t,n)&&(e=e.multiply(this));return e}finalExponentiate(){let t=this.frobeniusMap(6).div(this),r=t.frobeniusMap(2).multiply(t),n=r.cyclotomicExp(e.CURVE.x).conjugate(),i=r.cyclotomicSquare().conjugate().multiply(n),o=i.cyclotomicExp(e.CURVE.x).conjugate(),s=o.cyclotomicExp(e.CURVE.x).conjugate(),a=s.cyclotomicExp(e.CURVE.x).conjugate().multiply(n.cyclotomicSquare());return n.multiply(s).frobeniusMap(2).multiply(o.multiply(r).frobeniusMap(3)).multiply(a.multiply(r.conjugate()).frobeniusMap(1)).multiply(a.cyclotomicExp(e.CURVE.x).conjugate()).multiply(i.conjugate()).multiply(r)}}function m(t){const[e,r]=t.values;return BigInt(e%2n||0n===e&&r%2n)}e.Fq12=b,b.ZERO=new b([y.ZERO,y.ZERO]),b.ONE=new b([y.ONE,y.ZERO]),b.FROBENIUS_COEFFICIENTS=[new g([0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001n,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n]),new g([0x1904d3bf02bb0667c231beb4202c0d1f0fd603fd3cbd5f4f7b2443d784bab9c4f67ea53d63e7813d8d0775ed92235fb8n,0x00fc3e2b36c4e03288e9e902231f9fb854a14787b6c7b36fec0c8ec971f63c5f282d5ac14d6c7ec22cf78a126ddc4af3n]),new g([0x00000000000000005f19672fdf76ce51ba69c6076a0f77eaddb3a93be6f89688de17d813620a00022e01fffffffeffffn,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n]),new g([0x135203e60180a68ee2e9c448d77a2cd91c3dedd930b1cf60ef396489f61eb45e304466cf3e67fa0af1ee7b04121bdea2n,0x06af0e0437ff400b6831e36d6bd17ffe48395dabc2d3435e77f76e17009241c5ee67992f72ec05f4c81084fbede3cc09n]),new g([0x00000000000000005f19672fdf76ce51ba69c6076a0f77eaddb3a93be6f89688de17d813620a00022e01fffffffefffen,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n]),new g([0x144e4211384586c16bd3ad4afa99cc9170df3560e77982d0db45f3536814f0bd5871c1908bd478cd1ee605167ff82995n,0x05b2cfd9013a5fd8df47fa6b48b1e045f39816240c0b8fee8beadf4d8e9c0566c63a3e6e257f87329b18fae980078116n]),new g([0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaaan,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n]),new g([0x00fc3e2b36c4e03288e9e902231f9fb854a14787b6c7b36fec0c8ec971f63c5f282d5ac14d6c7ec22cf78a126ddc4af3n,0x1904d3bf02bb0667c231beb4202c0d1f0fd603fd3cbd5f4f7b2443d784bab9c4f67ea53d63e7813d8d0775ed92235fb8n]),new g([0x1a0111ea397fe699ec02408663d4de85aa0d857d89759ad4897d29650fb85f9b409427eb4f49fffd8bfd00000000aaacn,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n]),new g([0x06af0e0437ff400b6831e36d6bd17ffe48395dabc2d3435e77f76e17009241c5ee67992f72ec05f4c81084fbede3cc09n,0x135203e60180a68ee2e9c448d77a2cd91c3dedd930b1cf60ef396489f61eb45e304466cf3e67fa0af1ee7b04121bdea2n]),new g([0x1a0111ea397fe699ec02408663d4de85aa0d857d89759ad4897d29650fb85f9b409427eb4f49fffd8bfd00000000aaadn,0x000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000n]),new g([0x05b2cfd9013a5fd8df47fa6b48b1e045f39816240c0b8fee8beadf4d8e9c0566c63a3e6e257f87329b18fae980078116n,0x144e4211384586c16bd3ad4afa99cc9170df3560e77982d0db45f3536814f0bd5871c1908bd478cd1ee605167ff82995n])],e.ProjectivePoint=class{constructor(t,e,r,n){this.x=t,this.y=e,this.z=r,this.C=n}isZero(){return this.z.isZero()}getPoint(t,e,r){return new this.constructor(t,e,r)}getZero(){return this.getPoint(this.C.ONE,this.C.ONE,this.C.ZERO)}equals(t){if(this.constructor!=t.constructor)throw new Error(`ProjectivePoint#equals: this is ${this.constructor}, but rhs is ${t.constructor}`);const e=this,r=t,n=e.x.multiply(r.z).equals(r.x.multiply(e.z)),i=e.y.multiply(r.z).equals(r.y.multiply(e.z));return n&&i}negate(){return this.getPoint(this.x,this.y.negate(),this.z)}toString(t=!0){if(!t)return`Point<x=${this.x}, y=${this.y}, z=${this.z}>`;const[e,r]=this.toAffine();return`Point<x=${e}, y=${r}>`}fromAffineTuple(t){return this.getPoint(t[0],t[1],this.C.ONE)}toAffine(t=this.z.invert()){return[this.x.multiply(t),this.y.multiply(t)]}toAffineBatch(t){const e=function(t,e){const r=e.length,n=new Array(r);let i=t.ONE;for(let t=0;t<r;t++)e[t].isZero()||(n[t]=i,i=i.multiply(e[t]));i=i.invert();for(let t=r-1;t>=0;t--){if(e[t].isZero())continue;let r=i.multiply(e[t]);e[t]=i.multiply(n[t]),i=r}return e}(this.C,t.map((t=>t.z)));return t.map(((t,r)=>t.toAffine(e[r])))}normalizeZ(t){return this.toAffineBatch(t).map((t=>this.fromAffineTuple(t)))}double(){const{x:t,y:e,z:r}=this,n=t.multiply(t).multiply(3n),i=e.multiply(r),o=i.multiply(i),s=o.multiply(i),a=t.multiply(e).multiply(i),u=n.multiply(n).subtract(a.multiply(8n)),c=u.multiply(i).multiply(2n),f=n.multiply(a.multiply(4n).subtract(u)).subtract(e.multiply(e).multiply(8n).multiply(o)),h=s.multiply(8n);return this.getPoint(c,f,h)}add(t){if(this.constructor!=t.constructor)throw new Error(`ProjectivePoint#add: this is ${this.constructor}, but rhs is ${t.constructor}`);const e=this,r=t;if(e.isZero())return r;if(r.isZero())return e;const n=e.x,i=e.y,o=e.z,s=r.x,a=r.y,u=r.z,c=a.multiply(o),f=i.multiply(u),h=s.multiply(o),l=n.multiply(u);if(h.equals(l)&&c.equals(f))return this.double();if(h.equals(l))return this.getZero();const p=c.subtract(f),d=h.subtract(l),g=d.multiply(d),y=g.multiply(d),b=l.multiply(g),m=o.multiply(u),v=p.multiply(p).multiply(m).subtract(y).subtract(b.multiply(2n)),w=d.multiply(v),_=p.multiply(b.subtract(v)).subtract(y.multiply(f)),A=y.multiply(m);return this.getPoint(w,_,A)}subtract(t){if(this.constructor!=t.constructor)throw new Error(`ProjectivePoint#subtract: this is ${this.constructor}, but rhs is ${t.constructor}`);return this.add(t.negate())}multiplyUnsafe(t){let e=t;if(e instanceof a&&(e=e.value),"number"==typeof e&&(e=BigInt(e)),e<=0)throw new Error("Point#multiply: invalid scalar, expected positive integer");let r=this.getZero(),n=this;for(;e>0n;)1n&e&&(r=r.add(n)),n=n.double(),e>>=1n;return r}maxBits(){return this.C.MAX_BITS}precomputeWindow(t){const e=Math.ceil(this.maxBits()/t),r=2**(t-1);let n=[],i=this,o=i;for(let t=0;t<e;t++){o=i,n.push(o);for(let t=1;t<r;t++)o=o.add(i),n.push(o);i=o.double()}return n}calcMultiplyPrecomputes(t){if(this._MPRECOMPUTES)throw new Error("This point already has precomputes");this._MPRECOMPUTES=[t,this.normalizeZ(this.precomputeWindow(t))]}clearMultiplyPrecomputes(){this._MPRECOMPUTES=void 0}wNAF(t){let e,r;this._MPRECOMPUTES?[e,r]=this._MPRECOMPUTES:(e=1,r=this.precomputeWindow(e));let[n,i]=[this.getZero(),this.getZero()];const o=Math.ceil(this.maxBits()/e),s=2**(e-1),a=BigInt(2**e-1),u=2**e,c=BigInt(e);for(let e=0;e<o;e++){const o=e*s;let f=Number(t&a);if(t>>=c,f>s&&(f-=u,t+=1n),0===f)i=i.add(e%2?r[o].negate():r[o]);else{const t=r[o+Math.abs(f)-1];n=n.add(f<0?t.negate():t)}}return[n,i]}multiply(t){let e=t;if(e instanceof a&&(e=e.value),"number"==typeof e&&(e=BigInt(e)),e<=0)throw new Error("ProjectivePoint#multiply: invalid scalar, expected positive integer");if(o(e)>this.maxBits())throw new Error("ProjectivePoint#multiply: scalar has more bits than maxBits, shoulnd't happen");return this.wNAF(e)[0]}};const v=(e.CURVE.P**2n-9n)/16n;e.map_to_curve_SSWU_G2=function(t){const e=new g([0n,240n]),r=new g([1012n,1012n]),n=new g([-2n,-1n]);Array.isArray(t)&&(t=new g(t));const i=t.pow(2n),o=n.multiply(i),s=o.add(o.pow(2n));let a=e.multiply(s).negate(),u=r.multiply(s.add(g.ONE));a.isZero()&&(a=n.multiply(e));let c=a.pow(3n),f=u.pow(3n).add(e.multiply(u).multiply(a.pow(2n))).add(r.multiply(c));const[h,l]=function(t,e){const r=t.multiply(e.pow(7n)),n=r.multiply(e.pow(8n)).pow(v).multiply(r);let i=!1,o=n;const s=g.ROOTS_OF_UNITY.slice(0,4);for(const r of s){const s=r.multiply(n);s.pow(2n).multiply(e).subtract(t).isZero()&&!i&&(i=!0,o=s)}return[i,o]}(f,c);let p;h&&(p=l);const d=l.multiply(t.pow(3n));f=o.pow(3n).multiply(f);let y=!1;for(const t of g.ETAs){const e=t.multiply(d);!e.pow(2n).multiply(c).subtract(f).isZero()||h||y||(p=e,y=!0)}if(!h&&!y)throw new Error("Hash to Curve - Optimized SWU failure");return y&&(u=u.multiply(o)),p=p,m(t)!==m(p)&&(p=p.negate()),p=p.multiply(a),[u,p,a]},e.isogenyMapG2=function(t){const[r,n,i]=t,o=[g.ZERO,g.ZERO,g.ZERO,g.ZERO],s=[i,i.pow(2n),i.pow(3n)];for(let t=0;t<e.isogenyCoefficients.length;t++){const n=e.isogenyCoefficients[t];o[t]=n.slice(-1)[0];const i=n.slice(0,-1).reverse();for(let e=0;e<i.length;e++){const n=i[e];o[t]=o[t].multiply(r).add(s[e].multiply(n))}}o[2]=o[2].multiply(n),o[3]=o[3].multiply(i);const a=o[1].multiply(o[3]);return[o[0].multiply(o[3]),o[1].multiply(o[2]),a]},e.calcPairingPrecomputes=function(t,n){const[i,o,a]=[t,n,g.ONE];let[u,c,f]=[i,o,a],h=[];for(let t=r-2;t>=0;t--){let r=c.square(),n=f.square(),a=n.multiply(3n).multiplyByB(),l=a.multiply(3n),p=c.add(f).square().subtract(n).subtract(r);if(h.push([a.subtract(r),u.square().multiply(3n),p.negate()]),u=r.subtract(l).multiply(u).multiply(c).div(2n),c=r.add(l).div(2n).square().subtract(a.square().multiply(3n)),f=r.multiply(p),s(e.CURVE.x,t)){let t=c.subtract(o.multiply(f)),e=u.subtract(i.multiply(f));h.push([t.multiply(i).subtract(e.multiply(o)),t.negate(),e]);let r=e.square(),n=r.multiply(e),s=r.multiply(u),a=n.subtract(s.multiply(2n)).add(t.square().multiply(f));u=e.multiply(a),c=s.subtract(a).multiply(t).subtract(n.multiply(c)),f=f.multiply(n)}}return h},e.millerLoop=function(t,n){let i=b.ONE;const[o,a]=n,[u,c]=[o,a];for(let n=0,o=r-2;o>=0;o--,n++)i=i.multiplyBy014(t[n][0],t[n][1].multiply(u.value),t[n][2].multiply(c.value)),s(e.CURVE.x,o)&&(n+=1,i=i.multiplyBy014(t[n][0],t[n][1].multiply(u.value),t[n][2].multiply(c.value))),0!=o&&(i=i.square());return i.conjugate()};const w=new y([g.ZERO,g.ONE,g.ZERO]),_=new b([w,y.ZERO]),A=_.invert(),E=new b([y.ZERO,w]),S=E.invert();e.psi=function(t,e){return[A.multiplyByFq2(t).frobeniusMap(1).multiply(_).c[0].c[0],S.multiplyByFq2(e).frobeniusMap(1).multiply(E).c[0].c[0]]};const I=0x1a0111ea397fe699ec02408663d4de85aa0d857d89759ad4897d29650fb85f9b409427eb4f49fffd8bfd00000000aaacn;e.psi2=function(t,e){return[t.multiply(I),e.negate()]};const k=[new g([0x5c759507e8e333ebb5b7a9a47d7ed8532c52d39fd3a042a88b58423c50ae15d5c2638e343d9c71c6238aaaaaaaa97d6n,0x5c759507e8e333ebb5b7a9a47d7ed8532c52d39fd3a042a88b58423c50ae15d5c2638e343d9c71c6238aaaaaaaa97d6n]),new g([0x0n,0x11560bf17baa99bc32126fced787c88f984f87adf7ae0c7f9a208c6b4f20a4181472aaa9cb8d555526a9ffffffffc71an]),new g([0x11560bf17baa99bc32126fced787c88f984f87adf7ae0c7f9a208c6b4f20a4181472aaa9cb8d555526a9ffffffffc71en,0x8ab05f8bdd54cde190937e76bc3e447cc27c3d6fbd7063fcd104635a790520c0a395554e5c6aaaa9354ffffffffe38dn]),new g([0x171d6541fa38ccfaed6dea691f5fb614cb14b4e7f4e810aa22d6108f142b85757098e38d0f671c7188e2aaaaaaaa5ed1n,0x0n])],x=[new g([0x0n,0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaa63n]),new g([0xcn,0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaa9fn]),g.ONE,g.ZERO],M=[new g([0x1530477c7ab4113b59a4c18b076d11930f7da5d4a07f649bf54439d87d27e500fc8c25ebf8c92f6812cfc71c71c6d706n,0x1530477c7ab4113b59a4c18b076d11930f7da5d4a07f649bf54439d87d27e500fc8c25ebf8c92f6812cfc71c71c6d706n]),new g([0x0n,0x5c759507e8e333ebb5b7a9a47d7ed8532c52d39fd3a042a88b58423c50ae15d5c2638e343d9c71c6238aaaaaaaa97ben]),new g([0x11560bf17baa99bc32126fced787c88f984f87adf7ae0c7f9a208c6b4f20a4181472aaa9cb8d555526a9ffffffffc71cn,0x8ab05f8bdd54cde190937e76bc3e447cc27c3d6fbd7063fcd104635a790520c0a395554e5c6aaaa9354ffffffffe38fn]),new g([0x124c9ad43b6cf79bfbf7043de3811ad0761b0f37a1e26286b0e977c69aa274524e79097a56dc4bd9e1b371c71c718b10n,0x0n])],C=[new g([0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffa8fbn,0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffa8fbn]),new g([0x0n,0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffa9d3n]),new g([0x12n,0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaa99n]),new g([0x1n,0x0n])];e.isogenyCoefficients=[k,x,M,C]},8169:t=>{"use strict";var e=function(t){return t!=t};t.exports=function(t,r){return 0===t&&0===r?1/t==1/r:t===r||!(!e(t)||!e(r))}},4679:(t,e,r)=>{"use strict";var n=r(4926),i=r(9429),o=r(8169),s=r(8070),a=r(191),u=i(s(),Object);n(u,{getPolyfill:s,implementation:o,shim:a}),t.exports=u},8070:(t,e,r)=>{"use strict";var n=r(8169);t.exports=function(){return"function"==typeof Object.is?Object.is:n}},191:(t,e,r)=>{"use strict";var n=r(8070),i=r(4926);t.exports=function(){var t=n();return i(Object,{is:t},{is:function(){return Object.is!==t}}),t}},5691:(t,e,r)=>{"use strict";var n;if(!Object.keys){var i=Object.prototype.hasOwnProperty,o=Object.prototype.toString,s=r(801),a=Object.prototype.propertyIsEnumerable,u=!a.call({toString:null},"toString"),c=a.call((function(){}),"prototype"),f=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],h=function(t){var e=t.constructor;return e&&e.prototype===t},l={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},p=function(){if("undefined"==typeof window)return!1;for(var t in window)try{if(!l["$"+t]&&i.call(window,t)&&null!==window[t]&&"object"==typeof window[t])try{h(window[t])}catch(t){return!0}}catch(t){return!0}return!1}();n=function(t){var e=null!==t&&"object"==typeof t,r="[object Function]"===o.call(t),n=s(t),a=e&&"[object String]"===o.call(t),l=[];if(!e&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var d=c&&r;if(a&&t.length>0&&!i.call(t,0))for(var g=0;g<t.length;++g)l.push(String(g));if(n&&t.length>0)for(var y=0;y<t.length;++y)l.push(String(y));else for(var b in t)d&&"prototype"===b||!i.call(t,b)||l.push(String(b));if(u)for(var m=function(t){if("undefined"==typeof window||!p)return h(t);try{return h(t)}catch(t){return!1}}(t),v=0;v<f.length;++v)m&&"constructor"===f[v]||!i.call(t,f[v])||l.push(f[v]);return l}}t.exports=n},3464:(t,e,r)=>{"use strict";var n=Array.prototype.slice,i=r(801),o=Object.keys,s=o?function(t){return o(t)}:r(5691),a=Object.keys;s.shim=function(){if(Object.keys){var t=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);t||(Object.keys=function(t){return i(t)?a(n.call(t)):a(t)})}else Object.keys=s;return Object.keys||s},t.exports=s},801:t=>{"use strict";var e=Object.prototype.toString;t.exports=function(t){var r=e.call(t),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Function]"===e.call(t.callee)),n}},8045:(t,e,r)=>{"use strict";var n=r(2812);e.certificate=r(7832);var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));e.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));e.RSAPublicKey=o;var s=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(a),this.key("subjectPublicKey").bitstr())}));e.PublicKey=s;var a=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(a),this.key("subjectPrivateKey").octstr())}));e.PrivateKey=u;var c=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));e.EncryptedPrivateKey=c;var f=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));e.DSAPrivateKey=f,e.DSAparam=n.define("DSAparam",(function(){this.int()}));var h=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(l),this.key("publicKey").optional().explicit(1).bitstr())}));e.ECPrivateKey=h;var l=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));e.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},7832:(t,e,r)=>{"use strict";var n=r(2812),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=n.define("RDNSequence",(function(){this.seqof(u)})),f=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),h=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),l=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),p=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(f),this.key("validity").use(h),this.key("subject").use(f),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(l).optional())})),d=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(p),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));t.exports=d},2968:(t,e,r)=>{var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=r(9341),a=r(10),u=r(7834).Buffer;t.exports=function(t,e){var r,c=t.toString(),f=c.match(n);if(f){var h="aes"+f[1],l=u.from(f[2],"hex"),p=u.from(f[3].replace(/[\r\n]/g,""),"base64"),d=s(e,l.slice(0,8),parseInt(f[1],10)).key,g=[],y=a.createDecipheriv(h,d,l);g.push(y.update(p)),g.push(y.final()),r=u.concat(g)}else{var b=c.match(o);r=u.from(b[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:r}}},8016:(t,e,r)=>{var n=r(8045),i=r(8675),o=r(2968),s=r(10),a=r(499),u=r(7834).Buffer;function c(t){var e;"object"!=typeof t||u.isBuffer(t)||(e=t.passphrase,t=t.key),"string"==typeof t&&(t=u.from(t));var r,c,f=o(t,e),h=f.tag,l=f.data;switch(h){case"CERTIFICATE":c=n.certificate.decode(l,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=n.PublicKey.decode(l,"der")),r=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=n.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":l=function(t,e){var r=t.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(t.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[t.algorithm.decrypt.cipher.algo.join(".")],c=t.algorithm.decrypt.cipher.iv,f=t.subjectPrivateKey,h=parseInt(o.split("-")[1],10)/8,l=a.pbkdf2Sync(e,r,n,h,"sha1"),p=s.createDecipheriv(o,l,c),d=[];return d.push(p.update(f)),d.push(p.final()),u.concat(d)}(l=n.EncryptedPrivateKey.decode(l,"der"),e);case"PRIVATE KEY":switch(r=(c=n.PrivateKey.decode(l,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:n.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=n.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(l,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(l,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(l,"der")};case"EC PRIVATE KEY":return{curve:(l=n.ECPrivateKey.decode(l,"der")).parameters.value,privateKey:l.privateKey};default:throw new Error("unknown key type "+h)}}t.exports=c,c.signature=n.signature},499:(t,e,r)=>{e.pbkdf2=r(4874),e.pbkdf2Sync=r(8840)},4874:(t,e,r)=>{var n,i,o=r(7834).Buffer,s=r(7351),a=r(5214),u=r(8840),c=r(7232),f=r.g.crypto&&r.g.crypto.subtle,h={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},l=[];function p(){return i||(i=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function d(t,e,r,n,i){return f.importKey("raw",t,{name:"PBKDF2"},!1,["deriveBits"]).then((function(t){return f.deriveBits({name:"PBKDF2",salt:e,iterations:r,hash:{name:i}},t,n<<3)})).then((function(t){return o.from(t)}))}t.exports=function(t,e,i,g,y,b){"function"==typeof y&&(b=y,y=void 0);var m=h[(y=y||"sha1").toLowerCase()];if(m&&"function"==typeof r.g.Promise){if(s(i,g),t=c(t,a,"Password"),e=c(e,a,"Salt"),"function"!=typeof b)throw new Error("No callback provided to pbkdf2");!function(t,e){t.then((function(t){p()((function(){e(null,t)}))}),(function(t){p()((function(){e(t)}))}))}(function(t){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!f||!f.importKey||!f.deriveBits)return Promise.resolve(!1);if(void 0!==l[t])return l[t];var e=d(n=n||o.alloc(8),n,10,128,t).then((function(){return!0})).catch((function(){return!1}));return l[t]=e,e}(m).then((function(r){return r?d(t,e,i,g,m):u(t,e,i,g,y)})),b)}else p()((function(){var r;try{r=u(t,e,i,g,y)}catch(t){return b(t)}b(null,r)}))}},5214:(t,e,r)=>{var n,i=r(4406);n=r.g.process&&r.g.process.browser?"utf-8":r.g.process&&r.g.process.version?parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",t.exports=n},7351:t=>{var e=Math.pow(2,30)-1;t.exports=function(t,r){if("number"!=typeof t)throw new TypeError("Iterations not a number");if(t<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>e||r!=r)throw new TypeError("Bad key length")}},8840:(t,e,r)=>{var n=r(2511),i=r(1445),o=r(9065),s=r(7834).Buffer,a=r(7351),u=r(5214),c=r(7232),f=s.alloc(128),h={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function l(t,e,r){var a=function(t){return"rmd160"===t||"ripemd160"===t?function(t){return(new i).update(t).digest()}:"md5"===t?n:function(e){return o(t).update(e).digest()}}(t),u="sha512"===t||"sha384"===t?128:64;e.length>u?e=a(e):e.length<u&&(e=s.concat([e,f],u));for(var c=s.allocUnsafe(u+h[t]),l=s.allocUnsafe(u+h[t]),p=0;p<u;p++)c[p]=54^e[p],l[p]=92^e[p];var d=s.allocUnsafe(u+r+4);c.copy(d,0,0,u),this.ipad1=d,this.ipad2=c,this.opad=l,this.alg=t,this.blocksize=u,this.hash=a,this.size=h[t]}l.prototype.run=function(t,e){return t.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},t.exports=function(t,e,r,n,i){a(r,n);var o=new l(i=i||"sha1",t=c(t,u,"Password"),(e=c(e,u,"Salt")).length),f=s.allocUnsafe(n),p=s.allocUnsafe(e.length+4);e.copy(p,0,0,e.length);for(var d=0,g=h[i],y=Math.ceil(n/g),b=1;b<=y;b++){p.writeUInt32BE(b,e.length);for(var m=o.run(p,o.ipad1),v=m,w=1;w<r;w++){v=o.run(v,o.ipad2);for(var _=0;_<g;_++)m[_]^=v[_]}m.copy(f,d),d+=g}return f}},7232:(t,e,r)=>{var n=r(7834).Buffer;t.exports=function(t,e,r){if(n.isBuffer(t))return t;if("string"==typeof t)return n.from(t,e);if(ArrayBuffer.isView(t))return n.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},2884:(t,e,r)=>{"use strict";var n=r(4406);void 0===n||!n.version||0===n.version.indexOf("v0.")||0===n.version.indexOf("v1.")&&0!==n.version.indexOf("v1.8.")?t.exports={nextTick:function(t,e,r,i){if("function"!=typeof t)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return n.nextTick(t);case 2:return n.nextTick((function(){t.call(null,e)}));case 3:return n.nextTick((function(){t.call(null,e,r)}));case 4:return n.nextTick((function(){t.call(null,e,r,i)}));default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return n.nextTick((function(){t.apply(null,o)}))}}}:t.exports=n},4406:t=>{var e,r,n=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(e===setTimeout)return setTimeout(t,0);if((e===i||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:i}catch(t){e=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var a,u=[],c=!1,f=-1;function h(){c&&a&&(c=!1,a.length?u=a.concat(u):f=-1,u.length&&l())}function l(){if(!c){var t=s(h);c=!0;for(var e=u.length;e;){for(a=u,u=[];++f<e;)a&&a[f].run();f=-1,e=u.length}a=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function d(){}n.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];u.push(new p(t,e)),1!==u.length||c||s(l)},p.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=d,n.addListener=d,n.once=d,n.off=d,n.removeListener=d,n.removeAllListeners=d,n.emit=d,n.prependListener=d,n.prependOnceListener=d,n.listeners=function(t){return[]},n.binding=function(t){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(t){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},8493:(t,e,r)=>{e.publicEncrypt=r(1896),e.privateDecrypt=r(6932),e.privateEncrypt=function(t,r){return e.publicEncrypt(t,r,!0)},e.publicDecrypt=function(t,r){return e.privateDecrypt(t,r,!0)}},8525:(t,e,r)=>{var n=r(6162),i=r(7834).Buffer;function o(t){var e=i.allocUnsafe(4);return e.writeUInt32BE(t,0),e}t.exports=function(t,e){for(var r,s=i.alloc(0),a=0;s.length<e;)r=o(a++),s=i.concat([s,n("sha1").update(t).update(r).digest()]);return s.slice(0,e)}},6932:(t,e,r)=>{var n=r(8016),i=r(8525),o=r(1273),s=r(2197),a=r(1857),u=r(6162),c=r(6112),f=r(7834).Buffer;t.exports=function(t,e,r){var h;h=t.padding?t.padding:r?1:4;var l,p=n(t),d=p.modulus.byteLength();if(e.length>d||new s(e).cmp(p.modulus)>=0)throw new Error("decryption error");l=r?c(new s(e),p):a(e,p);var g=f.alloc(d-l.length);if(l=f.concat([g,l],d),4===h)return function(t,e){var r=t.modulus.byteLength(),n=u("sha1").update(f.alloc(0)).digest(),s=n.length;if(0!==e[0])throw new Error("decryption error");var a=e.slice(1,s+1),c=e.slice(s+1),h=o(a,i(c,s)),l=o(c,i(h,r-s-1));if(function(t,e){t=f.from(t),e=f.from(e);var r=0,n=t.length;t.length!==e.length&&(r++,n=Math.min(t.length,e.length));for(var i=-1;++i<n;)r+=t[i]^e[i];return r}(n,l.slice(0,s)))throw new Error("decryption error");for(var p=s;0===l[p];)p++;if(1!==l[p++])throw new Error("decryption error");return l.slice(p)}(p,l);if(1===h)return function(t,e,r){for(var n=e.slice(0,2),i=2,o=0;0!==e[i++];)if(i>=e.length){o++;break}var s=e.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,s.length<8&&o++,o)throw new Error("decryption error");return e.slice(i)}(0,l,r);if(3===h)return l;throw new Error("unknown padding")}},1896:(t,e,r)=>{var n=r(8016),i=r(5003),o=r(6162),s=r(8525),a=r(1273),u=r(2197),c=r(6112),f=r(1857),h=r(7834).Buffer;t.exports=function(t,e,r){var l;l=t.padding?t.padding:r?1:4;var p,d=n(t);if(4===l)p=function(t,e){var r=t.modulus.byteLength(),n=e.length,c=o("sha1").update(h.alloc(0)).digest(),f=c.length,l=2*f;if(n>r-l-2)throw new Error("message too long");var p=h.alloc(r-n-l-2),d=r-f-1,g=i(f),y=a(h.concat([c,p,h.alloc(1,1),e],d),s(g,d)),b=a(g,s(y,f));return new u(h.concat([h.alloc(1),b,y],r))}(d,e);else if(1===l)p=function(t,e,r){var n,o=e.length,s=t.modulus.byteLength();if(o>s-11)throw new Error("message too long");return n=r?h.alloc(s-o-3,255):function(t){for(var e,r=h.allocUnsafe(t),n=0,o=i(2*t),s=0;n<t;)s===o.length&&(o=i(2*t),s=0),(e=o[s++])&&(r[n++]=e);return r}(s-o-3),new u(h.concat([h.from([0,r?1:2]),n,h.alloc(1),e],s))}(d,e,r);else{if(3!==l)throw new Error("unknown padding");if((p=new u(e)).cmp(d.modulus)>=0)throw new Error("data too long for modulus")}return r?f(p,d):c(p,d)}},6112:(t,e,r)=>{var n=r(2197),i=r(7834).Buffer;t.exports=function(t,e){return i.from(t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed().toArray())}},1273:t=>{t.exports=function(t,e){for(var r=t.length,n=-1;++n<r;)t[n]^=e[n];return t}},7131:(t,e,r)=>{var n=r(196);function i(t){return t<n.OP_PUSHDATA1?1:t<=255?2:t<=65535?3:5}t.exports={encodingLength:i,encode:function(t,e,r){var o=i(e);return 1===o?t.writeUInt8(e,r):2===o?(t.writeUInt8(n.OP_PUSHDATA1,r),t.writeUInt8(e,r+1)):3===o?(t.writeUInt8(n.OP_PUSHDATA2,r),t.writeUInt16LE(e,r+1)):(t.writeUInt8(n.OP_PUSHDATA4,r),t.writeUInt32LE(e,r+1)),o},decode:function(t,e){var r,i,o=t.readUInt8(e);if(o<n.OP_PUSHDATA1)r=o,i=1;else if(o===n.OP_PUSHDATA1){if(e+2>t.length)return null;r=t.readUInt8(e+1),i=2}else if(o===n.OP_PUSHDATA2){if(e+3>t.length)return null;r=t.readUInt16LE(e+1),i=3}else{if(e+5>t.length)return null;if(o!==n.OP_PUSHDATA4)throw new Error("Unexpected opcode");r=t.readUInt32LE(e+1),i=5}return{opcode:o,number:r,size:i}}}},2808:t=>{"use strict";function e(t,e){return Object.prototype.hasOwnProperty.call(t,e)}t.exports=function(t,r,n,i){r=r||"&",n=n||"=";var o={};if("string"!=typeof t||0===t.length)return o;var s=/\+/g;t=t.split(r);var a=1e3;i&&"number"==typeof i.maxKeys&&(a=i.maxKeys);var u=t.length;a>0&&u>a&&(u=a);for(var c=0;c<u;++c){var f,h,l,p,d=t[c].replace(s,"%20"),g=d.indexOf(n);g>=0?(f=d.substr(0,g),h=d.substr(g+1)):(f=d,h=""),l=decodeURIComponent(f),p=decodeURIComponent(h),e(o,l)?Array.isArray(o[l])?o[l].push(p):o[l]=[o[l],p]:o[l]=p}return o}},1368:t=>{"use strict";var e=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};t.exports=function(t,r,n,i){return r=r||"&",n=n||"=",null===t&&(t=void 0),"object"==typeof t?Object.keys(t).map((function(i){var o=encodeURIComponent(e(i))+n;return Array.isArray(t[i])?t[i].map((function(t){return o+encodeURIComponent(e(t))})).join(r):o+encodeURIComponent(e(t[i]))})).join(r):i?encodeURIComponent(e(i))+n+encodeURIComponent(e(t)):""}},6642:(t,e,r)=>{"use strict";e.decode=e.parse=r(2808),e.encode=e.stringify=r(1368)},5003:(t,e,r)=>{"use strict";var n=r(4406),i=65536,o=r(7834).Buffer,s=r.g.crypto||r.g.msCrypto;s&&s.getRandomValues?t.exports=function(t,e){if(t>4294967295)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(t);if(t>0)if(t>i)for(var a=0;a<t;a+=i)s.getRandomValues(r.slice(a,a+i));else s.getRandomValues(r);return"function"==typeof e?n.nextTick((function(){e(null,r)})):r}:t.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},9631:(t,e,r)=>{"use strict";var n=r(4406);function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(7834),s=r(5003),a=o.Buffer,u=o.kMaxLength,c=r.g.crypto||r.g.msCrypto,f=Math.pow(2,32)-1;function h(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>f||t<0)throw new TypeError("offset must be a uint32");if(t>u||t>e)throw new RangeError("offset out of range")}function l(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>f||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>u)throw new RangeError("buffer too small")}function p(t,e,r,i){if(n.browser){var o=t.buffer,a=new Uint8Array(o,e,r);return c.getRandomValues(a),i?void n.nextTick((function(){i(null,t)})):t}if(!i)return s(r).copy(t,e),t;s(r,(function(r,n){if(r)return i(r);n.copy(t,e),i(null,t)}))}c&&c.getRandomValues||!n.browser?(e.randomFill=function(t,e,n,i){if(!(a.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof e)i=e,e=0,n=t.length;else if("function"==typeof n)i=n,n=t.length-e;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return h(e,t.length),l(n,e,t.length),p(t,e,n,i)},e.randomFillSync=function(t,e,n){if(void 0===e&&(e=0),!(a.isBuffer(t)||t instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return h(e,t.length),void 0===n&&(n=t.length-e),l(n,e,t.length),p(t,e,n)}):(e.randomFill=i,e.randomFillSync=i)},5846:(t,e,r)=>{t.exports=r(7073)},7073:(t,e,r)=>{"use strict";var n=r(2884),i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};t.exports=h;var o=Object.create(r(7646));o.inherits=r(1285);var s=r(8051),a=r(2557);o.inherits(h,s);for(var u=i(a.prototype),c=0;c<u.length;c++){var f=u[c];h.prototype[f]||(h.prototype[f]=a.prototype[f])}function h(t){if(!(this instanceof h))return new h(t);s.call(this,t),a.call(this,t),t&&!1===t.readable&&(this.readable=!1),t&&!1===t.writable&&(this.writable=!1),this.allowHalfOpen=!0,t&&!1===t.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",l)}function l(){this.allowHalfOpen||this._writableState.ended||n.nextTick(p,this)}function p(t){t.end()}Object.defineProperty(h.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(h.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(t){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=t,this._writableState.destroyed=t)}}),h.prototype._destroy=function(t,e){this.push(null),this.end(),n.nextTick(e,t)}},5163:(t,e,r)=>{"use strict";t.exports=o;var n=r(7640),i=Object.create(r(7646));function o(t){if(!(this instanceof o))return new o(t);n.call(this,t)}i.inherits=r(1285),i.inherits(o,n),o.prototype._transform=function(t,e,r){r(null,t)}},8051:(t,e,r)=>{"use strict";var n=r(4406),i=r(2884);t.exports=v;var o,s=r(7906);v.ReadableState=m,r(2699).EventEmitter;var a=function(t,e){return t.listeners(e).length},u=r(5010),c=r(2521).Buffer,f=r.g.Uint8Array||function(){},h=Object.create(r(7646));h.inherits=r(1285);var l=r(6602),p=void 0;p=l&&l.debuglog?l.debuglog("stream"):function(){};var d,g=r(9128),y=r(2262);h.inherits(v,u);var b=["error","close","destroy","pause","resume"];function m(t,e){t=t||{};var n=e instanceof(o=o||r(7073));this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var i=t.highWaterMark,s=t.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(d||(d=r(1922).s),this.decoder=new d(t.encoding),this.encoding=t.encoding)}function v(t){if(o=o||r(7073),!(this instanceof v))return new v(t);this._readableState=new m(t,this),this.readable=!0,t&&("function"==typeof t.read&&(this._read=t.read),"function"==typeof t.destroy&&(this._destroy=t.destroy)),u.call(this)}function w(t,e,r,n,i){var o,s=t._readableState;return null===e?(s.reading=!1,function(t,e){if(!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,S(t)}}(t,s)):(i||(o=function(t,e){var r,n;return n=e,c.isBuffer(n)||n instanceof f||"string"==typeof e||void 0===e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}(s,e)),o?t.emit("error",o):s.objectMode||e&&e.length>0?("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===c.prototype||(e=function(t){return c.from(t)}(e)),n?s.endEmitted?t.emit("error",new Error("stream.unshift() after end event")):_(t,s,e,!0):s.ended?t.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?_(t,s,e,!1):k(t,s)):_(t,s,e,!1))):n||(s.reading=!1)),function(t){return!t.ended&&(t.needReadable||t.length<t.highWaterMark||0===t.length)}(s)}function _(t,e,r,n){e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&S(t)),k(t,e)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}}),v.prototype.destroy=y.destroy,v.prototype._undestroy=y.undestroy,v.prototype._destroy=function(t,e){this.push(null),e(t)},v.prototype.push=function(t,e){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof t&&((e=e||n.defaultEncoding)!==n.encoding&&(t=c.from(t,e),e=""),r=!0),w(this,t,e,!1,r)},v.prototype.unshift=function(t){return w(this,t,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(t){return d||(d=r(1922).s),this._readableState.decoder=new d(t),this._readableState.encoding=t,this};var A=8388608;function E(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=function(t){return t>=A?t=A:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function S(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(p("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?i.nextTick(I,t):I(t))}function I(t){p("emit readable"),t.emit("readable"),T(t)}function k(t,e){e.readingMore||(e.readingMore=!0,i.nextTick(x,t,e))}function x(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length<e.highWaterMark&&(p("maybeReadMore read 0"),t.read(0),r!==e.length);)r=e.length;e.readingMore=!1}function M(t){p("readable nexttick read 0"),t.read(0)}function C(t,e){e.reading||(p("resume read 0"),t.read(0)),e.resumeScheduled=!1,e.awaitDrain=0,t.emit("resume"),T(t),e.flowing&&!e.reading&&t.read(0)}function T(t){var e=t._readableState;for(p("flow",e.flowing);e.flowing&&null!==t.read(););}function O(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var n;return t<e.head.data.length?(n=e.head.data.slice(0,t),e.head.data=e.head.data.slice(t)):n=t===e.head.data.length?e.shift():r?function(t,e){var r=e.head,n=1,i=r.data;for(t-=i.length;r=r.next;){var o=r.data,s=t>o.length?o.length:t;if(s===o.length?i+=o:i+=o.slice(0,t),0==(t-=s)){s===o.length?(++n,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++n}return e.length-=n,i}(t,e):function(t,e){var r=c.allocUnsafe(t),n=e.head,i=1;for(n.data.copy(r),t-=n.data.length;n=n.next;){var o=n.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0==(t-=s)){s===o.length?(++i,n.next?e.head=n.next:e.head=e.tail=null):(e.head=n,n.data=o.slice(s));break}++i}return e.length-=i,r}(t,e),n}(t,e.buffer,e.decoder),r);var r}function P(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,i.nextTick(B,e,t))}function B(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function R(t,e){for(var r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1}v.prototype.read=function(t){p("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(0!==t&&(e.emittedReadable=!1),0===t&&e.needReadable&&(e.length>=e.highWaterMark||e.ended))return p("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?P(this):S(this),null;if(0===(t=E(t,e))&&e.ended)return 0===e.length&&P(this),null;var n,i=e.needReadable;return p("need readable",i),(0===e.length||e.length-t<e.highWaterMark)&&p("length less than watermark",i=!0),e.ended||e.reading?p("reading or ended",i=!1):i&&(p("do read"),e.reading=!0,e.sync=!0,0===e.length&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=E(r,e))),null===(n=t>0?O(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&P(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(t){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(t,e){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=t;break;case 1:o.pipes=[o.pipes,t];break;default:o.pipes.push(t)}o.pipesCount+=1,p("pipe count=%d opts=%j",o.pipesCount,e);var u=e&&!1===e.end||t===n.stdout||t===n.stderr?m:c;function c(){p("onend"),t.end()}o.endEmitted?i.nextTick(u):r.once("end",u),t.on("unpipe",(function e(n,i){p("onunpipe"),n===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,p("cleanup"),t.removeListener("close",y),t.removeListener("finish",b),t.removeListener("drain",f),t.removeListener("error",g),t.removeListener("unpipe",e),r.removeListener("end",c),r.removeListener("end",m),r.removeListener("data",d),h=!0,!o.awaitDrain||t._writableState&&!t._writableState.needDrain||f())}));var f=function(t){return function(){var e=t._readableState;p("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&a(t,"data")&&(e.flowing=!0,T(t))}}(r);t.on("drain",f);var h=!1,l=!1;function d(e){p("ondata"),l=!1,!1!==t.write(e)||l||((1===o.pipesCount&&o.pipes===t||o.pipesCount>1&&-1!==R(o.pipes,t))&&!h&&(p("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,l=!0),r.pause())}function g(e){p("onerror",e),m(),t.removeListener("error",g),0===a(t,"error")&&t.emit("error",e)}function y(){t.removeListener("finish",b),m()}function b(){p("onfinish"),t.removeListener("close",y),m()}function m(){p("unpipe"),r.unpipe(t)}return r.on("data",d),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events.error?s(t._events.error)?t._events.error.unshift(r):t._events.error=[r,t._events.error]:t.on(e,r)}(t,"error",g),t.once("close",y),t.once("finish",b),t.emit("pipe",r),o.flowing||(p("pipe resume"),r.resume()),t},v.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var n=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,r);return this}var s=R(e.pipes,t);return-1===s||(e.pipes.splice(s,1),e.pipesCount-=1,1===e.pipesCount&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r)),this},v.prototype.on=function(t,e){var r=u.prototype.on.call(this,t,e);if("data"===t)!1!==this._readableState.flowing&&this.resume();else if("readable"===t){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&S(this):i.nextTick(M,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var t=this._readableState;return t.flowing||(p("resume"),t.flowing=!0,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,i.nextTick(C,t,e))}(this,t)),this},v.prototype.pause=function(){return p("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(p("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(t){var e=this,r=this._readableState,n=!1;for(var i in t.on("end",(function(){if(p("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(i){p("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(e.push(i)||(n=!0,t.pause()))})),t)void 0===this[i]&&"function"==typeof t[i]&&(this[i]=function(e){return function(){return t[e].apply(t,arguments)}}(i));for(var o=0;o<b.length;o++)t.on(b[o],this.emit.bind(this,b[o]));return this._read=function(e){p("wrapped _read",e),n&&(n=!1,t.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=O},7640:(t,e,r)=>{"use strict";t.exports=s;var n=r(7073),i=Object.create(r(7646));function o(t,e){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=e&&this.push(e),n(t);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(t){if(!(this instanceof s))return new s(t);n.call(this,t),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,t&&("function"==typeof t.transform&&(this._transform=t.transform),"function"==typeof t.flush&&(this._flush=t.flush)),this.on("prefinish",a)}function a(){var t=this;"function"==typeof this._flush?this._flush((function(e,r){u(t,e,r)})):u(this,null,null)}function u(t,e,r){if(e)return t.emit("error",e);if(null!=r&&t.push(r),t._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(t._transformState.transforming)throw new Error("Calling transform done when still transforming");return t.push(null)}i.inherits=r(1285),i.inherits(s,n),s.prototype.push=function(t,e){return this._transformState.needTransform=!1,n.prototype.push.call(this,t,e)},s.prototype._transform=function(t,e,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(t,e,r){var n=this._transformState;if(n.writecb=r,n.writechunk=t,n.writeencoding=e,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(t){var e=this._transformState;null!==e.writechunk&&e.writecb&&!e.transforming?(e.transforming=!0,this._transform(e.writechunk,e.writeencoding,e.afterTransform)):e.needTransform=!0},s.prototype._destroy=function(t,e){var r=this;n.prototype._destroy.call(this,t,(function(t){e(t),r.emit("close")}))}},2557:(t,e,r)=>{"use strict";var n=r(4406),i=r(2884);function o(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var n=t.entry;for(t.entry=null;n;){var i=n.callback;e.pendingcb--,i(undefined),n=n.next}e.corkedRequestsFree?e.corkedRequestsFree.next=t:e.corkedRequestsFree=t}(e,t)}}t.exports=b;var s,a=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?setImmediate:i.nextTick;b.WritableState=y;var u=Object.create(r(7646));u.inherits=r(1285);var c,f={deprecate:r(5803)},h=r(5010),l=r(2521).Buffer,p=r.g.Uint8Array||function(){},d=r(2262);function g(){}function y(t,e){s=s||r(7073),t=t||{};var n=e instanceof s;this.objectMode=!!t.objectMode,n&&(this.objectMode=this.objectMode||!!t.writableObjectMode);var u=t.highWaterMark,c=t.writableHighWaterMark,f=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:n&&(c||0===c)?c:f,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var h=!1===t.decodeStrings;this.decodeStrings=!h,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,n=r.sync,o=r.writecb;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,n,o){--e.pendingcb,r?(i.nextTick(o,n),i.nextTick(E,t,e),t._writableState.errorEmitted=!0,t.emit("error",n)):(o(n),t._writableState.errorEmitted=!0,t.emit("error",n),E(t,e))}(t,r,n,e,o);else{var s=_(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(t,r),n?a(v,t,r,s,o):v(t,r,s,o)}}(e,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function b(t){if(s=s||r(7073),!(c.call(b,this)||this instanceof s))return new b(t);this._writableState=new y(t,this),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),h.call(this)}function m(t,e,r,n,i,o,s){e.writelen=n,e.writecb=s,e.writing=!0,e.sync=!0,r?t._writev(i,e.onwrite):t._write(i,o,e.onwrite),e.sync=!1}function v(t,e,r,n){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,n(),E(t,e)}function w(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var n=e.bufferedRequestCount,i=new Array(n),s=e.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,m(t,e,!0,e.length,i,"",s.finish),e.pendingcb++,e.lastBufferedRequest=null,s.next?(e.corkedRequestsFree=s.next,s.next=null):e.corkedRequestsFree=new o(e),e.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,f=r.encoding,h=r.callback;if(m(t,e,!1,e.objectMode?1:c.length,c,f,h),r=r.next,e.bufferedRequestCount--,e.writing)break}null===r&&(e.lastBufferedRequest=null)}e.bufferedRequest=r,e.bufferProcessing=!1}function _(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function A(t,e){t._final((function(r){e.pendingcb--,r&&t.emit("error",r),e.prefinished=!0,t.emit("prefinish"),E(t,e)}))}function E(t,e){var r=_(e);return r&&(function(t,e){e.prefinished||e.finalCalled||("function"==typeof t._final?(e.pendingcb++,e.finalCalled=!0,i.nextTick(A,t,e)):(e.prefinished=!0,t.emit("prefinish")))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"))),r}u.inherits(b,h),y.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(y.prototype,"buffer",{get:f.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(b,Symbol.hasInstance,{value:function(t){return!!c.call(this,t)||this===b&&t&&t._writableState instanceof y}})):c=function(t){return t instanceof this},b.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},b.prototype.write=function(t,e,r){var n,o=this._writableState,s=!1,a=!o.objectMode&&(n=t,l.isBuffer(n)||n instanceof p);return a&&!l.isBuffer(t)&&(t=function(t){return l.from(t)}(t)),"function"==typeof e&&(r=e,e=null),a?e="buffer":e||(e=o.defaultEncoding),"function"!=typeof r&&(r=g),o.ended?function(t,e){var r=new Error("write after end");t.emit("error",r),i.nextTick(e,r)}(this,r):(a||function(t,e,r,n){var o=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||e.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(t.emit("error",s),i.nextTick(n,s),o=!1),o}(this,o,t,r))&&(o.pendingcb++,s=function(t,e,r,n,i,o){if(!r){var s=function(t,e,r){return t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=l.from(e,r)),e}(e,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=e.objectMode?1:n.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var c=e.lastBufferedRequest;e.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1}else m(t,e,!1,a,n,i,o);return u}(this,o,a,t,e,r)),s},b.prototype.cork=function(){this._writableState.corked++},b.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,t.writing||t.corked||t.finished||t.bufferProcessing||!t.bufferedRequest||w(this,t))},b.prototype.setDefaultEncoding=function(t){if("string"==typeof t&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(b.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),b.prototype._write=function(t,e,r){r(new Error("_write() is not implemented"))},b.prototype._writev=null,b.prototype.end=function(t,e,r){var n=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),n.corked&&(n.corked=1,this.uncork()),n.ending||n.finished||function(t,e,r){e.ending=!0,E(t,e),r&&(e.finished?i.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1}(this,n,r)},Object.defineProperty(b.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),b.prototype.destroy=d.destroy,b.prototype._undestroy=d.undestroy,b.prototype._destroy=function(t,e){this.end(),e(t)}},9128:(t,e,r)=>{"use strict";var n=r(2521).Buffer,i=r(4854);t.exports=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.head=null,this.tail=null,this.length=0}return t.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},t.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},t.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},t.prototype.clear=function(){this.head=this.tail=null,this.length=0},t.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},t.prototype.concat=function(t){if(0===this.length)return n.alloc(0);if(1===this.length)return this.head.data;for(var e,r,i=n.allocUnsafe(t>>>0),o=this.head,s=0;o;)e=i,r=s,o.data.copy(e,r),s+=o.data.length,o=o.next;return i},t}(),i&&i.inspect&&i.inspect.custom&&(t.exports.prototype[i.inspect.custom]=function(){var t=i.inspect({length:this.length});return this.constructor.name+" "+t})},2262:(t,e,r)=>{"use strict";var n=r(2884);function i(t,e){t.emit("error",e)}t.exports={destroy:function(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(e?e(t):!t||this._writableState&&this._writableState.errorEmitted||n.nextTick(i,this,t),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?(n.nextTick(i,r,t),r._writableState&&(r._writableState.errorEmitted=!0)):e&&e(t)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},5010:(t,e,r)=>{t.exports=r(2699).EventEmitter},2521:(t,e,r)=>{var n=r(8834),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},1922:(t,e,r)=>{"use strict";var n=r(2521).Buffer,i=n.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){var e;switch(this.encoding=function(t){var e=function(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}(t);if("string"!=typeof e&&(n.isEncoding===i||!i(t)))throw new Error("Unknown encoding: "+t);return e||t}(t),this.encoding){case"utf16le":this.text=u,this.end=c,e=4;break;case"utf8":this.fillLast=a,e=4;break;case"base64":this.text=f,this.end=h,e=3;break;default:return this.write=l,void(this.end=p)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(e)}function s(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function a(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function u(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function c(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function f(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function l(t){return t.toString(this.encoding)}function p(t){return t&&t.length?this.write(t):""}e.s=o,o.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""},o.prototype.end=function(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e},o.prototype.text=function(t,e){var r=function(t,e,r){var n=e.length-1;if(n<r)return 0;var i=s(e[n]);return i>=0?(i>0&&(t.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(e[n]))>=0?(i>0&&(t.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(e[n]))>=0?(i>0&&(2===i?i=0:t.lastNeed=i-3),i):0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},o.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length}},7250:(t,e,r)=>{t.exports=r(7525).PassThrough},7525:(t,e,r)=>{(e=t.exports=r(8051)).Stream=e,e.Readable=e,e.Writable=r(2557),e.Duplex=r(7073),e.Transform=r(7640),e.PassThrough=r(5163)},4971:(t,e,r)=>{t.exports=r(7525).Transform},4007:(t,e,r)=>{t.exports=r(2557)},1445:(t,e,r)=>{"use strict";var n=r(8834).Buffer,i=r(1285),o=r(4485),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],f=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],h=[0,1518500249,1859775393,2400959708,2840853838],l=[1352829926,1548603684,1836072691,2053994217,0];function p(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function d(t,e){return t<<e|t>>>32-e}function g(t,e,r,n,i,o,s,a){return d(t+(e^r^n)+o+s|0,a)+i|0}function y(t,e,r,n,i,o,s,a){return d(t+(e&r|~e&n)+o+s|0,a)+i|0}function b(t,e,r,n,i,o,s,a){return d(t+((e|~r)^n)+o+s|0,a)+i|0}function m(t,e,r,n,i,o,s,a){return d(t+(e&n|r&~n)+o+s|0,a)+i|0}function v(t,e,r,n,i,o,s,a){return d(t+(e^(r|~n))+o+s|0,a)+i|0}i(p,o),p.prototype._update=function(){for(var t=s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,p=0|this._e,w=0|this._a,_=0|this._b,A=0|this._c,E=0|this._d,S=0|this._e,I=0;I<80;I+=1){var k,x;I<16?(k=g(r,n,i,o,p,t[a[I]],h[0],c[I]),x=v(w,_,A,E,S,t[u[I]],l[0],f[I])):I<32?(k=y(r,n,i,o,p,t[a[I]],h[1],c[I]),x=m(w,_,A,E,S,t[u[I]],l[1],f[I])):I<48?(k=b(r,n,i,o,p,t[a[I]],h[2],c[I]),x=b(w,_,A,E,S,t[u[I]],l[2],f[I])):I<64?(k=m(r,n,i,o,p,t[a[I]],h[3],c[I]),x=y(w,_,A,E,S,t[u[I]],l[3],f[I])):(k=v(r,n,i,o,p,t[a[I]],h[4],c[I]),x=g(w,_,A,E,S,t[u[I]],l[4],f[I])),r=p,p=o,o=d(i,10),i=n,n=k,w=S,S=E,E=d(A,10),A=_,_=x}var M=this._b+i+E|0;this._b=this._c+o+S|0,this._c=this._d+p+w|0,this._d=this._e+r+_|0,this._e=this._a+n+A|0,this._a=M},p.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=n.alloc?n.alloc(20):new n(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t},t.exports=p},7834:(t,e,r)=>{var n=r(8834),i=n.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=n:(o(n,e),e.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n.SlowBuffer(t)}},7654:(t,e,r)=>{"use strict";var n,i=r(4406),o=r(8834),s=o.Buffer,a={};for(n in o)o.hasOwnProperty(n)&&"SlowBuffer"!==n&&"Buffer"!==n&&(a[n]=o[n]);var u=a.Buffer={};for(n in s)s.hasOwnProperty(n)&&"allocUnsafe"!==n&&"allocUnsafeSlow"!==n&&(u[n]=s[n]);if(a.Buffer.prototype=s.prototype,u.from&&u.from!==Uint8Array.from||(u.from=function(t,e,r){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return s(t,e,r)}),u.alloc||(u.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var n=s(t);return e&&0!==e.length?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n}),!a.kStringMaxLength)try{a.kStringMaxLength=i.binding("buffer").kStringMaxLength}catch(t){}a.constants||(a.constants={MAX_LENGTH:a.kMaxLength},a.kStringMaxLength&&(a.constants.MAX_STRING_LENGTH=a.kStringMaxLength)),t.exports=a},7938:(t,e,r)=>{"use strict";var n,i,o,s;function a(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return u(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,a=!1;return{s:function(){r=t[Symbol.iterator]()},n:function(){var t=r.next();return s=t.done,t},e:function(t){a=!0,o=t},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw o}}}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}s=function(){return function t(e,r,n){function i(s,a){if(!r[s]){if(!e[s]){if(o)return o(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=r[s]={exports:{}};e[s][0].call(c.exports,(function(t){return i(e[s][1][t]||t)}),c,c.exports,t,e,r,n)}return r[s].exports}for(var o=void 0,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(t,e,r){r.byteLength=function(t){var e=c(t),r=e[0],n=e[1];return 3*(r+n)/4-n},r.toByteArray=function(t){var e,r,n=c(t),s=n[0],a=n[1],u=new o(function(t,e,r){return 3*(e+r)/4-r}(0,s,a)),f=0,h=a>0?s-4:s;for(r=0;r<h;r+=4)e=i[t.charCodeAt(r)]<<18|i[t.charCodeAt(r+1)]<<12|i[t.charCodeAt(r+2)]<<6|i[t.charCodeAt(r+3)],u[f++]=e>>16&255,u[f++]=e>>8&255,u[f++]=255&e;return 2===a&&(e=i[t.charCodeAt(r)]<<2|i[t.charCodeAt(r+1)]>>4,u[f++]=255&e),1===a&&(e=i[t.charCodeAt(r)]<<10|i[t.charCodeAt(r+1)]<<4|i[t.charCodeAt(r+2)]>>2,u[f++]=e>>8&255,u[f++]=255&e),u},r.fromByteArray=function(t){for(var e,r=t.length,i=r%3,o=[],s=16383,a=0,u=r-i;a<u;a+=s)o.push(f(t,a,a+s>u?u:a+s));return 1===i?(e=t[r-1],o.push(n[e>>2]+n[e<<4&63]+"==")):2===i&&(e=(t[r-2]<<8)+t[r-1],o.push(n[e>>10]+n[e>>4&63]+n[e<<2&63]+"=")),o.join("")};for(var n=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,u=s.length;a<u;++a)n[a]=s[a],i[s.charCodeAt(a)]=a;function c(t){var e=t.length;if(e%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t,e,r){for(var i,o,s=[],a=e;a<r;a+=3)i=(t[a]<<16&16711680)+(t[a+1]<<8&65280)+(255&t[a+2]),s.push(n[(o=i)>>18&63]+n[o>>12&63]+n[o>>6&63]+n[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],2:[function(t,e,r){},{}],3:[function(t,e,r){(function(e){var n=t("base64-js"),i=t("ieee754");r.Buffer=e,r.SlowBuffer=function(t){return+t!=t&&(t=0),e.alloc(+t)},r.INSPECT_MAX_BYTES=50;var o=2147483647;function s(t){if(t>o)throw new RangeError('The value "'+t+'" is invalid for option "size"');var r=new Uint8Array(t);return r.__proto__=e.prototype,r}function e(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return f(t)}return a(t,e,r)}function a(t,r,n){if("string"==typeof t)return function(t,r){if("string"==typeof r&&""!==r||(r="utf8"),!e.isEncoding(r))throw new TypeError("Unknown encoding: "+r);var n=0|p(t,r),i=s(n),o=i.write(t,r);return o!==n&&(i=i.slice(0,o)),i}(t,r);if(ArrayBuffer.isView(t))return h(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+c(t));if(F(t,ArrayBuffer)||t&&F(t.buffer,ArrayBuffer))return function(t,r,n){if(r<0||t.byteLength<r)throw new RangeError('"offset" is outside of buffer bounds');if(t.byteLength<r+(n||0))throw new RangeError('"length" is outside of buffer bounds');var i;return(i=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n)).__proto__=e.prototype,i}(t,r,n);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return e.from(i,r,n);var o=function(t){if(e.isBuffer(t)){var r=0|l(t.length),n=s(r);return 0===n.length||t.copy(n,0,0,r),n}return void 0!==t.length?"number"!=typeof t.length||q(t.length)?s(0):h(t):"Buffer"===t.type&&Array.isArray(t.data)?h(t.data):void 0}(t);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return e.from(t[Symbol.toPrimitive]("string"),r,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+c(t))}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t){return u(t),s(t<0?0:0|l(t))}function h(t){for(var e=t.length<0?0:0|l(t.length),r=s(e),n=0;n<e;n+=1)r[n]=255&t[n];return r}function l(t){if(t>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|t}function p(t,r){if(e.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||F(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+c(t));var n=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===n)return 0;for(var o=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return j(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return L(t).length;default:if(o)return i?-1:j(t).length;r=(""+r).toLowerCase(),o=!0}}function d(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return C(this,e,r);case"utf8":case"utf-8":return I(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return M(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function g(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function y(t,r,n,i,o){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),q(n=+n)&&(n=o?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(o)return-1;n=t.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof r&&(r=e.from(r,i)),e.isBuffer(r))return 0===r.length?-1:b(t,r,n,i,o);if("number"==typeof r)return r&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):b(t,[r],n,i,o);throw new TypeError("val must be string, number or Buffer")}function b(t,e,r,n,i){var o,s=1,a=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(i){var f=-1;for(o=r;o<a;o++)if(c(t,o)===c(e,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===u)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){for(var h=!0,l=0;l<u;l++)if(c(t,o+l)!==c(e,l)){h=!1;break}if(h)return o}return-1}function m(t,e,r,n){r=Number(r)||0;var i=t.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=e.length;n>o/2&&(n=o/2);for(var s=0;s<n;++s){var a=parseInt(e.substr(2*s,2),16);if(q(a))return s;t[r+s]=a}return s}function v(t,e,r,n){return D(j(e,t.length-r),t,r,n)}function w(t,e,r,n){return D(function(t){for(var e=[],r=0;r<t.length;++r)e.push(255&t.charCodeAt(r));return e}(e),t,r,n)}function _(t,e,r,n){return w(t,e,r,n)}function A(t,e,r,n){return D(L(e),t,r,n)}function E(t,e,r,n){return D(function(t,e){for(var r,n,i,o=[],s=0;s<t.length&&!((e-=2)<0);++s)n=(r=t.charCodeAt(s))>>8,i=r%256,o.push(i),o.push(n);return o}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function I(t,e,r){r=Math.min(t.length,r);for(var n=[],i=e;i<r;){var o,s,a,u,c=t[i],f=null,h=c>239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(f=c);break;case 2:128==(192&(o=t[i+1]))&&(u=(31&c)<<6|63&o)>127&&(f=u);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(u=(15&c)<<12|(63&o)<<6|63&s)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:o=t[i+1],s=t[i+2],a=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(u=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&u<1114112&&(f=u)}null===f?(f=65533,h=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),i+=h}return function(t){var e=t.length;if(e<=k)return String.fromCharCode.apply(String,t);for(var r="",n=0;n<e;)r+=String.fromCharCode.apply(String,t.slice(n,n+=k));return r}(n)}r.kMaxLength=o,e.TYPED_ARRAY_SUPPORT=function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()}catch(t){return!1}}(),e.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&e[Symbol.species]===e&&Object.defineProperty(e,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),e.poolSize=8192,e.from=function(t,e,r){return a(t,e,r)},e.prototype.__proto__=Uint8Array.prototype,e.__proto__=Uint8Array,e.alloc=function(t,e,r){return function(t,e,r){return u(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}(t,e,r)},e.allocUnsafe=function(t){return f(t)},e.allocUnsafeSlow=function(t){return f(t)},e.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==e.prototype},e.compare=function(t,r){if(F(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),F(r,Uint8Array)&&(r=e.from(r,r.offset,r.byteLength)),!e.isBuffer(t)||!e.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;for(var n=t.length,i=r.length,o=0,s=Math.min(n,i);o<s;++o)if(t[o]!==r[o]){n=t[o],i=r[o];break}return n<i?-1:i<n?1:0},e.isEncoding=function(t){switch(String(t).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},e.concat=function(t,r){if(!Array.isArray(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return e.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<t.length;++n)r+=t[n].length;var i=e.allocUnsafe(r),o=0;for(n=0;n<t.length;++n){var s=t[n];if(F(s,Uint8Array)&&(s=e.from(s)),!e.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(i,o),o+=s.length}return i},e.byteLength=p,e.prototype._isBuffer=!0,e.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var e=0;e<t;e+=2)g(this,e,e+1);return this},e.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var e=0;e<t;e+=4)g(this,e,e+3),g(this,e+1,e+2);return this},e.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var e=0;e<t;e+=8)g(this,e,e+7),g(this,e+1,e+6),g(this,e+2,e+5),g(this,e+3,e+4);return this},e.prototype.toString=function(){var t=this.length;return 0===t?"":0===arguments.length?I(this,0,t):d.apply(this,arguments)},e.prototype.toLocaleString=e.prototype.toString,e.prototype.equals=function(t){if(!e.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===e.compare(this,t)},e.prototype.inspect=function(){var t="",e=r.INSPECT_MAX_BYTES;return t=this.toString("hex",0,e).replace(/(.{2})/g,"$1 ").trim(),this.length>e&&(t+=" ... "),"<Buffer "+t+">"},e.prototype.compare=function(t,r,n,i,o){if(F(t,Uint8Array)&&(t=e.from(t,t.offset,t.byteLength)),!e.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+c(t));if(void 0===r&&(r=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===o&&(o=this.length),r<0||n>t.length||i<0||o>this.length)throw new RangeError("out of range index");if(i>=o&&r>=n)return 0;if(i>=o)return-1;if(r>=n)return 1;if(this===t)return 0;for(var s=(o>>>=0)-(i>>>=0),a=(n>>>=0)-(r>>>=0),u=Math.min(s,a),f=this.slice(i,o),h=t.slice(r,n),l=0;l<u;++l)if(f[l]!==h[l]){s=f[l],a=h[l];break}return s<a?-1:a<s?1:0},e.prototype.includes=function(t,e,r){return-1!==this.indexOf(t,e,r)},e.prototype.indexOf=function(t,e,r){return y(this,t,e,r,!0)},e.prototype.lastIndexOf=function(t,e,r){return y(this,t,e,r,!1)},e.prototype.write=function(t,e,r,n){if(void 0===e)n="utf8",r=this.length,e=0;else if(void 0===r&&"string"==typeof e)n=e,r=this.length,e=0;else{if(!isFinite(e))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");e>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-e;if((void 0===r||r>i)&&(r=i),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return m(this,t,e,r);case"utf8":case"utf-8":return v(this,t,e,r);case"ascii":return w(this,t,e,r);case"latin1":case"binary":return _(this,t,e,r);case"base64":return A(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function x(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(127&t[i]);return n}function M(t,e,r){var n="";r=Math.min(t.length,r);for(var i=e;i<r;++i)n+=String.fromCharCode(t[i]);return n}function C(t,e,r){var n,i=t.length;(!e||e<0)&&(e=0),(!r||r<0||r>i)&&(r=i);for(var o="",s=e;s<r;++s)o+=(n=t[s])<16?"0"+n.toString(16):n.toString(16);return o}function T(t,e,r){for(var n=t.slice(e,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function O(t,e,r){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+e>r)throw new RangeError("Trying to access beyond buffer length")}function P(t,r,n,i,o,s){if(!e.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>o||r<s)throw new RangeError('"value" argument is out of bounds');if(n+i>t.length)throw new RangeError("Index out of range")}function B(t,e,r,n,i,o){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function R(t,e,r,n,o){return e=+e,r>>>=0,o||B(t,0,r,4),i.write(t,e,r,n,23,4),r+4}function N(t,e,r,n,o){return e=+e,r>>>=0,o||B(t,0,r,8),i.write(t,e,r,n,52,8),r+8}e.prototype.slice=function(t,r){var n=this.length;(t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(r=void 0===r?n:~~r)<0?(r+=n)<0&&(r=0):r>n&&(r=n),r<t&&(r=t);var i=this.subarray(t,r);return i.__proto__=e.prototype,i},e.prototype.readUIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n},e.prototype.readUIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);for(var n=this[t+--e],i=1;e>0&&(i*=256);)n+=this[t+--e]*i;return n},e.prototype.readUInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),this[t]},e.prototype.readUInt16LE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]|this[t+1]<<8},e.prototype.readUInt16BE=function(t,e){return t>>>=0,e||O(t,2,this.length),this[t]<<8|this[t+1]},e.prototype.readUInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},e.prototype.readUInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},e.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);for(var n=this[t],i=1,o=0;++o<e&&(i*=256);)n+=this[t+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*e)),n},e.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||O(t,e,this.length);for(var n=e,i=1,o=this[t+--n];n>0&&(i*=256);)o+=this[t+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*e)),o},e.prototype.readInt8=function(t,e){return t>>>=0,e||O(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},e.prototype.readInt16LE=function(t,e){t>>>=0,e||O(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt16BE=function(t,e){t>>>=0,e||O(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},e.prototype.readInt32LE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},e.prototype.readInt32BE=function(t,e){return t>>>=0,e||O(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},e.prototype.readFloatLE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!0,23,4)},e.prototype.readFloatBE=function(t,e){return t>>>=0,e||O(t,4,this.length),i.read(this,t,!1,23,4)},e.prototype.readDoubleLE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!0,52,8)},e.prototype.readDoubleBE=function(t,e){return t>>>=0,e||O(t,8,this.length),i.read(this,t,!1,52,8)},e.prototype.writeUIntLE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||P(this,t,e,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[e]=255&t;++o<r&&(i*=256);)this[e+o]=t/i&255;return e+r},e.prototype.writeUIntBE=function(t,e,r,n){t=+t,e>>>=0,r>>>=0,n||P(this,t,e,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[e+i]=255&t;--i>=0&&(o*=256);)this[e+i]=t/o&255;return e+r},e.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,255,0),this[e]=255&t,e+1},e.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},e.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var o=0,s=1,a=0;for(this[e]=255&t;++o<r&&(s*=256);)t<0&&0===a&&0!==this[e+o-1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},e.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e>>>=0,!n){var i=Math.pow(2,8*r-1);P(this,t,e,r,i-1,-i)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},e.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},e.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},e.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},e.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},e.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||P(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},e.prototype.writeFloatLE=function(t,e,r){return R(this,t,e,!0,r)},e.prototype.writeFloatBE=function(t,e,r){return R(this,t,e,!1,r)},e.prototype.writeDoubleLE=function(t,e,r){return N(this,t,e,!0,r)},e.prototype.writeDoubleBE=function(t,e,r){return N(this,t,e,!1,r)},e.prototype.copy=function(t,r,n,i){if(!e.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),i||0===i||(i=this.length),r>=t.length&&(r=t.length),r||(r=0),i>0&&i<n&&(i=n),i===n)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-r<i-n&&(i=t.length-r+n);var o=i-n;if(this===t&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(r,n,i);else if(this===t&&n<r&&r<i)for(var s=o-1;s>=0;--s)t[s+r]=this[s+n];else Uint8Array.prototype.set.call(t,this.subarray(n,i),r);return o},e.prototype.fill=function(t,r,n,i){if("string"==typeof t){if("string"==typeof r?(i=r,r=0,n=this.length):"string"==typeof n&&(i=n,n=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!e.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var o=t.charCodeAt(0);("utf8"===i&&o<128||"latin1"===i)&&(t=o)}}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;var s;if(r>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=r;s<n;++s)this[s]=t;else{var a=e.isBuffer(t)?t:e.from(t,i),u=a.length;if(0===u)throw new TypeError('The value "'+t+'" is invalid for argument "value"');for(s=0;s<n-r;++s)this[s+r]=a[s%u]}return this};var U=/[^+/0-9A-Za-z-_]/g;function j(t,e){var r;e=e||1/0;for(var n=t.length,i=null,o=[],s=0;s<n;++s){if((r=t.charCodeAt(s))>55295&&r<57344){if(!i){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(e-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(e-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function L(t){return n.toByteArray(function(t){if((t=(t=t.split("=")[0]).trim().replace(U,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function D(t,e,r,n){for(var i=0;i<n&&!(i+r>=e.length||i>=t.length);++i)e[i+r]=t[i];return i}function F(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function q(t){return t!=t}}).call(this,t("buffer").Buffer)},{"base64-js":1,buffer:3,ieee754:32}],4:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.attributeNames=r.elementNames=void 0,r.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]),r.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]])},{}],5:[function(t,e,r){var n=this&&this.__assign||function(){return n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var i in e=arguments[r])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},n.apply(this,arguments)},i=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),o=this&&this.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&i(e,t,r);return o(e,t),e};Object.defineProperty(r,"__esModule",{value:!0});var a=s(t("domelementtype")),u=t("entities"),c=t("./foreignNames"),f=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]),h=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function l(t,e){void 0===e&&(e={});for(var r=Array.isArray(t)||t.cheerio?t:[t],n="",i=0;i<r.length;i++)n+=p(r[i],e);return n}function p(t,e){switch(t.type){case"root":return l(t.children,e);case a.Directive:return"<"+t.data+">";case a.Comment:return"\x3c!--"+t.data+"--\x3e";case a.CDATA:return function(t){return"<![CDATA["+t.children[0].data+"]]>"}(t);default:return a.isTag(t)?function(t,e){var r;"foreign"===e.xmlMode&&(t.name=null!==(r=c.elementNames.get(t.name))&&void 0!==r?r:t.name,t.parent&&d.has(t.parent.name)&&(e=n(n({},e),{xmlMode:!1}))),!e.xmlMode&&g.has(t.name)&&(e=n(n({},e),{xmlMode:"foreign"}));var i="<"+t.name,o=function(t,e){if(t)return Object.keys(t).map((function(r){var n,i,o=null!==(n=t[r])&&void 0!==n?n:"";return"foreign"===e.xmlMode&&(r=null!==(i=c.attributeNames.get(r))&&void 0!==i?i:r),e.emptyAttrs||e.xmlMode||""!==o?r+'="'+(e.decodeEntities?u.encodeXML(o):o.replace(/"/g,"&quot;"))+'"':r})).join(" ")}(t.attribs,e);return o&&(i+=" "+o),0===t.children.length&&(e.xmlMode?!1!==e.selfClosingTags:e.selfClosingTags&&h.has(t.name))?(e.xmlMode||(i+=" "),i+="/>"):(i+=">",t.children.length>0&&(i+=l(t.children,e)),!e.xmlMode&&h.has(t.name)||(i+="</"+t.name+">")),i}(t,e):function(t,e){var r=t.data||"";return!e.decodeEntities||t.parent&&f.has(t.parent.name)||(r=u.encodeXML(r)),r}(t,e)}}r.default=l;var d=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),g=new Set(["svg","math"])},{"./foreignNames":4,domelementtype:6,entities:20}],6:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.Doctype=r.CDATA=r.Tag=r.Style=r.Script=r.Comment=r.Directive=r.Text=r.isTag=void 0,r.isTag=function(t){return"tag"===t.type||"script"===t.type||"style"===t.type},r.Text="text",r.Directive="directive",r.Comment="comment",r.Script="script",r.Style="style",r.Tag="tag",r.CDATA="cdata",r.Doctype="doctype"},{}],7:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0});var n=t("./node");r.Node=n.Node,r.Element=n.Element,r.DataNode=n.DataNode,r.NodeWithChildren=n.NodeWithChildren;var i=/\s+/g,o={normalizeWhitespace:!1,withStartIndices:!1,withEndIndices:!1},s=function(){function t(t,e,r){this.dom=[],this._done=!1,this._tagStack=[],this._lastNode=null,this._parser=null,"function"==typeof e&&(r=e,e=o),"object"===c(t)&&(e=t,t=void 0),this._callback=t||null,this._options=e||o,this._elementCB=r||null}return t.prototype.onparserinit=function(t){this._parser=t},t.prototype.onreset=function(){this.dom=[],this._done=!1,this._tagStack=[],this._lastNode=null,this._parser=this._parser||null},t.prototype.onend=function(){this._done||(this._done=!0,this._parser=null,this.handleCallback(null))},t.prototype.onerror=function(t){this.handleCallback(t)},t.prototype.onclosetag=function(){this._lastNode=null;var t=this._tagStack.pop();t&&this._parser&&(this._options.withEndIndices&&(t.endIndex=this._parser.endIndex),this._elementCB&&this._elementCB(t))},t.prototype.onopentag=function(t,e){var r=new n.Element(t,e);this.addNode(r),this._tagStack.push(r)},t.prototype.ontext=function(t){var e=this._options.normalizeWhitespace,r=this._lastNode;if(r&&"text"===r.type)e?r.data=(r.data+t).replace(i," "):r.data+=t;else{e&&(t=t.replace(i," "));var o=new n.DataNode("text",t);this.addNode(o),this._lastNode=o}},t.prototype.oncomment=function(t){if(this._lastNode&&"comment"===this._lastNode.type)this._lastNode.data+=t;else{var e=new n.DataNode("comment",t);this.addNode(e),this._lastNode=e}},t.prototype.oncommentend=function(){this._lastNode=null},t.prototype.oncdatastart=function(){var t=new n.DataNode("text",""),e=new n.NodeWithChildren("cdata",[t]);this.addNode(e),t.parent=e,this._lastNode=t},t.prototype.oncdataend=function(){this._lastNode=null},t.prototype.onprocessinginstruction=function(t,e){var r=new n.ProcessingInstruction(t,e);this.addNode(r)},t.prototype.handleCallback=function(t){if("function"==typeof this._callback)this._callback(t,this.dom);else if(t)throw t},t.prototype.addNode=function(t){var e=this._tagStack[this._tagStack.length-1],r=e?e.children:this.dom,n=r[r.length-1];this._parser&&(this._options.withStartIndices&&(t.startIndex=this._parser.startIndex),this._options.withEndIndices&&(t.endIndex=this._parser.endIndex)),r.push(t),n&&(t.prev=n,n.next=t),e&&(t.parent=e),this._lastNode=null},t.prototype.addDataNode=function(t){this.addNode(t),this._lastNode=t},t}();r.DomHandler=s,r.default=s},{"./node":8}],8:[function(t,e,r){var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)});Object.defineProperty(r,"__esModule",{value:!0});var o=new Map([["tag",1],["script",1],["style",1],["directive",1],["text",3],["cdata",4],["comment",8]]),s=function(){function t(t){this.type=t,this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return o.get(this.type)||1},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent||null},set:function(t){this.parent=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"previousSibling",{get:function(){return this.prev||null},set:function(t){this.prev=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nextSibling",{get:function(){return this.next||null},set:function(t){this.next=t},enumerable:!0,configurable:!0}),t}();r.Node=s;var a=function(t){function e(e,r){var n=t.call(this,e)||this;return n.data=r,n}return i(e,t),Object.defineProperty(e.prototype,"nodeValue",{get:function(){return this.data},set:function(t){this.data=t},enumerable:!0,configurable:!0}),e}(s);r.DataNode=a;var u=function(t){function e(e,r){var n=t.call(this,"directive",r)||this;return n.name=e,n}return i(e,t),e}(a);r.ProcessingInstruction=u;var c=function(t){function e(e,r){var n=t.call(this,e)||this;return n.children=r,n}return i(e,t),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.children[0]||null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"lastChild",{get:function(){return this.children[this.children.length-1]||null},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"childNodes",{get:function(){return this.children},set:function(t){this.children=t},enumerable:!0,configurable:!0}),e}(s);r.NodeWithChildren=c;var f=function(t){function e(e,r){var n=t.call(this,"script"===e?"script":"style"===e?"style":"tag",[])||this;return n.name=e,n.attribs=r,n.attribs=r,n}return i(e,t),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.name},set:function(t){this.name=t},enumerable:!0,configurable:!0}),e}(c);r.Element=f},{}],9:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.uniqueSort=r.compareDocumentPosition=r.removeSubsets=void 0;var n=t("./tagtypes");function i(t,e){var r=[],i=[];if(t===e)return 0;for(var o=n.hasChildren(t)?t:t.parent;o;)r.unshift(o),o=o.parent;for(o=n.hasChildren(e)?e:e.parent;o;)i.unshift(o),o=o.parent;for(var s=Math.min(r.length,i.length),a=0;a<s&&r[a]===i[a];)a++;if(0===a)return 1;var u=r[a-1],c=u.children,f=r[a],h=i[a];return c.indexOf(f)>c.indexOf(h)?u===e?20:4:u===t?10:2}r.removeSubsets=function(t){for(var e=t.length;--e>=0;){var r=t[e];if(e>0&&t.lastIndexOf(r,e-1)>=0)t.splice(e,1);else for(var n=r.parent;n;n=n.parent)if(t.includes(n)){t.splice(e,1);break}}return t},r.compareDocumentPosition=i,r.uniqueSort=function(t){return(t=t.filter((function(t,e,r){return!r.includes(t,e+1)}))).sort((function(t,e){var r=i(t,e);return 2&r?-1:4&r?1:0})),t}},{"./tagtypes":15}],10:[function(t,e,r){var n=this&&this.__createBinding||(Object.create?function(t,e,r,n){void 0===n&&(n=r),Object.defineProperty(t,n,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,n){void 0===n&&(n=r),t[n]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||n(e,t,r)};Object.defineProperty(r,"__esModule",{value:!0}),i(t("./stringify"),r),i(t("./traversal"),r),i(t("./manipulation"),r),i(t("./querying"),r),i(t("./legacy"),r),i(t("./helpers"),r),i(t("./tagtypes"),r)},{"./helpers":9,"./legacy":11,"./manipulation":12,"./querying":13,"./stringify":14,"./tagtypes":15,"./traversal":16}],11:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.getElementsByTagType=r.getElementsByTagName=r.getElementById=r.getElements=r.testElement=void 0;var n=t("./querying"),i=t("./tagtypes");function o(t){return"text"===t.type}var s={tag_name:function(t){return"function"==typeof t?function(e){return i.isTag(e)&&t(e.name)}:"*"===t?i.isTag:function(e){return i.isTag(e)&&e.name===t}},tag_type:function(t){return"function"==typeof t?function(e){return t(e.type)}:function(e){return e.type===t}},tag_contains:function(t){return"function"==typeof t?function(e){return o(e)&&t(e.data)}:function(e){return o(e)&&e.data===t}}};function a(t,e){return"function"==typeof e?function(r){return i.isTag(r)&&e(r.attribs[t])}:function(r){return i.isTag(r)&&r.attribs[t]===e}}function u(t,e){return function(r){return t(r)||e(r)}}function c(t){var e=Object.keys(t).map((function(e){var r=t[e];return e in s?s[e](r):a(e,r)}));return 0===e.length?null:e.reduce(u)}r.testElement=function(t,e){var r=c(t);return!r||r(e)},r.getElements=function(t,e,r,i){void 0===i&&(i=1/0);var o=c(t);return o?n.filter(o,e,r,i):[]},r.getElementById=function(t,e,r){return void 0===r&&(r=!0),Array.isArray(e)||(e=[e]),n.findOne(a("id",t),e,r)},r.getElementsByTagName=function(t,e,r,i){return void 0===i&&(i=1/0),n.filter(s.tag_name(t),e,r,i)},r.getElementsByTagType=function(t,e,r,i){return void 0===r&&(r=!0),void 0===i&&(i=1/0),n.filter(s.tag_type(t),e,r,i)}},{"./querying":13,"./tagtypes":15}],12:[function(t,e,r){function n(t){if(t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t.parent){var e=t.parent.children;e.splice(e.lastIndexOf(t),1)}}Object.defineProperty(r,"__esModule",{value:!0}),r.prepend=r.append=r.appendChild=r.replaceElement=r.removeElement=void 0,r.removeElement=n,r.replaceElement=function(t,e){var r=e.prev=t.prev;r&&(r.next=e);var n=e.next=t.next;n&&(n.prev=e);var i=e.parent=t.parent;if(i){var o=i.children;o[o.lastIndexOf(t)]=e}},r.appendChild=function(t,e){if(n(e),e.parent=t,1!==t.children.push(e)){var r=t.children[t.children.length-2];r.next=e,e.prev=r,e.next=null}},r.append=function(t,e){n(e);var r=t.parent,i=t.next;if(e.next=i,e.prev=t,t.next=e,e.parent=r,i){if(i.prev=e,r){var o=r.children;o.splice(o.lastIndexOf(i),0,e)}}else r&&r.children.push(e)},r.prepend=function(t,e){var r=t.parent;if(r){var n=r.children;n.splice(n.lastIndexOf(t),0,e)}t.prev&&(t.prev.next=e),e.parent=r,e.prev=t.prev,e.next=t,t.prev=e}},{}],13:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.findAll=r.existsOne=r.findOne=r.findOneChild=r.find=r.filter=void 0;var n=t("./tagtypes");function i(t,e,r,o){for(var s=[],a=0,u=e;a<u.length;a++){var c=u[a];if(t(c)&&(s.push(c),--o<=0))break;if(r&&n.hasChildren(c)&&c.children.length>0){var f=i(t,c.children,r,o);if(s.push.apply(s,f),(o-=f.length)<=0)break}}return s}r.filter=function(t,e,r,n){return void 0===r&&(r=!0),void 0===n&&(n=1/0),Array.isArray(e)||(e=[e]),i(t,e,r,n)},r.find=i,r.findOneChild=function(t,e){return e.find(t)},r.findOne=function t(e,r,i){void 0===i&&(i=!0);for(var o=null,s=0;s<r.length&&!o;s++){var a=r[s];n.isTag(a)&&(e(a)?o=a:i&&a.children.length>0&&(o=t(e,a.children)))}return o},r.existsOne=function t(e,r){return r.some((function(r){return n.isTag(r)&&(e(r)||r.children.length>0&&t(e,r.children))}))},r.findAll=function(t,e){for(var r,i,o=[],s=e.filter(n.isTag);i=s.shift();){var a=null===(r=i.children)||void 0===r?void 0:r.filter(n.isTag);a&&a.length>0&&s.unshift.apply(s,a),t(i)&&o.push(i)}return o}},{"./tagtypes":15}],14:[function(t,e,r){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.getText=r.getInnerHTML=r.getOuterHTML=void 0;var i=t("./tagtypes"),o=n(t("dom-serializer"));function s(t,e){return o.default(t,e)}r.getOuterHTML=s,r.getInnerHTML=function(t,e){return i.hasChildren(t)?t.children.map((function(t){return s(t,e)})).join(""):""},r.getText=function t(e){return Array.isArray(e)?e.map(t).join(""):i.isTag(e)?"br"===e.name?"\n":t(e.children):i.isCDATA(e)?t(e.children):i.isText(e)?e.data:""}},{"./tagtypes":15,"dom-serializer":5}],15:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.hasChildren=r.isComment=r.isText=r.isCDATA=r.isTag=void 0;var n=t("domelementtype");r.isTag=function(t){return n.isTag(t)},r.isCDATA=function(t){return"cdata"===t.type},r.isText=function(t){return"text"===t.type},r.isComment=function(t){return"comment"===t.type},r.hasChildren=function(t){return Object.prototype.hasOwnProperty.call(t,"children")}},{domelementtype:6}],16:[function(t,e,r){function n(t){return t.children||null}function i(t){return t.parent||null}Object.defineProperty(r,"__esModule",{value:!0}),r.nextElementSibling=r.getName=r.hasAttrib=r.getAttributeValue=r.getSiblings=r.getParent=r.getChildren=void 0,r.getChildren=n,r.getParent=i,r.getSiblings=function(t){var e=i(t);return e?n(e):[t]},r.getAttributeValue=function(t,e){var r;return null===(r=t.attribs)||void 0===r?void 0:r[e]},r.hasAttrib=function(t,e){return!!t.attribs&&Object.prototype.hasOwnProperty.call(t.attribs,e)&&null!=t.attribs[e]},r.getName=function(t){return t.name},r.nextElementSibling=function(t){for(var e=t.next;null!==e&&"tag"!==e.type;)e=e.next;return e}},{}],17:[function(t,e,r){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.decodeHTML=r.decodeHTMLStrict=r.decodeXML=void 0;var i=n(t("./maps/entities.json")),o=n(t("./maps/legacy.json")),s=n(t("./maps/xml.json")),a=n(t("./decode_codepoint"));function u(t){var e=Object.keys(t).join("|"),r=f(t),n=new RegExp("&(?:"+(e+="|#[xX][\\da-fA-F]+|#\\d+")+");","g");return function(t){return String(t).replace(n,r)}}r.decodeXML=u(s.default),r.decodeHTMLStrict=u(i.default);var c=function(t,e){return t<e?1:-1};function f(t){return function(e){if("#"===e.charAt(1)){var r=e.charAt(2);return"X"===r||"x"===r?a.default(parseInt(e.substr(3),16)):a.default(parseInt(e.substr(2),10))}return t[e.slice(1,-1)]}}r.decodeHTML=function(){for(var t=Object.keys(o.default).sort(c),e=Object.keys(i.default).sort(c),r=0,n=0;r<e.length;r++)t[n]===e[r]?(e[r]+=";?",n++):e[r]+=";";var s=new RegExp("&(?:"+e.join("|")+"|#[xX][\\da-fA-F]+;?|#\\d+;?)","g"),a=f(i.default);function u(t){return";"!==t.substr(-1)&&(t+=";"),a(t)}return function(t){return String(t).replace(s,u)}}()},{"./decode_codepoint":18,"./maps/entities.json":22,"./maps/legacy.json":23,"./maps/xml.json":24}],18:[function(t,e,r){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("./maps/decode.json"));r.default=function(t){if(t>=55296&&t<=57343||t>1114111)return"�";t in i.default&&(t=i.default[t]);var e="";return t>65535&&(t-=65536,e+=String.fromCharCode(t>>>10&1023|55296),t=56320|1023&t),e+String.fromCharCode(t)}},{"./maps/decode.json":21}],19:[function(t,e,r){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0}),r.escape=r.encodeHTML=r.encodeXML=void 0;var i=u(n(t("./maps/xml.json")).default),o=c(i);r.encodeXML=l(i,o);var s=u(n(t("./maps/entities.json")).default),a=c(s);function u(t){return Object.keys(t).sort().reduce((function(e,r){return e[t[r]]="&"+r+";",e}),{})}function c(t){for(var e=[],r=[],n=0,i=Object.keys(t);n<i.length;n++){var o=i[n];1===o.length?e.push("\\"+o):r.push(o)}e.sort();for(var s=0;s<e.length-1;s++){for(var a=s;a<e.length-1&&e[a].charCodeAt(1)+1===e[a+1].charCodeAt(1);)a+=1;var u=1+a-s;u<3||e.splice(s,u,e[s]+"-"+e[a])}return r.unshift("["+e.join("")+"]"),new RegExp(r.join("|"),"g")}r.encodeHTML=l(s,a);var f=/(?:[\x80-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g;function h(t){return"&#x"+t.codePointAt(0).toString(16).toUpperCase()+";"}function l(t,e){return function(r){return r.replace(e,(function(e){return t[e]})).replace(f,h)}}var p=c(i);r.escape=function(t){return t.replace(p,h).replace(f,h)}},{"./maps/entities.json":22,"./maps/xml.json":24}],20:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.encode=r.decodeStrict=r.decode=void 0;var n=t("./decode"),i=t("./encode");r.decode=function(t,e){return(!e||e<=0?n.decodeXML:n.decodeHTML)(t)},r.decodeStrict=function(t,e){return(!e||e<=0?n.decodeXML:n.decodeHTMLStrict)(t)},r.encode=function(t,e){return(!e||e<=0?i.encodeXML:i.encodeHTML)(t)};var o=t("./encode");Object.defineProperty(r,"encodeXML",{enumerable:!0,get:function(){return o.encodeXML}}),Object.defineProperty(r,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(r,"escape",{enumerable:!0,get:function(){return o.escape}}),Object.defineProperty(r,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(r,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var s=t("./decode");Object.defineProperty(r,"decodeXML",{enumerable:!0,get:function(){return s.decodeXML}}),Object.defineProperty(r,"decodeHTML",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(r,"decodeHTMLStrict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(r,"decodeHTML4",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(r,"decodeHTML5",{enumerable:!0,get:function(){return s.decodeHTML}}),Object.defineProperty(r,"decodeHTML4Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(r,"decodeHTML5Strict",{enumerable:!0,get:function(){return s.decodeHTMLStrict}}),Object.defineProperty(r,"decodeXMLStrict",{enumerable:!0,get:function(){return s.decodeXML}})},{"./decode":17,"./encode":19}],21:[function(t,e,r){e.exports={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376}},{}],22:[function(t,e,r){e.exports={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅",in:"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺",int:"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}},{}],23:[function(t,e,r){e.exports={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"}},{}],24:[function(t,e,r){e.exports={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}},{}],25:[function(t,e,r){var n=Object.create||function(t){var e=function(){};return e.prototype=t,new e},i=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return r},o=Function.prototype.bind||function(t){var e=this;return function(){return e.apply(t,arguments)}};function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=n(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var a,u=10;try{var f={};Object.defineProperty&&Object.defineProperty(f,"x",{value:0}),a=0===f.x}catch(t){a=!1}function h(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function l(t,e,r){if(e)t.call(r);else for(var n=t.length,i=A(t,n),o=0;o<n;++o)i[o].call(r)}function p(t,e,r,n){if(e)t.call(r,n);else for(var i=t.length,o=A(t,i),s=0;s<i;++s)o[s].call(r,n)}function d(t,e,r,n,i){if(e)t.call(r,n,i);else for(var o=t.length,s=A(t,o),a=0;a<o;++a)s[a].call(r,n,i)}function g(t,e,r,n,i,o){if(e)t.call(r,n,i,o);else for(var s=t.length,a=A(t,s),u=0;u<s;++u)a[u].call(r,n,i,o)}function y(t,e,r,n){if(e)t.apply(r,n);else for(var i=t.length,o=A(t,i),s=0;s<i;++s)o[s].apply(r,n)}function b(t,e,r,i){var o,s,a;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((s=t._events)?(s.newListener&&(t.emit("newListener",e,r.listener?r.listener:r),s=t._events),a=s[e]):(s=t._events=n(null),t._eventsCount=0),a){if("function"==typeof a?a=s[e]=i?[r,a]:[a,r]:i?a.unshift(r):a.push(r),!a.warned&&(o=h(t))&&o>0&&a.length>o){a.warned=!0;var u=new Error("Possible EventEmitter memory leak detected. "+a.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');u.name="MaxListenersExceededWarning",u.emitter=t,u.type=e,u.count=a.length,"object"===("undefined"==typeof console?"undefined":c(console))&&console.warn&&console.warn("%s: %s",u.name,u.message)}}else a=s[e]=r,++t._eventsCount;return t}function m(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e<t.length;++e)t[e]=arguments[e];this.listener.apply(this.target,t)}}function v(t,e,r){var n={fired:!1,wrapFn:void 0,target:t,type:e,listener:r},i=o.call(m,n);return i.listener=r,n.wrapFn=i,i}function w(t,e,r){var n=t._events;if(!n)return[];var i=n[e];return i?"function"==typeof i?r?[i.listener||i]:[i]:r?function(t){for(var e=new Array(t.length),r=0;r<e.length;++r)e[r]=t[r].listener||t[r];return e}(i):A(i,i.length):[]}function _(t){var e=this._events;if(e){var r=e[t];if("function"==typeof r)return 1;if(r)return r.length}return 0}function A(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t[n];return r}a?Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return u},set:function(t){if("number"!=typeof t||t<0||t!=t)throw new TypeError('"defaultMaxListeners" must be a positive number');u=t}}):s.defaultMaxListeners=u,s.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},s.prototype.getMaxListeners=function(){return h(this)},s.prototype.emit=function(t){var e,r,n,i,o,s,a="error"===t;if(s=this._events)a=a&&null==s.error;else if(!a)return!1;if(a){if(arguments.length>1&&(e=arguments[1]),e instanceof Error)throw e;var u=new Error('Unhandled "error" event. ('+e+")");throw u.context=e,u}if(!(r=s[t]))return!1;var c="function"==typeof r;switch(n=arguments.length){case 1:l(r,c,this);break;case 2:p(r,c,this,arguments[1]);break;case 3:d(r,c,this,arguments[1],arguments[2]);break;case 4:g(r,c,this,arguments[1],arguments[2],arguments[3]);break;default:for(i=new Array(n-1),o=1;o<n;o++)i[o-1]=arguments[o];y(r,c,this,i)}return!0},s.prototype.addListener=function(t,e){return b(this,t,e,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(t,e){return b(this,t,e,!0)},s.prototype.once=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.on(t,v(this,t,e)),this},s.prototype.prependOnceListener=function(t,e){if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');return this.prependListener(t,v(this,t,e)),this},s.prototype.removeListener=function(t,e){var r,i,o,s,a;if("function"!=typeof e)throw new TypeError('"listener" argument must be a function');if(!(i=this._events))return this;if(!(r=i[t]))return this;if(r===e||r.listener===e)0==--this._eventsCount?this._events=n(null):(delete i[t],i.removeListener&&this.emit("removeListener",t,r.listener||e));else if("function"!=typeof r){for(o=-1,s=r.length-1;s>=0;s--)if(r[s]===e||r[s].listener===e){a=r[s].listener,o=s;break}if(o<0)return this;0===o?r.shift():function(t,e){for(var r=e,n=r+1,i=t.length;n<i;r+=1,n+=1)t[r]=t[n];t.pop()}(r,o),1===r.length&&(i[t]=r[0]),i.removeListener&&this.emit("removeListener",t,a||e)}return this},s.prototype.removeAllListeners=function(t){var e,r,o;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=n(null),this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=n(null):delete r[t]),this;if(0===arguments.length){var s,a=i(r);for(o=0;o<a.length;++o)"removeListener"!==(s=a[o])&&this.removeAllListeners(s);return this.removeAllListeners("removeListener"),this._events=n(null),this._eventsCount=0,this}if("function"==typeof(e=r[t]))this.removeListener(t,e);else if(e)for(o=e.length-1;o>=0;o--)this.removeListener(t,e[o]);return this},s.prototype.listeners=function(t){return w(this,t,!0)},s.prototype.rawListeners=function(t){return w(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):_.call(t,e)},s.prototype.listenerCount=_,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],26:[function(t,e,r){var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s=function(t){function e(e){void 0===e&&(e={});var r=t.call(this,(function(t){for(var e,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];r.events.push([t].concat(n)),r._cbs[t]&&(e=r._cbs)[t].apply(e,n)}))||this;return r._cbs=e,r.events=[],r}return i(e,t),e.prototype.onreset=function(){this.events=[],this._cbs.onreset&&this._cbs.onreset()},e.prototype.restart=function(){var t;this._cbs.onreset&&this._cbs.onreset();for(var e=0;e<this.events.length;e++){var r=this.events[e],n=r[0],i=r.slice(1);this._cbs[n]&&(t=this._cbs)[n].apply(t,i)}},e}(o(t("./MultiplexHandler")).default);r.CollectingHandler=s},{"./MultiplexHandler":28}],27:[function(t,e,r){var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},s=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var a=o(t("domhandler")),u=s(t("domutils")),f=t("./Parser"),h=function(t){function e(e,r){return"object"===c(e)&&null!==e&&(r=e=void 0),t.call(this,e,r)||this}return i(e,t),e.prototype.onend=function(){var t={},e=p(b,this.dom);if(e)if("feed"===e.name){var r=e.children;t.type="atom",y(t,"id","id",r),y(t,"title","title",r);var n=g("href",p("link",r));n&&(t.link=n),y(t,"description","subtitle",r),(i=d("updated",r))&&(t.updated=new Date(i)),y(t,"author","email",r,!0),t.items=l("entry",r).map((function(t){var e={},r=t.children;y(e,"id","id",r),y(e,"title","title",r);var n=g("href",p("link",r));n&&(e.link=n);var i=d("summary",r)||d("content",r);i&&(e.description=i);var o=d("updated",r);return o&&(e.pubDate=new Date(o)),e}))}else{var i;r=p("channel",e.children).children,t.type=e.name.substr(0,3),t.id="",y(t,"title","title",r),y(t,"link","link",r),y(t,"description","description",r),(i=d("lastBuildDate",r))&&(t.updated=new Date(i)),y(t,"author","managingEditor",r,!0),t.items=l("item",e.children).map((function(t){var e={},r=t.children;y(e,"id","guid",r),y(e,"title","title",r),y(e,"link","link",r),y(e,"description","description",r);var n=d("pubDate",r);return n&&(e.pubDate=new Date(n)),e}))}this.feed=t,this.handleCallback(e?null:Error("couldn't find root of feed"))},e}(a.default);function l(t,e){return u.getElementsByTagName(t,e,!0)}function p(t,e){return u.getElementsByTagName(t,e,!0,1)[0]}function d(t,e,r){return void 0===r&&(r=!1),u.getText(u.getElementsByTagName(t,e,r,1)).trim()}function g(t,e){return e?e.attribs[t]:null}function y(t,e,r,n,i){void 0===i&&(i=!1);var o=d(r,n,i);o&&(t[e]=o)}function b(t){return"rss"===t||"feed"===t||"rdf:RDF"===t}r.FeedHandler=h;var m={xmlMode:!0};r.parseFeed=function(t,e){void 0===e&&(e=m);var r=new h(e);return new f.Parser(r,e).end(t),r.feed}},{"./Parser":29,domhandler:7,domutils:10}],28:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0});var n=function(){function t(t){this._func=t}return t.prototype.onattribute=function(t,e){this._func("onattribute",t,e)},t.prototype.oncdatastart=function(){this._func("oncdatastart")},t.prototype.oncdataend=function(){this._func("oncdataend")},t.prototype.ontext=function(t){this._func("ontext",t)},t.prototype.onprocessinginstruction=function(t,e){this._func("onprocessinginstruction",t,e)},t.prototype.oncomment=function(t){this._func("oncomment",t)},t.prototype.oncommentend=function(){this._func("oncommentend")},t.prototype.onclosetag=function(t){this._func("onclosetag",t)},t.prototype.onopentag=function(t,e){this._func("onopentag",t,e)},t.prototype.onopentagname=function(t){this._func("onopentagname",t)},t.prototype.onerror=function(t){this._func("onerror",t)},t.prototype.onend=function(){this._func("onend")},t.prototype.onparserinit=function(t){this._func("onparserinit",t)},t.prototype.onreset=function(){this._func("onreset")},t}();r.default=n},{}],29:[function(t,e,r){var n,i=this&&this.__extends||(n=function(t,e){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])},n(t,e)},function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var s=o(t("./Tokenizer")),a=t("events"),u=new Set(["input","option","optgroup","select","button","datalist","textarea"]),c=new Set(["p"]),f={tr:new Set(["tr","th","td"]),th:new Set(["th"]),td:new Set(["thead","th","td"]),body:new Set(["head","link","script"]),li:new Set(["li"]),p:c,h1:c,h2:c,h3:c,h4:c,h5:c,h6:c,select:u,input:u,output:u,button:u,datalist:u,textarea:u,option:new Set(["option"]),optgroup:new Set(["optgroup","option"]),dd:new Set(["dt","dd"]),dt:new Set(["dt","dd"]),address:c,article:c,aside:c,blockquote:c,details:c,div:c,dl:c,fieldset:c,figcaption:c,figure:c,footer:c,form:c,header:c,hr:c,main:c,nav:c,ol:c,pre:c,section:c,table:c,ul:c,rt:new Set(["rt","rp"]),rp:new Set(["rt","rp"]),tbody:new Set(["thead","tbody"]),tfoot:new Set(["thead","tbody"])},h=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),l=new Set(["math","svg"]),p=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),d=/\s|\//,g=function(t){function e(r,n){var i=t.call(this)||this;return i._tagname="",i._attribname="",i._attribvalue="",i._attribs=null,i._stack=[],i._foreignContext=[],i.startIndex=0,i.endIndex=null,i.parseChunk=e.prototype.write,i.done=e.prototype.end,i._options=n||{},i._cbs=r||{},i._tagname="",i._attribname="",i._attribvalue="",i._attribs=null,i._stack=[],i._foreignContext=[],i.startIndex=0,i.endIndex=null,i._lowerCaseTagNames="lowerCaseTags"in i._options?!!i._options.lowerCaseTags:!i._options.xmlMode,i._lowerCaseAttributeNames="lowerCaseAttributeNames"in i._options?!!i._options.lowerCaseAttributeNames:!i._options.xmlMode,i._tokenizer=new(i._options.Tokenizer||s.default)(i._options,i),i._cbs.onparserinit&&i._cbs.onparserinit(i),i}return i(e,t),e.prototype._updatePosition=function(t){null===this.endIndex?this._tokenizer._sectionStart<=t?this.startIndex=0:this.startIndex=this._tokenizer._sectionStart-t:this.startIndex=this.endIndex+1,this.endIndex=this._tokenizer.getAbsoluteIndex()},e.prototype.ontext=function(t){this._updatePosition(1),this.endIndex--,this._cbs.ontext&&this._cbs.ontext(t)},e.prototype.onopentagname=function(t){if(this._lowerCaseTagNames&&(t=t.toLowerCase()),this._tagname=t,!this._options.xmlMode&&Object.prototype.hasOwnProperty.call(f,t))for(var e=void 0;f[t].has(e=this._stack[this._stack.length-1]);this.onclosetag(e));!this._options.xmlMode&&h.has(t)||(this._stack.push(t),l.has(t)?this._foreignContext.push(!0):p.has(t)&&this._foreignContext.push(!1)),this._cbs.onopentagname&&this._cbs.onopentagname(t),this._cbs.onopentag&&(this._attribs={})},e.prototype.onopentagend=function(){this._updatePosition(1),this._attribs&&(this._cbs.onopentag&&this._cbs.onopentag(this._tagname,this._attribs),this._attribs=null),!this._options.xmlMode&&this._cbs.onclosetag&&h.has(this._tagname)&&this._cbs.onclosetag(this._tagname),this._tagname=""},e.prototype.onclosetag=function(t){if(this._updatePosition(1),this._lowerCaseTagNames&&(t=t.toLowerCase()),(l.has(t)||p.has(t))&&this._foreignContext.pop(),!this._stack.length||!this._options.xmlMode&&h.has(t))this._options.xmlMode||"br"!==t&&"p"!==t||(this.onopentagname(t),this._closeCurrentTag());else{var e=this._stack.lastIndexOf(t);if(-1!==e)if(this._cbs.onclosetag)for(e=this._stack.length-e;e--;)this._cbs.onclosetag(this._stack.pop());else this._stack.length=e;else"p"!==t||this._options.xmlMode||(this.onopentagname(t),this._closeCurrentTag())}},e.prototype.onselfclosingtag=function(){this._options.xmlMode||this._options.recognizeSelfClosing||this._foreignContext[this._foreignContext.length-1]?this._closeCurrentTag():this.onopentagend()},e.prototype._closeCurrentTag=function(){var t=this._tagname;this.onopentagend(),this._stack[this._stack.length-1]===t&&(this._cbs.onclosetag&&this._cbs.onclosetag(t),this._stack.pop())},e.prototype.onattribname=function(t){this._lowerCaseAttributeNames&&(t=t.toLowerCase()),this._attribname=t},e.prototype.onattribdata=function(t){this._attribvalue+=t},e.prototype.onattribend=function(){this._cbs.onattribute&&this._cbs.onattribute(this._attribname,this._attribvalue),this._attribs&&!Object.prototype.hasOwnProperty.call(this._attribs,this._attribname)&&(this._attribs[this._attribname]=this._attribvalue),this._attribname="",this._attribvalue=""},e.prototype._getInstructionName=function(t){var e=t.search(d),r=e<0?t:t.substr(0,e);return this._lowerCaseTagNames&&(r=r.toLowerCase()),r},e.prototype.ondeclaration=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("!"+e,"!"+t)}},e.prototype.onprocessinginstruction=function(t){if(this._cbs.onprocessinginstruction){var e=this._getInstructionName(t);this._cbs.onprocessinginstruction("?"+e,"?"+t)}},e.prototype.oncomment=function(t){this._updatePosition(4),this._cbs.oncomment&&this._cbs.oncomment(t),this._cbs.oncommentend&&this._cbs.oncommentend()},e.prototype.oncdata=function(t){this._updatePosition(1),this._options.xmlMode||this._options.recognizeCDATA?(this._cbs.oncdatastart&&this._cbs.oncdatastart(),this._cbs.ontext&&this._cbs.ontext(t),this._cbs.oncdataend&&this._cbs.oncdataend()):this.oncomment("[CDATA["+t+"]]")},e.prototype.onerror=function(t){this._cbs.onerror&&this._cbs.onerror(t)},e.prototype.onend=function(){if(this._cbs.onclosetag)for(var t=this._stack.length;t>0;this._cbs.onclosetag(this._stack[--t]));this._cbs.onend&&this._cbs.onend()},e.prototype.reset=function(){this._cbs.onreset&&this._cbs.onreset(),this._tokenizer.reset(),this._tagname="",this._attribname="",this._attribs=null,this._stack=[],this._cbs.onparserinit&&this._cbs.onparserinit(this)},e.prototype.parseComplete=function(t){this.reset(),this.end(t)},e.prototype.write=function(t){this._tokenizer.write(t)},e.prototype.end=function(t){this._tokenizer.end(t)},e.prototype.pause=function(){this._tokenizer.pause()},e.prototype.resume=function(){this._tokenizer.resume()},e}(a.EventEmitter);r.Parser=g},{"./Tokenizer":30,events:25}],30:[function(t,e,r){var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(r,"__esModule",{value:!0});var i=n(t("entities/lib/decode_codepoint")),o=n(t("entities/lib/maps/entities.json")),s=n(t("entities/lib/maps/legacy.json")),a=n(t("entities/lib/maps/xml.json"));function u(t){return" "===t||"\n"===t||"\t"===t||"\f"===t||"\r"===t}function c(t,e,r){var n=t.toLowerCase();return t===n?function(t,i){i===n?t._state=e:(t._state=r,t._index--)}:function(i,o){o===n||o===t?i._state=e:(i._state=r,i._index--)}}function f(t,e){var r=t.toLowerCase();return function(n,i){i===r||i===t?n._state=e:(n._state=3,n._index--)}}var h=c("C",23,16),l=c("D",24,16),p=c("A",25,16),d=c("T",26,16),g=c("A",27,16),y=f("R",34),b=f("I",35),m=f("P",36),v=f("T",37),w=c("R",39,1),_=c("I",40,1),A=c("P",41,1),E=c("T",42,1),S=f("Y",44),I=f("L",45),k=f("E",46),x=c("Y",48,1),M=c("L",49,1),C=c("E",50,1),T=c("#",52,53),O=c("X",55,54),P=function(){function t(t,e){this._state=1,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=1,this._special=1,this._running=!0,this._ended=!1,this._cbs=e,this._xmlMode=!(!t||!t.xmlMode),this._decodeEntities=!(!t||!t.decodeEntities)}return t.prototype.reset=function(){this._state=1,this._buffer="",this._sectionStart=0,this._index=0,this._bufferOffset=0,this._baseState=1,this._special=1,this._running=!0,this._ended=!1},t.prototype._stateText=function(t){"<"===t?(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._state=2,this._sectionStart=this._index):this._decodeEntities&&1===this._special&&"&"===t&&(this._index>this._sectionStart&&this._cbs.ontext(this._getSection()),this._baseState=1,this._state=51,this._sectionStart=this._index)},t.prototype._stateBeforeTagName=function(t){"/"===t?this._state=5:"<"===t?(this._cbs.ontext(this._getSection()),this._sectionStart=this._index):">"===t||1!==this._special||u(t)?this._state=1:"!"===t?(this._state=15,this._sectionStart=this._index+1):"?"===t?(this._state=17,this._sectionStart=this._index+1):(this._state=this._xmlMode||"s"!==t&&"S"!==t?3:31,this._sectionStart=this._index)},t.prototype._stateInTagName=function(t){("/"===t||">"===t||u(t))&&(this._emitToken("onopentagname"),this._state=8,this._index--)},t.prototype._stateBeforeClosingTagName=function(t){u(t)||(">"===t?this._state=1:1!==this._special?"s"===t||"S"===t?this._state=32:(this._state=1,this._index--):(this._state=6,this._sectionStart=this._index))},t.prototype._stateInClosingTagName=function(t){(">"===t||u(t))&&(this._emitToken("onclosetag"),this._state=7,this._index--)},t.prototype._stateAfterClosingTagName=function(t){">"===t&&(this._state=1,this._sectionStart=this._index+1)},t.prototype._stateBeforeAttributeName=function(t){">"===t?(this._cbs.onopentagend(),this._state=1,this._sectionStart=this._index+1):"/"===t?this._state=4:u(t)||(this._state=9,this._sectionStart=this._index)},t.prototype._stateInSelfClosingTag=function(t){">"===t?(this._cbs.onselfclosingtag(),this._state=1,this._sectionStart=this._index+1):u(t)||(this._state=8,this._index--)},t.prototype._stateInAttributeName=function(t){("="===t||"/"===t||">"===t||u(t))&&(this._cbs.onattribname(this._getSection()),this._sectionStart=-1,this._state=10,this._index--)},t.prototype._stateAfterAttributeName=function(t){"="===t?this._state=11:"/"===t||">"===t?(this._cbs.onattribend(),this._state=8,this._index--):u(t)||(this._cbs.onattribend(),this._state=9,this._sectionStart=this._index)},t.prototype._stateBeforeAttributeValue=function(t){'"'===t?(this._state=12,this._sectionStart=this._index+1):"'"===t?(this._state=13,this._sectionStart=this._index+1):u(t)||(this._state=14,this._sectionStart=this._index,this._index--)},t.prototype._stateInAttributeValueDoubleQuotes=function(t){'"'===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=8):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=51,this._sectionStart=this._index)},t.prototype._stateInAttributeValueSingleQuotes=function(t){"'"===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=8):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=51,this._sectionStart=this._index)},t.prototype._stateInAttributeValueNoQuotes=function(t){u(t)||">"===t?(this._emitToken("onattribdata"),this._cbs.onattribend(),this._state=8,this._index--):this._decodeEntities&&"&"===t&&(this._emitToken("onattribdata"),this._baseState=this._state,this._state=51,this._sectionStart=this._index)},t.prototype._stateBeforeDeclaration=function(t){this._state="["===t?22:"-"===t?18:16},t.prototype._stateInDeclaration=function(t){">"===t&&(this._cbs.ondeclaration(this._getSection()),this._state=1,this._sectionStart=this._index+1)},t.prototype._stateInProcessingInstruction=function(t){">"===t&&(this._cbs.onprocessinginstruction(this._getSection()),this._state=1,this._sectionStart=this._index+1)},t.prototype._stateBeforeComment=function(t){"-"===t?(this._state=19,this._sectionStart=this._index+1):this._state=16},t.prototype._stateInComment=function(t){"-"===t&&(this._state=20)},t.prototype._stateAfterComment1=function(t){this._state="-"===t?21:19},t.prototype._stateAfterComment2=function(t){">"===t?(this._cbs.oncomment(this._buffer.substring(this._sectionStart,this._index-2)),this._state=1,this._sectionStart=this._index+1):"-"!==t&&(this._state=19)},t.prototype._stateBeforeCdata6=function(t){"["===t?(this._state=28,this._sectionStart=this._index+1):(this._state=16,this._index--)},t.prototype._stateInCdata=function(t){"]"===t&&(this._state=29)},t.prototype._stateAfterCdata1=function(t){this._state="]"===t?30:28},t.prototype._stateAfterCdata2=function(t){">"===t?(this._cbs.oncdata(this._buffer.substring(this._sectionStart,this._index-2)),this._state=1,this._sectionStart=this._index+1):"]"!==t&&(this._state=28)},t.prototype._stateBeforeSpecial=function(t){"c"===t||"C"===t?this._state=33:"t"===t||"T"===t?this._state=43:(this._state=3,this._index--)},t.prototype._stateBeforeSpecialEnd=function(t){2!==this._special||"c"!==t&&"C"!==t?3!==this._special||"t"!==t&&"T"!==t?this._state=1:this._state=47:this._state=38},t.prototype._stateBeforeScript5=function(t){("/"===t||">"===t||u(t))&&(this._special=2),this._state=3,this._index--},t.prototype._stateAfterScript5=function(t){">"===t||u(t)?(this._special=1,this._state=6,this._sectionStart=this._index-6,this._index--):this._state=1},t.prototype._stateBeforeStyle4=function(t){("/"===t||">"===t||u(t))&&(this._special=3),this._state=3,this._index--},t.prototype._stateAfterStyle4=function(t){">"===t||u(t)?(this._special=1,this._state=6,this._sectionStart=this._index-5,this._index--):this._state=1},t.prototype._parseNamedEntityStrict=function(){if(this._sectionStart+1<this._index){var t=this._buffer.substring(this._sectionStart+1,this._index),e=this._xmlMode?a.default:o.default;Object.prototype.hasOwnProperty.call(e,t)&&(this._emitPartial(e[t]),this._sectionStart=this._index+1)}},t.prototype._parseLegacyEntity=function(){var t=this._sectionStart+1,e=this._index-t;for(e>6&&(e=6);e>=2;){var r=this._buffer.substr(t,e);if(Object.prototype.hasOwnProperty.call(s.default,r))return this._emitPartial(s.default[r]),void(this._sectionStart+=e+1);e--}},t.prototype._stateInNamedEntity=function(t){";"===t?(this._parseNamedEntityStrict(),this._sectionStart+1<this._index&&!this._xmlMode&&this._parseLegacyEntity(),this._state=this._baseState):(t<"a"||t>"z")&&(t<"A"||t>"Z")&&(t<"0"||t>"9")&&(this._xmlMode||this._sectionStart+1===this._index||(1!==this._baseState?"="!==t&&this._parseNamedEntityStrict():this._parseLegacyEntity()),this._state=this._baseState,this._index--)},t.prototype._decodeNumericEntity=function(t,e){var r=this._sectionStart+t;if(r!==this._index){var n=this._buffer.substring(r,this._index),o=parseInt(n,e);this._emitPartial(i.default(o)),this._sectionStart=this._index}else this._sectionStart--;this._state=this._baseState},t.prototype._stateInNumericEntity=function(t){";"===t?(this._decodeNumericEntity(2,10),this._sectionStart++):(t<"0"||t>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(2,10),this._index--)},t.prototype._stateInHexEntity=function(t){";"===t?(this._decodeNumericEntity(3,16),this._sectionStart++):(t<"a"||t>"f")&&(t<"A"||t>"F")&&(t<"0"||t>"9")&&(this._xmlMode?this._state=this._baseState:this._decodeNumericEntity(3,16),this._index--)},t.prototype._cleanup=function(){this._sectionStart<0?(this._buffer="",this._bufferOffset+=this._index,this._index=0):this._running&&(1===this._state?(this._sectionStart!==this._index&&this._cbs.ontext(this._buffer.substr(this._sectionStart)),this._buffer="",this._bufferOffset+=this._index,this._index=0):this._sectionStart===this._index?(this._buffer="",this._bufferOffset+=this._index,this._index=0):(this._buffer=this._buffer.substr(this._sectionStart),this._index-=this._sectionStart,this._bufferOffset+=this._sectionStart),this._sectionStart=0)},t.prototype.write=function(t){this._ended&&this._cbs.onerror(Error(".write() after done!")),this._buffer+=t,this._parse()},t.prototype._parse=function(){for(;this._index<this._buffer.length&&this._running;){var t=this._buffer.charAt(this._index);1===this._state?this._stateText(t):12===this._state?this._stateInAttributeValueDoubleQuotes(t):9===this._state?this._stateInAttributeName(t):19===this._state?this._stateInComment(t):8===this._state?this._stateBeforeAttributeName(t):3===this._state?this._stateInTagName(t):6===this._state?this._stateInClosingTagName(t):2===this._state?this._stateBeforeTagName(t):10===this._state?this._stateAfterAttributeName(t):13===this._state?this._stateInAttributeValueSingleQuotes(t):11===this._state?this._stateBeforeAttributeValue(t):5===this._state?this._stateBeforeClosingTagName(t):7===this._state?this._stateAfterClosingTagName(t):31===this._state?this._stateBeforeSpecial(t):20===this._state?this._stateAfterComment1(t):14===this._state?this._stateInAttributeValueNoQuotes(t):4===this._state?this._stateInSelfClosingTag(t):16===this._state?this._stateInDeclaration(t):15===this._state?this._stateBeforeDeclaration(t):21===this._state?this._stateAfterComment2(t):18===this._state?this._stateBeforeComment(t):32===this._state?this._stateBeforeSpecialEnd(t):38===this._state?w(this,t):39===this._state?_(this,t):40===this._state?A(this,t):33===this._state?y(this,t):34===this._state?b(this,t):35===this._state?m(this,t):36===this._state?v(this,t):37===this._state?this._stateBeforeScript5(t):41===this._state?E(this,t):42===this._state?this._stateAfterScript5(t):43===this._state?S(this,t):28===this._state?this._stateInCdata(t):44===this._state?I(this,t):45===this._state?k(this,t):46===this._state?this._stateBeforeStyle4(t):47===this._state?x(this,t):48===this._state?M(this,t):49===this._state?C(this,t):50===this._state?this._stateAfterStyle4(t):17===this._state?this._stateInProcessingInstruction(t):53===this._state?this._stateInNamedEntity(t):22===this._state?h(this,t):51===this._state?T(this,t):23===this._state?l(this,t):24===this._state?p(this,t):29===this._state?this._stateAfterCdata1(t):30===this._state?this._stateAfterCdata2(t):25===this._state?d(this,t):26===this._state?g(this,t):27===this._state?this._stateBeforeCdata6(t):55===this._state?this._stateInHexEntity(t):54===this._state?this._stateInNumericEntity(t):52===this._state?O(this,t):this._cbs.onerror(Error("unknown _state"),this._state),this._index++}this._cleanup()},t.prototype.pause=function(){this._running=!1},t.prototype.resume=function(){this._running=!0,this._index<this._buffer.length&&this._parse(),this._ended&&this._finish()},t.prototype.end=function(t){this._ended&&this._cbs.onerror(Error(".end() after done!")),t&&this.write(t),this._ended=!0,this._running&&this._finish()},t.prototype._finish=function(){this._sectionStart<this._index&&this._handleTrailingData(),this._cbs.onend()},t.prototype._handleTrailingData=function(){var t=this._buffer.substr(this._sectionStart);28===this._state||29===this._state||30===this._state?this._cbs.oncdata(t):19===this._state||20===this._state||21===this._state?this._cbs.oncomment(t):53!==this._state||this._xmlMode?54!==this._state||this._xmlMode?55!==this._state||this._xmlMode?3!==this._state&&8!==this._state&&11!==this._state&&10!==this._state&&9!==this._state&&13!==this._state&&12!==this._state&&14!==this._state&&6!==this._state&&this._cbs.ontext(t):(this._decodeNumericEntity(3,16),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._decodeNumericEntity(2,10),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData())):(this._parseLegacyEntity(),this._sectionStart<this._index&&(this._state=this._baseState,this._handleTrailingData()))},t.prototype.getAbsoluteIndex=function(){return this._bufferOffset+this._index},t.prototype._getSection=function(){return this._buffer.substring(this._sectionStart,this._index)},t.prototype._emitToken=function(t){this._cbs[t](this._getSection()),this._sectionStart=-1},t.prototype._emitPartial=function(t){1!==this._baseState?this._cbs.onattribdata(t):this._cbs.ontext(t)},t}();r.default=P},{"entities/lib/decode_codepoint":18,"entities/lib/maps/entities.json":22,"entities/lib/maps/legacy.json":23,"entities/lib/maps/xml.json":24}],31:[function(t,e,r){function n(t){for(var e in t)r.hasOwnProperty(e)||(r[e]=t[e])}var i=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(r,"__esModule",{value:!0});var o=t("./Parser");r.Parser=o.Parser;var s=t("domhandler");r.DomHandler=s.DomHandler,r.DefaultHandler=s.DomHandler,r.parseDOM=function(t,e){var r=new s.DomHandler(void 0,e);return new o.Parser(r,e).end(t),r.dom},r.createDomStream=function(t,e,r){var n=new s.DomHandler(t,e,r);return new o.Parser(n,e)};var a=t("./Tokenizer");r.Tokenizer=a.default;var u=i(t("domelementtype"));r.ElementType=u,r.EVENTS={attribute:2,cdatastart:0,cdataend:0,text:1,processinginstruction:2,comment:1,commentend:0,closetag:1,opentag:2,opentagname:1,error:1,end:0},n(t("./FeedHandler")),n(t("./WritableStream")),n(t("./CollectingHandler"));var c=i(t("domutils"));r.DomUtils=c;var f=t("./FeedHandler");r.RssHandler=f.FeedHandler},{"./CollectingHandler":26,"./FeedHandler":27,"./Parser":29,"./Tokenizer":30,"./WritableStream":2,domelementtype:6,domhandler:7,domutils:10}],32:[function(t,e,r){r.read=function(t,e,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,f=-7,h=r?i-1:0,l=r?-1:1,p=t[e+h];for(h+=l,o=p&(1<<-f)-1,p>>=-f,f+=a;f>0;o=256*o+t[e+h],h+=l,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=n;f>0;s=256*s+t[e+h],h+=l,f-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,n),o-=c}return(p?-1:1)*s*Math.pow(2,o-n)},r.write=function(t,e,r,n,i,o){var s,a,u,c=8*o-i-1,f=(1<<c)-1,h=f>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),(e+=s+h>=1?l/u:l*Math.pow(2,1-h))*u>=2&&(s++,u/=2),s+h>=f?(a=0,s=f):s+h>=1?(a=(e*u-1)*Math.pow(2,i),s+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,i),s=0));i>=8;t[r+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[r+p]=255&s,p+=d,s/=256,c-=8);t[r+p-d]|=128*g}},{}],33:[function(t,e,r){var n=t("./_getNative")(t("./_root"),"DataView");e.exports=n},{"./_getNative":93,"./_root":130}],34:[function(t,e,r){var n=t("./_hashClear"),i=t("./_hashDelete"),o=t("./_hashGet"),s=t("./_hashHas"),a=t("./_hashSet");function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},{"./_hashClear":100,"./_hashDelete":101,"./_hashGet":102,"./_hashHas":103,"./_hashSet":104}],35:[function(t,e,r){var n=t("./_listCacheClear"),i=t("./_listCacheDelete"),o=t("./_listCacheGet"),s=t("./_listCacheHas"),a=t("./_listCacheSet");function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},{"./_listCacheClear":113,"./_listCacheDelete":114,"./_listCacheGet":115,"./_listCacheHas":116,"./_listCacheSet":117}],36:[function(t,e,r){var n=t("./_getNative")(t("./_root"),"Map");e.exports=n},{"./_getNative":93,"./_root":130}],37:[function(t,e,r){var n=t("./_mapCacheClear"),i=t("./_mapCacheDelete"),o=t("./_mapCacheGet"),s=t("./_mapCacheHas"),a=t("./_mapCacheSet");function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=s,u.prototype.set=a,e.exports=u},{"./_mapCacheClear":118,"./_mapCacheDelete":119,"./_mapCacheGet":120,"./_mapCacheHas":121,"./_mapCacheSet":122}],38:[function(t,e,r){var n=t("./_getNative")(t("./_root"),"Promise");e.exports=n},{"./_getNative":93,"./_root":130}],39:[function(t,e,r){var n=t("./_getNative")(t("./_root"),"Set");e.exports=n},{"./_getNative":93,"./_root":130}],40:[function(t,e,r){var n=t("./_ListCache"),i=t("./_stackClear"),o=t("./_stackDelete"),s=t("./_stackGet"),a=t("./_stackHas"),u=t("./_stackSet");function c(t){var e=this.__data__=new n(t);this.size=e.size}c.prototype.clear=i,c.prototype.delete=o,c.prototype.get=s,c.prototype.has=a,c.prototype.set=u,e.exports=c},{"./_ListCache":35,"./_stackClear":134,"./_stackDelete":135,"./_stackGet":136,"./_stackHas":137,"./_stackSet":138}],41:[function(t,e,r){var n=t("./_root").Symbol;e.exports=n},{"./_root":130}],42:[function(t,e,r){var n=t("./_root").Uint8Array;e.exports=n},{"./_root":130}],43:[function(t,e,r){var n=t("./_getNative")(t("./_root"),"WeakMap");e.exports=n},{"./_getNative":93,"./_root":130}],44:[function(t,e,r){e.exports=function(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}},{}],45:[function(t,e,r){e.exports=function(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}},{}],46:[function(t,e,r){e.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=0,o=[];++r<n;){var s=t[r];e(s,r,t)&&(o[i++]=s)}return o}},{}],47:[function(t,e,r){var n=t("./_baseTimes"),i=t("./isArguments"),o=t("./isArray"),s=t("./isBuffer"),a=t("./_isIndex"),u=t("./isTypedArray"),c=Object.prototype.hasOwnProperty;e.exports=function(t,e){var r=o(t),f=!r&&i(t),h=!r&&!f&&s(t),l=!r&&!f&&!h&&u(t),p=r||f||h||l,d=p?n(t.length,String):[],g=d.length;for(var y in t)!e&&!c.call(t,y)||p&&("length"==y||h&&("offset"==y||"parent"==y)||l&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||a(y,g))||d.push(y);return d}},{"./_baseTimes":72,"./_isIndex":108,"./isArguments":145,"./isArray":146,"./isBuffer":149,"./isTypedArray":159}],48:[function(t,e,r){e.exports=function(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r<n;)i[r]=e(t[r],r,t);return i}},{}],49:[function(t,e,r){e.exports=function(t,e){for(var r=-1,n=e.length,i=t.length;++r<n;)t[i+r]=e[r];return t}},{}],50:[function(t,e,r){var n=t("./_baseAssignValue"),i=t("./eq");e.exports=function(t,e,r){(void 0!==r&&!i(t[e],r)||void 0===r&&!(e in t))&&n(t,e,r)}},{"./_baseAssignValue":55,"./eq":142}],51:[function(t,e,r){var n=t("./_baseAssignValue"),i=t("./eq"),o=Object.prototype.hasOwnProperty;e.exports=function(t,e,r){var s=t[e];o.call(t,e)&&i(s,r)&&(void 0!==r||e in t)||n(t,e,r)}},{"./_baseAssignValue":55,"./eq":142}],52:[function(t,e,r){var n=t("./eq");e.exports=function(t,e){for(var r=t.length;r--;)if(n(t[r][0],e))return r;return-1}},{"./eq":142}],53:[function(t,e,r){var n=t("./_copyObject"),i=t("./keys");e.exports=function(t,e){return t&&n(e,i(e),t)}},{"./_copyObject":82,"./keys":160}],54:[function(t,e,r){var n=t("./_copyObject"),i=t("./keysIn");e.exports=function(t,e){return t&&n(e,i(e),t)}},{"./_copyObject":82,"./keysIn":161}],55:[function(t,e,r){var n=t("./_defineProperty");e.exports=function(t,e,r){"__proto__"==e&&n?n(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}},{"./_defineProperty":88}],56:[function(t,e,r){var n=t("./_Stack"),i=t("./_arrayEach"),o=t("./_assignValue"),s=t("./_baseAssign"),a=t("./_baseAssignIn"),u=t("./_cloneBuffer"),c=t("./_copyArray"),f=t("./_copySymbols"),h=t("./_copySymbolsIn"),l=t("./_getAllKeys"),p=t("./_getAllKeysIn"),d=t("./_getTag"),g=t("./_initCloneArray"),y=t("./_initCloneByTag"),b=t("./_initCloneObject"),m=t("./isArray"),v=t("./isBuffer"),w=t("./isMap"),_=t("./isObject"),A=t("./isSet"),E=t("./keys"),S=t("./keysIn"),I="[object Arguments]",k="[object Function]",x="[object Object]",M={};M[I]=M["[object Array]"]=M["[object ArrayBuffer]"]=M["[object DataView]"]=M["[object Boolean]"]=M["[object Date]"]=M["[object Float32Array]"]=M["[object Float64Array]"]=M["[object Int8Array]"]=M["[object Int16Array]"]=M["[object Int32Array]"]=M["[object Map]"]=M["[object Number]"]=M[x]=M["[object RegExp]"]=M["[object Set]"]=M["[object String]"]=M["[object Symbol]"]=M["[object Uint8Array]"]=M["[object Uint8ClampedArray]"]=M["[object Uint16Array]"]=M["[object Uint32Array]"]=!0,M["[object Error]"]=M[k]=M["[object WeakMap]"]=!1,e.exports=function t(e,r,C,T,O,P){var B,R=1&r,N=2&r,U=4&r;if(C&&(B=O?C(e,T,O,P):C(e)),void 0!==B)return B;if(!_(e))return e;var j=m(e);if(j){if(B=g(e),!R)return c(e,B)}else{var L=d(e),D=L==k||"[object GeneratorFunction]"==L;if(v(e))return u(e,R);if(L==x||L==I||D&&!O){if(B=N||D?{}:b(e),!R)return N?h(e,a(B,e)):f(e,s(B,e))}else{if(!M[L])return O?e:{};B=y(e,L,R)}}P||(P=new n);var F=P.get(e);if(F)return F;P.set(e,B),A(e)?e.forEach((function(n){B.add(t(n,r,C,n,e,P))})):w(e)&&e.forEach((function(n,i){B.set(i,t(n,r,C,i,e,P))}));var q=j?void 0:(U?N?p:l:N?S:E)(e);return i(q||e,(function(n,i){q&&(n=e[i=n]),o(B,i,t(n,r,C,i,e,P))})),B}},{"./_Stack":40,"./_arrayEach":45,"./_assignValue":51,"./_baseAssign":53,"./_baseAssignIn":54,"./_cloneBuffer":76,"./_copyArray":81,"./_copySymbols":83,"./_copySymbolsIn":84,"./_getAllKeys":90,"./_getAllKeysIn":91,"./_getTag":98,"./_initCloneArray":105,"./_initCloneByTag":106,"./_initCloneObject":107,"./isArray":146,"./isBuffer":149,"./isMap":152,"./isObject":153,"./isSet":156,"./keys":160,"./keysIn":161}],57:[function(t,e,r){var n=t("./isObject"),i=Object.create,o=function(){function t(){}return function(e){if(!n(e))return{};if(i)return i(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();e.exports=o},{"./isObject":153}],58:[function(t,e,r){var n=t("./_createBaseFor")();e.exports=n},{"./_createBaseFor":87}],59:[function(t,e,r){var n=t("./_arrayPush"),i=t("./isArray");e.exports=function(t,e,r){var o=e(t);return i(t)?o:n(o,r(t))}},{"./_arrayPush":49,"./isArray":146}],60:[function(t,e,r){var n=t("./_Symbol"),i=t("./_getRawTag"),o=t("./_objectToString"),s=n?n.toStringTag:void 0;e.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":s&&s in Object(t)?i(t):o(t)}},{"./_Symbol":41,"./_getRawTag":95,"./_objectToString":127}],61:[function(t,e,r){var n=t("./_baseGetTag"),i=t("./isObjectLike");e.exports=function(t){return i(t)&&"[object Arguments]"==n(t)}},{"./_baseGetTag":60,"./isObjectLike":154}],62:[function(t,e,r){var n=t("./_getTag"),i=t("./isObjectLike");e.exports=function(t){return i(t)&&"[object Map]"==n(t)}},{"./_getTag":98,"./isObjectLike":154}],63:[function(t,e,r){var n=t("./isFunction"),i=t("./_isMasked"),o=t("./isObject"),s=t("./_toSource"),a=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,f=u.toString,h=c.hasOwnProperty,l=RegExp("^"+f.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(t){return!(!o(t)||i(t))&&(n(t)?l:a).test(s(t))}},{"./_isMasked":111,"./_toSource":139,"./isFunction":150,"./isObject":153}],64:[function(t,e,r){var n=t("./_getTag"),i=t("./isObjectLike");e.exports=function(t){return i(t)&&"[object Set]"==n(t)}},{"./_getTag":98,"./isObjectLike":154}],65:[function(t,e,r){var n=t("./_baseGetTag"),i=t("./isLength"),o=t("./isObjectLike"),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(t){return o(t)&&i(t.length)&&!!s[n(t)]}},{"./_baseGetTag":60,"./isLength":151,"./isObjectLike":154}],66:[function(t,e,r){var n=t("./_isPrototype"),i=t("./_nativeKeys"),o=Object.prototype.hasOwnProperty;e.exports=function(t){if(!n(t))return i(t);var e=[];for(var r in Object(t))o.call(t,r)&&"constructor"!=r&&e.push(r);return e}},{"./_isPrototype":112,"./_nativeKeys":124}],67:[function(t,e,r){var n=t("./isObject"),i=t("./_isPrototype"),o=t("./_nativeKeysIn"),s=Object.prototype.hasOwnProperty;e.exports=function(t){if(!n(t))return o(t);var e=i(t),r=[];for(var a in t)("constructor"!=a||!e&&s.call(t,a))&&r.push(a);return r}},{"./_isPrototype":112,"./_nativeKeysIn":125,"./isObject":153}],68:[function(t,e,r){var n=t("./_Stack"),i=t("./_assignMergeValue"),o=t("./_baseFor"),s=t("./_baseMergeDeep"),a=t("./isObject"),u=t("./keysIn"),c=t("./_safeGet");e.exports=function t(e,r,f,h,l){e!==r&&o(r,(function(o,u){if(l||(l=new n),a(o))s(e,r,u,f,t,h,l);else{var p=h?h(c(e,u),o,u+"",e,r,l):void 0;void 0===p&&(p=o),i(e,u,p)}}),u)}},{"./_Stack":40,"./_assignMergeValue":50,"./_baseFor":58,"./_baseMergeDeep":69,"./_safeGet":131,"./isObject":153,"./keysIn":161}],69:[function(t,e,r){var n=t("./_assignMergeValue"),i=t("./_cloneBuffer"),o=t("./_cloneTypedArray"),s=t("./_copyArray"),a=t("./_initCloneObject"),u=t("./isArguments"),c=t("./isArray"),f=t("./isArrayLikeObject"),h=t("./isBuffer"),l=t("./isFunction"),p=t("./isObject"),d=t("./isPlainObject"),g=t("./isTypedArray"),y=t("./_safeGet"),b=t("./toPlainObject");e.exports=function(t,e,r,m,v,w,_){var A=y(t,r),E=y(e,r),S=_.get(E);if(S)n(t,r,S);else{var I=w?w(A,E,r+"",t,e,_):void 0,k=void 0===I;if(k){var x=c(E),M=!x&&h(E),C=!x&&!M&&g(E);I=E,x||M||C?c(A)?I=A:f(A)?I=s(A):M?(k=!1,I=i(E,!0)):C?(k=!1,I=o(E,!0)):I=[]:d(E)||u(E)?(I=A,u(A)?I=b(A):p(A)&&!l(A)||(I=a(E))):k=!1}k&&(_.set(E,I),v(I,E,m,w,_),_.delete(E)),n(t,r,I)}}},{"./_assignMergeValue":50,"./_cloneBuffer":76,"./_cloneTypedArray":80,"./_copyArray":81,"./_initCloneObject":107,"./_safeGet":131,"./isArguments":145,"./isArray":146,"./isArrayLikeObject":148,"./isBuffer":149,"./isFunction":150,"./isObject":153,"./isPlainObject":155,"./isTypedArray":159,"./toPlainObject":165}],70:[function(t,e,r){var n=t("./identity"),i=t("./_overRest"),o=t("./_setToString");e.exports=function(t,e){return o(i(t,e,n),t+"")}},{"./_overRest":129,"./_setToString":132,"./identity":144}],71:[function(t,e,r){var n=t("./constant"),i=t("./_defineProperty"),o=t("./identity"),s=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:n(e),writable:!0})}:o;e.exports=s},{"./_defineProperty":88,"./constant":141,"./identity":144}],72:[function(t,e,r){e.exports=function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}},{}],73:[function(t,e,r){var n=t("./_Symbol"),i=t("./_arrayMap"),o=t("./isArray"),s=t("./isSymbol"),a=n?n.prototype:void 0,u=a?a.toString:void 0;e.exports=function t(e){if("string"==typeof e)return e;if(o(e))return i(e,t)+"";if(s(e))return u?u.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r}},{"./_Symbol":41,"./_arrayMap":48,"./isArray":146,"./isSymbol":158}],74:[function(t,e,r){e.exports=function(t){return function(e){return t(e)}}},{}],75:[function(t,e,r){var n=t("./_Uint8Array");e.exports=function(t){var e=new t.constructor(t.byteLength);return new n(e).set(new n(t)),e}},{"./_Uint8Array":42}],76:[function(t,e,r){var n=t("./_root"),i="object"==c(r)&&r&&!r.nodeType&&r,o=i&&"object"==c(e)&&e&&!e.nodeType&&e,s=o&&o.exports===i?n.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(t,e){if(e)return t.slice();var r=t.length,n=a?a(r):new t.constructor(r);return t.copy(n),n}},{"./_root":130}],77:[function(t,e,r){var n=t("./_cloneArrayBuffer");e.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}},{"./_cloneArrayBuffer":75}],78:[function(t,e,r){var n=/\w*$/;e.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},{}],79:[function(t,e,r){var n=t("./_Symbol"),i=n?n.prototype:void 0,o=i?i.valueOf:void 0;e.exports=function(t){return o?Object(o.call(t)):{}}},{"./_Symbol":41}],80:[function(t,e,r){var n=t("./_cloneArrayBuffer");e.exports=function(t,e){var r=e?n(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}},{"./_cloneArrayBuffer":75}],81:[function(t,e,r){e.exports=function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}},{}],82:[function(t,e,r){var n=t("./_assignValue"),i=t("./_baseAssignValue");e.exports=function(t,e,r,o){var s=!r;r||(r={});for(var a=-1,u=e.length;++a<u;){var c=e[a],f=o?o(r[c],t[c],c,r,t):void 0;void 0===f&&(f=t[c]),s?i(r,c,f):n(r,c,f)}return r}},{"./_assignValue":51,"./_baseAssignValue":55}],83:[function(t,e,r){var n=t("./_copyObject"),i=t("./_getSymbols");e.exports=function(t,e){return n(t,i(t),e)}},{"./_copyObject":82,"./_getSymbols":96}],84:[function(t,e,r){var n=t("./_copyObject"),i=t("./_getSymbolsIn");e.exports=function(t,e){return n(t,i(t),e)}},{"./_copyObject":82,"./_getSymbolsIn":97}],85:[function(t,e,r){var n=t("./_root")["__core-js_shared__"];e.exports=n},{"./_root":130}],86:[function(t,e,r){var n=t("./_baseRest"),i=t("./_isIterateeCall");e.exports=function(t){return n((function(e,r){var n=-1,o=r.length,s=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(s=t.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(r[0],r[1],a)&&(s=o<3?void 0:s,o=1),e=Object(e);++n<o;){var u=r[n];u&&t(e,u,n,s)}return e}))}},{"./_baseRest":70,"./_isIterateeCall":109}],87:[function(t,e,r){e.exports=function(t){return function(e,r,n){for(var i=-1,o=Object(e),s=n(e),a=s.length;a--;){var u=s[t?a:++i];if(!1===r(o[u],u,o))break}return e}}},{}],88:[function(t,e,r){var n=t("./_getNative"),i=function(){try{var t=n(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();e.exports=i},{"./_getNative":93}],89:[function(t,e,n){(function(t){var r="object"==c(t)&&t&&t.Object===Object&&t;e.exports=r}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],90:[function(t,e,r){var n=t("./_baseGetAllKeys"),i=t("./_getSymbols"),o=t("./keys");e.exports=function(t){return n(t,o,i)}},{"./_baseGetAllKeys":59,"./_getSymbols":96,"./keys":160}],91:[function(t,e,r){var n=t("./_baseGetAllKeys"),i=t("./_getSymbolsIn"),o=t("./keysIn");e.exports=function(t){return n(t,o,i)}},{"./_baseGetAllKeys":59,"./_getSymbolsIn":97,"./keysIn":161}],92:[function(t,e,r){var n=t("./_isKeyable");e.exports=function(t,e){var r=t.__data__;return n(e)?r["string"==typeof e?"string":"hash"]:r.map}},{"./_isKeyable":110}],93:[function(t,e,r){var n=t("./_baseIsNative"),i=t("./_getValue");e.exports=function(t,e){var r=i(t,e);return n(r)?r:void 0}},{"./_baseIsNative":63,"./_getValue":99}],94:[function(t,e,r){var n=t("./_overArg")(Object.getPrototypeOf,Object);e.exports=n},{"./_overArg":128}],95:[function(t,e,r){var n=t("./_Symbol"),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=n?n.toStringTag:void 0;e.exports=function(t){var e=o.call(t,a),r=t[a];try{t[a]=void 0;var n=!0}catch(t){}var i=s.call(t);return n&&(e?t[a]=r:delete t[a]),i}},{"./_Symbol":41}],96:[function(t,e,r){var n=t("./_arrayFilter"),i=t("./stubArray"),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(t){return null==t?[]:(t=Object(t),n(s(t),(function(e){return o.call(t,e)})))}:i;e.exports=a},{"./_arrayFilter":46,"./stubArray":163}],97:[function(t,e,r){var n=t("./_arrayPush"),i=t("./_getPrototype"),o=t("./_getSymbols"),s=t("./stubArray"),a=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)n(e,o(t)),t=i(t);return e}:s;e.exports=a},{"./_arrayPush":49,"./_getPrototype":94,"./_getSymbols":96,"./stubArray":163}],98:[function(t,e,r){var n=t("./_DataView"),i=t("./_Map"),o=t("./_Promise"),s=t("./_Set"),a=t("./_WeakMap"),u=t("./_baseGetTag"),c=t("./_toSource"),f="[object Map]",h="[object Promise]",l="[object Set]",p="[object WeakMap]",d="[object DataView]",g=c(n),y=c(i),b=c(o),m=c(s),v=c(a),w=u;(n&&w(new n(new ArrayBuffer(1)))!=d||i&&w(new i)!=f||o&&w(o.resolve())!=h||s&&w(new s)!=l||a&&w(new a)!=p)&&(w=function(t){var e=u(t),r="[object Object]"==e?t.constructor:void 0,n=r?c(r):"";if(n)switch(n){case g:return d;case y:return f;case b:return h;case m:return l;case v:return p}return e}),e.exports=w},{"./_DataView":33,"./_Map":36,"./_Promise":38,"./_Set":39,"./_WeakMap":43,"./_baseGetTag":60,"./_toSource":139}],99:[function(t,e,r){e.exports=function(t,e){return null==t?void 0:t[e]}},{}],100:[function(t,e,r){var n=t("./_nativeCreate");e.exports=function(){this.__data__=n?n(null):{},this.size=0}},{"./_nativeCreate":123}],101:[function(t,e,r){e.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},{}],102:[function(t,e,r){var n=t("./_nativeCreate"),i=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;if(n){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(e,t)?e[t]:void 0}},{"./_nativeCreate":123}],103:[function(t,e,r){var n=t("./_nativeCreate"),i=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;return n?void 0!==e[t]:i.call(e,t)}},{"./_nativeCreate":123}],104:[function(t,e,r){var n=t("./_nativeCreate");e.exports=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=n&&void 0===e?"__lodash_hash_undefined__":e,this}},{"./_nativeCreate":123}],105:[function(t,e,r){var n=Object.prototype.hasOwnProperty;e.exports=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},{}],106:[function(t,e,r){var n=t("./_cloneArrayBuffer"),i=t("./_cloneDataView"),o=t("./_cloneRegExp"),s=t("./_cloneSymbol"),a=t("./_cloneTypedArray");e.exports=function(t,e,r){var u=t.constructor;switch(e){case"[object ArrayBuffer]":return n(t);case"[object Boolean]":case"[object Date]":return new u(+t);case"[object DataView]":return i(t,r);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(t,r);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(t);case"[object RegExp]":return o(t);case"[object Symbol]":return s(t)}}},{"./_cloneArrayBuffer":75,"./_cloneDataView":77,"./_cloneRegExp":78,"./_cloneSymbol":79,"./_cloneTypedArray":80}],107:[function(t,e,r){var n=t("./_baseCreate"),i=t("./_getPrototype"),o=t("./_isPrototype");e.exports=function(t){return"function"!=typeof t.constructor||o(t)?{}:n(i(t))}},{"./_baseCreate":57,"./_getPrototype":94,"./_isPrototype":112}],108:[function(t,e,r){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(t,e){var r=c(t);return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},{}],109:[function(t,e,r){var n=t("./eq"),i=t("./isArrayLike"),o=t("./_isIndex"),s=t("./isObject");e.exports=function(t,e,r){if(!s(r))return!1;var a=c(e);return!!("number"==a?i(r)&&o(e,r.length):"string"==a&&e in r)&&n(r[e],t)}},{"./_isIndex":108,"./eq":142,"./isArrayLike":147,"./isObject":153}],110:[function(t,e,r){e.exports=function(t){var e=c(t);return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},{}],111:[function(t,e,r){var n,i=t("./_coreJsData"),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(t){return!!o&&o in t}},{"./_coreJsData":85}],112:[function(t,e,r){var n=Object.prototype;e.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},{}],113:[function(t,e,r){e.exports=function(){this.__data__=[],this.size=0}},{}],114:[function(t,e,r){var n=t("./_assocIndexOf"),i=Array.prototype.splice;e.exports=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():i.call(e,r,1),--this.size,0))}},{"./_assocIndexOf":52}],115:[function(t,e,r){var n=t("./_assocIndexOf");e.exports=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]}},{"./_assocIndexOf":52}],116:[function(t,e,r){var n=t("./_assocIndexOf");e.exports=function(t){return n(this.__data__,t)>-1}},{"./_assocIndexOf":52}],117:[function(t,e,r){var n=t("./_assocIndexOf");e.exports=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}},{"./_assocIndexOf":52}],118:[function(t,e,r){var n=t("./_Hash"),i=t("./_ListCache"),o=t("./_Map");e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},{"./_Hash":34,"./_ListCache":35,"./_Map":36}],119:[function(t,e,r){var n=t("./_getMapData");e.exports=function(t){var e=n(this,t).delete(t);return this.size-=e?1:0,e}},{"./_getMapData":92}],120:[function(t,e,r){var n=t("./_getMapData");e.exports=function(t){return n(this,t).get(t)}},{"./_getMapData":92}],121:[function(t,e,r){var n=t("./_getMapData");e.exports=function(t){return n(this,t).has(t)}},{"./_getMapData":92}],122:[function(t,e,r){var n=t("./_getMapData");e.exports=function(t,e){var r=n(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}},{"./_getMapData":92}],123:[function(t,e,r){var n=t("./_getNative")(Object,"create");e.exports=n},{"./_getNative":93}],124:[function(t,e,r){var n=t("./_overArg")(Object.keys,Object);e.exports=n},{"./_overArg":128}],125:[function(t,e,r){e.exports=function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}},{}],126:[function(t,e,r){var n=t("./_freeGlobal"),i="object"==c(r)&&r&&!r.nodeType&&r,o=i&&"object"==c(e)&&e&&!e.nodeType&&e,s=o&&o.exports===i&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||s&&s.binding&&s.binding("util")}catch(t){}}();e.exports=a},{"./_freeGlobal":89}],127:[function(t,e,r){var n=Object.prototype.toString;e.exports=function(t){return n.call(t)}},{}],128:[function(t,e,r){e.exports=function(t,e){return function(r){return t(e(r))}}},{}],129:[function(t,e,r){var n=t("./_apply"),i=Math.max;e.exports=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var o=arguments,s=-1,a=i(o.length-e,0),u=Array(a);++s<a;)u[s]=o[e+s];s=-1;for(var c=Array(e+1);++s<e;)c[s]=o[s];return c[e]=r(u),n(t,this,c)}}},{"./_apply":44}],130:[function(t,e,r){var n=t("./_freeGlobal"),i="object"==("undefined"==typeof self?"undefined":c(self))&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},{"./_freeGlobal":89}],131:[function(t,e,r){e.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},{}],132:[function(t,e,r){var n=t("./_baseSetToString"),i=t("./_shortOut")(n);e.exports=i},{"./_baseSetToString":71,"./_shortOut":133}],133:[function(t,e,r){var n=Date.now;e.exports=function(t){var e=0,r=0;return function(){var i=n(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},{}],134:[function(t,e,r){var n=t("./_ListCache");e.exports=function(){this.__data__=new n,this.size=0}},{"./_ListCache":35}],135:[function(t,e,r){e.exports=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}},{}],136:[function(t,e,r){e.exports=function(t){return this.__data__.get(t)}},{}],137:[function(t,e,r){e.exports=function(t){return this.__data__.has(t)}},{}],138:[function(t,e,r){var n=t("./_ListCache"),i=t("./_Map"),o=t("./_MapCache");e.exports=function(t,e){var r=this.__data__;if(r instanceof n){var s=r.__data__;if(!i||s.length<199)return s.push([t,e]),this.size=++r.size,this;r=this.__data__=new o(s)}return r.set(t,e),this.size=r.size,this}},{"./_ListCache":35,"./_Map":36,"./_MapCache":37}],139:[function(t,e,r){var n=Function.prototype.toString;e.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},{}],140:[function(t,e,r){var n=t("./_baseClone");e.exports=function(t){return n(t,5)}},{"./_baseClone":56}],141:[function(t,e,r){e.exports=function(t){return function(){return t}}},{}],142:[function(t,e,r){e.exports=function(t,e){return t===e||t!=t&&e!=e}},{}],143:[function(t,e,r){var n=t("./toString"),i=/[\\^$.*+?()[\]{}|]/g,o=RegExp(i.source);e.exports=function(t){return(t=n(t))&&o.test(t)?t.replace(i,"\\$&"):t}},{"./toString":166}],144:[function(t,e,r){e.exports=function(t){return t}},{}],145:[function(t,e,r){var n=t("./_baseIsArguments"),i=t("./isObjectLike"),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,u=n(function(){return arguments}())?n:function(t){return i(t)&&s.call(t,"callee")&&!a.call(t,"callee")};e.exports=u},{"./_baseIsArguments":61,"./isObjectLike":154}],146:[function(t,e,r){var n=Array.isArray;e.exports=n},{}],147:[function(t,e,r){var n=t("./isFunction"),i=t("./isLength");e.exports=function(t){return null!=t&&i(t.length)&&!n(t)}},{"./isFunction":150,"./isLength":151}],148:[function(t,e,r){var n=t("./isArrayLike"),i=t("./isObjectLike");e.exports=function(t){return i(t)&&n(t)}},{"./isArrayLike":147,"./isObjectLike":154}],149:[function(t,e,r){var n=t("./_root"),i=t("./stubFalse"),o="object"==c(r)&&r&&!r.nodeType&&r,s=o&&"object"==c(e)&&e&&!e.nodeType&&e,a=s&&s.exports===o?n.Buffer:void 0,u=(a?a.isBuffer:void 0)||i;e.exports=u},{"./_root":130,"./stubFalse":164}],150:[function(t,e,r){var n=t("./_baseGetTag"),i=t("./isObject");e.exports=function(t){if(!i(t))return!1;var e=n(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},{"./_baseGetTag":60,"./isObject":153}],151:[function(t,e,r){e.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},{}],152:[function(t,e,r){var n=t("./_baseIsMap"),i=t("./_baseUnary"),o=t("./_nodeUtil"),s=o&&o.isMap,a=s?i(s):n;e.exports=a},{"./_baseIsMap":62,"./_baseUnary":74,"./_nodeUtil":126}],153:[function(t,e,r){e.exports=function(t){var e=c(t);return null!=t&&("object"==e||"function"==e)}},{}],154:[function(t,e,r){e.exports=function(t){return null!=t&&"object"==c(t)}},{}],155:[function(t,e,r){var n=t("./_baseGetTag"),i=t("./_getPrototype"),o=t("./isObjectLike"),s=Function.prototype,a=Object.prototype,u=s.toString,c=a.hasOwnProperty,f=u.call(Object);e.exports=function(t){if(!o(t)||"[object Object]"!=n(t))return!1;var e=i(t);if(null===e)return!0;var r=c.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&u.call(r)==f}},{"./_baseGetTag":60,"./_getPrototype":94,"./isObjectLike":154}],156:[function(t,e,r){var n=t("./_baseIsSet"),i=t("./_baseUnary"),o=t("./_nodeUtil"),s=o&&o.isSet,a=s?i(s):n;e.exports=a},{"./_baseIsSet":64,"./_baseUnary":74,"./_nodeUtil":126}],157:[function(t,e,r){var n=t("./_baseGetTag"),i=t("./isArray"),o=t("./isObjectLike");e.exports=function(t){return"string"==typeof t||!i(t)&&o(t)&&"[object String]"==n(t)}},{"./_baseGetTag":60,"./isArray":146,"./isObjectLike":154}],158:[function(t,e,r){var n=t("./_baseGetTag"),i=t("./isObjectLike");e.exports=function(t){return"symbol"==c(t)||i(t)&&"[object Symbol]"==n(t)}},{"./_baseGetTag":60,"./isObjectLike":154}],159:[function(t,e,r){var n=t("./_baseIsTypedArray"),i=t("./_baseUnary"),o=t("./_nodeUtil"),s=o&&o.isTypedArray,a=s?i(s):n;e.exports=a},{"./_baseIsTypedArray":65,"./_baseUnary":74,"./_nodeUtil":126}],160:[function(t,e,r){var n=t("./_arrayLikeKeys"),i=t("./_baseKeys"),o=t("./isArrayLike");e.exports=function(t){return o(t)?n(t):i(t)}},{"./_arrayLikeKeys":47,"./_baseKeys":66,"./isArrayLike":147}],161:[function(t,e,r){var n=t("./_arrayLikeKeys"),i=t("./_baseKeysIn"),o=t("./isArrayLike");e.exports=function(t){return o(t)?n(t,!0):i(t)}},{"./_arrayLikeKeys":47,"./_baseKeysIn":67,"./isArrayLike":147}],162:[function(t,e,r){var n=t("./_baseMerge"),i=t("./_createAssigner")((function(t,e,r,i){n(t,e,r,i)}));e.exports=i},{"./_baseMerge":68,"./_createAssigner":86}],163:[function(t,e,r){e.exports=function(){return[]}},{}],164:[function(t,e,r){e.exports=function(){return!1}},{}],165:[function(t,e,r){var n=t("./_copyObject"),i=t("./keysIn");e.exports=function(t){return n(t,i(t))}},{"./_copyObject":82,"./keysIn":161}],166:[function(t,e,r){var n=t("./_baseToString");e.exports=function(t){return null==t?"":n(t)}},{"./_baseToString":73}],167:[function(t,e,r){var n;n=function(){return function(t){function e(t){return" "===t||"\t"===t||"\n"===t||"\f"===t||"\r"===t}function r(e){var r,n=e.exec(t.substring(g));if(n)return r=n[0],g+=r.length,r}for(var n,i,o,s,a,u=t.length,c=/^[ \t\n\r\u000c]+/,f=/^[, \t\n\r\u000c]+/,h=/^[^ \t\n\r\u000c]+/,l=/[,]+$/,p=/^\d+$/,d=/^-?(?:[0-9]+|[0-9]*\.[0-9]+)(?:[eE][+-]?[0-9]+)?$/,g=0,y=[];;){if(r(f),g>=u)return y;n=r(h),i=[],","===n.slice(-1)?(n=n.replace(l,""),m()):b()}function b(){for(r(c),o="",s="in descriptor";;){if(a=t.charAt(g),"in descriptor"===s)if(e(a))o&&(i.push(o),o="",s="after descriptor");else{if(","===a)return g+=1,o&&i.push(o),void m();if("("===a)o+=a,s="in parens";else{if(""===a)return o&&i.push(o),void m();o+=a}}else if("in parens"===s)if(")"===a)o+=a,s="in descriptor";else{if(""===a)return i.push(o),void m();o+=a}else if("after descriptor"===s)if(e(a));else{if(""===a)return void m();s="in descriptor",g-=1}g+=1}}function m(){var e,r,o,s,a,u,c,f,h,l=!1,g={};for(s=0;s<i.length;s++)u=(a=i[s])[a.length-1],c=a.substring(0,a.length-1),f=parseInt(c,10),h=parseFloat(c),p.test(c)&&"w"===u?((e||r)&&(l=!0),0===f?l=!0:e=f):d.test(c)&&"x"===u?((e||r||o)&&(l=!0),h<0?l=!0:r=h):p.test(c)&&"h"===u?((o||r)&&(l=!0),0===f?l=!0:o=f):l=!0;l?console&&console.log&&console.log("Invalid srcset descriptor found in '"+t+"' at '"+a+"'."):(g.url=n,e&&(g.w=e),r&&(g.d=r),o&&(g.h=o),y.push(g))}}},"object"===c(e)&&e.exports?e.exports=n():this.parseSrcset=n()},{}],168:[function(t,e,r){(function(t){function e(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];"."===i?t.splice(n,1):".."===i?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}function n(t,e){if(t.filter)return t.filter(e);for(var r=[],n=0;n<t.length;n++)e(t[n],n,t)&&r.push(t[n]);return r}r.resolve=function(){for(var r="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var s=o>=0?arguments[o]:t.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(r=s+"/"+r,i="/"===s.charAt(0))}return(i?"/":"")+(r=e(n(r.split("/"),(function(t){return!!t})),!i).join("/"))||"."},r.normalize=function(t){var o=r.isAbsolute(t),s="/"===i(t,-1);return(t=e(n(t.split("/"),(function(t){return!!t})),!o).join("/"))||o||(t="."),t&&s&&(t+="/"),(o?"/":"")+t},r.isAbsolute=function(t){return"/"===t.charAt(0)},r.join=function(){var t=Array.prototype.slice.call(arguments,0);return r.normalize(n(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},r.relative=function(t,e){function n(t){for(var e=0;e<t.length&&""===t[e];e++);for(var r=t.length-1;r>=0&&""===t[r];r--);return e>r?[]:t.slice(e,r-e+1)}t=r.resolve(t).substr(1),e=r.resolve(e).substr(1);for(var i=n(t.split("/")),o=n(e.split("/")),s=Math.min(i.length,o.length),a=s,u=0;u<s;u++)if(i[u]!==o[u]){a=u;break}var c=[];for(u=a;u<i.length;u++)c.push("..");return(c=c.concat(o.slice(a))).join("/")},r.sep="/",r.delimiter=":",r.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),r=47===e,n=-1,i=!0,o=t.length-1;o>=1;--o)if(47===(e=t.charCodeAt(o))){if(!i){n=o;break}}else i=!1;return-1===n?r?"/":".":r&&1===n?"/":t.slice(0,n)},r.basename=function(t,e){var r=function(t){"string"!=typeof t&&(t+="");var e,r=0,n=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){r=e+1;break}}else-1===n&&(i=!1,n=e+1);return-1===n?"":t.slice(r,n)}(t);return e&&r.substr(-1*e.length)===e&&(r=r.substr(0,r.length-e.length)),r},r.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,r=0,n=-1,i=!0,o=0,s=t.length-1;s>=0;--s){var a=t.charCodeAt(s);if(47!==a)-1===n&&(i=!1,n=s+1),46===a?-1===e?e=s:1!==o&&(o=1):-1!==e&&(o=-1);else if(!i){r=s+1;break}}return-1===e||-1===n||0===o||1===o&&e===n-1&&e===r+1?"":t.slice(e,n)};var i=function(t,e,r){return t.substr(e,r)}}).call(this,t("_process"))},{_process:193}],169:[function(t,e,r){var n;r.__esModule=!0,r.default=void 0;var i=function(t){var e,r;function n(e){var r;return(r=t.call(this,e)||this).type="atrule",r}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var i=n.prototype;return i.append=function(){var e;this.nodes||(this.nodes=[]);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(e=t.prototype.append).call.apply(e,[this].concat(n))},i.prepend=function(){var e;this.nodes||(this.nodes=[]);for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(e=t.prototype.prepend).call.apply(e,[this].concat(n))},n}(((n=t("./container"))&&n.__esModule?n:{default:n}).default),o=i;r.default=o,e.exports=r.default},{"./container":171}],170:[function(t,e,r){var n;r.__esModule=!0,r.default=void 0;var i=function(t){var e,r;function n(e){var r;return(r=t.call(this,e)||this).type="comment",r}return r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,n}(((n=t("./node"))&&n.__esModule?n:{default:n}).default);r.default=i,e.exports=r.default},{"./node":178}],171:[function(t,e,r){r.__esModule=!0,r.default=void 0;var n=o(t("./declaration")),i=o(t("./comment"));function o(t){return t&&t.__esModule?t:{default:t}}function s(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t){return t.map((function(t){return t.nodes&&(t.nodes=c(t.nodes)),delete t.source,t}))}var f=function(e){var r,o;function a(){return e.apply(this,arguments)||this}o=e,(r=a).prototype=Object.create(o.prototype),r.prototype.constructor=r,r.__proto__=o;var f,h,l=a.prototype;return l.push=function(t){return t.parent=this,this.nodes.push(t),this},l.each=function(t){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;var e=this.lastEach;if(this.indexes[e]=0,this.nodes){for(var r,n;this.indexes[e]<this.nodes.length&&(r=this.indexes[e],!1!==(n=t(this.nodes[r],r)));)this.indexes[e]+=1;return delete this.indexes[e],n}},l.walk=function(t){return this.each((function(e,r){var n;try{n=t(e,r)}catch(t){if(t.postcssNode=e,t.stack&&e.source&&/\n\s{4}at /.test(t.stack)){var i=e.source;t.stack=t.stack.replace(/\n\s{4}at /,"$&"+i.input.from+":"+i.start.line+":"+i.start.column+"$&")}throw t}return!1!==n&&e.walk&&(n=e.walk(t)),n}))},l.walkDecls=function(t,e){return e?t instanceof RegExp?this.walk((function(r,n){if("decl"===r.type&&t.test(r.prop))return e(r,n)})):this.walk((function(r,n){if("decl"===r.type&&r.prop===t)return e(r,n)})):(e=t,this.walk((function(t,r){if("decl"===t.type)return e(t,r)})))},l.walkRules=function(t,e){return e?t instanceof RegExp?this.walk((function(r,n){if("rule"===r.type&&t.test(r.selector))return e(r,n)})):this.walk((function(r,n){if("rule"===r.type&&r.selector===t)return e(r,n)})):(e=t,this.walk((function(t,r){if("rule"===t.type)return e(t,r)})))},l.walkAtRules=function(t,e){return e?t instanceof RegExp?this.walk((function(r,n){if("atrule"===r.type&&t.test(r.name))return e(r,n)})):this.walk((function(r,n){if("atrule"===r.type&&r.name===t)return e(r,n)})):(e=t,this.walk((function(t,r){if("atrule"===t.type)return e(t,r)})))},l.walkComments=function(t){return this.walk((function(e,r){if("comment"===e.type)return t(e,r)}))},l.append=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=0,i=e;n<i.length;n++)for(var o,a=i[n],u=this.normalize(a,this.last),c=s(u);!(o=c()).done;){var f=o.value;this.nodes.push(f)}return this},l.prepend=function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n,i=s(e=e.reverse());!(n=i()).done;){for(var o,a=n.value,u=this.normalize(a,this.first,"prepend").reverse(),c=s(u);!(o=c()).done;){var f=o.value;this.nodes.unshift(f)}for(var h in this.indexes)this.indexes[h]=this.indexes[h]+u.length}return this},l.cleanRaws=function(t){if(e.prototype.cleanRaws.call(this,t),this.nodes)for(var r,n=s(this.nodes);!(r=n()).done;)r.value.cleanRaws(t)},l.insertBefore=function(t,e){for(var r,n,i=0===(t=this.index(t))&&"prepend",o=this.normalize(e,this.nodes[t],i).reverse(),a=s(o);!(r=a()).done;){var u=r.value;this.nodes.splice(t,0,u)}for(var c in this.indexes)t<=(n=this.indexes[c])&&(this.indexes[c]=n+o.length);return this},l.insertAfter=function(t,e){t=this.index(t);for(var r,n,i=this.normalize(e,this.nodes[t]).reverse(),o=s(i);!(r=o()).done;){var a=r.value;this.nodes.splice(t+1,0,a)}for(var u in this.indexes)t<(n=this.indexes[u])&&(this.indexes[u]=n+i.length);return this},l.removeChild=function(t){var e;for(var r in t=this.index(t),this.nodes[t].parent=void 0,this.nodes.splice(t,1),this.indexes)(e=this.indexes[r])>=t&&(this.indexes[r]=e-1);return this},l.removeAll=function(){for(var t,e=s(this.nodes);!(t=e()).done;)t.value.parent=void 0;return this.nodes=[],this},l.replaceValues=function(t,e,r){return r||(r=e,e={}),this.walkDecls((function(n){e.props&&-1===e.props.indexOf(n.prop)||e.fast&&-1===n.value.indexOf(e.fast)||(n.value=n.value.replace(t,r))})),this},l.every=function(t){return this.nodes.every(t)},l.some=function(t){return this.nodes.some(t)},l.index=function(t){return"number"==typeof t?t:this.nodes.indexOf(t)},l.normalize=function(e,r){var o=this;if("string"==typeof e)e=c(t("./parse")(e).nodes);else if(Array.isArray(e))for(var a,u=s(e=e.slice(0));!(a=u()).done;){var f=a.value;f.parent&&f.parent.removeChild(f,"ignore")}else if("root"===e.type)for(var h,l=s(e=e.nodes.slice(0));!(h=l()).done;){var p=h.value;p.parent&&p.parent.removeChild(p,"ignore")}else if(e.type)e=[e];else if(e.prop){if(void 0===e.value)throw new Error("Value field is missed in node creation");"string"!=typeof e.value&&(e.value=String(e.value)),e=[new n.default(e)]}else if(e.selector)e=[new(t("./rule"))(e)];else if(e.name)e=[new(t("./at-rule"))(e)];else{if(!e.text)throw new Error("Unknown node type in node creation");e=[new i.default(e)]}var d=e.map((function(t){return t.parent&&t.parent.removeChild(t),void 0===t.raws.before&&r&&void 0!==r.raws.before&&(t.raws.before=r.raws.before.replace(/[^\s]/g,"")),t.parent=o,t}));return d},f=a,(h=[{key:"first",get:function(){if(this.nodes)return this.nodes[0]}},{key:"last",get:function(){if(this.nodes)return this.nodes[this.nodes.length-1]}}])&&u(f.prototype,h),a}(o(t("./node")).default),h=f;r.default=h,e.exports=r.default},{"./at-rule":169,"./comment":170,"./declaration":173,"./node":178,"./parse":179,"./rule":186}],172:[function(t,e,r){r.__esModule=!0,r.default=void 0;var n=s(t("supports-color")),i=s(t("chalk")),o=s(t("./terminal-highlight"));function s(t){return t&&t.__esModule?t:{default:t}}function a(t){var e="function"==typeof Map?new Map:void 0;return a=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return u(t,arguments,h(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),f(n,t)},a(t)}function u(t,e,r){return u=c()?Reflect.construct:function(t,e,r){var n=[null];n.push.apply(n,e);var i=new(Function.bind.apply(t,n));return r&&f(i,r.prototype),i},u.apply(null,arguments)}function c(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function f(t,e){return f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},f(t,e)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}var l=function(t){var e,r;function s(e,r,n,i,o,a){var u;return(u=t.call(this,e)||this).name="CssSyntaxError",u.reason=e,o&&(u.file=o),i&&(u.source=i),a&&(u.plugin=a),void 0!==r&&void 0!==n&&(u.line=r,u.column=n),u.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(u),s),u}r=t,(e=s).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r;var a=s.prototype;return a.setMessage=function(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason},a.showSourceCode=function(t){var e=this;if(!this.source)return"";var r=this.source;o.default&&(void 0===t&&(t=n.default.stdout),t&&(r=(0,o.default)(r)));var s=r.split(/\r?\n/),a=Math.max(this.line-3,0),u=Math.min(this.line+2,s.length),c=String(u).length;function f(e){return t&&i.default.red?i.default.red.bold(e):e}function h(e){return t&&i.default.gray?i.default.gray(e):e}return s.slice(a,u).map((function(t,r){var n=a+1+r,i=" "+(" "+n).slice(-c)+" | ";if(n===e.line){var o=h(i.replace(/\d/g," "))+t.slice(0,e.column-1).replace(/[^\t]/g," ");return f(">")+h(i)+t+"\n "+o+f("^")}return" "+h(i)+t})).join("\n")},a.toString=function(){var t=this.showSourceCode();return t&&(t="\n\n"+t+"\n"),this.name+": "+this.message+t},s}(a(Error));r.default=l,e.exports=r.default},{"./terminal-highlight":2,chalk:2,"supports-color":2}],173:[function(t,e,r){var n;r.__esModule=!0,r.default=void 0;var i=function(t){var e,r;function n(e){var r;return(r=t.call(this,e)||this).type="decl",r}return r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,n}(((n=t("./node"))&&n.__esModule?n:{default:n}).default);r.default=i,e.exports=r.default},{"./node":178}],174:[function(t,e,r){r.__esModule=!0,r.default=void 0;var n=s(t("path")),i=s(t("./css-syntax-error")),o=s(t("./previous-map"));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var u=0,f=function(){function t(t,e){if(void 0===e&&(e={}),null==t||"object"===c(t)&&!t.toString)throw new Error("PostCSS received "+t+" instead of CSS string");this.css=t.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,e.from&&(/^\w+:\/\//.test(e.from)||n.default.isAbsolute(e.from)?this.file=e.from:this.file=n.default.resolve(e.from));var r=new o.default(this.css,e);if(r.text){this.map=r;var i=r.consumer().file;!this.file&&i&&(this.file=this.mapResolve(i))}this.file||(u+=1,this.id="<input css "+u+">"),this.map&&(this.map.file=this.from)}var e,r,s=t.prototype;return s.error=function(t,e,r,n){var o;void 0===n&&(n={});var s=this.origin(e,r);return(o=s?new i.default(t,s.line,s.column,s.source,s.file,n.plugin):new i.default(t,e,r,this.css,this.file,n.plugin)).input={line:e,column:r,source:this.css},this.file&&(o.input.file=this.file),o},s.origin=function(t,e){if(!this.map)return!1;var r=this.map.consumer(),n=r.originalPositionFor({line:t,column:e});if(!n.source)return!1;var i={file:this.mapResolve(n.source),line:n.line,column:n.column},o=r.sourceContentFor(n.source);return o&&(i.source=o),i},s.mapResolve=function(t){return/^\w+:\/\//.test(t)?t:n.default.resolve(this.map.consumer().sourceRoot||".",t)},e=t,(r=[{key:"from",get:function(){return this.file||this.id}}])&&a(e.prototype,r),t}();r.default=f,e.exports=r.default},{"./css-syntax-error":172,"./previous-map":182,path:168}],175:[function(t,e,r){(function(n){r.__esModule=!0,r.default=void 0;var i=f(t("./map-generator")),o=f(t("./stringify")),s=f(t("./warn-once")),a=f(t("./result")),u=f(t("./parse"));function f(t){return t&&t.__esModule?t:{default:t}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function p(t){return"object"===c(t)&&"function"==typeof t.then}var d=function(){function t(e,r,n){var i;if(this.stringified=!1,this.processed=!1,"object"===c(r)&&null!==r&&"root"===r.type)i=r;else if(r instanceof t||r instanceof a.default)i=r.root,r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{var o=u.default;n.syntax&&(o=n.syntax.parse),n.parser&&(o=n.parser),o.parse&&(o=o.parse);try{i=o(r,n)}catch(t){this.error=t}}this.result=new a.default(e,i,n)}var e,r,f=t.prototype;return f.warnings=function(){return this.sync().warnings()},f.toString=function(){return this.css},f.then=function(t,e){return"production"!==n.env.NODE_ENV&&("from"in this.opts||(0,s.default)("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(t,e)},f.catch=function(t){return this.async().catch(t)},f.finally=function(t){return this.async().then(t,t)},f.handleError=function(t,e){try{if(this.error=t,"CssSyntaxError"!==t.name||t.plugin){if(e.postcssVersion&&"production"!==n.env.NODE_ENV){var r=e.postcssPlugin,i=e.postcssVersion,o=this.result.processor.version,s=i.split("."),a=o.split(".");(s[0]!==a[0]||parseInt(s[1])>parseInt(a[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+o+", but "+r+" uses "+i+". Perhaps this is the source of the error below.")}}else t.plugin=e.postcssPlugin,t.setMessage()}catch(t){console&&console.error&&console.error(t)}},f.asyncTick=function(t,e){var r=this;if(this.plugin>=this.processor.plugins.length)return this.processed=!0,t();try{var n=this.processor.plugins[this.plugin],i=this.run(n);this.plugin+=1,p(i)?i.then((function(){r.asyncTick(t,e)})).catch((function(t){r.handleError(t,n),r.processed=!0,e(t)})):this.asyncTick(t,e)}catch(t){this.processed=!0,e(t)}},f.async=function(){var t=this;return this.processed?new Promise((function(e,r){t.error?r(t.error):e(t.stringify())})):(this.processing||(this.processing=new Promise((function(e,r){if(t.error)return r(t.error);t.plugin=0,t.asyncTick(e,r)})).then((function(){return t.processed=!0,t.stringify()}))),this.processing)},f.sync=function(){if(this.processed)return this.result;if(this.processed=!0,this.processing)throw new Error("Use process(css).then(cb) to work with async plugins");if(this.error)throw this.error;for(var t,e=function(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return h(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}(this.result.processor.plugins);!(t=e()).done;){var r=t.value;if(p(this.run(r)))throw new Error("Use process(css).then(cb) to work with async plugins")}return this.result},f.run=function(t){this.result.lastPlugin=t;try{return t(this.result.root,this.result)}catch(e){throw this.handleError(e,t),e}},f.stringify=function(){if(this.stringified)return this.result;this.stringified=!0,this.sync();var t=this.result.opts,e=o.default;t.syntax&&(e=t.syntax.stringify),t.stringifier&&(e=t.stringifier),e.stringify&&(e=e.stringify);var r=new i.default(e,this.result.root,this.result.opts).generate();return this.result.css=r[0],this.result.map=r[1],this.result},e=t,(r=[{key:"processor",get:function(){return this.result.processor}},{key:"opts",get:function(){return this.result.opts}},{key:"css",get:function(){return this.stringify().css}},{key:"content",get:function(){return this.stringify().content}},{key:"map",get:function(){return this.stringify().map}},{key:"root",get:function(){return this.sync().root}},{key:"messages",get:function(){return this.sync().messages}}])&&l(e.prototype,r),t}();r.default=d,e.exports=r.default}).call(this,t("_process"))},{"./map-generator":177,"./parse":179,"./result":184,"./stringify":188,"./warn-once":191,_process:193}],176:[function(t,e,r){r.__esModule=!0,r.default=void 0;var n={split:function(t,e,r){for(var n=[],i="",o=!1,s=0,a=!1,u=!1,c=0;c<t.length;c++){var f=t[c];a?u?u=!1:"\\"===f?u=!0:f===a&&(a=!1):'"'===f||"'"===f?a=f:"("===f?s+=1:")"===f?s>0&&(s-=1):0===s&&-1!==e.indexOf(f)&&(o=!0),o?(""!==i&&n.push(i.trim()),i="",o=!1):i+=f}return(r||""!==i)&&n.push(i.trim()),n},space:function(t){return n.split(t,[" ","\n","\t"])},comma:function(t){return n.split(t,[","],!0)}},i=n;r.default=i,e.exports=r.default},{}],177:[function(t,e,r){(function(n){r.__esModule=!0,r.default=void 0;var i=s(t("source-map")),o=s(t("path"));function s(t){return t&&t.__esModule?t:{default:t}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var u=function(){function t(t,e,r){this.stringify=t,this.mapOpts=r.map||{},this.root=e,this.opts=r}var e=t.prototype;return e.isMap=function(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0},e.previous=function(){var t=this;return this.previousMaps||(this.previousMaps=[],this.root.walk((function(e){if(e.source&&e.source.input.map){var r=e.source.input.map;-1===t.previousMaps.indexOf(r)&&t.previousMaps.push(r)}}))),this.previousMaps},e.isInline=function(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;var t=this.mapOpts.annotation;return(void 0===t||!0===t)&&(!this.previous().length||this.previous().some((function(t){return t.inline})))},e.isSourcesContent=function(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some((function(t){return t.withContent()}))},e.clearAnnotation=function(){if(!1!==this.mapOpts.annotation)for(var t,e=this.root.nodes.length-1;e>=0;e--)"comment"===(t=this.root.nodes[e]).type&&0===t.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(e)},e.setSourcesContent=function(){var t=this,e={};this.root.walk((function(r){if(r.source){var n=r.source.input.from;if(n&&!e[n]){e[n]=!0;var i=t.relative(n);t.map.setSourceContent(i,r.source.input.css)}}}))},e.applyPrevMaps=function(){for(var t,e=function(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return a(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}(this.previous());!(t=e()).done;){var r=t.value,n=this.relative(r.file),s=r.root||o.default.dirname(r.file),u=void 0;!1===this.mapOpts.sourcesContent?(u=new i.default.SourceMapConsumer(r.text)).sourcesContent&&(u.sourcesContent=u.sourcesContent.map((function(){return null}))):u=r.consumer(),this.map.applySourceMap(u,n,this.relative(s))}},e.isAnnotation=function(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some((function(t){return t.annotation})))},e.toBase64=function(t){return n?n.from(t).toString("base64"):window.btoa(unescape(encodeURIComponent(t)))},e.addAnnotation=function(){var t;t=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:this.outputFile()+".map";var e="\n";-1!==this.css.indexOf("\r\n")&&(e="\r\n"),this.css+=e+"/*# sourceMappingURL="+t+" */"},e.outputFile=function(){return this.opts.to?this.relative(this.opts.to):this.opts.from?this.relative(this.opts.from):"to.css"},e.generateMap=function(){return this.generateString(),this.isSourcesContent()&&this.setSourcesContent(),this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]},e.relative=function(t){if(0===t.indexOf("<"))return t;if(/^\w+:\/\//.test(t))return t;var e=this.opts.to?o.default.dirname(this.opts.to):".";return"string"==typeof this.mapOpts.annotation&&(e=o.default.dirname(o.default.resolve(e,this.mapOpts.annotation))),t=o.default.relative(e,t),"\\"===o.default.sep?t.replace(/\\/g,"/"):t},e.sourcePath=function(t){return this.mapOpts.from?this.mapOpts.from:this.relative(t.source.input.from)},e.generateString=function(){var t=this;this.css="",this.map=new i.default.SourceMapGenerator({file:this.outputFile()});var e,r,n=1,o=1;this.stringify(this.root,(function(i,s,a){if(t.css+=i,s&&"end"!==a&&(s.source&&s.source.start?t.map.addMapping({source:t.sourcePath(s),generated:{line:n,column:o-1},original:{line:s.source.start.line,column:s.source.start.column-1}}):t.map.addMapping({source:"<no source>",original:{line:1,column:0},generated:{line:n,column:o-1}})),(e=i.match(/\n/g))?(n+=e.length,r=i.lastIndexOf("\n"),o=i.length-r):o+=i.length,s&&"start"!==a){var u=s.parent||{raws:{}};("decl"!==s.type||s!==u.last||u.raws.semicolon)&&(s.source&&s.source.end?t.map.addMapping({source:t.sourcePath(s),generated:{line:n,column:o-2},original:{line:s.source.end.line,column:s.source.end.column-1}}):t.map.addMapping({source:"<no source>",original:{line:1,column:0},generated:{line:n,column:o-1}}))}}))},e.generate=function(){if(this.clearAnnotation(),this.isMap())return this.generateMap();var t="";return this.stringify(this.root,(function(e){t+=e})),[t]},t}();r.default=u,e.exports=r.default}).call(this,t("buffer").Buffer)},{buffer:3,path:168,"source-map":208}],178:[function(t,e,r){(function(n){r.__esModule=!0,r.default=void 0;var i=a(t("./css-syntax-error")),o=a(t("./stringifier")),s=a(t("./stringify"));function a(t){return t&&t.__esModule?t:{default:t}}function u(t,e){var r=new t.constructor;for(var n in t)if(t.hasOwnProperty(n)){var i=t[n],o=c(i);"parent"===n&&"object"===o?e&&(r[n]=e):"source"===n?r[n]=i:i instanceof Array?r[n]=i.map((function(t){return u(t,r)})):("object"===o&&null!==i&&(i=u(i)),r[n]=i)}return r}var f=function(){function t(t){if(void 0===t&&(t={}),this.raws={},"production"!==n.env.NODE_ENV&&"object"!==c(t)&&void 0!==t)throw new Error("PostCSS nodes constructor accepts object, not "+JSON.stringify(t));for(var e in t)this[e]=t[e]}var e=t.prototype;return e.error=function(t,e){if(void 0===e&&(e={}),this.source){var r=this.positionBy(e);return this.source.input.error(t,r.line,r.column,e)}return new i.default(t)},e.warn=function(t,e,r){var n={node:this};for(var i in r)n[i]=r[i];return t.warn(e,n)},e.remove=function(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this},e.toString=function(t){void 0===t&&(t=s.default),t.stringify&&(t=t.stringify);var e="";return t(this,(function(t){e+=t})),e},e.clone=function(t){void 0===t&&(t={});var e=u(this);for(var r in t)e[r]=t[r];return e},e.cloneBefore=function(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertBefore(this,e),e},e.cloneAfter=function(t){void 0===t&&(t={});var e=this.clone(t);return this.parent.insertAfter(this,e),e},e.replaceWith=function(){if(this.parent){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=0,i=e;n<i.length;n++){var o=i[n];this.parent.insertBefore(this,o)}this.remove()}return this},e.next=function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t+1]}},e.prev=function(){if(this.parent){var t=this.parent.index(this);return this.parent.nodes[t-1]}},e.before=function(t){return this.parent.insertBefore(this,t),this},e.after=function(t){return this.parent.insertAfter(this,t),this},e.toJSON=function(){var t={};for(var e in this)if(this.hasOwnProperty(e)&&"parent"!==e){var r=this[e];r instanceof Array?t[e]=r.map((function(t){return"object"===c(t)&&t.toJSON?t.toJSON():t})):"object"===c(r)&&r.toJSON?t[e]=r.toJSON():t[e]=r}return t},e.raw=function(t,e){return(new o.default).raw(this,t,e)},e.root=function(){for(var t=this;t.parent;)t=t.parent;return t},e.cleanRaws=function(t){delete this.raws.before,delete this.raws.after,t||delete this.raws.between},e.positionInside=function(t){for(var e=this.toString(),r=this.source.start.column,n=this.source.start.line,i=0;i<t;i++)"\n"===e[i]?(r=1,n+=1):r+=1;return{line:n,column:r}},e.positionBy=function(t){var e=this.source.start;if(t.index)e=this.positionInside(t.index);else if(t.word){var r=this.toString().indexOf(t.word);-1!==r&&(e=this.positionInside(r))}return e},t}(),h=f;r.default=h,e.exports=r.default}).call(this,t("_process"))},{"./css-syntax-error":172,"./stringifier":187,"./stringify":188,_process:193}],179:[function(t,e,r){(function(n){r.__esModule=!0,r.default=void 0;var i=s(t("./parser")),o=s(t("./input"));function s(t){return t&&t.__esModule?t:{default:t}}r.default=function(t,e){var r=new o.default(t,e),s=new i.default(r);try{s.parse()}catch(t){throw"production"!==n.env.NODE_ENV&&"CssSyntaxError"===t.name&&e&&e.from&&(/\.scss$/i.test(e.from)?t.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(e.from)?t.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(e.from)&&(t.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),t}return s.root},e.exports=r.default}).call(this,t("_process"))},{"./input":174,"./parser":180,_process:193}],180:[function(t,e,r){r.__esModule=!0,r.default=void 0;var n=c(t("./declaration")),i=c(t("./tokenize")),o=c(t("./comment")),s=c(t("./at-rule")),a=c(t("./root")),u=c(t("./rule"));function c(t){return t&&t.__esModule?t:{default:t}}var f=function(){function t(t){this.input=t,this.root=new a.default,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:t,start:{line:1,column:1}}}var e=t.prototype;return e.createTokenizer=function(){this.tokenizer=(0,i.default)(this.input)},e.parse=function(){for(var t;!this.tokenizer.endOfFile();)switch((t=this.tokenizer.nextToken())[0]){case"space":this.spaces+=t[1];break;case";":this.freeSemicolon(t);break;case"}":this.end(t);break;case"comment":this.comment(t);break;case"at-word":this.atrule(t);break;case"{":this.emptyRule(t);break;default:this.other(t)}this.endFile()},e.comment=function(t){var e=new o.default;this.init(e,t[2],t[3]),e.source.end={line:t[4],column:t[5]};var r=t[1].slice(2,-2);if(/^\s*$/.test(r))e.text="",e.raws.left=r,e.raws.right="";else{var n=r.match(/^(\s*)([^]*[^\s])(\s*)$/);e.text=n[2],e.raws.left=n[1],e.raws.right=n[3]}},e.emptyRule=function(t){var e=new u.default;this.init(e,t[2],t[3]),e.selector="",e.raws.between="",this.current=e},e.other=function(t){for(var e=!1,r=null,n=!1,i=null,o=[],s=[],a=t;a;){if(r=a[0],s.push(a),"("===r||"["===r)i||(i=a),o.push("("===r?")":"]");else if(0===o.length){if(";"===r){if(n)return void this.decl(s);break}if("{"===r)return void this.rule(s);if("}"===r){this.tokenizer.back(s.pop()),e=!0;break}":"===r&&(n=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(i=null));a=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(e=!0),o.length>0&&this.unclosedBracket(i),e&&n){for(;s.length&&("space"===(a=s[s.length-1][0])||"comment"===a);)this.tokenizer.back(s.pop());this.decl(s)}else this.unknownWord(s)},e.rule=function(t){t.pop();var e=new u.default;this.init(e,t[0][2],t[0][3]),e.raws.between=this.spacesAndCommentsFromEnd(t),this.raw(e,"selector",t),this.current=e},e.decl=function(t){var e=new n.default;this.init(e);var r,i=t[t.length-1];for(";"===i[0]&&(this.semicolon=!0,t.pop()),i[4]?e.source.end={line:i[4],column:i[5]}:e.source.end={line:i[2],column:i[3]};"word"!==t[0][0];)1===t.length&&this.unknownWord(t),e.raws.before+=t.shift()[1];for(e.source.start={line:t[0][2],column:t[0][3]},e.prop="";t.length;){var o=t[0][0];if(":"===o||"space"===o||"comment"===o)break;e.prop+=t.shift()[1]}for(e.raws.between="";t.length;){if(":"===(r=t.shift())[0]){e.raws.between+=r[1];break}"word"===r[0]&&/\w/.test(r[1])&&this.unknownWord([r]),e.raws.between+=r[1]}"_"!==e.prop[0]&&"*"!==e.prop[0]||(e.raws.before+=e.prop[0],e.prop=e.prop.slice(1)),e.raws.between+=this.spacesAndCommentsFromStart(t),this.precheckMissedSemicolon(t);for(var s=t.length-1;s>0;s--){if("!important"===(r=t[s])[1].toLowerCase()){e.important=!0;var a=this.stringFrom(t,s);" !important"!==(a=this.spacesFromEnd(t)+a)&&(e.raws.important=a);break}if("important"===r[1].toLowerCase()){for(var u=t.slice(0),c="",f=s;f>0;f--){var h=u[f][0];if(0===c.trim().indexOf("!")&&"space"!==h)break;c=u.pop()[1]+c}0===c.trim().indexOf("!")&&(e.important=!0,e.raws.important=c,t=u)}if("space"!==r[0]&&"comment"!==r[0])break}this.raw(e,"value",t),-1!==e.value.indexOf(":")&&this.checkMissedSemicolon(t)},e.atrule=function(t){var e,r,n=new s.default;n.name=t[1].slice(1),""===n.name&&this.unnamedAtrule(n,t),this.init(n,t[2],t[3]);for(var i=!1,o=!1,a=[];!this.tokenizer.endOfFile();){if(";"===(t=this.tokenizer.nextToken())[0]){n.source.end={line:t[2],column:t[3]},this.semicolon=!0;break}if("{"===t[0]){o=!0;break}if("}"===t[0]){if(a.length>0){for(e=a[r=a.length-1];e&&"space"===e[0];)e=a[--r];e&&(n.source.end={line:e[4],column:e[5]})}this.end(t);break}if(a.push(t),this.tokenizer.endOfFile()){i=!0;break}}n.raws.between=this.spacesAndCommentsFromEnd(a),a.length?(n.raws.afterName=this.spacesAndCommentsFromStart(a),this.raw(n,"params",a),i&&(t=a[a.length-1],n.source.end={line:t[4],column:t[5]},this.spaces=n.raws.between,n.raws.between="")):(n.raws.afterName="",n.params=""),o&&(n.nodes=[],this.current=n)},e.end=function(t){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end={line:t[2],column:t[3]},this.current=this.current.parent):this.unexpectedClose(t)},e.endFile=function(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces},e.freeSemicolon=function(t){if(this.spaces+=t[1],this.current.nodes){var e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}},e.init=function(t,e,r){this.current.push(t),t.source={start:{line:e,column:r},input:this.input},t.raws.before=this.spaces,this.spaces="","comment"!==t.type&&(this.semicolon=!1)},e.raw=function(t,e,r){for(var n,i,o,s,a=r.length,u="",c=!0,f=/^([.|#])?([\w])+/i,h=0;h<a;h+=1)"comment"!==(i=(n=r[h])[0])||"rule"!==t.type?"comment"===i||"space"===i&&h===a-1?c=!1:u+=n[1]:(s=r[h-1],o=r[h+1],"space"!==s[0]&&"space"!==o[0]&&f.test(s[1])&&f.test(o[1])?u+=n[1]:c=!1);if(!c){var l=r.reduce((function(t,e){return t+e[1]}),"");t.raws[e]={value:u,raw:l}}t[e]=u},e.spacesAndCommentsFromEnd=function(t){for(var e,r="";t.length&&("space"===(e=t[t.length-1][0])||"comment"===e);)r=t.pop()[1]+r;return r},e.spacesAndCommentsFromStart=function(t){for(var e,r="";t.length&&("space"===(e=t[0][0])||"comment"===e);)r+=t.shift()[1];return r},e.spacesFromEnd=function(t){for(var e="";t.length&&"space"===t[t.length-1][0];)e=t.pop()[1]+e;return e},e.stringFrom=function(t,e){for(var r="",n=e;n<t.length;n++)r+=t[n][1];return t.splice(e,t.length-e),r},e.colon=function(t){for(var e,r,n,i=0,o=0;o<t.length;o++){if("("===(r=(e=t[o])[0])&&(i+=1),")"===r&&(i-=1),0===i&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return o}this.doubleColon(e)}n=e}return!1},e.unclosedBracket=function(t){throw this.input.error("Unclosed bracket",t[2],t[3])},e.unknownWord=function(t){throw this.input.error("Unknown word",t[0][2],t[0][3])},e.unexpectedClose=function(t){throw this.input.error("Unexpected }",t[2],t[3])},e.unclosedBlock=function(){var t=this.current.source.start;throw this.input.error("Unclosed block",t.line,t.column)},e.doubleColon=function(t){throw this.input.error("Double colon",t[2],t[3])},e.unnamedAtrule=function(t,e){throw this.input.error("At-rule without name",e[2],e[3])},e.precheckMissedSemicolon=function(){},e.checkMissedSemicolon=function(t){var e=this.colon(t);if(!1!==e){for(var r,n=0,i=e-1;i>=0&&("space"===(r=t[i])[0]||2!==(n+=1));i--);throw this.input.error("Missed semicolon",r[2],r[3])}},t}();r.default=f,e.exports=r.default},{"./at-rule":169,"./comment":170,"./declaration":173,"./root":185,"./rule":186,"./tokenize":189}],181:[function(t,e,r){r.__esModule=!0,r.default=void 0;var n=p(t("./declaration")),i=p(t("./processor")),o=p(t("./stringify")),s=p(t("./comment")),a=p(t("./at-rule")),u=p(t("./vendor")),c=p(t("./parse")),f=p(t("./list")),h=p(t("./rule")),l=p(t("./root"));function p(t){return t&&t.__esModule?t:{default:t}}function d(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new i.default(e)}d.plugin=function(t,e){function r(){var r=e.apply(void 0,arguments);return r.postcssPlugin=t,r.postcssVersion=(new i.default).version,r}var n;return Object.defineProperty(r,"postcss",{get:function(){return n||(n=r()),n}}),r.process=function(t,e,n){return d([r(n)]).process(t,e)},r},d.stringify=o.default,d.parse=c.default,d.vendor=u.default,d.list=f.default,d.comment=function(t){return new s.default(t)},d.atRule=function(t){return new a.default(t)},d.decl=function(t){return new n.default(t)},d.rule=function(t){return new h.default(t)},d.root=function(t){return new l.default(t)};var g=d;r.default=g,e.exports=r.default},{"./at-rule":169,"./comment":170,"./declaration":173,"./list":176,"./parse":179,"./processor":183,"./root":185,"./rule":186,"./stringify":188,"./vendor":190}],182:[function(t,e,r){(function(n){r.__esModule=!0,r.default=void 0;var i=a(t("source-map")),o=a(t("path")),s=a(t("fs"));function a(t){return t&&t.__esModule?t:{default:t}}var u=function(){function t(t,e){this.loadAnnotation(t),this.inline=this.startWith(this.annotation,"data:");var r=e.map?e.map.prev:void 0,n=this.loadMap(e.from,r);n&&(this.text=n)}var e=t.prototype;return e.consumer=function(){return this.consumerCache||(this.consumerCache=new i.default.SourceMapConsumer(this.text)),this.consumerCache},e.withContent=function(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)},e.startWith=function(t,e){return!!t&&t.substr(0,e.length)===e},e.getAnnotationURL=function(t){return t.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//)[1].trim()},e.loadAnnotation=function(t){var e=t.match(/\/\*\s*# sourceMappingURL=(.*)\s*\*\//gm);if(e&&e.length>0){var r=e[e.length-1];r&&(this.annotation=this.getAnnotationURL(r))}},e.decodeInline=function(t){var e,r="data:application/json,";if(this.startWith(t,r))return decodeURIComponent(t.substr(r.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(t)||/^data:application\/json;base64,/.test(t))return e=t.substr(RegExp.lastMatch.length),n?n.from(e,"base64").toString():window.atob(e);var i=t.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+i)},e.loadMap=function(t,e){if(!1===e)return!1;if(e){if("string"==typeof e)return e;if("function"==typeof e){var r=e(t);if(r&&s.default.existsSync&&s.default.existsSync(r))return s.default.readFileSync(r,"utf-8").toString().trim();throw new Error("Unable to load previous source map: "+r.toString())}if(e instanceof i.default.SourceMapConsumer)return i.default.SourceMapGenerator.fromSourceMap(e).toString();if(e instanceof i.default.SourceMapGenerator)return e.toString();if(this.isMap(e))return JSON.stringify(e);throw new Error("Unsupported previous source map format: "+e.toString())}if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){var n=this.annotation;return t&&(n=o.default.join(o.default.dirname(t),n)),this.root=o.default.dirname(n),!(!s.default.existsSync||!s.default.existsSync(n))&&s.default.readFileSync(n,"utf-8").toString().trim()}},e.isMap=function(t){return"object"===c(t)&&("string"==typeof t.mappings||"string"==typeof t._mappings)},t}();r.default=u,e.exports=r.default}).call(this,t("buffer").Buffer)},{buffer:3,fs:2,path:168,"source-map":208}],183:[function(t,e,r){(function(n){r.__esModule=!0,r.default=void 0;var i,o=(i=t("./lazy-result"))&&i.__esModule?i:{default:i};function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var a=function(){function t(t){void 0===t&&(t=[]),this.version="7.0.34",this.plugins=this.normalize(t)}var e=t.prototype;return e.use=function(t){return this.plugins=this.plugins.concat(this.normalize([t])),this},e.process=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t,e){return void 0===e&&(e={}),0===this.plugins.length&&e.parser===e.stringifier&&"production"!==n.env.NODE_ENV&&"undefined"!=typeof console&&console.warn&&console.warn("You did not set any plugins, parser, or stringifier. Right now, PostCSS does nothing. Pick plugins for your case on https://www.postcss.parts/ and use them in postcss.config.js."),new o.default(this,t,e)})),e.normalize=function(t){for(var e,r=[],i=function(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}(t);!(e=i()).done;){var o=e.value;if(!0===o.postcss){var a=o();throw new Error("PostCSS plugin "+a.postcssPlugin+" requires PostCSS 8. Update PostCSS or downgrade this plugin.")}if(o.postcss&&(o=o.postcss),"object"===c(o)&&Array.isArray(o.plugins))r=r.concat(o.plugins);else if("function"==typeof o)r.push(o);else{if("object"!==c(o)||!o.parse&&!o.stringify)throw"object"===c(o)&&o.postcssPlugin?new Error("PostCSS plugin "+o.postcssPlugin+" requires PostCSS 8. Update PostCSS or downgrade this plugin."):new Error(o+" is not a PostCSS plugin");if("production"!==n.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}}return r},t}(),u=a;r.default=u,e.exports=r.default}).call(this,t("_process"))},{"./lazy-result":175,_process:193}],184:[function(t,e,r){r.__esModule=!0,r.default=void 0;var n,i=(n=t("./warning"))&&n.__esModule?n:{default:n};function o(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var s=function(){function t(t,e,r){this.processor=t,this.messages=[],this.root=e,this.opts=r,this.css=void 0,this.map=void 0}var e,r,n=t.prototype;return n.toString=function(){return this.css},n.warn=function(t,e){void 0===e&&(e={}),e.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(e.plugin=this.lastPlugin.postcssPlugin);var r=new i.default(t,e);return this.messages.push(r),r},n.warnings=function(){return this.messages.filter((function(t){return"warning"===t.type}))},e=t,(r=[{key:"content",get:function(){return this.css}}])&&o(e.prototype,r),t}();r.default=s,e.exports=r.default},{"./warning":192}],185:[function(t,e,r){var n;function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}r.__esModule=!0,r.default=void 0;var o=function(e){var r,n;function o(t){var r;return(r=e.call(this,t)||this).type="root",r.nodes||(r.nodes=[]),r}n=e,(r=o).prototype=Object.create(n.prototype),r.prototype.constructor=r,r.__proto__=n;var s=o.prototype;return s.removeChild=function(t,r){var n=this.index(t);return!r&&0===n&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[n].raws.before),e.prototype.removeChild.call(this,t)},s.normalize=function(t,r,n){var o=e.prototype.normalize.call(this,t);if(r)if("prepend"===n)this.nodes.length>1?r.raws.before=this.nodes[1].raws.before:delete r.raws.before;else if(this.first!==r)for(var s,a=function(t,e){var r;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return i(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=t[Symbol.iterator]()).next.bind(r)}(o);!(s=a()).done;)s.value.raws.before=r.raws.before;return o},s.toResult=function(e){return void 0===e&&(e={}),new(t("./lazy-result"))(new(t("./processor")),this,e).stringify()},o}(((n=t("./container"))&&n.__esModule?n:{default:n}).default);r.default=o,e.exports=r.default},{"./container":171,"./lazy-result":175,"./processor":183}],186:[function(t,e,r){r.__esModule=!0,r.default=void 0;var n=o(t("./container")),i=o(t("./list"));function o(t){return t&&t.__esModule?t:{default:t}}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var a=function(t){var e,r,n,o;function a(e){var r;return(r=t.call(this,e)||this).type="rule",r.nodes||(r.nodes=[]),r}return r=t,(e=a).prototype=Object.create(r.prototype),e.prototype.constructor=e,e.__proto__=r,n=a,(o=[{key:"selectors",get:function(){return i.default.comma(this.selector)},set:function(t){var e=this.selector?this.selector.match(/,\s*/):null,r=e?e[0]:","+this.raw("between","beforeOpen");this.selector=t.join(r)}}])&&s(n.prototype,o),a}(n.default);r.default=a,e.exports=r.default},{"./container":171,"./list":176}],187:[function(t,e,r){r.__esModule=!0,r.default=void 0;var n={colon:": ",indent:" ",beforeDecl:"\n",beforeRule:"\n",beforeOpen:" ",beforeClose:"\n",beforeComment:"\n",after:"\n",emptyBody:"",commentLeft:" ",commentRight:" ",semicolon:!1},i=function(){function t(t){this.builder=t}var e=t.prototype;return e.stringify=function(t,e){this[t.type](t,e)},e.root=function(t){this.body(t),t.raws.after&&this.builder(t.raws.after)},e.comment=function(t){var e=this.raw(t,"left","commentLeft"),r=this.raw(t,"right","commentRight");this.builder("/*"+e+t.text+r+"*/",t)},e.decl=function(t,e){var r=this.raw(t,"between","colon"),n=t.prop+r+this.rawValue(t,"value");t.important&&(n+=t.raws.important||" !important"),e&&(n+=";"),this.builder(n,t)},e.rule=function(t){this.block(t,this.rawValue(t,"selector")),t.raws.ownSemicolon&&this.builder(t.raws.ownSemicolon,t,"end")},e.atrule=function(t,e){var r="@"+t.name,n=t.params?this.rawValue(t,"params"):"";if(void 0!==t.raws.afterName?r+=t.raws.afterName:n&&(r+=" "),t.nodes)this.block(t,r+n);else{var i=(t.raws.between||"")+(e?";":"");this.builder(r+n+i,t)}},e.body=function(t){for(var e=t.nodes.length-1;e>0&&"comment"===t.nodes[e].type;)e-=1;for(var r=this.raw(t,"semicolon"),n=0;n<t.nodes.length;n++){var i=t.nodes[n],o=this.raw(i,"before");o&&this.builder(o),this.stringify(i,e!==n||r)}},e.block=function(t,e){var r,n=this.raw(t,"between","beforeOpen");this.builder(e+n+"{",t,"start"),t.nodes&&t.nodes.length?(this.body(t),r=this.raw(t,"after")):r=this.raw(t,"after","emptyBody"),r&&this.builder(r),this.builder("}",t,"end")},e.raw=function(t,e,r){var i;if(r||(r=e),e&&void 0!==(i=t.raws[e]))return i;var o=t.parent;if("before"===r&&(!o||"root"===o.type&&o.first===t))return"";if(!o)return n[r];var s=t.root();if(s.rawCache||(s.rawCache={}),void 0!==s.rawCache[r])return s.rawCache[r];if("before"===r||"after"===r)return this.beforeAfter(t,r);var a,u="raw"+((a=r)[0].toUpperCase()+a.slice(1));return this[u]?i=this[u](s,t):s.walk((function(t){if(void 0!==(i=t.raws[e]))return!1})),void 0===i&&(i=n[r]),s.rawCache[r]=i,i},e.rawSemicolon=function(t){var e;return t.walk((function(t){if(t.nodes&&t.nodes.length&&"decl"===t.last.type&&void 0!==(e=t.raws.semicolon))return!1})),e},e.rawEmptyBody=function(t){var e;return t.walk((function(t){if(t.nodes&&0===t.nodes.length&&void 0!==(e=t.raws.after))return!1})),e},e.rawIndent=function(t){return t.raws.indent?t.raws.indent:(t.walk((function(r){var n=r.parent;if(n&&n!==t&&n.parent&&n.parent===t&&void 0!==r.raws.before){var i=r.raws.before.split("\n");return e=(e=i[i.length-1]).replace(/[^\s]/g,""),!1}})),e);var e},e.rawBeforeComment=function(t,e){var r;return t.walkComments((function(t){if(void 0!==t.raws.before)return-1!==(r=t.raws.before).indexOf("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeDecl"):r&&(r=r.replace(/[^\s]/g,"")),r},e.rawBeforeDecl=function(t,e){var r;return t.walkDecls((function(t){if(void 0!==t.raws.before)return-1!==(r=t.raws.before).indexOf("\n")&&(r=r.replace(/[^\n]+$/,"")),!1})),void 0===r?r=this.raw(e,null,"beforeRule"):r&&(r=r.replace(/[^\s]/g,"")),r},e.rawBeforeRule=function(t){var e;return t.walk((function(r){if(r.nodes&&(r.parent!==t||t.first!==r)&&void 0!==r.raws.before)return-1!==(e=r.raws.before).indexOf("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/[^\s]/g,"")),e},e.rawBeforeClose=function(t){var e;return t.walk((function(t){if(t.nodes&&t.nodes.length>0&&void 0!==t.raws.after)return-1!==(e=t.raws.after).indexOf("\n")&&(e=e.replace(/[^\n]+$/,"")),!1})),e&&(e=e.replace(/[^\s]/g,"")),e},e.rawBeforeOpen=function(t){var e;return t.walk((function(t){if("decl"!==t.type&&void 0!==(e=t.raws.between))return!1})),e},e.rawColon=function(t){var e;return t.walkDecls((function(t){if(void 0!==t.raws.between)return e=t.raws.between.replace(/[^\s:]/g,""),!1})),e},e.beforeAfter=function(t,e){var r;r="decl"===t.type?this.raw(t,null,"beforeDecl"):"comment"===t.type?this.raw(t,null,"beforeComment"):"before"===e?this.raw(t,null,"beforeRule"):this.raw(t,null,"beforeClose");for(var n=t.parent,i=0;n&&"root"!==n.type;)i+=1,n=n.parent;if(-1!==r.indexOf("\n")){var o=this.raw(t,null,"indent");if(o.length)for(var s=0;s<i;s++)r+=o}return r},e.rawValue=function(t,e){var r=t[e],n=t.raws[e];return n&&n.value===r?n.raw:r},t}();r.default=i,e.exports=r.default},{}],188:[function(t,e,r){r.__esModule=!0,r.default=void 0;var n,i=(n=t("./stringifier"))&&n.__esModule?n:{default:n};r.default=function(t,e){new i.default(e).stringify(t)},e.exports=r.default},{"./stringifier":187}],189:[function(t,e,r){r.__esModule=!0,r.default=function(t,e){void 0===e&&(e={});var r,k,x,M,C,T,O,P,B,R,N,U,j,L,D=t.css.valueOf(),F=e.ignoreErrors,q=D.length,H=-1,K=1,V=0,G=[],z=[];function W(e){throw t.error("Unclosed "+e,K,V-H)}return{back:function(t){z.push(t)},nextToken:function(t){if(z.length)return z.pop();if(!(V>=q)){var e=!!t&&t.ignoreUnclosed;switch(((r=D.charCodeAt(V))===a||r===c||r===h&&D.charCodeAt(V+1)!==a)&&(H=V,K+=1),r){case a:case u:case f:case h:case c:k=V;do{k+=1,(r=D.charCodeAt(k))===a&&(H=k,K+=1)}while(r===u||r===a||r===f||r===h||r===c);L=["space",D.slice(V,k)],V=k-1;break;case l:case p:case y:case b:case w:case m:case g:var Q=String.fromCharCode(r);L=[Q,Q,K,V-H];break;case d:if(U=G.length?G.pop()[1]:"",j=D.charCodeAt(V+1),"url"===U&&j!==n&&j!==i&&j!==u&&j!==a&&j!==f&&j!==c&&j!==h){k=V;do{if(R=!1,-1===(k=D.indexOf(")",k+1))){if(F||e){k=V;break}W("bracket")}for(N=k;D.charCodeAt(N-1)===o;)N-=1,R=!R}while(R);L=["brackets",D.slice(V,k+1),K,V-H,K,k-H],V=k}else k=D.indexOf(")",V+1),T=D.slice(V,k+1),-1===k||S.test(T)?L=["(","(",K,V-H]:(L=["brackets",T,K,V-H,K,k-H],V=k);break;case n:case i:x=r===n?"'":'"',k=V;do{if(R=!1,-1===(k=D.indexOf(x,k+1))){if(F||e){k=V+1;break}W("string")}for(N=k;D.charCodeAt(N-1)===o;)N-=1,R=!R}while(R);T=D.slice(V,k+1),M=T.split("\n"),(C=M.length-1)>0?(P=K+C,B=k-M[C].length):(P=K,B=H),L=["string",D.slice(V,k+1),K,V-H,P,k-B],H=B,K=P,V=k;break;case _:A.lastIndex=V+1,A.test(D),k=0===A.lastIndex?D.length-1:A.lastIndex-2,L=["at-word",D.slice(V,k+1),K,V-H,K,k-H],V=k;break;case o:for(k=V,O=!0;D.charCodeAt(k+1)===o;)k+=1,O=!O;if(r=D.charCodeAt(k+1),O&&r!==s&&r!==u&&r!==a&&r!==f&&r!==h&&r!==c&&(k+=1,I.test(D.charAt(k)))){for(;I.test(D.charAt(k+1));)k+=1;D.charCodeAt(k+1)===u&&(k+=1)}L=["word",D.slice(V,k+1),K,V-H,K,k-H],V=k;break;default:r===s&&D.charCodeAt(V+1)===v?(0===(k=D.indexOf("*/",V+2)+1)&&(F||e?k=D.length:W("comment")),T=D.slice(V,k+1),M=T.split("\n"),(C=M.length-1)>0?(P=K+C,B=k-M[C].length):(P=K,B=H),L=["comment",T,K,V-H,P,k-B],H=B,K=P,V=k):(E.lastIndex=V+1,E.test(D),k=0===E.lastIndex?D.length-1:E.lastIndex-2,L=["word",D.slice(V,k+1),K,V-H,K,k-H],G.push(L),V=k)}return V++,L}},endOfFile:function(){return 0===z.length&&V>=q},position:function(){return V}}};var n="'".charCodeAt(0),i='"'.charCodeAt(0),o="\\".charCodeAt(0),s="/".charCodeAt(0),a="\n".charCodeAt(0),u=" ".charCodeAt(0),c="\f".charCodeAt(0),f="\t".charCodeAt(0),h="\r".charCodeAt(0),l="[".charCodeAt(0),p="]".charCodeAt(0),d="(".charCodeAt(0),g=")".charCodeAt(0),y="{".charCodeAt(0),b="}".charCodeAt(0),m=";".charCodeAt(0),v="*".charCodeAt(0),w=":".charCodeAt(0),_="@".charCodeAt(0),A=/[ \n\t\r\f{}()'"\\;/[\]#]/g,E=/[ \n\t\r\f(){}:;@!'"\\\][#]|\/(?=\*)/g,S=/.[\\/("'\n]/,I=/[a-f0-9]/i;e.exports=r.default},{}],190:[function(t,e,r){r.__esModule=!0,r.default=void 0;r.default={prefix:function(t){var e=t.match(/^(-\w+-)/);return e?e[0]:""},unprefixed:function(t){return t.replace(/^-\w+-/,"")}},e.exports=r.default},{}],191:[function(t,e,r){r.__esModule=!0,r.default=function(t){n[t]||(n[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))};var n={};e.exports=r.default},{}],192:[function(t,e,r){r.__esModule=!0,r.default=void 0;var n=function(){function t(t,e){if(void 0===e&&(e={}),this.type="warning",this.text=t,e.node&&e.node.source){var r=e.node.positionBy(e);this.line=r.line,this.column=r.column}for(var n in e)this[n]=e[n]}return t.prototype.toString=function(){return this.node?this.node.error(this.text,{plugin:this.plugin,index:this.index,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text},t}();r.default=n,e.exports=r.default},{}],193:[function(t,e,r){var n,i,o=e.exports={};function s(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function u(t){if(n===setTimeout)return setTimeout(t,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(t){n=s}try{i="function"==typeof clearTimeout?clearTimeout:a}catch(t){i=a}}();var c,f=[],h=!1,l=-1;function p(){h&&c&&(h=!1,c.length?f=c.concat(f):l=-1,f.length&&d())}function d(){if(!h){var t=u(p);h=!0;for(var e=f.length;e;){for(c=f,f=[];++l<e;)c&&c[l].run();l=-1,e=f.length}c=null,h=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===a||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(t)}}function g(t,e){this.fun=t,this.array=e}function y(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];f.push(new g(t,e)),1!==f.length||h||u(d)},g.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=y,o.addListener=y,o.once=y,o.off=y,o.removeListener=y,o.removeAllListeners=y,o.emit=y,o.prependListener=y,o.prependOnceListener=y,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},{}],194:[function(t,e,n){(function(t){!function(r){var i="object"==c(n)&&n&&!n.nodeType&&n,o="object"==c(e)&&e&&!e.nodeType&&e,s="object"==c(t)&&t;s.global!==s&&s.window!==s&&s.self!==s||(r=s);var a,u,f=2147483647,h=36,l=/^xn--/,p=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,g={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},y=Math.floor,b=String.fromCharCode;function m(t){throw new RangeError(g[t])}function v(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function w(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+v((t=t.replace(d,".")).split("."),e).join(".")}function _(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function A(t){return v(t,(function(t){var e="";return t>65535&&(e+=b((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+b(t)})).join("")}function E(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function S(t,e,r){var n=0;for(t=r?y(t/700):t>>1,t+=y(t/e);t>455;n+=h)t=y(t/35);return y(n+36*t/(t+38))}function I(t){var e,r,n,i,o,s,a,u,c,l,p,d=[],g=t.length,b=0,v=128,w=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&m("not-basic"),d.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<g;){for(o=b,s=1,a=h;i>=g&&m("invalid-input"),((u=(p=t.charCodeAt(i++))-48<10?p-22:p-65<26?p-65:p-97<26?p-97:h)>=h||u>y((f-b)/s))&&m("overflow"),b+=u*s,!(u<(c=a<=w?1:a>=w+26?26:a-w));a+=h)s>y(f/(l=h-c))&&m("overflow"),s*=l;w=S(b-o,e=d.length+1,0==o),y(b/e)>f-v&&m("overflow"),v+=y(b/e),b%=e,d.splice(b++,0,v)}return A(d)}function k(t){var e,r,n,i,o,s,a,u,c,l,p,d,g,v,w,A=[];for(d=(t=_(t)).length,e=128,r=0,o=72,s=0;s<d;++s)(p=t[s])<128&&A.push(b(p));for(n=i=A.length,i&&A.push("-");n<d;){for(a=f,s=0;s<d;++s)(p=t[s])>=e&&p<a&&(a=p);for(a-e>y((f-r)/(g=n+1))&&m("overflow"),r+=(a-e)*g,e=a,s=0;s<d;++s)if((p=t[s])<e&&++r>f&&m("overflow"),p==e){for(u=r,c=h;!(u<(l=c<=o?1:c>=o+26?26:c-o));c+=h)w=u-l,v=h-l,A.push(b(E(l+w%v,0))),u=y(w/v);A.push(b(E(u,0))),o=S(r,g,n==i),r=0,++n}++r,++e}return A.join("")}if(a={version:"1.4.1",ucs2:{decode:_,encode:A},decode:I,encode:k,toASCII:function(t){return w(t,(function(t){return p.test(t)?"xn--"+k(t):t}))},toUnicode:function(t){return w(t,(function(t){return l.test(t)?I(t.slice(4).toLowerCase()):t}))}},i&&o)if(e.exports==i)o.exports=a;else for(u in a)a.hasOwnProperty(u)&&(i[u]=a[u]);else r.punycode=a}(this)}).call(this,void 0!==r.g?r.g:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],195:[function(t,e,r){function n(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,o){e=e||"&",r=r||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var u=1e3;o&&"number"==typeof o.maxKeys&&(u=o.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var f=0;f<c;++f){var h,l,p,d,g=t[f].replace(a,"%20"),y=g.indexOf(r);y>=0?(h=g.substr(0,y),l=g.substr(y+1)):(h=g,l=""),p=decodeURIComponent(h),d=decodeURIComponent(l),n(s,p)?i(s[p])?s[p].push(d):s[p]=[s[p],d]:s[p]=d}return s};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],196:[function(t,e,r){var n=function(t){switch(c(t)){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"===c(t)?o(s(t),(function(s){var a=encodeURIComponent(n(s))+r;return i(t[s])?o(t[s],(function(t){return a+encodeURIComponent(n(t))})).join(e):a+encodeURIComponent(n(t[s]))})).join(e):a?encodeURIComponent(n(a))+r+encodeURIComponent(n(t)):""};var i=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var r=[],n=0;n<t.length;n++)r.push(e(t[n],n));return r}var s=Object.keys||function(t){var e=[];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.push(r);return e}},{}],197:[function(t,e,r){r.decode=r.parse=t("./decode"),r.encode=r.stringify=t("./encode")},{"./decode":195,"./encode":196}],198:[function(t,e,r){var n=t("./util"),i=Object.prototype.hasOwnProperty,o="undefined"!=typeof Map;function s(){this._array=[],this._set=o?new Map:Object.create(null)}s.fromArray=function(t,e){for(var r=new s,n=0,i=t.length;n<i;n++)r.add(t[n],e);return r},s.prototype.size=function(){return o?this._set.size:Object.getOwnPropertyNames(this._set).length},s.prototype.add=function(t,e){var r=o?t:n.toSetString(t),s=o?this.has(t):i.call(this._set,r),a=this._array.length;s&&!e||this._array.push(t),s||(o?this._set.set(t,a):this._set[r]=a)},s.prototype.has=function(t){if(o)return this._set.has(t);var e=n.toSetString(t);return i.call(this._set,e)},s.prototype.indexOf=function(t){if(o){var e=this._set.get(t);if(e>=0)return e}else{var r=n.toSetString(t);if(i.call(this._set,r))return this._set[r]}throw new Error('"'+t+'" is not in the set.')},s.prototype.at=function(t){if(t>=0&&t<this._array.length)return this._array[t];throw new Error("No element indexed by "+t)},s.prototype.toArray=function(){return this._array.slice()},r.ArraySet=s},{"./util":207}],199:[function(t,e,r){var n=t("./base64");r.encode=function(t){var e,r="",i=function(t){return t<0?1+(-t<<1):0+(t<<1)}(t);do{e=31&i,(i>>>=5)>0&&(e|=32),r+=n.encode(e)}while(i>0);return r},r.decode=function(t,e,r){var i,o,s,a,u=t.length,c=0,f=0;do{if(e>=u)throw new Error("Expected more digits in base 64 VLQ value.");if(-1===(o=n.decode(t.charCodeAt(e++))))throw new Error("Invalid base64 digit: "+t.charAt(e-1));i=!!(32&o),c+=(o&=31)<<f,f+=5}while(i);r.value=(a=(s=c)>>1,1==(1&s)?-a:a),r.rest=e}},{"./base64":200}],200:[function(t,e,r){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");r.encode=function(t){if(0<=t&&t<n.length)return n[t];throw new TypeError("Must be between 0 and 63: "+t)},r.decode=function(t){return 65<=t&&t<=90?t-65:97<=t&&t<=122?t-97+26:48<=t&&t<=57?t-48+52:43==t?62:47==t?63:-1}},{}],201:[function(t,e,r){function n(t,e,i,o,s,a){var u=Math.floor((e-t)/2)+t,c=s(i,o[u],!0);return 0===c?u:c>0?e-u>1?n(u,e,i,o,s,a):a==r.LEAST_UPPER_BOUND?e<o.length?e:-1:u:u-t>1?n(t,u,i,o,s,a):a==r.LEAST_UPPER_BOUND?u:t<0?-1:t}r.GREATEST_LOWER_BOUND=1,r.LEAST_UPPER_BOUND=2,r.search=function(t,e,i,o){if(0===e.length)return-1;var s=n(-1,e.length,t,e,i,o||r.GREATEST_LOWER_BOUND);if(s<0)return-1;for(;s-1>=0&&0===i(e[s],e[s-1],!0);)--s;return s}},{}],202:[function(t,e,r){var n=t("./util");function i(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}i.prototype.unsortedForEach=function(t,e){this._array.forEach(t,e)},i.prototype.add=function(t){var e,r,i,o,s,a;r=t,i=(e=this._last).generatedLine,o=r.generatedLine,s=e.generatedColumn,a=r.generatedColumn,o>i||o==i&&a>=s||n.compareByGeneratedPositionsInflated(e,r)<=0?(this._last=t,this._array.push(t)):(this._sorted=!1,this._array.push(t))},i.prototype.toArray=function(){return this._sorted||(this._array.sort(n.compareByGeneratedPositionsInflated),this._sorted=!0),this._array},r.MappingList=i},{"./util":207}],203:[function(t,e,r){function n(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function i(t,e,r,o){if(r<o){var s=r-1;n(t,(f=r,h=o,Math.round(f+Math.random()*(h-f))),o);for(var a=t[o],u=r;u<o;u++)e(t[u],a)<=0&&n(t,s+=1,u);n(t,s+1,u);var c=s+1;i(t,e,r,c-1),i(t,e,c+1,o)}var f,h}r.quickSort=function(t,e){i(t,e,0,t.length-1)}},{}],204:[function(t,e,r){var n=t("./util"),i=t("./binary-search"),o=t("./array-set").ArraySet,s=t("./base64-vlq"),a=t("./quick-sort").quickSort;function u(t,e){var r=t;return"string"==typeof t&&(r=n.parseSourceMapInput(t)),null!=r.sections?new h(r,e):new c(r,e)}function c(t,e){var r=t;"string"==typeof t&&(r=n.parseSourceMapInput(t));var i=n.getArg(r,"version"),s=n.getArg(r,"sources"),a=n.getArg(r,"names",[]),u=n.getArg(r,"sourceRoot",null),c=n.getArg(r,"sourcesContent",null),f=n.getArg(r,"mappings"),h=n.getArg(r,"file",null);if(i!=this._version)throw new Error("Unsupported version: "+i);u&&(u=n.normalize(u)),s=s.map(String).map(n.normalize).map((function(t){return u&&n.isAbsolute(u)&&n.isAbsolute(t)?n.relative(u,t):t})),this._names=o.fromArray(a.map(String),!0),this._sources=o.fromArray(s,!0),this._absoluteSources=this._sources.toArray().map((function(t){return n.computeSourceURL(u,t,e)})),this.sourceRoot=u,this.sourcesContent=c,this._mappings=f,this._sourceMapURL=e,this.file=h}function f(){this.generatedLine=0,this.generatedColumn=0,this.source=null,this.originalLine=null,this.originalColumn=null,this.name=null}function h(t,e){var r=t;"string"==typeof t&&(r=n.parseSourceMapInput(t));var i=n.getArg(r,"version"),s=n.getArg(r,"sections");if(i!=this._version)throw new Error("Unsupported version: "+i);this._sources=new o,this._names=new o;var a={line:-1,column:0};this._sections=s.map((function(t){if(t.url)throw new Error("Support for url field in sections not implemented.");var r=n.getArg(t,"offset"),i=n.getArg(r,"line"),o=n.getArg(r,"column");if(i<a.line||i===a.line&&o<a.column)throw new Error("Section offsets must be ordered and non-overlapping.");return a=r,{generatedOffset:{generatedLine:i+1,generatedColumn:o+1},consumer:new u(n.getArg(t,"map"),e)}}))}u.fromSourceMap=function(t,e){return c.fromSourceMap(t,e)},u.prototype._version=3,u.prototype.__generatedMappings=null,Object.defineProperty(u.prototype,"_generatedMappings",{configurable:!0,enumerable:!0,get:function(){return this.__generatedMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__generatedMappings}}),u.prototype.__originalMappings=null,Object.defineProperty(u.prototype,"_originalMappings",{configurable:!0,enumerable:!0,get:function(){return this.__originalMappings||this._parseMappings(this._mappings,this.sourceRoot),this.__originalMappings}}),u.prototype._charIsMappingSeparator=function(t,e){var r=t.charAt(e);return";"===r||","===r},u.prototype._parseMappings=function(t,e){throw new Error("Subclasses must implement _parseMappings")},u.GENERATED_ORDER=1,u.ORIGINAL_ORDER=2,u.GREATEST_LOWER_BOUND=1,u.LEAST_UPPER_BOUND=2,u.prototype.eachMapping=function(t,e,r){var i,o=e||null;switch(r||u.GENERATED_ORDER){case u.GENERATED_ORDER:i=this._generatedMappings;break;case u.ORIGINAL_ORDER:i=this._originalMappings;break;default:throw new Error("Unknown order of iteration.")}var s=this.sourceRoot;i.map((function(t){var e=null===t.source?null:this._sources.at(t.source);return{source:e=n.computeSourceURL(s,e,this._sourceMapURL),generatedLine:t.generatedLine,generatedColumn:t.generatedColumn,originalLine:t.originalLine,originalColumn:t.originalColumn,name:null===t.name?null:this._names.at(t.name)}}),this).forEach(t,o)},u.prototype.allGeneratedPositionsFor=function(t){var e=n.getArg(t,"line"),r={source:n.getArg(t,"source"),originalLine:e,originalColumn:n.getArg(t,"column",0)};if(r.source=this._findSourceIndex(r.source),r.source<0)return[];var o=[],s=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,i.LEAST_UPPER_BOUND);if(s>=0){var a=this._originalMappings[s];if(void 0===t.column)for(var u=a.originalLine;a&&a.originalLine===u;)o.push({line:n.getArg(a,"generatedLine",null),column:n.getArg(a,"generatedColumn",null),lastColumn:n.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s];else for(var c=a.originalColumn;a&&a.originalLine===e&&a.originalColumn==c;)o.push({line:n.getArg(a,"generatedLine",null),column:n.getArg(a,"generatedColumn",null),lastColumn:n.getArg(a,"lastGeneratedColumn",null)}),a=this._originalMappings[++s]}return o},r.SourceMapConsumer=u,c.prototype=Object.create(u.prototype),c.prototype.consumer=u,c.prototype._findSourceIndex=function(t){var e,r=t;if(null!=this.sourceRoot&&(r=n.relative(this.sourceRoot,r)),this._sources.has(r))return this._sources.indexOf(r);for(e=0;e<this._absoluteSources.length;++e)if(this._absoluteSources[e]==t)return e;return-1},c.fromSourceMap=function(t,e){var r=Object.create(c.prototype),i=r._names=o.fromArray(t._names.toArray(),!0),s=r._sources=o.fromArray(t._sources.toArray(),!0);r.sourceRoot=t._sourceRoot,r.sourcesContent=t._generateSourcesContent(r._sources.toArray(),r.sourceRoot),r.file=t._file,r._sourceMapURL=e,r._absoluteSources=r._sources.toArray().map((function(t){return n.computeSourceURL(r.sourceRoot,t,e)}));for(var u=t._mappings.toArray().slice(),h=r.__generatedMappings=[],l=r.__originalMappings=[],p=0,d=u.length;p<d;p++){var g=u[p],y=new f;y.generatedLine=g.generatedLine,y.generatedColumn=g.generatedColumn,g.source&&(y.source=s.indexOf(g.source),y.originalLine=g.originalLine,y.originalColumn=g.originalColumn,g.name&&(y.name=i.indexOf(g.name)),l.push(y)),h.push(y)}return a(r.__originalMappings,n.compareByOriginalPositions),r},c.prototype._version=3,Object.defineProperty(c.prototype,"sources",{get:function(){return this._absoluteSources.slice()}}),c.prototype._parseMappings=function(t,e){for(var r,i,o,u,c,h=1,l=0,p=0,d=0,g=0,y=0,b=t.length,m=0,v={},w={},_=[],A=[];m<b;)if(";"===t.charAt(m))h++,m++,l=0;else if(","===t.charAt(m))m++;else{for((r=new f).generatedLine=h,u=m;u<b&&!this._charIsMappingSeparator(t,u);u++);if(o=v[i=t.slice(m,u)])m+=i.length;else{for(o=[];m<u;)s.decode(t,m,w),c=w.value,m=w.rest,o.push(c);if(2===o.length)throw new Error("Found a source, but no line and column");if(3===o.length)throw new Error("Found a source and line, but no column");v[i]=o}r.generatedColumn=l+o[0],l=r.generatedColumn,o.length>1&&(r.source=g+o[1],g+=o[1],r.originalLine=p+o[2],p=r.originalLine,r.originalLine+=1,r.originalColumn=d+o[3],d=r.originalColumn,o.length>4&&(r.name=y+o[4],y+=o[4])),A.push(r),"number"==typeof r.originalLine&&_.push(r)}a(A,n.compareByGeneratedPositionsDeflated),this.__generatedMappings=A,a(_,n.compareByOriginalPositions),this.__originalMappings=_},c.prototype._findMapping=function(t,e,r,n,o,s){if(t[r]<=0)throw new TypeError("Line must be greater than or equal to 1, got "+t[r]);if(t[n]<0)throw new TypeError("Column must be greater than or equal to 0, got "+t[n]);return i.search(t,e,o,s)},c.prototype.computeColumnSpans=function(){for(var t=0;t<this._generatedMappings.length;++t){var e=this._generatedMappings[t];if(t+1<this._generatedMappings.length){var r=this._generatedMappings[t+1];if(e.generatedLine===r.generatedLine){e.lastGeneratedColumn=r.generatedColumn-1;continue}}e.lastGeneratedColumn=1/0}},c.prototype.originalPositionFor=function(t){var e={generatedLine:n.getArg(t,"line"),generatedColumn:n.getArg(t,"column")},r=this._findMapping(e,this._generatedMappings,"generatedLine","generatedColumn",n.compareByGeneratedPositionsDeflated,n.getArg(t,"bias",u.GREATEST_LOWER_BOUND));if(r>=0){var i=this._generatedMappings[r];if(i.generatedLine===e.generatedLine){var o=n.getArg(i,"source",null);null!==o&&(o=this._sources.at(o),o=n.computeSourceURL(this.sourceRoot,o,this._sourceMapURL));var s=n.getArg(i,"name",null);return null!==s&&(s=this._names.at(s)),{source:o,line:n.getArg(i,"originalLine",null),column:n.getArg(i,"originalColumn",null),name:s}}}return{source:null,line:null,column:null,name:null}},c.prototype.hasContentsOfAllSources=function(){return!!this.sourcesContent&&this.sourcesContent.length>=this._sources.size()&&!this.sourcesContent.some((function(t){return null==t}))},c.prototype.sourceContentFor=function(t,e){if(!this.sourcesContent)return null;var r=this._findSourceIndex(t);if(r>=0)return this.sourcesContent[r];var i,o=t;if(null!=this.sourceRoot&&(o=n.relative(this.sourceRoot,o)),null!=this.sourceRoot&&(i=n.urlParse(this.sourceRoot))){var s=o.replace(/^file:\/\//,"");if("file"==i.scheme&&this._sources.has(s))return this.sourcesContent[this._sources.indexOf(s)];if((!i.path||"/"==i.path)&&this._sources.has("/"+o))return this.sourcesContent[this._sources.indexOf("/"+o)]}if(e)return null;throw new Error('"'+o+'" is not in the SourceMap.')},c.prototype.generatedPositionFor=function(t){var e=n.getArg(t,"source");if((e=this._findSourceIndex(e))<0)return{line:null,column:null,lastColumn:null};var r={source:e,originalLine:n.getArg(t,"line"),originalColumn:n.getArg(t,"column")},i=this._findMapping(r,this._originalMappings,"originalLine","originalColumn",n.compareByOriginalPositions,n.getArg(t,"bias",u.GREATEST_LOWER_BOUND));if(i>=0){var o=this._originalMappings[i];if(o.source===r.source)return{line:n.getArg(o,"generatedLine",null),column:n.getArg(o,"generatedColumn",null),lastColumn:n.getArg(o,"lastGeneratedColumn",null)}}return{line:null,column:null,lastColumn:null}},r.BasicSourceMapConsumer=c,h.prototype=Object.create(u.prototype),h.prototype.constructor=u,h.prototype._version=3,Object.defineProperty(h.prototype,"sources",{get:function(){for(var t=[],e=0;e<this._sections.length;e++)for(var r=0;r<this._sections[e].consumer.sources.length;r++)t.push(this._sections[e].consumer.sources[r]);return t}}),h.prototype.originalPositionFor=function(t){var e={generatedLine:n.getArg(t,"line"),generatedColumn:n.getArg(t,"column")},r=i.search(e,this._sections,(function(t,e){return t.generatedLine-e.generatedOffset.generatedLine||t.generatedColumn-e.generatedOffset.generatedColumn})),o=this._sections[r];return o?o.consumer.originalPositionFor({line:e.generatedLine-(o.generatedOffset.generatedLine-1),column:e.generatedColumn-(o.generatedOffset.generatedLine===e.generatedLine?o.generatedOffset.generatedColumn-1:0),bias:t.bias}):{source:null,line:null,column:null,name:null}},h.prototype.hasContentsOfAllSources=function(){return this._sections.every((function(t){return t.consumer.hasContentsOfAllSources()}))},h.prototype.sourceContentFor=function(t,e){for(var r=0;r<this._sections.length;r++){var n=this._sections[r].consumer.sourceContentFor(t,!0);if(n)return n}if(e)return null;throw new Error('"'+t+'" is not in the SourceMap.')},h.prototype.generatedPositionFor=function(t){for(var e=0;e<this._sections.length;e++){var r=this._sections[e];if(-1!==r.consumer._findSourceIndex(n.getArg(t,"source"))){var i=r.consumer.generatedPositionFor(t);if(i)return{line:i.line+(r.generatedOffset.generatedLine-1),column:i.column+(r.generatedOffset.generatedLine===i.line?r.generatedOffset.generatedColumn-1:0)}}}return{line:null,column:null}},h.prototype._parseMappings=function(t,e){this.__generatedMappings=[],this.__originalMappings=[];for(var r=0;r<this._sections.length;r++)for(var i=this._sections[r],o=i.consumer._generatedMappings,s=0;s<o.length;s++){var u=o[s],c=i.consumer._sources.at(u.source);c=n.computeSourceURL(i.consumer.sourceRoot,c,this._sourceMapURL),this._sources.add(c),c=this._sources.indexOf(c);var f=null;u.name&&(f=i.consumer._names.at(u.name),this._names.add(f),f=this._names.indexOf(f));var h={source:c,generatedLine:u.generatedLine+(i.generatedOffset.generatedLine-1),generatedColumn:u.generatedColumn+(i.generatedOffset.generatedLine===u.generatedLine?i.generatedOffset.generatedColumn-1:0),originalLine:u.originalLine,originalColumn:u.originalColumn,name:f};this.__generatedMappings.push(h),"number"==typeof h.originalLine&&this.__originalMappings.push(h)}a(this.__generatedMappings,n.compareByGeneratedPositionsDeflated),a(this.__originalMappings,n.compareByOriginalPositions)},r.IndexedSourceMapConsumer=h},{"./array-set":198,"./base64-vlq":199,"./binary-search":201,"./quick-sort":203,"./util":207}],205:[function(t,e,r){var n=t("./base64-vlq"),i=t("./util"),o=t("./array-set").ArraySet,s=t("./mapping-list").MappingList;function a(t){t||(t={}),this._file=i.getArg(t,"file",null),this._sourceRoot=i.getArg(t,"sourceRoot",null),this._skipValidation=i.getArg(t,"skipValidation",!1),this._sources=new o,this._names=new o,this._mappings=new s,this._sourcesContents=null}a.prototype._version=3,a.fromSourceMap=function(t){var e=t.sourceRoot,r=new a({file:t.file,sourceRoot:e});return t.eachMapping((function(t){var n={generated:{line:t.generatedLine,column:t.generatedColumn}};null!=t.source&&(n.source=t.source,null!=e&&(n.source=i.relative(e,n.source)),n.original={line:t.originalLine,column:t.originalColumn},null!=t.name&&(n.name=t.name)),r.addMapping(n)})),t.sources.forEach((function(n){var o=n;null!==e&&(o=i.relative(e,n)),r._sources.has(o)||r._sources.add(o);var s=t.sourceContentFor(n);null!=s&&r.setSourceContent(n,s)})),r},a.prototype.addMapping=function(t){var e=i.getArg(t,"generated"),r=i.getArg(t,"original",null),n=i.getArg(t,"source",null),o=i.getArg(t,"name",null);this._skipValidation||this._validateMapping(e,r,n,o),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:e.line,generatedColumn:e.column,originalLine:null!=r&&r.line,originalColumn:null!=r&&r.column,source:n,name:o})},a.prototype.setSourceContent=function(t,e){var r=t;null!=this._sourceRoot&&(r=i.relative(this._sourceRoot,r)),null!=e?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[i.toSetString(r)]=e):this._sourcesContents&&(delete this._sourcesContents[i.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))},a.prototype.applySourceMap=function(t,e,r){var n=e;if(null==e){if(null==t.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=t.file}var s=this._sourceRoot;null!=s&&(n=i.relative(s,n));var a=new o,u=new o;this._mappings.unsortedForEach((function(e){if(e.source===n&&null!=e.originalLine){var o=t.originalPositionFor({line:e.originalLine,column:e.originalColumn});null!=o.source&&(e.source=o.source,null!=r&&(e.source=i.join(r,e.source)),null!=s&&(e.source=i.relative(s,e.source)),e.originalLine=o.line,e.originalColumn=o.column,null!=o.name&&(e.name=o.name))}var c=e.source;null==c||a.has(c)||a.add(c);var f=e.name;null==f||u.has(f)||u.add(f)}),this),this._sources=a,this._names=u,t.sources.forEach((function(e){var n=t.sourceContentFor(e);null!=n&&(null!=r&&(e=i.join(r,e)),null!=s&&(e=i.relative(s,e)),this.setSourceContent(e,n))}),this)},a.prototype._validateMapping=function(t,e,r,n){if(e&&"number"!=typeof e.line&&"number"!=typeof e.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if((!(t&&"line"in t&&"column"in t&&t.line>0&&t.column>=0)||e||r||n)&&!(t&&"line"in t&&"column"in t&&e&&"line"in e&&"column"in e&&t.line>0&&t.column>=0&&e.line>0&&e.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:t,source:r,original:e,name:n}))},a.prototype._serializeMappings=function(){for(var t,e,r,o,s=0,a=1,u=0,c=0,f=0,h=0,l="",p=this._mappings.toArray(),d=0,g=p.length;d<g;d++){if(t="",(e=p[d]).generatedLine!==a)for(s=0;e.generatedLine!==a;)t+=";",a++;else if(d>0){if(!i.compareByGeneratedPositionsInflated(e,p[d-1]))continue;t+=","}t+=n.encode(e.generatedColumn-s),s=e.generatedColumn,null!=e.source&&(o=this._sources.indexOf(e.source),t+=n.encode(o-h),h=o,t+=n.encode(e.originalLine-1-c),c=e.originalLine-1,t+=n.encode(e.originalColumn-u),u=e.originalColumn,null!=e.name&&(r=this._names.indexOf(e.name),t+=n.encode(r-f),f=r)),l+=t}return l},a.prototype._generateSourcesContent=function(t,e){return t.map((function(t){if(!this._sourcesContents)return null;null!=e&&(t=i.relative(e,t));var r=i.toSetString(t);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)},a.prototype.toJSON=function(){var t={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(t.file=this._file),null!=this._sourceRoot&&(t.sourceRoot=this._sourceRoot),this._sourcesContents&&(t.sourcesContent=this._generateSourcesContent(t.sources,t.sourceRoot)),t},a.prototype.toString=function(){return JSON.stringify(this.toJSON())},r.SourceMapGenerator=a},{"./array-set":198,"./base64-vlq":199,"./mapping-list":202,"./util":207}],206:[function(t,e,r){var n=t("./source-map-generator").SourceMapGenerator,i=t("./util"),o=/(\r?\n)/,s="$$$isSourceNode$$$";function a(t,e,r,n,i){this.children=[],this.sourceContents={},this.line=null==t?null:t,this.column=null==e?null:e,this.source=null==r?null:r,this.name=null==i?null:i,this[s]=!0,null!=n&&this.add(n)}a.fromStringWithSourceMap=function(t,e,r){var n=new a,s=t.split(o),u=0,c=function(){return t()+(t()||"");function t(){return u<s.length?s[u++]:void 0}},f=1,h=0,l=null;return e.eachMapping((function(t){if(null!==l){if(!(f<t.generatedLine)){var e=(r=s[u]||"").substr(0,t.generatedColumn-h);return s[u]=r.substr(t.generatedColumn-h),h=t.generatedColumn,p(l,e),void(l=t)}p(l,c()),f++,h=0}for(;f<t.generatedLine;)n.add(c()),f++;if(h<t.generatedColumn){var r=s[u]||"";n.add(r.substr(0,t.generatedColumn)),s[u]=r.substr(t.generatedColumn),h=t.generatedColumn}l=t}),this),u<s.length&&(l&&p(l,c()),n.add(s.splice(u).join(""))),e.sources.forEach((function(t){var o=e.sourceContentFor(t);null!=o&&(null!=r&&(t=i.join(r,t)),n.setSourceContent(t,o))})),n;function p(t,e){if(null===t||void 0===t.source)n.add(e);else{var o=r?i.join(r,t.source):t.source;n.add(new a(t.originalLine,t.originalColumn,o,e,t.name))}}},a.prototype.add=function(t){if(Array.isArray(t))t.forEach((function(t){this.add(t)}),this);else{if(!t[s]&&"string"!=typeof t)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);t&&this.children.push(t)}return this},a.prototype.prepend=function(t){if(Array.isArray(t))for(var e=t.length-1;e>=0;e--)this.prepend(t[e]);else{if(!t[s]&&"string"!=typeof t)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+t);this.children.unshift(t)}return this},a.prototype.walk=function(t){for(var e,r=0,n=this.children.length;r<n;r++)(e=this.children[r])[s]?e.walk(t):""!==e&&t(e,{source:this.source,line:this.line,column:this.column,name:this.name})},a.prototype.join=function(t){var e,r,n=this.children.length;if(n>0){for(e=[],r=0;r<n-1;r++)e.push(this.children[r]),e.push(t);e.push(this.children[r]),this.children=e}return this},a.prototype.replaceRight=function(t,e){var r=this.children[this.children.length-1];return r[s]?r.replaceRight(t,e):"string"==typeof r?this.children[this.children.length-1]=r.replace(t,e):this.children.push("".replace(t,e)),this},a.prototype.setSourceContent=function(t,e){this.sourceContents[i.toSetString(t)]=e},a.prototype.walkSourceContents=function(t){for(var e=0,r=this.children.length;e<r;e++)this.children[e][s]&&this.children[e].walkSourceContents(t);var n=Object.keys(this.sourceContents);for(e=0,r=n.length;e<r;e++)t(i.fromSetString(n[e]),this.sourceContents[n[e]])},a.prototype.toString=function(){var t="";return this.walk((function(e){t+=e})),t},a.prototype.toStringWithSourceMap=function(t){var e={code:"",line:1,column:0},r=new n(t),i=!1,o=null,s=null,a=null,u=null;return this.walk((function(t,n){e.code+=t,null!==n.source&&null!==n.line&&null!==n.column?(o===n.source&&s===n.line&&a===n.column&&u===n.name||r.addMapping({source:n.source,original:{line:n.line,column:n.column},generated:{line:e.line,column:e.column},name:n.name}),o=n.source,s=n.line,a=n.column,u=n.name,i=!0):i&&(r.addMapping({generated:{line:e.line,column:e.column}}),o=null,i=!1);for(var c=0,f=t.length;c<f;c++)10===t.charCodeAt(c)?(e.line++,e.column=0,c+1===f?(o=null,i=!1):i&&r.addMapping({source:n.source,original:{line:n.line,column:n.column},generated:{line:e.line,column:e.column},name:n.name})):e.column++})),this.walkSourceContents((function(t,e){r.setSourceContent(t,e)})),{code:e.code,map:r}},r.SourceNode=a},{"./source-map-generator":205,"./util":207}],207:[function(t,e,r){r.getArg=function(t,e,r){if(e in t)return t[e];if(3===arguments.length)return r;throw new Error('"'+e+'" is a required argument.')};var n=/^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/,i=/^data:.+\,.+$/;function o(t){var e=t.match(n);return e?{scheme:e[1],auth:e[2],host:e[3],port:e[4],path:e[5]}:null}function s(t){var e="";return t.scheme&&(e+=t.scheme+":"),e+="//",t.auth&&(e+=t.auth+"@"),t.host&&(e+=t.host),t.port&&(e+=":"+t.port),t.path&&(e+=t.path),e}function a(t){var e=t,n=o(t);if(n){if(!n.path)return t;e=n.path}for(var i,a=r.isAbsolute(e),u=e.split(/\/+/),c=0,f=u.length-1;f>=0;f--)"."===(i=u[f])?u.splice(f,1):".."===i?c++:c>0&&(""===i?(u.splice(f+1,c),c=0):(u.splice(f,2),c--));return""===(e=u.join("/"))&&(e=a?"/":"."),n?(n.path=e,s(n)):e}function u(t,e){""===t&&(t="."),""===e&&(e=".");var r=o(e),n=o(t);if(n&&(t=n.path||"/"),r&&!r.scheme)return n&&(r.scheme=n.scheme),s(r);if(r||e.match(i))return e;if(n&&!n.host&&!n.path)return n.host=e,s(n);var u="/"===e.charAt(0)?e:a(t.replace(/\/+$/,"")+"/"+e);return n?(n.path=u,s(n)):u}r.urlParse=o,r.urlGenerate=s,r.normalize=a,r.join=u,r.isAbsolute=function(t){return"/"===t.charAt(0)||n.test(t)},r.relative=function(t,e){""===t&&(t="."),t=t.replace(/\/$/,"");for(var r=0;0!==e.indexOf(t+"/");){var n=t.lastIndexOf("/");if(n<0)return e;if((t=t.slice(0,n)).match(/^([^\/]+:\/)?\/*$/))return e;++r}return Array(r+1).join("../")+e.substr(t.length+1)};var c=!("__proto__"in Object.create(null));function f(t){return t}function h(t){if(!t)return!1;var e=t.length;if(e<9)return!1;if(95!==t.charCodeAt(e-1)||95!==t.charCodeAt(e-2)||111!==t.charCodeAt(e-3)||116!==t.charCodeAt(e-4)||111!==t.charCodeAt(e-5)||114!==t.charCodeAt(e-6)||112!==t.charCodeAt(e-7)||95!==t.charCodeAt(e-8)||95!==t.charCodeAt(e-9))return!1;for(var r=e-10;r>=0;r--)if(36!==t.charCodeAt(r))return!1;return!0}function l(t,e){return t===e?0:null===t?1:null===e?-1:t>e?1:-1}r.toSetString=c?f:function(t){return h(t)?"$"+t:t},r.fromSetString=c?f:function(t){return h(t)?t.slice(1):t},r.compareByOriginalPositions=function(t,e,r){var n=l(t.source,e.source);return 0!==n||0!=(n=t.originalLine-e.originalLine)||0!=(n=t.originalColumn-e.originalColumn)||r||0!=(n=t.generatedColumn-e.generatedColumn)||0!=(n=t.generatedLine-e.generatedLine)?n:l(t.name,e.name)},r.compareByGeneratedPositionsDeflated=function(t,e,r){var n=t.generatedLine-e.generatedLine;return 0!==n||0!=(n=t.generatedColumn-e.generatedColumn)||r||0!==(n=l(t.source,e.source))||0!=(n=t.originalLine-e.originalLine)||0!=(n=t.originalColumn-e.originalColumn)?n:l(t.name,e.name)},r.compareByGeneratedPositionsInflated=function(t,e){var r=t.generatedLine-e.generatedLine;return 0!==r||0!=(r=t.generatedColumn-e.generatedColumn)||0!==(r=l(t.source,e.source))||0!=(r=t.originalLine-e.originalLine)||0!=(r=t.originalColumn-e.originalColumn)?r:l(t.name,e.name)},r.parseSourceMapInput=function(t){return JSON.parse(t.replace(/^\)]}'[^\n]*\n/,""))},r.computeSourceURL=function(t,e,r){if(e=e||"",t&&("/"!==t[t.length-1]&&"/"!==e[0]&&(t+="/"),e=t+e),r){var n=o(r);if(!n)throw new Error("sourceMapURL could not be parsed");if(n.path){var i=n.path.lastIndexOf("/");i>=0&&(n.path=n.path.substring(0,i+1))}e=u(s(n),e)}return a(e)}},{}],208:[function(t,e,r){r.SourceMapGenerator=t("./lib/source-map-generator").SourceMapGenerator,r.SourceMapConsumer=t("./lib/source-map-consumer").SourceMapConsumer,r.SourceNode=t("./lib/source-node").SourceNode},{"./lib/source-map-consumer":204,"./lib/source-map-generator":205,"./lib/source-node":206}],209:[function(t,e,r){var n=t("punycode"),i=t("./util");function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}r.parse=w,r.resolve=function(t,e){return w(t,!1,!0).resolve(e)},r.resolveObject=function(t,e){return t?w(t,!1,!0).resolveObject(e):e},r.format=function(t){return i.isString(t)&&(t=w(t)),t instanceof o?t.format():o.prototype.format.call(t)},r.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,f=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),h=["'"].concat(f),l=["%","/","?",";","#"].concat(h),p=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,g=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,y={javascript:!0,"javascript:":!0},b={javascript:!0,"javascript:":!0},m={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=t("querystring");function w(t,e,r){if(t&&i.isObject(t)&&t instanceof o)return t;var n=new o;return n.parse(t,e,r),n}o.prototype.parse=function(t,e,r){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+c(t));var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",f=t.split(a);f[0]=f[0].replace(/\\/g,"/");var w=t=f.join(a);if(w=w.trim(),!r&&1===t.split("#").length){var _=u.exec(w);if(_)return this.path=w,this.href=w,this.pathname=_[1],_[2]?(this.search=_[2],this.query=e?v.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var A=s.exec(w);if(A){var E=(A=A[0]).toLowerCase();this.protocol=E,w=w.substr(A.length)}if(r||A||w.match(/^\/\/[^@\/]+@[^@\/]+/)){var S="//"===w.substr(0,2);!S||A&&b[A]||(w=w.substr(2),this.slashes=!0)}if(!b[A]&&(S||A&&!m[A])){for(var I,k,x=-1,M=0;M<p.length;M++)-1!==(C=w.indexOf(p[M]))&&(-1===x||C<x)&&(x=C);for(-1!==(k=-1===x?w.lastIndexOf("@"):w.lastIndexOf("@",x))&&(I=w.slice(0,k),w=w.slice(k+1),this.auth=decodeURIComponent(I)),x=-1,M=0;M<l.length;M++){var C;-1!==(C=w.indexOf(l[M]))&&(-1===x||C<x)&&(x=C)}-1===x&&(x=w.length),this.host=w.slice(0,x),w=w.slice(x),this.parseHost(),this.hostname=this.hostname||"";var T="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!T)for(var O=this.hostname.split(/\./),P=(M=0,O.length);M<P;M++){var B=O[M];if(B&&!B.match(d)){for(var R="",N=0,U=B.length;N<U;N++)B.charCodeAt(N)>127?R+="x":R+=B[N];if(!R.match(d)){var j=O.slice(0,M),L=O.slice(M+1),D=B.match(g);D&&(j.push(D[1]),L.unshift(D[2])),L.length&&(w="/"+L.join(".")+w),this.hostname=j.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),T||(this.hostname=n.toASCII(this.hostname));var F=this.port?":"+this.port:"",q=this.hostname||"";this.host=q+F,this.href+=this.host,T&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==w[0]&&(w="/"+w))}if(!y[E])for(M=0,P=h.length;M<P;M++){var H=h[M];if(-1!==w.indexOf(H)){var K=encodeURIComponent(H);K===H&&(K=escape(H)),w=w.split(H).join(K)}}var V=w.indexOf("#");-1!==V&&(this.hash=w.substr(V),w=w.slice(0,V));var G=w.indexOf("?");if(-1!==G?(this.search=w.substr(G),this.query=w.substr(G+1),e&&(this.query=v.parse(this.query)),w=w.slice(0,G)):e&&(this.search="",this.query={}),w&&(this.pathname=w),m[E]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){F=this.pathname||"";var z=this.search||"";this.path=F+z}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,s="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=v.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||m[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),e+o+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(t){return this.resolveObject(w(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(i.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),c=0;c<u.length;c++){var f=u[c];"protocol"!==f&&(r[f]=t[f])}return m[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!m[t.protocol]){for(var h=Object.keys(t),l=0;l<h.length;l++){var p=h[l];r[p]=t[p]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||b[t.protocol])r.pathname=t.pathname;else{for(var d=(t.pathname||"").split("/");d.length&&!(t.host=d.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var g=r.pathname||"",y=r.search||"";r.path=g+y}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),w=t.host||t.pathname&&"/"===t.pathname.charAt(0),_=w||v||r.host&&t.pathname,A=_,E=r.pathname&&r.pathname.split("/")||[],S=(d=t.pathname&&t.pathname.split("/")||[],r.protocol&&!m[r.protocol]);if(S&&(r.hostname="",r.port=null,r.host&&(""===E[0]?E[0]=r.host:E.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),_=_&&(""===d[0]||""===E[0])),w)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,E=d;else if(d.length)E||(E=[]),E.pop(),E=E.concat(d),r.search=t.search,r.query=t.query;else if(!i.isNullOrUndefined(t.search))return S&&(r.hostname=r.host=E.shift(),(C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift())),r.search=t.search,r.query=t.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var I=E.slice(-1)[0],k=(r.host||t.host||E.length>1)&&("."===I||".."===I)||""===I,x=0,M=E.length;M>=0;M--)"."===(I=E[M])?E.splice(M,1):".."===I?(E.splice(M,1),x++):x&&(E.splice(M,1),x--);if(!_&&!A)for(;x--;x)E.unshift("..");!_||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),k&&"/"!==E.join("/").substr(-1)&&E.push("");var C,T=""===E[0]||E[0]&&"/"===E[0].charAt(0);return S&&(r.hostname=r.host=T?"":E.length?E.shift():"",(C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift())),(_=_||r.host&&E.length)&&!T&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":210,punycode:194,querystring:197}],210:[function(t,e,r){e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"===c(t)&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],211:[function(t,e,r){var n=t("htmlparser2"),i=t("lodash/escapeRegExp"),o=t("lodash/cloneDeep"),s=t("lodash/mergeWith"),u=t("lodash/isString"),c=t("lodash/isPlainObject"),f=t("parse-srcset"),h=t("postcss"),l=t("url"),p=["img","audio","video","picture","svg","object","map","iframe","embed"],d=["script","style"];function g(t,e){t&&Object.keys(t).forEach((function(r){e(t[r],r)}))}function y(t,e){return{}.hasOwnProperty.call(t,e)}function b(t,e){var r=[];return g(t,(function(t){e(t)&&r.push(t)})),r}e.exports=v;var m=/^[^\0\t\n\f\r /<=>]+$/;function v(t,e,r){var _="",A="";function E(t,e){var r=this;this.tag=t,this.attribs=e||{},this.tagPosition=_.length,this.text="",this.mediaChildren=[],this.updateParentNodeText=function(){T.length&&(T[T.length-1].text+=r.text)},this.updateParentNodeMediaChildren=function(){T.length&&p.indexOf(this.tag)>-1&&T[T.length-1].mediaChildren.push(this.tag)}}e?(e=Object.assign({},v.defaults,e)).parser?e.parser=Object.assign({},w,e.parser):e.parser=w:(e=v.defaults).parser=w,d.forEach((function(t){e.allowedTags&&e.allowedTags.indexOf(t)>-1&&!e.allowVulnerableTags&&console.warn("\n\n⚠️ Your `allowedTags` option includes, `".concat(t,"`, which is inherently\nvulnerable to XSS attacks. Please remove it from `allowedTags`.\nOr, to disable this warning, add the `allowVulnerableTags` option\nand ensure you are accounting for this risk.\n\n"))}));var S,I,k=e.nonTextTags||["script","style","textarea","option"];e.allowedAttributes&&(S={},I={},g(e.allowedAttributes,(function(t,e){S[e]=[];var r=[];t.forEach((function(t){u(t)&&t.indexOf("*")>=0?r.push(i(t).replace(/\\\*/g,".*")):S[e].push(t)})),I[e]=new RegExp("^("+r.join("|")+")$")})));var x={};g(e.allowedClasses,(function(t,e){S&&(y(S,e)||(S[e]=[]),S[e].push("class")),x[e]=t}));var M,C,T,O,P,B,R,N={};g(e.transformTags,(function(t,e){var r;"function"==typeof t?r=t:"string"==typeof t&&(r=v.simpleTransform(t)),"*"===e?M=r:N[e]=r}));var U=!1;L();var j=new n.Parser({onopentag:function(t,r){if(e.enforceHtmlBoundary&&"html"===t&&L(),B)R++;else{var n=new E(t,r);T.push(n);var i,u=!1,p=!!n.text;if(y(N,t)&&(i=N[t](t,r),n.attribs=r=i.attribs,void 0!==i.text&&(n.innerText=i.text),t!==i.tagName&&(n.name=t=i.tagName,P[C]=i.tagName)),M&&(i=M(t,r),n.attribs=r=i.attribs,t!==i.tagName&&(n.name=t=i.tagName,P[C]=i.tagName)),(e.allowedTags&&-1===e.allowedTags.indexOf(t)||"recursiveEscape"===e.disallowedTagsMode&&!function(t){for(var e in t)if(y(t,e))return!1;return!0}(O))&&(u=!0,O[C]=!0,"discard"===e.disallowedTagsMode&&-1!==k.indexOf(t)&&(B=!0,R=1),O[C]=!0),C++,u){if("discard"===e.disallowedTagsMode)return;A=_,_=""}_+="<"+t,(!S||y(S,t)||S["*"])&&g(r,(function(r,i){if(m.test(i)){var u,p=!1;if(!S||y(S,t)&&-1!==S[t].indexOf(i)||S["*"]&&-1!==S["*"].indexOf(i)||y(I,t)&&I[t].test(i)||I["*"]&&I["*"].test(i))p=!0;else if(S&&S[t]){var d,v=a(S[t]);try{for(v.s();!(d=v.n()).done;){var w=d.value;if(c(w)&&w.name&&w.name===i){p=!0;var A="";if(!0===w.multiple){var E,k=a(r.split(" "));try{for(k.s();!(E=k.n()).done;){var M=E.value;-1!==w.values.indexOf(M)&&(""===A?A=M:A+=" "+M)}}catch(t){k.e(t)}finally{k.f()}}else w.values.indexOf(r)>=0&&(A=r);r=A}}}catch(t){v.e(t)}finally{v.f()}}if(p){if(-1!==e.allowedSchemesAppliedToAttributes.indexOf(i)&&F(t,r))return void delete n.attribs[i];if("iframe"===t&&"src"===i){var C=!0;try{if((u=l.parse(r,!1,!0))&&null===u.host&&null===u.protocol)C=y(e,"allowIframeRelativeUrls")?e.allowIframeRelativeUrls:!e.allowedIframeHostnames&&!e.allowedIframeDomains;else if(e.allowedIframeHostnames||e.allowedIframeDomains){var T=(e.allowedIframeHostnames||[]).find((function(t){return t===u.hostname})),O=(e.allowedIframeDomains||[]).find((function(t){return u.hostname===t||u.hostname.endsWith(".".concat(t))}));C=T||O}}catch(t){C=!1}if(!C)return void delete n.attribs[i]}if("srcset"===i)try{if(g(u=f(r),(function(t){F("srcset",t.url)&&(t.evil=!0)})),!(u=b(u,(function(t){return!t.evil}))).length)return void delete n.attribs[i];r=b(u,(function(t){return!t.evil})).map((function(t){if(!t.url)throw new Error("URL missing");return t.url+(t.w?" ".concat(t.w,"w"):"")+(t.h?" ".concat(t.h,"h"):"")+(t.d?" ".concat(t.d,"x"):"")})).join(", "),n.attribs[i]=r}catch(t){return void delete n.attribs[i]}if("class"===i&&(r=function(t,e){return e?(t=t.split(/\s+/)).filter((function(t){return-1!==e.indexOf(t)})).join(" "):t}(r,x[t]),!r.length))return void delete n.attribs[i];if("style"===i)try{if(r=function(t){return t.nodes[0].nodes.reduce((function(t,e){return t.push(e.prop+":"+e.value),t}),[]).join(";")}(function(t,e){if(!e)return t;var r,n=o(t),i=t.nodes[0];return(r=e[i.selector]&&e["*"]?s(o(e[i.selector]),e["*"],(function(t,e){if(Array.isArray(t))return t.concat(e)})):e[i.selector]||e["*"])&&(n.nodes[0].nodes=i.nodes.reduce(function(t){return function(e,r){return y(t,r.prop)&&t[r.prop].some((function(t){return t.test(r.value)}))&&e.push(r),e}}(r),[])),n}(h.parse(t+" {"+r+"}"),e.allowedStyles)),0===r.length)return void delete n.attribs[i]}catch(t){return void delete n.attribs[i]}_+=" "+i,r&&r.length&&(_+='="'+D(r,!0)+'"')}else delete n.attribs[i]}else delete n.attribs[i]})),-1!==e.selfClosing.indexOf(t)?_+=" />":(_+=">",!n.innerText||p||e.textFilter||(_+=n.innerText,U=!0)),u&&(_=A+D(_),A="")}},ontext:function(t){if(!B){var r,n=T[T.length-1];if(n&&(r=n.tag,t=void 0!==n.innerText?n.innerText:t),"discard"!==e.disallowedTagsMode||"script"!==r&&"style"!==r){var i=D(t,!1);e.textFilter&&!U?_+=e.textFilter(i,r):U||(_+=i)}else _+=t;T.length&&(T[T.length-1].text+=t)}},onclosetag:function(t){if(B){if(--R)return;B=!1}var r=T.pop();if(r){B=!!e.enforceHtmlBoundary&&"html"===t,C--;var n=O[C];if(n){if(delete O[C],"discard"===e.disallowedTagsMode)return void r.updateParentNodeText();A=_,_=""}P[C]&&(t=P[C],delete P[C]),e.exclusiveFilter&&e.exclusiveFilter(r)?_=_.substr(0,r.tagPosition):(r.updateParentNodeMediaChildren(),r.updateParentNodeText(),-1===e.selfClosing.indexOf(t)?(_+="</"+t+">",n&&(_=A+D(_),A="")):n&&(_=A,A=""))}}},e.parser);return j.write(t),j.end(),_;function L(){_="",C=0,T=[],O={},P={},B=!1,R=0}function D(t,r){return"string"!=typeof t&&(t+=""),e.parser.decodeEntities&&(t=t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\>/g,"&gt;"),r&&(t=t.replace(/\"/g,"&quot;"))),t=t.replace(/&(?![a-zA-Z0-9#]{1,20};)/g,"&amp;").replace(/</g,"&lt;").replace(/\>/g,"&gt;"),r&&(t=t.replace(/\"/g,"&quot;")),t}function F(t,r){var n=(r=(r=r.replace(/[\x00-\x20]+/g,"")).replace(/<\!\-\-.*?\-\-\>/g,"")).match(/^([a-zA-Z]+)\:/);if(!n)return!!r.match(/^[\/\\]{2}/)&&!e.allowProtocolRelative;var i=n[1].toLowerCase();return y(e.allowedSchemesByTag,t)?-1===e.allowedSchemesByTag[t].indexOf(i):!e.allowedSchemes||-1===e.allowedSchemes.indexOf(i)}}var w={decodeEntities:!0};v.defaults={allowedTags:["h3","h4","h5","h6","blockquote","p","a","ul","ol","nl","li","b","i","strong","em","strike","abbr","code","hr","br","div","table","thead","caption","tbody","tr","th","td","pre","iframe"],disallowedTagsMode:"discard",allowedAttributes:{a:["href","name","target"],img:["src"]},selfClosing:["img","br","hr","area","base","basefont","input","link","meta"],allowedSchemes:["http","https","ftp","mailto"],allowedSchemesByTag:{},allowedSchemesAppliedToAttributes:["href","src","cite"],allowProtocolRelative:!0,enforceHtmlBoundary:!1},v.simpleTransform=function(t,e,r){return r=void 0===r||r,e=e||{},function(n,i){var o;if(r)for(o in e)i[o]=e[o];else i=e;return{tagName:t,attribs:i}}}},{htmlparser2:31,"lodash/cloneDeep":140,"lodash/escapeRegExp":143,"lodash/isPlainObject":155,"lodash/isString":157,"lodash/mergeWith":162,"parse-srcset":167,postcss:181,url:209}]},{},[211])(211)},"object"===c(e)?t.exports=s():(i=[],void 0===(o="function"==typeof(n=s)?n.apply(e,i):n)||(t.exports=o))},7637:(t,e,r)=>{t.exports=r(5880)(r(9930))},9930:(t,e,r)=>{const n=new(0,r(7554).ec)("secp256k1"),i=n.curve,o=i.n.constructor;function s(t){const e=t[0];switch(e){case 2:case 3:return 33!==t.length?null:function(t,e){let r=new o(e);if(r.cmp(i.p)>=0)return null;r=r.toRed(i.red);let s=r.redSqr().redIMul(r).redIAdd(i.b).redSqrt();return 3===t!==s.isOdd()&&(s=s.redNeg()),n.keyPair({pub:{x:r,y:s}})}(e,t.subarray(1,33));case 4:case 6:case 7:return 65!==t.length?null:function(t,e,r){let s=new o(e),a=new o(r);if(s.cmp(i.p)>=0||a.cmp(i.p)>=0)return null;if(s=s.toRed(i.red),a=a.toRed(i.red),(6===t||7===t)&&a.isOdd()!==(7===t))return null;const u=s.redSqr().redIMul(s);return a.redSqr().redISub(u.redIAdd(i.b)).isZero()?n.keyPair({pub:{x:s,y:a}}):null}(e,t.subarray(1,33),t.subarray(33,65));default:return null}}function a(t,e){const r=e.encode(null,33===t.length);for(let e=0;e<t.length;++e)t[e]=r[e]}t.exports={contextRandomize:()=>0,privateKeyVerify(t){const e=new o(t);return e.cmp(i.n)<0&&!e.isZero()?0:1},privateKeyNegate(t){const e=new o(t),r=i.n.sub(e).umod(i.n).toArrayLike(Uint8Array,"be",32);return t.set(r),0},privateKeyTweakAdd(t,e){const r=new o(e);if(r.cmp(i.n)>=0)return 1;if(r.iadd(new o(t)),r.cmp(i.n)>=0&&r.isub(i.n),r.isZero())return 1;const n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},privateKeyTweakMul(t,e){let r=new o(e);if(r.cmp(i.n)>=0||r.isZero())return 1;r.imul(new o(t)),r.cmp(i.n)>=0&&(r=r.umod(i.n));const n=r.toArrayLike(Uint8Array,"be",32);return t.set(n),0},publicKeyVerify:t=>null===s(t)?1:0,publicKeyCreate(t,e){const r=new o(e);return r.cmp(i.n)>=0||r.isZero()?1:(a(t,n.keyFromPrivate(e).getPublic()),0)},publicKeyConvert(t,e){const r=s(e);return null===r?1:(a(t,r.getPublic()),0)},publicKeyNegate(t,e){const r=s(e);if(null===r)return 1;const n=r.getPublic();return n.y=n.y.redNeg(),a(t,n),0},publicKeyCombine(t,e){const r=new Array(e.length);for(let t=0;t<e.length;++t)if(r[t]=s(e[t]),null===r[t])return 1;let n=r[0].getPublic();for(let t=1;t<r.length;++t)n=n.add(r[t].pub);return n.isInfinity()?2:(a(t,n),0)},publicKeyTweakAdd(t,e,r){const n=s(e);if(null===n)return 1;if((r=new o(r)).cmp(i.n)>=0)return 2;const u=n.getPublic().add(i.g.mul(r));return u.isInfinity()?2:(a(t,u),0)},publicKeyTweakMul(t,e,r){const n=s(e);return null===n?1:(r=new o(r)).cmp(i.n)>=0||r.isZero()?2:(a(t,n.getPublic().mul(r)),0)},signatureNormalize(t){const e=new o(t.subarray(0,32)),r=new o(t.subarray(32,64));return e.cmp(i.n)>=0||r.cmp(i.n)>=0?1:(1===r.cmp(n.nh)&&t.set(i.n.sub(r).toArrayLike(Uint8Array,"be",32),32),0)},signatureExport(t,e){const r=e.subarray(0,32),n=e.subarray(32,64);if(new o(r).cmp(i.n)>=0)return 1;if(new o(n).cmp(i.n)>=0)return 1;const{output:s}=t;let a=s.subarray(4,37);a[0]=0,a.set(r,1);let u=33,c=0;for(;u>1&&0===a[c]&&!(128&a[c+1]);--u,++c);if(a=a.subarray(c),128&a[0])return 1;if(u>1&&0===a[0]&&!(128&a[1]))return 1;let f=s.subarray(39,72);f[0]=0,f.set(n,1);let h=33,l=0;for(;h>1&&0===f[l]&&!(128&f[l+1]);--h,++l);return f=f.subarray(l),128&f[0]||h>1&&0===f[0]&&!(128&f[1])?1:(t.outputlen=6+u+h,s[0]=48,s[1]=t.outputlen-2,s[2]=2,s[3]=a.length,s.set(a,4),s[4+u]=2,s[5+u]=f.length,s.set(f,6+u),0)},signatureImport(t,e){if(e.length<8)return 1;if(e.length>72)return 1;if(48!==e[0])return 1;if(e[1]!==e.length-2)return 1;if(2!==e[2])return 1;const r=e[3];if(0===r)return 1;if(5+r>=e.length)return 1;if(2!==e[4+r])return 1;const n=e[5+r];if(0===n)return 1;if(6+r+n!==e.length)return 1;if(128&e[4])return 1;if(r>1&&0===e[4]&&!(128&e[5]))return 1;if(128&e[r+6])return 1;if(n>1&&0===e[r+6]&&!(128&e[r+7]))return 1;let s=e.subarray(4,4+r);if(33===s.length&&0===s[0]&&(s=s.subarray(1)),s.length>32)return 1;let a=e.subarray(6+r);if(33===a.length&&0===a[0]&&(a=a.slice(1)),a.length>32)throw new Error("S length is too long");let u=new o(s);u.cmp(i.n)>=0&&(u=new o(0));let c=new o(e.subarray(6+r));return c.cmp(i.n)>=0&&(c=new o(0)),t.set(u.toArrayLike(Uint8Array,"be",32),0),t.set(c.toArrayLike(Uint8Array,"be",32),32),0},ecdsaSign(t,e,r,s,a){if(a){const t=a;a=n=>{const i=t(e,r,null,s,n);if(!(i instanceof Uint8Array&&32===i.length))throw new Error("This is the way");return new o(i)}}const u=new o(r);if(u.cmp(i.n)>=0||u.isZero())return 1;let c;try{c=n.sign(e,r,{canonical:!0,k:a,pers:s})}catch(t){return 1}return t.signature.set(c.r.toArrayLike(Uint8Array,"be",32),0),t.signature.set(c.s.toArrayLike(Uint8Array,"be",32),32),t.recid=c.recoveryParam,0},ecdsaVerify(t,e,r){const a={r:t.subarray(0,32),s:t.subarray(32,64)},u=new o(a.r),c=new o(a.s);if(u.cmp(i.n)>=0||c.cmp(i.n)>=0)return 1;if(1===c.cmp(n.nh)||u.isZero()||c.isZero())return 3;const f=s(r);if(null===f)return 2;const h=f.getPublic();return n.verify(e,a,h)?0:3},ecdsaRecover(t,e,r,s){const u={r:e.slice(0,32),s:e.slice(32,64)},c=new o(u.r),f=new o(u.s);if(c.cmp(i.n)>=0||f.cmp(i.n)>=0)return 1;if(c.isZero()||f.isZero())return 2;let h;try{h=n.recoverPubKey(s,u,r)}catch(t){return 2}return a(t,h),0},ecdh(t,e,r,a,u,c,f){const h=s(e);if(null===h)return 1;const l=new o(r);if(l.cmp(i.n)>=0||l.isZero())return 2;const p=h.getPublic().mul(l);if(void 0===u){const e=p.encode(null,!0),r=n.hash().update(e).digest();for(let e=0;e<32;++e)t[e]=r[e]}else{c||(c=new Uint8Array(32));const e=p.getX().toArray("be",32);for(let t=0;t<32;++t)c[t]=e[t];f||(f=new Uint8Array(32));const r=p.getY().toArray("be",32);for(let t=0;t<32;++t)f[t]=r[t];const n=u(c,f,a);if(!(n instanceof Uint8Array&&n.length===t.length))return 2;t.set(n)}return 0}}},5880:t=>{const e="Impossible case. Please create issue.",r="The tweak was out of range or the resulted private key is invalid",n="The tweak was out of range or equal to zero",i="Public Key could not be parsed",o="Public Key serialization error",s="Signature could not be parsed";function a(t,e){if(!t)throw new Error(e)}function u(t,e,r){if(a(e instanceof Uint8Array,`Expected ${t} to be an Uint8Array`),void 0!==r)if(Array.isArray(r)){const n=`Expected ${t} to be an Uint8Array with length [${r.join(", ")}]`;a(r.includes(e.length),n)}else{const n=`Expected ${t} to be an Uint8Array with length ${r}`;a(e.length===r,n)}}function c(t){a("Boolean"===h(t),"Expected compressed to be a Boolean")}function f(t=(t=>new Uint8Array(t)),e){return"function"==typeof t&&(t=t(e)),u("output",t,e),t}function h(t){return Object.prototype.toString.call(t).slice(8,-1)}t.exports=t=>({contextRandomize(e){if(a(null===e||e instanceof Uint8Array,"Expected seed to be an Uint8Array or null"),null!==e&&u("seed",e,32),1===t.contextRandomize(e))throw new Error("Unknow error on context randomization")},privateKeyVerify:e=>(u("private key",e,32),0===t.privateKeyVerify(e)),privateKeyNegate(r){switch(u("private key",r,32),t.privateKeyNegate(r)){case 0:return r;case 1:throw new Error(e)}},privateKeyTweakAdd(e,n){switch(u("private key",e,32),u("tweak",n,32),t.privateKeyTweakAdd(e,n)){case 0:return e;case 1:throw new Error(r)}},privateKeyTweakMul(e,r){switch(u("private key",e,32),u("tweak",r,32),t.privateKeyTweakMul(e,r)){case 0:return e;case 1:throw new Error(n)}},publicKeyVerify:e=>(u("public key",e,[33,65]),0===t.publicKeyVerify(e)),publicKeyCreate(e,r=!0,n){switch(u("private key",e,32),c(r),n=f(n,r?33:65),t.publicKeyCreate(n,e)){case 0:return n;case 1:throw new Error("Private Key is invalid");case 2:throw new Error(o)}},publicKeyConvert(e,r=!0,n){switch(u("public key",e,[33,65]),c(r),n=f(n,r?33:65),t.publicKeyConvert(n,e)){case 0:return n;case 1:throw new Error(i);case 2:throw new Error(o)}},publicKeyNegate(r,n=!0,s){switch(u("public key",r,[33,65]),c(n),s=f(s,n?33:65),t.publicKeyNegate(s,r)){case 0:return s;case 1:throw new Error(i);case 2:throw new Error(e);case 3:throw new Error(o)}},publicKeyCombine(e,r=!0,n){a(Array.isArray(e),"Expected public keys to be an Array"),a(e.length>0,"Expected public keys array will have more than zero items");for(const t of e)u("public key",t,[33,65]);switch(c(r),n=f(n,r?33:65),t.publicKeyCombine(n,e)){case 0:return n;case 1:throw new Error(i);case 2:throw new Error("The sum of the public keys is not valid");case 3:throw new Error(o)}},publicKeyTweakAdd(e,n,o=!0,s){switch(u("public key",e,[33,65]),u("tweak",n,32),c(o),s=f(s,o?33:65),t.publicKeyTweakAdd(s,e,n)){case 0:return s;case 1:throw new Error(i);case 2:throw new Error(r)}},publicKeyTweakMul(e,r,o=!0,s){switch(u("public key",e,[33,65]),u("tweak",r,32),c(o),s=f(s,o?33:65),t.publicKeyTweakMul(s,e,r)){case 0:return s;case 1:throw new Error(i);case 2:throw new Error(n)}},signatureNormalize(e){switch(u("signature",e,64),t.signatureNormalize(e)){case 0:return e;case 1:throw new Error(s)}},signatureExport(r,n){u("signature",r,64);const i={output:n=f(n,72),outputlen:72};switch(t.signatureExport(i,r)){case 0:return n.slice(0,i.outputlen);case 1:throw new Error(s);case 2:throw new Error(e)}},signatureImport(r,n){switch(u("signature",r),n=f(n,64),t.signatureImport(n,r)){case 0:return n;case 1:throw new Error(s);case 2:throw new Error(e)}},ecdsaSign(r,n,i={},o){u("message",r,32),u("private key",n,32),a("Object"===h(i),"Expected options to be an Object"),void 0!==i.data&&u("options.data",i.data),void 0!==i.noncefn&&a("Function"===h(i.noncefn),"Expected options.noncefn to be a Function");const s={signature:o=f(o,64),recid:null};switch(t.ecdsaSign(s,r,n,i.data,i.noncefn)){case 0:return s;case 1:throw new Error("The nonce generation function failed, or the private key was invalid");case 2:throw new Error(e)}},ecdsaVerify(e,r,n){switch(u("signature",e,64),u("message",r,32),u("public key",n,[33,65]),t.ecdsaVerify(e,r,n)){case 0:return!0;case 3:return!1;case 1:throw new Error(s);case 2:throw new Error(i)}},ecdsaRecover(r,n,i,o=!0,l){switch(u("signature",r,64),a("Number"===h(n)&&n>=0&&n<=3,"Expected recovery id to be a Number within interval [0, 3]"),u("message",i,32),c(o),l=f(l,o?33:65),t.ecdsaRecover(l,r,n,i)){case 0:return l;case 1:throw new Error(s);case 2:throw new Error("Public key could not be recover");case 3:throw new Error(e)}},ecdh(e,r,n={},o){switch(u("public key",e,[33,65]),u("private key",r,32),a("Object"===h(n),"Expected options to be an Object"),void 0!==n.data&&u("options.data",n.data),void 0!==n.hashfn?(a("Function"===h(n.hashfn),"Expected options.hashfn to be a Function"),void 0!==n.xbuf&&u("options.xbuf",n.xbuf,32),void 0!==n.ybuf&&u("options.ybuf",n.ybuf,32),u("output",o)):o=f(o,32),t.ecdh(o,e,r,n.data,n.hashfn,n.xbuf,n.ybuf)){case 0:return o;case 1:throw new Error(i);case 2:throw new Error("Scalar was invalid (zero or overflow)")}}})},3327:(t,e,r)=>{var n=r(7834).Buffer;function i(t,e){this._block=n.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}i.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=n.from(t,e));for(var r=this._block,i=this._blockSize,o=t.length,s=this._len,a=0;a<o;){for(var u=s%i,c=Math.min(o-a,i-u),f=0;f<c;f++)r[u+f]=t[a+f];a+=c,(s+=c)%i==0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(t){var e=this._len%this._blockSize;this._block[e]=128,this._block.fill(0,e+1),e>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},t.exports=i},9065:(t,e,r)=>{var n=t.exports=function(t){t=t.toLowerCase();var e=n[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};n.sha=r(8820),n.sha1=r(7885),n.sha224=r(8321),n.sha256=r(4424),n.sha384=r(213),n.sha512=r(5596)},8820:(t,e,r)=>{var n=r(1285),i=r(3327),o=r(7834).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t){return t<<30|t>>>2}function f(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=t.readInt32BE(4*h);for(;h<80;++h)r[h]=r[h-3]^r[h-8]^r[h-14]^r[h-16];for(var l=0;l<80;++l){var p=~~(l/20),d=0|((e=n)<<5|e>>>27)+f(p,i,o,a)+u+r[l]+s[p];u=a,a=o,o=c(i),i=n,n=d}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},7885:(t,e,r)=>{var n=r(1285),i=r(3327),o=r(7834).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t){return t<<5|t>>>27}function f(t){return t<<30|t>>>2}function h(t,e,r,n){return 0===t?e&r|~e&n:2===t?e&r|e&n|r&n:e^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<80;++l)r[l]=(e=r[l-3]^r[l-8]^r[l-14]^r[l-16])<<1|e>>>31;for(var p=0;p<80;++p){var d=~~(p/20),g=c(n)+h(d,i,o,a)+u+r[p]+s[d]|0;u=a,a=o,o=f(i),i=n,n=g}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var t=o.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t},t.exports=u},8321:(t,e,r)=>{var n=r(1285),i=r(4424),o=r(3327),s=r(7834).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t},t.exports=u},4424:(t,e,r)=>{var n=r(1285),i=r(3327),o=r(7834).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function h(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function l(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function p(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(t){for(var e,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,d=0|this._f,g=0|this._g,y=0|this._h,b=0;b<16;++b)r[b]=t.readInt32BE(4*b);for(;b<64;++b)r[b]=0|(((e=r[b-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[b-7]+p(r[b-15])+r[b-16];for(var m=0;m<64;++m){var v=y+l(u)+c(u,d,g)+s[m]+r[m]|0,w=h(n)+f(n,i,o)|0;y=g,g=d,d=u,u=a+v|0,a=o,o=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=d+this._f|0,this._g=g+this._g|0,this._h=y+this._h|0},u.prototype._hash=function(){var t=o.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t},t.exports=u},213:(t,e,r)=>{var n=r(1285),i=r(5596),o=r(3327),s=r(7834).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var t=s.allocUnsafe(48);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t},t.exports=u},5596:(t,e,r)=>{var n=r(1285),i=r(3327),o=r(7834).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function c(t,e,r){return r^t&(e^r)}function f(t,e,r){return t&e|r&(t|e)}function h(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function l(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function p(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function d(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function g(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function y(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function b(t,e){return t>>>0<e>>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(t){for(var e=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,m=0|this._gh,v=0|this._hh,w=0|this._al,_=0|this._bl,A=0|this._cl,E=0|this._dl,S=0|this._el,I=0|this._fl,k=0|this._gl,x=0|this._hl,M=0;M<32;M+=2)e[M]=t.readInt32BE(4*M),e[M+1]=t.readInt32BE(4*M+4);for(;M<160;M+=2){var C=e[M-30],T=e[M-30+1],O=p(C,T),P=d(T,C),B=g(C=e[M-4],T=e[M-4+1]),R=y(T,C),N=e[M-14],U=e[M-14+1],j=e[M-32],L=e[M-32+1],D=P+U|0,F=O+N+b(D,P)|0;F=(F=F+B+b(D=D+R|0,R)|0)+j+b(D=D+L|0,L)|0,e[M]=F,e[M+1]=D}for(var q=0;q<160;q+=2){F=e[q],D=e[q+1];var H=f(r,n,i),K=f(w,_,A),V=h(r,w),G=h(w,r),z=l(a,S),W=l(S,a),Q=s[q],Y=s[q+1],X=c(a,u,m),$=c(S,I,k),Z=x+W|0,J=v+z+b(Z,x)|0;J=(J=(J=J+X+b(Z=Z+$|0,$)|0)+Q+b(Z=Z+Y|0,Y)|0)+F+b(Z=Z+D|0,D)|0;var tt=G+K|0,et=V+H+b(tt,G)|0;v=m,x=k,m=u,k=I,u=a,I=S,a=o+J+b(S=E+Z|0,E)|0,o=i,E=A,i=n,A=_,n=r,_=w,r=J+et+b(w=Z+tt|0,Z)|0}this._al=this._al+w|0,this._bl=this._bl+_|0,this._cl=this._cl+A|0,this._dl=this._dl+E|0,this._el=this._el+S|0,this._fl=this._fl+I|0,this._gl=this._gl+k|0,this._hl=this._hl+x|0,this._ah=this._ah+r+b(this._al,w)|0,this._bh=this._bh+n+b(this._bl,_)|0,this._ch=this._ch+i+b(this._cl,A)|0,this._dh=this._dh+o+b(this._dl,E)|0,this._eh=this._eh+a+b(this._el,S)|0,this._fh=this._fh+u+b(this._fl,I)|0,this._gh=this._gh+m+b(this._gl,k)|0,this._hh=this._hh+v+b(this._hl,x)|0},u.prototype._hash=function(){var t=o.allocUnsafe(64);function e(e,r,n){t.writeInt32BE(e,n),t.writeInt32BE(r,n+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t},t.exports=u},4851:(t,e,r)=>{t.exports=i;var n=r(2699).EventEmitter;function i(){n.call(this)}r(1285)(i,n),i.Readable=r(7525),i.Writable=r(4007),i.Duplex=r(5846),i.Transform=r(4971),i.PassThrough=r(7250),i.Stream=i,i.prototype.pipe=function(t,e){var r=this;function i(e){t.writable&&!1===t.write(e)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),t.on("drain",o),t._isStdio||e&&!1===e.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,t.end())}function u(){s||(s=!0,"function"==typeof t.destroy&&t.destroy())}function c(t){if(f(),0===n.listenerCount(this,"error"))throw t}function f(){r.removeListener("data",i),t.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),t.removeListener("error",c),r.removeListener("end",f),r.removeListener("close",f),t.removeListener("close",f)}return r.on("error",c),t.on("error",c),r.on("end",f),r.on("close",f),t.on("close",f),t.emit("pipe",r),t}},3974:(t,e,r)=>{var n=r(8834).Buffer,i=n.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},o=e.s=function(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!i(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=a;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=u;break;default:return void(this.write=s)}this.charBuffer=new n(6),this.charReceived=0,this.charLength=0};function s(t){return t.toString(this.encoding)}function a(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function u(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}o.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived<this.charLength)return"";if(t=t.slice(r,t.length),!((n=(e=this.charBuffer.slice(0,this.charLength).toString(this.encoding)).charCodeAt(e.length-1))>=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var n,i=t.length;if(this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived),i=(e+=t.toString(this.encoding,0,i)).length-1,(n=e.charCodeAt(i))>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},o.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},o.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,n=this.charBuffer,i=this.encoding;e+=n.slice(0,r).toString(i)}return e}},9826:(t,e,r)=>{var n=r(8320);t.exports=function(t){return"string"!=typeof t?t:n(t)?t.slice(2):t}},6545:t=>{function e(){this._defaults=[]}["use","on","once","set","query","type","accept","auth","withCredentials","sortQuery","retry","ok","redirects","timeout","buffer","serialize","parse","ca","key","pfx","cert"].forEach((function(t){e.prototype[t]=function(){return this._defaults.push({fn:t,arguments}),this}})),e.prototype._setDefaults=function(t){this._defaults.forEach((function(e){t[e.fn].apply(t,e.arguments)}))},t.exports=e},139:function(t,e,r){var n;"undefined"!=typeof window?n=window:"undefined"!=typeof self?n=self:(console.warn("Using browser-only version of superagent in non-browser environment"),n=this);var i=r(7582),o=r(2474),s=r(3354),a=r(9228),u=r(6545);function c(){}var f=e=t.exports=function(t,r){return"function"==typeof r?new e.Request("GET",t).end(r):1==arguments.length?new e.Request("GET",t):new e.Request(t,r)};e.Request=b,f.getXHR=function(){if(!(!n.XMLHttpRequest||n.location&&"file:"==n.location.protocol&&n.ActiveXObject))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(t){}try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(t){}throw Error("Browser-only version of superagent could not find XHR")};var h="".trim?function(t){return t.trim()}:function(t){return t.replace(/(^\s*|\s*$)/g,"")};function l(t){if(!s(t))return t;var e=[];for(var r in t)p(e,r,t[r]);return e.join("&")}function p(t,e,r){if(null!=r)if(Array.isArray(r))r.forEach((function(r){p(t,e,r)}));else if(s(r))for(var n in r)p(t,e+"["+n+"]",r[n]);else t.push(encodeURIComponent(e)+"="+encodeURIComponent(r));else null===r&&t.push(encodeURIComponent(e))}function d(t){for(var e,r,n={},i=t.split("&"),o=0,s=i.length;o<s;++o)-1==(r=(e=i[o]).indexOf("="))?n[decodeURIComponent(e)]="":n[decodeURIComponent(e.slice(0,r))]=decodeURIComponent(e.slice(r+1));return n}function g(t){return/[\/+]json($|[^-\w])/.test(t)}function y(t){this.req=t,this.xhr=this.req.xhr,this.text="HEAD"!=this.req.method&&(""===this.xhr.responseType||"text"===this.xhr.responseType)||void 0===this.xhr.responseType?this.xhr.responseText:null,this.statusText=this.req.xhr.statusText;var e=this.xhr.status;1223===e&&(e=204),this._setStatusProperties(e),this.header=this.headers=function(t){for(var e,r,n,i,o=t.split(/\r?\n/),s={},a=0,u=o.length;a<u;++a)-1!==(e=(r=o[a]).indexOf(":"))&&(n=r.slice(0,e).toLowerCase(),i=h(r.slice(e+1)),s[n]=i);return s}(this.xhr.getAllResponseHeaders()),this.header["content-type"]=this.xhr.getResponseHeader("content-type"),this._setHeaderProperties(this.header),null===this.text&&t._responseType?this.body=this.xhr.response:this.body="HEAD"!=this.req.method?this._parseBody(this.text?this.text:this.xhr.response):null}function b(t,e){var r=this;this._query=this._query||[],this.method=t,this.url=e,this.header={},this._header={},this.on("end",(function(){var t,e=null,n=null;try{n=new y(r)}catch(t){return(e=new Error("Parser is unable to parse the response")).parse=!0,e.original=t,r.xhr?(e.rawResponse=void 0===r.xhr.responseType?r.xhr.responseText:r.xhr.response,e.status=r.xhr.status?r.xhr.status:null,e.statusCode=e.status):(e.rawResponse=null,e.status=null),r.callback(e)}r.emit("response",n);try{r._isResponseOK(n)||(t=new Error(n.statusText||"Unsuccessful HTTP response"))}catch(e){t=e}t?(t.original=e,t.response=n,t.status=n.status,r.callback(t,n)):r.callback(null,n)}))}function m(t,e,r){var n=f("DELETE",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n}f.serializeObject=l,f.parseString=d,f.types={html:"text/html",json:"application/json",xml:"text/xml",urlencoded:"application/x-www-form-urlencoded",form:"application/x-www-form-urlencoded","form-data":"application/x-www-form-urlencoded"},f.serialize={"application/x-www-form-urlencoded":l,"application/json":JSON.stringify},f.parse={"application/x-www-form-urlencoded":d,"application/json":JSON.parse},a(y.prototype),y.prototype._parseBody=function(t){var e=f.parse[this.type];return this.req._parser?this.req._parser(this,t):(!e&&g(this.type)&&(e=f.parse["application/json"]),e&&t&&(t.length||t instanceof Object)?e(t):null)},y.prototype.toError=function(){var t=this.req,e=t.method,r=t.url,n="cannot "+e+" "+r+" ("+this.status+")",i=new Error(n);return i.status=this.status,i.method=e,i.url=r,i},f.Response=y,i(b.prototype),o(b.prototype),b.prototype.type=function(t){return this.set("Content-Type",f.types[t]||t),this},b.prototype.accept=function(t){return this.set("Accept",f.types[t]||t),this},b.prototype.auth=function(t,e,r){1===arguments.length&&(e=""),"object"==typeof e&&null!==e&&(r=e,e=""),r||(r={type:"function"==typeof btoa?"basic":"auto"});var n=function(t){if("function"==typeof btoa)return btoa(t);throw new Error("Cannot use basic auth, btoa is not a function")};return this._auth(t,e,r,n)},b.prototype.query=function(t){return"string"!=typeof t&&(t=l(t)),t&&this._query.push(t),this},b.prototype.attach=function(t,e,r){if(e){if(this._data)throw Error("superagent can't mix .send() and .attach()");this._getFormData().append(t,e,r||e.name)}return this},b.prototype._getFormData=function(){return this._formData||(this._formData=new n.FormData),this._formData},b.prototype.callback=function(t,e){if(this._shouldRetry(t,e))return this._retry();var r=this._callback;this.clearTimeout(),t&&(this._maxRetries&&(t.retries=this._retries-1),this.emit("error",t)),r(t,e)},b.prototype.crossDomainError=function(){var t=new Error("Request has been terminated\nPossible causes: the network is offline, Origin is not allowed by Access-Control-Allow-Origin, the page is being unloaded, etc.");t.crossDomain=!0,t.status=this.status,t.method=this.method,t.url=this.url,this.callback(t)},b.prototype.buffer=b.prototype.ca=b.prototype.agent=function(){return console.warn("This is not supported in browser version of superagent"),this},b.prototype.pipe=b.prototype.write=function(){throw Error("Streaming is not supported in browser version of superagent")},b.prototype._isHost=function(t){return t&&"object"==typeof t&&!Array.isArray(t)&&"[object Object]"!==Object.prototype.toString.call(t)},b.prototype.end=function(t){return this._endCalled&&console.warn("Warning: .end() was called twice. This is not supported in superagent"),this._endCalled=!0,this._callback=t||c,this._finalizeQueryString(),this._end()},b.prototype._end=function(){var t=this,e=this.xhr=f.getXHR(),r=this._formData||this._data;this._setTimeouts(),e.onreadystatechange=function(){var r=e.readyState;if(r>=2&&t._responseTimeoutTimer&&clearTimeout(t._responseTimeoutTimer),4==r){var n;try{n=e.status}catch(t){n=0}if(!n){if(t.timedout||t._aborted)return;return t.crossDomainError()}t.emit("end")}};var n=function(e,r){r.total>0&&(r.percent=r.loaded/r.total*100),r.direction=e,t.emit("progress",r)};if(this.hasListeners("progress"))try{e.onprogress=n.bind(null,"download"),e.upload&&(e.upload.onprogress=n.bind(null,"upload"))}catch(t){}try{this.username&&this.password?e.open(this.method,this.url,!0,this.username,this.password):e.open(this.method,this.url,!0)}catch(t){return this.callback(t)}if(this._withCredentials&&(e.withCredentials=!0),!this._formData&&"GET"!=this.method&&"HEAD"!=this.method&&"string"!=typeof r&&!this._isHost(r)){var i=this._header["content-type"],o=this._serializer||f.serialize[i?i.split(";")[0]:""];!o&&g(i)&&(o=f.serialize["application/json"]),o&&(r=o(r))}for(var s in this.header)null!=this.header[s]&&this.header.hasOwnProperty(s)&&e.setRequestHeader(s,this.header[s]);return this._responseType&&(e.responseType=this._responseType),this.emit("request",this),e.send(void 0!==r?r:null),this},f.agent=function(){return new u},["GET","POST","OPTIONS","PATCH","PUT","DELETE"].forEach((function(t){u.prototype[t.toLowerCase()]=function(e,r){var n=new f.Request(t,e);return this._setDefaults(n),r&&n.end(r),n}})),u.prototype.del=u.prototype.delete,f.get=function(t,e,r){var n=f("GET",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},f.head=function(t,e,r){var n=f("HEAD",t);return"function"==typeof e&&(r=e,e=null),e&&n.query(e),r&&n.end(r),n},f.options=function(t,e,r){var n=f("OPTIONS",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},f.del=m,f.delete=m,f.patch=function(t,e,r){var n=f("PATCH",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},f.post=function(t,e,r){var n=f("POST",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n},f.put=function(t,e,r){var n=f("PUT",t);return"function"==typeof e&&(r=e,e=null),e&&n.send(e),r&&n.end(r),n}},3354:t=>{"use strict";t.exports=function(t){return null!==t&&"object"==typeof t}},2474:(t,e,r)=>{"use strict";var n=r(3354);function i(t){if(t)return function(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}(t)}t.exports=i,i.prototype.clearTimeout=function(){return clearTimeout(this._timer),clearTimeout(this._responseTimeoutTimer),delete this._timer,delete this._responseTimeoutTimer,this},i.prototype.parse=function(t){return this._parser=t,this},i.prototype.responseType=function(t){return this._responseType=t,this},i.prototype.serialize=function(t){return this._serializer=t,this},i.prototype.timeout=function(t){if(!t||"object"!=typeof t)return this._timeout=t,this._responseTimeout=0,this;for(var e in t)switch(e){case"deadline":this._timeout=t.deadline;break;case"response":this._responseTimeout=t.response;break;default:console.warn("Unknown timeout option",e)}return this},i.prototype.retry=function(t,e){return 0!==arguments.length&&!0!==t||(t=1),t<=0&&(t=0),this._maxRetries=t,this._retries=0,this._retryCallback=e,this};var o=["ECONNRESET","ETIMEDOUT","EADDRINFO","ESOCKETTIMEDOUT"];i.prototype._shouldRetry=function(t,e){if(!this._maxRetries||this._retries++>=this._maxRetries)return!1;if(this._retryCallback)try{var r=this._retryCallback(t,e);if(!0===r)return!0;if(!1===r)return!1}catch(t){console.error(t)}if(e&&e.status&&e.status>=500&&501!=e.status)return!0;if(t){if(t.code&&~o.indexOf(t.code))return!0;if(t.timeout&&"ECONNABORTED"==t.code)return!0;if(t.crossDomain)return!0}return!1},i.prototype._retry=function(){return this.clearTimeout(),this.req&&(this.req=null,this.req=this.request()),this._aborted=!1,this.timedout=!1,this._end()},i.prototype.then=function(t,e){if(!this._fullfilledPromise){var r=this;this._endCalled&&console.warn("Warning: superagent request was sent twice, because both .end() and .then() were called. Never call .end() if you use promises"),this._fullfilledPromise=new Promise((function(t,e){r.end((function(r,n){r?e(r):t(n)}))}))}return this._fullfilledPromise.then(t,e)},i.prototype.catch=function(t){return this.then(void 0,t)},i.prototype.use=function(t){return t(this),this},i.prototype.ok=function(t){if("function"!=typeof t)throw Error("Callback required");return this._okCallback=t,this},i.prototype._isResponseOK=function(t){return!!t&&(this._okCallback?this._okCallback(t):t.status>=200&&t.status<300)},i.prototype.get=function(t){return this._header[t.toLowerCase()]},i.prototype.getHeader=i.prototype.get,i.prototype.set=function(t,e){if(n(t)){for(var r in t)this.set(r,t[r]);return this}return this._header[t.toLowerCase()]=e,this.header[t]=e,this},i.prototype.unset=function(t){return delete this._header[t.toLowerCase()],delete this.header[t],this},i.prototype.field=function(t,e){if(null==t)throw new Error(".field(name, val) name can not be empty");if(this._data&&console.error(".field() can't be used if .send() is used. Please use only .send() or only .field() & .attach()"),n(t)){for(var r in t)this.field(r,t[r]);return this}if(Array.isArray(e)){for(var i in e)this.field(t,e[i]);return this}if(null==e)throw new Error(".field(name, val) val can not be empty");return"boolean"==typeof e&&(e=""+e),this._getFormData().append(t,e),this},i.prototype.abort=function(){return this._aborted||(this._aborted=!0,this.xhr&&this.xhr.abort(),this.req&&this.req.abort(),this.clearTimeout(),this.emit("abort")),this},i.prototype._auth=function(t,e,r,n){switch(r.type){case"basic":this.set("Authorization","Basic "+n(t+":"+e));break;case"auto":this.username=t,this.password=e;break;case"bearer":this.set("Authorization","Bearer "+t)}return this},i.prototype.withCredentials=function(t){return null==t&&(t=!0),this._withCredentials=t,this},i.prototype.redirects=function(t){return this._maxRedirects=t,this},i.prototype.maxResponseSize=function(t){if("number"!=typeof t)throw TypeError("Invalid argument");return this._maxResponseSize=t,this},i.prototype.toJSON=function(){return{method:this.method,url:this.url,data:this._data,headers:this._header}},i.prototype.send=function(t){var e=n(t),r=this._header["content-type"];if(this._formData&&console.error(".send() can't be used if .attach() or .field() is used. Please use only .send() or only .field() & .attach()"),e&&!this._data)Array.isArray(t)?this._data=[]:this._isHost(t)||(this._data={});else if(t&&this._data&&this._isHost(this._data))throw Error("Can't merge these send calls");if(e&&n(this._data))for(var i in t)this._data[i]=t[i];else"string"==typeof t?(r||this.type("form"),r=this._header["content-type"],this._data="application/x-www-form-urlencoded"==r?this._data?this._data+"&"+t:t:(this._data||"")+t):this._data=t;return!e||this._isHost(t)||r||this.type("json"),this},i.prototype.sortQuery=function(t){return this._sort=void 0===t||t,this},i.prototype._finalizeQueryString=function(){var t=this._query.join("&");if(t&&(this.url+=(this.url.indexOf("?")>=0?"&":"?")+t),this._query.length=0,this._sort){var e=this.url.indexOf("?");if(e>=0){var r=this.url.substring(e+1).split("&");"function"==typeof this._sort?r.sort(this._sort):r.sort(),this.url=this.url.substring(0,e)+"?"+r.join("&")}}},i.prototype._appendQueryString=function(){console.trace("Unsupported")},i.prototype._timeoutError=function(t,e,r){if(!this._aborted){var n=new Error(t+e+"ms exceeded");n.timeout=e,n.code="ECONNABORTED",n.errno=r,this.timedout=!0,this.abort(),this.callback(n)}},i.prototype._setTimeouts=function(){var t=this;this._timeout&&!this._timer&&(this._timer=setTimeout((function(){t._timeoutError("Timeout of ",t._timeout,"ETIME")}),this._timeout)),this._responseTimeout&&!this._responseTimeoutTimer&&(this._responseTimeoutTimer=setTimeout((function(){t._timeoutError("Response timeout of ",t._responseTimeout,"ETIMEDOUT")}),this._responseTimeout))}},9228:(t,e,r)=>{"use strict";var n=r(2433);function i(t){if(t)return function(t){for(var e in i.prototype)t[e]=i.prototype[e];return t}(t)}t.exports=i,i.prototype.get=function(t){return this.header[t.toLowerCase()]},i.prototype._setHeaderProperties=function(t){var e=t["content-type"]||"";this.type=n.type(e);var r=n.params(e);for(var i in r)this[i]=r[i];this.links={};try{t.link&&(this.links=n.parseLinks(t.link))}catch(t){}},i.prototype._setStatusProperties=function(t){var e=t/100|0;this.status=this.statusCode=t,this.statusType=e,this.info=1==e,this.ok=2==e,this.redirect=3==e,this.clientError=4==e,this.serverError=5==e,this.error=(4==e||5==e)&&this.toError(),this.created=201==t,this.accepted=202==t,this.noContent=204==t,this.badRequest=400==t,this.unauthorized=401==t,this.notAcceptable=406==t,this.forbidden=403==t,this.notFound=404==t,this.unprocessableEntity=422==t}},2433:(t,e)=>{"use strict";e.type=function(t){return t.split(/ *; */).shift()},e.params=function(t){return t.split(/ *; */).reduce((function(t,e){var r=e.split(/ *= */),n=r.shift(),i=r.shift();return n&&i&&(t[n]=i),t}),{})},e.parseLinks=function(t){return t.split(/ *, */).reduce((function(t,e){var r=e.split(/ *; */),n=r[0].slice(1,-1);return t[r[1].split(/ *= */)[1].slice(1,-1)]=n,t}),{})},e.cleanHeader=function(t,e){return delete t["content-type"],delete t["content-length"],delete t["transfer-encoding"],delete t.host,e&&(delete t.authorization,delete t.cookie),t}},701:(t,e,r)=>{var n=r(8834).Buffer;const i=r(2197),o=new(0,r(7554).ec)("secp256k1"),s=r(9624),a=n.alloc(32,0),u=n.from("fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141","hex"),c=n.from("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f","hex"),f=o.curve.n,h=f.shrn(1),l=o.curve.g,p="Expected Private",d="Expected Point",g="Expected Tweak",y="Expected Hash";function b(t){return n.isBuffer(t)&&32===t.length}function m(t){return!!b(t)&&t.compare(u)<0}function v(t){if(!n.isBuffer(t))return!1;if(t.length<33)return!1;const e=t[0],r=t.slice(1,33);if(0===r.compare(a))return!1;if(r.compare(c)>=0)return!1;if((2===e||3===e)&&33===t.length){try{I(t)}catch(t){return!1}return!0}const i=t.slice(33);return 0!==i.compare(a)&&!(i.compare(c)>=0)&&4===e&&65===t.length}function w(t){return 4!==t[0]}function _(t){return!!b(t)&&t.compare(a)>0&&t.compare(u)<0}function A(t,e){return void 0===t&&void 0!==e?w(e):void 0===t||t}function E(t){return new i(t)}function S(t){return t.toArrayLike(n,"be",32)}function I(t){return o.curve.decodePoint(t)}function k(t,e){return n.from(t._encode(e))}function x(t,e,r){if(!b(t))throw new TypeError(y);if(!_(e))throw new TypeError(p);if(void 0!==r&&!b(r))throw new TypeError("Expected Extra Data (32 bytes)");const i=E(e),o=E(t);let a,u;s(t,e,(function(t){const e=E(t),r=l.mul(e);return!r.isInfinity()&&(a=r.x.umod(f),0!==a.isZero()&&(u=e.invm(f).mul(o.add(i.mul(a))).umod(f),0!==u.isZero()))}),_,r),u.cmp(h)>0&&(u=f.sub(u));const c=n.allocUnsafe(64);return S(a).copy(c,0),S(u).copy(c,32),c}t.exports={isPoint:v,isPointCompressed:function(t){return!!v(t)&&w(t)},isPrivate:_,pointAdd:function(t,e,r){if(!v(t))throw new TypeError(d);if(!v(e))throw new TypeError(d);const n=I(t),i=I(e),o=n.add(i);return o.isInfinity()?null:k(o,A(r,t))},pointAddScalar:function(t,e,r){if(!v(t))throw new TypeError(d);if(!m(e))throw new TypeError(g);const n=A(r,t),i=I(t);if(0===e.compare(a))return k(i,n);const o=E(e),s=l.mul(o),u=i.add(s);return u.isInfinity()?null:k(u,n)},pointCompress:function(t,e){if(!v(t))throw new TypeError(d);const r=I(t);if(r.isInfinity())throw new TypeError(d);return k(r,A(e,t))},pointFromScalar:function(t,e){if(!_(t))throw new TypeError(p);const r=E(t),n=l.mul(r);return n.isInfinity()?null:k(n,A(e))},pointMultiply:function(t,e,r){if(!v(t))throw new TypeError(d);if(!m(e))throw new TypeError(g);const n=A(r,t),i=I(t),o=E(e),s=i.mul(o);return s.isInfinity()?null:k(s,n)},privateAdd:function(t,e){if(!_(t))throw new TypeError(p);if(!m(e))throw new TypeError(g);const r=E(t),n=E(e),i=S(r.add(n).umod(f));return _(i)?i:null},privateSub:function(t,e){if(!_(t))throw new TypeError(p);if(!m(e))throw new TypeError(g);const r=E(t),n=E(e),i=S(r.sub(n).umod(f));return _(i)?i:null},sign:function(t,e){return x(t,e)},signWithEntropy:function(t,e,r){return x(t,e,r)},verify:function(t,e,r,i){if(!b(t))throw new TypeError(y);if(!v(e))throw new TypeError(d);if(!function(t){const e=t.slice(0,32),r=t.slice(32,64);return n.isBuffer(t)&&64===t.length&&e.compare(u)<0&&r.compare(u)<0}(r))throw new TypeError("Expected Signature");const o=I(e),s=E(r.slice(0,32)),a=E(r.slice(32,64));if(i&&a.cmp(h)>0)return!1;if(s.gtn(0)<=0)return!1;if(a.gtn(0)<=0)return!1;const c=E(t),p=a.invm(f),g=c.mul(p).umod(f),m=s.mul(p).umod(f),w=l.mulAdd(g,o,m);return!w.isInfinity()&&w.x.umod(f).eq(s)}}},9624:(t,e,r)=>{var n=r(8834).Buffer;const i=r(11),o=n.alloc(1,1),s=n.alloc(1,0);t.exports=function(t,e,r,a,u){let c=n.alloc(32,0),f=n.alloc(32,1);c=i("sha256",c).update(f).update(s).update(e).update(t).update(u||"").digest(),f=i("sha256",c).update(f).digest(),c=i("sha256",c).update(f).update(o).update(e).update(t).update(u||"").digest(),f=i("sha256",c).update(f).digest(),f=i("sha256",c).update(f).digest();let h=f;for(;!a(h)||!r(h);)c=i("sha256",c).update(f).update(s).digest(),f=i("sha256",c).update(f).digest(),f=i("sha256",c).update(f).digest(),h=f;return h}},717:(t,e,r)=>{!function(t){"use strict";var e=function(t){var e,r=new Float64Array(16);if(t)for(e=0;e<t.length;e++)r[e]=t[e];return r},n=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var s=e(),a=e([1]),u=e([56129,1]),c=e([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),f=e([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),h=e([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),l=e([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=e([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function d(t,e,r,n){t[e]=r>>24&255,t[e+1]=r>>16&255,t[e+2]=r>>8&255,t[e+3]=255&r,t[e+4]=n>>24&255,t[e+5]=n>>16&255,t[e+6]=n>>8&255,t[e+7]=255&n}function g(t,e,r,n,i){var o,s=0;for(o=0;o<i;o++)s|=t[e+o]^r[n+o];return(1&s-1>>>8)-1}function y(t,e,r,n){return g(t,e,r,n,16)}function b(t,e,r,n){return g(t,e,r,n,32)}function m(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,b=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,m=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,_=o,A=s,E=a,S=u,I=c,k=f,x=h,M=l,C=p,T=d,O=g,P=y,B=b,R=m,N=v,U=w,j=0;j<20;j+=2)_^=(i=(B^=(i=(C^=(i=(I^=(i=_+B|0)<<7|i>>>25)+_|0)<<9|i>>>23)+I|0)<<13|i>>>19)+C|0)<<18|i>>>14,k^=(i=(A^=(i=(R^=(i=(T^=(i=k+A|0)<<7|i>>>25)+k|0)<<9|i>>>23)+T|0)<<13|i>>>19)+R|0)<<18|i>>>14,O^=(i=(x^=(i=(E^=(i=(N^=(i=O+x|0)<<7|i>>>25)+O|0)<<9|i>>>23)+N|0)<<13|i>>>19)+E|0)<<18|i>>>14,U^=(i=(P^=(i=(M^=(i=(S^=(i=U+P|0)<<7|i>>>25)+U|0)<<9|i>>>23)+S|0)<<13|i>>>19)+M|0)<<18|i>>>14,_^=(i=(S^=(i=(E^=(i=(A^=(i=_+S|0)<<7|i>>>25)+_|0)<<9|i>>>23)+A|0)<<13|i>>>19)+E|0)<<18|i>>>14,k^=(i=(I^=(i=(M^=(i=(x^=(i=k+I|0)<<7|i>>>25)+k|0)<<9|i>>>23)+x|0)<<13|i>>>19)+M|0)<<18|i>>>14,O^=(i=(T^=(i=(C^=(i=(P^=(i=O+T|0)<<7|i>>>25)+O|0)<<9|i>>>23)+P|0)<<13|i>>>19)+C|0)<<18|i>>>14,U^=(i=(N^=(i=(R^=(i=(B^=(i=U+N|0)<<7|i>>>25)+U|0)<<9|i>>>23)+B|0)<<13|i>>>19)+R|0)<<18|i>>>14;_=_+o|0,A=A+s|0,E=E+a|0,S=S+u|0,I=I+c|0,k=k+f|0,x=x+h|0,M=M+l|0,C=C+p|0,T=T+d|0,O=O+g|0,P=P+y|0,B=B+b|0,R=R+m|0,N=N+v|0,U=U+w|0,t[0]=_>>>0&255,t[1]=_>>>8&255,t[2]=_>>>16&255,t[3]=_>>>24&255,t[4]=A>>>0&255,t[5]=A>>>8&255,t[6]=A>>>16&255,t[7]=A>>>24&255,t[8]=E>>>0&255,t[9]=E>>>8&255,t[10]=E>>>16&255,t[11]=E>>>24&255,t[12]=S>>>0&255,t[13]=S>>>8&255,t[14]=S>>>16&255,t[15]=S>>>24&255,t[16]=I>>>0&255,t[17]=I>>>8&255,t[18]=I>>>16&255,t[19]=I>>>24&255,t[20]=k>>>0&255,t[21]=k>>>8&255,t[22]=k>>>16&255,t[23]=k>>>24&255,t[24]=x>>>0&255,t[25]=x>>>8&255,t[26]=x>>>16&255,t[27]=x>>>24&255,t[28]=M>>>0&255,t[29]=M>>>8&255,t[30]=M>>>16&255,t[31]=M>>>24&255,t[32]=C>>>0&255,t[33]=C>>>8&255,t[34]=C>>>16&255,t[35]=C>>>24&255,t[36]=T>>>0&255,t[37]=T>>>8&255,t[38]=T>>>16&255,t[39]=T>>>24&255,t[40]=O>>>0&255,t[41]=O>>>8&255,t[42]=O>>>16&255,t[43]=O>>>24&255,t[44]=P>>>0&255,t[45]=P>>>8&255,t[46]=P>>>16&255,t[47]=P>>>24&255,t[48]=B>>>0&255,t[49]=B>>>8&255,t[50]=B>>>16&255,t[51]=B>>>24&255,t[52]=R>>>0&255,t[53]=R>>>8&255,t[54]=R>>>16&255,t[55]=R>>>24&255,t[56]=N>>>0&255,t[57]=N>>>8&255,t[58]=N>>>16&255,t[59]=N>>>24&255,t[60]=U>>>0&255,t[61]=U>>>8&255,t[62]=U>>>16&255,t[63]=U>>>24&255}(t,e,r,n)}function v(t,e,r,n){!function(t,e,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,s=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,a=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,f=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,l=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,p=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,d=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,g=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,y=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,b=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,m=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,v=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,w=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,_=0;_<20;_+=2)o^=(i=(b^=(i=(p^=(i=(c^=(i=o+b|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+p|0)<<18|i>>>14,f^=(i=(s^=(i=(m^=(i=(d^=(i=f+s|0)<<7|i>>>25)+f|0)<<9|i>>>23)+d|0)<<13|i>>>19)+m|0)<<18|i>>>14,g^=(i=(h^=(i=(a^=(i=(v^=(i=g+h|0)<<7|i>>>25)+g|0)<<9|i>>>23)+v|0)<<13|i>>>19)+a|0)<<18|i>>>14,w^=(i=(y^=(i=(l^=(i=(u^=(i=w+y|0)<<7|i>>>25)+w|0)<<9|i>>>23)+u|0)<<13|i>>>19)+l|0)<<18|i>>>14,o^=(i=(u^=(i=(a^=(i=(s^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+a|0)<<18|i>>>14,f^=(i=(c^=(i=(l^=(i=(h^=(i=f+c|0)<<7|i>>>25)+f|0)<<9|i>>>23)+h|0)<<13|i>>>19)+l|0)<<18|i>>>14,g^=(i=(d^=(i=(p^=(i=(y^=(i=g+d|0)<<7|i>>>25)+g|0)<<9|i>>>23)+y|0)<<13|i>>>19)+p|0)<<18|i>>>14,w^=(i=(v^=(i=(m^=(i=(b^=(i=w+v|0)<<7|i>>>25)+w|0)<<9|i>>>23)+b|0)<<13|i>>>19)+m|0)<<18|i>>>14;t[0]=o>>>0&255,t[1]=o>>>8&255,t[2]=o>>>16&255,t[3]=o>>>24&255,t[4]=f>>>0&255,t[5]=f>>>8&255,t[6]=f>>>16&255,t[7]=f>>>24&255,t[8]=g>>>0&255,t[9]=g>>>8&255,t[10]=g>>>16&255,t[11]=g>>>24&255,t[12]=w>>>0&255,t[13]=w>>>8&255,t[14]=w>>>16&255,t[15]=w>>>24&255,t[16]=h>>>0&255,t[17]=h>>>8&255,t[18]=h>>>16&255,t[19]=h>>>24&255,t[20]=l>>>0&255,t[21]=l>>>8&255,t[22]=l>>>16&255,t[23]=l>>>24&255,t[24]=p>>>0&255,t[25]=p>>>8&255,t[26]=p>>>16&255,t[27]=p>>>24&255,t[28]=d>>>0&255,t[29]=d>>>8&255,t[30]=d>>>16&255,t[31]=d>>>24&255}(t,e,r,n)}var w=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function _(t,e,r,n,i,o,s){var a,u,c=new Uint8Array(16),f=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=o[u];for(;i>=64;){for(m(f,c,s,w),u=0;u<64;u++)t[e+u]=r[n+u]^f[u];for(a=1,u=8;u<16;u++)a=a+(255&c[u])|0,c[u]=255&a,a>>>=8;i-=64,e+=64,n+=64}if(i>0)for(m(f,c,s,w),u=0;u<i;u++)t[e+u]=r[n+u]^f[u];return 0}function A(t,e,r,n,i){var o,s,a=new Uint8Array(16),u=new Uint8Array(64);for(s=0;s<16;s++)a[s]=0;for(s=0;s<8;s++)a[s]=n[s];for(;r>=64;){for(m(u,a,i,w),s=0;s<64;s++)t[e+s]=u[s];for(o=1,s=8;s<16;s++)o=o+(255&a[s])|0,a[s]=255&o,o>>>=8;r-=64,e+=64}if(r>0)for(m(u,a,i,w),s=0;s<r;s++)t[e+s]=u[s];return 0}function E(t,e,r,n,i){var o=new Uint8Array(32);v(o,n,i,w);for(var s=new Uint8Array(8),a=0;a<8;a++)s[a]=n[a+16];return A(t,e,r,s,o)}function S(t,e,r,n,i,o,s){var a=new Uint8Array(32);v(a,o,s,w);for(var u=new Uint8Array(8),c=0;c<8;c++)u[c]=o[c+16];return _(t,e,r,n,i,u,a)}var I=function(t){var e,r,n,i,o,s,a,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,e=255&t[0]|(255&t[1])<<8,this.r[0]=8191&e,r=255&t[2]|(255&t[3])<<8,this.r[1]=8191&(e>>>13|r<<3),n=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&t[8]|(255&t[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(o>>>14|s<<2),a=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(s>>>11|a<<5),u=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(a>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function k(t,e,r,n,i,o){var s=new I(o);return s.update(r,n,i),s.finish(t,e),0}function x(t,e,r,n,i,o){var s=new Uint8Array(16);return k(s,0,r,n,i,o),y(t,e,s,0)}function M(t,e,r,n,i){var o;if(r<32)return-1;for(S(t,0,e,0,r,n,i),k(t,16,t,32,r-32,t),o=0;o<16;o++)t[o]=0;return 0}function C(t,e,r,n,i){var o,s=new Uint8Array(32);if(r<32)return-1;if(E(s,0,32,n,i),0!==x(e,16,e,32,r-32,s))return-1;for(S(t,0,e,0,r,n,i),o=0;o<32;o++)t[o]=0;return 0}function T(t,e){var r;for(r=0;r<16;r++)t[r]=0|e[r]}function O(t){var e,r,n=1;for(e=0;e<16;e++)r=t[e]+n+65535,n=Math.floor(r/65536),t[e]=r-65536*n;t[0]+=n-1+37*(n-1)}function P(t,e,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(t[o]^e[o]),t[o]^=n,e[o]^=n}function B(t,r){var n,i,o,s=e(),a=e();for(n=0;n<16;n++)a[n]=r[n];for(O(a),O(a),O(a),i=0;i<2;i++){for(s[0]=a[0]-65517,n=1;n<15;n++)s[n]=a[n]-65535-(s[n-1]>>16&1),s[n-1]&=65535;s[15]=a[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,P(a,s,1-o)}for(n=0;n<16;n++)t[2*n]=255&a[n],t[2*n+1]=a[n]>>8}function R(t,e){var r=new Uint8Array(32),n=new Uint8Array(32);return B(r,t),B(n,e),b(r,0,n,0)}function N(t){var e=new Uint8Array(32);return B(e,t),1&e[0]}function U(t,e){var r;for(r=0;r<16;r++)t[r]=e[2*r]+(e[2*r+1]<<8);t[15]&=32767}function j(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]+r[n]}function L(t,e,r){for(var n=0;n<16;n++)t[n]=e[n]-r[n]}function D(t,e,r){var n,i,o=0,s=0,a=0,u=0,c=0,f=0,h=0,l=0,p=0,d=0,g=0,y=0,b=0,m=0,v=0,w=0,_=0,A=0,E=0,S=0,I=0,k=0,x=0,M=0,C=0,T=0,O=0,P=0,B=0,R=0,N=0,U=r[0],j=r[1],L=r[2],D=r[3],F=r[4],q=r[5],H=r[6],K=r[7],V=r[8],G=r[9],z=r[10],W=r[11],Q=r[12],Y=r[13],X=r[14],$=r[15];o+=(n=e[0])*U,s+=n*j,a+=n*L,u+=n*D,c+=n*F,f+=n*q,h+=n*H,l+=n*K,p+=n*V,d+=n*G,g+=n*z,y+=n*W,b+=n*Q,m+=n*Y,v+=n*X,w+=n*$,s+=(n=e[1])*U,a+=n*j,u+=n*L,c+=n*D,f+=n*F,h+=n*q,l+=n*H,p+=n*K,d+=n*V,g+=n*G,y+=n*z,b+=n*W,m+=n*Q,v+=n*Y,w+=n*X,_+=n*$,a+=(n=e[2])*U,u+=n*j,c+=n*L,f+=n*D,h+=n*F,l+=n*q,p+=n*H,d+=n*K,g+=n*V,y+=n*G,b+=n*z,m+=n*W,v+=n*Q,w+=n*Y,_+=n*X,A+=n*$,u+=(n=e[3])*U,c+=n*j,f+=n*L,h+=n*D,l+=n*F,p+=n*q,d+=n*H,g+=n*K,y+=n*V,b+=n*G,m+=n*z,v+=n*W,w+=n*Q,_+=n*Y,A+=n*X,E+=n*$,c+=(n=e[4])*U,f+=n*j,h+=n*L,l+=n*D,p+=n*F,d+=n*q,g+=n*H,y+=n*K,b+=n*V,m+=n*G,v+=n*z,w+=n*W,_+=n*Q,A+=n*Y,E+=n*X,S+=n*$,f+=(n=e[5])*U,h+=n*j,l+=n*L,p+=n*D,d+=n*F,g+=n*q,y+=n*H,b+=n*K,m+=n*V,v+=n*G,w+=n*z,_+=n*W,A+=n*Q,E+=n*Y,S+=n*X,I+=n*$,h+=(n=e[6])*U,l+=n*j,p+=n*L,d+=n*D,g+=n*F,y+=n*q,b+=n*H,m+=n*K,v+=n*V,w+=n*G,_+=n*z,A+=n*W,E+=n*Q,S+=n*Y,I+=n*X,k+=n*$,l+=(n=e[7])*U,p+=n*j,d+=n*L,g+=n*D,y+=n*F,b+=n*q,m+=n*H,v+=n*K,w+=n*V,_+=n*G,A+=n*z,E+=n*W,S+=n*Q,I+=n*Y,k+=n*X,x+=n*$,p+=(n=e[8])*U,d+=n*j,g+=n*L,y+=n*D,b+=n*F,m+=n*q,v+=n*H,w+=n*K,_+=n*V,A+=n*G,E+=n*z,S+=n*W,I+=n*Q,k+=n*Y,x+=n*X,M+=n*$,d+=(n=e[9])*U,g+=n*j,y+=n*L,b+=n*D,m+=n*F,v+=n*q,w+=n*H,_+=n*K,A+=n*V,E+=n*G,S+=n*z,I+=n*W,k+=n*Q,x+=n*Y,M+=n*X,C+=n*$,g+=(n=e[10])*U,y+=n*j,b+=n*L,m+=n*D,v+=n*F,w+=n*q,_+=n*H,A+=n*K,E+=n*V,S+=n*G,I+=n*z,k+=n*W,x+=n*Q,M+=n*Y,C+=n*X,T+=n*$,y+=(n=e[11])*U,b+=n*j,m+=n*L,v+=n*D,w+=n*F,_+=n*q,A+=n*H,E+=n*K,S+=n*V,I+=n*G,k+=n*z,x+=n*W,M+=n*Q,C+=n*Y,T+=n*X,O+=n*$,b+=(n=e[12])*U,m+=n*j,v+=n*L,w+=n*D,_+=n*F,A+=n*q,E+=n*H,S+=n*K,I+=n*V,k+=n*G,x+=n*z,M+=n*W,C+=n*Q,T+=n*Y,O+=n*X,P+=n*$,m+=(n=e[13])*U,v+=n*j,w+=n*L,_+=n*D,A+=n*F,E+=n*q,S+=n*H,I+=n*K,k+=n*V,x+=n*G,M+=n*z,C+=n*W,T+=n*Q,O+=n*Y,P+=n*X,B+=n*$,v+=(n=e[14])*U,w+=n*j,_+=n*L,A+=n*D,E+=n*F,S+=n*q,I+=n*H,k+=n*K,x+=n*V,M+=n*G,C+=n*z,T+=n*W,O+=n*Q,P+=n*Y,B+=n*X,R+=n*$,w+=(n=e[15])*U,s+=38*(A+=n*L),a+=38*(E+=n*D),u+=38*(S+=n*F),c+=38*(I+=n*q),f+=38*(k+=n*H),h+=38*(x+=n*K),l+=38*(M+=n*V),p+=38*(C+=n*G),d+=38*(T+=n*z),g+=38*(O+=n*W),y+=38*(P+=n*Q),b+=38*(B+=n*Y),m+=38*(R+=n*X),v+=38*(N+=n*$),o=(n=(o+=38*(_+=n*j))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),w=(n=w+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),t[0]=o,t[1]=s,t[2]=a,t[3]=u,t[4]=c,t[5]=f,t[6]=h,t[7]=l,t[8]=p,t[9]=d,t[10]=g,t[11]=y,t[12]=b,t[13]=m,t[14]=v,t[15]=w}function F(t,e){D(t,e,e)}function q(t,r){var n,i=e();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)F(i,i),2!==n&&4!==n&&D(i,i,r);for(n=0;n<16;n++)t[n]=i[n]}function H(t,r){var n,i=e();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)F(i,i),1!==n&&D(i,i,r);for(n=0;n<16;n++)t[n]=i[n]}function K(t,r,n){var i,o,s=new Uint8Array(32),a=new Float64Array(80),c=e(),f=e(),h=e(),l=e(),p=e(),d=e();for(o=0;o<31;o++)s[o]=r[o];for(s[31]=127&r[31]|64,s[0]&=248,U(a,n),o=0;o<16;o++)f[o]=a[o],l[o]=c[o]=h[o]=0;for(c[0]=l[0]=1,o=254;o>=0;--o)P(c,f,i=s[o>>>3]>>>(7&o)&1),P(h,l,i),j(p,c,h),L(c,c,h),j(h,f,l),L(f,f,l),F(l,p),F(d,c),D(c,h,c),D(h,f,p),j(p,c,h),L(c,c,h),F(f,c),L(h,l,d),D(c,h,u),j(c,c,l),D(h,h,c),D(c,l,d),D(l,f,a),F(f,p),P(c,f,i),P(h,l,i);for(o=0;o<16;o++)a[o+16]=c[o],a[o+32]=h[o],a[o+48]=f[o],a[o+64]=l[o];var g=a.subarray(32),y=a.subarray(16);return q(g,g),D(y,y,g),B(t,y),0}function V(t,e){return K(t,e,o)}function G(t,e){return n(e,32),V(t,e)}function z(t,e,r){var n=new Uint8Array(32);return K(n,r,e),v(t,i,n,w)}I.prototype.blocks=function(t,e,r){for(var n,i,o,s,a,u,c,f,h,l,p,d,g,y,b,m,v,w,_,A=this.fin?0:2048,E=this.h[0],S=this.h[1],I=this.h[2],k=this.h[3],x=this.h[4],M=this.h[5],C=this.h[6],T=this.h[7],O=this.h[8],P=this.h[9],B=this.r[0],R=this.r[1],N=this.r[2],U=this.r[3],j=this.r[4],L=this.r[5],D=this.r[6],F=this.r[7],q=this.r[8],H=this.r[9];r>=16;)l=h=0,l+=(E+=8191&(n=255&t[e+0]|(255&t[e+1])<<8))*B,l+=(S+=8191&(n>>>13|(i=255&t[e+2]|(255&t[e+3])<<8)<<3))*(5*H),l+=(I+=8191&(i>>>10|(o=255&t[e+4]|(255&t[e+5])<<8)<<6))*(5*q),l+=(k+=8191&(o>>>7|(s=255&t[e+6]|(255&t[e+7])<<8)<<9))*(5*F),h=(l+=(x+=8191&(s>>>4|(a=255&t[e+8]|(255&t[e+9])<<8)<<12))*(5*D))>>>13,l&=8191,l+=(M+=a>>>1&8191)*(5*L),l+=(C+=8191&(a>>>14|(u=255&t[e+10]|(255&t[e+11])<<8)<<2))*(5*j),l+=(T+=8191&(u>>>11|(c=255&t[e+12]|(255&t[e+13])<<8)<<5))*(5*U),l+=(O+=8191&(c>>>8|(f=255&t[e+14]|(255&t[e+15])<<8)<<8))*(5*N),p=h+=(l+=(P+=f>>>5|A)*(5*R))>>>13,p+=E*R,p+=S*B,p+=I*(5*H),p+=k*(5*q),h=(p+=x*(5*F))>>>13,p&=8191,p+=M*(5*D),p+=C*(5*L),p+=T*(5*j),p+=O*(5*U),h+=(p+=P*(5*N))>>>13,p&=8191,d=h,d+=E*N,d+=S*R,d+=I*B,d+=k*(5*H),h=(d+=x*(5*q))>>>13,d&=8191,d+=M*(5*F),d+=C*(5*D),d+=T*(5*L),d+=O*(5*j),g=h+=(d+=P*(5*U))>>>13,g+=E*U,g+=S*N,g+=I*R,g+=k*B,h=(g+=x*(5*H))>>>13,g&=8191,g+=M*(5*q),g+=C*(5*F),g+=T*(5*D),g+=O*(5*L),y=h+=(g+=P*(5*j))>>>13,y+=E*j,y+=S*U,y+=I*N,y+=k*R,h=(y+=x*B)>>>13,y&=8191,y+=M*(5*H),y+=C*(5*q),y+=T*(5*F),y+=O*(5*D),b=h+=(y+=P*(5*L))>>>13,b+=E*L,b+=S*j,b+=I*U,b+=k*N,h=(b+=x*R)>>>13,b&=8191,b+=M*B,b+=C*(5*H),b+=T*(5*q),b+=O*(5*F),m=h+=(b+=P*(5*D))>>>13,m+=E*D,m+=S*L,m+=I*j,m+=k*U,h=(m+=x*N)>>>13,m&=8191,m+=M*R,m+=C*B,m+=T*(5*H),m+=O*(5*q),v=h+=(m+=P*(5*F))>>>13,v+=E*F,v+=S*D,v+=I*L,v+=k*j,h=(v+=x*U)>>>13,v&=8191,v+=M*N,v+=C*R,v+=T*B,v+=O*(5*H),w=h+=(v+=P*(5*q))>>>13,w+=E*q,w+=S*F,w+=I*D,w+=k*L,h=(w+=x*j)>>>13,w&=8191,w+=M*U,w+=C*N,w+=T*R,w+=O*B,_=h+=(w+=P*(5*H))>>>13,_+=E*H,_+=S*q,_+=I*F,_+=k*D,h=(_+=x*L)>>>13,_&=8191,_+=M*j,_+=C*U,_+=T*N,_+=O*R,E=l=8191&(h=(h=((h+=(_+=P*B)>>>13)<<2)+h|0)+(l&=8191)|0),S=p+=h>>>=13,I=d&=8191,k=g&=8191,x=y&=8191,M=b&=8191,C=m&=8191,T=v&=8191,O=w&=8191,P=_&=8191,e+=16,r-=16;this.h[0]=E,this.h[1]=S,this.h[2]=I,this.h[3]=k,this.h[4]=x,this.h[5]=M,this.h[6]=C,this.h[7]=T,this.h[8]=O,this.h[9]=P},I.prototype.finish=function(t,e){var r,n,i,o,s=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,s[0]=this.h[0]+5,r=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+r,r=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,n=(1^r)-1,o=0;o<10;o++)s[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|s[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;t[e+0]=this.h[0]>>>0&255,t[e+1]=this.h[0]>>>8&255,t[e+2]=this.h[1]>>>0&255,t[e+3]=this.h[1]>>>8&255,t[e+4]=this.h[2]>>>0&255,t[e+5]=this.h[2]>>>8&255,t[e+6]=this.h[3]>>>0&255,t[e+7]=this.h[3]>>>8&255,t[e+8]=this.h[4]>>>0&255,t[e+9]=this.h[4]>>>8&255,t[e+10]=this.h[5]>>>0&255,t[e+11]=this.h[5]>>>8&255,t[e+12]=this.h[6]>>>0&255,t[e+13]=this.h[6]>>>8&255,t[e+14]=this.h[7]>>>0&255,t[e+15]=this.h[7]>>>8&255},I.prototype.update=function(t,e,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=t[e+n];if(r-=i,e+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(t,e,i),e+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=t[e+n];this.leftover+=r}};var W=M,Q=C,Y=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function X(t,e,r,n){for(var i,o,s,a,u,c,f,h,l,p,d,g,y,b,m,v,w,_,A,E,S,I,k,x,M,C,T=new Int32Array(16),O=new Int32Array(16),P=t[0],B=t[1],R=t[2],N=t[3],U=t[4],j=t[5],L=t[6],D=t[7],F=e[0],q=e[1],H=e[2],K=e[3],V=e[4],G=e[5],z=e[6],W=e[7],Q=0;n>=128;){for(A=0;A<16;A++)E=8*A+Q,T[A]=r[E+0]<<24|r[E+1]<<16|r[E+2]<<8|r[E+3],O[A]=r[E+4]<<24|r[E+5]<<16|r[E+6]<<8|r[E+7];for(A=0;A<80;A++)if(i=P,o=B,s=R,a=N,u=U,c=j,f=L,l=F,p=q,d=H,g=K,y=V,b=G,m=z,k=65535&(I=W),x=I>>>16,M=65535&(S=D),C=S>>>16,k+=65535&(I=(V>>>14|U<<18)^(V>>>18|U<<14)^(U>>>9|V<<23)),x+=I>>>16,M+=65535&(S=(U>>>14|V<<18)^(U>>>18|V<<14)^(V>>>9|U<<23)),C+=S>>>16,k+=65535&(I=V&G^~V&z),x+=I>>>16,M+=65535&(S=U&j^~U&L),C+=S>>>16,k+=65535&(I=Y[2*A+1]),x+=I>>>16,M+=65535&(S=Y[2*A]),C+=S>>>16,S=T[A%16],x+=(I=O[A%16])>>>16,M+=65535&S,C+=S>>>16,M+=(x+=(k+=65535&I)>>>16)>>>16,k=65535&(I=_=65535&k|x<<16),x=I>>>16,M=65535&(S=w=65535&M|(C+=M>>>16)<<16),C=S>>>16,k+=65535&(I=(F>>>28|P<<4)^(P>>>2|F<<30)^(P>>>7|F<<25)),x+=I>>>16,M+=65535&(S=(P>>>28|F<<4)^(F>>>2|P<<30)^(F>>>7|P<<25)),C+=S>>>16,x+=(I=F&q^F&H^q&H)>>>16,M+=65535&(S=P&B^P&R^B&R),C+=S>>>16,h=65535&(M+=(x+=(k+=65535&I)>>>16)>>>16)|(C+=M>>>16)<<16,v=65535&k|x<<16,k=65535&(I=g),x=I>>>16,M=65535&(S=a),C=S>>>16,x+=(I=_)>>>16,M+=65535&(S=w),C+=S>>>16,B=i,R=o,N=s,U=a=65535&(M+=(x+=(k+=65535&I)>>>16)>>>16)|(C+=M>>>16)<<16,j=u,L=c,D=f,P=h,q=l,H=p,K=d,V=g=65535&k|x<<16,G=y,z=b,W=m,F=v,A%16==15)for(E=0;E<16;E++)S=T[E],k=65535&(I=O[E]),x=I>>>16,M=65535&S,C=S>>>16,S=T[(E+9)%16],k+=65535&(I=O[(E+9)%16]),x+=I>>>16,M+=65535&S,C+=S>>>16,w=T[(E+1)%16],k+=65535&(I=((_=O[(E+1)%16])>>>1|w<<31)^(_>>>8|w<<24)^(_>>>7|w<<25)),x+=I>>>16,M+=65535&(S=(w>>>1|_<<31)^(w>>>8|_<<24)^w>>>7),C+=S>>>16,w=T[(E+14)%16],x+=(I=((_=O[(E+14)%16])>>>19|w<<13)^(w>>>29|_<<3)^(_>>>6|w<<26))>>>16,M+=65535&(S=(w>>>19|_<<13)^(_>>>29|w<<3)^w>>>6),C+=S>>>16,C+=(M+=(x+=(k+=65535&I)>>>16)>>>16)>>>16,T[E]=65535&M|C<<16,O[E]=65535&k|x<<16;k=65535&(I=F),x=I>>>16,M=65535&(S=P),C=S>>>16,S=t[0],x+=(I=e[0])>>>16,M+=65535&S,C+=S>>>16,C+=(M+=(x+=(k+=65535&I)>>>16)>>>16)>>>16,t[0]=P=65535&M|C<<16,e[0]=F=65535&k|x<<16,k=65535&(I=q),x=I>>>16,M=65535&(S=B),C=S>>>16,S=t[1],x+=(I=e[1])>>>16,M+=65535&S,C+=S>>>16,C+=(M+=(x+=(k+=65535&I)>>>16)>>>16)>>>16,t[1]=B=65535&M|C<<16,e[1]=q=65535&k|x<<16,k=65535&(I=H),x=I>>>16,M=65535&(S=R),C=S>>>16,S=t[2],x+=(I=e[2])>>>16,M+=65535&S,C+=S>>>16,C+=(M+=(x+=(k+=65535&I)>>>16)>>>16)>>>16,t[2]=R=65535&M|C<<16,e[2]=H=65535&k|x<<16,k=65535&(I=K),x=I>>>16,M=65535&(S=N),C=S>>>16,S=t[3],x+=(I=e[3])>>>16,M+=65535&S,C+=S>>>16,C+=(M+=(x+=(k+=65535&I)>>>16)>>>16)>>>16,t[3]=N=65535&M|C<<16,e[3]=K=65535&k|x<<16,k=65535&(I=V),x=I>>>16,M=65535&(S=U),C=S>>>16,S=t[4],x+=(I=e[4])>>>16,M+=65535&S,C+=S>>>16,C+=(M+=(x+=(k+=65535&I)>>>16)>>>16)>>>16,t[4]=U=65535&M|C<<16,e[4]=V=65535&k|x<<16,k=65535&(I=G),x=I>>>16,M=65535&(S=j),C=S>>>16,S=t[5],x+=(I=e[5])>>>16,M+=65535&S,C+=S>>>16,C+=(M+=(x+=(k+=65535&I)>>>16)>>>16)>>>16,t[5]=j=65535&M|C<<16,e[5]=G=65535&k|x<<16,k=65535&(I=z),x=I>>>16,M=65535&(S=L),C=S>>>16,S=t[6],x+=(I=e[6])>>>16,M+=65535&S,C+=S>>>16,C+=(M+=(x+=(k+=65535&I)>>>16)>>>16)>>>16,t[6]=L=65535&M|C<<16,e[6]=z=65535&k|x<<16,k=65535&(I=W),x=I>>>16,M=65535&(S=D),C=S>>>16,S=t[7],x+=(I=e[7])>>>16,M+=65535&S,C+=S>>>16,C+=(M+=(x+=(k+=65535&I)>>>16)>>>16)>>>16,t[7]=D=65535&M|C<<16,e[7]=W=65535&k|x<<16,Q+=128,n-=128}return n}function $(t,e,r){var n,i=new Int32Array(8),o=new Int32Array(8),s=new Uint8Array(256),a=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,X(i,o,e,r),r%=128,n=0;n<r;n++)s[n]=e[a-r+n];for(s[r]=128,s[(r=256-128*(r<112?1:0))-9]=0,d(s,r-8,a/536870912|0,a<<3),X(i,o,s,r),n=0;n<8;n++)d(t,8*n,i[n],o[n]);return 0}function Z(t,r){var n=e(),i=e(),o=e(),s=e(),a=e(),u=e(),c=e(),h=e(),l=e();L(n,t[1],t[0]),L(l,r[1],r[0]),D(n,n,l),j(i,t[0],t[1]),j(l,r[0],r[1]),D(i,i,l),D(o,t[3],r[3]),D(o,o,f),D(s,t[2],r[2]),j(s,s,s),L(a,i,n),L(u,s,o),j(c,s,o),j(h,i,n),D(t[0],a,u),D(t[1],h,c),D(t[2],c,u),D(t[3],a,h)}function J(t,e,r){var n;for(n=0;n<4;n++)P(t[n],e[n],r)}function tt(t,r){var n=e(),i=e(),o=e();q(o,r[2]),D(n,r[0],o),D(i,r[1],o),B(t,i),t[31]^=N(n)<<7}function et(t,e,r){var n,i;for(T(t[0],s),T(t[1],a),T(t[2],a),T(t[3],s),i=255;i>=0;--i)J(t,e,n=r[i/8|0]>>(7&i)&1),Z(e,t),Z(t,t),J(t,e,n)}function rt(t,r){var n=[e(),e(),e(),e()];T(n[0],h),T(n[1],l),T(n[2],a),D(n[3],h,l),et(t,n,r)}function nt(t,r,i){var o,s=new Uint8Array(64),a=[e(),e(),e(),e()];for(i||n(r,32),$(s,r,32),s[0]&=248,s[31]&=127,s[31]|=64,rt(a,s),tt(t,a),o=0;o<32;o++)r[o+32]=t[o];return 0}var it=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ot(t,e){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)e[i]+=r-16*e[n]*it[i-(n-32)],r=Math.floor((e[i]+128)/256),e[i]-=256*r;e[i]+=r,e[n]=0}for(r=0,i=0;i<32;i++)e[i]+=r-(e[31]>>4)*it[i],r=e[i]>>8,e[i]&=255;for(i=0;i<32;i++)e[i]-=r*it[i];for(n=0;n<32;n++)e[n+1]+=e[n]>>8,t[n]=255&e[n]}function st(t){var e,r=new Float64Array(64);for(e=0;e<64;e++)r[e]=t[e];for(e=0;e<64;e++)t[e]=0;ot(t,r)}function at(t,r,n,i){var o,s,a=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),f=new Float64Array(64),h=[e(),e(),e(),e()];$(a,i,32),a[0]&=248,a[31]&=127,a[31]|=64;var l=n+64;for(o=0;o<n;o++)t[64+o]=r[o];for(o=0;o<32;o++)t[32+o]=a[32+o];for($(c,t.subarray(32),n+32),st(c),rt(h,c),tt(t,h),o=32;o<64;o++)t[o]=i[o];for($(u,t,n+64),st(u),o=0;o<64;o++)f[o]=0;for(o=0;o<32;o++)f[o]=c[o];for(o=0;o<32;o++)for(s=0;s<32;s++)f[o+s]+=u[o]*a[s];return ot(t.subarray(32),f),l}function ut(t,r,n,i){var o,u=new Uint8Array(32),f=new Uint8Array(64),h=[e(),e(),e(),e()],l=[e(),e(),e(),e()];if(n<64)return-1;if(function(t,r){var n=e(),i=e(),o=e(),u=e(),f=e(),h=e(),l=e();return T(t[2],a),U(t[1],r),F(o,t[1]),D(u,o,c),L(o,o,t[2]),j(u,t[2],u),F(f,u),F(h,f),D(l,h,f),D(n,l,o),D(n,n,u),H(n,n),D(n,n,o),D(n,n,u),D(n,n,u),D(t[0],n,u),F(i,t[0]),D(i,i,u),R(i,o)&&D(t[0],t[0],p),F(i,t[0]),D(i,i,u),R(i,o)?-1:(N(t[0])===r[31]>>7&&L(t[0],s,t[0]),D(t[3],t[0],t[1]),0)}(l,i))return-1;for(o=0;o<n;o++)t[o]=r[o];for(o=0;o<32;o++)t[o+32]=i[o];if($(f,t,n),st(f),et(h,l,f),rt(l,r.subarray(32)),Z(h,l),tt(u,h),n-=64,b(r,0,u,0)){for(o=0;o<n;o++)t[o]=0;return-1}for(o=0;o<n;o++)t[o]=r[o+64];return n}var ct=64,ft=32,ht=64;function lt(t,e){if(32!==t.length)throw new Error("bad key size");if(24!==e.length)throw new Error("bad nonce size")}function pt(){for(var t=0;t<arguments.length;t++)if(!(arguments[t]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function dt(t){for(var e=0;e<t.length;e++)t[e]=0}t.lowlevel={crypto_core_hsalsa20:v,crypto_stream_xor:S,crypto_stream:E,crypto_stream_salsa20_xor:_,crypto_stream_salsa20:A,crypto_onetimeauth:k,crypto_onetimeauth_verify:x,crypto_verify_16:y,crypto_verify_32:b,crypto_secretbox:M,crypto_secretbox_open:C,crypto_scalarmult:K,crypto_scalarmult_base:V,crypto_box_beforenm:z,crypto_box_afternm:W,crypto_box:function(t,e,r,n,i,o){var s=new Uint8Array(32);return z(s,i,o),W(t,e,r,n,s)},crypto_box_open:function(t,e,r,n,i,o){var s=new Uint8Array(32);return z(s,i,o),Q(t,e,r,n,s)},crypto_box_keypair:G,crypto_hash:$,crypto_sign:at,crypto_sign_keypair:nt,crypto_sign_open:ut,crypto_secretbox_KEYBYTES:32,crypto_secretbox_NONCEBYTES:24,crypto_secretbox_ZEROBYTES:32,crypto_secretbox_BOXZEROBYTES:16,crypto_scalarmult_BYTES:32,crypto_scalarmult_SCALARBYTES:32,crypto_box_PUBLICKEYBYTES:32,crypto_box_SECRETKEYBYTES:32,crypto_box_BEFORENMBYTES:32,crypto_box_NONCEBYTES:24,crypto_box_ZEROBYTES:32,crypto_box_BOXZEROBYTES:16,crypto_sign_BYTES:ct,crypto_sign_PUBLICKEYBYTES:ft,crypto_sign_SECRETKEYBYTES:ht,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:e,D:c,L:it,pack25519:B,unpack25519:U,M:D,A:j,S:F,Z:L,pow2523:H,add:Z,set25519:T,modL:ot,scalarmult:et,scalarbase:rt},t.randomBytes=function(t){var e=new Uint8Array(t);return n(e,t),e},t.secretbox=function(t,e,r){pt(t,e,r),lt(r,e);for(var n=new Uint8Array(32+t.length),i=new Uint8Array(n.length),o=0;o<t.length;o++)n[o+32]=t[o];return M(i,n,n.length,e,r),i.subarray(16)},t.secretbox.open=function(t,e,r){pt(t,e,r),lt(r,e);for(var n=new Uint8Array(16+t.length),i=new Uint8Array(n.length),o=0;o<t.length;o++)n[o+16]=t[o];return n.length<32||0!==C(i,n,n.length,e,r)?null:i.subarray(32)},t.secretbox.keyLength=32,t.secretbox.nonceLength=24,t.secretbox.overheadLength=16,t.scalarMult=function(t,e){if(pt(t,e),32!==t.length)throw new Error("bad n size");if(32!==e.length)throw new Error("bad p size");var r=new Uint8Array(32);return K(r,t,e),r},t.scalarMult.base=function(t){if(pt(t),32!==t.length)throw new Error("bad n size");var e=new Uint8Array(32);return V(e,t),e},t.scalarMult.scalarLength=32,t.scalarMult.groupElementLength=32,t.box=function(e,r,n,i){var o=t.box.before(n,i);return t.secretbox(e,r,o)},t.box.before=function(t,e){pt(t,e),function(t,e){if(32!==t.length)throw new Error("bad public key size");if(32!==e.length)throw new Error("bad secret key size")}(t,e);var r=new Uint8Array(32);return z(r,t,e),r},t.box.after=t.secretbox,t.box.open=function(e,r,n,i){var o=t.box.before(n,i);return t.secretbox.open(e,r,o)},t.box.open.after=t.secretbox.open,t.box.keyPair=function(){var t=new Uint8Array(32),e=new Uint8Array(32);return G(t,e),{publicKey:t,secretKey:e}},t.box.keyPair.fromSecretKey=function(t){if(pt(t),32!==t.length)throw new Error("bad secret key size");var e=new Uint8Array(32);return V(e,t),{publicKey:e,secretKey:new Uint8Array(t)}},t.box.publicKeyLength=32,t.box.secretKeyLength=32,t.box.sharedKeyLength=32,t.box.nonceLength=24,t.box.overheadLength=t.secretbox.overheadLength,t.sign=function(t,e){if(pt(t,e),e.length!==ht)throw new Error("bad secret key size");var r=new Uint8Array(ct+t.length);return at(r,t,t.length,e),r},t.sign.open=function(t,e){if(pt(t,e),e.length!==ft)throw new Error("bad public key size");var r=new Uint8Array(t.length),n=ut(r,t,t.length,e);if(n<0)return null;for(var i=new Uint8Array(n),o=0;o<i.length;o++)i[o]=r[o];return i},t.sign.detached=function(e,r){for(var n=t.sign(e,r),i=new Uint8Array(ct),o=0;o<i.length;o++)i[o]=n[o];return i},t.sign.detached.verify=function(t,e,r){if(pt(t,e,r),e.length!==ct)throw new Error("bad signature size");if(r.length!==ft)throw new Error("bad public key size");var n,i=new Uint8Array(ct+t.length),o=new Uint8Array(ct+t.length);for(n=0;n<ct;n++)i[n]=e[n];for(n=0;n<t.length;n++)i[n+ct]=t[n];return ut(o,i,i.length,r)>=0},t.sign.keyPair=function(){var t=new Uint8Array(ft),e=new Uint8Array(ht);return nt(t,e),{publicKey:t,secretKey:e}},t.sign.keyPair.fromSecretKey=function(t){if(pt(t),t.length!==ht)throw new Error("bad secret key size");for(var e=new Uint8Array(ft),r=0;r<e.length;r++)e[r]=t[32+r];return{publicKey:e,secretKey:new Uint8Array(t)}},t.sign.keyPair.fromSeed=function(t){if(pt(t),32!==t.length)throw new Error("bad seed size");for(var e=new Uint8Array(ft),r=new Uint8Array(ht),n=0;n<32;n++)r[n]=t[n];return nt(e,r,!0),{publicKey:e,secretKey:r}},t.sign.publicKeyLength=ft,t.sign.secretKeyLength=ht,t.sign.seedLength=32,t.sign.signatureLength=ct,t.hash=function(t){pt(t);var e=new Uint8Array(64);return $(e,t,t.length),e},t.hash.hashLength=64,t.verify=function(t,e){return pt(t,e),0!==t.length&&0!==e.length&&t.length===e.length&&0===g(t,0,e,0,t.length)},t.setPRNG=function(t){n=t},function(){var e="undefined"!=typeof self?self.crypto||self.msCrypto:null;e&&e.getRandomValues?t.setPRNG((function(t,r){var n,i=new Uint8Array(r);for(n=0;n<r;n+=65536)e.getRandomValues(i.subarray(n,n+Math.min(r-n,65536)));for(n=0;n<r;n++)t[n]=i[n];dt(i)})):(e=r(5338))&&e.randomBytes&&t.setPRNG((function(t,r){var n,i=e.randomBytes(r);for(n=0;n<r;n++)t[n]=i[n];dt(i)}))}()}(t.exports?t.exports:self.nacl=self.nacl||{})},1589:(t,e,r)=>{var n=r(9522);function i(t){return t.name||t.toString().match(/function (.*?)\s*\(/)[1]}function o(t){return n.Nil(t)?"":i(t.constructor)}function s(t,e){Error.captureStackTrace&&Error.captureStackTrace(t,e)}function a(t){return n.Function(t)?t.toJSON?t.toJSON():i(t):n.Array(t)?"Array":t&&n.Object(t)?"Object":void 0!==t?t:""}function u(t,e,r){var i=function(t){return n.Function(t)?"":n.String(t)?JSON.stringify(t):t&&n.Object(t)?"":t}(e);return"Expected "+a(t)+", got"+(""!==r?" "+r:"")+(""!==i?" "+i:"")}function c(t,e,r){r=r||o(e),this.message=u(t,e,r),s(this,c),this.__type=t,this.__value=e,this.__valueTypeName=r}function f(t,e,r,n,i){t?(i=i||o(n),this.message=function(t,e,r,n,i){var o='" of type ';return"key"===e&&(o='" with key type '),u('property "'+a(r)+o+a(t),n,i)}(t,r,e,n,i)):this.message='Unexpected property "'+e+'"',s(this,c),this.__label=r,this.__property=e,this.__type=t,this.__value=n,this.__valueTypeName=i}c.prototype=Object.create(Error.prototype),c.prototype.constructor=c,f.prototype=Object.create(Error.prototype),f.prototype.constructor=c,t.exports={TfTypeError:c,TfPropertyTypeError:f,tfCustomError:function(t,e){return new c(t,{},e)},tfSubError:function(t,e,r){return t instanceof f?(e=e+"."+t.__property,t=new f(t.__type,e,t.__label,t.__value,t.__valueTypeName)):t instanceof c&&(t=new f(t.__type,e,r,t.__value,t.__valueTypeName)),s(t),t},tfJSON:a,getValueTypeName:o}},9828:(t,e,r)=>{var n=r(8834).Buffer,i=r(9522),o=r(1589);function s(t){return n.isBuffer(t)}function a(t){return"string"==typeof t&&/^([0-9a-f]{2})+$/i.test(t)}function u(t,e){var r=t.toJSON();function n(n){if(!t(n))return!1;if(n.length===e)return!0;throw o.tfCustomError(r+"(Length: "+e+")",r+"(Length: "+n.length+")")}return n.toJSON=function(){return r},n}var c=u.bind(null,i.Array),f=u.bind(null,s),h=u.bind(null,a),l=u.bind(null,i.String),p=Math.pow(2,53)-1,d={ArrayN:c,Buffer:s,BufferN:f,Finite:function(t){return"number"==typeof t&&isFinite(t)},Hex:a,HexN:h,Int8:function(t){return t<<24>>24===t},Int16:function(t){return t<<16>>16===t},Int32:function(t){return(0|t)===t},Int53:function(t){return"number"==typeof t&&t>=-p&&t<=p&&Math.floor(t)===t},Range:function(t,e,r){function n(n,i){return r(n,i)&&n>t&&n<e}return r=r||i.Number,n.toJSON=function(){return`${r.toJSON()} between [${t}, ${e}]`},n},StringN:l,UInt8:function(t){return(255&t)===t},UInt16:function(t){return(65535&t)===t},UInt32:function(t){return t>>>0===t},UInt53:function(t){return"number"==typeof t&&t>=0&&t<=p&&Math.floor(t)===t}};for(var g in d)d[g].toJSON=function(t){return t}.bind(null,g);t.exports=d},9031:(t,e,r)=>{var n=r(1589),i=r(9522),o=n.tfJSON,s=n.TfTypeError,a=n.TfPropertyTypeError,u=n.tfSubError,c=n.getValueTypeName,f={arrayOf:function(t,e){function r(r,n){return!!i.Array(r)&&!i.Nil(r)&&!(void 0!==e.minLength&&r.length<e.minLength)&&!(void 0!==e.maxLength&&r.length>e.maxLength)&&(void 0===e.length||r.length===e.length)&&r.every((function(e,r){try{return l(t,e,n)}catch(t){throw u(t,r)}}))}return t=h(t),e=e||{},r.toJSON=function(){var r="["+o(t)+"]";return void 0!==e.length?r+="{"+e.length+"}":void 0===e.minLength&&void 0===e.maxLength||(r+="{"+(void 0===e.minLength?0:e.minLength)+","+(void 0===e.maxLength?1/0:e.maxLength)+"}"),r},r},maybe:function t(e){function r(r,n){return i.Nil(r)||e(r,n,t)}return e=h(e),r.toJSON=function(){return"?"+o(e)},r},map:function(t,e){function r(r,n){if(!i.Object(r))return!1;if(i.Nil(r))return!1;for(var o in r){try{e&&l(e,o,n)}catch(t){throw u(t,o,"key")}try{var s=r[o];l(t,s,n)}catch(t){throw u(t,o)}}return!0}return t=h(t),e&&(e=h(e)),r.toJSON=e?function(){return"{"+o(e)+": "+o(t)+"}"}:function(){return"{"+o(t)+"}"},r},object:function(t){var e={};for(var r in t)e[r]=h(t[r]);function n(t,r){if(!i.Object(t))return!1;if(i.Nil(t))return!1;var n;try{for(n in e)l(e[n],t[n],r)}catch(t){throw u(t,n)}if(r)for(n in t)if(!e[n])throw new a(void 0,n);return!0}return n.toJSON=function(){return o(e)},n},anyOf:function(){var t=[].slice.call(arguments).map(h);function e(e,r){return t.some((function(t){try{return l(t,e,r)}catch(t){return!1}}))}return e.toJSON=function(){return t.map(o).join("|")},e},allOf:function(){var t=[].slice.call(arguments).map(h);function e(e,r){return t.every((function(t){try{return l(t,e,r)}catch(t){return!1}}))}return e.toJSON=function(){return t.map(o).join(" & ")},e},quacksLike:function(t){function e(e){return t===c(e)}return e.toJSON=function(){return t},e},tuple:function(){var t=[].slice.call(arguments).map(h);function e(e,r){return!i.Nil(e)&&!i.Nil(e.length)&&(!r||e.length===t.length)&&t.every((function(t,n){try{return l(t,e[n],r)}catch(t){throw u(t,n)}}))}return e.toJSON=function(){return"("+t.map(o).join(", ")+")"},e},value:function(t){function e(e){return e===t}return e.toJSON=function(){return t},e}};function h(t){if(i.String(t))return"?"===t[0]?f.maybe(t.slice(1)):i[t]||f.quacksLike(t);if(t&&i.Object(t)){if(i.Array(t)){if(1!==t.length)throw new TypeError("Expected compile() parameter of type Array of length 1");return f.arrayOf(t[0])}return f.object(t)}return i.Function(t)?t:f.value(t)}function l(t,e,r,n){if(i.Function(t)){if(t(e,r))return!0;throw new s(n||t,e)}return l(h(t),e,r)}for(var p in f.oneOf=f.anyOf,i)l[p]=i[p];for(p in f)l[p]=f[p];var d=r(9828);for(p in d)l[p]=d[p];l.compile=h,l.TfTypeError=s,l.TfPropertyTypeError=a,t.exports=l},9522:t=>{var e={Array:function(t){return null!=t&&t.constructor===Array},Boolean:function(t){return"boolean"==typeof t},Function:function(t){return"function"==typeof t},Nil:function(t){return null==t},Number:function(t){return"number"==typeof t},Object:function(t){return"object"==typeof t},String:function(t){return"string"==typeof t},"":function(){return!0}};for(var r in e.Null=e.Nil,e)e[r].toJSON=function(t){return t}.bind(null,r);t.exports=e},9639:function(t,e,r){var n;t=r.nmd(t),function(i){e&&e.nodeType,t&&t.nodeType;var o="object"==typeof r.g&&r.g;o.global!==o&&o.window!==o&&o.self;var s,a=2147483647,u=36,c=/^xn--/,f=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,l={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,d=String.fromCharCode;function g(t){throw RangeError(l[t])}function y(t,e){for(var r=t.length,n=[];r--;)n[r]=e(t[r]);return n}function b(t,e){var r=t.split("@"),n="";return r.length>1&&(n=r[0]+"@",t=r[1]),n+y((t=t.replace(h,".")).split("."),e).join(".")}function m(t){for(var e,r,n=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(r=t.charCodeAt(i++)))?n.push(((1023&e)<<10)+(1023&r)+65536):(n.push(e),i--):n.push(e);return n}function v(t){return y(t,(function(t){var e="";return t>65535&&(e+=d((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+d(t)})).join("")}function w(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function _(t,e,r){var n=0;for(t=r?p(t/700):t>>1,t+=p(t/e);t>455;n+=u)t=p(t/35);return p(n+36*t/(t+38))}function A(t){var e,r,n,i,o,s,c,f,h,l,d,y=[],b=t.length,m=0,w=128,A=72;for((r=t.lastIndexOf("-"))<0&&(r=0),n=0;n<r;++n)t.charCodeAt(n)>=128&&g("not-basic"),y.push(t.charCodeAt(n));for(i=r>0?r+1:0;i<b;){for(o=m,s=1,c=u;i>=b&&g("invalid-input"),((f=(d=t.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:u)>=u||f>p((a-m)/s))&&g("overflow"),m+=f*s,!(f<(h=c<=A?1:c>=A+26?26:c-A));c+=u)s>p(a/(l=u-h))&&g("overflow"),s*=l;A=_(m-o,e=y.length+1,0==o),p(m/e)>a-w&&g("overflow"),w+=p(m/e),m%=e,y.splice(m++,0,w)}return v(y)}function E(t){var e,r,n,i,o,s,c,f,h,l,y,b,v,A,E,S=[];for(b=(t=m(t)).length,e=128,r=0,o=72,s=0;s<b;++s)(y=t[s])<128&&S.push(d(y));for(n=i=S.length,i&&S.push("-");n<b;){for(c=a,s=0;s<b;++s)(y=t[s])>=e&&y<c&&(c=y);for(c-e>p((a-r)/(v=n+1))&&g("overflow"),r+=(c-e)*v,e=c,s=0;s<b;++s)if((y=t[s])<e&&++r>a&&g("overflow"),y==e){for(f=r,h=u;!(f<(l=h<=o?1:h>=o+26?26:h-o));h+=u)E=f-l,A=u-l,S.push(d(w(l+E%A,0))),f=p(E/A);S.push(d(w(f,0))),o=_(r,v,n==i),r=0,++n}++r,++e}return S.join("")}s={version:"1.3.2",ucs2:{decode:m,encode:v},decode:A,encode:E,toASCII:function(t){return b(t,(function(t){return f.test(t)?"xn--"+E(t):t}))},toUnicode:function(t){return b(t,(function(t){return c.test(t)?A(t.slice(4).toLowerCase()):t}))}},void 0===(n=function(){return s}.call(e,r,e,t))||(t.exports=n)}()},883:(t,e,r)=>{"use strict";var n=r(9639),i=r(5225);function o(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}e.parse=v,e.resolve=function(t,e){return v(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?v(t,!1,!0).resolveObject(e):e},e.format=function(t){return i.isString(t)&&(t=v(t)),t instanceof o?t.format():o.prototype.format.call(t)},e.Url=o;var s=/^([a-z0-9.+-]+:)/i,a=/:[0-9]*$/,u=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,c=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(c),h=["%","/","?",";","#"].concat(f),l=["/","?","#"],p=/^[+a-z0-9A-Z_-]{0,63}$/,d=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},m=r(6642);function v(t,e,r){if(t&&i.isObject(t)&&t instanceof o)return t;var n=new o;return n.parse(t,e,r),n}o.prototype.parse=function(t,e,r){if(!i.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o<t.indexOf("#")?"?":"#",c=t.split(a);c[0]=c[0].replace(/\\/g,"/");var v=t=c.join(a);if(v=v.trim(),!r&&1===t.split("#").length){var w=u.exec(v);if(w)return this.path=v,this.href=v,this.pathname=w[1],w[2]?(this.search=w[2],this.query=e?m.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var _=s.exec(v);if(_){var A=(_=_[0]).toLowerCase();this.protocol=A,v=v.substr(_.length)}if(r||_||v.match(/^\/\/[^@\/]+@[^@\/]+/)){var E="//"===v.substr(0,2);!E||_&&y[_]||(v=v.substr(2),this.slashes=!0)}if(!y[_]&&(E||_&&!b[_])){for(var S,I,k=-1,x=0;x<l.length;x++)-1!==(M=v.indexOf(l[x]))&&(-1===k||M<k)&&(k=M);for(-1!==(I=-1===k?v.lastIndexOf("@"):v.lastIndexOf("@",k))&&(S=v.slice(0,I),v=v.slice(I+1),this.auth=decodeURIComponent(S)),k=-1,x=0;x<h.length;x++){var M;-1!==(M=v.indexOf(h[x]))&&(-1===k||M<k)&&(k=M)}-1===k&&(k=v.length),this.host=v.slice(0,k),v=v.slice(k),this.parseHost(),this.hostname=this.hostname||"";var C="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!C)for(var T=this.hostname.split(/\./),O=(x=0,T.length);x<O;x++){var P=T[x];if(P&&!P.match(p)){for(var B="",R=0,N=P.length;R<N;R++)P.charCodeAt(R)>127?B+="x":B+=P[R];if(!B.match(p)){var U=T.slice(0,x),j=T.slice(x+1),L=P.match(d);L&&(U.push(L[1]),j.unshift(L[2])),j.length&&(v="/"+j.join(".")+v),this.hostname=U.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=n.toASCII(this.hostname));var D=this.port?":"+this.port:"",F=this.hostname||"";this.host=F+D,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==v[0]&&(v="/"+v))}if(!g[A])for(x=0,O=f.length;x<O;x++){var q=f[x];if(-1!==v.indexOf(q)){var H=encodeURIComponent(q);H===q&&(H=escape(q)),v=v.split(q).join(H)}}var K=v.indexOf("#");-1!==K&&(this.hash=v.substr(K),v=v.slice(0,K));var V=v.indexOf("?");if(-1!==V?(this.search=v.substr(V),this.query=v.substr(V+1),e&&(this.query=m.parse(this.query)),v=v.slice(0,V)):e&&(this.search="",this.query={}),v&&(this.pathname=v),b[A]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){D=this.pathname||"";var G=this.search||"";this.path=D+G}return this.href=this.format(),this},o.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",r=this.pathname||"",n=this.hash||"",o=!1,s="";this.host?o=t+this.host:this.hostname&&(o=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(o+=":"+this.port)),this.query&&i.isObject(this.query)&&Object.keys(this.query).length&&(s=m.stringify(this.query));var a=this.search||s&&"?"+s||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||b[e])&&!1!==o?(o="//"+(o||""),r&&"/"!==r.charAt(0)&&(r="/"+r)):o||(o=""),n&&"#"!==n.charAt(0)&&(n="#"+n),a&&"?"!==a.charAt(0)&&(a="?"+a),e+o+(r=r.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(a=a.replace("#","%23"))+n},o.prototype.resolve=function(t){return this.resolveObject(v(t,!1,!0)).format()},o.prototype.resolveObject=function(t){if(i.isString(t)){var e=new o;e.parse(t,!1,!0),t=e}for(var r=new o,n=Object.keys(this),s=0;s<n.length;s++){var a=n[s];r[a]=this[a]}if(r.hash=t.hash,""===t.href)return r.href=r.format(),r;if(t.slashes&&!t.protocol){for(var u=Object.keys(t),c=0;c<u.length;c++){var f=u[c];"protocol"!==f&&(r[f]=t[f])}return b[r.protocol]&&r.hostname&&!r.pathname&&(r.path=r.pathname="/"),r.href=r.format(),r}if(t.protocol&&t.protocol!==r.protocol){if(!b[t.protocol]){for(var h=Object.keys(t),l=0;l<h.length;l++){var p=h[l];r[p]=t[p]}return r.href=r.format(),r}if(r.protocol=t.protocol,t.host||y[t.protocol])r.pathname=t.pathname;else{for(var d=(t.pathname||"").split("/");d.length&&!(t.host=d.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==d[0]&&d.unshift(""),d.length<2&&d.unshift(""),r.pathname=d.join("/")}if(r.search=t.search,r.query=t.query,r.host=t.host||"",r.auth=t.auth,r.hostname=t.hostname||t.host,r.port=t.port,r.pathname||r.search){var g=r.pathname||"",m=r.search||"";r.path=g+m}return r.slashes=r.slashes||t.slashes,r.href=r.format(),r}var v=r.pathname&&"/"===r.pathname.charAt(0),w=t.host||t.pathname&&"/"===t.pathname.charAt(0),_=w||v||r.host&&t.pathname,A=_,E=r.pathname&&r.pathname.split("/")||[],S=(d=t.pathname&&t.pathname.split("/")||[],r.protocol&&!b[r.protocol]);if(S&&(r.hostname="",r.port=null,r.host&&(""===E[0]?E[0]=r.host:E.unshift(r.host)),r.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===d[0]?d[0]=t.host:d.unshift(t.host)),t.host=null),_=_&&(""===d[0]||""===E[0])),w)r.host=t.host||""===t.host?t.host:r.host,r.hostname=t.hostname||""===t.hostname?t.hostname:r.hostname,r.search=t.search,r.query=t.query,E=d;else if(d.length)E||(E=[]),E.pop(),E=E.concat(d),r.search=t.search,r.query=t.query;else if(!i.isNullOrUndefined(t.search))return S&&(r.hostname=r.host=E.shift(),(C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift())),r.search=t.search,r.query=t.query,i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!E.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var I=E.slice(-1)[0],k=(r.host||t.host||E.length>1)&&("."===I||".."===I)||""===I,x=0,M=E.length;M>=0;M--)"."===(I=E[M])?E.splice(M,1):".."===I?(E.splice(M,1),x++):x&&(E.splice(M,1),x--);if(!_&&!A)for(;x--;x)E.unshift("..");!_||""===E[0]||E[0]&&"/"===E[0].charAt(0)||E.unshift(""),k&&"/"!==E.join("/").substr(-1)&&E.push("");var C,T=""===E[0]||E[0]&&"/"===E[0].charAt(0);return S&&(r.hostname=r.host=T?"":E.length?E.shift():"",(C=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=C.shift(),r.host=r.hostname=C.shift())),(_=_||r.host&&E.length)&&!T&&E.unshift(""),E.length?r.pathname=E.join("/"):(r.pathname=null,r.path=null),i.isNull(r.pathname)&&i.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},5225:t=>{"use strict";t.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},5803:(t,e,r)=>{function n(t){try{if(!r.g.localStorage)return!1}catch(t){return!1}var e=r.g.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}t.exports=function(t,e){if(n("noDeprecation"))return t;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(e);n("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}}},82:t=>{t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},4895:(t,e,r)=>{"use strict";var n=r(2635),i=r(3138),o=r(2094),s=r(198);function a(t){return t.call.bind(t)}var u="undefined"!=typeof BigInt,c="undefined"!=typeof Symbol,f=a(Object.prototype.toString),h=a(Number.prototype.valueOf),l=a(String.prototype.valueOf),p=a(Boolean.prototype.valueOf);if(u)var d=a(BigInt.prototype.valueOf);if(c)var g=a(Symbol.prototype.valueOf);function y(t,e){if("object"!=typeof t)return!1;try{return e(t),!0}catch(t){return!1}}function b(t){return"[object Map]"===f(t)}function m(t){return"[object Set]"===f(t)}function v(t){return"[object WeakMap]"===f(t)}function w(t){return"[object WeakSet]"===f(t)}function _(t){return"[object ArrayBuffer]"===f(t)}function A(t){return"undefined"!=typeof ArrayBuffer&&(_.working?_(t):t instanceof ArrayBuffer)}function E(t){return"[object DataView]"===f(t)}function S(t){return"undefined"!=typeof DataView&&(E.working?E(t):t instanceof DataView)}e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=s,e.isPromise=function(t){return"undefined"!=typeof Promise&&t instanceof Promise||null!==t&&"object"==typeof t&&"function"==typeof t.then&&"function"==typeof t.catch},e.isArrayBufferView=function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):s(t)||S(t)},e.isUint8Array=function(t){return"Uint8Array"===o(t)},e.isUint8ClampedArray=function(t){return"Uint8ClampedArray"===o(t)},e.isUint16Array=function(t){return"Uint16Array"===o(t)},e.isUint32Array=function(t){return"Uint32Array"===o(t)},e.isInt8Array=function(t){return"Int8Array"===o(t)},e.isInt16Array=function(t){return"Int16Array"===o(t)},e.isInt32Array=function(t){return"Int32Array"===o(t)},e.isFloat32Array=function(t){return"Float32Array"===o(t)},e.isFloat64Array=function(t){return"Float64Array"===o(t)},e.isBigInt64Array=function(t){return"BigInt64Array"===o(t)},e.isBigUint64Array=function(t){return"BigUint64Array"===o(t)},b.working="undefined"!=typeof Map&&b(new Map),e.isMap=function(t){return"undefined"!=typeof Map&&(b.working?b(t):t instanceof Map)},m.working="undefined"!=typeof Set&&m(new Set),e.isSet=function(t){return"undefined"!=typeof Set&&(m.working?m(t):t instanceof Set)},v.working="undefined"!=typeof WeakMap&&v(new WeakMap),e.isWeakMap=function(t){return"undefined"!=typeof WeakMap&&(v.working?v(t):t instanceof WeakMap)},w.working="undefined"!=typeof WeakSet&&w(new WeakSet),e.isWeakSet=function(t){return w(t)},_.working="undefined"!=typeof ArrayBuffer&&_(new ArrayBuffer),e.isArrayBuffer=A,E.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&E(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=S;var I="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function k(t){return"[object SharedArrayBuffer]"===f(t)}function x(t){return void 0!==I&&(void 0===k.working&&(k.working=k(new I)),k.working?k(t):t instanceof I)}function M(t){return y(t,h)}function C(t){return y(t,l)}function T(t){return y(t,p)}function O(t){return u&&y(t,d)}function P(t){return c&&y(t,g)}e.isSharedArrayBuffer=x,e.isAsyncFunction=function(t){return"[object AsyncFunction]"===f(t)},e.isMapIterator=function(t){return"[object Map Iterator]"===f(t)},e.isSetIterator=function(t){return"[object Set Iterator]"===f(t)},e.isGeneratorObject=function(t){return"[object Generator]"===f(t)},e.isWebAssemblyCompiledModule=function(t){return"[object WebAssembly.Module]"===f(t)},e.isNumberObject=M,e.isStringObject=C,e.isBooleanObject=T,e.isBigIntObject=O,e.isSymbolObject=P,e.isBoxedPrimitive=function(t){return M(t)||C(t)||T(t)||O(t)||P(t)},e.isAnyArrayBuffer=function(t){return"undefined"!=typeof Uint8Array&&(A(t)||x(t))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw new Error(t+" is not supported in userland")}})}))},3335:(t,e,r)=>{var n=r(4406),i=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},o=/%[sdj%]/g;e.format=function(t){if(!v(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(c(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,i=n.length,s=String(t).replace(o,(function(t){if("%%"===t)return"%";if(r>=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),a=n[r];r<i;a=n[++r])b(a)||!A(a)?s+=" "+a:s+=" "+c(a);return s},e.deprecate=function(t,r){if(void 0!==n&&!0===n.noDeprecation)return t;if(void 0===n)return function(){return e.deprecate(t,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(r);n.traceDeprecation?console.trace(r):console.error(r),i=!0}return t.apply(this,arguments)}};var s={},a=/^$/;if(n.env.NODE_DEBUG){var u=n.env.NODE_DEBUG;u=u.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+u+"$","i")}function c(t,r){var n={seen:[],stylize:h};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&e._extend(n,r),w(n.showHidden)&&(n.showHidden=!1),w(n.depth)&&(n.depth=2),w(n.colors)&&(n.colors=!1),w(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=f),l(n,t,n.depth)}function f(t,e){var r=c.styles[e];return r?"["+c.colors[r][0]+"m"+t+"["+c.colors[r][1]+"m":t}function h(t,e){return t}function l(t,r,n){if(t.customInspect&&r&&I(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var i=r.inspect(n,t);return v(i)||(i=l(t,i,n)),i}var o=function(t,e){if(w(e))return t.stylize("undefined","undefined");if(v(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}return m(e)?t.stylize(""+e,"number"):y(e)?t.stylize(""+e,"boolean"):b(e)?t.stylize("null","null"):void 0}(t,r);if(o)return o;var s=Object.keys(r),a=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(s);if(t.showHidden&&(s=Object.getOwnPropertyNames(r)),S(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return p(r);if(0===s.length){if(I(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(_(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return t.stylize(Date.prototype.toString.call(r),"date");if(S(r))return p(r)}var c,f="",h=!1,A=["{","}"];return g(r)&&(h=!0,A=["[","]"]),I(r)&&(f=" [Function"+(r.name?": "+r.name:"")+"]"),_(r)&&(f=" "+RegExp.prototype.toString.call(r)),E(r)&&(f=" "+Date.prototype.toUTCString.call(r)),S(r)&&(f=" "+p(r)),0!==s.length||h&&0!=r.length?n<0?_(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),c=h?function(t,e,r,n,i){for(var o=[],s=0,a=e.length;s<a;++s)T(e,String(s))?o.push(d(t,e,r,n,String(s),!0)):o.push("");return i.forEach((function(i){i.match(/^\d+$/)||o.push(d(t,e,r,n,i,!0))})),o}(t,r,n,a,s):s.map((function(e){return d(t,r,n,a,e,h)})),t.seen.pop(),function(t,e,r){return t.reduce((function(t,e){return e.indexOf("\n"),t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60?r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1]:r[0]+e+" "+t.join(", ")+" "+r[1]}(c,f,A)):A[0]+f+A[1]}function p(t){return"["+Error.prototype.toString.call(t)+"]"}function d(t,e,r,n,i,o){var s,a,u;if((u=Object.getOwnPropertyDescriptor(e,i)||{value:e[i]}).get?a=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(a=t.stylize("[Setter]","special")),T(n,i)||(s="["+i+"]"),a||(t.seen.indexOf(u.value)<0?(a=b(r)?l(t,u.value,null):l(t,u.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),w(s)){if(o&&i.match(/^\d+$/))return a;(s=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function g(t){return Array.isArray(t)}function y(t){return"boolean"==typeof t}function b(t){return null===t}function m(t){return"number"==typeof t}function v(t){return"string"==typeof t}function w(t){return void 0===t}function _(t){return A(t)&&"[object RegExp]"===k(t)}function A(t){return"object"==typeof t&&null!==t}function E(t){return A(t)&&"[object Date]"===k(t)}function S(t){return A(t)&&("[object Error]"===k(t)||t instanceof Error)}function I(t){return"function"==typeof t}function k(t){return Object.prototype.toString.call(t)}function x(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(t=t.toUpperCase(),!s[t])if(a.test(t)){var r=n.pid;s[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else s[t]=function(){};return s[t]},e.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=r(4895),e.isArray=g,e.isBoolean=y,e.isNull=b,e.isNullOrUndefined=function(t){return null==t},e.isNumber=m,e.isString=v,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=w,e.isRegExp=_,e.types.isRegExp=_,e.isObject=A,e.isDate=E,e.types.isDate=E,e.isError=S,e.types.isNativeError=S,e.isFunction=I,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(82);var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function C(){var t=new Date,e=[x(t.getHours()),x(t.getMinutes()),x(t.getSeconds())].join(":");return[t.getDate(),M[t.getMonth()],e].join(" ")}function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",C(),e.format.apply(e,arguments))},e.inherits=r(1285),e._extend=function(t,e){if(!e||!A(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var O="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function P(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if(O&&t[O]){var e;if("function"!=typeof(e=t[O]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);i.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,i)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),O&&Object.defineProperty(e,O,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,i(t))},e.promisify.custom=O,e.callbackify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');function e(){for(var e=[],r=0;r<arguments.length;r++)e.push(arguments[r]);var i=e.pop();if("function"!=typeof i)throw new TypeError("The last argument must be of type Function");var o=this,s=function(){return i.apply(o,arguments)};t.apply(this,e).then((function(t){n.nextTick(s.bind(null,null,t))}),(function(t){n.nextTick(P.bind(null,t,s))}))}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),Object.defineProperties(e,i(t)),e}},8595:(t,e,r)=>{"use strict";var n=r(7834).Buffer;function i(t){if(t<0||t>9007199254740991||t%1!=0)throw new RangeError("value out of range")}function o(t){return i(t),t<253?1:t<=65535?3:t<=4294967295?5:9}t.exports={encode:function t(e,r,s){if(i(e),r||(r=n.allocUnsafe(o(e))),!n.isBuffer(r))throw new TypeError("buffer must be a Buffer instance");return s||(s=0),e<253?(r.writeUInt8(e,s),t.bytes=1):e<=65535?(r.writeUInt8(253,s),r.writeUInt16LE(e,s+1),t.bytes=3):e<=4294967295?(r.writeUInt8(254,s),r.writeUInt32LE(e,s+1),t.bytes=5):(r.writeUInt8(255,s),r.writeUInt32LE(e>>>0,s+1),r.writeUInt32LE(e/4294967296|0,s+5),t.bytes=9),r},decode:function t(e,r){if(!n.isBuffer(e))throw new TypeError("buffer must be a Buffer instance");r||(r=0);var o=e.readUInt8(r);if(o<253)return t.bytes=1,o;if(253===o)return t.bytes=3,e.readUInt16LE(r+1);if(254===o)return t.bytes=5,e.readUInt32LE(r+1);t.bytes=9;var s=e.readUInt32LE(r+1),a=4294967296*e.readUInt32LE(r+5)+s;return i(a),a},encodingLength:o}},2094:(t,e,r)=>{"use strict";var n=r(6388),i=r(2191),o=r(2680),s=o("Object.prototype.toString"),a=r(7226)(),u="undefined"==typeof globalThis?r.g:globalThis,c=i(),f=o("String.prototype.slice"),h={},l=r(9765),p=Object.getPrototypeOf;a&&l&&p&&n(c,(function(t){if("function"==typeof u[t]){var e=new u[t];if(Symbol.toStringTag in e){var r=p(e),n=l(r,Symbol.toStringTag);if(!n){var i=p(r);n=l(i,Symbol.toStringTag)}h[t]=n.get}}}));var d=r(198);t.exports=function(t){return!!d(t)&&(a&&Symbol.toStringTag in t?function(t){var e=!1;return n(h,(function(r,n){if(!e)try{var i=r.call(t);i===n&&(e=i)}catch(t){}})),e}(t):f(s(t),8,-1))}},1384:(t,e,r)=>{var n=r(8834).Buffer,i=r(4075);function o(t,e){if(void 0!==e&&t[0]!==e)throw new Error("Invalid network version");if(33===t.length)return{version:t[0],privateKey:t.slice(1,33),compressed:!1};if(34!==t.length)throw new Error("Invalid WIF length");if(1!==t[33])throw new Error("Invalid compression flag");return{version:t[0],privateKey:t.slice(1,33),compressed:!0}}function s(t,e,r){var i=new n(r?34:33);return i.writeUInt8(t,0),e.copy(i,1),r&&(i[33]=1),i}t.exports={decode:function(t,e){return o(i.decode(t),e)},decodeRaw:o,encode:function(t,e,r){return"number"==typeof t?i.encode(s(t,e,r)):i.encode(s(t.version,t.privateKey,t.compressed))},encodeRaw:s}},8145:e=>{"use strict";e.exports=t},3196:()=>{},8087:()=>{},8092:()=>{},936:()=>{},7464:()=>{},9415:()=>{},7374:()=>{},9285:()=>{},4854:()=>{},6602:()=>{},5338:()=>{},2191:(t,e,r)=>{"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],i="undefined"==typeof globalThis?r.g:globalThis;t.exports=function(){for(var t=[],e=0;e<n.length;e++)"function"==typeof i[n[e]]&&(t[t.length]=n[e]);return t}},9765:(t,e,r)=>{"use strict";var n=r(7286)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(t){n=null}t.exports=n},881:t=>{"use strict";t.exports=JSON.parse('{"name":"@bitgo/sdk-api","version":"2.0.0-hotfix.0","description":"REST wrapper for BitGoJS","main":"./dist/src/index.js","web":"./dist/web/main.js","types":"./dist/src/index.d.ts","scripts":{"build":"yarn tsc --build --incremental --verbose .","fmt":"prettier --write .","check-fmt":"prettier --check .","clean":"rm -r ./dist","lint":"eslint --quiet .","precommit":"yarn lint-staged","prepare":"npm run build","webpack-dev":"webpack","webpack-prod":"webpack --mode=production --node-env=production","prepublishOnly":"npm run webpack-prod"},"author":"BitGo Inc.","license":"MIT","repository":{"type":"git","url":"https://github.com/BitGo/BitGoJS.git","directory":"modules/sdk-api"},"lint-staged":{"*.{js,ts}":["yarn prettier --write","yarn eslint --fix"]},"publishConfig":{"access":"public"},"nyc":{"extension":[".ts"]},"dependencies":{"@bitgo/sdk-core":"^1.1.0-rc.1","@bitgo/sjcl":"^1.0.1-rc.3","@bitgo/utxo-lib":"^2.4.0-hotfix.0","@types/superagent":"4.1.15","bip32":"^2.0.6","bitcoinjs-message":"^2.0.0","bs58":"^2.0.1","debug":"3.1.0","sanitize-html":"^1.27.5","secp256k1":"^4.0.2","superagent":"3.8.3","superagent-proxy":"3.0.0"},"devDependencies":{"@babel/core":"^7.17.8","@babel/preset-env":"^7.16.11","@webpack-cli/generators":"^2.4.2","babel-loader":"^8.2.4","html-webpack-plugin":"^5.5.0","process":"^0.11.10","webpack":"5.66.0","webpack-cli":"4.9.1"},"gitHead":"7feeb9ce7d35c2220d985eaf8d95e451b4b49153"}')},9435:t=>{"use strict";t.exports={i8:"1.4.2"}},196:t=>{"use strict";t.exports=JSON.parse('{"OP_FALSE":0,"OP_0":0,"OP_PUSHDATA1":76,"OP_PUSHDATA2":77,"OP_PUSHDATA4":78,"OP_1NEGATE":79,"OP_RESERVED":80,"OP_TRUE":81,"OP_1":81,"OP_2":82,"OP_3":83,"OP_4":84,"OP_5":85,"OP_6":86,"OP_7":87,"OP_8":88,"OP_9":89,"OP_10":90,"OP_11":91,"OP_12":92,"OP_13":93,"OP_14":94,"OP_15":95,"OP_16":96,"OP_NOP":97,"OP_VER":98,"OP_IF":99,"OP_NOTIF":100,"OP_VERIF":101,"OP_VERNOTIF":102,"OP_ELSE":103,"OP_ENDIF":104,"OP_VERIFY":105,"OP_RETURN":106,"OP_TOALTSTACK":107,"OP_FROMALTSTACK":108,"OP_2DROP":109,"OP_2DUP":110,"OP_3DUP":111,"OP_2OVER":112,"OP_2ROT":113,"OP_2SWAP":114,"OP_IFDUP":115,"OP_DEPTH":116,"OP_DROP":117,"OP_DUP":118,"OP_NIP":119,"OP_OVER":120,"OP_PICK":121,"OP_ROLL":122,"OP_ROT":123,"OP_SWAP":124,"OP_TUCK":125,"OP_CAT":126,"OP_SUBSTR":127,"OP_LEFT":128,"OP_RIGHT":129,"OP_SIZE":130,"OP_INVERT":131,"OP_AND":132,"OP_OR":133,"OP_XOR":134,"OP_EQUAL":135,"OP_EQUALVERIFY":136,"OP_RESERVED1":137,"OP_RESERVED2":138,"OP_1ADD":139,"OP_1SUB":140,"OP_2MUL":141,"OP_2DIV":142,"OP_NEGATE":143,"OP_ABS":144,"OP_NOT":145,"OP_0NOTEQUAL":146,"OP_ADD":147,"OP_SUB":148,"OP_MUL":149,"OP_DIV":150,"OP_MOD":151,"OP_LSHIFT":152,"OP_RSHIFT":153,"OP_BOOLAND":154,"OP_BOOLOR":155,"OP_NUMEQUAL":156,"OP_NUMEQUALVERIFY":157,"OP_NUMNOTEQUAL":158,"OP_LESSTHAN":159,"OP_GREATERTHAN":160,"OP_LESSTHANOREQUAL":161,"OP_GREATERTHANOREQUAL":162,"OP_MIN":163,"OP_MAX":164,"OP_WITHIN":165,"OP_RIPEMD160":166,"OP_SHA1":167,"OP_SHA256":168,"OP_HASH160":169,"OP_HASH256":170,"OP_CODESEPARATOR":171,"OP_CHECKSIG":172,"OP_CHECKSIGVERIFY":173,"OP_CHECKMULTISIG":174,"OP_CHECKMULTISIGVERIFY":175,"OP_NOP1":176,"OP_NOP2":177,"OP_CHECKLOCKTIMEVERIFY":177,"OP_NOP3":178,"OP_CHECKSEQUENCEVERIFY":178,"OP_NOP4":179,"OP_NOP5":180,"OP_NOP6":181,"OP_NOP7":182,"OP_NOP8":183,"OP_NOP9":184,"OP_NOP10":185,"OP_PUBKEYHASH":253,"OP_PUBKEY":254,"OP_INVALIDOPCODE":255}')},3892:t=>{"use strict";t.exports=JSON.parse('{"COMPRESSED_TYPE_INVALID":"compressed should be a boolean","EC_PRIVATE_KEY_TYPE_INVALID":"private key should be a Buffer","EC_PRIVATE_KEY_LENGTH_INVALID":"private key length is invalid","EC_PRIVATE_KEY_RANGE_INVALID":"private key range is invalid","EC_PRIVATE_KEY_TWEAK_ADD_FAIL":"tweak out of range or resulting private key is invalid","EC_PRIVATE_KEY_TWEAK_MUL_FAIL":"tweak out of range","EC_PRIVATE_KEY_EXPORT_DER_FAIL":"couldn\'t export to DER format","EC_PRIVATE_KEY_IMPORT_DER_FAIL":"couldn\'t import from DER format","EC_PUBLIC_KEYS_TYPE_INVALID":"public keys should be an Array","EC_PUBLIC_KEYS_LENGTH_INVALID":"public keys Array should have at least 1 element","EC_PUBLIC_KEY_TYPE_INVALID":"public key should be a Buffer","EC_PUBLIC_KEY_LENGTH_INVALID":"public key length is invalid","EC_PUBLIC_KEY_PARSE_FAIL":"the public key could not be parsed or is invalid","EC_PUBLIC_KEY_CREATE_FAIL":"private was invalid, try again","EC_PUBLIC_KEY_TWEAK_ADD_FAIL":"tweak out of range or resulting public key is invalid","EC_PUBLIC_KEY_TWEAK_MUL_FAIL":"tweak out of range","EC_PUBLIC_KEY_COMBINE_FAIL":"the sum of the public keys is not valid","ECDH_FAIL":"scalar was invalid (zero or overflow)","ECDSA_SIGNATURE_TYPE_INVALID":"signature should be a Buffer","ECDSA_SIGNATURE_LENGTH_INVALID":"signature length is invalid","ECDSA_SIGNATURE_PARSE_FAIL":"couldn\'t parse signature","ECDSA_SIGNATURE_PARSE_DER_FAIL":"couldn\'t parse DER signature","ECDSA_SIGNATURE_SERIALIZE_DER_FAIL":"couldn\'t serialize signature to DER format","ECDSA_SIGN_FAIL":"nonce generation function failed or private key is invalid","ECDSA_RECOVER_FAIL":"couldn\'t recover public key from signature","MSG32_TYPE_INVALID":"message should be a Buffer","MSG32_LENGTH_INVALID":"message length is invalid","OPTIONS_TYPE_INVALID":"options should be an Object","OPTIONS_DATA_TYPE_INVALID":"options.data should be a Buffer","OPTIONS_DATA_LENGTH_INVALID":"options.data length is invalid","OPTIONS_NONCEFN_TYPE_INVALID":"options.noncefn should be a Function","RECOVERY_ID_TYPE_INVALID":"recovery should be a Number","RECOVERY_ID_VALUE_INVALID":"recovery should have value between -1 and 4","TWEAK_TYPE_INVALID":"tweak should be a Buffer","TWEAK_LENGTH_INVALID":"tweak length is invalid"}')},9234:t=>{"use strict";t.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},26:t=>{"use strict";t.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},9167:t=>{"use strict";t.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},3418:t=>{"use strict";t.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},763:t=>{"use strict";t.exports={i8:"6.5.4"}},8675:t=>{"use strict";t.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')}},r={};function n(t){var i=r[t];if(void 0!==i)return i.exports;var o=r[t]={id:t,loaded:!1,exports:{}};return e[t].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}return n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),n(5326)})()}));